Quellcode durchsuchen

联合丽格V1.0.1

zhengjinyi vor 1 Jahr
Ursprung
Commit
b275651f68
70 geänderte Dateien mit 5971 neuen und 7561 gelöschten Zeilen
  1. 5 1
      common/config/wxLogin.js
  2. 118 121
      components/cm-custom/cm-drag.vue
  3. 0 256
      components/cm-module/activity/activityBean.vue
  4. 0 125
      components/cm-module/modelAlert/errorAlert.vue
  5. 0 135
      components/cm-module/modelAlert/modelAlert.vue
  6. 0 148
      components/cm-module/modelAlert/order-alert.vue
  7. 0 140
      components/cm-module/modelAlert/shareModel.vue
  8. 18 0
      pages.json
  9. 2 1
      pages/login/login.vue
  10. 296 0
      pages/seller/address/address.vue
  11. 340 0
      pages/seller/address/addressManage.vue
  12. 1 1
      pages/seller/cart/components/index.vue
  13. 1 2
      pages/seller/cart/mixins/cartMixins.js
  14. 3 2
      pages/seller/goods/list.vue
  15. 1 1
      pages/seller/index/components/user.vue
  16. 3 2
      pages/seller/order/components/cm-address-temp.vue
  17. 235 0
      pages/seller/order/components/cm-details-button.vue
  18. 471 0
      pages/seller/order/components/cm-freight-popup.vue
  19. 126 50
      pages/seller/order/components/cm-goods-temp.vue
  20. 454 0
      pages/seller/order/components/cm-invice-popup.vue
  21. 231 0
      pages/seller/order/components/cm-list-button.vue
  22. 12 10
      pages/seller/order/components/cm-share-popup.vue
  23. 8 18
      pages/seller/order/components/details/cm-address-temp.vue
  24. 102 53
      pages/seller/order/components/details/cm-goods-temp.vue
  25. 0 0
      pages/seller/order/components/details/cm-invice-temp.vue
  26. 40 78
      pages/seller/order/components/details/cm-order-temp.vue
  27. 1 0
      pages/seller/order/components/details/cm-payment-temp.vue
  28. 0 0
      pages/seller/order/components/details/cm-promote-popup.vue
  29. 0 0
      pages/seller/order/components/details/cm-refund-temp.vue
  30. 2 2
      pages/seller/order/components/details/cm-voucher-temp.vue
  31. 0 197
      pages/seller/order/components/details/invoiceTent.vue
  32. 0 198
      pages/seller/order/components/details/logisticsRecord.vue
  33. 0 237
      pages/seller/order/components/details/orderButton.vue
  34. 0 245
      pages/seller/order/components/details/orderListButton.vue
  35. 0 254
      pages/seller/order/components/sellerDetaileButton.vue
  36. 0 211
      pages/seller/order/components/sellerExchangeCoupon.vue
  37. 0 524
      pages/seller/order/components/sellerFreight.vue
  38. 0 140
      pages/seller/order/components/sellerFreightAlert.vue
  39. 0 695
      pages/seller/order/components/sellerInvoice.vue
  40. 0 217
      pages/seller/order/components/sellerOrderButton.vue
  41. 94 0
      pages/seller/order/mixins/conMixins.js
  42. 168 0
      pages/seller/order/mixins/orderMixins.js
  43. 230 403
      pages/seller/order/order-club-list.vue
  44. 243 168
      pages/seller/order/order-confirm.vue
  45. 388 161
      pages/seller/order/order-details.vue
  46. 388 427
      pages/seller/order/order-list.vue
  47. 380 328
      pages/seller/order/order-search.vue
  48. 0 0
      pages/user/order/components/cm-address-temp.vue
  49. 3 4
      pages/user/order/components/cm-details-button.vue
  50. 0 0
      pages/user/order/components/cm-freight-popup.vue
  51. 4 4
      pages/user/order/components/cm-goods-temp.vue
  52. 6 4
      pages/user/order/components/cm-list-button.vue
  53. 29 32
      pages/user/order/components/cm-share-popup.vue
  54. 0 0
      pages/user/order/components/details/cm-address-temp.vue
  55. 0 0
      pages/user/order/components/details/cm-goods-temp.vue
  56. 151 0
      pages/user/order/components/details/cm-invice-temp.vue
  57. 6 6
      pages/user/order/components/details/cm-order-temp.vue
  58. 1 0
      pages/user/order/components/details/cm-payment-temp.vue
  59. 0 0
      pages/user/order/components/details/cm-refund-temp.vue
  60. 0 0
      pages/user/order/components/details/cm-voucher-temp.vue
  61. 0 198
      pages/user/order/components/details/logisticsRecord.vue
  62. 0 224
      pages/user/order/components/freight.vue
  63. 0 140
      pages/user/order/components/freightAlert.vue
  64. 8 24
      pages/user/order/create-order.vue
  65. 170 98
      pages/user/order/order-details.vue
  66. 859 860
      pages/user/order/order-list.vue
  67. 3 3
      pages/user/order/order-logistics.vue
  68. 335 383
      pages/user/order/order-search.vue
  69. 34 29
      pages/user/order/order-sharedetails.vue
  70. 1 1
      pages/user/order/order-sharelogin.vue

+ 5 - 1
common/config/wxLogin.js

@@ -40,7 +40,11 @@ const wxLoginQuick = async function(){// 根据微信的code获取用户登录
             store.commit('login',response.data)
             uni.setStorageSync('token',response.data.token)
             uni.setStorageSync('unionId',response.data.unionId)
-            uni.switchTab({url:'/pages/tabBar/user/user'})
+            if (response.data.userIdentity == 1) {
+			    uni.redirectTo({url:'/pages/seller/index/index'})
+            }else{
+                uni.switchTab({url:'/pages/tabBar/user/user'})
+            }
         })
         .catch(error =>{
             uni.setStorageSync('unionId',error.data.unionId)

+ 118 - 121
components/cm-custom/cm-drag.vue

@@ -8,144 +8,141 @@
 			@touchmove.stop.prevent="touchmove"
 			@touchend="touchend"
 			@click.stop.prevent="click"
-			:class="{ transition: isDock && !isMove }"
+			:class="{transition: isDock && !isMove }"
 		>
 			<text v-if="cartNum > 0" class="uni-badge uni-badge-error uni-small uni-badge--small icon-num">
-				{{ cartNum >= 100 ? '99+' : cartNum }}
+				{{cartNum >= 100 ? '99+' : cartNum}}
 			</text>
-			<image :src="staticUrl + 'icon-cart-active@3x.png'" mode=""></image>
+			<image src='https://static.caimei365.com/app/img/icon/icon-cart-active@3x.png' mode="widthFix"></image>
 		</view>
 	</view>
 </template>
 
 <script>
-export default {
-	name: 'drag-button',
-	props: {
-		cartNum: {
-			type: Number,
-			default: 0
-		},
-		isDock: {
-			type: Boolean,
-			default: false
-		},
-		existTabBar: {
-			type: Boolean,
-			default: false
-		}
-	},
-	data() {
-		return {
-			staticUrl: this.global.staticUrl,
-			top: 300,
-			left: 150,
-			width: 0,
-			height: 0,
-			offsetWidth: 0,
-			offsetHeight: 0,
-			windowWidth: 0,
-			windowHeight: 0,
-			isMove: true,
-			edge: 10
-		}
-	},
-	mounted() {
-		const sys = uni.getSystemInfoSync()
-		this.windowWidth = sys.windowWidth
-		this.windowHeight = sys.windowHeight
-		// #ifdef APP-PLUS
-		this.existTabBar && (this.windowHeight -= 50)
-		// #endif
-		if (sys.windowTop) {
-			this.windowHeight += sys.windowTop
-		}
-		// console.log(sys)
-		const query = uni.createSelectorQuery().in(this)
-		query
-			.select('#_drag_button')
-			.boundingClientRect(data => {
-				this.width = data.width
-				this.height = data.height
-				this.offsetWidth = data.width / 2
-				this.offsetHeight = data.height / 2
-				this.left = this.windowWidth - this.width - this.edge - 5
-				this.top = this.windowHeight - this.height - this.edge - 150
-			})
-			.exec()
-	},
-	methods: {
-		click() {
-			this.$emit('btnClick')
-		},
-		touchstart(e) {
-			this.$emit('btnTouchstart')
+	export default {
+		name: 'drag-button',
+		props: {
+			cartNum:{
+				type: Number,
+				default: 0
+			},
+			isDock:{
+				type: Boolean,
+				default: false
+			},
+			existTabBar:{
+				type: Boolean,
+				default: false
+			}
 		},
-		touchmove(e) {
-			// 单指触摸
-			if (e.touches.length !== 1) {
-				return false
+		data() {
+			return {
+				top:518,
+				left:314,
+				width: 0,
+				height: 0,
+				offsetWidth: 0,
+				offsetHeight: 0,
+				windowWidth: 0,
+				windowHeight: 0,
+				isMove: true,
+				edge: 10,
 			}
-			this.isMove = true
-			this.left = e.touches[0].clientX - this.offsetWidth
-			let clientY = e.touches[0].clientY - this.offsetHeight
-			// #ifdef H5
-			clientY += this.height
+		},
+		mounted() {
+			const sys = uni.getSystemInfoSync();
+			this.windowWidth = sys.windowWidth;
+			this.windowHeight = sys.windowHeight;
+			// #ifdef APP-PLUS
+				this.existTabBar && (this.windowHeight -= 50);
 			// #endif
-			let edgeBottom = this.windowHeight - this.height - this.edge
-			// 上下触及边界
-			if (clientY < this.edge) {
-				this.top = this.edge
-			} else if (clientY > edgeBottom) {
-				this.top = edgeBottom
-			} else {
-				this.top = clientY
+			if (sys.windowTop) {
+				this.windowHeight += sys.windowTop;
 			}
+			// console.log(sys)
+			const query = uni.createSelectorQuery().in(this);
+			query.select('#_drag_button').boundingClientRect(data => {
+				this.width = data.width;
+				this.height = data.height;
+				this.offsetWidth = data.width / 2;
+				this.offsetHeight = data.height / 2;
+				this.left = this.windowWidth - this.width - this.edge-5;
+				this.top = this.windowHeight - this.height - this.edge-150;
+			}).exec();
 		},
-		touchend(e) {
-			if (this.isDock) {
-				let edgeRigth = this.windowWidth - this.width - this.edge
-
-				if (this.left < this.windowWidth / 2 - this.offsetWidth) {
-					this.left = this.edge
+		methods: {
+			click() {
+				this.$emit('btnClick');
+			},
+			touchstart(e) {
+				this.$emit('btnTouchstart');
+			},
+			touchmove(e) {
+				// 单指触摸
+				if (e.touches.length !== 1) {
+					return false;
+				}
+				this.isMove = true;
+				this.left = e.touches[0].clientX - this.offsetWidth;
+				let clientY = e.touches[0].clientY - this.offsetHeight;
+				// #ifdef H5
+					clientY += this.height;
+				// #endif
+				let edgeBottom = this.windowHeight - this.height - this.edge;
+				// 上下触及边界
+				if (clientY < this.edge) {
+					this.top = this.edge;
+				} else if (clientY > edgeBottom) {
+					this.top = edgeBottom;
 				} else {
-					this.left = edgeRigth
+					this.top = clientY
 				}
-			}
-
-			this.isMove = false
-			this.$emit('btnTouchend')
-		}
-	}
-}
+			},
+			touchend(e) {
+				if (this.isDock) {
+					let edgeRigth = this.windowWidth - this.width - this.edge;
+					
+					if (this.left < this.windowWidth / 2 - this.offsetWidth) {
+						this.left = this.edge;
+					} else {
+						this.left = edgeRigth;
+					}
+					
+				}
+				
+				this.isMove = false;
+				this.$emit('btnTouchend');
+			},
+		}}
 </script>
 
 <style lang="scss">
-.cart-icon {
-	width: 92rpx;
-	height: 92rpx;
-	border-radius: 50%;
-	background: rgba(0,0,0,0.3);
-	position: fixed;
-	right: 24rpx;
-	bottom: 28%;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	cursor: pointer;
-	z-index: 20;
-	image {
-		width: 58rpx;
-		height: 58rpx;
-	}
-	text {
-		font-size: 28rpx;
-		position: absolute;
-		top: -10rpx;
-		right: 0;
-	}
-	&.transition {
-		transition: left 0.3s ease, top 0.3s ease;
+	.cart-icon {
+		width: 92rpx;
+		height: 92rpx;
+		border-radius: 50%;
+		background: rgba(0,0,0,0.3);
+		position: fixed;
+		right: 24rpx;
+		bottom: 28%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		cursor: pointer;
+		z-index: 20;
+		image {
+			width: 58rpx;
+			height: 58rpx;
+		}
+		text {
+			font-size: 28rpx;
+			position: absolute;
+			top: -10rpx;
+			right: 0;
+		}
+		&.transition {
+			transition: left .3s ease,top .3s ease;
+		}
 	}
-}
+	
 </style>

+ 0 - 256
components/cm-module/activity/activityBean.vue

@@ -1,256 +0,0 @@
- <template>
-	<view>
-		<view class="tui-alert-class tui-alert-box" :class="[show?'tui-alert-show':'tui-alert-hide']"  @touchmove.stop.prevent="discard">
-			<template v-if="beansType == 12">
-				<view class="tui-alert-image">
-					<image :src="bgImagePath" mode=""></image>
-				</view>
-			</template>
-			<template v-else>
-				<view class="tui-alert-content" :style="{'background-image': 'url('+bgImagePath+')'}">
-					<view class="tui-alert-content-text">恭喜您获得采美豆!</view>
-					<view class="tui-alert-content-bean">
-						<view class="tui-alert-main">
-							<image class="tui-alert-icon" src="https://static.caimei365.com/app/img/icon/bean-icon@2x.png" mode=""></image>
-							<view class="tui-alert-text">
-								<text class="icon-add">+</text>
-								<text class="icon-text">{{ beanNumber }}</text>
-							</view>
-						</view>
-					</view>
-					<view class="tui-alert-content-tips">
-						<view class="tips">采美豆可抵扣运费</view>
-					</view>
-				</view>
-			</template>
-			<text class="iconfont icon-2guanbi" :style="{bottom :beansType == 12 ? '25%' : '10%'}" @click.stop="handleClickCancel"></text>
-		</view>
-	</view> 
-</template>
-
-<script>
-	export default {
-		name:'tuiAlert',
-		props: {
-			//控制显示
-			show: {
-				type: Boolean,
-				default: false
-			},
-			//提示信息字体大小
-			size: {
-				type: Number,
-				default: 30
-			},
-			//提示信息字体颜色
-			color: {
-				type: String,
-				default: '#333'
-			},
-			//按钮字体颜色
-			btnColor: {
-				type: String,
-				default: '#EB0909'
-			},
-			btnText:{
-				type: String,
-				default: ''
-			},
-			beansType:{//根据类型设置背景图片:1注册机构,2升级资质机构,3个人机构修改资料,4资质机构修改资料,5下单成功,6线上支付成功,7确认收货成功
-				type: Number,
-				default: 1
-			},
-			beanNumber:{//采美豆显示数量
-				type:Number,
-				default:100
-			}
-		},
-		data() {
-			return{
-				bgImagePath:'https://static.caimei365.com/app/img/icon/bean-icon-2@2x.png',
-			}
-		},
-		created() {
-			this.handInitType(this.beansType)
-		},
-		methods: {
-			handInitType(type){
-				this.bgImagePath = `https://static.caimei365.com/app/img/icon/bean-icon-${type}@2x.png`
-			},
-			handleClick(e) {
-				console.log(e)
-				if (!this.show) return
-				this.$emit('click',false)
-			},
-			handleClickCancel() {
-				this.$emit('cancel',false)
-			},
-			discard(){
-				//丢弃
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.tui-alert-box {
-		width: 100%;
-		height: 100%;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		flex-direction: column;
-		position: fixed;
-		left: 0;
-		top: 100%;
-		opacity: 0;
-		background: rgba(51,51,51,0.7);
-		z-index: 99999;
-	}
-	.tui-alert-show {
-		top: 0;
-		opacity: 1;
-		// animation:rundtop 0.5s;
-	}
-	.tui-alert-hide{
-		top: 100%;
-		opacity: 0;
-		// animation:rundbottom 0.5s;
-	}
-	.tui-alert-image{
-		width: 626rpx;
-		height: 532rpx;
-		position: absolute;
-		top: 0;
-		left: 0;
-		bottom: 0;
-		right: 0;
-		margin: auto;
-		image{
-			width: 626rpx;
-			height: 532rpx;
-			display: block;
-		}
-	}
-	.tui-alert-content{
-		width: 580rpx;
-		height: 790rpx;
-		position: absolute;
-		top: 0;
-		left: 0;
-		bottom: 0;
-		right: 0;
-		margin: auto;
-		box-sizing: border-box;
-		padding-top: 485rpx;
-		background-size: cover;
-		.tui-alert-content-text{
-			height: 118rpx;
-			line-height: 118rpx;
-			text-align: center;
-			width: 100%;
-			font-size: $font-size-36;
-			color: #333333;
-		}
-		.tui-alert-content-bean{
-			width: 100%;
-			height: 74rpx;
-			line-height: 74rpx;
-			box-sizing: border-box;
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-			.tui-alert-main{
-				.tui-alert-icon{
-					width: 94rpx;
-					height: 74rpx;
-					display: block;
-					float: left;
-				}
-				.tui-alert-text{
-					color: $color-system;
-					line-height: 74rpx;
-					float: left;
-					.icon-add{
-						font-size:40rpx;
-						margin:0 15rpx;
-					}
-					.icon-text{
-						font-weight: bold;
-						font-size:48rpx;
-					}
-				}
-			}
-		}
-		.tui-alert-content-tips{
-			width: 100%;
-			height: 40rpx;
-			line-height: 40rpx;
-			margin-top: 41rpx;
-			box-sizing: border-box;
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-			.tips{
-				width: 224rpx;
-				height: 40rpx;
-				background-color: rgba(226, 91, 28, 0.1);
-				border-radius: 36rpx;
-				line-height: 40rpx;
-				font-size: $font-size-24;
-				color: $color-system;
-				text-align: center;
-			}
-		}
-	}
-	.icon-2guanbi{
-		display: block;
-		width: 100rpx;
-		height: 100rpx;
-		line-height: 100rpx;
-		text-align: center;
-		color: #FFFFFF;
-		position: absolute;
-		bottom: 13%;
-		left: 50%;
-		font-size: 58rpx;
-		margin-left: -50rpx;
-	}
-	.tui-alert-mask-show {
-		visibility: visible;
-		opacity: 1;
-	}
-	.tui-alert-btn {
-		width: 100%;
-		height: 90rpx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		background-color: #fff;
-		box-sizing: border-box;
-		position: relative;
-		font-size: 32rpx;
-		line-height: 32rpx;
-	}
-	.tui-alert-btn-hover {
-		background-color: #f7f7f7;
-	}
-	.tui-alert-btn::before {
-		width: 100%;
-		content: "";
-		position: absolute;
-		border-top: 1rpx solid #E0E0E0;
-		-webkit-transform: scaleY(0.5);
-		transform: scaleY(0.5);
-		left: 0;
-		top: 0;
-	}
-	@keyframes rundtop{
-		0%{top: 100%;opacity: 0;}
-		100%{top:0;opacity: 1;}
-	}
-	@keyframes rundbottom{
-		0%{top: 0;opacity: 1;}
-		100%{top:100%;opacity: 0;}
-	}
-</style>

+ 0 - 125
components/cm-module/modelAlert/errorAlert.vue

@@ -1,125 +0,0 @@
-<template name="alert">
-	<view class="alert spec" :class="specClass">
-		<!-- 运费弹窗说明 -->
-		<view class="freight-alert"  @tap="hideFreight">
-			<view class="content">
-				<view class="title">
-					<text>提示</text>
-				</view>
-				<view class="text-content">
-					<view class="text">
-						<text>系统检测到您的微信已绑定供应商账户,不能继续登录</text>
-					</view>
-					<view class="exit-btn">
-						<navigator open-type="exit" target="miniProgram" class="btn">退出</navigator>
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:'alert',
-		props:{},
-		data() {
-			return{
-				
-			}
-		},
-		created() {
-			
-		},
-		onLoad(){
-			
-		},
-		methods:{
-			hideFreight(){
-				this.$parent.isErrorAlert = false
-			},
-		},
-		onShow(){
-	
-		}
-	}
-</script>
-
-<style lang="scss">
-	/*弹窗*/
-	.model-warp.none{
-		display: none;
-	}
-	.model-warp.show{
-		display: block;
-	}
-	.freight-alert{
-		width: 100%;
-		height: 100%;
-		background: rgba(0,0,0,.5);
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 8888;
-		transition: all 0.4s;
-		&.none{
-			display: none;			
-		}
-		&.show{
-			display: block;
-		}
-		.content{
-			width: 530rpx;
-			height: 300rpx;
-			position: absolute;
-			background: $bg-color;
-			left: 0;
-			right: 0;
-			bottom: 0;
-			top: 0;
-			margin: auto;
-			padding: 20rpx 25rpx;
-			border-radius: 12rpx;
-			.title{
-				width: 100%;
-				height: 68rpx;
-				line-height: 68rpx;
-				font-size: $font-size-30;
-				color: $text-color;
-				text-align: center;
-				margin-bottom: 20rpx;
-				position: relative;
-			}
-			.text-content{
-				width: 70%;
-				height: auto;
-				margin: 0 auto;
-				.text{
-					line-height: 44rpx;
-					font-size: $font-size-28;
-					color:#666666;
-					text-align: center;
-				}
-				.exit-btn{
-					width: 100%;
-					height: 70rpx;
-					display: flex;
-					align-items: center;
-					flex-direction:column;
-					margin-top: 30rpx;
-					.btn{
-						width: 200rpx;
-						line-height: 70rpx;
-						font-size: $font-size-28;
-						text-align: center;
-						color: #FFFFFF;
-						border-radius: 35rpx;
-						padding: 0;
-						background: $btn-confirm;
-					}
-				}
-			}
-		}
-	}
-	
-</style>

+ 0 - 135
components/cm-module/modelAlert/modelAlert.vue

@@ -1,135 +0,0 @@
-<template name="alert">
-	<view class="alert spec" :class="specClass">
-		<view class="model-warp">
-			<view class="model-alert">
-				<view class="model-content">
-					<view class="sm"><text>{{alertText}}</text></view>
-				</view>
-				<view class="alert-btn">
-					<view class="btn btn-cancel" @click="hideConfirm">取消</view>
-					<view class="btn btn-confirm" @click="btnConfirm(alertType)">确定</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:'alert',
-		props:['isShowDelModal','alertText','alertType'],
-		data() {
-			return{
-
-			}
-		},
-		created() {
-			
-		},
-		onLoad(){
-			
-		},
-		methods:{
-			hideConfirm(){
-				this.$parent.isShowDelModal = false
-			},
-			//点击事件
-			btnConfirm(type){
-				this.$emit('btnConfirm',type)
-			}
-		},
-		onShow(){
-	
-		}
-	}
-</script>
-
-<style lang="scss">
-	/*弹窗*/
-	 .model-warp.none{
-		 display: none;
-	 }
-	 .model-warp.show{
-		 display: block;
-	 }
-	 .model-warp{
-		width: 100%;
-		height: 100%;
-		background: rgba(0,0,0,.5);
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 8888;
-		transition: all 0.4s;
-		&.none{
-			display: none;			
-		}
-		&.show{
-			display: block;
-		}
-		.model-alert{
-			width: 518rpx;
-			height: 316rpx;
-			position: absolute;
-			background: $bg-color;
-			left: 0;
-			right: 0;
-			bottom: 0;
-			top: 0;
-			margin: auto;
-			.alert-content{
-				width: 466rpx;
-				height: 152rpx;
-				padding: 40rpx 26rpx;					
-				.t-h1,.t-p{
-					font-size: $font-size-28;
-					line-height: 40rpx;
-					color: #333333;
-					text-align:justify;
-					padding: 10rpx;
-				}
-				.t-h1{
-					border-bottom: 1px solid $border-color;
-				}
-			}
-			.model-content{
-				width: 466rpx;
-				height: 152rpx;
-				padding: 40rpx 26rpx;	
-				display: flex;
-				flex-direction: column;
-				align-items: center;
-				.sm{
-					display: flex;
-					flex: 1;
-					line-height: 152rpx;
-					flex-direction: column;
-					align-items: center;
-					text-align: center;
-					font-size: $font-size-28;
-					color: #333333;
-				}
-			}
-			.alert-btn{
-				width: 100%;
-				height: 88rpx;
-				display: flex;
-				.btn{
-					flex: 1;
-					line-height: 88rpx;
-					font-size: $font-size-28;
-					text-align: center;
-					color: #FFFFFF;
-					border-radius: 0;
-					padding: 0;
-					&.btn-cancel{
-						background: $btn-cancel;
-					}
-					&.btn-confirm{
-						background: $btn-confirm;
-					}
-				}
-			}
-		}
-	}
-</style>

+ 0 - 148
components/cm-module/modelAlert/order-alert.vue

@@ -1,148 +0,0 @@
-<template name="sharealert">
-	<view class="alert spec" >
-		<view class="model-warp" @click.stop="hideConfirm">
-			<view class="content" v-if="modelType == 1">
-				<view class="content-title"></view>
-				<view class="text-content clearfix">
-					<view class="text">
-						<text>您有采美余额¥{{payModelData.ableUserMoney}}暂未使用,是否需要抵扣订单?</text>
-						<text>抵扣后您只需再支付¥{{payModelData.pendingPayments}}</text></view>
-					<view class="alert-btn" @click="cancelConfirm(dataInfo)">不抵扣,继续付款</view>
-					<view class="alert-btn" @click="paymentConfirm(1,dataInfo)">抵扣,继续付款</view>
-				</view>				
-			</view>
-			<view class="content" v-if="modelType == 2">
-				<view class="content-title"></view>
-				<view class="text-content clearfix">
-					<view class="text">您有采美余额¥{{payModelData.ableUserMoney}}暂未使用,是否需要抵扣订单?抵扣后订单支付完成</view>
-					<view class="alert-btn" @click="cancelConfirm(dataInfo)">不抵扣,继续付款</view>
-					<view class="alert-btn" @click="paymentConfirm(2,dataInfo)">抵扣</view>
-				</view>				
-			</view>
-			<view class="content" v-if="modelType == 3">
-				<view class="content-title"></view>
-				<view class="text-content clearfix">
-					<view class="text">目前机构余额剩余¥{{payModelData.ableUserMoney.toFixed(2)}}是否抵扣订单?</view>
-					<view class="alert-btn" @click="hideConfirm">取消,不抵扣</view>
-					<view class="alert-btn" @click="paymentConfirm(3,dataInfo)">抵扣</view>
-				</view>				
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:'sharealert',
-		props:{
-			modelType:{
-				type:Number,
-				default:3
-			},
-			payModelData:{
-				type:Object
-			}
-		},
-		data() {
-			return{
-				dataInfo:{}
-			}
-		},
-		created() {
-			this.infoData(this.payModelData)
-		},
-		methods:{
-			infoData(el){
-				this.dataInfo = el
-			},
-			hideConfirm(){
-				this.$parent.isPayModel = false
-			},
-			cancelConfirm(data){
-				this.$emit('cancelConfirm',data)
-			},
-			paymentConfirm(type,data){
-				this.$parent.isPayModel = false
-				let _data = {type:type,order:data}
-				this.$emit('paymentConfirm',_data)
-			},
-			btnConfirm(data){//点击事件
-				this.$emit('btnConfirm',data)
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	/*弹窗*/
-	 .model-warp.none{
-		 display: none;
-	 }
-	 .model-warp.show{
-		 display: block;
-	 }
-	 .model-warp{
-		width: 100%;
-		height: 100%;
-		background: rgba(0,0,0,0.3);
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 10000;
-		transition: all 0.4s;
-		&.none{
-			display: none;			
-		}
-		&.show{
-			display: block;
-		}
-		.content{
-			width: 540rpx;
-			min-height: 310rpx;
-			box-sizing: border-box;
-			position: absolute;
-			left: 50%;
-			top: 50%;
-			transform: translate(-50%,-50%);
-			border-radius: 14rpx;
-			background-color: #FFFFFF;
-			padding-top: 180rpx;
-			.content-title{
-				position: absolute;
-				left: 0;
-				top: -53rpx;
-				width: 100%;
-				height: 232rpx;
-				background: url(https://static.caimei365.com/app/img/icon/icon-orderAlert@2x.png) no-repeat;
-				background-size: contain;
-			}
-			.text-content{
-				width: 100%;
-				min-height: 208rpx;
-				box-sizing: border-box;
-				padding:24rpx;
-				float: left;
-				background-color: #FFFFFF;
-				border-radius:0 0 14rpx 14rpx;
-				.text{
-					letter-spacing: 2rpx;
-					line-height: 50rpx;
-					font-size: $font-size-26;
-					color: $text-color;
-					text-align: justify;
-					margin-bottom: 30rpx;
-				}
-			}
-			.alert-btn{
-				width: 492rpx;
-				height: 88rpx;
-				background: $btn-confirm;
-				line-height: 88rpx;
-				text-align: center;
-				border-radius: 44rpx;
-				color: #FFFFFF;
-				margin-top: 20rpx;
-			}
-		}	
-	}
-</style>

+ 0 - 140
components/cm-module/modelAlert/shareModel.vue

@@ -1,140 +0,0 @@
-<template name="sharealert">
-	<view class="alert spec" :class="specClass">
-		<view class="model-warp">
-			<view class="content">
-				<view class="text-content">
-					<view class="title">分享登录</view>
-					<view class="text">
-						<text>分享后,机构联系人可直接通过分享页面登录并绑定微信成为运营人员</text>
-					</view>
-				</view>				
-				<view class="alert-btn">
-					<view class="btn btn-cancel" @click="hideConfirm">取消</view>
-					<!-- #ifdef MP-WEIXIN -->
-					<button class="btn btn-confirm" open-type="share" @click="btnConfirm(bindId)">去分享</button>
-					<!-- #endif -->
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:'sharealert',
-		props:{
-			bindId:{
-				type:Number
-			}
-		},
-		data() {
-			return{
-				shareCode:'',
-			}
-		},
-		created() {
-			
-		},
-		methods:{
-			hideConfirm(){
-				this.$parent.isShareModal = false
-			},
-			btnConfirm(orderID){//点击事件
-				this.$emit('btnConfirm')
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	/*弹窗*/
-	 .model-warp.none{
-		 display: none;
-	 }
-	 .model-warp.show{
-		 display: block;
-	 }
-	 .model-warp{
-		width: 100%;
-		height: 100%;
-		background: rgba(0,0,0,0.3);
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 10000;
-		transition: all 0.4s;
-		&.none{
-			display: none;			
-		}
-		&.show{
-			display: block;
-		}
-		.content{
-			width: 518rpx;
-			height: 360rpx;
-			position: absolute;
-			background: $bg-color;
-			left: 0;
-			right: 0;
-			bottom: 0;
-			top: 0;
-			margin: auto;
-			border-radius: 24rpx;
-			.text-content{
-				width: 448rpx;
-				height: 200rpx;
-				padding: 30rpx 35rpx;
-				float: left;
-				.title{
-					line-height: 44rpx;
-					font-size: $font-size-28;
-					color: $text-color;
-					text-align: center;
-					font-weight: bold;
-					margin-bottom: 36rpx;
-				}
-				.share{
-					line-height: 36rpx;
-					font-size: $font-size-26;
-					color: $text-color;
-					text-align: justify;
-					margin-top: 22rpx;
-					font-weight: normal;
-					.txt{
-						margin-left: 10rpx;
-						color: #FF2A2A;
-					}
-				}
-				.text{
-					line-height: 44rpx;
-					font-size: $font-size-28;
-					color: $text-color;
-					text-align: justify;
-					margin-top: 22rpx;
-				}
-			}
-			.alert-btn{
-				width: 80%;
-				height: 70rpx;
-				display: flex;
-				margin: 0 auto;
-				.btn{
-					flex: 1;
-					line-height: 70rpx;
-					font-size: $font-size-28;
-					text-align: center;
-					color: #FFFFFF;
-					border-radius: 35rpx;
-					padding: 0;
-					margin: 0 15rpx;
-					&.btn-cancel{
-						background: #e1e1e1;
-					}
-					&.btn-confirm{
-						background: #4ad04c;
-					}
-				}
-			}
-		}	
-	}
-</style>

+ 18 - 0
pages.json

@@ -231,6 +231,12 @@
 						"navigationStyle": "custom"
 					}
 				},
+				{
+					"path": "order/order-search",
+					"style": {
+						"navigationBarTitleText": "订单搜索"
+					}
+				},
 				{
 					"path": "order/order-addpay",
 					"style": {
@@ -418,6 +424,18 @@
 					"enablePullDownRefresh": false
 				}
 			},
+			{
+				"path": "address/addressManage",
+				"style": {
+					"navigationBarTitleText": "添加新地址"
+				}
+			},
+			{
+				"path": "address/address",
+				"style": {
+					"navigationBarTitleText": "地址列表"
+				}
+			},
 			{
 				"path": "order/order-list",
 				"style": {

+ 2 - 1
pages/login/login.vue

@@ -9,7 +9,7 @@
 			borderRadius="10rpx"
 			:isLoading="true"
 			:loadingType="5"
-		></tui-skeleton>
+		/>
 		<template else>
 			<view class="login-form" v-if="loginType === 0">
 				<view class="login-input">
@@ -311,6 +311,7 @@ export default {
 		}
 	},
 	onShow() {
+		this.checkedAuthorize()
 		this.infoClucbUser()
 	}
 }

+ 296 - 0
pages/seller/address/address.vue

@@ -0,0 +1,296 @@
+<template>
+	<view class="container clearfix">
+		<view v-if="isEmpty" class="empty-container">
+			<image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AFmO1AAGxLZjSeDg040.png" mode="aspectFit"></image>
+			<view class="txt">您还没有收货地址</view>
+			<view class="txt">点击底部按钮添加收货地址吧~~</view>
+			<view class="login-btn" @click="addAddress('add')">添加新地址</view>
+		</view>
+		<view v-else class="address-list" :style="{'height': scrollHeight + 'px'}">
+			<scroll-view scroll-y="true" :style="{'height': scrollHeight + 'px'}">
+				<view class="list" v-for="(item, index) in addressList" :key="index" @click="checkAddress(item)">
+					<view class="wrapper">
+						<view class="u-box">
+							<text class="name">{{item.receiver}}</text>
+							<text class="mobile">{{item.mobile}}</text>
+						</view>
+						<view class="u-box b-b">
+							<text class="address">收货地址:{{item.province}}{{item.city}}{{item.town}}{{item.address}}</text>
+						</view>
+						<view class="u-box b-t">
+							<view v-if="item.defaultFlag == 1" class="tag-left">
+								<view class="tag">默认地址</view>
+							</view>
+							<view v-else class="tag-left"></view>
+							<view class="tag-right">
+								<view class="t-b"  @click.stop="deleteAddress(item.addressId)">
+									<text class="iconfont icon-shanchu"></text>
+									<text class="txt">删除</text>
+								</view>
+								<view class="t-b"  @click.stop="addAddress('edit',item)">
+									<text class="iconfont icon-bianji"></text>
+									<text class="txt">编辑</text>
+								</view>
+								
+							</view>
+						</view>
+					</view>
+				</view>
+			</scroll-view>
+			<view class="add-btn" @click="addAddress('add')" :style="{bottom :isIphoneX ? '68rpx' : '34rpx'}">添加新地址</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import authorize from '@/common/config/authorize.js'	
+	export default {
+		data() {
+			return {
+				isIphoneX:this.$store.state.isIphoneX,
+				isSelect:false,
+				isEmpty:false,
+				listQuery:{
+					userId:0,
+					pageNum:1,
+					pageSize:10
+				},
+				addressList: [],
+				hasNextPage:false,
+				allowDataStatus:true,
+				wrapperHeight:'100%',
+				scrollHeight:'',
+				currPage:'',//当前页面
+				prevPage:''//上一个页面
+			}
+		},
+		onLoad(option){	
+			if(option.type=='select'){this.isSelect = true}
+			this.setScrollHeight()
+		},
+		methods: {
+			setScrollHeight() {	// 窗口高度 - 底部距离
+				setTimeout(()=> {
+					const query = wx.createSelectorQuery().in(this)
+					query.selectAll('.add-btn').boundingClientRect()
+					query.exec(res => {
+						if(res[0][0]){
+							let winHeight = this.$api.getWindowHeight(),
+								eleTop = res[0][0].top - 1
+								this.scrollHeight =  eleTop
+						}
+					})
+				}, 500)
+			},
+			getQueryAddressList(){	//初始化地址列表数据
+				this.UserService.QueryAddressList(this.listQuery).then(response =>{
+					let data = response.data
+					if(data.list&&data.list.length > 0){
+						this.isEmpty = false
+						this.hasNextPage = data.hasNextPage
+						this.addressList = data.list
+					}else{
+						this.isEmpty = true
+					}
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			getOnReachBottomData(){// 上滑加载分页
+				this.listQuery.pageNum+=1
+				this.UserService.QueryAddressList(this.listQuery).then(response =>{
+					let data = response.data
+					if(data.list&&data.list.length > 0){
+						this.hasNextPage = data.hasNextPage
+						this.addressList = this.addressList.concat(data.list) 
+					}
+				})
+				.catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			checkAddress(item){//选择地址
+				//是否需要返回地址(从订单确认页跳过来选收货地址)
+				if(!this.isSelect){return }
+				uni.setStorageSync('selectAddress',item)
+				var pages = getCurrentPages()
+				var prevPage = pages[pages.length - 2]  //上一个页面	
+					prevPage.setData({select:'select'})
+				uni.navigateBack()
+			},
+			addAddress(type,item){
+				uni.navigateTo({
+					url: `/pages/seller/address/addressManage?type=${type}&data=${JSON.stringify(item)}`
+				})
+			},
+			deleteAddress(addressId){//删除收货地址
+				this.$util.modal('','确定要删除该地址?','确定','取消',true,() =>{
+					this.UserService.DeleteAddress({addressId:addressId,userId:this.listQuery.userId}).then(response =>{
+						this.$util.msg('删除成功',2000,true,'success')
+						setTimeout(() =>{
+							this.listQuery.pageNum = 1
+							this.addressList = []
+							this.getQueryAddressList()
+						},2000)
+					}).catch(error =>{
+						this.$util.msg(error.msg,2000)
+					})
+				})
+			}
+		},
+		onReachBottom() {
+			if(this.hasNextPage) {
+				this.getOnReachBottomData()
+			}
+		},
+		onShow() {
+			this.$api.getComStorage('orderUserInfo').then((resolve) =>{
+				this.listQuery.userId = resolve.userId? resolve.userId : 0
+				this.listQuery.pageNum = 1
+				this.addressList = []
+				this.getQueryAddressList()
+				var pages = getCurrentPages()
+				var prevPage = pages[pages.length - 2]  //上一个页面	
+					// prevPage.setData({select:''})
+			})
+		}
+	}
+</script>
+
+<style lang='scss'>
+	page {
+		height: auto;
+	}
+	page,.container{
+		/* padding-bottom: 120upx; */
+		background: #F7F7F7;
+		border-top: 1px solid #EBEBEB;
+	}
+	.container{
+		position: relative;
+	}
+	.address-list{
+		width: 100%;
+		box-sizing: border-box;
+		padding: 24rpx;
+	}
+	.list{
+		display: flex;
+		align-items: center;
+		width: 100%;
+		height: auto;
+		padding: 24rpx;
+		background: #FFFFFF;
+		position: relative;
+		box-sizing: border-box;
+		margin-bottom: 24rpx;
+		border-radius: 16rpx;
+	}
+	.wrapper{
+		display: flex;
+		flex-direction: column;
+		flex: 1;
+	}
+	.u-box.b-b{
+		
+	}
+	.u-box.b-b{
+		margin-bottom:24rpx;
+	}
+	.u-box.b-t{
+		margin-bottom:0;
+	}
+	.u-box{
+		display: flex;
+		align-items: center;
+		font-size: $font-size-28;
+		color: $text-color;
+		line-height: 40rpx;
+		margin-bottom: 12rpx;
+		.name{
+			margin-right: 40rpx;
+			font-weight: bold;
+		}
+		.mobile{
+			font-weight: bold;
+		}
+		.tag-left{
+			flex: 6;
+			.tag{
+				width: 120rpx;
+				height: 40rpx;
+				background: $color-system;
+				border-radius: 20rpx;
+				font-size: $font-size-24;
+				color: #FFFFFF;
+				line-height: 40rpx;
+				text-align: center;
+				padding: 0 6rpx;
+			}
+		}
+		.tag-right{
+			flex: 4;
+			display: flex;
+			text-align: right;
+			.t-b{
+				flex: 1;
+				line-height: 40rpx;
+				.txt{
+					font-size: $font-size-24;
+					color: $text-color;
+					line-height: 40rpx;
+				}
+			}
+			.icon-shanchu{
+				color:#FF2A2A ;
+				margin-right: 8rpx;
+			}
+			.icon-bianji{
+				color: #2A7AFF;
+				margin-right: 8rpx;
+			}
+		}
+		.address{
+			font-size: $font-size-28;
+			color: $text-color;
+			line-height: 40rpx;
+			-o-text-overflow: ellipsis;
+			text-overflow: ellipsis;
+			display: -webkit-box;
+			word-break: break-all;
+			-webkit-box-orient: vertical;
+			-webkit-line-clamp: 2;
+			overflow: hidden;
+		}
+	}
+	.add-btn{
+		position: fixed;
+		left: 75rpx;
+		right: 75rpx;
+		bottom: 34rpx;
+		z-index: 95;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 600rpx;
+		height: 88rpx;
+		font-size: $font-size-28;
+		line-height: 88rpx;
+		color: #FFFFFF;
+		text-align: center;
+		background: $btn-confirm;
+		border-radius: 44rpx;
+	}
+	.adds-btn{
+		width: 600rpx;
+		height: 88rpx;
+		font-size: 28rpx;
+		line-height: 88rpx;
+		color: #FFFFFF;
+		margin: 0 auto;
+		text-align: center;
+		background: #000000;
+		border-radius: 44rpx;
+	}
+</style>
+

+ 340 - 0
pages/seller/address/addressManage.vue

@@ -0,0 +1,340 @@
+<template>
+	<view class="container clearfix">
+		<view class="add-content">
+			<view class="input-row b-b">
+				<view class="label">收货人:</view>
+				<input
+					class="input"
+					type="text"
+					v-model="addressData.receiver"
+					@input="onShouHuoRen"
+					placeholder="请输入收货人姓名"
+					placeholder-class="placeholder"
+				/>
+			</view>
+			<view class="input-row b-b">
+				<view class="label">手机号:</view>
+				<input
+					class="input"
+					type="number"
+					maxlength="11"
+					v-model="addressData.mobile"
+					@input="onMobile"
+					placeholder="请输入手机号码"
+					placeholder-class="placeholder"
+				/>
+			</view>
+			<view class="input-row b-b" @click="showMulLinkageThreePicker">
+				<view class="label address">所在地区:</view>
+				<text class="input" :style="addressData.allAddress == '请选择收货地区' ? 'color:#b2b2b2' : ''">
+					{{ addressData.allAddress }}
+				</text>
+				<text class="iconfont icon-xiayibu"></text>
+			</view>
+			<view class="text-textarea b-b">
+				<view class="textarea show" v-if="isShowInput">
+					{{ addressData.address ? addressData.address : '详细地址:如道路、门牌号、小区、楼房号、单元室等' }}
+				</view>
+				<textarea
+					v-else
+					class="textarea"
+					type="text"
+					v-model="addressData.address"
+					placeholder="详细地址:如道路、门牌号、小区、楼房号、单元室等"
+					placeholder-class="placeholder"
+					maxlength="50"
+					@input="onTextareaInput"
+					:class="isShowInput ? '' : ''"
+				/>
+			</view>
+			<view class="text-input default-row">
+				<text class="tit">设为默认地址</text>
+				<switch :checked="switchDefault" color="#5FB00A" @change="switchChange" style="transform:scale(0.8)" />
+			</view>
+			<button
+				class="add-btn"
+				:disabled="isConfirm"
+				:class="[isConfirm == true ? 'disabled' : '']"
+				@click="confirm"
+			>
+				{{ buttonText }}
+			</button>
+		</view>
+		<mpvue-city-picker
+			:themeColor="themeColor"
+			ref="mpvueCityPicker"
+			:pickerValueDefault="cityPickerValueDefault"
+			@onCancel="onCancel"
+			@onConfirm="onConfirm"
+		>
+		</mpvue-city-picker>
+	</view>
+</template>
+
+<script>
+import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
+import authorize from '@/common/config/authorize.js'
+export default {
+	components: {
+		mpvueCityPicker
+	},
+	data() {
+		return {
+			buttonText: '保存',
+			addType: 1, //记录添加地址的类型
+			isConfirm: true,
+			isShowInput: false,
+			switchDefault: false,
+			addressData: {
+				addressId: '',
+				allAddress: '请选择收货地区',
+				userId: '', //用户id ,只在新增收货地址时传
+				receiver: '', //收货人
+				mobile: '', //收货人手机
+				townId: '', //区ID
+				address: '', //地址
+				defaultFlag: 0 //是否默认收货地址(0 不是默认,1 默认)
+			},
+			params: {}, //参数
+			isSelect: false
+		}
+	},
+	onLoad(option) {
+		let title = '添加新地址'
+		if (option.type === 'edit') {
+			title = '编辑收货地址'
+			this.isConfirm = false
+			this.addType = 2
+			let optionData = JSON.parse(option.data)
+			this.addressData.allAddress = `${optionData.province}-${optionData.city}-${optionData.town}`
+			this.addressData.address = optionData.address ? optionData.address : ''
+			this.addressData.defaultFlag = optionData.defaultFlag
+			this.addressData.userId = optionData.userId
+			this.addressData.mobile = optionData.mobile
+			this.addressData.townId = optionData.townId
+			this.addressData.addressId = optionData.addressId
+			this.addressData.receiver = optionData.receiver
+			if (this.addressData.defaultFlag == 1) {
+				this.switchDefault = true
+			} else {
+				this.switchDefault = false
+			}
+		}
+		if (option.type == 'select') {
+			this.isSelect = true
+		}
+		uni.setNavigationBarTitle({
+			title
+		})
+	},
+	methods: {
+		switchChange(e) {
+			if (e.detail.value == true) {
+				this.addressData.defaultFlag = '1'
+			} else {
+				this.addressData.defaultFlag = '0'
+			}
+		},
+		// 三级联动选择
+		showMulLinkageThreePicker() {
+			this.isShowInput = true
+			this.$refs.mpvueCityPicker.show()
+		},
+		onConfirm(e) {
+			console.log(e)
+			this.addressData.allAddress = e.name
+			this.addressData.townId = e.townCode
+			this.initInput()
+		},
+		//提交
+		confirm() {
+			let data = this.addressData
+			if (!data.receiver) {
+				this.$util.msg('请填写收货人')
+			}
+			if (data.address == '所在地区') {
+				this.$util.msg('请选择所在地区')
+			}
+			if (!/(^1[0-9][0-9]{9}$)/.test(data.mobile)) {
+				this.$util.msg('请输入正确的手机号码')
+				return
+			}
+			if (this.addType == 1) {
+				this.params = {
+					userId: data.userId, //用户id ,只在新增收货地址时传
+					receiver: data.receiver, //收货人
+					townId: data.townId, //区ID
+					address: data.address, //地址
+					mobile: data.mobile, //手机
+					defaultFlag: data.defaultFlag //是否默认收货地址(0 不是默认,1 默认)
+				}
+				this.postAddressData(this.params)
+			} else {
+				this.params = this.addressData
+				this.postAddressData(this.params)
+			}
+		},
+		async postAddressData(params) {
+			try {
+				this.btnText(true)
+				const res = await this.UserService.AddressSave(params)
+				const data = res.data
+				this.$util.msg('保存成功', 1500, true, 'success')
+				this.btnText(false)
+				if (this.isSelect) {
+					uni.setStorageSync('selectAddress', data)
+					let pages = getCurrentPages()
+					let prevPage = pages[pages.length - 2] //上一个页面
+					prevPage.setData({ select: 'select' })
+				}
+				uni.navigateBack()
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+				this.btnText(false)
+			}
+		},
+		btnText(flg) {
+			if (flg) {
+				this.isConfirm = true
+				this.buttonText = '保存中...'
+			} else {
+				this.isConfirm = false
+				this.buttonText = '保存'
+			}
+		},
+		onShouHuoRen(e) {
+			this.addressData.receiver = e.detail.value
+			this.initInput()
+		},
+		onMobile(e) {
+			this.addressData.mobile = e.detail.value
+			this.initInput()
+		},
+		onTextareaInput(e) {
+			this.addressData.address = e.detail.value
+			this.initInput()
+		},
+		initInput() {
+			if (
+				this.addressData.receiver !== '' &&
+				this.addressData.mobile !== '' &&
+				this.addressData.address !== '' &&
+				this.addressData.townId !== ''
+			) {
+				this.isConfirm = false
+			} else {
+				this.isConfirm = true
+			}
+		}
+	},
+	onShow() {
+		this.$api.getComStorage('orderUserInfo').then(resolve => {
+			this.addressData.userId = resolve.userId ? resolve.userId : 0
+			console.log('userId', this.addressData.userId)
+		})
+	}
+}
+</script>
+
+<style lang="scss">
+page {
+	height: auto;
+	background: $bg-color;
+	// border-top: 1px solid #EBEBEB;
+}
+.placeholder {
+	color: #b2b2b2;
+}
+.add-content {
+	width: 702rpx;
+	padding: 0 24rpx;
+	.input-row {
+		align-items: center;
+		position: relative;
+		width: 702rpx;
+		height: 88rpx;
+		margin: 0 auto;
+		border-bottom: 2rpx solid #e1e1e1;
+		.label {
+			width: 100rpx;
+			line-height: 88rpx;
+			color: #666666;
+			font-size: $font-size-28;
+			float: left;
+			&.address {
+				width: 120rpx;
+			}
+		}
+		.input {
+			width: 500rpx;
+			height: 100%;
+			font-size: $font-size-28;
+			line-height: 88rpx;
+			display: inline-block;
+			color: #333333;
+			float: left;
+			padding-left: 20rpx;
+		}
+		&.b-b {
+			margin: 20rpx 0;
+		}
+	}
+}
+.icon-xiayibu {
+	font-size: 36rpx;
+	color: #b2b2b2;
+	position: absolute;
+	right: 0;
+	top: 10rpx;
+}
+.text-textarea {
+	width: 654rpx;
+	height: 147rpx;
+	padding: 24rpx;
+	// background: #F7F7F7;
+	border-bottom: 2rpx solid #e1e1e1;
+	.textarea {
+		width: 100%;
+		height: 100%;
+		font-size: $font-size-28;
+		color: $text-color;
+		z-index: 1;
+	}
+	.textarea.hide {
+		opacity: 0;
+	}
+	.textarea.show {
+		color: #999999;
+	}
+}
+.default-row {
+	background: #ffffff;
+	margin-top: 16upx;
+	.tit {
+		font-size: $font-size-28;
+		line-height: 40rpx;
+		color: #333333;
+		flex: 1;
+	}
+	switch {
+		transform: translateX(16upx) scale(0.9);
+	}
+}
+.add-btn {
+	width: 702rpx;
+	height: 90rpx;
+	font-size: $font-size-30;
+	line-height: 90rpx;
+	color: #ffffff;
+	margin: 0 auto;
+	text-align: center;
+	background: $btn-confirm;
+	border-radius: 45rpx;
+	border-radius: 44rpx;
+	margin-top: 80rpx;
+}
+.add-btn.disabled {
+	background: #f8f8f8;
+	border-radius: 44rpx;
+}
+</style>

+ 1 - 1
pages/seller/cart/components/index.vue

@@ -63,7 +63,7 @@
 													</view>
 													<view
 														class="count"
-														v-if="pros.validFlag == 1"
+														v-if="pros.validFlag == 2"
 														:class="[isshowDelbtn ? 'none' : 'show']"
 													>
 														<text class="count-tips" v-if="pros.number < pros.min"

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

@@ -39,11 +39,10 @@ const cartMixins = {
                 )
                 return
             }
-            // 友盟埋点购物车去结算点击事件
             let cartSkuIds = { skuIds: skuIds.substring(0, skuIds.lastIndexOf(',')) }
             console.log('cartSkuIds',cartSkuIds)
             this.$api.navigateTo(
-                `/pages/user/order/create-order?type=2&data=${JSON.stringify({ data: cartSkuIds })}`
+                `/pages/seller/order/order-confirm?type=2&data=${JSON.stringify({ data: cartSkuIds })}`
             )
         },
         handleBtnConfirm(data) {

+ 3 - 2
pages/seller/goods/list.vue

@@ -39,8 +39,8 @@
 					</view>
 				</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>
@@ -178,6 +178,7 @@ export default {
 					} else {
 						if (this.productList.length < 8) {
 							this.pullUpOn = true
+							this.loadding = false
 						} else {
 							this.pullUpOn = false
 							this.loadding = false

+ 1 - 1
pages/seller/index/components/user.vue

@@ -167,7 +167,7 @@ export default {
 				//顶部自定义导航
 				showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
 				showSearch: 0,
-				title: '账户中心', // 导航栏 中间的标题
+				title: '个人中心', // 导航栏 中间的标题
 				haveBack: false,
 				textLeft: this.$store.state.isIphone,
 				textColor: '#FFFFFF',

+ 3 - 2
pages/seller/order/components/sellerAddress.vue → pages/seller/order/components/cm-address-temp.vue

@@ -27,7 +27,7 @@
 		 		</view>
 		 	</view>
 		 </navigator>
-		 <image  src="../../../static/temp/line@3x.png" mode=""></image>
+		<image  :src="StaticUrl + '/icon/line@3x.png'" mode=""></image>
 	</view>
 </template>
 
@@ -43,6 +43,7 @@
 			return{
 				isEmpty:false,
 				addressSrc:'',
+				StaticUrl: this.$Static,
 			}
 		},
 		created(){
@@ -62,7 +63,7 @@
 			initData(res) {
 				if(Object.keys(res).length == 0){
 					this.isEmpty = true
-					this.addressSrc = '/pages/seller/address/addressManage'
+					this.addressSrc = '/pages/seller/address/addressManage?type=select'
 				}else{
 					this.isEmpty = false
 					this.$parent.isFreight = false

+ 235 - 0
pages/seller/order/components/cm-details-button.vue

@@ -0,0 +1,235 @@
+<template name="button">
+	<view class="button-template" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
+		<!-- 底部按钮 -->
+		<view class="button-content">
+			<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="btn btn-share" v-else @click.stop="onShareCode(2)">
+					<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>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'button',
+	props: {
+		status: {
+			type: Number
+		},
+		order: {
+			type: Object
+		},
+		ableUserMoney: {
+			type: Number
+		},
+		rechargeGoods: {
+			type: Boolean
+		},
+		shareCode: {
+			type: String
+		},
+		secondHandOrderFlag: {
+			type: String
+		}
+	},
+	watch: {
+		status: {
+			handler: function(val) {
+				this.initData(val)
+			},
+			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]);
+					}
+				})
+			})
+		},
+		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,
+				shopOrderId: order.shopOrderId,
+				order: order
+			}
+			this.$emit('buttonConfirm', data)
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+.button-template {
+	width: 100%;
+	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;
+			.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: -69rpx;
+				&:before {
+					content: '';
+					width: 25rpx;
+					height: 25rpx;
+					background: #ff5b00;
+					position: absolute;
+					bottom: -8rpx;
+					left: 30rpx;
+					z-index: -1;
+					transform: rotate(45deg);
+				}
+			}
+		}
+	}
+}
+</style>

+ 471 - 0
pages/seller/order/components/cm-freight-popup.vue

@@ -0,0 +1,471 @@
+<template name="freight">
+	<!-- 运费信息 -->
+	<view>
+		<view class="goods-pros-m">
+			<view class="freight-main">
+				<view class="freight-left">运费:</view>
+				<view class="freight-right" @click.stop="handlePupShow">
+					<template v-if="handlePostageFlag === 0">
+						<view class="freight-text" v-if="handleSupplier.isColdChina"
+							>¥{{ handleSupplier.coldChain | NumFormat }}</view
+						>
+						<view class="freight-text" v-else>包邮</view>
+					</template>
+					<view class="freight-text" v-if="handlePostageFlag === 1"
+						>¥{{ handleTotalPostage | NumFormat }}</view
+					>
+					<template v-if="handlePostageFlag === 2">
+						<view class="freight-text" v-if="handleSupplier.isColdChina"
+							>¥{{ handleSupplier.coldChain | NumFormat }}</view
+						>
+						<view class="freight-text" v-else>到付</view>
+					</template>
+					<view class="select"><text class="iconfont icon-xiangyou"></text></view>
+				</view>
+			</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>
+						</label>
+					</radio-group>
+					<template v-if="handlePostageFlag === 0">
+						<view class="freight-form">
+							<view class="freight-form-item" v-if="handleSupplier.coldChain > 0">
+								<view class="label">冷链运输费</view>
+								<view class="texts">
+									<text>¥{{ handleSupplier.coldChain | NumFormat }}</text>
+									<text
+										class="iconfont"
+										:class="[isColdChina ? 'icon-yixuanze' : 'icon-weixuanze']"
+										@click.stop="handleChangeColdChina"
+									>
+									</text>
+								</view>
+							</view>
+							<view class="freight-form-item">
+								<view class="label">其他运费 </view> <view class="texts red">包邮</view>
+							</view>
+							<view class="freight-form-item">
+								<view class="label">总运费</view>
+								<view class="texts red" v-if="handleSupplier.isColdChina"
+									>¥{{ handleSupplier.coldChain | NumFormat }}</view
+								>
+								<view class="texts red" v-else>包邮</view>
+							</view>
+						</view>
+					</template>
+					<template v-if="handlePostageFlag === 1">
+						<view class="freight-form">
+							<view class="freight-form-item">
+								<input
+									class="form-input"
+									type="number"
+									v-model="handlePostageVal"
+									@input="handleInputPostage"
+									placeholder="请填写运费"
+									maxlength="20"
+								/>
+							</view>
+							<view class="freight-form-item" v-if="handleSupplier.coldChain > 0">
+								<view class="label">冷链运输费</view>
+								<view class="texts">
+									<text>¥{{ handleSupplier.coldChain | NumFormat }}</text>
+									<text
+										class="iconfont"
+										:class="[isColdChina ? 'icon-yixuanze' : 'icon-weixuanze']"
+										@click.stop="handleChangeColdChina"
+									>
+									</text>
+								</view>
+							</view>
+							<view class="freight-form-item">
+								<view class="label">其他运费 </view>
+								<view class="texts">¥{{ handleSupplier.postage | NumFormat }} </view>
+							</view>
+							<view class="freight-form-item">
+								<view class="label">总运费 </view>
+								<view class="texts red">¥{{ handleTotalPostage | NumFormat }} </view>
+							</view>
+						</view>
+					</template>
+					<template v-if="handlePostageFlag === 2">
+						<view class="freight-form">
+							<view class="freight-form-item" v-if="handleSupplier.coldChain > 0">
+								<view class="label">冷链运输费</view>
+								<view class="texts">
+									<text>¥{{ handleSupplier.coldChain | NumFormat }}</text>
+									<text
+										class="iconfont"
+										:class="[isColdChina ? 'icon-yixuanze' : 'icon-weixuanze']"
+										@click.stop="handleChangeColdChina"
+									>
+									</text>
+								</view>
+							</view>
+							<view class="freight-form-item">
+								<view class="label">其他运费 </view><view class="texts red">到付</view>
+							</view>
+							<view class="freight-form-item">
+								<view class="label">总运费</view>
+								<view class="texts red" v-if="handleSupplier.isColdChina"
+									>¥{{ handleSupplier.coldChain | NumFormat }}</view
+								>
+								<view class="texts red" v-else>到付</view>
+							</view>
+						</view>
+					</template>
+					<view class="freight-btn" @click="handleComfirm"> 确定 </view>
+				</view>
+			</tui-bottom-popup>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'freight',
+	props: {
+		supplier: {
+			type: Object
+		},
+		index: {
+			type: Number
+		}
+	},
+	data() {
+		return {
+			popupShow: false,
+			isColdChina: false,
+			handleColdChain:0,// 记录冷链费
+			handlePostage: 0, // 记录原始运费
+			handlePostageVal: 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.handleColdChain = data.coldChain
+			this.handleTotalPrice = data.totalPrice
+			this.handlePostage = this.handlePostageVal = data.postage
+			this.handlePostageFlag = data.handlePostageFlag
+			console.log('handlePostageFlag', this.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
+			}
+		},
+		handleInputPostage(e) {
+			//处理邮费显示
+			// if (e.detail.value == '') {
+			// 	this.handleSupplier.postage = 0
+			// }
+		},
+		// 勾选冷链费
+		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)
+			}
+		},
+		// 切换运费类型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() {
+			if (this.handlePostageFlag === 0) {
+				let handleTotalPrice = this.isColdChina ? this.handleTotalPrice : Number(this.repiceNumSub(this.handleTotalPrice, this.handleColdChain))
+				this.handleSupplier.totalPrice = Number(this.repiceNumSub(handleTotalPrice, this.handleSupplier.postage))
+				this.$emit('changePostage', this.handleSupplier, this.index)
+			} else if (this.handlePostageFlag === 1) {
+				if (this.handlePostageVal == 0 || !this.handlePostageVal) {
+					this.$util.msg('请填写运费', 2000)
+					return
+				}
+				this.handleSupplier.totalPrice = Number(
+					(this.handleTotalPrice * 100 - this.handlePostage * 100 + this.handlePostageVal * 100) / 100
+				)
+				this.handleSupplier.postage = this.handlePostageVal
+				this.$emit('changePostage', this.handleSupplier, this.index)
+			} else {
+				let handleTotalPrice = this.isColdChina ? this.handleTotalPrice : Number(this.repiceNumSub(this.handleTotalPrice, this.handleColdChain))
+				this.handleSupplier.totalPrice = Number(this.repiceNumSub(handleTotalPrice, this.handleSupplier.postage))
+				this.$emit('changePostage', this.handleSupplier, this.index)
+			}
+			this.popupShow = false
+		},
+		//减法精确,arg2:被减数,arg1:减数
+		repiceNumSub(arg1, arg2) {
+			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">
+.goods-pros-m {
+	width: 100%;
+	box-sizing: border-box;
+	padding: 10rpx 0;
+	.freight-main {
+		width: 100%;
+		height: 78rpx;
+		line-height: 78rpx;
+		font-size: $font-size-28;
+		color: $text-color;
+		background: #ffffff;
+		float: left;
+		.freight-left {
+			float: left;
+			font-weight: bold;
+		}
+		.freight-right {
+			float: right;
+			color: #333333;
+			position: relative;
+			.freight-text {
+				float: left;
+			}
+			.select {
+				float: right;
+				height: 78rpx;
+				padding: 0 20rpx;
+				line-height: 78rpx;
+				color: #333333;
+				font-weight: normal;
+				position: relative;
+				.select-text {
+					display: inline-block;
+					float: left;
+					margin-right: 30rpx;
+				}
+				.iconfont {
+					width: 60rpx;
+					height: 78rpx;
+					line-height: 78rpx;
+					text-align: right;
+					position: absolute;
+					right: 0;
+					top: 0;
+					font-size: $font-size-30;
+					color: #b2b2b2;
+				}
+			}
+		}
+	}
+	.freight-bean {
+		width: 100%;
+		height: 58rpx;
+		line-height: 58rpx;
+		float: left;
+		.bean-le {
+			float: left;
+			color: #666666;
+			font-size: $font-size-26;
+			font-weight: normal;
+		}
+		.bean-ri {
+			float: right;
+			display: flex;
+			align-items: center;
+			.checkbox-box {
+				display: flex;
+				width: 60rpx;
+				float: left;
+				height: 100%;
+				font-size: $font-size-26;
+				margin-top: 8rpx;
+				.checkbox {
+					width: 40rpx;
+					text-align: right;
+					box-sizing: border-box;
+					text-align: center;
+					text-decoration: none;
+					border-radius: 0;
+					-webkit-tap-highlight-color: transparent;
+					overflow: hidden;
+					color: $color-system;
+				}
+			}
+		}
+	}
+}
+.freight-title {
+	color: #333333;
+	font-size: 32rpx;
+	text-align: center;
+	margin: 40rpx 0;
+}
+.freight-content {
+	box-sizing: border-box;
+	padding: 0 24rpx;
+	font-weight: normal;
+	radio {
+		margin-right: 8rpx;
+	}
+	.label {
+		color: #666666;
+		font-size: 28rpx;
+		margin-right: 102rpx;
+	}
+	.freight-btn {
+		height: 90rpx;
+		background: $btn-confirm;
+		border-radius: 45rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		color: #ffffff;
+		width: 100%;
+		margin: 100rpx 0 0 0;
+	}
+}
+.freight-form {
+	margin-top: 50rpx;
+	width: 100%;
+	.freight-form-item {
+		width: 100%;
+		height: 60rpx;
+		line-height: 60rpx;
+		margin-bottom: 24rpx;
+		color: #666666;
+		font-size: 28rpx;
+		.label {
+			width: 50%;
+			float: left;
+			margin-right: 0;
+		}
+		.texts {
+			width: 50%;
+			float: right;
+			text-align: right;
+			&.red {
+				color: #f94b4b;
+			}
+			.iconfont {
+				margin-left: 20rpx;
+				color: $color-system;
+			}
+		}
+		.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>

+ 126 - 50
pages/seller/order/components/sellerGoodsList.vue → pages/seller/order/components/cm-goods-temp.vue

@@ -2,11 +2,14 @@
 	<view class="goods-template">
 		<!-- 商品列表 -->
 		<view class="goods-list">
-			<view v-for="(item, index) in goodsData" :key="index" class="goods-item">
+			<view v-for="(supplier, index) in goodsData" :key="index" class="goods-item">
 				<view class="shoptitle">
-					<view class="title-text">{{ item.shopName }}</view>
+					<view v-if="supplier.promotions" class="floor-item-act">
+						<view class="floor-tags">{{ supplier.promotions.name }}</view>
+					</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="" />
@@ -24,6 +27,29 @@
 								>
 								<view class="count"><text class="small">x</text>{{ pros.number }}</view>
 							</view>
+							<view class="floor-item-act">
+								<template v-if="pros.actStatus == 1 && pros.promotions">
+									<view v-if="PromotionsFormat(pros.promotions)" class="floor-tags">
+										{{ pros.promotions.name }}
+										<text v-if="pros.promotions">
+											:¥{{
+												pros.promotions == null
+													? '0.00'
+													: pros.promotions.touchPrice | NumFormat
+											}}
+										</text>
+									</view>
+									<view v-else-if="pros.promotions.type != 3" class="floor-tags">{{
+										pros.promotions.name
+									}}</view>
+								</template>
+								<template v-if="pros.svipProductFlag == 1 && vipFlag == 1">
+									<view class="svip-tags">
+										<view class="tags">SVIP</view>
+										<view class="price">{{ pros.svipPriceTag }}</view>
+									</view>
+								</template>
+							</view>
 						</view>
 					</view>
 				</view>
@@ -40,18 +66,25 @@
 						/>
 					</view>
 				</view>
+				<!-- 运费 -->
+				<cm-freight-popup         
+					ref="freight"
+					v-if="isFreight"
+					: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"
-						>合计:<text class="money"
-							>¥{{ (item.originalPrice - item.reducedPrice) | NumFormat }}</text
-						></view
+					<view class="sum" v-if="secondflag"
+						>合计:<text class="money">¥{{ supplier.totalPrice | NumFormat }}</text></view
 					>
 				</view>
 			</view>
@@ -60,19 +93,31 @@
 </template>
 
 <script>
+import cmFreightPopup from './cm-freight-popup'
 export default {
 	name: 'goods',
+	components: {
+		cmFreightPopup
+	},
 	props: {
 		goodsData: {
 			type: Array
+		},
+		secondflag: {
+			type: Boolean,
+			default: true
 		}
 	},
 	data() {
 		return {
-			remark: []
+			isFreight:false,
+			remark: [],
+			vipFlag: 0
 		}
 	},
-	created() {},
+	created() {
+		this.initGetStotage()
+	},
 	filters: {
 		NumFormat(value) {
 			//处理金额
@@ -90,6 +135,23 @@ export default {
 	},
 	computed: {},
 	methods: {
+		async initGetStotage() {
+			const userInfo = await this.$api.getStorage()
+			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
+			this.isFreight = true
+		},
+		// 勾选冷链费操作
+		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) {
@@ -147,6 +209,14 @@ export default {
 				line-height: 56rpx;
 				font-weight: bold;
 			}
+			.floor-item-act {
+				height: 56rpx;
+				text-align: center;
+				box-sizing: border-box;
+				float: left;
+				padding: 12rpx 0;
+				margin-right: 12rpx;
+			}
 		}
 		.productlist {
 			width: 100%;
@@ -206,18 +276,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 {
@@ -236,42 +305,13 @@ export default {
 					}
 				}
 			}
-		}
-		.goods-pros-m {
-			height: 76rpx;
-			line-height: 76rpx;
-			font-size: $font-size-26;
-			color: $text-color;
-			margin-top: 12rpx;
-			.m-text {
-				width: 62rpx;
+			.floor-item-act {
+				width: 100%;
+				height: 56rpx;
+				text-align: center;
+				box-sizing: border-box;
 				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;
-				}
+				padding: 0 0 10rpx 0;
 			}
 		}
 		.goods-pros-b {
@@ -317,6 +357,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;
 		}
 	}
 }

+ 454 - 0
pages/seller/order/components/cm-invice-popup.vue

@@ -0,0 +1,454 @@
+<template name="cm-parameter">
+	<view class="invoice-template">
+		<!-- 发票信息 -->
+		<view class="invoice-title" @tap.stop="handleShowPopup">
+			<text class="text">发票信息:</text> <text class="invoice-text">{{ invoiceText }}</text>
+			<text class="iconfont icon-xiangyou"></text>
+		</view>
+		<tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup">
+			<view class="tui-popup-box clearfix">
+				<view class="title">发票信息</view>
+				<view class="tui-popup-close" @click="hidePopup">
+					<text class="iconfont icon-iconfontguanbi"></text>
+				</view>
+				<view class="tui-popup-main">
+					<view class="popup-form">
+						<text
+							class="radio"
+							v-for="(invoice, index) in invoiceType"
+							:key="index"
+							@click="handleTnvoiceType(invoice.type, index)"
+							:class="invoiceTypeIndex === index ? 'active' : ''"
+						>
+							{{ invoice.name }}
+						</text>
+					</view>
+					<view class="popup-form" v-if="invoiceTypeIndex === 1">
+						<view class="label">抬头类型:</view>
+						<text
+							class="radio"
+							v-for="(title, index) in titleType"
+							:key="index"
+							@click="handleTitleType(title.type, index)"
+							:class="titleIndex === index ? 'active' : ''"
+						>
+							{{ title.name }}
+						</text>
+					</view>
+					<view class="popup-form" v-if="invoiceTypeIndex > 0">
+						<view class="label">发票抬头:</view>
+						<input
+							class="input"
+							type="text"
+							v-model="invoiceData.invoiceTitle"
+							placeholder="请输入发票抬头"
+							maxlength="50"
+							cursor-spacing="40"
+						/>
+					</view>
+					<template v-if="invoiceTypeIndex === 2 || titleIndex === 1">
+						<view class="popup-form">
+							<view class="label">单位税号:</view>
+							<input
+								class="input"
+								type="text"
+								v-model="invoiceData.corporationTaxNum"
+								placeholder="请输入单位税号"
+								maxlength="30"
+								cursor-spacing="40"
+							/>
+						</view>
+						<view class="popup-form">
+							<view class="label">注册地址:</view>
+							<input
+								type="text"
+								class="input"
+								v-model="invoiceData.registeredAddress"
+								:placeholder="invoiceTypeIndex === 2 ? '请输入注册地址' : '选填'"
+								maxlength="50"
+								cursor-spacing="40"
+							/>
+						</view>
+						<view class="popup-form">
+							<view class="label">注册电话:</view>
+							<input
+								type="number"
+								class="input"
+								v-model="invoiceData.registeredPhone"
+								:placeholder="invoiceTypeIndex === 2 ? '请输入注册电话' : '选填'"
+								maxlength="11"
+								cursor-spacing="40"
+							/>
+						</view>
+						<view class="popup-form">
+							<view class="label">开户银行:</view>
+							<input
+								type="text"
+								class="input"
+								v-model="invoiceData.openBank"
+								:placeholder="invoiceTypeIndex === 2 ? '请输入开户银行' : '选填'"
+								maxlength="50"
+								cursor-spacing="40"
+							/>
+						</view>
+						<view class="popup-form">
+							<view class="label">银行账号:</view>
+							<input
+								type="number"
+								class="input"
+								v-model="invoiceData.bankAccountNo"
+								:placeholder="invoiceTypeIndex === 2 ? '请输入银行账号' : '选填'"
+								maxlength="30"
+								cursor-spacing="40"
+							/>
+						</view>
+					</template>
+				</view>
+				<view class="tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
+					<view class="tui-modal-flex">
+						<button
+							class="tui-modal-button"
+							:disabled="disabled"
+							@click="handleConfirm"
+						>
+							确定
+						</button>
+					</view>
+				</view>
+			</view>
+		</tui-bottom-popup>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'cm-prams-popup',
+	props: {},
+	data() {
+		return {
+			popupShow: false,
+			isIphoneX: this.$store.state.isIphoneX,
+			userId:0,
+			invoiceTypeIndex: 0,
+			titleIndex: 0,
+			invoiceType: [
+				{
+					name: '不开发票',
+					type: 0
+				},
+				{
+					name: '普通发票',
+					type: 1
+				},
+				{
+					name: '增值税专用发票',
+					type: 2
+				}
+			],
+			titleType: [
+				{
+					name: '个人',
+					type: 0
+				},
+				{
+					name: '单位',
+					type: 1
+				}
+			],
+			invoiceText: '不开发票',
+			invoiceData: {
+				type: 0, 		//发票类型 0 不开发票 1 普通发票 2 增值税发票
+				headingType: 0, 		//抬头类型 0 个人 1 单位
+				invoiceTitle: '', 		//发票抬头
+				corporationTaxNum: '',  //单位税号
+				registeredAddress: '',  //单位地址
+				registeredPhone: '',    //注册电话
+				openBank: '', 		    //开户银行
+				bankAccountNo: ''       //银行账号
+			}
+		}
+	},
+	created() {
+		
+	},
+	computed: {
+		
+	},
+	methods: {
+		// 切换发票类型
+		handleTnvoiceType(type, index) {
+			this.invoiceTypeIndex = index
+			this.invoiceData.type = type
+			if(this.invoiceTypeIndex === 1){
+				this.titleIndex = 0
+				this.invoiceData.headingType = 0
+			}
+		},
+		// 切换抬头类型
+		handleTitleType(type, index) {
+			this.titleIndex = index
+			this.invoiceData.headingType = type
+		},
+		// 显示发票弹窗 查询发票信息
+		handleShowPopup(){
+			this.getUseFindInvoice()
+		},
+		// 确认保存发票
+		handleConfirm(){
+			if(this.invoiceTypeIndex === 0){
+				this.invoiceData = {...this.invoiceData , ...{ type : 0 }}
+				this.invoiceText = this.setInvoiceText(this.invoiceData)
+				this.hidePopup()
+			}else{
+				this.checkedInput()
+			}
+		},
+		// 校验必填项
+		checkedInput(){
+			/**
+			 *  普通发票 个人 仅校验发票抬头
+			 * 	普通发票 单位 校验发票抬头 校验单位税号
+			 *  增值税发票 校验全部
+			 * */ 
+			if(this.invoiceTypeIndex === 1 && this.titleIndex === 0){
+				if (!this.invoiceData.invoiceTitle) {
+					this.$util.msg('请输入发票抬头', 2000)
+					return
+				}
+			}
+			if(this.invoiceTypeIndex === 1 && this.titleIndex === 1){
+				if (!this.invoiceData.invoiceTitle) {
+					this.$util.msg('请输入发票抬头', 2000)
+					return
+				}
+				if (!this.invoiceData.corporationTaxNum) {
+					this.$util.msg('请输入单位税号', 2000)
+					return
+				}
+			}
+			if(this.invoiceTypeIndex === 2){
+				if (!this.invoiceData.invoiceTitle) {
+					this.$util.msg('请输入发票抬头', 2000)
+					return
+				}
+				if (!this.invoiceData.corporationTaxNum) {
+					this.$util.msg('请输入单位税号', 2000)
+					return
+				}
+				if (!this.invoiceData.registeredAddress) {
+					this.$util.msg('请输入注册地址', 2000)
+					return
+				}
+				if (!this.invoiceData.registeredPhone) {
+					this.$util.msg('请输入注册电话', 2000)
+					return
+				}
+				if (!this.invoiceData.openBank) {
+					this.$util.msg('请输入开户银行', 2000)
+					return
+				}
+				if (!this.invoiceData.bankAccountNo) {
+					this.$util.msg('请输入银行账号', 2000)
+					return
+				}
+			}
+			this.updateInvoiceFn()
+		},
+		//获取发票信息
+		async getUseFindInvoice() {
+			try {
+				this.popupShow = true
+				const resolve = await this.$api.getComStorage('orderUserInfo')
+				this.userId = resolve.userId
+				const res = await this.OrderService.GetFindInvoice({ userId: resolve.userId })
+				this.invoiceData = {...this.invoiceData, ...res.data}
+				console.log('invoiceData',this.invoiceData)
+			} catch (error) {
+				console.log('error',error)
+			}
+		},
+		//保存发票信息
+		async updateInvoiceFn() {
+			try {
+				const resolve = await this.$api.getComStorage('orderUserInfo')
+				const res = await this.OrderService.UpdateInvoice({ ...this.invoiceData,...{userId: resolve.userId }})
+				this.invoiceText = this.setInvoiceText(this.invoiceData)
+				this.$emit('handleChoiceaInvoice', this.invoiceData)
+				this.popupShow = false
+			} catch (error) {
+				console.log('error',error)
+			}
+		},
+		// 设置发票文案
+		setInvoiceText(data){
+			const map = {
+				0:'个人',
+				1:'单位'
+			}
+			switch (data.type){
+				case 0:
+					return `不开发票`
+					break;
+				case 1:
+					return `普票-${map[data.headingType]}(${this.nameFilters(data.invoiceTitle)})`
+					break;
+				case 2:
+					return `专票(${this.nameFilters(data.invoiceTitle)})`
+					break;
+			}
+		},
+		nameFilters(value) {
+			if(value && value.length>10){
+				return value.substring(0,10)+"..." 
+			}else{
+				return value
+			}
+		},
+		hidePopup() {
+			this.popupShow = false
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+.invoice-template {
+	width: 100%;
+	height: auto;
+	background: #ffffff;
+	float: left;
+	margin-top: 24rpx;
+	.invoice-title {
+		width: 702rpx;
+		padding: 0 24rpx;
+		height: 88rpx;
+		line-height: 88rpx;
+		position: relative;
+		border-bottom: 1px solid #ebebeb;
+		.text {
+			font-size: $font-size-28;
+			color: $text-color;
+			font-weight: bold;
+		}
+		.invoice-text {
+			font-size: $font-size-28;
+			color: #F85050;
+			line-height: 90rpx;
+			display: inline-block;
+			float: right;
+			box-sizing: border-box;
+			padding-right: 40rpx;
+		}
+		.iconfont {
+			width: 50rpx;
+			height: 88rpx;
+			line-height: 88rpx;
+			color: #999999;
+			display: block;
+			position: absolute;
+			right: 0;
+			top: 0;
+		}
+	}
+}
+.tui-popup-box {
+	position: relative;
+	box-sizing: border-box;
+	min-height: 220rpx;
+	padding: 24rpx 24rpx 0 24rpx;
+	.title {
+		font-size: $font-size-34;
+		color: $text-color;
+		line-height: 88rpx;
+		text-align: center;
+		float: left;
+		width: 100%;
+		height: 88rpx;
+		font-weight: bold;
+	}
+	.tui-popup-close {
+		width: 90rpx;
+		height: 90rpx;
+		position: absolute;
+		right: 0;
+		top: 24rpx;
+		line-height: 90rpx;
+		text-align: center;
+		color: #b2b2b2;
+		.icon-iconfontguanbi {
+			font-size: $font-size-40;
+		}
+	}
+	.tui-popup-main {
+		width: 100%;
+		float: left;
+		min-height: 400rpx;
+		.popup-form {
+			width: 100%;
+			height: 112rpx;
+			box-sizing: border-box;
+			padding: 23rpx 0;
+			border-bottom: 1px solid #e1e1e1;
+			&.none{
+				border-bottom: none;
+			}
+			.label {
+				width: 140rpx;
+				float: left;
+				font-size: $font-size-28;
+				line-height: 64rpx;
+				color: #666666;
+			}
+			.radio {
+				height: 64rpx;
+				padding: 0 28rpx;
+				line-height: 64rpx;
+				color: #666666;
+				text-align: center;
+				border-radius: 32rpx;
+				margin: 0 8rpx;
+				display: inline-block;
+				background: #f5f5f5;
+				font-size: $font-size-28;
+				&.active {
+					background: #fff4e6;
+					color: #f3b574;
+				}
+			}
+			.input {
+				line-height: 64rpx;
+				height: 64rpx;
+				color: #333333;
+				font-size: $font-size-28;
+			}
+		}
+	}
+	.tui-popup-btn {
+		width: 100%;
+		height: auto;
+		float: left;
+	}
+	.tui-modal-flex {
+		width: 100%;
+		height: 84rpx;
+		margin-top: 40rpx;
+		display: flex;
+		.tui-modal-button {
+			flex: 1;
+			line-height: 84rpx;
+			font-size: $font-size-28;
+			text-align: center;
+			border-radius: 42rpx;
+			padding: 0;
+			margin: 0 15rpx;
+			box-sizing: border-box;
+			background: $btn-confirm;
+			color: #ffffff;
+			&.disabled {
+				background: #e1e1e1;
+				border-radius: 42rpx;
+			}
+		}
+	}
+}
+</style>

+ 231 - 0
pages/seller/order/components/cm-list-button.vue

@@ -0,0 +1,231 @@
+<template name="button">
+	<view class="button-template">
+		<!-- 底部按钮 -->
+		<view class="button-content">
+			<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(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', 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
+		},
+		shopOrderId: {
+			type: Number
+		},
+		userId: {
+			type: Number
+		},
+		rechargeGoods: {
+			type: Boolean
+		},
+		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)
+			},
+			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
+					}
+				})
+			})
+		},
+		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.handleShopOrderId = shopOrderId), (this.$parent.btnClubUserId = userId)
+						this.$parent.isShareType = type
+						this.$emit('shareConfirm')
+					}
+				)
+			} 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%;
+	height: auto;
+	float: left;
+	background: #ffffff;
+	.button-content {
+		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;
+			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;
+				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);
+				}
+			}
+		}
+	}
+}
+</style>

+ 12 - 10
pages/seller/order/components/sellerShareAlert.vue → 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

+ 8 - 18
pages/seller/order/components/details/orderAddress.vue → pages/seller/order/components/details/cm-address-temp.vue

@@ -10,7 +10,7 @@
 					</view>
 					<view class="address">
 						<view class="address-icon">
-							<text class="iconfont icon-shouhuodizhi1"></text>
+							<text class="iconfont icon-shouhuodizhi"></text>
 						</view>
 						<view class="address-text">
 							{{addressData.province ? addressData.province : ''}}
@@ -22,7 +22,7 @@
 				</view>
 		 	</view>
 		 </view>
-		 <image  src="../../../static/temp/line@3x.png" mode=""></image>
+		 <image class="a-bg"  :src="StaticUrl + '/icon/line@3x.png'" mode=""></image>
 	</view>
 </template>
 
@@ -37,7 +37,8 @@
 		},
 		data() {
 			return{
-				initData:''
+				initData:'',
+				StaticUrl: this.$Static,
 			}
 		},
 		created(){
@@ -57,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 {
@@ -75,7 +74,6 @@
 		height: auto;
 		float: left;
 		position: relative;
-		
 		.address-empty{
 			width: 100%;
 			height: 84rpx;
@@ -98,14 +96,14 @@
 			background: #fff;
 		}
 		
-		.icon-shouhuodizhi1 {
+		.icon-shouhuodizhi {
 			flex-shrink: 0;
 			display: flex;
 			align-items: center;
 			justify-content: center;
 			width: 40rpx;
 			color: $color-system;
-			font-size: 46rpx;
+			font-size: 40rpx;
 			margin-right: 10rpx;
 		}	
 		.address-cen {
@@ -157,18 +155,10 @@
 				}
 			}
 		}
-		.icon-xiangyou {
+		.icon-xiayibu {
 			font-size: 32rpx;
 			color: $text-color;
 			margin-right: 30rpx;
 		}
-		.a-bg {
-			position: absolute;
-			left: 0;
-			bottom: 0;
-			display: block;
-			width: 100%;
-			height: 5rpx;
-		}
 	}
 </style>

+ 102 - 53
pages/seller/order/components/details/goodsList.vue → pages/seller/order/components/details/cm-goods-temp.vue

@@ -1,51 +1,94 @@
 <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 class="title-text" v-if="information.secondHandOrderFlag == 1"
+					<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="orderInfo.secondHandOrderFlag == 1"
 						>{{ item.shopName }}
+						<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="" />
+								<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">¥{{ pros.price | NumFormat }}</view>
-								<view class="view-num right">x {{ pros.num }}</view>
+								<view
+									class="view-num red"
+									:class="
+										item.svipPriceFlag == 1 || PromotionsFormat(item.productPromotion) ? 'none' : ''
+									"
+									>¥{{ item.price | NumFormat }}</view
+								>
+								<view class="view-num right">x {{ item.num }}</view>
+							</view>
+							<view class="floor-item-act">
+								<template v-if="item.productPromotion">
+									<view
+										v-if="PromotionsFormat(item.productPromotion)"
+										class="floor-tags"
+										@click.stop="clickPopupShow(item.productPromotion)"
+									>
+										{{ item.productPromotion.name }}
+										<text v-if="item.productPromotion != null && item.productPromotion.type != 3">
+											:¥{{
+												item.productPromotion == null
+													? '0.00'
+													: item.productPromotion.touchPrice | NumFormat
+											}}
+										</text>
+									</view>
+									<view
+										v-else-if="item.productPromotion.type != 3"
+										class="floor-tags"
+										@click.stop="clickPopupShow(item.productPromotion)"
+										>{{ item.productPromotion.name }}</view
+									>
+								</template>
+								<template v-if="item.svipPriceFlag == 1">
+									<view class="svip-tags">
+										<view class="tags">SVIP</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>
-						<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>
-						<view class="product-view">
-							<view class="view-num">税率:<text class="text">{{ pros.taxRate }}%</text></view>
+					<view class=" product-info clearfix"> 
+						<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="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.discountPrice | NumFormat }}</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">¥{{ 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>
 				</view>
 				<view class="goods-pros-m" v-if="item.note">
 					<view class="m-text">留言:</view>
@@ -53,29 +96,36 @@
 						<view class="text">{{ item.note ? item.note : '' }}</view>
 					</view>
 				</view>
+			</view>
+			<view class="goods-item">
 				<view class="goods-pros-b clearfix">
-					<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.totalAmount | NumFormat }}</view>
+						<view class="price-view-ri">¥{{ orderInfo.totalAmount | 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.postageInfo }}</view>
 					</view>
-					<view class="pros-price-view" v-if="item.isHandelShow">
-						<view class="price-view-le">已付金额:</view>
-						<view class="price-view-ri">¥{{ item.receiptAmount | NumFormat }}</view>
+					<view class="pros-price-view"v-if="orderInfo.eachDiscount > 0">>
+						<view class="price-view-le">优惠:</view>
+						<view class="price-view-ri">¥{{ orderInfo.eachDiscount | NumFormat }}</view>
 					</view>
 					<view class="pros-price-view">
-						<view class="price-view-le">待付金额:</view>
-						<view class="price-view-ri red">¥{{ item.obligation | NumFormat }}</view>
+						<view class="price-view-le">订单总额:</view>
+						<view class="price-view-ri">¥{{ orderInfo.totalAmount | 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 class="pros-price-view">
+						<view class="price-view-le">已付金额:</view>
+						<view class="price-view-ri">
+							¥{{ orderInfo.receiptAmount | NumFormat }}
+							<text v-if="orderInfo.accountAmount > 0">(余额抵扣:¥{{ orderInfo.accountAmount | NumFormat }})</text>
 						</view>
 					</view>
+					<view class="pros-price-view">
+						<view class="price-view-le">待付金额:</view>
+						<view class="price-view-ri red">¥{{ orderInfo.obligation | NumFormat }}</view>
+					</view>
 				</view>
 			</view>
 		</view>
@@ -86,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) {
@@ -119,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){
@@ -136,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) {
@@ -178,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 {
@@ -429,7 +479,6 @@ export default {
 		}
 		.goods-pros-b {
 			width: 100%;
-			padding-top: 12rpx;
 			float: left;
 			.pros-price-view{
 				width: 100%;

+ 0 - 0
pages/user/order/components/details/invoiceTent.vue → pages/seller/order/components/details/cm-invice-temp.vue


+ 40 - 78
pages/seller/order/components/details/orderInformation.vue → pages/seller/order/components/details/cm-order-temp.vue

@@ -5,13 +5,15 @@
 			<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 bold">
-					订单标识:<label class="label">{{ orderData.orderMark ? orderData.orderMark : '' }}</label>
+				<view class="view-man">
+					赠品总数:<label class="label">{{
+						orderData.presentNum
+					}}</label>
 				</view>
 			</view>
 			<view class="information-view">
@@ -19,40 +21,34 @@
 					下单时间:<label class="label">{{ orderData.orderTime ? orderData.orderTime : '' }}</label>
 				</view>
 			</view>
-			<view class="information-view same">
-				<view class="view-num">
-					订单总额:<label class="label">¥{{ orderData.payTotalFee | NumFormat }}</label>
+<!-- 			<view class="information-view same" v-if="orderData.svipFullReduction > 0">
+				<view class="view-man">
+					超级会员优惠:<label class="label">¥{{ orderData.svipFullReduction | NumFormat }}</label>
 				</view>
 			</view>
-			<template v-if="openShowflag">
-				<view class="information-view">
-					<view class="view-num">
-						待付金额:<text class="red">¥{{ orderData.pendingPayments | NumFormat }}</text>
-					</view>
-					<view class="view-man"></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="red">¥{{ orderData.payableAmount | NumFormat }}</label>
-					</view>
-				</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 same" v-if="orderData.discountFee && orderData.discountFee > 0">
+				<view class="view-num">
+					经理折扣:<label class="label">¥{{ orderData.discountFee | NumFormat }}</label>
 				</view>
-				<view class="information-view none">
-					<view class="view-num">
-						运费:<label class="label">{{ orderData.postageInfo }}</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>
-			</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>
@@ -60,9 +56,9 @@
 <script>
 const thorui = require('@/components/clipboard/clipboard.thorui.js')
 export default {
-	name: 'information',
+	name: 'orderInfo',
 	props: {
-		information: {
+		orderInfo: {
 			type: Object
 		}
 	},
@@ -70,11 +66,10 @@ export default {
 		return {
 			orderData: '',
 			openShowflag: false,
-			infoflag: true
 		}
 	},
 	created() {
-		this.initData(this.information)
+		this.initData(this.orderInfo)
 	},
 	filters: {
 		NumFormat(value) {
@@ -82,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)
 			},
@@ -127,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 => {
@@ -165,10 +131,6 @@ export default {
 				width: 45%;
 				text-align: right;
 			}
-			&.none {
-				width: 100%;
-				text-align: left;
-			}
 			// &.title{
 			// 	height: 68rpx;
 			// 	line-height: 68rpx;
@@ -196,11 +158,11 @@ export default {
 				}
 				.bage-buss {
 					display: inline-block;
-					width: 72rpx;
-					height: 30rpx;
+					width: 100rpx;
+					height: 36rpx;
 					background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
 					border-radius: 4rpx;
-					line-height: 30rpx;
+					line-height: 36rpx;
 					font-size: $font-size-24;
 					text-align: center;
 					color: #ffffff;
@@ -208,11 +170,11 @@ export default {
 				}
 				.bage-auto {
 					display: inline-block;
-					width: 72rpx;
-					height: 30rpx;
+					width: 100rpx;
+					height: 36rpx;
 					background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
 					border-radius: 4rpx;
-					line-height: 30rpx;
+					line-height: 36rpx;
 					font-size: $font-size-24;
 					text-align: center;
 					color: #ffffff;
@@ -268,7 +230,7 @@ export default {
 	width: 100%;
 	height: 48rpx;
 	margin-bottom: 30rpx;
-	.btnInfo {
+	.btnInfo{
 		width: 168rpx;
 		height: 48rpx;
 		line-height: 46rpx;

+ 1 - 0
pages/seller/order/components/details/paymentRecord.vue → pages/seller/order/components/details/cm-payment-temp.vue

@@ -68,6 +68,7 @@
 					14: '支付宝',
 					15: '微信支付',
 					16: '余额抵扣',
+					31: '线下支付凭证'
 				}
 				if(record.payType === 28 || record.payType === 29 ){
 					return record.quickPayStr

+ 0 - 0
pages/seller/order/components/details/activipopu.vue → pages/seller/order/components/details/cm-promote-popup.vue


+ 0 - 0
pages/seller/order/components/details/refundRecord.vue → pages/seller/order/components/details/cm-refund-temp.vue


+ 2 - 2
pages/seller/order/components/details/voucherRecord.vue → pages/seller/order/components/details/cm-voucher-temp.vue

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

+ 0 - 197
pages/seller/order/components/details/invoiceTent.vue

@@ -1,197 +0,0 @@
-<template name="invoice">
-	<view class="invoice-template">
-		 <!-- 发票信息 -->
-		 <view class="invoice-content">
-		 	<view class="invoice-title">发票信息</view>
-			<view class="invoice-empty" v-if="isEmpty">
-			 	<text>不要发票</text></text>
-			</view>
-			<view class="invoice-text" v-else>
-				<view class="invoice-top" @click="showInvoice">
-					<view class="name">{{orderInvoice.invoiceTitle ? orderInvoice.invoiceTitle : ''}}</view>
-					<text class="iconfont icon-web_xiangxiazhankai" :class="{'icon-web_xiangxiazhankai-active':isOpen}"></text>
-				</view>
-				<view :class="{'invoice-warp--hide':!isOpen}" class="invoice-warp">
-					<view  class="invoice-warp__wrapper invoice-animation" 
-						   :style="{'transform':isOpen?'translateY(0)':'translateY(-50%)','-webkit-transform':isOpen?'translateY(0)':'translateY(-50%)'}">
-						<view class="table">
-							<text class="label-name">单位名称:</text>
-							<text>{{orderInvoice.invoiceTitle ? orderInvoice.invoiceTitle : ''}}</text>
-						</view>
-						<view class="table long">
-							<text class="label-name">纳锐人识别号:</text>
-							<text>{{orderInvoice.corporationTaxNum ? orderInvoice.corporationTaxNum :''}}</text> 
-						</view>
-						<view class="table">
-							<text class="label-name">注册地址:</text>
-							<text>{{orderInvoice.registeredAddress ? orderInvoice.registeredAddress : ''}}</text> 
-						</view>
-						<view class="table">
-							<text class="label-name">注册电话:</text>
-							<text>{{orderInvoice.registeredPhone ? orderInvoice.registeredPhone : ''}}</text>
-						</view>
-						<view class="table">
-							<text class="label-name">开户银行:</text>
-							<text>{{orderInvoice.openBank ? orderInvoice.openBank : ''}}</text>
-						</view>
-						<view class="table">
-							<text class="label-name">银行账号:</text>
-							<text>{{bankAccountNo ? bankAccountNo : ''}}</text>
-						</view>
-					</view>
-				</view>
-			</view>
-		 </view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:"invoice",
-		props:{
-			orderInvoice:{
-				type:Object
-			}
-		},
-		data() {
-			return{
-				isEmpty:false,
-				title:'发票信息',
-				isOpen:false,
-				bankAccountNo:''
-			}
-		},
-		created(){
-			this.initData(this.orderInvoice)
-		},
-		computed: {
-
-		},
-		methods:{
-			initData(res) {
-				if(res == null || res.type == 0){
-					this.isEmpty = true
-				}else{
-					this.isEmpty = false
-					this.bankAccountNo = this.$reg.bankRegex(res.bankAccountNo)
-				}
-			},
-			onMessage(pros){
-			},
-			showInvoice(){
-				this.isOpen = !this.isOpen
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.invoice-template{
-		width: 100%;
-		height: auto;
-		background: #FFFFFF;
-		float: left;
-		margin-top: 24rpx;
-		.invoice-content{
-			width: 702rpx;
-			padding: 20rpx 24rpx;
-		}
-		.invoice-title{
-			font-size: $font-size-28;
-			color: $text-color;
-			text-align: left;
-			line-height: 40rpx;
-			font-weight: bold;
-			margin-bottom: 30rpx;
-		}
-		.invoice-empty{
-			font-size: $font-size-28;
-			color: $text-color;
-			text-align: left;
-			line-height: 40rpx;
-			.txt{
-				font-size: $font-size-24;
-				color: #999999;
-			}
-		}
-		.invoice-animation {
-			/* transition: transform 0.3s ease;*/
-			transition-property: transform;
-			transition-duration: 0.3s;
-			transition-timing-function: ease;
-		}
-		.invoice-text{
-			width: 100%;
-			height: auto;
-			.invoice-top{
-				width: 100%;
-				height: 40rpx;
-				line-height: 40rpx;
-				font-size: $font-size-28;
-				color: $text-color;
-				text-align: left;
-				.name{
-					width: 400rpx;
-					float: left;
-					-o-text-overflow: ellipsis;
-					text-overflow: ellipsis;
-					display: -webkit-box;
-					word-break: break-all;
-					-webkit-box-orient: vertical;
-					-webkit-line-clamp: 1;
-					overflow: hidden;
-				}
-				.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);
-				}
-			}
-			.invoice-warp{
-				width: 100%;
-				padding: 24rpx 0 0 0;
-				overflow: hidden;
-				.table{
-					padding-left: 130rpx;
-					height: auto;
-					line-height: 64rpx;
-					font-size: $font-size-26;
-					color: $text-color;
-					text-align: left;
-					position: relative;
-					.label-name{
-						display: inline-block;
-						line-height: 64rpx;
-						position: absolute;
-						left: 0;
-						top: 0;
-					}
-					&.long{
-						padding-left: 180rpx;
-					}
-				}
-			}	
-			.invoice-warp__wrapper{
-				/* #ifndef APP-NVUE */
-				display: flex;
-				/* #endif */
-				flex-direction: column;
-				padding-top: 20rpx;
-			}
-			.invoice-warp--hide {
-				padding: 0 0;
-				height: 0px;
-				line-height: 0px;
-			}		
-		}
-	}
-</style>

+ 0 - 198
pages/seller/order/components/details/logisticsRecord.vue

@@ -1,198 +0,0 @@
-<template name="logistics">
-	<view class="logistics-template">
-		<!-- 物流信息 -->
-		<view
-			class="logistics-content"
-			v-if="logisticsData.length > 0"
-			v-for="(item, index) in logisticsData"
-			:key="index"
-		>
-			<view class="logistics-top"> <text class="name">物流信息</text> </view>
-			<view class="logistics-warp">
-				<view class="logistics-warp__wrapper">
-					<view class="logistics-main">
-						<view class="logistics-main-top">
-							<view class="main-top" @click="showlogistics(index)">
-								{{ item.expressname }}:{{ item.expressNumber }}
-								<text class="clipboard" @click="clipboard(item.expressNumber)">复制</text>
-								<text
-									class="arrow-showMore iconfont icon-web_xiangxiazhankai"
-									:style="{ transform: item.isOpen ? 'rotate(180deg)' : 'rotate(0)' }"
-								></text>
-							</view>
-							<view class="main-bot"> 发货时间:{{ item.expressNewtime }} </view>
-						</view>
-						<view
-							v-if="item.expressRecord.length > 0"
-							v-for="(infoItem, infoIndex) in item.expressRecord"
-							:key="infoIndex"
-							:class="{ 'logistics-warp--hide': !item.isOpen }"
-							class="logistics-main-bot logistics-animation"
-							:style="{
-								transform: item.isOpen ? 'translateY(0)' : 'translateY(-50%)',
-								'-webkit-transform': item.isOpen ? 'translateY(0)' : 'translateY(-50%)'
-							}"
-						>
-							{{ infoItem.time }} {{ infoItem.desc }}
-						</view>
-						<view
-							v-if="item.expressRecord"
-							:class="{ 'logistics-warp--hide': !item.isOpen }"
-							class="logistics-main-bot logistics-animation"
-							:style="{
-								transform: item.isOpen ? 'translateY(0)' : 'translateY(-50%)',
-								'-webkit-transform': item.isOpen ? 'translateY(0)' : 'translateY(-50%)'
-							}"
-						>
-							暂无物流信息
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="logistics-content" v-else> 暂无物流信息 </view>
-	</view>
-</template>
-
-<script>
-const thorui = require('@/components/clipboard/clipboard.thorui.js')
-export default {
-	name: 'logistics',
-	data() {
-		return {
-			title: '发票信息',
-			logisticsData: ''
-		}
-	},
-	created() {},
-	computed: {},
-	methods: {
-		initData(res) {
-			this.logisticsData = res
-		},
-		showlogistics(index) {
-			let isOpen = this.logisticsData[index]['isOpen']
-			this.logisticsData[index]['isOpen'] = !isOpen
-		},
-		clipboard(data) {
-			thorui.getClipboardData(data, res => {
-				if (res) {
-					this.$util.msg('复制成功', 2000, true, 'success')
-				} else {
-					this.$util.msg('复制失败', 2000, true, 'none')
-				}
-			})
-		}
-	}
-}
-</script>
-
-<style lang="scss">
-.logistics-template {
-	width: 100%;
-	height: 100%;
-	background: #ffffff;
-	float: left;
-	.logistics-content {
-		width: 702rpx;
-		padding: 20rpx 24rpx;
-		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);
-			}
-		}
-		.logistics-warp {
-			width: 100%;
-			overflow: hidden;
-			.table {
-				height: 76rpx;
-				line-height: 76rpx;
-				font-size: $font-size-26;
-				color: $text-color;
-				text-align: left;
-			}
-		}
-		.logistics-main-top {
-			width: 100%;
-			height: auto;
-			float: left;
-			padding-top: 24rpx;
-			margin-bottom: 14rpx;
-			.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: 42rpx;
-		}
-	}
-}
-</style>

+ 0 - 237
pages/seller/order/components/details/orderButton.vue

@@ -1,237 +0,0 @@
-<template name="button">
-	<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-share" @click.stop="onShareCode">
-				<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-delete" v-if="btnState.isDelete" @click.stop="btnConfirm('delete',order)">删除订单</view> -->
-			<view class="btn btn-query" v-if="btnState.isQuery" @click.stop="btnConfirm('query',order)">查看物流</view>
-			<view class="btn btn-firm" v-if="btnState.isConfirm" @click.stop="btnConfirm('confirm',order)">
-				确认收货
-			</view>
-			
-		</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:'button',
-		props:{
-			status:{
-				type:Number
-			},
-			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:[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},
-					{label:'isUpload',val:[11,12,13,21,22,23,111],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
-						}
-					})
-				})
-			},
-			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)
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.button-template{
-		width: 100%;
-		height: auto;
-		position: fixed;
-		bottom: 0;
-		left: 0;
-		background: #FFFFFF;
-		z-index: 99999;
-		.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: 150rpx;
-				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;
-				}
-			}
-			.btn-confirm{
-				background:#ff7a51;
-				border-color:#ff7a51;
-				color: #FFFFFF;
-			}
-			.btn-pay{
-				background:$btn-confirm;
-				margin-right: 0;
-				border: 2rpx solid $btn-confirm;
-				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;
-						position: relative;
-						bottom: 18rpx;
-						left: 15rpx;
-						z-index: -1;
-						transform:rotate(45deg);
-					}
-				}
-			}
-			.btn-share{
-				.tips{
-					width: 160rpx;
-					height: 34rpx;
-					padding: 10rpx 10rpx;
-					background:#F3B574;
-					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:#F3B574;
-						position: absolute;
-						bottom: -8rpx;
-						left: 30rpx;
-						z-index: -1;
-						transform:rotate(45deg);
-					}
-				}
-			}
-		}
-	}
-</style>

+ 0 - 245
pages/seller/order/components/details/orderListButton.vue

@@ -1,245 +0,0 @@
-<template name="button">
-	<view class="button-template">
-		<!-- 底部按钮 -->
-		<view class="button-content">
-			<view class="btn btn-pay" v-if="btnState.isPay" @click.stop="btnConfirm('pay',order)">付款</view>
-			<view class="btn btn-cancel" v-if="order.checkFlag === 1" @click.stop="btnConfirm('upload',order)">上传凭证</view>
-			<!-- <view class="btn btn-confirm" v-if="btnState.isConfirmation" @click.stop="btnConfirm('confirmation',order)">确认订单</view> -->
-			<view class="btn btn-share"  @click.stop="onShareCode(order.orderId)">分享订单</view>
-			<view class="btn btn-cancel" v-if="btnState.isCancel" @click.stop="btnConfirm('cancel',order)">取消订单</view>
-			<!-- <view class="btn btn-delete" v-if="btnState.isDelete" @click.stop="btnConfirm('delete',order)">删除订单</view> -->
-			<view class="btn btn-query" v-if="btnState.isQuery" @click.stop="btnConfirm('query',order)">查看物流</view>
-			<view class="btn btn-firm" v-if="btnState.isConfirm" @click.stop="btnConfirm('confirm',order)">
-				确认收货
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:"button",
-		props:{
-			status: {
-				type:Number
-			},
-			order: {
-				type:Object
-			},
-		},
-		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:[33],status: true},
-					{label:'isConfirmation',val:[0],status: true},
-					{label:'isPay',val:[11,12,13,21,22,23,111],status: true},
-					{label:'isUpload',val:[11,12,13,21,22,23,111],status: true},
-				]
-			}
-		},
-		created(){
-			this.initData(this.status)
-		},
-		computed: {
-
-		},
-		watch:{
-			status:{
-				handler:function(val){
-					this.initData(val)
-				},
-				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
-						}
-					})
-				})
-			},
-			initStatus(){
-				let btnState= {
-						isQuery: false,
-						isDelete: false,
-						isCancel: false,
-						isConfirm: false,
-						isShare: true,
-						isConfirmation:false,
-					}
-				return 	btnState
-			},
-			getShareCode(code){
-				this.shareCode = code
-			},
-			onShareCode(orderId){
-				this.$parent.isShareModal = true
-				this.$parent.handleOrderId = orderId
-				this.$emit('shareConfirm')
-			},
-			btnConfirm(type,order){
-				let data = {
-						type:type,
-						orderId:order.orderId,
-						order:order
-					}
-				this.$emit('buttonConfirm',data)
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.button-template{
-		width: 100%;
-		height: auto;
-		float: left;
-		background: #FFFFFF;
-		.button-content{
-			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: 150rpx;
-				height:  64rpx;
-				margin: 22rpx 0 20rpx 20rpx;
-				line-height: 64rpx;
-				font-size:$font-size-26;
-				color: #999999;
-				text-align: center;
-				float: right;
-				border-radius: 34rpx;
-				border: 2rpx solid #999999;
-				&.btn-payment{
-					line-height: 38rpx;
-					font-size: 24rpx;
-					background: #f9a94b;
-					color: #fff;
-					border: 2rpx solid #f9a94b;
-					text{
-						display: block;
-						line-height: 15rpx;
-					}
-				}
-			}
-			.btn-color{
-				background: $btn-confirm;
-				// margin: 22rpx 0 22rpx 22rpx;
-			}
-			.btn-cancel{
-				// background:#FFFFFF;
-				// color: #999999;
-				// float: left;
-				// margin: 22rpx 0;
-				text-align: center;
-			}
-			// .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:#ff7a51;
-				border-color:#ff7a51;
-				color: #FFFFFF;
-			}
-			.btn-pay{
-				background:$btn-confirm;
-				margin-right: 0;
-				border: 2rpx solid $btn-confirm;
-				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;
-						position: relative;
-						bottom: 18rpx;
-						left: 15rpx;
-						z-index: -1;
-						transform:rotate(45deg);
-					}
-				}
-			}
-			.btn-share{
-				// background:linear-gradient(315deg,rgba(0,212,150,1) 0%,rgba(126,243,174,1) 100%);
-				position: relative;
-				.tips{
-					width: 160rpx;
-					height: 34rpx;
-					padding: 10rpx 10rpx;
-					background:linear-gradient(45deg,rgba(0,0,0,1) 0%,rgba(87,87,87,1) 100%);
-					box-shadow:0px 2px 4px 0px rgba(0,0,0,0.2);
-					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:linear-gradient(45deg,rgba(0,0,0,1) 0%,rgba(87,87,87,1) 100%);
-						position: absolute;
-						bottom: -8rpx;
-						right: 30rpx;
-						z-index: -1;
-						transform:rotate(45deg);
-					}
-				}
-			}
-		}
-	}
-</style>

+ 0 - 254
pages/seller/order/components/sellerDetaileButton.vue

@@ -1,254 +0,0 @@
-<template name="button">
-	<view class="button-template" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
-		<!-- 底部按钮 -->
-		<view class="button-content">
-			<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="btn btn-share" v-else @click.stop="onShareCode(2)">
-					<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>
-	</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
-			}
-		},
-		watch:{
-			status:{
-				handler:function(val){
-					this.initData(val)
-				},
-				deep:true//对象内部的属性监听,也叫深度监听
-			}
-		},
-		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},
-				]
-			}
-		},
-		created(){
-			console.log(this.rechargeGoods)
-			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
-							//console.log(this.btnState[el.label]);
-						}
-					})
-				})
-			},
-			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.onlinePayFlag == 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)
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	.button-template{
-		width: 100%;
-		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: #f94b4b;
-				// margin: 20rpx 0 20rpx 20rpx;
-				.tips{
-					width: 160rpx;
-					height: 34rpx;
-					padding: 10rpx 10rpx;
-					background:linear-gradient(45deg,rgba(0,0,0,1) 0%,rgba(87,87,87,1) 100%);
-					box-shadow:0px 2px 4px 0px rgba(0,0,0,0.2);
-					border-radius: 8rpx;
-					position: absolute;
-					color: #FFFFFF;
-					line-height: 34rpx;
-					font-size: $font-size-24;
-					text-align: left;
-					right: 24rpx;
-					top: -45rpx;
-					&:before{
-						content: "";
-						width: 25rpx;
-						height: 25rpx;
-						background:linear-gradient(45deg,rgba(0,0,0,1) 0%,rgba(87,87,87,1) 100%);
-						position: absolute;
-						bottom: -8rpx;
-						right: 30rpx;
-						z-index: -1;
-						transform:rotate(45deg);
-					}
-				}
-			}
-			.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;
-					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);
-					}
-				}
-			}
-		}
-	}
-</style>

+ 0 - 211
pages/seller/order/components/sellerExchangeCoupon.vue

@@ -1,211 +0,0 @@
-<template name="alert">
-	<view class="alert spec" :class="specClass">
-		<!-- 运费弹窗说明 -->
-		<view class="coupon-popup">
-			<view class="content">
-				<view class="title">
-					<text>兑换优惠券</text>
-					<text class="iconfont icon-iconfontguanbi" @click.stop="hidePopup"></text>
-				</view>
-				<view class="text-content">
-					<view class="coupon-input">
-						<input class="input" type="text" v-model="params.redemptionCode" maxlength="16"  placeholder="请输入16位兑换码"/>
-					</view>
-					<view class="coupon-main">
-						<view class="coupon-button" @click="exchangeConfirm">立即兑换</view>
-						<view class="coupon-text">
-							<view class="coupon-h1">注意事项:</view>
-							<view class="coupon-h2">1. 兑换码获取:可通过采美线下发放或者销售顾问</view>
-							<view class="coupon-h2 indet">线上发放获得优惠券兑换码,兑换码由16位数字</view>
-							<view class="coupon-h2 indet">和字母组成。</view>
-							<view class="coupon-h2">2. 兑换码使用:在当前页面输入兑换码即可兑换相</view>
-							<view class="coupon-h2 indet">应优惠券一个兑换码只能兑换一张优惠券,</view>
-							<view class="coupon-h2 indet">不可重复使用。</view>
-							<view class="coupon-h2">3. 输入兑换码时请区分字母大小写。</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:'alert',
-		props:{},
-		data() {
-			return{
-				params:{
-					userId:0,
-					redemptionCode:'',
-					source:2,
-				},
-			}
-		},
-		created() {
-			this.$api.getComStorage('orderUserInfo').then((resolve) =>{
-				this.params.userId = resolve.userId ? resolve.userId : 0;
-			}).catch(error =>{
-				console.log('暂无用户信息~')
-			})
-		},
-		onLoad(){
-			
-		},
-		methods:{
-			exchangeConfirm(){// 立即兑换
-				if( this.params.redemptionCode == ''){
-					this.$util.msg('请输入位兑换码',2000)
-					return
-				}
-				this.ExchangeCoupon(this.params)
-			},
-			ExchangeCoupon(param){// 兑换优惠券
-				this.ProductService.ExchangeCoupon(param).then(response =>{
-					this.$parent.ExchangeCouponData = response.data
-					this.$parent.isExchangePopup = false
-					this.$parent.isCouponModel = true
-					this.$parent.isCouponShow = false
-				})
-				.catch(error =>{
-					this.$util.msg(error.msg,2000);
-				})
-			},
-			hidePopup(){
-				this.$parent.isExchangePopup = false
-			},
-		},
-		onShow(){
-	
-		}
-	}
-</script>
-
-<style lang="scss">
-	/*弹窗*/
-	.model-warp.none{
-		display: none;
-	}
-	.model-warp.show{
-		display: block;
-	}
-	.coupon-popup{
-		width: 100%;
-		height: 100%;
-		background: rgba(0,0,0,.5);
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 8888;
-		transition: all 0.4s;
-		&.none{
-			display: none;			
-		}
-		&.show{
-			display: block;
-		}
-		.content{
-			width: 580rpx;
-			height: 700rpx;
-			position: absolute;
-			background: $bg-color;
-			left: 0;
-			right: 0;
-			bottom: 0;
-			top: 0;
-			margin: auto;
-			padding: 20rpx 25rpx;
-			border-radius: 12rpx;
-			.title{
-				width: 100%;
-				height: 68rpx;
-				line-height: 68rpx;
-				font-size: $font-size-28;
-				color: $text-color;
-				text-align: center;
-				margin-bottom: 32rpx;
-				position: relative;
-				font-weight: bold;
-				.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;
-				.coupon-input{
-					width: 100%;
-					height: auto;
-					margin-bottom: 48rpx;
-					.input{
-						width: 100%;
-						height: 66rpx;
-						box-sizing: border-box;
-						border: 1px solid #e2e2e2;
-						line-height: 66rpx;
-						padding: 0 20rpx;
-						font-size: $font-size-26;
-						color: #333333;
-						border-radius: 2rpx;
-					}
-				}
-				.coupon-main{
-					width: 100%;
-					height: auto;
-					box-sizing: border-box;
-					.coupon-button{
-						width: 520rpx;
-						height: 84rpx;
-						margin: 0 auto;
-						border-radius: 50rpx;
-						line-height: 84rpx;
-						text-align: center;
-						background: $btn-confirm;
-						color: #FFFFFF;
-						font-size: $font-size-30;
-					}
-					.coupon-text{
-						width: 100%;
-						box-sizing: border-box;
-						padding: 0 20rpx;
-						margin-top: 40rpx;
-						line-height: 44rpx;
-						text-align: justify;
-						font-size: $font-size-24;
-						.coupon-h1{
-							color: #333333;
-						}
-						.coupon-h2{
-							color: #999999;
-							&.indet{
-								text-indent: 28rpx;
-							}
-						}
-					}
-				}
-			}
-			.btn{
-				width: 100%;
-				height: 88rpx;
-				float: left;
-				background: $btn-confirm;
-				line-height: 88rpx;
-				font-size: $font-size-28;
-				text-align: center;
-				color: #FFFFFF;
-				border-radius: 0;
-				padding: 0;
-				margin-top: 2rpx;
-			}
-		}
-	}
-</style>

+ 0 - 524
pages/seller/order/components/sellerFreight.vue

@@ -1,524 +0,0 @@
-<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>
-		<!--底部选择模态层弹窗组件 -->
-		<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>
-							</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">
-						</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>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:'freight',
-		props:{
-			freightDatas:{
-				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
-				}
-			}
-		},
-		created(){
-			this.infoData(this.freightDatas)
-		},
-		watch: {
-			freightDatas: {
-				handler: function (el) {//监听对象的变换使用 function,箭头函数容易出现this指向不正确
-					this.freightDatas = el
-					this.infoData(this.freightDatas)
-				},
-				deep: true
-			}
-		},
-		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)
-				}
-			},
-			orderPriceToFixed (num){
-				let price =''
-				price = parseInt(num).toFixed(2)
-				return price
-			},
-			discard(){
-				//丢弃
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.freight-template{
-		width: 100%;
-		height: auto;
-		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;
-			float: left;
-			font-weight: bold;
-			.freight-left{
-				float: left;
-				.icon-yunfeishuoming{
-					height: 100%;
-					padding:15rpx;
-					color: $color-system;
-					font-weight: normal;
-				}
-			}
-			.freight-right{
-				float: right;
-				color: #2A81FF;
-				.text-l{
-					margin-right: 20rpx;
-				}
-				.text{
-					line-height: 88rpx;
-					color: #ff0000;
-					margin:0 20rpx;
-					font-weight: normal;
-				}
-				.icon-xiayibu{
-					line-height: 88rpx;
-					color: #999999;
-					font-weight: normal;
-				}
-			}
-		}
-	}
-	.freight-ltitle{
-		width: 100%;
-		line-height: 60rpx;
-		height: 60rpx;
-		font-size: $font-size-28;
-		color: #333333;
-	}
-	.freight-radio{
-		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{
-			float: left;
-			transform: scale(0.6);
-		}
-		.row-text{
-			font-size: $font-size-24;
-			color: $text-color;
-		}
-	}
-	.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;
-			}
-		}
-	}	
-	/* 加入购物模态层*/
-	@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);
-		}
-	}
-	@keyframes showAmnation {
-		0% {
-			top: -12rpx;
-			opacity: 0;
-		}
-		50% {
-			top: -60rpx;
-			opacity: 1;
-		}
-		100% {
-			top: -100rpx;
-			opacity: 0;
-		}
-	}
-	@keyframes hideAmnation {
-		0% {
-			top: -100rpx;
-			opacity: 0;
-		}
-		100% {
-			top: -12rpx;
-			opacity: 0;
-		}
-	}
-	.popup {
-		position: fixed;
-		top: 0;
-		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;
-			float: left;
-			border-radius: 10rpx;
-			margin-right: 24rpx;
-			image{
-				width: 114rpx;
-				height: 114rpx;	
-				border-radius: 10rpx;
-			}
-		}
-		.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;
-				}
-			}
-			.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;
-				}
-			}
-		}
-	}	
-</style>

+ 0 - 140
pages/seller/order/components/sellerFreightAlert.vue

@@ -1,140 +0,0 @@
-<template name="alert">
-	<view class="alert spec" :class="specClass">
-		<!-- 运费弹窗说明 -->
-		<view class="freight-alert"  @tap="hideFreight">
-			<view class="content">
-				<view class="title">
-					<text>运费规则</text>
-					<text class="iconfont icon-iconfontguanbi" @click.stop="hideFreight"></text>
-				</view>
-				<view class="text-content">
-					<view class="text-h1">一、除含有仪器类、家具类等指定商品的订单,运费规则如下:</view>
-					<view class="text">
-						<text>1、首单,全国包邮(注:如果首单中含有不包邮的指定商品,则首单只能"到付");</text>
-						<text>2、订单商品总额满1000元,全国包邮;</text>
-						<text>3、订单商品总额不足1000元,深圳市内运费10元,广东省内深圳市外运费15元,其它地方运费到付;</text>
-						<text>4、地推送货上门无需运费(注:下单可选择运费是否到付)。</text>
-					</view>
-					<view class="text-h1">二、含有仪器类、家具类等指定商品的订单,运费到付。</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:'alert',
-		props:{},
-		data() {
-			return{
-				
-			}
-		},
-		created() {
-			
-		},
-		onLoad(){
-			
-		},
-		methods:{
-			hideFreight(){
-				this.$parent.isfreightTip = false
-			},
-		},
-		onShow(){
-	
-		}
-	}
-</script>
-
-<style lang="scss">
-	/*弹窗*/
-	.model-warp.none{
-		display: none;
-	}
-	.model-warp.show{
-		display: block;
-	}
-	.freight-alert{
-		width: 100%;
-		height: 100%;
-		background: rgba(0,0,0,.5);
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 8888;
-		transition: all 0.4s;
-		&.none{
-			display: none;			
-		}
-		&.show{
-			display: block;
-		}
-		.content{
-			width: 530rpx;
-			height: 710rpx;
-			position: absolute;
-			background: $bg-color;
-			left: 0;
-			right: 0;
-			bottom: 0;
-			top: 0;
-			margin: auto;
-			padding: 20rpx 25rpx;
-			border-radius: 12rpx;
-			.title{
-				width: 100%;
-				height: 68rpx;
-				line-height: 68rpx;
-				font-size: $font-size-28;
-				color: $text-color;
-				text-align: center;
-				margin-bottom: 32rpx;
-				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: 40rpx 0;
-					line-height: 44rpx;
-					font-size: $font-size-26;
-					color:#666666;
-					text-align: justify;
-				}
-				.text-h1{
-					line-height: 44rpx;
-					font-size: $font-size-28;
-					color: $text-color;
-					text-align: justify;
-				}
-			}
-			.btn{
-				width: 100%;
-				height: 88rpx;
-				float: left;
-				background: $btn-confirm;
-				line-height: 88rpx;
-				font-size: $font-size-28;
-				text-align: center;
-				color: #FFFFFF;
-				border-radius: 0;
-				padding: 0;
-				margin-top: 2rpx;
-			}
-		}
-	}
-	
-</style>

+ 0 - 695
pages/seller/order/components/sellerInvoice.vue

@@ -1,695 +0,0 @@
-<template name="invoice">
-	<view class="invoice-template">
-		 <!-- 发票信息 -->
-		<view class="invoice-title" @tap.stop="hanldOperationConfim">
-			<text class="text">发票信息</text>
-			<view class="invoice-right">
-				<text class="text-l">{{invoiceText}}</text>
-				<text class="iconfont icon-xiayibu"></text>
-			</view>
-		</view>
-		<!-- <view class="invoice-text">
-			<text>{{invoiceText}}</text>
-		</view> -->
-		<!--底部选择模态层弹窗组件 -->
-		<view class="popup spec" :class="specClass"  @touchmove.stop.prevent="discard" @tap="choiceaInvoiceConfim">
-			<!-- 遮罩层 -->
-			<view class="mask"></view>
-			<view class="layer" @tap.stop="discard">
-				<view class="content clearfix">
-					<view class="invoice-ltitle">发票类型</view>
-					<view class="invoice-radio">
-						<radio-group class="row-group" @change="radioChange">
-							<label class="row-input" v-for="(item, index) in invoiceTypeList" :key="item.value">
-								<radio class="row-radio" :value="item.value" :checked="index === current" color="#FF5B00"/>
-								<view class="row-text">{{item.name}}</view>
-							</label>
-						</radio-group>
-					</view>
-					<view class="invoice-main from" v-if="invoiceType == '2'">
-						<view class="invoice-from">
-							<view class="label">单位名称:</view>
-							<input class="form-input" type="text" v-model="invoiceData.invoiceTitle" placeholder="请填写单位信息(必填)" placeholder-class="placeholder" maxlength="24">
-						</view>
-						<view class="invoice-from">
-							<view class="label">纳税人识别号:</view>
-							<input class="form-input" type="text" v-model="invoiceData.corporationTaxNum" placeholder="请填写纳税人识别号(必填)" placeholder-class="placeholder" maxlength="24">
-						</view>
-						<view class="invoice-from">
-							<view class="label">注册地址:</view>
-							<input class="form-input" type="text" v-model="invoiceData.registeredAddress" placeholder="请填写单位注册地址(必填)" placeholder-class="placeholder" maxlength="100">
-						</view>
-						<view class="invoice-from">
-							<view class="label">注册电话:</view>
-							<input class="form-input" type="text" v-model="invoiceData.registeredPhone" placeholder="请填写注册电话(必填)" placeholder-class="placeholder" maxlength="15">
-						</view>
-						<view class="invoice-from">
-							<view class="label">开户银行:</view>
-							<input class="form-input" type="text" v-model="invoiceData.openBank"   placeholder="请填写开户银行(必填)" placeholder-class="placeholder" maxlength="30">
-						</view>
-						<view class="invoice-from">
-							<view class="label">银行账号:</view>
-							<input class="form-input" 
-								   type="text" 
-								   v-model="invoiceData.bankAccountNo" 
-								   placeholder="请填写银行账号(必填)" 
-								   maxlength="30"
-								   placeholder-class="placeholder">
-						</view>
-					</view>
-					<view class="invoice-main" v-if="invoiceType == '3'">
-						<view class="invoice-ltitle">发票内容</view>
-						<view class="invoice-group tit">
-							<checkbox-group class="row-group" @change="checkboxChange">
-								<view class="text">商品明细</view>
-								<checkbox class="row-radio" value="明细"  :checked="inventoryChecked" color="#FF5B00"></checkbox>
-							</checkbox-group>
-						</view>
-						<view class="invoice-ltitle">发票抬头</view>
-						<view class="invoice-group tit">
-							<radio-group class="row-group radio" @change="radioChangeTitle">
-								<label class="row-input" v-for="(item, index) in invoiceTitleList" :key="item.value">
-									<radio class="row-radio" :value="item.value" :checked="index === titleCurrent" color="#FF5B00"/>
-									<view class="row-text">{{item.name}}</view>
-								</label>
-							</radio-group>
-						</view>
-						<view class="invoice-group from">
-							<view class="group-from" v-if="peopleInvoiceData.invoiceTitleType == '0'">
-								<input class="form-input" type="text" v-model="peopleInvoiceData.invoiceTitle"   placeholder="请填写个人抬头" placeholder-class="placeholder" maxlength="20">
-							</view>
-							<view class="group-from" v-if="peopleInvoiceData.invoiceTitleType == '1'">
-								<input class="form-input" type="text" v-model="peopleInvoiceData.invoiceTitle"   placeholder="请填写公司抬头" placeholder-class="placeholder" maxlength="20">
-							</view>
-							<view class="group-from" v-if="peopleInvoiceData.invoiceTitleType == '1'">
-								<input class="form-input" type="text" v-model="peopleInvoiceData.corporationTaxNum"   placeholder="请填写纳税人识别号" placeholder-class="placeholder" maxlength="20">
-							</view>
-						</view>
-					</view>
-					<view class="invoice-main" v-if="invoiceType == '1'">
-						<view class="invoice-none">不开具发票信息</view>
-					</view>
-				</view>
-				<view class="btn">
-					<view class="button add" @click="choiceaInvoiceConfim">完成</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:'invoice',
-		data() {
-			return{
-				invoiceText:'不要发票',
-				specClass: '',//规格弹窗css类,控制开关动画
-				invoiceType:'1',//发票类型
-				current:0,
-				titleCurrent:0,
-				inventoryChecked:false,
-				invoiceTypeList:[
-					{value:'1',name:'不要发票'},
-					{value:'2',name:'增值税发票'},
-				],
-				invoiceTitleList:[
-					{value:'0',name:'个人'},
-					{value:'1',name:'公司'},
-				],
-				peopleInvoiceData:{
-					invoiceTitle:'',
-					invoiceContent:'',
-					corporationTaxNum:'',
-					invoiceTitleType:'0'//发票抬头类型 1企业 0个人
-				},
-				invoiceData:{
-					invoiceTitle:'',	 //单位名称
-					corporationTaxNum:'',//纳税人识别号
-					registeredAddress: '',//单位地址
-					registeredPhone:'',	 //注册电话
-					openBank:'',		//开户银行
-					bankAccountNo: ''  ,//银行账号
-				},
-			}
-		},
-		created(){
-			// this.initData(this.invoiceDatas)
-		},
-		computed: {
-
-		},
-		methods:{
-			getUseFindInvoice(){//获取发票信息
-				this.$api.getComStorage('orderUserInfo').then((resolve) =>{
-					this.OrderService.GetFindInvoice({userId:resolve.userId}).then(response =>{
-						if(response.data == null){
-							this.invoiceData = Object.assign(this.invoiceData,'',{type:0})
-						}else{
-							this.invoiceData = response.data
-						} 
-					})
-				})
-			},
-			updateInvoiceFn(){//保存发票信息
-				this.$api.getComStorage('orderUserInfo').then((resolve) =>{
-					let params =Object.assign(this.invoiceData,'',{userId:resolve.userId})
-					this.OrderService.UpdateInvoice(params).then(response =>{})
-				})
-			},
-			choiceaInvoiceConfim(){
-				switch(this.invoiceType){
-					case '1':
-						this.choiceaInvoiceThree()
-						this.invoiceText = '不要发票'
-						break
-					// case '2':
-					// 	this.choiceaInvoiceTwo()
-					// 	this.invoiceText = this.peopleInvoiceData.invoiceTitle
-					// 	break;
-					case '2':
-						this.choiceaInvoiceFirst()
-						this.invoiceText = this.invoiceData.invoiceTitle
-						break
-						default:
-						this.choiceaInvoiceThree()
-						this.invoiceText = '不要发票'
-				}
-			},
-			choiceaInvoiceFirst(){//增值税发票
-				if(this.invoiceData.invoiceTitle == ''){
-					this.$util.msg('请输入单位名称',2000)
-					return
-				}
-				if(this.invoiceData.corporationTaxNum == ''){
-					this.$util.msg('请输入纳税人识别号',2000)
-					return
-				}
-				if(this.invoiceData.registeredAddress == ''){
-					this.$util.msg('请输入单位地址',2000)
-					return
-				}
-				if(this.invoiceData.registeredPhone == ''){
-					this.$util.msg('请输入注册电话',2000)
-					return
-				}
-				if(this.invoiceData.openBank == ''){
-					this.$util.msg('请输入开户银行',2000)
-					return
-				}
-				if(this.invoiceData.bankAccountNo == ''){
-					this.$util.msg('请输入银行账号',2000)
-					return
-				}
-				this.updateInvoiceFn()
-				this.$emit('handleChoiceaInvoice',Object.assign(this.invoiceData,'',{type:2}))
-				this.hideSpec()
-			},
-			choiceaInvoiceTwo(){//普通发票			
-				switch(this.peopleInvoiceData.invoiceTitleType){
-					case '0':
-						if(this.peopleInvoiceData.invoiceContent == ''){
-							this.$util.msg('请选择商品明细',2000)
-							return
-						}
-						if(this.peopleInvoiceData.invoiceTitle == ''){
-							this.$util.msg('请输入个人抬头',2000)
-							return
-						}
-						break
-					case '1':
-						if(this.peopleInvoiceData.invoiceContent == ''){
-							this.$util.msg('请选择商品明细',2000)
-							return
-						}
-						if(this.peopleInvoiceData.invoiceTitle == ''){
-							this.$util.msg('请输入公司抬头',2000)
-							return
-						}
-						if(this.peopleInvoiceData.corporationTaxNum == ''){
-							this.$util.msg('请输入纳税人识别号',2000)
-							return
-						}
-						break
-				}
-				this.$emit('handleChoiceaInvoice',Object.assign(this.peopleInvoiceData,'',{type:1}))
-				this.hideSpec()
-			},
-			choiceaInvoiceThree(){//不要发票
-				this.invoiceData = {}
-				this.$emit('handleChoiceaInvoice',Object.assign(this.invoiceData,'',{type:0}))
-				this.hideSpec()
-			},
-			hideSpec() {//关闭弹窗
-				this.specClass = 'hide'
-				setTimeout(() => {
-					this.specClass = 'none'
-				}, 200)
-			},
-			hanldOperationConfim(){//显示发票弹窗
-				this.specClass = 'show'
-			},
-			radioChange(e) {
-				this.invoiceType = e.target.value
-				for (let i = 0; i < this.invoiceTypeList.length; i++) {
-					if (this.invoiceTypeList[i].value === this.invoiceType) {
-						this.current = i
-						break
-					}
-				}
-				switch(this.invoiceType){
-					case '2':
-						this.getUseFindInvoice()
-						break
-				}		
-			},
-			radioChangeTitle(e) {
-				this.peopleInvoiceData.invoiceTitleType = e.target.value
-				for (let i = 0; i < this.invoiceTitleList.length; i++) {
-					if (this.invoiceTitleList[i].value === this.peopleInvoiceData.invoiceTitleType) {
-						this.titleCurrent = i
-						break
-					}
-				}
-				switch(this.peopleInvoiceData.invoiceTitleType){
-					case '1':
-						this.inventoryChecked = false
-						this.peopleInvoiceData.invoiceTitle = ''
-						this.peopleInvoiceData.invoiceContent = ''
-						break
-				}		
-			},
-			checkboxChange(e){
-				this.inventoryChecked = !this.inventoryChecked
-				this.peopleInvoiceData.invoiceContent = e.detail.value[0]
-			},
-			inputBankNum(val) {
-				if (/\S{5}/.test(val)) {
-					this.invoiceData.bankAccountNo = val.replace(/\s/g, '').replace(/(.{4})/g, '$1 ')
-				}
-			},
-			discard(){
-				//丢弃
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.invoice-template{
-		width: 100%;
-		height: auto;
-		background: #FFFFFF;
-		float: left;
-		.invoice-title{
-			width: 702rpx;
-			padding: 0 24rpx;
-			height: 88rpx;
-			line-height: 88rpx;
-			position: relative;
-			font-size: $font-size-28;
-			font-weight: bold;
-			border-bottom: 1px solid #EBEBEB;
-			.text{
-				font-size: $font-size-28;
-				color: $text-color;
-				font-weight: bold;
-			}
-			.invoice-right{
-				float: right;
-				color: #2A81FF;
-				.text-l{
-					margin-right: 40rpx;
-				}
-				.iconfont{
-					width: 50rpx;
-					height: 88rpx;
-					line-height: 88rpx;
-					color: #999999;
-					display: block;
-					position: absolute;
-					right: 0;
-					top: 0;
-				}
-			}
-		}
-		.invoice-text{
-			width: 702rpx;
-			padding: 0 24rpx;
-			font-size: $font-size-24;
-			color: #666666;
-			line-height: 60rpx;
-		}
-		.invoice-ltitle{
-			width: 100%;
-			line-height: 60rpx;
-			height: 60rpx;
-			font-size: $font-size-28;
-			color: #333333;
-		}
-		.invoice-radio{
-			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{
-				float: left;
-				transform: scale(0.6);
-			}
-			.row-text{
-				font-size: $font-size-24;
-				color: $text-color;
-			}
-		}
-		.invoice-main{
-			width: 100%;
-			height: auto;
-			margin-top: 30rpx;
-			&.from{
-				padding-bottom: 40rpx;
-			}
-			.invoice-none{
-				line-height: 60rpx;
-				height: 60rpx;
-				font-size: $font-size-24;
-				color: #666666;
-				text-align: center;
-			}
-			.invoice-from{
-				width: 662rpx;
-				height: 40rpx;
-				padding: 20rpx;
-				line-height: 40rpx;
-				align-items: flex-start;
-				font-size: $font-size-28;
-				color: $text-color;
-				// background: #F7F7F7;
-				// border-radius: 14rpx;
-				margin-bottom: 20rpx;
-				border-bottom: 2rpx solid #e1e1e1;
-				.label{
-					height: 40rpx;
-					line-height: 40rpx;
-					float: left;
-				}
-				.form-input{
-					height: 40rpx;
-					line-height: 40rpx;
-					flex-grow: 1;
-					padding-left: 20rpx;
-				}
-			}
-			.invoice-group{
-				width: 100%;
-				height: 88rpx;
-				display: flex;
-				border-bottom: 1px solid #EBEBEB;
-				&.tit{
-					margin-bottom: 30rpx;
-				}
-				&.from{
-					margin-bottom: 30rpx;
-					border-bottom: 1px solid #FFFFFF;
-					flex-direction: row;
-					display: block;
-					.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;
-						.form-input{
-							height: 40rpx;
-							line-height: 40rpx;
-							flex-grow: 1;
-						}
-					}
-				}
-				.row-group{
-					line-height: 88rpx;
-					flex: 1;
-					.text{
-						font-size: $font-size-24;
-						color: $text-color;
-						line-height: 88rpx;
-						float: left;
-					}
-					.row-radio{
-						float: right;
-						transform: scale(0.8);
-						border-radius: 50%;
-					}
-					&.radio{
-						display: flex;
-						.row-input{
-							flex: 1;
-							height: 88rpx;
-							line-height: 88rpx;
-						}
-						.row-radio{
-							float: left;
-							transform: scale(0.6);
-						}
-						.row-text{
-							font-size: $font-size-24;
-							color: $text-color;
-						}
-					}
-				}
-			}
-		}
-	}
-	/* 加入购物模态层*/
-	@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);
-		}
-	}
-	@keyframes showAmnation {
-		0% {
-			top: -12rpx;
-			opacity: 0;
-		}
-		50% {
-			top: -60rpx;
-			opacity: 1;
-		}
-		100% {
-			top: -100rpx;
-			opacity: 0;
-		}
-	}
-	@keyframes hideAmnation {
-		0% {
-			top: -100rpx;
-			opacity: 0;
-		}
-		100% {
-			top: -12rpx;
-			opacity: 0;
-		}
-	}
-	.popup {
-		position: fixed;
-		top: 0;
-		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: absolute;
-			z-index: 22;
-			bottom: -1010rpx;
-			width: 702rpx;
-			padding: 24rpx 24rpx 65rpx 24rpx;
-			height: 920rpx;
-			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;
-			float: left;
-			border-radius: 10rpx;
-			margin-right: 24rpx;
-			image{
-				width: 114rpx;
-				height: 114rpx;	
-				border-radius: 10rpx;
-			}
-		}
-		.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;
-				}
-			}
-			.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;
-				}
-			}
-		}
-	}	
-	.placeholder{
-		color: #b2b2b2;
-	}
-</style>

+ 0 - 217
pages/seller/order/components/sellerOrderButton.vue

@@ -1,217 +0,0 @@
-<template name="button">
-	<view class="button-template">
-		<!-- 底部按钮 -->
-		<view class="button-content"> 
-			<view class="btn btn-cancel" v-if="btnState.isCancel" @click.stop="btnConfirm('cancel',orderId)">取消订单</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>	
-			</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>
-	</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
-			}
-		},
-		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},
-				]
-			}
-		},
-		created(){
-			this.initData(this.status)
-		},
-		computed: {
-			
-		},
-		watch:{
-			status:{
-				handler:function(val){
-					this.initData(val)
-				},
-				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
-						}
-					})
-				})
-			},
-			initStatus(){
-				let btnState= {
-						isDelete: false,
-						isCancel: false,
-						isConfirm: false,
-						isShare: true
-					}
-				return 	btnState
-			},
-			getShareCode(code){
-				this.shareCode = code
-			},
-			onShareCode(oID,uID,type){
-				if(this.order.onlinePayFlag == 1){
-					this.$util.modal('提示','本订单不能进行线上支付,请让客户选择线下转账方式付款','继续分享','知道了',true,() =>{
-						this.$parent.isShareModal = true
-						this.$parent.btnoRderID = oID,
-						this.$parent.btnClubUserID = uID
-						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)
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	.button-template{
-		width: 100%;
-		height: auto;
-		float: left;
-		background: #FFFFFF;
-		.button-content{
-			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;
-				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;
-					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);
-					}
-				}
-			}
-		}
-	}
-</style>

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

@@ -0,0 +1,94 @@
+import Vue from 'vue'
+const conMixins = {
+    data() {
+        return {
+            handleComType:0,//跳转类型
+            cartParam: {
+                // 购物车立即结算确认订单参数
+                townId:'',          //地址ID
+                skuIds:'',
+                serviceProviderId: 0, // 协销Id
+                clubId: 0 // 机构Id
+            },
+            productParam: {
+                // 商品立即购买确认订单参数
+                townId:'',          //地址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: '#F3B574'
+            		},
+            		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://static.caimei365.com/app/mini-mcare/icon/icon_shareOrder@2x.png'
+	    }
+    }
+}
+
+export default orderMixins

+ 230 - 403
pages/seller/order/order-club-list.vue

@@ -64,18 +64,19 @@
 								<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>
 									<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 +85,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 +93,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.giftType == 2 || pros.giftType == 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="productprice">
+												<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> -->
 									<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,32 +190,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 -->
-								<order-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"
-								>
-								</order-button>
+								/>
 							</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>
@@ -235,9 +222,12 @@
 			</swiper-item>
 		</swiper>
 		<!-- 分享弹窗 -->
-		<share-alert v-if="isShareModal" :shareType="isShareType" :orderId="btnoRderID" @shareConfirm="onShareAppMessage"> </share-alert>
-		<!-- 透明模态层 -->
-		<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">
@@ -249,31 +239,44 @@
 					</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 orderButton from './components/sellerOrderButton' // 操作按钮
 import modalLayer from '@/components/modal-layer'
 import empty from './components/empty'
-import shareAlert from './components/sellerShareAlert.vue' // 分享弹窗
+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,
-		orderButton,
 		modalLayer,
-		shareAlert
+		cmListButton,
+		cmSharePopup,
 	},
 	data() {
 		return {
@@ -287,29 +290,28 @@ export default {
 			],
 			screenTabBar: [
 				{ type: 0, text: '全部订单' },
-				{ type: 1, text: '自主订单' },
-				{ type: 2, text: '协销订单' }
+				{ type: 1, text: '机构自主订单' },
+				{ 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,
@@ -320,13 +322,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({
@@ -337,20 +338,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) {
@@ -363,6 +357,7 @@ export default {
 			}
 			this.isClickChange = false
 			this.currentTab = index
+			this.listQuery.listType = index
 			this.checkCor()
 			this.pageNum = 1
 			this.pullUpOn = true //切换时隐藏
@@ -378,7 +373,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)
@@ -387,7 +382,7 @@ export default {
 		onClickScreenTab(index) {
 			console.log(index)
 			this.screenTab = index
-			this.pageNum = 1
+			this.listQuery.orderSubmitType = index
 			this.pullUpOn = true //切换时隐藏
 			this.loadding = false //切换时隐藏
 			this.nomoreText = ''
@@ -402,88 +397,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) {
@@ -497,154 +497,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) {
@@ -655,39 +522,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) {
@@ -846,40 +680,33 @@ page {
 			height: 50rpx;
 			display: block;
 			position: absolute;
-			right: 0;
-			top: 9rpx;
+			right: 110rpx;
+			top: 12rpx;
 		}
-		.bage-buss {
+		.bage{
 			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;
-		}
-		.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%);
+			width: 80rpx;
+			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 {

+ 243 - 168
pages/seller/order/order-confirm.vue

@@ -1,31 +1,24 @@
 <template>
 	<view class="container order clearfix" :style="{ paddingBottom: isIphoneX ? '190rpx' : '134rpx' }">
 		<!-- 地址选择 -->
-		<choice-address ref="choiceAddress" v-if="isAddress" :addressData="addressData" />
+		<cm-address-temp ref="choiceAddress" v-if="isRequest" :addressData="addressData" />
 		<!-- 商品 -->
-		<seller-goodsList
+		<cm-goods-temp
 			ref="goods"
 			v-if="isRequest"
-			:goodsData="goodsData"
+			:secondflag="secondflag"
+			:goodsData.sync="goodsData"
 			@handleGoodList="handChangeInputGoodsList"
+			@changeChina="handleChangeChina"
+			@changePostage="handleChangePostage"
 		/>
 		<!-- 发票信息 -->
-		<seller-invoice
+		<cm-invice-popup
 			ref="invoice"
 			v-if="isRequest"
 			:invoiceDatas="invoiceData"
 			@handleChoiceaInvoice="handleChoiceaInvoiceData"
 		/>
-		<!-- 运费 -->
-		<seller-freight
-			ref="freight"
-			v-if="isFreight"
-			:freightDatas="freightData"
-			@handleChoiceaFreight="handleChoiceaFreightData"
-			@showFreightAlert="handFreightAlertShow"
-		/>
-		<!-- 邮费弹窗 -->
-		<freight-alert v-if="isfreightTip" ref="csPhone" />
 		<!-- 底部 -->
 		<view class="footer" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
 			<view class="footer-le">
@@ -64,19 +57,17 @@
 </template>
 
 <script>
-import freightAlert from './components/sellerFreightAlert'
-import choiceAddress from './components/sellerAddress'
-import sellerGoodsList from './components/sellerGoodsList'
-import sellerInvoice from './components/sellerInvoice'
-import sellerFreight from './components/sellerFreight'
+import cmAddressTemp from './components/cm-address-temp'
+import cmGoodsTemp from './components/cm-goods-temp'
+import cmInvicePopup from './components/cm-invice-popup'
+import conMixins from './mixins/conMixins.js'
 
 export default {
+	mixins: [conMixins],
 	components: {
-		choiceAddress,
-		sellerGoodsList,
-		sellerInvoice,
-		sellerFreight,
-		freightAlert
+		cmAddressTemp,
+		cmGoodsTemp,
+		cmInvicePopup
 	},
 	data() {
 		return {
@@ -98,19 +89,8 @@ export default {
 			],
 			contentModalText: '', //操作文字提示语句
 			modal: false,
+			showModalstauts: 1,
 			isIphoneX: this.$store.state.isIphoneX,
-			cartParam: {
-				// 购物车立即结算确认订单参数
-				skuIds: 0, // 商品Id(逗号隔开)
-				serviceProviderId: 0, // 协销Id
-				clubId: 0 // 机构Id
-			},
-			postageParam: {
-				// 邮费计算参数
-				skuIds: 0, // 商品Id(逗号隔开)
-				userId: 0, // 用户Id
-				townId: 0 // 地区Id
-			},
 			confirmParam: {
 				// 提交订单参数
 				cartType: 3, // 购买类型:(1自主下单, 3协销下单)
@@ -124,7 +104,6 @@ export default {
 				orderSeen: 1, // 订单对机构可见度 1可见  2不可见
 				payInfo: {
 					// 订单金额数据
-					isColdChina: 0, //是否勾选冷链费
 					orderShouldPayFee: 0, // 订单最终支付金额
 					balancePayFlag: 0, // 勾选余额的状态(1使用,0不使用)
 					clauseId: 0, // 条款Id
@@ -140,24 +119,24 @@ export default {
 			rebateFeeText: '否',
 			confirmType: 1,
 			submitState: '', // 提交状态
-			totalCount: 0, // 订单提交总数量
-			reducedPrice: 0, // 满减金额
-			couponAmount: 0, // 优惠券金额
-			totalDiscountAmount: 0, // 共减金额
-			orderShouldPayFee: 0.0, // 订单提交总金额
-			allPrice: 0.0, // 订单总金额
 			isRequest: false, // 是否加载完成渲染子组件
 			isFreight: false, // 是否加载完成渲染子组件
-			isAddress: false, // 是否加载完成地址
+			isExchangePopup: false, // 控制兑换优惠券弹窗
 			isfreightTip: false, // 控制邮费弹窗
+			ischecked: false, // 是否勾选余额
 			addressData: {}, // 初始化地址信息
 			goodsData: [], // 初始化商品信息
 			couponList: [], // 初始化优惠券信息
 			invoiceData: { type: 0 }, // 初始化发票信息
-			freightData: {}, // 邮费数据
-			handleFreightData: {}, // 监听邮费数据
 			orderInfo: [], // 提交的商品信息
 			payInfo: {}, // 订单信息
+			rechargeGoods: false,
+			clauseList: [],
+			seconDepositFlg: true,
+			rebatecheck: false,
+			isCouponShow: false, // 是否显示可选优惠券
+			secondflag: true,
+			isCouponModel: false, // 兑换优惠券成功提示
 			ExchangeCouponData: {} // 兑换优惠券信息
 		}
 	},
@@ -176,79 +155,93 @@ export default {
 			const data = JSON.parse(option.data)
 			const clubInfo = await this.$api.getComStorage('orderUserInfo')
 			const userInfo = await this.$api.getStorage()
-			this.cartParam.clubId = this.confirmParam.clubId = clubInfo.clubId ? clubInfo.clubId : 0
-			this.postageParam.userId = clubInfo.userId ? clubInfo.userId : 0
-			this.cartParam.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
-			this.confirmParam.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
-			this.confirmType = 2
-			this.cartParam.skuIds = data.data.skuIds
-			this.getInitCrearOrder()
+			this.handleComType = option.type * 1
+			this.productParam.clubId = this.cartParam.clubId = this.confirmParam.clubId = clubInfo.clubId
+			this.productParam.serviceProviderId = userInfo.serviceProviderId
+			this.cartParam.serviceProviderId = userInfo.serviceProviderId
+			this.confirmParam.serviceProviderId = userInfo.serviceProviderId
+			if (option.type == '1') {
+				this.confirmType = 1
+				this.productParam.productCount = data.data.productCount
+				this.productParam.productId = data.data.productIds
+				this.getAddressData(clubInfo.userId, 1)
+			} else {
+				this.confirmType = 2
+				this.cartParam.skuIds = data.data.skuIds
+				this.getAddressData(clubInfo.userId, 2)
+			}
 		},
-		getInitCrearOrder() {
-			//协销购物车跳转确认订单初始化信息
-			this.SellerService.SellerSettlement(this.cartParam)
-				.then(response => {
-					let data = response.data
-					this.isRequest = true
-					this.goodsData = data.list
-					this.reducedPrice = data.reducedPrice
-					this.totalCount = data.totalCount
-					this.allPrice = data.totalPrice
-					this.postageParam.skuIds = this.getProductIds(data.list)
-					this.orderShouldPayFee = this.allPrice
-					this.totalDiscountAmount = this.reducedPrice
-					this.getAddressData()
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
+		//协销购物车跳转确认订单初始化信息
+		async getInitCrearOrder() {
+			try {
+				const res = await this.SellerService.SellerSettlement(this.cartParam)
+				const data = res.data
+				this.goodsData = data.list.map(el => {
+					el.handlePostageFlag = el.postageFlag
+					return el
 				})
+				this.userMoney = data.userMoney
+				this.couponList = data.couponList
+				this.reducedPrice = data.reducedPrice
+				this.totalCount = data.totalCount
+				this.allPrice = data.totalPrice
+				this.rechargeGoods = data.includeRecharge
+				this.clauseList = data.clauseList
+				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.isRequest = true
+			} catch (error) {
+				console.log('获取订单信息异常')
+			}
 		},
-		getProductIds(list) {
-			// 获取订单商品id列表
-			let skuId = []
-			list.forEach(function(supplier) {
-				supplier.cartList.forEach(function(product) {
-					skuId.push(product.skuId)
+		//二手下单初始化查询
+		async getInitProdcutCrearOrder() {
+			try {
+				this.seconDepositFlg = false
+				const res = await this.SellerService.GetSettlementBySencondProduct(this.productParam)
+				const data = res.data
+				this.goodsData = data.list.map(el => {
+					el.handlePostageFlag = el.postageFlag
+					return el
 				})
-			})
-			return skuId.join(',')
-		},
-		getFreightData() {
-			//获取邮费信息
-			this.OrderService.GetOrderPostage(this.postageParam).then(response => {
-				let data = response.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()
-				}
-			})
+				this.userMoney = data.userMoney
+				this.totalCount = data.totalCount
+				this.allPrice = data.totalPrice
+				this.orderShouldPayFee = this.allPrice
+				this.isCouponShow = false
+				this.secondflag = false
+				this.isRequest = true
+			} catch (error) {
+				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
+		//获取地址信息
+		async getAddressData(userId, type) {
+			try {
+				const params = { pageNum: 1, pageSize: 1, userId: userId }
+				const res = await this.UserService.QueryAddressList(params)
+				const data = res.data
+				if (data.list && data.list.length > 0) {
 					this.addressData = data.list[0]
-					this.getFreightData()
-				} else {
-					this.addressData = this.addressData
+					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('获取订单地址异常')
+			}
 		},
 		handChangeInputGoodsList(data) {
 			//对应供应商的留言信息
@@ -258,19 +251,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)
@@ -283,23 +263,10 @@ export default {
 			this.confirmParam.clubCouponId = data.clubCouponId
 			this.attributePallPrice()
 		},
-		attributePallPrice() {
-			//计算价格
-			if (this.handleFreightData.postageFlag == 1) {
-				this.attributeHashfreight(this.handleFreightData.postage)
-			} else {
-				this.attributeNofreight()
-			}
-		},
-		attributeNofreight() {
-			//计算没有邮费的支付价格
-			this.orderShouldPayFee = this.allPrice
-			console.log('最终订单支付金额', this.orderShouldPayFee)
-		},
-		attributeHashfreight(postage) {
-			//计算需要邮费的支付价格
-			this.orderShouldPayFee = this.allPrice + parseInt(postage)
-			console.log('最终订单支付金额', this.orderShouldPayFee)
+		handleClubVisibleData(data) {
+			// 订单对机构是否可见
+			console.log('对机构是否可见', data)
+			this.confirmParam.orderSeen = Number(data)
 		},
 		orderSubmitMit() {
 			//提交订单
@@ -308,6 +275,15 @@ export default {
 				return
 			}
 			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() {
 			//提交订单
@@ -328,11 +304,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)
@@ -340,36 +317,54 @@ export default {
 			this.isSubLoading = true
 			this.hanldeOrderSubmit(this.confirmParam)
 		},
+		// 提交订单
 		async hanldeOrderSubmit(params) {
-			// 提交订单
-			try{
+			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-details?type=cash&orderId=${data.orderId}&userId=${
-								this.postageParam.userId
-							}`
-						)
+						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-details?type=cash&orderId=${data.orderId}&userId=${
-								this.postageParam.userId
-							}`
-						)
+						this.$api.redirectTo('/pages/seller/order/order-list?listType=0')
 					}, 2000)
 				}
-			}catch(error){
+			} catch (error) {
 				this.isSubLoading = false
-				this.$util.msg(error.msg, 3000)
-				this.formatConfirmParam()
+				this.handleError(error)
+			}
+		},
+		handleError(data) {
+			// 提交订单异常处理
+			this.formatConfirmParam()
+			const buttonMap = {
+				1: {
+					contentModalText:
+						'订单内存在械字号三类商品,需要拥有医疗执业许可证的医美机构才能购买。建议升级医美机构后再下单,否则会导致订单退款或影响发货。',
+					modalButton: [
+						{ text: '取消', type: 'gray', plain: true },
+						{
+							text: '继续提交',
+							customStyle: { color: '#fff', bgColor: 'linear-gradient(90deg, #F28F31 0%, #FF5B00 100%)' },
+							plain: false
+						}
+					]
+				}
+			}
+			if (data.code === -6) {
+				// 非医美机构下三类商品订单
+				this.modal = true
+				this.showModalstauts = 2
+				this.contentModalText = buttonMap[1].contentModalText
+				this.modalButton = buttonMap[1].modalButton
+			} else {
+				this.$util.msg(data.msg, 3000)
 			}
 		},
 		formatConfirmParam() {
@@ -378,6 +373,52 @@ export default {
 			this.confirmParam.orderInfo = JSON.parse(this.confirmParam.orderInfo)
 			this.confirmParam.orderInvoice = JSON.parse(this.confirmParam.orderInvoice)
 		},
+		handleRebateFlag() {
+			// 普通订单返佣
+			let self = this
+			uni.showActionSheet({
+				itemList: ['返佣订单', '普通订单,存在返佣服务费', '否'],
+				success: e => {
+					switch (e.tapIndex) {
+						case 0:
+							self.confirmParam.payInfo.rebateFlag = 1
+							self.rebateFeeText = '返佣订单'
+							break
+						case 1:
+							self.confirmParam.payInfo.rebateFlag = 2
+							self.rebateFeeText = '普通订单,存在返佣服务费'
+							break
+						case 2:
+							self.confirmParam.payInfo.rebateFlag = 0
+							self.rebateFeeText = '否'
+							break
+					}
+				}
+			})
+			if (this.confirmParam.payInfo.rebateFlag === 1) {
+				this.confirmParam.payInfo.balancePayFlag = 0
+				this.couponAmount = 0
+				this.confirmParam.clubCouponId = 0
+				this.confirmParam.orderSeen = 2
+				this.$refs.clubVisible.orderVisibleText = '不可见'
+				this.$refs.clubVisible.current = 1
+				this.orderShouldPayFee = this.allPrice + parseInt(this.freightData.postage) - this.couponAmount
+				this.totalDiscountAmount = this.reducedPrice + this.couponAmount
+				this.$refs.coupon.coupon.couponAmount = 0
+				this.$refs.freight.infoData(this.freightData)
+				this.$refs.freight.freightData = this.freightData
+				this.handleFreightData = this.freightData
+			} else {
+				this.confirmParam.orderSeen = 1
+				this.$refs.clubVisible.orderVisibleText = '可见'
+				if (this.couponList.length > 0) {
+					this.confirmParam.clubCouponId = this.couponList[0].clubCouponId
+					this.$refs.coupon.coupon.couponAmount = this.couponAmount = this.couponList[0].couponAmount
+				}
+				this.totalDiscountAmount = this.reducedPrice + this.couponAmount
+				this.orderShouldPayFee = this.allPrice + parseInt(this.freightData.postage) - this.couponAmount
+			}
+		},
 		handleClick(e) {
 			//确认提交
 			if (e.index == 1) {
@@ -391,10 +432,37 @@ export default {
 			this.confirmParam.orderMiniType = 0
 			this.modal = false
 		},
+		handleSecondFlag() {
+			// 二手订单勾选返佣
+			this.rebatecheck = !this.rebatecheck
+			if (this.rebatecheck) {
+				this.ischecked = false
+				this.confirmParam.payInfo.rebateFlag = 1
+				this.confirmParam.payInfo.balancePayFlag = 0
+				this.confirmParam.clubCouponId = 0
+				this.confirmParam.orderSeen = 2
+				this.$refs.clubVisible.orderVisibleText = '不可见'
+				this.$refs.clubVisible.current = 1
+				this.orderShouldPayFee = this.allPrice + parseInt(this.freightData.postage)
+				this.$refs.freight.infoData(this.freightData)
+				this.$refs.freight.freightData = this.freightData
+				this.handleFreightData = this.freightData
+			} else {
+				this.confirmParam.orderSeen = 1
+				this.$refs.clubVisible.orderVisibleText = '可见'
+				this.confirmParam.payInfo.rebateFlag = 0
+				this.orderShouldPayFee = this.allPrice + parseInt(this.freightData.postage)
+			}
+		},
 		handFreightAlertShow() {
 			//显示邮费弹窗
 			this.isfreightTip = true
 		},
+		handleClickCancel() {
+			// 关闭优惠券弹窗
+			this.isCouponModel = false
+			this.getInitCrearOrder()
+		},
 		hideFreight() {
 			//关闭邮费弹窗
 			this.isfreightTip = false
@@ -407,14 +475,21 @@ export default {
 		let pages = getCurrentPages()
 		let currPage = pages[pages.length - 1]
 		if (currPage.data.select == 'select') {
-			this.isAddress = true
-			let SelectData = uni.getStorageSync('selectAddress')
-			this.confirmParam.addressId = SelectData.addressId
-			this.postageParam.townId = SelectData.townId
-			this.addressData = SelectData
-			this.getFreightData()
-		} else {
-			this.getAddressData()
+			let address = uni.getStorageSync('selectAddress')
+			this.confirmParam.addressId = address.addressId
+			this.cartParam.townId = address.townId
+			this.productParam.townId = address.townId
+			this.addressData = address
+			this.ischecked = false
+			this.isRequest = false
+			if (this.handleComType === 1) {
+				//立即都买提交
+				this.getInitProdcutCrearOrder()
+			}
+			if (this.handleComType === 2) {
+				//购物车提交
+				this.getInitCrearOrder()
+			}
 		}
 	}
 }
@@ -608,7 +683,7 @@ page {
 			width: 100%;
 			height: 100%;
 			color: #ffffff;
-			background: linear-gradient(90deg, #ff9300 0%, #ff5b00 100%);
+			background: $btn-confirm;
 			font-size: $font-size-26;
 			text-align: center;
 			line-height: 80rpx;

+ 388 - 161
pages/seller/order/order-details.vue

@@ -1,56 +1,85 @@
 <template>
-	<view class="container details clearfix" :style="{ paddingBottom: isIphoneX ? 130 + 68 + 'rpx' : '130rpx' }">
-		<!-- 自定义返回 -->
+	<view class="container details clearfix">
+<!-- 		自定义返回
 		<header-back
 			:systeminfo="systeminfo"
 			:navbar-data="nvabarData"
 			:headerBtnPosi="headerBtnPosi"
 			:isShare="isOrderShare"
-		></header-back>
+		/> -->
 		<tui-skeleton
 			v-if="!skeletonShow"
 			backgroundColor="#fafafa"
 			borderRadius="10rpx"
 			:isLoading="true"
 			:loadingType="5"
-		></tui-skeleton>
-		<view v-else class="container-details" :style="{ paddingTop: navbarHeight + 'px' }">
+		/>
+		<view class="container-details">
+			<view class="status-text">
+				<view class="view-type">{{ orderInfo.status | statusFilters }}</view>
+				<text class="bage-buss btn" v-if="orderInfo.orderSubmitType == 3 || orderInfo.orderSubmitType == 4"
+					>采购员</text
+				>
+				<text
+					class="bage-auto btn"
+					v-if="
+						orderInfo.orderSubmitType == 0 ||
+							orderInfo.orderSubmitType == 1 ||
+							orderInfo.orderSubmitType == 2
+					"
+					>自主</text
+				>
+			</view>
 			<!-- 地址选择 -->
-			<order-address ref="orderAddress" v-if="skeletonShow" :addressData="addressData" />
+			<cm-address-temp ref="orderAddress" v-if="skeletonShow && !rechargeGoods" :addressData="addressData" />
 			<!-- 商品 -->
-			<goods-list ref="goods" v-if="skeletonShow" :shopOrderData="shopOrderData" :information="information" />
+			<cm-goods-temp
+				ref="goods"
+				v-if="skeletonShow"
+				:list="orderInfo.orderProductList"
+				:orderInfo="orderInfo"
+				@popupClick="hanldePopupFn"
+			/>
 			<!-- 订单信息 -->
-			<order-information ref="information" v-if="skeletonShow" :information="information" />
+			<cm-order-temp ref="orderInfo" v-if="skeletonShow" :orderInfo="orderInfo" />
 			<!-- 发票信息 -->
-			<invoice-tent ref="invoice" v-if="skeletonShow" :orderInvoice="orderInvoice" />
+			<cm-invice-temp ref="invoice" v-if="skeletonShow" :orderInvoice="orderInvoice" />
 			<!-- 支付记录 -->
-			<payment-record
+			<cm-payment-temp
 				ref="payment"
-				v-if="skeletonShow && discernReceiptList.length > 0"
+				v-if="skeletonShow"
 				:discernReceiptList="discernReceiptList"
 				:receiptAmount="receiptAmount"
 			/>
 			<!-- 退款记录 -->
-			<refund-record
+			<cm-refund-temp
 				ref="refund"
 				v-if="skeletonShow"
 				:returnedPurchaseList="returnedPurchaseList"
 				:returnedPurchaseFee="returnedPurchaseFee"
 			/>
 			<!-- 支付凭证记录 -->
-			<voucher-record ref="voucher" v-if="skeletonShow && voucherList.length > 0" :list="voucherList" />
+			<cm-voucher-temp ref="voucher" v-if="skeletonShow && voucherList.length > 0" :list="voucherList" />
 			<!-- 底部button -->
-			<order-button
+			<cm-details-button
 				ref="orderButton"
 				v-if="skeletonShow"
-				:status="btnStatus"
-				:shareCode="shareCode"
+				:status="orderInfo.status"
 				:order="orderInfo"
+				:rechargeGoods="rechargeGoods"
+				:ableUserMoney="ableUserMoney"
+				:shareCode="shareCode"
+				:secondHandOrderFlag="orderInfo.secondHandOrderFlag"
 				@buttonConfirm="handButtonConfirm"
 			/>
 		</view>
 		<!-- 分享弹窗 -->
-		<share-alert :orderId="orderId" v-if="isShareModal" @btnConfirm="onShareAppMessage"> </share-alert>
+		<cm-share-popup
+			:shopOrderId="shopOrderId"
+			:shareType="isShareType"
+			v-if="isShareModal"
+			@shareConfirm="onShareAppMessage"
+		/>
 		<!-- 提示弹窗 -->
 		<tui-modal
 			:show="modal"
@@ -61,44 +90,37 @@
 			:size="32"
 			shape="circle"
 			:maskClosable="false"
-		>
-		</tui-modal>
+		/>
 	</view>
 </template>
 
 <script>
 import headerBack from '@/components/cm-module/headerNavbar/header-back' //自定义导航
-import orderAddress from './components/details/orderAddress' //地址信息
-import goodsList from './components/details/goodsList' //商品列表
-import invoiceTent from './components/details/invoiceTent' //发票信息
-import orderInformation from './components/details/orderInformation' //订单信息
-import paymentRecord from './components/details/paymentRecord' //支付记录
-import refundRecord from './components/details/refundRecord' //退款记录
-import voucherRecord from './components/details/voucherRecord' //支付凭证记录
-import orderButton from './components/details/orderButton' //底部按钮
-import shareAlert from '@/components/cm-module/modelAlert/shareAlert.vue' //分享弹窗
+import cmAddressTemp from './components/details/cm-address-temp' //地址信息
+import cmGoodsTemp from './components/details/cm-goods-temp' //商品列表
+import cmOrderTemp from './components/details/cm-order-temp' //订单信息
+import cmInviceTemp from './components/details/cm-invice-temp' //发票信息
+import cmPaymentTemp from './components/details/cm-payment-temp' //支付记录
+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' //分享弹窗
 
 export default {
 	components: {
 		headerBack,
-		orderInformation,
-		orderAddress,
-		invoiceTent,
-		goodsList,
-		paymentRecord,
-		refundRecord,
-		voucherRecord,
-		orderButton,
-		shareAlert
+		cmAddressTemp,
+		cmGoodsTemp,
+		cmOrderTemp,
+		cmInviceTemp,
+		cmPaymentTemp,
+		cmRefundTemp,
+		cmVoucherTemp,
+		cmDetailsButton,
+		cmSharePopup
 	},
 	data() {
 		return {
-			skeletonShow: false,
-			headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
-			systeminfo: this.setSysteminfo(), //获取设备信息
-			isIphoneX: this.$store.state.isIphoneX,
-			CustomBar: this.CustomBar, // 顶部导航栏高度
-			navbarHeight: '',
 			nvabarData: {
 				//顶部自定义导航
 				showCapsule: 1, // 是否显示左上角图标   1表示显示    0表示不显示
@@ -106,27 +128,42 @@ export default {
 			},
 			state: 0,
 			userId: '',
-			orderId: '',
+			orderId: 0,
+			shopOrderId: 0,
+			clubUserId: 0,
+			serviceProviderId: '', //协销ID
 			shareCode: '', //分享码
 			shareType: '', //分享登录页过来记录的状态
 			cellPhone: '', //客服电话
-			payStatus: 0,
-			btnStatus: 0, //按钮组件状态
-			onlinePayFlag: '',
+			skeletonShow: false, //是否加载完成渲染子组件
 			isOrderShare: false,
 			isShareModal: false,
+			isShareType: 2,
+			isPayModel: false,
 			modelType: 0,
-			orderInfo: {},
-			alertOrderInfo: {},
+			ableUserMoney: '', //机构余额
 			addressData: {}, //地址信息初始化
-			information: {}, //订单信息初始化
-			shopOrderData: {}, //商品信息初始化
+			orderInfo: {}, //订单信息初始化
 			orderInvoice: {}, //发票信息初始化
 			returnedPurchaseList: {}, //退款信息初始化
 			discernReceiptList: {}, //支付信息初始化
-			voucherList: [], //支付凭证
+			voucherList:[], // 线下支付凭证
 			receiptAmount: 0, //支付金额
 			returnedPurchaseFee: 0, //退款金额
+			navbarHeight: '',
+			rechargeGoods: false,
+			headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
+			systeminfo: this.setSysteminfo(), //获取设备信息
+			isIphoneX: this.$store.state.isIphoneX,
+			CustomBar: this.CustomBar, // 顶部导航栏高度
+			popupShow: false,
+			handlerPros: {},
+			clauseData: {},
+			showAgan: false,
+			failList: [], // 再来一单可购买商品
+			promptitle: '',
+			returnGoodsStutas: false,
+			helpContent: '',
 			handleModelEven: 0,
 			modal: false,
 			contentModalText: '订单查询失败,请稍候重试~', //操作文字提示语句
@@ -144,147 +181,134 @@ export default {
 					},
 					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.state = 0
+			this.listType = 0
 			this.isOrderShare = true
-		} else if (option.type === 'confim' || option.type === 'search') {
-			this.state = 0
+		} else if (option.type === 'confim' || option.type === 'search' || option.type === 'cash') {
+			this.listType = 0
 		} else {
-			this.state = option.state
+			this.listType = option.listType
 		}
 		this.getHeaderTopHeight()
 		this.initOrderDetaileData()
 	},
 	filters: {
-		TextFormat(status) {
+		NumFormat(value) {
 			//处理金额
-			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
+			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: {
-		// 获取订单详情
 		async initOrderDetaileData() {
 			try {
-				const userInfo = await this.$api.getStorage()
-				this.userId = userInfo.userId ? userInfo.userId : 0
-				const res = await this.OrderService.QueryOrderDetails({ orderId: this.orderId, userId: this.userId })
+				const res = await this.OrderService.QueryOrderDetails({
+					shopOrderId: this.shopOrderId,
+					userId: this.clubUserId
+				})
 				const data = res.data
-				this.skeletonShow = true
-				this.orderInfo = data.order
-				this.shareCode = data.shareCode
+				this.orderInfo = data.shopOrder
+				this.userId = this.orderInfo.userId
+				this.rechargeGoods = this.orderInfo.rechargeGoods
+				// this.shareCode = data.shareCode
 				this.addressData = data.userInfo
-				this.information = data.order
-				this.btnStatus = data.order.status
-				this.payStatus = data.order.payStatus
-				this.payableAmount = data.order.payableAmount
-				this.shopOrderData = data.shopOrderList
+				this.receiptAmount = this.orderInfo.receiptAmount
+				this.returnedPurchaseFee = this.orderInfo.returnedPurchaseFee
 				this.orderInvoice = data.orderInvoice
-				this.onlinePayFlag = data.order.onlinePayFlag
 				this.returnedPurchaseList = data.returnedPurchaseList
 				this.discernReceiptList = data.discernReceiptList
 				this.voucherList = data.voucher
-				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
+				this.skeletonShow = true
 			} catch (error) {
-				//TODO handle the exception
 				this.$util.msg(error.msg, 2000)
 			}
 		},
 		handButtonConfirm(data) {
-			//监听点击时间的按钮类型并执行...
-			this.handShowAlert(data)
-		},
-		handShowAlert(data) {
 			//判断点击的按钮类型并执行...
 			switch (data.type) {
-				case 'cancel':
-					//取消订单
+				case 'cancel': //取消订单
 					this.modal = true
 					this.contentModalText = '确认取消该订单吗?'
 					this.handleModelEven = 1
 					break
-				case 'query':
-					this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + this.orderId)
-					break
-				case 'upload':
-					this.$api.navigateTo('/pages/user/order/order-addpay?orderId=' + this.orderId)
-					break
-				case 'confirm':
-					//确认收货
+				case 'delete': //删除订单
 					this.modal = true
-					this.contentModalText = '确认收货吗?'
+					this.contentModalText = '确认删除该订单吗?'
 					this.handleModelEven = 2
 					break
-				case 'pay':
+				case 'confirm': // 确认订单
+					this.modal = true
+					this.contentModalText = '确认此订单吗?'
+					this.handleModelEven = 3
+					break
+				case 'balance':
 					this.getOrderPaymentValidation(data)
 					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
 			}
 		},
-		getOrderPaymentValidation(data) {
-			//监听根据付款状态做操作
-			this.OrderService.OrderPaymentValidation({ orderId: data.orderId })
-				.then(response => {
-					let data = response.data
-					if (data.onlinePayFlag == 1) {
-						// 只能线下
-						this.$api.navigateTo(`/pages/user/pay/card-under?orderId=${data.orderId}`)
-					} else {
-						this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
-					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
-		},
 		handleClick(e) {
 			//确认操作
 			if (e.index == 1) {
 				switch (this.handleModelEven) {
 					case 1: //取消订单
-						this.cancelOrder()
+						this.cancelOrder(this.shopOrderId)
+						break
+					case 2: //删除订单
+						this.deleteOrder(this.shopOrderId)
 						break
-					case 2: //确认收货
-						this.confirmReceipt()
+					case 3: //确认订单
+						this.affirmOrder(this.shopOrderId)
 						break
 				}
 			}
 			this.modal = false
 		},
-		async confirmReceipt() {
-			//确认收货
+		//取消订单
+		async cancelOrder(shopOrderId) {
 			try {
-				const res = await this.OrderService.ConfirmReceipt({ orderId: this.orderId })
+				const res = await this.OrderService.CancelOrder({ shopOrderId: shopOrderId, userIdentity: 1 })
 				this.$util.msg(res.msg, 2000, true, 'success')
 				setTimeout(() => {
 					this.initOrderDetaileData()
@@ -293,10 +317,26 @@ export default {
 				this.$util.msg(error.msg, 2000)
 			}
 		},
-		async cancelOrder() {
-			//取消订单
+		//删除订单
+		async deleteOrder(shopOrderId) {
+			try {
+				const res = await this.OrderService.DeleteOrder({ shopOrderId: shopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					if (this.shareType === 'share') {
+						this.$api.switchTabTo('/pages/tabBar/home/index')
+					} else {
+						this.$api.redirectTo(`/pages/user/order/order-list?type=detele&state=${this.state}`)
+					}
+				}, 2000)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//确认订单
+		async affirmOrder(shopOrderId) {
 			try {
-				const res = await this.OrderService.CancelOrder({ orderId: this.orderId, userIdentity: 0 })
+				const res = await this.OrderService.AffirmOrder({ shopOrderId: shopOrderId })
 				this.$util.msg(res.msg, 2000, true, 'success')
 				setTimeout(() => {
 					this.initOrderDetaileData()
@@ -305,6 +345,89 @@ export default {
 				this.$util.msg(error.msg, 2000)
 			}
 		},
+		// 再来一单
+		async handOrderAgain(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)
+				}
+			}
+		},
+		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)
+			}
+		},
+		//监听余额抵扣按钮
+		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)
+			}
+		},
+		//监听根据付款状态做操作
+		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 {
+						console.log('payModelData',this.payModelData)
+						this.isPayModel = true
+						this.modelType = 3
+						console.log('isPayModel',this.isPayModel)
+					}
+				} else {
+					this.$util.modal('', '该订单已走线上支付流程,不能进行余额抵扣。', '确定', '', false, () => {})
+				}
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		// 条款
+		openclauseConten(id) {
+			this.$api.navigateTo(`/pages/service/sellconten?clauseId=${id}`)
+		},
+		hanldePopupFn(data) {
+			//监听活动内容
+			this.popupShow = true
+			this.handlerPros = data
+		},
 		onShareAppMessage(res) {
 			//分享转发
 			this.isShareModal = false
@@ -312,8 +435,10 @@ export default {
 				// 来自页面内转发按钮
 			}
 			return {
-				title: '您有新的分享订单,快来查看吧~',
-				path: `/pages/user/order/order-sharelogin?orderId=${this.orderId}&userId=${this.userId}`,
+				title: '您有新的订单,请点击查看~',
+				path: `/pages/user/order/order-sharelogin?orderId=${this.orderId}&userId=${
+					this.userId
+				}&serviceProviderId=${this.serviceProviderId}`,
 				imageUrl: 'https://static.caimei365.com/app/mini-mcare/icon/icon_shareOrder@2x.png'
 			}
 		},
@@ -349,7 +474,11 @@ export default {
 			return systeminfo
 		}
 	},
-	onShow() {}
+	onShow() {
+		this.$api.getStorage().then(resolve => {
+			this.serviceProviderId = resolve.serviceProviderId ? resolve.serviceProviderId : 0
+		})
+	}
 }
 </script>
 
@@ -358,17 +487,6 @@ page {
 	height: auto;
 	background: #f7f7f7;
 }
-.details {
-	padding-bottom: 130rpx;
-}
-.return-instructions {
-	font-size: 26rpx;
-	color: #f3b574;
-	line-height: 42rpx;
-	padding: 32rpx 50rpx;
-	background-color: #fffaf8;
-	text-align: justify;
-}
 .btn-hover {
 	background: #ffffff;
 }
@@ -468,29 +586,138 @@ page {
 		float: left;
 		color: #ff2a2a;
 	}
+	.status-visible {
+		float: left;
+		color: #999999;
+		margin-left: 20rpx;
+	}
 	.bage-buss {
 		display: inline-block;
-		width: 72rpx;
-		height: 32rpx;
+		width: 100rpx;
+		height: 36rpx;
 		background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
 		border-radius: 6rpx;
-		line-height: 32rpx;
+		line-height: 36rpx;
 		text-align: center;
 		color: #ffffff;
-		margin-top: 10rpx;
 		float: right;
+		font-size: $font-size-24;
 	}
 	.bage-auto {
+		display: inline-block;
+		width: 100rpx;
+		height: 36rpx;
+		background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
+		border-radius: 6rpx;
+		line-height: 36rpx;
+		text-align: center;
+		color: #ffffff;
+		float: right;
+		font-size: $font-size-24;
+	}
+	.bage-name {
+		line-height: 32rpx;
+		display: inline-block;
+		color: #999999;
+		float: right;
+		font-size: $font-size-24;
+	}
+	.Rebate {
 		display: inline-block;
 		width: 72rpx;
 		height: 32rpx;
-		background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
+		background: #ff7a51;
 		border-radius: 6rpx;
 		line-height: 32rpx;
 		text-align: center;
 		color: #ffffff;
-		margin-top: 10rpx;
 		float: right;
+		font-size: $font-size-24;
+		margin-left: 20rpx;
 	}
 }
+.aganBj {
+	position: fixed;
+	left: 0;
+	top: 0;
+	bottom: 0;
+	width: 100%;
+	height: 100%;
+	background-color: rgba(0, 0, 0, 0.5);
+	z-index: 999999;
+	.alertAgan {
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%, -50%);
+		width: 580rpx;
+		background-color: #fff;
+		border-radius: 16rpx;
+		.title {
+			font-size: 30rpx;
+			color: #333333;
+			line-height: 42rpx;
+			padding: 30rpx;
+			display: block;
+		}
+		.goods {
+			padding: 0 30rpx;
+			.list {
+				padding: 10px 0;
+				border-bottom: 1rpx solid #e1e1e1;
+				margin: 10rpx 0;
+				.image-left {
+					width: 86rpx;
+					height: 86rpx;
+					border: 2rpx solid #e1e1e1;
+					border-radius: 6rpx;
+					display: inline-block;
+					vertical-align: middle;
+				}
+				.name-right {
+					display: inline-block;
+					width: 416rpx;
+					margin-left: 15rpx;
+					font-size: 26rpx;
+					color: #666666;
+					vertical-align: middle;
+					word-break: break-all;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					display: -webkit-inline-box;
+					-webkit-line-clamp: 2;
+					-webkit-box-orient: vertical;
+				}
+			}
+		}
+		.BtnAll {
+			margin-top: 30rpx;
+			.btn {
+				display: inline-block;
+				width: 290rpx;
+				height: 90rpx;
+				line-height: 90rpx;
+				text-align: center;
+				&.closebtn {
+					border-radius: 0px 0px 0px 10px;
+					color: #999999;
+					background: #efefef;
+				}
+				&.cancel {
+					border-radius: 0px 0px 8px 0px;
+					background: $btn-confirm;
+					color: #fff;
+				}
+			}
+		}
+	}
+}
+.return-instructions {
+	font-size: 26rpx;
+	color: #ff5b00;
+	line-height: 42rpx;
+	padding: 32rpx 50rpx;
+	background-color: #fffaf8;
+	text-align: justify;
+}
 </style>

Datei-Diff unterdrückt, da er zu groß ist
+ 388 - 427
pages/seller/order/order-list.vue


+ 380 - 328
pages/seller/order/order-search.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">
@@ -17,7 +16,7 @@
 						placeholder="请输入商品关键词"
 						v-model.trim="listQuery.searchWord"
 					/>
-					<text class="iconfont icon-shanchu2" v-if="isShowClose" @click="delInputText()"></text>
+					<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
 				</view>
 				<view class="search-btn" @click="subMitSearch()">搜索</view>
 			</view>
@@ -62,13 +61,16 @@
 									<text>{{ order.clubName ? order.clubName : '' }}</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 ||
@@ -77,54 +79,100 @@
 									>
 										自主
 									</text>
-									<text class="bage-text tui-skeleton-fillet">
-										订单号:{{ order.orderNo }}({{ order.orderId }})
-									</text>
-								</view>
-								<view class="order-title-b">
-									<view class="order-title-btxt tui-skeleton-fillet"
-										>下单时间:{{ order.orderTime }}</view
+									<image
+										class="bage-icon"
+										src="https://static.caimei365.com/app/img/icon/icon-type@3x.png"
+										mode="widthFix"
+										v-if="order.secondHandOrderFlag == 1"
 									>
-									<view class="order-title-tip tui-skeleton-fillet">{{
-										StateExpFormat(order.status)
-									}}</view>
+									</image>
 								</view>
 							</view>
-							<block v-for="(shop, index) in order.shopOrderList" :key="index">
-								<view class="goods-title">
-									<view class="title-text tui-skeleton-fillet">{{ shop.shopName }}</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="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="" />
-										</view>
-										<view class="pros-product clearfix">
-											<view class="producttitle tui-skeleton-fillet">{{ pros.name }}</view>
+								<view class="title-text tui-skeleton-fillet">{{ order.shopName }}</view>
+							</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.giftType == 2 || pros.giftType == 1"
+											>赠品</text
+										>
+									</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">
-												<view class="price tui-skeleton-fillet">
-													<text>¥{{ pros.price | NumFormat }}</text>
+												<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
+													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 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>
+											</template>
 										</view>
 									</view>
 								</view>
-							</block>
+							</view>
 							<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="count tui-skeleton-fillet">共{{ order.itemCount }}件商品</view>
 									<view
 										class="money tui-skeleton-fillet"
 										v-if="order.status == 31 || order.status == 32 || order.status == 33"
@@ -135,43 +183,77 @@
 									</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 -->
-							<order-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"
-							>
-							</order-button>
+							/>
 						</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>
 		<!-- 分享弹窗 -->
-		<share-alert v-if="isShareModal" :orderId="btnoRderID" @shareConfirm="onShareAppMessage"> </share-alert>
+		<cm-share-popup
+			:shopOrderId="handleShopOrderId"
+			:shareType="isShareType"
+			v-if="isShareModal"
+			@shareConfirm="onShareAppMessage"
+		/>
+		<!-- 再来一单弹窗 -->
+		<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="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 orderButton from './components/sellerOrderButton' //按钮
 import modalLayer from '@/components/modal-layer'
 import empty from './components/empty'
-import shareAlert from './components/sellerShareAlert.vue' //分享弹窗
+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, // 每页条数
@@ -179,10 +261,11 @@ const defaultListQuery = {
 	searchWord: '' // 搜索关键词
 }
 export default {
+	mixins: [orderMixins],
 	components: {
-		orderButton,
 		empty,
-		shareAlert
+		cmListButton,
+		cmSharePopup,
 	},
 	data() {
 		return {
@@ -193,13 +276,11 @@ export default {
 			serachRecordList: [],
 			isShowWrapper: false,
 			isModallayer: false,
-			isShowEmpty: false,
+			isShowEmpty: true,
 			windowHeight: '',
 			showSkeleton: true,
 			userId: 0,
 			orderList: [],
-			btnClubUserID: 0,
-			btnoRderID: 0, //点击按钮传入的的订单ID
 			scrollTop: 0,
 			deteleType: '',
 			skeletonShow: true,
@@ -214,20 +295,14 @@ export default {
 			navbarHeight: '',
 			nomoreText: '上拉显示更多',
 			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 == '') {
@@ -238,21 +313,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() {
 			//输入框失去焦点时触发
@@ -277,19 +458,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 != '') {
@@ -298,174 +466,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
-			}
-		},
-		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) {
@@ -477,38 +478,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
@@ -558,7 +527,7 @@ page {
 			left: 24rpx;
 			z-index: 10;
 		}
-		.icon-shanchu2 {
+		.icon-shanchu1 {
 			font-size: 36rpx;
 			color: #8a8a8a;
 			position: absolute;
@@ -775,53 +744,36 @@ page {
 		float: left;
 		line-height: 68rpx;
 		position: relative;
-		.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-icon {
+			width: 50rpx;
+			height: 50rpx;
+			display: block;
+			position: absolute;
+			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%);
+			width: 80rpx;
+			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;
 		}
@@ -832,6 +784,14 @@ page {
 	height: 56rpx;
 	float: left;
 	margin-top: 10rpx;
+	.floor-item-act {
+		height: 56rpx;
+		text-align: center;
+		box-sizing: border-box;
+		float: left;
+		padding: 10rpx 0;
+		margin-right: 12rpx;
+	}
 	.title-text {
 		width: 400rpx;
 		overflow: hidden;
@@ -916,11 +876,27 @@ page {
 			}
 		}
 	}
+	.floor-item-act {
+		width: 100%;
+		height: 56rpx;
+		text-align: center;
+		box-sizing: border-box;
+		float: left;
+		padding: 0 0 10rpx 0;
+	}
 }
 .order-footer {
 	width: 100%;
 	height: 78rpx;
 	float: left;
+	.order-footer-top {
+		width: 100%;
+		height: 34rpx;
+		line-height: 34rpx;
+		font-size: $font-size-24;
+		color: #999999;
+		text-align: right;
+	}
 	.order-footer-bot {
 		width: 100%;
 		float: left;
@@ -941,4 +917,80 @@ page {
 		}
 	}
 }
+.aganBj {
+	position: fixed;
+	left: 0;
+	top: 0;
+	bottom: 0;
+	width: 100%;
+	height: 100%;
+	background-color: rgba(0, 0, 0, 0.5);
+	z-index: 999999;
+	.alertAgan {
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%, -50%);
+		width: 580rpx;
+		background-color: #fff;
+		border-radius: 16rpx;
+		.title {
+			font-size: 30rpx;
+			color: #333333;
+			line-height: 42rpx;
+			padding: 30rpx;
+			display: block;
+		}
+		.goods {
+			padding: 0 30rpx;
+			.list {
+				padding: 10px 0;
+				border-bottom: 1rpx solid #e1e1e1;
+				margin: 10rpx 0;
+				.image-left {
+					width: 86rpx;
+					height: 86rpx;
+					border: 2rpx solid #e1e1e1;
+					border-radius: 6rpx;
+					display: inline-block;
+					vertical-align: middle;
+				}
+				.name-right {
+					display: inline-block;
+					width: 416rpx;
+					margin-left: 15rpx;
+					font-size: 26rpx;
+					color: #666666;
+					vertical-align: middle;
+					word-break: break-all;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					display: -webkit-inline-box;
+					-webkit-line-clamp: 2;
+					-webkit-box-orient: vertical;
+				}
+			}
+		}
+		.BtnAll {
+			margin-top: 30rpx;
+			.btn {
+				display: inline-block;
+				width: 290rpx;
+				height: 90rpx;
+				line-height: 90rpx;
+				text-align: center;
+				&.closebtn {
+					border-radius: 0px 0px 0px 10px;
+					color: #999999;
+					background: #efefef;
+				}
+				&.cancel {
+					border-radius: 0px 0px 8px 0px;
+					background: $btn-confirm;
+					color: #fff;
+				}
+			}
+		}
+	}
+}
 </style>

+ 0 - 0
pages/user/order/components/choiceAddress.vue → pages/user/order/components/cm-address-temp.vue


+ 3 - 4
pages/user/order/components/details/orderButton.vue → pages/user/order/components/cm-details-button.vue

@@ -2,8 +2,7 @@
 	<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-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">
@@ -103,7 +102,7 @@
 			btnConfirm(type,order){
 				let data = {
 						type:type,
-						orderId:order.shopOrderId,
+						shopOrderId:order.shopOrderId,
 						order:order
 					}
 				this.$emit('buttonConfirm',data)
@@ -141,7 +140,7 @@
 			.btn{
 				width: 150rpx;
 				height:  64rpx;
-				margin:22rpx 22rpx 22rpx 0;
+				margin:22rpx 15rpx 22rpx 0;
 				line-height: 64rpx;
 				font-size:$font-size-26;
 				color: #666666;

+ 0 - 0
pages/user/order/components/freight-popup.vue → pages/user/order/components/cm-freight-popup.vue


+ 4 - 4
pages/user/order/components/goodsList.vue → pages/user/order/components/cm-goods-temp.vue

@@ -40,14 +40,14 @@
                         />
                     </view>
                 </view>
-                <freight-popup
+                <cm-freight-popup
                     ref="freight"
                     :goodIndex="index"
                     :goodsData="[item]"
                     :ispopupShow="ispopupShow"
                     @show-freight="showFreight"
                     @change-freight="changeFreight"
-                ></freight-popup>
+                />
                 <view class="goods-pros-b">
                     <view class="sum">
                         <text>合计:</text>
@@ -67,7 +67,7 @@
 </template>
 
 <script>
-import FreightPopup from './freight-popup.vue'
+import cmFreightPopup from './cm-freight-popup.vue'
 import CountUp from './countUp.vue'
 export default {
     name: 'goods',
@@ -77,7 +77,7 @@ export default {
         }
     },
     components: {
-        FreightPopup,
+        cmFreightPopup,
         CountUp
     },
     data() {

+ 6 - 4
pages/user/order/components/details/orderListButton.vue → pages/user/order/components/cm-list-button.vue

@@ -2,11 +2,13 @@
     <view class="button-template">
         <!-- 底部按钮 -->
         <view class="button-content">
+			<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-confirm" v-if="btnState.isConfirmation" @click.stop="btnConfirm('confirmation',order)">确认订单</view> -->
             <view class="btn btn-share" @click.stop="onShareCode(order.shopOrderId)">分享订单</view>
             <view class="btn btn-cancel" v-if="btnState.isCancel" @click.stop="btnConfirm('cancel', order)">
                 取消订单
@@ -92,14 +94,14 @@ export default {
         getShareCode(code) {
             this.shareCode = code
         },
-        onShareCode(orderId) {
+        onShareCode(shopOrderId) {
             this.$parent.isShareModal = true
-            this.$emit('shareConfirm', orderId)
+            this.$emit('shareConfirm', shopOrderId)
         },
         btnConfirm(type, order) {
             let data = {
                 type: type,
-                orderId: order.shopOrderId,
+                shopOrderId: order.shopOrderId,
                 order: order
             }
             this.$emit('buttonConfirm', data)

+ 29 - 32
components/cm-module/modelAlert/shareAlert.vue → pages/user/order/components/cm-share-popup.vue

@@ -2,13 +2,11 @@
 	<view class="alert spec" :class="specClass">
 		<view class="model-warp">
 			<view class="content">
-				<view class="title-image">
-					<image :src="staticUrl + 'icon_share_modal@2x.png'" mode=""></image>
-				</view>
 				<view class="text-content">
+					<view class="title">分享订单</view>
 					<view class="share">您的分享码:<text class="txt">{{shareCode}}</text></view>
 					<view class="text">
-						<text>有效期为24小时。需要输入该分享码才能查看本订单</text>
+						<text>有效期为24小时。如果对方不是您机构的运营人员,需要输入该分享码才能查看本订单</text>
 					</view>
 				</view>				
 				<view class="alert-btn">
@@ -26,29 +24,29 @@
 	export default{
 		name:'sharealert',
 		props:{
-			orderId:{
+			shopOrderId:{
 				type:Number
 			}
 		},
 		data() {
 			return{
 				shareCode:'',
-				staticUrl: this.global.staticUrl,
 			}
 		},
 		created() {
-            console.log(this.orderId, '分享弹窗shopOrderId')
-			this.getShareCode(this.orderId)
+			this.getShareCode(this.shopOrderId)
 		},
 		methods:{
-			getShareCode(res){
-				this.OrderService.QueryOrderShareCode({shopOrderId: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
@@ -84,8 +82,8 @@
 			display: block;
 		}
 		.content{
-			width: 580rpx;
-			height: 540rpx;
+			width: 518rpx;
+			height: 418rpx;
 			position: absolute;
 			background: $bg-color;
 			left: 0;
@@ -94,20 +92,19 @@
 			top: 0;
 			margin: auto;
 			border-radius: 24rpx;
-			.title-image{
-				width: 580rpx;
-				height: 210rpx;
-				image{
-					width: 580rpx;
-					height: 210rpx;
-					display: block;
-				}
-			}
 			.text-content{
-				width: 580rpx;
-				height: auto;
+				width: 448rpx;
+				height: 264rpx;
 				padding: 20rpx 35rpx;
-				box-sizing: border-box;
+				float: left;
+				.title{
+					line-height: 40rpx;
+					font-size: $font-size-28;
+					color: $text-color;
+					text-align: center;
+					font-weight: bold;
+					margin-bottom: 36rpx;
+				}
 				.share{
 					line-height: 36rpx;
 					font-size: $font-size-26;
@@ -132,7 +129,7 @@
 				width: 80%;
 				height: 70rpx;
 				display: flex;
-				margin: 15rpx auto;
+				margin: 0 auto;
 				.btn{
 					flex: 1;
 					line-height: 70rpx;
@@ -152,4 +149,4 @@
 			}
 		}	
 	}
-</style>
+</style>

+ 0 - 0
pages/user/order/components/details/orderAddress.vue → pages/user/order/components/details/cm-address-temp.vue


+ 0 - 0
pages/user/order/components/details/goodsList.vue → pages/user/order/components/details/cm-goods-temp.vue


+ 151 - 0
pages/user/order/components/details/cm-invice-temp.vue

@@ -0,0 +1,151 @@
+<template name="invoice">
+	<view class="invoice-template">
+		<!-- 发票信息 -->
+		<view class="invoice-content">
+			<view class="invoice-title">发票信息</view>
+			<view class="invoice-empty">
+				<text>{{ invoiceText }}</text>
+			</view>
+			<view class="invoice-text" v-if="orderInvoice.type > 0">
+				<view class="table">
+					<text class="label-name">发票抬头:</text>
+					<text class="label-text">{{ orderInvoice.invoiceTitle ? orderInvoice.invoiceTitle : '无' }}</text>
+				</view>
+				<template v-if="orderInvoice.type === 2 || orderInvoice.headingType === 1">
+					<view class="table">
+						<text class="label-name">单位税号:</text>
+						<text class="label-text">{{
+							orderInvoice.corporationTaxNum ? orderInvoice.corporationTaxNum : '无'
+						}}</text>
+					</view>
+					<view class="table">
+						<text class="label-name">注册地址:</text>
+						<text class="label-text">{{
+							orderInvoice.registeredAddress ? orderInvoice.registeredAddress : '无'
+						}}</text>
+					</view>
+					<view class="table">
+						<text class="label-name">注册电话:</text>
+						<text class="label-text">{{
+							orderInvoice.registeredPhone ? orderInvoice.registeredPhone : '无'
+						}}</text>
+					</view>
+					<view class="table">
+						<text class="label-name">开户银行:</text>
+						<text class="label-text">{{ orderInvoice.openBank ? orderInvoice.openBank : '无' }}</text>
+					</view>
+					<view class="table">
+						<text class="label-name">银行账号:</text>
+						<text class="label-text">{{ bankAccountNo ? bankAccountNo : '无' }}</text>
+					</view>
+				</template>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'invoice',
+	props: {
+		orderInvoice: {
+			type: Object
+		}
+	},
+	filters: {},
+	data() {
+		return {
+			invoiceText: '不开发票',
+			title: '发票信息',
+			isOpen: false,
+			bankAccountNo: ''
+		}
+	},
+	created() {
+		this.initData(this.orderInvoice)
+	},
+	computed: {},
+	methods: {
+		initData(data) {
+			if (data) {
+				this.bankAccountNo = this.$reg.bankRegex(data.bankAccountNo)
+				this.invoiceText = this.setInvoiceText(data)
+			}
+		},
+		// 设置发票文案
+		setInvoiceText(data) {
+			const map = {
+				0: '个人',
+				1: '单位'
+			}
+			switch (data.type) {
+				case 0:
+					return `不开发票`
+					break
+				case 1:
+					return `普票-${map[data.headingType]}`
+					break
+				case 2:
+					return `专票`
+					break
+			}
+		},
+		onMessage(pros) {},
+		showInvoice() {
+			this.isOpen = !this.isOpen
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+.invoice-template {
+	width: 100%;
+	height: auto;
+	background: #ffffff;
+	float: left;
+	margin-top: 24rpx;
+	.invoice-content {
+		width: 702rpx;
+		padding: 20rpx 24rpx;
+	}
+	.invoice-title {
+		font-size: $font-size-28;
+		color: $text-color;
+		text-align: left;
+		line-height: 40rpx;
+		font-weight: bold;
+		margin-bottom: 30rpx;
+	}
+	.invoice-empty {
+		font-size: $font-size-28;
+		color: $text-color;
+		text-align: left;
+		line-height: 64rpx;
+		.txt {
+			font-size: $font-size-24;
+			color: #999999;
+		}
+	}
+	.invoice-text {
+		width: 100%;
+		height: auto;
+		.table {
+			height: auto;
+			line-height: 64rpx;
+			font-size: $font-size-26;
+			color: $text-color;
+			text-align: left;
+			position: relative;
+			.label-name {
+				display: inline-block;
+				line-height: 64rpx;
+				color: #999999;
+			}
+			.label-text {
+				color: #333333;
+			}
+		}
+	}
+}
+</style>

+ 6 - 6
pages/user/order/components/details/orderInformation.vue → pages/user/order/components/details/cm-order-temp.vue

@@ -163,11 +163,11 @@ export default {
 				}
 				.bage-buss {
 					display: inline-block;
-					width: 72rpx;
-					height: 30rpx;
+					width: 80rpx;
+					height: 36rpx;
 					background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
 					border-radius: 4rpx;
-					line-height: 30rpx;
+					line-height: 36rpx;
 					font-size: $font-size-24;
 					text-align: center;
 					color: #ffffff;
@@ -175,11 +175,11 @@ export default {
 				}
 				.bage-auto {
 					display: inline-block;
-					width: 72rpx;
-					height: 30rpx;
+					width: 80rpx;
+					height: 36rpx;
 					background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
 					border-radius: 4rpx;
-					line-height: 30rpx;
+					line-height: 36rpx;
 					font-size: $font-size-24;
 					text-align: center;
 					color: #ffffff;

+ 1 - 0
pages/user/order/components/details/paymentRecord.vue → pages/user/order/components/details/cm-payment-temp.vue

@@ -68,6 +68,7 @@
 					14: '支付宝',
 					15: '微信支付',
 					16: '余额抵扣',
+					31: '线下支付凭证'
 				}
 				if(record.payType === 28 || record.payType === 29 ){
 					return record.quickPayStr

+ 0 - 0
pages/user/order/components/details/refundRecord.vue → pages/user/order/components/details/cm-refund-temp.vue


+ 0 - 0
pages/user/order/components/details/voucherRecord.vue → pages/user/order/components/details/cm-voucher-temp.vue


+ 0 - 198
pages/user/order/components/details/logisticsRecord.vue

@@ -1,198 +0,0 @@
-<template name="logistics">
-	<view class="logistics-template">
-		<!-- 物流信息 -->
-		<view
-			class="logistics-content"
-			v-if="logisticsData.length > 0"
-			v-for="(item, index) in logisticsData"
-			:key="index"
-		>
-			<view class="logistics-top"> <text class="name">物流信息</text> </view>
-			<view class="logistics-warp">
-				<view class="logistics-warp__wrapper">
-					<view class="logistics-main">
-						<view class="logistics-main-top">
-							<view class="main-top" @click="showlogistics(index)">
-								{{ item.expressname }}:{{ item.expressNumber }}
-								<text class="clipboard" @click="clipboard(item.expressNumber)">复制</text>
-								<text
-									class="arrow-showMore iconfont icon-web_xiangxiazhankai"
-									:style="{ transform: item.isOpen ? 'rotate(180deg)' : 'rotate(0)' }"
-								></text>
-							</view>
-							<view class="main-bot"> 发货时间:{{ item.expressNewtime }} </view>
-						</view>
-						<view
-							v-if="item.expressRecord.length > 0"
-							v-for="(infoItem, infoIndex) in item.expressRecord"
-							:key="infoIndex"
-							:class="{ 'logistics-warp--hide': !item.isOpen }"
-							class="logistics-main-bot logistics-animation"
-							:style="{
-								transform: item.isOpen ? 'translateY(0)' : 'translateY(-50%)',
-								'-webkit-transform': item.isOpen ? 'translateY(0)' : 'translateY(-50%)'
-							}"
-						>
-							{{ infoItem.time }} {{ infoItem.desc }}
-						</view>
-						<view
-							v-if="item.expressRecord"
-							:class="{ 'logistics-warp--hide': !item.isOpen }"
-							class="logistics-main-bot logistics-animation"
-							:style="{
-								transform: item.isOpen ? 'translateY(0)' : 'translateY(-50%)',
-								'-webkit-transform': item.isOpen ? 'translateY(0)' : 'translateY(-50%)'
-							}"
-						>
-							暂无物流信息
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="logistics-content" v-else> 暂无物流信息 </view>
-	</view>
-</template>
-
-<script>
-const thorui = require('@/components/clipboard/clipboard.thorui.js')
-export default {
-	name: 'logistics',
-	data() {
-		return {
-			title: '发票信息',
-			logisticsData: ''
-		}
-	},
-	created() {},
-	computed: {},
-	methods: {
-		initData(res) {
-			this.logisticsData = res
-		},
-		showlogistics(index) {
-			let isOpen = this.logisticsData[index]['isOpen']
-			this.logisticsData[index]['isOpen'] = !isOpen
-		},
-		clipboard(data) {
-			thorui.getClipboardData(data, res => {
-				if (res) {
-					this.$util.msg('复制成功', 2000, true, 'success')
-				} else {
-					this.$util.msg('复制失败', 2000, true, 'none')
-				}
-			})
-		}
-	}
-}
-</script>
-
-<style lang="scss">
-.logistics-template {
-	width: 100%;
-	height: 100%;
-	background: #ffffff;
-	float: left;
-	.logistics-content {
-		width: 702rpx;
-		padding: 20rpx 24rpx;
-		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);
-			}
-		}
-		.logistics-warp {
-			width: 100%;
-			overflow: hidden;
-			.table {
-				height: 76rpx;
-				line-height: 76rpx;
-				font-size: $font-size-26;
-				color: $text-color;
-				text-align: left;
-			}
-		}
-		.logistics-main-top {
-			width: 100%;
-			height: auto;
-			float: left;
-			padding-top: 24rpx;
-			margin-bottom: 14rpx;
-			.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: 42rpx;
-		}
-	}
-}
-</style>

+ 0 - 224
pages/user/order/components/freight.vue

@@ -1,224 +0,0 @@
-<template name="freight">
-	<view class="freight-template">
-		<!-- 运费信息 -->
-		<view class="invoice-freight">
-			<view class="freight-main" v-if="infoData.designatedFlag === 2">
-				<view class="freight-left">运费</view>
-				<view class="freight-right">
-					<view class="freight-text">{{ freightText }}</view>
-				</view>
-			</view>
-			<template v-else>
-				<view class="freight-main">
-					<view class="freight-left">运费</view>
-					<view class="freight-right">
-						<view class="freight-text">{{ totalFreight }}</view>
-					</view>
-				</view>
-				<view class="freight-bean">
-					<view class="bean-le">冷链运输费</view>
-					<view class="bean-ri">
-						<text>¥{{ coldChain | NumFormat }}</text>
-						<view class="checkbox-box" v-if="coldChain > 0">
-							<button
-								class="checkbox iconfont"
-								hover-class="btn-hover"
-								@click.stop="checkedBalabce"
-								:class="[ischecked ? 'icon-yixuanze' : 'icon-weixuanze']"
-							></button>
-						</view>
-					</view>
-				</view>
-				<view class="freight-bean" v-if="infoData.designatedFlag === 3">
-					<view class="bean-le">其他运费</view>
-					<view class="bean-ri">
-						<view>{{ freightText }}</view>
-					</view>
-				</view>
-			</template>
-		</view>
-	</view>
-</template>
-
-<script>
-export default {
-	name: 'freight',
-	props: {
-		coldChain: {
-			type: Number
-		},
-		freightData: {
-			type: Object
-		}
-	},
-	data() {
-		return {
-			infoData: {},
-			freightText: '',
-			postageFlag: 0,
-			ischecked: true,
-			totalFreight: 0
-		}
-	},
-	created() {
-		this.initData(this.freightData)
-	},
-	filters: {
-		NumFormat(value) {
-			//处理金额
-			if (value && value > 0) {
-				return Number(value).toFixed(2)
-			} else {
-				return '0.00'
-			}
-		}
-	},
-	methods: {
-		async initData(data) {
-			this.infoData = data
-			/**
-			 * 1.如果designatedFlag === 1 且 冷链费 大于 0 勾选冷链费 运费为 冷链费
-			 * 2.如果designatedFlag === 1 且 冷链费 等于 0 运费为0
-			 * 3.如果designatedFlag === 2 只有其他供应商商品 运费按采美规则
-			 * 4.如果designatedFlag === 3 且 冷链费 大于 0 其他供应商商品不包邮有运费 勾选冷链费 运费为 冷链费 + 采美规则运费
-			 * 5.如果designatedFlag === 3 且 冷链费 大于 0 其他供应商商品到付 勾选冷链费 运费为 冷链费
-			 * 5.如果designatedFlag === 3 且 冷链费 大于 0 其他供应商商品包邮 勾选冷链费 运费为 冷链费
-			 * */
-			if (data.designatedFlag === 1) {
-				this.freightText = '¥' + data.postage.toFixed(2)
-				this.totalFreight = '¥' + this.coldChain.toFixed(2)
-			} else if (data.designatedFlag === 2) {
-				this.infoFreightText(data)
-			} else if (data.designatedFlag === 3) {
-				if (this.coldChain === 0) { this.ischecked = false }
-				if (data.postageFlag === 1) {
-					this.freightText = '¥' + data.postage.toFixed(2)
-					this.totalFreight = '¥' + (this.coldChain+data.postage).toFixed(2)
-				} else {
-					this.freightText = data.postageFlag === 0 ? '包邮' : '到付'
-					this.totalFreight = this.ischecked ? '¥' + this.coldChain.toFixed(2) : this.freightText
-				}
-			}
-		},
-		infoFreightText(data) {
-			//仅其他供应商商品设置运费
-            console.log(data.postageFlag)
-			switch (data.postageFlag) {
-				case 0:
-					this.freightText = '包邮'
-					this.freightData.freight = 0
-					this.postageFlag = data.postageFlag
-					break
-				case 1:
-					this.freightText = '¥'+ data.postage.toFixed(2)
-					this.postageFlag = data.postageFlag
-					break
-				case 2:
-					this.freightText = '到付'
-					this.postageFlag = data.postageFlag
-					this.freightData.freight = 0
-					break
-			}
-            console.log('freightText', this.freightText)
-		},
-		checkedBalabce() {
-			//勾选是否使用冷链运输费
-			this.ischecked = !this.ischecked
-			if (this.ischecked) {
-				this.setTotalFreight(this.infoData)
-			} else {
-				this.totalFreight = this.freightText
-			}
-			this.$emit('confirmFreight', this.ischecked)
-		},
-		setTotalFreight(data){// 勾选冷链费
-			if (data.designatedFlag === 1) {
-				this.totalFreight ='¥'+ this.coldChain.toFixed(2)
-			} else {
-				if (data.postageFlag === 1) {
-					this.totalFreight = '¥' + (this.coldChain+data.postage).toFixed(2)
-				} else {
-					this.freightText = data.postageFlag === 0 ? '包邮' : '到付'
-					this.totalFreight =  '¥' + this.coldChain.toFixed(2)
-				}
-			}
-		}
-	}
-}
-</script>
-
-<style lang="scss">
-.freight-template {
-	width: 100%;
-	height: auto;
-	background: #ffffff;
-	float: left;
-	margin-top: 24rpx;
-	.invoice-freight {
-		width: 100%;
-		box-sizing: border-box;
-		padding: 10rpx 24rpx;
-		float: left;
-		.freight-main {
-			width: 100%;
-			height: 78rpx;
-			line-height: 78rpx;
-			font-size: $font-size-28;
-			color: $text-color;
-			background: #ffffff;
-			float: left;
-			.freight-left {
-				float: left;
-				font-weight: bold;
-			}
-			.freight-right {
-				float: right;
-				position: relative;
-				.freight-text {
-					float: left;
-					color:#F85050;
-				}
-			}
-		}
-		.freight-bean {
-			width: 100%;
-			height: 58rpx;
-			line-height: 58rpx;
-			float: left;
-			.bean-le {
-				float: left;
-				color: $text-color;
-				font-size: $font-size-26;
-			}
-			.bean-ri {
-				float: right;
-				display: flex;
-				align-items: center;
-				font-size: $font-size-28;
-				.checkbox-box {
-					display: flex;
-					width: 60rpx;
-					float: left;
-					height: 100%;
-					font-size: $font-size-26;
-					margin-left: 20rpx;
-					.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;
-					}
-					.iconfont {
-						font-size: 34rpx;
-					}
-				}
-			}
-		}
-	}
-}
-</style>

+ 0 - 140
pages/user/order/components/freightAlert.vue

@@ -1,140 +0,0 @@
-<template name="alert">
-	<view class="alert spec" :class="specClass">
-		<!-- 运费弹窗说明 -->
-		<view class="freight-alert"  @tap="hideFreight">
-			<view class="content">
-				<view class="title">
-					<text>运费规则</text>
-					<text class="iconfont icon-iconfontguanbi" @click.stop="hideFreight"></text>
-				</view>
-				<view class="text-content">
-					<view class="text-h1">一、除含有仪器类、家具类等指定商品的订单,运费规则如下:</view>
-					<view class="text">
-						<text>1、首单,全国包邮(注:如果首单中含有不包邮的指定商品,则首单只能"到付");</text>
-						<text>2、订单商品总额满1000元,全国包邮;</text>
-						<text>3、订单商品总额不足1000元,深圳市内运费10元,广东省内深圳市外运费15元,其它地方运费到付;</text>
-						<text>4、地推送货上门无需运费(注:下单可选择运费是否到付)。</text>
-					</view>
-					<view class="text-h1">二、含有仪器类、家具类等指定商品的订单,运费到付。</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:'alert',
-		props:{},
-		data() {
-			return{
-				
-			}
-		},
-		created() {
-			
-		},
-		onLoad(){
-			
-		},
-		methods:{
-			hideFreight(){
-				this.$parent.isfreightTip = false
-			},
-		},
-		onShow(){
-	
-		}
-	}
-</script>
-
-<style lang="scss">
-	/*弹窗*/
-	.model-warp.none{
-		display: none;
-	}
-	.model-warp.show{
-		display: block;
-	}
-	.freight-alert{
-		width: 100%;
-		height: 100%;
-		background: rgba(0,0,0,.5);
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 8888;
-		transition: all 0.4s;
-		&.none{
-			display: none;			
-		}
-		&.show{
-			display: block;
-		}
-		.content{
-			width: 530rpx;
-			height: 710rpx;
-			position: absolute;
-			background: $bg-color;
-			left: 0;
-			right: 0;
-			bottom: 0;
-			top: 0;
-			margin: auto;
-			padding: 20rpx 25rpx;
-			border-radius: 12rpx;
-			.title{
-				width: 100%;
-				height: 68rpx;
-				line-height: 68rpx;
-				font-size: $font-size-28;
-				color: $text-color;
-				text-align: center;
-				margin-bottom: 32rpx;
-				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: 40rpx 0;
-					line-height: 44rpx;
-					font-size: $font-size-26;
-					color:#666666;
-					text-align: justify;
-				}
-				.text-h1{
-					line-height: 44rpx;
-					font-size: $font-size-28;
-					color: $text-color;
-					text-align: justify;
-				}
-			}
-			.btn{
-				width: 100%;
-				height: 88rpx;
-				float: left;
-				background: $btn-confirm;
-				line-height: 88rpx;
-				font-size: $font-size-28;
-				text-align: center;
-				color: #FFFFFF;
-				border-radius: 0;
-				padding: 0;
-				margin-top: 2rpx;
-			}
-		}
-	}
-	
-</style>

+ 8 - 24
pages/user/order/create-order.vue

@@ -1,9 +1,9 @@
 <template>
     <view class="container order clearfix" :style="{ paddingBottom: isIphoneX ? '200rpx' : '164rpx' }">
         <!-- 地址选择 -->
-        <choice-address ref="choiceAddress" v-if="isRequest" :addressData="addressData" />
+        <cm-address-temp ref="choiceAddress" v-if="isRequest" :addressData="addressData" />
         <!-- 商品 -->
-        <goods-list
+        <cm-goods-temp
             ref="goods"
             v-if="isRequest"
             :goodsData="goodsData"
@@ -12,7 +12,6 @@
             :coldChain="handleColdChain"
             @show-freight="showFreight"
         />
-        <!-- <freight-alert v-if="isfreightTip" ref="csPhone" /> -->
         <!-- 发票信息 -->
         <cm-invice-popup
             ref="invoice"
@@ -50,25 +49,19 @@
             :size="28"
             shape="circle"
             :maskClosable="false"
-        ></tui-modal>
+        />
     </view>
 </template>
 <script>
 import { mapState, mapMutations } from 'vuex'
-import choiceAddress from './components/choiceAddress'
-import goodsList from './components/goodsList'
+import cmAddressTemp from './components/cm-address-temp'
+import cmGoodsTemp from './components/cm-goods-temp'
 import cmInvicePopup from './components/cm-invice-popup'
-import freight from './components/freight'
-import freightAlert from '@/components/cm-module/modelAlert/freightAlert'
-import FreightPopup from './components/freight-popup.vue'
 export default {
     components: {
-        choiceAddress,
-        goodsList,
-        cmInvicePopup,
-        freight,
-        freightAlert,
-        FreightPopup
+        cmAddressTemp,
+        cmGoodsTemp,
+        cmInvicePopup
     },
     data() {
         return {
@@ -135,7 +128,6 @@ export default {
             isFreight: false, // 是否加载完成渲染子组件
             isAddress: false, // 是否加载完成地址
             isExchangePopup: false, // 控制兑换优惠券弹窗
-            isfreightTip: false, // 控制邮费弹窗
             designatedFlag: '', // 是否为指定商品 1.仅为指定商品 2.仅为供应商商品 3.指定商品+供应商商品
             hanldFreePostFlag: '', // 邮费状态
             hanldFreight: '', // 邮费
@@ -393,10 +385,6 @@ export default {
             this.confirmParam.orderInfo = JSON.parse(this.confirmParam.orderInfo)
             this.confirmParam.orderInvoice = JSON.parse(this.confirmParam.orderInvoice)
         },
-        handFreightAlertShow() {
-            //显示邮费弹窗
-            this.isfreightTip = true
-        },
         handleClick(e) {
             // 采购量过小提示弹窗
             if (e.index === 1) {
@@ -439,10 +427,6 @@ export default {
                     console.log(res)
                 }
             })
-        },
-        hideFreight() {
-            //关闭邮费弹窗
-            this.isfreightTip = false
         }
     },
     onShow() {

+ 170 - 98
pages/user/order/order-details.vue

@@ -6,42 +6,58 @@
 			:navbar-data="nvabarData"
 			:headerBtnPosi="headerBtnPosi"
 			:isShare="isOrderShare"
-		></header-back>
+		/>
 		<tui-skeleton
 			v-if="!skeletonShow"
 			backgroundColor="#fafafa"
 			borderRadius="10rpx"
 			:isLoading="true"
 			:loadingType="5"
-		></tui-skeleton>
-		<view v-else class="container-details" :style="{ paddingTop: navbarHeight + 'px' }">
+		/>
+		<view v-else class="container-details" :style="{ paddingTop: navbarHeight + 'px' }" v-else>
+			<view class="status-text">
+				<view class="view-type">{{ orderInfo.status | statusFilters }}</view>
+				<text class="bage-buss" v-if="orderInfo.orderSubmitType == 3 || orderInfo.orderSubmitType == 4"
+					>采购员</text
+				>
+				<text
+					class="bage-auto"
+					v-if="
+						orderInfo.orderSubmitType == 0 ||
+						orderInfo.orderSubmitType == 1 ||
+						orderInfo.orderSubmitType == 2"
+					>自主</text>
+			</view>
 			<!-- 地址选择 -->
-			<order-address ref="orderAddress" v-if="skeletonShow" :addressData="addressData" />
+			<cm-address-temp ref="orderAddress" v-if="skeletonShow" :addressData="addressData" />
 			<!-- 商品 -->
-			<goods-list ref="goods" v-if="skeletonShow" :shopOrderData="shopOrderData" :information="information" />
-            <!-- <freight-popup :popupShow="popupShow" @show-freight="showFreight"></freight-popup> -->
+			<cm-goods-temp ref="goods" v-if="skeletonShow" :shopOrderData="shopOrderData" :information="information" />
 			<!-- 订单信息 -->
-			<order-information ref="information" v-if="skeletonShow" :information="shopOrderData" />
+			<cm-order-temp ref="information" v-if="skeletonShow" :information="shopOrderData" />
 			<!-- 发票信息 -->
-			<invoice-tent ref="invoice" v-if="skeletonShow" :orderInvoice="orderInvoice" />
+			<cm-invice-temp ref="invoice" v-if="skeletonShow" :orderInvoice="orderInvoice" />
 			<!-- 支付记录 -->
-			<payment-record
+			<cm-payment-temp
 				ref="payment"
 				v-if="skeletonShow && discernReceiptList"
 				:discernReceiptList="discernReceiptList"
 				:receiptAmount="receiptAmount"
 			/>
 			<!-- 退款记录 -->
-			<refund-record
+			<cm-refund-temp
 				ref="refund"
 				v-if="skeletonShow"
 				:returnedPurchaseList="returnedPurchaseList"
 				:returnedPurchaseFee="returnedPurchaseFee"
 			/>
 			<!-- 支付凭证记录 -->
-			<voucher-record ref="voucher" v-if="skeletonShow && voucherList && voucherList.length > 0" :list="voucherList" />
+			<cm-voucher-temp
+				ref="voucher"
+				v-if="skeletonShow && voucherList && voucherList.length > 0"
+				:list="voucherList"
+			/>
 			<!-- 底部button -->
-			<order-button
+			<cm-details-button
 				ref="orderButton"
 				v-if="skeletonShow"
 				:status="btnStatus"
@@ -51,7 +67,7 @@
 			/>
 		</view>
 		<!-- 分享弹窗 -->
-		<share-alert :orderId="shopOrderId" v-if="isShareModal" @btnConfirm="onShareAppMessage"> </share-alert>
+		<cm-share-popup :shopOrderId="shopOrderId" v-if="isShareModal" @btnConfirm="onShareAppMessage" />
 		<!-- 提示弹窗 -->
 		<tui-modal
 			:show="modal"
@@ -62,37 +78,56 @@
 			:size="32"
 			shape="circle"
 			:maskClosable="false"
-		>
-		</tui-modal>
+		/>
 	</view>
 </template>
 
 <script>
 import headerBack from '@/components/cm-module/headerNavbar/header-back' //自定义导航
-import orderAddress from './components/details/orderAddress' //地址信息
-import goodsList from './components/details/goodsList' //商品列表
-import invoiceTent from './components/details/invoiceTent' //发票信息
-import orderInformation from './components/details/orderInformation' //订单信息
-import paymentRecord from './components/details/paymentRecord' //支付记录
-import refundRecord from './components/details/refundRecord' //退款记录
-import voucherRecord from './components/details/voucherRecord' //支付凭证记录
-import orderButton from './components/details/orderButton' //底部按钮
-import shareAlert from '@/components/cm-module/modelAlert/shareAlert.vue' //分享弹窗
-import FreightPopup from './components/freight-popup.vue'
+import cmAddressTemp from './components/details/cm-address-temp' //地址信息
+import cmGoodsTemp from './components/details/cm-goods-temp' //商品列表
+import cmInviceTemp from './components/details/cm-invice-temp' //发票信息
+import cmOrderTemp from './components/details/cm-order-temp' //订单信息
+import cmPaymentTemp from './components/details/cm-payment-temp' //支付记录
+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' //分享弹窗
 
 export default {
 	components: {
 		headerBack,
-		orderInformation,
-		orderAddress,
-		invoiceTent,
-		goodsList,
-		paymentRecord,
-		refundRecord,
-		voucherRecord,
-		orderButton,
-		shareAlert,
-        FreightPopup,
+		cmAddressTemp,
+		cmGoodsTemp,
+		cmOrderTemp,
+		cmInviceTemp,
+		cmPaymentTemp,
+		cmRefundTemp,
+		cmVoucherTemp,
+		cmDetailsButton,
+		cmSharePopup
+	},
+	filters: {
+		statusFilters(value) {
+			//处理订单状态显示
+			const map = {
+				0: '待确认',
+				2: '交易完成',
+				4: '已关闭',
+				5: '交易全退',
+				6: '交易全退',
+				11: '待付款待发货',
+				12: '待付款部分发货',
+				13: '待付款已发货',
+				21: '部分付款待发货',
+				22: '部分付款部分发货',
+				23: '部分付款已发货',
+				31: '已付款待发货',
+				32: '已付款部分发货',
+				33: '已付款已发货'
+			}
+			return map[value]
+		}
 	},
 	data() {
 		return {
@@ -110,7 +145,7 @@ export default {
 			state: 0,
 			userId: '',
 			orderId: '',
-            shopOrderId: '',
+			shopOrderId: '',
 			shareCode: '', //分享码
 			shareType: '', //分享登录页过来记录的状态
 			cellPhone: '', //客服电话
@@ -149,14 +184,14 @@ export default {
 					plain: false
 				}
 			],
-            popupShow: false,
+			popupShow: false
 		}
 	},
 	onLoad(option) {
 		console.log(option)
 		this.shareType = option.type
 		this.orderId = option.orderId
-        this.shopOrderId = option.shopOrderId
+		this.shopOrderId = option.shopOrderId
 		if (this.shareType === 'share') {
 			this.state = 0
 			this.isOrderShare = true
@@ -169,44 +204,41 @@ export default {
 		this.initOrderDetaileData()
 	},
 	filters: {
-		TextFormat(status) {
-			//处理金额
-			let HtmlText,
-				typeTextObject = {
-					0: '待确认',
-					2: '交易完成',
-					4: '已关闭',
-					5: '交易全退',
-					6: '交易全退',
-					11: '待付款待发货',
-					12: '待付款部分发货',
-					13: '待付款已发货',
-					21: '部分付款待发货',
-					22: '部分付款部分发货',
-					23: '部分付款已发货',
-					31: '已付款待发货',
-					32: '已付款部分发货',
-					33: '已付款已发货'
-				}
-			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: {
-        // showFreight 运费底部上拉框
-        showFreight($event) {
-            this.popupShow = $event
-        },
+		// showFreight 运费底部上拉框
+		showFreight($event) {
+			this.popupShow = $event
+		},
 		// 获取订单详情
 		async initOrderDetaileData() {
 			try {
 				const userInfo = await this.$api.getStorage()
 				this.userId = userInfo.userId ? userInfo.userId : 0
-				const res = await this.OrderService.QueryOrderDetails({ shopOrderId: this.shopOrderId, userId: this.userId })
+				const res = await this.OrderService.QueryOrderDetails({
+					shopOrderId: this.shopOrderId,
+					userId: this.userId
+				})
 				const data = res.data
 				this.skeletonShow = true
 				this.orderInfo = data.shopOrder
@@ -242,39 +274,41 @@ export default {
 					this.contentModalText = '确认取消该订单吗?'
 					this.handleModelEven = 1
 					break
-				case 'query':
-					this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + this.shopOrderId)
-					break
-				case 'upload':
-					this.$api.navigateTo('/pages/user/order/order-addpay?orderId=' + this.shopOrderId)
-					break
 				case 'confirm':
 					//确认收货
 					this.modal = true
 					this.contentModalText = '确认收货吗?'
 					this.handleModelEven = 2
 					break
+				case 'delete': //删除订单
+					this.modal = true
+					this.contentModalText = '确认删除该订单吗?'
+					this.handleModelEven = 3
+					break
+				case 'confirmation': // 确认订单
+					this.modal = true
+					this.contentModalText = '确认此订单吗?'
+					this.handleModelEven = 4
+					break
 				case 'pay':
-					this.getOrderPaymentValidation(data)
+					this.getOrderPaymentValidation()
+					break
+				case 'query':
+					this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + this.shopOrderId)
+					break
+				case 'upload':
+					this.$api.navigateTo('/pages/user/order/order-addpay?orderId=' + this.shopOrderId)
 					break
 			}
 		},
-		getOrderPaymentValidation(data) {
-			//监听根据付款状态做操作
-			this.OrderService.OrderPaymentValidation({ shopOrderId: data.orderId })
-				.then(response => {
-					let data = response.data
-                    console.log(data)
-					// if (data.onlinePayFlag == 1) {
-					// 	// 只能线下
-					// 	this.$api.navigateTo(`/pages/user/pay/card-under?orderId=${data.orderId}`)
-					// } else {
-					this.$api.navigateTo(`/pages/user/order/order-pay-list?shopOrderId=${data.shopOrderId}`)
-					// }
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+		//监听根据付款状态做操作
+		async getOrderPaymentValidation() {
+			try{
+				const res = await this.OrderService.OrderPaymentValidation({ shopOrderId: this.shopOrderId })
+				this.$api.navigateTo(`/pages/user/order/order-pay-list?shopOrderId=${res.data.shopOrderId}`)
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
 		},
 		handleClick(e) {
 			//确认操作
@@ -286,6 +320,12 @@ export default {
 					case 2: //确认收货
 						this.confirmReceipt()
 						break
+					case 3: //删除订单
+						this.deleteOrder(this.shopOrderId)
+						break
+					case 4: //确认订单
+						this.affirmOrder(this.shopOrderId)
+						break
 				}
 			}
 			this.modal = false
@@ -305,7 +345,38 @@ export default {
 		async cancelOrder() {
 			//取消订单
 			try {
-				const res = await this.OrderService.CancelOrder({ shopOrderId: this.orderInfo.shopOrderId, userIdentity: 0 })
+				const res = await this.OrderService.CancelOrder({
+					shopOrderId: this.orderInfo.shopOrderId,
+					userIdentity: 0
+				})
+				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.$api.redirectTo(`/pages/user/order/order-list?type=detele&state=${this.state}`)
+					}
+				}, 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.initOrderDetaileData()
@@ -358,7 +429,8 @@ export default {
 			return systeminfo
 		}
 	},
-	onPullDownRefresh() {//下拉刷新
+	onPullDownRefresh() {
+		//下拉刷新
 		this.initOrderDetaileData()
 		uni.stopPullDownRefresh()
 	},
@@ -483,11 +555,11 @@ page {
 	}
 	.bage-buss {
 		display: inline-block;
-		width: 72rpx;
-		height: 32rpx;
+		width: 100rpx;
+		height: 36rpx;
 		background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
 		border-radius: 6rpx;
-		line-height: 32rpx;
+		line-height: 36rpx;
 		text-align: center;
 		color: #ffffff;
 		margin-top: 10rpx;
@@ -496,10 +568,10 @@ page {
 	.bage-auto {
 		display: inline-block;
 		width: 72rpx;
-		height: 32rpx;
+		height: 36rpx;
 		background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
 		border-radius: 6rpx;
-		line-height: 32rpx;
+		line-height: 36rpx;
 		text-align: center;
 		color: #ffffff;
 		margin-top: 10rpx;

+ 859 - 860
pages/user/order/order-list.vue

@@ -1,924 +1,923 @@
 <template>
-    <view class="container" :style="{ paddingTop: navbarHeight + 'px' }">
-        <!-- 自定义返回 -->
-        <header-back
-            :systeminfo="systeminfo"
-            :navbar-data="nvabarData"
-            :headerBtnPosi="headerBtnPosi"
-            :isDelete="isDelete"
-            @goSearchPath="handlSearchPath"
-        ></header-back>
-        <tui-skeleton
-            v-if="skeletonShow"
-            backgroundColor="#fafafa"
-            borderRadius="10rpx"
-            :isLoading="true"
-            :loadingType="5"
-        ></tui-skeleton>
-        <template v-else>
-            <view class="order-section-top" :style="{ marginTop: navbarHeight + 'px' }">
-                <scroll-view scroll-x scroll-with-animation class="tab-view" :scroll-left="scrollLeft">
-                    <view
-                        v-for="(item, index) in orderTabBar"
-                        :key="index"
-                        class="tab-bar-item"
-                        :class="[currentTab == index ? 'active' : '']"
-                        :data-current="index"
-                        @tap.stop="onClickTab"
-                    >
-                        <text class="tab-bar-title">{{ item.text }}</text>
-                    </view>
-                </scroll-view>
-            </view>
-            <swiper
-                class="tab-content"
-                :current="currentTab"
-                duration="80"
-                @animationfinish="onChange"
-                :style="{ height: winHeight + 'px' }"
-            >
-                <swiper-item v-for="(tabItem, index) in orderTabBar" :key="index" @touchmove.stop="">
-                    <scroll-view scroll-y class="scoll-y tui-skeleton" @scrolltolower="scrolltolower">
-                        <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="tui-skeleton clearfix">
-                            <!-- 空白页 -->
-                            <empty
-                                v-if="tabItem.loaded === true && tabItem.orderList.length === 0"
-                                :typeIndex="currentTab"
-                                :navbarHeight="navbarHeight"
-                            ></empty>
-                            <!-- 列表 -->
-                            <view v-else class="tui-order-content">
-                                <view
-                                    class="tui-order-item"
-                                    v-for="(order, orderIndex) in tabItem.orderList"
-                                    :key="orderIndex"
-                                >
-                                    <!-- <view class="order-title">
+	<view class="container" :style="{ paddingTop: navbarHeight + 'px' }">
+		<!-- 自定义返回 -->
+		<header-back
+			:systeminfo="systeminfo"
+			:navbar-data="nvabarData"
+			:headerBtnPosi="headerBtnPosi"
+			:isDelete="isDelete"
+			@goSearchPath="handlSearchPath"
+		/>
+		<tui-skeleton
+			v-if="skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="5"
+		/>
+		<template v-else>
+			<view class="order-section-top" :style="{ marginTop: navbarHeight + 'px' }">
+				<scroll-view scroll-x scroll-with-animation class="tab-view" :scroll-left="scrollLeft">
+					<view
+						v-for="(item, index) in orderTabBar"
+						:key="index"
+						class="tab-bar-item"
+						:class="[currentTab == index ? 'active' : '']"
+						:data-current="index"
+						@tap.stop="onClickTab"
+					>
+						<text class="tab-bar-title">{{ item.text }}</text>
+					</view>
+				</scroll-view>
+			</view>
+			<swiper
+				class="tab-content"
+				:current="currentTab"
+				duration="80"
+				@animationfinish="onChange"
+				:style="{ height: winHeight + 'px' }"
+			>
+				<swiper-item v-for="(tabItem, index) in orderTabBar" :key="index" @touchmove.stop="">
+					<scroll-view scroll-y class="scoll-y tui-skeleton" @scrolltolower="scrolltolower">
+						<view :class="{ 'tui-order-list': scrollTop >= 0 }" class="tui-skeleton clearfix">
+							<!-- 空白页 -->
+							<empty
+								v-if="tabItem.loaded === true && tabItem.orderList.length === 0"
+								:typeIndex="currentTab"
+								:navbarHeight="navbarHeight"
+							></empty>
+							<!-- 列表 -->
+							<view v-else class="tui-order-content">
+								<view
+									class="tui-order-item"
+									v-for="(order, orderIndex) in tabItem.orderList"
+									:key="orderIndex"
+								>
+									<view class="order-title">
 										<view class="order-title-t">
-											<text class="bage-text tui-skeleton-fillet">订单编号:{{ order.orderNo }}</text>
+											<view class="order-title-tip tui-skeleton-fillet">
+												{{ order.status | statusFilters }}
+											</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
+											>
+										</view>
+									</view>
+									<block v-for="(shop, sindex) in order.orderProductList" :key="sindex">
+										<view class="goods-title">
+											<view class="title-text tui-skeleton-fillet">
+												{{ shop.shopName }} <label class="iconfont icon-jinrudianpu"></label>
+											</view>
+										</view>
+										<view class="goods-item" @click.stop="detail(shop.shopOrderId, shop.orderId)">
+											<view class="goods-pros-t">
+												<view class="pros-img tui-skeleton-fillet">
+													<image :src="shop.image" alt="" />
+												</view>
+												<view class="pros-product clearfix">
+													<view class="producttitle tui-skeleton-fillet">
+														{{ shop.name }}
+													</view>
+													<view
+														class="productspec tui-skeleton-fillet"
+														v-if="shop.productCategory != 2"
+													>
+														规格:{{ shop.productUnit }}
+													</view>
+													<view class="productprice">
+														<view class="price tui-skeleton-fillet">
+															<text>¥{{ shop.price | NumFormat }}</text>
+														</view>
+														<view class="count tui-skeleton-fillet">
+															<text class="small">x</text> {{ shop.num }}
+														</view>
+													</view>
+												</view>
+											</view>
 										</view>
-										<view class="order-title-b">
-											<view class="order-title-btxt tui-skeleton-fillet"
-												>下单时间:{{ order.orderTime }}</view
+									</block>
+									<view class="order-footer">
+										<view class="order-footer-bot">
+											<view class="count tui-skeleton-fillet">
+												共{{ order.itemCount }}件商品
+											</view>
+											<view
+												class="money tui-skeleton-fillet"
+												v-if="order.status == 31 || order.status == 32 || order.status == 33"
 											>
-											<view class="order-title-tip tui-skeleton-fillet">{{
-												StateExpFormat(order.status)
-											}}</view>
+												已支付:
+												<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> -->
-                                    <block v-for="(shop, sindex) in order.orderProductList" :key="sindex">
-                                        <view class="goods-title">
-                                            <view class="title-text tui-skeleton-fillet">
-                                                {{ shop.shopName }}
-                                                <label class="iconfont icon-jinrudianpu"></label>
-                                            </view>
-                                            <view class="order-title-tip">{{
-                                            	StateExpFormat(order.status)
-                                            }}</view>
-                                        </view>
-                                        <view
-                                            class="goods-item"
-                                            @click.stop="detail(shop.shopOrderId, shop.orderId)"
-                                        >
-                                            <view class="goods-pros-t">
-                                                <view class="pros-img tui-skeleton-fillet">
-                                                    <image :src="shop.image" alt="" />
-                                                </view>
-                                                <view class="pros-product clearfix">
-                                                    <view class="producttitle tui-skeleton-fillet">
-                                                        {{ shop.name }}
-                                                    </view>
-                                                    <view
-                                                        class="productspec tui-skeleton-fillet"
-                                                        v-if="shop.productCategory != 2"
-                                                    >
-                                                        规格:{{ shop.productUnit }}
-                                                    </view>
-                                                    <view class="productprice">
-                                                        <view class="price tui-skeleton-fillet">
-                                                            <text>¥{{ shop.price | NumFormat }}</text>
-                                                        </view>
-                                                        <view class="count tui-skeleton-fillet">
-                                                            <text class="small">x</text>
-                                                            {{ shop.num }}
-                                                        </view>
-                                                    </view>
-                                                </view>
-                                            </view>
-                                        </view>
-                                    </block>
-                                    <view class="order-footer">
-                                        <view class="order-footer-bot">
-                                            <view class="count tui-skeleton-fillet">
-                                                共{{ order.itemCount }}件商品
-                                            </view>
-                                            <view
-                                                class="money tui-skeleton-fillet"
-                                                v-if="order.status == 31 || order.status == 32 || order.status == 33"
-                                            >
-                                                已支付:
-                                                <label style="color:#f94b4b ;">
-                                                    ¥{{ order.receiptAmount | NumFormat }}
-                                                </label>
-                                            </view>
-                                            <view class="money tui-skeleton-fillet" v-else>
-                                                待付总额:
-                                                <label style="color:#f94b4b ;">
-                                                    ¥{{ order.obligation | NumFormat }}
-                                                </label>
-                                            </view>
-                                        </view>
-                                    </view>
-                                    <!-- 底部button -->
-                                    <order-button
-                                        ref="orderButton"
-                                        :status="order.status"
-                                        :order="order"
-                                        @shareConfirm="handButtonShareConfirm"
-                                        @buttonConfirm="handButtonConfirm"
-                                    ></order-button>
-                                </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>
-        </template>
-        <!-- 分享弹窗 -->
-        <share-alert v-if="isShareModal" :orderId="handleOrderId" @shareConfirm="onShareAppMessage" />
-        <!-- 提示弹窗 -->
-        <tui-modal
-            :show="modal"
-            @click="handleClick"
-            :content="contentModalText"
-            :button="modalButton"
-            color="#333"
-            :size="32"
-            shape="circle"
-            :maskClosable="false"
-        ></tui-modal>
-        <!-- 透明模态层 -->
-        <modal-layer v-if="isModalLayer"></modal-layer>
-    </view>
+									</view>
+									<!-- 底部button -->
+									<cm-list-button
+										ref="orderButton"
+										:status="order.status"
+										:order="order"
+										@shareConfirm="handButtonShareConfirm"
+										@buttonConfirm="handButtonConfirm"
+									/>
+								</view>
+								<!--加载loadding-->
+								<tui-loadmore :visible="loadding" :index="3" type="black" />
+								<tui-nomore :visible="!pullUpOn" :backgroundColor="'#ffffff'" :text="nomoreText" />
+								<!--加载loadding-->
+							</view>
+						</view>
+					</scroll-view>
+				</swiper-item>
+			</swiper>
+		</template>
+		<!-- 分享弹窗 -->
+		<cm-share-popup v-if="isShareModal" :shopOrderId="handleShopOrderId" @shareConfirm="onShareAppMessage" />
+		<!-- 提示弹窗 -->
+		<tui-modal
+			:show="modal"
+			@click="handleClick"
+			:content="contentModalText"
+			:button="modalButton"
+			color="#333"
+			:size="32"
+			shape="circle"
+			:maskClosable="false"
+		/>
+		<!-- 透明模态层 -->
+		<modal-layer v-if="isModalLayer" />
+	</view>
 </template>
 
 <script>
 import headerBack from '@/components/cm-module/headerNavbar/header-back' //自定义导航
 import btSearch from '@/components/uni-search/bt-search.vue' //搜索
-import orderButton from './components/details/orderListButton' //按钮
+import cmListButton from './components/cm-list-button' //按钮
 import modalLayer from '@/components/modal-layer'
 import empty from './components/empty'
-import shareAlert from '@/components/cm-module/modelAlert/shareAlert' //分享弹窗
+import cmSharePopup from './components/cm-share-popup' //分享弹窗
 
 export default {
-    components: {
-        headerBack,
-        empty,
-        btSearch,
-        orderButton,
-        modalLayer,
-        shareAlert
-    },
-    data() {
-        return {
-            CustomBar: this.CustomBar, // 顶部导航栏高度
-            headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
-            systeminfo: this.setSysteminfo(), //获取设备信息
-            winHeight: '', //窗口高度
-            nvabarData: {
-                //顶部自定义导航
-                showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
-                showSearch: 1,
-                title: '我的订单' // 导航栏 中间的标题
-            },
-            orderTabBar: [
-                { state: 0, text: '全部订单', orderList: [] },
-                { state: 2, text: '待付款', orderList: [] },
-                { state: 3, text: '待发货', orderList: [] },
-                { state: 4, text: '已发货', orderList: [] },
-                { state: 5, text: '退货/款', orderList: [] }
-            ],
-            currentTab: 0, //预设当前项的值
-            scrollLeft: 0, //tab标题的滚动条位置
-            listQuery: {
-                orderState: 0,
-                userId: 0,
-                pageNum: 1,
-                pageSize: 10
-            },
-            orderData: [],
-            scrollTop: 0,
-            skeletonShow: true,
-            isDelete: false,
-            isClickChange: false,
-            isShareModal: false, //控制分享弹窗
-            isModalLayer: false,
-            loadding: false,
-            pullUpOn: true,
-            hasNextPage: false,
-            pullFlag: true,
-            navbarHeight: '',
-            modelType: 0,
-            nomoreText: '上拉显示更多',
-            isOnloadFlag: false,
-            handleOrderId: 0, //点击按钮传入的的订单ID
-            handleModelEven: 0,
-            modal: false,
-            contentModalText: '订单查询失败,请稍候重试~', //操作文字提示语句
-            modalButton: [
-                {
-                    text: '取消',
-                    type: 'gray',
-                    plain: true //是否空心
-                },
-                {
-                    text: '确定',
-                    customStyle: {
-                        color: '#fff',
-                        bgColor: '#F3B574'
-                    },
-                    plain: false
-                }
-            ]
-        }
-    },
-    onLoad(e) {
-        if (e.type === 'detele') {
-            this.isDelete = true
-        }
-        const evStateMap = { 0: 0, 2: 1, 3: 2, 4: 3, 5: 4 }
-        this.currentTab = evStateMap[e.state]
-        console.log('currentTab', this.currentTab)
-        this.isOnloadFlag = true
-        this.getHeaderTopHeight() //设置自定义导航高度
-        this.initStorage()
-    },
-    filters: {
-        NumFormat(value) {
-            //处理金额
-            return Number(value).toFixed(2)
-        }
-    },
-    methods: {
-        async initStorage() {
-            //初始化
-            const usrInfo = await this.$api.getStorage()
-            this.listQuery.userId = usrInfo.userId ? usrInfo.userId : 0
-            this.getOrderDatainit(this.currentTab)
-        },
-        // 滚动切换标签样式
-        onChange: function(e) {
-            let tabIndex = e.target.current || e.detail.current
-            if (this.isClickChange) {
-                this.currentTab = tabIndex
-                this.isClickChange = false
-                return
-            }
-            this.isClickChange = false
-            this.currentTab = tabIndex
-            this.checkCor()
-            this.pageNum = 1
-            this.pullUpOn = true //切换时隐藏
-            this.loadding = false //切换时隐藏
-            this.nomoreText = ''
-            if (!this.isOnloadFlag) {
-                this.getOrderDatainit(this.currentTab, 'tabChange')
-            }
-        },
-        // 点击标题切换当前页时改变样式
-        onClickTab: function(e) {
-            let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current
-            if (this.currentTab === tabIndex) {
-                return false
-            } else {
-                this.isClickChange = true
-                this.currentTab = tabIndex
-                this.pageNum = 1
-                this.listQuery.pageNum = 1
-                this.pullUpOn = true //切换时隐藏
-                this.loadding = false //切换时隐藏
-                this.getOrderDatainit(this.currentTab)
-            }
-        },
-        //判断当前滚动超过一屏时,设置tab标题滚动条。
-        checkCor: function() {
-            if (this.currentTab > 3) {
-                //这里距离按实际计算
-                this.scrollLeft = 300
-            } else {
-                this.scrollLeft = 0
-            }
-        },
-        async getOrderDatainit(index, source) {
-            let orderItem = this.orderTabBar[index]
-            if (source === 'tabChange' && orderItem.loaded === true) {
-                //tab切换只有第一次需要加载数据
-                return
-            }
-            try {
-                this.listQuery.orderState = this.orderTabBar[index].state
-                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 {
-                        this.pullUpOn = false
-                        this.nomoreText = '已至底部'
-                    }
-                }
-                this.skeletonShow = false
-                this.isOnloadFlag = false
-            } catch (error) {
-                this.$util.msg(error.msg, 2000)
-            }
-        },
-        async getOnReachBottomData(index) {
-            //上拉加载
-            try {
-                this.listQuery.pageNum += 1
-                this.listQuery.orderState = this.orderTabBar[index].state
-                const res = await this.OrderService.QueryOrderList(this.listQuery)
-                const data = res.data
-                const orderItem = this.orderTabBar[index]
-                this.hasNextPage = data.hasNextPage
-                orderItem.orderList = orderItem.orderList.concat(data.list)
-                this.pullFlag = false // 防上拉暴滑
-                setTimeout(() => {
-                    this.pullFlag = true
-                }, 500)
-                if (this.hasNextPage) {
-                    this.pullUpOn = false
-                    this.nomoreText = '上拉显示更多'
-                } else {
-                    this.loadding = false
-                    this.pullUpOn = false
-                    this.nomoreText = '已至底部'
-                }
-            } catch (error) {
-                this.$util.msg(error.msg, 2000)
-            }
-        },
-        scrolltolower() {
-            if (this.hasNextPage) {
-                this.loadding = true
-                this.pullUpOn = true
-                this.getOnReachBottomData(this.currentTab)
-            }
-        },
-        detail(shopOrderId, orderId) {
-            //订单详情跳转
-            this.isModalLayer = true
-            this.$api.navigateTo(`/pages/user/order/order-details?state=${this.currentTab}&shopOrderId=${shopOrderId}`)
-        },
-        handButtonConfirm(data) {
-            console.log(data)
-            //获取点击
-            this.handleOrderId = data.order.shopOrderId
-            switch (data.type) {
-                case 'cancel':
-                    //取消订单
-                    this.modal = true
-                    this.contentModalText = '确认取消该订单吗?'
-                    this.handleModelEven = 1
-                    break
-                case 'query':
-                    this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + this.handleOrderId)
-                    break
-                case 'upload':
-                    this.$api.navigateTo('/pages/user/order/order-addpay?orderId=' + this.handleOrderId)
-                    break
-                case 'confirm':
-                    //确认收货
-                    this.modal = true
-                    this.contentModalText = '确认收货吗?'
-                    this.handleModelEven = 2
-                    break
-                case 'pay':
-                    this.orderPaymentValidation(data)
-                    break
-            }
-        },
-        async orderPaymentValidation(data) {
-            //监听根据付款状态做操作
-            try {
-                const res = await this.OrderService.OrderPaymentValidation({ shopOrderId: this.handleOrderId })
-                this.$api.navigateTo(`/pages/user/order/order-pay-list?shopOrderId=${res.data.shopOrderId}`)
-                // if (res.data.onlinePayFlag == 1) {
-                //     // 只能线下
-                //     this.$api.navigateTo(`/pages/user/pay/card-under?orderId=${this.handleOrderId}`)
-                // } else {
-                //     this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${this.handleOrderId}`)
-                // }
-            } catch (error) {
-                this.$util.msg(error.msg, 2000)
-            }
-        },
-        handleClick(e) {
-            //确认操作
-            if (e.index == 1) {
-                switch (this.handleModelEven) {
-                    case 1: //取消订单
-                        this.cancelOrder()
-                        break
-                    case 2: //确认收货
-                        this.confirmReceipt()
-                        break
-                }
-            }
-            this.modal = false
-        },
-        async confirmReceipt() {
-            //确认收货
-            try {
-                const res = await this.OrderService.ConfirmReceipt({ shopOrderId: this.handleOrderId })
-                this.$util.msg(res.msg, 2000, true, 'success')
-                setTimeout(() => {
-                    this.getOrderDatainit(this.currentTab)
-                }, 2000)
-            } catch (error) {
-                this.$util.msg(error.msg, 2000)
-            }
-        },
-        async cancelOrder() {
-            //取消订单
-            try {
-                const res = await this.OrderService.CancelOrder({ shopOrderId: this.handleOrderId, userIdentity: 0 })
-                this.$util.msg(res.msg, 2000, true, 'success')
-                setTimeout(() => {
-                    this.getOrderDatainit(this.currentTab)
-                }, 2000)
-            } catch (error) {
-                this.$util.msg(error.msg, 2000)
-            }
-        },
-        handlSearchPath() {
-            this.$api.navigateTo('/pages/search/search-order')
-        },
-        handButtonShareConfirm(data) {
-            this.handleOrderId = data
-        },
-        onShareAppMessage(res) {
-            console.log(res)
-            //分享转发
-            this.isShareModal = false
-            if (res.from === 'button') {
-                // 来自页面内转发按钮
-            }
-            return {
-                title: '您有新的分享订单,快来查看吧~',
-                path: `/pages/user/order/order-sharelogin?shopOrderId=${this.handleOrderId}&userId=${
-                    this.listQuery.userId
-                }`,
-                imageUrl: 'https://static.caimei365.com/app/mini-mcare/icon/icon_shareOrder@2x.png'
-            }
-        },
-        orderPriceToFixed(n) {
-            let price = ''
-            price = n.toFixed(2)
-            return price
-        },
-        getHeaderTopHeight() {
-            // 状态栏高度
-            let self = this
-            let statusBarHeight = this.systeminfo.statusBarHeight
-            let headerPosi = this.headerBtnPosi
-            let btnPosi = {
-                // 胶囊实际位置,坐标信息不是左上角原点
-                height: headerPosi.height,
-                width: headerPosi.width,
-                // 胶囊top - 状态栏高度
-                top: headerPosi.top - statusBarHeight,
-                // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
-                bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
-                // 屏幕宽度 - 胶囊right
-                right: this.systeminfo.screenWidth - headerPosi.right
-            }
-            this.navbarHeight = headerPosi.bottom + btnPosi.bottom // 原胶囊bottom + 现胶囊bottom
-            //  高度自适应
-            uni.getSystemInfo({
-                success: function(res) {
-                    let calc = res.windowHeight
-                    self.winHeight = calc - self.CustomBar
-                }
-            })
-        },
-        setHeaderBtnPosi() {
-            // 获得胶囊按钮位置信息
-            let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
-            return headerBtnPosi
-        },
-        setSysteminfo() {
-            let systeminfo
-            uni.getSystemInfo({
-                // 获取设备信息
-                success: res => {
-                    systeminfo = res
-                }
-            })
-            return systeminfo
-        },
-        PromotionsFormat(promo) {
-            //促销活动类型数据处理
-            if (promo != null) {
-                if (promo.type == 1 && promo.mode == 1) {
-                    return true
-                } else {
-                    return false
-                }
-            }
-            return false
-        },
-        StateExpFormat(state) {
-            //订单状态文字和颜色
-            var HtmlStateText = '',
-                stateTextObject = {
-                    0: '待确认',
-                    2: '交易完成',
-                    4: '已关闭',
-                    5: '交易全退',
-                    6: '交易全退',
-                    11: '待付款待发货',
-                    12: '待付款部分发货',
-                    13: '待付款已发货',
-                    21: '部分付款待发货',
-                    22: '部分付款部分发货',
-                    23: '部分付款已发货',
-                    31: '已付款待发货',
-                    32: '已付款部分发货',
-                    33: '已付款已发货'
-                }
-            Object.keys(stateTextObject).forEach(function(key) {
-                if (key == state) {
-                    HtmlStateText = stateTextObject[key]
-                }
-            })
-            return HtmlStateText
-        },
-        handleBeanlClick() {
-            //关闭采美豆弹窗
-            this.isActivityBean = false
-            this.getOrderDatainit(this.currentTab)
-        }
-    },
-    onPageScroll(e) {
-        this.scrollTop = e.scrollTop
-    },
-    onShow() {
-        this.isModalLayer = false
-    }
+	components: {
+		headerBack,
+		empty,
+		btSearch,
+		modalLayer,
+		cmListButton,
+		cmSharePopup
+	},
+	data() {
+		return {
+			CustomBar: this.CustomBar, // 顶部导航栏高度
+			headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
+			systeminfo: this.setSysteminfo(), //获取设备信息
+			winHeight: '', //窗口高度
+			nvabarData: {
+				//顶部自定义导航
+				showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
+				showSearch: 1,
+				title: '我的订单' // 导航栏 中间的标题
+			},
+			orderTabBar: [
+				{ state: 0, text: '全部订单', orderList: [] },
+				{ state: 1, text: '待确认', orderList: [] },
+				{ state: 2, text: '待付款', orderList: [] },
+				{ state: 3, text: '待发货', orderList: [] },
+				{ state: 4, text: '已发货', orderList: [] },
+				{ state: 5, text: '退货/款', orderList: [] }
+			],
+			currentTab: 0, //预设当前项的值
+			scrollLeft: 0, //tab标题的滚动条位置
+			listQuery: {
+				orderState: 0,
+				userId: 0,
+				pageNum: 1,
+				pageSize: 10
+			},
+			orderData: [],
+			scrollTop: 0,
+			skeletonShow: true,
+			isDelete: false,
+			isClickChange: false,
+			isShareModal: false, //控制分享弹窗
+			isModalLayer: false,
+			loadding: false,
+			pullUpOn: true,
+			hasNextPage: false,
+			pullFlag: true,
+			navbarHeight: '',
+			modelType: 0,
+			nomoreText: '上拉显示更多',
+			isOnloadFlag: false,
+			handleShopOrderId: 0, //点击按钮传入的的订单ID
+			handleModelEven: 0,
+			modal: false,
+			contentModalText: '订单查询失败,请稍候重试~', //操作文字提示语句
+			modalButton: [
+				{
+					text: '取消',
+					type: 'gray',
+					plain: true //是否空心
+				},
+				{
+					text: '确定',
+					customStyle: {
+						color: '#fff',
+						bgColor: '#F3B574'
+					},
+					plain: false
+				}
+			]
+		}
+	},
+	onLoad(e) {
+		if (e.type === 'detele') {
+			this.isDelete = true
+		}
+		this.currentTab = e.state
+		console.log('currentTab', this.currentTab)
+		this.isOnloadFlag = true
+		this.getHeaderTopHeight() //设置自定义导航高度
+		this.initStorage()
+	},
+	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]
+		}
+	},
+	methods: {
+		async initStorage() {
+			//初始化
+			const usrInfo = await this.$api.getStorage()
+			this.listQuery.userId = usrInfo.userId ? usrInfo.userId : 0
+			this.getOrderDatainit(this.currentTab)
+		},
+		// 滚动切换标签样式
+		onChange: function(e) {
+			let tabIndex = e.target.current || e.detail.current
+			if (this.isClickChange) {
+				this.currentTab = tabIndex
+				this.isClickChange = false
+				return
+			}
+			this.isClickChange = false
+			this.currentTab = tabIndex
+			this.checkCor()
+			this.pageNum = 1
+			this.pullUpOn = true //切换时隐藏
+			this.loadding = false //切换时隐藏
+			this.nomoreText = ''
+			if (!this.isOnloadFlag) {
+				this.getOrderDatainit(this.currentTab, 'tabChange')
+			}
+		},
+		// 点击标题切换当前页时改变样式
+		onClickTab: function(e) {
+			let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current
+			if (this.currentTab === tabIndex) {
+				return false
+			} else {
+				this.isClickChange = true
+				this.currentTab = tabIndex
+				this.pageNum = 1
+				this.listQuery.pageNum = 1
+				this.pullUpOn = true //切换时隐藏
+				this.loadding = false //切换时隐藏
+				this.getOrderDatainit(this.currentTab)
+			}
+		},
+		//判断当前滚动超过一屏时,设置tab标题滚动条。
+		checkCor: function() {
+			if (this.currentTab > 3) {
+				//这里距离按实际计算
+				this.scrollLeft = 300
+			} else {
+				this.scrollLeft = 0
+			}
+		},
+		async getOrderDatainit(index, source) {
+			let orderItem = this.orderTabBar[index]
+			if (source === 'tabChange' && orderItem.loaded === true) {
+				//tab切换只有第一次需要加载数据
+				return
+			}
+			try {
+				this.listQuery.pageNum = 1
+				this.listQuery.orderState = index
+				const res = await this.OrderService.QueryOrderList(this.listQuery)
+				const data = res.data
+				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 = '上拉显示更多'
+					} 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
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		async getOnReachBottomData(index) {
+			//上拉加载
+			try {
+				this.listQuery.pageNum += 1
+				this.listQuery.orderState = this.orderTabBar[index].state
+				const res = await this.OrderService.QueryOrderList(this.listQuery)
+				const data = res.data
+				const orderItem = this.orderTabBar[index]
+				this.hasNextPage = data.hasNextPage
+				orderItem.orderList = orderItem.orderList.concat(data.list)
+				this.pullFlag = false // 防上拉暴滑
+				setTimeout(() => {
+					this.pullFlag = true
+				}, 500)
+				if (this.hasNextPage) {
+					this.pullUpOn = false
+					this.nomoreText = '上拉显示更多'
+				} else {
+					this.loadding = false
+					this.pullUpOn = false
+					this.nomoreText = '已至底部'
+				}
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		scrolltolower() {
+			if (this.hasNextPage) {
+				this.loadding = true
+				this.pullUpOn = true
+				this.getOnReachBottomData(this.currentTab)
+			}
+		},
+		detail(shopOrderId, orderId) {
+			//订单详情跳转
+			this.isModalLayer = true
+			this.$api.navigateTo(`/pages/user/order/order-details?state=${this.currentTab}&shopOrderId=${shopOrderId}`)
+		},
+		handButtonConfirm(data) {
+			console.log(data)
+			//获取点击
+			this.handleShopOrderId = data.order.shopOrderId
+			switch (data.type) {
+				case 'cancel':
+					//取消订单
+					this.modal = true
+					this.contentModalText = '确认取消该订单吗?'
+					this.handleModelEven = 1
+					break
+				case 'confirm':
+					//确认收货
+					this.modal = true
+					this.contentModalText = '确认收货吗?'
+					this.handleModelEven = 2
+					break
+				case 'delete': //删除订单
+					this.modal = true
+					this.contentModalText = '确认删除该订单吗?'
+					this.handleModelEven = 3
+					break
+				case 'confirmation': // 确认订单
+					this.modal = true
+					this.contentModalText = '确认此订单吗?'
+					this.handleModelEven = 4
+					break
+				case 'pay':
+					this.orderPaymentValidation()
+					break
+				case 'query':
+					this.$api.navigateTo('/pages/user/order/order-logistics?shopOrderId=' + this.handleShopOrderId)
+					break
+				case 'upload':
+					this.$api.navigateTo('/pages/user/order/order-addpay?shopOrderId=' + this.handleShopOrderId)
+					break
+			}
+		},
+		async orderPaymentValidation() {
+			//监听根据付款状态做操作
+			try {
+				const res = await this.OrderService.OrderPaymentValidation({ shopOrderId: this.handleShopOrderId })
+				this.$api.navigateTo(`/pages/user/order/order-pay-list?shopOrderId=${res.data.shopOrderId}`)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		handleClick(e) {
+			//确认操作
+			if (e.index == 1) {
+				switch (this.handleModelEven) {
+					case 1: //取消订单
+						this.cancelOrder()
+						break
+					case 2: //确认收货
+						this.confirmReceipt()
+						break
+					case 3: //删除订单
+						this.deleteOrder()
+						break
+					case 4: //确认订单
+						this.affirmOrder()
+						break
+				}
+			}
+			this.modal = false
+		},
+		async confirmReceipt() {
+			//确认收货
+			try {
+				const res = await this.OrderService.ConfirmReceipt({ shopOrderId: this.handleShopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.getOrderDatainit(this.currentTab)
+				}, 2000)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		async cancelOrder() {
+			//取消订单
+			try {
+				const res = await this.OrderService.CancelOrder({ shopOrderId: this.handleShopOrderId, userIdentity: 0 })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.getOrderDatainit(this.currentTab)
+				}, 2000)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//删除订单
+		async deleteOrder() {
+			try {
+				const res = await this.OrderService.DeleteOrder({ shopOrderId: this.handleShopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.getOrderDatainit(this.currentTab)
+				}, 2000)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//确认订单
+		async affirmOrder() {
+			try {
+				const res = await this.OrderService.AffirmOrder({ shopOrderId: this.handleShopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.getOrderDatainit(this.currentTab)
+				}, 2000)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		handlSearchPath() {
+			this.$api.navigateTo('/pages/user/order/order-search')
+		},
+		handButtonShareConfirm(data) {
+			this.handleShopOrderId = data
+		},
+		onShareAppMessage(res) {
+			console.log(res)
+			//分享转发
+			this.isShareModal = false
+			if (res.from === 'button') {
+				// 来自页面内转发按钮
+			}
+			return {
+				title: '您有新的分享订单,快来查看吧~',
+				path: `/pages/user/order/order-sharelogin?shopOrderId=${this.handleShopOrderId}&userId=${
+					this.listQuery.userId
+				}`,
+				imageUrl: 'https://static.caimei365.com/app/mini-mcare/icon/icon_shareOrder@2x.png'
+			}
+		},
+		orderPriceToFixed(n) {
+			let price = ''
+			price = n.toFixed(2)
+			return price
+		},
+		getHeaderTopHeight() {
+			// 状态栏高度
+			let self = this
+			let statusBarHeight = this.systeminfo.statusBarHeight
+			let headerPosi = this.headerBtnPosi
+			let btnPosi = {
+				// 胶囊实际位置,坐标信息不是左上角原点
+				height: headerPosi.height,
+				width: headerPosi.width,
+				// 胶囊top - 状态栏高度
+				top: headerPosi.top - statusBarHeight,
+				// 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
+				bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
+				// 屏幕宽度 - 胶囊right
+				right: this.systeminfo.screenWidth - headerPosi.right
+			}
+			this.navbarHeight = headerPosi.bottom + btnPosi.bottom // 原胶囊bottom + 现胶囊bottom
+			//  高度自适应
+			uni.getSystemInfo({
+				success: function(res) {
+					let calc = res.windowHeight
+					self.winHeight = calc - self.CustomBar
+				}
+			})
+		},
+		setHeaderBtnPosi() {
+			// 获得胶囊按钮位置信息
+			let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
+			return headerBtnPosi
+		},
+		setSysteminfo() {
+			let systeminfo
+			uni.getSystemInfo({
+				// 获取设备信息
+				success: res => {
+					systeminfo = res
+				}
+			})
+			return systeminfo
+		},
+		PromotionsFormat(promo) {
+			//促销活动类型数据处理
+			if (promo != null) {
+				if (promo.type == 1 && promo.mode == 1) {
+					return true
+				} else {
+					return false
+				}
+			}
+			return false
+		}
+	},
+	onPageScroll(e) {
+		this.scrollTop = e.scrollTop
+	},
+	onShow() {
+		this.isModalLayer = false
+	}
 }
 </script>
 
 <style lang="scss">
 /*tabbar start*/
 ::-webkit-scrollbar {
-    width: 0;
-    height: 0;
-    color: transparent;
+	width: 0;
+	height: 0;
+	color: transparent;
 }
 .order-section-top {
-    width: 100%;
-    position: fixed;
-    top: 0;
-    left: 0;
-    z-index: 99;
-    background: #ffffff;
+	width: 100%;
+	position: fixed;
+	top: 0;
+	left: 0;
+	z-index: 99;
+	background: #ffffff;
 }
 .tab-view::before {
-    content: '';
-    position: absolute;
-    border-bottom: 1rpx solid #eaeef1;
-    -webkit-transform: scaleY(0.5);
-    transform: scaleY(0.5);
-    bottom: 0;
-    right: 0;
-    left: 0;
+	content: '';
+	position: absolute;
+	border-bottom: 1rpx solid #eaeef1;
+	-webkit-transform: scaleY(0.5);
+	transform: scaleY(0.5);
+	bottom: 0;
+	right: 0;
+	left: 0;
 }
 .tab-view {
-    width: 100%;
-    height: 80rpx;
-    overflow: hidden;
-    box-sizing: border-box;
-    background: #fff;
-    white-space: nowrap;
-    border-top: 1px solid #f7f7f7;
+	width: 100%;
+	height: 80rpx;
+	overflow: hidden;
+	box-sizing: border-box;
+	background: #fff;
+	white-space: nowrap;
+	border-top: 1px solid #f7f7f7;
 }
 .tab-bar-item {
-    padding: 0;
-    height: 80rpx;
-    min-width: 80rpx;
-    line-height: 80rpx;
-    margin: 0 28rpx;
-    display: inline-block;
-    text-align: center;
-    box-sizing: border-box;
+	padding: 0;
+	height: 80rpx;
+	min-width: 80rpx;
+	line-height: 80rpx;
+	margin: 0 28rpx;
+	display: inline-block;
+	text-align: center;
+	box-sizing: border-box;
 }
 .tab-bar-title {
-    height: 80rpx;
-    line-height: 80rpx;
-    font-size: $font-size-28;
-    color: $text-color;
+	height: 80rpx;
+	line-height: 80rpx;
+	font-size: $font-size-28;
+	color: $text-color;
 }
 
 .active {
-    border-bottom: 6rpx solid $color-system;
+	border-bottom: 6rpx solid $color-system;
 }
 
 .active .tab-bar-title {
-    color: $color-system !important;
+	color: $color-system !important;
 }
 
 /*tabbar end*/
 .scoll-y {
-    height: 100%;
+	height: 100%;
 }
 page {
-    background: #f7f7f7;
+	background: #f7f7f7;
 }
 .container {
-    padding-bottom: env(safe-area-inset-bottom);
-    height: auto;
-    position: relative;
+	padding-bottom: env(safe-area-inset-bottom);
+	height: auto;
+	position: relative;
 }
 .tui-order-content {
-    width: 100%;
-    height: auto;
+	width: 100%;
+	height: auto;
 }
 .tui-order-list {
-    margin-top: 90rpx;
-    width: 100%;
-    position: relative;
+	margin-top: 90rpx;
+	width: 100%;
+	position: relative;
 }
 .tui-order-item {
-    display: flex;
-    flex-direction: column;
-    width: 702rpx;
-    padding: 20rpx 24rpx 0 24rpx;
-    background: #fff;
-    border-bottom: 20rpx solid #f7f7f7;
+	display: flex;
+	flex-direction: column;
+	width: 702rpx;
+	padding: 20rpx 24rpx 0 24rpx;
+	background: #fff;
+	border-bottom: 20rpx solid #f7f7f7;
 }
 .order-title {
-    width: 100%;
-    height: auto;
-    .order-title-t {
-        width: 100%;
-        height: 68rpx;
-        float: left;
-        line-height: 68rpx;
-        position: relative;
-        .bage-icon {
-            width: 50rpx;
-            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;
-        }
-        .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;
-        }
-        .order-title-tip {
-            float: right;
-            font-size: $font-size-28;
-            line-height: 40rpx;
-            text-align: right;
-            color: #ff2a2a;
-        }
-    }
+	width: 100%;
+	height: auto;
+	.order-title-t {
+		width: 100%;
+		height: 68rpx;
+		float: left;
+		line-height: 68rpx;
+		position: relative;
+		.bage-icon {
+			width: 50rpx;
+			height: 50rpx;
+			display: block;
+			position: absolute;
+			right: 110rpx;
+			top: 12rpx;
+		}
+		.bage {
+			display: inline-block;
+			width: 72rpx;
+			height: 32rpx;
+			margin: 19rpx 10rpx 0 10rpx;
+			border-radius: 4rpx;
+			line-height: 32rpx;
+			font-size: $font-size-22;
+			text-align: center;
+			color: #ffffff;
+			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: left;
+			font-size: $font-size-28;
+			line-height: 68rpx;
+			text-align: right;
+			color: #ff2a2a;
+		}
+	}
 }
 .goods-title {
-    width: 100%;
-    height: 56rpx;
-    float: left;
-    margin-top: 10rpx;
-    .order-title-tip {
-        float: right;
-        font-size: $font-size-28;
-        line-height: 40rpx;
-        text-align: right;
-        color: #ff2a2a;
-    }
-    .floor-item-act {
-        height: 56rpx;
-        text-align: center;
-        box-sizing: border-box;
-        float: left;
-        padding: 10rpx 0;
-        margin-right: 12rpx;
-    }
-    .title-text {
-        width: 400rpx;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-        float: left;
-        font-size: $font-size-28;
-        color: $text-color;
-        text-align: left;
-        line-height: 56rpx;
-        font-weight: bold;
-        .iconfont {
-            color: #999999;
-            font-size: 28rpx;
-            margin-left: 10rpx;
-        }
-        .paymenttext {
-            color: #f9a94b;
-            font-size: $font-size-22;
-            margin-left: 20rpx;
-        }
-    }
+	width: 100%;
+	height: 56rpx;
+	float: left;
+	margin-top: 10rpx;
+	.order-title-tip {
+		float: right;
+		font-size: $font-size-28;
+		line-height: 40rpx;
+		text-align: right;
+		color: #ff2a2a;
+	}
+	.floor-item-act {
+		height: 56rpx;
+		text-align: center;
+		box-sizing: border-box;
+		float: left;
+		padding: 10rpx 0;
+		margin-right: 12rpx;
+	}
+	.title-text {
+		width: 400rpx;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		float: left;
+		font-size: $font-size-28;
+		color: $text-color;
+		text-align: left;
+		line-height: 56rpx;
+		font-weight: bold;
+		.iconfont {
+			color: #999999;
+			font-size: 28rpx;
+			margin-left: 10rpx;
+		}
+		.paymenttext {
+			color: #f9a94b;
+			font-size: $font-size-22;
+			margin-left: 20rpx;
+		}
+	}
 }
 .goods-item {
-    width: 100%;
-    height: auto;
+	width: 100%;
+	height: auto;
 }
 .goods-pros-t {
-    width: 100%;
-    height: auto;
-    padding: 24rpx 0;
-    .pros-img {
-        float: left;
-        width: 210rpx;
-        height: 100%;
-        border-radius: 10rpx;
-        margin: 0 26rpx 0 0;
-        position: relative;
-        .tips {
-            display: inline-block;
-            width: 80rpx;
-            height: 40rpx;
-            background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
-            line-height: 40rpx;
-            text-align: center;
-            font-size: $font-size-24;
-            color: #ffffff;
-            border-radius: 10rpx 0 10rpx 0;
-            position: absolute;
-            top: 0;
-            left: 0;
-        }
-        image {
-            width: 210rpx;
-            height: 210rpx;
-            border-radius: 10rpx;
-            border: 1px solid #f3f3f3;
-        }
-    }
+	width: 100%;
+	height: auto;
+	padding: 24rpx 0;
+	.pros-img {
+		float: left;
+		width: 210rpx;
+		height: 100%;
+		border-radius: 10rpx;
+		margin: 0 26rpx 0 0;
+		position: relative;
+		.tips {
+			display: inline-block;
+			width: 80rpx;
+			height: 40rpx;
+			background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
+			line-height: 40rpx;
+			text-align: center;
+			font-size: $font-size-24;
+			color: #ffffff;
+			border-radius: 10rpx 0 10rpx 0;
+			position: absolute;
+			top: 0;
+			left: 0;
+		}
+		image {
+			width: 210rpx;
+			height: 210rpx;
+			border-radius: 10rpx;
+			border: 1px solid #f3f3f3;
+		}
+	}
 }
 .pros-product {
-    width: 460rpx;
-    height: 100%;
-    line-height: 36rpx;
-    font-size: $font-size-26;
-    position: relative;
-    float: left;
-    .producttitle {
-        width: 100%;
-        display: inline-block;
-        height: auto;
-        text-overflow: ellipsis;
-        display: -webkit-box;
-        word-break: break-all;
-        -webkit-box-orient: vertical;
-        -webkit-line-clamp: 2;
-        overflow: hidden;
-        margin-bottom: 8rpx;
-    }
-    .productspec {
-        height: 36rpx;
-        color: #999999;
-        margin: 30rpx 0;
-    }
-    .productprice {
-        height: 48rpx;
-        width: 100%;
-        float: left;
-        .price {
-            line-height: 48rpx;
-            font-size: $font-size-28;
-            width: 48%;
-            color: #ff2a2a;
-            float: left;
-            font-weight: bold;
-            &.none {
-                text-decoration: line-through;
-                color: #999999;
-            }
-        }
-        .count {
-            height: 100%;
-            float: right;
-            position: relative;
-            .small {
-                color: #666666;
-            }
-        }
-    }
-    .floor-item-act {
-        width: 100%;
-        height: 56rpx;
-        text-align: center;
-        box-sizing: border-box;
-        float: left;
-        padding: 0 0 10rpx 0;
-    }
+	width: 460rpx;
+	height: 100%;
+	line-height: 36rpx;
+	font-size: $font-size-26;
+	position: relative;
+	float: left;
+	.producttitle {
+		width: 100%;
+		display: inline-block;
+		height: auto;
+		text-overflow: ellipsis;
+		display: -webkit-box;
+		word-break: break-all;
+		-webkit-box-orient: vertical;
+		-webkit-line-clamp: 2;
+		overflow: hidden;
+		margin-bottom: 8rpx;
+	}
+	.productspec {
+		height: 36rpx;
+		color: #999999;
+		margin: 30rpx 0;
+	}
+	.productprice {
+		height: 48rpx;
+		width: 100%;
+		float: left;
+		.price {
+			line-height: 48rpx;
+			font-size: $font-size-28;
+			width: 48%;
+			color: #ff2a2a;
+			float: left;
+			font-weight: bold;
+			&.none {
+				text-decoration: line-through;
+				color: #999999;
+			}
+		}
+		.count {
+			height: 100%;
+			float: right;
+			position: relative;
+			.small {
+				color: #666666;
+			}
+		}
+	}
+	.floor-item-act {
+		width: 100%;
+		height: 56rpx;
+		text-align: center;
+		box-sizing: border-box;
+		float: left;
+		padding: 0 0 10rpx 0;
+	}
 }
 .order-footer {
-    width: 100%;
-    height: 78rpx;
-    float: left;
-    margin-top: 20rpx;
-    .order-footer-top {
-        width: 100%;
-        height: 34rpx;
-        line-height: 34rpx;
-        font-size: $font-size-24;
-        color: #999999;
-        text-align: right;
-    }
-    .order-footer-bot {
-        width: 100%;
-        float: left;
-        height: 48rpx;
-        line-height: 48rpx;
-        font-size: $font-size-28;
-        color: $text-color;
-        .count {
-            width: 50%;
-            float: left;
-            text-align: left;
-            font-weight: bold;
-        }
-        .money {
-            width: 50%;
-            float: right;
-            text-align: right;
-        }
-    }
+	width: 100%;
+	height: 78rpx;
+	float: left;
+	margin-top: 20rpx;
+	.order-footer-top {
+		width: 100%;
+		height: 34rpx;
+		line-height: 34rpx;
+		font-size: $font-size-24;
+		color: #999999;
+		text-align: right;
+	}
+	.order-footer-bot {
+		width: 100%;
+		float: left;
+		height: 48rpx;
+		line-height: 48rpx;
+		font-size: $font-size-28;
+		color: $text-color;
+		.count {
+			width: 50%;
+			float: left;
+			text-align: left;
+			font-weight: bold;
+		}
+		.money {
+			width: 50%;
+			float: right;
+			text-align: right;
+		}
+	}
 }
 </style>

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

@@ -94,13 +94,13 @@ export default {
 	},
 	data() {
 		return {
-			orderId: '',
+			shopOrderId: '',
 			goodsList: []
 		}
 	},
 	onLoad(option) {
 		//商品数据
-		this.orderId = option.orderId
+		this.shopOrderId = option.shopOrderId
 		this.getData()
 	},
 	methods: {
@@ -122,7 +122,7 @@ export default {
 			})
 		},
 		getData() {
-			this.OrderService.QueryLogistics({ shopOrderId: this.orderId })
+			this.OrderService.QueryLogistics({ shopOrderId: this.shopOrderId })
 				.then(response => {
 					const resData = response.data
 					// 添加订单列表信息

+ 335 - 383
pages/user/order/search-order.vue → pages/user/order/order-search.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">
@@ -17,15 +16,15 @@
 						placeholder="请输入商品关键词"
 						v-model.trim="listQuery.searchWord"
 					/>
-					<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
+					<text class="iconfont icon-shanchu" v-if="isShowClose" @click="delInputText()"></text>
 				</view>
-				<view class="search-btn" @click="subMitSearch()">搜索</view>
+				<view class="search-btn" @click="subMitSearch">搜索</view>
 			</view>
 		</view>
 		<view class="search-container-history" v-if="!isShowWrapper">
 			<view :class="'s-' + themeClass" v-if="serachRecordList.length > 0">
 				<view class="header">
-					搜索历史 <text class="iconfont icon-shanchu" @click="confirmDetele"></text>
+					搜索历史 <text class="iconfont icon-shanchu1" @click="confirmDetele"></text>
 				</view>
 				<view class="list">
 					<view
@@ -61,13 +60,16 @@
 						>
 							<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
 									>
 									<text
-										class="bage-auto tui-skeleton-fillet"
+										class="bage auto tui-skeleton-fillet"
 										v-if="
 											order.orderSubmitType == 0 ||
 												order.orderSubmitType == 1 ||
@@ -75,157 +77,103 @@
 										"
 										>自主</text
 									>
-									<text class="bage-text tui-skeleton-fillet">订单编号:{{ order.orderNo }}</text>
-									<image
-										class="bage-icon"
-										src="https://static.caimei365.com/app/img/icon/icon-type@3x.png"
-										mode="widthFix"
-										v-if="order.secondHandOrderFlag == 1"
-									></image>
-								</view>
-								<view class="order-title-b">
-									<view class="order-title-btxt tui-skeleton-fillet"
-										>下单时间:{{ order.orderTime }}</view
-									>
-									<view class="order-title-tip tui-skeleton-fillet">{{
-										StateExpFormat(order.status)
-									}}</view>
 								</view>
 							</view>
-							<block v-for="(shop, index) in order.shopOrderList" :key="index">
+							<block v-for="(shop, sindex) in order.orderProductList" :key="sindex">
 								<view class="goods-title">
-									<view v-if="shop.shopPromotion" class="floor-item-act">
-										<view class="floor-tags">{{ shop.shopPromotion.name }}</view>
+									<view class="title-text tui-skeleton-fillet">
+										{{ shop.shopName }} <label class="iconfont icon-jinrudianpu"></label>
 									</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-item" @click.stop="detail(shop.shopOrderId, shop.orderId)">
 									<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
-											>
+											<image :src="shop.image" alt="" />
 										</view>
-										<view class="pros-product">
-											<view class="producttitle tui-skeleton-fillet">{{ pros.name }}</view>
+										<view class="pros-product clearfix">
+											<view class="producttitle tui-skeleton-fillet">
+												{{ shop.name }}
+											</view>
 											<view
 												class="productspec tui-skeleton-fillet"
-												v-if="pros.productCategory != 2"
-												>规格:{{ pros.productUnit }}</view
+												v-if="shop.productCategory != 2"
 											>
+												规格:{{ shop.productUnit }}
+											</view>
 											<view class="productprice">
-												<view
-													class="price tui-skeleton-fillet"
-													:class="
-														pros.svipPriceFlag == 1 ||
-														PromotionsFormat(pros.productPromotion)
-															? 'none'
-															: ''
-													"
-												>
-													<text>¥{{ pros.price | NumFormat }}</text>
+												<view class="price tui-skeleton-fillet">
+													<text>¥{{ shop.price | NumFormat }}</text>
 												</view>
 												<view class="count tui-skeleton-fillet">
-													<text class="small">x</text>{{ pros.num }}
+													<text class="small">x</text> {{ shop.num }}
 												</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>
 										</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="count tui-skeleton-fillet">
+										共{{ order.itemCount }}件商品
+									</view>
 									<view
 										class="money tui-skeleton-fillet"
 										v-if="order.status == 31 || order.status == 32 || order.status == 33"
 									>
-										已支付:<label style="color:#f94b4b ;"
-											>¥{{ order.receiptAmount | NumFormat }}</label
-										>
+										已支付:
+										<label style="color:#f94b4b ;">
+											¥{{ order.receiptAmount | NumFormat }}
+										</label>
 									</view>
 									<view class="money tui-skeleton-fillet" v-else>
-										待付总额:<label style="color:#f94b4b ;"
-											>¥{{ order.pendingPayments | NumFormat }}</label
-										>
+										待付总额:
+										<label style="color:#f94b4b ;">
+											¥{{ order.obligation | NumFormat }}
+										</label>
 									</view>
 								</view>
 							</view>
 							<!-- 底部button -->
-							<order-button
+							<cm-list-button
 								ref="orderButton"
 								:status="order.status"
 								:order="order"
-								:onlinePayFlag="order.onlinePayFlag"
+								@shareConfirm="handButtonShareConfirm"
 								@buttonConfirm="handButtonConfirm"
-							>
-							</order-button>
+							/>
 						</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>
 		<!-- 分享弹窗 -->
-		<share-alert v-if="isShareModal" :orderId="btnoRderID" @shareConfirm="onShareAppMessage"> </share-alert>
+		<cm-share-popup :shopOrderId="handleShopOrderId" v-if="isShareModal" @shareConfirm="onShareAppMessage" />
+		<!-- 提示弹窗 -->
+		<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>
+		<modal-layer v-if="isModalLayer"/>
 	</view>
 </template>
 
 <script>
-import orSearch from '@/components/uni-search/or-search.vue'
-import orderButton from './components/details/orderListButton' //按钮
-import modalLayer from '@/components/modal-layer'
 import empty from './components/empty'
-import shareAlert from '@/components/cm-module/modelAlert/shareAlert' //分享弹窗
-import authorize from '@/common/config/authorize.js'
+import modalLayer from '@/components/modal-layer'
+import cmListButton from './components/cm-list-button' //底部按钮
+import cmSharePopup from './components/cm-share-popup' //分享弹窗
 const defaultListQuery = {
 	pageNum: 1, // 页码
 	pageSize: 10, // 每页条数
@@ -234,10 +182,10 @@ const defaultListQuery = {
 }
 export default {
 	components: {
-		orSearch,
-		orderButton,
 		empty,
-		shareAlert,
+		modalLayer,
+		cmListButton,
+		cmSharePopup
 	},
 	data() {
 		return {
@@ -246,15 +194,15 @@ export default {
 			isShowClose: false, // 是否显示清空输入框图标
 			isSearchHistory: false, // 是都显示搜索历史
 			serachRecordList: [],
-			isShowWrapper: false,
+			isShowWrapper: false, 
 			isModallayer: false,
 			isShowEmpty: false,
 			windowHeight: '',
 			showSkeleton: true,
 			orderList: [],
-			btnoRderID: 0, // 点击按钮传入的的订单ID
 			scrollTop: 0,
 			skeletonShow: true,
+			isPayModel:false, // 付款弹窗
 			isShareModal: false, // 控制分享弹窗
 			isCenceModal: false, // 控制取消订单弹窗
 			isShowDelModal: false, // 控制删除订单弹窗
@@ -266,9 +214,29 @@ export default {
 			navbarHeight: '',
 			nomoreText: '上拉显示更多',
 			scrollHeight: '',
+			modelType: 0,
 			beansType: 1,
 			beanNumber: 0,
-			isActivityBean: false
+			payModelData: {},
+			handleShopOrderId: 0, //点击按钮传入的的子订单ID
+			handleModelEven:0,
+			modal:false,
+			contentModalText: '订单查询失败,请稍候重试~', //操作文字提示语句
+			modalButton: [
+				{
+					text: '取消',
+					type: 'gray',
+					plain: true //是否空心
+				},
+				{
+					text: '确定',
+					customStyle: {
+						color: '#fff',
+						bgColor: '#F3B574'
+					},
+					plain: false
+				}
+			]
 		}
 	},
 	onLoad() {
@@ -278,6 +246,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: {
@@ -285,25 +273,200 @@ export default {
 			if (this.listQuery.searchWord == '') {
 				this.$util.msg('请输入商品关键词', 2000)
 			} else {
-				this.commodityList = []
-				this.getOrderDatainit()
+				this.getList()
 			}
 		},
 		async initGetSerachRecord() {
-			const userInfo = await this.$api.getStorage()
-			this.listQuery.userId = userInfo.userId ? userInfo.userId : 0
-			this.OrderService.SearchOrderHistory({ userId: this.listQuery.userId })
-				.then(response => {
-					this.serachRecordList = response.data
-					if (this.serachRecordList.length > 0) {
-						this.isSearchHistory = true
+			try{
+				const userInfo = await this.$api.getStorage()
+				this.listQuery.userId = userInfo.userId ? userInfo.userId : 0
+				const res = await this.OrderService.SearchOrderHistory({ userId: this.listQuery.userId })
+				this.serachRecordList = res.data
+				if (this.serachRecordList.length > 0) {
+					this.isSearchHistory = true
+				} else {
+					this.isSearchHistory = false
+				}
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//清空历史记录
+		async confirmDetele() {
+			try{
+				const res = await this.OrderService.ClearOrderHistory({ userId: this.listQuery.userId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				this.serachRecordList = []
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		async getList() {
+			try{
+				const res = await this.OrderService.SearchOrderInfo(this.listQuery)
+				const data = res.data
+				if (data && data.list.length > 0) {
+					this.orderList = data.list
+					this.hasNextPage = data
+					if (this.hasNextPage) {
+						this.pullUpOn = false
+						this.nomoreText = '上拉显示更多'
 					} else {
-						this.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.OrderService.SearchOrderInfo(this.listQuery)
+				const data = res.data
+				this.orderList = this.orderList.concat(data.list)
+				this.hasNextPage = data.hasNextPage
+				this.pullFlag = false // 防上拉暴滑
+				setTimeout(() => {
+					this.pullFlag = true
+				}, 500)
+				if (this.hasNextPage) {
+					this.pullUpOn = false
+					this.nomoreText = '上拉显示更多'
+				} else {
+					this.loadding = false
+					this.pullUpOn = false
+					this.nomoreText = '已至底部'
+				}
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		async handButtonConfirm(data) {
+			//获取点击
+			this.handleShopOrderId = data.shopOrderId
+			switch (data.type) {
+				case 'cancel'://取消订单
+					this.modal = true
+					this.contentModalText = '确认取消该订单吗?'
+					this.handleModelEven = 1
+					break
+				case 'confirm'://确认收货
+					this.modal = true
+					this.contentModalText = '确认收货吗?'
+					this.handleModelEven = 2
+					break	
+				case 'delete'://删除订单
+					this.modal = true
+					this.contentModalText = '确认删除该订单吗?'
+					this.handleModelEven = 3
+					break	
+				case 'confirmation': // 确认订单
+					this.modal = true
+					this.contentModalText = '确认此订单吗?'
+					this.handleModelEven = 4
+					break
+				case 'pay':
+					this.getOrderPaymentValidation()
+					break	
+				case 'query':
+					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){
+			//确认操作
+			if (e.index == 1) {
+				switch(this.handleModelEven){
+					case 1://取消订单
+						this.cancelOrder()
+					 break
+					case 2://确认收货
+						this.confirmReceipt()
+					 break
+					case 3://删除订单
+						this.deleteOrder()
+					 break
+					case 4://确认订单
+						this.affirmOrder()
+					 break
+				}
+			}
+			this.modal = false
+		},
+		//取消订单
+		async cancelOrder() {
+			try{
+				const res = await this.OrderService.CancelOrder({ shopOrderId: this.handleShopOrderId, userIdentity : 0 })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.getList()
+				}, 2000)
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//确认收货
+		async confirmReceipt() {
+			try{
+				const res = await this.OrderService.ConfirmReceipt({ shopOrderId: this.handleShopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//删除订单
+		async deleteOrder() {
+			try{
+				const res = await this.OrderService.DeleteOrder({ shopOrderId: this.handleShopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.getList()
+				}, 2000)
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//确认订单
+		async affirmOrder() {
+			try{
+				const res = await this.OrderService.AffirmOrder({ shopOrderId: this.handleShopOrderId })
+				this.$util.msg(res.msg, 2000, true, 'success')
+				setTimeout(() => {
+					this.getList()
+				}, 2000)
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		//监听根据付款状态做操作
+		async getOrderPaymentValidation() {
+			try {
+				const res = await this.OrderService.OrderPaymentValidation({ shopOrderId: this.handleOrderId })
+				this.$api.navigateTo(`/pages/user/order/order-pay-list?shopOrderId=${res.data.shopOrderId}`)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		detail(shopOrderId) {
+			//订单详情跳转
+			this.isModalLayer = true
+			this.$api.navigateTo(`/pages/user/order/order-details?shopOrderId=${shopOrderId}`)
 		},
 		onShowClose() {
 			//输入框失去焦点时触发
@@ -314,6 +477,14 @@ export default {
 			this.inputEmpty(this.listQuery.searchWord)
 			this.initGetSerachRecord()
 		},
+		inputEmpty(val) {
+			this.isShowWrapper = false
+			if (val != '') {
+				this.isShowClose = true
+			} else {
+				this.isShowClose = false
+			}
+		},
 		delInputText() {
 			//清除输入框内容
 			this.listQuery.searchWord = ''
@@ -328,186 +499,8 @@ export default {
 			this.isShowClose = true
 			this.subMitSearch()
 		},
-		confirmDetele() {
-			//清空历史记录
-			this.$util.modal('提示', '确定删除历史记录?', '确定', '取消', true, () => {
-				this.OrderService.ClearOrderHistory({ userId: this.listQuery.userId })
-					.then(response => {
-						this.$util.msg('删除记录成功', 2000, true, 'success')
-						this.serachRecordList = []
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
-		},
-		inputEmpty(val) {
-			this.isShowWrapper = false
-			if (val != '') {
-				this.isShowClose = true
-			} else {
-				this.isShowClose = false
-			}
-		},
-		getOrderDatainit(index, source) {
-			this.OrderService.SearchOrderInfo(this.listQuery)
-				.then(response => {
-					this.isShowWrapper = true
-					this.showSkeleton = true
-					let data = response.data
-					if (data && data.list.length > 0) {
-						let filrerData = data.list.filter(item => {
-							//添加不同状态下订单的表现形式
-							item = Object.assign(item, this.StateExpFormat(item.status))
-							return item
-						})
-						this.orderList = []
-						filrerData.forEach(item => {
-							this.orderList.push(item)
-						})
-						this.hasNextPage = data
-						if (this.hasNextPage) {
-							this.pullUpOn = false
-							this.nomoreText = '上拉显示更多'
-						} else {
-							if (this.orderList.length < 2) {
-								this.pullUpOn = true
-							} else {
-								this.pullUpOn = false
-								this.nomoreText = '已至底部'
-							}
-						}
-						this.isShowEmpty = false
-					} else {
-						this.isShowEmpty = true
-					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
-		},
-		getOnReachBottomData() {
-			//上拉加载
-			this.listQuery.pageNum += 1
-			this.OrderService.SearchOrderInfo(this.listQuery)
-				.then(response => {
-					let data = response.data
-					this.hasNextPage = data.hasNextPage
-					this.orderList = this.orderList.concat(data.list)
-					this.pullFlag = false // 防上拉暴滑
-					setTimeout(() => {
-						this.pullFlag = true
-					}, 500)
-					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(orderId) {
-			//订单详情跳转
-			this.isModalLayer = true
-			this.$api.navigateTo(`/pages/user/order/order-details?type=search&orderId=${orderId}`)
-		},
-		handButtonConfirm(data) {
-			//获取点击
-			this.handShowAlert(data)
-			this.btnoRderID = data.orderId
-		},
-		handShowAlert(data) {
-			//执行
-			switch (data.type) {
-				case 'delete':
-					this.handOrderDetele(data.orderId)
-					break
-				case 'cancel':
-					this.handCenceConfirm(data.orderId)
-					break
-				case 'query':
-					this.isModalLayer = true
-					this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
-					break
-				case 'confirm':
-					this.handOrderConfirm(data.orderId)
-					break
-				case 'confirmation':
-					this.handOrderConfirmation(data.orderId)
-					break
-			}
-		},
-		handOrderConfirm(orderId) {
-			//确认收货
-			this.$util.modal('提示', '是否确认收货', '确定', '取消', true, () => {
-				this.OrderService.ConfirmReceipt({ orderId: orderId })
-					.then(response => {
-						this.beansType = 7
-						this.beanNumber = 100
-						this.isActivityBean = true
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
-		},
-		handOrderConfirmation(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 : 0})
-					.then(response => {
-						this.$util.msg(response.msg, 2000, true, 'success')
-						setTimeout(() => {
-							this.getOrderDatainit()
-						}, 2000)
-					})
-					.catch(error => {
-						this.$util.msg(error.msg, 2000)
-					})
-			})
+		handButtonShareConfirm(data) {
+			this.handleShopOrderId = data
 		},
 		onShareAppMessage(res) {
 			//分享转发
@@ -517,8 +510,16 @@ export default {
 			}
 			return {
 				title: '您有新的分享订单,快来查看吧~',
-				path: `/pages/user/order/order-sharelogin?orderID=${this.btnoRderID}&userId=${this.listQuery.userId}`,
-				imageUrl: 'https://static.caimei365.com/app/img/bg/min-banner.jpg'
+				path: `/pages/user/order/order-sharelogin?shopOrderId=${this.handleShopOrderId}&userId=${this.listQuery.userId}`,
+				imageUrl: 'https://static.caimei365.com/app/mini-mcare/icon/icon_shareOrder@2x.png'
+			}
+		},
+		scrolltolower() {
+			if (this.hasNextPage) {
+				this.loadding = true
+				this.pullUpOn = true
+				this.showSkeleton = false
+				this.getOnReachBottomData()
 			}
 		},
 		setScrollHeight() {
@@ -537,44 +538,17 @@ export default {
 			}
 			return false
 		},
-		StateExpFormat(state) {
-			//订单状态文字和颜色
-			var HtmlStateText = '',
-				stateTextObject = {
-					0: '待确认',
-					4: '交易完成',
-					5: '订单完成',
-					6: '已关闭',
-					7: '交易全退',
-					77: '交易全退',
-					11: '待付款待发货',
-					12: '待付款部分发货',
-					13: '待付款已发货',
-					21: '部分付款待发货',
-					22: '部分付款部分发货',
-					23: '部分付款已发货',
-					31: '已付款待发货',
-					32: '已付款部分发货',
-					33: '已付款已发货',
-					111: '待付款待发货'
-				}
-			Object.keys(stateTextObject).forEach(function(key) {
-				if (key == state) {
-					HtmlStateText = stateTextObject[key]
-				}
-			})
-			return HtmlStateText
-		},
+		
 		handleBeanlClick() {
 			//关闭采美豆弹窗
-			this.isActivityBean = false
-			this.getOrderDatainit()
+			this.getList()
 		}
 	},
 	onPageScroll(e) {
 		this.scrollTop = e.scrollTop
 	},
 	onShow() {
+		this.isModalLayer = false
 		this.setScrollHeight()
 	}
 }
@@ -611,7 +585,7 @@ page {
 			left: 24rpx;
 			z-index: 10;
 		}
-		.icon-shanchu1 {
+		.icon-shanchu {
 			font-size: 36rpx;
 			color: #8a8a8a;
 			position: absolute;
@@ -658,9 +632,9 @@ page {
 		font-size: 30rpx;
 		font-weight: bold;
 		position: relative;
-		.icon-shanchu {
+		.icon-shanchu1 {
 			font-size: 36rpx;
-			color: #333333;
+			color: #666666;
 			float: right;
 			padding: 0 10rpx;
 			z-index: 10;
@@ -808,56 +782,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: $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%);
+			}
+			&.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;
 		}

+ 34 - 29
pages/user/order/order-sharedetails.vue

@@ -1,59 +1,62 @@
 <template>
 	<view class="container details clearfix">
 		<!-- 地址选择 -->
-		<order-address ref="orderAddress" v-if="isRequest" :addressData="addressData"></order-address>
+		<cm-address-temp ref="orderAddress" v-if="isRequest" :addressData="addressData" />
 		<!-- 商品 -->
-		<goods-list
-			ref="goods"
-			v-if="isRequest"
-			:shopOrderData="shopOrderData"
-			@popupClick="hanldePopupFn"
-		></goods-list>
+		<cm-goods-temp ref="goods" v-if="isRequest" :shopOrderData="shopOrderData" @popupClick="hanldePopupFn" />
 		<!-- 订单信息 -->
-		<order-information ref="information" v-if="isRequest" :information="information"></order-information>
+		<cm-order-temp ref="information" v-if="isRequest" :information="information" />
 		<!-- 发票信息 -->
-		<invoice-tent ref="invoice" v-if="isRequest" :orderInvoice="orderInvoice"></invoice-tent>
+		<cm-invice-temp ref="invoice" v-if="isRequest" :orderInvoice="orderInvoice" />
 		<!-- 支付记录 -->
-		<payment-record
+		<cm-payment-temp
 			ref="payment"
 			v-if="isRequest"
 			:discernReceiptList="discernReceiptList"
 			:receiptAmount="receiptAmount"
-		></payment-record>
+		/>
 		<!-- 退款记录 -->
-		<refund-record
+		<cm-refund-temp
 			ref="refund"
 			v-if="isRequest"
 			:returnedPurchaseList="returnedPurchaseList"
 			:returnedPurchaseFee="returnedPurchaseFee"
-		></refund-record>
+		/>
+		<!-- 支付凭证记录 -->
+		<cm-voucher-temp
+			ref="voucher"
+			v-if="skeletonShow && voucherList && voucherList.length > 0"
+			:list="voucherList"
+		/>
 		<!-- 底部button -->
 		<view class="button-content" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
 			<view class="btn btn-query" v-if="btnState.isQuery" @click.stop="queryLogistics">查看物流</view>
 			<view class="btn btn-cancel" v-if="btnState.isPay" @click.stop="btnConfirmPay">立即支付</view>
 		</view>
 		<!-- 促销活动弹窗 -->
-		<activi-popup :Promotion="handlerPros" :popupShow="popupShow"></activi-popup>
+		<activi-popup :Promotion="handlerPros" :popupShow="popupShow" />
 	</view>
 </template>
 
 <script>
-import orderAddress from './components/details/orderAddress' //地址信息
-import goodsList from './components/details/goodsList' //商品列表
-import invoiceTent from './components/details/invoiceTent' //发票信息
-import orderInformation from './components/details/orderInformation' //订单信息
-import paymentRecord from './components/details/paymentRecord' //支付记录
-import refundRecord from './components/details/refundRecord' //退款记录
+import cmAddressTemp from './components/details/cm-address-temp' //地址信息
+import cmGoodsTemp from './components/details/cm-goods-temp' //商品列表
+import cmInviceTemp from './components/details/cm-invice-temp' //发票信息
+import cmOrderTemp from './components/details/cm-order-temp' //订单信息
+import cmPaymentTemp from './components/details/cm-payment-temp' //支付记录
+import cmRefundTemp from './components/details/cm-refund-temp' //退款记录
+import cmVoucherTemp from './components/details/cm-voucher-temp' //支付凭证记录
 import activiPopup from './components/details/activipopu' //促销活动弹窗
 
 export default {
 	components: {
-		orderInformation,
-		orderAddress,
-		invoiceTent,
-		goodsList,
-		paymentRecord,
-		refundRecord,
+		cmAddressTemp,
+		cmGoodsTemp,
+		cmOrderTemp,
+		cmInviceTemp,
+		cmPaymentTemp,
+		cmRefundTemp,
+		cmVoucherTemp,
 		activiPopup
 	},
 	data() {
@@ -61,7 +64,7 @@ export default {
 			status: '',
 			userId: '',
 			orderId: '',
-            shopOrderId: '',
+			shopOrderId: '',
 			cellPhone: '', //客服电话
 			btnStatus: 0, //按钮组件状态
 			isRequest: false, //是否加载完成渲染子组件
@@ -71,6 +74,7 @@ export default {
 			orderInvoice: {}, //发票信息初始化
 			returnedPurchaseList: {}, //退款信息初始化
 			discernReceiptList: {}, //支付信息初始化
+			voucherList: [], //支付凭证
 			receiptAmount: 0, //支付金额
 			returnedPurchaseFee: 0, //退款金额
 			isIphoneX: this.$store.state.isIphoneX,
@@ -78,7 +82,7 @@ export default {
 			handlerPros: {},
 			btnState: {
 				isQuery: false,
-				isPay:false
+				isPay: false
 			},
 			mapStateArr: [
 				{ label: 'isQuery', val: [2, 3, 5, 6, 12, 13, 22, 23, 32, 33], status: true },
@@ -106,6 +110,7 @@ export default {
 					this.discernReceiptList = data.discernReceiptList
 					this.receiptAmount = data.order.receiptAmount
 					this.returnedPurchaseFee = data.order.returnedPurchaseFee
+					this.voucherList = data.voucher
 					this.isRequest = true
 					this.mapStateArr.forEach(el => {
 						el.val.forEach(value => {
@@ -142,7 +147,7 @@ export default {
 						if (response.data.onlinePayFlag === 1) {
 							this.$api.navigateTo(`/pages/user/pay/card-under?orderId=${orderId}`)
 						} else {
-							this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${orderId}`,)
+							this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${orderId}`)
 						}
 					}
 				})

+ 1 - 1
pages/user/order/order-sharelogin.vue

@@ -105,7 +105,7 @@ export default {
 				} else if (res.code === 2) {
 					// 协销查看分享订单
 					this.$api.navigateTo(
-						`/pages/seller/order/order-details?type=share&orderId=${this.params.shopOrderId}&userId=${
+						`/pages/seller/order/order-details?type=share&shopOrderId=${this.params.shopOrderId}&userId=${
 							this.params.userId
 						}`
 					)

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.