Explorar el Código

518合并代码

XMLWAN hace 2 años
padre
commit
509b1919de

+ 15 - 0
src/store/modules/globalConfig.js Ver fichero

@@ -841,6 +841,21 @@ const global_config = {
841 841
         zongliang_unit: 'mg',
842 842
         gaimingcheng_unit: '',
843 843
         gaijiliang_unit: ''
844
+      },
845
+      13: {
846
+        id: 13,
847
+        name: '那曲肝素钙',
848
+        type: 1,
849
+        shouji: 2,
850
+        weichi: 2,
851
+        zongliang: 2,
852
+        gaimingcheng: -1,
853
+        gaijiliang: -1,
854
+        shouji_unit: 'mg',
855
+        weichi_unit: 'mg/h',
856
+        zongliang_unit: 'mg',
857
+        gaimingcheng_unit: '',
858
+        gaijiliang_unit: ''
844 859
       }
845 860
     },
846 861
     anticoagulants_set: {

+ 1 - 0
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue Ver fichero

@@ -643,6 +643,7 @@
643 643
               <span v-if="scope.row.monitor_anticoagulant == 8">依诺肝素</span>
644 644
               <span v-if="scope.row.monitor_anticoagulant == 9">达肝素</span>
645 645
               <span v-if="scope.row.monitor_anticoagulant == 12">无抗凝剂</span>
646
+              <span v-if="scope.row.monitor_anticoagulant == 13">那曲肝素钙</span>
646 647
               <span v-if="scope.row.monitor_anticoagulant_value != ''"
647 648
                 >({{
648 649
                   scope.row.monitor_anticoagulant_value

+ 3 - 2
src/xt_pages/outpatientCharges/allListPrint.vue Ver fichero

@@ -13,8 +13,8 @@
13 13
     </template>
14 14
 
15 15
     <div class='dialysisPage' style="padding-top:40px;">
16
-      <printOne  v-if="org_id != 10215 && org_id != 0" :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></printOne>
17
-      <summary-print v-if="org_id == 10215|| org_id == 0" :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></summary-print>
16
+      <printOne  v-if="org_id != 10215 && org_id != 0 && org_id !=9671" :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></printOne>
17
+      <summary-print v-if="org_id == 10215|| org_id == 0 || org_id ==9671" :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></summary-print>
18 18
 
19 19
 <!--      <list-print-two :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></list-print-two>-->
20 20
     </div>
@@ -150,6 +150,7 @@
150 150
                   total: obj.total,
151 151
                   is_total: 1,
152 152
                 })
153
+                console.log("23323223323232332323322332",obj.details)
153 154
                 this.list =  this.list.concat(obj.details)
154 155
               }
155 156
             }

+ 301 - 45
src/xt_pages/outpatientTool/components/gatherStatistics.vue Ver fichero

@@ -43,7 +43,7 @@
43 43
       <div>
44 44
       </div>
45 45
     </div>
46
-    <el-table :data="tableList" border :row-style="{ color: '#303133' }" ref="table"
46
+    <el-table :data="list" border :row-style="{ color: '#303133' }" ref="table"
47 47
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
48 48
               show-summary
49 49
               max-height="600"
@@ -53,31 +53,38 @@
53 53
            <template slot-scope="scope">{{scope.row.index}}</template>
54 54
       </el-table-column>
55 55
       <el-table-column align="center" prop="name" label="处方日期">
56
-        <template slot-scope="scope"></template>
56
+        <template slot-scope="scope">
57
+          {{getTime(scope.row.record_date)}}
58
+        </template>
57 59
       </el-table-column>
58 60
       <el-table-column align="center" prop="name" label="费用分类">
59 61
         <template slot-scope="scope">
60
-
62
+          {{ scope.row.med_chrgitm_type }}
61 63
         </template>
62 64
       </el-table-column>
63 65
       <el-table-column align="center" prop="name" label="项目名称">
64 66
         <template slot-scope="scope">
65
-           <span v-if="scope.row.advice_id > 0 ">{{getAdviceName(scope.row.advice_id)}}</span>
66
-           <span v-if="scope.row.project_id > 0 ">{{getProjectName(scope.row.project_id)}}</span>
67
+          <span>{{scope.row.name}}</span>
67 68
         </template>
68 69
       </el-table-column>
69 70
       <el-table-column align="center" prop="name" label="规格型号">
70
-        <template slot-scope="scope"></template>
71
+        <template slot-scope="scope">
72
+          {{ scope.row.spec }}
73
+        </template>
71 74
       </el-table-column>
72 75
       <el-table-column align="center" prop="name" label="数量">
73
-        <template slot-scope="scope"></template>
76
+        <template slot-scope="scope">
77
+          {{ scope.row.count }}{{ scope.row.unit }}
78
+        </template>
74 79
       </el-table-column>
75 80
       <el-table-column align="center" prop="name" label="单价">
76
-        <template slot-scope="scope"></template>
81
+        <template slot-scope="scope">
82
+          {{scope.row.price}}
83
+        </template>
77 84
       </el-table-column>
78 85
       <el-table-column align="center" prop="name" label="金额">
79 86
         <template slot-scope="scope">
80
-          <div></div>
87
+          {{ (scope.row.price * scope.row.count).toFixed(2) }}
81 88
         </template>
82 89
       </el-table-column>
83 90
       <el-table-column align="center" prop="name" label="医保类别">
@@ -92,6 +99,7 @@
92 99
 <script>
93 100
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
94 101
 import { getGatherDetailList } from '@/api/his/his_tools'
102
+import { uParseTime } from '@/utils/tools'
95 103
 const moment = require('moment')
96 104
 export default {
97 105
   components: {
@@ -124,8 +132,8 @@ export default {
124 132
         { id: 3, name: '耗材' },
125 133
         { id: 2, name: '项目' }
126 134
 
127
-      ]
128
-     
135
+      ],
136
+      list:[],
129 137
     }
130 138
   },
131 139
   methods: {
@@ -150,42 +158,106 @@ export default {
150 158
         keyword: this.keywords
151 159
       }
152 160
      getGatherDetailList(params).then(response=>{
153
-       if(response.data.state == 1){
154
-         var projectlist = response.data.data.projectlist
155
-         for(let i=0;i<projectlist.length;i++){
156
-          this.tableList.push(projectlist[i])
157
-         }
158
-         console.log("detailist232323322332",projectlist)
159
-         var advicelist = response.data.data.advicelist
160
-         for(let i=0;i<advicelist.length;i++){
161
-           this.tableList.push(advicelist[i])
162
-         }
163
-         for(let i=0;i<this.tableData.length;i++){
164
-           this.tableList[i].index = i +1
165
-         }
166
-         console.log("advicelist332233323232323232",this.tableList)
167
-      
168
-         var list = response.data.data.list
169
-         console.log("list233223232323",list)
170
-         for(let i=0;i<list.length;i++){
171
-            for(let j=0;j<list[i].orders.length;j++){
172
-              for(let z=0;z<list[i].orders[j].order_info.length;z++){
173
-                  list[i].orders[j].order_info[z].record_date = list[i].orders[j].settle_accounts_date
174
-                  list[i].orders[j].order_info[z].number = list[i].orders[j].number
175
-                  this.tableData.push(list[i].orders[j].order_info[z])
176
-               }
177
-            }
161
+          if (response.data.state == 0) {
162
+            this.$message.error(response.data.msg)
163
+            return false
164
+          } else {
165
+            this.order = response.data.data.order
166
+            this.order['bedCostTotal'] = response.data.data.bedCostTotal
167
+            this.order['operationCostTotal'] = response.data.data.operationCostTotal
168
+            this.order['otherCostTotal'] = response.data.data.otherCostTotal
169
+            this.order['materialCostTotal'] = response.data.data.materialCostTotal
170
+            this.order['westernMedicineCostTotal'] = response.data.data.westernMedicineCostTotal
171
+            this.order['chineseTraditionalMedicineCostTotal'] = response.data.data.chineseTraditionalMedicineCostTotal
172
+            this.order['checkCostTotal'] = response.data.data.checkCostTotal
173
+            this.order['zhenChaCostTotal'] = response.data.data.zhenChaCostTotal
174
+            this.order['laboratoryCostTotal'] = response.data.data.laboratoryCostTotal
175
+            this.order['treatCostTotal'] = response.data.data.treatCostTotal
176
+            this.patient = response.data.data.patient
177
+            this.admin = response.data.data.admin_info
178
+            this.his_hospital = response.data.data.his_hospital
179
+            var order_info = response.data.data.order_info
180
+
181
+            if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
182
+              //获取所有项目类型进行去重
183
+              let med_chrgitm_types = []
184
+              for (let i = 0; i < order_info.length; i++) {
185
+                med_chrgitm_types.push(order_info[i].med_chrgitm_type)
186
+              }
187
+              const obj = {}
188
+              med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
189
+                obj[next] ? '' : obj[next] = true && cur.push(next)
190
+                return cur
191
+              }, []) // 设置cur默认类型为数组,并且初始值为空的数组
192
+
193
+              let tempOrderInfo = []
194
+
195
+              for (let i = 0; i < med_chrgitm_types.length; i++) {
196
+                let obj = {
197
+                  total: 0,
198
+                  details: [],
199
+                  is_total:0,
200
+                }
201
+                let tempDetails = []
202
+                for (let b = 0; b < order_info.length; b++) {
203
+                  if (med_chrgitm_types[i] == order_info[b].med_chrgitm_type) {
204
+                    tempDetails.push(order_info[b])
205
+                  }
206
+                }
207
+                obj.details = this.setNewData(tempDetails)
208
+               
209
+                this.list =  this.list.concat(obj.details)
210
+                for(let i=0;i<this.list.length;i++){
211
+                  this.list[i].index = i
212
+                }
213
+              }
214
+              let newobj = {}
215
+              newobj['total'] = this.order.medfee_sumamt
216
+              newobj['is_total'] = 1
217
+              
218
+              this.list.push(newobj)
219
+            }else{
220
+              console.log("hh2332322323232332232332",order_info)
221
+              //获取所有项目类型进行去重
222
+              let med_chrgitm_types = []
223
+              for (let i = 0; i < order_info.length; i++) {
224
+                med_chrgitm_types.push(order_info[i].med_chrgitm_type)
225
+              }
226
+              const obj = {}
227
+              med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
228
+                obj[next] ? '' : obj[next] = true && cur.push(next)
229
+                return cur
230
+              }, []) // 设置cur默认类型为数组,并且初始值为空的数组
231
+              let tempOrderInfo = []
232
+              for (let i = 0; i < med_chrgitm_types.length; i++) {
233
+                let obj = {
234
+                  total: 0,
235
+                  details: []
236
+                }
237
+                let tempDetails = []
238
+                for (let b = 0; b < order_info.length; b++) {
239
+                  if (med_chrgitm_types[i] == order_info[b].med_chrgitm_type) {
240
+                    tempDetails.push(order_info[b])
241
+                  }
242
+                }
243
+                console.log("tempdetail2323323232322332233223",tempDetails)
244
+                obj.details = this.setNewData(tempDetails)
245
+
246
+                obj.total = this.getTotal(obj.details)
247
+                obj.details.push({
248
+                  total: obj.total,
249
+                  is_total: 1,
250
+                })
251
+                console.log("obj3232232332323223",obj.details)
252
+                this.list =  this.list.concat(obj.details)
253
+                for(let i=0;i<this.list.length;i++){
254
+                  this.list[i].index = i+1
255
+                }
256
+                console.log("list32233223233332232323232323",this.list)
257
+             }
178 258
           }
179
-        for(let i=0;i<this.tableData.length;i++){
180
-          this.tableData[i].index = i+1
181
-          this.tableData[i].total_price = 0
182
-          this.tableData[i].total_price = (this.tableData[i].cnt * this.tableData[i].pric).toFixed(2)
183 259
         }
184
-        console.log("322323232323322323",this.tableData)
185
-       }
186 260
      })
187
-
188
-
189 261
     },
190 262
     getAdviceName(id){
191 263
       var drug_name = ""
@@ -204,7 +276,191 @@ export default {
204 276
        }
205 277
      }
206 278
      return project_name
207
-    }
279
+    },
280
+    setNewData(details) {
281
+      console.log("detail233223233223",details)
282
+        let drug_ids = []
283
+        let project_ids = []
284
+
285
+        for (let i = 0; i < details.length; i++) {
286
+          if (details[i].advice && details[i].advice.id > 0 && details[i].advice.prescription && details[i].advice.prescription.type == 1) { //药品
287
+            let obj = {
288
+              id: details[i].advice.drug_id,
289
+              price: details[i].advice.price,
290
+              record_date:details[i].advice.advice_date
291
+            }
292
+            drug_ids.push(obj)
293
+          } else if (details[i].project && details[i].project.id > 0 && details[i].project.prescription && details[i].project.prescription.type == 2) { //项目
294
+            let obj = {
295
+              id: details[i].project.project_id,
296
+              price: details[i].project.price,
297
+              record_date:details[i].advice.record_date
298
+            }
299
+            project_ids.push(obj)
300
+
301
+          }
302
+
303
+        }
304
+   
305
+        let new_drug_ids = this.unique(drug_ids)
306
+        let new_project_ids = this.unique(project_ids)
307
+        let list = []
308
+        if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
309
+          for (let i = 0; i < new_drug_ids.length; i++) {
310
+            let obj = {}
311
+            let count = 0
312
+            for (let a = 0; a < details.length; a++) {
313
+              if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
314
+                obj['name'] = details[a].advice.advice_name
315
+                obj['spec'] =   details[a].advice.drug.dose +   details[a].advice.drug.dose_unit+"*" +  details[a].advice.drug.min_number +   details[a].advice.drug.min_unit+"/"+ details[a].advice.drug.max_unit
316
+                obj['unit'] = details[a].advice.drug.min_unit
317
+                obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
318
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
319
+                obj['price'] = parseFloat(details[a].pric)
320
+                obj['is_total'] = 2
321
+                obj['record_date'] = details[a].advice.record_date
322
+                count = count + details[a].cnt
323
+              }
324
+            }
325
+            obj['count'] = count
326
+            list.push(obj)
327
+          }
328
+        }
329
+
330
+        if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
331
+          for (let i = 0; i < new_project_ids.length; i++) {
332
+            let obj = {}
333
+            let count = 0
334
+            for (let a = 0; a < details.length; a++) {
335
+              if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
336
+               if( details[a].project.type == 2){
337
+                 obj['name'] = details[a].project.project.project_name
338
+                 obj['spec'] = ''
339
+                 obj['unit'] = details[a].project.project.unit
340
+
341
+
342
+               }else if(details[a].project.type == 3){
343
+                 obj['name'] = details[a].project.good_info.good_name
344
+                 obj['spec'] = ''
345
+                 obj['unit'] = details[a].project.good_info.packing_unit
346
+
347
+               }
348
+                obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
349
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
350
+                obj['price'] = parseFloat(details[a].pric)
351
+                obj['is_total'] = 2
352
+
353
+                count = count + details[a].cnt
354
+              }
355
+            }
356
+            obj['count'] = count
357
+            list.push(obj)
358
+          }
359
+        }
360
+        return list
361
+      }, 
362
+    
363
+      getMedicineInsuranceType(type) {
364
+        switch (type) {
365
+          case "01":
366
+            return '甲类'
367
+            break
368
+          case "02":
369
+            return '乙类'
370
+
371
+            break
372
+          case "03":
373
+            return '自费'
374
+            break
375
+
376
+        }
377
+
378
+      },
379
+       getType(med_chrgitm_type){
380
+        switch (med_chrgitm_type) {
381
+          case '01':
382
+            return '床位费'
383
+            break
384
+          case '02':
385
+            return '诊察费'
386
+
387
+            break
388
+          case '03':
389
+            return '检查费'
390
+
391
+            break
392
+          case '04':
393
+            return '化验费'
394
+            break
395
+          case '05':
396
+            return '治疗费'
397
+
398
+            break
399
+          case '06':
400
+            return '手术费'
401
+
402
+            break
403
+          case '07':
404
+            return '护理费'
405
+
406
+            break
407
+          case '08':
408
+            return '材料费'
409
+
410
+            break
411
+          case '09':
412
+            return '西药费'
413
+
414
+            break
415
+          case '10':
416
+            return '中药饮片费'
417
+
418
+            break
419
+          case '11':
420
+            return '中成药费'
421
+
422
+            break
423
+          case '12':
424
+            return '一般诊疗费'
425
+
426
+            break
427
+          case '13':
428
+            return '挂号费'
429
+
430
+            break
431
+          case '14':
432
+            return '其他费'
433
+
434
+            break
435
+
436
+        }
437
+      },
438
+      unique(array) {
439
+        // res用来存储结果
440
+        var res = []
441
+        for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
442
+          for (var j = 0, resLen = res.length; j < resLen; j++) {
443
+            if (array[i].id === res[j].id && array[i].price === res[j].price) {
444
+              break
445
+            }
446
+          }
447
+          // 如果array[i]是唯一的,那么执行完循环,j等于resLen
448
+          if (j === resLen) {
449
+            res.push(array[i])
450
+          }
451
+        }
452
+        return res
453
+      },
454
+      getTotal:function(items){
455
+        let total = 0
456
+        for(let i = 0; i < items.length; i++){
457
+          total = Number(total) + Number((parseFloat(items[i].count) * parseFloat(items[i].price)).toFixed(2))
458
+        }
459
+        return total.toFixed(2)
460
+      },
461
+      getTimes(time) {
462
+       return uParseTime(time, '{y}-{m}-{d}')
463
+     },
208 464
   },
209 465
   created() {
210 466
     this.getGatherDetailList()

+ 3 - 1
src/xt_pages/stock/drugs/components/drugOutDetail.vue Ver fichero

@@ -160,7 +160,9 @@
160 160
         <el-table-column label="总价" align="center">
161 161
           <template slot-scope="scope">
162 162
            <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span> 
163
-           <span v-else>
163
+           <span v-if="org_id == 10210 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span> 
164
+           <span v-if="org_id == 9671 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span> 
165
+           <span v-if ="org_id!=9919 && org_id!=10210 && org_id!=9671">
164 166
              <!-- <span v-if="scope.row.price >0">
165 167
                 <span v-if="scope.row.count_unit == scope.row.min_unit">
166 168
                   {{(scope.row.price * scope.row.count).toFixed(2)}}

+ 7 - 2
src/xt_pages/stock/drugs/drugStockOutOrder.vue Ver fichero

@@ -248,8 +248,11 @@
248 248
           </el-table-column> -->
249 249
           <el-table-column label="总价" align="center">
250 250
             <template slot-scope="scope">
251
-              <span v-if="scope.row.price > 0">{{getAllPriceOne(scope.row.drug_id,scope.row.price,scope.row.price,scope.row.max_unit,scope.row.count_unit,scope.row.min_number,scope.row.is_sys).toFixed(2)}}</span>
252
-              <span v-if="scope.row.price == 0">{{getAllPriceOne(scope.row.drug_id,scope.row.retail_price,scope.row.min_price,scope.row.max_unit,scope.row.count_unit,scope.row.min_number,scope.row.is_sys).toFixed(2)}}</span>
251
+              <span v-if="org_id == 10210 || org_id == 9671">{{(scope.row.count * scope.row.price).toFixed(2)}}</span>
252
+               <span v-if="org_id != 10210 && org_id !=9671">
253
+                  <span v-if="scope.row.price > 0">{{getAllPriceOne(scope.row.drug_id,scope.row.price,scope.row.price,scope.row.max_unit,scope.row.count_unit,scope.row.min_number,scope.row.is_sys).toFixed(2)}}</span>
254
+                  <span v-if="scope.row.price == 0">{{getAllPriceOne(scope.row.drug_id,scope.row.retail_price,scope.row.min_price,scope.row.max_unit,scope.row.count_unit,scope.row.min_number,scope.row.is_sys).toFixed(2)}}</span>
255
+               </span>
253 256
             </template>
254 257
           </el-table-column>
255 258
           <el-table-column label="生产厂家" align="center">
@@ -420,6 +423,7 @@ export default {
420 423
   name: "salesReturnOrder",
421 424
   components: { BreadCrumb },
422 425
   created() {
426
+    this.org_id = this.$store.getters.xt_user.org.id
423 427
     var nowDate = new Date();
424 428
     var nowYear = nowDate.getFullYear();
425 429
     var nowMonth = nowDate.getMonth() + 1;
@@ -504,6 +508,7 @@ export default {
504 508
       houseList:[],
505 509
       storehouse_id:0,
506 510
       is_sys:0,
511
+      org_id:0,
507 512
     };
508 513
   },
509 514
   methods: {