|
|
@ -69,7 +69,7 @@ |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-3 control-label is-required">入库部门:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<select name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}" required> |
|
|
|
<select id="selectWarehouseDept" name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}" required> |
|
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|
|
|
</select> |
|
|
|
</div> |
|
|
@ -77,7 +77,7 @@ |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-3 control-label is-required">工程员:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<input name="businessMembers" id="businessMembers_add" class="form-control m-b" disabled required /> |
|
|
|
<input name="businessMembers" id="businessMembers_add" class="form-control m-b" readonly required /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group"> |
|
|
@ -164,27 +164,10 @@ |
|
|
|
//获取工程员 |
|
|
|
$(function(){ |
|
|
|
$("#businessMembers_add").val(loginName); |
|
|
|
$("#businessMembers_add").text(userName); |
|
|
|
supplierName(); |
|
|
|
engineer(); |
|
|
|
$("#add-weiwai").hide(); |
|
|
|
}) |
|
|
|
//获取供应商 |
|
|
|
function supplierName(){ |
|
|
|
$.ajax({ |
|
|
|
url: ctx + 'system/supplier/getSupplier', |
|
|
|
type: 'post', |
|
|
|
success: function (res) { |
|
|
|
if (res.rows.length > 0) { |
|
|
|
var usertData = res.rows; |
|
|
|
for (let i in usertData) { |
|
|
|
$("#form-material-add select[name='supplierName']").append( |
|
|
|
"<option value='" + usertData[i].supplierName + "'>" + usertData[i].supplierName + "</option>"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
function engineer(){ |
|
|
|
$.ajax({ |
|
|
|
url: ctx + 'erp/material/getEngineerList', |
|
|
@ -194,7 +177,7 @@ |
|
|
|
var usertData = res.rows; |
|
|
|
for (let i in usertData) { |
|
|
|
$("select[name='businessMembers']").append( |
|
|
|
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>"); |
|
|
|
"<option value='" + usertData[i].loginName + "'>" + usertData[i].userName + "</option>"); |
|
|
|
} |
|
|
|
} else { |
|
|
|
$.modal.msgError(res.msg); |
|
|
@ -255,6 +238,10 @@ |
|
|
|
|
|
|
|
function submitHandler() { |
|
|
|
if ($.validate.form()) { |
|
|
|
$("#selectMaterialType").removeAttr("disabled"); |
|
|
|
$("#selectProcessMethod").removeAttr("disabled"); |
|
|
|
$("#selectUnit").removeAttr("disabled"); |
|
|
|
$("#selectWarehouseDept").removeAttr("disabled"); |
|
|
|
var materialType = $('#selectMaterialType').select2('val'); |
|
|
|
$('#materialType').val(materialType); |
|
|
|
$.operate.save(prefix + "/add", $('#form-material-add').serialize()); |
|
|
|