lhl 1 gadu atpakaļ
vecāks
revīzija
80c904531b

+ 1 - 1
api/store.js

@@ -569,5 +569,5 @@ export function getServeItemDetail(id) {
 
 export function getMen(data) {
 	// api/work/member//
-	return request.get("work/member", data);
+	return request.get("member", data);
 }

+ 4 - 0
api/user.js

@@ -748,6 +748,10 @@ export function levelActivate(data) {
 	return request.post('user/level/activate',data);
 }
 
+//获取用户优惠卡
+export function getMyServeList(data) {
+	return request.get('v2/CardUser',data);
+}
 
 
 

+ 94 - 0
pages/goods/order_confirm/index.vue

@@ -369,7 +369,15 @@
 					<view>会员运费抵扣:</view>
 					<view class='money'>-¥{{priceGroup.storePostageDiscount}}</view>
 				</view> -->
+				
 			</view>
+			<scroll-view scroll-x="true" class="zp-wrap" @scrolltolower="">
+				<view class="zp-item" v-for="ygitem in yg.list" @click="choosYg(ygitem)"
+					:class="{'choose': ygitem.id == choose_yg.id}">
+					<image :src="ygitem.avatar || '../../../static/images/avt.png'" mode="" class="zp-logo"></image>
+					<view class="zp-name">{{ygitem.name}}</view>
+				</view>
+			</scroll-view>
 			<view class="height-add"></view>
 			<view class='footer acea-row row-between-wrapper'>
 				<view>合计:
@@ -616,6 +624,16 @@
 				codeData: {},
 				ptype: 1,
 				yytime: '',//预约时间
+				yg: {
+					page: 1,
+					limit: 100,
+					list: [],
+					loadingType: 'loadmore',
+					loaded: false,
+				},
+				choose_yg: {
+				
+				},
 			};
 		},
 		computed: mapGetters(['isLogin']),
@@ -716,11 +734,40 @@
 			this.timeranges = arrayNew;
 		},
 		methods: {
+			// 选择员工
+			choosYg(item) {
+				this.choose_yg = item
+			},
+			// 获取员工列表
 			getMen() {
+				let that = this
+				if(that.yg.loadingType == 'noMore' || that.yg.loadingType == 'loading' ) {
+					return
+				}
+				that.yg.loadingType = 'loading'
 				getMen({
+					page: that.yg.page,
+					limit: that.yg.limit,
 					store_id: this.system_store.id
 				}).then(res => {
 					console.log(res)
+					let arr = []
+					if(that.yg.page == 1) {
+						arr = [{
+							uid: 0,
+							id: 0,
+							name: '随机指派'
+						}]
+					}
+					arr = arr.concat(res.data.list)
+					that.yg.list = that.yg.list.concat(arr)
+					if(that.yg.limit == res.data.list.length) {
+						that.yg.loadingType = 'more'
+						that.yg.page++
+					}else {
+						that.yg.loadingType = 'noMore'
+					}
+					that.yg.loaded = true
 				})
 			},
 			// 打开picker
@@ -2567,4 +2614,51 @@
 			color: var(--view-theme);
 		}
 	}
+	//指派
+	.zp-wrap {
+		margin-top: 20rpx;
+		width: 750rpx;
+		height: 216rpx;
+		white-space: nowrap;
+	
+	
+	
+		.zp-item {
+			display: inline-block;
+			margin-right: 15rpx;
+			padding-top: 34rpx;
+			width: 172rpx;
+			height: 216rpx;
+			// background: #E02020;
+			background-color: #fff;
+			border-radius: 10rpx;
+	
+			.zp-logo {
+				display: block;
+				width: 106rpx;
+				height: 106rpx;
+				margin: auto;
+				border-radius: 50%;
+				background-color: #eee;
+			}
+	
+			.zp-name {
+				margin-top: 15rpx;
+				width: 100%;
+				text-align: center;
+				font-size: 30rpx;
+				font-weight: bold;
+				color: #333333;
+			}
+		}
+	
+		.choose {
+			background-color: #262261 !important;
+	
+			.zp-name {
+				color: #fff !important;
+			}
+	
+		}
+	}
 </style>

+ 9 - 9
pages/users/user_order/index.vue

@@ -3,16 +3,16 @@
 		<view class="content">
 			<view class="dyquan-wrap" v-for="(item,index) in list" :key="index">
 				<view class="showtime">
-					<text class="float_left order-no-text">{{ item.createTime|| '' }}</text>
+					<text class="float_left order-no-text">{{ item.card_name|| '' }}</text>
 				</view>
-				<view class="item-info">
-					<image :src="item.image" mode=""></image>
+				<view class="item-info" v-for="good in item.card">
+					<image :src="good.product.image" mode=""></image>
 					<view class="info-info">
 						<view class="clamp2">
-							{{item.name || ''}}
+							{{good.product.store_name || ''}}
 						</view>
 						<view class="info-cs">
-							剩余使用次数:{{item.number || ''}}
+							剩余使用次数:{{good.repertory || ''}}
 						</view>
 					</view>
 				</view>
@@ -31,7 +31,7 @@
 				page: 1,
 				pageSize: 10,
 				loaded: false,
-				loadingType: 'loadmore',
+				loadingType: 'more',
 				list: []
 			}
 		},
@@ -67,15 +67,15 @@
 
 				getMyServeList({
 					page: that.page,
-					pageSize: that.pageSize,
+					limit: that.pageSize,
 					name: ''
 				}).then(({
 					data
 				}) => {
-					that.list = that.list.concat(data)
+					that.list = that.list.concat(data.list)
 					that.page++
 					if (data.length == that.pageSize) {
-						that.loadingType = 'loadmore'
+						that.loadingType = 'more'
 					} else {
 						that.loadingType = 'nomore'
 					}

BIN
static/images/avt.png