Преглед изворни кода

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

csx пре 3 година
родитељ
комит
bd166c9d74
32 измењених фајлова са 2930 додато и 3708 уклоњено
  1. 16 0
      src/api/drug/drug_stock.js
  2. 24 0
      src/api/patient.js
  3. 7 7
      src/xt_pages/data/components/consumables.vue
  4. 8 8
      src/xt_pages/data/components/drugs.vue
  5. 7 7
      src/xt_pages/data/components/project.vue
  6. 1 0
      src/xt_pages/hospitalStation/outpatientChargesManagement.vue
  7. 12 12
      src/xt_pages/outpatientCharges/components/registerDialog9504.vue
  8. 17 23
      src/xt_pages/outpatientCharges/newStatementPrintTwo.vue
  9. 986 2114
      src/xt_pages/outpatientCharges/outpatientChargesManagement.vue
  10. 107 236
      src/xt_pages/outpatientCharges/summary.vue
  11. 1 1
      src/xt_pages/outpatientDoctorStation/components/callPrescription.vue
  12. 38 38
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  13. 1 1
      src/xt_pages/outpatientDoctorStation/components/nextOrLastPrescription.vue
  14. 204 77
      src/xt_pages/outpatientDoctorStation/doctorDesk.vue
  15. 1 1
      src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue
  16. 124 117
      src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue
  17. 539 597
      src/xt_pages/outpatientRegistration/index.vue
  18. 226 226
      src/xt_pages/outpatientRegistration/registrationHistory.vue
  19. 1 1
      src/xt_pages/stock/cancelStockOrderAdd.vue
  20. 13 10
      src/xt_pages/stock/detail/print.vue
  21. 21 67
      src/xt_pages/stock/detail/stockInDetail.vue
  22. 24 49
      src/xt_pages/stock/detail/stockOutDetail.vue
  23. 1 1
      src/xt_pages/stock/drugs/components/drugCancelDetail.vue
  24. 34 12
      src/xt_pages/stock/drugs/components/drugInOrder.vue
  25. 121 27
      src/xt_pages/stock/drugs/components/drugOutDetail.vue
  26. 101 8
      src/xt_pages/stock/drugs/drugOutOrderPrint.vue
  27. 24 5
      src/xt_pages/stock/drugs/drugPrint.vue
  28. 1 1
      src/xt_pages/stock/drugs/drugStockInOrderAdd.vue
  29. 3 14
      src/xt_pages/stock/drugs/drugStockOutOrder.vue
  30. 5 5
      src/xt_pages/user/components/PatientSidebar.vue
  31. 258 42
      src/xt_pages/user/templateSummary.vue
  32. 4 1
      src/xt_pages/workforce/template.vue

+ 16 - 0
src/api/drug/drug_stock.js Прегледај датотеку

@@ -565,3 +565,19 @@ export function getDrugCancelExportList(params) {
565 565
     params: params
566 566
   })
567 567
 }
568
+
569
+export function getDrugWarehouseInfoPrint(params) {
570
+  return request({
571
+    url: '/api/drug/getdrugwarehouseinfoprint',
572
+    method: 'get',
573
+    params: params
574
+  })
575
+}
576
+
577
+export function getDrugOutOrderPrint(params) {
578
+  return request({
579
+    url: '/api/drug/getdrugoutorderprint',
580
+    method: 'get',
581
+    params: params
582
+  })
583
+}

+ 24 - 0
src/api/patient.js Прегледај датотеку

@@ -476,3 +476,27 @@ export function getInitDataList(params) {
476 476
     params: params
477 477
   })
478 478
 }
479
+
480
+export function getInspectionMajorItem(params) {
481
+  return request({
482
+    url: '/api/patient/getinspectionmajoritem',
483
+    method: 'get',
484
+    params: params
485
+  })
486
+}
487
+
488
+export function getInspectionDetail(params) {
489
+  return request({
490
+    url: '/api/patient/getinspectiondetail',
491
+    method: 'Get',
492
+    params: params
493
+  })
494
+}
495
+
496
+export function getInspectionItemList(params) {
497
+  return request({
498
+    url: '/api/patient/getinspectionitemlist',
499
+    method: 'get',
500
+    params: params
501
+  })
502
+}

+ 7 - 7
src/xt_pages/data/components/consumables.vue Прегледај датотеку

@@ -43,8 +43,8 @@
43 43
     </div>
44 44
 
45 45
      <div style="display:flex; align-items:center;margin-bottom:10px;">
46
-        <el-button type="primary" size="mini" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 10138">批量备案</el-button>
47
-        <el-button type="primary" size="mini" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028 && $store.getters.xt_user.org_id != 10138" @click="GDYBBatchPutOnRecord">批量备案</el-button>
46
+        <!--<el-button type="primary" size="mini" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 10138">批量备案</el-button>-->
47
+        <!--<el-button type="primary" size="mini">批量备案</el-button>-->
48 48
         <el-link target="_blank" href="https://kuyi.shengws.com/stockTemplate.xlsx" :underline="false"
49 49
                  style="margin-left:15px">
50 50
           <el-button
@@ -130,12 +130,12 @@
130 130
           <!--<el-button type="primary" size="small" @click="clickSelfPayment(scope.row.id)">自付比例</el-button>-->
131 131
           <el-button type="danger" size="small" @click="handleGoodInfoDelete(scope.$index, scope.row)">删除</el-button>
132 132
 
133
-          <el-button type="primary" size="small" @click="toReturn(scope.row.id,scope.row.is_mark)" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 10138">
134
-             <span v-if="scope.row.is_mark == 0">备案</span>
135
-             <span v-if="scope.row.is_mark == 1">撤销</span>
136
-          </el-button>
133
+          <!--<el-button type="primary" size="small" @click="toReturn(scope.row.id,scope.row.is_mark)" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 10138">-->
134
+             <!--<span v-if="scope.row.is_mark == 0">备案</span>-->
135
+             <!--<span v-if="scope.row.is_mark == 1">撤销</span>-->
136
+          <!--</el-button>-->
137 137
 
138
-          <el-button type="primary" size="small" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028">
138
+          <el-button type="primary" size="small" >
139 139
             <span v-if="scope.row.is_mark == 0 || scope.row.is_mark == 2"  @click="putOnRecord(scope.row.id)" >目录对照</span>
140 140
             <span v-if="scope.row.is_mark == 1"  @click="putOnUnRecord(scope.row.id)" >撤消对照</span>
141 141
           </el-button>

+ 8 - 8
src/xt_pages/data/components/drugs.vue Прегледај датотеку

@@ -45,8 +45,8 @@
45 45
 
46 46
     </div>
47 47
     <div style="display:flex; align-items:center;margin-bottom:10px;">
48
-        <el-button type="primary" size="small" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 ||  this.$store.getters.xt_user.org_id == 10138 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>
49
-        <el-button type="primary" size="small" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028  && $store.getters.xt_user.org_id != 10138 && $store.getters.xt_user.org_id != 10138" @click="GDYBBatchPutOnRecord()">批量备案</el-button>
48
+        <!--<el-button type="primary" size="small" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 ||  this.$store.getters.xt_user.org_id == 10138 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>-->
49
+        <el-button type="primary" size="small"  @click="GDYBBatchPutOnRecord()">批量备案</el-button>
50 50
         <el-link target="_blank" href="https://kuyi.shengws.com/drugTemplate.xlsx" :underline="false"
51 51
                  style="margin-left:15px">
52 52
           <el-button
@@ -149,13 +149,13 @@
149 149
           <el-button @click="openForm(scope.row.id)" type="primary" size="small">编辑</el-button>
150 150
           <el-button type="danger" size="small" @click="deleteDurg(scope.row.id,scope.$index)">删除</el-button>
151 151
 
152
-        <el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.id,scope.row.is_mark)" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 10138" >
153
-          <span v-if="scope.row.is_mark == 0">备案</span>
154
-          <span v-if="scope.row.is_mark == 1">撤消</span>
155
-        </el-button>
152
+        <!--<el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.id,scope.row.is_mark)" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 10138" >-->
153
+          <!--<span v-if="scope.row.is_mark == 0">备案</span>-->
154
+          <!--<span v-if="scope.row.is_mark == 1">撤消</span>-->
155
+        <!--</el-button>-->
156 156
 
157 157
 
158
-          <el-button type="primary" size="small" icon="el-icon-refresh-left" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028 && $store.getters.xt_user.org_id != 10138">
158
+          <el-button type="primary" size="small" icon="el-icon-refresh-left">
159 159
             <span v-if="scope.row.is_mark == 0 || scope.row.is_mark == 2"  @click="putOnRecord(scope.row.id)" >目录对照</span>
160 160
             <span v-if="scope.row.is_mark == 1"  @click="putOnUnRecord(scope.row.id)" >撤消对照</span>
161 161
           </el-button>
@@ -736,7 +736,7 @@
736 736
             return false
737 737
           } else {
738 738
             this.total = response.data.data.total;
739
-          
739
+
740 740
             this.list = [];
741 741
             for (let i = 0; i < response.data.data.list.length; i++) {
742 742
               this.list.push(response.data.data.list[i])

+ 7 - 7
src/xt_pages/data/components/project.vue Прегледај датотеку

@@ -39,8 +39,8 @@
39 39
             </div>
40 40
         </div>
41 41
         <div style="display:flex; align-items:center;margin-bottom:10px;">
42
-        <el-button type="primary" size="small" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>
43
-        <el-button type="primary" size="small" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord()">批量备案</el-button>
42
+        <!--<el-button type="primary" size="small" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028" >批量备案</el-button>-->
43
+        <el-button type="primary" size="small" @click="GDYBBatchPutOnRecord()">批量备案</el-button>
44 44
         <el-link target="_blank" href="https://kuyi.shengws.com/itemTemplate.xlsx" :underline="false"
45 45
                  style="margin-left:15px">
46 46
           <el-button
@@ -114,12 +114,12 @@
114 114
                 <template slot-scope="scope">
115 115
                     <el-button @click="editHisProject(scope.row.id)" type="primary" size="small">编辑</el-button>
116 116
                     <el-button type="danger" size="small" @click="deleteProject(scope.row.id,scope.$index)">删除</el-button>
117
-                    <el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.id,scope.row.is_mark)" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 10138">
118
-                      <span v-if="scope.row.is_mark ==0">备案</span>
119
-                      <span v-if="scope.row.is_mark ==1">撤销</span>
120
-                    </el-button>
117
+                    <!--<el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.id,scope.row.is_mark)" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 10138">-->
118
+                      <!--<span v-if="scope.row.is_mark ==0">备案</span>-->
119
+                      <!--<span v-if="scope.row.is_mark ==1">撤销</span>-->
120
+                    <!--</el-button>-->
121 121
 
122
-                    <el-button type="primary" size="small" icon="el-icon-refresh-left" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028 && $store.getters.xt_user.org_id != 10138">
122
+                    <el-button type="primary" size="small" icon="el-icon-refresh-left">
123 123
                         <span v-if="scope.row.is_mark == 0 || scope.row.is_mark == 2"  @click="putOnRecord(scope.row.id)" >目录对照</span>
124 124
                         <span v-if="scope.row.is_mark == 1"  @click="putOnUnRecord(scope.row.id)" >撤消对照</span>
125 125
                     </el-button>

+ 1 - 0
src/xt_pages/hospitalStation/outpatientChargesManagement.vue Прегледај датотеку

@@ -310,6 +310,7 @@
310 310
                              v-on:confirm="registerConfirm" v-on:cancel="registerCancel"></register-dialog9504>
311 311
 
312 312
         <charge-dialog ref='charge' v-on:confirm="chargeConfirm" v-on:cancel="chargeCancel"></charge-dialog>
313
+
313 314
         <el-dialog
314 315
                 class="centerDialog"
315 316
                 width="900px"

+ 12 - 12
src/xt_pages/outpatientCharges/components/registerDialog9504.vue Прегледај датотеку

@@ -50,16 +50,16 @@
50 50
             </el-form-item>
51 51
 
52 52
 
53
-            <el-form-item label="医疗类别:" prop="medical_care">
54
-                <el-select v-model="form.medical_care"  placeholder="请选择" style="width:100%;">
55
-                    <el-option
56
-                            v-for="(item,index) in medical_care"
57
-                            :key="index"
58
-                            :label="item.label"
59
-                            :value="item.value">
60
-                    </el-option>
61
-                </el-select>
62
-            </el-form-item>
53
+            <!--<el-form-item label="医疗类别:" prop="medical_care">-->
54
+                <!--<el-select v-model="form.medical_care"  placeholder="请选择" style="width:100%;">-->
55
+                    <!--<el-option-->
56
+                            <!--v-for="(item,index) in medical_care"-->
57
+                            <!--:key="index"-->
58
+                            <!--:label="item.label"-->
59
+                            <!--:value="item.value">-->
60
+                    <!--</el-option>-->
61
+                <!--</el-select>-->
62
+            <!--</el-form-item>-->
63 63
 
64 64
 
65 65
             <el-form-item label="证件类型:" prop="certificates" >
@@ -320,7 +320,7 @@
320 320
           birthday: [{required: true, message: "患者出生日期不能为空", trigger: 'blur'}],
321 321
           certificates: [{required: true, message: "证件类型不能为空", trigger: 'change'}],
322 322
           id_card_type: [{required: true, message: "读卡类型不能为空", trigger: 'change'}],
323
-          medical_care: [{required: true, message: "医疗类别不能为空", trigger: 'change'}],
323
+          // medical_care: [{required: true, message: "医疗类别不能为空", trigger: 'change'}],
324 324
 
325 325
         },
326 326
         visibility: false,
@@ -435,7 +435,7 @@
435 435
 
436 436
         }
437 437
         this.read_loading = true
438
-        axios.get('http://127.0.0.1:9532/sz/api/readcard', {
438
+        axios.get('http://127.0.0.1:9532/api/readcard', {
439 439
           params: params
440 440
         })
441 441
           .then(function (response) {

+ 17 - 23
src/xt_pages/outpatientCharges/newStatementPrintTwo.vue Прегледај датотеку

@@ -193,8 +193,8 @@
193 193
                 scanStyles: false
194 194
               });
195 195
             }
196
-
197
-
196
+            
197
+            
198 198
           },500)
199 199
         }else{
200 200
           const style =
@@ -232,7 +232,7 @@
232 232
 
233 233
               return false
234 234
             } else {
235
-
235
+              
236 236
               this.balanceAccounts = response.data.data
237 237
               let arr = []
238 238
               let obj = {
@@ -252,7 +252,7 @@
252 252
               }
253 253
               let num = 0
254 254
               this.balanceAccounts.order_info.map(item => {
255
-
255
+                
256 256
                 if(item.advice_id > 0){
257 257
                   obj.details.push(item)
258 258
                   obj.total += (item.pric * item.advice.prescribing_number)
@@ -378,7 +378,7 @@
378 378
                         }
379 379
                       }
380 380
                       that.info.new_detail_list.push(obj)
381
-
381
+                      
382 382
                     }
383 383
                     let num = 0
384 384
                     that.info.new_detail_list.map(item => {
@@ -394,36 +394,30 @@
394 394
                       if(that.info.transBody.outputlist2[i].aka111 == '07') {
395 395
                         console.log('0707007')
396 396
                         newTotal += that.info.transBody.outputlist2[i].bka058
397
-                        // that.info.transBody.outputlist2.splice(i, 1);
398 397
                       }
399 398
                       if(that.info.transBody.outputlist2[i].aka111 == '19'){
400 399
                         console.log('191919')
401 400
                         newTotal += that.info.transBody.outputlist2[i].bka058
402
-                        // that.info.transBody.outputlist2.splice(i, 1);
403 401
                       }
402
+                      console.log(8888888,that.info.transBody.outputlist2)
404 403
                     }
404
+                    console.log(1111111111111)
405 405
                     let aka111obj = {
406 406
                       aka111:'99',
407 407
                       bka058:newTotal
408 408
                     }
409
-                    that.info.transBody.outputlist2.push(aka111obj)
410
-
411
-                    for (var i = that.info.transBody.outputlist2.length - 1; i >= 0; i--) {
412
-                      if(that.info.transBody.outputlist2[i].aka111 == '07') {
413
-                        // console.log('0707007')
414
-                        // newTotal += that.info.transBody.outputlist2[i].bka058
415
-                        that.info.transBody.outputlist2.splice(i, 1);
409
+                    console.log('aka111obj',aka111obj)
410
+                    let newOutputlist2 = []
411
+                    newOutputlist2.push(aka111obj)
412
+                    that.info.transBody.outputlist2.map(item => {
413
+                      if(item.aka111 != '07' && item.aka111 != '19'){
414
+                        newOutputlist2.push(item)
416 415
                       }
417
-                      if(that.info.transBody.outputlist2[i].aka111 == '19'){
418
-                        // console.log('191919')
419
-                        // newTotal += that.info.transBody.outputlist2[i].bka058
420
-                        that.info.transBody.outputlist2.splice(i, 1);
421
-                      }
422
-                    }
423
-
416
+                    })
417
+                    that.info.transBody.outputlist2 = newOutputlist2
424 418
                     console.log('that.info.transBody.outputlist2',that.info.transBody.outputlist2)
425 419
                     console.log('this.num222',that.num)
426
-
420
+                    
427 421
                   }
428 422
                 }
429 423
               })
@@ -454,7 +448,7 @@
454 448
 
455 449
     created() {
456 450
       this.org_id = this.$store.getters.xt_user.org_id
457
-
451
+      
458 452
       this.getInfo(this.paramsObj)
459 453
     },
460 454
     watch:{

Разлика између датотеке није приказан због своје велике величине
+ 986 - 2114
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue


+ 107 - 236
src/xt_pages/outpatientCharges/summary.vue Прегледај датотеку

@@ -6,7 +6,8 @@
6 6
         <div class="app-container">
7 7
             <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8 8
                 <div>
9
-                    <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction" @keyup.enter.native='searchAction'
9
+                    <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
10
+                              @keyup.enter.native='searchAction'
10 11
                               class="filter-item"/>
11 12
                     <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"
12 13
                                @click="searchAction">
@@ -98,7 +99,6 @@
98 99
                 </el-table-column>
99 100
 
100 101
 
101
-
102 102
                 <el-table-column align="center" width="100" prop="name" label="收费日期">
103 103
                     <template slot-scope="scope">
104 104
                         {{scope.row.setl_time?scope.row.setl_time:getTimes(scope.row.settle_accounts_date)}}
@@ -117,8 +117,7 @@
117 117
                 <el-table-column align="center" prop="name" label="操作">
118 118
                     <template slot-scope="scope">
119 119
                         <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
120
-                        <el-button size="mini" type="primary" @click="toPrint(scope.row)"
121
-                                   v-if="(scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10138)  || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9504) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9919) ||  ($store.getters.xt_user.org_id == 10106) ||  (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 4) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9990)">
120
+                        <el-button size="mini" type="primary" @click="toPrint(scope.row)">
122 121
                             结算单
123 122
                         </el-button>
124 123
                         <el-button size="mini" type="primary" @click="uploadInfo(scope.row)"
@@ -173,15 +172,15 @@
173 172
             <allListPrint :paramsObj='paramsObj'></allListPrint>
174 173
         </el-dialog>
175 174
 
176
-        <el-dialog
177
-                class="centerDialog"
178
-                width="1200px"
179
-                title="打印"
180
-                :visible.sync="statementVisible9504">
181
-            <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
182
-            <!--<new-statement-print ref="print" :paramsObj='orderObj9504'></new-statement-print>-->
183
-            <new-statement-print-two ref="print" :paramsObj='orderObj9504'></new-statement-print-two>
184
-        </el-dialog>
175
+        <!--<el-dialog-->
176
+        <!--class="centerDialog"-->
177
+        <!--width="1200px"-->
178
+        <!--title="打印"-->
179
+        <!--:visible.sync="statementVisible9504">-->
180
+        <!--&lt;!&ndash;<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>&ndash;&gt;-->
181
+        <!--&lt;!&ndash;<new-statement-print ref="print" :paramsObj='orderObj9504'></new-statement-print>&ndash;&gt;-->
182
+        <!--<new-statement-print-two ref="print" :paramsObj='orderObj9504'></new-statement-print-two>-->
183
+        <!--</el-dialog>-->
185 184
 
186 185
         <el-dialog
187 186
                 class="centerDialog"
@@ -258,92 +257,31 @@
258 257
     methods: {
259 258
       getMedType(med_type) {
260 259
         var med_type = parseInt(med_type)
261
-        if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
262
-          switch (med_type) {
263
-            case 11:
264
-              return '普通门诊'
265
-
266
-              break
267
-            case 12:
268
-              return '家庭通道'
269
-
270
-              break
271
-            case 13:
272
-              return '门诊大病'
273
-
274
-              break
275
-
276
-            case 14:
277
-              return '重疾特药'
278
-              break
279
-
280
-            case 15:
281
-              return '门诊慢病'
282
-
283
-              break
284
-            case 16:
285
-              return '门诊特检'
286
-
287
-              break
288
-            case 17:
289
-              return '健康体检'
290
-
291
-              break
292
-            case 18:
293
-              return '预防接种'
294
-
295
-              break
296
-            case 19:
297
-              return '门诊输血'
298
-
299
-              break
300
-            case 91:
301
-              return '新冠肺炎门诊'
302
-              break
303
-            case 1111:
304
-              return '精一' + '处方'
305
-              break
306
-            case 1112:
307
-              return '精二' + '处方'
308
-              break
309
-          }
310
-
311
-        } else {
312
-
313
-          switch (med_type) {
314
-            case 11:
315
-              return '普通门诊'
316
-
317
-              break
318
-            case 12:
319
-              return '门诊挂号'
320
-
321
-              break
322
-            case 13:
323
-              return '急诊'
324
-
325
-              break
326
-
327
-            case 14:
328
-              return '门诊特殊病'
329
-              break
330
-
331
-            case 15:
332
-              return '门诊统筹'
333
-
334
-              break
335
-            case 16:
336
-              return '门诊慢性病'
337
-
338
-              break
339
-            case 21:
340
-              return '普通住院'
341
-              break
342
-
343
-          }
344
-
260
+        switch (med_type) {
261
+          case 11:
262
+            return '普通门诊'
263
+            break
264
+          case 12:
265
+            return '门诊挂号'
266
+            break
267
+          case 13:
268
+            return '急诊'
269
+            break
270
+          case 14:
271
+            return '门诊特殊病'
272
+            break
273
+
274
+          case 15:
275
+            return '门诊统筹'
276
+
277
+            break
278
+          case 16:
279
+            return '门诊慢性病'
280
+            break
281
+          case 21:
282
+            return '普通住院'
283
+            break
345 284
         }
346
-
347 285
       },
348 286
       uploadInfo(row) {
349 287
         var that = this
@@ -402,8 +340,8 @@
402 340
           }).then(() => {
403 341
             let params = {
404 342
               'order_id': row.id,
405
-              'patient_id':  row.patient_id,
406
-              'record_time':this.getTimes(row.settle_accounts_date),
343
+              'patient_id': row.patient_id,
344
+              'record_time': this.getTimes(row.settle_accounts_date)
407 345
             }
408 346
             Refund(params).then(response => {
409 347
               if (response.data.state == 0) {
@@ -419,149 +357,80 @@
419 357
 
420 358
         } else {
421 359
 
422
-          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
423
-            var that = this
424
-            this.$confirm('是否退费', '退费', {
425
-              confirmButtonText: '确 定',
426
-              cancelButtonText: '取 消',
427
-              type: 'warning'
428
-            }).then(() => {
429
-              let params = {
430
-                'order_id': row.id,
431
-                'patient_id': row.patient_id,
432
-                'record_time': that.getTimes(row.settle_accounts_date),
433
-                'admin_user_id': that.$store.getters.xt_user.user.id
434
-              }
435
-              axios.get('http://127.0.0.1:9532/api/refund/post', {
436
-                params: params
437
-              })
438
-                .then(function(response) {
439
-                  if (response.data.state == 0) {
440
-                    that.$message.error(response.data.msg)
441
-                    return false
442
-                  } else {
443
-                    if (response.data.data.failed_code == -10) {
444
-                      // that.$message.error(response.data.data.msg)
445
-                      that.$confirm(response.data.data.msg, '医保错误信息', {
446
-                        confirmButtonText: '确 定',
447
-                        type: 'warning'
448
-                      }).then(() => {
449
-
450
-                      }).catch(() => {
451
-                      })
452
-                    } else {
453
-                      that.$message({ message: '退费成功', type: 'success', duration: 5000 })
454
-                      that.getHisOrderList()
455
-
456
-                    }
457
-                  }
458
-                })
459
-                .catch(function(error) {
460
-                })
461
-            }).catch(() => {
462
-            })
463
-
464
-          } else if (this.$store.getters.xt_user.org_id == 0 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
465
-            var that = this
466
-            this.$confirm('是否退费', '退费', {
467
-              confirmButtonText: '确 定',
468
-              cancelButtonText: '取 消',
469
-              type: 'warning'
470
-            }).then(() => {
471
-              let params = {
472
-                'order_id': row.id,
473
-                'patient_id': row.patient_id,
474
-                'record_time': this.getTimes(row.settle_accounts_date),
475
-                'admin_user_id': this.$store.getters.xt_user.user.id
476
-              }
477
-              axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
478
-                params: params
479
-              })
480
-                .then(function(response) {
481
-                  if (response.data.state == 0) {
482
-                    that.$message.error(response.data.msg)
483
-                    return false
484
-                  } else {
485
-                    if (response.data.data.failed_code == -10) {
486
-                      that.$confirm(response.data.data.msg, '医保错误信息', {
487
-                        confirmButtonText: '确 定',
488
-                        type: 'warning'
489
-                      }).then(() => {
490
-
491
-                      }).catch(() => {
492
-                      })
493
-
494
-                    } else {
495
-                      that.$message({ message: '退费成功', type: 'success', duration: 5000 })
496
-                      that.getHisOrderList()
497
-                    }
498
-                  }
499
-                })
500
-                .catch(function(error) {
501
-                })
502
-
503
-            }).catch(() => {
360
+          var that = this
361
+          this.$confirm('是否退费', '退费', {
362
+            confirmButtonText: '确 定',
363
+            cancelButtonText: '取 消',
364
+            type: 'warning'
365
+          }).then(() => {
366
+            let params = {
367
+              'order_id': row.id,
368
+              'patient_id': row.patient_id,
369
+              'record_time': that.getTimes(row.settle_accounts_date),
370
+              'admin_user_id': that.$store.getters.xt_user.user.id
371
+            }
372
+            axios.get('http://127.0.0.1:9532/api/refund/post', {
373
+              params: params
504 374
             })
505
-
506
-          } else {
507
-            this.$confirm('是否退费', '退费', {
508
-              confirmButtonText: '确 定',
509
-              cancelButtonText: '取 消',
510
-              type: 'warning'
511
-            }).then(() => {
512
-              let params = {
513
-                'order_id': row.id,
514
-                'patient_id':  row.patient_id,
515
-                'record_time':this.getTimes(row.settle_accounts_date),
516
-
517
-              }
518
-              Refund(params).then(response => {
375
+              .then(function(response) {
519 376
                 if (response.data.state == 0) {
520
-                  this.$message.error(response.data.msg)
377
+                  that.$message.error(response.data.msg)
521 378
                   return false
522 379
                 } else {
523
-                  this.$message({ message: '退费成功', type: 'success' })
524
-                  this.getHisOrderList()
380
+                  if (response.data.data.failed_code == -10) {
381
+                    // that.$message.error(response.data.data.msg)
382
+                    that.$confirm(response.data.data.msg, '医保错误信息', {
383
+                      confirmButtonText: '确 定',
384
+                      type: 'warning'
385
+                    }).then(() => {
386
+
387
+                    }).catch(() => {
388
+                    })
389
+                  } else {
390
+                    that.$message({ message: '退费成功', type: 'success', duration: 5000 })
391
+                    that.getHisOrderList()
392
+
393
+                  }
525 394
                 }
526 395
               })
527
-            }).catch(() => {
528
-            })
529
-          }
396
+              .catch(function(error) {
397
+              })
398
+          }).catch(() => {
399
+          })
530 400
         }
531 401
       }, toPrint(row) {
532
-        if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
533
-          if (row.mdtrt_id.indexOf('H') > -1) {
534
-            this.statementVisible9504 = true
535
-            let obj = {
536
-              order_id: row.id,
537
-              patient_id: row.patient_id,
538
-              record_time: this.getTimes(row.settle_accounts_date),
539
-              admin_user_id: this.$store.getters.xt_user.user.id
540
-            }
541
-            this.orderObj9504 = obj
542
-          } else {
543
-
544
-            this.statementVisible9504 = true
545
-            let obj = {
546
-              order_id: row.id,
547
-              patient_id: row.patient_id,
548
-              record_time: this.getTimes(row.settle_accounts_date),
549
-              admin_user_id: this.$store.getters.xt_user.user.id,
550
-              balance_accounts_type: 2
551
-            }
552
-            this.orderObj9504 = obj
553
-          }
554
-
555
-        } else {
556
-          this.statementVisible = true
557
-          let obj = {
558
-            order_id: row.id,
559
-            settle_type: row.settle_type,
560
-            start_time: row.settle_start_time,
561
-            end_time: row.settle_end_time
562
-          }
563
-          this.orderObj = obj
402
+        // if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
403
+        //   if (row.mdtrt_id.indexOf('H') > -1) {
404
+        //     this.statementVisible9504 = true
405
+        //     let obj = {
406
+        //       order_id: row.id,
407
+        //       patient_id: row.patient_id,
408
+        //       record_time: this.getTimes(row.settle_accounts_date),
409
+        //       admin_user_id: this.$store.getters.xt_user.user.id
410
+        //     }
411
+        //     this.orderObj9504 = obj
412
+        //   } else {
413
+        //
414
+        //     this.statementVisible9504 = true
415
+        //     let obj = {
416
+        //       order_id: row.id,
417
+        //       patient_id: row.patient_id,
418
+        //       record_time: this.getTimes(row.settle_accounts_date),
419
+        //       admin_user_id: this.$store.getters.xt_user.user.id,
420
+        //       balance_accounts_type: 2
421
+        //     }
422
+        //     this.orderObj9504 = obj
423
+        //   }
424
+        //
425
+        // } else {
426
+        this.statementVisible = true
427
+        let obj = {
428
+          order_id: row.id,
429
+          settle_type: row.settle_type,
430
+          start_time: row.settle_start_time,
431
+          end_time: row.settle_end_time
564 432
         }
433
+        this.orderObj = obj
565 434
 
566 435
       },
567 436
       settlementPrint(row) {
@@ -819,7 +688,7 @@
819 688
         let paramsObj = {
820 689
           order_id: obj.id,
821 690
           patient_id: obj.patient_id,
822
-          number:obj.mdtrt_id,
691
+          number: obj.mdtrt_id,
823 692
           name: obj.patient.name,
824 693
           age: obj.age,
825 694
           gend: obj.gend,
@@ -828,7 +697,9 @@
828 697
         this.invoiceParams = paramsObj
829 698
         this.invoiceVisible = true
830 699
       }
831
-    }, created() {
700
+    }
701
+    ,
702
+    created() {
832 703
 
833 704
       this.fetchAllAdminUsers()
834 705
       this.getDoctorList()

+ 1 - 1
src/xt_pages/outpatientDoctorStation/components/callPrescription.vue Прегледај датотеку

@@ -266,7 +266,7 @@
266 266
               if (obj.prescribing_number_unit == prescription.doctor_advice[b].drug.min_unit){
267 267
                 obj['retail_price'] =  prescription.doctor_advice[b].drug.min_price
268 268
               } else if(obj.prescribing_number_unit == prescription.doctor_advice[b].drug.max_unit){
269
-                obj['retail_price'] =  prescription.doctor_advice[b].drug.max_price
269
+                obj['retail_price'] =  prescription.doctor_advice[b].drug.retail_price
270 270
               } else {
271 271
                 obj['retail_price'] =  prescription.doctor_advice[b].drug.min_price
272 272
               }

+ 38 - 38
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Прегледај датотеку

@@ -48,7 +48,7 @@
48 48
 
49 49
                     <el-form-item label="诊断:" prop="name" label-position="right" style="width:66.6%;">
50 50
 
51
-                        <el-select style="width:100%;" v-model="diagnose" placeholder="" multiple>
51
+                        <el-select style="width:100%;"  v-model="diagnose" placeholder="" multiple filterable>
52 52
                             <el-option
53 53
                                     v-for="(item,index) in diagnoses"
54 54
                                     :key="index"
@@ -127,15 +127,8 @@
127 127
                                         placeholder="选择日期">
128 128
                                 </el-date-picker>
129 129
 
130
-                                <el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型"  v-if="($store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10138)" @change="changevalue" >
131
-                                    <el-option
132
-                                            v-for="(item,index) in medical_care"
133
-                                            :key="index"
134
-                                            :label="item.label"
135
-                                            :value="item.value">
136
-                                    </el-option>
137
-                                </el-select>
138
-                                <el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型"  v-else @change="changevalue" >
130
+
131
+                                <el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型"   @change="changevalue" >
139 132
                                     <el-option
140 133
                                             v-for="(item,index) in register"
141 134
                                             :key="index"
@@ -1305,12 +1298,9 @@
1305 1298
             (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
1306 1299
             ':' + (min < 10 ? '0' + min : min)
1307 1300
           this.prescriptions[i]['pre_time'] = nowTime
1308
-          if(this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138){
1309 1301
 
1310
-            this.prescriptions[i]['med_type'] = 13
1311
-          }else{
1312 1302
             this.prescriptions[i]['med_type'] = 14
1313
-          }
1303
+
1314 1304
 
1315 1305
           this.prescriptions[i].name = '处方' + (i + 1)
1316 1306
           if (i == 0) {
@@ -1370,12 +1360,9 @@
1370 1360
           this.prescriptions[i]['pre_time'] = nowTime
1371 1361
 
1372 1362
 
1373
-          if(this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138){
1374 1363
 
1375
-            this.prescriptions[i]['med_type'] = 13
1376
-          }else{
1377 1364
             this.prescriptions[i]['med_type'] = 14
1378
-          }
1365
+
1379 1366
 
1380 1367
           if (i == 0) {
1381 1368
             if (this.prescriptions[0].advices.length > 0 && this.prescriptions[0].project.length == 0) {
@@ -1911,6 +1898,16 @@
1911 1898
         }
1912 1899
 
1913 1900
 
1901
+        if (this.curPrescriptions.project.length == 0 && this.curPrescriptions.advices.length == 0) {
1902
+          this.curStatus = 1
1903
+          this.customTabIndex = 1
1904
+          this.rightTab = 1
1905
+          this.showOne = true
1906
+          this.showTwo = false
1907
+        }
1908
+
1909
+
1910
+
1914 1911
 
1915 1912
         if (info.prescription_status == 0) {
1916 1913
           this.order_status = ''
@@ -2313,12 +2310,10 @@
2313 2310
 
2314 2311
 
2315 2312
         }
2316
-        if(this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138){
2317
-          obj.med_type = 13
2318
-        }else{
2313
+
2319 2314
           obj.med_type = 14
2320 2315
 
2321
-        }
2316
+
2322 2317
         this.prescriptions.push(obj)
2323 2318
 
2324 2319
 
@@ -2524,33 +2519,38 @@
2524 2519
       },
2525 2520
 
2526 2521
       comfirm() {
2527
-        if(this.curStatus == 1  && this.rightTab == 2){
2528
-          for(let i = 0; i < this.curDrugs.length; i++){
2529
-            if(this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 10028){
2530
-
2531
-              if(this.curPrescriptions.med_type != 13 && this.curDrugs[i].drug.is_special_diseases == 1){
2532
-                this.$message.error('该处方不属于特病类型处方,无法开特病类型的药')
2533
-                return
2534
-              }
2535
-
2536
-              if(this.curPrescriptions.med_type == 13 && this.curDrugs[i].drug.is_special_diseases != 1){
2522
+        console.log(this.curPrescriptions.advices)
2523
+        console.log(this.curPrescriptions.project)
2524
+        console.log(this.curPrescriptions.advices.length)
2525
+        console.log(this.curPrescriptions.project.length)
2526
+
2527
+        if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
2528
+          if(this.$store.getters.xt_user.org_id == 10138) {
2529
+            for (let i = 0; i < this.curDrugs.length; i++) {
2530
+              if (this.curPrescriptions.med_type == 13 && this.curDrugs[i].is_special_diseases != 1) {
2537 2531
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
2538 2532
                 return
2539 2533
               }
2540 2534
 
2541
-            }else{
2542
-              if(this.curPrescriptions.med_type != 14 && this.curDrugs[i].drug.is_special_diseases == 1){
2543
-                this.$message.error('该处方不属于特病类型处方,无法开特病类型的药')
2544
-                return
2545
-              }
2546
-              if(this.curPrescriptions.med_type == 14 && this.curDrugs[i].drug.is_special_diseases != 1){
2535
+            }
2536
+          }
2537
+        }
2538
+
2539
+
2540
+        if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0){
2541
+          if(this.$store.getters.xt_user.org_id == 10138) {
2542
+            for (let i = 0; i < this.curDrugs.length; i++) {
2543
+              if (this.curPrescriptions.med_type == 13 && this.curDrugs[i].is_special_diseases != 1) {
2547 2544
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
2548 2545
                 return
2549 2546
               }
2547
+
2550 2548
             }
2551 2549
           }
2552 2550
         }
2553 2551
 
2552
+
2553
+
2554 2554
         // if (this.curPrescriptions.order_status == 2) {
2555 2555
         //   this.$message.error('该处方已经结算,无法继续添加药品或者项目')
2556 2556
         //   this.teamList = []

+ 1 - 1
src/xt_pages/outpatientDoctorStation/components/nextOrLastPrescription.vue Прегледај датотеку

@@ -324,7 +324,7 @@
324 324
               if (obj.prescribing_number_unit == prescription.doctor_advice[b].drug.min_unit){
325 325
                 obj['retail_price'] =  prescription.doctor_advice[b].drug.min_price
326 326
               } else if(obj.prescribing_number_unit == prescription.doctor_advice[b].drug.max_unit){
327
-                obj['retail_price'] =  prescription.doctor_advice[b].drug.max_price
327
+                obj['retail_price'] =  prescription.doctor_advice[b].drug.retail_price
328 328
               } else {
329 329
                 obj['retail_price'] =  prescription.doctor_advice[b].drug.min_price
330 330
               }

+ 204 - 77
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Прегледај датотеку

@@ -1276,6 +1276,7 @@
1276 1276
             this.case_history = response.data.data.case_history
1277 1277
             this.info = response.data.data.info
1278 1278
             this.last_info = response.data.data.last_info
1279
+            this.schedule = response.data.data.schedule
1279 1280
 
1280 1281
             this.doctors = response.data.data.doctors
1281 1282
             this.department = response.data.data.department
@@ -1413,7 +1414,14 @@
1413 1414
                 var preTime = "";
1414 1415
 
1415 1416
                 if (prescription.pre_time == 0) {
1416
-                  preTime = nowTime
1417
+                  if(this.schedule.schedule_type == 1){
1418
+                    preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
1419
+                  }else if(this.schedule.schedule_type == 2){
1420
+                    preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
1421
+                  }else if(this.schedule.schedule_type == 3){
1422
+                    preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
1423
+                  }
1424
+                  // preTime = nowTime
1417 1425
                 } else {
1418 1426
                   preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
1419 1427
                 }
@@ -1459,12 +1467,31 @@
1459 1467
                       id: prescription.advices[b].drug_id,
1460 1468
                       drug:prescription.advices[b].drug
1461 1469
                     };
1470
+
1471
+                    console.log("看看数据6:")
1472
+                    console.log(obj.prescribing_number_unit)
1473
+                    console.log(prescription.advices[b].drug.min_unit)
1474
+                    console.log(prescription.advices[b].drug.max_unit)
1475
+
1476
+
1462 1477
                     if (obj.prescribing_number_unit == prescription.advices[b].drug.min_unit){
1463 1478
                       obj['retail_price'] =  prescription.advices[b].drug.min_price
1479
+                      console.log("1")
1480
+
1481
+                      console.log(obj.retail_price)
1482
+
1483
+
1464 1484
                     } else if(obj.prescribing_number_unit == prescription.advices[b].drug.max_unit){
1465
-                      obj['retail_price'] =  prescription.advices[b].drug.max_price
1485
+                      obj['retail_price'] =  prescription.advices[b].drug.retail_price
1486
+                      console.log("2")
1487
+
1488
+                      console.log(obj.retail_price)
1489
+
1466 1490
                     } else {
1491
+                      console.log("3")
1467 1492
                       obj['retail_price'] =  prescription.advices[b].drug.min_price
1493
+                      console.log(obj.retail_price)
1494
+
1468 1495
                     }
1469 1496
                     tempAdvice.push(obj)
1470 1497
                   }
@@ -1505,8 +1532,14 @@
1505 1532
                     tempProject.push(obj)
1506 1533
                   }
1507 1534
 
1535
+                  if(this.schedule.schedule_type == 1){
1536
+                    var preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
1537
+                  }else if(this.schedule.schedule_type == 2){
1538
+                    var preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
1539
+                  }else if(this.schedule.schedule_type == 3){
1540
+                    var preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
1541
+                  }
1508 1542
 
1509
-                  var preTime = nowTime
1510 1543
 
1511 1544
 
1512 1545
                   let index = i + 1;
@@ -1530,13 +1563,7 @@
1530 1563
                     obj.med_type = parseInt(prescription.med_type)
1531 1564
                   }
1532 1565
                   if(obj.med_type== 0 || obj.med_type == "") {
1533
-                    if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
1534
-                      obj.med_type = 13
1535
-
1536
-                    } else {
1537 1566
                       obj.med_type = 14
1538
-
1539
-                    }
1540 1567
                   }
1541 1568
                   this.prescriptions.push(obj)
1542 1569
                 }
@@ -1553,13 +1580,7 @@
1553 1580
                   med_type:"",
1554 1581
 
1555 1582
                 };
1556
-                if(this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138){
1557
-                  obj.med_type = 13
1558
-                }else{
1559
-                  obj.med_type = 14
1560
-
1561
-                }
1562
-
1583
+                obj.med_type = 14
1563 1584
                 this.prescriptions.push(obj)
1564 1585
 
1565 1586
               }
@@ -1591,6 +1612,19 @@
1591 1612
                 'p_type':2,
1592 1613
 
1593 1614
               };
1615
+              var nowDate = new Date()
1616
+              var nowYear = nowDate.getFullYear()
1617
+              var nowMonth = nowDate.getMonth() + 1
1618
+              var nowDay = nowDate.getDate()
1619
+              var hours = nowDate.getHours()
1620
+              var min = nowDate.getMinutes()
1621
+              var nowTime =
1622
+                nowYear +
1623
+                '-' +
1624
+                (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
1625
+                '-' +
1626
+                (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
1627
+                ':' + (min < 10 ? '0' + min : min)
1594 1628
               getPatientInfo(params).then(response => {
1595 1629
                 if (response.data.state == 0) {
1596 1630
                   this.$message.error(response.data.msg);
@@ -1609,6 +1643,7 @@
1609 1643
                   this.case_history = response.data.data.case_history;
1610 1644
                   this.info = response.data.data.info;
1611 1645
                   this.last_info = response.data.data.last_info
1646
+                  this.schedule = response.data.data.schedule
1612 1647
 
1613 1648
                   this.doctors = response.data.data.doctors;
1614 1649
                   this.department = response.data.data.department;
@@ -1740,7 +1775,14 @@
1740 1775
                       var preTime = "";
1741 1776
 
1742 1777
                       if (prescription.pre_time == 0) {
1743
-                        preTime = nowTime
1778
+                        // preTime = nowTime
1779
+                        if(this.schedule.schedule_type == 1){
1780
+                          preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
1781
+                        }else if(this.schedule.schedule_type == 2){
1782
+                          preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
1783
+                        }else if(this.schedule.schedule_type == 3){
1784
+                          preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
1785
+                        }
1744 1786
                       } else {
1745 1787
                         preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
1746 1788
                       }
@@ -1786,13 +1828,34 @@
1786 1828
                             id: prescription.advices[b].drug_id,
1787 1829
                             drug:prescription.advices[b].drug
1788 1830
                           };
1831
+                          console.log("看看数据1:")
1832
+                          console.log(obj.prescribing_number_unit)
1833
+                          console.log(prescription.advices[b].drug.min_unit)
1834
+                          console.log(prescription.advices[b].drug.max_unit)
1835
+
1836
+
1837
+
1838
+
1789 1839
                           if (obj.prescribing_number_unit == prescription.advices[b].drug.min_unit){
1790 1840
                             obj['retail_price'] =  prescription.advices[b].drug.min_price
1841
+                            console.log("1")
1842
+
1843
+                            console.log(obj.retail_price)
1844
+
1845
+
1791 1846
                           } else if(obj.prescribing_number_unit == prescription.advices[b].drug.max_unit){
1792
-                            obj['retail_price'] =  prescription.advices[b].drug.max_price
1847
+                            obj['retail_price'] =  prescription.advices[b].drug.retail_price
1848
+                            console.log("2")
1849
+
1850
+                            console.log(obj.retail_price)
1851
+
1793 1852
                           } else {
1853
+                            console.log("3")
1794 1854
                             obj['retail_price'] =  prescription.advices[b].drug.min_price
1855
+                            console.log(obj.retail_price)
1856
+
1795 1857
                           }
1858
+
1796 1859
                           tempAdvice.push(obj)
1797 1860
                         }
1798 1861
 
@@ -1833,8 +1896,15 @@
1833 1896
                         }
1834 1897
 
1835 1898
 
1836
-                        var preTime = nowTime
1837
-
1899
+                        // var preTime = nowTime
1900
+                        var preTime = ''
1901
+                        if(this.schedule.schedule_type == 1){
1902
+                          preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
1903
+                        }else if(this.schedule.schedule_type == 2){
1904
+                          preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
1905
+                        }else if(this.schedule.schedule_type == 3){
1906
+                          preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
1907
+                        }
1838 1908
 
1839 1909
                         let index = i + 1;
1840 1910
                         let obj = {
@@ -1857,19 +1927,15 @@
1857 1927
                           obj.med_type = parseInt(prescription.med_type)
1858 1928
                         }
1859 1929
                         if(obj.med_type== 0 || obj.med_type == "") {
1860
-                          if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
1861
-                            obj.med_type = 13
1862 1930
 
1863
-                          } else {
1864 1931
                             obj.med_type = 14
1865 1932
 
1866
-                          }
1933
+
1867 1934
                         }
1868 1935
                         this.prescriptions.push(obj)
1869 1936
                       }
1870 1937
 
1871 1938
                     }else{
1872
-
1873 1939
                       let obj = {
1874 1940
                         id: 0,
1875 1941
                         name: '处方' + 1,
@@ -1881,12 +1947,9 @@
1881 1947
                         med_type:"",
1882 1948
 
1883 1949
                       };
1884
-                      if(this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138){
1885
-                        obj.med_type = 13
1886
-                      }else{
1950
+
1887 1951
                         obj.med_type = 14
1888 1952
 
1889
-                      }
1890 1953
                       this.prescriptions.push(obj)
1891 1954
 
1892 1955
 
@@ -2219,12 +2282,28 @@
2219 2282
                             id: prescription.advices[b].drug_id,
2220 2283
                             drug:prescription.advices[b].drug
2221 2284
                           };
2285
+                          console.log("看看数据2:")
2286
+                          console.log(obj.prescribing_number_unit)
2287
+                          console.log(prescription.advices[b].drug.min_unit)
2288
+                          console.log(prescription.advices[b].drug.max_unit)
2222 2289
                           if (obj.prescribing_number_unit == prescription.advices[b].drug.min_unit){
2223 2290
                             obj['retail_price'] =  prescription.advices[b].drug.min_price
2291
+                            console.log("1")
2292
+
2293
+                            console.log(obj.retail_price)
2294
+
2295
+
2224 2296
                           } else if(obj.prescribing_number_unit == prescription.advices[b].drug.max_unit){
2225
-                            obj['retail_price'] =  prescription.advices[b].drug.max_price
2297
+                            obj['retail_price'] =  prescription.advices[b].drug.retail_price
2298
+                            console.log("2")
2299
+
2300
+                            console.log(obj.retail_price)
2301
+
2226 2302
                           } else {
2303
+                            console.log("3")
2227 2304
                             obj['retail_price'] =  prescription.advices[b].drug.min_price
2305
+                            console.log(obj.retail_price)
2306
+
2228 2307
                           }
2229 2308
                           tempAdvice.push(obj)
2230 2309
                         }
@@ -2290,13 +2369,7 @@
2290 2369
                           obj.med_type = parseInt(prescription.med_type)
2291 2370
                         }
2292 2371
                         if(obj.med_type== 0 || obj.med_type == "") {
2293
-                          if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
2294
-                            obj.med_type = 13
2295
-
2296
-                          } else {
2297 2372
                             obj.med_type = 14
2298
-
2299
-                          }
2300 2373
                         }
2301 2374
                         this.prescriptions.push(obj)
2302 2375
                       }
@@ -2313,12 +2386,9 @@
2313 2386
                         med_type: "",
2314 2387
 
2315 2388
                       };
2316
-                      if(this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138){
2317
-                        obj.med_type = 13
2318
-                      }else{
2389
+
2319 2390
                         obj.med_type = 14
2320 2391
 
2321
-                      }
2322 2392
                       this.prescriptions.push(obj)
2323 2393
 
2324 2394
                       // if(response.data.data.count <= 1 ){
@@ -2650,12 +2720,28 @@
2650 2720
                             id: prescription.advices[b].drug_id,
2651 2721
                             drug:prescription.advices[b].drug
2652 2722
                           };
2723
+                          console.log("看看数据3:")
2724
+                          console.log(obj.prescribing_number_unit)
2725
+                          console.log(prescription.advices[b].drug.min_unit)
2726
+                          console.log(prescription.advices[b].drug.max_unit)
2653 2727
                           if (obj.prescribing_number_unit == prescription.advices[b].drug.min_unit){
2654 2728
                             obj['retail_price'] =  prescription.advices[b].drug.min_price
2729
+                            console.log("1")
2730
+
2731
+                            console.log(obj.retail_price)
2732
+
2733
+
2655 2734
                           } else if(obj.prescribing_number_unit == prescription.advices[b].drug.max_unit){
2656
-                            obj['retail_price'] =  prescription.advices[b].drug.max_price
2735
+                            obj['retail_price'] =  prescription.advices[b].drug.retail_price
2736
+                            console.log("2")
2737
+
2738
+                            console.log(obj.retail_price)
2739
+
2657 2740
                           } else {
2741
+                            console.log("3")
2658 2742
                             obj['retail_price'] =  prescription.advices[b].drug.min_price
2743
+                            console.log(obj.retail_price)
2744
+
2659 2745
                           }
2660 2746
                           tempAdvice.push(obj)
2661 2747
                         }
@@ -2721,13 +2807,8 @@
2721 2807
                           obj.med_type = parseInt(prescription.med_type)
2722 2808
                         }
2723 2809
                         if(obj.med_type== 0 || obj.med_type == "") {
2724
-                          if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
2725
-                            obj.med_type = 13
2726
-
2727
-                          } else {
2728 2810
                             obj.med_type = 14
2729 2811
 
2730
-                          }
2731 2812
                         }
2732 2813
                         this.prescriptions.push(obj)
2733 2814
                       }
@@ -2744,12 +2825,10 @@
2744 2825
                         med_type: "",
2745 2826
 
2746 2827
                       };
2747
-                      if(this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138){
2748
-                        obj.med_type = 13
2749
-                      }else{
2828
+
2750 2829
                         obj.med_type = 14
2751 2830
 
2752
-                      }
2831
+
2753 2832
                       this.prescriptions.push(obj)
2754 2833
 
2755 2834
                       // if(response.data.data.count <= 1 ){
@@ -2875,8 +2954,7 @@
2875 2954
               });
2876 2955
             this.$refs.child.watchSign = 0
2877 2956
           }
2878
-        }
2879
-        else{
2957
+        }else{
2880 2958
         var nowDate = new Date();
2881 2959
         var nowYear = nowDate.getFullYear();
2882 2960
         var nowMonth = nowDate.getMonth() + 1;
@@ -2959,6 +3037,7 @@
2959 3037
                 this.setMonthPrescription(month_prescriptions)
2960 3038
                 this.doctors = response.data.data.doctors
2961 3039
                 this.department = response.data.data.department
3040
+                this.schedule = response.data.data.schedule
2962 3041
 
2963 3042
                 for (let i = 0; i < this.doctors.length; i++) {
2964 3043
                   if (this.doctors[i].user_type == 1) {
@@ -3091,7 +3170,14 @@
3091 3170
                     var preTime = "";
3092 3171
 
3093 3172
                     if (prescription.pre_time == 0) {
3094
-                      preTime = nowTime
3173
+                      // preTime = nowTime
3174
+                      if(this.schedule.schedule_type == 1){
3175
+                        preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
3176
+                      }else if(this.schedule.schedule_type == 2){
3177
+                        preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
3178
+                      }else if(this.schedule.schedule_type == 3){
3179
+                        preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
3180
+                      }
3095 3181
                     } else {
3096 3182
                       preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
3097 3183
                     }
@@ -3137,12 +3223,28 @@
3137 3223
                           id: prescription.advices[b].drug_id,
3138 3224
                           drug:prescription.advices[b].drug
3139 3225
                         };
3226
+                        console.log("看看数据4:")
3227
+                        console.log(obj.prescribing_number_unit)
3228
+                        console.log(prescription.advices[b].drug.min_unit)
3229
+                        console.log(prescription.advices[b].drug.max_unit)
3140 3230
                         if (obj.prescribing_number_unit == prescription.advices[b].drug.min_unit){
3141 3231
                           obj['retail_price'] =  prescription.advices[b].drug.min_price
3232
+                          console.log("1")
3233
+
3234
+                          console.log(obj.retail_price)
3235
+
3236
+
3142 3237
                         } else if(obj.prescribing_number_unit == prescription.advices[b].drug.max_unit){
3143
-                          obj['retail_price'] =  prescription.advices[b].drug.max_price
3238
+                          obj['retail_price'] =  prescription.advices[b].drug.retail_price
3239
+                          console.log("2")
3240
+
3241
+                          console.log(obj.retail_price)
3242
+
3144 3243
                         } else {
3244
+                          console.log("3")
3145 3245
                           obj['retail_price'] =  prescription.advices[b].drug.min_price
3246
+                          console.log(obj.retail_price)
3247
+
3146 3248
                         }
3147 3249
                         tempAdvice.push(obj)
3148 3250
                       }
@@ -3184,7 +3286,15 @@
3184 3286
                       }
3185 3287
 
3186 3288
 
3187
-                      var preTime = nowTime
3289
+                      // var preTime = nowTime
3290
+                      var preTime = ''
3291
+                      if(this.schedule.schedule_type == 1){
3292
+                        preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
3293
+                      }else if(this.schedule.schedule_type == 2){
3294
+                        preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
3295
+                      }else if(this.schedule.schedule_type == 3){
3296
+                        preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
3297
+                      }
3188 3298
 
3189 3299
 
3190 3300
                       let index = i + 1;
@@ -3208,19 +3318,14 @@
3208 3318
                         obj.med_type = parseInt(prescription.med_type)
3209 3319
                       }
3210 3320
                       if(obj.med_type== 0 || obj.med_type == "") {
3211
-                        if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
3212
-                          obj.med_type = 13
3213 3321
 
3214
-                        } else {
3215 3322
                           obj.med_type = 14
3216 3323
 
3217 3324
                         }
3218
-                      }
3219 3325
                       this.prescriptions.push(obj)
3220 3326
                     }
3221 3327
 
3222 3328
                   }else{
3223
-
3224 3329
                     let obj = {
3225 3330
                       id: 0,
3226 3331
                       name: '处方' + 1,
@@ -3232,12 +3337,10 @@
3232 3337
                       med_type: "",
3233 3338
 
3234 3339
                     };
3235
-                    if(this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138){
3236
-                      obj.med_type = 13
3237
-                    }else{
3340
+
3238 3341
                       obj.med_type = 14
3239 3342
 
3240
-                    }
3343
+
3241 3344
                     this.prescriptions.push(obj)
3242 3345
 
3243 3346
                     // if(response.data.data.count <= 1 ){
@@ -3392,7 +3495,7 @@
3392 3495
               this.case_history = response.data.data.case_history
3393 3496
               this.info = response.data.data.info
3394 3497
               this.last_info = response.data.data.last_info
3395
-
3498
+              this.schedule = response.data.data.schedule
3396 3499
               this.doctors = response.data.data.doctors
3397 3500
               this.department = response.data.data.department
3398 3501
 
@@ -3522,8 +3625,16 @@
3522 3625
 
3523 3626
                   var preTime = "";
3524 3627
 
3628
+
3525 3629
                   if (prescription.pre_time == 0) {
3526
-                    preTime = nowTime
3630
+                    // preTime = nowTime
3631
+                    if(this.schedule.schedule_type == 1){
3632
+                      preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
3633
+                    }else if(this.schedule.schedule_type == 2){
3634
+                      preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
3635
+                    }else if(this.schedule.schedule_type == 3){
3636
+                      preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
3637
+                    }
3527 3638
                   } else {
3528 3639
                     preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
3529 3640
                   }
@@ -3569,12 +3680,28 @@
3569 3680
                         id: prescription.advices[b].drug_id,
3570 3681
                         drug:prescription.advices[b].drug
3571 3682
                       };
3683
+                      console.log("看看数据5:")
3684
+                      console.log(obj.prescribing_number_unit)
3685
+                      console.log(prescription.advices[b].drug.min_unit)
3686
+                      console.log(prescription.advices[b].drug.max_unit)
3572 3687
                       if (obj.prescribing_number_unit == prescription.advices[b].drug.min_unit){
3573 3688
                         obj['retail_price'] =  prescription.advices[b].drug.min_price
3689
+                        console.log("1")
3690
+
3691
+                        console.log(obj.retail_price)
3692
+
3693
+
3574 3694
                       } else if(obj.prescribing_number_unit == prescription.advices[b].drug.max_unit){
3575
-                        obj['retail_price'] =  prescription.advices[b].drug.max_price
3695
+                        obj['retail_price'] =  prescription.advices[b].drug.retail_price
3696
+                        console.log("2")
3697
+
3698
+                        console.log(obj.retail_price)
3699
+
3576 3700
                       } else {
3701
+                        console.log("3")
3577 3702
                         obj['retail_price'] =  prescription.advices[b].drug.min_price
3703
+                        console.log(obj.retail_price)
3704
+
3578 3705
                       }
3579 3706
                       tempAdvice.push(obj)
3580 3707
                     }
@@ -3616,7 +3743,15 @@
3616 3743
                     }
3617 3744
 
3618 3745
 
3619
-                    var preTime = nowTime
3746
+                    // var preTime = nowTime
3747
+                    var preTime = ''
3748
+                    if(this.schedule.schedule_type == 1){
3749
+                      preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "7:00"
3750
+                    }else if(this.schedule.schedule_type == 2){
3751
+                      preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "11:00"
3752
+                    }else if(this.schedule.schedule_type == 3){
3753
+                      preTime = nowYear + '-' + (nowMonth < 10 ? '0' + nowMonth : nowMonth) + '-' + (nowDay < 10 ? '0' + nowDay : nowDay) + " " + "17:00"
3754
+                    }
3620 3755
 
3621 3756
 
3622 3757
                     let index = i + 1;
@@ -3640,13 +3775,8 @@
3640 3775
                       obj.med_type = parseInt(prescription.med_type)
3641 3776
                     }
3642 3777
                     if(obj.med_type== 0 || obj.med_type == "") {
3643
-                      if (this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
3644
-                        obj.med_type = 13
3645
-
3646
-                      } else {
3647 3778
                         obj.med_type = 14
3648 3779
 
3649
-                      }
3650 3780
                     }
3651 3781
                     this.prescriptions.push(obj)
3652 3782
                   }
@@ -3664,12 +3794,9 @@
3664 3794
 
3665 3795
 
3666 3796
                   };
3667
-                  if(this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138){
3668
-                    obj.med_type = 13
3669
-                  }else{
3797
+
3670 3798
                     obj.med_type = 14
3671 3799
 
3672
-                  }
3673 3800
                   this.prescriptions.push(obj)
3674 3801
 
3675 3802
                   // if(response.data.data.count <= 1 ){

+ 1 - 1
src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue Прегледај датотеку

@@ -210,7 +210,7 @@
210 210
           this.$message.error('请选择病人')
211 211
           return
212 212
         }
213
-        this.$router.push('/outpatientDoctorStation/prescriptionTemplatedetail?id=' + 0 + '&patient_id=' + this.patient_id)
213
+        this.$router.push('/outpatientDoctorStation/prescriptionTemplatedetail?id=' + 0 + '&patient_id=' + this.patient_id+ '&patient_name=' + this.patient_name)
214 214
 
215 215
       }
216 216
     },

+ 124 - 117
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue Прегледај датотеку

@@ -3,8 +3,8 @@
3 3
 
4 4
         <div style="height: calc(100% - 0px);display: flex;flex-direction: column;">
5 5
             <div style="display:flex;justify-content: space-between;align-items:center;margin:10px 0;padding:0 10px;color:#606266;">
6
-              <div style="font-size:14px;">姓名:{{ $route.query.patient_name }}</div>
7
-              <el-button size="small" @click="save" type="primary">保存</el-button>
6
+                <div style="font-size:14px;">姓名:{{ $route.query.patient_name }}</div>
7
+                <el-button size="small" @click="save" type="primary">保存</el-button>
8 8
             </div>
9 9
 
10 10
             <div class="mainCenter" style="padding:0 10px;" v-loading="loading">
@@ -38,15 +38,16 @@
38 38
                                     :name="item.name"
39 39
                             >
40 40
 
41
-                                <el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型"  v-if="($store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10138)" @change="changevalue" >
42
-                                    <el-option
43
-                                            v-for="(item,index) in medical_care"
44
-                                            :key="index"
45
-                                            :label="item.label"
46
-                                            :value="item.value">
47
-                                    </el-option>
48
-                                </el-select>
49
-                                <el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型"  v-else @change="changevalue" >
41
+                                <!--<el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型"  v-if="($store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10138)" @change="changevalue" >-->
42
+                                <!--<el-option-->
43
+                                <!--v-for="(item,index) in medical_care"-->
44
+                                <!--:key="index"-->
45
+                                <!--:label="item.label"-->
46
+                                <!--:value="item.value">-->
47
+                                <!--</el-option>-->
48
+                                <!--</el-select>-->
49
+                                <el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型"
50
+                                           @change="changevalue">
50 51
                                     <el-option
51 52
                                             v-for="(item,index) in register"
52 53
                                             :key="index"
@@ -131,74 +132,74 @@
131 132
                             </el-tabs>
132 133
                         </div>
133 134
                         <div style="height:100%;" v-show="showTwo">
134
-                        <div style="height:100%;" v-show="showTwo">
135
-                            <el-tabs class="rightTabs" v-model="activeName">
136
-                                <el-tab-pane label="项目列表" name="1">
137
-                                    <div style="margin-bottom:5px;">
138
-                                        <!--<el-input style="width:50%;" v-model="input" placeholder=""></el-input>-->
139
-                                        <el-input style="width:50%;" @input="searchProjectAction"
140
-                                                  @keyup.enter.native='searchProjectAction'
141
-                                                  v-model.trim="search_project_keyword"
142
-                                                  placeholder="请输入项目名称"></el-input>
143
-                                        <el-select style="float: right;width: 49%;" v-model="value" placeholder=""
144
-                                                   @change="changeClass">
145
-                                            <el-option
146
-                                                    label="全部"
147
-                                                    value="0">
148
-                                            </el-option>
149
-                                            <el-option
150
-                                                    v-for="(item, index) in getDictionaryDataConfig('system','cost_classify')"
151
-                                                    :key="index"
152
-                                                    :label="item.name"
153
-                                                    :value="item.id">
154
-                                            </el-option>
155
-                                        </el-select>
156
-                                    </div>
157
-                                    <div style="width: 100%;flex:1;overflow-y: auto;">
158
-                                        <el-table ref="tables"
159
-                                                  :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
160
-                                                  :data="tabProject" border @select='selectChange'
161
-                                                  :row-style="{ color: '#303133' }"
162
-                                                  @select-all="changeAllGoodInfoTableDataTwo"
163
-                                                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
164
-                                                  highlight-current-row>
165
-                                            <el-table-column type="selection" width="40"
166
-                                                             align="center"></el-table-column>
167
-                                            <el-table-column prop="name" label="名称">
168
-                                                <template slot-scope="scope">{{ scope.row.project_name }}</template>
169
-                                            </el-table-column>
170
-                                            <el-table-column label="规格" width="60">
171
-                                                <template slot-scope="scope">{{ scope.row.single_dose }}</template>
172
-                                            </el-table-column>
173
-                                            <el-table-column label="单价" width="40">
174
-                                                <template slot-scope="scope">{{ scope.row.price }}</template>
175
-                                            </el-table-column>
176
-                                        </el-table>
177
-                                    </div>
178
-                                </el-tab-pane>
179
-                                <el-tab-pane label="项目组套" name="2">
180
-                                    <div style="width: 100%;flex:1;overflow-y: auto;">
181
-                                        <el-table :data="tabPrjectTeam" border ref="tabProjectTeam"
182
-                                                  :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
183
-                                                  :row-style="{ color: '#303133' }"
184
-                                                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
185
-                                                  highlight-current-row
186
-                                                  @select='selectTeam'>
187
-                                            <el-table-column type="selection" width="40"
188
-                                                             align="center"></el-table-column>
189
-                                            <el-table-column prop="name" label="名称">
190
-                                                <template slot-scope="scope">{{scope.row.project_team}}</template>
191
-                                            </el-table-column>
192
-                                        </el-table>
193
-                                    </div>
194
-                                </el-tab-pane>
195
-                            </el-tabs>
196
-                        </div>
135
+                            <div style="height:100%;" v-show="showTwo">
136
+                                <el-tabs class="rightTabs" v-model="activeName">
137
+                                    <el-tab-pane label="项目列表" name="1">
138
+                                        <div style="margin-bottom:5px;">
139
+                                            <!--<el-input style="width:50%;" v-model="input" placeholder=""></el-input>-->
140
+                                            <el-input style="width:50%;" @input="searchProjectAction"
141
+                                                      @keyup.enter.native='searchProjectAction'
142
+                                                      v-model.trim="search_project_keyword"
143
+                                                      placeholder="请输入项目名称"></el-input>
144
+                                            <el-select style="float: right;width: 49%;" v-model="value" placeholder=""
145
+                                                       @change="changeClass">
146
+                                                <el-option
147
+                                                        label="全部"
148
+                                                        value="0">
149
+                                                </el-option>
150
+                                                <el-option
151
+                                                        v-for="(item, index) in getDictionaryDataConfig('system','cost_classify')"
152
+                                                        :key="index"
153
+                                                        :label="item.name"
154
+                                                        :value="item.id">
155
+                                                </el-option>
156
+                                            </el-select>
157
+                                        </div>
158
+                                        <div style="width: 100%;flex:1;overflow-y: auto;">
159
+                                            <el-table ref="tables"
160
+                                                      :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
161
+                                                      :data="tabProject" border @select='selectChange'
162
+                                                      :row-style="{ color: '#303133' }"
163
+                                                      @select-all="changeAllGoodInfoTableDataTwo"
164
+                                                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
165
+                                                      highlight-current-row>
166
+                                                <el-table-column type="selection" width="40"
167
+                                                                 align="center"></el-table-column>
168
+                                                <el-table-column prop="name" label="名称">
169
+                                                    <template slot-scope="scope">{{ scope.row.project_name }}</template>
170
+                                                </el-table-column>
171
+                                                <el-table-column label="规格" width="60">
172
+                                                    <template slot-scope="scope">{{ scope.row.single_dose }}</template>
173
+                                                </el-table-column>
174
+                                                <el-table-column label="单价" width="40">
175
+                                                    <template slot-scope="scope">{{ scope.row.price }}</template>
176
+                                                </el-table-column>
177
+                                            </el-table>
178
+                                        </div>
179
+                                    </el-tab-pane>
180
+                                    <el-tab-pane label="项目组套" name="2">
181
+                                        <div style="width: 100%;flex:1;overflow-y: auto;">
182
+                                            <el-table :data="tabPrjectTeam" border ref="tabProjectTeam"
183
+                                                      :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
184
+                                                      :row-style="{ color: '#303133' }"
185
+                                                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
186
+                                                      highlight-current-row
187
+                                                      @select='selectTeam'>
188
+                                                <el-table-column type="selection" width="40"
189
+                                                                 align="center"></el-table-column>
190
+                                                <el-table-column prop="name" label="名称">
191
+                                                    <template slot-scope="scope">{{scope.row.project_team}}</template>
192
+                                                </el-table-column>
193
+                                            </el-table>
194
+                                        </div>
195
+                                    </el-tab-pane>
196
+                                </el-tabs>
197
+                            </div>
197 198
                         </div>
198 199
                     </el-tabs>
199 200
 
200 201
 
201
-                <template>
202
+                    <template>
202 203
 
203 204
 
204 205
                         <div class="comfirmBox">
@@ -290,7 +291,7 @@
290 291
         crumbs: [
291 292
           { path: false, name: '门诊医生站' },
292 293
           { path: false, name: '处方模版' },
293
-          { path: false, name: '模版详情' },
294
+          { path: false, name: '模版详情' }
294 295
         ],
295 296
         tempForm: {
296 297
           name: '',
@@ -394,6 +395,7 @@
394 395
         }
395 396
 
396 397
         for (let i = 0; i < this.prescriptions.length; i++) {
398
+          console.log(this.prescriptions[i].med_type)
397 399
           if (this.prescriptions[i].med_type == 0 || this.prescriptions[i].med_type == '') {
398 400
             this.$message.error('处方医疗类型不能为空')
399 401
             return
@@ -409,6 +411,9 @@
409 411
         }
410 412
 
411 413
         for (let i = 0; i < this.prescriptions.length; i++) {
414
+
415
+          this.prescriptions[i].med_type = parseInt(this.prescriptions[i].med_type)
416
+
412 417
           if (this.prescriptions[i].advices.length > 0 && this.prescriptions[i].project.length == 0) {
413 418
             this.prescriptions[i]['type'] = 1
414 419
           }
@@ -436,7 +441,7 @@
436 441
         createdTemplate(params, data).then(response => {
437 442
           if (response.data.state == 1) {
438 443
             this.$message.success('保存成功')
439
-          }else{
444
+          } else {
440 445
             this.$message.error(response.data.msg)
441 446
           }
442 447
         })
@@ -545,7 +550,7 @@
545 550
         } else {
546 551
           let arr = []
547 552
           for (let i = 0; i < this.allProject.length; i++) {
548
-            if (this.allProject[i].project_name.indexOf(this.search_project_keyword) != -1 ) {
553
+            if (this.allProject[i].project_name.indexOf(this.search_project_keyword) != -1) {
549 554
               arr = arr.concat(this.allProject[i])
550 555
             }
551 556
           }
@@ -1042,7 +1047,8 @@
1042 1047
           '-' +
1043 1048
           (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
1044 1049
           ':' + (min < 10 ? '0' + min : min)
1045
-        this.prescriptions.push({
1050
+
1051
+        let obj = {
1046 1052
           id: 0,
1047 1053
           name: newTabName,
1048 1054
           order_status: 0,
@@ -1050,9 +1056,19 @@
1050 1056
           project: [],
1051 1057
           addition: [],
1052 1058
           pre_time: this.prescriptions[0].pre_time
1059
+
1053 1060
           // pre_time: nowTime
1054 1061
 
1055
-        })
1062
+        }
1063
+
1064
+
1065
+
1066
+          obj.med_type = 14
1067
+
1068
+
1069
+
1070
+        this.prescriptions.push(obj)
1071
+
1056 1072
         this.editableTabsValue = newTabName
1057 1073
         this.curPrescriptions = this.prescriptions[this.prescriptions.length - 1]
1058 1074
         this.curStatus = 0
@@ -1263,40 +1279,29 @@
1263 1279
         //   this.$refs.multipleTable.clearSelection()
1264 1280
         //   return
1265 1281
         // }
1266
-        if(this.curStatus == 1  && this.rightTab == 2){
1267
-          for(let i = 0; i < this.curDrugs.length; i++){
1268
-            if(this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 10028){
1269
-
1270
-              if(this.curPrescriptions.med_type != 13 && this.curDrugs[i].drug.is_special_diseases == 1){
1271
-                this.$message.error('该处方不属于特病类型处方,无法开特病类型的药')
1272
-                return
1273
-              }
1274
-
1275
-              if(this.curPrescriptions.med_type == 13 && this.curDrugs[i].drug.is_special_diseases != 1){
1282
+        if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
1283
+          if (this.$store.getters.xt_user.org_id == 10138) {
1284
+            for (let i = 0; i < this.curDrugs.length; i++) {
1285
+              if (this.curPrescriptions.med_type == 13 && this.curDrugs[i].is_special_diseases != 1) {
1276 1286
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
1277 1287
                 return
1278 1288
               }
1279 1289
 
1290
+            }
1291
+          }
1292
+        }
1280 1293
 
1281
-            }else{
1282
-
1283
-              if(this.curPrescriptions.med_type != 14 && this.curDrugs[i].drug.is_special_diseases == 1){
1284
-                this.$message.error('该处方不属于特病类型处方,无法开特病类型的药')
1285
-                return
1286
-              }
1287
-
1288
-              if(this.curPrescriptions.med_type == 14 && this.curDrugs[i].drug.is_special_diseases != 1){
1294
+        if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
1295
+          if (this.$store.getters.xt_user.org_id == 10138) {
1296
+            for (let i = 0; i < this.curDrugs.length; i++) {
1297
+              if (this.curPrescriptions.med_type == 13 && this.curDrugs[i].is_special_diseases != 1) {
1289 1298
                 this.$message.error('该处方属于特病类型处方,开非特病类型的药')
1290 1299
                 return
1291 1300
               }
1292 1301
 
1293
-
1294
-
1295 1302
             }
1296
-
1297 1303
           }
1298 1304
         }
1299
-
1300 1305
         if (this.curStatus == 1 && this.rightTab == 2) {
1301 1306
           this.$message.error('改处方是药品,无法添加项目')
1302 1307
           this.teamList = []
@@ -1397,12 +1402,12 @@
1397 1402
                   single_dose: temp[b].single_dose,
1398 1403
                   delivery_way: temp[b].delivery_way,
1399 1404
                   execution_frequency: temp[b].execution_frequency,
1400
-                  retail_price: temp[b].retail_price.toString(),
1405
+                  retail_price: temp[b].prescribing_number_unit == temp[b].max_unit ? temp[b].retail_price.toString() : temp[b].min_price.toString(),
1401 1406
                   remark: '',
1402 1407
                   day: 1,
1403 1408
                   prescribing_number: temp[b].prescribing_number,
1404
-                  single_dose_unit: temp[b].min_unit,
1405
-                  prescribing_number_unit: temp[b].max_unit,
1409
+                  single_dose_unit: temp[b].dose_unit,
1410
+                  prescribing_number_unit: temp[b].prescribing_number_unit,
1406 1411
                   medical_insurance_number: temp[b].medical_insurance_number,
1407 1412
                   drug: temp[b]
1408 1413
                 }
@@ -1510,7 +1515,7 @@
1510 1515
                     prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1511 1516
                     medical_insurance_number: prescription.advices[b].med_list_codg,
1512 1517
                     id: prescription.advices[b].drug_id,
1513
-                    drug: prescription.advices[b].drug,
1518
+                    drug: prescription.advices[b].drug
1514 1519
                   }
1515 1520
                   tempAdvice.push(obj)
1516 1521
                 }
@@ -1556,26 +1561,22 @@
1556 1561
                   advices: tempAdvice,
1557 1562
                   project: tempProject,
1558 1563
                   addition: tempAddition,
1559
-                  order_status: 1,
1564
+                  order_status: 1
1560 1565
                   // pre_time: preTime
1561 1566
                 }
1562 1567
 
1563
-                if(prescription.med_type == "" || prescription.med_type == 0){
1568
+                if (prescription.med_type == '' || prescription.med_type == 0) {
1564 1569
 
1565
-                  obj['med_type'] = ""
1566
-                }else{
1570
+                  obj['med_type'] = ''
1571
+                } else {
1567 1572
 
1568 1573
                   obj['med_type'] = parseInt(prescription.med_type)
1569 1574
 
1570 1575
                 }
1571 1576
 
1572
-
1573 1577
                 this.prescriptions.push(obj)
1574 1578
               }
1575
-              if (this.prescriptions.length > 0) {
1576
-                this.curPrescriptions = this.prescriptions[0]
1577
-                console.log(  this.curPrescriptions)
1578
-              }
1579
+              this.curPrescriptions = this.prescriptions[0]
1579 1580
 
1580 1581
             } else {
1581 1582
               let obj = {
@@ -1585,8 +1586,14 @@
1585 1586
                 project: [],
1586 1587
                 addition: [],
1587 1588
                 order_status: 0,
1588
-                med_type:'',
1589
+                med_type: ''
1589 1590
               }
1591
+
1592
+
1593
+                obj.med_type = 14
1594
+
1595
+
1596
+
1590 1597
               this.prescriptions.push(obj)
1591 1598
               this.curPrescriptions = this.prescriptions[0]
1592 1599
             }
@@ -1673,7 +1680,7 @@
1673 1680
           }
1674 1681
         })
1675 1682
       },
1676
-      changevalue(val){
1683
+      changevalue(val) {
1677 1684
 
1678 1685
         this.$forceUpdate()
1679 1686
 

Разлика између датотеке није приказан због своје велике величине
+ 539 - 597
src/xt_pages/outpatientRegistration/index.vue


+ 226 - 226
src/xt_pages/outpatientRegistration/registrationHistory.vue Прегледај датотеку

@@ -3,232 +3,232 @@
3 3
         <div class="position">
4 4
             <bread-crumb :crumbs='crumbs'></bread-crumb>
5 5
         </div>
6
-        <div v-if="this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138"
7
-             class="app-container">
8
-            <div class="cell clearfix">
9
-                <!-- <el-input style="width: 180px;" v-model.trim="search_input" class="filter-item"/> -->
10
-                <el-autocomplete
11
-                        style="margin:16px 5px"
12
-                        popper-class="my-autocomplete"
13
-                        v-model.trim="search_input"
14
-                        :fetch-suggestions="querySearchAsync"
15
-                        :trigger-on-focus="false"
16
-                        placeholder="病人名字或者透析号"
17
-                        @select="handleSelect"
18
-                >
19
-                    <i class="el-icon-search el-input__icon" slot="suffix"> </i>
20
-                    <template slot-scope="{ item }">
21
-                        <div class="name">{{ item.name }}</div>
22
-                    </template>
23
-                </el-autocomplete>
24
-                <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search"
25
-                           @click="searchAction">搜索
26
-                </el-button>
27
-                <!-- <el-date-picker
28
-                v-model="value1"
29
-                @change="changeTime"
30
-                style="margin-right:10px;"
31
-                type="daterange"
32
-                range-separator="-"
33
-                start-placeholder="开始日期"
34
-                end-placeholder="结束日期">
35
-                </el-date-picker> -->
36
-                <el-date-picker type="datetime" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
37
-                                placeholder="选择时间" v-model="start_time" style="width:200px"
38
-                                @change="changeStart"
39
-                >
40
-                </el-date-picker>
41
-                -
42
-                <el-date-picker type="datetime" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
43
-                                placeholder="选择时间" v-model="end_time" style="width:200px"
44
-                                @change="changeEnd"
45
-                >
46
-                </el-date-picker>
47
-                <label class="title"><span class="name">挂号类型</span> : </label>
48
-                <el-select v-model="register_type" placeholder="请选择" style="width:150px;" @change="changeRegister">
49
-                    <el-option
50
-                            v-for="item in register"
51
-                            :key="item.value"
52
-                            :label="item.label"
53
-                            :value="item.value">
54
-                    </el-option>
55
-                </el-select>
56
-            </div>
57
-            <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
58
-                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
59
-                      highlight-current-row>
60
-                <el-table-column align="center" type="index" label="序号" width="60">
61
-                </el-table-column>
62
-                <el-table-column align="center" prop="name" label="时间" width="100">
63
-                    <template slot-scope="scope">{{getTime(scope.row.ctime,'{y}-{m}-{d} {h}:{i}:{s}')}}</template>
64
-                </el-table-column>
65
-                <el-table-column align="center" prop="dialysis_no" label="姓名" width="80">
66
-                    <template slot-scope="scope">{{scope.row.name }}</template>
67
-                </el-table-column>
68
-                <el-table-column align="center" prop="name" label="科室" width="80">
69
-                    <template slot-scope="scope">{{getDepartMent(scope.row.departments)}}</template>
70
-                </el-table-column>
71
-                <el-table-column align="center" prop="name" label="挂号类型" width="90">
72
-                    <template slot-scope="scope">
73
-                        <span v-if="scope.row.register_type == 1">普通</span>
74
-                        <span v-if="scope.row.register_type == 2">主治</span>
75
-                        <span v-if="scope.row.register_type == 3">主任</span>
76
-                        <span v-if="scope.row.register_type == 4">免收诊金</span>
77
-                        <span v-if="scope.row.register_type == 5">专家</span>
78
-                    </template>
79
-                </el-table-column>
80
-                <el-table-column align="center" prop="name" label="就诊号" width="80">
81
-                    <template slot-scope="scope">
82
-                        {{scope.row.number}}
83
-                    </template>
84
-                </el-table-column>
85
-                <el-table-column align="center" prop="name" label="证件号" width='180'>
86
-                    <template slot-scope="scope">{{ scope.row.id_card_no }}</template>
87
-                </el-table-column>
88
-                <el-table-column align="center" label="社保类型">
89
-                    <template slot-scope="scope">{{getMedicalTreatment(scope.row.social_type)}}</template>
90
-                </el-table-column>
91
-                <el-table-column align="center" prop="name" label="医生" width="80">
92
-                    <template slot-scope="scope">{{getDoctor(scope.row.doctor) }}</template>
93
-                </el-table-column>
94
-                <el-table-column align="center" prop="name" label="挂号费" width="70">
95
-                    <template slot-scope="scope">{{ scope.row.register_cost }}</template>
96
-                </el-table-column>
97
-                <el-table-column align="center" prop="name" label="诊疗费" width="70">
98
-                    <template slot-scope="scope">{{ scope.row.treatment_cost }}</template>
99
-                </el-table-column>
100
-                <el-table-column align="center" prop="name" label="工本费" width="70">
101
-                    <template slot-scope="scope">{{ scope.row.cost_of_production }}</template>
102
-                </el-table-column>
103
-                <el-table-column align="center" prop="name" label="结算类型" width="70">
104
-                    <template slot-scope="scope">{{getBanlance(scope.row.balance_accounts_type) }}</template>
105
-                </el-table-column>
106
-                <el-table-column align="center" prop="name" label="操作人" width="70">
107
-                    <template slot-scope="scope">{{creator}}</template>
108
-                </el-table-column>
109
-                <el-table-column align="center" prop="name" label="操作" width="180">
110
-                    <template slot-scope="scope">
111
-                        <!--<el-button size="mini" type="primary" v-if=" scope.row.record_date < startUnix" :disabled="true">已过号</el-button>-->
112
-                        <el-button size="mini" type="primary" v-if="scope.row.status == 1"
113
-                                   @click="toReturnSZPatient(scope.row)">退号
114
-                        </el-button>
115
-                        <el-button size="mini" type="primary" :disabled="true" v-if="scope.row.status == 0">已退号
116
-                        </el-button>
117
-
118
-                        <!--<el-button size="mini" type="primary" v-if="scope.row.record_date == startUnix && scope.row.is_return == 2" :disabled="true">已退号</el-button>-->
119
-                        <!--<el-button size="mini" type="primary" v-if="scope.row.record_date == startUnix && scope.row.is_return == 3" :disabled="true">已就诊</el-button>-->
120
-                        <!--<el-button size="mini" type="primary" @click="open(scope.row)">详情</el-button>-->
121
-                    </template>
122
-                </el-table-column>
123
-            </el-table>
124
-
125
-            <el-pagination
126
-                    @size-change="handleSizeChange"
127
-                    @current-change="handleCurrentChange"
128
-                    :page-sizes="[10, 50, 100]"
129
-                    :page-size="10"
130
-                    background
131
-                    style="margin-top:20px;float: right"
132
-                    layout="total, sizes, prev, pager, next, jumper"
133
-                    :total="total"
134
-            >
135
-            </el-pagination>
136
-            <el-dialog
137
-                    title="挂号历史详情"
138
-                    :visible.sync="dialogVisible"
139
-                    width="1100px"
140
-                    :before-close="handleClose">
141
-                <div>
142
-                    <div class="formMain">
143
-                        <el-form class="basicForm" :model="form" ref="form" label-width="130px">
144
-                            <el-form-item label="患者姓名:" prop="name">
145
-                                <div>{{ form.name }}</div>
146
-                            </el-form-item>
147
-
148
-                            <el-form-item label="性别:" prop="gender">
149
-                                <div v-if="form.gender == 1">男</div>
150
-                                <div v-if="form.gender == 2">女</div>
151
-                            </el-form-item>
152
-
153
-                            <el-form-item label="年龄:" prop="age">
154
-                                <div>{{ form.age }}</div>
155
-                            </el-form-item>
156
-
157
-
158
-                            <el-form-item label="出生日期:" prop="birthday">
159
-                                <div>{{ getTime(form.birthday,'{y}-{m}-{d}') }}</div>
160
-                            </el-form-item>
161
-
162
-                            <el-form-item label="手机号码:" prop="phone">
163
-                                <div>{{ form.phone }}</div>
164
-                            </el-form-item>
165
-
166
-
167
-                            <el-form-item label="医疗类别:">
168
-                                <div>{{ getDictionaryDataConfig(form.medical_treatment_type) }}</div>
169
-                            </el-form-item>
170
-
171
-
172
-                            <el-form-item label="证件类型:">
173
-                                <div>{{ getCertificates(form.id_type) }}</div>
174
-                            </el-form-item>
175
-
176
-                            <el-form-item label="证件号码:" prop="idCard">
177
-                                {{ form.id_card_no }}
178
-                            </el-form-item>
179
-
180
-
181
-                            <el-form-item label="结算类型:">
182
-                                {{ getSettlement(form.balance_accounts_type) }}
183
-                            </el-form-item>
184
-
185
-
186
-                            <el-form-item label="社保类型:">
187
-                                <div>{{ getMedicalCare(form.social_type) }}</div>
188
-                            </el-form-item>
189
-                            <el-form-item class="specialFormItem" style="width:66.5%;" label="医保卡号:">
190
-                                <div>{{ form.medical_insurance_number }}</div>
191
-                            </el-form-item>
192
-                            <el-form-item label="挂号类型:" prop="register" :validate-event="is_Name">
193
-                                <div>{{ getRegister(form.register_type) }}</div>
194
-                            </el-form-item>
195
-                            <el-form-item label="医生:" prop="doctor" :validate-event="is_Name">
196
-                                <div>{{ getDoctor(form.doctor) }}</div>
197
-                            </el-form-item>
198
-                            <el-form-item label="科室:" prop="department" :validate-event="is_Name">
199
-                                <div>{{ getDepartMent(form.departments) }}</div>
200
-                            </el-form-item>
201
-                            <!-- <el-form-item label="是否需要工本费:">
202
-                              <div v-if="form.is_need_cost_of_production == 1">是</div>
203
-                              <div v-else>否</div>
204
-                            </el-form-item> -->
205
-
206
-                            <el-form-item label="挂号费:">
207
-                                <div>{{ form.register_cost }}</div>
208
-                            </el-form-item>
209
-                            <el-form-item label="诊疗费:">
210
-                                <div>{{ form.treatment_cost }}</div>
211
-                            </el-form-item>
212
-                            <el-form-item label="工本费:">
213
-                                <div>{{ form.cost_of_production }}</div>
214
-                            </el-form-item>
215
-                            <el-form-item label="合计:">
216
-                                <div>{{ form.total }}</div>
217
-                            </el-form-item>
218
-                            <el-form-item>
219
-                                <!-- <el-input v-model="form.name"></el-input> -->
220
-                            </el-form-item>
221
-                        </el-form>
222
-                    </div>
223
-                </div>
224
-                <span slot="footer" class="dialog-footer">
225
-                <el-button @click="dialogVisible = false">取 消</el-button>
226
-                <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
227
-              </span>
228
-            </el-dialog>
229
-        </div>
230
-
231
-        <div v-else class="app-container">
6
+        <!--<div v-if="this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138"-->
7
+             <!--class="app-container">-->
8
+            <!--<div class="cell clearfix">-->
9
+                <!--&lt;!&ndash; <el-input style="width: 180px;" v-model.trim="search_input" class="filter-item"/> &ndash;&gt;-->
10
+                <!--<el-autocomplete-->
11
+                        <!--style="margin:16px 5px"-->
12
+                        <!--popper-class="my-autocomplete"-->
13
+                        <!--v-model.trim="search_input"-->
14
+                        <!--:fetch-suggestions="querySearchAsync"-->
15
+                        <!--:trigger-on-focus="false"-->
16
+                        <!--placeholder="病人名字或者透析号"-->
17
+                        <!--@select="handleSelect"-->
18
+                <!--&gt;-->
19
+                    <!--<i class="el-icon-search el-input__icon" slot="suffix"> </i>-->
20
+                    <!--<template slot-scope="{ item }">-->
21
+                        <!--<div class="name">{{ item.name }}</div>-->
22
+                    <!--</template>-->
23
+                <!--</el-autocomplete>-->
24
+                <!--<el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search"-->
25
+                           <!--@click="searchAction">搜索-->
26
+                <!--</el-button>-->
27
+                <!--&lt;!&ndash; <el-date-picker-->
28
+                <!--v-model="value1"-->
29
+                <!--@change="changeTime"-->
30
+                <!--style="margin-right:10px;"-->
31
+                <!--type="daterange"-->
32
+                <!--range-separator="-"-->
33
+                <!--start-placeholder="开始日期"-->
34
+                <!--end-placeholder="结束日期">-->
35
+                <!--</el-date-picker> &ndash;&gt;-->
36
+                <!--<el-date-picker type="datetime" format="yyyy-MM-dd" value-format="yyyy-MM-dd"-->
37
+                                <!--placeholder="选择时间" v-model="start_time" style="width:200px"-->
38
+                                <!--@change="changeStart"-->
39
+                <!--&gt;-->
40
+                <!--</el-date-picker>-->
41
+                <!-- - -->
42
+                <!--<el-date-picker type="datetime" format="yyyy-MM-dd" value-format="yyyy-MM-dd"-->
43
+                                <!--placeholder="选择时间" v-model="end_time" style="width:200px"-->
44
+                                <!--@change="changeEnd"-->
45
+                <!--&gt;-->
46
+                <!--</el-date-picker>-->
47
+                <!--<label class="title"><span class="name">挂号类型</span> : </label>-->
48
+                <!--<el-select v-model="register_type" placeholder="请选择" style="width:150px;" @change="changeRegister">-->
49
+                    <!--<el-option-->
50
+                            <!--v-for="item in register"-->
51
+                            <!--:key="item.value"-->
52
+                            <!--:label="item.label"-->
53
+                            <!--:value="item.value">-->
54
+                    <!--</el-option>-->
55
+                <!--</el-select>-->
56
+            <!--</div>-->
57
+            <!--<el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"-->
58
+                      <!--:header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"-->
59
+                      <!--highlight-current-row>-->
60
+                <!--<el-table-column align="center" type="index" label="序号" width="60">-->
61
+                <!--</el-table-column>-->
62
+                <!--<el-table-column align="center" prop="name" label="时间" width="100">-->
63
+                    <!--<template slot-scope="scope">{{getTime(scope.row.ctime,'{y}-{m}-{d} {h}:{i}:{s}')}}</template>-->
64
+                <!--</el-table-column>-->
65
+                <!--<el-table-column align="center" prop="dialysis_no" label="姓名" width="80">-->
66
+                    <!--<template slot-scope="scope">{{scope.row.name }}</template>-->
67
+                <!--</el-table-column>-->
68
+                <!--<el-table-column align="center" prop="name" label="科室" width="80">-->
69
+                    <!--<template slot-scope="scope">{{getDepartMent(scope.row.departments)}}</template>-->
70
+                <!--</el-table-column>-->
71
+                <!--<el-table-column align="center" prop="name" label="挂号类型" width="90">-->
72
+                    <!--<template slot-scope="scope">-->
73
+                        <!--<span v-if="scope.row.register_type == 1">普通</span>-->
74
+                        <!--<span v-if="scope.row.register_type == 2">主治</span>-->
75
+                        <!--<span v-if="scope.row.register_type == 3">主任</span>-->
76
+                        <!--<span v-if="scope.row.register_type == 4">免收诊金</span>-->
77
+                        <!--<span v-if="scope.row.register_type == 5">专家</span>-->
78
+                    <!--</template>-->
79
+                <!--</el-table-column>-->
80
+                <!--<el-table-column align="center" prop="name" label="就诊号" width="80">-->
81
+                    <!--<template slot-scope="scope">-->
82
+                        <!--{{scope.row.number}}-->
83
+                    <!--</template>-->
84
+                <!--</el-table-column>-->
85
+                <!--<el-table-column align="center" prop="name" label="证件号" width='180'>-->
86
+                    <!--<template slot-scope="scope">{{ scope.row.id_card_no }}</template>-->
87
+                <!--</el-table-column>-->
88
+                <!--<el-table-column align="center" label="社保类型">-->
89
+                    <!--<template slot-scope="scope">{{getMedicalTreatment(scope.row.social_type)}}</template>-->
90
+                <!--</el-table-column>-->
91
+                <!--<el-table-column align="center" prop="name" label="医生" width="80">-->
92
+                    <!--<template slot-scope="scope">{{getDoctor(scope.row.doctor) }}</template>-->
93
+                <!--</el-table-column>-->
94
+                <!--<el-table-column align="center" prop="name" label="挂号费" width="70">-->
95
+                    <!--<template slot-scope="scope">{{ scope.row.register_cost }}</template>-->
96
+                <!--</el-table-column>-->
97
+                <!--<el-table-column align="center" prop="name" label="诊疗费" width="70">-->
98
+                    <!--<template slot-scope="scope">{{ scope.row.treatment_cost }}</template>-->
99
+                <!--</el-table-column>-->
100
+                <!--<el-table-column align="center" prop="name" label="工本费" width="70">-->
101
+                    <!--<template slot-scope="scope">{{ scope.row.cost_of_production }}</template>-->
102
+                <!--</el-table-column>-->
103
+                <!--<el-table-column align="center" prop="name" label="结算类型" width="70">-->
104
+                    <!--<template slot-scope="scope">{{getBanlance(scope.row.balance_accounts_type) }}</template>-->
105
+                <!--</el-table-column>-->
106
+                <!--<el-table-column align="center" prop="name" label="操作人" width="70">-->
107
+                    <!--<template slot-scope="scope">{{creator}}</template>-->
108
+                <!--</el-table-column>-->
109
+                <!--<el-table-column align="center" prop="name" label="操作" width="180">-->
110
+                    <!--<template slot-scope="scope">-->
111
+                        <!--&lt;!&ndash;<el-button size="mini" type="primary" v-if=" scope.row.record_date < startUnix" :disabled="true">已过号</el-button>&ndash;&gt;-->
112
+                        <!--<el-button size="mini" type="primary" v-if="scope.row.status == 1"-->
113
+                                   <!--@click="toReturnSZPatient(scope.row)">退号-->
114
+                        <!--</el-button>-->
115
+                        <!--<el-button size="mini" type="primary" :disabled="true" v-if="scope.row.status == 0">已退号-->
116
+                        <!--</el-button>-->
117
+
118
+                        <!--&lt;!&ndash;<el-button size="mini" type="primary" v-if="scope.row.record_date == startUnix && scope.row.is_return == 2" :disabled="true">已退号</el-button>&ndash;&gt;-->
119
+                        <!--&lt;!&ndash;<el-button size="mini" type="primary" v-if="scope.row.record_date == startUnix && scope.row.is_return == 3" :disabled="true">已就诊</el-button>&ndash;&gt;-->
120
+                        <!--&lt;!&ndash;<el-button size="mini" type="primary" @click="open(scope.row)">详情</el-button>&ndash;&gt;-->
121
+                    <!--</template>-->
122
+                <!--</el-table-column>-->
123
+            <!--</el-table>-->
124
+
125
+            <!--<el-pagination-->
126
+                    <!--@size-change="handleSizeChange"-->
127
+                    <!--@current-change="handleCurrentChange"-->
128
+                    <!--:page-sizes="[10, 50, 100]"-->
129
+                    <!--:page-size="10"-->
130
+                    <!--background-->
131
+                    <!--style="margin-top:20px;float: right"-->
132
+                    <!--layout="total, sizes, prev, pager, next, jumper"-->
133
+                    <!--:total="total"-->
134
+            <!--&gt;-->
135
+            <!--</el-pagination>-->
136
+            <!--<el-dialog-->
137
+                    <!--title="挂号历史详情"-->
138
+                    <!--:visible.sync="dialogVisible"-->
139
+                    <!--width="1100px"-->
140
+                    <!--:before-close="handleClose">-->
141
+                <!--<div>-->
142
+                    <!--<div class="formMain">-->
143
+                        <!--<el-form class="basicForm" :model="form" ref="form" label-width="130px">-->
144
+                            <!--<el-form-item label="患者姓名:" prop="name">-->
145
+                                <!--<div>{{ form.name }}</div>-->
146
+                            <!--</el-form-item>-->
147
+
148
+                            <!--<el-form-item label="性别:" prop="gender">-->
149
+                                <!--<div v-if="form.gender == 1">男</div>-->
150
+                                <!--<div v-if="form.gender == 2">女</div>-->
151
+                            <!--</el-form-item>-->
152
+
153
+                            <!--<el-form-item label="年龄:" prop="age">-->
154
+                                <!--<div>{{ form.age }}</div>-->
155
+                            <!--</el-form-item>-->
156
+
157
+
158
+                            <!--<el-form-item label="出生日期:" prop="birthday">-->
159
+                                <!--<div>{{ getTime(form.birthday,'{y}-{m}-{d}') }}</div>-->
160
+                            <!--</el-form-item>-->
161
+
162
+                            <!--<el-form-item label="手机号码:" prop="phone">-->
163
+                                <!--<div>{{ form.phone }}</div>-->
164
+                            <!--</el-form-item>-->
165
+
166
+
167
+                            <!--<el-form-item label="医疗类别:">-->
168
+                                <!--<div>{{ getDictionaryDataConfig(form.medical_treatment_type) }}</div>-->
169
+                            <!--</el-form-item>-->
170
+
171
+
172
+                            <!--<el-form-item label="证件类型:">-->
173
+                                <!--<div>{{ getCertificates(form.id_type) }}</div>-->
174
+                            <!--</el-form-item>-->
175
+
176
+                            <!--<el-form-item label="证件号码:" prop="idCard">-->
177
+                                <!--{{ form.id_card_no }}-->
178
+                            <!--</el-form-item>-->
179
+
180
+
181
+                            <!--<el-form-item label="结算类型:">-->
182
+                                <!--{{ getSettlement(form.balance_accounts_type) }}-->
183
+                            <!--</el-form-item>-->
184
+
185
+
186
+                            <!--<el-form-item label="社保类型:">-->
187
+                                <!--<div>{{ getMedicalCare(form.social_type) }}</div>-->
188
+                            <!--</el-form-item>-->
189
+                            <!--<el-form-item class="specialFormItem" style="width:66.5%;" label="医保卡号:">-->
190
+                                <!--<div>{{ form.medical_insurance_number }}</div>-->
191
+                            <!--</el-form-item>-->
192
+                            <!--<el-form-item label="挂号类型:" prop="register" :validate-event="is_Name">-->
193
+                                <!--<div>{{ getRegister(form.register_type) }}</div>-->
194
+                            <!--</el-form-item>-->
195
+                            <!--<el-form-item label="医生:" prop="doctor" :validate-event="is_Name">-->
196
+                                <!--<div>{{ getDoctor(form.doctor) }}</div>-->
197
+                            <!--</el-form-item>-->
198
+                            <!--<el-form-item label="科室:" prop="department" :validate-event="is_Name">-->
199
+                                <!--<div>{{ getDepartMent(form.departments) }}</div>-->
200
+                            <!--</el-form-item>-->
201
+                            <!--&lt;!&ndash; <el-form-item label="是否需要工本费:">-->
202
+                              <!--<div v-if="form.is_need_cost_of_production == 1">是</div>-->
203
+                              <!--<div v-else>否</div>-->
204
+                            <!--</el-form-item> &ndash;&gt;-->
205
+
206
+                            <!--<el-form-item label="挂号费:">-->
207
+                                <!--<div>{{ form.register_cost }}</div>-->
208
+                            <!--</el-form-item>-->
209
+                            <!--<el-form-item label="诊疗费:">-->
210
+                                <!--<div>{{ form.treatment_cost }}</div>-->
211
+                            <!--</el-form-item>-->
212
+                            <!--<el-form-item label="工本费:">-->
213
+                                <!--<div>{{ form.cost_of_production }}</div>-->
214
+                            <!--</el-form-item>-->
215
+                            <!--<el-form-item label="合计:">-->
216
+                                <!--<div>{{ form.total }}</div>-->
217
+                            <!--</el-form-item>-->
218
+                            <!--<el-form-item>-->
219
+                                <!--&lt;!&ndash; <el-input v-model="form.name"></el-input> &ndash;&gt;-->
220
+                            <!--</el-form-item>-->
221
+                        <!--</el-form>-->
222
+                    <!--</div>-->
223
+                <!--</div>-->
224
+                <!--<span slot="footer" class="dialog-footer">-->
225
+                <!--<el-button @click="dialogVisible = false">取 消</el-button>-->
226
+                <!--<el-button type="primary" @click="dialogVisible = false">确 定</el-button>-->
227
+              <!--</span>-->
228
+            <!--</el-dialog>-->
229
+        <!--</div>-->
230
+
231
+        <div ]class="app-container">
232 232
             <div class="cell clearfix">
233 233
                 <!-- <el-input style="width: 180px;" v-model.trim="search_input" class="filter-item"/> -->
234 234
                 <el-autocomplete

+ 1 - 1
src/xt_pages/stock/cancelStockOrderAdd.vue Прегледај датотеку

@@ -580,7 +580,7 @@ export default {
580 580
             } else {
581 581
              var msg =  response.data.data.msg
582 582
              if (msg == 1){
583
-                this.$message.error("该耗材无出库记录")
583
+                this.$message.error("无出库记录")
584 584
                 return
585 585
              }
586 586
              if(msg == 2){

+ 13 - 10
src/xt_pages/stock/detail/print.vue Прегледај датотеку

@@ -42,10 +42,12 @@
42 42
                 {{index+1}}
43 43
               </td>
44 44
               <td style="line-height: 50px">
45
-                <span>{{item.GoodInfo.good_name}}</span>
45
+                <!-- <span>{{item.GoodInfo.good_name}}</span> -->
46
+                {{item.good_name}}
46 47
               </td>
47 48
               <td style="line-height: 50px">
48
-                <span>{{item.GoodInfo.specification_name}}</span>
49
+                <!-- <span>{{item.GoodInfo.specification_name}}</span> -->
50
+                {{item.specification_name}}
49 51
               </td>
50 52
              
51 53
               <td style="line-height: 50px">
@@ -54,16 +56,17 @@
54 56
                 <span v-if="type == 4"> {{ item.count }}</span>
55 57
               </td>
56 58
               <td style="line-height: 50px">
57
-                <span>{{item.GoodInfo.packing_unit}}</span>
59
+                <!-- <span>{{item.GoodInfo.packing_unit}}</span> -->
60
+                {{item.packing_unit}}
58 61
               </td>
59 62
               <td style="line-height:50px">
60 63
                 <span v-if="type == 1"> {{ item.price }}</span>
61
-                <span v-if="type == 2"> {{ item.price }}</span>
64
+                <span v-if="type == 2"> {{ item.packing_price }}</span>
62 65
                  <span v-if="type == 4"> {{ item.price }}</span>
63 66
               </td>
64 67
               <td style="line-height:50px">
65 68
                 <span v-if="type == 1">{{(item.warehousing_count * item.price).toFixed(2)}}</span>
66
-                <span v-if="type == 2">{{(item.count * item.price).toFixed(2)}}</span>
69
+                <span v-if="type == 2">{{(item.count * item.packing_price).toFixed(2)}}</span>
67 70
                 <span v-if="type == 4">{{(item.count * item.price).toFixed(2)}}</span>
68 71
               </td>
69 72
               <td style="line-height: 50px">
@@ -420,7 +423,8 @@
420 423
       getGoodDetailPrintList(this.queryParams).then(response=>{
421 424
          if(response.data.state == 1){
422 425
            var list = response.data.data.list
423
-           console.log("list",list)
426
+           console.log("新的",list)
427
+           this.stockDatas = list
424 428
            
425 429
          }
426 430
       })
@@ -431,7 +435,6 @@
431 435
         if(response.data.state == 1){
432 436
           var total =   response.data.data.total
433 437
           var list = response.data.data.list
434
-          console.log("list2323223",list)
435 438
           this.stockDatas = list
436 439
         }
437 440
       })
@@ -446,7 +449,7 @@
446 449
      getWareOutTotal(){
447 450
        var total = 0
448 451
        for(let i=0;i<this.stockDatas.length;i++){
449
-         total+= this.stockDatas[i].count * this.stockDatas[i].price
452
+         total+= this.stockDatas[i].count * this.stockDatas[i].packing_price
450 453
        }
451 454
        return total
452 455
      }
@@ -457,8 +460,8 @@
457 460
       this.goodUnit = this.$store.getters.good_unit
458 461
 
459 462
       // this.getDialysisRecord()
460
-      // this.getGoodDetailPrintList()
461
-      this.getStockDetail()
463
+      this.getGoodDetailPrintList()
464
+      // this.getStockDetail()
462 465
     }
463 466
 
464 467
   }

+ 21 - 67
src/xt_pages/stock/detail/stockInDetail.vue Прегледај датотеку

@@ -202,7 +202,7 @@ import {
202 202
   GetAllConfig,
203 203
   getStockDetail,
204 204
   getPrintStockGood,
205
-  
205
+  getGoodDetailPrintList
206 206
 } from "@/api/stock";
207 207
 
208 208
 export default {
@@ -237,6 +237,7 @@ export default {
237 237
     // this.getPrintStockGood()
238 238
     this.org_id = this.$store.getters.xt_user.template_info.org_id
239 239
     console.log("机构ID",this.org_id)
240
+    this.getGoodDetailPrintList()
240 241
   },
241 242
   data() {
242 243
     return {
@@ -742,82 +743,21 @@ export default {
742 743
         const res = new Map();
743 744
         return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
744 745
       },
745
-      
746
-      // exportList(){
747
-      //   var obj = {index:"合计",total:0}
748
-      //   obj.total = this.calTotalPrice()
749
-     
750
-      //   for(let i=0;i<this.tableList.length;i++){
751
-      //     this.tableList[i].index = i+1
752
-      //     this.tableList[i].min_unit = this.getUnit(this.tableList[i].good_unit)
753
-      //     this.tableList[i].count = this.calCount(this.tableList[i])
754
-      //     this.tableList[i].total = this.calTotal(this.tableList[i])
755
-      //     this.tableList[i].price = this.tableList[i].query_warehousing_info[0].price
756
-      //     this.tableList[i].remark = this.tableList[i].query_warehousing_info[0].remark
757
-      //     this.tableList[i].packing_unit = this.tableList[i].packing_unit
758
-      //   }
759
-      //   console.log("总共条数555",this.tableList)
760
-         
761
-      //   if(this.org_id == 10024){
762
-      //     var arr = this.uniqueOne(this.tableList)
763
-      //     this.tableList = arr
764
-      //     this.tableList.push(obj)
765
-      //     console.log("去重后条数",this.tableList)
766
-        
767
-      //     import('@/vendor/Export2Excel').then(excel => {
768
-      //     const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
769
-      //     const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','price','total','remark']
770
-          
771
-      //     const data = this.formatJson(filterVal, this.tableList)
772
-
773
-      //     console.log("data222222222",data)
774
-      //       excel.export_json_to_excel({
775
-      //         header: tHeader,
776
-      //         data,
777
-      //         filename: '耗材入库明细'
778
-      //       })
779
-      //         this.downloadLoading = false
780
-      //       })
781
-      //   }
782
-      //   if(this.org_id !=10024){
783
-      //      var arr = this.unique(this.tableList)
784
-      //       this.tableList = arr
785
-      //       this.tableList.push(obj)
786
-      //       console.log("去重后条数",this.tableList)
787
-          
788
-      //       import('@/vendor/Export2Excel').then(excel => {
789
-      //       const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
790
-      //       const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','price','total','remark']
791
-            
792
-      //       const data = this.formatJson(filterVal, this.tableList)
793
-      //       console.log("data222222222",data)
794
-      //         excel.export_json_to_excel({
795
-      //           header: tHeader,
796
-      //           data,
797
-      //           filename: '耗材入库明细'
798
-      //         })
799
-      //           this.downloadLoading = false
800
-      //         })
801
-      //   }
802
-     
803
-      //   },
746
+    
804 747
       exportList(){
805
-        // var obj = {index:"合计",total:0}
806
-        // obj.total = this.calTotalPrice()
748
+  
807 749
         console.log("hhhh",this.tableList)
808 750
        
809 751
         for(let i=0;i<this.tableList.length;i++){
810
-          this.tableList[i].good_name = this.tableList[i].GoodInfo.good_name
811
-          this.tableList[i].specification_name = this.tableList[i].GoodInfo.specification_name
812
-          this.tableList[i].packing_unit = this.tableList[i].GoodInfo.packing_unit
813 752
           this.tableList[i].index = i+1  
814
-          this.tableList[i].total_price = (this.tableList[i].warehousing_count * this.tableList[i].price).toFixed(2) 
753
+          this.tableList[i].total_price = (this.tableList[i].warehousing_count * this.tableList[i].packing_price).toFixed(2) 
815 754
         }
816 755
         console.log("总共条数555",this.tableList)   
817 756
         import('@/vendor/Export2Excel').then(excel => {
818 757
         const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','进货价','总价','备注']
819 758
         const filterVal = ['index','good_name', 'specification_name', 'packing_unit','warehousing_count','price','total_price','remark']
820
-        
759
+        console.log("hhhhhhhh",this.tableList)
760
+       
821 761
         const data = this.formatJson(filterVal, this.tableList)
822 762
         console.log("data222222222",data)
823 763
           excel.export_json_to_excel({
@@ -840,6 +780,20 @@ export default {
840 780
        }
841 781
       return name
842 782
      },
783
+     getGoodDetailPrintList(){
784
+        const params = {
785
+          start_time:this.start_time,
786
+          end_time:this.end_time,
787
+          type:1,
788
+        }
789
+      getGoodDetailPrintList(params).then(response=>{
790
+        if(response.data.state == 1){
791
+          var list = response.data.data.list
792
+          console.log("入库详情单",list)
793
+          this.tableList = list
794
+        }
795
+      })
796
+     }
843 797
   }
844 798
 };
845 799
 </script>

+ 24 - 49
src/xt_pages/stock/detail/stockOutDetail.vue Прегледај датотеку

@@ -196,7 +196,7 @@
196 196
 <script>
197 197
 import { uParseTime } from "@/utils/tools";
198 198
 import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
199
-import { deleteCancelStock, GetAllConfig, getStockDetail,getPrintStockGood,getGoodInfoList } from "@/api/stock";
199
+import { deleteCancelStock, GetAllConfig, getStockDetail,getPrintStockGood,getGoodInfoList,getGoodDetailPrintList } from "@/api/stock";
200 200
 
201 201
 export default {
202 202
   name: "stockOutDetail",
@@ -227,10 +227,12 @@ export default {
227 227
     this.fetchAllAdminUsers();
228 228
     this.goodUnit = this.$store.getters.good_unit
229 229
     // this.getPrintStockGood()
230
-    this.getList()
230
+    // this.getList()
231 231
     var org_id = this.$store.getters.xt_user.org.id
232 232
     this.orgId = org_id
233 233
     console.log("机构信息",org_id)
234
+    this.getGoodDetailPrintList()
235
+    
234 236
   },
235 237
   data() {
236 238
     return {
@@ -240,7 +242,7 @@ export default {
240 242
       ],
241 243
       manufacturer_id: "",
242 244
       dealer_id: "",
243
-      order_type: "",
245
+      order_type:"",
244 246
 
245 247
       searchKey: "",
246 248
       type: 2,
@@ -752,57 +754,17 @@ export default {
752 754
         })
753 755
       },
754 756
 
755
-    //  exportList(){
756
-      
757
-    //   for(let i=0;i<this.tableList.length;i++){
758
-    //      for(let j=0;j<this.goodInfoData.length;j++){
759
-    //         if(this.tableList[i].id === this.goodInfoData[j].id){
760
-    //            this.tableList[i].buy_price = this.goodInfoData[j].buy_price
761
-    //         }
762
-    //      }
763
-    //   }
764
-    //   console.log('合并后',this.tableList)
765
-      
766
-    //   var obj = {index:"合计",total:0}
767
-    //    obj.total = this.getTotalPrice()
768
-    //    for(let i=0;i<this.tableList.length;i++){
769
-    //     this.tableList[i].index = i+1
770
-    //     this.tableList[i].min_unit = this.getUnit(this.tableList[i].good_unit)
771
-    //     this.tableList[i].count = this.getStockCount(this.tableList[i].id)
772
-    //     this.tableList[i].total = (this.getStockCount(this.tableList[i].id) * this.tableList[i].buy_price).toFixed(2)
773
-    //     this.tableList[i].remark = this.tableList[i].query_warehouseout_info[0].remark
774
-    //     this.tableList[i].packing_unit = this.tableList[i].packing_unit
775
-    //    }
776
-    //    var arr = this.unique(this.tableList)
777
-     
778
-    //    this.tableList = arr
779
-    //    this.tableList.push(obj)
780
-    //    import('@/vendor/Export2Excel').then(excel => {
781
-    //    const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
782
-    //    const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','buy_price','total','remark']
783
-
784
-    //    const data = this.formatJson(filterVal, this.tableList)
785
-    //    console.log("data",data)
786
-       
787
-    //     excel.export_json_to_excel({
788
-    //        header: tHeader,
789
-    //        data,
790
-    //        filename: '耗材出库明细'
791
-    //      })
792
-    //       this.downloadLoading = false
793
-    //     })
794
-    //    },
795 757
     exportList(){
796 758
        for(let i=0;i<this.tableData.length;i++){
797 759
         this.tableData[i].index = i+1
798
-        this.tableData[i].good_name = this.tableData[i].GoodInfo.good_name
799
-        this.tableData[i].specification_name = this.tableData[i].GoodInfo.specification_name
800
-        this.tableData[i].packing_unit = this.tableData[i].GoodInfo.packing_unit
801
-        this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price).toFixed(2)
760
+        this.tableData[i].good_name = this.tableData[i].good_name
761
+        this.tableData[i].specification_name = this.tableData[i].specification_name
762
+        this.tableData[i].packing_unit = this.tableData[i].packing_unit
763
+        this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].packing_price).toFixed(2)
802 764
        }
803 765
        import('@/vendor/Export2Excel').then(excel => {
804 766
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
805
-       const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','price','total_price','remark']
767
+       const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','packing_price','total_price','remark']
806 768
 
807 769
        const data = this.formatJson(filterVal, this.tableData)
808 770
        console.log("data",data)
@@ -835,7 +797,20 @@ export default {
835 797
        return total_price
836 798
      },
837 799
    
838
-     
800
+     getGoodDetailPrintList(){
801
+        const params = {
802
+          start_time:this.start_time,
803
+          end_time:this.end_time,
804
+          type:2,
805
+        }
806
+      getGoodDetailPrintList(params).then(response=>{
807
+        if(response.data.state == 1){
808
+          var list = response.data.data.list
809
+          console.log("出库单详单",list)
810
+          this.tableData = list
811
+        }
812
+      })
813
+     } 
839 814
   }
840 815
 };
841 816
 </script>

+ 1 - 1
src/xt_pages/stock/drugs/components/drugCancelDetail.vue Прегледај датотеку

@@ -359,7 +359,7 @@ export default {
359 359
       getDrugCancelDetail(params).then(response=>{
360 360
          if(response.data.state == 1){
361 361
            var order =  response.data.data.order
362
-           console.log("退库详细222222222222222222",order)
362
+          //  console.log("退库详细222222222222222222",order)
363 363
            this.tableData = order
364 364
            this.tableList = order
365 365
            var total = response.data.data.total

+ 34 - 12
src/xt_pages/stock/drugs/components/drugInOrder.vue Прегледај датотеку

@@ -199,7 +199,7 @@
199 199
 import { uParseTime } from "@/utils/tools";
200 200
 import { fetchAllAdminUsers } from "@/api/doctor";
201 201
 import { GetAllConfig } from "@/api/stock";
202
-import { getDrugIndetail} from "@/api/drug/drug_stock"
202
+import { getDrugIndetail,getDrugWarehouseInfoPrint} from "@/api/drug/drug_stock"
203 203
 export default {
204 204
   name: "stockInDetail",
205 205
 
@@ -228,6 +228,8 @@ export default {
228 228
     this.fetchAllAdminUsers()
229 229
     //获取入库单数据
230 230
     this.getlist()
231
+    this.getDrugWarehouseInfoPrint() 
232
+
231 233
   },
232 234
   data() {
233 235
     return {
@@ -243,7 +245,7 @@ export default {
243 245
       limit: 10,
244 246
       manufacturer_id: "",
245 247
       dealer_id: "",
246
-      order_type: "",
248
+      order_type: 1,
247 249
       checked: false,
248 250
       total: 0,
249 251
       pageTotal: 0,
@@ -260,10 +262,12 @@ export default {
260 262
       selectedTableData: [],
261 263
       dealer: [],
262 264
       tableList:[],
265
+      tabelePrintList:[],
263 266
     };
264 267
   },
265 268
   methods: {
266 269
     changeType: function(val) {
270
+     
267 271
       this.order_type = val;
268 272
      
269 273
     },
@@ -416,7 +420,23 @@ export default {
416 420
         }
417 421
       })
418 422
     },
423
+    getDrugWarehouseInfoPrint(){
424
+      var params = {
425
+        start_time:this.start_time,
426
+        end_time:this.end_time,
427
+        order_type:this.order_type,
428
+      }
429
+      console.log("params2222",params)
430
+     getDrugWarehouseInfoPrint(params).then(response=>{
431
+          if(response.data.state == 1){
432
+            var list = response.data.data.list
433
+            console.log("入库单详情",list)
434
+            this.tabelePrintList = list
435
+          }   
436
+      })
437
+    },
419 438
     PrintAction(){
439
+      console.log("打印",this.order_type)
420 440
       this.$router.push("/stock/drugprint?start_time="+this.start_time+"&end_time="+this.end_time+"&order_type="+this.order_type+"&manufacturer_id="+this.manufacturer_id+"&keyword="+this.keyword+"&limit="+this.limit+"&page="+this.page)
421 441
     },
422 442
     select(){
@@ -432,25 +452,27 @@ export default {
432 452
       return name
433 453
     },
434 454
      exportList(){
435
-        for(let i=0;i<this.tableList.length;i++){
436
-          this.tableList[i].index = i+1
437
-          this.tableList[i].unit = this.tableList[i].dose + this.tableList[i].dose_unit + "*" + this.tableList[i].min_number +this.tableList[i].min_unit +"/"+this.tableList[i].max_unit
455
+        for(let i=0;i<this.tabelePrintList.length;i++){
456
+          this.tabelePrintList[i].index = i+1
457
+          this.tabelePrintList[i].drug_name = this.tabelePrintList[i].XtBaseDrug.drug_name
458
+
459
+          this.tabelePrintList[i].unit = this.tabelePrintList[i].XtBaseDrug.dose + this.tabelePrintList[i].XtBaseDrug.dose_unit + "*" + this.tabelePrintList[i].XtBaseDrug.min_number +this.tabelePrintList[i].XtBaseDrug.min_unit +"/"+this.tabelePrintList[i].XtBaseDrug.max_unit
438 460
         }
439 461
         
440 462
        import('@/vendor/Export2Excel').then(excel => {
441 463
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
442 464
        const filterVal = ['index','drug_name', 'unit', 'min_unit','warehousing_count','price','total_price','remark']
443
-       console.log("表格22222222",this.tableList)
465
+       console.log("表格22222222",this.tabelePrintList)
444 466
        let obj = {'index':'合计','total_price':0}
445
-       for(let i=0;i<this.tableList.length;i++){
446
-         obj.total_price += this.tableList[i].price * this.tableList[i].warehousing_count
467
+       for(let i=0;i<this.tabelePrintList.length;i++){
468
+         obj.total_price += this.tabelePrintList[i].price * this.tabelePrintList[i].warehousing_count
447 469
        }
448
-       for(let j=0;j<this.tableList.length;j++){
449
-         this.tableList[j].total_price = this.tableList[j].total_price.toFixed(2)
470
+       for(let j=0;j<this.tabelePrintList.length;j++){
471
+         this.tabelePrintList[j].total_price = this.tabelePrintList[j].total_price.toFixed(2)
450 472
        }
451 473
        obj.total_price = obj.total_price.toFixed(2)
452
-       this.tableList.push(obj)
453
-       const data = this.formatJson(filterVal, this.tableList)
474
+       this.tabelePrintList.push(obj)
475
+       const data = this.formatJson(filterVal, this.tabelePrintList)
454 476
        console.log("data",data)
455 477
        
456 478
         excel.export_json_to_excel({

+ 121 - 27
src/xt_pages/stock/drugs/components/drugOutDetail.vue Прегледај датотеку

@@ -197,7 +197,7 @@
197 197
 import { uParseTime } from "@/utils/tools";
198 198
 import { fetchAllAdminUsers } from "@/api/doctor";
199 199
 import {GetAllConfig } from "@/api/stock";
200
-import {getDrugOutDetail } from "@/api/drug/drug_stock"
200
+import {getDrugOutDetail,getDrugOutOrderPrint } from "@/api/drug/drug_stock"
201 201
  import {getBaseDrugLibList} from '@/api/data'
202 202
 export default {
203 203
   name: "stockOutDetail",
@@ -223,10 +223,12 @@ export default {
223 223
       (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
224 224
       "-" +
225 225
       (nowDay < 10 ? "0" + nowDay : nowDay);
226
+    this.getDrugOutOrderPrint()
226 227
     this.GetConfigInfo();
227 228
     this.fetchAllAdminUsers();
228 229
     this.getlist()
229 230
     this.getBaseDrugLibList()
231
+ 
230 232
   },
231 233
   data() {
232 234
     return {
@@ -236,7 +238,7 @@ export default {
236 238
       ],
237 239
       manufacturer_id: "",
238 240
       dealer_id: "",
239
-      order_type: "",
241
+      order_type:"",
240 242
 
241 243
       searchKey: "",
242 244
       type: 2,
@@ -259,7 +261,8 @@ export default {
259 261
       dealer: [],
260 262
       tableData:[],
261 263
       tableList:[],
262
-      drugList:[]
264
+      drugList:[],
265
+      tablePrint:[]
263 266
     };
264 267
   },
265 268
   methods: {
@@ -375,7 +378,7 @@ export default {
375 378
       }
376 379
     },
377 380
     PrintAction: function() {
378
-       this.$router.push("/stock/drugoutorderprint?start_time="+this.start_time+"&end_time="+this.end_time+"&order_type="+this.order_type+"&manufacturer_id="+this.manufacturer_id+"&keyword="+this.keyword+"&limit="+this.limit+"&page="+this.page)
381
+       this.$router.push("/stock/drugoutorderprint?start_time="+this.start_time+"&end_time="+this.end_time+"&order_type="+2+"&manufacturer_id="+this.manufacturer_id+"&keyword="+this.keyword+"&limit="+this.limit+"&page="+this.page)
379 382
     },
380 383
     getlist(){
381 384
       var params = {
@@ -458,34 +461,37 @@ export default {
458 461
 
459 462
      exportList(){
460 463
 
461
-        for(let i=0;i<this.tableList.length;i++){
462
-          for(let j=0;j<this.drugList.length;j++){
463
-             if(this.tableList[i].drug_id == this.drugList[j].id){
464
-               this.tableList[i].last_price = this.drugList[j].last_price
464
+        for(let i=0;i<this.tablePrint.length;i++){
465
+          // for(let j=0;j<this.drugList.length;j++){
466
+          //    if(this.tableList[i].drug_id == this.drugList[j].id){
467
+          //      this.tableList[i].last_price = this.drugList[j].last_price
465 468
                
466
-             }
467
-          }
468
-          this.tableList[i].index = i+1
469
+          //    }
470
+          // }
471
+          this.tablePrint[i].index = i+1
472
+          
469 473
         }
470
-        for(let i=0;i<this.tableList.length;i++){
471
-           this.tableList[i].total_price = this.tableList[i].last_price * this.tableList[i].count
472
-           this.tableList[i].unit = this.tableList[i].dose + this.tableList[i].dose_unit + "*" + this.tableList[i].min_number +this.tableList[i].min_unit +"/"+this.tableList[i].max_unit
474
+        for(let i=0;i<this.tablePrint.length;i++){
475
+           this.tablePrint[i].count = this.getCount(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_unit,this.tablePrint[i].min_number)
476
+          //  this.tablePrint[i].total_price = this.tablePrint[i].last_price * this.tablePrint[i].count
477
+           this.tablePrint[i].total_price = this.getTotalPrice(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].min_price)
478
+           this.tablePrint[i].unit = this.tablePrint[i].dose + this.tablePrint[i].dose_unit + "*" + this.tablePrint[i].min_number +this.tablePrint[i].min_unit +"/"+this.tablePrint[i].max_unit
473 479
         }
474
-       console.log("列表数据333333333",this.tableList)
475
-      
480
+       console.log("列表数据333333333",this.tablePrint)
481
+     
476 482
        import('@/vendor/Export2Excel').then(excel => {
477 483
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
478
-       const filterVal = ['index','drug_name', 'unit', 'min_unit','count','last_price','total_price','remark']
479
-       let obj = {'index':'合计','total_price':0}
480
-       for(let i=0;i<this.tableList.length;i++){
481
-         obj.total_price += (this.tableList[i].last_price * this.tableList[i].count)
482
-       }
483
-       for(let j=0;j<this.tableList.length;j++){
484
-          this.tableList[j].total_price = this.tableList[j].total_price.toFixed(2)
485
-       }
486
-       obj.total_price = obj.total_price.toFixed(2)
487
-       this.tableList.push(obj)
488
-       const data = this.formatJson(filterVal, this.tableList)
484
+       const filterVal = ['index','drug_name', 'unit', 'min_unit','count','min_price','total_price','remark']
485
+      //  let obj = {'index':'合计','total_price':0}
486
+      //  for(let i=0;i<this.tablePrint.length;i++){
487
+      //    obj.total_price += (this.tablePrint[i].min_price * this.tablePrint[i].count)
488
+      //  }
489
+      //  for(let j=0;j<this.tablePrint.length;j++){
490
+      //     this.tablePrint[j].total_price = this.tablePrint[j].total_price.toFixed(2)
491
+      //  }
492
+      //  obj.total_price = obj.total_price.toFixed(2)
493
+      //  this.tablePrint.push(obj)
494
+       const data = this.formatJson(filterVal, this.tablePrint)
489 495
        console.log("data",data)
490 496
        
491 497
        excel.export_json_to_excel({
@@ -524,6 +530,94 @@ export default {
524 530
           }
525 531
         })
526 532
       },
533
+    getDrugOutOrderPrint(){
534
+       var params = {
535
+         start_time:this.start_time,
536
+         end_time:this.end_time,
537
+         order_type:2,
538
+      }  
539
+      console.log("poara232323223233223",params)
540
+     getDrugOutOrderPrint(params).then(response=>{
541
+        if(response.data.state == 1){
542
+            var list = response.data.data.list
543
+            console.log("药品出库详情",list)
544
+            let objInfo = {}
545
+            list.forEach((item,index)=>{
546
+              let { drug_id } = item
547
+              if(!objInfo[drug_id]){
548
+                objInfo[drug_id] = {
549
+                  drug_id,
550
+                  child:[],
551
+                  drug_name:item.XtBaseDrug.drug_name,
552
+                  drug_spec:item.XtBaseDrug.drug_spec,
553
+                  min_unit:item.XtBaseDrug.min_unit,
554
+                  count:0,
555
+                  price:item.XtBaseDrug.retail_price,
556
+                  remark:item.XtBaseDrug.remark,
557
+                  total_price:"",
558
+                  dose:item.XtBaseDrug.dose,
559
+                  dose_unit:item.XtBaseDrug.dose_unit,
560
+                  min_number:item.XtBaseDrug.min_number,
561
+                  max_unit:item.XtBaseDrug.max_unit,
562
+                  min_price:item.XtBaseDrug.min_price,
563
+                }
564
+              }
565
+            })
566
+            let newArr = Object.values(objInfo);
567
+            for(let i=0;i<newArr.length;i++){
568
+              for(let j=0;j<list.length;j++){
569
+                if(newArr[i].drug_id == list[j].drug_id){
570
+                   newArr[i].child.push(list[j])
571
+                }
572
+              }
573
+            }
574
+           this.tablePrint = newArr
575
+           console.log(" this.tablePrint",this.tablePrint)  
576
+        }
577
+     })
578
+    },
579
+   getCount(arr,max_unit,min_unit,min_number){
580
+        var total = 0
581
+        var str = ""
582
+        var min_str = ""
583
+        for(let i=0;i<arr.length;i++){
584
+          if(arr[i].count_unit == max_unit){
585
+            arr[i].count = arr[i].count * arr[i].min_number
586
+          }
587
+        }
588
+        for(let i=0;i<arr.length;i++){
589
+          total+= arr[i].count
590
+        }
591
+
592
+       if(total<min_number){
593
+           str = ""
594
+           min_str = total + min_unit
595
+        }
596
+        if(total >= min_number){
597
+          if(parseInt(total/min_number)!=0){
598
+            str = parseInt(total/min_number)+ max_unit
599
+          }
600
+          if((total%min_number)!=0){
601
+            min_str =  total%min_number + min_unit
602
+          }
603
+        }
604
+        return str + min_str
605
+      },
606
+      getTotalPrice(arr,max_unit,min_number,min_price){
607
+        var total = 0
608
+        for(let i=0;i<arr.length;i++){
609
+          if(arr[i].count_unit == max_unit){
610
+            arr[i].count = arr[i].count * min_number
611
+          }else{
612
+            arr[i].count = arr[i].count
613
+          }
614
+        }  
615
+        for(let j=0;j<arr.length;j++){
616
+          total +=arr[j].count
617
+        }
618
+        console.log("total23232",total)
619
+        return (total*min_price).toFixed(2)
620
+      }
527 621
   }
528 622
 };
529 623
 </script>

+ 101 - 8
src/xt_pages/stock/drugs/drugOutOrderPrint.vue Прегледај датотеку

@@ -41,14 +41,17 @@
41 41
               </td>
42 42
             
43 43
               <td style="line-height: 50px">
44
-                  {{item.count}}
44
+                  <!-- {{item.count}} -->
45
+                  {{getCount(item.child,item.max_unit,item.min_unit,item.min_number)}}
45 46
               </td>
46 47
               <td style="line-height:50px">
47
-                  <!-- {{item.price}} -->
48
-                  {{getPrice(item.drug_id)}}
48
+                  {{item.price}}
49
+                  <!-- {{getPrice(item.drug_id)}} -->
49 50
               </td>
50 51
               <td style="line-height:50px">
51
-                  {{(item.count * getPrice(item.drug_id)).toFixed(2)}}
52
+                  <!-- {{(item.count * getPrice(item.drug_id)).toFixed(2)}} -->
53
+                  <!-- {{item.count*item.price}} -->
54
+                <span ></span>   {{getTotalPrice(item.child,item.max_unit,item.min_number,item.min_price)}}
52 55
               </td>
53 56
               <td style="line-height: 50px">
54 57
                  {{item.remark}}
@@ -90,7 +93,7 @@
90 93
   import { jsGetAge, uParseTime } from '@/utils/tools'
91 94
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
92 95
   import print from 'print-js'
93
-  import { getDrugOutDetail} from "@/api/drug/drug_stock"
96
+  import { getDrugOutDetail,getDrugOutOrderPrint} from "@/api/drug/drug_stock"
94 97
   export default {
95 98
     name: 'dialysisPrintOrder',
96 99
     components: {
@@ -190,7 +193,8 @@
190 193
                  dose:item.dose,
191 194
                  dose_unit:item.dose_unit,
192 195
                  min_number:item.min_number,
193
-                 max_unit:item.max_unit
196
+                 max_unit:item.max_unit,
197
+                
194 198
                }
195 199
              }
196 200
           })
@@ -258,13 +262,102 @@
258 262
           }
259 263
         }
260 264
         return price
265
+      },
266
+      getDrugOutOrderPrint(){
267
+         var params = {
268
+          start_time:this.start_time,
269
+          end_time:this.end_time,
270
+          order_type:parseInt(this.order_type),
271
+        }
272
+        console.log("params22222",params)
273
+        getDrugOutOrderPrint(params).then(response=>{
274
+          if(response.data.state == 1){
275
+            var list = response.data.data.list
276
+            console.log("药品出库详情",list)
277
+            let objInfo = {}
278
+            list.forEach((item,index)=>{
279
+              let { drug_id } = item
280
+              if(!objInfo[drug_id]){
281
+                objInfo[drug_id] = {
282
+                  drug_id,
283
+                  child:[],
284
+                  drug_name:item.XtBaseDrug.drug_name,
285
+                  drug_spec:item.XtBaseDrug.drug_spec,
286
+                  min_unit:item.XtBaseDrug.min_unit,
287
+                  count:0,
288
+                  price:item.XtBaseDrug.retail_price,
289
+                  remark:item.XtBaseDrug.remark,
290
+                  total_price:"",
291
+                  dose:item.XtBaseDrug.dose,
292
+                  dose_unit:item.XtBaseDrug.dose_unit,
293
+                  min_number:item.XtBaseDrug.min_number,
294
+                  max_unit:item.XtBaseDrug.max_unit,
295
+                  min_price:item.XtBaseDrug.min_price,
296
+                }
297
+              }
298
+            })
299
+            let newArr = Object.values(objInfo);
300
+            for(let i=0;i<newArr.length;i++){
301
+              for(let j=0;j<list.length;j++){
302
+                if(newArr[i].drug_id == list[j].drug_id){
303
+                   newArr[i].child.push(list[j])
304
+                }
305
+              }
306
+            }
307
+            console.log("list2334444",newArr)
308
+            this.cancelStockDate = newArr
309
+          }
310
+        })
311
+      },
312
+      getCount(arr,max_unit,min_unit,min_number){
313
+        var total = 0
314
+        var str = ""
315
+        var min_str = ""
316
+        for(let i=0;i<arr.length;i++){
317
+          if(arr[i].count_unit == max_unit){
318
+            arr[i].count = arr[i].count * arr[i].min_number
319
+          }
320
+        }
321
+        for(let i=0;i<arr.length;i++){
322
+          total+= arr[i].count
323
+        }
324
+
325
+       if(total<min_number){
326
+           str = ""
327
+           min_str = total + min_unit
328
+        }
329
+        if(total >= min_number){
330
+          if(parseInt(total/min_number)!=0){
331
+            str = parseInt(total/min_number)+ max_unit
332
+          }
333
+          if((total%min_number)!=0){
334
+            min_str =  total%min_number + min_unit
335
+          }
336
+        }
337
+        return str + min_str
338
+      },
339
+      getTotalPrice(arr,max_unit,min_number,min_price){
340
+        var total = 0
341
+        for(let i=0;i<arr.length;i++){
342
+          if(arr[i].count_unit == max_unit){
343
+            arr[i].count = arr[i].count * min_number
344
+          }else{
345
+            arr[i].count = arr[i].count
346
+          }
347
+        }  
348
+        for(let j=0;j<arr.length;j++){
349
+          total +=arr[j].count
350
+        }
351
+        console.log("total23232",total)
352
+        return (total*min_price).toFixed(2)
261 353
       }
262 354
     },
263 355
     created() {
264 356
       var xtuser = this.$store.getters.xt_user
265 357
       this.orgname = xtuser.org.org_name
266
-      this.getlist()
267
-      this.getBaseDrugLibList()
358
+      // this.getlist()
359
+      // this.getBaseDrugLibList()
360
+      this.getDrugOutOrderPrint()
268 361
     }
269 362
 
270 363
   }

+ 24 - 5
src/xt_pages/stock/drugs/drugPrint.vue Прегледај датотеку

@@ -31,14 +31,14 @@
31 31
                 {{index+1}}
32 32
               </td>
33 33
               <td style="line-height: 50px">
34
-                <span>{{item.drug_name}}</span>
34
+                <span>{{item.XtBaseDrug.drug_name}}</span>
35 35
               </td>
36 36
               <td style="line-height: 50px">
37 37
                 <!-- <span>{{item.drug_spec}}</span> -->
38
-                <span>{{item.dose}}{{item.dose_unit}}*{{item.min_number}}{{item.min_unit}}/{{item.max_unit}}</span>
38
+                <span>{{item.XtBaseDrug.dose}}{{item.XtBaseDrug.dose_unit}}*{{item.XtBaseDrug.min_number}}{{item.XtBaseDrug.min_unit}}/{{item.XtBaseDrug.max_unit}}</span>
39 39
               </td>
40 40
               <td style="line-height: 50px">
41
-                <span>{{item.min_unit}}</span>
41
+                <span>{{item.XtBaseDrug.min_unit}}</span>
42 42
               </td>
43 43
             
44 44
               <td style="line-height: 50px">
@@ -89,7 +89,7 @@
89 89
   import { jsGetAge, uParseTime } from '@/utils/tools'
90 90
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
91 91
   import print from 'print-js'
92
-  import { getDrugIndetail} from "@/api/drug/drug_stock"
92
+  import { getDrugIndetail,getDrugWarehouseInfoPrint} from "@/api/drug/drug_stock"
93 93
   export default {
94 94
     name: 'dialysisPrintOrder',
95 95
     components: {
@@ -221,13 +221,32 @@
221 221
            total += this.cancelStockDate[i].price*this.cancelStockDate[i].warehousing_count
222 222
         }
223 223
         return total
224
+      },
225
+      getDrugWarehouseInfoPrint(){
226
+         var params = {
227
+          start_time:this.start_time,
228
+          end_time:this.end_time,
229
+          order_type:this.order_type,
230
+         }
231
+         console.log("params2222",params)
232
+        getDrugWarehouseInfoPrint(params).then(response=>{
233
+           if(response.data.state == 1){
234
+             var list = response.data.data.list
235
+             console.log("入库单详情",list)
236
+             this.cancelStockDate  = list
237
+           }   
238
+        })
239
+
240
+        
224 241
       }
225 242
     },
226 243
     created() {
227 244
       var xtuser = this.$store.getters.xt_user
228 245
       this.orgname = xtuser.org.org_name
229
-      this.getlist()
246
+      // this.getlist()
247
+     
230 248
 
249
+      this.getDrugWarehouseInfoPrint()
231 250
       
232 251
 
233 252
     }

+ 1 - 1
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue Прегледај датотеку

@@ -696,7 +696,7 @@
696 696
               'stockIn': this.recordInfo.recordData
697 697
             }
698 698
             console.log("params2222222",params)
699
-             
699
+            
700 700
             postDrugWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
701 701
               if (response.data.state == 0) {
702 702
                 this.$message.error(response.data.msg)

+ 3 - 14
src/xt_pages/stock/drugs/drugStockOutOrder.vue Прегледај датотеку

@@ -319,8 +319,6 @@
319 319
               <span>使用人</span>
320 320
             </template>
321 321
             <template slot-scope="scope">
322
-              <!-- <span v-if="scope.row.is_total == 0">{{scope.row.user.name}}</span>
323
-              <span  v-if="scope.row.is_total == 1"></span> -->
324 322
               {{scope.row.user.name}}
325 323
             </template>
326 324
           </el-table-column>
@@ -330,7 +328,6 @@
330 328
             </template>
331 329
             <template slot-scope="scope">
332 330
               <span >{{scope.row.count}}{{scope.row.count_unit}}</span>
333
-              <!-- <span  v-if="scope.row.is_total == 1">{{scope.row.total}}</span> -->
334 331
             </template>
335 332
           </el-table-column>
336 333
 
@@ -954,22 +951,17 @@ export default {
954 951
           this.tableShow = true
955 952
           this.tableList = []
956 953
           var list =  response.data.data.list
957
-          console.log("list2323232",list)
958 954
           var outList = response.data.data.outList
959 955
           for(let i=0;i<outList.length;i++){
960
-            console.log("55555",outList[i].count_unit)
961
-            console.log("666",outList[i].max_unit)
962 956
           if(outList[i].count_unit == outList[i].max_unit){
963 957
               outList[i].count =outList[i].count * outList[i].min_number
964 958
             }
965 959
           }
966 960
           this.outList = outList
967
-         console.log("出库数据44444",outList)
968 961
          this.manufacturerList = response.data.data.manufacturerList
969 962
          this.dealerList = response.data.data.dealerList
970 963
          var drugFlowList = response.data.data.drugFlowList
971 964
          this.drugFlowList = drugFlowList
972
-         console.log("23232323232323",drugFlowList)
973 965
          for(let i=0;i<list.length;i++){
974 966
            if(list[i].batch_number == "0" || list[i].batch_number == 0){
975 967
               list[i].batch_number = ""
@@ -1072,7 +1064,6 @@ export default {
1072 1064
         return str + min_str
1073 1065
       },
1074 1066
       getTotalCount(drug_id,min_number,max_unit,min_unit){
1075
-        console.log("hhhhhhhhh",this.outList)
1076 1067
          var str = ""
1077 1068
          var min_str = ""
1078 1069
          var arr = []
@@ -1100,14 +1091,12 @@ export default {
1100 1091
          return str + min_str
1101 1092
       },
1102 1093
       getTotalCountOne(id,min_number,max_unit,min_unit){
1103
-        console.log("列表",this.drugFlowList)
1104 1094
         var arr = []
1105 1095
         for(let i=0;i<this.drugFlowList.length;i++){
1106 1096
           if(id == this.drugFlowList[i].drug_id){
1107 1097
              arr.push(this.drugFlowList[i])
1108 1098
           }
1109 1099
         }
1110
-      
1111 1100
         var total = 0
1112 1101
         for(let i=0;i<arr.length;i++){
1113 1102
           if(arr[i].count_unit == max_unit){
@@ -1118,7 +1107,6 @@ export default {
1118 1107
           }
1119 1108
           total += arr[i].count
1120 1109
         }
1121
-      console.log("arr00000000000",arr)
1122 1110
         var str = ""
1123 1111
         var min_str = ""
1124 1112
         if(total >= min_number){
@@ -1133,9 +1121,7 @@ export default {
1133 1121
           str = ""
1134 1122
           min_str = total + min_unit
1135 1123
         }
1136
-       
1137 1124
         return str + min_str 
1138
-
1139 1125
       },
1140 1126
     //   getTotalCountOne(id,min_number,max_unit,min_unit){
1141 1127
        
@@ -1212,6 +1198,9 @@ export default {
1212 1198
          return  total_price
1213 1199
       },
1214 1200
       getDrugBatchNumber(drugid,count){
1201
+        console.log("drug_id2323",drug_id)
1202
+        console.log("count",count)
1203
+        console.log("hhhhhhhhhhh",this.batchNumberList)
1215 1204
         var arr = []
1216 1205
         for(let i=0;i<this.batchNumberList.length;i++){
1217 1206
           if(drugid == this.batchNumberList[i].drug_id && count == this.batchNumberList[i].count){

+ 5 - 5
src/xt_pages/user/components/PatientSidebar.vue Прегледај датотеку

@@ -102,10 +102,10 @@ export default {
102 102
               name: '1-2',
103 103
               label: '病程管理'
104 104
             },
105
-            // {
106
-            //   name: '1-9',
107
-            //   label: '阶段小结'
108
-            // },
105
+            {
106
+              name: '1-9',
107
+              label: '阶段小结'
108
+            },
109 109
             {
110 110
               name: '1-3',
111 111
               label: '检验检查'
@@ -188,7 +188,7 @@ export default {
188 188
       }else if (name == '1-8'){
189 189
         this.$router.push({path:'/patients/patients/'+this.id+'/inspectionInfectious'})
190 190
       }else if (name == '1-9'){
191
-        this.$router.push({path:'/patients/patients/'+2448+'/templateSummary'})
191
+        this.$router.push({path:'/patients/patients/'+this.id+'/templateSummary'})
192 192
       }
193 193
     },
194 194
     changePatient(value) {

+ 258 - 42
src/xt_pages/user/templateSummary.vue Прегледај датотеку

@@ -36,25 +36,15 @@
36 36
                   color: '#606266'
37 37
                 }"
38 38
                 :row-style="{ color: '#303133' }" ref="record_table" :data="records"
39
-                        border highlight-current-row @current-change="didChangeCurrentRecord"
39
+                        border highlight-current-row @current-change="changeCurrentRecordOne"
40 40
                         @selection-change="didSelectionChange"
41 41
                         :row-class-name="tableRow"
42 42
                         @row-click="onRowClick"
43 43
               >
44 44
                 <el-table-column type="selection" width="40" align="center"></el-table-column>
45
-                <el-table-column label="阶段小结名称" align="center">
46
-                  <template slot-scope="scope">
47
-                    <!-- {{ scope.row.title}} -->
48
-                  </template>
49
-                </el-table-column>
50
-                <el-table-column label="记录时间" align="center">
51
-                  <template slot-scope="scope">
52
-                    <!-- {{ recordTime(scope.row.record_time) }} -->
53
-                  </template>
54
-                </el-table-column>
55
-                <el-table-column label="记录医生" align="center">
45
+                <el-table-column label="检查项目" align="center">
56 46
                   <template slot-scope="scope">
57
-                    <!-- {{ doctorName(scope.row.recorder) }} -->
47
+                   
58 48
                   </template>
59 49
                 </el-table-column>
60 50
               </el-table>
@@ -62,10 +52,23 @@
62 52
             <el-col :span="14">
63 53
               <div class="record_content_panel">
64 54
                 <div style="background-color:rgb(245, 247, 250)" class="title">病程内容</div>
65
-                <div class="content">
66
-                  <span v-if="current_select_record" v-html="current_select_record.content">{{current_select_record.content }}</span>
67
-                  <span v-else></span>
68
-                </div>
55
+                  <el-table :header-cell-style="{
56
+                     backgroundColor: 'rgb(245, 247, 250)',
57
+                     color: '#606266'
58
+                   }"
59
+                   :row-style="{ color: '#303133' }" ref="record_table" :data="records"
60
+                        border highlight-current-row @current-change="didChangeCurrentRecord"
61
+                        @selection-change="didSelectionChange"
62
+                        :row-class-name="tableRow"
63
+                        @row-click="onRowClick"
64
+                 >
65
+                  <el-table-column type="selection" width="40" align="center"></el-table-column>
66
+                  <el-table-column label="检查项目" align="center">
67
+                    <template slot-scope="scope">
68
+                    
69
+                    </template>
70
+                  </el-table-column>
71
+                </el-table>
69 72
               </div>
70 73
             </el-col>
71 74
           </el-row>
@@ -103,6 +106,7 @@
103 106
                      </el-radio-group>
104 107
                     </el-form-item> 
105 108
                   </el-col>
109
+                  
106 110
                   <el-col :span="8" v-if="form.radio == 1">
107 111
                     <el-form-item>
108 112
                       <el-date-picker
@@ -267,15 +271,8 @@
267 271
                   </el-row>
268 272
                   <el-row>
269 273
                     <label class="title"><span class="name">阶段小结化验结果</span> : </label>
270
-                     <el-select v-model="form.template_inspection_id" placeholder="请选择">
271
-                        <el-option
272
-                        v-for="item in options"
273
-                        :key="item.value"
274
-                        :label="item.label"
275
-                        :value="item.value">
276
-                        </el-option>
277
-                     </el-select>
278
-                     <el-input tyep="text" v-model="form.template_inspection_content"></el-input>
274
+                    <el-button type="primary" @click="toInspection">选择检验检查</el-button>
275
+                     <el-input tyep="text" v-model="form.template_inspection_content" style="height:100px"></el-input>
279 276
                   </el-row>
280 277
                   <el-row>
281 278
                     <el-col :span="8">
@@ -302,9 +299,6 @@
302 299
                   </el-row>
303 300
               </el-form>
304 301
             </div>
305
-
306
-
307
-          
308 302
             <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
309 303
               <el-button @click="show_dialog = false">取消</el-button>
310 304
               <el-button type="primary" @click="createAction">保存
@@ -314,7 +308,121 @@
314 308
         </div>
315 309
       </el-dialog>
316 310
 
317
-
311
+       <el-dialog
312
+        title="提示"
313
+        :visible.sync="dialogVisibleInspection"
314
+        width="80%"
315
+        >
316
+        <span>
317
+          <el-form>
318
+            <el-row>
319
+              <el-form-item>
320
+                <span>选择检验检查时间:</span>
321
+                <div>
322
+                  <el-form-item
323
+                   label="年份:"
324
+                   prop="startYear"
325
+                   style="width:100%;"
326
+                 >
327
+                 <el-date-picker 
328
+                    v-model="startYear" 
329
+                    class="timePicker" 
330
+                    type="month" 
331
+                    placeholder=""
332
+                    format="yyyy-MM" 
333
+                    value-format="yyyy-MM">
334
+	               </el-date-picker>
335
+                 </el-form-item>
336
+                 <!-- <el-form-item  label="月份:"
337
+                   prop="startYear"
338
+                   style="width:100%;">     
339
+                  <el-date-picker
340
+                    v-model="startMonth"
341
+                    type="month"
342
+                    format="MM"
343
+                    value-format="MM"
344
+                    placeholder="请选择">
345
+                  </el-date-picker>  
346
+                 </el-form-item> -->
347
+                </div>
348
+              </el-form-item>
349
+            </el-row>
350
+            <el-row>
351
+               <span>选择检验检查项目:</span>
352
+                 <div class="record">
353
+                  <el-row :gutter="15">
354
+                    <el-col :span="10">
355
+                      <el-table :header-cell-style="{
356
+                          backgroundColor: 'rgb(245, 247, 250)',
357
+                          color: '#606266'
358
+                        }"
359
+                        :row-style="{ color: '#303133' }" :data="tableList"
360
+                                border highlight-current-row @current-change="changeCurrentRecord"
361
+                                @selection-change="selectionChangeOne"
362
+                                :row-class-name="tableRow"
363
+                                @row-click="onRowClick"
364
+                                ref="singleTable"
365
+                      >
366
+                        <el-table-column type="selection" width="40" align="center"></el-table-column>
367
+                        <el-table-column label="检验项目" align="center">
368
+                          <template slot-scope="scope">
369
+                            {{scope.row.project_name}}
370
+                          </template>
371
+                        </el-table-column>
372
+                      </el-table>
373
+                    </el-col>
374
+                    <el-col :span="14">
375
+                      <div class="record_content_panel">
376
+                        <el-table :header-cell-style="{
377
+                          backgroundColor: 'rgb(245, 247, 250)',
378
+                          color: '#606266'
379
+                        }"
380
+                        :row-style="{ color: '#303133' }" ref="record_table" :data="tableData"
381
+                                border highlight-current-row @current-change="didChangeCurrentRecord"
382
+                                @selection-change="selectionChange"
383
+                                :row-class-name="tableRow"
384
+                                @row-click="onRowClick"
385
+                                
386
+                      >
387
+                        <el-table-column label="检验项目" align="center">
388
+                          <template slot-scope="scope">
389
+                            {{scope.row.item_name}}
390
+                          </template>
391
+                        </el-table-column>
392
+                        <el-table-column label="结果" align="center">
393
+                          <template slot-scope="scope">
394
+                           <span v-if="parseInt(scope.row.inspect_value) < parseInt(scope.row.range_min)">
395
+                             {{scope.row.inspect_value}}↓
396
+                          </span> 
397
+                           <span v-if="parseInt(scope.row.inspect_value) > parseInt(scope.row.range_max)">
398
+                             {{scope.row.inspect_value}}↑
399
+                          </span> 
400
+                          </template>
401
+                        </el-table-column>
402
+                        <el-table-column label="参考值" align="center">
403
+                          <template slot-scope="scope">
404
+                           {{scope.row.range_min}} ~  {{scope.row.range_max}}
405
+                          </template>
406
+                        </el-table-column>
407
+                        <el-table-column label="单位" align="center">
408
+                          <template slot-scope="scope">
409
+                            {{scope.row.unit}}
410
+                          </template>
411
+                        </el-table-column>
412
+                      </el-table>
413
+                      </div>
414
+                    </el-col>
415
+                  </el-row>
416
+                </div>
417
+            </el-row>
418
+          </el-form>
419
+
420
+        </span>
421
+        <span slot="footer" class="dialog-footer">
422
+          <el-button @click="dialogVisibleInspection = false">取 消</el-button>
423
+          <el-button type="primary" @click="toContent">确 定</el-button>
424
+        </span>
425
+      </el-dialog>
318 426
   
319 427
     </div>
320 428
   </div>
@@ -326,7 +434,7 @@
326 434
   import PatientSidebar from './components/PatientSidebar'
327 435
   import Editor from '@/components/Editor'
328 436
 
329
-  import { getInitDataList } from '@/api/patient'
437
+  import { getInitDataList,getInspectionMajorItem,getInspectionDetail,getInspectionItemList } from '@/api/patient'
330 438
   import { parseTime } from '@/utils'
331 439
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
332 440
   import { uParseTime } from '@/utils/tools'
@@ -406,18 +514,28 @@
406 514
           {id:4,name:"第四季度"},
407 515
         ],
408 516
         options:[],
517
+        dialogVisibleInspection:false,
518
+        InspectionMajor:[],
519
+        other_start_time:"",
520
+        startYear:new Date(),
521
+        startMonth:(new Date().getMonth+1).toString(),
522
+        tableList:[],
523
+        tableData:[],
524
+        inspectDataList:[],
525
+        projectList:[],
409 526
       }
410 527
     },
411 528
     created() {
412
-    //   this.patient_id = parseInt(this.$route.query.id)
413
-    //   if (isNaN(this.patient_id) || this.patient_id <= 0) {
414
-    //     this.$notify.error({
415
-    //       title: '错误',
416
-    //       message: '无效的id'
417
-    //     })
418
-    //     this.$router.push('/patients/patients')
419
-    //     return
420
-    //   }
529
+      this.patient_id = parseInt(this.$route.query.id)
530
+      console.log("hhhhhh",this.patient_id)
531
+      if (isNaN(this.patient_id) || this.patient_id <= 0) {
532
+        this.$notify.error({
533
+          title: '错误',
534
+          message: '无效的id'
535
+        })
536
+        this.$router.push('/patients/patients')
537
+        return
538
+      }
421 539
       var now = new Date()
422 540
       this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
423 541
 
@@ -441,7 +559,10 @@
441 559
         (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
442 560
         '-' +
443 561
         (nowDay < 10 ? '0' + nowDay : nowDay)
562
+      this.other_start_time = nowYear +'-' +(nowMonth < 10 ? '0' + nowMonth : nowMonth) +'-' + (nowDay < 10 ? '0' + nowDay : nowDay)
444 563
       this.getlist()
564
+      this.getInspectionMajor()
565
+
445 566
     },
446 567
     methods: {
447 568
       getTime(val) {
@@ -468,6 +589,15 @@
468 589
       },
469 590
       didChangeCurrentRecord(){
470 591
 
592
+      },
593
+      changeCurrentRecord(val){
594
+      
595
+        this.getInspectionDetai(val)
596
+      },
597
+      selectionChangeOne(val){
598
+        console.log("val23232323",val)
599
+       
600
+        this.getInspectionItemList(val)
471 601
       },
472 602
       startTimeChange(){
473 603
 
@@ -477,6 +607,9 @@
477 607
       },
478 608
       print(){
479 609
 
610
+      },
611
+      tableRow(){
612
+
480 613
       },
481 614
       getQuarter(year,quarter){
482 615
         var start_time = ""
@@ -502,6 +635,15 @@
502 635
 
503 636
         // }
504 637
 
638
+      },
639
+      didSelectionChange(){
640
+
641
+      },
642
+      changeCurrentRecordOne(){
643
+
644
+      },
645
+      changeCurrentRecordOne(){
646
+
505 647
       },
506 648
       getlist(){
507 649
         var params={
@@ -511,9 +653,83 @@
511 653
         }
512 654
         console.log("param222222",params)
513 655
         console.log(moment(moment(2020 + '-01-01').toDate()).quarter(2).format("YYYY-MM-DD"))
514
-      getInitDataList(params).then(response=>{
656
+        getInitDataList(params).then(response=>{
657
+
658
+       })
659
+      },
660
+      toInspection(){
661
+        this.dialogVisibleInspection = true
662
+      },
663
+
664
+      //获取大项数据来源
665
+      getInspectionMajor(){
666
+          var params = {
667
+            other_start_time:this.getTime(this.startYear),
668
+            // patient_id:this.$route.query.id,
669
+             patient_id:2448,
670
+          }
671
+        console.log("params",params)
672
+        getInspectionMajorItem(params).then(response=>{
673
+          if(response.data.state == 1){
674
+            var list = response.data.data.list
675
+            console.log("list23232323",list)
676
+            this.tableList = list
677
+            // this.$refs.singleTable.setCurrentRow(list[0])
678
+          }
679
+        })
680
+      },
681
+      //获取小项的值
682
+      getInspectionDetai(val){
683
+        var params = {
684
+          project_id:val.project_id,
685
+          patient_id:val.patient_id,
686
+          inspect_date:val.inspect_date,
687
+        }
688
+        console.log("param2233233223",params)
689
+       getInspectionDetail(params).then(response=>{
690
+          if(response.data.state ==1){
691
+            var list = response.data.data.list
692
+            console.log("详情222",list)
693
+            this.tableData = list
694
+          }
695
+       })
696
+      },
697
+      selectionChange(val){
698
+        console.log("val233223",val)
699
+        selectionChange().then(response=>{
515 700
 
516
-      })
701
+        })
702
+      },
703
+      getInspectionItemList(val){
704
+       
705
+       for(let i=0;i<val.length;i++){
706
+        this.projectList.push(val[i].project_id)
707
+        this.inspectDataList.push(val[i].inspect_date)
708
+      }
709
+    
710
+      },
711
+      toContent(){
712
+      
713
+         var str = this.inspectDataList.join(",")
714
+         var inspe_date = this.projectList.join(",")
715
+         var params = {
716
+           ids:str,
717
+           inspect_date:inspe_date,
718
+           patient_id:2448,
719
+         }
720
+         console.log("params",params)
721
+        getInspectionItemList(params).then(response=>{
722
+           if(response.data.state == 1){
723
+             var list = response.data.data.list
724
+             console.log("list23223322332",list)
725
+             var str = ""
726
+             for(let i=0;i<list.length;i++){
727
+               str += (list[i].item_name + ":" + list[i].inspect_value)
728
+             }
729
+            this.form.template_inspection_content = str
730
+            this.dialogVisibleInspection = true
731
+           }
732
+        })  
517 733
       }
518 734
     }
519 735
   }

+ 4 - 1
src/xt_pages/workforce/template.vue Прегледај датотеку

@@ -364,9 +364,12 @@
364 364
 
365 365
 
366 366
         })
367
+      },
368
+      beforeUpload(){
369
+
367 370
       },
368 371
       handleSuccess({ results, header }) {
369
-       
372
+         consle.log("result32eeeeeeee",results)
370 373
         let headers = []
371 374
         for (let key in results[0]) {
372 375
           headers.push(key)