You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
389 lines
18 KiB
389 lines
18 KiB
2 years ago
|
<!DOCTYPE html>
|
||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||
|
<head>
|
||
|
<th:block th:include="include :: header('修改辅料资料')" />
|
||
|
<th:block th:include="include :: datetimepicker-css" />
|
||
|
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
|
||
|
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
|
||
|
</head>
|
||
|
<body class="white-bg">
|
||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||
|
<form class="form-horizontal m" id="form-subsidiarymaterial-edit" th:object="${sysSubsidiaryMaterial}">
|
||
|
<input name="subsidiaryMaterialId" th:field="*{subsidiaryMaterialId}" type="hidden">
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label is-required">辅料代码:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="subsidiaryMaterialCode" th:field="*{subsidiaryMaterialCode}" class="form-control" type="text" required>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label is-required">辅料名称:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="subsidiaryMaterialName" th:field="*{subsidiaryMaterialName}" class="form-control" type="text" required>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">辅料类别:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="subsidiaryMaterialCategory" class="form-control m-b" th:with="type=${@dict.getType('sys_subsidiary_material_category')}">
|
||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{subsidiaryMaterialCategory}"></option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">默认仓库:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="defaultWarehouse" class="form-control m-b">
|
||
|
<option value="">请选择默认仓库</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">库存单位:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="inventoryUnit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}">
|
||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{inventoryUnit}"></option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">规格型号:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="specificationModel" th:field="*{specificationModel}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">库位:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="warehouseLocation" th:field="*{warehouseLocation}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">单位重量:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="stockUnitWeight" th:field="*{stockUnitWeight}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">海关HS号:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="hsNumber" th:field="*{hsNumber}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">内外销:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="exportSales" class="form-control m-b" th:with="type=${@dict.getType('sys_export_sales')}">
|
||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{exportSales}"></option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">机种:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="typeMachine" th:field="*{typeMachine}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">限额领用数:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="limitCollectionAmount" th:field="*{limitCollectionAmount}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">供应商料号:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="supplierNumber" th:field="*{supplierNumber}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">供应商代码:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="supplierCode" class="form-control m-b">
|
||
|
<option value="">请选择供应商代码</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">供应商名称:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="supplierName" class="form-control m-b">
|
||
|
<option value="">请选择供应商</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">是否专用:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="dedicatedWhether" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
|
||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{dedicatedWhether}"></option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">海关名称:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="customsName" th:field="*{customsName}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">安全库存:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="safetyStock" th:field="*{safetyStock}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">专用部门或人:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="specialUse" th:field="*{specialUse}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">采购价格:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="purchasePrice" th:field="*{purchasePrice}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">采购提前期:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="purchaseLeadTime" th:field="*{purchaseLeadTime}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">最小批量:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="minimumBatchSize" th:field="*{minimumBatchSize}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">限额领用否:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="limitWhether" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}">
|
||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{limitWhether}"></option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">最大采购量:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="maximumPurchaseQuantity" th:field="*{maximumPurchaseQuantity}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">成本价:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="costPrice" th:field="*{costPrice}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">主供应商:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="primarySupplier" class="form-control m-b">
|
||
|
<option value="">请选择主供应商</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">次供应商:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="subSupplier" class="form-control m-b">
|
||
|
<option value="">请选择次供应商</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">最高库存:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="maximumInventory" th:field="*{maximumInventory}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">滞留天数:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="detentionDays" th:field="*{detentionDays}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">GP项选择:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="gpItemSelection" class="form-control m-b" th:with="type=${@dict.getType('sys_gp_Item_selection')}">
|
||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{gpItemSelection}"></option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">备注说明:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<textarea name="remarks" class="form-control">[[*{remarks}]]</textarea>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">料号是否停用:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
|
||
|
<input type="radio" th:id="${'whetherStop_' + dict.dictCode}" name="whetherStop" th:value="${dict.dictValue}" th:field="*{whetherStop}">
|
||
|
<label th:for="${'whetherStop_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">创建人:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="createrName" th:field="*{createrName}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">类别:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="materialCategory" class="form-control m-b" th:with="type=${@dict.getType('sys_material_category')}">
|
||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{materialCategory}"></option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">科恩仕料号:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="kesNumber" th:field="*{kesNumber}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<!-- <div class="form-group"> -->
|
||
|
<!-- <label class="col-sm-3 control-label">备用一:</label>-->
|
||
|
<!-- <div class="col-sm-8">-->
|
||
|
<!-- <input name="standbyOne" th:field="*{standbyOne}" class="form-control" type="text">-->
|
||
|
<!-- </div>-->
|
||
|
<!-- </div>-->
|
||
|
<!-- <div class="form-group"> -->
|
||
|
<!-- <label class="col-sm-3 control-label">备用二:</label>-->
|
||
|
<!-- <div class="col-sm-8">-->
|
||
|
<!-- <input name="standbyTwo" th:field="*{standbyTwo}" class="form-control" type="text">-->
|
||
|
<!-- </div>-->
|
||
|
<!-- </div>-->
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">创建时间:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<div class="input-group date">
|
||
|
<input name="createrTime" th:value="*{createrTime}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
<th:block th:include="include :: footer" />
|
||
|
<th:block th:include="include :: select2-js"/>
|
||
|
|
||
|
<th:block th:include="include :: datetimepicker-js" />
|
||
|
<script th:inline="javascript">
|
||
|
var getData = [[${sysSubsidiaryMaterial}]];
|
||
|
var supplierdata=[]
|
||
|
var prefix = ctx + "system/subsidiarymaterial";
|
||
|
$("#form-subsidiarymaterial-edit").validate({
|
||
|
focusCleanup: true
|
||
|
});
|
||
|
|
||
|
function submitHandler() {
|
||
|
if ($.validate.form()) {
|
||
|
$.operate.save(prefix + "/edit", $('#form-subsidiarymaterial-edit').serialize());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$("input[name='createrTime']").datetimepicker({
|
||
|
format: "yyyy-mm-dd",
|
||
|
minView: "month",
|
||
|
autoclose: true
|
||
|
});
|
||
|
|
||
|
|
||
|
// 供应商信息
|
||
|
|
||
|
$.ajax({
|
||
|
url: ctx + "system/supplier/list",
|
||
|
type: "POST",
|
||
|
success: function (res) {
|
||
|
// console.log(res)
|
||
|
if (res.rows.length > 0) {
|
||
|
supplierdata = res.rows;
|
||
|
//alert(JSON.stringify(data));
|
||
|
console.log(res.rows)
|
||
|
for (let i in supplierdata) {
|
||
|
$("select[name='supplierCode']").append("<option value='" + supplierdata[i].supplierCode + "'>" + supplierdata[i].supplierCode + "</option>");
|
||
|
|
||
|
$("select[name='supplierName']").append("<option value='" + supplierdata[i].supplierName + "'>" + supplierdata[i].supplierName + "</option>");
|
||
|
$("select[name='primarySupplier']").append("<option value='" + supplierdata[i].supplierName + "'>" + supplierdata[i].supplierName + "</option>");
|
||
|
$("select[name='subSupplier']").append("<option value='" + supplierdata[i].supplierName + "'>" + supplierdata[i].supplierName + "</option>");
|
||
|
|
||
|
}
|
||
|
$("select[name='supplierCode']").val(getData.supplierCode).trigger("change")
|
||
|
$("select[name='supplierName']").val(getData.supplierName).trigger("change")
|
||
|
$("select[name='primarySupplier']").val(getData.primarySupplier).trigger("change")
|
||
|
$("select[name='subSupplier']").val(getData.subSupplier).trigger("change")
|
||
|
|
||
|
} else {
|
||
|
$.modal.msgError(res.msg);
|
||
|
}
|
||
|
},
|
||
|
error: function () {
|
||
|
$.modal.msgError("后台出错啦!");
|
||
|
|
||
|
}
|
||
|
|
||
|
})
|
||
|
|
||
|
// 根据供应商代码改变
|
||
|
$("select[name='supplierCode']").change(function () {
|
||
|
|
||
|
var supplierCode = $(this).val();
|
||
|
|
||
|
for (i = 0; i < supplierdata.length; i++) {
|
||
|
if (supplierdata[i].supplierCode == supplierCode) {
|
||
|
|
||
|
$("select[name='supplierName']").val(supplierdata[i].supplierName).trigger("change")
|
||
|
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
|
||
|
//仓库信息
|
||
|
|
||
|
$.ajax({
|
||
|
url: ctx + "stock/stockInfo/list",
|
||
|
type: "POST",
|
||
|
success: function (res) {
|
||
|
// console.log(res)
|
||
|
if (res.rows.length > 0) {
|
||
|
stockInfodata = res.rows;
|
||
|
//alert(JSON.stringify(data));
|
||
|
console.log(res.rows)
|
||
|
for (let i in stockInfodata) {
|
||
|
$("select[name='defaultWarehouse']").append("<option value='" + stockInfodata[i].stockname + "'>" + stockInfodata[i].stockname + "</option>");
|
||
|
|
||
|
}
|
||
|
$("select[name='defaultWarehouse']").val(getData.defaultWarehouse).trigger("change")
|
||
|
|
||
|
|
||
|
|
||
|
} else {
|
||
|
$.modal.msgError(res.msg);
|
||
|
}
|
||
|
},
|
||
|
error: function () {
|
||
|
$.modal.msgError("后台出错啦!");
|
||
|
|
||
|
}
|
||
|
|
||
|
})
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|