diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java b/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java index 226abee3..20fd9337 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java @@ -1121,6 +1121,14 @@ public class DepositoryRecordController { break; } } + + // 用于判断是否全审批完成 + if ("3".equals(outRecordP.getDepartmentheadPass()) || "3".equals(outRecordP.getDepositoryManagerPass()) || (outRecordP.getBalancePosterPass() != null && "3".equals(outRecordP.getBalancePosterPass()))) { + outRecordP.setAllApproval(false); + } else { + outRecordP.setAllApproval(true); + } + outRecordP.setUseAdminorgName(useAdminorgName); outRecordP.setDepositoryName(depositoryName.toString()); outRecordP.setQuantity(sumQuantity); diff --git a/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml b/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml index f86311d3..bf25e294 100644 --- a/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml +++ b/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml @@ -638,8 +638,12 @@ and constructionunitid = #{constructionunitid} GROUP BY aorid - - ORDER BY applicantTime desc + + ORDER BY pass DESC, applicantTime desc + + + ORDER BY applicantTime desc + LIMIT #{begin},#{size} diff --git a/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationOutRecordP.java b/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationOutRecordP.java index 9fb7723c..4bfa501e 100644 --- a/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationOutRecordP.java +++ b/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationOutRecordP.java @@ -283,6 +283,11 @@ public class ApplicationOutRecordP { */ private Integer flagForAgency; + /** + * 用于标志是否全部审批完成 + */ + private Boolean allApproval; + /** * 2代表是通过开放仓库申请1代表不是 diff --git a/src/main/resources/templates/pages/depository/table-in.html b/src/main/resources/templates/pages/depository/table-in.html index 28ab5c2b..5e6d1af2 100644 --- a/src/main/resources/templates/pages/depository/table-in.html +++ b/src/main/resources/templates/pages/depository/table-in.html @@ -100,7 +100,6 @@ @@ -253,14 +252,20 @@ title: '入库申请', type: 2, shade: 0.2, + offset: 'r', + anim: 'slideLeft', maxmin: true, shadeClose: true, - area: ['100%', '100%'], + area: ['30%', '100%'], content: '/application_in', + end:function () { + table.reloadData('currentTableId', { + url: '/depositoryRecord/applicationInView', + where: req + }, 'data'); + } }); - $(window).on("resize", function () { - layer.full(index); - }); + } else if (obj.event === 'delete') { // 监听删除操作 var checkStatus = table.checkStatus('currentTableId') , data = checkStatus.data; @@ -316,21 +321,7 @@ table.on('tool(currentTableFilter)', function (obj) { let data = obj.data; - if (obj.event === 'detail') { - var index = layer.open({ - title: '入库信息详情', - type: 2, - shade: 0.2, - maxmin: true, - shadeClose: true, - area: ['100%', '100%'], - content: '/form_step_look?id=' + data.id, - }); - $(window).on("resize", function () { - layer.full(index); - }); - return false; - } else if (obj.event === 'delete') { + if (obj.event === 'delete') { var req = {}; req.id = data.id; layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) { diff --git a/src/main/resources/templates/pages/depository/table-out.html b/src/main/resources/templates/pages/depository/table-out.html index 5c32f96a..f9d50555 100644 --- a/src/main/resources/templates/pages/depository/table-out.html +++ b/src/main/resources/templates/pages/depository/table-out.html @@ -89,7 +89,7 @@ - +
@@ -179,7 +177,7 @@ let cols = [ {type: "checkbox", width: 50}, - {field: "code", title: '申请编码', width: 150, templet: '#applicationOutCode'}, + {field: "code", title: '申请编码', width: 150,}, {field: 'mname', width: 150, title: '物料名称'}, {field: 'mcode', width: 150, title: '存货编码'}, {field: 'quantity', width: 150, title: '数量', sort: true}, @@ -238,7 +236,7 @@ pageName: 'page', //页码的参数名称,默认:page limitName: 'size' //每页数据量的参数名,默认:limit }, - where: {}, + where: {"groupByForState":true}, response: { statusName: 'status' //规定数据状态的字段名称,默认:code , statusCode: 200 //规定成功的状态码,默认:0 @@ -295,11 +293,44 @@ // table.reloadData('currentTableId', {cols: [cols]}); table.reload('currentTableId', {cols: [cols]}); } - } + $.each(res['data'], function (i, j) { + let allApproval = j["allApproval"]; + let pass = j["pass"]; + if (pass === 3) { + if (allApproval) { + Layui_SetDataTableRowColor('table', i + 1, '#31bdec'); + } else { + Layui_SetDataTableRowColor('table', i + 1, '#ffb800'); + } + } else if(pass === 1){ + Layui_SetDataTableRowColor('table', i + 1, '#16b777'); + }else{ + Layui_SetDataTableRowColor('table', i + 1, '#ff211e'); + } + }) + } }); + + // 用于给table行上色的方法 + function Layui_SetDataTableRowColor(TabDivId, RowIndex, ColorString) { + try { + var div = $("[lay-id='currentTableId'] tr:eq(" + RowIndex + ")"); + if (div != null) //找到对象了 + { + // console.log(div); + div.css("color", ColorString); + + } else { + console.log('没有找到对象'); + } + } catch (e) { + console.log(e.message); + } + } + // 监听搜索操作 form.on('submit(data-search-btn)', function (data) { var req = {}; @@ -350,12 +381,17 @@ type: 2, shade: 0.2, maxmin: true, + offset: 'r', + anim: 'slideLeft', shadeClose: true, - area: ['100%', '100%'], + area: ['30%', '100%'], content: '/application_out', - }); - $(window).on("resize", function () { - layer.full(index); + end: function () { + table.reloadData('currentTableId', { + url: '/depositoryRecord/applicationOutView' + , where: req + }, 'data'); + } }); } else if (obj.event === 'delete') { // 监听删除操作 var checkStatus = table.checkStatus('currentTableId') @@ -438,9 +474,12 @@ } }); - //监听表格复选框选择 - table.on('checkbox(currentTableFilter)', function (obj) { - console.log(obj) + table.on('rowDouble(currentTableFilter)', function (obj) { + var data = obj.data; // 获取当前行数据 + let id = data.id; + let req = {}; + req.id = id; + showDetail(req); }); showDetail = function (obj) { diff --git a/src/test/java/com/dreamchaser/depository_manage/SomeTest.java b/src/test/java/com/dreamchaser/depository_manage/SomeTest.java index f68927d1..e7079193 100644 --- a/src/test/java/com/dreamchaser/depository_manage/SomeTest.java +++ b/src/test/java/com/dreamchaser/depository_manage/SomeTest.java @@ -241,17 +241,17 @@ public class SomeTest { ApprovalInfo approvalInfo = new ApprovalInfo(); approvalInfo.setTemplateId("3WKiKVCzyLv3Y1LaHZxp4DimQEpCdvYP52HsAUtF"); - approvalInfo.setSpNo("202307060001"); + approvalInfo.setSpNo("202307110005"); // 模拟第一个节点(部门负责人) List spRecord_list = new ArrayList<>(); ApprovalInfo_SpRecord asr1 = new ApprovalInfo_SpRecord(); - asr1.setSpStatus("2"); + asr1.setSpStatus("3"); List approvalInfo_Details1 = new ArrayList<>(); ApprovalInfo_Details ad1 = new ApprovalInfo_Details(); - ad1.setSpStatus("2"); - ad1.setSpTime("1688601734000"); + ad1.setSpStatus("3"); + ad1.setSpTime("1689036202000"); ApprovalInfo_Details_Approver approver1 = new ApprovalInfo_Details_Approver(); approver1.setUserId("WoBenShanLiang_3"); ad1.setApprover(approver1); @@ -260,11 +260,11 @@ public class SomeTest { // 模拟第二个节点(宋倩倩,平衡岗) ApprovalInfo_SpRecord asr2 = new ApprovalInfo_SpRecord(); - asr2.setSpStatus("2"); + asr2.setSpStatus("1"); List approvalInfo_Details2 = new ArrayList<>(); ApprovalInfo_Details ad2 = new ApprovalInfo_Details(); - ad2.setSpStatus("2"); - ad2.setSpTime("1688602004000"); + ad2.setSpStatus("1"); + ad2.setSpTime("0"); ApprovalInfo_Details_Approver approver2 = new ApprovalInfo_Details_Approver(); approver2.setUserId("XinPing"); ad2.setApprover(approver2); @@ -300,11 +300,11 @@ public class SomeTest { spRecord_list.add(asr1); spRecord_list.add(asr2); - spRecord_list.add(asr3); +// spRecord_list.add(asr3); // spRecord_list.add(asr4); approvalInfo.setSpRecord(spRecord_list); - approvalInfo.setStatuChangeEvent("2"); + approvalInfo.setStatuChangeEvent("3"); callback(approvalInfo); diff --git a/target/classes/templates/pages/BusinessType/businesstype_out.html b/target/classes/templates/pages/BusinessType/businesstype_out.html index d470311d..01f0624a 100644 --- a/target/classes/templates/pages/BusinessType/businesstype_out.html +++ b/target/classes/templates/pages/BusinessType/businesstype_out.html @@ -15,37 +15,41 @@
-
- 搜索信息 -
-
-
-
- -
- +
+
+

搜索

+
+
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
-
-
- -
- -
-
-
- -
+
- +
-
+
@@ -99,7 +103,7 @@ "data": res.data //解析数据列表 }; }, - height: 'full-255',//固定高度-即固定表头固定第一行首行 + height: 'full-60',//固定高度-即固定表头固定第一行首行 request: { pageName: 'page', //页码的参数名称,默认:page limitName: 'size' //每页数据量的参数名,默认:limit @@ -124,8 +128,8 @@ {title: '操作', minWidth: 200, toolbar: '#currentTableBar', align: "center"} ] ], - limits: [10, 15, 20, 25, 50, 100], - limit: 10, + limits: [15, 30, 45, 60, 100], + limit: 15, page: true, skin: 'line' }); @@ -244,8 +248,7 @@ layer.full(index); }); return false; - } - else if (obj.event === 'delete') { + } else if (obj.event === 'delete') { layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) { $.ajax({ @@ -347,7 +350,6 @@ }); - diff --git a/target/classes/templates/pages/application/form-step-look_back.html b/target/classes/templates/pages/application/form-step-look_back.html index 0cf16fe8..80007953 100644 --- a/target/classes/templates/pages/application/form-step-look_back.html +++ b/target/classes/templates/pages/application/form-step-look_back.html @@ -151,8 +151,6 @@ width: '100%', //设置容器宽度 stepWidth: '750px', height: '100%', - // number:number, - // position: position, stepItems: [] }); @@ -372,17 +370,16 @@ selectThisMinRecord = function (obj) { - // console.log(obj) var minId = obj.value; layer.open({ type: 2, - title: '详情', - skin: 'layui-layer-rim', - maxmin: true, - shadeClose: true, //点击遮罩关闭层 - area: ['100%', '100%'], - move: '.layui-layer-title', - fixed: false, + title:"详细信息", + offset: 'b', + anim: 'slideUp', // 从上往下 + area: ['100%', '65%'], + shade: 0.1, + shadeClose: true, + id: 'ID-demo-layer-direction-t', content: '/form_step_lookByminRecordOut?id=' + minId, }); }; diff --git a/target/classes/templates/pages/application/form-step-look_minRecordOut.html b/target/classes/templates/pages/application/form-step-look_minRecordOut.html index fc252b37..7a3c83bb 100644 --- a/target/classes/templates/pages/application/form-step-look_minRecordOut.html +++ b/target/classes/templates/pages/application/form-step-look_minRecordOut.html @@ -15,129 +15,116 @@
- -
-
-
-
-
- - - - - - - +
+
+ + +
+ + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - + + - + + - + -
申请编号 - -
物料名称 - -
物料型号 - -
物料型号 - -
存货编码 - -
数量 - -
单位 - -
金额 - +
物料名称 + +
物料型号 + +
物料型号 + +
存货编码 + +
数量 + +
单位 + +
金额 + -
仓库名称 - -
库位编码 - -
转入位置 - -
仓库名称 + +
库位编码 + +
转入位置 + +
出库人员 - +
出库人员 + -
- - -
+ + +
@@ -243,9 +230,9 @@ time: 1000 }, function () { - var index = parent.layer.getFrameIndex(window.name); - parent.location.reload(); //刷新父页面 - parent.layer.close(index); + var index = parent.layer.getFrameIndex(window.name); + parent.location.reload(); //刷新父页面 + parent.layer.close(index); }) } else { diff --git a/target/classes/templates/pages/constructionunit/constructionunit_out.html b/target/classes/templates/pages/constructionunit/constructionunit_out.html index bd47a8b9..c6345298 100644 --- a/target/classes/templates/pages/constructionunit/constructionunit_out.html +++ b/target/classes/templates/pages/constructionunit/constructionunit_out.html @@ -15,38 +15,41 @@
-
- 搜索信息 -
-
-
-
- -
- +
+
+

搜索

+
+
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
-
-
- -
- -
-
-
- -
+
- +
-
- +
diff --git a/target/classes/templates/pages/depository/table-in.html b/target/classes/templates/pages/depository/table-in.html index a9302b30..5e6d1af2 100644 --- a/target/classes/templates/pages/depository/table-in.html +++ b/target/classes/templates/pages/depository/table-in.html @@ -15,81 +15,93 @@
-
- 搜索信息 -
-
- -
-
- -
- - - - +
+
+

搜索

+
+
+ + +
+
+ +
+ + - + +
+
+
+ +
+ + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
+
- +
-
+
@@ -102,7 +114,8 @@ function selectMaterialByName(obj) { } - function showDetail(){ + + function showDetail() { } @@ -126,7 +139,7 @@ area: ['70%', '70%'], move: '.layui-layer-title', fixed: false, - content: '/selectDepository?type='+selectDepositoryType+'&clickObj=' + parentId, + content: '/selectDepository?type=' + selectDepositoryType + '&clickObj=' + parentId, }); }; @@ -151,7 +164,7 @@ "data": res.data //解析数据列表 }; }, - height: 'full-255',//固定高度-即固定表头固定第一行首行 + height: 'full-60',//固定高度-即固定表头固定第一行首行 request: { pageName: 'page', //页码的参数名称,默认:page limitName: 'size' //每页数据量的参数名,默认:limit @@ -170,7 +183,7 @@ cols: [ [ {type: "checkbox", width: 50}, - {field: 'aircode',title: '存货编码', width: 150, templet: '#applicationInCode'}, + {field: 'aircode', title: '存货编码', width: 150, templet: '#applicationInCode'}, {field: 'mname', width: 150, title: '物料名称'}, {field: 'mversion', width: 150, title: '规格型号'}, {field: 'airUnit', width: 100, title: '计量单位'}, @@ -185,8 +198,8 @@ {title: '操作', minWidth: 150, toolbar: '#currentTableBar', align: "center"} ] ], - limits: [10, 15, 20, 25, 50,100], - limit: 10, + limits: [ 15, 30, 45, 60, 100], + limit: 15, page: true, skin: 'line', done: function () { @@ -239,14 +252,20 @@ title: '入库申请', type: 2, shade: 0.2, + offset: 'r', + anim: 'slideLeft', maxmin: true, shadeClose: true, - area: ['100%', '100%'], + area: ['30%', '100%'], content: '/application_in', + end:function () { + table.reloadData('currentTableId', { + url: '/depositoryRecord/applicationInView', + where: req + }, 'data'); + } }); - $(window).on("resize", function () { - layer.full(index); - }); + } else if (obj.event === 'delete') { // 监听删除操作 var checkStatus = table.checkStatus('currentTableId') , data = checkStatus.data; @@ -302,22 +321,7 @@ table.on('tool(currentTableFilter)', function (obj) { let data = obj.data; - if (obj.event === 'detail') { - var index = layer.open({ - title: '入库信息详情', - type: 2, - shade: 0.2, - maxmin: true, - shadeClose: true, - area: ['100%', '100%'], - content: '/form_step_look?id=' + data.id, - }); - $(window).on("resize", function () { - layer.full(index); - }); - return false; - } - else if (obj.event === 'delete') { + if (obj.event === 'delete') { var req = {}; req.id = data.id; layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) { @@ -369,19 +373,17 @@ showDetail = function (obj) { - var index = layer.open({ - title: '入库信息详情', + layer.open({ type: 2, - shade: 0.2, - maxmin: true, + offset: 'r', + anim: 'slideLeft', // 从右往左 + area: ['30%', '100%'], + shade: 0.1, + title: "入库信息详情", shadeClose: true, - area: ['100%', '100%'], + id: 'applicationOutInfoForLeft', content: '/form_step_look?id=' + obj.id, }); - $(window).on("resize", function () { - layer.full(index); - }); - return false; }; $('body').on('click', '[data-refresh]', function () { diff --git a/target/classes/templates/pages/depository/table-out.html b/target/classes/templates/pages/depository/table-out.html index 5c32f96a..f9d50555 100644 --- a/target/classes/templates/pages/depository/table-out.html +++ b/target/classes/templates/pages/depository/table-out.html @@ -89,7 +89,7 @@ - +
@@ -179,7 +177,7 @@ let cols = [ {type: "checkbox", width: 50}, - {field: "code", title: '申请编码', width: 150, templet: '#applicationOutCode'}, + {field: "code", title: '申请编码', width: 150,}, {field: 'mname', width: 150, title: '物料名称'}, {field: 'mcode', width: 150, title: '存货编码'}, {field: 'quantity', width: 150, title: '数量', sort: true}, @@ -238,7 +236,7 @@ pageName: 'page', //页码的参数名称,默认:page limitName: 'size' //每页数据量的参数名,默认:limit }, - where: {}, + where: {"groupByForState":true}, response: { statusName: 'status' //规定数据状态的字段名称,默认:code , statusCode: 200 //规定成功的状态码,默认:0 @@ -295,11 +293,44 @@ // table.reloadData('currentTableId', {cols: [cols]}); table.reload('currentTableId', {cols: [cols]}); } - } + $.each(res['data'], function (i, j) { + let allApproval = j["allApproval"]; + let pass = j["pass"]; + if (pass === 3) { + if (allApproval) { + Layui_SetDataTableRowColor('table', i + 1, '#31bdec'); + } else { + Layui_SetDataTableRowColor('table', i + 1, '#ffb800'); + } + } else if(pass === 1){ + Layui_SetDataTableRowColor('table', i + 1, '#16b777'); + }else{ + Layui_SetDataTableRowColor('table', i + 1, '#ff211e'); + } + }) + } }); + + // 用于给table行上色的方法 + function Layui_SetDataTableRowColor(TabDivId, RowIndex, ColorString) { + try { + var div = $("[lay-id='currentTableId'] tr:eq(" + RowIndex + ")"); + if (div != null) //找到对象了 + { + // console.log(div); + div.css("color", ColorString); + + } else { + console.log('没有找到对象'); + } + } catch (e) { + console.log(e.message); + } + } + // 监听搜索操作 form.on('submit(data-search-btn)', function (data) { var req = {}; @@ -350,12 +381,17 @@ type: 2, shade: 0.2, maxmin: true, + offset: 'r', + anim: 'slideLeft', shadeClose: true, - area: ['100%', '100%'], + area: ['30%', '100%'], content: '/application_out', - }); - $(window).on("resize", function () { - layer.full(index); + end: function () { + table.reloadData('currentTableId', { + url: '/depositoryRecord/applicationOutView' + , where: req + }, 'data'); + } }); } else if (obj.event === 'delete') { // 监听删除操作 var checkStatus = table.checkStatus('currentTableId') @@ -438,9 +474,12 @@ } }); - //监听表格复选框选择 - table.on('checkbox(currentTableFilter)', function (obj) { - console.log(obj) + table.on('rowDouble(currentTableFilter)', function (obj) { + var data = obj.data; // 获取当前行数据 + let id = data.id; + let req = {}; + req.id = id; + showDetail(req); }); showDetail = function (obj) { diff --git a/target/classes/templates/pages/depository/table-stock.html b/target/classes/templates/pages/depository/table-stock.html index 89cf381e..a3b84f97 100644 --- a/target/classes/templates/pages/depository/table-stock.html +++ b/target/classes/templates/pages/depository/table-stock.html @@ -13,65 +13,72 @@
-
- - 搜索信息 -
- - - -
-
-
- -
- - - +
+
+

搜索

+
+
+ + + + +
+
+ +
+ + + +
+
+
+ +
+ + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
- -
+
- +
-
+
-
- 搜索信息 -
-
-
- - -
- -
- +
+
+

搜索

+
+
+ +
+ + +
+ +
+ +
+
+ +
+ +
+ +
+
+ + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
-
- -
- -
- -
-
- - -
- -
- -
-
- -
- -
- -
-
- -
- -
+
- +
-
+
@@ -88,7 +98,8 @@ @@ -101,9 +112,10 @@ @@ -86,7 +95,8 @@ @@ -95,9 +105,10 @@