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.
355 lines
15 KiB
355 lines
15 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-finishproduct-edit" th:object="${sysFinishProduct}">
|
||
|
<input name="finishProductId" th:field="*{finishProductId}" type="hidden">
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">客户料号:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="customerNumber" th:field="*{customerNumber}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label is-required">客户代码:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="enterpriseCode" class="form-control m-b" required>
|
||
|
<option value="">所有</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label is-required">客户名称:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="enterpriseName" class="form-control m-b" required>
|
||
|
<option value="">所有</option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label is-required">成品代码:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="finishProductCode" th:field="*{finishProductCode}" 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="finishProductName" th:field="*{finishProductName}" 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="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">
|
||
|
<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="versionNumber" th:field="*{versionNumber}" 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="stockUnitWeight" th:field="*{stockUnitWeight}" 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">
|
||
|
<input name="inPlantCode" th:field="*{inPlantCode}" 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="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">
|
||
|
<input name="ordinalName" th:field="*{ordinalName}" 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="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">
|
||
|
<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="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">
|
||
|
<select name="productionCategory" class="form-control m-b"
|
||
|
th:with="type=${@dict.getType('sys_production_category')}">
|
||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
|
||
|
th:field="*{productionCategory}"></option>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">所属类别:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<select name="finishProductCategory" class="form-control m-b"
|
||
|
th:with="type=${@dict.getType('sys_finish_product_category')}">
|
||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
|
||
|
th:field="*{finishProductCategory}"></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="customerEngineer" th:field="*{customerEngineer}" class="form-control" type="text">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">产品描述:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<textarea name="productDescription" class="form-control">[[*{productDescription}]]</textarea>
|
||
|
</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="productPrice" th:field="*{productPrice}" 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="componentName" th:field="*{componentName}" 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>
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-3 control-label">半成品对应完工工序号:</label>
|
||
|
<div class="col-sm-8">
|
||
|
<input name="ordinalNumber" th:field="*{ordinalNumber}" 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="defaultLocation" th:field="*{defaultLocation}" 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="originalNumber" 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="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>-->
|
||
|
</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 = [[${sysFinishProduct}]];
|
||
|
var customerdata = []
|
||
|
var prefix = ctx + "system/finishproduct";
|
||
|
$("#form-finishproduct-edit").validate({
|
||
|
focusCleanup: true
|
||
|
});
|
||
|
|
||
|
function submitHandler() {
|
||
|
if ($.validate.form()) {
|
||
|
$.operate.save(prefix + "/edit", $('#form-finishproduct-edit').serialize());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$("input[name='createrTime']").datetimepicker({
|
||
|
format: "yyyy-mm-dd",
|
||
|
minView: "month",
|
||
|
autoclose: true
|
||
|
});
|
||
|
// 客户信息
|
||
|
$.ajax({
|
||
|
url: ctx + "system/customer/list",
|
||
|
type: "POST",
|
||
|
success: function (res) {
|
||
|
// console.log(res)
|
||
|
if (res.rows.length > 0) {
|
||
|
customerdata = res.rows;
|
||
|
//alert(JSON.stringify(data));
|
||
|
console.log(res.rows)
|
||
|
for (let i in customerdata) {
|
||
|
$("select[name='enterpriseCode']").append("<option value='" + customerdata[i].enterpriseCode + "'>" + customerdata[i].enterpriseCode + "</option>");
|
||
|
$("select[name='enterpriseName']").append("<option value='" + customerdata[i].enterpriseName + "'>" + customerdata[i].enterpriseName + "</option>");
|
||
|
|
||
|
}
|
||
|
$("select[name='enterpriseCode']").val(getData.enterpriseCode).trigger("change")
|
||
|
$("select[name='enterpriseName']").val(getData.enterpriseName).trigger("change")
|
||
|
} else {
|
||
|
$.modal.msgError(res.msg);
|
||
|
}
|
||
|
},
|
||
|
error: function () {
|
||
|
$.modal.msgError("后台出错啦!");
|
||
|
|
||
|
}
|
||
|
|
||
|
})
|
||
|
|
||
|
// 下拉框改变
|
||
|
$("select[name='enterpriseCode']").change(function () {
|
||
|
|
||
|
var enterpriseCode = $(this).val();
|
||
|
|
||
|
for (i = 0; i < customerdata.length; i++) {
|
||
|
if (customerdata[i].enterpriseCode == enterpriseCode) {
|
||
|
|
||
|
$("select[name='enterpriseName']").val(customerdata[i].enterpriseName).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>
|