Forráskód Böngészése

供货商、零售端新增支出明细

jf 5 éve
szülő
commit
4416d0792d

+ 31 - 330
ghs/src/mock/userInfo.js

@@ -144,323 +144,44 @@ let menu = {
 	],
 	menus: [
 		//注意如果子菜单有多个,父菜单应设置成type=0 !!!!!!!!!!!! shish 2021.3.25
-		{
-			id: '1',
-			parentId: null,
-			name: '首页',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 1,
-			router: '/',
-			viewPath: 'views/home.vue',
-			keepAlive: 1
-		},
-        {
-            id: '101',
-            parentId: 1,
-            name: '今日概况',
-            type: 1,
-            icon: 'icongongzuotai',
-            orderNum: 1,
-            router: '/console/index',
-            viewPath: 'views/home.vue',
-            keepAlive: 1
-        },
+		{id: '1',parentId: null,name: '首页',type: 1,icon: 'icongongzuotai',orderNum: 1,router: '/',viewPath: 'views/home.vue',keepAlive: 1},
+        {id: '101',parentId: 1,name: '今日概况',type: 1,icon: 'icongongzuotai',orderNum: 1,router: '/console/index',viewPath: 'views/home.vue',keepAlive: 1},
 		// 客户
-		{
-			id: '2',
-			parentId: null,
-			name: '客户',
-			type: 0,
-			icon: 'iconkehuguanli',
-			orderNum: 2,
-			router: '/member/list',
-			viewPath: 'views/member/list.vue',
-			keepAlive: 1
-		},
+		{id: '2',parentId: null,name: '客户',type: 0,icon: 'iconkehuguanli',orderNum: 2,router: '/member/list',viewPath: 'views/member/list.vue',keepAlive: 1},
         // 客户管理
-        {
-            id: '201',
-            parentId: 2,
-            name: '客户列表',
-            type: 1,
-            icon: 'iconkehuguanli',
-            orderNum: 2,
-            router: '/member/list',
-            viewPath: 'views/member/list.vue',
-            keepAlive: 1
-		},
+        {id: '201',parentId: 2,name: '客户列表',type: 1,icon: 'iconkehuguanli',orderNum: 2,router: '/member/list',viewPath: 'views/member/list.vue',keepAlive: 1},
 		// 订单管理
-		{
-			id: '3',
-			parentId: null,
-			name: '订单',
-			type: 0,
-			icon: 'icondingdanguanli',
-			orderNum: 3,
-			router: '/order/list',
-			viewPath: 'views/order/list.vue',
-			keepAlive: 1
-		},
+		{id: '3',parentId: null,name: '订单',type: 0,icon: 'icondingdanguanli',orderNum: 3,router: '/order/list',viewPath: 'views/order/list.vue',keepAlive: 1},
         // 订单列表
-        {
-            id: '301',
-            parentId: 3,
-            name: '订单列表',
-            type: 1,
-            icon: 'icondingdanguanli',
-            orderNum: 3,
-            router: '/order/list',
-            viewPath: 'views/order/list.vue',
-            keepAlive: 1
-		},
-        {
-            id: '302',
-            parentId: 3,
-            name: '开单',
-            type: 1,
-            icon: 'icondingdanguanli',
-            orderNum: 3,
-            router: '/order/add',
-            viewPath: 'views/order/add.vue',
-            keepAlive: 1
-		},
+        {id: '301',parentId: 3,name: '订单列表',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/list',viewPath: 'views/order/list.vue',keepAlive: 1},
+        {id: '302',parentId: 3,name: '开单',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/add',viewPath: 'views/order/add.vue',keepAlive: 1},
 		//花材管理
-		{
-			id: '4',
-			parentId: null,
-			name: '花材',
-			type: 0,
-			icon: 'iconshangpinguanli',
-			orderNum: 4,
-			router: '/item/list',
-			viewPath: 'views/item/list.vue',
-			keepAlive: 1
-		},
-		{
-			id: '405',
-			parentId: '4',
-			name: '花材列表',
-			type: 1,
-			icon: 'icon-user',
-			orderNum: 4,
-			router: '/item/list',
-			viewPath: 'views/item/list.vue',
-			keepAlive: 1
-		},
-		{
-			id: '401',
-			parentId: '4',
-			name: '花材分类',
-			type: 1,
-			icon: 'icon-user',
-			orderNum: 4,
-			router: '/item-class/list',
-			viewPath: 'views/item-class/list.vue',
-			keepAlive: 1
-		},
+		{id: '4',parentId: null,name: '花材',type: 0,icon: 'iconshangpinguanli',orderNum: 4,router: '/item/list',viewPath: 'views/item/list.vue',keepAlive: 1},
+		{id: '405',	parentId: '4',name: '花材列表',type: 1,icon: 'icon-user',orderNum: 4,router: '/item/list',viewPath: 'views/item/list.vue',keepAlive: 1},
+		{id: '401',parentId: '4',name: '花材分类',type: 1,icon: 'icon-user',orderNum: 4,router: '/item-class/list',viewPath: 'views/item-class/list.vue',keepAlive: 1},
 		// 员工管理
-		{
-			id: '9',
-			parentId: null,
-			name: '员工',
-			type: 0,
-			icon: 'iconyuangongguanli',
-			orderNum: 9,
-			router: '/staff/list',
-			viewPath: 'views/staff/list.vue',
-			keepAlive: 1
-		},
-		{
-			id: '902',
-			parentId: '9',
-			name: '员工列表',
-			type: 1,
-			icon: 'iconkehuguanli',
-			orderNum: 9,
-			router: '/staff/list',
-			viewPath: 'views/staff/list.vue',
-			keepAlive: 1
-		},
-		{
-			id: '903',
-			parentId: '9',
-			name: '角色列表',
-			type: 1,
-			icon: 'iconkehuguanli',
-			orderNum: 9,
-			router: '/role/list',
-			viewPath: 'views/staff/role-list.vue',
-			keepAlive: 1
-		},
-		{
-			id: '904',
-			parentId: '9',
-			name: '操作记录',
-			type: 1,
-			icon: 'iconkehuguanli',
-			orderNum: 9,
-			router: '/operate/list',
-			viewPath: 'views/staff/operate.vue',
-			keepAlive: 1
-		},
+		{id: '9',parentId: null,name: '员工',type: 0,icon: 'iconyuangongguanli',orderNum: 9,router: '/staff/list',viewPath: 'views/staff/list.vue',keepAlive: 1},
+		{id: '902',parentId: '9',name: '员工列表',type: 1,icon: 'iconkehuguanli',orderNum: 9,router: '/staff/list',viewPath: 'views/staff/list.vue',keepAlive: 1},
+		{id: '903',parentId: '9',name: '角色列表',type: 1,icon: 'iconkehuguanli',orderNum: 9,router: '/role/list',viewPath: 'views/staff/role-list.vue',keepAlive: 1},
+		{id: '904',	parentId: '9',name: '操作记录',type: 1,icon: 'iconkehuguanli',orderNum: 9,router: '/operate/list',viewPath: 'views/staff/operate.vue',keepAlive: 1},
 		// 门店管理
-		{
-			id: '10',
-			parentId: null,
-			name: '门店',
-			type: 1,
-			icon: 'iconguanggao',
-			orderNum: 10,
-			router: '/shop/list',
-			viewPath: 'views/shop/list.vue',
-			keepAlive: 1
-		},
+		{id: '10',parentId: null,name: '门店',type: 1,icon: 'iconguanggao',orderNum: 10,router: '/shop/list',viewPath: 'views/shop/list.vue',keepAlive: 1},
         // 门店管理
-        {
-            id: '1001',
-            parentId: 10,
-            name: '门店列表',
-            type: 1,
-            icon: 'iconguanggao',
-            orderNum: 10,
-            router: '/shop/list',
-            viewPath: 'views/shop/list.vue',
-            keepAlive: 1
-        },
-		{
-			id: '11',
-			parentId: null,
-			name: '赚钱',
-			type: 1,
-			icon: 'iconyaoqingyouli',
-			orderNum: 11,
-			router: '/pages/admin/my-invite',
-			viewPath: 'views/my-invite/index.vue',
-			keepAlive: 1
-		},
-        {
-            id: '1101',
-            parentId: 11,
-            name: '邀请开店',
-            type: 1,
-            icon: 'iconyaoqingyouli',
-            orderNum: 11,
-            router: '/pages/admin/my-invite',
-            viewPath: 'views/my-invite/index.vue',
-            keepAlive: 1
-        },
-		{
-			id: '12',
-			parentId: null,
-			name: '收支',
-			type: 0,
-			icon: 'icondingdanguanli',
-			orderNum: 12,
-			router: '/assets/list',
-			viewPath: 'views/assets/list.vue',
-			keepAlive: 1
-		},
-		{
-			id: '1201',
-			parentId: '12',
-			name: '收入明细',
-			type: 1,
-			icon: 'icondingdanguanli',
-			orderNum: 12,
-			router: '/assets/list',
-			viewPath: 'views/assets/list.vue',
-			keepAlive: 1
-		},
-		{
-			id: '13',
-			parentId: null,
-			name: '设置',
-			type: 0,
-			icon: 'iconshezhi',
-			orderNum: 12,
-			router: '/goods/list',
-			viewPath: 'views/goods/goods-list.vue',
-			keepAlive: 1
-		},
-		{
-			id: '1301',
-			parentId: '13',
-			name: '密码设置',
-			type: 1,
-			icon: 'iconkehuguanli',
-			orderNum: 12,
-			router: '/setting/set-password',
-			viewPath: 'views/setting/set-password.vue',
-			keepAlive: 1
-		},
+        {id: '1001',parentId: 10,name: '门店列表',type: 1,icon: 'iconguanggao',orderNum: 10,router: '/shop/list',viewPath: 'views/shop/list.vue',keepAlive: 1},
+		{id: '11',parentId: null,name: '赚钱',type: 1,icon: 'iconyaoqingyouli',orderNum: 11,router: '/pages/admin/my-invite',viewPath: 'views/my-invite/index.vue',keepAlive: 1},
+        {id: '1101',parentId: 11,name: '邀请开店',type: 1,icon: 'iconyaoqingyouli',orderNum: 11,router: '/pages/admin/my-invite',viewPath: 'views/my-invite/index.vue',keepAlive: 1},
+		{id: '12',parentId: null,name: '收支',type: 0,icon: 'icondingdanguanli',orderNum: 12,router: '/assets/list',viewPath: 'views/assets/list.vue',keepAlive: 1},
+		{id: '1201',parentId: '12',name: '收入明细',type: 1,icon: 'icondingdanguanli',orderNum: 12,router: '/assets/list',viewPath: 'views/assets/list.vue',keepAlive: 1},
+		{id: '1202',parentId: '12',name: '支出明细',type: 1,icon: 'icondingdanguanli',orderNum: 12,router: '/assets/expendList',viewPath: 'views/assets/expendList.vue',keepAlive: 1},
+		{id: '13',parentId: null,name: '设置',type: 0,icon: 'iconshezhi',orderNum: 12,router: '/goods/list',viewPath: 'views/goods/goods-list.vue',keepAlive: 1},
+		{id: '1301',parentId: '13',name: '密码设置',type: 1,icon: 'iconkehuguanli',orderNum: 12,router: '/setting/set-password',viewPath: 'views/setting/set-password.vue',keepAlive: 1},
 		// ========================================================
-		{
-			id: '13',
-			parentId: '8',
-			name: '新增',
-			type: 2,
-			icon: null,
-			orderNum: 1,
-			router: null,
-			viewPath: null,
-			keepAlive: 0
-		},
-		{
-			id: '17',
-			parentId: '27',
-			name: '用户列表',
-			type: 1,
-			icon: 'icon-user',
-			orderNum: 1,
-			router: '/sys/user',
-			viewPath: 'views/system/user/index.vue',
-			keepAlive: 1
-		},
-		{
-			id: '18',
-			parentId: '17',
-			name: '新增',
-			type: 2,
-			icon: null,
-			orderNum: 1,
-			router: null,
-			viewPath: null,
-			keepAlive: 0
-		},
-		{
-			id: '23',
-			parentId: '22',
-			name: '新增',
-			type: 2,
-			icon: null,
-			orderNum: 1,
-			router: null,
-			viewPath: null,
-			keepAlive: 0
-		},
-		{
-			id: '29',
-			parentId: '28',
-			name: '日志列表',
-			type: 1,
-			icon: 'icon-log',
-			orderNum: 1,
-			router: '/sys/log',
-			viewPath: 'views/system/log/index.vue',
-			keepAlive: 0
-		},
-		{
-			id: '30',
-			parentId: '29',
-			name: '权限',
-			type: 2,
-			icon: null,
-			orderNum: 1,
-			router: null,
-			viewPath: null,
-			keepAlive: 0
-		},
+		{id: '13',parentId: '8',name: '新增',type: 2,icon: null,orderNum: 1,router: null,viewPath: null,keepAlive: 0},
+		{id: '17',parentId: '27',name: '用户列表',type: 1,icon: 'icon-user',orderNum: 1,router: '/sys/user',viewPath: 'views/system/user/index.vue',keepAlive: 1},
+		{id: '18',parentId: '17',name: '新增',type: 2,icon: null,orderNum: 1,router: null,viewPath: null,keepAlive: 0},
+		{id: '23',parentId: '22',name: '新增',type: 2,icon: null,orderNum: 1,router: null,viewPath: null,keepAlive: 0},
+		{id: '29',parentId: '28',name: '日志列表',type: 1,icon: 'icon-log',orderNum: 1,router: '/sys/log',viewPath: 'views/system/log/index.vue',keepAlive: 0},
+		{id: '30',parentId: '29',name: '权限',type: 2,icon: null,orderNum: 1,router: null,viewPath: null,keepAlive: 0},
 		{
 			id: '43',
 			parentId: '45',
@@ -538,28 +259,8 @@ let menu = {
 			viewPath: null,
 			keepAlive: 0
 		},
-		{
-			id: '21',
-			parentId: '17',
-			name: '查询',
-			type: 2,
-			icon: null,
-			orderNum: 4,
-			router: null,
-			viewPath: null,
-			keepAlive: 0
-		},
-		{
-			id: '26',
-			parentId: '22',
-			name: '查询',
-			type: 2,
-			icon: null,
-			orderNum: 4,
-			router: null,
-			viewPath: null,
-			keepAlive: 0
-		}
+		{id: '21',parentId: '17',name: '查询',type: 2,icon: null,orderNum: 4,router: null,viewPath: null,keepAlive: 0},
+		{id: '26',parentId: '22',name: '查询',type: 2,icon: null,orderNum: 4,router: null,viewPath: null,keepAlive: 0}
 	]
 };
 

+ 1 - 1
ghs/src/service/merchant-capital/index.js

@@ -1,6 +1,6 @@
 import { BaseService, Service } from '@/cool';
 
-@Service('merchant-capital')
+@Service('shop-capital')
 export class MerchantCapitalService extends BaseService {
 
 }

+ 106 - 0
ghs/src/views/assets/expendList.vue

@@ -0,0 +1,106 @@
+<template>
+	<div class="app-list-content">
+		<x-crud class="liu-crud-wrap" @load="onLoad">
+			<template #table-column-addTime="{scope}">
+				<span>{{ scope.row.addTime | formatTime('MM-DD HH:mm') }}</span>
+			</template>
+			<template #table-column-amount="{scope}">
+				<span v-if="scope.row.io == 1">+</span>
+				<span v-else>-</span>
+					{{ scope.row.amount}}
+			</template>
+
+			<template #table-column-payWay="{scope}">
+				<span v-if="scope.row.payWay == 0">微信支付</span>
+				<span v-else-if="scope.row.payWay == 1">支付宝</span>
+				<span v-else-if="scope.row.payWay == 2">余额</span>
+				<span v-else>-</span>
+			</template>
+
+			<template #table-column-fromType="{scope}">
+				<span v-if="scope.row.fromType == 0">门店</span>
+				<span v-else-if="scope.row.fromType == 1">商城</span>
+				<span v-else-if="scope.row.fromType == 2">朋友圈</span>
+				<span v-else>-</span>
+			</template>
+
+		</x-crud>
+	</div>
+</template>
+
+<script>
+import merchantCapital from '@/service/merchant-capital/index';
+export default {
+	name: 'assets-list',
+	methods: {
+		// x-crud 组件ad
+		onLoad({ ctx, app }) {
+			this.app = app;
+			ctx.service(merchantCapital)
+				.set('table', {
+					columns: [
+						{
+							prop: 'userName',
+							label: '姓名',
+							align: 'center'
+						},
+						{
+							prop: 'amount',
+							label: '支出',
+							align: 'center'
+						},
+						{
+							prop: 'addTime',
+							label: '时间',
+							align: 'center'
+						},
+						{
+							prop: 'payWay',
+							label: '支付方式',
+							align: 'center'
+						},
+						{
+							prop: 'fromType',
+							label: '来源',
+							align: 'center'
+						},
+						{
+							prop: 'totalExpend',
+							label: '累计支出',
+							align: 'center'
+						},
+						{
+							prop: 'id',
+							label: '编号',
+							align: 'center',
+							'min-width': 100
+						}
+					],
+					// 操作列
+					op: {
+						visible: false, // 是否显示
+						// 同 element-ui Table-column Attributes
+						props: {
+							width: 100,
+							align: 'center',
+							fixed: 'right',
+							label: '操作'
+						},
+						// 布局,请移步 `layout`
+						layout: []
+					}
+				})
+				.set('layout', [
+					['slot-tabs'],
+					['flex1', 'slot-add-ad-btn', 'refresh-btn'],
+					['data-table'],
+					['flex1', 'pagination']
+				])
+				.done();
+			app.refresh({ io: '0' });
+		}
+	}
+};
+</script>
+
+<style lang="stylus" scoped></style>

+ 2 - 2
ghs/src/views/assets/list.vue

@@ -46,7 +46,7 @@ export default {
 						},
 						{
 							prop: 'amount',
-							label: '收',
+							label: '收',
 							align: 'center'
 						},
 						{
@@ -97,7 +97,7 @@ export default {
 					['flex1', 'pagination']
 				])
 				.done();
-			app.refresh({ type: this.tabIndex });
+			app.refresh({ io: '1' });
 		}
 	}
 };

+ 10 - 0
hd/src/mock/userInfo.js

@@ -488,6 +488,16 @@ let menu = {
 			router: '/assets/list',
 			viewPath: 'views/assets/list.vue',
 			keepAlive: 1
+		},{
+			id: '1201',
+			parentId: '12',
+			name: '支出明细',
+			type: 1,
+			icon: 'icondingdanguanli',
+			orderNum: 12,
+			router: '/assets/expendList',
+			viewPath: 'views/assets/expendList.vue',
+			keepAlive: 1
 		},
 		{
 			id: '13',

+ 1 - 1
hd/src/service/merchant-capital/index.js

@@ -1,6 +1,6 @@
 import { BaseService, Service } from '@/cool';
 
-@Service('merchant-capital')
+@Service('shop-capital')
 export class MerchantCapitalService extends BaseService {
 
 }

+ 106 - 0
hd/src/views/assets/expendList.vue

@@ -0,0 +1,106 @@
+<template>
+	<div class="app-list-content">
+		<x-crud class="liu-crud-wrap" @load="onLoad">
+			<template #table-column-addTime="{scope}">
+				<span>{{ scope.row.addTime | formatTime('MM-DD HH:mm') }}</span>
+			</template>
+			<template #table-column-amount="{scope}">
+				<span v-if="scope.row.io == 1">+</span>
+				<span v-else>-</span>
+					{{ scope.row.amount}}
+			</template>
+
+			<template #table-column-payWay="{scope}">
+				<span v-if="scope.row.payWay == 0">微信支付</span>
+				<span v-else-if="scope.row.payWay == 1">支付宝</span>
+				<span v-else-if="scope.row.payWay == 2">余额</span>
+				<span v-else>-</span>
+			</template>
+
+			<template #table-column-fromType="{scope}">
+				<span v-if="scope.row.fromType == 0">门店</span>
+				<span v-else-if="scope.row.fromType == 1">商城</span>
+				<span v-else-if="scope.row.fromType == 2">朋友圈</span>
+				<span v-else>-</span>
+			</template>
+
+		</x-crud>
+	</div>
+</template>
+
+<script>
+import merchantCapital from '@/service/merchant-capital/index';
+export default {
+	name: 'assets-list',
+	methods: {
+		// x-crud 组件ad
+		onLoad({ ctx, app }) {
+			this.app = app;
+			ctx.service(merchantCapital)
+				.set('table', {
+					columns: [
+						{
+							prop: 'userName',
+							label: '姓名',
+							align: 'center'
+						},
+						{
+							prop: 'amount',
+							label: '支出',
+							align: 'center'
+						},
+						{
+							prop: 'addTime',
+							label: '时间',
+							align: 'center'
+						},
+						{
+							prop: 'payWay',
+							label: '支付方式',
+							align: 'center'
+						},
+						{
+							prop: 'fromType',
+							label: '来源',
+							align: 'center'
+						},
+						{
+							prop: 'totalExpend',
+							label: '累计支出',
+							align: 'center'
+						},
+						{
+							prop: 'id',
+							label: '编号',
+							align: 'center',
+							'min-width': 100
+						}
+					],
+					// 操作列
+					op: {
+						visible: false, // 是否显示
+						// 同 element-ui Table-column Attributes
+						props: {
+							width: 100,
+							align: 'center',
+							fixed: 'right',
+							label: '操作'
+						},
+						// 布局,请移步 `layout`
+						layout: []
+					}
+				})
+				.set('layout', [
+					['slot-tabs'],
+					['flex1', 'slot-add-ad-btn', 'refresh-btn'],
+					['data-table'],
+					['flex1', 'pagination']
+				])
+				.done();
+			app.refresh({ io: '0' });
+		}
+	}
+};
+</script>
+
+<style lang="stylus" scoped></style>

+ 2 - 2
hd/src/views/assets/list.vue

@@ -46,7 +46,7 @@ export default {
 						},
 						{
 							prop: 'amount',
-							label: '收',
+							label: '收',
 							align: 'center'
 						},
 						{
@@ -97,7 +97,7 @@ export default {
 					['flex1', 'pagination']
 				])
 				.done();
-			app.refresh({ type: this.tabIndex });
+			app.refresh({ io: '1' });
 		}
 	}
 };