diff --git a/src/views/caseManage/createCase.vue b/src/views/caseManage/createCase.vue index 6d1dfc2..a31651d 100644 --- a/src/views/caseManage/createCase.vue +++ b/src/views/caseManage/createCase.vue @@ -93,16 +93,14 @@ - - + - 地图选点 ({{ form.lng }},{{ form.lat }}) @@ -214,7 +212,7 @@ const validateAddress = function(rule, value, callback) { console.log(value) // if (value.areaCode === '' || value.streetCode === '' || value.communityCode === '') { - if (value.areaCode === '' || value.streetCode === '') { + if (value.areaCode === '' || value.streetCode === '' || value.fieldintro.trim() === '') { callback(new Error('地址需填写完整')) } else { callback() @@ -349,8 +347,8 @@ // 提交 submit() { this.$refs['form'].validate((valid) => { - if (valid) { - // 校验通过 + if (valid && this.twiceValidate()) { + // 初步校验通过 const form = { caseId: this.form.caseId, // 案卷编号,年月日时分秒毫秒+坐席号 sound: this.form.sound, // 来电录音编号 @@ -390,6 +388,15 @@ } }) }, + // 二次校验 + twiceValidate() { + if (this.form.processWay === 6 && (this.form.lng || this.form.lat)) { + this.$message.warning('请在地图上选点') + return false + } else { + return true + } + }, // 初始化数据 initData(data) { this.form = {