From 7c8dd44c55e2f381f211937e9f5bc91bdfc20928 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Mon, 9 Sep 2024 18:03:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E4=BA=A7=E8=A1=A8=E5=8D=95=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/assets/component/addHouse.vue | 80 +++++++++++++++++++++++++ src/views/assets/component/addLand.vue | 80 +++++++++++++++++++++++++ src/views/assets/handleSign.vue | 2 +- src/views/assets/house.vue | 4 +- src/views/assets/land.vue | 4 +- 5 files changed, 165 insertions(+), 5 deletions(-) diff --git a/src/views/assets/component/addHouse.vue b/src/views/assets/component/addHouse.vue index fd49d1f..869a4ca 100644 --- a/src/views/assets/component/addHouse.vue +++ b/src/views/assets/component/addHouse.vue @@ -13,6 +13,67 @@ export default { render(h) { const _this = this; let houseDialog = new CreateDialog(this, [ + { + show: true, + key: "bufuyuanyin", + label: "不符原因", + render: h("el-input", { + props: { + disabled: this.form.dengjimianji === this.form.shijimianji, + size: "small", + value: this.form["bufuyuanyin"], + }, + on: { + input: e => { + this.$set(this.form,'bufuyuanyin',e) + } + } + }), + }, + { + show: true, + key: "xianzhuang", + label: "现状", + render: h("div",[ + h('el-select',{ + props: { + size: 'small', + value: this.form.xianzhuang + }, + style: { + width: '100%' + }, + on: { + input: e => { + this.$set(this.form,'xianzhuang',e) + } + } + },this.formInfo?.find(i => i.field === 'xianzhuang')?._params?.map(i => h('el-option',{ + props: { + label: i.key, + value: i.value + } + }))), + h('el-input',{ + style: { + display: this.form.xianzhuang === '其他' ? 'block' : 'none', + 'margin-top': '6px' + }, + attrs: { + placeholder: "填写现状其他事项" + }, + props: { + value: this.xianzhuangInput, + size: 'small', + }, + on: { + input: e => { + this.$set(this,'xianzhuangInput',e) + } + } + }) + ]) + }, { show: true, key: "guanliantudizhengquanzheng", @@ -292,6 +353,7 @@ export default { table_name: "lands", keyword: "" }, + xianzhuangInput: "", }; }, methods: { @@ -379,6 +441,9 @@ export default { this.$refs["elForm"].validate((validate) => { if (validate) { let copyForm = deepCopy(this.form); + if(copyForm.xianzhuang === '其他') { + copyForm.xianzhuang = this.xianzhuangInput + } this.formInfo.forEach((info) => { if ( info._relations?.link_relation === "newHasMany" || @@ -507,6 +572,21 @@ export default { { required: true, message: `请填写${i.name}` }, ]; } + if (i.field === 'bufuyuanyin') { + this.rules[i.field] = [ + { validator: (rule, value, callback) => { + if (this.form.dengjimianji === this.form.shijimianji) { + callback() + } else { + if (!value) { + callback(new Error('登记面积与实际面积不符,请填写不符原因')) + } else { + callback() + } + } + } }, + ]; + } if (i.edit_input === "files") { this.form[i.field] = []; } diff --git a/src/views/assets/component/addLand.vue b/src/views/assets/component/addLand.vue index 2e1da57..39980ec 100644 --- a/src/views/assets/component/addLand.vue +++ b/src/views/assets/component/addLand.vue @@ -12,6 +12,67 @@ export default { }, render(h) { let dialog = new CreateDialog(this, [ + { + show: true, + key: "bufuyuanyin", + label: "不符原因", + render: h("el-input", { + props: { + disabled: this.form.dengjimianji === this.form.shijimianji, + size: "small", + value: this.form["bufuyuanyin"], + }, + on: { + input: e => { + this.$set(this.form,'bufuyuanyin',e) + } + } + }), + }, + { + show: true, + key: "xianzhuang", + label: "现状", + render: h("div",[ + h('el-select',{ + props: { + size: 'small', + value: this.form.xianzhuang + }, + style: { + width: '100%' + }, + on: { + input: e => { + this.$set(this.form,'xianzhuang',e) + } + } + },this.formInfo?.find(i => i.field === 'xianzhuang')?._params?.map(i => h('el-option',{ + props: { + label: i.key, + value: i.value + } + }))), + h('el-input',{ + style: { + display: this.form.xianzhuang === '其他' ? 'block' : 'none', + 'margin-top': '6px' + }, + attrs: { + placeholder: "填写现状其他事项" + }, + props: { + value: this.xianzhuangInput, + size: 'small', + }, + on: { + input: e => { + this.$set(this,'xianzhuangInput',e) + } + } + }) + ]) + }, { key: "fangchanzhuangtai", label: "房产状态", @@ -156,6 +217,7 @@ export default { file: {}, pickHouseRow: null, + xianzhuangInput: "" }; }, methods: { @@ -246,6 +308,9 @@ export default { this.$refs["elForm"].validate((validate) => { if (validate) { let copyForm = deepCopy(this.form); + if(copyForm.xianzhuang === '其他') { + copyForm.xianzhuang = this.xianzhuangInput + } this.formInfo.forEach((info) => { if ( info._relations?.link_relation === "newHasMany" || @@ -403,6 +468,21 @@ export default { { required: true, message: `请填写${i.name}` }, ]; } + if (i.field === 'bufuyuanyin') { + this.rules[i.field] = [ + { validator: (rule, value, callback) => { + if (this.form.dengjimianji === this.form.shijimianji) { + callback() + } else { + if (!value) { + callback(new Error('登记面积与实际面积不符,请填写不符原因')) + } else { + callback() + } + } + } }, + ]; + } if (i.edit_input === "files") { this.form[i.field] = []; } diff --git a/src/views/assets/handleSign.vue b/src/views/assets/handleSign.vue index 7458fe9..c8479a5 100644 --- a/src/views/assets/handleSign.vue +++ b/src/views/assets/handleSign.vue @@ -825,7 +825,7 @@ export default { table_name: item.hasOwnProperty('land_id') ? "houses" : "lands", ...item.ORIGINAL_DATA, id: item.id, - xianzhuang: item._zichanshengyumianji == 0 ? 1 : 2, + xianzhuang: '已处置/拆迁',//已处置/拆迁 shijimianji: item._zichanshengyumianji, fenlei: 1 }))) diff --git a/src/views/assets/house.vue b/src/views/assets/house.vue index 206b828..20b87a7 100644 --- a/src/views/assets/house.vue +++ b/src/views/assets/house.vue @@ -411,7 +411,7 @@ export default { value: "", }, ], - sort_name: 'xianzhuang', + sort_name: 'fenlei', sort_type: 'asc', }, form: [], @@ -627,7 +627,7 @@ export default { paramMap.set(i.select_item[key], key); }); - return paramMap.get(row[i.field]?.toString()); + return paramMap.get(row[i.field]?.toString()) || row[i.field]; }; } if (i._relations) { diff --git a/src/views/assets/land.vue b/src/views/assets/land.vue index db5d1e0..b1f992e 100644 --- a/src/views/assets/land.vue +++ b/src/views/assets/land.vue @@ -390,7 +390,7 @@ export default { value: "", }, ], - sort_name: 'xianzhuang', + sort_name: 'fenlei', sort_type: 'asc' }, form: [], @@ -603,7 +603,7 @@ export default { paramMap.set(i.select_item[key], key); }); - return paramMap.get(row[i.field]?.toString()); + return paramMap.get(row[i.field]?.toString()) || row[i.field]; }; } if (i._relations) {