|
|
|
@ -19,22 +19,19 @@
|
|
|
|
|
>
|
|
|
|
|
<span slot="name" slot-scope="text, row">
|
|
|
|
|
{{
|
|
|
|
|
row.buildingName +
|
|
|
|
|
"栋/" +
|
|
|
|
|
row.unitName +
|
|
|
|
|
"单元/" +
|
|
|
|
|
row.name +
|
|
|
|
|
"室"
|
|
|
|
|
row.buildingName + "栋/" + row.unitName + "单元/" + row.name + "室"
|
|
|
|
|
}}
|
|
|
|
|
</span>
|
|
|
|
|
<span slot="action" slot-scope="text, row">
|
|
|
|
|
<a-space>
|
|
|
|
|
<a class="ant-dropdown-link" @click="list(row.id)">明细</a>
|
|
|
|
|
<a class="ant-dropdown-link" @click="recharge(row.id)">充值</a>
|
|
|
|
|
<a class="ant-dropdown-link" @click="recharge(row)">充值</a>
|
|
|
|
|
</a-space>
|
|
|
|
|
</span>
|
|
|
|
|
<span slot="tags" slot-scope="text, row">
|
|
|
|
|
<a-tag>{{ row.status===1?'充足':row.status===2?'不足':'-' }}</a-tag>
|
|
|
|
|
<a-tag>{{
|
|
|
|
|
row.status === 1 ? "充足" : row.status === 2 ? "不足" : "-"
|
|
|
|
|
}}</a-tag>
|
|
|
|
|
</span>
|
|
|
|
|
</a-table>
|
|
|
|
|
<div class="action">
|
|
|
|
@ -50,22 +47,43 @@
|
|
|
|
|
</template>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 预缴明细 -->
|
|
|
|
|
<pre-list :show="drawer.show" :id="drawer.id" @close="close"></pre-list>
|
|
|
|
|
<!-- 充值 -->
|
|
|
|
|
<a-modal
|
|
|
|
|
title="预缴充值"
|
|
|
|
|
:visible="modal.show"
|
|
|
|
|
@ok="rechargeOk"
|
|
|
|
|
@cancel="rechargeCancel"
|
|
|
|
|
>
|
|
|
|
|
<a-input
|
|
|
|
|
v-model.number="modal.amount"
|
|
|
|
|
placeholder="请输入充值金额"
|
|
|
|
|
></a-input>
|
|
|
|
|
</a-modal>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { formItem, columns, pagination } from "./depend/config";
|
|
|
|
|
import {
|
|
|
|
|
prepaymentList,
|
|
|
|
|
rechargeList,
|
|
|
|
|
recharge,
|
|
|
|
|
} from "@/api/payment/prepayManage";
|
|
|
|
|
import { allBuilding } from "@/api/basic/estate"
|
|
|
|
|
import { prepaymentList, recharge } from "@/api/payment/prepayManage";
|
|
|
|
|
import { allBuilding } from "@/api/basic/estate";
|
|
|
|
|
import preList from "./depend/preList.vue";
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
preList,
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
drawer: {
|
|
|
|
|
show: false,
|
|
|
|
|
id: undefined,
|
|
|
|
|
},
|
|
|
|
|
modal: {
|
|
|
|
|
show: false,
|
|
|
|
|
estateInfo: "",
|
|
|
|
|
amount: undefined,
|
|
|
|
|
id: undefined,
|
|
|
|
|
},
|
|
|
|
|
tableData: [],
|
|
|
|
|
searchForm: {
|
|
|
|
@ -83,13 +101,13 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.getData();
|
|
|
|
|
this.getSelect()
|
|
|
|
|
this.getSelect();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async getSelect(){
|
|
|
|
|
async getSelect() {
|
|
|
|
|
// 获取楼栋 后续可加单元、房间筛选
|
|
|
|
|
let res = await allBuilding()
|
|
|
|
|
this.formItem[2].option = res.data
|
|
|
|
|
let res = await allBuilding();
|
|
|
|
|
this.formItem[2].option = res.data;
|
|
|
|
|
},
|
|
|
|
|
async getData(data) {
|
|
|
|
|
if (data !== undefined) {
|
|
|
|
@ -107,8 +125,50 @@ export default {
|
|
|
|
|
selectionChoosed(data) {
|
|
|
|
|
this.selectedRowKeys = data;
|
|
|
|
|
},
|
|
|
|
|
recharge(id){},
|
|
|
|
|
list(id){},
|
|
|
|
|
recharge(row) {
|
|
|
|
|
this.modal = {
|
|
|
|
|
show: true,
|
|
|
|
|
id:row.id,
|
|
|
|
|
estateInfo:
|
|
|
|
|
row.buildingName + "栋/" + row.unitName + "单元/" + row.name + "室",
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
rechargeOk() {
|
|
|
|
|
this.$confirm({
|
|
|
|
|
title: "预缴充值",
|
|
|
|
|
content: `是否给房屋${this.modal.estateInfo}充值`,
|
|
|
|
|
onOk:()=>{
|
|
|
|
|
recharge({ estateId: this.modal.id, amount: this.modal.amount }).then(
|
|
|
|
|
(res) => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
this.$message.success(res.msg);
|
|
|
|
|
this.getData()
|
|
|
|
|
this.rechargeCancel();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
rechargeCancel() {
|
|
|
|
|
this.modal = {
|
|
|
|
|
show: false,
|
|
|
|
|
estateInfo: "",
|
|
|
|
|
amount: undefined,
|
|
|
|
|
id: undefined,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
list(id) {
|
|
|
|
|
this.drawer = {
|
|
|
|
|
show: true,
|
|
|
|
|
id: id,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
close() {
|
|
|
|
|
this.drawer.show = false;
|
|
|
|
|
},
|
|
|
|
|
handleMenuClick(data) {
|
|
|
|
|
console.log(data);
|
|
|
|
|
},
|
|
|
|
|