Browse Source

518合并代码

XMLWAN 2 years ago
parent
commit
094ba16f05

+ 2 - 3
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

@@ -2149,7 +2149,7 @@
2149 2149
         if (val > 2) {
2150 2150
           this.anticoagulant = this.anticoagulantsConfit[thismode - 2]
2151 2151
         }
2152
-        if ((this.$store.getters.xt_user.template_info.template_id == 13 || this.$store.getters.xt_user.template_info.template_id == 41) && val == 2) {
2152
+        if ((this.$store.getters.xt_user.template_info.template_id == 13 || this.$store.getters.xt_user.template_info.template_id == 41 || this.$store.getters.xt_user.template_info.template_id == 6) && val == 2) {
2153 2153
            if(val == 2){
2154 2154
              this.anticoagulant.shouji_unit = 'mg'
2155 2155
            }else{
@@ -2165,7 +2165,7 @@
2165 2165
           this.anticoagulant.weichi_unit = 'ml'
2166 2166
           this.anticoagulant.zongliang_unit = 'ml'
2167 2167
         }
2168
-        if(this.$store.getters.xt_user.template_info.template_id == 41 && this.dialysisPrescription.anticoagulant == 2){
2168
+        if(this.$store.getters.xt_user.template_info.template_id == 41 && this.$store.getters.xt_user.template_info.template_id == 6 && this.dialysisPrescription.anticoagulant == 2){
2169 2169
           this.dialysisPrescription.anticoagulant_zongliang = ""
2170 2170
           this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) +  parseInt(this.dialysisPrescription.anticoagulant_weichi)
2171 2171
         }
@@ -2174,7 +2174,6 @@
2174 2174
       },
2175 2175
 
2176 2176
       handleCommit: function() {
2177
-        console.log("触发了么2323323233223")
2178 2177
         if(!this.isLoading){
2179 2178
           if (this.dialysisPrescription.anticoagulant == '低分子肝素') {
2180 2179
             this.dialysisPrescription.anticoagulant = 3

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

@@ -175,6 +175,7 @@ export default {
175 175
             this.admin = response.data.data.admin_info
176 176
             this.his_hospital = response.data.data.his_hospital
177 177
             var order_info = response.data.data.order_info
178
+            console.log(" 汇总order_info2332322323232323",order_info)
178 179
             if(order_info!=undefined&&order_info ==null){
179 180
                this.list = []
180 181
                return
@@ -281,12 +282,14 @@ export default {
281 282
                  med_chrgitm_types.push(order_info[i].med_chrgitm_type)
282 283
                }
283 284
               }
285
+             
284 286
               const obj = {}
285 287
               med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
286 288
                 obj[next] ? '' : obj[next] = true && cur.push(next)
287 289
                 return cur
288 290
               }, []) // 设置cur默认类型为数组,并且初始值为空的数组
289 291
               let tempOrderInfo = []
292
+              console.log("med_chrgitm_type323223322323233223",med_chrgitm_types)
290 293
               for (let i = 0; i < med_chrgitm_types.length; i++) {
291 294
                 let obj = {
292 295
                   total: 0,
@@ -298,10 +301,11 @@ export default {
298 301
                     tempDetails.push(order_info[b])
299 302
                   }
300 303
                 }
301
-               
304
+                console.log("tempDetails2332323232",tempDetails)
302 305
                 obj.details = this.setNewData(tempDetails)
303
-
306
+                console.log("2332233232322323",obj.details)
304 307
                 obj.total = this.getTotal(obj.details)
308
+
305 309
                 obj.details.push({
306 310
                   total: obj.total,
307 311
                   is_total: 1,
@@ -316,6 +320,7 @@ export default {
316 320
                   }
317 321
                  
318 322
                 }
323
+                console.log("list2323223232323",this.list)
319 324
                 var new_arr = []
320 325
                 if(this.keywords!=""){
321 326
        
@@ -390,6 +395,7 @@ export default {
390 395
      return project_name
391 396
     },
392 397
     setNewData(details) {
398
+      console.log("detail23332323232322332332322323232332",details)
393 399
         let drug_ids = []
394 400
         let project_ids = []
395 401
 
@@ -449,7 +455,7 @@ export default {
449 455
                  obj['name'] = details[a].project.project.project_name
450 456
                  obj['spec'] = ''
451 457
                  obj['unit'] = details[a].project.project.unit
452
-
458
+                
453 459
 
454 460
                }else if(details[a].project.type == 3){
455 461
                  obj['name'] = details[a].project.good_info.good_name
@@ -462,7 +468,7 @@ export default {
462 468
                 obj['price'] = parseFloat(details[a].pric)
463 469
                 obj['chrgitm_lv'] = details[a].chrgitm_lv
464 470
                 obj['is_total'] = 2
465
-
471
+                obj['record_date'] = details[a].record_date
466 472
                 count = count + details[a].cnt
467 473
               }
468 474
             }

+ 205 - 39
src/xt_pages/outpatientTool/gatherPrintInvoice.vue View File

@@ -7,48 +7,48 @@
7 7
         <div class="listTitle">{{$store.getters.xt_user.org.org_name}}费用发票</div>
8 8
         <div class="listTitle_1">{{$store.getters.xt_user.org.org_name}}发票联<span>收</span></div>
9 9
          <div class="listInfo">
10
-            <div>收费日期:{{$store.getters.xt_user.org.org_name}}</div>
11
-            <div style="width:400px">发票代码:{{$store.getters.xt_user.org.org_name}}</div>
10
+            <div>收费日期:{{this.$route.query.end_time}}</div>
11
+            <div style="width:400px">发票代码:</div>
12 12
         </div>
13 13
         <table class="listTable" table border rules=none cellspacing=0 align=center>
14 14
             <tr>
15
-                <td>姓名:</td>
16
-                <td>科室:</td>
15
+                <td>姓名:{{patient.name}}</td>
16
+                <td>科室:{{getDepartment(his_patient.departments)}}</td>
17 17
                 <td></td>
18 18
             </tr>
19 19
             <tr>
20 20
                 <td>费用类别:</td>
21
-                <td>金额(元):</td>
21
+                <td>金额(元):{{getAllPice()}}</td>
22 22
                 <td></td>
23 23
             </tr>
24 24
             <tr>
25
-                <td>西药</td>
26
-                <td>中成药</td>
27
-                <td>中草药</td>
25
+                <td>西药</td>
26
+                <td>中成药:{{chineseTraditionalMedicineCostTotal}}</td>
27
+                <td>中草药</td>
28 28
             </tr>
29 29
             <tr>
30
-                <td>检查费</td>
31
-                <td>输氧费</td>
32
-                <td>手术费</td>
30
+                <td>检查费:{{checkCostTotal}}</td>
31
+                <td>输氧费</td>
32
+                <td>手术费</td>
33 33
             </tr>
34 34
             <tr>
35
-                <td>化验费</td>
36
-                <td>输血费</td>
37
-                <td>诊断费</td>
35
+                <td>化验费:{{laboratoryCostTotal}}</td>
36
+                <td>输血费</td>
37
+                <td>诊断费:{{zhenChaCostTotal}}</td>
38 38
             </tr>
39 39
             <tr>
40
-                <td>治疗费</td>
41
-                <td>护理费</td>
42
-                <td>床位费</td>
40
+                <td>治疗费</td>
41
+                <td>护理费</td>
42
+                <td>床位费:{{bedCostTotal}}</td>
43 43
             </tr>
44 44
             <tr>
45
-                <td>麻醉费</td>
46
-                <td>材料费</td>
47
-                <td>其他</td>
45
+                <td>麻醉费</td>
46
+                <td>材料费:{{materialCostTotal}}</td>
47
+                <td>其他:{{otherCostTotal}}</td>
48 48
             </tr>
49 49
            <tr style="border: 1px solid;">
50
-               <td>合计金额(大写):</td>
51
-               <td>人民币¥:</td>
50
+               <td>合计金额(大写):{{smalltoBIG(getAllPice() +chineseTraditionalMedicineCostTotal + checkCostTotal + laboratoryCostTotal +zhenChaCostTotal + bedCostTotal + materialCostTotal + otherCostTotal)}}</td>
51
+               <td>人民币¥:{{getAllPice() +chineseTraditionalMedicineCostTotal + checkCostTotal + laboratoryCostTotal +zhenChaCostTotal + bedCostTotal + materialCostTotal + otherCostTotal}}</td>
52 52
                <td></td>
53 53
             </tr>
54 54
             <tr style="height: 65px;">
@@ -65,7 +65,7 @@
65 65
                 收费员:
66 66
             </div>
67 67
             <div style="width:300px">
68
-                年 月 日
68
+               {{printDate}}
69 69
             </div>
70 70
         </div>
71 71
         </div>
@@ -93,6 +93,7 @@
93 93
           operationCostTotal:"",//材料费
94 94
           zhenChaCostTotal:"",//诊查费
95 95
           otherCostTotal:"",//其他费用
96
+          printDate:"",
96 97
         }
97 98
     },
98 99
     methods:{
@@ -125,7 +126,7 @@
125 126
       getTimes(time) {
126 127
         return uParseTime(time, '{y}-{m}-{d}')
127 128
       },
128
-    getGatherDetailList() {
129
+      getGatherDetailList() {
129 130
       let start_time = this.$route.query.start_time
130 131
       let end_time = this.$route.query.end_time
131 132
       let params = {
@@ -152,9 +153,12 @@
152 153
             if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
153 154
               //获取所有项目类型进行去重
154 155
               let med_chrgitm_types = []
155
-              for (let i = 0; i < order_info.length; i++) {
156
-                med_chrgitm_types.push(order_info[i].med_chrgitm_type)
156
+              if(order_info!=undefined && order_info.length > 0){
157
+                for (let i = 0; i < order_info.length; i++) {
158
+                 med_chrgitm_types.push(order_info[i].med_chrgitm_type)
159
+                }
157 160
               }
161
+            
158 162
               const obj = {}
159 163
               med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
160 164
                 obj[next] ? '' : obj[next] = true && cur.push(next)
@@ -187,12 +191,75 @@
187 191
               newobj['is_total'] = 1
188 192
               
189 193
               this.list.push(newobj)
194
+
195
+              var new_arr = []
196
+              if(this.$route.query.keyword!=""){
197
+       
198
+                   for(let i=0;i<this.list.length;i++){
199
+                     if(this.list[i].is_total == 2){
200
+                        if(this.list[i].name.indexOf(this.$route.query.keyword)>-1){
201
+                           new_arr.push(this.list[i])
202
+                       }
203
+                     }
204
+                   
205
+                  }
206
+                  var new_arr_two = []
207
+                  for(let i=0;i<tempDetails.length;i++){
208
+                    if(tempDetails[i].advice_id >0){
209
+                       tempDetails[i].name = tempDetails[i].advice.advice_name
210
+                    }
211
+                    if(tempDetails[i].project_id > 0){
212
+                       if(tempDetails[i].type == 2 ){
213
+                         tempDetails[i].name = tempDetails[i].project.project_name
214
+                       }
215
+                       if(tempDetails[i].type == 3){
216
+                         tempDetails[i].name = tempDetails[i].good_info.good_name
217
+                       }
218
+                    }
219
+                    if(tempDetails[i].name.indexOf(this.$route.query.keyword) > -1){
220
+                       new_arr_two.push(tempDetails[i])
221
+                    }
222
+                  }
223
+                   this.list = []
224
+                
225
+                   
226
+                   this.list = new_arr
227
+                    obj.details = []
228
+                    obj.details = this.setNewData(new_arr_two)
229
+
230
+                    obj.total = this.getTotal(obj.details)
231
+                    obj.details.push({
232
+                      total: obj.total,
233
+                      is_total: 1,
234
+                    })
235
+                    for(let i=0;i<obj.details.length;i++){
236
+                       if(obj.details[i].is_total == 1){
237
+                          obj.details[i].index = "合计"
238
+                       }else{
239
+                         obj.details[i].index = i+1
240
+                       }
241
+                    }
242
+                 
243
+                    this.list = obj.details
244
+                    this.chineseTraditionalMedicineCostTotal = response.data.data.chineseTraditionalMedicineCostTotal
245
+                    this.checkCostTotal = response.data.data.checkCostTotal
246
+                    this.materialCostTotal = response.data.data.materialCostTotal
247
+                    this.laboratoryCostTotal = response.data.data.laboratoryCostTotal
248
+                    this.bedCostTotal = response.data.data.bedCostTotal
249
+                    this.operationCostTotal = response.data.data.operationCostTotal
250
+                    this.zhenChaCostTotal = response.data.data.zhenChaCostTotal
251
+                    this.otherCostTotal = response.data.data.otherCostTotal
252
+
253
+                }
190 254
             }else{
191 255
               //获取所有项目类型进行去重
192 256
               let med_chrgitm_types = []
193
-              for (let i = 0; i < order_info.length; i++) {
194
-                med_chrgitm_types.push(order_info[i].med_chrgitm_type)
257
+              if(order_info!=undefined && order_info.length > 0){
258
+                for (let i = 0; i < order_info.length; i++) {
259
+                 med_chrgitm_types.push(order_info[i].med_chrgitm_type)
260
+               }
195 261
               }
262
+            
196 263
              
197 264
               const obj = {}
198 265
               med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
@@ -221,18 +288,70 @@
221 288
                 })
222 289
                
223 290
                 this.list =  this.list.concat(obj.details)
224
-                console.log("oh2323232323233223232323233",this.list)
291
+              
225 292
                 for(let i=0;i<this.list.length;i++){
226 293
                   this.list[i].index = i+1
227 294
                 }
228
-                 this.chineseTraditionalMedicineCostTotal = response.data.data.chineseTraditionalMedicineCostTotal
229
-                  this.checkCostTotal = response.data.data.checkCostTotal
230
-                  this.materialCostTotal = response.data.data.materialCostTotal
231
-                  this.laboratoryCostTotal = response.data.data.laboratoryCostTotal
232
-                  this.bedCostTotal = response.data.data.bedCostTotal
233
-                  this.operationCostTotal = response.data.data.operationCostTotal
234
-                  this.zhenChaCostTotal = response.data.data.zhenChaCostTotal
235
-                  this.otherCostTotal = response.data.data.otherCostTotal
295
+              var new_arr = []
296
+              if(this.$route.query.keyword!=""){
297
+                console.log("锦鲤3332232332233223322332",this.list)
298
+                for(let i=0;i<this.list.length;i++){
299
+                     if(this.list[i].is_total == 2){
300
+                        if(this.list[i].name.indexOf(this.$route.query.keyword)>-1){
301
+                           new_arr.push(this.list[i])
302
+                       }
303
+                     }
304
+                   
305
+                  }
306
+                  var new_arr_two = []
307
+                  for(let i=0;i<tempDetails.length;i++){
308
+                    if(tempDetails[i].advice_id >0){
309
+                       tempDetails[i].name = tempDetails[i].advice.advice_name
310
+                    }
311
+                    if(tempDetails[i].project_id > 0){
312
+                       if(tempDetails[i].type == 2 ){
313
+                         tempDetails[i].name = tempDetails[i].project.project_name
314
+                       }
315
+                       if(tempDetails[i].type == 3){
316
+                         tempDetails[i].name = tempDetails[i].good_info.good_name
317
+                       }
318
+                    }
319
+                    if(tempDetails[i].name.indexOf(this.$route.query.keyword) > -1){
320
+                       new_arr_two.push(tempDetails[i])
321
+                    }
322
+                  }
323
+                  this.list = []
324
+                  console.log("new_arr2323232333333232",new_arr)
325
+                   
326
+                   this.list = new_arr
327
+                    obj.details = []
328
+                    obj.details = this.setNewData(new_arr_two)
329
+
330
+                    obj.total = this.getTotal(obj.details)
331
+                    obj.details.push({
332
+                      total: obj.total,
333
+                      is_total: 1,
334
+                    })
335
+                    for(let i=0;i<obj.details.length;i++){
336
+                       if(obj.details[i].is_total == 1){
337
+                          obj.details[i].index = "合计"
338
+                       }else{
339
+                         obj.details[i].index = i+1
340
+                       }
341
+                    }
342
+                    console.log("obj23323232323232323232",obj.details)
343
+                    this.list = obj.details
344
+              }
345
+                this.chineseTraditionalMedicineCostTotal = response.data.data.chineseTraditionalMedicineCostTotal
346
+                this.checkCostTotal = response.data.data.checkCostTotal
347
+                this.materialCostTotal = response.data.data.materialCostTotal
348
+                this.laboratoryCostTotal = response.data.data.laboratoryCostTotal
349
+                this.bedCostTotal = response.data.data.bedCostTotal
350
+                this.operationCostTotal = response.data.data.operationCostTotal
351
+                this.zhenChaCostTotal = response.data.data.zhenChaCostTotal
352
+                this.otherCostTotal = response.data.data.otherCostTotal
353
+
354
+              
236 355
              }
237 356
           }
238 357
         }
@@ -512,7 +631,6 @@
512 631
       return name
513 632
     },
514 633
     getAllPice(){
515
-      console.log("liust23322332323223",this.list)
516 634
       var total_price = 0
517 635
       for(let i=0;i<this.list.length;i++){
518 636
         if(this.list[i].is_total ==2){
@@ -525,10 +643,58 @@
525 643
         return total_price
526 644
       }
527 645
      
528
-    }
646
+    },
647
+     smalltoBIG(n) {
648
+            // let fraction = ['角', '分'];
649
+            // let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
650
+            // let unit = [['元.', '万,', '亿,'], ["元",'拾', '佰', '仟']];
651
+            // let head = price < 0 ? '欠' : '';
652
+            // price = Math.abs(price);
653
+            // let upper = '';
654
+            // for (let i = 0; i < fraction.length; i++) {
655
+            // upper += (digit[Math.floor(price * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
656
+            // }
657
+            // upper = upper || '整';
658
+            // price = Math.floor(price);
659
+            // for (let i = 0; i < unit[0].length && price > 0; i++) {
660
+            // let p = '';
661
+            // for (let j = 0; j < unit[1].length && price > 0; j++) {
662
+            //     p = digit[price % 10] + unit[1][j] + p;
663
+            //     price = Math.floor(price / 10);
664
+            // }
665
+            // upper = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + upper;
666
+            // }
667
+            // this.zhongwen = head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整')
668
+            // console.log('6666',head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整'))
669
+            if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n)){
670
+                return "数据非法";  //判断数据是否大于0
671
+            }
672
+
673
+            var unit = "仟佰拾亿仟佰拾万仟佰拾元角分", str = "";
674
+            n += "00";
675
+
676
+            var indexpoint = n.indexOf('.');  // 如果是小数,截取小数点前面的位数
677
+
678
+            if (indexpoint >= 0){
679
+
680
+                n = n.substring(0, indexpoint) + n.substr(indexpoint+1, 2);   // 若为小数,截取需要使用的unit单位
681
+            }
682
+
683
+            unit = unit.substr(unit.length - n.length);  // 若为整数,截取需要使用的unit单位
684
+            for (var i=0; i < n.length; i++){
685
+                str += "零壹贰叁肆伍陆柒捌玖".charAt(n.charAt(i)) + unit.charAt(i);  //遍历转化为大写的数字
686
+            }
687
+
688
+            this.zhongwen =  str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
689
+            return this.zhongwen
690
+        },
529 691
     },
530 692
     created(){
531 693
       this.getGatherDetailList()   
694
+      var data = new Date();
695
+      var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
696
+      var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
697
+      this.printDate = data.getFullYear() + "-" + month + "-" + date;
532 698
     }
533 699
 
534 700
   }

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

@@ -82,7 +82,7 @@
82 82
         <el-button size="small" type="primary" @click="toPrint">打印</el-button>
83 83
         <el-button size="small" type="primary" @click="toExport">导出</el-button>
84 84
 
85
-        <span>&nbsp;&nbsp;</span>
85
+        <!-- <span>&nbsp;&nbsp;</span>
86 86
         <label class="title"><span class="name">出库方式</span> :</label>
87 87
         <el-select size="small" v-model="way_type" filterable placeholder="请选择仓库" style="width:200px" @change="changeWay">
88 88
             <el-option
@@ -91,7 +91,7 @@
91 91
               :label="option.name"
92 92
               :value="option.id">
93 93
             </el-option>
94
-        </el-select> 
94
+        </el-select>  -->
95 95
       </div>
96 96
 
97 97
       <el-table

+ 2 - 2
src/xt_pages/stock/stockOutOrder.vue View File

@@ -82,7 +82,7 @@
82 82
         <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
83 83
         <el-button size="small" type="primary" @click="toPrint">打印</el-button>
84 84
         <el-button size="small" type="primary" @click="toExport">导出</el-button>
85
-        <span>&nbsp;&nbsp;</span>
85
+        <!-- <span>&nbsp;&nbsp;</span>
86 86
         <label class="title"><span class="name">出库方式</span> :</label>
87 87
         <el-select size="small" v-model="way_type" filterable placeholder="请选择仓库" style="width:200px" @change="changeWay">
88 88
             <el-option
@@ -91,7 +91,7 @@
91 91
               :label="option.name"
92 92
               :value="option.id">
93 93
             </el-option>
94
-        </el-select> 
94
+        </el-select>  -->
95 95
       </div>
96 96
 
97 97
       <el-table