|
|
|
@ -3,8 +3,8 @@
|
|
|
|
|
<div class="drawer-content">
|
|
|
|
|
<div style="display: flex">
|
|
|
|
|
<div class="inner-content">
|
|
|
|
|
<a-tree v-model="checkedKeys" :selected-keys="form.estateIds"
|
|
|
|
|
:selectable="false" :tree-data="roomTreeData" checkable checkStrictly :replace-fields="replaceFields"></a-tree>
|
|
|
|
|
<a-tree v-model="checkedKeys" @check="onCheck"
|
|
|
|
|
:selectable="false" :tree-data="roomTreeData" checkable :replace-fields="replaceFields"></a-tree>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="inner-content">
|
|
|
|
|
<a-table :data-source="tableData" :columns="columns" :pagination="false"
|
|
|
|
@ -77,6 +77,17 @@
|
|
|
|
|
import {findEstateCascade} from "@/api/basic/estate"
|
|
|
|
|
import { chargesList } from "@/api/payment/chargeStandardManage";
|
|
|
|
|
import { autoDeductionBills } from "@/api/payment/payPlan"
|
|
|
|
|
function deleteIds(lists) {
|
|
|
|
|
// 楼栋id和房屋id有重复,导致数形控件选择不可用,把除房屋id外的全改为undefined
|
|
|
|
|
lists.forEach((list) => {
|
|
|
|
|
if (list.childList) {
|
|
|
|
|
list.id = undefined;
|
|
|
|
|
deleteIds(list.childList);
|
|
|
|
|
} else {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
export default {
|
|
|
|
|
name: 'addBillDrawer',
|
|
|
|
|
props: {
|
|
|
|
@ -88,10 +99,7 @@ export default {
|
|
|
|
|
this.isVisibleDrawer = newValue;
|
|
|
|
|
},
|
|
|
|
|
immediate: true,
|
|
|
|
|
},
|
|
|
|
|
checkedKeys(val) {
|
|
|
|
|
this.form.estateIds = val.checked;
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.getApi()
|
|
|
|
@ -120,10 +128,14 @@ export default {
|
|
|
|
|
//收费标准
|
|
|
|
|
tableData: [],
|
|
|
|
|
columns: [
|
|
|
|
|
{title: "费用名称", dataIndex: "name",width: 100},
|
|
|
|
|
{title: "计费方式", dataIndex: "billingType",width: 100},
|
|
|
|
|
{title: "计量方式", dataIndex: "calculateType",width: 100},
|
|
|
|
|
{title: "计量单价", dataIndex: "calculateUnit",width: 100},
|
|
|
|
|
{title: "费用名称", dataIndex: "name"},
|
|
|
|
|
{title: "计费方式", dataIndex: "billingType"},
|
|
|
|
|
{title: "计量方式", dataIndex: "calculateType"},
|
|
|
|
|
{title: "计量单价", dataIndex: "calculateUnit",
|
|
|
|
|
customRender: function (calculateUnit) {
|
|
|
|
|
return (calculateUnit*1).toFixed(2)
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{title: "备注", dataIndex: "remarks"},
|
|
|
|
|
],
|
|
|
|
|
selTime: []
|
|
|
|
@ -133,13 +145,14 @@ export default {
|
|
|
|
|
getApi() {
|
|
|
|
|
findEstateCascade().then(res => {
|
|
|
|
|
let data = res.data;
|
|
|
|
|
data.forEach(ele => {
|
|
|
|
|
ele.childList.forEach(el => {
|
|
|
|
|
el.checkable = false
|
|
|
|
|
});
|
|
|
|
|
ele.checkable = false
|
|
|
|
|
})
|
|
|
|
|
// data.forEach(ele => {
|
|
|
|
|
// ele.childList.forEach(el => {
|
|
|
|
|
// el.checkable = false
|
|
|
|
|
// });
|
|
|
|
|
// ele.checkable = false
|
|
|
|
|
// })
|
|
|
|
|
this.roomTreeData = data
|
|
|
|
|
deleteIds(this.roomTreeData);
|
|
|
|
|
});
|
|
|
|
|
chargesList({pageNum: 1,size: 1000}).then(res => {
|
|
|
|
|
let data = res.data.rows;
|
|
|
|
@ -150,7 +163,13 @@ export default {
|
|
|
|
|
this.$emit("onClose");
|
|
|
|
|
},
|
|
|
|
|
onCheck(checkedKeys) {
|
|
|
|
|
this.checkedKeys = checkedKeys.checked;
|
|
|
|
|
let ids = [];
|
|
|
|
|
for (let id of checkedKeys) {
|
|
|
|
|
if (typeof id == "number") {
|
|
|
|
|
ids.push(id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.form.estateIds = ids;
|
|
|
|
|
},
|
|
|
|
|
//收费标准
|
|
|
|
|
selectionChoosed(data) {
|
|
|
|
|