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.
419 lines
19 KiB
419 lines
19 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>
|
|
<style>
|
|
.division {
|
|
width: 100%;
|
|
border-bottom: 1px solid #f1ecec;
|
|
padding: 10px 0 0;
|
|
margin-bottom: 30px;
|
|
}
|
|
.changeWidth{
|
|
width: 33% !important;
|
|
}
|
|
.col-sm-3 {
|
|
width: 26%;
|
|
}
|
|
</style>
|
|
<body class="white-bg">
|
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
|
<form class="form-horizontal m" id="form-qutsourcingquotation-edit" th:object="${sysQutsourcingQuotation}">
|
|
<input name="qutsourcingQuotationId" th:field="*{qutsourcingQuotationId}" type="hidden">
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label is-required">报价编码:</label>
|
|
<div class="col-sm-8">
|
|
<input name="quotationCode" th:field="*{quotationCode}" class="form-control" type="text" required readonly>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label is-required">物料代码:</label>
|
|
<div class="col-sm-8">
|
|
<!-- <select name="materialCode" class="form-control m-b">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- </select>-->
|
|
<input name="materialCode" th:field="*{materialCode}" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label is-required">物料名称:</label>
|
|
<div class="col-sm-8">
|
|
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly>
|
|
</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" readonly>
|
|
</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" readonly>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">计量单位:</label>
|
|
<div class="col-sm-8">
|
|
<select name="measurementUnit" 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="*{measurementUnit}"></option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">报价币别:</label>
|
|
<div class="col-sm-8">
|
|
<select name="commonCurrency" class="form-control m-b" th:with="type=${@dict.getType('sys_common_currency')}">
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{commonCurrency}"></option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">加工单价:</label>
|
|
<div class="col-sm-8">
|
|
<input name="processPrice" th:field="*{processPrice}" 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="processingProcedureName" class="form-control m-b">
|
|
<option value="-1">请输入加工工序名称</option>
|
|
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">加工工序编号:</label>
|
|
<div class="col-sm-8">
|
|
<select name="processingProcedureCode" class="form-control m-b">
|
|
<option value="-1">请选择加工工序编号</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="converterCode" class="form-control m-b" required>
|
|
<option value="-1">请选择加工商编号</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="converterName" class="form-control m-b" required>
|
|
<option value="-1">请选择加工商名称</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="pricingDate" th:value="*{pricingDate}" 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">
|
|
<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="taxRate" th:field="*{taxRate}" 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="relationalFormula" th:field="*{relationalFormula}" 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="quotationExplain" class="form-control">[[*{quotationExplain}]]</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="${'currentQuote_' + dict.dictCode}" name="currentQuote" th:value="${dict.dictValue}" th:field="*{currentQuote}">
|
|
<label th:for="${'currentQuote_' + 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="registrant" th:field="*{registrant}" class="form-control" type="text">
|
|
</div>
|
|
</div>
|
|
<!--
|
|
<div class="division">
|
|
<h4>确认</h4>
|
|
</div>
|
|
<div class="form-group changeWidth">
|
|
<label class="col-sm-3 control-label">确认否:</label>
|
|
<div class="col-sm-8">
|
|
<select name="confirmNo" 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="*{confirmNo}"></option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group changeWidth">
|
|
<label class="col-sm-3 control-label">确认人:</label>
|
|
<div class="col-sm-8">
|
|
<input name="confirmName" th:field="*{confirmName}" class="form-control" type="text">
|
|
</div>
|
|
</div>
|
|
<div class="form-group changeWidth">
|
|
<label class="col-sm-3 control-label">确认时间:</label>
|
|
<div class="col-sm-8">
|
|
<div class="input-group date">
|
|
<input name="confirmTime" th:value="*{confirmTime}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="division">
|
|
<h4>审核</h4>
|
|
</div>
|
|
<div class="form-group changeWidth">
|
|
<label class="col-sm-3 control-label">审核否:</label>
|
|
<div class="col-sm-8">
|
|
<select name="auditNo" 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="*{auditNo}"></option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group changeWidth">
|
|
<label class="col-sm-3 control-label">审核人:</label>
|
|
<div class="col-sm-8">
|
|
<input name="auditName" th:field="*{auditName}" class="form-control" type="text">
|
|
</div>
|
|
</div>
|
|
<div class="form-group changeWidth">
|
|
<label class="col-sm-3 control-label">审核时间:</label>
|
|
<div class="col-sm-8">
|
|
<div class="input-group date">
|
|
<input name="auditTime" th:value="*{auditTime}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="division">
|
|
<h4>核准</h4>
|
|
</div>
|
|
|
|
<div class="form-group changeWidth">
|
|
<label class="col-sm-3 control-label">核准否:</label>
|
|
<div class="col-sm-8">
|
|
<select name="approveNo" 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="*{approveNo}"></option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group changeWidth">
|
|
<label class="col-sm-3 control-label">核准人:</label>
|
|
<div class="col-sm-8">
|
|
<input name="approveName" th:field="*{approveName}" class="form-control" type="text">
|
|
</div>
|
|
</div>
|
|
<div class="form-group changeWidth">
|
|
<label class="col-sm-3 control-label">核准时间:</label>
|
|
<div class="col-sm-8">
|
|
<div class="input-group date">
|
|
<input name="approveTime" th:value="*{approveTime}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" 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="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 = [[${sysQutsourcingQuotation}]];
|
|
console.log(getData.processingProcedureCode)
|
|
var prefix = ctx + "system/qutsourcingquotation";
|
|
var supplierdata=[]
|
|
var proceduredata=[]
|
|
$("#form-qutsourcingquotation-edit").validate({
|
|
focusCleanup: true
|
|
});
|
|
|
|
function submitHandler() {
|
|
if ($.validate.form()) {
|
|
$.operate.save(prefix + "/edit", $('#form-qutsourcingquotation-edit').serialize());
|
|
}
|
|
}
|
|
$("input[name='pricingDate']").datetimepicker({
|
|
format: "yyyy-mm-dd",
|
|
minView: "month",
|
|
autoclose: true
|
|
});
|
|
|
|
$("input[name='confirmTime']").datetimepicker({
|
|
format: 'yyyy-mm-dd hh:ii:ss',
|
|
autoclose: true,
|
|
minView: 0,
|
|
minuteStep:1
|
|
});
|
|
|
|
$("input[name='auditTime']").datetimepicker({
|
|
format: 'yyyy-mm-dd hh:ii:ss',
|
|
autoclose: true,
|
|
minView: 0,
|
|
minuteStep:1
|
|
});
|
|
|
|
$("input[name='approveTime']").datetimepicker({
|
|
format: 'yyyy-mm-dd hh:ii:ss',
|
|
autoclose: true,
|
|
minView: 0,
|
|
minuteStep:1
|
|
});
|
|
|
|
// 厂商编号
|
|
$.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='converterCode']").append("<option value='" + supplierdata[i].supplierCode + "'>" + supplierdata[i].supplierCode + "</option>");
|
|
$("select[name='converterName']").append("<option value='" + supplierdata[i].supplierName + "'>" + supplierdata[i].supplierName + "</option>");
|
|
|
|
}
|
|
$("select[name='converterCode']").val(getData.converterCode).trigger("change")
|
|
$("select[name='converterName']").val(getData.converterName).trigger("change")
|
|
} else {
|
|
$.modal.msgError(res.msg);
|
|
}
|
|
},
|
|
error: function () {
|
|
$.modal.msgError("后台出错啦!");
|
|
|
|
}
|
|
|
|
})
|
|
|
|
$("select[name='converterCode']").change(function () {
|
|
|
|
var converterCode = $(this).val();
|
|
|
|
for (i = 0; i < supplierdata.length; i++) {
|
|
if (supplierdata[i].supplierCode == converterCode) {
|
|
|
|
$("select[name='converterName']").val(supplierdata[i].supplierName).trigger("change")
|
|
|
|
}
|
|
}
|
|
})
|
|
// $("select[name='converterName']").change(function () {
|
|
//
|
|
// var converterName = $(this).val();
|
|
//
|
|
// for (i = 0; i < supplierdata.length; i++) {
|
|
// if (supplierdata[i].converterName == converterName) {
|
|
//
|
|
// $("select[name='converterCode']").val(supplierdata[i].supplierCode).trigger("change")
|
|
//
|
|
// }
|
|
// }
|
|
// })
|
|
|
|
// 加工工序
|
|
|
|
$.ajax({
|
|
url: ctx + "system/procedure/list",
|
|
type: "POST",
|
|
success: function (res) {
|
|
console.log(res)
|
|
if (res.rows.length > 0) {
|
|
proceduredata = res.rows;
|
|
//alert(JSON.stringify(data));
|
|
// console.log(res.rows)
|
|
for (let i in proceduredata) {
|
|
$("select[name='processingProcedureCode']").append("<option value='" + proceduredata[i].procedureCode + "'>" + proceduredata[i].procedureCode + "</option>");
|
|
$("select[name='processingProcedureName']").append("<option value='" + proceduredata[i].procedureName + "'>" + proceduredata[i].procedureName + "</option>");
|
|
|
|
}
|
|
|
|
$("select[name='processingProcedureCode']").val(getData.processingProcedureCode).trigger("change")
|
|
$("select[name='processingProcedureName']").val(getData.processingProcedureName).trigger("change")
|
|
|
|
} else {
|
|
$.modal.msgError(res.msg);
|
|
}
|
|
},
|
|
error: function () {
|
|
$.modal.msgError("后台出错啦!");
|
|
|
|
}
|
|
|
|
})
|
|
//
|
|
// $("select[name='processingProcedureName']").change(function () {
|
|
//
|
|
// var processingProcedureName = $(this).val();
|
|
//
|
|
// for (i = 0; i < proceduredata.length; i++) {
|
|
// if (proceduredata[i].procedureName == processingProcedureName) {
|
|
//
|
|
// $("select[name='processingProcedureCode']").val(proceduredata[i].procedureCode).trigger("change")
|
|
//
|
|
// }
|
|
// }
|
|
// })
|
|
|
|
|
|
$("select[name='processingProcedureCode']").change(function () {
|
|
|
|
var processingProcedureCode = $(this).val();
|
|
|
|
for (i = 0; i < proceduredata.length; i++) {
|
|
if (proceduredata[i].procedureCode == processingProcedureCode) {
|
|
|
|
$("select[name='processingProcedureName']").val(proceduredata[i].procedureName).trigger("change")
|
|
|
|
}
|
|
}
|
|
})
|
|
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|