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.
454 lines
21 KiB
454 lines
21 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" style="padding-bottom: 150px">
|
|
<form class="form-horizontal m" id="form-outsourceOffer-add">
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label is-required">报价编号:</label>
|
|
<div class="col-sm-8">
|
|
<input name="id" 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">
|
|
<input name="itemCode" 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">
|
|
<input name="itemName" class="form-control" type="text" required readonly>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">规格型号:</label>
|
|
<div class="col-sm-8">
|
|
<input name="itemSpecification" 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="machineType" 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="unit" 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">
|
|
<select name="coinType" class="form-control m-b" required
|
|
th:with="type=${@dict.getType('sys_coin_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 is-required">报价单价:</label>
|
|
<div class="col-sm-8">
|
|
<input name="price" 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">
|
|
<select name="appointNo" class="form-control m-b" required disabled>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label is-required">加工商名称:</label>
|
|
<div class="col-sm-8">
|
|
<select name="appointName" class="form-control m-b" required>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label is-required">报价日期:</label>
|
|
<div class="col-sm-8">
|
|
<div class="input-group date">
|
|
<input name="pricingDate" class="form-control time-input" placeholder="yyyy-MM-dd" type="text"
|
|
required disabled>
|
|
<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="remark" 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="isNowPrice" class="form-control m-b">
|
|
<option value="0">否</option>
|
|
<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="comfirmFlag" 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">-->
|
|
<!-- <select name="auditingFlag" 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">-->
|
|
<!-- <select name="approveFlag" 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="comfirmMan" 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="auditingMan" 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="approveMan" 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="comfirmDate" 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">-->
|
|
<!-- <div class="input-group date">-->
|
|
<!-- <input name="auditingDate" 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">-->
|
|
<!-- <div class="input-group date">-->
|
|
<!-- <input name="approveDate" 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 is-required">登记人:</label>
|
|
<div class="col-sm-8">
|
|
<input name="writeMan" 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="tax" class="form-control m-b" required
|
|
th:with="type=${@dict.getType('fin_customer_taxPercent')}">
|
|
<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 name="processNo" 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="processName" class="form-control m-b" required
|
|
th:with="type=${@dict.getType('process_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="spare1" 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="spare2" 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="spare3" 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="spare4" 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="spare5" 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="spare6" class="form-control" type="text">-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
</form>
|
|
|
|
<div class="modal inmodal" id="cpModal" tabindex="-1"
|
|
role="dilog" aria-hidden="true">
|
|
<div class="modal-dialog" style="width: 800px;height: 600px;">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal"
|
|
aria-hidden="true"></button>
|
|
<h4 class="modal-title">选择物料</h4>
|
|
</div>
|
|
<div class="modal-body" style="text-align: center;">
|
|
<div class="row" style="margin-bottom: 20px;">
|
|
<div class="col-md-5">
|
|
<form id="formId">
|
|
<div class="form-group">
|
|
<label class="control-label col-md-4">物料代码:</label>
|
|
<div class="col-md-8">
|
|
<input type="text" class="form-control"
|
|
id="wlCode" name="wlCode">
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<button type="button" class="btn btn-success" id="wlCodeSearch">搜索</button>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="table-responsive">
|
|
<table id="wlTable"
|
|
class="table table-striped table-responsive">
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-primary"
|
|
onClick="selectWl();">选择
|
|
</button>
|
|
<button type="button" class="btn btn-default" data-dismiss="modal" name="close">关闭</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<th:block th:include="include :: footer"/>
|
|
<th:block th:include="include :: datetimepicker-js"/>
|
|
<script th:src="@{/ajax/libs/select2/select2.js}"></script>
|
|
<script th:inline="javascript">
|
|
var prefix = ctx + "produce/outsourceOffer"
|
|
$("#form-outsourceOffer-add").validate({
|
|
focusCleanup: true
|
|
});
|
|
|
|
function submitHandler() {
|
|
if ($.validate.form()) {
|
|
$.operate.save(prefix + "/add", $('#form-outsourceOffer-add').serialize());
|
|
}
|
|
}
|
|
|
|
let today = new Date();
|
|
today.setTime(today.getTime());
|
|
let time = today.getFullYear() + "-" + (today.getMonth() + 1) + "-" + today.getDate();
|
|
$("input[name='pricingDate']").val(time);
|
|
|
|
//获取单号
|
|
$.ajax({
|
|
url: prefix + "/id",
|
|
type: "post",
|
|
dateType: "json",
|
|
success: function (resp) {
|
|
if (resp.code === 0) {
|
|
$("input[name='id']").val(resp.data);
|
|
} else {
|
|
$.modal.msgError("失败啦");
|
|
}
|
|
},
|
|
error: function () {
|
|
$.modal.msgError("失败啦");
|
|
}
|
|
});
|
|
|
|
//获取供应商
|
|
$.ajax({
|
|
url: ctx + "ProviderPrice/ProviderPrice/all",
|
|
type: "post",
|
|
resultType: "json",
|
|
success: function (resp) {
|
|
if (resp.data.length > 0) {
|
|
let data = resp.data;
|
|
for (let i in data) {
|
|
//alert(data[i].pCode);
|
|
$("select[name='appointNo']").append("<option value='" + data[i].pCode + "'>" + data[i].pCode + "</option>");
|
|
$("select[name='appointName']").append("<option value='" + data[i].pName + "'>" + data[i].pName + "</option>");
|
|
}
|
|
}
|
|
},
|
|
error: function () {
|
|
$.modal.msgError("出错了!");
|
|
}
|
|
});
|
|
|
|
//选择供应商时自动填入信息
|
|
$("select[name='appointName']").change(function () {
|
|
let pName = $(this).val();
|
|
$.ajax({
|
|
url: ctx + "ProviderPrice/ProviderPrice/findOne",
|
|
data: {"pName": pName},
|
|
type: "post",
|
|
resultType: "json",
|
|
success: function (resp) {
|
|
$("select[name='appointNo']").val(resp.data.pCode).trigger("change");
|
|
},
|
|
error: function () {
|
|
$.modal.msgError("出错了!");
|
|
}
|
|
})
|
|
});
|
|
|
|
let userName = [[${@permission.getPrincipalProperty('userName')}]];
|
|
$("input[name='writeMan']").val(userName);
|
|
|
|
$('#wlTable').bootstrapTable({
|
|
url: '/ProviderPrice/ProviderPrice/itemInfo',
|
|
pagination: true,
|
|
pageNumber: 1,
|
|
pageSize: 10,
|
|
pageList: [10, 25, 50, 100],
|
|
showRefresh: true,
|
|
method: "post",
|
|
contentType: "application/x-www-form-urlencoded",
|
|
striped: true, // 是否显示行间隔色
|
|
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
|
|
sidePagination: "server", // 分页方式:client客户端分页,server服务端分页(*)
|
|
clickToSelect: true, // 是否启用点击选中行
|
|
showToggle: false, // 是否显示详细视图和列表视图的切换按钮
|
|
cardView: false, // 是否显示详细视图
|
|
detailView: false, // 是否显示父子表
|
|
smartDisplay: false, // 加了这个才显示每页显示的行数
|
|
showExport: false, // 是否显示导出按钮
|
|
singleSelect: true,
|
|
height: 400,
|
|
queryParams: function (params) {
|
|
//console.log("123");
|
|
var curParams = {
|
|
// 传递参数查询参数
|
|
pageSize: params.limit,
|
|
pageNum: params.offset / params.limit + 1,
|
|
searchValue: params.search,
|
|
orderByColumn: params.sort,
|
|
isAsc: params.order
|
|
};
|
|
//console.log(curParams);
|
|
var json = $.extend(curParams, $.common.formToJSON("formId"));
|
|
//console.log(json);
|
|
return json;
|
|
},
|
|
columns: [
|
|
{
|
|
checkbox: true
|
|
}, {
|
|
field: 'wlCode',
|
|
title: '物料代码'
|
|
}, {
|
|
field: 'itemname',
|
|
title: '物料名称'
|
|
}, {
|
|
field: 'itemstandard',
|
|
title: '规格型号'
|
|
}, {
|
|
field: 'machineNo',
|
|
title: '机号'
|
|
}, {
|
|
field: 'stockDw',
|
|
title: '库存单位'
|
|
}]
|
|
});
|
|
|
|
$("#wlCodeSearch").on("click", function () {
|
|
$("#wlTable").bootstrapTable('refresh');
|
|
$("#wlCode").val("");
|
|
})
|
|
|
|
function selectWl() {
|
|
let row = $("#wlTable").bootstrapTable("getSelections");
|
|
//console.log(row);
|
|
$("#cpModal").hide();
|
|
$("input[name='itemCode']").val(row[0].wlCode);
|
|
$("input[name='itemName']").val(row[0].itemname);
|
|
$("input[name='itemSpecification']").val(row[0].itemstandard);
|
|
$("input[name='machineType']").val(row[0].machineNo);
|
|
$("input[name='unit']").val(row[0].stockDw);
|
|
|
|
}
|
|
|
|
$("button[name='close']").on("click", function () {
|
|
$("#cpModal").hide();
|
|
});
|
|
|
|
$("input[name='itemCode']").on("click", function () {
|
|
$("#cpModal").show();
|
|
});
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|