From 152ec95a3da06f4bc136e3549de9511873ee7a6a Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Thu, 25 Jul 2024 17:51:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/assets/component/addHandles.vue | 79 ++- src/views/assets/detail.vue | 2 +- src/views/assets/handle.vue | 2 +- src/views/assets/handleDetail.vue | 4 +- src/views/assets/handleSign.vue | 288 ++--------- src/views/dashboard/index.vue | 26 +- src/views/lease/component/payList.vue | 32 +- src/views/lease/detailLease.vue | 257 ++++++---- src/views/lease/detailPlan.vue | 579 ++++++++++++++++++++++ src/views/lease/plan.vue | 34 +- src/views/lease/sign.vue | 24 +- 11 files changed, 966 insertions(+), 361 deletions(-) create mode 100644 src/views/lease/detailPlan.vue diff --git a/src/views/assets/component/addHandles.vue b/src/views/assets/component/addHandles.vue index 2a25838..ee9b98b 100644 --- a/src/views/assets/component/addHandles.vue +++ b/src/views/assets/component/addHandles.vue @@ -84,18 +84,18 @@ export default { "align": "left" }, { - "prop": "dengjimianji", - "label": "登记面积(m²)", + "prop": "shijimianji", + "label": "实际面积(m²)", "width": 0, "align": "center" }, { - "prop": "_chuzhimianji", - "label": "处置面积(m²)", + "prop": "_zichanshengyumianji", + "label": "资产剩余面积(m²)", "width": 160, customFn: row => { return ( - + ) } }, @@ -189,7 +189,10 @@ export default { "prop": "area", "label": "区域", "width": 0, - "align": "center" + "align": "center", + "formatter": (data, row, value) => { + return this.wxAreas[value] + } }, { "prop": "name", @@ -347,8 +350,8 @@ export default { name: row.name, zuoluo: row.zuoluo, zichanweizhi: row.zichanweizhi, - dengjimianji: row.dengjimianji, - _chuzhimianji: 0, + shijimianji: row.shijimianji, + _zichanshengyumianji: 0, _relation_id: "", }) } else { @@ -412,7 +415,10 @@ export default { "prop": "area", "label": "区域", "width": 0, - "align": "center" + "align": "center", + "formatter": (data, row, value) => { + return this.wxAreas[value] + } }, { "prop": "name", @@ -524,8 +530,8 @@ export default { name: row.name, zuoluo: row.zuoluo, zichanweizhi: row.zichanweizhi, - dengjimianji: row.dengjimianji, - _chuzhimianji: 0, + shijimianji: row.shijimianji, + _zichanshengyumianji: 0, _relation_id: "", land_id: row.land_id }) @@ -550,6 +556,19 @@ export default { }, data() { return { + wxAreas: [ + "宜兴市", + "惠山区", + "新吴区", + "梁溪区", + "江阴市", + "滨湖区", + "锡山区", + ], + customForm: { + customFormId: "", + tableName: "" + }, nowAssets: [], houseDialog: false, landDialog: false, @@ -605,6 +624,19 @@ export default { } }, + getTableParams () { + if (this.$route.meta.params?.custom_form) { + let decode = decodeURIComponent(this.$route.meta.params?.custom_form); + try { + let custom_form = JSON.parse(decode); + this.customForm.customFormId = custom_form.custom_form_id; + this.customForm.tableName = custom_form.table_name; + } catch (err) { + console.warn(err); + } + } + }, + async getDetail() { const res = await show({ id: this.id, table_name: 'asset_handles' }); this.$integrateData(this.form, res); @@ -628,8 +660,8 @@ export default { name: land.name, zuoluo: land.zuoluo, zichanweizhi: land.zichanweizhi, - dengjimianji: land.dengjimianji, - _chuzhimianji: item.chuzhimianji||0, + shijimianji: land.shijimianji, + _zichanshengyumianji: item.zichanshengyumianji||0, _relation_id: item.id, }); } @@ -641,8 +673,8 @@ export default { name: house.name, zuoluo: house.zuoluo, zichanweizhi: house.zichanweizhi, - dengjimianji: house.dengjimianji, - _chuzhimianji: item.chuzhimianji||0, + shijimianji: house.shijimianji, + _zichanshengyumianji: item.zichanshengyumianji||0, _relation_id: item.id, land_id: house.land_id, }); @@ -683,16 +715,18 @@ export default { // }) // this.form.id_lease_plans_lease_id_relation = this.leasePlans; save(Object.assign(this.form, { table_name: 'asset_handles' })).then(res => { - Promise.all(this.originalForm.id_asset_handles_to_assets_handles_id_relation?.map(i => destroy({ - id: i.id, - table_name: "asset_handles_to_assets" - },false))) + if (this.type !== 'add') { + Promise.all(this.originalForm.id_asset_handles_to_assets_handles_id_relation?.map(i => destroy({ + id: i.id, + table_name: "asset_handles_to_assets" + },false))) + } let leaseToAssetsData = this.nowAssets.map(item => ({ id: item._relation_id, land_id: !item.hasOwnProperty("land_id") ? item.id : "", house_id: item.hasOwnProperty("land_id") ? item.id : "", - chuzhimianji: item._chuzhimianji, - let_id: res.id + zichanshengyumianji: item._zichanshengyumianji, + handle_id: res.id })); if (leaseToAssetsData && leaseToAssetsData.length > 0) { imports({ @@ -772,9 +806,10 @@ export default { }, }, created() { + this.getTableParams(); this.id = this.$route.query.id; this.type = this.$route.query.type; - resolveFormInfo(27).then(res => { + resolveFormInfo(this.customForm.customFormId).then(res => { this.formInfo = res; if (this.type === "editor" || this.type === "change") { diff --git a/src/views/assets/detail.vue b/src/views/assets/detail.vue index a7df23c..4cb56b6 100644 --- a/src/views/assets/detail.vue +++ b/src/views/assets/detail.vue @@ -812,7 +812,7 @@ export default { { width: 140, prop: "yingshou", - label: "应收", + label: "应收租金", customFn: ({ row }) => { return (
diff --git a/src/views/assets/handle.vue b/src/views/assets/handle.vue index 3e0f4f9..43c0625 100644 --- a/src/views/assets/handle.vue +++ b/src/views/assets/handle.vue @@ -262,7 +262,7 @@ @loaded="adjustAlignment" > diff --git a/src/views/assets/handleDetail.vue b/src/views/assets/handleDetail.vue index 4b47c52..5dbece8 100644 --- a/src/views/assets/handleDetail.vue +++ b/src/views/assets/handleDetail.vue @@ -124,8 +124,8 @@ export default { } }, { - "prop": "chuzhimianji", - "label": "处置面积(m²)", + "prop": "zichanshengyumianji", + "label": "资产剩余面积(m²)", "width": 160, }, ] diff --git a/src/views/assets/handleSign.vue b/src/views/assets/handleSign.vue index b89fb78..8f19112 100644 --- a/src/views/assets/handleSign.vue +++ b/src/views/assets/handleSign.vue @@ -168,7 +168,7 @@ export default { } if (row._relation_id) { - destroy({ table_name: "leases_to_assets", id: row._relation_id },false).then(_ => { + destroy({ table_name: "handle_signs_to_assets", id: row._relation_id },false).then(_ => { this.nowAssets.splice(this.nowAssets.findIndex(j => j._relation_id === row._relation_id),1) }) } @@ -186,201 +186,6 @@ export default { >
- {/* 租金收取计划 */} -
-
-

租金收取计划

- - -
- -
- { - this.leasePlans.map((leasePlan, index) => ( - -
-

租金收取计划{index+1}

- - -
- -
- - - - - -
-
- )) - } -
- { /* { - return ( - - ); - }, - }, - { - prop: "yingshou", - label: "应收", - width: 160, - customFn: (row) => { - return ( - - ); - }, - }, - { - prop: "shijidaozhang", - label: "实际到账", - width: 160, - customFn: (row) => { - return ( - - ); - }, - }, - { - prop: "weidaoweiyuanyin", - label: "未到位原因", - width: 180, - customFn: (row) => { - return ( - - ); - }, - }, - { - prop: "shijidaozhangriqi", - label: "实际到账日期", - width: 160, - customFn: (row) => { - return ( - - ); - }, - }, - { - prop: "operate", - label: "操作", - minWidth: 120, - customFn: (row, { $index }) => { - return ( -
- -
- ); - }, - }, - ]} - >
*/ } -
- {dialog.render()} @@ -439,6 +244,9 @@ export default { label: "区域", width: 0, align: "center", + "formatter": (data, row, value) => { + return this.wxAreas[value] + } }, { prop: "name", @@ -596,7 +404,7 @@ export default { zuoluo: row.zuoluo, zichanweizhi: row.zichanweizhi, shijimianji: row.shijimianji, - _chuzumianji: 0, + _zichanshengyumianji: 0, _relation_id: "", }) } else { @@ -604,7 +412,7 @@ export default { let temp = this.nowAssets.splice(index, 1) if (temp._relation_id) { destroy({ - table_name: "leases_to_assets", + table_name: "handle_signs_to_assets", id: temp._relation_id },false) } @@ -670,6 +478,9 @@ export default { label: "区域", width: 0, align: "center", + "formatter": (data, row, value) => { + return this.wxAreas[value] + } }, { prop: "name", @@ -781,7 +592,7 @@ export default { zuoluo: row.zuoluo, zichanweizhi: row.zichanweizhi, shijimianji: row.shijimianji, - _chuzumianji: 0, + _zichanshengyumianji: 0, _relation_id: "", land_id: row.land_id }) @@ -790,7 +601,7 @@ export default { let temp = this.nowAssets.splice(index, 1) if (temp._relation_id) { destroy({ - table_name: "leases_to_assets", + table_name: "handle_signs_to_assets", id: temp._relation_id },false) } @@ -805,10 +616,22 @@ export default { }, data() { return { + wxAreas: [ + "宜兴市", + "惠山区", + "新吴区", + "梁溪区", + "江阴市", + "滨湖区", + "锡山区", + ], + customForm: { + customFormId: "", + tableName: "" + }, nowAssets: [], houseDialog: false, landDialog: false, - leasePlans: [], landSelect: { table_name: "lands", keyword: "", @@ -860,8 +683,21 @@ export default { } }, + getTableParams () { + if (this.$route.meta.params?.custom_form) { + let decode = decodeURIComponent(this.$route.meta.params?.custom_form); + try { + let custom_form = JSON.parse(decode); + this.customForm.customFormId = custom_form.custom_form_id; + this.customForm.tableName = custom_form.table_name; + } catch (err) { + console.warn(err); + } + } + }, + async getDetail() { - const res = await show({ id: this.id, table_name: "leases" }); + const res = await show({ id: this.id, table_name: "handle_leases" }); this.$integrateData(this.form, res); this.formInfo.forEach((i) => { @@ -872,10 +708,9 @@ export default { } }); this.form = Object.assign({}, this.form); - this.leasePlans = res.id_lease_plans_lease_id_relation; this.originalForm = deepCopy(res); if (this.type !== 'add') { - this.originalForm?.id_leases_to_assets_lease_id_relation?.forEach( + this.originalForm?.id_handle_signs_to_assets_handle_sign_id_relation?.forEach( (item) => { if (item.land_id) { let land = this.originalForm.land?.find( @@ -888,7 +723,7 @@ export default { zuoluo: land.zuoluo, zichanweizhi: land.zichanweizhi, shijimianji: land.shijimianji, - _chuzumianji: item.chuzumianji, + _zichanshengyumianji: item.zichanshengyumianji, _relation_id: item.id, }); } @@ -903,7 +738,7 @@ export default { zuoluo: house.zuoluo, zichanweizhi: house.zichanweizhi, shijimianji: house.shijimianji, - _chuzumianji: item.chuzumianji, + _zichanshengyumianji: item.zichanshengyumianji, _relation_id: item.id, _TAG_: "house", land_id: house.land_id @@ -931,45 +766,31 @@ export default { } this.form.let_id = this.$route.params.letId; - save(Object.assign(this.form, { table_name: "leases" })).then((res) => { + save(Object.assign(this.form, { table_name: "handle_leases" })).then((res) => { if (this.type !== 'add') { Promise.all([ - ...this.originalForm.id_leases_to_assets_lease_id_relation?.map(i => destroy({ + ...this.originalForm.id_handle_signs_to_assets_handle_sign_id_relation?.map(i => destroy({ id: i.id, - table_name: "leases_to_assets" - },false)), - ...this.originalForm.id_lease_plans_lease_id_relation?.map(i => destroy({ - id: i.id, - table_name: "lease_plans" + table_name: "handle_signs_to_assets" },false)) ]) } - let leaseToAssetsData = this.nowAssets.map(item => ({ + let handleToAssetsData = this.nowAssets.map(item => ({ id: item._relation_id, land_id: !item.hasOwnProperty("land_id") ? item.id : "", house_id: item.hasOwnProperty("land_id") ? item.id : "", - chuzumianji: item._chuzumianji, - lease_id: res.id + zichanshengyumianji: item._zichanshengyumianji, + handle_id: res.id })); - if (leaseToAssetsData && leaseToAssetsData.length > 0) { + if (handleToAssetsData && handleToAssetsData.length > 0) { imports( { - table_name: "leases_to_assets", - data: leaseToAssetsData, + table_name: "handle_signs_to_assets", + data: handleToAssetsData, }, false ); } - let leasePlansData = this.leasePlans.map((item) => ({ - ...item, - lease_id: res.id, - })); - if (leasePlansData && leasePlansData.length > 0) { - imports({ - table_name: "lease_plans", - data: leasePlansData, - }); - } //变更保存日志 if (this.type === "change") { let content = ""; @@ -1053,16 +874,17 @@ export default { }, }, created() { - this.id = this.$route.query.leaseId; + this.getTableParams(); + this.id = this.$route.query.handleId; this.type = this.$route.query.type; - resolveFormInfo(15).then((res) => { + resolveFormInfo(this.customForm.customFormId).then((res) => { this.formInfo = res; if (this.type === "editor" || this.type === "change") { this.$nextTick(() => this.getDetail()); } else { - show({ id: this.$route.params.letId, table_name: "lets" }).then(letDetail => { - letDetail?.lets_to_assets?.forEach(item => { + show({ id: this.$route.params.handleId, table_name: "asset_handles" }).then(handleDetail => { + handleDetail?.lets_to_assets?.forEach(item => { if (item.land_id) { let land = item.lands; if (land) { diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index b244ed4..b1e8b0e 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -201,11 +201,11 @@ { title: '地块名称', key: 'dikuaimingcheng', - width: 180, + width: 260, fixed: 'left', align: 'left', render: (h, { row }) => { - return h('div',[ + let tags = [ ...row?.land?.map(i => h('Tag', { props: { color: "green" @@ -216,6 +216,28 @@ color: "blue" } },i.name)) + ] + return h('div',[ + ...tags.slice(0, 3), + h('el-popover',{ + props: { + title: "地块名称", + width: 200, + trigger: "hover" + } + },[ + h('el-link',{ + style: { + "word-break": "keep-all", + display: tags.length > 3 ? "inline" : "none" + }, + props: { + type: "primary", + }, + slot: "reference" + },"更多"), + h('div',tags) + ]), ]) } }, diff --git a/src/views/lease/component/payList.vue b/src/views/lease/component/payList.vue index 5f6f344..e792d30 100644 --- a/src/views/lease/component/payList.vue +++ b/src/views/lease/component/payList.vue @@ -42,10 +42,14 @@ export default { label: "租金收取确认", expandFn: ({ row, $index }) => { return ( -
+
+ + + + + + - +