Bläddra i källkod

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

see999 4 år sedan
förälder
incheckning
8b3c6fb448

+ 2 - 3
src/xt_pages/data/components/drugs.vue Visa fil

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

+ 2 - 1
src/xt_pages/outpatientCharges/components/registerDialog.vue Visa fil

@@ -455,6 +455,7 @@
455 455
         return getDictionaryDataConfig(module, filed_name)
456 456
       },
457 457
       show: function () {
458
+        this.form = Object.assign({}, this.resetForm)
458 459
         // this.form.name = patientInfo.name
459 460
         // this.form.gender = patientInfo.gender
460 461
         // this.form.age = patientInfo.age
@@ -472,6 +473,7 @@
472 473
 
473 474
       }, hide: function () {
474 475
         this.visibility = false
476
+        this.$refs['formValue'].resetFields()
475 477
       }, cancel: function (formName) {
476 478
         this.$emit('cancel', this.getValue())
477 479
         this.$refs['formValue'].resetFields()
@@ -482,7 +484,6 @@
482 484
             let value = {}
483 485
             value = this.getValue()
484 486
             this.$emit('confirm', value)
485
-            this.form = Object.assign({}, this.resetForm)
486 487
           }
487 488
         })
488 489
       },

+ 415 - 0
src/xt_pages/outpatientCharges/newStatementPrint.vue Visa fil

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

+ 5 - 1
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Visa fil

@@ -73,9 +73,13 @@
73 73
                      @click="open(4)"
74 74
                      type="primary">收费
75 75
           </el-button>
76
+
76 77
           <el-button size="small" @click="open(5)" type="primary"
77
-                    >退费
78
+               v-if="this.hisPatientInfo.id > 0 && this.order.id > 0 &&  this.order.order_status == 2" >退费
78 79
           </el-button>
80
+          <!-- <el-button size="small" @click="open(5)" type="primary"
81
+                    >退费
82
+          </el-button> -->
79 83
 
80 84
 
81 85
           <!--<el-button v-if="this.info.prescription_status >= 2" size="small" @click="open(7)" type="primary"-->

+ 24 - 0
src/xt_pages/outpatientCharges/summary.vue Visa fil

@@ -85,6 +85,7 @@
85 85
         <el-table-column align="center" prop="name" label="操作">
86 86
           <template slot-scope="scope">
87 87
             <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
88
+            <el-button size="mini" type="primary" @click="toPrint(scope.row)" v-if="$store.getters.xt_user.org_id == 9919 && scope.row.order_status == 2">结算单</el-button>
88 89
           </template>
89 90
         </el-table-column>
90 91
       </el-table>
@@ -102,6 +103,15 @@
102 103
       </el-pagination>
103 104
     </div>
104 105
 
106
+    <el-dialog
107
+      class="centerDialog"
108
+      width="1200px"
109
+      title="打印"
110
+      :visible.sync="statementVisible">
111
+      <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
112
+    <new-statement-print ref="print" :paramsObj='orderObj'></new-statement-print>
113
+    </el-dialog>
114
+
105 115
 
106 116
   </div>
107 117
 </template>
@@ -111,13 +121,19 @@
111 121
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
112 122
   import { getHisOrderList,getDoctorList,getExportConsumeDetailList } from '@/api/his/his'
113 123
   import { uParseTime } from '@/utils/tools'
124
+  import statementPrint from './statementPrint'
125
+  import NewStatementPrint from './newStatementPrint'
126
+
114 127
 
115 128
   export default {
116 129
     components: {
130
+      NewStatementPrint,
117 131
       BreadCrumb
118 132
     },
119 133
     data() {
120 134
       return {
135
+        orderObj: {},
136
+        statementVisible: false,
121 137
         crumbs: [
122 138
           { path: false, name: '门诊收费' },
123 139
           { path: false, name: '项目消费明细汇总' }
@@ -135,6 +151,14 @@
135 151
       }
136 152
     },
137 153
     methods: {
154
+      toPrint(row){
155
+        this.statementVisible = true
156
+        let obj = {
157
+          order_id: row.id
158
+        }
159
+        this.orderObj = obj
160
+
161
+      },
138 162
       export_detail(){
139 163
         let params= {
140 164
           start_time:this.start_time,

+ 226 - 45
src/xt_pages/outpatientCharges/summaryDetail.vue Visa fil

@@ -78,7 +78,7 @@
78 78
 
79 79
                     </div>
80 80
                     <div class="costBox">
81
-                      <span>当前处方总费用:<span style="color:red;">{{ order.medfee_sumamt }}元</span></span>
81
+                      <span>当前处方总费用:<span style="color:red;">{{ order.medfee_sumamt}}元</span></span>
82 82
                       <span v-if="order.order_status == 1">待结算</span>
83 83
                       <span v-if="order.order_status == 2">已结算</span>
84 84
                       <span v-if="order.order_status == 3">已退费</span>
@@ -165,6 +165,33 @@ export default {
165 165
     },created(){
166 166
       this.GetOrderDetail()
167 167
   },methods:{
168
+    // getTotal() {
169
+    //   var total = 0
170
+    //   for (let i = 0; i < this.prescriptions.length; i++) {
171
+    //     if (this.prescriptions[i].advices != null) {
172
+    //       for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
173
+    //         console.log(this.prescriptions[i].advices[a].price )
174
+    //         console.log(this.prescriptions[i].advices[a].prescribing_number)
175
+    //
176
+    //         total = parseFloat(total) + parseFloat(this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number)
177
+    //       }
178
+    //     }
179
+    //     if (this.prescriptions[i].project != null) {
180
+    //       for (let a = 0; a < this.prescriptions[i].project.length; a++) {
181
+    //
182
+    //         total = parseFloat(total) + parseFloat(this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count)
183
+    //       }
184
+    //     }
185
+    //
186
+    //     if (this.prescriptions[i].addition != null) {
187
+    //       for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
188
+    //         total = parseFloat(total) + parseFloat(this.prescriptions[i].addition[a].price * this.prescriptions[i].addition[b].count)
189
+    //       }
190
+    //     }
191
+    //   }
192
+    //   return total.toFixed(2)
193
+    //
194
+    // },
168 195
     getDictionaryDataConfig(module, filed_name) {
169 196
       return getDictionaryDataConfig(module, filed_name)
170 197
     },
@@ -221,7 +248,155 @@ export default {
221 248
       if (tab == 'more') {
222 249
         return false
223 250
       }
251
+    },   setMonthPrescription(month_prescriptions) {
252
+      console.log(month_prescriptions)
253
+      let drug_month_prescriptions = {
254
+        advices: []
255
+      }
256
+      let drug_ids = []
257
+      let project_month_prescriptions = {
258
+        project: []
259
+
260
+      }
261
+      let project_ids = []
262
+
263
+      let addition_month_prescriptions = {
264
+        addition: []
265
+
266
+      }
267
+      let additions_ids = []
268
+
269
+      for (let i = 0; i < month_prescriptions.length; i++) {
270
+        if (month_prescriptions[i].type == 1) { //药品
271
+          for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
272
+            let obj = {
273
+              id: month_prescriptions[i].advices[a].drug_id,
274
+              price: month_prescriptions[i].advices[a].price
275
+
276
+            }
277
+            drug_ids.push(obj)
278
+            drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
279
+          }
280
+
281
+        } else if (month_prescriptions[i].type == 2) { //项目
282
+          for (let a = 0; a < month_prescriptions[i].project.length; a++) {
283
+            let obj = {
284
+              id: month_prescriptions[i].project[a].project_id,
285
+              price: month_prescriptions[i].project[a].price
286
+
287
+            }
288
+            project_ids.push(obj)
289
+            project_month_prescriptions.project.push(month_prescriptions[i].project[a])
290
+          }
291
+        }
292
+        //附加收费
293
+        for (let a = 0; a < month_prescriptions[i].addition.length; a++) {
294
+          let obj = {
295
+            id: month_prescriptions[i].addition[a].item_id,
296
+            price: month_prescriptions[i].addition[a].price
297
+
298
+          }
299
+          additions_ids.push(obj)
300
+          addition_month_prescriptions.addition.push(month_prescriptions[i].addition[a])
301
+
302
+        }
303
+
304
+      }
305
+      console.log(drug_ids)
306
+      console.log(project_ids)
307
+      console.log(additions_ids)
308
+
309
+
310
+
311
+      const obj = {}
312
+      const obj1 = {}
313
+      const obj2 = {}
314
+
315
+      drug_ids = drug_ids.reduce((cur, next) => {
316
+        obj[next.price] ? '' : obj[next.price] = true && cur.push(next)
317
+        return cur
318
+      }, []) // 设置cur默认类型为数组,并且初始值为空的数组
319
+      project_ids = project_ids.reduce((cur, next) => {
320
+        obj1[next.price] ? '' : obj1[next.price] = true && cur.push(next)
321
+        return cur
322
+      }, []) // 设置cur默认类型为数组,并且初始值为空的数组
323
+      additions_ids = additions_ids.reduce((cur, next) => {
324
+        obj2[next.price] ? '' : obj2[next.price] = true && cur.push(next)
325
+        return cur
326
+      }, []) // 设置cur默认类型为数组,并且初始值为空的数组
327
+
328
+
329
+
330
+
331
+      for (let i = 0; i < drug_ids.length; i++) {
332
+        let obj = {}
333
+        let count = 0
334
+        for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
335
+          if (drug_ids[i].price == drug_month_prescriptions.advices[a].price) {
336
+            obj['name'] = drug_month_prescriptions.advices[a].advice_name
337
+            obj['statistical_classification'] = ''
338
+            obj['type'] = 1
339
+            obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
340
+            obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
341
+            obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency
342
+            obj['day'] = drug_month_prescriptions.advices[a].day
343
+            obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
344
+            obj['remark'] = drug_month_prescriptions.advices[a].remark
345
+            obj['price'] = parseFloat(drug_month_prescriptions.advices[a].price)
346
+            count = count + drug_month_prescriptions.advices[a].prescribing_number
347
+
348
+          }
349
+        }
350
+        obj['count'] = count
351
+        this.tableData.push(obj)
352
+      }
353
+
354
+      for (let i = 0; i < project_ids.length; i++) {
355
+        let obj = {}
356
+        let count = 0
357
+        for (let a = 0; a < project_month_prescriptions.project.length; a++) {
358
+          if (project_ids[i].price == project_month_prescriptions.project[a].price) {
359
+            obj['name'] = project_month_prescriptions.project[a].project.project_name
360
+            obj['statistical_classification'] = ''
361
+            obj['single_dose'] = project_month_prescriptions.project[a].single_dose
362
+            obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
363
+            obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
364
+            obj['day'] = project_month_prescriptions.project[a].day
365
+            obj['single_dose_unit'] = project_month_prescriptions.project[a].unit
366
+            obj['prescribing_number_unit'] = project_month_prescriptions.project[a].unit
367
+            count = count + project_month_prescriptions.project[a].count
368
+            obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
369
+            obj['remark'] = project_month_prescriptions.project[a].remark
370
+            obj['type'] = 2
371
+
372
+
373
+          }
374
+        }
375
+        obj['count'] = count
376
+        this.tableData.push(obj)
377
+
378
+      }
379
+
380
+      for (let i = 0; i < additions_ids.length; i++) {
381
+        let obj = {}
382
+        let count = 0
383
+        console.log(addition_month_prescriptions.addition)
384
+        if (addition_month_prescriptions.addition) {
385
+          for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
386
+            if (additions_ids[i].price == addition_month_prescriptions.addition[a].price) {
387
+              obj['item_name'] = addition_month_prescriptions.addition[a].item_name
388
+              count = count + addition_month_prescriptions.addition[a].count
389
+              obj['price'] = parseFloat(addition_month_prescriptions.addition[a].price)
390
+            }
391
+          }
392
+          obj['count'] = count
393
+          this.additions.push(obj)
394
+
395
+        }
396
+      }
397
+
224 398
     },
399
+
225 400
     GetOrderDetail(){
226 401
       let params={
227 402
         number:this.$route.query.number,
@@ -240,50 +415,56 @@ export default {
240 415
           this.prescriptions = []
241 416
           this.tableData = []
242 417
 
243
-          for (let i = 0; i < response.data.data.prescription.length; i++) {
244
-            var prescription = response.data.data.prescription[i]
245
-
246
-
247
-            for (let b = 0; b < prescription.advices.length; b++) {
248
-              let obj = {
249
-                name: prescription.advices[b].advice_name,
250
-                statistical_classification:"",
251
-                type:1,
252
-                single_dose: prescription.advices[b].single_dose,
253
-                delivery_way: prescription.advices[b].delivery_way,
254
-                execution_frequency: prescription.advices[b].execution_frequency,
255
-                price: prescription.advices[b].price.toString(),
256
-                day: prescription.advices[b].day,
257
-                count:prescription.advices[b].prescribing_number.toString(),
258
-                remark: prescription.advices[b].remark,
259
-                single_dose_unit: prescription.advices[b].single_dose_unit,
260
-                prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
261
-
262
-              }
263
-              this.tableData.push(obj)
264
-            }
265
-
266
-            for (let b = 0; b < prescription.project.length; b++) {
267
-              let obj = {
268
-                name: prescription.project[b].project.project_name,
269
-                statistical_classification: prescription.project[b].project.statistical_classification,
270
-                single_dose: prescription.project[b].single_dose,
271
-                delivery_way: prescription.project[b].delivery_way,
272
-                execution_frequency: prescription.project[b].execution_frequency,
273
-                price: prescription.project[b].price,
274
-                day: prescription.project[b].day,
275
-                count: prescription.project[b].count.toString(),
276
-                remark: prescription.project[b].remark,
277
-                single_dose_unit:prescription.project[b].project.unit,
278
-                prescribing_number_unit:prescription.project[b].project.unit,
279
-                type:2,
280
-              }
281
-              this.tableData.push(obj)
282
-            }
283 418
 
284
-            for (let b = 0; b < prescription.addition.length; b++) {
285
-                this.additions.push( prescription.addition[b])
286
-            }
419
+          var prescription = response.data.data.prescription
420
+          this.prescriptions = prescription
421
+          this.setMonthPrescription(prescription)
422
+
423
+
424
+          // for (let i = 0; i < response.data.data.prescription.length; i++) {
425
+          //   var prescription = response.data.data.prescription[i]
426
+
427
+
428
+            // for (let b = 0; b < prescription.advices.length; b++) {
429
+            //   let obj = {
430
+            //     name: prescription.advices[b].advice_name,
431
+            //     statistical_classification:"",
432
+            //     type:1,
433
+            //     single_dose: prescription.advices[b].single_dose,
434
+            //     delivery_way: prescription.advices[b].delivery_way,
435
+            //     execution_frequency: prescription.advices[b].execution_frequency,
436
+            //     price: prescription.advices[b].price.toString(),
437
+            //     day: prescription.advices[b].day,
438
+            //     count:prescription.advices[b].prescribing_number.toString(),
439
+            //     remark: prescription.advices[b].remark,
440
+            //     single_dose_unit: prescription.advices[b].single_dose_unit,
441
+            //     prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
442
+            //
443
+            //   }
444
+            //   this.tableData.push(obj)
445
+            // }
446
+            //
447
+            // for (let b = 0; b < prescription.project.length; b++) {
448
+            //   let obj = {
449
+            //     name: prescription.project[b].project.project_name,
450
+            //     statistical_classification: prescription.project[b].project.statistical_classification,
451
+            //     single_dose: prescription.project[b].single_dose,
452
+            //     delivery_way: prescription.project[b].delivery_way,
453
+            //     execution_frequency: prescription.project[b].execution_frequency,
454
+            //     price: prescription.project[b].price,
455
+            //     day: prescription.project[b].day,
456
+            //     count: prescription.project[b].count.toString(),
457
+            //     remark: prescription.project[b].remark,
458
+            //     single_dose_unit:prescription.project[b].project.unit,
459
+            //     prescribing_number_unit:prescription.project[b].project.unit,
460
+            //     type:2,
461
+            //   }
462
+            //   this.tableData.push(obj)
463
+            // }
464
+            //
465
+            // for (let b = 0; b < prescription.addition.length; b++) {
466
+            //     this.additions.push( prescription.addition[b])
467
+            // }
287 468
 
288 469
 
289 470
 
@@ -298,7 +479,7 @@ export default {
298 479
             // this.prescriptions.push(obj)
299 480
             // this.curPrescriptions = this.prescriptions[0]
300 481
 
301
-          }
482
+          // }
302 483
           // this.tableData = response.data.data.order
303 484
 
304 485
         }

Filskillnaden har hållits tillbaka eftersom den är för stor
+ 336 - 182
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue


+ 253 - 70
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Visa fil

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

+ 1 - 1
src/xt_pages/qcd/officesControlAnalysis/project.vue Visa fil

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

+ 9 - 5
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue Visa fil

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

+ 7 - 3
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue Visa fil

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

+ 4 - 1
src/xt_pages/stock/drugs/drugsStockDialog/index.vue Visa fil

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

+ 2 - 1
src/xt_pages/stock/stockInOrderAdd.vue Visa fil

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

+ 1 - 1
src/xt_pages/stock/stockOutOrderAdd.vue Visa fil

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