dev
parent
4d3446f40c
commit
28504d792b
@ -0,0 +1,100 @@
|
||||
import httpService from "@/request"
|
||||
|
||||
// 手动生成后台账单
|
||||
export function manuallyGenerateBills(params) {
|
||||
return httpService({
|
||||
url: `/user/bill/manuallyGenerateBills`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 自动生成后台账单计划
|
||||
export function autoGenerateBills(params) {
|
||||
return httpService({
|
||||
url: `/user/billAuto/autoGenerateBills`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 后台自动生成账单List
|
||||
export function billAutoList(params) {
|
||||
return httpService({
|
||||
url: `/user/billAuto/billAutoList`,
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 删除后台自动生成账单计划
|
||||
export function deleteAutoGenerateBills(params) {
|
||||
return httpService({
|
||||
url: `/user/billAuto/deleteAutoGenerateBills`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 生成后台账单自动扣费计划
|
||||
export function autoDeductionBills(params) {
|
||||
return httpService({
|
||||
url: `/user/billAutoDeduction/autoDeductionBills`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 后台自动扣费账单list
|
||||
export function getAutoDeductionBills(params) {
|
||||
return httpService({
|
||||
url: `/user/billAutoDeduction/list`,
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 删除后台自动扣费账单计划
|
||||
export function deleteAutoDeductionBills(params) {
|
||||
return httpService({
|
||||
url: `/user/billAutoDeduction/deleteAutoDeductionBills`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 根据账单自动生成主键id获取账单自动生成信息
|
||||
export function findByIdByBillAutoId(params) {
|
||||
return httpService({
|
||||
url: `/user/billAuto/findByIdByBillAutoId`,
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 根据账单自动扣费主键id获取账单自动扣费信息
|
||||
export function findById(params) {
|
||||
return httpService({
|
||||
url: `/user/billAutoDeduction/findById`,
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 修改自动生成后台账单计划
|
||||
export function updateAutoGenerateBills(params) {
|
||||
return httpService({
|
||||
url: `/user/billAuto/updateAutoGenerateBills`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 修改自动扣费后台账单计划
|
||||
export function updateAutoDeductionBills(params) {
|
||||
return httpService({
|
||||
url: `/user/billAutoDeduction/updateAutoDeductionBills`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<a-drawer title="添加手动生成账单" :width="820" :visible="isVisibleDrawer" :body-style="{ paddingBottom: '80px' }" @close="onClose">
|
||||
<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>
|
||||
</div>
|
||||
<div class="inner-content">
|
||||
<a-table :data-source="tableData" :columns="columns" :pagination="false"
|
||||
:row-selection="{
|
||||
selectedRowKeys: this.form.chargesIds,
|
||||
onChange: selectionChoosed,
|
||||
}"
|
||||
:row-key="
|
||||
(record, index) => {
|
||||
return record.id;
|
||||
}
|
||||
">
|
||||
<template slot="title">
|
||||
<span style="font-weight: 600">收费标准</span>
|
||||
</template>
|
||||
</a-table>
|
||||
<a-form-model title="基础信息">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="账单名称">
|
||||
<a-input v-model="form.name"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="选择时间">
|
||||
<a-range-picker v-model="selTime" @change="timeChange" value-format="YYYY-MM-DD HH:mm:ss"></a-range-picker>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="drawer-footer">
|
||||
<a-button :style="{ marginRight: '8px' }" @click="onClose">
|
||||
关闭
|
||||
</a-button>
|
||||
<a-button type="primary" @click="onSubmit"> 提交 </a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {findEstateCascade} from "@/api/basic/estate"
|
||||
import { chargesList } from "@/api/payment/chargeStandardManage";
|
||||
import { manuallyGenerateBills } from "@/api/payment/payPlan"
|
||||
export default {
|
||||
name: 'addBillDrawer',
|
||||
props: {
|
||||
visible: Boolean,
|
||||
},
|
||||
watch: {
|
||||
visible: {
|
||||
handler(newValue) {
|
||||
this.isVisibleDrawer = newValue;
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
checkedKeys(val) {
|
||||
this.form.estateIds = val.checked;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getApi()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
estateIds: [],
|
||||
chargesIds: [],
|
||||
name: '',
|
||||
billDateStart: '',
|
||||
billDateEnd: '',
|
||||
},
|
||||
isVisibleDrawer: false,
|
||||
roomTreeData: [],
|
||||
replaceFields: {
|
||||
children: 'childList',
|
||||
title: 'name',
|
||||
key: 'id'
|
||||
},
|
||||
checkedKeys: [],
|
||||
//收费标准
|
||||
tableData: [],
|
||||
columns: [
|
||||
{title: "费用名称", dataIndex: "name"},
|
||||
{title: "计费方式", dataIndex: "billingType"},
|
||||
{title: "计量方式", dataIndex: "calculateType"},
|
||||
{title: "计量单价", dataIndex: "calculateUnit"},
|
||||
{title: "备注", dataIndex: "remarks"},
|
||||
],
|
||||
selTime: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getApi() {
|
||||
findEstateCascade().then(res => {
|
||||
let data = res.data;
|
||||
data.forEach(ele => {
|
||||
ele.childList.forEach(el => {
|
||||
el.checkable = false
|
||||
});
|
||||
ele.checkable = false
|
||||
})
|
||||
this.roomTreeData = data
|
||||
});
|
||||
chargesList({pageNum: 1,size: 1000}).then(res => {
|
||||
let data = res.data.rows;
|
||||
this.tableData = data;
|
||||
})
|
||||
},
|
||||
onClose() {
|
||||
this.$emit("onClose");
|
||||
},
|
||||
onCheck(checkedKeys) {
|
||||
this.checkedKeys = checkedKeys.checked;
|
||||
},
|
||||
//收费标准
|
||||
selectionChoosed(data) {
|
||||
this.form.chargesIds = data;
|
||||
},
|
||||
timeChange(val) {
|
||||
this.form.billDateStart = this.selTime[0];
|
||||
this.form.billDateEnd = this.selTime[1];
|
||||
},
|
||||
success(){
|
||||
this.$emit('success')
|
||||
},
|
||||
addClose() {
|
||||
this.onClose();
|
||||
this.form = {
|
||||
estateIds: [],
|
||||
chargesIds: [],
|
||||
name: '',
|
||||
billDateStart: '',
|
||||
billDateEnd: '',
|
||||
};
|
||||
this.checkedKeys = [];
|
||||
this.selTime = []
|
||||
},
|
||||
onSubmit() {
|
||||
manuallyGenerateBills(this.form).then(res => {
|
||||
if(res.code === 200){
|
||||
this.$message.success(res.msg)
|
||||
this.addClose();
|
||||
this.success()
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.inner-content {
|
||||
padding :8px 8px 8px 16px
|
||||
}
|
||||
</style>
|
@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<a-drawer title="添加自动生成账单计划" :width="820" :visible="isVisibleDrawer" :body-style="{ paddingBottom: '80px' }" @close="onClose">
|
||||
<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>
|
||||
</div>
|
||||
<div class="inner-content">
|
||||
<a-table :data-source="tableData" :columns="columns" :pagination="false"
|
||||
:row-selection="{
|
||||
selectedRowKeys: this.form.chargesIds,
|
||||
onChange: selectionChoosed,
|
||||
}"
|
||||
:row-key="
|
||||
(record, index) => {
|
||||
return record.id;
|
||||
}
|
||||
">
|
||||
<template slot="title">
|
||||
<span style="font-weight: 600">收费标准</span>
|
||||
</template>
|
||||
</a-table>
|
||||
<a-form-model>
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="账单计划名称">
|
||||
<a-input v-model="form.name"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="生效日期">
|
||||
<a-radio-group v-model="form.isLongTermEffective" :options="[{label:'长期生效',value:1},{label:'选择日期',value:2}]"></a-radio-group>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="选择计划日期">
|
||||
<a-range-picker v-model="selTime" @change="timeChange" value-format="YYYY-MM-DD HH:mm:ss"></a-range-picker>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-model-item label="扣费时间">
|
||||
<a-select v-model="form.billDateStart">
|
||||
<a-select-option :value="1">每月第一天</a-select-option>
|
||||
<a-select-option :value="2">每月最后一天</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-model-item label="提前/延长">
|
||||
<a-select v-model="form.billDateType">
|
||||
<a-select-option :value="1">提前</a-select-option>
|
||||
<a-select-option :value="2">延长</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-model-item label="天数">
|
||||
<a-input-number v-model="form.billDateNum"></a-input-number>天
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="drawer-footer">
|
||||
<a-button :style="{ marginRight: '8px' }" @click="onClose">
|
||||
关闭
|
||||
</a-button>
|
||||
<a-button type="primary" @click="onSubmit"> 提交 </a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {findEstateCascade} from "@/api/basic/estate"
|
||||
import { chargesList } from "@/api/payment/chargeStandardManage";
|
||||
import { autoGenerateBills } from "@/api/payment/payPlan"
|
||||
export default {
|
||||
name: 'addBillDrawer',
|
||||
props: {
|
||||
visible: Boolean,
|
||||
},
|
||||
watch: {
|
||||
visible: {
|
||||
handler(newValue) {
|
||||
this.isVisibleDrawer = newValue;
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
checkedKeys(val) {
|
||||
this.form.estateIds = val.checked;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getApi()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
estateIds: [],
|
||||
chargesIds: [],
|
||||
name: '',
|
||||
isLongTermEffective: 1,
|
||||
autoEffectiveDateStart: '-',
|
||||
autoEffectiveDateEnd: '-',
|
||||
billDateStart: 1,
|
||||
billDateType: 1,
|
||||
billDateNum: 0,
|
||||
},
|
||||
isVisibleDrawer: false,
|
||||
roomTreeData: [],
|
||||
replaceFields: {
|
||||
children: 'childList',
|
||||
title: 'name',
|
||||
key: 'id'
|
||||
},
|
||||
checkedKeys: [],
|
||||
//收费标准
|
||||
tableData: [],
|
||||
columns: [
|
||||
{title: "费用名称", dataIndex: "name",width: 100},
|
||||
{title: "计费方式", dataIndex: "billingType",width: 100},
|
||||
{title: "计量方式", dataIndex: "calculateType",width: 100},
|
||||
{title: "计量单价", dataIndex: "calculateUnit",width: 100},
|
||||
{title: "备注", dataIndex: "remarks"},
|
||||
],
|
||||
selTime: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getApi() {
|
||||
findEstateCascade().then(res => {
|
||||
let data = res.data;
|
||||
data.forEach(ele => {
|
||||
ele.childList.forEach(el => {
|
||||
el.checkable = false
|
||||
});
|
||||
ele.checkable = false
|
||||
})
|
||||
this.roomTreeData = data
|
||||
});
|
||||
chargesList({pageNum: 1,size: 1000}).then(res => {
|
||||
let data = res.data.rows;
|
||||
this.tableData = data;
|
||||
})
|
||||
},
|
||||
onClose() {
|
||||
this.$emit("onClose");
|
||||
},
|
||||
onCheck(checkedKeys) {
|
||||
this.checkedKeys = checkedKeys.checked;
|
||||
},
|
||||
//收费标准
|
||||
selectionChoosed(data) {
|
||||
this.form.chargesIds = data;
|
||||
},
|
||||
timeChange(val) {
|
||||
this.form.autoEffectiveDateStart = this.selTime[0];
|
||||
this.form.autoEffectiveDateEnd = this.selTime[1];
|
||||
},
|
||||
success(){
|
||||
this.$emit('success')
|
||||
},
|
||||
addClose() {
|
||||
this.onClose();
|
||||
this.form = {
|
||||
estateIds: [],
|
||||
chargesIds: [],
|
||||
name: '',
|
||||
billDateStart: '',
|
||||
billDateEnd: '',
|
||||
};
|
||||
this.checkedKeys = [];
|
||||
this.selTime = []
|
||||
},
|
||||
onSubmit() {
|
||||
console.log(this.form)
|
||||
autoGenerateBills(this.form).then(res => {
|
||||
if(res.code === 200){
|
||||
this.$message.success(res.msg)
|
||||
this.addClose();
|
||||
this.success()
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.inner-content {
|
||||
padding :8px 8px 8px 16px
|
||||
}
|
||||
</style>
|
@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<a-drawer title="添加账单自动扣费计划" :width="820" :visible="isVisibleDrawer" :body-style="{ paddingBottom: '80px' }" @close="onClose">
|
||||
<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>
|
||||
</div>
|
||||
<div class="inner-content">
|
||||
<a-table :data-source="tableData" :columns="columns" :pagination="false"
|
||||
:row-selection="{
|
||||
selectedRowKeys: this.form.chargesIds,
|
||||
onChange: selectionChoosed,
|
||||
}"
|
||||
:row-key="
|
||||
(record, index) => {
|
||||
return record.id;
|
||||
}
|
||||
">
|
||||
<template slot="title">
|
||||
<span style="font-weight: 600">收费标准</span>
|
||||
</template>
|
||||
</a-table>
|
||||
<a-form-model>
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="账单计划名称">
|
||||
<a-input v-model="form.name"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="生效日期">
|
||||
<a-radio-group v-model="form.isLongTermEffective" :options="[{label:'长期生效',value:1},{label:'选择日期',value:2}]"></a-radio-group>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="选择计划日期">
|
||||
<a-range-picker v-model="selTime" @change="timeChange" value-format="YYYY-MM-DD HH:mm:ss"></a-range-picker>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-model-item label="扣费时间">
|
||||
<a-select v-model="form.billDateStart">
|
||||
<a-select-option :value="1">每月第一天</a-select-option>
|
||||
<a-select-option :value="2">每月最后一天</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-model-item label="提前/延长">
|
||||
<a-select v-model="form.billDateType">
|
||||
<a-select-option :value="1">提前</a-select-option>
|
||||
<a-select-option :value="2">延长</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-model-item label="天数">
|
||||
<a-input-number v-model="form.billDateNum"></a-input-number>天
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="drawer-footer">
|
||||
<a-button :style="{ marginRight: '8px' }" @click="onClose">
|
||||
关闭
|
||||
</a-button>
|
||||
<a-button type="primary" @click="onSubmit"> 提交 </a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {findEstateCascade} from "@/api/basic/estate"
|
||||
import { chargesList } from "@/api/payment/chargeStandardManage";
|
||||
import { autoDeductionBills } from "@/api/payment/payPlan"
|
||||
export default {
|
||||
name: 'addBillDrawer',
|
||||
props: {
|
||||
visible: Boolean,
|
||||
},
|
||||
watch: {
|
||||
visible: {
|
||||
handler(newValue) {
|
||||
this.isVisibleDrawer = newValue;
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
checkedKeys(val) {
|
||||
this.form.estateIds = val.checked;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getApi()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
estateIds: [],
|
||||
chargesIds: [],
|
||||
name: '',
|
||||
isLongTermEffective: 1,
|
||||
autoEffectiveDateStart: '',
|
||||
autoEffectiveDateEnd: '',
|
||||
billDateStart: 1,
|
||||
billDateType: 1,
|
||||
billDateNum: 0,
|
||||
},
|
||||
isVisibleDrawer: false,
|
||||
roomTreeData: [],
|
||||
replaceFields: {
|
||||
children: 'childList',
|
||||
title: 'name',
|
||||
key: 'id'
|
||||
},
|
||||
checkedKeys: [],
|
||||
//收费标准
|
||||
tableData: [],
|
||||
columns: [
|
||||
{title: "费用名称", dataIndex: "name",width: 100},
|
||||
{title: "计费方式", dataIndex: "billingType",width: 100},
|
||||
{title: "计量方式", dataIndex: "calculateType",width: 100},
|
||||
{title: "计量单价", dataIndex: "calculateUnit",width: 100},
|
||||
{title: "备注", dataIndex: "remarks"},
|
||||
],
|
||||
selTime: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getApi() {
|
||||
findEstateCascade().then(res => {
|
||||
let data = res.data;
|
||||
data.forEach(ele => {
|
||||
ele.childList.forEach(el => {
|
||||
el.checkable = false
|
||||
});
|
||||
ele.checkable = false
|
||||
})
|
||||
this.roomTreeData = data
|
||||
});
|
||||
chargesList({pageNum: 1,size: 1000}).then(res => {
|
||||
let data = res.data.rows;
|
||||
this.tableData = data;
|
||||
})
|
||||
},
|
||||
onClose() {
|
||||
this.$emit("onClose");
|
||||
},
|
||||
onCheck(checkedKeys) {
|
||||
this.checkedKeys = checkedKeys.checked;
|
||||
},
|
||||
//收费标准
|
||||
selectionChoosed(data) {
|
||||
this.form.chargesIds = data;
|
||||
},
|
||||
timeChange(val) {
|
||||
this.form.autoEffectiveDateStart = this.selTime[0];
|
||||
this.form.autoEffectiveDateEnd = this.selTime[1];
|
||||
},
|
||||
success(){
|
||||
this.$emit('success')
|
||||
},
|
||||
addClose() {
|
||||
this.onClose();
|
||||
this.form = {
|
||||
estateIds: [],
|
||||
chargesIds: [],
|
||||
name: '',
|
||||
billDateStart: '',
|
||||
billDateEnd: '',
|
||||
};
|
||||
this.checkedKeys = [];
|
||||
this.selTime = []
|
||||
},
|
||||
onSubmit() {
|
||||
console.log(this.form)
|
||||
autoDeductionBills(this.form).then(res => {
|
||||
if(res.code === 200){
|
||||
this.$message.success(res.msg)
|
||||
this.addClose();
|
||||
this.success()
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.inner-content {
|
||||
padding :8px 8px 8px 16px
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue