XSLu08042 2 dní pred
rodič
commit
2b802ef3b3

+ 1 - 1
pages/home/index.vue

@@ -1025,7 +1025,7 @@
 		left: 0;
 		z-index: 1000;
 		transition: all 0.5s;
-		background-color: #2BC7B9;
+		background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
 
 		&.show-back {
 			// background: linear-gradient(135deg, #66b2ef 0%, #2BC7B9 100%);

+ 1 - 1
pages/shopping/prescribe.vue

@@ -451,7 +451,7 @@
 		justify-content: space-between;
 		.fixed-top-box{
 			width: 100%;
-			background: linear-gradient(135deg, #66b2ef 0%, #2BC7B9 100%);
+			background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
 			position: fixed;
 			top: 0;
 			left: 0;

+ 0 - 5
pages_company/couponDetails.vue

@@ -113,11 +113,6 @@ export default {
 	  this.CompanyUserInfo=uni.getStorageSync('CompanyUserInfo');
 	  this.user=uni.getStorageSync('userInfo');
   },
-  onHide() {
-  	wx.updateShareMenu({
-		isPrivateMessage: false
-	})
-  },
   methods: {
 	  sendpop(id){
 	  	this.sendCoupon(id)

+ 11 - 8
pages_company/order/confirmCompanyOrder.vue

@@ -88,6 +88,9 @@
 		},
 		//发送给朋友
 		onShareAppMessage(res) {
+			wx.updateShareMenu({
+				isPrivateMessage: true
+			})
 			return {
 				title: this.carts[0].productName,
 				path: '/pages_company/order/confirmOrder?orderKey='+this.orderKey,
@@ -95,14 +98,14 @@
 			}
 			
 		},
-		//分享到朋友圈
-		onShareTimeline(res) {
-			return {
-				title:this.carts[0].productName,
-				query:'orderKey='+this.orderKey,
-				imageUrl: this.carts[0].productImage //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
-			}
-		},
+		// //分享到朋友圈
+		// onShareTimeline(res) {
+		// 	return {
+		// 		title:this.carts[0].productName,
+		// 		query:'orderKey='+this.orderKey,
+		// 		imageUrl: this.carts[0].productImage //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+		// 	}
+		// },
 		methods: {
 			handleAgreement(){
 				this.isAgreement=!this.isAgreement

+ 3 - 0
pages_company/order/confirmOrder.vue

@@ -92,6 +92,9 @@
 			this.orderKey=option.orderKey;
 		},
 		onShow() {
+			wx.updateShareMenu({
+				isPrivateMessage: true
+			})
 			if(this.utils.isLogin()){
 				this.getOrderCount();
 			}

+ 1 - 1
pages_company/storeOrderDetail.vue

@@ -373,7 +373,7 @@
 <style lang="scss">
 	.fixed-top-box{
 		width: 100%;
-		background: linear-gradient(135deg, #66b2ef 0%, #2BC7B9 100%);
+		background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
 		position: fixed;
 		top: 0;
 		left: 0;

+ 0 - 5
pages_company/storeProductPackageDetails.vue

@@ -177,11 +177,6 @@
 			}
 			this.getStoreProductPackageDetails();
 		},
-		onHide() {
-			wx.updateShareMenu({
-				isPrivateMessage: false
-			})
-		},
 		methods: {
 			getOrderCount(){
 				getOrderCount().then(

+ 205 - 138
pages_user/user/refundOrder.vue

@@ -3,7 +3,7 @@
 		<view class="inner">
 			<!-- 药品列表 -->
 			<view class="drug-list">
-				<view  class="item">
+				<view class="item">
 					<!-- 药品信息 -->
 					<!-- <view v-if="order!=null&&order.isPackage!=1" class="drug-info" v-for="(item,index) in items" :key="index"> -->
 					<view class="drug-info" v-for="(item,index) in items" :key="index">
@@ -24,18 +24,18 @@
 							</view>
 						</view>
 					</view>
-					<view  v-if="order!=null&&order.isPackage==1&&order.packageJson!=null"   class="drug-info">
+					<view v-if="order!=null&&order.isPackage==1&&packageJson!=null" class="drug-info">
 						<view class="img-box">
-							<image :src="JSON.parse(order.packageJson).imgUrl" mode="aspectFit"></image>
+							<image :src="packageJson.imgUrl" mode="aspectFit"></image>
 						</view>
 						<view class="info">
 							<view class="top">
 								<view class="title ellipsis2">
-									<view class="tag">套餐</view>{{JSON.parse(order.packageJson).title}}
+									<view class="tag">套餐</view>{{packageJson.title}}
 								</view>
-								<view class="spec">{{JSON.parse(order.packageJson).descs}}</view>
+								<view class="spec">{{packageJson.descs}}</view>
 							</view>
-							 
+
 						</view>
 					</view>
 				</view>
@@ -44,12 +44,13 @@
 			<view class="reason-apply">
 				<view class="title-box">
 					<text class="label">退款金额</text>
-					 <input class="money" type="text" disabled v-model="refundAmount" placeholder="退款金额" placeholder-class="form-input" />
+					<input class="money" type="text" disabled v-model="refundAmount" placeholder="退款金额"
+						placeholder-class="form-input" />
 				</view>
 				<view class="title-box">
 					<text class="label">申请原因</text>
-					<picker @change="reasonsChange" :value="reasons"  range-key="dictLabel" :range="reasonsList">
-						<view class="chose-box"  >
+					<picker @change="reasonsChange" :value="reasons" range-key="dictLabel" :range="reasonsList">
+						<view class="chose-box">
 							<text class="text">{{reasons}}</text>
 							<image src="https://kntobs.jnmyunl.com/shop/images/arrow_gray.png" mode=""></image>
 						</view>
@@ -77,77 +78,88 @@
 					<text class="text">重庆市江北区建玛特商场5楼</text>
 				</view>
 			</view> -->
-			 <!-- 底部按钮 -->
-			 <view class="btn-box">
-			 	<view class="sub-btn" @click="submit()">申请售后</view>
-			 </view>
+			<!-- 底部按钮 -->
+			<view class="btn-box">
+				<view class="sub-btn" @click="submit()">申请售后</view>
+			</view>
 		</view>
-		
-	 
+
+
 	</view>
 </template>
 
 <script>
-	import {applyAfterSales,getMyStoreOrderItemByOrderId} from '@/api/storeAfterSales'
+	import {
+		applyAfterSales,
+		getMyStoreOrderItemByOrderId
+	} from '@/api/storeAfterSales'
 	export default {
-		 
+
 		data() {
 			return {
-				orderId:null,
-				order:null,
-				orderCode:null,
-				items:[],
-				type:null,
-				reasonsList:[],
-				reasons:"请选择",
-				explains:"",
+				packageJson:null,
+				orderId: null,
+				order: null,
+				orderCode: null,
+				items: [],
+				type: null,
+				reasonsList: [],
+				reasons: "请选择",
+				explains: "",
+				orderitems: null
 				// refundAmount:0.00,
 			}
 		},
 		onLoad(option) {
 			console.log(option);
-			this.type=option.type;
-			this.orderCode=option.orderCode;
-			this.items=uni.getStorageSync('refundItems')
-			console.log(uni.getStorageSync('refundItems'))
-			console.log(JSON.parse(this.items[0].jsonInfo));
-			this.reasonsList=this.utils.getDict("storeAfterSalesReasons");
-			this.orderId=option.orderId;
-			// this.getMyStoreOrderItemByOrderId()
+			this.type = option.type;
+			this.orderCode = option.orderCode;
+			this.items = uni.getStorageSync('refundItems')
+			const isPackage = option.isPackage || 0
+			this.reasonsList = this.utils.getDict("storeAfterSalesReasons");
+			this.orderId = option.orderId;
+			
+			if (isPackage == 1) {
+				this.getMyStoreOrderItemByOrderId()
+			}
 		},
-		computed:{
-			refundAmount(){
-				const counts = this.items.map(item=> {
-					return{
-						...item,
-						price:JSON.parse(item.jsonInfo).price*item.num
-						}
+		computed: {
+			refundAmount() {
+				if(this.order&&this.order.isPackage ==1) {
+					// return this.order.payMoney.toFixed(2)
+					if (this.order.isPayRemain == 0) {
+						return this.order.payMoney.toFixed(2)
+					} else {
+						return this.order.payPrice.toFixed(2)
 					}
-				);
-				const count = counts.reduce((accumulator, item) => accumulator + item.price, 0);
-				console.log(count)
-				return count
+				} else {
+					const counts = this.items.map(item => {
+						return {
+							...item,
+							price: JSON.parse(item.jsonInfo).price * item.num
+						}
+					});
+					const count = counts.reduce((accumulator, item) => accumulator + item.price, 0);
+					return count
+				}
 			}
 		},
 		methods: {
-			getMyStoreOrderItemByOrderId(){
-				var data={orderId:this.orderId};
+			getMyStoreOrderItemByOrderId() {
+				var data = {
+					orderId: this.orderId
+				};
 				getMyStoreOrderItemByOrderId(data).then(res => {
-					if(res.code==200){
-						this.order=res.order;
-						this.items=res.items;
-						if(this.order.isPayRemain==0){
-							this.refundAmount=this.order.payMoney.toFixed(2)
-						}
-						else{
-							this.refundAmount=this.order.payPrice.toFixed(2)
-						}
-					}else{
+					if (res.code == 200) {
+						this.order = res.order;
+						this.orderitems = res.items
+						this.packageJson = this.order&&this.order.isPackage ==1 ? JSON.parse(this.order.packageJson): null
+					} else {
 						uni.showToast({
-							icon:'none',
+							icon: 'none',
 							title: "请求失败",
 						});
-						 
+
 					}
 				});
 			},
@@ -155,49 +167,59 @@
 				console.log(e.detail.value)
 				this.reasons = this.reasonsList[e.detail.value].dictLabel
 			},
-			submit(){
-				if(this.reasons=="请选择"){
+			submit() {
+				if (this.reasons == "请选择") {
 					uni.showToast({
-						icon:'none',
+						icon: 'none',
 						title: '请选择原因'
 					});
 					return;
 				}
-				if(this.refundAmount<0){
+				if (this.refundAmount < 0) {
 					uni.showToast({
-						icon:'none',
+						icon: 'none',
 						title: '请输入退款金额'
 					});
 					return;
 				}
-				 
-				var productIds=this.items.map(item=>item.productId);
-				var nums=this.items.map(item=>item.num);
-				var products=[];
-				for(var i=0;i<productIds.length;i++){
-					var item={productId:productIds[i],num:nums[i]};
+				const items = this.order&&this.order.isPackage ==1 ? this.orderitems : this.items
+				var productIds = items.map(item => item.productId);
+				var nums = items.map(item => item.num);
+				var products = [];
+				for (var i = 0; i < productIds.length; i++) {
+					var item = {
+						productId: productIds[i],
+						num: nums[i]
+					};
 					products.push(item);
 				}
-				var data={refundAmount:this.refundAmount,orderCode:this.orderCode,serviceType:this.type,reasons:this.reasons,explains:this.explains,productList:products};
+				var data = {
+					refundAmount: this.refundAmount,
+					orderCode: this.orderCode,
+					serviceType: this.type,
+					reasons: this.reasons,
+					explains: this.explains,
+					productList: products
+				};
 				applyAfterSales(data).then(res => {
-					if(res.code==200){
-						 uni.showToast({
-						 	icon:'success',
-						 	title:'提交成功'
-						 });
-						 setTimeout(function() {
-							 uni.$emit('refreshOrder');
-							 uni.navigateBack({
-								 delta: 1
-							 })
-						 }, 500);
-						 
-					}else{
+					if (res.code == 200) {
 						uni.showToast({
-							icon:'none',
+							icon: 'success',
+							title: '提交成功'
+						});
+						setTimeout(function() {
+							uni.$emit('refreshOrder');
+							uni.navigateBack({
+								delta: 1
+							})
+						}, 500);
+
+					} else {
+						uni.showToast({
+							icon: 'none',
 							title: res.msg
 						});
-						 
+
 					}
 				});
 			},
@@ -206,43 +228,51 @@
 </script>
 
 <style lang="scss">
-	.content{
+	.content {
 		margin-bottom: 170upx;
-		.inner{
+
+		.inner {
 			padding: 20upx;
-			.drug-list{
-				.item{
+
+			.drug-list {
+				.item {
 					background: #FFFFFF;
 					border-radius: 16upx;
 					margin-bottom: 20upx;
 					padding: 0 30upx;
-					.drug-info{
+
+					.drug-info {
 						display: flex;
 						align-items: center;
 						padding: 30upx 0;
-						.img-box{
+
+						.img-box {
 							width: 160upx;
 							height: 160upx;
 							margin-right: 30upx;
-							image{
+
+							image {
 								width: 100%;
 								height: 100%;
 							}
 						}
-						.info{
+
+						.info {
 							width: calc(100% - 160upx);
 							height: 160upx;
 							display: flex;
 							flex-direction: column;
 							justify-content: space-between;
-							.top{
-								.title{
+
+							.top {
+								.title {
 									font-size: 28upx;
 									font-family: PingFang SC;
 									font-weight: 500;
 									color: #111111;
 									line-height: 1.4;
-									.tag{
+
+									.tag {
 										display: inline-block;
 										padding: 0 6upx;
 										height: 30upx;
@@ -258,7 +288,8 @@
 										margin-top: 7upx;
 									}
 								}
-								.spec{
+
+								.spec {
 									font-size: 24upx;
 									font-family: PingFang SC;
 									font-weight: 500;
@@ -267,14 +298,17 @@
 									margin-top: 14upx;
 								}
 							}
-							.price-num{
+
+							.price-num {
 								display: flex;
 								align-items: center;
 								justify-content: space-between;
-								.price-box{
+
+								.price-box {
 									display: flex;
 									align-items: flex-end;
-									.unit{
+
+									.unit {
 										font-size: 24upx;
 										font-family: PingFang SC;
 										font-weight: 500;
@@ -282,7 +316,8 @@
 										line-height: 1.2;
 										margin-right: 5upx;
 									}
-									.price{
+
+									.price {
 										font-size: 32upx;
 										font-family: PingFang SC;
 										font-weight: 500;
@@ -290,7 +325,8 @@
 										line-height: 1;
 									}
 								}
-								.num{
+
+								.num {
 									font-size: 24upx;
 									font-family: PingFang SC;
 									font-weight: bold;
@@ -299,52 +335,61 @@
 							}
 						}
 					}
-					 
+
 				}
 			}
-			.reason-apply{
+
+			.reason-apply {
 				margin-top: 20upx;
 				background: #FFFFFF;
 				border-radius: 16upx;
 				padding: 0 30upx;
-				.title-box{
+
+				.title-box {
 					height: 86upx;
 					display: flex;
 					align-items: center;
 					justify-content: space-between;
 					border-bottom: 1px solid #F0F0F0;
-					.label{
+
+					.label {
 						font-size: 30upx;
 						font-family: PingFang SC;
 						font-weight: bold;
 						color: #333333;
 					}
-					.money{
-						
+
+					.money {
+
 						font-size: 24upx;
 						font-family: PingFang SC;
 						font-weight: 500;
 						color: #999999;
 					}
-					.chose-box{
+
+					.chose-box {
 						display: flex;
 						align-items: center;
-						.text{
+
+						.text {
 							font-size: 24upx;
 							font-family: PingFang SC;
 							font-weight: 500;
 							color: #999999;
 						}
-						image{
+
+						image {
 							width: 14upx;
 							height: 24upx;
 							margin-left: 10upx;
 						}
 					}
 				}
-				.textarea-box{
+
+				.textarea-box {
 					padding: 30upx 0;
-					textarea{
+
+					textarea {
 						width: 100%;
 						box-sizing: border-box;
 						background: #F5F5F5;
@@ -355,7 +400,8 @@
 						font-weight: 500;
 						color: #111111;
 					}
-					.textarea-place{
+
+					.textarea-place {
 						font-size: 24upx;
 						font-family: PingFang SC;
 						font-weight: 500;
@@ -363,25 +409,29 @@
 					}
 				}
 			}
-			.return-method{
+
+			.return-method {
 				background: #FFFFFF;
 				border-radius: 16upx;
 				margin-top: 20upx;
 				padding: 0 30upx 40upx;
-				.title-box{
+
+				.title-box {
 					height: 86upx;
 					display: flex;
 					align-items: center;
 					justify-content: space-between;
 					border-bottom: 1px solid #F0F0F0;
-					.text{
+
+					.text {
 						font-size: 30upx;
 						font-family: PingFang SC;
 						font-weight: bold;
 						color: #333333;
 					}
 				}
-				.return-tips{
+
+				.return-tips {
 					margin-top: 30upx;
 					margin-bottom: 30upx;
 					height: 80upx;
@@ -390,50 +440,59 @@
 					padding: 0 20upx;
 					display: flex;
 					align-items: center;
-					.text{
+
+					.text {
 						font-size: 24upx;
 						font-family: PingFang SC;
 						font-weight: 500;
 						color: #EF8A07;
 					}
 				}
-				.info-item{
+
+				.info-item {
 					display: flex;
 					align-items: center;
 					justify-content: space-between;
 					margin-bottom: 40upx;
-					&:last-child{
+
+					&:last-child {
 						margin-bottom: 0;
 					}
-					.label{
+
+					.label {
 						font-size: 26upx;
 						font-family: PingFang SC;
 						font-weight: 500;
 						color: #666666;
 						line-height: 1;
 					}
-					.text{
+
+					.text {
 						font-size: 26upx;
 						font-family: PingFang SC;
 						font-weight: 500;
 						color: #111111;
 						line-height: 1;
 					}
-					.detail-box{
+
+					.detail-box {
 						display: flex;
 						align-items: center;
-						.price-box{
+
+						.price-box {
 							display: flex;
 							align-items: flex-end;
 							margin-right: 18upx;
-							.unit{
+
+							.unit {
 								font-size: 24upx;
 								font-family: PingFang SC;
 								font-weight: 500;
 								color: #111111;
 								line-height: 1.2;
 							}
-							.num{
+
+							.num {
 								font-size: 32upx;
 								font-family: PingFang SC;
 								font-weight: bold;
@@ -441,13 +500,15 @@
 								line-height: 1;
 							}
 						}
-						.det-text{
+
+						.det-text {
 							font-size: 26upx;
 							font-family: PingFang SC;
 							font-weight: 500;
 							color: #111111;
 						}
-						image{
+
+						image {
 							width: 14upx;
 							height: 24upx;
 							margin-left: 10upx;
@@ -456,16 +517,18 @@
 				}
 			}
 		}
-		 
-		.reson-box{
+
+		.reson-box {
 			padding: 0 10upx 60upx;
-			.reson-item{
+
+			.reson-item {
 				width: 100%;
 				height: 110upx;
 				display: flex;
 				align-items: center;
 				justify-content: space-between;
-				.title{
+
+				.title {
 					font-size: 30upx;
 					font-family: PingFang SC;
 					font-weight: 500;
@@ -474,13 +537,15 @@
 			}
 		}
 	}
-	.btn-box{
+
+	.btn-box {
 		height: 120upx;
 		padding: 0 30upx;
 		display: flex;
 		align-items: center;
 		justify-content: center;
-		.sub-btn{
+
+		.sub-btn {
 			width: 100%;
 			height: 88upx;
 			line-height: 88upx;
@@ -493,14 +558,16 @@
 			border-radius: 44upx;
 		}
 	}
-	input{
+
+	input {
 		text-align: right;
 	}
-	.form-input{
+
+	.form-input {
 		font-size: 30upx;
 		font-family: PingFang SC;
 		font-weight: 500;
 		color: #999999;
 		text-align: right;
 	}
-</style>
+</style>

+ 1 - 1
pages_user/user/refundOrderDetail.vue

@@ -274,7 +274,7 @@
 <style lang="scss">
 	.fixed-top-box{
 		width: 100%;
-		background: linear-gradient(135deg, #66b2ef 0%, #2BC7B9 100%);
+		background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
 		position: fixed;
 		top: 0;
 		left: 0;

+ 10 - 2
pages_user/user/refundOrderProduct.vue

@@ -80,7 +80,15 @@
 				item.checked=!item.checked;
 			},
 			submit(type){
-				var refundItems=this.items.filter(item => item.checked==true )
+				let refundItems=this.items.filter(item => item.checked==true )
+				if(this.order.isPackage==1) {
+					const item = {
+						...JSON.parse(this.order.packageJson),
+						payMoney:this.order.payMoney
+					}
+					
+					refundItems= [item]
+				}
 				if(refundItems.length==0){
 					uni.showToast({
 						icon:'none',
@@ -89,7 +97,7 @@
 					return;
 				}
 				uni.navigateTo({
-					url: '/pages_user/user/refundOrder?items='+JSON.stringify(refundItems)+"&type="+type+"&orderCode="+this.order.orderCode
+					url: '/pages_user/user/refundOrder?type='+type+"&orderCode="+this.order.orderCode+"&isPackage="+this.order.isPackage+'&orderId='+this.orderId
 				})
 				// uni.navigateTo({
 				// 	url: '/pages_user/user/refundOrder?type='+type+"&orderCode="+this.order.orderCode

+ 1 - 1
pages_user/user/storeOrderDetail.vue

@@ -485,7 +485,7 @@
 <style lang="scss">
 	.fixed-top-box{
 		width: 100%;
-		//background: linear-gradient(135deg, #66b2ef 0%, #2BC7B9 100%);
+		background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
 		position: fixed;
 		top: 0;
 		left: 0;

+ 1 - 1
store/index.js

@@ -23,7 +23,7 @@ export default new Vuex.Store({
 	imgpath: 'https://kntobs.jnmyunl.com',//惠选商城图片请求地址
 	// https://kntobs.jnmyunl.com/shop  惠选商城图片链接
 	logoname:'德信小站',
-	// appid:'wx1de020b57c05a990',//康年臻选
+	// appid:'wx1de020b57c05a990' //康年臻选
 	// appid:'wxd2edd379beb6581b',//康年惠选
 	appid:'wxd2892bb660356ecf',//其他
   },