|
@@ -2,9 +2,16 @@
|
|
|
<div class="work-order__wrapper">
|
|
|
<el-form ref="formRef" :model="list">
|
|
|
<el-table size="mini" border :data="list">
|
|
|
- <el-table-column prop="orderCode" label="销售订单" width="160px" show-overflow-tooltip />
|
|
|
- <el-table-column prop="outCode" label="发货单" width="160px" show-overflow-toolti />
|
|
|
- <el-table-column prop="outChildCode" label="发货工单" width="160px" show-overflow-tooltip />
|
|
|
+ <!-- <el-table-column prop="orderCode" label="销售订单" width="160px" show-overflow-tooltip />
|
|
|
+ <el-table-column prop="outCode" label="发货单" width="160px" show-overflow-toolti /> -->
|
|
|
+ <el-table-column prop="outChildCode" label="发货工单编号" width="160px" show-overflow-tooltip />
|
|
|
+ <el-table-column prop="outChildCode" label="提退货时的发货单状态" width="160px" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag size="mini">
|
|
|
+ {{ (statusOptions.find(({value}) => value === String(scope.row.status)) || {}).label || '--' }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="发货仓库名称" prop="wsm_name" width="180px" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<el-popover placement="top" width="380" trigger="hover">
|
|
@@ -99,7 +106,13 @@ export default {
|
|
|
list: [],
|
|
|
loading: false,
|
|
|
subLoading: false,
|
|
|
- companyNo: ''
|
|
|
+ companyNo: '',
|
|
|
+ statusOptions: [
|
|
|
+ { value: '1', label: '待发货' },
|
|
|
+ { value: '2', label: '发货完成' },
|
|
|
+ { value: '3', label: '已收货' },
|
|
|
+ { value: '4', label: '已全部退货' }
|
|
|
+ ]
|
|
|
}),
|
|
|
computed: {
|
|
|
isStock() {
|
|
@@ -157,15 +170,25 @@ export default {
|
|
|
return_num
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
async onSetOrderReturnChild() {
|
|
|
this.$refs.formRef.validate(async isValid => {
|
|
|
if (!isValid) return
|
|
|
|
|
|
- const list = this.list.map(({ outChildCode, return_num, return_wsm_code }) => ({
|
|
|
- return_num,
|
|
|
- outChildCode,
|
|
|
- return_wsm_code: Array.isArray(return_wsm_code) ? return_wsm_code[0] : return_wsm_code
|
|
|
- }))
|
|
|
+ let sum = 0
|
|
|
+ const list = this.list.map(({ outChildCode, return_num, return_wsm_code }) => {
|
|
|
+ sum += return_num
|
|
|
+ return {
|
|
|
+ return_num,
|
|
|
+ outChildCode,
|
|
|
+ return_wsm_code: Array.isArray(return_wsm_code) ? return_wsm_code[0] : return_wsm_code
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ if (Number(this.sitem.error_num) !== sum) {
|
|
|
+ this.$message.warning('退货数量的和与异常数量不一致')
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
const { code, message } = await asyncRequest.setOrderReturnChild({
|
|
|
list,
|