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