From af71d4d40239505726128c4854a6578748710464 Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Mon, 19 Aug 2024 14:39:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/distribution/SeparateTheList.js | 9 + .../distribution/distributionStockArticle.js | 9 + src/option/distribution/SeparateTheList.js | 59 +++- .../storagecost/Warehouserentalmanagement.vue | 257 +++++++++++------- .../inventory/delivery/SeparateTheList.vue | 157 ++++++----- .../delivery/distributionStockArticle.vue | 204 ++++++++++++++ 6 files changed, 507 insertions(+), 188 deletions(-) diff --git a/src/api/distribution/SeparateTheList.js b/src/api/distribution/SeparateTheList.js index e69de29b..7ff39556 100644 --- a/src/api/distribution/SeparateTheList.js +++ b/src/api/distribution/SeparateTheList.js @@ -0,0 +1,9 @@ +import request from '@/axios'; + +export const $_alltasklist = (params) => { + return request({ + url: '/api/logpm-distribution/split-order-task/all-task-list', + method: 'get', + params + }); +}; \ No newline at end of file diff --git a/src/api/distribution/distributionStockArticle.js b/src/api/distribution/distributionStockArticle.js index a7f1099b..5bdbb819 100644 --- a/src/api/distribution/distributionStockArticle.js +++ b/src/api/distribution/distributionStockArticle.js @@ -424,3 +424,12 @@ export const $_signforListDetail = params => { params, }); }; + +// 拆单新增 +export const $_batchcreatetask = data => { + return request({ + url: '/api/logpm-distribution/split-order-task/batch-create-task', + method: 'post', + data, + }); +}; diff --git a/src/option/distribution/SeparateTheList.js b/src/option/distribution/SeparateTheList.js index bbf70a26..802ba7d3 100644 --- a/src/option/distribution/SeparateTheList.js +++ b/src/option/distribution/SeparateTheList.js @@ -15,9 +15,10 @@ export const columnList = [ width: 55, fixed: true, }, + { - prop: 'oprationUserName', - label: '操作人', + prop: 'no', + label: '拆单任务编号', type: 1, values: '', width: '150', @@ -26,23 +27,67 @@ export const columnList = [ head: false, }, { - prop: 'createTime', - label: '操作时间', + prop: 'orderCode', + label: '原订单编号', + type: 1, + values: '', + width: '150', + fixed: true, + sortable: true, + head: false, + }, + { + prop: 'number', + label: '拆单单数', + type: 1, + values: '', + width: '150', + fixed: true, + sortable: true, + head: false, + }, + { + prop: 'orderPackageNumber', + label: '拆单件数', + type: 1, + values: '', + width: '150', + fixed: true, + sortable: true, + head: false, + }, + + { + prop: 'state', + label: '拆单任务状态', type: 1, values: '', width: '150', fixed: true, sortable: true, head: false, + }, + // 1.2.3 + // 未完成 已完成 已撤销 { - prop: 'content', - label: '操作内容', + prop: 'createTime', + label: '创建时间', type: 1, values: '', - width: '600', + width: '150', fixed: true, sortable: true, head: false, }, + { + prop: '', + label: '操作', + type: 6, + values: '', + width: '200', + checkarr: [], + fixed: 'right', + sortable: true, + }, ]; diff --git a/src/views/cost/storagecost/Warehouserentalmanagement.vue b/src/views/cost/storagecost/Warehouserentalmanagement.vue index b57ecfdd..e330856e 100644 --- a/src/views/cost/storagecost/Warehouserentalmanagement.vue +++ b/src/views/cost/storagecost/Warehouserentalmanagement.vue @@ -126,7 +126,7 @@ element-loading-text="Loading..." >
- +
- + - - + + - - + { @@ -522,28 +516,63 @@ const PageOnload = () => { PageOnload(); // 新增 const AddInfo = () => { + dictList.value = []; + form.value = { + clientId: '', //客户名称ID + warehouseId: '', //租用仓库ID + leaseCommencementDate: '', //租赁合同开始时间 + leaseTerminationDate: '', //租赁合同结束时间 + monthlyRent: '', //月租金 + leasedArea: '', //客户租用面积 + type: 2, //租用类型 + storageLocationCount: '', //客户租用库位数 + residualArea: null, //剩余库位面积 + singleStorageArea: null, //单库位面积 + }; Customertitle.value = '客户租仓信息新增'; dialogCustomer.value = true; //开启弹窗 + ruleFormRef.value.resetFields(); }; // 客户租用类型计算 const changetype = () => { form.value.storageLocationCount = null; //客户租用库位数 form.value.leasedArea = null; //客户租用库位数 - // form.value.residualArea = null; //剩余库位面积 - // form.value.singleStorageArea = null; //单库位面积 }; +form.value.residualArea = null; //剩余库位面积 +form.value.singleStorageArea = null; //单库位面积 const changewarehouse = async () => { let data = { warehouseId: form.value.warehouseId, }; + formloading.value = true; await $_residualArea(data) .then(res => { console.log(res, '剩余可租用面积'); if (res.data.code == 200) { - form.value.residualArea = Number(res.data.data.residualArea); //剩余库位面积 - form.value.singleStorageArea = Number(res.data.data.singleStorageArea); //单库位面积 - if ((Customertitle.value = '客户租仓信息编辑')) { + const sope = res.data.data; + if (sope.residualArea != null) { + form.value.residualArea = Number(sope.residualArea); //剩余库位面积 + } else { + form.value.residualArea = sope.residualArea; + ElMessage({ + message: '请维护仓库基础资料', + type: 'warning', + }); + return; + } + if (sope.singleStorageArea != null) { + form.value.singleStorageArea = Number(sope.singleStorageArea); //单库位面积 + } else { + form.value.singleStorageArea = sope.singleStorageArea; + ElMessage({ + message: '请维护仓库基础资料', + type: 'warning', + }); + return; + } + + if (Customertitle.value == '客户租仓信息编辑') { form.value.leasedArea = Number(form.value.leasedArea); form.value.residualArea = form.value.residualArea + form.value.leasedArea; //剩余库位面积 //租用面积 } @@ -559,81 +588,102 @@ const changewarehouse = async () => { // 计算租用数面积 const changestorageLocationCount = () => { - // 租用库位数 *单库位面积 =客户租用面积 - form.value.leasedArea = form.value.storageLocationCount * form.value.singleStorageArea; -}; -// 最后提交 -const Customeradded = () => { - if (form.value.type == 2 && form.value.leasedArea > form.value.residualArea) { + console.log(form.value.singleStorageArea, 'form.value.singleStorageArea'); + if (form.value.residualArea == null || form.value.singleStorageArea == null) { ElMessage({ - message: '客户租用面积不能大于剩余可租用面积,请重新填写客户租用库位数', + message: '请维护仓库基础资料', type: 'warning', }); return; } - if (form.value.type == 1 && form.value.leasedArea > form.value.residualArea) { - ElMessage({ - message: '客户租用面积不能大于剩余可租用面积', - type: 'warning', - }); - return; - } + // 租用库位数 *单库位面积 =客户租用面积 + form.value.leasedArea = form.value.storageLocationCount * form.value.singleStorageArea; +}; +// 最后提交 +const Customeradded = () => { + ruleFormRef.value.validate(valid => { + if (valid) { + if (form.value.storageLocationCount == null || form.value.leasedArea == null) { + ElMessage({ + message: '请维护仓库基础资料', + type: 'warning', + }); + return; + } - // clientId: '', //客户名称ID - // warehouseId: '', //租用仓库ID - // leaseCommencementDate: '', //租赁合同开始时间 - // leaseTerminationDate: '', //租赁合同结束时间 - // monthlyRent: '', //月租金 - // leasedArea: '', //客户租用面积 - // type: '', //租用类型 - // storageLocationCount: '', //客户租用库位数 - let data = { - ...form.value, - }; - data.leaseCommencementDate = data.LeasecontractDate[0]; - data.leaseTerminationDate = data.LeasecontractDate[1]; - console.log(data, '准备提交的数据'); - formloading.value = true; - if (Customertitle.value == '客户租仓信息编辑') { - data.id = DataRwo.value.id; - $_Warehouserentalmanagementupdate(data) - .then(res => { - if (res.data.code == 200) { - ElMessage({ - message: res.data.msg, - type: 'success', + if (form.value.type == 2 && form.value.leasedArea > form.value.residualArea) { + ElMessage({ + message: '客户租用面积不能大于剩余可租用面积,请重新填写客户租用库位数', + type: 'warning', + }); + return; + } + + if (form.value.type == 1 && form.value.leasedArea > form.value.residualArea) { + ElMessage({ + message: '客户租用面积不能大于剩余可租用面积', + type: 'warning', + }); + return; + } + + // clientId: '', //客户名称ID + // warehouseId: '', //租用仓库ID + // leaseCommencementDate: '', //租赁合同开始时间 + // leaseTerminationDate: '', //租赁合同结束时间 + // monthlyRent: '', //月租金 + // leasedArea: '', //客户租用面积 + // type: '', //租用类型 + // storageLocationCount: '', //客户租用库位数 + let data = { + ...form.value, + }; + data.leaseCommencementDate = data.LeasecontractDate[0]; + data.leaseTerminationDate = data.LeasecontractDate[1]; + console.log(data, '准备提交的数据'); + formloading.value = true; + if (Customertitle.value == '客户租仓信息编辑') { + data.id = DataRwo.value.id; + $_Warehouserentalmanagementupdate(data) + .then(res => { + if (res.data.code == 200) { + ElMessage({ + message: res.data.msg, + type: 'success', + }); + dialogCustomer.value = false; + onLoad(); + } + }) + .catch(error => { + console.log(error); + }) + .finally(() => { + formloading.value = false; }); - dialogCustomer.value = false; - onLoad(); - } - }) - .catch(error => { - console.log(error); - }) - .finally(() => { - formloading.value = false; - }); - } else { - $_Warehouserentalmanagementsave(data) - .then(res => { - console.log(res, '新增'); - if (res.data.code == 200) { - ElMessage({ - message: res.data.msg, - type: 'success', + } else { + $_Warehouserentalmanagementsave(data) + .then(res => { + console.log(res, '新增'); + if (res.data.code == 200) { + ElMessage({ + message: res.data.msg, + type: 'success', + }); + dialogCustomer.value = false; + onLoad(); + } + }) + .catch(error => { + console.log(error); + }) + .finally(() => { + formloading.value = false; }); - dialogCustomer.value = false; - onLoad(); - } - }) - .catch(error => { - console.log(error); - }) - .finally(() => { - formloading.value = false; - }); - } + } + } + }); }; // 编辑 const edit = row => { @@ -669,23 +719,26 @@ const Viewdelete = rwo => { }) .then(() => { console.log(rwo); - let data={ - ids:rwo.id - } + let data = { + ids: rwo.id, + }; details.loadingObj.list = true; - $_Warehouserentalmanagementremove(data).then(res => { - if (res.data.code == 200) { - ElMessage({ - type: 'success', - message: '删除成功', - }); - onLoad(); - } - }).catch(error=>{ - console.log(error) - }).finally(()=>{ - details.loadingObj.list = false; - }); + $_Warehouserentalmanagementremove(data) + .then(res => { + if (res.data.code == 200) { + ElMessage({ + type: 'success', + message: '删除成功', + }); + onLoad(); + } + }) + .catch(error => { + console.log(error); + }) + .finally(() => { + details.loadingObj.list = false; + }); }) .catch(() => {}); }; diff --git a/src/views/distribution/inventory/delivery/SeparateTheList.vue b/src/views/distribution/inventory/delivery/SeparateTheList.vue index 18ae1682..e94dd23e 100644 --- a/src/views/distribution/inventory/delivery/SeparateTheList.vue +++ b/src/views/distribution/inventory/delivery/SeparateTheList.vue @@ -88,7 +88,7 @@ > -