This commit is contained in:
parent
c907d51470
commit
77fbf3db5a
|
|
@ -0,0 +1,108 @@
|
|||
.layout {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#main-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0 2% 0 2%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#plan-detail-box {
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
flex-direction: column;
|
||||
align-items: baseline;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
#plan-detail-box>p, #plan-basic-box>p, #oper-record-box p,
|
||||
#implement-box p {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#plan-basic-box {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
flex-direction: column;
|
||||
align-items: baseline;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.classTable {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
text-align: center;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 1px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.classTable tr td, .classTable tr th {
|
||||
height: 50px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #ddd;
|
||||
padding: 10px 20px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.classTable tr td, .classTable tr th {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.classTable tr td:nth-child(1), .classTable tr th:nth-child(1) {
|
||||
width: 40%
|
||||
}
|
||||
|
||||
.classTable tr:nth-child(odd) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
#implement-box {
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
align-items: baseline;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
#oper-record-box {
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
align-items: baseline;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.layui-timeline {
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.oper-info {
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.oper-info>div:nth-child(1) {
|
||||
width: 7%;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.oper-info>div:nth-child(2) {
|
||||
width: 73%;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.oper-info>div:nth-child(3) {
|
||||
width: 20%;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.user-oper {
|
||||
flex-direction: column;
|
||||
}
|
||||
.page-content{
|
||||
width: 100%;
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 99%;
|
||||
}
|
||||
|
||||
.layout {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#main-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#basic-box {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
justify-content: start;
|
||||
padding: 0 0 0 20px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.title p {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
.classTable {
|
||||
width: 98%;
|
||||
margin: 0 1% 0 1%;
|
||||
table-layout: fixed;
|
||||
text-align: center;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 1px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.classTable tr td,
|
||||
.classTable tr th {
|
||||
height: 50px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #ddd;
|
||||
padding: 10px 20px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
||||
.classTable tr th{
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
|
@ -0,0 +1,233 @@
|
|||
let idParam, objParam;
|
||||
let details;
|
||||
let form, layer, laydate;
|
||||
function setParams(obj) {
|
||||
objParam = JSON.parse(obj);
|
||||
idParam = objParam.id;
|
||||
layui.use(['form', 'layer', 'laydate'], function () {
|
||||
form = layui.form;
|
||||
layer = layui.layer;
|
||||
laydate = layui.laydate;
|
||||
});
|
||||
setCheckStatus();
|
||||
getDetailById();
|
||||
}
|
||||
|
||||
// 基本信息
|
||||
function setPlanBasicTableInfo(obj) {
|
||||
$('#proName').html(obj.proName);
|
||||
$('#projectPart').html(obj.projectPart);
|
||||
$('#projectContent').html(obj.projectContent);
|
||||
$('#needTime').html(obj.needTime);
|
||||
$('#remark').html(obj.remark);
|
||||
}
|
||||
|
||||
// 查询
|
||||
function search() {
|
||||
let keyWord = $('#keyWord').val();
|
||||
let keyWord2 = $('#keyWord2').val();
|
||||
if (!keyWord && !keyWord2) {
|
||||
getbaseList(details);
|
||||
} else if (keyWord && !keyWord2) {
|
||||
let dataList = details.filter(item => {
|
||||
console.log(item.type.indexOf(keyWord));
|
||||
return item.type.indexOf(keyWord) > -1;
|
||||
})
|
||||
getbaseList(dataList);
|
||||
} else if (!keyWord && keyWord2) {
|
||||
let dataList = details.filter(item => {
|
||||
console.log(item.module.indexOf(keyWord2));
|
||||
return item.module.indexOf(keyWord2) > -1;
|
||||
})
|
||||
getbaseList(dataList);
|
||||
} else if (keyWord && keyWord2) {
|
||||
let dataList = details.filter(item => {
|
||||
console.log(item.module.indexOf(keyWord2));
|
||||
console.log(item.type.indexOf(keyWord));
|
||||
return item.type.indexOf(keyWord) > -1 && item.module.indexOf(keyWord2) > -1;;
|
||||
})
|
||||
getbaseList(dataList);
|
||||
}
|
||||
}
|
||||
|
||||
// 重置
|
||||
function resetSearch() {
|
||||
$('#keyWord').val('');
|
||||
$('#keyWord2').val('');
|
||||
getbaseList(details);
|
||||
}
|
||||
|
||||
function getbaseList(results) {
|
||||
var html = "";
|
||||
if (results && results.length > 0) {
|
||||
for (var i = 0; i < results.length; i++) {
|
||||
var l = results[i];
|
||||
html += "<tr>";
|
||||
html += "<td style='vertical-align:middle;' class='center hidden-480'>"
|
||||
+ (i + 1) + "</td>";
|
||||
html += "<td style='vertical-align:middle;' class='center'>" + l.typeName + "</td>";
|
||||
html += "<td style='vertical-align:middle;' class='center'>" + l.type + "</td>";
|
||||
html += "<td style='vertical-align:middle;' class='center'>" + l.module + "</td>";
|
||||
html += "<td style='vertical-align:middle;' class='center'>" + l.unit + "</td>";
|
||||
html += "<td style='vertical-align:middle;color:#409EFF;' class='center'>" + l.needNum + "</td>";
|
||||
html += "<td style='vertical-align:middle;color:#409EFF;' class='center'>" + l.times + "</td>";
|
||||
html += "<td style='vertical-align:middle;' class='center'>" + l.remarks + "</td>";
|
||||
html += "</tr>";
|
||||
}
|
||||
} else {
|
||||
html += "<tr><td colspan='8' class='center'>没有相关数据</td></tr>";
|
||||
}
|
||||
$("#baseTable tbody").empty().append(html);
|
||||
}
|
||||
|
||||
function rowFunction(id) {
|
||||
var h = "";
|
||||
h += "<td style='vertical-align:middle;' class='center'>";
|
||||
h += "<div class='visible-md visible-lg hidden-sm hidden-xs btn-group'>";
|
||||
h += "<a href='#' title='详情' onclick='detail('" + id + "')' class='aBtnNoTD' ><i class='icon-zoom-in color-p bigger-140'></i></a>";
|
||||
h += "</div>";
|
||||
h += "</td>";
|
||||
return h;
|
||||
}
|
||||
|
||||
// 导出
|
||||
function exportData() {
|
||||
let params = {
|
||||
"id": idParam
|
||||
}
|
||||
exportCommon(bonuspath + '/backstage/planApplication/exportDetail', 'POST', params, "机具明细");
|
||||
}
|
||||
|
||||
|
||||
// 操作记录
|
||||
function setOperRecordInfo(list, obj) {
|
||||
let creator = obj.creator; // 发起人
|
||||
let html = '';
|
||||
if (list && list.length > 0) {
|
||||
let imgUrl = '../../../images/user_head_icon.png';
|
||||
let imgUrl2 = '../../../images/time_icon.png';
|
||||
$.each(list, function (index, item) {
|
||||
let operData = "";
|
||||
let dept = '';
|
||||
let minutes = item.minutes;
|
||||
if (item.hours === 0 && item.minutes === 0) {
|
||||
minutes = 1;
|
||||
}
|
||||
if (item.auditType === '0' || item.auditType === '1') {
|
||||
dept = '项目部';
|
||||
} else if (item.auditType === '2') {
|
||||
dept = '分公司';
|
||||
} else if (item.auditType === '3') {
|
||||
dept = '项管中心';
|
||||
} else if (item.auditType === '4') {
|
||||
dept = '机具公司';
|
||||
}
|
||||
// 操作流程
|
||||
if (item.auditType === '0') {
|
||||
operData = '发起申请';
|
||||
} else if (item.auditType === '1') {
|
||||
operData = '重新提交申请';
|
||||
} else if (item.auditType === '2' && item.auditStatus === '2') {
|
||||
operData = '审核确认通过,共耗时:' + item.hours + '小时' + minutes + '分钟 原因备注:' + item.auditRemarks + '';
|
||||
} else if (item.auditType === '2' && item.auditStatus === '3') {
|
||||
operData = '驳回-给发起人' + creator + ',共耗时:' + item.hours + '小时' + minutes + '分钟 原因备注:' + item.auditRemarks + '';
|
||||
} else if (item.auditType === '3' && item.auditStatus === '2') {
|
||||
operData = '审核确认通过,共耗时:' + item.hours + '小时' + minutes + '分钟 原因备注:' + item.auditRemarks + '';
|
||||
} else if (item.auditType === '3' && item.auditStatus === '3') {
|
||||
operData = '驳回-给发起人' + creator + ',共耗时:' + item.hours + '小时' + minutes + '分钟 原因备注:' + item.auditRemarks + '';
|
||||
} else if (item.auditType === '4' && item.auditStatus === '2') {
|
||||
operData = '完结-审核确认通过,共耗时:' + item.hours + '小时' + minutes + '分钟 原因备注:' + item.auditRemarks + '';
|
||||
} else if (item.auditType === '4' && item.auditStatus === '3') {
|
||||
operData = '驳回-给发起人' + creator + ',共耗时:' + item.hours + '小时' + minutes + '分钟 原因备注:' + item.auditRemarks + '';
|
||||
}
|
||||
html += '<div class="layui-timeline-item">' +
|
||||
'<i class="layui-icon layui-timeline-axis"></i>' +
|
||||
'<div class="layui-timeline-content layui-text">' +
|
||||
'<h3 class="layui-timeline-title">' + item.auditTime.substring(0, 10) + '</h3>' +
|
||||
'<div class="layui-panel">' +
|
||||
'<div class="oper-info layout">' +
|
||||
'<div class="layout">' +
|
||||
'<img src="' + imgUrl + '">' +
|
||||
'</div>' +
|
||||
'<div class="user-oper layout">' +
|
||||
'<div style="width: 100%">' +
|
||||
'<span>' + item.auditUser + '</span><span>(' + item.phone + ')</span><span>' + dept + '</span>' +
|
||||
'</div>' +
|
||||
'<div style="width: 100%">' +
|
||||
'<span>' + operData + '</span>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'<div class="layout">' +
|
||||
'<img src="' + imgUrl2 + '">' +
|
||||
'<span style="margin: 0 5px 0 5px;">' + item.auditTime + '</span>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
})
|
||||
}
|
||||
$('.layui-timeline').empty().append(html);
|
||||
}
|
||||
|
||||
// 设置计划编号/审核状态
|
||||
function setCheckStatus() {
|
||||
$('#code').empty().html(objParam.code);
|
||||
$('#checkStatus').html(getCheckStatus(objParam.statusType, objParam.status));
|
||||
}
|
||||
|
||||
// 审核状态
|
||||
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 getDetailById() {
|
||||
let params = {
|
||||
encryptedData: JSON.stringify({
|
||||
'id': idParam
|
||||
})
|
||||
};
|
||||
let url = dataUrl + 'backstage/planApplication/getPlanDetails';
|
||||
ajaxRequest(url, "POST", params, true, function () {
|
||||
}, function (result) {
|
||||
console.log(result);
|
||||
if (result.code === 200) {
|
||||
setPlanBasicTableInfo(result.obj);
|
||||
getbaseList(result.obj.details);
|
||||
setOperRecordInfo(result.obj.auditList,result.obj);
|
||||
details = result.obj.details;
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
errorFn(xhr, status, error)
|
||||
}, null);
|
||||
}
|
||||
|
||||
// 打印
|
||||
function print() {
|
||||
Print('#body', {
|
||||
onStart: function () {
|
||||
console.log('onStart', new Date())
|
||||
},
|
||||
onEnd: function () {
|
||||
console.log('onEnd', new Date())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
let form, table, element;
|
||||
let form, table, element,layer;
|
||||
let typeParam;
|
||||
function setParams(type) {
|
||||
typeParam = type;
|
||||
layui.use(["form", "table", 'element'], function () {
|
||||
layui.use(["form", "table", 'element','layer'], function () {
|
||||
form = layui.form;
|
||||
table = layui.table;
|
||||
element = layui.element;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
let form, table, element,tableIns,layer;
|
||||
let form, table, element, tableIns, layer;
|
||||
let pageNum = 1;
|
||||
layui.use(["form", "table", 'element','layer'], function () {
|
||||
form = layui.form;
|
||||
table = layui.table;
|
||||
element = layui.element;
|
||||
initTable();
|
||||
});
|
||||
layui.use(["form", "table", 'element', 'layer'], function () {
|
||||
form = layui.form;
|
||||
table = layui.table;
|
||||
element = layui.element;
|
||||
layer = layui.layer;
|
||||
initTable();
|
||||
});
|
||||
|
||||
// 查询/重置
|
||||
function queryTable(type) {
|
||||
|
|
@ -34,7 +35,7 @@ function reloadTable(pageNum) {
|
|||
encryptedData: JSON.stringify({
|
||||
'name': $('#name').val(),
|
||||
'module': $('#module').val(),
|
||||
type:1
|
||||
type: 1
|
||||
}),
|
||||
},
|
||||
},
|
||||
|
|
@ -55,7 +56,7 @@ function initTable() {
|
|||
encryptedData: JSON.stringify({
|
||||
'name': $('#name').val(),
|
||||
'module': $('#module').val(),
|
||||
type:1
|
||||
type: 1
|
||||
}),
|
||||
},
|
||||
request: {
|
||||
|
|
@ -73,82 +74,82 @@ function initTable() {
|
|||
cols: [
|
||||
[
|
||||
{
|
||||
width: '9.9%',
|
||||
title: "序号",
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return d.LAY_NUM;
|
||||
},
|
||||
width: '9.9%',
|
||||
title: "序号",
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return d.LAY_NUM;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "type",
|
||||
width: '10%',
|
||||
title: "物机类型 ",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
field: "type",
|
||||
width: '10%',
|
||||
title: "物机类型 ",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "name",
|
||||
width: '15%',
|
||||
title: "物机名称",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
field: "name",
|
||||
width: '15%',
|
||||
title: "物机名称",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "module",
|
||||
width: '15%',
|
||||
title: "规格 ",
|
||||
unresize: true,
|
||||
field: "module",
|
||||
width: '15%',
|
||||
title: "规格 ",
|
||||
unresize: true,
|
||||
},
|
||||
{
|
||||
field: "unit",
|
||||
title: "单位",
|
||||
width: '10%',
|
||||
unresize: true,
|
||||
align: "center",
|
||||
field: "unit",
|
||||
title: "单位",
|
||||
width: '10%',
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "needNum",
|
||||
title: "需要量",
|
||||
width: '10%',
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return setNumColor(d.needNum,1);
|
||||
},
|
||||
field: "needNum",
|
||||
title: "需要量",
|
||||
width: '10%',
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return setNumColor(d.needNum, 1);
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "num",
|
||||
title: "库存量",
|
||||
width: '10%',
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return setNumColor(d.num,2);
|
||||
},
|
||||
field: "num",
|
||||
title: "库存量",
|
||||
width: '10%',
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return setNumColor(d.num, 2);
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "diff",
|
||||
title: "超出量",
|
||||
width: '10%',
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return setNumColor(d.diff,3);
|
||||
},
|
||||
field: "diff",
|
||||
title: "超出量",
|
||||
width: '10%',
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return setNumColor(d.diff, 3);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "来源工程",
|
||||
width: '10%',
|
||||
align: "center",
|
||||
unresize: true,
|
||||
templet: function (d) {
|
||||
let html = "";
|
||||
html += "<a onclick=\"viewSource('" + d.proId + "',1)\">查看来源</a>";
|
||||
return html;
|
||||
},
|
||||
title: "来源工程",
|
||||
width: '10%',
|
||||
align: "center",
|
||||
unresize: true,
|
||||
templet: function (d) {
|
||||
let html = "";
|
||||
html += "<a onclick='viewSource(" + JSON.stringify(d) + ")'>查看来源</a>";
|
||||
return html;
|
||||
},
|
||||
},
|
||||
]
|
||||
]
|
||||
],
|
||||
limits: [10, 15, 20, 25, 50, 100],
|
||||
limit: 10,
|
||||
|
|
@ -170,13 +171,13 @@ function setFontBold(value) {
|
|||
function setNumColor(value, type) {
|
||||
let color = "#409Eff";
|
||||
if (type === 1) {
|
||||
color = "#409Eff";
|
||||
color = "#409Eff";
|
||||
} else if (type === 2) {
|
||||
color = "#19be6b";
|
||||
color = "#19be6b";
|
||||
} else if (type === 3) {
|
||||
color = "#f56c6c";
|
||||
}else if (type === 4) {
|
||||
color = "#f56c6c";
|
||||
color = "#f56c6c";
|
||||
} else if (type === 4) {
|
||||
color = "#f56c6c";
|
||||
}
|
||||
return '<span style="color:' + color + '">' + value + "</span>";
|
||||
}
|
||||
|
|
@ -204,6 +205,6 @@ function print() {
|
|||
}
|
||||
|
||||
// 查看来源
|
||||
function viewSource(id) {
|
||||
openIframeByParam("viewSource", "未发货机具设备超出库存数量-数据来源", "./view_resource_list.html", "92%", "95%", id);
|
||||
function viewSource(obj) {
|
||||
openIframeByParamObj2("excess_inventory_source", "数据来源", "./excess_inventory_source.html", "92%", "95%", obj);
|
||||
}
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
let objParam;
|
||||
let form, table, element, tableIns, layer;
|
||||
let pageNum = 1;
|
||||
function setParams(obj) {
|
||||
objParam = JSON.parse(obj);
|
||||
console.log(objParam);
|
||||
layui.use(["form", "table", 'element', 'layer'], function () {
|
||||
form = layui.form;
|
||||
table = layui.table;
|
||||
element = layui.element;
|
||||
layer = layui.layer;
|
||||
getDataInfoDetails();
|
||||
initTable();
|
||||
});
|
||||
}
|
||||
|
||||
// 基本数据
|
||||
function getDataInfoDetails() {
|
||||
let encryptedData = {
|
||||
'moduleId': objParam.moduleId,
|
||||
};
|
||||
let url = dataUrl + 'backstage/planOut/getDataInfoDetails?encryptedData=' + encodeURIComponent(JSON.stringify(encryptedData));
|
||||
ajaxRequest(url, "GET", null, true, function () {
|
||||
}, function (result) {
|
||||
console.log(result);
|
||||
if (result.code === 200) {
|
||||
setData(result.data);
|
||||
}
|
||||
}, function (xhr, status, error) {
|
||||
errorFn(xhr, status, error)
|
||||
}, null);
|
||||
|
||||
function setData(obj) {
|
||||
$('#type').html(obj.type);
|
||||
$('#name').html(obj.name);
|
||||
$('#unit').html(obj.unit);
|
||||
$('#module').html(obj.module);
|
||||
}
|
||||
}
|
||||
|
||||
function initTable() {
|
||||
tableIns = table.render({
|
||||
elem: "#currentTableId",
|
||||
id: 'currentTableId',
|
||||
headers: {
|
||||
authorization: sessionStorage.getItem("gz-token"),
|
||||
},
|
||||
height: "full-180",
|
||||
url: dataUrl + "backstage/planOut/getDataPlanByPage",
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'moduleId': objParam.moduleId
|
||||
}),
|
||||
},
|
||||
request: {
|
||||
pageName: 'pageNum',
|
||||
limitName: 'pageSize'
|
||||
},
|
||||
parseData: function (res) { // res 即为原始返回的数据
|
||||
return {
|
||||
"code": 0, // 解析接口状态
|
||||
"msg": '获取成功', // 解析提示文本
|
||||
"count": res.total, // 解析数据长度
|
||||
"data": res.list // 解析数据列表
|
||||
};
|
||||
},
|
||||
cols: [
|
||||
[
|
||||
{
|
||||
width: '9.8%',
|
||||
title: "序号",
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return d.LAY_NUM;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "proName",
|
||||
width: '30%',
|
||||
title: "工程名称 ",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "code",
|
||||
width: '30%',
|
||||
title: "需求计划编号",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
let html = "";
|
||||
html += "<a onclick='demand_plan(" + JSON.stringify(d) + ")'>"+d.code+"</a>";
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "needNum",
|
||||
width: '10%',
|
||||
title: "需用量 ",
|
||||
unresize: true,
|
||||
templet: function (d) {
|
||||
return setNumColor(d.needNum, 1);
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "needNum",
|
||||
title: "已发货量",
|
||||
width: '10%',
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return setNumColor(d.needNum, 2);
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "needNum",
|
||||
title: "待发货量",
|
||||
width: '10%',
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return setNumColor(d.needNum, 3);
|
||||
},
|
||||
}
|
||||
]
|
||||
],
|
||||
limits: [10, 15, 20, 25, 50, 100],
|
||||
limit: 10,
|
||||
page: true,
|
||||
done: function (res, curr, count) {
|
||||
pageNum = tableIns.config.page.curr;
|
||||
element.render();
|
||||
table.resize("currentTableId");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// 数量颜色 1.需要量 2.已发货量 3.待发货量
|
||||
function setNumColor(value, type) {
|
||||
let color = "#409Eff";
|
||||
if (type === 1) {
|
||||
color = "#409Eff";
|
||||
} else if (type === 2) {
|
||||
color = "#19be6b";
|
||||
} else if (type === 3) {
|
||||
color = "#f56c6c";
|
||||
}
|
||||
return '<span style="color:' + color + '">' + value + "</span>";
|
||||
}
|
||||
|
||||
// 需求计划编号
|
||||
function demand_plan(obj){
|
||||
openIframeByParamObj2("demand_plan", "机具需求计划", "./excess_inventory_source.html", "92%", "95%", obj);
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ function reloadTable(pageNum) {
|
|||
encryptedData: JSON.stringify({
|
||||
'name': $('#name').val(),
|
||||
'module': $('#module').val(),
|
||||
type:2
|
||||
type: 2
|
||||
}),
|
||||
},
|
||||
},
|
||||
|
|
@ -55,7 +55,7 @@ function initTable() {
|
|||
encryptedData: JSON.stringify({
|
||||
'name': $('#name').val(),
|
||||
'module': $('#module').val(),
|
||||
type:2
|
||||
type: 2
|
||||
}),
|
||||
},
|
||||
request: {
|
||||
|
|
@ -132,7 +132,7 @@ function initTable() {
|
|||
unresize: true,
|
||||
templet: function (d) {
|
||||
let html = "";
|
||||
html += "<a onclick=\"viewSource('" + d.proId + "',2)\">来源查询</a>";
|
||||
html += "<a onclick=\"viewSource('" + d.proId + "',2)\">查看来源</a>";
|
||||
return html;
|
||||
},
|
||||
},
|
||||
|
|
@ -158,13 +158,13 @@ function setFontBold(value) {
|
|||
function setNumColor(value, type) {
|
||||
let color = "#409Eff";
|
||||
if (type === 1) {
|
||||
color = "#409Eff";
|
||||
color = "#409Eff";
|
||||
} else if (type === 2) {
|
||||
color = "#19be6b";
|
||||
color = "#19be6b";
|
||||
} else if (type === 3) {
|
||||
color = "#f56c6c";
|
||||
}else if (type === 4) {
|
||||
color = "#f56c6c";
|
||||
color = "#f56c6c";
|
||||
} else if (type === 4) {
|
||||
color = "#f56c6c";
|
||||
}
|
||||
return '<span style="color:' + color + '">' + value + "</span>";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,3 +57,25 @@ function openIframeByParamObj(id, title, content, width, height,paramsObj) {
|
|||
end:function(){}
|
||||
});
|
||||
}
|
||||
|
||||
function openIframeByParamObj2(id, title, content, width, height,paramsObj) {
|
||||
let layerIndex = parent.layer.open({
|
||||
id: id,
|
||||
type: 2,
|
||||
title: ['<div style="border-left: 3px solid #409EFF;color:#409EFF;font-size:18px;letter-spacing:1px;display: flex;align-items: center;height: 20px;padding: 0 10px;font-weight: bold;">' + title + '</div>', 'font-size:16px;background-color:#f0f0f0;display: flex;align-items: center;'],
|
||||
content: content,
|
||||
shade: 0.3,
|
||||
anim: 2,
|
||||
shadeClose: false,
|
||||
area: [width, height],
|
||||
move: false,
|
||||
success: function () {
|
||||
if(paramsObj){
|
||||
let iframeWin = parent.window["layui-layer-iframe" + layerIndex];
|
||||
iframeWin.setParams(JSON.stringify(paramsObj));
|
||||
}
|
||||
},
|
||||
cancel:function () {},
|
||||
end:function(){}
|
||||
});
|
||||
}
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>机具需求计划</title>
|
||||
<link rel="stylesheet" href="../../../lib/layui-v2.9.18/layui/css/layui.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/demandPlan/apply_plan_detail.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div id="main-box">
|
||||
<div id="plan-detail-box" class="layout">
|
||||
<div class="layout" style="width: 100%;justify-content: space-between;">
|
||||
<p style="font-size: 20px;font-weight: bold;">机具需求计划</p>
|
||||
<button type="button" class="layui-btn" onclick="print()">打印</button>
|
||||
</div>
|
||||
<div class="layout">
|
||||
<p id="code"></p>
|
||||
<div>
|
||||
<span id="checkStatus"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--基本信息-->
|
||||
<div id="plan-basic-box" class="layout">
|
||||
<p>基本信息</p>
|
||||
<div id="plan-basic-table">
|
||||
<table class="classTable">
|
||||
<tr>
|
||||
<th>项目名称</th>
|
||||
<th>项目部分</th>
|
||||
<th>工程内容</th>
|
||||
<th>需用日期</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="proName"></td>
|
||||
<td id="projectPart"></td>
|
||||
<td id="projectContent"></td>
|
||||
<td id="needTime"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">计划说明</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" id="remark"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!--机具明细-->
|
||||
<div id="implement-box" class="layout">
|
||||
<p>机具明细</p>
|
||||
<div class="page-content">
|
||||
<div class="row-fluid">
|
||||
<div class="col-xs-12">
|
||||
<form id="baseForm" class="form-inline" method="POST"
|
||||
onsubmit="return false;">
|
||||
<div class="row">
|
||||
<div class="widget-main">
|
||||
  <input type="text" name="keyWord" id="keyWord"
|
||||
placeholder="输入物机名称" class="input-large" maxlength="30">
|
||||
<input type="text" name="keyWord2" id="keyWord2"
|
||||
placeholder="输入规格" class="input-large" maxlength="30">
|
||||
<button id='searchBtn' class="btn btn-warning btn-sm"
|
||||
title="过滤" type="button" onclick="search()">
|
||||
<i class="icon-search bigger-110 icon-only"></i>
|
||||
</button>
|
||||
<button class="btn btn-sm" title="重置" type="button"
|
||||
onclick="resetSearch()">重置</button>
|
||||
<button class="btn btn-danger btn-sm" title="下载" type="button"
|
||||
onclick="exportData()">下载</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type='hidden' class='pageNum' name='pageNum' value='1' />
|
||||
<input type='hidden' class='pageSize' name='pageSize' value='10' />
|
||||
</form>
|
||||
<table id="baseTable"
|
||||
class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 10%" class="center hidden-480">序号</th>
|
||||
<th style="width: 15%" class="center">物机类型</th>
|
||||
<th style="width: 20%" class="center">物机名称</th>
|
||||
<th style="width: 10%" class="center">规格</th>
|
||||
<th style="width: 10%" class="center">单位</th>
|
||||
<th style="width: 10%" class="center">需用量</th>
|
||||
<th style="width: 10%" class="center">需用天数</th>
|
||||
<th style="width: 15%" class="center">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<!-- <div class="row">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-8">
|
||||
设置分页位置
|
||||
<div id="pageing" class="dataTables_paginate paging_bootstrap">
|
||||
<ul class="pagination"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 操作记录 -->
|
||||
<div id="oper-record-box" class="layout">
|
||||
<p>操作记录</p>
|
||||
<div class="layui-timeline">
|
||||
<div class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<h3 class="layui-timeline-title">8月18日</h3>
|
||||
<div class="layui-panel">
|
||||
<div class="oper-info layout">
|
||||
<div class="layout">
|
||||
<img src="${bonuspath}/static/img/user_head_icon.png">
|
||||
</div>
|
||||
<div class="user-oper layout">
|
||||
<div style="width: 100%">
|
||||
<span>王天峰</span><span>(13787220576)</span><span>项目管理中心</span>
|
||||
</div>
|
||||
<div style="width: 100%">
|
||||
<span>完结-审核确认通过,共耗时:21小时16分钟 原因备注:无</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layout">
|
||||
<img src="${bonuspath}/static/img/time_icon.png"> <span
|
||||
style="margin: 0 5px 0 5px;">2020-12-23 22:31</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<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/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>
|
||||
</html>
|
||||
|
|
@ -60,4 +60,5 @@
|
|||
<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/excess_inventory_list.js" charset="utf-8"></script>
|
||||
<script src="../../../js/openIframe.js" charset="utf-8"></script>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>超库存量-来源</title>
|
||||
<link rel="stylesheet" href="../../../lib/layui-v2.9.18/layui/css/layui.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/demandPlan/excess_inventory_source.css" media="all">
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="main-box">
|
||||
<div id="basic-box">
|
||||
<div class="title layout">
|
||||
<span style="font-weight:700;text-decoration:none;color:#409EFF;">▋</span>
|
||||
<p>基本信息</p>
|
||||
</div>
|
||||
<div id="basic-table">
|
||||
<table class="classTable">
|
||||
<tr>
|
||||
<th>物机类型</th>
|
||||
<td id="type"></td>
|
||||
<th>物机名称</th>
|
||||
<td id="name"></td>
|
||||
<th>规格</th>
|
||||
<td id="module"></td>
|
||||
<th>单位</th>
|
||||
<td id="unit"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>未发货量</th>
|
||||
<td id="type"></td>
|
||||
<th>库存量</th>
|
||||
<td id="type"></td>
|
||||
<th>差量</th>
|
||||
<td id="type"></td>
|
||||
<th>工程数量</th>
|
||||
<td id="type"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="source-box">
|
||||
<div class="title layout">
|
||||
<span style="font-weight:700;text-decoration:none;color:#409EFF;">▋</span>
|
||||
<p>来源明细</p>
|
||||
</div>
|
||||
<div class="table-box" table-responsive style="z-index: 1;width: 98%;margin: 0 1%;">
|
||||
<table class="layui-hide" id="currentTableId" lay-filter="currentTableId2"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<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/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/excess_inventory_source.js" charset="utf-8"></script>
|
||||
<script src="../../../js/openIframe.js" charset="utf-8"></script>
|
||||
</html>
|
||||
Loading…
Reference in New Issue