lhl před 1 měsícem
rodič
revize
80ad606e02

+ 42 - 1
api/user.js

@@ -795,4 +795,45 @@ export function userEquityWithdrawal(data) {
  * */
 export function getrecordList(q) {
 	return request.get("share/recordList", q);
-}
+}
+
+//agentList
+export function agentList(q) {
+	return request.get("agent/lst", q);
+}
+
+//agent/create
+export function createAgent(q) {
+	return request.post("agent/create", q);
+}
+
+export function getTxList(q) {
+	return request.get("extract", q);
+}
+
+export function passTx(q) {
+	return request.put("extract/adopt/" + q);
+}
+
+///extract/refuse
+export function errTx(q,data) {
+	return request.put("extract/refuse/" + q,data);
+}
+
+// /product bonus/user bonus lst
+export function getQz(q) {
+	return request.get("product_bonus/user_bonus_lst",q);
+}
+
+export function getQzList(q) {
+	return request.get("product_bonus/bonus_num_lst",q);
+}
+
+export function getJcList(q) {
+	return request.get("product_bonus/record_lst",q);
+}
+
+//getDjList
+export function getDjList(q) {
+	return request.get("freeze/lst",q);
+}

+ 31 - 0
pages.json

@@ -506,6 +506,25 @@
 						}
 					}
 				},
+				{
+					"path": "user_cash/dj",
+					"style": {
+						"navigationBarTitleText": "冻结记录",
+						"navigationBarBackgroundColor": "#FFFFFF"
+							// #ifdef MP || APP-PLUS
+							,
+						"navigationBarTextStyle": "black"
+							// #endif
+							,
+						"app-plus": {
+							// #ifdef APP-PLUS
+							"titleNView": {
+								"type": "default"
+							}
+							// #endif
+						}
+					}
+				},
 				{
 					"path": "user_vip/index",
 					"style": {
@@ -1764,6 +1783,18 @@
 						"navigationBarTitleText": "交易管理"
 					}
 				},
+				{
+					"path": "extract/index",
+					"style": {
+						"navigationBarTitleText": "提现审核"
+					}
+				},
+				{
+					"path": "jc/index",
+					"style": {
+						"navigationBarTitleText": "权重变更"
+					}
+				},
 				{
 					"path": "orderDetail/index",
 					"style": {

+ 9 - 2
pages/goods/order_list/serve.vue

@@ -139,6 +139,7 @@
 					多少都是您的心意
 				</view>
 				<input type="number" v-model="dsPrice" placeholder="请输入任意表扬金额(1~5)"/>
+				<input type="text" v-model="dsMark" placeholder="请输入表扬内容"/>
 				<view class="btn-wrap">
 					<view class="btn" @click="closeDs">
 						取消
@@ -248,6 +249,7 @@
 				isShowAuth: false ,//是否隐藏授权
 				dsItem: {},
 				dsPrice: '',
+				dsMark: '',
 				tsItem: {},
 				tsyy: ''
 			};
@@ -279,6 +281,7 @@
 				console.log(payType,'payType')
 				let that = this;
 				let dsData = {
+					mark: that.dsMark,
 					member_id: that.dsItem.work_member_id,
 					pay_type: payType,
 					pay_price: that.dsPrice,
@@ -414,7 +417,8 @@
 			closeDs() {
 				this.$refs.dspop.close();
 				this.dsItem = {};
-				this.dsPrice = 0;
+				this.dsPrice = '';
+				this.dsMark = ''
 			},
 			closeTs() {
 				this.$refs.tspop.close();
@@ -995,13 +999,14 @@
 	}
 	.ds-wrap {
 		width: 623rpx;
-		height: 334rpx;
+		// height: 360rpx;
 		border-radius: 20rpx;
 		background-color: #fff;
 		display: flex;
 		justify-content: space-around;
 		align-items: center;
 		flex-direction: column;
+		padding: 20rpx 0;
 		
 		input {
 			width: 575rpx;
@@ -1009,12 +1014,14 @@
 			background-color: #f5f5f5;
 			color: #000;
 			padding-left: 20rpx;
+			margin: 20rpx auto;
 		}
 		.btn-wrap {
 			width: 575rpx;
 			display: flex;
 			justify-content: space-between;
 			align-items: center;
+			margin: 20rpx auto;
 			.btn {
 				width: 277rpx;
 				height: 82rpx;

+ 415 - 3
pages/user/index.vue

@@ -82,6 +82,9 @@
 								</view>
 								<view class="phone" v-if="!userInfo.phone && isLogin && userInfo.uid" @tap="bindPhone">
 									绑定手机号</view>
+								<!-- createAgent -->
+								<!-- <view class="phone" @tap="createAgent">
+										充值质押金</view> -->
 							</view>
 							<view v-if="isLogin" class="qrCode message iconfont icon-erweima-xingerenzhongxin"
 								@click="tapQrCode">
@@ -341,6 +344,7 @@
 							</view>
 						</view>
 					</block>
+
 					<button class="item acea-row row-between-wrapper" open-type='contact' v-if="routineContact == 1">
 						<image src="/static/images/contact.png"></image>
 						<view class="text acea-row row-between-wrapper">
@@ -364,6 +368,14 @@
 				<view class="user-menus" style="margin-top: 25rpx;" v-if="menu_status == 1 && MyMenus.length">
 					<view class="menu-title">我的服务</view>
 					<view class="list-box">
+						<view class="item" @click="openQy" v-if="dlqy">
+							<image src="../../static/images/user-1.png"></image>
+							<text>区域代理</text>
+						</view>
+						<view class="item" @click="openQz" >
+							<image src="../../static/images/gift.png"></image>
+							<text>项目让利</text>
+						</view>
 						<!-- #ifdef APP-PLUS || H5 -->
 						<block v-for="(item,index) in MyMenus" :key="index">
 							<view class="item" v-if="item.url!='#' && item.url!='/pages/service/index'"
@@ -457,10 +469,13 @@
 							<image src="/static/images/staffMoney.png"></image>
 							<view>立即提现</view>
 						</view>
+						<view class="item" @click="goMenuPage('/pages/work/extract/index')" v-if="txShow">
+							<image src="/static/images/user-2.png"></image>
+							<view>提现审核</view>
+						</view>
 					</view>
 				</view>
-				<view class="user-menus" style="margin-top: 25rpx;"
-					v-if="userInfo.is_shareholder==1">
+				<view class="user-menus" style="margin-top: 25rpx;" v-if="userInfo.is_shareholder==1">
 					<!-- <view class="menus-list"> -->
 					<view class="menu-title">股东功能</view>
 					<view class="list-box">
@@ -524,10 +539,75 @@
 		<!-- <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> -->
 		<editUserModal :isShow="editModal" @closeEdit="closeEdit" @editSuccess="editSuccess"></editUserModal>
 		<!-- #endif -->
+		<uni-popup ref="popup" type="center">
+			<view class="dlqy-wrap">
+				<image src="../../static/images/qydl.png" mode="" class="logo"></image>
+				<view class="zyj">
+					质押金:<text>¥{{zyj}}</text>
+				</view>
+				<!-- qzInfo -->
+
+				<!-- 				
+				<view class="zyj">
+					已获得分红:<text>¥{{qzInfo.money}}</text>
+				</view>
+				<view class="zyj">
+					冻结金额:<text>¥{{qzInfo.freeze}}</text>
+				</view>
+				<view class="zyj">
+					分红权重:<text>¥{{qzInfo.num}}</text> <text style="color: #05affc;margin-left: 20rpx;">查看权重记录</text>
+				</view> -->
+				<view class="dl">
+					代理区域:{{dlqy}}
+				</view>
+
+				<view class="btn" @click="goCz">
+					充值质押金
+				</view>
+			</view>
+		</uni-popup>
+		<uni-popup ref="qzpopup" type="center">
+			<view class="dlqy-wrap">
+				<image src="../../static/images/qydl.png" mode="" class="logo"></image>
+				<view class="zyj">
+					已获得分红:<text>¥{{qzInfo.money}}</text>
+				</view>
+				<view class="zyj">
+					冻结金额:<text>¥{{qzInfo.freeze}}</text>
+				</view>
+				<view class="zyj">
+					分红权重:<text>¥{{qzInfo.num}}</text><text class="" @click="goQz" style="margin-left: 20rpx;color: #05affc;">查看记录</text>
+				</view>
+				<view class="dl" style="padding-bottom: 150rpx;"></view>
+				<view class="btn" @click="goQzs">
+					查看让利记录
+				</view>
+			</view>
+		</uni-popup>
+		<uni-popup type="center" ref="czpopup">
+			<view class="ds-wrap">
+				<view class="tit">
+					充值质押金
+				</view>
+				<input type="number" v-model="czPrice" placeholder="请输入任意金额" />
+				<view class="btn-wrap">
+					<view class="btn" @click="closeDs">
+						取消
+					</view>
+					<view class="btn s-btn" @click="confirmDs">
+						确定
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+		<payment :payMode="payMode" :pay_close="pay_close" @onChangeFun="onChangeFun" :order_id="pay_order_id"
+			:totalPrice="czPrice" :payTT="true" @onChooseType="onChooseType"></payment>
 	</view>
 </template>
 <script>
 	let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
+
+	import payment from '@/components/payment';
 	import {
 		storeCardApi
 	} from '@/api/store.js';
@@ -544,7 +624,11 @@
 		setVisit,
 		updateUserInfo,
 		getRandCode,
-		updateWechatInfo
+		updateWechatInfo,
+		agentList,
+		createAgent,
+		getTxList,
+		getQz
 	} from '@/api/user.js';
 	import {
 		wechatAuthV2,
@@ -574,6 +658,7 @@
 	// #endif
 	export default {
 		components: {
+			payment,
 			pageFooter,
 			ewcomerPop,
 			// #ifdef MP
@@ -602,6 +687,36 @@
 		mixins: [colors],
 		data() {
 			return {
+				qzInfo: {},
+				txShow: false,
+				pay_order_id: '',
+				czPrice: '',
+				payMode: [{
+						name: '微信支付',
+						icon: 'icon-weixinzhifu',
+						value: 'weixin',
+						title: '使用微信快捷支付',
+						payStatus: true
+					},
+					{
+						name: '支付宝支付',
+						icon: 'icon-zhifubao',
+						value: 'alipay',
+						title: '使用线上支付宝支付',
+						payStatus: false
+					},
+					{
+						name: '余额支付',
+						icon: 'icon-yuezhifu',
+						value: 'yue',
+						title: '当前可用余额:',
+						number: 0,
+						payStatus: false
+					}
+				],
+				pay_close: false,
+				dlqy: '', //代理区域
+				zyj: 0, //质押金
 				vipStatus: 0,
 				stu: false,
 				storeMenu: [], // 商家管理
@@ -856,6 +971,196 @@
 			};
 		},
 		methods: {
+			payClose: function() {
+				this.pay_close = false;
+			},
+			onChooseType(payType) {
+				console.log(payType, 'payType')
+				let that = this;
+				let czData = {
+					uid: this.userInfo.uid,
+					pay_type: payType,
+					pay_price: this.czPrice,
+					mark: '',
+					from: 'routine', //来源
+				}
+				uni.showLoading({
+					title: '支付中'
+				});
+				try {
+					createAgent(czData).then(res => {
+						let jsConfig = res.data.result.jsConfig;
+						switch (payType) {
+							case 'weixin':
+								if (res.data.result === undefined) return that.$util.Tips({
+									title: '缺少支付参数'
+								});
+								let mp_pay_name = ''
+								if (uni.requestOrderPayment) {
+									mp_pay_name = 'requestOrderPayment'
+								} else {
+									mp_pay_name = 'requestPayment'
+								}
+								uni[mp_pay_name]({
+									timeStamp: jsConfig.timestamp,
+									nonceStr: jsConfig.nonceStr,
+									package: jsConfig.package,
+									signType: jsConfig.signType,
+									paySign: jsConfig.paySign,
+									success: function(res) {
+										uni.hideLoading();
+										return that.$util.Tips({
+											title: res.msg,
+											icon: 'success'
+										}, () => {
+											that.onChangeFun({
+												action: 'pay_complete'
+											})
+
+										});
+									},
+									fail: function(e) {
+										uni.hideLoading();
+										return that.$util.Tips({
+											title: '取消支付'
+										}, () => {
+											that.onChangeFun({
+												action: 'pay_fail'
+											})
+										});
+									},
+									complete: function(e) {
+										uni.hideLoading();
+										if (e.errMsg == 'requestPayment:cancel') return that.$util
+											.Tips({
+												title: '取消支付'
+											}, () => {
+												that.onChangeFun({
+													action: 'pay_fail'
+												})
+											});
+									},
+								});
+								break;
+							case 'yue':
+								uni.hideLoading();
+								return that.$util.Tips({
+									title: res.msg,
+									icon: 'success'
+								}, () => {
+									that.onChangeFun({
+										action: 'pay_complete'
+									})
+								});
+								break;
+						}
+					}).catch(err => {
+						uni.hideLoading()
+						return that.$util.Tips({
+							title: err.msg
+						});
+					})
+				} catch (e) {
+
+					// console.log('eer',e)
+					// that
+					//TODO handle the exception
+				}
+
+				// console.log(that.dsItem,dsData,'dsData')
+			},
+			pay_fail: function() {
+				this.pay_close = false;
+				// this.pay_order_id = '';
+			},
+			onChangeFun: function(e) {
+				let opt = e;
+				let action = opt.action || null;
+				let value = opt.value != undefined ? opt.value : null;
+				action && this[action] && this[action](value);
+			},
+			/**
+			 * 打开支付组件
+			 *
+			 */
+			goPay(pay_price, order_id) {
+				this.$set(this, 'pay_close', true);
+			},
+			/**
+			 * 支付成功回调
+			 *
+			 */
+			pay_complete: function() {
+				this.$set(this, 'pay_close', false);
+			},
+			closeDs() {
+				this.czPrice = '';
+				this.$refs.czpopup.close()
+			},
+			confirmDs() {
+				let that = this;
+				if (!that.czPrice) {
+					return that.$util.Tips({
+						title: '请输入充值金额'
+					});
+				}
+				that.$refs.czpopup.close();
+				that.goPay()
+			},
+			goCz() {
+				this.$refs.popup.close()
+				this.$refs.czpopup.open()
+			},
+			goQz() {
+				this.$refs.qzpopup.close()
+				uni.navigateTo({
+					url:'/pages/work/jc/index?type=0'
+				})
+				
+			},
+			goQzs() {
+				this.$refs.qzpopup.close()
+				uni.navigateTo({
+					url:'/pages/work/jc/index?type=1'
+				})
+			},
+			async openQy() {
+				await this.agentList()
+				this.$refs.popup.open()
+			},
+			openQz() {
+				this.$refs.qzpopup.open()
+			},
+			createAgent() {
+				createAgent({
+					uid: this.userInfo.uid,
+					pay_type: 'weixin',
+					pay_price: 0.01,
+					mark: '',
+					from: 'weixin'
+				}).then(res => {
+
+				})
+			},
+			agentList() {
+				agentList().then(res => {
+					// console.log(res,'agent')
+					let arr = res.data.data;
+					this.zyj = res.data.data[0].quality_deposit
+					let arr1 = []
+					if (arr.length > 0) {
+						arr.forEach(item => {
+							item.area_list.forEach(items => {
+								// this.dlqy = 
+								arr1.push(item.area_name[items])
+							})
+						})
+						// console.log(arr1,'arr1')
+						this.dlqy = arr1.join('、')
+
+					}
+				})
+			},
 			// #ifdef MP
 			editSuccess() {
 				this.editModal = false;
@@ -1105,6 +1410,18 @@
 			getUserInfo: function() {
 				let that = this;
 				getUserInfo().then(res => {
+					getTxList().then(ress => {
+						if (ress.msg == '暂无权限') {
+							this.txShow = false;
+						} else {
+							this.txShow = true;
+						}
+					})
+					that.agentList()
+					getQz().then(res => {
+						console.log(res)
+						that.qzInfo = res.data.list[0]
+					})
 					that.userInfo = res.data
 					console.log(that.userInfo, ' that.userInfo');
 					that.stu = res.data.svip_open
@@ -2305,4 +2622,99 @@
 		padding-bottom: constant(safe-area-inset-bottom);
 		padding-bottom: env(safe-area-inset-bottom);
 	}
+
+	.dlqy-wrap {
+		width: 620rpx;
+		padding-top: 60rpx;
+		// min-height: 702rpx;
+		position: relative;
+		background-color: #fff;
+		border-radius: 20rpx;
+
+		.logo {
+			display: block;
+			margin: 0 auto 30rpx;
+			width: 277rpx;
+			height: 203rpx;
+		}
+
+		.zyj {
+			margin-bottom: 10rpx;
+			text-align: center;
+			font-size: 30rpx;
+			font-weight: bold;
+			color: #000;
+
+			text {
+				color: #ff6600;
+			}
+		}
+
+		.dl {
+			padding: 50rpx 60rpx 185rpx;
+			text-align: center;
+			font-size: 28rpx;
+			color: #000;
+		}
+
+		.btn {
+			width: 436rpx;
+			height: 80rpx;
+			border-radius: 40rpx;
+			background-color: #151e47;
+			color: #fff;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			font-size: 28rpx;
+			position: absolute;
+			bottom: 65rpx;
+			left: 0;
+			right: 0;
+			margin: auto;
+		}
+	}
+
+	.ds-wrap {
+		width: 623rpx;
+		height: 334rpx;
+		border-radius: 20rpx;
+		background-color: #fff;
+		display: flex;
+		justify-content: space-around;
+		align-items: center;
+		flex-direction: column;
+
+		input {
+			width: 575rpx;
+			height: 73rpx;
+			background-color: #f5f5f5;
+			color: #000;
+			padding-left: 20rpx;
+		}
+
+		.btn-wrap {
+			width: 575rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			.btn {
+				width: 277rpx;
+				height: 82rpx;
+				// background-color: ;
+				color: #000;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				background-color: #f5f5f5;
+				border-radius: 15rpx;
+			}
+
+			.s-btn {
+				color: #fff;
+				background-color: #e93323;
+			}
+		}
+	}
 </style>

+ 643 - 0
pages/users/user_cash/dj.vue

@@ -0,0 +1,643 @@
+<template>
+	<view :style="colorStyle">
+		<view class='commission-details'>
+			<view class="nav" >
+				<view class="nav-item" :class="{'action': sixType == 0}" @click="getYjList('re',0)">
+					冻结
+				</view>
+				<view class="nav-item" :class="{'action': sixType == 1}" @click="getYjList('re',1)">
+					解冻
+				</view>
+				<!-- <view class="nav-item" :class="{'action': sixType == -1}" @click="getYjList('re',-1)">
+					已拒绝
+				</view> -->
+			</view>
+			<view class="" style="height: 60rpx;">
+				
+			</view>
+			<view class='sign-record'>
+				<view class="box" >
+					<block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
+						<view class='list' >
+							<view class='item'>
+								<view class='listn'>
+									<view class='itemn1 acea-row row-between-wrapper'>
+										<view class="flex-g">
+											<view class='name line2'>
+												{{item.mark}}
+											</view>
+											<view>
+												<view v-if="item.order_id">
+													订单编号:{{item.order_id}}
+												</view>
+												<view v-if="item.number">
+													金额:{{item.number}}
+												</view>
+												<view v-if="item.balance">
+													余额:{{item.balance}}
+												</view>
+												<view class="">
+													时间:{{getTimeStr( item.add_time )}}
+												</view>
+											</view>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</block>
+				</view>
+			</view>
+		</view>
+		<uni-popup type="center" ref="shpop">
+			<view class="ds-wrap">
+				<view class="tit">
+					审核提现
+				</view>
+				<input type="text" v-model="mark" placeholder="如拒绝请输入原因"/>
+				<view class="btn-wrap">
+					<view class="btn s-btn" @click="passTx">
+						通过
+					</view>
+					<view class="btn " @click="errTx">
+						拒绝
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+		<home v-if="navigation"></home>
+		<!-- #ifdef MP -->
+		<!-- <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> -->
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	import {
+		moneyList,
+		getSpreadInfo,
+		getGqList,
+		getStaffInfo,
+		getUserInfo,
+		getYjList,
+		getJt,
+		getTxList,
+		passTx,
+		errTx,
+		getDjList
+	} from '@/api/user.js';
+	import {
+		toLogin
+	} from '@/libs/login.js';
+	import {
+		mapGetters
+	} from "vuex";
+	import emptyPage from '@/components/emptyPage.vue'
+	import home from '@/components/home';
+	import colors from '@/mixins/color.js';
+	import timeSlot from '@/components/timeSlot/index.vue'
+	export default {
+		components: {
+			emptyPage,
+			home,
+			timeSlot
+		},
+		mixins: [colors],
+		data() {
+			return {
+				txitem: {},
+				mark: '',
+				sevenType: 51,
+				sixType: 0,
+				sale_sum: 0,
+				craft_sum: 0,
+				timer: '',
+				userInfo: {},
+				staffInfo: {},
+				name: '',
+				keyword: '',
+				type: 0,
+				page: 1,
+				limit: 10,
+				loading: false,
+				loadend: false,
+				loadTitle: '加载更多',
+				recordList: [],
+				recordType: 0,
+				recordCount: 0,
+				extractCount: 0,
+				times: [],
+				start: 0,
+				stop: 0,
+				income: '',
+				expend: '',
+				isShowAuth: false
+			};
+		},
+		computed: mapGetters(['isLogin']),
+		onLoad(options) {
+
+		},
+		onShow: function() {
+			this.getYjList('re',0)
+		},
+		methods: {
+			passTx() {
+				passTx(this.txitem.id).then(res => {
+					this.$refs.shpop.close()
+					this.$util.Tips({
+						title: '操作成功',
+						icon: 'success'
+					});
+					this.getYjList('re',this.sixType)
+				})
+			},
+			errTx() {
+				if(this.mark == '') {
+					return this.$util.Tips({
+						title: '请输入拒绝原因',
+					});
+				}
+				errTx(this.txitem.id,{message: this.mark}).then(res => {
+					this.$refs.shpop.close()
+					this.$util.Tips({
+						title: '操作成功',
+						icon: 'success'
+					});
+					this.mark = ''
+					this.getYjList('re',this.sixType)
+				})
+			},
+			goTx(item) {
+				this.txitem = item;
+				this.$refs.shpop.open()
+			},
+			getYjList(type, sixType) {
+				let that = this;
+				that.sixType = sixType;
+				if (type == 're') {
+					console.log('ze')
+					that.page = 1
+					that.loading = false
+					that.loadend = false
+					this.recordList = []
+				}
+				if (that.loading) return;
+				if (that.loadend) return;
+				getDjList({
+					page: that.page,
+					limit: that.limit,
+					pm: that.sixType
+				}).then(res => {
+						
+					if(res.data.list) {
+						try {
+							this.recordList = this.recordList.concat(res.data.list);
+							let loadend = res.data.list.length < that.limit;
+							that.loadend = loadend;
+							that.loadTitle = loadend ? '没有更多内容啦~' : '加载更多';
+							that.page++;
+							console.log(that.page,'that.page')
+							that.loading = false;
+						} catch (error) {
+							console.log(error,'error');
+							//TODO handle the exception
+						}
+						
+					}
+					
+				}).catch(err => {
+					that.loading = false;
+					that.loadTitle = '加载更多';
+				})
+			},
+			// 显示详细
+			showDetail(item) {
+				console.log(item);
+				if (this.type == 6) {
+					if (item.recharge) {
+						uni.showModal({
+							title: '充值订单',
+							content: `用户ID:${item.recharge.uid},充值${item.recharge.price}获得销售业绩`,
+							showCancel: false,
+						});
+					}
+					if (item.subscribe) {
+						const info = item.info[0];
+						uni.showModal({
+							title: '服务项目',
+							content: `订单:${item.order_name},用户:${item.real_name},项目:${info.store_name},支付金额:${info.pay_price}`,
+							showCancel: false,
+						});
+					}
+					if (item.store) {
+						uni.showModal({
+							title: '普通商品',
+							content: `订单:${item.order_id},用户:${item.store.real_name},支付金额:${item.store.pay_price}获得销售业绩`,
+							showCancel: false,
+						});
+					}
+				} else {
+					if (item.mark) {
+						uni.showModal({
+							title: '详细说明',
+							content: item.mark,
+							showCancel: false,
+						});
+					} else if (item.content) {
+						uni.showModal({
+							title: '详细说明',
+							content: item.content,
+							showCancel: false,
+						});
+					}
+				}
+			},
+			navto(url) {
+				uni.navigateTo({
+					url
+				})
+			},
+			onLoadFun() {
+				this.isShowAuth = false
+			},
+			// 授权关闭
+			authColse: function(e) {
+				this.isShowAuth = e
+			},
+			getTimeStr(timestamp) {
+				let date;
+				if (timestamp) {
+					date = new Date(timestamp * 1000);
+				} else {
+					date = new Date();
+				}
+				const year = date.getFullYear();
+				const month = date.getMonth() + 1; // 月份从 0 开始,所以需要加 1
+				const day = date.getDate();
+				return year + '/' + (month > 9 ? month : '0' + month) + '/' + (day > 9 ? day : '0' + day)
+			},
+			changeTime(time) {
+				console.log(time, 'time')
+				if (this.recordType == 6) {
+					let times = ''
+					if (time.start == 0 && time.stop == 0) {
+						console.log('全部')
+						this.timer = '2020/01/01-' + this.getTimeStr()
+					} else {
+						this.timer = this.getTimeStr(time.start) + '-' + this.getTimeStr(time.stop)
+					}
+					console.log(this.timer, 'timer')
+					this.getYjList()
+				} else {
+					this.start = time.start
+					this.stop = time.stop
+					this.page = 1;
+					// this.loading = false;
+					this.loadend = false;
+					this.$set(this, 'recordList', []);
+					this.getRecordList();
+				}
+
+			},
+			getGqList() {
+				let that = this;
+				let page = that.page;
+				let limit = that.limit;
+				if (that.loading) return;
+				if (that.loadend) return;
+				getGqList({
+					page: page,
+					limit: limit,
+					uid: that.userInfo.uid
+				}).then(res => {
+					this.recordList = this.recordList.concat(res.data.list)
+					let loadend = res.data.list.length < that.limit;
+					that.loadend = loadend;
+					that.loadTitle = loadend ? '没有更多内容啦~' : '加载更多';
+					that.page += 1;
+					that.loading = false;
+				}).catch(err => {
+					that.loading = false;
+					that.loadTitle = '加载更多';
+				})
+			},
+			getStaffInfo() {
+				let that = this
+				getUserInfo().then(res => {
+					that.userInfo = res.data
+					if (this.recordType == 5) {
+						that.getGqList();
+					}
+					getStaffInfo({
+						uid: res.data.uid
+					}).then(ress => {
+						that.staffInfo = ress.data;
+						if (that.recordType == 6) {
+							that.getYjList()
+						}
+						if (that.recordType == 7) {
+							that.getJt('re', 51)
+						}
+					})
+				})
+
+			},
+			getRecordList: function() {
+				let that = this;
+				let page = that.page;
+				let limit = that.limit;
+				let recordType = that.recordType;
+				if (that.loading) return;
+				if (that.loadend) return;
+				that.loading = true;
+				that.loadTitle = '';
+				moneyList({
+					keyword: this.keyword,
+					start: this.start,
+					stop: this.stop,
+					page: page,
+					limit: limit
+				}, recordType).then(res => {
+					// this.expend = res.data.expend;
+					// this.income = res.data.income;
+					// for (let i = 0; i < res.data.time.length; i++) {
+					// 	// if (!this.times.includes(res.data.time[i])) {
+					// 	this.times.push(res.data.time[i])
+					// 	this.recordList.push({
+					// 		time: res.data.time[i],
+					// 		child: []
+					// 	})
+					// 	// }
+					// }
+					// // for (let x = 0; x < this.times.length; x++) {
+					// for (let j = 0; j < res.data.list.length; j++) {
+					// 	// if (this.times[x] === res.data.list[j].time_key) {
+
+					// 	// }
+					// 	this.recordList[j].child.push(res.data.list[j])
+					// }
+					// // }
+					// console.log()
+					if(res.data.list && res.data.list.list) {
+						this.recordList = this.recordList.concat(res.data.list.list)
+						let loadend = res.data.list.length.length < that.limit;
+						that.loadend = loadend;
+						that.loadTitle = loadend ? '没有更多内容啦~' : '加载更多';
+						that.page += 1;
+					}
+					
+					that.loading = false;
+				}).catch(err => {
+					that.loading = false;
+					that.loadTitle = '加载更多';
+				})
+			},
+			getRecordListCount: function() {
+				let that = this;
+				getSpreadInfo().then(res => {
+					that.recordCount = res.data.commissionCount;
+					that.extractCount = res.data.extractCount;
+				});
+			}
+		},
+		onReachBottom: function() {
+			this.getYjList('',this.sixType)
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.commission-details .search {
+		width: 100%;
+		background-color: var(--view-theme);
+		border-bottom: 1px solid #f2f2f2;
+		height: 86rpx;
+		padding: 0 30rpx;
+		box-sizing: border-box;
+
+		.input {
+			width: 100%;
+			height: 60rpx;
+			border-radius: 50rpx;
+			background-color: #f5f5f5;
+			position: relative;
+
+			input {
+				height: 100%;
+				font-size: 26rpx;
+				width: 100%;
+				padding-left: 60rpx;
+			}
+
+			.placeholder {
+				color: #bbb;
+			}
+
+			.iconfont {
+				position: absolute;
+				left: 28rpx;
+				color: #999;
+				font-size: 28rpx;
+				top: 50%;
+				transform: translateY(-50%);
+			}
+
+		}
+	}
+
+	.box {
+		border-radius: 14rpx;
+		margin: 0 30rpx;
+		overflow: hidden;
+	}
+
+	.sign-record {
+		// margin-top: 20rpx;
+	}
+
+	.commission-details {
+		.promoterHeader {
+			.headerCon {
+				.money {
+					font-size: 36rpx;
+
+					.num {
+						font-family: 'Guildford Pro';
+					}
+				}
+			}
+		}
+
+	}
+
+	.top_num {
+		padding: 30rpx;
+		font-size: 26rpx;
+		color: #666;
+	}
+
+	.top_num_2 {
+		display: flex;
+		justify-content: space-around;
+		position: sticky;
+		top: 0;
+		background-color: rgba(245, 245, 245, 1);
+	}
+
+	.tx {
+		background-color: #1890FF;
+		color: #fff;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		text-align: center;
+		line-height: 80rpx;
+		font-size: $uni-font-size-lg;
+	}
+
+	.radius15 {
+		border-radius: 14rpx 14rpx 0 0;
+	}
+
+	.sign-record {
+		.list {
+			.item {
+				.listn {
+					.itemn1 {
+						border-bottom: 1rpx solid #eee;
+						padding: 22rpx 24rpx;
+						flex-wrap: nowrap;
+
+						.flex-g {
+							flex-grow: 1;
+							padding-right: 30rpx;
+
+							.status {
+								font-size: 28rpx;
+							}
+						}
+
+						.name {
+							font-size: 28rpx;
+							color: #282828;
+							margin-bottom: 10rpx;
+						}
+
+						.num {
+							font-size: 36rpx;
+							font-family: 'Guildford Pro';
+							color: #16ac57;
+
+							
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.mark {
+		margin-bottom: 10rpx;
+	}
+
+	.status_badge {
+		display: inline-block;
+		height: 30rpx;
+		border-radius: 4rpx;
+		font-size: 20rpx;
+		line-height: 30rpx;
+		font-family: PingFangSC-Regular, PingFang SC;
+		font-weight: 400;
+		margin-left: 12rpx;
+		padding: 0 6rpx 0;
+	}
+
+	.success {
+		background: rgba(24, 144, 255, .1);
+		color: #1890FF;
+	}
+
+	.default {
+		background: #f5f5f5;
+		color: #282828;
+		;
+	}
+
+	.error {
+		background: rgba(233, 51, 35, .1);
+		color: #E93323;
+	}
+
+	.nav {
+		display: flex;
+		justify-content: space-evenly;
+		position: fixed;
+		top: 0;
+		width: 750rpx;
+		.nav-item {
+			width: 50%;
+			line-height: 60rpx;
+			text-align: center;
+			color: #1890FF;
+			border: 1px solid #1890FF;
+			font-size: 28rpx;
+			background-color: #fff;
+		}
+
+		.action {
+			background-color: #1890FF;
+			color: #fff;
+			font-weight: bold;
+		}
+	}
+	.font-color {
+		color: #e93323 !important;
+	}
+	.font-colors {
+		color: #16ac57 !important;
+	}
+	.font-colorss {
+		color:#1890FF !important;
+	}
+	.ds-wrap {
+		width: 623rpx;
+		height: 334rpx;
+		border-radius: 20rpx;
+		background-color: #fff;
+		display: flex;
+		justify-content: space-around;
+		align-items: center;
+		flex-direction: column;
+		
+		input {
+			width: 575rpx;
+			height: 73rpx;
+			background-color: #f5f5f5;
+			color: #000;
+			padding-left: 20rpx;
+		}
+		.btn-wrap {
+			width: 575rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			.btn {
+				width: 277rpx;
+				height: 82rpx;
+				// background-color: ;
+				color: #000;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				background-color: #f5f5f5;
+				border-radius: 15rpx;
+			}
+			.s-btn {
+				color: #fff;
+				background-color:#16ac57
+			}
+		}
+	}
+</style>

+ 23 - 4
pages/users/user_cash/index.vue

@@ -37,7 +37,7 @@
 						</view>
 						<view class='tip'>
 							当前可提现金额: <text
-								class="price">¥{{userInfo.commissionCount}}</text>,冻结佣金:¥{{userInfo.broken_commission}}
+								class="price">¥{{userInfos.commissionCount}}</text>,冻结佣金:¥{{userInfos.broken_commission}}<text style="color: #e93323;padding-left: 20rpx;" @click="lookDj">查看冻结记录</text>
 						</view>
 						<view class='tip'>
 							创业金(不可提现): <text class="price">¥{{member_withdrawal_guarantee}}</text>
@@ -79,7 +79,7 @@
 						</view>
 						<view class='tip'>
 							当前可提现金额: <text
-								class="price">¥{{userInfo.commissionCount}}</text>,冻结佣金:¥{{userInfo.broken_commission}}
+								class="price">¥{{userInfos.commissionCount}}</text>,冻结佣金:¥{{userInfos.broken_commission}} 
 						</view>
 						<view class='tip'>
 							提现手续费: <text class="price">{{withdraw_fee}}%</text>,实际到账:<text class="price">¥{{true_money}}</text>
@@ -121,7 +121,7 @@
 						</view>
 						<view class='tip'>
 							当前可提现金额: <text
-								class="price">¥{{userInfo.commissionCount}}</text>,冻结佣金:¥{{userInfo.broken_commission}}
+								class="price">¥{{userInfos.commissionCount}}</text>,冻结佣金:¥{{userInfos.broken_commission}}<text style="color: #e93323;">查看冻结记录</text>
 						</view>
 						<view class='tip'>
 							提现手续费: <text class="price">{{withdraw_fee}}%</text>,实际到账:<text class="price">¥{{true_money}}</text>
@@ -147,7 +147,8 @@
 	import {
 		extractCash,
 		extractBank,
-		getUserInfo
+		getUserInfo,
+		agentLevelList,
 	} from '@/api/user.js';
 	import {
 		toLogin
@@ -161,6 +162,7 @@
 		mixins:[colors],
 		data() {
 			return {
+				userInfos: {},
 				navList: [],
 				currentTab: '',
 				index: 0,
@@ -195,6 +197,7 @@
 		onLoad() {
 			if (this.isLogin) {
 				this.getUserInfo();
+				this.agentLevelList()
 				this.getUserExtractBank();
 			} else {
 				toLogin()
@@ -204,6 +207,19 @@
 			uni.removeStorageSync('form_type_cart');
 		},
 		methods: {
+			agentLevelList() {
+				agentLevelList().then(res => {
+					const {
+						user
+					} = res.data;
+					this.userInfos = user;
+				});
+			},
+			lookDj() {
+				uni.navigateTo({
+					url:'/pages/users/user_cash/dj'
+				})
+			},
 			inputNum: function(e) {
 				let val = e.detail.value;
 				let dot = val.indexOf('.');
@@ -352,6 +368,9 @@
 				if (Number(value.money) < Number(that.minPrice)) return this.$util.Tips({
 					title: '提现金额不能低于:¥' + that.minPrice
 				});
+				if (Number(value.money) > Number(that.userInfos.commissionCount)) return this.$util.Tips({
+					title: '提现金额不能大于可提现金额'
+				});
 				if (this.prevent) {
 					this.prevent = false
 				} else {

+ 664 - 0
pages/work/extract/index.vue

@@ -0,0 +1,664 @@
+<template>
+	<view :style="colorStyle">
+		<view class='commission-details'>
+			<view class="nav" >
+				<view class="nav-item" :class="{'action': sixType == 0}" @click="getYjList('re',0)">
+					未审核
+				</view>
+				<view class="nav-item" :class="{'action': sixType == 1}" @click="getYjList('re',1)">
+					已通过
+				</view>
+				<view class="nav-item" :class="{'action': sixType == -1}" @click="getYjList('re',-1)">
+					已拒绝
+				</view>
+			</view>
+			<view class="" style="height: 60rpx;">
+				
+			</view>
+			<view class='sign-record'>
+				<view class="box" >
+					<block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
+						<view class='list' >
+							<view class='item'>
+								<view class='listn'>
+									<view class='itemn1 acea-row row-between-wrapper'>
+										<view class="flex-g">
+											<view class='name line2'>
+												{{item.user.nickname}}(UID:{{item.user.uid}})
+											</view>
+											<view>
+												<view>
+													提现金额:{{item.extract_price}}
+												</view>
+												<template v-if="item.extract_type == 'bank'">
+													<view >
+														银行卡号:{{item.bank_code}}
+													</view>
+													<view >
+														开户行:{{item.bank_address}}
+													</view>
+												</template>
+												<template v-if="item.extract_type == 'weixin'">
+													<view >
+														提现方式:微信
+													</view>
+												</template>
+												<!-- balance -->
+												<template v-if="item.extract_type == 'balance'">
+													<view >
+														提现方式:佣金转入余额
+													</view>
+												</template>
+												<view class="">
+													申请时间:{{getTimeStr( item.add_time )}}
+												</view>
+											</view>
+										</view>
+										<view class='status font-colorss' v-if="item.status == 0" @click="goTx(item)">
+											立即审核
+										</view>
+										<view class='status font-colors' v-if="item.status == 1">
+											已通过
+										</view>
+										<view class='status font-color' v-if="item.status == -1">
+											已拒绝
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</block>
+				</view>
+			</view>
+		</view>
+		<uni-popup type="center" ref="shpop">
+			<view class="ds-wrap">
+				<view class="tit">
+					审核提现
+				</view>
+				<input type="text" v-model="mark" placeholder="如拒绝请输入原因"/>
+				<view class="btn-wrap">
+					<view class="btn s-btn" @click="passTx">
+						通过
+					</view>
+					<view class="btn " @click="errTx">
+						拒绝
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+		<home v-if="navigation"></home>
+		<!-- #ifdef MP -->
+		<!-- <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> -->
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	import {
+		moneyList,
+		getSpreadInfo,
+		getGqList,
+		getStaffInfo,
+		getUserInfo,
+		getYjList,
+		getJt,
+		getTxList,
+		passTx,
+		errTx
+	} from '@/api/user.js';
+	import {
+		toLogin
+	} from '@/libs/login.js';
+	import {
+		mapGetters
+	} from "vuex";
+	import emptyPage from '@/components/emptyPage.vue'
+	import home from '@/components/home';
+	import colors from '@/mixins/color.js';
+	import timeSlot from '@/components/timeSlot/index.vue'
+	export default {
+		components: {
+			emptyPage,
+			home,
+			timeSlot
+		},
+		mixins: [colors],
+		data() {
+			return {
+				txitem: {},
+				mark: '',
+				sevenType: 51,
+				sixType: 0,
+				sale_sum: 0,
+				craft_sum: 0,
+				timer: '',
+				userInfo: {},
+				staffInfo: {},
+				name: '',
+				keyword: '',
+				type: 0,
+				page: 1,
+				limit: 10,
+				loading: false,
+				loadend: false,
+				loadTitle: '加载更多',
+				recordList: [],
+				recordType: 0,
+				recordCount: 0,
+				extractCount: 0,
+				times: [],
+				start: 0,
+				stop: 0,
+				income: '',
+				expend: '',
+				isShowAuth: false
+			};
+		},
+		computed: mapGetters(['isLogin']),
+		onLoad(options) {
+
+		},
+		onShow: function() {
+			this.getYjList('re',0)
+		},
+		methods: {
+			passTx() {
+				passTx(this.txitem.id).then(res => {
+					this.$refs.shpop.close()
+					this.$util.Tips({
+						title: '操作成功',
+						icon: 'success'
+					});
+					this.getYjList('re',this.sixType)
+				})
+			},
+			errTx() {
+				if(this.mark == '') {
+					return this.$util.Tips({
+						title: '请输入拒绝原因',
+					});
+				}
+				errTx(this.txitem.id,{message: this.mark}).then(res => {
+					this.$refs.shpop.close()
+					this.$util.Tips({
+						title: '操作成功',
+						icon: 'success'
+					});
+					this.mark = ''
+					this.getYjList('re',this.sixType)
+				})
+			},
+			goTx(item) {
+				this.txitem = item;
+				this.$refs.shpop.open()
+			},
+			getYjList(type, sixType) {
+				let that = this;
+				that.sixType = sixType;
+				if (type == 're') {
+					console.log('ze')
+					that.page = 1
+					that.loading = false
+					that.loadend = false
+					this.recordList = []
+				}
+				if (that.loading) return;
+				if (that.loadend) return;
+				getTxList({
+					page: that.page,
+					limit: that.limit,
+					status: that.sixType
+				}).then(res => {
+						
+					if(res.data.list && res.data.list.list) {
+						try {
+							this.recordList = this.recordList.concat(res.data.list.list);
+							let loadend = res.data.list.list.length < that.limit;
+							that.loadend = loadend;
+							that.loadTitle = loadend ? '没有更多内容啦~' : '加载更多';
+							that.page++;
+							console.log(that.page,'that.page')
+							that.loading = false;
+						} catch (error) {
+							console.log(error,'error');
+							//TODO handle the exception
+						}
+						
+					}
+					
+				}).catch(err => {
+					that.loading = false;
+					that.loadTitle = '加载更多';
+				})
+			},
+			// 显示详细
+			showDetail(item) {
+				console.log(item);
+				if (this.type == 6) {
+					if (item.recharge) {
+						uni.showModal({
+							title: '充值订单',
+							content: `用户ID:${item.recharge.uid},充值${item.recharge.price}获得销售业绩`,
+							showCancel: false,
+						});
+					}
+					if (item.subscribe) {
+						const info = item.info[0];
+						uni.showModal({
+							title: '服务项目',
+							content: `订单:${item.order_name},用户:${item.real_name},项目:${info.store_name},支付金额:${info.pay_price}`,
+							showCancel: false,
+						});
+					}
+					if (item.store) {
+						uni.showModal({
+							title: '普通商品',
+							content: `订单:${item.order_id},用户:${item.store.real_name},支付金额:${item.store.pay_price}获得销售业绩`,
+							showCancel: false,
+						});
+					}
+				} else {
+					if (item.mark) {
+						uni.showModal({
+							title: '详细说明',
+							content: item.mark,
+							showCancel: false,
+						});
+					} else if (item.content) {
+						uni.showModal({
+							title: '详细说明',
+							content: item.content,
+							showCancel: false,
+						});
+					}
+				}
+			},
+			navto(url) {
+				uni.navigateTo({
+					url
+				})
+			},
+			onLoadFun() {
+				this.isShowAuth = false
+			},
+			// 授权关闭
+			authColse: function(e) {
+				this.isShowAuth = e
+			},
+			getTimeStr(timestamp) {
+				let date;
+				if (timestamp) {
+					date = new Date(timestamp * 1000);
+				} else {
+					date = new Date();
+				}
+				const year = date.getFullYear();
+				const month = date.getMonth() + 1; // 月份从 0 开始,所以需要加 1
+				const day = date.getDate();
+				return year + '/' + (month > 9 ? month : '0' + month) + '/' + (day > 9 ? day : '0' + day)
+			},
+			changeTime(time) {
+				console.log(time, 'time')
+				if (this.recordType == 6) {
+					let times = ''
+					if (time.start == 0 && time.stop == 0) {
+						console.log('全部')
+						this.timer = '2020/01/01-' + this.getTimeStr()
+					} else {
+						this.timer = this.getTimeStr(time.start) + '-' + this.getTimeStr(time.stop)
+					}
+					console.log(this.timer, 'timer')
+					this.getYjList()
+				} else {
+					this.start = time.start
+					this.stop = time.stop
+					this.page = 1;
+					// this.loading = false;
+					this.loadend = false;
+					this.$set(this, 'recordList', []);
+					this.getRecordList();
+				}
+
+			},
+			getGqList() {
+				let that = this;
+				let page = that.page;
+				let limit = that.limit;
+				if (that.loading) return;
+				if (that.loadend) return;
+				getGqList({
+					page: page,
+					limit: limit,
+					uid: that.userInfo.uid
+				}).then(res => {
+					this.recordList = this.recordList.concat(res.data.list)
+					let loadend = res.data.list.length < that.limit;
+					that.loadend = loadend;
+					that.loadTitle = loadend ? '没有更多内容啦~' : '加载更多';
+					that.page += 1;
+					that.loading = false;
+				}).catch(err => {
+					that.loading = false;
+					that.loadTitle = '加载更多';
+				})
+			},
+			getStaffInfo() {
+				let that = this
+				getUserInfo().then(res => {
+					that.userInfo = res.data
+					if (this.recordType == 5) {
+						that.getGqList();
+					}
+					getStaffInfo({
+						uid: res.data.uid
+					}).then(ress => {
+						that.staffInfo = ress.data;
+						if (that.recordType == 6) {
+							that.getYjList()
+						}
+						if (that.recordType == 7) {
+							that.getJt('re', 51)
+						}
+					})
+				})
+
+			},
+			getRecordList: function() {
+				let that = this;
+				let page = that.page;
+				let limit = that.limit;
+				let recordType = that.recordType;
+				if (that.loading) return;
+				if (that.loadend) return;
+				that.loading = true;
+				that.loadTitle = '';
+				moneyList({
+					keyword: this.keyword,
+					start: this.start,
+					stop: this.stop,
+					page: page,
+					limit: limit
+				}, recordType).then(res => {
+					// this.expend = res.data.expend;
+					// this.income = res.data.income;
+					// for (let i = 0; i < res.data.time.length; i++) {
+					// 	// if (!this.times.includes(res.data.time[i])) {
+					// 	this.times.push(res.data.time[i])
+					// 	this.recordList.push({
+					// 		time: res.data.time[i],
+					// 		child: []
+					// 	})
+					// 	// }
+					// }
+					// // for (let x = 0; x < this.times.length; x++) {
+					// for (let j = 0; j < res.data.list.length; j++) {
+					// 	// if (this.times[x] === res.data.list[j].time_key) {
+
+					// 	// }
+					// 	this.recordList[j].child.push(res.data.list[j])
+					// }
+					// // }
+					// console.log()
+					if(res.data.list && res.data.list.list) {
+						this.recordList = this.recordList.concat(res.data.list.list)
+						let loadend = res.data.list.length.length < that.limit;
+						that.loadend = loadend;
+						that.loadTitle = loadend ? '没有更多内容啦~' : '加载更多';
+						that.page += 1;
+					}
+					
+					that.loading = false;
+				}).catch(err => {
+					that.loading = false;
+					that.loadTitle = '加载更多';
+				})
+			},
+			getRecordListCount: function() {
+				let that = this;
+				getSpreadInfo().then(res => {
+					that.recordCount = res.data.commissionCount;
+					that.extractCount = res.data.extractCount;
+				});
+			}
+		},
+		onReachBottom: function() {
+			this.getYjList('',this.sixType)
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.commission-details .search {
+		width: 100%;
+		background-color: var(--view-theme);
+		border-bottom: 1px solid #f2f2f2;
+		height: 86rpx;
+		padding: 0 30rpx;
+		box-sizing: border-box;
+
+		.input {
+			width: 100%;
+			height: 60rpx;
+			border-radius: 50rpx;
+			background-color: #f5f5f5;
+			position: relative;
+
+			input {
+				height: 100%;
+				font-size: 26rpx;
+				width: 100%;
+				padding-left: 60rpx;
+			}
+
+			.placeholder {
+				color: #bbb;
+			}
+
+			.iconfont {
+				position: absolute;
+				left: 28rpx;
+				color: #999;
+				font-size: 28rpx;
+				top: 50%;
+				transform: translateY(-50%);
+			}
+
+		}
+	}
+
+	.box {
+		border-radius: 14rpx;
+		margin: 0 30rpx;
+		overflow: hidden;
+	}
+
+	.sign-record {
+		// margin-top: 20rpx;
+	}
+
+	.commission-details {
+		.promoterHeader {
+			.headerCon {
+				.money {
+					font-size: 36rpx;
+
+					.num {
+						font-family: 'Guildford Pro';
+					}
+				}
+			}
+		}
+
+	}
+
+	.top_num {
+		padding: 30rpx;
+		font-size: 26rpx;
+		color: #666;
+	}
+
+	.top_num_2 {
+		display: flex;
+		justify-content: space-around;
+		position: sticky;
+		top: 0;
+		background-color: rgba(245, 245, 245, 1);
+	}
+
+	.tx {
+		background-color: #1890FF;
+		color: #fff;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		text-align: center;
+		line-height: 80rpx;
+		font-size: $uni-font-size-lg;
+	}
+
+	.radius15 {
+		border-radius: 14rpx 14rpx 0 0;
+	}
+
+	.sign-record {
+		.list {
+			.item {
+				.listn {
+					.itemn1 {
+						border-bottom: 1rpx solid #eee;
+						padding: 22rpx 24rpx;
+						flex-wrap: nowrap;
+
+						.flex-g {
+							flex-grow: 1;
+							padding-right: 30rpx;
+
+							.status {
+								font-size: 28rpx;
+							}
+						}
+
+						.name {
+							font-size: 28rpx;
+							color: #282828;
+							margin-bottom: 10rpx;
+						}
+
+						.num {
+							font-size: 36rpx;
+							font-family: 'Guildford Pro';
+							color: #16ac57;
+
+							
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.mark {
+		margin-bottom: 10rpx;
+	}
+
+	.status_badge {
+		display: inline-block;
+		height: 30rpx;
+		border-radius: 4rpx;
+		font-size: 20rpx;
+		line-height: 30rpx;
+		font-family: PingFangSC-Regular, PingFang SC;
+		font-weight: 400;
+		margin-left: 12rpx;
+		padding: 0 6rpx 0;
+	}
+
+	.success {
+		background: rgba(24, 144, 255, .1);
+		color: #1890FF;
+	}
+
+	.default {
+		background: #f5f5f5;
+		color: #282828;
+		;
+	}
+
+	.error {
+		background: rgba(233, 51, 35, .1);
+		color: #E93323;
+	}
+
+	.nav {
+		display: flex;
+		justify-content: space-evenly;
+		position: fixed;
+		top: 0;
+		width: 750rpx;
+		.nav-item {
+			width: 50%;
+			line-height: 60rpx;
+			text-align: center;
+			color: #1890FF;
+			border: 1px solid #1890FF;
+			font-size: 28rpx;
+			background-color: #fff;
+		}
+
+		.action {
+			background-color: #1890FF;
+			color: #fff;
+			font-weight: bold;
+		}
+	}
+	.font-color {
+		color: #e93323 !important;
+	}
+	.font-colors {
+		color: #16ac57 !important;
+	}
+	.font-colorss {
+		color:#1890FF !important;
+	}
+	.ds-wrap {
+		width: 623rpx;
+		height: 334rpx;
+		border-radius: 20rpx;
+		background-color: #fff;
+		display: flex;
+		justify-content: space-around;
+		align-items: center;
+		flex-direction: column;
+		
+		input {
+			width: 575rpx;
+			height: 73rpx;
+			background-color: #f5f5f5;
+			color: #000;
+			padding-left: 20rpx;
+		}
+		.btn-wrap {
+			width: 575rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			.btn {
+				width: 277rpx;
+				height: 82rpx;
+				// background-color: ;
+				color: #000;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				background-color: #f5f5f5;
+				border-radius: 15rpx;
+			}
+			.s-btn {
+				color: #fff;
+				background-color:#16ac57
+			}
+		}
+	}
+</style>

+ 560 - 0
pages/work/jc/index.vue

@@ -0,0 +1,560 @@
+<template>
+	<view :style="colorStyle">
+		<view class='commission-details'>
+			<view class='sign-record'>
+				<view class="box">
+					<block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
+						<view class='list'>
+							<view class='item'>
+								<view class='listn'>
+									<view class='itemn1 acea-row row-between-wrapper'>
+										<view class="flex-g">
+											<view class='name line2'>
+												{{item.mark}}
+											</view>
+											<view>
+												<view class="">
+													修改时间:{{getTimeStr( item.add_time )}}
+												</view>
+											</view>
+										</view>
+										<view class='status font-colorss'  v-if="type == 1">
+											{{item.number}}
+										</view>
+										<view class='status font-colorss' :class="{'font-color': item.pm == 0}" v-if="type == 0">
+											{{item.pm == 0? '-': '+'}}{{item.number}}
+										</view>
+										
+									</view>
+								</view>
+							</view>
+						</view>
+					</block>
+				</view>
+			</view>
+			<view v-if="recordList.length == 0 && !loading">
+				<emptyPage title="暂无记录~"></emptyPage>
+			</view>
+		</view>
+		<home v-if="navigation"></home>
+		<!-- #ifdef MP -->
+		<!-- <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> -->
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	import {
+		moneyList,
+		getSpreadInfo,
+		getGqList,
+		getStaffInfo,
+		getUserInfo,
+		getYjList,
+		getJt,
+		getTxList,
+		passTx,
+		errTx,
+		getQzList,
+		getJcList
+	} from '@/api/user.js';
+	import {
+		toLogin
+	} from '@/libs/login.js';
+	import {
+		mapGetters
+	} from "vuex";
+	import emptyPage from '@/components/emptyPage.vue'
+	import home from '@/components/home';
+	import colors from '@/mixins/color.js';
+	import timeSlot from '@/components/timeSlot/index.vue'
+	export default {
+		components: {
+			emptyPage,
+			home,
+			timeSlot
+		},
+		mixins: [colors],
+		data() {
+			return {
+				txitem: {},
+				mark: '',
+				sevenType: 51,
+				sixType: 0,
+				sale_sum: 0,
+				craft_sum: 0,
+				timer: '',
+				userInfo: {},
+				staffInfo: {},
+				name: '',
+				keyword: '',
+				type: 0,
+				page: 1,
+				limit: 10,
+				loading: false,
+				loadend: false,
+				loadTitle: '加载更多',
+				recordList: [],
+				recordType: 0,
+				recordCount: 0,
+				extractCount: 0,
+				times: [],
+				start: 0,
+				stop: 0,
+				income: '',
+				expend: '',
+				isShowAuth: false
+			};
+		},
+		computed: mapGetters(['isLogin']),
+		onLoad(options) {
+			this.type =options.type
+			if(this.type == 1) {
+				uni.setNavigationBarTitle({
+					title:'奖池变更记录'
+				})
+			}
+			this.getYjList('re', 0)
+		},
+		onShow: function(opt) {
+			
+		},
+		methods: {
+			
+			
+			
+			getYjList(type, sixType) {
+				let that = this;
+				that.sixType = sixType;
+				if (type == 're') {
+					console.log('ze')
+					that.page = 1
+					that.loading = false
+					that.loadend = false
+					this.recordList = []
+				}
+				if (that.loading) return;
+				if (that.loadend) return;
+				let getList;
+				if(that.type == 0) {
+					getList = getQzList
+				}else {
+					getList = getJcList
+				}
+				getList({
+					page: that.page,
+					limit: that.limit,
+					// status: that.sixType
+				}).then(res => {
+					let arr = res.data.list
+					this.recordList = this.recordList.concat(arr);
+					let loadend = arr.length < that.limit;
+					that.loadend = loadend;
+					that.loadTitle = loadend ? '没有更多内容啦~' : '加载更多';
+					that.page++;
+					console.log(that.page, 'that.page')
+					that.loading = false;
+					
+
+				}).catch(err => {
+					that.loading = false;
+					that.loadTitle = '加载更多';
+				})
+			},
+			
+			navto(url) {
+				uni.navigateTo({
+					url
+				})
+			},
+			onLoadFun() {
+				this.isShowAuth = false
+			},
+			// 授权关闭
+			authColse: function(e) {
+				this.isShowAuth = e
+			},
+			getTimeStr(timestamp) {
+				let date;
+				if (timestamp) {
+					date = new Date(timestamp * 1000);
+				} else {
+					date = new Date();
+				}
+				const year = date.getFullYear();
+				const month = date.getMonth() + 1; // 月份从 0 开始,所以需要加 1
+				const day = date.getDate();
+				return year + '/' + (month > 9 ? month : '0' + month) + '/' + (day > 9 ? day : '0' + day)
+			},
+			changeTime(time) {
+				console.log(time, 'time')
+				if (this.recordType == 6) {
+					let times = ''
+					if (time.start == 0 && time.stop == 0) {
+						console.log('全部')
+						this.timer = '2020/01/01-' + this.getTimeStr()
+					} else {
+						this.timer = this.getTimeStr(time.start) + '-' + this.getTimeStr(time.stop)
+					}
+					console.log(this.timer, 'timer')
+					this.getYjList()
+				} else {
+					this.start = time.start
+					this.stop = time.stop
+					this.page = 1;
+					// this.loading = false;
+					this.loadend = false;
+					this.$set(this, 'recordList', []);
+					this.getRecordList();
+				}
+
+			},
+			getGqList() {
+				let that = this;
+				let page = that.page;
+				let limit = that.limit;
+				if (that.loading) return;
+				if (that.loadend) return;
+				getGqList({
+					page: page,
+					limit: limit,
+					uid: that.userInfo.uid
+				}).then(res => {
+					this.recordList = this.recordList.concat(res.data.list)
+					let loadend = res.data.list.length < that.limit;
+					that.loadend = loadend;
+					that.loadTitle = loadend ? '没有更多内容啦~' : '加载更多';
+					that.page += 1;
+					that.loading = false;
+				}).catch(err => {
+					that.loading = false;
+					that.loadTitle = '加载更多';
+				})
+			},
+			getStaffInfo() {
+				let that = this
+				getUserInfo().then(res => {
+					that.userInfo = res.data
+					if (this.recordType == 5) {
+						that.getGqList();
+					}
+					getStaffInfo({
+						uid: res.data.uid
+					}).then(ress => {
+						that.staffInfo = ress.data;
+						if (that.recordType == 6) {
+							that.getYjList()
+						}
+						if (that.recordType == 7) {
+							that.getJt('re', 51)
+						}
+					})
+				})
+
+			},
+			getRecordList: function() {
+				let that = this;
+				let page = that.page;
+				let limit = that.limit;
+				let recordType = that.recordType;
+				if (that.loading) return;
+				if (that.loadend) return;
+				that.loading = true;
+				that.loadTitle = '';
+				moneyList({
+					keyword: this.keyword,
+					start: this.start,
+					stop: this.stop,
+					page: page,
+					limit: limit
+				}, recordType).then(res => {
+					// this.expend = res.data.expend;
+					// this.income = res.data.income;
+					// for (let i = 0; i < res.data.time.length; i++) {
+					// 	// if (!this.times.includes(res.data.time[i])) {
+					// 	this.times.push(res.data.time[i])
+					// 	this.recordList.push({
+					// 		time: res.data.time[i],
+					// 		child: []
+					// 	})
+					// 	// }
+					// }
+					// // for (let x = 0; x < this.times.length; x++) {
+					// for (let j = 0; j < res.data.list.length; j++) {
+					// 	// if (this.times[x] === res.data.list[j].time_key) {
+
+					// 	// }
+					// 	this.recordList[j].child.push(res.data.list[j])
+					// }
+					// // }
+					// console.log()
+					if (res.data.list && res.data.list.list) {
+						this.recordList = this.recordList.concat(res.data.list.list)
+						let loadend = res.data.list.length.length < that.limit;
+						that.loadend = loadend;
+						that.loadTitle = loadend ? '没有更多内容啦~' : '加载更多';
+						that.page += 1;
+					}
+
+					that.loading = false;
+				}).catch(err => {
+					that.loading = false;
+					that.loadTitle = '加载更多';
+				})
+			},
+			getRecordListCount: function() {
+				let that = this;
+				getSpreadInfo().then(res => {
+					that.recordCount = res.data.commissionCount;
+					that.extractCount = res.data.extractCount;
+				});
+			}
+		},
+		onReachBottom: function() {
+			this.getYjList('', this.sixType)
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.commission-details .search {
+		width: 100%;
+		background-color: var(--view-theme);
+		border-bottom: 1px solid #f2f2f2;
+		height: 86rpx;
+		padding: 0 30rpx;
+		box-sizing: border-box;
+
+		.input {
+			width: 100%;
+			height: 60rpx;
+			border-radius: 50rpx;
+			background-color: #f5f5f5;
+			position: relative;
+
+			input {
+				height: 100%;
+				font-size: 26rpx;
+				width: 100%;
+				padding-left: 60rpx;
+			}
+
+			.placeholder {
+				color: #bbb;
+			}
+
+			.iconfont {
+				position: absolute;
+				left: 28rpx;
+				color: #999;
+				font-size: 28rpx;
+				top: 50%;
+				transform: translateY(-50%);
+			}
+
+		}
+	}
+
+	.box {
+		border-radius: 14rpx;
+		margin: 0 30rpx;
+		overflow: hidden;
+	}
+
+	.sign-record {
+		// margin-top: 20rpx;
+	}
+
+	.commission-details {
+		.promoterHeader {
+			.headerCon {
+				.money {
+					font-size: 36rpx;
+
+					.num {
+						font-family: 'Guildford Pro';
+					}
+				}
+			}
+		}
+
+	}
+
+	.top_num {
+		padding: 30rpx;
+		font-size: 26rpx;
+		color: #666;
+	}
+
+	.top_num_2 {
+		display: flex;
+		justify-content: space-around;
+		position: sticky;
+		top: 0;
+		background-color: rgba(245, 245, 245, 1);
+	}
+
+	.tx {
+		background-color: #1890FF;
+		color: #fff;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		text-align: center;
+		line-height: 80rpx;
+		font-size: $uni-font-size-lg;
+	}
+
+	.radius15 {
+		border-radius: 14rpx 14rpx 0 0;
+	}
+
+	.sign-record {
+		.list {
+			.item {
+				.listn {
+					.itemn1 {
+						border-bottom: 1rpx solid #eee;
+						padding: 22rpx 24rpx;
+						flex-wrap: nowrap;
+
+						.flex-g {
+							flex-grow: 1;
+							padding-right: 30rpx;
+
+							.status {
+								font-size: 28rpx;
+							}
+						}
+
+						.name {
+							font-size: 28rpx;
+							color: #282828;
+							margin-bottom: 10rpx;
+						}
+
+						.num {
+							font-size: 36rpx;
+							font-family: 'Guildford Pro';
+							color: #16ac57;
+
+
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.mark {
+		margin-bottom: 10rpx;
+	}
+
+	.status_badge {
+		display: inline-block;
+		height: 30rpx;
+		border-radius: 4rpx;
+		font-size: 20rpx;
+		line-height: 30rpx;
+		font-family: PingFangSC-Regular, PingFang SC;
+		font-weight: 400;
+		margin-left: 12rpx;
+		padding: 0 6rpx 0;
+	}
+
+	.success {
+		background: rgba(24, 144, 255, .1);
+		color: #1890FF;
+	}
+
+	.default {
+		background: #f5f5f5;
+		color: #282828;
+		;
+	}
+
+	.error {
+		background: rgba(233, 51, 35, .1);
+		color: #E93323;
+	}
+
+	.nav {
+		display: flex;
+		justify-content: space-evenly;
+		position: fixed;
+		top: 0;
+		width: 750rpx;
+
+		.nav-item {
+			width: 50%;
+			line-height: 60rpx;
+			text-align: center;
+			color: #1890FF;
+			border: 1px solid #1890FF;
+			font-size: 28rpx;
+			background-color: #fff;
+		}
+
+		.action {
+			background-color: #1890FF;
+			color: #fff;
+			font-weight: bold;
+		}
+	}
+
+	.font-color {
+		color: #e93323 !important;
+	}
+
+	.font-colors {
+		color: #16ac57 !important;
+	}
+
+	.font-colorss {
+		color: #1890FF ;
+	}
+
+	.ds-wrap {
+		width: 623rpx;
+		height: 334rpx;
+		border-radius: 20rpx;
+		background-color: #fff;
+		display: flex;
+		justify-content: space-around;
+		align-items: center;
+		flex-direction: column;
+
+		input {
+			width: 575rpx;
+			height: 73rpx;
+			background-color: #f5f5f5;
+			color: #000;
+			padding-left: 20rpx;
+		}
+
+		.btn-wrap {
+			width: 575rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			.btn {
+				width: 277rpx;
+				height: 82rpx;
+				// background-color: ;
+				color: #000;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				background-color: #f5f5f5;
+				border-radius: 15rpx;
+			}
+
+			.s-btn {
+				color: #fff;
+				background-color: #16ac57
+			}
+		}
+	}
+</style>

binární
static/images/qydl.png


+ 4 - 1
utils/request.js

@@ -78,12 +78,15 @@ function baseRequest(url, method, data, {
 						confirmText: '我知道了'
 					});
 					uni.setStorageSync('authIng', true)
-				} else if(res.data.status == 403){
+				} else if(res.data.status == 403 || res.data.status == 400){
+					console.log(res,'zheli')
 					reject(res.data);
+					
 				} else
 					reject(res.data.msg || '系统错误');
 			},
 			fail: (msg) => {
+				console.log(msg,'zhe')
 				let data = {
 					mag: '请求失败',
 					status: 1 //1没网