Selaa lähdekoodia

1.订单详情

guo 2 vuotta sitten
vanhempi
commit
4588bc2e3a
1 muutettua tiedostoa jossa 46 lisäystä ja 26 poistoa
  1. 46 26
      pages/user/myOrder/mallOrderDetail.vue

+ 46 - 26
pages/user/myOrder/mallOrderDetail.vue

@@ -6,7 +6,7 @@
 			<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
 			<view class="zdyNav">
 				<view class="zdyNavLeft">
-					<image src="../../../static/img/nav_icon_back.png" mode="" class="backImg" @click="goback"></image>
+					<image src="../../../static/img/nav_icon_back.png" mode="aspectFit" class="backImg" @click="goback"></image>
 					<image src="../../../static/img/nav_icon_home.png" mode="" class="homeImg" @click="gohome"></image>
 				</view>
 				<view class="zdyNavTitle">订单详情</view>
@@ -67,8 +67,8 @@
 				<view class="informationNum" style="color: #999999;">
 					x{{orderData.OpenSheetQRCodeList.itemQty}}</view>
 			</view>
-			<view v-if="orderData.data.sheetState != 1" class="line"></view>
-			<view v-if="orderData.data.sheetState != 1">
+			<view v-if="orderData.data.sheetState != 1 && orderData.data.sheetState != 4" class="line"></view>
+			<view v-if="orderData.data.sheetState != 1 && orderData.data.sheetState != 4">
 				<view class="goodsName">
 					券码信息({{orderData.OpenSheetQRCodeList.noWriteoffQty?orderData.OpenSheetQRCodeList.noWriteoffQty:0}}张可用)
 				</view>
@@ -101,15 +101,15 @@
 			<view class="itemBox" v-if="orderData.projectList.length>0">
 				<!-- 头 -->
 				<view class="itemTop">
-					<view class="topTitle leftItem">项目名称</view>
+					<view class="leftItem">项目名称</view>
 					<view class="topTitle">数量</view>
 					<view class="topTitle">有效期</view>
 				</view>
 
 				<view v-for="(item,index) in orderData.projectList" :key="index">
 					<view class="itemContent">
-						<view class="topTitle leftItem">{{item.flowName}}</view>
-						<view class="topTitle2">{{item.flowQty}}</view>
+						<view class="leftItem">{{item.flowName}}</view>
+						<view class="topTitle">{{item.flowQty}}</view>
 						<view class="topTitle">{{item.date}}</view>
 					</view>
 				</view>
@@ -119,15 +119,15 @@
 			<view class="itemBox" v-if="orderData.shopList.length>0">
 				<!-- 头 -->
 				<view class="itemTop">
-					<view class="topTitle leftItem">商品名称</view>
+					<view class="leftItem">商品名称</view>
 					<view class="topTitle">数量</view>
 					<view class="topTitle">有效期</view>
 				</view>
 
 				<view v-for="(item,index) in orderData.shopList" :key="index">
 					<view class="itemContent">
-						<view class="topTitle leftItem">{{item.flowName}}</view>
-						<view class="topTitle2">{{item.flowQty}}</view>
+						<view class="leftItem">{{item.flowName}}</view>
+						<view class="topTitle">{{item.flowQty}}</view>
 						<view class="topTitle">{{item.date}}</view>
 					</view>
 				</view>
@@ -204,11 +204,11 @@
 
 				</view>
 				<swiper class="swiper" circular  :autoplay="false" :indicator-dots="true" indicator-color="#CCCCCC" indicator-active-color="#D53533">
-					<swiper-item v-for="(item,index) in orderData.OpenSheetQRCodeList.OpenSheetQRCode">
+					<swiper-item v-for="(item,index) in quanMaList">
 						<view class="swiper-item">
-							<view class="maCode">{{item.qrCode}}</view>
+							<view class="maCode">{{item}}</view>
 							<view class="maBoximg">
-								<tki-qrcode cid="qrcode1" ref="qrcode" :val="item.qrCode" :size="400" :unit="unit"
+								<tki-qrcode cid="qrcode1" ref="qrcode" :val="item" :size="400" :unit="unit"
 									:pdground="pdground" :icon="icon" :iconSize="iconsize" :lv="lv" :onval="onval"
 									:loadMake="loadMake" :usingComponents="true" @result="qrR" />
 							</view>
@@ -256,7 +256,8 @@
 				iconsize: 40, // 二维码图标大小
 				lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
 				src: '', // 二维码生成后的图片地址或base64
-				isShowMa: false,
+				isShowMa: false,
+				quanMaList:[],
 				
 			}
 		},
@@ -451,7 +452,20 @@
 				}, 'GET').then(res => {
 					uni.hideLoading();
 					this.orderData = res.data;
-
+					if (this.quanMaList) {
+						this.quanMaList = [];
+					}
+					let maList = this.orderData.OpenSheetQRCodeList.OpenSheetQRCode;
+					if (maList) {
+						maList.forEach(item =>{
+							if (item.writeoffState==1) {
+								this.quanMaList.push(item.qrCode);
+							}
+						})
+					}
+					
+					console.log('可用券码--',this.quanMaList);
+					
 				})
 			},
 			
@@ -503,8 +517,8 @@
 	.backImg{
 		width: 44rpx;
 		height: 44rpx;
-		
-		margin: 0 20rpx;
+		margin-left: 10rpx;
+		margin-right: 20rpx;
 	}
 	.homeImg{
 		width: 44rpx;
@@ -841,7 +855,8 @@
 	}
 
 	.itemTop {
-		padding: 18rpx 20rpx;
+		padding: 18rpx 20rpx;
+		padding-right: 0;
 		background-color: #FFEFD5;
 
 		display: flex;
@@ -850,23 +865,28 @@
 	}
 
 	.topTitle {
-
+		width: 104rpx;
 		font-size: 26rpx;
 		color: #333333;
-		margin-right: 10rpx;
+		margin-right: 20rpx;
+		text-align: right;
 	}
-	.topTitle2{
+	
+
+	.leftItem {
 		font-size: 26rpx;
 		color: #333333;
-		margin-right: 40rpx;
-	}
-
-	.leftItem {
-		flex-grow: 1;
+		margin-right: 20rpx;
+		flex-grow: 1;
+		/* 隐藏文字显示 ...不换行 */
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
 	}
 
 	.itemContent {
-		padding: 20rpx;
+		padding: 20rpx;
+		padding-right: 0;
 		background-color: #FFFFFF;
 
 		display: flex;