Commit 7f458bc4 by 胡悦

修复bug

1 parent 49523901
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-09-06 10:11:03
* @LastEditors: huyue
* @LastEditTime: 2024-09-19 14:48:58
* @LastEditTime: 2024-09-19 18:42:19
-->
<template>
<view>
......@@ -187,16 +187,16 @@ const formObject_boutique = [{
required: true
},
{
label: "手机号",
label: "车主电话",
key: "phoneNumber",
type: "input",
inputType: "tel",
maxlength: 11,
placeholder: '请输入手机号',
placeholder: '请输入车主电话',
required: true
},
{
label: "车型",
label: "品牌车型",
key: "carModel",
type: "text",
popKey: "carBrandListVisible",
......@@ -224,7 +224,8 @@ export default {
carInfo: {
type: Object,
default: () => ({})
}
},
show: Boolean
},
components: { Employee },
watch: {
......@@ -246,6 +247,7 @@ export default {
watchStatus: {
immediate: true,
handler(newval) {
this.closeAllPopup()
this.pageParams.QRURL = ''
this.pageParams.received = false
if (this.couponList.length) {
......@@ -256,6 +258,9 @@ export default {
else this.chooseCoupon(this.couponList[0]) // 无此两种类型情况默认带入任意类型礼券
}
}
},
show() {
this.closeAllPopup()
}
},
computed: {
......@@ -341,6 +346,7 @@ export default {
let { pageParams } = this
if (pageParams.received) return
this.$refs[e].open();
this.$emit('hideTool')
},
open(customerType, customerCouponId) {
this.$refs.couponPopup.open()
......@@ -384,7 +390,7 @@ export default {
{ couponId } = this.pageParams
// 检查车主姓名
if (!customerName || !phoneNumber || !staffName) throw '请输入客户信息'
if (phoneNumber && !phoneRex.test(phoneNumber)) throw '请输入正确的手机号'
if (phoneNumber && !phoneRex.test(phoneNumber)) throw '请输入正确的车主电话'
if (!couponId) throw '请选择礼券类型'
} catch (error) {
this.pageParams.clickFlag = false
......@@ -487,6 +493,10 @@ export default {
});
}
},
closeAllPopup () {
this.$refs.employeeBoxVisible?.close()
this.$refs.couponBoxVisible?.close()
},
}
}
</script>
......
......@@ -69,6 +69,7 @@
ref="couponPopup"
@reception="reception"
:show="show"
@hideTool="$emit('hideTool')"
/>
<risk-informed-box
ref="riskInformedPop"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!