Преглед изворни кода

供应商发货,增加倍数增长功能

zhengjinyi пре 5 година
родитељ
комит
bdbd5e895e

+ 1 - 1
components/cm-module/creatOrder/invoiceTent.vue

@@ -546,7 +546,7 @@
 			width: 702rpx;
 			padding: 24rpx 24rpx 65rpx 24rpx;
 			height: 920rpx;
-			border-radius: 40rpx 40rpx 0 0;
+			border-radius: 20rpx 20rpx 0 0;
 			background-color: #fff;
 			display: flex;
 			flex-wrap: wrap;

+ 1 - 1
components/cm-module/creatOrder/sellerFreight.vue

@@ -372,7 +372,7 @@
 			width: 702rpx;
 			padding: 24rpx 24rpx 36rpx 24rpx;
 			height: 400rpx;
-			border-radius: 40rpx 40rpx 0 0;
+			border-radius: 20rpx 20rpx 0 0;
 			background-color: #fff;
 			display: flex;
 			flex-wrap: wrap;

+ 1 - 1
components/cm-module/creatOrder/sellerInvoice.vue

@@ -546,7 +546,7 @@
 			width: 702rpx;
 			padding: 24rpx 24rpx 65rpx 24rpx;
 			height: 920rpx;
-			border-radius: 40rpx 40rpx 0 0;
+			border-radius: 20rpx 20rpx 0 0;
 			background-color: #fff;
 			display: flex;
 			flex-wrap: wrap;

+ 2 - 0
components/cm-module/listTemplate/immediatelyList.vue

@@ -287,6 +287,7 @@
 									isActFlg = false
 								}
 								let priceObj ={
+										step:priceList[i].step,
 										actStatus:priceList[i].actStatus,
 										costCheckFlag:priceList[i].costCheckFlag,
 										costPrice:priceList[i].costPrice,
@@ -301,6 +302,7 @@
 								}
 							}
 						});
+						
 					}
 					this.priceLoading = false;
 				}).catch(error =>{

+ 1 - 1
components/cm-module/orderDetails/supplierRecorgButton.vue

@@ -2,7 +2,7 @@
 	<view class="button-template">
 		<!-- 底部按钮 -->
 		<view class="button-content">
-			<view class="btn btn-color" v-if="hanldData.mailer == 1" @click.stop="btnConfirm('cancel',hanldData)">撤销发货</view>
+			<view class="btn btn-color" v-if="hanldData.mailer == '1'" @click.stop="btnConfirm('cancel',hanldData)">撤销发货</view>
 			<view class="btn btn-color" @click.stop="btnConfirm('add',hanldData)">添加物流</view>
 		</view>
 	</view>

+ 1 - 1
components/cm-module/popupGoods/popupGoods.vue

@@ -157,7 +157,7 @@
 		width: 702rpx;
 		padding: 24rpx 24rpx 10rpx 24rpx;
 		height: 236rpx;
-		border-radius: 30rpx 30rpx 0 0;
+		border-radius: 20rpx 20rpx 0 0;
 		background-color: #fff;
 		display: flex;
 		flex-wrap: wrap;

+ 3 - 1
pages.json

@@ -455,12 +455,14 @@
 				},{
 					"path": "pages/deliver/deliver-goods",
 					"style": {
-						"navigationBarTitleText": "发货"
+						"navigationBarTitleText": "发货",
+						"enablePullDownRefresh":true
 					}
 				},{
 					"path": "pages/deliver/deliver-record",
 					"style": {
 						"navigationBarTitleText": "发货记录",
+						"enablePullDownRefresh":true,
 						"navigationStyle":"custom"
 					}
 				},{

+ 2 - 2
pages/goods/product.vue

@@ -155,7 +155,7 @@
 			<view class="popup spec" :class="specClass"  @touchmove.stop.prevent="discard" @tap="hideSpec">
 				<!-- 遮罩层 -->
 				<view class="mask"></view>
-				<view class="layer" @tap.stop="discard" :style="{paddingBottom :isIphoneX ? '68rpx' : '36rpx',bottom:isIphoneX ?'-354rpx' : '-294rpx'}">
+				<view class="layer" @tap.stop="discard" :style="{paddingBottom :isIphoneX ? '68rpx' : '36rpx',bottom:isIphoneX ?'-352rpx' : '-296rpx'}">
 					<view class="content">
 						<view class="layer-smimg">
 							<image :src="product.mainImage" mode=""></image>
@@ -1217,7 +1217,7 @@
 			width: 702rpx;
 			padding: 24rpx 24rpx 36rpx 24rpx;
 			height: 260rpx;
-			border-radius: 30rpx 30rpx 0 0;
+			border-radius: 20rpx 20rpx 0 0;
 			background-color: #fff;
 			display: flex;
 			flex-wrap: wrap;

+ 3 - 2
pages/tabBar/home/home.vue

@@ -300,8 +300,9 @@
 				console.log(e.detail.query)
 			},
 			showTost(){
-				this.$api.navigateTo(`/supplier/pages/login/share-info?scene=scene`)
-				// this.$util.msg("正在开发中,敬请期待~",2000)
+				this.$util.msg("正在开发中,敬请期待~",2000)
+				// this.$api.navigateTo(`/supplier/pages/login/share-info?scene=scene`)
+				// this.$api.navigateTo(`/seller/pages/login/login`)
 				// uni.navigateToMiniProgram({
 				// 	appId: 'wx5a5cda32926f55ac',
 				// 	path: '/pages/tabBar/home/home',

+ 1 - 0
pages/tabBar/user/user.vue

@@ -408,6 +408,7 @@
 					margin-top: 17rpx;
 				}
 				.u-h1{
+					width: 300rpx;
 					float: left;
 					font-size: $font-size-34;
 					color: #FFFFFF;

+ 1 - 1
pages/user/regularPurchase/regularPurchase.vue

@@ -254,7 +254,7 @@
 			width: 702rpx;
 			padding: 24rpx 24rpx 36rpx 24rpx;
 			height: 236rpx;
-			border-radius: 30rpx 30rpx 0 0;
+			border-radius: 20rpx 20rpx 0 0;
 			background-color: #fff;
 			display: flex;
 			flex-wrap: wrap;

+ 3 - 3
seller/pages/cart/buyagain.vue

@@ -8,7 +8,7 @@
 		<view class="popup spec" :class="specClass"  @touchmove.stop.prevent="discard" @tap="hideSpec">
 			<!-- 遮罩层 -->
 			<view class="mask"></view>
-			<view class="layer" @tap.stop="discard" :style="{paddingBottom :isIphoneX ? '68rpx' : '36rpx',bottom:isIphoneX ?'-370rpx' : '-360rpx'}">
+			<view class="layer" @tap.stop="discard" :style="{paddingBottom :isIphoneX ? '68rpx' : '36rpx',bottom:isIphoneX ?'-352rpx' : '-320rpx'}">
 				<view class="content">
 					<view class="layer-smimg">
 						<image :src="handleData.mainImage" mode=""></image>
@@ -262,8 +262,8 @@
 			bottom: -294rpx;
 			width: 702rpx;
 			padding: 24rpx 24rpx 36rpx 24rpx;
-			height: 236rpx;
-			border-radius: 30rpx 30rpx 0 0;
+			height: 260rpx;
+			border-radius: 20rpx 20rpx 0 0;
 			background-color: #fff;
 			display: flex;
 			flex-wrap: wrap;

+ 16 - 3
seller/pages/cart/immediately.vue

@@ -122,6 +122,7 @@
 				productTotalAmount:0,
 				buyNumRangeShow:'',//起订量范围
 				buyPrice:'',//起订量范围价格
+				buyRetailPriceStep:1,
 			}
 		},
 		onLoad() {
@@ -158,6 +159,7 @@
 					this.number = data.minBuyNumber
 					this.minBuyNumber = data.minBuyNumber
 					this.buyRetailPrice = Number(data.price);
+					this.buyRetailPriceStep = data.step
 					this.specClass = 'show';
 					if(this.handleData.ladderPriceFlag == '1'){
 						querySearchProductLadderPrice({productId:this.handleData.pid}).then(response=>{
@@ -192,7 +194,11 @@
 				}, 200);
 			},
 			changeCountAdd(){//popup弹窗数量增加按钮
-				this.number++
+				if(this.buyRetailPriceStep == 2){
+					this.number += this.minBuyNumber
+				}else{
+					this.number++
+				}
 				this.calculatPerice()
 			},
 			changeCountSub(){//popup弹窗数量减按钮
@@ -202,7 +208,11 @@
 					this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000);
 					return
 				}else{
-					this.number--
+					if(this.buyRetailPriceStep == 2){
+						this.number-=this.minBuyNumber
+					}else{
+						this.number--
+					}
 					this.calculatPerice()
 					this.isQuantity =false
 				}
@@ -214,6 +224,9 @@
 				}else if(_value < this.minBuyNumber){	
 					this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000);
 					this.number = this.minBuyNumber
+				}else if( _value % this.minBuyNumber !=0 ){
+					this.$util.msg(`购买量必须为起订量的整数倍`,2000);
+					this.number = this.minBuyNumber
 				}else{
 					this.number = e.detail.value
 					this.calculatPerice()
@@ -455,7 +468,7 @@
 			width: 702rpx;
 			padding: 24rpx 24rpx 36rpx 24rpx;
 			// height: 236rpx;
-			border-radius: 30rpx 30rpx 0 0;
+			border-radius: 20rpx 20rpx 0 0;
 			background-color: #fff;
 			display: flex;
 			flex-wrap: wrap;

+ 2 - 2
services/ajax.env.js

@@ -2,10 +2,10 @@ let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
 	// URL_CONFIG = 'http://192.168.1.24:8008'	 //俊俊联调地址
-	URL_CONFIG = 'http://192.168.1.22:8008'	 //裴裴联调地址
+	// URL_CONFIG = 'http://192.168.1.22:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.1.26:8008'	 //超超联调地址
     // URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
-	// URL_CONFIG = 'https://spi.caimei365.com'
+	URL_CONFIG = 'https://spi.caimei365.com'
 }else{
     // 生产环境
     URL_CONFIG = 'https://spi.caimei365.com'

+ 34 - 3
supplier/pages/deliver/add-logistics.vue

@@ -178,6 +178,25 @@
 				}
 			},
 			isRepleAddLogisticsFn(){//重新添加物流信息
+				// 校验物流公司不能为空
+				let isLogisticsLabel = false
+				let isLogisticsNumber = false
+				this.logisticsList.forEach(el =>{
+					if(el.label == ''){
+						isLogisticsLabel = true
+					}
+					if(el.number == ''){
+						isLogisticsNumber = true
+					}
+				})
+				if(isLogisticsLabel){
+					this.$util.msg('请选择物流公司',2000);
+					return
+				}
+				if(isLogisticsNumber){
+					this.$util.msg('请输入物流单号',2000);
+					return
+				}
 				//统一处理物流单号
 				let logisticsArray = []
 				let checkRepeat = false
@@ -220,11 +239,22 @@
 				})
 			},
 			isNewAddLogisticsFn(){//第一次添加发货物流信息
-				if(this.logisticsList[0].label == ''){
+				// 校验物流公司不能为空
+				let isLogisticsLabel = false
+				let isLogisticsNumber = false
+				this.logisticsList.forEach(el =>{
+					if(el.label == ''){
+						isLogisticsLabel = true
+					}
+					if(el.number == ''){
+						isLogisticsNumber = true
+					}
+				})
+				if(isLogisticsLabel){
 					this.$util.msg('请选择物流公司',2000);
 					return
 				}
-				if(this.logisticsList[0].number == ''){
+				if(isLogisticsNumber){
 					this.$util.msg('请输入物流单号',2000);
 					return
 				}
@@ -251,6 +281,7 @@
 					return
 				}
 				//统一处理备注图片
+				this.info.image = ''
 				this.photoLists.forEach(el =>{
 					this.info.image += el+'##'
 				})
@@ -262,7 +293,7 @@
 				this.ShopService.ShopAddLogistics({params:JSON.stringify(params)}).then(response =>{
 					this.$util.msg('发货成功',2000,true,'success')
 					setTimeout(()=>{
-						this.$api.navigateTo(`/supplier/pages/deliver/deliver-record?shopOrderId=${this.info.shopOrderId}`)
+						this.$api.redirectTo(`/supplier/pages/deliver/deliver-record?shopOrderId=${this.info.shopOrderId}`)
 					},2000)
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);

+ 81 - 28
supplier/pages/deliver/deliver-goods.vue

@@ -1,6 +1,12 @@
 <template>
 	<view class="container cart clearfix"> 
-		<view class="container-cart-main">
+		<view class="record-content-empty" v-if="isEmpty" :style="{'height': windowHeight ? windowHeight - CustomBar+'px' : 'auto'}">
+			<view class="record-container clearfix">
+				<image class="club-empty-image" src="https://img.caimei365.com/group1/M00/03/B7/Cmis2178OfaAEjhLAABqsz9OXM0847.png" mode="aspectFit"></image>
+				<view class="txt">未发货商品已全部取消,无需再发货~</view>
+			</view>
+		</view>
+		<view class="container-cart-main" v-else>
 			<view class="container-cart">
 				<view class="cart-content" :style="{paddingBottom :isIphoneX ? '130rpx' : '100rpx'}">
 					<view class="goods-title">请选择合适的商品数量进行发货</view>
@@ -67,49 +73,60 @@
 	export default{
 		data(){
 			return{
+				isEmpty:false,
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				isIphoneX:this.$store.state.isIphoneX,
 				shopOrderId:'',
 				productsList:[],//发货的商品
 				isCheckAll:false,//是否全选
+				scrollHeight: '',
+				windowHeight: '',
 			}
 		},
 		onLoad(option){
-			console.log(option)
-			this.shopOrderId = option.shopOrderId
-			this.initShopOrderShipmentsInfo();
+	
 		},
 		computed: {
 			...mapState(['hasLogin','userInfo'])
 		},
 		methods:{
-			initShopOrderShipmentsInfo(){//初始化购物车 index:1
+			initShopOrderShipmentsInfo(){//初始化
 				this.ShopService.ShopOrderShipmentsInfo({ shopOrderId : this.shopOrderId }).then(response =>{
-					let orderProductList = response.data.orderProductList
-					let elObject = {}
-					let isReduceNum = false
-					let creatProductList = []
-					orderProductList.forEach(el =>{
-						let uninNum = el.notOutStore - el.actualCancelNum//未发货数量
-						if(uninNum == 1){
-							isReduceNum = true
-						}else{
-							isReduceNum = false
-						}
-						elObject = {
-							shipmentCount:uninNum,
-							isReduceNum:isReduceNum,
-							checked:false
-						}
-						creatProductList.push(Object.assign({},el,elObject))
-					})
-					this.productsList = creatProductList
-					console.log(this.productsList)
+					if( response.data.orderProductList.length>0){
+						let orderProductList = response.data.orderProductList
+						let elObject = {}
+						let isReduceNum = false
+						let creatProductList = []
+						this.isEmpty = false
+						orderProductList.forEach(el =>{
+							let uninNum = el.notOutStore - el.actualCancelNum//未发货数量
+							if(uninNum == 1){
+								isReduceNum = true
+							}else{
+								isReduceNum = false
+							}
+							elObject = {
+								shipmentCount:uninNum,
+								isReduceNum:isReduceNum,
+								checked:false
+							}
+							creatProductList.push(Object.assign({},el,elObject))
+						})
+						this.productsList = creatProductList
+						console.log(this.productsList)
+					}else{
+						this.isEmpty = true
+					}
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);
 				})
 				
 			},		
+			setScrollHeight() {
+				const {windowHeight, pixelRatio} = wx.getSystemInfoSync();
+				this.windowHeight = windowHeight - 1;
+				this.scrollHeight = windowHeight - 1;
+			},
 			ischeck(pro){//为未选中的时候改变为true,反之为true
 				pro.checked = !pro.checked;
 				this.updateCheckAllBtn();
@@ -181,11 +198,13 @@
 			},
 		},
 		onPullDownRefresh() {//下拉刷新
-			// this.initShopOrderShipmentsInfo()
-			// uni.stopPullDownRefresh()
+			this.initShopOrderShipmentsInfo()
+			uni.stopPullDownRefresh()
 		},
 		onShow(){
-			
+			this.shopOrderId = uni.getStorageSync('shopOrderId')
+			this.setScrollHeight()
+			this.initShopOrderShipmentsInfo();
 		},
 	}
 </script>
@@ -195,6 +214,40 @@
 		background: #f7f7f7;
 		height: auto;
 	}
+	.record-content-empty{
+		width: 100%;
+		height: 100%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		.record-container{
+			width: 465rpx;
+			height: auto;
+			image{
+				width: 400rpx;
+				height: 400rpx;
+				display: block;
+				margin: 0 auto;
+			}
+			.txt{
+				font-size: $font-size-28;
+				text-align: center;
+				color: #333;
+				line-height: 30rpx;
+				margin-bottom: 20rpx;
+			}
+			.btn{
+				width: 400rpx;
+				height: 80rpx;
+				background: $btn-confirm;
+				border-radius: 10rpx;
+				line-height: 80rpx;
+				font-size: $font-size-28;
+				text-align: center;
+				color: #FFFFFF;
+			}
+		}
+	}
 	.cart-content{
 		position: relative;
 	}

+ 1 - 1
supplier/pages/deliver/deliver-record.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="container record clearfix" :style="{paddingTop:CustomBar+'px'}"> 
 		<cd-custom :systeminfo='systeminfo' :navbar-data='nvabarData' :headerBtnPosi ="headerBtnPosi" :page='1' @pageDetails="hanldPageDetails"></cd-custom>
-		<view class="record-content-empty" v-if="isEmpty" :style="{'height': windowHeight ? windowHeight+'px' : 'auto'}">
+		<view class="record-content-empty" v-if="isEmpty" :style="{'height': windowHeight ? windowHeight - CustomBar+'px' : 'auto'}">
 			<view class="record-container clearfix">
 				<image class="club-empty-image" src="https://img.caimei365.com/group1/M00/03/B7/Cmis2178OfaAEjhLAABqsz9OXM0847.png" mode="aspectFit"></image>
 				<view class="txt">此订单暂无发货记录~</view>

+ 1 - 2
supplier/pages/login/bind-operator.vue

@@ -91,9 +91,8 @@
 		},
 		onLoad(option) {
 			this.shopOrderId = option.shopOrderId
-			console.log(this.shopOrderId);
+			// console.log(this.shopOrderId);
 			this.bind_supplierInfo = uni.getStorageSync('bind_supplierInfo');
-			console.log(this.bind_supplierInfo);
 			this.getVerificationCode()
 		},
 		methods:{

+ 4 - 4
supplier/pages/login/share-info.vue

@@ -16,7 +16,7 @@
 				invitationCode:'',
 				imagePath:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/06/%E6%97%A0%E6%9D%83%E9%99%90%402x.png',
 				serviceProviderId:'',
-				shopOrderId:16098,
+				shopOrderId:null,
 				source:1,
 				shareCode:'',
 				authority:'',//用户权限
@@ -24,9 +24,9 @@
 		},
 		onLoad(option) {
 			// scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene
-			if(option.scene == 'scene'){
-				this.shopOrderId = 16098
-				// this.shopOrderId = Number(decodeURIComponent(option.scene))
+			console.log(option);
+			if(option.scene){
+				this.shopOrderId = Number(decodeURIComponent(option.scene))
 			}else{
 				this.shopOrderId = option.shopOrderId
 				this.authority = option.authority

+ 6 - 3
supplier/pages/order/order-details.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="container details clearfix" :style="{paddingBottom :isIphoneX ? (130+68)+'rpx' : '130rpx'}">
+	<view class="details clearfix" :style="{paddingBottom :isIphoneX ? (130+68)+'rpx' : '130rpx'}">
 		<cu-custom :navbar-data='nvabarData'></cu-custom>
 		<view class="container-details" :style="{paddingTop:CustomBar+'px'}" v-show="isRequest">
 			<!-- 订单信息 -->
@@ -47,7 +47,7 @@
 							</view>	
 						</view>
 					</view>	
-					<view class="goods-pros-m" v-if="orderInfo.note!=null || orderInfo.note!=''">
+					<view class="goods-pros-m" v-show="orderInfo.note!=null">
 						<view class="m-text">留言:</view>
 						<view class="m-input">
 							<view class="text">{{orderInfo.note ? orderInfo.note : ''}}</view>
@@ -137,7 +137,8 @@
 						this.$api.navigateTo('/supplier/pages/deliver/deliver-record?shopOrderId='+this.shopOrderId)
 						break
 					case 'deliver':
-						this.$api.navigateTo('/supplier/pages/deliver/deliver-goods?shopOrderId='+this.shopOrderId)
+						this.$api.setStorage('shopOrderId',this.shopOrderId)
+						this.$api.navigateTo('/supplier/pages/deliver/deliver-goods')
 						break
 				}
 			},
@@ -232,6 +233,8 @@
 	}
 	.details{
 		padding-bottom: 130rpx;
+		width: 100%;
+		height: auto;
 	}
 	.container-details{
 		background:#F7F7F7;

+ 3 - 1
supplier/pages/order/order-service-details.vue

@@ -249,6 +249,8 @@
 	}
 	.details{
 		padding-bottom: 130rpx;
+		width: 100%;
+		height: auto;
 	}
 	.container-details{
 		background:#F7F7F7;
@@ -523,7 +525,7 @@
 			width: 702rpx;
 			padding: 24rpx 24rpx 36rpx 24rpx;
 			height: 236rpx;
-			border-radius: 30rpx 30rpx 0 0;
+			border-radius: 20rpx 20rpx 0 0;
 			background-color: #fff;
 			display: flex;
 			flex-wrap: wrap;