需求计划申请
This commit is contained in:
parent
ab3845343f
commit
b73198ad6f
|
|
@ -39,6 +39,9 @@ function submitApply(data) {
|
||||||
if (objParam.checkType === '1') {
|
if (objParam.checkType === '1') {
|
||||||
url = '';
|
url = '';
|
||||||
data.field.id = idParam;
|
data.field.id = idParam;
|
||||||
|
} else if (objParam.checkType === '2') { // 需求计划审核
|
||||||
|
url = dataUrl + 'backstage/planAudit/planAudit';
|
||||||
|
data.field.id = idParam;
|
||||||
}
|
}
|
||||||
console.log(JSON.stringify(data.field));
|
console.log(JSON.stringify(data.field));
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,10 @@ let details;
|
||||||
let form, layer, laydate;
|
let form, layer, laydate;
|
||||||
function setParams(obj) {
|
function setParams(obj) {
|
||||||
objParam = JSON.parse(obj);
|
objParam = JSON.parse(obj);
|
||||||
// console.log(objParam);
|
console.log(objParam.checkType);
|
||||||
|
if (objParam.checkType === 2) {
|
||||||
|
$('#print').before('<button type="button" class="layui-btn layui-bg-orange" onclick="check()">审核</button>');
|
||||||
|
}
|
||||||
idParam = objParam.id;
|
idParam = objParam.id;
|
||||||
layui.use(['form', 'layer', 'laydate'], function () {
|
layui.use(['form', 'layer', 'laydate'], function () {
|
||||||
form = layui.form;
|
form = layui.form;
|
||||||
|
|
@ -224,3 +226,15 @@ function print() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 需求计划申请审核
|
||||||
|
function check() {
|
||||||
|
objParam.checkType = '2'; // 需求计划申请审核
|
||||||
|
openIframeByParamObj("check", "审核", "../../accessory/child/audit_form.html", "40%", "50%", objParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
function closePage() {
|
||||||
|
let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引
|
||||||
|
parent.layer.close(index); // 再执行关闭
|
||||||
|
window.parent.queryTable(1);
|
||||||
|
}
|
||||||
|
|
@ -1,14 +1,15 @@
|
||||||
let form, table, laydate;
|
let form, table, element;
|
||||||
let tableIns;
|
let tableIns;
|
||||||
let pageNum = 1; // 定义分页
|
let pageNum = 1; // 定义分页
|
||||||
layui.use(["form", "table", 'laydate'], function () {
|
layui.use(["form", "table", 'element'], function () {
|
||||||
form = layui.form;
|
form = layui.form;
|
||||||
table = layui.table;
|
table = layui.table;
|
||||||
laydate = layui.laydate;
|
element = layui.element;
|
||||||
laydate.render({
|
// tab 切换事件
|
||||||
elem: '#ID-laydate-rangeLinked',
|
element.on('tab(demo-filter-tab)', function (data) {
|
||||||
range: ['#startDay', '#endDay'],
|
let auditStatus = $(this).attr('value');
|
||||||
rangeLinked: true
|
$('#auditStatus').val(auditStatus);
|
||||||
|
queryTable(1);
|
||||||
});
|
});
|
||||||
initTable();
|
initTable();
|
||||||
});
|
});
|
||||||
|
|
@ -19,8 +20,6 @@ function queryTable(type) {
|
||||||
reloadTable(1);
|
reloadTable(1);
|
||||||
} else if (type === 2) {
|
} else if (type === 2) {
|
||||||
$('#keyWord').val('');
|
$('#keyWord').val('');
|
||||||
$('#startDate').val('');
|
|
||||||
$('#endDate').val('');
|
|
||||||
layui.form.render();
|
layui.form.render();
|
||||||
reloadTable(1);
|
reloadTable(1);
|
||||||
}
|
}
|
||||||
|
|
@ -40,8 +39,7 @@ function reloadTable(pageNum) {
|
||||||
where: {
|
where: {
|
||||||
encryptedData: JSON.stringify({
|
encryptedData: JSON.stringify({
|
||||||
'keyWord': $('#keyWord').val(),
|
'keyWord': $('#keyWord').val(),
|
||||||
'startDate': $('#startDate').val(),
|
'auditStatus': $('#auditStatus').val(),
|
||||||
'endDate': $('#endDate').val()
|
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -56,13 +54,12 @@ function initTable() {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: sessionStorage.getItem("gz-token"),
|
authorization: sessionStorage.getItem("gz-token"),
|
||||||
},
|
},
|
||||||
height: "full-170",
|
height: "full-220",
|
||||||
url: dataUrl + "backstage/partInput/findByPage",
|
url: dataUrl + "backstage/planAudit/findByPage",
|
||||||
where: {
|
where: {
|
||||||
encryptedData: JSON.stringify({
|
encryptedData: JSON.stringify({
|
||||||
'keyWord': $('#keyWord').val(),
|
'keyWord': $('#keyWord').val(),
|
||||||
'startDate': $('#startDate').val(),
|
'auditStatus': $('#auditStatus').val(),
|
||||||
'endDate': $('#endDate').val()
|
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
request: {
|
request: {
|
||||||
|
|
@ -89,74 +86,59 @@ function initTable() {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "code",
|
field: "code",
|
||||||
width: '15%',
|
width: '10%',
|
||||||
|
title: "计划单号",
|
||||||
|
unresize: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "proName",
|
||||||
|
width: '14%',
|
||||||
title: "工程名称",
|
title: "工程名称",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "inputUser",
|
field: "projectPart",
|
||||||
width: '8%',
|
|
||||||
title: "工程状态",
|
|
||||||
unresize: true,
|
|
||||||
align: "center",
|
|
||||||
templet: function (d) {
|
|
||||||
return setProStatus('1');
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: "inputNum",
|
|
||||||
width: '10%',
|
width: '10%',
|
||||||
title: "维修单数量",
|
title: "项目部分",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
templet: function (d) {
|
|
||||||
return '<span style="color:#ff9900;font-weight:bold;">1</span>';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: "allPrice",
|
|
||||||
width: '10%',
|
|
||||||
title: "配件领料单数量",
|
|
||||||
unresize: true,
|
|
||||||
align: "center",
|
|
||||||
templet: function (d) {
|
|
||||||
return '<span style="color:#409eff;font-weight:bold;">1</span>';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: "allPrice",
|
|
||||||
width: '10%',
|
|
||||||
title: "配件退回单数量",
|
|
||||||
unresize: true,
|
|
||||||
align: "center",
|
|
||||||
templet: function (d) {
|
|
||||||
return '<span style="color:#f56c6c;font-weight:bold;">1</span>';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: "remark",
|
|
||||||
width: '15%',
|
|
||||||
title: "领用/使用/退回配件数量",
|
|
||||||
unresize: true,
|
|
||||||
align: "center",
|
|
||||||
templet: function (d) {
|
|
||||||
return '<p style="color:#409eff;">领:2,563 </p>';
|
|
||||||
// return '<p style="color:#409eff;">领:2,563 </p><p style="color:#19be6b;">用:2,000 </p><p style="color:#f56c6c;">退:563</p>';
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "remark",
|
field: "allPrice",
|
||||||
width: '15%',
|
width: '10%',
|
||||||
title: "领用/使用/退回配件金额",
|
title: "审核状态",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
return '<p style="color:#409eff;">领:2,563 </p>';
|
return getCheckStatus(d.statusType, d.status);
|
||||||
// return '<p style="color:#409eff;">领:2,563 </p><p style="color:#19be6b;">用:2,000 </p><p style="color:#f56c6c;">退:563</p>';
|
;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: "creator",
|
||||||
|
width: '10%',
|
||||||
|
title: "提交人",
|
||||||
|
unresize: true,
|
||||||
|
align: "center",
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "createTime",
|
||||||
|
width: '15%',
|
||||||
|
title: "提交时间",
|
||||||
|
unresize: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "remark",
|
||||||
|
width: '14%',
|
||||||
|
title: "备注",
|
||||||
|
unresize: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: '10%',
|
width: '10%',
|
||||||
|
|
@ -164,7 +146,11 @@ function initTable() {
|
||||||
unresize: true,
|
unresize: true,
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
let html = "";
|
let html = "";
|
||||||
html += "<a onclick='proCountDetail(" + JSON.stringify(d) + ")'>详情</a>";
|
html += "<a onclick='planAuditDetail(" + JSON.stringify(d) + ")'>详情</a>";
|
||||||
|
let content = getCheckStatus(d.statusType, d.status);
|
||||||
|
if (!(content.indexOf('驳回') > -1 || content.indexOf('通过') > -1)) {
|
||||||
|
html += "<div class='splitLine'>|</div><a onclick='checkDetail(" + JSON.stringify(d) + ")'>审核</a>";
|
||||||
|
}
|
||||||
return html;
|
return html;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -190,16 +176,35 @@ function exportExcel() {
|
||||||
exportExcelUtil(url, '配件入库数据', JSON.stringify(params));
|
exportExcelUtil(url, '配件入库数据', JSON.stringify(params));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 配件退料详情
|
//审核状态
|
||||||
function proCountDetail(obj) {
|
function getCheckStatus(statusType, status) {
|
||||||
openIframeByParamObj("pro_count_detail", "详情", "./child/pro_count_detail.html", "92%", "95%", obj);
|
var company = "";
|
||||||
|
if (statusType === '1') {
|
||||||
|
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px;'>●</span>审核通过";
|
||||||
|
} else if (statusType === '2') {
|
||||||
|
company = "分公司";
|
||||||
|
} else if (statusType === '3') {
|
||||||
|
company = "项目管理中心";
|
||||||
|
} else if (statusType === '4') {
|
||||||
|
company = "机具公司";
|
||||||
|
}
|
||||||
|
if (status === '1') {
|
||||||
|
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px'>●</span>待" + company + "审核";
|
||||||
|
} else if (status === '2') {
|
||||||
|
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px;'>●</span>审核通过";
|
||||||
|
} else if (status === '3') {
|
||||||
|
return "<span style='color:#F56C6C;margin:0 5px 0 5px;font-size:16px'>●</span>" + company + "审核驳回";
|
||||||
|
}
|
||||||
|
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px'>●</span>待审核";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 工程状态
|
// 详情
|
||||||
function setProStatus(status) {
|
function planAuditDetail(obj) {
|
||||||
if (status === '1') {
|
openIframeByParamObj("plan_audit_detail", "详情", "./child/apply_plan_detail.html", "92%", "95%", obj);
|
||||||
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px'>●</span>在建";
|
}
|
||||||
} else if (status === '2') {
|
|
||||||
return "<span style='color:#999;margin:0 5px 0 5px;font-size:16px;'>●</span>完工";
|
// 需求计划申请审核
|
||||||
}
|
function checkDetail(obj) {
|
||||||
|
obj.checkType = 2;
|
||||||
|
openIframeByParamObj("check_detail", "审核", "./child/apply_plan_detail.html", "92%", "95%", obj);
|
||||||
}
|
}
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="button" class="layui-btn layui-bg-blue" onclick="print()">打印</button>
|
<button type="button" class="layui-btn layui-bg-blue" id="print" onclick="print()">打印</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--基本信息-->
|
<!--基本信息-->
|
||||||
|
|
@ -146,5 +146,6 @@
|
||||||
<script src="../../../js/Print.js" charset="utf-8"></script>
|
<script src="../../../js/Print.js" charset="utf-8"></script>
|
||||||
<script src="../../../lib/layui-v2.9.18/layui/layui.js" charset="utf-8"></script>
|
<script src="../../../lib/layui-v2.9.18/layui/layui.js" charset="utf-8"></script>
|
||||||
<script src="../../../js/demandPlan/child/apply_plan_detail.js" charset="utf-8"></script>
|
<script src="../../../js/demandPlan/child/apply_plan_detail.js" charset="utf-8"></script>
|
||||||
|
<script src="../../../js/openIframe.js" charset="utf-8"></script>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -11,27 +11,51 @@
|
||||||
<link rel="stylesheet" href="../../css/font.css" media="all">
|
<link rel="stylesheet" href="../../css/font.css" media="all">
|
||||||
<link rel="stylesheet" href="../../css/public.css" media="all">
|
<link rel="stylesheet" href="../../css/public.css" media="all">
|
||||||
</head>
|
</head>
|
||||||
|
<style>
|
||||||
|
.layui-tab-brief>.layui-tab-title .layui-this {
|
||||||
|
color: #409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-tab-brief>.layui-tab-more li.layui-this:after,
|
||||||
|
.layui-tab-brief>.layui-tab-title .layui-this:after {
|
||||||
|
border-bottom: 2px solid #409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #428bca;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover,
|
||||||
|
a:focus {
|
||||||
|
color: #2a6496;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="layuimini-container">
|
<div class="layuimini-container">
|
||||||
<div class="layuimini-main">
|
<div class="layuimini-main">
|
||||||
|
<div class="layui-tab layui-tab-brief" lay-filter="demo-filter-tab">
|
||||||
|
<ul class="layui-tab-title">
|
||||||
|
<li value="" class="layui-this">全部</li>
|
||||||
|
<li value="1">待审核</li>
|
||||||
|
<li value="2">已通过</li>
|
||||||
|
<li value="3">已驳回</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<fieldset class="table-search-fieldset">
|
<fieldset class="table-search-fieldset">
|
||||||
<legend>搜索信息</legend>
|
<legend>搜索信息</legend>
|
||||||
<div style="margin: 10px 10px 10px 10px">
|
<div style="margin: 10px 10px 10px 10px">
|
||||||
<form class="layui-form layui-form-pane" action="#" onsubmit="return false;">
|
<form class="layui-form layui-form-pane" action="#" onsubmit="return false;">
|
||||||
|
<input type="text" value="" id="auditStatus" name="auditStatus" hidden>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<div class="layui-input-inline" style="width: 300px;">
|
<div class="layui-input-inline" style="width: 300px;">
|
||||||
<input type="text" name="keyWord" id="keyWord" autocomplete="off"
|
<input type="text" name="keyWord" id="keyWord" autocomplete="off"
|
||||||
class="layui-input" lay-affix="clear" placeholder="输入工程名称" maxlength="30">
|
class="layui-input" lay-affix="clear" placeholder="输入关键字" maxlength="30">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline" style="width: 200px;">
|
|
||||||
<select class="layui-select">
|
|
||||||
<option value="1">在建</option>
|
|
||||||
<option value="2">完工</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<button class="layui-btn layui-bg-blue" onclick="queryTable(1)"><i
|
<button class="layui-btn layui-bg-blue" onclick="queryTable(1)"><i
|
||||||
class="layui-icon"></i> 搜 索</button>
|
class="layui-icon"></i> 搜 索</button>
|
||||||
|
|
@ -52,7 +76,7 @@
|
||||||
<script src="../../lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
|
<script src="../../lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
|
||||||
<script src="../../js/public.js" charset="utf-8"></script>
|
<script src="../../js/public.js" charset="utf-8"></script>
|
||||||
<script src="../../lib/layui-v2.9.18/layui/layui.js" charset="utf-8"></script>
|
<script src="../../lib/layui-v2.9.18/layui/layui.js" charset="utf-8"></script>
|
||||||
<script src="../../js/accessory/pro_count_list.js" charset="utf-8"></script>
|
<script src="../../js/demandPlan/plan_check_list.js" charset="utf-8"></script>
|
||||||
<script src="../../js/openIframe.js" charset="utf-8"></script>
|
<script src="../../js/openIframe.js" charset="utf-8"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue