csx 4 yıl önce
ebeveyn
işleme
8155f1dbd4

+ 2 - 3
src/xt_pages/data/components/drugs.vue Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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
       },

+ 213 - 17
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Dosyayı Görüntüle

@@ -74,7 +74,7 @@
74 74
                      type="primary">收费
75 75
           </el-button>
76 76
           <el-button size="small" @click="open(5)" type="primary"
77
-                    >退费
77
+                     v-if="this.hisPatientInfo.id > 0 && this.order.id > 0 &&  this.order.order_status == 2" >退费
78 78
           </el-button>
79 79
 
80 80
 
@@ -90,10 +90,10 @@
90 90
           >结算单
91 91
           </el-button>
92 92
 
93
-          <!--<el-button v-if="this.$store.getters.xt_user.org_id == 9919"-->
94
-                     <!--size="small" @click="open(10)" type="primary"-->
95
-          <!--&gt;退号-->
96
-          <!--</el-button>-->
93
+          <el-button v-if="this.$store.getters.xt_user.org_id == 9919"
94
+                     size="small" @click="open(10)" type="primary"
95
+          >退号
96
+          </el-button>
97 97
 
98 98
           <!--<el-button v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919"-->
99 99
           <!--size="small" @click="open(11)" type="primary"-->
@@ -686,7 +686,8 @@
686 686
 
687 687
         let params = {
688 688
           'record_date': val,
689
-          'patient_id': this.patientInfo.id
689
+          'patient_id': this.patientInfo.id,
690
+          'type': this.radio,
690 691
         }
691 692
         getChargeHisPatientInfo(params).then(response => {
692 693
           if (response.data.state == 0) {
@@ -1344,7 +1345,6 @@
1344 1345
             order_id: this.order.id
1345 1346
           }
1346 1347
           this.orderObj = obj
1347
-          // this.$refs.print.getInfo(this.order.id)
1348 1348
 
1349 1349
         } else if (index == 10) {
1350 1350
           let params = {
@@ -1745,19 +1745,34 @@
1745 1745
         for (let i = 0; i < month_prescriptions.length; i++) {
1746 1746
           if (month_prescriptions[i].type == 1) { //药品
1747 1747
             for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
1748
-              drug_ids.push(month_prescriptions[i].advices[a].drug_id)
1748
+              let obj = {
1749
+                id: month_prescriptions[i].advices[a].drug_id,
1750
+                price:month_prescriptions[i].advices[a].price,
1751
+
1752
+              }
1753
+              drug_ids.push(obj)
1749 1754
               drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
1750 1755
             }
1751 1756
 
1752 1757
           } else if (month_prescriptions[i].type == 2) { //项目
1753 1758
             for (let a = 0; a < month_prescriptions[i].project.length; a++) {
1754
-              project_ids.push(month_prescriptions[i].project[a].project_id)
1759
+              let obj = {
1760
+                id: month_prescriptions[i].project[a].project_id,
1761
+                price:month_prescriptions[i].project[a].price,
1762
+
1763
+              }
1764
+              project_ids.push(obj)
1755 1765
               project_month_prescriptions.project.push(month_prescriptions[i].project[a])
1756 1766
             }
1757 1767
           }
1758 1768
           //附加收费
1759 1769
           for (let a = 0; a < month_prescriptions[i].addition.length; a++) {
1760
-            additions_ids.push(month_prescriptions[i].addition[a].item_id)
1770
+            let obj = {
1771
+              id: month_prescriptions[i].addition[a].item_id,
1772
+              price:month_prescriptions[i].addition[a].price,
1773
+
1774
+            }
1775
+            additions_ids.push(obj)
1761 1776
             addition_month_prescriptions.addition.push(month_prescriptions[i].addition[a])
1762 1777
 
1763 1778
           }
@@ -1769,15 +1784,15 @@
1769 1784
         const obj2 = {}
1770 1785
 
1771 1786
         drug_ids = drug_ids.reduce((cur, next) => {
1772
-          obj[next] ? '' : obj[next] = true && cur.push(next)
1787
+         obj[next.price] ? '' : obj[next.price] = true && cur.push(next)
1773 1788
           return cur
1774 1789
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1775 1790
         project_ids = project_ids.reduce((cur, next) => {
1776
-          obj1[next] ? '' : obj1[next] = true && cur.push(next)
1791
+      obj[next.price] ? '' : obj[next.price] = true &&  cur.push(next)
1777 1792
           return cur
1778 1793
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1779 1794
         additions_ids = additions_ids.reduce((cur, next) => {
1780
-          obj2[next] ? '' : obj2[next] = true && cur.push(next)
1795
+         obj[next.price] ? '' : obj[next.price] = true  && cur.push(next)
1781 1796
           return cur
1782 1797
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1783 1798
 
@@ -1795,7 +1810,7 @@
1795 1810
           let obj = {}
1796 1811
           let count = 0
1797 1812
           for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
1798
-            if (drug_ids[i] == drug_month_prescriptions.advices[a].drug_id) {
1813
+            if (drug_ids[i].price == drug_month_prescriptions.advices[a].price) {
1799 1814
               obj['drug_name'] = drug_month_prescriptions.advices[a].advice_name
1800 1815
               obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
1801 1816
               obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
@@ -1819,7 +1834,7 @@
1819 1834
           let obj = {}
1820 1835
           let count = 0
1821 1836
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
1822
-            if (project_ids[i] == project_month_prescriptions.project[a].project_id) {
1837
+            if ( project_ids[i].price == project_month_prescriptions.project[a].price) {
1823 1838
               obj['project_name'] = project_month_prescriptions.project[a].project.project_name
1824 1839
               obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
1825 1840
               obj['single_dose'] = project_month_prescriptions.project[a].single_dose
@@ -1845,7 +1860,7 @@
1845 1860
           console.log(addition_month_prescriptions.addition)
1846 1861
           if (addition_month_prescriptions.addition) {
1847 1862
             for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
1848
-              if (project_ids[i] == addition_month_prescriptions.addition[a].item_id) {
1863
+              if ( additions_ids[i].price == addition_month_prescriptions.addition[a].price) {
1849 1864
                 obj['item_name'] = addition_month_prescriptions.addition[a].item_name
1850 1865
                 obj['id'] = addition_month_prescriptions.addition[a].id
1851 1866
                 obj['item_id'] = addition_month_prescriptions.addition[a].item_id
@@ -1887,6 +1902,185 @@
1887 1902
 
1888 1903
       },
1889 1904
 
1905
+      // setMonthPrescription(month_prescriptions) {
1906
+      //   this.month_prescriptions = []
1907
+      //
1908
+      //   let drug_month_prescriptions = {
1909
+      //     advices: []
1910
+      //   }
1911
+      //   let drug_ids = []
1912
+      //   let project_month_prescriptions = {
1913
+      //     project: []
1914
+      //
1915
+      //   }
1916
+      //   let project_ids = []
1917
+      //
1918
+      //   let addition_month_prescriptions = {
1919
+      //     addition: []
1920
+      //
1921
+      //   }
1922
+      //   let additions_ids = []
1923
+      //
1924
+      //   for (let i = 0; i < month_prescriptions.length; i++) {
1925
+      //     if (month_prescriptions[i].type == 1) { //药品
1926
+      //       for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
1927
+      //         let obj = {
1928
+      //           id: month_prescriptions[i].advices[a].drug_id,
1929
+      //           price:month_prescriptions[i].advices[a].price,
1930
+      //
1931
+      //         }
1932
+      //         drug_ids.push(obj)
1933
+      //         drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
1934
+      //       }
1935
+      //
1936
+      //     } else if (month_prescriptions[i].type == 2) { //项目
1937
+      //       for (let a = 0; a < month_prescriptions[i].project.length; a++) {
1938
+      //         let obj = {
1939
+      //           id: month_prescriptions[i].project[a].project_id,
1940
+      //           price:month_prescriptions[i].project[a].price,
1941
+      //
1942
+      //         }
1943
+      //         project_ids.push(obj)
1944
+      //         project_month_prescriptions.project.push(month_prescriptions[i].project[a])
1945
+      //       }
1946
+      //     }
1947
+      //     //附加收费
1948
+      //     for (let a = 0; a < month_prescriptions[i].addition.length; a++) {
1949
+      //       let obj = {
1950
+      //         id: month_prescriptions[i].addition[a].item_id,
1951
+      //         price:month_prescriptions[i].addition[a].price,
1952
+      //
1953
+      //       }
1954
+      //       additions_ids.push(obj)
1955
+      //       addition_month_prescriptions.addition.push(month_prescriptions[i].addition[a])
1956
+      //
1957
+      //     }
1958
+      //
1959
+      //   }
1960
+      //
1961
+      //   const obj = {}
1962
+      //   const obj1 = {}
1963
+      //   const obj2 = {}
1964
+      //
1965
+      //   drug_ids = drug_ids.reduce((cur, next) => {
1966
+      //     obj[next.id] ? '' : obj[next.id] = true && obj[next.price] ? '' : obj[next.price] = true && cur.push(next)
1967
+      //     return cur
1968
+      //   }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1969
+      //   project_ids = project_ids.reduce((cur, next) => {
1970
+      //     obj1[next] ? '' : obj1[next] = true &&  obj[next.price] ? '' : obj[next.price] = true &&  cur.push(next)
1971
+      //     return cur
1972
+      //   }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1973
+      //   additions_ids = additions_ids.reduce((cur, next) => {
1974
+      //     obj2[next] ? '' : obj2[next] = true &&  obj[next.price] ? '' : obj[next.price] = true  && cur.push(next)
1975
+      //     return cur
1976
+      //   }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1977
+      //
1978
+      //   console.log(drug_ids)
1979
+      //   console.log(project_ids)
1980
+      //   console.log(additions_ids)
1981
+      //
1982
+      //   console.log(additions_ids)
1983
+      //
1984
+      //   let drugs = []
1985
+      //   let projects = []
1986
+      //   let additions = []
1987
+      //
1988
+      //   for (let i = 0; i < drug_ids.length; i++) {
1989
+      //     let obj = {}
1990
+      //     let count = 0
1991
+      //     for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
1992
+      //       if (drug_ids[i].id == drug_month_prescriptions.advices[a].drug_id && drug_ids[i].price == drug_month_prescriptions.advices[a].price) {
1993
+      //         obj['drug_name'] = drug_month_prescriptions.advices[a].advice_name
1994
+      //         obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
1995
+      //         obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
1996
+      //         obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency
1997
+      //         obj['day'] = drug_month_prescriptions.advices[a].day
1998
+      //         // obj['prescribing_number'] =  obj['prescribing_number']  + drug_month_prescriptions.advices[a].prescribing_number
1999
+      //         obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
2000
+      //         obj['medical_insurance_number'] = drug_month_prescriptions.advices[a].drug.medical_insurance_number
2001
+      //         obj['id'] = drug_month_prescriptions.advices[a].drug_id
2002
+      //         // obj['retail_price'] = obj['retail_price'] +  drug_month_prescriptions.advices[a].drug.retail_price
2003
+      //         obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price)
2004
+      //         count = count + drug_month_prescriptions.advices[a].prescribing_number
2005
+      //
2006
+      //       }
2007
+      //     }
2008
+      //     obj['prescribing_number'] = count
2009
+      //     drugs.push(obj)
2010
+      //   }
2011
+      //
2012
+      //   for (let i = 0; i < project_ids.length; i++) {
2013
+      //     let obj = {}
2014
+      //     let count = 0
2015
+      //     for (let a = 0; a < project_month_prescriptions.project.length; a++) {
2016
+      //       if (project_ids[i].id == project_month_prescriptions.project[a].project_id  && project_ids[i].price == drug_month_prescriptions.project[a].price) {
2017
+      //         obj['project_name'] = project_month_prescriptions.project[a].project.project_name
2018
+      //         obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
2019
+      //         obj['single_dose'] = project_month_prescriptions.project[a].single_dose
2020
+      //         obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
2021
+      //         obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
2022
+      //         obj['number_days'] = project_month_prescriptions.project[a].day
2023
+      //         obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
2024
+      //         obj['unit'] = project_month_prescriptions.project[a].unit
2025
+      //         obj['project_id'] = project_month_prescriptions.project[a].project_id
2026
+      //         count = count + project_month_prescriptions.project[a].count
2027
+      //         // price = price + project_month_prescriptions.project[a].price
2028
+      //         obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
2029
+      //
2030
+      //       }
2031
+      //     }
2032
+      //     obj['total'] = count
2033
+      //     projects.push(obj)
2034
+      //   }
2035
+      //
2036
+      //   for (let i = 0; i < additions_ids.length; i++) {
2037
+      //     let obj = {}
2038
+      //     let count = 0
2039
+      //     console.log(addition_month_prescriptions.addition)
2040
+      //     if (addition_month_prescriptions.addition) {
2041
+      //       for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
2042
+      //         if (project_ids[i].id == addition_month_prescriptions.addition[a].item_id  && project_ids[i].price == drug_month_prescriptions.addition[a].price) {
2043
+      //           obj['item_name'] = addition_month_prescriptions.addition[a].item_name
2044
+      //           obj['id'] = addition_month_prescriptions.addition[a].id
2045
+      //           obj['item_id'] = addition_month_prescriptions.addition[a].item_id
2046
+      //           count = count + addition_month_prescriptions.addition[a].count
2047
+      //           obj['price'] = parseFloat(addition_month_prescriptions.addition[a].price)
2048
+      //         }
2049
+      //       }
2050
+      //       obj['count'] = count
2051
+      //       additions.push(obj)
2052
+      //     }
2053
+      //   }
2054
+      //
2055
+      //   console.log(drugs)
2056
+      //   console.log(projects)
2057
+      //   console.log(additions)
2058
+      //
2059
+      //   let p1 = {
2060
+      //     name: '处方' + 1,
2061
+      //     advices: drugs,
2062
+      //     project: [],
2063
+      //     type: 1,
2064
+      //     addition: additions
2065
+      //   }
2066
+      //   let p2 = {
2067
+      //     name: '处方' + 2,
2068
+      //     type: 2,
2069
+      //     project: projects,
2070
+      //     advices: [],
2071
+      //     addition: []
2072
+      //
2073
+      //   }
2074
+      //   console.log(this.month_prescriptions)
2075
+      //   console.log(this.curMonthPrescriptions)
2076
+      //
2077
+      //   this.month_prescriptions.push(p1)
2078
+      //   this.month_prescriptions.push(p2)
2079
+      //
2080
+      //   this.curMonthPrescriptions = this.month_prescriptions[0]
2081
+      //
2082
+      // },
2083
+
1890 2084
       unique(arr) {
1891 2085
         const res = new Map()
1892 2086
         return arr.filter((arr) => !res.has(arr.id_card_no) && res.set(arr.id_card_no, 1))
@@ -1917,7 +2111,9 @@
1917 2111
           'patient_id': id,
1918 2112
           'number': batch_number,
1919 2113
           'start_time': this.other_start_time,
1920
-          'end_time': this.other_end_time
2114
+          'end_time': this.other_end_time,
2115
+          'type': this.radio,
2116
+
1921 2117
         }
1922 2118
         this.loading = true
1923 2119
 

+ 21 - 0
src/xt_pages/outpatientCharges/summary.vue Dosyayı Görüntüle

@@ -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,14 @@
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
+    </el-dialog>
113
+
105 114
 
106 115
   </div>
107 116
 </template>
@@ -111,6 +120,8 @@
111 120
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
112 121
   import { getHisOrderList,getDoctorList,getExportConsumeDetailList } from '@/api/his/his'
113 122
   import { uParseTime } from '@/utils/tools'
123
+  import statementPrint from './statementPrint'
124
+
114 125
 
115 126
   export default {
116 127
     components: {
@@ -118,6 +129,8 @@
118 129
     },
119 130
     data() {
120 131
       return {
132
+        orderObj: {},
133
+        statementVisible: false,
121 134
         crumbs: [
122 135
           { path: false, name: '门诊收费' },
123 136
           { path: false, name: '项目消费明细汇总' }
@@ -135,6 +148,14 @@
135 148
       }
136 149
     },
137 150
     methods: {
151
+      toPrint(row){
152
+        this.statementVisible = true
153
+        let obj = {
154
+          order_id: row.id
155
+        }
156
+        this.orderObj = obj
157
+
158
+      },
138 159
       export_detail(){
139 160
         let params= {
140 161
           start_time:this.start_time,

+ 226 - 45
src/xt_pages/outpatientCharges/summaryDetail.vue Dosyayı Görüntüle

@@ -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
         }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 336 - 182
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue


+ 253 - 70
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Dosyayı Görüntüle

@@ -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,