From 09a5027109e48955b6c1c3e02839d70f6d12d170 Mon Sep 17 00:00:00 2001 From: jiang Date: Tue, 4 Nov 2025 16:55:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BC=8F=E6=B4=9E=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/init.json | 6 + .../child/accessory_out_bound_detail.js | 2 +- js/accessory/encoding_count_list.js | 169 ++++++++++++++++++ page/accessory/encoding_count_list.html | 56 ++++++ 4 files changed, 232 insertions(+), 1 deletion(-) create mode 100644 js/accessory/encoding_count_list.js create mode 100644 page/accessory/encoding_count_list.html diff --git a/api/init.json b/api/init.json index 4d68f27..9b2dd78 100644 --- a/api/init.json +++ b/api/init.json @@ -71,6 +71,12 @@ "icon": "fa fa-tachometer", "target": "_self" }, + { + "title": "编码领用统计", + "href": "page/accessory/encoding_count_list.html", + "icon": "fa fa-tachometer", + "target": "_self" + }, { "title": "配件库存查询", "href": "page/accessory/inventory_statistics_list.html", diff --git a/js/accessory/child/accessory_out_bound_detail.js b/js/accessory/child/accessory_out_bound_detail.js index 91a0bed..43b814b 100644 --- a/js/accessory/child/accessory_out_bound_detail.js +++ b/js/accessory/child/accessory_out_bound_detail.js @@ -174,7 +174,7 @@ function getPartDetails() { // } $('#lyUrl').html(obj.userName) $('#zdUrl').html(obj.zdUser) - $('#ckUrl').html(obj.ckUser) + $('#ckUrl').html("黄现梅") $('#shUrl').html(obj.fzUser) setFileTable(obj.fileList); if (objParam.type === '0') { // 设备 diff --git a/js/accessory/encoding_count_list.js b/js/accessory/encoding_count_list.js new file mode 100644 index 0000000..1888e35 --- /dev/null +++ b/js/accessory/encoding_count_list.js @@ -0,0 +1,169 @@ +let form, table; +let tableIns; +let pageNum = 1; // 定义分页 +layui.use(["form", "table"], function () { + form = layui.form; + table = layui.table; + initTable(); +}); + +// 查询/重置 +function queryTable(type) { + if (type === 1) { + let proName = $('#proName').val(); + let flag = checkValue(proName); + if (flag) { + $('#proName').val(''); + return layer.msg('工程名称查询包含特殊字符,请重新输入', {icon: 2}); + } + reloadTable(1); + } else if (type === 2) { + $('#proName').val(''); + // $('#proStatus').val(''); + layui.form.render(); + reloadTable(1); + } +} + +// 刷新页面数据 +function reloadData() { + reloadTable(pageNum); +} + +// 重载表格 +function reloadTable(pageNum) { + table.reload("currentTableId", { + page: { + curr: pageNum ? pageNum : 1, + }, + where: { + encryptedData: JSON.stringify({ + 'proName': $('#proName').val(), + // 'proStatus': $('#proStatus').val() + }), + }, + }, + ); +} + +// 初始化表格 +function initTable() { + tableIns = table.render({ + elem: "#currentTableId", + id: 'currentTableId', + headers: { + authorization: sessionStorage.getItem("gz-token"), + }, + height: "full-170", + url: dataUrl + "backstage/statistic/getEncodingListPage", + where: { + encryptedData: JSON.stringify({ + 'proName': $('#proName').val(), + // 'proStatus': $('#proStatus').val() + }), + }, + request: { + pageName: 'pageNum', + limitName: 'pageSize' + }, + parseData: function (res) { // res 即为原始返回的数据 + if (res.code === 401) { + closeWindowOpen(); + } + return { + "code": 0, // 解析接口状态 + "msg": '获取成功', // 解析提示文本 + "count": res.total, // 解析数据长度 + "data": res.list // 解析数据列表 + }; + }, + cols: [ + [ + { + width: '11.9%', + title: "序号", + align: "center", + templet: function (d) { + return d.LAY_NUM; + }, + }, + { + field: "proName", + width: '48.1%', + title: "编号", + unresize: true, + align: "center", + sort: true, + }, + + { + field: "lydNum", + width: '10%', + title: "配件领料单数量", + unresize: true, + align: "center", + sort: true, + templet: function (d) { + return '' + setNullNumValue(d.lydNum) + ''; + }, + }, + { + field: "lyNum", + width: '15%', + title: "领用数量", + unresize: true, + align: "center", + sort: true, + templet: function (d) { + return '

' + setNullNumValue(d.lyNum) + '

'; + }, + + }, + { + field: "lyMoney", + width: '15%', + title: "领用金额", + unresize: true, + align: "center", + sort: true, + templet: function (d) { + return '

' + setNullNumValue(d.lyMoney) + '

'; + }, + } + ], + ], + limits: [10, 15, 20, 25, 50, 100], + limit: 10, + page: true, + done: function (res, curr, count) { + pageNum = tableIns.config.page.curr; + table.resize("currentTableId"); + }, + }); +} + +// 导出 +function exportExcel() { + let params = { + 'proName': $('#proName').val(), + // 'proStatus': $('#proStatus').val() + } + let url = dataUrl + "backstage/statistic/exportProListPage"; + exportExcelUtil(url, '工程统计', JSON.stringify(params)); +} + +// 配件退料详情 +function proCountDetail(obj) { + openIframeByParamObj("pro_count_detail", "详情", "./child/pro_count_detail.html", "92%", "95%", obj); +} + +// 工程状态 +function setProStatus(status) { + if (status === '1') { + return "在建"; + } else if (status === '2') { + return "完工"; + } else { + return '/'; + } +} \ No newline at end of file diff --git a/page/accessory/encoding_count_list.html b/page/accessory/encoding_count_list.html new file mode 100644 index 0000000..7a3f6f1 --- /dev/null +++ b/page/accessory/encoding_count_list.html @@ -0,0 +1,56 @@ + + + + + + 工程统计 + + + + + + + + + +
+
+
+ 搜索信息 +
+
+
+
+
+ +
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+ + + + + + + + \ No newline at end of file