万材erp项目
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
19 KiB

2 years ago
<!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" style="background-color: #E5E5E5">
<div class="container-div">
<div style="margin-left:-15px ; margin-right: -15px ">
<div class="col-sm-12 search-collapse ">
<h4>入库通知-查询添加功能</h4>
<!-- 此处为页面标题-功能-->
</div>
</div>
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<h4>搜索关键字</h4>
<hr>
<div class="select-list">
<div class="select-list">
<ul>
<li>
<label>通知单号:</label>
<input type="text" name="warehousingnoticeNo"/>
</li>
<!-- <li>-->
<!-- <label>客户号:</label>-->
<!-- <input type="text" name="customerId"/>-->
<!-- </li>-->
<li>
<label>客户名称:</label>
<select name="customerName" class="form-control m-b">
<option value="">所有</option>
</select>
</li>
<li>
<label>入库类型:</label>
<select name="warehousingType"
th:with="type=${@dict.getType('dock_warehousing_purchase_type')}"
class="form-control m-b">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</li>
<li class="select-time">
<label>预入库日:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间"
name="params[beginWarehousingnoticeDate]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间"
name="params[endWarehousingnoticeDate]"/>
</li>
<li>
<label>采购单号:</label>
<input type="text" name="purchaseorderNo"/>
</li>
<li>
<label>制工单号:</label>
<input type="text" name="workorderNo"/>
</li>
<li>
<label>内外销:</label>
<select name="domesticOrExport" th:with="type=${@dict.getType('sys_NWX_class')}"
class="form-control m-b">
<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="warehouseNo"/>-->
<!-- </li>-->
<li>
<label>仓库名称:</label>
<select name="warehouseName" class="form-control m-b">
<option value="">所有</option>
</select>
</li>
<!-- <li>-->
<!-- <label>入库数量:</label>-->
<!-- <input type="text" name="warehousingAmt"/>-->
<!-- </li>-->
<li>
<label>物料代码:</label>
<input type="text" name="itemNo"/>
</li>
<li>
<label>物料名称:</label>
<input type="text" name="itemName"/>
</li>
<!-- <li>-->
<!-- <label>项次:</label>-->
<!-- <input type="text" name="itemTimes"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>规格型号:</label>-->
<!-- <input type="text" name="specificationModel"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>机种:</label>-->
<!-- <input type="text" name="machineType"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>单位:</label>-->
<!-- <input type="text" name="unit"/>-->
<!-- </li>-->
<!-- <li style="display: none">-->
<!-- <label>:</label>-->
<!-- <input type="text" name="spell3"/>-->
<!-- </li>-->
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
class="fa fa-refresh"></i>&nbsp;重置</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="stock:notice:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
shiro:hasPermission="stock:notice:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" disabled onclick=""
shiro:hasPermission="stock:notice:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="stock:notice:export">
<i class="fa fa-download"></i> 导出
</a>
<a class="btn btn-primary single disabled" onclick="changeCheckInfo()"
shiro:hasPermission="stock:notice:edit">
<i class="fa fa-edit"></i> 检验
</a>
</div>
</div>
<div class="col-sm-12 select-table table-striped">
<h4>详细数据</h4>
<hr>
<table id="bootstrap-table" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"></table>
</div>
<div class="col-sm-12" style=" margin-top: 10px"></div>
<!-- <div class="modal inmodal" id="infoModal" tabindex="-1"-->
<!-- role="dilog" aria-hidden="true">-->
<!-- <div class="modal-dialog" style="width: 1000px;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-12" style="margin-bottom: 15px">-->
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">入库通知单号:</label>-->
<!-- <div class="col-sm-9">-->
<!-- <input type="text" name="warehousingnoticeNo" id="warehousingnoticeNo"-->
<!-- class="form-control" readonly>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="col-md-12" style="margin-bottom: 15px">-->
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">已合格数:</label>-->
<!-- <div class="col-sm-9">-->
<!-- <input type="text" id="spell2"-->
<!-- class="form-control" readonly>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="col-md-12" style="margin-bottom: 15px">-->
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">合格数:</label>-->
<!-- <div class="col-sm-9">-->
<!-- <input type="text" name="spell2" class="form-control" placeholder="请输入合格数">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="col-md-12" style="margin-bottom: 15px">-->
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">不合格数:</label>-->
<!-- <div class="col-sm-9">-->
<!-- <input type="text" name="spell3" class="form-control" placeholder="请输入不合格数">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="modal-footer">-->
<!-- <button type="button" class="btn btn-default" data-dismiss="modal" onclick="submit()">确定</button>-->
<!-- <button type="button" class="btn btn-default" data-dismiss="modal" onclick="closeModal()">取消-->
<!-- </button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </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('stock:notice:edit')}]];
var removeFlag = [[${@permission.hasPermi('stock:notice:remove')}]];
var warehousingTypeDatas = [[${@dict.getType('dock_warehousing_purchase_type')}]];
var domesticOrExportDatas = [[${@dict.getType('sys_NWX_class')}]];
var prefix = ctx + "stock/notice";
$(function () {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "入库通知-检验",
columns: [{
checkbox: true
},
{
field: 'warehousingnoticeNo',
title: '入库通知单号'
},
{
field: 'customerId',
title: '客户号'
},
{
field: 'customerName',
title: '客户名称'
},
{
field: 'warehousingType',
title: '入库类型',
formatter: function (value, row, index) {
return $.table.selectDictLabel(warehousingTypeDatas, value);
}
},
{
field: 'warehousingnoticeDate',
title: '预入库日'
},
{
field: 'purchaseorderNo',
title: '采购订单号'
},
{
field: 'workorderNo',
title: '制工单号'
},
{
field: 'domesticOrExport',
title: '内外销',
formatter: function (value, row, index) {
return $.table.selectDictLabel(domesticOrExportDatas, value);
}
},
{
field: 'warehouseNo',
title: '仓库号'
},
{
field: 'warehouseName',
title: '仓库名称'
},
{
field: 'warehousingAmt',
title: '入库数量'
},
{
field: 'itemNo',
title: '物料代码'
},
{
field: 'itemName',
title: '物料名称'
},
{
field: 'itemTimes',
title: '项次'
},
{
field: 'specificationModel',
title: '规格型号'
},
{
field: 'machineType',
title: '机种'
},
{
field: 'unit',
title: '单位'
},
{
field: 'spell1',
title: '通知日期'
},
{
field: 'spell2',
title: '合格数'
},
{
field: 'spell3',
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.warehousingnoticeNo + '\')"><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.warehousingnoticeNo + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
function getPurchaseOrder() {
window.location.href = prefix + "/getPurchaseOrder";
}
//获取客户代码和名称
$.ajax({
url: ctx + "finance/customer/getName",
type: "post",
dataType: "json",
success: function (resp) {
if (resp.code === 0) {
if (resp.data.length > 0) {
// $("select[name='customerName']").empty();
let data = resp.data;
//alert(data);
for (let i in data) {
$("select[name='customerName']").append("<option value='" + data[i].pName + "'>" + data[i].pName + "</option>");
}
}
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("出错啦!");
}
})
//获取仓库名
$.ajax({
url: ctx + "stock/stockInfo/all",
type: "post",
dataType: "json",
success: function (resp) {
if (resp.code === 0) {
let data = resp.data;
//alert(data);
for (let i in data) {
$("select[name='warehouseName']").append("<option value='" + data[i].stockname + "'>" + data[i].stockname + "</option>");
}
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
//显示修改合格数页面
function changeCheckInfo() {
let data = $("#bootstrap-table").bootstrapTable("getSelections");
$.ajax({
url: prefix + "/item",
type: "post",
dataType: "json",
data: {"warehousingnoticeNo": data[0].warehousingnoticeNo},
success: function (resp) {
if (resp.code === 0) {
let getData = resp.data;
//alert(getData[0].spell2);
//alert(getData[0].warehousingAmt);
if (parseInt(getData[0].spell2) < parseInt(getData[0].warehousingAmt)) {
$.modal.open("修改合格数", prefix+"/getChangeAcceptanceNum/"+data[0].warehousingnoticeNo);
} else {
$.modal.msgError("该检验单已完成!");
}
} else {
$.modal.msgError(resp.msg);
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
})
}
</script>
</body>
</html>