From 894c72044d87a624d768b7324a1da67ca150e1a9 Mon Sep 17 00:00:00 2001
From: cwchen <1048842385@qq.com>
Date: Sat, 16 Nov 2024 13:51:58 +0800
Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
js/accessory/child/accessory_scrap_detail.js | 64 +++++++++----------
.../child/accessory_scrap_detail.html | 12 ++--
2 files changed, 37 insertions(+), 39 deletions(-)
diff --git a/js/accessory/child/accessory_scrap_detail.js b/js/accessory/child/accessory_scrap_detail.js
index 762c9f0..b6e7498 100644
--- a/js/accessory/child/accessory_scrap_detail.js
+++ b/js/accessory/child/accessory_scrap_detail.js
@@ -5,25 +5,25 @@ let pageNum = 1;
function setParams(params) {
objParam = JSON.parse(params);
$('#code').html(objParam.code);
- $('#titleName').html(objParam.inputDay + '配件报废记录');
+ $('#titleName').html(objParam.scrapDay + '配件报废记录');
layui.use(["form", "table", 'upload', 'layer'], function () {
form = layui.form;
table = layui.table;
upload = layui.upload;
layer = layui.layer;
- getInputDetails();
+ getDetailsById();
initTable();
});
}
-// 获取配件到货入库详情
-function getInputDetails() {
+// 获取配件报废记录详情
+function getDetailsById() {
let params = {
encryptedData: JSON.stringify({
'id': objParam.id
})
};
- let url = dataUrl + 'backstage/partInput/getInputDetails';
+ let url = dataUrl + 'backstage/partScrap/getDetailsById';
ajaxRequest(url, "POST", params, true, function () {
}, function (result) {
console.error(result);
@@ -37,10 +37,9 @@ 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);
+ $('#bfNum').html(obj.bfNum);
+ $('#userName').html(obj.userName);
+ $('#scrapDay').html(obj.scrapDay);
$('#remark').html(obj.remark);
setFileTable(obj.fileList);
}
@@ -54,7 +53,7 @@ function setFileTable(fileList) {
$.each(fileList, function (index, item) {
html += '
' +
'| ' + handleFileType(item.fileName) + item.fileName + ' | ' +
- '' + (item.suffix.replace('.', '')) + ' | ' +
+ '' + item.type + ' | ' +
' ' + item.createName + ' | ' +
'' + item.createTime + ' | ' +
'预览' +
@@ -89,9 +88,9 @@ function queryTable(type) {
if (type === 1) {
reloadTable(1);
} else if (type === 2) {
- $('#type').val('');
- $('#name').val('');
- $('#model').val('');
+ $('#partType').val('');
+ $('#partName').val('');
+ $('#partModel').val('');
layui.form.render();
reloadTable(1);
}
@@ -110,9 +109,9 @@ function reloadTable(pageNum) {
},
where: {
encryptedData: JSON.stringify({
- 'type': $('#type').val(),
- 'name': $('#name').val(),
- 'model': $('#model').val(),
+ 'partType': $('#partType').val(),
+ 'partName': $('#partName').val(),
+ 'partModel': $('#partModel').val(),
'id': objParam.id
}),
},
@@ -129,12 +128,12 @@ function initTable() {
authorization: sessionStorage.getItem("gz-token"),
},
height: "full",
- url: dataUrl + "backstage/partInput/getInputDetailListByPage",
+ url: dataUrl + "backstage/partScrap/getDetailsByIdList",
where: {
encryptedData: JSON.stringify({
- 'type': $('#type').val(),
- 'name': $('#name').val(),
- 'model': $('#model').val(),
+ 'partType': $('#partType').val(),
+ 'partName': $('#partName').val(),
+ 'partModel': $('#partModel').val(),
'id': objParam.id
}),
},
@@ -189,21 +188,21 @@ function initTable() {
align: "center",
},
{
- field: "inputNum",
+ field: "scrapNum",
title: "报废量",
width: '10%',
unresize: true,
align: "center",
},
{
- field: "partPrice",
+ field: "price",
width: '10%',
title: "单价(元)",
unresize: true,
align: "center",
},
{
- field: "vendName",
+ field: "money",
width: '15%',
title: "金额(元)",
unresize: true,
@@ -233,14 +232,13 @@ function initTable() {
// 导出
function exportExcel() {
let params = {
- 'name': $('#name').val(),
- 'module': $('#module').val(),
- 'proId': objParam.proId,
- 'id': id,
- 'curryDay': time
+ 'partType': $('#partType').val(),
+ 'partName': $('#partName').val(),
+ 'partModel': $('#partModel').val(),
+ 'id': objParam.id,
}
- let url = dataUrl + "backstage/export/exportPcList";
- exportExcelUtil(url, '发货详情-批次-' + time, JSON.stringify(params));
+ let url = dataUrl + "backstage/partScrap/exportDetail";
+ exportExcelUtil(url, '报废明细', JSON.stringify(params));
}
// 打印
@@ -260,14 +258,14 @@ function viewGs(obj) {
layer.open({
type: 1,
shade: false, // 不显示遮罩
- content: ' ' + obj.info + ' ',
- title: '' + obj.inputDay + '入库概述:',
+ content: '' + obj.infoMsg + ' ',
+ title: '' + obj.scrapDay + '入库概述:',
btn: ['复制文字', '关闭'],
area: ['60%', '50%'],
move: false,
btnAlign: 'c', // 按钮居中显示
btn1: function () {
- exeCommandCopyText(obj.info);
+ exeCommandCopyText(obj.infoMsg);
},
btn2: function () {
layer.close();
diff --git a/page/accessory/child/accessory_scrap_detail.html b/page/accessory/child/accessory_scrap_detail.html
index c6b9329..6a0427d 100644
--- a/page/accessory/child/accessory_scrap_detail.html
+++ b/page/accessory/child/accessory_scrap_detail.html
@@ -60,9 +60,9 @@
|