From 655ac8aef54bc134c1420c19975023182a10cae4 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 08 十二月 2020 19:25:27 +0800
Subject: [PATCH] 2020-12-08

---
 src/utils/utils.js |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/utils/utils.js b/src/utils/utils.js
index 4631294..333dccb 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -440,7 +440,7 @@
 
         newsearches[item.key] = item.value ? item.value[0] + ' 00:00:00.000' : ''
         newsearches[item.key + '1'] = item.value ? _endval + ' 00:00:00.000' : ''
-      } else if (item.type === 'text') {
+      } else if (item.type === 'text' || item.type === 'select') {
         item.key.split(',').forEach(field => { // 缁煎悎鎼滅储锛屾墍瀛楁鎷兼帴
           newsearches[field] = item.value
         })
@@ -473,17 +473,13 @@
       if (item.forbid || !item.value || (item.type === 'multiselect' && item.value.length === 0)) return
       
       searchText += (searchText !== '' ? ' AND ' : '')
-      if (item.type === 'text') {
+      if (item.type === 'text' || item.type === 'select') { // 缁煎悎鎼滅储锛屾枃鏈垨涓嬫媺锛屾墍鏈夊瓧娈垫嫾鎺�
         let str = item.match === '=' ? '' : '%'
-        let fields = item.key.split(',').map(field => { // 缁煎悎鎼滅储锛屾墍瀛楁鎷兼帴
+        let fields = item.key.split(',').map(field => {
           return field + ' ' + item.match + ' \'' + str + item.value + str + '\''
         })
 
         searchText += '(' + fields.join(' OR ') + ')'
-      } else if (item.type === 'select') {
-        let str = item.match === '=' ? '' : '%'
-
-        searchText += item.key + ' ' + item.match + ' \'' + str + item.value + str + '\''
       } else if (item.type === 'multiselect') {
 
         searchText += `'${item.value}' ` + item.match + ' \'%\'+' + item.key + '+\'%\''
@@ -595,12 +591,12 @@
         item.value = item.value ? item.value.join(',') : item.value
 
         options.push(item)
-      } else if (item.type === 'text') {
+      } else if (item.type === 'text' || item.type === 'select') {
         item.key.split(',').forEach(field => { // 缁煎悎鎼滅储锛屾墍瀛楁鎷兼帴
           let cell = JSON.parse(JSON.stringify(item))
           cell.key = field
 
-          options.push(item)
+          options.push(cell)
         })
       } else {
         options.push(item)
@@ -645,6 +641,13 @@
         options.push({
           key: item.key + '1',
           value: '0'
+        })
+      } else if (search.type === 'text' || search.type === 'select') {
+        item.key.split(',').forEach(field => {
+          let cell = JSON.parse(JSON.stringify(item))
+          cell.key = field
+
+          options.push(cell)
         })
       } else {
         options.push(item)
@@ -1258,7 +1261,7 @@
     if (verify.accountdate === 'true') {
       _sql += `
         /* 璐︽湡楠岃瘉 */
-        exec s_FIBVoucherDateCheck @ErrorCode=@ErrorCode OUTPUT,@retmsg=@retmsg OUTPUT
+        exec s_FIBVoucherDateCheck @OrgCode=${verify.accountfield ? '@' + verify.accountfield : '\'\''}, @ErrorCode=@ErrorCode OUTPUT,@retmsg=@retmsg OUTPUT
         if @ErrorCode!=''
           GOTO aaa
         `

--
Gitblit v1.8.0