Commit 7f458bc4 by 胡悦

修复bug

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