提交 73d33d7f authored 作者: lidongxu's avatar lidongxu

fix(mobile/promotion): 修复:移动端促销计划新增和编辑时,最后 2 个表单填写后错误提示消息不消失问题

上级 a6f465dd
.van-floating-bubble{ :root {
background: var(--main-color) !important; // 主色调改为暗红色(可根据需求调整具体色值)
--van-primary-color: #f12528;
// 深色模式下的主色调
--van-primary-color-dark: #f12528;
// 按钮激活状态颜色
--van-button-primary-background: #f12528;
// 链接颜色
--van-link-color: #f12528;
} }
\ No newline at end of file
...@@ -6,6 +6,8 @@ import PickerSearch from './components/PickerSearch' ...@@ -6,6 +6,8 @@ import PickerSearch from './components/PickerSearch'
import PickerCalendar from './components/PickerCalendar' import PickerCalendar from './components/PickerCalendar'
// 指令 // 指令
import longPress from './directive/touch' import longPress from './directive/touch'
// 覆盖样式
import '@/assets/styles/vant.scss'
// 只有在移动端引入 // 只有在移动端引入
if (isMobile()) { if (isMobile()) {
......
...@@ -212,7 +212,12 @@ getPlanDetail() ...@@ -212,7 +212,12 @@ getPlanDetail()
// 点击稽查按钮 // 点击稽查按钮
const clickExamine = async () => { const clickExamine = async () => {
// 确认是否开始稽查 // 确认是否开始稽查
proxy.$modal.confirm(`确认 ${examined.value ? '编辑' : '创建'} 稽查任务吗?`).then(async () => { showConfirmDialog({
title: '系统提示',
message:
'确认创建稽查任务吗?'
})
.then(async () => {
// 如果稽查 ID 是空则创建一个 // 如果稽查 ID 是空则创建一个
if (!examined.value) { if (!examined.value) {
const result = await createExamine({ const result = await createExamine({
......
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
:error-message="errorTemWlSctMessage"> :error-message="errorTemWlSctMessage">
<template #input> <template #input>
<van-radio-group v-model="form.temWlSct" <van-radio-group v-model="form.temWlSct"
@change="validatorTemWlSct"
direction="horizontal"> direction="horizontal">
<van-radio icon-size="16px" <van-radio icon-size="16px"
name="有"></van-radio> name="有"></van-radio>
...@@ -282,16 +283,15 @@ const errorTemWlSctMessage = ref('') ...@@ -282,16 +283,15 @@ const errorTemWlSctMessage = ref('')
const errorPrdClassMessage = ref('') const errorPrdClassMessage = ref('')
// 校验午休结束时间 // 校验午休结束时间
const validatorNoonInTime = (value, obj) => { const validatorNoonInTime = (value, obj) => {
console.log(value, '午休结束判断该') console.log(form.noonOutTime.length > 0, '午休结束判断该')
if (form.noonOutTime.length > 0) { if (form.noonOutTime.length > 0) {
if (!value) { if (!value) {
errorNoonInTimeMessage.value = '请选择午休结束时间' errorNoonInTimeMessage.value = '请选择午休结束时间'
return false return false
} } else if (value <= form.noonOutTime) {
}
if (value <= form.noonOutTime) {
errorNoonInTimeMessage.value = '午休结束时间必须大于午休开始时间' errorNoonInTimeMessage.value = '午休结束时间必须大于午休开始时间'
return false return false
}
} else { } else {
errorNoonInTimeMessage.value = '' errorNoonInTimeMessage.value = ''
return true return true
...@@ -300,7 +300,7 @@ const validatorNoonInTime = (value, obj) => { ...@@ -300,7 +300,7 @@ const validatorNoonInTime = (value, obj) => {
// 校验试吃台 // 校验试吃台
const validatorTemWlSct = (value, obj) => { const validatorTemWlSct = (value, obj) => {
if (!value) { if (!value) {
errorTemWlSctMessage.value = obj.message errorTemWlSctMessage.value = obj?.message
return false return false
} else { } else {
errorTemWlSctMessage.value = '' errorTemWlSctMessage.value = ''
...@@ -521,6 +521,7 @@ const selPrdClass = () => { ...@@ -521,6 +521,7 @@ const selPrdClass = () => {
{ text: '黑鸭', value: '黑鸭' }, { text: '黑鸭', value: '黑鸭' },
{ text: '散称', value: '散称' }, { text: '散称', value: '散称' },
] ]
errorPrdClassMessage.value = ''
} }
// 重置表单 // 重置表单
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论