Merge branch 'feat_可同步长江大学的优化_fix' into feat_本工会单独业务
This commit is contained in:
@@ -119,7 +119,7 @@ layout("/layouts/platform.html"){
|
||||
currentTreeNode: null,
|
||||
currentTreeData: null,
|
||||
|
||||
checkData: {},
|
||||
checkData: { id: "0", name: "无(新建根节点)" },
|
||||
tableData: [],
|
||||
|
||||
basicTypeDialog: false,
|
||||
@@ -146,10 +146,8 @@ layout("/layouts/platform.html"){
|
||||
|
||||
getTreeData() {
|
||||
this.$axios.post(loc() + "/tree").then((res) => {
|
||||
this.treeData = res.data
|
||||
if (this.treeData) {
|
||||
this.checkData = this.treeData[0]
|
||||
}
|
||||
this.treeData = res.data || []
|
||||
this.checkData = this.treeData.length ? this.treeData[0] : { id: "0", name: "无(新建根节点)" }
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@@ -370,12 +370,14 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :span="24">
|
||||
<el-form-item label="报名表单" prop="formConfig"
|
||||
v-if="formData.isEnrollSystem&&formData.signUpMethod===1">
|
||||
<custom-form-field v-model="formData.formConfig"></custom-form-field>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
-->
|
||||
|
||||
<el-col :span="24" v-if="formData.signUpMethod!=null&&formData.isEnrollSystem">
|
||||
<el-form-item label="封面图" prop="cover">
|
||||
@@ -592,6 +594,7 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
name: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||
type: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||
projectTypeCode: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||
mobile: this.activity_type === 40001 ? [{pattern: /^1[3-9]\d{9}$/, message: "请输入正确的手机号码", trigger: ["blur", "change"]}] : [],
|
||||
address: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||
plannedDate: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||
time: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||
@@ -725,7 +728,15 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
return true
|
||||
},
|
||||
// 保存
|
||||
onSave() {
|
||||
async onSave() {
|
||||
if (this.activity_type === 40001) {
|
||||
const mobileValid = await new Promise(resolve => {
|
||||
this.$refs["addForm"].validateField("mobile", error => resolve(!error))
|
||||
})
|
||||
if (!mobileValid) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if (!this.formData.projectTypeCode) {
|
||||
this.$message.error("请选择活动项目类型")
|
||||
return
|
||||
|
||||
@@ -585,11 +585,13 @@ const basicForm = {
|
||||
return
|
||||
}
|
||||
const courseValid = this.formData.courseList.some((v, i) => {
|
||||
// 新活动通过多选关系设置负责人;未重新设置的旧活动仍允许保留历史联系人。
|
||||
const hasResponsible = Array.isArray(v.responsibleList)
|
||||
? v.responsibleList.length > 0 : !!v.courseInstructor
|
||||
const basicValid = v.courseName && v.coursePeopleNumber && v.courseLocation && hasResponsible && v.courseType
|
||||
const missingFields = []
|
||||
if (!v.courseName) missingFields.push(this.trainType + "名称")
|
||||
if (!v.coursePeopleNumber) missingFields.push(this.trainType + "人数(不能为空或为0)")
|
||||
if (!v.courseLocation) missingFields.push(this.trainType + "地点")
|
||||
if (!v.courseType) missingFields.push("类型")
|
||||
const timeValid =
|
||||
Array.isArray(v.courseTimeList) &&
|
||||
v.courseTimeList.length > 0 &&
|
||||
v.courseTimeList.every((x) => {
|
||||
return x.courseStartTime && x.courseEndTime && x.courseStartTime < x.courseEndTime
|
||||
@@ -598,8 +600,8 @@ const basicForm = {
|
||||
this.$message.warning("第" + (i + 1) + "行时间填写有误,请核查")
|
||||
return true
|
||||
}
|
||||
if (!basicValid) {
|
||||
this.$message.warning("第" + (i + 1) + "行信息填写有误,请核查")
|
||||
if (missingFields.length > 0) {
|
||||
this.$message.warning("第" + (i + 1) + "行请补充:" + missingFields.join("、"))
|
||||
return true
|
||||
}
|
||||
// 联系方式允许手机号或办公电话,逐人校验,不能只检查兼容展示的第一位。
|
||||
|
||||
Reference in New Issue
Block a user