From 7fbab842f993cacc3b0cd909f47eee15550e03a9 Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Wed, 20 Mar 2024 16:05:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E9=80=81=E5=95=86=E9=85=8D,=E9=A2=84?= =?UTF-8?q?=E7=BA=A6=E9=80=82=E9=85=8D=E4=BB=BB=E5=8A=A1,=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E6=95=B0=E6=8D=AE=E9=99=90=E5=88=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/basicdata/basicdataWarehouse.js | 16 + .../warehouse/basicdataWarehouseTemp.vue | 459 ++++++++++++++++-- .../reservation/reservationAddFrom.vue | 56 ++- .../turndelivery/deliveryDiscuss.vue | 287 +++++------ 4 files changed, 621 insertions(+), 197 deletions(-) diff --git a/src/api/basicdata/basicdataWarehouse.js b/src/api/basicdata/basicdataWarehouse.js index 19060a6e..0950ae40 100644 --- a/src/api/basicdata/basicdataWarehouse.js +++ b/src/api/basicdata/basicdataWarehouse.js @@ -154,4 +154,20 @@ export const $_addsave = (data) => { method: 'post', data }) +} +// 删除 +export const $_dataremove = (params) => { + return request({ + url: '/api/logpm-basicdata/warehouse/remove', + method: 'post', + params + }) +} +// 查看 +export const $_getDetail = (params) => { + return request({ + url: '/api/logpm-basicdata/warehouse/detail', + method: 'get', + params + }) } \ No newline at end of file diff --git a/src/views/basicdata/warehouse/warehouse/basicdataWarehouseTemp.vue b/src/views/basicdata/warehouse/warehouse/basicdataWarehouseTemp.vue index 8e481f71..a576291a 100644 --- a/src/views/basicdata/warehouse/warehouse/basicdataWarehouseTemp.vue +++ b/src/views/basicdata/warehouse/warehouse/basicdataWarehouseTemp.vue @@ -11,7 +11,9 @@
新 增 - 删除 + 批量删除
@@ -38,7 +40,7 @@
查看 编辑 - 删除 + 删除
@@ -64,7 +66,7 @@
- + @@ -86,7 +88,7 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Preview Image + + + + + { console.log(file); }; @@ -362,19 +613,18 @@ const query = ref({}); //顶部搜索参数 const newlyaddload = ref(false); //新增弹窗 const AssessmentDepartment = ref([]); //考核部门 const department = ref(); -const Addform = ref({ -}); //表格新增数据表单 +const Addform = ref({}); //表格新增数据表单 const WarehouseType = ref([]); //仓库类型 const FireProtection = ref([]); //消防等级 const Isprotection = ref([ { - dictValue:'是', - dictKey:'1' -}, -{ - dictValue:'否', - dictKey:'0' -} + dictValue: '是', + dictKey: '1', + }, + { + dictValue: '否', + dictKey: '0', + }, ]); //是否具有消防等级 const WarehouseStructureList = ref([]); //仓库结构 const Iselevated = ref([]); //是否高架 @@ -450,6 +700,8 @@ const BelongsearcheNodeClick = data => { if (data.hasChildren) { classification(data.id, data.value); } + + console.log(department.value, '存储的部门'); }; // 初始时获取顶级分类 @@ -639,26 +891,149 @@ const currentChange = val => { }; // 新增数据 const newlyadd = () => { + Addform.value = {}; + dialogDetail.value = true; //开启详情弹窗 + Addform.value.warehouseAddress = []; + Addform.value.address = []; newlyaddload.value = true; //开启新增弹窗 }; + +// 批量删除 +const DeleteInformationAll = () => { + if (!selectAll.value.length) { + ElMessage({ + message: '请勾选要删除的数据', + type: 'warning', + }); + return; + } + ElMessageBox.confirm('是否批量删除数据?确定此操作不可撤销!', 'Warning', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }) + .then(() => { + let data = { + ids: [], + }; + selectAll.value.forEach(item => { + data['ids'].push(item.id); + }); + data['ids'] = data['ids'].join(','); + details.loadingObj.list = true; //开启表格加载 + $_dataremove(data) + .then(res => { + console.log(res, '删除成功后返回值'); + if (res.data.code == 200) { + ElMessage({ + message: res.data.msg, + type: 'success', + }); + onLoad(); + } + }) + .catch(() => {}) + .finally(() => { + details.loadingObj.list = false; //关闭表格加载 + }); + }) + .catch(() => {}); +}; +const selectionChange = val => { + selectAll.value = val; + console.log(selectAll.value, '勾选数据'); +}; +// 查看详情 +const view = val => { + let data = { + id: val.row.id, + }; + + $_getDetail(data).then(res => { + console.log(res, '查看详情'); + Addform.value = res.data.data; + Addform.value['address'] = []; + Addform.value['addressInfo'] = []; + console.log(Addform.value); + dialogDetail.value = true; //开启详情弹窗 + console.log(options.value, '职能类型'); + Addform.value.functionType = String(Addform.value.functionType); //职能类型转换字符串类型 + Addform.value.address[0] = Addform.value.longitude; //精度地区 + Addform.value.address[1] = Addform.value.latitude; //维度 + Addform.value.address[2] = Addform.value.warehouseAddress; //仓库地址 + Addform.value['addressInfo'][0] = Addform.value.provinceCode; //仓库地区-省 + Addform.value['addressInfo'][1] = Addform.value.cityCode; //仓库地区-市 + Addform.value['addressInfo'][2] = Addform.value.code; //仓库地区-区 + }); +}; + +// 删除 +const DeleteInformation = val => { + ElMessageBox.confirm('是否删除该条数据?确定此操作后不可撤销!', '删除提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }) + .then(() => { + console.log(val, '删除'); + let data = { + ids: val.row.id, + }; + details.loadingObj.list = true; //开启表格加载 + $_dataremove(data) + .then(res => { + console.log(res, '删除成功后返回值'); + if (res.data.code == 200) { + ElMessage({ + message: res.data.msg, + type: 'success', + }); + onLoad(); + } + }) + .catch(() => {}) + .finally(() => { + details.loadingObj.list = false; //关闭表格加载 + }); + }) + .catch(() => {}); +}; // 新增数据确定 const newlyaddSubmit = () => { console.log(Addform.value); - Addform.value.warehouseAddress = Addform.value.address[2];//仓库地址 - Addform.value.departmentName = AssessmentDepartment.value.find(res=>res.id == Addform.value.department).label;//部门名称 - Addform.value.daterange[0] = dayjs(Addform.value.daterange[0] ).format('YYYY-MM-DD'); - Addform.value.daterange[1] = dayjs(Addform.value.daterange[1] ).format('YYYY-MM-DD'); - Addform.value.paymentCodeUrl=Addform.value.paymentCodeUrl[0].response.data.link - - Addform.value.administrativeAreas = Addform.value.administrativeAreas.join(',') - console.log(Addform.value); - let data={ - ...Addform.value + Addform.value.warehouseAddress = Addform.value.address[2]; //仓库地址 + Addform.value.longitude = Addform.value.address[0]; //精度 + Addform.value.latitude = Addform.value.address[1]; //维度 + console.log(AssessmentDepartment.value, '部门'); + Addform.value.departmentName = department.value.label; //部门名称 + Addform.value.startDate = dayjs(Addform.value.daterange[0]).format('YYYY-MM-DD'); //开始时间 + Addform.value.endDate = dayjs(Addform.value.daterange[1]).format('YYYY-MM-DD'); //结束时间 + if (Addform.value.paymentCodeUrlS) { + if (Addform.value.paymentCodeUrlS.length) { + Addform.value.paymentCodeUrl = Addform.value.paymentCodeUrlS[0].response.data.link; //收款码 + } } - console.log(data,'准备提交的参数'); - $_addsave(data).then(res=>{ - console.log(res,'新增之后返回值'); - }) + Addform.value.administrativeAreas = Addform.value.administrativeAreas.join(','); + Addform.value.provinceCode = Addform.value.addressInfo[0]; // 仓库地区一级 + Addform.value.cityCode = Addform.value.addressInfo[0]; // 仓库地区二级 + Addform.value.code = Addform.value.addressInfo[0]; // 仓库地区三级 + console.log(Addform.value); + let data = { + ...Addform.value, + }; + console.log(data, '准备提交的参数'); + $_addsave(data).then(res => { + console.log(res, '新增之后返回值'); + if (res.data.code == 200) { + newlyaddload.value = false; //关闭新增弹窗 + Addform.value = {}; + ElMessage({ + message: res.data.msg, + type: 'success', + }); + onLoad(); + } + }); }; // 部门选择 const AffiliationList = ref({ diff --git a/src/views/distribution/reservation/reservationAddFrom.vue b/src/views/distribution/reservation/reservationAddFrom.vue index 7d2c5eca..15420971 100644 --- a/src/views/distribution/reservation/reservationAddFrom.vue +++ b/src/views/distribution/reservation/reservationAddFrom.vue @@ -147,14 +147,14 @@ @click="viewStockArticlePackage(slotProps.scope.row)" >查看包件 - 在库录入 - + -->
- + 名称:{{ item.firsts }} - + + + 冻结数量:{{ item.deliveryQuantity }} 出库数量:{{ item.outboundQuantity }} - + - - - 可用数量:{{(item.quantity)}} + --> + + +
+ 操作数量: + +
+
+ +
@@ -2011,7 +2018,18 @@ export default { }); return ids.join(','); }, + // 最大数量 + maxSum(){ + let max=0 + this.zeroOrderData.forEach(item=>{ + console.log(item); + max+=item.deliveryQuantity;//冻结数量 + }) + let maxs = this.obj.handQuantity -max + return maxs + } }, + methods: { /** 设置表格高度 */ async setTableHeight() { @@ -3406,4 +3424,12 @@ input[type='number'] { .footer-container { height: 60px; } +.el_sumS{ + span{ + width: 100px; + } + display: flex; + height: 20px; + width: 200px; +} diff --git a/src/views/distribution/turndelivery/deliveryDiscuss.vue b/src/views/distribution/turndelivery/deliveryDiscuss.vue index d56e188e..8be97719 100644 --- a/src/views/distribution/turndelivery/deliveryDiscuss.vue +++ b/src/views/distribution/turndelivery/deliveryDiscuss.vue @@ -292,7 +292,7 @@ >