浏览代码

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

csx 3 年前
父节点
当前提交
acfecf9dbe

+ 6 - 1
src/xt_pages/hospitalStation/components/deskPrescription.vue 查看文件

@@ -2413,7 +2413,12 @@
2413 2413
         this.tabIndex = this.prescriptions.length
2414 2414
 
2415 2415
         var str = this.prescriptions[this.prescriptions.length - 1].name
2416
-        this.tabIndex = parseInt(str.charAt(str.length - 1))
2416
+
2417
+        var reg =/[\u4e00-\u9fa5]/g;
2418
+        // var str= " 阿达 adas 123132  一二三 ";
2419
+        // str= str.replace(/[ ]/g, "");//去空格
2420
+        str= str.replace(reg, "");//去除中文
2421
+        this.tabIndex = parseInt(str.replace(reg, ""))
2417 2422
         ++this.tabIndex
2418 2423
         let newTabName = '处方' + this.tabIndex
2419 2424
         var nowDate = new Date()

+ 12 - 6
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue 查看文件

@@ -287,11 +287,11 @@
287 287
                                         <el-table-column label="库存" width="60">
288 288
                                             <template slot-scope="scope">
289 289
                                               <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877">
290
-                                               <span v-if="scope.row.count/scope.row.min_number>0">{{Math.floor(scope.row.count/scope.row.min_number)}}{{scope.row.max_unit}}</span> 
290
+                                               <span v-if="scope.row.count/scope.row.min_number>0">{{Math.floor(scope.row.count/scope.row.min_number)}}{{scope.row.max_unit}}</span>
291 291
                                                <span v-if="scope.row.count%scope.row.min_number>0"> {{scope.row.count%scope.row.min_number}}{{scope.row.min_unit}}</span>
292 292
                                               </span>
293
-                                              <span v-else> {{scope.row.total}}{{scope.row.total?scope.row.min_unit:''}}</span> 
294
-                                             
293
+                                              <span v-else> {{scope.row.total}}{{scope.row.total?scope.row.min_unit:''}}</span>
294
+
295 295
                                             </template>
296 296
                                         </el-table-column>
297 297
                                         <el-table-column label="单价" width="40">
@@ -2419,7 +2419,13 @@
2419 2419
         this.tabIndex = this.prescriptions.length
2420 2420
 
2421 2421
         var str = this.prescriptions[this.prescriptions.length - 1].name
2422
-        this.tabIndex = parseInt(str.charAt(str.length - 1))
2422
+
2423
+        var reg =/[\u4e00-\u9fa5]/g;
2424
+        // var str= " 阿达 adas 123132  一二三 ";
2425
+        // str= str.replace(/[ ]/g, "");//去空格
2426
+        // str= ;//去除中文
2427
+        this.tabIndex = parseInt(str.replace(reg, ""))
2428
+
2423 2429
         ++this.tabIndex
2424 2430
         let newTabName = '处方' + this.tabIndex
2425 2431
         var nowDate = new Date()
@@ -2957,8 +2963,8 @@
2957 2963
             }
2958 2964
 
2959 2965
             var good_info = response.data.data.good_info
2960
-          
2961
- 
2966
+
2967
+
2962 2968
             for (let i = 0; i < good_info.length; i++) {
2963 2969
                good_info[i].stock_count = 0
2964 2970
               if(good_info[i].good_stock_in.length >0 ){