lilei 10 ماه پیش
والد
کامیت
4488079207
3فایلهای تغییر یافته به همراه89 افزوده شده و 55 حذف شده
  1. 45 38
      pagesB/coupon.vue
  2. 39 15
      pagesB/procureOrder.vue
  3. 5 2
      pagesB/promoDetail.vue

+ 45 - 38
pagesB/coupon.vue

@@ -12,11 +12,12 @@
 							class="check-order-list" 
 							v-for="(item,index) in list" 
 							:key="item.id" 
+							:class="'imgbg-'+current"
 							>
 								<view>
 									<view class="dio dio-left"></view>
 									<view class="dio dio-right"></view>
-									<view class="check-order-left" :class="'imgbg-'+current">
+									<view class="check-order-left">
 										¥<text>{{item.ticketValue}}</text>
 									</view>
 									<view class="check-order-right">
@@ -27,15 +28,15 @@
 											<view>{{item.validEndDate}} 到期 </view>
 											<!-- <view class="use-date" v-if="current==1">使用时间:2021-12-31</view> -->
 										</view>
-									</view>
-								</view>
-								<view v-if="item.ticketExplain">
-									<view class="check-order-desc" :class="'border-'+current" @click="showDesc(item)">
-										<text>使用说明:</text>
-										<u-icon :name="item.showDesc?'arrow-up':'arrow-down'"></u-icon>
-									</view>
-									<view class="check-order-desc-content" v-if="item.showDesc">
-										 {{item.ticketExplain}}
+										<view v-if="item.ticketExplain">
+											<view class="check-order-desc" :class="'border-'+current" @click="showDesc(item)">
+												<text>使用说明:</text>
+												<u-icon :name="item.showDesc?'arrow-up':'arrow-down'"></u-icon>
+											</view>
+											<view class="check-order-desc-content" v-if="item.showDesc">
+												 {{item.ticketExplain}}
+											</view>
+										</view>
 									</view>
 								</view>
 							 </view>
@@ -201,12 +202,37 @@
 			.check-list{
 				height: calc(100vh - 44px);
 			}
+			.imgbg-0{
+				background: #fde2da;
+				.check-order-left{
+					color: #f44336;
+				}
+				.check-order-right{
+					border-left: 1rpx dashed #ff7d73;
+				}
+			}
+			.imgbg-1{
+				background: #dbf5ce;
+				.check-order-left{
+					color: #4CAF50;
+				}
+				.check-order-right{
+					border-left: 1rpx dashed #4CAF50;
+				}
+			}
+			.imgbg-2{
+				background: #e2e2e2;
+				.check-order-left{
+					color: #9E9E9E;
+				}
+				.check-order-right{
+					border-left: 1rpx dashed #9E9E9E;
+				}
+			}
 			.check-order-list{
-				background: #ffffff;
 				margin: 25upx;
 				border-radius: 30upx;
 				overflow: hidden;
-				box-shadow: 1px 1px 3px #EEEEEE;
 				> view{
 					&:first-child{
 						position: relative;
@@ -225,15 +251,16 @@
 				}
 				.dio-left{
 					left: -15rpx;
-					top: 85rpx;
+					top: 50%;
+					margin-top: -15rpx;
 				}
 				.dio-right{
 					right: -15rpx;
-					top: 85rpx;
+					top: 50%;
+					margin-top: -15rpx;
 				}
 				.check-order-left{
 					width: 30%;
-					height: 200rpx;
 					display: flex;
 					align-items: center;
 					justify-content:center;
@@ -241,21 +268,11 @@
 					text{
 						font-size: 65rpx;
 					}
-					color: #fff;
-				}
-				.imgbg-0{
-					background: #2196F3;
-				}
-				.imgbg-1{
-					background: #4CAF50;
-					color: #ffffff;
-				}
-				.imgbg-2{
-					background: #d2d1d1;
 				}
 				.check-order-right{
 					width: 70%;
-					padding: 0 25rpx;
+					padding: 25rpx;
+					background-color: #fff;
 					.check-order-title{
 						font-size: 32rpx;
 					}
@@ -275,20 +292,10 @@
 				.check-order-desc{
 					font-size: 24rpx;
 					color: #666;
-					padding: 10rpx 20rpx;
-					border-top: 1rpx solid #2196F3;
+					padding: 10rpx 0 0;
 					display: flex;
 					justify-content: space-between;
 				}
-				.border-0{
-					border-top: 1rpx solid #eee;
-				}
-				.border-1{
-					border-top: 1rpx solid #CDDC39;
-				}
-				.border-2{
-					border-top: 1rpx solid #d2d1d1;
-				}
 				.check-order-desc-content{
 					padding: 5rpx 25rpx 25rpx 25rpx;
 					font-size: 24rpx;

+ 39 - 15
pagesB/procureOrder.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="orderDetail-digitalShel flex flex_column">
-		<view class="contHead" :style="{background:state!= 'CLOSE' ? '#066cff':'#ff5500',color:'#fff'}">
+		<view class="contHead" :style="{background:state!= 'error'&&state!= 'AUDIT_REJECT' ? '#066cff':'#ff5500',color:'#fff'}">
 			<view class="statusH">
 				<view class="flex flex_column align_center">
 					<view class="status-row">
@@ -24,7 +24,7 @@
 				</view>
 				<view v-for="item in partList" :key="item.id" class="flex align-center item-list">
 					<view style="height: 150rpx;">
-						<u-image :src="item.product.images" border-radius="16" width="200" height="150" bg-color="#EBEBEB" ></u-image>
+						<u-image :src="item.product.images+'?x-oss-process=image/resize,p_50'" border-radius="16" width="200" height="150" bg-color="#EBEBEB" ></u-image>
 						<view class="back-price" v-if="item.giveAmount">返<text>{{item.giveAmount}}</text>元</view>
 					</view>
 					<view>
@@ -42,6 +42,10 @@
 						</view>
 					</view>
 				</view>
+				<!-- 分页 -->
+				<view class="product-pages" v-if="totalPages>1">
+					<uni-pages-nav :totalPages="totalPages" :showShadow="false" :currentPage="pageNo" @pagechanged="getRow"></uni-pages-nav>
+				</view>
 			</view>
 			<view class="info" v-if="info">
 				<view class="infoList" v-if="state=='FINISH'">
@@ -87,32 +91,37 @@
 			   statusIcon: '', // 结算状态icon
 			   statusMessage: '请耐心等待汽配经销商进行配送',
 			   partList: [], // 配件列表
-			   state: 'success'
+			   state: 'success',
+			   pageNo:1,
+			   pageSize: 30,
+			   total: 0,
+			   purchaseSn: null
 		   }
 	   },
 	   onLoad(option) { 
+		   uni.setNavigationBarTitle({
+		   	title: '采购订单详情'
+		   })
 		   // 从采购单列表来
 		  if(option.purchaseSn){
 			  this.state = option.state
-			  uni.setNavigationBarTitle({
-			  	title: '采购订单详情'
-			  })
+			  this.purchaseSn = option.purchaseSn
 			  const stateText = {'WAIT_AUDIT':'待审核','AUDIT_REJECT':'审核不通过','WAIT_OUT_WAREHOUSE':'待收货','FINISH':'已完结'}
 			  this.statusText = stateText[option.state]
 			  this.statusIcon = option.state == 'FINISH' ? 'checkmark-circle' : 'hourglass'
 			  this.info = this.$store.state.vuex_tempData
 			  this.statusMessage = option.state == 'FINISH' || option.state == 'AUDIT_REJECT' ? '' : '请耐心等待汽配经销商进行配送'
 			  // 获取明细
-			  this.getDetailList(option.purchaseSn)
+			  this.getDetailList()
 		  }else{
 			  const data = this.$store.state.vuex_tempData
 			  if(data){
 				  this.info = data
-				  this.partList = data.detailList||[]
+				  this.state = data.billStatus
+				  this.purchaseSn = data.purchaseSn
+				  // 获取明细
+				  this.getDetailList()
 			  }
-			  uni.setNavigationBarTitle({
-			  	title: ''
-			  })
 			  this.statusText = '提交成功'
 			  this.statusIcon = 'checkmark-circle'
 		  } 
@@ -133,18 +142,33 @@
 				   ret += item.qty
 			   })
 			   return ret
+		   },
+		   totalPages(){
+			   return Math.ceil(this.total / this.pageSize)
 		   }
 	   },
 	   methods: {
-		 getDetailList(sn){
+		 getRow(pageNo){
+			this.pageNo = pageNo
+			this.getDetailList()
+		 },
+		 getDetailList(){
 		   uni.showLoading({
 		   	title: '加载中'
 		   })
-		   purchaseQueryDetailPage({purchaseSn: sn,pageNo:1,pageSize:9000}).then(res => {
-				uni.hideLoading()
+		   purchaseQueryDetailPage({purchaseSn: this.purchaseSn,pageNo:this.pageNo,pageSize:this.pageSize}).then(res => {
 				if(res.status == 200){
-					this.partList = res.data ? res.data.list : []
+					this.partList = res.data ? res.data.list : [],
+					this.total = res.data ? res.data.count : 0
 				}
+				// 滚动到顶部
+				this.$nextTick(()=>{
+					uni.pageScrollTo({
+						scrollTop: 0,
+						duration: 300
+					});
+					uni.hideLoading()
+				})
 		   }) 
 		 },
 		 message(title){

+ 5 - 2
pagesB/promoDetail.vue

@@ -294,9 +294,8 @@
 				this.showChoosePopu=false
 				if(this.submitOk){
 					uni.hideLoading()
-					const item = this.$store.state.vuex_tempData
 					uni.navigateTo({
-						url: "/pagesB/procureOrder?purchaseSn="+item.purchaseSn+"&state="+item.billStatus
+						url: "/pagesB/procureOrder"
 					})
 				}
 			},
@@ -612,6 +611,8 @@
 							flex-grow: 1;
 							.product-name{
 								font-size: 28rpx;
+								font-weight: 900;
+								color: #666;
 							}
 							.product-guige{
 								margin: 10rpx 0 20rpx 0;
@@ -796,6 +797,8 @@
 					}
 					.choose-product-item-left-info-name{
 						font-size: 28rpx;
+						font-weight: 900;
+						color: #666;
 					}
 					.choose-product-item-left-info-guige{
 						color: #2196F3;