瀏覽代碼

订单修改

zhengjinyi 2 年之前
父節點
當前提交
8a4c9939a2
共有 47 個文件被更改,包括 3772 次插入3854 次删除
  1. 1 0
      mixins/payMixins.js
  2. 6 0
      pages.json
  3. 3 3
      pages/notice/club/notice-order.vue
  4. 1 1
      pages/seller/cart/mixins/cartMixins.js
  5. 1 1
      pages/seller/cart/second.vue
  6. 8 8
      pages/seller/club/club-list.vue
  7. 210 192
      pages/seller/order/components/cm-details-button.vue
  8. 368 472
      pages/seller/order/components/cm-freight-popup.vue
  9. 87 61
      pages/seller/order/components/cm-goods-temp.vue
  10. 201 182
      pages/seller/order/components/cm-list-button.vue
  11. 1 0
      pages/seller/order/components/cm-orderpay-popup.vue
  12. 12 10
      pages/seller/order/components/cm-share-popup.vue
  13. 3 14
      pages/seller/order/components/details/cm-address-temp.vue
  14. 68 67
      pages/seller/order/components/details/cm-goods-temp.vue
  15. 35 118
      pages/seller/order/components/details/cm-order-temp.vue
  16. 1 1
      pages/seller/order/components/details/cm-voucher-temp.vue
  17. 83 237
      pages/seller/order/create-order.vue
  18. 94 0
      pages/seller/order/mixins/conMixins.js
  19. 168 0
      pages/seller/order/mixins/orderMixins.js
  20. 5 183
      pages/seller/order/order-club-details.vue
  21. 297 243
      pages/seller/order/order-details.vue
  22. 220 390
      pages/seller/order/order-historylist.vue
  23. 331 482
      pages/seller/order/order-list.vue
  24. 243 425
      pages/seller/order/search-order.vue
  25. 209 197
      pages/user/order/components/cm-details-button.vue
  26. 1 1
      pages/user/order/components/cm-invice-popup.vue
  27. 10 11
      pages/user/order/components/cm-list-button.vue
  28. 8 6
      pages/user/order/components/cm-share-popup.vue
  29. 3 13
      pages/user/order/components/details/cm-address-temp.vue
  30. 1 1
      pages/user/order/components/details/cm-order-temp.vue
  31. 1 1
      pages/user/order/components/details/cm-voucher-temp.vue
  32. 43 36
      pages/user/order/create-order.vue
  33. 26 20
      pages/user/order/order-details.vue
  34. 78 110
      pages/user/order/order-list.vue
  35. 288 258
      pages/user/order/order-logistics.vue
  36. 40 47
      pages/user/order/order-pay-list.vue
  37. 5 5
      pages/user/order/order-payunder.vue
  38. 8 8
      pages/user/order/order-sharedetails.vue
  39. 12 9
      pages/user/order/order-success.vue
  40. 30 26
      pages/user/order/search-order.vue
  41. 1 7
      pages/user/order/success.vue
  42. 3 2
      pages/user/pay/card-comfirm-sub.vue
  43. 2 2
      pages/user/pay/card-order.vue
  44. 540 0
      pages/user/pay/card-under.vue
  45. 3 3
      services/order.service.js
  46. 12 0
      services/pay.service.js
  47. 1 1
      services/sellse.service.js

+ 1 - 0
mixins/payMixins.js

@@ -40,6 +40,7 @@ const payMixins = {
 			       // 微信支付成功回调
 			       let linkData =  {
                         payAmount:this.payAmount,
+                        shopOrderId:this.shopOrderInfo.shopOrderId,
                         orderId:this.shopOrderInfo.orderId,
                         type:'success'
                     }

+ 6 - 0
pages.json

@@ -556,6 +556,12 @@
 						"navigationBarTitleText": "收银台",
 						"navigationStyle": "custom"
 					}
+				},
+				{
+					"path": "pay/card-under",
+					"style": {
+						"navigationBarTitleText": "线下转账"
+					}
 				}
 				
 			]

+ 3 - 3
pages/notice/club/notice-order.vue

@@ -36,8 +36,8 @@
 					</tui-swipe-action>
 				</view>
 				<!--加载loadding-->
-				<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
-				<tui-nomore :visible="!pullUpOn" :backgroundColor="'#F7F7F7'" :text="nomoreText"></tui-nomore>
+				<tui-loadmore :visible="loadding" :index="3" type="black" />
+				<tui-nomore :visible="!pullUpOn" :backgroundColor="'#F7F7F7'" :text="nomoreText" />
 				<!--加载loadding-->
 			</view>
 		</view>
@@ -89,7 +89,7 @@ export default {
 						0: `/pages/user/order/order-pay-list?orderId=${cell.orderId}`,
 						1: `/pages/user/order/order-payunder?orderId=${cell.orderId}`
 					}
-					let linkJumpMap = { 1: payLinkMap[cell.onlinePayFlag] }
+					let linkJumpMap = { 1: `/pages/user/order/order-payunder?orderId=${cell.orderId}` }
 					this.$api.navigateTo(linkJumpMap[cell.orderMessageType])
 				} else {
 					this.$util.msg('订单已完成支付', 2000)

+ 1 - 1
pages/seller/cart/mixins/cartMixins.js

@@ -49,7 +49,7 @@ const cartMixins = {
                     return
                 }
                 let cartSkuIds = { skuIds: skuIds.substring(0, skuIds.lastIndexOf(',')) }
-                this.$api.navigateTo(`/pages/seller/order/create-order?data=${JSON.stringify({ data: cartSkuIds })}`)
+                this.$api.navigateTo(`/pages/seller/order/create-order?type=2&data=${JSON.stringify({ data: cartSkuIds })}`)
             }
         },
         handleBtnConfirm(data) {

+ 1 - 1
pages/seller/cart/second.vue

@@ -169,7 +169,7 @@
 						productIds:this.handleData.productId,
 						productCount:this.number
 				}	
-				this.$api.navigateTo(`/pages/seller/order/create-order?type=prodcut&data=${JSON.stringify({data:productStp})}`)
+				this.$api.navigateTo(`/pages/seller/order/create-order?type=1&data=${JSON.stringify({data:productStp})}`)
 				setTimeout(() => {
 					this.specClass = 'none';
 				}, 200);

+ 8 - 8
pages/seller/club/club-list.vue

@@ -75,19 +75,19 @@
 						</view>
 						<view class="club-list-bot">
 							<view class="btn" @click.stop="handleClickOper(1, club)"> <text class="iconfont icon-lijixiadan"></text> 立即下单</view>
-							<view class="btn" @click.stop="handleClickOper(2, club)"> <text class="iconfont icon-ershouxiadan"></text> 二手下单</view>
-							<view class="btn" @click.stop="handleClickOper(4, club)"> <text class="iconfont icon-chongzhixiadingjin"></text> 充值/下订金</view>
-							<view class="btn" @click.stop="handleShowBubble(club,index)"> 
+							<view class="btn" @click.stop="handleClickOper(3, club)"> <text class="iconfont icon-zaicigoumai1"></text> 再次购买</view>
+							<view class="btn" @click.stop="handleClickOper(6, club)"> <text class="iconfont icon-youhuiquan"></text> 购买优惠券</view>
+							<!-- <view class="btn" @click.stop="handleShowBubble(club,index)"> 
 								<text class="iconfont icon-gengduo2"></text> 
 								<view class="btn-bubble" v-if="currentIndex === index && club.bubble">
-									<view class="btn-view border" @click.stop="handleClickOper(3, club)">
-										<text class="iconfont icon-zaicigoumai1"></text> 再次购买
+									<view class="btn-view border" @click.stop="handleClickOper(2, club)">
+										<text class="iconfont icon-ershouxiadan"></text> 二手下单
 									</view>
-									<view class="btn-view" @click.stop="handleClickOper(6, club)">
-										<text class="iconfont icon-youhuiquan"></text> 购买优惠券
+									<view class="btn-view" @click.stop="handleClickOper(4, club)">
+										<text class="iconfont icon-chongzhixiadingjin"></text> 充值/下订金
 									</view>
 								</view>
-							</view>
+							</view> -->
 						</view>
 					</view>
 					<!--加载loadding-->

+ 210 - 192
pages/seller/order/components/cm-details-button.vue

@@ -1,229 +1,247 @@
 <template name="button">
-	<view class="button-template" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
+	<view class="button-template" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
 		<!-- 底部按钮 -->
 		<view class="button-content">
-			<view class="btn btn-cancel"  v-if="secondHandOrderFlag!=1 && !rechargeGoods"  @click.stop="btnConfirm('again',order)">再来一单</view>
-			<view class="btn btn-cancel" v-if="btnState.isCancel"  @click.stop="btnConfirm('cancel',order)">取消订单</view>
+			<view
+				class="btn btn-cancel"
+				v-if="secondHandOrderFlag != 1 && !rechargeGoods"
+				@click.stop="btnConfirm('again', order)"
+				>再来一单</view
+			>
+			<view class="btn btn-cancel" v-if="btnState.isCancel" @click.stop="btnConfirm('cancel', order)"
+				>取消订单</view
+			>
 			<!-- <view class="btn btn-cancel" v-if="btnState.isDelete"  @click.stop="btnConfirm('delete',order)">删除订单</view> -->
 			<template>
 				<view class="btn btn-share" v-if="btnState.isPay" @click.stop="onShareCode(1)">
-					<view class="tips" v-if="shareCode">分享码:{{shareCode}}</view>
-					分享支付
-				</view>	
+					<view class="tips" v-if="shareCode">分享码:{{ shareCode }}</view> 分享支付
+				</view>
 				<view class="btn btn-share" v-else @click.stop="onShareCode(2)">
-					<view class="tips" v-if="shareCode">分享码:{{shareCode}}</view>
-					分享订单
-				</view>	
+					<view class="tips" v-if="shareCode">分享码:{{ shareCode }}</view> 分享订单
+				</view>
 			</template>
-			<view class="btn btn-color" v-if="btnState.isConfirm" @click.stop="btnConfirm('confirm',order)">确认订单</view>
-			<view class="btn btn-query" v-if="btnState.isQuery && order.secondHandOrderFlag!=1" @click.stop="btnConfirm('query',order)">查看物流</view>
-			<view class="btn btn-color" v-if="btnState.isPay && ableUserMoney > 0 && !rechargeGoods" @click.stop="btnConfirm('balance',order)">余额抵扣</view>
+			<view class="btn btn-color" v-if="btnState.isConfirm" @click.stop="btnConfirm('confirm', order)"
+				>确认订单</view
+			>
+			<view
+				class="btn btn-query"
+				v-if="btnState.isQuery && order.secondHandOrderFlag != 1"
+				@click.stop="btnConfirm('query', order)"
+				>查看物流</view
+			>
+			<view
+				class="btn btn-color"
+				v-if="btnState.isPay && ableUserMoney > 0 && !rechargeGoods"
+				@click.stop="btnConfirm('balance', order)"
+				>余额抵扣</view
+			>
 		</view>
 	</view>
 </template>
 
 <script>
-	export default{
-		name:'button',
-		props:{
-			status:{
-				type:Number
-			},
-			order: {
-				type:Object
-			},
-			ableUserMoney:{
-				type:Number
-			},
-			rechargeGoods:{
-				type:Boolean
-			},
-			shareCode:{
-				type:String
-			},
-			serviceProviderId:{
-				type:Number
-			},
-			secondHandOrderFlag:{
-				type:String
-			}
+export default {
+	name: 'button',
+	props: {
+		status: {
+			type: Number
 		},
-		watch:{
-			status:{
-				handler:function(val){
-					this.initData(val)
-				},
-				deep:true//对象内部的属性监听,也叫深度监听
-			}
+		order: {
+			type: Object
 		},
-		data() {
-			return{
-				btnState:this.initStatus(),
-				isIphoneX:this.$store.state.isIphoneX,
-				invoiceStatus:false,
-				mapStateArr:[
-					{label:'isQuery',val:[4,5,12,13,33,22,23,32,77],status: true},
-					{label:'isDelete',val:[6],status: true},
-					{label:'isCancel',val:[0,111],status: true},
-					{label:'isConfirm',val:[0],status: true},
-					{label:'isPay',val:[11,12,13,21,22,23,111],status: true},
-				]
-			}
+		ableUserMoney: {
+			type: Number
 		},
-		created(){
-			console.log(this.rechargeGoods)
-			this.initData(this.status)
+		rechargeGoods: {
+			type: Boolean
 		},
-		computed: {
-
+		shareCode: {
+			type: String
 		},
-		methods:{
-			initData(resVal) {
-				/**
-				 * @分享按钮统一显示
-				 * @按钮根据状态显示
-				 * @(4、5、7、12、22、23、32)显示[查看物流]按钮,其他隐藏
-				 * @(6)显示[删除订单],其他隐藏
-				 * @(0、111)显示[取消订单],其他隐藏
-				 * @(21,31)只显示分享
-				 * @(13,33)显示[确认收货]和[查看物流]
-				 */
-				this.btnState = this.initStatus()
-				this.mapStateArr.forEach(el => {
-					el.val.forEach(value => {
-						if(resVal === value){
-							this.btnState[el.label] = el.status
-							//console.log(this.btnState[el.label]);
-						}
-					})
-				})
+		secondHandOrderFlag: {
+			type: String
+		}
+	},
+	watch: {
+		status: {
+			handler: function(val) {
+				this.initData(val)
 			},
-			initStatus(){
-				let btnState= {
-						isQuery: false,
-						isDelete: false,
-						isCancel: false,
-						isConfirm: false,
-						isPay: false,
+			deep: true //对象内部的属性监听,也叫深度监听
+		}
+	},
+	data() {
+		return {
+			btnState: this.initStatus(),
+			isIphoneX: this.$store.state.isIphoneX,
+			invoiceStatus: false,
+			mapStateArr: [
+				{ label: 'isQuery', val: [2, 3, 5, 6, 12, 13, 22, 23, 32, 33], status: true },
+				{ label: 'isDelete', val: [4], status: true },
+				{ label: 'isCancel', val: [0, 11], status: true },
+				{ label: 'isConfirm', val: [0], status: true },
+				{ label: 'isPay', val: [11, 12, 13, 21, 22, 23], status: true }
+			]
+		}
+	},
+	created() {
+		console.log(this.rechargeGoods)
+		this.initData(this.status)
+	},
+	computed: {},
+	methods: {
+		initData(resVal) {
+			/**
+			 * @分享按钮统一显示
+			 * @按钮根据状态显示
+			 * @(2,3,5,6,12,13,22,23,32,33)显示[查看物流]按钮,其他隐藏
+			 * @(4)显示[删除订单],其他隐藏
+			 * @(0、11)显示[取消订单],其他隐藏
+			 * @(13,33)显示[确认收货]和[查看物流]
+			 */
+			this.btnState = this.initStatus()
+			this.mapStateArr.forEach(el => {
+				el.val.forEach(value => {
+					if (resVal === value) {
+						this.btnState[el.label] = el.status
+						//console.log(this.btnState[el.label]);
 					}
-				return 	btnState
-			},
-			getShareCode(code){
-				this.shareCode = code
-			},
-			onShareCode(type){
-				if(this.order.onlinePayFlag == 1){
-					this.$util.modal('提示','本订单不能进行线上支付,请让客户选择线下转账方式付款','继续分享','知道了',true,() =>{
+				})
+			})
+		},
+		initStatus() {
+			let btnState = {
+				isQuery: false,
+				isDelete: false,
+				isCancel: false,
+				isConfirm: false,
+				isPay: false
+			}
+			return btnState
+		},
+		getShareCode(code) {
+			this.shareCode = code
+		},
+		onShareCode(type) {
+			if (this.order.onlinePay == 1) {
+				this.$util.modal(
+					'提示',
+					'本订单不能进行线上支付,请让客户选择线下转账方式付款',
+					'继续分享',
+					'知道了',
+					true,
+					() => {
 						this.$parent.isShareModal = true
-					})	
-				}else{
-					this.$parent.isShareModal = true
-					this.$parent.isShareType = type
-				}
-			},
-			btnConfirm(type,order){
-				let data = {
-						type:type,
-						orderId:order.orderId,
-						order:order
 					}
-				this.$emit('buttonConfirm',data)
-			},
+				)
+			} else {
+				this.$parent.isShareModal = true
+				this.$parent.isShareType = type
+			}
+		},
+		btnConfirm(type, order) {
+			let data = {
+				type: type,
+				shopOrderId: order.shopOrderId,
+				order: order
+			}
+			this.$emit('buttonConfirm', data)
 		}
 	}
+}
 </script>
 
 <style lang="scss">
-	.button-template{
-		width: 100%;
+.button-template {
+	width: 100%;
+	height: auto;
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	background: #ffffff;
+	.button-content {
+		padding: 0 24rpx;
 		height: auto;
-		position: fixed;
-		bottom: 0;
-		left: 0;
-		background: #FFFFFF;
-		.button-content{
-			padding:0 24rpx;
-			height: auto;
+		float: right;
+		position: relative;
+		margin: 20rpx 0;
+		.share-code {
+			width: 200rpx;
+			height: 64rpx;
+			line-height: 64rpx;
+			color: #2a45ff;
+			text-align: left;
+			position: absolute;
+			font-size: $font-size-28;
+			font-weight: bold;
+			left: 24rpx;
+			top: 24rpx;
+		}
+		.btn {
+			width: 160rpx;
+			height: 64rpx;
+			// margin:22rpx;
+			line-height: 64rpx;
+			font-size: $font-size-26;
+			color: #ffffff;
+			text-align: center;
+			border-radius: 34rpx;
 			float: right;
+		}
+		.btn-color {
+			background: $btn-confirm;
+		}
+		.btn-cancel {
+			background: #ffffff;
+			color: #666666;
+			float: left;
+			// margin: 22rpx 0;
+			margin-right: 15rpx;
+			border: 2rpx solid #999999;
+		}
+		.btn-delete {
+			background: linear-gradient(315deg, rgba(255, 163, 3, 1) 0%, rgba(255, 53, 1, 1) 100%);
+		}
+		.btn-query {
+			background: linear-gradient(135deg, rgba(255, 212, 129, 1) 0%, rgba(198, 129, 0, 1) 100%);
+		}
+		.btn-confirm {
+			background: linear-gradient(315deg, rgba(231, 0, 0, 1) 0%, rgba(255, 104, 1, 1) 100%);
+		}
+		.btn-share {
+			background: #ffffff;
+			color: #666666;
+			float: left;
+			// margin: 22rpx 0;
+			margin-right: 15rpx;
+			border: 2rpx solid #999999;
 			position: relative;
-			margin: 20rpx 0;
-			.share-code{
-				width: 200rpx;
-				height:  64rpx;
-				line-height: 64rpx;
-				color: #2A45FF;
-				text-align: left;
-				position: absolute;
-				font-size: $font-size-28;
-				font-weight: bold;
-				left: 24rpx;
-				top: 24rpx;
-			}
-			.btn{
+			.tips {
 				width: 160rpx;
-				height:  64rpx;
-				// margin:22rpx;
-				line-height: 64rpx;
-				font-size:$font-size-26;
-				color: #FFFFFF;
-				text-align: center;
-				border-radius: 34rpx;
-				float: right;
-			}
-			.btn-color{
-				background: $btn-confirm;
-			}
-			.btn-cancel{
-				background:#FFFFFF;
-				color: #666666;
-				float: left;
-				// margin: 22rpx 0;
-				margin-right: 15rpx;
-				border: 2rpx solid #999999;
-			}
-			.btn-delete{
-				background:linear-gradient(315deg,rgba(255,163,3,1) 0%,rgba(255,53,1,1) 100%);
-			}
-			.btn-query{
-				background:linear-gradient(135deg,rgba(255,212,129,1) 0%,rgba(198,129,0,1) 100%);
-			}
-			.btn-confirm{
-				background:linear-gradient(315deg,rgba(231,0,0,1) 0%,rgba(255,104,1,1) 100%);
-			}
-			.btn-share{
-				background:#FFFFFF;
-				color: #666666;
-				float: left;
-				// margin: 22rpx 0;
-				margin-right: 15rpx;
-				border: 2rpx solid #999999;
-				position: relative;
-				.tips{
-					width: 160rpx;
-					height: 34rpx;
-					padding: 10rpx 10rpx;
-					background:#FF5B00;
-					border-radius: 8rpx;
+				height: 34rpx;
+				padding: 10rpx 10rpx;
+				background: #ff5b00;
+				border-radius: 8rpx;
+				position: absolute;
+				color: #ffffff;
+				line-height: 34rpx;
+				font-size: $font-size-24;
+				text-align: left;
+				right: 0;
+				top: -69rpx;
+				&:before {
+					content: '';
+					width: 25rpx;
+					height: 25rpx;
+					background: #ff5b00;
 					position: absolute;
-					color: #FFFFFF;
-					line-height: 34rpx;
-					font-size: $font-size-24;
-					text-align: left;
-					right: 0;
-					top: -69rpx;
-					&:before{
-						content: "";
-						width: 25rpx;
-						height: 25rpx;
-						background:#FF5B00;
-						position: absolute;
-						bottom: -8rpx;
-						left: 30rpx;
-						z-index: -1;
-						transform:rotate(45deg);
-					}
+					bottom: -8rpx;
+					left: 30rpx;
+					z-index: -1;
+					transform: rotate(45deg);
 				}
 			}
 		}
 	}
+}
 </style>

+ 368 - 472
pages/seller/order/components/cm-freight-popup.vue

@@ -1,524 +1,420 @@
 <template name="freight">
-	<view class="freight-template">
-		 <!-- 运费信息 -->
-		<view class="invoice-freight" @tap.stop="hanldOperationConfim">
-			<view class="freight-left">运费</view>
-			<view class="freight-right">
-				<text class="text-l">{{freightText}}</text>
-				<text class="text" v-if="hanldFreightData.postageFlag == 1">¥{{orderPriceToFixed(freightMoney)}}</text>
-				<text class="iconfont icon-xiayibu"></text>
+	<!-- 运费信息 -->
+	<view>
+		<view class="goods-pros-m">
+			<view class="freight-main">
+				<view class="freight-left">运费</view>
+				<view class="freight-right" @click.stop="handlePupShow">
+					<view class="freight-text" v-if="handlePostageFlag === 0">包邮</view>
+					<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>
-		<!--底部选择模态层弹窗组件 -->
-		<view class="popup spec" :class="specClass"  @touchmove.stop.prevent="discard" @click="freightConfim">
-			<!-- 遮罩层 -->
-			<view class="mask"></view>
-			<view class="layer" @tap.stop="discard">
-				<view class="content">
-					<view class="freight-ltitle">选择运费</view>
-					<view class="freight-radio">
-						<radio-group class="row-group" @change="radioChange">
-							<label class="row-input" v-for="(item, index) in freightList" :key="item.value">
-								<radio class="row-radio" :value="item.value" :checked="index === current" color="#FF5B00"/>
-								<view class="row-text">{{item.name}}</view>
+			<tui-bottom-popup :radius="true" :show="popupShow" @close="handleComfirm">
+				<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>
-						</radio-group>
-					</view>
-					<view class="freight-group" v-if="hanldFreightData.postageFlag == 1">
-						<view class="group-from">
-							<input class="form-input" type="number" v-model="hanldFreight" @input="setFreightMoney" placeholder="请填写运费" maxlength="20">
+						</label>
+					</radio-group>
+					<template v-if="handlePostageFlag === 0">
+						<view class="freight-form">
+							<view class="freight-form-item">
+								<view class="label">总运费</view> <view class="texts red">包邮</view>
+							</view>
 						</view>
-					</view>	
-					<view class="freight-group" v-if="hanldFreightData.postageFlag == 0">
-						<text class="text">{{freightText}}</text>
-					</view>
-					<view class="freight-group" v-if="hanldFreightData.postageFlag == -1">
-						<text class="text">{{freightText}}</text>
-					</view>
-				</view>
-				<view class="btn">
-					<view class="button add" @click="freightConfim">完成</view>
+					</template>
+					<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">
+								<input
+									class="form-input"
+									type="number"
+									v-model="handlePostage"
+									@input="handleInputPostage"
+									placeholder="请填写运费"
+									maxlength="20"
+								/>
+							</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>
+					</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="handleComfirm"> 确定 </view>
 				</view>
-			</view>
+			</tui-bottom-popup>
 		</view>
 	</view>
 </template>
 
 <script>
-	export default{
-		name:'freight',
-		props:{
-			freightDatas:{
-				type:Object
-			}
+export default {
+	name: 'freight',
+	props: {
+		supplier: {
+			type: Object
 		},
-		data() {
-			return{
-				freightText:'不包邮',
-				freightMoney:0,
-				specClass: '',//规格弹窗css类,控制开关动画
-				freightList:[
-					{value:1,name:'不包邮'},
-					{value:0,name:'包邮'},
-					{value:-1,name:'到付'},
-				],
-				current:0,
-				hanldFreight:0,
-				hanldFreightData:{
-					postageFlag:1,
-					postage:0
+		index: {
+			type: Number
+		}
+	},
+	data() {
+		return {
+			popupShow: false,
+			isColdChina: false,
+			handlePostage: 0,
+			handlePostageFlag: 0,
+			radioItems: [
+				{
+					name: '包邮',
+					value: 0,
+					checked: false
+				},
+				{
+					name: '不包邮',
+					value: 1,
+					checked: false
+				},
+				{
+					name: '到付',
+					value: 2,
+					checked: false
 				}
+			],
+			handleTotalPrice: 0,
+			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.handleTotalPrice = data.totalPrice
+			this.handlePostage = data.postage
+			this.handlePostageFlag = data.handlePostageFlag
+			switch (this.handlePostageFlag) {
+				case 0:
+					this.radioItems[0].checked = true
+					break
+				case 1:
+					this.radioItems[1].checked = true
+					break
+				case 2:
+					this.radioItems[2].checked = true
+					break
 			}
 		},
-		created(){
-			this.infoData(this.freightDatas)
+		handleInputPostage(e) {
+			//处理邮费显示
+			if (e.detail.value == '') {
+				this.handlePostage = 0
+				this.handleSupplier.postage = 0
+			} else {
+				this.handlePostage = e.detail.value
+				this.handleSupplier.postage = e.detail.value
+			}
 		},
-		watch: {
-			freightDatas: {
-				handler: function (el) {//监听对象的变换使用 function,箭头函数容易出现this指向不正确
-					this.freightDatas = el
-					this.infoData(this.freightDatas)
-				},
-				deep: true
+		// 勾选冷链费
+		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)
 			}
 		},
-		methods:{
-			infoData(data){//初始化运费
-				console.log('初始化运费',data)
-				switch(data.postageFlag){
-					case 1:
-						this.current = 0
-						this.hanldFreightData.postageFlag = data.postageFlag
-						if(data.freight == 0){
-							this.hanldFreight = ''
-						}else{
-							this.hanldFreight = data.postage
-						}
-						this.hanldFreightData.postage = data.postage
-						this.freightMoney = this.hanldFreight
-						this.freightText = ''
-						break
-					case 0:
-						this.current = 1
-						this.hanldFreightData.postageFlag = data.postageFlag
-						this.freightText = '包邮'
-						break
-					case -1:
-						this.current = 2
-						this.hanldFreightData.postageFlag = data.postageFlag
-						this.freightText = '到付'
-						break
-				}
-			},
-			freightConfim(){//提交完成运费选择
-				switch(this.hanldFreightData.postageFlag){
-					case 1:
-						this.choiceaFreightFirst(this.hanldFreightData.postageFlag)
-						break
-					case 0:
-						this.choiceaFreightFirst(this.hanldFreightData.postageFlag)
-						break
-					case -1:
-						this.choiceaFreightFirst(this.hanldFreightData.postageFlag)
-						break	
-				}		
-			},
-			choiceaFreightFirst(index){//校验运费形式及运费价
-				if(index == 1){
-					if(this.hanldFreight == 0 || this.hanldFreight== ''){
-						this.$util.msg('请填写运费',2000)
-						return
-					}
-					this.hanldFreightData.postage = this.hanldFreight
-					this.$emit('handleChoiceaFreight',this.hanldFreightData)
-				}else{
-					this.hanldFreightData.postage = 0
-					this.$emit('handleChoiceaFreight',this.hanldFreightData)
-				}
-				this.hideSpec()
-			},
-			showTip(){//显示运费弹窗
-				this.$emit('showFreightAlert')
-			},
-			hideSpec() {//关闭编辑运费弹窗
-				this.specClass = 'hide'
-				setTimeout(() => {
-					this.specClass = 'none'
-				}, 200)
-			},
-			hanldOperationConfim(data){//显示编辑运费弹窗
-				if(this.$parent.rebatecheck){
-					this.$util.msg('返佣订单不能编辑运费',2000)
-				}else{
-					this.specClass = 'show'
-					this.freightMoney = this.hanldFreight
-				}
-			},
-			radioChange(e) {//运费选择切换
-				this.hanldFreightData.postageFlag = parseInt(e.target.value)
-				switch(this.hanldFreightData.postageFlag){
-					case 1:
-						this.freightText = '不包邮'
-						break
-					case 0:
-						this.freightText = '包邮'
-						break
-					case -1:
-						this.freightText = '到付'
-						break	
-				}		
-				for (let i = 0; i < this.freightList.length; i++) {
-					if (this.freightList[i].value === this.postageFlag) {
-						this.current = i
-						break
-					}
-				}
-			},
-			setFreightMoney(e){//处理邮费显示
-				if(e.detail.value == ''){
-					this.freightMoney=0
-					this.hanldFreightData.postage=0
-				}else{
-					this.hanldFreightData.postage = e.detail.value
-					this.freightMoney = this.orderPriceToFixed(e.detail.value)
+		// 切换运费类型0包邮 1 不包邮 2 到付
+		radioChange($event) {
+			this.handlePostageFlag = this.handleSupplier.handlePostageFlag = $event.detail.value * 1
+			if (this.handlePostageFlag === 1) {
+				this.handleSupplier.postage = this.handlePostage
+			} else {
+				this.handleSupplier.postage = this.handlePostage
+			}
+		},
+		// 确定运费
+		handleComfirm() {
+			const postage = this.isColdChina ? this.handleSupplier.postage + this.handleSupplier.coldChain : this.handleSupplier.postage
+			if (this.handlePostageFlag === 0) {
+				this.handleSupplier.totalPrice = this.handleTotalPrice
+				this.$emit('changePostage', this.handleSupplier, this.index)
+			} else if (this.handlePostageFlag === 1) {
+				if (this.handleSupplier.postage == 0 || !this.handleSupplier.postage) {
+					this.$util.msg('请填写运费', 2000)
+					return
 				}
-			},
-			orderPriceToFixed (num){
-				let price =''
-				price = parseInt(num).toFixed(2)
-				return price
-			},
-			discard(){
-				//丢弃
+				this.handleSupplier.totalPrice = Number((this.handleTotalPrice * 100 + postage * 100) / 100)
+				this.$emit('changePostage', this.handleSupplier, this.index)
+			} else {
+				this.handleSupplier.totalPrice = this.handleTotalPrice
+				this.$emit('changePostage', this.handleSupplier, this.index)
+			}
+			this.popupShow = false
+		},
+		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: 702rpx;
-			padding: 0 24rpx;
-			height: 88rpx;
-			line-height: 88rpx;
-			font-size: $font-size-28;
-			color: $text-color;
-			background: #FFFFFF;
+		.freight-left {
 			float: left;
 			font-weight: bold;
-			.freight-left{
+		}
+		.freight-right {
+			float: right;
+			color: #333333;
+			position: relative;
+			.freight-text {
 				float: left;
-				.icon-yunfeishuoming{
-					height: 100%;
-					padding:15rpx;
-					color: $color-system;
-					font-weight: normal;
-				}
 			}
-			.freight-right{
+			.select {
 				float: right;
-				color: #2A81FF;
-				.text-l{
-					margin-right: 20rpx;
-				}
-				.text{
-					line-height: 88rpx;
-					color: #ff0000;
-					margin:0 20rpx;
-					font-weight: normal;
+				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;
+					margin-right: 30rpx;
 				}
-				.icon-xiayibu{
-					line-height: 88rpx;
-					color: #999999;
-					font-weight: normal;
+				.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-ltitle{
-		width: 100%;
-		line-height: 60rpx;
-		height: 60rpx;
-		font-size: $font-size-28;
-		color: #333333;
-	}
-	.freight-radio{
+	.freight-bean {
 		width: 100%;
-		height: 88rpx;
-		line-height: 88rpx;
-		display: flex;
-		border-bottom: 1px solid #EBEBEB;
-		.row-group{
-			flex:1;
-			display: flex;
-		}
-		.row-input{
-			flex: 1;
-			height: 88rpx;
-			line-height: 88rpx;
-		}
-		.row-radio{
+		height: 58rpx;
+		line-height: 58rpx;
+		float: left;
+		.bean-le {
 			float: left;
-			transform: scale(0.6);
-		}
-		.row-text{
-			font-size: $font-size-24;
-			color: $text-color;
+			color: #666666;
+			font-size: $font-size-26;
+			font-weight: normal;
 		}
-	}
-	.freight-group{
-		width: 100%;
-		height: 88rpx;
-		display: flex;
-		border-bottom: 1px solid #FFFFFF;
-		flex-direction: row;
-		.text{
-			display: block;
-			flex: 1;
-			line-height: 88rpx;
-			font-size: $font-size-24;
-			color: #999999;
-			text-align: left;
-			padding-left: 10rpx;
-		}
-		.group-from{
-			flex: 1;
-			height: 40rpx;
-			padding: 20rpx;
-			line-height: 40rpx;
-			align-items: flex-start;
-			font-size: $font-size-24;
-			color: $text-color;
-			background: #F7F7F7;
-			border-radius: 14rpx;
-			margin-bottom: 20rpx;
-			margin-top: 10rpx;
-			.form-input{
-				height: 40rpx;
-				line-height: 40rpx;
-				flex-grow: 1;
+		.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;
+				}
 			}
 		}
-	}	
-	/* 加入购物模态层*/
-	@keyframes showPopup {
-		0% {
-			opacity: 0;
-		}
-		100% {
-			opacity: 1;
-		}
 	}
-	@keyframes hidePopup {
-		0% {
-			opacity: 1;
-		}
-		100% {
-			opacity: 0;
-		}
-	}
-	@keyframes showLayer {
-		0% {
-			transform: translateY(0);
-		}
-		100% {
-			transform: translateY(-100%);
-		}
-	}
-	@keyframes hideLayer {
-		0% {
-			transform: translateY(-100%);
-		}
-		100% {
-			transform: translateY(0);
-		}
+}
+.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;
 	}
-	@keyframes showAmnation {
-		0% {
-			top: -12rpx;
-			opacity: 0;
-		}
-		50% {
-			top: -60rpx;
-			opacity: 1;
-		}
-		100% {
-			top: -100rpx;
-			opacity: 0;
-		}
+	.label {
+		color: #666666;
+		font-size: 28rpx;
+		margin-right: 102rpx;
 	}
-	@keyframes hideAmnation {
-		0% {
-			top: -100rpx;
-			opacity: 0;
-		}
-		100% {
-			top: -12rpx;
-			opacity: 0;
-		}
+	.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;
 	}
-	.popup {
-		position: fixed;
-		top: 0;
+}
+.freight-form {
+	margin-top: 50rpx;
+	width: 100%;
+	.freight-form-item {
 		width: 100%;
-		height: 100%;
-		z-index: 999;
-		display: none;
-		.mask{
-			position: fixed;
-			top: 0;
-			width: 100%;
-			height: 100%;
-			z-index: 21;
-			background-color: rgba(0, 0, 0, 0.6);
-		}
-		.layer {
-			position: fixed;
-			z-index: 22;
-			bottom: -460rpx;
-			width: 702rpx;
-			padding: 24rpx 24rpx 36rpx 24rpx;
-			height: 400rpx;
-			border-radius: 20rpx 20rpx 0 0;
-			background-color: #fff;
-			display: flex;
-			flex-wrap: wrap;
-			align-content: space-between;
-			.content {
-				width: 100%;
-			}
-			.btn {
-				width: 100%;
-				height: 88rpx;
-				display: flex;
-				.button {
-					width: 702rpx;
-					height: 88rpx;
-					color: #fff;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					font-size: $font-size-28;
-					border-radius: 44rpx;
-					background: $btn-confirm;
-				}
-			}
-		}
-		
-		&.show {
-			display: block;
-			.mask{
-				animation: showPopup 0.2s linear both;
-			}
-			.layer {
-				animation: showLayer 0.2s linear both;
-			}
-		}
-		&.hide {
-			display: block;
-			.mask{
-				animation: hidePopup 0.2s linear both;
-			}
-			
-			.layer {
-				animation: hideLayer 0.2s linear both;
-			}
-		}
-		&.none {
-			display: none;
-		}
-		&.service {
-			.row {
-				margin: 30upx 0;
-				.title {
-					font-size: 30upx;
-					margin: 10upx 0;
-				}
-				.description {
-					font-size: 28upx;
-					color: #999;
-				}
-			}
-		}
-		.layer-smimg{
-			width: 114rpx;
-			height: 114rpx;
+		height: 60rpx;
+		line-height: 60rpx;
+		margin-bottom: 24rpx;
+		color: #666666;
+		font-size: 28rpx;
+		.label {
+			width: 50%;
 			float: left;
-			border-radius: 10rpx;
-			margin-right: 24rpx;
-			image{
-				width: 114rpx;
-				height: 114rpx;	
-				border-radius: 10rpx;
-			}
+			margin-right: 0;
 		}
-		.layer-nunbox{
-			justify-content: space-between;
-			align-items: center;
-			width: 536rpx;
-			height: 88rpx;
-			padding: 13rpx 0 0 0;
-			float: left;
-			.layer-nunbox-t{
-				width: 100%;
-				height:44rpx;
-				position:relative;
-				display: flex;
-				.layer-nunbox-text{
-					line-height: 44rpx;
-					font-size: $font-size-28;
-				}
-				.number-box{
-					display: flex;
-					justify-content: center;
-					align-items: center;
-					.iconfont{
-						font-size: $font-size-32;
-						padding:0 18rpx;
-						font-size: $text-color;
-					}
-					.btn-input{
-						width: 62rpx;
-						height: 48rpx;
-						line-height: 48rpx;
-						background: #F8F8F8;
-						border-radius: 4rpx;
-						text-align: center;
-						font-size: $font-size-28;
-					}
-				}
-				.product-step{
-					position: absolute;
-					left: 45rpx;
-					bottom: 0;
-					height: 44rpx;
-					background: #FFFFFF;
-				}
+		.texts {
+			width: 50%;
+			float: right;
+			text-align: right;
+			&.red {
+				color: #f94b4b;
 			}
-			.layer-nunbox-b{
-				width: 100%;
-				height:44rpx;
-				margin-top: 13rpx;
-			}
-			.text{
-				line-height: 44rpx;
-				font-size: $font-size-28;
-				.p{
-					color: #FF2A2A;
-				}
-				.p:first-child{
-					margin-left: 30rpx;
-				}
-				.p.sm{
-					font-size: $font-size-24;
-				}
+			.iconfont {
+				margin-left: 20rpx;
+				color: $color-system;
 			}
 		}
-	}	
+		.form-input {
+			width: 100%;
+			height: 60rpx;
+			line-height: 60rpx;
+			flex-grow: 1;
+			box-sizing: border-box;
+			padding: 0 20rpx;
+			border: 1px solid #e1e1e1;
+			border-radius: 4rpx;
+		}
+	}
+}
+.freight-pay {
+	position: absolute;
+	right: -60%;
+	transform: scale(0.7);
+}
 </style>

+ 87 - 61
pages/seller/order/components/cm-goods-temp.vue

@@ -2,14 +2,14 @@
 	<view class="goods-template">
 		<!-- 商品列表 -->
 		<view class="goods-list">
-			<view v-for="(item, index) in list" :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="" />
@@ -31,7 +31,7 @@
 								<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 != null">
+										<text v-if="pros.promotions">
 											:¥{{
 												pros.promotions == null
 													? '0.00'
@@ -43,7 +43,7 @@
 										pros.promotions.name
 									}}</view>
 								</template>
-								<template v-if="pros.svipProductFlag == 1">
+								<template v-if="pros.svipProductFlag == 1 && vipFlag == 1">
 									<view class="svip-tags">
 										<view class="tags">SVIP</view>
 										<view class="price">{{ pros.svipPriceTag }}</view>
@@ -62,22 +62,28 @@
 							@change="changeHandle(index)"
 							placeholder-class="placeholder"
 							maxlength="50"
-						 placeholder="选填,最多不超过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.reducedPrice > 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">{{ supplier.originalPrice | NumFormat }}</text>
 						<text class="money-reduced"
-							>减<text>¥{{ item.reducedPrice | NumFormat }}</text></text
+							>减<text>¥{{ (supplier.originalPrice - supplier.totalPrice) | NumFormat }}</text></text
 						>
 					</view>
 					<view class="sum" v-if="secondflag"
-						>合计:<text class="money"
-							>¥{{ (item.originalPrice - item.reducedPrice) | NumFormat }}</text
-						></view
+						>合计:<text class="money">¥{{ supplier.totalPrice | NumFormat }}</text></view
 					>
 				</view>
 			</view>
@@ -86,10 +92,14 @@
 </template>
 
 <script>
+import cmFreightPopup from './cm-freight-popup'
 export default {
 	name: 'goods',
+	components: {
+		cmFreightPopup
+	},
 	props: {
-		list: {
+		goodsData: {
 			type: Array
 		},
 		secondflag: {
@@ -99,28 +109,46 @@ export default {
 	},
 	data() {
 		return {
-			remark: []
+			remark: [],
+			vipFlag: 0
 		}
 	},
+	created() {
+		this.initGetStotage()
+	},
 	filters: {
 		NumFormat(value) {
 			//处理金额
 			return Number(value).toFixed(2)
 		}
 	},
-	created() {
-		console.log('list',this.list)
-	},
 	watch: {
-		list: {
+		goodsData: {
 			handler: function(el) {
 				//监听对象的变换使用 function,箭头函数容易出现this指向不正确
-				this.list = el
+				this.goodsData = el
 			},
 			deep: true
 		}
 	},
+	computed: {},
 	methods: {
+		async initGetStotage() {
+			const userInfo = await this.$api.getStorage()
+			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
+		},
+		// 勾选冷链费操作
+		hanldChangeColdChina(supplier,index){
+			this.goodsData[index] = supplier
+			this.$emit('handleGoodList', this.goodsData)
+			this.$emit('changeChina', supplier)
+		},
+		// 更换运费类型 1 不包邮  2 到付
+		changePostageFlag(supplier,index){
+			this.goodsData[index] = supplier
+			this.$emit('handleGoodList', this.goodsData)
+			this.$emit('changePostage', supplier)
+		},
 		PromotionsFormat(promo) {
 			//促销活动类型数据处理
 			if (promo != null) {
@@ -245,18 +273,17 @@ export default {
 			}
 			.productspec {
 				height: 40rpx;
-				color: #999999;
 				line-height: 40rpx;
+				color: #999999;
 				text-overflow: ellipsis;
 				display: -webkit-box;
 				word-break: break-all;
 				-webkit-box-orient: vertical;
-				-webkit-line-clamp: 2;
+				-webkit-line-clamp: 1;
 				overflow: hidden;
 			}
 			.productprice {
 				height: 54rpx;
-				line-height: 54rpx;
 				width: 100%;
 				float: left;
 				.price {
@@ -284,43 +311,6 @@ export default {
 				padding: 0 0 10rpx 0;
 			}
 		}
-		.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: 576rpx;
-				height: 36rpx;
-				padding: 20rpx;
-				background: #fff;
-				border-radius: 10rpx;
-				border: 2rpx solid #b2b2b2;
-				input {
-					width: 100%;
-					height: 100%;
-					// background: #F7F7F7;
-					font-size: $font-size-26;
-					line-height: 36rpx;
-					color: #333333;
-					min-height: 36rpx;
-				}
-			}
-		}
 		.goods-pros-b {
 			width: 100%;
 			height: auto;
@@ -364,6 +354,42 @@ export default {
 					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;
 		}
 	}
 }

+ 201 - 182
pages/seller/order/components/cm-list-button.vue

@@ -1,218 +1,237 @@
 <template name="button">
 	<view class="button-template">
 		<!-- 底部按钮 -->
-		<view class="button-content"> 
-			<view class="btn btn-cancel" v-if="secondHandOrderFlag!=1 && !rechargeGoods"  @click.stop="btnConfirm('again',orderId)">再来一单</view>
-			<view class="btn btn-cancel" v-if="btnState.isCancel" @click.stop="btnConfirm('cancel',orderId)">取消订单</view>
+		<view class="button-content">
+			<view
+				class="btn btn-cancel"
+				v-if="secondHandOrderFlag != 1 && !rechargeGoods"
+				@click.stop="btnConfirm('again', shopOrderId)"
+				>再来一单</view
+			>
+			<view class="btn btn-cancel" v-if="btnState.isCancel" @click.stop="btnConfirm('cancel', shopOrderId)"
+				>取消订单</view
+			>
 			<!-- <view class="btn btn-cancel" v-if="btnState.isDelete" @click.stop="btnConfirm('delete',orderId)">删除订单</view> -->
 			<template>
-				<view class="btn btn-cancel" v-if="btnState.isPay" @click.stop="onShareCode(orderId,userId,1)">分享支付</view>
-				<view class="btn btn-cancel" v-else @click.stop="onShareCode(orderId,userId,2)">分享订单</view>	
+				<view class="btn btn-cancel" v-if="btnState.isPay" @click.stop="onShareCode(shopOrderId, userId, 1)"
+					>分享支付</view
+				>
+				<view class="btn btn-cancel" v-else @click.stop="onShareCode(shopOrderId, userId, 2)">分享订单</view>
 			</template>
-			<view class="btn btn-query" v-if="btnState.isQuery && order.secondHandOrderFlag!=1" @click.stop="btnConfirm('query',orderId)">查看物流</view>
-			<view class="btn btn-color" v-if="btnState.isConfirm" @click.stop="btnConfirm('confirm',orderId)">确认订单</view>
+			<view
+				class="btn btn-query"
+				v-if="btnState.isQuery && order.secondHandOrderFlag != 1"
+				@click.stop="btnConfirm('query', shopOrderId)"
+				>查看物流</view
+			>
+			<view class="btn btn-color" v-if="btnState.isConfirm" @click.stop="btnConfirm('confirm', shopOrderId)"
+				>确认订单</view
+			>
 		</view>
 	</view>
 </template>
 
 <script>
-	export default{
-		name:'button',
-		props:{
-			status: {
-				type:Number
-			},
-			order: {
-				type:Object
-			},
-			orderId: {
-				type:Number
-			},
-			userId:{
-				type:Number
-			},
-			rechargeGoods:{
-				type:Boolean
-			},
-			serviceProviderId:{
-				type:Number
-			},
-			secondHandOrderFlag:{
-				type:String
-			}
+export default {
+	name: 'button',
+	props: {
+		status: {
+			type: Number
 		},
-		data() {
-			return{
-				isShare:true,
-				shareCode:'',
-				btnState:this.initStatus(),
-				mapStateArr:[
-					{label:'isQuery',val:[4,5,12,13,33,22,23,32,77],status: true},
-					{label:'isDelete',val:[6],status: true},
-					{label:'isCancel',val:[0,111],status: true},
-					{label:'isConfirm',val:[0],status: true},
-					{label:'isPay',val:[11,12,13,21,22,23,111],status: true},
-				]
-			}
+		order: {
+			type: Object
 		},
-		created(){
-			this.initData(this.status)
+		shopOrderId: {
+			type: Number
 		},
-		computed: {
-			
+		userId: {
+			type: Number
 		},
-		watch:{
-			status:{
-				handler:function(val){
-					this.initData(val)
-				},
-				deep:true//对象内部的属性监听,也叫深度监听
-			}
+		rechargeGoods: {
+			type: Boolean
 		},
-		methods:{
-			initData(resVal) {
-				/**
-				 * @分享按钮统一显示
-				 * @按钮根据状态显示
-				 * @(4、5、7、12、22、23、32)显示[查看物流]按钮,其他隐藏
-				 * @(6)显示[删除订单],其他隐藏
-				 * @(0、111)显示[取消订单],其他隐藏
-				 * @(21,31)只显示分享
-				 * @(13,33)显示[确认收货]和[查看物流]
-				 */
-				this.btnState = this.initStatus()
-				this.mapStateArr.forEach(el => {
-					el.val.forEach(value => {
-						if(resVal === value){
-							this.btnState[el.label] = el.status
-						}
-					})
-				})
+		serviceProviderId: {
+			type: Number
+		},
+		secondHandOrderFlag: {
+			type: String
+		}
+	},
+	data() {
+		return {
+			isShare: true,
+			shareCode: '',
+			btnState: this.initStatus(),
+			mapStateArr: [
+				{ label: 'isQuery', val: [2, 3, 5, 6, 12, 13, 22, 23, 32, 33], status: true },
+				{ label: 'isDelete', val: [4], status: true },
+				{ label: 'isCancel', val: [0, 11], status: true },
+				{ label: 'isConfirm', val: [0], status: true },
+				{ label: 'isPay', val: [11, 12, 13, 21, 22, 23], status: true }
+			]
+		}
+	},
+	created() {
+		this.initData(this.status)
+	},
+	computed: {},
+	watch: {
+		status: {
+			handler: function(val) {
+				this.initData(val)
 			},
-			initStatus(){
-				let btnState= {
-						isDelete: false,
-						isCancel: false,
-						isConfirm: false,
-						isShare: true
+			deep: true //对象内部的属性监听,也叫深度监听
+		}
+	},
+	methods: {
+		initData(resVal) {
+			/**
+			 * @分享按钮统一显示
+			 * @按钮根据状态显示
+			 * @(4、5、7、12、22、23、32)显示[查看物流]按钮,其他隐藏
+			 * @(6)显示[删除订单],其他隐藏
+			 * @(0、111)显示[取消订单],其他隐藏
+			 * @(21,31)只显示分享
+			 * @(13,33)显示[确认收货]和[查看物流]
+			 */
+			this.btnState = this.initStatus()
+			this.mapStateArr.forEach(el => {
+				el.val.forEach(value => {
+					if (resVal === value) {
+						this.btnState[el.label] = el.status
 					}
-				return 	btnState
-			},
-			getShareCode(code){
-				this.shareCode = code
-			},
-			onShareCode(oID,uID,type){
-				if(this.order.onlinePayFlag == 1){
-					this.$util.modal('提示','本订单不能进行线上支付,请让客户选择线下转账方式付款','继续分享','知道了',true,() =>{
+				})
+			})
+		},
+		initStatus() {
+			let btnState = {
+				isDelete: false,
+				isCancel: false,
+				isConfirm: false,
+				isShare: true
+			}
+			return btnState
+		},
+		getShareCode(code) {
+			this.shareCode = code
+		},
+		onShareCode(shopOrderId, userId, type) {
+			if (this.order.onlinePayFlag == 1) {
+				this.$util.modal(
+					'提示',
+					'本订单不能进行线上支付,请让客户选择线下转账方式付款',
+					'继续分享',
+					'知道了',
+					true,
+					() => {
 						this.$parent.isShareModal = true
-						this.$parent.btnoRderID = oID,
-						this.$parent.btnClubUserID = uID
+						;(this.$parent.handleShopOrderId = shopOrderId), (this.$parent.btnClubUserId = userId)
 						this.$parent.isShareType = type
 						this.$emit('shareConfirm')
-					})	
-				}else{
-					this.$parent.isShareModal = true
-					this.$parent.btnoRderID = oID,
-					this.$parent.btnClubUserID = uID
-					this.$parent.isShareType = type
-					this.$emit('shareConfirm')
-				}
-			},
-			btnConfirm(type,orderId){
-				let data = {
-						type:type,
-						orderId:orderId,
 					}
-				this.$emit('buttonConfirm',data)
-			},
+				)
+			} else {
+				this.$parent.isShareModal = true
+				;(this.$parent.handleShopOrderId = shopOrderId), (this.$parent.btnClubUserId = userId)
+				this.$parent.isShareType = type
+				this.$emit('shareConfirm')
+			}
+		},
+		btnConfirm(type, shopOrderId) {
+			let data = {
+				type: type,
+				shopOrderId: shopOrderId
+			}
+			this.$emit('buttonConfirm', data)
 		}
 	}
+}
 </script>
 
 <style lang="scss">
-	.button-template{
-		width: 100%;
+.button-template {
+	width: 100%;
+	height: auto;
+	float: left;
+	background: #ffffff;
+	.button-content {
 		height: auto;
-		float: left;
-		background: #FFFFFF;
-		.button-content{
-			height: auto;
-			float: right;
+		float: right;
+		position: relative;
+		margin: 20rpx 0;
+		.share-code {
+			width: 200rpx;
+			height: 64rpx;
+			line-height: 64rpx;
+			color: #2a45ff;
+			text-align: left;
+			position: absolute;
+			font-size: $font-size-28;
+			font-weight: bold;
+			left: 24rpx;
+			top: 24rpx;
+		}
+		.btn {
+			width: 160rpx;
+			height: 64rpx;
+			line-height: 64rpx;
+			font-size: $font-size-26;
+			color: #ffffff;
+			text-align: center;
+			border-radius: 34rpx;
+			// float: right;
+			display: inline-block;
+		}
+		.btn-color {
+			background: $btn-confirm;
+			// margin: 22rpx 0 22rpx 22rpx;
+		}
+		.btn-cancel {
+			border: 2rpx solid #999999;
+			background: #ffffff;
+			color: #666666;
+			// float: left;
+			margin-right: 15rpx;
+		}
+		.btn-delete {
+			background: linear-gradient(315deg, rgba(255, 163, 3, 1) 0%, rgba(255, 53, 1, 1) 100%);
+		}
+		.btn-query {
+			background: linear-gradient(135deg, rgba(255, 212, 129, 1) 0%, rgba(198, 129, 0, 1) 100%);
+		}
+		.btn-confirm {
+			background: linear-gradient(315deg, rgba(231, 0, 0, 1) 0%, rgba(255, 104, 1, 1) 100%);
+		}
+		.btn-share {
+			background: linear-gradient(315deg, rgba(0, 212, 150, 1) 0%, rgba(126, 243, 174, 1) 100%);
+			margin-right: 0;
 			position: relative;
-			margin: 20rpx 0;
-			.share-code{
-				width: 200rpx;
-				height:  64rpx;
-				line-height: 64rpx;
-				color: #2A45FF;
-				text-align: left;
-				position: absolute;
-				font-size: $font-size-28;
-				font-weight: bold;
-				left: 24rpx;
-				top: 24rpx;
-			}
-			.btn{
+			.tips {
 				width: 160rpx;
-				height:  64rpx;
-				line-height: 64rpx;
-				font-size:$font-size-26;
-				color: #FFFFFF;
-				text-align: center;
-				border-radius:34rpx;
-				// float: right; 
-				display: inline-block;
-			}
-			.btn-color{
-				background: $btn-confirm;
-				// margin: 22rpx 0 22rpx 22rpx;
-			}
-			.btn-cancel{
-				border: 2rpx solid #999999;
-				background:#FFFFFF;
-				color: #666666;
-				// float: left;
-				margin-right: 15rpx;
-			}
-			.btn-delete{
-				background:linear-gradient(315deg,rgba(255,163,3,1) 0%,rgba(255,53,1,1) 100%);
-			}
-			.btn-query{
-				background:linear-gradient(135deg,rgba(255,212,129,1) 0%,rgba(198,129,0,1) 100%);
-			}
-			.btn-confirm{
-				background:linear-gradient(315deg,rgba(231,0,0,1) 0%,rgba(255,104,1,1) 100%);
-			}
-			.btn-share{
-				background:linear-gradient(315deg,rgba(0,212,150,1) 0%,rgba(126,243,174,1) 100%);
-				margin-right: 0;
-				position: relative;
-				.tips{
-					width: 160rpx;
-					height: 34rpx;
-					padding: 10rpx 10rpx;
-					background:#FF5B00;
-					border-radius: 8rpx;
+				height: 34rpx;
+				padding: 10rpx 10rpx;
+				background: #ff5b00;
+				border-radius: 8rpx;
+				position: absolute;
+				color: #ffffff;
+				line-height: 34rpx;
+				font-size: $font-size-24;
+				text-align: left;
+				right: 0;
+				top: -65rpx;
+				&:before {
+					content: '';
+					width: 25rpx;
+					height: 25rpx;
+					background: #ff5b00;
 					position: absolute;
-					color: #FFFFFF;
-					line-height: 34rpx;
-					font-size: $font-size-24;
-					text-align: left;
-					right: 0;
-					top: -65rpx;
-					&:before{
-						content: "";
-						width: 25rpx;
-						height: 25rpx;
-						background:#FF5B00;
-						position: absolute;
-						bottom: -8rpx;
-						left: 30rpx;
-						z-index: -1;
-						transform:rotate(45deg);
-					}
+					bottom: -8rpx;
+					left: 30rpx;
+					z-index: -1;
+					transform: rotate(45deg);
 				}
 			}
 		}
 	}
+}
 </style>

+ 1 - 0
pages/seller/order/components/cm-orderpay-popup.vue

@@ -54,6 +54,7 @@
 		methods:{
 			infoData(el){
 				this.dataInfo = el
+				console.log('payModelData',this.dataInfo)
 			},
 			hideConfirm(){
 				this.$parent.isPayModel = false

+ 12 - 10
pages/seller/order/components/cm-share-popup.vue

@@ -27,7 +27,7 @@
 	export default{
 		name:'sharealert',
 		props:{
-			orderId:{
+			shopOrderId:{
 				type:Number
 			},
 			shareType:{
@@ -40,17 +40,19 @@
 			}
 		},
 		created() {
-			this.getShareCode(this.orderId)
+			this.getShareCode(this.shopOrderId)
 		},
 		methods:{
-			getShareCode(res){
-				this.OrderService.QueryOrderShareCode({orderId:res}).then(response =>{
-					this.shareCode = response.data
-					this.$parent.shareCode = this.shareCode
-				}).catch(error =>{
-					this.$parent.isShareModal = false
-					this.$util.modal('提示',error.msg,'确定','',false,() =>{})
-				})
+			//获取订单分享码
+			async getShareCode(shopOrderId){
+				try{
+					const res = await this.OrderService.QueryOrderShareCode({shopOrderId:shopOrderId})
+					this.shareCode = res.data
+					this.$parent.shareCode = this.shareCode;
+				}catch(error){
+					this.$parent.isShareModal = false;
+					this.$util.msg(error.msg, 2000)
+				}
 			},
 			hideConfirm(){
 				this.$parent.isShareModal = false

+ 3 - 14
pages/seller/order/components/details/cm-address-temp.vue

@@ -22,7 +22,7 @@
 				</view>
 		 	</view>
 		 </view>
-		 <image  :src="StaticUrl + '/icon/line@3x.png'" mode=""></image>
+		 <image class="a-bg"  :src="StaticUrl + '/icon/line@3x.png'" mode=""></image>
 	</view>
 </template>
 
@@ -58,17 +58,15 @@
 		width: 100%;
 		height: auto;
 		background: #FFFFFF;
-        
         &::after{
             content: "";
             display: block;
             clear: both;
         }
-		// border-top: 1px solid #F8F8F8;
 		image{
 			float: left;
 			width: 100%;
-			height: 6rpx;
+			height: 12rpx;
 		}
 	}
 	.address-section {
@@ -76,7 +74,6 @@
 		height: auto;
 		float: left;
 		position: relative;
-		
 		.address-empty{
 			width: 100%;
 			height: 84rpx;
@@ -106,7 +103,7 @@
 			justify-content: center;
 			width: 40rpx;
 			color: $color-system;
-			font-size: 46rpx;
+			font-size: 40rpx;
 			margin-right: 10rpx;
 		}	
 		.address-cen {
@@ -163,13 +160,5 @@
 			color: $text-color;
 			margin-right: 30rpx;
 		}
-		.a-bg {
-			position: absolute;
-			left: 0;
-			bottom: 0;
-			display: block;
-			width: 100%;
-			height: 5rpx;
-		}
 	}
 </style>

+ 68 - 67
pages/seller/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/seller/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.presentNum
+					}}</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 => {

+ 1 - 1
pages/seller/order/components/details/cm-voucher-temp.vue

@@ -13,7 +13,7 @@
 							</view>
 						</view>
 					</view>
-				</scroll-view>
+				</scroll-view> 
 				<view class="record-list-tmk" v-if="item.remarks">
 					备注:{{ item.remarks }}
 				</view>

+ 83 - 237
pages/seller/order/create-order.vue

@@ -7,11 +7,13 @@
 			ref="goods"
 			v-if="isRequest"
 			:secondflag="secondflag"
-			:list="goodsData"
+			:goodsData.sync="goodsData" 
 			@handleGoodList="handChangeInputGoodsList"
+			@changeChina="handleChangeChina"
+			@changePostage="handleChangePostage"
 		/>
 		<!-- 返佣订单 -->
-		<view class="order-return" v-if="goodsData.length == 1 && secondflag">
+<!-- 		<view class="order-return" v-if="goodsData.length == 1 && secondflag">
 			<view class="order-return-main" @click="handleRebateFlag">
 				<view class="label">是否返佣</view>
 				<view class="label-right">
@@ -21,12 +23,12 @@
 			<view class="order-return-input" v-if="confirmParam.payInfo.rebateFlag === 2">
 				<input class="input" v-model="rebateFee" type="number" placeholder="请输入返佣服务费" maxlength="20" />
 			</view>
-		</view>
+		</view> -->
 		<!-- 返佣订单 -->
-		<view class="Rebate" @click="handleSecondFlag" v-if="!secondflag">
+<!-- 		<view class="Rebate" @click="handleSecondFlag" v-if="!secondflag">
 			<text class="rebate-title">二手返佣订单</text>
 			<text class="iconfont" :class="rebatecheck ? 'icon-yixuanze' : 'icon-weixuanze'"></text>
-		</view>
+		</view> -->
 		<!-- 发票信息 -->
 		<cm-invice-popup
 			ref="invoice"
@@ -43,14 +45,6 @@
 		/>
 		<!-- 兑换优惠券弹窗 -->
 		<cm-coupon-chang v-if="isExchangePopup" />
-		<!-- 运费 -->
-		<cm-freight-popup
-			ref="freight"
-			v-if="isFreight"
-			:freightDatas="freightData"
-			@handleChoiceaFreight="handleChoiceaFreightData"
-			@showFreightAlert="handFreightAlertShow"
-		/>
 		<!-- 余额抵扣 -->
 		<view class="invoice-balance" v-if="!rechargeGoods">
 			<view class="balabce-t">
@@ -138,8 +132,10 @@ import cmCouponChang from './components/cm-coupon-chang'
 import cmClubVisible from './components/cm-club-visible'
 import cmRegulaPopup from './components/cm-regula-popup'
 import cmCouponTips from './components/cm-coupon-tips'
+import conMixins from './mixins/conMixins.js'
 
 export default {
+	mixins: [conMixins],
 	components: {
 		cmAddressTemp,
 		cmGoodsTemp,
@@ -173,25 +169,6 @@ export default {
 			modal: false,
 			showModalstauts: 1,
 			isIphoneX: this.$store.state.isIphoneX,
-			cartParam: {
-				// 购物车立即结算确认订单参数
-				skuIds: 0, // 商品Id(逗号隔开)
-				serviceProviderId: 0, // 协销Id
-				clubId: 0 // 机构Id
-			},
-			productParam: {
-				// 商品立即购买确认订单参数
-				productCount: 0, // 商品数量
-				productId: 0, // 商品Id
-				serviceProviderId: 0, // 协销Id
-				clubId: 0 // 机构Id
-			},
-			postageParam: {
-				// 邮费计算参数
-				skuIds: 0, // 商品Id(逗号隔开)
-				userId: 0, // 用户Id
-				townId: 0 // 地区Id
-			},
 			confirmParam: {
 				// 提交订单参数
 				cartType: 3, // 购买类型:(1自主下单, 3协销下单)
@@ -203,9 +180,7 @@ export default {
 				orderInfo: [], // 订单商品数据
 				orderInvoice: { type: 0 }, // 订单发票信息
 				orderSeen: 1, // 订单对机构可见度 1可见  2不可见
-				payInfo: {
-					// 订单金额数据
-					isColdChina: 0, //是否勾选冷链费
+				payInfo: {// 订单金额数据
 					orderShouldPayFee: 0, // 订单最终支付金额
 					balancePayFlag: 0, // 勾选余额的状态(1使用,0不使用)
 					clauseId: 0, // 条款Id
@@ -221,15 +196,6 @@ export default {
 			rebateFeeText: '否',
 			confirmType: 1,
 			submitState: '', // 提交状态
-			totalCount: 0, // 订单提交总数量
-			reducedPrice: 0, // 满减金额
-			couponAmount: 0, // 优惠券金额
-			totalDiscountAmount: 0, // 共减金额
-			orderShouldPayFee: 0.0, // 订单提交总金额
-			allPrice: 0.0, // 订单总金额
-			surplusMoney: 0.0, // 显示勾选后的剩余抵扣
-			userMoney: 0.0, // 显示可使用余额
-			deductMoney: 0.0, // 显示已使用的余额
 			isRequest: false, // 是否加载完成渲染子组件
 			isFreight: false, // 是否加载完成渲染子组件
 			isAddress: false, // 是否加载完成地址
@@ -240,8 +206,6 @@ export default {
 			goodsData: [], // 初始化商品信息
 			couponList: [], // 初始化优惠券信息
 			invoiceData: { type: 0 }, // 初始化发票信息
-			freightData: {}, // 邮费数据
-			handleFreightData: {}, // 监听邮费数据
 			orderInfo: [], // 提交的商品信息
 			payInfo: {}, // 订单信息
 			rechargeGoods: false,
@@ -269,20 +233,20 @@ export default {
 			const data = JSON.parse(option.data)
 			const clubInfo = await this.$api.getComStorage('orderUserInfo')
 			const userInfo = await this.$api.getStorage()
+			this.handleComType = option.type*1
 			this.productParam.clubId = this.cartParam.clubId = this.confirmParam.clubId = clubInfo.clubId
-			this.postageParam.userId = clubInfo.userId 
 			this.productParam.serviceProviderId = userInfo.serviceProviderId 
 			this.cartParam.serviceProviderId = userInfo.serviceProviderId 
 			this.confirmParam.serviceProviderId = userInfo.serviceProviderId 
-			if (option.type == 'prodcut') {
+			if (option.type == '1') {
 				this.confirmType = 1
 				this.productParam.productCount = data.data.productCount
 				this.productParam.productId = data.data.productIds
-				this.getInitProdcutCrearOrder()
+				this.getAddressData(clubInfo.userId,1)
 			} else {
 				this.confirmType = 2
 				this.cartParam.skuIds = data.data.skuIds
-				this.getInitCrearOrder()
+				this.getAddressData(clubInfo.userId,2)
 			}
 		},
 		//协销购物车跳转确认订单初始化信息
@@ -290,7 +254,10 @@ export default {
 			try{
 				const res = await this.SellerService.SellerSettlement(this.cartParam)
 				const data = res.data
-				this.goodsData = data.list
+				this.goodsData = data.list.map((el)=>{
+					el.handlePostageFlag = el.postageFlag
+					return el
+				});
 				this.userMoney = data.userMoney
 				this.couponList = data.couponList
 				this.reducedPrice = data.reducedPrice
@@ -298,16 +265,13 @@ export default {
 				this.allPrice = data.totalPrice
 				this.rechargeGoods = data.includeRecharge
 				this.clauseList = data.clauseList
-				this.postageParam.skuIds = this.getProductIds(data.list)
 				this.isCouponShow = true
 				if (this.couponList.length > 0) {
 					this.couponAmount = data.couponList[0].couponAmount
 					this.confirmParam.clubCouponId = data.couponList[0].clubCouponId
 				}
 				this.orderShouldPayFee = this.allPrice - this.couponAmount
-				this.totalDiscountAmount = this.reducedPrice + this.couponAmount
 				this.isRequest = true
-				this.getAddressData()
 			}catch(error){
 				console.log('获取订单信息异常')
 			}
@@ -318,7 +282,10 @@ export default {
 				this.seconDepositFlg = false
 				const res = await this.SellerService.GetSettlementBySencondProduct(this.productParam)
 				const data = res.data
-				this.goodsData = data.list
+				this.goodsData = data.list.map((el)=>{
+					el.handlePostageFlag = el.postageFlag
+					return el
+				});
 				this.userMoney = data.userMoney
 				this.totalCount = data.totalCount
 				this.allPrice = data.totalPrice
@@ -326,61 +293,32 @@ export default {
 				this.isCouponShow = false
 				this.secondflag = false
 				this.isRequest = true
-				this.getAddressData()
 			}catch(error){
 				console.log('获取订单信息异常')
 			}
 		},
-		// 获取订单商品id列表
-		getProductIds(list) {
-			let skuId = []
-			list.forEach(function(supplier) {
-				supplier.cartList.forEach(function(product) {
-					skuId.push(product.skuId)
-				})
-			})
-			return skuId.join(',')
-		},
-		//获取邮费信息
-		async getFreightData() {
+		//获取地址信息
+		async getAddressData(userId,type) {
 			try{
-				const res = await this.OrderService.GetOrderPostage(this.postageParam)
+				const params = {pageNum: 1,pageSize: 1,userId: userId }
+				const res = await this.UserService.QueryAddressList(params)
 				const data = res.data
-				this.freightData = data
-				this.handleFreightData = data
-				this.isFreight = true
-				if (data.postageFlag == 1) {
-					this.orderShouldPayFee = this.allPrice + data.postage
-					this.attributePallPrice()
-				} else {
-					this.orderShouldPayFee = this.allPrice
-					this.attributePallPrice()
+				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
+					if(type === 1) {//立即都买提交
+						this.getInitProdcutCrearOrder()
+					}
+					if(type === 2) {//购物车提交
+						this.getInitCrearOrder()
+					}
 				}
 			}catch(error){
-				console.log('获取运费信息异常')
+				console.log('获取订单地址异常')
 			}
 		},
-		async getAddressData() {
-			//获取地址信息
-			const clubInfo = await this.$api.getComStorage('orderUserInfo')
-			this.UserService.QueryAddressList({
-				pageNum: 1,
-				pageSize: 1,
-				userId: clubInfo.userId
-			}).then(response => {
-				let data = response.data
-				this.isAddress = true
-				this.addressData = {}
-				if (response.data.results != '') {
-					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
-				}
-			})
-		},
 		handChangeInputGoodsList(data) {
 			//对应供应商的留言信息
 			this.goodsData = data
@@ -389,19 +327,6 @@ export default {
 			//获取发票信息
 			this.confirmParam.orderInvoice = data
 		},
-		handleChoiceaFreightData(data) {
-			//获取运费信息
-			console.log('编辑运费信息', data)
-			if (data.postageFlag == 1) {
-				this.handleFreightData = data
-				this.orderShouldPayFee = this.allPrice + parseInt(data.postage)
-				this.attributePallPrice()
-			} else {
-				this.handleFreightData = data
-				this.orderShouldPayFee = this.allPrice
-				this.attributePallPrice()
-			}
-		},
 		handleClauseData(clauseId) {
 			// 条款Id
 			this.confirmParam.payInfo.clauseId = parseInt(clauseId)
@@ -419,98 +344,23 @@ export default {
 			console.log('对机构是否可见', data)
 			this.confirmParam.orderSeen = Number(data)
 		},
-		checkedBalabce() {
-			//勾选使用余额
-			if (this.rebatecheck) {
-				this.$util.msg('返佣订单不能使用余额抵扣', 2000)
-			} else {
-				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.handleFreightData.postageFlag == 1) {
-							this.orderShouldPayFee =
-								this.allPrice + parseInt(this.handleFreightData.postage) - this.couponAmount
-						} else {
-							this.orderShouldPayFee = this.allPrice - this.couponAmount
-						}
-					}
-					console.log('最终订单支付金额', this.orderShouldPayFee)
-					console.log('优惠券金额', this.couponAmount)
-				} else {
-					return
-				}
-			}
-		},
-		attributePallPrice() {
-			//计算价格
-			if (this.handleFreightData.postageFlag == 1) {
-				this.attributeHashfreight(this.handleFreightData.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) {
-			//计算需要邮费的支付价格
-			let totalAmount = this.allPrice + parseInt(postage) - this.couponAmount //计算不包邮的价格 总价等于商品价格+邮费
-			if (this.ischecked) {
-				if (this.userMoney > totalAmount) {
-					//余额大于支付金额
-					this.orderShouldPayFee = 0.0
-					this.deductMoney = this.allPrice + parseInt(postage) - this.couponAmount //勾选后使用抵余额
-					this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
-				} else {
-					this.orderShouldPayFee = this.allPrice + parseInt(postage) - this.userMoney - this.couponAmount //勾选后的总价
-					this.deductMoney = this.userMoney //勾选后使用抵余额
-					this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
-				}
-			} else {
-				this.orderShouldPayFee = this.allPrice + parseInt(postage) - this.couponAmount
-				this.deductMoney = 0.0
-				this.surplusMoney = this.userMoney
-			}
-			console.log('最终订单支付金额', this.orderShouldPayFee)
-			console.log('优惠券金额', this.couponAmount)
-		},
 		orderSubmitMit() {
 			//提交订单
 			if (this.confirmParam.addressId == '') {
 				this.$util.msg('请先添加收货地址~', 2000)
 				return
+				
 			}
-			if (this.confirmParam.payInfo.rebateFlag === 2) {
-				if (this.rebateFee == 0) {
-					this.$util.msg('请输入返佣服务费', 2000)
-					return
-				}
-				this.confirmParam.payInfo.rebateFee = Number(this.rebateFee).toFixed(2)
-			}
-			this.modal = true
-			this.contentModalText = '请仔细确认订单是否为返佣订单后再提交订单'
+			this.SellerCreateOrderSubmit()
+			// if (this.confirmParam.payInfo.rebateFlag === 2) {
+			// 	if (this.rebateFee == 0) {
+			// 		this.$util.msg('请输入返佣服务费', 2000)
+			// 		return
+			// 	}
+			// 	this.confirmParam.payInfo.rebateFee = Number(this.rebateFee).toFixed(2)
+			// }
+			// this.modal = true
+			// this.contentModalText = '请仔细确认订单是否为返佣订单后再提交订单'
 		},
 		SellerCreateOrderSubmit() {
 			//提交订单
@@ -531,11 +381,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.handleFreightData.postage).toFixed(2)
-			this.confirmParam.payInfo.postageFlag = parseInt(this.handleFreightData.postageFlag)
 			this.confirmParam.payInfo.orderShouldPayFee = this.orderShouldPayFee.toFixed(2)
 			this.confirmParam.payInfo = JSON.stringify(this.confirmParam.payInfo)
 			this.confirmParam.orderInfo = JSON.stringify(this.confirmParam.orderInfo)
@@ -543,37 +394,28 @@ export default {
 			this.isSubLoading = true
 			this.hanldeOrderSubmit(this.confirmParam)
 		},
-		hanldeOrderSubmit(params) {
-			// 提交订单
-			this.SellerService.SellerCreateOrderSubmit(params)
-				.then(response => {
-					const data = response.data
-					if (data.code === 1) {
-						this.$util.msg('支付成功', 2000, true, 'success')
-						setTimeout(() => {
-							this.isSubLoading = false
-							this.$api.redirectTo(
-								`/pages/seller/order/order-details?type=cash&orderId=${data.orderId}&userId=${
-									this.postageParam.userId
-								}`
-							)
-						}, 2000)
-					} else {
-						this.$util.msg('订单提交成功', 2000, true, 'success')
-						setTimeout(() => {
-							this.isSubLoading = false
-							this.$api.redirectTo(
-								`/pages/seller/order/order-details?type=cash&orderId=${data.orderId}&userId=${
-									this.postageParam.userId
-								}`
-							)
-						}, 2000)
-					}
-				})
-				.catch(error => {
-					this.isSubLoading = false
-					this.handleError(error)
-				})
+		// 提交订单
+		async hanldeOrderSubmit(params) {
+			try{
+				const res = await this.SellerService.SellerCreateOrderSubmit(params)
+				const data = res.data
+				if (data.code === 1) {
+					this.$util.msg('支付成功', 2000, true, 'success')
+					setTimeout(() => {
+						this.isSubLoading = false
+						this.$api.redirectTo('/pages/seller/order/order-list?listType=0')
+					}, 2000)
+				} else {
+					this.$util.msg('订单提交成功', 2000, true, 'success')
+					setTimeout(() => {
+						this.isSubLoading = false
+						this.$api.redirectTo('/pages/seller/order/order-list?listType=0')
+					}, 2000)
+				}
+			}catch(error){
+				this.isSubLoading = false
+				this.handleError(error)
+			}
 		},
 		handleError(data) {
 			// 提交订单异常处理
@@ -599,7 +441,7 @@ export default {
 				this.contentModalText = buttonMap[1].contentModalText
 				this.modalButton = buttonMap[1].modalButton
 			} else {
-				this.$util.msg(error.msg, 3000)
+				this.$util.msg(data.msg, 3000)
 			}
 		},
 		formatConfirmParam() {
@@ -713,11 +555,15 @@ export default {
 			this.isAddress = true
 			let SelectData = uni.getStorageSync('selectAddress')
 			this.confirmParam.addressId = SelectData.addressId
-			this.postageParam.townId = SelectData.townId
+			this.cartParam.townId = selectData.townId
+			this.productParam.townId = selectData.townId
 			this.addressData = SelectData
-			this.getFreightData()
-		} else {
-			this.getAddressData()
+			if(this.handleComType === 1) {//立即都买提交
+				this.getInitProdcutCrearOrder()
+			}
+			if(this.handleComType === 2) {//购物车提交
+				this.getInitCrearOrder()
+			}
 		}
 	}
 }

+ 94 - 0
pages/seller/order/mixins/conMixins.js

@@ -0,0 +1,94 @@
+import Vue from 'vue'
+const conMixins = {
+    data() {
+        return {
+            handleComType:0,//跳转类型
+            cartParam: {
+                // 购物车立即结算确认订单参数
+                townId:null,          //地址ID
+                skuIds:'',
+                serviceProviderId: 0, // 协销Id
+                clubId: 0 // 机构Id
+            },
+            productParam: {
+                // 商品立即购买确认订单参数
+                townId:null,          //地址ID
+                productCount: 0, // 商品数量
+                productId: 0, // 商品Id
+                serviceProviderId: 0, // 协销Id
+                clubId: 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// 当前使用金额等于订单金额
+                } else {
+                    this.orderShouldPayFee = this.orderTotalPrice - this.userMoney // 订单最终支付金额等于订单金额-账户余额
+                    this.deductMoney = this.userMoney // 当前使用金额等于总余额
+                }
+                console.log('余额抵扣最终订单支付金额', this.orderShouldPayFee)
+            } else {
+                this.orderShouldPayFee = this.orderTotalPrice
+                this.deductMoney = 0 // 当前使用
+                console.log('未余额抵扣最终订单支付金额', this.orderShouldPayFee)
+            }
+        }
+    }
+}
+
+export default conMixins

+ 168 - 0
pages/seller/order/mixins/orderMixins.js

@@ -0,0 +1,168 @@
+import Vue from 'vue'
+const orderMixins = {
+    data() {
+        return {
+            btnClubUserId: 0,
+            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
+            	}
+            ]
+        }
+    },
+    filters: {
+        NumFormat(value) {
+            //处理金额
+            return Number(value).toFixed(2)
+        },
+        statusFilters(value) {
+            //处理订单状态显示
+            const map = {
+                0: '待确认',
+                2: '交易完成',
+                4: '已关闭',
+                5: '交易全退',
+                6: '交易全退',
+                11: '待付款待发货',
+                12: '待付款部分发货',
+                13: '待付款已发货',
+                21: '部分付款待发货',
+                22: '部分付款部分发货',
+                23: '部分付款已发货',
+                31: '已付款待发货',
+                32: '已付款部分发货',
+                33: '已付款已发货'
+            }
+            return map[value]
+        }
+    },
+    computed: {
+       
+    },
+    methods: {
+        //确认操作
+        handleClick(e) {
+            if (e.index == 1) {
+                switch (this.handleModelEven) {
+                case 1: //取消订单
+                    this.cancelOrder(this.handleShopOrderId)
+                    break
+                case 2: //删除订单
+                    this.deleteOrder(this.handleShopOrderId)
+                    break
+                case 3: //确认订单
+                    this.affirmOrder(this.handleShopOrderId)
+                    break
+                }
+            }
+            this.modal = false
+        },
+        //取消订单
+        async cancelOrder(shopOrderId) {
+        	try {
+        		const res = await this.OrderService.CancelOrder({ shopOrderId: shopOrderId, userIdentity: 1 })
+        		this.$util.msg(res.msg, 2000, true, 'success')
+        		setTimeout(() => {
+        			this.getOrderDatainit(this.currentTab)
+        		}, 2000)
+        	} 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)
+        	}
+        },
+        //确认订单
+        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 handOrderAgain(shopOrderId) {
+        	try {
+        		const res = await this.SellerService.SellerCreateOrderAgain({
+        			confirmFlag: 0,
+        			shopOrderId: shopOrderId,
+        			serviceProviderId: this.listQuery.serviceProviderId
+        		})
+        		const data = res.data
+        		this.$api.setStorage('orderUserInfo', {
+        			clubId: data.clubId,
+        			againBuyProductIds: data.productIds,
+        			userId: data.userId
+        		})
+        		this.$api.navigateTo('/pages/seller/cart/cart')
+        	} catch (error) {
+        		if (error.code == -3) {
+        			this.showAgan = true
+        			this.promptitle = error.msg
+        			this.failList = error.data
+        		} else if (error.code == -2) {
+        			this.$util.modal('', error.msg, '确定', '', false, () => {})
+        		} else {
+        			this.$util.msg(error.msg, 2000)
+        		}
+        	}
+        },
+        // 再来一单弹窗
+        async handleAddAgian() {
+        	try {
+        		await this.SellerService.SellerCreateOrderAgain({
+        			confirmFlag: 1,
+        			shopOrderId: this.handleShopOrderId,
+        			serviceProviderId: this.listQuery.serviceProviderId
+        		})
+        		this.$api.navigateTo('/pages/seller/cart/cart')
+        		this.showAgan = false
+        	} catch (error) {
+        		this.$util.msg(error.msg, 2000)
+        	}
+        },
+        onShareAppMessage(res) {
+            //分享转发
+            this.isShareModal = false
+            if (res.from === 'button') {
+                // 来自页面内转发按钮
+            }
+            return {
+                title: '您有新的分享订单,快来查看吧~',
+                path: `/pages/user/order/order-sharelogin?shopOrderId=${this.handleShopOrderId}&userId=${
+                    this.btnClubUserId
+                }&serviceProviderId=${this.listQuery.serviceProviderId}`,
+                imageUrl: 'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
+            }
+        }
+    }
+}
+
+export default orderMixins

+ 5 - 183
pages/seller/order/order-club-details.vue

@@ -48,28 +48,10 @@
 				}}</label>
 			</view>
 		</view>
-		<!-- 付款弹窗 -->
-		<cm-orderpay-popup v-if="isPayModel" :payModelData="payModelData" :modelType="modelType" @paymentConfirm="hanldPaymentConfirm" />
 		<!-- 分享弹窗 -->
 		<cm-share-popup :orderId="orderId" :shareType="isShareType" v-if="isShareModal" @shareConfirm="onShareAppMessage" />
 		<!-- 促销活动弹窗 -->
 		<cm-promote-popup :Promotion="handlerPros" :popupShow="popupShow" />
-		<!-- 再来一单 -->
-		<view class="aganBj" v-show="showAgan">
-			<view class="alertAgan">
-				<text class="title">{{ promptitle }}</text>
-				<view class="goods">
-					<view class="list" v-for="(item, index) in failList" :key="index">
-						<image class="image-left" :src="item.image"></image>
-						<view class="name-right">{{ item.name }}</view>
-					</view>
-				</view>
-				<view class="BtnAll">
-					<view class="closebtn btn" @click="closeBtn">取消</view>
-					<view class="cancel btn" @click="cancelBtn">确定</view>
-				</view>
-			</view>
-		</view>
 	</view>
 </template>
 
@@ -85,7 +67,6 @@ 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 cmPromotePopup from './components/details/cm-promote-popup' //促销活动弹窗
 
 export default {
@@ -100,7 +81,6 @@ export default {
 		cmVoucherTemp,
 		cmDetailsButton,
 		cmSharePopup,
-		cmPrderpayPopup,
 		cmPromotePopup
 	},
 	data() {
@@ -177,11 +157,9 @@ export default {
 			let HtmlText,
 				typeTextObject = {
 					0: '待确认',
-					4: '交易完成',
-					5: '订单完成',
-					6: '已关闭',
-					7: '交易全退',
-					77: '交易全退',
+					2: '交易完成',
+					4: '已关闭',
+					5: '交易全退',
 					11: '待付款待发货',
 					12: '待付款部分发货',
 					13: '待付款已发货',
@@ -190,8 +168,7 @@ export default {
 					23: '部分付款已发货',
 					31: '已付款待发货',
 					32: '已付款部分发货',
-					33: '已付款已发货',
-					111: '待付款待发货'
+					33: '已付款已发货'
 				}
 
 			Object.keys(typeTextObject).forEach(key => {
@@ -243,162 +220,7 @@ export default {
 					})
 				})
 		},
-		handButtonConfirm(data) {
-			//监听点击时间的按钮类型并执行...
-			this.handShowAlert(data)
-		},
-		handShowAlert(data) {
-			//判断点击的按钮类型并执行...
-			switch (data.type) {
-				case 'query':
-					this.isModalLayer = true
-					this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
-					break
-				case 'delete':
-					this.handOrderDetele()
-					break
-				case 'cancel':
-					this.handCenceConfirm()
-					break
-				case 'confirm':
-					this.handOrderConfirm(data)
-					break
-				case 'balance':
-					this.getOrderPaymentValidation(data)
-					break
-				case 'again':
-					this.handOrderAgain(data.orderId)
-					break
-			}
-		},
-		handOrderAgain(orderId) {
-			this.aganOrderId = orderId
-			this.SellerService.SellerCreateOrderAgain({
-				confirmFlag: 0,
-				orderId: this.aganOrderId,
-				serviceProviderId: this.serviceProviderId
-			})
-				.then(res => {
-					if (res.code == 0) {
-						this.$api.setStorage('orderUserInfo', {
-							clubId: res.data.clubId,
-							againBuyProductIds: res.data.productIds,
-							userId: res.data.userId
-						})
-						this.$api.navigateTo('/pages/seller/cart/cart')
-					}
-				})
-				.catch(error => {
-					if (error.code == -3) {
-						this.showAgan = true
-						this.promptitle = error.msg
-						this.failList = error.data
-					} else if (error.code == -2) {
-						this.$util.modal('', error.msg, '确定', '', false, () => {})
-					} else {
-						this.$util.msg(error.msg, 2000)
-					}
-				})
-		},
-		closeBtn() {
-			//
-			this.showAgan = false
-		},
-		cancelBtn() {
-			// 再来一单弹窗
-			this.SellerService.SellerCreateOrderAgain({
-				serviceProviderId: this.serviceProviderId,
-				orderId: this.aganOrderId,
-				confirmFlag: 1
-			}).then(res => {
-				if (res.code == 0) {
-					this.$api.navigateTo('/pages/seller/cart/cart')
-					this.showAgan = false
-				}
-			})
-		},
-		handOrderConfirm(data) {
-			//确认订单
-			this.$util.modal('提示', '确认此订单?', '确定', '取消', true, () => {
-				this.OrderService.AffirmOrder({ orderId: this.orderId })
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						this.initOrderDetaileData()
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
-		},
-		hanldPaymentConfirm(data) {
-			//监听余额抵扣按钮
-			switch (data.type) {
-				case 3:
-					this.OrderService.OrderBalanceDeduction({ orderId: this.orderId })
-						.then(response => {
-							this.$util.msg('余额抵扣成功', 2000)
-							this.initOrderDetaileData()
-						})
-						.catch(error => {
-							this.$util.msg(error.msg, 2000)
-						})
-					break
-			}
-		},
-		getOrderPaymentValidation(data) {
-			//监听根据付款状态做操作
-			this.OrderService.OrderPaymentValidation({ orderId: data.orderId })
-				.then(response => {
-					let data = this.payModelData = response.data
-					if(data.balanceFlag == 0){// 0可以走余额抵扣,1不能走余额抵扣
-						if (data.code == -1) {
-							this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
-						} else {
-							this.isPayModel = true
-							this.modelType = 3
-						}
-					}else{
-						this.$util.modal('', '该订单已走线上支付流程,不能进行余额抵扣。', '确定', '', false, () => {})
-					}
-				})
-				.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.navigateTo('/pages/seller/index/index')
-							} else {
-								this.$api.navigateTo(
-									`/pages/seller/order/order-list?type=detele&listType=${this.listType}`
-								)
-							}
-						}, 500)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
-		},
-		handCenceConfirm() {
-			//取消订单
-			this.$util.modal('提示', '确认取消该订单吗?', '确定', '取消', true, () => {
-				this.OrderService.CancelOrder({ orderId: this.orderId ,userIdentity : 1})
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						this.initOrderDetaileData()
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
-		},
+		
 		hanldePopupFn(data) {
 			//监听活动内容
 			this.popupShow = true

+ 297 - 243
pages/seller/order/order-details.vue

@@ -1,46 +1,74 @@
 <template>
 	<view class="container details clearfix" :style="{ paddingBottom: isIphoneX ? 130 + 68 + 'rpx' : '130rpx' }">
 		<!-- 自定义返回 -->
-		<header-back :systeminfo="systeminfo" :navbar-data="nvabarData" :headerBtnPosi="headerBtnPosi" :isShare="isOrderShare" />
+		<header-back
+			:systeminfo="systeminfo"
+			:navbar-data="nvabarData"
+			:headerBtnPosi="headerBtnPosi"
+			:isShare="isOrderShare"
+		/>
+		<tui-skeleton
+			v-if="!skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="5"
+		/>
 		<view class="container-details" :style="{ paddingTop: navbarHeight + 'px' }">
 			<view class="status-text">
-				<view class="view-type">{{ information.status | TextFormat }}</view>
+				<view class="view-type">{{ orderInfo.status | statusFilters }}</view>
 				<view class="status-visible">
-					{{ information.orderSeen == 2 ? '订单对机构不可见' : '订单对机构可见' }}
+					{{ orderInfo.orderSeen == 2 ? '订单对机构不可见' : '订单对机构可见' }}
 				</view>
-				<view class="Rebate " v-if="information.rebateFlag == 1">返佣</view>
-				<text class="bage-buss btn" v-if="information.orderSubmitType == 3 || information.orderSubmitType == 4"
+				<view class="Rebate " v-if="orderInfo.rebateFlag == 1">返佣</view>
+				<text class="bage-buss btn" v-if="orderInfo.orderSubmitType == 3 || orderInfo.orderSubmitType == 4"
 					>协销</text
 				>
 				<text
 					class="bage-auto btn"
 					v-if="
-						information.orderSubmitType == 0 ||
-							information.orderSubmitType == 1 ||
-							information.orderSubmitType == 2
+						orderInfo.orderSubmitType == 0 ||
+							orderInfo.orderSubmitType == 1 ||
+							orderInfo.orderSubmitType == 2
 					"
 					>自主</text
 				>
-			</view> 
+			</view>
 			<!-- 地址选择 -->
-			<cm-address-temp ref="orderAddress" v-if="isRequest && !rechargeGoods" :addressData="addressData" /> 
-            <!-- 特殊商品退货须知 -->
-            <view class="return-instructions" v-if="returnGoodsStutas" v-html="helpContent"></view>
+			<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" @popupClick="hanldePopupFn" />
+			<cm-goods-temp
+				ref="goods"
+				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" :discernReceiptList="discernReceiptList" :receiptAmount="receiptAmount" />
+			<cm-payment-temp
+				ref="payment"
+				v-if="skeletonShow"
+				:discernReceiptList="discernReceiptList"
+				:receiptAmount="receiptAmount"
+			/>
 			<!-- 退款记录 -->
-			<cm-refund-temp ref="refund" v-if="isRequest" :returnedPurchaseList="returnedPurchaseList" :returnedPurchaseFee="returnedPurchaseFee" />
+			<cm-refund-temp
+				ref="refund"
+				v-if="skeletonShow"
+				:returnedPurchaseList="returnedPurchaseList"
+				:returnedPurchaseFee="returnedPurchaseFee"
+			/>
 			<!-- 支付凭证记录 -->
 			<cm-voucher-temp ref="voucher" v-if="skeletonShow && voucherList.length > 0" :list="voucherList" />
 			<view
 				class="clause"
-				v-if="information.secondHandOrderFlag != 1"
+				v-if="orderInfo.secondHandOrderFlag != 1"
 				@click="openclauseConten(clauseData.id)"
 				:class="clauseData.name == '无条款' ? 'noclick' : ''"
 			>
@@ -51,21 +79,30 @@
 			<!-- 底部button -->
 			<cm-details-button
 				ref="orderButton"
-				v-if="isRequest"
-				:status="btnStatus"
-				:order="information"
+				v-if="skeletonShow"
+				:status="orderInfo.status"
+				:order="orderInfo"
 				:rechargeGoods="rechargeGoods"
 				:ableUserMoney="ableUserMoney"
 				:shareCode="shareCode"
-				:serviceProviderId="serviceProviderId"
-				:secondHandOrderFlag="information.secondHandOrderFlag"
+				:secondHandOrderFlag="orderInfo.secondHandOrderFlag"
 				@buttonConfirm="handButtonConfirm"
 			/>
 		</view>
 		<!-- 付款弹窗 -->
-		<cm-orderpay-popup v-if="isPayModel" :payModelData="payModelData" :modelType="modelType" @paymentConfirm="hanldPaymentConfirm" />
+		<cm-orderpay-popup
+			v-if="isPayModel"
+			:payModelData="payModelData"
+			:modelType="modelType"
+			@paymentConfirm="hanldPaymentConfirm"
+		/>
 		<!-- 分享弹窗 -->
-		<cm-share-popup :orderId="orderId" :shareType="isShareType" v-if="isShareModal" @shareConfirm="onShareAppMessage" />
+		<cm-share-popup
+			:shopOrderId="shopOrderId"
+			:shareType="isShareType"
+			v-if="isShareModal"
+			@shareConfirm="onShareAppMessage"
+		/>
 		<!-- 促销活动弹窗 -->
 		<cm-promote-popup :Promotion="handlerPros" :popupShow="popupShow" />
 		<!-- 再来一单 -->
@@ -79,11 +116,22 @@
 					</view>
 				</view>
 				<view class="BtnAll">
-					<view class="closebtn btn" @click="closeBtn">取消</view>
-					<view class="cancel btn" @click="cancelBtn">确定</view>
+					<view class="closebtn btn" @click="showAgan = false">取消</view>
+					<view class="cancel btn" @click="handleAddAgian">确定</view>
 				</view>
 			</view>
 		</view>
+		<!-- 提示弹窗 -->
+		<tui-modal
+			:show="modal"
+			@click="handleClick"
+			:content="contentModalText"
+			:button="modalButton"
+			color="#333"
+			:size="32"
+			shape="circle"
+			:maskClosable="false"
+		/>
 	</view>
 </template>
 
@@ -98,7 +146,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' //促销活动弹窗
 
 export default {
@@ -113,7 +161,7 @@ export default {
 		cmVoucherTemp,
 		cmDetailsButton,
 		cmSharePopup,
-		cmPrderpayPopup,
+		cmOrderpayPopup,
 		cmPromotePopup
 	},
 	data() {
@@ -125,15 +173,14 @@ export default {
 			},
 			state: 0,
 			userId: '',
-			orderId: '',
+			orderId: 0,
+			shopOrderId: 0,
 			clubUserId: 0,
 			serviceProviderId: '', //协销ID
 			shareCode: '', //分享码
 			shareType: '', //分享登录页过来记录的状态
 			cellPhone: '', //客服电话
-			payStatus: 0,
-			btnStatus: 0, //按钮组件状态
-			isRequest: false, //是否加载完成渲染子组件
+			skeletonShow: false, //是否加载完成渲染子组件
 			isOrderShare: false,
 			isShareModal: false,
 			isShareType: 2,
@@ -142,11 +189,11 @@ export default {
 			ableUserMoney: '', //机构余额
 			payModelData: {},
 			addressData: {}, //地址信息初始化
-			information: {}, //订单信息初始化
-			shopOrderData: {}, //商品信息初始化
+			orderInfo: {}, //订单信息初始化
 			orderInvoice: {}, //发票信息初始化
 			returnedPurchaseList: {}, //退款信息初始化
 			discernReceiptList: {}, //支付信息初始化
+			voucherList:[], // 线下支付凭证
 			receiptAmount: 0, //支付金额
 			returnedPurchaseFee: 0, //退款金额
 			navbarHeight: '',
@@ -161,15 +208,32 @@ export default {
 			showAgan: false,
 			failList: [], // 再来一单可购买商品
 			promptitle: '',
-			aganOrderId: 0 ,// 再来一单商品id
-            returnGoodsStutas: false,
-            helpContent: '',
+			returnGoodsStutas: false,
+			helpContent: '',
+			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(option) {
 		console.log(option)
 		this.shareType = option.type
-		this.orderId = option.orderId
+		this.shopOrderId = option.shopOrderId
 		this.clubUserId = option.userId
 		if (this.shareType === 'share') {
 			this.listType = 0
@@ -187,233 +251,223 @@ export default {
 			//处理金额
 			return Number(value).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
+		statusFilters(value) {
+			//处理订单状态显示
+			const map = {
+				0: '待确认',
+				2: '交易完成',
+				4: '已关闭',
+				5: '交易全退',
+				6: '交易全退',
+				11: '待付款待发货',
+				12: '待付款部分发货',
+				13: '待付款已发货',
+				21: '部分付款待发货',
+				22: '部分付款部分发货',
+				23: '部分付款已发货',
+				31: '已付款待发货',
+				32: '已付款部分发货',
+				33: '已付款已发货'
+			}
+			return map[value]
 		}
 	},
 	methods: {
-		openclauseConten(id) {
-			this.$api.navigateTo(`/pages/service/sellconten?clauseId=${id}`)
-		},
-		initOrderDetaileData() {
-			//初始化页面数据@参数:订单ID
-			this.OrderService.QueryOrderDetails({
-				orderId: this.orderId,
-				userId: this.clubUserId
-			})
-				.then(response => {
-					let data = response.data
-					this.isRequest = true
-					this.userId = data.order.userId
-					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.shopOrderData = data.shopOrderList
-					this.orderInvoice = data.orderInvoice
-					this.returnedPurchaseList = data.returnedPurchaseList
-					this.discernReceiptList = data.discernReceiptList
-					this.receiptAmount = data.order.receiptAmount
-					this.returnedPurchaseFee = data.order.returnedPurchaseFee
-					this.ableUserMoney = data.ableUserMoney
-					this.clauseData = data.clause
-					if (this.clauseData && this.clauseData.name.length > 10) {
-						this.clauseData.name = this.clauseData.name.substr(0, 10) + '...'
-					}
-                    // 特殊商品退货须知
-                    this.returnGoodsStutas = data.returnGoodsStutas && data.returnGoodsStutas === 2 // 1:可以 2:不可以
-                    this.helpContent = data.helpContent
-				})
-				.catch(error => {
-					this.$util.modal('提示', '订单查询失败,请稍后重试~', '确定', '', false, () => {
-						this.$api.switchTabTo('/pages/seller/index/index')
-					})
+		async initOrderDetaileData() {
+			try {
+				const res = await this.OrderService.QueryOrderDetails({
+					shopOrderId: this.shopOrderId,
+					userId: this.clubUserId
 				})
+				const data = res.data
+				this.orderInfo = data.shopOrder
+				this.userId = this.orderInfo.userId
+				this.rechargeGoods = this.orderInfo.rechargeGoods
+				// this.shareCode = data.shareCode
+				this.addressData = data.userInfo
+				this.receiptAmount = this.orderInfo.receiptAmount
+				this.returnedPurchaseFee = this.orderInfo.returnedPurchaseFee
+				this.orderInvoice = data.orderInvoice
+				this.returnedPurchaseList = data.returnedPurchaseList
+				this.discernReceiptList = data.discernReceiptList
+				this.voucherList = data.voucher
+				this.ableUserMoney = data.ableUserMoney
+				this.clauseData = data.clause
+				if (this.clauseData && this.clauseData.name.length > 10) {
+					this.clauseData.name = this.clauseData.name.substr(0, 10) + '...'
+				}
+				// 特殊商品退货须知
+				this.returnGoodsStutas = data.returnGoodsStutas && data.returnGoodsStutas === 2 // 1:可以 2:不可以
+				this.helpContent = data.helpContent
+				this.skeletonShow = true
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
 		},
 		handButtonConfirm(data) {
-			//监听点击时间的按钮类型并执行...
-			this.handShowAlert(data)
-		},
-		handShowAlert(data) {
 			//判断点击的按钮类型并执行...
 			switch (data.type) {
-				case 'query':
-					this.isModalLayer = true
-					this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
-					break
-				case 'delete':
-					this.handOrderDetele()
+				case 'cancel': //取消订单
+					this.modal = true
+					this.contentModalText = '确认取消该订单吗?'
+					this.handleModelEven = 1
 					break
-				case 'cancel':
-					this.handCenceConfirm()
+				case 'delete': //删除订单
+					this.modal = true
+					this.contentModalText = '确认删除该订单吗?'
+					this.handleModelEven = 2
 					break
-				case 'confirm':
-					this.handOrderConfirm(data)
+				case 'confirm': // 确认订单
+					this.modal = true
+					this.contentModalText = '确认此订单吗?'
+					this.handleModelEven = 3
 					break
 				case 'balance':
 					this.getOrderPaymentValidation(data)
 					break
 				case 'again':
-					this.handOrderAgain(data.orderId)
+					this.handOrderAgain(data.shopOrderId)
+					break
+				case 'query':
+					this.isModalLayer = true
+					this.$api.navigateTo('/pages/user/order/order-logistics?shopOrderId=' + data.shopOrderId)
 					break
 			}
 		},
-		handOrderAgain(orderId) {
-			this.aganOrderId = orderId
-			this.SellerService.SellerCreateOrderAgain({
-				confirmFlag: 0,
-				orderId: this.aganOrderId,
-				serviceProviderId: this.serviceProviderId
-			})
-				.then(res => {
-					if (res.code == 0) {
-						this.$api.setStorage('orderUserInfo', {
-							clubId: res.data.clubId,
-							againBuyProductIds: res.data.productIds,
-							userId: res.data.userId
-						})
-						this.$api.navigateTo('/pages/seller/cart/cart')
-					}
-				})
-				.catch(error => {
-					if (error.code == -3) {
-						this.showAgan = true
-						this.promptitle = error.msg
-						this.failList = error.data
-					} else if (error.code == -2) {
-						this.$util.modal('', error.msg, '确定', '', false, () => {})
+		handleClick(e) {
+			//确认操作
+			if (e.index == 1) {
+				switch (this.handleModelEven) {
+					case 1: //取消订单
+						this.cancelOrder(this.shopOrderId)
+						break
+					case 2: //删除订单
+						this.deleteOrder(this.shopOrderId)
+						break
+					case 3: //确认订单
+						this.affirmOrder(this.shopOrderId)
+						break
+				}
+			}
+			this.modal = false
+		},
+		//取消订单
+		async cancelOrder(shopOrderId) {
+			try {
+				const res = await this.OrderService.CancelOrder({ shopOrderId: shopOrderId, userIdentity: 1 })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.initOrderDetaileData()
+				}, 2000)
+			} 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(() => {
+					if (this.shareType === 'share') {
+						this.$api.switchTabTo('/pages/tabBar/home/index')
 					} else {
-						this.$util.msg(error.msg, 2000)
+						this.$api.redirectTo(`/pages/user/order/order-list?type=detele&state=${this.state}`)
 					}
-				})
+				}, 2000)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
 		},
-		closeBtn() {
-			//
-			this.showAgan = false
+		//确认订单
+		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)
+			}
 		},
-		cancelBtn() {
-			// 再来一单弹窗
-			this.SellerService.SellerCreateOrderAgain({
-				serviceProviderId: this.serviceProviderId,
-				orderId: this.aganOrderId,
-				confirmFlag: 1
-			}).then(res => {
-				if (res.code == 0) {
-					this.$api.navigateTo('/pages/seller/cart/cart')
-					this.showAgan = false
+		// 再来一单
+		async handOrderAgainn(shopOrderId) {
+			try{
+				const res = await this.SellerService.SellerCreateOrderAgain({
+					confirmFlag: 0,
+					shopOrderId: shopOrderId,
+					serviceProviderId: this.serviceProviderId
+				})
+				const data = res.data
+				this.$api.setStorage('orderUserInfo', {
+					clubId: data.clubId,
+					againBuyProductIds: data.productIds,
+					userId: data.userId
+				})
+				this.$api.navigateTo('/pages/seller/cart/cart')
+			}catch(error){
+				if (error.code == -3) {
+					this.showAgan = true
+					this.promptitle = error.msg
+					this.failList = error.data
+				} else if (error.code == -2) {
+					this.$util.modal('', error.msg, '确定', '', false, () => {})
+				} else {
+					this.$util.msg(error.msg, 2000)
 				}
-			})
+			}
 		},
-		handOrderConfirm(data) {
-			//确认订单
-			this.$util.modal('提示', '确认此订单?', '确定', '取消', true, () => {
-				this.OrderService.AffirmOrder({ orderId: this.orderId })
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						this.initOrderDetaileData()
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		async handleAddAgian() {
+			// 再来一单弹窗
+			try{
+				await this.SellerService.SellerCreateOrderAgain({
+					confirmFlag: 1,
+					shopOrderId: this.shopOrderId,
+					serviceProviderId: this.serviceProviderId,
+				})
+				this.$api.navigateTo('/pages/seller/cart/cart')
+				this.showAgan = false
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
 		},
-		hanldPaymentConfirm(data) {
-			//监听余额抵扣按钮
-			switch (data.type) {
-				case 3:
-					this.OrderService.OrderBalanceDeduction({ orderId: this.orderId })
-						.then(response => {
-							this.$util.msg('余额抵扣成功', 2000)
-							this.initOrderDetaileData()
-						})
-						.catch(error => {
-							this.$util.msg(error.msg, 2000)
-						})
-					break
+		//监听余额抵扣按钮
+		async hanldPaymentConfirm(data) {
+			try{
+				await this.OrderService.OrderBalanceDeduction({ shopOrderId: this.shopOrderId })
+				this.$util.msg('余额抵扣成功', 2000)
+				this.initOrderDetaileData()
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
 			}
 		},
-		getOrderPaymentValidation(data) {
-			//监听根据付款状态做操作
-			this.OrderService.OrderPaymentValidation({ orderId: data.orderId })
-				.then(response => {
-					let data = (this.payModelData = response.data)
-					if (data.balanceFlag == 0) {
-						// 0可以走余额抵扣,1不能走余额抵扣
-						if (data.code == -1) {
-							this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
-						} else {
-							this.isPayModel = true
-							this.modelType = 3
-						}
+		//监听根据付款状态做操作
+		async getOrderPaymentValidation(order) {
+			try{
+				const res = await this.OrderService.OrderPaymentValidation({ shopOrderId: order.shopOrderId })
+				const data = res.data
+				this.payModelData = data
+				if (data.balanceFlag == 0) {
+					// 0可以走余额抵扣,1不能走余额抵扣
+					if (data.code == -1) {
+						this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
 					} else {
-						this.$util.modal('', '该订单已走线上支付流程,不能进行余额抵扣。', '确定', '', false, () => {})
+						console.log('payModelData',this.payModelData)
+						this.isPayModel = true
+						this.modelType = 3
+						console.log('isPayModel',this.isPayModel)
 					}
-				})
-				.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.navigateTo('/pages/seller/index/index')
-							} else {
-								this.$api.navigateTo(
-									`/pages/seller/order/order-list?type=detele&listType=${this.listType}`
-								)
-							}
-						}, 500)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+				} else {
+					this.$util.modal('', '该订单已走线上支付流程,不能进行余额抵扣。', '确定', '', false, () => {})
+				}
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
 		},
-		handCenceConfirm() {
-			//取消订单
-			this.$util.modal('提示', '确认取消该订单吗?', '确定', '取消', true, () => {
-				this.OrderService.CancelOrder({ orderId: this.orderId ,userIdentity : 1})
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						this.initOrderDetaileData()
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		// 条款
+		openclauseConten(id) {
+			this.$api.navigateTo(`/pages/service/sellconten?clauseId=${id}`)
 		},
 		hanldePopupFn(data) {
 			//监听活动内容
@@ -704,12 +758,12 @@ page {
 		}
 	}
 }
-.return-instructions{
-    font-size: 26rpx;
-    color: #FF5B00;
-    line-height: 42rpx;
-    padding: 32rpx 50rpx;
-    background-color: #FFFAF8;
-    text-align: justify;
+.return-instructions {
+	font-size: 26rpx;
+	color: #ff5b00;
+	line-height: 42rpx;
+	padding: 32rpx 50rpx;
+	background-color: #fffaf8;
+	text-align: justify;
 }
 </style>

+ 220 - 390
pages/seller/order/order-historylist.vue

@@ -68,14 +68,17 @@
 										<text class="tags sv" v-if="order.svipUserFlag == 1">SVIP</text>
 									</view>
 									<view class="order-title-t">
+										<view class="order-title-tip tui-skeleton-fillet">
+											{{ order.status | statusFilters }}
+										</view>
 										<text
-											class="bage-buss tui-skeleton-fillet"
+											class="bage buss tui-skeleton-fillet"
 											v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4"
 										>
 											协销
 										</text>
 										<text
-											class="bage-auto tui-skeleton-fillet"
+											class="bage auto tui-skeleton-fillet"
 											v-if="
 												order.orderSubmitType == 0 ||
 													order.orderSubmitType == 1 ||
@@ -84,9 +87,6 @@
 										>
 											自主
 										</text>
-										<text class="bage-text tui-skeleton-fillet">
-											订单编号:{{ order.orderNo }}({{ order.orderId }})
-										</text>
 										<image
 											class="bage-icon"
 											src="https://static.caimei365.com/app/img/icon/icon-type@3x.png"
@@ -95,103 +95,93 @@
 										>
 										</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 class="goods-title">
+									<view v-if="order.shopPromotion" class="floor-item-act">
+										<view class="floor-tags"> {{ order.shopPromotion.name }} </view>
 									</view>
+									<view class="title-text tui-skeleton-fillet"> {{ order.shopName }} </view>
 								</view>
-								<block v-for="(shop, index) in order.shopOrderList" :key="index">
-									<view class="goods-title">
-										<view v-if="shop.shopPromotion" class="floor-item-act">
-											<view class="floor-tags"> {{ shop.shopPromotion.name }} </view>
+								<view
+									class="goods-item"
+									v-for="(pros, prosIndex) in order.orderProductList"
+									:key="prosIndex"
+								>
+									<view class="goods-pros-t">
+										<view class="pros-img tui-skeleton-fillet">
+											<image :src="pros.image" alt="" />
+											<text class="tips" v-if="pros.productType == 2 || pros.productType == 1"
+												>赠品</text
+											>
 										</view>
-										<view class="title-text tui-skeleton-fillet"> {{ shop.shopName }} </view>
-									</view>
-									<view
-										class="goods-item"
-										v-for="(pros, prosIndex) in shop.orderProductList"
-										:key="prosIndex"
-									>
-										<view class="goods-pros-t">
-											<view class="pros-img tui-skeleton-fillet">
-												<image :src="pros.image" alt="" />
-												<text class="tips" v-if="pros.productType == 2 || pros.productType == 1"
-													>赠品</text
-												>
+										<view class="pros-product clearfix">
+											<view class="producttitle tui-skeleton-fillet">{{ pros.name }}</view>
+											<view
+												class="productspec tui-skeleton-fillet"
+												v-if="pros.productCategory != 2"
+											>
+												规格:{{ pros.productUnit ? pros.productUnit : '' }}
 											</view>
-											<view class="pros-product clearfix">
-												<view class="producttitle tui-skeleton-fillet">{{ pros.name }}</view>
+											<view class="productprice">
 												<view
-													class="productspec tui-skeleton-fillet"
-													v-if="pros.productCategory != 2"
+													class="price tui-skeleton-fillet"
+													:class="
+														pros.svipPriceFlag == 1 ||
+														PromotionsFormat(pros.productPromotion)
+															? 'none'
+															: ''
+													"
 												>
-													规格:{{ pros.productUnit ? pros.productUnit : '' }}
+													<text>¥{{ pros.price | NumFormat }}</text>
+												</view>
+												<view class="count tui-skeleton-fillet">
+													<text class="small">x</text>{{ pros.num }}
 												</view>
-												<view class="productprice">
+											</view>
+											<view class="floor-item-act">
+												<template v-if="pros.productPromotion">
 													<view
-														class="price tui-skeleton-fillet"
-														:class="
-															pros.svipPriceFlag == 1 ||
-															PromotionsFormat(pros.productPromotion)
-																? 'none'
-																: ''
-														"
+														v-if="PromotionsFormat(pros.productPromotion)"
+														class="floor-tags"
+														@click.stop="clickPopupShow(pros.productPromotion)"
 													>
-														<text>¥{{ pros.price | NumFormat }}</text>
+														{{ pros.productPromotion.name }}
+														<text
+															v-if="
+																pros.productPromotion != null &&
+																	pros.productPromotion.type != 3
+															"
+														>
+															:¥{{
+																pros.productPromotion == null
+																	? '0.00'
+																	: pros.productPromotion.touchPrice | NumFormat
+															}}
+														</text>
 													</view>
-													<view class="count tui-skeleton-fillet">
-														<text class="small">x</text>{{ pros.num }}
+													<view
+														v-else-if="pros.productPromotion.type != 3"
+														class="floor-tags"
+														@click.stop="clickPopupShow(pros.productPromotion)"
+														>{{ pros.productPromotion.name }}</view
+													>
+												</template>
+												<template v-if="pros.svipPriceFlag == 1">
+													<view class="svip-tags">
+														<view class="tags">SVIP</view>
+														<view class="price">{{ pros.svipPriceTag }}</view>
 													</view>
-												</view>
-												<view class="floor-item-act">
-													<template v-if="pros.productPromotion">
-														<view
-															v-if="PromotionsFormat(pros.productPromotion)"
-															class="floor-tags"
-															@click.stop="clickPopupShow(pros.productPromotion)"
-														>
-															{{ pros.productPromotion.name }}
-															<text
-																v-if="
-																	pros.productPromotion != null &&
-																		pros.productPromotion.type != 3
-																"
-															>
-																:¥{{
-																	pros.productPromotion == null
-																		? '0.00'
-																		: pros.productPromotion.touchPrice | NumFormat
-																}}
-															</text>
-														</view>
-														<view
-															v-else-if="pros.productPromotion.type != 3"
-															class="floor-tags"
-															@click.stop="clickPopupShow(pros.productPromotion)"
-															>{{ pros.productPromotion.name }}</view
-														>
-													</template>
-													<template v-if="pros.svipPriceFlag == 1">
-														<view class="svip-tags">
-															<view class="tags">SVIP</view>
-															<view class="price">{{ pros.svipPriceTag }}</view>
-														</view>
-													</template>
-												</view>
+												</template>
 											</view>
 										</view>
 									</view>
-								</block>
+								</view>
 								<view class="order-footer">
-									<view class="order-footer-top" v-if="order.discountFee != 0">
+									<!-- <view class="order-footer-top" v-if="order.discountFee != 0">
 										经理折扣:¥{{ order.discountFee | NumFormat }}
-									</view>
+									</view> -->
 									<view class="order-footer-bot">
-										<view class="count tui-skeleton-fillet">共{{ order.productCount }}件商品</view>
+										<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"
@@ -202,31 +192,31 @@
 										</view>
 										<view class="money tui-skeleton-fillet" v-else>
 											待付总额:<label style="color:#f94b4b ;"
-												>¥{{ order.pendingPayments | NumFormat }}</label
+												>¥{{ order.obligation | NumFormat }}</label
 											>
 										</view>
 									</view>
 								</view>
 								<!-- 底部button -->
 								<cm-list-button
+									v-if="clubSpId === listQuery.serviceProviderId"
 									ref="orderButton"
-									v-if="clubSpId === serviceProviderId"
+									:order="order"
 									:status="order.status"
-									:order = "order"
-									:rechargeGoods="order.rechargeGoods"
-									:orderId="order.orderId"
 									:userId="order.userId"
+									:shopOrderId="order.shopOrderId"
+									:rechargeGoods="order.rechargeGoods"
 									:secondHandOrderFlag="order.secondHandOrderFlag"
 									@buttonConfirm="handButtonConfirm"
 								/>
 							</view>
 							<!--加载loadding-->
-							<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
+							<tui-loadmore :visible="loadding" :index="3" type="black"/>
 							<tui-nomore
 								:visible="!pullUpOn"
 								:backgroundColor="'#ffffff'"
 								:text="nomoreText"
-							></tui-nomore>
+							/>
 							<!--加载loadding-->
 						</view>
 					</view>
@@ -234,9 +224,12 @@
 			</swiper-item>
 		</swiper>
 		<!-- 分享弹窗 -->
-		<cm-share-popup :orderId="btnoRderID" :shareType="isShareType" v-if="isShareModal" @shareConfirm="onShareAppMessage" />
-		<!-- 透明模态层 -->
-		<modal-layer v-if="isModalLayer"></modal-layer>
+		<cm-share-popup
+			:shopOrderId="handleShopOrderId"
+			:shareType="isShareType"
+			v-if="isShareModal"
+			@shareConfirm="onShareAppMessage"
+		/>
 		<!-- 再来一单弹窗 -->
 		<view class="aganBj" v-show="showAgan">
 			<view class="alertAgan">
@@ -248,28 +241,41 @@
 					</view>
 				</view>
 				<view class="BtnAll">
-					<view class="closebtn btn" @click="closeBtn">取消</view>
-					<view class="cancel btn" @click="cancelBtn">确定</view>
+					<view class="closebtn btn" @click="showAgan = false">取消</view>
+					<view class="cancel btn" @click="handleAddAgian">确定</view>
 				</view>
 			</view>
 		</view>
+		<!-- 提示弹窗 -->
+		<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>
 	</view>
 </template>
 
 <script>
 import { mapState, mapMutations } from 'vuex'		
 import headerBack from '@/components/cm-module/headerNavbar/header-back' // 自定义顶部导航
-import btSearch from '@/components/uni-search/bt-search.vue' // 搜索
 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 orderMixins from './mixins/orderMixins.js'
 
 export default {
+	mixins: [orderMixins],
 	components: {
 		headerBack,
 		empty,
-		btSearch,
 		modalLayer,
 		cmListButton,
 		cmSharePopup,
@@ -290,25 +296,24 @@ export default {
 				{ type: 2, text: '协销订单' }
 			],
 			winHeight: '', //窗口高度
-			clubId: 0, //机构ID
-			userId: 0,
 			currentTab: 0, //预设当前项的值
 			screenTab: 0, //筛选预设当前项的值
 			scrollLeft: 0, //tab标题的滚动条位置
 			clubSpId:0, // 机构协销Id
-			serviceProviderId: 0, //协销用户ID
+			listQuery:{
+				listType: 0,
+				clubId: 0,
+				orderSubmitType: 0,
+				serviceProviderId: 0,
+				pageNum: 1,
+				pageSize: 10
+			},
 			orderData: [],
-			btnClubUserID: 0,
-			btnoRderID: 0, //点击按钮传入的的订单ID
-			pageNum: 1, //页数
-			pageSize: 10, //条数
 			scrollTop: 0,
-			deteleType: '',
 			skeletonShow: true,
 			isClickChange: false,
 			isShareModal: false, //控制分享弹窗
 			isShareType:2,
-			isSeller: false,
 			isModalLayer: false,
 			loadding: false,
 			pullUpOn: true,
@@ -319,13 +324,12 @@ export default {
 			showAgan: false,
 			failList: [], // 再来一单可购买商品
 			promptitle: '',
-			aganOrderId: 0,
-			authType:0,
+			authType:0
 		}
 	},
 	onLoad(option) {
 		let self = this
-		this.currentTab = option.listType
+		this.currentTab = this.listQuery.listType = option.listType
 		this.authType = option.authType
 		this.initDataInfo()
 		uni.getSystemInfo({
@@ -336,20 +340,13 @@ export default {
 			}
 		})
 	},
-	filters: {
-		NumFormat(value) {
-			//处理金额
-			return Number(value).toFixed(2)
-		}
-	},
 	methods: {
 		async initDataInfo() {
 			const clubInfo = await this.$api.getComStorage('orderUserInfo')
 			const userInfo = await this.$api.getStorage()
-			this.clubId = clubInfo.clubId ? clubInfo.clubId : 0
-			this.userId = clubInfo.userId ? clubInfo.userId : 0
+			this.listQuery.clubId = clubInfo.clubId
 			this.clubSpId = clubInfo.serviceProviderId
-			this.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
+			this.listQuery.serviceProviderId = userInfo.serviceProviderId
 			this.getOrderDatainit(this.currentTab)
 		},
 		onChange(e) {
@@ -362,6 +359,7 @@ export default {
 			}
 			this.isClickChange = false
 			this.currentTab = index
+			this.listQuery.listType = index
 			this.checkCor()
 			this.pageNum = 1
 			this.pullUpOn = true //切换时隐藏
@@ -377,7 +375,7 @@ export default {
 			} else {
 				this.isClickChange = true
 				this.currentTab = tabIndex
-				this.pageNum = 1
+				this.listQuery.listType = tabIndex
 				this.pullUpOn = true //切换时隐藏
 				this.loadding = false //切换时隐藏
 				this.getOrderDatainit(this.currentTab)
@@ -386,7 +384,7 @@ export default {
 		onClickScreenTab(index) {
 			console.log(index)
 			this.screenTab = index
-			this.pageNum = 1
+			this.listQuery.orderSubmitType = tabIndex
 			this.pullUpOn = true //切换时隐藏
 			this.loadding = false //切换时隐藏
 			this.nomoreText = ''
@@ -401,88 +399,93 @@ export default {
 				this.scrollLeft = 0
 			}
 		},
-		getOrderDatainit(index, source) {
-			setTimeout(() => {
-				this.skeletonShow = false
-			}, 1500)
-			let orderItem = this.orderTabBar[index]
-			let listType = orderItem.listType
-			if (source === 'tabChange' && orderItem.loaded === true) {
-				//tab切换只有第一次需要加载数据
-				return
-			}
-			setTimeout(() => {
-				this.SellerService.GetSellerClubOrderList({
-					listType: index,
-					clubId: this.clubId,
-					orderSubmitType: this.screenTab,
-					serviceProviderId: this.serviceProviderId,
-					pageNum: 1,
-					pageSize: this.pageSize
-				})
-					.then(response => {
-						let data = response.data
-						let orderList = data.list.filter(item => {
-							//添加不同状态下订单的表现形式
-							item = Object.assign(item, this.StateExpFormat(item.listType))
-							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)
-					})
-			}, 600)
-		},
-		getOnReachBottomData(index) {
-			//上拉加载
-			this.pageNum += 1
-			this.SellerService.GetSellerClubOrderList({
-				listType: index,
-				clubId: this.clubId,
-				orderSubmitType: this.screenTab,
-				serviceProviderId: this.serviceProviderId,
-				pageNum: this.pageNum,
-				pageSize: this.pageSize
-			})
-				.then(response => {
-					let orderItem = this.orderTabBar[index]
-					let data = response.data
+		async getOrderDatainit(index, source) {
+			try {
+				this.listQuery.pageNum = 1
+				let orderItem = this.orderTabBar[index]
+				if (source === 'tabChange' && orderItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return
+				}
+				const res = await this.SellerService.GetSellerClubOrderList(this.listQuery)
+				const data = res.data
+				if (data.list && data.list.length > 0) {
+					orderItem.orderList =[]
+					orderItem.orderList = data.list
+					//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
 					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 = '已至底部'
+						if (orderItem.orderList.length < 2) {
+							this.pullUpOn = true
+						} else {
+							this.pullUpOn = false
+							this.nomoreText = '已至底部'
+						}
 					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+				} else {
+					this.$set(orderItem, 'loaded', true)
+					orderItem.orderList = []
+				}
+				this.skeletonShow = false
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		async getOnReachBottomData(index) {
+			//上拉加载
+			try {
+				this.listQuery.pageNum += 1
+				const res = await this.SellerService.GetSellerClubOrderList(this.listQuery)
+				const data = res.data
+				const orderItem = this.orderTabBar[index]
+				orderItem.orderList = orderItem.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.handleShopOrderId = data.shopOrderId
+			switch (data.type) {
+				case 'cancel': //取消订单
+					this.modal = true
+					this.contentModalText = '确认取消该订单吗?'
+					this.handleModelEven = 1
+					break
+				case 'delete': //删除订单
+					this.modal = true
+					this.contentModalText = '确认删除该订单吗?'
+					this.handleModelEven = 2
+					break
+				case 'confirm': // 确认订单
+					this.modal = true
+					this.contentModalText = '确认此订单吗?'
+					this.handleModelEven = 3
+					break
+				case 'again':
+					this.handOrderAgain(data.shopOrderId)
+					break
+				case 'query':
+					this.isModalLayer = true
+					this.$api.navigateTo('/pages/user/order/order-logistics?shopOrderId=' + data.shopOrderId)
+					break
+			}
 		},
 		scrolltolower() {
 			if (this.hasNextPage) {
@@ -496,154 +499,21 @@ export default {
 			this.isModalLayer = true
 			if(this.authType === '1' || this.authType === '2'){
 				this.$api.navigateTo(
-					`/pages/seller/order/order-club-details?listType=${this.currentTab}&orderId=${order.orderId}&userId=${
+					`/pages/seller/order/order-club-details?listType=${this.currentTab}&shopOrderId=${order.shopOrderId}&userId=${
 						order.userId
 					}`
 				)
 			}else{
 				this.$api.navigateTo(
-					`/pages/seller/order/order-details?listType=${this.currentTab}&orderId=${order.orderId}&userId=${
+					`/pages/seller/order/order-details?listType=${this.currentTab}&shopOrderId=${order.shopOrderId}&userId=${
 						order.userId
 					}`
 				)
 			}
-			
-		},
-		handButtonConfirm(data) {
-			//获取点击
-			this.handShowAlert(data)
-			this.btnoRderID = data.orderId
-		},
-		handShowAlert(data) {
-			//执行
-			switch (data.type) {
-				case 'query':
-					this.isModalLayer = true
-					this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
-					break
-				case 'delete':
-					this.handOrderDetele(data.orderId)
-					break
-				case 'cancel':
-					this.handCenceConfirm(data.orderId)
-					break
-				case 'confirm':
-					this.handOrderConfirm(data.orderId)
-					break
-				case 'again':
-					this.handOrderAgain(data.orderId)
-					break
-			}
-		},
-		handOrderAgain(orderId) {
-			this.aganOrderId = orderId
-			this.SellerService.SellerCreateOrderAgain({
-				confirmFlag: 0,
-				orderId: this.aganOrderId,
-				serviceProviderId: this.serviceProviderId
-			})
-				.then(res => {
-					if (res.code == 0) {
-						this.$api.setStorage('orderUserInfo', {
-							clubId: res.data.clubId,
-							againBuyProductIds: res.data.productIds,
-							userId: res.data.userId
-						})
-						this.$api.navigateTo('/pages/seller/cart/cart')
-					}
-				})
-				.catch(error => {
-					if (error.code == -3) {
-						this.showAgan = true
-						this.promptitle = error.msg
-						this.failList = error.data
-					} else if (error.code == -2) {
-						this.$util.modal('', error.msg, '确定', '', false, () => {})
-					} else {
-						this.$util.msg(error.msg, 2000)
-					}
-				})
-		},
-		closeBtn() {
-			//
-			this.showAgan = false
-		},
-		cancelBtn() {
-			// 再来一单弹窗
-			this.SellerService.SellerCreateOrderAgain({
-				serviceProviderId: this.serviceProviderId,
-				orderId: this.aganOrderId,
-				confirmFlag: 1
-			}).then(res => {
-				if (res.code == 0) {
-					this.$api.navigateTo('/pages/seller/cart/cart')
-					this.showAgan = false
-				}
-			})
-		},
-		handOrderConfirm(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)
-					})
-			})
-		},
-		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)
-					})
-			})
-		},
-		handCenceConfirm(orderId) {
-			//取消订单
-			this.$util.modal('提示', '确认取消该订单吗?', '确定', '取消', true, () => {
-				this.OrderService.CancelOrder({ orderId: orderId , userIdentity : 1})
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						setTimeout(() => {
-							this.getOrderDatainit(this.currentTab)
-						}, 2000)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
 		},
 		handlSearchPath() {
 			this.$api.navigateTo('/pages/seller/order/search-order')
 		},
-		onShareAppMessage(res) {
-			//分享转发
-			this.isShareModal = false
-			if (res.from === 'button') {
-				// 来自页面内转发按钮
-				// console.log(res.target)
-			}
-			return {
-				title: '您有新的分享订单,快来查看吧~',
-				path: `/pages/user/order/order-sharelogin?orderId=${this.btnoRderID}&userId=${
-					this.btnClubUserID
-				}&serviceProviderId=${this.serviceProviderId}`,
-				imageUrl: 'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
-			}
-		},
 		PromotionsFormat(promo) {
 			//促销活动类型数据处理
 			if (promo != null) {
@@ -654,39 +524,6 @@ export default {
 				}
 			}
 			return false
-		},
-		//订单状态文字和颜色
-		StateExpFormat(state) {
-			let stateText = '',
-				stateTextObject = {
-					0: '待确认',
-					4: '交易完成',
-					5: '订单完成',
-					6: '已关闭',
-					7: '交易全退',
-					77: '交易全退',
-					11: '待付款待发货',
-					12: '待付款部分发货',
-					13: '待付款已发货',
-					21: '部分付款待发货',
-					22: '部分付款部分发货',
-					23: '部分付款已发货',
-					31: '已付款待发货',
-					32: '已付款部分发货',
-					33: '已付款已发货',
-					111: '待付款待发货'
-				}
-			Object.keys(stateTextObject).forEach(key => {
-				if (key == state) {
-					stateText = stateTextObject[key]
-				}
-			})
-			return stateText
-		},
-		orderPriceToFixed(n) {
-			let price = ''
-			price = n.toFixed(2)
-			return price
 		}
 	},
 	onPageScroll(e) {
@@ -845,40 +682,33 @@ page {
 			height: 50rpx;
 			display: block;
 			position: absolute;
-			right: 0;
-			top: 9rpx;
-		}
-		.bage-buss {
-			display: inline-block;
-			width: 72rpx;
-			height: 30rpx;
-			background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
-			border-radius: 4rpx;
-			line-height: 30rpx;
-			font-size: $font-size-22;
-			text-align: center;
-			color: #ffffff;
-			margin-top: 8rpx;
+			right: 110rpx;
+			top: 12rpx;
 		}
-		.bage-auto {
+		.bage{
 			display: inline-block;
 			width: 72rpx;
-			height: 30rpx;
-			background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
+			height: 32rpx;
+			margin: 19rpx 10rpx 0 10rpx;
 			border-radius: 4rpx;
-			line-height: 30rpx;
+			line-height: 32rpx;
 			font-size: $font-size-22;
 			text-align: center;
 			color: #ffffff;
-			margin-top: 8rpx;
+			float: right;
+			&.buss{
+				background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
+			}
+			&.auto{
+				background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
+			}
 		}
-		.bage-text {
-			display: inline-block;
+		.order-title-tip {
+			float: left;
 			font-size: $font-size-28;
 			line-height: 68rpx;
-			text-align: left;
-			color: $color-system;
-			margin-left: 15rpx;
+			text-align: right;
+			color: #ff2a2a;
 		}
 	}
 	.order-title-b {

+ 331 - 482
pages/seller/order/order-list.vue

@@ -10,143 +10,143 @@
 			:screenTab="screenTab"
 			@goSearchPath="handlSearchPath"
 		/>
-		<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>
-			<scroll-view scroll-x scroll-with-animation class="tab-screen" :scroll-left="scrollLeft">
-				<view
-					v-for="(item, index) in screenTabBar"
-					:key="index"
-					class="tab-screen-item"
-					:class="[screenTab == index ? 'active' : '']"
-					:data-current="index"
-					@tap.stop="onClickScreenTab(index)"
-					>{{ item.text }}</view
-				>
-				<view
-					class="tab-screen-item"
-					v-if="isManage"
-					:data-current="3"
-					:class="[screenTab == 3 ? 'active' : '']"
-					@tap.stop="onClickScreenTab(3)"
-					>组员订单</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"
-					:style="{ height: winHeight + 'px' }"
-				>
-					<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"
-								@click.stop="detail(order)"
-							>
-								<view class="order-title">
-									<view class="order-title-name">
-										<text>{{ order.clubName ? order.clubName : '' }}</text>
-										<text class="tags" v-if="order.svipUserFlag == 0 && order.userIdentity === 2"
-											>VIP</text
-										>
-										<text class="tags sv" v-if="order.svipUserFlag == 1">SVIP</text>
-										<view class="name" v-if="screenTab === 3">【 {{ order.serviceName ? order.serviceName : '' }} 】</view>
-									</view>
-									<view class="order-title-t">
-										<view class="Rebate " v-if="order.rebateFlag == 1">返佣</view>
-										<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 }}({{ order.orderId }})
-										</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 }}
+		<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>
+				<scroll-view scroll-x scroll-with-animation class="tab-screen" :scroll-left="scrollLeft">
+					<view
+						v-for="(item, index) in screenTabBar"
+						:key="index"
+						class="tab-screen-item"
+						:class="[screenTab == index ? 'active' : '']"
+						:data-current="index"
+						@tap.stop="onClickScreenTab(index)"
+						>{{ item.text }}</view
+					>
+					<view
+						class="tab-screen-item"
+						v-if="isManage"
+						:data-current="3"
+						:class="[screenTab == 3 ? 'active' : '']"
+						@tap.stop="onClickScreenTab(3)"
+						>组员订单</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"  @touchmove.stop="">
+					<scroll-view
+						scroll-y
+						class="scoll-y tui-skeleton"
+						@scrolltolower="scrolltolower"
+						:style="{ height: winHeight + 'px' }"
+					>
+						<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"
+									@click.stop="detail(order)"
+								>
+									<view class="order-title">
+										<view class="order-title-name">
+											<text>{{ order.clubName ? order.clubName : '' }}</text>
+											<text
+												class="tags"
+												v-if="order.svipUserFlag == 0 && order.userIdentity === 2"
+												>VIP</text
+											>
+											<text class="tags sv" v-if="order.svipUserFlag == 1">SVIP</text>
+											<view class="name" v-if="screenTab === 3"
+												>【 {{ order.serviceName ? order.serviceName : '' }} 】</view
+											>
 										</view>
-										<view class="order-title-tip tui-skeleton-fillet">
-											{{ StateExpFormat(order.status) }}
+										<view class="order-title-t">
+											<view class="order-title-tip tui-skeleton-fillet">
+												{{ order.status | statusFilters }}
+											</view>
+											<view class="bage ebate" v-if="order.rebateFlag == 1">返佣</view>
+											<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>
+											<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>
-								</view>
-								<block v-for="(shop, index) in order.shopOrderList" :key="index">
 									<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 tui-skeleton-fillet">{{ shop.shopName }}</view>
+										<view class="title-text tui-skeleton-fillet">{{ order.shopName }}</view>
 									</view>
 									<view
 										class="goods-item"
-										v-for="(pros, prosIndex) in shop.orderProductList"
+										v-for="(pros, prosIndex) in order.orderProductList"
 										:key="prosIndex"
 									>
 										<view class="goods-pros-t">
 											<view class="pros-img tui-skeleton-fillet">
 												<image :src="pros.image" alt="" />
-												<text class="tips" v-if="pros.productType == 2 || pros.productType == 1"
+												<text
+													class="tips"
+													v-if="pros.productType == 2 || pros.productType == 1"
 													>赠品</text
 												>
 											</view>
 											<view class="pros-product clearfix">
-												<view class="producttitle tui-skeleton-fillet">{{ pros.name }}</view>
+												<view class="producttitle tui-skeleton-fillet">{{
+													pros.name
+												}}</view>
 												<view
 													class="productspec tui-skeleton-fillet"
 													v-if="pros.productCategory != 2"
@@ -186,7 +186,8 @@
 																:¥{{
 																	pros.productPromotion == null
 																		? '0.00'
-																		: pros.productPromotion.touchPrice | NumFormat
+																		: pros.productPromotion.touchPrice
+																		  | NumFormat
 																}}
 															</text>
 														</view>
@@ -207,56 +208,63 @@
 											</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 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.itemCount }}件商品</view
 											>
-										</view>
-										<view class="money tui-skeleton-fillet" v-else
-											>待付总额:<label style="color:#f94b4b ;">
-												¥{{ order.pendingPayments | NumFormat }}</label
+											<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"
+										v-if="screenTab != 3"
+										:status="order.status"
+										:order="order"
+										:shopOrderId="order.shopOrderId"
+										:rechargeGoods="order.rechargeGoods"
+										:userId="order.userId"
+										:secondHandOrderFlag="order.secondHandOrderFlag"
+										@buttonConfirm="handButtonConfirm"
+									/>
 								</view>
-								<!-- 底部button -->
-								<cm-list-button
-									ref="orderButton"
-									v-if="screenTab != 3"
-									:status="order.status"
-									:order="order"
-									:orderId="order.orderId"
-									:rechargeGoods="order.rechargeGoods"
-									:userId="order.userId"
-									:secondHandOrderFlag="order.secondHandOrderFlag"
-									@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-share-popup :orderId="btnoRderID" :shareType="isShareType" v-if="isShareModal" @shareConfirm="onShareAppMessage" />
+		<cm-share-popup
+			:shopOrderId="handleShopOrderId"
+			:shareType="isShareType"
+			v-if="isShareModal"
+			@shareConfirm="onShareAppMessage"
+		/>
 		<!-- 透明模态层 -->
 		<modal-layer v-if="isModalLayer"></modal-layer>
 		<view class="aganBj" v-show="showAgan">
@@ -269,8 +277,8 @@
 					</view>
 				</view>
 				<view class="BtnAll">
-					<view class="closebtn btn" @click="closeBtn">取消</view>
-					<view class="cancel btn" @click="cancelBtn">确定</view>
+					<view class="closebtn btn" @click="showAgan = false">取消</view>
+					<view class="cancel btn" @click="handleAddAgian">确定</view>
 				</view>
 			</view>
 		</view>
@@ -281,6 +289,17 @@
 			:rightDrawer="rightDrawer"
 			@handSearchConfirm="handSearchConfirmData"
 		/>
+		<!-- 提示弹窗 -->
+		<tui-modal
+			:show="modal"
+			@click="handleClick"
+			:content="contentModalText"
+			:button="modalButton"
+			color="#333"
+			:size="32"
+			shape="circle"
+			:maskClosable="false"
+		/>
 	</view>
 </template>
 
@@ -293,8 +312,10 @@ import empty from '@/components/empty'
 import cmListButton from './components/cm-list-button' //操作按钮
 import cmSharePopup from './components/cm-share-popup' //分享弹窗
 import cmOrderDrawer from '../components/cm-order-drawer' //筛选抽屉
+import orderMixins from './mixins/orderMixins.js'
 
 export default {
+	mixins: [orderMixins],
 	components: {
 		headerBack,
 		empty,
@@ -332,20 +353,20 @@ export default {
 			currentTab: 0, //预设当前项的值
 			screenTab: 0, //筛选预设当前项的值
 			scrollLeft: 0, //tab标题的滚动条位置
-			serviceProviderId: 0, //协销用户ID
 			orderData: [],
-			btnClubUserID: 0,
-			btnoRderID: 0, //点击按钮传入的的订单ID
-			pageNum: 1, //页数
-			pageSize: 10, //条数
-			groupServiceId: 0,
+			listQuery: {
+				pageNum: 1, //页数
+				pageSize: 10, //条数
+				groupServiceId: 0,
+				serviceProviderId: 0, //协销用户ID
+				listType: 0,
+				orderSubmitType: 0
+			},
 			scrollTop: 0,
-			deteleType: '',
 			skeletonShow: true,
 			isClickChange: false,
 			isShareModal: false, //控制分享弹窗
 			isShareType: 2,
-			isSeller: false,
 			isModalLayer: false,
 			loadding: false,
 			pullUpOn: true,
@@ -356,32 +377,19 @@ export default {
 			showAgan: false,
 			failList: [], // 再来一单可购买商品
 			promptitle: '',
-			aganOrderId: 0, // 再来一单商品id
 			userId: 0,
 			manager: 0,
-			rightDrawer: false //控制筛选抽屉
+			rightDrawer: false ,//控制筛选抽屉
+			
 		}
 	},
 	onLoad(option) {
-		let self = this
 		if (option.type === 'detele') {
-			self.isDelete = true
-		}
-		self.currentTab = option.listType
-		self.getHeaderTopHeight() //设置自定义导航高度
-		//  高度自适应
-		uni.getSystemInfo({
-			success: function(res) {
-				let calc = res.windowHeight
-				self.winHeight = calc - self.CustomBar - 82
-			}
-		})
-	},
-	filters: {
-		NumFormat(value) {
-			//处理金额
-			return Number(value).toFixed(2)
+			this.isDelete = true
 		}
+		this.currentTab = option.listType
+		this.getHeaderTopHeight() //设置自定义导航高度
+		this.initGetStotage()
 	},
 	computed: {
 		...mapState(['isManage'])
@@ -391,6 +399,7 @@ export default {
 			const userInfo = await this.$api.getStorage()
 			this.userId = userInfo.userId ? userInfo.userId : 0
 			this.manager = userInfo.manager ? userInfo.manager : 0
+			this.listQuery.serviceProviderId = userInfo.serviceProviderId
 			this.getOrderDatainit(this.currentTab)
 		},
 		// 滚动切换标签样式
@@ -403,8 +412,8 @@ export default {
 			}
 			this.isClickChange = false
 			this.currentTab = index
+			this.listQuery.listType = index
 			this.checkCor()
-			this.pageNum = 1
 			this.pullUpOn = true //切换时隐藏
 			this.loadding = false //切换时隐藏
 			this.nomoreText = ''
@@ -418,7 +427,7 @@ export default {
 			} else {
 				this.isClickChange = true
 				this.currentTab = tabIndex
-				this.pageNum = 1
+				this.listQuery.listType = tabIndex
 				this.pullUpOn = true //切换时隐藏
 				this.loadding = false //切换时隐藏
 				this.getOrderDatainit(this.currentTab)
@@ -426,7 +435,7 @@ export default {
 		},
 		onClickScreenTab(index) {
 			this.screenTab = index
-			this.pageNum = 1
+			this.listQuery.orderSubmitType = index
 			this.pullUpOn = true //切换时隐藏
 			this.loadding = false //切换时隐藏
 			this.nomoreText = ''
@@ -441,94 +450,101 @@ export default {
 				this.scrollLeft = 0
 			}
 		},
-		getOrderDatainit(index, source) {
-			setTimeout(() => {
-				this.skeletonShow = false
-			}, 1500)
-			let orderItem = this.orderTabBar[index]
-			let listType = orderItem.listType
-			if (source === 'tabChange' && orderItem.loaded === true) {
-				//tab切换只有第一次需要加载数据
-				return
-			}
-			setTimeout(() => {
-				this.$api.getStorage().then(resolve => {
-					this.serviceProviderId = resolve.serviceProviderId
-					this.SellerService.GetSellerOrderList({
-						listType: index,
-						orderSubmitType: this.screenTab,
-						serviceProviderId: this.serviceProviderId,
-						pageNum: 1,
-						pageSize: this.pageSize,
-						groupServiceId: this.groupServiceId
+		async getOrderDatainit(index, source) {
+			try {
+				this.listQuery.pageNum = 1
+				let orderItem = this.orderTabBar[index]
+				if (source === 'tabChange' && orderItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return
+				}
+				//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
+				const res = await this.SellerService.GetSellerOrderList(this.listQuery) 
+				const data = res.data
+				if (data.list && data.list.length > 0) {
+					orderItem.orderList = []
+					data.list.forEach(item => { 
+						orderItem.orderList.push(item)
 					})
-						.then(response => {
-							let data = response.data
-							if (data.list && data.list.length > 0) {
-								let orderList = data.list.filter(item => {
-									//添加不同状态下订单的表现形式
-									item = Object.assign(item, this.StateExpFormat(item.listType))
-									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 = '已至底部'
-									}
-								}
-							}else{
-								orderItem.orderList = []
-							}
-						})
-						.catch(error => {
-							this.$util.msg(error.msg, 2000)
-						})
-				})
-			}, 600)
-		},
-		getOnReachBottomData(index) {
-			//上拉加载
-			this.SellerService.GetSellerOrderList({
-				listType: index,
-				orderSubmitType: this.screenTab,
-				serviceProviderId: this.serviceProviderId,
-				pageNum: (this.pageNum += 1),
-				pageSize: this.pageSize,
-				groupServiceId: this.groupServiceId
-			})
-				.then(response => {
-					let orderItem = this.orderTabBar[index]
-					let data = response.data
 					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 = '已至底部'
+						if (orderItem.orderList.length < 2) {
+							this.pullUpOn = true
+						} else {
+							this.pullUpOn = false
+							this.nomoreText = '已至底部'
+						}
 					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+				} else {
+					this.$set(orderItem, 'loaded', true)
+					orderItem.orderList = []
+				}
+				this.skeletonShow = false
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//上拉加载
+		async getOnReachBottomData(index) {
+			try {
+				this.listQuery.pageNum += 1
+				const res = await this.SellerService.GetSellerOrderList(this.listQuery)
+				const data = res.data
+				const orderItem = this.orderTabBar[index]
+				orderItem.orderList = orderItem.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) {
+			console.log('data',data)
+			this.handleShopOrderId = data.shopOrderId
+			switch (data.type) {
+				case 'cancel': //取消订单
+					this.modal = true
+					this.contentModalText = '确认取消该订单吗?'
+					this.handleModelEven = 1
+					break
+				case 'delete': //删除订单
+					this.modal = true
+					this.contentModalText = '确认删除该订单吗?'
+					this.handleModelEven = 2
+					break
+				case 'confirm': // 确认订单
+					this.modal = true
+					this.contentModalText = '确认此订单吗?'
+					this.handleModelEven = 3
+					break
+				case 'again':
+					this.handOrderAgain(data.shopOrderId)
+					break
+				case 'query':
+					this.isModalLayer = true
+					this.$api.navigateTo('/pages/user/order/order-logistics?shopOrderId=' + data.shopOrderId)
+					break
+			}
+		},
+		//确定筛选
+		handSearchConfirmData(data) {
+			this.listQuery.groupServiceId = data.serviceProviderId
+			this.getOrderDatainit(this.currentTab)
 		},
 		scrolltolower() {
 			if (this.hasNextPage) {
@@ -540,161 +556,24 @@ export default {
 		detail(order) {
 			//订单详情跳转
 			this.isModalLayer = true
-			if(this.screenTab === 3){
+			if (this.screenTab === 3) {
 				this.$api.navigateTo(
-					`/pages/seller/order/order-club-details?listType=${this.currentTab}&orderId=${order.orderId}&userId=${
-						order.userId
-					}`
+					`/pages/seller/order/order-club-details?listType=${this.currentTab}&shopOrderId=${
+						order.shopOrderId
+					}&userId=${order.userId}`
 				)
-			}else{
+			} else {
 				this.$api.navigateTo(
-					`/pages/seller/order/order-details?listType=${this.currentTab}&orderId=${order.orderId}&userId=${
-						order.userId
-					}`
+					`/pages/seller/order/order-details?listType=${this.currentTab}&shopOrderId=${
+						order.shopOrderId
+					}&userId=${order.userId}`
 				)
 			}
 		},
-		handButtonConfirm(data) {
-			//获取点击
-			this.handShowAlert(data)
-			this.btnoRderID = data.orderId
-		},
-		handShowAlert(data) {
-			//执行
-			console.log(data)
-			switch (data.type) {
-				case 'query':
-					this.isModalLayer = true
-					this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
-					break
-				case 'delete':
-					this.handOrderDetele(data.orderId)
-					break
-				case 'cancel':
-					this.handCenceConfirm(data.orderId)
-					break
-				case 'confirm':
-					this.handOrderConfirm(data.orderId)
-					break
-				case 'again':
-					this.handOrderAgain(data.orderId)
-					break
-			}
-		},
-		handOrderAgain(orderId) {
-			this.aganOrderId = orderId
-			this.SellerService.SellerCreateOrderAgain({
-				confirmFlag: 0,
-				orderId: this.aganOrderId,
-				serviceProviderId: this.serviceProviderId
-			})
-				.then(res => {
-					if (res.code == 0) {
-						this.$api.setStorage('orderUserInfo', {
-							clubId: res.data.clubId,
-							againBuyProductIds: res.data.productIds,
-							userId: res.data.userId
-						})
-						this.$api.navigateTo('/pages/seller/cart/cart')
-					}
-				})
-				.catch(error => {
-					if (error.code == -3) {
-						this.showAgan = true
-						this.promptitle = error.msg
-						this.failList = error.data
-					} else if (error.code == -2) {
-						this.$util.modal('', error.msg, '确定', '', false, () => {})
-					} else {
-						this.$util.msg(error.msg, 2000)
-					}
-				})
-		},
-		closeBtn() {
-			//
-			this.showAgan = false
-		},
-		cancelBtn() {
-			// 再来一单弹窗
-			this.SellerService.SellerCreateOrderAgain({
-				serviceProviderId: this.serviceProviderId,
-				orderId: this.aganOrderId,
-				confirmFlag: 1
-			}).then(res => {
-				if (res.code == 0) {
-					this.$api.navigateTo('/pages/seller/cart/cart')
-					this.showAgan = false
-				}
-			})
-		},
-		handOrderConfirm(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)
-					})
-			})
-		},
-		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)
-					})
-			})
-		},
-		handCenceConfirm(orderId) {
-			//取消订单
-			this.$util.modal('提示', '确认取消该订单吗?', '确定', '取消', true, () => {
-				this.OrderService.CancelOrder({ orderId: orderId ,userIdentity : 1 })
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						setTimeout(() => {
-							this.getOrderDatainit(this.currentTab)
-						}, 2000)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
-		},
-		handSearchConfirmData(data) {
-			//确定筛选
-			this.groupServiceId = data.serviceProviderId
-			this.getOrderDatainit(this.currentTab)
-		},
 		handlSearchPath() {
 			this.$api.navigateTo('/pages/seller/order/search-order')
 		},
-		onShareAppMessage(res) {
-			//分享转发
-			this.isShareModal = false
-			if (res.from === 'button') {
-				// 来自页面内转发按钮
-				// console.log(res.target)
-			}
-			return {
-				title: '您有新的订单,请点击查看~',
-				path: `/pages/user/order/order-sharelogin?orderId=${this.btnoRderID}&userId=${
-					this.btnClubUserID
-				}&serviceProviderId=${this.serviceProviderId}`,
-				imageUrl: 'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
-			}
-		},
+		
 		PromotionsFormat(promo) {
 			//促销活动类型数据处理
 			if (promo != null) {
@@ -711,11 +590,10 @@ export default {
 			let stateText = '',
 				stateTextObject = {
 					0: '待确认',
-					4: '交易完成',
-					5: '订单完成',
-					6: '已关闭',
-					7: '交易全退',
-					77: '交易全退',
+					2: '交易完成',
+					4: '已关闭',
+					5: '交易全退',
+					6: '交易全退',
 					11: '待付款待发货',
 					12: '待付款部分发货',
 					13: '待付款已发货',
@@ -724,8 +602,7 @@ export default {
 					23: '部分付款已发货',
 					31: '已付款待发货',
 					32: '已付款部分发货',
-					33: '已付款已发货',
-					111: '待付款待发货'
+					33: '已付款已发货'
 				}
 			Object.keys(stateTextObject).forEach(key => {
 				if (key == state) {
@@ -741,6 +618,7 @@ export default {
 		},
 		getHeaderTopHeight() {
 			// 状态栏高度
+			let self = this
 			let statusBarHeight = this.systeminfo.statusBarHeight
 			let headerPosi = this.headerBtnPosi
 			let btnPosi = {
@@ -755,6 +633,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 - 82
+				}
+			})
 		},
 		setHeaderBtnPosi() {
 			// 获得胶囊按钮位置信息
@@ -777,7 +662,6 @@ export default {
 	},
 	onShow() {
 		this.isModalLayer = false
-		this.initGetStotage()
 	}
 }
 </script>
@@ -933,69 +817,34 @@ page {
 			height: 50rpx;
 			display: block;
 			position: absolute;
-			right: 0;
-			top: 9rpx;
-		}
-		.bage-buss {
-			display: inline-block;
-			width: 72rpx;
-			height: 30rpx;
-			background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
-			border-radius: 4rpx;
-			line-height: 30rpx;
-			font-size: $font-size-22;
-			text-align: center;
-			color: #ffffff;
-		}
-		.bage-auto {
-			display: inline-block;
-			width: 72rpx;
-			height: 30rpx;
-			background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
-			border-radius: 4rpx;
-			line-height: 30rpx;
-			font-size: $font-size-22;
-			text-align: center;
-			color: #ffffff;
+			right: 110rpx;
+			top: 12rpx;
 		}
-		.Rebate {
+		.bage{
 			display: inline-block;
 			width: 72rpx;
 			height: 32rpx;
-			background: #ff7a51;
-			border-radius: 6rpx;
+			margin: 19rpx 10rpx 0 10rpx;
+			border-radius: 4rpx;
 			line-height: 32rpx;
+			font-size: $font-size-22;
 			text-align: center;
 			color: #ffffff;
-			margin-top: 10rpx;
-			font-size: $font-size-22;
-			margin-right: 20rpx;
-		}
-		.bage-text {
-			display: inline-block;
-			font-size: $font-size-28;
-			line-height: 68rpx;
-			text-align: left;
-			color: $text-color;
-			margin-left: 10rpx;
-		}
-	}
-	.order-title-b {
-		width: 100%;
-		height: 40rpx;
-		float: left;
-		margin-top: 8rpx;
-		.order-title-btxt {
-			float: left;
-			font-size: $font-size-28;
-			line-height: 40rpx;
-			color: #999999;
-			text-align: lef;
+			float: right;
+			&.buss{
+				background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
+			}
+			&.auto{
+				background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
+			}
+			&.ebate{
+				background: #ff7a51;
+			}
 		}
 		.order-title-tip {
-			float: right;
+			float: left;
 			font-size: $font-size-28;
-			line-height: 40rpx;
+			line-height: 68rpx;
 			text-align: right;
 			color: #ff2a2a;
 		}

+ 243 - 425
pages/seller/order/search-order.vue

@@ -1,6 +1,5 @@
 <template>
 	<view class="search-container">
-		<!-- <or-search :theme="themeClass" @getSearchText="getSearchText"></or-search> -->
 		<view class="search-main">
 			<view class="search">
 				<view class="search-input">
@@ -64,13 +63,16 @@
 									<text class="tags sv" v-if="order.svipUserFlag == 1">SVIP</text>
 								</view>
 								<view class="order-title-t">
+									<view class="order-title-tip tui-skeleton-fillet">
+										{{ order.status | statusFilters }}
+									</view>
 									<text
-										class="bage-buss tui-skeleton-fillet"
+										class="bage buss tui-skeleton-fillet"
 										v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4"
 										>协销</text
 									>
 									<text
-										class="bage-auto tui-skeleton-fillet"
+										class="bage auto tui-skeleton-fillet"
 										v-if="
 											order.orderSubmitType == 0 ||
 												order.orderSubmitType == 1 ||
@@ -79,9 +81,6 @@
 									>
 										自主
 									</text>
-									<text class="bage-text tui-skeleton-fillet">
-										订单号:{{ order.orderNo }}({{ order.orderId }})
-									</text>
 									<image
 										class="bage-icon"
 										src="https://static.caimei365.com/app/img/icon/icon-type@3x.png"
@@ -90,102 +89,92 @@
 									>
 									</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 class="goods-title">
+								<view v-if="order.shopPromotion" class="floor-item-act">
+									<view class="floor-tags">{{ order.shopPromotion.name }}</view>
 								</view>
+								<view class="title-text tui-skeleton-fillet">{{ order.shopName }}</view>
 							</view>
-							<block v-for="(shop, index) in order.shopOrderList" :key="index">
-								<view class="goods-title">
-									<view v-if="shop.shopPromotion" class="floor-item-act">
-										<view class="floor-tags">{{ shop.shopPromotion.name }}</view>
+							<view
+								class="goods-item"
+								v-for="(pros, prosIndex) in order.orderProductList"
+								:key="prosIndex"
+							>
+								<view class="goods-pros-t">
+									<view class="pros-img tui-skeleton-fillet">
+										<image :src="pros.image" alt="" />
+										<text class="tips" v-if="pros.productType == 2 || pros.productType == 1"
+											>赠品</text
+										>
 									</view>
-									<view class="title-text tui-skeleton-fillet">{{ shop.shopName }}</view>
-								</view>
-								<view
-									class="goods-item"
-									v-for="(pros, prosIndex) in shop.orderProductList"
-									:key="prosIndex"
-								>
-									<view class="goods-pros-t">
-										<view class="pros-img tui-skeleton-fillet">
-											<image :src="pros.image" alt="" />
-											<text class="tips" v-if="pros.productType == 2 || pros.productType == 1"
-												>赠品</text
-											>
-										</view>
-										<view class="pros-product clearfix">
-											<view class="producttitle tui-skeleton-fillet">{{ pros.name }}</view>
+									<view class="pros-product clearfix">
+										<view class="producttitle tui-skeleton-fillet">{{ pros.name }}</view>
+										<view
+											class="productspec tui-skeleton-fillet"
+											v-if="pros.productCategory != 2"
+											>规格:{{ pros.productUnit }}</view
+										>
+										<view class="productprice">
 											<view
-												class="productspec tui-skeleton-fillet"
-												v-if="pros.productCategory != 2"
-												>规格:{{ pros.productUnit }}</view
+												class="price tui-skeleton-fillet"
+												:class="
+													pros.svipPriceFlag == 1 ||
+													PromotionsFormat(pros.productPromotion)
+														? 'none'
+														: ''
+												"
 											>
-											<view class="productprice">
+												<text>¥{{ pros.price | NumFormat }}</text>
+											</view>
+											<view class="count tui-skeleton-fillet">
+												<text class="small">x</text>{{ pros.num }}
+											</view>
+										</view>
+										<view class="floor-item-act">
+											<template v-if="pros.productPromotion">
 												<view
-													class="price tui-skeleton-fillet"
-													:class="
-														pros.svipPriceFlag == 1 ||
-														PromotionsFormat(pros.productPromotion)
-															? 'none'
-															: ''
-													"
+													v-if="PromotionsFormat(pros.productPromotion)"
+													class="floor-tags"
+													@click.stop="clickPopupShow(pros.productPromotion)"
 												>
-													<text>¥{{ pros.price | NumFormat }}</text>
+													{{ pros.productPromotion.name }}
+													<text
+														v-if="
+															pros.productPromotion != null &&
+																pros.productPromotion.type != 3
+														"
+													>
+														:¥{{
+															pros.productPromotion == null
+																? '0.00'
+																: pros.productPromotion.touchPrice | NumFormat
+														}}
+													</text>
 												</view>
-												<view class="count tui-skeleton-fillet">
-													<text class="small">x</text>{{ pros.num }}
+												<view
+													v-else-if="pros.productPromotion.type != 3"
+													class="floor-tags"
+													@click.stop="clickPopupShow(pros.productPromotion)"
+													>{{ pros.productPromotion.name }}</view
+												>
+											</template>
+											<template v-if="pros.svipPriceFlag == 1">
+												<view class="svip-tags">
+													<view class="tags">SVIP</view>
+													<view class="price">{{ pros.svipPriceTag }}</view>
 												</view>
-											</view>
-											<view class="floor-item-act">
-												<template v-if="pros.productPromotion">
-													<view
-														v-if="PromotionsFormat(pros.productPromotion)"
-														class="floor-tags"
-														@click.stop="clickPopupShow(pros.productPromotion)"
-													>
-														{{ pros.productPromotion.name }}
-														<text
-															v-if="
-																pros.productPromotion != null &&
-																	pros.productPromotion.type != 3
-															"
-														>
-															:¥{{
-																pros.productPromotion == null
-																	? '0.00'
-																	: pros.productPromotion.touchPrice | NumFormat
-															}}
-														</text>
-													</view>
-													<view
-														v-else-if="pros.productPromotion.type != 3"
-														class="floor-tags"
-														@click.stop="clickPopupShow(pros.productPromotion)"
-														>{{ pros.productPromotion.name }}</view
-													>
-												</template>
-												<template v-if="pros.svipPriceFlag == 1">
-													<view class="svip-tags">
-														<view class="tags">SVIP</view>
-														<view class="price">{{ pros.svipPriceTag }}</view>
-													</view>
-												</template>
-											</view>
+											</template>
 										</view>
 									</view>
 								</view>
-							</block>
+							</view>
 							<view class="order-footer">
-								<view class="order-footer-top" v-if="order.discountFee != 0"
+								<!-- <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="count tui-skeleton-fillet">共{{ order.itemCount }}件商品</view>
 									<view
 										class="money tui-skeleton-fillet"
 										v-if="order.status == 31 || order.status == 32 || order.status == 33"
@@ -196,7 +185,7 @@
 									</view>
 									<view class="money tui-skeleton-fillet" v-else>
 										待付总额:<label style="color:#f94b4b ;"
-											>¥{{ order.pendingPayments | NumFormat }}</label
+											>¥{{ order.obligation | NumFormat }}</label
 										>
 									</view>
 								</view>
@@ -204,26 +193,30 @@
 							<!-- 底部button -->
 							<cm-list-button
 								ref="orderButton"
+								:order="order"
 								:status="order.status"
-								:rechargeGoods="order.rechargeGoods"
-								:orderId="order.orderId"
 								:userId="order.userId"
+								:shopOrderId="order.shopOrderId"
+								:rechargeGoods="order.rechargeGoods"
 								:secondHandOrderFlag="order.secondHandOrderFlag"
 								@buttonConfirm="handButtonConfirm"
 							/>
 						</view>
 						<!--加载loadding-->
-						<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
-						<tui-nomore :visible="!pullUpOn" :backgroundColor="'#ffffff'" :text="nomoreText"></tui-nomore>
+						<tui-loadmore :visible="loadding" :index="3" type="black"/>
+						<tui-nomore :visible="!pullUpOn" :backgroundColor="'#ffffff'" :text="nomoreText"/>
 						<!--加载loadding-->
 					</view>
 				</view>
 			</scroll-view>
 		</view>
 		<!-- 分享弹窗 -->
-		<cm-share-popup :orderId="btnoRderID" :shareType="isShareType" v-if="isShareModal" @shareConfirm="onShareAppMessage" />
-		<!-- 透明模态层 -->
-		<modal-layer v-if="isModalLayer"></modal-layer>
+		<cm-share-popup
+			:shopOrderId="handleShopOrderId"
+			:shareType="isShareType"
+			v-if="isShareModal"
+			@shareConfirm="onShareAppMessage"
+		/>
 		<!-- 再来一单弹窗 -->
 		<view class="aganBj" v-show="showAgan">
 			<view class="alertAgan">
@@ -235,20 +228,34 @@
 					</view>
 				</view>
 				<view class="BtnAll">
-					<view class="closebtn btn" @click="closeBtn">取消</view>
-					<view class="cancel btn" @click="cancelBtn">确定</view>
+					<view class="closebtn btn" @click="showAgan = false">取消</view>
+					<view class="cancel btn" @click="handleAddAgian">确定</view>
 				</view>
 			</view>
 		</view>
+		<!-- 提示弹窗 -->
+		<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>
 	</view>
 </template>
 
 <script>
-import orSearch from '@/components/uni-search/or-search.vue'
 import modalLayer from '@/components/modal-layer'
 import empty from '@/components/empty'
-import cmListButton from './components/cm-list-button' //操作按钮
+import cmListButton from './components/cm-list-button' //操作按钮 
 import cmSharePopup from './components/cm-share-popup' //分享弹窗
+import orderMixins from './mixins/orderMixins.js'
+
 const defaultListQuery = {
 	pageNum: 1, // 页码
 	pageSize: 10, // 每页条数
@@ -256,8 +263,8 @@ const defaultListQuery = {
 	searchWord: '' // 搜索关键词
 }
 export default {
+	mixins: [orderMixins],
 	components: {
-		orSearch,
 		empty,
 		cmListButton,
 		cmSharePopup,
@@ -276,8 +283,6 @@ export default {
 			showSkeleton: true,
 			userId: 0,
 			orderList: [],
-			btnClubUserID: 0,
-			btnoRderID: 0, //点击按钮传入的的订单ID
 			scrollTop: 0,
 			deteleType: '',
 			skeletonShow: true,
@@ -294,19 +299,12 @@ export default {
 			scrollHeight: '',
 			showAgan: false,
 			failList: [], // 再来一单可购买商品
-			promptitle: '',
-			aganOrderId: 0
+			promptitle: ''
 		}
 	},
 	onLoad() {
 		this.initGetSerachRecord()
 	},
-	filters: {
-		NumFormat(value) {
-			//处理金额
-			return Number(value).toFixed(2)
-		}
-	},
 	methods: {
 		subMitSearch() {
 			if (this.listQuery.searchWord == '') {
@@ -317,21 +315,127 @@ export default {
 			}
 		},
 		async initGetSerachRecord() {
-			const userInfo = await this.$api.getStorage()
-			this.listQuery.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
-			this.userId = userInfo.userId ? userInfo.userId : 0
-			this.OrderService.SearchOrderHistory({ userId: this.userId })
-				.then(response => {
-					this.serachRecordList = response.data
-					if (this.serachRecordList.length > 0) {
-						this.isSearchHistory = true
+			try{
+				const userInfo = await this.$api.getStorage()
+				this.listQuery.serviceProviderId = userInfo.serviceProviderId
+				this.userId = userInfo.userId
+				const res = await this.OrderService.SearchOrderHistory({ userId: this.userId })
+				const data = res.data
+				this.serachRecordList = data
+				if (this.serachRecordList.length > 0) {
+					this.isSearchHistory = true
+				} else {
+					this.isSearchHistory = false
+				}
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//清空历史记录
+		async confirmDetele() {
+			try{
+				const res = await this.OrderService.ClearOrderHistory({ userId: this.userId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				this.serachRecordList = []
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		// 搜索订单列表
+		async getOrderDatainit() {
+			try{
+				const res = await this.SellerService.getSellerSearchOrderList(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.isSearchHistory = false
+						if (this.orderList.length < 2) {
+							this.pullUpOn = true
+						} else {
+							this.pullUpOn = false
+							this.nomoreText = '已至底部'
+						}
 					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+					this.isShowWrapper = true
+					this.showSkeleton = true
+					this.isShowEmpty = false
+				} else {
+					this.isShowEmpty = true
+				}
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//上拉加载
+		async getOnReachBottomData() {
+			try{
+				this.listQuery.pageNum += 1
+				const res = await this.SellerService.getSellerSearchOrderList(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.handleShopOrderId = data.shopOrderId
+			switch (data.type) {
+				case 'cancel': //取消订单
+					this.modal = true
+					this.contentModalText = '确认取消该订单吗?'
+					this.handleModelEven = 1
+					break
+				case 'delete': //删除订单
+					this.modal = true
+					this.contentModalText = '确认删除该订单吗?'
+					this.handleModelEven = 2
+					break
+				case 'confirm': // 确认订单
+					this.modal = true
+					this.contentModalText = '确认此订单吗?'
+					this.handleModelEven = 3
+					break
+				case 'again':
+					this.handOrderAgain(data.shopOrderId)
+					break
+				case 'query':
+					this.isModalLayer = true
+					this.$api.navigateTo('/pages/user/order/order-logistics?shopOrderId=' + data.shopOrderId)
+					break
+			}
+		},
+		scrolltolower() {
+			if (this.hasNextPage) {
+				this.loadding = true
+				this.pullUpOn = true
+				this.showSkeleton = false
+				this.getOnReachBottomData()
+			}
+		},
+		detail(order) {
+			//订单详情跳转
+			this.isModalLayer = true
+			this.$api.navigateTo(
+				`/pages/seller/order/order-details?type=seacrch&shopOrderId=${order.shopOrderId}&userId=${order.userId}`
+			)
 		},
 		onShowClose() {
 			//输入框失去焦点时触发
@@ -356,19 +460,6 @@ export default {
 			this.isShowClose = true
 			this.subMitSearch()
 		},
-		confirmDetele() {
-			//清空历史记录
-			this.$util.modal('提示', '确定删除历史记录?', '确定', '取消', true, () => {
-				this.OrderService.ClearOrderHistory({ userId: this.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 != '') {
@@ -377,223 +468,7 @@ export default {
 				this.isShowClose = false
 			}
 		},
-		getOrderDatainit(index, source) {
-			/**
-			 * @订单初始化加载  仅加载第一页码
-			 * @param:searchWord(关键词)
-			 * @param:serviceProviderId(用户ID)
-			 * @param:pageNum(页码数)
-			 * @param:listQuery.pageSize(每页条数)
-			 * @param:organizeID(全局变量组织ID)
-			 */
-
-			this.SellerService.getSellerOrderList(this.listQuery)
-				.then(response => {
-					this.isShowWrapper = true
-					this.showSkeleton = true
-					let data = response.data
-					if (data.list && data.list.length > 0) {
-						let filrerData = data.list.filter(item => {
-							//添加不同状态下订单的表现形式
-							item = Object.assign(item, this.StateExpFormat(item.state))
-							return item
-						})
-						this.orderList = []
-						filrerData.forEach(item => {
-							this.orderList.push(item)
-						})
-						this.hasNextPage = data.hasNextPage
-						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(index) {
-			//上拉加载
-			this.listQuery.pageNum += 1
-			this.SellerService.getSellerOrderList(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)
-					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)
-				})
-		},
-		scrolltolower() {
-			if (this.hasNextPage) {
-				this.loadding = true
-				this.pullUpOn = true
-				this.showSkeleton = false
-				this.getOnReachBottomData()
-			}
-		},
-		detail(order) {
-			//订单详情跳转
-			this.isModalLayer = true
-			this.$api.navigateTo(
-				`/pages/seller/order/order-details?type=seacrch&orderId=${order.orderId}&userId=${order.userId}`
-			)
-		},
-		handButtonConfirm(data) {
-			//获取点击
-			this.handShowAlert(data)
-			this.btnoRderID = data.orderId
-		},
-		handShowAlert(data) {
-			//执行
-			switch (data.type) {
-				case 'query':
-					this.isModalLayer = true
-					this.$api.navigateTo('/pages/user/order/order-logistics?orderID=' + data.orderId)
-					break
-				case 'delete':
-					this.handOrderDetele(data.orderId)
-					break
-				case 'cancel':
-					this.handCenceConfirm(data.orderId)
-					break
-				case 'confirm':
-					this.handOrderConfirm(data.orderId)
-					break
-				case 'again':
-					this.handOrderAgain(data.orderId)
-			}
-		},
-		handOrderAgain(orderId) {
-			// 再来一单
-			this.aganOrderId = orderId
-			this.SellerService.SellerCreateOrderAgain({
-				confirmFlag: 0,
-				orderId: this.aganOrderId,
-				serviceProviderId: this.listQuery.serviceProviderId
-			})
-				.then(res => {
-					if (res.code == 0) {
-						this.$api.setStorage('orderUserInfo', {
-							clubId: res.data.clubId,
-							againBuyProductIds: res.data.againBuyProductIds,
-							userId: res.data.userId
-						})
-						this.$api.navigateTo('/pages/seller/cart/cart')
-					}
-				})
-				.catch(error => {
-					if (error.code == -3) {
-						this.showAgan = true
-						this.promptitle = error.msg
-						this.failList = error.data
-					} else if (error.code == -2) {
-						this.$util.modal('', error.msg, '确定', '', false, () => {})
-					} else {
-						this.$util.msg(error.msg, 2000)
-					}
-				})
-		},
-		closeBtn() {
-			//
-			this.showAgan = false
-		},
-		cancelBtn() {
-			// 再来一单弹窗
-			this.SellerService.SellerCreateOrderAgain({
-				serviceProviderId: this.listQuery.serviceProviderId,
-				orderId: this.aganOrderId,
-				confirmFlag: 1
-			}).then(res => {
-				if (res.code == 0) {
-					this.$api.navigateTo('/pages/seller/cart/cart')
-					this.showAgan = false
-				}
-			})
-		},
-		handOrderConfirm(orderId) {
-			//确认订单
-			this.$util.modal('提示', '确认此订单?', '确定', '取消', true, () => {
-				this.OrderService.AffirmOrder({ orderId: orderId })
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						setTimeout(() => {
-							this.getOrderDatainit()
-						}, 2000)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
-		},
-		handOrderDetele(orderId) {
-			//删除订单
-			this.$util.modal('提示', '确认删除该订单吗?', '确定', '取消', true, () => {
-				this.OrderService.DeleteOrder({ orderId: orderId })
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						setTimeout(() => {
-							this.getOrderDatainit()
-						}, 2000)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
-		},
-		handCenceConfirm(orderId) {
-			//取消订单
-			this.$util.modal('提示', '确认取消该订单吗?', '确定', '取消', true, () => {
-				this.OrderService.CancelOrder({ orderId: orderId , userIdentity : 1})
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						setTimeout(() => {
-							this.getOrderDatainit()
-						}, 2000)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
-		},
-		onShareAppMessage(res) {
-			//分享转发
-			this.isShareModal = false
-			if (res.from === 'button') {
-				// 来自页面内转发按钮
-			}
-			return {
-				title: '您有新的分享订单,快来查看吧~',
-				path: `/pages/user/order/order-sharelogin?orderId=${this.btnoRderID}&userId=${
-					this.btnClubUserID
-				}&serviceProviderId=${this.serviceProviderId}`,
-				imageUrl: 'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
-			}
-		},
+		
 		PromotionsFormat(promo) {
 			//促销活动类型数据处理
 			if (promo != null) {
@@ -605,38 +480,6 @@ export default {
 			}
 			return false
 		},
-		//订单状态文字和颜色
-		StateExpFormat(state) {
-			let stateText = '',
-				stateTextObject = {
-					4: '交易完成',
-					5: '订单完成',
-					6: '已关闭',
-					7: '交易全退',
-					77: '交易全退',
-					11: '待付款待发货',
-					12: '待付款部分发货',
-					13: '待付款已发货',
-					21: '部分付款待发货',
-					22: '部分付款部分发货',
-					23: '部分付款已发货',
-					31: '已付款待发货',
-					32: '已付款部分发货',
-					33: '已付款已发货',
-					111: '待付款待发货'
-				}
-			Object.keys(stateTextObject).forEach(key => {
-				if (key == state) {
-					stateText = stateTextObject[key]
-				}
-			})
-			return stateText
-		},
-		orderPriceToFixed(n) {
-			let price = ''
-			price = n.toFixed(2)
-			return price
-		},
 		setScrollHeight() {
 			const { windowHeight, pixelRatio } = wx.getSystemInfoSync()
 			this.windowHeight = windowHeight - 1
@@ -908,56 +751,31 @@ page {
 			height: 50rpx;
 			display: block;
 			position: absolute;
-			right: 0;
-			top: 9rpx;
-		}
-		.bage-buss {
-			display: inline-block;
-			width: 72rpx;
-			height: 30rpx;
-			background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
-			border-radius: 4rpx;
-			line-height: 30rpx;
-			font-size: $font-size-22;
-			text-align: center;
-			color: #ffffff;
+			right: 110rpx;
+			top: 12rpx;
 		}
-		.bage-auto {
+		.bage{
 			display: inline-block;
 			width: 72rpx;
-			height: 30rpx;
-			background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
+			height: 32rpx;
+			margin: 19rpx 10rpx 0 10rpx;
 			border-radius: 4rpx;
-			line-height: 30rpx;
+			line-height: 32rpx;
 			font-size: $font-size-22;
 			text-align: center;
 			color: #ffffff;
-		}
-		.bage-text {
-			display: inline-block;
-			font-size: $font-size-28;
-			line-height: 68rpx;
-			text-align: left;
-			color: $color-system;
-			margin-left: 10rpx;
-		}
-	}
-	.order-title-b {
-		width: 100%;
-		height: 40rpx;
-		float: left;
-		margin-top: 8rpx;
-		.order-title-btxt {
-			float: left;
-			font-size: $font-size-28;
-			line-height: 40rpx;
-			color: #999999;
-			text-align: lef;
+			float: right;
+			&.buss{
+				background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
+			}
+			&.auto{
+				background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
+			}
 		}
 		.order-title-tip {
-			float: right;
+			float: left;
 			font-size: $font-size-28;
-			line-height: 40rpx;
+			line-height: 68rpx;
 			text-align: right;
 			color: #ff2a2a;
 		}

+ 209 - 197
pages/user/order/components/cm-details-button.vue

@@ -1,235 +1,247 @@
 <template name="button">
-	<view class="button-template" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
+	<view class="button-template" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
 		<!-- 底部按钮 -->
 		<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-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-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 === 2" @click.stop="btnConfirm('upload', order)"
+				>上传凭证</view
+			>
 			<view class="btn btn-share" @click.stop="onShareCode">
-				<view class="tips" v-if="shareCode">分享码:{{shareCode}}</view>
-				分享订单
+				<view class="tips" v-if="shareCode">分享码:{{ shareCode }}</view> 分享订单
 			</view>
-			<view class="btn btn-cancel" v-if="btnState.isCancel" @click.stop="btnConfirm('cancel',order)">取消订单</view>
+			<view class="btn btn-cancel" v-if="btnState.isCancel" @click.stop="btnConfirm('cancel', order)"
+				>取消订单</view
+			>
 			<!-- <view class="btn btn-delete" v-if="btnState.isDelete" @click.stop="btnConfirm('delete',order)">删除订单</view> -->
-			<view class="btn btn-query" v-if="btnState.isQuery && order.secondHandOrderFlag!=1" @click.stop="btnConfirm('query',order)">查看物流</view>
-			<view class="btn btn-firm" v-if="btnState.isConfirm" @click.stop="btnConfirm('confirm',order)">
-				确认收货
-				<view class="tips">采美豆<text class="line"></text></view>
+			<view
+				class="btn btn-query"
+				v-if="btnState.isQuery && order.secondHandOrderFlag != 1"
+				@click.stop="btnConfirm('query', order)"
+				>查看物流</view
+			>
+			<view class="btn btn-firm" v-if="btnState.isConfirm" @click.stop="btnConfirm('confirm', order)">
+				确认收货 <view class="tips">采美豆<text class="line"></text></view>
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
-	export default{
-		name:'button',
-		props:{
-			status:{
-				type:Number
-			},
-			order: {
-				type:Object
-			},
-			shareCode:{
-				type:String
-			},
+export default {
+	name: 'button',
+	props: {
+		status: {
+			type: Number
 		},
-		watch:{
-			status:{
-				handler:function(val){
-					this.initData(val)
-				},
-				deep:true//对象内部的属性监听,也叫深度监听
-			}
+		order: {
+			type: Object
+		},
+		shareCode: {
+			type: String
+		}
+	},
+	watch: {
+		status: {
+			handler: function(val) {
+				this.initData(val)
+			},
+			deep: true //对象内部的属性监听,也叫深度监听
+		}
+	},
+	data() {
+		return {
+			btnState: this.initStatus(),
+			isIphoneX: this.$store.state.isIphoneX,
+			mapStateArr: [
+				{ label: 'isQuery', val: [2, 3, 5, 6, 12, 13, 22, 23, 32, 33], status: true },
+				{ label: 'isDelete', val: [4], status: true },
+				{ label: 'isCancel', val: [0, 11], status: true },
+				{ label: 'isConfirm', val: [33], status: true },
+				{ label: 'isConfirmation', val: [0], status: true },
+				{ label: 'isPay', val: [11, 12, 13, 21, 22, 23], status: true }
+			]
+		}
+	},
+	created() {
+		this.initData(this.status)
+	},
+	computed: {},
+	methods: {
+		initData(resVal) {
+			/**
+			 * @分享按钮统一显示
+			 * @按钮根据状态显示
+			 * @(4、5、7、12、22、23、32)显示[查看物流]按钮,其他隐藏
+			 * @(6)显示[删除订单],其他隐藏
+			 * @(0、111)显示[取消订单],其他隐藏
+			 * @(21,31)只显示分享
+			 * @(13,33)显示[确认收货]和[查看物流]
+			 */
+			this.btnState = this.initStatus()
+			this.mapStateArr.forEach(el => {
+				el.val.forEach(value => {
+					if (resVal === value) {
+						this.btnState[el.label] = el.status
+					}
+				})
+			})
 		},
-		data() {
-			return{
-				btnState:this.initStatus(),
-				isIphoneX:this.$store.state.isIphoneX,
-				mapStateArr:[
-					{label:'isQuery',val:[4,5,12,13,33,22,23,32,77],status: true},
-					{label:'isDelete',val:[6],status: true},
-					{label:'isCancel',val:[0,111],status: true},
-					{label:'isConfirm',val:[33],status: true},
-					{label:'isConfirmation',val:[0],status: true},
-					{label:'isPay',val:[11,12,13,21,22,23,111],status: true},
-				]
+		initStatus() {
+			let btnState = {
+				isQuery: false,
+				isDelete: false,
+				isCancel: false,
+				isConfirm: false,
+				isConfirmation: false
 			}
+			return btnState
 		},
-		created(){
-			this.initData(this.status)
+		getShareCode(code) {
+			this.shareCode = code
 		},
-		computed: {
-
+		onShareCode() {
+			this.$parent.isShareModal = true
+			this.$emit('shareConfirm')
 		},
-		methods:{
-			initData(resVal) {
-				/**
-				 * @分享按钮统一显示
-				 * @按钮根据状态显示
-				 * @(4、5、7、12、22、23、32)显示[查看物流]按钮,其他隐藏
-				 * @(6)显示[删除订单],其他隐藏
-				 * @(0、111)显示[取消订单],其他隐藏
-				 * @(21,31)只显示分享
-				 * @(13,33)显示[确认收货]和[查看物流]
-				 */
-				this.btnState = this.initStatus()
-				this.mapStateArr.forEach(el => {
-					el.val.forEach(value => {
-						if(resVal === value){
-							this.btnState[el.label] = el.status
-						}
-					})
-				})
-			},
-			initStatus(){
-				let btnState= {
-						isQuery: false,
-						isDelete: false,
-						isCancel: false,
-						isConfirm: false,
-						isConfirmation:false,
-					}
-				return 	btnState
-			},
-			getShareCode(code){
-				this.shareCode = code
-			},
-			onShareCode(){
-				this.$parent.isShareModal = true
-				this.$emit('shareConfirm')
-			},
-			btnConfirm(type,order){
-				let data = {
-						type:type,
-						orderId:order.orderId,
-						order:order
-					}
-				this.$emit('buttonConfirm',data)
+		btnConfirm(type, order) {
+			let data = {
+				type: type,
+				shopOrderId: order.shopOrderId,
+				order: order
 			}
+			this.$emit('buttonConfirm', data)
 		}
 	}
+}
 </script>
 
 <style lang="scss">
-	.button-template{
-		width: 100%;
+.button-template {
+	width: 100%;
+	height: auto;
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	background: #ffffff;
+	.button-content {
+		padding: 0 24rpx;
 		height: auto;
-		position: fixed;
-		bottom: 0;
-		left: 0;
-		background: #FFFFFF;
-		.button-content{
-			padding:0 24rpx;
-			height: auto;
+		float: right;
+		position: relative;
+		.share-code {
+			width: 200rpx;
+			height: 64rpx;
+			line-height: 64rpx;
+			color: #2a45ff;
+			text-align: left;
+			position: absolute;
+			font-size: $font-size-28;
+			font-weight: bold;
+			left: 24rpx;
+			top: 24rpx;
+		}
+		.btn {
+			width: 160rpx;
+			height: 64rpx;
+			margin: 22rpx 12rpx 22rpx 0;
+			line-height: 64rpx;
+			font-size: $font-size-26;
+			color: #666666;
+			text-align: center;
 			float: right;
-			position: relative;
-			.share-code{
-				width: 200rpx;
-				height:  64rpx;
-				line-height: 64rpx;
-				color: #2A45FF;
-				text-align: left;
-				position: absolute;
-				font-size: $font-size-28;
-				font-weight: bold;
-				left: 24rpx;
-				top: 24rpx;
-			}
-			.btn{
-				width: 160rpx;
-				height:  64rpx;
-				margin:22rpx 22rpx 22rpx 0;
-				line-height: 64rpx;
-				font-size:$font-size-26;
-				color: #666666;
-				text-align: center;
-				float: right;
-				border: 2rpx solid #999999;
-				border-radius: 34rpx;
-				&.btn-payment{
-					line-height: 38rpx;
-					font-size: 24rpx;
-					background: #f9a94b;
-					color: #fff;
-					border: 2rpx solid #f9a94b;
-					text{
-						display: block;
-						line-height: 15rpx;
-					}
-				}
-				&.btn-share{
-					position: relative;
+			border: 2rpx solid #999999;
+			border-radius: 34rpx;
+			&.btn-payment {
+				line-height: 38rpx;
+				font-size: 24rpx;
+				background: #f9a94b;
+				color: #fff;
+				border: 2rpx solid #f9a94b;
+				text {
+					display: block;
+					line-height: 15rpx;
 				}
 			}
-			.btn-confirm{
-				background:#ff7a51;
-				border-color:#ff7a51;
-				color: #FFFFFF;
-			}
-			.btn-pay{
-				background:#f94b4b;
-				margin-right: 0;
-				border: 2rpx solid #f94b4b;
-				color: #fff;
+			&.btn-share {
+				position: relative;
 			}
-			.btn-firm{
-				position:relative;
-				.tips{
-					width: 74rpx;
-					height: 32rpx;
-					line-height: 32rpx;
-					padding: 0 7rpx;
-					border-radius: 16rpx;
+		}
+		.btn-confirm {
+			background: #ff7a51;
+			border-color: #ff7a51;
+			color: #ffffff;
+		}
+		.btn-pay {
+			background: #f94b4b;
+			margin-right: 0;
+			border: 2rpx solid #f94b4b;
+			color: #fff;
+		}
+		.btn-firm {
+			position: relative;
+			.tips {
+				width: 74rpx;
+				height: 32rpx;
+				line-height: 32rpx;
+				padding: 0 7rpx;
+				border-radius: 16rpx;
+				background-color: #ffe6dc;
+				color: $color-system;
+				text-align: center;
+				font-size: $font-size-20;
+				position: absolute;
+				right: 0;
+				top: -40rpx;
+				z-index: 90;
+				.line {
+					display: block;
+					width: 20rpx;
+					height: 20rpx;
 					background-color: #ffe6dc;
-					color: $color-system;
-					text-align: center;
-					font-size: $font-size-20;
-					position:absolute;
-					right: 0;
-					top: -40rpx;
-					z-index: 90;
-					.line{
-						display: block;
-						width: 20rpx;
-						height: 20rpx;
-						background-color: #ffe6dc;
-						position: relative;
-						bottom: 18rpx;
-						left: 15rpx;
-						z-index: -1;
-						transform:rotate(45deg);
-					}
+					position: relative;
+					bottom: 18rpx;
+					left: 15rpx;
+					z-index: -1;
+					transform: rotate(45deg);
 				}
 			}
-			.btn-share{
-				.tips{
-					width: 160rpx;
-					height: 34rpx;
-					padding: 10rpx 10rpx;
-					background:#FF5B00;
-					border-radius: 8rpx;
+		}
+		.btn-share {
+			.tips {
+				width: 160rpx;
+				height: 34rpx;
+				padding: 10rpx 10rpx;
+				background: #ff5b00;
+				border-radius: 8rpx;
+				position: absolute;
+				color: #ffffff;
+				line-height: 34rpx;
+				font-size: $font-size-24;
+				text-align: left;
+				right: 0;
+				top: -65rpx;
+				&:before {
+					content: '';
+					width: 25rpx;
+					height: 25rpx;
+					background: #ff5b00;
 					position: absolute;
-					color: #FFFFFF;
-					line-height: 34rpx;
-					font-size: $font-size-24;
-					text-align: left;
-					right: 0;
-					top: -65rpx;
-					&:before{
-						content: "";
-						width: 25rpx;
-						height: 25rpx;
-						background:#FF5B00;
-						position: absolute;
-						bottom: -8rpx;
-						left: 30rpx;
-						z-index: -1;
-						transform:rotate(45deg);
-					}
+					bottom: -8rpx;
+					left: 30rpx;
+					z-index: -1;
+					transform: rotate(45deg);
 				}
 			}
 		}
 	}
+}
 </style>

+ 1 - 1
pages/user/order/components/cm-invice-popup.vue

@@ -270,7 +270,7 @@ export default {
 		//保存发票信息
 		async updateInvoiceFn() {
 			try {
-				const res = await this.OrderService.updateOrganize({ ...this.invoiceData,...{userId: this.userId }})
+				const res = await this.OrderService.UpdateInvoice({ ...this.invoiceData,...{userId: this.userId }})
 				this.invoiceText = this.setInvoiceText(this.invoiceData)
 				this.$emit('handleChoiceaInvoice', this.invoiceData)
 				this.popupShow = false

+ 10 - 11
pages/user/order/components/cm-list-button.vue

@@ -4,9 +4,9 @@
 		<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-cancel" v-if="order.checkFlag === 2" @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-share"  @click.stop="onShareCode(order)">分享订单</view>
 			<view class="btn btn-cancel" v-if="btnState.isCancel" @click.stop="btnConfirm('cancel',order)">取消订单</view>
 			<!-- <view class="btn btn-delete" v-if="btnState.isDelete" @click.stop="btnConfirm('delete',order)">删除订单</view> -->
 			<view class="btn btn-query" v-if="btnState.isQuery && order.secondHandOrderFlag!=1" @click.stop="btnConfirm('query',order)">查看物流</view>
@@ -35,12 +35,12 @@
 				shareCode:'',
 				btnState:this.initStatus(),
 				mapStateArr:[
-					{label:'isQuery',val:[4,5,12,13,33,22,23,32,77],status: true},
-					{label:'isDelete',val:[6],status: true},
-					{label:'isCancel',val:[0,111],status: true},
+					{label:'isQuery',val:[2,3,5,6,12,13,22,23,32,33],status: true},
+					{label:'isDelete',val:[4],status: true},
+					{label:'isCancel',val:[0,11],status: true},
 					{label:'isConfirm',val:[33],status: true},
 					{label:'isConfirmation',val:[0],status: true},
-					{label:'isPay',val:[11,12,13,21,22,23,111],status: true},
+					{label:'isPay',val:[11,12,13,21,22,23],status: true},
 				]
 			}
 		},
@@ -92,15 +92,14 @@
 			getShareCode(code){
 				this.shareCode = code
 			},
-			onShareCode(orderId){
+			onShareCode(order){
 				this.$parent.isShareModal = true
-				this.$parent.btnoRderID = orderId
-				this.$emit('shareConfirm')
+				this.$parent.handleShopOrderId = order.shopOrderId
 			},
 			btnConfirm(type,order){
 				let data = {
 						type:type,
-						orderId:order.orderId,
+						shopOrderId:order.shopOrderId,
 						order:order
 					}
 				this.$emit('buttonConfirm',data)
@@ -134,7 +133,7 @@
 			.btn{
 				width: 150rpx;
 				height:  64rpx;
-				margin: 22rpx 0 20rpx 20rpx;
+				margin: 22rpx 0 20rpx 15rpx;
 				line-height: 64rpx;
 				font-size:$font-size-26;
 				color: #999999;

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

@@ -37,14 +37,16 @@
 			this.getShareCode(this.shopOrderId)
 		},
 		methods:{
-			getShareCode(shopOrderId){
-				this.OrderService.QueryOrderShareCode({shopOrderId:shopOrderId}).then(response =>{
-					this.shareCode = response.data
+			//获取订单分享码
+			async getShareCode(shopOrderId){
+				try{
+					const res = await this.OrderService.QueryOrderShareCode({shopOrderId:shopOrderId})
+					this.shareCode = res.data
 					this.$parent.shareCode = this.shareCode;
-				}).catch(error =>{
+				}catch(error){
 					this.$parent.isShareModal = false;
-					this.$util.modal('提示',error.msg,'确定','',false,() =>{})
-				})
+					this.$util.msg(error.msg, 2000)
+				}
 			},
 			hideConfirm(){
 				this.$parent.isShareModal = false

+ 3 - 13
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 class="a-bg"  :src="StaticUrl + '/icon/line@3x.png'" mode=""></image>
 	</view>
 </template>
 
@@ -58,17 +58,15 @@
 		width: 100%;
 		height: auto;
 		background: #FFFFFF;
-        
         &::after{
             content: "";
             display: block;
             clear: both;
         }
-		// border-top: 1px solid #F8F8F8;
 		image{
 			float: left;
 			width: 100%;
-			height: 6rpx;
+			height: 12rpx;
 		}
 	}
 	.address-section {
@@ -105,7 +103,7 @@
 			justify-content: center;
 			width: 40rpx;
 			color: $color-system;
-			font-size: 46rpx;
+			font-size: 40rpx;
 			margin-right: 10rpx;
 		}	
 		.address-cen {
@@ -162,13 +160,5 @@
 			color: $text-color;
 			margin-right: 30rpx;
 		}
-		.a-bg {
-			position: absolute;
-			left: 0;
-			bottom: 0;
-			display: block;
-			width: 100%;
-			height: 24rpx;
-		}
 	}
 </style>

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

@@ -12,7 +12,7 @@
 			<view class="information-view same">
 				<view class="view-man">
 					赠品总数:<label class="label">{{
-						orderData.presentCount + orderData.promotionalGiftsCount
+						orderData.presentNum
 					}}</label>
 				</view>
 			</view>

+ 1 - 1
pages/user/order/components/details/cm-voucher-temp.vue

@@ -13,7 +13,7 @@
 							</view>
 						</view>
 					</view>
-				</scroll-view>
+				</scroll-view> 
 				<view class="record-list-tmk" v-if="item.remarks">
 					备注:{{ item.remarks }}
 				</view>

+ 43 - 36
pages/user/order/create-order.vue

@@ -222,7 +222,6 @@ export default {
 			this.productParam.userId = this.cartParam.userId = userInfo.userId
 			this.supportParm.userId = userInfo.userId
 			this.confirmParam.clubId = userInfo.clubId 
-			
 			switch (option.type) {
 				case '1': // 商品详情立即购买
 					this.confirmParam.cartType = 2
@@ -493,40 +492,39 @@ export default {
 			this.isSubLoading = true
 			this.hanldeOrderSubmit(this.confirmParam)
 		},
-		hanldeOrderSubmit(params) {
-			// 提交订单
-			this.OrderService.CreatedOrderSubmit(params)
-				.then(response => {
-					let data = response.data
-					// 友盟埋点收集机构自主提交订单
-					if (process.env.NODE_ENV != 'development') {
-						this.$uma.trackEvent('Um_Event_ConfirmOrder', {
-							Um_Key_PageName: '机构提交订单',
-							Um_Key_SourcePage: '确认订单',
-							Um_Key_OrderID: `${data.orderId}`
-						})
-					}
-					if (data.code === 1) {
-						this.submitState = 'success'
-						setTimeout(() => {
-							this.isSubLoading = false
-						}, 2000)
-						this.$api.redirectTo(
-							`/pages/user/order/success?data=${JSON.stringify({ data: { orderId: data.orderId } })}`
-						)
-					} else {
-						this.submitState = 'confirm'
-						this.$util.msg('订单提交成功', 2000, true, 'success')
-						setTimeout(() => {
-							this.isSubLoading = false
-							this.$api.redirectTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
-						}, 2000)
-					}
-				})
-				.catch(error => {
-					this.isSubLoading = false
-					this.handleError(error)
-				})
+		// 提交订单
+		async hanldeOrderSubmit(params) {
+			try{
+				// 友盟埋点收集机构自主提交订单
+				if (process.env.NODE_ENV != 'development') {
+					this.$uma.trackEvent('Um_Event_ConfirmOrder', {
+						Um_Key_PageName: '机构提交订单',
+						Um_Key_SourcePage: '确认订单',
+						Um_Key_OrderID: `${data.orderId}`
+					})
+				}
+				const res = await this.OrderService.CreatedOrderSubmit(params)
+				const data = res.data
+				if (data.code === 1) {
+					this.submitState = 'success'
+					setTimeout(() => {
+						this.isSubLoading = false
+					}, 2000)
+					this.$api.redirectTo(
+						`/pages/user/order/success?data=${JSON.stringify({ data: { orderId: data.orderId } })}`
+					)
+				} else {
+					this.submitState = 'confirm'
+					this.$util.msg('订单提交成功', 2000, true, 'success')
+					setTimeout(() => {
+						this.isSubLoading = false
+						this.$api.redirectTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
+					}, 2000)
+				}
+			}catch(error){
+				this.isSubLoading = false
+				this.handleError(error)
+			}
 		},
 		handleError(data) {
 			// 提交订单异常处理
@@ -677,8 +675,17 @@ export default {
 			this.confirmParam.addressId = selectData.addressId
 			this.cartParam.townId = selectData.townId
 			this.productParam.townId = selectData.townId
-			this.postageParam.townId = selectData.townId
+			this.supportParm.townId = selectData.townId
 			this.addressData = selectData
+			if(this.handleComType === 1) {//立即都买提交
+				this.GetProductCreateOrderInfo()
+			}
+			if(this.handleComType === 2) {//购物车提交
+				this.CartCreateOrderInfo()
+			}
+			if(this.handleComType === 3) {//组合商品提交
+				this.GetOrderClubProductSupporting()
+			}
 		}
 	}
 }

+ 26 - 20
pages/user/order/order-details.vue

@@ -89,7 +89,7 @@
 			@paymentConfirm="hanldPaymentConfirm"
 		/>
 		<!-- 分享弹窗 -->
-		<cm-share-popup :orderId="orderId" v-if="isShareModal" @shareConfirm="onShareAppMessage" />
+		<cm-share-popup :shopOrderId="shopOrderId" v-if="isShareModal" @shareConfirm="onShareAppMessage" />
 		<!-- 促销活动弹窗 -->
 		<cm-promote-popup :Promotion="handlerPros" :popupShow="popupShow" />
 		<!-- 采美豆提示弹窗 -->
@@ -194,6 +194,11 @@ export default {
 			modal: false,
 			contentModalText: '订单查询失败,请稍候重试~', //操作文字提示语句
 			modalButton: [
+				{
+					text: '取消',
+					type: 'gray',
+					plain: true //是否空心
+				},
 				{
 					text: '确定',
 					customStyle: {
@@ -227,11 +232,10 @@ export default {
 			//处理订单状态显示
 			const map = {
 				0: '待确认',
-				4: '交易完成',
-				5: '订单完成',
-				6: '已关闭',
-				7: '交易全退',
-				77: '交易全退',
+				2: '交易完成',
+				4: '已关闭',
+				5: '交易全退',
+				6: '交易全退',
 				11: '待付款待发货',
 				12: '待付款部分发货',
 				13: '待付款已发货',
@@ -240,10 +244,8 @@ export default {
 				23: '部分付款已发货',
 				31: '已付款待发货',
 				32: '已付款部分发货',
-				33: '已付款已发货',
-				111: '待付款待发货'
+				33: '已付款已发货'
 			}
-			console.log('value', map[value])
 			return map[value]
 		}
 	},
@@ -260,7 +262,7 @@ export default {
 				const data = res.data
 				this.skeletonShow = true
 				this.orderInfo = data.shopOrder
-				// this.shareCode = data.shareCode
+				this.shareCode = data.shareCode
 				this.addressData = data.userInfo
 				this.rechargeGoods = data.shopOrder.rechargeGoods
 				this.btnStatus = data.shopOrder.status
@@ -325,6 +327,9 @@ export default {
 				case 'query':
 					this.$api.navigateTo('/pages/user/order/order-logistics?shopOrderId=' + this.shopOrderId)
 					break
+				case 'upload':
+					this.$api.navigateTo('/pages/user/order/order-addpay?shopOrderId=' + this.shopOrderId)
+					break
 			}
 		},
 		handleClick(e) {
@@ -414,14 +419,15 @@ export default {
 			}
 		},
 		//监听根据付款状态做操作
-		async getOrderPaymentValidation(data) {
-			try {
-				const res = await this.OrderService.OrderPaymentValidation({ shopOrderId: data.shopOrderId })
+		async getOrderPaymentValidation(order) {
+			try{
+				const res = await this.OrderService.OrderPaymentValidation({ shopOrderId: order.shopOrderId })
 				const data = res.data
+				console.log('data' ,data)
 				this.payModelData = data
 				if (data.balanceFlag == 1) {
 					// 0可以走余额抵扣,1不能走余额抵扣
-					this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
+					this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${order.order.orderId}`)
 				} else {
 					switch (data.code) {
 						case 1:
@@ -436,24 +442,24 @@ export default {
 							this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
 							break
 						default:
-							this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
+							this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${order.order.orderId}`)
 					}
 				}
-			} catch (error) {
+			}catch(error){
 				this.$util.msg(error.msg, 2000)
 			}
 		},
 		//余额抵扣跳转
-		async hanldPaymentConfirm(data) {
+		async hanldPaymentConfirm(order) {
 			try {
-				await this.OrderService.OrderBalanceDeduction({ shopOrderId: data.order.shopOrderId })
-				const data = { shopOrderId: data.order.shopOrderId }
+				await this.OrderService.OrderBalanceDeduction({ shopOrderId: order.order.shopOrderId })
+				const data = { shopOrderId: order.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}`)
+					this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${order.order.orderId}`)
 				}
 			} catch (error) {
 				this.$util.msg(error.msg, 2000)

+ 78 - 110
pages/user/order/order-list.vue

@@ -37,7 +37,7 @@
 				@animationfinish="onChange"
 				:style="{ height: winHeight + 'px' }"
 			>
-				<swiper-item v-for="(tabItem, index) in orderTabBar" :key="index">
+				<swiper-item v-for="(tabItem, index) in orderTabBar" :key="index" @touchmove.stop="">
 					<scroll-view scroll-y class="scoll-y tui-skeleton" @scrolltolower="scrolltolower">
 						<view :class="{ 'tui-order-list': scrollTop >= 0 }" class="tui-skeleton clearfix">
 							<!-- 空白页 -->
@@ -51,17 +51,21 @@
 								<view
 									class="tui-order-item"
 									v-for="(order, orderIndex) in tabItem.orderList"
+									@click.stop="detail(order.shopOrderId)"
 									:key="orderIndex"
 								>
 									<view class="order-title">
 										<view class="order-title-t">
+											<view class="order-title-tip tui-skeleton-fillet">
+												{{ order.status | statusFilters }}
+											</view>
 											<text
-												class="bage-buss tui-skeleton-fillet"
+												class="bage buss tui-skeleton-fillet"
 												v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4"
 												>协销</text
 											>
 											<text
-												class="bage-auto tui-skeleton-fillet"
+												class="bage auto tui-skeleton-fillet"
 												v-if="
 													order.orderSubmitType == 0 ||
 														order.orderSubmitType == 1 ||
@@ -69,7 +73,6 @@
 												"
 												>自主</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"
@@ -77,14 +80,6 @@
 												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 class="goods-title">
 										<view v-if="order.shopPromotion" class="floor-item-act">
@@ -104,7 +99,6 @@
 										class="goods-item"
 										v-for="(pros, prosIndex) in order.orderProductList"
 										:key="prosIndex"
-										@click.stop="detail(order.shopOrderId)"
 									>
 										<view class="goods-pros-t">
 											<view class="pros-img tui-skeleton-fillet">
@@ -352,6 +346,26 @@ export default {
 		NumFormat(value) {
 			//处理金额
 			return Number(value).toFixed(2)
+		},
+		statusFilters(value) {
+			//处理订单状态显示
+			const map = {
+				0: '待确认',
+				2: '交易完成',
+				4: '已关闭',
+				5: '交易全退',
+				6: '交易全退',
+				11: '待付款待发货',
+				12: '待付款部分发货',
+				13: '待付款已发货',
+				21: '部分付款待发货',
+				22: '部分付款部分发货',
+				23: '部分付款已发货',
+				31: '已付款待发货',
+				32: '已付款部分发货',
+				33: '已付款已发货'
+			}
+			return map[value]
 		}
 	},
 	methods: {
@@ -412,28 +426,29 @@ export default {
 				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
-				})
-				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 {
+				if(data.list.length>0){
+					const orderList = data.list
+					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 = '已至底部'
+						this.nomoreText = '上拉显示更多'
+					} else {
+						if (orderItem.orderList.length < 2) {
+							this.pullUpOn = true
+						} else {
+							this.pullUpOn = false
+							this.nomoreText = '已至底部' 
+						}
 					}
+				}else{
+					this.$set(orderItem, 'loaded', true)
+					orderItem.orderList = []
 				}
 				this.skeletonShow = false
 				this.isOnloadFlag = false
@@ -503,6 +518,9 @@ export default {
 					this.isModalLayer = true
 					this.$api.navigateTo('/pages/user/order/order-logistics?shopOrderId=' + data.shopOrderId)
 					break
+				case 'upload':
+					this.$api.navigateTo('/pages/user/order/order-addpay?shopOrderId=' + data.shopOrderId)
+					break
 			}
 		},
 		handleClick(e) {
@@ -588,14 +606,14 @@ export default {
 			}
 		},
 		//监听根据付款状态做操作
-		async getOrderPaymentValidation(data) {
+		async getOrderPaymentValidation(order) {
 			try {
-				const res = await this.OrderService.OrderPaymentValidation({ shopOrderId: data.shopOrderId })
+				const res = await this.OrderService.OrderPaymentValidation({ shopOrderId: order.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}`)
+					this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${order.order.orderId}`)
 				} else {
 					switch (data.code) {
 						case 1:
@@ -610,7 +628,7 @@ export default {
 							this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
 							break
 						default:
-							this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
+							this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${order.order.orderId}`)
 					}
 				}
 			} catch (error) {
@@ -618,16 +636,16 @@ export default {
 			}
 		},
 		//余额抵扣跳转
-		async hanldPaymentConfirm(data) {
+		async hanldPaymentConfirm(order) {
 			try {
-				await this.OrderService.OrderBalanceDeduction({ shopOrderId: data.order.shopOrderId })
-				const data = { shopOrderId: data.order.shopOrderId }
-				if (data.type === 2) {
+				await this.OrderService.OrderBalanceDeduction({ shopOrderId: order.order.shopOrderId })
+				if (order.type === 2) {
+					const data = { shopOrderId: order.order.shopOrderId }
 					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}`)
+					this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${order.order.orderId}`)
 				}
 			} catch (error) {
 				this.$util.msg(error.msg, 2000)
@@ -721,34 +739,6 @@ 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
@@ -867,56 +857,34 @@ page {
 			height: 50rpx;
 			display: block;
 			position: absolute;
-			right: 0;
-			top: 9rpx;
-		}
-		.bage-buss {
-			display: inline-block;
-			width: 72rpx;
-			height: 30rpx;
-			background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
-			border-radius: 4rpx;
-			line-height: 30rpx;
-			font-size: $font-size-22;
-			text-align: center;
-			color: #ffffff;
+			right: 110rpx;
+			top: 12rpx;
 		}
-		.bage-auto {
+		.bage{
 			display: inline-block;
 			width: 72rpx;
-			height: 30rpx;
-			background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
+			height: 32rpx;
+			margin: 19rpx 10rpx 0 10rpx;
 			border-radius: 4rpx;
-			line-height: 30rpx;
+			line-height: 32rpx;
 			font-size: $font-size-22;
 			text-align: center;
 			color: #ffffff;
-		}
-		.bage-text {
-			display: inline-block;
-			font-size: $font-size-28;
-			line-height: 68rpx;
-			text-align: left;
-			color: $text-color;
-			margin-left: 10rpx;
-		}
-	}
-	.order-title-b {
-		width: 100%;
-		height: 40rpx;
-		float: left;
-		margin-top: 8rpx;
-		.order-title-btxt {
-			float: left;
-			font-size: $font-size-28;
-			line-height: 40rpx;
-			color: #999999;
-			text-align: lef;
+			float: right;
+			&.buss{
+				background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
+			}
+			&.auto{
+				background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
+			}
+			&.ebate{
+				background: #ff7a51;
+			}
 		}
 		.order-title-tip {
-			float: right;
+			float: left;
 			font-size: $font-size-28;
-			line-height: 40rpx;
+			line-height: 68rpx;
 			text-align: right;
 			color: #ff2a2a;
 		}

+ 288 - 258
pages/user/order/order-logistics.vue

@@ -2,55 +2,82 @@
 	<view class="container logistics clearfix">
 		<!-- 商品 -->
 		<view class="logistics-container">
-			<view class="logistics-batch" v-for="(item,index) in goodsList" :key="index">
-				<view class="order-item" v-for="(comItem,comIndex) in item.companyList" :key="comIndex">
+			<view class="logistics-batch" v-for="(item, index) in goodsList" :key="index">
+				<view class="order-item" v-for="(comItem, comIndex) in item.companyList" :key="comIndex">
 					<view class="goods-title">
 						<view class="title-logo"><image :src="comItem.shopLogo" mode=""></image></view>
-						<view class="title-text">{{comItem.name}}</view>
+						<view class="title-text">{{ comItem.name }}</view>
 					</view>
-					<view class="goods-item" v-for="(pros,prosIndex) in comItem.productsList" :key="prosIndex">
+					<view class="goods-item" v-for="(pros, prosIndex) in comItem.productsList" :key="prosIndex">
 						<view class="goods-pros-t">
-							<view class="pros-img"><image :src="pros.mainImage" alt="" /></view>
+							<view class="pros-img"><image :src="pros.mainImage" alt=""/></view>
 							<view class="pros-product">
-								<view class="producttitle">{{pros.name}}</view>
-								<view class="productspec">购买数量:{{pros.number}}</view>
-								<view class="productspec">已发货数量:{{pros.logNumber}}</view>
-							</view>	
+								<view class="producttitle">{{ pros.name }}</view>
+								<view class="productspec">购买数量:{{ pros.number }}</view>
+								<view class="productspec">已发货数量:{{ pros.logNumber }}</view>
+							</view>
 						</view>
 					</view>
 				</view>
 				<view class="logistics-template">
 					<!-- 物流信息 -->
-					<view class="logistics-content" v-if="item.logisticsData.length > 0" v-for="(loItem,loIndex) in item.logisticsData" :key="loIndex">
-						<view class="logistics-top">
-							<text class="name">物流信息</text>
-						</view>
+					<view
+						class="logistics-content"
+						v-if="item.logisticsData.length > 0"
+						v-for="(loItem, loIndex) in item.logisticsData"
+						:key="loIndex"
+					>
+						<view class="logistics-top"> <text class="name">物流信息</text> </view>
 						<view class="logistics-warp">
-							<view  class="logistics-warp__wrapper">
+							<view class="logistics-warp__wrapper">
 								<view class="logistics-main">
 									<view class="logistics-main-top">
-										<view class="main-top" @click="showlogistics(index,loIndex)">
-											{{loItem.expressname}}:<text class="expressNumber">{{loItem.expressNumber}}</text>
-											<text class="clipboard" @click.stop="clipboard(loItem.expressNumber)">复制</text>
-											<text class="arrow-showMore iconfont icon-web_xiangxiazhankai" :style="{'transform':loItem.isOpen?'rotate(180deg)':'rotate(0)','transition': 'transform 0.3s ease'}"></text>
-										</view>
-										<view class="main-bot">
-											发货时间:{{loItem.expressNewtime}}
+										<view class="main-top" @click="showlogistics(index, loIndex)">
+											{{ loItem.expressname }}:<text class="expressNumber">{{
+												loItem.expressNumber
+											}}</text>
+											<text class="clipboard" @click.stop="clipboard(loItem.expressNumber)"
+												>复制</text
+											>
+											<text
+												class="arrow-showMore iconfont icon-web_xiangxiazhankai"
+												:style="{
+													transform: loItem.isOpen ? 'rotate(180deg)' : 'rotate(0)',
+													transition: 'transform 0.3s ease'
+												}"
+											></text>
 										</view>
+										<view class="main-bot"> 发货时间:{{ loItem.expressNewtime }} </view>
 									</view>
-									<view v-if="loItem.expressRecord.length > 0" v-for="(infoItem,infoIndex) in loItem.expressRecord" :key="infoIndex" :class="{'logistics-warp--hide':!loItem.isOpen}" class="logistics-main-bot logistics-animation" :style="{'transform':loItem.isOpen?'translateY(0)':'translateY(-50%)','-webkit-transform':loItem.isOpen?'translateY(0)':'translateY(-50%)'}" >
-										{{infoItem.time}}  {{infoItem.desc}}
+									<view
+										v-if="loItem.expressRecord.length > 0"
+										v-for="(infoItem, infoIndex) in loItem.expressRecord"
+										:key="infoIndex"
+										:class="{ 'logistics-warp--hide': !loItem.isOpen }"
+										class="logistics-main-bot logistics-animation"
+										:style="{
+											transform: loItem.isOpen ? 'translateY(0)' : 'translateY(-50%)',
+											'-webkit-transform': loItem.isOpen ? 'translateY(0)' : 'translateY(-50%)'
+										}"
+									>
+										{{ infoItem.time }} {{ infoItem.desc }}
 									</view>
-									<view v-if="loItem.expressRecord.length < 1" :class="{'logistics-warp--hide':!loItem.isOpen}" class="logistics-main-bot logistics-animation" :style="{'transform':loItem.isOpen?'translateY(0)':'translateY(-50%)','-webkit-transform':loItem.isOpen?'translateY(0)':'translateY(-50%)'}">
+									<view
+										v-if="loItem.expressRecord.length < 1"
+										:class="{ 'logistics-warp--hide': !loItem.isOpen }"
+										class="logistics-main-bot logistics-animation"
+										:style="{
+											transform: loItem.isOpen ? 'translateY(0)' : 'translateY(-50%)',
+											'-webkit-transform': loItem.isOpen ? 'translateY(0)' : 'translateY(-50%)'
+										}"
+									>
 										暂无物流信息
 									</view>
 								</view>
 							</view>
 						</view>
 					</view>
-					<view class="logistics-content" v-else>
-						暂无物流信息
-					 </view>
+					<view class="logistics-content" v-else> 暂无物流信息 </view>
 				</view>
 			</view>
 		</view>
@@ -60,81 +87,83 @@
 </template>
 
 <script>
-	const thorui = require("@/components/clipboard/clipboard.thorui.js")
-	export default {
-		components:{
-			// logisticsRecord,
+const thorui = require('@/components/clipboard/clipboard.thorui.js')
+export default {
+	components: {
+		// logisticsRecord,
+	},
+	data() {
+		return {
+			orderId: '',
+			goodsList: []
+		}
+	},
+	onLoad(option) {
+		//商品数据
+		this.orderId = option.orderId
+		this.getData()
+	},
+	methods: {
+		navToListPage(id) {
+			this.$api.navigateTo(`/pages/goods/product?id=${id}`)
 		},
-		data() {
-			return {
-				orderId: '',
-				goodsList:[]
-			}
+		showlogistics(index, loIndex) {
+			let getGoodsList = this.goodsList[index],
+				isOpen = getGoodsList.logisticsData[loIndex]['isOpen']
+			this.goodsList[index].logisticsData[loIndex]['isOpen'] = !isOpen
 		},
-		onLoad(option){//商品数据
-			this.orderId = option.orderId;
-			this.getData();
+		clipboard(data) {
+			thorui.getClipboardData(data, res => {
+				if (res) {
+					this.$util.msg('复制成功', 2000, true, 'success')
+				} else {
+					this.$util.msg('复制失败', 2000, true, 'none')
+				}
+			})
 		},
-		methods: {
-			navToListPage(id){
-				this.$api.navigateTo(`/pages/goods/product?id=${id}`)
-			},
-			showlogistics(index,loIndex){
-				let getGoodsList = this.goodsList[index],
-					isOpen = getGoodsList.logisticsData[loIndex]['isOpen'];
-				this.goodsList[index].logisticsData[loIndex]['isOpen'] = !isOpen;
-			},
-			clipboard(data) {
-				thorui.getClipboardData(data, (res) => {
-					if (res) {
-						this.$util.msg("复制成功",2000,true,'success');
-					} else {
-						this.$util.msg("复制失败",2000,true,'none');
-					}
-				})
-			},
-			getData() {
-				this.OrderService.QueryLogistics({orderId: this.orderId}).then(response =>{
-					const resData = response.data;
+		getData() {
+			this.OrderService.QueryLogistics({ orderId: this.orderId })
+				.then(response => {
+					const resData = response.data
 					// 添加订单列表信息
-					let orderListArr = [];
-					resData.forEach((item,index) => {
+					let orderListArr = []
+					resData.forEach((item, index) => {
 						let logisticsArr = [],
 							companyList = [],
 							shopOrderList = item.shopOrderList,
-							logisticsInfos = item.logisticsInformationList;
+							logisticsInfos = item.logisticsInformationList
 						// 添加物流信息
-						if(logisticsInfos.length > 0) {
-							logisticsInfos.forEach((loItem,loIndex) => {
-								let newRouters = [];
+						if (logisticsInfos.length > 0) {
+							logisticsInfos.forEach((loItem, loIndex) => {
+								let newRouters = []
 								logisticsArr.push({
 									expressname: loItem['logisticsCompanyName'],
 									expressNumber: loItem['nu'],
 									expressNewtime: item.deliveryTime,
 									isOpen: false
 								})
-								if(loIndex == 0) {
-									logisticsArr[loIndex]['isOpen'] = true;
+								if (loIndex == 0) {
+									logisticsArr[loIndex]['isOpen'] = true
 								}
-								if(loItem.routerList) {
-									loItem.routerList.forEach((rItem,rIndex) => {
+								if (loItem.routerList) {
+									loItem.routerList.forEach((rItem, rIndex) => {
 										newRouters.push({
 											desc: rItem.desc,
 											time: rItem.time
 										})
 									})
-									logisticsArr[loIndex]['expressRecord'] = [...newRouters];
+									logisticsArr[loIndex]['expressRecord'] = [...newRouters]
 								} else {
-									logisticsArr[loIndex]['expressRecord'] = [];
+									logisticsArr[loIndex]['expressRecord'] = []
 								}
 							})
 						}
 						// 供应商信息
-						shopOrderList.forEach((shopItem,shopIndex) => {
+						shopOrderList.forEach((shopItem, shopIndex) => {
 							let prosListArr = [],
-								cmLogisticsRecords = shopItem.logisticsRecordList;
+								cmLogisticsRecords = shopItem.logisticsRecordList
 							// 商品信息
-							cmLogisticsRecords.forEach((prosItem,prosIndex) => {
+							cmLogisticsRecords.forEach((prosItem, prosIndex) => {
 								prosListArr.push({
 									id: prosItem.organizeProductID,
 									name: prosItem.productName,
@@ -151,227 +180,228 @@
 							})
 						})
 						orderListArr.push({
-							logisticsData:  [...logisticsArr],
+							logisticsData: [...logisticsArr],
 							companyList: [...companyList]
 						})
 					})
-					this.goodsList = [...orderListArr];
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
+					this.goodsList = [...orderListArr]
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
 				})
-			}
 		}
 	}
+}
 </script>
 
 <style lang="scss">
-	page {
-		height: auto;
+page {
+	height: auto;
+}
+.logistics-container {
+	width: 100%;
+	height: auto;
+	float: left;
+	background: #f7f7f7;
+	border-top: 1px solid #f8f8f8;
+	.logistics-batch {
+		display: flex;
+		flex-direction: column;
+		margin-bottom: 24rpx;
 	}
-	.logistics-container{
-		width: 100%;
+	.order-item {
+		width: 702rpx;
+		padding: 24rpx 24rpx 12rpx 24rpx;
 		height: auto;
 		float: left;
-		background:#F7F7F7;
-		border-top: 1px solid #F8F8F8;
-		.logistics-batch {
-			display: flex;
-			flex-direction: column;
-			margin-bottom: 24rpx;
-		}
-		.order-item{
-			width: 702rpx;
-			padding: 24rpx 24rpx 12rpx 24rpx;
-			height: auto;
+		background: #ffffff;
+		margin-bottom: 24rpx;
+		.goods-title {
+			width: 100%;
+			height: 48rpx;
 			float: left;
-			background: #FFFFFF;
-			margin-bottom: 24rpx;	
-			.goods-title{
-				width: 100%;
+			margin-bottom: 12rpx;
+			.title-logo {
+				width: 48rpx;
 				height: 48rpx;
 				float: left;
-				margin-bottom: 12rpx;
-				.title-logo{
+				image {
 					width: 48rpx;
 					height: 48rpx;
-					float: left;
-					image{
-						width: 48rpx;
-						height: 48rpx;
-					}
-				}
-				.title-text{
-					float: left;
-					margin-left: 16rpx;
-					font-size: $font-size-28;
-					color: $text-color;
-					text-align: left;
-					line-height: 48rpx;
-					font-weight: bold;
 				}
 			}
-			.goods-item{
-				width: 100%;
-				height: auto;
-			}	
-			.goods-pros-t{
-				display: flex;
-				align-items: center;
-				width: 100%;
-				height: 217rpx;
-				padding:12rpx 0;
-				.pros-img{
-					width: 210rpx;
-					height: 100%;
-					border-radius: 10rpx;
-					margin:0 26rpx 0 0;
-					border:1px solid #f3f3f3;
-					image{
-						width: 100%;
-						height: 100%;
-						border-radius: 10rpx;
-					}
-				}
+			.title-text {
+				float: left;
+				margin-left: 16rpx;
+				font-size: $font-size-28;
+				color: $text-color;
+				text-align: left;
+				line-height: 48rpx;
+				font-weight: bold;
 			}
-			.pros-product{
-				width: 468rpx;
-				height: 100%;
-				line-height: 36rpx;
-				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: 58rpx;
-				}
-				.productspec{
-					height: 36rpx;
-					color: $text-color;
-					line-height: 36rpx;
-					font-size: $font-size-26;
-				}
-			}		
 		}
-	}
-	
-	.logistics-template{
-		width: 702rpx;
-		height: 100%;
-		background: #FFFFFF;
-		float: left;
-		padding: 24rpx 24rpx 12rpx 24rpx;
-		.logistics-content{
+		.goods-item {
 			width: 100%;
-			padding: 20rpx 0;
 			height: auto;
-			.arrow-showMore {
-				position: absolute;
-				right: 24rpx;
-				z-index: 99;
-			}
-			.logistics-top{
-				width: 100%;
-				height: 40rpx;
-				line-height: 40rpx;
-				font-size: $font-size-28;
-				color: $text-color;
-				text-align: left;
-				padding-bottom: 24rpx;
-				border-bottom: 1px solid #F8F8F8;
-				.name{
-					float: left;
-					font-weight: bold;
-				}
-				.icon-web_xiangxiazhankai{
-					transform: rotate(0deg);
-					transform-origin: center center;
-					float: right;
-					font-size: $font-size-32;
-					color: #000000;
-					/* transition: transform 0.3s ease;*/
-					transition-property: transform;
-					transition-duration: 0.3s;
-					transition-timing-function: ease;
-				}
-				.icon-web_xiangxiazhankai-active{
-					transform: rotate(180deg);
+		}
+		.goods-pros-t {
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: 217rpx;
+			padding: 12rpx 0;
+			.pros-img {
+				width: 210rpx;
+				height: 100%;
+				border-radius: 10rpx;
+				margin: 0 26rpx 0 0;
+				border: 1px solid #f3f3f3;
+				image {
+					width: 100%;
+					height: 100%;
+					border-radius: 10rpx;
 				}
 			}
-			.logistics-warp{
-				width: 100%;
-				overflow: hidden;
-				.table{
-					height: 76rpx;
-					line-height: 76rpx;
-					font-size: $font-size-26;
-					color: $text-color;
-					text-align: left;
-				}
-				.expressNumber {
-					width: 250rpx;
-					display: inline-block;
-				}
-			}	
-			.logistics-main-top{
+		}
+		.pros-product {
+			width: 468rpx;
+			height: 100%;
+			line-height: 36rpx;
+			font-size: $font-size-26;
+			position: relative;
+			.producttitle {
 				width: 100%;
+				display: inline-block;
 				height: auto;
-				float: left;
-				padding-top: 24rpx;
-				.main-top,.main-bot{
-					font-size: $font-size-28;
-					color: $text-color;
-					line-height: 40rpx;
-					margin: 4rpx 0;
-				}
+				text-overflow: ellipsis;
+				display: -webkit-box;
+				word-break: break-all;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 2;
+				overflow: hidden;
+				margin-bottom: 58rpx;
 			}
-			.logistics-main-bot{
-				width: 100%;
-				height: auto;
-				font-size: $font-size-24;
+			.productspec {
+				height: 36rpx;
 				color: $text-color;
-				line-height: 56rpx;
-				text-align: justify;
+				line-height: 36rpx;
+				font-size: $font-size-26;
+			}
+		}
+	}
+}
+
+.logistics-template {
+	width: 702rpx;
+	height: 100%;
+	background: #ffffff;
+	float: left;
+	padding: 24rpx 24rpx 12rpx 24rpx;
+	.logistics-content {
+		width: 100%;
+		padding: 20rpx 0;
+		height: auto;
+		.arrow-showMore {
+			position: absolute;
+			right: 24rpx;
+			z-index: 99;
+		}
+		.logistics-top {
+			width: 100%;
+			height: 40rpx;
+			line-height: 40rpx;
+			font-size: $font-size-28;
+			color: $text-color;
+			text-align: left;
+			padding-bottom: 24rpx;
+			border-bottom: 1px solid #f8f8f8;
+			.name {
+				float: left;
+				font-weight: bold;
 			}
-			.logistics-animation {
+			.icon-web_xiangxiazhankai {
+				transform: rotate(0deg);
+				transform-origin: center center;
+				float: right;
+				font-size: $font-size-32;
+				color: #000000;
 				/* transition: transform 0.3s ease;*/
 				transition-property: transform;
 				transition-duration: 0.3s;
 				transition-timing-function: ease;
 			}
-			.logistics-warp__wrapper{
-				/* #ifndef APP-NVUE */
-				display: flex;
-				/* #endif */
-				flex-direction: column;
+			.icon-web_xiangxiazhankai-active {
+				transform: rotate(180deg);
 			}
-			.logistics-warp--hide {
-				// padding: 0 0;
-				// height: 0px;
-				// line-height: 0px;
-				display: none;
-			}	
-			.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: 6rpx;
-				line-height: 36rpx;
+		}
+		.logistics-warp {
+			width: 100%;
+			overflow: hidden;
+			.table {
+				height: 76rpx;
+				line-height: 76rpx;
+				font-size: $font-size-26;
+				color: $text-color;
+				text-align: left;
+			}
+			.expressNumber {
+				width: 250rpx;
 				display: inline-block;
-				margin-left: 24rpx;
-				position: relative;
-				z-index: 99;
 			}
 		}
+		.logistics-main-top {
+			width: 100%;
+			height: auto;
+			float: left;
+			padding-top: 24rpx;
+			.main-top,
+			.main-bot {
+				font-size: $font-size-28;
+				color: $text-color;
+				line-height: 40rpx;
+				margin: 4rpx 0;
+			}
+		}
+		.logistics-main-bot {
+			width: 100%;
+			height: auto;
+			font-size: $font-size-24;
+			color: $text-color;
+			line-height: 56rpx;
+			text-align: justify;
+		}
+		.logistics-animation {
+			/* transition: transform 0.3s ease;*/
+			transition-property: transform;
+			transition-duration: 0.3s;
+			transition-timing-function: ease;
+		}
+		.logistics-warp__wrapper {
+			/* #ifndef APP-NVUE */
+			display: flex;
+			/* #endif */
+			flex-direction: column;
+		}
+		.logistics-warp--hide {
+			// padding: 0 0;
+			// height: 0px;
+			// line-height: 0px;
+			display: none;
+		}
+		.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: 6rpx;
+			line-height: 36rpx;
+			display: inline-block;
+			margin-left: 24rpx;
+			position: relative;
+			z-index: 99;
+		}
 	}
-	
+}
 </style>

+ 40 - 47
pages/user/order/order-pay-list.vue

@@ -10,9 +10,6 @@
 						<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>
 						<view class="info-price">
 							<view class="price">¥{{ pros.price | NumFormat }}</view>
 							<view class="count"><text class="sm">X</text> {{ pros.num }}</view>
@@ -20,24 +17,32 @@
 					</view>
 				</view>
 				<view class="pay-list-msg">
-					<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">
-						已付:
+					<view class="list-label">运费:</view>
+					<view class="list-msg">
+						<text class="text"> {{ list.postageInfo }}</text>
+					</view>
+				</view>
+				<view class="pay-list-msg">
+					<view class="list-label">已付:</view>
+					<view class="list-msg">
 						<text class="text">
 							¥{{ list.receiptAmount | NumFormat }}
-							<text> 余额抵扣:(¥{{ list.canRefundAmount | NumFormat }}) </text>
+							<text v-if="list.accountAmount > 0"> (余额抵扣:¥{{ list.accountAmount | 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="pay-list-msg" v-if="list.eachDiscount > 0">
+					<view class="list-label">优惠:</view>
+					<view class="list-msg">¥{{ list.shopeachDiscountPostFee | NumFormat }}</view>
+				</view>
+				<view class="pay-list-msg">
+					<view class="list-label">待付:</view>
+					<view class="list-msg"><text class="text red"> ¥{{ list.obligation | NumFormat }}</text></view>
+				</view>
+				<view class="pay-list-btn" >
 					<view
 						class="btn"
-						v-if="list.onlinePay === 0 || list.onlinePay === 2 || list.onlinePay === 3"
+						v-if="list.onlinePay === 0 || list.onlinePay === 2"
 						@click="handlePayunder(list.shopOrderId)"
 						>线下转账</view
 					>
@@ -47,9 +52,6 @@
 						@click="handlePayOrder(list.shopOrderId)"
 						>线上支付</view
 					>
-					<view class="list-msg" v-if="list.obligation > 0"
-						>待付:<text class="text red">¥{{ list.obligation | NumFormat }}</text></view
-					>
 				</view>
 			</view>
 		</view>
@@ -61,7 +63,6 @@ export default {
 	data() {
 		return {
 			orderId: 0,
-			showPayUnder: false,
 			list: []
 		}
 	},
@@ -82,36 +83,21 @@ export default {
 		initData(e) {
 			console.log(e)
 			this.orderId = e.orderId
-			this.payOrderId = '#' + e.orderId + '#'
-			this.PayOrderShoporders(this.orderId)
-		},
-		PayOrderShoporders(orderId) {
-			this.PayService.PayOrderShoporders({ orderId: orderId })
-				.then(response => {
-					this.list = response.data
-					this.PayOrderCheckoutCounter(orderId)
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+			this.PayOrderShoporders(this.orderId )
 		},
-		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)
-				})
+		async PayOrderShoporders(orderId) {
+			try{
+				const res = await this.PayService.PayOrderShoporders({ orderId: orderId })
+				this.list = res.data
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
 		},
 		handlePayOrder(shopOrderId) {
 			this.$api.navigateTo(`/pages/user/pay/card-order?shopOrderId=${shopOrderId}`)
 		},
 		handlePayunder(shopOrderId) {
-			this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${this.orderId}`)
+			this.$api.navigateTo(`/pages/user/pay/card-under?shopOrderId=${shopOrderId}`)
 		}
 	},
 	onShow() {}
@@ -199,9 +185,10 @@ page {
 					width: 100%;
 					float: left;
 					line-height: 40rpx;
-					font-size: $font-size-26;
+					font-size: $font-size-28;
+					margin-top: 40rpx;
 					.price {
-						color: #333333;
+						color: #F85050;
 						float: left;
 					}
 					.count {
@@ -218,18 +205,24 @@ page {
 			width: 100%;
 			height: 40rpx;
 			line-height: 40rpx;
-			font-size: $font-size-26;
+			font-size: $font-size-28;
 			margin-bottom: 30rpx;
+			.list-label{
+				float: left;
+				font-size: $font-size-28;
+				color: #333333;
+			}
 			.list-msg {
 				float: right;
 				margin-left: 30rpx;
-				font-size: $font-size-26;
+				font-size: $font-size-28;
 				color: #333333;
 				font-weight: bold;
 				.text {
 					font-weight: normal;
 					&.red {
 						color: #f94b4b;
+						font-weight: bold;
 					}
 				}
 			}
@@ -241,7 +234,7 @@ page {
 				width: 160rpx;
 				height: 64rpx;
 				line-height: 64rpx;
-				background: $btn-confirm;
+				background: #F94B4B;
 				font-size: $font-size-26;
 				text-align: center;
 				float: right;

+ 5 - 5
pages/user/order/order-payunder.vue

@@ -89,13 +89,13 @@
 		methods:{
 			initData(e){
 				console.log(e)
-				this.orderId = e.orderId
-				this.payOrderId ='#'+e.orderId+'#'
+				this.shopOrderId = e.shopOrderId
+				this.payOrderId ='#'+e.shopOrderId+'#'
 				this.cmGetBankTypeLists()	
-				this.PayOrderCheckoutCounter(this.orderId)
+				this.PayOrderCheckoutCounter(this.shopOrderId)
 			},
-			PayOrderCheckoutCounter(orderId){
-				this.PayService.PayOrderCheckoutCounter({orderId:orderId}).then(response =>{
+			PayOrderCheckoutCounter(shopOrderId){
+				this.PayService.PayOrderCheckoutCounter({shopOrderId:shopOrderId}).then(response =>{
 					let data = response.data.order
 					this.payableAmount = data.payableAmount - data.receiptAmount  //待付金额
 					this.receiptStatus =  data.receiptStatus

+ 8 - 8
pages/user/order/order-sharedetails.vue

@@ -3,9 +3,9 @@
 		<!-- 地址选择 -->
 		<cm-address-temp ref="orderAddress" v-if="isRequest" :addressData="addressData" />
 		<!-- 商品 -->
-		<cm-goods-temp ref="goods" v-if="isRequest" :shopOrderData="shopOrderData" @popupClick="hanldePopupFn" />
+		<cm-goods-temp ref="goods" v-if="isRequest" :list="orderInfo.orderProductList" @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" />
 		<!-- 支付记录 -->
@@ -53,7 +53,7 @@ export default {
 			btnStatus: 0, //按钮组件状态
 			isRequest: false, //是否加载完成渲染子组件
 			addressData: {}, //地址信息初始化
-			information: {}, //订单信息初始化
+			orderInfo: {}, //订单信息初始化
 			shopOrderData: {}, //商品信息初始化
 			orderInvoice: {}, //发票信息初始化
 			returnedPurchaseList: {}, //退款信息初始化
@@ -68,8 +68,8 @@ export default {
 				isPay:false
 			},
 			mapStateArr: [
-				{ label: 'isQuery', val: [4, 5, 12, 13, 33, 22, 23, 32, 77], status: true },
-				{ label: 'isPay', val: [11, 12, 13, 21, 22, 23, 111], status: true }
+				{ label: 'isQuery', val: [2, 6, 12, 13, 33, 22, 23, 32], status: true },
+				{ label: 'isPay', val: [11, 12, 13, 21, 22, 23], status: true }
 			]
 		}
 	},
@@ -86,13 +86,13 @@ export default {
 					let data = response.data
 					this.status = data.order.status
 					this.addressData = data.userInfo
-					this.information = data.order
+					this.orderInfo = data.shopOrder
 					this.shopOrderData = data.shopOrderList
 					this.orderInvoice = data.orderInvoice
 					this.returnedPurchaseList = data.returnedPurchaseList
 					this.discernReceiptList = data.discernReceiptList
-					this.receiptAmount = data.order.receiptAmount
-					this.returnedPurchaseFee = data.order.returnedPurchaseFee
+					this.receiptAmount = data.shopOrder.receiptAmount
+					this.returnedPurchaseFee = data.shopOrder.returnedPurchaseFee
 					this.isRequest = true
 					this.mapStateArr.forEach(el => {
 						el.val.forEach(value => {

+ 12 - 9
pages/user/order/order-success.vue

@@ -27,7 +27,7 @@
 	export default{
 		data(){
 			return{
-				orderId:0,
+				shopOrderId:0,
 				nvabarData: {		//顶部自定义导航
 					haveBack:false,
 					haveHome:true,
@@ -43,7 +43,7 @@
 				successText:'订单支付失败',
 				isIphoneX:this.$store.state.isIphoneX,
 				CustomBar:this.CustomBar,// 顶部导航栏高度
-				mapStateArr:[11,12,13,21,22,23,111]
+				mapStateArr:[11, 12, 13, 21, 22, 23]
 				
 			}
 		},
@@ -68,6 +68,7 @@
 			initData(option){
 				const data = JSON.parse(option.data)
 				this.orderId = data.data.orderId
+				this.shopOrderId = data.data.shopOrderId
 				this.payType = data.data.type
 				this.amuntMoney = data.data.payAmount
 				if(this.payType == 'success'){
@@ -77,20 +78,22 @@
 					this.payStatus = false
 					this.successText = '订单支付失败'
 				}
-				this.PayOrderCheckoutCounter(this.orderId)
+				this.PayOrderCheckoutCounter(this.shopOrderId)
 			},
-			PayOrderCheckoutCounter(orderId){//初始化支付信息
-				this.PayService.PayOrderCheckoutCounter({ orderId : orderId }).then(response =>{
-					this.isRepuest = true
-					const status = response.data.order.status //主订单状态
+			async PayOrderCheckoutCounter(shopOrderId){//初始化支付信息
+				try{
+					const res = await this.PayService.PayOrderCheckoutCounter({ shopOrderId : shopOrderId })
+					const data = res.data.shopOrder
+					const status = data.status //子订单状态
 					this.mapStateArr.forEach(value => {
 						if(status === value){
 							this.payBtnStatus = true
 						}
 					})
-				}).catch(error =>{
+					this.isRepuest = true
+				}catch(error){
 					this.$util.msg(error.msg,2000)
-				})
+				}
 			},
 			toAgainPay(){
 				this.$api.reLaunch(`/pages/user/order/order-pay-list?orderId=${this.orderId}`)

+ 30 - 26
pages/user/order/search-order.vue

@@ -335,11 +335,10 @@ export default {
 			//订单状态文字和颜色
 			const map = {
 				0: '待确认',
-				4: '交易完成',
-				5: '订单完成',
-				6: '已关闭',
-				7: '交易全退',
-				77: '交易全退',
+				2: '交易完成',
+				4: '已关闭',
+				5: '交易全退',
+				6: '交易全退',
 				11: '待付款待发货',
 				12: '待付款部分发货',
 				13: '待付款已发货',
@@ -348,8 +347,7 @@ export default {
 				23: '部分付款已发货',
 				31: '已付款待发货',
 				32: '已付款部分发货',
-				33: '已付款已发货',
-				111: '待付款待发货'
+				33: '已付款已发货'
 			}
 			return map[state]
 		},
@@ -377,8 +375,8 @@ export default {
 				this.$util.msg(error.msg, 2000)
 			}
 		},
+		//清空历史记录
 		async confirmDetele() {
-			//清空历史记录
 			try{
 				const res = await this.OrderService.ClearOrderHistory({ userId: this.listQuery.userId })
 				this.$util.msg(res.msg, 2000, true, 'success')
@@ -439,7 +437,7 @@ export default {
 				this.$util.msg(error.msg, 2000)
 			}
 		},
-		handButtonConfirm(data) {
+		async handButtonConfirm(data) {
 			//获取点击
 			this.handleShopOrderId = data.shopOrderId
 			switch (data.type) {
@@ -475,6 +473,9 @@ export default {
 					this.isModalLayer = true
 					this.$api.navigateTo('/pages/user/order/order-logistics?shopOrderId=' + data.shopOrderId)
 					break	
+				case 'upload':
+					this.$api.navigateTo('/pages/user/order/order-addpay?shopOrderId=' + data.shopOrderId)
+					break
 			}
 		},
 		handleClick(e){
@@ -560,14 +561,15 @@ export default {
 			}
 		},
 		//监听根据付款状态做操作
-		async getOrderPaymentValidation(data) {
-			try{
-				const res = await this.OrderService.OrderPaymentValidation({ shopOrderId: data.shopOrderId })
+		async getOrderPaymentValidation(order) {
+			try {
+				const res = await this.OrderService.OrderPaymentValidation({ shopOrderId: order.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{
+				if (data.balanceFlag == 1) {
+					// 0可以走余额抵扣,1不能走余额抵扣
+					this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${order.order.orderId}`)
+				} else {
 					switch (data.code) {
 						case 1:
 							this.isPayModel = true
@@ -581,24 +583,26 @@ export default {
 							this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
 							break
 						default:
-							this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
+							this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${order.order.orderId}`)
 					}
 				}
-			}catch(error){
+			} 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}`)
+		async hanldPaymentConfirm(order) {
+			try {
+				await this.OrderService.OrderBalanceDeduction({ shopOrderId: order.order.shopOrderId })
+				if (order.type === 2) {
+					const data = { shopOrderId: order.order.shopOrderId }
+					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=${order.order.orderId}`)
 				}
-			}catch(error){
+			} catch (error) {
 				this.$util.msg(error.msg, 2000)
 			}
 		},

+ 1 - 7
pages/user/order/success.vue

@@ -10,13 +10,7 @@
 					<text>{{ successText }}</text>
 				</view>
 				<view class="cash-btn">
-					<view
-						class="btn btn-open"
-						@click="
-							this.$api.navigateTo(
-								'/pages/user/order/order-details?type=confim&shopOrderId=' + shopOrderId
-							)
-						"
+					<view class="btn btn-open" @click="this.$api.navigateTo('/pages/user/order/order-list?state=0')"
 						>查看订单</view
 					>
 					<view class="btn btn-home" @click="this.$api.switchTabTo('/pages/tabBar/home/index')"

+ 3 - 2
pages/user/pay/card-comfirm-sub.vue

@@ -6,7 +6,7 @@
 			borderRadius="10rpx"
 			:isLoading="true"
 			:loadingType="5"
-		></tui-skeleton>
+		/>
 		<template v-else>
 			<view class="card-content">
 				<view class="card-title" v-if="subType === 2 || subType === 3">
@@ -151,7 +151,8 @@ export default {
 				if (this.params.quickPayFlag === 1) {
 					const linkData = {
 						payAmount: this.params.payAmount,
-						orderId: this.orderId,
+						shopOrderId: this.shopOrderId,
+						orderId:this.orderId,
 						type: 'success'
 					}
 					this.$api.redirectTo(`/pages/user/order/order-success?data=${JSON.stringify({ data: linkData })}`)

+ 2 - 2
pages/user/pay/card-order.vue

@@ -6,7 +6,7 @@
 			borderRadius="10rpx"
 			:isLoading="true"
 			:loadingType="5"
-		></tui-skeleton>
+		/>
 		<template v-else>
 			<cu-custom :navbar-data="nvabarData" @navigateBack="hanldNavigateBack"></cu-custom>
 			<view class="container-cash clearfix" :style="{ marginTop: CustomBar + 'px' }">
@@ -202,7 +202,7 @@ export default {
 			skeletonShow: true,
 			orderId: 0,
 			shopOrderId: 0,
-			shopOrderInfo: 0,
+			shopOrderInfo: {},
 			payType: '',
 			realPay: 0, //应付金额
 			payableAmount: 0, // 应付总额

+ 540 - 0
pages/user/pay/card-under.vue

@@ -0,0 +1,540 @@
+<template>
+	<view class="container cashier">
+		<tui-skeleton
+			v-if="skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="5"
+		/>
+		<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>
+			<view class="pay-bring-wrapper clearfix">
+				<view class="pay-bring-content">
+					<view class="text-v title"
+						><text class="label">转账信息</text>
+						<text class="clipboard" @click.stop="clipboard">复制信息</text></view
+					>
+					<view class="text-v"><text class="label">开户行:</text> {{ bankInfo.bankName }}</view>
+					<view class="text-v"><text class="label">银行卡号:</text>{{ bankInfo.bankAccount }}</view>
+					<view class="text-v"
+						><text class="label">公司名称:</text>{{ bankInfo.bankAccountName }}</view
+					>
+					<view class="text-content"
+						>请将订单款项转账至上述账号,转账完成后截图支付凭证,并在订单页面上传支付凭证。</view
+					>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+const thorui = require('@/components/clipboard/clipboard.thorui.js')
+export default {
+	data() {
+		return {
+			bankInfo: {},
+			payableAmount: 0,
+			isIphoneX: this.$store.state.isIphoneX,
+			CustomBar: this.CustomBar, // 顶部导航栏高度
+			skeletonShow: true,
+			productImage: ['https://static.caimei365.com/app/img/icon/icon-vxkecode.png']
+		}
+	},
+	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.PayOrderCheckoutCounter(this.shopOrderId)
+		},
+		//初始化子订单信息
+		async PayOrderCheckoutCounter(shopOrderId) {
+			try {
+				const res = await this.PayService.PayOrderCheckoutCounter({ shopOrderId: shopOrderId })
+				const data = res.data.shopOrder
+				this.payableAmount = data.needPayAmount
+				this.getShopBank(data.shopId)
+			} catch (error) {
+				console.log('error', error)
+			}
+		},
+		//获取供应商线下转账账号
+		async getShopBank(shopId){
+			console.log('shopId', shopId)
+			try {
+				const res = await this.PayService.getShopBank({ shopId: shopId })
+				const data = res.data
+				this.bankInfo = data
+				setTimeout(() => {
+					this.skeletonShow = false
+				}, 500)
+			}catch (error) {
+				console.log('error', error)
+			}
+		},
+		clipboard() {
+			const data = `开户行:${this.bankInfo.bankName},银行卡号:${this.bankInfo.bankAccount},公司名称:${this.bankInfo.bankAccountName}`
+			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://static.caimei365.com/app/img/icon/icon-paybg.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: #4a4f58;
+				line-height: 70rpx;
+				text-align: left;
+				&.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: 18rpx;
+					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;
+			margin-top: 60rpx;
+			.text-title {
+				width: 100%;
+				height: 320rpx;
+				margin-bottom: 20rpx;
+				image {
+					width: 320rpx;
+					height: 320rpx;
+					display: block;
+					margin: 0 auto;
+				}
+			}
+			.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: #4a4f58;
+				line-height: 48rpx;
+				text-align: justify;
+				margin-bottom: 40rpx;
+				.label {
+					color: #999999;
+				}
+				&.bg-color {
+					line-height: 44rpx;
+					color: $color-system;
+				}
+				.clipboard {
+					height: 48rpx;
+					background: #e2e2e2;
+					text-align: center;
+					font-size: $font-size-24;
+					color: #999999;
+					border-radius: 24rpx;
+					line-height: 46rpx;
+					display: inline-block;
+					margin-left: 24rpx;
+					border: 1px solid #f7f7f7;
+					box-sizing: border-box;
+					padding: 0 10px;
+				}
+			}
+			.text-content {
+				width: 100%;
+				background-color: #f5f5f5;
+				box-sizing: border-box;
+				padding: 24rpx;
+				line-height: 44rpx;
+				font-size: $font-size-28;
+				color: $color-system;
+				text-align: justify;
+				margin-top: 60rpx;
+				border-radius: 8rpx;
+			}
+		}
+	}
+}
+.freight-alert {
+	width: 100%;
+	height: 100%;
+	background: rgba(0, 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>

+ 3 - 3
services/order.service.js

@@ -226,7 +226,7 @@ export default class OrderService {
               
         })
     }
-    /* 提交订单 orderId 订单ID */
+    /* 提交订单 shopOrderId 订单ID */
     CreatedOrderSubmit (data = {}) {
         return this.AjaxService.post({ 
             url:'/order/submit/generate', 
@@ -235,7 +235,7 @@ export default class OrderService {
               
         })
     }
-    /* 订单支付,效验付款规则 orderId 订单ID */
+    /* 订单支付,效验付款规则 shopOrderId 订单ID */
     OrderPaymentValidation (data = {}) {
         return this.AjaxService.get({ 
             url:'/order/pay/check', 
@@ -244,7 +244,7 @@ export default class OrderService {
               
         })
     }
-    /* 余额抵扣 orderId 订单ID */
+    /* 余额抵扣 shopOrderId 订单ID */
     OrderBalanceDeduction (data = {}) {
         return this.AjaxService.post({ 
             url:'/order/pay/balance/deduction', 

+ 12 - 0
services/pay.service.js

@@ -288,4 +288,16 @@ export default class PayService {
             isLoading: true ,
         }) 
     } 
+    /**
+	 * @获取供应商线下转账信息
+	 * @param:shopId 
+	 */
+    getShopBank (data = {}) {
+	    return this.AjaxService.get({ 
+	        url:'/order/club/getShopBank', 
+	        data, 
+	        isLoading: false ,
+	          
+	    })
+    }
 }

+ 1 - 1
services/sellse.service.js

@@ -153,7 +153,7 @@ export default class SellerService {
 	 *@param pageNum:机构会所ID(同之前)
 	 *@param pageSize:协销ID(同之前)
 	 */
-    getSellerOrderList (data={}){
+    getSellerSearchOrderList (data={}){
         return this.AjaxService.get({ 
             url:'/order/seller/search', 
             data,