Просмотр исходного кода

Merge branch 'master' of http://git.huaml.com/zhh/front-end

wangning 5 лет назад
Родитель
Сommit
eeb26de6e7

+ 1 - 1
ghsApp/src/admin/ghs/shop.vue

@@ -6,7 +6,7 @@
 						<image :src="item.avatar"></image>
 					<view class="list-msg">
 							<view>{{item.name}}</view>
-							<text>累积消费 {{item.expendAmount}}</text>
+							<text>累计采购 {{item.expendAmount}}</text>
 					</view>
 				</view>
 			</view>

+ 38 - 97
pt/src/Home.vue

@@ -1,103 +1,33 @@
 <template>
 	<div class="home">
-		<!-- <div class="tips">
-			<span>就像你看到的一样?查看我们的高级版本了解更多信息。</span>
-			<span class="flex1"></span>
-			<el-button size="mini" type="success" round class="doc-btn" @click="toDocs"
-				>查看文档</el-button
-			>
-			<i class="el-icon-close"></i>
-		</div> -->
-
-		<el-row :gutter="20" class="card-statistics">
-			<el-col :md="12" :xl="6">
-				<div class="card block">
-					<div class="val">
-						<div class="left">
-							<i class="el-icon-s-goods"></i>
-						</div>
-
-						<div class="right">
-							<p>总收入</p>
-							<p>¥15,650</p>
-						</div>
-					</div>
-
-					<div class="desc">
-						<i class="el-icon-warning"></i>
-						<span>25% lower growth</span>
-					</div>
-				</div>
-			</el-col>
-
-			<el-col :md="12" :xl="6">
-				<div class="card block">
-					<div class="val">
-						<div class="left">
-							<i class="el-icon-s-flag"></i>
-						</div>
-
-						<div class="right">
-							<p>订单</p>
-							<p>1822</p>
-						</div>
-					</div>
-
-					<div class="desc">
-						<i class="el-icon-warning"></i>
-						<span>Product-wise sales</span>
-					</div>
-				</div>
-			</el-col>
-
-			<el-col :md="12" :xl="6">
-				<div class="card block">
-					<div class="val">
-						<div class="left">
-							<i class="el-icon-s-marketing"></i>
-						</div>
-
-						<div class="right">
-							<p>销售</p>
-							<p>312</p>
-						</div>
-					</div>
 
-					<div class="desc">
-						<i class="el-icon-warning"></i>
-						<span>Weekly Sales</span>
-					</div>
-				</div>
-			</el-col>
-
-			<el-col :md="12" :xl="6">
-				<div class="card block">
-					<div class="val">
-						<div class="left">
-							<i class="el-icon-s-custom"></i>
-						</div>
-
-						<div class="right">
-							<p>用户</p>
-							<p>2246</p>
+		<el-row :gutter="20" class="card-statistics" >
+			<div v-for='(res,i) in statisticsList' :key='i' @click='toPageFun(res)'>
+				<el-col :md="12" :xl="6" >
+					<div class="card block">
+						<div class="val">
+							<div class="left">
+								<i v-if='res.id==1' class="el-icon-s-goods"></i>
+								<i v-if='res.id==2' class="el-icon-s-flag"></i>
+								<i v-if='res.id==3' class="el-icon-s-marketing"></i>
+								<i v-if='res.id==4' class="el-icon-s-custom"></i>
+							</div>
+							<div class="right">
+								<p>{{res.name}}</p>
+								<p>¥{{res.amount}}</p>
+							</div>
 						</div>
 					</div>
-
-					<div class="desc">
-						<i class="el-icon-warning"></i>
-						<span>Product-wise sales</span>
-					</div>
-				</div>
-			</el-col>
+				</el-col>
+			</div>
 		</el-row>
+		<!--<div class="card card-visitor">-->
+			<!--<p class="card-title">用户访客</p>-->
 
-		<div class="card card-visitor">
-			<p class="card-title">用户访客</p>
-
-			<div class="card-body">
-				<echart1></echart1>
-			</div>
-		</div>
+			<!--<div class="card-body">-->
+				<!--<echart1></echart1>-->
+			<!--</div>-->
+		<!--</div>-->
 
 		<!-- <div class="card card-plan">
 			<p class="card-title">计划</p>
@@ -139,6 +69,7 @@ export default {
 
 	data() {
 		return {
+			statisticsList:null,
 			crud: {
 				service: this.$service.test,
 				table: {
@@ -183,12 +114,22 @@ export default {
 						'max-height': '500px'
 					}
 				},
-				layout: [['data-table']]
+
 			}
 		};
 	},
-
+	mounted(){
+		this.init();
+	},
 	methods: {
+		init(){
+			this.$service.ptAsset.ptAssetApi().then((res)=>{
+				this.statisticsList = res.top;
+			})
+		},
+		toPageFun(item){
+			this.$router.push({ path: '/assets/ptYeChange', query: { type: item.id }})
+		},
 		toDocs() {
 			window.open('https://docs.x-admin.com/#/');
 		},
@@ -292,14 +233,14 @@ export default {
 	.card-statistics {
 		.block {
 			background-color: #fff;
-			height: 100px;
+			/*height: 60px;*/
 			padding: 20px;
 
 			.val {
 				display: flex;
 				justify-content: space-between;
 				align-items: center;
-
+				height: 50px;
 				.left {
 					i {
 						font-size: 34px;

+ 7 - 1
pt/src/cool/request/index.js

@@ -33,7 +33,10 @@ import item from '@/service/item/index';
 import unit from '@/service/unit/index';
 import merchant from '@/service/merchant/index';
 import shopAdmin from '@/service/shop-admin/index';
+import shopCapital from '@/service/shop-capital/index';
 import cash from '@/service/deposit/index';
+import ptYeChange from '@/service/assets/ptYeChange/index';
+import ptAsset from '@/service/ptAsset/index';
 
 export function SET_SERVICE({ store }) {
 	// const files = require.context('@/service/', true, /\.js$/);
@@ -73,7 +76,10 @@ export function SET_SERVICE({ store }) {
 		unit,
     merchant,
     shopAdmin,
-    cash
+	shopCapital,
+    cash,
+	ptYeChange,
+	ptAsset
 	};
 
 	Vue.prototype.$service = modules;

+ 23 - 209
pt/src/mock/userInfo.js

@@ -160,215 +160,29 @@ let menu = {
 	],
 	menus: [
 		// 商家管理
-		{
-			id: '1',
-			parentId: null,
-			name: '商家',
-			type: 0,
-			icon: 'icongongzuotai',
-			orderNum: 1,
-			router: '',
-			viewPath: '',
-			keepAlive: 1
-		},
-		{
-			id: '11',
-			parentId: '1',
-			name: '申请记录',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 1,
-			router: '/',
-			viewPath: 'saas/shop/apply',
-			keepAlive: 1
-		},
-		{
-			id: '13',
-			parentId: '1',
-			name: '门店管理',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 1,
-			router: '/saas/shop/shop',
-			viewPath: 'saas/shop/shop',
-			keepAlive: 1
-		},
-		{
-			id: '12',
-			parentId: '1',
-			name: '商家列表',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 1,
-			router: '/saas/shop/list',
-			viewPath: 'saas/shop/list',
-			keepAlive: 1
-		},
-		{
-			id: '14',
-			parentId: '1',
-			name: '员工管理',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 1,
-			router: '/saas/shop/manage',
-			viewPath: 'saas/shop/manage',
-			keepAlive: 1
-		},
-		{
-			id: '15',
-			parentId: '1',
-			name: '小程序',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 1,
-			router: '/saas/shop/upgrade',
-			viewPath: 'saas/shop/upgrade',
-			keepAlive: 1
-		},
-		{
-			id: '16',
-			parentId: '1',
-			name: '付费订单',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 1,
-			router: '/saas/shop/buy',
-			viewPath: 'saas/shop/buy',
-			keepAlive: 1
-    },
-    {
-			id: '17',
-			parentId: '1',
-			name: '提现申请',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 1,
-			router: '/saas/shop/deposit',
-			viewPath: 'saas/shop/deposit',
-			keepAlive: 1
-		},
-		{
-			id: '2',
-			parentId: null,
-			name: '订单',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 2,
-			router: '/saas/order/list',
-			viewPath: 'saas/order/list',
-			keepAlive: 1
-		},
-		{
-			id: '3',
-			parentId: null,
-			name: '客户',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 3,
-			router: '/saas/member/list',
-			viewPath: 'saas/member/list',
-			keepAlive: 1
-		},
-		{
-			id: '4',
-			parentId: null,
-			name: '店长',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 4,
-			router: '/saas/pt-member/list',
-			viewPath: 'saas/pt-member/list',
-			keepAlive: 1
-		},
-		{
-			id: '5',
-			parentId: null,
-			name: '商品',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 5,
-			router: '/saas/goods/list',
-			viewPath: 'saas/goods/list',
-			keepAlive: 1
-		},
-		{
-			id: '6',
-			parentId: null,
-			name: '节日',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 6,
-			router: '/saas/fest/list',
-			viewPath: 'saas/fest/list',
-			keepAlive: 1
-		},
-		{
-			id: '8',
-			parentId: null,
-			name: '花材',
-			type: 0,
-			icon: 'icongongzuotai',
-			orderNum: 4,
-			router: '/item/list',
-			viewPath: 'views/item/list.vue',
-			keepAlive: 1
-		},
-		{
-			id: '810',
-			parentId: '8',
-			name: '花材列表',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 4,
-			router: '/item/list',
-			viewPath: 'views/item/list.vue',
-			keepAlive: 1
-		},
-		{
-			id: '805',
-			parentId: '8',
-			name: '花材分类',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 4,
-			router: '/item-class/list',
-			viewPath: 'views/item-class/list.vue',
-			keepAlive: 1
-		},
-		{
-			id: '7',
-			parentId: null,
-			name: '套餐',
-			type: 0,
-			icon: 'icongongzuotai',
-			orderNum: 7,
-			router: '/saas/manage/list',
-			viewPath: 'saas/manage/list',
-			keepAlive: 1
-		},
-		{
-			id: '701',
-			parentId: '7',
-			name: '套餐列表',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 7,
-			router: '/saas/manage/package',
-			viewPath: 'saas/manage/package',
-			keepAlive: 1
-		},
-		{
-			id: '701',
-			parentId: '7',
-			name: '权限',
-			type: 1,
-			icon: 'icongongzuotai',
-			orderNum: 7,
-			router: '/saas/manage/auth',
-			viewPath: 'saas/manage/auth',
-			keepAlive: 1
-		}
+		{id: '9',parentId: null,name: '控制台',type: 0,icon: 'icongongzuotai',orderNum: 1,router: '',viewPath: '',keepAlive: 1},
+		{id: '91',parentId: '9',name: '今日概况',type: 1,icon: 'icongongzuotai',orderNum: 1,router: '/',viewPath: 'Home',keepAlive: 1},
+		{id: '1',parentId: null,name: '商家',type: 0,icon: 'icongongzuotai',orderNum: 1,router: '',viewPath: '',keepAlive: 1},
+		{id: '11',parentId: '1',name: '申请记录',type: 1,icon: 'icongongzuotai',orderNum: 1,router: '/saas/shop/apply',viewPath: 'saas/shop/apply',keepAlive: 1},
+		{id: '13',parentId: '1',name: '门店管理',type: 1,icon: 'icongongzuotai',orderNum: 1,router: '/saas/shop/shop',viewPath: 'saas/shop/shop',keepAlive: 1},
+		{id: '12',parentId: '1',name: '商家列表',type: 1,icon: 'icongongzuotai',orderNum: 1,router: '/saas/shop/list',viewPath: 'saas/shop/list',keepAlive: 1},
+		{id: '14',parentId: '1',name: '员工管理',type: 1,icon: 'icongongzuotai',orderNum: 1,router: '/saas/shop/manage',viewPath: 'saas/shop/manage',keepAlive: 1},
+		{id: '15',parentId: '1',name: '小程序',type: 1,icon: 'icongongzuotai',orderNum: 1,router: '/saas/shop/upgrade',viewPath: 'saas/shop/upgrade',keepAlive: 1},
+		{id: '16',parentId: '1',name: '付费订单',type: 1,icon: 'icongongzuotai',orderNum: 1,router: '/saas/shop/buy',viewPath: 'saas/shop/buy',keepAlive: 1},
+        {id: '17',parentId: '1',name: '提现申请',type: 1,icon: 'icongongzuotai',orderNum: 1,router: '/saas/shop/deposit',viewPath: 'saas/shop/deposit',keepAlive: 1},
+		{id: '10',parentId: null,name: '资产',type: 0,icon: 'icongongzuotai',orderNum: 1,router: '',viewPath: '',keepAlive: 1},
+		{id: '101',parentId: '10',name: '余额明细',type: 1,icon: 'icongongzuotai',orderNum: 1,router: '/assets/ptYeChange',viewPath: 'views/assets/ptYeChange',keepAlive: 1},
+		{id: '2',parentId: null,name: '订单',type: 1,icon: 'icongongzuotai',orderNum: 2,router: '/saas/order/list',viewPath: 'saas/order/list',keepAlive: 1},
+		{id: '3',parentId: null,name: '客户',type: 1,icon: 'icongongzuotai',orderNum: 3,router: '/saas/member/list',viewPath: 'saas/member/list',keepAlive: 1},
+		{id: '4',parentId: null,name: '店长',type: 1,icon: 'icongongzuotai',orderNum: 4,router: '/saas/pt-member/list',viewPath: 'saas/pt-member/list',keepAlive: 1},
+		{id: '5',parentId: null,name: '商品',type: 1,icon: 'icongongzuotai',orderNum: 5,router: '/saas/goods/list',viewPath: 'saas/goods/list',keepAlive: 1},
+		{id: '6',parentId: null,name: '节日',type: 1,icon: 'icongongzuotai',orderNum: 6,router: '/saas/fest/list',viewPath: 'saas/fest/list',keepAlive: 1},
+		{id: '8',parentId: null,name: '花材',type: 0,icon: 'icongongzuotai',orderNum: 4,router: '/item/list',viewPath: 'views/item/list.vue',keepAlive: 1},
+		{id: '810',parentId: '8',name: '花材列表',type: 1,icon: 'icongongzuotai',orderNum: 4,router: '/item/list',viewPath: 'views/item/list.vue',keepAlive: 1},
+		{id: '805',parentId: '8',name: '花材分类',type: 1,icon: 'icongongzuotai',orderNum: 4,router: '/item-class/list',viewPath: 'views/item-class/list.vue',keepAlive: 1},
+		{id: '7',parentId: null,name: '套餐',type: 0,icon: 'icongongzuotai',orderNum: 7,router: '/saas/manage/list',viewPath: 'saas/manage/list',keepAlive: 1},
+		{id: '701',parentId: '7',name: '套餐列表',type: 1,icon: 'icongongzuotai',orderNum: 7,router: '/saas/manage/package',viewPath: 'saas/manage/package',keepAlive: 1},
+		{id: '701',parentId: '7',name: '权限',type: 1,icon: 'icongongzuotai',orderNum: 7,router: '/saas/manage/auth',viewPath: 'saas/manage/auth',keepAlive: 1}
 	]
 };
 

+ 136 - 0
pt/src/saas/shop/components/amount-detail.vue

@@ -0,0 +1,136 @@
+<template>
+	<div class="order-detail">
+		<!-- 抽屉 -->
+		<el-drawer :visible.sync="showBalanceDetail" size="1200px" :before-close="closeFn" custom-class="order-draw-wrap">
+			<x-crud class="liu-crud-wrap" @load="onLoad">
+				<template #table-column-amount="{scope}">
+					<div class="flex-center-center">
+						<div class="">{{ scope.row.io==1?'+':'-' }} {{ scope.row.amount }}</div>
+					</div>
+				</template>
+			</x-crud>
+		</el-drawer>
+	</div>
+</template>
+
+<script>
+export default {
+	name: 'order-detail',
+	props: {
+		show: {
+			type: Boolean,
+			default: false
+		},
+		orderOperate: {
+			type: Object,
+			default: () => {}
+		}
+	},
+	data() {
+		return {
+			app: null,
+			showBalanceDetail: false,
+			data: [],
+			tabIndex: '-1',
+			tabsData: [
+				{
+					text: '全部',
+					key: '-1',
+					val: 0
+				},
+				{
+					text: '可提现余额',
+					key: '0',
+					val: 0
+				},
+			]
+		};
+	},
+	methods: {
+		init() {
+			this.showBalanceDetail = true;
+		},
+		closeFn() {
+			this.$emit('closeFn')
+			this.showBalanceDetail = false;
+		},
+		onLoad({ ctx, app }) {
+			this.app = app;
+			// console.log(this.orderOperate,'orderOperate')
+			ctx.service(this.$service.shopCapital)
+				.set('table', {
+					columns: [
+						{
+							prop: 'id',
+							label: 'ID',
+							align: 'center'
+						},
+						{
+							prop: 'event',
+							label: '事项',
+							align: 'center',
+							'min-width': '120px'
+						},
+						{
+							prop: 'amount',
+							label: '金额',
+							align: 'center',
+							emptyText: '无'
+						},{
+							prop: 'shopId',
+							label: '来源',
+							align: 'center',
+							emptyText: '无'
+						},{
+							prop: 'payWay',
+							label: '支付方式',
+							align: 'center',
+							emptyText: '无'
+						},
+						{
+							prop: this.orderOperate.io==1?'totalIncome':'totalExpend',
+							label: this.orderOperate.io==1?'累计收入':'累计支出',
+							align: 'center',
+							emptyText: '无'
+						},
+						{
+							prop: 'addTime',
+							label: '时间',
+							align: 'center',
+							emptyText: '无'
+						}
+					],
+					// 操作列
+					op: {
+						visible: true, // 是否显示
+						// 同 element-ui Table-column Attributes
+						props: {
+							width: 150,
+							align: 'center',
+							fixed: 'right',
+							label: '操作'
+						},
+						// 布局,请移步 `layout`
+						layout: []
+					}
+				})
+				.set('layout', [
+					['slot-tabs'],
+					['flex1', 'refresh-btn'],
+					['data-table'],
+					['flex1', 'pagination']
+				])
+				.on('refresh', async (params, { next }) => {
+					// 继续执行刷新
+					let { asset } = await next(params);
+					if (this.$util.isEmpty(asset)) return false;
+					console.log(asset,)
+				})
+				.done();
+			app.refresh({ shopId:this.orderOperate.id,io: this.orderOperate.io });
+
+		}
+	}
+};
+</script>
+

+ 157 - 0
pt/src/saas/shop/components/balance-detail.vue

@@ -0,0 +1,157 @@
+<template>
+	<div class="order-detail">
+		<!-- 抽屉 -->
+		<el-drawer :visible.sync="showBalanceDetail" size="1200px" :before-close="closeFn" custom-class="order-draw-wrap">
+			<x-crud class="liu-crud-wrap" @load="onLoad">
+				<template #slot-tabs="{ scope }">
+					<el-tabs class="liu-tabs" type="border-card" v-model="tabIndex" @tab-click="handleClick">
+						<el-tab-pane v-for="(item, index) in tabsData" :key="index" :label="item.text" :name="item.key"></el-tab-pane>
+					</el-tabs>
+				</template>
+				<template #table-column-amount="{scope}">
+					<div class="flex-center-center">
+						<div class="">{{ scope.row.io==1?'+':'-' }} {{ scope.row.amount }}</div>
+					</div>
+				</template>
+			</x-crud>
+		</el-drawer>
+	</div>
+</template>
+
+<script>
+export default {
+	name: 'order-detail',
+	props: {
+		show: {
+			type: Boolean,
+			default: false
+		},
+		orderOperate: {
+			type: Object,
+			default: () => {}
+		}
+	},
+	data() {
+		return {
+			app: null,
+			showBalanceDetail: false,
+			data: [],
+			tabIndex: '-1',
+			tabsData: [
+				{
+					text: '全部',
+					key: '-1',
+					val: 0
+				},
+				{
+					text: '可提现余额',
+					key: '0',
+					val: 0
+				},
+			]
+		};
+	},
+	methods: {
+		init() {
+			this.showBalanceDetail = true;
+		},
+		closeFn() {
+			this.$emit('closeFn')
+			this.showBalanceDetail = false;
+		},
+		handleClick() {
+			// ptStyle 1 零售 2供货商
+			// tx 0全部 2 可提现
+			switch (this.tabIndex) {
+				case '-1':
+					this.app.refresh({ shopId:this.orderOperate.id,ptStyle: this.orderOperate.ptStyle,tx:0 });
+					break
+				case '0':
+					this.app.refresh({ shopId:this.orderOperate.id,ptStyle: this.orderOperate.ptStyle,tx:2 });
+					break
+			}
+		},
+		onLoad({ ctx, app }) {
+			this.app = app;
+			// console.log(this.orderOperate,'orderOperate')
+			ctx.service(this.$service.ptYeChange)
+				.set('table', {
+					columns: [
+						{
+							prop: 'id',
+							label: 'ID',
+							align: 'center'
+						},
+						{
+							prop: 'event',
+							label: '事项',
+							align: 'center',
+							'min-width': '120px'
+						},
+						{
+							prop: 'amount',
+							label: '金额',
+							align: 'center',
+							emptyText: '无'
+						},
+						{
+							prop: 'capitalType',
+							label: '流水类型',
+							align: 'center',
+							emptyText: '无'
+						},
+						{
+							prop: 'balance',
+							label: '当前余额',
+							align: 'center',
+							emptyText: '无'
+						},
+						{
+							prop: 'txBalance',
+							label: '当前可提现余额',
+							align: 'center',
+							emptyText: '无'
+						},
+						{
+							prop: 'addTime',
+							label: '时间',
+							align: 'center',
+							emptyText: '无'
+						}
+					],
+					// 操作列
+					op: {
+						visible: true, // 是否显示
+						// 同 element-ui Table-column Attributes
+						props: {
+							width: 150,
+							align: 'center',
+							fixed: 'right',
+							label: '操作'
+						},
+						// 布局,请移步 `layout`
+						layout: []
+					}
+				})
+				.set('layout', [
+					['slot-tabs'],
+					['flex1', 'refresh-btn'],
+					['data-table'],
+					['flex1', 'pagination']
+				])
+				.on('refresh', async (params, { next }) => {
+					// 继续执行刷新
+					let { asset } = await next(params);
+					if (this.$util.isEmpty(asset)) return false;
+					console.log(asset,)
+				})
+				.done();
+			// ptStyle 1 零售 2供货商
+			// tx 0全部 2 可提现
+			app.refresh({ shopId:this.orderOperate.id,ptStyle: this.orderOperate.ptStyle,tx:0 });
+
+		}
+	}
+};
+</script>
+

+ 38 - 2
pt/src/saas/shop/shop.vue

@@ -1,20 +1,41 @@
 <template>
     <div class="app-list-content">
         <x-crud class="liu-crud-wrap" @load="onLoad">
+            <!-- 余额 -->
+            <template #table-column-balance="{scope}">
+                <el-link :underline="true" @click="detailShowFn(scope.row)" style="font-size:12px;display:inline-block;">{{ scope.row.balance }}</el-link>
+            </template>
+            <!-- 收入 -->
+            <template #table-column-totalIncome="{scope}">
+                <el-link :underline="true" @click="AmountShowFn(scope.row,'1')" style="font-size:12px;display:inline-block;">{{ scope.row.totalIncome }}</el-link>
+            </template>
+            <!-- 支出 -->
+            <template #table-column-totalExpend="{scope}">
+                <el-link :underline="true" @click="AmountShowFn(scope.row,'0')" style="font-size:12px;display:inline-block;">{{ scope.row.totalExpend }}</el-link>
+            </template>
             <!-- 收款码 -->
             <template #table-column-gatheringCode="{scope}">
                 <el-button type="text" @click="gotoPage(1,scope.row)">查看</el-button>
             </template>
         </x-crud>
+        <!-- 用户详情 -->
+        <balance-detail v-if='showBalanceDetail' @closeFn='showBalanceDetail = false' ref="balanceDetail" :orderOperate="optionData" />
+        <amount-detail v-if='showAmountDetail' @closeFn='showAmountDetail = false' ref="amountDetail" :orderOperate="optionData" />
     </div>
 </template>
 
 <script>
     import { getFirstHost } from '@/cool/utils';
+    import balanceDetail from './components/balance-detail';
+    import amountDetail from './components/amount-detail';
     export default {
+        components:{balanceDetail,amountDetail},
         data() {
             return {
-                app: null
+                app: null,
+                showBalanceDetail: false,
+                showAmountDetail: false,
+                optionData: {},
             };
         },
         mounted() {
@@ -130,7 +151,22 @@
                 app.refresh();
             },
 
-
+            detailShowFn(item){
+                this.optionData = item;
+                this.showBalanceDetail = true;
+                setTimeout(() => {
+                    this.$refs.balanceDetail.init();
+                });
+            },
+            AmountShowFn(item,type){
+                this.optionData = {...item,io: type}
+                console.log(this.optionData)
+                // this.optionData = item;
+                this.showAmountDetail = true;
+                setTimeout(() => {
+                    this.$refs.amountDetail.init();
+                });
+            },
             gotoPage(type,data) {
                 console.log(data)
                 let host = `http://api.pt.${getFirstHost()}`;

+ 6 - 0
pt/src/service/assets/ptYeChange/index.js

@@ -0,0 +1,6 @@
+import { BaseService, Service } from '@/cool';
+
+@Service('pt-ye-change')
+export class OrderService extends BaseService {}
+
+export default new OrderService();

+ 15 - 0
pt/src/service/ptAsset/index.js

@@ -0,0 +1,15 @@
+import { BaseService, Service } from '@/cool';
+
+export class ptAssetService extends BaseService {
+	/** *
+	 * 发货-填写收花人 b
+	 */
+	ptAssetApi(data) {
+		return this.request({
+			url: '/pt-asset/index',
+			params: data
+		});
+	}
+}
+
+export default new ptAssetService();

+ 7 - 0
pt/src/service/shop-capital/index.js

@@ -0,0 +1,7 @@
+import { BaseService, Service } from '@/cool';
+
+@Service('shop-capital')
+export class shopAdminService extends BaseService {
+
+}
+export default new shopAdminService();

+ 183 - 0
pt/src/views/assets/ptYeChange.vue

@@ -0,0 +1,183 @@
+<template>
+	<div class="app-list-content">
+		<x-crud class="liu-crud-wrap" @load="onLoad">
+			<template #slot-tabs="{ scope }">
+				<el-tabs class="liu-tabs" type="border-card" v-model="tabIndex" @tab-click="handleClick">
+					<el-tab-pane v-for="(item, index) in tabsData" :key="index" :label="item.text" :name="item.key"></el-tab-pane>
+				</el-tabs>
+			</template>
+
+			<!-- 订花人 -->
+			<template #table-column-amount="{scope}">
+				<div class="flex-center-center">
+					<div class="">{{ scope.row.io==1?'+':'-' }} {{ scope.row.amount }}</div>
+				</div>
+			</template>
+		</x-crud>
+	</div>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				// x-crud
+				app: null,
+				tabIndex: '-1',
+				tabsData: [
+					{
+						text: '零售',
+						key: '-1',
+						val: 0
+					},
+					{
+						text: '零售可提现余额',
+						key: '0',
+						val: 0
+					},
+					{
+						text: '供货商',
+						key: '1',
+						val: 0
+					},
+					{
+						text: '供货商可提现余额',
+						key: '2',
+						val: 0
+					},
+				]
+			};
+		},
+		mounted() {
+			let type = this.$route.query.type
+			switch (type) {
+				case '1':
+					this.tabIndex = '-1';
+					break
+				case '2':
+					this.tabIndex = '1';
+					break
+				case '3':
+					this.tabIndex = '0';
+					break
+				case '4':
+					this.tabIndex = '2';
+					break
+			}
+			this.handleClick();
+		},
+		methods: {
+			handleClick() {
+				// ptStyle 1 零售 2供货商
+				// tx 0全部 2 可提现
+				switch (this.tabIndex) {
+					case '-1':
+						this.app.refresh({ ptStyle: 1,tx:0 });
+						break
+					case '0':
+						this.app.refresh({ ptStyle: 1,tx:2 });
+						break
+					case '1':
+						this.app.refresh({ ptStyle: 2,tx:0 });
+						break
+					case '2':
+						this.app.refresh({ ptStyle: 2,tx:2 });
+						break
+				}
+			},
+			// crud
+			onLoad({ ctx, app }) {
+				this.app = app;
+				ctx.service(this.$service.ptYeChange)
+					.set('table', {
+						columns: [
+							{
+								prop: 'id',
+								label: 'ID',
+								align: 'center'
+							},
+							{
+								prop: 'sjName',
+								label: '商家',
+								align: 'center',
+								'min-width': '120px'
+							},
+							{
+								prop: 'shopName',
+								label: '门店',
+								align: 'center',
+								'min-width': '150px'
+							},
+							{
+								prop: 'event',
+								label: '事项',
+								align: 'center',
+								'min-width': '120px'
+							},
+							{
+								prop: 'amount',
+								label: '金额',
+								align: 'center',
+								emptyText: '无'
+							},
+							{
+								prop: 'capitalType',
+								label: '流水类型',
+								align: 'center',
+								emptyText: '无'
+							},
+							{
+								prop: 'balance',
+								label: '当前余额',
+								align: 'center',
+								emptyText: '无'
+							},
+							{
+								prop: 'txBalance',
+								label: '当前可提现余额',
+								align: 'center',
+								emptyText: '无'
+							},
+							{
+								prop: 'addTime',
+								label: '时间',
+								align: 'center',
+								emptyText: '无'
+							}
+						],
+						// 操作列
+						op: {
+							visible: true, // 是否显示
+							// 同 element-ui Table-column Attributes
+							props: {
+								width: 150,
+								align: 'center',
+								fixed: 'right',
+								label: '操作'
+							},
+							// 布局,请移步 `layout`
+							layout: []
+						}
+					})
+					.set('layout', [
+						['slot-tabs'],
+						['flex1', 'refresh-btn'],
+						['data-table'],
+						['flex1', 'pagination']
+					])
+					.on('refresh', async (params, { next }) => {
+						// 继续执行刷新
+						let { asset } = await next(params);
+						if (this.$util.isEmpty(asset)) return false;
+						this.tabsData[0].val = asset.totalOrder;
+						this.tabsData[1].val = asset.unPayOrder;
+						this.tabsData[2].val = asset.unSendOrder;
+						this.tabsData[3].val = asset.sendingOrder;
+						this.tabsData[4].val = asset.finishOrder;
+					})
+					.done();
+				app.refresh({ ptStyle: 1,tx:0 });
+			}
+		}
+	};
+</script>