From 11bd2b46cfdc76a947fc28fdf11033456d12786b Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Tue, 30 Apr 2024 17:02:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=AC=E6=96=87=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/js/gw/gwDocumentSeeList.js | 70 +++++++++++++++++++ .../template/js/gw/gwSendDocumentList.js | 13 +++- .../template/tpl/gw/gwDocumentSeeList.html | 28 ++++++++ .../template/tpl/gw/gwSendDocumentList.html | 2 + .../js/otherOutlets/otherOutletsList.js | 2 +- .../js/otherWarehous/otherWarehousList.js | 2 +- .../js/purchaseOrder/purchaseOrderList.js | 2 +- .../js/purchasePut/purchasePutList.js | 2 +- .../js/purchaseReturns/purchaseReturnsList.js | 2 +- .../js/salesOrder/salesOrderChoose.js | 6 +- .../template/js/salesOrder/salesOrderList.js | 2 +- .../js/salesOutlet/salesOutletList.js | 2 +- .../js/salesReturns/salesReturnsList.js | 2 +- 13 files changed, 121 insertions(+), 14 deletions(-) create mode 100644 admin-assistant/src/main/resources/template/js/gw/gwDocumentSeeList.js create mode 100644 admin-assistant/src/main/resources/template/tpl/gw/gwDocumentSeeList.html diff --git a/admin-assistant/src/main/resources/template/js/gw/gwDocumentSeeList.js b/admin-assistant/src/main/resources/template/js/gw/gwDocumentSeeList.js new file mode 100644 index 000000000..65819a580 --- /dev/null +++ b/admin-assistant/src/main/resources/template/js/gw/gwDocumentSeeList.js @@ -0,0 +1,70 @@ + +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { + winui.renderColor(); + var $ = layui.$, + form = layui.form, + table = layui.table; + + // 加载列表数据权限 + loadAuthBtnGroup('messageTable', '1714464811697'); + + table.render({ + id: 'messageTable', + elem: '#messageTable', + method: 'post', + url: sysMainMation.admBasePath + 'queryGwSendDocumentList', + where: getTableParams(), + even: true, + page: true, + limits: getLimits(), + limit: getLimit(), + cols: [[ + { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, + { field: 'title', title: '标题', width: 300 }, + { field: 'sendDepartmentMation', title: '发文部门', width: 150, templet: function (d) { + return d.sendDepartmentMation?.name; + }}, + { field: 'year', title: '年份', align: 'center', width: 100 }, + { field: 'number', title: '第几号文', align: 'center', width: 100 }, + { field: 'enterprise', title: '企字', align: 'center', width: 100 }, + { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, + { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#messageTableBar' } + ]], + done: function(json) { + matchingLanguage(); + initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入标题", function () { + table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); + }); + } + }); + + // 操作事件 + table.on('tool(messageTable)', function (obj) { + var data = obj.data; + var layEvent = obj.event; + if (layEvent === 'preview') {//预览 + systemCommonUtil.showPicImg(systemCommonUtil.getFilePath(data.picPath)); + } else if (layEvent === 'download') {//下载 + download(fileBasePath + data.path, data.title); + } + }); + + form.render(); + $("body").on("click", "#reloadTable", function() { + loadTable(); + }); + function loadTable() { + table.reloadData("messageTable", {where: getTableParams()}); + } + + function getTableParams() { + return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable")); + } + + exports('gwDocumentSeeList', {}); +}); diff --git a/admin-assistant/src/main/resources/template/js/gw/gwSendDocumentList.js b/admin-assistant/src/main/resources/template/js/gw/gwSendDocumentList.js index d9bc91b34..43bac0c08 100644 --- a/admin-assistant/src/main/resources/template/js/gw/gwSendDocumentList.js +++ b/admin-assistant/src/main/resources/template/js/gw/gwSendDocumentList.js @@ -12,6 +12,9 @@ layui.config({ var serviceClassName = sysServiceMation["gwSendDocumentService"]["key"]; authBtn('1714130289379'); + + // 加载列表数据权限 + loadAuthBtnGroup('messageTable', '1714130296761'); table.render({ id: 'messageTable', @@ -54,7 +57,7 @@ layui.config({ { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 }, { field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#messageTableBar' } + { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 280, toolbar: '#messageTableBar' } ]], done: function(json) { matchingLanguage(); @@ -80,7 +83,11 @@ layui.config({ cancellation(data); } else if (layEvent === 'revoke') {//撤销 revoke(data); - } + } else if (layEvent === 'preview') {//预览 + systemCommonUtil.showPicImg(systemCommonUtil.getFilePath(data.picPath)); + } else if (layEvent === 'download') {//下载 + download(fileBasePath + data.path, data.title); + } }); // 撤销 @@ -149,7 +156,7 @@ layui.config({ } }); } - + // 添加 $("body").on("click", "#addBean", function() { _openNewWindows({ diff --git a/admin-assistant/src/main/resources/template/tpl/gw/gwDocumentSeeList.html b/admin-assistant/src/main/resources/template/tpl/gw/gwDocumentSeeList.html new file mode 100644 index 000000000..dcc627ed9 --- /dev/null +++ b/admin-assistant/src/main/resources/template/tpl/gw/gwDocumentSeeList.html @@ -0,0 +1,28 @@ + + + + + + + + + +
+
+ +
+
+
+
+ +
+ + + + + \ No newline at end of file diff --git a/admin-assistant/src/main/resources/template/tpl/gw/gwSendDocumentList.html b/admin-assistant/src/main/resources/template/tpl/gw/gwSendDocumentList.html index 551c986bd..53192d478 100644 --- a/admin-assistant/src/main/resources/template/tpl/gw/gwSendDocumentList.html +++ b/admin-assistant/src/main/resources/template/tpl/gw/gwSendDocumentList.html @@ -32,6 +32,8 @@ 撤销 {{# } }} {{# } }} + 预览 + 下载 diff --git a/erp/src/main/resources/template/js/otherOutlets/otherOutletsList.js b/erp/src/main/resources/template/js/otherOutlets/otherOutletsList.js index 80bf6a698..47706bb0f 100644 --- a/erp/src/main/resources/template/js/otherOutlets/otherOutletsList.js +++ b/erp/src/main/resources/template/js/otherOutlets/otherOutletsList.js @@ -28,7 +28,7 @@ layui.config({ return '' + d.oddNumber + ''; }}, { field: 'holderMation', title: '客户', align: 'left', width: 150, templet: function (d) { - return d.holderMation.name; + return d.holderMation?.name; }}, { field: 'totalPrice', title: '合计金额', align: 'left', width: 120 }, { field: 'operTime', title: '单据日期', align: 'center', width: 140 }, diff --git a/erp/src/main/resources/template/js/otherWarehous/otherWarehousList.js b/erp/src/main/resources/template/js/otherWarehous/otherWarehousList.js index ae6573c0c..1949383ac 100644 --- a/erp/src/main/resources/template/js/otherWarehous/otherWarehousList.js +++ b/erp/src/main/resources/template/js/otherWarehous/otherWarehousList.js @@ -28,7 +28,7 @@ layui.config({ return '' + d.oddNumber + ''; }}, { field: 'holderMation', title: '供应商', align: 'left', width: 150, templet: function (d) { - return d.holderMation.name; + return d.holderMation?.name; }}, { field: 'totalPrice', title: '合计金额', align: 'left', width: 120 }, { field: 'operTime', title: '单据日期', align: 'center', width: 140 }, diff --git a/erp/src/main/resources/template/js/purchaseOrder/purchaseOrderList.js b/erp/src/main/resources/template/js/purchaseOrder/purchaseOrderList.js index 0c7cad049..7087cbcf2 100644 --- a/erp/src/main/resources/template/js/purchaseOrder/purchaseOrderList.js +++ b/erp/src/main/resources/template/js/purchaseOrder/purchaseOrderList.js @@ -28,7 +28,7 @@ layui.config({ return '' + d.oddNumber + ''; }}, { field: 'holderMation', title: '供应商', align: 'left', width: 150, templet: function (d) { - return d.holderMation.name; + return d.holderMation?.name; }}, { field: 'totalPrice', title: '合计金额', align: 'left', width: 120 }, { field: 'operTime', title: '单据日期', align: 'center', width: 140 }, diff --git a/erp/src/main/resources/template/js/purchasePut/purchasePutList.js b/erp/src/main/resources/template/js/purchasePut/purchasePutList.js index e3e48310e..35e8740f9 100644 --- a/erp/src/main/resources/template/js/purchasePut/purchasePutList.js +++ b/erp/src/main/resources/template/js/purchasePut/purchasePutList.js @@ -32,7 +32,7 @@ layui.config({ return str; }}, { field: 'holderMation', title: '供应商', align: 'left', width: 150, templet: function (d) { - return d.holderMation.name; + return d.holderMation?.name; }}, { field: 'totalPrice', title: '合计金额', align: 'left', width: 120 }, { field: 'operTime', title: '单据日期', align: 'center', width: 140 }, diff --git a/erp/src/main/resources/template/js/purchaseReturns/purchaseReturnsList.js b/erp/src/main/resources/template/js/purchaseReturns/purchaseReturnsList.js index 67aaed8c7..8980679c1 100644 --- a/erp/src/main/resources/template/js/purchaseReturns/purchaseReturnsList.js +++ b/erp/src/main/resources/template/js/purchaseReturns/purchaseReturnsList.js @@ -28,7 +28,7 @@ layui.config({ return '' + d.oddNumber + ''; }}, { field: 'holderMation', title: '供应商', align: 'left', width: 150, templet: function (d) { - return d.holderMation.name; + return d.holderMation?.name; }}, { field: 'totalPrice', title: '合计金额', align: 'left', width: 120 }, { field: 'operTime', title: '单据日期', align: 'center', width: 140 }, diff --git a/erp/src/main/resources/template/js/salesOrder/salesOrderChoose.js b/erp/src/main/resources/template/js/salesOrder/salesOrderChoose.js index a13a116d9..f1c532c47 100644 --- a/erp/src/main/resources/template/js/salesOrder/salesOrderChoose.js +++ b/erp/src/main/resources/template/js/salesOrder/salesOrderChoose.js @@ -74,9 +74,9 @@ layui.config({ cols: [[ { type: 'radio'}, { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'name', title: '产品名称', align: 'left',width: 150, templet: function (d) {return d.materialMation.name}}, - { field: 'model', title: '产品型号', align: 'left',width: 150, templet: function (d) {return d.materialMation.model}}, - { field: 'norms', title: '产品规格', align: 'left',width: 150, templet: function (d) {return d.normsMation.name}}, + { field: 'name', title: '产品名称', align: 'left',width: 150, templet: function (d) {return d.materialMation?.name}}, + { field: 'model', title: '产品型号', align: 'left',width: 150, templet: function (d) {return d.materialMation?.model}}, + { field: 'norms', title: '产品规格', align: 'left',width: 150, templet: function (d) {return d.normsMation?.name}}, { field: 'operNumber', title: '数量', align: 'left', width: 80 }, { field: 'unitPrice', title: '单价', align: 'left', width: 120 }, { field: 'allPrice', title: '金额', align: 'left', width: 80 }, diff --git a/erp/src/main/resources/template/js/salesOrder/salesOrderList.js b/erp/src/main/resources/template/js/salesOrder/salesOrderList.js index 9e58e6997..22dfa30c1 100644 --- a/erp/src/main/resources/template/js/salesOrder/salesOrderList.js +++ b/erp/src/main/resources/template/js/salesOrder/salesOrderList.js @@ -28,7 +28,7 @@ layui.config({ return '' + d.oddNumber + ''; }}, { field: 'holderMation', title: '客户', align: 'left', width: 150, templet: function (d) { - return d.holderMation.name; + return d.holderMation?.name; }}, { field: 'totalPrice', title: '合计金额', align: 'left', width: 120 }, { field: 'operTime', title: '单据日期', align: 'center', width: 140 }, diff --git a/erp/src/main/resources/template/js/salesOutlet/salesOutletList.js b/erp/src/main/resources/template/js/salesOutlet/salesOutletList.js index 377213b75..081d61a1c 100644 --- a/erp/src/main/resources/template/js/salesOutlet/salesOutletList.js +++ b/erp/src/main/resources/template/js/salesOutlet/salesOutletList.js @@ -32,7 +32,7 @@ layui.config({ return str; }}, { field: 'holderMation', title: '客户', align: 'left', width: 150, templet: function (d) { - return d.holderMation.name; + return d.holderMation?.name; }}, { field: 'totalPrice', title: '合计金额', align: 'left', width: 120 }, { field: 'operTime', title: '单据日期', align: 'center', width: 140 }, diff --git a/erp/src/main/resources/template/js/salesReturns/salesReturnsList.js b/erp/src/main/resources/template/js/salesReturns/salesReturnsList.js index 2f1b6ddd7..073ed1c0d 100644 --- a/erp/src/main/resources/template/js/salesReturns/salesReturnsList.js +++ b/erp/src/main/resources/template/js/salesReturns/salesReturnsList.js @@ -32,7 +32,7 @@ layui.config({ return str; }}, { field: 'holderMation', title: '客户', align: 'left', width: 150, templet: function (d) { - return d.holderMation.name; + return d.holderMation?.name; }}, { field: 'totalPrice', title: '合计金额', align: 'left', width: 120 }, { field: 'operTime', title: '单据日期', align: 'center', width: 140 }, -- GitLab