提交 8e975692 编写于 作者: 张敬贤's avatar 张敬贤

ADD

上级 a22e8723
...@@ -19,7 +19,9 @@ const loading = { ...@@ -19,7 +19,9 @@ const loading = {
instance.show = true; instance.show = true;
}, },
hide: () => { hide: () => {
setTimeout(() => {
instance.show = false; instance.show = false;
}, 300);
}, },
}; };
}, },
......
...@@ -144,11 +144,8 @@ export default { ...@@ -144,11 +144,8 @@ export default {
console.log(data); console.log(data);
getHospitalList(data).then(res => { getHospitalList(data).then(res => {
console.log('getHospitalList', res); console.log('getHospitalList', res);
if (isLoad) {
this.list = [...this.list, ...res.data.data];
} else {
this.list = res.data.data; this.list = res.data.data;
}
if (res.data.data.length < this.pageSize) { if (res.data.data.length < this.pageSize) {
this.finished = true; this.finished = true;
} }
......
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
及时接受检测结果检测报告 及时接受检测结果检测报告
</div> </div>
<div class="choose-section"> <div class="choose-section">
<van-form @submit="onSubmit"> <van-form
ref="dectionForm"
validate-first
@submit="onSubmit"
>
<van-field <van-field
name="checkboxGroup" name="checkboxGroup"
label="检测项目" label="检测项目"
...@@ -291,7 +295,7 @@ export default { ...@@ -291,7 +295,7 @@ export default {
}, },
mounted() { mounted() {
this.$loading.show();
const { yunOrderNo, projectEquityNo } = this.$route.query; const { yunOrderNo, projectEquityNo } = this.$route.query;
this.yunOrderNo = yunOrderNo; this.yunOrderNo = yunOrderNo;
this.projectEquityNo = projectEquityNo; this.projectEquityNo = projectEquityNo;
...@@ -344,6 +348,8 @@ export default { ...@@ -344,6 +348,8 @@ export default {
this.dectionForm.detectName = dectionData.detectionName; this.dectionForm.detectName = dectionData.detectionName;
this.dectionForm.goodsId = dectionData.goodsId; this.dectionForm.goodsId = dectionData.goodsId;
this.$store.dispatch('home/setInsuranceInfo', dectionData); this.$store.dispatch('home/setInsuranceInfo', dectionData);
this.$loading.hide();
} }
}); });
}, },
...@@ -356,6 +362,7 @@ export default { ...@@ -356,6 +362,7 @@ export default {
this.dectionForm.beneficiaryIdNum = res.data.beneficiaryIdNum; this.dectionForm.beneficiaryIdNum = res.data.beneficiaryIdNum;
this.isDisabled = (this.dectionForm.beneficiaryName != '' && this.dectionForm.beneficiaryPhone != '' && this.dectionForm.beneficiaryIdNum != '') && (this.dectionForm.beneficiaryName && this.dectionForm.beneficiaryPhone && this.dectionForm.beneficiaryIdNum ); this.isDisabled = (this.dectionForm.beneficiaryName != '' && this.dectionForm.beneficiaryPhone != '' && this.dectionForm.beneficiaryIdNum != '') && (this.dectionForm.beneficiaryName && this.dectionForm.beneficiaryPhone && this.dectionForm.beneficiaryIdNum );
this.$store.dispatch('home/setOrderInfo', res.data); this.$store.dispatch('home/setOrderInfo', res.data);
this.$loading.hide();
}); });
}, },
...@@ -392,7 +399,9 @@ export default { ...@@ -392,7 +399,9 @@ export default {
cancelSearch() {}, cancelSearch() {},
selectAddress() {}, selectAddress() {},
appointment() { appointment() {
console.log(this.dectionForm); this.$loading.show();
this.$refs.dectionForm.validate().then(result => {
console.log('this.dectionForm', result);
const data = { const data = {
appointmentTime: this.dectionForm.appointmentTime, appointmentTime: this.dectionForm.appointmentTime,
goodsId: this.dectionForm.goodsId, goodsId: this.dectionForm.goodsId,
...@@ -404,6 +413,7 @@ export default { ...@@ -404,6 +413,7 @@ export default {
yunOrderNo:this.yunOrderNo, yunOrderNo:this.yunOrderNo,
}; };
appointment(data).then(res => { appointment(data).then(res => {
this.$loading.hide();
if (res.code === '000000') { if (res.code === '000000') {
this.$router.push({ this.$router.push({
path: '/appoint-details', path: '/appoint-details',
...@@ -414,8 +424,12 @@ export default { ...@@ -414,8 +424,12 @@ export default {
}); });
} }
}); });
},
}).catch(err => {
this.$loading.hide();
console.log(err);
});
},
getDetailByUnionId() { }, getDetailByUnionId() { },
confirm(values) { confirm(values) {
console.log('confirm', values); console.log('confirm', values);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册