Browse Source

[update]物料信息列表,增加物料,选择加工类型委为外加工选择时,需要额外选择委外工序。

dev
zhangsiqi 8 months ago
parent
commit
9def70df03
  1. 2
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java
  2. 12
      ruoyi-admin/src/main/resources/templates/erp/material/add.html

2
ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java

@ -205,7 +205,7 @@ public class ErpMaterialController extends BaseController
/**
* 自动绑定页面字段
*/
@ModelAttribute("preloadObj")
@ModelAttribute("/preloadObj")
public ErpMaterialVo getObj(@RequestParam(value = "id", required = false) Long id, HttpSession session) {
if (id != null) {
return erpMaterialService.selectErpMaterialById(id);

12
ruoyi-admin/src/main/resources/templates/erp/material/add.html

@ -75,6 +75,13 @@
<select name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}" required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
<div id="weiwai" hidden>
<label class="col-sm-3 control-label">委外工序:</label>
<div class="col-sm-8">
<a class="btn btn-primary" onclick="insertRowWai()">添加委外工序</a>
</div>
<table class="bootstrap-table-sub-2"></table>
</div>
</div>
</div>
<div class="form-group">
@ -253,6 +260,11 @@
}
function insertRowWai() {
var html = '<tr><td><input type="text" name="weiwai" class="form-control" required></td><td><a class="btn btn-danger" onclick="removeRowWai(this)">删除</a></td></tr>';
$(".bootstrap-table-sub-2").append(html);
}
</script>
</body>

Loading…
Cancel
Save