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.
596 lines
29 KiB
596 lines
29 KiB
<!DOCTYPE html>
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
|
<head>
|
|
<th:block th:include="include :: header('委外报价列表')"/>
|
|
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
|
|
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
|
|
</head>
|
|
<body class="gray-bg">
|
|
<div class="container-div">
|
|
<div class="row">
|
|
<div class="col-sm-12 search-collapse">
|
|
<form id="formId">
|
|
<div class="select-list">
|
|
<ul>
|
|
<li>
|
|
<label>报价编号:</label>
|
|
<input type="text" name="id"/>
|
|
</li>
|
|
<li>
|
|
<label>物料代码:</label>
|
|
<input type="text" name="itemCode"/>
|
|
</li>
|
|
<li>
|
|
<label>物料名称:</label>
|
|
<input type="text" name="itemName"/>
|
|
</li>
|
|
<!-- <li>-->
|
|
<!-- <label>规格型号:</label>-->
|
|
<!-- <input type="text" name="itemSpecification"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>机种:</label>-->
|
|
<!-- <select name="machineType">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
|
<!-- </select>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>单位:</label>-->
|
|
<!-- <input type="text" name="unit"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>币别:</label>-->
|
|
<!-- <select name="coinType">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
|
<!-- </select>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>报价单价:</label>-->
|
|
<!-- <input type="text" name="price"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>加工商编号:</label>-->
|
|
<!-- <select name="appointNo">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
|
<!-- </select>-->
|
|
<!-- </li>-->
|
|
<li>
|
|
<label>厂商名称:</label>
|
|
<select name="appointName" class="form-control">
|
|
<option value="">所有</option>
|
|
</select>
|
|
</li>
|
|
<!-- <li class="select-time">-->
|
|
<!-- <label>报价日期:</label>-->
|
|
<!-- <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginPricingDate]"/>-->
|
|
<!-- <span>-</span>-->
|
|
<!-- <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endPricingDate]"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>备注:</label>-->
|
|
<!-- <input type="text" name="remark"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>是否现价:</label>-->
|
|
<!-- <select name="isNowPrice">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
|
<!-- </select>-->
|
|
<!-- </li>-->
|
|
<li>
|
|
<label>是否确认:</label>
|
|
<select name="comfirmFlag" class="form-control">
|
|
<option value="">所有</option>
|
|
<option value="1">已确认</option>
|
|
<option value="0">未确认</option>
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label>是否审核:</label>
|
|
<select name="auditingFlag" class="form-control">
|
|
<option value="">所有</option>
|
|
<option value="1">已审核</option>
|
|
<option value="0">未审核</option>
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label>是否核准:</label>
|
|
<select name="approveFlag" class="form-control">
|
|
<option value="">所有</option>
|
|
<option value="1">已核准</option>
|
|
<option value="0">未核准</option>
|
|
</select>
|
|
</li>
|
|
<!-- <li>-->
|
|
<!-- <label>确认人:</label>-->
|
|
<!-- <input type="text" name="comfirmMan"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>审核人:</label>-->
|
|
<!-- <input type="text" name="auditingMan"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>核准人:</label>-->
|
|
<!-- <input type="text" name="approveMan"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li class="select-time">-->
|
|
<!-- <label>确认时间:</label>-->
|
|
<!-- <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginComfirmDate]"/>-->
|
|
<!-- <span>-</span>-->
|
|
<!-- <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endComfirmDate]"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li class="select-time">-->
|
|
<!-- <label>审核时间:</label>-->
|
|
<!-- <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginAuditingDate]"/>-->
|
|
<!-- <span>-</span>-->
|
|
<!-- <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endAuditingDate]"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li class="select-time">-->
|
|
<!-- <label>核准时间:</label>-->
|
|
<!-- <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginApproveDate]"/>-->
|
|
<!-- <span>-</span>-->
|
|
<!-- <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endApproveDate]"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>登记人:</label>-->
|
|
<!-- <input type="text" name="writeMan"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>税率:</label>-->
|
|
<!-- <select name="tax">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
|
<!-- </select>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>加工工序编号:</label>-->
|
|
<!-- <select name="processNo">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
|
<!-- </select>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>加工工序名称:</label>-->
|
|
<!-- <select name="processName">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
|
<!-- </select>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>:</label>-->
|
|
<!-- <input type="text" name="spare1"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>:</label>-->
|
|
<!-- <input type="text" name="spare2"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>:</label>-->
|
|
<!-- <input type="text" name="spare3"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>:</label>-->
|
|
<!-- <input type="text" name="spare4"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>:</label>-->
|
|
<!-- <input type="text" name="spare5"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>:</label>-->
|
|
<!-- <input type="text" name="spare6"/>-->
|
|
<!-- </li>-->
|
|
<li>
|
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
|
class="fa fa-search"></i> 搜索</a>
|
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="reset()"><i
|
|
class="fa fa-refresh"></i> 重置</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="btn-group-sm" id="toolbar" role="group">
|
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="produce:outsourceOffer:add">
|
|
<i class="fa fa-plus"></i> 添加
|
|
</a>
|
|
<a class="btn btn-primary single disabled" onclick="edit()"
|
|
shiro:hasPermission="produce:outsourceOffer:edit">
|
|
<i class="fa fa-edit"></i> 修改
|
|
</a>
|
|
<a class="btn btn-danger multiple disabled" onclick=""
|
|
shiro:hasPermission="produce:outsourceOffer:remove" disabled>
|
|
<i class="fa fa-remove"></i> 删除
|
|
</a>
|
|
<a class="btn btn-warning" onclick="$.table.exportExcel()"
|
|
shiro:hasPermission="produce:outsourceOffer:export">
|
|
<i class="fa fa-download"></i> 导出
|
|
</a>
|
|
</div>
|
|
<div class="col-sm-12 select-table table-striped">
|
|
<table id="bootstrap-table"></table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<th:block th:include="include :: footer"/>
|
|
<script th:src="@{/ajax/libs/select2/select2.js}"></script>
|
|
<script th:inline="javascript">
|
|
var editFlag = [[${@permission.hasPermi('produce:outsourceOffer:edit')}]];
|
|
var removeFlag = [[${@permission.hasPermi('produce:outsourceOffer:remove')}]];
|
|
var prefix = ctx + "produce/outsourceOffer";
|
|
|
|
//鼠标移入,显示完整的数据
|
|
function paramsMatter(value, row, index) {
|
|
var span = document.createElement("span");
|
|
span.setAttribute("title", value);
|
|
span.innerHTML = value;
|
|
return span.outerHTML;
|
|
}
|
|
|
|
//获取供应商代码和名称
|
|
$.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='appointName']").append("<option value='" + data[i].pName + "'>" + data[i].pName + "</option>");
|
|
}
|
|
}
|
|
},
|
|
error: function () {
|
|
$.modal.msgError("出错了!");
|
|
}
|
|
});
|
|
|
|
$(function () {
|
|
var options = {
|
|
url: prefix + "/list",
|
|
createUrl: prefix + "/add",
|
|
updateUrl: prefix + "/edit/{id}",
|
|
removeUrl: prefix + "/remove",
|
|
exportUrl: prefix + "/export",
|
|
modalName: "委外报价",
|
|
columns: [{
|
|
checkbox: true
|
|
},
|
|
{
|
|
field: 'id',
|
|
title: '报价编号',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "130px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "150px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'itemCode',
|
|
title: '物料代码',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "130px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "150px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'itemName',
|
|
title: '物料名称',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "130px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "150px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'itemSpecification',
|
|
title: '规格型号',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "130px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "150px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'machineType',
|
|
title: '机种',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "130px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "150px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'unit',
|
|
title: '单位'
|
|
},
|
|
{
|
|
field: 'coinType',
|
|
title: '币别'
|
|
},
|
|
{
|
|
field: 'price',
|
|
title: '报价单价'
|
|
},
|
|
{
|
|
field: 'appointNo',
|
|
title: '加工商编号'
|
|
},
|
|
{
|
|
field: 'appointName',
|
|
title: '加工商名称',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "130px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "150px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'pricingDate',
|
|
title: '报价日期',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "130px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "150px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'remark',
|
|
title: '备注'
|
|
},
|
|
{
|
|
field: 'isNowPrice',
|
|
title: '是否现价',
|
|
formatter: function (val) {
|
|
if (val === "1") {
|
|
return "是现价"
|
|
} else if (val === "0") {
|
|
return "不是现价"
|
|
}
|
|
},
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "130px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "150px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
field: 'comfirmFlag',
|
|
title: '是否确认',
|
|
formatter: function (val) {
|
|
if (val === "1") {
|
|
return "已确认"
|
|
} else if (val === "0") {
|
|
return "未确认"
|
|
}
|
|
},
|
|
},
|
|
{
|
|
field: 'auditingFlag',
|
|
title: '是否审核',
|
|
formatter: function (val) {
|
|
if (val === "1") {
|
|
return "已审核"
|
|
} else if (val === "0") {
|
|
return "未审核"
|
|
}
|
|
},
|
|
},
|
|
{
|
|
field: 'approveFlag',
|
|
title: '是否核准',
|
|
formatter: function (val) {
|
|
if (val === "1") {
|
|
return "已核准"
|
|
} else if (val === "0") {
|
|
return "未核准"
|
|
}
|
|
},
|
|
},
|
|
{
|
|
field: 'comfirmMan',
|
|
title: '确认人'
|
|
},
|
|
{
|
|
field: 'auditingMan',
|
|
title: '审核人'
|
|
},
|
|
{
|
|
field: 'approveMan',
|
|
title: '核准人'
|
|
},
|
|
{
|
|
field: 'comfirmDate',
|
|
title: '确认时间',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "130px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "150px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'auditingDate',
|
|
title: '审核时间',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "130px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "150px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'approveDate',
|
|
title: '核准时间',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "130px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "150px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'writeMan',
|
|
title: '登记人'
|
|
},
|
|
{
|
|
field: 'tax',
|
|
title: '税率'
|
|
},
|
|
{
|
|
field: 'processNo',
|
|
title: '加工工序编号',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'processName',
|
|
title: '加工工序名称',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "130px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "150px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
// {
|
|
// field: 'spare1',
|
|
// title: ''
|
|
// },
|
|
// {
|
|
// field: 'spare2',
|
|
// title: ''
|
|
// },
|
|
// {
|
|
// field: 'spare3',
|
|
// title: ''
|
|
// },
|
|
// {
|
|
// field: 'spare4',
|
|
// title: ''
|
|
// },
|
|
// {
|
|
// field: 'spare5',
|
|
// title: ''
|
|
// },
|
|
// {
|
|
// field: 'spare6',
|
|
// title: ''
|
|
// },
|
|
{
|
|
title: '操作',
|
|
align: 'center',
|
|
formatter: function (value, row, index) {
|
|
var actions = [];
|
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
|
return actions.join('');
|
|
}
|
|
}]
|
|
};
|
|
$.table.init(options);
|
|
});
|
|
|
|
function reset() {
|
|
$("select[name='appointName']").val("").select2();
|
|
$("select[name='comfirmFlag']").val("").select2();
|
|
$("select[name='auditingFlag']").val("").select2();
|
|
$("select[name='approveFlag']").val("").select2();
|
|
$.form.reset();
|
|
}
|
|
|
|
function edit() {
|
|
let row = $("#bootstrap-table").bootstrapTable("getSelections");
|
|
if (row[0].approveFlag === "1") {
|
|
$.modal.msgError("核准过后不得修改!");
|
|
return false;
|
|
}
|
|
$.operate.edit();
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|