diff --git a/src/views/lease/component/addLet.vue b/src/views/lease/component/addLet.vue index 0401f15..a8940fb 100644 --- a/src/views/lease/component/addLet.vue +++ b/src/views/lease/component/addLet.vue @@ -40,6 +40,26 @@ export default {

资产信息

+ + ) + } }, + // { + // type: "selection", + // width: 56, + // align: "center", + // reserveSelection: true, + // fixed: "left", + // }, { "prop": "id", "width": 60, @@ -243,11 +329,11 @@ export default { req-opt={this.landSelect} on={{ ['loaded']: _ => { - this.$nextTick(() => { - this.$refs['landLinkTable'].getListData()?.filter(item => this.nowAssets?.find(j => j.id === item.id && !j.hasOwnProperty('land_id')))?.forEach(item => { - this.$refs['landLinkTable'].toggleRowSelection(item, true) - }) - }) + // this.$nextTick(() => { + // this.$refs['landLinkTable'].getListData()?.filter(item => this.nowAssets?.find(j => j.id === item.id && !j.hasOwnProperty('land_id')))?.forEach(item => { + // this.$refs['landLinkTable'].toggleRowSelection(item, true) + // }) + // }) }, ['select']: (selection, row) => { if (selection.find(i => i.id === row.id)) { @@ -300,12 +386,43 @@ export default { ref="houseLinkTable" table-item={ [ + // { + // type: "selection", + // width: 56, + // align: "center", + // reserveSelection: true, + // fixed: "left" + // }, { - type: "selection", - width: 56, - align: "center", - reserveSelection: true, - fixed: "left" + prop: "selection", + label: "选择", + width: 80, + fixed: "left", + customFn: row => { + return ( + + ) + } }, { "prop": "id", @@ -554,12 +671,17 @@ export default { table_name: "lets_to_assets" },false))) } - let leaseToAssetsData = this.nowAssets.map(item => ({ + 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 : "", + name: item._name, + zuoluo: item._zuoluo, + xiangxiweizhi: item._xiangxiweizhi, + biaodileixing: item._relation_i ? (item.hasOwnProperty("land_id") ? '房产' : '土地') : item._biaodileixing, + shijimianji: item._shijimianji, chuzumianji: item._chuzumianji, - let_id: res.id + let_id: res.id, })); if (leaseToAssetsData && leaseToAssetsData.length > 0) { imports({ diff --git a/src/views/lease/detailLet.vue b/src/views/lease/detailLet.vue index 8cc81a9..479f837 100644 --- a/src/views/lease/detailLet.vue +++ b/src/views/lease/detailLet.vue @@ -129,33 +129,38 @@ export default { "fixed": "left", "align": "left", customFn: row => { - return ({ row.land_id ? row.lands.name : row.house.name }) + return ({ (row.land_id || row.house_id) ? (row.land_id ? row.lands.name : row.house.name) : row.name }) } }, { prop: "type", label: "分类", - "fixed": "left", + width: 160, customFn: row => ( - { row.land_id ? '房产' : '土地' } + { (row.land_id || row.house_id) ? (row.land_id ? '房产' : '土地'): row.biaodileixing } ) }, { "prop": "zuoluo", "label": "坐落", - "width": 0, + "width": 160, "align": "left", customFn: row => { - return ({ row.land_id ? row.lands.zuoluo : row.house.zuoluo }) + return ({ (row.land_id || row.house_id) ? (row.land_id ? row.lands.zuoluo : row.house.zuoluo) : row.zuoluo }) } }, + { + prop: "xiangxiweizhi", + label: "详细位置", + width: 180 + }, { "prop": "shijimianji", "label": "实际面积(m²)", - "width": 0, + "width": 160, "align": "center", customFn: row => { - return ({ row.land_id ? row.lands.shijimianji : row.house.shijimianji }) + return ({ (row.land_id || row.house_id) ? (row.land_id ? row.lands.shijimianji : row.house.shijimianji) : row.shijimianji }) } }, { diff --git a/src/views/lease/sign.vue b/src/views/lease/sign.vue index 3e150ac..07a804c 100644 --- a/src/views/lease/sign.vue +++ b/src/views/lease/sign.vue @@ -1169,10 +1169,15 @@ export default { id: row.id, name: row.name, zuoluo: row.zuoluo, + zichanweizhi: row.zichanweizhi, shijimianji: row.shijimianji, + _name: row.name, + _zuoluo: row.zuoluo, + _shijimianji: row.shijimianji, + _xiangxiweizhi: "", + land_id: row.land_id, _chuzumianji: 0, _relation_id: "", - land_id: row.land_id, ORIGINAL_DATA: row, }); } @@ -1678,7 +1683,7 @@ export default { _name: land.name, _zuoluo: land.zuoluo, _shijimianji: land._shijimianji, - _xiangxiweizhi: '', + _xiangxiweizhi: item.xiangxiweizhi, _chuzumianji: item.chuzumianji || 0, ORIGINAL_DATA: land, _relation_id: item.id, @@ -1696,7 +1701,7 @@ export default { _name: house.name, _zuoluo: house.zuoluo, _shijimianji: house._shijimianji, - _xiangxiweizhi: '', + _xiangxiweizhi: item.xiangxiweizhi, _chuzumianji: item.chuzumianji || 0, _relation_id: item.id, ORIGINAL_DATA: house, @@ -1706,14 +1711,16 @@ export default { } else { this.nowAssets.push({ id: "", + biaodileixing: item.biaodileixing, name: item.name, zuoluo: item.zuoluo, zichanweizhi: item.zichanweizhi, shijimianji: item.shijimianji, - _name: "", - _zuoluo: "", - _shijimianji: "", - _xiangxiweizhi: '', + _name: item.name, + _zuoluo: item.zuoluo, + _biaodileixing: item.biaodileixing, + _shijimianji: item.shijimianji, + _xiangxiweizhi: item.xiangxiweizhi, _chuzumianji: item.chuzumianji || 0, _relation_id: item.id, });