Pārlūkot izejas kodu

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

csx 3 gadus atpakaļ
vecāks
revīzija
acfecf9dbe

+ 6 - 1
src/xt_pages/hospitalStation/components/deskPrescription.vue Parādīt failu

2413
         this.tabIndex = this.prescriptions.length
2413
         this.tabIndex = this.prescriptions.length
2414
 
2414
 
2415
         var str = this.prescriptions[this.prescriptions.length - 1].name
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
         ++this.tabIndex
2422
         ++this.tabIndex
2418
         let newTabName = '处方' + this.tabIndex
2423
         let newTabName = '处方' + this.tabIndex
2419
         var nowDate = new Date()
2424
         var nowDate = new Date()

+ 12 - 6
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Parādīt failu

287
                                         <el-table-column label="库存" width="60">
287
                                         <el-table-column label="库存" width="60">
288
                                             <template slot-scope="scope">
288
                                             <template slot-scope="scope">
289
                                               <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877">
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
                                                <span v-if="scope.row.count%scope.row.min_number>0"> {{scope.row.count%scope.row.min_number}}{{scope.row.min_unit}}</span>
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
                                               </span>
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
                                             </template>
295
                                             </template>
296
                                         </el-table-column>
296
                                         </el-table-column>
297
                                         <el-table-column label="单价" width="40">
297
                                         <el-table-column label="单价" width="40">
2419
         this.tabIndex = this.prescriptions.length
2419
         this.tabIndex = this.prescriptions.length
2420
 
2420
 
2421
         var str = this.prescriptions[this.prescriptions.length - 1].name
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
         ++this.tabIndex
2429
         ++this.tabIndex
2424
         let newTabName = '处方' + this.tabIndex
2430
         let newTabName = '处方' + this.tabIndex
2425
         var nowDate = new Date()
2431
         var nowDate = new Date()
2957
             }
2963
             }
2958
 
2964
 
2959
             var good_info = response.data.data.good_info
2965
             var good_info = response.data.data.good_info
2960
-          
2961
- 
2966
+
2967
+
2962
             for (let i = 0; i < good_info.length; i++) {
2968
             for (let i = 0; i < good_info.length; i++) {
2963
                good_info[i].stock_count = 0
2969
                good_info[i].stock_count = 0
2964
               if(good_info[i].good_stock_in.length >0 ){
2970
               if(good_info[i].good_stock_in.length >0 ){