From 19bde08261ce9c862d0c9e33517f689521de77d6 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 04 八月 2020 09:29:10 +0800
Subject: [PATCH] 2020-08-04

---
 src/mob/components/login/mob-login-2/index.jsx       |    2 +-
 src/api/index.js                                     |   11 +++++++++--
 src/tabviews/zshare/normalTable/index.jsx            |   17 +++++++++--------
 src/templates/zshare/verifycard/index.jsx            |    6 +++---
 src/router/index.js                                  |    2 +-
 src/tabviews/zshare/actionList/printbutton/index.jsx |    3 ++-
 6 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/src/api/index.js b/src/api/index.js
index 5c1399f..d917c41 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -108,14 +108,21 @@
    * @description 娓稿鐧诲綍
    */
   getTouristMsg () {
+    let _SessionUid = localStorage.getItem('SessionUid')
+
+    if (!_SessionUid) { // 鎵嬪姩娓呴櫎SessionUid鏃讹紝瀹炴椂鐢熸垚
+      _SessionUid = Utils.getuuid()
+      localStorage.setItem('SessionUid', _SessionUid)
+    }
+
     let param = {
       func: 's_visitor_login',
       timestamp: moment().format('YYYY-MM-DD HH:mm:ss') + '.000', 
-      SessionUid: localStorage.getItem('SessionUid'),
+      SessionUid: _SessionUid,
       TypeCharOne: 'pc'
     }
     
-    param.LText = md5(window.btoa(localStorage.getItem('SessionUid') + param.timestamp))
+    param.LText = md5(window.btoa(_SessionUid + param.timestamp))
     param.secretkey = md5(param.LText + 'mingke' + param.timestamp)
 
     param.appkey = window.GLOB.appkey || ''
diff --git a/src/mob/components/login/mob-login-2/index.jsx b/src/mob/components/login/mob-login-2/index.jsx
index 7a4bfe5..685e6b0 100644
--- a/src/mob/components/login/mob-login-2/index.jsx
+++ b/src/mob/components/login/mob-login-2/index.jsx
@@ -32,7 +32,7 @@
       login: { uuid: Utils.getuuid(), eleType: 'button', content: '鐧诲綍', style: {fontSize: '16px', color: '#ffffff', textAlign: 'center', lineHeight: 2.4, backgroundColor: '#44a8f2'}},
       phone: { uuid: Utils.getuuid(), eleType: 'button', content: '鎵嬫満鐭俊鐧诲綍', style: {fontSize: '16px', color: '#44a8f2', textAlign: 'center', lineHeight: 2.4, border: '1px solid #44a8f2'}},
       register: { uuid: Utils.getuuid(), eleType: 'text', content: '娉ㄥ唽', style: {fontSize: '14px', color: '#44a8f2', textAlign: 'left'}},
-      lose: { uuid: Utils.getuuid(), eleType: 'text', content: '蹇樿瀵嗙爜锛�', style: {fontSize: '12px', color: '#44a8f2', textAlign: 'right', textDecoration: 'underline'}},
+      lose: { uuid: Utils.getuuid(), eleType: 'text', content: '蹇樿瀵嗙爜锛�', style: {fontSize: '14px', color: '#44a8f2', textAlign: 'right', textDecoration: 'underline'}},
       auth: {
         uuid: Utils.getuuid(), eleType: 'text',
         subItems: [
diff --git a/src/router/index.js b/src/router/index.js
index 7a8d8b8..5dc706b 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -61,7 +61,7 @@
     
     let userId = sessionStorage.getItem('UserID') // 鍒ゆ柇鏄惁瀛樺湪userid
 
-    let authCode = localStorage.getItem('AuthCode') // 鍒ゆ柇绯荤粺鏄惁鍦ㄦ巿鏉冩湡闄愬唴
+    let authCode = localStorage.getItem(window.location.href.split('#')[0] + 'AuthCode') // 鍒ゆ柇绯荤粺鏄惁鍦ㄦ巿鏉冩湡闄愬唴
     let _s = md5('mksoft' + moment().format('YYYYMMDD'))
     let isauth = authCode && authCode.includes(_s)
 
diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx
index 2cf6082..42b1325 100644
--- a/src/tabviews/zshare/actionList/printbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -204,7 +204,8 @@
         this.getprintdata(btn, data, formdata, formlist).then(result => {
           if (result.next) {
             result.list.forEach(cell => {
-              if (!cell.data || cell.data.length === 0) return
+              // 绯荤粺鎵撳嵃鏁版嵁锛屾牎楠宒ata瀛楁
+              if (btn.verify.printMode !== 'custom' && (!cell.data || cell.data.length === 0)) return
 
               cell.templateID = cell.templateID || btn.verify.Template
               cell.printType = cell.printType || formdata.printType || ''
diff --git a/src/tabviews/zshare/normalTable/index.jsx b/src/tabviews/zshare/normalTable/index.jsx
index 913ad26..52f16c6 100644
--- a/src/tabviews/zshare/normalTable/index.jsx
+++ b/src/tabviews/zshare/normalTable/index.jsx
@@ -777,10 +777,11 @@
 
     this.setState({ selectedRowKeys, activeIndex: _activeIndex })
 
-    let selects = []
-    selectedRowKeys.forEach(item => {
-      selects.push(this.props.data[item])
-    })
+    let selects = this.props.data.filter((item, _index) => selectedRowKeys.includes(_index))
+
+    // selectedRowKeys.forEach(item => {
+    //   selects.push(this.props.data[item])
+    // })
 
     this.props.chgSelectData(selects)
   }
@@ -814,10 +815,10 @@
       this.setState({ selectedRowKeys: newkeys, activeIndex: _index !== '' ? _index : null })
     }
 
-    let selects = []
-    newkeys.forEach(item => {
-      selects.push(this.props.data[item])
-    })
+    let selects = this.props.data.filter((item, _index) => newkeys.includes(_index))
+    // newkeys.forEach(item => {
+    //   selects.push(this.props.data[item])
+    // })
     
     this.props.chgSelectData(selects)
   }
diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx
index cd0fedf..87d2633 100644
--- a/src/templates/zshare/verifycard/index.jsx
+++ b/src/templates/zshare/verifycard/index.jsx
@@ -875,7 +875,7 @@
             }
 
             _form = _form.join(', ')
-            _defaultsql = `update ${this.props.card.sql} set ${_form} where ${config.setting.primaryKey}=@ID@;`
+            _defaultsql = `update ${this.props.card.sql} set ${_form} where ${config.setting.primaryKey}${this.props.card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID  from dbo.SplitComma(@ID@))'};`
           }
           
           this.setState({
@@ -946,7 +946,7 @@
       let _defaultsql = ''
 
       if (this.props.card.sqlType === 'LogicDelete') {
-        _defaultsql = `update ${this.props.card.sql} set deleted=1,modifydate=getdate(),modifyuserid=@userid@ where ${config.setting.primaryKey}=@ID@;`
+        _defaultsql = `update ${this.props.card.sql} set deleted=1,modifydate=getdate(),modifyuserid=@userid@ where ${config.setting.primaryKey}${this.props.card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID  from dbo.SplitComma(@ID@))'};`
       } else if (this.props.card.sqlType === 'delete') {
         let _msg = ''
         if (columns && columns.length > 0 && this.props.card.Ot !== 'notRequired' && this.props.card.Ot !== 'requiredOnce') {
@@ -958,7 +958,7 @@
             }
           })
         }
-        _defaultsql += `insert into snote (remark,createuserid,CreateUser,CreateStaff) select left('鍒犻櫎琛�:${this.props.card.sql} 鏁版嵁: ${_msg}${config.setting.primaryKey}='+@ID@,200),@userid@,@username,@fullname delete ${this.props.card.sql} where ${config.setting.primaryKey}=@ID@;`
+        _defaultsql += `insert into snote (remark,createuserid,CreateUser,CreateStaff) select left('鍒犻櫎琛�:${this.props.card.sql} 鏁版嵁: ${_msg}${config.setting.primaryKey}='+@ID@,200),@userid@,@username,@fullname delete ${this.props.card.sql} where ${config.setting.primaryKey}${this.props.card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID  from dbo.SplitComma(@ID@))'};`
       }
 
       this.setState({

--
Gitblit v1.8.0