From 77b4465bb5489f392e8883387d4d83ccc5ccd59c Mon Sep 17 00:00:00 2001 From: erdanergou Date: Sat, 4 Mar 2023 11:44:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=89=A9=E6=96=99=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E5=88=97=E8=A1=A8=E5=8D=95=E4=BB=B7=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/MaterialServiceImpl.java | 9 +- .../pages/material/material-out.html | 39 +++++- .../pages/stockTaking/stockTaking.html | 131 +----------------- .../pages/material/material-out.html | 39 +++++- .../pages/stockTaking/stockTaking.html | 131 +----------------- 5 files changed, 82 insertions(+), 267 deletions(-) diff --git a/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java b/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java index f4d2c5eb..3b496d15 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java @@ -266,7 +266,14 @@ public class MaterialServiceImpl implements MaterialService { state = map.get("state"); } map.put("state", state); - return materialMapper.findMaterialByCondition(map); + List materialByCondition = materialMapper.findMaterialByCondition(map); + for (Material material:materialByCondition + ) { + if(material.getPrice() != null){ + material.setPrice(material.getPrice() / 100); + } + } + return materialByCondition; } /** diff --git a/src/main/resources/templates/pages/material/material-out.html b/src/main/resources/templates/pages/material/material-out.html index 80b542d8..b5494059 100644 --- a/src/main/resources/templates/pages/material/material-out.html +++ b/src/main/resources/templates/pages/material/material-out.html @@ -15,6 +15,7 @@
+
搜索信息 @@ -130,6 +131,24 @@ }); }); + let cols = [ + {type: "checkbox", width: 50}, + {field: 'code', width: 150, title: '存货编码', sort: true}, + {field: 'mname', width: 120, title: '物料名称', sort: false}, + {field: 'typeName', width: 150, title: '物料种类'}, + {field: 'version', width: 200, title: '规格型号', sort: false}, + {field: 'unit', width: 150, title: '计量单位'}, + {field: 'state', title: '状态', minWidth: 100, templet: '#switchTpl'}, + {title: '操作', minWidth: 200, toolbar: '#currentTableBar', align: "center"}, + {field: 'texture', width: 100, title: '材质'}, + {field: 'brand', width: 150, title: '品牌'}, + {field: 'shelfLife', width: 150, title: '保质期'}, + {field: 'productionPlace', width: 150, title: '产地'}, + {field: 'remark', width: 150, title: '备注'}, + + ]; + let flagForRelod = true; + table.render({ elem: "#currentTableId", @@ -166,22 +185,36 @@ {field: 'mname', width: 120, title: '物料名称', sort: false}, {field: 'typeName', width: 150, title: '物料种类'}, {field: 'version', width: 200, title: '规格型号', sort: false}, - {field: 'texture', width: 100, title: '材质'}, {field: 'unit', width: 150, title: '计量单位'}, + {field: 'state', title: '状态', minWidth: 100, templet: '#switchTpl'}, + {title: '操作', minWidth: 200, toolbar: '#currentTableBar', align: "center"}, + {field: 'texture', width: 100, title: '材质'}, {field: 'brand', width: 150, title: '品牌'}, {field: 'shelfLife', width: 150, title: '保质期'}, {field: 'productionPlace', width: 150, title: '产地'}, {field: 'remark', width: 150, title: '备注'}, - {field: 'state', title: '状态', minWidth: 100, templet: '#switchTpl'}, - {title: '操作', minWidth: 200, toolbar: '#currentTableBar', align: "center"} + ] ], limits: [10, 15, 20, 25, 50,100], limit: 10, page: true, skin: 'line', + done: function (res, curr, count) { + let display = $("#display").val(); + if("inline-block" === display){ + if(flagForRelod){ + flagForRelod = false; + let col = {field: 'price', width: 150, title: '物料单价'}; + cols.splice(6,0,col); + table.reload('currentTableId',{cols:[cols]}); + } + + } + } + }); diff --git a/src/main/resources/templates/pages/stockTaking/stockTaking.html b/src/main/resources/templates/pages/stockTaking/stockTaking.html index 6878f210..f0f4ca18 100644 --- a/src/main/resources/templates/pages/stockTaking/stockTaking.html +++ b/src/main/resources/templates/pages/stockTaking/stockTaking.html @@ -98,136 +98,7 @@
-
- 盘点明细 -
-
- - -
- - -
-
- - -
- -
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
- - - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
-
+
diff --git a/target/classes/templates/pages/material/material-out.html b/target/classes/templates/pages/material/material-out.html index 80b542d8..b5494059 100644 --- a/target/classes/templates/pages/material/material-out.html +++ b/target/classes/templates/pages/material/material-out.html @@ -15,6 +15,7 @@
+
搜索信息 @@ -130,6 +131,24 @@ }); }); + let cols = [ + {type: "checkbox", width: 50}, + {field: 'code', width: 150, title: '存货编码', sort: true}, + {field: 'mname', width: 120, title: '物料名称', sort: false}, + {field: 'typeName', width: 150, title: '物料种类'}, + {field: 'version', width: 200, title: '规格型号', sort: false}, + {field: 'unit', width: 150, title: '计量单位'}, + {field: 'state', title: '状态', minWidth: 100, templet: '#switchTpl'}, + {title: '操作', minWidth: 200, toolbar: '#currentTableBar', align: "center"}, + {field: 'texture', width: 100, title: '材质'}, + {field: 'brand', width: 150, title: '品牌'}, + {field: 'shelfLife', width: 150, title: '保质期'}, + {field: 'productionPlace', width: 150, title: '产地'}, + {field: 'remark', width: 150, title: '备注'}, + + ]; + let flagForRelod = true; + table.render({ elem: "#currentTableId", @@ -166,22 +185,36 @@ {field: 'mname', width: 120, title: '物料名称', sort: false}, {field: 'typeName', width: 150, title: '物料种类'}, {field: 'version', width: 200, title: '规格型号', sort: false}, - {field: 'texture', width: 100, title: '材质'}, {field: 'unit', width: 150, title: '计量单位'}, + {field: 'state', title: '状态', minWidth: 100, templet: '#switchTpl'}, + {title: '操作', minWidth: 200, toolbar: '#currentTableBar', align: "center"}, + {field: 'texture', width: 100, title: '材质'}, {field: 'brand', width: 150, title: '品牌'}, {field: 'shelfLife', width: 150, title: '保质期'}, {field: 'productionPlace', width: 150, title: '产地'}, {field: 'remark', width: 150, title: '备注'}, - {field: 'state', title: '状态', minWidth: 100, templet: '#switchTpl'}, - {title: '操作', minWidth: 200, toolbar: '#currentTableBar', align: "center"} + ] ], limits: [10, 15, 20, 25, 50,100], limit: 10, page: true, skin: 'line', + done: function (res, curr, count) { + let display = $("#display").val(); + if("inline-block" === display){ + if(flagForRelod){ + flagForRelod = false; + let col = {field: 'price', width: 150, title: '物料单价'}; + cols.splice(6,0,col); + table.reload('currentTableId',{cols:[cols]}); + } + + } + } + }); diff --git a/target/classes/templates/pages/stockTaking/stockTaking.html b/target/classes/templates/pages/stockTaking/stockTaking.html index 6878f210..f0f4ca18 100644 --- a/target/classes/templates/pages/stockTaking/stockTaking.html +++ b/target/classes/templates/pages/stockTaking/stockTaking.html @@ -98,136 +98,7 @@
-
- 盘点明细 -
-
- - -
- - -
-
- - -
- -
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
- - - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
-
+