From f4f958762efbff93c9fcec9a63be6484b7c673ab Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Wed, 13 Nov 2024 11:03:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E4=BB=B6=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/accessory/child/accessory_store_detail.js | 48 +++++++++---------- js/public.js | 2 +- .../child/accessory_store_detail.html | 16 +++---- 3 files changed, 32 insertions(+), 34 deletions(-) diff --git a/js/accessory/child/accessory_store_detail.js b/js/accessory/child/accessory_store_detail.js index 221a0b8..ccd3492 100644 --- a/js/accessory/child/accessory_store_detail.js +++ b/js/accessory/child/accessory_store_detail.js @@ -1,51 +1,49 @@ let objParam; -let id = getUrlParam('id'); // 批次ID -let time = getUrlParam('time'); // 批次日期 let form, table, element, tableIns, layer; let pageNum = 1; function setParams(params) { objParam = JSON.parse(params); - layui.use(["form", "table", 'element', 'layer'], function () { + console.error(objParam); + $('#code').html(objParam.code); + $('#titleName').html(objParam.inputDay + '配件入库记录'); + layui.use(["form", "table", 'element', 'layer'], function () { form = layui.form; table = layui.table; element = layui.element; layer = layui.layer; - getOutDetails(); - initTable(); + getInputDetails(); + // initTable(); }); } - -// 基本信息和附件文档接口 -function getOutDetails() { +// 获取配件到货入库详情 +function getInputDetails() { let params = { encryptedData: JSON.stringify({ - 'proId': objParam.proId, - 'id': id + 'id': objParam.id }) }; - let url = dataUrl + 'backstage/planOut/getOutDetails'; + let url = dataUrl + 'backstage/partInput/getInputDetails'; ajaxRequest(url, "POST", params, true, function () { }, function (result) { console.error(result); if (result.code === 200) { - setBasicValue(result.data); - setFileTable(result.data.fileList); + setTableData(result.data); } else { - setBasicValue(null); - setFileTable(null); } }, function (xhr, status, error) { errorFn(xhr, status, error) }, null); -} - -function setBasicValue(obj) { - if (obj) { - $('#userName').html(obj.userName); parseInt(); - $('#createDay').html(obj.createDay + '查看概述'); - $('#remark').html(obj.remarks); + // 基本数据表格赋值 + 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); + setFileTable(obj.fileList); } } @@ -57,8 +55,8 @@ function setFileTable(fileList) { $.each(fileList, function (index, item) { html += '' + '' + handleFileType(item.fileName) + item.fileName + '' + + ''+(item.suffix.replace('.',''))+'' + '' + item.createName + '' + - '入库附件' + '' + item.createTime + '' + '预览' + '下载' + @@ -261,8 +259,8 @@ function viewGs(obj) { layer.open({ type: 1, shade: false, // 不显示遮罩 - content: '
' + obj.details + '
', - title: '

' + obj.createDay + '发货概述:

', + content: '
' + obj.info + '
', + title: '

' + obj.inputDay + '入库概述:

', btn: ['复制文字', '关闭'], area: ['60%', '50%'], move: false, diff --git a/js/public.js b/js/public.js index adb0279..6978d3f 100644 --- a/js/public.js +++ b/js/public.js @@ -1,5 +1,5 @@ const dataUrl = 'http://127.0.0.1:21995/'; // 数据请求路径 -const fileUrl = 'http://127.0.0.1:21995/'; // 文件路径 +const fileUrl = 'http://127.0.0.1:21995/statics'; // 文件路径 diff --git a/page/accessory/child/accessory_store_detail.html b/page/accessory/child/accessory_store_detail.html index 0f3cdea..9c72a74 100644 --- a/page/accessory/child/accessory_store_detail.html +++ b/page/accessory/child/accessory_store_detail.html @@ -38,7 +38,7 @@

2024-05-05配件入库记录

-

20240607096

+

@@ -60,11 +60,11 @@ 入库日期 - - - - - + + + + + 备注 @@ -83,8 +83,8 @@
- - + +
文件名文件类型文件名文件类型 上传人员 上传时间 操作