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.
341 lines
15 KiB
341 lines
15 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-finishproduct-add">
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">客户料号:</label>
|
|
<div class="col-sm-8">
|
|
<input name="customerNumber" 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="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}"></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}"></option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label is-required">客户代码:</label>
|
|
<div class="col-sm-8" >
|
|
<select id="enterpriseCode" name="enterpriseCode" class="form-control m-b" required>
|
|
<option value="">请选择客户代码</option>
|
|
</select>
|
|
<!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>-->
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label is-required">客户名称:</label>
|
|
<div class="col-sm-8">
|
|
<!-- <select id="enterpriseName" name="enterpriseName" class="form-control m-b" required>-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- </select>-->
|
|
<input name="enterpriseName" class="form-control" type="text" readonly 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 is-required">成品代码:</label>
|
|
<div class="col-sm-8">
|
|
<input name="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" 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" 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">
|
|
<input name="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="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"></textarea>
|
|
</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="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" 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="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}"></option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">厂内编码:</label>
|
|
<div class="col-sm-8">
|
|
<input name="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: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">
|
|
<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">
|
|
<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}"></option>
|
|
</select>
|
|
</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>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">半成品对应完工工序号:</label>
|
|
<div class="col-sm-8">
|
|
<input name="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="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="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" 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>
|
|
<!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>-->
|
|
</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>-->
|
|
</form>
|
|
</div>
|
|
<th:block th:include="include :: footer" />
|
|
<th:block th:include="include :: datetimepicker-js" />
|
|
<th:block th:include="include :: select2-js"/>
|
|
<script th:inline="javascript">
|
|
var prefix = ctx + "system/finishproduct"
|
|
$("#form-finishproduct-add").validate({
|
|
focusCleanup: true
|
|
});
|
|
|
|
function submitHandler() {
|
|
if ($.validate.form()) {
|
|
$.operate.save(prefix + "/add", $('#form-finishproduct-add').serialize());
|
|
}
|
|
}
|
|
|
|
$("input[name='createrTime']").datetimepicker({
|
|
format: "yyyy-mm-dd",
|
|
minView: "month",
|
|
autoclose: true
|
|
});
|
|
|
|
//客户信息
|
|
var customerodata = []
|
|
$.ajax({
|
|
url: ctx + "system/customer/list",
|
|
type: "POST",
|
|
success: function (res) {
|
|
// console.log(res)
|
|
if (res.rows.length > 0) {
|
|
customerodata = res.rows;
|
|
//alert(JSON.stringify(data));
|
|
console.log(res.rows)
|
|
for (let i in customerodata) {
|
|
$("select[name='enterpriseCode']").append("<option value='" + customerodata[i].enterpriseCode + "'>" + customerodata[i].enterpriseCode + "</option>");
|
|
// $("select[name='enterpriseName']").append("<option value='" + customerodata[i].enterpriseName + "'>" + customerodata[i].enterpriseName + "</option>");
|
|
}
|
|
} else {
|
|
$.modal.msgError(res.msg);
|
|
}
|
|
},
|
|
error: function () {
|
|
$.modal.msgError("后台出错啦!");
|
|
|
|
}
|
|
|
|
})
|
|
|
|
$("select[name='enterpriseCode']").change(function () {
|
|
var enterpriseCode = $(this).val();
|
|
for (i = 0; i < customerodata.length; i++) {
|
|
if (customerodata[i].enterpriseCode === enterpriseCode) {
|
|
$("input[name='enterpriseName']").val(customerodata[i].enterpriseName)
|
|
}
|
|
}
|
|
})
|
|
|
|
|
|
//仓库信息
|
|
$.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>
|