diff --git a/js/accessory/accessory_out_bound_list.js b/js/accessory/accessory_out_bound_list.js
index e90a238..2a983a8 100644
--- a/js/accessory/accessory_out_bound_list.js
+++ b/js/accessory/accessory_out_bound_list.js
@@ -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 '' + value + ''
@@ -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);
}
\ No newline at end of file
diff --git a/js/accessory/child/accessory_out_bound_detail.js b/js/accessory/child/accessory_out_bound_detail.js
index aa84063..4ab3dd2 100644
--- a/js/accessory/child/accessory_out_bound_detail.js
+++ b/js/accessory/child/accessory_out_bound_detail.js
@@ -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('');
- } else if (objParam.type === 3) { // 出库
+ } else if (objParam.operType === 3) { // 出库
$('#print').before('');
$('#upload').removeAttr('style');
}
- if (objParam.devType === '0') { // 设备
- let html = '';
- html += '
' +
- '| 内部编号 | 使用机型 | 使用单位 | | '
- '
';
- html += '' +
- '| GS511 | 机动绞磨 柴油 5T | xxxxxxxxxxxx工程 | | '
- '
';
- $('#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 + '查看概述');
- $('#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('
');
+ $('#zdUrl').html('
');
+ $('#ckUrl').html('
');
+ $('#shUrl').html('
');
setFileTable(obj.fileList);
+ if (objParam.type === '0') { // 设备
+ let html = '';
+ html += '' +
+ '| 内部编号 | 使用机型 | 使用单位 | | '
+ '
';
+ html += '' +
+ '| ' + obj.devCode + ' | ' + obj.devType + ' | ' + obj.proName + ' | | '
+ '
';
+ $('#lastTr').before(html);
+ }
}
}
@@ -384,8 +383,8 @@ function viewGs(obj) {
layer.open({
type: 1,
shade: false, // 不显示遮罩
- content: '' + obj.info + '
',
- title: '' + obj.inputDay + '入库概述:
',
+ content: '' + obj.infoMsg + '
',
+ title: '' + obj.createTime.substring(0, 10) + '出库概述:
',
btn: ['复制文字', '关闭'],
area: ['60%', '50%'],
move: false,
diff --git a/js/accessory/child/audit_form.js b/js/accessory/child/audit_form.js
index 7436d75..e3428da 100644
--- a/js/accessory/child/audit_form.js
+++ b/js/accessory/child/audit_form.js
@@ -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);
}
// 关闭页面
diff --git a/js/accessory/child/choose_fit_type_list.js b/js/accessory/child/choose_fit_type_list.js
index 15b4577..5ca16f8 100644
--- a/js/accessory/child/choose_fit_type_list.js
+++ b/js/accessory/child/choose_fit_type_list.js
@@ -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(),
diff --git a/page/accessory/child/accessory_out_bound_detail.html b/page/accessory/child/accessory_out_bound_detail.html
index be7ecfd..871e69e 100644
--- a/page/accessory/child/accessory_out_bound_detail.html
+++ b/page/accessory/child/accessory_out_bound_detail.html
@@ -30,6 +30,10 @@
width: 50px;
height: 50pz;
}
+
+ .classTable {
+ width: 98%;
+ }
@@ -73,9 +77,9 @@
|
- |
- |
- |
+ |
+ |
+
| 领用 |
@@ -84,10 +88,10 @@
审核 |
- |
- |
- |
- |
+ |
+ |
+ |
+ |
@@ -112,7 +116,7 @@