bibi 3 years ago
parent d32aed83cd
commit a07e81945d

@ -16,32 +16,83 @@ export default [
component: resolve => require(['@/views/Payment/ChargeStandardManage'], resolve),
meta: {title: '收费标准管理'},
},
// {
// path: '/Activity',
// name: "Activity",
// title: "活动",
// icon: 'notification',
// hide: false,
// component: resolve => require(['@/views/Operation/Activity'], resolve),
// redirect: '/Activity/ActivityManage',
// meta: {title: '活动'},
// children: [
// {
// path: '/Activity/ActivityManage',
// name: "ActivityManage",
// title: "活动管理",
// hide: false,
// component: resolve => require(['@/views/Operation/Activity/_activityManage'], resolve),
// meta: {title: '活动管理'},
// },
// {
// path: '/Activity/Organizers',
// name: "Organizers",
// title: "活动主办方",
// hide: false,
// component: resolve => require(['@/views/Operation/Activity/_organizers'], resolve),
// meta: {title: '活动主办方'},
// },
// ]
// },
{
path: '/ChargeStandardBind',
name: "ChargeStandardBind",
title: "收费标准绑定",
icon: 'sliders',
hide: false,
component: resolve => require(['@/views/Payment/ChargeStandardBind'], resolve),
meta: {title: '收费标准绑定'},
},
{
path: '/PrepayManage',
name: "PrepayManage",
title: "预缴管理",
icon: 'book',
hide: false,
component: resolve => require(['@/views/Payment/PrepayManage'], resolve),
meta: {title: '预缴管理'},
},
{
path: '/PayPlan',
name: "PayPlan",
title: "缴费计划",
icon: 'transaction',
hide: false,
component: resolve => require(['@/views/Payment/PayPlan'], resolve),
meta: {title: '缴费计划'},
},
{
path: '/BillManage',
name: "BillManage",
title: "账单管理",
icon: 'audit',
hide: false,
component: resolve => require(['@/views/Payment/BillManage'], resolve),
redirect: '/Payment/ActivityManage',
meta: {title: '账单管理'},
children: [
{
path: '/BillManage/PayList',
name: "PayList",
title: "缴费明细",
hide: false,
component: resolve => require(['@/views/Payment/BillManage/_payList'], resolve),
meta: {title: '缴费明细'},
},
{
path: '/BillManage/OweList',
name: "OweList",
title: "欠费明细",
hide: false,
component: resolve => require(['@/views/Payment/BillManage/_oweList'], resolve),
meta: {title: '欠费明细'},
},
{
path: '/BillManage/PayRateReport',
name: "PayRateReport",
title: "收缴率报表",
hide: false,
component: resolve => require(['@/views/Payment/BillManage/_payRateReport'], resolve),
meta: {title: '收缴率报表'},
},
{
path: '/BillManage/RefundRecord',
name: "RefundRecord",
title: "退款记录",
hide: false,
component: resolve => require(['@/views/Payment/BillManage/_refundRecord'], resolve),
meta: {title: '退款记录'},
},
{
path: '/BillManage/BillNotice',
name: "BillNotice",
title: "账单通知",
hide: false,
component: resolve => require(['@/views/Payment/BillManage/_billNotice'], resolve),
meta: {title: '账单通知'},
},
]
},
]

@ -39,7 +39,7 @@
}
.add-btn{
background-color: rgba(251, 101, 61, 1) !important;
background-color: #1890FF !important;
color: rgba(255, 255, 255, 1) !important;
}
.footer {

@ -13,18 +13,18 @@ export const columns = [
},
{
title: "计费方式",
dataIndex: "type",
dataIndex: "feetype",
},
{
title: "计量方式",
dataIndex: "name",
dataIndex: "type",
},
{
title: "单价",
dataIndex: "price",
},
{
title: "单",
title: "单",
dataIndex: "unit",
},
{

@ -0,0 +1,72 @@
<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>

@ -0,0 +1,159 @@
<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>

@ -0,0 +1,46 @@
export const formItem = [
{
type: 'input',
label:'费用名称',
prop:'name',
placeholder:'请输入'
},
]
export const columns = [
{
title: "费用名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feetype",
},
{
title: "计量方式",
dataIndex: "type",
},
{
title: "单价",
dataIndex: "price",
},
{
title: "单位",
dataIndex: "unit",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

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

@ -0,0 +1,72 @@
<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>

@ -0,0 +1,159 @@
<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>

@ -0,0 +1,46 @@
export const formItem = [
{
type: 'input',
label:'费用名称',
prop:'name',
placeholder:'请输入'
},
]
export const columns = [
{
title: "费用名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feetype",
},
{
title: "计量方式",
dataIndex: "type",
},
{
title: "单价",
dataIndex: "price",
},
{
title: "单位",
dataIndex: "unit",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

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

@ -0,0 +1,72 @@
<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>

@ -0,0 +1,159 @@
<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>

@ -0,0 +1,46 @@
export const formItem = [
{
type: 'input',
label:'费用名称',
prop:'name',
placeholder:'请输入'
},
]
export const columns = [
{
title: "费用名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feetype",
},
{
title: "计量方式",
dataIndex: "type",
},
{
title: "单价",
dataIndex: "price",
},
{
title: "单位",
dataIndex: "unit",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

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

@ -0,0 +1,72 @@
<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>

@ -0,0 +1,159 @@
<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>

@ -0,0 +1,46 @@
export const formItem = [
{
type: 'input',
label:'费用名称',
prop:'name',
placeholder:'请输入'
},
]
export const columns = [
{
title: "费用名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feetype",
},
{
title: "计量方式",
dataIndex: "type",
},
{
title: "单价",
dataIndex: "price",
},
{
title: "单位",
dataIndex: "unit",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

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

@ -0,0 +1,72 @@
<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>

@ -0,0 +1,159 @@
<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>

@ -0,0 +1,13 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
}
</script>
<style>
</style>

@ -0,0 +1,34 @@
export const columns = [
{
title: "收费标准名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feeType",
},
{
title: "计量方式",
dataIndex: "Type",
},
{
title: "单价",
dataIndex: "price",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

@ -0,0 +1,174 @@
<template>
<div>
<div class="cardTitle">房屋列表</div>
<div class="content flexbox">
<div class="tree">
<a-tree
v-model="checkedKeys"
checkable
:expanded-keys="expandedKeys"
:auto-expand-parent="autoExpandParent"
:selected-keys="selectedKeys"
:tree-data="treeData"
@expand="onExpand"
@select="onSelect"
:replaceFields="{
children: 'childList',
title: 'name',
key: 'id',
}"
>
</a-tree>
</div>
<a-divider type="vertical" style="height: 100vh"></a-divider>
<div class="table">
<div class="cardTitle">已绑定收费标准</div>
<a-button class="add-btn" style="margin: 10px"
>新增绑定</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="">
<a-space>
<a>详情</a>
<a>解绑</a>
</a-space>
</span>
<span slot="imgpic" slot-scope="text, row">
<img
v-if="row.imgUrls.length > 0"
:src="$ImgUrl(row.imgUrls[0].url)"
class="table-img"
alt=""
/>
<span v-else></span>
</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 { estate } from "@/api/basic/estate";
import { columns, pagination } from "./depend/config";
export default {
data() {
return {
columns,
pagination,
selectedRowKeys: [],
tableData: [],
expandedKeys: [],
autoExpandParent: true,
checkedKeys: [],
selectedKeys: [],
treeData: [],
};
},
mounted() {
this.getEstate();
},
methods: {
async getEstate() {
let res = await estate();
this.treeData = res.data;
},
del(ids) {
this.$confirm({
title: "是否解绑",
icon: "delete",
onOk: async () => {
let res = await cateDel({ ids: ids });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
});
},
selectionChoosed(data) {
this.selectedRowKeys = data;
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
//
onExpand(expandedKeys) {
this.expandedKeys = expandedKeys;
this.autoExpandParent = false;
},
handleMenuClick(data) {
console.log(data);
if (data.key === "del") {
this.del(this.selectedRowKeys);
}
},
async onSelect(selectedKeys) {
this.selectedKeys = selectedKeys;
console.log(selectedKeys);
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
watch: {
checkedKeys(val){
console.log(val);
}
}
};
</script>
<style lang="less" scoped>
.table-img {
width: 40px;
height: 40px;
}
.flexbox {
display: flex;
justify-content: space-around;
}
.tree {
padding-left: 30px;
min-width: 200px;
}
.table {
width: 80%;
}
</style>

@ -0,0 +1,46 @@
export const formItem = [
{
type: 'input',
label:'费用名称',
prop:'name',
placeholder:'请输入'
},
]
export const columns = [
{
title: "费用名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feetype",
},
{
title: "计量方式",
dataIndex: "type",
},
{
title: "单价",
dataIndex: "price",
},
{
title: "单位",
dataIndex: "unit",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

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

@ -0,0 +1,72 @@
<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>

@ -0,0 +1,131 @@
<template>
<div>
<searchForm :formItem="formItem" @getSearch="getData($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn">添加费用</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",
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 = [];
},
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>

@ -0,0 +1,46 @@
export const formItem = [
{
type: 'input',
label:'费用名称',
prop:'name',
placeholder:'请输入'
},
]
export const columns = [
{
title: "费用名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feetype",
},
{
title: "计量方式",
dataIndex: "type",
},
{
title: "单价",
dataIndex: "price",
},
{
title: "单位",
dataIndex: "unit",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

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

@ -0,0 +1,72 @@
<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>

@ -0,0 +1,131 @@
<template>
<div>
<searchForm :formItem="formItem" @getSearch="getData($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn">添加费用</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",
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 = [];
},
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>

@ -0,0 +1,46 @@
export const formItem = [
{
type: 'input',
label:'费用名称',
prop:'name',
placeholder:'请输入'
},
]
export const columns = [
{
title: "费用名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feetype",
},
{
title: "计量方式",
dataIndex: "type",
},
{
title: "单价",
dataIndex: "price",
},
{
title: "单位",
dataIndex: "unit",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

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

@ -0,0 +1,72 @@
<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>

@ -0,0 +1,131 @@
<template>
<div>
<searchForm :formItem="formItem" @getSearch="getData($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn">添加费用</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",
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 = [];
},
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>

@ -0,0 +1,46 @@
export const formItem = [
{
type: 'input',
label:'费用名称',
prop:'name',
placeholder:'请输入'
},
]
export const columns = [
{
title: "费用名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feetype",
},
{
title: "计量方式",
dataIndex: "type",
},
{
title: "单价",
dataIndex: "price",
},
{
title: "单位",
dataIndex: "unit",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

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

@ -0,0 +1,72 @@
<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>

@ -0,0 +1,131 @@
<template>
<div>
<searchForm :formItem="formItem" @getSearch="getData($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn">添加费用</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",
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 = [];
},
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>

@ -1,230 +1,42 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">收费标准管理
<a-radio-group default-value="a" button-style="solid">
<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>
<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 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-tab-pane key="4" tab="临时收费标准">
<moment/>
</a-tab-pane>
</a-tabs>
</div>
</template>
<script>
import {
brandList,
brandInsert,
brandDel,
brandUpdate,
} from "@/api/shop/goods/brand.js";
import { formItem, columns, pagination } from "./depend/config";
import { form, rules } from "./depend/form.js";
import house from "./_house/index.vue"
import payMeter from "./_house/index.vue"
import parking from "./_house/index.vue"
import moment from "./_house/index.vue"
export default {
components: {
house,payMeter,parking,moment
},
data() {
return {
drawer: {
show: false,
title: "新增品牌"
},
tableData: [],
searchForm: {
name: undefined,
},
formItem,
columns,
form,
rules,
pagination,
// index
selectedRowKeys: [],
chargeType: "1",
};
},
mounted() {
this.getData();
},
methods: {
async getData(data) {
if (data !== undefined) {
console.log(data);
this.searchForm = data;
console.log(this.searchForm);
}
let res = await brandList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
this.selectedRowKeys = [];
},
edit(data) {
this.form.brandName = data.brandName
this.form.id = data.id
this.drawer.show = true;
this.drawer.title = '修改品牌';
},
del(ids) {
this.$confirm({
title: "是否删除",
// okText:'',
// cancelText:'',
icon: "delete",
onOk: async () => {
let res = await brandDel({ 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() {
this.$refs.ruleForm.resetFields();
this.drawer.show = false;
this.drawer.title = '新增品牌';
},
submit() {
console.log(this.form);
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if (this.form.id === null) {
let res = await brandInsert(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 brandUpdate(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
this.addClose();
this.getData();
} else {
this.$message.error(res.msg);
}
}
}
});
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
changeType(data) {
},
},
};
</script>
<style lang="less" scoped>
.table-img {
width: 40px;
height: 40px;
}
</style>

@ -0,0 +1,46 @@
export const formItem = [
{
type: 'input',
label:'费用名称',
prop:'name',
placeholder:'请输入'
},
]
export const columns = [
{
title: "费用名称",
dataIndex: "name",
},
{
title: "计费方式",
dataIndex: "feetype",
},
{
title: "计量方式",
dataIndex: "type",
},
{
title: "单价",
dataIndex: "price",
},
{
title: "单位",
dataIndex: "unit",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

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

@ -0,0 +1,72 @@
<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>

@ -0,0 +1,159 @@
<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>

@ -0,0 +1,53 @@
export const formItem = [
{
type: 'input',
label:'房间',
prop:'name',
placeholder:'请输入'
},
{
type: 'input',
label:'费用名称',
prop:'name',
placeholder:'请输入'
},
]
export const columns = [
{
title: "房屋信息",
dataIndex: "",
},
{
title: "户主",
dataIndex: "",
},
{
title: "余额",
dataIndex: "",
},
{
title: "余额状态",
dataIndex: "",
scopedSlots:{ customRender: "tags"}
},
{
title: "单位",
dataIndex: "unit",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

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

@ -0,0 +1,72 @@
<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>

@ -0,0 +1,148 @@
<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="detail(row.id)"></a>
<a class="ant-dropdown-link" @click="save(row.id)"></a>
</a-space>
</span>
<span slot="tags" slot-scope="text, row">
<a-tag>{{row.type}}</a-tag>
</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: [{type:1}],
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>

@ -2,11 +2,10 @@
<div>
<div class="cardTitle">商品分类</div>
<div class="content flexbox">
<div class="tree">
<a-button class="add-btn" style="margin-left: 10px" @click="addCate"
>新增商品分类</a-button
>
<a-button class="add-btn" style="margin-left: 10px" @click="addCate"
>新增商品分类</a-button
>
<a-tree
v-model="checkedKeys"
:expanded-keys="expandedKeys"
@ -23,8 +22,8 @@
>
</a-tree>
</div>
<a-divider type="vertical" style="height:100vh"></a-divider>
<div class='table'>
<a-divider type="vertical" style="height: 100vh"></a-divider>
<div class="table">
<a-table
:columns="columns"
:data-source="tableData"
@ -42,17 +41,9 @@
>
<span slot="action" slot-scope="text, row">
<a-space>
<a @click="edit(row)"></a>
<a
@click="show(row.id)"
v-if="row.isShow === 0"
>显示</a
>
<a
@click="show(row.id)"
v-else-if="row.isShow === 1"
>隐藏</a
>
<a @click="edit(row)"></a>
<a @click="show(row.id)" v-if="row.isShow === 0"></a>
<a @click="show(row.id)" v-else-if="row.isShow === 1">隐藏</a>
<a class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space>
</span>
@ -66,19 +57,19 @@
<span v-else></span>
</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 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>
<a-drawer
@ -98,7 +89,11 @@
style="width: 80%"
></a-input>
</a-form-model-item>
<a-form-model-item prop="name" label="上级分类" v-if="drawer.title==='新增分类'">
<a-form-model-item
prop="name"
label="上级分类"
v-if="drawer.title === '新增分类'"
>
<a-cascader
style="width: 80%"
:field-names="{
@ -113,11 +108,11 @@
v-model="cascVal"
/>
</a-form-model-item>
<a-form-model-item label="分类图片">
<a-form-model-item label="分类图片">
<commonUpload
:fileList="fileList"
@handleChange="handleChange"
></commonUpload>
:fileList="fileList"
@handleChange="handleChange"
></commonUpload>
</a-form-model-item>
</a-form-model>
</div>
@ -138,7 +133,7 @@ import {
cateShow,
cateInsert,
cateUpdate,
cateDel
cateDel,
} from "@/api/shop/goods/cate.js";
import { columns, pagination, rules } from "./depend/config";
export default {
@ -150,13 +145,13 @@ export default {
// index
selectedRowKeys: [],
tableData: [],
fileList:[],
fileList: [],
drawer: {
show: false,
title: "新增分类",
},
form: {
categoryId:undefined,// id
categoryId: undefined, // id
parentId: undefined,
name: undefined,
imgList: [],
@ -213,7 +208,7 @@ export default {
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
this.onClose()
this.onClose();
} else {
this.$message.error(res.msg);
}
@ -222,7 +217,7 @@ export default {
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
this.onClose()
this.onClose();
} else {
this.$message.error(res.msg);
}
@ -232,14 +227,14 @@ export default {
},
onClose() {
this.drawer.show = false;
this.form = {
categoryId:undefined,// id
(this.form = {
categoryId: undefined, // id
parentId: undefined,
name: undefined,
imgList: [],
},
this.cascVal=[]
this.fileList = []
}),
(this.cascVal = []);
this.fileList = [];
},
async show(id) {
let res = await cateShow({ shopCategoryId: id });
@ -279,11 +274,11 @@ export default {
this.form.imgList = [];
}
},
handleChange(data){
handleChange(data) {
this.fileList = data;
this.form.imgList=[]
this.form.imgList = [];
if (data[0].status === "done") {
console.log('-------done-------');
console.log("-------done-------");
this.form.imgList.push(data[0].response.data);
}
},
@ -333,15 +328,15 @@ export default {
width: 40px;
height: 40px;
}
.flexbox{
display: flex;
justify-content: space-between;
.flexbox {
display: flex;
justify-content: space-around;
}
.tree {
padding-left: 30px;
min-width: 200px ;
min-width: 200px;
}
.table{
width: 80%;
.table {
width: 80%;
}
</style>

Loading…
Cancel
Save