Selaa lähdekoodia

订单模块修改问题

zhengjinyi 3 vuotta sitten
vanhempi
commit
c7ddf0d374

+ 17 - 17
pages/login/bindwechat.vue

@@ -71,7 +71,7 @@
 <script>
 	import { mapState,mapMutations } from 'vuex'
 	import authorize from '@/common/config/authorize.js' 
-	import wxLogin from "@/common/config/wxLogin.js"
+	import wxLogin from '@/common/config/wxLogin.js'
 	export default{
 		data() {
 			return{
@@ -122,7 +122,7 @@
 					this.$util.msg('验证码格式不正确',2000)
 					return
 				}
-				this.isUserInfo = false;
+				this.isUserInfo = false
 				this.GetUserProfile()
 			},
 			GetUserProfile(){//获取用户微信个人信息
@@ -159,14 +159,14 @@
 					}else{
 						switch(this.isLoginType){
 							case 9:
-								this.$api.navigateTo(`/pages/h5/activity/activity_mid`)
-								break;
+								this.$api.navigateTo('/pages/h5/activity/activity_mid')
+								break
 							case 8:
 								this.$api.navigateTo(`/pages/goods/product?id=${this.isLoginProductId}`)
-								break;
+								break
 							case 7:
-								this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderID=${this.isLoginOrderId}`)
-								break;
+								this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderId=${this.isLoginOrderId}`)
+								break
 							default:
 								this.$api.switchTabTo('/pages/tabBar/user/user')
 						}
@@ -184,15 +184,15 @@
 			},
 			getMobileCodeFn(){//获取手机验证码
 				if( this.bindLinkPhone == ''){
-					this.$util.msg('请输入手机号',2000);
+					this.$util.msg('请输入手机号',2000)
 					return
 				}
 				if(!this.$reg.isMobile(this.bindLinkPhone)){
-					this.$util.msg('请输入正确的手机号',2000);
+					this.$util.msg('请输入正确的手机号',2000)
 					return
 				}
 				if( this.imageCode == ''){
-					this.$util.msg('请输入图形验证码',2000);
+					this.$util.msg('请输入图形验证码',2000)
 					return
 				}
 				let params = {
@@ -203,20 +203,20 @@
 						imgCode:this.imageCode,
 						token:this.imageCodetoken,
 				}
-				this.isMobileDisabled = true;
+				this.isMobileDisabled = true
 				this.PublicService.GetBindMobileCode(params)
 					.then(res =>{
-						const TIME_COUNT = 60;
+						const TIME_COUNT = 60
 						this.$util.msg('验证短信已发送',2000)
 				     	if (!this.codeTime) {
-				       		this.count = TIME_COUNT;
-							this.isMobileDisabled = true;
+				       		this.count = TIME_COUNT
+							this.isMobileDisabled = true
 				       		this.codeTime = setInterval(() => {
 				       			if (this.count > 1 && this.count <= TIME_COUNT) {
 				         			this.count--
 				         			this.mobileCodeText = this.count +'s重新发送'
 				        		} else {
-					         		this.isMobileDisabled = false;
+					         		this.isMobileDisabled = false
 					         		clearInterval(this.codeTime)
 					         		this.codeTime = null
 									this.mobileCodeText = '获取验证码'
@@ -226,12 +226,12 @@
 					})
 					.catch( error =>{
 						this.$util.msg(error.msg,2000)
-						this.isMobileDisabled = false;
+						this.isMobileDisabled = false
 					})
 			},
 			//关闭未授权用户授权提示弹窗
 			hideModel(){
-				this.isUserInfo = false;
+				this.isUserInfo = false
 			}
 		},
 		onShow() {

+ 15 - 15
pages/supplier/deliver/qualifications-add.vue

@@ -57,7 +57,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="qualifications-btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '0'}">
+		<view class="qualifications-btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '24rpx'}">
 			<view class="edit-button-canel" @click="editButtonCanel">暂不填写</view>
 			<view class="edit-button" @click="editButtonConfim">确定</view>
 		</view>
@@ -67,9 +67,9 @@
 <script>
 	import { mapState,mapMutations } from 'vuex'
 	import authorize from '@/common/config/authorize.js' 
-	import { uploadFileImage , uploadFilePdfDocDocx } from "@/services/public.js"
+	import { uploadFileImage , uploadFilePdfDocDocx } from '@/services/public.js'
 	
-	var isPreviewImg;
+	var isPreviewImg
 	export default{
 		data() {
 			return{
@@ -119,7 +119,7 @@
 					}
 				})
 				.catch(error =>{
-					this.$util.msg(error.msg,2000);
+					this.$util.msg(error.msg,2000)
 				})
 			},
 			GetSupplierLogisticsRecord(){//添加商品资质初始化查询商品信息
@@ -139,7 +139,7 @@
 					})
 				})
 				.catch(error =>{
-					this.$util.msg(error.msg,2000);
+					this.$util.msg(error.msg,2000)
 				})
 			},
 			editButtonConfim(){//确定
@@ -148,7 +148,7 @@
 				let isSnCode = false
 				let isFileList = false
 				let isImageList = false
-				let params = [];//参数
+				let params = []//参数
 				this.qualificationsList.forEach((el,index) => {
 					if(el.recordId == ''){ isRecordId = true }
 					if(el.sn == ''){ isSnCode = true }
@@ -163,15 +163,15 @@
 					params.push(paramsObject)	
 				})
 				if(isRecordId){
-					this.$util.msg('请选择商品',2000);
+					this.$util.msg('请选择商品',2000)
 					return
 				}
 				if(isSnCode){
-					this.$util.msg('请输入商品SN码',2000);
+					this.$util.msg('请输入商品SN码',2000)
 					return
 				}
 				if(isFileList && isImageList){
-					this.$util.msg('请上传商品资质文件',2000);
+					this.$util.msg('请上传商品资质文件',2000)
 					return
 				}
 				console.log('params========>',params)
@@ -187,7 +187,7 @@
 					},2000)
 				})
 				.catch(error =>{
-					this.$util.msg(error.msg,2000);
+					this.$util.msg(error.msg,2000)
 				})
 			},
 			bindPickerChange: function(item,e) {//选择筛选条件
@@ -201,12 +201,12 @@
 						sn:'',
 						fileList:[],
 						imageList:[]
-					};
+					}
 				this.qualificationsList.push(obj)
 			},
 			deleteLogistItemFn(item,index){
 				this.$util.modal('提示','确认删除物流信息吗?','确定','取消',true,() =>{
-					this.qualificationsList.splice(index, 1);
+					this.qualificationsList.splice(index, 1)
 				})
 			},
 			uploadFile(array){//上传资质文件
@@ -233,7 +233,7 @@
 					}
 				)
 				.then(res=>{
-					array.splice(index, 1);
+					array.splice(index, 1)
 				})
 				.catch(error =>{
 					console.log('删除文件异常提示===>',error.msg)
@@ -241,7 +241,7 @@
 				
 			},
 			deletePhotoFn(array,index){//删除图片
-				array.splice(index, 1);
+				array.splice(index, 1)
 			},
 			previewImg (image,index) {//顶部商品图片预览
 				isPreviewImg = true
@@ -254,7 +254,7 @@
 			},
 			hanldSnCodeChecked(e){
 				if(!this.$reg.isNoChinese(e.detail.value)){
-					this.$util.msg('SN码格式错误',2000);
+					this.$util.msg('SN码格式错误',2000)
 					return
 				}
 			},

+ 197 - 187
pages/supplier/deliver/qualifications-details.vue

@@ -1,241 +1,251 @@
 <template>
-	<view class="container qualifications" :style="{paddingBottom :isIphoneX ? (150+68)+'rpx' : '150rpx'}">
+	<view class="container qualifications" :style="{ paddingBottom: isIphoneX ? 150 + 68 + 'rpx' : '150rpx' }">
 		<view class="qualifications-content" v-if="!isEmpty">
-			<view class="list" v-for="(item,index) in qualificationsList" :key="index">
-				<view class="list-view-title">商品{{ index+1 }}</view>
+			<view class="list" v-for="(item, index) in qualificationsList" :key="index">
+				<view class="list-view-title">商品{{ index + 1 }}</view>
 				<view class="list-view">
-					<view class="list-view-label">商品</view>
-					<view class="list-view-text">{{ item.productName }}</view>
+					<view class="list-view-label">商品</view> <view class="list-view-text">{{ item.productName }}</view>
 				</view>
 				<view class="list-view">
-					<view class="list-view-label">SN码</view>
-					<view class="list-view-text">{{ item.sn }}</view>
+					<view class="list-view-label">SN码</view> <view class="list-view-text">{{ item.sn }}</view>
 				</view>
-				<view class="list-view" v-for="(file,fileIndex) in item.fileList" :key="fileIndex">
+				<view class="list-view" v-for="(file, fileIndex) in item.fileList" :key="fileIndex">
 					<view class="list-view-label">资质文件</view>
 					<view class="list-view-text">{{ file.fileName }}</view>
-				</view>	
+				</view>
 				<view class="list-view-title none">图片</view>
 				<view class="list-view-upload clearfix">
 					<view class="photo-item" v-for="(image, imageIndex) in item.imageList" :key="index">
-						<image :src="image" mode="aspectFill" @click.stop="previewImg(item.imageList,imageIndex)"></image>
+						<image
+							:src="image"
+							mode="aspectFill"
+							@click.stop="previewImg(item.imageList, imageIndex)"
+						></image>
 					</view>
 				</view>
 			</view>
-			<view class="qualifications-btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '0'}">
+			<view class="qualifications-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '24rpx' }">
 				<view class="edit-button" @click="editSubmitFn('edit')">编辑</view>
 			</view>
 		</view>
 		<view v-else class="cart-content empty">
-			<view  class="empty-container">
-				<image class="empty-container-image" src="https://static.caimei365.com/app/img/icon/icon-ques-empty@2x.png" mode="aspectFit"></image>
+			<view class="empty-container">
+				<image
+					class="empty-container-image"
+					src="https://static.caimei365.com/app/img/icon/icon-ques-empty@2x.png"
+					mode="aspectFit"
+				></image>
 				<text class="error-text">暂无商品资质信息</text>
-				<view class="login-btn"  @click="editSubmitFn('add')">去补充</view>
+				<view class="login-btn" @click="editSubmitFn('add')">去补充</view>
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
-	import { mapState,mapMutations } from 'vuex'
-	import authorize from '@/common/config/authorize.js' 
-	var isPreviewImg;
-	export default{
-		data() {
-			return{
-				logisticsBatchId:0,
-				shopOrderId:0,
-				isIphoneX:this.$store.state.isIphoneX,
-				isEmpty:false,
-				qualificationsList:[]
-			}
-		},
-		onLoad(option) {
-			this.shopOrderId = option.shopOrderId
-			this.logisticsBatchId = option.logisticsBatchId
-			console.log('shopOrderId',this.shopOrderId)
-			this.GetSupplierQualificationData(option.logisticsBatchId)
-		},
-		methods:{
-			...mapMutations(['login']),
-			GetSupplierQualificationData(logisticsBatchId){
-				this.ShopService.GetSupplierQualificationData(
-					{ 
-						logisticsBatchId : logisticsBatchId ,
-					}
-				)
-				.then(response =>{
+import { mapState, mapMutations } from 'vuex'
+import authorize from '@/common/config/authorize.js'
+var isPreviewImg
+export default {
+	data() {
+		return {
+			logisticsBatchId: 0,
+			shopOrderId: 0,
+			isIphoneX: this.$store.state.isIphoneX,
+			isEmpty: false,
+			qualificationsList: []
+		}
+	},
+	onLoad(option) {
+		this.shopOrderId = option.shopOrderId
+		this.logisticsBatchId = option.logisticsBatchId
+		console.log('shopOrderId', this.shopOrderId)
+		this.GetSupplierQualificationData(option.logisticsBatchId)
+	},
+	methods: {
+		...mapMutations(['login']),
+		GetSupplierQualificationData(logisticsBatchId) {
+			this.ShopService.GetSupplierQualificationData({
+				logisticsBatchId: logisticsBatchId
+			})
+				.then(response => {
 					const data = response.data
-					if(data && data.length > 0){
+					if (data && data.length > 0) {
 						this.qualificationsList = data
 						this.isEmpty = false
-					}else{
+					} else {
 						this.isEmpty = true
 					}
 				})
-				.catch(error =>{
-					this.$util.msg(error.msg,2000);
-				})
-			},
-			editSubmitFn(type){
-				switch(type){
-					case 'edit':
-						this.$api.navigateTo(`/pages/supplier/deliver/qualifications-add?type=edit&logisticsBatchId=${this.logisticsBatchId}&shopOrderId=${this.shopOrderId}`)
-						break;
-					case 'add':
-						this.$api.navigateTo(`/pages/supplier/deliver/qualifications-add?type=add&logisticsBatchId=${this.logisticsBatchId}&shopOrderId=${this.shopOrderId}`)
-						break;
-				}
-			},
-			previewImg (Array,index) {//顶部商品图片预览
-				console.log(Array)
-				isPreviewImg = true
-				let previewUrls = Array
-				uni.previewImage({
-					current: index, 	//图片索引
-					urls: previewUrls, //必须是http图片,本地图片无效
-					longPressActions:''
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
 				})
-			},
 		},
-		onShow() {
-			
+		editSubmitFn(type) {
+			switch (type) {
+				case 'edit':
+					this.$api.navigateTo(
+						`/pages/supplier/deliver/qualifications-add?type=edit&logisticsBatchId=${
+							this.logisticsBatchId
+						}&shopOrderId=${this.shopOrderId}`
+					)
+					break
+				case 'add':
+					this.$api.navigateTo(
+						`/pages/supplier/deliver/qualifications-add?type=add&logisticsBatchId=${
+							this.logisticsBatchId
+						}&shopOrderId=${this.shopOrderId}`
+					)
+					break
+			}
+		},
+		previewImg(Array, index) {
+			//顶部商品图片预览
+			console.log(Array)
+			isPreviewImg = true
+			let previewUrls = Array
+			uni.previewImage({
+				current: index, //图片索引
+				urls: previewUrls, //必须是http图片,本地图片无效
+				longPressActions: ''
+			})
 		}
-	}
+	},
+	onShow() {}
+}
 </script>
 
 <style lang="scss">
-	page {
-		height: auto;
-		background:#F7F7F7;
-	}
-	.qualifications-content{
+page {
+	height: auto;
+	background: #f7f7f7;
+}
+.qualifications-content {
+	width: 100%;
+	height: auto;
+	.list {
 		width: 100%;
 		height: auto;
-		.list{
+		background-color: #ffffff;
+		box-sizing: border-box;
+		margin-bottom: 20rpx;
+		padding: 0 24rpx;
+		.list-view-title {
 			width: 100%;
-			height: auto;
-			background-color: #FFFFFF;
-			box-sizing: border-box;
-			margin-bottom: 20rpx;
-			padding: 0 24rpx;
-			.list-view-title{
-				width: 100%;
-				height: 92rpx;
-				border-bottom: 1px solid #E1E1E1;
-				line-height: 92rpx;
-				font-size: $font-size-30;
+			height: 92rpx;
+			border-bottom: 1px solid #e1e1e1;
+			line-height: 92rpx;
+			font-size: $font-size-30;
+			color: #333333;
+			text-align: left;
+			&.none {
+				border-bottom: none;
+				color: #666666;
+			}
+		}
+		.list-view {
+			width: 100%;
+			height: 92rpx;
+			border-bottom: 1px solid #e1e1e1;
+			line-height: 92rpx;
+			font-size: $font-size-30;
+			.list-view-label {
+				width: 192rpx;
+				color: #666666;
+				float: left;
+			}
+			.list-view-text {
+				width: 510rpx;
 				color: #333333;
-				text-align: left;
-				&.none{
-					border-bottom: none;
-					color: #666666;
-				}
+				text-overflow: ellipsis;
+				overflow: hidden;
+				display: -webkit-box;
+				-webkit-line-clamp: 1;
+				line-clamp: 1;
+				-webkit-box-orient: vertical;
+				float: right;
 			}
-			.list-view{
-				width: 100%;
-				height: 92rpx;
-				border-bottom: 1px solid #E1E1E1;
-				line-height: 92rpx;
-				font-size: $font-size-30;
-				.list-view-label{
-					width: 192rpx;
-					color: #666666;
-					float: left;
+		}
+		.list-view-upload {
+			width: 100%;
+			height: auto;
+			padding: 10rpx 0;
+			.photo-item {
+				display: inline-block;
+				width: 112rpx;
+				height: 112rpx;
+				margin: 10rpx 0;
+				margin-right: 25rpx;
+				border-radius: 10rpx;
+				border: 1px solid #f5f5f5;
+				position: relative;
+				float: left;
+				&.add {
+					width: 112rpx;
+					height: 112rpx;
+					border-color: #ffc684;
+					text-align: center;
+					line-height: 112rpx;
+					margin-right: 0rpx;
+					.icon-jiahao {
+						font-size: $font-size-44;
+						color: #ffc684;
+						font-weight: bold;
+					}
 				}
-				.list-view-text{
-					width: 510rpx;
-					color: #333333;
-					text-overflow: ellipsis;
-					overflow: hidden;
-					display: -webkit-box;
-					-webkit-line-clamp: 1;
-					line-clamp: 1;
-					-webkit-box-orient: vertical;
-					float: right;
+				.icon-iconfontguanbi {
+					width: 30rpx;
+					height: 30rpx;
+					border-radius: 50%;
+					display: block;
+					position: absolute;
+					right: -10rpx;
+					top: -10rpx;
+					background: #f94b4b;
+					text-align: center;
+					line-height: 30rpx;
+					color: #ffffff;
+					font-size: $font-size-22;
 				}
-			}
-			.list-view-upload{
-				width: 100%;
-				height: auto;	
-				padding: 10rpx 0;
-				.photo-item{
-					display: inline-block;
+				image {
 					width: 112rpx;
 					height: 112rpx;
-					margin: 10rpx 0;
-					margin-right: 25rpx;
 					border-radius: 10rpx;
-					border:1px solid #F5F5F5;
-					position: relative;
-					float: left;
-					&.add{
-						width: 112rpx;
-						height: 112rpx;
-						border-color: #FFC684;
-						text-align: center;
-						line-height: 112rpx;
-						margin-right: 0rpx;
-						.icon-jiahao{
-							font-size: $font-size-44;
-							color:#FFC684 ;
-							font-weight: bold;
-						}
-					}
-					.icon-iconfontguanbi{
-						width: 30rpx;
-						height: 30rpx;
-						border-radius:50%;
-						display: block;
-						position: absolute;
-						right: -10rpx;
-						top: -10rpx;
-						background: #f94b4b;
-						text-align: center;
-						line-height: 30rpx;
-						color: #FFFFFF;
-						font-size: $font-size-22;
-					}
-					image{
-						width: 112rpx;
-						height: 112rpx;
-						border-radius: 10rpx;
-					}
-				}	
-				.photo-list{
-					width: 100%;
-					height: 116rpx;
-					overflow: hidden;
-					white-space: nowrap;
-					display: flex;
-					align-items: flex-start;
-				}
-				.scoll-wrapper{
-					display:flex;
-					align-items: flex-start;
 				}
 			}
+			.photo-list {
+				width: 100%;
+				height: 116rpx;
+				overflow: hidden;
+				white-space: nowrap;
+				display: flex;
+				align-items: flex-start;
+			}
+			.scoll-wrapper {
+				display: flex;
+				align-items: flex-start;
+			}
 		}
-		.qualifications-btn{
-			width: 100%;
+	}
+	.qualifications-btn {
+		width: 100%;
+		height: 90rpx;
+		padding-top: 60rpx;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		background-color: #ffffff;
+		.edit-button {
+			width: 600rpx;
 			height: 90rpx;
-			padding-top: 60rpx;
-			position: fixed;
-			bottom: 0;
-			left: 0;
-			background-color: #FFFFFF;
-			.edit-button{
-				width: 600rpx;
-				height: 90rpx;
-				background: $btn-confirm;
-				line-height: 90rpx;
-				text-align: center;
-				color: #FFFFFF;
-				font-size: 30rpx;
-				margin: 0 auto;
-				border-radius: 45rpx;
-			}
+			background: $btn-confirm;
+			line-height: 90rpx;
+			text-align: center;
+			color: #ffffff;
+			font-size: 30rpx;
+			margin: 0 auto;
+			border-radius: 45rpx;
 		}
 	}
-	
+}
 </style>