|
@@ -39,7 +39,8 @@
|
39
|
39
|
<td style="line-height: 18px">
|
40
|
40
|
<span v-if="item.drug_id != 0">{{item.drug?item.drug.drug_spec:''}}</span>
|
41
|
41
|
</td>
|
42
|
|
- <td style="line-height: 18px">{{ getManufacturer(item.manufacturer) }}</td>
|
|
42
|
+ <!-- <td style="line-height: 18px">{{ getManufacturer(item.manufacturer) }}</td> -->
|
|
43
|
+ <td style="line-height: 18px">{{ getManufacturer(item.drug.id) }}</td>
|
43
|
44
|
<td style="line-height: 18px">
|
44
|
45
|
<span>{{getUnit(item.drug_id)}}</span>
|
45
|
46
|
</td>
|
|
@@ -218,7 +219,21 @@
|
218
|
219
|
for (let i = 0; i < response.data.data.list.length; i++) {
|
219
|
220
|
this.list.push(response.data.data.list[i])
|
220
|
221
|
}
|
221
|
|
- console.log("list222222",this.list)
|
|
222
|
+
|
|
223
|
+ for(let j=0;j<this.list.length;j++){
|
|
224
|
+ this.list[j].manufacturer_name = ""
|
|
225
|
+ }
|
|
226
|
+
|
|
227
|
+ for(let i=0;i<this.list.length;i++){
|
|
228
|
+
|
|
229
|
+ for(let j=0;j<this.manufacturer.length;j++){
|
|
230
|
+ if(this.list[i].manufacturer == this.manufacturer[j].id){
|
|
231
|
+ this.list[i].manufacturer_name = this.manufacturer[j].manufacturer_name
|
|
232
|
+ }
|
|
233
|
+ }
|
|
234
|
+ }
|
|
235
|
+
|
|
236
|
+ console.log("list222222",this.list)
|
222
|
237
|
}
|
223
|
238
|
})
|
224
|
239
|
},
|
|
@@ -231,13 +246,22 @@
|
231
|
246
|
}
|
232
|
247
|
return name
|
233
|
248
|
},
|
|
249
|
+ // getManufacturer(id){
|
|
250
|
+ // let name = ''
|
|
251
|
+ // this.manufacturer.map(item => {
|
|
252
|
+ // if(item.id == id){
|
|
253
|
+ // name = item.manufacturer_name
|
|
254
|
+ // }
|
|
255
|
+ // })
|
|
256
|
+ // return name
|
|
257
|
+ // },
|
234
|
258
|
getManufacturer(id){
|
235
|
|
- let name = ''
|
236
|
|
- this.manufacturer.map(item => {
|
237
|
|
- if(item.id == id){
|
238
|
|
- name = item.manufacturer_name
|
239
|
|
- }
|
240
|
|
- })
|
|
259
|
+ let name = ""
|
|
260
|
+ for(let i=0;i<this.list.length;i++){
|
|
261
|
+ if(id == this.list[i].id){
|
|
262
|
+ name = this.list[i].manufacturer_name
|
|
263
|
+ }
|
|
264
|
+ }
|
241
|
265
|
return name
|
242
|
266
|
},
|
243
|
267
|
GetConfigInfo: function() {
|
|
@@ -246,7 +270,8 @@
|
246
|
270
|
this.$message.error(response.data.msg);
|
247
|
271
|
return false;
|
248
|
272
|
} else {
|
249
|
|
- this.manufacturer = response.data.data.manufacturer;
|
|
273
|
+ this.manufacturer = response.data.data.manufacturer;
|
|
274
|
+ this.getList()
|
250
|
275
|
}
|
251
|
276
|
});
|
252
|
277
|
},
|