bibi 3 years ago
parent b1cc2d15f5
commit 8a18f6b714

@ -1,31 +1,15 @@
export const formItem = [
{
type: 'input',
label:'费用名称',
prop:'name',
label:'',
prop:'',
placeholder:'请输入'
},
]
export const columns = [
{
title: "费用名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feetype",
},
{
title: "计量方式",
dataIndex: "type",
},
{
title: "单价",
dataIndex: "price",
},
{
title: "单位",
dataIndex: "unit",
title: "",
dataIndex: "",
},
{
title: "操作",

@ -1,7 +0,0 @@
export const form = {
id:null,
brandName: undefined,
}
export const rules = {
brandName:[{required:true,message:'请输入品牌名',trigger:'blur'}],
}

@ -1,72 +0,0 @@
<template>
<div>
<a-drawer
:title="drawer.title"
:width="720"
:visible="drawer.show"
:body-style="{ paddingBottom: '80px' }"
@close="addClose"
>
<div class="drawer-content">
基本信息
<a-divider></a-divider>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
layout="vertical"
>
<a-form-model-item prop="brandName" label="品牌名称">
<a-input
v-model="form.brandName"
placeholder="请输入品牌名称"
style="width: 50%"
></a-input>
</a-form-model-item>
</a-form-model>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="addClose">
关闭
</a-button>
<a-button type="primary" @click="submit"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
export default {
methods: {
submit() {
console.log(this.form);
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if (this.form.id === null) {
let res = await Insert(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.addClose();
this.getData();
} else {
this.$message.error(res.msg);
}
} else {
console.log(this.form);
let res = await Update(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.addClose();
this.getData();
} else {
this.$message.error(res.msg);
}
}
}
});
},
},
};
</script>
<style></style>

@ -1,159 +1,15 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">收费标准管理
<a-radio-group v-model='chargeType' button-style="solid" @change='changeType'>
<a-radio-button value="1">
房屋收费标准
</a-radio-button>
<a-radio-button value="2">
仪表收费标准
</a-radio-button>
<a-radio-button value="3">
车位收费标准
</a-radio-button>
<a-radio-button value="4">
临时收费标准
</a-radio-button>
</a-radio-group></a-space>
</div>
<searchForm :formItem="formItem" @getSearch="getData($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
>添加费用</a-button
>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="edit(row)"></a>
<a class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space>
</span>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
账单通知
</div>
</template>
<script>
import { formItem, columns, pagination } from "./depend/config";
export default {
data() {
return {
chargeType:'1',
drawer: {
show: false,
},
tableData: [],
searchForm: {
name: undefined,
},
formItem,
columns,
pagination,
// index
selectedRowKeys: [],
};
},
mounted() {
// this.getData();
},
methods: {
async getData(data) {
if (data !== undefined) {
console.log(data);
this.searchForm = data;
console.log(this.searchForm);
}
let res = await List({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
this.selectedRowKeys = [];
},
changeType(data){
console.log(data.target.value);
},
edit(data) {
},
del(ids) {
this.$confirm({
title: "是否删除",
// okText:'',
// cancelText:'',
icon: "delete",
onOk: async () => {
let res = await Del({ ids: ids });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
});
},
// id
selectionChoosed(data) {
this.selectedRowKeys = data;
},
//
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
//
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
addClose() {
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
.table-img {
width: 40px;
height: 40px;
}
<style>
</style>

@ -1,31 +1,15 @@
export const formItem = [
{
type: 'input',
label:'费用名称',
prop:'name',
label:'',
prop:'',
placeholder:'请输入'
},
]
export const columns = [
{
title: "费用名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feetype",
},
{
title: "计量方式",
dataIndex: "type",
},
{
title: "单价",
dataIndex: "price",
},
{
title: "单位",
dataIndex: "unit",
title: "",
dataIndex: "",
},
{
title: "操作",

@ -1,7 +0,0 @@
export const form = {
id:null,
brandName: undefined,
}
export const rules = {
brandName:[{required:true,message:'请输入品牌名',trigger:'blur'}],
}

@ -1,72 +0,0 @@
<template>
<div>
<a-drawer
:title="drawer.title"
:width="720"
:visible="drawer.show"
:body-style="{ paddingBottom: '80px' }"
@close="addClose"
>
<div class="drawer-content">
基本信息
<a-divider></a-divider>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
layout="vertical"
>
<a-form-model-item prop="brandName" label="品牌名称">
<a-input
v-model="form.brandName"
placeholder="请输入品牌名称"
style="width: 50%"
></a-input>
</a-form-model-item>
</a-form-model>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="addClose">
关闭
</a-button>
<a-button type="primary" @click="submit"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
export default {
methods: {
submit() {
console.log(this.form);
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if (this.form.id === null) {
let res = await Insert(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.addClose();
this.getData();
} else {
this.$message.error(res.msg);
}
} else {
console.log(this.form);
let res = await Update(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.addClose();
this.getData();
} else {
this.$message.error(res.msg);
}
}
}
});
},
},
};
</script>
<style></style>

@ -1,143 +1,15 @@
<template>
<div>
<div class="cardTitle">
欠款明细
</div>
<searchForm :formItem="formItem" @getSearch="getData($event)"></searchForm>
<!-- <a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
>添加费用</a-button
> -->
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<!-- <span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="edit(row)"></a>
</a-space>
</span> -->
</a-table>
<!-- <div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div> -->
欠费
</div>
</template>
<script>
import { formItem, columns, pagination } from "./depend/config";
export default {
data() {
return {
chargeType:'1',
drawer: {
show: false,
},
tableData: [],
searchForm: {
name: undefined,
},
formItem,
columns,
pagination,
// index
selectedRowKeys: [],
};
},
mounted() {
// this.getData();
},
methods: {
async getData(data) {
if (data !== undefined) {
console.log(data);
this.searchForm = data;
console.log(this.searchForm);
}
let res = await List({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
this.selectedRowKeys = [];
},
changeType(data){
console.log(data.target.value);
},
edit(data) {
},
del(ids) {
this.$confirm({
title: "是否删除",
// okText:'',
// cancelText:'',
icon: "delete",
onOk: async () => {
let res = await Del({ ids: ids });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
});
},
// id
selectionChoosed(data) {
this.selectedRowKeys = data;
},
//
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
//
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
addClose() {
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
.table-img {
width: 40px;
height: 40px;
}
<style>
</style>

@ -1,70 +1,24 @@
export const formItem = [
{
type: 'time',
label:'收款时间',
},
{
type: 'select',
label:'收款方式',
type: 'input',
label:'',
prop:'',
placeholder:'请输入'
},
]
export const columns = [
{
title: "账单名称",
dataIndex: "name",
},
{
title: "房屋",
dataIndex: "",
},
{
title: "户主",
dataIndex: "",
},
{
title: "承租人",
dataIndex: "",
},
{
title: "建筑面积",
dataIndex: "",
},
{
title: "流水号",
title: "",
dataIndex: "",
},
{
title: "收费标准",
dataIndex: "",
},
{
title: "费用周期",
dataIndex: "",
},
{
title: "应收金额",
dataIndex: "",
},
{
title: "实收金额",
dataIndex: "",
},
{
title: "违约金额",
dataIndex: "",
},
{
title: "收款时间",
dataIndex: "",
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
// {
// title: "操作",
// dataIndex: "action",
// key: "action",
// width: "180",
// fixed: "right",
// scopedSlots: { customRender: "action" },
// },
]
export const pagination = {
current: 1,

@ -1,7 +0,0 @@
export const form = {
id:null,
brandName: undefined,
}
export const rules = {
brandName:[{required:true,message:'请输入品牌名',trigger:'blur'}],
}

@ -1,72 +0,0 @@
<template>
<div>
<a-drawer
:title="drawer.title"
:width="720"
:visible="drawer.show"
:body-style="{ paddingBottom: '80px' }"
@close="addClose"
>
<div class="drawer-content">
基本信息
<a-divider></a-divider>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
layout="vertical"
>
<a-form-model-item prop="brandName" label="品牌名称">
<a-input
v-model="form.brandName"
placeholder="请输入品牌名称"
style="width: 50%"
></a-input>
</a-form-model-item>
</a-form-model>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="addClose">
关闭
</a-button>
<a-button type="primary" @click="submit"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
export default {
methods: {
submit() {
console.log(this.form);
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if (this.form.id === null) {
let res = await Insert(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.addClose();
this.getData();
} else {
this.$message.error(res.msg);
}
} else {
console.log(this.form);
let res = await Update(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.addClose();
this.getData();
} else {
this.$message.error(res.msg);
}
}
}
});
},
},
};
</script>
<style></style>

@ -1,144 +1,15 @@
<template>
<div>
<div class="cardTitle">
缴费明细
</div>
<searchForm :formItem="formItem" @getSearch="getData($event)"></searchForm>
<!-- <a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
>添加费用</a-button
> -->
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<!-- <span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="edit(row)"></a>
</a-space>
</span> -->
</a-table>
<!-- <div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div> -->
</div>
</template>
<script>
import { formItem, columns, pagination } from "./depend/config";
export default {
data() {
return {
chargeType:'1',
drawer: {
show: false,
},
tableData: [],
searchForm: {
name: undefined,
},
formItem,
columns,
pagination,
// index
selectedRowKeys: [],
};
},
mounted() {
// this.getData();
},
methods: {
async getData(data) {
if (data !== undefined) {
console.log(data);
this.searchForm = data;
console.log(this.searchForm);
}
let res = await List({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
this.selectedRowKeys = [];
},
changeType(data){
console.log(data.target.value);
},
edit(data) {
},
del(ids) {
this.$confirm({
title: "是否删除",
// okText:'',
// cancelText:'',
icon: "delete",
onOk: async () => {
let res = await Del({ ids: ids });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
});
},
// id
selectionChoosed(data) {
this.selectedRowKeys = data;
},
//
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
//
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
addClose() {
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
.table-img {
width: 40px;
height: 40px;
}
<style>
</style>

@ -1,31 +1,15 @@
export const formItem = [
{
type: 'input',
label:'费用名称',
prop:'name',
label:'',
prop:'',
placeholder:'请输入'
},
]
export const columns = [
{
title: "费用名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feetype",
},
{
title: "计量方式",
dataIndex: "type",
},
{
title: "单价",
dataIndex: "price",
},
{
title: "单位",
dataIndex: "unit",
title: "",
dataIndex: "",
},
{
title: "操作",

@ -1,7 +0,0 @@
export const form = {
id:null,
brandName: undefined,
}
export const rules = {
brandName:[{required:true,message:'请输入品牌名',trigger:'blur'}],
}

@ -1,72 +0,0 @@
<template>
<div>
<a-drawer
:title="drawer.title"
:width="720"
:visible="drawer.show"
:body-style="{ paddingBottom: '80px' }"
@close="addClose"
>
<div class="drawer-content">
基本信息
<a-divider></a-divider>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
layout="vertical"
>
<a-form-model-item prop="brandName" label="品牌名称">
<a-input
v-model="form.brandName"
placeholder="请输入品牌名称"
style="width: 50%"
></a-input>
</a-form-model-item>
</a-form-model>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="addClose">
关闭
</a-button>
<a-button type="primary" @click="submit"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
export default {
methods: {
submit() {
console.log(this.form);
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if (this.form.id === null) {
let res = await Insert(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.addClose();
this.getData();
} else {
this.$message.error(res.msg);
}
} else {
console.log(this.form);
let res = await Update(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.addClose();
this.getData();
} else {
this.$message.error(res.msg);
}
}
}
});
},
},
};
</script>
<style></style>

@ -1,159 +1,15 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">收费标准管理
<a-radio-group v-model='chargeType' button-style="solid" @change='changeType'>
<a-radio-button value="1">
房屋收费标准
</a-radio-button>
<a-radio-button value="2">
仪表收费标准
</a-radio-button>
<a-radio-button value="3">
车位收费标准
</a-radio-button>
<a-radio-button value="4">
临时收费标准
</a-radio-button>
</a-radio-group></a-space>
</div>
<searchForm :formItem="formItem" @getSearch="getData($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
>添加费用</a-button
>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="edit(row)"></a>
<a class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space>
</span>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
收缴率报表
</div>
</template>
<script>
import { formItem, columns, pagination } from "./depend/config";
export default {
data() {
return {
chargeType:'1',
drawer: {
show: false,
},
tableData: [],
searchForm: {
name: undefined,
},
formItem,
columns,
pagination,
// index
selectedRowKeys: [],
};
},
mounted() {
// this.getData();
},
methods: {
async getData(data) {
if (data !== undefined) {
console.log(data);
this.searchForm = data;
console.log(this.searchForm);
}
let res = await List({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
this.selectedRowKeys = [];
},
changeType(data){
console.log(data.target.value);
},
edit(data) {
},
del(ids) {
this.$confirm({
title: "是否删除",
// okText:'',
// cancelText:'',
icon: "delete",
onOk: async () => {
let res = await Del({ ids: ids });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
});
},
// id
selectionChoosed(data) {
this.selectedRowKeys = data;
},
//
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
//
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
addClose() {
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
.table-img {
width: 40px;
height: 40px;
}
<style>
</style>

@ -1,31 +1,15 @@
export const formItem = [
{
type: 'input',
label:'费用名称',
prop:'name',
label:'',
prop:'',
placeholder:'请输入'
},
]
export const columns = [
{
title: "费用名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feetype",
},
{
title: "计量方式",
dataIndex: "type",
},
{
title: "单价",
dataIndex: "price",
},
{
title: "单位",
dataIndex: "unit",
title: "",
dataIndex: "",
},
{
title: "操作",

@ -1,7 +0,0 @@
export const form = {
id:null,
brandName: undefined,
}
export const rules = {
brandName:[{required:true,message:'请输入品牌名',trigger:'blur'}],
}

@ -1,72 +0,0 @@
<template>
<div>
<a-drawer
:title="drawer.title"
:width="720"
:visible="drawer.show"
:body-style="{ paddingBottom: '80px' }"
@close="addClose"
>
<div class="drawer-content">
基本信息
<a-divider></a-divider>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
layout="vertical"
>
<a-form-model-item prop="brandName" label="品牌名称">
<a-input
v-model="form.brandName"
placeholder="请输入品牌名称"
style="width: 50%"
></a-input>
</a-form-model-item>
</a-form-model>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="addClose">
关闭
</a-button>
<a-button type="primary" @click="submit"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
export default {
methods: {
submit() {
console.log(this.form);
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if (this.form.id === null) {
let res = await Insert(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.addClose();
this.getData();
} else {
this.$message.error(res.msg);
}
} else {
console.log(this.form);
let res = await Update(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.addClose();
this.getData();
} else {
this.$message.error(res.msg);
}
}
}
});
},
},
};
</script>
<style></style>

@ -1,159 +1,15 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">收费标准管理
<a-radio-group v-model='chargeType' button-style="solid" @change='changeType'>
<a-radio-button value="1">
房屋收费标准
</a-radio-button>
<a-radio-button value="2">
仪表收费标准
</a-radio-button>
<a-radio-button value="3">
车位收费标准
</a-radio-button>
<a-radio-button value="4">
临时收费标准
</a-radio-button>
</a-radio-group></a-space>
</div>
<searchForm :formItem="formItem" @getSearch="getData($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
>添加费用</a-button
>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="edit(row)"></a>
<a class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space>
</span>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
退款
</div>
</template>
<script>
import { formItem, columns, pagination } from "./depend/config";
export default {
data() {
return {
chargeType:'1',
drawer: {
show: false,
},
tableData: [],
searchForm: {
name: undefined,
},
formItem,
columns,
pagination,
// index
selectedRowKeys: [],
};
},
mounted() {
// this.getData();
},
methods: {
async getData(data) {
if (data !== undefined) {
console.log(data);
this.searchForm = data;
console.log(this.searchForm);
}
let res = await List({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
this.selectedRowKeys = [];
},
changeType(data){
console.log(data.target.value);
},
edit(data) {
},
del(ids) {
this.$confirm({
title: "是否删除",
// okText:'',
// cancelText:'',
icon: "delete",
onOk: async () => {
let res = await Del({ ids: ids });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
});
},
// id
selectionChoosed(data) {
this.selectedRowKeys = data;
},
//
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
//
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
addClose() {
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
.table-img {
width: 40px;
height: 40px;
}
<style>
</style>

@ -1,7 +1,7 @@
export const formItem = [
{
type: 'input',
label:'费用名称',
label:'',
prop:'name',
placeholder:'请输入'
},
@ -11,26 +11,6 @@ export const columns = [
title: "账单名称",
dataIndex: "name",
},
{
title: "开始时间",
dataIndex: "",
},
{
title: "结束时间",
dataIndex: "",
},
{
title: "自动扣费时间(每月)",
dataIndex: "",
},
{
title: "创建人",
dataIndex: "",
},
{
title: "创建时间",
dataIndex: "",
},
{
title: "操作",
dataIndex: "action",

@ -1,7 +1,7 @@
export const form = {
id:null,
brandName: undefined,
name: undefined,
}
export const rules = {
brandName:[{required:true,message:'请输入品牌名',trigger:'blur'}],
name:[{required:true,message:'请输入品牌名',trigger:'blur'}],
}

@ -1,155 +1,13 @@
<template>
<div>
<div class="cardTitle">
收费标准管理
</div>
<a-tabs v-model="chargeType" @change="changeType">
<a-tab-pane key="1" tab="手动生成账单">
<house/>
</a-tab-pane>
<a-tab-pane key="2" tab="自动生成账单">
<pay-meter/>
</a-tab-pane>
<a-tab-pane key="3" tab="账单自动扣费">
<parking/>
</a-tab-pane>
</a-tabs>
<searchForm :formItem="formItem" @getSearch="getData($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
>添加缴费计划</a-button
>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="edit(row)"></a>
<a class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space>
</span>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
</div>
<div>缴费计划</div>
</template>
<script>
import { formItem, columns, pagination } from "./depend/config";
export default {
data() {
return {
chargeType:'1',
drawer: {
show: false,
},
tableData: [],
searchForm: {
name: undefined,
},
formItem,
columns,
pagination,
// index
selectedRowKeys: [],
};
},
mounted() {
// this.getData();
},
methods: {
async getData(data) {
if (data !== undefined) {
console.log(data);
this.searchForm = data;
console.log(this.searchForm);
}
let res = await List({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
this.selectedRowKeys = [];
},
changeType(data){
},
edit(data) {
},
del(ids) {
this.$confirm({
title: "是否删除",
// okText:'',
// cancelText:'',
icon: "delete",
onOk: async () => {
let res = await Del({ ids: ids });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
});
},
// id
selectionChoosed(data) {
this.selectedRowKeys = data;
},
//
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
//
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
addClose() {
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
.table-img {
width: 40px;
height: 40px;
}
<style>
</style>
Loading…
Cancel
Save