Explorar el Código

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

XMLWAN hace 4 años
padre
commit
3175b4ac36

+ 8 - 0
.gitignore Ver fichero

1
 node_modules/
1
 node_modules/
2
 dist/
2
 dist/
3
+.idea/Vue_New.iml
4
+.idea/codeStyles
5
+.idea/encodings.xml
6
+.idea/inspectionProfiles
7
+.idea/misc.xml
8
+.idea/modules.xml
9
+.idea/vcs.xml
10
+.idea/workspace.xml

+ 0 - 8
.idea/Vue_New.iml Ver fichero

1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<module type="WEB_MODULE" version="4">
3
-  <component name="NewModuleRootManager">
4
-    <content url="file://$MODULE_DIR$" />
5
-    <orderEntry type="inheritedJdk" />
6
-    <orderEntry type="sourceFolder" forTests="false" />
7
-  </component>
8
-</module>

+ 0 - 6
.idea/inspectionProfiles/Project_Default.xml Ver fichero

1
-<component name="InspectionProjectProfileManager">
2
-  <profile version="1.0">
3
-    <option name="myName" value="Project Default" />
4
-    <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
-  </profile>
6
-</component>

+ 0 - 6
.idea/misc.xml Ver fichero

1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project version="4">
3
-  <component name="JavaScriptSettings">
4
-    <option name="languageLevel" value="ES6" />
5
-  </component>
6
-</project>

+ 0 - 8
.idea/modules.xml Ver fichero

1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project version="4">
3
-  <component name="ProjectModuleManager">
4
-    <modules>
5
-      <module fileurl="file://$PROJECT_DIR$/.idea/Vue_New.iml" filepath="$PROJECT_DIR$/.idea/Vue_New.iml" />
6
-    </modules>
7
-  </component>
8
-</project>

+ 0 - 6
.idea/vcs.xml Ver fichero

1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project version="4">
3
-  <component name="VcsDirectoryMappings">
4
-    <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
-  </component>
6
-</project>

+ 2 - 2
config/dev.env.js Ver fichero

7
   NODE_ENV: '"development"',
7
   NODE_ENV: '"development"',
8
   ENV_CONFIG: '"dev"',
8
   ENV_CONFIG: '"dev"',
9
   // BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
9
   // BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
-  BASE_API: '"http://api.xt.test.sgjyun.com"',
11
-  // BASE_API: '"http://localhost:9531"',
10
+  // BASE_API: '"http://api.xt.test.sgjyun.com"',
11
+  BASE_API: '"http://localhost:9531"',
12
   SSO_HOST: '"http://testsso.sgjyun.com"',
12
   SSO_HOST: '"http://testsso.sgjyun.com"',
13
   SRCM_HOST: '"http://test1.sgjyun.com"',
13
   SRCM_HOST: '"http://test1.sgjyun.com"',
14
   XT_HOST: '"http://xt.test.sgjyun.com"',
14
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 5 - 3
src/api/common/common.js Ver fichero

48
 }
48
 }
49
 
49
 
50
 export function getConfigurationDetail(id, params) {
50
 export function getConfigurationDetail(id, params) {
51
- 
51
+
52
   return request({
52
   return request({
53
     url: 'com/api/getconfigurationdetail?id=' + id,
53
     url: 'com/api/getconfigurationdetail?id=' + id,
54
     method: 'get',
54
     method: 'get',
531
 }
531
 }
532
 
532
 
533
 export function getRolloutCount(params){
533
 export function getRolloutCount(params){
534
-  
534
+
535
   return request({
535
   return request({
536
     url:"/com/api/getrolloutcount",
536
     url:"/com/api/getrolloutcount",
537
     method:"Get",
537
     method:"Get",
538
     params:params
538
     params:params
539
   })
539
   })
540
-}
540
+}
541
+
542
+

+ 33 - 1
src/api/his/his.js Ver fichero

106
 }
106
 }
107
 
107
 
108
 
108
 
109
-export function getHisOrderList() {
109
+export function getHisOrderList(params) {
110
   return request({
110
   return request({
111
     url: "/api/hisorder/list",
111
     url: "/api/hisorder/list",
112
     method: "get",
112
     method: "get",
113
+    params:params,
113
   });
114
   });
114
 }
115
 }
115
 
116
 
152
 }
153
 }
153
 
154
 
154
 
155
 
156
+export function delHisAddition(params) {
157
+  return request({
158
+    url: "/api/addition_charge/delete",
159
+    method: "post",
160
+    params:params,
161
+  });
162
+}
163
+
164
+
165
+
166
+export function getDoctorList() {
167
+  return request({
168
+    url: "/api/doctor/list",
169
+    method: "get",
170
+  });
171
+}
172
+
173
+
174
+export function getExportConsumeDetailList(params) {
175
+  return request({
176
+    url: "/api/consumedetail/export",
177
+    method: "get",
178
+    params:params
179
+  });
180
+}
181
+
182
+
183
+
184
+
185
+
186
+
155
 
187
 
156
 
188
 

+ 0 - 12
src/router/modules/workforce.js Ver fichero

70
         title: 'remind_print',
70
         title: 'remind_print',
71
         noCache: true
71
         noCache: true
72
       }
72
       }
73
-    },
74
-
75
-    {
76
-      path:'/schedule/remind/print/next',
77
-      component:()=>import('@/xt_pages/workforce/next_remind_print'),
78
-      name:'next_remind_print',
79
-      hidden:true,
80
-      is_menu:false,
81
-      meta:{
82
-        title:'next_reminde_print',
83
-        noCache:true
84
-      }
85
     }
73
     }
86
   ]
74
   ]
87
 }
75
 }

BIN
src/store/.DS_Store Ver fichero


BIN
src/xt_pages/.DS_Store Ver fichero


BIN
src/xt_pages/dialysis/.DS_Store Ver fichero


+ 55 - 13
src/xt_pages/outpatientCharges/components/prescriptionTable.vue Ver fichero

10
       <el-table-column align="center" prop="name" width="90" label="单次用量">
10
       <el-table-column align="center" prop="name" width="90" label="单次用量">
11
         <template slot-scope="scope">
11
         <template slot-scope="scope">
12
           <div style="display:flex;align-items:center;">
12
           <div style="display:flex;align-items:center;">
13
-            <el-input v-model="scope.row.single_dose" readonly style="width:65%;"></el-input>
13
+            <!--<el-input v-model="scope.row.single_dose" readonly style="width:65%;"></el-input>-->
14
+            <div> {{scope.row.single_dose}}</div>
15
+
14
             <div> {{scope.row.single_dose_unit}}</div>
16
             <div> {{scope.row.single_dose_unit}}</div>
15
           </div>
17
           </div>
16
         </template>
18
         </template>
17
       </el-table-column>
19
       </el-table-column>
18
       <el-table-column align="center" prop="name" width="100" label="用法">
20
       <el-table-column align="center" prop="name" width="100" label="用法">
19
         <template slot-scope="scope">
21
         <template slot-scope="scope">
20
-          <el-input v-model="scope.row.delivery_way" readonly></el-input>
22
+          <!--<el-input v-model="scope.row.delivery_way" readonly></el-input>-->
23
+          <div> {{scope.row.delivery_way}}</div>
21
 
24
 
22
         </template>
25
         </template>
23
       </el-table-column>
26
       </el-table-column>
24
       <el-table-column align="center" prop="name" width="100" label="频率">
27
       <el-table-column align="center" prop="name" width="100" label="频率">
25
         <template slot-scope="scope">
28
         <template slot-scope="scope">
26
-          <el-input v-model="scope.row.execution_frequency" readonly></el-input>
29
+          <div> {{scope.row.execution_frequency}}</div>
30
+
31
+          <!--<el-input v-model="scope.row.execution_frequency" readonly></el-input>-->
32
+        </template>
33
+      </el-table-column>
34
+
35
+      <el-table-column align="center" prop="day" width="50" label="天数">
36
+        <template slot-scope="scope">
37
+          {{scope.row.day}}
27
         </template>
38
         </template>
28
       </el-table-column>
39
       </el-table-column>
29
 
40
 
30
       <el-table-column align="center" prop="name" width="100" label="总量">
41
       <el-table-column align="center" prop="name" width="100" label="总量">
31
         <template slot-scope="scope">
42
         <template slot-scope="scope">
32
           <div style="display:flex;align-items:center;">
43
           <div style="display:flex;align-items:center;">
33
-            <el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>
44
+            <!--<el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>-->
45
+            <div> {{scope.row.prescribing_number}}</div>
46
+
34
             <div>{{scope.row.prescribing_number_unit}}</div>
47
             <div>{{scope.row.prescribing_number_unit}}</div>
35
           </div>
48
           </div>
36
         </template>
49
         </template>
37
       </el-table-column>
50
       </el-table-column>
38
       <el-table-column align="center" prop="name" width="60" label="单价">
51
       <el-table-column align="center" prop="name" width="60" label="单价">
39
         <template slot-scope="scope">
52
         <template slot-scope="scope">
40
-          <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
53
+          <div> {{scope.row.retail_price}}</div>
54
+
55
+          <!--<el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>-->
41
         </template>
56
         </template>
42
       </el-table-column>
57
       </el-table-column>
43
       <el-table-column align="center" prop="name" width="50" label="备注">
58
       <el-table-column align="center" prop="name" width="50" label="备注">
44
         <template slot-scope="scope">
59
         <template slot-scope="scope">
45
-          <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder="" readonly></el-input>
60
+          <!--<el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder="" readonly></el-input>-->
61
+          <div> {{scope.row.remark}}</div>
46
         </template>
62
         </template>
47
       </el-table-column>
63
       </el-table-column>
48
     </el-table>
64
     </el-table>
60
       </el-table-column>
76
       </el-table-column>
61
       <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
77
       <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
62
         <template slot-scope="scope">
78
         <template slot-scope="scope">
63
-          <el-input v-model="scope.row.single_dose" placeholder="" readonly></el-input>
79
+          <!--<el-input v-model="scope.row.single_dose" placeholder="" readonly></el-input>-->
80
+          {{scope.row.single_dose}}
64
         </template>
81
         </template>
65
       </el-table-column>
82
       </el-table-column>
66
       <el-table-column align="center" prop="delivery_way" width="80" label="用法">
83
       <el-table-column align="center" prop="delivery_way" width="80" label="用法">
67
         <template slot-scope="scope">
84
         <template slot-scope="scope">
68
-          <el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>
85
+          <!--<el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>-->
86
+          {{scope.row.delivery_way}}
87
+
69
         </template>
88
         </template>
70
       </el-table-column>
89
       </el-table-column>
71
       <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
90
       <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
72
         <template slot-scope="scope">
91
         <template slot-scope="scope">
73
-          <el-input v-model="scope.row.execution_frequency" placeholder="" readonly></el-input>
92
+          <!--<el-input v-model="scope.row.execution_frequency" placeholder="" readonly></el-input>-->
93
+          {{scope.row.execution_frequency}}
94
+
74
         </template>
95
         </template>
75
       </el-table-column>
96
       </el-table-column>
76
       <el-table-column align="center" prop="number_days" width="50" label="天数">
97
       <el-table-column align="center" prop="number_days" width="50" label="天数">
77
         <template slot-scope="scope">
98
         <template slot-scope="scope">
78
-          <el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>
99
+          <!--<el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>-->
100
+          {{scope.row.number_days}}
101
+
79
         </template>
102
         </template>
80
       </el-table-column>
103
       </el-table-column>
81
       <el-table-column align="center" prop="total" width="50" label="总量">
104
       <el-table-column align="center" prop="total" width="50" label="总量">
82
         <template slot-scope="scope">
105
         <template slot-scope="scope">
83
           <div style="display:flex;">
106
           <div style="display:flex;">
84
-            <el-input v-model="scope.row.total" placeholder="" readonly></el-input>
107
+            <!--<el-input v-model="scope.row.total" placeholder="" readonly></el-input>-->
108
+            {{scope.row.total}}
109
+
110
+            <div>{{scope.row.unit}}</div>
111
+
85
           </div>
112
           </div>
86
         </template>
113
         </template>
87
       </el-table-column>
114
       </el-table-column>
88
       <el-table-column align="center" prop="name" width="50" label="单价">
115
       <el-table-column align="center" prop="name" width="50" label="单价">
89
         <template slot-scope="scope">
116
         <template slot-scope="scope">
90
-          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
117
+          <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
118
+          {{scope.row.price}}
119
+
91
         </template>
120
         </template>
92
       </el-table-column>
121
       </el-table-column>
93
       <el-table-column align="center" prop="name" width="50" label="备注">
122
       <el-table-column align="center" prop="name" width="50" label="备注">
94
         <template slot-scope="scope">
123
         <template slot-scope="scope">
95
-          <el-input v-model="scope.row.remark" readonly></el-input>
124
+          <!--<el-input v-model="scope.row.remark" readonly></el-input>-->
125
+          {{scope.row.remark}}
126
+
96
         </template>
127
         </template>
97
       </el-table-column>
128
       </el-table-column>
98
     </el-table>
129
     </el-table>
130
+
131
+    <div class="additionalBox">
132
+      <div class="additionalOne" v-for="(item,index) in prescription.addition" :key="index">
133
+        <span>{{item.item_name}}</span>
134
+        <el-input v-model="item.price" placeholder="" style="width:50px;" readonly></el-input>
135
+        共
136
+        <el-input v-model="item.count" placeholder="" style="width:50px;" readonly></el-input>
137
+        次
138
+        <!--<i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>-->
139
+      </div>
140
+    </div>
99
   </div>
141
   </div>
100
 </template>
142
 </template>
101
 
143
 

+ 143 - 47
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Ver fichero

334
                   execution_frequency: prescription.advices[b].execution_frequency,
334
                   execution_frequency: prescription.advices[b].execution_frequency,
335
                   retail_price: prescription.advices[b].price.toString(),
335
                   retail_price: prescription.advices[b].price.toString(),
336
                   remark: prescription.advices[b].remark,
336
                   remark: prescription.advices[b].remark,
337
+                  day: prescription.advices[b].day,
337
                   prescribing_number: prescription.advices[b].prescribing_number.toString(),
338
                   prescribing_number: prescription.advices[b].prescribing_number.toString(),
338
                   single_dose_unit: prescription.advices[b].single_dose_unit,
339
                   single_dose_unit: prescription.advices[b].single_dose_unit,
339
                   prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
340
                   prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
357
                   total: prescription.project[b].count.toString(),
358
                   total: prescription.project[b].count.toString(),
358
                   price: prescription.project[b].price,
359
                   price: prescription.project[b].price,
359
                   remark: prescription.project[b].remark,
360
                   remark: prescription.project[b].remark,
360
-                  medical_code: prescription.project[b].project.medical_code
361
+                  medical_code: prescription.project[b].project.medical_code,
362
+                  unit:prescription.project[b].unit,
361
                 }
363
                 }
364
+
362
                 tempProject.push(obj)
365
                 tempProject.push(obj)
363
               }
366
               }
364
               let index = i + 1
367
               let index = i + 1
421
 
424
 
422
             }
425
             }
423
           }
426
           }
424
-          return Math.floor(total * 100) / 100
425
-
426
         } else {
427
         } else {
427
-          var total = 0
428
           if (this.curPrescriptions.project != null) {
428
           if (this.curPrescriptions.project != null) {
429
             for (let b = 0; b < this.curPrescriptions.project.length; b++) {
429
             for (let b = 0; b < this.curPrescriptions.project.length; b++) {
430
               total = total +  Math.floor((this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total) * 100) / 100
430
               total = total +  Math.floor((this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total) * 100) / 100
431
 
431
 
432
             }
432
             }
433
           }
433
           }
434
-          return Math.floor(total * 100) / 100
434
+        }
435
 
435
 
436
+        if (this.curPrescriptions.addition != null) {
437
+          for (let b = 0; b < this.curPrescriptions.addition.length; b++) {
438
+            total = total +  Math.floor((this.curPrescriptions.addition[b].price * this.curPrescriptions.addition[b].count) * 100) / 100
439
+          }
436
         }
440
         }
441
+        return Math.floor(total * 100) / 100
437
 
442
 
438
       },
443
       },
439
       getTotal() {
444
       getTotal() {
450
               total = total + Math.floor((this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total) * 100) / 100
455
               total = total + Math.floor((this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total) * 100) / 100
451
             }
456
             }
452
           }
457
           }
453
-
454
-          for (let i = 0; i < this.addtions_charge.length; i++) {
455
-            total = total + Math.floor(this.addtions_charge[i].price * 100) / 100
458
+          if (this.prescriptions[i].addition != null) {
459
+            for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
460
+              total = total + Math.floor((this.prescriptions[i].addition[b].price * this.prescriptions[i].addition[b].count) * 100) / 100
461
+            }
456
           }
462
           }
457
-          return Math.floor(total * 100) / 100
458
         }
463
         }
464
+        return Math.floor(total * 100) / 100
465
+
459
       },
466
       },
460
       moreState(tab, event) {
467
       moreState(tab, event) {
461
         if (tab == 'more') {
468
         if (tab == 'more') {
500
           })
507
           })
501
 
508
 
502
         } else if (index == 5) {
509
         } else if (index == 5) {
503
-          let params = {
504
-            'order_id': this.order.id,
505
-            'number': this.order.number,
506
-          }
507
-          Refund(params).then(response => {
508
-            if (response.data.state == 0) {
509
-              this.$message.error(response.data.msg)
510
-              this.loadingtwo = false
511
-              return false
512
-            } else {
513
-              this.$message({ message: '退费成功', type: 'success' })
514
-              this.loadingtwo = false
515
 
510
 
511
+          this.$confirm('是否退费', '退费', {
512
+            confirmButtonText: '确 定',
513
+            cancelButtonText: '取 消',
514
+            type: 'warning'
515
+          }).then(() => {
516
+            let params = {
517
+              'order_id': this.order.id,
518
+              'number': this.order.number,
516
             }
519
             }
520
+            Refund(params).then(response => {
521
+              if (response.data.state == 0) {
522
+                this.$message.error(response.data.msg)
523
+                this.loadingtwo = false
524
+                return false
525
+              } else {
526
+                this.$message({ message: '退费成功', type: 'success' })
527
+                this.loadingtwo = false
528
+
529
+              }
530
+            })
531
+
532
+          }).catch(() => {
533
+
517
           })
534
           })
518
 
535
 
536
+
519
         } else if (index == 6) {
537
         } else if (index == 6) {
520
 
538
 
521
           if (this.patientInfo.id == 0) {
539
           if (this.patientInfo.id == 0) {
522
             this.$message.error('请先选择要挂号的病人')
540
             this.$message.error('请先选择要挂号的病人')
523
             return
541
             return
524
           }
542
           }
543
+
544
+
545
+
546
+
525
           let params = {
547
           let params = {
526
             'id': this.patientInfo.id,
548
             'id': this.patientInfo.id,
527
             'record_time': this.record_date
549
             'record_time': this.record_date
554
         // console.log(id)
576
         // console.log(id)
555
         // this.radioStatus = id
577
         // this.radioStatus = id
556
         // this.getPatientList()
578
         // this.getPatientList()
579
+        let temp_id = id
557
 
580
 
558
-        switch (id) {
559
-          case 1:
560
-                this.patientTableData = []
581
+        let params = {
582
+          'record_date': this.record_date
583
+        }
584
+        getSchedulePatientList(params).then(response => {
585
+          if (response.data.state == 0) {
586
+            this.$message.error(response.data.msg)
587
+            return false
588
+          } else {
589
+            this.patientTableData = []
590
+            this.all_table_data = []
591
+            let one_count = 0
592
+            let two_count = 0
593
+            let three_count = 0
594
+            for (let i = 0; i < response.data.data.list.length; i++) {
595
+              // console.log('99999999', response.data.data.list)
561
 
596
 
562
-            for (let i = 0; i < this.all_table_data.length; i++){
563
-              if(this.all_table_data[i].info.prescription_status == 0 || this.all_table_data[i].info.prescription_status == 1 || this.all_table_data[i].info.prescription_status == 2 ){
564
-                this.patientTableData.push(this.all_table_data[i])
597
+              if(response.data.data.list[i].info.prescription_status == 0 || response.data.data.list[i].info.prescription_status == 1 ||response.data.data.list[i].info.prescription_status == 2 ){
598
+                if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
599
+                  one_count = one_count + 1
600
+                  this.patientTableData.push(response.data.data.list[i])
601
+                }
565
               }
602
               }
566
 
603
 
567
-            }
568
-            break
569
-          case 2:
570
-            this.patientTableData = []
571
-            for (let i = 0; i < this.all_table_data.length; i++){
572
-              if(this.all_table_data[i].info.prescription_status == 3){
573
-                this.patientTableData.push(this.all_table_data[i])
604
+              if(response.data.data.list[i].info.prescription_status == 3){
605
+                if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
606
+
607
+                  two_count = two_count + 1
608
+                }
574
               }
609
               }
575
 
610
 
611
+              if(response.data.data.list[i].info.prescription_status == 4){
612
+                if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
613
+                  three_count = three_count + 1
614
+                }
615
+              }
576
 
616
 
617
+              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
618
+                this.all_table_data.push(response.data.data.list[i])
619
+              }
577
             }
620
             }
578
-            break
579
-          case 3:
580
-            this.patientTableData = []
581
 
621
 
582
-            for (let i = 0; i < this.all_table_data.length; i++){
622
+            this.cal_one = one_count
623
+            this.cal_two = two_count
624
+            this.cal_three = three_count
583
 
625
 
584
-              if(this.all_table_data[i].info.prescription_status == 4){
585
-                this.patientTableData.push(this.all_table_data[i])
586
-              }
626
+            switch (temp_id) {
627
+
628
+              case 1:
629
+                this.patientTableData = []
630
+
631
+                for (let i = 0; i < this.all_table_data.length; i++){
632
+                  if(this.all_table_data[i].info.prescription_status == 0 || this.all_table_data[i].info.prescription_status == 1 || this.all_table_data[i].info.prescription_status == 2 ){
633
+                    this.patientTableData.push(this.all_table_data[i])
634
+                  }
635
+
636
+                }
637
+                break
638
+              case 2:
639
+                this.patientTableData = []
640
+                for (let i = 0; i < this.all_table_data.length; i++){
641
+                  if(this.all_table_data[i].info.prescription_status == 3){
642
+                    this.patientTableData.push(this.all_table_data[i])
643
+                  }
644
+
645
+
646
+                }
647
+                break
648
+              case 3:
649
+                this.patientTableData = []
650
+
651
+                for (let i = 0; i < this.all_table_data.length; i++){
652
+
653
+                  if(this.all_table_data[i].info.prescription_status == 4){
654
+                    this.patientTableData.push(this.all_table_data[i])
655
+                  }
656
+
657
+                }
658
+                break
659
+              case 4:
660
+                this.patientTableData = []
661
+                this.patientTableData = this.all_table_data
662
+                break
587
 
663
 
588
             }
664
             }
589
-            break
590
-          case 4:
591
-            this.patientTableData = []
592
-            this.patientTableData = this.all_table_data
593
-            break
594
 
665
 
595
-        }
666
+            this.current_index = 0
667
+            this.$refs.tab.setCurrentRow(this.patientTableData[0])
668
+            this.getPatientInformation(this.patientTableData[0].patients.id,"")
669
+
670
+
671
+          }
672
+        })
673
+
674
+
596
 
675
 
597
 
676
 
598
 
677
 
699
 
778
 
700
               let tempAdvice = []
779
               let tempAdvice = []
701
               let tempProject = []
780
               let tempProject = []
781
+              let tempAddition = []
702
 
782
 
703
               for (let b = 0; b < prescription.advices.length; b++) {
783
               for (let b = 0; b < prescription.advices.length; b++) {
704
                 let obj = {
784
                 let obj = {
709
                   execution_frequency: prescription.advices[b].execution_frequency,
789
                   execution_frequency: prescription.advices[b].execution_frequency,
710
                   retail_price: prescription.advices[b].price.toString(),
790
                   retail_price: prescription.advices[b].price.toString(),
711
                   remark: prescription.advices[b].remark,
791
                   remark: prescription.advices[b].remark,
792
+                  day: prescription.advices[b].day,
712
                   prescribing_number: prescription.advices[b].prescribing_number.toString(),
793
                   prescribing_number: prescription.advices[b].prescribing_number.toString(),
713
                   single_dose_unit: prescription.advices[b].single_dose_unit,
794
                   single_dose_unit: prescription.advices[b].single_dose_unit,
714
                   prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
795
                   prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
736
                 }
817
                 }
737
                 tempProject.push(obj)
818
                 tempProject.push(obj)
738
               }
819
               }
820
+
821
+              for (let b = 0; b < prescription.addition.length; b++) {
822
+                let obj = {
823
+                  id: prescription.addition[b].id,
824
+                  item_name: prescription.addition[b].item_name,
825
+                  price: prescription.addition[b].price,
826
+                  count: prescription.addition[b].count,
827
+                  item_id: prescription.addition[b].item_id,
828
+                }
829
+                tempAddition.push(obj)
830
+              }
831
+
832
+
833
+
739
               let index = i + 1
834
               let index = i + 1
740
               let obj = {
835
               let obj = {
741
                 id: prescription.id,
836
                 id: prescription.id,
742
                 name: '处方' + index,
837
                 name: '处方' + index,
743
                 advices: tempAdvice,
838
                 advices: tempAdvice,
744
                 project: tempProject,
839
                 project: tempProject,
840
+                addition:tempAddition,
745
                 order_status: response.data.data.prescription[i].order_status,
841
                 order_status: response.data.data.prescription[i].order_status,
746
                 type: response.data.data.prescription[i].type
842
                 type: response.data.data.prescription[i].type
747
               }
843
               }

+ 218 - 24
src/xt_pages/outpatientCharges/summary.vue Ver fichero

6
     <div class="app-container">
6
     <div class="app-container">
7
       <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
7
       <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
         <div>
8
         <div>
9
-          <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input"
9
+          <el-input size="small" style="width:150px;"  v-model="keywords"
10
                     class="filter-item"/>
10
                     class="filter-item"/>
11
           <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
11
           <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
12
             搜索
12
             搜索
13
           </el-button>
13
           </el-button>
14
-          <el-select size="small" v-model="value" placeholder="请选择" style="width:150px;margin-left:10px;">
14
+          <el-select size="small" v-model="admin_user_id" placeholder="请选择" style="width:150px;margin-left:10px;" @change="changeDoctor">
15
             <el-option
15
             <el-option
16
-              v-for="item in options"
17
-              :key="item.value"
18
-              :label="item.label"
19
-              :value="item.value">
16
+              label="全部"
17
+              value="0">
18
+            </el-option>
19
+            <el-option
20
+              v-for="item,index in doctors"
21
+              :key="index"
22
+              :label="item.user_name"
23
+              :value="item.admin_user_id">
20
             </el-option>
24
             </el-option>
21
           </el-select>
25
           </el-select>
22
-          <el-date-picker size="small" v-model="selected_date" prefix-icon="el-icon-date"
23
-                          @change="handleScheduleDateChange" :editable="false" :clearable="false"
24
-                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择日期时间"
26
+          <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date"
27
+                          @change="handleStartTimeChange" :editable="false" :clearable="false"
28
+                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择开始日期"
29
+                          format="yyyy-MM-dd"
30
+                          value-format="yyyy-MM-dd"
31
+                          align="right"></el-date-picker>
32
+
33
+          <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date"
34
+                          @change="handleEndTimeChange" :editable="false" :clearable="false"
35
+                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择结束日期"
36
+                          format="yyyy-MM-dd"
37
+                          value-format="yyyy-MM-dd"
25
                           align="right"></el-date-picker>
38
                           align="right"></el-date-picker>
26
           <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
39
           <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
27
           <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
40
           <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
28
         </div>
41
         </div>
29
-        <!--<el-button size="small" type="primary">报表下载</el-button>-->
42
+        <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
30
       </div>
43
       </div>
31
       <el-table :data="tableData" border height="500" style="width: 100%;" :row-style="{ color: '#303133' }"
44
       <el-table :data="tableData" border height="500" style="width: 100%;" :row-style="{ color: '#303133' }"
32
                 :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
45
                 :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
38
           type="index"
51
           type="index"
39
         >
52
         >
40
         </el-table-column>
53
         </el-table-column>
41
-        <el-table-column align="center" prop="name" label="门诊/销售编号">
42
-          <template slot-scope="scope">{{ scope.row.number }}</template>
54
+        <el-table-column align="center" prop="name" label="门诊号">
55
+          <template slot-scope="scope">{{ scope.row.his_patient.number }}</template>
43
         </el-table-column>
56
         </el-table-column>
44
         <el-table-column align="center" prop="name" label="患者名字">
57
         <el-table-column align="center" prop="name" label="患者名字">
45
           <template slot-scope="scope">{{ scope.row.patient.name }}</template>
58
           <template slot-scope="scope">{{ scope.row.patient.name }}</template>
53
         <el-table-column align="center" prop="name" label="实收金额">
66
         <el-table-column align="center" prop="name" label="实收金额">
54
           <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
67
           <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
55
         </el-table-column>
68
         </el-table-column>
56
-        <el-table-column align="center" prop="name" label="舍入金额">
57
-          <template slot-scope="scope">{{scope.row.medfee_sumamt - scope.row.medfee_sumamt}}</template>
69
+        <el-table-column align="center" prop="name" label="科室">
70
+          <template slot-scope="scope">{{scope.row.p_info.department.name}}</template>
58
         </el-table-column>
71
         </el-table-column>
59
         <el-table-column align="center" prop="name" label="收费日期">
72
         <el-table-column align="center" prop="name" label="收费日期">
60
           <template slot-scope="scope">  {{getTimes(scope.row.settle_accounts_date)}}</template>
73
           <template slot-scope="scope">  {{getTimes(scope.row.settle_accounts_date)}}</template>
75
           </template>
88
           </template>
76
         </el-table-column>
89
         </el-table-column>
77
       </el-table>
90
       </el-table>
91
+      <el-pagination
92
+        @size-change="handleSizeChange"
93
+        @current-change="handleCurrentChange"
94
+        :page-sizes="[10, 50, 100]"
95
+        :page-size="10"
96
+        background
97
+        style="margin-top:20px;float: right"
98
+        layout="total, sizes, prev, pager, next, jumper"
99
+        :total="total"
100
+
101
+      >
102
+      </el-pagination>
78
     </div>
103
     </div>
104
+
105
+
79
   </div>
106
   </div>
80
 </template>
107
 </template>
81
 
108
 
82
 
109
 
83
 <script>
110
 <script>
84
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
111
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
85
-  import { getHisOrderList } from '@/api/his/his'
112
+  import { getHisOrderList,getDoctorList,getExportConsumeDetailList } from '@/api/his/his'
86
   import { uParseTime } from '@/utils/tools'
113
   import { uParseTime } from '@/utils/tools'
87
 
114
 
88
   export default {
115
   export default {
95
           { path: false, name: '门诊收费' },
122
           { path: false, name: '门诊收费' },
96
           { path: false, name: '项目消费明细汇总' }
123
           { path: false, name: '项目消费明细汇总' }
97
         ],
124
         ],
98
-        tableData: []
125
+        tableData: [],
126
+        limit:10,
127
+        page:1,
128
+        keywords:"",
129
+        start_time:"",
130
+        end_time:"",
131
+        total:"",
132
+        doctors:[],
133
+        admin_user_id:"",
134
+
99
       }
135
       }
100
     },
136
     },
101
     methods: {
137
     methods: {
138
+      export_detail(){
139
+        let params= {
140
+          start_time:this.start_time,
141
+          end_time: this.end_time,
142
+        }
143
+        getExportConsumeDetailList(params).then(response => {
144
+          if (response.data.state == 0) {
145
+            this.$message.error(response.data.msg)
146
+            return false
147
+          } else {
148
+
149
+            let list = []
150
+            for (let i =0; i < response.data.data.order.length; i++){
151
+            let order =   response.data.data.order[i]
152
+              let number = ""
153
+              let name = ""
154
+              let department = ""
155
+              let doctor_name = ""
156
+              let balance_accounts = ""
157
+
158
+              let order_status = ""
159
+
160
+
161
+
162
+              if(order.his_patient != null && order.his_patient.number.length > 0){
163
+                number = order.his_patient.number
164
+
165
+              }
166
+
167
+              if(order.his_patient != null ){
168
+                if(order.his_patient.balance_accounts_type == 1){
169
+                  balance_accounts = "自费"
170
+                }
171
+
172
+                if(order.his_patient.balance_accounts_type == 2){
173
+                  balance_accounts = "医保"
174
+                }
175
+              }
176
+
177
+              if(order.patient != null && order.patient.name.length > 0){
178
+                name = order.patient.name
179
+
180
+              }
181
+
182
+              if(order.p_info != null && order.p_info.department != null && order.p_info.department.name.length > 0){
183
+                department = order.p_info.department.name
184
+
185
+              }
186
+
187
+              if(order.p_info != null && order.p_info.doctor.length > 0){
188
+                doctor_name = order.p_info.doctor
189
+              }
190
+
191
+              if(order.order_status == 1){
192
+                order_status = "待结算"
193
+              }
194
+
195
+              if(order.order_status == 2){
196
+                order_status = "已结算"
197
+              }
198
+
199
+              if(order.order_status == 3){
200
+                order_status = "已退费"
201
+              }
202
+
203
+
204
+              let obj = {
205
+                "就诊号":number,
206
+                "患者姓名":name,
207
+                "应收金额":order.medfee_sumamt,
208
+                "实收金额":order.medfee_sumamt,
209
+                "科室":department,
210
+                "医生姓名":doctor_name,
211
+                "收费类别":balance_accounts,
212
+                "收费者姓名":doctor_name,
213
+                "总金额":order.medfee_sumamt,
214
+                "现金支付":"",
215
+                "账户支付":"",
216
+                "支付宝支付":"",
217
+                "微信支付":"",
218
+                "其他支付":"",
219
+                "收费日期":"",
220
+                "收费状态":order_status,
221
+                "退费日期":"",
222
+              }
223
+              list.push(obj)
224
+            }
225
+            import('@/vendor/Export2Excel').then(excel => {
226
+              const tHeader = ['就诊号', '患者姓名', '应收金额', '实收金额', '科室',"医生姓名","收费类别","收费者姓名","总金额","现金支付","账户支付","支付宝支付","微信支付","其他支付","收费日期","收费状态","退费日期"]
227
+              const filterVal = ['就诊号', '患者姓名', '应收金额', '实收金额', '科室',"医生姓名","收费类别","收费者姓名","总金额","现金支付","账户支付","支付宝支付","微信支付","其他支付","收费日期","收费状态","退费日期"]
228
+              const data = this.formatJson(filterVal, list)
229
+              excel.export_json_to_excel({
230
+                header: tHeader,
231
+                data,
232
+                filename: "消费明细"
233
+              })
234
+            })
235
+
236
+          }
237
+        })
238
+
239
+      },  formatJson(filterVal, jsonData) {
240
+        return jsonData.map(v => filterVal.map(j => v[j]))
241
+      },
242
+      changeDoctor(){
243
+        this.page = 1
244
+        this.keywords=""
245
+        this.getHisOrderList()
246
+      },
247
+      handleSizeChange(limit){
248
+        this.limit = limit;
249
+        this.getHisOrderList()
250
+
251
+      },handleCurrentChange(page){
252
+        this.page = page;
253
+        this.getHisOrderList()
254
+
255
+
256
+      },
257
+      handleStartTimeChange(){
258
+        this.page = 1
259
+        this.keywords=""
260
+        this.getHisOrderList()
261
+      },handleEndTimeChange(){
262
+        this.page = 1
263
+        this.keywords=""
264
+        this.getHisOrderList()
265
+      },
266
+      searchAction(){
267
+        this.page = 1
268
+        this.getHisOrderList()
269
+
270
+
271
+      },
102
       getTimes(time) {
272
       getTimes(time) {
103
         return uParseTime(time, "{y}-{m}-{d}");
273
         return uParseTime(time, "{y}-{m}-{d}");
104
       },
274
       },
109
           return uParseTime(value, temp)
279
           return uParseTime(value, temp)
110
         }
280
         }
111
         return ''
281
         return ''
282
+      },getHisOrderList(){
283
+        let params= {
284
+          page : this.page,
285
+          limit: this.limit,
286
+          keywords:this.keywords,
287
+          start_time:this.start_time,
288
+          end_time: this.end_time,
289
+          type: this.admin_user_id
290
+        }
291
+        getHisOrderList(params).then(response => {
292
+          if (response.data.state == 0) {
293
+            this.$message.error(response.data.msg)
294
+            return false
295
+          } else {
296
+            this.tableData = response.data.data.order
297
+            this.total = response.data.data.total
298
+          }
299
+        })
300
+
301
+      },getDoctorList(){
302
+        getDoctorList().then(response => {
303
+          if (response.data.state == 0) {
304
+            this.$message.error(response.data.msg)
305
+            return false
306
+          } else {
307
+            this.doctors = response.data.data.doctors
308
+          }
309
+        })
310
+
311
+
112
       }
312
       }
113
     }, created() {
313
     }, created() {
114
-      getHisOrderList().then(response => {
115
-        if (response.data.state == 0) {
116
-          this.$message.error(response.data.msg)
117
-          return false
118
-        } else {
119
-          this.tableData = response.data.data.order
314
+     this.getDoctorList()
315
+     this.getHisOrderList()
120
 
316
 
121
-        }
122
-      })
123
 
317
 
124
     }
318
     }
125
   }
319
   }

+ 127 - 42
src/xt_pages/outpatientCharges/summaryDetail.vue Ver fichero

7
             <div class="mainCenter">
7
             <div class="mainCenter">
8
                 <div class="centerLeft">
8
                 <div class="centerLeft">
9
                     <div class="tabsBox">
9
                     <div class="tabsBox">
10
-                      <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
11
-                        <el-tab-pane
12
-                          v-for="(item, index) in prescriptions"
13
-                          :key="index"
14
-                          :label="item.name"
15
-                          :name="item.name"
16
-                        >
17
-                        </el-tab-pane>
18
-
19
-                        <div class="RP">
20
-                          Rp
21
-                        </div>
22
-                        <prescription-table ref="prescription_tables"
23
-                                            :prescription="curPrescriptions"></prescription-table>
10
+                      <el-table  :data="tableData" border style="width: 99%;"
11
+                                :row-style="{ color: '#303133' }"
12
+                                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
13
+
14
+                        <el-table-column align="center" prop="project_name" label="名称">
15
+                          <template slot-scope="scope">{{ scope.row.name }}</template>
16
+                        </el-table-column>
17
+
18
+                        <el-table-column align="center" prop="project_name" label="分类">
19
+                          <template slot-scope="scope">{{ scope.row.type == 1?'药品':'项目' }}</template>
20
+                        </el-table-column>
21
+
22
+
23
+                        <el-table-column align="center" prop="statistical_classification" width="100" label="组">
24
+                          <template slot-scope="scope">
25
+                            {{getGroup(scope.row.statistical_classification)}}
26
+                          </template>
27
+                        </el-table-column>
28
+                        <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
29
+                          <template slot-scope="scope">
30
+                            <!--<el-input v-model="scope.row.single_dose" placeholder="" readonly></el-input>-->
31
+                            {{scope.row.single_dose}}{{scope.row.single_dose_unit}}
32
+                          </template>
33
+                        </el-table-column>
34
+                        <el-table-column align="center" prop="delivery_way" width="80" label="用法">
35
+                          <template slot-scope="scope">
36
+                            <!--<el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>-->
37
+                            {{scope.row.delivery_way}}
38
+
39
+                          </template>
40
+                        </el-table-column>
41
+                        <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
42
+                          <template slot-scope="scope">
43
+                            <!--<el-input v-model="scope.row.execution_frequency" placeholder="" readonly></el-input>-->
44
+                            {{scope.row.execution_frequency}}
24
 
45
 
25
-                      </el-tabs>
46
+                          </template>
47
+                        </el-table-column>
48
+                        <el-table-column align="center" prop="number_days" width="50" label="天数">
49
+                          <template slot-scope="scope">
50
+                            <!--<el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>-->
51
+                            {{scope.row.day}}
52
+
53
+                          </template>
54
+                        </el-table-column>
55
+                        <el-table-column align="center" prop="total" width="50" label="总量">
56
+                          <template slot-scope="scope">
57
+                            <div style="display:flex;">
58
+                              <!--<el-input v-model="scope.row.total" placeholder="" readonly></el-input>-->
59
+                              {{scope.row.count}}
60
+                              <div>{{scope.row.prescribing_number_unit}}</div>
61
+
62
+                            </div>
63
+                          </template>
64
+                        </el-table-column>
65
+                        <el-table-column align="center" prop="name" width="50" label="单价">
66
+                          <template slot-scope="scope">
67
+                            <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
68
+                            {{scope.row.price}}
69
+
70
+                          </template>
71
+                        </el-table-column>
72
+                        <el-table-column align="center" prop="name" width="50" label="备注">
73
+                          <template slot-scope="scope">
74
+                            <!--<el-input v-model="scope.row.remark" readonly></el-input>-->
75
+                            {{scope.row.remark}}
76
+
77
+                          </template>
78
+                        </el-table-column>
79
+                      </el-table>
80
+
81
+                      <div class="additionalBox">
82
+                        <div class="additionalOne" v-for="(item,index) in additions" :key="index">
83
+                          <span>{{item.item_name}}</span>
84
+                          <el-input v-model="item.price" placeholder="" style="width:50px;" readonly></el-input>
85
+                          共
86
+                          <el-input v-model="item.count" placeholder="" style="width:50px;" readonly></el-input>
87
+                          次
88
+                          <!--<i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>-->
89
+                        </div>
90
+                      </div>
26
 
91
 
27
                     </div>
92
                     </div>
28
                     <div class="costBox">
93
                     <div class="costBox">
68
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
133
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
69
 import { getHisOrder } from '@/api/his/his'
134
 import { getHisOrder } from '@/api/his/his'
70
 import prescriptionTable from './components/prescriptionTable'
135
 import prescriptionTable from './components/prescriptionTable'
136
+import { getDictionaryDataConfig} from "@/utils/data";
71
 
137
 
72
 export default {
138
 export default {
73
     components:{
139
     components:{
86
           prescriptions: [],
152
           prescriptions: [],
87
           record_date: '',
153
           record_date: '',
88
           tableData: [],
154
           tableData: [],
155
+          additions:[],
89
           editableTabsValue: '1',
156
           editableTabsValue: '1',
90
           loadingone: false,
157
           loadingone: false,
91
           editableTabs: [{
158
           editableTabs: [{
111
     },created(){
178
     },created(){
112
       this.GetOrderDetail()
179
       this.GetOrderDetail()
113
   },methods:{
180
   },methods:{
114
-
181
+    getDictionaryDataConfig(module, filed_name) {
182
+      return getDictionaryDataConfig(module, filed_name)
183
+    },
115
     tabclickEvent(val) {
184
     tabclickEvent(val) {
116
       for (let i = 0; i < this.prescriptions.length; i++) {
185
       for (let i = 0; i < this.prescriptions.length; i++) {
117
         if (this.prescriptions[i].name == val.name) {
186
         if (this.prescriptions[i].name == val.name) {
134
         }
203
         }
135
       })
204
       })
136
       return targetObj
205
       return targetObj
206
+    },  getGroup(id){
207
+      var name = ""
208
+      var statistics_category =  getDictionaryDataConfig('system','statistics_category')
209
+      console.log("2235",statistics_category)
210
+      for(let i=0;i<statistics_category.length;i++){
211
+        if(id == statistics_category[i].id){
212
+          name = statistics_category[i].name
213
+        }
214
+      }
215
+      return name
137
     },
216
     },
138
     getTotal() {
217
     getTotal() {
139
       var total = 0
218
       var total = 0
172
           this.order = response.data.data.order
251
           this.order = response.data.data.order
173
 
252
 
174
           this.prescriptions = []
253
           this.prescriptions = []
254
+          this.tableData = []
255
+
175
           for (let i = 0; i < response.data.data.prescription.length; i++) {
256
           for (let i = 0; i < response.data.data.prescription.length; i++) {
176
             var prescription = response.data.data.prescription[i]
257
             var prescription = response.data.data.prescription[i]
177
 
258
 
178
-            let tempAdvice = []
179
-            let tempProject = []
180
 
259
 
181
             for (let b = 0; b < prescription.advices.length; b++) {
260
             for (let b = 0; b < prescription.advices.length; b++) {
182
               let obj = {
261
               let obj = {
183
-                advice_id: prescription.advices[b].id,
184
-                drug_name: prescription.advices[b].advice_name,
262
+                name: prescription.advices[b].advice_name,
263
+                statistical_classification:"",
264
+                type:1,
185
                 single_dose: prescription.advices[b].single_dose,
265
                 single_dose: prescription.advices[b].single_dose,
186
                 delivery_way: prescription.advices[b].delivery_way,
266
                 delivery_way: prescription.advices[b].delivery_way,
187
                 execution_frequency: prescription.advices[b].execution_frequency,
267
                 execution_frequency: prescription.advices[b].execution_frequency,
188
-                retail_price: prescription.advices[b].price.toString(),
268
+                price: prescription.advices[b].price.toString(),
269
+                day: prescription.advices[b].day,
270
+                count:prescription.advices[b].prescribing_number.toString(),
189
                 remark: prescription.advices[b].remark,
271
                 remark: prescription.advices[b].remark,
190
-                prescribing_number: prescription.advices[b].prescribing_number.toString(),
191
                 single_dose_unit: prescription.advices[b].single_dose_unit,
272
                 single_dose_unit: prescription.advices[b].single_dose_unit,
192
                 prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
273
                 prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
193
-                min_unit: prescription.advices[b].single_dose_unit,
194
-                medical_insurance_number: prescription.advices[b].med_list_codg
195
 
274
 
196
               }
275
               }
197
-              tempAdvice.push(obj)
276
+              this.tableData.push(obj)
198
             }
277
             }
199
 
278
 
200
             for (let b = 0; b < prescription.project.length; b++) {
279
             for (let b = 0; b < prescription.project.length; b++) {
201
-              console.log(prescription.project[b].project.project_name)
202
               let obj = {
280
               let obj = {
203
-                id: prescription.project[b].id,
204
-                project_id: prescription.project[b].project.id,
205
-                project_name: prescription.project[b].project.project_name,
281
+                name: prescription.project[b].project.project_name,
206
                 statistical_classification: prescription.project[b].project.statistical_classification,
282
                 statistical_classification: prescription.project[b].project.statistical_classification,
207
                 single_dose: prescription.project[b].single_dose,
283
                 single_dose: prescription.project[b].single_dose,
208
                 delivery_way: prescription.project[b].delivery_way,
284
                 delivery_way: prescription.project[b].delivery_way,
209
                 execution_frequency: prescription.project[b].execution_frequency,
285
                 execution_frequency: prescription.project[b].execution_frequency,
210
-                number_days: prescription.project[b].day,
211
-                total: prescription.project[b].count.toString(),
212
                 price: prescription.project[b].price,
286
                 price: prescription.project[b].price,
287
+                day: prescription.project[b].day,
288
+                count: prescription.project[b].count.toString(),
213
                 remark: prescription.project[b].remark,
289
                 remark: prescription.project[b].remark,
214
-                medical_code: prescription.project[b].project.medical_code
290
+                single_dose_unit:"",
291
+                prescribing_number_unit:"",
292
+                type:2,
215
               }
293
               }
216
-              tempProject.push(obj)
294
+              this.tableData.push(obj)
217
             }
295
             }
218
-            let index = i + 1
219
-            let obj = {
220
-              id: prescription.id,
221
-              name: '处方' + index,
222
-              advices: tempAdvice,
223
-              project: tempProject,
224
-              type: response.data.data.prescription[i].type
296
+
297
+            for (let b = 0; b < prescription.addition.length; b++) {
298
+                this.additions.push( prescription.addition[b])
225
             }
299
             }
226
-            this.prescriptions.push(obj)
227
-            this.curPrescriptions = this.prescriptions[0]
300
+
301
+
302
+
303
+            // let index = i + 1
304
+            // let obj = {
305
+            //   id: prescription.id,
306
+            //   name: '处方' + index,
307
+            //   advices: tempAdvice,
308
+            //   project: tempProject,
309
+            //   type: response.data.data.prescription[i].type
310
+            // }
311
+            // this.prescriptions.push(obj)
312
+            // this.curPrescriptions = this.prescriptions[0]
228
 
313
 
229
           }
314
           }
230
           // this.tableData = response.data.data.order
315
           // this.tableData = response.data.data.order

BIN
src/xt_pages/outpatientDoctorStation/.DS_Store Ver fichero


+ 12 - 37
src/xt_pages/outpatientDoctorStation/components/additionalCharges.vue Ver fichero

11
               @select='selectDrugs'>
11
               @select='selectDrugs'>
12
       <el-table-column align="center" type="selection" width="40"></el-table-column>
12
       <el-table-column align="center" type="selection" width="40"></el-table-column>
13
       <el-table-column align="center" prop="name" label="名称" width="100">
13
       <el-table-column align="center" prop="name" label="名称" width="100">
14
-        <template slot-scope="scope">{{ scope.row.name }}</template>
14
+        <template slot-scope="scope">{{ scope.row.item_name }}</template>
15
       </el-table-column>
15
       </el-table-column>
16
       <el-table-column align="center" prop="name" label="金额(元)">
16
       <el-table-column align="center" prop="name" label="金额(元)">
17
         <template slot-scope="scope">
17
         <template slot-scope="scope">
33
     props: {
33
     props: {
34
       hisPatientInfo: Object,
34
       hisPatientInfo: Object,
35
       patientInfo: Object,
35
       patientInfo: Object,
36
-      additions: Array,
37
-      addtions_charge: Array
36
+      additions: Array
38
 
37
 
39
     },
38
     },
40
     data() {
39
     data() {
61
         this.chargeTable = []
60
         this.chargeTable = []
62
        
61
        
63
         this.visible = true
62
         this.visible = true
64
-        if (this.addtions_charge == null || this.addtions_charge.length == 0) {
65
-          for (let i = 0; i < this.additions.length; i++) {
66
-            let obj = {
67
-              id: '0',
68
-              item_id: this.additions[i].id.toString(),
69
-              name: this.additions[i].name,
70
-              price: this.additions[i].price.toString()
71
-            }
72
-            this.chargeTable.push(obj)
73
-          }
74
-        } else {
75
-
76
-          for (let i = 0; i < this.addtions_charge.length; i++) {
77
-            let obj = {
78
-              id: this.addtions_charge[i].id.toString(),
79
-              item_id: this.addtions_charge[i].item_id.toString(),
80
-              name: this.addtions_charge[i].item_name,
81
-              price: this.addtions_charge[i].price.toString()
82
-            }
83
-            this.chargeTable.push(obj)
63
+        for (let i = 0; i < this.additions.length; i++) {
64
+          let obj = {
65
+            id: '0',
66
+            item_id: this.additions[i].id,
67
+            item_name: this.additions[i].name,
68
+            price: this.additions[i].price,
69
+            count: this.additions[i].count,
84
           }
70
           }
71
+          this.chargeTable.push(obj)
85
         }
72
         }
73
+
86
       },
74
       },
87
       hide() {
75
       hide() {
88
         this.visible = false
76
         this.visible = false
91
         this.charges = val
79
         this.charges = val
92
       },
80
       },
93
       submitAction() {
81
       submitAction() {
94
-        var params = {
95
-          his_patient_id: this.hisPatientInfo.id,
96
-          patient_id: this.patientInfo.id,
97
-          medicineData: this.charges
98
-        }
99
-        saveCharges(params).then(response => {
100
-          if (response.data.state == 1) {
101
-            var data = response.data.data.additional_charges
102
-            this.$emit('setData', data)
103
-            this.$message.success('保存成功')
104
-            this.visible = false
105
-
106
-          }
107
-        })
82
+        this.$emit('setData', this.charges)
108
       }
83
       }
109
     },
84
     },
110
     watch: {
85
     watch: {

+ 114 - 50
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Ver fichero

145
                           <el-table-column label="规格" width="60">
145
                           <el-table-column label="规格" width="60">
146
                             <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
146
                             <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
147
                           </el-table-column>
147
                           </el-table-column>
148
+                          <el-table-column label="库存" width="60">
149
+                            <template slot-scope="scope">{{
150
+                              stockInCount(scope.row) -
151
+                              salesReturnCount(scope.row) -
152
+                              stockOutCount(scope.row) +
153
+                              cancelStockCount(scope.row)
154
+                              }}</template>
155
+                          </el-table-column>
148
                           <el-table-column label="单价" width="40">
156
                           <el-table-column label="单价" width="40">
149
                             <template slot-scope="scope">{{ scope.row.retail_price }}</template>
157
                             <template slot-scope="scope">{{ scope.row.retail_price }}</template>
150
                           </el-table-column>
158
                           </el-table-column>
253
       </div>
261
       </div>
254
     </div>
262
     </div>
255
     <additionalCharges   v-on:setData="setCharge" ref='additionalCharges' :hisPatientInfo="hisPatientInfo"
263
     <additionalCharges   v-on:setData="setCharge" ref='additionalCharges' :hisPatientInfo="hisPatientInfo"
256
-                       :patientInfo="patientInfo" :additions="additions" :addtions_charge="addtions_charge"></additionalCharges>
264
+                       :patientInfo="patientInfo" :additions="additions" ></additionalCharges>
257
     <select-template ref='selectTemplate'></select-template>
265
     <select-template ref='selectTemplate'></select-template>
258
     <save-template ref='saveTemplate'></save-template>
266
     <save-template ref='saveTemplate'></save-template>
259
   </div>
267
   </div>
282
       prescriptions: Array,
290
       prescriptions: Array,
283
       record_date: String,
291
       record_date: String,
284
       search_keyword: '',
292
       search_keyword: '',
285
-      addtions_charge:Array,
293
+      addtions_charge: {
294
+        type: Array,
295
+        default: []
296
+      },
286
 
297
 
287
       other_sick: {
298
       other_sick: {
288
         type: Array,
299
         type: Array,
302
     data() {
313
     data() {
303
       return {
314
       return {
304
         register_type: '',
315
         register_type: '',
305
-        value: '',
316
+        value: '0',
306
         form: {
317
         form: {
307
           name: ''
318
           name: ''
308
         },
319
         },
315
           title: '处方1',
326
           title: '处方1',
316
           name: '1'
327
           name: '1'
317
         }],
328
         }],
318
-        tabIndex: 1,
329
+        tabIndex: this.prescriptions.length,
319
         currenet_inedx: 0,
330
         currenet_inedx: 0,
320
         rightTab: 1,
331
         rightTab: 1,
321
         activeName: '1',
332
         activeName: '1',
355
       }
366
       }
356
     },
367
     },
357
     methods: {
368
     methods: {
358
-      setCharge(additional_charges){
359
-        console.log("111122222")
360
-        this.addtions_charge = additional_charges
361
-        console.log(this.addtions_charge )
369
+      stockInCount: function(row) {
370
+        let total = 0;
371
+        if(row.stock_in != null) {
372
+          for (let i = 0; i < row.stock_in.length; i++) {
373
+            total = total + row.stock_in[i].warehousing_count;
374
+          }
375
+        }
376
+        return total;
377
+      },
378
+      salesReturnCount: function(row) {
379
+        let total = 0;
380
+        if(row.sales_return != null) {
362
 
381
 
382
+          for (let i = 0; i < row.sales_return.length; i++) {
383
+            total = total + row.sales_return[i].count;
384
+          }
385
+        }
386
+        return total;
387
+      },
388
+      stockOutCount: function(row) {
389
+        let total = 0;
390
+        if(row.stock_out != null) {
391
+
392
+          for (let i = 0; i < row.stock_out.length; i++) {
393
+            total = total + row.stock_out[i].count;
394
+          }
395
+        }
396
+        return total;
397
+      },
398
+      cancelStockCount: function(row) {
399
+        let total = 0;
400
+        if(row.cancel_stock != null) {
401
+          for (let i = 0; i < row.cancel_stock.length; i++) {
402
+            total = total + row.cancel_stock[i].count;
403
+          }
404
+        }
405
+        return total;
406
+      },
407
+
408
+      setCharge(additional_charges){
409
+        for (let i = 0; i < additional_charges.length; i++){
410
+          additional_charges[i].count = 1
411
+          this.curPrescriptions.addition.push(additional_charges[i])
412
+        }
413
+        this.$refs.additionalCharges.hide()
363
 
414
 
364
       },
415
       },
365
       searchAction() {
416
       searchAction() {
394
                 total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total
445
                 total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total
395
               }
446
               }
396
             }
447
             }
448
+
449
+            if (this.prescriptions[i].addition != null) {
450
+              for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
451
+                total = total + this.prescriptions[i].addition[b].price * this.prescriptions[i].addition[b].count
452
+              }
453
+            }
454
+
455
+
456
+
397
             total =  Math.floor(total * 100) / 100
457
             total =  Math.floor(total * 100) / 100
398
           }
458
           }
399
         }
459
         }
402
       }, 
462
       }, 
403
       getCurTotal() {
463
       getCurTotal() {
404
         var total = 0
464
         var total = 0
405
-        console.log(this.editableTabsValue)
406
 
465
 
407
         if(this.curPrescriptions.type == 1) {
466
         if(this.curPrescriptions.type == 1) {
408
           for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
467
           for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
430
               total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total
489
               total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total
431
             }
490
             }
432
           }
491
           }
433
-        }
434
-        if(this.addtions_charge != null) {
435
-          for (let i = 0; i < this.addtions_charge.length; i++) {
436
-            total = total + this.addtions_charge[i].price
492
+
493
+          if (this.prescriptions[i].addition != null) {
494
+            for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
495
+              total = total + this.prescriptions[i].addition[b].price * this.prescriptions[i].addition[b].count
496
+            }
437
           }
497
           }
438
         }
498
         }
499
+
439
         return Math.floor(total * 100) / 100
500
         return Math.floor(total * 100) / 100
440
       },
501
       },
441
       createFilter(queryString) {
502
       createFilter(queryString) {
494
             this.department = response.data.data.department
555
             this.department = response.data.data.department
495
             this.sick = response.data.data.sick
556
             this.sick = response.data.data.sick
496
             this.additions = response.data.data.additions
557
             this.additions = response.data.data.additions
497
-
498
             var info = response.data.data.info
558
             var info = response.data.data.info
499
-
500
-            if (this.$store.getters.xt_user.user.user_type == 2 || this.$store.getters.xt_user.user.user_type == 1) {
501
-              console.log('11111')
502
-              this.doctorValue = this.$store.getters.xt_user.user.id
503
-            } else {
504
-              console.log('222222')
505
-
506
-              this.doctorValue = this.doctors[0].admin_user_id
507
-            }
508
-
509
             if (info.user_type == 2 || info.user_type == 1) {
559
             if (info.user_type == 2 || info.user_type == 1) {
510
-
511
-
512
               this.doctorValue = info.admin_user_id
560
               this.doctorValue = info.admin_user_id
513
-
514
-
515
               if (info.department_id == 0) {
561
               if (info.department_id == 0) {
516
-
517
                 if (this.department.length > 0) {
562
                 if (this.department.length > 0) {
518
                   this.departmentValue = this.department[0].id
563
                   this.departmentValue = this.department[0].id
519
                 } else {
564
                 } else {
520
                   this.departmentValue = ''
565
                   this.departmentValue = ''
566
+
521
                 }
567
                 }
522
               } else {
568
               } else {
523
                 this.departmentValue = info.department_id
569
                 this.departmentValue = info.department_id
524
               }
570
               }
525
             }else{
571
             }else{
526
               this.doctorValue = this.doctors[0].admin_user_id
572
               this.doctorValue = this.doctors[0].admin_user_id
527
-
528
             }
573
             }
529
-
530
           }
574
           }
531
         })
575
         })
532
 
576
 
580
         this.teamList = []
624
         this.teamList = []
581
 
625
 
582
       },
626
       },
583
-      setData(data, info,addition_charge) {
584
-        this.addition_charge = addition_charge
627
+      setData(data, info) {
585
         this.prescription_id = data[0].id
628
         this.prescription_id = data[0].id
586
-
587
-        console.log('99999999', data[0].id)
629
+        this.editableTabsValue = "处方1"
588
         this.$emit('event1', this.prescription_id)
630
         this.$emit('event1', this.prescription_id)
589
         this.curStatus = 0
631
         this.curStatus = 0
590
         this.prescriptions = data
632
         this.prescriptions = data
591
         this.curPrescriptions = this.prescriptions[0]
633
         this.curPrescriptions = this.prescriptions[0]
634
+        console.log( this.curPrescriptions)
592
 
635
 
593
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
636
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
594
           this.curStatus = 1
637
           this.curStatus = 1
610
         this.state1 = info.diagnosis
653
         this.state1 = info.diagnosis
611
         this.state2 = info.sick_history
654
         this.state2 = info.sick_history
612
         this.doctorValue = info.doctor_id
655
         this.doctorValue = info.doctor_id
613
-        this.departmentValue = info.departments
656
+        this.departmentValue = info.departmentValue
657
+
658
+        if(this.doctorValue == 0){
659
+
660
+        }
661
+
614
         this.register_type = info.register_type
662
         this.register_type = info.register_type
615
 
663
 
616
         if (info.prescription_status == 1 || info.prescription_status == 2) {
664
         if (info.prescription_status == 1 || info.prescription_status == 2) {
637
         }
685
         }
638
       },
686
       },
639
       open(index) {
687
       open(index) {
640
-        if (this.curPrescriptions.order_status >= 2) {
641
-          this.$message.error('当前处方处于结算或者退费状态,无法保存')
688
+        if (this.curPrescriptions.order_status == 2) {
689
+          this.$message.error('当前处方已经结算,无法保存')
642
           return
690
           return
643
         }
691
         }
644
         if (this.doctorValue.length <= 0) {
692
         if (this.doctorValue.length <= 0) {
670
             if (this.prescriptions[i].advices.length == 0 && this.prescriptions[i].project.length > 0) {
718
             if (this.prescriptions[i].advices.length == 0 && this.prescriptions[i].project.length > 0) {
671
               this.prescriptions[i]['type'] = 2
719
               this.prescriptions[i]['type'] = 2
672
             }
720
             }
721
+
722
+
673
             for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
723
             for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
674
               this.prescriptions[i].advices[b].single_dose = this.prescriptions[i].advices[b].single_dose.toString()
724
               this.prescriptions[i].advices[b].single_dose = this.prescriptions[i].advices[b].single_dose.toString()
675
               this.prescriptions[i].advices[b].prescribing_number = this.prescriptions[i].advices[b].prescribing_number.toString()
725
               this.prescriptions[i].advices[b].prescribing_number = this.prescriptions[i].advices[b].prescribing_number.toString()
676
               this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
726
               this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
727
+              this.prescriptions[i].advices[b].day = parseInt(this.prescriptions[i].advices[b].day)
677
 
728
 
678
             }
729
             }
679
 
730
 
680
             for (let b = 0; b < this.prescriptions[i].project.length; b++) {
731
             for (let b = 0; b < this.prescriptions[i].project.length; b++) {
681
               this.prescriptions[i].project[b].price = parseFloat(this.prescriptions[i].project[b].price)
732
               this.prescriptions[i].project[b].price = parseFloat(this.prescriptions[i].project[b].price)
733
+              this.prescriptions[i].project[b].total = this.prescriptions[i].project[b].total.toString()
734
+            }
682
 
735
 
736
+            for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
737
+              this.prescriptions[i].addition[b].id = parseInt(this.prescriptions[i].addition[b].id)
738
+              this.prescriptions[i].addition[b].item_id = parseInt(this.prescriptions[i].addition[b].item_id)
739
+              this.prescriptions[i].addition[b].price = parseFloat(this.prescriptions[i].addition[b].price)
740
+              this.prescriptions[i].addition[b].count = this.prescriptions[i].addition[b].count.toString()
683
             }
741
             }
684
           }
742
           }
685
           let data = {
743
           let data = {
709
           return
767
           return
710
         }
768
         }
711
 
769
 
770
+        this.tabIndex = this.prescriptions.length
771
+
712
         ++this.tabIndex
772
         ++this.tabIndex
713
         let newTabName = '处方' + this.tabIndex
773
         let newTabName = '处方' + this.tabIndex
714
         this.prescriptions.push({
774
         this.prescriptions.push({
716
           name: newTabName,
776
           name: newTabName,
717
           order_status: 0,
777
           order_status: 0,
718
           advices: [],
778
           advices: [],
719
-          project: []
779
+          project: [],
780
+          addition:[]
720
 
781
 
721
         })
782
         })
722
         this.editableTabsValue = newTabName
783
         this.editableTabsValue = newTabName
820
             })
881
             })
821
           }
882
           }
822
 
883
 
884
+        }).catch(() => {
885
+
823
         })
886
         })
824
-          .catch(() => {
825
-          })
826
 
887
 
827
       },
888
       },
828
       clickTab(tab) {
889
       clickTab(tab) {
924
           }
985
           }
925
         }
986
         }
926
 
987
 
927
-        console.log(this.curDrugs)
928
-        console.log(this.curPrescriptions.advices)
929
 
988
 
930
         for (let i = 0; i < this.curDrugs.length; i++) {
989
         for (let i = 0; i < this.curDrugs.length; i++) {
931
           for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
990
           for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
941
           if (this.prescriptions[i].name == this.editableTabsValue) {
1000
           if (this.prescriptions[i].name == this.editableTabsValue) {
942
             var temp = this.deepClone(this.curDrugs)
1001
             var temp = this.deepClone(this.curDrugs)
943
             var temp2 = this.deepClone(this.teamList)
1002
             var temp2 = this.deepClone(this.teamList)
944
-
945
-            console.log(temp2)
946
             if (temp.length > 0) {
1003
             if (temp.length > 0) {
947
               for (let b = 0; b < temp.length; b++) {
1004
               for (let b = 0; b < temp.length; b++) {
948
                 let obj = {
1005
                 let obj = {
954
                   execution_frequency: temp[b].execution_frequency,
1011
                   execution_frequency: temp[b].execution_frequency,
955
                   retail_price: temp[b].retail_price.toString(),
1012
                   retail_price: temp[b].retail_price.toString(),
956
                   remark: '',
1013
                   remark: '',
1014
+                  day:'',
957
                   prescribing_number: temp[b].prescribing_number,
1015
                   prescribing_number: temp[b].prescribing_number,
958
                   single_dose_unit: temp[b].min_unit,
1016
                   single_dose_unit: temp[b].min_unit,
959
                   prescribing_number_unit: temp[b].max_unit,
1017
                   prescribing_number_unit: temp[b].max_unit,
960
                   medical_insurance_number: temp[b].medical_insurance_number
1018
                   medical_insurance_number: temp[b].medical_insurance_number
961
 
1019
 
962
                 }
1020
                 }
1021
+
1022
+                if(obj.prescribing_number == 0 || obj.prescribing_number.length  == 0){
1023
+                  obj.prescribing_number = 1
1024
+                }
963
                 this.prescriptions[i].advices.push(obj)
1025
                 this.prescriptions[i].advices.push(obj)
964
               }
1026
               }
965
               this.curStatus = 1
1027
               this.curStatus = 1
979
                   total: temp2[b].total,
1041
                   total: temp2[b].total,
980
                   price: temp2[b].price,
1042
                   price: temp2[b].price,
981
                   remark: '',
1043
                   remark: '',
982
-                  medical_code: temp2[b].medical_code
1044
+                  medical_code: temp2[b].medical_code,
1045
+                  unit:temp2[b].unit
1046
+                }
1047
+                if(obj.total == 0 ){
1048
+                  obj.total = 1
983
                 }
1049
                 }
984
-                console.log(obj)
985
                 this.prescriptions[i].project.push(obj)
1050
                 this.prescriptions[i].project.push(obj)
986
               }
1051
               }
987
               this.curStatus = 2
1052
               this.curStatus = 2
1079
           }
1144
           }
1080
         }
1145
         }
1081
       }
1146
       }
1082
-    },
1083
-    created() {
1147
+    },mounted(){
1084
       this.getInitData()
1148
       this.getInitData()
1085
       //获取所有项目
1149
       //获取所有项目
1086
       this.getlist()
1150
       this.getlist()
1087
       //获取所以项目组套
1151
       //获取所以项目组套
1088
       this.getAllProjectTeam()
1152
       this.getAllProjectTeam()
1089
 
1153
 
1090
-    }
1091
 
1154
 
1155
+    },
1092
   }
1156
   }
1093
 </script>
1157
 </script>
1094
 
1158
 

+ 0 - 9
src/xt_pages/outpatientDoctorStation/components/inquiriesDetail.vue Ver fichero

53
             <span style="width:200px;">血压:{{case_history.sbp}}~{{case_history.dbp}} mmHg</span>
53
             <span style="width:200px;">血压:{{case_history.sbp}}~{{case_history.dbp}} mmHg</span>
54
           </div>
54
           </div>
55
         </div>
55
         </div>
56
-        <div class="commonCell">
57
-          <p></p>
58
-          <div class="detailMain">
59
-            <span style="width:140px;">血糖:{{case_history.blood_sugar}} mmol/L</span>
60
-            <span style="width:140px;">血脂:{{case_history.blood_fat}} mmol/L</span>
61
-            <span style="width:140px;">身高:{{case_history.height}} cm</span>
62
-            <span style="width:200px;">体重: kg</span>
63
-          </div>
64
-        </div>
65
         <div class="commonCell">
56
         <div class="commonCell">
66
           <p>主诉</p>
57
           <p>主诉</p>
67
           <div>{{case_history.chief_conplaint}}</div>
58
           <div>{{case_history.chief_conplaint}}</div>

+ 62 - 16
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue Ver fichero

2
   <div class="prescriptionTable">
2
   <div class="prescriptionTable">
3
     <el-table v-if="activeType  == 1" :data="prescription.advices" border style="width: 99%;" :row-style="{ color: '#303133' }"
3
     <el-table v-if="activeType  == 1" :data="prescription.advices" border style="width: 99%;" :row-style="{ color: '#303133' }"
4
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
4
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
5
+      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
5
       <el-table-column align="center" prop="drug_name" label="名称">
6
       <el-table-column align="center" prop="drug_name" label="名称">
6
         <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span></template>
7
         <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span></template>
7
       </el-table-column>
8
       </el-table-column>
39
         </template>
40
         </template>
40
       </el-table-column>
41
       </el-table-column>
41
 
42
 
43
+
44
+      <el-table-column align="center" prop="day" width="50" label="天数">
45
+        <template slot-scope="scope">
46
+          <el-input v-model="scope.row.day" placeholder=""></el-input>
47
+        </template>
48
+      </el-table-column>
49
+
42
       <el-table-column align="center" prop="prescribing_number" width="80" label="总量">
50
       <el-table-column align="center" prop="prescribing_number" width="80" label="总量">
43
         <template slot-scope="scope">
51
         <template slot-scope="scope">
44
           <div style="display:flex;align-items:center;">
52
           <div style="display:flex;align-items:center;">
49
       </el-table-column>
57
       </el-table-column>
50
       <el-table-column align="center" prop="retail_price" width="60" label="单价">
58
       <el-table-column align="center" prop="retail_price" width="60" label="单价">
51
         <template slot-scope="scope">
59
         <template slot-scope="scope">
52
-          <el-input v-model="scope.row.retail_price" placeholder=""></el-input>
60
+          <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
53
         </template>
61
         </template>
54
       </el-table-column>
62
       </el-table-column>
55
       <el-table-column align="center" prop="remark" width="50" label="备注">
63
       <el-table-column align="center" prop="remark" width="50" label="备注">
66
 
74
 
67
     <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 99%;" :row-style="{ color: '#303133' }"
75
     <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 99%;" :row-style="{ color: '#303133' }"
68
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
76
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
69
-      <!-- <el-table-column align="center" type="index" width="40" label="序号"></el-table-column> -->
77
+       <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
70
       <el-table-column align="center" prop="project_name" label="名称">
78
       <el-table-column align="center" prop="project_name" label="名称">
71
         <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
79
         <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
72
       </el-table-column>
80
       </el-table-column>
97
         <template slot-scope="scope">
105
         <template slot-scope="scope">
98
           <div style="display:flex;">
106
           <div style="display:flex;">
99
             <el-input v-model="scope.row.total" style="width:50" placeholder=""></el-input>
107
             <el-input v-model="scope.row.total" style="width:50" placeholder=""></el-input>
108
+            <div>{{scope.row.unit}}</div>
109
+
100
           </div>
110
           </div>
101
         </template>
111
         </template>
102
       </el-table-column>
112
       </el-table-column>
103
       <el-table-column align="center" prop="name" width="50" label="单价">
113
       <el-table-column align="center" prop="name" width="50" label="单价">
104
         <template slot-scope="scope">
114
         <template slot-scope="scope">
105
-          <el-input v-model="scope.row.price" placeholder=""></el-input>
115
+          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
106
         </template>
116
         </template>
107
       </el-table-column>
117
       </el-table-column>
108
       <el-table-column align="center" prop="name" width="50" label="备注">
118
       <el-table-column align="center" prop="name" width="50" label="备注">
117
       </el-table-column>
127
       </el-table-column>
118
     </el-table>
128
     </el-table>
119
 
129
 
120
-    <!--<div class="additionalBox">-->
121
-      <!--<div class="additionalOne" v-for="(item,index) in 8" :key="index">-->
122
-        <!--<span>治疗费</span>-->
123
-        <!--<el-input v-model="input" placeholder="" style="width:50px;"></el-input>-->
124
-        <!---->
125
-        <!--<el-input v-model="input" placeholder="" style="width:50px;"></el-input>-->
126
-        <!---->
127
-        <!--<i class="el-icon-delete deleteIcon"></i>-->
128
-      <!--</div>-->
129
-    <!--</div>-->
130
+    <div class="additionalBox">
131
+      <div class="additionalOne" v-for="(item,index) in prescription.addition" :key="index">
132
+        <span>{{item.item_name}}</span>
133
+        <el-input v-model="item.price" placeholder="" style="width:50px;"></el-input>
134
+        共
135
+        <el-input v-model="item.count" placeholder="" style="width:50px;"></el-input>
136
+        次
137
+        <i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>
138
+      </div>
139
+    </div>
130
 
140
 
131
 
141
 
132
 
142
 
135
 
145
 
136
 <script>
146
 <script>
137
   import { getDictionaryDataConfig} from "@/utils/data";
147
   import { getDictionaryDataConfig} from "@/utils/data";
138
-  import { getInitData,delHisAdvice,delHisProject } from '@/api/his/his'
148
+  import { getInitData,delHisAdvice,delHisProject,delHisAddition } from '@/api/his/his'
139
 
149
 
140
   export default {
150
   export default {
141
     props: {
151
     props: {
142
       preDrugs: Array,
152
       preDrugs: Array,
143
       activeType: Number,
153
       activeType: Number,
154
+      addtions_charge:Array,
144
       prescription:{
155
       prescription:{
145
         type:Object,
156
         type:Object,
146
         default: function () {
157
         default: function () {
179
       }
190
       }
180
     },
191
     },
181
    methods:{
192
    methods:{
193
+     delAddition(index, addition){
194
+       if(this.prescription.order_status == 2){
195
+         this.$message.error('该处方已经结算或者退费,无法删除')
196
+         return
197
+       }
198
+       this.$confirm("附加费删除后不可恢复,是否确认删除", "删除", {
199
+         confirmButtonText: "确 定",
200
+         cancelButtonText: "取 消",
201
+         type: "warning"
202
+       }).then(() => {
203
+         this.$nextTick(function(){
204
+           if(addition.id == 0){
205
+             this.prescription.addition.splice(index, 1)
206
+           }else{
207
+             let params = {
208
+               'id': addition.id,
209
+             }
210
+             delHisAddition(params).then(response => {
211
+               if (response.data.state == 0) {
212
+                 this.$message.error(response.data.msg)
213
+                 return false
214
+               } else {
215
+                 var temp2 = this.deepClone(this.prescription.addition)
216
+                 temp2.splice(index, 1)
217
+                 this.prescription.addition = temp2
218
+                 this.$message.success(response.data.data.msg)
219
+               }
220
+             })
221
+           }
222
+         });
223
+
224
+       })
225
+         .catch(() => {});
226
+
227
+     },
182
       getInitData(){
228
       getInitData(){
183
         getInitData().then(response => {
229
         getInitData().then(response => {
184
           if (response.data.state == 0) {
230
           if (response.data.state == 0) {
191
         })
237
         })
192
 
238
 
193
       },deleteDrug:function(index, row){
239
       },deleteDrug:function(index, row){
194
-       if(this.prescription.order_status >= 2){
240
+       if(this.prescription.order_status == 2){
195
          this.$message.error('该处方已经结算或者退费,无法删除')
241
          this.$message.error('该处方已经结算或者退费,无法删除')
196
          return
242
          return
197
        }
243
        }
267
          return name
313
          return name
268
       },
314
       },
269
       deleteProject(row,i){
315
       deleteProject(row,i){
270
-        if(this.prescription.order_status = 2){
316
+        if(this.prescription.order_status == 2){
271
           this.$message.error('该处方已经结算或者退费,无法删除')
317
           this.$message.error('该处方已经结算或者退费,无法删除')
272
           return
318
           return
273
         }
319
         }

+ 162 - 15
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Ver fichero

147
           {
147
           {
148
             name: '处方1',
148
             name: '处方1',
149
             advice: [],
149
             advice: [],
150
-            project: []
150
+            project: [],
151
+            addition:[],
151
           }
152
           }
152
         ],
153
         ],
153
         search_input: '',
154
         search_input: '',
172
         templatedetail:{},
173
         templatedetail:{},
173
         detalid:0,
174
         detalid:0,
174
         prescription_id:0,
175
         prescription_id:0,
175
-        addtions_charge:[],
176
 
176
 
177
         patientid:0,
177
         patientid:0,
178
         prescriptionList:[],
178
         prescriptionList:[],
231
 
231
 
232
             if(this.patientTableData.length > 0) {
232
             if(this.patientTableData.length > 0) {
233
               this.$refs.tab.setCurrentRow(this.patientTableData[0])
233
               this.$refs.tab.setCurrentRow(this.patientTableData[0])
234
-              this.choosePatient(this.patientTableData[0])
234
+              this.getPatientInfo(this.patientTableData[0])
235
             }
235
             }
236
 
236
 
237
             this.prescriptionList = response.data.data.list.prescription
237
             this.prescriptionList = response.data.data.list.prescription
239
 
239
 
240
           }
240
           }
241
         })
241
         })
242
-      },
243
-      choosePatient(val) {
244
-
242
+      },getPatientInfo(val){
245
         this.patientid = val.patients.id
243
         this.patientid = val.patients.id
246
         let params = {
244
         let params = {
247
           'record_date': this.record_date,
245
           'record_date': this.record_date,
254
           } else {
252
           } else {
255
 
253
 
256
             this.prescriptions = []
254
             this.prescriptions = []
257
-            this.addtions_charge = []
258
             this.patientInfo = response.data.data.xt_info
255
             this.patientInfo = response.data.data.xt_info
259
             this.hisPatientInfo = response.data.data.his_info
256
             this.hisPatientInfo = response.data.data.his_info
260
-            var case_history = response.data.data.case_history
261
-            console.log("case_history22222222",case_history)
262
-            if (case_history.breathing  == 0) {
263
-                case_history.breathing = ""
264
-            }
265
-            this.case_history = case_history
257
+            this.case_history = response.data.data.case_history
258
+
266
             this.info = response.data.data.info
259
             this.info = response.data.data.info
267
 
260
 
268
-            this.addtions_charge = response.data.data.addtions_charge
269
 
261
 
270
 
262
 
271
             this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
263
             this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
305
                 var prescription = response.data.data.prescription[i]
297
                 var prescription = response.data.data.prescription[i]
306
                 let tempAdvice = []
298
                 let tempAdvice = []
307
                 let tempProject = []
299
                 let tempProject = []
300
+                let tempAddition = []
301
+
308
 
302
 
309
                 for (let b = 0; b < prescription.advices.length; b++) {
303
                 for (let b = 0; b < prescription.advices.length; b++) {
310
                   let obj = {
304
                   let obj = {
315
                     execution_frequency: prescription.advices[b].execution_frequency,
309
                     execution_frequency: prescription.advices[b].execution_frequency,
316
                     retail_price: prescription.advices[b].price.toString(),
310
                     retail_price: prescription.advices[b].price.toString(),
317
                     remark: prescription.advices[b].remark,
311
                     remark: prescription.advices[b].remark,
312
+                    day:prescription.advices[b].day,
318
                     prescribing_number:prescription.advices[b].prescribing_number.toString(),
313
                     prescribing_number:prescription.advices[b].prescribing_number.toString(),
319
                     single_dose_unit:prescription.advices[b].single_dose_unit,
314
                     single_dose_unit:prescription.advices[b].single_dose_unit,
320
                     prescribing_number_unit:prescription.advices[b].prescribing_number_unit,
315
                     prescribing_number_unit:prescription.advices[b].prescribing_number_unit,
346
                 }
341
                 }
347
 
342
 
348
 
343
 
344
+                for (let b = 0; b < prescription.addition.length; b++) {
345
+                  let obj = {
346
+                    id: prescription.addition[b].id,
347
+                    item_name: prescription.addition[b].item_name,
348
+                    price: prescription.addition[b].price,
349
+                    count: prescription.addition[b].count,
350
+                    item_id: prescription.addition[b].item_id,
351
+                  }
352
+                  tempAddition.push(obj)
353
+                }
354
+
355
+
349
 
356
 
350
                 let index = i + 1
357
                 let index = i + 1
351
                 let obj = {
358
                 let obj = {
353
                   name: '处方' + index,
360
                   name: '处方' + index,
354
                   advices: tempAdvice,
361
                   advices: tempAdvice,
355
                   project: tempProject,
362
                   project: tempProject,
363
+                  addition:tempAddition,
356
                   order_status:prescription.order_status
364
                   order_status:prescription.order_status
357
                 }
365
                 }
358
                 this.prescriptions.push(obj)
366
                 this.prescriptions.push(obj)
363
                 name: '处方' + 1,
371
                 name: '处方' + 1,
364
                 advices: [],
372
                 advices: [],
365
                 project: [],
373
                 project: [],
374
+                addition:[],
366
                 orderStatus:0,
375
                 orderStatus:0,
367
               }
376
               }
368
               this.prescriptions.push(obj)
377
               this.prescriptions.push(obj)
370
 
379
 
371
 
380
 
372
 
381
 
373
-            this.$refs.prescriptions.setData(this.prescriptions,this.info,this.addition_charge)
382
+            this.$refs.prescriptions.setData(this.prescriptions,this.info)
383
+          }
384
+        })
385
+
386
+
387
+
388
+      },
389
+      choosePatient(val) {
390
+
391
+        this.patientid = val.patients.id
392
+        let params = {
393
+          'record_date': this.record_date,
394
+          'patient_id': val.patients.id
395
+        }
396
+        getPatientInfo(params).then(response => {
397
+          if (response.data.state == 0) {
398
+            this.$message.error(response.data.msg)
399
+            return false
400
+          } else {
401
+            this.prescriptions = []
402
+            this.patientInfo = response.data.data.xt_info
403
+            this.hisPatientInfo = response.data.data.his_info
404
+            this.case_history = response.data.data.case_history
405
+            var case_history = response.data.data.case_history
406
+            console.log("case_history22222222",case_history)
407
+            if (case_history.breathing  == 0) {
408
+                case_history.breathing = ""
409
+            }
410
+            this.case_history = case_history
411
+            this.info = response.data.data.info
412
+            this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
413
+            if (this.case_history.temperature <= 0) {
414
+              this.case_history.temperature = ''
415
+            }
416
+            if (this.case_history.blood_sugar <= 0) {
417
+              this.case_history.blood_sugar = ''
418
+            }
419
+            if (this.case_history.pulse <= 0) {
420
+              this.case_history.pulse = ''
421
+            }
422
+            if (this.case_history.sbp <= 0) {
423
+              this.case_history.sbp = ''
424
+            }
425
+            if (this.case_history.dbp <= 0) {
426
+              this.case_history.dbp = ''
427
+            }
428
+            if (this.case_history.height <= 0) {
429
+              this.case_history.height = ''
430
+            }
431
+            if (this.case_history.blood_fat <= 0) {
432
+              this.case_history.blood_fat = ''
433
+            }
434
+            if (this.case_history.sick_type <= 0) {
435
+              this.case_history.sick_type = ''
436
+            }
437
+            this.case_history.sick_date = uParseTime(this.case_history.sick_date, '{y}-{m}-{d}')
438
+            if (this.case_history.is_infect == 1) {
439
+              this.case_history.is_infect = true
440
+            } else {
441
+              this.case_history.is_infect = false
442
+            }
443
+            this.prescriptionList =response.data.data.prescription
444
+            if (response.data.data.prescription.length > 0) {
445
+              for (let i = 0; i < response.data.data.prescription.length; i++) {
446
+                var prescription = response.data.data.prescription[i]
447
+                let tempAdvice = []
448
+                let tempProject = []
449
+                let tempAddition = []
450
+                for (let b = 0; b < prescription.advices.length; b++) {
451
+                  let obj = {
452
+                    advice_id: prescription.advices[b].id,
453
+                    drug_name: prescription.advices[b].advice_name,
454
+                    single_dose: prescription.advices[b].single_dose,
455
+                    delivery_way: prescription.advices[b].delivery_way,
456
+                    execution_frequency: prescription.advices[b].execution_frequency,
457
+                    retail_price: prescription.advices[b].price.toString(),
458
+                    remark: prescription.advices[b].remark,
459
+                    day:prescription.advices[b].day,
460
+                    prescribing_number:prescription.advices[b].prescribing_number.toString(),
461
+                    single_dose_unit:prescription.advices[b].single_dose_unit,
462
+                    prescribing_number_unit:prescription.advices[b].prescribing_number_unit,
463
+                    medical_insurance_number:prescription.advices[b].med_list_codg,
464
+                    id:prescription.advices[b].drug_id
465
+                  }
466
+                  tempAdvice.push(obj)
467
+                }
468
+                for (let b = 0; b < prescription.project.length; b++) {
469
+                  console.log(prescription.project[b])
470
+                  console.log(prescription.project[b].project)
471
+                  let obj = {
472
+                    id: prescription.project[b].id,
473
+                    project_id: prescription.project[b].project_id,
474
+                    project_name: prescription.project[b].project.project_name,
475
+                    statistical_classification: prescription.project[b].project.statistical_classification,
476
+                    single_dose: prescription.project[b].single_dose,
477
+                    delivery_way: prescription.project[b].delivery_way,
478
+                    execution_frequency: prescription.project[b].execution_frequency,
479
+                    number_days: prescription.project[b].day,
480
+                    total:prescription.project[b].count.toString(),
481
+                    price:prescription.project[b].price,
482
+                    remark:prescription.project[b].remark,
483
+                    medical_code:prescription.project[b].project.medical_code,
484
+                    unit:prescription.project[b].unit
485
+                  }
486
+                  tempProject.push(obj)
487
+                }
488
+                for (let b = 0; b < prescription.addition.length; b++) {
489
+                  let obj = {
490
+                    id: prescription.addition[b].id,
491
+                    item_name: prescription.addition[b].item_name,
492
+                    price: prescription.addition[b].price,
493
+                    count: prescription.addition[b].count,
494
+                    item_id: prescription.addition[b].item_id,
495
+                  }
496
+                  tempAddition.push(obj)
497
+                }
498
+                let index = i + 1
499
+                let obj = {
500
+                  id: prescription.id,
501
+                  name: '处方' + index,
502
+                  advices: tempAdvice,
503
+                  project: tempProject,
504
+                  addition:tempAddition,
505
+                  order_status:prescription.order_status
506
+                }
507
+                this.prescriptions.push(obj)
508
+              }
509
+            } else {
510
+              let obj = {
511
+                id:0,
512
+                name: '处方' + 1,
513
+                advices: [],
514
+                project: [],
515
+                addition:[],
516
+                orderStatus:0,
517
+              }
518
+              this.prescriptions.push(obj)
519
+            }
520
+            this.$refs.prescriptions.setData(this.prescriptions,this.info)
374
           }
521
           }
375
         })
522
         })
376
       },
523
       },

+ 65 - 17
src/xt_pages/outpatientDoctorStation/pastInquiries.vue Ver fichero

5
     </div>
5
     </div>
6
     <div class="app-container">
6
     <div class="app-container">
7
       <div class="cell clearfix">
7
       <div class="cell clearfix">
8
-        <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input"
8
+        <el-input size="small" style="width:150px;" v-model="keywords"
9
                   class="filter-item"/>
9
                   class="filter-item"/>
10
         <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索
10
         <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索
11
         </el-button>
11
         </el-button>
12
-        <el-date-picker v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
12
+        <el-date-picker v-model="record_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
13
                         :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date"
13
                         :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date"
14
+                        format="yyyy-MM-dd"
15
+                        value-format="yyyy-MM-dd"
14
                         placeholder="选择日期时间" align="right"></el-date-picker>
16
                         placeholder="选择日期时间" align="right"></el-date-picker>
15
       </div>
17
       </div>
16
       <el-table :data="tableData" border ref="table" style="width: 100%;" :row-style="{ color: '#303133' }"
18
       <el-table :data="tableData" border ref="table" style="width: 100%;" :row-style="{ color: '#303133' }"
17
                 :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
19
                 :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
18
         <el-table-column align="center" label="序号" width="60" type="index"></el-table-column>
20
         <el-table-column align="center" label="序号" width="60" type="index"></el-table-column>
19
         <el-table-column align="center" prop="name" label="姓名" width="100">
21
         <el-table-column align="center" prop="name" label="姓名" width="100">
20
-          <template slot-scope="scope">{{ scope.row.patient.name }}</template>
22
+          <template slot-scope="scope">{{ scope.row.patients.name }}</template>
21
         </el-table-column>
23
         </el-table-column>
22
         <el-table-column align="center" prop="name" label="处方日期" width="110">
24
         <el-table-column align="center" prop="name" label="处方日期" width="110">
23
-          <template slot-scope="scope"> {{getTimes(scope.row.record_date)}}</template>
25
+          <template slot-scope="scope"> {{getTimes(scope.row.info.ctime)}}</template>
24
 
26
 
25
         </el-table-column>
27
         </el-table-column>
26
         <!--<el-table-column align="center" prop="name" label="患者类型">-->
28
         <!--<el-table-column align="center" prop="name" label="患者类型">-->
27
           <!--<template slot-scope="scope">{{}}</template>-->
29
           <!--<template slot-scope="scope">{{}}</template>-->
28
         <!--</el-table-column>-->
30
         <!--</el-table-column>-->
29
         <el-table-column align="center" prop="name" label="处方号">
31
         <el-table-column align="center" prop="name" label="处方号">
30
-          <template slot-scope="scope">{{scope.row.prescription_number}}</template>
32
+          <template slot-scope="scope">{{scope.row.info.prescription_number}}</template>
31
         </el-table-column>
33
         </el-table-column>
32
         <el-table-column align="center" prop="name" label="开立医生">
34
         <el-table-column align="center" prop="name" label="开立医生">
33
-          <template slot-scope="scope">{{scope.row.doctor}}</template>
35
+          <template slot-scope="scope">{{scope.row.info.doctor}}</template>
34
         </el-table-column>
36
         </el-table-column>
35
         <el-table-column align="center" prop="name" label="诊断">
37
         <el-table-column align="center" prop="name" label="诊断">
36
-          <template slot-scope="scope">{{ scope.row.diagnosis }}</template>
38
+          <template slot-scope="scope">{{ scope.row.info.diagnosis }}</template>
37
         </el-table-column>
39
         </el-table-column>
38
         <el-table-column align="center" prop="name" label="状态">
40
         <el-table-column align="center" prop="name" label="状态">
39
           <template slot-scope="scope">
41
           <template slot-scope="scope">
40
-            <div v-if=" scope.row.prescription_status == 1">新建</div>
41
-            <div v-if=" scope.row.prescription_status == 2">待结算</div>
42
-            <div v-if=" scope.row.prescription_status == 3">已结算</div>
43
-            <div v-if=" scope.row.prescription_status == 4">已退费</div>
44
-
42
+            <div v-if=" scope.row.info.id == 0">未就诊</div>
43
+            <div v-if=" scope.row.info.id > 0">已就诊</div>
45
           </template>
44
           </template>
46
         </el-table-column>
45
         </el-table-column>
47
         <el-table-column align="center" prop="name" label="操作" width="100">
46
         <el-table-column align="center" prop="name" label="操作" width="100">
80
     },
79
     },
81
     data() {
80
     data() {
82
       return {
81
       return {
82
+        keywords:"",
83
+        total:0,
84
+        record_date:"",
85
+        page:1,
86
+        limit:10,
83
         crumbs: [
87
         crumbs: [
84
           { path: false, name: '门诊医生站' },
88
           { path: false, name: '门诊医生站' },
85
           { path: false, name: '既往查询' }
89
           { path: false, name: '既往查询' }
104
       }
108
       }
105
     },
109
     },
106
     methods: {
110
     methods: {
111
+      searchAction(){
112
+        this.page = 1;
113
+        this.limit = 10;
114
+        this.getHisPrescriptionList()
115
+
116
+      },
117
+      handleScheduleDateChange(){
118
+        this.page = 1;
119
+        this.limit = 10;
120
+        this.getHisPrescriptionList()
121
+
122
+      },
123
+      handleCurrentChange(page) {
124
+        this.page = page;
125
+        this.getHisPrescriptionList()
126
+
127
+      },
128
+
129
+      handleSizeChange(limit) {
130
+        this.limit = limit;
131
+        this.getHisPrescriptionList()
132
+
133
+
134
+      },
107
       getTimes(time) {
135
       getTimes(time) {
108
-        return uParseTime(time, "{y}-{m}-{d}");
136
+        return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
109
       },
137
       },
110
       handerShowDetail(row) {
138
       handerShowDetail(row) {
111
-        console.log(row)
112
-        this.$refs.inquiriesDetail.show(row.id)
139
+        if(row.info.id == 0){
140
+          this.$message.error("未就诊")
141
+          return
142
+        }
143
+        this.$refs.inquiriesDetail.show(row.info.id)
113
       }, getHisPrescriptionList() {
144
       }, getHisPrescriptionList() {
114
-        getHisPrescriptionList().then(response => {
145
+        let params = {
146
+          record_date:this.record_date,
147
+          page: this.page,
148
+          limit: this.limit,
149
+          keywords: this.keywords,
150
+        }
151
+        getHisPrescriptionList(params).then(response => {
115
           if (response.data.state == 0) {
152
           if (response.data.state == 0) {
116
             this.$message.error(response.data.msg)
153
             this.$message.error(response.data.msg)
117
             return false
154
             return false
118
           } else {
155
           } else {
119
             this.tableData = response.data.data.order
156
             this.tableData = response.data.data.order
157
+            this.total = response.data.data.total
120
             this.$nextTick(() => {
158
             this.$nextTick(() => {
121
               this.$refs.table.doLayout(); //解决表格错位
159
               this.$refs.table.doLayout(); //解决表格错位
122
             });
160
             });
123
-
124
           }
161
           }
125
         })
162
         })
126
 
163
 
127
       }
164
       }
128
     }, created() {
165
     }, created() {
166
+      var nowDate = new Date()
167
+      var nowYear = nowDate.getFullYear()
168
+      var nowMonth = nowDate.getMonth() + 1
169
+      var nowDay = nowDate.getDate()
170
+      this.record_date =
171
+        nowYear +
172
+        '-' +
173
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
174
+        '-' +
175
+        (nowDay < 10 ? '0' + nowDay : nowDay)
176
+
129
 
177
 
130
       this.getHisPrescriptionList()
178
       this.getHisPrescriptionList()
131
 
179
 

BIN
src/xt_pages/stock/.DS_Store Ver fichero


+ 77 - 71
src/xt_pages/stock/drugs/query.vue Ver fichero

3
     <div class="position">
3
     <div class="position">
4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5
       <el-button
5
       <el-button
6
-          size="small"
7
-          class="filter-item"
8
-          type="primary"
9
-          icon="el-icon-search"
10
-          @click="setting"
11
-        >设置</el-button
12
-        >
6
+        size="small"
7
+        class="filter-item"
8
+        type="primary"
9
+        icon="el-icon-search"
10
+        @click="setting"
11
+      >设置
12
+      </el-button
13
+      >
13
     </div>
14
     </div>
14
     <div class="app-container ">
15
     <div class="app-container ">
15
       <div class="cell clearfix">
16
       <div class="cell clearfix">
26
           type="primary"
27
           type="primary"
27
           icon="el-icon-search"
28
           icon="el-icon-search"
28
           @click="search"
29
           @click="search"
29
-        >搜索</el-button
30
+        >搜索
31
+        </el-button
30
         >
32
         >
31
       </div>
33
       </div>
32
 
34
 
136
   import SettingDialog from './settingDialog/index'
138
   import SettingDialog from './settingDialog/index'
137
 
139
 
138
   export default {
140
   export default {
139
-    name: "stockIn",
141
+    name: 'stockIn',
140
     created() {
142
     created() {
141
-      this.GetAllDrugStockQueryList();
143
+      this.GetAllDrugStockQueryList()
142
     },
144
     },
143
     components: {
145
     components: {
144
       SettingDialog,
146
       SettingDialog,
147
     data() {
149
     data() {
148
       return {
150
       return {
149
         crumbs: [
151
         crumbs: [
150
-          { path: false, name: "库存管理" },
151
-          { path: "/stock/drugs/stock/query", name: "药品库存查询" }
152
+          { path: false, name: '库存管理' },
153
+          { path: '/stock/drugs/stock/query', name: '药品库存查询' }
152
         ],
154
         ],
153
-        keywords: "",
155
+        keywords: '',
154
         total: 0,
156
         total: 0,
155
         multipleSelection: [],
157
         multipleSelection: [],
156
-        signAndWeighBoxPatients: "sign-and-weigh-box-patients",
157
-        start_time: "",
158
-        end_time: "",
158
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
159
+        start_time: '',
160
+        end_time: '',
159
         page: 1,
161
         page: 1,
160
         limit: 10,
162
         limit: 10,
161
         goodType: [],
163
         goodType: [],
162
         goodInfo: [],
164
         goodInfo: [],
163
-        tempArr:[],
165
+        tempArr: [],
164
         sameRowArr: [],
166
         sameRowArr: [],
165
         WarehouseInfo: {
167
         WarehouseInfo: {
166
           loading: false,
168
           loading: false,
167
           warehouseInfoDate: []
169
           warehouseInfoDate: []
168
         }
170
         }
169
-      };
171
+      }
170
     },
172
     },
171
     methods: {
173
     methods: {
172
-      handleSpanTempArr(){
174
+      handleSpanTempArr() {
173
         this.tempArr = []
175
         this.tempArr = []
174
 
176
 
175
         for (let i = 0; i < this.WarehouseInfo.warehouseInfoDate.length; i++) {
177
         for (let i = 0; i < this.WarehouseInfo.warehouseInfoDate.length; i++) {
204
         })
206
         })
205
         this.sameRowArr = sameRowArr
207
         this.sameRowArr = sameRowArr
206
 
208
 
207
-
208
-
209
       },
209
       },
210
       merge({ row, column, rowIndex, columnIndex }) {
210
       merge({ row, column, rowIndex, columnIndex }) {
211
         if (columnIndex === 0) {
211
         if (columnIndex === 0) {
218
         }
218
         }
219
       },
219
       },
220
       GetAllDrugStockQueryList: function() {
220
       GetAllDrugStockQueryList: function() {
221
-        console.log(this.keywords);
221
+        console.log(this.keywords)
222
         const Params = {
222
         const Params = {
223
           page: this.page,
223
           page: this.page,
224
           limit: this.limit,
224
           limit: this.limit,
225
           keyword: this.keywords
225
           keyword: this.keywords
226
-        };
227
-        this.WarehouseInfo.loading = true;
228
-        this.WarehouseInfo.warehouseInfoDate = [];
226
+        }
227
+        this.WarehouseInfo.loading = true
228
+        this.WarehouseInfo.warehouseInfoDate = []
229
         getAllDrugStockQueryList(Params).then(response => {
229
         getAllDrugStockQueryList(Params).then(response => {
230
           if (response.data.state == 0) {
230
           if (response.data.state == 0) {
231
-            this.WarehouseInfo.loading = false;
232
-            this.$message.error(response.data.msg);
233
-            return false;
231
+            this.WarehouseInfo.loading = false
232
+            this.$message.error(response.data.msg)
233
+            return false
234
           } else {
234
           } else {
235
-            this.WarehouseInfo.loading = false;
236
-            this.total = response.data.data.total;
235
+            this.WarehouseInfo.loading = false
236
+            this.total = response.data.data.total
237
             for (let i = 0; i < response.data.data.list.length; i++) {
237
             for (let i = 0; i < response.data.data.list.length; i++) {
238
 
238
 
239
               this.WarehouseInfo.warehouseInfoDate.push(
239
               this.WarehouseInfo.warehouseInfoDate.push(
240
                 response.data.data.list[i]
240
                 response.data.data.list[i]
241
-              );
241
+              )
242
             }
242
             }
243
             this.handleSpanTempArr()
243
             this.handleSpanTempArr()
244
           }
244
           }
245
-        });
245
+        })
246
       },
246
       },
247
       getSpecificationName: function(id) {
247
       getSpecificationName: function(id) {
248
-        let name = "";
248
+        let name = ''
249
         for (let i = 0; i < this.goodInfo.length; i++) {
249
         for (let i = 0; i < this.goodInfo.length; i++) {
250
           if (this.goodInfo[i].id == id) {
250
           if (this.goodInfo[i].id == id) {
251
-            name = this.goodInfo[i].specification_name;
251
+            name = this.goodInfo[i].specification_name
252
           }
252
           }
253
         }
253
         }
254
-        return name;
254
+        return name
255
       },
255
       },
256
       getTypeName: function(id) {
256
       getTypeName: function(id) {
257
-        let name = "";
257
+        let name = ''
258
         for (let i = 0; i < this.goodType.length; i++) {
258
         for (let i = 0; i < this.goodType.length; i++) {
259
           if (this.goodType[i].id == id) {
259
           if (this.goodType[i].id == id) {
260
-            name = this.goodType[i].type_name;
260
+            name = this.goodType[i].type_name
261
           }
261
           }
262
         }
262
         }
263
-        return name;
263
+        return name
264
       },
264
       },
265
 
265
 
266
-
267
       handleBack: function() {
266
       handleBack: function() {
268
-        this.$router.go(-1);
267
+        this.$router.go(-1)
269
       },
268
       },
270
       handleSizeChange(val) {
269
       handleSizeChange(val) {
271
-        this.limit = val;
272
-        this.GetAllDrugStockQueryList();
270
+        this.limit = val
271
+        this.GetAllDrugStockQueryList()
273
       },
272
       },
274
       handleCurrentChange(val) {
273
       handleCurrentChange(val) {
275
-        this.page = val;
276
-        this.GetAllDrugStockQueryList();
274
+        this.page = val
275
+        this.GetAllDrugStockQueryList()
277
       },
276
       },
278
       calculate: function(val) {
277
       calculate: function(val) {
279
-        return Math.round(parseFloat(val) * 100) / 100;
278
+        return Math.round(parseFloat(val) * 100) / 100
280
       },
279
       },
281
       startTimeChange: function() {
280
       startTimeChange: function() {
282
-        this.GetAllDrugStockQueryList();
281
+        this.GetAllDrugStockQueryList()
283
       },
282
       },
284
       endTimeChange: function() {
283
       endTimeChange: function() {
285
-        this.GetAllDrugStockQueryList();
284
+        this.GetAllDrugStockQueryList()
286
       },
285
       },
287
       stockInCount: function(row) {
286
       stockInCount: function(row) {
288
-        let total = 0;
289
-          for (let i = 0; i < row.query_drug_warehousing_info.length; i++) {
290
-            total = total + row.query_drug_warehousing_info[i].warehousing_count;
287
+        let total = 0
288
+        for (let i = 0; i < row.query_drug_warehousing_info.length; i++) {
289
+          total = total + row.query_drug_warehousing_info[i].warehousing_count
291
         }
290
         }
292
-        return total;
291
+        return total
293
       },
292
       },
294
       salesReturnCount: function(row) {
293
       salesReturnCount: function(row) {
295
-        let total = 0;
294
+        let total = 0
296
 
295
 
297
-          for (let i = 0; i < row.query_drug_sales_return_info.length; i++) {
298
-            total = total + row.query_drug_sales_return_info[i].count;
296
+        for (let i = 0; i < row.query_drug_sales_return_info.length; i++) {
297
+          total = total + row.query_drug_sales_return_info[i].count
299
         }
298
         }
300
-        return total;
299
+        return total
301
       },
300
       },
302
       stockOutCount: function(row) {
301
       stockOutCount: function(row) {
303
-        let total = 0;
302
+        let total = 0
304
 
303
 
305
-          for (let i = 0; i < row.query_drug_warehouseout_info.length; i++) {
306
-            total = total + row.query_drug_warehouseout_info[i].count;
304
+        for (let i = 0; i < row.query_drug_warehouseout_info.length; i++) {
305
+          total = total + row.query_drug_warehouseout_info[i].count
307
         }
306
         }
308
-        return total;
307
+        return total
309
       },
308
       },
310
       cancelStockCount: function(row) {
309
       cancelStockCount: function(row) {
311
-        let total = 0;
312
-          for (let i = 0; i < row.query_drug_cancel_stock_info.length; i++) {
313
-            total = total + row.query_drug_cancel_stock_info[i].count;
314
-          }
315
-        return total;
310
+        let total = 0
311
+        for (let i = 0; i < row.query_drug_cancel_stock_info.length; i++) {
312
+          total = total + row.query_drug_cancel_stock_info[i].count
313
+        }
314
+        return total
315
+      },
316
+      showStockInDetailDialog: function(val) {
317
+      },
318
+      showSaleReturnDetailDialog: function() {
319
+      },
320
+      showStockOutDetailDialog: function() {
321
+      },
322
+      showCancelStockDetailDialog: function() {
316
       },
323
       },
317
-      showStockInDetailDialog: function(val) {},
318
-      showSaleReturnDetailDialog: function() {},
319
-      showStockOutDetailDialog: function() {},
320
-      showCancelStockDetailDialog: function() {},
321
       search: function() {
324
       search: function() {
322
-        this.GetAllDrugStockQueryList();
323
-      },setting:function() {
325
+        this.GetAllDrugStockQueryList()
326
+      }, setting: function() {
324
         this.$refs.dialog.show()
327
         this.$refs.dialog.show()
325
       }
328
       }
326
     }
329
     }
327
-  };
330
+  }
328
 </script>
331
 </script>
329
 
332
 
330
 <style rel="stylesheet/css" lang="scss" scoped>
333
 <style rel="stylesheet/css" lang="scss" scoped>
336
     border-bottom: 1px #dcdfe6 solid;
339
     border-bottom: 1px #dcdfe6 solid;
337
     margin: 0px 0 20px 0;
340
     margin: 0px 0 20px 0;
338
   }
341
   }
342
+
339
   }
343
   }
340
 
344
 
341
   .title {
345
   .title {
366
   .count {
370
   .count {
367
     color: #bd2c00;
371
     color: #bd2c00;
368
   }
372
   }
373
+
369
   .el-table td,
374
   .el-table td,
370
   .el-table th.is-leaf,
375
   .el-table th.is-leaf,
371
   .el-table--border,
376
   .el-table--border,
372
   .el-table--group {
377
   .el-table--group {
373
     border-color: #d0d3da;
378
     border-color: #d0d3da;
374
   }
379
   }
380
+
375
   .el-table--border::after,
381
   .el-table--border::after,
376
   .el-table--group::after,
382
   .el-table--group::after,
377
   .el-table::before {
383
   .el-table::before {