Browse Source

取消废弃

java8
han\hanst 7 months ago
parent
commit
6d7bdf2960
  1. 2
      src/api/ecss/ecss.js
  2. 43
      src/views/modules/ecss/codelnotify.vue
  3. 12
      src/views/modules/ecss/codelnotifyConfirm.vue

2
src/api/ecss/ecss.js

@ -15,6 +15,8 @@ export const deleteEcssDelHeader = data => createAPI(`/ecss/coDel/deleteEcssDelH
export const cancelEcssDelHeader = data => createAPI(`/ecss/coDel/cancelEcssDelHeader`,'post',data)
export const recoverEcssDelHeader = data => createAPI(`/ecss/coDel/recoverEcssDelHeader`,'post',data)
export const changeEcssDelStatus = data => createAPI(`/ecss/coDel/changeEcssDelStatus`,'post',data)

43
src/views/modules/ecss/codelnotify.vue

@ -87,6 +87,7 @@
<a type="text" style="color: orange" size="small" v-if="scope.row.notifyStatus==='已下达'&& scope.row.notifyStatus!=='订单取消'" @click="jihuaEcssDel(scope.row)">取消下达</a>
<a type="text" style="color: green" size="small" v-if="scope.row.notifyStatus==='已下达' && scope.row.walMartOrderFlag==='Y'" @click="declarationCompleted(scope.row)">一键结单</a>
<a type="text" style="color: red" size="small" v-if="scope.row.notifyStatus!=='订单取消'" @click="cancelDelHeader(scope.row)">废弃</a>
<a type="text" style="color: green" size="small" v-if="scope.row.notifyStatus==='订单取消'" @click="recoverDelHeader(scope.row)">取消废弃</a>
<a type="text" style="color: red" size="small" v-if="scope.row.notifyStatus==='已计划'&& scope.row.notifyStatus!=='订单取消'" @click="deleteDelHeader(scope.row)">删除</a>
</template>
</el-table-column>
@ -278,7 +279,7 @@
</el-col>
<el-col :span="6">
<el-form-item :label="'Qty (pcs)'" >
<el-input v-model="updateDetailModel.qty" type="number" ></el-input>
<el-input v-model="updateDetailModel.qty" type="number" @input="calculateAmounts"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
@ -343,7 +344,7 @@
</el-col>
<el-col :span="6">
<el-form-item :label="'TP'" >
<el-input v-model="updateDetailModel.tp" type="number" ></el-input>
<el-input v-model="updateDetailModel.tp" type="number" @input="calculateAmounts"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
@ -353,7 +354,7 @@
</el-col>
<el-col :span="6">
<el-form-item :label="'VAT'" >
<el-input v-model="updateDetailModel.vat" ></el-input>
<el-input v-model="updateDetailModel.vat" @input="calculateAmounts"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
@ -692,6 +693,7 @@
updateEcssDelHeader,
deleteEcssDelHeader,
cancelEcssDelHeader,
recoverEcssDelHeader,
changeEcssDelStatus,
updateEcssDelDetail,
deleteEcssDelDetail,
@ -1980,6 +1982,25 @@
})
})
},
recoverDelHeader(row){
this.$confirm('确认取消废弃吗?', '提示').then(() => {
recoverEcssDelHeader(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';
@ -2189,6 +2210,22 @@
})
},
//
calculateAmounts() {
// 0
const qty = parseFloat(this.updateDetailModel.qty) || 0;
const tp = parseFloat(this.updateDetailModel.tp) || 0;
const vat = parseFloat(this.updateDetailModel.vat) || 0;
// = * TP
const sumPrice = qty * tp;
this.updateDetailModel.sumPrice = sumPrice > 0 ? sumPrice.toFixed(2) : '';
// TTL Amount = * VAT
const ttlAmount = sumPrice * vat;
this.updateDetailModel.ttlAmount = ttlAmount > 0 ? ttlAmount.toFixed(2) : '';
},
openCreateDetailModel(){
this.updateDetailModel.site=this.currentRow.site;
this.updateDetailModel.buNo=this.currentRow.buNo;

12
src/views/modules/ecss/codelnotifyConfirm.vue

@ -24,6 +24,7 @@
<el-option label="已下达" value="已下达"></el-option>
<el-option label="仓库已确认" value="仓库已确认"></el-option>
<el-option label="已报关" value="已报关"></el-option>
<el-option label="订单取消" value="订单取消"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="'ReadyDate'" >
@ -68,6 +69,7 @@
:data="dataList"
ref="mainTable"
border :cell-style="cellStyle"
:row-class-name="tableRowClassName"
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
@ -1950,6 +1952,11 @@
}
});
},
tableRowClassName({row}) {
if (row.notifyStatus==='订单取消') {
return 'warning-row';
}
},
cellStyle({row, column }) {
if (column.property === 'notifyDate' && row.notifyDate==='发货日期不确定') { //
return { color: '#ff5d03' };
@ -2591,7 +2598,10 @@
}
</script>
<style scoped>
<style lang="scss">
.warning-row td{
color: darkred !important;
}
/deep/ .zxClass .cell {
line-height: 24px;
font-size: 12px;

Loading…
Cancel
Save