diff --git a/src/api/ecss/ecss.js b/src/api/ecss/ecss.js index 1580b21..b18c96b 100644 --- a/src/api/ecss/ecss.js +++ b/src/api/ecss/ecss.js @@ -10,6 +10,7 @@ export const updateEcssDelHeader = data => createAPI(`/ecss/coDel/updateEcssDelH export const deleteEcssDelHeader = data => createAPI(`/ecss/coDel/deleteEcssDelHeader`,'post',data) +export const cancelEcssDelHeader = data => createAPI(`/ecss/coDel/cancelEcssDelHeader`,'post',data) export const changeEcssDelStatus = data => createAPI(`/ecss/coDel/changeEcssDelStatus`,'post',data) diff --git a/src/views/modules/ecss/codelnotify.vue b/src/views/modules/ecss/codelnotify.vue index 6d8fae1..d5783d9 100644 --- a/src/views/modules/ecss/codelnotify.vue +++ b/src/views/modules/ecss/codelnotify.vue @@ -25,6 +25,7 @@ + @@ -47,6 +48,9 @@ placeholder="选择日期"> + + + {{'查询'}} @@ -74,21 +78,22 @@ highlight-current-row :height="height" :data="dataList" - ref="mainTable" - border + ref="mainTable" :cell-style="cellStyle" + border :row-class-name="tableRowClassName" v-loading="dataListLoading" style="width: 100%;"> + {{'新增'}} @@ -210,7 +216,7 @@ 0){ this.$refs.mainTable.setCurrentRow(this.dataList[0]); this.changeData(this.dataList[0]) + this.dataList.forEach(o => { + o.modifyLabel = !!o.modifyFlag?'是':''; + }); }else { this.changeData(null) } @@ -1706,9 +1736,47 @@ this.xiadaEcssDel() } }, + cancelDelHeader(row){ + this.$confirm('确认废弃吗?', '提示').then(() => { + cancelEcssDelHeader(row).then(({data}) => { + if (data && data.code === 0) { + this.searchTable() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }) + }, + tableRowClassName({row}) { + if (row.notifyStatus==='订单取消') { + return 'warning-row'; + } + }, + cellStyle({row, column }) { + if (column.property === 'modifyLabel' && row.modifyLabel==='是') { // 根据列属性判断 + return { color: '#ff5d03' }; + } + return {}; + }, + cellStyleDetail({row, column }) { + if ((column.property === 'pn' || column.property === 'qty') && row.modifyFlag===true) { // 根据列属性判断 + return { color: '#ff5d03' }; + } + return {}; + }, xiadaEcssDel(){ let inData={ site:this.currentRow.site, + buNo:this.currentRow.buNo, + createBy:this.currentRow.createBy, delNo:this.currentRow.delNo, notifyStatus:'已下达', walMartOrderFlag:this.walMartOrderFlag @@ -1847,12 +1915,45 @@ } }) }, + + openCreateDetailModel(){ + this.updateDetailModel.site=this.currentRow.site; + this.updateDetailModel.buNo=this.currentRow.buNo; + this.updateDetailModel.delNo=this.currentRow.delNo; + this.updateDetailModel.partNo='' + this.updateDetailModel.qty='' + this.updateDetailModel.partDescription='' + this.updateDetailModel.itemNo='' + this.updateDetailModel.salesOrder='' + this.updateDetailModel.line='' + this.updateDetailModel.customerPO='' + this.updateDetailModel.version='' + this.updateDetailModel.status='' + this.updateDetailModel.family='' + this.updateDetailModel.lt='' + this.updateDetailModel.cmcComment='' + this.updateDetailModel.saleType='' + this.updateDetailModel.awbBl='' + this.updateDetailModel.shippingNumber='' + this.updateDetailModel.forwarderInfo='' + this.updateDetailModel.currency='' + this.updateDetailModel.tp='' + this.updateDetailModel.ttlAmount='' + this.updateDetailModel.sumPrice='' + this.updateDetailModel.so='' + this.updateDetailModel.upc='' + this.updateDetailModel.remark='' + this.updateDetailModel.pn='' + this.updateDetailModel.addFlag=0 + this.updateDetailModelFlag=true + }, openUpdateDetailModel(row){ this.updateDetailModel=JSON.parse(JSON.stringify(row)); + this.updateDetailModel.addFlag=1 this.updateDetailModelFlag=true }, deleteDelDetail(row){ - this.$confirm('确认删除此明细?', '提示').then(() => { + this.$confirm('确认取消此明细?', '提示').then(() => { deleteEcssDelDetail(row).then(({data}) => { if (data && data.code === 0) { this.refreshCurrentTabTable() @@ -1925,10 +2026,10 @@ sums[index] = `${values.reduce((a, b) => a + b, 0)}`; break; case 'ttlAmount': - sums[index] = `${values.reduce((a, b) => a + b, 0)}`; + sums[index] = `${values.reduce((a, b) => a + b, 0).toFixed(2)}`; break; case 'sumPrice': - sums[index] = `${values.reduce((a, b) => a + b, 0)}`; + sums[index] = `${values.reduce((a, b) => a + b, 0).toFixed(2)}`; break; default: sums[index] = ''; @@ -1947,7 +2048,8 @@ } - diff --git a/src/views/modules/ecss/codelnotifyConfirm.vue b/src/views/modules/ecss/codelnotifyConfirm.vue index 1d54e1b..68aabf7 100644 --- a/src/views/modules/ecss/codelnotifyConfirm.vue +++ b/src/views/modules/ecss/codelnotifyConfirm.vue @@ -46,6 +46,9 @@ placeholder="选择日期"> + + + {{'查询'}} @@ -57,13 +60,13 @@ :height="height" :data="dataList" ref="mainTable" - border + border :cell-style="cellStyle" v-loading="dataListLoading" style="width: 100%;">