diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpMaterial.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpMaterial.java index 9c23a9d1..06b8f218 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpMaterial.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpMaterial.java @@ -57,7 +57,7 @@ public class ErpMaterial extends BaseEntity @Excel(name = "物料类型名称",sort = 5) private String materialTypeName; - /** 加工方式 */ + /** 加工方式(0采购、1生产加工、2委外加工、3生产装配、4委外加工或采购) */ @Excel(name = "加工方式",sort = 9,dictType = "processMethod") private String processMethod; diff --git a/ruoyi-admin/src/main/resources/templates/erp/material/add.html b/ruoyi-admin/src/main/resources/templates/erp/material/add.html index 624b9e16..fb8ea3ec 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/material/add.html +++ b/ruoyi-admin/src/main/resources/templates/erp/material/add.html @@ -228,6 +228,8 @@ engineer(); $("#add-process-text").hide(); $("#add-process").hide(); + + //监听物料的料号开头的数字,加工方式和物料类型进行绑定 $("#materialNo").on('input', function (event) { var value = $(this).val(); reloadSelections(); @@ -244,18 +246,28 @@ $processMethodSelect.find('option[value="1"]').remove(); $processMethodSelect.find('option[value="2"]').remove(); $processMethodSelect.find('option[value="3"]').remove(); + $processMethodSelect.find('option[value="4"]').remove(); break; case '2': materialType = 'bzjgj'; $processMethodSelect.find('option[value="1"]').remove(); $processMethodSelect.find('option[value="2"]').remove(); $processMethodSelect.find('option[value="3"]').remove(); + $processMethodSelect.find('option[value="4"]').remove(); break; case '3': materialType = 'scy'; + $processMethodSelect.find('option[value="1"]').remove(); + $processMethodSelect.find('option[value="2"]').remove(); + $processMethodSelect.find('option[value="3"]').remove(); + $processMethodSelect.find('option[value="4"]').remove(); break; case '4': materialType = 'fscy'; + $processMethodSelect.find('option[value="1"]').remove(); + $processMethodSelect.find('option[value="2"]').remove(); + $processMethodSelect.find('option[value="3"]').remove(); + $processMethodSelect.find('option[value="4"]').remove(); break; case '5': materialType = 'dbmcljgj'; @@ -269,12 +281,20 @@ break; case '7': materialType = 'zhj'; + $processMethodSelect.find('option[value="0"]').remove(); + $processMethodSelect.find('option[value="2"]').remove(); + $processMethodSelect.find('option[value="4"]').remove(); break; case '8': materialType = 'chcpsb'; + $processMethodSelect.find('option[value="0"]').remove(); + $processMethodSelect.find('option[value="2"]').remove(); + $processMethodSelect.find('option[value="3"]').remove(); + $processMethodSelect.find('option[value="4"]').remove(); break; case '9': materialType = 'qtyflswl'; + $processMethodSelect.find('option[value="4"]').remove(); break; default: materialType = ''; // 默认情况下不设置