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 @@
-
- 盘点明细 -
-
- - -
- - -
-
- - -
- -
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
- - - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
-
+