|
@@ -972,8 +972,11 @@
|
972
|
972
|
|
973
|
973
|
this.prescriptions = []
|
974
|
974
|
console.log("9991323242r5253535", response.data.data.prescription)
|
975
|
|
- this.prescription_id = response.data.data.prescription[0].advices[0].prescription_id
|
976
|
|
- console.log("222222", this.prescription_id)
|
|
975
|
+ if( response.data.data.prescription[0].advices[0].length > 0 ) {
|
|
976
|
+ this.prescription_id = response.data.data.prescription[0].advices[0].prescription_id
|
|
977
|
+ }else{
|
|
978
|
+ this.prescription_id = 0
|
|
979
|
+ }
|
977
|
980
|
for (let i = 0; i < response.data.data.prescription.length; i++) {
|
978
|
981
|
var prescription = response.data.data.prescription[i]
|
979
|
982
|
|