lilei 9 ヶ月 前
コミット
389cd8661f

+ 1 - 1
pages/index/index.vue

@@ -932,7 +932,7 @@
 		background-color: #ffffff;
 	}
 	.bg-0{
-		background-image: linear-gradient(#86defa 0%,#cdeff9 25%,#ffffff 40%);
+		background-image: linear-gradient(#86defa 0%, #ffffff 15%);
 	}
 	.bg-1{
 		background-image: linear-gradient(#066cff 10%, #80b1fd 30%, #f8f8f8 50%);

+ 14 - 13
pagesB/cart/index.vue

@@ -74,7 +74,7 @@
 							</view> -->
 							<view class="cart-footer-right-button">
 								<button class="btns" :loading="loading" v-if="!editFlag" type="warn" size="mini" @click="settlement">去结算({{totalNum}})</button>
-								<button v-else class="btns" type="warn" plain size="mini" @click="batchRemove">删除</button>
+								<button v-else class="btns" type="warn" plain size="mini" @click="batchRemove">删除({{totalNum}})</button>
 							</view>
 						</view>
 					</view>
@@ -253,7 +253,7 @@
 				if(this.editFlag){
 					this.allChecked = this.list.every(key => key.every(item => item.checked))
 				}else{
-					this.allChecked = this.list.every(key => key.every(item => item.checked && (item.status==1||item.dealerScopeFlag==1)))
+					this.allChecked = this.list.every(key => key.filter(item => item.status==1&&item.dealerScopeFlag==1 ).every(item => item.checked))
 				}
 			},
 			// 编辑
@@ -297,11 +297,17 @@
 				}
 				this.allChecked = !this.allChecked
 				this.list.forEach(key => {
-					key.forEach(item => {
-						if(item.status == 1 || item.dealerScopeFlag == 1){
+					// 编辑模式
+					if(!this.editFlag){
+						key.filter(item=>item.status == 1 && item.dealerScopeFlag == 1).forEach(item => {
 							item.checked = this.allChecked
-						}
-					})
+						})
+					}else{
+						// 非编辑模式
+						key.forEach(item => {
+							item.checked = this.allChecked
+						})
+					}
 				})
 				// 合计
 				this.getChooseHeji()
@@ -367,14 +373,9 @@
 						 })
 						 // 合计,批量操作
 						 if(isBatch){
-							 // 如果全选
-							 if(_this.allChecked){
-								 _this.list = []
-								 _this.allChecked = false
-							 }
 							 _this.getChooseHeji()
 							 // 判断是否全选
-							 this.isAllChecked()
+							 _this.isAllChecked()
 						 }
 					 }
 					 uni.hideLoading()
@@ -438,7 +439,7 @@
 				this.submitForm(detailList,cartSn)
 			},
 			// 确认提交
-			submitForm(){
+			submitForm(detailList,cartSn){
 				uni.showLoading({
 					title: '提交中...',
 					mask: true

+ 1 - 1
pagesB/cart/productitem.vue

@@ -72,7 +72,7 @@
 				this.$emit('remove', [cartSn], false)
 			},
 			checkItem(item){
-				if(item.edit || (item.status==1||item.dealerScopeFlag==1)){
+				if(item.edit || (item.status==1&&item.dealerScopeFlag==1)){
 					this.$emit('check',item.cartSn)
 				}
 			}

+ 3 - 3
pagesB/procureOrder.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="orderDetail-digitalShel flex flex_column">
-		<view class="contHead" :style="{background:state!= 'error'&&state!= 'AUDIT_REJECT'&&state!='CANCEL' ? '#066cff':'#ff5500',color:'#fff'}">
+		<view class="contHead" :style="{background:state!= 'error'&&state!= 'AUDIT_REJECT'&&state!='CANCEL' ? '#066cff':'#f34503',color:'#fff'}">
 			<view class="statusH">
 				<view class="flex flex_column align_center">
 					<view class="status-row">
@@ -110,7 +110,7 @@
 			  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.statusMessage = option.state == 'FINISH' || option.state == 'AUDIT_REJECT' || option.state == 'CANCEL' ? '' : '请耐心等待汽配经销商进行配送'
 			  // 获取明细
 			  this.getDetailList()
 		  }else{
@@ -129,7 +129,7 @@
 		  // 更改标题栏背景色
 		  uni.setNavigationBarColor({
 		  	frontColor: '#ffffff',
-		  	backgroundColor: this.state!= 'error'&&this.state!= 'AUDIT_REJECT'&&this.state!= 'CANCEL' ? '#066cff':'#ff5500',
+		  	backgroundColor: this.state!= 'error'&&this.state!= 'AUDIT_REJECT'&&this.state!= 'CANCEL' ? '#066cff':'#f34503',
 		  })
 	   },
 	   onUnload() {

+ 1 - 0
pagesB/procureOrderList.vue

@@ -31,6 +31,7 @@
 										 <span v-if="item.billStatus == 'AUDIT_REJECT'">审核不通过</span>
 										 <span v-if="item.billStatus == 'WAIT_OUT_WAREHOUSE' || item.billStatus == 'WAIT_RECEIVE'">待收货</span>
 										 <span v-if="item.billStatus == 'FINISH'">已完结</span>
+										 <span v-if="item.billStatus == 'CANCEL'">已取消</span>
 										 <u-button style="margin-left: 10px;" v-if="item.billStatus == 'WAIT_AUDIT'" size="mini" shape="circle" type="error" @click="cancelOrder(item)">取消订单</u-button>
 										 <u-button style="margin-left: 10px;" v-if="item.billStatus == 'WAIT_RECEIVE'" size="mini" shape="circle" type="primary" @click="receiveOrder(item)">确认收货</u-button>
 									 </view>

+ 17 - 6
pagesB/shopiing/productDetail.vue

@@ -17,10 +17,14 @@
 				<view :style="{height:statusBarHeight+'px'}"></view>
 				<u-swiper mode="number" :border-radius="0" bg-color="#000" img-mode="widthFix" :interval="3000" :height="450" :list="imgList"></u-swiper>
 				<view class="product-info-text">
-					<view class="product-info-text-title">{{detail.productName}} <view class="copyText" @click="copy(detail.product.origCode)">复制</view></view>
+					<view class="product-info-text-title">
+					{{detail.productName}} 
+					<view class="copyText" @click="copy(detail.product.origCode)">复制</view>
+					</view>
 					<view class="product-info-text-attr">
 						<view class="product-info-price flex align_center">
 							¥<text class="price-red">{{hasLogin ? detail.price : '***'}}</text>
+							<uni-tag style="margin-left: 10px;" size="mini" :circle="true" v-if="detail.status==0 || detail.dealerScopeFlag==0" :text="detail.status==0?'已下架':'已售罄'"></uni-tag>
 						</view>
 						<view class="product-info-nums">
 							<view class="share">
@@ -236,12 +240,19 @@
 			// 立即购买
 			toBuy(){
 				if(this.hasLogin){
-					// 打开数量选择弹框
-					if(!this.showPopu){
-						this.showPopu = true
+					if(this.detail.status==0 || this.detail.dealerScopeFlag==0){
+						uni.showToast({
+							title: '此商品已'+(this.detail.status==0?'下架':'售罄'),
+							icon: 'none'
+						})
 					}else{
-						// 提交
-						this.submitOrder()
+						// 打开数量选择弹框
+						if(!this.showPopu){
+							this.showPopu = true
+						}else{
+							// 提交
+							this.submitOrder()
+						}
 					}
 				}else{
 					uni.navigateTo({

+ 10 - 1
pagesB/shopiing/searchProduct.vue

@@ -78,6 +78,10 @@
 </template>
 
 <script>
+	import {
+	    mapState,
+	    mapMutations,
+	} from 'vuex'
 	import chooseProductItem from '@/pagesB/components/chooseProductItemSkline.vue'
 	import { getShopCategoryExt, getShopProductList } from '@/api/shop.js'
 	export default {
@@ -112,9 +116,14 @@
 			};
 		},
 		computed: {
+			...mapState(['hasLogin']),
 			historyList() {
 				return this.searchHistoryList.filter(item=>item.text!='').reverse().slice(0,this.expend?20:10)
-			}
+			},
+			// 登录用户信息
+			userInfo(){
+				return this.$store.state.vuex_userInfo
+			},
 		},
 		onLoad(opts) {
 			// 计算区域高度