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.
376 lines
15 KiB
376 lines
15 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 class="select-time">
|
|
<label>入库日期:</label>
|
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间"
|
|
name="params[beginWarehousingRecordDate]"/>
|
|
<span>-</span>
|
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间"
|
|
name="params[endWarehousingRecordDate]"/>
|
|
</li>
|
|
<li>
|
|
<label>入库单号:</label>
|
|
<input type="text" name="warehousingRecordNo"/>
|
|
</li>
|
|
<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="pName"/>-->
|
|
<select name="appointName" class="form-control m-b">
|
|
<option value="">所有</option>
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label>对账否:</label>
|
|
<select name="checkFlag" class="form-control m-b">
|
|
<option value="">所有</option>
|
|
<option value="1">已对账</option>
|
|
<option value="0">未对账</option>
|
|
</select>
|
|
</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="" shiro:hasPermission="buyorderHead:buyOrderList:add" disabled>
|
|
<i class="fa fa-plus"></i> 添加
|
|
</a>
|
|
<a class="btn btn-primary single disabled" onclick=""
|
|
shiro:hasPermission="buyorderHead:buyOrderList:edit" disabled>
|
|
<i class="fa fa-edit"></i> 修改
|
|
</a>
|
|
<a class="btn btn-danger multiple disabled" onclick=""
|
|
shiro:hasPermission="buyorderHead:buyOrderList:remove" disabled>
|
|
<i class="fa fa-remove"></i> 删除
|
|
</a>
|
|
<a class="btn btn-warning" onclick="$.table.exportExcel()"
|
|
shiro:hasPermission="buyorderHead:buyOrderList:export">
|
|
<i class="fa fa-download"></i> 导出
|
|
</a>
|
|
<a class="btn btn-info single disabled" onclick="accountChecking()"
|
|
shiro:hasPermission="produce:outSourceOrderHead:edit">
|
|
<i class="fa fa-info"></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 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) {
|
|
var data = resp.data;
|
|
for (var 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("").trigger("change");
|
|
$("select[name='checkFlag']").val("").trigger("change");
|
|
$.form.reset();
|
|
}
|
|
|
|
$(function () {
|
|
var options = {
|
|
url: prefix + "/checkList",
|
|
createUrl: prefix + "/add",
|
|
updateUrl: prefix + "/edit/{id}",
|
|
removeUrl: prefix + "/remove",
|
|
exportUrl: prefix + "/export",
|
|
modalName: "对账列表",
|
|
columns: [{
|
|
checkbox: true
|
|
},
|
|
{
|
|
field: 'warehousingRecordNo',
|
|
title: '入库记录单号',
|
|
},
|
|
{
|
|
field: 'outsourceOrderNo',
|
|
title: '委外加工单号',
|
|
},
|
|
{
|
|
field: 'processName',
|
|
title: '加工工序名称',
|
|
},
|
|
{
|
|
field: 'warehouseName',
|
|
title: '仓库名称',
|
|
},
|
|
{
|
|
field: 'appointNo',
|
|
title: '厂商编号',
|
|
visible: false
|
|
},
|
|
{
|
|
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: 'warehousingRecordDate',
|
|
title: '入库日期',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "100px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "120px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'itemCode',
|
|
title: '物料代码',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "80px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "100px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'itemName',
|
|
title: '物料名称',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "80px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "100px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'itemSpecification',
|
|
title: '规格型号',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "80px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "100px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'unit',
|
|
title: '单位',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "80px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "100px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'warehousingAmt',
|
|
title: '入库数量',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "80px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "100px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'price',
|
|
title: '单价',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "80px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "100px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'totalPrice',
|
|
title: '总价',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "80px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "100px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
{
|
|
field: 'checkFlag',
|
|
title: '对账',
|
|
formatter: function (val) {
|
|
if (val === "1") {
|
|
return "已对账";
|
|
} else {
|
|
return "未对账";
|
|
}
|
|
},
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "80px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "100px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
field: 'remark',
|
|
title: '备注',
|
|
cellStyle: function (value, row, index) {
|
|
return {
|
|
css: {
|
|
"min-width": "80px",
|
|
"text-overflow": "ellipsis",
|
|
"overflow": "hidden",
|
|
"max-width": "100px",
|
|
"white-space": "nowrap"
|
|
}
|
|
}
|
|
},
|
|
formatter: paramsMatter
|
|
},
|
|
]
|
|
};
|
|
$.table.init(options);
|
|
});
|
|
|
|
//确认对账
|
|
function accountChecking() {
|
|
$.modal.confirm("是否确认对账?", function () {
|
|
let row = $("#bootstrap-table").bootstrapTable("getSelections");
|
|
$.ajax({
|
|
url: ctx + "stock/record/check",
|
|
type: "post",
|
|
dataType: "json",
|
|
data: {"warehousingrecordNo": row[0].warehousingRecordNo},
|
|
success: function (resp) {
|
|
if (resp.code === 0) {
|
|
$.modal.msgSuccess("对账成功!");
|
|
} else {
|
|
$.modal.msgError(resp.msg);
|
|
}
|
|
},
|
|
error: function () {
|
|
$.modal.msgError("后台出错啦!");
|
|
}
|
|
})
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|