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.
413 lines
21 KiB
413 lines
21 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="outsourceOrderNo"/>
|
|
</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="batchNumber"/>-->
|
|
<!-- </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 m-b">
|
|
<option value="">所有</option>
|
|
</select>
|
|
</li>
|
|
<li class="select-time">
|
|
<label>开单日期:</label>
|
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间"
|
|
name="params[beginCreateDate]"/>
|
|
<span>-</span>
|
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间"
|
|
name="params[endCreateDate]"/>
|
|
</li>
|
|
<!-- <li class="select-time">-->
|
|
<!-- <label>交货日期:</label>-->
|
|
<!-- <input type="text" class="time-input" id="startTime" placeholder="开始时间"-->
|
|
<!-- name="params[beginSendDate]"/>-->
|
|
<!-- <span>-</span>-->
|
|
<!-- <input type="text" class="time-input" id="endTime" placeholder="结束时间"-->
|
|
<!-- name="params[endSendDate]"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>加工工序编号:</label>-->
|
|
<!-- <select name="processNo">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
|
<!-- </select>-->
|
|
<!-- </li>-->
|
|
<li>
|
|
<label>加工名称:</label>
|
|
<select name="processName" class="form-control m-b"
|
|
th:with="type=${@dict.getType('process_class')}">
|
|
<option value="">所有</option>
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
|
th:value="${dict.dictValue}"></option>
|
|
</select>
|
|
</li>
|
|
<!-- <li>-->
|
|
<!-- <label>联系人:</label>-->
|
|
<!-- <input type="text" name="linkman"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>传真号码:</label>-->
|
|
<!-- <input type="text" name="faxNumber"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>厂商地址:</label>-->
|
|
<!-- <input type="text" name="address"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>厂商电话:</label>-->
|
|
<!-- <input type="text" name="phoneNum"/>-->
|
|
<!-- </li>-->
|
|
<li>
|
|
<label>结案否:</label>
|
|
<select name="endFlag" class="form-control m-b">
|
|
<option value="">所有</option>
|
|
<option value="1">已结案</option>
|
|
<option value="0">未结案</option>
|
|
</select>
|
|
</li>
|
|
<!-- <li>-->
|
|
<!-- <label>发出仓库编号:</label>-->
|
|
<!-- <select name="sendStockNo">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
|
<!-- </select>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>发出仓库名称:</label>-->
|
|
<!-- <select name="sendStockName">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
|
<!-- </select>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>交货仓库编号:</label>-->
|
|
<!-- <select name="deliveryStockNo">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
|
<!-- </select>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>交货仓库名称:</label>-->
|
|
<!-- <select name="deliveryStockName">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
|
<!-- </select>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>承运公司:</label>-->
|
|
<!-- <input type="text" name="carrierCompany"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>确认否:</label>-->
|
|
<!-- <select name="confirmFlag">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
|
<!-- </select>-->
|
|
<!-- </li>-->
|
|
<!-- <li>-->
|
|
<!-- <label>确认人:</label>-->
|
|
<!-- <input type="text" name="confirmMan"/>-->
|
|
<!-- </li>-->
|
|
<!-- <li class="select-time">-->
|
|
<!-- <label>确认日期:</label>-->
|
|
<!-- <input type="text" class="time-input" id="startTime" placeholder="开始时间"-->
|
|
<!-- name="params[beginConfirmDate]"/>-->
|
|
<!-- <span>-</span>-->
|
|
<!-- <input type="text" class="time-input" id="endTime" placeholder="结束时间"-->
|
|
<!-- name="params[endConfirmDate]"/>-->
|
|
<!-- </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:outSourceOrderHead:add">
|
|
<i class="fa fa-plus"></i> 添加
|
|
</a>
|
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
|
|
shiro:hasPermission="produce:outSourceOrderHead:edit">
|
|
<i class="fa fa-edit"></i> 修改
|
|
</a>
|
|
<a class="btn btn-danger multiple disabled" onclick=""
|
|
shiro:hasPermission="produce:outSourceOrderHead:remove" disabled>
|
|
<i class="fa fa-remove"></i> 删除
|
|
</a>
|
|
<a class="btn btn-warning" onclick="$.table.exportExcel()"
|
|
shiro:hasPermission="produce:outSourceOrderHead:export">
|
|
<i class="fa fa-download"></i> 导出
|
|
</a>
|
|
<a class="btn btn-primary single disabled" onclick="confirm()"
|
|
shiro:hasPermission="produce:outSourceOrderHead:edit">
|
|
<i class="fa fa-edit"></i> 确认
|
|
</a>
|
|
<a class="btn btn-primary single disabled" onclick="end()"
|
|
shiro:hasPermission="produce:outSourceOrderHead:edit">
|
|
<i class="fa fa-edit"></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:outSourceOrderHead:edit')}]];
|
|
var removeFlag = [[${@permission.hasPermi('produce:outSourceOrderHead:remove')}]];
|
|
var prefix = ctx + "produce/outSourceOrderHead";
|
|
|
|
$(function () {
|
|
var options = {
|
|
url: prefix + "/getList",
|
|
createUrl: prefix + "/add",
|
|
updateUrl: prefix + "/edit/{id}",
|
|
removeUrl: prefix + "/remove",
|
|
exportUrl: prefix + "/export",
|
|
modalName: "委外加工单",
|
|
columns: [{
|
|
checkbox: true
|
|
},
|
|
{
|
|
field: 'outsourceOrderNo',
|
|
title: '委外加工单号'
|
|
},
|
|
{
|
|
field: 'productionOrder',
|
|
title: '生产指令'
|
|
},
|
|
{
|
|
field: 'appointName',
|
|
title: '厂商名称'
|
|
},
|
|
{
|
|
field: 'createDate',
|
|
title: '开单日期'
|
|
},
|
|
{
|
|
field: 'sendDate',
|
|
title: '交货日期'
|
|
},
|
|
{
|
|
field: 'processName',
|
|
title: '加工工序名称'
|
|
},
|
|
{
|
|
field: 'linkman',
|
|
title: '联系人'
|
|
},
|
|
{
|
|
field: 'endFlag',
|
|
title: '结案否'
|
|
},
|
|
{
|
|
field: 'itemCode',
|
|
title: '物料代码'
|
|
}, {
|
|
field: 'itemName',
|
|
title: '物料名称'
|
|
}, {
|
|
field: 'itemSpecification',
|
|
title: '规格型号'
|
|
}, {
|
|
field: 'unit',
|
|
title: '单位'
|
|
}, {
|
|
field: 'qty',
|
|
title: '数量'
|
|
},
|
|
{
|
|
field: 'price',
|
|
title: '单价'
|
|
},
|
|
{
|
|
field: 'totalPrice',
|
|
title: '总价'
|
|
},
|
|
{
|
|
field: 'finishedQty',
|
|
title: '已完成数量'
|
|
},
|
|
{
|
|
field: 'unfinishedQty',
|
|
title: '未完成数量'
|
|
},
|
|
{
|
|
field: 'processingCharges',
|
|
title: '加工费'
|
|
},
|
|
{
|
|
field: 'finishedDate',
|
|
title: '完工日期'
|
|
},
|
|
{
|
|
field: 'remark',
|
|
title: '备注'
|
|
},
|
|
{
|
|
field: 'confirmFlag',
|
|
title: '确认否',
|
|
visible: false
|
|
},
|
|
{
|
|
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.outsourceOrderNo + '\')"><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.outsourceOrderNo + '\')"><i class="fa fa-remove"></i>删除</a>');
|
|
return actions.join('');
|
|
}
|
|
}]
|
|
};
|
|
$.table.init(options);
|
|
});
|
|
|
|
//获取供应商代码和名称
|
|
$.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 reset() {
|
|
$("select[name='appointName']").val("").select2();
|
|
$("select[name='endFlag']").val("").select2();
|
|
$("select[name='processName']").val("").select2();
|
|
$.form.reset();
|
|
}
|
|
|
|
function confirm() {
|
|
let row = $("#bootstrap-table").bootstrapTable("getSelections");
|
|
if (row[0].confirmFlag === "1") {
|
|
$.modal.msgError("已确认,无法再次确认!");
|
|
return false;
|
|
}
|
|
$.modal.confirm("是否确定确认?", function () {
|
|
$.ajax({
|
|
url: prefix+"/confirm",
|
|
type: "post",
|
|
dataType: "json",
|
|
data: {"outsourceOrderNo": row[0].outsourceOrderNo},
|
|
success: function (resp) {
|
|
if (resp.code === 0) {
|
|
//$.modal.msgSuccess("更新成功!");
|
|
alert("确认成功!");
|
|
window.location.reload();
|
|
} else {
|
|
$.modal.msgError(resp.msg);
|
|
}
|
|
},
|
|
error: function () {
|
|
$.modal.msgError("后台出错啦!");
|
|
}
|
|
})
|
|
});
|
|
}
|
|
|
|
function end() {
|
|
let row = $("#bootstrap-table").bootstrapTable("getSelections");
|
|
if (row[0].endFlag === "1") {
|
|
$.modal.msgError("已结案,无法再次结案!");
|
|
return false;
|
|
}
|
|
$.modal.confirm("是否确定结案?", function () {
|
|
$.ajax({
|
|
url: prefix+"/end",
|
|
type: "post",
|
|
dataType: "json",
|
|
data: {"outsourceOrderNo": row[0].outsourceOrderNo},
|
|
success: function (resp) {
|
|
if (resp.code === 0) {
|
|
//$.modal.msgSuccess("更新成功!");
|
|
alert("结案成功!");
|
|
window.location.reload();
|
|
} else {
|
|
$.modal.msgError(resp.msg);
|
|
}
|
|
},
|
|
error: function () {
|
|
$.modal.msgError("后台出错啦!");
|
|
}
|
|
})
|
|
});
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|