diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java index a6799d5c..0904ed99 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java @@ -77,7 +77,7 @@ public class SysMakeOrderController extends BaseController if(CollectionUtil.isEmpty(makeorderDeptList)){ AjaxResult.error("部门评审数据不能为空!"); } - makeorderDeptService.deptReview(makeorderDeptList); + makeorderDeptService.deptReview(makeorderDeptDto); return AjaxResult.success("部门评审成功!"); } @@ -93,7 +93,7 @@ public class SysMakeOrderController extends BaseController if(CollectionUtil.isEmpty(makeorderDeptList)){ AjaxResult.error("部门主管确认数据不能为空!"); } - makeorderDeptService.deptReview(makeorderDeptList); + makeorderDeptService.deptReview(makeorderDeptDto); return AjaxResult.success("部门评审成功!"); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/dto/SysMakeorderDeptDto.java b/ruoyi-admin/src/main/java/com/ruoyi/system/dto/SysMakeorderDeptDto.java index 439e89d4..3ae502f8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/dto/SysMakeorderDeptDto.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/dto/SysMakeorderDeptDto.java @@ -14,5 +14,7 @@ import java.util.List; @Data public class SysMakeorderDeptDto implements Serializable { private static final long serialVersionUID = 9089739788908492404L; + private String makeNo; + private String saleNo; List orderDepts; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMakeorderDeptService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMakeorderDeptService.java index 64ea4d35..6e87d1d8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMakeorderDeptService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMakeorderDeptService.java @@ -3,6 +3,7 @@ package com.ruoyi.system.service; import java.util.Arrays; import java.util.List; import com.ruoyi.system.domain.SysMakeorderDept; +import com.ruoyi.system.dto.SysMakeorderDeptDto; /** * 生产订单部门Service接口 @@ -80,9 +81,9 @@ public interface ISysMakeorderDeptService /** * 部门评审 - * @param makeorderDeptList + * @param makeorderDeptDto */ - void deptReview(List makeorderDeptList); + void deptReview(SysMakeorderDeptDto makeorderDeptDto); /** * 部门主管确认 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeorderDeptServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeorderDeptServiceImpl.java index 77cbc607..09c19c97 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeorderDeptServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeorderDeptServiceImpl.java @@ -6,6 +6,7 @@ import cn.hutool.core.collection.CollectionUtil; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.system.domain.SysMakeOrder; +import com.ruoyi.system.dto.SysMakeorderDeptDto; import com.ruoyi.system.service.ISysMakeOrderService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -134,9 +135,9 @@ public class SysMakeorderDeptServiceImpl implements ISysMakeorderDeptService @Override @Transactional(rollbackFor = Exception.class) - public void deptReview(List makeorderDeptList) { - SysMakeorderDept makeorderDept = makeorderDeptList.get(0); - String makeNo = makeorderDept.getMakeNo(); + public void deptReview(SysMakeorderDeptDto makeorderDeptDto) { + String makeNo = makeorderDeptDto.getMakeNo(); + List makeorderDeptList = makeorderDeptDto.getOrderDepts(); // 部门预审数据是一起录入 /*String deptNumber = ShiroUtils.getSysUser().getDept().getDeptNumber(); // 判断其他部门是否都已预审完成,预审完成更新生产订单状态 diff --git a/ruoyi-admin/src/main/resources/templates/system/makeorder/bmps.html b/ruoyi-admin/src/main/resources/templates/system/makeorder/bmps.html index c33913fa..63431e56 100644 --- a/ruoyi-admin/src/main/resources/templates/system/makeorder/bmps.html +++ b/ruoyi-admin/src/main/resources/templates/system/makeorder/bmps.html @@ -55,7 +55,7 @@ var levelDatas = [[${@dict.getType('bomLevel')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]]; - var subTableFormArray = []; + // var subTableFormArray = []; $(function(){ var options = { @@ -73,12 +73,12 @@ onExpandRow : function(index, row, $detail) { initChildTable(index, row, $detail); }, - onCollapseRow: function(index, row){ + /*onCollapseRow: function(index, row){ var childTableFormId = 'child_table_form_'+index; var formData = $('#'+childTableFormId).serialize(); var formObj = $.common.formDataToObj(formData); subTableFormArray.push(formObj); - }, + },*/ columns: [ { field: 'id', @@ -160,7 +160,8 @@ var childTableId = 'child_table_'+index; var childFormTableId = 'child_form_table_'+index; var childTableFormId = 'child_table_form_'+index; - $detail.html('

123

'); + // $detail.html('
'); + $detail.html('
'); // BOM展示 $('#'+childTableId).bootstrapTable({ url: ctx + "erp/bom/allLevelList", @@ -327,21 +328,33 @@ columns: [ { field : 'id', - title : '生产订单部门ID' + title : '生产订单部门ID', + formatter: function (value, row, index) { + var curIndex = parentRowIndex*5+index; + return ''; + } }, { field : 'makeNo', title : '生产订单号', - visible: false + visible: false, + formatter: function (value, row, index) { + var curIndex = parentRowIndex*5+index; + return ''; + } }, { field : 'materialNo', title : '料号', - visible: false + visible: false, + formatter: function (value, row, index) { + var curIndex = parentRowIndex*5+index; + return ''; + } }, { - field : 'deptNumber', - title : '部门编号', + field : 'deptName', + title : '部门名称', visible: false }, { @@ -360,29 +373,31 @@ visible: false }, { - field : 'deptName', + field : 'deptNumber', title : '部门', formatter: function (value, row, index) { - if(subTableFormArray[parentRowIndex]){ + /*if(subTableFormArray[parentRowIndex]){ value = subTableFormArray[parentRowIndex].deptName?subTableFormArray[parentRowIndex].deptName:value; - } - return ''; + }*/ + var curIndex = parentRowIndex*5+index; + return ''; } }, { field: 'planFinishDate', title: '计划完成时间', formatter: function(value, row, index) { - var startDateName = 'planFinishStartDate_'+index; - var endDateName = 'planFinishEndDate_'+index; + var curIndex = parentRowIndex*5+index; + var endDateName = 'planFinishEndDate_'+parentRowIndex; + var startDateName = 'planFinishStartDate_'+parentRowIndex; var html; // 业务部门 if(row.deptNumber=='GMD'){ - html = '
\n' + + html = '
\n' + '-\n' + - '
' + '
' }else{ - html = ''; + html = ''; } return html; } @@ -419,6 +434,7 @@ // 当所有数据被加载时触发 onLoadSuccess: function(data) { for (let i = 0; i < data.rows.length; i++) { + var curIndex = parentRowIndex*5+i; var startDateIndex = 'planFinishStartDate_'+i; var endDateIndex = 'planFinishEndDate_'+i; @@ -472,8 +488,9 @@ function submitHandler() { debugger var data = $("#form-makeorder-edit").serializeArray(); - alert(JSON.stringify(data)) - $.operate.saveModal(prefix + "/deptReview", data); + alert(JSON.stringify(data)); + // saveModal 保存不关闭 + $.operate.save(prefix + "/deptReview", data); // var data = $('#bootstrap-sub-table-1').bootstrapTable('getData'); // var count = data.length; // var allFormData;