From 17580e07751d7abaac48071a8ec0e743fdfb35fc Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期一, 11 九月 2023 10:40:24 +0800
Subject: [PATCH] #权限控制优化

---
 src/main/webapp/static/js/order/order.js |   38 ++++++++++++++++++++++++++++++++++++--
 1 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js
index 13807a5..97db090 100644
--- a/src/main/webapp/static/js/order/order.js
+++ b/src/main/webapp/static/js/order/order.js
@@ -120,6 +120,11 @@
         })
     }
 
+    let where = {}
+    if (getQueryVariable('status') !== false) {
+        where = {status: getQueryVariable('status')}
+    }
+
     // 鏁版嵁娓叉煋
     tableIns = table.render({
         elem: '#order',
@@ -132,6 +137,7 @@
         height: 'full-148',
         // size: 'sm',
         skin: 'line',
+        where: where,
         cols: [[
             {type: 'checkbox'}
             ,{field: 'name', align: 'left',title: '璺熻釜椤圭洰鍚嶇О', style: 'color: #1890ff;cursor:pointer', event: 'more', width: 300}
@@ -139,15 +145,18 @@
             ,{field: 'cstmrId$', align: 'left',title: '鐢叉柟鍗曚綅', style: 'color: #1890ff;cursor:pointer', event: 'cstmrMore', templet:function(d){return emptyShow(d.cstmrId$)}}
             ,{field: 'pcd$', align: 'left',title: '鎵�灞炲尯鍩�', templet:function(d){return emptyShow(d.pcd$)}}
             ,{field: 'addr', align: 'left',title: '椤圭洰鍦板潃', templet:function(d){return emptyShow(d.addr)}}
-            ,{field: 'money', align: 'right',title: '椤圭洰鎬婚噾棰�', templet:function(d){return emptyShow(d.money)}}
+            ,{field: 'money', align: 'right',title: '椤圭洰棰勭畻閲戦', templet:function(d){return emptyShow(d.money+"涓�")}}
+            ,{field: 'transactionRate', align: 'right',title: '椤圭洰棰勪及鎴愪氦鐜�', templet:function(d){return emptyShow(d.transactionRate+"%")}}
             ,{field: 'director$', align: 'left',title: '椤圭洰璐熻矗浜�', templet:function(d){return emptyShow(d.director$)}}
             ,{field: 'remarks', align: 'left',title: '澶囨敞', templet:function(d){return emptyShow(d.remarks)}}
             ,{field: 'createTime$', align: 'left',title: '娣诲姞鏃堕棿'}
-            ,{field: 'company$', align: 'left',title: '鎵�灞炲叕鍙�', hide: true}
+            ,{field: 'company$', align: 'left',title: '鎵�灞炲叕鍙�', hide: false}
+            ,{field: 'orderProductTypeId$', align: 'left',title: '浜у搧绫诲瀷', hide: false}
             ,{field: 'province', align: 'left',title: '鐪�', hide: true}
             ,{field: 'city', align: 'left',title: '甯�', hide: true}
             ,{field: 'district', align: 'left',title: '鍘�', hide: true}
             ,{field: 'town', align: 'left',title: '闀�', hide: true}
+            ,{field: 'status$', align: 'left',title: '鐘舵��'}
             ,{field: 'files', align: 'left',title: '闄勪欢', hide: true}
             ,{field: 'updateBy$', align: 'left',title: '淇敼浜哄憳', hide: true}
             ,{field: 'updateTime$', align: 'left',title: '淇敼鏃堕棿', hide: true}
@@ -259,6 +268,9 @@
             success: function (layero, dIndex) {
                 let cstmrSel = loadCstmrSel();
                 let companySel = loadCompanySel();
+                if (!mData){
+                    companySel.setValue([{name: "娴欐睙涓壃绔嬪簱鎶�鏈湁闄愬叕鍙�", value: 4}]);
+                }
                 if (mData) {
                     $('#cascaderVal').val(mData.pcd);
                     if (mData.cstmrId) { cstmrSel.setValue([{name: mData.cstmrId$, value: mData.cstmrId}]); }
@@ -272,6 +284,26 @@
                     data.field.company = companySel.getValue()[0] ? companySel.getValue()[0].value : null;
                     if (!data.field.company) {
                         layer.msg("鎵�灞炲叕鍙镐笉鑳戒负绌�", {icon: 2});
+                        return false;
+                    }
+                    if (!data.field.cstmrId) {
+                        layer.msg("鐢叉柟鍗曚綅涓嶈兘涓虹┖", {icon: 2});
+                        return false;
+                    }
+                    if (!data.field.transactionRate) {
+                        layer.msg("棰勮鎴愪氦鐜囦笉鑳戒负绌�", {icon: 2});
+                        return false;
+                    }
+                    if (!data.field.status) {
+                        layer.msg("椤圭洰鐘舵�佷笉鑳戒负绌�", {icon: 2});
+                        return false;
+                    }
+                    if (!data.field.pcd) {
+                        layer.msg("鐪佸競鍖轰笉鑳戒负绌�", {icon: 2});
+                        return false;
+                    }
+                    if (!data.field.director) {
+                        layer.msg("璐熻矗浜轰笉鑳戒负绌�", {icon: 2});
                         return false;
                     }
                     var loadIndex = layer.load(2);
@@ -379,6 +411,7 @@
             autoRow: true,
             filterable: true,
             remoteSearch: true,
+            clickClose: true,
             radio: true,
             remoteMethod: function (val, cb, show) {
                 $.ajax({
@@ -407,6 +440,7 @@
             autoRow: true,
             filterable: true,
             remoteSearch: true,
+            clickClose: true,
             radio: true,
             remoteMethod: function (val, cb, show) {
                 $.ajax({

--
Gitblit v1.9.1