From ce8af5bedd3261cb85a82121040647f83bff03ed Mon Sep 17 00:00:00 2001 From: jishenghua <752718920@qq.com> Date: Mon, 24 Mar 2025 23:17:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E6=AD=A5=E7=BB=99=E5=95=86=E5=93=81?= =?UTF-8?q?=E7=9A=84=E6=89=A9=E5=B1=95=E4=BF=A1=E6=81=AF=E6=8B=86=E5=88=86?= =?UTF-8?q?=E6=88=90=E6=89=A9=E5=B1=951=20=E6=89=A9=E5=B1=952=20=E6=89=A9?= =?UTF-8?q?=E5=B1=953?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../erp/controller/MaterialController.java | 21 +++++++--- .../datasource/mappers/MaterialMapperEx.java | 10 ++++- .../com/jsh/erp/service/MaterialService.java | 16 ++++---- .../resources/mapper_xml/MaterialMapperEx.xml | 38 +++++++++++++++++-- .../jeecgbiz/modal/JSelectMaterialModal.vue | 22 ++++++++++- .../src/views/bill/mixins/BillModalMixin.js | 12 ++++++ .../views/bill/modules/PurchaseInModal.vue | 4 +- .../src/views/material/MaterialList.vue | 23 ++++++++++- 8 files changed, 125 insertions(+), 21 deletions(-) diff --git a/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialController.java b/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialController.java index ed97e9ea..3832362e 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialController.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialController.java @@ -94,7 +94,9 @@ public class MaterialController extends BaseController { String color = StringUtil.getInfo(search, "color"); String brand = StringUtil.getInfo(search, "brand"); String mfrs = StringUtil.getInfo(search, "mfrs"); - String materialOther = StringUtil.getInfo(search, "materialOther"); + String otherField1 = StringUtil.getInfo(search, "otherField1"); + String otherField2 = StringUtil.getInfo(search, "otherField2"); + String otherField3 = StringUtil.getInfo(search, "otherField3"); String weight = StringUtil.getInfo(search, "weight"); String expiryNum = StringUtil.getInfo(search, "expiryNum"); String enableSerialNumber = StringUtil.getInfo(search, "enableSerialNumber"); @@ -103,8 +105,8 @@ public class MaterialController extends BaseController { String enabled = StringUtil.getInfo(search, "enabled"); String remark = StringUtil.getInfo(search, "remark"); String mpList = StringUtil.getInfo(search, "mpList"); - List list = materialService.select(materialParam, standard, model, color, brand, mfrs, materialOther, weight, expiryNum, - enableSerialNumber, enableBatchNumber, position, enabled, remark, categoryId, mpList); + List list = materialService.select(materialParam, standard, model, color, brand, mfrs, otherField1, otherField2, + otherField3, weight, expiryNum, enableSerialNumber, enableBatchNumber, position, enabled, remark, categoryId, mpList); return getDataTable(list); } @@ -304,6 +306,9 @@ public class MaterialController extends BaseController { @RequestParam(value = "color", required = false) String color, @RequestParam(value = "brand", required = false) String brand, @RequestParam(value = "mfrs", required = false) String mfrs, + @RequestParam(value = "otherField1", required = false) String otherField1, + @RequestParam(value = "otherField2", required = false) String otherField2, + @RequestParam(value = "otherField3", required = false) String otherField3, @RequestParam(value = "enableSerialNumber", required = false) String enableSerialNumber, @RequestParam(value = "enableBatchNumber", required = false) String enableBatchNumber, @RequestParam("page") Integer currentPage, @@ -316,10 +321,11 @@ public class MaterialController extends BaseController { mpArr= mpList.split(","); } List dataList = materialService.findBySelectWithBarCode(categoryId, q, StringUtil.toNull(standardOrModel), - StringUtil.toNull(color), StringUtil.toNull(brand), StringUtil.toNull(mfrs), enableSerialNumber, enableBatchNumber, - (currentPage-1)*pageSize, pageSize); + StringUtil.toNull(color), StringUtil.toNull(brand), StringUtil.toNull(mfrs), StringUtil.toNull(otherField1), StringUtil.toNull(otherField2), StringUtil.toNull(otherField3), + enableSerialNumber, enableBatchNumber, (currentPage-1)*pageSize, pageSize); int total = materialService.findBySelectWithBarCodeCount(categoryId, q, StringUtil.toNull(standardOrModel), - StringUtil.toNull(color), StringUtil.toNull(brand), StringUtil.toNull(mfrs), enableSerialNumber, enableBatchNumber); + StringUtil.toNull(color), StringUtil.toNull(brand), StringUtil.toNull(mfrs), StringUtil.toNull(otherField1), StringUtil.toNull(otherField2), StringUtil.toNull(otherField3), + enableSerialNumber, enableBatchNumber); object.put("total", total); JSONArray dataArray = new JSONArray(); //存放数据json数组 @@ -373,6 +379,9 @@ public class MaterialController extends BaseController { } item.put("stock", stock); item.put("expand", materialService.getMaterialOtherByParam(mpArr, material)); + item.put("otherField1", material.getOtherField1()); + item.put("otherField2", material.getOtherField2()); + item.put("otherField3", material.getOtherField3()); item.put("imgName", material.getImgName()); if(fileUploadType == 2) { item.put("imgSmall", "small"); diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/MaterialMapperEx.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/MaterialMapperEx.java index 9f56bed3..4c9eebc0 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/MaterialMapperEx.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/MaterialMapperEx.java @@ -24,7 +24,9 @@ public interface MaterialMapperEx { @Param("color") String color, @Param("brand") String brand, @Param("mfrs") String mfrs, - @Param("materialOther") String materialOther, + @Param("otherField1") String otherField1, + @Param("otherField2") String otherField2, + @Param("otherField3") String otherField3, @Param("weight") String weight, @Param("expiryNum") String expiryNum, @Param("enableSerialNumber") String enableSerialNumber, @@ -51,6 +53,9 @@ public interface MaterialMapperEx { @Param("color") String color, @Param("brand") String brand, @Param("mfrs") String mfrs, + @Param("otherField1") String otherField1, + @Param("otherField2") String otherField2, + @Param("otherField3") String otherField3, @Param("enableSerialNumber") String enableSerialNumber, @Param("enableBatchNumber") String enableBatchNumber, @Param("offset") Integer offset, @@ -62,6 +67,9 @@ public interface MaterialMapperEx { @Param("color") String color, @Param("brand") String brand, @Param("mfrs") String mfrs, + @Param("otherField1") String otherField1, + @Param("otherField2") String otherField2, + @Param("otherField3") String otherField3, @Param("enableSerialNumber") String enableSerialNumber, @Param("enableBatchNumber") String enableBatchNumber); diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/MaterialService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/MaterialService.java index 5a87c877..649c2267 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/MaterialService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/MaterialService.java @@ -109,7 +109,7 @@ public class MaterialService { } public List select(String materialParam, String standard, String model, String color, String brand, String mfrs, - String materialOther, String weight, String expiryNum, String enableSerialNumber, + String otherField1, String otherField2, String otherField3, String weight, String expiryNum, String enableSerialNumber, String enableBatchNumber, String position, String enabled, String remark, String categoryId, String mpList) throws Exception{ @@ -124,7 +124,8 @@ public class MaterialService { idList = getListByParentId(Long.parseLong(categoryId)); } PageUtils.startPage(); - list= materialMapperEx.selectByConditionMaterial(materialParam, standard, model, color, brand, mfrs, materialOther, weight, expiryNum, + list= materialMapperEx.selectByConditionMaterial(materialParam, standard, model, color, brand, mfrs, + otherField1, otherField2, otherField3, weight, expiryNum, enableSerialNumber, enableBatchNumber, position, enabled, remark, idList, mpList); if (null != list && list.size()>0) { Map initialStockMap = getInitialStockMapByMaterialList(list); @@ -416,8 +417,8 @@ public class MaterialService { } public List findBySelectWithBarCode(Long categoryId, String q, String standardOrModel, String color, - String brand, String mfrs, String enableSerialNumber, String enableBatchNumber, - Integer offset, Integer rows) throws Exception{ + String brand, String mfrs, String otherField1, String otherField2, String otherField3, + String enableSerialNumber, String enableBatchNumber, Integer offset, Integer rows) throws Exception{ List list =null; try{ List idList = new ArrayList<>(); @@ -430,7 +431,7 @@ public class MaterialService { q = q.trim(); } list= materialMapperEx.findBySelectWithBarCode(idList, q, standardOrModel, color, brand, mfrs, - enableSerialNumber, enableBatchNumber, offset, rows); + otherField1, otherField2, otherField3, enableSerialNumber, enableBatchNumber, offset, rows); }catch(Exception e){ JshException.readFail(logger, e); } @@ -438,7 +439,8 @@ public class MaterialService { } public int findBySelectWithBarCodeCount(Long categoryId, String q, String standardOrModel, String color, - String brand, String mfrs, String enableSerialNumber, String enableBatchNumber) throws Exception{ + String brand, String mfrs, String otherField1, String otherField2, String otherField3, + String enableSerialNumber, String enableBatchNumber) throws Exception{ int result=0; try{ List idList = new ArrayList<>(); @@ -450,7 +452,7 @@ public class MaterialService { q = q.replace("'", ""); } result = materialMapperEx.findBySelectWithBarCodeCount(idList, q, standardOrModel, color, brand, mfrs, - enableSerialNumber, enableBatchNumber); + otherField1, otherField2, otherField3, enableSerialNumber, enableBatchNumber); }catch(Exception e){ logger.error("异常码[{}],异常提示[{}],异常[{}]", ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e); diff --git a/jshERP-boot/src/main/resources/mapper_xml/MaterialMapperEx.xml b/jshERP-boot/src/main/resources/mapper_xml/MaterialMapperEx.xml index f1769d3e..30a1c1b6 100644 --- a/jshERP-boot/src/main/resources/mapper_xml/MaterialMapperEx.xml +++ b/jshERP-boot/src/main/resources/mapper_xml/MaterialMapperEx.xml @@ -70,9 +70,17 @@ and m.mfrs like #{bindMfrs} - - - and (m.other_field1 like #{bindOther} or m.other_field2 like #{bindOther} or m.other_field3 like #{bindOther}) + + + and m.other_field1 like #{bindOtherField1} + + + + and m.other_field2 like #{bindOtherField2} + + + + and m.other_field3 like #{bindOtherField3} and m.weight = #{weight} @@ -330,6 +338,18 @@ and m.mfrs like #{bindMfrs} + + + and m.other_field1 like #{bindOtherField1} + + + + and m.other_field2 like #{bindOtherField2} + + + + and m.other_field3 like #{bindOtherField3} + and m.category_id in @@ -375,6 +395,18 @@ and m.mfrs like #{bindMfrs} + + + and m.other_field1 like #{bindOtherField1} + + + + and m.other_field2 like #{bindOtherField2} + + + + and m.other_field3 like #{bindOtherField3} + and m.category_id in diff --git a/jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue b/jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue index de9d9fed..09f0fc90 100644 --- a/jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue +++ b/jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue @@ -74,6 +74,21 @@ + + + + + + + + + + + + + + + @@ -155,6 +170,9 @@ brand: '', categoryId: undefined, mfrs: '', + otherField1:'', + otherField2:'', + otherField3:'', enableSerialNumber: undefined, enableBatchNumber: undefined }, @@ -179,7 +197,9 @@ {dataIndex: 'unit', title: '单位'}, {dataIndex: 'sku', title: '多属性'}, {dataIndex: 'stock', title: '库存'}, - {dataIndex: 'expand', title: '扩展信息'} + {dataIndex: 'otherField1', title: '扩展1'}, + {dataIndex: 'otherField2', title: '扩展2'}, + {dataIndex: 'otherField3', title: '扩展3'} ], scrollTrigger: {}, dataSource: [], diff --git a/jshERP-web/src/views/bill/mixins/BillModalMixin.js b/jshERP-web/src/views/bill/mixins/BillModalMixin.js index aafc2b9e..69c96a2b 100644 --- a/jshERP-web/src/views/bill/mixins/BillModalMixin.js +++ b/jshERP-web/src/views/bill/mixins/BillModalMixin.js @@ -652,6 +652,9 @@ export const BillModalMixin = { this.changeFormTypes(this.materialTable.columns, 'brand', 0) this.changeFormTypes(this.materialTable.columns, 'mfrs', 0) this.changeFormTypes(this.materialTable.columns, 'materialOther', 0) + this.changeFormTypes(this.materialTable.columns, 'otherField1', 0) + this.changeFormTypes(this.materialTable.columns, 'otherField1', 0) + this.changeFormTypes(this.materialTable.columns, 'otherField1', 0) this.changeFormTypes(this.materialTable.columns, 'sku', 0) }, //使得sku、序列号、批号、到期日等为显示 @@ -671,6 +674,15 @@ export const BillModalMixin = { if(info.materialOther) { this.changeFormTypes(this.materialTable.columns, 'materialOther', 1) } + if(info.otherField1) { + this.changeFormTypes(this.materialTable.columns, 'otherField1', 1) + } + if(info.otherField2) { + this.changeFormTypes(this.materialTable.columns, 'otherField2', 1) + } + if(info.otherField3) { + this.changeFormTypes(this.materialTable.columns, 'otherField3', 1) + } if(info.sku) { this.changeFormTypes(this.materialTable.columns, 'sku', 1) } diff --git a/jshERP-web/src/views/bill/modules/PurchaseInModal.vue b/jshERP-web/src/views/bill/modules/PurchaseInModal.vue index 9ace6484..3d1c14c4 100644 --- a/jshERP-web/src/views/bill/modules/PurchaseInModal.vue +++ b/jshERP-web/src/views/bill/modules/PurchaseInModal.vue @@ -278,7 +278,9 @@ { title: '颜色', key: 'color', width: '5%', type: FormTypes.normal }, { title: '品牌', key: 'brand', width: '6%', type: FormTypes.normal }, { title: '制造商', key: 'mfrs', width: '6%', type: FormTypes.normal }, - { title: '扩展信息', key: 'materialOther', width: '5%', type: FormTypes.normal }, + { title: '扩展1', key: 'otherField1', width: '4%', type: FormTypes.normal }, + { title: '扩展2', key: 'otherField2', width: '4%', type: FormTypes.normal }, + { title: '扩展3', key: 'otherField3', width: '4%', type: FormTypes.normal }, { title: '库存', key: 'stock', width: '5%', type: FormTypes.normal }, { title: '单位', key: 'unit', width: '4%', type: FormTypes.normal }, { title: '序列号', key: 'snList', width: '12%', type: FormTypes.popupJsh, kind: 'snAdd', multi: true }, diff --git a/jshERP-web/src/views/material/MaterialList.vue b/jshERP-web/src/views/material/MaterialList.vue index c586449e..e3e2c663 100644 --- a/jshERP-web/src/views/material/MaterialList.vue +++ b/jshERP-web/src/views/material/MaterialList.vue @@ -58,6 +58,21 @@ + + + + + + + + + + + + + + + @@ -254,7 +269,9 @@ color:'', brand:'', mfrs:'', - materialOther:'', + otherField1:'', + otherField2:'', + otherField3:'', weight:'', expiryNum:'', enabled: undefined, @@ -292,7 +309,9 @@ {title: '品牌', dataIndex: 'brand', width: 100, ellipsis:true}, {title: '助记码', dataIndex: 'mnemonic', width: 80, ellipsis:true}, {title: '类别', dataIndex: 'categoryName', width: 100, ellipsis:true}, - {title: '扩展信息', dataIndex: 'materialOther', width: 100, ellipsis:true}, + {title: '扩展1', dataIndex: 'otherField1', width: 100, ellipsis:true}, + {title: '扩展2', dataIndex: 'otherField2', width: 100, ellipsis:true}, + {title: '扩展3', dataIndex: 'otherField3', width: 100, ellipsis:true}, {title: '单位', dataIndex: 'unit', width: 100, ellipsis:true, customRender:function (t,r,index) { if (r) {