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.
451 lines
20 KiB
451 lines
20 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">
|
|
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
|
</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-productquotation-add">
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label is-required">报价编码:</label>
|
|
<div class="col-sm-8">
|
|
<input name="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="finishProductCode" class="form-control m-b" required>
|
|
<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="finishProductName" 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" 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" 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="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="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}"></option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">单价:</label>
|
|
<div class="col-sm-8">
|
|
<input name="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">
|
|
<input name="customerNumber" 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="enterpriseCode" class="form-control" type="text" readonly>
|
|
|
|
<!-- <select name="enterpriseCode" 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="enterpriseName" class="form-control m-b">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- </select>-->
|
|
<input name="enterpriseName" 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="registrant" 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="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">
|
|
<input name="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="priceExcludingTax" 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="priceIncludingTax" 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="lastPrice" class="form-control" type="text">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">上次价格2:</label>
|
|
<div class="col-sm-8">
|
|
<input name="lastPriceEnd" class="form-control" type="text">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">当前材料成本RMB:</label>
|
|
<div class="col-sm-8">
|
|
<input name="costRmb" 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="currentExchangeRate" 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="proportionMaterials" 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"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">是否为当前报价:</label>
|
|
<div class="col-sm-8">
|
|
<select name="currentQuote" 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="confirmTax" 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 type="hidden" name="fileUpload">
|
|
<div class="file-loading">
|
|
<input class="form-control file-upload" id="fileUpload" name="file" type="file">
|
|
</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="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}"></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" 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" 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}"></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" 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" 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}"></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" 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" 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" 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 :: select2-js"/>
|
|
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
|
<th:block th:include="include :: datetimepicker-js" />
|
|
<script th:inline="javascript">
|
|
var prefix = ctx + "system/productquotation"
|
|
$("#form-productquotation-add").validate({
|
|
focusCleanup: true
|
|
});
|
|
|
|
function submitHandler() {
|
|
if ($.validate.form()) {
|
|
$.operate.save(prefix + "/add", $('#form-productquotation-add').serialize());
|
|
}
|
|
}
|
|
$(".file-upload").fileinput({
|
|
uploadUrl: prefix + '/upload',
|
|
maxFileCount: 1,
|
|
autoReplace: true,
|
|
overwriteInitial: false,
|
|
initialPreviewAsData: true,
|
|
}).on('fileuploaded', function (event, data, previewId, index) {
|
|
// console.log(event.currentTarget.id)
|
|
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
|
|
}).on('fileremoved', function (event, id, index) {
|
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
|
})
|
|
|
|
$("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
|
|
});
|
|
|
|
// 自动获取当前时间
|
|
$("input[name='pricingDate']").datetimepicker("setDate",new Date());
|
|
|
|
//获取单号
|
|
$.ajax({
|
|
url: prefix + "/getId",
|
|
type: "post",
|
|
dateType: "json",
|
|
success: function (resp) {
|
|
if (resp.code === 0) {
|
|
$("input[name='quotationCode']").val(resp.data);
|
|
} else {
|
|
$.modal.msgError("失败啦");
|
|
}
|
|
},
|
|
error: function () {
|
|
$.modal.msgError("后台出错啦!");
|
|
}
|
|
});
|
|
// 确认
|
|
$("select[name='confirmNo']").change(function (){
|
|
console.log($(this).val())
|
|
if($(this).val()==1){
|
|
$("input[name='confirmTime']").datetimepicker("setDate",new Date());
|
|
|
|
}
|
|
else {
|
|
$("input[name='confirmTime']").val('')
|
|
}
|
|
})
|
|
// 审核
|
|
$("select[name='auditNo']").change(function (){
|
|
console.log($(this).val())
|
|
if($(this).val()==1){
|
|
$("input[name='auditTime']").datetimepicker("setDate",new Date());
|
|
|
|
}
|
|
else {
|
|
$("input[name='auditTime']").val('')
|
|
}
|
|
})
|
|
// 核准
|
|
$("select[name='approveNo']").change(function (){
|
|
console.log($(this).val())
|
|
if($(this).val()==1){
|
|
$("input[name='approveTime']").datetimepicker("setDate",new Date());
|
|
|
|
}
|
|
else {
|
|
$("input[name='approveTime']").val('')
|
|
}
|
|
})
|
|
|
|
// 获取成品信息
|
|
|
|
$.ajax({
|
|
url: ctx + "system/finishproduct/finishList",
|
|
type: "POST",
|
|
success: function (res) {
|
|
console.log(res)
|
|
if (res.length > 0) {
|
|
finishProductdata = res;
|
|
//alert(JSON.stringify(data));
|
|
for (let i in finishProductdata) {
|
|
$("select[name='finishProductCode']").append("<option value='" + finishProductdata[i].finishProductCode + "'>" + finishProductdata[i].finishProductCode + "</option>");
|
|
// $("select[name='enterpriseCode']").append("<option value='" + finishProductdata[i].enterpriseCode + "'>" + finishProductdata[i].enterpriseCode + "</option>");
|
|
// $("select[name='enterpriseName']").append("<option value='" + finishProductdata[i].enterpriseName + "'>" + finishProductdata[i].enterpriseName + "</option>");
|
|
|
|
}
|
|
|
|
} else {
|
|
$.modal.msgError(res.msg);
|
|
}
|
|
},
|
|
error: function () {
|
|
$.modal.msgError("后台出错啦!");
|
|
|
|
}
|
|
|
|
})
|
|
// 成品改变
|
|
$("select[name='finishProductCode']").change(function () {
|
|
|
|
var finishProductCode = $(this).val();
|
|
|
|
for (i = 0; i < finishProductdata.length; i++) {
|
|
if (finishProductdata[i].finishProductCode === finishProductCode) {
|
|
$("input[name='finishProductName']").val(finishProductdata[i].finishProductName)
|
|
$("input[name='specificationModel']").val(finishProductdata[i].specificationModel)
|
|
$("input[name='typeMachine']").val(finishProductdata[i].typeMachine)
|
|
$("select[name='inventoryUnit']").val(finishProductdata[i].inventoryUnit).trigger("change")
|
|
$("input[name='customerNumber']").val(finishProductdata[i].customerNumber)
|
|
$("input[name='enterpriseCode']").val(finishProductdata[i].enterpriseCode)
|
|
$("input[name='enterpriseName']").val(finishProductdata[i].enterpriseName)
|
|
|
|
}
|
|
}
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|