see999 4 years ago
parent
commit
2e581364ea

+ 83 - 93
src/xt_pages/outpatientCharges/listPrint.vue View File

51
       }
51
       }
52
     },
52
     },
53
     created() {
53
     created() {
54
-      this.getInfo(this.paramsObj.id);
55
-      this.org_id = this.$store.getters.xt_user.org_id;
54
+      this.getInfo(this.paramsObj.id)
55
+      this.org_id = this.$store.getters.xt_user.org_id
56
       if(this.org_id == 10106){
56
       if(this.org_id == 10106){
57
         this.getInfo10106(this.paramsObj.id)
57
         this.getInfo10106(this.paramsObj.id)
58
       }
58
       }
59
-
59
+      
60
     },
60
     },
61
 
61
 
62
     methods: {
62
     methods: {
66
       getInfo(order_id) {
66
       getInfo(order_id) {
67
         let params = {
67
         let params = {
68
           id: order_id
68
           id: order_id
69
-        };
69
+        }
70
         getHisOrderDetail(params).then(response => {
70
         getHisOrderDetail(params).then(response => {
71
           if (response.data.state == 0) {
71
           if (response.data.state == 0) {
72
-            this.$message.error(response.data.msg);
72
+            this.$message.error(response.data.msg)
73
             return false
73
             return false
74
           } else {
74
           } else {
75
-            this.order = response.data.data.order;
76
-            this.patient = response.data.data.patient;
77
-            console.log(this.patient);
78
-            this.admin = response.data.data.admin_info;
75
+            this.order = response.data.data.order
76
+            this.patient = response.data.data.patient
77
+            console.log(this.patient)
78
+            this.admin = response.data.data.admin_info
79
 
79
 
80
 
80
 
81
             for (let i = 0; i < response.data.data.order_info.length; i++) {
81
             for (let i = 0; i < response.data.data.order_info.length; i++) {
82
-              var infos = response.data.data.order_info[i];
82
+              var infos = response.data.data.order_info[i]
83
               let obj = {
83
               let obj = {
84
                 med_chrgitm_type: this.getType(infos.med_chrgitm_type),
84
                 med_chrgitm_type: this.getType(infos.med_chrgitm_type),
85
                 price: infos.pric,
85
                 price: infos.pric,
86
                 count: infos.cnt
86
                 count: infos.cnt
87
-              };
87
+              }
88
               if (infos.advice && infos.advice.id == 0 && infos.project && infos.project.id > 0) {
88
               if (infos.advice && infos.advice.id == 0 && infos.project && infos.project.id > 0) {
89
-                obj['p_time'] = this.getTimes(infos.project.prescription.ctime);
90
-                obj['name'] = infos.project.project.project_name;
91
-                obj['spec'] = 1;
89
+                obj['p_time'] = this.getTimes(infos.project.prescription.ctime)
90
+                obj['name'] = infos.project.project.project_name
91
+                obj['spec'] = 1
92
                 obj['unit'] = infos.project.project.unit
92
                 obj['unit'] = infos.project.project.unit
93
 
93
 
94
               }
94
               }
95
 
95
 
96
               if (infos.advice && infos.advice.id > 0 && infos.project && infos.project.id == 0) {
96
               if (infos.advice && infos.advice.id > 0 && infos.project && infos.project.id == 0) {
97
-                obj['p_time'] = this.getTimes(infos.advice.prescription.ctime);
98
-                obj['name'] = infos.advice.advice_name;
99
-                obj['spec'] = infos.advice.drug.drug_spec;
97
+                obj['p_time'] = this.getTimes(infos.advice.prescription.ctime)
98
+                obj['name'] = infos.advice.advice_name
99
+                obj['spec'] = infos.advice.drug.drug_spec
100
                 obj['unit'] = infos.advice.drug.max_unit
100
                 obj['unit'] = infos.advice.drug.max_unit
101
 
101
 
102
               }
102
               }
103
-              this.list.push(obj);
103
+              this.list.push(obj)
104
               this.list.sort(function(a, b) {
104
               this.list.sort(function(a, b) {
105
                 return b.p_time < a.p_time ? 1 : -1
105
                 return b.p_time < a.p_time ? 1 : -1
106
               })
106
               })
112
       getType(med_chrgitm_type) {
112
       getType(med_chrgitm_type) {
113
         switch (med_chrgitm_type) {
113
         switch (med_chrgitm_type) {
114
           case '01':
114
           case '01':
115
-            return '床位费';
116
-            break;
115
+            return '床位费'
116
+            break
117
           case '02':
117
           case '02':
118
-            return '诊察费';
118
+            return '诊察费'
119
 
119
 
120
-            break;
120
+            break
121
           case '03':
121
           case '03':
122
-            return '检查费';
122
+            return '检查费'
123
 
123
 
124
-            break;
124
+            break
125
           case '04':
125
           case '04':
126
-            return '化验费';
127
-            break;
126
+            return '化验费'
127
+            break
128
           case '05':
128
           case '05':
129
-            return '治疗费';
129
+            return '治疗费'
130
 
130
 
131
-            break;
131
+            break
132
           case '06':
132
           case '06':
133
-            return '手术费';
133
+            return '手术费'
134
 
134
 
135
-            break;
135
+            break
136
           case '07':
136
           case '07':
137
-            return '护理费';
137
+            return '护理费'
138
 
138
 
139
-            break;
139
+            break
140
           case '08':
140
           case '08':
141
-            return '材料费';
141
+            return '材料费'
142
 
142
 
143
-            break;
143
+            break
144
           case '09':
144
           case '09':
145
-            return '西药费';
145
+            return '西药费'
146
 
146
 
147
-            break;
147
+            break
148
           case '10':
148
           case '10':
149
-            return '中药饮片费';
149
+            return '中药饮片费'
150
 
150
 
151
-            break;
151
+            break
152
           case '11':
152
           case '11':
153
-            return '中成药费';
153
+            return '中成药费'
154
 
154
 
155
-            break;
155
+            break
156
           case '12':
156
           case '12':
157
-            return '一般诊疗费';
157
+            return '一般诊疗费'
158
 
158
 
159
-            break;
159
+            break
160
           case '13':
160
           case '13':
161
-            return '挂号费';
161
+            return '挂号费'
162
 
162
 
163
-            break;
163
+            break
164
           case '14':
164
           case '14':
165
-            return '其他费';
165
+            return '其他费'
166
 
166
 
167
             break
167
             break
168
 
168
 
172
       printThisPage() {
172
       printThisPage() {
173
         if(this.org_id != 10106){
173
         if(this.org_id != 10106){
174
           const style =
174
           const style =
175
-          '@media print {.listTitle{font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.listInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .listTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 14px;border-color: #000;text-align:left;}.listTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}';
175
+          '@media print {.listTitle{font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.listInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .listTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 14px;border-color: #000;text-align:left;}.listTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}'
176
           printJS({
176
           printJS({
177
             printable: 'list-print',
177
             printable: 'list-print',
178
             type: 'html',
178
             type: 'html',
189
             scanStyles: false
189
             scanStyles: false
190
           });
190
           });
191
         }
191
         }
192
-
192
+        
193
 
193
 
194
         // if (this.org_template_info.template_id == 1) {
194
         // if (this.org_template_info.template_id == 1) {
195
         //   printJS({
195
         //   printJS({
203
       getInfo10106(order_id) {
203
       getInfo10106(order_id) {
204
         if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4  || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 ||  this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990 ) {
204
         if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4  || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 ||  this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990 ) {
205
 
205
 
206
-          var that = this;
206
+          var that = this
207
 
207
 
208
           axios.get('http://127.0.0.1:9532/api/settle/query', {
208
           axios.get('http://127.0.0.1:9532/api/settle/query', {
209
             params: {
209
             params: {
213
           })
213
           })
214
             .then(function (response) {
214
             .then(function (response) {
215
               if (response.data.state == 0) {
215
               if (response.data.state == 0) {
216
-                this.$message.error(response.data.msg);
216
+                this.$message.error(response.data.msg)
217
                 return false
217
                 return false
218
               } else {
218
               } else {
219
-                console.log("logloglog");
220
-
221
-                console.log(response.data.data.info);
222
-                that.info = response.data.data.info;
223
-                that.p_admin = response.data.data.printor_admin;
224
-                that.charge_admin = response.data.data.charge_admin;
225
-                that.order_infos = response.data.data;
226
-
227
-
228
-
229
-                that.info['p_admin'] =  that.p_admin;
230
-                that.info['charge_admin'] =  that.charge_admin;
219
+                console.log("logloglog")
231
 
220
 
232
-                that.info['date'] =  response.data.data.date;
233
-                that.info['number'] =  response.data.data.number;
234
-                that.info['order_infos'] =  response.data.data.order_infos;
235
-                that.info['diagnosis'] =  response.data.data.diagnosis;
221
+                console.log(response.data.data.info)
222
+                that.info = response.data.data.info
223
+                that.p_admin = response.data.data.printor_admin
224
+                that.charge_admin = response.data.data.charge_admin
225
+                that.order_infos = response.data.data
236
 
226
 
237
 
227
 
238
-                console.log(that.info);
228
+                console.log(that.info)
239
 
229
 
240
-                that.info['bed_cost_total'] = response.data.data.bedCostTotal;
241
-                that.info['bed_cost_self_total'] = response.data.data.bedCostSelfTotal;
242
-                that.info['bed_cost_part_self_total'] = response.data.data.bedCostPartSelfTotal;
230
+                that.info['bed_cost_total'] = response.data.data.bedCostTotal
231
+                that.info['bed_cost_self_total'] = response.data.data.bedCostSelfTotal
232
+                that.info['bed_cost_part_self_total'] = response.data.data.bedCostPartSelfTotal
243
 
233
 
244
-                that.info['operation_cost_total'] = response.data.data.operationCostTotal;
245
-                that.info['operation_cost_self_total'] = response.data.data.operationCostSelfTotal;
246
-                that.info['operation_cost_part_self_total'] = response.data.data.operationCostPartSelfTotal;
234
+                that.info['operation_cost_total'] = response.data.data.operationCostTotal
235
+                that.info['operation_cost_self_total'] = response.data.data.operationCostSelfTotal
236
+                that.info['operation_cost_part_self_total'] = response.data.data.operationCostPartSelfTotal
247
 
237
 
248
-                that.info['other_cost_total'] = response.data.data.otherCostTotal;
249
-                that.info['other_cost_self_total'] = response.data.data.otherCostSelfTotal;
250
-                that.info['other_cost_part_self_total'] = response.data.data.otherCostPartSelfTotal;
238
+                that.info['other_cost_total'] = response.data.data.otherCostTotal
239
+                that.info['other_cost_self_total'] = response.data.data.otherCostSelfTotal
240
+                that.info['other_cost_part_self_total'] = response.data.data.otherCostPartSelfTotal
251
 
241
 
252
-                that.info['material_cost_total'] = response.data.data.materialCostTotal;
253
-                that.info['material_cost_self_total'] = response.data.data.materialCostSelfTotal;
254
-                that.info['material_cost_part_self_total'] = response.data.data.materialCostPartSelfTotal;
242
+                that.info['material_cost_total'] = response.data.data.materialCostTotal
243
+                that.info['material_cost_self_total'] = response.data.data.materialCostSelfTotal
244
+                that.info['material_cost_part_self_total'] = response.data.data.materialCostPartSelfTotal
255
 
245
 
256
-                that.info['western_medicine_cost_total'] = response.data.data.westernMedicineCostTotal;
257
-                that.info['western_medicine_cost_self_total'] = response.data.data.westernMedicineCostSelfTotal;
258
-                that.info['western_medicine_cost_part_self_total'] = response.data.data.westernMedicineCostPartSelfTotal;
246
+                that.info['western_medicine_cost_total'] = response.data.data.westernMedicineCostTotal
247
+                that.info['western_medicine_cost_self_total'] = response.data.data.westernMedicineCostSelfTotal
248
+                that.info['western_medicine_cost_part_self_total'] = response.data.data.westernMedicineCostPartSelfTotal
259
 
249
 
260
-                that.info['chinese_traditional_medicine_cost_total'] = response.data.data.chineseTraditionalMedicineCostTotal;
261
-                that.info['chinese_traditional_medicine_cost_self_total'] = response.data.data.chineseTraditionalMedicineCostSelfTotal;
262
-                that.info['chinese_traditional_medicine_cost_part_self_total'] = response.data.data.chineseTraditionalMedicineCostPartSelfTotal;
250
+                that.info['chinese_traditional_medicine_cost_total'] = response.data.data.chineseTraditionalMedicineCostTotal
251
+                that.info['chinese_traditional_medicine_cost_self_total'] = response.data.data.chineseTraditionalMedicineCostSelfTotal
252
+                that.info['chinese_traditional_medicine_cost_part_self_total'] = response.data.data.chineseTraditionalMedicineCostPartSelfTotal
263
 
253
 
264
 
254
 
265
-                that.info['check_cost_total'] = response.data.data.checkCostTotal;
266
-                that.info['check_cost_self_total'] = response.data.data.checkCostSelfTotal;
267
-                that.info['check_cost_part_self_total'] = response.data.data.checkCostPartSelfTotal;
255
+                that.info['check_cost_total'] = response.data.data.checkCostTotal
256
+                that.info['check_cost_self_total'] = response.data.data.checkCostSelfTotal
257
+                that.info['check_cost_part_self_total'] = response.data.data.checkCostPartSelfTotal
268
 
258
 
269
 
259
 
270
-                that.info['laboratory_cost_total'] = response.data.data.laboratoryCostTotal;
271
-                that.info['laboratory_cost_self_total'] = response.data.data.laboratoryCostSelfTotal;
272
-                that.info['laboratory_cost_part_self_total'] = response.data.data.laboratoryCostPartSelfTotal;
260
+                that.info['laboratory_cost_total'] = response.data.data.laboratoryCostTotal
261
+                that.info['laboratory_cost_self_total'] = response.data.data.laboratoryCostSelfTotal
262
+                that.info['laboratory_cost_part_self_total'] = response.data.data.laboratoryCostPartSelfTotal
273
 
263
 
274
-                that.info['treat_cost_total'] = response.data.data.treatCostTotal;
275
-                that.info['treat_cost_self_total'] = response.data.data.treatCostSelfTotal;
276
-                that.info['treat_cost_part_self_total'] = response.data.data.treatCostPartSelfTotal;
264
+                that.info['treat_cost_total'] = response.data.data.treatCostTotal
265
+                that.info['treat_cost_self_total'] = response.data.data.treatCostSelfTotal
266
+                that.info['treat_cost_part_self_total'] = response.data.data.treatCostPartSelfTotal
277
                 console.log(this.info)
267
                 console.log(this.info)
278
               }
268
               }
279
             })
269
             })

+ 50 - 30
src/xt_pages/outpatientCharges/listTemplate/printTwo.vue View File

72
     <div style="border-bottom:1px solid #000;padding:10px 0;display:flex;" v-for="(item,index) in order_infos.order_infos"
72
     <div style="border-bottom:1px solid #000;padding:10px 0;display:flex;" v-for="(item,index) in order_infos.order_infos"
73
          :key="index">
73
          :key="index">
74
       <div style="width:20%;text-align:center;" v-if="item.advice_id > 0">{{ item.advice.drug.medical_insurance_number }}</div>
74
       <div style="width:20%;text-align:center;" v-if="item.advice_id > 0">{{ item.advice.drug.medical_insurance_number }}</div>
75
-      <div style="width:20%;text-align:center;" v-if="item.project_id > 0">{{ item.advice.project.medical_insurance_number }}</div>
75
+      <div style="width:20%;text-align:center;" v-if="item.project_id > 0">{{ item.project.project.medical_code }}</div>
76
       <div style="width:20%;text-align:center;" v-if="item.advice_id > 0">{{item.advice.drug.drug_name}}</div>
76
       <div style="width:20%;text-align:center;" v-if="item.advice_id > 0">{{item.advice.drug.drug_name}}</div>
77
       <div style="width:20%;text-align:center;" v-if="item.project_id > 0">{{item.project.project.project_name}}</div>
77
       <div style="width:20%;text-align:center;" v-if="item.project_id > 0">{{item.project.project.project_name}}</div>
78
 
78
 
105
   </div>
105
   </div>
106
 </template>
106
 </template>
107
 <script>
107
 <script>
108
-  import {uParseTime} from '@/utils/tools'
109
-  export default {
108
+import {uParseTime} from '@/utils/tools'
109
+export default {
110
     props: {
110
     props: {
111
       info: {
111
       info: {
112
         type: Object,
112
         type: Object,
131
           return {}
131
           return {}
132
         }
132
         }
133
       }
133
       }
134
-    }, methods: {
135
-      getTime(val) {
136
-        if (val < 0) {
137
-          return ""
138
-        }
139
-        if (val == "") {
140
-          return ""
141
-        } else {
142
-          return uParseTime(val, '{y}-{m}-{d}')
143
-        }
144
-      },
134
+    }, 
135
+    created(){
136
+        // let obj = {
137
+        //     检查费:[{name:1,age:2}],
138
+        //     床位费:[{name:3,age:4}],
139
+        //     检验费:[{name:5,age:6}],
140
+        // }
141
+        // obj.map(item => {
142
+        //     console.log(111,item)
143
+        // })
144
+    },
145
+    methods: {
146
+        getTime(val) {
147
+            if (val < 0) {
148
+                return ""
149
+            }
150
+            if (val == "") {
151
+                return ""
152
+            } else {
153
+                return uParseTime(val, '{y}-{m}-{d}')
154
+            }
155
+        },
145
         getNowTime: function () {
156
         getNowTime: function () {
146
-          let dateTime
147
-          let yy = new Date().getFullYear()
148
-          let mm = new Date().getMonth() + 1
149
-          let dd = new Date().getDate()
150
-          let hh = new Date().getHours()
151
-          let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
152
-            :
153
-            new Date().getMinutes()
154
-          let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
155
-            :
156
-            new Date().getSeconds()
157
-          dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
158
-          return dateTime
159
-        }
160
-      ,
157
+            let dateTime
158
+            let yy = new Date().getFullYear()
159
+            let mm = new Date().getMonth() + 1
160
+            let dd = new Date().getDate()
161
+            let hh = new Date().getHours()
162
+            let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
163
+                :
164
+                new Date().getMinutes()
165
+            let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
166
+                :
167
+                new Date().getSeconds()
168
+            dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
169
+            return dateTime
170
+        },
161
 
171
 
162
-      }
172
+    },
173
+    watch:{
174
+        "order_infos.order_infos":{
175
+            handler(newVal){
176
+                newVal.map(item => {
177
+                    if(item.MedChrgitmType){}
178
+                })
179
+            }
180
+        }
163
     }
181
     }
182
+}
183
+    
164
 
184
 
165
 
185
 
166
 </script>
186
 </script>