bibi 3 years ago
parent d32aed83cd
commit a07e81945d

@ -16,32 +16,83 @@ export default [
component: resolve => require(['@/views/Payment/ChargeStandardManage'], resolve), component: resolve => require(['@/views/Payment/ChargeStandardManage'], resolve),
meta: {title: '收费标准管理'}, meta: {title: '收费标准管理'},
}, },
// { {
// path: '/Activity', path: '/ChargeStandardBind',
// name: "Activity", name: "ChargeStandardBind",
// title: "活动", title: "收费标准绑定",
// icon: 'notification', icon: 'sliders',
// hide: false, hide: false,
// component: resolve => require(['@/views/Operation/Activity'], resolve), component: resolve => require(['@/views/Payment/ChargeStandardBind'], resolve),
// redirect: '/Activity/ActivityManage', meta: {title: '收费标准绑定'},
// meta: {title: '活动'}, },
// children: [ {
// { path: '/PrepayManage',
// path: '/Activity/ActivityManage', name: "PrepayManage",
// name: "ActivityManage", title: "预缴管理",
// title: "活动管理", icon: 'book',
// hide: false, hide: false,
// component: resolve => require(['@/views/Operation/Activity/_activityManage'], resolve), component: resolve => require(['@/views/Payment/PrepayManage'], resolve),
// meta: {title: '活动管理'}, meta: {title: '预缴管理'},
// }, },
// { {
// path: '/Activity/Organizers', path: '/PayPlan',
// name: "Organizers", name: "PayPlan",
// title: "活动主办方", title: "缴费计划",
// hide: false, icon: 'transaction',
// component: resolve => require(['@/views/Operation/Activity/_organizers'], resolve), hide: false,
// meta: {title: '活动主办方'}, 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{ .add-btn{
background-color: rgba(251, 101, 61, 1) !important; background-color: #1890FF !important;
color: rgba(255, 255, 255, 1) !important; color: rgba(255, 255, 255, 1) !important;
} }
.footer { .footer {

@ -13,18 +13,18 @@ export const columns = [
}, },
{ {
title: "计费方式", title: "计费方式",
dataIndex: "type", dataIndex: "feetype",
}, },
{ {
title: "计量方式", title: "计量方式",
dataIndex: "name", dataIndex: "type",
}, },
{ {
title: "单价", title: "单价",
dataIndex: "price", dataIndex: "price",
}, },
{ {
title: "单", title: "单",
dataIndex: "unit", 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> <template>
<div> <div>
<div class="cardTitle"> <div class="cardTitle">收费标准管理</div>
<a-space size="large">收费标准管理 <a-tabs v-model="chargeType" @change="changeType">
<a-radio-group default-value="a" button-style="solid"> <a-tab-pane key="1" tab="房屋收费标准">
<a-radio-button value="1"> <house/>
房屋收费标准 </a-tab-pane>
</a-radio-button> <a-tab-pane key="2" tab="仪表收费标准">
<a-radio-button value="2"> <pay-meter/>
仪表收费标准 </a-tab-pane>
</a-radio-button> <a-tab-pane key="3" tab="车位收费标准">
<a-radio-button value="3"> <parking/>
车位收费标准 </a-tab-pane>
</a-radio-button> <a-tab-pane key="4" tab="临时收费标准">
<a-radio-button value="4"> <moment/>
临时收费标准 </a-tab-pane>
</a-radio-button> </a-tabs>
</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> </div>
</template> </template>
<script> <script>
import { import house from "./_house/index.vue"
brandList, import payMeter from "./_house/index.vue"
brandInsert, import parking from "./_house/index.vue"
brandDel, import moment from "./_house/index.vue"
brandUpdate,
} from "@/api/shop/goods/brand.js";
import { formItem, columns, pagination } from "./depend/config";
import { form, rules } from "./depend/form.js";
export default { export default {
components: {
house,payMeter,parking,moment
},
data() { data() {
return { return {
drawer: { chargeType: "1",
show: false,
title: "新增品牌"
},
tableData: [],
searchForm: {
name: undefined,
},
formItem,
columns,
form,
rules,
pagination,
// index
selectedRowKeys: [],
}; };
}, },
mounted() {
this.getData();
},
methods: { methods: {
async getData(data) { changeType(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;
}, },
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.table-img {
width: 40px;
height: 40px;
}
</style> </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>
<div class="cardTitle">商品分类</div> <div class="cardTitle">商品分类</div>
<div class="content flexbox"> <div class="content flexbox">
<div class="tree"> <div class="tree">
<a-button class="add-btn" style="margin-left: 10px" @click="addCate" <a-button class="add-btn" style="margin-left: 10px" @click="addCate"
>新增商品分类</a-button >新增商品分类</a-button
> >
<a-tree <a-tree
v-model="checkedKeys" v-model="checkedKeys"
:expanded-keys="expandedKeys" :expanded-keys="expandedKeys"
@ -23,8 +22,8 @@
> >
</a-tree> </a-tree>
</div> </div>
<a-divider type="vertical" style="height:100vh"></a-divider> <a-divider type="vertical" style="height: 100vh"></a-divider>
<div class='table'> <div class="table">
<a-table <a-table
:columns="columns" :columns="columns"
:data-source="tableData" :data-source="tableData"
@ -42,17 +41,9 @@
> >
<span slot="action" slot-scope="text, row"> <span slot="action" slot-scope="text, row">
<a-space> <a-space>
<a @click="edit(row)"></a> <a @click="edit(row)"></a>
<a <a @click="show(row.id)" v-if="row.isShow === 0"></a>
@click="show(row.id)" <a @click="show(row.id)" v-else-if="row.isShow === 1">隐藏</a>
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 class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space> </a-space>
</span> </span>
@ -66,19 +57,19 @@
<span v-else></span> <span v-else></span>
</span> </span>
</a-table> </a-table>
<div class="action"> <div class="action">
<a-dropdown :disabled="!hasSelected"> <a-dropdown :disabled="!hasSelected">
<a-menu slot="overlay" @click="handleMenuClick"> <a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item> <a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu> </a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button> <a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown> </a-dropdown>
<span style="margin-left: 8px"> <span style="margin-left: 8px">
<template v-if="hasSelected"> <template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }} {{ `已选择 ${selectedRowKeys.length}` }}
</template> </template>
</span> </span>
</div> </div>
</div> </div>
</div> </div>
<a-drawer <a-drawer
@ -98,7 +89,11 @@
style="width: 80%" style="width: 80%"
></a-input> ></a-input>
</a-form-model-item> </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 <a-cascader
style="width: 80%" style="width: 80%"
:field-names="{ :field-names="{
@ -113,11 +108,11 @@
v-model="cascVal" v-model="cascVal"
/> />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="分类图片"> <a-form-model-item label="分类图片">
<commonUpload <commonUpload
:fileList="fileList" :fileList="fileList"
@handleChange="handleChange" @handleChange="handleChange"
></commonUpload> ></commonUpload>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</div> </div>
@ -138,7 +133,7 @@ import {
cateShow, cateShow,
cateInsert, cateInsert,
cateUpdate, cateUpdate,
cateDel cateDel,
} from "@/api/shop/goods/cate.js"; } from "@/api/shop/goods/cate.js";
import { columns, pagination, rules } from "./depend/config"; import { columns, pagination, rules } from "./depend/config";
export default { export default {
@ -150,13 +145,13 @@ export default {
// index // index
selectedRowKeys: [], selectedRowKeys: [],
tableData: [], tableData: [],
fileList:[], fileList: [],
drawer: { drawer: {
show: false, show: false,
title: "新增分类", title: "新增分类",
}, },
form: { form: {
categoryId:undefined,// id categoryId: undefined, // id
parentId: undefined, parentId: undefined,
name: undefined, name: undefined,
imgList: [], imgList: [],
@ -213,7 +208,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.$message.success(res.msg); this.$message.success(res.msg);
this.getData(); this.getData();
this.onClose() this.onClose();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
@ -222,7 +217,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.$message.success(res.msg); this.$message.success(res.msg);
this.getData(); this.getData();
this.onClose() this.onClose();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
@ -232,14 +227,14 @@ export default {
}, },
onClose() { onClose() {
this.drawer.show = false; this.drawer.show = false;
this.form = { (this.form = {
categoryId:undefined,// id categoryId: undefined, // id
parentId: undefined, parentId: undefined,
name: undefined, name: undefined,
imgList: [], imgList: [],
}, }),
this.cascVal=[] (this.cascVal = []);
this.fileList = [] this.fileList = [];
}, },
async show(id) { async show(id) {
let res = await cateShow({ shopCategoryId: id }); let res = await cateShow({ shopCategoryId: id });
@ -279,11 +274,11 @@ export default {
this.form.imgList = []; this.form.imgList = [];
} }
}, },
handleChange(data){ handleChange(data) {
this.fileList = data; this.fileList = data;
this.form.imgList=[] this.form.imgList = [];
if (data[0].status === "done") { if (data[0].status === "done") {
console.log('-------done-------'); console.log("-------done-------");
this.form.imgList.push(data[0].response.data); this.form.imgList.push(data[0].response.data);
} }
}, },
@ -333,15 +328,15 @@ export default {
width: 40px; width: 40px;
height: 40px; height: 40px;
} }
.flexbox{ .flexbox {
display: flex; display: flex;
justify-content: space-between; justify-content: space-around;
} }
.tree { .tree {
padding-left: 30px; padding-left: 30px;
min-width: 200px ; min-width: 200px;
} }
.table{ .table {
width: 80%; width: 80%;
} }
</style> </style>

Loading…
Cancel
Save