Selaa lähdekoodia

一些bug修改

qxp 5 vuotta sitten
vanhempi
commit
92c3c6d4b3

+ 14 - 0
suishenbang-admin/src/main/resources/static/ruoyi/js/ry-ui.js

@@ -902,6 +902,20 @@
             	    $.modal.open("修改" + $.table._option.modalName, $.operate.editUrl(id));
             	}
             },
+            // 修改信息
+            editTitle: function(id,title) {
+                if($.common.isEmpty(id) && $.table._option.type == table_type.bootstrapTreeTable) {
+                    var row = $.bttTable.bootstrapTreeTable('getSelections')[0];
+                    if ($.common.isEmpty(row)) {
+                        $.modal.alertWarning("请至少选择一条记录");
+                        return;
+                    }
+                    var url = $.table._option.updateUrl.replace("{id}", row[$.table._option.uniqueId]);
+                    $.modal.open($.table._option.modalName, url);
+                } else {
+                    $.modal.open($.table._option.modalName, $.operate.editUrl(id));
+                }
+            },
             // 修改信息,以tab页展现
             editTab: function(id) {
             	$.modal.openTab("修改" + $.table._option.modalName, $.operate.editUrl(id));

+ 1 - 1
suishenbang-order/src/main/resources/templates/order/customers/customers.html

@@ -121,7 +121,7 @@
                     align: 'center',
                     formatter: function(value, row, index) {
                         var actions = [];
-                        actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>详情</a> ');
+                        actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.editTitle(\'' + row.id + '\')"><i class="fa fa-edit"></i>详情</a> ');
                         return actions.join('');
                     }
                 }]

+ 1 - 1
suishenbang-order/src/main/resources/templates/order/orderSalesDetail/orderSalesDetail.html

@@ -157,7 +157,7 @@
                     align: 'center',
                     formatter: function(value, row, index) {
                         var actions = [];
-                        actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>详情</a> ');
+                        actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.editTitle(\'' + row.id + '\')"><i class="fa fa-edit"></i>详情</a> ');
                         return actions.join('');
                     }
                 }]

+ 3 - 3
suishenbang-order/src/main/resources/templates/order/orderbase/orderbase.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
 <head>
-    <th:block th:include="include :: header('订单基础 订单的基础信息列表')" />
+    <th:block th:include="include :: header('订单基础信息')" />
     <th:block th:include="include :: datetimepicker-css" />
     <style type='text/css'>
         .control-label{padding-right : 0px}
@@ -129,7 +129,7 @@
                 url: prefix + "/list",
                 createUrl: prefix + "/add",
                 updateUrl: prefix + "/edit/{id}",
-                modalName: "订单基础 订单的基础信息",
+                modalName: "订单基础信息",
                 columns: [{
                     checkbox: false
                 },
@@ -175,7 +175,7 @@
                     align: 'center',
                     formatter: function(value, row, index) {
                         var actions = [];
-                        actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.edit(\'' + row.docNumber + '\')"><i class="fa fa-edit"></i>详情</a> ');
+                        actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.editTitle(\'' + row.docNumber + '\')"><i class="fa fa-edit"></i>详情</a> ');
                         return actions.join('');
                     }
                 }