From c552dfd69248938b68e349a047a599063402044c Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期三, 15 十一月 2023 19:06:06 +0800 Subject: [PATCH] modified: src/views/plan/customerorder/customerorder-form.vue modified: src/views/plan/customerorder/index.vue modified: src/views/plan/masterproductionschedule/auto-manufacturingorder.vue --- src/views/plan/customerorder/index.vue | 755 ++++++++++++++-------------------------------------------- 1 files changed, 182 insertions(+), 573 deletions(-) diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue index 1810399..15515eb 100644 --- a/src/views/plan/customerorder/index.vue +++ b/src/views/plan/customerorder/index.vue @@ -21,8 +21,9 @@ </el-button> <el-dropdown-menu slot="dropdown"> <el-dropdown-item + :key="index" :command="item.command" - v-for="item in stateTagArr" + v-for="(item,index) in stateTagArr" :disabled="item.disabled" >{{ item.label }}</el-dropdown-item > @@ -38,8 +39,9 @@ </el-button> <el-dropdown-menu slot="dropdown"> <el-dropdown-item + :key="index" :command="item.command" - v-for="item in documentTagArr" + v-for="(item,index) in documentTagArr" :disabled="item.disabled" > {{ item.label }} @@ -58,20 +60,28 @@ <el-dropdown-menu slot="dropdown"> <el-dropdown-item :command="item.command" - v-for="item in commitStateTagArr" + :key="index" + v-for="(item,index) in commitStateTagArr" :disabled="item.disabled" >{{ item.label }}</el-dropdown-item > </el-dropdown-menu> </el-dropdown> - <el-button + <!-- <el-button + v-if="permissions.customerorder_ifs_line" + style="margin-left:10px;" + type="primary" + @click="pullIfsLineNo" + >鑾峰彇OTC琛屽彿</el-button + > --> + <!-- <el-button v-if="permissions.customerorder_push_otc" style="margin-left:10px;" type="primary" @click="pushOtc" - >鎺ㄩ�丒RP</el-button - > - <el-button + >鎺ㄩ�丱TC</el-button + > --> + <!-- <el-button style="margin-left:10px;" type="primary" @click="importOutPutBatch" @@ -82,14 +92,14 @@ type="primary" @click="exportStandBook" >瀵煎嚭鍙拌处</el-button - > - <el-button + > --> + <!-- <el-button v-if="permissions.plan_customerorder_return" style="margin-left:10px;" type="primary" @click="returnOrder" >璁㈠崟閫�鍥�</el-button - > + > --> </template> </ttable> @@ -240,18 +250,18 @@ </el-dialog> </basic-container> - <el-dialog title="閫夋嫨鍚屾鏃ユ湡" :visible.sync="syncDateVisible" width="30%"> + <el-dialog title="閫夋嫨鍚屾鏃ユ湡" :visible.sync="syncDateVisible" width="20%"> <div style="display: flex;justify-content: center"> - <el-date-picker - v-model="syncDate" - type="daterange" - value-format="yyyy-MM-dd" - range-separator="鑷�" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - :picker-options="pickerOptions" - > - </el-date-picker> + <el-form :model="dataForm" :inline="true" :rules="dataRule" ref="dataForm" class="l-mes"> + <el-form-item label="鏃ユ湡" prop="selectTime"> + <el-date-picker + v-model="dataForm.selectTime" + type="datetime" + placeholder="閫夋嫨鏃ユ湡鏃堕棿" + value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-form> </div> <span slot="footer" class="dialog-footer"> <el-button @click="syncDateVisible = false">鍙� 娑�</el-button> @@ -273,6 +283,7 @@ import MpsRequirements from './mps-requirements' import SalesPartBatchDialog from './sales-part-batch.vue' import CustomerorderReturnDialog from './customerorder-return.vue' +import { otcCustomerOrderSync } from '@/api/plan/customerorder' import { delCustomerOrder, fetchListCustomerOrder, @@ -300,6 +311,14 @@ export default { data() { return { + dataForm: { + selectTime: null, + exportTime: null + }, + dataRule: { + exportTime:[{required:true,message:'瀵煎嚭鏃ユ湡涓嶈兘涓虹┖',trigger:'change'}], + selectTime:[{required:true,message:'鏃ユ湡涓嶈兘涓虹┖',trigger:'change'}] + }, pickerOptions: { onPick: ({ maxDate, minDate }) => { if (minDate && this.pickerMinDate) { @@ -323,6 +342,13 @@ showCustomerorderReturn: false, scheduleVisible: false, showDocument: false, + sourceIdList: [{ + label: '澶栭儴', + value: '0', + },{ + label: '鍐呴儴', + value: '1', + }], stateTagArr: [ { label: '鏍囪闆朵欢寰呴��', @@ -390,7 +416,7 @@ isShowQuery: false, uploadInfo: { // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl - isShow: false, + isShow: true, url: '' }, prelang: 'operation', @@ -419,9 +445,8 @@ { minWidth: '100', width: '100px', - prop: 'customerOrderNo', + prop: 'contractNo', label: '鍚堝悓缂栧彿', - // label: '璁㈠崟鍙�', sort: true, isTrue: true, isSearch: true, @@ -431,8 +456,7 @@ { minWidth: '120', prop: 'entityName', - label: '鍚堝悓涓婚', - sort: false, + label: '宸ョ▼鍚嶇О', isTrue: true, isSearch: true, searchInfoType: 'text' @@ -445,6 +469,19 @@ isTrue: true, isSearch: true, searchInfoType: 'text' + }, + { + minWidth: '120', + prop: 'sourceId', + label: '娣诲姞鏉ユ簮', + isTag: true, + isTrue: true, + isSearch: true, + searchInfoType: 'select', + formatter: this.getSourceId, + optList: () => { + return this.sourceIdList + } }, { minWidth: '200', @@ -460,42 +497,13 @@ { minWidth: '120', prop: 'placeOrderDate', - label: '绛捐鏃ユ湡', + label: '涓嬪崟鏃ユ湡', sort: true, isTrue: true, isSearch: true, searchInfoType: 'text', formatter: this.formatDutyDate }, - { - minWidth: '120', - prop: 'factoryPlaceOrderDate', - label: '寮�濮嬫棩鏈�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text', - formatter: this.formatDutyDate - }, - { - minWidth: '120', - prop: 'endTime', - label: '缁堟鏃ユ湡', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text', - formatter: this.formatDutyDate - }, - // { - // minWidth: '120', - // prop: 'customerNo', - // label: '瀹㈡埛缂栧彿', - // sort: true, - // isTrue: true, - // isSearch: true, - // searchInfoType: 'text' - // }, { minWidth: '120', prop: 'customerName', @@ -505,16 +513,6 @@ isSearch: true, searchInfoType: 'text' }, - // { - // minWidth: '120', - // prop: 'customerContractNo', - // label: '瀹㈡埛璁㈠崟鍙�', - // sort: true, - // isTrue: true, - // isSearch: true, - // searchInfoType: 'text' - // }, - { minWidth: '120', prop: 'coState', @@ -541,108 +539,20 @@ return this.isAuditList } }, - { - minWidth: '80', - prop: 'ifsDeliveryNo', - label: '鍚堝悓鍒嗙被', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '80', - prop: 'ifsLineItemNo', - label: '鍚堝悓鏉ユ簮', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '80', - prop: 'returnStatus', - label: '鍚堝悓鐘舵��', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '80', - prop: 'originalContractStatus', - label: '鍑哄簱鐘舵��', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - - { - minWidth: '120', - prop: 'ifsSalesUnit', - label: '鍚敤鐘舵��', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, // { - // minWidth: '120', - // prop: 'coLineNo', - // label: 'GSM琛屽彿', + // minWidth: '80', + // prop: 'sourceId', + // label: '璁㈠崟鏉ユ簮', // sort: true, // isTrue: true, // isSearch: true, // searchInfoType: 'text' - // }, - // { - // minWidth: '120', - // prop: 'otcLineNo', - // label: 'OTC琛屽彿', - // sort: true, - // isTrue: true, - // isSearch: true, - // searchInfoType: 'text' - // }, - // // 鐘舵�� - // { - // minWidth: '120', - // prop: 'otcPartSync', - // label: 'OTC鎺ㄩ�佺姸鎬�', - // sort: true, - // isTrue: true, - // isSearch: true, - // searchInfoType: 'select', - // optList: () => { - // return this.getOtcPartSyncOptionList() - // }, - // formatter: (row, column, cellValue) => { - // var formatVal - // if (cellValue == null) { - // formatVal = '' - // } else if (cellValue) { - // formatVal = '宸插悓姝�' - // } else { - // formatVal = '鏈悓姝�' - // } - // return formatVal - // } - // }, - // { - // minWidth: '120', - // prop: 'verifyDate', - // label: 'OTC瀹℃牳鏃堕棿', - // sort: true, - // isTrue: true, - // isSearch: true, - // searchInfoType: 'datetimerange' // }, { minWidth: '120', width: '100px', prop: 'partNo', - label: '闆朵欢鍙�', + label: '浜у搧缂栧彿', sort: true, isTrue: true, isSearch: true, @@ -651,8 +561,8 @@ { minWidth: '120', width: '100px', - prop: 'customerPartName', - label: '闆朵欢鍚嶇О', + prop: 'productName', + label: '浜у搧鍚嶇О', sort: true, isTrue: true, isSearch: true, @@ -662,7 +572,7 @@ minWidth: '120', width: '100px', prop: 'productType', - label: '鍨嬪彿', + label: '闅跺睘鍝佺墝', isTrue: true, isSearch: true, searchInfoType: 'text' @@ -671,7 +581,7 @@ minWidth: '120', width: '100px', prop: 'otcUnit', - label: '闆朵欢灞炴��', + label: '鍗曚綅', isTrue: true, isSearch: true, searchInfoType: 'text' @@ -688,45 +598,8 @@ }, { minWidth: '120', - width: '100px', - prop: 'outerColor', - label: '澶栨姢棰滆壊', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '120', - prop: 'otcQuantity', - label: '閿�鍞暟閲�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '80', - prop: 'otcUnit', - label: '閿�鍞崟浣�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '120', prop: 'buyQtyDue', - label: '搴撳瓨鏁伴噺', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '80', - prop: 'unit', - label: '闆朵欢鍗曚綅', + label: '鏁伴噺', sort: true, isTrue: true, isSearch: true, @@ -734,253 +607,6 @@ }, { minWidth: '140', - prop: 'requireNumber', - label: '宸蹭笅鍙戞暟閲�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'customerPartSpec', - label: '瀹㈡埛闆朵欢瑙勬牸', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'finalCustomerName', - label: '鏈�缁堝鎴峰悕绉�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'productGroup', - label: '浜у搧鍒嗙粍', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'productType', - label: '浜у搧绫诲瀷', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'centralizedMiningProperty', - label: '閲囬泦鎬ц川', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'orderDescription', - label: '璁㈠崟璇存槑', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'division', - label: '浜嬩笟閮�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'printType', - label: '鍗板瓧鏂瑰紡', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'printingRequirements', - label: '鍗板瓧瑕佹眰', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'printContent', - label: '鍗板瓧鍐呭', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'packageRequire', - label: '鍖呰瑕佹眰', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'qualityRequire', - label: '璐ㄩ噺瑕佹眰', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'otherProductRequire', - label: '鐢熶骇闇�姹傝鏄�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'divisionSystem', - label: '绯荤粺', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'shippingAddress', - label: '鏀惰揣鍦板潃', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'salesmanName', - label: '涓氬姟鍛�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'lengthRequirement', - label: '鐩橀暱瑕佹眰', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'remark', - label: '璁㈠崟琛屽娉�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - prop: 'comment', - label: '璁㈠崟澶村娉�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - // { - // minWidth: '80', - // prop: 'ifsLineNo', - // label: 'IFS琛屽彿', - // sort: true, - // isTrue: true, - // isSearch: true, - // searchInfoType: 'text' - // }, - // { - // minWidth: '80', - // prop: 'ifsDeliveryNo', - // label: 'IFS浜よ揣鍙�', - // sort: true, - // isTrue: true, - // isSearch: true, - // searchInfoType: 'text' - // }, - // { - // minWidth: '80', - // prop: 'ifsLineItemNo', - // label: 'IFS琛岄」鍙�', - // sort: true, - // isTrue: true, - // isSearch: true, - // searchInfoType: 'text' - // }, - { - minWidth: '80', - prop: 'salesPartNo', - label: '閿�鍞欢鍙�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '80', - prop: 'salesPartName', - label: '閿�鍞欢鎻忚堪', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, - { - minWidth: '140', - width: '120', - prop: 'wantedDeliveryDate', - label: '鏈熸湜浜よ揣鏃堕棿', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'datetimerange', - formatter: this.formatDutyDate - }, - { - minWidth: '200', - width: '120', - prop: 'plannedDeliveryDate', - label: '璁″垝浜よ揣鏃堕棿', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'datetimerange', - formatter: this.formatDutyDate - }, - { - minWidth: '120', prop: 'manufactureAttr', label: '鍒堕�犲睘鎬�', sort: true, @@ -989,41 +615,71 @@ searchInfoType: 'select', formatter: this.getManufactureAttr, optList: () => { - return this.manufactureAttrs + return this.manufactureAttrList } - } - // { - // minWidth: '200', - // width: '120', - // prop: 'createTime', - // label: '鍒涘缓鏃堕棿', - // sort: true, - // isTrue: true, - // isSearch: true, - // searchInfoType: 'datetimerange', - // formatter: this.formatDutyDate - // } + }, + { + minWidth: '140', + prop: 'customerPartSpec', + label: '瑙勬牸鍨嬪彿', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'text' + }, + { + minWidth: '140', + prop: 'returnStatus', + label: '鍚堝悓姝f湰鐘舵��', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'text' + }, + { + minWidth: '140', + prop: 'originalContractStatus', + label: '姝f湰鐘舵��', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'text' + }, + { + minWidth: '140', + prop: 'salesMan', + label: '涓氬姟鍛�', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'text' + }, + { + minWidth: '140', + width: '120', + prop: 'deliveryDate', + label: '浜よ揣鏃堕棿', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'datetimerange', + formatter: this.formatDutyDate + }, ], toolbar: [], operator: [ - { - text: '璁㈠崟璇存槑', - type: 'text', - size: 'small', - fun: this.openCustomerOrder - }, - { - text: '鏌ョ湅搴撳瓨', - type: 'text', - size: 'small', - fun: this.stockHandle - }, - { - text: '绠辩爜淇℃伅瀵煎嚭', - type: 'text', - size: 'small', - fun: this.packageExportHandle - }, + // { + // text: '璁㈠崟璇存槑', + // type: 'text', + // size: 'small', + // fun: this.openCustomerOrder + // }, + // { + // text: '鏌ョ湅搴撳瓨', + // type: 'text', + // size: 'small', + // fun: this.stockHandle + // }, { text: '浣滃簾', type: 'text', @@ -1034,7 +690,6 @@ '01partUnCheck', '02technologyUnCheck', '03plan' - // '04planed' ], key: 'coState' } @@ -1043,7 +698,7 @@ operatorConfig: { fixed: 'right', label: '鎿嶄綔', - width: 260, + width: 100, minWidth: 100 } }, @@ -1160,7 +815,7 @@ } }, immediate: true - } + }, }, mounted() { this.initQueryParams() @@ -1168,36 +823,6 @@ created() { this.getManufactureAttrs() this.getTitles() - /** - * { - text: '鑾峰彇閿�鍞鍗�', - type: 'primary', - fun: this.pullCustomerOrder, - disabled: false, - permitArr: [] - }, - { - text: '鑾峰彇IFS琛屽彿', - type: 'primary', - fun: this.pullIfsLineNo, - disabled: false, - permitArr: [], - loading: false - }, - { - text: '鎻愪氦瀹℃牳', - type: 'primary', - fun: this.auditCustomerOrder, - disabled: false, - permitArr: [], - loading: false - }, - { - text: '涓荤敓浜ц鍒�', - disabled: false, - fun: this.masterPlanHandle - } - */ this.table.toolbar.push({ text: '鏂板閿�鍞鍗�', type: 'primary', @@ -1205,14 +830,6 @@ disabled: false, permitArr: [] }) - // this.table.toolbar.push({ - // text: '鍚屾ERP', - // type: 'primary', - // fun: this.syncERP, - // loading: false, - // disabled: false, - // permitArr: [] - // }) if (this.permissions.customerorder_from_otc) { this.table.toolbar.push({ text: '鑾峰彇閿�鍞鍗�', @@ -1220,16 +837,6 @@ fun: this.syncERP, disabled: false, permitArr: [] - }) - } - if (this.permissions.customerorder_ifs_line) { - this.table.toolbar.push({ - text: '鑾峰彇ERP琛屽彿', - type: 'primary', - fun: this.pullIfsLineNo, - disabled: false, - permitArr: [], - loading: false }) } if (this.permissions.customerorder_submit_oa) { @@ -1259,6 +866,14 @@ } }, methods: { + getSourceId(row, column, cellValue) { + this.sourceIdList.forEach((obj) => { + if (obj.value === cellValue) { + cellValue = obj.label + } + }) + return cellValue + }, getOtcPartSyncOptionList() { return this.otcPartSyncOptionList }, @@ -1269,7 +884,6 @@ prop: 'coState', searchInfoType: 'select', // propVal: '01partUnCheck' - propVal: '02technologyUnCheck' }) ) this.$refs.customerOrderTable.setQueryParam(queryParam) @@ -1313,6 +927,7 @@ } } this.scheduleVisible = true + console.log(this.multipleSelection); this.$nextTick(() => { this.$refs.schedule.init(this.multipleSelection) }) @@ -1498,13 +1113,13 @@ }, // 浣滃簾 cancelHandle(row) { - this.$confirm('鏄惁纭浣滃簾閿�鍞鍗曞彿涓�' + row.customerOrderNo + '鎻愮ず', { + this.$confirm('纭浣滃簾閿�鍞鍗曞彿涓恒��' + row.contractNo + '銆戠殑鏁版嵁?','鎻愮ず' , { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', closeOnClickModal: false, type: 'warning' }).then(() => { - dropByContractNo(row.customerOrderNo).then((res) => { + dropByContractNo({id:row.id}).then((res) => { if (res.data.code === 0) { this.$message.success('浣滃簾鎴愬姛') this.getData() @@ -1512,22 +1127,7 @@ this.$message.error('浣滃簾澶辫触') } }) - }) - // .then(() => { - // markPlanned([row.id], '05cancel').then((response) => { - // var data = response.data - // if (data.code === 0) { - // this.$message.success('浣滃簾鎴愬姛') - // this.getData() - // } else { - // this.$message.error('浣滃簾澶辫触') - // } - // }) - // }) - // .then((data) => { - // this.$message.success('浣滃簾鎴愬姛') - // this.getData() - // }) + }).catch(()=>{ }) }, // 鍒犻櫎 deleteHandle(row) { @@ -1752,10 +1352,10 @@ '瀛樺湪閿�鍞鍗曞凡鍏宠仈宸ヨ壓鏂囦欢锛屽闇�鏇存敼锛岃鍏堣В闄ゅ叧鑱�' ) } - if (item.salesPartNo == null || item.salesPartNo === '') { - status = true - this.$message.error('瀛樺湪閿�鍞鍗曟湭缁戝畾閿�鍞欢锛岃鍏堢粦瀹�') - } + // if (item.salesPartNo == null || item.salesPartNo === '') { + // status = true + // this.$message.error('瀛樺湪閿�鍞鍗曟湭缁戝畾閿�鍞欢锛岃鍏堢粦瀹�') + // } if (item.partNo != firstPartNo) { status = true this.$message.error('璁㈠崟闆朵欢鍙蜂笉涓�鑷�') @@ -1942,28 +1542,37 @@ this.syncDateVisible = false this.table.toolbar.find((e) => e.text === '鑾峰彇閿�鍞鍗�').loading = true - syncOrder({ - startTime: this.syncDate[0], - endTime: this.syncDate[1] - }) - .then((res) => { - this.table.toolbar.find( - (e) => e.text === '鑾峰彇閿�鍞鍗�' - ).loading = false - const resData = res.data - if (resData.code === 0) { - this.$message.success(resData.data) - this.getData() - } else { - this.$message.error('鍚屾澶辫触') - } + if (this.dataForm.selectTime != null && this.dataForm.selectTime != '') { + otcCustomerOrderSync({ + selectTime: this.dataForm.selectTime, + orderNo: '' }) - .catch((e) => { - this.table.toolbar.find( - (e) => e.text === '鑾峰彇閿�鍞鍗�' - ).loading = false - this.$forceUpdate() - }) + .then((response) => { + this.table.toolbar.find( + (e) => e.text === '鑾峰彇閿�鍞鍗�' + ).loading = false + const resData = response.data + if (resData.code === 0) { + this.$message.success('鑾峰彇閿�鍞鍗曟垚鍔燂紱' + resData.msg) + this.dataForm.selectTime = null + this.$emit('refreshDataList') + this.getData() + } else { + this.$message.success('鎷夊彇閿�鍞鍗曞け璐�') + } + }) + .catch((e) => { + this.table.toolbar.find( + (e) => e.text === '鑾峰彇閿�鍞鍗�' + ).loading = false + this.$forceUpdate() + }) + } else { + this.table.toolbar.find( + (e) => e.text === '鑾峰彇閿�鍞鍗�' + ).loading = false + this.$message.error('璇峰厛閫夋嫨鏃ユ湡') + } } } } -- Gitblit v1.9.3