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