Merge branch 'dev'
Showing
4 changed files
with
47 additions
and
40 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Description: 受理信息 | 2 | * @Description: 受理信息 |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2024-03-26 09:51:36 | 4 | * @LastEditTime: 2024-03-26 11:05:43 |
| 5 | --> | 5 | --> |
| 6 | <template> | 6 | <template> |
| 7 | <div class="slxx"> | 7 | <div class="slxx"> |
| ... | @@ -113,7 +113,7 @@ | ... | @@ -113,7 +113,7 @@ |
| 113 | </el-form-item> | 113 | </el-form-item> |
| 114 | </el-col> | 114 | </el-col> |
| 115 | <el-col :span="8"> | 115 | <el-col :span="8"> |
| 116 | <el-form-item label="土地性质:" prop="fdcq2.tdxz"> | 116 | <el-form-item label="土地性质:" prop="fdcq2.tdxz" :class="{ 'is-error': isError }"> |
| 117 | <treeselect | 117 | <treeselect |
| 118 | :disabled="!viewEdit" | 118 | :disabled="!viewEdit" |
| 119 | v-model="ruleForm.fdcq2.tdxz" | 119 | v-model="ruleForm.fdcq2.tdxz" |
| ... | @@ -495,6 +495,7 @@ | ... | @@ -495,6 +495,7 @@ |
| 495 | }, | 495 | }, |
| 496 | data () { | 496 | data () { |
| 497 | return { | 497 | return { |
| 498 | isError: false, | ||
| 498 | normalizer (node) { | 499 | normalizer (node) { |
| 499 | if (node.children == null || node.children == "null") { | 500 | if (node.children == null || node.children == "null") { |
| 500 | delete node.children; | 501 | delete node.children; |
| ... | @@ -637,6 +638,7 @@ | ... | @@ -637,6 +638,7 @@ |
| 637 | * @author: renchao | 638 | * @author: renchao |
| 638 | */ | 639 | */ |
| 639 | onSubmit () { | 640 | onSubmit () { |
| 641 | this.isError = false | ||
| 640 | let that = this; | 642 | let that = this; |
| 641 | let arr = this.ruleForm.tdytqxList.filter((item) => !item.yt); | 643 | let arr = this.ruleForm.tdytqxList.filter((item) => !item.yt); |
| 642 | if (arr.length > 0) { | 644 | if (arr.length > 0) { |
| ... | @@ -700,9 +702,9 @@ | ... | @@ -700,9 +702,9 @@ |
| 700 | }) | 702 | }) |
| 701 | } | 703 | } |
| 702 | } | 704 | } |
| 703 | this.$refs['ruleForm'].validate((valid) => { | 705 | this.$refs['ruleForm'].validate((valid, errors) => { |
| 704 | if (valid) { | 706 | if (valid) { |
| 705 | that.$store.dispatch("user/refreshPage", false); | 707 | that.$store.dispatch("user/refreshPage", false); |
| 706 | saveData(that.ruleForm).then((res) => { | 708 | saveData(that.ruleForm).then((res) => { |
| 707 | if (res.code === 200) { | 709 | if (res.code === 200) { |
| 708 | that.$message({ | 710 | that.$message({ |
| ... | @@ -715,12 +717,16 @@ | ... | @@ -715,12 +717,16 @@ |
| 715 | that.$message({ | 717 | that.$message({ |
| 716 | showClose: true, | 718 | showClose: true, |
| 717 | message: res.message, | 719 | message: res.message, |
| 718 | type: "error", | 720 | type: "error" |
| 719 | }); | 721 | }) |
| 720 | } | 722 | } |
| 721 | }) | 723 | }) |
| 722 | 724 | ||
| 723 | } else { | 725 | } else { |
| 726 | const fieldErrors = errors['fdcq2.tdxz']; | ||
| 727 | if (fieldErrors.length > 0) { | ||
| 728 | this.isError = true | ||
| 729 | } | ||
| 724 | that.$message({ | 730 | that.$message({ |
| 725 | showClose: true, | 731 | showClose: true, |
| 726 | message: "请输入红框内的相关信息!", | 732 | message: "请输入红框内的相关信息!", |
| ... | @@ -812,4 +818,9 @@ | ... | @@ -812,4 +818,9 @@ |
| 812 | /deep/.el-form-item__label { | 818 | /deep/.el-form-item__label { |
| 813 | padding-bottom: 0px; | 819 | padding-bottom: 0px; |
| 814 | } | 820 | } |
| 821 | |||
| 822 | /* 当校验失败时的边框样式 */ | ||
| 823 | /deep/.is-error .vue-treeselect div { | ||
| 824 | border-color: #f56c6c; /* 设置失败时的边框颜色为红色 */ | ||
| 825 | } | ||
| 815 | </style> | 826 | </style> | ... | ... |
| ... | @@ -12,7 +12,7 @@ export function formValidate (djlx) { | ... | @@ -12,7 +12,7 @@ export function formValidate (djlx) { |
| 12 | { required: true, message: '宗地面积:', trigger: 'blur' } | 12 | { required: true, message: '宗地面积:', trigger: 'blur' } |
| 13 | ], | 13 | ], |
| 14 | 'fdcq2.tdxz': [ | 14 | 'fdcq2.tdxz': [ |
| 15 | { required: false, message: '土地性质:', trigger: 'blur' } | 15 | { required: true, message: '土地性质:', trigger: 'blur' } |
| 16 | ], | 16 | ], |
| 17 | 'fdcq2.fwxz': [ | 17 | 'fdcq2.fwxz': [ |
| 18 | { required: true, message: '房屋性质:', trigger: 'blur' } | 18 | { required: true, message: '房屋性质:', trigger: 'blur' } | ... | ... |
| ... | @@ -86,7 +86,7 @@ | ... | @@ -86,7 +86,7 @@ |
| 86 | </el-form-item> | 86 | </el-form-item> |
| 87 | </el-col> | 87 | </el-col> |
| 88 | <el-col :span="8"> | 88 | <el-col :span="8"> |
| 89 | <el-form-item label="权利性质:"> | 89 | <el-form-item label="权利性质:" prop="zdjbxx.qlxz"> |
| 90 | <treeselect | 90 | <treeselect |
| 91 | :disabled="!viewEdit" | 91 | :disabled="!viewEdit" |
| 92 | v-model="ruleForm.zdjbxx.qlxz" | 92 | v-model="ruleForm.zdjbxx.qlxz" |
| ... | @@ -114,7 +114,7 @@ | ... | @@ -114,7 +114,7 @@ |
| 114 | </el-col> | 114 | </el-col> |
| 115 | 115 | ||
| 116 | <el-col :span="8"> | 116 | <el-col :span="8"> |
| 117 | <el-form-item label="宗地面积:"> | 117 | <el-form-item label="宗地面积:" prop="zdjbxx.zdmj"> |
| 118 | <el-input :disabled="!viewEdit" v-model="ruleForm.zdjbxx.zdmj"></el-input> | 118 | <el-input :disabled="!viewEdit" v-model="ruleForm.zdjbxx.zdmj"></el-input> |
| 119 | </el-form-item> | 119 | </el-form-item> |
| 120 | </el-col> | 120 | </el-col> |
| ... | @@ -178,7 +178,7 @@ | ... | @@ -178,7 +178,7 @@ |
| 178 | </el-form-item> | 178 | </el-form-item> |
| 179 | </el-col> | 179 | </el-col> |
| 180 | <el-col :span="16"> | 180 | <el-col :span="16"> |
| 181 | <el-form-item label="坐落:"> | 181 | <el-form-item label="坐落:" prop="sldy.zl"> |
| 182 | <el-input :disabled="!viewEdit" v-model="ruleForm.sldy.zl"></el-input> | 182 | <el-input :disabled="!viewEdit" v-model="ruleForm.sldy.zl"></el-input> |
| 183 | </el-form-item> | 183 | </el-form-item> |
| 184 | </el-col> | 184 | </el-col> |
| ... | @@ -327,7 +327,8 @@ | ... | @@ -327,7 +327,8 @@ |
| 327 | } | 327 | } |
| 328 | }) | 328 | }) |
| 329 | that.czrOptions = that.ruleForm.qlrList; | 329 | that.czrOptions = that.ruleForm.qlrList; |
| 330 | that.isSave = that.viewEdit | 330 | that.isSave = that.viewEdit; |
| 331 | this.rules = formValidate(this.ruleForm.sldy.djlx); | ||
| 331 | } else { | 332 | } else { |
| 332 | that.isSave = false | 333 | that.isSave = false |
| 333 | that.$confirm(res.message, '提示', { | 334 | that.$confirm(res.message, '提示', { |
| ... | @@ -374,11 +375,7 @@ | ... | @@ -374,11 +375,7 @@ |
| 374 | }, | 375 | }, |
| 375 | //传递参数 | 376 | //传递参数 |
| 376 | propsParam: {}, | 377 | propsParam: {}, |
| 377 | rules: { | 378 | rules: {} |
| 378 | 'jsydsyq.djyy': [ | ||
| 379 | { required: true, message: '请输入登记原因', trigger: 'blur' } | ||
| 380 | ] | ||
| 381 | } | ||
| 382 | }; | 379 | }; |
| 383 | }, | 380 | }, |
| 384 | methods: { | 381 | methods: { |
| ... | @@ -509,7 +506,7 @@ | ... | @@ -509,7 +506,7 @@ |
| 509 | } else { | 506 | } else { |
| 510 | this.$message({ | 507 | this.$message({ |
| 511 | showClose: true, | 508 | showClose: true, |
| 512 | message: "请输入登记原因", | 509 | message: "请输入红框内的相关信息!", |
| 513 | type: "error" | 510 | type: "error" |
| 514 | }) | 511 | }) |
| 515 | return false | 512 | return false | ... | ... |
| ... | @@ -4,22 +4,27 @@ | ... | @@ -4,22 +4,27 @@ |
| 4 | * @author: renchao | 4 | * @author: renchao |
| 5 | */ | 5 | */ |
| 6 | export function formValidate (djlx) { | 6 | export function formValidate (djlx) { |
| 7 | switch (djlx) { | 7 | var formRules={ |
| 8 | case "100": | 8 | 'sldy.zl': [ |
| 9 | return fristValidate(); | 9 | { required: true, message: '坐落:', trigger: 'blur' } |
| 10 | case "200": | 10 | ], |
| 11 | return transferValidate(); | 11 | 'zdjbxx.zdmj': [ |
| 12 | case "300": | 12 | { required: true, message: '宗地面积:', trigger: 'blur' } |
| 13 | return changeValidate(); | 13 | ], |
| 14 | case "400": | 14 | 'zdjbxx.qlxz': [ |
| 15 | return logoutValidate(); | 15 | { required: true, message: '权利性质:', trigger: 'blur' } |
| 16 | case "500": | 16 | ], |
| 17 | return riviseValidate(); | 17 | 'jsydsyq.djyy': [ |
| 18 | case "901": | 18 | { required: true, message: '登记原因:', trigger: 'blur' } |
| 19 | return renewalValidate(); | 19 | ], |
| 20 | case "902": | 20 | 'jsydsyq.qdjg': [ |
| 21 | return replaceValidate(); | 21 | { required: false, message: '取得价格:', trigger: 'blur' } |
| 22 | } | 22 | ] |
| 23 | } | ||
| 24 | if (djlx=="200") { | ||
| 25 | formRules["jsydsyq.qdjg"][0].required=true; | ||
| 26 | } | ||
| 27 | return formRules; | ||
| 23 | } | 28 | } |
| 24 | 29 | ||
| 25 | /** | 30 | /** |
| ... | @@ -27,13 +32,7 @@ export function formValidate (djlx) { | ... | @@ -27,13 +32,7 @@ export function formValidate (djlx) { |
| 27 | * @param {*} data | 32 | * @param {*} data |
| 28 | * @author: renchao | 33 | * @author: renchao |
| 29 | */ | 34 | */ |
| 30 | export function fristValidate () { | 35 | export function fristValidate () { |
| 31 | var formRules={ | ||
| 32 | 'diyaq.djyy': [ | ||
| 33 | { required: true, message: '请输入登记原因', trigger: 'blur' } | ||
| 34 | ] | ||
| 35 | } | ||
| 36 | return formRules; | ||
| 37 | } | 36 | } |
| 38 | 37 | ||
| 39 | 38 | ... | ... |
-
Please register or sign in to post a comment