zhengjinyi 2 éve
szülő
commit
302baa7230

+ 0 - 14
pages.json

@@ -346,13 +346,6 @@
 						"navigationStyle": "custom"
 					}
 				},
-				{
-					"path": "order/order-payment",
-					"style": {
-						"navigationBarTitleText": "选择支付方式",
-						"navigationStyle": "custom"
-					}
-				},
 				{
 					"path": "order/order-payunder",
 					"style": {
@@ -372,13 +365,6 @@
 						"navigationStyle": "custom"
 					}
 				},
-				{
-					"path": "order/order-payhlb",
-					"style": {
-						"navigationBarTitleText": "收银台",
-						"navigationStyle": "custom"
-					}
-				},
 				{
 					"path": "order/orderShareLogin",
 					"style": {

+ 314 - 284
pages/login/components/basicOperationsProducts.vue

@@ -1,299 +1,329 @@
 <template>
-    <view class="basicoperation">
-        <slot name="supplier-title"></slot>
-        <view class="basicoperation_container">
-           <image class="defalut author-empty" :style="{'z-index': isOnline ? 0 : 13}" src="https://static.caimei365.com/app/img/supplier-login/basicoperation/author-empty.png" mode="aspectFill"></image>
-           <image class="defalut store-empty" :style="{'z-index': isOnline ? 12 : 0}" src="https://static.caimei365.com/app/img/supplier-login/basicoperation/store-empty.png" mode="aspectFill"></image>
-           <view class="operation_store" v-if="isOnline">
-               <view class="online_store">
-                   <view class="store-logo">
-                       <image src="https://static.caimei365.com/app/img/supplier-login/basicoperation/store.png" class="store" mode=""></image>
-                   </view>
-                   <view class="store-title">
-                       在线商城
-                   </view>
-               </view>
-               <view class="store-line-title">
-                   <image src="https://static.caimei365.com/app/img/supplier-login/basicoperation/title.png" style="width: 100%;height: 100%;" mode=""></image>
-               </view>
-               <view class="store-content">
-                   <view class="content-item" v-for="item in online_store_list" :key="item.id">
-                       <image :src="item.img" mode="" style="width: 80rpx;height: 50rpx;"></image>
-                       <view class="store-content-title">
-                           {{item.title}}
-                       </view>
-                       <view class="store-content-text">
-                           {{item.content}}
-                       </view>
-                   </view>
-               </view>
-               <view class="author" @click="isOnline = false">
-                   <view class="author-title">
-                       正品认证通
-                   </view>
-                   <image style="width: 50rpx;height: 54rpx;"  src="https://static.caimei365.com/app/img/supplier-login/basicoperation/author.png" mode=""></image>
-               </view>
-           </view>
-           <view class="operation-author" v-else>
-               <view class="author">
-                   <view class="author-logo">
-                       <image style="width: 66rpx;
-height: 68rpx;" src="https://static.caimei365.com/app/img/supplier-login/basicoperation/author.png" mode=""></image>
-                   </view>
-                   <view class="author-title">
-                       正品认证通
-                   </view>
-               </view>
-               <view class="author-title-logo">
-                   <image src="https://static.caimei365.com/app/img/supplier-login/basicoperation/logo.png" style="width: 100%;height: 100%;" mode=""></image>
-               </view>
-               <view class="author-content-item">
-                   <image src="https://static.caimei365.com/app/img/supplier-login/basicoperation/02.png" style="width: 50rpx;height: 50rpx;border-radius: 50%;" mode=""></image>
-                    <view class="author-content-title">易装易用免维护</view>
-                    <view class="author-content-split"></view>
-                    <view class="author-content-text">独立后台账号体系、会打字就会用、公众号无缝衔接</view>
-               </view>
-               <view class="author-content-item">
-                   <image src="https://static.caimei365.com/app/img/supplier-login/basicoperation/03.png" style="width: 50rpx;height: 50rpx;border-radius: 50%;" mode=""></image>
-                    <view class="author-content-title">授权认证功能</view>
-                    <view class="author-content-split"></view>
-                    <view class="author-content-text">机构认证查询、设备认证查询、医师认证查询</view>
-               </view>
-               <view class="author-content-item">
-                   <image src="https://static.caimei365.com/app/img/supplier-login/basicoperation/04.png" style="width: 50rpx;height: 50rpx;border-radius: 50%;" mode=""></image>
-                    <view class="author-content-title">品牌运营</view>
-                    <view class="author-content-split"></view>
-                    <view class="author-content-text">与机构客户建立双向沟通渠道</view>
-               </view>
-               <view class="online-store" @click="isOnline = true">
-                   <image src="https://static.caimei365.com/app/img/supplier-login/basicoperation/store.png" style="width: 72rpx;height: 68rpx;" mode=""></image>
-                   <view class="online-store-logo">
-                       在线商城
-                   </view>
-               </view>
-           </view>
-        </view>
-    </view>
+	<view class="basicoperation">
+		<slot name="supplier-title"></slot>
+		<view class="basicoperation_container">
+			<image
+				class="defalut author-empty"
+				:style="{ 'z-index': isOnline ? 0 : 13 }"
+				src="https://static.caimei365.com/app/img/supplier-login/basicoperation/author-empty.png"
+				mode="aspectFill"
+			></image>
+			<image
+				class="defalut store-empty"
+				:style="{ 'z-index': isOnline ? 12 : 0 }"
+				src="https://static.caimei365.com/app/img/supplier-login/basicoperation/store-empty.png"
+				mode="aspectFill"
+			></image>
+			<view class="operation_store" v-if="isOnline">
+				<view class="online_store">
+					<view class="store-logo">
+						<image
+							src="https://static.caimei365.com/app/img/supplier-login/basicoperation/store.png"
+							class="store"
+							mode=""
+						></image>
+					</view>
+					<view class="store-title"> 在线商城 </view>
+				</view>
+				<view class="store-line-title">
+					<image
+						src="https://static.caimei365.com/app/img/supplier-login/basicoperation/title.png"
+						style="width: 100%;height: 100%;"
+						mode=""
+					></image>
+				</view>
+				<view class="store-content">
+					<view class="content-item" v-for="item in online_store_list" :key="item.id">
+						<image :src="item.img" mode="" style="width: 80rpx;height: 50rpx;"></image>
+						<view class="store-content-title"> {{ item.title }} </view>
+						<view class="store-content-text"> {{ item.content }} </view>
+					</view>
+				</view>
+				<view class="author" @click="isOnline = false">
+					<view class="author-title"> 正品认证通 </view>
+					<image
+						style="width: 50rpx;height: 54rpx;"
+						src="https://static.caimei365.com/app/img/supplier-login/basicoperation/author.png"
+						mode=""
+					></image>
+				</view>
+			</view>
+			<view class="operation-author" v-else>
+				<view class="author">
+					<view class="author-logo">
+						<image
+							style="width: 66rpx;
+height: 68rpx;"
+							src="https://static.caimei365.com/app/img/supplier-login/basicoperation/author.png"
+							mode=""
+						></image>
+					</view>
+					<view class="author-title"> 正品认证通 </view>
+				</view>
+				<view class="author-title-logo">
+					<image
+						src="https://static.caimei365.com/app/img/supplier-login/basicoperation/logo.png"
+						style="width: 100%;height: 100%;"
+						mode=""
+					></image>
+				</view>
+				<view class="author-content-item">
+					<image
+						src="https://static.caimei365.com/app/img/supplier-login/basicoperation/02.png"
+						style="width: 50rpx;height: 50rpx;border-radius: 50%;"
+						mode=""
+					></image>
+					<view class="author-content-title">易装易用免维护</view> <view class="author-content-split"></view>
+					<view class="author-content-text">独立后台账号体系、会打字就会用、公众号无缝衔接</view>
+				</view>
+				<view class="author-content-item">
+					<image
+						src="https://static.caimei365.com/app/img/supplier-login/basicoperation/03.png"
+						style="width: 50rpx;height: 50rpx;border-radius: 50%;"
+						mode=""
+					></image>
+					<view class="author-content-title">授权认证功能</view> <view class="author-content-split"></view>
+					<view class="author-content-text">机构认证查询、设备认证查询、医师认证查询</view>
+				</view>
+				<view class="author-content-item">
+					<image
+						src="https://static.caimei365.com/app/img/supplier-login/basicoperation/04.png"
+						style="width: 50rpx;height: 50rpx;border-radius: 50%;"
+						mode=""
+					></image>
+					<view class="author-content-title">品牌运营</view> <view class="author-content-split"></view>
+					<view class="author-content-text">与机构客户建立双向沟通渠道</view>
+				</view>
+				<view class="online-store" @click="isOnline = true">
+					<image
+						src="https://static.caimei365.com/app/img/supplier-login/basicoperation/store.png"
+						style="width: 72rpx;height: 68rpx;"
+						mode=""
+					></image>
+					<view class="online-store-logo"> 在线商城 </view>
+				</view>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
 export default {
-    data() {
-        return {
-            isOnline: true,
-            online_store_list: [
-                {
-                    id: 1,
-                    img: 'https://static.caimei365.com/app/img/supplier-login/basicoperation/p.png',
-                    title: '品牌店铺搭建',
-                    content: '轻松开启线上交易'
-                },
-                {
-                    id: 2,
-                    img: 'https://static.caimei365.com/app/img/supplier-login/basicoperation/l.png',
-                    title: '品牌展露',
-                    content: '彰显品牌实力'
-                },
-                {
-                    id: 3,
-                    img: 'https://static.caimei365.com/app/img/supplier-login/basicoperation/s.png',
-                    title: '商品SKU管理',
-                    content: '提高决策效率'
-                }
-            ]
-        }
-    },
-    methods: {
-    }
+	data() {
+		return {
+			isOnline: true,
+			online_store_list: [
+				{
+					id: 1,
+					img: 'https://static.caimei365.com/app/img/supplier-login/basicoperation/p.png',
+					title: '品牌店铺搭建',
+					content: '轻松开启线上交易'
+				},
+				{
+					id: 2,
+					img: 'https://static.caimei365.com/app/img/supplier-login/basicoperation/l.png',
+					title: '品牌展露',
+					content: '彰显品牌实力'
+				},
+				{
+					id: 3,
+					img: 'https://static.caimei365.com/app/img/supplier-login/basicoperation/s.png',
+					title: '商品SKU管理',
+					content: '提高决策效率'
+				}
+			]
+		}
+	},
+	methods: {}
 }
 </script>
 
 <style scoped lang="scss">
 .defalut {
-    width: 610rpx;
-    height: 570rpx;
-    position: absolute;
-    box-sizing: border-box;
+	width: 610rpx;
+	height: 570rpx;
+	position: absolute;
+	box-sizing: border-box;
 }
 .store {
-    width: 80rpx;
-    height: 70rpx;
+	width: 80rpx;
+	height: 70rpx;
 }
 .basicoperation {
-    padding: 1px;
-    box-sizing: border-box;
-    background-color: #fff;
-    .basicoperation_container {
-        height: 690rpx;
-        padding: 0 70rpx;
-        box-sizing: border-box;
-        position: relative;
-        .operation_store {
-            position: absolute;
-            box-sizing: border-box;
-            padding: 36rpx 43rpx;
-            width: 610rpx;
-            height: 570rpx;
-            z-index: 12;
-            .online_store {
-                width: 300rpx;
-                height: 95rpx;
-                border-bottom: 1px solid #FFCEAF;
-                display: flex;
-                align-items: center;
-                .store-logo {
-                    width: 72rpx;
-                    height: 100%;
-                    border-bottom: 2px solid #FFC39A;
-                }
-                .store-title {
-                    color: #333333;
-                    font-size: 40rpx;
-                    font-weight: bold;
-                    margin-left: 21rpx;
-                    margin-top: -25rpx;
-                }
-            }
-            .store-line-title {
-                width: 100%;
-                height: 90rpx;
-                margin: 50rpx 0 33rpx 0;
-            }
-            .store-content {
-                width: 100%;
-                height: 216rpx;
-                display: flex;
-                justify-content: space-between;
-                .content-item {
-                    width: 172rpx;
-                    height: 216rpx;
-                    background: #FDF0E9;
-                    border: 4rpx solid #FFFFFF;
-                    box-shadow: 0rpx 6rpx 50rpx 0rpx rgba(255,91,0,0.24);
-                    border-radius: 10rpx;
-                    box-sizing: border-box;
-                    display: flex;
-                    flex-direction: column;
-                    align-items: center;
-                    justify-content: center;
-                    .store-content-title {
-                        color: #333333;
-                        font-size: 24rpx;
-                        font-weight: bold;
-                        margin: 30rpx 0 13rpx 0;
-                    }
-                    .store-content-text {
-                        color: #666666;
-                        font-size: 19rpx;
-                        text-align: center;
-                    }
-                }
-            }
-            .author {
-                position: absolute;
-                right: 0;
-                top: 0;
-                width: 242rpx;
-                height: 80rpx;
-                box-sizing: border-box;
-                display: flex;
-                align-items: center;
-                .author-title {
-                    font-size: 32rpx;
-                    font-weight: bold;
-                    color: white;
-                    margin-right: 14rpx;
-                }
-            }
-        }
-        .operation-author {
-            position: absolute;
-            box-sizing: border-box;
-            padding: 36rpx 36rpx;
-            width: 610rpx;
-            height: 570rpx;
-            z-index: 13;
-            .author {
-                position: absolute;
-                right: 30rpx;
-                width: 275rpx;
-                height: 110rpx;
-                top: 12rpx;
-                border-bottom: 1px solid #FFCEAF;
-                display: flex;
-                align-items: center;
-                flex-direction: row-reverse;
-                .author-logo {
-                    width: 72rpx;
-                    height: 100%;
-                    box-sizing: border-box;
-                    border-bottom: 2px solid #FFC39A;
-                    padding-top: 17rpx;
-                }
-                .author-title {
-                    color: white;
-                    font-size: 40rpx;
-                    font-weight: bold;
-                }
-            }
-            .author-title-logo {
-                width: 100%;
-                height: 120rpx;
-                margin-top: 130rpx;
-            }
-            .author-content-item {
-                width: 100%;
-                height: 70rpx;
-                border-radius: 70rpx;
-                border: 1px solid #FFC39A;
-                box-sizing: border-box;
-                padding: 2rpx;
-                display: flex;
-                align-items: center;
-                margin-top: 18rpx;
-                view {
-                    height: 100%;
-                    color: #FFC39A;
-                    font-size: 20rpx;
-                }
-                .author-content-title {
-                    font-size: 24rpx;
-                    font-weight: bold;
-                    display: flex;
-                    justify-content: center;
-                    align-items: center;
-                    margin: 0 10rpx;
-                }
-                .author-content-split {
-                    width: 2rpx;
-                    height: 50%;
-                    background-color: #FFC39A;
-                    margin-right: 10rpx;
-                }
-                .author-content-text {
-                    width: 278rpx;
-                    display: flex;
-                    align-items: center;
-                }
-            }
-            .online-store {
-                position: absolute;
-                top: 0;
-                left: 0;
-                width: 250rpx;
-                height: 100rpx;
-                display: flex;
-                align-items: center;
-                box-sizing: border-box;
-                padding: 36rpx 0 36rpx 14rpx;
-                .online-store-logo {
-                    font-size: 32rpx;
-                    font-weight: bold;
-                    color: black;
-                    margin-left: 14rpx;
-                }
-            }
-        }
-    }
+	padding: 1px;
+	box-sizing: border-box;
+	background-color: #fff;
+	.basicoperation_container {
+		height: 690rpx;
+		padding: 0 70rpx;
+		box-sizing: border-box;
+		position: relative;
+		.operation_store {
+			position: absolute;
+			box-sizing: border-box;
+			padding: 36rpx 43rpx;
+			width: 610rpx;
+			height: 570rpx;
+			z-index: 12;
+			.online_store {
+				width: 300rpx;
+				height: 95rpx;
+				border-bottom: 1px solid #ffceaf;
+				display: flex;
+				align-items: center;
+				.store-logo {
+					width: 72rpx;
+					height: 100%;
+					border-bottom: 2px solid #ffc39a;
+				}
+				.store-title {
+					color: #333333;
+					font-size: 40rpx;
+					font-weight: bold;
+					margin-left: 21rpx;
+					margin-top: -25rpx;
+				}
+			}
+			.store-line-title {
+				width: 100%;
+				height: 90rpx;
+				margin: 50rpx 0 33rpx 0;
+			}
+			.store-content {
+				width: 100%;
+				height: 216rpx;
+				display: flex;
+				justify-content: space-between;
+				.content-item {
+					width: 172rpx;
+					height: 216rpx;
+					background: #fdf0e9;
+					border: 4rpx solid #ffffff;
+					box-shadow: 0rpx 6rpx 50rpx 0rpx rgba(255, 91, 0, 0.24);
+					border-radius: 10rpx;
+					box-sizing: border-box;
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					justify-content: center;
+					.store-content-title {
+						color: #333333;
+						font-size: 24rpx;
+						font-weight: bold;
+						margin: 30rpx 0 13rpx 0;
+					}
+					.store-content-text {
+						color: #666666;
+						font-size: 19rpx;
+						text-align: center;
+					}
+				}
+			}
+			.author {
+				position: absolute;
+				right: 0;
+				top: 0;
+				width: 242rpx;
+				height: 80rpx;
+				box-sizing: border-box;
+				display: flex;
+				align-items: center;
+				.author-title {
+					font-size: 32rpx;
+					font-weight: bold;
+					color: white;
+					margin-right: 14rpx;
+				}
+			}
+		}
+		.operation-author {
+			position: absolute;
+			box-sizing: border-box;
+			padding: 36rpx 36rpx;
+			width: 610rpx;
+			height: 570rpx;
+			z-index: 13;
+			.author {
+				position: absolute;
+				right: 30rpx;
+				width: 275rpx;
+				height: 110rpx;
+				top: 12rpx;
+				border-bottom: 1px solid #ffceaf;
+				display: flex;
+				align-items: center;
+				flex-direction: row-reverse;
+				.author-logo {
+					width: 72rpx;
+					height: 100%;
+					box-sizing: border-box;
+					border-bottom: 2px solid #ffc39a;
+					padding-top: 17rpx;
+				}
+				.author-title {
+					color: white;
+					font-size: 40rpx;
+					font-weight: bold;
+				}
+			}
+			.author-title-logo {
+				width: 100%;
+				height: 120rpx;
+				margin-top: 130rpx;
+			}
+			.author-content-item {
+				width: 100%;
+				height: 70rpx;
+				border-radius: 70rpx;
+				border: 1px solid #ffc39a;
+				box-sizing: border-box;
+				padding: 2rpx;
+				display: flex;
+				align-items: center;
+				margin-top: 18rpx;
+				view {
+					height: 100%;
+					color: #ffc39a;
+					font-size: 20rpx;
+				}
+				.author-content-title {
+					font-size: 24rpx;
+					font-weight: bold;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					margin: 0 10rpx;
+				}
+				.author-content-split {
+					width: 2rpx;
+					height: 50%;
+					background-color: #ffc39a;
+					margin-right: 10rpx;
+				}
+				.author-content-text {
+					width: 278rpx;
+					display: flex;
+					align-items: center;
+				}
+			}
+			.online-store {
+				position: absolute;
+				top: 0;
+				left: 0;
+				width: 250rpx;
+				height: 100rpx;
+				display: flex;
+				align-items: center;
+				box-sizing: border-box;
+				padding: 36rpx 0 36rpx 14rpx;
+				.online-store-logo {
+					font-size: 32rpx;
+					font-weight: bold;
+					color: black;
+					margin-left: 14rpx;
+				}
+			}
+		}
+	}
 }
-</style>
+</style>

+ 2 - 2
pages/user/order/components/cm-address-temp.vue

@@ -59,8 +59,8 @@
 			}
 		},
 		methods:{
-			initData(res) {
-				if(Object.keys(res).length == 0){
+			initData(data) {
+				if(Object.keys(data).length == 0){
 					this.isEmpty = true
 					this.addressSrc = '/pages/user/address/addressManage'
 				}else{

+ 1 - 0
pages/user/order/components/cm-details-button.vue

@@ -5,6 +5,7 @@
 			<view class="btn btn-payment" v-if="order.affirmPaymentFlag == 10" @click.stop="btnConfirm('payment',order)">确认打款<text>供应商</text></view>
 			<view class="btn btn-confirm" v-if="btnState.isConfirmation" @click.stop="btnConfirm('confirmation',order)">确认订单</view>
 			<view class="btn btn-pay" v-if="btnState.isPay" @click.stop="btnConfirm('pay',order)">付款</view>
+			<view class="btn btn-cancel" v-if="order.checkFlag === 1" @click.stop="btnConfirm('upload',order)">上传凭证</view>
 			<view class="btn btn-share" @click.stop="onShareCode">
 				<view class="tips" v-if="shareCode">分享码:{{shareCode}}</view>
 				分享订单

+ 319 - 258
pages/user/order/components/cm-freight-popup.vue

@@ -1,292 +1,353 @@
 <template name="freight">
-	<view class="freight-template" @click.stop="discard">
-		 <!-- 运费信息 -->
-		<view class="invoice-freight">
+<!-- 运费信息 -->
+<view>
+	<view class="goods-pros-m">
+		<template v-if="supplier.postageFlag === 0">
 			<view class="freight-main">
-				<view class="freight-left">运费<text class="tips" v-if="freightData.postageFlag == 1 && vipFlag!=1">运费可选择到付哟~</text></view>
-				<view class="freight-right" >
-					<view class="freight-text">{{freightText}}</view>
-					<view class="select" v-if="freightData.postageFlag == 1"  @click.stop="selectFreight">
-						<text class="select-text">{{orderPriceToFixed(freightMoney)}}</text>
-						<text class="iconfont icon-xiayibu"></text>
-					</view>
+				<view class="freight-left">运费</view>
+				<view class="freight-right"> <view class="freight-text">包邮</view> </view>
+			</view>
+		</template>
+		<template v-if="supplier.postageFlag === 1">
+			<view class="freight-main">
+				<view class="freight-left">运费</view>
+				<view class="freight-right" @click.stop="handlePupShow">
+					<view class="freight-text" v-if="handlePostageFlag === 1">¥{{ handleTotalPostage | NumFormat }}</view>
+					<view class="freight-text" v-if="handlePostageFlag === 2">到付</view>
+					<view class="select"><text class="iconfont icon-xiayibu"></text></view>
 				</view>
 			</view>
-			<view class="freight-bean" v-if="isBeansShow">
-				<view class="bean-le" v-if="postageFlag == 1">可用{{ deductionBeans }}采美豆抵用{{ freightMoney }}元运费</view>
-				<view class="bean-le" v-if="postageFlag == -1">可用{{ deductionBeans }}采美豆抵用{{ freightMoney }}运费</view>
-				<view class="bean-ri">
-					<view class="checkbox-box">
-						<button class="checkbox iconfont"
-								hover-class="btn-hover"
-								@click.stop="checkedBalabce"
-								:class="[ischecked ?'icon-yixuanze':'icon-weixuanze']"
-						>
-						</button>
+		</template>
+		<template v-if="supplier.postageFlag === 2">
+			<view class="freight-main">
+				<view class="freight-left">运费</view>
+				<view class="freight-right"> <view class="freight-text">到付</view> </view>
+			</view>
+		</template>
+		<tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup">
+			<view class="freight-title">运费设置</view>
+			<view class="freight-content">
+				<radio-group @change="radioChange">
+					<label v-for="(item, index) in radioItems" :key="index">
+						<radio
+							style="transform:scale(0.7)"
+							color="#FF5B00"
+							:id="item.value"
+							:value="item.value"
+							:checked="item.checked"
+						></radio>
+						<label :for="item.value" class="label">
+							<text>{{ item.name }}</text>
+						</label>
+					</label>
+				</radio-group>
+				<template v-if="handlePostageFlag === 1">
+					<view class="freight-form">
+						<view class="freight-form-item" v-if="handleSupplier.coldChain > 0">
+							<view class="label">冷链运输费</view>
+							<view class="texts">
+								<text>¥{{ handleSupplier.coldChain | NumFormat }}</text>
+								<text 
+									class="iconfont" 
+									:class="[isColdChina ? 'icon-yixuanze' : 'icon-weixuanze']"
+									@click.stop="handleChangeColdChina"
+								>
+								</text>
+							</view>
+						</view>
+						<view class="freight-form-item"> 
+							<view class="label">其他运费 </view> 
+							<view class="texts">¥{{ handleSupplier.postage | NumFormat }} </view> 
+						</view>
+						<view class="freight-form-item">
+							<view class="label">总运费 </view> 
+							<view class="texts red">¥{{ handleTotalPostage  | NumFormat }} </view>
+						</view>
 					</view>
-				</view>
+				</template>
+				<template v-if="handlePostageFlag === 2">
+					<view class="freight-form">
+						<view class="freight-form-item">
+							<view class="label">总运费</view> 
+							<view class="texts red">到付</view>
+						</view>
+					</view>
+				</template>
+				<view class="freight-btn" @click="popupShow = false"> 确定 </view>
 			</view>
-		</view>
+		</tui-bottom-popup>
 	</view>
+</view>
 </template>
 
 <script>
-	export default{
-		name:'freight',
-		props:{
-			freightData:{
-				type:Object
-			}
+export default {
+	name: 'freight',
+	props: {
+		supplier: {
+			type: Object
 		},
-		data() {
-			return{
-				infoData:{},
-				freightText:'',
-				freightMoney:'',
-				isShowOption:false,
-				optionList:['到付'],
-				postageFlag:0,
-				ischecked:false,
-				isBeansShow:false,
-				userBeans:0,
-				deductionBeans:0,
-				freightBeansMoney:0,
-				vipFlag:0
+		index:{
+			type:Number
+		}
+	},
+	data() {
+		return {
+			popupShow: false,
+			isColdChina:false,
+			handlePostageFlag:1,
+			radioItems: [
+			 {
+					name: '不包邮',
+					value: 1,
+					checked: true
+				},
+				{
+					name: '到付',
+					value: 2,
+				}
+			],
+			handleSupplier:{}
+		}
+	},
+	filters: {
+		NumFormat(value) {
+			//处理金额
+			return Number(value).toFixed(2)
+		}
+	},
+	created() {
+		this.infoSupplier(this.supplier)
+	},
+	computed: {
+		// 计算总运费
+		handleTotalPostage(){
+			if(this.handleSupplier.isColdChina){
+				return (this.handleSupplier.postage*100 + this.handleSupplier.coldChain*100)/100
+			}else{
+				return this.handleSupplier.postage
 			}
+		}
+	},
+	watch: {
+		supplier: {
+			handler: function(el) {
+				//监听对象的变换使用 function,箭头函数容易出现this指向不正确
+				this.supplier = el
+			},
+			deep: true
+		}
+	},
+	methods: {
+		// 初始化
+		infoSupplier(data){
+			this.handleSupplier = data
+			this.isColdChina  = data.isColdChina
+			this.handlePostageFlag  = data.handlePostageFlag
 		},
-		created(){
-			this.initData(this.freightData)
+		// 勾选冷链费
+		handleChangeColdChina(){
+			this.isColdChina = !this.isColdChina
+			this.handleSupplier.isColdChina = this.isColdChina
+			if(this.isColdChina){
+				this.handleSupplier.totalPrice = Number((this.handleSupplier.totalPrice*100 + this.handleSupplier.coldChain*100)/100)
+				this.$emit('changeColdChina', this.handleSupplier,this.index)
+			}else{
+				this.handleSupplier.totalPrice = Number(this.repiceNumSub(this.handleSupplier.totalPrice,this.handleSupplier.coldChain))
+				this.$emit('changeColdChina', this.handleSupplier,this.index)
+			}
 		},
-		computed: {
-
+		// 切换运费类型 1 不包邮 2 到付
+		radioChange($event) {
+			const postage = this.isColdChina ? ( this.handleSupplier.postage + this.handleSupplier.coldChain ) : this.handleSupplier.postage 
+			this.handlePostageFlag = this.handleSupplier.handlePostageFlag = $event.detail.value*1
+			if(this.handlePostageFlag === 1){
+				this.handleSupplier.totalPrice = Number((this.handleSupplier.totalPrice*100 + postage*100)/100)
+				this.$emit('changePostage', this.handleSupplier,this.index)
+			}else{
+				this.handleSupplier.totalPrice = Number(this.repiceNumSub(this.handleSupplier.totalPrice,postage))
+				this.$emit('changePostage', this.handleSupplier,this.index)
+			}
 		},
-		methods:{
-			async initData(res) {
-				const userInfo = await this.$api.getStorage()
-				this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
-				this.infoData = res
-				switch(res.postageFlag){
-					case 0:
-						this.freightText = '包邮'
-						this.freightData.freight  = 0
-						this.postageFlag = res.postageFlag
-						this.isBeansShow = false
-						break
-					case 1:
-						this.freightText = ''
-						this.freightMoney = this.freightBeansMoney =  res.postage
-						this.userBeans = res.userBeans
-						this.postageFlag = res.postageFlag
-						this.optionList.unshift(this.orderPriceToFixed(this.freightMoney))
-						if( res.userBeans > 0 ){
-							this.isBeansShow = true
-						}else{
-							this.isBeansShow = false
-						}
-						if(res.userBeans >= this.freightBeansMoney*100){
-							this.deductionBeans = this.freightBeansMoney*100
-						}else{
-							this.deductionBeans = res.userBeans
-						}
-						break
-					case -1:
-						this.freightText = '到付'
-						this.freightMoney = '到付'
-						this.userBeans = res.userBeans
-						this.postageFlag = res.postageFlag
-						this.freightData.freight  = 0
-						this.freightBeansMoney = 30
-						if( res.userBeans >0 ){
-							this.isBeansShow = true
-						}else{
-							this.isBeansShow = false
-						}
-						if(res.userBeans >= this.freightBeansMoney*100){
-							this.deductionBeans = this.freightBeansMoney*100
-						}else{
-							this.deductionBeans = res.userBeans
-						}
-						break
-				}
-			},
-			selectFreight (){//切换运费
-				if(this.vipFlag==1){ return }
-				let self = this
-				uni.showActionSheet({
-				    itemList: self.optionList,
-				    success: function (res) {
-						switch(res.tapIndex){
-							case 0:
-								self.freightMoney = self.infoData.postage
-								self.postageFlag = 1
-								if( self.userBeans > 0 ){
-									self.isBeansShow = true
-									self.freightBeansMoney = self.freightMoney
-									if(self.userBeans >= self.freightBeansMoney*100){
-										self.deductionBeans = self.freightBeansMoney*100
-									}else{
-										self.deductionBeans = self.userBeans
-									}
-								}else{
-									self.isBeansShow = false
-									self.freightBeansMoney = 0
-								}
-								break
-							case 1:
-								self.postageFlag = -1
-								self.freightMoney = '到付'
-								if( self.userBeans > 0 ){
-									self.freightBeansMoney = 30
-									self.isBeansShow = true
-									if(self.userBeans >= self.freightBeansMoney*100){
-										self.deductionBeans = self.freightBeansMoney*100
-									}else{
-										self.deductionBeans = self.userBeans
-									}
-								}else{
-									self.freightBeansMoney = 0
-									self.isBeansShow = false
-								}
-								break
-						}
-						let obj = {
-								postageFlag :self.postageFlag,
-								freightBeansMoney: self.freightBeansMoney
-							}
-						self.$emit('confirmFreight',obj)
-				    },
-				    fail: function (res) {
-				        console.log(res.errMsg)
-				    }
-				})
-			},
-			checkedBalabce(){//勾选使用采美豆抵扣
-				this.ischecked = !this.ischecked
-				this.$emit('confirmFreightBeans',this.ischecked)
-			},
-			orderPriceToFixed (value){
-				let price =''
-				if(value == '到付'){
-					price = value
-				}else{
-					price ='¥'+parseInt(value).toFixed(2)
-				}
-				return price
-			},
-			discard(){
-				this.isShowOption = false
-				this.selectClass = ''
+		repiceNumSub(arg1, arg2) {//减法精确,arg2:被减数,arg1:减数
+			var r1,r2,m,n;
+			try{
+				r1=arg1.toString().split(".")[1].length
+			}catch(e){
+				r1=0
+			}
+			try{
+				r2=arg2.toString().split(".")[1].length
+			}catch(e){
+				r2=0
 			}
+			m=Math.pow(10,Math.max(r1,r2));
+			// last modify by deeka
+			// 动态控制精度长度
+			n=(r1>=r2)?r1:r2;
+			return ((arg1*m-arg2*m)/m).toFixed(n);
+		},
+		handlePupShow(){
+			this.popupShow = true
+		},
+		hidePopup() {
+			this.popupShow = false
 		}
 	}
+}
 </script>
 
 <style lang="scss">
-	.freight-template{
+.goods-pros-m {
+	width: 100%;
+	box-sizing: border-box;
+	padding: 10rpx 0;
+	.freight-main {
 		width: 100%;
-		height: auto;
-		background: #FFFFFF;
+		height: 78rpx;
+		line-height: 78rpx;
+		font-size: $font-size-28;
+		color: $text-color;
+		background: #ffffff;
 		float: left;
-		margin-top: 24rpx;
-		.invoice-freight{
-			width: 100%;
-			box-sizing: border-box;
-			padding: 10rpx 24rpx;
-			.freight-main{
-				width: 100%;
-				height: 78rpx;
-				line-height: 78rpx;
-				font-size: $font-size-28;
-				color: $text-color;
-				background: #FFFFFF;
+		.freight-left {
+			float: left;
+			font-weight: bold;
+		}
+		.freight-right {
+			float: right;
+			color: #333333;
+			position: relative;
+			.freight-text {
 				float: left;
-				font-weight: bold;
-				.freight-left{
+			}
+			.select {
+				float: right;
+				height: 60rpx;
+				padding: 0 20rpx;
+				margin-top: 14rpx;
+				line-height: 60rpx;
+				color: #333333;
+				font-weight: normal;
+				position: relative;
+				.select-text {
+					display: inline-block;
 					float: left;
-					.tips{
-						font-size: $font-size-24;
-						color: $color-system;
-						font-weight: normal;
-						margin-left: 20rpx;
-					}
-					.icon-yunfeishuoming{
-						height: 100%;
-						padding:15rpx;
-						color: $color-system;
-						font-weight: normal;
-					}
+					margin-right: 30rpx;
 				}
-				.freight-right{
-					float: right;
-					color: #2A81FF;
-					position: relative;
-					.freight-text{
-						float: left;
-					}
-					.select{
-						float: right;
-						height: 60rpx;
-						padding: 0 20rpx;
-						margin-top: 14rpx;
-						line-height: 60rpx;
-						color: #2A81FF;
-						font-weight: normal;
-						position: relative;
-						.select-text{
-							display: inline-block;
-							float: left;
-							margin-right: 30rpx;
-						}
-						.iconfont{
-							width: 60rpx;
-							height: 60rpx;
-							line-height: 60rpx;
-							text-align: right;
-							position: absolute;
-							right: 0;
-							top: 0;
-							font-size: $font-size-28;
-							color: #2A81FF;
-						}
-					}
+				.iconfont {
+					width: 60rpx;
+					height: 60rpx;
+					line-height: 60rpx;
+					text-align: right;
+					position: absolute;
+					right: 0;
+					top: 0;
+					font-size: $font-size-28;
+					color: #B2B2B2;
 				}
 			}
-			.freight-bean{
-				width: 100%;
-				height: 58rpx;
-				line-height: 58rpx;
+		}
+	}
+	.freight-bean {
+		width: 100%;
+		height: 58rpx;
+		line-height: 58rpx;
+		float: left;
+		.bean-le {
+			float: left;
+			color: #666666;
+			font-size: $font-size-26;
+			font-weight: normal;
+		}
+		.bean-ri {
+			float: right;
+			display: flex;
+			align-items: center;
+			.checkbox-box {
+				display: flex;
+				width: 60rpx;
 				float: left;
-				.bean-le{
-					float: left;
-					color: #666666;
-					font-size: $font-size-26;
-					font-weight: normal;
-				}
-				.bean-ri{
-					float: right;
-					display: flex;
-					align-items: center;
-					.checkbox-box{
-						display: flex;
-						width: 60rpx;
-						float: left;
-						height: 100%;
-						font-size: $font-size-26;
-						margin-top: 8rpx;
-						.checkbox{
-							width: 40rpx;
-							text-align: right;
-							box-sizing: border-box;
-							text-align: center;
-							text-decoration: none;
-							border-radius: 0;
-							-webkit-tap-highlight-color: transparent;
-							overflow: hidden;
-							color: $color-system;
-						}
-					}
+				height: 100%;
+				font-size: $font-size-26;
+				margin-top: 8rpx;
+				.checkbox {
+					width: 40rpx;
+					text-align: right;
+					box-sizing: border-box;
+					text-align: center;
+					text-decoration: none;
+					border-radius: 0;
+					-webkit-tap-highlight-color: transparent;
+					overflow: hidden;
+					color: $color-system;
 				}
 			}
 		}
 	}
+}
+.freight-title {
+    color: #333333;
+    font-size: 32rpx;
+    text-align: center;
+    margin: 40rpx 0;
+}
+.freight-content {
+    box-sizing: border-box;
+    padding: 0 24rpx;
+	font-weight: normal;
+    radio{
+        margin-right: 8rpx;
+    }
+    .label {
+        color: #666666;
+        font-size: 28rpx;
+        margin-right: 102rpx;
+    }
+    .freight-btn {
+        height: 90rpx;
+        background: $btn-confirm;
+        border-radius: 45rpx;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        color: #FFFFFF;
+        width: 100%;
+        margin: 100rpx 0 0 0;
+    }
+}
+.freight-form {
+    margin-top: 50rpx;
+    width: 100%;
+    .freight-form-item {
+        width: 100%;
+		height: 48rpx;
+		line-height: 48rpx;
+        margin-bottom: 24rpx;
+        color: #666666;
+        font-size: 28rpx;
+		.label{
+			width: 50%;
+			float: left;
+			margin-right: 0;
+		}
+		.texts{
+			width: 50%;
+			float: right;
+			text-align: right;
+			&.red{
+				color: #F94B4B;
+			}
+			.iconfont{
+				margin-left: 20rpx;
+				color: $color-system;
+			}
+		}
+    }
+}
+.freight-pay {
+    position: absolute;
+    right: -60%;
+    transform:scale(0.7);
+}
 </style>

+ 313 - 273
pages/user/order/components/cm-goods-temp.vue

@@ -1,39 +1,47 @@
 <template name="goods">
 	<view class="goods-template">
-		 <!-- 商品列表 -->
+		<!-- 商品列表 -->
 		<view class="goods-list">
-			<view v-for="(item, index) in goodsData" :key="index" class="goods-item">
+			<view v-for="(supplier, index) in goodsData" :key="index" class="goods-item">
 				<view class="shoptitle">
-					<view v-if="item.promotions" class="floor-item-act">
-						<view class="floor-tags">{{item.promotions.name}}</view>	
+					<view v-if="supplier.promotions" class="floor-item-act">
+						<view class="floor-tags">{{ supplier.promotions.name }}</view>
 					</view>
-					<view class="title-text">{{item.shopName}}</view> 
+					<view class="title-text">{{ supplier.shopName }}</view>
 				</view>
-				<view class="productlist" v-for="(pros,idx) in item.cartList" :key="idx">
+				<view class="productlist" v-for="(pros, idx) in supplier.cartList" :key="idx">
 					<view class="goods-pros-t">
 						<view class="pros-img">
 							<image :src="pros.image" alt="" />
-							<text class="tips" v-if="pros.giftType ==2 || pros.giftType ==1">赠品</text>
+							<text class="tips" v-if="pros.giftType == 2 || pros.giftType == 1">赠品</text>
 						</view>
 						<view class="pros-product">
-							<view class="producttitle">{{pros.name}}</view>
-							<view class="productspec"  v-if="pros.productCategory!=2">规格:{{pros.unit}}</view>
-							<view class="productspec" v-if="pros.productCode!=''&&pros.productCode!=null">
-								<view >商品编码:{{pros.productCode}}</view>
+							<view class="producttitle">{{ pros.name }}</view>
+							<view class="productspec" v-if="pros.productCategory != 2">规格:{{ pros.unit }}</view>
+							<view class="productspec" v-if="pros.productCode != '' && pros.productCode != null">
+								<view>商品编码:{{ pros.productCode }}</view>
 							</view>
 							<view class="productprice">
-								<view class="price"><text>¥{{pros.price | NumFormat}}</text></view>
-								<view class="count"><text class="small">x</text>{{pros.number}}</view>
+								<view class="price"
+									><text>¥{{ pros.price | NumFormat }}</text></view
+								>
+								<view class="count"><text class="small">x</text>{{ pros.number }}</view>
 							</view>
 							<view class="floor-item-act">
 								<template v-if="pros.actStatus == 1 && pros.promotions">
 									<view v-if="PromotionsFormat(pros.promotions)" class="floor-tags">
 										{{ pros.promotions.name }}
-										<text v-if ="pros.promotions">
-											:¥{{ pros.promotions == null ? '0.00' : pros.promotions.touchPrice | NumFormat}}
+										<text v-if="pros.promotions">
+											:¥{{
+												pros.promotions == null
+													? '0.00'
+													: pros.promotions.touchPrice | NumFormat
+											}}
 										</text>
 									</view>
-									<view v-else-if="pros.promotions.type !=3" class="floor-tags">{{pros.promotions.name}}</view>	
+									<view v-else-if="pros.promotions.type != 3" class="floor-tags">{{
+										pros.promotions.name
+									}}</view>
 								</template>
 								<template v-if="pros.svipProductFlag == 1 && vipFlag == 1">
 									<view class="svip-tags">
@@ -42,311 +50,343 @@
 									</view>
 								</template>
 							</view>
-						</view>	
+						</view>
 					</view>
-				</view>	
+				</view>
 				<view class="goods-pros-m">
 					<view class="m-text">留言:</view>
 					<view class="m-input">
-						<input type="text" 
-						   v-model="remark[index]" 
-						   @change="changeHandle(index)"
-						   placeholder-class="placeholder"  
-						   maxlength="50" 
-						   placeholder="选填,最多不超过50个汉字"/>
-						</view>
+						<input
+							type="text"
+							v-model="remark[index]"
+							@change="changeHandle(index)"
+							placeholder-class="placeholder"
+							maxlength="50"
+							placeholder="选填,最多不超过50个汉字"
+						/>
+					</view>
 				</view>
+				<!-- 运费 -->
+				<cm-freight-popup         
+					ref="freight"
+					:index.sync="index"
+					:supplier.sync="supplier"
+					@changePostage="changePostageFlag"
+					@changeColdChina="hanldChangeColdChina"
+				/>
 				<view class="goods-pros-b">
-					<view class="sum-none" v-if="(item.originalPrice - item.totalPrice)>0">
+					<view class="sum-none" v-if="supplier.originalPrice - supplier.totalPrice > 0">
 						<text class="money-sign">¥</text>
-						<text class="money">{{ item.originalPrice | NumFormat }}</text>
-						<text class="money-reduced">减<text>¥{{ (item.originalPrice - item.totalPrice) | NumFormat}}</text></text>
+						<text class="money">{{ supplier.originalPrice | NumFormat }}</text>
+						<text class="money-reduced"
+							>减<text>¥{{ (supplier.originalPrice - supplier.totalPrice) | NumFormat }}</text></text
+						>
 					</view>
-					<view class="sum">合计:<text class="money">¥{{ item.totalPrice | NumFormat }}</text></view>
+					<view class="sum"
+						>合计:<text class="money">¥{{ supplier.totalPrice | NumFormat }}</text></view
+					>
 				</view>
 			</view>
-		</view>	
+		</view>
 	</view>
 </template>
 
 <script>
-	export default{
-		name:'goods',
-		props:{
-			goodsData:{
-				type:Array
-			}
-		},
-		data() {
-			return{
-				remark:[],
-				vipFlag:0,
-			}
-		},
-		created(){
-			this.initGetStotage()
-		},
-		filters:{
-			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2)
+import cmFreightPopup from './cm-freight-popup'
+export default {
+	name: 'goods',
+	components: {
+		cmFreightPopup
+	},
+	props: {
+		goodsData: {
+			type: Array
+		}
+	},
+	data() {
+		return {
+			remark: [],
+			vipFlag: 0
+		}
+	},
+	created() {
+		this.initGetStotage()
+	},
+	filters: {
+		NumFormat(value) {
+			//处理金额
+			return Number(value).toFixed(2)
+		}
+	},
+	watch: {
+		goodsData: {
+			handler: function(el) {
+				//监听对象的变换使用 function,箭头函数容易出现this指向不正确
+				this.goodsData = el
 			},
-		},	
-		watch: {
-			goodsData: {
-				handler: function (el) {//监听对象的变换使用 function,箭头函数容易出现this指向不正确
-					this.goodsData = el
-				},
-				deep: true
-			}
+			deep: true
+		}
+	},
+	computed: {},
+	methods: {
+		async initGetStotage() {
+			const userInfo = await this.$api.getStorage()
+			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 		},
-		computed: {
-
+		// 勾选冷链费操作
+		hanldChangeColdChina(supplier,index){
+			this.goodsData[index] = supplier
+			this.$emit('handleGoodList', this.goodsData)
+			this.$emit('changeChina', supplier)
 		},
-		methods:{
-			async initGetStotage() {
-				const userInfo = await this.$api.getStorage()
-				this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
-			},
-			PromotionsFormat(promo){//促销活动类型数据处理
-				if(promo!=null){
-					if(promo.type == 1 && promo.mode == 1){
-						return true
-					}else{
-						return false
-					}
+		// 更换运费类型 1 不包邮  2 到付
+		changePostageFlag(supplier,index){
+			this.goodsData[index] = supplier
+			this.$emit('handleGoodList', this.goodsData)
+			this.$emit('changePostage', supplier)
+		},
+		PromotionsFormat(promo) {
+			//促销活动类型数据处理
+			if (promo != null) {
+				if (promo.type == 1 && promo.mode == 1) {
+					return true
+				} else {
+					return false
 				}
-				return false
-			},
-			changeHandle (index) {//输入框的值被改变后
-				this.goodsData[index].note = this.remark[index]
-				this.$emit('handleGoodList',this.goodsData)
 			}
+			return false
 		},
+		changeHandle(index) {
+			//输入框的值被改变后
+			this.goodsData[index].note = this.remark[index]
+			this.$emit('handleGoodList', this.goodsData)
+		}
 	}
+}
 </script>
 
 <style lang="scss">
-	.goods-template{
+.goods-template {
+	width: 100%;
+	height: auto;
+	background: #ffffff;
+	float: left;
+	margin-top: 24rpx;
+	.goods-list {
 		width: 100%;
 		height: auto;
-		background: #FFFFFF;
-		float: left;
-		margin-top: 24rpx;
-		.goods-list{
-			width: 100%;
-			height: auto;	
-			background:#F7F7F7;
-			.goods-item{
-				width: 702rpx;
-				padding: 0 24rpx;
-				background: #FFFFFF;
-				margin-bottom: 24rpx;
-				&:last-child{
-					margin-bottom: 0;
-				}
+		background: #f7f7f7;
+		.goods-item {
+			width: 702rpx;
+			padding: 0 24rpx;
+			background: #ffffff;
+			margin-bottom: 24rpx;
+			&:last-child {
+				margin-bottom: 0;
 			}
-			.shoptitle{
-				display: flex;
-				align-items: center;
-				height: 80rpx;
-				line-height: 80rpx;
-				.title-text{
-					width: 400rpx;
-					overflow: hidden;
-					text-overflow:ellipsis;
-					white-space: nowrap;
-					float: left;
-					font-size: $font-size-28;
-					color: $text-color;
-					text-align: left;
-					line-height: 56rpx;
-					font-weight: bold;
-				}
-				.floor-item-act{
-					height: 56rpx;
-					text-align: center;
-					box-sizing: border-box;
-					float: left;
-					padding: 12rpx 0;
-					margin-right: 12rpx;
-				}
+		}
+		.shoptitle {
+			display: flex;
+			align-items: center;
+			height: 80rpx;
+			line-height: 80rpx;
+			.title-text {
+				width: 400rpx;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				white-space: nowrap;
+				float: left;
+				font-size: $font-size-28;
+				color: $text-color;
+				text-align: left;
+				line-height: 56rpx;
+				font-weight: bold;
 			}
-			.productlist{
-				width: 100%;
-				height: auto;
-			}	
-			.goods-pros-t{
-				display: flex;
-				align-items: center;
-				width: 100%;
-				height: auto;
-				padding:12rpx 0;
-				.pros-img{
-					width: 210rpx;
-					height: 100%;
-					border-radius: 10rpx;
-					margin:0 26rpx 0 0;
-					position: relative;
-					.tips{
-						display: inline-block;
-						width: 80rpx;
-						height: 40rpx;
-						background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
-						line-height: 40rpx;
-						text-align: center;
-						font-size: $font-size-24;
-						color: #FFFFFF;
-						border-radius:10rpx 0 10rpx 0 ;
-						position: absolute;
-						top:0;
-						left: 0;
-					}
-					image{
-						width: 210rpx;
-						height: 210rpx;
-						border-radius: 10rpx;
-						border:1px solid #f3f3f3;
-					}
-				}
+			.floor-item-act {
+				height: 56rpx;
+				text-align: center;
+				box-sizing: border-box;
+				float: left;
+				padding: 12rpx 0;
+				margin-right: 12rpx;
 			}
-			.pros-product{
-				width: 468rpx;
+		}
+		.productlist {
+			width: 100%;
+			height: auto;
+		}
+		.goods-pros-t {
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: auto;
+			padding: 12rpx 0;
+			.pros-img {
+				width: 210rpx;
 				height: 100%;
-				line-height: 40rpx;
-				font-size: $font-size-26;	
+				border-radius: 10rpx;
+				margin: 0 26rpx 0 0;
 				position: relative;
-				.producttitle{
-					width: 100%;
+				.tips {
 					display: inline-block;
-					height: auto;							
-					text-overflow:ellipsis;
-					display: -webkit-box;
-					word-break: break-all;
-					-webkit-box-orient: vertical;
-					-webkit-line-clamp: 2;
-					overflow: hidden;
-					margin-bottom: 8rpx;
-				}
-				.productspec{
+					width: 80rpx;
 					height: 40rpx;
+					background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
 					line-height: 40rpx;
-					color: #999999;
-					text-overflow:ellipsis;
-					display: -webkit-box;
-					word-break: break-all;
-					-webkit-box-orient: vertical;
-					-webkit-line-clamp: 1;
-					overflow: hidden;
-				}
-				.productprice{
-					height: 54rpx;
-					width: 100%;
-					float: left;
-					.price{
-						line-height: 54rpx;
-						font-size: $font-size-28;
-						width: 48%;
-						color: #FF2A2A;
-						float: left;
-					}
-					.count{
-						height: 100%;
-						float: right;
-						position: relative;
-						.small{
-							color: #666666;
-						}
-					}
-				}
-				.floor-item-act{
-					width: 100%;
-					height: 56rpx;
 					text-align: center;
-					box-sizing: border-box;
-					float: left;
-					padding:0 0 10rpx 0;
+					font-size: $font-size-24;
+					color: #ffffff;
+					border-radius: 10rpx 0 10rpx 0;
+					position: absolute;
+					top: 0;
+					left: 0;
+				}
+				image {
+					width: 210rpx;
+					height: 210rpx;
+					border-radius: 10rpx;
+					border: 1px solid #f3f3f3;
 				}
 			}
-			.goods-pros-m{
-				height: 76rpx;
-				line-height: 76rpx;
-				font-size: $font-size-26;
-				color: $text-color;
-				margin-top: 12rpx;
-				.m-text{
-					width: 62rpx;
+		}
+		.pros-product {
+			width: 468rpx;
+			height: 100%;
+			line-height: 40rpx;
+			font-size: $font-size-26;
+			position: relative;
+			.producttitle {
+				width: 100%;
+				display: inline-block;
+				height: auto;
+				text-overflow: ellipsis;
+				display: -webkit-box;
+				word-break: break-all;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 2;
+				overflow: hidden;
+				margin-bottom: 8rpx;
+			}
+			.productspec {
+				height: 40rpx;
+				line-height: 40rpx;
+				color: #999999;
+				text-overflow: ellipsis;
+				display: -webkit-box;
+				word-break: break-all;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 1;
+				overflow: hidden;
+			}
+			.productprice {
+				height: 54rpx;
+				width: 100%;
+				float: left;
+				.price {
+					line-height: 54rpx;
+					font-size: $font-size-28;
+					width: 48%;
+					color: #ff2a2a;
 					float: left;
-					padding-right: 20rpx;
-					font-weight:bold;
 				}
-				.m-input{
-					display: -webkit-box;
-					display: -webkit-flex;
-					display: flex;
-					-webkit-box-align: center;
-					-webkit-align-items: center;
-					align-items: center;
+				.count {
+					height: 100%;
+					float: right;
 					position: relative;
-					width: 580rpx;
-					height: 36rpx;
-					padding: 20rpx;
-					background: #F7F7F7;
-					border-radius: 10rpx;
-					input{
-						width: 100%;
-						height: 100%;
-						background: #F7F7F7;
-						font-size: $font-size-26;
-						line-height: 36rpx;
-						color: #333333;
-						min-height: 36rpx;
+					.small {
+						color: #666666;
 					}
 				}
 			}
-			.goods-pros-b{
-				width:100%;
-				height: auto;
-				padding: 10rpx 0;
-				.sum-none{
-					width: 100%;
-					height: 48rpx;
-					line-height: 48rpx;
-					color: $text-color;
-					float: left;
-					text-align: right;
-					.money{
-						font-size: $font-size-26;
-						color: #999999;
-						text-decoration: line-through;
-					}
-					.money-sign{
-						font-size: $font-size-26;
-						color: #999999;
-						text-decoration: line-through;
-					}
-					.money-reduced{
-						margin-left: 10rpx;
-						font-size: $font-size-26;
-						color: $color-system;
-						.iconfont{
-							font-size: $font-size-34;
-						}
+			.floor-item-act {
+				width: 100%;
+				height: 56rpx;
+				text-align: center;
+				box-sizing: border-box;
+				float: left;
+				padding: 0 0 10rpx 0;
+			}
+		}
+		.goods-pros-b {
+			width: 100%;
+			height: auto;
+			padding: 10rpx 0;
+			.sum-none {
+				width: 100%;
+				height: 48rpx;
+				line-height: 48rpx;
+				color: $text-color;
+				float: left;
+				text-align: right;
+				.money {
+					font-size: $font-size-26;
+					color: #999999;
+					text-decoration: line-through;
+				}
+				.money-sign {
+					font-size: $font-size-26;
+					color: #999999;
+					text-decoration: line-through;
+				}
+				.money-reduced {
+					margin-left: 10rpx;
+					font-size: $font-size-26;
+					color: $color-system;
+					.iconfont {
+						font-size: $font-size-34;
 					}
 				}
-				.sum{
-					width: 100%;
-					height: 48rpx;
+			}
+			.sum {
+				width: 100%;
+				height: 48rpx;
+				font-size: $font-size-28;
+				line-height: 48rpx;
+				color: $text-color;
+				display: flex;
+				justify-content: flex-end;
+				.money {
+					color: #ff2a2a;
 					font-size: $font-size-28;
-					line-height: 48rpx;
-					color: $text-color;
-					display: flex;
-					justify-content: flex-end;
-					.money{
-						color: #FF2A2A;
-						font-size: $font-size-28;
-					}
 				}
 			}
+		}	
+	}
+}
+.goods-pros-m {
+	height: 76rpx;
+	line-height: 76rpx;
+	font-size: $font-size-26;
+	color: $text-color;
+	margin-top: 12rpx;
+	.m-text {
+		width: 62rpx;
+		float: left;
+		padding-right: 20rpx;
+		font-weight: bold;
+	}
+	.m-input {
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-align: center;
+		-webkit-align-items: center;
+		align-items: center;
+		position: relative;
+		width: 580rpx;
+		height: 36rpx;
+		padding: 20rpx;
+		background: #f7f7f7;
+		border-radius: 10rpx;
+		input {
+			width: 100%;
+			height: 100%;
+			background: #f7f7f7;
+			font-size: $font-size-26;
+			line-height: 36rpx;
+			color: #333333;
+			min-height: 36rpx;
 		}
 	}
+}
 </style>

+ 1 - 0
pages/user/order/components/cm-list-button.vue

@@ -4,6 +4,7 @@
 		<view class="button-content">
 			<view class="btn btn-payment" v-if="order.affirmPaymentFlag == 10" @click.stop="btnConfirm('payment',order)">确认打款<text>供应商</text></view>
 			<view class="btn btn-pay" v-if="btnState.isPay" @click.stop="btnConfirm('pay',order)">付款</view>
+			<view class="btn btn-cancel" v-if="order.checkFlag === 1" @click.stop="btnConfirm('upload',order)">上传凭证</view>
 			<view class="btn btn-confirm" v-if="btnState.isConfirmation" @click.stop="btnConfirm('confirmation',order)">确认订单</view>
 			<view class="btn btn-share"  @click.stop="onShareCode(order.orderId)">分享订单</view>
 			<view class="btn btn-cancel" v-if="btnState.isCancel" @click.stop="btnConfirm('cancel',order)">取消订单</view>

+ 4 - 4
pages/user/order/components/cm-orderpay-popup.vue

@@ -1,6 +1,6 @@
 <template name="sharealert">
 	<view class="alert spec" >
-		<view class="model-warp" @click.stop="hideConfirm">
+		<view class="model-warp-main" @click.stop="hideConfirm">
 			<view class="content" v-if="modelType == 1">
 				<view class="content-title"></view>
 				<view class="text-content clearfix">
@@ -75,13 +75,13 @@
 
 <style lang="scss">
 	/*弹窗*/
-	 .model-warp.none{
+	 .model-warp-main.none{
 		 display: none;
 	 }
-	 .model-warp.show{
+	 .model-warp-main.show{
 		 display: block;
 	 }
-	 .model-warp{
+	 .model-warp-main{
 		width: 100%;
 		height: 100%;
 		background: rgba(0,0,0,0.3);

+ 4 - 4
pages/user/order/components/cm-share-popup.vue

@@ -24,7 +24,7 @@
 	export default{
 		name:'sharealert',
 		props:{
-			orderId:{
+			shopOrderId:{
 				type:Number
 			}
 		},
@@ -34,11 +34,11 @@
 			}
 		},
 		created() {
-			this.getShareCode(this.orderId)
+			this.getShareCode(this.shopOrderId)
 		},
 		methods:{
-			getShareCode(res){
-				this.OrderService.QueryOrderShareCode({orderId:res}).then(response =>{
+			getShareCode(shopOrderId){
+				this.OrderService.QueryOrderShareCode({shopOrderId:shopOrderId}).then(response =>{
 					this.shareCode = response.data
 					this.$parent.shareCode = this.shareCode;
 				}).catch(error =>{

+ 2 - 3
pages/user/order/components/details/cm-address-temp.vue

@@ -21,8 +21,8 @@
 					</view>
 				</view>
 		 	</view>
+			<image class="a-bg"  :src="StaticUrl + '/icon/line@3x.png'" mode=""></image>
 		 </view>
-		<image  :src="StaticUrl + '/icon/line@3x.png'" mode=""></image>
 	</view>
 </template>
 
@@ -76,7 +76,6 @@
 		height: auto;
 		float: left;
 		position: relative;
-		
 		.address-empty{
 			width: 100%;
 			height: 84rpx;
@@ -169,7 +168,7 @@
 			bottom: 0;
 			display: block;
 			width: 100%;
-			height: 5rpx;
+			height: 24rpx;
 		}
 	}
 </style>

+ 68 - 67
pages/user/order/components/details/cm-goods-temp.vue

@@ -1,92 +1,92 @@
 <template name="goods">
 	<view class="goods-template">
 		<!-- 商品列表 -->
-		<view class="goods-list">
-			<view v-for="(item, index) in list" :key="index" class="goods-item clearfix">
+		<view class="goods-list clearfix">
+			<view v-for="(item, index) in dataList" :key="index" class="goods-item clearfix">
 				<view class="shoptitle">
 					<view v-if="item.shopPromotion" class="floor-item-act">
 						<view class="floor-tags" @click.stop="clickPopupShow(item.shopPromotion)">{{
 							item.shopPromotion.name
 						}}</view>
 					</view>
-					<view class="title-text" v-if="information.secondHandOrderFlag == 1"
+					<view class="title-text" v-if="orderInfo.secondHandOrderFlag == 1"
 						>{{ item.shopName }}
-						<label class="paymenttext" v-if="information.affirmPaymentFlag == 1">已确认打款供应商</label>
+						<label class="paymenttext" v-if="orderInfo.affirmPaymentFlag == 1">已确认打款供应商</label>
 					</view>
 					<view class="title-text" v-else @click="goShophome(item)">
 						{{ item.shopName }} <label class="iconfont icon-jinrudianpu"></label>
 					</view>
 				</view>
-				<view class="productlist" v-for="(pros, idx) in item.orderProductList" :key="idx">
-					<view class="goods-pros-t " @click="details(pros)">
+				<view class="productlist">
+					<view class="goods-pros-t " @click="details(item)">
 						<view class="pros-left">
 							<view class="pros-img">
-								<image :src="pros.image" alt="" />
-								<text class="tips" v-if="pros.giftType == 2 || pros.giftType == 1">赠品</text>
+								<image :src="item.image" alt="" />
+								<text class="tips" v-if="item.giftType == 2 || item.giftType == 1">赠品</text>
 							</view>
 						</view>
 						<view class="pros-product">
-							<view class="producttitle">{{ pros.name }}</view>
-							<view class="productspec product-view" v-if="pros.productCategory != 2"
-								>规格:{{ pros.productUnit ? pros.productUnit : '' }}</view
+							<view class="producttitle">{{ item.name }}</view>
+							<view class="productspec product-view" v-if="item.productCategory != 2"
+								>规格:{{ item.productUnit ? item.productUnit : '' }}</view
 							>
 							<view class="product-view">
 								<view
 									class="view-num red"
 									:class="
-										pros.svipPriceFlag == 1 || PromotionsFormat(pros.productPromotion) ? 'none' : ''
+										item.svipPriceFlag == 1 || PromotionsFormat(item.productPromotion) ? 'none' : ''
 									"
-									>¥{{ pros.price | NumFormat }}</view
+									>¥{{ item.price | NumFormat }}</view
 								>
-								<view class="view-num right">x {{ pros.num }}</view>
+								<view class="view-num right">x {{ item.num }}</view>
 							</view>
 							<view class="floor-item-act">
-								<template v-if="pros.productPromotion">
+								<template v-if="item.productPromotion">
 									<view
-										v-if="PromotionsFormat(pros.productPromotion)"
+										v-if="PromotionsFormat(item.productPromotion)"
 										class="floor-tags"
-										@click.stop="clickPopupShow(pros.productPromotion)"
+										@click.stop="clickPopupShow(item.productPromotion)"
 									>
-										{{ pros.productPromotion.name }}
-										<text v-if="pros.productPromotion != null && pros.productPromotion.type != 3">
+										{{ item.productPromotion.name }}
+										<text v-if="item.productPromotion != null && item.productPromotion.type != 3">
 											:¥{{
-												pros.productPromotion == null
+												item.productPromotion == null
 													? '0.00'
-													: pros.productPromotion.touchPrice | NumFormat
+													: item.productPromotion.touchPrice | NumFormat
 											}}
 										</text>
 									</view>
 									<view
-										v-else-if="pros.productPromotion.type != 3"
+										v-else-if="item.productPromotion.type != 3"
 										class="floor-tags"
-										@click.stop="clickPopupShow(pros.productPromotion)"
-										>{{ pros.productPromotion.name }}</view
+										@click.stop="clickPopupShow(item.productPromotion)"
+										>{{ item.productPromotion.name }}</view
 									>
 								</template>
-								<template v-if="pros.svipPriceFlag == 1">
+								<template v-if="item.svipPriceFlag == 1">
 									<view class="svip-tags">
 										<view class="tags">SVIP</view>
-										<view class="price">{{ pros.svipPriceTag }}</view>
+										<view class="price">{{ item.svipPriceTag }}</view>
 									</view>
 								</template>
 							</view>
 						</view>
 					</view>
 					<view class=" product-info clearfix"> 
-						<view class="product-view" v-if="pros.returnedNum > 0 || pros.actualCancelNum > 0">
-							<view class="view-num">已退货/已取消:<text class="text">{{ pros.returnedNum }}/{{ pros.actualCancelNum }}</text></view>
+						<view class="product-view" v-if="item.returnedNum > 0 || item.actualCancelNum > 0">
+							<view class="view-num">已退货/已取消:<text class="text">{{ item.returnedNum }}/{{ item.actualCancelNum }}</text></view>
 						</view>
-						<view class="product-view" v-if="pros.svipPriceType != 1">
-							<view class="view-num">折扣:<text class="text">{{ pros.discount == null ? '0' : pros.discount }}%</text></view>
+						<view class="product-view" v-if="item.svipPriceType != 1">
+							<view class="view-num">折扣:<text class="text">{{ item.discount == null ? '0' : item.discount }}%</text></view>
 						</view>
 						<view class="product-view">
-							<view class="view-num">税率:<text class="text">{{ pros.taxRate }}%</text></view>
+							<view class="view-num">税率:<text class="text">{{ item.taxRate }}%</text></view>
 						</view>
 						<view class="product-view">
-							<view class="view-num">折后单价:<text class="text">¥{{ pros.discountPrice | NumFormat }}</text></view>
+							<view class="view-num">折后单价:<text class="text">¥{{ item.discountPrice | NumFormat }}</text></view>
 						</view>
 						<view class="product-view allPrice">
-							<view class="view-num">合计:<text class="text">¥{{ pros.totalFee | NumFormat }}</text></view>
+							<view class="view-num">合计:<text class="text">¥{{ item.totalFee | NumFormat }}</text></view>
 						</view>
 					</view>
 				</view>
@@ -96,32 +96,35 @@
 						<view class="text">{{ item.note ? item.note : '' }}</view>
 					</view>
 				</view>
-				<view class="goods-pros-b clearfix" v-if="information.onlinePayFlag == 0">
-					<view class="pros-price-view" v-if="item.isHandelShow">
+			</view>
+			<view class="goods-item">
+				<view class="goods-pros-b clearfix">
+					<view class="pros-price-view">
 						<view class="price-view-le">商品总额:</view>
-						<view class="price-view-ri">¥{{ item.totalAmount | NumFormat }}</view>
+						<view class="price-view-ri">¥{{ orderInfo.totalAmount | NumFormat }}</view>
+					</view>
+					<view class="pros-price-view">
+						<view class="price-view-le">运费:</view>
+						<view class="price-view-ri">{{ orderInfo.postageInfo }}</view>
 					</view>
-					<view class="pros-price-view" v-if="item.isHandelShow">
+					<view class="pros-price-view">
 						<view class="price-view-le">优惠:</view>
-						<view class="price-view-ri">¥{{ item.eachDiscount | NumFormat }}</view>
+						<view class="price-view-ri">¥{{ orderInfo.eachDiscount | NumFormat }}</view>
 					</view>
-					<view class="pros-price-view" v-if="item.isHandelShow">
-						<view class="price-view-le">应付金额:</view>
-						<view class="price-view-ri">¥{{ item.realPay | NumFormat }}</view>
+					<view class="pros-price-view">
+						<view class="price-view-le">订单总额:</view>
+						<view class="price-view-ri">¥{{ orderInfo.totalAmount | NumFormat }}</view>
 					</view>
-					<view class="pros-price-view" v-if="item.isHandelShow">
+					<view class="pros-price-view">
 						<view class="price-view-le">已付金额:</view>
-						<view class="price-view-ri">¥{{ item.receiptAmount | NumFormat }}</view>
+						<view class="price-view-ri">
+							¥{{ orderInfo.receiptAmount | NumFormat }}
+							<text v-if="orderInfo.balancePayFee > 0">(余额抵扣:¥{{ orderInfo.balancePayFee | NumFormat }})</text>
+						</view>
 					</view>
 					<view class="pros-price-view">
 						<view class="price-view-le">待付金额:</view>
-						<view class="price-view-ri red">¥{{ item.obligation | NumFormat }}</view>
-					</view>
-					<view class="pros-price-btn">
-						<view class="btn" @click="handelShowDetails(item)">
-							{{ item.isHandelShow ? '收起' : '查看更多' }}
-							<text class="iconfont" :class="item.isHandelShow ? 'icon-xiangshangjiantou' : 'icon-xiangxiajiantou'"></text>
-						</view>
+						<view class="price-view-ri red">¥{{ orderInfo.obligation | NumFormat }}</view>
 					</view>
 				</view>
 			</view>
@@ -133,21 +136,23 @@
 export default {
 	name: 'goods',
 	props: {
-		shopOrderData: {
+		
+		list: {
 			type: Array
 		},
-		information: {
+		orderInfo: {
 			type: Object
 		}
 	},
 	data() {
 		return {
-			list: [],
+			dataList: [], 
+			isHandelShow:false,
 			vipFlag: 0,
 		}
 	},
 	created() {
-		this.initGetStotage(this.shopOrderData)
+		this.initGetStotage(this.list)
 	},
 	filters: {
 		NumFormat(value) {
@@ -166,16 +171,13 @@ export default {
 	},
 	computed: {},
 	methods: {
-		async initGetStotage(data) {
+		async initGetStotage(list) {
 			const userInfo = await this.$api.getStorage()
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
-			this.list = data.map((el,index)=>{
-				el.isHandelShow = false
-				return el
-			})
+			this.dataList = list
 		},
-		handelShowDetails(item){
-			item.isHandelShow = !item.isHandelShow
+		handelShowDetails(){
+			this.isHandelShow = !this.isHandelShow
 		},
 		goShophome(shop) {
 			if(shop.shopType === 2){
@@ -183,11 +185,11 @@ export default {
 			}
 			this.$api.navigateTo(`/pages/supplier/user/my-shop?shopId=${shop.shopId}`)
 		},
-		details(pros) {
+		details(item) {
 			if (pros.validFlag == 9) {
 				return
 			} else {
-				this.$api.navigateTo(`/pages/goods/product?id=${pros.productId}`)
+				this.$api.navigateTo(`/pages/goods/product?id=${item.productId}`)
 			}
 		},
 		clickPopupShow(pros) {
@@ -225,9 +227,10 @@ export default {
 			padding: 24rpx;
 			height: auto;
 			background: #ffffff;
-			margin-bottom: 24rpx;
+			border-bottom: 1px solid #E1E1E1;
+			float: left;
 			&:last-child {
-				margin-bottom: 0;
+				border-bottom: none;
 			}
 		}
 		.shoptitle {
@@ -285,7 +288,6 @@ export default {
 			height: auto;
 			padding: 0;
 			box-sizing: border-box;
-			border-bottom: 1px solid #E1E1E1;
 		}
 		.goods-pros-t {
 			display: flex;
@@ -477,7 +479,6 @@ export default {
 		}
 		.goods-pros-b {
 			width: 100%;
-			padding-top: 12rpx;
 			float: left;
 			.pros-price-view{
 				width: 100%;

+ 35 - 118
pages/user/order/components/details/cm-order-temp.vue

@@ -5,103 +5,50 @@
 			<view class="information-view title">
 				<view class="view-num">
 					<view class="bage-text">
-						订单编号:<label class="label">{{ orderData.orderNo ? orderData.orderNo : '' }}</label>
+						订单编号:<label class="label">{{ orderData.shopOrderNo ? orderData.shopOrderNo : '' }}</label>
 					</view>
 				</view>
 			</view>
 			<view class="information-view same">
-				<view class="view-num">
-					订单总额:<label class="label">¥{{ orderData.payTotalFee | NumFormat }}</label>
+				<view class="view-man">
+					赠品总数:<label class="label">{{
+						orderData.presentCount + orderData.promotionalGiftsCount
+					}}</label>
 				</view>
 			</view>
 			<view class="information-view">
-				<view class="view-num bold">
-					订单标识:<label class="label">{{ orderData.orderMark ? orderData.orderMark : '' }}</label>
-					<text class="clipboard" @click="clipboard(orderData.orderMark)">复制</text>
+				<view class="view-num time">
+					下单时间:<label class="label">{{ orderData.orderTime ? orderData.orderTime : '' }}</label>
 				</view>
 			</view>
-			<view class="information-view same">
-				<view class="view-num">
-					待付金额:<text class="red">¥{{ orderData.pendingPayments | NumFormat }}</text>
+<!-- 			<view class="information-view same" v-if="orderData.svipFullReduction > 0">
+				<view class="view-man">
+					超级会员优惠:<label class="label">¥{{ orderData.svipFullReduction | NumFormat }}</label>
 				</view>
-				<view class="view-man"></view>
 			</view>
-			<template v-if="openShowflag">
-				<view class="information-view">
-					<view class="view-num time">
-						下单时间:<label class="label">{{ orderData.orderTime ? orderData.orderTime : '' }}</label>
-					</view>
-					<!-- <view class="view-type">{{ orderData.status | TextFormat }}</view> -->
-				</view>
-				<view class="information-view same">
-					<view class="view-num">
-						余额抵扣:<label class="label">¥{{ orderData.balancePayFee | NumFormat }}</label>
-					</view>
-				</view>
-				<view class="information-view ">
-					<view class="view-num" v-if="orderData.postageFlag == 0">
-						运费:<label class="label">包邮</label>
-					</view>
-					<view class="view-num" v-if="orderData.postageFlag == -1">
-						运费:<label class="label">到付</label>
-					</view>
-					<view class="view-num" v-if="orderData.postageFlag == 1">
-						运费:<label class="label">¥{{ orderData.postage | NumFormat }}</label>
-					</view>
-				</view>
-				<view class="information-view same" v-if="orderData.svipFullReduction > 0">
-					<view class="view-man">
-						超级会员优惠:<label class="label">¥{{ orderData.svipFullReduction | NumFormat }}</label>
-					</view>
-				</view>
-				<view class="information-view" v-if="orderData.userBeans > 0">
-					<view class="view-man">
-						采美豆抵用运费:<label class="label">{{ orderData.userBeans }}</label>
-					</view>
-				</view>
-				<view class="information-view same" v-if="orderData.discountFee && orderData.discountFee > 0">
-					<view class="view-num">
-						经理折扣:<label class="label">¥{{ orderData.discountFee | NumFormat }}</label>
-					</view>
-				</view>
-				<view
-					class="information-view"
-					v-if="orderData.promotionFullReduction && orderData.promotionFullReduction > 0"
-				>
-					<view class="view-man">
-						促销满减:<label class="label">¥{{ orderData.promotionFullReduction | NumFormat }}</label>
-					</view>
+			<view class="information-view" v-if="orderData.userBeans > 0">
+				<view class="view-man">
+					采美豆抵用运费:<label class="label">{{ orderData.userBeans }}</label>
 				</view>
-				<view class="information-view same">
-					<view class="view-man">
-						优惠券:<label class="label">¥{{ orderData.couponAmount | NumFormat }}</label>
-					</view>
-				</view>
-				<view class="information-view">
-					<view class="view-man">
-						赠品总数:<label class="label">{{
-							orderData.presentCount + orderData.promotionalGiftsCount
-						}}</label>
-					</view>
-				</view>
-				<view class="information-view same">
-					<view class="view-man">
-						应付总额:<label class="red">¥{{ orderData.payableAmount | NumFormat }}</label>
-					</view>
+			</view>
+			<view class="information-view same" v-if="orderData.discountFee && orderData.discountFee > 0">
+				<view class="view-num">
+					经理折扣:<label class="label">¥{{ orderData.discountFee | NumFormat }}</label>
 				</view>
-				<view class="information-view">
-					<view class="view-num">
-						已支付:<label class="red">¥{{ orderData.receiptAmount | NumFormat }}</label>
-					</view>
-					<view class="view-man"></view>
+			</view>
+			<view
+				class="information-view"
+				v-if="orderData.promotionFullReduction && orderData.promotionFullReduction > 0"
+			>
+				<view class="view-man">
+					促销满减:<label class="label">¥{{ orderData.promotionFullReduction | NumFormat }}</label>
 				</view>
-			</template>
-		</view>
-		<view class="openinfo" v-if="infoflag">
-			<view class="btnInfo" @click="openShow">
-				查看更多
-				<text class="iconfont icon-xiangxiajiantou"></text>
 			</view>
+			<view class="information-view same">
+				<view class="view-man">
+					优惠券:<label class="label">¥{{ orderData.couponAmount | NumFormat }}</label>
+				</view>
+			</view> -->
 		</view>
 	</view>
 </template>
@@ -109,9 +56,9 @@
 <script>
 const thorui = require('@/components/clipboard/clipboard.thorui.js')
 export default {
-	name: 'information',
+	name: 'orderInfo',
 	props: {
-		information: {
+		orderInfo: {
 			type: Object
 		}
 	},
@@ -119,11 +66,10 @@ export default {
 		return {
 			orderData: '',
 			openShowflag: false,
-			infoflag: true
 		}
 	},
 	created() {
-		this.initData(this.information)
+		this.initData(this.orderInfo)
 	},
 	filters: {
 		NumFormat(value) {
@@ -131,40 +77,11 @@ export default {
 			if (!value) return '0.00'
 			let number = Number(value)
 			return number.toFixed(2)
-		},
-		TextFormat(status) {
-			//处理金额
-			let HtmlText,
-				typeTextObject = {
-					0: '待确认',
-					4: '交易完成',
-					5: '订单完成',
-					6: '已关闭',
-					7: '交易全退',
-					77: '交易全退',
-					11: '待付款待发货',
-					12: '待付款部分发货',
-					13: '待付款已发货',
-					21: '部分付款待发货',
-					22: '部分付款部分发货',
-					23: '部分付款已发货',
-					31: '已付款待发货',
-					32: '已付款部分发货',
-					33: '已付款已发货',
-					111: '待付款待发货'
-				}
-
-			Object.keys(typeTextObject).forEach(key => {
-				if (key == status) {
-					HtmlText = typeTextObject[key]
-				}
-			})
-			return HtmlText
 		}
 	},
 	computed: {},
 	watch: {
-		information: {
+		orderInfo: {
 			handler: function(val) {
 				this.initData(val)
 			},
@@ -176,8 +93,8 @@ export default {
 			this.openShowflag = true
 			this.infoflag = false
 		},
-		initData(res) {
-			this.orderData = res
+		initData(data) {
+			this.orderData = data
 		},
 		clipboard(data) {
 			thorui.getClipboardData(data, res => {

+ 71 - 203
pages/user/order/create-order.vue

@@ -1,23 +1,22 @@
 <template>
-	<view class="container order clearfix" :style="{ paddingBottom: isIphoneX ? '170rpx' : '134rpx' }">
+	<view class="container order clearfix" :style="{ paddingBottom: isIphoneX ? '250rpx' : '214rpx' }">
 		<!-- 地址选择 -->
-		<cm-address-temp ref="choiceAddress" v-if="isAddress" :addressData="addressData" />		
+		<cm-address-temp ref="choiceAddress" v-if="isRequest" :addressData="addressData" />		
 		<!-- 商品 -->
-		<cm-goods-temp ref="goods" v-if="isRequest" :goodsData="goodsData" @handleGoodList="handChangeInputGoodsList" />
+		<cm-goods-temp 
+			ref="goods" 
+			v-if="isRequest" 
+			:goodsData.sync="goodsData" 
+			@handleGoodList="handChangeInputGoodsList" 
+			@changeChina="handleChangeChina"
+			@changePostage="handleChangePostage"
+		/>
 		<!-- 发票信息 -->
 		<cm-invice-popup ref="invoice" v-if="isRequest" :invoiceDatas="invoiceData" @handleChoiceaInvoice="handleChoiceaInvoiceData" />
 		<!-- 优惠券选择弹窗 -->
 		<cm-coupon-popup ref="coupon" v-if="isCouponShow" :couponList="couponList" @handleChoiceaCoupon="handleChoiceaCouponData" />
 		<!-- 兑换优惠券弹窗 -->
 		<cm-coupon-chang v-if="isExchangePopup" />
-		<!-- 运费 -->
-		<cm-freight-popup 
-			ref="freight" 
-			v-if="isFreight" 
-			:freightData="freightData" 
-			@confirmFreight="hanldFreightFn"
-			@confirmFreightBeans="hanldFreightBeans"
-		/>
 		<!-- 优惠券 -->
 		<cm-coupon-tips ref="coupon-tips"  :coupon="ExchangeCouponData" v-if="isCouponModel" />
 		<!-- 余额抵扣 -->
@@ -53,7 +52,7 @@
 		</view>
 		<!-- 底部 -->
 		<view class="footer-wrapper" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
-			<cm-return-instructions
+			<cm-return-popup
 				v-if="returnGoodsStutas"
 				:content="helpContent"
 				@change="onAgreementChange"
@@ -110,17 +109,17 @@ import cmGoodsTemp from './components/cm-goods-temp'
 import cmInvicePopup from './components/cm-invice-popup'
 import cmCouponPopup from './components/cm-coupon-popup'
 import cmCouponChang from './components/cm-coupon-chang'
-import cmFreightPopup from './components/cm-freight-popup'
-import cmReturnPopup from './components/cm-return-popup.vue'
+import cmReturnPopup from './components/cm-return-popup'
 import cmCouponTips from './components/cm-coupon-tips'
+import conMixins from './mixins/conMixins.js'
 export default {
+	mixins: [conMixins],
 	components: {
 		cmAddressTemp,
 		cmGoodsTemp,
 		cmInvicePopup,
 		cmCouponPopup,
 		cmCouponChang,
-		cmFreightPopup,
 		cmReturnPopup,
 		cmCouponTips
 	},
@@ -129,32 +128,6 @@ export default {
 			isIphoneX: this.$store.state.isIphoneX,
 			isSubLoading: false,
 			confirmType: 1,
-			orderID: 0,
-			cartParam: {
-				// 购物车立即结算确认订单参数
-				skuIds: 0, // 商品Id(逗号隔开)
-				source: 2, // 来源:1WWW 2小程序
-				userId: 0 // 用户Id
-			},
-			productParam: {
-				// 商品立即购买确认订单参数
-				productCount: 0, // 商品数量
-				productId: 0, // 商品Id
-				source: 2, // 来源:1WWW 2小程序
-				userId: 0 // 用户Id
-			},
-			supportParm: {
-				// 组合商品立即购买确认订单参数
-				productInfo: '',
-				source: 2, // 来源:1WWW 2小程序
-				userId: 0 // 用户Id
-			},
-			postageParam: {
-				// 邮费计算参数
-				skuIds: 0, // 商品Id(逗号隔开)
-				userId: 0, // 用户Id
-				townId: 0 // 地区Id
-			},
 			confirmParam: {
 				cartType: 1, // 购买类型:(1自主下单, 3协销下单)
 				orderMiniType: 0, // 订单提交状态 0初始提交 1 继续提交
@@ -164,14 +137,12 @@ export default {
 				clubId: 0, // 机构Id
 				orderInfo: [], // 订单商品数据
 				orderInvoice: { type: 0 }, // 订单发票信息
-				payInfo: {
-					// 订单金额数据
-					isColdChina: 0, //是否勾选冷链费
+				payInfo: {// 订单金额数据
 					orderShouldPayFee: 0, // 订单最终支付金额
 					balancePayFlag: 0, // 勾选余额的状态(1使用,0不使用)
 					clauseId: 0, // 条款Id
-					postage: 0, // 运费金额
-					postageFlag: 0, // 运费类型
+					postage: '0.00',		// 运费金额
+					postageFlag: 0,			// 运费类型
 					userBeans: 0, // 抵扣采美豆数量
 					rebateFlag: 0 // 是否返佣订单
 				},
@@ -179,22 +150,10 @@ export default {
 			}, // 提交订单参数
 			productIds: '', // 获取上一级页面商品信息
 			submitState: '', // 提交状态
-			totalCount: 1, // 订单提交总数量
-			reducedPrice: 0, // 满减金额
-			couponAmount: 0, // 优惠券金额
-			totalDiscountAmount: 0, // 共减金额
-			allPrice: 0.0, // 订单总金额
-			orderShouldPayFee: 0, // 订单最终支付金额
-			surplusMoney: 0.0, // 显示勾选后的剩余抵扣
-			userMoney: 0.0, // 显示可使用余额
-			deductMoney: 0.0, // 显示已使用的余额
 			isRequest: false, // 是否加载完成渲染子组件
 			isFreight: false, // 是否加载完成渲染子组件
-			isAddress: false, // 是否加载完成地址
 			isExchangePopup: false, // 控制兑换优惠券弹窗
 			ischecked: false, // 是否勾选余额
-			hanldFreePostFlag: '', // 邮费状态
-			hanldFreight: '', // 邮费
 			addressData: {}, // 初始化地址信息
 			goodsData: [], // 初始化商品信息
 			couponList: [], // 初始化优惠券信息
@@ -243,6 +202,7 @@ export default {
 	},
 	onLoad(option) {
 		//商品数据
+		
 		this.initStorage(option)
 	},
 	filters: {
@@ -258,10 +218,11 @@ export default {
 		async initStorage(option) {
 			const data = JSON.parse(option.data)
 			const userInfo = await this.$api.getStorage()
-			console.log('data', data)
+			this.handleComType = option.type*1
 			this.productParam.userId = this.cartParam.userId = userInfo.userId
-			this.supportParm.userId = this.postageParam.userId = userInfo.userId
+			this.supportParm.userId = userInfo.userId
 			this.confirmParam.clubId = userInfo.clubId 
+			
 			switch (option.type) {
 				case '1': // 商品详情立即购买
 					this.confirmParam.cartType = 2
@@ -269,19 +230,45 @@ export default {
 					this.productParam.productId = data.data.productIds
 					this.productParam.skuId = data.data.skuId
 					this.productIds = data.data.productIds
-					this.GetProductCreateOrderInfo()
+					this.getAddressData(userInfo.userId,1)
 					break
 				case '2': // 购物车结算
 					this.confirmParam.cartType = 1
 					this.confirmType = 2
 					this.cartParam.skuIds = data.data.skuIds
-					this.CartCreateOrderInfo()
+					this.getAddressData(userInfo.userId,2)
 					break
 				case '3': // 组合商品立即购买
 					this.confirmParam.cartType = 2
 					this.confirmType = 2
 					this.supportParm.productInfo = JSON.stringify(data.data)
-					this.GetOrderClubProductSupporting()
+					this.getAddressData(userInfo.userId,3)
+			}
+		},
+		async getAddressData(userId,type) {
+			//获取地址信息
+			try{
+				const params = {pageNum: 1,pageSize: 1,userId: userId }
+				const res = await this.UserService.QueryAddressList(params)
+				const data = res.data
+				if (data.list && data.list.length > 0) {
+					this.addressData = data.list[0]
+					this.confirmParam.addressId = this.addressData.addressId
+					this.cartParam.townId = this.addressData.townId
+					this.productParam.townId = this.addressData.townId
+					this.supportParm.townId = this.addressData.townId
+					if(type === 1) {//立即都买提交
+						this.GetProductCreateOrderInfo()
+					}
+					if(type === 2) {//购物车提交
+						this.CartCreateOrderInfo()
+					}
+					if(type === 3) {//组合商品提交
+						this.GetOrderClubProductSupporting()
+					}
+				}
+			}catch(error){
+				console.log('获取订单地址异常')
 			}
 		},
 		// 商品立即购买确认订单数据初始化
@@ -314,7 +301,10 @@ export default {
 		// 公共初始化数据
 		setCreatDataInfo(data) {
 			this.isRequest = true
-			this.goodsData = data.list
+			this.goodsData = data.list.map((el)=>{
+				el.handlePostageFlag = el.postageFlag
+				return el
+			});
 			this.couponList = data.couponList
 			this.userMoney = data.userMoney
 			this.reducedPrice = data.reducedPrice
@@ -327,23 +317,9 @@ export default {
 				this.confirmParam.clubCouponId = data.couponList[0].clubCouponId
 			}
 			this.orderShouldPayFee = this.allPrice - this.couponAmount
-			this.totalDiscountAmount = this.reducedPrice + this.couponAmount
-			this.postageParam.skuIds = this.getProductIds(data.list)
 			// 特殊商品退货须知
 			this.returnGoodsStutas = data.returnGoodsStutas && data.returnGoodsStutas === 2 // 1:可以 2:不可以
 			this.helpContent = data.helpContent
-			this.getAddressData()
-		},
-		// 获取订单SKUId列表
-		getProductIds(list) {
-			const skuId = []
-			list.forEach(function(supplier) {
-				supplier.cartList.forEach(function(product) {
-					skuId.push(product.skuId)
-				})
-			})
-			// console.log(list);
-			return skuId.join(',')
 		},
 		async getFreightData() {
 			// 获取邮费信息
@@ -379,30 +355,7 @@ export default {
 				console.log('获取订单运费异常')
 			}
 		},
-		async getAddressData() {
-			//获取地址信息
-			try{
-				const userInfo = await this.$api.getStorage()
-				const res = await this.UserService.QueryAddressList({
-					pageNum: 1,
-					pageSize: 1,
-					userId: userInfo.userId
-				})
-				const data = response.data
-				this.isAddress = true
-				this.addressData = {}
-				if (data.list && data.list.length > 0) {
-					this.confirmParam.addressId = data.list[0].addressId
-					this.postageParam.townId = data.list[0].townId
-					this.addressData = data.list[0]
-					this.getFreightData()
-				} else {
-					this.addressData = this.addressData
-				}
-			}catch(error){
-				console.log('获取订单地址异常')
-			}
-		},
+	
 		handChangeInputGoodsList(data) {
 			//对应供应商的留言信息
 			this.goodsData = data
@@ -411,28 +364,6 @@ export default {
 			//获取发票信息
 			this.confirmParam.orderInvoice = data
 		},
-		hanldFreightFn(data) {
-			//显示邮费弹窗
-			console.log('邮费信息', data)
-			switch (data.postageFlag) {
-				case 1:
-					this.hanldFreight = this.freightData.postage
-					this.hanldFreePostFlag = data.postageFlag
-					this.freightBeansMoney = data.freightBeansMoney
-					this.orderShouldPayFee = this.allPrice + this.hanldFreight
-					this.attributePallPrice()
-					this.hanldFreightBeans(this.isCheckedBeans)
-					break
-				case -1:
-					this.hanldFreight = 0
-					this.hanldFreePostFlag = data.postageFlag
-					this.freightBeansMoney = data.freightBeansMoney
-					this.orderShouldPayFee = this.allPrice
-					this.attributePallPrice()
-					this.hanldFreightBeans(this.isCheckedBeans)
-					break
-			}
-		},
 		hanldFreightBeans(data) {
 			//是否勾选采美豆抵扣
 			this.isCheckedBeans = data
@@ -477,71 +408,13 @@ export default {
 			// 勾选使用优惠券
 			console.log('优惠券信息', data)
 			this.couponAmount = data.couponAmount
-			this.totalDiscountAmount = this.reducedPrice + this.couponAmount
 			this.confirmParam.clubCouponId = data.clubCouponId
 			this.attributePallPrice()
-			this.hanldFreightBeans(this.isCheckedBeans)
-		},
-		checkedBalabce() {
-			//勾选使用余额
-			if (this.userMoney > 0) {
-				this.ischecked = !this.ischecked
-				if (this.ischecked) {
-					this.confirmParam.payInfo.balancePayFlag = 1
-					this.attributePallPrice()
-				} else {
-					this.confirmParam.payInfo.balancePayFlag = 0
-					if (this.hanldFreePostFlag == 1 || this.hanldFreePostFlag == '1') {
-						//如果是有运费时
-						if (this.isCheckedBeans) {
-							this.orderShouldPayFee = this.allPrice - this.couponAmount
-						} else {
-							this.orderShouldPayFee =
-								this.allPrice + parseInt(this.freightData.postage) - this.couponAmount
-						}
-					} else {
-						this.orderShouldPayFee = this.allPrice - this.couponAmount
-					}
-				}
-				console.log('最终订单支付金额', this.orderShouldPayFee)
-				console.log('优惠券金额', this.couponAmount)
-			} else {
-				return
-			}
+			// this.hanldFreightBeans(this.isCheckedBeans)
 		},
-		attributePallPrice() {
-			// 计算价格
-			if (this.hanldFreePostFlag == 1 || this.hanldFreePostFlag == '1') {
-				this.attributeHashfreight(this.freightData.postage)
-			} else {
-				this.attributeNofreight()
-			}
-		},
-		attributeNofreight() {
-			// 计算没有邮费的支付价格
-			if (this.ischecked) {
-				let totalAmount = this.allPrice - this.couponAmount
-				if (this.userMoney >= totalAmount) {
-					this.orderShouldPayFee = 0.0
-					this.deductMoney = this.allPrice - this.couponAmount // 当前使用金额等于订单金额
-					this.surplusMoney = this.userMoney - this.deductMoney // 剩余金额等于余额-当前使用金额
-				} else {
-					this.orderShouldPayFee = this.allPrice - this.userMoney - this.couponAmount // 订单最终支付金额等于订单金额-账户余额
-					this.deductMoney = this.userMoney // 当前使用金额等于总余额
-					this.surplusMoney = this.userMoney - this.deductMoney // 剩余余额等于总余额-当前使用金额
-				}
-			} else {
-				this.orderShouldPayFee = this.allPrice - this.couponAmount
-				this.deductMoney = 0.0 // 当前使用
-				this.surplusMoney = this.userMoney // 剩余余额
-			}
-			console.log('最终订单支付金额', this.orderShouldPayFee)
-			console.log('优惠券金额', this.couponAmount)
-		},
-		attributeHashfreight(postage) {
+		attributeHashfreight() {
 			// 计算需要邮费的支付价格
-			console.log()
-			let totalAmount = this.allPrice + parseInt(postage) - this.couponAmount //计算不包邮的价格 总价等于商品价格+邮费
+			let totalAmount = this.allPrice  - this.couponAmount //计算不包邮的价格 总价等于商品价格+邮费
 			if (this.ischecked) {
 				if (this.userMoney >= totalAmount) {
 					// 全部抵扣
@@ -551,7 +424,7 @@ export default {
 						this.deductMoney = this.allPrice - this.couponAmount // 当前使用金额等于订单金额
 						this.surplusMoney = this.userMoney - this.deductMoney // 剩余金额等于余额减去当前使用金额
 					} else {
-						this.deductMoney = this.allPrice + parseInt(postage) - this.couponAmount // 当前使用金额等于订单金额+运费金额
+						this.deductMoney = this.allPrice - this.couponAmount // 当前使用金额等于订单金额+运费金额
 						this.surplusMoney = this.userMoney - this.deductMoney // 剩余余额等于总余额-当前使用金额
 					}
 				} else {
@@ -562,13 +435,13 @@ export default {
 						this.deductMoney = this.userMoney // 当前使用金额等于账户余额
 						this.surplusMoney = this.userMoney - this.deductMoney // 剩余余额等于账户余额-当前使用金额
 					} else {
-						this.orderShouldPayFee = this.allPrice + parseInt(postage) - this.userMoney - this.couponAmount //订单支付金额等于订单金额+运费-账户余额-优惠券
+						this.orderShouldPayFee = this.allPrice - this.userMoney - this.couponAmount //订单支付金额等于订单金额+运费-账户余额-优惠券
 						this.deductMoney = this.userMoney // 当前使用金额等于账户余额
 						this.surplusMoney = this.userMoney - this.deductMoney // 剩余余额等于账户余额-当前使用金额
 					}
 				}
 			} else {
-				this.orderShouldPayFee = this.allPrice + parseInt(postage) - this.couponAmount
+				this.orderShouldPayFee = this.allPrice - this.couponAmount
 				this.deductMoney = 0.0 // 当前使用金额
 				this.surplusMoney = this.userMoney // 剩余余额
 			}
@@ -606,11 +479,12 @@ export default {
 					splitCode: el.splitCode,
 					shopId: el.shopId,
 					note: el.note ? el.note : '',
+					postage: parseInt(el.postage).toFixed(2),
+					postageFlag: parseInt(el.handlePostageFlag),
+					isColdChina: el.isColdChina ? 1 : 0,
 					productInfo: productInfo
 				}
 			})
-			this.confirmParam.payInfo.postage = parseInt(this.hanldFreight).toFixed(2)
-			this.confirmParam.payInfo.postageFlag = parseInt(this.hanldFreePostFlag)
 			this.confirmParam.payInfo.orderShouldPayFee = this.orderShouldPayFee.toFixed(2)
 			this.confirmParam.payInfo = JSON.stringify(this.confirmParam.payInfo)
 			this.confirmParam.orderInfo = JSON.stringify(this.confirmParam.orderInfo)
@@ -645,11 +519,7 @@ export default {
 						this.$util.msg('订单提交成功', 2000, true, 'success')
 						setTimeout(() => {
 							this.isSubLoading = false
-							if (data.onlinePayFlag === 1) {
-								this.$api.redirectTo(`/pages/user/order/order-payunder?orderId=${data.orderId}`)
-							} else {
-								this.$api.redirectTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
-							}
+							this.$api.redirectTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
 						}, 2000)
 					}
 				})
@@ -803,14 +673,12 @@ export default {
 		let pages = getCurrentPages()
 		let currPage = pages[pages.length - 1]
 		if (currPage.data.select == 'select') {
-			this.isAddress = true
-			let SelectData = uni.getStorageSync('selectAddress')
-			this.confirmParam.addressId = SelectData.addressId
-			this.postageParam.townId = SelectData.townId
-			this.addressData = SelectData
-			this.getFreightData()
-		} else {
-			this.getAddressData()
+			let selectData = uni.getStorageSync('selectAddress')
+			this.confirmParam.addressId = selectData.addressId
+			this.cartParam.townId = selectData.townId
+			this.productParam.townId = selectData.townId
+			this.postageParam.townId = selectData.townId
+			this.addressData = selectData
 		}
 	}
 }

+ 103 - 0
pages/user/order/mixins/conMixins.js

@@ -0,0 +1,103 @@
+import Vue from 'vue'
+const conMixins = {
+    data() {
+        return {
+            handleComType:0,//跳转类型
+            cartParam: {
+                // 购物车立即结算确认订单参数
+                townId:null,          //地址ID
+                skuIds: 0, // 商品Id(逗号隔开)
+                source: 2, // 来源:1WWW 2小程序
+                userId: 0 // 用户Id
+            },
+            productParam: {
+                // 商品立即购买确认订单参数
+                townId:null,          //地址ID
+                productCount: 0, // 商品数量
+                productId: 0, // 商品Id
+                source: 2, // 来源:1WWW 2小程序
+                userId: 0 // 用户Id
+            },
+            supportParm: {
+                // 组合商品立即购买确认订单参数
+                townId:null,          //地址ID
+                productInfo: '',
+                source: 2, // 来源:1WWW 2小程序
+                userId: 0 // 用户Id
+            },
+            totalCount: 1, // 订单提交总数量
+            reducedPrice: 0, // 满减金额
+            couponAmount: 0, // 优惠券金额
+            allPrice: 0.0, // 订单总金额
+            userMoney: 0.0, // 显示可使用余额
+            deductMoney: 0.0, // 显示已使用的余额
+            orderShouldPayFee:0 //显示最终订单金额
+        }
+    },
+    computed: {
+        // 计算订单最终支付金额 = 供应商下的合计金额之和
+        orderTotalPrice(){
+            let totalPrice = 0
+            this.goodsData.forEach(el =>{
+                totalPrice += el.totalPrice
+            })
+            console.log('订单最终金额',totalPrice)
+            return totalPrice - this.couponAmount
+        },
+        // 显示勾选后的剩余抵扣 = 用户总余额-当前使用金额
+        surplusMoney(){
+			 console.log('剩余抵扣', (this.userMoney - this.deductMoney))
+            return this.userMoney - this.deductMoney
+        },
+        // 共减 = 减金额 + 优惠券金额
+        totalDiscountAmount(){
+			 console.log('共减金额', (this.reducedPrice + this.couponAmount))
+            return this.reducedPrice + this.couponAmount
+        }
+    },
+    methods: {
+        //勾选使用余额
+        checkedBalabce() {
+            if (this.userMoney > 0) {
+                this.ischecked = !this.ischecked
+                if (this.ischecked) {
+                    this.confirmParam.payInfo.balancePayFlag = 1
+                    this.attributePallPrice()
+                } else {
+                    this.confirmParam.payInfo.balancePayFlag = 0
+                    this.attributePallPrice()
+                }
+                console.log('勾选使用余额最终订单支付金额', this.orderShouldPayFee)
+            }
+        },
+        // 是否勾选冷链费计算
+        handleChangeChina(supplier){
+        	this.attributePallPrice()
+        },
+        // 修改供应商运费类型
+        handleChangePostage(supplier){
+            this.attributePallPrice()
+        },
+        // 计算最终订单支付金额
+        attributePallPrice() {
+            if (this.ischecked) {// 是否勾选余额抵扣
+                if (this.userMoney >= this.orderTotalPrice) {
+                    this.orderShouldPayFee =0.0
+                    this.deductMoney = this.orderTotalPrice// 当前使用金额等于订单金额
+                    console.log('最终订单支付金额00001', this.orderShouldPayFee)
+                } else {
+                    this.orderShouldPayFee = this.orderTotalPrice - this.userMoney // 订单最终支付金额等于订单金额-账户余额
+                    this.deductMoney = this.userMoney // 当前使用金额等于总余额
+                    console.log('最终订单支付金额00002', this.orderShouldPayFee)
+                }
+                console.log('余额抵扣最终订单支付金额', this.orderShouldPayFee)
+            } else {
+                this.orderShouldPayFee = this.orderTotalPrice
+                this.deductMoney = 0 // 当前使用
+                console.log('未余额抵扣最终订单支付金额', this.orderShouldPayFee)
+            }
+        }
+    }
+}
+
+export default conMixins

+ 2 - 2
pages/user/order/order-addpay.vue

@@ -51,7 +51,7 @@ export default {
 			imageList: [],
 			params: {
 				id: 0,
-				orderId: 0,
+				shopOrderId: 0,
 				remarks: '',
 				voucherImgs: ''
 			},
@@ -61,7 +61,7 @@ export default {
 	},
 	onLoad(option) {
 		console.log(option)
-		this.params.orderId = option.orderId
+		this.params.shopOrderId = option.shopOrderId
 	},
 	computed: {
 		disabled() {

+ 256 - 260
pages/user/order/order-details.vue

@@ -6,50 +6,55 @@
 			:navbar-data="nvabarData"
 			:headerBtnPosi="headerBtnPosi"
 			:isShare="isOrderShare"
-		></header-back>
-		<view class="container-details" :style="{ paddingTop: navbarHeight + 'px' }">
+		/>
+		<tui-skeleton
+			v-if="!skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="5"
+		/>
+		<view class="container-details" v-else :style="{ paddingTop: navbarHeight + 'px' }">
 			<view class="status-text">
-				<view class="view-type">{{ information.status | TextFormat }}</view>
-				<text class="bage-buss" v-if="information.orderSubmitType == 3 || information.orderSubmitType == 4"
+				<view class="view-type">{{ orderInfo.status | statusFilters }}</view>
+				<text class="bage-buss" v-if="orderInfo.orderSubmitType == 3 || orderInfo.orderSubmitType == 4"
 					>协销</text
 				>
 				<text
 					class="bage-auto"
 					v-if="
-						information.orderSubmitType == 0 ||
-							information.orderSubmitType == 1 ||
-							information.orderSubmitType == 2
-					"
-					>自主</text
-				>
+						orderInfo.orderSubmitType == 0 ||
+						orderInfo.orderSubmitType == 1 ||
+						orderInfo.orderSubmitType == 2"
+					>自主</text>
 			</view>
 			<!-- 地址选择 -->
-			<cm-address-temp ref="orderAddress" v-if="isRequest && !rechargeGoods" :addressData="addressData" />
+			<cm-address-temp ref="orderAddress" v-if="skeletonShow && !rechargeGoods" :addressData="addressData" />
 			<!-- 特殊商品退货须知 -->
 			<view class="return-instructions" v-if="returnGoodsStutas" v-html="helpContent"></view>
 			<!-- 商品 -->
 			<cm-goods-temp
 				ref="goods"
-				v-if="isRequest"
-				:shopOrderData="shopOrderData"
-				:information="information"
+				v-if="skeletonShow"
+				:list="orderInfo.orderProductList"
+				:orderInfo="orderInfo"
 				@popupClick="hanldePopupFn"
 			/>
 			<!-- 订单信息 -->
-			<cm-order-temp ref="information" v-if="isRequest" :information="information" />
+			<cm-order-temp ref="orderInfo" v-if="skeletonShow" :orderInfo="orderInfo" />
 			<!-- 发票信息 -->
-			<cm-invice-temp ref="invoice" v-if="isRequest" :orderInvoice="orderInvoice" />
+			<cm-invice-temp ref="invoice" v-if="skeletonShow" :orderInvoice="orderInvoice" />
 			<!-- 支付记录 -->
 			<cm-payment-temp
 				ref="payment"
-				v-if="isRequest"
+				v-if="skeletonShow"
 				:discernReceiptList="discernReceiptList"
 				:receiptAmount="receiptAmount"
 			/>
 			<!-- 退款记录 -->
 			<cm-refund-temp
 				ref="refund"
-				v-if="isRequest"
+				v-if="skeletonShow"
 				:returnedPurchaseList="returnedPurchaseList"
 				:returnedPurchaseFee="returnedPurchaseFee"
 			/>
@@ -57,7 +62,7 @@
 			<cm-voucher-temp ref="voucher" v-if="skeletonShow && voucherList.length > 0" :list="voucherList" />
 			<view
 				class="clause"
-				v-if="information.secondHandOrderFlag != 1 && !orderSubmitType"
+				v-if="orderInfo.secondHandOrderFlag != 1 && !orderSubmitType"
 				@tap.stop="openclauseConten(clauseData.id)"
 				:class="clauseData.name == '无条款' ? 'noclick' : ''"
 			>
@@ -68,7 +73,7 @@
 			<!-- 底部button -->
 			<cm-details-button
 				ref="orderButton"
-				v-if="isRequest"
+				v-if="skeletonShow"
 				:status="btnStatus"
 				:shareCode="shareCode"
 				:order="orderInfo"
@@ -120,7 +125,7 @@ import cmRefundTemp from './components/details/cm-refund-temp' //退款记录
 import cmVoucherTemp from './components/details/cm-voucher-temp' //支付凭证记录
 import cmDetailsButton from './components/cm-details-button' //底部按钮
 import cmSharePopup from './components/cm-share-popup' //分享弹窗
-import cmPrderpayPopup from './components/cm-orderpay-popup' //付款弹窗
+import cmOrderpayPopup from './components/cm-orderpay-popup' //付款弹窗
 import cmPromotePopup from './components/details/cm-promote-popup' //促销活动弹窗
 import activityBean from '@/components/cm-module/activity/activityBean.vue'
 
@@ -136,6 +141,7 @@ export default {
 		cmVoucherTemp,
 		cmDetailsButton,
 		cmSharePopup,
+		cmOrderpayPopup,
 		cmPromotePopup,
 		activityBean
 	},
@@ -143,27 +149,27 @@ export default {
 		return {
 			state: 0,
 			userId: '',
-			orderId: '',
+			orderId: 0,
+			shopOrderId: 0,
 			shareCode: '', //分享码
 			shareType: '', //分享登录页过来记录的状态
-			cellPhone: '', //客服电话
 			payStatus: 0,
 			btnStatus: 0, //按钮组件状态
 			onlinePayFlag: '',
-			isRequest: false, //是否加载完成渲染子组件
+			skeletonShow: false, //是否加载完成渲染子组件
 			isOrderShare: false,
 			isShareModal: false,
 			isPayModel: false,
 			modelType: 0,
-			orderInfo: {},
 			alertOrderInfo: {},
 			payModelData: {},
 			addressData: {}, //地址信息初始化
-			information: {}, //订单信息初始化
+			orderInfo: {}, //订单信息初始化
 			shopOrderData: {}, //商品信息初始化
 			orderInvoice: {}, //发票信息初始化
 			returnedPurchaseList: {}, //退款信息初始化
 			discernReceiptList: {}, //支付信息初始化
+			voucherList:[], // 线下支付凭证
 			receiptAmount: 0, //支付金额
 			returnedPurchaseFee: 0, //退款金额
 			rechargeGoods: false,
@@ -184,6 +190,7 @@ export default {
 			beansType: 1,
 			beanNumber: 0,
 			isActivityBean: false,
+			handleModelEven: 0,
 			modal: false,
 			contentModalText: '订单查询失败,请稍候重试~', //操作文字提示语句
 			modalButton: [
@@ -203,7 +210,7 @@ export default {
 	onLoad(option) {
 		console.log(option)
 		this.shareType = option.type
-		this.orderId = option.orderId
+		this.shopOrderId = option.shopOrderId
 		if (this.shareType === 'share') {
 			this.state = 0
 			this.isOrderShare = true
@@ -216,280 +223,270 @@ export default {
 		this.initOrderDetaileData()
 	},
 	filters: {
-		TextFormat(status) {
-			//处理金额
-			let HtmlText,
-				typeTextObject = {
-					0: '待确认',
-					4: '交易完成',
-					5: '订单完成',
-					6: '已关闭',
-					7: '交易全退',
-					77: '交易全退',
-					11: '待付款待发货',
-					12: '待付款部分发货',
-					13: '待付款已发货',
-					21: '部分付款待发货',
-					22: '部分付款部分发货',
-					23: '部分付款已发货',
-					31: '已付款待发货',
-					32: '已付款部分发货',
-					33: '已付款已发货',
-					111: '待付款待发货'
-				}
-			Object.keys(typeTextObject).forEach(key => {
-				if (key == status) {
-					HtmlText = typeTextObject[key]
-				}
-			})
-			return HtmlText
+		statusFilters(value) {
+			//处理订单状态显示
+			const map = {
+				0: '待确认',
+				4: '交易完成',
+				5: '订单完成',
+				6: '已关闭',
+				7: '交易全退',
+				77: '交易全退',
+				11: '待付款待发货',
+				12: '待付款部分发货',
+				13: '待付款已发货',
+				21: '部分付款待发货',
+				22: '部分付款部分发货',
+				23: '部分付款已发货',
+				31: '已付款待发货',
+				32: '已付款部分发货',
+				33: '已付款已发货',
+				111: '待付款待发货'
+			}
+			console.log('value', map[value])
+			return map[value]
 		}
 	},
 	methods: {
-		openclauseConten(id) {
-			this.$api.navigateTo(`/pages/service/sellconten?clauseId=${id}`)
-		},
+		// 获取订单详情
 		async initOrderDetaileData() {
-			const userInfo = await this.$api.getStorage()
-			this.userId = userInfo.userId ? userInfo.userId : 0
-			//初始化页面数据@参数:订单ID
-			this.OrderService.QueryOrderDetails({ orderId: this.orderId, userId: this.userId })
-				.then(response => {
-					let data = response.data
-					this.isRequest = true
-					this.orderInfo = data.order
-					this.shareCode = data.shareCode
-					this.addressData = data.userInfo
-					this.information = data.order
-					this.rechargeGoods = data.order.rechargeGoods
-					this.btnStatus = data.order.status
-					this.payStatus = data.order.payStatus
-					this.payableAmount = data.order.payableAmount
-					this.shopOrderData = data.shopOrderList
-					this.orderInvoice = data.orderInvoice
-					this.onlinePayFlag = data.order.onlinePayFlag
-					this.returnedPurchaseList = data.returnedPurchaseList
-					this.discernReceiptList = data.discernReceiptList
-					this.receiptAmount = data.order.receiptAmount
-					this.returnedPurchaseFee = data.order.returnedPurchaseFee
-					this.clauseData = data.clause
-					// 特殊商品退货须知
-					this.returnGoodsStutas = data.returnGoodsStutas && data.returnGoodsStutas === 2 // 1:可以 2:不可以
-					this.helpContent = data.helpContent
-					if (
-						this.information.orderSubmitType == 0 ||
-						this.information.orderSubmitType == 1 ||
-						this.information.orderSubmitType == 2
-					) {
-						this.orderSubmitType = true
-					} else {
-						this.orderSubmitType = false
-					}
+			try {
+				const userInfo = await this.$api.getStorage()
+				this.userId = userInfo.userId ? userInfo.userId : 0
+				const res = await this.OrderService.QueryOrderDetails({
+					shopOrderId: this.shopOrderId,
+					userId: this.userId
 				})
-				.catch(error => {
-					this.modal = true
-				})
-		},
-		handleClick() {
-			this.modal = false
-			this.$api.switchTabTo('/pages/tabBar/home/index')
+				const data = res.data
+				this.skeletonShow = true
+				this.orderInfo = data.shopOrder
+				// this.shareCode = data.shareCode
+				this.addressData = data.userInfo
+				this.rechargeGoods = data.shopOrder.rechargeGoods
+				this.btnStatus = data.shopOrder.status
+				this.payStatus = data.shopOrder.payStatus
+				this.payableAmount = data.shopOrder.payableAmount
+				this.shopOrderData = data.orderProductList
+				this.orderInvoice = data.orderInvoice
+				this.onlinePayFlag = data.shopOrder.onlinePayFlag
+				this.returnedPurchaseList = data.returnedPurchaseList
+				this.discernReceiptList = data.discernReceiptList
+				this.voucherList = data.voucher
+				this.receiptAmount = data.shopOrder.receiptAmount
+				this.returnedPurchaseFee = data.shopOrder.returnedPurchaseFee
+				this.clauseData = data.clause
+				// 特殊商品退货须知
+				this.returnGoodsStutas = data.returnGoodsStutas && data.returnGoodsStutas === 2 // 1:可以 2:不可以
+				this.helpContent = data.helpContent
+				if (
+					this.orderInfo.orderSubmitType == 0 ||
+					this.orderInfo.orderSubmitType == 1 ||
+					this.orderInfo.orderSubmitType == 2
+				) {
+					this.orderSubmitType = true
+				} else {
+					this.orderSubmitType = false
+				}
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
 		},
+		//判断点击的按钮类型并执行...
 		handButtonConfirm(data) {
-			//监听点击时间的按钮类型并执行...
-			this.handShowAlert(data)
-		},
-		handShowAlert(data) {
-			//判断点击的按钮类型并执行...
 			switch (data.type) {
-				case 'delete':
-					this.handOrderDetele()
+				case 'cancel': //取消订单
+					this.modal = true
+					this.contentModalText = '确认取消该订单吗?'
+					this.handleModelEven = 1
 					break
-				case 'cancel':
-					this.handCenceConfirm()
+				case 'confirm': //确认收货
+					this.modal = true
+					this.contentModalText = '确认收货吗?'
+					this.handleModelEven = 2
 					break
-				case 'query':
-					this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + this.orderId)
+				case 'delete': //删除订单
+					this.modal = true
+					this.contentModalText = '确认删除该订单吗?'
+					this.handleModelEven = 3
+					break
+				case 'confirmation': // 确认订单
+					this.modal = true
+					this.contentModalText = '确认此订单吗?'
+					this.handleModelEven = 4
 					break
-				case 'confirm':
-					this.handOrderConfirm()
+				case 'payment': //打款给供应商
+					this.modal = true
+					this.contentModalText = '确定委托采美平台打款给供应商吗?确定之前请务必确保货品完好!'
+					this.handleModelEven = 5
 					break
 				case 'pay':
 					this.getOrderPaymentValidation(data)
 					break
-				case 'confirmation':
-					this.handOrderConfirmation()
-					break
-				case 'payment':
-					this.hanldConfirmFn(data.orderId)
+				case 'query':
+					this.$api.navigateTo('/pages/user/order/order-logistics?shopOrderId=' + this.shopOrderId)
 					break
 			}
 		},
-		getOrderPaymentValidation(data) {
-			//监听根据付款状态做操作
-			this.OrderService.OrderPaymentValidation({ orderId: data.orderId })
-				.then(response => {
-					let data = response.data
-					this.payModelData = data
-					if (data.balanceFlag == 1) {
-						// 0可以走余额抵扣,1不能走余额抵扣
-						this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
-					} else {
-						switch (data.code) {
-							case 1:
-								this.isPayModel = true
-								this.modelType = 1
-								break
-							case 2:
-								this.isPayModel = true
-								this.modelType = 2
-								break
-							case -1:
-								this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
-								break
-							default:
-								if (data.onlinePayFlag == 1) {
-									// 只能线下
-									this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${data.orderId}`)
-								} else {
-									this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
-								}
-						}
-					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+		handleClick(e) {
+			//确认操作
+			if (e.index == 1) {
+				switch (this.handleModelEven) {
+					case 1: //取消订单
+						this.cancelOrder(this.shopOrderId)
+						break
+					case 2: //确认收货
+						this.confirmReceipt(this.shopOrderId)
+						break
+					case 3: //删除订单
+						this.deleteOrder(this.shopOrderId)
+						break
+					case 4: //确认订单
+						this.affirmOrder(this.shopOrderId)
+						break
+					case 5: //打款给供应商
+						this.confirmpayment(this.shopOrderId)
+						break
+				}
+			}
+			this.modal = false
+		},
+		//取消订单
+		async cancelOrder(shopOrderId) {
+			try {
+				const res = await this.OrderService.CancelOrder({ shopOrderId: shopOrderId, userIdentity: 0 })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.initOrderDetaileData()
+				}, 2000)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//确认收货
+		async confirmReceipt(shopOrderId) {
+			try {
+				const res = await this.OrderService.ConfirmReceipt({ shopOrderId: shopOrderId })
+				this.beansType = 7
+				this.beanNumber = 100
+				this.isActivityBean = true
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
 		},
-		hanldPaymentConfirm(data) {
-			//余额抵扣跳转
-			this.OrderService.OrderBalanceDeduction({ orderId: data.order.orderId })
-				.then(response => {
-					if (data.type === 2) {
-						let _data = { orderId: data.order.orderId }
-						this.$api.navigateTo(
-							`/pages/user/order/success?type=deduction&data=${JSON.stringify({ data: _data })}`
-						)
+		//删除订单
+		async deleteOrder(shopOrderId) {
+			try {
+				const res = await this.OrderService.DeleteOrder({ shopOrderId: shopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					if (this.shareType === 'share') {
+						this.$api.switchTabTo('/pages/tabBar/home/index')
 					} else {
-						this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${data.order.orderId}`)
+						this.$api.redirectTo(`/pages/user/order/order-list?type=detele&state=${this.state}`)
 					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+				}, 2000)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
 		},
-		hanldCancelConfirm(data) {
-			//不使用余额抵扣直接跳转收银台
-			if (data.onlinePayFlag == 1) {
-				// 只能线下
-				this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${data.orderId}`)
-			} else {
-				this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
+		//确认订单
+		async affirmOrder(shopOrderId) {
+			try {
+				const res = await this.OrderService.AffirmOrder({ shopOrderId: shopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.initOrderDetaileData()
+				}, 2000)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
 			}
 		},
-		hanldConfirmFn(orderId) {
-			//确认打款供应商
-			this.$util.modal(
-				'提示',
-				'确定委托采美平台打款给供应商吗?确定之前请务必确保货品完好?',
-				'确定',
-				'取消',
-				true,
-				() => {
-					this.OrderService.confirmpayment({ orderId: orderId, userId: this.userId })
-						.then(response => {
-							this.$util.msg('确认成功', 2000, true, 'success')
-							setTimeout(() => {
-								this.getOrderDatainit(this.currentTab)
-							}, 2000)
-						})
-						.catch(error => {
-							this.$util.msg(error.msg, 2000)
-						})
-				}
-			)
+		//确认打款给供应商
+		async confirmpayment(shopOrderId) {
+			try {
+				const res = await this.OrderService.confirmpayment({ shopOrderId: shopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.initOrderDetaileData()
+				}, 2000)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
 		},
-		handOrderConfirm() {
-			//确认收货
-			this.$util.modal('提示', '是否确认收货', '确定', '取消', true, () => {
-				this.OrderService.ConfirmReceipt({ orderId: this.orderId })
-					.then(response => {
-						this.beansType = 7
-						this.beanNumber = 100
-						this.isActivityBean = true
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		//监听根据付款状态做操作
+		async getOrderPaymentValidation(data) {
+			try {
+				const res = await this.OrderService.OrderPaymentValidation({ shopOrderId: data.shopOrderId })
+				const data = res.data
+				this.payModelData = data
+				if (data.balanceFlag == 1) {
+					// 0可以走余额抵扣,1不能走余额抵扣
+					this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
+				} else {
+					switch (data.code) {
+						case 1:
+							this.isPayModel = true
+							this.modelType = 1
+							break
+						case 2:
+							this.isPayModel = true
+							this.modelType = 2
+							break
+						case -1:
+							this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
+							break
+						default:
+							this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
+					}
+				}
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
 		},
-		handOrderConfirmation() {
-			//确认订单
-			this.$util.modal('提示', '确认此订单?', '确定', '取消', true, () => {
-				this.OrderService.AffirmOrder({ orderId: this.orderId })
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						setTimeout(() => {
-							this.initOrderDetaileData()
-						}, 2000)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		//余额抵扣跳转
+		async hanldPaymentConfirm(data) {
+			try {
+				await this.OrderService.OrderBalanceDeduction({ shopOrderId: data.order.shopOrderId })
+				const data = { shopOrderId: data.order.shopOrderId }
+				if (data.type === 2) {
+					this.$api.navigateTo(
+						`/pages/user/order/success?type=deduction&data=${JSON.stringify({ data: data })}`
+					)
+				} else {
+					this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.order.orderId}`)
+				}
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
 		},
-		handOrderDetele() {
-			//删除订单
-			this.$util.modal('提示', '确认删除该订单吗?', '确定', '取消', true, () => {
-				this.OrderService.DeleteOrder({ orderId: this.orderId })
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						setTimeout(() => {
-							if (this.shareType === 'share') {
-								this.$api.switchTabTo('/pages/tabBar/home/index')
-							} else {
-								this.$api.redirectTo(`/pages/user/order/order-list?type=detele&state=${this.state}`)
-							}
-						}, 500)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		//不使用余额抵扣直接跳转收银台
+		hanldCancelConfirm(data) {
+			this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
 		},
-		handCenceConfirm() {
-			//取消订单
-			this.$util.modal('提示', '确认取消该订单吗?', '确定', '取消', true, () => {
-				this.OrderService.CancelOrder({ orderId: this.orderId, userIdentity: 0 })
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						setTimeout(() => {
-							this.initOrderDetaileData()
-						}, 2000)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		// 查看售后条款
+		openclauseConten(id) {
+			this.$api.navigateTo(`/pages/service/sellconten?clauseId=${id}`)
 		},
+		//分享订单
 		onShareAppMessage(res) {
-			//分享转发
 			this.isShareModal = false
 			if (res.from === 'button') {
 				// 来自页面内转发按钮
 			}
 			return {
 				title: '您有新的分享订单,快来查看吧~',
-				path: `/pages/user/order/order-sharelogin?orderId=${this.orderId}&userId=${this.userId}`,
+				path: `/pages/user/order/order-sharelogin?shopOrderId=${this.shopOrderId}&userId=${this.userId}`,
 				imageUrl: 'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
 			}
 		},
+		// 监听活动内容
 		hanldePopupFn(data) {
-			//监听活动内容
 			this.popupShow = true
 			this.handlerPros = data
 		},
+		// 设置状态栏高度
 		getHeaderTopHeight() {
-			let statusBarHeight = this.systeminfo.statusBarHeight // 状态栏高度
+			let statusBarHeight = this.systeminfo.statusBarHeight
 			let headerPosi = this.headerBtnPosi
 			let btnPosi = {
 				// 胶囊实际位置,坐标信息不是左上角原点
@@ -504,10 +501,9 @@ export default {
 			}
 			this.navbarHeight = headerPosi.bottom + btnPosi.bottom // 原胶囊bottom + 现胶囊bottom
 		},
+		// 获得胶囊按钮位置信息
 		setHeaderBtnPosi() {
-			// 获得胶囊按钮位置信息
-			let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
-			return headerBtnPosi
+			return uni.getMenuButtonBoundingClientRect()
 		},
 		setSysteminfo() {
 			let systeminfo

+ 394 - 396
pages/user/order/order-list.vue

@@ -7,107 +7,104 @@
 			:headerBtnPosi="headerBtnPosi"
 			:isDelete="isDelete"
 			@goSearchPath="handlSearchPath"
-		></header-back>
-		<view class="order-section-top" :style="{ marginTop: navbarHeight + 'px' }">
-			<scroll-view scroll-x scroll-with-animation class="tab-view" :scroll-left="scrollLeft">
-				<view
-					v-for="(item, index) in orderTabBar"
-					:key="index"
-					class="tab-bar-item"
-					:class="[currentTab == index ? 'active' : '']"
-					:data-current="index"
-					@tap.stop="onClickTab"
-				>
-					<text class="tab-bar-title">{{ item.text }}</text>
-				</view>
-			</scroll-view>
-		</view>
-		<swiper
-			class="tab-content"
-			:current="currentTab"
-			duration="80"
-			@animationfinish="onChange"
-			:style="{ height: winHeight + 'px' }"
-		>
-			<swiper-item v-for="(tabItem, index) in orderTabBar" :key="index">
-				<tui-skeleton
-					v-if="skeletonShow"
-					backgroundColor="#fafafa"
-					borderRadius="10rpx"
-					:isLoading="false"
-					:loadingType="5"
-				></tui-skeleton>
-				<scroll-view scroll-y class="scoll-y tui-skeleton" @scrolltolower="scrolltolower">
-					<view :class="{ 'tui-order-list': scrollTop >= 0 }" class="tui-skeleton clearfix">
-						<!-- 空白页 -->
-						<empty
-							v-if="tabItem.loaded === true && tabItem.orderList.length === 0"
-							:typeIndex="currentTab"
-							:navbarHeight="navbarHeight"
-						></empty>
-						<!-- 列表 -->
-						<view v-else class="tui-order-content">
-							<view
-								class="tui-order-item"
-								v-for="(order, orderIndex) in tabItem.orderList"
-								:key="orderIndex"
-							>
-								<view class="order-title">
-									<view class="order-title-t">
-										<text
-											class="bage-buss tui-skeleton-fillet"
-											v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4"
-											>协销</text
-										>
-										<text
-											class="bage-auto tui-skeleton-fillet"
-											v-if="
-												order.orderSubmitType == 0 ||
-													order.orderSubmitType == 1 ||
-													order.orderSubmitType == 2
-											"
-											>自主</text
-										>
-										<text class="bage-text tui-skeleton-fillet">订单编号:{{ order.orderNo }}</text>
-										<image
-											class="bage-icon"
-											src="https://static.caimei365.com/app/img/icon/icon-type@3x.png"
-											mode="widthFix"
-											v-if="order.secondHandOrderFlag == 1"
-										></image>
-									</view>
-									<view class="order-title-b">
-										<view class="order-title-btxt tui-skeleton-fillet"
-											>下单时间:{{ order.orderTime }}</view
-										>
-										<view class="order-title-tip tui-skeleton-fillet">{{
-											StateExpFormat(order.status)
-										}}</view>
+		/>
+		<tui-skeleton
+			v-if="skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="5"
+		/>
+		<template v-else>
+			<view class="order-section-top" :style="{ marginTop: navbarHeight + 'px' }">
+				<scroll-view scroll-x scroll-with-animation class="tab-view" :scroll-left="scrollLeft">
+					<view
+						v-for="(item, index) in orderTabBar"
+						:key="index"
+						class="tab-bar-item"
+						:class="[currentTab == index ? 'active' : '']"
+						:data-current="index"
+						@tap.stop="onClickTab"
+					>
+						<text class="tab-bar-title">{{ item.text }}</text>
+					</view>
+				</scroll-view>
+			</view>
+			<swiper
+				class="tab-content"
+				:current="currentTab"
+				duration="80"
+				@animationfinish="onChange"
+				:style="{ height: winHeight + 'px' }"
+			>
+				<swiper-item v-for="(tabItem, index) in orderTabBar" :key="index">
+					<scroll-view scroll-y class="scoll-y tui-skeleton" @scrolltolower="scrolltolower">
+						<view :class="{ 'tui-order-list': scrollTop >= 0 }" class="tui-skeleton clearfix">
+							<!-- 空白页 -->
+							<empty
+								v-if="tabItem.loaded === true && tabItem.orderList.length === 0"
+								:typeIndex="currentTab"
+								:navbarHeight="navbarHeight"
+							/>
+							<!-- 列表 -->
+							<view v-else class="tui-order-content">
+								<view
+									class="tui-order-item"
+									v-for="(order, orderIndex) in tabItem.orderList"
+									:key="orderIndex"
+								>
+									<view class="order-title">
+										<view class="order-title-t">
+											<text
+												class="bage-buss tui-skeleton-fillet"
+												v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4"
+												>协销</text
+											>
+											<text
+												class="bage-auto tui-skeleton-fillet"
+												v-if="
+													order.orderSubmitType == 0 ||
+														order.orderSubmitType == 1 ||
+														order.orderSubmitType == 2
+												"
+												>自主</text
+											>
+											<text class="bage-text tui-skeleton-fillet">订单编号:{{ order.orderNo }}</text>
+											<image
+												class="bage-icon"
+												src="https://static.caimei365.com/app/img/icon/icon-type@3x.png"
+												mode="widthFix"
+												v-if="order.secondHandOrderFlag == 1"
+											></image>
+										</view>
+										<view class="order-title-b">
+											<view class="order-title-btxt tui-skeleton-fillet"
+												>下单时间:{{ order.orderTime }}</view
+											>
+											<view class="order-title-tip tui-skeleton-fillet">{{
+												StateExpFormat(order.status)
+											}}</view>
+										</view>
 									</view>
-								</view>
-								<block v-for="(shop, sindex) in order.shopOrderList" :key="sindex">
 									<view class="goods-title">
-										<view v-if="shop.shopPromotion" class="floor-item-act">
-											<view class="floor-tags">{{ shop.shopPromotion.name }}</view>
+										<view v-if="order.shopPromotion" class="floor-item-act">
+											<view class="floor-tags">{{ order.shopPromotion.name }}</view>
 										</view>
 										<view class="title-text" v-if="order.secondHandOrderFlag == 1"
-											>{{ shop.shopName }}
+											>{{ order.shopName }}
 											<label class="paymenttext" v-if="order.affirmPaymentFlag == 1"
 												>已确认打款供应商</label
 											>
 										</view>
-										<view
-											class="title-text tui-skeleton-fillet"
-											v-else
-											@click="goShophome(shop)"
-											>{{ shop.shopName }}<label class="iconfont icon-jinrudianpu"></label
+										<view class="title-text tui-skeleton-fillet" v-else @click="goShophome(order)"
+											>{{ order.shopName }}<label class="iconfont icon-jinrudianpu"></label
 										></view>
 									</view>
 									<view
 										class="goods-item"
-										v-for="(pros, prosIndex) in shop.orderProductList"
+										v-for="(pros, prosIndex) in order.orderProductList"
 										:key="prosIndex"
-										@click.stop="detail(order.orderId)"
+										@click.stop="detail(order.shopOrderId)"
 									>
 										<view class="goods-pros-t">
 											<view class="pros-img tui-skeleton-fillet">
@@ -177,49 +174,46 @@
 											</view>
 										</view>
 									</view>
-								</block>
-								<view class="order-footer">
-									<view class="order-footer-top" v-if="order.discountFee != 0"
-										>经理折扣:¥{{ order.discountFee | NumFormat }}</view
-									>
-									<view class="order-footer-bot">
-										<view class="count tui-skeleton-fillet">共{{ order.productCount }}件商品</view>
-										<view
-											class="money tui-skeleton-fillet"
-											v-if="order.status == 31 || order.status == 32 || order.status == 33"
-										>
-											已支付:<label style="color:#f94b4b ;"
-												>¥{{ order.receiptAmount | NumFormat }}</label
-											>
-										</view>
-										<view class="money tui-skeleton-fillet" v-else>
-											待付总额:<label style="color:#f94b4b ;"
-												>¥{{ order.pendingPayments | NumFormat }}</label
+									<view class="order-footer">
+										<view class="order-footer-bot">
+											<view class="count tui-skeleton-fillet">共{{ order.itemCount }}件商品</view>
+											<view
+												class="money tui-skeleton-fillet"
+												v-if="order.status == 31 || order.status == 32 || order.status == 33"
 											>
+												已支付:<label style="color:#f94b4b ;"
+													>¥{{ order.receiptAmount | NumFormat }}</label
+												>
+											</view>
+											<view class="money tui-skeleton-fillet" v-else>
+												待付总额:<label style="color:#f94b4b ;"
+													>¥{{ order.obligation | NumFormat }}</label
+												>
+											</view>
 										</view>
 									</view>
+									<!-- 底部button -->
+									<cm-list-button
+										ref="orderButton"
+										:status="order.status"
+										:order="order"
+										@buttonConfirm="handButtonConfirm"
+									/>
 								</view>
-								<!-- 底部button -->
-								<cm-list-button
-									ref="orderButton"
-									:status="order.status"
-									:order="order"
-									@buttonConfirm="handButtonConfirm"
+								<!--加载loadding-->
+								<tui-loadmore :visible="loadding" :index="3" type="black"/>
+								<tui-nomore
+									:visible="!pullUpOn"
+									:backgroundColor="'#ffffff'"
+									:text="nomoreText"
 								/>
+								<!--加载loadding-->
 							</view>
-							<!--加载loadding-->
-							<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
-							<tui-nomore
-								:visible="!pullUpOn"
-								:backgroundColor="'#ffffff'"
-								:text="nomoreText"
-							></tui-nomore>
-							<!--加载loadding-->
 						</view>
-					</view>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
+					</scroll-view>
+				</swiper-item>
+			</swiper>
+		</template>
 		<!-- 付款弹窗 -->
 		<cm-orderpay-popup
 			v-if="isPayModel"
@@ -229,7 +223,7 @@
 			@paymentConfirm="hanldPaymentConfirm"
 		/>
 		<!-- 分享弹窗 -->
-		<cm-share-popup :orderId="btnoRderID" v-if="isShareModal" @shareConfirm="onShareAppMessage" />
+		<cm-share-popup :shopOrderId="handleShopOrderId" v-if="isShareModal" @shareConfirm="onShareAppMessage" />
 		<!-- 采美豆提示弹窗 -->
 		<activityBean
 			v-if="isActivityBean"
@@ -238,8 +232,19 @@
 			:beanNumber="beanNumber"
 			@cancel="handleBeanlClick"
 		/>
+		<!-- 提示弹窗 -->
+		<tui-modal
+			:show="modal"
+			@click="handleClick"
+			:content="contentModalText"
+			:button="modalButton"
+			color="#333"
+			:size="32"
+			shape="circle"
+			:maskClosable="false"
+		/>
 		<!-- 透明模态层 -->
-		<modal-layer v-if="isModalLayer"/>
+		<modal-layer v-if="isModalLayer" />
 	</view>
 </template>
 
@@ -250,7 +255,7 @@ import modalLayer from '@/components/modal-layer'
 import empty from '@/components/empty'
 import cmListButton from './components/cm-list-button' //底部按钮
 import cmSharePopup from './components/cm-share-popup' //分享弹窗
-import cmPrderpayPopup from './components/cm-orderpay-popup' //付款弹窗
+import cmOrderpayPopup from './components/cm-orderpay-popup' //付款弹窗
 import activityBean from '@/components/cm-module/activity/activityBean.vue'
 
 export default {
@@ -261,7 +266,7 @@ export default {
 		btSearch,
 		cmListButton,
 		cmSharePopup,
-		cmPrderpayPopup,
+		cmOrderpayPopup,
 		activityBean
 	},
 	data() {
@@ -286,11 +291,13 @@ export default {
 			winHeight: '', //窗口高度
 			currentTab: 0, //预设当前项的值
 			scrollLeft: 0, //tab标题的滚动条位置
-			userId: 0,
+			listQuery: {
+				orderState: 0,
+				userId: 0,
+				pageNum: 1,
+				pageSize: 10
+			},
 			orderData: [],
-			btnoRderID: 0, //点击按钮传入的的订单ID
-			pageNum: 1, //页数
-			pageSize: 10, //条数
 			scrollTop: 0,
 			skeletonShow: true,
 			isDelete: false,
@@ -304,13 +311,31 @@ export default {
 			pullFlag: true,
 			navbarHeight: '',
 			payModelData: {},
-			hanldOrderData: {},
 			modelType: 0,
 			nomoreText: '上拉显示更多',
 			isOnloadFlag: false,
 			beansType: 1,
 			beanNumber: 0,
-			isActivityBean: false
+			isActivityBean: false,
+			handleShopOrderId: 0, //点击按钮传入的的子订单ID
+			handleModelEven: 0,
+			modal: false,
+			contentModalText: '订单查询失败,请稍候重试~', //操作文字提示语句
+			modalButton: [
+				{
+					text: '取消',
+					type: 'gray',
+					plain: true //是否空心
+				},
+				{
+					text: '确定',
+					customStyle: {
+						color: '#fff',
+						bgColor: 'linear-gradient(90deg, #F28F31 0%, #FF5B00 100%)'
+					},
+					plain: false
+				}
+			]
 		}
 	},
 	onLoad(e) {
@@ -321,13 +346,7 @@ export default {
 		this.currentTab = e.state
 		this.isOnloadFlag = true
 		this.getHeaderTopHeight() //设置自定义导航高度
-		//  高度自适应
-		uni.getSystemInfo({
-			success: function(res) {
-				let calc = res.windowHeight
-				self.winHeight = calc - self.CustomBar
-			}
-		})
+		this.initStorage()
 	},
 	filters: {
 		NumFormat(value) {
@@ -336,11 +355,11 @@ export default {
 		}
 	},
 	methods: {
-		goShophome(shop) {
-			if(shop.shopType === 2){
-				return
-			}
-			this.$api.navigateTo(`/pages/supplier/user/my-shop?shopId=${shop.shopId}`)
+		async initStorage() {
+			//初始化
+			const usrInfo = await this.$api.getStorage()
+			this.listQuery.userId = usrInfo.userId ? usrInfo.userId : 0
+			this.getOrderDatainit(this.currentTab)
 		},
 		// 滚动切换标签样式
 		onChange: function(e) {
@@ -353,7 +372,6 @@ export default {
 			this.isClickChange = false
 			this.currentTab = index
 			this.checkCor()
-			this.pageNum = 1
 			this.pullUpOn = true //切换时隐藏
 			this.loadding = false //切换时隐藏
 			this.nomoreText = ''
@@ -362,21 +380,20 @@ export default {
 			}
 		},
 		// 点击标题切换当前页时改变样式
-		onClickTab: function(e) {
+		onClickTab(e) {
 			let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current
 			if (this.currentTab === tabIndex) {
 				return false
 			} else {
 				this.isClickChange = true
 				this.currentTab = tabIndex
-				this.pageNum = 1
 				this.pullUpOn = true //切换时隐藏
 				this.loadding = false //切换时隐藏
 				this.getOrderDatainit(this.currentTab)
 			}
 		},
 		//判断当前滚动超过一屏时,设置tab标题滚动条。
-		checkCor: function() {
+		checkCor() {
 			if (this.currentTab > 3) {
 				//这里距离按实际计算
 				this.scrollLeft = 300
@@ -384,276 +401,255 @@ export default {
 				this.scrollLeft = 0
 			}
 		},
-		getOrderDatainit(index, source) {
-			/**
-			 * @订单初始化加载  仅加载第一页码
-			 * @param:orderState(订单状态:0全部,1待付款,2待发货,3已发货,4退货款)
-			 * @param:userId(用户ID)
-			 * @param:pageNum(页码数)
-			 * @param:pageSize(每页条数)
-			 * @param:organizeID(全局变量组织ID)
-			 */
-
-			setTimeout(() => {
-				this.skeletonShow = false
-				this.isOnloadFlag = false
-			}, 1500)
+		async getOrderDatainit(index, source) {
 			let orderItem = this.orderTabBar[index]
 			if (source === 'tabChange' && orderItem.loaded === true) {
 				//tab切换只有第一次需要加载数据
 				return
 			}
-			setTimeout(() => {
-				this.$api.getStorage().then(resolve => {
-					this.userId = resolve.userId ? resolve.userId : 0
-					let params = { orderState: index, userId: this.userId, pageNum: 1, pageSize: this.pageSize }
-					this.OrderService.QueryOrderList(params)
-						.then(response => {
-							let data = response.data
-							let orderList = data.list.filter(item => {
-								//添加不同状态下订单的表现形式
-								item = Object.assign(item, this.StateExpFormat(item.status))
-								return item
-							})
-							orderItem.orderList = []
-							orderList.forEach(item => {
-								orderItem.orderList.push(item)
-							})
-							//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
-							this.$set(orderItem, 'loaded', true)
-							this.hasNextPage = data.hasNextPage
-							if (this.hasNextPage) {
-								this.pullUpOn = false
-								this.nomoreText = '上拉显示更多'
-							} else {
-								if (orderItem.orderList.length < 2) {
-									this.pullUpOn = true
-								} else {
-									this.pullUpOn = false
-									this.nomoreText = '已至底部'
-								}
-							}
-						})
-						.catch(error => {
-							this.$util.msg(error.msg, 2000)
-						})
+			try {
+				this.listQuery.pageNum = 1
+				this.listQuery.orderState = index
+				const res = await this.OrderService.QueryOrderList(this.listQuery)
+				const data = res.data
+				const orderList = data.list.filter(item => {
+					//添加不同状态下订单的表现形式
+					item = Object.assign(item, this.StateExpFormat(item.status))
+					return item
 				})
-			}, 600)
-		},
-		getOnReachBottomData(index) {
-			//上拉加载
-			this.pageNum += 1
-			let params = { orderState: index, userId: this.userId, pageNum: this.pageNum, pageSize: this.pageSize }
-			this.OrderService.QueryOrderList(params)
-				.then(response => {
-					let data = response.data
-					let orderItem = this.orderTabBar[index]
-					this.hasNextPage = data.hasNextPage
-					orderItem.orderList = orderItem.orderList.concat(data.list)
-					this.pullFlag = false // 防上拉暴滑
-					setTimeout(() => {
-						this.pullFlag = true
-					}, 500)
-					if (this.hasNextPage) {
-						this.pullUpOn = false
-						this.nomoreText = '上拉显示更多'
+				orderItem.orderList = []
+				orderList.forEach(item => {
+					orderItem.orderList.push(item)
+				})
+				//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
+				this.$set(orderItem, 'loaded', true)
+				this.hasNextPage = data.hasNextPage
+				if (this.hasNextPage) {
+					this.pullUpOn = false
+					this.nomoreText = '上拉显示更多'
+				} else {
+					if (orderItem.orderList.length < 2) {
+						this.pullUpOn = true
 					} else {
-						this.loadding = false
 						this.pullUpOn = false
 						this.nomoreText = '已至底部'
 					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
-		},
-		scrolltolower() {
-			if (this.hasNextPage) {
-				this.loadding = true
-				this.pullUpOn = true
-				this.getOnReachBottomData(this.currentTab)
+				}
+				this.skeletonShow = false
+				this.isOnloadFlag = false
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
 			}
 		},
-		detail(orderId) {
-			//订单详情跳转
-			this.isModalLayer = true
-			this.$api.navigateTo(`/pages/user/order/order-details?state=${this.currentTab}&orderId=${orderId}`)
+		async getOnReachBottomData(index) {
+			//上拉加载
+			try {
+				this.listQuery.pageNum += 1
+				this.listQuery.orderState = index
+				const res = await this.OrderService.QueryOrderList(this.listQuery)
+				const data = res.data
+				const orderItem = this.orderTabBar[index]
+				this.hasNextPage = data.hasNextPage
+				orderItem.orderList = orderItem.orderList.concat(data.list)
+				this.pullFlag = false // 防上拉暴滑
+				setTimeout(() => {
+					this.pullFlag = true
+				}, 500)
+				if (this.hasNextPage) {
+					this.pullUpOn = false
+					this.nomoreText = '上拉显示更多'
+				} else {
+					this.loadding = false
+					this.pullUpOn = false
+					this.nomoreText = '已至底部'
+				}
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
 		},
 		handButtonConfirm(data) {
 			//获取点击
-			this.handShowAlert(data)
-			this.btnoRderID = data.orderId
-		},
-		handShowAlert(data) {
-			//执行
+			this.handleShopOrderId = data.shopOrderId
 			switch (data.type) {
-				case 'delete':
-					this.handOrderDetele(data.orderId)
+				case 'cancel': //取消订单
+					this.modal = true
+					this.contentModalText = '确认取消该订单吗?'
+					this.handleModelEven = 1
 					break
-				case 'cancel':
-					this.handCenceConfirm(data.orderId)
+				case 'confirm': //确认收货
+					this.modal = true
+					this.contentModalText = '确认收货吗?'
+					this.handleModelEven = 2
 					break
-				case 'query':
-					this.isModalLayer = true
-					this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
+				case 'delete': //删除订单
+					this.modal = true
+					this.contentModalText = '确认删除该订单吗?'
+					this.handleModelEven = 3
 					break
-				case 'confirm':
-					this.handOrderConfirm(data.orderId)
+				case 'confirmation': // 确认订单
+					this.modal = true
+					this.contentModalText = '确认此订单吗?'
+					this.handleModelEven = 4
+					break
+				case 'payment': //打款给供应商
+					this.modal = true
+					this.contentModalText = '确定委托采美平台打款给供应商吗?确定之前请务必确保货品完好!'
+					this.handleModelEven = 5
 					break
 				case 'pay':
-					this.hanldOrderData = data.order
 					this.getOrderPaymentValidation(data)
 					break
-				case 'confirmation':
-					this.handOrderConfirmation(data.orderId)
-					break
-				case 'payment':
-					this.hanldConfirmFn(data.orderId)
+				case 'query':
+					this.isModalLayer = true
+					this.$api.navigateTo('/pages/user/order/order-logistics?shopOrderId=' + data.shopOrderId)
 					break
 			}
 		},
-		getOrderPaymentValidation(data) {
-			//监听根据付款状态做操作
-			this.OrderService.OrderPaymentValidation({ orderId: data.orderId })
-				.then(response => {
-					let data = response.data
-					this.payModelData = data
-					if(data.balanceFlag == 1){// 0可以走余额抵扣,1不能走余额抵扣
-						this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
-					}else{
-						switch (data.code) {
-							case 1:
-								this.isPayModel = true
-								this.modelType = 1
-								break
-							case 2:
-								this.isPayModel = true
-								this.modelType = 2
-								break
-							case -1:
-								this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
-								break
-							default:
-								if (data.onlinePayFlag == 1) {// 只能线下
-									this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${data.orderId}`)
-								} else {
-									this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
-								}
-						}
-					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+		handleClick(e) {
+			//确认操作
+			if (e.index == 1) {
+				switch (this.handleModelEven) {
+					case 1: //取消订单
+						this.cancelOrder(this.handleShopOrderId)
+						break
+					case 2: //确认收货
+						this.confirmReceipt(this.handleShopOrderId)
+						break
+					case 3: //删除订单
+						this.deleteOrder(this.handleShopOrderId)
+						break
+					case 4: //确认订单
+						this.affirmOrder(this.handleShopOrderId)
+						break
+					case 5: //打款给供应商
+						this.confirmpayment(this.handleShopOrderId)
+						break
+				}
+			}
+			this.modal = false
 		},
-		hanldPaymentConfirm(data) {
-			//余额抵扣跳转
-			this.OrderService.OrderBalanceDeduction({ orderId: data.order.orderId })
-				.then(response => {
-					if (data.type === 2) {
-						let _data = { orderId: data.order.orderId }
-						this.$api.navigateTo(
-							`/pages/user/order/success?type=deduction&data=${JSON.stringify({ data: _data })}`
-						)
-					} else {
-						this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${data.order.orderId}`)
-					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+		//取消订单
+		async cancelOrder(shopOrderId) {
+			try {
+				const res = await this.OrderService.CancelOrder({ shopOrderId: shopOrderId, userIdentity: 0 })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.getOrderDatainit(this.currentTab)
+				}, 2000)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
 		},
-		hanldCancelConfirm(data) {
-			//不使用余额抵扣直接跳转收银台
-			if (data.onlinePayFlag === 1) {// 只能线下
-				this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${data.orderId}`)
-			} else {
-				this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
+		//确认收货
+		async confirmReceipt(shopOrderId) {
+			try {
+				const res = await this.OrderService.ConfirmReceipt({ shopOrderId: shopOrderId })
+				this.beansType = 7
+				this.beanNumber = 100
+				this.isActivityBean = true
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//删除订单
+		async deleteOrder(shopOrderId) {
+			try {
+				const res = await this.OrderService.DeleteOrder({ shopOrderId: shopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.getOrderDatainit(this.currentTab)
+				}, 2000)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
 			}
 		},
-		hanldConfirmFn(orderId) {
-			//确认打款供应商
-			this.$util.modal(
-				'提示',
-				'确定委托采美平台打款给供应商吗?确定之前请务必确保货品完好?',
-				'确定',
-				'取消',
-				true,
-				() => {
-					this.OrderService.confirmpayment({ orderId: orderId })
-						.then(response => {
-							this.$util.msg('确认成功', 2000, true, 'success')
-							setTimeout(() => {
-								this.getOrderDatainit(this.currentTab)
-							}, 2000)
-						})
-						.catch(error => {
-							this.$util.msg(error.msg, 2000)
-						})
+		//确认订单
+		async affirmOrder(shopOrderId) {
+			try {
+				const res = await this.OrderService.AffirmOrder({ shopOrderId: shopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.getOrderDatainit(this.currentTab)
+				}, 2000)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//确认打款给供应商
+		async confirmpayment(shopOrderId) {
+			try {
+				const res = await this.OrderService.confirmpayment({ shopOrderId: shopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.getOrderDatainit(this.currentTab)
+				}, 2000)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//监听根据付款状态做操作
+		async getOrderPaymentValidation(data) {
+			try {
+				const res = await this.OrderService.OrderPaymentValidation({ shopOrderId: data.shopOrderId })
+				const data = res.data
+				this.payModelData = data
+				if (data.balanceFlag == 1) {
+					// 0可以走余额抵扣,1不能走余额抵扣
+					this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
+				} else {
+					switch (data.code) {
+						case 1:
+							this.isPayModel = true
+							this.modelType = 1
+							break
+						case 2:
+							this.isPayModel = true
+							this.modelType = 2
+							break
+						case -1:
+							this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
+							break
+						default:
+							this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
+					}
 				}
-			)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
 		},
-		handOrderConfirm(orderId) {
-			//确认收货
-			this.$util.modal('提示', '是否确认收货', '确定', '取消', true, () => {
-				this.OrderService.ConfirmReceipt({ orderId: orderId })
-					.then(response => {
-						this.beansType = 7
-						this.beanNumber = 100
-						this.isActivityBean = true
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		//余额抵扣跳转
+		async hanldPaymentConfirm(data) {
+			try {
+				await this.OrderService.OrderBalanceDeduction({ shopOrderId: data.order.shopOrderId })
+				const data = { shopOrderId: data.order.shopOrderId }
+				if (data.type === 2) {
+					this.$api.navigateTo(
+						`/pages/user/order/success?type=deduction&data=${JSON.stringify({ data: data })}`
+					)
+				} else {
+					this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.order.orderId}`)
+				}
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
 		},
-		handOrderConfirmation(orderId) {
-			//确认订单
-			this.$util.modal('提示', '确认此订单?', '确定', '取消', true, () => {
-				this.OrderService.AffirmOrder({ orderId: orderId })
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						setTimeout(() => {
-							this.getOrderDatainit(this.currentTab)
-						}, 2000)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		hanldCancelConfirm(data) {
+			//不使用余额抵扣直接跳转收银台
+			this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
 		},
-		handOrderDetele(orderId) {
-			//删除订单
-			this.$util.modal('提示', '确认删除该订单吗?', '确定', '取消', true, () => {
-				this.OrderService.DeleteOrder({ orderId: orderId })
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						setTimeout(() => {
-							this.getOrderDatainit(this.currentTab)
-						}, 2000)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		goShophome(order) {
+			if (order.shopType === 2) {
+				return
+			}
+			this.$api.navigateTo(`/pages/supplier/user/my-shop?shopId=${order.shopId}`)
 		},
-		handCenceConfirm(orderId) {
-			//取消订单
-			this.$util.modal('提示', '确认取消该订单吗?', '确定', '取消', true, () => {
-				this.OrderService.CancelOrder({ orderId: orderId , userIdentity : 0})
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						setTimeout(() => {
-							this.getOrderDatainit(this.currentTab)
-						}, 2000)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		detail(shopOrderId) {
+			//订单详情跳转
+			this.isModalLayer = true
+			this.$api.navigateTo(`/pages/user/order/order-details?state=${this.currentTab}&shopOrderId=${shopOrderId}`)
 		},
 		handlSearchPath() {
-			this.$api.navigateTo('/pages/order/search-order')
+			this.$api.navigateTo('/pages/user/order/search-order')
 		},
 		onShareAppMessage(res) {
 			//分享转发
@@ -663,17 +659,20 @@ export default {
 			}
 			return {
 				title: '您有新的分享订单,快来查看吧~',
-				path: `/pages/user/order/order-sharelogin?orderId=${this.btnoRderID}&userId=${this.userId}`,
+				path: `/pages/user/order/order-sharelogin?shopOrderId=${this.handleShopOrderId}&userId=${this.userId}`,
 				imageUrl: 'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
 			}
 		},
-		orderPriceToFixed(n) {
-			let price = ''
-			price = n.toFixed(2)
-			return price
+		scrolltolower() {
+			if (this.hasNextPage) {
+				this.loadding = true
+				this.pullUpOn = true
+				this.getOnReachBottomData(this.currentTab)
+			}
 		},
 		getHeaderTopHeight() {
 			// 状态栏高度
+			let self = this
 			let statusBarHeight = this.systeminfo.statusBarHeight
 			let headerPosi = this.headerBtnPosi
 			let btnPosi = {
@@ -688,6 +687,13 @@ export default {
 				right: this.systeminfo.screenWidth - headerPosi.right
 			}
 			this.navbarHeight = headerPosi.bottom + btnPosi.bottom // 原胶囊bottom + 现胶囊bottom
+			//  高度自适应
+			uni.getSystemInfo({
+				success: function(res) {
+					let calc = res.windowHeight
+					self.winHeight = calc - self.CustomBar
+				}
+			})
 		},
 		setHeaderBtnPosi() {
 			// 获得胶囊按钮位置信息
@@ -1052,14 +1058,6 @@ page {
 	height: 78rpx;
 	float: left;
 	margin-top: 20rpx;
-	.order-footer-top {
-		width: 100%;
-		height: 34rpx;
-		line-height: 34rpx;
-		font-size: $font-size-24;
-		color: #999999;
-		text-align: right;
-	}
 	.order-footer-bot {
 		width: 100%;
 		float: left;

+ 39 - 56
pages/user/order/order-pay-list.vue

@@ -1,11 +1,5 @@
 <template>
 	<view class="container cashier">
-		<view class="pay-title" v-if="!showPayUnder" @click="handlePayunder">
-			<view class="content">
-				因线上支付政策调整,请对每家店铺分别进行线上付款;若需要直接转账支付订单,请点击右侧箭头查看线下转账信息。
-				<view class="content-icon"> <text class="iconfont icon-xiayibu"></text> </view>
-			</view>
-		</view>
 		<view class="pay-content">
 			<view class="pay-list" v-for="(list, index) in list" :key="index">
 				<view class="pay-list-title">{{ list.shopName }}</view>
@@ -13,7 +7,9 @@
 					<view class="pay-list-image"> <image :src="pros.image" class="image" mode=""></image> </view>
 					<view class="pay-list-info">
 						<view class="info-title">{{ pros.name }}</view>
-						<view class="info-view" v-if="pros.productUnit != ''"> 规格:{{ pros.productUnit ? pros.productUnit : '' }} </view>
+						<view class="info-view" v-if="pros.productUnit != ''">
+							规格:{{ pros.productUnit ? pros.productUnit : '' }}
+						</view>
 						<view class="info-view" v-if="pros.productCode != '' && pros.productCode != null">
 							商品编码:{{ pros.productCode ? pros.productCode : '' }}
 						</view>
@@ -24,15 +20,33 @@
 					</view>
 				</view>
 				<view class="pay-list-msg">
-					<view class="list-msg" v-if="list.receiptAmount > 0"
-						>已付:<text class="text">¥{{ list.receiptAmount | NumFormat }}</text></view
+					<view class="list-msg" v-if="list.shopPostFee > 0"
+						>运费:<text class="text">¥{{ list.shopPostFee | NumFormat }}</text></view
 					>
+					<view class="list-msg" v-if="list.receiptAmount > 0">
+						已付:
+						<text class="text">
+							¥{{ list.receiptAmount | NumFormat }}
+							<text> 余额抵扣:(¥{{ list.canRefundAmount | NumFormat }}) </text>
+						</text>
+					</view>
 					<view class="list-msg" v-if="list.eachDiscount > 0"
 						>优惠:<text class="text">¥{{ list.eachDiscount | NumFormat }}</text></view
 					>
 				</view>
 				<view class="pay-list-btn">
-					<view class="btn" v-if="list.receiptStatus != 3" @click="handlePayOrder(list.shopOrderId)">付款</view>
+					<view
+						class="btn"
+						v-if="list.onlinePay === 0 || list.onlinePay === 2 || list.onlinePay === 3"
+						@click="handlePayunder(list.shopOrderId)"
+						>线下转账</view
+					>
+					<view
+						class="btn"
+						v-if="list.onlinePay === 0 || list.onlinePay === 1"
+						@click="handlePayOrder(list.shopOrderId)"
+						>线上支付</view
+					>
 					<view class="list-msg" v-if="list.obligation > 0"
 						>待付:<text class="text red">¥{{ list.obligation | NumFormat }}</text></view
 					>
@@ -47,7 +61,7 @@ export default {
 	data() {
 		return {
 			orderId: 0,
-			showPayUnder:false,
+			showPayUnder: false,
 			list: []
 		}
 	},
@@ -81,20 +95,22 @@ export default {
 					this.$util.msg(error.msg, 2000)
 				})
 		},
-		PayOrderCheckoutCounter(orderId){
-			this.PayService.PayOrderCheckoutCounter({orderId:orderId}).then(response =>{
-				let data = response.data
-				if(data.discernReceipt.length>0){
-					this.showPayUnder = true
-				}
-			}).catch(error =>{
-				this.$util.msg(error.msg,2000)
-			})
+		PayOrderCheckoutCounter(orderId) {
+			this.PayService.PayOrderCheckoutCounter({ orderId: orderId })
+				.then(response => {
+					let data = response.data
+					if (data.discernReceipt.length > 0) {
+						this.showPayUnder = true
+					}
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
 		},
-		handlePayOrder(shopOrderId){
+		handlePayOrder(shopOrderId) {
 			this.$api.navigateTo(`/pages/user/pay/card-order?shopOrderId=${shopOrderId}`)
 		},
-		handlePayunder(){
+		handlePayunder(shopOrderId) {
 			this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${this.orderId}`)
 		}
 	},
@@ -110,39 +126,6 @@ page {
 .cashier {
 	width: 100%;
 }
-.pay-title {
-	width: 100%;
-	height: 182rpx;
-	box-sizing: border-box;
-	padding: 24rpx 24rpx 0 24rpx;
-	background-color: #ffffff;
-	.content {
-		width: 100%;
-		height: 100%;
-		position: relative;
-		box-sizing: border-box;
-		padding: 20rpx 100rpx 20rpx 24rpx;
-		background: url(https://static.caimei365.com/app/img/bg/pay-bgtitle@2x.png) no-repeat;
-		background-size: cover;
-		line-height: 40rpx;
-		font-size: $font-size-26;
-		text-align: justify;
-		color: $color-system;
-		.content-icon {
-			width: 40rpx;
-			height: 100%;
-			position: absolute;
-			top: 0;
-			right: 24rpx;
-			line-height: 158rpx;
-			.iconfont {
-				font-size: $font-size-34;
-				color: $color-system;
-				text-align: right;
-			}
-		}
-	}
-}
 .pay-content {
 	width: 100%;
 	height: auto;
@@ -224,7 +207,7 @@ page {
 					.count {
 						float: right;
 						color: #666666;
-						.sm{
+						.sm {
 							font-size: $font-size-22;
 						}
 					}

+ 0 - 760
pages/user/order/order-payhlb.vue

@@ -1,760 +0,0 @@
-<template>
-	<view class="container cashier"  v-show="isRepuest">
-		<cu-custom :navbar-data='nvabarData' @navigateBack="hanldNavigateBack"></cu-custom>
-		<view class="container-cash clearfix" :style="{marginTop:CustomBar+'px'}">
-			<view class="container-wrapper">
-				<view class="pay-content">
-					<view class="pay-top">
-						<view class="pay-paid">
-							<text class="txt-m">待付金额</text>
-							<text class="txt-b"><text class="small">¥</text>{{obligation | NumFormat}}</text>
-						</view>
-						<view class="pay-payd">
-							<view class="pay-paids">
-								<text class="txt-m">应付总额</text>
-								<text class="txt-b">¥{{payableAmount | NumFormat}}</text>
-							</view>
-							<view class="pay-paids">
-								<text class="txt-m">已支付金额</text>
-								<text class="txt-b">¥{{receiptAmount | NumFormat}}</text>
-							</view>
-						</view>
-					</view>
-					<view class="pay-bot">
-						<view class="bot-title"><text>本次支付金额</text></view>
-						<view class="bot-input">
-							<text>¥</text>
-							<input  class="input"
-									type="digit"
-									v-model="payAmount"
-									@focus="focusInput"
-									@blur="blurInput"
-									placeholder="输入金额不能大于待付金额"
-									placeholder-class="placeholder"/>
-						</view>
-						<view class="bot-resid">
-							<text class="bot-resid-le">应付剩余¥{{balanceAmount|NumFormat}}</text>
-							<text class="bot-resid-ri">支付记录 <text class="iconfont icon-xiayibu"></text> </text>
-						</view>
-					</view>
-				</view>
-				<view class="pay-record" :style="{paddingBottom:isIphoneX ? '156rpx' : '112rpx'}">
-					<view class="record-title"><text>支付记录</text></view>
-					<view class="record-list">
-						<view class="list-main" v-if="discernReceipt.length>0">
-							<view class="list-item" v-for="(item,index) in discernReceipt" :key="index">
-								<text class="text row-1">¥{{item.receiptAmount | NumFormat}}</text>
-								<text class="text row-2">{{payTypeText(item.payType)}}</text>
-								<text class="text row-3">{{item.receiptDate}}</text>
-							</view>
-						</view>
-						<view class="list-none" v-else>暂无支付记录</view>
-					</view>
-				</view>
-			</view>
-			<view class="pay-button" :style="{paddingBottom:isIphoneX ? '68rpx' : '24rpx'}">
-				<view class="btn" @click.stop="buttonSubMit" :style="{'background':btnColor}">{{buttonText}}</view>
-			</view>
-		</view>
-		<view class="alert spec" :class="specClass" v-if="isShowTip">
-			<!-- 选择支付弹窗说明 -->
-			<view class="freight-alert"  @tap="hideTips">
-				<view class="content">
-					<view class="title">
-						<text>支付链接</text>
-						<text class="iconfont icon-iconfontguanbi" @click.stop="hideTips"></text>
-					</view>
-					<view class="text-content">
-						<view class="text">请复制以下链接,并发送至电脑端,在浏览器访问该链接并选择银行尽快完成支付</view>
-						<view class="text-p">{{payHttpUrl}}</view>
-						<view class="text-b">链接有效期为72小时</view>
-					</view>
-					<view class="text-button" @click.stop="clipboard(payHttpUrl)">复制链接</view>
-				</view>
-			</view>
-		</view>
-		<!-- 弹窗提示 -->
-		<tui-modal
-			:show="modal"
-			@click="handleClick"
-			:content="contentModalText"
-			:button="modalButton"
-			color="#333"
-			:size="32"
-			shape="circle"
-			:maskClosable="false"
-		>
-		</tui-modal>
-	</view>
-</template>
-
-<script>
-	import authorize from '@/common/config/authorize.js'
-	import thorui from '@/components/clipboard/clipboard.thorui.js'
-	import payMixins from '@/mixins/payMixins.js'
-	export default{
-		mixins: [payMixins],
-		data(){
-			return{
-				orderId:0,
-				shopOrderId:0,
-				shopOrderInfo:0,
-				payType:'',
-				payWay:'',
-				isRepuest:false,
-				realPay:0,//应付金额
-				payableAmount:0,// 应付总额
-				receiptAmount:0,// 已付金额
-				obligation:0,//待付金额
-				balanceAmount:0,
-				payAmount:0,
-				nvabarData: {		//顶部自定义导航
-					showCapsule:1, // 是否显示左上角图标  1表示显示  0表示不显示,
-					showSearch: 0,
-					title: '收银台',  // 导航栏 中间的标题
-					haveBack:true,
-					textLeft:this.$store.state.isIphone
-				},
-				idCardList:[],
-				isIphoneX:this.$store.state.isIphoneX,
-				CustomBar:this.CustomBar,// 顶部导航栏高度
-				tabCurrentIndex:0,
-				isShowTip:false,
-				buttonText:'去支付',
-				btnColor:'#09BB07',
-				discernReceipt:[],
-				showDigitKeyboard:false,
-				payHttpUrl:'',
-				mbOrderId:0, // 支付记录订单Id
-				modal:false,
-				contentModalText: '本次支付金额已超出微信支付限额,请输入小于5千的金额。', //操作文字提示语句
-				modalButton: [
-					{
-						text: '知道了',
-						customStyle: {
-							color: '#fff',
-							bgColor: 'linear-gradient(90deg, #F28F31 0%, #FF5B00 100%)'
-						},
-						plain: false
-					}
-				],
-			}
-		},
-		onLoad(option) {
-			this.initData(option)
-		},
-		filters: {
-			NumFormat(value) {
-				if(!value) return '0.00'
-				/*原来用的是Number(value).toFixed(0),这样取整时有问题,例如0.51取整之后为1,感谢Nils指正*/
-				/*后来改成了 Number(value)|0,但是输入超过十一位就为负数了,具体见评论 */
-				var intPart = Number(value) - Number(value)%1 //获取整数部分(这里是windy93的方法)
-				var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') //将整数部分逢三一断
-				var floatPart = '.00' //预定义小数部分
-				var value2Array = value.toString().split('.')
-				//=2表示数据有小数位
-				if(value2Array.length == 2) {
-					floatPart = value2Array[1].toString() //拿到小数部分
-					if(floatPart.length == 1) { //补0,实际上用不着
-						return intPartFormat + '.' + floatPart + '0'
-					} else {
-						return intPartFormat + '.' + floatPart
-					}
-				} else {
-					return intPartFormat + floatPart
-				}
-			}
-		},
-		methods:{
-			initData(e){
-				this.payType = e.type
-				console.log(this.payType)
-				this.shopOrderId = e.shopOrderId
-				switch(this.payType){
-					case '0':
-						this.payWay = 'WEIXIN'
-						this.btnColor='#09BB07'
-						this.buttonText = '去支付'
-						break
-					case '1':
-						this.payWay = 'UNIONPAY'
-						this.btnColor='#034582'
-						this.buttonText = '生成企业网银支付链接'
-						break
-					case '2':
-						this.payWay = 'UNIONPAY'
-						this.btnColor='#034582'
-						this.buttonText = '生成个人网银支付链接'
-						break
-				}
-				this.GetPayOrderInfo()
-			},
-			GetPayOrderInfo(){//初始化支付信息
-				this.PayService.PayOrderCheckoutShoporders({shopOrderId:this.shopOrderId}).then(response =>{
-					let data = response.data
-					this.discernReceipt = data.discernReceipt 	// 支付记录
-					this.shopOrderInfo = data.shopOrder  	// 子订单
-					this.obligation = data.shopOrder.obligation  	// 待付金额
-					this.orderId = data.shopOrder.orderId  	// 主订单Id
-					this.receiptAmount = data.shopOrder.receiptAmount  	// 已付金额
-					this.payableAmount = data.shopOrder.realPay // 应付金额
-					this.payAmount = this.toFixedFn(this.obligation)		// 自定义金额
-					this.balanceAmount = this.obligation - this.payAmount	// 计算剩余支付金额
-					this.isRepuest = true
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
-			},
-			buttonSubMit(){
-				switch(this.payType){
-					case '0':// 微信支付
-						// 友盟埋点收集微信支付
-						if(process.env.NODE_ENV != 'development'){
-							this.$uma.trackEvent('Um_Event_ConfirmWechatPay', {
-								Um_Key_PageName: '微信支付',
-								Um_Key_SourcePage: '线上支付',
-								Um_Key_PayName:`${this.buttonText}`,
-								Um_Key_PayOrderID:`${this.shopOrderId}`
-							})
-						}
-						this.MiniWxPayFor()
-						break
-					case '1':// 企业网银
-						// 友盟埋点收集企业网银
-						if(process.env.NODE_ENV != 'development'){
-							this.$uma.trackEvent('Um_Event_ConfirmEbankPay', {
-								Um_Key_PageName: '企业网银',
-								Um_Key_SourcePage: '线上支付',
-								Um_Key_PayName:`${this.buttonText}`,
-								Um_Key_PayOrderID:`${this.shopOrderId}`
-							})
-						}
-						this.BuildCatenate()
-						break
-					case '2':// 个人网银
-						// 友盟埋点收集个人网银
-						if(process.env.NODE_ENV != 'development'){
-							this.$uma.trackEvent('Um_Event_ConfirmAbankPay', {
-								Um_Key_PageName: '个人网银',
-								Um_Key_SourcePage: '线上支付',
-								Um_Key_PayName:`${this.buttonText}`,
-								Um_Key_PayOrderID:`${this.shopOrderId}`
-							})
-						}
-						this.BuildCatenate()
-						break
-				}
-			},
-			BuildCatenate(){// 企业网银  个人网银
-				if(this.payAmount == 0){
-					this.$util.msg('请输入本次支付的金额',2000)
-					return
-				}
-				if(this.payAmount <=10){
-					this.$util.msg('网银支付的金额必须大于¥10.00',2000)
-					return
-				}
-				if( this.payType == '1'){
-					if(this.payAmount != this.payableAmount){
-						this.contentModalText = '企业网银支付每次收取的手续费较高,建议一次性全额付款。'
-						this.modal = true
-						return
-					}
-				}
-				this.PayService.PayOrderPayLink({unpaidAmount:this.payAmount,shopOrderId:this.shopOrderId,payType:this.payType}).then(response =>{
-					this.payHttpUrl = response.data
-					this.isShowTip = true
-				})
-			},
-			async MiniWxPayFor(){// 微信支付
-				if(this.payAmount > 5000){
-					this.modal = true
-					return
-				}
-				if(this.payAmount == 0){
-					this.$util.msg('请输入本次支付的金额',2000)
-					return
-				}
-				if(this.payAmount*100 < 2){
-					this.$util.msg('本次支付的金额必须大于¥0.02',2000)
-					return
-				}
-				// 获取微信code
-				const wechatCode = await authorize.getCode('weixin')
-				const params = {
-						payAmount:this.payAmount,
-						payType:'XCX',
-						code:wechatCode,
-						shopOrderId:this.shopOrderId
-				}
-				this.weChatMiniOrderWxPay(params)
-			},
-			handleClick(){
-				this.modal = false
-			},
-			confirmEvent(value){//点击自定义键盘完成的回调函数
-				this.chechValue(value)
-				this.showDigitKeyboard = false
-			},
-			blurInput(e){
-				this.chechValue(e.detail.value)
-			},
-			focusInput(){
-				// this.showDigitKeyboard = true
-			},
-			hideKeyboard(){
-				this.showDigitKeyboard = false
-			},
-			chechValue(value){
-				let patern = /\d+\.\d+/g
-				if(value && value.split('.').length > 2) {
-					value= patern.exec(value)
-				}
-				if(value == '' || value <0 ){
-					this.payAmount = ''
-					this.balanceAmount = this.obligation
-				}else if( value > this.obligation){
-					this.payAmount = this.toFixedFn(this.obligation)
-					this.balanceAmount = this.toFixedFn(this.obligation - this.payAmount)
-				}else{
-					this.payAmount = this.toFixedFn(value)
-					this.balanceAmount = this.toFixedFn(this.obligation - this.payAmount)
-				}
-			},
-			hanldNavigateBack(){//页面返回
-				uni.navigateBack({
-					delta: 1
-				})
-			},
-			payTypeText (state){//处理支付记录文字
-				let stateText = '',
-					stateTextObject={
-						12:'企业网银',
-						13:'微信支付',
-						14:'支付宝',
-						15:'微信支付',
-						16:'余额抵扣',
-					}
-				Object.keys(stateTextObject).forEach(key => {
-					if(key == state){
-						stateText = stateTextObject[key]
-					}
-				})
-				return stateText
-			},
-			
-			hideTips(){//隐藏弹窗
-				this.isShowTip = false
-			},
-			toFixedFn(text){//处理小数点后两位数
-				return Number(text).toFixed(2)
-			},
-			copyClipboard(data){
-				//复制账号
-				thorui.getClipboardData(data, (res) => {
-					if (res) {
-						this.$util.msg('已复制',2000)
-					} else {
-						this.$util.msg('复制失败',2000)
-					}
-				})
-			},
-			clipboard(data) {//复制链接
-				console.log('data',data)
-				thorui.getClipboardData(data, (res) => {
-					if (res) {
-						this.isShowTip = false
-						this.$util.msg('已复制',2000)
-						// 友盟埋点收集复制网银链接
-						if(process.env.NODE_ENV != 'development'){
-							this.$uma.trackEvent('Um_Event_CopyUnionPay', {
-								Um_Key_PageName: '网银支付',
-								Um_Key_SourcePage: '线上支付',
-								Um_Key_PayName:`${this.buttonText}`,
-								Um_Key_PayOrderID:`${this.shopOrderId}`
-							})
-						}
-					} else {
-						this.$util.msg('复制失败',2000)
-					}
-				})
-			},
-			discard(){
-				//丢弃
-			}
-		},
-		onShow() {
-
-		}
-	}
-</script>
-
-<style lang="scss">
-	page{height: auto !important;background-color: #FFFFFF;}
-	.container-cash{
-		width: 100%;
-		.container-wrapper{
-			width:100%;
-			margin: 0 auto;
-			.pay-content{
-				width: 662rpx;
-				height: 420rpx;
-				padding: 64rpx 44rpx 0 44rpx;
-				border-radius: 0 0 60rpx 60rpx;
-				background: url(https://img.caimei365.com/group1/M00/03/BD/Cmis218elN6AY6VeAAqw4n3n4nw186.png) no-repeat;
-				background-size: cover;
-				float: left;
-				position: relative;
-				.pay-top{
-					width: 100%;
-					height: auto;
-					float: left;
-					margin-bottom: 44rpx;
-					.pay-paid{
-						width: 100%;
-						height: auto;
-						margin-bottom: 38rpx;
-						text{
-							line-height: 48rpx;
-							text-align: left;
-							color: #FFFFFF;
-							width: 100%;
-						}
-						.txt-m{
-							font-size: $font-size-26;
-							opacity: 0.7;
-							display: inline-block;
-						}
-						.txt-b{
-							font-size: $font-size-48;
-							display: inline-block;
-							.small{
-								font-size: $font-size-32;
-							}
-						}
-					}
-					.pay-payd{
-						width: 100%;
-						height: auto;
-						.pay-paids{
-							height: auto;
-							float: left;
-							margin-right: 48rpx;
-							text{
-								line-height: 48rpx;
-								text-align: left;
-								color: #FFFFFF;
-							}
-							.txt-m{
-								width: 100%;
-								display: inline-block;
-								font-size: $font-size-26;
-								opacity: 0.7;
-							}
-							.txt-b{
-								width: 100%;
-								display: inline-block;
-								font-size: $font-size-32;
-							}
-						}
-					}
-				}
-				.pay-bot{
-					width: 614rpx;
-					height: 184rpx;
-					padding: 24rpx;
-					background: #FFFFFF;
-					border-radius: 28rpx;
-					box-shadow:0 2px 6px rgba(255, 77, 0, .17);
-					position: absolute;
-					bottom: -92rpx;
-					left:44rpx;
-					.bot-title{
-						line-height: 36rpx;
-						font-size: $font-size-26;
-						color: #666666;
-					}
-					.bot-input{
-						width: 100%;
-						height: 66rpx;
-						margin: 15rpx 0;
-						border-bottom: 1px solid #EBEBEB;
-						line-height: 66rpx;
-						font-size: $font-size-32;
-						color: $text-color;
-						text{
-							display: block;
-							float: left;
-						}
-						.input{
-							font-size: $font-size-40;
-							width: 500rpx;
-							height: 66rpx;
-							padding: 0 10rpx;
-							line-height: 66rpx;
-							float: left;
-							.none{
-								color:$text-color;
-								opacity: 0.3;
-							}
-							.text{
-								color:$text-color;
-							}
-						}
-						.placeholder{
-							font-size: $font-size-26;
-						}
-					}
-					.bot-resid{
-						line-height: 36rpx;
-						font-size: $font-size-26;
-						margin-top: 24rpx;
-						.bot-resid-le{
-							display: inline-block;
-							float: left;
-							color: $color-system;
-						}
-						.bot-resid-ri{
-							display: inline-block;
-							float: right;
-							color: #1890F9;
-							.icon-xiayibu{
-								margin-left: 5rpx;
-							}
-						}
-					}
-				}
-			}
-			.pay-record{
-				float: left;
-				background: #FFFFFF;
-				width: 702rpx;
-				height: auto;
-				padding: 0 24rpx;
-				margin-top: 112rpx;
-				.record-title{
-					width: 100%;
-					float: left;
-					font-size: $font-size-28;
-					color: $text-color;
-					line-height: 80rpx;
-					height: 80rpx;
-					border-bottom: 1px solid #F8F8F8;
-				}
-				.record-list{
-					width: 100%;
-					height: auto;
-					float: left;
-					.list-none{
-						line-height: 80rpx;
-						font-size: $font-size-26;
-						color: #999999;
-						text-align: left;
-					}
-					.list-main{
-						height: auto;
-						display: flex;
-						flex-direction:column;
-						.list-item{
-							width: 100%;
-							height:80rpx;
-							display: flex;
-							flex: 1;
-							line-height: 80rpx;
-							font-size: $font-size-26;
-							color: $text-color;
-							.text{
-								&.row-1{
-									flex: 3;
-								}
-								&.row-2{
-									flex: 3;
-								}
-								&.row-3{
-									flex: 4;
-									text-align: right;
-									color: #999999;
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-		.pay-button{
-			width: 100%;
-			background-color: #FFFFFF;
-			position: fixed;
-			height: 88rpx;
-			padding-top: 24rpx;
-			bottom: 0;
-			.btn{
-				width: 702rpx;
-				height: 88rpx;
-				border-radius: 44rpx;
-				font-size: $font-size-28;
-				line-height: 88rpx;
-				color: #FFFFFF;
-				margin: 0 auto;
-				text-align: center;
-				background: $btn-confirm;
-			}
-		}
-	}
-	.freight-alert{
-		width: 100%;
-		height: 100%;
-		background: rgba(0,0,0,.5);
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 8888;
-		transition: all 0.4s;
-		&.none{
-			display: none;
-		}
-		&.show{
-			display: block;
-		}
-		.content{
-			width: 422rpx;
-			height:434rpx;
-			position: absolute;
-			background: $bg-color;
-			left: 0;
-			right: 0;
-			bottom: 0;
-			top: 0;
-			margin: auto;
-			padding: 20rpx 32rpx;
-			border-radius: 12rpx;
-			.title{
-				width: 100%;
-				height: 68rpx;
-				line-height: 68rpx;
-				font-size: $font-size-28;
-				color: $text-color;
-				text-align: center;
-				position: relative;
-				.icon-iconfontguanbi{
-					width: 68rpx;
-					height: 68rpx;
-					text-align: center;
-					line-height: 68rpx;
-					position: absolute;
-					right: 0;
-					top: 0;
-					font-size: $font-size-36;
-					color: #999999;
-				}
-			}
-			.text-content{
-				width: 100%;
-				height: auto;
-				.text{
-					padding: 20rpx 0 0 0;
-					line-height: 44rpx;
-					font-size: $font-size-26;
-					color:#666666;
-					text-align: justify;
-				}
-				.text-p{
-					width: 100%;
-					line-height: 44rpx;
-					font-size: $font-size-26;
-					color:$color-system;
-					text-align: left;
-					text-overflow:ellipsis;
-					display: -webkit-box;
-					word-break: break-all;
-					-webkit-box-orient: vertical;
-					-webkit-line-clamp: 1;
-					overflow: hidden;
-				} 
-				.text-b{
-					line-height: 44rpx;
-					font-size: $font-size-24;
-					color:#999999;
-					text-align: left;
-				}
-			}
-			.text-button{
-				width: 100%;
-				height: 88rpx;
-				line-height: 88rpx;
-				background: $btn-confirm;
-				font-size: $font-size-28;
-				border-radius: 44rpx;
-				color:#FFFFFF;
-				text-align: center;
-				margin-top: 20rpx;
-			}
-		}
-	}
-	.tui-prompt-title{
-		width: 100%;
-		height: 44rpx;
-		line-height: 44rpx;
-		padding: 20rpx 0;
-		text-align: center;
-		color: #333333;
-		border-bottom: 1px solid #E2E7EF;
-	}
-	.tui-prompt-text{
-		padding-top: 20rpx;
-		.tui-prompt-tips{
-			width: 100%;
-			line-height: 36rpx;
-			font-size: $font-size-22;
-			color: #FF5B00;
-			text-align: justify;
-			margin-bottom: 24rpx;
-		}
-		.tui-prompt-item{
-			width: 100%;
-			line-height: 60rpx;
-			color: #333333;
-			font-size: $font-size-26;
-			.text{
-				font-weight: bold;
-			}
-			.copy{
-				height: 38rpx;
-				box-sizing: border-box;
-				padding: 0 24rpx;
-				text-align: center;
-				line-height: 36rpx;
-				display: inline-block;
-				.iconfont{
-					font-size: $font-size-40;
-					color: #666666;
-				}
-			}
-		}	
-	}
-	.tui-prompt-flex{
-		width: 100%;
-		height: auto;
-		margin-top: 20rpx;
-		box-sizing: border-box;
-		padding: 0 35rpx;
-		.btn{
-			width: 100%;
-			line-height: 84rpx;
-			font-size: $font-size-26;
-			text-align: center;
-			color: #FFFFFF;
-			border-radius: 44rpx;
-			margin: 20rpx 0;
-			&.btn-cancel{
-				background: #FFFFFF;
-				color: #333333;
-				border: 1px solid #979797;
-			}
-			&.btn-confirm{
-				background: $btn-confirm;
-			}
-		}
-		
-	}
-</style>

+ 0 - 723
pages/user/order/order-payment.vue

@@ -1,723 +0,0 @@
-<template>
-	<view class="container cashier" :style="{paddingTop:CustomBar+'px'}">
-		<cu-custom :navbar-data='nvabarData' @navigateBack="hanldNavigateBack"></cu-custom>
-		<template v-if="isPaySwitch">
-			<view class="container-cash clearfix">
-				<view class="pay-bring-title">线上支付功能正在维护中,请使用线下转账方式支付订单</view>
-				<view class="container-wrapper">
-					<view class="pay-content">
-						<view class="pay-p"><text>待付金额</text></view>
-						<view class="pay-money">
-							<text class="pay-sm">¥</text>
-							<text class="pay-bg">{{payableAmount | NumFormat}}</text>
-						</view>
-					</view>
-				</view>
-				<view class="pay-bring-wrapper clearfix">
-					<view class="pay-bring-content">
-						<view class="text-v title">转账信息</view>
-						<view class="text-v">开户行:{{ bankInfo.bankOfDeposit }}</view>
-						<view class="text-v">银行卡号:{{ bankInfo.bankCardNo }}</view>
-						<view class="text-v">户名:{{ bankInfo.bankUserName }}</view>
-						<view class="text-v">订单标识:{{payOrderId}} <text class="clipboard" @click.stop="clipboard(payOrderId)">复制</text></view>
-						<view class="text-v title">特别注意</view>
-						<view class="text-v bg-color">请在转账备注中填写上述订单标识,方便财务快速审核,提高发货速度</view>
-					</view>
-				</view>
-			</view>		
-		</template>
-		<template v-else>
-			<view class="container-cash clearfix" v-if="onlinePay == 2">
-				<view class="pay-bring-title">{{payBringTitle}}</view>
-				<view class="container-wrapper">
-					<view class="pay-content">
-						<view class="pay-p"><text>待付金额</text></view>
-						<view class="pay-money">
-							<text class="pay-sm">¥</text>
-							<text class="pay-bg">{{payableAmount | NumFormat}}</text>
-						</view>
-					</view>
-				</view>
-				<view class="pay-bring-wrapper clearfix">
-					<view class="pay-bring-content">
-						<view class="text-v title">转账信息</view>
-						<view class="text-v">开户行:{{ bankInfo.bankOfDeposit }}</view>
-						<view class="text-v">银行卡号:{{ bankInfo.bankCardNo }}</view>
-						<view class="text-v">户名:{{ bankInfo.bankUserName }}</view>
-						<view class="text-v">订单标识:{{payOrderId}} <text class="clipboard" @click.stop="clipboard(payOrderId)">复制</text></view>
-						<view class="text-v title">特别注意</view>
-						<view class="text-v bg-color">请在转账备注中填写上述订单标识,方便财务快速审核,提高发货速度</view>
-					</view>
-				</view>
-			</view>		
-			<view class="container-cash clearfix" v-else>
-				<view class="container-wrapper">
-					<view class="pay-content">
-						<view class="pay-p"><text>待付金额</text></view>
-						<view class="pay-money">
-							<text class="pay-sm">¥</text>
-							<text class="pay-bg">{{payableAmount | NumFormat}}</text>
-						</view>
-					</view>
-					<view class="pay-check">
-						<view class="check-title"><view class="text">选择支付方式</view></view>
-						<view class="pay-checked">
-							<view  class="pay-item" :class="{ 'current' : tabCurrentIndex === 0}"   @click="tabClick(0)" v-if="weChatFlag" >
-								<view class="item-l">
-									<view class="item-icon"><text class="iconfont icon-weixinzhifu"></text></view>
-									<view class="item-texts"><text>微信支付</text></view>
-								</view>
-								<view class="item-r">
-									<text class="iconfont icon-duigou"></text>
-								</view>
-							</view>
-							<view v-if="B2BpayFlag === 1" class="pay-item" :class="{ 'current' : tabCurrentIndex === 1}"   @click="tabClick(1)" >
-								<view class="item-l">
-									<view class="item-icon"><text class="iconfont icon-qiyewangyinzhifu"></text></view>
-									<view class="item-text">
-										<view class="txt-p">企业网银支付</view>
-										<view class="txt-t">需要在电脑端汇款</view>
-									</view>
-								</view>
-								<view class="item-r">
-									<text class="iconfont icon-duigou"></text>
-								</view>
-							</view>
-							<view  class="pay-item" :class="{ 'current' : tabCurrentIndex === 2}"   @click="tabClick(2)" >
-								<view class="item-l">
-									<view class="item-icon"><text class="iconfont icon-gerenwangyinzhifu"></text></view>
-									<view class="item-text">
-										<view class="txt-p">个人网银支付</view>
-										<view class="txt-t">需要在电脑端汇款</view>
-									</view>
-								</view>
-								<view class="item-r">
-									<text class="iconfont icon-duigou"></text>
-								</view>
-							</view>
-						</view>
-					</view>
-				</view>
-				<view class="pay-button">
-					<view class="btn" @click.stop="goOrderCash" :style="{'background':btnColor}">{{buttonText}}</view>
-				</view>
-				<view class="pay-statustext">
-					<view class="pay-statustext-inner">
-						<view class="pay-icon">
-							<text class="iconfont icon-gantanhao-yuankuang"></text>
-						</view>
-						<view class="pay-text">
-							<view>{{payStatusText}}</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</template>
-	</view>
-</template>
-
-<script>
-	const thorui = require('@/components/clipboard/clipboard.thorui.js')
-	import bankMixins from '@/mixins/bankMixins.js'
-	export default{
-		mixins: [bankMixins],
-		data(){
-			return{
-				orderId:0,
-				shopOrderId:0,
-				payableAmount:0,
-				emptyWrapperH: '',
-				bankNumber:'6230 2100 9221 2400',
-				payOrderId:'',
-				B2BpayFlag:1,
-				nvabarData: {		//顶部自定义导航
-					showCapsule:1, // 是否显示左上角图标  1表示显示  0表示不显示,
-					showSearch: 0,
-					title: '选择支付方式',  // 导航栏 中间的标题
-					haveBack:false,
-					haveHome:true,
-					textLeft:this.$store.state.isIphone
-				},
-				isIphoneX:this.$store.state.isIphoneX,
-				CustomBar:this.CustomBar,// 顶部导航栏高度
-				tabCurrentIndex:0,
-				buttonText:'使用微信支付',
-				btnColor:'#09BB07',
-				onlinePay:1,
-				isPaySwitch:false,
-				optionType:'',
-				payBringTitle:'本次交易暂不支持线上支付,请使用线下转账方式付款',
-				payStatusText:'使用任何一种线上支付方式支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。',
-				pageType:'',
-                weChatFlag: true // 判断微信支付是否可用
-				
-			}
-		},
-		onLoad(option) {
-			this.initData(option)
-		},
-		filters: {
-			NumFormat(value) {
-				if(!value) return '0.00'
-				/*原来用的是Number(value).toFixed(0),这样取整时有问题,例如0.51取整之后为1,感谢Nils指正*/
-				/*后来改成了 Number(value)|0,但是输入超过十一位就为负数了,具体见评论 */
-				var intPart = Number(value) - Number(value)%1 //获取整数部分(这里是windy93的方法)
-				var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') //将整数部分逢三一断
-				var floatPart = '.00' //预定义小数部分
-				var value2Array = value.toString().split('.')
-				//=2表示数据有小数位
-				if(value2Array.length == 2) {
-					floatPart = value2Array[1].toString() //拿到小数部分
-
-					if(floatPart.length == 1) { //补0,实际上用不着
-						return intPartFormat + '.' + floatPart + '0'
-					} else {
-						return intPartFormat + '.' + floatPart
-					}
-				} else {
-					return intPartFormat + floatPart
-				}
-			}
-		},
-		methods:{
-			initData(e){
-				console.log(e)
-				this.shopOrderId = e.shopOrderId
-				this.payOrderId ='#'+e.shopOrderId+'#'
-				this.nvabarData.haveBack = true
-				this.nvabarData.haveHome = false
-				this.nvabarData.title = '选择支付方式'
-				this.PayOrderOnLineSwitch()
-				this.PayOrderCheckoutCounter(this.shopOrderId)
-				this.cmGetBankTypeLists()
-				switch(e.type){
-					case 'confirm':
-						this.nvabarData.haveBack = false
-						this.nvabarData.haveHome = true
-						this.nvabarData.title = '支付'
-						this.PayOrderOnLineSwitch()
-						this.PayOrderCheckoutCounter(this.shopOrderId)
-						break
-					case 'payfirm':
-						this.nvabarData.haveBack = true
-						this.nvabarData.haveHome = false
-						this.nvabarData.title = '选择支付方式'
-						this.PayOrderOnLineSwitch()
-						this.PayOrderCheckoutCounter(this.shopOrderId)
-						break
-					case 'onlinePay':
-						this.onlinePay = 2
-						this.isPaySwitch = false
-						this.nvabarData.haveBack = true
-						this.nvabarData.haveHome = false
-						this.nvabarData.title = '付款提示'
-						this.payableAmount = e.Amount
-						this.payBringTitle = '您已通过线下转账的方式支付了订单部分款项,剩余款项依然需要使用线下转账方式,给您带来的不便敬请谅解'
-						break
-				}
-			},
-			PayOrderOnLineSwitch(){
-				this.PayService.PayOrderOnLineSwitch().then(response=>{
-					if(response.data === 0 ){
-						this.isPaySwitch = true
-					}else{
-						this.isPaySwitch = false
-					}
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
-			},
-			PayOrderCheckoutCounter(shopOrderId){
-				this.PayService.PayOrderCheckoutShoporders({shopOrderId:shopOrderId}).then(response =>{
-					let data = response.data.shopOrder
-					this.B2BpayFlag = response.data.B2BpayFlag  //待付金额
-					this.payableAmount = data.obligation  //待付金额
-                    // 判断微信支付是否可用
-                    this.weChatFlag = response.data.weChatFlag === '1'
-                    if(!this.weChatFlag){
-						if(this.B2BpayFlag ===1){
-							this.tabCurrentIndex = 1
-							this.btnColor='#034582'
-							this.buttonText='使用企业网银支付'
-						}else{
-							this.tabCurrentIndex = 2
-							this.btnColor='#034582'
-							this.buttonText='使用个人网银支付'
-						}
-                    }
-					//判断线上线下显示
-					if(this.optionType == 'onlinePay'){
-						this.onlinePay = 2
-					}else{
-						this.onlinePay = response.data.onlinePay
-					}
-					if(data.obligation>0){
-						this.payStatusText = '使用任何一种线上支付方式支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。'
-					}else{
-						this.payStatusText = '使用任何一种线上支付方式支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。'
-					}
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
-			},
-			goOrderCash(){
-				if(this.onlinePay == 2){
-					this.$util.modal('','本次交易暂不支持线上支付开票,请使用线下转账的方式付款','知道了','',false,() =>{})
-					this.payStatusText = '使用微信和网银支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。若着急发货,可以选择使用线下转账进行付款。'
-				}else{
-					// 友盟埋点收集选择支付方式
-					if(process.env.NODE_ENV != 'development'){
-						this.$uma.trackEvent('Um_Event_ChooseWechatPay', {
-							Um_Key_PageName: '线上支付',
-							Um_Key_SourcePage: '选择支付',
-							Um_Key_PayName:`${this.buttonText}`,
-							Um_Key_PayOrderID:`${this.shopOrderId}`
-						})
-					}
-					switch(this.tabCurrentIndex){
-						case 0:
-							this.$api.navigateTo(`/pages/user/order/order-payhlb?type=0&shopOrderId=${this.shopOrderId}`)
-							break
-						case 1:
-							this.$api.navigateTo(`/pages/user/order/order-payhlb?type=1&shopOrderId=${this.shopOrderId}`)
-							break
-						case 2:
-							this.$api.navigateTo(`/pages/user/order/order-payhlb?type=2&shopOrderId=${this.shopOrderId}`)
-							break
-						case 3:
-							this.$api.navigateTo(`/pages/user/order/order-payhlb?type=3&shopOrderId=${this.shopOrderId}`)
-							break
-					}
-				}
-			},
-			tabClick(index) {//tab切换
-				this.tabCurrentIndex = index
-				switch(index){
-					case 0:
-						this.btnColor='#09BB07'
-						this.buttonText='使用微信支付'
-						break
-					case 1:
-						this.btnColor='#034582'
-						this.buttonText='使用企业网银支付'
-						break
-					case 2:
-						this.btnColor='#034582'
-						this.buttonText='使用个人网银支付'
-						break
-					case 3:
-						this.btnColor='#034582'
-						this.buttonText='使用大额银联转账'
-						break
-				}
-			},
-			hanldNavigateBack(){//页面返回
-				uni.navigateBack({
-					delta: 1
-				})
-			},
-			clipboard(data) {
-				thorui.getClipboardData(data, (res) => {
-					if (res) {
-						this.$util.msg('复制成功',2000,true,'success')
-					} else {
-						this.$util.msg('复制失败',2000,true,'none')
-					}
-				})
-			},
-		},
-		onShow() {
-
-		}
-	}
-</script>
-
-<style lang="scss">
-	page{
-		height: auto !important;
-		background-color: #FFFFFF;
-	}
-	.container-cash{
-		width: 100%;
-		padding-bottom: 250rpx;
-		.pay-bring-title{
-			box-sizing: border-box;
-			width: 100%;
-			min-height: 96rpx;
-			padding: 20rpx 24rpx;
-			line-height: 48rpx;
-			text-align: left;
-			font-size: $font-size-24;
-			background:rgba(255,234,221,1);
-			color: $color-system;
-		}
-		.container-wrapper{
-			width:662rpx;
-			margin: 0 auto;
-			.pay-title{
-				font-size: $font-size-32;
-				line-height: 44rpx;
-				text-align: center;
-				color: #2A86FF;
-				margin: 40rpx 0 0 0;
-				width: 100%;
-				float: left;
-			}
-			.pay-content{
-				width: 574rpx;
-				height: 136rpx;
-				padding: 52rpx 44rpx;
-				background: url(https://img.caimei365.com/group1/M00/03/BD/Cmis218ekFyAHoAzAALhR3oBpDI049.png) no-repeat;
-				background-size: cover;
-				float: left;
-				margin-top: 40rpx;
-				.pay-p{
-					font-size: $font-size-26;
-					color: #FFFFFF;
-					line-height: 36rpx;
-				}
-				.pay-money{
-					color: #FFFFFF;
-					line-height: 84rpx;
-					font-weight: bold;
-					.pay-sm{
-						font-size: $font-size-26;
-					}
-					.pay-bg{
-						font-size: 50rpx;
-					}
-				}
-			}
-			.pay-check{
-				width: 100%;
-				height: auto;
-				float: left;
-				.check-title{
-					width: 622rpx;
-					height: 40rpx;
-					line-height: 40rpx;
-					padding: 0 20rpx;
-					margin-top: 24rpx;
-					.text{
-						font-size: $font-size-28;
-						color: $text-color;
-						text-align: left;
-						float: left;
-					}
-					.icon{
-						width: 40rpx;
-						height: 40rpx;
-						border-radius: 50%;
-						line-height: 40rpx;
-						text-align: center;
-						color: #FFFFFF;
-						font-size: $font-size-24;
-						background: radial-gradient(circle,rgba(225,86,22,1) 0%,rgba(255,170,0,1) 67%,rgba(249,185,156,1) 100%);
-						float: right;
-					}
-				}
-				.pay-checked{
-					width: 100%;
-					height: auto;
-					.pay-item{
-						width: 618rpx;
-						height: 96rpx;
-						border: 2px solid #F5F5F5;
-						border-radius: 30rpx;
-						padding: 20rpx;
-						margin: 24rpx 0;
-						display: flex;
-						background-color: #FFFFFF;
-						&.current{
-							border-color:$color-system;
-							.item-r{
-								.icon-duigou{
-									color: $color-system;
-								}
-							}
-						}
-						.item-l{
-							flex: 8;
-							.item-icon{
-								width: 96rpx;
-								height: 96rpx;
-								float: left;
-								text-align: center;
-								line-height: 96rpx;
-								margin-right: 20rpx;
-								.iconfont{
-									font-size:88rpx;
-								}
-								.icon-weixinzhifu{
-									color: #09BB07;
-								}
-								.icon-gerenwangyinzhifu{
-									color: #034582;
-								}
-								.icon-daewangyinzhuanzhang{
-									font-size: 68rpx;
-									color: #034582;
-								}
-								.icon-qiyewangyinzhifu{
-									color: #004889;
-								}
-							}
-							.item-texts{
-								line-height: 96rpx;
-								font-size:$font-size-26;
-								color: $text-color;
-							}
-							.item-text{
-								line-height: 48rpx;
-								font-size:$font-size-26;
-								.txt-p{
-									color: $text-color;
-								}
-								.txt-t{
-									font-size: $font-size-24;
-									color: #999999;
-								}
-							}
-						}
-						.item-r{
-							flex: 2;
-							text-align: center;
-							line-height: 96rpx;
-							.icon-duigou{
-								font-size: 60rpx;
-								color: #FFFFFF;
-							}
-						}
-					}
-				}
-			}
-		}
-		.pay-button{
-			width: 100%;
-			float: left;
-			margin-top:30rpx;
-			.btn{
-				width: 662rpx;
-				height: 88rpx;
-				border-radius: 44rpx;
-				font-size: $font-size-28;
-				line-height: 88rpx;
-				color: #FFFFFF;
-				margin: 0 auto;
-				text-align: center;
-				background:$btn-confirm;
-			}
-		}
-		.pay-statustext{
-			width: 100%;
-			height: auto;
-			float: left;
-			margin-top:40rpx;
-			.pay-statustext-inner{
-				width: 662rpx;
-				height: 100%;
-				margin: 0 auto;
-				.pay-icon{
-					width: 62rpx;
-					height: 100%;
-					float: left;
-					text-align: center;
-					.iconfont{
-						color: #FF2A2A;
-						font-size:$font-size-36;
-						line-height: 20rpx;
-					}
-				}
-				.pay-text{
-					width: 560rpx;
-					height: 100%;
-					float: left;
-					line-height: 40rpx;
-					font-size: $font-size-24;
-					color: #FF2A2A;
-					text-align: justify;
-				}
-			}
-		}
-		.pay-bring{
-			width: 100%;
-			min-height: 190rpx;
-			padding: 24rpx 0;
-			background-color: #FFFFFF;
-			box-shadow:0px 3px 6px rgba(0,0,0,0.16);
-			position: fixed;
-			bottom: 0;
-			left: 0;
-			border-radius: 30rpx 30rpx 0 0;
-			display: flex;
-			align-items: center;
-			flex-direction: column;
-			.pay-bring-line{
-				display: flex;
-				align-items: center;
-				.line{
-					display: inline-block;
-					width: 48rpx;
-					height: 2px;
-					background-color: #707070;
-				}
-			}
-			.pay-bring-content{
-				width: 654rpx;
-				height: auto;
-				padding: 0 24rpx;
-				.text{
-					font-size: $font-size-24;
-					color: #666;
-					line-height: 44rpx;
-					text-align: center;
-					&.bg-color{
-						color: $color-system;
-						line-height: 88rpx;
-					}
-				}
-				.text-v{
-					font-size: $font-size-28;
-					color: #999;
-					line-height: 70rpx;
-					text-align: left;
-					&.title{
-						font-size: $font-size-26;
-						color: #666666;
-					}
-					&.bg-color{
-						line-height: 44rpx;
-						color: $color-system;
-					}
-					.clipboard{
-						width: 84rpx;
-						height: 36rpx;
-						background:linear-gradient(34deg,rgba(255,41,41,1) 0%,rgba(255,109,27,1) 100%);
-						text-align: center;
-						font-size: $font-size-24;
-						color: #FFFFFF;
-						border-radius: 4rpx;
-						line-height: 36rpx;
-						display: inline-block;
-						margin-left: 10rpx;
-					}
-				}
-			}
-		}
-		.pay-bring-wrapper{
-			width: 100%;
-			padding: 24rpx 0;
-			background-color: #FFFFFF;
-			display: flex;
-			align-items: center;
-			flex-direction: column;
-			.pay-bring-content{
-				width: 654rpx;
-				height: auto;
-				padding: 0 24rpx;
-				.text{
-					font-size: $font-size-24;
-					color: #666;
-					line-height: 44rpx;
-					text-align: center;
-					&.bg-color{
-						color: $color-system;
-						line-height: 88rpx;
-					}
-				}
-				.text-v{
-					font-size: $font-size-28;
-					color: #999;
-					line-height: 70rpx;
-					text-align: left;
-					&.title{
-						font-size: $font-size-28;
-						color: #666666;
-					}
-					&.bg-color{
-						line-height: 44rpx;
-						color: $color-system;
-					}
-					.clipboard{
-						width: 84rpx;
-						height: 36rpx;
-						background:linear-gradient(34deg,rgba(255,41,41,1) 0%,rgba(255,109,27,1) 100%);
-						text-align: center;
-						font-size: $font-size-24;
-						color: #FFFFFF;
-						border-radius: 4rpx;
-						line-height: 36rpx;
-						display: inline-block;
-						margin-left: 10rpx;
-					}
-				}
-			}
-		}
-	}
-	.freight-alert{
-		width: 100%;
-		height: 100%;
-		background: rgba(0,0,0,.5);
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 8888;
-		transition: all 0.4s;
-		&.none{
-			display: none;
-		}
-		&.show{
-			display: block;
-		}
-		.content{
-			width: 422rpx;
-			height:434rpx;
-			position: absolute;
-			background: $bg-color;
-			left: 0;
-			right: 0;
-			bottom: 0;
-			top: 0;
-			margin: auto;
-			padding: 20rpx 32rpx;
-			border-radius: 12rpx;
-			.title{
-				width: 100%;
-				height: 68rpx;
-				line-height: 68rpx;
-				font-size: $font-size-28;
-				color: $text-color;
-				text-align: center;
-				position: relative;
-				.icon-iconfontguanbi{
-					width: 68rpx;
-					height: 68rpx;
-					text-align: center;
-					line-height: 68rpx;
-					position: absolute;
-					right: 0;
-					top: 0;
-					font-size: $font-size-36;
-					color: #999999;
-				}
-			}
-			.text-content{
-				width: 100%;
-				height: auto;
-				.text{
-					padding: 20rpx 0;
-					line-height: 44rpx;
-					font-size: $font-size-26;
-					color:#666666;
-					text-align: justify;
-				}
-				.text-p{
-					line-height: 44rpx;
-					font-size: $font-size-26;
-					color:$color-system;
-					text-align: left;
-				}
-			}
-		}
-	}
-</style>

+ 7 - 14
pages/user/order/order-sharedetails.vue

@@ -47,7 +47,8 @@ export default {
 		return {
 			status: '',
 			userId: '',
-			orderId: '',
+			orderId: 0,
+			shopOrderId:0,
 			cellPhone: '', //客服电话
 			btnStatus: 0, //按钮组件状态
 			isRequest: false, //是否加载完成渲染子组件
@@ -73,14 +74,14 @@ export default {
 		}
 	},
 	onLoad(option) {
-		this.orderId = option.orderId
+		this.shopOrderId = option.shopOrderId
 		this.userId = option.userId
 		this.initOrderDetaileData()
 	},
 	methods: {
 		initOrderDetaileData() {
 			//初始化页面数据@参数:订单ID
-			this.OrderService.QueryOrderDetails({ orderId: this.orderId, userId: this.userId })
+			this.OrderService.QueryOrderDetails({ shopOrderId: this.shopOrderId, userId: this.userId })
 				.then(response => {
 					let data = response.data
 					this.status = data.order.status
@@ -112,24 +113,16 @@ export default {
 		},
 		queryLogistics() {
 			//跳转查询物流页面
-			this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + this.orderId)
+			this.$api.navigateTo('/pages/user/order/order-logistics?shopOrderId=' + this.shopOrderId)
 		},
 		btnConfirmPay() {
-			// 立即支付点击事件
-			this.getOrderPaymentValidation(this.orderId)
-		},
-		getOrderPaymentValidation(orderId) {
 			//监听根据付款状态做操作
-			this.OrderService.OrderPaymentValidation({ orderId: orderId })
+			this.OrderService.OrderPaymentValidation({ shopOrderId: this.shopOrderId })
 				.then(response => {
 					if (response.data.code == -1) {
 						this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
 					} else {
-						if (response.data.onlinePayFlag === 1) {
-							this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${orderId}`)
-						} else {
-							this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${orderId}`,)
-						}
+						this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${this.orderId}`,)
 					}
 				})
 				.catch(error => {

+ 8 - 16
pages/user/order/order-sharelogin.vue

@@ -57,7 +57,7 @@ export default {
 	},
 	onLoad(e) {
 		console.log(e)
-		this.params.orderId = e.orderId
+		this.params.shopOrderId = e.shopOrderId
 		this.params.userId = e.userId
 		if (e.serviceProviderId) {
 			this.params.serviceProviderId = e.serviceProviderId
@@ -77,18 +77,18 @@ export default {
 					this.getOrderCommodityData()
 				} else if (response.code == 1) {
 					// 同为会所运营人员查看订单详情
-					this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderId=${this.params.orderId}`)
+					this.$api.navigateTo(`/pages/user/order/order-details?type=share&shopOrderId=${this.params.shopOrderId}`)
 				} else if (response.code == 2) {
 					// 协销查看分享订单
 					this.$api.navigateTo(
-						`/pages/seller/order/order-details?type=share&orderId=${this.params.orderId}&userId=${
+						`/pages/seller/order/order-details?type=share&shopOrderId=${this.params.shopOrderId}&userId=${
 							this.params.userId
 						}`
 					)
 				} else if (response.code == 3) {
 					// 游客第二次查看订单详情
 					this.$api.redirectTo(
-						`/pages/user/order/order-sharedetails?orderId=${this.params.orderId}&userId=${
+						`/pages/user/order/order-sharedetails?shopOrderId=${this.params.shopOrderId}&userId=${
 							this.params.userId
 						}`
 					)
@@ -100,7 +100,7 @@ export default {
 		},
 		getOrderCommodityData() {
 			//查询订单商品信息s
-			this.OrderService.OrderCommodityData({ orderId: this.params.orderId })
+			this.OrderService.OrderCommodityData({ shopOrderId: this.params.shopOrderId })
 				.then(response => {
 					const data =  response.data
 					this.productList = data.productList
@@ -126,27 +126,19 @@ export default {
 					break
 				case 2:
 					this.$api.navigateTo(
-						`/pages/user/order/orderShareLogin?orderId=${this.params.orderId}&userId=${this.params.userId}`
+						`/pages/user/order/orderShareLogin?shopOrderId=${this.params.shopOrderId}&userId=${this.params.userId}`
 					)
 					break
 			}
 		},
 		btnConfirmPay() {
-			// 待支付订单
-			this.getOrderPaymentValidation(this.params.orderId)
-		},
-		getOrderPaymentValidation(orderId) {
 			//监听根据付款状态做操作
-			this.OrderService.OrderPaymentValidation({ orderId: orderId })
+			this.OrderService.OrderPaymentValidation({ orderId: this.params.shopOrderId })
 				.then(response => {
 					if(response.data.code == -1){
 						this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
 					}else{
-						if (response.data.onlinePayFlag === 1) {// 只能线下
-							this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${orderId}`)
-						} else {
-							this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${orderId}`)
-						}
+						this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${orderId}`)
 					}
 				})
 				.catch(error => {

+ 3 - 3
pages/user/order/orderShareLogin.vue

@@ -27,7 +27,7 @@
 					iv:'',
 					encryptedData:'',
 					shareCode:'',	// 邀请码
-					orderId:0,		// 订单ID
+					shopOrderId:0,		// 订单ID
 					userId:0,		// 分享人的用户ID
 				},
 				isShareStatus:false,
@@ -35,7 +35,7 @@
 		},
 		onLoad(e) {
 			console.log(e)
-			this.params.orderId = e.orderId
+			this.params.shopOrderId = e.shopOrderId
 			this.params.userId = e.userId
 			this.initGetCode()
 		},
@@ -57,7 +57,7 @@
 				}
 				this.OrderService.OrderShareCode(this.params).then(response =>{
 					if (response.code === 0) {//游客第一次查看订单详情
-						this.$api.redirectTo(`/pages/user/order/order-sharedetails?orderId=${this.params.orderId}&userId=${this.params.userId}`)
+						this.$api.redirectTo(`/pages/user/order/order-sharedetails?shopOrderId=${this.params.shopOrderId}&userId=${this.params.userId}`)
 					}else{
 						this.$util.msg(response.msg,2000)
 					}

+ 317 - 311
pages/user/order/search-order.vue

@@ -19,7 +19,7 @@
 					/>
 					<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
 				</view>
-				<view class="search-btn" @click="subMitSearch()">搜索</view>
+				<view class="search-btn" @click="subMitSearch">搜索</view>
 			</view>
 		</view>
 		<view class="search-container-history" v-if="!isShowWrapper">
@@ -88,7 +88,7 @@
 										>下单时间:{{ order.orderTime }}</view
 									>
 									<view class="order-title-tip tui-skeleton-fillet">{{
-										StateExpFormat(order.status)
+										order.status | StateExpFormat
 									}}</view>
 								</view>
 							</view>
@@ -229,6 +229,17 @@
 			:beanNumber="beanNumber"
 			@cancel="handleBeanlClick"
 		/>
+		<!-- 提示弹窗 -->
+		<tui-modal
+			:show="modal"
+			@click="handleClick"
+			:content="contentModalText"
+			:button="modalButton"
+			color="#333"
+			:size="32"
+			shape="circle"
+			:maskClosable="false"
+		/>
 		<!-- 透明模态层 -->
 		<modal-layer v-if="isModalLayer"/>
 	</view>
@@ -240,7 +251,7 @@ import empty from '@/components/empty'
 import modalLayer from '@/components/modal-layer'
 import cmListButton from './components/cm-list-button' //底部按钮
 import cmSharePopup from './components/cm-share-popup' //分享弹窗
-import cmPrderpayPopup from './components/cm-orderpay-popup' //付款弹窗
+import cmOrderpayPopup from './components/cm-orderpay-popup' //付款弹窗
 import activityBean from '@/components/cm-module/activity/activityBean.vue'
 
 const defaultListQuery = {
@@ -256,7 +267,7 @@ export default {
 		modalLayer,
 		cmListButton,
 		cmSharePopup,
-		cmPrderpayPopup,
+		cmOrderpayPopup,
 		activityBean
 	},
 	data() {
@@ -272,9 +283,9 @@ export default {
 			windowHeight: '',
 			showSkeleton: true,
 			orderList: [],
-			btnoRderID: 0, // 点击按钮传入的的订单ID
 			scrollTop: 0,
 			skeletonShow: true,
+			isPayModel:false, // 付款弹窗
 			isShareModal: false, // 控制分享弹窗
 			isCenceModal: false, // 控制取消订单弹窗
 			isShowDelModal: false, // 控制删除订单弹窗
@@ -286,10 +297,30 @@ export default {
 			navbarHeight: '',
 			nomoreText: '上拉显示更多',
 			scrollHeight: '',
+			modelType: 0,
 			beansType: 1,
 			beanNumber: 0,
 			isActivityBean: false,
 			payModelData: {},
+			handleShopOrderId: 0, //点击按钮传入的的子订单ID
+			handleModelEven:0,
+			modal:false,
+			contentModalText: '订单查询失败,请稍候重试~', //操作文字提示语句
+			modalButton: [
+				{
+					text: '取消',
+					type: 'gray',
+					plain: true //是否空心
+				},
+				{
+					text: '确定',
+					customStyle: {
+						color: '#fff',
+						bgColor: 'linear-gradient(90deg, #F28F31 0%, #FF5B00 100%)'
+					},
+					plain: false
+				}
+			]
 		}
 	},
 	onLoad() {
@@ -299,324 +330,317 @@ export default {
 		NumFormat(value) {
 			//处理金额
 			return Number(value).toFixed(2)
-		}
+		},
+		StateExpFormat(state) {
+			//订单状态文字和颜色
+			const map = {
+				0: '待确认',
+				4: '交易完成',
+				5: '订单完成',
+				6: '已关闭',
+				7: '交易全退',
+				77: '交易全退',
+				11: '待付款待发货',
+				12: '待付款部分发货',
+				13: '待付款已发货',
+				21: '部分付款待发货',
+				22: '部分付款部分发货',
+				23: '部分付款已发货',
+				31: '已付款待发货',
+				32: '已付款部分发货',
+				33: '已付款已发货',
+				111: '待付款待发货'
+			}
+			return map[state]
+		},
 	},
 	methods: {
 		subMitSearch() {
 			if (this.listQuery.searchWord == '') {
 				this.$util.msg('请输入商品关键词', 2000)
 			} else {
-				this.commodityList = []
-				this.getOrderDatainit()
+				this.getList()
 			}
 		},
 		async initGetSerachRecord() {
-			const userInfo = await this.$api.getStorage()
-			this.listQuery.userId = userInfo.userId ? userInfo.userId : 0
-			this.OrderService.SearchOrderHistory({ userId: this.listQuery.userId })
-				.then(response => {
-					this.serachRecordList = response.data
-					if (this.serachRecordList.length > 0) {
-						this.isSearchHistory = true
-					} else {
-						this.isSearchHistory = false
-					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
-		},
-		onShowClose() {
-			//输入框失去焦点时触发
-			this.inputEmpty(this.listQuery.searchWord)
-		},
-		onFocus() {
-			//输入框获取焦点时触发
-			this.inputEmpty(this.listQuery.searchWord)
-			this.initGetSerachRecord()
-		},
-		delInputText() {
-			//清除输入框内容
-			this.listQuery.searchWord = ''
-			this.isShowClose = false
-			this.isShowWrapper = false
-			this.inputEmpty(this.listQuery.searchWord)
-			this.initGetSerachRecord()
-		},
-		keywordsClick(item) {
-			//关键词搜索与历史搜索
-			this.listQuery.searchWord = item
-			this.isShowClose = true
-			this.subMitSearch()
+			try{
+				const userInfo = await this.$api.getStorage()
+				this.listQuery.userId = userInfo.userId ? userInfo.userId : 0
+				const res = await this.OrderService.SearchOrderHistory({ userId: this.listQuery.userId })
+				this.serachRecordList = res.data
+				if (this.serachRecordList.length > 0) {
+					this.isSearchHistory = true
+				} else {
+					this.isSearchHistory = false
+				}
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
 		},
-		confirmDetele() {
+		async confirmDetele() {
 			//清空历史记录
-			this.$util.modal('提示', '确定删除历史记录?', '确定', '取消', true, () => {
-				this.OrderService.ClearOrderHistory({ userId: this.listQuery.userId })
-					.then(response => {
-						this.$util.msg('删除记录成功', 2000, true, 'success')
-						this.serachRecordList = []
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
-		},
-		inputEmpty(val) {
-			this.isShowWrapper = false
-			if (val != '') {
-				this.isShowClose = true
-			} else {
-				this.isShowClose = false
+			try{
+				const res = await this.OrderService.ClearOrderHistory({ userId: this.listQuery.userId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				this.serachRecordList = []
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
 			}
 		},
-		getOrderDatainit(index, source) {
-			this.OrderService.SearchOrderInfo(this.listQuery)
-				.then(response => {
-					this.isShowWrapper = true
-					this.showSkeleton = true
-					let data = response.data
-					if (data && data.list.length > 0) {
-						let filrerData = data.list.filter(item => {
-							//添加不同状态下订单的表现形式
-							item = Object.assign(item, this.StateExpFormat(item.status))
-							return item
-						})
-						this.orderList = []
-						filrerData.forEach(item => {
-							this.orderList.push(item)
-						})
-						this.hasNextPage = data
-						if (this.hasNextPage) {
-							this.pullUpOn = false
-							this.nomoreText = '上拉显示更多'
-						} else {
-							if (this.orderList.length < 2) {
-								this.pullUpOn = true
-							} else {
-								this.pullUpOn = false
-								this.nomoreText = '已至底部'
-							}
-						}
-						this.isShowEmpty = false
-					} else {
-						this.isShowEmpty = true
-					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
-		},
-		getOnReachBottomData() {
-			//上拉加载
-			this.listQuery.pageNum += 1
-			this.OrderService.SearchOrderInfo(this.listQuery)
-				.then(response => {
-					let data = response.data
-					this.hasNextPage = data.hasNextPage
-					this.orderList = this.orderList.concat(data.list)
-					this.pullFlag = false // 防上拉暴滑
-					setTimeout(() => {
-						this.pullFlag = true
-					}, 500)
+		async getList() {
+			try{
+				const res = await this.OrderService.SearchOrderInfo(this.listQuery)
+				const data = res.data
+				if (data && data.list.length > 0) {
+					this.orderList = data.list
+					this.hasNextPage = data
 					if (this.hasNextPage) {
 						this.pullUpOn = false
 						this.nomoreText = '上拉显示更多'
 					} else {
-						this.loadding = false
-						this.pullUpOn = false
-						this.nomoreText = '已至底部'
+						if (this.orderList.length < 2) {
+							this.pullUpOn = true
+						} else {
+							this.pullUpOn = false
+							this.nomoreText = '已至底部'
+						}
 					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
-		},
-		scrolltolower() {
-			if (this.hasNextPage) {
-				this.loadding = true
-				this.pullUpOn = true
-				this.showSkeleton = false
-				this.getOnReachBottomData()
+					this.isShowWrapper = true
+					this.showSkeleton = true
+					this.isShowEmpty = false
+				} else {
+					this.isShowEmpty = true
+				}
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
 			}
 		},
-		detail(orderId) {
-			//订单详情跳转
-			this.isModalLayer = true
-			this.$api.navigateTo(`/pages/user/order/order-details?state=${this.currentTab}&orderId=${orderId}`)
+		async getOnReachBottomData() {
+			//上拉加载
+			try{
+				this.listQuery.pageNum += 1
+				const res = await this.OrderService.SearchOrderInfo(this.listQuery)
+				const data = res.data
+				this.orderList = this.orderList.concat(data.list)
+				this.hasNextPage = data.hasNextPage
+				this.pullFlag = false // 防上拉暴滑
+				setTimeout(() => {
+					this.pullFlag = true
+				}, 500)
+				if (this.hasNextPage) {
+					this.pullUpOn = false
+					this.nomoreText = '上拉显示更多'
+				} else {
+					this.loadding = false
+					this.pullUpOn = false
+					this.nomoreText = '已至底部'
+				}
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
 		},
 		handButtonConfirm(data) {
 			//获取点击
-			this.handShowAlert(data)
-			this.btnoRderID = data.orderId
-		},
-		handShowAlert(data) {
-			//执行
+			this.handleShopOrderId = data.shopOrderId
 			switch (data.type) {
-				case 'delete':
-					this.handOrderDetele(data.orderId)
+				case 'cancel'://取消订单
+					this.modal = true
+					this.contentModalText = '确认取消该订单吗?'
+					this.handleModelEven = 1
 					break
-				case 'cancel':
-					this.handCenceConfirm(data.orderId)
+				case 'confirm'://确认收货
+					this.modal = true
+					this.contentModalText = '确认收货吗?'
+					this.handleModelEven = 2
+					break	
+				case 'delete'://删除订单
+					this.modal = true
+					this.contentModalText = '确认删除该订单吗?'
+					this.handleModelEven = 3
+					break	
+				case 'confirmation': // 确认订单
+					this.modal = true
+					this.contentModalText = '确认此订单吗?'
+					this.handleModelEven = 4
 					break
-				case 'query':
-					this.isModalLayer = true
-					this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
-					break
-				case 'confirm':
-					this.handOrderConfirm(data.orderId)
+				case 'payment': //打款给供应商
+					this.modal = true
+					this.contentModalText = '确定委托采美平台打款给供应商吗?确定之前请务必确保货品完好!'
+					this.handleModelEven = 5
 					break
 				case 'pay':
-					this.hanldOrderData = data.order
 					this.getOrderPaymentValidation(data)
-					break
-				case 'confirmation':
-					this.handOrderConfirmation(data.orderId)
-					break
-				case 'payment':
-					this.hanldConfirmFn(data.orderId)
-					break
+					break	
+				case 'query':
+					this.isModalLayer = true
+					this.$api.navigateTo('/pages/user/order/order-logistics?shopOrderId=' + data.shopOrderId)
+					break	
 			}
 		},
-		getOrderPaymentValidation(data) {
-			//监听根据付款状态做操作
-			this.OrderService.OrderPaymentValidation({ orderId: data.orderId })
-				.then(response => {
-					let data = response.data
-					this.payModelData = data
-					if(data.balanceFlag == 1){// 0可以走余额抵扣,1不能走余额抵扣
-						this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
-					}else{
-						switch (data.code) {
-							case 1:
-								this.isPayModel = true
-								this.modelType = 1
-								break
-							case 2:
-								this.isPayModel = true
-								this.modelType = 2
-								break
-							case -1:
-								this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
-								break
-							default:
-								if (data.onlinePayFlag == 1) {// 只能线下
-									this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${data.orderId}`)
-								} else {
-									this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
-								}
-						}
-					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+		handleClick(e){
+			//确认操作
+			if (e.index == 1) {
+				switch(this.handleModelEven){
+					case 1://取消订单
+						this.cancelOrder(this.handleShopOrderId)
+					 break
+					case 2://确认收货
+						this.confirmReceipt(this.handleShopOrderId)
+					 break
+					case 3://删除订单
+						this.deleteOrder(this.handleShopOrderId)
+					 break
+					case 4://确认订单
+						this.affirmOrder(this.handleShopOrderId)
+					 break
+					case 5://打款给供应商
+						this.confirmpayment(this.handleShopOrderId)
+					 break
+				}
+			}
+			this.modal = false
 		},
-		hanldPaymentConfirm(data) {
-			//余额抵扣跳转
-			this.OrderService.OrderBalanceDeduction({ orderId: data.order.orderId })
-				.then(response => {
-					if (data.type === 2) {
-						let _data = { orderId: data.order.orderId }
-						this.$api.navigateTo(
-							`/pages/user/order/success?type=deduction&data=${JSON.stringify({ data: _data })}`
-						)
-					} else {
-						this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${data.order.orderId}`)
+		//取消订单
+		async cancelOrder(shopOrderId) {
+			try{
+				const res = await this.OrderService.CancelOrder({ shopOrderId: shopOrderId, userIdentity : 0 })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.getList()
+				}, 2000)
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//确认收货
+		async confirmReceipt(shopOrderId) {
+			try{
+				const res = await this.OrderService.ConfirmReceipt({ shopOrderId: shopOrderId })
+				this.beansType = 7
+				this.beanNumber = 100
+				this.isActivityBean = true
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//删除订单
+		async deleteOrder(shopOrderId) {
+			try{
+				const res = await this.OrderService.DeleteOrder({ shopOrderId: shopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.getList()
+				}, 2000)
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//确认订单
+		async affirmOrder(shopOrderId) {
+			try{
+				const res = await this.OrderService.AffirmOrder({ shopOrderId: shopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.getList()
+				}, 2000)
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//确认打款给供应商
+		async confirmpayment(shopOrderId) {
+			try{
+				const res = await this.OrderService.confirmpayment({ shopOrderId: shopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.getList()
+				}, 2000)
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//监听根据付款状态做操作
+		async getOrderPaymentValidation(data) {
+			try{
+				const res = await this.OrderService.OrderPaymentValidation({ shopOrderId: data.shopOrderId })
+				const data = res.data
+				this.payModelData = data
+				if(data.balanceFlag == 1){// 0可以走余额抵扣,1不能走余额抵扣
+					this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
+				}else{
+					switch (data.code) {
+						case 1:
+							this.isPayModel = true
+							this.modelType = 1
+							break
+						case 2:
+							this.isPayModel = true
+							this.modelType = 2
+							break
+						case -1:
+							this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
+							break
+						default:
+							this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
 					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+				}
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//余额抵扣跳转
+		async hanldPaymentConfirm(data) {
+			try{
+				await this.OrderService.OrderBalanceDeduction({ shopOrderId: data.order.shopOrderId })
+				const data = { shopOrderId: data.order.shopOrderId }
+				if (data.type === 2) {
+					this.$api.navigateTo(`/pages/user/order/success?type=deduction&data=${JSON.stringify({ data: data })}`)
+				}else{
+					this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.order.orderId}`)
+				}
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
 		},
 		hanldCancelConfirm(data) {
 			//不使用余额抵扣直接跳转收银台
-			if (data.onlinePayFlag === 1) {// 只能线下
-				this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${data.orderId}`)
-			} else {
-				this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
-			}
+			this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
 		},
-		hanldConfirmFn(orderId) {
-			//确认打款供应商
-			this.$util.modal(
-				'提示',
-				'确定委托采美平台打款给供应商吗?确定之前请务必确保货品完好?',
-				'确定',
-				'取消',
-				true,
-				() => {
-					this.OrderService.confirmpayment({ orderId: orderId })
-						.then(response => {
-							this.$util.msg('确认成功', 2000, true, 'success')
-							setTimeout(() => {
-								this.getOrderDatainit(this.currentTab)
-							}, 2000)
-						})
-						.catch(error => {
-							this.$util.msg(error.msg, 2000)
-						})
-				}
-			)
+		detail(shopOrderId) {
+			//订单详情跳转
+			this.isModalLayer = true
+			this.$api.navigateTo(`/pages/user/order/order-details?shopOrderId=${shopOrderId}`)
 		},
-		handOrderConfirm(orderId) {
-			//确认收货
-			this.$util.modal('提示', '是否确认收货', '确定', '取消', true, () => {
-				this.OrderService.ConfirmReceipt({ orderId: orderId })
-					.then(response => {
-						this.beansType = 7
-						this.beanNumber = 100
-						this.isActivityBean = true
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		onShowClose() {
+			//输入框失去焦点时触发
+			this.inputEmpty(this.listQuery.searchWord)
 		},
-		handOrderConfirmation(orderId) {
-			//确认订单
-			this.$util.modal('提示', '确认此订单?', '确定', '取消', true, () => {
-				this.OrderService.AffirmOrder({ orderId: orderId })
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						setTimeout(() => {
-							this.getOrderDatainit(this.currentTab)
-						}, 2000)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		onFocus() {
+			//输入框获取焦点时触发
+			this.inputEmpty(this.listQuery.searchWord)
+			this.initGetSerachRecord()
+		},
+		inputEmpty(val) {
+			this.isShowWrapper = false
+			if (val != '') {
+				this.isShowClose = true
+			} else {
+				this.isShowClose = false
+			}
 		},
-		handOrderDetele(orderId) {
-			//删除订单
-			this.$util.modal('提示', '确认删除该订单吗?', '确定', '取消', true, () => {
-				this.OrderService.DeleteOrder({ orderId: orderId })
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						setTimeout(() => {
-							this.getOrderDatainit(this.currentTab)
-						}, 2000)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		delInputText() {
+			//清除输入框内容
+			this.listQuery.searchWord = ''
+			this.isShowClose = false
+			this.isShowWrapper = false
+			this.inputEmpty(this.listQuery.searchWord)
+			this.initGetSerachRecord()
 		},
-		handCenceConfirm(orderId) {
-			//取消订单
-			this.$util.modal('提示', '确认取消该订单吗?', '确定', '取消', true, () => {
-				this.OrderService.CancelOrder({ orderId: orderId , userIdentity : 0})
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						setTimeout(() => {
-							this.getOrderDatainit(this.currentTab)
-						}, 2000)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		keywordsClick(item) {
+			//关键词搜索与历史搜索
+			this.listQuery.searchWord = item
+			this.isShowClose = true
+			this.subMitSearch()
 		},
 		onShareAppMessage(res) {
 			//分享转发
@@ -630,6 +654,14 @@ export default {
 				imageUrl: 'https://static.caimei365.com/app/img/bg/min-banner.jpg'
 			}
 		},
+		scrolltolower() {
+			if (this.hasNextPage) {
+				this.loadding = true
+				this.pullUpOn = true
+				this.showSkeleton = false
+				this.getOnReachBottomData()
+			}
+		},
 		setScrollHeight() {
 			const { windowHeight, pixelRatio } = wx.getSystemInfoSync()
 			this.windowHeight = windowHeight - 1
@@ -646,44 +678,18 @@ export default {
 			}
 			return false
 		},
-		StateExpFormat(state) {
-			//订单状态文字和颜色
-			var HtmlStateText = '',
-				stateTextObject = {
-					0: '待确认',
-					4: '交易完成',
-					5: '订单完成',
-					6: '已关闭',
-					7: '交易全退',
-					77: '交易全退',
-					11: '待付款待发货',
-					12: '待付款部分发货',
-					13: '待付款已发货',
-					21: '部分付款待发货',
-					22: '部分付款部分发货',
-					23: '部分付款已发货',
-					31: '已付款待发货',
-					32: '已付款部分发货',
-					33: '已付款已发货',
-					111: '待付款待发货'
-				}
-			Object.keys(stateTextObject).forEach(function(key) {
-				if (key == state) {
-					HtmlStateText = stateTextObject[key]
-				}
-			})
-			return HtmlStateText
-		},
+		
 		handleBeanlClick() {
 			//关闭采美豆弹窗
 			this.isActivityBean = false
-			this.getOrderDatainit()
+			this.getList()
 		}
 	},
 	onPageScroll(e) {
 		this.scrollTop = e.scrollTop
 	},
 	onShow() {
+		this.isModalLayer = false
 		this.setScrollHeight()
 	}
 }

+ 86 - 78
pages/user/order/success.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="container cashier">
-		<cu-custom :navbar-data='nvabarData'></cu-custom>
-		<view class="container-cash clearfix" :style="{marginTop:CustomBar+'px'}">
+		<cu-custom :navbar-data="nvabarData"></cu-custom>
+		<view class="container-cash clearfix" :style="{ marginTop: CustomBar + 'px' }">
 			<view class="container-wrapper">
 				<view class="cash-icon">
 					<image src="https://static.caimei365.com/app/img/icon/icon-success@2x.png" mode=""></image>
@@ -10,8 +10,18 @@
 					<text>{{ successText }}</text>
 				</view>
 				<view class="cash-btn">
-					<view class="btn btn-open" @click="this.$api.navigateTo('/pages/user/order/order-details?type=confim&orderId='+orderId)">查看订单</view>
-					<view class="btn btn-home" @click="this.$api.switchTabTo('/pages/tabBar/home/index')">继续采购</view>
+					<view
+						class="btn btn-open"
+						@click="
+							this.$api.navigateTo(
+								'/pages/user/order/order-details?type=confim&shopOrderId=' + shopOrderId
+							)
+						"
+						>查看订单</view
+					>
+					<view class="btn btn-home" @click="this.$api.switchTabTo('/pages/tabBar/home/index')"
+						>继续采购</view
+					>
 				</view>
 			</view>
 		</view>
@@ -19,90 +29,88 @@
 </template>
 
 <script>
-	export default{
-		data(){
-			return{
-				orderId:'',
-				nvabarData: {		//顶部自定义导航
-					haveBack:false,
-					showCapsule:1, // 是否显示左上角图标  1表示显示  0表示不显示,
-					showSearch: 0,
-					title: '支付结果',  // 导航栏 中间的标题
-					textLeft:this.$store.state.isIphone
-				},
-				successText:'订单提交并支付成功',
-				isIphoneX:this.$store.state.isIphoneX,
-				CustomBar:this.CustomBar,// 顶部导航栏高度
-				
-			}
-		},
-		onLoad(option) {
-			if(option.type == 'deduction'){
-				this.successText = '支付成功'
-			}else{
-				this.successText = '订单提交并支付成功'
-			}
-			this.initData(option)
-		},
-		methods:{
-			initData(e){
-				let data = JSON.parse(e.data);
-				this.orderId = data.data.orderId
-				console.log(this.orderId)
-			}
-		},
-		onShow() {
-			
+export default {
+	data() {
+		return {
+			shopOrderId: '',
+			nvabarData: {
+				//顶部自定义导航
+				haveBack: false,
+				showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
+				showSearch: 0,
+				title: '支付结果', // 导航栏 中间的标题
+				textLeft: this.$store.state.isIphone
+			},
+			successText: '订单提交并支付成功',
+			isIphoneX: this.$store.state.isIphoneX,
+			CustomBar: this.CustomBar // 顶部导航栏高度
 		}
-	}
+	},
+	onLoad(option) {
+		if (option.type == 'deduction') {
+			this.successText = '支付成功'
+		} else {
+			this.successText = '订单提交并支付成功'
+		}
+		this.initData(option)
+	},
+	methods: {
+		initData(e) {
+			let data = JSON.parse(e.data)
+			this.shopOrderId = data.data.shopOrderId
+			console.log(this.shopOrderId)
+		}
+	},
+	onShow() {}
+}
 </script>
 
 <style lang="scss">
-	page{
-		height: auto !important;
-	}
-	.container-cash{
-		width: 100%;
-		.container-wrapper{
-			width:662rpx;
-			margin: 0 auto;
+page {
+	height: auto !important;
+}
+.container-cash {
+	width: 100%;
+	.container-wrapper {
+		width: 662rpx;
+		margin: 0 auto;
+		margin-top: 120rpx;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		.cash-icon {
+			width: 260rpx;
+			height: 260rpx;
 			margin-top: 120rpx;
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-			.cash-icon{
+			image {
 				width: 260rpx;
 				height: 260rpx;
-				margin-top: 120rpx;
-				image{
-					width: 260rpx;
-					height: 260rpx;
-				}
-			}
-			.cash-text{
-				font-size: $font-size-40;
-				color: $color-system;
-				line-height: 104rpx;
 			}
-			.cash-btn{
-				margin-top: 120rpx;
-				.btn{
-					width: 256rpx;
-					height: 80rpx;
-					border-radius: 40rpx;
-					line-height: 80rpx;
-					text-align: center;
-					font-size: $font-size-26;
-					color: #FFFFFF;
-					margin: 12rpx 0;
-					&.btn-open{
-						background:linear-gradient(315deg,rgba(0,212,150,1) 0%,rgba(126,243,174,1) 100%);
-					}
-					&.btn-home{
-						background:$btn-confirm;
-					}
+		}
+		.cash-text {
+			font-size: $font-size-40;
+			color: $color-system;
+			line-height: 104rpx;
+		}
+		.cash-btn {
+			margin-top: 120rpx;
+			.btn {
+				width: 256rpx;
+				height: 80rpx;
+				border-radius: 40rpx;
+				line-height: 80rpx;
+				text-align: center;
+				font-size: $font-size-26;
+				color: #ffffff;
+				margin: 12rpx 0;
+				&.btn-open {
+					background: linear-gradient(315deg, rgba(0, 212, 150, 1) 0%, rgba(126, 243, 174, 1) 100%);
+				}
+				&.btn-home {
+					background: $btn-confirm;
 				}
 			}
 		}
 	}
+}
 </style>

+ 15 - 9
services/order.service.js

@@ -226,15 +226,6 @@ export default class OrderService {
               
         })
     }
-    /* 提交订单 购买资质的验证 */
-    createdOrderCerify (data = {}) {
-        return this.AjaxService.post({ 
-            url:'/order/submit/verify', 
-            data, 
-            isLoading: false ,
-              
-        })
-    }
     /* 提交订单 orderId 订单ID */
     CreatedOrderSubmit (data = {}) {
         return this.AjaxService.post({ 
@@ -306,4 +297,19 @@ export default class OrderService {
               
         })
     }
+    /**
+	 * @订单保存支付凭证
+	 * @param:ID 用户ID(必填)
+	 * @param:shopOrderId 订单Id(必填)
+	 * @param:remarks 用户ID(必填)
+	 * @param:voucherImgs 用户ID(必填)
+	 */
+    orderInsertVoucher (data = {}) {
+	    return this.AjaxService.post({ 
+	        url:'/order/club/insertVoucher', 
+	        data, 
+	        isLoading: false ,
+	          
+	    })
+    }
 }

BIN
static/temp/line@3x.png


+ 1 - 1
utils/router.config.js

@@ -33,7 +33,7 @@ export const includeList = [
     {title:'机构订单详情', url:'/pages/user/order/order-details',pageLabel:'机构订单详情', pageType:34 },
     {title:'线下支付', url:'/pages/user/order/order-payunder',pageLabel:'线下支付', pageType:36 },
     {title:'线上支付', url:'/pages/user/order/order-pay-list',pageLabel:'线上支付', pageType:37 },
-    {title:'线上收银台', url:'/pages/user/order/order-payment',pageLabel:'线上收银台', pageType:38 },
+    {title:'线上收银台', url:'/pages/user/pay/card-order',pageLabel:'线上收银台', pageType:38 },
     {title:'机构收货地址管理', url:'/pages/user/address/address',pageLabel:'机构收货地址管理', pageType:39 },
     {title:'机构运营人员管理', url:'/pages/user/operator/list',pageLabel:'机构运营人员管理', pageType:40 },
     {title:'机构购物车', url:'/pages/tabBar/cart/index',pageLabel:'机构购物车', pageType:41 },