Browse Source

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

XMLWAN 4 years ago
parent
commit
1883da6842
31 changed files with 3097 additions and 679 deletions
  1. 2 2
      config/index.js
  2. 20 0
      src/api/his/his.js
  3. 1 1
      src/lang/zh.js
  4. 2 2
      src/store/modules/globalConfig.js
  5. BIN
      src/xt_pages/.DS_Store
  6. 2 3
      src/xt_pages/data/components/drugs.vue
  7. 51 32
      src/xt_pages/dialysis/template/DialysisPrintOrderThirtyFour.vue
  8. 5 4
      src/xt_pages/dialysis/template/DialysisPrintOrderTwentyEight.vue
  9. 1 1
      src/xt_pages/dialysis/template/DialysisPrintOrderTwentyFour.vue
  10. 478 0
      src/xt_pages/outpatientCharges/allListPrint.vue
  11. 174 0
      src/xt_pages/outpatientCharges/allListTemplate/printOne.vue
  12. 4 1
      src/xt_pages/outpatientCharges/components/registerDialog.vue
  13. 365 0
      src/xt_pages/outpatientCharges/listPrint.vue
  14. 170 0
      src/xt_pages/outpatientCharges/listTemplate/printOne.vue
  15. 422 0
      src/xt_pages/outpatientCharges/newStatementPrint.vue
  16. 73 39
      src/xt_pages/outpatientCharges/outpatientChargesManagement.vue
  17. 2 0
      src/xt_pages/outpatientCharges/statementPrint.vue
  18. 335 243
      src/xt_pages/outpatientCharges/statementTemplate/printOne.vue
  19. 65 5
      src/xt_pages/outpatientCharges/summary.vue
  20. 275 46
      src/xt_pages/outpatientCharges/summaryDetail.vue
  21. 336 182
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  22. 253 70
      src/xt_pages/outpatientDoctorStation/doctorDesk.vue
  23. 15 15
      src/xt_pages/outpatientRegistration/registrationHistory.vue
  24. 1 1
      src/xt_pages/qcd/officesControlAnalysis/project.vue
  25. 20 20
      src/xt_pages/role/departManage.vue
  26. 2 1
      src/xt_pages/sign/lineUp.vue
  27. 9 5
      src/xt_pages/stock/drugs/drugStockInOrderAdd.vue
  28. 7 3
      src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue
  29. 4 1
      src/xt_pages/stock/drugs/drugsStockDialog/index.vue
  30. 2 1
      src/xt_pages/stock/stockInOrderAdd.vue
  31. 1 1
      src/xt_pages/stock/stockOutOrderAdd.vue

+ 2 - 2
config/index.js View File

@@ -27,10 +27,10 @@ module.exports = {
27 27
     // can be overwritten by process.env.HOST
28 28
     // if you want dev by ip, please set host: '0.0.0.0'
29 29
 
30
-    //  host: 'xt.test.sgjyun.com',
30
+     host: 'xt.test.sgjyun.com',
31 31
     //  host: 'xt.kuyicloud.com',
32 32
     // host: 'xt.test.sgjyun.com',
33
-    host: 'xt.test.sgjyun.com',
33
+    // host: 'localhost',
34 34
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
35 35
     autoOpenBrowser: true,
36 36
     errorOverlay: true,

+ 20 - 0
src/api/his/his.js View File

@@ -322,6 +322,26 @@ export function getChargeHisPatientInfo (params) {
322 322
 }
323 323
 
324 324
 
325
+export function getHisOrderDetail (params) {
326
+  return request({
327
+    url: '/api/orderdetail/get',
328
+    method: 'get',
329
+    params:params,
330
+  })
331
+}
332
+
333
+
334
+
335
+
336
+
337
+
338
+export function getHisOrderDetailCollect (params) {
339
+  return request({
340
+    url: '/api/orderdetaicollect/get',
341
+    method: 'get',
342
+    params:params,
343
+  })
344
+}
325 345
 
326 346
 
327 347
 

+ 1 - 1
src/lang/zh.js View File

@@ -232,7 +232,7 @@ export default {
232 232
     dictionaryManagement:'字典管理',
233 233
     templateManagement:'模板管理',
234 234
     drugStockUserDetail:"出库人明细",
235
-    DepartManage:"部门管理",
235
+    DepartManage:"科室管理",
236 236
     basicConfig:'基础配置',
237 237
 
238 238
     histemplate:'处方模版',

+ 2 - 2
src/store/modules/globalConfig.js View File

@@ -495,7 +495,7 @@ const global_config = {
495 495
       // 16: { id: 16, name: 'HD后置换', dialysis_duration: 1, replacement_way: 2, hemodialysis_machine: 1, blood_filter: 2, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
496 496
       // 17: { id: 17, name: 'HDF前置换', dialysis_duration: 1, replacement_way: 1, hemodialysis_machine: 2, blood_filter: 1, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
497 497
       // 18: { id: 18, name: 'HDF后置换', dialysis_duration: 1, replacement_way: 1, hemodialysis_machine: 2, blood_filter: 1, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 }
498
-      19: {
498
+      20: {
499 499
         id: 19,
500 500
         name: 'UF',
501 501
         dialysis_duration: 1,
@@ -1821,7 +1821,7 @@ const global_config = {
1821 1821
       id: 27,
1822 1822
       name: '万u'
1823 1823
     },
1824
-   
1824
+
1825 1825
     ],
1826 1826
     body_fluid: [{
1827 1827
       id: 1,

BIN
src/xt_pages/.DS_Store View File


+ 2 - 3
src/xt_pages/data/components/drugs.vue View File

@@ -372,10 +372,9 @@
372 372
         // this.$refs.maintain.show();
373 373
       },
374 374
       openForm(id) {
375
-
375
+        this.current_id = id
376 376
         this.getAllManufacturer()
377 377
         if (id > 0) {
378
-          this.current_id = id
379 378
           let params = {
380 379
             id: this.current_id
381 380
           }
@@ -462,7 +461,7 @@
462 461
           }
463 462
           this.$refs.addDrugs.show(0, this.formValue)
464 463
         }
465
-      }, 
464
+      },
466 465
 
467 466
        deleteDurg(id,index){
468 467
          console.log("id",id)

+ 51 - 32
src/xt_pages/dialysis/template/DialysisPrintOrderThirtyFour.vue View File

@@ -178,9 +178,13 @@
178 178
                     <div class="inline_block" style="flex:1;">
179 179
                         透析时间:
180 180
                         <div class="under_line" style="width: 50px;text-align: center">
181
-                        {{ prescription.dialysis_duration_hour ? prescription.dialysis_duration_hour : "/" }}
181
+                        {{ prescription.dialysis_duration_hour ? prescription.dialysis_duration_hour : "" }}
182 182
                         </div>
183 183
                         小时
184
+                        <div class="under_line" style="width: 50px;text-align: center">
185
+                        {{ prescription.dialysis_duration_minute ? prescription.dialysis_duration_minute : "" }}
186
+                        </div>
187
+                        分钟
184 188
                     </div>
185 189
                     <div class="inline_block" style="margin-left:20px;flex:1;">
186 190
                         血流量:
@@ -203,6 +207,30 @@
203 207
                         </div>
204 208
                     </div>
205 209
                 </div>
210
+                <div class="row" style="padding: 2px 0;line-height:23px;">
211
+                  <div class="inline_block" style="flex:1;">
212
+                    置换方式:
213
+                    <label-box
214
+                      :isChecked="
215
+                        prescription.displace_liqui_part == 1 ? true : false
216
+                      "
217
+                      showValue="前置换"
218
+                    ></label-box>&nbsp;
219
+                    <label-box
220
+                      :isChecked="
221
+                        prescription.displace_liqui_part == 2 ? true : false
222
+                      "
223
+                      showValue="后置换"
224
+                    ></label-box>
225
+                  </div>
226
+                  <div class="inline_block" style="margin-left:20px;flex:1;">
227
+                    置换量:
228
+                    <div class="under_line" style="width: 70px;text-align: center">
229
+                    {{ prescription.replacement_total ? prescription.replacement_total : "" }}
230
+                    </div>
231
+                    ml
232
+                  </div>
233
+                </div>
206 234
               </td>
207 235
             </tr>
208 236
             <tr>
@@ -242,16 +270,14 @@
242 270
                   </td> -->
243 271
                       <!-- <td width="10%" v-if="(advice.children && advice.children.length > 0 || advice.parent_id > 0) && advice.isShow == 2" ></td> -->
244 272
                       <td height="32px">
245
-                        <span v-if="setAdminUserES(advice.advice_doctor) == ''">{{ getAdminUser(advice.advice_doctor) }}</span>
246
-                        <img style="height:30px;" :src="setAdminUserES(advice.advice_doctor)" alt="" srcset="" v-else />
273
+                        <span>{{ getAdminUser(advice.advice_doctor) }}</span>
247 274
                       </td>
248 275
                       <!-- <td height="35px">
249 276
                     <span v-if="setAdminUserES(advice.checker) == ''">{{getAdminUser(advice.checker)}}</span>
250 277
                     <img style="height:20px;" :src="setAdminUserES(advice.checker)" alt="" srcset="" v-else>
251 278
                   </td> -->
252 279
                       <td height="32px">
253
-                        <span v-if="setAdminUserES(advice.execution_staff) == ''">{{ getAdminUser(advice.execution_staff) }}</span>
254
-                        <img style="height:30px;" :src="setAdminUserES(advice.execution_staff)" alt="" srcset="" v-else />
280
+                        <span>{{ getAdminUser(advice.execution_staff) }}</span>
255 281
                       </td>
256 282
                       <td height="32px">
257 283
                         <span v-if="advice.execution_time">{{ getTime(advice.execution_time, "{h}:{i}") }}</span>
@@ -311,12 +337,9 @@
311 337
                             </div>
312 338
                         </td>
313 339
                         <td>
314
-                            <span v-if="setAdminUserES(monitor.monitoring_nurse) == ''">
340
+                            <span>
315 341
                                 {{ getAdminUser(monitor.monitoring_nurse) }}
316 342
                             </span>
317
-                            <span v-else style="display:flex;align-items:center;justify-content:space-around;height:36px;">
318
-                                <img style="height:30px;" :src="setAdminUserES(monitor.monitoring_nurse)" alt srcset />
319
-                            </span>
320 343
                         </td>
321 344
                     </tr>
322 345
                   </tbody>
@@ -332,28 +355,32 @@
332 355
                             {{ afterdialysis.actual_treatment_hour ? afterdialysis.actual_treatment_hour : "" }}
333 356
                             </div>
334 357
                             小时
358
+                            <div class="under_line" style="width: 30px;text-align: center">
359
+                            {{ afterdialysis.actual_treatment_minute ? afterdialysis.actual_treatment_minute : "" }}
360
+                            </div>
361
+                            分钟
335 362
                         </div>
336
-                        <div class="inline_block" style="margin-left:20px;">
363
+                        <div class="inline_block" style="margin-left:10px;">
337 364
                             实际脱水量:
338 365
                             <div class="under_line" style="width: 70px;text-align: center">
339 366
                             {{ afterdialysis.actual_ultrafiltration ? afterdialysis.actual_ultrafiltration : "" }}
340 367
                             </div>
341 368
                             ml
342 369
                         </div>
343
-                        <div class="inline_block" style="margin-left:20px;">
370
+                        <div class="inline_block" style="margin-left:10px;">
344 371
                             透后体重:
345 372
                             <div class="under_line" style="width: 70px;text-align: center">
346 373
                             {{ afterdialysis.weight_after ? afterdialysis.weight_after : "" }}
347 374
                             </div>
348 375
                             kg
349 376
                         </div>
350
-                        <div class="inline_block" style="margin-left:20px;">
377
+                        <div class="inline_block" style="margin-left:10px;">
351 378
                             透析器级别
352 379
                             <div class="under_line" style="width: 100px;text-align: center">
353 380
                                 {{ afterdialysis.cruor ? afterdialysis.cruor : '' }}
354 381
                             </div>
355 382
                         </div>
356
-                        <div class="inline_block" style="margin-left:20px;">
383
+                        <div class="inline_block" style="margin-left:10px;">
357 384
                             离科时间
358 385
                             <div class="under_line" style="width: 70px;text-align: center">
359 386
                                 {{ dialysisOrder ? getTime(dialysisOrder.end_time, "{h}:{i}") : '' }}
@@ -364,48 +391,41 @@
364 391
                         <div class="inline_block">
365 392
                             预冲者
366 393
                             <div class="under_line" style="width: 70px;text-align: center">
367
-                                <span v-if="setAdminUserES(dialysisOrder==null?0:dialysisOrder.washpipe_nurse) == ''">{{getAdminUser(dialysisOrder==null?0:dialysisOrder.washpipe_nurse)}}</span>
368
-                                <img class="es-img" style="height:30px" :src="setAdminUserES(dialysisOrder==null?0:dialysisOrder.washpipe_nurse)" alt="" srcset="" v-else>
394
+                                <span>{{getAdminUser(dialysisOrder==null?0:dialysisOrder.washpipe_nurse)}}</span>
369 395
                             </div>
370 396
                         </div>
371 397
                         <div class="inline_block" style="margin-left:20px;">
372 398
                             穿刺者/换药者
373 399
                             <div class="under_line" style="width: 70px;text-align: center">
374
-                                <span v-if="setAdminUserES(dialysisOrder==null?0:dialysisOrder.puncture_nurse) == ''">{{getAdminUser(dialysisOrder==null?0:dialysisOrder.puncture_nurse)}}</span>
375
-                                <img class="es-img" style="height:30px" :src="setAdminUserES(dialysisOrder==null?0:dialysisOrder.puncture_nurse)" alt="" srcset="" v-else>
400
+                                <span>{{getAdminUser(dialysisOrder==null?0:dialysisOrder.puncture_nurse)}}</span>
376 401
                             </div>
377 402
                         </div>
378 403
                         <div class="inline_block" style="margin-left:20px;">
379 404
                             责任护士
380 405
                             <div class="under_line" style="width: 70px;text-align: center">
381
-                                <span v-if="setAdminUserES(dialysisOrder==null?0:dialysisOrder.start_nurse) == ''">{{getAdminUser(dialysisOrder==null?0:dialysisOrder.start_nurse)}}</span>
382
-                                <img class="es-img" style="height:30px" :src="setAdminUserES(dialysisOrder==null?0:dialysisOrder.start_nurse)" alt="" srcset="" v-else>
406
+                                <span>{{getAdminUser(dialysisOrder==null?0:dialysisOrder.start_nurse)}}</span>
383 407
                             </div>
384 408
                         </div>
385 409
                         <div class="inline_block" style="margin-left:20px;">
386 410
                             查对者
387 411
                             <div class="under_line" style="width: 70px;text-align: center">
388
-                                <span v-if="setAdminUserES(check == null ? 0 : check.creater) == ''">
412
+                                <span>
389 413
                                     {{ getAdminUser(check == null ? 0 : check.creater) }}
390 414
                                 </span>
391
-                                <img style="height:30px;" :src="setAdminUserES(check == null ? 0 : check.creater)" alt srcset v-else />
392 415
                             </div>
393 416
                         </div>
394 417
                         <div class="inline_block" style="margin-left:20px;">
395 418
                             交叉核对者
396 419
                             <div class="under_line" style="width: 70px;text-align: center">
397
-                                <span v-if="setAdminUserES(check == null ? 0 : check.modifier) == ''">
420
+                                <span>
398 421
                                 {{ getAdminUser(check == null ? 0 : check.modifier) }}
399 422
                                 </span>
400
-                                <img style="height:30px;" :src="setAdminUserES(check == null ? 0 : check.modifier)" alt srcset v-else />
401 423
                             </div>
402 424
                         </div>
403 425
                         <div class="inline_block" style="margin-left:20px;">
404 426
                             下机护士
405 427
                             <div class="under_line" style="width: 70px;text-align: center">
406
-                                <span v-if="setAdminUserES(dialysisOrder == null ? 0 : dialysisOrder.finish_nurse) == ''">
407
-                                    {{ getAdminUser(dialysisOrder == null ? 0 : dialysisOrder.finish_nurse) }}</span>
408
-                                <img class="es-img" style="height:30px" :src="setAdminUserES(dialysisOrder == null ? 0 : dialysisOrder.finish_nurse)" alt="" srcset="" v-else />
428
+                                <span>{{ getAdminUser(dialysisOrder == null ? 0 : dialysisOrder.finish_nurse) }}</span>
409 429
                             </div>
410 430
                         </div>
411 431
                         
@@ -424,10 +444,9 @@
424 444
         <div class="row" style="padding: 2px 0;line-height:30px; display:flex;">
425 445
             <div class="inline_block">
426 446
                 医生签字
427
-                <!-- <div class="under_line" style="width: 70px;text-align: center">
428
-                    <span v-if="setAdminUserES(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:'')) == ''"> {{ getAdminUser(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:'')) }} </span>
429
-                    <img style="height:30px;" :src="setAdminUserES(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:''))" alt="" srcset="" v-else />
430
-                </div> -->
447
+                <div class="under_line" style="width: 70px;text-align: center">
448
+                    <span> {{ getAdminUser(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:'')) }} </span>
449
+                </div>
431 450
             </div>
432 451
         </div>
433 452
       </div>
@@ -861,8 +880,8 @@ export default {
861 880
         this.summary = response.data.data.summary
862 881
         this.org_template_info = response.data.data.org_template_info
863 882
 
864
-        if (this.monitors.length < 10) {
865
-            var nl = 10 - this.monitors.length
883
+        if (this.monitors.length < 9) {
884
+            var nl = 9 - this.monitors.length
866 885
             for (let index = 0; index < nl; index++) {
867 886
               this.monitors.push([])
868 887
             }

+ 5 - 4
src/xt_pages/dialysis/template/DialysisPrintOrderTwentyEight.vue View File

@@ -342,7 +342,7 @@
342 342
               <tbody>
343 343
               <tr>
344 344
                 <td width="70">血管通路:</td>
345
-                <td width="620">
345
+                <td width="590">
346 346
                   <div>
347 347
                     <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('自体内瘘') > -1 ? true : false" showValue="自体内瘘"></label-box>
348 348
                     &nbsp;
@@ -350,10 +350,11 @@
350 350
                     &nbsp;
351 351
                     <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('直穿') > -1 ? true : false" showValue="直穿"></label-box>
352 352
                     &nbsp;
353
-                    <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('颈内静脉') > -1 ? true : false" showValue="颈内静脉"></label-box>
353
+                    <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('颈内静脉-左') > -1 ? true : predialysis.blood_access_part_opera_name.indexOf('颈内静脉-右') > -1 ? true : false" showValue="颈内静脉"></label-box>
354 354
                     &nbsp;
355
-                    <!-- <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('颈内静脉-右') > -1 ? true : false" showValue="颈内静脉-右"></label-box>
356
-                    &nbsp; -->
355
+                    (<label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('颈内静脉-左') > -1 ? true : false" showValue="左"></label-box>
356
+                    &nbsp;
357
+                    <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('颈内静脉-右') > -1 ? true : false" showValue="右"></label-box>)
357 358
                     <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('股静脉') > -1 ? true : false" showValue="股静脉"></label-box>
358 359
                     &nbsp;
359 360
                     <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('锁骨下') > -1 ? true : false" showValue="锁骨下"></label-box>

+ 1 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderTwentyFour.vue View File

@@ -1049,7 +1049,7 @@
1049 1049
                     <td width='40'>其他</td>
1050 1050
                     <td width='160'>
1051 1051
                       <div class="under-line">
1052
-                        &nbsp;{{ afterdialysis.complication ? getComplication(afterdialysis.complication) : '' }}
1052
+                        &nbsp;{{ afterdialysis.other_complication ? afterdialysis.other_complication : '' }}
1053 1053
                       </div>
1054 1054
                     </td>
1055 1055
                     <td></td>

+ 478 - 0
src/xt_pages/outpatientCharges/allListPrint.vue View File

@@ -0,0 +1,478 @@
1
+<template>
2
+  <div>
3
+    <template>
4
+      <el-button
5
+        style="position:fixed;right:25px;z-index:999"
6
+        :loading="loading"
7
+        size="small"
8
+        icon="el-icon-printer"
9
+        @click="printThisPage"
10
+        type="primary"
11
+      >打印
12
+      </el-button
13
+      >
14
+    </template>
15
+
16
+    <div class='dialysisPage' style="padding-top:40px;">
17
+      <printOne :list="list" :patient="patient" :order="order" :admin="admin"></printOne>
18
+    </div>
19
+  </div>
20
+</template>
21
+
22
+<script>
23
+  import { getHisOrderDetailCollect } from '@/api/his/his'
24
+  import { uParseTime } from '@/utils/tools'
25
+  import printOne from './allListTemplate/printOne'
26
+
27
+  export default {
28
+    name: 'allListPrint',
29
+    components: {
30
+      printOne
31
+    },
32
+    props: {
33
+      paramsObj: Object
34
+    },
35
+    data() {
36
+      return {
37
+        list: [],
38
+        patient: {},
39
+        order: {},
40
+        admin: {}
41
+      }
42
+    },
43
+
44
+    created() {
45
+      this.getInfo(this.paramsObj.id)
46
+
47
+    },
48
+    methods: {
49
+      getTimes(time) {
50
+        return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
51
+      }, getInfo(order_id) {
52
+        let params = {
53
+          id: order_id
54
+        }
55
+        getHisOrderDetailCollect(params).then(response => {
56
+          if (response.data.state == 0) {
57
+            this.$message.error(response.data.msg)
58
+            return false
59
+          } else {
60
+            this.order = response.data.data.order
61
+            this.patient = response.data.data.patient
62
+            this.admin = response.data.data.admin_info
63
+            var order_info = response.data.data.order_info
64
+
65
+            //获取所有项目类型进行去重
66
+            let med_chrgitm_types = []
67
+            for (let i = 0; i < order_info.length; i++) {
68
+              med_chrgitm_types.push(order_info[i].med_chrgitm_type)
69
+            }
70
+            const obj = {}
71
+            med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
72
+              obj[next] ? '' : obj[next] = true && cur.push(next)
73
+              return cur
74
+            }, []) // 设置cur默认类型为数组,并且初始值为空的数组
75
+
76
+            let tempOrderInfo = []
77
+
78
+            for (let i = 0; i < med_chrgitm_types.length; i++) {
79
+              let obj = {
80
+                total: 0,
81
+                details: []
82
+              }
83
+              let tempDetails = []
84
+              for (let b = 0; b < order_info.length; b++) {
85
+                if (med_chrgitm_types[i] == order_info[b].med_chrgitm_type) {
86
+                  tempDetails.push(order_info[b])
87
+                }
88
+              }
89
+
90
+              obj.details = this.setNewData(tempDetails)
91
+              obj.total = this.getTotal(obj.details)
92
+
93
+              obj.details.push({
94
+                total: obj.total,
95
+                is_total: 1,
96
+              })
97
+              this.list =  this.list.concat(obj.details)
98
+            }
99
+
100
+
101
+
102
+
103
+          }
104
+        })
105
+      }, getTotal:function(items){
106
+        let total = 0
107
+        for(let i = 0; i < items.length; i++){
108
+          total = Number(total) + Number((parseFloat(items[i].count) * parseFloat(items[i].price)).toFixed(2))
109
+        }
110
+        return total.toFixed(2)
111
+      },setNewData(details) {
112
+        let drug_ids = []
113
+        let project_ids = []
114
+
115
+        for (let i = 0; i < details.length; i++) {
116
+          if (details[i].advice && details[i].advice.id > 0 && details[i].advice.prescription && details[i].advice.prescription.type == 1) { //药品
117
+            let obj = {
118
+              id: details[i].advice.drug_id,
119
+              price: details[i].advice.price
120
+            }
121
+            drug_ids.push(obj)
122
+          } else if (details[i].project && details[i].project.id > 0 && details[i].project.prescription && details[i].project.prescription.type == 2) { //项目
123
+            let obj = {
124
+              id: details[i].project.project_id,
125
+              price: details[i].project.price
126
+
127
+            }
128
+            project_ids.push(obj)
129
+
130
+          }
131
+
132
+        }
133
+        //
134
+        // console.log('old ids')
135
+        // console.log(drug_ids)
136
+        // console.log(project_ids)
137
+        // console.log('old ids')
138
+
139
+        let new_drug_ids = this.unique(drug_ids)
140
+        let new_project_ids = this.unique(project_ids)
141
+        let list = []
142
+
143
+        console.log('ids')
144
+        console.log(new_drug_ids)
145
+        console.log(new_project_ids)
146
+        console.log('ids')
147
+
148
+        if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
149
+          for (let i = 0; i < new_drug_ids.length; i++) {
150
+            let obj = {}
151
+            let count = 0
152
+            for (let a = 0; a < details.length; a++) {
153
+              if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
154
+                obj['name'] = details[a].advice.advice_name
155
+                obj['spec'] = details[a].advice.drug.drug_spec
156
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
157
+                obj['price'] = parseFloat(details[a].pric)
158
+                obj['is_total'] = 2
159
+                count = count + details[a].cnt
160
+              }
161
+            }
162
+            obj['count'] = count
163
+            list.push(obj)
164
+          }
165
+        }
166
+
167
+        if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
168
+          for (let i = 0; i < new_project_ids.length; i++) {
169
+            let obj = {}
170
+            let count = 0
171
+            for (let a = 0; a < details.length; a++) {
172
+              if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
173
+                obj['name'] = details[a].project.project.project_name
174
+                obj['spec'] = '1'
175
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
176
+                obj['price'] = parseFloat(details[a].pric)
177
+                obj['is_total'] = 2
178
+
179
+                count = count + details[a].cnt
180
+              }
181
+            }
182
+            obj['count'] = count
183
+            list.push(obj)
184
+          }
185
+        }
186
+
187
+        return list
188
+
189
+      }, unique(array) {
190
+        // res用来存储结果
191
+        var res = []
192
+        for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
193
+          for (var j = 0, resLen = res.length; j < resLen; j++) {
194
+            if (array[i].id === res[j].id && array[i].price === res[j].price) {
195
+              break
196
+            }
197
+          }
198
+          // 如果array[i]是唯一的,那么执行完循环,j等于resLen
199
+          if (j === resLen) {
200
+            res.push(array[i])
201
+          }
202
+        }
203
+        return res
204
+      },
205
+
206
+      getType(med_chrgitm_type) {
207
+        switch (med_chrgitm_type) {
208
+          case '01':
209
+            return '床位费'
210
+            break
211
+          case '02':
212
+            return '诊察费'
213
+
214
+            break
215
+          case '03':
216
+            return '检查费'
217
+
218
+            break
219
+          case '04':
220
+            return '化验费'
221
+            break
222
+          case '05':
223
+            return '治疗费'
224
+
225
+            break
226
+          case '06':
227
+            return '手术费'
228
+
229
+            break
230
+          case '07':
231
+            return '护理费'
232
+
233
+            break
234
+          case '08':
235
+            return '材料费'
236
+
237
+            break
238
+          case '09':
239
+            return '西药费'
240
+
241
+            break
242
+          case '10':
243
+            return '中药饮片费'
244
+
245
+            break
246
+          case '11':
247
+            return '中成药费'
248
+
249
+            break
250
+          case '12':
251
+            return '一般诊疗费'
252
+
253
+            break
254
+          case '13':
255
+            return '挂号费'
256
+
257
+            break
258
+          case '14':
259
+            return '其他费'
260
+
261
+            break
262
+
263
+        }
264
+
265
+      },
266
+      printThisPage() {
267
+
268
+        const style =
269
+          '@media print {.allListTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.allListInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .allListTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;text-align:left;}.allListTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}'
270
+        printJS({
271
+          printable: 'allList-print',
272
+          type: 'html',
273
+          style: style,
274
+          scanStyles: false
275
+        })
276
+
277
+        // if (this.org_template_info.template_id == 1) {
278
+        //   printJS({
279
+        //     printable: "dialysis-print-box",
280
+        //     type: "html",
281
+        //     style: style,
282
+        //     scanStyles: false
283
+        //   });
284
+        // }
285
+      }
286
+    }
287
+
288
+  }
289
+</script>
290
+
291
+<style>
292
+  .dialysis-print-order {
293
+    width: 960px;
294
+    margin: 0 auto;
295
+  }
296
+
297
+  .dialysis-print-order .order-yy-name {
298
+    margin: auto;
299
+    text-align: center;
300
+    font-size: 20px;
301
+    letter-spacing: 5px;
302
+  }
303
+
304
+  .dialysis-print-order .order-title {
305
+    margin: auto;
306
+    font-weight: 600;
307
+    text-align: center;
308
+    font-size: 22px;
309
+    padding: 10px;
310
+  }
311
+
312
+  .dialysis-print-order .table-box {
313
+    width: 100%;
314
+    line-height: 23px;
315
+    font-size: 14px;
316
+  }
317
+
318
+  .dialysis-print-order .print-table {
319
+    width: 100%;
320
+    text-align: center;
321
+    border-collapse: collapse;
322
+    line-height: 40px;
323
+    font-size: 14px;
324
+    border-color: #000;
325
+  }
326
+
327
+  .dialysis-print-order .print-table-no {
328
+    width: 100%;
329
+    text-align: center;
330
+    border-collapse: collapse;
331
+    font-size: 14px;
332
+  }
333
+
334
+  .dialysis-print-order .under-line {
335
+    border-bottom: 1px solid #999;
336
+    width: 95%;
337
+    text-align: center;
338
+    margin-left: 2px;
339
+  }
340
+
341
+  .dialysis-print-order .title-box {
342
+    text-align: center;
343
+    font-size: 16px;
344
+  }
345
+
346
+  .dialysis-print-order .radio-lebel-box {
347
+    font-weight: 400;
348
+    cursor: pointer;
349
+  }
350
+
351
+  .dialysis-print-order .radio-no {
352
+    opacity: 0;
353
+    outline: none;
354
+    position: absolute;
355
+    margin: 0;
356
+    width: 0;
357
+    height: 0;
358
+    z-index: -1;
359
+  }
360
+
361
+  .dialysis-print-order .radio-inner {
362
+    white-space: nowrap;
363
+    cursor: pointer;
364
+    outline: none;
365
+    display: inline-block;
366
+    line-height: 1;
367
+    position: relative;
368
+    vertical-align: middle;
369
+  }
370
+
371
+  .dialysis-print-order .radio-fang {
372
+    display: inline-block;
373
+    position: relative;
374
+    border: 1px solid #000;
375
+    box-sizing: border-box;
376
+    width: 14px;
377
+    height: 14px;
378
+    background-color: #fff;
379
+    z-index: 1;
380
+    transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
381
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
382
+  }
383
+
384
+  .dialysis-print-order .is-checked-radio::after {
385
+    content: "√";
386
+    font-size: 15px;
387
+  }
388
+
389
+  .dialysis-print-order .print-table-no tr td {
390
+    padding: 8px 5px;
391
+    line-height: 25px;
392
+  }
393
+
394
+  .dialysis-print-order .print-table tr td {
395
+    padding: 1px 1px;
396
+    /*line-height: 25px;*/
397
+  }
398
+
399
+  .es-img {
400
+    height: 30px;
401
+  }
402
+
403
+  .advice-name {
404
+    text-align: left;
405
+  }
406
+
407
+  .advice-children {
408
+    display: flex;
409
+  }
410
+
411
+  .title-box-pro {
412
+    border: 0 #fff;
413
+    line-height: 25px;
414
+    height: 25px;
415
+    text-align: left;
416
+    padding-left: 10px !important;
417
+  }
418
+
419
+  .title-box-pro-tr {
420
+    border: 0 #fff;
421
+  }
422
+
423
+  .text-align-left {
424
+    text-align: left !important;
425
+    padding-left: 10px !important;
426
+    font-size: 14px !important;
427
+    line-height: 25px;
428
+  }
429
+
430
+  .print-table-tr-new td {
431
+    line-height: 20px !important;
432
+  }
433
+
434
+  .border-top-solid {
435
+    border: solid 1px #000;
436
+  }
437
+
438
+  .print-template-two tr {
439
+    line-height: 30px;
440
+  }
441
+
442
+  .table-box1 {
443
+    border: 1px solid #000;
444
+    width: 100%;
445
+    line-height: 30px;
446
+    font-size: 14px;
447
+    border-collapse: collapse;
448
+  }
449
+
450
+  .table-box1 tr {
451
+    border-bottom: 1px solid #000;
452
+  }
453
+</style>
454
+
455
+<style lang="scss">
456
+
457
+  .newContainer {
458
+
459
+  .dialysisPage::-webkit-scrollbar {
460
+    height: 15px;
461
+  }
462
+
463
+  .el-date-editor {
464
+
465
+  .el-input__inner {
466
+    padding-right: 0px;
467
+  }
468
+
469
+  }
470
+  .el-table td, .el-table th {
471
+    text-align: center;
472
+  }
473
+
474
+  }
475
+  .newContainer::-webkit-scrollbar {
476
+    height: 15px !important;
477
+  }
478
+</style>

+ 174 - 0
src/xt_pages/outpatientCharges/allListTemplate/printOne.vue View File

@@ -0,0 +1,174 @@
1
+<template>
2
+    <div id="allList-print" class="allList-print">
3
+        <div v-for='(i,index) in pageArr.length' :key="index">
4
+            <div class="allListTitle">翁源沅胜透析中心费用汇总</div>
5
+            <div class="allListInfo">
6
+            <div>患者姓名:{{patient.name}}</div>
7
+            <div>透析号:{{patient.dialysis_no}}</div>
8
+            <div>性别:{{patient.gender == 1 ? '男': '女'}}</div>
9
+            <div>年龄:{{patient.age}}  岁</div>
10
+            <div>日期:{{getTimes(order.settle_start_time)}} 至 {{getTimes(order.settle_end_time)}}</div>
11
+
12
+            </div>
13
+            <table class="allListTable" border="1">
14
+                <tr>
15
+                    <td style="width:10%">类别</td>
16
+                    <td style="width:50%">项目名称</td>
17
+                    <td style="width:10%">规格</td>
18
+                    <td style="width:10%">单价(元)</td>
19
+                    <td style="width:10%">数量</td>
20
+                    <td style="width:10%">金额(元)</td>
21
+                </tr>
22
+                <template v-for='item in list.slice(index * 13,(index * 14) + pageArr[index])'>
23
+                    <tr v-if="item.is_total == 2">
24
+                        <td style="width:10%">{{item.med_chrgitm_type}}</td>
25
+                        <td style="width:50%">{{item.name}}</td>
26
+                        <td style="width:10%">{{item.spec}}</td>
27
+                        <td style="width:10%">{{(item.price).toFixed(2)}}</td>
28
+                        <td style="width:10%">{{item.count}}</td>
29
+                        <td style="width:10%">{{(item.price * item.count).toFixed(2)}}</td>
30
+                    </tr>
31
+                    <tr>
32
+                        <td colspan="6" style="text-align:right;" v-if="item.is_total == 1">合计:{{item.total}}元</td>
33
+                    </tr>
34
+                </template>
35
+            </table>
36
+            <div class="tableBottom">
37
+            <div class="tableBottomOne">制表人:{{admin.user_name}}</div>
38
+            <div class="tableBottomOne">制表日期:{{ getNowTime()}}</div>
39
+            <div class="tableBottomOne">总费用:{{order.medfee_sumamt}}元</div>
40
+            </div>
41
+        </div>
42
+    </div>
43
+</template>
44
+
45
+<script>
46
+  import { uParseTime } from '@/utils/tools'
47
+
48
+  export default {
49
+    props: {
50
+      list: {
51
+        type: Array,
52
+        default: function () {
53
+          return [];
54
+        }
55
+      }, patient: {
56
+        type: Object,
57
+        default: function () {
58
+          return {};
59
+        }
60
+      }, order: {
61
+        type: Object,
62
+        default: function () {
63
+          return {};
64
+        }
65
+      }, admin: {
66
+        type: Object,
67
+        default: function () {
68
+          return {};
69
+        }
70
+      },
71
+    },
72
+    data(){
73
+        return{
74
+            page:1,
75
+            pageArr:[],
76
+        }
77
+    },
78
+    methods:{
79
+      getNowTime: function () {
80
+        let dateTime
81
+        let yy = new Date().getFullYear()
82
+        let mm = new Date().getMonth() + 1
83
+        let dd = new Date().getDate()
84
+        let hh = new Date().getHours()
85
+        let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
86
+          :
87
+          new Date().getMinutes()
88
+        let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
89
+          :
90
+          new Date().getSeconds()
91
+        dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
92
+        return dateTime
93
+      },
94
+      getTimes(time) {
95
+        return uParseTime(time, '{y}-{m}-{d}')
96
+      },getTotal:function(items){
97
+        let total = 0
98
+        for(let i = 0; i < items.length; i++){
99
+          total = total + (items[i].count * items[i].price).toFixed(2)
100
+        }
101
+        return total
102
+
103
+      },
104
+      getPage(){
105
+        if(this.list.length <= 13){
106
+            this.page = 1
107
+            this.pageArr.push(this.list.length)
108
+        }else if(this.list.length > 13){
109
+            this.page = parseInt(this.list.length / 13)
110
+            let num = this.list.length % 13
111
+            for (var i=0;i<this.page;i++){ 
112
+                this.pageArr.push(13)
113
+            }
114
+            if(num != 0){
115
+                this.pageArr.push(num)
116
+            }
117
+        }
118
+      }
119
+
120
+    },
121
+    watch:{
122
+        list: {
123
+            handler(newVal) {
124
+                this.getPage()
125
+            },
126
+            deep: true
127
+        }
128
+    }
129
+  }
130
+
131
+
132
+</script>
133
+
134
+<style lang="scss" scoped>
135
+.allList-print{
136
+    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
137
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
138
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
139
+    margin-bottom: 20px;
140
+    padding:20px 10px;
141
+}
142
+.allListTitle{
143
+    font-size: 28px;
144
+    text-align: center;
145
+    font-weight: bold;
146
+    margin-bottom: 10px;
147
+}
148
+.allListInfo{
149
+    display: flex;
150
+    font-size: 16px;
151
+    justify-content: space-between;
152
+    margin: 10px 0;
153
+}
154
+.allListTable{
155
+    width: 100%;
156
+    text-align: center;
157
+    border-collapse: collapse;
158
+    line-height: 40px;
159
+    font-size: 16px;
160
+    border-color: #000;
161
+    text-align: left;
162
+}
163
+.allListTable tr td {
164
+    padding: 0 5px;
165
+}
166
+.tableBottom{
167
+    font-size: 16px;
168
+    display: flex;
169
+    margin-top: 20px;
170
+}
171
+.tableBottomOne{
172
+    margin-right: 40px;
173
+}
174
+</style>

+ 4 - 1
src/xt_pages/outpatientCharges/components/registerDialog.vue View File

@@ -412,6 +412,8 @@
412 412
         }
413 413
         let params = {
414 414
           'id_card_type': this.form.id_card_type,
415
+          'admin_user_id':this.$store.getters.xt_user.user.id,
416
+
415 417
         }
416 418
         axios.get('http://127.0.0.1:9532/api/sscard', {
417 419
           params: params
@@ -455,6 +457,7 @@
455 457
         return getDictionaryDataConfig(module, filed_name)
456 458
       },
457 459
       show: function () {
460
+        this.form = Object.assign({}, this.resetForm)
458 461
         // this.form.name = patientInfo.name
459 462
         // this.form.gender = patientInfo.gender
460 463
         // this.form.age = patientInfo.age
@@ -472,6 +475,7 @@
472 475
 
473 476
       }, hide: function () {
474 477
         this.visibility = false
478
+        this.$refs['formValue'].resetFields()
475 479
       }, cancel: function (formName) {
476 480
         this.$emit('cancel', this.getValue())
477 481
         this.$refs['formValue'].resetFields()
@@ -482,7 +486,6 @@
482 486
             let value = {}
483 487
             value = this.getValue()
484 488
             this.$emit('confirm', value)
485
-            this.form = Object.assign({}, this.resetForm)
486 489
           }
487 490
         })
488 491
       },

+ 365 - 0
src/xt_pages/outpatientCharges/listPrint.vue View File

@@ -0,0 +1,365 @@
1
+<template>
2
+  <div>
3
+    <template>
4
+      <el-button
5
+        style="position:fixed;right:25px;z-index:999"
6
+        :loading="loading"
7
+        size="small"
8
+        icon="el-icon-printer"
9
+        @click="printThisPage"
10
+        type="primary"
11
+      >打印
12
+      </el-button
13
+      >
14
+    </template>
15
+
16
+    <div class='dialysisPage' style="padding-top:40px;">
17
+      <printOne :list="list" :patient="patient" :order="order" :admin="admin"></printOne>
18
+    </div>
19
+  </div>
20
+</template>
21
+
22
+<script>
23
+  import printOne from './listTemplate/printOne'
24
+  import { getHisOrderDetail } from '@/api/his/his'
25
+  import { uParseTime } from '@/utils/tools'
26
+
27
+  export default {
28
+    name: 'listPrint',
29
+    components: {
30
+      printOne
31
+    },
32
+    props: {
33
+      paramsObj: Object
34
+    },
35
+    data() {
36
+      return {
37
+        list: [],
38
+        patient:{},
39
+        order:{},
40
+        admin:{},
41
+      }
42
+    },
43
+    created() {
44
+      this.getInfo(this.paramsObj.id)
45
+    },
46
+
47
+    methods: {
48
+      getTimes(time) {
49
+        return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
50
+      },
51
+      getInfo(order_id) {
52
+        let params = {
53
+          id: order_id
54
+        }
55
+        getHisOrderDetail(params).then(response => {
56
+          if (response.data.state == 0) {
57
+            this.$message.error(response.data.msg)
58
+            return false
59
+          } else {
60
+            this.order = response.data.data.order
61
+            this.patient = response.data.data.patient
62
+            console.log(this.patient)
63
+            this.admin = response.data.data.admin_info
64
+
65
+
66
+            for (let i = 0; i < response.data.data.order_info.length; i++) {
67
+              var infos = response.data.data.order_info[i]
68
+              let obj = {
69
+                med_chrgitm_type: this.getType(infos.med_chrgitm_type),
70
+                price: infos.pric,
71
+                count: infos.cnt
72
+              }
73
+              if (infos.advice && infos.advice.id == 0 && infos.project && infos.project.id > 0) {
74
+                obj['p_time'] = this.getTimes(infos.project.prescription.ctime)
75
+                obj['name'] = infos.project.project.project_name
76
+                obj['spec'] = 1
77
+              }
78
+
79
+              if (infos.advice && infos.advice.id > 0 && infos.project && infos.project.id == 0) {
80
+                obj['p_time'] = this.getTimes(infos.advice.prescription.ctime)
81
+                obj['name'] = infos.advice.advice_name
82
+                obj['spec'] = infos.advice.drug.drug_spec
83
+              }
84
+              this.list.push(obj)
85
+              this.list.sort(function(a, b) {
86
+                return b.p_time < a.p_time ? 1 : -1
87
+              })
88
+
89
+            }
90
+          }
91
+        })
92
+      },
93
+      getType(med_chrgitm_type) {
94
+        switch (med_chrgitm_type) {
95
+          case '01':
96
+            return '床位费'
97
+            break
98
+          case '02':
99
+            return '诊察费'
100
+
101
+            break
102
+          case '03':
103
+            return '检查费'
104
+
105
+            break
106
+          case '04':
107
+            return '化验费'
108
+            break
109
+          case '05':
110
+            return '治疗费'
111
+
112
+            break
113
+          case '06':
114
+            return '手术费'
115
+
116
+            break
117
+          case '07':
118
+            return '护理费'
119
+
120
+            break
121
+          case '08':
122
+            return '材料费'
123
+
124
+            break
125
+          case '09':
126
+            return '西药费'
127
+
128
+            break
129
+          case '10':
130
+            return '中药饮片费'
131
+
132
+            break
133
+          case '11':
134
+            return '中成药费'
135
+
136
+            break
137
+          case '12':
138
+            return '一般诊疗费'
139
+
140
+            break
141
+          case '13':
142
+            return '挂号费'
143
+
144
+            break
145
+          case '14':
146
+            return '其他费'
147
+
148
+            break
149
+
150
+        }
151
+
152
+      },
153
+      printThisPage() {
154
+
155
+        const style =
156
+          '@media print {.listTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.listInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .listTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;text-align:left;}.listTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}'
157
+        printJS({
158
+          printable: 'list-print',
159
+          type: 'html',
160
+          style: style,
161
+          scanStyles: false
162
+        })
163
+
164
+        // if (this.org_template_info.template_id == 1) {
165
+        //   printJS({
166
+        //     printable: "dialysis-print-box",
167
+        //     type: "html",
168
+        //     style: style,
169
+        //     scanStyles: false
170
+        //   });
171
+        // }
172
+      }
173
+    }
174
+
175
+  }
176
+</script>
177
+
178
+<style>
179
+  .dialysis-print-order {
180
+    width: 960px;
181
+    margin: 0 auto;
182
+  }
183
+
184
+  .dialysis-print-order .order-yy-name {
185
+    margin: auto;
186
+    text-align: center;
187
+    font-size: 20px;
188
+    letter-spacing: 5px;
189
+  }
190
+
191
+  .dialysis-print-order .order-title {
192
+    margin: auto;
193
+    font-weight: 600;
194
+    text-align: center;
195
+    font-size: 22px;
196
+    padding: 10px;
197
+  }
198
+
199
+  .dialysis-print-order .table-box {
200
+    width: 100%;
201
+    line-height: 23px;
202
+    font-size: 14px;
203
+  }
204
+
205
+  .dialysis-print-order .print-table {
206
+    width: 100%;
207
+    text-align: center;
208
+    border-collapse: collapse;
209
+    line-height: 40px;
210
+    font-size: 14px;
211
+    border-color: #000;
212
+  }
213
+
214
+  .dialysis-print-order .print-table-no {
215
+    width: 100%;
216
+    text-align: center;
217
+    border-collapse: collapse;
218
+    font-size: 14px;
219
+  }
220
+
221
+  .dialysis-print-order .under-line {
222
+    border-bottom: 1px solid #999;
223
+    width: 95%;
224
+    text-align: center;
225
+    margin-left: 2px;
226
+  }
227
+
228
+  .dialysis-print-order .title-box {
229
+    text-align: center;
230
+    font-size: 16px;
231
+  }
232
+
233
+  .dialysis-print-order .radio-lebel-box {
234
+    font-weight: 400;
235
+    cursor: pointer;
236
+  }
237
+
238
+  .dialysis-print-order .radio-no {
239
+    opacity: 0;
240
+    outline: none;
241
+    position: absolute;
242
+    margin: 0;
243
+    width: 0;
244
+    height: 0;
245
+    z-index: -1;
246
+  }
247
+
248
+  .dialysis-print-order .radio-inner {
249
+    white-space: nowrap;
250
+    cursor: pointer;
251
+    outline: none;
252
+    display: inline-block;
253
+    line-height: 1;
254
+    position: relative;
255
+    vertical-align: middle;
256
+  }
257
+
258
+  .dialysis-print-order .radio-fang {
259
+    display: inline-block;
260
+    position: relative;
261
+    border: 1px solid #000;
262
+    box-sizing: border-box;
263
+    width: 14px;
264
+    height: 14px;
265
+    background-color: #fff;
266
+    z-index: 1;
267
+    transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
268
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
269
+  }
270
+
271
+  .dialysis-print-order .is-checked-radio::after {
272
+    content: "√";
273
+    font-size: 15px;
274
+  }
275
+
276
+  .dialysis-print-order .print-table-no tr td {
277
+    padding: 8px 5px;
278
+    line-height: 25px;
279
+  }
280
+
281
+  .dialysis-print-order .print-table tr td {
282
+    padding: 1px 1px;
283
+    /*line-height: 25px;*/
284
+  }
285
+
286
+  .es-img {
287
+    height: 30px;
288
+  }
289
+
290
+  .advice-name {
291
+    text-align: left;
292
+  }
293
+
294
+  .advice-children {
295
+    display: flex;
296
+  }
297
+
298
+  .title-box-pro {
299
+    border: 0 #fff;
300
+    line-height: 25px;
301
+    height: 25px;
302
+    text-align: left;
303
+    padding-left: 10px !important;
304
+  }
305
+
306
+  .title-box-pro-tr {
307
+    border: 0 #fff;
308
+  }
309
+
310
+  .text-align-left {
311
+    text-align: left !important;
312
+    padding-left: 10px !important;
313
+    font-size: 14px !important;
314
+    line-height: 25px;
315
+  }
316
+
317
+  .print-table-tr-new td {
318
+    line-height: 20px !important;
319
+  }
320
+
321
+  .border-top-solid {
322
+    border: solid 1px #000;
323
+  }
324
+
325
+  .print-template-two tr {
326
+    line-height: 30px;
327
+  }
328
+
329
+  .table-box1 {
330
+    border: 1px solid #000;
331
+    width: 100%;
332
+    line-height: 30px;
333
+    font-size: 14px;
334
+    border-collapse: collapse;
335
+  }
336
+
337
+  .table-box1 tr {
338
+    border-bottom: 1px solid #000;
339
+  }
340
+</style>
341
+
342
+<style lang="scss">
343
+
344
+  .newContainer {
345
+
346
+  .dialysisPage::-webkit-scrollbar {
347
+    height: 15px;
348
+  }
349
+
350
+  .el-date-editor {
351
+
352
+  .el-input__inner {
353
+    padding-right: 0px;
354
+  }
355
+
356
+  }
357
+  .el-table td, .el-table th {
358
+    text-align: center;
359
+  }
360
+
361
+  }
362
+  .newContainer::-webkit-scrollbar {
363
+    height: 15px !important;
364
+  }
365
+</style>

+ 170 - 0
src/xt_pages/outpatientCharges/listTemplate/printOne.vue View File

@@ -0,0 +1,170 @@
1
+<template>
2
+    <div id="list-print" class="list-print">
3
+        <div v-for='(i,index) in pageArr.length' :key="index">
4
+        <div class="listTitle">翁源沅胜透析中心费用清单</div>
5
+        <div class="listInfo">
6
+
7
+            <div>患者姓名:{{patient.name}}</div>
8
+            <div>透析号:{{patient.dialysis_no}}</div>
9
+            <div>性别:{{patient.gender == 1 ? '男': '女'}}</div>
10
+            <div>年龄:{{patient.age}}  岁</div>
11
+            <div>收费日期:{{getTimes(order.settle_start_time)}} 至 {{getTimes(order.settle_end_time)}}</div>
12
+
13
+        </div>
14
+        <table class="listTable" border="1">
15
+            <tr>
16
+                <td style="width:19%">开方日期</td>
17
+                <td style="width:10%">类别</td>
18
+                <td style="width:31%">项目名称</td>
19
+                <td style="width:14%">规格</td>
20
+                <td style="width:10%">单价(元)</td>
21
+                <td style="width:6%">数量</td>
22
+                <td style="width:10%">金额(元)</td>
23
+            </tr>
24
+            <tr v-for="item in list.slice(index * 13,(index * 14) + pageArr[index])">
25
+                <td style="width:19%">{{item.p_time}}</td>
26
+                <td style="width:10%">{{item.med_chrgitm_type}}</td>
27
+                <td style="width:31%">{{item.name}}</td>
28
+                <td style="width:14%">{{item.spec}}</td>
29
+                <td style="width:10%">{{(item.price).toFixed(2)}}</td>
30
+                <td style="width:6%">{{item.count}}</td>
31
+                <td style="width:10%">{{(item.price * item.count).toFixed(2)}}</td>
32
+            </tr>
33
+        </table>
34
+        <div class="tableBottom">
35
+            <div class="tableBottomOne">制表人:{{admin.user_name}}</div>
36
+            <div class="tableBottomOne">制表日期:{{ getNowTime()}}</div>
37
+            <div class="tableBottomOne">总费用:{{order.medfee_sumamt}}元</div>
38
+        </div>
39
+        </div>
40
+    </div>
41
+</template>
42
+
43
+<script>
44
+  import { uParseTime } from '@/utils/tools'
45
+
46
+  export default {
47
+    props: {
48
+      list: {
49
+        type: Array,
50
+        default: function () {
51
+          return [];
52
+        }
53
+      },
54
+      patient: {
55
+        type: Object,
56
+        default: function () {
57
+          return {};
58
+        }
59
+      }, order: {
60
+        type: Object,
61
+        default: function () {
62
+          return {};
63
+        }
64
+      }, admin: {
65
+        type: Object,
66
+        default: function () {
67
+          return {};
68
+        }
69
+      },
70
+    },
71
+    data(){
72
+        return{
73
+            page:1,
74
+            pageArr:[],
75
+        }
76
+    },
77
+    // mounted(){
78
+    //     this.getPage()
79
+    // },
80
+    methods:{
81
+      getNowTime: function () {
82
+        let dateTime
83
+        let yy = new Date().getFullYear()
84
+        let mm = new Date().getMonth() + 1
85
+        let dd = new Date().getDate()
86
+        let hh = new Date().getHours()
87
+        let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
88
+          :
89
+          new Date().getMinutes()
90
+        let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
91
+          :
92
+          new Date().getSeconds()
93
+        dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
94
+        return dateTime
95
+      },
96
+      getTimes(time) {
97
+        return uParseTime(time, '{y}-{m}-{d}')
98
+      },
99
+      getPage(){
100
+        if(this.list.length <= 13){
101
+            this.page = 1
102
+            this.pageArr.push(this.list.length)
103
+        }else if(this.list.length > 13){
104
+            this.page = parseInt(this.list.length / 13)
105
+            let num = this.list.length % 13
106
+            for (var i=0;i<this.page;i++){
107
+                this.pageArr.push(13)
108
+            }
109
+            if(num != 0){
110
+                this.pageArr.push(num)
111
+            }
112
+        }
113
+      }
114
+
115
+    },
116
+    watch:{
117
+        list: {
118
+            handler(newVal) {
119
+                this.getPage()
120
+            },
121
+            deep: true
122
+        }
123
+    }
124
+
125
+  }
126
+
127
+
128
+</script>
129
+
130
+<style lang="scss" scoped>
131
+.list-print{
132
+    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
133
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
134
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
135
+    margin-bottom: 20px;
136
+    padding:20px 10px;
137
+}
138
+.listTitle{
139
+    font-size: 28px;
140
+    text-align: center;
141
+    font-weight: bold;
142
+    margin-bottom: 10px;
143
+}
144
+.listInfo{
145
+    display: flex;
146
+    font-size: 16px;
147
+    justify-content: space-between;
148
+    margin: 10px 0;
149
+}
150
+.listTable{
151
+    width: 100%;
152
+    text-align: center;
153
+    border-collapse: collapse;
154
+    line-height: 40px;
155
+    font-size: 16px;
156
+    border-color: #000;
157
+    text-align: left;
158
+}
159
+.listTable tr td {
160
+    padding: 0 5px;
161
+}
162
+.tableBottom{
163
+    font-size: 16px;
164
+    display: flex;
165
+    margin-top: 20px;
166
+}
167
+.tableBottomOne{
168
+    margin-right: 40px;
169
+}
170
+</style>

+ 422 - 0
src/xt_pages/outpatientCharges/newStatementPrint.vue View File

@@ -0,0 +1,422 @@
1
+<template>
2
+  <div>
3
+    <template>
4
+      <el-button
5
+        style="position:fixed;right:25px;z-index:999"
6
+        :loading="loading"
7
+        size="small"
8
+        icon="el-icon-printer"
9
+        @click="printThisPage"
10
+        type="primary"
11
+      >打印</el-button
12
+      >
13
+    </template>
14
+
15
+    <div class='dialysisPage' style="padding-top:40px;">
16
+      <printOne :info="info" :p_admin="p_admin" :charge_admin="charge_admin"></printOne>
17
+    </div>
18
+  </div>
19
+</template>
20
+
21
+<script>
22
+
23
+
24
+  import { parseTime } from "@/utils";
25
+  import { getDialysisRecord } from "@/api/dialysis";
26
+  import { getDataConfig } from "@/utils/data";
27
+  import { jsGetAge, uParseTime } from "@/utils/tools";
28
+  import axios from 'axios'
29
+
30
+  import BreadCrumb from "@/xt_pages/components/bread-crumb";
31
+  import print from "print-js";
32
+  import printOne from "./statementTemplate/printOne"
33
+  import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
34
+  export default {
35
+    name: "newStatementPrint",
36
+    components: {
37
+      BreadCrumb,
38
+      printOne
39
+    },
40
+    props:{
41
+      paramsObj:Object
42
+    },
43
+    data() {
44
+      return {
45
+        crumbs: [
46
+          { path: false, name: '门诊医生站' },
47
+          { path: false, name: '打印' }
48
+        ],
49
+        record_date:"",
50
+        patientTableData:[],
51
+        advicePrint:[],
52
+        hisPatient:{},
53
+        patient:{},
54
+        search_input:"",
55
+        loading:false,
56
+        patient_id:0,
57
+        prescription_id:0,
58
+        ids:'',
59
+        info:null,
60
+        p_admin:{},
61
+        charge_admin:{},
62
+      };
63
+    },
64
+    methods:{
65
+      printThisPage() {
66
+        var ptime = Math.round(new Date().getTime() / 1000);
67
+        this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
68
+
69
+        const style =
70
+          '@media print {.statementTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.statementTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;}}';
71
+        printJS({
72
+          printable: "statement-print",
73
+          type: "html",
74
+          style: style,
75
+          scanStyles: false
76
+        });
77
+
78
+        // if (this.org_template_info.template_id == 1) {
79
+        //   printJS({
80
+        //     printable: "dialysis-print-box",
81
+        //     type: "html",
82
+        //     style: style,
83
+        //     scanStyles: false
84
+        //   });
85
+        // }
86
+      },
87
+      getAllDoctorList(){
88
+        getAllDoctorList().then(response=>{
89
+          if(response.data.state == 1){
90
+            var doctor =  response.data.data.doctor
91
+
92
+            this.doctorList = doctor
93
+          }
94
+        })
95
+      },
96
+      getAllHisPatientList(){
97
+        const params = {
98
+          record_date:this.record_date
99
+        }
100
+        getAllHisPatientList(params).then(response=>{
101
+          if(response.data.state == 1){
102
+            this.patientTableData = response.data.data.list
103
+            this.patientTableDataTwo = response.data.data.list
104
+
105
+            console.log('222', this.patientTableData)
106
+            let cal_one = 0
107
+            let cal_two = 0
108
+            for (let i = 0; i < response.data.data.list.length; i++) {
109
+              if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
110
+                cal_one = cal_one + 1
111
+              }
112
+              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
113
+                cal_two = cal_two + 1
114
+              }
115
+            }
116
+            // this.$refs.tab.setCurrentRow(this.patientTableData[0])
117
+            // console.log(this.patientTableData[0])
118
+            // this.choosePatient(this.patientTableData[0])
119
+            this.cal_one = cal_one
120
+            this.cal_two = cal_two
121
+          }
122
+        })
123
+      },
124
+
125
+      changePatient(row){
126
+        console.log("row",row)
127
+        this.patient_id = row.patient_id
128
+        this.record_date = this.record_date
129
+        this.prescription_id = this.prescription_id
130
+        //   var params = {
131
+        //     patient_id:row.patient_id,
132
+        //     record_date:this.record_date,
133
+        //     prescription_id:this.prescription_id,
134
+        //   }
135
+        // getPrescriptionPrint(params).then(response=>{
136
+        //     if(response.data.state == 1){
137
+        //       var advicePrint =  response.data.data.advicePrint
138
+        //       console.log("adviceprint",advicePrint)
139
+        //       this.advicePrint = advicePrint
140
+        //       // var hisPatient =  response.data.data.hisPatient
141
+        //       // console.log("hispatient",hisPatient)
142
+        //       // this.hisPatient = hisPatient
143
+        //       var patient =  response.data.data.patient
144
+        //       console.log("patient",patient)
145
+        //       this.patient = patient
146
+        //       var doctorPorject = response.data.data.doctorPorject
147
+        //       console.log("doctorporject",doctorPorject)
148
+        //     }
149
+        // })
150
+      },
151
+      searchAction(){
152
+
153
+      },
154
+      getInfo(order_id) {
155
+        if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919) {
156
+
157
+          var that = this
158
+
159
+          axios.get('http://127.0.0.1:9532/api/settle/query', {
160
+            params: {
161
+              order_id: order_id,
162
+              admin_user_id:that.$store.getters.xt_user.user.id
163
+            }
164
+          })
165
+            .then(function (response) {
166
+              if (response.data.state == 0) {
167
+                this.$message.error(response.data.msg)
168
+                return false
169
+              } else {
170
+                console.log("logloglog")
171
+
172
+                console.log(response.data.data.info)
173
+                that.info = response.data.data.info
174
+                that.p_admin = response.data.data.printor_admin
175
+                that.charge_admin = response.data.data.charge_admin
176
+
177
+
178
+                console.log(that.info)
179
+
180
+                that.info['bed_cost_total'] = response.data.data.bedCostTotal
181
+                that.info['bed_cost_self_total'] = response.data.data.bedCostSelfTotal
182
+                that.info['bed_cost_part_self_total'] = response.data.data.bedCostPartSelfTotal
183
+
184
+                that.info['operation_cost_total'] = response.data.data.operationCostTotal
185
+                that.info['operation_cost_self_total'] = response.data.data.operationCostSelfTotal
186
+                that.info['operation_cost_part_self_total'] = response.data.data.operationCostPartSelfTotal
187
+
188
+                that.info['other_cost_total'] = response.data.data.otherCostTotal
189
+                that.info['other_cost_self_total'] = response.data.data.otherCostSelfTotal
190
+                that.info['other_cost_part_self_total'] = response.data.data.otherCostPartSelfTotal
191
+
192
+                that.info['material_cost_total'] = response.data.data.materialCostTotal
193
+                that.info['material_cost_self_total'] = response.data.data.materialCostSelfTotal
194
+                that.info['material_cost_part_self_total'] = response.data.data.materialCostPartSelfTotal
195
+
196
+                that.info['western_medicine_cost_total'] = response.data.data.westernMedicineCostTotal
197
+                that.info['western_medicine_cost_self_total'] = response.data.data.westernMedicineCostSelfTotal
198
+                that.info['western_medicine_cost_part_self_total'] = response.data.data.westernMedicineCostPartSelfTotal
199
+
200
+                that.info['chinese_traditional_medicine_cost_total'] = response.data.data.chineseTraditionalMedicineCostTotal
201
+                that.info['chinese_traditional_medicine_cost_self_total'] = response.data.data.chineseTraditionalMedicineCostSelfTotal
202
+                that.info['chinese_traditional_medicine_cost_part_self_total'] = response.data.data.chineseTraditionalMedicineCostPartSelfTotal
203
+
204
+
205
+                that.info['check_cost_total'] = response.data.data.checkCostTotal
206
+                that.info['check_cost_self_total'] = response.data.data.checkCostSelfTotal
207
+                that.info['check_cost_part_self_total'] = response.data.data.checkCostPartSelfTotal
208
+
209
+
210
+                that.info['laboratory_cost_total'] = response.data.data.laboratoryCostTotal
211
+                that.info['laboratory_cost_self_total'] = response.data.data.laboratoryCostSelfTotal
212
+                that.info['laboratory_cost_part_self_total'] = response.data.data.laboratoryCostPartSelfTotal
213
+
214
+                that.info['treat_cost_total'] = response.data.data.treatCostTotal
215
+                that.info['treat_cost_self_total'] = response.data.data.treatCostSelfTotal
216
+                that.info['treat_cost_part_self_total'] = response.data.data.treatCostPartSelfTotal
217
+                console.log(this.info)
218
+              }
219
+            })
220
+            .catch(function (error) {
221
+
222
+            });
223
+        }
224
+      }
225
+
226
+    },
227
+
228
+    created() {
229
+      this.getInfo(this.paramsObj.order_id)
230
+    },
231
+    watch:{
232
+      paramsObj:{//深度监听,可监听到对象、数组的变化
233
+        handler(val, oldVal){
234
+          this.paramsObj = val
235
+          this.getInfo(this.paramsObj.order_id)
236
+
237
+        },
238
+        deep:true
239
+      }
240
+    }
241
+
242
+  };
243
+</script>
244
+
245
+<style>
246
+  .dialysis-print-order {
247
+    width: 960px;
248
+    margin: 0 auto;
249
+  }
250
+
251
+  .dialysis-print-order .order-yy-name {
252
+    margin: auto;
253
+    text-align: center;
254
+    font-size: 20px;
255
+    letter-spacing: 5px;
256
+  }
257
+
258
+  .dialysis-print-order .order-title {
259
+    margin: auto;
260
+    font-weight: 600;
261
+    text-align: center;
262
+    font-size: 22px;
263
+    padding: 10px;
264
+  }
265
+
266
+  .dialysis-print-order .table-box {
267
+    width: 100%;
268
+    line-height: 23px;
269
+    font-size: 14px;
270
+  }
271
+
272
+  .dialysis-print-order .print-table {
273
+    width: 100%;
274
+    text-align: center;
275
+    border-collapse: collapse;
276
+    line-height: 40px;
277
+    font-size: 14px;
278
+    border-color: #000;
279
+  }
280
+
281
+  .dialysis-print-order .print-table-no {
282
+    width: 100%;
283
+    text-align: center;
284
+    border-collapse: collapse;
285
+    font-size: 14px;
286
+  }
287
+
288
+  .dialysis-print-order .under-line {
289
+    border-bottom: 1px solid #999;
290
+    width: 95%;
291
+    text-align: center;
292
+    margin-left: 2px;
293
+  }
294
+
295
+  .dialysis-print-order .title-box {
296
+    text-align: center;
297
+    font-size: 16px;
298
+  }
299
+
300
+  .dialysis-print-order .radio-lebel-box {
301
+    font-weight: 400;
302
+    cursor: pointer;
303
+  }
304
+
305
+  .dialysis-print-order .radio-no {
306
+    opacity: 0;
307
+    outline: none;
308
+    position: absolute;
309
+    margin: 0;
310
+    width: 0;
311
+    height: 0;
312
+    z-index: -1;
313
+  }
314
+
315
+  .dialysis-print-order .radio-inner {
316
+    white-space: nowrap;
317
+    cursor: pointer;
318
+    outline: none;
319
+    display: inline-block;
320
+    line-height: 1;
321
+    position: relative;
322
+    vertical-align: middle;
323
+  }
324
+
325
+  .dialysis-print-order .radio-fang {
326
+    display: inline-block;
327
+    position: relative;
328
+    border: 1px solid #000;
329
+    box-sizing: border-box;
330
+    width: 14px;
331
+    height: 14px;
332
+    background-color: #fff;
333
+    z-index: 1;
334
+    transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
335
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
336
+  }
337
+
338
+  .dialysis-print-order .is-checked-radio::after {
339
+    content: "√";
340
+    font-size: 15px;
341
+  }
342
+
343
+  .dialysis-print-order .print-table-no tr td {
344
+    padding: 8px 5px;
345
+    line-height: 25px;
346
+  }
347
+
348
+  .dialysis-print-order .print-table tr td {
349
+    padding: 1px 1px;
350
+    /*line-height: 25px;*/
351
+  }
352
+
353
+  .es-img {
354
+    height: 30px;
355
+  }
356
+
357
+  .advice-name {
358
+    text-align: left;
359
+  }
360
+
361
+  .advice-children {
362
+    display: flex;
363
+  }
364
+
365
+  .title-box-pro {
366
+    border: 0 #fff;
367
+    line-height: 25px;
368
+    height: 25px;
369
+    text-align: left;
370
+    padding-left: 10px !important;
371
+  }
372
+  .title-box-pro-tr {
373
+    border: 0 #fff;
374
+  }
375
+  .text-align-left {
376
+    text-align: left !important;
377
+    padding-left: 10px !important;
378
+    font-size: 14px !important;
379
+    line-height: 25px;
380
+  }
381
+  .print-table-tr-new td {
382
+    line-height: 20px !important;
383
+  }
384
+  .border-top-solid {
385
+    border: solid 1px #000;
386
+  }
387
+  .print-template-two tr {
388
+    line-height: 30px;
389
+  }
390
+
391
+  .table-box1 {
392
+    border: 1px solid #000;
393
+    width: 100%;
394
+    line-height: 30px;
395
+    font-size: 14px;
396
+    border-collapse: collapse;
397
+  }
398
+  .table-box1 tr {
399
+    border-bottom: 1px solid #000;
400
+  }
401
+</style>
402
+
403
+<style lang="scss">
404
+
405
+  .newContainer{
406
+  .dialysisPage::-webkit-scrollbar {
407
+    height: 15px;
408
+  }
409
+
410
+  .el-date-editor{
411
+  .el-input__inner{
412
+    padding-right:0px;
413
+  }
414
+  }
415
+  .el-table td, .el-table th{
416
+    text-align: center;
417
+  }
418
+  }
419
+  .newContainer::-webkit-scrollbar{
420
+    height: 15px !important;
421
+  }
422
+</style>

+ 73 - 39
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -73,9 +73,13 @@
73 73
                      @click="open(4)"
74 74
                      type="primary">收费
75 75
           </el-button>
76
+
76 77
           <el-button size="small" @click="open(5)" type="primary"
77
-                    >退费
78
+                     v-if="this.hisPatientInfo.id > 0 && this.order.id > 0 &&  this.order.order_status == 2">退费
78 79
           </el-button>
80
+          <!-- <el-button size="small" @click="open(5)" type="primary"
81
+                    >退费
82
+          </el-button> -->
79 83
 
80 84
 
81 85
           <!--<el-button v-if="this.info.prescription_status >= 2" size="small" @click="open(7)" type="primary"-->
@@ -91,7 +95,7 @@
91 95
           </el-button>
92 96
 
93 97
           <!--<el-button v-if="this.$store.getters.xt_user.org_id == 9919"-->
94
-                     <!--size="small" @click="open(10)" type="primary"-->
98
+          <!--size="small" @click="open(10)" type="primary"-->
95 99
           <!--&gt;退号-->
96 100
           <!--</el-button>-->
97 101
 
@@ -110,6 +114,10 @@
110 114
           <!--&gt;查待遇-->
111 115
           <!--</el-button>-->
112 116
 
117
+          <!--<el-button  size="small" @click="query" type="primary"-->
118
+          <!--&gt;查询-->
119
+          <!--</el-button>-->
120
+
113 121
 
114 122
         </div>
115 123
 
@@ -460,6 +468,25 @@
460 468
       this.getPatientList()
461 469
     },
462 470
     methods: {
471
+      query() {
472
+        if (this.$store.getters.xt_user.org_id == 4) {
473
+          var that = this
474
+          axios.get('http://127.0.0.1:9532/api/org/info', {
475
+            params: {}
476
+          })
477
+            .then(function(response) {
478
+              if (response.data.state == 0) {
479
+                that.$message.error(response.data.msg)
480
+                return false
481
+              } else {
482
+
483
+              }
484
+            })
485
+            .catch(function(error) {
486
+
487
+            })
488
+        }
489
+      },
463 490
       getDepartment(department_id) {
464 491
         for (let i = 0; i < this.department.length; i++) {
465 492
           if (this.department[i].id == department_id) {
@@ -1723,7 +1750,8 @@
1723 1750
 
1724 1751
           }
1725 1752
         })
1726
-      }, setMonthPrescription(month_prescriptions) {
1753
+      },
1754
+      setMonthPrescription(month_prescriptions) {
1727 1755
         this.month_prescriptions = []
1728 1756
 
1729 1757
         let drug_month_prescriptions = {
@@ -1745,47 +1773,45 @@
1745 1773
         for (let i = 0; i < month_prescriptions.length; i++) {
1746 1774
           if (month_prescriptions[i].type == 1) { //药品
1747 1775
             for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
1748
-              drug_ids.push(month_prescriptions[i].advices[a].drug_id)
1776
+              let obj = {
1777
+                id: month_prescriptions[i].advices[a].drug_id,
1778
+                price: month_prescriptions[i].advices[a].price
1779
+
1780
+              }
1781
+              drug_ids.push(obj)
1782
+              // drug_ids.push(month_prescriptions[i].advices[a].drug_id)
1783
+
1749 1784
               drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
1750 1785
             }
1751 1786
 
1752 1787
           } else if (month_prescriptions[i].type == 2) { //项目
1753 1788
             for (let a = 0; a < month_prescriptions[i].project.length; a++) {
1754
-              project_ids.push(month_prescriptions[i].project[a].project_id)
1789
+              let obj = {
1790
+                id: month_prescriptions[i].project[a].project_id,
1791
+                price: month_prescriptions[i].project[a].price
1792
+
1793
+              }
1794
+              project_ids.push(obj)
1755 1795
               project_month_prescriptions.project.push(month_prescriptions[i].project[a])
1756 1796
             }
1757 1797
           }
1758 1798
           //附加收费
1759 1799
           for (let a = 0; a < month_prescriptions[i].addition.length; a++) {
1760
-            additions_ids.push(month_prescriptions[i].addition[a].item_id)
1800
+            let obj = {
1801
+              id: month_prescriptions[i].addition[a].item_id,
1802
+              price: month_prescriptions[i].addition[a].price
1803
+
1804
+            }
1805
+            additions_ids.push(obj)
1761 1806
             addition_month_prescriptions.addition.push(month_prescriptions[i].addition[a])
1762 1807
 
1763 1808
           }
1764 1809
 
1765 1810
         }
1766 1811
 
1767
-        const obj = {}
1768
-        const obj1 = {}
1769
-        const obj2 = {}
1770
-
1771
-        drug_ids = drug_ids.reduce((cur, next) => {
1772
-          obj[next] ? '' : obj[next] = true && cur.push(next)
1773
-          return cur
1774
-        }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1775
-        project_ids = project_ids.reduce((cur, next) => {
1776
-          obj1[next] ? '' : obj1[next] = true && cur.push(next)
1777
-          return cur
1778
-        }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1779
-        additions_ids = additions_ids.reduce((cur, next) => {
1780
-          obj2[next] ? '' : obj2[next] = true && cur.push(next)
1781
-          return cur
1782
-        }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1783
-
1784
-        console.log(drug_ids)
1785
-        console.log(project_ids)
1786
-        console.log(additions_ids)
1787
-
1788
-        console.log(additions_ids)
1812
+        drug_ids = this.unique_two(drug_ids)
1813
+        project_ids = this.unique_two(project_ids)
1814
+        additions_ids = this.unique_two(additions_ids)
1789 1815
 
1790 1816
         let drugs = []
1791 1817
         let projects = []
@@ -1795,7 +1821,8 @@
1795 1821
           let obj = {}
1796 1822
           let count = 0
1797 1823
           for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
1798
-            if (drug_ids[i] == drug_month_prescriptions.advices[a].drug_id) {
1824
+            if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id == drug_month_prescriptions.advices[a].drug_id) {
1825
+
1799 1826
               obj['drug_name'] = drug_month_prescriptions.advices[a].advice_name
1800 1827
               obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
1801 1828
               obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
@@ -1819,7 +1846,7 @@
1819 1846
           let obj = {}
1820 1847
           let count = 0
1821 1848
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
1822
-            if (project_ids[i] == project_month_prescriptions.project[a].project_id) {
1849
+            if (project_ids[i].price == project_month_prescriptions.project[a].price &&project_ids[i].id == project_month_prescriptions.project[a].project_id ) {
1823 1850
               obj['project_name'] = project_month_prescriptions.project[a].project.project_name
1824 1851
               obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
1825 1852
               obj['single_dose'] = project_month_prescriptions.project[a].single_dose
@@ -1842,10 +1869,9 @@
1842 1869
         for (let i = 0; i < additions_ids.length; i++) {
1843 1870
           let obj = {}
1844 1871
           let count = 0
1845
-          console.log(addition_month_prescriptions.addition)
1846 1872
           if (addition_month_prescriptions.addition) {
1847 1873
             for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
1848
-              if (project_ids[i] == addition_month_prescriptions.addition[a].item_id) {
1874
+              if (additions_ids[i].price == addition_month_prescriptions.addition[a].price &&additions_ids[i].id == addition_month_prescriptions.addition[a].item_id) {
1849 1875
                 obj['item_name'] = addition_month_prescriptions.addition[a].item_name
1850 1876
                 obj['id'] = addition_month_prescriptions.addition[a].id
1851 1877
                 obj['item_id'] = addition_month_prescriptions.addition[a].item_id
@@ -1858,10 +1884,6 @@
1858 1884
           }
1859 1885
         }
1860 1886
 
1861
-        console.log(drugs)
1862
-        console.log(projects)
1863
-        console.log(additions)
1864
-
1865 1887
         let p1 = {
1866 1888
           name: '处方' + 1,
1867 1889
           advices: drugs,
@@ -1875,16 +1897,28 @@
1875 1897
           project: projects,
1876 1898
           advices: [],
1877 1899
           addition: []
1878
-
1879 1900
         }
1880
-        console.log(this.month_prescriptions)
1881
-        console.log(this.curMonthPrescriptions)
1882 1901
 
1883 1902
         this.month_prescriptions.push(p1)
1884 1903
         this.month_prescriptions.push(p2)
1885 1904
 
1886 1905
         this.curMonthPrescriptions = this.month_prescriptions[0]
1887 1906
 
1907
+      }, unique_two(array) {
1908
+        // res用来存储结果
1909
+        var res = []
1910
+        for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
1911
+          for (var j = 0, resLen = res.length; j < resLen; j++) {
1912
+            if (array[i].id === res[j].id && array[i].price === res[j].price) {
1913
+              break
1914
+            }
1915
+          }
1916
+          // 如果array[i]是唯一的,那么执行完循环,j等于resLen
1917
+          if (j === resLen) {
1918
+            res.push(array[i])
1919
+          }
1920
+        }
1921
+        return res
1888 1922
       },
1889 1923
 
1890 1924
       unique(arr) {

+ 2 - 0
src/xt_pages/outpatientCharges/statementPrint.vue View File

@@ -157,6 +157,8 @@ export default {
157 157
         axios.get('http://127.0.0.1:9532/api/settle/query', {
158 158
           params: {
159 159
             order_id: order_id,
160
+            admin_user_id:this.$store.getters.xt_user.user.id,
161
+
160 162
           }
161 163
         })
162 164
           .then(function (response) {

+ 335 - 243
src/xt_pages/outpatientCharges/statementTemplate/printOne.vue View File

@@ -1,251 +1,342 @@
1 1
 <template>
2
-    <div id="statement-print" class="statement-print">
3
-        <div class="statementTitle">广东省社会医疗保险医疗费用结算单</div>
4
-        <table class="statementTable" border="1">
5
-            <tr>
6
-                <td width="80">机构名称</td>
7
-                <td colspan="4">{{info.fixmedins_name}}</td>
8
-                <td width="80">机构编码</td>
9
-                <td colspan="4">{{info.fixmedins_code}}</td>
10
-                <td width="100">医保结算级别</td>
11
-                <td width="100"></td>
12
-            </tr>
13
-            <tr>
14
-                <td width="90">就医登记号</td>
15
-                <td colspan="11">{{info.psn_no}}</td>
16
-            </tr>
17
-            <tr>
18
-                <td width="80">姓名</td>
19
-                <td width="80">{{info.psn_name}}</td>
20
-                <td width="80">性别</td>
21
-                <td width="50" v-if="info.gend == '1'">男</td>
22
-              <td width="50" v-if="info.gend == '2'">女</td>
2
+  <div id="statement-print" class="statement-print">
3
+    <div class="statementTitle">广东省社会医疗保险医疗费用结算单</div>
4
+    <table class="statementTable" border="1">
5
+      <tr>
6
+        <td width="80">机构名称</td>
7
+        <td colspan="4">{{info.fixmedins_name}}</td>
8
+        <td width="80">机构编码</td>
9
+        <td colspan="4">{{info.fixmedins_code}}</td>
10
+        <td width="100">医保结算级别</td>
11
+        <td width="100" v-if="info.hosp_lv == '1'">三级特等</td>
12
+        <td width="100" v-if="info.hosp_lv == '2'">三级甲等</td>
13
+        <td width="100" v-if="info.hosp_lv == '3'">三级乙等</td>
14
+        <td width="100" v-if="info.hosp_lv == '4'">三级丙等</td>
15
+        <td width="100" v-if="info.hosp_lv == '5'">二级甲等</td>
16
+        <td width="100" v-if="info.hosp_lv == '6'">二级乙等</td>
17
+        <td width="100" v-if="info.hosp_lv == '7'">二级丙等</td>
18
+        <td width="100" v-if="info.hosp_lv == '8'">一级甲等</td>
19
+        <td width="100" v-if="info.hosp_lv == '9'">一级乙等</td>
20
+        <td width="100" v-if="info.hosp_lv == '10'">一级丙等</td>
21
+        <td width="100" v-if="info.hosp_lv == '11'">无等级</td>
23 22
 
24
-              <td width="80">出生日期</td>
25
-                <td width="100">{{info.brdy}}</td>
26
-                <td width="90">个人电脑号</td>
27
-                <td width="110"></td>
28
-                <td width="80">人员类别</td>
29
-                <td colspan="3"></td>
30
-            </tr>
31
-            <tr>
32
-                <td>单位名称</td>
33
-                <td colspan="5">{{info.emp_name}}</td>
34
-                <td width="80">联系电话</td>
35
-                <td width="110"></td>
36
-                <td width="80">身份证号</td>
37
-                <td colspan="3">{{info.certno}}</td>
38
-            </tr>
39
-            <tr>
40
-                <td>住院号</td>
41
-                <td></td>
42
-                <td>科别</td>
43
-                <td width="100"></td>
44
-                <td>床号</td>
45
-                <td></td>
46
-                <td>入院日期</td>
47
-                <td></td>
48
-                <td>出院日期</td>
49
-                <td width="100"></td>
50
-                <td>住院天数</td>
51
-                <td></td>
52
-            </tr>
53
-            <tr>
54
-                <td>险种</td>
55
-                  <td colspan="2" v-if="info.insutype == '310'">职工基本医疗保险</td>
56
-                  <td colspan="2" v-if="info.insutype == '320'">公务员医疗补助</td>
57
-                  <td colspan="2" v-if="info.insutype == '330'">大额医疗费用补助</td>
58
-                  <td colspan="2" v-if="info.insutype == '340'">离休人员医疗保障</td>
59
-                  <td colspan="2" v-if="info.insutype == '390'">城乡居民基本医疗保险</td>
60
-                  <td colspan="2" v-if="info.insutype == '392'">城乡居民大病医疗保险</td>
61
-                  <td colspan="2" v-if="info.insutype == '510'">生育保险</td>
62 23
 
24
+      </tr>
25
+      <tr>
26
+        <td width="90">就医登记号</td>
27
+        <td colspan="11">{{info.psn_no}}</td>
28
+      </tr>
29
+      <tr>
30
+        <td width="80">姓名</td>
31
+        <td width="80">{{info.psn_name}}</td>
32
+        <td width="80">性别</td>
33
+        <td width="50" v-if="info.gend == '1'">男</td>
34
+        <td width="50" v-if="info.gend == '2'">女</td>
63 35
 
64
-              <td>入院第一诊断</td>
65
-                <td colspan="3"></td>
66
-                <td>出院第一诊断</td>
67
-                <td colspan="4"></td>
68
-            </tr>
69
-            <tr>
70
-                <td>业务类别</td>
71
-                <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '11'">普通门诊</td>
72
-                 <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '12'">门诊挂号</td>
73
-                <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '13'">急诊</td>
74
-                <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '14'">门诊特殊病</td>
75
-                <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '15'">门诊统筹</td>
76
-                <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '16'">门诊慢性病</td>
77
-              <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '21'">普通住院</td>
36
+        <td width="80">出生日期</td>
37
+        <td width="100">{{info.brdy}}</td>
38
+        <td width="90">个人电脑号</td>
39
+        <td width="110"></td>
40
+        <td width="80">人员类别</td>
41
+        <td colspan="3" v-if="info.psn_type == '11'">在职</td>
42
+        <td colspan="3" v-if="info.psn_type == '1101'">职工在职</td>
43
+        <td colspan="3" v-if="info.psn_type == '1102'">公务员在职</td>
44
+        <td colspan="3" v-if="info.psn_type == '1103'">灵活就业人员在职</td>
45
+        <td colspan="3" v-if="info.psn_type == '1160'">地方其他扩展人员</td>
78 46
 
79
-              <td>结算时间</td>
80
-                <td colspan="5" style="text-align:left;padding-left:10px;">{{info.setl_time}}</td>
81
-            </tr>
82
-            <tr>
83
-                <td colspan="12" style="text-align:left;padding-left:10px;">
84
-                    本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.psn_pay}}元。
85
-                </td>
86
-            </tr>
87
-            <tr>
88
-                <td>费用名称</td>
89
-                <td colspan="2">总费用</td>
90
-                <td>自费</td>
91
-                <td colspan="2">部分项目自付</td>
92
-                <td>费用名称</td>
93
-                <td colspan="2">总费用</td>
94
-                <td>自费</td>
95
-                <td colspan="2">部分项目自付</td>
96
-            </tr>
97
-            <tr>
98
-                <td>床位费</td>
99
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_total}}</td>
100
-                <td style="text-align:right;padding-right:10px;">{{info.bed_cost_self_total}}</td>
101
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_part_self_total}}</td>
102
-                <td>西成药</td>
103
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_total}}</td>
104
-                <td style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_self_total}}</td>
105
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_part_self_total}}</td>
106
-            </tr>
107
-            <tr>
108
-                <td>中药费</td>
109
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
110
-                <td style="text-align:right;padding-right:10px;">0</td>
111
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
112
-                <td>中成药</td>
113
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_total}}</td>
114
-                <td style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_self_total}}</td>
115
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_part_self_total}}</td>
116
-            </tr>
117
-            <tr>
118
-                <td>中草药</td>
119
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
120
-                <td style="text-align:right;padding-right:10px;">0</td>
121
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
122
-                <td>检查费</td>
123
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_total}}</td>
124
-                <td style="text-align:right;padding-right:10px;">{{info.check_cost_self_total}}</td>
125
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_part_self_total}}</td>
126
-            </tr>
127
-            <tr>
128
-                <td>治疗费</td>
129
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_total}}</td>
130
-              <td style="text-align:right;padding-right:10px;">{{info.treat_cost_self_total}}</td>
131
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_part_self_total}}</td>
132
-                <td>放射费</td>
133
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
134
-                <td style="text-align:right;padding-right:10px;">0</td>
135
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
136
-            </tr>
137
-            <tr>
138
-                <td>手术费</td>
139
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_total}}</td>
140
-              <td style="text-align:right;padding-right:10px;">{{info.operation_cost_self_total}}</td>
141
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_part_self_total}}</td>
142
-                <td>化验费</td>
143
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_total}}</td>
144
-              <td style="text-align:right;padding-right:10px;">{{info.laboratory_cost_self_total}}</td>
145
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_part_self_total}}</td>
146
-            </tr>
147
-            <tr>
148
-                <td>输血费</td>
149
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
150
-                <td style="text-align:right;padding-right:10px;">0</td>
151
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
152
-                <td>输氧费</td>
153
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
154
-                <td style="text-align:right;padding-right:10px;">0</td>
155
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
156
-            </tr>
157
-            <tr>
158
-                <td>其他</td>
159
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_total}}</td>
160
-              <td style="text-align:right;padding-right:10px;">{{info.other_cost_self_total}}</td>
161
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_part_self_total}}</td>
162
-                <td>麻醉费</td>
163
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
164
-                <td style="text-align:right;padding-right:10px;">0</td>
165
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
166
-            </tr>
167
-            <tr>
168
-                <td>材料费</td>
169
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_total}}</td>
170
-              <td style="text-align:right;padding-right:10px;">{{info.material_cost_self_total}}</td>
171
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_part_self_total}}</td>
172
-                <td>特殊检查费</td>
173
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
174
-                <td style="text-align:right;padding-right:10px;">0</td>
175
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
176
-            </tr>
177
-            <tr>
178
-                <td>特殊治疗费</td>
179
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
180
-                <td style="text-align:right;padding-right:10px;">0</td>
181
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
182
-                <td style="text-align:right;padding-right:10px;"></td>
183
-                <td colspan="2" style="text-align:right;padding-right:10px;"></td>
184
-                <td style="text-align:right;padding-right:10px;"></td>
185
-                <td colspan="2" style="text-align:right;padding-right:10px;"></td>
186
-            </tr>
187
-            <tr>
188
-                <td>合计</td>
189
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_total) + parseFloat(info.operation_cost_total) + parseFloat(info.other_cost_total) + parseFloat(info.material_cost_total) + parseFloat(info.western_medicine_cost_total) + parseFloat(info.chinese_traditional_medicine_cost_total) + parseFloat(info.check_cost_total) + parseFloat(info.laboratory_cost_total) + parseFloat(info.treat_cost_total)).toFixed(2) }}</td>
190
-                <td style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_self_total )+ parseFloat(info.operation_cost_self_total) + parseFloat(info.other_cost_self_total) + parseFloat(info.material_cost_self_total) + parseFloat(info.western_medicine_cost_self_total) + parseFloat(info.chinese_traditional_medicine_cost_self_total) + parseFloat(info.check_cost_self_total) + parseFloat(info.laboratory_cost_self_total) + parseFloat(info.treat_cost_self_total)).toFixed(2)}}</td>
191
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_part_self_total) + parseFloat(info.operation_cost_part_self_total) + parseFloat(info.other_cost_part_self_total) + parseFloat(info.material_cost_part_self_total) + parseFloat(info.western_medicine_cost_part_self_total) + parseFloat(info.chinese_traditional_medicine_cost_part_self_total) + parseFloat(info.check_cost_part_self_total) + parseFloat(info.laboratory_cost_part_self_total) + parseFloat(info.treat_cost_part_self_total)).toFixed(2)}}</td>
192
-                <td style="text-align:right;padding-right:10px;"></td>
193
-                <td colspan="2" style="text-align:right;padding-right:10px;"></td>
194
-                <td style="text-align:right;padding-right:10px;"></td>
195
-                <td colspan="2" style="text-align:right;padding-right:10px;"></td>
196
-            </tr>
197
-            <tr>
198
-                <td colspan="3" style="text-align:left;padding-left:10px;">基本医疗保险统筹基金支付</td>
199
-                <td colspan="3">{{info.hifp_pay}}</td>
200
-                <td colspan="3" style="text-align:left;padding-left:10px;">大额基金支付</td>
201
-                <td colspan="3">{{info.hifob_pay}}</td>
202
-            </tr>
203
-            <tr>
204
-                <td colspan="3" style="text-align:left;padding-left:10px;">大病基金支付</td>
205
-                <td colspan="3">{{info.hifmi_pay}}</td>
206
-                <td colspan="3" style="text-align:left;padding-left:10px;">补充保险基金支付</td>
207
-                <td colspan="3">{{info.hifes_pay}}</td>
208
-            </tr>
209
-            <tr>
210
-                <td colspan="3" style="text-align:left;padding-left:10px;">医疗救助基金支付</td>
211
-                <td colspan="3">{{info.maf_pay}}</td>
212
-                <td colspan="3" style="text-align:left;padding-left:10px;">公务员基金支付</td>
213
-                <td colspan="3">{{info.cvlserv_pay}}</td>
214
-            </tr>
215
-            <tr>
216
-                <td>收款人:</td>
217
-                <td colspan="2"></td>
218
-                <td>审核人:</td>
219
-                <td colspan="2"></td>
220
-                <td>制单人:</td>
221
-                <td colspan="2"></td>
222
-                <td>打印日期</td>
223
-                <td colspan="2"></td>
224
-            </tr>
225
-            <tr>
226
-                <td colspan="12" style="text-align:left;padding-left:10px;line-height:20px;">
227
-                    注: 1、部分项目自付金额是指基本医疗保险范围内的项目需参保人先按规定比例自付的金额。<br />
228
-                    &ensp;&ensp;&ensp;2、此表由医院打印。<br />
229
-                    &ensp;&ensp;&ensp;3、此表一式两份,医院、参保人各一份。
230
-                </td>
231
-            </tr>
232
-            <tr>
233
-                <td colspan="12" style="text-align:left;padding-left:10px;">
234
-                    病人家属签字:
235
-                </td>
236
-            </tr>
237
-        </table>
238
-    </div>
47
+
48
+        <td colspan="3" v-if="info.psn_type == '12'">退休人员</td>
49
+        <td colspan="3" v-if="info.psn_type == '1201'">职工退休</td>
50
+        <td colspan="3" v-if="info.psn_type == '1202'">公务员退休</td>
51
+        <td colspan="3" v-if="info.psn_type == '1203'">灵活就业人员退休</td>
52
+        <td colspan="3" v-if="info.psn_type == '1260'">地方其他扩展人员</td>
53
+
54
+
55
+        <td colspan="3" v-if="info.psn_type == '13'">离休</td>
56
+        <td colspan="3" v-if="info.psn_type == '1300'">离休人员</td>
57
+        <td colspan="3" v-if="info.psn_type == '1360'">地方其他扩展人员</td>
58
+
59
+        <td colspan="3" v-if="info.psn_type == '14'">居民(未成年)</td>
60
+        <td colspan="3" v-if="info.psn_type == '1401'">新生儿</td>
61
+        <td colspan="3" v-if="info.psn_type == '1402'">学龄前儿童</td>
62
+        <td colspan="3" v-if="info.psn_type == '1403'">中小学生</td>
63
+        <td colspan="3" v-if="info.psn_type == '1404'">大学生</td>
64
+        <td colspan="3" v-if="info.psn_type == '1405'">未成年(未入学)</td>
65
+
66
+
67
+        <td colspan="3" v-if="info.psn_type == '15'">居民(成年)</td>
68
+        <td colspan="3" v-if="info.psn_type == '1501'">普通居民(成年)</td>
69
+        <td colspan="3" v-if="info.psn_type == '1560'">地方其他扩展身份</td>
70
+
71
+        <td colspan="3" v-if="info.psn_type == '16'">居民(老年)</td>
72
+
73
+
74
+
75
+      </tr>
76
+      <tr>
77
+        <td>单位名称</td>
78
+        <td colspan="5">{{info.emp_name}}</td>
79
+        <td width="80">联系电话</td>
80
+        <td width="110"></td>
81
+        <td width="80">身份证号</td>
82
+        <td colspan="3">{{info.certno}}</td>
83
+      </tr>
84
+      <tr>
85
+        <td>住院号</td>
86
+        <td></td>
87
+        <td>科别</td>
88
+        <td width="100"></td>
89
+        <td>床号</td>
90
+        <td></td>
91
+        <td>入院日期</td>
92
+        <td></td>
93
+        <td>出院日期</td>
94
+        <td width="100"></td>
95
+        <td>住院天数</td>
96
+        <td></td>
97
+      </tr>
98
+      <tr>
99
+        <td>险种</td>
100
+        <td colspan="2" v-if="info.insutype == '310'">职工基本医疗保险</td>
101
+        <td colspan="2" v-if="info.insutype == '320'">公务员医疗补助</td>
102
+        <td colspan="2" v-if="info.insutype == '330'">大额医疗费用补助</td>
103
+        <td colspan="2" v-if="info.insutype == '340'">离休人员医疗保障</td>
104
+        <td colspan="2" v-if="info.insutype == '390'">城乡居民基本医疗保险</td>
105
+        <td colspan="2" v-if="info.insutype == '392'">城乡居民大病医疗保险</td>
106
+        <td colspan="2" v-if="info.insutype == '510'">生育保险</td>
107
+
108
+
109
+        <td>入院第一诊断</td>
110
+        <td colspan="3"></td>
111
+        <td>出院第一诊断</td>
112
+        <td colspan="4"></td>
113
+      </tr>
114
+      <tr>
115
+        <td>业务类别</td>
116
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '11'">普通门诊</td>
117
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '12'">门诊挂号</td>
118
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '13'">急诊</td>
119
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '14'">门诊特殊病</td>
120
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '15'">门诊统筹</td>
121
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '16'">门诊慢性病</td>
122
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '21'">普通住院</td>
123
+
124
+        <td>结算时间</td>
125
+        <td colspan="5" style="text-align:left;padding-left:10px;">{{info.setl_time}}</td>
126
+      </tr>
127
+      <tr>
128
+        <td colspan="12" style="text-align:left;padding-left:10px;">
129
+          本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.psn_pay}}元。
130
+        </td>
131
+      </tr>
132
+      <tr>
133
+        <td>费用名称</td>
134
+        <td colspan="2">总费用</td>
135
+        <td>自费</td>
136
+        <td colspan="2">部分项目自付</td>
137
+        <td>费用名称</td>
138
+        <td colspan="2">总费用</td>
139
+        <td>自费</td>
140
+        <td colspan="2">部分项目自付</td>
141
+      </tr>
142
+      <tr>
143
+        <td>床位费</td>
144
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_total}}</td>
145
+        <td style="text-align:right;padding-right:10px;">{{info.bed_cost_self_total}}</td>
146
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_part_self_total}}</td>
147
+        <td>西成药</td>
148
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_total}}</td>
149
+        <td style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_self_total}}</td>
150
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_part_self_total}}</td>
151
+      </tr>
152
+      <tr>
153
+        <td>中药费</td>
154
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
155
+        <td style="text-align:right;padding-right:10px;">0</td>
156
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
157
+        <td>中成药</td>
158
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_total}}
159
+        </td>
160
+        <td style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_self_total}}</td>
161
+        <td colspan="2" style="text-align:right;padding-right:10px;">
162
+          {{info.chinese_traditional_medicine_cost_part_self_total}}
163
+        </td>
164
+      </tr>
165
+      <tr>
166
+        <td>中草药</td>
167
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
168
+        <td style="text-align:right;padding-right:10px;">0</td>
169
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
170
+        <td>检查费</td>
171
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_total}}</td>
172
+        <td style="text-align:right;padding-right:10px;">{{info.check_cost_self_total}}</td>
173
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_part_self_total}}</td>
174
+      </tr>
175
+      <tr>
176
+        <td>治疗费</td>
177
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_total}}</td>
178
+        <td style="text-align:right;padding-right:10px;">{{info.treat_cost_self_total}}</td>
179
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_part_self_total}}</td>
180
+        <td>放射费</td>
181
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
182
+        <td style="text-align:right;padding-right:10px;">0</td>
183
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
184
+      </tr>
185
+      <tr>
186
+        <td>手术费</td>
187
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_total}}</td>
188
+        <td style="text-align:right;padding-right:10px;">{{info.operation_cost_self_total}}</td>
189
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_part_self_total}}</td>
190
+        <td>化验费</td>
191
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_total}}</td>
192
+        <td style="text-align:right;padding-right:10px;">{{info.laboratory_cost_self_total}}</td>
193
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_part_self_total}}</td>
194
+      </tr>
195
+      <tr>
196
+        <td>输血费</td>
197
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
198
+        <td style="text-align:right;padding-right:10px;">0</td>
199
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
200
+        <td>输氧费</td>
201
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
202
+        <td style="text-align:right;padding-right:10px;">0</td>
203
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
204
+      </tr>
205
+      <tr>
206
+        <td>其他</td>
207
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_total}}</td>
208
+        <td style="text-align:right;padding-right:10px;">{{info.other_cost_self_total}}</td>
209
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_part_self_total}}</td>
210
+        <td>麻醉费</td>
211
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
212
+        <td style="text-align:right;padding-right:10px;">0</td>
213
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
214
+      </tr>
215
+      <tr>
216
+        <td>材料费</td>
217
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_total}}</td>
218
+        <td style="text-align:right;padding-right:10px;">{{info.material_cost_self_total}}</td>
219
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_part_self_total}}</td>
220
+        <td>特殊检查费</td>
221
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
222
+        <td style="text-align:right;padding-right:10px;">0</td>
223
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
224
+      </tr>
225
+      <tr>
226
+        <td>特殊治疗费</td>
227
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
228
+        <td style="text-align:right;padding-right:10px;">0</td>
229
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
230
+        <td style="text-align:right;padding-right:10px;"></td>
231
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
232
+        <td style="text-align:right;padding-right:10px;"></td>
233
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
234
+      </tr>
235
+      <tr>
236
+        <td>合计</td>
237
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_total) +
238
+          parseFloat(info.operation_cost_total) + parseFloat(info.other_cost_total) +
239
+          parseFloat(info.material_cost_total) + parseFloat(info.western_medicine_cost_total) +
240
+          parseFloat(info.chinese_traditional_medicine_cost_total) + parseFloat(info.check_cost_total) +
241
+          parseFloat(info.laboratory_cost_total) + parseFloat(info.treat_cost_total)).toFixed(2) }}
242
+        </td>
243
+        <td style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_self_total )+
244
+          parseFloat(info.operation_cost_self_total) + parseFloat(info.other_cost_self_total) +
245
+          parseFloat(info.material_cost_self_total) + parseFloat(info.western_medicine_cost_self_total) +
246
+          parseFloat(info.chinese_traditional_medicine_cost_self_total) + parseFloat(info.check_cost_self_total) +
247
+          parseFloat(info.laboratory_cost_self_total) + parseFloat(info.treat_cost_self_total)).toFixed(2)}}
248
+        </td>
249
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_part_self_total) +
250
+          parseFloat(info.operation_cost_part_self_total) + parseFloat(info.other_cost_part_self_total) +
251
+          parseFloat(info.material_cost_part_self_total) + parseFloat(info.western_medicine_cost_part_self_total) +
252
+          parseFloat(info.chinese_traditional_medicine_cost_part_self_total) +
253
+          parseFloat(info.check_cost_part_self_total) + parseFloat(info.laboratory_cost_part_self_total) +
254
+          parseFloat(info.treat_cost_part_self_total)).toFixed(2)}}
255
+        </td>
256
+        <td style="text-align:right;padding-right:10px;"></td>
257
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
258
+        <td style="text-align:right;padding-right:10px;"></td>
259
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
260
+      </tr>
261
+      <tr>
262
+        <td colspan="3" style="text-align:left;padding-left:10px;">基本医疗保险统筹基金支付</td>
263
+        <td colspan="3">{{info.hifp_pay}}</td>
264
+        <td colspan="3" style="text-align:left;padding-left:10px;">大额基金支付</td>
265
+        <td colspan="3">{{info.hifob_pay}}</td>
266
+      </tr>
267
+      <tr>
268
+        <td colspan="3" style="text-align:left;padding-left:10px;">大病基金支付</td>
269
+        <td colspan="3">{{info.hifmi_pay}}</td>
270
+        <td colspan="3" style="text-align:left;padding-left:10px;">补充保险基金支付</td>
271
+        <td colspan="3">{{info.hifes_pay}}</td>
272
+      </tr>
273
+      <tr>
274
+        <td colspan="3" style="text-align:left;padding-left:10px;">医疗救助基金支付</td>
275
+        <td colspan="3">{{info.maf_pay}}</td>
276
+        <td colspan="3" style="text-align:left;padding-left:10px;">公务员基金支付</td>
277
+        <td colspan="3">{{info.cvlserv_pay}}</td>
278
+      </tr>
279
+      <tr>
280
+        <td>收款人:</td>
281
+        <td colspan="2">{{charge_admin.user_name}}</td>
282
+        <td>审核人:</td>
283
+        <td colspan="2"></td>
284
+        <td>制单人:</td>
285
+        <td colspan="2">{{p_admin.user_name}}</td>
286
+        <td>打印日期</td>
287
+        <td colspan="2">{{getNowTime()}}</td>
288
+      </tr>
289
+      <tr>
290
+        <td colspan="12" style="text-align:left;padding-left:10px;line-height:20px;">
291
+          注: 1、部分项目自付金额是指基本医疗保险范围内的项目需参保人先按规定比例自付的金额。<br/>
292
+          &ensp;&ensp;&ensp;2、此表由医院打印。<br/>
293
+          &ensp;&ensp;&ensp;3、此表一式两份,医院、参保人各一份。
294
+        </td>
295
+      </tr>
296
+      <tr>
297
+        <td colspan="12" style="text-align:left;padding-left:10px;">
298
+          病人家属签字:
299
+        </td>
300
+      </tr>
301
+    </table>
302
+  </div>
239 303
 </template>
240 304
 <script>
241 305
   export default {
242 306
     props: {
243 307
       info: {
244 308
         type: Object,
245
-        default: function () {
246
-          return {};
309
+        default: function() {
310
+          return {}
311
+        }
312
+      }, p_admin: {
313
+        type: Object,
314
+        default: function() {
315
+          return {}
247 316
         }
317
+      }, charge_admin: {
318
+        type: Object,
319
+        default: function() {
320
+          return {}
321
+        }
322
+      }
323
+    },methods:{
324
+      getNowTime: function () {
325
+        let dateTime
326
+        let yy = new Date().getFullYear()
327
+        let mm = new Date().getMonth() + 1
328
+        let dd = new Date().getDate()
329
+        let hh = new Date().getHours()
330
+        let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
331
+          :
332
+          new Date().getMinutes()
333
+        let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
334
+          :
335
+          new Date().getSeconds()
336
+        dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
337
+        return dateTime
248 338
       },
339
+
249 340
     }
250 341
   }
251 342
 
@@ -253,27 +344,28 @@
253 344
 </script>
254 345
 
255 346
 
256
-
257 347
 <style lang="scss" scoped>
258
-.statement-print{
348
+  .statement-print {
259 349
     -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
260 350
     -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
261 351
     box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
262 352
     margin-bottom: 20px;
263
-    padding:20px 10px;
264
-}
265
-.statementTitle{
353
+    padding: 20px 10px;
354
+  }
355
+
356
+  .statementTitle {
266 357
     font-size: 28px;
267 358
     text-align: center;
268 359
     font-weight: bold;
269 360
     margin-bottom: 10px;
270
-}
271
-.statementTable{
361
+  }
362
+
363
+  .statementTable {
272 364
     width: 100%;
273 365
     text-align: center;
274 366
     border-collapse: collapse;
275 367
     line-height: 40px;
276 368
     font-size: 14px;
277 369
     border-color: #000;
278
-}
370
+  }
279 371
 </style>

+ 65 - 5
src/xt_pages/outpatientCharges/summary.vue View File

@@ -39,7 +39,18 @@
39 39
           <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
40 40
           <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
41 41
         </div>
42
-        <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
42
+        <div>
43
+          <el-popover
44
+            placement="bottom"
45
+            width="210"
46
+            trigger="click">
47
+            <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
48
+            <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
49
+            <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
50
+
51
+          </el-popover>
52
+          <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
53
+        </div>
43 54
       </div>
44 55
       <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
45 56
                 :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
@@ -85,6 +96,7 @@
85 96
         <el-table-column align="center" prop="name" label="操作">
86 97
           <template slot-scope="scope">
87 98
             <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
99
+            <el-button size="mini" type="primary" @click="toPrint(scope.row)" v-if="$store.getters.xt_user.org_id == 9919 && scope.row.order_status == 2">结算单</el-button>
88 100
           </template>
89 101
         </el-table-column>
90 102
       </el-table>
@@ -102,6 +114,29 @@
102 114
       </el-pagination>
103 115
     </div>
104 116
 
117
+    <el-dialog
118
+      class="centerDialog"
119
+      width="1200px"
120
+      title="打印"
121
+      :visible.sync="statementVisible">
122
+      <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
123
+    <new-statement-print ref="print" :paramsObj='orderObj'></new-statement-print>
124
+    </el-dialog>
125
+    <el-dialog
126
+      class="centerDialog"
127
+      width="900px"
128
+      title="打印"
129
+      :visible.sync="listVisible">
130
+      <listPrint></listPrint>
131
+    </el-dialog>
132
+    <el-dialog
133
+      class="centerDialog"
134
+      width="900px"
135
+      title="打印"
136
+      :visible.sync="allListVisible">
137
+      <allListPrint :paramsObj='paramsObj'></allListPrint>
138
+    </el-dialog>
139
+
105 140
 
106 141
   </div>
107 142
 </template>
@@ -111,13 +146,23 @@
111 146
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
112 147
   import { getHisOrderList,getDoctorList,getExportConsumeDetailList } from '@/api/his/his'
113 148
   import { uParseTime } from '@/utils/tools'
149
+  import statementPrint from './statementPrint'
150
+  import NewStatementPrint from './newStatementPrint'
151
+  import listPrint from './listPrint'
152
+  import allListPrint from './allListPrint'
153
+
114 154
 
115 155
   export default {
116 156
     components: {
117
-      BreadCrumb
157
+      NewStatementPrint,
158
+      BreadCrumb,
159
+      listPrint,
160
+      allListPrint
118 161
     },
119 162
     data() {
120 163
       return {
164
+        orderObj: {},
165
+        statementVisible: false,
121 166
         crumbs: [
122 167
           { path: false, name: '门诊收费' },
123 168
           { path: false, name: '项目消费明细汇总' }
@@ -131,10 +176,20 @@
131 176
         total:"",
132 177
         doctors:[],
133 178
         admin_user_id:"",
179
+        listVisible:false,
180
+        allListVisible:false
134 181
 
135 182
       }
136 183
     },
137 184
     methods: {
185
+      toPrint(row){
186
+        this.statementVisible = true
187
+        let obj = {
188
+          order_id: row.id
189
+        }
190
+        this.orderObj = obj
191
+
192
+      },
138 193
       export_detail(){
139 194
         let params= {
140 195
           start_time:this.start_time,
@@ -273,7 +328,7 @@
273 328
         return uParseTime(time, "{y}-{m}-{d}");
274 329
       },
275 330
       toDetail(row) {
276
-        this.$router.push('/outpatientCharges/summaryDetail?patient_id='+row.patient.id+"&number="+row.number)
331
+        this.$router.push('/outpatientCharges/summaryDetail?patient_id='+row.patient.id+"&number="+row.number+"&id="+row.id)
277 332
       }, getTime(value, temp) {
278 333
         if (value != undefined) {
279 334
           return uParseTime(value, temp)
@@ -307,8 +362,13 @@
307 362
             this.doctors = response.data.data.doctors
308 363
           }
309 364
         })
310
-
311
-
365
+      },
366
+      open(index){
367
+        if(index == 1){
368
+          this.listVisible = true
369
+        }else if(index == 2){
370
+          this.allListVisible = true
371
+        }
312 372
       }
313 373
     }, created() {
314 374
      this.getDoctorList()

+ 275 - 46
src/xt_pages/outpatientCharges/summaryDetail.vue View File

@@ -3,6 +3,15 @@
3 3
         <div class="position">
4 4
             <bread-crumb :crumbs='crumbs'></bread-crumb>
5 5
         </div>
6
+      <el-popover
7
+        placement="bottom"
8
+        width="210"
9
+        trigger="click">
10
+        <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
11
+        <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
12
+        <el-button  slot="reference" style="margin:10px 10px;float: right" type="primary" size="small" >打印</el-button>
13
+
14
+      </el-popover>
6 15
         <div class="app-container" style="display:flex;flex: 1;padding: 20px 20px 0px 20px;">
7 16
             <div class="mainCenter">
8 17
                 <div class="centerLeft">
@@ -78,7 +87,7 @@
78 87
 
79 88
                     </div>
80 89
                     <div class="costBox">
81
-                      <span>当前处方总费用:<span style="color:red;">{{ order.medfee_sumamt }}元</span></span>
90
+                      <span>当前处方总费用:<span style="color:red;">{{ order.medfee_sumamt}}元</span></span>
82 91
                       <span v-if="order.order_status == 1">待结算</span>
83 92
                       <span v-if="order.order_status == 2">已结算</span>
84 93
                       <span v-if="order.order_status == 3">已退费</span>
@@ -112,6 +121,28 @@
112 121
                 </div>
113 122
             </div>
114 123
         </div>
124
+
125
+      <div v-if="listVisible">
126
+      <el-dialog
127
+        class="centerDialog"
128
+        width="900px"
129
+        title="打印"
130
+        :visible.sync="listVisible">
131
+        <list-print  :paramsObj='paramsObj'></list-print>
132
+      </el-dialog>
133
+      </div>
134
+
135
+      <div v-if="allListVisible">
136
+      <el-dialog
137
+        class="centerDialog"
138
+        width="900px"
139
+        title="打印"
140
+        :visible.sync="allListVisible">
141
+        <all-list-print :paramsObj='paramsObj'></all-list-print>
142
+      </el-dialog>
143
+      </div>
144
+
145
+
115 146
     </div>
116 147
 </template>
117 148
 
@@ -121,15 +152,24 @@ import BreadCrumb from '@/xt_pages/components/bread-crumb'
121 152
 import { getHisOrder } from '@/api/his/his'
122 153
 import prescriptionTable from './components/prescriptionTable'
123 154
 import { getDictionaryDataConfig} from "@/utils/data";
155
+import ListPrint from './listPrint'
156
+import AllListPrint from './allListPrint'
124 157
 
125 158
 export default {
126 159
     components:{
160
+      AllListPrint,
161
+      ListPrint,
127 162
         BreadCrumb,
128 163
       prescriptionTable,
129 164
 
130 165
     },
131 166
     data(){
132 167
         return{
168
+          listVisible:false,
169
+          allListVisible:false,
170
+          paramsObj:{
171
+            id:this.$route.query.id
172
+          },
133 173
             crumbs: [
134 174
                 { path: false, name: '门诊收费' },
135 175
                 { path: false, name: '项目消费明细汇总详情' }
@@ -165,6 +205,43 @@ export default {
165 205
     },created(){
166 206
       this.GetOrderDetail()
167 207
   },methods:{
208
+      open(val){
209
+        if(val == 1){
210
+          this.paramsObj.id == this.$route.query.id
211
+          this.listVisible = true
212
+
213
+        }else if(val == 2){
214
+          this.paramsObj.id == this.$route.query.id
215
+          this.allListVisible = true
216
+        }
217
+      },
218
+    // getTotal() {
219
+    //   var total = 0
220
+    //   for (let i = 0; i < this.prescriptions.length; i++) {
221
+    //     if (this.prescriptions[i].advices != null) {
222
+    //       for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
223
+    //         console.log(this.prescriptions[i].advices[a].price )
224
+    //         console.log(this.prescriptions[i].advices[a].prescribing_number)
225
+    //
226
+    //         total = parseFloat(total) + parseFloat(this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number)
227
+    //       }
228
+    //     }
229
+    //     if (this.prescriptions[i].project != null) {
230
+    //       for (let a = 0; a < this.prescriptions[i].project.length; a++) {
231
+    //
232
+    //         total = parseFloat(total) + parseFloat(this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count)
233
+    //       }
234
+    //     }
235
+    //
236
+    //     if (this.prescriptions[i].addition != null) {
237
+    //       for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
238
+    //         total = parseFloat(total) + parseFloat(this.prescriptions[i].addition[a].price * this.prescriptions[i].addition[b].count)
239
+    //       }
240
+    //     }
241
+    //   }
242
+    //   return total.toFixed(2)
243
+    //
244
+    // },
168 245
     getDictionaryDataConfig(module, filed_name) {
169 246
       return getDictionaryDataConfig(module, filed_name)
170 247
     },
@@ -193,7 +270,6 @@ export default {
193 270
     },  getGroup(id){
194 271
       var name = ""
195 272
       var statistics_category =  getDictionaryDataConfig('system','statistics_category')
196
-      console.log("2235",statistics_category)
197 273
       for(let i=0;i<statistics_category.length;i++){
198 274
         if(id == statistics_category[i].id){
199 275
           name = statistics_category[i].name
@@ -221,7 +297,154 @@ export default {
221 297
       if (tab == 'more') {
222 298
         return false
223 299
       }
300
+    },  unique(array) {
301
+      // res用来存储结果
302
+      var res = []
303
+      for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
304
+        for (var j = 0, resLen = res.length; j < resLen; j++) {
305
+          if (array[i].id === res[j].id && array[i].price === res[j].price) {
306
+            break
307
+          }
308
+        }
309
+        // 如果array[i]是唯一的,那么执行完循环,j等于resLen
310
+        if (j === resLen) {
311
+          res.push(array[i])
312
+        }
313
+      }
314
+      return res
224 315
     },
316
+    setMonthPrescription(month_prescriptions) {
317
+      console.log(month_prescriptions)
318
+      let drug_month_prescriptions = {
319
+        advices: []
320
+      }
321
+      let drug_ids = []
322
+      let project_month_prescriptions = {
323
+        project: []
324
+
325
+      }
326
+      let project_ids = []
327
+
328
+      let addition_month_prescriptions = {
329
+        addition: []
330
+
331
+      }
332
+      let additions_ids = []
333
+
334
+      for (let i = 0; i < month_prescriptions.length; i++) {
335
+        if (month_prescriptions[i].type == 1) { //药品
336
+          for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
337
+            let obj = {
338
+              id: month_prescriptions[i].advices[a].drug_id,
339
+              price: month_prescriptions[i].advices[a].price
340
+
341
+            }
342
+            drug_ids.push(obj)
343
+            drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
344
+          }
345
+
346
+        } else if (month_prescriptions[i].type == 2) { //项目
347
+          for (let a = 0; a < month_prescriptions[i].project.length; a++) {
348
+            let obj = {
349
+              id: month_prescriptions[i].project[a].project_id,
350
+              price: month_prescriptions[i].project[a].price
351
+
352
+            }
353
+            project_ids.push(obj)
354
+            project_month_prescriptions.project.push(month_prescriptions[i].project[a])
355
+          }
356
+        }
357
+        //附加收费
358
+        for (let a = 0; a < month_prescriptions[i].addition.length; a++) {
359
+          let obj = {
360
+            id: month_prescriptions[i].addition[a].item_id,
361
+            price: month_prescriptions[i].addition[a].price
362
+
363
+          }
364
+          additions_ids.push(obj)
365
+          addition_month_prescriptions.addition.push(month_prescriptions[i].addition[a])
366
+
367
+        }
368
+
369
+      }
370
+
371
+      drug_ids = this.unique(drug_ids)
372
+      project_ids= this.unique(project_ids)
373
+      additions_ids= this.unique(additions_ids)
374
+
375
+
376
+
377
+
378
+
379
+      for (let i = 0; i < drug_ids.length; i++) {
380
+        let obj = {}
381
+        let count = 0
382
+        for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
383
+          if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id ==  drug_month_prescriptions.advices[a].drug_id) {
384
+            obj['name'] = drug_month_prescriptions.advices[a].advice_name
385
+            obj['statistical_classification'] = ''
386
+            obj['type'] = 1
387
+            obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
388
+            obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
389
+            obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency
390
+            obj['day'] = drug_month_prescriptions.advices[a].day
391
+            obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
392
+            obj['remark'] = drug_month_prescriptions.advices[a].remark
393
+            obj['price'] = parseFloat(drug_month_prescriptions.advices[a].price)
394
+            count = count + drug_month_prescriptions.advices[a].prescribing_number
395
+
396
+          }
397
+        }
398
+        obj['count'] = count
399
+        this.tableData.push(obj)
400
+      }
401
+
402
+      for (let i = 0; i < project_ids.length; i++) {
403
+        let obj = {}
404
+        let count = 0
405
+        for (let a = 0; a < project_month_prescriptions.project.length; a++) {
406
+          if (project_ids[i].price == project_month_prescriptions.project[a].price &&project_ids[i].id == project_month_prescriptions.project[a].project_id ) {
407
+            obj['name'] = project_month_prescriptions.project[a].project.project_name
408
+            obj['statistical_classification'] = ''
409
+            obj['single_dose'] = project_month_prescriptions.project[a].single_dose
410
+            obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
411
+            obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
412
+            obj['day'] = project_month_prescriptions.project[a].day
413
+            obj['single_dose_unit'] = project_month_prescriptions.project[a].unit
414
+            obj['prescribing_number_unit'] = project_month_prescriptions.project[a].unit
415
+            count = count + project_month_prescriptions.project[a].count
416
+            obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
417
+            obj['remark'] = project_month_prescriptions.project[a].remark
418
+            obj['type'] = 2
419
+
420
+
421
+          }
422
+        }
423
+        obj['count'] = count
424
+        this.tableData.push(obj)
425
+
426
+      }
427
+
428
+      for (let i = 0; i < additions_ids.length; i++) {
429
+        let obj = {}
430
+        let count = 0
431
+        console.log(addition_month_prescriptions.addition)
432
+        if (addition_month_prescriptions.addition) {
433
+          for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
434
+            if (additions_ids[i].price == addition_month_prescriptions.addition[a].price &&additions_ids[i].id == addition_month_prescriptions.addition[a].item_id) {
435
+              obj['item_name'] = addition_month_prescriptions.addition[a].item_name
436
+              count = count + addition_month_prescriptions.addition[a].count
437
+              obj['price'] = parseFloat(addition_month_prescriptions.addition[a].price)
438
+            }
439
+          }
440
+          obj['count'] = count
441
+          this.additions.push(obj)
442
+
443
+        }
444
+      }
445
+
446
+    },
447
+
225 448
     GetOrderDetail(){
226 449
       let params={
227 450
         number:this.$route.query.number,
@@ -240,50 +463,56 @@ export default {
240 463
           this.prescriptions = []
241 464
           this.tableData = []
242 465
 
243
-          for (let i = 0; i < response.data.data.prescription.length; i++) {
244
-            var prescription = response.data.data.prescription[i]
245
-
246
-
247
-            for (let b = 0; b < prescription.advices.length; b++) {
248
-              let obj = {
249
-                name: prescription.advices[b].advice_name,
250
-                statistical_classification:"",
251
-                type:1,
252
-                single_dose: prescription.advices[b].single_dose,
253
-                delivery_way: prescription.advices[b].delivery_way,
254
-                execution_frequency: prescription.advices[b].execution_frequency,
255
-                price: prescription.advices[b].price.toString(),
256
-                day: prescription.advices[b].day,
257
-                count:prescription.advices[b].prescribing_number.toString(),
258
-                remark: prescription.advices[b].remark,
259
-                single_dose_unit: prescription.advices[b].single_dose_unit,
260
-                prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
261
-
262
-              }
263
-              this.tableData.push(obj)
264
-            }
265 466
 
266
-            for (let b = 0; b < prescription.project.length; b++) {
267
-              let obj = {
268
-                name: prescription.project[b].project.project_name,
269
-                statistical_classification: prescription.project[b].project.statistical_classification,
270
-                single_dose: prescription.project[b].single_dose,
271
-                delivery_way: prescription.project[b].delivery_way,
272
-                execution_frequency: prescription.project[b].execution_frequency,
273
-                price: prescription.project[b].price,
274
-                day: prescription.project[b].day,
275
-                count: prescription.project[b].count.toString(),
276
-                remark: prescription.project[b].remark,
277
-                single_dose_unit:prescription.project[b].project.unit,
278
-                prescribing_number_unit:prescription.project[b].project.unit,
279
-                type:2,
280
-              }
281
-              this.tableData.push(obj)
282
-            }
283
-
284
-            for (let b = 0; b < prescription.addition.length; b++) {
285
-                this.additions.push( prescription.addition[b])
286
-            }
467
+          var prescription = response.data.data.prescription
468
+          this.prescriptions = prescription
469
+          this.setMonthPrescription(prescription)
470
+
471
+
472
+          // for (let i = 0; i < response.data.data.prescription.length; i++) {
473
+          //   var prescription = response.data.data.prescription[i]
474
+
475
+
476
+            // for (let b = 0; b < prescription.advices.length; b++) {
477
+            //   let obj = {
478
+            //     name: prescription.advices[b].advice_name,
479
+            //     statistical_classification:"",
480
+            //     type:1,
481
+            //     single_dose: prescription.advices[b].single_dose,
482
+            //     delivery_way: prescription.advices[b].delivery_way,
483
+            //     execution_frequency: prescription.advices[b].execution_frequency,
484
+            //     price: prescription.advices[b].price.toString(),
485
+            //     day: prescription.advices[b].day,
486
+            //     count:prescription.advices[b].prescribing_number.toString(),
487
+            //     remark: prescription.advices[b].remark,
488
+            //     single_dose_unit: prescription.advices[b].single_dose_unit,
489
+            //     prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
490
+            //
491
+            //   }
492
+            //   this.tableData.push(obj)
493
+            // }
494
+            //
495
+            // for (let b = 0; b < prescription.project.length; b++) {
496
+            //   let obj = {
497
+            //     name: prescription.project[b].project.project_name,
498
+            //     statistical_classification: prescription.project[b].project.statistical_classification,
499
+            //     single_dose: prescription.project[b].single_dose,
500
+            //     delivery_way: prescription.project[b].delivery_way,
501
+            //     execution_frequency: prescription.project[b].execution_frequency,
502
+            //     price: prescription.project[b].price,
503
+            //     day: prescription.project[b].day,
504
+            //     count: prescription.project[b].count.toString(),
505
+            //     remark: prescription.project[b].remark,
506
+            //     single_dose_unit:prescription.project[b].project.unit,
507
+            //     prescribing_number_unit:prescription.project[b].project.unit,
508
+            //     type:2,
509
+            //   }
510
+            //   this.tableData.push(obj)
511
+            // }
512
+            //
513
+            // for (let b = 0; b < prescription.addition.length; b++) {
514
+            //     this.additions.push( prescription.addition[b])
515
+            // }
287 516
 
288 517
 
289 518
 
@@ -298,7 +527,7 @@ export default {
298 527
             // this.prescriptions.push(obj)
299 528
             // this.curPrescriptions = this.prescriptions[0]
300 529
 
301
-          }
530
+          // }
302 531
           // this.tableData = response.data.data.order
303 532
 
304 533
         }

File diff suppressed because it is too large
+ 336 - 182
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue


+ 253 - 70
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -325,46 +325,70 @@
325 325
           }
326 326
         })
327 327
       },
328
-      setMonthPrescription(month_prescriptions){
328
+      setMonthPrescription(month_prescriptions) {
329
+        console.log("11111111")
330
+        console.log(month_prescriptions)
331
+
332
+
333
+        this.month_prescriptions = []
334
+
329 335
         let drug_month_prescriptions = {
330
-          advices:[],
336
+          advices: []
331 337
         }
332
-        let drug_ids=[]
333
-        let project_month_prescriptions ={
334
-          project:[],
338
+        let drug_ids = []
339
+        let project_month_prescriptions = {
340
+          project: []
335 341
 
336 342
         }
337
-        let project_ids=[]
343
+        let project_ids = []
338 344
 
339
-        let addition_month_prescriptions ={
340
-          addtions:[],
345
+        let addition_month_prescriptions = {
346
+          addition: []
341 347
 
342 348
         }
343
-        let additions_ids=[]
349
+        let additions_ids = []
344 350
 
351
+        for (let i = 0; i < month_prescriptions.length; i++) {
352
+          if (month_prescriptions[i].type == 1) { //药品
353
+            for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
354
+              let obj = {
355
+                id: month_prescriptions[i].advices[a].drug_id,
356
+                price:month_prescriptions[i].advices[a].price,
345 357
 
346
-        for (let i = 0; i < month_prescriptions.length; i++){
347
-          if(month_prescriptions[i].type == 1){ //药品
348
-            for (let a = 0; a < month_prescriptions[i].advices.length; a++){
349
-              drug_ids.push(month_prescriptions[i].advices[a].drug_id)
358
+              }
359
+              drug_ids.push(obj)
350 360
               drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
351 361
             }
352 362
 
353
-          }else if(month_prescriptions[i].type == 2){ //项目
354
-            for (let a = 0; a < month_prescriptions[i].project.length; a++){
355
-              project_ids.push(month_prescriptions[i].project[a].project_id)
363
+          } else if (month_prescriptions[i].type == 2) { //项目
364
+            for (let a = 0; a < month_prescriptions[i].project.length; a++) {
365
+              let obj = {
366
+                id: month_prescriptions[i].project[a].project_id,
367
+                price:month_prescriptions[i].project[a].price,
368
+
369
+              }
370
+              project_ids.push(obj)
356 371
               project_month_prescriptions.project.push(month_prescriptions[i].project[a])
357 372
             }
358 373
           }
359 374
           //附加收费
360 375
           for (let a = 0; a < month_prescriptions[i].addition.length; a++) {
361
-            additions_ids.push(month_prescriptions[i].addition[a].item_id)
362
-            addition_month_prescriptions.addtions.push(month_prescriptions[i].addition[a])
363
-          }
376
+            let obj = {
377
+              id: month_prescriptions[i].addition[a].item_id,
378
+              price:month_prescriptions[i].addition[a].price,
364 379
 
365
-        }
380
+            }
381
+            additions_ids.push(obj)
382
+            addition_month_prescriptions.addition.push(month_prescriptions[i].addition[a])
366 383
 
384
+          }
367 385
 
386
+        }
387
+        console.log("00000000000000")
388
+        console.log(drug_ids)
389
+        console.log(project_ids)
390
+        console.log(additions_ids)
391
+        console.log("00000000000000")
368 392
 
369 393
 
370 394
         const obj = {}
@@ -372,119 +396,278 @@
372 396
         const obj2 = {}
373 397
 
374 398
         drug_ids = drug_ids.reduce((cur, next) => {
375
-          obj[next] ? '' : obj[next] = true && cur.push(next)
399
+          obj[next.price] ? '' : obj[next.price] = true && cur.push(next)
376 400
           return cur
377 401
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
378 402
         project_ids = project_ids.reduce((cur, next) => {
379
-          obj1[next] ? '' : obj1[next] = true && cur.push(next)
403
+            obj[next.price] ? '' : obj[next.price] = true &&  cur.push(next)
380 404
           return cur
381 405
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
382 406
         additions_ids = additions_ids.reduce((cur, next) => {
383
-          obj2[next] ? '' : obj2[next] = true && cur.push(next)
407
+          obj[next.price] ? '' : obj[next.price] = true  && cur.push(next)
384 408
           return cur
385 409
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
386 410
 
387 411
 
388 412
 
413
+        let drugs = []
414
+        let projects = []
415
+        let additions = []
389 416
 
390
-
391
-        let drugs =[]
392
-        let projects =[]
393
-        let additions =[]
394
-
395
-
396
-        for (let i = 0; i < drug_ids.length; i++){
417
+        for (let i = 0; i < drug_ids.length; i++) {
397 418
           let obj = {}
398
-          let price = 0
399 419
           let count = 0
400
-          for (let a = 0; a < drug_month_prescriptions.advices.length; a++){
401
-            if(drug_ids[i] ==  drug_month_prescriptions.advices[a].drug_id){
420
+          for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
421
+            if (drug_ids[i].price == drug_month_prescriptions.advices[a].price) {
402 422
               obj['drug_name'] = drug_month_prescriptions.advices[a].advice_name
403 423
               obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
404 424
               obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
405 425
               obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency
406 426
               obj['day'] = drug_month_prescriptions.advices[a].day
407 427
               // obj['prescribing_number'] =  obj['prescribing_number']  + drug_month_prescriptions.advices[a].prescribing_number
408
-              obj['prescribing_number_unit'] =  drug_month_prescriptions.advices[a].prescribing_number_unit
409
-              obj['medical_insurance_number'] =  drug_month_prescriptions.advices[a].drug.medical_insurance_number
410
-              obj['id'] =  drug_month_prescriptions.advices[a].drug_id
428
+              obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
429
+              obj['medical_insurance_number'] = drug_month_prescriptions.advices[a].drug.medical_insurance_number
430
+              obj['id'] = drug_month_prescriptions.advices[a].drug_id
411 431
               // obj['retail_price'] = obj['retail_price'] +  drug_month_prescriptions.advices[a].drug.retail_price
412
-
413
-
414
-              count = count +  drug_month_prescriptions.advices[a].prescribing_number
415
-              price = price +   drug_month_prescriptions.advices[a].price
432
+              obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price)
433
+              count = count + drug_month_prescriptions.advices[a].prescribing_number
416 434
 
417 435
             }
418 436
           }
419
-          obj['retail_price'] = price
420 437
           obj['prescribing_number'] = count
421 438
           drugs.push(obj)
422 439
         }
423 440
 
424
-
425
-
426
-
427
-        for (let i = 0; i < project_ids.length; i++){
441
+        for (let i = 0; i < project_ids.length; i++) {
428 442
           let obj = {}
429
-          let price = 0
430 443
           let count = 0
431
-          for (let a = 0; a < project_month_prescriptions.project.length; a++){
432
-            if(project_ids[i] ==  project_month_prescriptions.project[a].project_id){
444
+          for (let a = 0; a < project_month_prescriptions.project.length; a++) {
445
+            if (project_ids[i].price == project_month_prescriptions.project[a].price) {
433 446
               obj['project_name'] = project_month_prescriptions.project[a].project.project_name
434 447
               obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
435 448
               obj['single_dose'] = project_month_prescriptions.project[a].single_dose
436 449
               obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
437 450
               obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
438 451
               obj['number_days'] = project_month_prescriptions.project[a].day
439
-              obj['medical_code'] =  project_month_prescriptions.project[a].project.medical_code
440
-              obj['unit'] =  project_month_prescriptions.project[a].unit
441
-              obj['project_id'] =  project_month_prescriptions.project[a].project_id
442
-              count = count +  project_month_prescriptions.project[a].count
443
-              price = price +   project_month_prescriptions.project[a].price
452
+              obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
453
+              obj['unit'] = project_month_prescriptions.project[a].unit
454
+              obj['project_id'] = project_month_prescriptions.project[a].project_id
455
+              count = count + project_month_prescriptions.project[a].count
456
+              // price = price + project_month_prescriptions.project[a].price
457
+              obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
458
+
444 459
             }
445 460
           }
446
-          obj['price'] = price
447 461
           obj['total'] = count
448 462
           projects.push(obj)
449 463
         }
450 464
 
451
-
452
-        for (let i = 0; i < additions_ids.length; i++){
465
+        for (let i = 0; i < additions_ids.length; i++) {
453 466
           let obj = {}
454
-          let price = 0
455 467
           let count = 0
456
-          for (let a = 0; a < addition_month_prescriptions.addition.length; a++){
457
-            if(project_ids[i] ==  addition_month_prescriptions.addition[a].item_id){
458
-              obj['item_name'] = addition_month_prescriptions.addition[a].item_name
459
-              obj['id'] = addition_month_prescriptions.addition[a].id
460
-              obj['item_id'] =  addition_month_prescriptions.addition[a].item_id
461
-              count = count +  addition_month_prescriptions.addition[a].count
462
-              price = price +   addition_month_prescriptions.addition[a].price
468
+          console.log(addition_month_prescriptions.addition)
469
+          if (addition_month_prescriptions.addition) {
470
+            for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
471
+              if (project_ids[i].price == addition_month_prescriptions.addition[a].price) {
472
+                obj['item_name'] = addition_month_prescriptions.addition[a].item_name
473
+                obj['id'] = addition_month_prescriptions.addition[a].id
474
+                obj['item_id'] = addition_month_prescriptions.addition[a].item_id
475
+                count = count + addition_month_prescriptions.addition[a].count
476
+                obj['price'] = parseFloat(addition_month_prescriptions.addition[a].price)
477
+              }
463 478
             }
479
+            obj['count'] = count
480
+            additions.push(obj)
464 481
           }
465
-          obj['price'] = price
466
-          obj['count'] = count
467
-          additions.push(obj)
468 482
         }
469 483
 
484
+        console.log(drugs)
485
+        console.log(projects)
486
+        console.log(additions)
470 487
 
471 488
         let p1 = {
472 489
           name: '处方' + 1,
473 490
           advices: drugs,
474 491
           project: [],
475
-          type:1,
476
-          addition: additions,
492
+          type: 1,
493
+          addition: additions
477 494
         }
478 495
         let p2 = {
479 496
           name: '处方' + 2,
480
-          type:2,
497
+          type: 2,
481 498
           project: projects,
482 499
           advices: [],
500
+          addition: []
501
+
483 502
         }
503
+
484 504
         this.month_prescriptions.push(p1)
485 505
         this.month_prescriptions.push(p2)
486 506
 
507
+        this.curMonthPrescriptions = this.month_prescriptions[0]
508
+
487 509
       },
510
+
511
+      // setMonthPrescription(month_prescriptions){
512
+      //   let drug_month_prescriptions = {
513
+      //     advices:[],
514
+      //   }
515
+      //   let drug_ids=[]
516
+      //   let project_month_prescriptions ={
517
+      //     project:[],
518
+      //
519
+      //   }
520
+      //   let project_ids=[]
521
+      //
522
+      //   let addition_month_prescriptions ={
523
+      //     addtions:[],
524
+      //
525
+      //   }
526
+      //   let additions_ids=[]
527
+      //
528
+      //
529
+      //   for (let i = 0; i < month_prescriptions.length; i++){
530
+      //     if(month_prescriptions[i].type == 1){ //药品
531
+      //       for (let a = 0; a < month_prescriptions[i].advices.length; a++){
532
+      //         drug_ids.push(month_prescriptions[i].advices[a].drug_id)
533
+      //         drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
534
+      //       }
535
+      //
536
+      //     }else if(month_prescriptions[i].type == 2){ //项目
537
+      //       for (let a = 0; a < month_prescriptions[i].project.length; a++){
538
+      //         project_ids.push(month_prescriptions[i].project[a].project_id)
539
+      //         project_month_prescriptions.project.push(month_prescriptions[i].project[a])
540
+      //       }
541
+      //     }
542
+      //     //附加收费
543
+      //     for (let a = 0; a < month_prescriptions[i].addition.length; a++) {
544
+      //       additions_ids.push(month_prescriptions[i].addition[a].item_id)
545
+      //       addition_month_prescriptions.addtions.push(month_prescriptions[i].addition[a])
546
+      //     }
547
+      //
548
+      //   }
549
+      //
550
+      //
551
+      //
552
+      //
553
+      //   const obj = {}
554
+      //   const obj1 = {}
555
+      //   const obj2 = {}
556
+      //
557
+      //   drug_ids = drug_ids.reduce((cur, next) => {
558
+      //     obj[next] ? '' : obj[next] = true && cur.push(next)
559
+      //     return cur
560
+      //   }, []) // 设置cur默认类型为数组,并且初始值为空的数组
561
+      //   project_ids = project_ids.reduce((cur, next) => {
562
+      //     obj1[next] ? '' : obj1[next] = true && cur.push(next)
563
+      //     return cur
564
+      //   }, []) // 设置cur默认类型为数组,并且初始值为空的数组
565
+      //   additions_ids = additions_ids.reduce((cur, next) => {
566
+      //     obj2[next] ? '' : obj2[next] = true && cur.push(next)
567
+      //     return cur
568
+      //   }, []) // 设置cur默认类型为数组,并且初始值为空的数组
569
+      //
570
+      //
571
+      //
572
+      //
573
+      //
574
+      //   let drugs =[]
575
+      //   let projects =[]
576
+      //   let additions =[]
577
+      //
578
+      //
579
+      //   for (let i = 0; i < drug_ids.length; i++){
580
+      //     let obj = {}
581
+      //     let price = 0
582
+      //     let count = 0
583
+      //     for (let a = 0; a < drug_month_prescriptions.advices.length; a++){
584
+      //       if(drug_ids[i] ==  drug_month_prescriptions.advices[a].drug_id){
585
+      //         obj['drug_name'] = drug_month_prescriptions.advices[a].advice_name
586
+      //         obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
587
+      //         obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
588
+      //         obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency
589
+      //         obj['day'] = drug_month_prescriptions.advices[a].day
590
+      //         // obj['prescribing_number'] =  obj['prescribing_number']  + drug_month_prescriptions.advices[a].prescribing_number
591
+      //         obj['prescribing_number_unit'] =  drug_month_prescriptions.advices[a].prescribing_number_unit
592
+      //         obj['medical_insurance_number'] =  drug_month_prescriptions.advices[a].drug.medical_insurance_number
593
+      //         obj['id'] =  drug_month_prescriptions.advices[a].drug_id
594
+      //         // obj['retail_price'] = obj['retail_price'] +  drug_month_prescriptions.advices[a].drug.retail_price
595
+      //
596
+      //
597
+      //         count = count +  drug_month_prescriptions.advices[a].prescribing_number
598
+      //         price = price +   drug_month_prescriptions.advices[a].price
599
+      //
600
+      //       }
601
+      //     }
602
+      //     obj['retail_price'] = price
603
+      //     obj['prescribing_number'] = count
604
+      //     drugs.push(obj)
605
+      //   }
606
+      //
607
+      //
608
+      //
609
+      //
610
+      //   for (let i = 0; i < project_ids.length; i++){
611
+      //     let obj = {}
612
+      //     let price = 0
613
+      //     let count = 0
614
+      //     for (let a = 0; a < project_month_prescriptions.project.length; a++){
615
+      //       if(project_ids[i] ==  project_month_prescriptions.project[a].project_id){
616
+      //         obj['project_name'] = project_month_prescriptions.project[a].project.project_name
617
+      //         obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
618
+      //         obj['single_dose'] = project_month_prescriptions.project[a].single_dose
619
+      //         obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
620
+      //         obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
621
+      //         obj['number_days'] = project_month_prescriptions.project[a].day
622
+      //         obj['medical_code'] =  project_month_prescriptions.project[a].project.medical_code
623
+      //         obj['unit'] =  project_month_prescriptions.project[a].unit
624
+      //         obj['project_id'] =  project_month_prescriptions.project[a].project_id
625
+      //         count = count +  project_month_prescriptions.project[a].count
626
+      //         price = price +   project_month_prescriptions.project[a].price
627
+      //       }
628
+      //     }
629
+      //     obj['price'] = price
630
+      //     obj['total'] = count
631
+      //     projects.push(obj)
632
+      //   }
633
+      //
634
+      //
635
+      //   for (let i = 0; i < additions_ids.length; i++){
636
+      //     let obj = {}
637
+      //     let price = 0
638
+      //     let count = 0
639
+      //     for (let a = 0; a < addition_month_prescriptions.addition.length; a++){
640
+      //       if(project_ids[i] ==  addition_month_prescriptions.addition[a].item_id){
641
+      //         obj['item_name'] = addition_month_prescriptions.addition[a].item_name
642
+      //         obj['id'] = addition_month_prescriptions.addition[a].id
643
+      //         obj['item_id'] =  addition_month_prescriptions.addition[a].item_id
644
+      //         count = count +  addition_month_prescriptions.addition[a].count
645
+      //         price = price +   addition_month_prescriptions.addition[a].price
646
+      //       }
647
+      //     }
648
+      //     obj['price'] = price
649
+      //     obj['count'] = count
650
+      //     additions.push(obj)
651
+      //   }
652
+      //
653
+      //
654
+      //   let p1 = {
655
+      //     name: '处方' + 1,
656
+      //     advices: drugs,
657
+      //     project: [],
658
+      //     type:1,
659
+      //     addition: additions,
660
+      //   }
661
+      //   let p2 = {
662
+      //     name: '处方' + 2,
663
+      //     type:2,
664
+      //     project: projects,
665
+      //     advices: [],
666
+      //   }
667
+      //   this.month_prescriptions.push(p1)
668
+      //   this.month_prescriptions.push(p2)
669
+      //
670
+      // },
488 671
       getList() {
489 672
         let params = {
490 673
           'record_date': this.record_date,

+ 15 - 15
src/xt_pages/outpatientRegistration/registrationHistory.vue View File

@@ -102,10 +102,10 @@
102 102
                 </el-table-column>
103 103
                 <el-table-column align="center" prop="name" label="操作" width="180">
104 104
                     <template slot-scope="scope">
105
-                      <el-button size="mini" type="primary" v-if="scope.row.record_date < startUnix" :disabled="true">已过号</el-button> 
106
-                      <el-button size="mini" type="primary" v-if="scope.row.is_return == 1 && scope.row.record_date >= startUnix" @click ="toReturnPatient(scope.row.id)">退号</el-button> 
105
+                      <el-button size="mini" type="primary" v-if=" scope.row.order.order_status == 0 && scope.row.record_date < startUnix" :disabled="true">已过号</el-button>
106
+                      <el-button size="mini" type="primary" v-if="scope.row.is_return == 1 && scope.row.record_date >= startUnix && scope.row.order.order_status != 2" @click ="toReturnPatient(scope.row.id)">退号</el-button>
107 107
                       <el-button size="mini" type="primary" v-if="scope.row.record_date == startUnix && scope.row.is_return == 2" :disabled="true">已退号</el-button>
108
-                      <el-button size="mini" type="primary" v-if="scope.row.record_date == startUnix && scope.row.is_return == 3" :disabled="true">已就诊</el-button>  
108
+                      <el-button size="mini" type="primary" v-if="scope.row.record_date == startUnix && scope.row.is_return == 3" :disabled="true">已就诊</el-button>
109 109
                       <el-button size="mini" type="primary" @click="open(scope.row)">详情</el-button>
110 110
                     </template>
111 111
                 </el-table-column>
@@ -187,11 +187,11 @@
187 187
                     <el-form-item label="科室:"  prop="department" :validate-event="is_Name">
188 188
                       <div>{{ getDepartMent(form.departments) }}</div>
189 189
                     </el-form-item>
190
-                    <!-- <el-form-item label="是否需要工本费:"> 
190
+                    <!-- <el-form-item label="是否需要工本费:">
191 191
                       <div v-if="form.is_need_cost_of_production == 1">是</div>
192 192
                       <div v-else>否</div>
193 193
                     </el-form-item> -->
194
-                    
194
+
195 195
                     <el-form-item label="挂号费:">
196 196
                       <div>{{ form.register_cost }}</div>
197 197
                     </el-form-item>
@@ -297,7 +297,7 @@ export default {
297 297
               value: 6,
298 298
               label: "港澳地区身份证"
299 299
             }],
300
-            settlement: 
300
+            settlement:
301 301
             [
302 302
               {value: 1,label: '医保'},
303 303
               {value: 2,label: '自费'},
@@ -346,7 +346,7 @@ export default {
346 346
               value: 5,
347 347
               label: "专家"
348 348
             }],
349
-            
349
+
350 350
             tablePatient:[],
351 351
             creator:"",
352 352
             startUnix:'',
@@ -364,16 +364,16 @@ export default {
364 364
         //         item.create_time = moment(item.create_time * 1000).format('YYYY-MM-DD')
365 365
         //         arr.push(item)
366 366
         //     }
367
-            
367
+
368 368
         // })
369 369
         // this.tableData = arr
370 370
        //获取所有挂号号的患者
371 371
 
372 372
        this.creator = this.$store.getters.xt_user.user.user_name
373 373
        var today = moment().startOf('day').format('YYYY-MM-DD')
374
-       var todayUnix = Date.parse(today)/1000 
374
+       var todayUnix = Date.parse(today)/1000
375 375
        this.startUnix = todayUnix - 28800
376
-      
376
+
377 377
        this.getlist()
378 378
        this.getDictionaryDataConfig()
379 379
     },
@@ -444,7 +444,7 @@ export default {
444 444
                 this.doctorList = doctor
445 445
              }
446 446
           })
447
- 
447
+
448 448
         },
449 449
         getDepartMent(id){
450 450
           var name = ""
@@ -459,7 +459,7 @@ export default {
459 459
           var user_name = ""
460 460
           for(let i=0;i<this.doctorList.length;i++){
461 461
             if(id == this.doctorList[i].admin_user_id){
462
-               user_name = this.doctorList[i].user_name 
462
+               user_name = this.doctorList[i].user_name
463 463
             }
464 464
           }
465 465
           return user_name
@@ -504,7 +504,7 @@ export default {
504 504
           key = keyword
505 505
         }
506 506
         let searchArray = []
507
-       
507
+
508 508
         var params = {
509 509
            keyword:key
510 510
         }
@@ -519,7 +519,7 @@ export default {
519 519
         return searchArray
520 520
       },
521 521
 
522
-      handleSelect(val){   
522
+      handleSelect(val){
523 523
         this.search_input = val.name
524 524
         this.getlist()
525 525
       },
@@ -585,7 +585,7 @@ export default {
585 585
         })
586 586
         return str
587 587
       },
588
-      
588
+
589 589
       getBanlance(id){
590 590
         var label = ""
591 591
          for(let i=0;i<this.settlement.length;i++){

+ 1 - 1
src/xt_pages/qcd/officesControlAnalysis/project.vue View File

@@ -830,7 +830,7 @@ export default {
830 830
            four_qurter_end:four_qurter_end,
831 831
            bloodType:this.bloodType
832 832
          }
833
-        //  console.log("params",params)
833
+         // console.log("params",params)
834 834
        getBloodPressureList(params).then(response=>{
835 835
           if(response.data.state == 1){
836 836
 

+ 20 - 20
src/xt_pages/role/departManage.vue View File

@@ -69,7 +69,7 @@
69 69
           </template>
70 70
         </el-table-column>
71 71
       </el-table>
72
-      
72
+
73 73
 
74 74
         <el-pagination
75 75
             @size-change="handleSizeChange"
@@ -84,9 +84,9 @@
84 84
          >
85 85
         </el-pagination>
86 86
 
87
-     
88
-       
89
-      
87
+
88
+
89
+
90 90
       <el-dialog
91 91
         title="添加科室"
92 92
         :visible.sync="dialogVisible"
@@ -97,14 +97,14 @@
97 97
                  <el-col :span="10">
98 98
                    <el-form-item label="科室名称:">
99 99
                       <el-input v-model="form.name" style="width:200px"></el-input>
100
-                  </el-form-item> 
100
+                  </el-form-item>
101 101
                  </el-col>
102 102
              </el-row >
103 103
              <el-row :span="24" >
104 104
                  <el-col :span="12">
105 105
                    <el-form-item label="医保科室编号:">
106 106
                       <el-input v-model="form.number"  style="width:200px"></el-input>
107
-                  </el-form-item> 
107
+                  </el-form-item>
108 108
                  </el-col>
109 109
              </el-row>
110 110
           </el-form>
@@ -115,7 +115,7 @@
115 115
         </span>
116 116
     </el-dialog>
117 117
 
118
-     
118
+
119 119
       <el-dialog
120 120
         title="编辑科室"
121 121
         :visible.sync="editDialogVisible"
@@ -126,14 +126,14 @@
126 126
                  <el-col :span="10">
127 127
                    <el-form-item label="科室名称:">
128 128
                       <el-input v-model="form.name" style="width:200px"></el-input>
129
-                  </el-form-item> 
129
+                  </el-form-item>
130 130
                  </el-col>
131 131
              </el-row >
132 132
              <el-row :span="24" >
133 133
                  <el-col :span="12">
134 134
                    <el-form-item label="医保科室编号:">
135 135
                       <el-input v-model="form.number"  style="width:200px"></el-input>
136
-                  </el-form-item> 
136
+                  </el-form-item>
137 137
                  </el-col>
138 138
              </el-row>
139 139
           </el-form>
@@ -161,7 +161,7 @@ export default {
161 161
     return {
162 162
       crumbs: [
163 163
         { path: false, name: "管理中心" },
164
-        { path: false, name: "部门管理" }
164
+        { path: false, name: "科室管理" }
165 165
       ],
166 166
       tableData:[],
167 167
       dialogVisible:false,
@@ -201,7 +201,7 @@ export default {
201 201
     SaveDepartment(formName){
202 202
          var params = {
203 203
             name:this.form.name,
204
-            number:this.form.number, 
204
+            number:this.form.number,
205 205
          }
206 206
        this.$refs[formName].validate((valid)=>{
207 207
           SaveDepartment(params).then(response=>{
@@ -246,12 +246,12 @@ export default {
246 246
          }
247 247
       })
248 248
     },
249
-    
249
+
250 250
     UpdatedDepartment(formName){
251 251
          var params = {
252 252
             id:this.form.id,
253 253
             name:this.form.name,
254
-            number:this.form.number, 
254
+            number:this.form.number,
255 255
          }
256 256
        this.$refs[formName].validate((valid)=>{
257 257
           UpdatedDepartment(params).then(response=>{
@@ -265,7 +265,7 @@ export default {
265 265
           })
266 266
        })
267 267
     },
268
-    
268
+
269 269
    DeleteDepartment(id,index){
270 270
       this.$confirm("确认删除此部门吗?", "删除", {
271 271
         confirmButtonText: "确 定",
@@ -282,13 +282,13 @@ export default {
282 282
        });
283 283
      }).catch(() => {});
284 284
     }
285
-  
286
-    
285
+
286
+
287 287
   },
288
-    
289
-  
290
- 
291
- 
288
+
289
+
290
+
291
+
292 292
 };
293 293
 </script>
294 294
 

+ 2 - 1
src/xt_pages/sign/lineUp.vue View File

@@ -398,6 +398,7 @@ export default {
398 398
                     }else if(res.channel == 'patientCallInfo'){
399 399
                         console.log(999999999999,res.data)
400 400
                         let second = res.data.second
401
+                        let newType = res.data.type
401 402
                     
402 403
                         console.log('执行几次',this.voiceNum)
403 404
                         if(this.voice == true){
@@ -420,7 +421,7 @@ export default {
420 421
                                     this.voice = true 
421 422
                                     let obj = {
422 423
                                         cmd: "queue/callreturn",
423
-                                        data: {patient_id:this.patient_id},
424
+                                        data: {patient_id:this.patient_id,type:newType},
424 425
                                     };
425 426
                                     this.websocketSend(obj)
426 427
                                     clearInterval(this.voiceTime);

+ 9 - 5
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue View File

@@ -421,7 +421,7 @@
421 421
         this.isVisibility = true
422 422
       }, 
423 423
       comfirm: function(val) {
424
-
424
+        console.log("Val2222222",val)
425 425
         this.$refs.dialog.hide()
426 426
         if (val.selectedGoodInfo.length > 0) {
427 427
           for (let i = val.selectedGoodInfo.length - 1; i >= 0; i--) {
@@ -429,7 +429,7 @@
429 429
               this.recordInfo.recordData[this.currentIndex].drug_id = val.selectedGoodInfo[i].id
430 430
               this.recordInfo.recordData[this.currentIndex].price = val.selectedGoodInfo[i].last_price.toString()
431 431
               this.recordInfo.recordData[this.currentIndex].retail_price = val.selectedGoodInfo[i].retail_price.toString()
432
-              // this.recordInfo.recordData[this.currentIndex].min_unit = val.selectedGoodInfo[i].min_unit
432
+              this.recordInfo.recordData[this.currentIndex].min_unit = val.selectedGoodInfo[i].min_unit
433 433
             } else {
434 434
               const tempForm = {}
435 435
               tempForm["id"] = 0;
@@ -443,7 +443,7 @@
443 443
               tempForm['remark'] = ''
444 444
               tempForm['dealer'] = ''
445 445
               tempForm['manufacturer'] = ''
446
-              tempForm['min_unit']=''
446
+              tempForm['min_unit']= val.selectedGoodInfo[i].min_unit
447 447
               this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
448 448
             }
449 449
           }
@@ -487,7 +487,9 @@
487 487
           loading.close()
488 488
 
489 489
         })
490
-      }, typeName: function(drug_id) {
490
+      },
491
+       typeName: function(drug_id) {
492
+        
491 493
         let name = "";
492 494
         for (let i = 0; i < this.goodInfo.length; i++) {
493 495
           if (this.goodInfo[i].id == drug_id) {
@@ -504,7 +506,8 @@
504 506
           }
505 507
         }
506 508
         return name;
507
-      }, handleEdit: function(index, row) {
509
+      },
510
+       handleEdit: function(index, row) {
508 511
         const tempObj = {}
509 512
         tempObj['drug_id'] = 0
510 513
         tempObj['number'] = ''
@@ -516,6 +519,7 @@
516 519
         tempObj['remark'] = ''
517 520
         tempObj['dealer'] = ''
518 521
         tempObj['manufacturer'] = ''
522
+        tempObj['min_unit'] = ''
519 523
         this.recordInfo.recordData.push(tempObj)
520 524
       }, handleDelete: function(index, row) {
521 525
         if (this.recordInfo.recordData.length <= 1) {

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

@@ -341,6 +341,7 @@ export default {
341 341
             tempForm['price'] =  val.selectedGoodInfo[i].last_price.toString()
342 342
             tempForm['count'] = ''
343 343
             tempForm['remark'] = ''
344
+            tempForm['min_unit'] = val.selectedGoodInfo[i].min_unit
344 345
             this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
345 346
           }
346 347
         }
@@ -417,6 +418,7 @@ export default {
417 418
       });
418 419
     },
419 420
     typeName: function(drug_id) {
421
+    
420 422
       let name = "";
421 423
       for (let i = 0; i < this.goodInfo.length; i++) {
422 424
         if (this.goodInfo[i].id == drug_id) {
@@ -425,7 +427,8 @@ export default {
425 427
         }
426 428
       }
427 429
       return name;
428
-    }, specificationName: function(drug_id) {
430
+    },
431
+     specificationName: function(drug_id) {
429 432
       let name = "";
430 433
       for (let i = 0; i < this.goodInfo.length; i++) {
431 434
         if (this.goodInfo[i].id == drug_id) {
@@ -441,7 +444,7 @@ export default {
441 444
       tempObj["price"] = "";
442 445
       tempObj["retail_price"] = "";
443 446
       tempObj["remark"] = "";
444
-
447
+      tempObj["min_unit"] = "";
445 448
       this.recordInfo.recordData.push(tempObj);
446 449
     },
447 450
     handleDelete: function(index, row) {
@@ -469,6 +472,7 @@ export default {
469 472
       }
470 473
     },
471 474
     showDialog(index, row) {
475
+      
472 476
       const loading = this.$loading({
473 477
         lock: true,
474 478
         text: 'Loading',
@@ -594,7 +598,7 @@ export default {
594 598
     tempObj["return_count"] = 0;
595 599
     tempObj["price"] = "";
596 600
     tempObj["remark"] = "";
597
-
601
+    tempObj["min_unit"] = "";
598 602
 
599 603
     this.recordInfo.recordData.push(tempObj);
600 604
     this.GetConfigInfo();

+ 4 - 1
src/xt_pages/stock/drugs/drugsStockDialog/index.vue View File

@@ -151,6 +151,7 @@
151 151
 
152 152
       },
153 153
       comfirm: function(formName) {
154
+       
154 155
         this.goodInfoTableData = []
155 156
         this.$emit('dialog-comfirm', this.getValue())
156 157
         this.$refs.multipleTable.clearSelection()
@@ -158,6 +159,7 @@
158 159
       },
159 160
       getValue: function() {
160 161
         this.multipleSelection = []
162
+        console.log("库存22222",this.propForm.goods)
161 163
         for (let i = 0; i < this.propForm.goods.length; i++) {
162 164
           for (let a = 0; a < this.propForm.goods[i].drug_specs.length; a++) {
163 165
                 if (this.propForm.goods[i].drug_specs[a].isSelected) {
@@ -170,7 +172,8 @@
170 172
         }
171 173
         console.log(obj)
172 174
         return obj
173
-      }, goodTypeSelect: function(id) {
175
+      },
176
+       goodTypeSelect: function(id) {
174 177
         this.tempGoodInfo = []
175 178
         this.goodInfo = []
176 179
         for (let i = 0; i < this.propForm.goodInfo.length; i++) {

+ 2 - 1
src/xt_pages/stock/stockInOrderAdd.vue View File

@@ -475,6 +475,7 @@
475 475
         tempObj['remark'] = ''
476 476
         tempObj['dealer'] = ''
477 477
         tempObj['manufacturer'] = ''
478
+        tempObj['good_unit'] = ''
478 479
         this.recordInfo.recordData.push(tempObj)
479 480
       }, handleDelete: function(index, row) {
480 481
         if (this.recordInfo.recordData.length <= 1) {
@@ -496,7 +497,7 @@
496 497
         this.recordInfo.recordData = []
497 498
         getWarehouseInfoByOrdeNumber(params).then(response => {
498 499
           if (response.data.state != 0) {
499
-             console.log("8888888888mma",response.data.data.info)
500
+            
500 501
             for (let i = 0; i < response.data.data.info.length; i++) {
501 502
               this.recordInfo.recordData.push(response.data.data.info[i])
502 503
             }

+ 1 - 1
src/xt_pages/stock/stockOutOrderAdd.vue View File

@@ -463,7 +463,7 @@ export default {
463 463
       tempObj["count"] = "";
464 464
       tempObj["price"] = "";
465 465
       tempObj["remark"] = "";
466
-
466
+      tempObj["good_unit"] = "";
467 467
       this.recordInfo.recordData.push(tempObj);
468 468
     },
469 469
     handleDelete: function(index, row) {