From c607fde64b58135563b155572f07d095a0721b61 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Wed, 24 Jul 2024 17:26:42 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E5=B7=A5=E7=A8=8B=E7=AE=A1=E7=90=86?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E5=BC=80=E5=8F=91=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=8D=95=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2=EF=BC=9A=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20=E9=80=89=E6=8B=A9=E9=87=87=E8=B4=AD=E7=89=A9?= =?UTF-8?q?=E6=96=99=E6=8C=89=E9=92=AE=EF=BC=9B=E6=96=B0=E5=A2=9E=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E9=87=87=E8=B4=AD=E7=89=A9=E6=96=99=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=9B=E6=96=B0=E5=A2=9E=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E7=89=A9=E6=96=99=E7=9A=84=E7=89=A9=E6=96=99?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=95=B0=E6=8D=AE=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E9=87=87=E8=B4=AD=E4=BF=AE=E6=94=B9=E7=89=A9?= =?UTF-8?q?=E6=96=99=E4=BF=A1=E6=81=AF=E9=80=89=E6=8B=A9=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3=E6=96=B9=E6=B3=95=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9F=A5=E6=89=BE=E9=87=87=E8=B4=AD=E7=89=A9?= =?UTF-8?q?=E6=96=99=E4=BF=A1=E6=81=AF=E5=88=97=E8=A1=A8=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=96=B9=E6=B3=95=20=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E9=80=89=E6=8B=A9=E7=89=A9=E6=96=99=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E9=A1=B5=E9=9D=A2=20=E4=BF=AE=E6=94=B9=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=BC=80=E5=8F=91=E4=BF=AE=E6=94=B9=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=EF=BC=8C=E5=8C=B9=E9=85=8D=E5=90=8E=E7=AB=AF=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ErpDevelopModifyorderController.java | 35 +- .../templates/erp/developModifyOrder/add.html | 360 +++++++++++++++++- .../developModifyOrderMaterialSelect.html | 14 +- .../purchaseOrderMaterialSelect.html | 68 ++++ 4 files changed, 462 insertions(+), 15 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/purchaseOrderMaterialSelect.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java index 581175f7..366b1d66 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java @@ -3,6 +3,8 @@ package com.ruoyi.erp.controller; import java.util.List; import com.ruoyi.common.core.domain.entity.SysUser; +import com.ruoyi.erp.domain.ErpMaterialVo; +import com.ruoyi.erp.service.IErpMaterialService; import com.ruoyi.system.domain.SysMakeOrder; import com.ruoyi.system.domain.SysMakeorderDept; import com.ruoyi.system.domain.SysSalesOrderChild; @@ -47,6 +49,10 @@ public class ErpDevelopModifyorderController extends BaseController @Autowired private ISysSalesOrderChildService sysSalesOrderChildService; + @Autowired + private IErpMaterialService erpMaterialService; + + @RequiresPermissions("erp:developModifyOrder:view") @GetMapping() public String developModifyOrder() @@ -115,7 +121,7 @@ public class ErpDevelopModifyorderController extends BaseController /** - * 加载物料信息选择弹窗 + * 加载开发修改物料信息选择弹窗 */ @GetMapping("/developModifyMaterialSelect") public String materialSelect(@RequestParam String makeNo, ModelMap modelMap) @@ -125,7 +131,7 @@ public class ErpDevelopModifyorderController extends BaseController } /** - * 查找与生产单号有关的物料信息列表 + * 查找与生产单号有关的开发修改物料信息列表 */ @PostMapping("/getMaterialListByMakeNo") @ResponseBody @@ -137,6 +143,31 @@ public class ErpDevelopModifyorderController extends BaseController return getDataTable(list); } + + /** + * 加载采购修改物料信息选择弹窗 + */ + @GetMapping("/purchaseMaterialSelect") + public String purchaseMaterialSelect() + { + return prefix + "/purchaseOrderMaterialSelect"; + } + + + /** + * 查找采购物料信息列表 + */ + @PostMapping("/getPurchaseMaterialList") + @ResponseBody + public TableDataInfo getPurchaseMaterialList() + { + startPage(); + List erpMaterialVos = erpMaterialService.selectAllErpMaterialList(); + return getDataTable(erpMaterialVos); + } + + + /** * 修改开发修改单 */ diff --git a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html index a7884351..0713e8d2 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html +++ b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html @@ -26,8 +26,8 @@
-
-
@@ -191,18 +203,33 @@ console.log(uniqueId); var iframeWin = window[layero.find('iframe')[0]['name']]; var rowData = iframeWin.$('#bootstrap-developModifyMaterialSelect-table').bootstrapTable('getSelections')[0]; + + //判断是否重复 + var rows = $("#bootstrap-table-developModify").bootstrapTable('getData').length; + + if (rows > 0){ + $.modal.alertError("每次只能修改一条物料!"); + return; + } + // for(var i=0;i
'); + $detail.html('
'); + // BOM展示 + $('#'+childTableId).bootstrapTable({ + // url: ctx + "system/makeorderbom/list", + method: 'post', + sidePagination: "server", + contentType: "application/x-www-form-urlencoded", + // queryParams : { + // makeNo: $("#makeNo").val(), + // salesOrderCode: $("#saleNo").val(), + // salesOrderMaterialNo: parentRow.materialCode + // }, + columns: [{ + field: 'id', + title: '主键id', + visible: false + }, + { + field: 'level', + title: '阶层', + formatter: function(value, row, index) { + return $.table.selectDictLabel(levelDatas, value); + } + }, + { + field: 'bomNo', + title: 'BOM号', + formatter:function (value,row,index){ + if (value == null || value == ''){ + return '/'; + }else{ + return value + } + } + }, + { + field: 'materialNo', + title: '料号', + formatter: function (value,row,index){ + var curIndex = row.sortNo-1; + return ''; + } + }, + { + field: 'photoUrl', + title: '图片', + formatter: function(value, row, index) { + return $.table.imageView(value); + } + }, + { + field: 'materialName', + title: '物料名称', + formatter: function (value,row,index){ + if (value == null || value == ''){ + return '/'; + }else{ + return value + } + } + }, + { + field: 'materialType', + title: '物料类型', + formatter: function(value, row, index) { + return $.table.selectCategoryLabel(materialTypeDatas, value); + } + }, + { + field: 'describe', + title: '描述', + formatter: function (value,row,index){ + if (value == null || value == ''){ + return '/'; + }else{ + return value + } + } + }, + { + field: 'brand', + title: '品牌', + formatter: function (value,row,index){ + if (value == null || value == ''){ + return '/'; + }else{ + return value + } + } + }, + { + field: 'unit', + title: '单位', + formatter: function (value,row,index){ + if (value == null || value == ''){ + return '/'; + }else{ + return value + } + } + }, + + { + field: 'processMethod', + title: '半成品类型', + formatter: function(value, row, index) { + return $.table.selectDictLabel(processMethodDatas, value); + } + }, + { + field: 'useNum', + title: '用量', + formatter: function (value,row,index){ + if (value == null || value == ''){ + return '/'; + }else{ + return value + } + } + }, + { + field: 'lossRate', + title: '损耗率', + }, + { + field: 'materialNum', + title: '订单用量', + formatter: function (value,row,index){ + return parentRow.materialNum * row.useNum; + } + }, + { + field: 'hasPickNum', + title: '已领料数量', + }, + { + field: 'pickNum', + title: '本次领料数量', + formatter: function (value,row,index){ + var curIndex = row.sortNo-1; + return ''; + } + }, + { + field: 'makeNo', + title: '生产订单号', + visible: false, + }, + { + field: 'salesOrderCode', + title: '销售订单号', + visible: false, + }, + { + field: 'salesOrderMaterialNo', + title: '销售订单料号', + visible: false, + }, + { + field: 'sortNo', + title: '排序', + visible: false + }], + // 当所有数据被加载时触发 + onLoadSuccess: function(data) { + + }, + }); + }; + + function purchaseDoSubmit(index, layero,uniqueId){ + console.log(uniqueId); + var iframeWin = window[layero.find('iframe')[0]['name']]; + var rowData = iframeWin.$('#bootstrap-purchaseMaterialSelect-table').bootstrapTable('getSelections')[0]; + + //判断是否重复 + var rows = $("#bootstrap-table-purchase").bootstrapTable('getData').length; + + if (rows > 0){ + $.modal.alertError("每次只能修改一条物料!"); + return; + } + // for(var i=0;i \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrderMaterialSelect.html b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrderMaterialSelect.html index c9a1c4fa..23587017 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrderMaterialSelect.html +++ b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrderMaterialSelect.html @@ -32,11 +32,11 @@ }, { title: '料号', - field: 'materialNo', + field: 'materialCode', }, { title: '图片', - field: 'materialPhotourl', + field: 'photoUrl', }, { title: '物料名称', @@ -48,15 +48,19 @@ }, { title: '描述', - field: 'materialDescribe', + field: 'describe', }, { title: '品牌', - field: 'materialBrand', + field: 'brand', }, { title: '单位', - field: 'materialUnit', + field: 'unit', + }, + { + title: '加工方式', + field: 'processMethod', }, ] }; diff --git a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/purchaseOrderMaterialSelect.html b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/purchaseOrderMaterialSelect.html new file mode 100644 index 00000000..89ecd1b4 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/purchaseOrderMaterialSelect.html @@ -0,0 +1,68 @@ + + + + + + +
+
+
+
+
+
+
+ + + + \ No newline at end of file