csx 2 lat temu
rodzic
commit
0a4adfe648
1 zmienionych plików z 16 dodań i 3 usunięć
  1. 16 3
      src/xt_pages/outpatientCharges/listPrint.vue

+ 16 - 3
src/xt_pages/outpatientCharges/listPrint.vue Wyświetl plik

@@ -112,6 +112,7 @@
112 112
               }, []) // 设置cur默认类型为数组,并且初始值为空的数组
113 113
               let tempOrderInfo = []
114 114
               for (let i = 0; i < med_chrgitm_types.length; i++) {
115
+
115 116
                 let obj = {
116 117
                   details: [],
117 118
                   med_chrgitm_name:this.getType(med_chrgitm_types[i]),
@@ -121,8 +122,19 @@
121 122
                   noMedicineTotal:0,
122 123
                   bingTotal:0,
123 124
                   otherTotal:0,
125
+                  sort:0,
126
+                }
127
+
128
+                if(med_chrgitm_types[i] == '09'){
129
+                  obj.sort = 99
130
+                } else if(med_chrgitm_types[i] == '05'){
131
+                  obj.sort = 98
132
+                } else if(med_chrgitm_types[i] == '03'){
133
+                  obj.sort = 97
124 134
                 }
125 135
 
136
+
137
+
126 138
                 let tempDetails = []
127 139
                 for (let b = 0; b < response.data.data.order_info.length; b++) {
128 140
                   if (med_chrgitm_types[i] == response.data.data.order_info[b].med_chrgitm_type) {
@@ -135,15 +147,16 @@
135 147
                 obj.noMedicineTotal = this.getNoMedicineTotal(tempDetails)
136 148
                 obj.bingTotal = this.getBingTotal(tempDetails)
137 149
                 obj.otherTotal = this.getOtherTotal(tempDetails)
138
-
139 150
                 obj.details = this.set10265NewData(tempDetails)
140 151
                 this.list.push(obj)
141 152
               }
142
-              console.log(this.list)
153
+
154
+              this.list.sort((a,b) => a.sort < b.sort ? 1 : a.sort > b.sort ? -1 : 0)
155
+              console.log(  this.list)
156
+
143 157
             }else{
144 158
               this.order = response.data.data.order
145 159
               this.patient = response.data.data.patient
146
-              console.log(this.patient)
147 160
               this.admin = response.data.data.admin_info
148 161
               for (let i = 0; i < response.data.data.order_info.length; i++) {
149 162
                 var infos = response.data.data.order_info[i]