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.
383 lines
17 KiB
383 lines
17 KiB
<!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-add">
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label is-required">辅料代码:</label>
|
|
<div class="col-sm-8">
|
|
<input name="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" 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">
|
|
<input name="specificationModel" 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" 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}"></option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">单位重量:</label>
|
|
<div class="col-sm-8">
|
|
<input name="stockUnitWeight" 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="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}"></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="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}"></option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">限额领用数:</label>
|
|
<div class="col-sm-8">
|
|
<input name="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="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="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="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 id="supplierCode" 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 id="supplierName" 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}"></option>
|
|
</select>
|
|
</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}"></option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">海关名称:</label>
|
|
<div class="col-sm-8">
|
|
<input name="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" 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" 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" 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" 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="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" 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 id="primarySupplier" 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 id="subSupplier" 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" 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" 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" 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}"></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"></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:checked="${dict.default}">
|
|
<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" 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}"></option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">科恩仕料号:</label>
|
|
<div class="col-sm-8">
|
|
<input name="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" 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" 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" 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 supplierdata=[]
|
|
|
|
var prefix = ctx + "system/subsidiarymaterial"
|
|
$("#form-subsidiarymaterial-add").validate({
|
|
focusCleanup: true
|
|
});
|
|
|
|
function submitHandler() {
|
|
if ($.validate.form()) {
|
|
$.operate.save(prefix + "/add", $('#form-subsidiarymaterial-add').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>");
|
|
|
|
}
|
|
|
|
|
|
} 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>");
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
$.modal.msgError(res.msg);
|
|
}
|
|
},
|
|
error: function () {
|
|
$.modal.msgError("后台出错啦!");
|
|
|
|
}
|
|
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|