From f89183feaeaf4d52b994bb4d3f9a8d7ca6dadec4 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 26 一月 2021 16:58:14 +0800
Subject: [PATCH] 2021-01-26

---
 src/views/billprint/index.scss                                                   |   12 ++
 src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx |    2 
 src/views/menudesign/index.scss                                                  |   11 ++
 src/tabviews/subtable/index.jsx                                                  |    3 
 src/tabviews/subtabtable/index.jsx                                               |    3 
 src/tabviews/commontable/index.jsx                                               |    3 
 src/templates/zshare/verifycard/callbackcustomscript/index.jsx                   |    2 
 src/tabviews/zshare/actionList/normalbutton/index.jsx                            |    3 
 src/menu/popview/index.jsx                                                       |   92 +++++++++---------
 src/views/menudesign/index.jsx                                                   |  124 ++++++++++++------------
 10 files changed, 143 insertions(+), 112 deletions(-)

diff --git a/src/menu/popview/index.jsx b/src/menu/popview/index.jsx
index ade882c..83b58a1 100644
--- a/src/menu/popview/index.jsx
+++ b/src/menu/popview/index.jsx
@@ -344,52 +344,54 @@
       return
     }
 
-    config.components = this.filterConfig(config.components)
-
-    if (config.enabled && this.verifyConfig()) {
-      config.enabled = false
-    }
-
-    let _config = fromJS(config).toJS()
-    delete _config.tableFields
-
-    let _name = (btn.component.name ? btn.component.name + '-' : '') + btn.label
-
-    let param = {
-      func: 'sPC_ButtonParam_AddUpt',
-      ParentID: btn.config.uuid,
-      MenuID: _config.uuid,
-      MenuNo: _config.MenuNo || '',
-      Template: 'CustomPage',
-      MenuName: _name,
-      PageParam: JSON.stringify({Template: 'CustomPage'}),
-      LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
-    }
-
-    if (openEdition) { // 鐗堟湰绠$悊
-      param.open_edition = openEdition
-    }
-
-    let btnParam = {             // 娣诲姞鑿滃崟鎸夐挳
-      func: 'sPC_Button_AddUpt',
-      Type: 60,                  // 娣诲姞鑿滃崟涓嬬殑鎸夐挳type涓�40锛屾寜閽笅鐨勬寜閽畉ype涓�60
-      ParentID: _config.uuid,
-      MenuNo: _config.MenuNo,
-      Template: 'CustomPage',
-      PageParam: '',
-      LongParam: '',
-      LText: []
-    }
-
-    btnParam.LText = this.getMenuMessage()
-    btnParam.LText = btnParam.LText.join(' union all ')
-    btnParam.LText = Utils.formatOptions(btnParam.LText)
-    btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-    btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
-
     this.setState({
       menuloading: true
-    }, () => {
+    })
+
+    setTimeout(() => {
+      config.components = this.filterConfig(config.components)
+
+      if (config.enabled && this.verifyConfig()) {
+        config.enabled = false
+      }
+
+      let _config = fromJS(config).toJS()
+      delete _config.tableFields
+
+      let _name = (btn.component.name ? btn.component.name + '-' : '') + btn.label
+
+      let param = {
+        func: 'sPC_ButtonParam_AddUpt',
+        ParentID: btn.config.uuid,
+        MenuID: _config.uuid,
+        MenuNo: _config.MenuNo || '',
+        Template: 'CustomPage',
+        MenuName: _name,
+        PageParam: JSON.stringify({Template: 'CustomPage'}),
+        LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
+      }
+
+      if (openEdition) { // 鐗堟湰绠$悊
+        param.open_edition = openEdition
+      }
+
+      let btnParam = {             // 娣诲姞鑿滃崟鎸夐挳
+        func: 'sPC_Button_AddUpt',
+        Type: 60,                  // 娣诲姞鑿滃崟涓嬬殑鎸夐挳type涓�40锛屾寜閽笅鐨勬寜閽畉ype涓�60
+        ParentID: _config.uuid,
+        MenuNo: _config.MenuNo,
+        Template: 'CustomPage',
+        PageParam: '',
+        LongParam: '',
+        LText: []
+      }
+
+      btnParam.LText = this.getMenuMessage()
+      btnParam.LText = btnParam.LText.join(' union all ')
+      btnParam.LText = Utils.formatOptions(btnParam.LText)
+      btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+      btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
+
       new Promise(resolve => {
         if (delButtons.length === 0) {
           resolve({
@@ -476,7 +478,7 @@
           })
         }
       })
-    })
+    }, 300)
   }
 
   onEnabledChange = () => {
diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx
index 492ca22..41b2dc9 100644
--- a/src/tabviews/commontable/index.jsx
+++ b/src/tabviews/commontable/index.jsx
@@ -588,6 +588,7 @@
 
       Object.keys(obj).forEach(key => {
         let val = obj[key]
+        if (val === null || val === undefined) return
         if (typeof(val) === 'object') {
           if (Array.isArray(val)) {
             val.forEach(item => {
@@ -601,7 +602,7 @@
             val.$$key = tb + '_' + key
             subObjs.push(val)
           }
-        } else if (val !== null && val !== undefined) {
+        } else {
           keys.push(key)
           vals.push(`'${val}'`)
         }
diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx
index fd24de6..d2afecd 100644
--- a/src/tabviews/subtable/index.jsx
+++ b/src/tabviews/subtable/index.jsx
@@ -517,6 +517,7 @@
 
       Object.keys(obj).forEach(key => {
         let val = obj[key]
+        if (val === null || val === undefined) return
         if (typeof(val) === 'object') {
           if (Array.isArray(val)) {
             val.forEach(item => {
@@ -530,7 +531,7 @@
             val.$$key = tb + '_' + key
             subObjs.push(val)
           }
-        } else if (val !== null && val !== undefined) {
+        } else {
           keys.push(key)
           vals.push(`'${val}'`)
         }
diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx
index 92ff193..3e98a32 100644
--- a/src/tabviews/subtabtable/index.jsx
+++ b/src/tabviews/subtabtable/index.jsx
@@ -478,6 +478,7 @@
 
       Object.keys(obj).forEach(key => {
         let val = obj[key]
+        if (val === null || val === undefined) return
         if (typeof(val) === 'object') {
           if (Array.isArray(val)) {
             val.forEach(item => {
@@ -491,7 +492,7 @@
             val.$$key = tb + '_' + key
             subObjs.push(val)
           }
-        } else if (val !== null && val !== undefined) {
+        } else {
           keys.push(key)
           vals.push(`'${val}'`)
         }
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index d256e3a..291f92c 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -775,6 +775,7 @@
 
       Object.keys(obj).forEach(key => {
         let val = obj[key]
+        if (val === null || val === undefined) return
         if (typeof(val) === 'object') {
           if (Array.isArray(val)) {
             val.forEach(item => {
@@ -788,7 +789,7 @@
             val.$$key = tb + '_' + key
             subObjs.push(val)
           }
-        } else if (val !== null && val !== undefined) {
+        } else {
           keys.push(key)
           vals.push(`'${val}'`)
         }
diff --git a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
index 07bdde8..177c3bb 100644
--- a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
+++ b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
@@ -450,7 +450,7 @@
                   filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                   onChange={this.selectScript}
                 >
-                  {!usefulFields ? <Select.Option key="default" value={`declare @${setting.cbTable} table (mk_api_key nvarchar(100))\n/*@${setting.cbTable}_data table (mk_level nvarchar(10),mk_id nvarchar(50),mk_bid nvarchar(50))*/`}>榛樿sql</Select.Option> : null}
+                  {!usefulFields ? <Select.Option key="default" value={`declare @${setting.cbTable} table (mk_api_key nvarchar(100),mk_level nvarchar(10),mk_id nvarchar(50),mk_bid nvarchar(50))\n/*@${setting.cbTable}_data table (mk_level nvarchar(10),mk_id nvarchar(50),mk_bid nvarchar(50))*/`}>榛樿sql</Select.Option> : null}
                   {systemScripts.map((option, i) =>
                     <Select.Option style={{whiteSpace: 'normal'}} key={i} value={option.value}>{option.name}</Select.Option>
                   )}
diff --git a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx
index dc117bf..062947f 100644
--- a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx
+++ b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx
@@ -236,7 +236,7 @@
                 onChange={this.selectScript}
                 getPopupContainer={() => document.getElementById('verify-custom-callback-scripts')}
               >
-                <Select.Option key="default" value={`declare @${btn.cbTable} table (mk_api_key nvarchar(100))\n/*@${btn.cbTable}_data table (mk_level nvarchar(10),mk_id nvarchar(50),mk_bid nvarchar(50))*/`}>榛樿sql</Select.Option>
+                <Select.Option key="default" value={`declare @${btn.cbTable} table (mk_api_key nvarchar(100),mk_level nvarchar(10),mk_id nvarchar(50),mk_bid nvarchar(50))\n/*@${btn.cbTable}_data table (mk_level nvarchar(10),mk_id nvarchar(50),mk_bid nvarchar(50))*/`}>榛樿sql</Select.Option>
                 {systemScripts.map((option, i) =>
                   <Select.Option key={i} value={option.value}>{option.name}</Select.Option>
                 )}
diff --git a/src/views/billprint/index.scss b/src/views/billprint/index.scss
index 3eecf5a..7ab170f 100644
--- a/src/views/billprint/index.scss
+++ b/src/views/billprint/index.scss
@@ -31,6 +31,18 @@
   }
 }
 
+.print-page {
+  table {
+    border-radius: 0!important;
+    .ant-table-column-sorter {
+      display: none;
+    }
+  }
+  .ant-table-thead > tr > th {
+    background: transparent!important;
+  }
+}
+
 .normal-custom-table .main-pickup {
   display: none!important;
 }
diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx
index 05e97ed..9cd3d8e 100644
--- a/src/views/menudesign/index.jsx
+++ b/src/views/menudesign/index.jsx
@@ -452,67 +452,69 @@
       return
     }
 
-    config.components = this.filterConfig(config.components)
-
-    if (config.enabled && this.verifyConfig()) {
-      config.enabled = false
-    }
-
-    let _config = fromJS(config).toJS()
-    delete _config.tableFields
-
-    let param = {
-      func: 'sPC_TrdMenu_AddUpt',
-      FstID: _config.fstMenuId || '',
-      SndID: _config.parentId,
-      ParentID: _config.parentId,
-      MenuID: _config.uuid,
-      MenuNo: _config.MenuNo || '',
-      EasyCode: _config.easyCode || '',
-      Template: 'CustomPage',
-      MenuName: _config.MenuName || '',
-      PageParam: JSON.stringify({Template: 'CustomPage', OpenType: 'newtab'}),
-      LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(_config))),
-      LText: '',
-      LTexttb: ''
-    }
-
-    param.LText = Utils.formatOptions(param.LText)
-    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
-
-    if (openEdition) { // 鐗堟湰绠$悊
-      param.open_edition = openEdition
-    }
-
-    let btnParam = {             // 娣诲姞鑿滃崟鎸夐挳
-      func: 'sPC_Button_AddUpt',
-      Type: 40,                  // 娣诲姞鑿滃崟涓嬬殑鎸夐挳type涓�40锛屾寜閽笅鐨勬寜閽畉ype涓�60
-      ParentID: _config.uuid,
-      MenuNo: _config.MenuNo,
-      Template: 'CustomPage',
-      PageParam: '',
-      LongParam: '',
-      LText: []
-    }
-
-    let btnIds = '' // 鐢ㄤ簬澶嶅埗鎸夐挳鐨勮繃婊�
-    if (MenuType !== 'billPrint') {
-      btnParam.LText = this.getMenuMessage()
-      btnParam.LText = btnParam.LText.join(' union all ')
-
-      btnIds = btnParam.LText
-
-      btnParam.LText = Utils.formatOptions(btnParam.LText)
-      btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-      btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
-    } else {
-      btnParam.LText = ''
-    }
-
     this.setState({
       menuloading: true
-    }, () => {
+    })
+
+    setTimeout(() => {
+      config.components = this.filterConfig(config.components)
+
+      if (config.enabled && this.verifyConfig()) {
+        config.enabled = false
+      }
+
+      let _config = fromJS(config).toJS()
+      delete _config.tableFields
+
+      let param = {
+        func: 'sPC_TrdMenu_AddUpt',
+        FstID: _config.fstMenuId || '',
+        SndID: _config.parentId,
+        ParentID: _config.parentId,
+        MenuID: _config.uuid,
+        MenuNo: _config.MenuNo || '',
+        EasyCode: _config.easyCode || '',
+        Template: 'CustomPage',
+        MenuName: _config.MenuName || '',
+        PageParam: JSON.stringify({Template: 'CustomPage', OpenType: 'newtab'}),
+        LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(_config))),
+        LText: '',
+        LTexttb: ''
+      }
+
+      param.LText = Utils.formatOptions(param.LText)
+      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+      param.secretkey = Utils.encrypt(param.LText, param.timestamp)
+
+      if (openEdition) { // 鐗堟湰绠$悊
+        param.open_edition = openEdition
+      }
+
+      let btnParam = {             // 娣诲姞鑿滃崟鎸夐挳
+        func: 'sPC_Button_AddUpt',
+        Type: 40,                  // 娣诲姞鑿滃崟涓嬬殑鎸夐挳type涓�40锛屾寜閽笅鐨勬寜閽畉ype涓�60
+        ParentID: _config.uuid,
+        MenuNo: _config.MenuNo,
+        Template: 'CustomPage',
+        PageParam: '',
+        LongParam: '',
+        LText: []
+      }
+
+      let btnIds = '' // 鐢ㄤ簬澶嶅埗鎸夐挳鐨勮繃婊�
+      if (MenuType !== 'billPrint') {
+        btnParam.LText = this.getMenuMessage()
+        btnParam.LText = btnParam.LText.join(' union all ')
+
+        btnIds = btnParam.LText
+
+        btnParam.LText = Utils.formatOptions(btnParam.LText)
+        btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
+      } else {
+        btnParam.LText = ''
+      }
+
       new Promise(resolve => {
         if (MenuType === 'billPrint') { // 鎵撳嵃鐢熸垚椤甸潰鏁堟灉鍥�
           html2canvas(document.getElementById('menu-shell-inner')).then(canvas => {
@@ -740,7 +742,7 @@
           })
         }
       })
-    })
+    }, 300)
   }
 
   getRoleFields = () => {
@@ -860,7 +862,7 @@
 
     return (
       <ConfigProvider locale={_locale}>
-        <div className="pc-menu-view" id="view">
+        <div className={'pc-menu-view ' + (MenuType || '')} id="view">
           <Header />
           {!popBtn && !visible ? <DndProvider backend={HTML5Backend}>
             <div className="menu-body">
diff --git a/src/views/menudesign/index.scss b/src/views/menudesign/index.scss
index 21de614..f677b80 100644
--- a/src/views/menudesign/index.scss
+++ b/src/views/menudesign/index.scss
@@ -160,3 +160,14 @@
     }
   }
 }
+.pc-menu-view.billPrint {
+  table {
+    border-radius: 0!important;
+    .ant-table-column-sorter {
+      display: none;
+    }
+  }
+  .ant-table-thead > tr > th {
+    background: transparent!important;
+  }
+}
\ No newline at end of file

--
Gitblit v1.8.0