Browse Source

代码优化

seimin 2 years ago
parent
commit
53aef2daaf
5 changed files with 26 additions and 6 deletions
  1. 1 1
      main.js
  2. 2 2
      manifest.json
  3. 5 2
      pages/index/index.vue
  4. 14 0
      pages/patientBuildConfirm/patientBuildConfirm.vue
  5. 4 1
      pages/search/search.vue

+ 1 - 1
main.js

@@ -12,7 +12,7 @@ import {
12
 Vue.prototype.$request = request
12
 Vue.prototype.$request = request
13
 
13
 
14
 Vue.config.productionTip = false
14
 Vue.config.productionTip = false
15
-console.info('v1.0.6')
15
+console.info('v1.0.7')
16
 
16
 
17
 App.mpType = 'app'
17
 App.mpType = 'app'
18
 
18
 

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
2
     "name" : "医疗服务中心转运系统",
2
     "name" : "医疗服务中心转运系统",
3
     "appid" : "__UNI__FEB1B1E",
3
     "appid" : "__UNI__FEB1B1E",
4
     "description" : "医疗服务中心转运系统",
4
     "description" : "医疗服务中心转运系统",
5
-    "versionName" : "1.0.6",
6
-    "versionCode" : 106,
5
+    "versionName" : "1.0.7",
6
+    "versionCode" : 107,
7
     "transformPx" : false,
7
     "transformPx" : false,
8
     "app-plus" : {
8
     "app-plus" : {
9
         /* 5+App特有相关 */
9
         /* 5+App特有相关 */

+ 5 - 2
pages/index/index.vue

@@ -119,7 +119,8 @@
119
       uni.$on('scancodedate', data => {
119
       uni.$on('scancodedate', data => {
120
         let code = data.code || '';
120
         let code = data.code || '';
121
         // 过滤
121
         // 过滤
122
-        code = code.replace(/^2#/, '')
122
+        code = code.replace(/^2#/, '');
123
+        code = code.replace(/^r2#/, '');
123
         uni.navigateTo({
124
         uni.navigateTo({
124
           url: `/pages/search/search?txt=${code}`,
125
           url: `/pages/search/search?txt=${code}`,
125
         })
126
         })
@@ -155,7 +156,9 @@
155
           return this.searchText1;
156
           return this.searchText1;
156
         },
157
         },
157
         set: function(newVal) {
158
         set: function(newVal) {
158
-          this.searchText1 = newVal.replace(/^2#/, '');
159
+          newVal = newVal.replace(/^2#/, '');
160
+          newVal = newVal.replace(/^r2#/, '');
161
+          this.searchText1 = newVal;
159
           if (this.searchText1 && this.flag) {
162
           if (this.searchText1 && this.flag) {
160
             this.flag = false;
163
             this.flag = false;
161
             uni.navigateTo({
164
             uni.navigateTo({

+ 14 - 0
pages/patientBuildConfirm/patientBuildConfirm.vue

@@ -150,6 +150,13 @@
150
                       skin: "toast",
150
                       skin: "toast",
151
                       icon: "error",
151
                       icon: "error",
152
                       content: data.msg || "创建失败",
152
                       content: data.msg || "创建失败",
153
+                      btns:[{
154
+                        click:()=>{
155
+                          uni.navigateTo({
156
+                            url: '/pages/patientList/patientList'
157
+                          })
158
+                        }
159
+                      }]
153
                     });
160
                     });
154
                   }
161
                   }
155
                 });
162
                 });
@@ -261,6 +268,13 @@
261
                 skin: "toast",
268
                 skin: "toast",
262
                 icon: "error",
269
                 icon: "error",
263
                 content: data.msg || "创建失败",
270
                 content: data.msg || "创建失败",
271
+                btns:[{
272
+                  click:()=>{
273
+                    uni.navigateTo({
274
+                      url: '/pages/patientList/patientList'
275
+                    })
276
+                  }
277
+                }]
264
               });
278
               });
265
             }
279
             }
266
           });
280
           });

+ 4 - 1
pages/search/search.vue

@@ -146,7 +146,9 @@
146
           return this.keyword1;
146
           return this.keyword1;
147
         },
147
         },
148
         set: function(newVal) {
148
         set: function(newVal) {
149
-          this.keyword1 = newVal.replace(/^2#/, '');
149
+          newVal = newVal.replace(/^2#/, '');
150
+          newVal = newVal.replace(/^r2#/, '');
151
+          this.keyword1 = newVal;
150
         },
152
         },
151
       },
153
       },
152
     },
154
     },
@@ -176,6 +178,7 @@
176
       inputChange(event = '') {
178
       inputChange(event = '') {
177
         let keyWord = event.detail ? event.detail.value : event;
179
         let keyWord = event.detail ? event.detail.value : event;
178
         keyWord = keyWord.replace(/^2#/, '');
180
         keyWord = keyWord.replace(/^2#/, '');
181
+        keyWord = keyWord.replace(/^r2#/, '');
179
         // 长度小于等于0,返回空数组
182
         // 长度小于等于0,返回空数组
180
         // 长度小于等于4,只搜索床号
183
         // 长度小于等于4,只搜索床号
181
         // 长度大于4,搜索患者住院号,患者二维码,标本码,检查单号
184
         // 长度大于4,搜索患者住院号,患者二维码,标本码,检查单号