This commit is contained in:
parent
cf8f7ace45
commit
9b71272117
|
|
@ -95,16 +95,16 @@ function initTable() {
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "devType",
|
field: "type",
|
||||||
width: '10%',
|
width: '10%',
|
||||||
title: "领用类型",
|
title: "领用类型",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
let value = '';
|
let value = '';
|
||||||
if (d.devType === '1') {
|
if (d.type === '1') {
|
||||||
value = '工器具';
|
value = '工器具';
|
||||||
} else if (d.devType === '0') {
|
} else if (d.type === '0') {
|
||||||
value = '设备';
|
value = '设备';
|
||||||
}
|
}
|
||||||
return '<span>' + value + '</span>'
|
return '<span>' + value + '</span>'
|
||||||
|
|
@ -201,7 +201,8 @@ function exportExcel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 详情 审核 出库确认
|
// 详情 审核 出库确认
|
||||||
function accessoryOutBoundDetail(obj) {
|
function accessoryOutBoundDetail(obj, type) {
|
||||||
|
obj.operType = type;
|
||||||
// 1.工器具 0.设备
|
// 1.工器具 0.设备
|
||||||
openIframeByParamObj("accessory_out_bound_detail", "配件出库记录", "../accessory/child/accessory_out_bound_detail.html", "92%", "95%", obj);
|
openIframeByParamObj("accessory_out_bound_detail", "配件出库记录", "../accessory/child/accessory_out_bound_detail.html", "92%", "95%", obj);
|
||||||
}
|
}
|
||||||
|
|
@ -5,24 +5,14 @@ let pageNum = 1;
|
||||||
function setParams(params) {
|
function setParams(params) {
|
||||||
objParam = JSON.parse(params);
|
objParam = JSON.parse(params);
|
||||||
console.error(objParam);
|
console.error(objParam);
|
||||||
if (objParam.type === 2) { // 审核
|
if (objParam.operType === 2) { // 审核
|
||||||
$('#print').before('<button type="button" class="layui-btn layui-bg-orange" onclick="check()">审核</button>');
|
$('#print').before('<button type="button" class="layui-btn layui-bg-orange" onclick="check()">审核</button>');
|
||||||
} else if (objParam.type === 3) { // 出库
|
} else if (objParam.operType === 3) { // 出库
|
||||||
$('#print').before('<button type="button" class="layui-btn layui-bg-blue save" onclick="submitApply()">确认出库</button>');
|
$('#print').before('<button type="button" class="layui-btn layui-bg-blue save" onclick="submitApply()">确认出库</button>');
|
||||||
$('#upload').removeAttr('style');
|
$('#upload').removeAttr('style');
|
||||||
}
|
}
|
||||||
if (objParam.devType === '0') { // 设备
|
|
||||||
let html = '';
|
|
||||||
html += '<tr>' +
|
|
||||||
'<th>内部编号</th><th>使用机型</th><th>使用单位</th><th></th>'
|
|
||||||
'</tr>';
|
|
||||||
html += '<tr>' +
|
|
||||||
'<td>GS511</td><td>机动绞磨 柴油 5T</td><td>xxxxxxxxxxxx工程</td><td></td>'
|
|
||||||
'</tr>';
|
|
||||||
$('#lastTr').before(html);
|
|
||||||
}
|
|
||||||
$('#code').html(objParam.code);
|
$('#code').html(objParam.code);
|
||||||
$('#titleName').html(objParam.inputDay + '配件出库记录');
|
$('#titleName').html(objParam.createTime.substring(0, 10) + '配件出库记录');
|
||||||
layui.use(["form", "table", 'upload', 'layer'], function () {
|
layui.use(["form", "table", 'upload', 'layer'], function () {
|
||||||
form = layui.form;
|
form = layui.form;
|
||||||
table = layui.table;
|
table = layui.table;
|
||||||
|
|
@ -59,7 +49,7 @@ function setParams(params) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
getInputDetails();
|
getPartDetails();
|
||||||
initTable();
|
initTable();
|
||||||
// 设置文件类型
|
// 设置文件类型
|
||||||
function handleFileType(index, file, result) {
|
function handleFileType(index, file, result) {
|
||||||
|
|
@ -141,15 +131,13 @@ function submitApply() {
|
||||||
}, null);
|
}, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取配件到货入库详情
|
// 获取领料出库详情
|
||||||
function getInputDetails() {
|
function getPartDetails() {
|
||||||
let params = {
|
let encryptedData = {
|
||||||
encryptedData: JSON.stringify({
|
'id': objParam.id
|
||||||
'id': objParam.id
|
|
||||||
})
|
|
||||||
};
|
};
|
||||||
let url = dataUrl + 'backstage/partInput/getInputDetails';
|
let url = dataUrl + 'backstage/partApply/getPartDetails?encryptedData=' + encodeURIComponent(JSON.stringify(encryptedData));
|
||||||
ajaxRequest(url, "POST", params, true, function () {
|
ajaxRequest(url, "GET", null, true, function () {
|
||||||
}, function (result) {
|
}, function (result) {
|
||||||
console.error(result);
|
console.error(result);
|
||||||
if (result.code === 200) {
|
if (result.code === 200) {
|
||||||
|
|
@ -162,12 +150,23 @@ function getInputDetails() {
|
||||||
// 基本数据表格赋值
|
// 基本数据表格赋值
|
||||||
function setTableData(obj) {
|
function setTableData(obj) {
|
||||||
$('#codeValue').html(obj.code + '<a style="margin:0 5px;color:#409EFF;cursor: pointer;" onclick=\'viewGs(' + JSON.stringify(obj) + ')\'>查看概述</a>');
|
$('#codeValue').html(obj.code + '<a style="margin:0 5px;color:#409EFF;cursor: pointer;" onclick=\'viewGs(' + JSON.stringify(obj) + ')\'>查看概述</a>');
|
||||||
$('#inputNum').html(obj.inputNum);
|
$('#type').html(obj.type === '0' ? '设备' : '工器具');
|
||||||
$('#allPrice').html(obj.allPrice);
|
$('#applyNum').html(obj.applyNum);
|
||||||
$('#inputUser').html(obj.inputUser);
|
$('#lyUrl').html('<img src="'+(fileUrl+obj.lyUrl + '?token='+ sessionStorage.getItem('gz-token'))+'">');
|
||||||
$('#inputDay').html(obj.inputDay);
|
$('#zdUrl').html('<img src="'+(fileUrl+obj.zdUrl + '?token='+ sessionStorage.getItem('gz-token'))+'">');
|
||||||
$('#remark').html(obj.remark);
|
$('#ckUrl').html('<img src="'+(fileUrl+obj.ckUrl + '?token='+ sessionStorage.getItem('gz-token'))+'">');
|
||||||
|
$('#shUrl').html('<img src="'+(fileUrl+obj.shUrl + '?token='+ sessionStorage.getItem('gz-token'))+'">');
|
||||||
setFileTable(obj.fileList);
|
setFileTable(obj.fileList);
|
||||||
|
if (objParam.type === '0') { // 设备
|
||||||
|
let html = '';
|
||||||
|
html += '<tr>' +
|
||||||
|
'<th>内部编号</th><th>使用机型</th><th>使用单位</th><th></th>'
|
||||||
|
'</tr>';
|
||||||
|
html += '<tr>' +
|
||||||
|
'<td>' + obj.devCode + '</td><td>' + obj.devType + '</td><td>' + obj.proName + '</td><td></td>'
|
||||||
|
'</tr>';
|
||||||
|
$('#lastTr').before(html);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -384,8 +383,8 @@ function viewGs(obj) {
|
||||||
layer.open({
|
layer.open({
|
||||||
type: 1,
|
type: 1,
|
||||||
shade: false, // 不显示遮罩
|
shade: false, // 不显示遮罩
|
||||||
content: '<div style="padding: 1%;">' + obj.info + '</div>',
|
content: '<div style="padding: 1%;">' + obj.infoMsg + '</div>',
|
||||||
title: '<h3 style="color: #F56C6C;">' + obj.inputDay + '入库概述:</h3>',
|
title: '<h3 style="color: #F56C6C;">' + obj.createTime.substring(0, 10) + '出库概述:</h3>',
|
||||||
btn: ['复制文字', '关闭'],
|
btn: ['复制文字', '关闭'],
|
||||||
area: ['60%', '50%'],
|
area: ['60%', '50%'],
|
||||||
move: false,
|
move: false,
|
||||||
|
|
|
||||||
|
|
@ -36,52 +36,38 @@ function submitApply(data) {
|
||||||
});
|
});
|
||||||
|
|
||||||
let url = '';
|
let url = '';
|
||||||
if (objParam.checkType === '1') {
|
if (objParam.checkType === '1') { // 出库审核
|
||||||
url = '';
|
url = dataUrl + 'backstage/partApply/auditData';
|
||||||
data.field.id = idParam;
|
data.field.id = idParam;
|
||||||
} else if (objParam.checkType === '2') { // 需求计划审核
|
} else if (objParam.checkType === '2') { // 需求计划审核
|
||||||
url = dataUrl + 'backstage/planAudit/planAudit';
|
url = dataUrl + 'backstage/planAudit/planAudit';
|
||||||
data.field.id = idParam;
|
data.field.id = idParam;
|
||||||
}
|
}
|
||||||
|
let params = {
|
||||||
|
encryptedData: JSON.stringify(data.field)
|
||||||
|
};
|
||||||
console.log(JSON.stringify(data.field));
|
console.log(JSON.stringify(data.field));
|
||||||
$.ajax({
|
ajaxRequest(url, "POST", params, true, function () {
|
||||||
url: url,
|
$('.save').addClass("layui-btn-disabled").attr("disabled", true);
|
||||||
type: 'POST',
|
$('.cancel').addClass("layui-btn-disabled").attr("disabled", true);
|
||||||
data: JSON.stringify(data.field),
|
}, function (result) {
|
||||||
dataType: 'json',
|
console.log(result);
|
||||||
contentType: "application/json",
|
layer.close(loadingMsg);
|
||||||
beforeSend: function () {
|
$('.save').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||||
$('.save').addClass("layui-btn-disabled").attr("disabled", true);
|
$('.cancel').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||||
$('.cancel').addClass("layui-btn-disabled").attr("disabled", true);
|
if (result.code === 200) {
|
||||||
},
|
parent.layer.msg(result.msg, { icon: 1 });
|
||||||
success: function (result) {
|
closePage(1);
|
||||||
layer.close(loadingMsg); // 关闭提示层
|
} else {
|
||||||
if (result.res === 1) {
|
layer.msg(result.msg, { icon: 2 });
|
||||||
parent.layer.msg(result.msg, {
|
|
||||||
icon: 1
|
|
||||||
});
|
|
||||||
closePage(1);
|
|
||||||
} else {
|
|
||||||
var indexMsg = layer.confirm(result.msg, {
|
|
||||||
btn: ['关闭']
|
|
||||||
}, function () {
|
|
||||||
layer.close(indexMsg);
|
|
||||||
});
|
|
||||||
$('.save').removeClass("layui-btn-disabled").attr("disabled", false);
|
|
||||||
$('.cancel').removeClass("layui-btn-disabled").attr("disabled", false);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function (result) {
|
|
||||||
layer.close(loadingMsg); // 关闭提示层
|
|
||||||
layer.msg('服务异常,请稍后重试', {
|
|
||||||
icon: 16,
|
|
||||||
scrollbar: false,
|
|
||||||
time: 2000
|
|
||||||
});
|
|
||||||
$('.save').removeClass("layui-btn-disabled").attr("disabled", false);
|
|
||||||
$('.cancel').removeClass("layui-btn-disabled").attr("disabled", false);
|
|
||||||
}
|
}
|
||||||
});
|
}, function (xhr, status, error) {
|
||||||
|
layer.close(loadingMsg); // 关闭提示层
|
||||||
|
layer.msg('服务异常,请稍后重试', { icon: 16, scrollbar: false, time: 2000 });
|
||||||
|
$('.save').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||||
|
$('.cancel').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||||
|
errorFn(xhr, status, error)
|
||||||
|
}, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭页面
|
// 关闭页面
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ function initTable() {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: sessionStorage.getItem("gz-token"),
|
authorization: sessionStorage.getItem("gz-token"),
|
||||||
},
|
},
|
||||||
url: dataUrl + "backstage/paType/findByPage",
|
url: dataUrl + "backstage/paType/findByPageList",
|
||||||
where: {
|
where: {
|
||||||
encryptedData: JSON.stringify({
|
encryptedData: JSON.stringify({
|
||||||
'type': $('#type').val(),
|
'type': $('#type').val(),
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,10 @@
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50pz;
|
height: 50pz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.classTable {
|
||||||
|
width: 98%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<body id="body">
|
<body id="body">
|
||||||
|
|
@ -73,9 +77,9 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td id="codeValue"></td>
|
<td id="codeValue"></td>
|
||||||
<td id="inputNum"></td>
|
<td id="type"></td>
|
||||||
<td id="allPrice"></td>
|
<td id="applyNum"></td>
|
||||||
<td id="inputUser"></td>
|
<td id="remark"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="lastTr">
|
<tr id="lastTr">
|
||||||
<th>领用</th>
|
<th>领用</th>
|
||||||
|
|
@ -84,10 +88,10 @@
|
||||||
<th>审核</th>
|
<th>审核</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td id="ly"></td>
|
<td id="lyUrl"></td>
|
||||||
<td id="zd"></td>
|
<td id="zdUrl"></td>
|
||||||
<td id="ck"></td>
|
<td id="ckUrl"></td>
|
||||||
<td id="sh"></td>
|
<td id="shUrl"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -112,7 +116,7 @@
|
||||||
<div id="fhjj-box">
|
<div id="fhjj-box">
|
||||||
<div class="title layout">
|
<div class="title layout">
|
||||||
<span style="font-weight:700;text-decoration:none;color:#409EFF;">▋</span>
|
<span style="font-weight:700;text-decoration:none;color:#409EFF;">▋</span>
|
||||||
<p>入库明细</p>
|
<p>出库明细</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="layuimini-container">
|
<div class="layuimini-container">
|
||||||
<div class="layuimini-main">
|
<div class="layuimini-main">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue