|
|
|
@ -59,10 +59,10 @@ |
|
|
|
:key="index" |
|
|
|
class="person-line" |
|
|
|
> |
|
|
|
<span class="person-name">{{ person.name }}</span> |
|
|
|
<span class="person-name">{{ person.name }} </span> |
|
|
|
<span class="person-phone">{{ person.phone }}</span> |
|
|
|
<van-icon |
|
|
|
v-if="personList.length > 1 && person.phone !== useCommon.phonenumber" |
|
|
|
v-if="personList.length > 1 && person.id !== useCommon.userId" |
|
|
|
name="close" |
|
|
|
class="person-remove" |
|
|
|
@click="removePerson(index)" |
|
|
|
@ -92,6 +92,7 @@ |
|
|
|
v-model="form.contactPerson" |
|
|
|
label="企业联系人" |
|
|
|
placeholder="请输入联系人" |
|
|
|
readonly |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 企业联系电话 --> |
|
|
|
@ -99,6 +100,9 @@ |
|
|
|
v-model="form.contactPhone" |
|
|
|
label="企业联系电话" |
|
|
|
placeholder="请输入联系电话" |
|
|
|
type="tel" |
|
|
|
maxlength="11" |
|
|
|
:rules="[{ pattern: /^\d{11}$/, message: '请输入11位手机号码' }]" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 执法事项 --> |
|
|
|
@ -345,14 +349,14 @@ const datePickerValue = ref([ |
|
|
|
]); |
|
|
|
|
|
|
|
const timeColumns = [ |
|
|
|
{ text: '上午', value: 1 }, |
|
|
|
{ text: '下午', value: 2 }, |
|
|
|
{ text: '其他', value: 3 }, |
|
|
|
{ text: '上午(9:00-12:00)', value: 1 }, |
|
|
|
{ text: '下午(14:00-18:00)', value: 2 }, |
|
|
|
{ text: '其他(18:00-21:00)', value: 3 }, |
|
|
|
]; |
|
|
|
|
|
|
|
// 日期+时段展示 |
|
|
|
const enforceTimeDisplay = computed(() => { |
|
|
|
const timeText = { 1: '上午', 2: '下午', 3: '其他' }; |
|
|
|
const timeText = { 1: '上午(9:00-12:00)', 2: '下午(14:00-18:00)', 3: '其他(18:00-21:00)' }; |
|
|
|
return timeText[form.value.enforceTime] || ''; |
|
|
|
}); |
|
|
|
|
|
|
|
@ -636,6 +640,12 @@ const validate = (isDraft) => { |
|
|
|
if (!form.value.enterpriseName) { showToast('请输入企业名称'); return false; } |
|
|
|
if (personList.value.length === 0) { showToast('请添加执法人员'); return false; } |
|
|
|
if (personList.value.length < 2) { showToast('执法人员不得少于2人'); return false; } |
|
|
|
// 校验企业联系电话 |
|
|
|
const phone = form.value.contactPhone; |
|
|
|
if (phone && !/^\d{11}$/.test(phone)) { |
|
|
|
showToast('请输入11位手机号码'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
return true; |
|
|
|
}; |
|
|
|
|
|
|
|
|