Browse Source

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

see999 3 years ago
parent
commit
5c9474377b
54 changed files with 960 additions and 697 deletions
  1. 8 0
      src/api/stock.js
  2. 18 18
      src/router/modules/drugs.js
  3. 18 18
      src/router/modules/stock.js
  4. 13 1
      src/xt_pages/data/components/addInspection.vue
  5. 12 1
      src/xt_pages/data/components/editInspection.vue
  6. 24 22
      src/xt_pages/dialysis/dialysisDoctorAdvice.vue
  7. 2 2
      src/xt_pages/hospitalStation/components/deskPrescription.vue
  8. 7 7
      src/xt_pages/hospitalStation/components/prescriptionTable.vue
  9. 2 2
      src/xt_pages/hospitalStation/summary.vue
  10. 7 7
      src/xt_pages/hospitalStation/summaryDetail.vue
  11. 25 13
      src/xt_pages/outpatientCharges/newStatementPrintTwo.vue
  12. 12 12
      src/xt_pages/outpatientCharges/outpatientChargesManagement.vue
  13. 37 6
      src/xt_pages/outpatientCharges/statementPrint.vue
  14. 279 209
      src/xt_pages/outpatientCharges/statementTemplate/printThree.vue
  15. 2 2
      src/xt_pages/outpatientCharges/summary.vue
  16. 7 7
      src/xt_pages/outpatientCharges/summaryDetail.vue
  17. 11 11
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  18. 7 7
      src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue
  19. 3 1
      src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue
  20. 1 1
      src/xt_pages/outpatientDoctorStation/template/printFour.vue
  21. 1 1
      src/xt_pages/outpatientDoctorStation/template/printOne.vue
  22. 2 2
      src/xt_pages/outpatientDoctorStation/template/printThree.vue
  23. 1 1
      src/xt_pages/outpatientDoctorStation/template/printTwo.vue
  24. 2 2
      src/xt_pages/outpatientDoctorStation/treatTemplate/printOne.vue
  25. 40 18
      src/xt_pages/outpatientTool/components/detail.vue
  26. 4 4
      src/xt_pages/outpatientTool/components/settle.vue
  27. 20 19
      src/xt_pages/stock/cancelStockOrderAdd.vue
  28. 10 9
      src/xt_pages/stock/cancelStockOrderEdit.vue
  29. 7 6
      src/xt_pages/stock/drugs/cancelDrugStockOrder.vue
  30. 19 16
      src/xt_pages/stock/drugs/cancelDrugStockOrderAdd.vue
  31. 5 4
      src/xt_pages/stock/drugs/cancelDrugStockOrderEdit.vue
  32. 10 9
      src/xt_pages/stock/drugs/drugDamaged.vue
  33. 7 7
      src/xt_pages/stock/drugs/drugPrint.vue
  34. 40 20
      src/xt_pages/stock/drugs/drugQueryPrint.vue
  35. 29 28
      src/xt_pages/stock/drugs/drugStockInOrderAdd.vue
  36. 2 0
      src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue
  37. 34 23
      src/xt_pages/stock/drugs/drugStockInOrderEdit.vue
  38. 4 0
      src/xt_pages/stock/drugs/drugStockOutOrder.vue
  39. 4 8
      src/xt_pages/stock/drugs/inventory.vue
  40. 2 2
      src/xt_pages/stock/drugs/inventoryDetails.vue
  41. 13 12
      src/xt_pages/stock/drugs/query.vue
  42. 3 3
      src/xt_pages/stock/inventory.vue
  43. 10 3
      src/xt_pages/stock/inventoryDetails.vue
  44. 36 37
      src/xt_pages/stock/inventoryPrint.vue
  45. 17 19
      src/xt_pages/stock/stockDamaged.vue
  46. 24 23
      src/xt_pages/stock/stockInOrderAdd.vue
  47. 2 0
      src/xt_pages/stock/stockInOrderDetailPrint.vue
  48. 37 29
      src/xt_pages/stock/stockInOrderEdit.vue
  49. 4 0
      src/xt_pages/stock/stockOutOrder.vue
  50. 2 19
      src/xt_pages/stock/stockOutOrderAdd.vue
  51. 6 6
      src/xt_pages/stock/stockOutOrderDetailPrint.vue
  52. 39 11
      src/xt_pages/stock/stockPrint.vue
  53. 12 5
      src/xt_pages/stock/stockQuery.vue
  54. 17 4
      src/xt_pages/user/doctorAdvice.vue

+ 8 - 0
src/api/stock.js View File

970
     params: params
970
     params: params
971
   })
971
   })
972
 }
972
 }
973
+
974
+export function getInventoryExportList(params) {
975
+  return request({
976
+    url: '/api/stock/getinventoryexportlist',
977
+    method: 'get',
978
+    params: params
979
+  })
980
+}

+ 18 - 18
src/router/modules/drugs.js View File

30
       name: 'drugsStockOut',
30
       name: 'drugsStockOut',
31
       meta: { title: 'drugsStockOut', noCache: true }
31
       meta: { title: 'drugsStockOut', noCache: true }
32
     },
32
     },
33
-    {
34
-      path: '/stock/drugs/drugModifyPrice',
35
-      component: () => import('@/xt_pages/stock/drugs/drugModifyPrice'),
36
-      name: 'drugModifyPrice',
37
-      meta: { title: 'drugModifyPrice', noCache: true }
38
-    },
33
+    // {
34
+    //   path: '/stock/drugs/drugModifyPrice',
35
+    //   component: () => import('@/xt_pages/stock/drugs/drugModifyPrice'),
36
+    //   name: 'drugModifyPrice',
37
+    //   meta: { title: 'drugModifyPrice', noCache: true }
38
+    // },
39
     {
39
     {
40
       path: '/stock/drugs/drugModifyPricePrint',
40
       path: '/stock/drugs/drugModifyPricePrint',
41
       component: () => import('@/xt_pages/stock/drugs/drugModifyPricePrint'),
41
       component: () => import('@/xt_pages/stock/drugs/drugModifyPricePrint'),
50
     //   name: 'drugDamaged',
50
     //   name: 'drugDamaged',
51
     //   meta: { title: 'drugDamaged', noCache: true }
51
     //   meta: { title: 'drugDamaged', noCache: true }
52
     // },
52
     // },
53
-    {
54
-      path: '/stock/drugs/drugDamagePrint',
55
-      component: () => import('@/xt_pages/stock/drugs/drugDamagePrint'),
56
-      name: 'drugDamaged',
57
-      meta: { title: 'drugDamaged', noCache: true }
58
-    },
59
-    {
60
-      path: '/stock/drugs/drugWarning',
61
-      component: () => import('@/xt_pages/stock/drugs/drugWarning'),
62
-      name: 'drugWarning',
63
-      meta: { title: 'drugWarning', noCache: true }
64
-    },
53
+    // {
54
+    //   path: '/stock/drugs/drugDamagePrint',
55
+    //   component: () => import('@/xt_pages/stock/drugs/drugDamagePrint'),
56
+    //   name: 'drugDamaged',
57
+    //   meta: { title: 'drugDamaged', noCache: true }
58
+    // },
59
+    // {
60
+    //   path: '/stock/drugs/drugWarning',
61
+    //   component: () => import('@/xt_pages/stock/drugs/drugWarning'),
62
+    //   name: 'drugWarning',
63
+    //   meta: { title: 'drugWarning', noCache: true }
64
+    // },
65
     {
65
     {
66
       path: '/stock/drugs/drugInventory',
66
       path: '/stock/drugs/drugInventory',
67
       component: () => import('@/xt_pages/stock/drugs/drugInventory'),
67
       component: () => import('@/xt_pages/stock/drugs/drugInventory'),

+ 18 - 18
src/router/modules/stock.js View File

42
       name: 'cancelStockOrder',
42
       name: 'cancelStockOrder',
43
       meta: { title: 'cancelStockOrder', noCache: true }
43
       meta: { title: 'cancelStockOrder', noCache: true }
44
     },
44
     },
45
-    {
46
-      path: '/stock/stockModifyPrice',
47
-      component: () => import('@/xt_pages/stock/stockModifyPrice'),
48
-      name: 'stockModifyPrice',
49
-      meta: { title: 'stockModifyPrice', noCache: true }
50
-    },
45
+    // {
46
+    //   path: '/stock/stockModifyPrice',
47
+    //   component: () => import('@/xt_pages/stock/stockModifyPrice'),
48
+    //   name: 'stockModifyPrice',
49
+    //   meta: { title: 'stockModifyPrice', noCache: true }
50
+    // },
51
     {
51
     {
52
       path: '/stock/stockModifyPricePrint',
52
       path: '/stock/stockModifyPricePrint',
53
       component: () => import('@/xt_pages/stock/stockModifyPricePrint'),
53
       component: () => import('@/xt_pages/stock/stockModifyPricePrint'),
56
       is_menu: false,
56
       is_menu: false,
57
       meta: { title: 'stockModifyPricePrint', noCache: true }
57
       meta: { title: 'stockModifyPricePrint', noCache: true }
58
     },
58
     },
59
-    {
60
-      path: '/stock/stockDamaged',
61
-      component: () => import('@/xt_pages/stock/stockDamaged'),
62
-      name: 'stockDamaged',
63
-      meta: { title: 'stockDamaged', noCache: true }
64
-    },
59
+    // {
60
+    //   path: '/stock/stockDamaged',
61
+    //   component: () => import('@/xt_pages/stock/stockDamaged'),
62
+    //   name: 'stockDamaged',
63
+    //   meta: { title: 'stockDamaged', noCache: true }
64
+    // },
65
     {
65
     {
66
       path: '/stock/stockDamagePrint',
66
       path: '/stock/stockDamagePrint',
67
       component: () => import('@/xt_pages/stock/stockDamagePrint'),
67
       component: () => import('@/xt_pages/stock/stockDamagePrint'),
70
       is_menu: false,
70
       is_menu: false,
71
       meta: { title: 'stockModifyPricePrint', noCache: true }
71
       meta: { title: 'stockModifyPricePrint', noCache: true }
72
     },
72
     },
73
-    {
74
-      path: '/stock/stockWarning',
75
-      component: () => import('@/xt_pages/stock/stockWarning'),
76
-      name: 'stockWarning',
77
-      meta: { title: 'stockWarning', noCache: true }
78
-    },
73
+    // {
74
+    //   path: '/stock/stockWarning',
75
+    //   component: () => import('@/xt_pages/stock/stockWarning'),
76
+    //   name: 'stockWarning',
77
+    //   meta: { title: 'stockWarning', noCache: true }
78
+    // },
79
     {
79
     {
80
       path: '/stock/stockInventory',
80
       path: '/stock/stockInventory',
81
       component: () => import('@/xt_pages/stock/stockInventory'),
81
       component: () => import('@/xt_pages/stock/stockInventory'),

+ 13 - 1
src/xt_pages/data/components/addInspection.vue View File

79
                         <template slot-scope="scope">{{scope.row.number}}</template>
79
                         <template slot-scope="scope">{{scope.row.number}}</template>
80
                     </el-table-column>
80
                     </el-table-column>
81
                     <el-table-column align="center" prop="name" label="单位" width="120">
81
                     <el-table-column align="center" prop="name" label="单位" width="120">
82
-                        <template slot-scope="scope">{{scope.row.unit}}</template>
82
+                        <template slot-scope="scope">
83
+                            <div v-if="scope.row.type == 2">{{scope.row.unit}}</div>
84
+                            <div v-if="scope.row.type == 3">{{getUnit(scope.row.unit)}}</div>
85
+
86
+                        </template>
83
                     </el-table-column>
87
                     </el-table-column>
84
                     <el-table-column align="center" prop="name" label="单价" width="120">
88
                     <el-table-column align="center" prop="name" label="单价" width="120">
85
                         <template slot-scope="scope">{{scope.row.price}}</template>
89
                         <template slot-scope="scope">{{scope.row.price}}</template>
163
       }
167
       }
164
     },
168
     },
165
     methods: {
169
     methods: {
170
+      getUnit(id){
171
+        var arr =  getDataConfig('hemodialysis','units')
172
+        for(let i = 0;i < arr.length; i++){
173
+          if(id == arr[i].id){
174
+            return arr[i].name
175
+          }
176
+        }
177
+      },
166
       changeProject() {
178
       changeProject() {
167
         this.form.number = 1
179
         this.form.number = 1
168
 
180
 

+ 12 - 1
src/xt_pages/data/components/editInspection.vue View File

78
                         <template slot-scope="scope">{{scope.row.number}}</template>
78
                         <template slot-scope="scope">{{scope.row.number}}</template>
79
                     </el-table-column>
79
                     </el-table-column>
80
                     <el-table-column align="center" prop="name" label="单位" width="120">
80
                     <el-table-column align="center" prop="name" label="单位" width="120">
81
-                        <template slot-scope="scope">{{scope.row.unit}}</template>
81
+                        <template slot-scope="scope">
82
+                            <div v-if="scope.row.type == 2">{{scope.row.unit}}</div>
83
+                            <div v-if="scope.row.type == 3">{{getUnit(scope.row.unit)}}</div>
84
+                        </template>
82
                     </el-table-column>
85
                     </el-table-column>
83
                     <el-table-column align="center" prop="name" label="单价" width="120">
86
                     <el-table-column align="center" prop="name" label="单价" width="120">
84
                         <template slot-scope="scope">{{scope.row.price}}</template>
87
                         <template slot-scope="scope">{{scope.row.price}}</template>
166
       }
169
       }
167
     },
170
     },
168
     methods: {
171
     methods: {
172
+      getUnit(id){
173
+        var arr =  getDataConfig('hemodialysis','units')
174
+        for(let i = 0;i < arr.length; i++){
175
+          if(id == arr[i].id){
176
+            return arr[i].name
177
+          }
178
+        }
179
+      },
169
       changeProject() {
180
       changeProject() {
170
         this.form.number = 1
181
         this.form.number = 1
171
 
182
 

+ 24 - 22
src/xt_pages/dialysis/dialysisDoctorAdvice.vue View File

59
 
59
 
60
         <!-- <el-button type="primary" :disabled="selecting_schs.length == 0" @click="batchPrintAction">打印</el-button> -->
60
         <!-- <el-button type="primary" :disabled="selecting_schs.length == 0" @click="batchPrintAction">打印</el-button> -->
61
       </div>
61
       </div>
62
-     
62
+
63
       <div class="cell clearfix">
63
       <div class="cell clearfix">
64
         <label class="title"> <span class="name">排班班次</span> : </label>
64
         <label class="title"> <span class="name">排班班次</span> : </label>
65
         <div class="time">
65
         <div class="time">
90
           </ul>
90
           </ul>
91
         </div>
91
         </div>
92
       </div>
92
       </div>
93
-     
93
+
94
      <div class="cell clearfix">
94
      <div class="cell clearfix">
95
         <label class="title"> <span class="name">给药途径</span> : </label>
95
         <label class="title"> <span class="name">给药途径</span> : </label>
96
         <div class="time">
96
         <div class="time">
106
           </ul>
106
           </ul>
107
         </div>
107
         </div>
108
       </div>
108
       </div>
109
-    
110
-      <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" 
109
+
110
+      <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
111
         @selection-change="handleSelectionChange"
111
         @selection-change="handleSelectionChange"
112
         :row-class-name="tableRowClassName"
112
         :row-class-name="tableRowClassName"
113
         :span-method="objectSpanMethod"
113
         :span-method="objectSpanMethod"
236
           </template>
236
           </template>
237
         </el-table-column>
237
         </el-table-column>
238
       </el-table>
238
       </el-table>
239
-         <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" 
239
+         <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
240
         @selection-change="handleSelectionChange"
240
         @selection-change="handleSelectionChange"
241
         :row-class-name="tableRowClassName"
241
         :row-class-name="tableRowClassName"
242
         :span-method="objectSpanMethod"
242
         :span-method="objectSpanMethod"
441
     this.getTemplateInfo();
441
     this.getTemplateInfo();
442
     this.requestSchedualDoctors(this.time)
442
     this.requestSchedualDoctors(this.time)
443
     // this.template_id = this.$store.getters.xt_user.template_info.template_id;
443
     // this.template_id = this.$store.getters.xt_user.template_info.template_id;
444
-  
444
+
445
   },
445
   },
446
   methods: {
446
   methods: {
447
     getTemplateInfo() {
447
     getTemplateInfo() {
467
     },
467
     },
468
 
468
 
469
     selectSchedulType(scheduleType) {
469
     selectSchedulType(scheduleType) {
470
-     
470
+
471
       this.schedulType = scheduleType;
471
       this.schedulType = scheduleType;
472
       this.listQuery.schedul_type = scheduleType;
472
       this.listQuery.schedul_type = scheduleType;
473
       console.log("班次",this.listQuery.schedul_type)
473
       console.log("班次",this.listQuery.schedul_type)
479
       console.log("分区",this.listQuery.partition_type)
479
       console.log("分区",this.listQuery.partition_type)
480
       this.requestSchedualDoctors(this.time);
480
       this.requestSchedualDoctors(this.time);
481
     },
481
     },
482
-    
482
+
483
     selectDeliveryWay(val){
483
     selectDeliveryWay(val){
484
        this.delivery_way = val
484
        this.delivery_way = val
485
        this.requestSchedualDoctors(this.time)
485
        this.requestSchedualDoctors(this.time)
506
       });
506
       });
507
     },
507
     },
508
     requestSchedualDoctors (time) {
508
     requestSchedualDoctors (time) {
509
-        
509
+
510
         var name = ""
510
         var name = ""
511
         for(let i=0;i<this.deliveryWay.length;i++){
511
         for(let i=0;i<this.deliveryWay.length;i++){
512
             if(this.delivery_way == this.deliveryWay[i].id){
512
             if(this.delivery_way == this.deliveryWay[i].id){
518
         }
518
         }
519
 
519
 
520
         let newTime =  moment(time).format('YYYY-MM-DD')
520
         let newTime =  moment(time).format('YYYY-MM-DD')
521
-       
521
+
522
          var schedule_type = this.listQuery.schedul_type
522
          var schedule_type = this.listQuery.schedul_type
523
          var partition_type = this.listQuery.partition_type
523
          var partition_type = this.listQuery.partition_type
524
-        
524
+
525
         console.log("班次",schedule_type,"分区",partition_type)
525
         console.log("班次",schedule_type,"分区",partition_type)
526
         getSchedualDoctors({date: newTime,patient_type: 0,advice_type: 2,delivery_way:name,schedule_type:schedule_type,partition_type:partition_type,patient_id:this.patient_id}).then(rs => {
526
         getSchedualDoctors({date: newTime,patient_type: 0,advice_type: 2,delivery_way:name,schedule_type:schedule_type,partition_type:partition_type,patient_id:this.patient_id}).then(rs => {
527
         var resp = rs.data
527
         var resp = rs.data
542
                     projectArr.push(item)
542
                     projectArr.push(item)
543
                   }
543
                   }
544
                 })
544
                 })
545
-                
546
               })
545
               })
547
-              
546
+
547
+              console.log(projectArr)
548
+
548
               resp.data.hisAdvices.map((item,index) => {
549
               resp.data.hisAdvices.map((item,index) => {
549
-                if(projectArr[index].project.length > 0){
550
+                if(projectArr[index].project && projectArr[index].project.length > 0){
550
                   projectArr[index].project.map(it => {
551
                   projectArr[index].project.map(it => {
551
                     let obj = {
552
                     let obj = {
552
                       advice_doctor: it.doctor,
553
                       advice_doctor: it.doctor,
553
                       start_time:it.start_time,
554
                       start_time:it.start_time,
554
-                      advice_name: it.type == 2 ? it.project.project_name : it.good_info.good_name,
555
+                      advice_name:it.team_id > 0 && it.is_check_team == 1 ? it.team.project_team : it.type == 2 ? it.project.project_name : it.good_info.good_name,
555
                       execution_time:it.execution_time,
556
                       execution_time:it.execution_time,
556
                       execution_state:it.execution_state,
557
                       execution_state:it.execution_state,
557
                       execution_staff:it.execution_staff,
558
                       execution_staff:it.execution_staff,
614
                     }
615
                     }
615
                 })
616
                 })
616
             }
617
             }
617
-            
618
+
618
             console.log("分区",this.partitionType)
619
             console.log("分区",this.partitionType)
619
             if(this.partitionType == 0){
620
             if(this.partitionType == 0){
620
                 this.scheduleMap = newSchedules
621
                 this.scheduleMap = newSchedules
677
                     }
678
                     }
678
                 })
679
                 })
679
             }
680
             }
680
-            
681
-            
681
+
682
+
682
             if(this.partitionType == 0){
683
             if(this.partitionType == 0){
683
                 this.scheduleMap = newSchedules
684
                 this.scheduleMap = newSchedules
684
             }else {
685
             }else {
752
       for (let index = 0; index < this.selecting_schs.length; index++) {
753
       for (let index = 0; index < this.selecting_schs.length; index++) {
753
         sch_ids.push(this.selecting_schs[index].patient_id);
754
         sch_ids.push(this.selecting_schs[index].patient_id);
754
       }
755
       }
755
-  
756
+
756
       this.$store.dispatch("SetAdviceIDs", sch_ids);
757
       this.$store.dispatch("SetAdviceIDs", sch_ids);
757
        var name = ""
758
        var name = ""
758
         for(let i=0;i<this.deliveryWay.length;i++){
759
         for(let i=0;i<this.deliveryWay.length;i++){
777
       for (let index = 0; index < this.selecting_schs.length; index++) {
778
       for (let index = 0; index < this.selecting_schs.length; index++) {
778
         sch_ids.push(this.selecting_schs[index].patient_id);
779
         sch_ids.push(this.selecting_schs[index].patient_id);
779
       }
780
       }
780
-  
781
+
781
       this.$store.dispatch("SetAdviceIDs", sch_ids);
782
       this.$store.dispatch("SetAdviceIDs", sch_ids);
782
        var name = ""
783
        var name = ""
783
         for(let i=0;i<this.deliveryWay.length;i++){
784
         for(let i=0;i<this.deliveryWay.length;i++){
868
                 }
869
                 }
869
             }
870
             }
870
         }
871
         }
871
-        
872
+
872
         if (columnIndex === 1) {
873
         if (columnIndex === 1) {
873
             let index = this.indexInfoList.findIndex(item => {  //遍历数组
874
             let index = this.indexInfoList.findIndex(item => {  //遍历数组
874
                 return item.firstIndex === rowIndex
875
                 return item.firstIndex === rowIndex
956
         }
957
         }
957
 
958
 
958
         if (isChild == 1) {
959
         if (isChild == 1) {
959
-          // 不是子药 
960
+          // 不是子药
960
           // console.log(tempDrugSpecDesc)
961
           // console.log(tempDrugSpecDesc)
961
           // console.log(tempPrescribingNumberDesc)
962
           // console.log(tempPrescribingNumberDesc)
962
           // console.log(tempSingleDoseDesc)
963
           // console.log(tempSingleDoseDesc)
989
         // console.log('val',val)
990
         // console.log('val',val)
990
         this.selecting_schs = val;
991
         this.selecting_schs = val;
991
     },
992
     },
993
+
992
     querySearchAsync(keyword, cb) {
994
     querySearchAsync(keyword, cb) {
993
         let key = '';
995
         let key = '';
994
         if (keyword != undefined) {
996
         if (keyword != undefined) {

+ 2 - 2
src/xt_pages/hospitalStation/components/deskPrescription.vue View File

1653
             total = total + this.curPrescriptions.project[a].price * this.curPrescriptions.project[a].total
1653
             total = total + this.curPrescriptions.project[a].price * this.curPrescriptions.project[a].total
1654
           }
1654
           }
1655
           return total.toFixed(2)
1655
           return total.toFixed(2)
1656
-        }
1657
 
1656
 
1657
+        }
1658
       },
1658
       },
1659
       getTotal() {
1659
       getTotal() {
1660
         var total = 0
1660
         var total = 0
1699
           }
1699
           }
1700
         }
1700
         }
1701
 
1701
 
1702
-        return total.toFixed(2)
1702
+        return total.toFixed(24)
1703
       },
1703
       },
1704
       createFilter(queryString) {
1704
       createFilter(queryString) {
1705
         return (restaurant) => {
1705
         return (restaurant) => {

+ 7 - 7
src/xt_pages/hospitalStation/components/prescriptionTable.vue View File

475
       },
475
       },
476
       getPrescribingNumberUnit(scope) {
476
       getPrescribingNumberUnit(scope) {
477
 
477
 
478
-        // console.log('scope',scope)
478
+        console.log('scope9999999',scope)
479
         // if(scope.row.drug.min_unit == scope.row.single_dose_unit){
479
         // if(scope.row.drug.min_unit == scope.row.single_dose_unit){
480
         //   if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
480
         //   if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
481
         //     scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
481
         //     scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
494
         // }
494
         // }
495
         if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
495
         if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
496
           scope.row.retail_price = scope.row.drug.min_price
496
           scope.row.retail_price = scope.row.drug.min_price
497
-          if (scope.row.prescribing_number > scope.row.drug.total) {
498
-            this.$message.error(scope.row.drug_name + '库存不足')
499
-          }
497
+          // if (scope.row.prescribing_number > scope.row.drug.total) {
498
+          //   this.$message.error(scope.row.drug_name + '库存不足')
499
+          // }
500
         } else {
500
         } else {
501
-          if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
502
-            this.$message.error(scope.row.drug_name + '库存不足')
503
-          }
501
+          // if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
502
+          //   this.$message.error(scope.row.drug_name + '库存不足')
503
+          // }
504
           scope.row.retail_price = scope.row.drug.retail_price
504
           scope.row.retail_price = scope.row.drug.retail_price
505
         }
505
         }
506
       },
506
       },

+ 2 - 2
src/xt_pages/hospitalStation/summary.vue View File

74
                 <!--<template slot-scope="scope"></template>-->
74
                 <!--<template slot-scope="scope"></template>-->
75
                 <!--</el-table-column>-->
75
                 <!--</el-table-column>-->
76
                 <el-table-column align="center" prop="name" label="应收金额">
76
                 <el-table-column align="center" prop="name" label="应收金额">
77
-                    <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
77
+                    <template slot-scope="scope">{{scope.row.medfee_sumamt.toFixed(2)}}</template>
78
                 </el-table-column>
78
                 </el-table-column>
79
                 <el-table-column align="center" prop="name" label="实收金额">
79
                 <el-table-column align="center" prop="name" label="实收金额">
80
-                    <template slot-scope="scope">{{scope.row.reality_price}}</template>
80
+                    <template slot-scope="scope">{{scope.row.reality_price.toFixed(2)}}</template>
81
                 </el-table-column>
81
                 </el-table-column>
82
                 <el-table-column align="center" prop="name" label="科室">
82
                 <el-table-column align="center" prop="name" label="科室">
83
                     <template slot-scope="scope">{{scope.row.department_name}}</template>
83
                     <template slot-scope="scope">{{scope.row.department_name}}</template>

+ 7 - 7
src/xt_pages/hospitalStation/summaryDetail.vue View File

56
                             <el-table-column align="center" prop="name" width="60" label="单价">
56
                             <el-table-column align="center" prop="name" width="60" label="单价">
57
                                 <template slot-scope="scope">
57
                                 <template slot-scope="scope">
58
                                     <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
58
                                     <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
59
-                                    {{scope.row.price}}元
59
+                                    {{scope.row.price.toFixed(2)}}元
60
 
60
 
61
                                 </template>
61
                                 </template>
62
                             </el-table-column>
62
                             </el-table-column>
64
                             <el-table-column align="center" prop="name" width="60" label="总价">
64
                             <el-table-column align="center" prop="name" width="60" label="总价">
65
                                 <template slot-scope="scope">
65
                                 <template slot-scope="scope">
66
                                     <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
66
                                     <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
67
-                                    {{scope.row.price}}元
67
+                                    {{scope.row.price.toFixed(2)}}元
68
 
68
 
69
                                 </template>
69
                                 </template>
70
                             </el-table-column>
70
                             </el-table-column>
112
                     </ul>
112
                     </ul>
113
                     <p class="centerRightTitle" style="margin-top:10px;">收费信息</p>
113
                     <p class="centerRightTitle" style="margin-top:10px;">收费信息</p>
114
                     <ul class="basicUl">
114
                     <ul class="basicUl">
115
-                        <li style="width:50%;">应收金额:{{order.medfee_sumamt }}元</li>
116
-                        <li style="width:50%;">实收金额:{{order.reality_price}}元</li>
117
-                        <li style="width:50%;">舍入金额:{{order.medfee_sumamt - order.reality_price}}元</li>
118
-                        <li style="width:50%;">优惠金额:{{order.preferential_price}}元</li>
115
+                        <li style="width:50%;">应收金额:{{order.medfee_sumamt.toFixed(2) }}元</li>
116
+                        <li style="width:50%;">实收金额:{{order.reality_price.toFixed(2)}}元</li>
117
+                        <li style="width:50%;">舍入金额:{{order.medfee_sumamt.toFixed(2) - order.reality_price.toFixed(2)}}元</li>
118
+                        <li style="width:50%;">优惠金额:{{order.preferential_price.toFixed(2)}}元</li>
119
                         <li style="width:50%;">总金额</li>
119
                         <li style="width:50%;">总金额</li>
120
-                        <li style="width:50%;">{{order.medfee_sumamt}}元</li>
120
+                        <li style="width:50%;">{{order.medfee_sumamt.toFixed(2)}}元</li>
121
                     </ul>
121
                     </ul>
122
                     <!--<p class="centerRightTitle">发票费用</p>-->
122
                     <!--<p class="centerRightTitle">发票费用</p>-->
123
                     <!--<ul class="basicUl">-->
123
                     <!--<ul class="basicUl">-->

+ 25 - 13
src/xt_pages/outpatientCharges/newStatementPrintTwo.vue View File

193
                 scanStyles: false
193
                 scanStyles: false
194
               });
194
               });
195
             }
195
             }
196
-            
197
-            
196
+
197
+
198
           },500)
198
           },500)
199
         }else{
199
         }else{
200
           const style =
200
           const style =
232
 
232
 
233
               return false
233
               return false
234
             } else {
234
             } else {
235
-              
235
+
236
               this.balanceAccounts = response.data.data
236
               this.balanceAccounts = response.data.data
237
               let arr = []
237
               let arr = []
238
               let obj = {
238
               let obj = {
250
                 details: [],
250
                 details: [],
251
                 total: 0
251
                 total: 0
252
               }
252
               }
253
+
254
+              let obj4 = {
255
+                type:4,
256
+                details: [],
257
+                total: 0
258
+              }
253
               let num = 0
259
               let num = 0
254
               this.balanceAccounts.order_info.map(item => {
260
               this.balanceAccounts.order_info.map(item => {
255
-                
261
+
256
                 if(item.advice_id > 0){
262
                 if(item.advice_id > 0){
257
                   obj.details.push(item)
263
                   obj.details.push(item)
258
                   obj.total += (item.pric * item.advice.prescribing_number)
264
                   obj.total += (item.pric * item.advice.prescribing_number)
259
                   num++
265
                   num++
260
                 }else{
266
                 }else{
261
                   if(item.project.type == 2){
267
                   if(item.project.type == 2){
262
-                    obj2.details.push(item)
263
-                    obj2.total += (item.pric * item.project.count)
264
-                    num++
268
+                    if (item.project.team_id > 0) {
269
+                      obj2.details.push(item)
270
+                      obj2.total += (item.pric * item.project.count)
271
+                      num++
272
+                    }else{
273
+                      obj2.details.push(item)
274
+                      obj2.total += (item.pric * item.project.count)
275
+                      num++
276
+
277
+                    }
278
+
265
                   }else{
279
                   }else{
266
                     obj3.details.push(item)
280
                     obj3.details.push(item)
267
                     obj3.total += (item.pric * item.project.count)
281
                     obj3.total += (item.pric * item.project.count)
343
                       price_arr.push(that.info.transBody.outputlist1[i].akc225);
357
                       price_arr.push(that.info.transBody.outputlist1[i].akc225);
344
                       total_arr.push(that.info.transBody.outputlist1[i].akc264)
358
                       total_arr.push(that.info.transBody.outputlist1[i].akc264)
345
                     }
359
                     }
346
-
347
-                    console.log("~~~" + that.info);
360
+                    
348
 
361
 
349
                     that.info['name_arr'] = name_arr;
362
                     that.info['name_arr'] = name_arr;
350
                     that.info['spec_arr'] = spec_arr;
363
                     that.info['spec_arr'] = spec_arr;
353
                     that.info['total_arr'] = total_arr;
366
                     that.info['total_arr'] = total_arr;
354
                     that.info['record_date'] = obj.record_time;
367
                     that.info['record_date'] = obj.record_time;
355
 
368
 
356
-                    console.log("~~" + that.info)
357
 
369
 
358
                     let type_arr = []
370
                     let type_arr = []
359
                     for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
371
                     for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
378
                         }
390
                         }
379
                       }
391
                       }
380
                       that.info.new_detail_list.push(obj)
392
                       that.info.new_detail_list.push(obj)
381
-                      
393
+
382
                     }
394
                     }
383
                     let num = 0
395
                     let num = 0
384
                     that.info.new_detail_list.map(item => {
396
                     that.info.new_detail_list.map(item => {
419
                     }
431
                     }
420
                     console.log('that.info.transBody.outputlist2',that.info.transBody.outputlist2)
432
                     console.log('that.info.transBody.outputlist2',that.info.transBody.outputlist2)
421
                     console.log('this.num222',that.num)
433
                     console.log('this.num222',that.num)
422
-                    
434
+
423
                   }
435
                   }
424
                 }
436
                 }
425
               })
437
               })
450
 
462
 
451
     created() {
463
     created() {
452
       this.org_id = this.$store.getters.xt_user.org_id
464
       this.org_id = this.$store.getters.xt_user.org_id
453
-      
465
+
454
       this.getInfo(this.paramsObj)
466
       this.getInfo(this.paramsObj)
455
     },
467
     },
456
     watch:{
468
     watch:{

+ 12 - 12
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

162
                                                 <span>当前处方总费用:<span style="color:red;">{{items.total}}元</span></span>
162
                                                 <span>当前处方总费用:<span style="color:red;">{{items.total}}元</span></span>
163
 
163
 
164
 
164
 
165
-                                                <span>医疗费总额:<span style="color:red;">{{ items.curPrescriptions.order.medfee_sumamt ?  items.curPrescriptions.order.medfee_sumamt:getTotalFour(items.prescriptions)?getTotalFour(items.prescriptions):'' }}元</span></span>
166
-                                                <span>基金支付金额:<span style="color:red;">{{ items.curPrescriptions.order.hifp_pay?items.curPrescriptions.order.hifp_pay:''}}元</span></span>
167
-                                                <span>个人账户支付金额:<span style="color:red;">{{ items.curPrescriptions.order.acct_pay?items.curPrescriptions.order.acct_pay:''}}元</span></span>
165
+                                                <span>医疗费总额:<span style="color:red;">{{ items.curPrescriptions.order.medfee_sumamt ?  items.curPrescriptions.order.medfee_sumamt.toFixed(2):getTotalFour(items.prescriptions)?getTotalFour(items.prescriptions):'' }}元</span></span>
166
+                                                <span>基金支付金额:<span style="color:red;">{{ items.curPrescriptions.order.hifp_pay?items.curPrescriptions.order.hifp_pay.toFixed(2):''}}元</span></span>
167
+                                                <span>个人账户支付金额:<span style="color:red;">{{ items.curPrescriptions.order.acct_pay?items.curPrescriptions.order.acct_pay.toFixed(2):''}}元</span></span>
168
                                                 <span v-if="hisPatientInfo.balance_accounts_type != 2">个人支付金额:<span
168
                                                 <span v-if="hisPatientInfo.balance_accounts_type != 2">个人支付金额:<span
169
-                                                        style="color:red;">{{ items.curPrescriptions.order.psn_cash_pay?items.curPrescriptions.order.psn_cash_pay:''}}元</span></span>
169
+                                                        style="color:red;">{{ items.curPrescriptions.order.psn_cash_pay?items.curPrescriptions.order.psn_cash_pay.toFixed(2):''}}元</span></span>
170
                                                 <span v-if="hisPatientInfo.balance_accounts_type == 2">个人支付金额:<span
170
                                                 <span v-if="hisPatientInfo.balance_accounts_type == 2">个人支付金额:<span
171
-                                                        style="color:red;">{{ items.curPrescriptions.order.medfee_sumamt}}元</span></span>
171
+                                                        style="color:red;">{{ items.curPrescriptions.order.medfee_sumamt.toFixed(2)}}元</span></span>
172
 
172
 
173
-                                                <span>个人账户金额:<span style="color:red;">{{ items.curPrescriptions.order.balc?items.curPrescriptions.order.balc:''}}元</span></span>
173
+                                                <span>个人账户金额:<span style="color:red;">{{ items.curPrescriptions.order.balc?items.curPrescriptions.order.balc.toFixed(2):''}}元</span></span>
174
 
174
 
175
                                                 <span v-if="items.curPrescriptions.order_status  == 1">待结算</span>
175
                                                 <span v-if="items.curPrescriptions.order_status  == 1">待结算</span>
176
                                                 <span v-if="items.curPrescriptions.order_status  == 2">已结算</span>
176
                                                 <span v-if="items.curPrescriptions.order_status  == 2">已结算</span>
326
                                           <span>当前处方总费用:<span
326
                                           <span>当前处方总费用:<span
327
                                                   style="color:red;">{{ items.month_total }}元</span></span>
327
                                                   style="color:red;">{{ items.month_total }}元</span></span>
328
 
328
 
329
-                                                <span>医疗费总额:<span style="color:red;">{{ items.curMonthPrescriptions.order.medfee_sumamt ?  items.curMonthPrescriptions.order.medfee_sumamt:getTotalFour(items.month_prescriptions)?getTotalFour(items.month_prescriptions):'' }}元</span></span>
330
-                                                <span>基金支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.hifp_pay?items.curMonthPrescriptions.order.hifp_pay:''}}元</span></span>
331
-                                                <span>个人账户支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.acct_pay?items.curMonthPrescriptions.order.acct_pay:''}}元</span></span>
329
+                                                <span>医疗费总额:<span style="color:red;">{{ items.curMonthPrescriptions.order.medfee_sumamt?  items.curMonthPrescriptions.order.medfee_sumamt.toFixed(2) :getTotalFour(items.month_prescriptions)?getTotalFour(items.month_prescriptions):'' }}元</span></span>
330
+                                                <span>基金支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.hifp_pay?items.curMonthPrescriptions.order.hifp_pay.toFixed(2) :''}}元</span></span>
331
+                                                <span>个人账户支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.acct_pay?items.curMonthPrescriptions.order.acct_pay.toFixed(2) :''}}元</span></span>
332
                                                 <!--<span>个人支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.psn_cash_pay?items.curMonthPrescriptions.order.psn_cash_pay:''}}元</span></span>-->
332
                                                 <!--<span>个人支付金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.psn_cash_pay?items.curMonthPrescriptions.order.psn_cash_pay:''}}元</span></span>-->
333
 
333
 
334
                                                 <span v-if="hisPatientInfo.balance_accounts_type != 2">个人支付金额:<span
334
                                                 <span v-if="hisPatientInfo.balance_accounts_type != 2">个人支付金额:<span
335
-                                                        style="color:red;">{{ items.curMonthPrescriptions.order.psn_cash_pay?items.curMonthPrescriptions.order.psn_cash_pay:''}}元</span></span>
335
+                                                        style="color:red;">{{ items.curMonthPrescriptions.order.psn_cash_pay ?items.curMonthPrescriptions.order.psn_cash_pay.toFixed(2) :''}}元</span></span>
336
                                                 <span v-if="hisPatientInfo.balance_accounts_type == 2">个人支付金额:<span
336
                                                 <span v-if="hisPatientInfo.balance_accounts_type == 2">个人支付金额:<span
337
-                                                        style="color:red;">{{ items.curMonthPrescriptions.order.medfee_sumamt}}元</span></span>
337
+                                                        style="color:red;">{{ items.curMonthPrescriptions.order.medfee_sumamt.toFixed(2) }}元</span></span>
338
 
338
 
339
 
339
 
340
-                                                <span>个人账户金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.account_price?items.curMonthPrescriptions.order.account_price:''}}元</span></span>
340
+                                                <span>个人账户金额:<span style="color:red;">{{ items.curMonthPrescriptions.order.account_price?items.curMonthPrescriptions.order.account_price.toFixed(2) :''}}元</span></span>
341
 
341
 
342
                                             </div>
342
                                             </div>
343
 
343
 

+ 37 - 6
src/xt_pages/outpatientCharges/statementPrint.vue View File

13
       </template>
13
       </template>
14
 
14
 
15
       <div class='dialysisPage' style="padding-top:40px;">
15
       <div class='dialysisPage' style="padding-top:40px;">
16
-        <div v-if="org_id == 9990 || org_id == 10138 || org_id == 9504 || org_id == 10028 || org_id == 0">
16
+        <div v-if="org_id == 9990 || org_id == 10138 || org_id == 9504 || org_id == 10028 || org_id == 0 || org_id == 4">
17
           <printTwo :info="info" v-if="org_id == 9990"></printTwo>
17
           <printTwo :info="info" v-if="org_id == 9990"></printTwo>
18
-          <printThree :info="info" :paramsObj="paramsObj" :balanceAccounts="balanceAccounts" v-if="org_id == 10138"></printThree>
18
+          <printThree :info="info" :paramsObj="paramsObj" :balanceAccounts="balanceAccounts" v-if="org_id == 10138 || org_id == 0 || org_id == 4"></printThree>
19
           <printFour v-if="org_id == 9504 || org_id == 10028 || org_id == 0" :info="info" :paramsObj="paramsObj" :balanceAccounts="balanceAccounts"></printFour>
19
           <printFour v-if="org_id == 9504 || org_id == 10028 || org_id == 0" :info="info" :paramsObj="paramsObj" :balanceAccounts="balanceAccounts"></printFour>
20
         </div>
20
         </div>
21
         <printOne :info="info" v-else></printOne>
21
         <printOne :info="info" v-else></printOne>
79
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
79
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
80
 
80
 
81
 
81
 
82
-      if(this.$store.getters.xt_user.org_id == 10138){
82
+      if(this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 0 || this.$store.getters.xt_user.org_id == 4){
83
         setTimeout(() => {
83
         setTimeout(() => {
84
           const style =
84
           const style =
85
           '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 47%;}}}';
85
           '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 47%;}}}';
301
           id: obj.order_id,
301
           id: obj.order_id,
302
 
302
 
303
         }
303
         }
304
-        if(this.org_id == 10138){
304
+        if(this.org_id == 10138 || this.org_id == 0 || this.$store.getters.xt_user.org_id == 4){
305
           getPrivateExpenses(params).then(response => {
305
           getPrivateExpenses(params).then(response => {
306
             if (response.data.state == 0) {
306
             if (response.data.state == 0) {
307
               // this.$message.error(response.data.msg)
307
               // this.$message.error(response.data.msg)
327
                 total: 0
327
                 total: 0
328
               }
328
               }
329
               let num = 0
329
               let num = 0
330
-              this.balanceAccounts.order_info.map(item => {
331
 
330
 
331
+              let obj4 = {
332
+                type:4,
333
+                details: [],
334
+                total: 0
335
+              }
336
+              this.balanceAccounts.order_info.map(item => {
332
                 if(item.advice_id > 0){
337
                 if(item.advice_id > 0){
333
                   obj.details.push(item)
338
                   obj.details.push(item)
334
                   obj.total += (item.pric * item.advice.prescribing_number)
339
                   obj.total += (item.pric * item.advice.prescribing_number)
345
                   }
350
                   }
346
                 }
351
                 }
347
               })
352
               })
353
+              if(this.balanceAccounts.new_order_info != null) {
354
+                this.balanceAccounts.new_order_info.map(item => {
355
+                  obj4.total = obj4.total + item.Total
356
+                  obj4.details.push(item)
357
+                  num++
358
+
359
+                })
360
+              }
361
+
348
               this.balanceAccounts.new_detail_list = []
362
               this.balanceAccounts.new_detail_list = []
349
               this.balanceAccounts.new_detail_list.push(obj)
363
               this.balanceAccounts.new_detail_list.push(obj)
350
               this.balanceAccounts.new_detail_list.push(obj2)
364
               this.balanceAccounts.new_detail_list.push(obj2)
351
               this.balanceAccounts.new_detail_list.push(obj3)
365
               this.balanceAccounts.new_detail_list.push(obj3)
366
+              this.balanceAccounts.new_detail_list.push(obj4)
367
+
352
               console.log(111,this.balanceAccounts)
368
               console.log(111,this.balanceAccounts)
353
               this.num = num
369
               this.num = num
354
               console.log('this.num',this.num)
370
               console.log('this.num',this.num)
500
                 details: [],
516
                 details: [],
501
                 total: 0
517
                 total: 0
502
               }
518
               }
519
+
520
+              let obj4 = {
521
+                type:4,
522
+                details: [],
523
+                total: 0
524
+              }
503
               let num = 0
525
               let num = 0
504
               that.info.order_infos.map(item => {
526
               that.info.order_infos.map(item => {
505
                 if(item.advice_id > 0){
527
                 if(item.advice_id > 0){
519
                 }
541
                 }
520
               })
542
               })
521
 
543
 
544
+
545
+              // this.info.order_infos.map(item => {
546
+              //   obj4.total = item.Total
547
+              //   obj4.details.push(item)
548
+              //   num++
549
+              //
550
+              // })
551
+
522
               that.info.new_detail_list = []
552
               that.info.new_detail_list = []
523
               that.info.new_detail_list.push(obj)
553
               that.info.new_detail_list.push(obj)
524
               that.info.new_detail_list.push(obj2)
554
               that.info.new_detail_list.push(obj2)
525
               that.info.new_detail_list.push(obj3)
555
               that.info.new_detail_list.push(obj3)
526
-              console.log('123',that.info.new_detail_list)
556
+              // that.info.new_detail_list.push(obj4)
557
+
527
               that.num = num
558
               that.num = num
528
 
559
 
529
               if(that.paramsObj.settle_type != 1){
560
               if(that.paramsObj.settle_type != 1){

+ 279 - 209
src/xt_pages/outpatientCharges/statementTemplate/printThree.vue View File

1
 <template>
1
 <template>
2
     <div>
2
     <div>
3
-        <div v-if="paramsObj.balance_accounts_type != 2" id='prescription-print' class="prescription-print" style="position: relative;">
3
+        <div v-if="paramsObj.balance_accounts_type != 2" id='prescription-print' class="prescription-print"
4
+             style="position: relative;">
4
             <img style="width:100%;height:80px" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">
5
             <img style="width:100%;height:80px" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">
5
             <div class="printTitle" style="position: absolute;left: 40%;top: 50px;">门诊收费清单</div>
6
             <div class="printTitle" style="position: absolute;left: 40%;top: 50px;">门诊收费清单</div>
6
             <div style="display:flex;">
7
             <div style="display:flex;">
7
-                <div>单据号:<span style="display:inline-block;width:200px;">{{info.order_number ? info.order_number : ''}}</span></div>
8
-                <div>透析号:<span style="display:inline-block;width:200px;">{{info.patient.dialysis_no ? info.patient.dialysis_no : ''}}</span></div>
9
-                <div style="margin-left:2px;">电脑号:<span style="display:inline-block;">{{info.psn_no ? info.psn_no : ''}}</span></div>
8
+                <div>单据号:<span
9
+                        style="display:inline-block;width:200px;">{{info.order_number ? info.order_number : ''}}</span>
10
+                </div>
11
+                <div>透析号:<span style="display:inline-block;width:200px;">{{info.patient.dialysis_no ? info.patient.dialysis_no : ''}}</span>
12
+                </div>
13
+                <div style="margin-left:2px;">电脑号:<span
14
+                        style="display:inline-block;">{{info.psn_no ? info.psn_no : ''}}</span></div>
10
             </div>
15
             </div>
11
             <div style="display:flex;justify-content: space-between;">
16
             <div style="display:flex;justify-content: space-between;">
12
                 <div style="display:flex;">
17
                 <div style="display:flex;">
13
-                  <div>姓名:<span style="display:inline-block;width:50px;">{{info.patient.name ? info.patient.name.indexOf("(") > -1 ? info.patient.name.substring(0,info.patient.name.indexOf("(")) : info.patient.name : ''}}</span></div>
14
-                  <div>性别:<span style="display:inline-block;width:30px;">{{info.patient.gender == '1' ? '男' : '女'}}</span></div>
15
-                  <div>年龄:<span style="display:inline-block;width:50px;">{{info.patient.age ? info.patient.age : ''}}岁</span></div>
16
-                  <div>费别:<span style="display:inline-block;min-width:80px;">医保</span>
17
-                  </div>
18
-                  <div>收费日期:<span style="display:inline-block;width:100px;">{{info.setl_time ? info.setl_time.split(' ')[0] : ''}}</span></div>
18
+                    <div>姓名:<span style="display:inline-block;width:50px;">{{info.patient.name ? info.patient.name.indexOf('(') > -1 ? info.patient.name.substring(0,info.patient.name.indexOf('(')) : info.patient.name : ''}}</span>
19
+                    </div>
20
+                    <div>性别:<span
21
+                            style="display:inline-block;width:30px;">{{info.patient.gender == '1' ? '男' : '女'}}</span>
22
+                    </div>
23
+                    <div>年龄:<span
24
+                            style="display:inline-block;width:50px;">{{info.patient.age ? info.patient.age : ''}}岁</span>
25
+                    </div>
26
+                    <div>费别:<span style="display:inline-block;min-width:80px;">医保</span>
27
+                    </div>
28
+                    <div>收费日期:<span style="display:inline-block;width:100px;">{{info.setl_time ? info.setl_time.split(' ')[0] : ''}}</span>
29
+                    </div>
19
                 </div>
30
                 </div>
20
                 <div style="float:right">金额单位:元</div>
31
                 <div style="float:right">金额单位:元</div>
21
             </div>
32
             </div>
22
             <div style="min-height: 300px;">
33
             <div style="min-height: 300px;">
23
-              <table border='1' style="width:100%;" cellspacing="0">
24
-                  <tr>
25
-                      <td width="70">类别</td>
26
-                      <td>项目</td>
27
-                      <td min-width="180" style="min-width:60px;">规格</td>
28
-                      <td width="40">单位</td>
29
-                      <td width="40">数量</td>
30
-                      <td width="60">单价</td>
31
-                      <td width="70">总额</td>
32
-                      <td width="130">小计</td>
33
-                  </tr>
34
-                  <div v-for="(item,i) in info.new_detail_list" :key="i" style="width:100%;display: table-row-group;">
35
-                      <tr v-for="(subItem,index) in item.details" :key="index">
36
-                        <td>
37
-                          <span v-if="item.type == 1">药品费</span>
38
-                          <span v-if="item.type == 2">治疗费</span>
39
-                          <span v-if="item.type == 3">耗材费</span>
40
-                        </td>
41
-                        <td>
42
-                          <span v-if="item.type == 1">{{ subItem.advice.advice_name }}</span>
43
-                          <span v-if="item.type == 2">{{ subItem.project.project.project_name }}</span>
44
-                          <span v-if="item.type == 3">{{ subItem.project.good_info.good_name }}</span>
45
-                        </td>
46
-                        <td>
47
-                          <span v-if="item.type == 1"><span v-if="subItem.advice.drug.min_unit != subItem.advice.drug.dose_unit">{{subItem.advice.drug.dose}}{{subItem.advice.drug.dose_unit}}&nbsp;* &nbsp;</span>{{subItem.advice.drug.min_number}}{{subItem.advice.drug.min_unit}}/{{subItem.advice.drug.max_unit}}</span>
48
-                          <span v-if="item.type == 2"></span>
49
-                          <span v-if="item.type == 3">{{ subItem.project.good_info.specification_name }}</span>
50
-                        </td>
51
-                        <td>
52
-                          <span v-if="item.type == 1">{{ subItem.advice.drug.prescribing_number_unit }}</span>
53
-                          <span v-if="item.type == 2">{{ subItem.project.unit }}</span>
54
-                          <span v-if="item.type == 3">{{ subItem.project.unit }}</span>
34
+                <table border='1' style="width:100%;" cellspacing="0">
35
+                    <tr>
36
+                        <td width="70">类别</td>
37
+                        <td>项目</td>
38
+                        <td min-width="180" style="min-width:60px;">规格</td>
39
+                        <td width="40">单位</td>
40
+                        <td width="40">数量</td>
41
+                        <td width="60">单价</td>
42
+                        <td width="70">总额</td>
43
+                        <td width="130">小计</td>
44
+                    </tr>
45
+                    <div v-for="(item,i) in info.new_detail_list" :key="i" style="width:100%;display: table-row-group;">
46
+                        <tr v-for="(subItem,index) in item.details" :key="index">
47
+                            <td>
48
+                                <span v-if="item.type == 1">药品费</span>
49
+                                <span v-if="item.type == 2">治疗费</span>
50
+                                <span v-if="item.type == 3">耗材费</span>
51
+                                <span v-if="item.type == 4">检验费</span>
52
+
53
+                            </td>
54
+                            <td>
55
+                                <span v-if="item.type == 1">{{ subItem.advice.advice_name }}</span>
56
+                                <span v-if="item.type == 2">{{ subItem.project.project.project_name }}</span>
57
+                                <span v-if="item.type == 3">{{ subItem.project.good_info.good_name }}</span>
58
+                                <span v-if="item.type == 4">{{ subItem.project.project.team_name }}</span>
59
+
60
+                            </td>
61
+                            <td>
62
+                                <span v-if="item.type == 1"><span
63
+                                        v-if="subItem.advice.drug.min_unit != subItem.advice.drug.dose_unit">{{subItem.advice.drug.dose}}{{subItem.advice.drug.dose_unit}}&nbsp;* &nbsp;</span>{{subItem.advice.drug.min_number}}{{subItem.advice.drug.min_unit}}/{{subItem.advice.drug.max_unit}}</span>
64
+                                <span v-if="item.type == 2"></span>
65
+                                <span v-if="item.type == 3">{{ subItem.project.good_info.specification_name }}</span>
66
+                                <span v-if="item.type == 4"></span>
67
+
68
+                            </td>
69
+                            <td>
70
+                                <span v-if="item.type == 1">{{ subItem.advice.drug.prescribing_number_unit }}</span>
71
+                                <span v-if="item.type == 2">{{ subItem.project.unit }}</span>
72
+                                <span v-if="item.type == 3">{{ subItem.project.unit }}</span>
73
+                                <span v-if="item.type == 4"></span>
74
+
75
+                            </td>
76
+                            <td>
77
+                                <span v-if="item.type == 1">{{ subItem.advice.prescribing_number }}</span>
78
+                                <span v-if="item.type == 2">{{ subItem.project.count }}</span>
79
+                                <span v-if="item.type == 3">{{ subItem.project.count }}</span>
80
+                                <span v-if="item.type == 4"></span>
81
+
82
+                            </td>
83
+                            <td>
84
+                                <span v-if="item.type == 1">{{ subItem.pric }}</span>
85
+                                <span v-if="item.type == 2">{{ subItem.pric }}</span>
86
+                                <span v-if="item.type == 3">{{ subItem.pric }}</span>
87
+                                <span v-if="item.type == 4">{{subItem.Total}}</span>
88
+
89
+
90
+                            </td>
91
+                            <td>
92
+                                <span v-if="item.type == 1">{{ (subItem.advice.prescribing_number * subItem.pric).toFixed(2) }}</span>
93
+                                <span v-if="item.type == 2">{{ (subItem.project.count * subItem.pric).toFixed(2) }}</span>
94
+                                <span v-if="item.type == 3">{{ (subItem.project.count * subItem.pric).toFixed(2) }}</span>
95
+                                <span v-if="item.type == 4">{{subItem.Total}}</span>
96
+
97
+                                <!--<span v-if="item.type == 4"></span>-->
98
+
99
+                            </td>
100
+                            <td :rowspan="item.details.length" v-if="index == 0"
101
+                                style="vertical-align: middle;text-align: center;">{{ item.total.toFixed(2) }}
102
+                            </td>
103
+                        </tr>
104
+                    </div>
105
+                    <tr>
106
+                        <td colspan="7">
107
+                            <div style="display:flex;flez-wrap:wrap;">
108
+                                <div style="width:33%;" v-for="(item,index) in info.new_detail_list" :key="index">
109
+                                    <span v-if="item.type == 1">药品费: {{ item.total.toFixed(2) }}</span>
110
+                                    <span v-if="item.type == 2">治疗费: {{ item.total.toFixed(2) }}</span>
111
+                                    <span v-if="item.type == 3">耗材费: {{ item.total.toFixed(2) }}</span>
112
+                                    <span v-if="item.type == 4">检验费: {{ item.total.toFixed(2) }}</span>
113
+
114
+                                    <!--<span v-if="item.type == 4">检验费: {{ item.total.toFixed(4) }}</span>-->
115
+
116
+                                </div>
117
+                            </div>
55
                         </td>
118
                         </td>
56
-                        <td>
57
-                          <span v-if="item.type == 1">{{ subItem.advice.prescribing_number }}</span>
58
-                          <span v-if="item.type == 2">{{ subItem.project.count }}</span>
59
-                          <span v-if="item.type == 3">{{ subItem.project.count }}</span>
119
+                        <td>合计: {{info.medfee_sumamt?info.medfee_sumamt:0}}元</td>
120
+                    </tr>
121
+                    <tr>
122
+                        <td colspan="7">
123
+                            <div style="display:flex;flez-wrap:wrap;margin-bottom:10px;font-size:16px;">
124
+                                <div style="width:33%;">医疗费总额:{{info.medfee_sumamt?info.medfee_sumamt:0}}元</div>
125
+                                <div style="width:33%;">基金支付金额:{{info.hifp_pay?info.hifp_pay:0}}元</div>
126
+                                <div style="width:33%;">个人账户支付金额:{{info.acct_pay?info.acct_pay:0}}元</div>
127
+
128
+                            </div>
129
+                            <div style="display:flex;flez-wrap:wrap;font-size:16px;">
130
+                                <div style="width:33%;">个人支付金额:{{ info.psn_pay?info.psn_pay:0 }}元</div>
131
+                                <div style="width:33%;">个人账户金额:{{info.balc >= 0 ? info.balc : 0 }}元</div>
132
+                            </div>
60
                         </td>
133
                         </td>
61
-                        <td>
62
-                          <span v-if="item.type == 1">{{ subItem.pric }}</span>
63
-                          <span v-if="item.type == 2">{{ subItem.pric }}</span>
64
-                          <span v-if="item.type == 3">{{ subItem.pric }}</span>
65
-                        </td>
66
-                        <td>
67
-                          <span v-if="item.type == 1">{{ (subItem.advice.prescribing_number * subItem.pric).toFixed(2) }}</span>
68
-                          <span v-if="item.type == 2">{{ (subItem.project.count * subItem.pric).toFixed(2) }}</span>
69
-                          <span v-if="item.type == 3">{{ (subItem.project.count * subItem.pric).toFixed(2) }}</span>
70
-                        </td>
71
-                        <td :rowspan="item.details.length" v-if="index == 0" style="vertical-align: middle;text-align: center;">{{ item.total.toFixed(2) }}</td>
72
-                      </tr>
73
-                  </div>
74
-                  <tr>
75
-                    <td colspan="7">
76
-                      <div style="display:flex;flez-wrap:wrap;">
77
-                        <div style="width:33%;" v-for="(item,index) in info.new_detail_list" :key="index">
78
-                          <span v-if="item.type == 1">药品费: {{ item.total.toFixed(2) }}</span>
79
-                          <span v-if="item.type == 2">治疗费: {{ item.total.toFixed(2) }}</span>
80
-                          <span v-if="item.type == 3">耗材费: {{ item.total.toFixed(2) }}</span>
81
-                        </div>
82
-                      </div>
83
-                    </td>
84
-                    <td>合计: {{info.medfee_sumamt?info.medfee_sumamt:0}}元</td>
85
-                  </tr>
86
-                  <tr>
87
-                      <td colspan="7">
88
-                          <div style="display:flex;flez-wrap:wrap;margin-bottom:10px;font-size:16px;">
89
-                              <div style="width:33%;">医疗费总额:{{info.medfee_sumamt?info.medfee_sumamt:0}}元</div>
90
-                              <div style="width:33%;">基金支付金额:{{info.hifp_pay?info.hifp_pay:0}}元</div>
91
-                              <div style="width:33%;">个人账户支付金额:{{info.acct_pay?info.acct_pay:0}}元</div>
92
-
93
-                          </div>
94
-                          <div style="display:flex;flez-wrap:wrap;font-size:16px;">
95
-                              <div style="width:33%;">个人支付金额:{{ info.psn_pay?info.psn_pay:0 }}元</div>
96
-                              <div style="width:33%;">个人账户金额:{{info.balc >= 0 ? info.balc : 0 }}元</div>
97
-                          </div>
98
-                      </td>
99
-                      <td style="font-size:16px;">合计:{{info.medfee_sumamt?info.medfee_sumamt:0}}元</td>
100
-                  </tr>
101
-
102
-              </table>
134
+                        <td style="font-size:16px;">合计:{{info.medfee_sumamt?info.medfee_sumamt:0}}元</td>
135
+                    </tr>
136
+
137
+                </table>
103
             </div>
138
             </div>
104
             <div style="float:right;margin:10px 0;display:flex;">
139
             <div style="float:right;margin:10px 0;display:flex;">
105
                 <div>操作人:<span style="width:100px;display:inline-block;">{{info.p_admin.user_name}}</span></div>
140
                 <div>操作人:<span style="width:100px;display:inline-block;">{{info.p_admin.user_name}}</span></div>
106
-                <div>操作日期:<span style="width:100px;display:inline-block;">{{info.setl_time ? info.setl_time.split(' ')[0] : ''}}</span></div>
141
+                <div>操作日期:<span style="width:100px;display:inline-block;">{{info.setl_time ? info.setl_time.split(' ')[0] : ''}}</span>
142
+                </div>
107
             </div>
143
             </div>
108
             <img style="width:100%;" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">
144
             <img style="width:100%;" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">
109
         </div>
145
         </div>
110
         <div v-else id='prescription-print' class="prescription-print" style="position: relative;">
146
         <div v-else id='prescription-print' class="prescription-print" style="position: relative;">
111
-          <img style="width:100%;height:80px" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">
147
+            <img style="width:100%;height:80px" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">
112
             <div class="printTitle" style="position: absolute;left: 40%;top: 50px;">门诊收费清单</div>
148
             <div class="printTitle" style="position: absolute;left: 40%;top: 50px;">门诊收费清单</div>
113
             <div style="display:flex;">
149
             <div style="display:flex;">
114
-                <div>单据号:<span style="display:inline-block;width:200px;">{{balanceAccounts.his.number ? balanceAccounts.his.number : ''}}</span></div>
115
-                <div>透析号:<span style="display:inline-block;width:200px;">{{balanceAccounts.patient ? balanceAccounts.patient.dialysis_no : ''}}</span></div>
150
+                <div>单据号:<span style="display:inline-block;width:200px;">{{balanceAccounts.his.number ? balanceAccounts.his.number : ''}}</span>
151
+                </div>
152
+                <div>透析号:<span style="display:inline-block;width:200px;">{{balanceAccounts.patient ? balanceAccounts.patient.dialysis_no : ''}}</span>
153
+                </div>
116
                 <div>电脑号:<span style="display:inline-block;width:80px;"></span></div>
154
                 <div>电脑号:<span style="display:inline-block;width:80px;"></span></div>
117
             </div>
155
             </div>
118
             <div style="display:flex;justify-content: space-between;">
156
             <div style="display:flex;justify-content: space-between;">
119
                 <div style="display:flex;">
157
                 <div style="display:flex;">
120
-                  <div>姓名:<span style="display:inline-block;width:50px;">{{balanceAccounts.patient ? balanceAccounts.patient.name.indexOf("(") > -1 ? balanceAccounts.patient.name.substring(0,balanceAccounts.patient.name.indexOf("(")) : balanceAccounts.patient.name : ''}}</span></div>
121
-                  <div>性别:<span style="display:inline-block;width:30px;">{{balanceAccounts.patient.gender == '1' ? '男' : '女'}}</span></div>
122
-                  <div>年龄:<span style="display:inline-block;width:50px;">{{balanceAccounts.patient ? balanceAccounts.patient.age : ''}}岁</span></div>
123
-                  <div>费别:<span style="display:inline-block;width:80px;">自费</span>
124
-                  </div>
125
-                  <div>收费日期:<span style="display:inline-block;width:100px;">{{getTime(new Date(),"{y}-{m}-{d}")?getTime(new Date(),"{y}-{m}-{d}"):""}}</span></div>
158
+                    <div>姓名:<span style="display:inline-block;width:50px;">{{balanceAccounts.patient ? balanceAccounts.patient.name.indexOf('(') > -1 ? balanceAccounts.patient.name.substring(0,balanceAccounts.patient.name.indexOf('(')) : balanceAccounts.patient.name : ''}}</span>
159
+                    </div>
160
+                    <div>性别:<span style="display:inline-block;width:30px;">{{balanceAccounts.patient.gender == '1' ? '男' : '女'}}</span>
161
+                    </div>
162
+                    <div>年龄:<span style="display:inline-block;width:50px;">{{balanceAccounts.patient ? balanceAccounts.patient.age : ''}}岁</span>
163
+                    </div>
164
+                    <div>费别:<span style="display:inline-block;width:80px;">自费</span>
165
+                    </div>
166
+                    <div>收费日期:<span style="display:inline-block;width:100px;">{{getTime(new Date(),'{y}-{m}-{d}')?getTime(new Date(),'{y}-{m}-{d}'):''}}</span>
167
+                    </div>
126
                 </div>
168
                 </div>
127
                 <div style="float:right">金额单位:元</div>
169
                 <div style="float:right">金额单位:元</div>
128
             </div>
170
             </div>
129
             <div style="min-height: 300px;">
171
             <div style="min-height: 300px;">
130
-              <table border='1' style="width:100%;" cellspacing="0">
131
-                  <tr>
132
-                      <td width="70">类别</td>
133
-                      <td>项目</td>
134
-                      <td min-width="180" style="min-width:60px;">规格</td>
135
-                      <td width="40">单位</td>
136
-                      <td width="40">数量</td>
137
-                      <td width="60">单价</td>
138
-                      <td width="70">总额</td>
139
-                      <td width="130">小计</td>
140
-                  </tr>
141
-                  <div v-for="(item,i) in balanceAccounts.new_detail_list" :key="i" style="width:100%;display: table-row-group;">
142
-                      <tr v-for="(subItem,index) in item.details" :key="index">
143
-                        <td>
144
-                          <span v-if="item.type == 1">药品费</span>
145
-                          <span v-if="item.type == 2">治疗费</span>
146
-                          <span v-if="item.type == 3">耗材费</span>
147
-                        </td>
148
-                        <td>
149
-                          <span v-if="item.type == 1">{{ subItem.advice.advice_name }}</span>
150
-                          <span v-if="item.type == 2">{{ subItem.project.project.project_name }}</span>
151
-                          <span v-if="item.type == 3">{{ subItem.project.good_info.good_name }}</span>
152
-                        </td>
153
-                        <td>
154
-                          <span v-if="item.type == 1"><span v-if="subItem.advice.drug.min_unit != subItem.advice.drug.dose_unit">{{subItem.advice.drug.dose}}{{subItem.advice.drug.dose_unit}}&nbsp;* &nbsp;</span>{{subItem.advice.drug.min_number}}{{subItem.advice.drug.min_unit}}/{{subItem.advice.drug.max_unit}}</span>
155
-                          <span v-if="item.type == 2"></span>
156
-                          <span v-if="item.type == 3">{{ subItem.project.good_info.specification_name }}</span>
157
-                        </td>
158
-                        <td>
159
-                          <span v-if="item.type == 1">{{ subItem.advice.drug.prescribing_number_unit }}</span>
160
-                          <span v-if="item.type == 2">{{ subItem.project.unit }}</span>
161
-                          <span v-if="item.type == 3">{{ subItem.project.unit }}</span>
172
+                <table border='1' style="width:100%;" cellspacing="0">
173
+                    <tr>
174
+                        <td width="70">类别</td>
175
+                        <td>项目</td>
176
+                        <td min-width="180" style="min-width:60px;">规格</td>
177
+                        <td width="40">单位</td>
178
+                        <td width="40">数量</td>
179
+                        <td width="60">单价</td>
180
+                        <td width="70">总额</td>
181
+                        <td width="130">小计</td>
182
+                    </tr>
183
+                    <div v-for="(item,i) in balanceAccounts.new_detail_list" :key="i"
184
+                         style="width:100%;display: table-row-group;">
185
+                        <tr v-for="(subItem,index) in item.details" :key="index">
186
+                            <td>
187
+                                <span v-if="item.type == 1">药品费</span>
188
+                                <span v-if="item.type == 2">治疗费</span>
189
+                                <span v-if="item.type == 3">耗材费</span>
190
+                                <span v-if="item.type == 4">检验费</span>
191
+
192
+                            </td>
193
+                            <td>
194
+                                <span v-if="item.type == 1">{{ subItem.advice.advice_name }}</span>
195
+                                <span v-if="item.type == 2">{{ subItem.project.project.project_name }}</span>
196
+                                <span v-if="item.type == 3">{{ subItem.project.good_info.good_name }}</span>
197
+                                <span v-if="item.type == 4">{{ subItem.Name }}</span>
198
+
199
+                            </td>
200
+                            <td>
201
+                                <span v-if="item.type == 1"><span
202
+                                        v-if="subItem.advice.drug.min_unit != subItem.advice.drug.dose_unit">{{subItem.advice.drug.dose}}{{subItem.advice.drug.dose_unit}}&nbsp;* &nbsp;</span>{{subItem.advice.drug.min_number}}{{subItem.advice.drug.min_unit}}/{{subItem.advice.drug.max_unit}}</span>
203
+                                <span v-if="item.type == 2"></span>
204
+                                <span v-if="item.type == 3">{{ subItem.project.good_info.specification_name }}</span>
205
+                                <span v-if="item.type == 4"></span>
206
+
207
+                            </td>
208
+                            <td>
209
+                                <span v-if="item.type == 1">{{ subItem.advice.drug.prescribing_number_unit }}</span>
210
+                                <span v-if="item.type == 2">{{ subItem.project.unit }}</span>
211
+                                <span v-if="item.type == 3">{{ subItem.project.unit }}</span>
212
+                                <span v-if="item.type == 4"></span>
213
+
214
+                            </td>
215
+                            <td>
216
+                                <span v-if="item.type == 1">{{ subItem.advice.prescribing_number }}</span>
217
+                                <span v-if="item.type == 2">{{ subItem.project.count }}</span>
218
+                                <span v-if="item.type == 3">{{ subItem.project.count }}</span>
219
+                                <span v-if="item.type == 4">1</span>
220
+
221
+                            </td>
222
+                            <td>
223
+                                <span v-if="item.type == 1">{{ subItem.pric }}</span>
224
+                                <span v-if="item.type == 2">{{ subItem.pric }}</span>
225
+                                <span v-if="item.type == 3">{{ subItem.pric }}</span>
226
+                                <span v-if="item.type == 4">{{subItem.Total}}</span>
227
+
228
+                            </td>
229
+                            <td>
230
+                                <span v-if="item.type == 1">{{ (subItem.advice.prescribing_number * subItem.pric).toFixed(2) }}</span>
231
+                                <span v-if="item.type == 2">{{ (subItem.project.count * subItem.pric).toFixed(2) }}</span>
232
+                                <span v-if="item.type == 3">{{ (subItem.project.count * subItem.pric).toFixed(2) }}</span>
233
+                                <span v-if="item.type == 4">{{subItem.Total}}</span>
234
+
235
+                            </td>
236
+                            <td :rowspan="item.details.length" v-if="index == 0"
237
+                                style="vertical-align: middle;text-align: center;">{{ item.total.toFixed(2) }}
238
+                            </td>
239
+                        </tr>
240
+                    </div>
241
+                    <tr>
242
+                        <td colspan="7">
243
+                            <div style="display:flex;flez-wrap:wrap;">
244
+                                <div style="width:33%;" v-for="(item,index) in balanceAccounts.new_detail_list"
245
+                                     :key="index">
246
+                                    <span v-if="item.type == 1">药品费: {{ item.total.toFixed(2) }}</span>
247
+                                    <span v-if="item.type == 2">治疗费: {{ item.total.toFixed(2) }}</span>
248
+                                    <span v-if="item.type == 3">耗材费: {{ item.total.toFixed(2) }}</span>
249
+                                    <span v-if="item.type == 4">检验费: {{ item.total.toFixed(2) }}</span>
250
+
251
+                                </div>
252
+                            </div>
162
                         </td>
253
                         </td>
163
-                        <td>
164
-                          <span v-if="item.type == 1">{{ subItem.advice.prescribing_number }}</span>
165
-                          <span v-if="item.type == 2">{{ subItem.project.count }}</span>
166
-                          <span v-if="item.type == 3">{{ subItem.project.count }}</span>
254
+                        <td>合计: {{balanceAccounts.order.medfee_sumamt?balanceAccounts.order.medfee_sumamt:0}}元</td>
255
+                    </tr>
256
+                    <tr>
257
+                        <td colspan="7">
258
+                            <div style="display:flex;flez-wrap:wrap;">
259
+                                <div style="width:33%;">
260
+                                    医疗费总额:{{balanceAccounts.order.medfee_sumamt?balanceAccounts.order.medfee_sumamt:0}}元
261
+                                </div>
262
+                                <div style="width:33%;">基金支付金额:0元</div>
263
+                                <div style="width:33%;">个人账户支付金额:0元</div>
264
+
265
+                            </div>
266
+                            <div style="display:flex;flez-wrap:wrap;">
267
+                                <div style="width:33%;">
268
+                                    个人支付金额:{{balanceAccounts.order.medfee_sumamt?balanceAccounts.order.medfee_sumamt:0}}元
269
+                                </div>
270
+                                <div style="width:33%;">个人账户金额:0元</div>
271
+                            </div>
167
                         </td>
272
                         </td>
168
-                        <td>
169
-                          <span v-if="item.type == 1">{{ subItem.pric }}</span>
170
-                          <span v-if="item.type == 2">{{ subItem.pric }}</span>
171
-                          <span v-if="item.type == 3">{{ subItem.pric }}</span>
172
-                        </td>
173
-                        <td>
174
-                          <span v-if="item.type == 1">{{ (subItem.advice.prescribing_number * subItem.pric).toFixed(2) }}</span>
175
-                          <span v-if="item.type == 2">{{ (subItem.project.count * subItem.pric).toFixed(2) }}</span>
176
-                          <span v-if="item.type == 3">{{ (subItem.project.count * subItem.pric).toFixed(2) }}</span>
177
-                        </td>
178
-                        <td :rowspan="item.details.length" v-if="index == 0" style="vertical-align: middle;text-align: center;">{{ item.total.toFixed(2) }}</td>
179
-                      </tr>
180
-                  </div>
181
-                  <tr>
182
-                    <td colspan="7">
183
-                      <div style="display:flex;flez-wrap:wrap;">
184
-                        <div style="width:33%;" v-for="(item,index) in balanceAccounts.new_detail_list" :key="index">
185
-                          <span v-if="item.type == 1">药品费: {{ item.total.toFixed(2) }}</span>
186
-                          <span v-if="item.type == 2">治疗费: {{ item.total.toFixed(2) }}</span>
187
-                          <span v-if="item.type == 3">耗材费: {{ item.total.toFixed(2) }}</span>
188
-                        </div>
189
-                      </div>
190
-                    </td>
191
-                    <td>合计: {{balanceAccounts.order.medfee_sumamt?balanceAccounts.order.medfee_sumamt:0}}元</td>
192
-                  </tr>
193
-                  <tr>
194
-                      <td colspan="7">
195
-                          <div style="display:flex;flez-wrap:wrap;">
196
-                              <div style="width:33%;">医疗费总额:{{balanceAccounts.order.medfee_sumamt?balanceAccounts.order.medfee_sumamt:0}}元</div>
197
-                              <div style="width:33%;">基金支付金额:0元</div>
198
-                              <div style="width:33%;">个人账户支付金额:0元</div>
199
-
200
-                          </div>
201
-                          <div style="display:flex;flez-wrap:wrap;">
202
-                              <div style="width:33%;">个人支付金额:{{balanceAccounts.order.medfee_sumamt?balanceAccounts.order.medfee_sumamt:0}}元</div>
203
-                              <div style="width:33%;">个人账户金额:0元</div>
204
-                          </div>
205
-                      </td>
206
-                      <td>合计:{{balanceAccounts.order.medfee_sumamt?balanceAccounts.order.medfee_sumamt:0}}元</td>
207
-                  </tr>
208
-
209
-              </table>
273
+                        <td>合计:{{balanceAccounts.order.medfee_sumamt?balanceAccounts.order.medfee_sumamt:0}}元</td>
274
+                    </tr>
275
+
276
+                </table>
210
             </div>
277
             </div>
211
             <div style="float:right;margin:10px 0;display:flex;">
278
             <div style="float:right;margin:10px 0;display:flex;">
212
-                <div>操作人:<span style="width:100px;display:inline-block;">{{balanceAccounts.current_admin.user_name}}</span></div>
213
-                <div>操作日期:<span style="width:100px;display:inline-block;">{{getTime(new Date(),"{y}-{m}-{d}")?getTime(new Date(),"{y}-{m}-{d}"):""}}</span></div>
279
+                <div>操作人:<span
280
+                        style="width:100px;display:inline-block;">{{balanceAccounts.current_admin.user_name}}</span>
281
+                </div>
282
+                <div>操作日期:<span style="width:100px;display:inline-block;">{{getTime(new Date(),'{y}-{m}-{d}')?getTime(new Date(),'{y}-{m}-{d}'):''}}</span>
283
+                </div>
214
             </div>
284
             </div>
215
             <img style="width:100%;" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">
285
             <img style="width:100%;" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">
216
         </div>
286
         </div>
246
     props: {
316
     props: {
247
       paramsObj: Object,
317
       paramsObj: Object,
248
       info: Object,
318
       info: Object,
249
-      balanceAccounts:Object
319
+      balanceAccounts: Object
250
     },
320
     },
251
     methods: {
321
     methods: {
252
       getName(list) {
322
       getName(list) {
258
         }
328
         }
259
 
329
 
260
         switch (new_list[0].bcc334) {
330
         switch (new_list[0].bcc334) {
261
-          case "A31001":
262
-            return "深圳医保1档"
331
+          case 'A31001':
332
+            return '深圳医保1档'
263
             break
333
             break
264
-          case "A31002":
265
-            return "深圳医保2档"
334
+          case 'A31002':
335
+            return '深圳医保2档'
266
 
336
 
267
             break
337
             break
268
-          case "A31003":
269
-            return "深圳医保3档"
338
+          case 'A31003':
339
+            return '深圳医保3档'
270
 
340
 
271
             break
341
             break
272
-          case "A31004":
273
-            return "二档(少儿)"
342
+          case 'A31004':
343
+            return '二档(少儿)'
274
 
344
 
275
             break
345
             break
276
-          case "A31005":
277
-            return "学生二档"
346
+          case 'A31005':
347
+            return '学生二档'
278
 
348
 
279
             break
349
             break
280
-          case "A31006":
281
-            return "大学生二档"
350
+          case 'A31006':
351
+            return '大学生二档'
282
 
352
 
283
             break
353
             break
284
-          case "A32001":
285
-            return "在职公务员"
354
+          case 'A32001':
355
+            return '在职公务员'
286
             break
356
             break
287
-          case "A32002":
288
-            return "在职驻深公务员"
357
+          case 'A32002':
358
+            return '在职驻深公务员'
289
 
359
 
290
             break
360
             break
291
-          case "A39301":
292
-            return "家属统筹医疗"
361
+          case 'A39301':
362
+            return '家属统筹医疗'
293
 
363
 
294
             break
364
             break
295
-          case "A41001":
296
-            return "工伤在职"
365
+          case 'A41001':
366
+            return '工伤在职'
297
 
367
 
298
             break
368
             break
299
-          case "A51001":
300
-            return "生育在职"
369
+          case 'A51001':
370
+            return '生育在职'
301
 
371
 
302
             break
372
             break
303
-          case "A52001":
304
-            return "生育医疗一档"
373
+          case 'A52001':
374
+            return '生育医疗一档'
305
 
375
 
306
             break
376
             break
307
-          case "A52002":
308
-            return "生育医疗一档"
377
+          case 'A52002':
378
+            return '生育医疗一档'
309
 
379
 
310
             break
380
             break
311
-          case "C31001":
312
-            return "一档医疗退休"
381
+          case 'C31001':
382
+            return '一档医疗退休'
313
 
383
 
314
             break
384
             break
315
-          case "C31002":
316
-            return "二档医疗退休"
385
+          case 'C31002':
386
+            return '二档医疗退休'
317
             break
387
             break
318
 
388
 
319
         }
389
         }

+ 2 - 2
src/xt_pages/outpatientCharges/summary.vue View File

81
                 <!--</el-table-column>-->
81
                 <!--</el-table-column>-->
82
 
82
 
83
                 <el-table-column align="center" width="90" prop="name" label="应收金额">
83
                 <el-table-column align="center" width="90" prop="name" label="应收金额">
84
-                    <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
84
+                    <template slot-scope="scope">{{scope.row.medfee_sumamt.toFixed(2)}}</template>
85
                 </el-table-column>
85
                 </el-table-column>
86
                 <el-table-column align="center" width="90" prop="name" label="实收金额">
86
                 <el-table-column align="center" width="90" prop="name" label="实收金额">
87
-                    <template slot-scope="scope">{{scope.row.reality_price}}</template>
87
+                    <template slot-scope="scope">{{scope.row.reality_price.toFixed(2)}}</template>
88
                 </el-table-column>
88
                 </el-table-column>
89
                 <el-table-column align="center" width="90" prop="name" label="科室">
89
                 <el-table-column align="center" width="90" prop="name" label="科室">
90
                     <template slot-scope="scope">{{scope.row.department_name}}</template>
90
                     <template slot-scope="scope">{{scope.row.department_name}}</template>

+ 7 - 7
src/xt_pages/outpatientCharges/summaryDetail.vue View File

64
                           <el-table-column align="center" prop="name" width="60" label="总价">
64
                           <el-table-column align="center" prop="name" width="60" label="总价">
65
                               <template slot-scope="scope">
65
                               <template slot-scope="scope">
66
                                   <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
66
                                   <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
67
-                                  {{scope.row.price}}元
67
+                                  {{scope.row.price.toFixed(2)}}元
68
 
68
 
69
                               </template>
69
                               </template>
70
                           </el-table-column>
70
                           </el-table-column>
92
 
92
 
93
                     </div>
93
                     </div>
94
                     <div class="costBox">
94
                     <div class="costBox">
95
-                      <span>当前处方总费用:<span style="color:red;">{{ order.medfee_sumamt}}元</span></span>
95
+                      <span>当前处方总费用:<span style="color:red;">{{ order.medfee_sumamt.toFixed(2)}}元</span></span>
96
                       <span v-if="order.order_status == 1">待结算</span>
96
                       <span v-if="order.order_status == 1">待结算</span>
97
                       <span v-if="order.order_status == 2">已结算</span>
97
                       <span v-if="order.order_status == 2">已结算</span>
98
                       <span v-if="order.order_status == 3">已退费</span>
98
                       <span v-if="order.order_status == 3">已退费</span>
112
                     </ul>
112
                     </ul>
113
                     <p class="centerRightTitle" style="margin-top:10px;">收费信息</p>
113
                     <p class="centerRightTitle" style="margin-top:10px;">收费信息</p>
114
                     <ul class="basicUl">
114
                     <ul class="basicUl">
115
-                        <li style="width:50%;">应收金额:{{order.medfee_sumamt }}元</li>
116
-                        <li style="width:50%;">实收金额:{{order.reality_price}}元</li>
117
-                        <li style="width:50%;">舍入金额:{{order.medfee_sumamt - order.reality_price}}元</li>
118
-                        <li style="width:50%;">优惠金额:{{order.preferential_price}}元</li>
115
+                        <li style="width:50%;">应收金额:{{order.medfee_sumamt.toFixed(2) }}元</li>
116
+                        <li style="width:50%;">实收金额:{{order.reality_price.toFixed(2)}}元</li>
117
+                        <li style="width:50%;">舍入金额:{{order.medfee_sumamt.toFixed(2) - order.reality_price.toFixed(2)}}元</li>
118
+                        <li style="width:50%;">优惠金额:{{order.preferential_price.toFixed(2)}}元</li>
119
                         <li style="width:50%;">总金额</li>
119
                         <li style="width:50%;">总金额</li>
120
-                        <li style="width:50%;">{{order.medfee_sumamt}}元</li>
120
+                        <li style="width:50%;">{{order.medfee_sumamt.toFixed(2)}}元</li>
121
                     </ul>
121
                     </ul>
122
                     <!--<p class="centerRightTitle">发票费用</p>-->
122
                     <!--<p class="centerRightTitle">发票费用</p>-->
123
                     <!--<ul class="basicUl">-->
123
                     <!--<ul class="basicUl">-->

+ 11 - 11
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

286
                                         </el-table-column>
286
                                         </el-table-column>
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 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245">
289
+                                              <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919">
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>
383
                                         </el-table-column>
383
                                         </el-table-column>
384
                                         <el-table-column label="库存" width="40">
384
                                         <el-table-column label="库存" width="40">
385
                                             <template slot-scope="scope">
385
                                             <template slot-scope="scope">
386
-                                              <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245">
386
+                                              <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 10138 || org_id == 3877 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919">
387
                                                    {{scope.row.stock_count}}
387
                                                    {{scope.row.stock_count}}
388
                                               </span>
388
                                               </span>
389
                                               <span v-else> {{ scope.row.total }}</span>
389
                                               <span v-else> {{ scope.row.total }}</span>
1613
               }
1613
               }
1614
             }
1614
             }
1615
 
1615
 
1616
-            total = Math.floor(total * 100) / 100
1616
+            total = total.toFixed(2)
1617
           }
1617
           }
1618
         }
1618
         }
1619
         return total
1619
         return total
1640
                 total = total + this.month_prescriptions[i].addition[b].price * this.month_prescriptions[i].addition[b].count
1640
                 total = total + this.month_prescriptions[i].addition[b].price * this.month_prescriptions[i].addition[b].count
1641
               }
1641
               }
1642
             }
1642
             }
1643
-            total = Math.floor(total * 100) / 100
1643
+            total = total.toFixed(2)
1644
           }
1644
           }
1645
         }
1645
         }
1646
         return total
1646
         return total
1653
           for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
1653
           for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
1654
             total = total + this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number
1654
             total = total + this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number
1655
           }
1655
           }
1656
-          return Math.floor(total * 100) / 100
1656
+          return total.toFixed(2)
1657
         } else {
1657
         } else {
1658
           for (let a = 0; a < this.curPrescriptions.project.length; a++) {
1658
           for (let a = 0; a < this.curPrescriptions.project.length; a++) {
1659
             total = total + this.curPrescriptions.project[a].price * this.curPrescriptions.project[a].total
1659
             total = total + this.curPrescriptions.project[a].price * this.curPrescriptions.project[a].total
1660
           }
1660
           }
1661
-          return Math.floor(total * 100) / 100
1661
+          return total.toFixed(2)
1662
         }
1662
         }
1663
 
1663
 
1664
       },
1664
       },
1683
           }
1683
           }
1684
         }
1684
         }
1685
 
1685
 
1686
-        return Math.floor(total * 100) / 100
1686
+        return total.toFixed(2)
1687
       }, getMonthTotal() {
1687
       }, getMonthTotal() {
1688
         var total = 0
1688
         var total = 0
1689
         for (let i = 0; i < this.month_prescriptions.length; i++) {
1689
         for (let i = 0; i < this.month_prescriptions.length; i++) {
1705
           }
1705
           }
1706
         }
1706
         }
1707
 
1707
 
1708
-        return Math.floor(total * 100) / 100
1708
+        return total.toFixed(2)
1709
       },
1709
       },
1710
       createFilter(queryString) {
1710
       createFilter(queryString) {
1711
         return (restaurant) => {
1711
         return (restaurant) => {
2223
             for (let i = 0; i < this.prescriptions.length; i++) {
2223
             for (let i = 0; i < this.prescriptions.length; i++) {
2224
               for(let b = 0; b < this.prescriptions[i].advices.length; b++){
2224
               for(let b = 0; b < this.prescriptions[i].advices.length; b++){
2225
                 if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].advices[b].drug.is_special_diseases != 1) {
2225
                 if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].advices[b].drug.is_special_diseases != 1) {
2226
-                  this.$message.error(this.prescriptions[i].name.toString() +"属于特病类型处方,开非特病类型的药")
2226
+                  this.$message.error(this.prescriptions[i].name.toString() +"属于特病类型处方,不能开非特病类型的药")
2227
                   return
2227
                   return
2228
                 }
2228
                 }
2229
               }
2229
               }
2658
       selectDrugs(selection, row) {
2658
       selectDrugs(selection, row) {
2659
         console.log('selection', selection)
2659
         console.log('selection', selection)
2660
         console.log('row', row)
2660
         console.log('row', row)
2661
-        if(this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id == 3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245){
2661
+        if(this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id == 3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245 || this.org_id == 9919){
2662
             if (row.count <= 0) {
2662
             if (row.count <= 0) {
2663
               if (selection) {
2663
               if (selection) {
2664
                 selection.forEach(row => {
2664
                 selection.forEach(row => {
2933
       },
2933
       },
2934
       selectChange(selection, row) {
2934
       selectChange(selection, row) {
2935
         console.log('row', row)
2935
         console.log('row', row)
2936
-        if(this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id ==3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10088 || this.org_id ==10245 ){
2936
+        if(this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id ==3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10088 || this.org_id ==10245 || this.org_id == 9919 ){
2937
            if (row.stock_count <= 0) {
2937
            if (row.stock_count <= 0) {
2938
             if (row.type == 3) {
2938
             if (row.type == 3) {
2939
               if (selection) {
2939
               if (selection) {

+ 7 - 7
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue View File

463
       },
463
       },
464
       getPrescribingNumberUnit(scope) {
464
       getPrescribingNumberUnit(scope) {
465
 
465
 
466
-        // console.log('scope',scope)
466
+         console.log('scope',scope)
467
         // if(scope.row.drug.min_unit == scope.row.single_dose_unit){
467
         // if(scope.row.drug.min_unit == scope.row.single_dose_unit){
468
         //   if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
468
         //   if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
469
         //     scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
469
         //     scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
482
         // }
482
         // }
483
         if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
483
         if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
484
           scope.row.retail_price = scope.row.drug.min_price
484
           scope.row.retail_price = scope.row.drug.min_price
485
-          if (scope.row.prescribing_number > scope.row.drug.total) {
486
-            this.$message.error(scope.row.drug_name + '库存不足')
487
-          }
485
+          // if (scope.row.prescribing_number > scope.row.drug.total) {
486
+          //   this.$message.error(scope.row.drug_name + '库存不足')
487
+          // }
488
         } else {
488
         } else {
489
-          if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
490
-            this.$message.error(scope.row.drug_name + '库存不足')
491
-          }
489
+          // if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
490
+          //   this.$message.error(scope.row.drug_name + '库存不足')
491
+          // }
492
           scope.row.retail_price = scope.row.drug.retail_price
492
           scope.row.retail_price = scope.row.drug.retail_price
493
         }
493
         }
494
       },
494
       },

+ 3 - 1
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue View File

416
         for (let i = 0; i < this.prescriptions.length; i++) {
416
         for (let i = 0; i < this.prescriptions.length; i++) {
417
           for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
417
           for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
418
             if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].advices[b].drug.is_special_diseases != 1) {
418
             if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].advices[b].drug.is_special_diseases != 1) {
419
-              this.$message.error('处方' + (i + 1).toString() + '属于特病类型处方,开非特病类型的药')
419
+              this.$message.error('处方' + (i + 1).toString() + '属于特病类型处方,不能开非特病类型的药')
420
+
421
+
420
               return
422
               return
421
             }
423
             }
422
 
424
 

+ 1 - 1
src/xt_pages/outpatientDoctorStation/template/printFour.vue View File

35
                   <div style="margin-left:100px;"><span>{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</span></div>
35
                   <div style="margin-left:100px;"><span>{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</span></div>
36
               </div>
36
               </div>
37
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
37
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
38
-                <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
38
+                <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price.toFixed(2)}}元/{{it.count}}次</div>
39
                </div>
39
                </div>
40
                <div style="text-align:center;" >(以下空白)</div>
40
                <div style="text-align:center;" >(以下空白)</div>
41
 
41
 

+ 1 - 1
src/xt_pages/outpatientDoctorStation/template/printOne.vue View File

35
                   <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.delivery_way}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
35
                   <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.delivery_way}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
36
               </div>
36
               </div>
37
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
37
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
38
-                <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
38
+                <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price.toFixed(2)}}元/{{it.count}}次</div>
39
                </div>
39
                </div>
40
                <div style="text-align:center;" >(以下空白)</div>
40
                <div style="text-align:center;" >(以下空白)</div>
41
 
41
 

+ 2 - 2
src/xt_pages/outpatientDoctorStation/template/printThree.vue View File

43
                   <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.execution_frequency}}&nbsp;{{it.delivery_way}}&nbsp;</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
43
                   <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.execution_frequency}}&nbsp;{{it.delivery_way}}&nbsp;</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
44
               </div>
44
               </div>
45
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
45
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
46
-                <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
46
+                <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price.toFixed(2)}}元/{{it.count}}次</div>
47
               </div>
47
               </div>
48
 
48
 
49
               <!-- <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
49
               <!-- <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
129
       //   age++
129
       //   age++
130
       // }
130
       // }
131
       // return age
131
       // return age
132
-      var nowTime = new Date().getTime(); 
132
+      var nowTime = new Date().getTime();
133
       //一年毫秒数(365 * 86400000 = 31536000000)
133
       //一年毫秒数(365 * 86400000 = 31536000000)
134
       return Math.ceil((nowTime-(birthday * 1000))/31536000000);
134
       return Math.ceil((nowTime-(birthday * 1000))/31536000000);
135
     },
135
     },

+ 1 - 1
src/xt_pages/outpatientDoctorStation/template/printTwo.vue View File

35
             <p>配对:</p>
35
             <p>配对:</p>
36
             <p>核对:{{getDoctor(advicePrint[0].checker)?getDoctor(advicePrint[0].checker):""}}</p>
36
             <p>核对:{{getDoctor(advicePrint[0].checker)?getDoctor(advicePrint[0].checker):""}}</p>
37
             <p>发药:{{getDoctor(advicePrint[0].execution_staff)?getDoctor(advicePrint[0].execution_staff):""}}</p>
37
             <p>发药:{{getDoctor(advicePrint[0].execution_staff)?getDoctor(advicePrint[0].execution_staff):""}}</p>
38
-            <p>药费:{{advicePrint[0].price?advicePrint[0].price:""}}</p>
38
+            <p>药费:{{advicePrint[0].price.toFixed(2)?advicePrint[0].price.toFixed(2):""}}</p>
39
         </div>
39
         </div>
40
     </div>
40
     </div>
41
 </template>
41
 </template>

+ 2 - 2
src/xt_pages/outpatientDoctorStation/treatTemplate/printOne.vue View File

54
                         <td>{{it.type == 2 ? it.project.project_name : it.good_info.good_name}}</td>
54
                         <td>{{it.type == 2 ? it.project.project_name : it.good_info.good_name}}</td>
55
                         <td>{{it.count}}</td>
55
                         <td>{{it.count}}</td>
56
                         <td>{{getUnit(it.unit)}}</td>
56
                         <td>{{getUnit(it.unit)}}</td>
57
-                        <td>{{it.price}}</td>
57
+                        <td>{{it.price.toFixed(2)}}</td>
58
                         <td></td>
58
                         <td></td>
59
                         <td>{{it.remark}}</td>
59
                         <td>{{it.remark}}</td>
60
                         <td>{{it.day}}</td>
60
                         <td>{{it.day}}</td>
66
                         <td>{{it.advice_name?it.advice_name:''}}</td>
66
                         <td>{{it.advice_name?it.advice_name:''}}</td>
67
                         <td>{{it.single_dose?it.single_dose:''}}</td>
67
                         <td>{{it.single_dose?it.single_dose:''}}</td>
68
                         <td>{{it.single_dose_unit?it.single_dose_unit:''}}</td>
68
                         <td>{{it.single_dose_unit?it.single_dose_unit:''}}</td>
69
-                        <td>{{it.price}}</td>
69
+                        <td>{{it.price.toFixed(2)}}</td>
70
                         <td></td>
70
                         <td></td>
71
                         <td>{{it.remark}}</td>
71
                         <td>{{it.remark}}</td>
72
                         <td>{{it.day}}</td>
72
                         <td>{{it.day}}</td>

+ 40 - 18
src/xt_pages/outpatientTool/components/detail.vue View File

72
             <el-table-column align="center" prop="name" label="项目名称">
72
             <el-table-column align="center" prop="name" label="项目名称">
73
                 <template slot-scope="scope">{{scope.row.item_name}}</template>
73
                 <template slot-scope="scope">{{scope.row.item_name}}</template>
74
             </el-table-column>
74
             </el-table-column>
75
+            <el-table-column align="center" prop="name" label="规格">
76
+                <template slot-scope="scope">{{scope.row.item_spec}}</template>
77
+            </el-table-column>
75
             <el-table-column align="center" prop="name" label="数量">
78
             <el-table-column align="center" prop="name" label="数量">
76
                 <template slot-scope="scope">{{scope.row.count}}</template>
79
                 <template slot-scope="scope">{{scope.row.count}}</template>
77
             </el-table-column>
80
             </el-table-column>
214
                   newObj['price'] = orders[b].order_info[c].pric
217
                   newObj['price'] = orders[b].order_info[c].pric
215
                   if (orders[b].order_info[c].advice_id > 0 && orders[b].order_info[c].project_id == 0) {
218
                   if (orders[b].order_info[c].advice_id > 0 && orders[b].order_info[c].project_id == 0) {
216
                     newObj['type'] = 1
219
                     newObj['type'] = 1
217
-                    // newObj['item_name'] = orders[b].order_info[c].advice.advice_name
220
+                    newObj['item_name'] = orders[b].order_info[c].advice.advice_name
218
                     newObj['item_id'] = orders[b].order_info[c].advice.drug_id
221
                     newObj['item_id'] = orders[b].order_info[c].advice.drug_id
219
 
222
 
220
                     if (orders[b].order_info[c].advice.drug.min_unit != orders[b].order_info[c].advice.drug.dose_unit) {
223
                     if (orders[b].order_info[c].advice.drug.min_unit != orders[b].order_info[c].advice.drug.dose_unit) {
221
-                      newObj['item_name'] = orders[b].order_info[c].advice.advice_name + '( ' + orders[b].order_info[c].advice.drug.dose + orders[b].order_info[c].advice.drug.dose_unit + '*' + orders[b].order_info[c].advice.drug.min_number + orders[b].order_info[c].advice.drug.min_unit + '/' + orders[b].order_info[c].advice.drug.max_unit + ' )'
224
+                      newObj['item_spec'] =  orders[b].order_info[c].advice.drug.dose + orders[b].order_info[c].advice.drug.dose_unit + '*' + orders[b].order_info[c].advice.drug.min_number + orders[b].order_info[c].advice.drug.min_unit + '/' + orders[b].order_info[c].advice.drug.max_unit
222
                     } else {
225
                     } else {
223
 
226
 
224
-                      newObj['item_name'] = ''
227
+                      newObj['item_spec'] = ''
225
                     }
228
                     }
226
 
229
 
227
                   }
230
                   }
230
                     newObj['item_id'] = orders[b].order_info[c].project.project_id
233
                     newObj['item_id'] = orders[b].order_info[c].project.project_id
231
 
234
 
232
                     if (orders[b].order_info[c].project.type == 2) {
235
                     if (orders[b].order_info[c].project.type == 2) {
236
+                      newObj['item_spec'] =""
233
                       newObj['item_name'] = orders[b].order_info[c].project.project.project_name
237
                       newObj['item_name'] = orders[b].order_info[c].project.project.project_name
234
 
238
 
239
+
235
                     } else if (orders[b].order_info[c].project.type == 3) {
240
                     } else if (orders[b].order_info[c].project.type == 3) {
236
-                      newObj['item_name'] = orders[b].order_info[c].project.good_info.good_name + '( ' + orders[b].order_info[c].project.good_info.specification_name + ' )'
241
+                      newObj['item_spec'] =    orders[b].order_info[c].project.good_info.specification_name
242
+                      newObj['item_name'] = orders[b].order_info[c].project.good_info.good_name
243
+
237
 
244
 
238
                     }
245
                     }
239
                   }
246
                   }
271
                 obj['price'] = project[i].price
278
                 obj['price'] = project[i].price
272
                 obj['type'] = project[i].type
279
                 obj['type'] = project[i].type
273
                 obj['item_name'] = project[i].item_name
280
                 obj['item_name'] = project[i].item_name
281
+                obj['item_spec'] = project[i].item_spec
282
+
274
                 obj['item_id'] = project[i].item_id
283
                 obj['item_id'] = project[i].item_id
275
                 obj['name'] = tempPatientsTwo[d].name
284
                 obj['name'] = tempPatientsTwo[d].name
276
                 obj['patient_id'] = tempPatientsTwo[d].patient_id
285
                 obj['patient_id'] = tempPatientsTwo[d].patient_id
290
                 obj['price'] = advice[i].price
299
                 obj['price'] = advice[i].price
291
                 obj['type'] = advice[i].type
300
                 obj['type'] = advice[i].type
292
                 obj['item_name'] = advice[i].item_name
301
                 obj['item_name'] = advice[i].item_name
302
+                obj['item_spec'] = advice[i].item_spec
293
                 obj['item_id'] = advice[i].item_id
303
                 obj['item_id'] = advice[i].item_id
294
                 obj['name'] = tempPatientsTwo[d].name
304
                 obj['name'] = tempPatientsTwo[d].name
295
                 obj['patient_id'] = tempPatientsTwo[d].patient_id
305
                 obj['patient_id'] = tempPatientsTwo[d].patient_id
303
               let total = 0
313
               let total = 0
304
               for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
314
               for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
305
                 let new_name = tempPatientsTwo[i].new_order_info[b].item_name
315
                 let new_name = tempPatientsTwo[i].new_order_info[b].item_name
306
-                new_name = new_name.replace('( ', '')
307
-                new_name = new_name.replace(' )', '')
308
-                if (new_name.length != 0) {
309
-                  total = parseFloat(total) + parseFloat((parseFloat(tempPatientsTwo[i].new_order_info[b].count.toString()) * parseFloat(tempPatientsTwo[i].new_order_info[b].price.toString().toString())).toFixed(2))
316
+                // console.log('3 ' + new_name)
317
+                if (new_name != undefined){
318
+                  // console.log('3 ' + tempPatientsTwo[i].new_order_info[b].patient_id)
319
+                  // console.log('3 ' + tempPatientsTwo[i].new_order_info[b].price)
320
+                  // console.log('3 ' + tempPatientsTwo[i].new_order_info[b].count)
321
+                  //
322
+                  // new_name = new_name.replace('( ', '')
323
+                  // new_name = new_name.replace(' )', '')
324
+                  if (new_name.length != 0) {
325
+                    total = parseFloat(total) + parseFloat((parseFloat(tempPatientsTwo[i].new_order_info[b].count.toString()) * parseFloat(tempPatientsTwo[i].new_order_info[b].price.toString().toString())).toFixed(2))
326
+                  }
327
+
328
+
329
+
310
                 }
330
                 }
331
+
332
+
311
               }
333
               }
312
               tempPatientsTwo[i]['total'] = total
334
               tempPatientsTwo[i]['total'] = total
313
             }
335
             }
317
               if (tempPatientsTwo[i].new_order_info.length > 0) {
339
               if (tempPatientsTwo[i].new_order_info.length > 0) {
318
 
340
 
319
                 for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
341
                 for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
320
-                  let new_name = tempPatientsTwo[i].new_order_info[b].item_name
321
-                  console.log('2 ' + new_name)
342
+                  // let new_name = tempPatientsTwo[i].new_order_info[b].item_name
343
+                  // console.log('2 ' + new_name)
344
+                  //
345
+                  // new_name = new_name.replace('( ', '')
346
+                  // new_name = new_name.replace(' )', '')
322
 
347
 
323
-                  new_name = new_name.replace('( ', '')
324
-                  new_name = new_name.replace(' )', '')
325
-
326
-                  if (new_name.length != 0) {
327
                     let obj = {
348
                     let obj = {
328
                       name: tempPatientsTwo[i].name,
349
                       name: tempPatientsTwo[i].name,
329
                       patient_id: tempPatientsTwo[i].patient_id,
350
                       patient_id: tempPatientsTwo[i].patient_id,
331
                       type: tempPatientsTwo[i].new_order_info[b].type,
352
                       type: tempPatientsTwo[i].new_order_info[b].type,
332
                       item_name: tempPatientsTwo[i].new_order_info[b].item_name,
353
                       item_name: tempPatientsTwo[i].new_order_info[b].item_name,
333
                       item_id: tempPatientsTwo[i].new_order_info[b].item_id,
354
                       item_id: tempPatientsTwo[i].new_order_info[b].item_id,
334
-                      count: tempPatientsTwo[i].new_order_info[b].count
335
-
355
+                      count: tempPatientsTwo[i].new_order_info[b].count,
356
+                      item_spec: tempPatientsTwo[i].new_order_info[b].item_spec
336
                     }
357
                     }
337
 
358
 
359
+
338
                     // if(b == 0){
360
                     // if(b == 0){
339
                     obj['total'] = tempPatientsTwo[i].total
361
                     obj['total'] = tempPatientsTwo[i].total
340
                     // }else{
362
                     // }else{
341
                     //   obj['total'] = 0
363
                     //   obj['total'] = 0
342
                     // }
364
                     // }
343
                     this.tableData.push(obj)
365
                     this.tableData.push(obj)
344
-                  }
366
+
345
 
367
 
346
                 }
368
                 }
347
               }
369
               }
471
         })
493
         })
472
         this.sameRowArr = sameRowArr
494
         this.sameRowArr = sameRowArr
473
       }, merge({ row, column, rowIndex, columnIndex }) {
495
       }, merge({ row, column, rowIndex, columnIndex }) {
474
-        if (columnIndex === 0 || columnIndex === 5) {
496
+        if (columnIndex === 0 || columnIndex === 6) {
475
           const _row = this.tempArr[rowIndex]
497
           const _row = this.tempArr[rowIndex]
476
           const _col = _row > 0 ? 1 : 0
498
           const _col = _row > 0 ? 1 : 0
477
           return {
499
           return {

+ 4 - 4
src/xt_pages/outpatientTool/components/settle.vue View File

80
               </template>
80
               </template>
81
           </el-table-column>
81
           </el-table-column>
82
           <el-table-column align="center" prop="item_name" label="医疗费总额">
82
           <el-table-column align="center" prop="item_name" label="医疗费总额">
83
-              <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
83
+              <template slot-scope="scope">{{scope.row.medfee_sumamt.toFixed(2)}}</template>
84
           </el-table-column>
84
           </el-table-column>
85
           <el-table-column align="center" prop="item_name" label="基金支付金额">
85
           <el-table-column align="center" prop="item_name" label="基金支付金额">
86
-              <template slot-scope="scope">{{scope.row.fund_pay_sumamt}}</template>
86
+              <template slot-scope="scope">{{scope.row.fund_pay_sumamt.toFixed(2)}}</template>
87
           </el-table-column>
87
           </el-table-column>
88
           <el-table-column align="center" prop="item_name" label="个人账户支付金额">
88
           <el-table-column align="center" prop="item_name" label="个人账户支付金额">
89
-              <template slot-scope="scope">{{scope.row.acct_pay}}</template>
89
+              <template slot-scope="scope">{{scope.row.acct_pay.toFixed(2)}}</template>
90
           </el-table-column>
90
           </el-table-column>
91
           <el-table-column align="center" prop="item_name" label="个人支付金额">
91
           <el-table-column align="center" prop="item_name" label="个人支付金额">
92
-              <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
92
+              <template slot-scope="scope">{{scope.row.psn_cash_pay.toFixed(2)}}</template>
93
           </el-table-column>
93
           </el-table-column>
94
           <el-table-column align="center" prop="total" label="费用总额">
94
           <el-table-column align="center" prop="total" label="费用总额">
95
               <template slot-scope="scope">
95
               <template slot-scope="scope">

+ 20 - 19
src/xt_pages/stock/cancelStockOrderAdd.vue View File

115
                   v-model="scope.row.return_count"
115
                   v-model="scope.row.return_count"
116
                 ></el-input>      
116
                 ></el-input>      
117
               </el-form-item>
117
               </el-form-item>
118
-              <!-- {{scope.row.packing_unit}} -->
118
+            
119
             </template>
119
             </template>
120
           </el-table-column>
120
           </el-table-column>
121
           <el-table-column width="150" align="center">
121
           <el-table-column width="150" align="center">
154
               >
154
               >
155
                <el-select v-model="scope.row.number" filterable placeholder="请选择">
155
                <el-select v-model="scope.row.number" filterable placeholder="请选择">
156
                   <el-option
156
                   <el-option
157
-                    v-for="(item,index) in numberList"
157
+                    v-for="(item,index) in scope.row.xt_warehouse_info"
158
                     :key="index"
158
                     :key="index"
159
                     :label="item.number"
159
                     :label="item.number"
160
                     :value="item.id">
160
                     :value="item.id">
439
       tempObj["price"] = ""
439
       tempObj["price"] = ""
440
       tempObj["total"] = ""
440
       tempObj["total"] = ""
441
       tempObj["warehouse_info_id"] =  0
441
       tempObj["warehouse_info_id"] =  0
442
+      tempObj["xt_warehouse_info"] = []
442
       this.recordInfo.recordData.push(tempObj);
443
       this.recordInfo.recordData.push(tempObj);
443
     },
444
     },
444
     handleDelete: function(index, row) {
445
     handleDelete: function(index, row) {
546
             this.$message.success("请添加退库商品");
547
             this.$message.success("请添加退库商品");
547
             return;
548
             return;
548
           }
549
           }
549
-          console.log("hhhhh2h332",this.recordInfo.recordData)
550
+   
550
           for(let i=0;i<this.recordInfo.recordData.length;i++){
551
           for(let i=0;i<this.recordInfo.recordData.length;i++){
551
             if(this.recordInfo.recordData[i].good_id == 0){
552
             if(this.recordInfo.recordData[i].good_id == 0){
552
                this.$message.error("耗材规格不能为空")
553
                this.$message.error("耗材规格不能为空")
553
                return
554
                return
554
             }
555
             }
555
-
556
-            for(let j=0;j<this.numberList.length;j++){
557
-              if(this.recordInfo.recordData[i].number == this.numberList[j].id){
558
-                this.recordInfo.recordData[i].number = this.numberList[j].number
559
-                this.recordInfo.recordData[i].warehouse_info_id = this.numberList[j].id
560
-              }
561
-            }
562
-            
556
+            for(let j=0;j<this.recordInfo.recordData[i].xt_warehouse_info.length;j++){
557
+               if(this.recordInfo.recordData[i].number == this.recordInfo.recordData[i].xt_warehouse_info[j].id){
558
+                  this.recordInfo.recordData[i].number = this.recordInfo.recordData[i].xt_warehouse_info[j].number
559
+                  this.recordInfo.recordData[i].warehouse_info_id = this.recordInfo.recordData[i].xt_warehouse_info[j].id
560
+               }
561
+            }     
563
           }
562
           }
564
 
563
 
565
           const params = {
564
           const params = {
566
             cancelStock: this.recordInfo.recordData
565
             cancelStock: this.recordInfo.recordData
567
           };
566
           };
568
-          console.log("params",params)
569
-         
567
+        
568
+          console.log("parasm23233222332323",params)
569
+          
570
           postCancelStock(
570
           postCancelStock(
571
             params,
571
             params,
572
             this.return_time,
572
             this.return_time,
622
       }
622
       }
623
     postSearchGoodList(key).then(response => {
623
     postSearchGoodList(key).then(response => {
624
         if (response.data.state == 1) {
624
         if (response.data.state == 1) {
625
-          
626
             var list = response.data.data.list
625
             var list = response.data.data.list
627
-            
626
+           
628
             this.goodList = list
627
             this.goodList = list
629
             var manufacturerList = response.data.data.manufacturerList
628
             var manufacturerList = response.data.data.manufacturerList
630
             this.manufacturerList = manufacturerList
629
             this.manufacturerList = manufacturerList
656
       this.currentIndex = val
655
       this.currentIndex = val
657
     },
656
     },
658
     handleSelect(val){
657
     handleSelect(val){
659
-      //获取当前耗材的批号
660
-      this.getStockBatchNumber(val.id)
658
+      console.log("列表23323232332",this.recordInfo.recordData)
661
       for(let i=0;i<this.recordInfo.recordData.length;i++){
659
       for(let i=0;i<this.recordInfo.recordData.length;i++){
662
         if(this.currentIndex == i){
660
         if(this.currentIndex == i){
663
-          this.recordInfo.recordData[i].good_type_id = val.id
664
           this.recordInfo.recordData[i].good_name = val.good_name
661
           this.recordInfo.recordData[i].good_name = val.good_name
665
           this.recordInfo.recordData[i].good_type_id = val.good_type_id
662
           this.recordInfo.recordData[i].good_type_id = val.good_type_id
666
           this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
663
           this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
667
-          this.recordInfo.recordData[i].number =  val.number
664
+          this.recordInfo.recordData[i].number =  ""
668
           this.recordInfo.recordData[i].manufacturer = val.manufacturer
665
           this.recordInfo.recordData[i].manufacturer = val.manufacturer
669
           this.recordInfo.recordData[i].remark = val.remark
666
           this.recordInfo.recordData[i].remark = val.remark
667
+          this.recordInfo.recordData[i].xt_warehouse_info = val.xt_warehouse_info
670
           if(val.buy_price == 0){
668
           if(val.buy_price == 0){
671
             this.recordInfo.recordData[i].price = ""
669
             this.recordInfo.recordData[i].price = ""
672
           }else{
670
           }else{
693
         if(response.data.state == 1){
691
         if(response.data.state == 1){
694
           var list = response.data.data.list
692
           var list = response.data.data.list
695
           console.log("list2243444",list)
693
           console.log("list2243444",list)
694
+
695
+          this.numberList = []
696
           this.numberList = list
696
           this.numberList = list
697
         }
697
         }
698
      })
698
      })
722
     tempObj["price"] = ""
722
     tempObj["price"] = ""
723
     tempObj["total"] = ""
723
     tempObj["total"] = ""
724
     tempObj["warehouse_info_id"] = 0
724
     tempObj["warehouse_info_id"] = 0
725
+    tempObj["xt_warehouse_info"] = []
725
     this.recordInfo.recordData.push(tempObj);
726
     this.recordInfo.recordData.push(tempObj);
726
     this.GetConfigInfo();
727
     this.GetConfigInfo();
727
     this.propForm.goodUnit = this.$store.getters.good_unit;
728
     this.propForm.goodUnit = this.$store.getters.good_unit;

+ 10 - 9
src/xt_pages/stock/cancelStockOrderEdit.vue View File

114
               >
114
               >
115
                <el-select v-model="scope.row.number" filterable placeholder="请选择" >
115
                <el-select v-model="scope.row.number" filterable placeholder="请选择" >
116
                   <el-option
116
                   <el-option
117
-                    v-for="(item,index) in numberList"
117
+                    v-for="(item,index) in scope.row.xt_warehouse_info"
118
                     :key="index"
118
                     :key="index"
119
                     :label="item.number"
119
                     :label="item.number"
120
                     :value="item.id">
120
                     :value="item.id">
400
         tempObj["remark"] = ""
400
         tempObj["remark"] = ""
401
         tempObj["price"] = 0
401
         tempObj["price"] = 0
402
         tempObj["warehouse_info_id"] = 0
402
         tempObj["warehouse_info_id"] = 0
403
+        tempObj["xt_warehouse_info"] = []
403
         this.recordInfo.recordData.push(tempObj)
404
         this.recordInfo.recordData.push(tempObj)
404
       }, handleDelete: function(index, row) {
405
       }, handleDelete: function(index, row) {
405
         if (row.id == 0) {
406
         if (row.id == 0) {
513
               }
514
               }
514
               array[i].price = array[i].price.toString()
515
               array[i].price = array[i].price.toString()
515
             }
516
             }
516
-
517
+            console.log("hh2332322323",this.recordInfo.recordData)
517
             for(let i=0;i<this.recordInfo.recordData.length;i++){
518
             for(let i=0;i<this.recordInfo.recordData.length;i++){
518
                if(this.recordInfo.recordData[i].good_id == 0){
519
                if(this.recordInfo.recordData[i].good_id == 0){
519
                   this.$message.error("耗材规格不能为空")
520
                   this.$message.error("耗材规格不能为空")
520
                   return
521
                   return
521
                }
522
                }
522
-             for(let j=0;j<this.numberList.length;j++){
523
-                if(this.recordInfo.recordData[i].number == this.numberList[j].id){
524
-                  this.recordInfo.recordData[i].number = this.numberList[j].number
525
-                  this.recordInfo.recordData[i].warehouse_info_id = this.numberList[j].id
523
+              for(let j=0;j<this.recordInfo.recordData[i].xt_warehouse_info.length;j++){
524
+                if(this.recordInfo.recordData[i].number == this.recordInfo.recordData[i].xt_warehouse_info[j].id){
525
+                    this.recordInfo.recordData[i].number = this.recordInfo.recordData[i].xt_warehouse_info[j].number
526
+                    this.recordInfo.recordData[i].warehouse_info_id = this.recordInfo.recordData[i].xt_warehouse_info[j].id
526
                 }
527
                 }
527
-             }
528
+              }     
528
             }
529
             }
529
 
530
 
530
             const params = {
531
             const params = {
586
               response.data.data.list[i].product_date = this.getTime(response.data.data.list[i].product_date,"{y}-{m}-{d}")
587
               response.data.data.list[i].product_date = this.getTime(response.data.data.list[i].product_date,"{y}-{m}-{d}")
587
               response.data.data.list[i].expiry_date = this.getTime(response.data.data.list[i].expiry_date,"{y}-{m}-{d}")
588
               response.data.data.list[i].expiry_date = this.getTime(response.data.data.list[i].expiry_date,"{y}-{m}-{d}")
588
               response.data.data.list[i].return_count = response.data.data.list[i].count
589
               response.data.data.list[i].return_count = response.data.data.list[i].count
590
+              response.data.data.list[i].xt_warehouse_info = response.data.data.list[i].xt_warehouse_info
589
               this.recordInfo.recordData.push(response.data.data.list[i])
591
               this.recordInfo.recordData.push(response.data.data.list[i])
590
             }
592
             }
591
             this.cancelStock = response.data.data.info
593
             this.cancelStock = response.data.data.info
655
         this.currentIndex = val
657
         this.currentIndex = val
656
       },
658
       },
657
       handleSelect(val){
659
       handleSelect(val){
658
-        console.log("val",val)
659
         //获取当前耗材的批号
660
         //获取当前耗材的批号
660
-         this.getStockBatchNumber(val.id)
661
          for(let i=0;i<this.recordInfo.recordData.length;i++){
661
          for(let i=0;i<this.recordInfo.recordData.length;i++){
662
            if(this.currentIndex == i){
662
            if(this.currentIndex == i){
663
               this.recordInfo.recordData[i].good_type_id = val.id
663
               this.recordInfo.recordData[i].good_type_id = val.id
667
               this.recordInfo.recordData[i].number =  val.number
667
               this.recordInfo.recordData[i].number =  val.number
668
               this.recordInfo.recordData[i].manufacturer = val.manufacturer
668
               this.recordInfo.recordData[i].manufacturer = val.manufacturer
669
               this.recordInfo.recordData[i].remark = val.remark
669
               this.recordInfo.recordData[i].remark = val.remark
670
+              this.recordInfo.recordData[i].xt_warehouse_info = val.xt_warehouse_info
670
               if(val.buy_price == 0){
671
               if(val.buy_price == 0){
671
                this.recordInfo.recordData[i].price = ""
672
                this.recordInfo.recordData[i].price = ""
672
               }else{
673
               }else{

+ 7 - 6
src/xt_pages/stock/drugs/cancelDrugStockOrder.vue View File

402
     },
402
     },
403
     fetchAllAdminUsers() {
403
     fetchAllAdminUsers() {
404
       fetchAllAdminUsers().then(response => {
404
       fetchAllAdminUsers().then(response => {
405
-        console.log(response);
405
+      
406
         if (response.data.state == 1) {
406
         if (response.data.state == 1) {
407
           this.adminUserOptions = response.data.data.users;
407
           this.adminUserOptions = response.data.data.users;
408
           var alen = this.adminUserOptions.length;
408
           var alen = this.adminUserOptions.length;
581
       this.getCancelStockDetail(val.id)
581
       this.getCancelStockDetail(val.id)
582
     },
582
     },
583
     getCancelStockDetail(id){
583
     getCancelStockDetail(id){
584
+      console.log("id232233223",id)
584
         var params = {
585
         var params = {
585
           id:id
586
           id:id
586
         }
587
         }
587
       getCancelStockDetail(params).then(response=>{
588
       getCancelStockDetail(params).then(response=>{
588
        if(response.data.state == 1){
589
        if(response.data.state == 1){
589
          var list =  response.data.data.list
590
          var list =  response.data.data.list
591
+         console.log("hhhh23233323223",list)
590
          for(let i=0;i<list.length;i++){
592
          for(let i=0;i<list.length;i++){
591
            list[i].product_date = this.getTime(list[i].product_date,"{y}-{h}-{d}")
593
            list[i].product_date = this.getTime(list[i].product_date,"{y}-{h}-{d}")
592
            list[i].expiry_date = this.getTime(list[i].expiry_date,"{y}-{h}-{d}")
594
            list[i].expiry_date = this.getTime(list[i].expiry_date,"{y}-{h}-{d}")
593
          }
595
          }
594
          this.tableList = list
596
          this.tableList = list
595
-         console.log("list23232",list)
597
+        //  console.log("list23232",list)
596
          this.showTable = true
598
          this.showTable = true
597
        }
599
        }
598
       })
600
       })
621
      getDrugCancelExportList(params).then(response=>{
623
      getDrugCancelExportList(params).then(response=>{
622
         if(response.data.state == 1){
624
         if(response.data.state == 1){
623
          var list = response.data.data.list
625
          var list = response.data.data.list
624
-         console.log("导出数据222",list)
626
+        //  console.log("导出数据222",list)
625
          this.exportList = list
627
          this.exportList = list
626
         }
628
         }
627
      })
629
      })
632
         return
634
         return
633
       }
635
       }
634
      import('@/vendor/Export2Excel').then(excel => {
636
      import('@/vendor/Export2Excel').then(excel => {
635
-      console.log("23232323",this.exportList)
636
-      return
637
+     
637
       for(let i=0;i<this.exportList.length;i++){
638
       for(let i=0;i<this.exportList.length;i++){
638
         this.exportList[i].total_price = this.exportList[i].count * this.exportList[i].price
639
         this.exportList[i].total_price = this.exportList[i].count * this.exportList[i].price
639
         this.exportList[i].drug_name = this.exportList[i].BaseDrugLib.drug_name
640
         this.exportList[i].drug_name = this.exportList[i].BaseDrugLib.drug_name
650
       }
651
       }
651
       const tHeader = ['药品名称',  '规格&单位','退库数量','退库单价','批次','品名/注册证号(备案凭证号)','生产厂家','生产日期','有效期','退库原因']
652
       const tHeader = ['药品名称',  '规格&单位','退库数量','退库单价','批次','品名/注册证号(备案凭证号)','生产厂家','生产日期','有效期','退库原因']
652
       const filterVal = ['drug_name', 'unit','count','price','batch_number','register_account','manufacturer','product_date','expiry_date','remark']
653
       const filterVal = ['drug_name', 'unit','count','price','batch_number','register_account','manufacturer','product_date','expiry_date','remark']
653
-      console.log("table",this.exportList)
654
+      // console.log("table",this.exportList)
654
     
655
     
655
       const data = this.formatJson(filterVal, this.exportList)
656
       const data = this.formatJson(filterVal, this.exportList)
656
       excel.export_json_to_excel({
657
       excel.export_json_to_excel({

+ 19 - 16
src/xt_pages/stock/drugs/cancelDrugStockOrderAdd.vue View File

172
               >
172
               >
173
                <el-select v-model="scope.row.batch_number" filterable placeholder="请选择">
173
                <el-select v-model="scope.row.batch_number" filterable placeholder="请选择">
174
                   <el-option
174
                   <el-option
175
-                    v-for="(item,index) in numberList"
175
+                    v-for="(item,index) in scope.row.drug_warehouse_info"
176
                     :key="index"
176
                     :key="index"
177
                     :label="item.batch_number"
177
                     :label="item.batch_number"
178
                     :value="item.id">
178
                     :value="item.id">
463
       tempObj["batch_number"] = ""
463
       tempObj["batch_number"] = ""
464
       tempObj["max_unit"] = ""
464
       tempObj["max_unit"] = ""
465
       tempObj["batch_number_id"] = 0
465
       tempObj["batch_number_id"] = 0
466
+      tempObj["drug_warehouse_info"] = []
466
       this.recordInfo.recordData.push(tempObj);
467
       this.recordInfo.recordData.push(tempObj);
467
     },
468
     },
468
     handleDelete: function(index, row) {
469
     handleDelete: function(index, row) {
546
       this.$refs["tableForm"].validate(valid => {
547
       this.$refs["tableForm"].validate(valid => {
547
         if (valid) {
548
         if (valid) {
548
           const array = this.recordInfo.recordData;
549
           const array = this.recordInfo.recordData;
550
+          console.log("列表23323232323232",array)
549
           let total = 0;
551
           let total = 0;
550
           for (let i = 0; i < array.length; i++) {
552
           for (let i = 0; i < array.length; i++) {
551
 
553
 
562
           }
564
           }
563
           for(let i=0;i<this.recordInfo.recordData.length;i++){
565
           for(let i=0;i<this.recordInfo.recordData.length;i++){
564
             this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
566
             this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
565
-            console.log("批次列表",this.numberList)
566
-             for(let j=0;j<this.numberList.length;j++){
567
-                if(this.recordInfo.recordData[i].batch_number == this.numberList[j].id){
568
-                   this.recordInfo.recordData[i].batch_number = this.numberList[j].batch_number
569
-                   this.recordInfo.recordData[i].batch_number_id = this.numberList[j].id
570
-                 
571
-                }
572
-             }
567
+            for(let j=0;j<this.recordInfo.recordData[i].drug_warehouse_info.length;j++){
568
+               
569
+               if(this.recordInfo.recordData[i].batch_number == this.recordInfo.recordData[i].drug_warehouse_info[j].id){
570
+                  this.recordInfo.recordData[i].batch_number = this.recordInfo.recordData[i].drug_warehouse_info[j].batch_number
571
+                  this.recordInfo.recordData[i].batch_number_id = this.recordInfo.recordData[i].drug_warehouse_info[j].id
572
+               }
573
+            }
573
           }
574
           }
574
           const params = {
575
           const params = {
575
             cancelStock: this.recordInfo.recordData
576
             cancelStock: this.recordInfo.recordData
576
           };
577
           };
577
-          console.log("params2222",params,this.return_time)
578
+         console.log("params2222",params,this.return_time)
578
         
579
         
579
           postDrugCancelStock(
580
           postDrugCancelStock(
580
             params,
581
             params,
658
         this.currentIndex = val
659
         this.currentIndex = val
659
       },
660
       },
660
       handleSelect(val){
661
       handleSelect(val){
662
+        console.log("val345555555555555555555",val)
661
          var arr = []
663
          var arr = []
662
          for(let i=0;i<this.recordInfo.recordData.length;i++){
664
          for(let i=0;i<this.recordInfo.recordData.length;i++){
663
             arr.push(this.recordInfo.recordData[i].drug_id)
665
             arr.push(this.recordInfo.recordData[i].drug_id)
664
          }
666
          }
665
          var str = arr.join(",")
667
          var str = arr.join(",")
666
-         console.log("str",str)
667
          if(str.indexOf(val.id)!=-1){
668
          if(str.indexOf(val.id)!=-1){
668
             this.$message.error("该药品已存在列表中")
669
             this.$message.error("该药品已存在列表中")
669
             return
670
             return
670
          }
671
          }
671
-         this.getDrugBatchNumber(val.id)
672
+        //  this.getDrugBatchNumber(val.id)
672
          for(let i=0;i<this.recordInfo.recordData.length;i++){
673
          for(let i=0;i<this.recordInfo.recordData.length;i++){
673
            if(i == this.currentIndex){
674
            if(i == this.currentIndex){
674
              this.recordInfo.recordData[i].drug_id  = val.id
675
              this.recordInfo.recordData[i].drug_id  = val.id
678
              this.recordInfo.recordData[i].last_price = val.last_price
679
              this.recordInfo.recordData[i].last_price = val.last_price
679
              this.recordInfo.recordData[i].price = val.last_price
680
              this.recordInfo.recordData[i].price = val.last_price
680
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
681
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
681
-             this.recordInfo.recordData[i].number =  val.number
682
+           
682
              this.recordInfo.recordData[i].max_unit = val.max_unit
683
              this.recordInfo.recordData[i].max_unit = val.max_unit
683
              this.recordInfo.recordData[i].min_unit = val.min_unit
684
              this.recordInfo.recordData[i].min_unit = val.min_unit
685
+             this.recordInfo.recordData[i].drug_warehouse_info = val.drug_warehouse_info
684
              if(val.dealer == 0){
686
              if(val.dealer == 0){
685
                this.recordInfo.recordData[i].dealer = ""
687
                this.recordInfo.recordData[i].dealer = ""
686
              }else{
688
              }else{
689
             
691
             
690
            }
692
            }
691
         }
693
         }
692
-        console.log("333333",this.recordInfo.recordData)
694
+        // console.log("333333",this.recordInfo.recordData)
693
       },
695
       },
694
       getDrugBatchNumber(id){
696
       getDrugBatchNumber(id){
695
           var params = {
697
           var params = {
698
         getDrugBatchNumber(params).then(response=>{
700
         getDrugBatchNumber(params).then(response=>{
699
            if(response.data.state == 1){
701
            if(response.data.state == 1){
700
              var list = response.data.data.list
702
              var list = response.data.data.list
701
-             console.log("list2222",list)
703
+            //  console.log("list2222",list)
702
              for(let i=0;i<list.length;i++){
704
              for(let i=0;i<list.length;i++){
703
                this.numberList.push(list[i])
705
                this.numberList.push(list[i])
704
              }
706
              }
736
     tempObj["batch_number"] = ""
738
     tempObj["batch_number"] = ""
737
     tempObj["batch_number_id"] = 0
739
     tempObj["batch_number_id"] = 0
738
     tempObj["max_unit"] = ""
740
     tempObj["max_unit"] = ""
741
+    tempObj["drug_warehouse_info"] = []
739
     this.unitList =  getDataConfig('hemodialysis','units')
742
     this.unitList =  getDataConfig('hemodialysis','units')
740
-    console.log("单位",this.unitList)
743
+    // console.log("单位",this.unitList)
741
     this.recordInfo.recordData.push(tempObj);
744
     this.recordInfo.recordData.push(tempObj);
742
     this.GetConfigInfo();
745
     this.GetConfigInfo();
743
     this.propForm.goodUnit = this.$store.getters.good_unit;
746
     this.propForm.goodUnit = this.$store.getters.good_unit;

+ 5 - 4
src/xt_pages/stock/drugs/cancelDrugStockOrderEdit.vue View File

372
         this.currentIndex = -1
372
         this.currentIndex = -1
373
       }, cancle: function() {
373
       }, cancle: function() {
374
         this.$refs.dialog.hide()
374
         this.$refs.dialog.hide()
375
-      },calculate: function(val) {
376
-        if (val == 0) {
375
+      },
376
+      calculate: function(val) {
377
+        if (val == 0 || val == "NaN") {
377
           return ''
378
           return ''
378
         }
379
         }
379
         return Math.round(parseFloat(val) * 100) / 100
380
         return Math.round(parseFloat(val) * 100) / 100
433
         const tempObj = {}
434
         const tempObj = {}
434
         tempObj['id'] = 0
435
         tempObj['id'] = 0
435
         tempObj["return_count"] = "";
436
         tempObj["return_count"] = "";
436
-        tempObj["price"] = "";
437
+        tempObj["price"] = 0;
437
         tempObj["retail_price"] = "";
438
         tempObj["retail_price"] = "";
438
         tempObj["register_account"] = ""
439
         tempObj["register_account"] = ""
439
         tempObj["dealer"] = ""
440
         tempObj["dealer"] = ""
443
         tempObj["expiry_date"] = ""
444
         tempObj["expiry_date"] = ""
444
         tempObj["batch_number"] = ""
445
         tempObj["batch_number"] = ""
445
         tempObj["batch_number_id"] = 0
446
         tempObj["batch_number_id"] = 0
446
-
447
+         tempObj["count"] = 0
447
         this.recordInfo.recordData.push(tempObj)
448
         this.recordInfo.recordData.push(tempObj)
448
       }, handleDelete: function(index, row) {
449
       }, handleDelete: function(index, row) {
449
         if (row.id == 0) {
450
         if (row.id == 0) {

+ 10 - 9
src/xt_pages/stock/drugs/drugDamaged.vue View File

96
             </el-col>
96
             </el-col>
97
             <el-col :span="8">
97
             <el-col :span="8">
98
               <el-form-item label="原因:">
98
               <el-form-item label="原因:">
99
-                  <el-select v-model="form.type" placeholder="请选择">
99
+                  <el-select v-model="form.type" placeholder="请选择" @change="changeReason">
100
                       <el-option
100
                       <el-option
101
                         v-for="item in reasonList"
101
                         v-for="item in reasonList"
102
                         :key="item.id"
102
                         :key="item.id"
146
 
146
 
147
               <el-table-column prop="address" label="盘点原因" align="center">
147
               <el-table-column prop="address" label="盘点原因" align="center">
148
                 <template slot-scope="scope">
148
                 <template slot-scope="scope">
149
-                  <span v-if="scope.row.type == 0">默认</span> 
149
+                  <span v-if="scope.row.type == 6">默认</span> 
150
                   <span v-if="scope.row.type == 1">到期退货</span> 
150
                   <span v-if="scope.row.type == 1">到期退货</span> 
151
                   <span v-if="scope.row.type == 2">异常退货</span> 
151
                   <span v-if="scope.row.type == 2">异常退货</span> 
152
                   <span v-if="scope.row.type == 3">退货</span> 
152
                   <span v-if="scope.row.type == 3">退货</span> 
243
             unitList:[],
243
             unitList:[],
244
             datamageList:[],
244
             datamageList:[],
245
             reasonList:[
245
             reasonList:[
246
-              {id:0,name:"默认"},
246
+              {id:6,name:"默认"},
247
               {id:1,name:"到期退货"},
247
               {id:1,name:"到期退货"},
248
               {id:2,name:"异常退货"},
248
               {id:2,name:"异常退货"},
249
               {id:3,name:"退货"},
249
               {id:3,name:"退货"},
284
             return uParseTime(val, '{y}-{m}-{d}')
284
             return uParseTime(val, '{y}-{m}-{d}')
285
          }
285
          }
286
         },
286
         },
287
+      changeReason(val){
288
+        this.form.type = val
289
+        this.clickDetai(this.drug_id)
290
+      },
287
       getlist(){
291
       getlist(){
288
         var params = {
292
         var params = {
289
           limit:this.limit,
293
           limit:this.limit,
292
           end_time:this.end_time,
296
           end_time:this.end_time,
293
           keyword:this.searchKey,
297
           keyword:this.searchKey,
294
         }
298
         }
295
-        console.log("博阿孙param232332232323",params)
299
+       
296
         getDrugDamageList(params).then(response=>{
300
         getDrugDamageList(params).then(response=>{
297
            if(response.data.state == 1){
301
            if(response.data.state == 1){
298
              this.tableList = response.data.data.list
302
              this.tableList = response.data.data.list
299
              this.total = response.data.data.total
303
              this.total = response.data.data.total
300
              this.doctorList = response.data.data.doctorList
304
              this.doctorList = response.data.data.doctorList
301
              var datamagelist = response.data.data.damagelist
305
              var datamagelist = response.data.data.damagelist
302
-             console.log("hhh233223",datamagelist)
303
              this.datamageList = datamagelist
306
              this.datamageList = datamagelist
304
            }
307
            }
305
         })
308
         })
355
            warehouseing_order:this.form.warehousing_order,
358
            warehouseing_order:this.form.warehousing_order,
356
            type:this.form.type,
359
            type:this.form.type,
357
          }
360
          }
361
+        
358
         this.dialogVisible = true
362
         this.dialogVisible = true
359
         getDamagedByDrugId(params).then(response=>{
363
         getDamagedByDrugId(params).then(response=>{
360
            if(response.data.state ==1){
364
            if(response.data.state ==1){
364
                list[i].min_number == list[i].XtBaseDrug.min_number
368
                list[i].min_number == list[i].XtBaseDrug.min_number
365
                list[i].total = 0
369
                list[i].total = 0
366
              }
370
              }
367
-             console.log("list232232332",list)
371
+            
368
 
372
 
369
              for(let i=0;i<list.length;i++){
373
              for(let i=0;i<list.length;i++){
370
                this.drug_name = list[0].drug_name
374
                this.drug_name = list[0].drug_name
423
        this.clickDetai(this.drug_id)
427
        this.clickDetai(this.drug_id)
424
      },
428
      },
425
      getDrugDamageRadio(count){
429
      getDrugDamageRadio(count){
426
-
427
        var total_count =  this.getDamagedCountOne(this.total_count)
430
        var total_count =  this.getDamagedCountOne(this.total_count)
428
-       console.log("count888888888888",count)
429
-       console.log("hh23232数据列表23322323",total_count)
430
        var all_count = 0
431
        var all_count = 0
431
        all_count =  total_count * this.min_number
432
        all_count =  total_count * this.min_number
432
       
433
       

+ 7 - 7
src/xt_pages/stock/drugs/drugPrint.vue View File

40
               <td style="line-height: 50px">
40
               <td style="line-height: 50px">
41
                 <span>{{item.XtBaseDrug.min_unit}}</span>
41
                 <span>{{item.XtBaseDrug.min_unit}}</span>
42
               </td>
42
               </td>
43
-            
43
+
44
               <td style="line-height: 50px">
44
               <td style="line-height: 50px">
45
                   {{getCount(item.drug_id)}}
45
                   {{getCount(item.drug_id)}}
46
               </td>
46
               </td>
108
           { path: false, name: '打印单' }
108
           { path: false, name: '打印单' }
109
         ],
109
         ],
110
         loading: false,
110
         loading: false,
111
-        orgname: '',   
111
+        orgname: '',
112
         totalPrice: 0,
112
         totalPrice: 0,
113
         stockDatas: [],
113
         stockDatas: [],
114
         goodUnit: [],
114
         goodUnit: [],
151
           scanStyles: false
151
           scanStyles: false
152
         })
152
         })
153
       },
153
       },
154
-   
154
+
155
       getUnit(id){
155
       getUnit(id){
156
         var name = ""
156
         var name = ""
157
         for(let i=0;i<this.goodUnit.length;i++){
157
         for(let i=0;i<this.goodUnit.length;i++){
218
           var total = response.data.data.total
218
           var total = response.data.data.total
219
           this.total = total
219
           this.total = total
220
         }
220
         }
221
-      })  
221
+      })
222
       },
222
       },
223
 
223
 
224
       getTotal(){
224
       getTotal(){
240
              var list = response.data.data.list
240
              var list = response.data.data.list
241
              console.log("入库单详情",list)
241
              console.log("入库单详情",list)
242
              this.cancelStockDate  = list
242
              this.cancelStockDate  = list
243
-           }   
243
+           }
244
         })
244
         })
245
 
245
 
246
-        
246
+
247
       },
247
       },
248
       getCount(drug_id){
248
       getCount(drug_id){
249
         var total = 0
249
         var total = 0
275
       var xtuser = this.$store.getters.xt_user
275
       var xtuser = this.$store.getters.xt_user
276
       this.orgname = xtuser.org.org_name
276
       this.orgname = xtuser.org.org_name
277
       // this.getlist()
277
       // this.getlist()
278
-     
278
+
279
 
279
 
280
       this.getDrugWarehouseInfoPrint()
280
       this.getDrugWarehouseInfoPrint()
281
        this.getDrugCountList()
281
        this.getDrugCountList()

+ 40 - 20
src/xt_pages/stock/drugs/drugQueryPrint.vue View File

45
               <td style="line-height: 50px">
45
               <td style="line-height: 50px">
46
                 <span> {{getManufacturerList(item.manufacturer)}}</span>
46
                 <span> {{getManufacturerList(item.manufacturer)}}</span>
47
               </td>
47
               </td>
48
-              <td><span v-if="getWarehoseInfo(item.drug_warehouse_info)!=0">{{getWarehoseInfo(item.drug_warehouse_info)}}{{item.max_unit}}</span ></td>
49
-              <td><span v-if="getWarehouseOutInfo(item.drug_warehouse_out,item.max_unit,item.min_unit,item.min_number)!=0">{{getWarehouseOutInfo(item.drug_warehouse_out,item.max_unit,item.min_unit,item.min_number)}}</span></td>
50
               <td>
48
               <td>
51
-                <span v-if="getOverFlushInfo(item.drug_warehouse_info,item.max_unit,item.min_unit,item.min_number)!=0">{{getOverFlushInfo(item.drug_warehouse_info,item.max_unit,item.min_unit,item.min_number)}}</span>
49
+                <span v-if="getWarehoseInfo(item.drug_warehouse_info)!=0">{{getWarehoseInfo(item.drug_warehouse_info)}}{{item.max_unit}}</span >
50
+              </td>
51
+              <td>
52
+                <!-- <span v-if="getWarehouseOutInfo(item.drug_warehouse_out,item.max_unit,item.min_unit,item.min_number)!=0">
53
+                  {{getWarehouseOutInfo(item.drug_warehouse_out,item.max_unit,item.min_unit,item.min_number)}}
54
+                </span> -->
55
+                  {{getOutFlush(item.drug_warehouse_info,item.max_unit,item.min_unit,item.min_number,item.drug_cancel_stock_info)}}
56
+              </td>
57
+              <td>
58
+              <span v-if="getOverFlushInfo(item.drug_warehouse_info,item.max_unit,item.min_unit,item.min_number)!=0">
59
+                  {{getOverFlushInfo(item.drug_warehouse_info,item.max_unit,item.min_unit,item.min_number)}}
60
+              </span>
52
              </td> 
61
              </td> 
53
             </tr>
62
             </tr>
54
             </tbody>
63
             </tbody>
346
         }
355
         }
347
         return count
356
         return count
348
       },
357
       },
349
-      // getCount(drug_id,min_number,max_unit,min_unit){
350
-      //   var count= 0
351
-      //   var str = ""
352
-      //   var min_str = ""
353
-      //   for(let i=0;i<this.drugOutList.length;i++){
354
-      //     if(drug_id == this.drugOutList[i].drug_id){
355
-      //        count += parseInt(this.drugOutList[i].count)
356
-      //     }
357
-      //   }
358
-      //   if(parseInt(count/min_number)!=0){
359
-      //     str = parseInt(count/min_number)+ max_unit
360
-      //   }
361
-      //   if((count%min_number)!=0){
362
-      //     min_str =  count%min_number + min_unit
363
-      //   }
364
-      //   return str + min_str
365
-      // },
366
         getCount(drug_id,min_number,max_unit,min_unit){
358
         getCount(drug_id,min_number,max_unit,min_unit){
367
         var total= 0
359
         var total= 0
368
         var str = ""
360
         var str = ""
506
          }
498
          }
507
         return max_str + min_str
499
         return max_str + min_str
508
 
500
 
501
+      },
502
+      getOutFlush(info,max_unit,min_unit,min_number,cancel_info){
503
+        var str = ""
504
+        var str_min = ""
505
+        var total = 0
506
+        var out_count = 0
507
+        var over_count = 0
508
+        var cancel_count = 0
509
+        for(let i=0;i<info.length;i++){
510
+           total += (info[i].warehousing_count * min_number)
511
+        }
512
+        
513
+        for(let j=0;j<info.length;j++){
514
+           out_count += (info[j].stock_max_number + info[j].stock_min_number)
515
+        }
516
+       
517
+        for(let z=0;z<cancel_info.length;z++){
518
+           cancel_count += cancel_info[z].count
519
+        }
520
+        over_count = total - out_count + cancel_count
521
+    
522
+        if(parseInt(over_count/min_number)!=0){
523
+            str = parseInt(over_count/min_number)+ max_unit
524
+         }
525
+         if(over_count%min_number !=0){
526
+           str_min =  over_count%min_number + min_unit
527
+         }
528
+       return str+str_min
509
       }
529
       }
510
     },
530
     },
511
     created() {
531
     created() {

+ 29 - 28
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue View File

164
             </template>
164
             </template>
165
           </el-table-column>
165
           </el-table-column>
166
 
166
 
167
-          <el-table-column label="生产厂家" width="140" align="center">
168
-            <template slot-scope="scope">
169
-               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
170
-                <el-option
171
-                  v-for="(option, index) in manufacturerList"
172
-                  :key="index"
173
-                  :label="option.manufacturer_name"
174
-                  :value="option.id">
175
-                </el-option>
176
-               </el-select>
177
-            </template>
178
-          </el-table-column>
179
- 
180
-
181
-          <el-table-column label="生产日期" width="180" align="center">
182
-            <template slot-scope="scope">
183
-              <el-date-picker
184
-                prefix-icon="el-icon-date"
185
-                style="width: 145px"
186
-                v-model="scope.row.product_date"
187
-                type="date"
188
-                placeholder="选择日期时间"
189
-                format="yyyy-MM-dd"
190
-                value-format="yyyy-MM-dd"
191
-              ></el-date-picker>
192
-            </template>
193
-          </el-table-column>
194
-          <el-table-column  width="180" align="center">
167
+           <el-table-column  width="180" align="center">
195
              <template slot="header" slot-scope="scope">
168
              <template slot="header" slot-scope="scope">
196
               <span>有效日期<span style="color: red">*</span></span>
169
               <span>有效日期<span style="color: red">*</span></span>
197
             </template>
170
             </template>
212
             </template>
185
             </template>
213
           </el-table-column>
186
           </el-table-column>
214
 
187
 
188
+      
189
+          <el-table-column label="生产日期" width="180" align="center">
190
+            <template slot-scope="scope">
191
+              <el-date-picker
192
+                prefix-icon="el-icon-date"
193
+                style="width: 145px"
194
+                v-model="scope.row.product_date"
195
+                type="date"
196
+                placeholder="选择日期时间"
197
+                format="yyyy-MM-dd"
198
+                value-format="yyyy-MM-dd"
199
+              ></el-date-picker>
200
+            </template>
201
+          </el-table-column>
202
+         
203
+         <el-table-column label="生产厂家" width="140" align="center">
204
+            <template slot-scope="scope">
205
+               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
206
+                <el-option
207
+                  v-for="(option, index) in manufacturerList"
208
+                  :key="index"
209
+                  :label="option.manufacturer_name"
210
+                  :value="option.id">
211
+                </el-option>
212
+               </el-select>
213
+            </template>
214
+          </el-table-column>
215
+ 
215
 
216
 
216
       <el-table-column label="经销商" width="140" align="center">
217
       <el-table-column label="经销商" width="140" align="center">
217
           <template slot-scope="scope">
218
           <template slot-scope="scope">

+ 2 - 0
src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue View File

29
               <td style="line-height:18px;" width="80">批号</td>
29
               <td style="line-height:18px;" width="80">批号</td>
30
               <td style="line-height:18px;" width="120">生产日期</td>
30
               <td style="line-height:18px;" width="120">生产日期</td>
31
               <td style="line-height:18px;" width="120">有效日期</td>
31
               <td style="line-height:18px;" width="120">有效日期</td>
32
+              <td style="line-height:18px;" width="120">入库日期</td>
32
               <td style="line-height:18px;" width="60">质检<br>意见</td>
33
               <td style="line-height:18px;" width="60">质检<br>意见</td>
33
               <td style="line-height:18px;" width="60">验收<br>结论</td>
34
               <td style="line-height:18px;" width="60">验收<br>结论</td>
34
             </tr>
35
             </tr>
57
               <td style="line-height:18px">{{ item.batch_number }}</td>
58
               <td style="line-height:18px">{{ item.batch_number }}</td>
58
               <td style="line-height:18px">{{ getTime(item.product_date,'{y}-{m}-{d}')}}</td>
59
               <td style="line-height:18px">{{ getTime(item.product_date,'{y}-{m}-{d}')}}</td>
59
               <td style="line-height:18px">{{ getTime(item.expiry_date,'{y}-{m}-{d}')}}</td>
60
               <td style="line-height:18px">{{ getTime(item.expiry_date,'{y}-{m}-{d}')}}</td>
61
+              <td style="line-height:18px">{{ getTime(it.ctime,'{y}-{m}-{d}')}}</td>
60
               <td style="line-height:18px">正常<br>入库</td>
62
               <td style="line-height:18px">正常<br>入库</td>
61
               <td style="line-height:18px">合格</td>
63
               <td style="line-height:18px">合格</td>
62
             </tr>
64
             </tr>

+ 34 - 23
src/xt_pages/stock/drugs/drugStockInOrderEdit.vue View File

226
               {{ calculate(scope.row.last_price * scope.row.warehousing_count) }} 
226
               {{ calculate(scope.row.last_price * scope.row.warehousing_count) }} 
227
             </template>
227
             </template>
228
           </el-table-column>
228
           </el-table-column>
229
-         
230
-          <el-table-column label="生产厂家" width="140" align="center">
229
+    
230
+
231
+         <el-table-column  width="180" align="center">
232
+             <template slot="header" slot-scope="scope">
233
+              <span>有效日期<span style="color: red">*</span></span>
234
+            </template>
231
             <template slot-scope="scope">
235
             <template slot-scope="scope">
232
-               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
233
-                <el-option
234
-                  v-for="(option, index) in manufacturerList"
235
-                  :key="index"
236
-                  :label="option.manufacturer_name"
237
-                  :value="option.id">
238
-                </el-option>
239
-               </el-select>
236
+              <el-form-item   :prop="'recordData.' + scope.$index + '.expiry_date'"
237
+                :rules="tableRules.expiry_date"
238
+                style="padding-top: 20px">
239
+                <el-date-picker
240
+                  prefix-icon="el-icon-date"
241
+                  style="width: 145px"
242
+                  v-model="scope.row.expiry_date"
243
+                  type="date"
244
+                  placeholder="选择日期时间"
245
+                  format="yyyy-MM-dd"
246
+                  value-format="yyyy-MM-dd"
247
+                ></el-date-picker>
248
+              </el-form-item>
240
             </template>
249
             </template>
241
           </el-table-column>
250
           </el-table-column>
242
 
251
 
254
             </template>
263
             </template>
255
           </el-table-column>
264
           </el-table-column>
256
 
265
 
257
-
258
-         <el-table-column label="有效日期" width="180" align="center">
266
+             
267
+          <el-table-column label="生产厂家" width="140" align="center">
259
             <template slot-scope="scope">
268
             <template slot-scope="scope">
260
-              <el-date-picker
261
-                prefix-icon="el-icon-date"
262
-                style="width: 145px"
263
-                v-model="scope.row.expiry_date"
264
-                type="date"
265
-                placeholder="选择日期时间"
266
-                format="yyyy-MM-dd"
267
-                value-format="yyyy-MM-dd"
268
-              ></el-date-picker>
269
+               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
270
+                <el-option
271
+                  v-for="(option, index) in manufacturerList"
272
+                  :key="index"
273
+                  :label="option.manufacturer_name"
274
+                  :value="option.id">
275
+                </el-option>
276
+               </el-select>
269
             </template>
277
             </template>
270
           </el-table-column>
278
           </el-table-column>
279
+       
271
 
280
 
272
           <el-table-column label="经销商" width="140" align="center">
281
           <el-table-column label="经销商" width="140" align="center">
273
             <template slot-scope="scope">
282
             <template slot-scope="scope">
399
         warehousing_count: [
408
         warehousing_count: [
400
           { required: true, message: "数量不能为空", trigge: "blur" }
409
           { required: true, message: "数量不能为空", trigge: "blur" }
401
         ],
410
         ],
402
-
403
-        good_id: [{ validator: checkGoodId, trigger: "blur" }]
411
+        good_id: [{ validator: checkGoodId, trigger: "blur" }],
412
+        expiry_date:[
413
+         {required:true,message:'有效日期不能为空',trigger:'blur'}
414
+        ],
404
       },
415
       },
405
 
416
 
406
       total: "",
417
       total: "",

+ 4 - 0
src/xt_pages/stock/drugs/drugStockOutOrder.vue View File

709
       }
709
       }
710
       const ids = [];
710
       const ids = [];
711
       for (let i = 0; i < this.selectedTableData.length; i++) {
711
       for (let i = 0; i < this.selectedTableData.length; i++) {
712
+        if(this.selectedTableData[i].is_sys == 1){
713
+          this.$message.error("自动出库数据不能删除!")
714
+          return false
715
+        }
712
         if(this.selectedTableData[i].is_sys == 0){
716
         if(this.selectedTableData[i].is_sys == 0){
713
           ids.push(this.selectedTableData[i].id);
717
           ids.push(this.selectedTableData[i].id);
714
         }
718
         }

+ 4 - 8
src/xt_pages/stock/drugs/inventory.vue View File

186
             index:"",
186
             index:"",
187
             unitList:[],
187
             unitList:[],
188
             reasonList:[
188
             reasonList:[
189
-              {id:0,name:"默认"},
189
+              {id:6,name:"默认"},
190
               {id:1,name:"到期退货"},
190
               {id:1,name:"到期退货"},
191
               {id:2,name:"异常退货"},
191
               {id:2,name:"异常退货"},
192
               {id:3,name:"退货"},
192
               {id:3,name:"退货"},
293
                    list[i].last_stock_min_number = ""
293
                    list[i].last_stock_min_number = ""
294
                    list[i].min_number = list[i].XtBaseDrug.min_number
294
                    list[i].min_number = list[i].XtBaseDrug.min_number
295
                    list[i].manufacturer_name  = ""
295
                    list[i].manufacturer_name  = ""
296
-                   list[i].type = 0
296
+                   list[i].type = 6
297
                    for(let j=0;j<this.manufacturerList.length;j++){
297
                    for(let j=0;j<this.manufacturerList.length;j++){
298
                      if(list[i].manufacturer == this.manufacturerList[j].id){
298
                      if(list[i].manufacturer == this.manufacturerList[j].id){
299
                         list[i].manufacturer_name = this.manufacturerList[j].manufacturer_name
299
                         list[i].manufacturer_name = this.manufacturerList[j].manufacturer_name
530
            var params = {
530
            var params = {
531
               tableData:this.tableData
531
               tableData:this.tableData
532
            }
532
            }
533
-          //  console.log("parasm222",params)
534
-           
535
           saveDrugInventory(params).then(response=>{
533
           saveDrugInventory(params).then(response=>{
536
             if(response.data.state == 1){
534
             if(response.data.state == 1){
537
               var msg = response.data.data.msg
535
               var msg = response.data.data.msg
550
             start_time:this.start_time,
548
             start_time:this.start_time,
551
             end_time:this.end_time,
549
             end_time:this.end_time,
552
           }
550
           }
553
-          // console.log("params2332332",params)
554
           getDrugInventoryList(params).then(response=>{
551
           getDrugInventoryList(params).then(response=>{
555
 
552
 
556
             if(response.data.state == 1){
553
             if(response.data.state == 1){
557
               this.total =  response.data.data.total
554
               this.total =  response.data.data.total
558
               this.tableList = response.data.data.list
555
               this.tableList = response.data.data.list
559
-              // console.log("09999999",this.tableList)
560
-              // console.log("表格",this.tableList)
556
+             
561
               this.doctorList =  response.data.data.doctorList
557
               this.doctorList =  response.data.data.doctorList
562
-              // console.log("医生",this.doctorList)
558
+              
563
 
559
 
564
             }
560
             }
565
           })
561
           })

+ 2 - 2
src/xt_pages/stock/drugs/inventoryDetails.vue View File

139
               page:this.page,
139
               page:this.page,
140
               keyword:this.searchKey,
140
               keyword:this.searchKey,
141
             }
141
             }
142
-           console.log("parasm232332323",params)
142
+        
143
           getInventoryDetailList(params).then(response=>{
143
           getInventoryDetailList(params).then(response=>{
144
              if(response.data.state == 1){
144
              if(response.data.state == 1){
145
               this.total =  response.data.data.total
145
               this.total =  response.data.data.total
150
           })   
150
           })   
151
         },
151
         },
152
          getTime(val) {
152
          getTime(val) {
153
-          console.log("val3233232322323",val)
153
+         
154
          if(val == undefined){
154
          if(val == undefined){
155
            return  ""
155
            return  ""
156
          }
156
          }

+ 13 - 12
src/xt_pages/stock/drugs/query.vue View File

112
         </el-table-column>
112
         </el-table-column>
113
         <el-table-column prop="drug_name" label="出库数量" align="center">
113
         <el-table-column prop="drug_name" label="出库数量" align="center">
114
            <template slot-scope="scope">
114
            <template slot-scope="scope">
115
-             <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10138 || org_id ==10028 || org_id == 10243 || org_id == 10088 || org_id == 10245">
115
+             <!-- <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10138 || org_id ==10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919">
116
                 <span>
116
                 <span>
117
                  {{getOutFlush(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,scope.row.drug_cancel_stock_info)}}
117
                  {{getOutFlush(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,scope.row.drug_cancel_stock_info)}}
118
                 </span>
118
                 </span>
119
              </span>
119
              </span>
120
-             <span v-else>{{getOutCount(scope.row.id)+getAutoCount(scope.row.id)}}{{scope.row.max_unit}}</span>
120
+             <span v-else>{{getOutCount(scope.row.id)+getAutoCount(scope.row.id)}}{{scope.row.max_unit}}</span> -->
121
+              <span>
122
+                 {{getOutFlush(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,scope.row.drug_cancel_stock_info)}}
123
+              </span>
121
            </template>
124
            </template>
122
         </el-table-column>
125
         </el-table-column>
123
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
126
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
124
            <template slot-scope="scope">
127
            <template slot-scope="scope">
125
             <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">
128
             <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">
126
-               <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10138 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245">
129
+               <!-- <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10138 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919">
127
                 {{ getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)?getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number):0}}
130
                 {{ getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)?getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number):0}}
128
                </span>
131
                </span>
129
 
132
 
130
-               <span v-else>{{getWarehoseInfo(scope.row.drug_warehouse_info) - getOutCount(scope.row.id) - getAutoCount(scope.row.id)}}{{scope.row.max_unit}} </span>
133
+               <span v-else>{{getWarehoseInfo(scope.row.drug_warehouse_info) - getOutCount(scope.row.id) - getAutoCount(scope.row.id)}}{{scope.row.max_unit}} </span> -->
134
+                {{ getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)?getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number):0}}
131
             </div>
135
             </div>
132
            </template>
136
            </template>
133
         </el-table-column>
137
         </el-table-column>
198
       this.drugTypeList.push(...drugTypeList)
202
       this.drugTypeList.push(...drugTypeList)
199
       this.org_id =  this.$store.getters.xt_user.org.id
203
       this.org_id =  this.$store.getters.xt_user.org.id
200
       console.log("机构ID",this.org_id)
204
       console.log("机构ID",this.org_id)
201
-      this.getDrugCountList()
205
+      // this.getDrugCountList()
202
 
206
 
203
 
207
 
204
     },
208
     },
363
       handleSizeChange(val) {
367
       handleSizeChange(val) {
364
         this.limit = val
368
         this.limit = val
365
         this.getlist()
369
         this.getlist()
366
-        this.getDrugCountList()
367
       },
370
       },
368
       handleCurrentChange(val) {
371
       handleCurrentChange(val) {
369
         this.page = val
372
         this.page = val
370
         this.getlist()
373
         this.getlist()
371
-        this.getDrugCountList()
372
       },
374
       },
373
       calculate: function(val) {
375
       calculate: function(val) {
374
         return Math.round(parseFloat(val) * 100) / 100
376
         return Math.round(parseFloat(val) * 100) / 100
429
       },
431
       },
430
       search: function() {
432
       search: function() {
431
         this.getlist()
433
         this.getlist()
432
-        this.getDrugCountList()
433
       },
434
       },
434
       setting: function() {
435
       setting: function() {
435
         this.$refs.dialog.show()
436
         this.$refs.dialog.show()
441
            this.tableList[i].drug_type_name = this.getDrugType(this.tableList[i].drug_type)
442
            this.tableList[i].drug_type_name = this.getDrugType(this.tableList[i].drug_type)
442
            this.tableList[i].unit = this.tableList[i].dose + this.tableList[i].dose_unit +"*"+this.tableList[i].min_number+this.tableList[i].min_unit+"/"+this.tableList[i].max_unit
443
            this.tableList[i].unit = this.tableList[i].dose + this.tableList[i].dose_unit +"*"+this.tableList[i].min_number+this.tableList[i].min_unit+"/"+this.tableList[i].max_unit
443
            this.tableList[i].manufacturer_name = this.getManufacturerList(this.tableList[i].manufacturer)
444
            this.tableList[i].manufacturer_name = this.getManufacturerList(this.tableList[i].manufacturer)
444
-
445
+        
445
           this.tableList[i].inCount =  this.getWarehoseInfo(this.tableList[i].drug_warehouse_info)
446
           this.tableList[i].inCount =  this.getWarehoseInfo(this.tableList[i].drug_warehouse_info)
446
           this.tableList[i].outCount = this.getWarehouseOutInfo(this.tableList[i].drug_warehouse_out,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
447
           this.tableList[i].outCount = this.getWarehouseOutInfo(this.tableList[i].drug_warehouse_out,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
447
           this.tableList[i].overplusCount =  this.getOverFlushInfo(this.tableList[i].drug_warehouse_info,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
448
           this.tableList[i].overplusCount =  this.getOverFlushInfo(this.tableList[i].drug_warehouse_info,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
804
         for(let i=0;i<info.length;i++){
805
         for(let i=0;i<info.length;i++){
805
            total += (info[i].warehousing_count * min_number)
806
            total += (info[i].warehousing_count * min_number)
806
         }
807
         }
807
-        console.log("total232323232332323223",total)
808
+        
808
         for(let j=0;j<info.length;j++){
809
         for(let j=0;j<info.length;j++){
809
            out_count += (info[j].stock_max_number + info[j].stock_min_number)
810
            out_count += (info[j].stock_max_number + info[j].stock_min_number)
810
         }
811
         }
811
-        console.log("剩余库存",out_count)
812
+       
812
         for(let z=0;z<cancel_info.length;z++){
813
         for(let z=0;z<cancel_info.length;z++){
813
            cancel_count += cancel_info[z].count
814
            cancel_count += cancel_info[z].count
814
         }
815
         }
815
         over_count = total - out_count + cancel_count
816
         over_count = total - out_count + cancel_count
816
-        console.log("hh233223232322323232323322332",over_count)
817
+    
817
         if(parseInt(over_count/min_number)!=0){
818
         if(parseInt(over_count/min_number)!=0){
818
             str = parseInt(over_count/min_number)+ max_unit
819
             str = parseInt(over_count/min_number)+ max_unit
819
          }
820
          }

+ 3 - 3
src/xt_pages/stock/inventory.vue View File

181
          id:0,
181
          id:0,
182
          numberList:[],
182
          numberList:[],
183
          reasonList:[
183
          reasonList:[
184
-          {id:0,name:"默认"},
184
+          {id:6,name:"默认"},
185
           {id:1,name:"到期退货"},
185
           {id:1,name:"到期退货"},
186
           {id:2,name:"异常退货"},
186
           {id:2,name:"异常退货"},
187
           {id:3,name:"退货"},
187
           {id:3,name:"退货"},
420
          if(response.data.state == 1){
420
          if(response.data.state == 1){
421
            var list = response.data.data.list
421
            var list = response.data.data.list
422
            for(let i=0;i<list.length;i++){
422
            for(let i=0;i<list.length;i++){
423
-              list[i].type = 0
423
+              list[i].type = 6
424
               list[i].good_name = list[i].GoodInfo.good_name
424
               list[i].good_name = list[i].GoodInfo.good_name
425
               list[i].specification_name = list[i].GoodInfo.specification_name
425
               list[i].specification_name = list[i].GoodInfo.specification_name
426
               for(let j=0;j<this.manufacturerList.length;j++){
426
               for(let j=0;j<this.manufacturerList.length;j++){
549
         if(response.data.state == 1){
549
         if(response.data.state == 1){
550
            var inventory = response.data.data.inventory
550
            var inventory = response.data.data.inventory
551
            this.$message.success("保存成功")
551
            this.$message.success("保存成功")
552
-           
552
+           this.WarehouseList = []
553
            this.tableData = []
553
            this.tableData = []
554
         }
554
         }
555
       })
555
       })

+ 10 - 3
src/xt_pages/stock/inventoryDetails.vue View File

16
                 icon="el-icon-search"
16
                 icon="el-icon-search"
17
                 @click="search">搜索</el-button>
17
                 @click="search">搜索</el-button>
18
             </div>
18
             </div>
19
+            <div>
20
+              <el-button type="primary" @click="inventoryExportList">盘点模版打印</el-button>
21
+            </div>
19
             <!-- <div>
22
             <!-- <div>
20
                 <el-button size="small" type="primary" @click="print">打印</el-button>
23
                 <el-button size="small" type="primary" @click="print">打印</el-button>
21
                 <el-button size="small" type="primary" @click="exportList">导出</el-button>
24
                 <el-button size="small" type="primary" @click="exportList">导出</el-button>
53
            
56
            
54
             <el-table-column prop="name" label="盘盈类型"  width="100" align="center">
57
             <el-table-column prop="name" label="盘盈类型"  width="100" align="center">
55
                 <template slot-scope="scope">
58
                 <template slot-scope="scope">
56
-                   <span v-if="scope.row.count > scope.row.last_stock_count">盘盈</span>
57
-                   <span v-if="scope.row.count < scope.row.last_stock_count">盘亏</span>
59
+                   <span v-if="scope.row.stock_count > scope.row.last_stock_count">盘亏</span>
60
+                   <span v-if="scope.row.stock_count < scope.row.last_stock_count">盘盈</span>
58
                 </template>
61
                 </template>
59
             </el-table-column>
62
             </el-table-column>
60
            
63
            
61
             <el-table-column prop="name" label="盘点原因" width="230" align="center">
64
             <el-table-column prop="name" label="盘点原因" width="230" align="center">
62
               <template slot-scope="scope">
65
               <template slot-scope="scope">
63
-                <span v-if="scope.row.inventory_type ==0">默认</span>
66
+                <span v-if="scope.row.inventory_type ==6">默认</span>
64
                 <span v-if="scope.row.inventory_type ==1">到期退货</span>
67
                 <span v-if="scope.row.inventory_type ==1">到期退货</span>
65
                 <span v-if="scope.row.inventory_type ==2">异常退货</span>
68
                 <span v-if="scope.row.inventory_type ==2">异常退货</span>
66
                 <span v-if="scope.row.inventory_type ==3">退货</span>
69
                 <span v-if="scope.row.inventory_type ==3">退货</span>
87
 <script>
90
 <script>
88
 import { uParseTime } from '@/utils/tools'
91
 import { uParseTime } from '@/utils/tools'
89
 import { getInventoryDetailList } from "@/api/stock"
92
 import { getInventoryDetailList } from "@/api/stock"
93
+
90
 export default {
94
 export default {
91
     name: "inventory",
95
     name: "inventory",
92
     data() {
96
     data() {
182
             return uParseTime(val, '{y}-{m}-{d}')
186
             return uParseTime(val, '{y}-{m}-{d}')
183
          }
187
          }
184
        },
188
        },
189
+      inventoryExportList(){
190
+        this.$router.push({path:'/stock/inventoryPrint'})
191
+      }
185
     },
192
     },
186
     created(){
193
     created(){
187
       this.getlist()
194
       this.getlist()

+ 36 - 37
src/xt_pages/stock/inventoryPrint.vue View File

10
         </div>
10
         </div>
11
         <div class="app-container" style="background-color: white;">
11
         <div class="app-container" style="background-color: white;">
12
             <div id="print_content">
12
             <div id="print_content">
13
-                <div class="printTitle">库存盘点核单数</div>
14
-                <div style="float:right;">调价日期:{{getTime(this.tableData[0].start_time)}}</div>
13
+              
15
                 <table class="printTable" border="1">
14
                 <table class="printTable" border="1">
16
                     <tr>
15
                     <tr>
17
                         <td>序号</td>
16
                         <td>序号</td>
18
-                        <td>耗材名称</td>
17
+                        <td>名称</td>
19
                         <td>规格</td>
18
                         <td>规格</td>
19
+                        <td>批号</td>
20
+                        <td>生产日期</td>
21
+                        <td>有效日期</td>
22
+                        <td>生产企业</td>
23
+                        <td>国药准字</td>
20
                         <td>单位</td>
24
                         <td>单位</td>
21
-                        <td>零售价</td>
22
-                        <td>当前库存</td>
23
-                        <td>盘点数</td>
24
-                        <td>亏损金额</td>
25
+                        <td>库存量</td>
25
                     </tr>
26
                     </tr>
26
                     <tr v-for="(item,index) in tableData" :key="index">
27
                     <tr v-for="(item,index) in tableData" :key="index">
27
                         <td>{{index+1}}</td>
28
                         <td>{{index+1}}</td>
28
                         <td>{{item.good_name}}</td>
29
                         <td>{{item.good_name}}</td>
29
                         <td>{{item.specification_name}}</td>
30
                         <td>{{item.specification_name}}</td>
31
+                        <td>{{item.number}}</td>
32
+                        <td>{{getTime(item.product_date)}}</td>
33
+                        <td>{{getTime(item.expiry_date)}}</td>
34
+                        <td>{{getManufacturerName(item.manufacturer)}}</td>
35
+                        <td>{{item.remark}}</td>
30
                         <td>{{item.warehousing_unit}}</td>
36
                         <td>{{item.warehousing_unit}}</td>
31
-                        <td>{{item.packing_price}}</td>
32
-                        <td></td>
33
-                        <td>{{item.count}}</td>
34
                         <td></td>
37
                         <td></td>
35
                     </tr>
38
                     </tr>
36
                 </table>
39
                 </table>
37
-                <div style="margin-top:10px;">
38
-                    <span>合计:库存金额</span>
39
-                    <span>    库存盘点金额:亏损总计</span>
40
-                </div>
41
-                <div style="display:flex;float:right;margin-top:10px;border-top:1px solid #000;padding-top:10px;width:100%;">
42
-                    <div style="width:80px;">审批:</div><div style="width:100px;"></div>
43
-                    <div style="width:100px;">药材主任:</div><div style="width:60px;"></div>
44
-                    <div style="width:50px;">会计:</div><div style="width:100px;"></div>
45
-                    <div style="width:50px;">审核:</div><div style="width:100px;"></div>
46
-                    <div style="width:70px;">制单人:</div><div style="width:100px;"></div>
47
-                </div>
40
+               
48
             </div>
41
             </div>
49
         </div>
42
         </div>
50
     </div>
43
     </div>
54
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
47
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
55
 const moment = require('moment');
48
 const moment = require('moment');
56
 import { uParseTime } from '@/utils/tools'
49
 import { uParseTime } from '@/utils/tools'
57
-import { getInventoryPrintList } from "@/api/stock"
50
+import { getInventoryExportList } from "@/api/stock"
58
 export default {
51
 export default {
59
     components:{
52
     components:{
60
         BreadCrumb
53
         BreadCrumb
68
           ],
61
           ],
69
           ids:"",
62
           ids:"",
70
           tableData:[],
63
           tableData:[],
64
+          manufacturerList:[],
71
         }
65
         }
72
     },
66
     },
73
     methods:{
67
     methods:{
81
             scanStyles: false
75
             scanStyles: false
82
             })
76
             })
83
         },
77
         },
84
-        
85
-        getInventoryPrintList(){
86
-            var params = {
87
-                ids:this.ids,
88
-            }
89
-         getInventoryPrintList(params).then(response=>{
90
-           if(response.data.state == 1){
91
-             var list = response.data.data.list
92
-             this.tableData = list
93
-           }
94
-         })
95
-        },
96
         getTime(val) {
78
         getTime(val) {
97
          if(val < 0){
79
          if(val < 0){
98
             return ""
80
             return ""
103
             return uParseTime(val, '{y}-{m}-{d}')
85
             return uParseTime(val, '{y}-{m}-{d}')
104
          }
86
          }
105
         },
87
         },
106
-
88
+        getlist(){
89
+         getInventoryExportList().then(response=>{
90
+           if(response.data.state == 1){
91
+             var list =  response.data.data.list
92
+             console.log("list233233232323",list)
93
+             this.tableData = list
94
+             this.manufacturerList = response.data.data.manufacturerList
95
+           }
96
+         })
97
+        },
98
+        getManufacturerName(id){
99
+           var name = ""
100
+           for(let i=0;i<this.manufacturerList.length;i++){
101
+              if(id == this.manufacturerList[i].id){
102
+                  name = this.manufacturerList[i].manufacturer_name
103
+              }
104
+           }
105
+           return name
106
+        }
107
     },
107
     },
108
     created(){
108
     created(){
109
-      this.ids  = this.$route.query.ids
110
-      this.getInventoryPrintList()
109
+      this.getlist()
111
     }
110
     }
112
 }
111
 }
113
 </script>
112
 </script>

+ 17 - 19
src/xt_pages/stock/stockDamaged.vue View File

348
 
348
 
349
               <el-table-column prop="address" label="盘点原因" align="center">
349
               <el-table-column prop="address" label="盘点原因" align="center">
350
                 <template slot-scope="scope">
350
                 <template slot-scope="scope">
351
-                  <span v-if="scope.row.inventory_type == 0">默认</span> 
351
+                  <span v-if="scope.row.inventory_type == 6">默认</span> 
352
                   <span v-if="scope.row.inventory_type == 1">到期退货</span> 
352
                   <span v-if="scope.row.inventory_type == 1">到期退货</span> 
353
                   <span v-if="scope.row.inventory_type == 2">异常退货</span> 
353
                   <span v-if="scope.row.inventory_type == 2">异常退货</span> 
354
                   <span v-if="scope.row.inventory_type == 3">退货</span> 
354
                   <span v-if="scope.row.inventory_type == 3">退货</span> 
433
             damageList:[],
433
             damageList:[],
434
             modifyDialogVisible:false,
434
             modifyDialogVisible:false,
435
             reasonList:[
435
             reasonList:[
436
-              {id:0,name:"默认"},
436
+              {id:6,name:"默认"},
437
               {id:1,name:"到期退货"},
437
               {id:1,name:"到期退货"},
438
               {id:2,name:"异常退货"},
438
               {id:2,name:"异常退货"},
439
               {id:3,name:"退货"},
439
               {id:3,name:"退货"},
479
         if (response.data.state == 1) {
479
         if (response.data.state == 1) {
480
         
480
         
481
             var list = response.data.data.list
481
             var list = response.data.data.list
482
-            console.log("列表数据",list)
482
+           
483
             this.goodList = list
483
             this.goodList = list
484
             var manufacturerList = response.data.data.manufacturerList
484
             var manufacturerList = response.data.data.manufacturerList
485
             this.manufacturerList = manufacturerList
485
             this.manufacturerList = manufacturerList
584
               this.tableData[i].dealer = ""   
584
               this.tableData[i].dealer = ""   
585
            }
585
            }
586
          }
586
          }
587
-         console.log("比阿哥",this.tableData)
588
-         console.log("numberlist",this.numberList)
587
+
589
          for(let i=0;i<this.tableData.length;i++){
588
          for(let i=0;i<this.tableData.length;i++){
590
            this.tableData[i].count =  parseInt(this.tableData[i].count)
589
            this.tableData[i].count =  parseInt(this.tableData[i].count)
591
            this.tableData[i].expiry_date = parseInt(this.tableData[i].expiry_date)
590
            this.tableData[i].expiry_date = parseInt(this.tableData[i].expiry_date)
601
           var params = {
600
           var params = {
602
             tableData:this.tableData,
601
             tableData:this.tableData,
603
           }
602
           }
604
-          console.log("params",params)
605
-       
603
+        
606
         saveReportStock(params).then(response=>{
604
         saveReportStock(params).then(response=>{
607
            if(response.data.state == 1){
605
            if(response.data.state == 1){
608
              var msg = response.data.data.msg
606
              var msg = response.data.data.msg
644
           limit:this.limit,
642
           limit:this.limit,
645
           page:this.page,
643
           page:this.page,
646
          }
644
          }
647
-         console.log("param23223232322323",params)
648
        getReportStockList(params).then(response=>{
645
        getReportStockList(params).then(response=>{
649
           if(response.data.state == 1){
646
           if(response.data.state == 1){
650
             var list = response.data.data.list
647
             var list = response.data.data.list
651
-            console.log("list",list)
648
+     
652
             this.total = response.data.data.total
649
             this.total = response.data.data.total
653
             this.tableList = list
650
             this.tableList = list
654
            var doctorlist = response.data.data.doctorlist
651
            var doctorlist = response.data.data.doctorlist
655
            this.doctorList = doctorlist
652
            this.doctorList = doctorlist
656
            var damageList =  response.data.data.damageList
653
            var damageList =  response.data.data.damageList
657
-           console.log("datamagelist",damageList)
654
+          
658
           this.damageList = damageList
655
           this.damageList = damageList
659
           }
656
           }
660
        })   
657
        })   
697
       getStockBatchNumber(params).then(response=>{
694
       getStockBatchNumber(params).then(response=>{
698
         if(response.data.state == 1){
695
         if(response.data.state == 1){
699
           var list = response.data.data.list
696
           var list = response.data.data.list
700
-          console.log("批号列表",list)
697
+         
701
           this.numberList = list
698
           this.numberList = list
702
         }
699
         }
703
       })
700
       })
710
          if(response.data.state == 1){
707
          if(response.data.state == 1){
711
            var list = response.data.data.list
708
            var list = response.data.data.list
712
            this.form.total =  list.stock_count
709
            this.form.total =  list.stock_count
713
-           console.log("list23232",list)
710
+          
714
          }
711
          }
715
       })
712
       })
716
      },
713
      },
723
        this.getlist()
720
        this.getlist()
724
      },
721
      },
725
      chageNumberlist(val){
722
      chageNumberlist(val){
726
-       console.log("val2323322",val)
727
-       
723
+      
728
        for(let i=0;i<this.numberList.length;i++){
724
        for(let i=0;i<this.numberList.length;i++){
729
          if(this.numberList[i].number == val){
725
          if(this.numberList[i].number == val){
730
             this.form.warehousing_info_id = this.numberList[i].id
726
             this.form.warehousing_info_id = this.numberList[i].id
739
         getWarehouseTotal(params).then(response=>{
735
         getWarehouseTotal(params).then(response=>{
740
           if(response.data.state == 1){
736
           if(response.data.state == 1){
741
             var list =  response.data.data.list
737
             var list =  response.data.data.list
742
-            console.log("档期批次库促",list)
738
+        
743
             this.form.total = list.stock_count
739
             this.form.total = list.stock_count
744
           }
740
           }
745
         })
741
         })
753
         }
749
         }
754
         return count
750
         return count
755
       },
751
       },
756
-      changeReason(){
757
-
752
+      changeReason(val){
753
+        this.form.type = val
754
+        this.toDamagedDetail(this.good_id)
758
       },
755
       },
759
       toDamagedDetail(good_id){
756
       toDamagedDetail(good_id){
757
+         this.good_id = good_id
760
           var params = {
758
           var params = {
761
             good_id:good_id,
759
             good_id:good_id,
762
             warehousing_order:this.form.warehousing_order,
760
             warehousing_order:this.form.warehousing_order,
763
             type:this.form.type,
761
             type:this.form.type,
764
           }
762
           }
765
-          console.log("para2233232",params)
763
+    
766
          getDamageDetailByGoodId(params).then(response=>{
764
          getDamageDetailByGoodId(params).then(response=>{
767
             if(response.data.state == 1){
765
             if(response.data.state == 1){
768
               var list = response.data.data.list
766
               var list = response.data.data.list
769
-              console.log("list233232",list)
767
+             
770
               if (list.length>0){
768
               if (list.length>0){
771
                 this.modifyDialogVisible = true
769
                 this.modifyDialogVisible = true
772
                 this.good_name = list[0].good_name
770
                 this.good_name = list[0].good_name

+ 24 - 23
src/xt_pages/stock/stockInOrderAdd.vue View File

128
               {{calculate(scope.row.price*scope.row.warehousing_count)}}
128
               {{calculate(scope.row.price*scope.row.warehousing_count)}}
129
             </template>
129
             </template>
130
           </el-table-column>
130
           </el-table-column>
131
-          
132
-          <el-table-column label="生产厂家" align="center" width="150">
133
-             <template slot-scope="scope">
134
-               <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
135
-                <el-option
136
-                  v-for="(option, index) in manufacturerList"
137
-                  :key="index"
138
-                  :label="option.manufacturer_name"
139
-                  :value="option.id">
140
-                </el-option>
141
-               </el-select>
142
-            </template>
143
-          </el-table-column>
144
-        
145
-          <el-table-column label="生产日期" align="center" width="180">
146
-            <template slot-scope="scope">
147
-              <el-date-picker prefix-icon="el-icon-date" v-model="scope.row.product_date" style="width: 145px"
148
-                              type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
149
-                              value-format="yyyy-MM-dd">
150
-              </el-date-picker>
151
-
152
-            </template>
153
-          </el-table-column>
154
           <el-table-column  align="center" width="180">
131
           <el-table-column  align="center" width="180">
155
             <template slot="header" slot-scope="scope">
132
             <template slot="header" slot-scope="scope">
156
               <span>有效日期<span style="color: red">*</span></span>
133
               <span>有效日期<span style="color: red">*</span></span>
165
              </el-form-item>
142
              </el-form-item>
166
             </template>
143
             </template>
167
           </el-table-column>
144
           </el-table-column>
145
+        
146
+        
147
+          <el-table-column label="生产日期" align="center" width="180">
148
+            <template slot-scope="scope">
149
+              <el-date-picker prefix-icon="el-icon-date" v-model="scope.row.product_date" style="width: 145px"
150
+                              type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
151
+                              value-format="yyyy-MM-dd">
152
+              </el-date-picker>
153
+
154
+            </template>
155
+          </el-table-column>
156
+       
157
+         <el-table-column label="生产厂家" align="center" width="150">
158
+             <template slot-scope="scope">
159
+               <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
160
+                <el-option
161
+                  v-for="(option, index) in manufacturerList"
162
+                  :key="index"
163
+                  :label="option.manufacturer_name"
164
+                  :value="option.id">
165
+                </el-option>
166
+               </el-select>
167
+            </template>
168
+          </el-table-column>
168
 
169
 
169
          <el-table-column align="center" width="150">
170
          <el-table-column align="center" width="150">
170
             <template slot="header" slot-scope="scope">
171
             <template slot="header" slot-scope="scope">

+ 2 - 0
src/xt_pages/stock/stockInOrderDetailPrint.vue View File

39
                                     <td style="line-height:18px;" width="80">批号</td>
39
                                     <td style="line-height:18px;" width="80">批号</td>
40
                                     <td style="line-height:18px;" width="120">生产日期</td>
40
                                     <td style="line-height:18px;" width="120">生产日期</td>
41
                                     <td style="line-height:18px;" width="120">有效日期</td>
41
                                     <td style="line-height:18px;" width="120">有效日期</td>
42
+                                    <td style="line-height:18px;" width="120">入库日期</td>
42
                                     <td style="line-height:18px;" width="60">质检<br>意见</td>
43
                                     <td style="line-height:18px;" width="60">质检<br>意见</td>
43
                                     <td style="line-height:18px;" width="60">验收<br>结论</td>
44
                                     <td style="line-height:18px;" width="60">验收<br>结论</td>
44
                                 </tr>
45
                                 </tr>
56
                                     <td style="line-height:18px;">{{ item.number }}</td>
57
                                     <td style="line-height:18px;">{{ item.number }}</td>
57
                                     <td style="line-height:18px;">{{ getTime(item.product_date) }}</td>
58
                                     <td style="line-height:18px;">{{ getTime(item.product_date) }}</td>
58
                                     <td style="line-height:18px;">{{ getTime(item.expiry_date) }}</td>
59
                                     <td style="line-height:18px;">{{ getTime(item.expiry_date) }}</td>
60
+                                    <td style="line-height:18px;">{{ getTime(item.ctime) }}</td>
59
                                     <td style="line-height:18px;">正常<br>入库</td>
61
                                     <td style="line-height:18px;">正常<br>入库</td>
60
                                     <td style="line-height:18px;">合格</td>
62
                                     <td style="line-height:18px;">合格</td>
61
                                 </tr>
63
                                 </tr>

+ 37 - 29
src/xt_pages/stock/stockInOrderEdit.vue View File

212
               {{ calculate(scope.row.price * scope.row.warehousing_count) }}
212
               {{ calculate(scope.row.price * scope.row.warehousing_count) }}
213
             </template>
213
             </template>
214
           </el-table-column>
214
           </el-table-column>
215
-          <el-table-column label="生产厂家" align="center" width="150">
215
+
216
+         <el-table-column  align="center" width="180">
217
+            <template slot="header" slot-scope="scope">
218
+              <span>有效日期<span style="color: red">*</span></span>
219
+            </template>
220
+            <template slot-scope="scope">
221
+              <el-form-item  :prop="'recordData.' + scope.$index + '.expiry_date'"
222
+                :rules="tableRules.expiry_date">
223
+                <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.expiry_date"
224
+                                type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
225
+                                value-format="yyyy-MM-dd">
226
+                </el-date-picker>
227
+             </el-form-item>
228
+            </template>
229
+          </el-table-column>
230
+         
231
+
232
+          <el-table-column label="生产日期" width="180" align="center">
233
+            <template slot-scope="scope">
234
+              <el-date-picker
235
+                prefix-icon="el-icon-date"
236
+                style="width: 145px"
237
+                v-model="scope.row.product_date"
238
+                type="date"
239
+                placeholder="选择日期时间"
240
+                format="yyyy-MM-dd"
241
+                value-format="yyyy-MM-dd"
242
+              ></el-date-picker>
243
+            </template>
244
+          </el-table-column>
245
+
246
+           <el-table-column label="生产厂家" align="center" width="150">
216
              <template slot-scope="scope">
247
              <template slot-scope="scope">
217
                <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
248
                <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
218
                 <el-option
249
                 <el-option
238
               </el-form-item>
269
               </el-form-item>
239
             </template>
270
             </template>
240
           </el-table-column>
271
           </el-table-column>
241
-
242
-          <el-table-column label="生产日期" width="180" align="center">
243
-            <template slot-scope="scope">
244
-              <el-date-picker
245
-                prefix-icon="el-icon-date"
246
-                style="width: 145px"
247
-                v-model="scope.row.product_date"
248
-                type="date"
249
-                placeholder="选择日期时间"
250
-                format="yyyy-MM-dd"
251
-                value-format="yyyy-MM-dd"
252
-              ></el-date-picker>
253
-            </template>
254
-          </el-table-column>
255
-          <el-table-column label="有效日期" width="180" align="center">
256
-            <template slot-scope="scope">
257
-              <el-date-picker
258
-                prefix-icon="el-icon-date"
259
-                style="width: 145px"
260
-                v-model="scope.row.expiry_date"
261
-                type="date"
262
-                placeholder="选择日期时间"
263
-                format="yyyy-MM-dd"
264
-                value-format="yyyy-MM-dd"
265
-              ></el-date-picker>
266
-            </template>
267
-          </el-table-column>
272
+        
268
            <el-table-column align="center" width="150">
273
            <el-table-column align="center" width="150">
269
             <template slot="header" slot-scope="scope">
274
             <template slot="header" slot-scope="scope">
270
               <span>批准文号</span>
275
               <span>批准文号</span>
394
           { required: true, message: "数量不能为空", trigge: "blur" }
399
           { required: true, message: "数量不能为空", trigge: "blur" }
395
         ],
400
         ],
396
 
401
 
397
-        good_id: [{ validator: checkGoodId, trigger: "blur" }]
402
+        good_id: [{ validator: checkGoodId, trigger: "blur" }],
403
+        expiry_date:[
404
+         { required: true, message: '有效日期不能为空', trigge: 'blur' }
405
+        ],
398
       },
406
       },
399
 
407
 
400
       total: "",
408
       total: "",

+ 4 - 0
src/xt_pages/stock/stockOutOrder.vue View File

1012
       }
1012
       }
1013
       const ids = [];
1013
       const ids = [];
1014
       for (let i = 0; i < this.selectedTableData.length; i++) {
1014
       for (let i = 0; i < this.selectedTableData.length; i++) {
1015
+        if(this.selectedTableData[i].is_sys == 1){
1016
+          this.$message.error("自动出库数据不能删除!")
1017
+          return false
1018
+        }
1015
          if(this.selectedTableData[i].is_sys == 0){
1019
          if(this.selectedTableData[i].is_sys == 0){
1016
            ids.push(this.selectedTableData[i].id);
1020
            ids.push(this.selectedTableData[i].id);
1017
          }
1021
          }

+ 2 - 19
src/xt_pages/stock/stockOutOrderAdd.vue View File

118
             </template>
118
             </template>
119
           </el-table-column>
119
           </el-table-column>
120
           
120
           
121
-          <!-- <el-table-column  width="150" align="center">
122
-             <template slot="header" slot-scope="scope">
123
-              <span>批号<span style="color: red">*</span></span>
124
-            </template>
125
-            <template slot-scope="scope">
126
-              <el-form-item  
127
-                :rules="tableRules.number">
128
-                <el-select v-model="scope.row.number" filterable placeholder="请选择" @change="changeNumberList(scope.row,scope.$index)">
129
-                  <el-option
130
-                    v-for="(item,index) in numberList"
131
-                    :key="index"
132
-                    :label="item.number"
133
-                    :value="item.id">
134
-                  </el-option>
135
-                </el-select>
136
-              </el-form-item>
137
-            </template>
138
-          </el-table-column> -->
121
+      
139
 
122
 
140
          <el-table-column  width="150" align="center">
123
          <el-table-column  width="150" align="center">
141
             <template slot="header" slot-scope="scope">
124
             <template slot="header" slot-scope="scope">
463
       tempObj["product_date"] = ""
446
       tempObj["product_date"] = ""
464
       tempObj["license_number"] = ""
447
       tempObj["license_number"] = ""
465
       tempObj["warehouse_info_id"] = 0
448
       tempObj["warehouse_info_id"] = 0
466
-     
467
       this.recordInfo.recordData.push(tempObj);
449
       this.recordInfo.recordData.push(tempObj);
468
     },
450
     },
469
     handleDelete: function(index, row) {
451
     handleDelete: function(index, row) {
784
     tempObj["dealer"] = ""
766
     tempObj["dealer"] = ""
785
     tempObj["license_number"] = ""
767
     tempObj["license_number"] = ""
786
     tempObj["warehouse_info_id"] = 0
768
     tempObj["warehouse_info_id"] = 0
769
+    
787
     this.recordInfo.recordData.push(tempObj);
770
     this.recordInfo.recordData.push(tempObj);
788
     this.GetConfigInfo();
771
     this.GetConfigInfo();
789
     this.propForm.goodUnit = this.$store.getters.good_unit;
772
     this.propForm.goodUnit = this.$store.getters.good_unit;

+ 6 - 6
src/xt_pages/stock/stockOutOrderDetailPrint.vue View File

222
             return false
222
             return false
223
           } else {
223
           } else {
224
             this.list = [];
224
             this.list = [];
225
-        
225
+
226
             for (let i = 0; i < response.data.data.list.length; i++) {
226
             for (let i = 0; i < response.data.data.list.length; i++) {
227
 
227
 
228
-              
228
+
229
               this.list.push(response.data.data.list[i])
229
               this.list.push(response.data.data.list[i])
230
             }
230
             }
231
-          
231
+
232
           }
232
           }
233
         })
233
         })
234
       },
234
       },
256
          for(let i=0;i<this.orderList.length;i++){
256
          for(let i=0;i<this.orderList.length;i++){
257
           if(this.orderList[i].warehouse_out_id == warehouse_out_id && this.orderList[i].good_id == good_id){
257
           if(this.orderList[i].warehouse_out_id == warehouse_out_id && this.orderList[i].good_id == good_id){
258
              count += this.orderList[i].count
258
              count += this.orderList[i].count
259
-          } 
259
+          }
260
          }
260
          }
261
          return count
261
          return count
262
       },
262
       },
308
           return uParseTime(val, '{y}-{m}-{d}')
308
           return uParseTime(val, '{y}-{m}-{d}')
309
          }
309
          }
310
       },
310
       },
311
-     
311
+
312
       GetOrderDetailOne(id){
312
       GetOrderDetailOne(id){
313
         const params = {
313
         const params = {
314
           'id': id
314
           'id': id
334
         })
334
         })
335
      },
335
      },
336
      getAllPice(id){
336
      getAllPice(id){
337
-        var  total_price = 0 
337
+        var  total_price = 0
338
         for(let i=0;i<this.orderList.length;i++){
338
         for(let i=0;i<this.orderList.length;i++){
339
           if(id == this.orderList[i].warehouse_out_id){
339
           if(id == this.orderList[i].warehouse_out_id){
340
              total_price += this.orderList[i].count * this.orderList[i].price
340
              total_price += this.orderList[i].count * this.orderList[i].price

+ 39 - 11
src/xt_pages/stock/stockPrint.vue View File

42
                                       <span v-if="getWareInfo(item.xt_warehouse_info)>0">{{getWareInfo(item.xt_warehouse_info)}}{{item.packing_unit}}</span>
42
                                       <span v-if="getWareInfo(item.xt_warehouse_info)>0">{{getWareInfo(item.xt_warehouse_info)}}{{item.packing_unit}}</span>
43
                                    </td>
43
                                    </td>
44
                                    <td>
44
                                    <td>
45
-                                        {{getAutoCount(item.id) + getOutCount(item.id)}}
46
-                                       <!-- <span v-if="getWareInfo(item.xt_warehouse_info)>0">{{getWareInfo(item.xt_warehouse_info) - getOverplus(item.xt_warehouse_info) - getCancelInfo(item.cancel_stock_info)}}{{item.packing_unit}}</span> -->
45
+                                      <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id== 10245">
46
+                                        <span>
47
+                                          {{getWareInfo(item.xt_warehouse_info) - getOverFlushInfo(item.xt_warehouse_info) + getCancelSotckInfo(item.cancel_stock_info) }}
48
+                                          </span>
49
+                                        </span>
50
+                                        <span v-else>{{getAutoCount(item.id) + getOutCount(item.id)}} </span>
47
                                    </td>
51
                                    </td>
48
                                   
52
                                   
49
                                    <td>
53
                                    <td>
50
-                                     <span v-if="getWareInfo(item.xt_warehouse_info) > 0">{{getWareInfo(item.xt_warehouse_info) - getAutoCount(item.id) - getOutCount(item.id) + getCancelCount(item.id) }}</span> 
51
-                                     <!-- <span v-if="getOverplus(item.xt_warehouse_info)>0">{{getOverplus(item.xt_warehouse_info)}}{{item.packing_unit}}</span>   -->
54
+                                     <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id == 10245">{{getOverFlushInfo(item.xt_warehouse_info)}}</span>
55
+                                     <span v-else>{{getWareInfo(item.xt_warehouse_info) - getAutoCount(item.id) - getOutCount(item.id) + getCancelCount(item.id) }}</span>
56
+                                    
52
                                    </td>
57
                                    </td>
53
                                 </tr>
58
                                 </tr>
54
                             </tbody>
59
                             </tbody>
97
           outCountList:[],
102
           outCountList:[],
98
           autoCountList:[],
103
           autoCountList:[],
99
           cancelCountList:[],
104
           cancelCountList:[],
105
+          org_id:0,
100
         }
106
         }
101
     },
107
     },
102
     methods:{
108
     methods:{
122
         getAllStockList(params).then(response=>{
128
         getAllStockList(params).then(response=>{
123
          if(response.data.state == 1){
129
          if(response.data.state == 1){
124
            var list = response.data.data.list
130
            var list = response.data.data.list
125
-           console.log("list22222",list)
131
+          //  console.log("list22222",list)
126
            this.tableList = list
132
            this.tableList = list
127
            var total = response.data.data.total
133
            var total = response.data.data.total
128
-           console.log("total",total)
134
+          //  console.log("total",total)
129
            this.total = total
135
            this.total = total
130
            var manufacturerList = response.data.data.manufacturerList
136
            var manufacturerList = response.data.data.manufacturerList
131
            this.manufacturerList = manufacturerList
137
            this.manufacturerList = manufacturerList
199
       getStockDrugCount(params).then(response=>{
205
       getStockDrugCount(params).then(response=>{
200
          if(response.data.state == 1){
206
          if(response.data.state == 1){
201
            var count = response.data.data.count
207
            var count = response.data.data.count
202
-           console.log("入库统计",count)
208
+          //  console.log("入库统计",count)
203
            this.countList = count
209
            this.countList = count
204
            var outlist = response.data.data.outList
210
            var outlist = response.data.data.outList
205
-           console.log("出库数量",outlist)
211
+          //  console.log("出库数量",outlist)
206
            this.outCountList = outlist
212
            this.outCountList = outlist
207
            var autoCount = response.data.data.autoCount
213
            var autoCount = response.data.data.autoCount
208
-           console.log("autoCount",autoCount)
214
+          //  console.log("autoCount",autoCount)
209
            this.autoCountList = autoCount
215
            this.autoCountList = autoCount
210
            var totalCount = response.data.data.totalCount
216
            var totalCount = response.data.data.totalCount
211
-           console.log("totalcount",totalCount)
217
+          //  console.log("totalcount",totalCount)
212
            this.cancelCountList = totalCount
218
            this.cancelCountList = totalCount
213
          }
219
          }
214
       })
220
       })
290
        total = ""
296
        total = ""
291
      }
297
      }
292
      return total
298
      return total
299
+   },
300
+   getOverFlushInfo(arr){
301
+     var total = 0
302
+     if(arr.length >0){
303
+      for(let i=0;i<arr.length;i++){
304
+        total += arr[i].stock_count
305
+      }
306
+     }
307
+     return total
308
+   },
309
+   getCancelSotckInfo(arr){
310
+     console.log("2332323232322332",arr)
311
+     var cancle_toal = 0
312
+     if(arr.length >0){
313
+      for(let z=0;z<arr.length;z++){
314
+        cancle_toal += arr[z].count
315
+      }
316
+     }
317
+     console.log("total",cancle_toal)
318
+     return cancle_toal
293
    }
319
    }
294
-    },
320
+   },
295
     created(){
321
     created(){
322
+      this.org_id =  this.$store.getters.xt_user.org_id
323
+      console.log("机构ID232323323233232",this.org_id)
296
       var starttime =  this.$route.query.start_time
324
       var starttime =  this.$route.query.start_time
297
       this.start_time = starttime
325
       this.start_time = starttime
298
       var endtime =  this.$route.query.end_time
326
       var endtime =  this.$route.query.end_time

+ 12 - 5
src/xt_pages/stock/stockQuery.vue View File

341
            this.tableList[i].unit = this.tableList[i].specification_name + "/" + this.tableList[i].packing_unit
341
            this.tableList[i].unit = this.tableList[i].specification_name + "/" + this.tableList[i].packing_unit
342
            this.tableList[i].prodect_name = this.getManufacture(this.tableList[i].manufacturer)
342
            this.tableList[i].prodect_name = this.getManufacture(this.tableList[i].manufacturer)
343
            this.tableList[i].inCount =  this.getWareInfo(this.tableList[i].xt_warehouse_info)
343
            this.tableList[i].inCount =  this.getWareInfo(this.tableList[i].xt_warehouse_info)
344
-           this.tableList[i].outCount =  this.getAutoCount(this.tableList[i].id) + this.getOutCount(this.tableList[i].id)
345
-          if(this.getWareInfo(this.tableList[i].xt_warehouse_info) > 0){
346
-            this.tableList[i].overplus = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getAutoCount(this.tableList[i].id) - this.getOutCount(this.tableList[i].id) + this.getCancelCount(this.tableList[i].id)
344
+
345
+        
346
+          if(this.org_id == 9671 || this.org_id == 10138 || this.org_id == 10028 || this.org_id == 9675 || this.org_id == 4 || this.org_id ==3877 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245){
347
+             this.tableList[i].outCount  = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getOverFlushInfo(this.tableList[i].xt_warehouse_info) + this.getCancelSotckInfo(this.tableList[i].cancel_stock_info) 
347
           }else{
348
           }else{
348
-             this.tableList[i].overplus = 0
349
+            this.tableList[i].outCount =  this.getAutoCount(this.tableList[i].id) + this.getOutCount(this.tableList[i].id)
349
           }
350
           }
351
+          
352
+           if(this.org_id == 9671 || this.org_id == 10138 || this.org_id == 10028 || this.org_id == 9675 || this.org_id == 4 || this.org_id ==3877 || this.org_id == 10243 || this.org_id == 10088 || this.org_id == 10245){
353
+              this.tableList[i].overplus = this.getOverFlushInfo(this.tableList[i].xt_warehouse_info)
354
+           }else{
355
+             this.tableList[i].overplus = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getAutoCount(this.tableList[i].id) - this.getOutCount(this.tableList[i].id) + this.getCancelCount(this.tableList[i].id)
356
+           }
350
 
357
 
351
          }
358
          }
352
          const data = this.formatJson(filterVal, this.tableList)
359
          const data = this.formatJson(filterVal, this.tableList)
406
     getAllStockList(params).then(response=>{
413
     getAllStockList(params).then(response=>{
407
          if(response.data.state == 1){
414
          if(response.data.state == 1){
408
           var list = response.data.data.list
415
           var list = response.data.data.list
409
-          console.log("总库存数量",list)
416
+          // console.log("总库存数量",list)
410
           this.tableList = list
417
           this.tableList = list
411
           var total = response.data.data.total
418
           var total = response.data.data.total
412
           this.total = total
419
           this.total = total

+ 17 - 4
src/xt_pages/user/doctorAdvice.vue View File

168
           align="center"
168
           align="center"
169
         >
169
         >
170
           <template slot-scope="scope">
170
           <template slot-scope="scope">
171
-            <span v-if="org_id == 10215">{{ scope.row.created_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span> 
171
+            <span v-if="org_id == 10215">{{ scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span> 
172
             <span v-else>{{ scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span> 
172
             <span v-else>{{ scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span> 
173
           </template>
173
           </template>
174
         </el-table-column>
174
         </el-table-column>
341
             >
341
             >
342
           </template>
342
           </template>
343
         </el-table-column>
343
         </el-table-column>
344
+        <el-table-column
345
+          label="医嘱状态"
346
+          width="180"
347
+          property="stop_time"
348
+          align="center"
349
+        >
350
+          <template slot-scope="scope">
351
+             <span v-if="scope.row.stop_state == 1">已停止</span>
352
+             <span v-if="scope.row.stop_state == 2">未停止</span>
353
+          </template>
354
+        </el-table-column>
344
         <el-table-column
355
         <el-table-column
345
           label="终止时间"
356
           label="终止时间"
346
           width="180"
357
           width="180"
4344
     },
4355
     },
4345
     // 获取勾选中的行
4356
     // 获取勾选中的行
4346
     getPrintInfo(ids) {
4357
     getPrintInfo(ids) {
4347
-      getPrintInfo({ ids: ids }).then(response => {
4358
+      getPrintInfo({ ids: ids}).then(response => {
4348
         if (response.data.state === 1) {
4359
         if (response.data.state === 1) {
4349
           var doctoradvice = response.data.data.doctoradvice;
4360
           var doctoradvice = response.data.data.doctoradvice;
4350
-          // console.log("doctoradvice", doctoradvice);
4361
+          console.log("doctoradvice", doctoradvice);
4362
+         
4351
           this.dataAdvice = doctoradvice;
4363
           this.dataAdvice = doctoradvice;
4352
           if (this.adviceType === 3 || this.adviceType === 2 || this.adviceType == 4) {
4364
           if (this.adviceType === 3 || this.adviceType === 2 || this.adviceType == 4) {
4365
+           
4353
             this.lstableData = this.dataAdvice;
4366
             this.lstableData = this.dataAdvice;
4354
-            // console.log("---", this.multipleSelection);
4367
+            
4355
           } else if (this.adviceType === 1) {
4368
           } else if (this.adviceType === 1) {
4356
             this.cqtableData = doctoradvice;
4369
             this.cqtableData = doctoradvice;
4357
           }
4370
           }