|
@ -18,19 +18,19 @@ |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
|
<label class="col-sm-3 control-label">部门:</label> |
|
|
<label class="col-sm-3 control-label">部门:</label> |
|
|
<div class="col-sm-8"> |
|
|
<div class="col-sm-8"> |
|
|
<select name="dept" class="form-control"></select> |
|
|
<select name="deptName" class="form-control"></select> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
|
<label class="col-sm-3 control-label">岗位:</label> |
|
|
<label class="col-sm-3 control-label">岗位:</label> |
|
|
<div class="col-sm-8"> |
|
|
<div class="col-sm-8"> |
|
|
<select name="post" class="form-control"></select> |
|
|
<select name="postName" class="form-control"></select> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
|
<label class="col-sm-3 control-label">姓名:</label> |
|
|
<label class="col-sm-3 control-label">姓名:</label> |
|
|
<div class="col-sm-8"> |
|
|
<div class="col-sm-8"> |
|
|
<select name="username" class="form-control"></select> |
|
|
<select name="userName" class="form-control"></select> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
@ -68,6 +68,7 @@ |
|
|
var prefix = ctx + "system/requisitioning"; |
|
|
var prefix = ctx + "system/requisitioning"; |
|
|
$("#form-requisitioning-edit").validate({focusCleanup: true}); |
|
|
$("#form-requisitioning-edit").validate({focusCleanup: true}); |
|
|
$(function() { |
|
|
$(function() { |
|
|
|
|
|
getSelections(); |
|
|
var options = { |
|
|
var options = { |
|
|
id:'bootstrap-sub-table-requisitionChild', |
|
|
id:'bootstrap-sub-table-requisitionChild', |
|
|
url: ctx + "system/requesitioningChild/list", |
|
|
url: ctx + "system/requesitioningChild/list", |
|
@ -108,7 +109,7 @@ |
|
|
return $.table.selectDictLabel(sysUnitClassDatas, value); |
|
|
return $.table.selectDictLabel(sysUnitClassDatas, value); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{title: '加工方式',field: 'processMethod',align: 'center', |
|
|
{title: '半成品类型',field: 'processMethod',align: 'center', |
|
|
formatter: function(value, row, index) { |
|
|
formatter: function(value, row, index) { |
|
|
return $.table.selectDictLabel(processMethodDatas, value); |
|
|
return $.table.selectDictLabel(processMethodDatas, value); |
|
|
} |
|
|
} |
|
@ -183,9 +184,31 @@ |
|
|
} |
|
|
} |
|
|
function submitHandler() { |
|
|
function submitHandler() { |
|
|
if ($.validate.form()) { |
|
|
if ($.validate.form()) { |
|
|
$.operate.save(prefix + "/edit", $('#form-requisitioning-edit').serialize()); |
|
|
var formData = $("#form-requisitioning-edit").serializeArray(); |
|
|
|
|
|
console.log("formData",formData); |
|
|
|
|
|
var tableData = $("#bootstrap-sub-table-requisitionChild").bootstrapTable('getData'); |
|
|
|
|
|
let rows = tableData.length; |
|
|
|
|
|
if(rows==0){ |
|
|
|
|
|
$.modal.msgError("子表数据不能为空!"); |
|
|
|
|
|
}else{ |
|
|
|
|
|
formData.push({"name": "baseRequisitioningOrderChildList", "value": tableData}); |
|
|
|
|
|
var jsonData = $.common.formDataToJson(formData); |
|
|
|
|
|
$.operate.saveJson(prefix + "/edit", jsonData); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
function getSelections(){ |
|
|
|
|
|
$.ajax({ |
|
|
|
|
|
url: ctx + "system/requisitioning/getEmpUserName", |
|
|
|
|
|
type: "get", |
|
|
|
|
|
dataType: "json", |
|
|
|
|
|
success: function (data) { |
|
|
|
|
|
$("select[name='deptName']").append($('<option></option>').val(data.deptName).html(data.deptName)); |
|
|
|
|
|
$("select[name='userName']").append($('<option></option>').val(data.userName).html(data.userName)); |
|
|
|
|
|
$("select[name='postName']").append($('<option></option>').val(data.postName).html(data.postName)); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
</body> |
|
|
</body> |
|
|
</html> |
|
|
</html> |