commit
This commit is contained in:
@@ -331,18 +331,18 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
</template>
|
</template>
|
||||||
<template #func>
|
<template #func>
|
||||||
<div class="mr10" v-if="unionLeaderCoach">
|
<!-- <div class="mr10" v-if="unionLeaderCoach">-->
|
||||||
<!--团长:<span style="color: #419BF8">{{headData.username | str}}</span> –>-->
|
<!-- <!–团长:<span style="color: #419BF8">{{headData.username | str}}</span> –>–>-->
|
||||||
领队兼教练:<span style="color: #419BF8">{{LeaderData.username | str}} </span> 
|
<!-- 领队兼教练:<span style="color: #419BF8">{{LeaderData.username | str}} </span> -->
|
||||||
<!-- 教练:<span style="color: #419BF8">{{CoachData.username | str}}</span>-->
|
<!--<!– 教练:<span style="color: #419BF8">{{CoachData.username | str}}</span>–>-->
|
||||||
<!-- 工作人员:<span
|
<!-- <!– 工作人员:<span-->
|
||||||
style="color: #419BF8">{{staffData.username | str}}</span>-->
|
<!-- style="color: #419BF8">{{staffData.username | str}}</span>–>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div>
|
<!-- <div>-->
|
||||||
<el-button @click="openLeaderCoach" type="primary"
|
<!-- <el-button @click="openLeaderCoach" type="primary"-->
|
||||||
v-if="unionLeaderCoach">设置领队/教练
|
<!-- v-if="unionLeaderCoach">设置领队/教练-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
@@ -501,6 +501,13 @@ layout("/layouts/platform.html"){
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
align="center" header-align="center" label="电话"
|
align="center" header-align="center" label="电话"
|
||||||
prop="mobile">
|
prop="mobile">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-input :value="row.mobile"
|
||||||
|
@input="setAppliedMobile(row, $event)"
|
||||||
|
clearable
|
||||||
|
maxlength="11"
|
||||||
|
placeholder="请输入手机号"></el-input>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -701,8 +708,11 @@ layout("/layouts/platform.html"){
|
|||||||
align="center" header-align="center" label="电话(手机)"
|
align="center" header-align="center" label="电话(手机)"
|
||||||
prop="mobile">
|
prop="mobile">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-input placeholder="请输入电话"
|
<el-input :value="row.mobile"
|
||||||
v-model="row.mobile"></el-input>
|
@input="setAppliedMobile(row, $event)"
|
||||||
|
clearable
|
||||||
|
maxlength="11"
|
||||||
|
placeholder="请输入手机号"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@@ -1351,6 +1361,10 @@ layout("/layouts/platform.html"){
|
|||||||
formRules: {
|
formRules: {
|
||||||
name: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
name: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
teamId: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
teamId: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
|
mobile: [
|
||||||
|
{required: true, message: "请填写手机号", trigger: ["blur", "change"]},
|
||||||
|
{pattern: /^1[3-9]\d{9}$/, message: "手机号填写不正确", trigger: ["blur", "change"]}
|
||||||
|
],
|
||||||
// position: [{required: true, message: "必填", trigger: ["blur", "change"]}]
|
// position: [{required: true, message: "必填", trigger: ["blur", "change"]}]
|
||||||
// userId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
// userId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
},
|
},
|
||||||
@@ -1389,6 +1403,25 @@ layout("/layouts/platform.html"){
|
|||||||
"delete_info": httpVueLoader("/components/activity/school/DeleteInfo.vue")
|
"delete_info": httpVueLoader("/components/activity/school/DeleteInfo.vue")
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 列表输入框统一通过 this.$set 更新手机号,保证编辑后的值参与提交校验。
|
||||||
|
setAppliedMobile(row, mobile) {
|
||||||
|
this.$set(row, "mobile", mobile)
|
||||||
|
},
|
||||||
|
// 提交前统一校验报名人员手机号,覆盖设置运动员后在下方列表修改的号码。
|
||||||
|
validateApplyMobiles(appliedData) {
|
||||||
|
const phoneRegex = /^1[3-9]\d{9}$/
|
||||||
|
for (let i = 0; i < appliedData.length; i++) {
|
||||||
|
if (!appliedData[i].mobile) {
|
||||||
|
this.$message.warning("请填写手机号!")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!phoneRegex.test(appliedData[i].mobile)) {
|
||||||
|
this.$message.warning("手机号填写不正确!")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
},
|
||||||
checkNum(row, num){
|
checkNum(row, num){
|
||||||
if (num < 1) {
|
if (num < 1) {
|
||||||
row.num = 1
|
row.num = 1
|
||||||
@@ -2141,21 +2174,12 @@ layout("/layouts/platform.html"){
|
|||||||
return v.teamId
|
return v.teamId
|
||||||
})
|
})
|
||||||
//判断每一个选手填写的是否正确
|
//判断每一个选手填写的是否正确
|
||||||
for (let i = 0; i < appliedData.length; i++) {
|
|
||||||
/*if (!appliedData[i].position) {
|
/*if (!appliedData[i].position) {
|
||||||
this.$message.warning("请填写完整职称职务!")
|
this.$message.warning("请填写完整职称职务!")
|
||||||
return
|
return
|
||||||
}*/
|
}*/
|
||||||
if (!appliedData[i].mobile) {
|
if (!this.validateApplyMobiles(appliedData)) {
|
||||||
this.$message.warning("请填写手机号!")
|
|
||||||
return
|
return
|
||||||
} else {
|
|
||||||
const phoneRegex = /^1[3-9]\d{9}$/;
|
|
||||||
if (!phoneRegex.test(appliedData[i].mobile)) {
|
|
||||||
this.$message.warning("手机号填写不正确!")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.appliedData3.length == 0 && this.appliedData.length == 0) {
|
if (this.appliedData3.length == 0 && this.appliedData.length == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user