style:证书入库初始化表单验证
Showing
2 changed files
with
199 additions
and
205 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-09-21 10:41:10 | 4 | * @LastEditTime: 2023-10-18 14:49:25 |
| 5 | --> | 5 | --> |
| 6 | <template> | 6 | <template> |
| 7 | <div class="from-clues"> | 7 | <div class="from-clues"> |
| ... | @@ -103,12 +103,6 @@ | ... | @@ -103,12 +103,6 @@ |
| 103 | * @author: renchao | 103 | * @author: renchao |
| 104 | */ | 104 | */ |
| 105 | openDialog (item) { | 105 | openDialog (item) { |
| 106 | // bdcqzPreview(item).then(res => { | ||
| 107 | // this.$popupDialog("证书证明预览", "workflow/components/dialog/zsylxq", { | ||
| 108 | // bsmSlsq: item.bsmSlsq, | ||
| 109 | // bsmBdcqz: item.bsmBdcqz | ||
| 110 | // }, '1230px', true) | ||
| 111 | // }) | ||
| 112 | this.$popupDialog("证书证明预览", "workflow/components/dialog/zsylxq", { | 106 | this.$popupDialog("证书证明预览", "workflow/components/dialog/zsylxq", { |
| 113 | bsmSlsq: item.bsmSlsq, | 107 | bsmSlsq: item.bsmSlsq, |
| 114 | bsmBdcqz: item.bsmBdcqz | 108 | bsmBdcqz: item.bsmBdcqz | ... | ... |
| ... | @@ -9,7 +9,7 @@ | ... | @@ -9,7 +9,7 @@ |
| 9 | <el-col :span="12"> | 9 | <el-col :span="12"> |
| 10 | <el-form-item label="登记机构:" prop="djjg"> | 10 | <el-form-item label="登记机构:" prop="djjg"> |
| 11 | <el-select v-model="ruleForm.djjg" class="width100" placeholder="请选择" :disabled="!readOnly"> | 11 | <el-select v-model="ruleForm.djjg" class="width100" placeholder="请选择" :disabled="!readOnly"> |
| 12 | <el-option v-for="item in DJJGLIST" :key="item.dname" :label="item.dname" :value="item.dname"> | 12 | <el-option v-for="item in DJJGLIST" :key="item.dname" :label="item.dname" :value="item.dname"> |
| 13 | </el-option> | 13 | </el-option> |
| 14 | </el-select> | 14 | </el-select> |
| 15 | </el-form-item> | 15 | </el-form-item> |
| ... | @@ -66,223 +66,223 @@ | ... | @@ -66,223 +66,223 @@ |
| 66 | </template> | 66 | </template> |
| 67 | 67 | ||
| 68 | <script> | 68 | <script> |
| 69 | import store from '@/store/index.js' | 69 | import store from '@/store/index.js' |
| 70 | import { zsrk, getZsglInfo } from "@/api/zsgl.js" | 70 | import { zsrk, getZsglInfo } from "@/api/zsgl.js" |
| 71 | import { getSysSerialSingle } from "@/api/sysSerial.js" | 71 | import { getSysSerialSingle } from "@/api/sysSerial.js" |
| 72 | export default { | 72 | export default { |
| 73 | props: { | 73 | props: { |
| 74 | formData: { | 74 | formData: { |
| 75 | type: Object, | 75 | type: Object, |
| 76 | default: () => { }, | 76 | default: () => { }, |
| 77 | }, | ||
| 78 | }, | ||
| 79 | data () { | ||
| 80 | return { | ||
| 81 | DJJGLIST: store.getters.dictData['ywly'], | ||
| 82 | readOnly: false, | ||
| 83 | //表单提交数据 | ||
| 84 | ruleForm: { | ||
| 85 | batchno: '', | ||
| 86 | djjg: '', | ||
| 87 | operator: '超级管理员', | ||
| 88 | operationtime: '', | ||
| 89 | bz: '', | ||
| 90 | zsstarno: '', | ||
| 91 | zsendno: '', | ||
| 92 | zsnum: '', | ||
| 93 | zmstarno: '', | ||
| 94 | zmendno: '', | ||
| 95 | zmnum: '' | ||
| 96 | }, | 77 | }, |
| 97 | //表格数据 | 78 | }, |
| 98 | tableForm: [ | 79 | data () { |
| 99 | { | 80 | return { |
| 100 | name: '不动产权证书', | 81 | DJJGLIST: store.getters.dictData['ywly'], |
| 101 | ksysxlh: '', | 82 | readOnly: false, |
| 102 | jsysxlh: '', | 83 | //表单提交数据 |
| 103 | bs: 0, | 84 | ruleForm: { |
| 104 | zslx: 1 | 85 | batchno: '', |
| 86 | djjg: '', | ||
| 87 | operator: '超级管理员', | ||
| 88 | operationtime: '', | ||
| 89 | bz: '', | ||
| 90 | zsstarno: '', | ||
| 91 | zsendno: '', | ||
| 92 | zsnum: '', | ||
| 93 | zmstarno: '', | ||
| 94 | zmendno: '', | ||
| 95 | zmnum: '' | ||
| 105 | }, | 96 | }, |
| 106 | { | 97 | //表格数据 |
| 107 | name: '不动产登记证明', | 98 | tableForm: [ |
| 108 | ksysxlh: '', | 99 | { |
| 109 | jsysxlh: '', | 100 | name: '不动产权证书', |
| 110 | bs: 0, | 101 | ksysxlh: '', |
| 111 | zslx: 2 | 102 | jsysxlh: '', |
| 112 | } | 103 | bs: 0, |
| 113 | ], | 104 | zslx: 1 |
| 114 | //证书入库业务号参数 | 105 | }, |
| 115 | ywhQueryForm: { | 106 | { |
| 116 | serialtype: 'zsrkbh', | 107 | name: '不动产登记证明', |
| 117 | serialname: '证书入库编号', | 108 | ksysxlh: '', |
| 118 | serialcode: 'zsrk', | 109 | jsysxlh: '', |
| 119 | digit: '5' | 110 | bs: 0, |
| 120 | }, | 111 | zslx: 2 |
| 121 | rules: { | 112 | } |
| 122 | batchNo: [ | ||
| 123 | { required: true, message: '入库编号不能为空', trigger: 'blur' } | ||
| 124 | ], | ||
| 125 | djjg: [ | ||
| 126 | { required: true, message: '请选择登记机构', trigger: 'change' } | ||
| 127 | ], | ||
| 128 | rksj: [ | ||
| 129 | { required: true, message: '请选择入库时间', trigger: 'change' } | ||
| 130 | ], | 113 | ], |
| 131 | }, | 114 | //证书入库业务号参数 |
| 132 | } | 115 | ywhQueryForm: { |
| 133 | }, | 116 | serialtype: 'zsrkbh', |
| 134 | mounted () { | 117 | serialname: '证书入库编号', |
| 135 | if (this.formData.bsmBatch) { | 118 | serialcode: 'zsrk', |
| 136 | this.tableForm[0].bs = null; | 119 | digit: '5' |
| 137 | this.tableForm[1].bs = null; | 120 | }, |
| 138 | this.getDetailInfo(this.formData.bsmBatch); | 121 | rules: { |
| 139 | } else { | 122 | batchNo: [ |
| 140 | this.ywhSerial(); | 123 | { required: true, message: '入库编号不能为空', trigger: 'blur' } |
| 141 | } | 124 | ], |
| 142 | }, | 125 | djjg: [ |
| 143 | methods: { | 126 | { required: true, message: '请选择登记机构', trigger: 'change' } |
| 144 | //表单提交 | 127 | ], |
| 145 | /** | 128 | rksj: [ |
| 146 | * @description: 表单提交 | 129 | { required: true, message: '请选择入库时间', trigger: 'change' } |
| 147 | * @author: renchao | 130 | ], |
| 148 | */ | 131 | }, |
| 149 | submitForm () { | 132 | } |
| 150 | this.tableForm.forEach((item, index) => { | ||
| 151 | if (item.bs < 0) { | ||
| 152 | return; | ||
| 153 | } | ||
| 154 | }) | ||
| 155 | zsrk(this.ruleForm).then(res => { | ||
| 156 | if (res.code == 200) { | ||
| 157 | this.$message.success('保存成功') | ||
| 158 | this.$emit("input", false); | ||
| 159 | this.$refs['ruleForm'].resetFields(); | ||
| 160 | this.resetTableFields(); | ||
| 161 | this.$parent.queryClick(); | ||
| 162 | } else { | ||
| 163 | this.$message.error(res.message); | ||
| 164 | } | ||
| 165 | }) | ||
| 166 | }, | ||
| 167 | //序列号获取 | ||
| 168 | /** | ||
| 169 | * @description: 序列号获取 | ||
| 170 | * @author: renchao | ||
| 171 | */ | ||
| 172 | ywhSerial () { | ||
| 173 | getSysSerialSingle(this.ywhQueryForm).then(res => { | ||
| 174 | if (res.code == 200) { | ||
| 175 | this.ruleForm.batchno = res.message; | ||
| 176 | this.readOnly = true; | ||
| 177 | } | ||
| 178 | }) | ||
| 179 | }, | 133 | }, |
| 180 | //获取详情信息 | 134 | mounted () { |
| 181 | /** | 135 | if (this.formData.bsmBatch) { |
| 182 | * @description: 获取详情信息 | 136 | this.tableForm[0].bs = null; |
| 183 | * @param {*} bsmBatch | 137 | this.tableForm[1].bs = null; |
| 184 | * @author: renchao | 138 | this.getDetailInfo(this.formData.bsmBatch); |
| 185 | */ | 139 | } else { |
| 186 | getDetailInfo (bsmBatch) { | 140 | this.ywhSerial(); |
| 187 | getZsglInfo({ "bsmBatch": bsmBatch }).then(res => { | 141 | } |
| 188 | if (res.code == 200) { | ||
| 189 | this.ruleForm = res.result; | ||
| 190 | this.readOnly = false; | ||
| 191 | this.tableForm[0].ksysxlh = res.result.zsstarno; | ||
| 192 | this.tableForm[0].jsysxlh = res.result.zsendno; | ||
| 193 | this.tableForm[0].bs = res.result.zsnum; | ||
| 194 | this.tableForm[1].ksysxlh = res.result.zmstarno; | ||
| 195 | this.tableForm[1].jsysxlh = res.result.zmendno; | ||
| 196 | this.tableForm[1].bs = res.result.zmnum; | ||
| 197 | } | ||
| 198 | }) | ||
| 199 | }, | 142 | }, |
| 200 | //印刷序列号处理 | 143 | methods: { |
| 201 | /** | 144 | /** |
| 202 | * @description: 印刷序列号处理 | 145 | * @description: 表单提交 |
| 203 | * @param {*} item | 146 | * @author: renchao |
| 204 | * @author: renchao | 147 | */ |
| 205 | */ | 148 | submitForm () { |
| 206 | ysxlhDeal (item) { | 149 | this.tableForm.forEach((item, index) => { |
| 207 | if (item.ksysxlh && item.jsysxlh) { | 150 | if (item.bs < 0) { |
| 208 | if (item.ksysxlh.length == item.jsysxlh.length) { | ||
| 209 | if (item.ksysxlh.length != 11) { | ||
| 210 | item.bs = -1; | ||
| 211 | return; | 151 | return; |
| 212 | } | 152 | } |
| 213 | if (item.ksysxlh > item.jsysxlh) { | 153 | }) |
| 154 | zsrk(this.ruleForm).then(res => { | ||
| 155 | if (res.code == 200) { | ||
| 156 | this.$message.success('保存成功') | ||
| 157 | this.$emit("input", false); | ||
| 158 | this.$refs['ruleForm'].resetFields(); | ||
| 159 | this.resetTableFields(); | ||
| 160 | this.$parent.queryClick(); | ||
| 161 | } else { | ||
| 162 | this.$message.error(res.message); | ||
| 163 | } | ||
| 164 | }) | ||
| 165 | }, | ||
| 166 | //序列号获取 | ||
| 167 | /** | ||
| 168 | * @description: 序列号获取 | ||
| 169 | * @author: renchao | ||
| 170 | */ | ||
| 171 | ywhSerial () { | ||
| 172 | getSysSerialSingle(this.ywhQueryForm).then(res => { | ||
| 173 | if (res.code == 200) { | ||
| 174 | this.ruleForm.batchno = res.message; | ||
| 175 | this.readOnly = true; | ||
| 176 | } | ||
| 177 | }) | ||
| 178 | }, | ||
| 179 | //获取详情信息 | ||
| 180 | /** | ||
| 181 | * @description: 获取详情信息 | ||
| 182 | * @param {*} bsmBatch | ||
| 183 | * @author: renchao | ||
| 184 | */ | ||
| 185 | getDetailInfo (bsmBatch) { | ||
| 186 | getZsglInfo({ "bsmBatch": bsmBatch }).then(res => { | ||
| 187 | if (res.code == 200) { | ||
| 188 | this.ruleForm = res.result; | ||
| 189 | this.$refs.ruleForm.resetFields() | ||
| 190 | this.readOnly = false; | ||
| 191 | this.tableForm[0].ksysxlh = res.result.zsstarno; | ||
| 192 | this.tableForm[0].jsysxlh = res.result.zsendno; | ||
| 193 | this.tableForm[0].bs = res.result.zsnum; | ||
| 194 | this.tableForm[1].ksysxlh = res.result.zmstarno; | ||
| 195 | this.tableForm[1].jsysxlh = res.result.zmendno; | ||
| 196 | this.tableForm[1].bs = res.result.zmnum; | ||
| 197 | } | ||
| 198 | }) | ||
| 199 | }, | ||
| 200 | //印刷序列号处理 | ||
| 201 | /** | ||
| 202 | * @description: 印刷序列号处理 | ||
| 203 | * @param {*} item | ||
| 204 | * @author: renchao | ||
| 205 | */ | ||
| 206 | ysxlhDeal (item) { | ||
| 207 | if (item.ksysxlh && item.jsysxlh) { | ||
| 208 | if (item.ksysxlh.length == item.jsysxlh.length) { | ||
| 209 | if (item.ksysxlh.length != 11) { | ||
| 210 | item.bs = -1; | ||
| 211 | return; | ||
| 212 | } | ||
| 213 | if (item.ksysxlh > item.jsysxlh) { | ||
| 214 | item.bs = -1; | ||
| 215 | return; | ||
| 216 | } | ||
| 217 | item.bs = item.jsysxlh - item.ksysxlh + 1; | ||
| 218 | if (item.zslx == 1) { | ||
| 219 | this.ruleForm.zsstarno = item.ksysxlh; | ||
| 220 | this.ruleForm.zsendno = item.jsysxlh; | ||
| 221 | this.ruleForm.zsnum = item.bs | ||
| 222 | } else if (item.zslx == 2) { | ||
| 223 | this.ruleForm.zmstarno = item.ksysxlh; | ||
| 224 | this.ruleForm.zmendno = item.jsysxlh; | ||
| 225 | this.ruleForm.zmnum = item.bs | ||
| 226 | } | ||
| 227 | } else { | ||
| 214 | item.bs = -1; | 228 | item.bs = -1; |
| 215 | return; | ||
| 216 | } | 229 | } |
| 217 | item.bs = item.jsysxlh - item.ksysxlh + 1; | 230 | } else { |
| 231 | item.bs = 0; | ||
| 218 | if (item.zslx == 1) { | 232 | if (item.zslx == 1) { |
| 219 | this.ruleForm.zsstarno = item.ksysxlh; | 233 | this.ruleForm.zsstarno = ''; |
| 220 | this.ruleForm.zsendno = item.jsysxlh; | 234 | this.ruleForm.zsendno = ''; |
| 221 | this.ruleForm.zsnum = item.bs | 235 | this.ruleForm.zsnum = item.bs |
| 222 | } else if (item.zslx == 2) { | 236 | } else if (item.zslx == 2) { |
| 223 | this.ruleForm.zmstarno = item.ksysxlh; | 237 | this.ruleForm.zmstarno = ''; |
| 224 | this.ruleForm.zmendno = item.jsysxlh; | 238 | this.ruleForm.zmendno = ''; |
| 225 | this.ruleForm.zmnum = item.bs | 239 | this.ruleForm.zmnum = item.bs |
| 226 | } | 240 | } |
| 227 | } else { | ||
| 228 | item.bs = -1; | ||
| 229 | } | ||
| 230 | } else { | ||
| 231 | item.bs = 0; | ||
| 232 | if (item.zslx == 1) { | ||
| 233 | this.ruleForm.zsstarno = ''; | ||
| 234 | this.ruleForm.zsendno = ''; | ||
| 235 | this.ruleForm.zsnum = item.bs | ||
| 236 | } else if (item.zslx == 2) { | ||
| 237 | this.ruleForm.zmstarno = ''; | ||
| 238 | this.ruleForm.zmendno = ''; | ||
| 239 | this.ruleForm.zmnum = item.bs | ||
| 240 | } | 241 | } |
| 242 | }, | ||
| 243 | /** | ||
| 244 | * @description: resetTableFields | ||
| 245 | * @author: renchao | ||
| 246 | */ | ||
| 247 | resetTableFields () { | ||
| 248 | this.tableForm = [ | ||
| 249 | { | ||
| 250 | name: '不动产权证书', | ||
| 251 | ksysxlh: '', | ||
| 252 | jsysxlh: '', | ||
| 253 | bs: 0, | ||
| 254 | zslx: 1 | ||
| 255 | }, | ||
| 256 | { | ||
| 257 | name: '不动产权登记证明', | ||
| 258 | ksysxlh: '', | ||
| 259 | jsysxlh: '', | ||
| 260 | bs: 0, | ||
| 261 | zslx: 2 | ||
| 262 | } | ||
| 263 | ] | ||
| 264 | }, | ||
| 265 | /** | ||
| 266 | * @description: closeDialog | ||
| 267 | * @author: renchao | ||
| 268 | */ | ||
| 269 | closeDialog () { | ||
| 270 | this.$popupCacel() | ||
| 271 | this.$refs['ruleForm'].resetFields(); | ||
| 272 | this.resetTableFields(); | ||
| 241 | } | 273 | } |
| 242 | }, | ||
| 243 | /** | ||
| 244 | * @description: resetTableFields | ||
| 245 | * @author: renchao | ||
| 246 | */ | ||
| 247 | resetTableFields () { | ||
| 248 | this.tableForm = [ | ||
| 249 | { | ||
| 250 | name: '不动产权证书', | ||
| 251 | ksysxlh: '', | ||
| 252 | jsysxlh: '', | ||
| 253 | bs: 0, | ||
| 254 | zslx: 1 | ||
| 255 | }, | ||
| 256 | { | ||
| 257 | name: '不动产权登记证明', | ||
| 258 | ksysxlh: '', | ||
| 259 | jsysxlh: '', | ||
| 260 | bs: 0, | ||
| 261 | zslx: 2 | ||
| 262 | } | ||
| 263 | ] | ||
| 264 | }, | ||
| 265 | /** | ||
| 266 | * @description: closeDialog | ||
| 267 | * @author: renchao | ||
| 268 | */ | ||
| 269 | closeDialog () { | ||
| 270 | this.$popupCacel() | ||
| 271 | this.$refs['ruleForm'].resetFields(); | ||
| 272 | this.resetTableFields(); | ||
| 273 | } | 274 | } |
| 274 | } | 275 | } |
| 275 | } | ||
| 276 | </script> | 276 | </script> |
| 277 | <style scoped lang="scss"> | 277 | <style scoped lang="scss"> |
| 278 | @import "~@/styles/mixin.scss"; | 278 | @import "~@/styles/mixin.scss"; |
| 279 | @import "~@/styles/dialogBoxheader.scss"; | 279 | @import "~@/styles/dialogBoxheader.scss"; |
| 280 | 280 | ||
| 281 | .font-red { | 281 | .font-red { |
| 282 | color: red | 282 | color: red; |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | .middle-margin-bottom { | 285 | .middle-margin-bottom { |
| 286 | margin-top: 20px | 286 | margin-top: 20px; |
| 287 | } | 287 | } |
| 288 | </style> | 288 | </style> | ... | ... |
-
Please register or sign in to post a comment