Browse Source

[fix]:BOM编辑保存字段未保存修复

dev
youjianchi 9 months ago
parent
commit
4f4a313d0c
  1. 43
      ruoyi-admin/src/main/resources/templates/erp/bom/edit.html

43
ruoyi-admin/src/main/resources/templates/erp/bom/edit.html

@ -26,8 +26,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label>
<div class="col-sm-8">
<!-- <input type="text" class="form-control" id="materialType" name="materialType" th:field="*{materialType}" readonly/>-->
<select disabled id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" readonly>
<select disabled id="selectMaterialType" name = "materialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}">
<optgroup>
<option value=""></option>
</optgroup>
@ -41,8 +40,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">加工方式:</label>
<div class="col-sm-8">
<!-- <input type="text" class="form-control" name="materialType" th:field="*{processMethod}" readonly/>-->
<select disabled name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}" readonly>
<select disabled id="selectProcessMethod" name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{processMethod}"></option>
</select>
@ -51,8 +49,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<!-- <input name="unit" th:field="*{unit}" type="text" class="form-control" readonly>-->
<select disabled name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}" readonly>
<select disabled id="selectUnit" name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{unit}"></option>
</select>
@ -71,26 +68,27 @@
<textarea name="describe" class="form-control" readonly>[[*{describe}]]</textarea>
</div>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 新增行
</a>
<a class="btn btn-danger multiple disabled" onclick="removeRow()">
<i class="fa fa-remove"></i> 删除选择行
</a>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-1"></table>
</div>
</div>
</form>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 新增行
</a>
<a class="btn btn-danger multiple disabled" onclick="removeRow()">
<i class="fa fa-remove"></i> 删除选择行
</a>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-1"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<th:block th:include="include :: select2-js" />
<script th:inline="javascript">
var prefix = ctx + "erp/bom";
// var erpBom = [[${erpBom}]];
function selMaterialTb(){
var options = {
title: '物料选择',
@ -136,6 +134,11 @@
}
$(function() {
// $("#selectMaterialType").val([erpBom.materialType]).trigger("change");
// $("#selectProcessMethod").val([erpBom.processMethod]).trigger("change");
// $("#selectUnit").val([erpBom.unit]).trigger("change");
$("#selMaterialNo").select2({
theme: "select2",
allowClear: true,
@ -194,7 +197,7 @@
var options = {
url: prefix + "/subList",
url: prefix + "/oneLevelList",
id: 'bootstrap-sub-table-1',
showSearch: false,
showRefresh: false,

Loading…
Cancel
Save