lion 9 months ago
parent a290c408f6
commit 68173cd827

@ -139,7 +139,7 @@
<u-input
:type="!!orderId || canSelectSite ? 'input' : 'select'"
placeholder="请选择站点区域"
:disabled="!!orderId || canSelectSite"
:disabled="!!orderId || canSelectSite"
:value="site_name"
:select-open="isShowSite"
@click="orderId || canSelectSite ? false : (isShowSite = true)"
@ -829,6 +829,7 @@ export default {
type: 1,
is_show: false,
accompany_product_id: "",
site_id:'',
user_archive_id: "",
city: "",
hospital: "",
@ -902,13 +903,13 @@ export default {
trigger: ["blur", "change"],
},
],
site_id: [
{
required: true,
message: "请选择站点区域",
trigger: ["blur", "change"],
},
],
// site_id: [
// {
// required: true,
// message: "",
// trigger: ["blur", "change"],
// },
// ],
},
action: `${baseUrl}/api/mobile/upload-file`,
isAuth: false,
@ -1059,8 +1060,10 @@ export default {
this.form.time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:00`;
},
confirmSite(e) {
console.log("e",e)
this.form.site_id = e[0].value;
this.site_name = e[0].label;
console.log("this.form.site_id",this.form.site_id)
},
//
confirmArchive(e) {
@ -1102,6 +1105,15 @@ export default {
pay() {
if (!this.orderId) {
if(!this.form.site_id){
uni.showToast({
title:'请选择站点区域',
icon:'none'
})
return
}
console.log("this.form",this.form)
this.$refs.uForm.validate(async (valid) => {
if (valid) {
console.log("验证通过");
@ -1131,15 +1143,15 @@ export default {
}
}
// return
this.form.price = this.orderId ? this.paidPrice : (this.accompanyProduct.price * this.form.quantity)
this.form.total = this.form.quantity.toString()
const res = await this.$u.api.accompanyProductOrder(this.form);
if (res) {
console.log(res);
this.orderId = res.id;
this.paidPrice = res.price
this.payOrder(res);
}
this.form.price = this.orderId ? this.paidPrice : (this.accompanyProduct.price * this.form.quantity)
this.form.total = this.form.quantity.toString()
const res = await this.$u.api.accompanyProductOrder(this.form);
if (res) {
console.log(res);
this.orderId = res.id;
this.paidPrice = res.price
this.payOrder(res);
}
} else {
console.log("验证失败");
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save