Bladeren bron

Merge branch 'ldt' of http://192.168.1.218:3000/hmp/guosen-ldt-client into ldt

# Conflicts:
#	assets/http/global.js
lianghanqiang 4 jaren geleden
bovenliggende
commit
1992545aa7

+ 8 - 0
pages.json

@@ -357,6 +357,14 @@
 				"enablePullDownRefresh": false
 			}
 		
+		}
+		, {
+			"path": "pages/take-order/take-order",
+			"style": {
+				"navigationBarTitleText": "订单详情",
+				"enablePullDownRefresh": false
+			}
+		
 		}, {
 			"path": "pages/test",
 			"style": {

+ 1 - 1
pages/gain/comps/card2.vue

@@ -118,7 +118,7 @@
 			},
 			view(){
 				uni.navigateTo({
-					url:"/pages/agent/agentDetail"
+					url:"/pagesB/pages/agent/agentDetail"
 				})
 			},
 			fetchStatistics(){

+ 16 - 25
pagesA/pages/bill/bill-detail.vue

@@ -2,15 +2,12 @@
 	<view>
 		<block v-if="type=='point'">
 			<view class="top">
-				<image style="border-radius: 50%;" :src="item.logo" mode=""></image>
-				<text class="title">{{item.name}}</text>
-				<view class="data">
-					<image style="border-radius: 50%;" src="/pagesA/static/icon/points-value.png" mode="aspectFit"></image>
-					<view>
-						<text v-if="item.type==1||item.type==2">+</text>
-						<text v-if="item.type==3">-</text>
-						<text>{{item.point}}</text>
-						<text>(价值 ¥ {{item.pointValue}})</text>
+				<image style="border-radius: 50%;" :src="item.channelLogo" mode=""></image>
+				<text class="title">{{item.channelName}}</text>
+				<view class="data text-center center">
+					<view style="padding: 0;">
+						<text>-</text>
+						<text>{{item.totalPrice}}</text>
 					</view>
 				</view>
 			</view>
@@ -19,34 +16,28 @@
 				<block v-if="item.type!=4">
 					<view class="item">
 						<text>交易状态</text>
-						<text>{{item.payStatus==0?'待付款':item.payStatus==1?'已付款':'已取消'}}</text>
+						<text>{{item.payStatus}}</text>
 					</view>
 					<view class="item">
-						<text>用途</text>
-						<text>消费</text>
+						<text>交易金额</text>
+						<text>{{item.price}}</text>
 					</view>
 					<view class="item">
-						<text v-if="item.type==1">商场名称</text>
-						<text v-else>商家名称</text>
-						<text>{{item.name}}</text>
+						<text>交易手续费</text>
+						<text>{{item.fee}}</text>
 					</view>
 					<view class="item">
-						<text>交易时间</text>
-						<text>{{item.updateTime}}</text>
+						<text>交易描述</text>
+						<text>{{item.title}}</text>
 					</view>
 					<view class="item">
-						<text>支付方式</text>
-						<text>{{item.payWay}}</text>
+						<text>交易时间</text>
+						<text>{{item.createTime}}</text>
 					</view>
 				</block>
-				<block v-if="item.type==4"></block>
 				<view class="item">
 					<text>交易单号</text>
-					<text>{{item.billRecordId}}</text>
-				</view>
-				<view v-if="item.type==3" class="item">
-					<text>商户单号</text>
-					<text>{{item.billRecordId}}</text>
+					<text>{{item.id}}</text>
 				</view>
 			</view>
 		</block>

+ 9 - 19
pagesA/pages/my-points/my-points.vue

@@ -33,11 +33,8 @@
 				<view class="area1 area-padding " style="padding-left: 40rpx;">
 					<text>积分来源</text>
 				</view>
-				<view class="area2 area-padding">
-					<text>积分数量</text>
-				</view>
 				<view class="area3 area-padding">
-					<text>价值</text>
+					<text>积分价值</text>
 				</view>
 			</view>
 			<mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption"
@@ -46,23 +43,16 @@
 					v-for="(item,index) in list" :key="index">
 					<view class="area1">
 						<view class="item-padding">
-							<image :src="item.logo" mode="aspectFit"></image>
+							<image :src="item.channelLogo" mode="aspectFit"></image>
 							<view class="">
-								<text>{{item.name}}</text>
-								<text>{{item.updateTime}}</text>
+								<text>{{item.channelName}}</text>
+								<text>{{item.createTime}}</text>
 							</view>
 						</view>
 					</view>
-					<view class="area2 text-area ">
-						<view class="item-padding">
-							<image style="width: 35rpx;height: 35rpx;margin-bottom: -5rpx;"
-								src="@/static/icon/points-value.png"></image>
-							<text v-if="item.type==1||item.type==2" style="font-size: 32rpx;margin-left: 10rpx;color: #F39248;">+{{item.point}}</text>
-							<text v-if="item.type==3" style="font-size: 32rpx;margin-left: 10rpx;color: #000000;">-{{item.point}}</text>
-						</view>
-					</view>
 					<view class="area3 text-area ">
-						<view class="item-padding" style="font-size: 34rpx;color: #000;">¥{{item.pointValue}}</view>
+						<view v-if="item.type=='PAY_CONSUMER'" class="item-padding" style="font-size: 34rpx;color: #000;">-¥{{item.totalPrice}}</view>
+						<view v-else class="item-padding" style="font-size: 34rpx;color: #000;">+¥{{item.totalPrice}}</view>
 					</view>
 				</view>
 			</mescroll-body>
@@ -107,7 +97,7 @@
 			jump(item){
 				console.log(item);
 				uni.navigateTo({
-					url:'/pagesA/pages/bill/bill-detail='+JSON.stringify(item)+'&type=point'
+					url:'/pagesA/pages/bill/bill-detail?billDetail='+JSON.stringify(item)+'&type=point'
 				})
 			},
 			confirmTime(e){
@@ -118,7 +108,7 @@
 				let params = {
 					current:mescroll.num,
 					size:mescroll.size,
-					receiveId:this.vuex_userId,
+					payId:this.vuex_userId,
 				}
 				try {
 					this.$api.pointbills.list(params).then(res => {
@@ -225,7 +215,7 @@
 
 		.area1 {
 			padding-left: 30rpx;
-			width: 55%;
+			width: 80%;
 
 			view:first-child {
 				display: flex;

+ 135 - 4
pagesC/pages/checkstand/index.vue

@@ -22,6 +22,42 @@
 				</view>
 			</view>
 		</view>
+		<!-- #ifdef  MP-WEIXIN-->
+		<view v-if="$isNotEmpty(channel)" @click="channelShow=true" class="channel " style="width: 100%;">
+			<view class="left">
+				<view class="center">
+					<image :src="channel[0].channelLogo" mode=""></image>
+				</view>
+				<view class="content">
+					<text>{{channel[0].channelName}}</text>
+					<text>优先使用该渠道积分支付</text>
+				</view>
+			</view>
+			<view class="right">
+				<text class="cuIcon-right"></text>
+			</view>
+		</view>
+		<u-popup :closeable="true" v-model="channelShow" mode="bottom" height="65%">
+			<view class="popup-content">
+				<view class="">
+					<view style="border-bottom: 1rpx solid #eee;" class="fixed center text-bold text-lg padding-bottom-40">
+						请选择优先使用的渠道积分
+					</view>
+					<view @click="channelId=item.channelId" v-for="(item,index) in channel" :key="index" class="channel-item">
+						<image :src="item.channelLogo" mode=""></image>
+						<text class="margin-left-10">{{item.channelName}}(剩余 ¥ {{item.available}})</text>
+						<text v-if="channelId==item.channelId" class="cuIcon-check checked"></text>
+					</view>
+				</view>
+				<view class="center">
+					<view @click="channelShow=false" class="cu-btn radius channelbtn">
+						确认
+					</view>
+				</view>
+			</view>
+		</u-popup>
+		<!-- #endif -->
+		
 		<amountInput ref="amountInput" confirmText="付款" btnColor="#ff9900" placeholder="请输入交易金额" @change="change"
 			@confirm="debouncePay"></amountInput>
 
@@ -39,6 +75,11 @@
 		},
 		data() {
 			return {
+				//渠道积分
+				channel:[],
+				channelShow:false,
+				channelId:0,
+				
 				//第一次点击支付不需要防抖操作
 				isFirstPay: true,
 				orderAmount: '',
@@ -67,7 +108,7 @@
 				this.shopId = params[0]
 				this.orderAmount = params[1]
 			} else {
-				this.shopId = options.id || '1440871712886366210'
+				this.shopId = options.id
 			}
 
 			// #ifdef  MP-WEIXIN
@@ -88,6 +129,7 @@
 				})
 				return
 			}
+			this.getUserPonint()
 			// #endif
 
 			if (this.$isEmpty(this.shopId)) {
@@ -99,6 +141,18 @@
 			this.fetchShopDetail()
 		},
 		methods: {
+			//获取用户渠道积分
+			getUserPonint(){
+				let params={
+					userId:this.vuex_userId
+				}
+				this.$api.userChannelPoint.list(params).then(res=>{
+					if (this.$isNotEmpty(res.data.records)) {
+						this.channel=res.data.records
+						this.channelId=this.channel[0].channelId
+					}
+				})
+			},
 			//防抖支付
 			debouncePay() {
 				if (this.isFirstPay) {
@@ -213,6 +267,7 @@
 					expireTime,
 					shopId: this.shopId,
 					openId: this.$cache.get('userInfo').openId,
+					channelId:this.channelId
 				}
 				let resp = await this.$api.pay.getPayOrderPamams(params)
 				this.payParams=resp.data
@@ -231,13 +286,10 @@
 					payStatus: this.$global.payStatus.IS_WAIT
 				}
 				let res = await this.$api.pay.payOrder(obj)
-				console.log(res,"res****");
 				let prePayTn = JSON.parse(res.data.prePayTn)
 				this.$mpi.requestPayment(prePayTn).then((res) => {
-					console.log(res,"res");
 					this.handelResult(true)
 				}).catch(err => {
-					console.log(err,"err");
 					this.handelResult(false)
 				})
 			},
@@ -342,4 +394,83 @@
 			opacity: 0;
 		}
 	}
+	
+	.channel{
+		display: flex;
+		justify-content: space-between;
+		margin-top: 10rpx;
+		padding:0 30rpx;
+		
+		.left{
+			display: flex;
+			image{
+				width: 60rpx;
+				height: 60rpx;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
+			view{
+				display: flex;
+				flex-direction: column;
+			}
+			
+			.content{
+				margin-left: 16rpx;
+				
+				text:first-child{
+					font-size: 34rpx;
+					margin-bottom: 10rpx;
+				}
+				
+				text:last-child{
+					font-size: 28rpx;
+					color: #989898;
+				}
+			}
+		}
+		
+		.right{
+			display: flex;
+			justify-content: center;
+			align-items: center;
+		}
+		
+	}
+	
+	.popup-content{
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		padding: 40rpx 0;
+		height: 100%;
+		
+		.channelbtn{
+			background-color: #18b566;
+			color: #FFFFFF;
+			padding: 36rpx 150rpx;
+		}
+		
+		.channel-item{
+			position: relative;
+			display: flex;
+			padding: 30rpx;
+			border-bottom: 1rpx solid #eee;
+			image{
+				width: 40rpx;
+				height: 40rpx;
+				margin-right: 10rpx;
+			}
+			
+			.checked{
+				color: #18b566;
+				font-size: 34rpx;
+				position: absolute;
+				font-weight: 800;
+				right: 40rpx;
+				bottom: 30rpx;
+			}
+			
+		}
+	}
 </style>

+ 142 - 6
pagesC/pages/checkstand/pay-qrcode.vue

@@ -11,7 +11,7 @@
 				</view>
 				<!-- 付款码 -->
 				<view class="qr-code center">
-					<tki-qrcode cid="2" ref="qrcode" :val="content" size="300" :onval="true" :loadMake="true"
+					<tki-qrcode cid="2" ref="qrcode" :val="content" size="320" :onval="true" :loadMake="true"
 						:usingComponents="true" />
 				</view>
 			</view>
@@ -21,9 +21,46 @@
 					:loadMake="true" :usingComponents="true" />
 			</view>
 		</view>
-		<view class="footer center">
+		<view class="footer center flex-direction">
 			<text class="text-xl text-bold">{{nickName}}</text>
+			<view v-if="$isNotEmpty(channel)" @click="channelShow=true" class="channel " style="width: 100%;">
+				<view class="left">
+					<view class="center">
+						<image :src="channel[0].channelLogo" mode=""></image>
+					</view>
+					<view class="content">
+						<text>{{channel[0].channelName}}</text>
+						<text>优先使用该渠道积分支付</text>
+					</view>
+				</view>
+				<view class="right">
+					<text class="cuIcon-right"></text>
+				</view>
+			</view>
 		</view>
+		
+		
+		<u-popup :closeable="true" v-model="channelShow" mode="bottom" height="65%">
+			<view class="popup-content">
+				<view class="">
+					<view style="border-bottom: 1rpx solid #eee;" class="fixed center text-bold text-lg padding-bottom-40">
+						请选择优先使用的渠道积分
+					</view>
+					<view @click="channelId=item.channelId" v-for="(item,index) in channel" :key="index" class="channel-item">
+						<image :src="item.channelLogo" mode=""></image>
+						<text class="margin-left-10">{{item.channelName}}(剩余 ¥{{item.available}})</text>
+						<text v-if="channelId==item.channelId" class="cuIcon-check checked"></text>
+					</view>
+					
+				</view>
+				
+				<view class="center">
+					<view class="cu-btn radius channelbtn">
+						确认
+					</view>
+				</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
@@ -40,11 +77,16 @@
 		computed: {
 			content() {
 				let transformStr = this.id
-				return transformStr + this.secret
+				return transformStr + this.secret+";"+this.channelId
 			}
 		},
 		data() {
 			return {
+				//渠道积分
+				channel:[],
+				channelShow:false,
+				channelId:0,
+				
 				id: '',
 				avatar: "",
 				nickName: '',
@@ -72,6 +114,9 @@
 			}
 		},
 		async onLoad(options) {
+			//获取用户的渠道积分
+			this.getUserPonint()
+			
 			let res = await this.$api.loginUser.detail({
 				id: this.vuex_userId
 			})
@@ -96,6 +141,17 @@
 			this.handelOut()
 		},
 		methods: {
+			getUserPonint(){
+				let params={
+					userId:this.vuex_userId
+				}
+				this.$api.userChannelPoint.list(params).then(res=>{
+					if (this.$isNotEmpty(res.data.records)) {
+						this.channel=res.data.records
+						this.channelId=this.channel[0].channelId
+					}
+				})
+			},
 			handelOut() {
 				uni.hideLoading()
 				this.webSocket.closeSocket()
@@ -203,6 +259,86 @@
 	}
 </style>
 <style lang="scss" scoped>
+	.popup-content{
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		padding: 40rpx 0;
+		height: 100%;
+		
+		.channelbtn{
+			background-color: #18b566;
+			color: #FFFFFF;
+			padding: 36rpx 150rpx;
+		}
+		
+		.channel-item{
+			position: relative;
+			display: flex;
+			padding: 30rpx;
+			border-bottom: 1rpx solid #eee;
+			image{
+				width: 40rpx;
+				height: 40rpx;
+				margin-right: 10rpx;
+			}
+			
+			.checked{
+				color: #18b566;
+				font-size: 34rpx;
+				position: absolute;
+				font-weight: 800;
+				right: 40rpx;
+				bottom: 30rpx;
+			}
+			
+		}
+	}
+	
+	
+	
+	.channel{
+		display: flex;
+		justify-content: space-between;
+		margin-top: 40rpx;
+		
+		.left{
+			display: flex;
+			image{
+				width: 60rpx;
+				height: 60rpx;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
+			view{
+				display: flex;
+				flex-direction: column;
+			}
+			
+			.content{
+				margin-left: 16rpx;
+				
+				text:first-child{
+					font-size: 34rpx;
+					margin-bottom: 10rpx;
+				}
+				
+				text:last-child{
+					font-size: 28rpx;
+					color: #989898;
+				}
+			}
+		}
+		
+		.right{
+			display: flex;
+			justify-content: center;
+			align-items: center;
+		}
+		
+	}
+	
 	.code-container {
 		background-color: #FFFFFF;
 		border-radius: 16rpx;
@@ -221,9 +357,9 @@
 		}
 
 		.footer {
-			width: 90%;
-			height: 160rpx;
-			margin-left: 5%;
+			width: 96%;
+			padding: 30rpx;
+			margin-left: 2%;
 			border-top: 1rpx dashed #dddddd;
 		}
 

+ 251 - 243
pagesD/pages/pay/pay.vue

@@ -3,7 +3,8 @@
 		<view class="">
 			<view>
 				<!-- 地址栏 -->
-				<view v-if="takeType==tykeTypeGloabl.delivery" class="bg-white" @click="$jump('/pagesD/pages/address/address')">
+				<view v-if="takeType==tykeTypeGloabl.delivery" class="bg-white"
+					@click="$jump('/pagesD/pages/address/address')">
 					<view class="add-address-box u-flex u-flex-1" v-if="$isEmpty(address)">
 						<view class="box-bg u-p-30 u-flex-1 u-flex u-row-between">
 							<text class="select-notice">请选择收货地址</text>
@@ -17,7 +18,7 @@
 									<text>{{ address.consignee.substring(0,1)}}</text>
 								</view>
 							</view>
-							
+
 							<view class="" style="width: 90%;">
 								<view class="top u-flex">
 									<text class="name">{{ address.consignee }}</text>
@@ -32,10 +33,10 @@
 								</view>
 							</view>
 						</view>
-						
+
 					</view>
 				</view>
-				
+
 				<view class="card" style="justify-content: flex-start;">
 					<text class="cuIcon-shop center text-base" style="font-size: 34rpx;"></text>
 					<text class="text-lg margin-left-10">{{vuex_orderInfo.store.shopName}}</text>
@@ -43,14 +44,14 @@
 				<view class="card text-df" @click="takeTypeShow=true">
 					<text class="text-gray">取餐方式</text>
 					<view class="">
-						<text >{{takeType}}</text>
+						<text>{{takeType}}</text>
 						<text class="cuIcon-right"></text>
 					</view>
 				</view>
 				<view v-if="takeType==tykeTypeGloabl.dine_in" class="card text-df">
 					<text class="text-gray">取餐时间</text>
 					<view class="">
-						<text >立即用餐</text>
+						<text>立即用餐</text>
 						<text class="cuIcon-right"></text>
 					</view>
 				</view>
@@ -60,43 +61,47 @@
 						<view class='cu-tag light sm round margin-left-10 bg-orange'>可预约</view>
 					</view>
 					<view class="">
-						<text >{{takeTime?takeTime:'请选择自取时间'}}</text>
+						<text>{{takeTime?takeTime:'请选择自取时间'}}</text>
 						<text class="cuIcon-right"></text>
 					</view>
 				</view>
-				<view v-if="takeType==tykeTypeGloabl.dine_in" class="card text-df center" style="padding-top: 15rpx;padding-bottom: 15rpx;">
+				<view v-if="takeType==tykeTypeGloabl.dine_in" class="card text-df center"
+					style="padding-top: 15rpx;padding-bottom: 15rpx;">
 					<text class="text-gray">取餐座位</text>
 					<view class="flex justify-end" style="width: 50%;">
-						<u-input v-model="seatNum" input-align="right" style="width: 62%;" placeholder="请输入取餐座号" class="center"></u-input>
+						<u-input v-model="seatNum" input-align="right" style="width: 62%;" placeholder="请输入取餐座号"
+							class="center"></u-input>
 						<text class="cuIcon-right center"></text>
 					</view>
 				</view>
 				<view v-if="takeType==tykeTypeGloabl.package" class="card text-df" style="border: none;">
 					<text class="text-gray">联系电话</text>
 					<view class="">
-						<text >{{vuex_phone}}</text>
+						<text>{{vuex_phone}}</text>
 						<text class="cuIcon-right"></text>
 					</view>
 				</view>
 			</view>
-			
+
 			<view style="margin-top: 20rpx;">
-				<view v-for="(item,index) in cart" :key="index" class="cart">
-					<view class="flex" style="width: 70%;">
-						<image :src="item.image" mode=""></image>
-						<view class="item-content">
-							<text class="text-cut-1">{{item.name}}</text>
-							<text class="text-cut-1">{{item.propertyStr ? item.propertyStr : item.name}}</text>
+				<u-read-more ref="uReadMore" close-text="展开更多" show-height="500" color="#999">
+					<view v-for="(item,index) in cart" :key="index" class="cart">
+						<view class="flex" style="width: 70%;">
+							<image :src="item.image" mode=""></image>
+							<view class="item-content">
+								<text class="text-cut-1">{{item.name}}</text>
+								<text class="text-cut-1">{{item.propertyStr ? item.propertyStr : item.name}}</text>
+							</view>
 						</view>
-					</view>
-					<view class="item-data">
-						<view class="">
-							<text class="text-sm">x</text>
-							<text class="text-lg" style="margin-left: 6rpx;">{{item.number}}</text>
+						<view class="item-data">
+							<view class="">
+								<text class="text-sm">x</text>
+								<text class="text-lg" style="margin-left: 6rpx;">{{item.number}}</text>
+							</view>
+							<text class="text-price text-lg">{{item.realPrice / 100}}</text>
 						</view>
-						<text class="text-price text-lg">{{item.realPrice / 100}}</text>
 					</view>
-				</view>
+				</u-read-more>
 				<!-- 商家配送 -->
 				<block v-if="takeType==tykeTypeGloabl.delivery">
 					<view class="card text-df">
@@ -115,7 +120,7 @@
 						<text class="text-price">{{vuex_orderInfo.store.packingPrice / 100}}</text>
 					</view>
 				</block>
-				
+
 				<view class="card" style="justify-content: flex-end;flex-direction: column;text-align: right;">
 					<view class="">
 						<text>总计:</text>
@@ -126,7 +131,7 @@
 					</view>
 				</view>
 			</view>
-			
+
 			<view class="card margin-top-20">
 				<text>备注</text>
 				<view style="width: 80%;" class="flex justify-end" @click="goRemark">
@@ -136,7 +141,7 @@
 				</view>
 			</view>
 		</view>
-		
+
 		<!-- 付款栏 begin -->
 		<view class="" style="height: 140rpx;"></view>
 		<view class="footer-fixed pay-bar" style="z-index: 99;">
@@ -149,297 +154,300 @@
 			</view>
 		</view>
 		<!-- 付款栏 end -->
-		
+
 		<!-- 取餐方式 -->
-		<u-picker @confirm="pickConfirm" confirm-color="#FF9447" mode="selector" v-model="takeTypeShow"  :range="takeTypeList"></u-picker>
+		<u-picker @confirm="pickConfirm" confirm-color="#FF9447" mode="selector" v-model="takeTypeShow"
+			:range="takeTypeList"></u-picker>
 		<!-- 自取时间 -->
-		<h-time-alert
-			title="自取时间" 
-			:rangeStartTime="vuex_orderInfo.store.businessStartTime" 
-			:rangeEndTime="vuex_orderInfo.store.businessEndTime"
-			intervalTime="30" 
-			dayStartIntTime="15" 
-			rangeDay="1"
-			:isNow="true"
-			:isShow="timeShow" 
-			@closeAlert="handelClose">
+		<h-time-alert title="自取时间" :rangeStartTime="vuex_orderInfo.store.businessStartTime"
+			:rangeEndTime="vuex_orderInfo.store.businessEndTime" intervalTime="30" dayStartIntTime="15" rangeDay="1"
+			:isNow="true" :isShow="timeShow" @closeAlert="handelClose">
 		</h-time-alert>
 	</view>
 </template>
 
 <script>
-import global from "@/assets/http/global.js"
-import hTimeAlert from "../../comps/h-time-alert.vue"
-export default {
-	components:{
-		hTimeAlert
-	},
-	data() {
-		return {
-			shopId:'',
-			//购物车
-			cartKey:'',
-			cart:[],
-			//商品备注
-			remark:'',
-			//商品总数
-			totalNum:0,
-			// 座位号
-			seatNum:'',
-			//取餐方式
-			takeType:'',
-			tykeTypeGloabl:global.takeType,
-			takeTypeList:['店内堂食','到店自取'],
-			takeTypeShow:false,
-			//自取时间
-			timeShow:false,
-			takeTime:'',
-			//配送地址
-			address:{},
-			//支付参数
-			payParams:{},
-			successParams:{},
-			//支付结果
-			payResult:{
-				isSuccess: false,
-				msg: "交易失败",
-				//总价
-				totalPrice: 0,
-				//消耗积分值
-				pointsNum:0,
-				//消耗现金值
-				amountNum:0,
-			}
-		};
-	},
-	onLoad() {
-		this.init()
-		uni.$on('REMARK',(remark)=>{
-			this.remark=remark
-		})
-		
-		uni.$on('ADDRESS',(address)=>{
-			console.log(address);
-			this.address=address
-		})
-	},
-	computed:{
-		total() {
-			this.totalNum=0
-			const sum = this.cart.reduce((pre, item) => {
-				this.totalNum+=item.number
-			    return pre + item.number * item.realPrice
-			}, 0)
-			//商家配送
-			if (this.takeType==this.$global.takeType.delivery) {
-				return sum + (this.vuex_orderInfo.store.packingPrice)
-				 + (this.vuex_orderInfo.store.sendingPrice)
-			}
-			//到店自取
-			if (this.takeType==this.$global.takeType.package) {
-				return sum + (this.vuex_orderInfo.store.packingPrice)
-			}
-			return sum
+	import global from "@/assets/http/global.js"
+	import hTimeAlert from "../../comps/h-time-alert.vue"
+	export default {
+		components: {
+			hTimeAlert
 		},
-	},
-	methods:{
-		init(){
-			this.address=this.vuex_orderInfo.address
-			this.takeType=this.vuex_orderInfo.takeType
-			this.cart = this.vuex_orderInfo.cart
-			this.shopId=this.vuex_orderInfo.shopId
-			this.cartKey=this.$global.cart_prefix + this.vuex_shopId
+		data() {
+			return {
+				shopId: '',
+				//购物车
+				cartKey: '',
+				cart: [],
+				//商品备注
+				remark: '',
+				//商品总数
+				totalNum: 0,
+				// 座位号
+				seatNum: '',
+				//取餐方式
+				takeType: '',
+				tykeTypeGloabl: global.takeType,
+				takeTypeList: ['店内堂食', '到店自取'],
+				takeTypeShow: false,
+				//自取时间
+				timeShow: false,
+				takeTime: '',
+				//配送地址
+				address: {},
+				//支付参数
+				payParams: {},
+				successParams: {},
+				//支付结果
+				payResult: {
+					isSuccess: false,
+					msg: "交易失败",
+					//总价
+					totalPrice: 0,
+					//消耗积分值
+					pointsNum: 0,
+					//消耗现金值
+					amountNum: 0,
+				}
+			};
 		},
-		goRemark(){
-			uni.navigateTo({
-				url:"remark?data="+this.remark
+		onLoad() {
+			this.init()
+			uni.$on('REMARK', (remark) => {
+				this.remark = remark
+			})
+
+			uni.$on('ADDRESS', (address) => {
+				console.log(address);
+				this.address = address
 			})
 		},
-		pickConfirm(e){
-			let index=e[0]
-			let takeType=this.takeTypeList[index]
-			if (takeType==this.$global.takeType.delivery&& this.total<this.vuex_orderInfo.store.sendingNeedLeastPrice) {
-				//商家配送,总价格低于配送费
-				this.modalShow=true
-				return
-			}else{
-				this.takeType=takeType
-			}
-		},
-		handelClose(data) {
-			this.timeShow = false;
-			if (this.$isNotEmpty(data)) {
-				this.takeTime=this.$dateTime.format(new Date(data.date))
-			}
+		computed: {
+			total() {
+				this.totalNum = 0
+				const sum = this.cart.reduce((pre, item) => {
+					this.totalNum += item.number
+					return pre + item.number * item.realPrice
+				}, 0)
+				//商家配送
+				if (this.takeType == this.$global.takeType.delivery) {
+					return sum + (this.vuex_orderInfo.store.packingPrice) +
+						(this.vuex_orderInfo.store.sendingPrice)
+				}
+				//到店自取
+				if (this.takeType == this.$global.takeType.package) {
+					return sum + (this.vuex_orderInfo.store.packingPrice)
+				}
+				return sum
+			},
 		},
-		async order(){
-			let params={
-				receiveId:this.shopId,
-				payId:this.vuex_userId,
-				takeType: this.takeType,
-				goodsPreview:JSON.stringify(this.cart),
-				goodsTotalNum:this.totalNum,
-				totalPrice:this.total,
-				extraInfo:this.remark,
-				expireTime:this.$dateTime.getExpireTime(),
-				userPhone:this.vuex_phone,
-				appId: this.$global.wxParams.APPID,
-			}
-			if (this.takeType==this.$global.takeType.dine_in) {
-				//店内堂食
-				params.seatNum=this.seatNum
-			}
-			if (this.takeType==this.$global.takeType.package) {
-				//到店自取,包装费
-				params.packingPrice=this.vuex_orderInfo.store.packingPrice
-			}
-			
-			if (this.takeType==this.$global.takeType.package) {
-				if (this.$isEmpty(this.address)) {
-					this.$u.toast('请选择配送地址')
+		methods: {
+			init() {
+				this.address = this.vuex_orderInfo.address
+				this.takeType = this.vuex_orderInfo.takeType
+				this.cart = this.vuex_orderInfo.cart
+				this.shopId = this.vuex_orderInfo.shopId
+				this.cartKey = this.$global.cart_prefix + this.vuex_shopId
+			},
+			goRemark() {
+				uni.navigateTo({
+					url: "remark?data=" + this.remark
+				})
+			},
+			pickConfirm(e) {
+				let index = e[0]
+				let takeType = this.takeTypeList[index]
+				if (takeType == this.$global.takeType.delivery && this.total < this.vuex_orderInfo.store
+					.sendingNeedLeastPrice) {
+					//商家配送,总价格低于配送费
+					this.modalShow = true
 					return
+				} else {
+					this.takeType = takeType
 				}
-				//商家配送,包装费,配送费
-				params.packingPrice=this.vuex_orderInfo.store.packingPrice
-				params.sendingPrice=this.vuex_orderInfo.store.sendingPrice
-				params.userPhone=address.phone
-				params.receiver=address.consignee
-				params.addressDetail=this.address.provinceName+'-'+this.address.cityName+'-'+this.address.areaName+' '+this.address.address
-			}
-			let res=await this.$api.goods.order(params)
-			this.payParams=res.data
-			this.successParams=this.payParams.successParams
-			if (this.successParams.status=='付款成功') {
-				this.handelResult(true)
-			}else if (this.successParams.status=='待付款') {
-				this.doWxPay(this.successParams.bills.id)
-			}else{
-				this.handelResult(false)
-			}
-		},
-		async doWxPay(orderId){
-			let obj = {
-				orderType: this.$global.orderType.USER_PAY,
-				orderId,
-				payStatus: this.$global.payStatus.IS_WAIT
-			}
-			let res = await this.$api.pay.payOrder(obj)
-			let prePayTn = JSON.parse(res.data.prePayTn)
-			this.$mpi.requestPayment(prePayTn).then(() => {
-				this.handelResult(true)
-			}).catch(err => {
-				this.handelResult(false)
-			})
-		},
-		handelResult(flag){
-			if (flag) {
-				this.payResult={
-					isSuccess: true,
-					msg: "交易成功",
-					totalPrice:this.successParams.totalPrice,
-					amountNum: this.successParams.bills.price,
-					pointsNum: this.$digital.floatSub(this.successParams.totalPrice,this.successParams.bills.price),
+			},
+			handelClose(data) {
+				this.timeShow = false;
+				if (this.$isNotEmpty(data)) {
+					this.takeTime = this.$dateTime.format(new Date(data.date))
 				}
-			}else{
-				this.payResult.msg='交易失败'
-				this.payResult.isSuccess=false
-			}
-			uni.navigateTo({
-				url:"/pagesC/pages/checkstand/pay-result?payResult="+JSON.stringify(this.payResult)
-			})
-		},
-		
-	}
-};
+			},
+			async order() {
+				let params = {
+					receiveId: this.shopId,
+					payId: this.vuex_userId,
+					takeType: this.takeType,
+					goodsPreview: JSON.stringify(this.cart),
+					goodsTotalNum: this.totalNum,
+					totalPrice: this.total,
+					extraInfo: this.remark,
+					expireTime: this.$dateTime.getExpireTime(),
+					userPhone: this.vuex_phone,
+					appId: this.$global.wxParams.APPID,
+				}
+				if (this.takeType == this.$global.takeType.dine_in) {
+					//店内堂食
+					params.seatNum = this.seatNum
+				}
+				if (this.takeType == this.$global.takeType.package) {
+					//到店自取,包装费
+					params.packingPrice = this.vuex_orderInfo.store.packingPrice
+
+					if (this.$isEmpty(this.takeTime)) {
+						this.$u.toast('请选择取餐时间')
+						return
+					}
+				}
+
+				if (this.takeType == this.$global.takeType.delivery) {
+					if (this.$isEmpty(this.address)) {
+						this.$u.toast('请选择配送地址')
+						return
+					}
+					//商家配送,包装费,配送费
+					params.packingPrice = this.vuex_orderInfo.store.packingPrice
+					params.sendingPrice = this.vuex_orderInfo.store.sendingPrice
+					params.userPhone = address.phone
+					params.receiver = address.consignee
+					params.addressDetail = this.address.provinceName + '-' + this.address.cityName + '-' + this.address
+						.areaName + ' ' + this.address.address
+				}
+				let res = await this.$api.goods.order(params)
+				this.payParams = res.data
+				this.successParams = this.payParams.successParams
+				if (this.successParams.status == '付款成功') {
+					this.handelResult(true)
+				} else if (this.successParams.status == '待付款') {
+					this.doWxPay(this.successParams.bills.id)
+				} else {
+					this.handelResult(false)
+				}
+			},
+			async doWxPay(orderId) {
+				let obj = {
+					orderType: this.$global.orderType.USER_PAY,
+					orderId,
+					payStatus: this.$global.payStatus.IS_WAIT
+				}
+				let res = await this.$api.pay.payOrder(obj)
+				let prePayTn = JSON.parse(res.data.prePayTn)
+				this.$mpi.requestPayment(prePayTn).then(() => {
+					this.handelResult(true)
+				}).catch(err => {
+					this.handelResult(false)
+				})
+			},
+			handelResult(flag) {
+				if (flag) {
+					this.payResult = {
+						isSuccess: true,
+						msg: "交易成功",
+						totalPrice: this.successParams.totalPrice,
+						amountNum: this.successParams.bills.price,
+						pointsNum: this.$digital.floatSub(this.successParams.totalPrice, this.successParams.bills
+							.price),
+					}
+				} else {
+					this.payResult.msg = '交易失败'
+					this.payResult.isSuccess = false
+				}
+				uni.navigateTo({
+					url: "/pagesC/pages/checkstand/pay-result?payResult=" + JSON.stringify(this.payResult)
+				})
+			},
+
+		}
+	};
 </script>
 
 <style lang="scss" scoped>
-	.content{
+	.content {
 		margin: 20rpx;
 	}
-	
-	.card{
+
+	.card {
 		padding: 30rpx;
 		background-color: #FFFFFF;
 		border-bottom: 1rpx solid #f1f1f1;
 		display: flex;
 		justify-content: space-between;
 	}
-	
-	.cart{
+
+	.cart {
 		border-bottom: 1rpx solid #f1f1f1;
 		display: flex;
 		background-color: #FFFFFF;
 		padding: 15rpx;
-		
-		image{
+
+		image {
 			width: 120rpx;
 			height: 120rpx;
 		}
-		
-		.item-content{
-			width: calc(100% - 120rpx  - 15rpx);
+
+		.item-content {
+			width: calc(100% - 120rpx - 15rpx);
 			display: flex;
 			flex-direction: column;
 			justify-content: space-between;
 			margin-left: 15rpx;
-			
-			text:first-child{
+
+			text:first-child {
 				font-size: 32rpx;
 				padding-top: 10rpx;
 			}
-			text:last-child{
+
+			text:last-child {
 				font-size: 26rpx;
 				color: #999;
 				font-weight: 400;
 				padding-bottom: 10rpx;
 			}
 		}
-		
-		.item-data{
+
+		.item-data {
 			display: flex;
 			align-items: center;
 			width: 30%;
 			justify-content: space-between;
 			margin-right: 20rpx;
-			
+
 		}
 	}
-	
-	.cart:last-child{
+
+	.cart:last-child {
 		border: none;
 	}
-	
-	.pay-bar{
+
+	.pay-bar {
 		height: 110rpx;
 		background-color: #FFFFFF;
 		display: flex;
 		justify-content: space-between;
 	}
-	
-	
+
+
 	.add-address-box {
 		min-height: 100rpx;
 		background: url('http://file.shopro.top/imgs/order/order_address_line.png') no-repeat;
 		background-size: 100% auto;
 		background-position: bottom center;
-	
+
 		.select-notice {
 			font-weight: 400;
 			color: rgba(153, 153, 153, 1);
 			line-height: 40rpx;
 		}
-	
+
 		.name,
 		.phone {
 			font-size: 30rpx;
 			font-weight: 500;
 		}
-	
+
 		.phone {
 			margin: 0 20rpx;
 		}
-	
+
 		.tag {
 			background: rgba(233, 191, 113, 0.2);
 			border-radius: 6rpx;
@@ -448,17 +456,17 @@ export default {
 			color: #a8700d;
 			font-size: 22rpx;
 		}
-	
+
 		.detail {
 			.address {
 				margin-top: 25rpx;
 				width: 543rpx;
 				font-size: 26rpx;
-	
+
 				font-weight: 400;
 				color: rgba(153, 153, 153, 1);
 				line-height: 40rpx;
 			}
 		}
 	}
-</style>
+</style>

+ 104 - 0
pagesD/pages/take-order/take-order.vue

@@ -0,0 +1,104 @@
+<template>
+	<view class="page">
+		<view class="card u-border-bottom">
+			<text>{{vuex_orderInfo.store.shopName}}</text>
+			<view class="">
+				<view class="cuIcon cu-btn sm btn-icon">
+					<u-icon name="phone-fill" color="#FF9447"></u-icon>
+				</view>
+				<view class="cuIcon cu-btn sm btn-icon margin-left-30">
+					<u-icon name="map-fill" color="#FF9447"></u-icon>
+				</view>
+			</view>
+		</view>
+		<view class="card" style="flex-direction: column;">
+			<view class="center text-bold margin-50" style="font-size: 56rpx;">
+				<text>2874</text>
+			</view>
+			<view class="cu-steps steps-arrow">
+				<view class="cu-item" :class="index>1?'text-default':'text-base'" v-for="(item,index) in stepList" :key="index">
+					<text style="font-size: 80rpx;margin-bottom: 20rpx;margin-right: 10rpx;" :class="'cuIcon-' + item.icon"></text>
+					<text >{{item.name}}</text>
+				</view>
+			</view>
+			
+<!-- 			<view class="step">
+				<view class="">
+					<image src="../../static/icon/step1.png" mode=""></image>
+					<view>待付款</view>
+				</view>
+				
+				<view class="">
+					<image src="../../static/icon/step1.png" mode=""></image>
+					<view>制作中</view>
+				</view>
+				
+				<view class="">
+					<image src="../../static/icon/step1.png" mode=""></image>
+					<view>已完成</view>
+				</view>
+			</view> -->
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: '',
+	data() {
+		return {
+			stepList:[{
+				name:'待付款',
+				icon:'pay'
+			},
+			{
+				name:'制作中',
+				icon:'time'
+			},
+			{
+				name:'已完成',
+				icon:'goods'
+			}]
+		};
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+	.cu-steps.steps-bottom .cu-item::before,
+	.cu-steps.steps-bottom .cu-item::after {
+		bottom: 20upx;
+		top: initial;
+	}
+	
+	.page{
+		margin: 20rpx;
+	}
+	
+	.text-default{
+		color: #FF9447;
+	}
+	
+	.btn-icon{
+		background-color: rgba(255, 148, 71,.3);
+		color: #FF9447;
+	}
+	
+	.step{
+		display: flex;
+		justify-content: space-around;
+		
+		image{
+			width: 88rpx;
+			height: 88rpx;
+		}
+	}
+	
+	.card {
+		padding: 30rpx;
+		background-color: #FFFFFF;
+		border-bottom: 1rpx solid #f1f1f1;
+		display: flex;
+		justify-content: space-between;
+	}
+</style>

BIN
pagesD/static/icon/step1.png