From c238a27a365c08b0a579e40a5322e3882decf944 Mon Sep 17 00:00:00 2001 From: chenhao Date: Thu, 6 Nov 2025 17:08:57 +0800 Subject: [PATCH] =?UTF-8?q?refactor(project):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=92=8C=E9=A1=B9=E7=9B=AE=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E7=9A=84=E5=BC=B9=E7=AA=97=E5=AE=BD=E5=BA=A6=E5=8F=8A=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 统一使用 $.common.isNotEmpty 判断字段非空,提升数据格式化准确性 - 调整弹窗宽度为1400px,优化显示效果 - 优化产品列表渲染逻辑,增强代码可读性和维护性 - 修改模态框打开方式,支持自定义宽度参数 - 使用 ?? 操作符替代 || 进行默认值赋值,提高代码健壮性 --- .../main/resources/static/ruoyi/js/ry-ui.js | 12 +++--- .../templates/inventory/execution/track.html | 4 +- .../templates/layout/product-list.html | 42 +++++++++---------- .../templates/project/info/edit.html | 36 ++++++++-------- .../templates/project/info/project.html | 6 +-- .../templates/project/order/approve.html | 36 ++++++++-------- .../templates/project/order/edit.html | 37 ++++++++-------- .../templates/project/order/order.html | 10 ++--- .../templates/project/order/orderFinance.html | 6 +-- 9 files changed, 96 insertions(+), 93 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index c9065474..b1256853 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -1161,9 +1161,10 @@ var table = { }); }, // 添加信息 - add: function (id) { + add: function (id,width) { table.set(); - $.modal.open("添加" + table.options.modalName, $.operate.addUrl(id)); + width=width??800; + $.modal.open("添加" + table.options.modalName, $.operate.addUrl(id),width); }, // 添加信息,以tab页展现 addTab: function (id) { @@ -1181,7 +1182,8 @@ var table = { return url; }, // 修改信息 - edit: function (id) { + edit: function (id,width) { + width = width ?? 800; table.set(); if ($.common.isEmpty(id) && table.options.type == table_type.bootstrapTreeTable) { var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0]; @@ -1190,9 +1192,9 @@ var table = { return; } var url = table.options.updateUrl.replace("{id}", row[table.options.uniqueId]); - $.modal.open("修改" + table.options.modalName, url); + $.modal.open("修改" + table.options.modalName, url,width); } else { - $.modal.open("修改" + table.options.modalName, $.operate.editUrl(id)); + $.modal.open("修改" + table.options.modalName, $.operate.editUrl(id),width); } }, // 修改信息,以tab页展现 diff --git a/ruoyi-admin/src/main/resources/templates/inventory/execution/track.html b/ruoyi-admin/src/main/resources/templates/inventory/execution/track.html index 7ee6a2da..1bbf160a 100644 --- a/ruoyi-admin/src/main/resources/templates/inventory/execution/track.html +++ b/ruoyi-admin/src/main/resources/templates/inventory/execution/track.html @@ -154,11 +154,11 @@ function viewDetail(id) { - $.modal.openFull("订单详情", ctx + "project/order/view/" + id) + $.modal.openFull("订单详情", ctx + "project/order/view/" + id,1400) } function viewProjectDetail(id) { - $.modal.openFull("项目详情", ctx + "sip/project/view/" + id) + $.modal.openFull("项目详情", ctx + "sip/project/view/" + id,1400) } function signOrder(orderId,versionCode) { diff --git a/ruoyi-admin/src/main/resources/templates/layout/product-list.html b/ruoyi-admin/src/main/resources/templates/layout/product-list.html index 0c76e05d..9fd33202 100644 --- a/ruoyi-admin/src/main/resources/templates/layout/product-list.html +++ b/ruoyi-admin/src/main/resources/templates/layout/product-list.html @@ -351,46 +351,46 @@ let tr=$(` ${length + 1} - - - - - - + + + + + + - + - -