From 23c3f57aa0d7d34cbca18b0f47852b2104b25153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E8=BF=AA?= <2596750866@qq.com> Date: Tue, 24 Dec 2024 14:41:36 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E5=A7=94=E5=A4=96=E5=8A=A0=E5=B7=A5=20?= =?UTF-8?q?=E5=A7=94=E5=A4=96=E8=AE=A2=E5=8D=95=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A7=94=E5=A4=96=E8=AE=A2=E5=8D=95=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E5=90=88=E5=B9=B6=E7=89=A9=E6=96=99=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=97=B6=E5=90=88=E8=AE=A1=E8=AE=A1=E5=88=92=E5=A7=94?= =?UTF-8?q?=E5=A4=96=E6=95=B0=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=A7=94=E5=A4=96=E9=A2=86=E6=96=99=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E5=AD=90=E8=A1=A8=E5=8E=BB=E9=99=A4=E5=A7=94=E5=A4=96?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=8F=AF=E7=94=A8=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E6=95=B0=EF=BC=8C=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=87=BD=E6=95=B0=EF=BC=9B=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=A7=94=E5=A4=96=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E5=90=88=E5=B9=B6=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=A0=8F=E6=8C=89=E9=92=AE=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outsource_order/addRequisition.html | 55 +++++++++++-------- .../outsource_order/outsource_order.html | 21 +++---- .../outsource_plan/addOutsourceOrder.html | 3 + 3 files changed, 45 insertions(+), 34 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/system/outsource_order/addRequisition.html b/ruoyi-admin/src/main/resources/templates/system/outsource_order/addRequisition.html index 94a427cc..0c62d0b9 100644 --- a/ruoyi-admin/src/main/resources/templates/system/outsource_order/addRequisition.html +++ b/ruoyi-admin/src/main/resources/templates/system/outsource_order/addRequisition.html @@ -313,48 +313,42 @@ { title: '阶层', field: 'level', + align: 'center', formatter: function(value, row, index) { return $.table.selectDictLabel(levelDatas, value); } }, {title: '委外计划详情id', field: 'outsourcePlanDetailId',visible:false,}, - {title: '料号', field: 'materialNo'}, - {title: '图片', field: 'materialPhotourl', formatter: function (value, row, index) { + {title: '料号', field: 'materialNo', align: 'center',}, + {title: '图片', field: 'materialPhotourl', align: 'center', formatter: function (value, row, index) { return $.table.imageView(value); } }, - {title: '物料类型',field: 'materialType', + {title: '物料类型',field: 'materialType',align: 'center', formatter: function(value, row, index) {return $.table.selectCategoryLabel(materialTypeDatas, value);} }, - {title: '物料名称', field: 'materialName'}, - {title: '物料描述', field: 'description'}, - {title: '品牌', field: 'brand'}, + {title: '物料名称', field: 'materialName', align: 'center',}, + {title: '物料描述', field: 'description', align: 'center',}, + {title: '品牌', field: 'brand', align: 'center',}, {title: '单位', field: 'unit', align: 'center', }, {title: '加工方式', field: 'processMethod', align: 'center', formatter: function (value, row, index) { return $.table.selectDictLabel(processMethodDatas, value); } }, - {title: '计划委外数', field: 'plannedOutsourceAmount', - formatter: function (value, row, index) { - if(value === null || value === ''||value === undefined){ - value = parentRow.plannedOutsourceAmount; - } - return value; - } + { + title: '可用库存数', + field: 'stockNum', + align: 'center', }, - {title: '实际委外数', field: 'actualOutsourceAmount', - formatter: function (value, row, index) { - - if(value === null || value === ''||value === undefined){ - value = parentRow.actualOutsourceAmount; - } - return value; - } + { + title: '已委外领料数', + field: 'pickedNum', + align: 'center', }, - {title: '已委外领料数', field: 'pickedNum'}, { title: '本次领料数', + align: 'center', field: 'pickingNum', formatter: function(value, row, index) { var html = $.common.sprintf("", index, value); @@ -427,8 +421,22 @@ var childDatas = $("#"+childTableId).bootstrapTable("getData"); if(childDatas.length <= 0) return; + var childValues = false; + childDatas.forEach(function (material,index) { + var inputId = "pickNum_" + childTableId + "_" + index; + if ($("#" + inputId).val() === "" || $("#" + inputId).val() === "0") { + return; + } else { + childValues = true; + } + }); + if(childValues == false){ + return; + } + if (typeof materialObj === 'undefined') return; var rows = $("#" + "bootstrap-table_" + tableId).bootstrapTable('getData').length; + if(rows != 0) { var data = $("#" + "bootstrap-table_" + tableId).bootstrapTable('getData')[0]; @@ -494,8 +502,7 @@ level: 1, processMethod: material.processMethod, materialType: material.materialType, - plannedOutsourceAmount: data.plannedOutsourceAmount, - actualOutsourceAmount: data.actualOutsourceAmount, + stockNum: material.stockNum, outsourceOrderNo: outsourceRequisition.outsourceOrderNo, takenMaterial:material.pickedNum, takingMaterial: value, diff --git a/ruoyi-admin/src/main/resources/templates/system/outsource_order/outsource_order.html b/ruoyi-admin/src/main/resources/templates/system/outsource_order/outsource_order.html index dd7d70f8..4d518d67 100644 --- a/ruoyi-admin/src/main/resources/templates/system/outsource_order/outsource_order.html +++ b/ruoyi-admin/src/main/resources/templates/system/outsource_order/outsource_order.html @@ -292,18 +292,18 @@ // 审核状态-审核通过 使用状态-是 未发起作废流程 if(row.auditStatus=="1" && row.useStatus=="1"){//&& !row.cancelInstanceId // 作废 - actions.push(' 作废'); + actions.push(' 作废'); //领料,入库 - actions.push('领料 '); - actions.push('入库 '); + actions.push('领料 '); + actions.push('入库 '); }else if(row.auditStatus =="2"){ // 编辑 - actions.push(' 编辑 '); + actions.push(' 编辑 '); } // 已作废 if(row.useStatus=="2" && !row.restoreInstanceId){ // 恢复 - actions.push(' 恢复 '); + actions.push(' 恢复 '); } // 有流程实例id if (row.instanceId) { @@ -312,16 +312,17 @@ var todoUserIdList = row.todoUserId.split(","); if(todoUserIdList.includes(loginName) || loginName == 'admin'){ var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; - actions.push(' '+nodeName+' '); + actions.push(' '+nodeName+' '); } } // 审批历史 - actions.push(' 审批历史 '); + actions.push(' 审批历史 '); // 进度查看 - actions.push(' 进度 '); + actions.push(' 进度查看 '); } - actions.push('详情'); - return actions.join(''); + actions.push('详情'); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); } }], rowStyle: function (row, index) { diff --git a/ruoyi-admin/src/main/resources/templates/system/outsource_plan/addOutsourceOrder.html b/ruoyi-admin/src/main/resources/templates/system/outsource_plan/addOutsourceOrder.html index cc326e46..5c44a995 100644 --- a/ruoyi-admin/src/main/resources/templates/system/outsource_plan/addOutsourceOrder.html +++ b/ruoyi-admin/src/main/resources/templates/system/outsource_plan/addOutsourceOrder.html @@ -342,6 +342,9 @@ if (!existingRecord.outsourceProcessList) { existingRecord.outsourceProcessList = []; } + var planNum = Number(existingRecord.plannedOutsourceAmount); + planNum = planNum + Number(current.plannedOutsourceAmount); + existingRecord.plannedOutsourceAmount = planNum; existingRecord.outsourceProcessList = current.material.outsourceProcessList; if (typeof existingRecord.correlationCodes === 'string' && typeof current.material.correlationCodes === 'string') { existingRecord.correlationCodes += current.material.correlationCodes.includes(',') ? current.material.correlationCodes : `,${current.material.correlationCodes}`;