需求计划申请
This commit is contained in:
parent
ab3845343f
commit
b73198ad6f
|
|
@ -39,6 +39,9 @@ function submitApply(data) {
|
|||
if (objParam.checkType === '1') {
|
||||
url = '';
|
||||
data.field.id = idParam;
|
||||
} else if (objParam.checkType === '2') { // 需求计划审核
|
||||
url = dataUrl + 'backstage/planAudit/planAudit';
|
||||
data.field.id = idParam;
|
||||
}
|
||||
console.log(JSON.stringify(data.field));
|
||||
$.ajax({
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ let details;
|
|||
let form, layer, laydate;
|
||||
function setParams(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;
|
||||
layui.use(['form', 'layer', 'laydate'], function () {
|
||||
form = layui.form;
|
||||
|
|
@ -223,4 +225,16 @@ function print() {
|
|||
console.log('onEnd', new Date())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 需求计划申请审核
|
||||
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 pageNum = 1; // 定义分页
|
||||
layui.use(["form", "table", 'laydate'], function () {
|
||||
layui.use(["form", "table", 'element'], function () {
|
||||
form = layui.form;
|
||||
table = layui.table;
|
||||
laydate = layui.laydate;
|
||||
laydate.render({
|
||||
elem: '#ID-laydate-rangeLinked',
|
||||
range: ['#startDay', '#endDay'],
|
||||
rangeLinked: true
|
||||
element = layui.element;
|
||||
// tab 切换事件
|
||||
element.on('tab(demo-filter-tab)', function (data) {
|
||||
let auditStatus = $(this).attr('value');
|
||||
$('#auditStatus').val(auditStatus);
|
||||
queryTable(1);
|
||||
});
|
||||
initTable();
|
||||
});
|
||||
|
|
@ -19,8 +20,6 @@ function queryTable(type) {
|
|||
reloadTable(1);
|
||||
} else if (type === 2) {
|
||||
$('#keyWord').val('');
|
||||
$('#startDate').val('');
|
||||
$('#endDate').val('');
|
||||
layui.form.render();
|
||||
reloadTable(1);
|
||||
}
|
||||
|
|
@ -40,8 +39,7 @@ function reloadTable(pageNum) {
|
|||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'startDate': $('#startDate').val(),
|
||||
'endDate': $('#endDate').val()
|
||||
'auditStatus': $('#auditStatus').val(),
|
||||
}),
|
||||
},
|
||||
},
|
||||
|
|
@ -56,13 +54,12 @@ function initTable() {
|
|||
headers: {
|
||||
authorization: sessionStorage.getItem("gz-token"),
|
||||
},
|
||||
height: "full-170",
|
||||
url: dataUrl + "backstage/partInput/findByPage",
|
||||
height: "full-220",
|
||||
url: dataUrl + "backstage/planAudit/findByPage",
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'startDate': $('#startDate').val(),
|
||||
'endDate': $('#endDate').val()
|
||||
'auditStatus': $('#auditStatus').val(),
|
||||
}),
|
||||
},
|
||||
request: {
|
||||
|
|
@ -89,73 +86,58 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "code",
|
||||
width: '15%',
|
||||
width: '10%',
|
||||
title: "计划单号",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "proName",
|
||||
width: '14%',
|
||||
title: "工程名称",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "inputUser",
|
||||
width: '8%',
|
||||
title: "工程状态",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return setProStatus('1');
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "inputNum",
|
||||
field: "projectPart",
|
||||
width: '10%',
|
||||
title: "维修单数量",
|
||||
title: "项目部分",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return '<span style="color:#ff9900;font-weight:bold;">1</span>';
|
||||
},
|
||||
|
||||
},
|
||||
{
|
||||
field: "allPrice",
|
||||
width: '10%',
|
||||
title: "配件领料单数量",
|
||||
title: "审核状态",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return '<span style="color:#409eff;font-weight:bold;">1</span>';
|
||||
return getCheckStatus(d.statusType, d.status);
|
||||
;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "allPrice",
|
||||
field: "creator",
|
||||
width: '10%',
|
||||
title: "配件退回单数量",
|
||||
title: "提交人",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
|
||||
},
|
||||
{
|
||||
field: "createTime",
|
||||
width: '15%',
|
||||
title: "提交时间",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return '<span style="color:#f56c6c;font-weight:bold;">1</span>';
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "remark",
|
||||
width: '15%',
|
||||
title: "领用/使用/退回配件数量",
|
||||
width: '14%',
|
||||
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",
|
||||
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>';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
|
|
@ -164,7 +146,11 @@ function initTable() {
|
|||
unresize: true,
|
||||
templet: function (d) {
|
||||
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;
|
||||
},
|
||||
},
|
||||
|
|
@ -190,16 +176,35 @@ function exportExcel() {
|
|||
exportExcelUtil(url, '配件入库数据', JSON.stringify(params));
|
||||
}
|
||||
|
||||
// 配件退料详情
|
||||
function proCountDetail(obj) {
|
||||
openIframeByParamObj("pro_count_detail", "详情", "./child/pro_count_detail.html", "92%", "95%", obj);
|
||||
//审核状态
|
||||
function getCheckStatus(statusType, status) {
|
||||
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) {
|
||||
if (status === '1') {
|
||||
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 planAuditDetail(obj) {
|
||||
openIframeByParamObj("plan_audit_detail", "详情", "./child/apply_plan_detail.html", "92%", "95%", obj);
|
||||
}
|
||||
|
||||
// 需求计划申请审核
|
||||
function checkDetail(obj) {
|
||||
obj.checkType = 2;
|
||||
openIframeByParamObj("check_detail", "审核", "./child/apply_plan_detail.html", "92%", "95%", obj);
|
||||
}
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
</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>
|
||||
<!--基本信息-->
|
||||
|
|
@ -146,5 +146,6 @@
|
|||
<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="../../../js/demandPlan/child/apply_plan_detail.js" charset="utf-8"></script>
|
||||
<script src="../../../js/openIframe.js" charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
|
|
@ -11,27 +11,51 @@
|
|||
<link rel="stylesheet" href="../../css/font.css" media="all">
|
||||
<link rel="stylesheet" href="../../css/public.css" media="all">
|
||||
</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>
|
||||
<div class="layuimini-container">
|
||||
<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">
|
||||
<legend>搜索信息</legend>
|
||||
<div style="margin: 10px 10px 10px 10px">
|
||||
<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-inline">
|
||||
<div class="layui-input-inline" style="width: 300px;">
|
||||
<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 class="layui-inline" style="width: 200px;">
|
||||
<select class="layui-select">
|
||||
<option value="1">在建</option>
|
||||
<option value="2">完工</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-bg-blue" onclick="queryTable(1)"><i
|
||||
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="../../js/public.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>
|
||||
</body>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue