fix 79554

This commit is contained in:
danshihao
2023-12-22 16:48:30 +08:00
parent 370b6abef6
commit d9311dbb7e
2 changed files with 75 additions and 15 deletions
@@ -251,11 +251,18 @@ export default {
// 去除备注必填
this.validatorRules.remarks.rules[0].required = false
const params = {}
// 记录验证是否报错
let err = null
// 收集所有表单信息
let formDataList = []
if (isValidate) {
formDataList = await this.validateFormList(this.processInfoForm, this.approvalInfoForm)
formDataList[2] = await this.$refs.baseInfoForm.getDataValidate()
formDataList = await this.validateFormList(this.processInfoForm, this.approvalInfoForm).catch(() => {
err = 'base'
return []
})
formDataList[2] = await this.$refs.baseInfoForm.getDataValidate().catch(() => {
err = 'base'
})
} else {
formDataList = [
this.processInfoForm.getFieldsValue(),
@@ -287,7 +294,10 @@ export default {
projectId: this.projectId,
id: this.formInfo.id
})
// 如果有错误就跳转对应页面
if (err !== null) {
throw new Error(err)
}
return params
},
/**
@@ -76,6 +76,7 @@
</div>
<a-form-model-item class="item-model" prop="mainDepart">
<a-input v-model="formInline.mainDepart"
@change="event => formInline.mainDepart = event.target.value.trim()"
:maxLength="50"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.mainDeliveryDepart')" />
</a-form-model-item>
@@ -90,6 +91,7 @@
</div>
<a-form-model-item class="item-model" prop="declareTopic">
<a-input v-model="formInline.declareTopic"
@change="event => formInline.declareTopic = event.target.value.trim()"
:maxLength="50"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.subject')" />
</a-form-model-item>
@@ -210,38 +212,86 @@ export default {
// 是否禁用联络人
disabledInitiator: true,
rules: {
// 操作类型
operationType: [
// 紧急程度
emergencyDegree: [
{
required: true,
message: this.$t('workCenter.esInspectionRectification.operationType') + this.$t('cannotEmpty'),
message: this.$t('pleaseSelect') + this.$t('workCenter.standardPromotionProcess.urgency'),
trigger: 'change'
}
],
// 整改结果
rectificationResults: [
// 企标编号
standardNo: [
{
required: true,
message: this.$t('workCenter.esInspectionRectification.rectificationResults') + this.$t('cannotEmpty'),
message: this.$t('pleaseSelect') + this.$t('workCenter.standardPromotionProcess.esNumber'),
trigger: 'change'
}
],
// 宣贯人
declareUser: [
{
required: true,
message: this.$t('pleaseSelect') + this.$t('workCenter.standardPromotionProcess.promoter'),
trigger: 'change'
}
],
// 主送部门
mainDepart: [
{
required: true,
message: this.$t('pleaseEnter') + this.$t('workCenter.standardPromotionProcess.mainDeliveryDepart'),
trigger: 'blur'
}
],
// 申请延期日期
requestExtensionDate: [
// 主题
declareTopic: [
{
required: true,
message: this.$t('workCenter.esInspectionRectification.requestExtensionDate') + this.$t('cannotEmpty'),
message: this.$t('pleaseEnter') + this.$t('workCenter.standardPromotionProcess.subject'),
trigger: 'blur'
}
],
// 宣贯日期
declareDate: [
{
required: true,
message: this.$t('pleaseSelect') + this.$t('workCenter.standardPromotionProcess.promotionDate'),
trigger: 'change'
}
],
// 延期说明
extensionDescription: [
// 参宣单位
attendUnit: [
{
required: true,
message: this.$t('workCenter.esInspectionRectification.extensionDescription') + this.$t('cannotEmpty'),
message: this.$t('pleaseSelect') + this.$t('workCenter.standardPromotionProcess.participatingUnits'),
trigger: 'change'
}
],
// 联络人
initiator: [
{
required: true,
message: this.$t('pleaseEnter') + this.$t('workCenter.standardPromotionProcess.contactPerson'),
trigger: 'change'
}
],
// 内容
declareContent: [
{
required: true,
message: this.$t('pleaseEnter') + this.$t('workCenter.standardPromotionProcess.content'),
trigger: 'blur'
}
]
// 宣贯材料
// declareFile: [
// {
// required: true,
// message: this.$t('pleaseEnter') + this.$t('workCenter.standardPromotionProcess.promotionalMaterials'),
// trigger: 'change'
// }
// ]
}
}
},