XSLu08042 1 week geleden
bovenliggende
commit
2beaaa5f50

+ 316 - 0
assets/css/styles.scss

@@ -0,0 +1,316 @@
+// 字体
+@for $i from 20 through 100{
+    .fs#{$i} {
+			font-size: #{$i}rpx;
+    }
+}
+// 颜色
+@for $i from 0 through 9{
+    .color#{$i} {
+			color: #{$i}#{$i}#{$i};
+    }
+}
+// padding
+@for $i from 1 through 100{
+    .p#{$i} {
+			padding: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .ptb#{$i} {
+			padding-top: #{$i}rpx ;
+			padding-bottom: #{$i}rpx ;
+    }
+}
+@for $i from 1 through 100{
+    .plr#{$i} {
+			padding-left: #{$i}rpx;
+			padding-right: #{$i}rpx;
+    }
+}
+@for $i from 1 through 200{
+    .pt#{$i} {
+			padding-top: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .pl#{$i} {
+			padding-left: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .pr#{$i} {
+			padding-right: #{$i}rpx;
+    }
+}
+@for $i from 1 through 200{
+    .pb#{$i} {
+			padding-bottom: #{$i}rpx;
+    }
+}
+// margin
+@for $i from 1 through 100{
+    .m#{$i} {
+			margin: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .mtb#{$i} {
+			margin-top: #{$i}rpx ;
+			margin-bottom: #{$i}rpx ;
+    }
+}
+@for $i from 1 through 100{
+    .mlr#{$i} {
+			margin-left: #{$i}rpx;
+			margin-right: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .mt#{$i} {
+			margin-top: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .ml#{$i} {
+			margin-left: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .mr#{$i} {
+			margin-right: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .mb#{$i} {
+			margin-bottom: #{$i}rpx;
+    }
+}
+// 圆角
+@for $i from 0 through 100{
+    .radius#{$i} {
+			border-radius: #{$i}rpx;
+    }
+}
+// padding 左右+width自动计算
+@for $i from 10 through 60{
+    .w-calc-#{$i} {
+			width: calc(100% - #{$i*2}rpx);
+			padding-left:  #{$i}rpx;
+			padding-right:  #{$i}rpx;
+    }
+}
+
+// gap
+@for $i from 1 through 100{
+	.gap#{$i} {
+		gap: #{$i}rpx;
+	}
+}
+
+// 高
+@for $i from 1 through 900{
+	.h#{$i} {
+		height: #{$i}rpx;
+	}
+}
+// 宽
+@for $i from 1 through 900{
+	.w#{$i} {
+		width: #{$i}rpx;
+	}
+}
+// 宽
+@for $i from 1 through 900{
+	.lh#{$i} {
+		line-height: #{$i}rpx;
+	}
+}
+
+
+// font-weight
+$steps: 100 200 300 400 500 600 700 800 bold;
+@each $i in $steps {
+	.weight-#{$i} {
+		font-weight: $i;
+	}
+}
+
+.bold {
+	font-weight: bold;
+}
+.scrollx {
+	overflow-x: scroll;
+}
+
+.scrolly {
+	overflow-y: scroll;
+}
+.color9{
+	color: #999;
+}
+.color6{
+	color: #666;
+}
+.bgf{
+	background-color: #fff;
+}
+.base-color{
+	color: #018C39;
+}
+.colorf {
+			color: #fff;
+		}
+	
+		.bgf {
+			background: #fff;
+		}
+	
+		.fixed {
+			position: fixed;
+		}
+	
+		.absolute {
+			position: absolute;
+		}
+	
+		.relative {
+			position: relative;
+		}
+	
+		.w100 {
+			width: 100%;
+		}
+	
+		.h100 {
+			height: 100%;
+		}
+	
+		.card {
+			background: #fff;
+			border-radius: 15rpx;
+		}
+	
+		.cover-height {
+			height: 100%;
+			display: flex;
+			flex-direction: column;
+			box-sizing: border-box;
+		}
+	
+		.row {
+			display: flex;
+			flex-direction: row;
+		}
+	
+		.column {
+			display: flex;
+			flex-direction: column;
+		}
+	
+		.justify-start {
+			display: flex;
+			justify-content: flex-start;
+		}
+	
+		.justify-center {
+			display: flex;
+			justify-content: center;
+		}
+	
+		.justify-end {
+			display: flex;
+			justify-content: flex-end;
+		}
+	
+		.justify-around {
+			display: flex;
+			justify-content: space-around;
+		}
+		.justify-evenly {
+			display: flex;
+			justify-content: space-evenly;
+		}
+	
+		.justify-between {
+			display: flex;
+			justify-content: space-between;
+		}
+	
+		.align-start {
+			display: flex;
+			align-items: flex-start;
+		}
+	
+		.align-center {
+			display: flex;
+			align-items: center;
+		}
+	
+		.align-end {
+			display: flex;
+			align-items: flex-end;
+		}
+	
+		.center {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+		}
+	
+		.centerV {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			flex-direction: column;
+		}
+	
+		.wrap {
+			flex-wrap: wrap;
+		}
+	
+		.flex-1 {
+			flex: 1;
+		}
+	
+		.ellipsis {
+			overflow: hidden;
+			text-overflow: ellipsis;
+			display: -webkit-box;
+			-webkit-box-orient: vertical;
+			box-sizing: border-box;
+			width: 100%;
+			-webkit-line-clamp: 1;
+		}
+	
+		.lines-2 {
+			-webkit-line-clamp: 2 !important;
+		}
+	
+		.lines-3 {
+			-webkit-line-clamp: 3 !important;
+		}
+	
+		.bold {
+			font-weight: bold;
+		}
+	
+		.line-through {
+			text-decoration: line-through;
+		}
+	
+		.nowrap {
+			white-space: nowrap;
+		}
+	
+		.scrollx {
+			overflow-x: scroll;
+		}
+	
+		.scrolly {
+			overflow-y: scroll;
+		}
+	
+		.cvauto {
+			content-visibility: auto;
+		}

+ 3 - 6
components/tuiProduct.vue

@@ -10,13 +10,13 @@
 		<view class="medicine-item x-f" v-for="(item, index) in list" :key="index" @click="showProduct(item)">
 			<view class="medicine">
 				<image :src="item.image" mode="aspectFill"></image>
-				<!-- {{utils.getDictLabelName("storeProductType",product.productType)}} -->
+				<!-- {{$getDictLabelName("storeProductType",product.productType)}} -->
 				<!-- <image class="otc" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/index/blue_lable_otc.svg" mode="aspectFill"></image> -->
 			</view>
 			<view class="medicine-r">
 				<view class="ellipsis" style="white-space: normal;">{{ item.productName || '' }}</view>
 				<view class="desc">包装规格:{{ item.unitName || '--' }}</view>
-				<view class="desc">共有 <text style="color: #2583EB;margin: 0 10rpx;">12</text> 个商家销售 </view>
+				<view class="desc" v-show="item.storecount">共有 <text style="color: #2583EB;margin: 0 10rpx;">{{item.storecount||0}}</text> 个商家销售 </view>
 				<view class="price-box">
 					<text class="price-box-unit">¥</text>
 					<text class="price-box-integer">{{splitPrice(item.price || 0).intPart}}</text>
@@ -64,9 +64,6 @@
 				var that = this;
 				if (that.loaded == true || that.loading == true) return;
 				that.loading = true;
-				uni.showLoading({
-					title: "加载中..."
-				})
 				getTuiProducts(that.page).then(
 					res => {
 						if (res.code == 200) {
@@ -86,7 +83,7 @@
 							duration: 2000
 						});
 					}
-				);
+				)
 			},
 			showProduct(item) {
 				uni.navigateTo({

+ 6 - 2
main.js

@@ -1,8 +1,8 @@
 import App from './App'
 import store from './store'
 import uView from "@/node_modules/uview-ui";
-
-import {isEmpty,parseIDCardInfo,parseText,urlToObj,clearHisSearch,getHisSearch,addHisSearch,logout,getDictLabelName,getProvider,parsePhone,isLogin,getAge,parseIdCard,isLoginCourse,reLoginCheck} from './utils/common.js'
+import {formatSalesNum} from "@/utils/tools.js"
+import {getDict,isEmpty,parseIDCardInfo,parseText,urlToObj,clearHisSearch,getHisSearch,addHisSearch,logout,getDictLabelName,getProvider,parsePhone,isLogin,getAge,parseIdCard,isLoginCourse,reLoginCheck} from './utils/common.js'
 // #ifndef VUE3
 import Vue from 'vue'
 // Vuex 插件注册
@@ -12,6 +12,7 @@ App.mpType = 'app'
 
 Vue.use(Vuex)
 Vue.use(uView);
+Vue.prototype.$formatSalesNum= formatSalesNum;
 Vue.prototype.$getProvider = getProvider;
 Vue.prototype.$parsePhone = parsePhone;
 Vue.prototype.$isLogin = isLogin;
@@ -29,6 +30,7 @@ Vue.prototype.$parseText = parseText
 Vue.prototype.$parseIDCardInfo = parseIDCardInfo
 Vue.prototype.$isLoginCourse = isLoginCourse
 Vue.prototype.$reLoginCheck = reLoginCheck
+Vue.prototype.$getDict = getDict
 // Vue.prototype.$formatHour = formatHour;
 // Vue.prototype.$updateMsgDot = updateMsgDot;
 const app = new Vue({
@@ -63,6 +65,8 @@ export function createApp() {
   app.config.globalProperties.$parseText = parseText
   app.config.globalProperties.$parseIDCardInfo = parseIDCardInfo
   app.config.globalProperties.$isLoginCourse = isLoginCourse
+  app.config.globalProperties.$formatSalesNum = formatSalesNum
+  app.config.globalProperties.$getDict = getDict
   
   app.use(uviewPlus)
   return {

+ 112 - 0
pages.json

@@ -1343,6 +1343,118 @@
 						"navigationBarTextStyle":"black"
 					}
 				 }
+				 ,{
+				 	"path": "shopping/storeOrder",
+				 	"style": {
+				 		"navigationBarTitleText": "订单管理",
+						"navigationBarBackgroundColor":"#fff",
+						"navigationBarTextStyle":"black",
+				 		"app-plus": {
+				 			"titleNView": false
+				 		}
+				 	}
+				 }
+				 ,{
+				     "path" : "shopping/paymentOrderRemain",
+				     "style" :                                                                                    
+				     {
+				         "navigationBarTitleText": "支付尾款",
+				         "enablePullDownRefresh": false,
+						 "navigationBarBackgroundColor":"#fff",
+						 "navigationBarTextStyle":"black"
+				     }
+				     
+				 }
+				 ,{
+				 	"path" : "shopping/storeOrderDetail",
+				 	"style" :                                                                                    
+				 	{
+				 		"navigationBarTitleText": "订单详情",
+				 		"navigationStyle": "custom",
+				 		"enablePullDownRefresh": false
+				 	}
+				 	
+				 }
+				 ,{
+				 	"path" : "shopping/refundOrderList",
+				 	"style" :                                                                                    
+				 	{
+				 		"navigationBarTitleText": "售后订单",
+				 		"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor":"#fff",
+						"navigationBarTextStyle":"black"
+				 	}
+				 	
+				 }
+				 ,{
+				 	"path" : "shopping/refundOrderDetail",
+				 	"style" :                                                                                    
+				 	{
+				 		"navigationBarTitleText": "处理进度",
+				 		"navigationStyle": "custom",
+				 		"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor":"#fff",
+						"navigationBarTextStyle":"black"
+				 	}
+				 	
+				 }
+				 ,{
+				 	"path" : "shopping/refundOrderLogs",
+				 	"style" :                                                                                    
+				 	{
+				 		"navigationBarTitleText": "退款详情",
+				 		"navigationStyle": "custom",
+				 		"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor":"#fff",
+						"navigationBarTextStyle":"black"
+				 	}
+				 	
+				 }
+				 ,{
+				 	"path" : "shopping/storeOrderDelivery",
+				 	"style" :                                                                                    
+				 	{
+				 		"navigationBarTitleText": "物流信息",
+				 		"navigationStyle": "custom",
+				 		"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor":"#fff",
+						"navigationBarTextStyle":"black"
+				 	}
+				 	
+				 }
+				 ,{
+				 	"path" : "shopping/refundOrder",
+				 	"style" :                                                                                    
+				 	{
+				 		"navigationBarTitleText": "申请售后",
+				 		"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor":"#fff",
+						"navigationBarTextStyle":"black"
+				 	}
+				 	
+				 }
+				 ,{
+				 	"path" : "shopping/refundOrderProduct",
+				 	"style" :                                                                                    
+				 	{
+				 		"navigationBarTitleText": "订单售后",
+				 		"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor":"#fff",
+						"navigationBarTextStyle":"black"
+				 	}
+				 	
+				 }
+				 ,{
+				 	"path" : "shopping/refundOrderDelivery",
+				 	"style" :                                                                                    
+				 	{
+				 		"navigationBarTitleText": "物流信息",
+				 		"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor":"#fff",
+						"navigationBarTextStyle":"black"
+				 	}
+				 	
+				 }
 			]
 		},
 		{

+ 4 - 0
pages/user/index.vue

@@ -49,6 +49,10 @@
 							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/image/userimg/my_cforder.png"></image>
 							<view class="title">处方订单</view>
 						</view>
+						<view class="menu" @click="loginNavTo('/pages_user/shopping/storeOrder')">
+							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/image/userimg/my_cforder.png"></image>
+							<view class="title">药品订单</view>
+						</view>
 						<!-- <view class="menu" @click="loginNavTo('/pages_order/packageOrderList')">
 							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/image/userimg/service_pack.png"></image>
 							<view class="title">服务包</view>

+ 1 - 1
pages_shopping/home/productSearch.vue

@@ -55,7 +55,7 @@
 		methods:{
 			// 清空历史搜索数据
 			clearHistory() {
-				this.utils.clearHisSearch();
+				this.$clearHisSearch();
 				this.searchHistory=this.$getHisSearch();
 			},
 			doSearch(item){

+ 2 - 1
pages_shopping/paymentOrder.vue

@@ -309,7 +309,8 @@
 						if(res.code==200){
 							 console.log(res);
 							 if(res.payType==1||res.payType==2){
-								 var result=JSON.parse(res.result);
+								 // var result=JSON.parse(res.result);
+								 let result = res.result
 								 uni.requestPayment({
 								 	provider: 'wxpay',
 								 	timeStamp: result.timeStamp,

+ 1 - 1
pages_shopping/prescribe.vue

@@ -44,7 +44,7 @@
 							<view class="info">
 								<text class="sex" v-if="item.gender==1">男</text>
 								<text class="sex" v-if="item.gender==2">女</text>
-								<text class="ege">{{utils.getAge(item.birthday)}}岁</text>
+								<text class="ege">{{$getAge(item.birthday)}}岁</text>
 							</view>
 							<!-- 选中的对号角标 -->
 							<image v-if="patientId == item.patientId" class="active-img" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/sel_right50.png" mode=""></image>

+ 30 - 12
pages_shopping/productDetails.vue

@@ -47,6 +47,7 @@
 		<view class="other-box">
 			<view class="other-box-item">
 				<view class="label">规格</view>
+				<view class="text">{{product.unitName||'--'}}</view>
 			</view>
 			<view class="other-box-item">
 				<view class="label">服务</view>
@@ -60,15 +61,15 @@
 				</view>
 			</view>
 		</view>
-		<view class="storebox x-bc">
+		<view class="storebox x-bc" v-if="chooseStore.storeId">
 			<view class="x-f">
-				<image class="logo" :src="storeInfo.logoUrl" mode="aspectFill"></image>
-				<view class="storebox-r" @click="goStoreDetail(storeInfo)">
-					<view class="storename ellipsis2">{{storeInfo.storeName||'南泉店'}}</view>
-					<view class="storedesc">24小时营业  月售{{storeInfo.salesCount|| 0}}</view>
+				<image class="logo" :src="chooseStore.logoUrl" mode="aspectFill"></image>
+				<view class="storebox-r" @click="goStoreDetail(chooseStore)">
+					<view class="storename ellipsis2">{{chooseStore.storeName||''}}</view>
+					<view class="storedesc">24小时营业 销售{{$formatSalesNum(chooseStore.salesCount) }}</view>
 				</view>
 			</view>
-			<view class="storebox-btn" @click="goStoreDetail(storeInfo)">进店</view>
+			<view class="storebox-btn" @click="goStoreDetail(chooseStore)">进店</view>
 		</view>
 		<!-- 购买人数、库存 -->
 		<!-- <view class="inventor">
@@ -221,6 +222,9 @@
 				specVisible: false,
 				// 规格数量
 				specNum: 1,
+				chooseStore:{},
+				storeList:[],
+				storeId: ''
 			};
 		},
 		onLoad(options) {
@@ -235,6 +239,7 @@
 				const obj = this.$urlToObj(url)
 				uni.setStorageSync('tuiUserId',obj.userId);
 			}
+			this.storeId = options.storeId||'';
 			uni.showShareMenu({
 				withShareTicket:true,
 				//小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
@@ -376,6 +381,15 @@
 							})
 							console.log(this.attrs)
 							this.values=res.productValues;
+							this.storeList = [res.store] || [];
+							if(this.storeList&&this.storeList.length>0) {
+								const idx = this.storeList.indexOf(Number(this.storeId||0));
+								if(this.storeId&&idx>-1) {
+									this.chooseStore = this.storeList[idx]
+								}else {
+									this.chooseStore = this.storeList[0]
+								}
+							}
 							this.choseSpec(0,0)
 						}else{
 							uni.showToast({
@@ -431,6 +445,10 @@
 					if(res){
 						this.type=type;
 						this.specVisible = true
+					} else {
+						uni.navigateTo({
+							url: '/pages/auth/login'
+						})
 					}
 				})
 			},
@@ -538,12 +556,12 @@
 				height: 28rpx;
 				margin-right: 8rpx;
 			}
-			.text{
-				font-family: PingFang SC, PingFang SC;
-				font-weight: 400;
-				font-size: 24rpx;
-				color: #333333;
-			}
+		}
+		.text{
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 24rpx;
+			color: #333333;
 		}
 	}
 	.shop-banner{

+ 1 - 1
pages_shopping/store/index.vue

@@ -25,7 +25,7 @@
 					<view class="store-head-name">{{storeInfo.storeName || ''}}</view>
 				</view>
 				<view class="store-head-desc">
-					<view>销售{{utils.formatSalesNum(storeInfo.salesCount) }}</view>
+					<view>销售{{$formatSalesNum(storeInfo.salesCount) }}</view>
 					<view>24小时营业</view>
 					<view>支持预订</view>
 				</view>

+ 1 - 1
pages_shopping/success.vue

@@ -56,7 +56,7 @@
 			},
 			goOrderDetails(id){
 				uni.redirectTo({
-					url: "/pages_user/user/storeOrderDetail?id="+id
+					url: "/pages_user/shopping/storeOrderDetail?id="+id
 				}) 
 			}
 		}

+ 1 - 1
pages_store/index.vue

@@ -73,7 +73,7 @@
 			// 查看详情
 			showDetail(item) {
 				uni.navigateTo({
-					url: '/pages_shopping/productDetails?productId='+item.productId + `${this.storeId ? '&storeId='+this.storeId : ''}`
+					url: '/pages_shopping/productDetails?productId='+item.productId + `${item.storeId ? '&storeId='+item.storeId : ''}`
 				})
 			},
 			splitPrice(num) {

+ 29 - 0
pages_user/api/storeAfterSales.js

@@ -0,0 +1,29 @@
+import Request from '@/common/request.js';
+let request = new Request().http
+ 
+ export function getMyStoreOrderItemByOrderId(data) {
+ 	 return request('/store/app/storeAfterSales/getMyStoreOrderItemByOrderId',data,'GET');
+ } 
+ export function applyAfterSales(data) {
+ 	 return request('/store/app/storeAfterSales/applyAfterSales',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function getAfterSalesList(data) {
+ 	 return request('/store/app/storeAfterSales/getAfterSalesList',data,'GET');
+ } 
+ 
+ export function getAfterSalesDetails(data) {
+ 	 return request('/store/app/storeAfterSales/getAfterSalesDetails',data,'GET');
+ } 
+ export function revoke(data) {
+ 	 return request('/store/app/storeAfterSales/revoke',data,'POST','application/json;charset=UTF-8');
+ }
+ export function addDelivery(data) {
+ 	 return request('/store/app/storeAfterSales/addDelivery',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ 
+ 
+ 
+ 
+ 

+ 79 - 0
pages_user/api/storeOrder.js

@@ -0,0 +1,79 @@
+import Request from '@/common/request.js';
+let request = new Request().http
+
+ 
+ export function getMyStoreOrderList(data) {
+ 	 return request('/store/app/storeOrder/getMyStoreOrderList',data,'GET');
+ } 
+ export function getCompanyStoreOrderList(data) {
+ 	 return request('/store/app/storeOrder/getCompanyStoreOrderList',data,'GET');
+ } 
+ export function getMyStoreOrderById(data) {
+ 	 return request('/store/app/storeOrder/getMyStoreOrderById',data,'GET');
+ } 
+ 
+ 
+ export function getStoreOrderById(data) {
+ 	 return request('/store/app/storeOrder/getStoreOrderById',data,'GET');
+ } 
+ 
+ 
+ export function confirm(data) {
+ 	 return request('/store/app/storeOrder/confirm',data,'POST','application/json;charset=UTF-8');
+ }
+ export function computed(data) {
+ 	 return request('/store/app/storeOrder/computed',data,'POST','application/json;charset=UTF-8');
+ }
+ export function create(data) {
+ 	 return request('/store/app/storeOrder/create',data,'POST','application/json;charset=UTF-8');
+ }
+ export function pay(data) {
+ 	 return request('/store/app/storeOrder/pay',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function editPayType(data) {
+ 	 return request('/store/app/storeOrder/editPayType',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function payRemain(data) {
+ 	 return request('/store/app/storeOrder/payRemain',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function otherPayment(data) {
+ 	 return request('/store/app/storeOrder/otherPayment',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function otherPaymentRemain(data) {
+ 	 return request('/store/app/storeOrder/otherPaymentRemain',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ 
+ export function cancelOrder(data) {
+ 	 return request('/store/app/storeOrder/cancelOrder',data,'POST','application/json;charset=UTF-8');
+ }
+ export function finishOrder(data) {
+ 	 return request('/store/app/storeOrder/finishOrder',data,'POST','application/json;charset=UTF-8');
+ }
+ export function getExpress(data) {
+ 	 return request('/store/app/storeOrder/getExpress',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ 
+ export function confirmPackageOrder(data) {
+ 	 return request('/store/app/storeOrder/confirmPackageOrder',data,'POST','application/json;charset=UTF-8');
+ }
+ export function computedPackageOrder(data) {
+ 	 return request('/store/app/storeOrder/computedPackageOrder',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function createPackageOrder(data) {
+ 	 return request('/store/app/storeOrder/createPackageOrder',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function getOrderCount() {
+ 	 return request('/store/app/storeOrder/getOrderCount',null,'GET');
+ } 
+ 
+ 
+ 
+ 

+ 403 - 0
pages_user/shopping/paymentOrderRemain.vue

@@ -0,0 +1,403 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<!-- 时间、价格 -->
+			<view class="time-price">
+				<text class="time">请支付尾款</text>
+				<view class="price-box">
+					<text class="unit">¥</text>
+					<text class="num"  >{{payDelivery.toFixed(2) }}</text>
+				</view>
+			</view>
+			<!-- 支付方式 -->
+			<view class="pay-type">
+				<view class="title">支付方式</view>
+				<radio-group  >
+					<view class="item"   >
+						<view class="left"  >
+							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/wecha_pay.png" mode=""></image>
+							<text class="text">微信支付</text>
+						</view>
+						<label>
+							<radio :value="1" checked  />
+						</label>
+					</view>
+				</radio-group>
+				 
+			</view>
+			<!-- 订单详情查看 -->
+			<view class="order-info">
+				<view class="title">订单信息</view>
+				<view class="item">
+					<text class="label">订单编号</text>
+					<view class="sn-box">
+						<text class="text">{{order.orderCode}}</text>
+						<view class="copy-btn" @click="copyOrderSn(order.orderCode)">复制</view>
+					</view>
+				</view>
+				<view class="item">
+					<text class="label">下单时间</text>
+					<text class="text">{{order.createTime}}</text>
+				</view>
+				<view class="item">
+					<text class="label">订单金额</text>
+					<text class="text" v-if="order!=null">{{order.payPrice.toFixed(2)}}</text>
+				</view>
+				<view class="item">
+					<text class="label">付款金额</text>
+					<text class="text" v-if="order!=null">{{order.payMoney.toFixed(2)}}</text>
+				</view>
+				 
+			</view>
+			
+		</view>
+		<view class="btn-box">
+			<view class="btn" @click="payOrder()">去支付</view>
+			<view class="other-btn" >
+				亲友代付
+				<button  class="share" data-name="shareBtn" open-type="share">分享</button>
+			</view>
+		</view>
+		 
+	</view>
+</template>
+
+<script>
+	import {getUserInfo} from '@/api/user'
+	import {payRemain,getStoreOrderById} from '../api/storeOrder'
+	export default {
+		data() {
+			return {
+				payDelivery:0.00,
+				order:null,
+				user:null,
+				orderId:null,
+			}
+		},
+		onLoad(option) {
+			this.orderId=JSON.parse(option.orderId);
+			console.log(this.orderId)
+			this.getUserInfo();
+			uni.showShareMenu({
+				withShareTicket:true,
+				//小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
+				menus:["shareAppMessage"] //不设置默认发送给朋友
+			})
+		},
+		onShow() {
+			this.getStoreOrderById();
+		},
+		//发送给朋友
+		onShareAppMessage(res) {
+			return {
+				title: "帮TA支付",
+				path: '/pages_user/shopping/otherPaymentOrderRemain?orderId='+this.orderId,
+				imageUrl: 'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/sharelogo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+			}
+			
+		},
+		methods: {
+			getUserInfo(){
+				getUserInfo().then(
+					res => {
+						if(res.code==200){
+							if(res.user!=null){
+								this.user=res.user;
+							}
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			copyOrderSn(text) {
+				// 复制方法
+				uni.setClipboardData({
+					data:text,
+					success:()=>{
+						uni.showToast({
+							title:'内容已成功复制到剪切板',
+							icon:'none'
+						})
+					}
+				});
+			},
+			getStoreOrderById(){
+				var data = {orderId:this.orderId};
+				var that=this;
+				uni.showLoading();
+				getStoreOrderById(data).then(
+					res => {
+						if(res.code==200){
+							console.log(res);
+							uni.hideLoading();
+							that.order=res.order;
+							this.payDelivery=that.order.payDelivery;
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+				
+			},
+			payOrder(){
+				var data = {orderId:this.order.id,payType:1};
+				var that=this;
+				uni.showLoading();
+				payRemain(data).then(
+					res => {
+						if(res.code==200){
+							 console.log(res);
+							 uni.requestPayment({
+							 	provider: 'wxpay',
+							 	timeStamp: res.result.timeStamp,
+							 	nonceStr: res.result.nonceStr,
+							 	package: res.result.packageValue,
+							 	signType: res.result.signType,
+							 	paySign: res.result.paySign,
+							 	success: function(res) {
+							 		 uni.hideLoading();
+									 uni.redirectTo({
+									 	url:"success?order="+JSON.stringify(that.order)
+									 }) 
+							 	},
+							 	fail: function(err) {
+							 		console.log('fail:' + JSON.stringify(err));
+							 		uni.hideLoading();
+							 	}
+							 });
+							 
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.content{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		.inner{
+			padding: 20upx;
+			.time-price{
+				box-sizing: border-box;
+				padding: 50upx 0upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				.time{
+					font-size: 32upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #222222;
+					line-height: 1;
+					text-align: center;
+				}
+				.desc{
+					margin: 30upx 0upx 15upx;
+					font-size: 26upx;
+					font-family: PingFang SC;
+					color: #999999;
+					line-height: 1;
+					text-align: center;
+				}
+				.price-box{
+					display: flex;
+					align-items: flex-end;
+					margin-top: 28upx;
+					.unit{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.3;
+						margin-right: 10upx;
+					}
+					.num{
+						font-size: 56upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+			.pay-type{
+				box-sizing: border-box;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				margin-top: 20upx;
+				padding: 40upx 30upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.title{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+					margin-bottom: 10upx;
+				}
+				.item{
+					padding: 15upx 0upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.left{
+						display: flex;
+						align-items: center;
+						image{
+							width: 44upx;
+							height: 44upx;
+							margin-right: 20upx;
+						}
+						.text{
+							font-size: 30upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #222222;
+							line-height: 1;
+						}
+					}
+				}
+			}
+			.order-info{
+				margin-top: 20upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				padding: 40upx 30upx;
+				.title{
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #222222;
+					line-height: 1;
+				}
+				.item{
+					margin-top: 40upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.label{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 1;
+					}
+					.text{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						line-height: 32upx;
+					}
+					.cont-text{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						.bold{
+							color: #111111;
+						}
+					}
+					.sn-box{
+						display: flex;
+						align-items: center;
+						.copy-btn{
+							width: 58upx;
+							height: 32upx;
+							line-height: 32upx;
+							text-align: center;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #222222;
+							background: #F5F5F5;
+							border-radius: 4upx;
+							margin-left: 24upx;
+						}
+					}
+					 
+				}
+				.line{
+					width: 100%;
+					height: 1px;
+					background: #F0F0F0;
+					margin-top: 30upx;
+				}
+			}
+		}
+		.btn-box{
+			height: 242upx;
+			background: #FFFFFF;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-direction: column;
+			.btn{
+				width: 91.73%;
+				height: 88upx;
+				line-height: 88upx;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				text-align: center;
+				background: #2BC7B9;
+				border-radius: 44upx;
+				margin-bottom: 10rpx;
+			}
+			.other-btn{
+				width: 91.73%;
+				height: 88upx;
+				line-height: 88upx;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #2BC7B9;
+				border: 1rpx solid #2BC7B9;
+				text-align: center;
+				background: #FFFFFF;
+				border-radius: 44upx;
+				margin-bottom: 10rpx;
+				position: relative;
+				.share{
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%;
+					opacity: 0;
+				}
+			}
+		}
+	}
+	
+</style>

+ 489 - 0
pages_user/shopping/refundOrder.vue

@@ -0,0 +1,489 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<!-- 药品列表 -->
+			<view class="drug-list">
+				<view  class="item">
+					<!-- 药品信息 -->
+					<view v-if="order!=null&&order.isPackage!=1" class="drug-info" v-for="(item,index) in items" :key="index">
+						<view class="img-box">
+							<image :src="JSON.parse(item.jsonInfo).image" mode="aspectFit"></image>
+						</view>
+						<view class="info">
+							<view class="top">
+								<view class="title ellipsis2">{{ JSON.parse(item.jsonInfo).productName}}</view>
+								<view class="spec">{{JSON.parse(item.jsonInfo).sku}}</view>
+							</view>
+							<view class="price-num">
+								<view class="price-box">
+									<text class="unit">¥</text>
+									<text class="price">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text>
+								</view>
+								<view class="num">x{{JSON.parse(item.jsonInfo).num}}</view>
+							</view>
+						</view>
+					</view>
+					<view  v-if="order!=null&&order.isPackage==1&&order.packageJson!=null"   class="drug-info">
+						<view class="img-box">
+							<image :src="JSON.parse(order.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>
+								<view class="spec">{{JSON.parse(order.packageJson).descs}}</view>
+							</view>
+							 
+						</view>
+					</view>
+				</view>
+			</view>
+			<!-- 申请原因 -->
+			<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" />
+				</view>
+				<view class="title-box">
+					<text class="label">申请原因</text>
+					<picker @change="reasonsChange" :value="reasons"  range-key="dictLabel" :range="reasonsList">
+						<view class="chose-box"  >
+							<text class="text">{{reasons}}</text>
+							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/arrow_gray.png" mode=""></image>
+						</view>
+					</picker>
+				</view>
+				<view class="textarea-box">
+					<textarea v-model="explains" placeholder="请描述申请售后服务的具体原因" placeholder-class="textarea-place" />
+				</view>
+			</view>
+			<!-- 退回方式 -->
+			<!-- <view class="return-method">
+				<view class="title-box">
+					<text class="text">退货方式</text>
+					<text class="text">用户发货</text>
+				</view>
+				<view class="return-tips">
+					<text class="text">请您在审核通过后7天内,将商品发货到指定点</text>
+				</view>
+				<view class="info-item">
+					<text class="label">联系人</text>
+					<text class="text">张三  1572325612</text>
+				</view>
+				<view class="info-item">
+					<text class="label">发货地址</text>
+					<text class="text">重庆市江北区建玛特商场5楼</text>
+				</view>
+			</view> -->
+			 <!-- 底部按钮 -->
+			 <view class="btn-box">
+			 	<view class="sub-btn" @click="submit()">申请售后</view>
+			 </view>
+		</view>
+		
+	 
+	</view>
+</template>
+
+<script>
+	import {getDictByKey} from '@/api/common.js'
+	import {applyAfterSales,getMyStoreOrderItemByOrderId} from '../api/storeAfterSales.js'
+	export default {
+		 
+		data() {
+			return {
+				orderId:null,
+				order:null,
+				orderCode:null,
+				items:[],
+				type:null,
+				reasonsList:[],
+				reasons:"请选择",
+				explains:"",
+				refundAmount:0.00,
+				 
+			}
+		},
+		onLoad(option) {
+			this.type=option.type;
+			this.orderCode=option.orderCode;
+			this.reasonsList=this.$getDict("storeAfterSalesReasons");
+			this.orderId=option.orderId;
+			console.log(this.orderId);
+			this.getMyStoreOrderItemByOrderId()
+		},
+		methods: {
+			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{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						 
+					}
+				});
+			},
+			reasonsChange(e) {
+				console.log(e.detail.value)
+				this.reasons = this.reasonsList[e.detail.value].dictLabel
+			},
+			submit(){
+				if(this.reasons=="请选择"){
+					uni.showToast({
+						icon:'none',
+						title: '请选择原因'
+					});
+					return;
+				}
+				if(this.refundAmount<0){
+					uni.showToast({
+						icon:'none',
+						title: '请输入退款金额'
+					});
+					return;
+				}
+				 
+				var productIds=this.items.map(item=>item.productId);
+				var products=[];
+				for(var i=0;i<productIds.length;i++){
+					var item={productId:productIds[i]};
+					products.push(item);
+				}
+				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{
+						uni.showToast({
+							icon:'none',
+							title: res.msg
+						});
+						 
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content{
+		margin-bottom: 170upx;
+		.inner{
+			padding: 20upx;
+			.drug-list{
+				.item{
+					background: #FFFFFF;
+					border-radius: 16upx;
+					margin-bottom: 20upx;
+					padding: 0 30upx;
+					.drug-info{
+						display: flex;
+						align-items: center;
+						padding: 30upx 0;
+						.img-box{
+							width: 160upx;
+							height: 160upx;
+							margin-right: 30upx;
+							image{
+								width: 100%;
+								height: 100%;
+							}
+						}
+						.info{
+							width: calc(100% - 160upx);
+							height: 160upx;
+							display: flex;
+							flex-direction: column;
+							justify-content: space-between;
+							.top{
+								.title{
+									font-size: 28upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1.4;
+									.tag{
+										display: inline-block;
+										padding: 0 6upx;
+										height: 30upx;
+										background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+										border-radius: 4upx;
+										margin-right: 10upx;
+										font-size: 22upx;
+										font-family: PingFang SC;
+										font-weight: bold;
+										color: #FFFFFF;
+										line-height: 30upx;
+										float: left;
+										margin-top: 7upx;
+									}
+								}
+								.spec{
+									font-size: 24upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #999999;
+									line-height: 1;
+									margin-top: 14upx;
+								}
+							}
+							.price-num{
+								display: flex;
+								align-items: center;
+								justify-content: space-between;
+								.price-box{
+									display: flex;
+									align-items: flex-end;
+									.unit{
+										font-size: 24upx;
+										font-family: PingFang SC;
+										font-weight: 500;
+										color: #111111;
+										line-height: 1.2;
+										margin-right: 5upx;
+									}
+									.price{
+										font-size: 32upx;
+										font-family: PingFang SC;
+										font-weight: 500;
+										color: #111111;
+										line-height: 1;
+									}
+								}
+								.num{
+									font-size: 24upx;
+									font-family: PingFang SC;
+									font-weight: bold;
+									color: #666666;
+								}
+							}
+						}
+					}
+					 
+				}
+			}
+			.reason-apply{
+				margin-top: 20upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				padding: 0 30upx;
+				.title-box{
+					height: 86upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					border-bottom: 1px solid #F0F0F0;
+					.label{
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #333333;
+					}
+					.money{
+						
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+					}
+					.chose-box{
+						display: flex;
+						align-items: center;
+						.text{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+						}
+						image{
+							width: 14upx;
+							height: 24upx;
+							margin-left: 10upx;
+						}
+					}
+				}
+				.textarea-box{
+					padding: 30upx 0;
+					textarea{
+						width: 100%;
+						box-sizing: border-box;
+						background: #F5F5F5;
+						border-radius: 16upx;
+						padding: 30upx 20upx;
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+					}
+					.textarea-place{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+					}
+				}
+			}
+			.return-method{
+				background: #FFFFFF;
+				border-radius: 16upx;
+				margin-top: 20upx;
+				padding: 0 30upx 40upx;
+				.title-box{
+					height: 86upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					border-bottom: 1px solid #F0F0F0;
+					.text{
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #333333;
+					}
+				}
+				.return-tips{
+					margin-top: 30upx;
+					margin-bottom: 30upx;
+					height: 80upx;
+					background: #FFF4E6;
+					border-radius: 16upx;
+					padding: 0 20upx;
+					display: flex;
+					align-items: center;
+					.text{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #EF8A07;
+					}
+				}
+				.info-item{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					margin-bottom: 40upx;
+					&:last-child{
+						margin-bottom: 0;
+					}
+					.label{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 1;
+					}
+					.text{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 1;
+					}
+					.detail-box{
+						display: flex;
+						align-items: center;
+						.price-box{
+							display: flex;
+							align-items: flex-end;
+							margin-right: 18upx;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1.2;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #111111;
+								line-height: 1;
+							}
+						}
+						.det-text{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+						}
+						image{
+							width: 14upx;
+							height: 24upx;
+							margin-left: 10upx;
+						}
+					}
+				}
+			}
+		}
+		 
+		.reson-box{
+			padding: 0 10upx 60upx;
+			.reson-item{
+				width: 100%;
+				height: 110upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				.title{
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+				}
+			}
+		}
+	}
+	.btn-box{
+		height: 120upx;
+		padding: 0 30upx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		.sub-btn{
+			width: 100%;
+			height: 88upx;
+			line-height: 88upx;
+			text-align: center;
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #FFFFFF;
+			background: #2BC7B9;
+			border-radius: 44upx;
+		}
+	}
+	input{
+		text-align: right;
+	}
+	.form-input{
+		font-size: 30upx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #999999;
+		text-align: right;
+	}
+</style>

+ 146 - 0
pages_user/shopping/refundOrderDelivery.vue

@@ -0,0 +1,146 @@
+<template>
+  <view class="content">
+  	<view class="inner">
+  		<view class="form-box">
+  			<view class="form-item">
+  				<text class="label">快递公司</text>
+  				<input type="text" v-model="form.deliveryName" placeholder="请输入物流公司" placeholder-class="form-input" />
+  			</view>
+  			<view class="form-item">
+  			 	<text class="label">快递单号</text>
+  			 	<input type="text" v-model="form.deliverySn"   placeholder="请输入物流单号" placeholder-class="form-input" />
+  			</view>
+  		</view>
+  	</view>
+  	<view class="btn-box">
+  		<view class="sub-btn" @click="submit()">提交</view>
+  	</view>
+  </view>
+</template>
+
+<script>
+import {addDelivery} from '../api/storeAfterSales.js'
+	
+export default {
+  data() {
+    return {
+		form:{
+			salesId:null,
+			deliverySn:null,
+			deliveryName:null,
+		}
+    }
+  },
+  onLoad(option) {
+	  this.form.salesId=option.salesId
+  },
+  methods: {
+	submit(){
+		if(this.form.deliveryName==null){
+			uni.showToast({
+				icon:'none',
+				title: '请输入快递公司'
+			});
+			return;
+		}
+		if(this.form.deliverySn==null){
+			uni.showToast({
+				icon:'none',
+				title: '请输入快递单号'
+			});
+			return;
+		}
+	 	addDelivery(this.form).then(
+	 		res => {
+	 			if(res.code==200){
+	 				 uni.showToast({
+	 				 	icon:'success',
+	 				 	title: "提交成功",
+	 				 });
+					 uni.navigateBack({
+					 	delta: 1
+					 })
+	 			}else{
+	 				uni.showToast({
+	 					icon:'none',
+	 					title: res.msg,
+	 				});
+	 			}
+	 		},
+	 		rej => {}
+	 	);
+	 },
+  },
+  
+}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.content{
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		
+		.inner{
+			padding: 20upx;
+			.form-box{
+				padding: 0 30upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				.form-item{
+					padding: 30upx 0;
+					display: flex;
+					align-items: flex-start;
+					border-bottom: 1px solid #F1F1F1;
+					&:last-child{
+						border-bottom: none;
+					}
+					.label{
+						width: 150upx;
+						text-align: left;
+						font-size: 30upx;
+						line-height: 44upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						flex-shrink: 0;
+					}
+					input{
+						text-align: left;
+					}
+					.form-input{
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						text-align: left;
+					}
+					 
+				}
+			}
+			 
+		}
+		.btn-box{
+			height: 120upx;
+			padding: 0 30upx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			.sub-btn{
+				width: 100%;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border-radius: 44upx;
+			}
+		}
+	}
+</style>

+ 610 - 0
pages_user/shopping/refundOrderDetail.vue

@@ -0,0 +1,610 @@
+<template>
+	<view>
+		<view class="top-cont">
+			<!-- 背景图片 -->
+			<image class="bg" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/order_top_bg.png" mode=""></image>
+			<view class="top-inner">			
+				<!-- 这里是状态栏 -->
+				<view class="fixed-top-box">
+					<view class="status_bar" :style="{height: statusBarHeight}"></view>
+					<view class="back-box" @click="back">
+						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/back_white.png" mode=""></image>
+						<text class="title">售后详情</text>
+						<text></text>
+					</view>
+				</view>
+				
+				<!-- 顶部固定后站位元素 -->
+				<view style="padding-bottom: 88upx;">
+					<view :style="{height: statusBarHeight}"></view>
+				</view>
+				<!-- 订单状态 -->
+				<view class="order-status" >
+					<!-- 处理中 -->
+					<view  v-if="sales.salesStatus == 0" class="inner">
+						<view class="img-box">
+							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/deal96.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">售后中</text>
+							<text class="desc">请等待客服处理...</text>
+						</view>
+					</view>
+					<view  v-if="sales.salesStatus == 1" class="inner">
+						<view class="img-box">
+							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/close_trade.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">售后取消</text>
+							<text class="desc">用户已取消售后</text>
+						</view>
+					</view>
+					<view  v-if="sales.salesStatus == 2" class="inner">
+						<view class="img-box">
+							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/close_trade.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">售后取消</text>
+							<text class="desc">商家已拒绝...</text>
+						</view>
+					</view>
+					<!-- 退款成功 -->
+					<view  v-if="sales.salesStatus == 3" class="inner">
+						<view class="img-box">
+							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/compel96.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">退款成功</text>
+							<text class="desc">已退款,退款金额将按原支付退回</text>
+						</view>
+					</view>
+					
+				</view>
+				<!-- 退款信息 -->
+				<view class="refund-info">
+					<view class="inner">
+						<view class="title-box">
+							<view class="left">
+								<text class="title">退款金额</text>
+								<view class="price-box">
+									<text class="unit">¥</text>
+									<text class="num" v-if="sales.refundAmount!=null">{{sales.refundAmount.toFixed(2)}}</text>
+								</view>
+							</view>
+							<view class="right">
+								<text class="text" v-if="sales.salesStatus==0">
+										<text  class="text success">{{$getDictLabelName("storeAfterSalesStatus",sales.status)}}</text>
+								</text>
+							</view>
+						</view>
+			 
+						<view class="refund-item" v-if="sales.status>=1&&sales.serviceType==1">
+							<view class="text">收件人:{{sales.consignee}} </view>
+							<view class="text">电话:{{sales.address}} </view>
+							<view class="text">收件地址:{{sales.phoneNumber}}</view>
+						</view>
+						<view class="btn-box"  v-if="sales.salesStatus==0" >
+							<view  v-if="sales.status==1" class="btn cancel" @click="addDeliverySn()"  >填写物流</view>
+							<view  v-if="sales.status==0||sales.status==1" class="btn cancel" @click="revoke()"  >撤销申请</view>
+							<!-- <view  class="btn cancel" @click="showLogs()" >查看进度</view> -->
+						</view>
+						<view class="refund-item" v-if="sales.status==0">
+							<view class="text">已提交等待平台审核 </view>
+						</view>
+						<view class="refund-item" v-if="sales.status==1">
+							<view class="text">平台已审核,等待用户发货 </view>
+						</view>
+						 <view class="refund-item" v-if="sales.status==2">
+						 	<view class="text">用户已发货,等待仓库审核 </view>
+						 </view>
+						 <view class="refund-item" v-if="sales.status==3">
+						 	<view class="text">财务审核 </view>
+						 </view>
+						 <view class="refund-item" v-if="sales.status==4">
+						 	<view class="text">已完成 </view>
+						 </view>
+					</view>
+				</view>
+				<view class="content">
+					<!-- 退货信息 -->
+					<view class="return-info">
+						<!-- <view class="title-box">
+							<text class="label">退货信息</text>
+							<text class="ret-num">共2件</text>
+						</view> -->
+						<!-- 退货列表 -->
+						<view class="goods-list">
+							<view v-if="sales!=null&&sales.isPackage!=1"  v-for="(item,index) in items" :key="index" class="item">
+								<view class="img-box">
+									<image :src="JSON.parse(item.jsonInfo).image" mode="aspectFill"></image>
+								</view>
+								<view class="info-box">
+									<view>
+										<view class="title ellipsis2">{{JSON.parse(item.jsonInfo).productName}}</view>
+										<view class="spec">规格:{{JSON.parse(item.jsonInfo).sku}}</view>
+									</view>
+									<view class="price-num">
+										<view class="price">
+											<text class="unit">¥</text>
+											<text class="num">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text>
+										</view>
+										<view class="num">x{{JSON.parse(item.jsonInfo).num}}</view>
+									</view>
+								</view>
+							</view>
+							<view v-if="sales!=null&&sales.isPackage==1"  class="item">
+								<view class="img-box">
+									<image :src="JSON.parse(sales.packageJson).imgUrl" mode="aspectFill"></image>
+								</view>
+								<view class="info-box">
+									<view>
+										<view class="title ellipsis2">
+											<!-- <view class="tag">处方药</view> -->
+											<view class="tag">套餐</view>{{JSON.parse(sales.packageJson).title}}
+										</view>
+										<view class="spec">{{JSON.parse(sales.packageJson).descs}}</view>
+									</view>
+								</view>
+							</view>
+							<!-- 详细信息 -->
+							<view class="refund-det-info">
+								<view class="det-item">
+									<text class="label">退货原因</text>
+									<text class="text">{{sales.reasons}}</text>
+								</view>
+								<view class="det-item">
+									<text class="label">退货说明</text>
+									<text class="text">{{sales.explains}}</text>
+								</view>
+								<view class="det-item">
+									<text class="label">退款金额</text>
+									<text class="text" v-if="sales.refundAmount!=null">¥{{sales.refundAmount.toFixed(2)}}</text>
+								</view>
+								 <view class="det-item">
+								 	<text class="label">订单编号</text>
+								 	<text class="text">{{sales.orderCode}}</text>
+								 </view>
+								<view class="det-item">
+									<text class="label">申请时间</text>
+									<text class="text">{{sales.createTime}}</text>
+								</view>
+								
+							</view>
+						</view>
+					</view>
+				</view>
+			
+			</view>
+		</view>
+		
+	</view>
+</template>
+
+<script>
+	import {getAfterSalesDetails,revoke} from '../api/storeAfterSales.js'
+	export default {
+		data() {
+			return {
+				modalTitle:"请输入快递单号",
+				sales:{},
+				items:[],
+				salesId:null,
+				// 状态栏的高度
+				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
+ 
+			};
+		},
+		onLoad(option) {
+			this.salesId = option.salesId
+
+		},
+		onShow() {
+			this.getAfterSalesDetails()
+		},
+		methods: {
+			addDeliverySn(){
+				uni.navigateTo({
+					url: './refundOrderDelivery?salesId=' + this.salesId
+				}) 
+			},
+			revoke(){
+				var data={salesId:this.salesId};
+				revoke(data).then(res => {
+					if(res.code==200){
+						 uni.showToast({
+						 	icon:'success',
+						 	title:'操作成功'
+						 });
+						 setTimeout(function() {
+							 uni.$emit('refreshAfterSales');
+							 uni.navigateBack({
+								 delta: 1
+							 })
+						 }, 500);
+						 
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: res.msg
+						});
+						 
+					}
+				});
+			},
+			getAfterSalesDetails() {
+				//联网加载数据
+				var that = this;
+				var data = {
+					salesId:this.salesId,
+
+				};
+				getAfterSalesDetails(data).then(res => {
+					if(res.code==200){
+						//设置列表数据
+						 this.sales=res.sales;
+						 this.items=res.items;
+						
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: res.msg
+						});
+						 
+					}
+				});
+			},
+			// 返回上一页
+			back() {
+				uni.navigateBack()
+			},
+			showLogs(status) {
+				uni.navigateTo({
+					url: './refundOrderLogs?orderStatus=' + status
+				})
+			},
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	.fixed-top-box{
+		width: 100%;
+		background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 1000;
+	}
+	.top-cont{
+		width: 100%;
+		height: 500upx;
+		position: relative;
+		.bg{
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 1;
+		}
+		.top-inner{
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 2;
+			.back-box{
+				height: 88upx;
+				padding-left: 22upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 20upx;
+				image{
+					width: 40upx;
+					height: 40upx;
+				}
+				.title{
+					font-size: 36upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FFFFFF;
+				}
+			}
+			.order-status{
+				margin-top: 60upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 30upx;
+				.inner{
+					display: flex;
+					align-items: center;
+					.img-box{
+						width: 96upx;
+						height: 96upx;
+						margin-right: 30upx;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.status-box{
+						height: 96upx;
+						display: flex;
+						flex-direction: column;
+						justify-content: center;
+						.status{
+							font-size: 40upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 1;
+						}
+						.desc{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FFFFFF;
+							line-height: 1;
+							margin-top: 30upx;
+						}
+						.det-box{
+							display: flex;
+							align-items: center;
+							image{
+								width: 14upx;
+								height: 24upx;
+								margin-left: 12upx;
+								margin-top: 30upx;
+							}
+						}
+					}
+				}
+			}
+			.refund-info{
+				margin-top: 50upx;
+				padding: 0 20upx;
+				.inner{
+					
+					background: #FFFFFF;
+					border-radius: 16upx;
+					padding: 0 30upx 15upx 30upx;
+					.title-box{
+						height: 88upx;
+						border-bottom: 1px solid #F0F0F0;
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.left{
+							display: flex;
+							align-items: center;
+							.title{
+								font-size: 30upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #333333;
+								line-height: 1;
+								margin-right: 20upx;
+							}
+							.price-box{
+								display: flex;
+								align-items: flex-end;
+								.unit{
+									font-size: 24upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #FF6633;
+									line-height: 1.2;
+									margin-right: 4upx;
+								}
+								.num{
+									font-size: 32upx;
+									font-family: PingFang SC;
+									font-weight: bold;
+									color: #FF6633;
+									line-height: 1;
+								}
+							}
+						}
+						.right{
+							display: flex;
+							align-items: center;
+							.text{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #999999;
+								line-height: 1;
+								margin-right: 10upx;
+							}
+							image{
+								width: 12upx;
+								height: 22upx;
+							}
+						}
+					}
+					.refund-item{
+						margin-top: 40upx;
+						.text{
+							margin-bottom: 10upx;
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #666666;
+							line-height: 1;
+						}
+					}
+				}
+			}
+		}
+	}
+	.content{
+		padding: 0 20upx 20upx;
+		.return-info{
+			margin-top: 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			.title-box{
+				height: 88upx;
+				padding: 0 30upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				.label{
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+				}
+				.ret-num{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+			}
+			.goods-list{
+				padding: 0 30upx;
+				background-color: #FFFFFF;
+				border-radius: 16upx;
+				.item{
+					padding: 30upx 0;
+					border-bottom: 1px solid #EDEEEF;
+					display: flex;
+					align-items: center;
+					.img-box{
+						width: 160upx;
+						height: 160upx;
+						margin-right: 30upx;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.info-box{
+						width: calc(100% - 190upx);
+						height: 160upx;
+						display: flex;
+						flex-direction: column;
+						justify-content: space-between;
+						.title{
+							font-size: 28upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #333333;
+							line-height: 36upx;
+							.tag{
+								display: inline-block;
+								padding: 0 6upx;
+								height: 30upx;
+								background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+								border-radius: 4upx;
+								margin-right: 10upx;
+								font-size: 22upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #FFFFFF;
+								line-height: 30upx;
+								float: left;
+								margin-top: 7upx;
+							}
+						}
+						.spec{
+							margin-top: 18upx;
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+						.price-num{
+							display: flex;
+							align-items: center;
+							justify-content: space-between;
+							.price{
+								display: flex;
+								align-items: flex-end;
+								.unit{
+									font-size: 24upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1.2;
+									margin-right: 4upx;
+								}
+								.num{
+									font-size: 32upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1;
+								}
+							}
+							.num{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #999999;
+								line-height: 1;
+							}
+						}
+					}
+				}
+				.refund-det-info{
+					padding-bottom: 30upx;
+					.det-item{
+						margin-top: 40upx;
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.label{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #666666;
+							line-height: 1;
+						}
+						.text{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #222222;
+							line-height: 1;
+						}
+					}
+				}
+			}
+		}
+		
+	}
+	.btn-box{
+		margin-top: 15upx;
+		box-sizing: border-box;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		.btn{
+			width: 155upx;
+			height: 64upx;
+			line-height: 64upx;
+			font-size: 26upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			text-align: center;
+			border-radius: 32upx;
+			margin-left: 15upx;
+			&:first-child{
+				margin-left: 0;
+			}
+			&.cancel{
+				border: 1px solid #DDDDDD;
+				color: #666666;
+			}
+			 
+		}
+	}
+	
+</style>

+ 420 - 0
pages_user/shopping/refundOrderList.vue

@@ -0,0 +1,420 @@
+<template>
+	<view>
+		<view class="top-fixed">
+			<!-- tab切换 -->
+			<view class="pub-tab-box">
+				<view class="tab-inner">
+					<view 
+						v-for="(item,index) in statusList" 
+						:key="index"
+						:class="status == item.value?'item active':'item'"
+						@click="statusChange(item)"
+					>
+						<view class="text">
+							{{ item.name }}
+							<image v-show="status == item.value" class="tab-bg" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/tab_bg.png" mode=""></image>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="top-seat"></view>
+		<!-- 订单列表 -->
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<view class="order-list">
+				<view v-for="(item,index) in dataList" :key="index" class="item"  >
+					<!-- 订单号,状态 -->
+					<view class="ordersn-box">
+						<view class="num">订单号:{{item.orderCode}}</view>
+						<view class="status-box">
+							<text  class="text success">{{$getDictLabelName("storeAfterSalesSalesStatus",item.salesStatus)}}</text>
+						</view>
+					</view>
+					<!-- 药品列表 -->
+					<view class="drug-list">
+						<view v-if="item!=null&&item.isPackage!=1" v-for="(subitem,j) in item.items" :key="j" class="drug-item">
+							<view class="img-box">
+								<image :src="JSON.parse(subitem.jsonInfo).image" mode="aspectFill"></image>
+							</view>
+							<view class="drug-info">
+								<view>
+									<view class="name-box ellipsis2">
+										<!-- <view class="tag">处方药</view> -->
+										{{JSON.parse(subitem.jsonInfo).productName}}
+									</view>
+									<view class="spec">规格:{{JSON.parse(subitem.jsonInfo).sku}}</view>
+								</view>
+								<view class="num-box">
+									<view class="price">
+										<text class="unit">¥</text>
+										<text class="num">{{JSON.parse(subitem.jsonInfo).price.toFixed(2)}}</text>
+									</view>
+									<view class="amount">x{{JSON.parse(subitem.jsonInfo).num}}</view>
+								</view>
+							</view>
+						</view>
+						<view v-if="item!=null&&item.isPackage==1"  class="drug-item">
+							<view class="img-box">
+								<image :src="JSON.parse(item.packageJson).imgUrl" mode="aspectFill"></image>
+							</view>
+							<view class="drug-info">
+								<view>
+									<view class="name-box ellipsis2">
+										<!-- <view class="tag">处方药</view> -->
+										<view class="tag">套餐</view>{{JSON.parse(item.packageJson).title}}
+									</view>
+									<view class="spec">{{JSON.parse(item.packageJson).descs}}</view>
+								</view>
+							</view>
+						</view>
+						<!-- 实付金额、按钮 -->
+						<view class="bottom-box">
+							<view class="amount-paid">
+								<text class="label">退款金额:</text>
+								<view class="price-box">
+									<view class="unit">¥</view>
+									<view class="num">{{item.refundAmount.toFixed(2)}}</view>
+								</view>
+							</view>
+							<view class="btn-box">
+								<view class="btn pay" @click="showDetail(item)">查看详情</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import {getAfterSalesList} from '../api/storeAfterSales.js'
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	export default {
+		mixins: [MescrollMixin], 
+		data() {
+			return {
+				statusList: [
+					{name:'全部',value:"0"},
+					{name:'售后中',value:"1"},
+					{name:'已完成',value:"2"},
+				],
+				status: 0,
+				mescroll:null,
+				// 上拉加载的配置
+				upOption: {
+					onScroll:true,
+					use: true, // 是否启用上拉加载; 默认true
+					page: {
+						num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+						size: 10 // 每页数据的数量,默认10
+					},
+					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					empty: {
+						icon:'/static/images/no_data.png',
+						tip: '暂无数据'
+					}
+				},
+				// 列表数据
+				dataList: []
+			};
+		},
+		onLoad(option) {
+			var that=this;
+			uni.$on('refreshAfterSales', () => {
+				that.mescroll.resetUpScroll()
+			})
+		},
+		methods: {
+			// tab切换
+			statusChange(item) {
+				this.status = item.value
+				this.mescroll.resetUpScroll()
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				//联网加载数据
+				var that = this;
+				var data = {
+					status:this.status,
+					page: page.num,
+					pageSize: page.size
+				};
+				getAfterSalesList(data).then(res => {
+					if(res.code==200){
+						//设置列表数据
+						if (page.num == 1) {
+							that.dataList = res.data.list; 
+							
+						} else {
+							that.dataList = that.dataList.concat(res.data.list);
+							 
+						}
+						that.mescroll.endBySize(res.data.list.length, res.data.total);
+						
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						that.dataList = null;
+						that.mescroll.endErr();
+					}
+				});
+			},
+			// 查看订单详情
+			showDetail(item) {
+				uni.navigateTo({
+					url: './refundOrderDetail?salesId=' + item.id
+				})
+			},
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	.top-fixed{
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 10;
+	}
+	.pub-tab-box{
+		box-sizing: border-box;
+		width: 100%;
+		padding: 0 60upx;
+		background-color: #FFFFFF;
+		.tab-inner{
+			height: 88upx;
+			line-height: 88upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			overflow-x: auto;
+		}
+		.item{
+			font-size: 28upx;
+			white-space: nowrap;
+			line-height: 1;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+			margin-right: 60upx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			&:last-child{
+				margin-right: 0;
+			}
+			&.active{
+				font-weight: bold;
+				color: #333333;
+			}
+			.text{
+				position: relative;
+				z-index: 1;
+			}
+			.tab-bg{
+				width: 72upx;
+				height: 28upx;
+				position: absolute;
+				top: 17upx;
+				left: 50%;
+				transform: translateX(-36upx);
+				z-index: -1;
+			}
+		}
+	}
+	.top-seat{
+		width: 100%;
+		height: 88upx;
+	}
+	.order-list{
+		padding: 20upx;
+		.item{
+			background: #FFFFFF;
+			border-radius: 16upx;
+			padding: 0 30upx;
+			margin-bottom: 20upx;
+			.ordersn-box{
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 34upx 0 20upx;
+				.num{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+				}
+				.status-box{
+					display: flex;
+					align-items: center;
+					.text{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						line-height: 1;
+						&.success{
+							color: #2BC7B9;
+						}
+						&.info{
+							color: #999999;
+						}
+					}
+				}
+			}
+			.drug-list{
+				.drug-item{
+					padding: 30upx 0;
+					border-bottom: 1px soli #F0F0F0;
+					display: flex;
+					align-items: center;
+					.img-box{
+						width: 160upx;
+						height: 160upx;
+						margin-right: 30upx;
+						flex-shrink: 0;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.drug-info{
+						width: calc(100% - 190upx);
+						height: 160upx;
+						display: flex;
+						flex-direction: column;
+						justify-content: space-between;
+						.name-box{
+							font-size: 28upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+							line-height: 40upx;
+							.tag{
+								display: inline-block;
+								padding: 0 6upx;
+								height: 30upx;
+								background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+								border-radius: 4upx;
+								margin-right: 10upx;
+								font-size: 22upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #FFFFFF;
+								line-height: 30upx;
+								float: left;
+								margin-top: 7upx;
+							}
+						}
+						.spec{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+							margin-top: 10upx;
+						}
+						.num-box{
+							display: flex;
+							align-items: center;
+							justify-content: space-between;
+							.price{
+								display: flex;
+								align-items: flex-end;
+								.unit{
+									font-size: 24upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1.2;
+									margin-right: 4upx;
+								}
+								.num{
+									font-size: 32upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1;
+								}
+							}
+							.amount{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #999999;
+								line-height: 1;
+							}
+						}
+					}
+				}
+				.bottom-box{
+					height: 110upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.amount-paid{
+						display: flex;
+						align-items: center;
+						.label{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+						.price-box{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #FF6633;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #FF6633;
+								line-height: 1;
+							}
+						}
+					}
+					.btn-box{
+						box-sizing: border-box;
+						display: flex;
+						align-items: center;
+						.btn{
+							width: 220upx;
+							height: 64upx;
+							line-height: 64upx;
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							text-align: center;
+							border-radius: 32upx;
+							&.pay{
+								background: #2BC7B9;
+								color: #FFFFFF;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+	
+</style>

+ 324 - 0
pages_user/shopping/refundOrderLogs.vue

@@ -0,0 +1,324 @@
+<template>
+	<view>
+		<view class="top-cont">
+			<!-- 背景图片 -->
+			<image class="bg" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/order_top_bg.png" mode=""></image>
+			<view class="top-inner">			
+				<!-- 这里是状态栏 -->
+				<view class="status_bar" :style="{height: statusBarHeight}"></view>
+				<view class="back-box" @click="back">
+					<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/back_white.png" mode=""></image>
+					<text class="title">退款详情</text>
+					<text></text>
+				</view>
+				<!-- 订单状态 -->
+				<view class="order-status">
+					<view class="inner">
+						<view class="img-box">
+							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/pag96.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">退款总额</text>
+						</view>
+					</view>
+					<!-- 退款状态:退款总额 -->
+					<view class="refund-money">
+						<text class="unit">¥</text>
+						<text class="num">29.4</text>
+					</view>
+				</view>
+				<!-- 订单退款 -->
+				<view class="order-refund">
+					<view class="inner">
+						<view class="title-box">
+							<text class="title">订单退款</text>
+							<view class="price-box">
+								<text class="unit">¥</text>
+								<text class="num">29.4</text>
+							</view>
+						</view>
+						<view class="text-box">
+							系统已提交微信支付处理,微信审核完成后1-3个工作日
+							自动原路退款至您的支付账户,若超时未收到退款,请联
+							系客服核实
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="content">
+			<!-- 退款步骤 -->
+			<view class="refund-steps">
+				<view v-for="(item,index) in 3" :key="index" class="steps">
+					<view class="title">
+						<text :class="index == 0?'text black-text':'text'">已原路退款至您的微信支付账户</text>
+						<!-- 左侧灰色圆点 -->
+						<view :class="index == 1?'dot active':'dot'"></view>
+						<!-- 对号 -->
+						<image v-if="index == 0" class="img" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/complete.png" mode=""></image>
+					</view>
+					<view class="time">2019-9-16 10:00</view>
+					<view v-if="index == 0" class="context">
+						微信支付将把钱退至原支付账户,若逾期未受到退款,请致电微信支付客服
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				// 状态栏的高度
+				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
+			};
+		},
+		onLoad(option) {
+			
+		},
+		methods: {
+			// 返回上一页
+			back() {
+				uni.navigateBack()
+			},
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+ 
+	.top-cont{
+		width: 100%;
+		height: 476upx;
+		position: relative;
+		.bg{
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 1;
+		}
+		.top-inner{
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 2;
+			.back-box{
+				height: 88upx;
+				padding-left: 22upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 20upx;
+				image{
+					width: 40upx;
+					height: 40upx;
+				}
+				.title{
+					font-size: 36upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FFFFFF;
+				}
+			}
+			.order-status{
+				margin-top: 60upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 30upx;
+				.inner{
+					display: flex;
+					align-items: center;
+					.img-box{
+						width: 96upx;
+						height: 96upx;
+						margin-right: 30upx;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.status-box{
+						height: 96upx;
+						display: flex;
+						flex-direction: column;
+						justify-content: center;
+						.status{
+							font-size: 40upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 1;
+						}
+						.desc{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FFFFFF;
+							line-height: 1;
+							margin-top: 30upx;
+						}
+					}
+				}
+				// 退款状态:退款总额
+				.refund-money{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FFFFFF;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+					.num{
+						font-size: 50upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FFFFFF;
+						line-height: 1;
+					}
+				}
+			}
+			.order-refund{
+				margin-top: 50upx;
+				padding: 0 20upx;
+				.inner{
+					box-sizing: border-box;
+					height: 268upx;
+					background: #FFFFFF;
+					border-radius: 16upx;
+					padding: 0 30upx;
+					.title-box{
+						height: 88upx;
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						border-bottom: 1px solid #F0F0F0;
+						.title{
+							font-size: 30upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #333333;
+						}
+						.price-box{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #FF6633;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #FF6633;
+								line-height: 1;
+							}
+						}
+					}
+					.text-box{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 42upx;
+						margin-top: 22upx;
+					}
+				}
+			}
+		}
+	}
+	.content{
+		padding: 0 20upx;
+		.refund-steps{
+			margin-top: 188upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			padding: 40upx 44upx;
+			.steps{
+				padding-left: 40upx;
+				padding-bottom: 56upx;
+				position: relative;
+				&::after{
+					content: "";
+					width: 4upx;
+					height: 100%;
+					background: #F1F1F1;
+					position: absolute;
+					left: 0;
+					top: 20upx;
+				}
+				&:last-child{
+					padding-bottom: 0;
+					&::after{
+						display: none;
+					}
+				}
+				.title{
+					position: relative;
+					.text{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 38upx;
+						&.black-text{
+							color: #111111;
+						}
+					}
+					.dot{
+						width: 16upx;
+						height: 16upx;
+						background: #EBEBEB;
+						border-radius: 50%;
+						position: absolute;
+						left: -46upx;
+						top: 16upx;
+						z-index: 10;
+						&.active{
+							background-color: #2BC7B9;
+						}
+					}
+					.img{
+						width: 40upx;
+						height: 40upx;
+						position: absolute;
+						left: -57upx;
+						top: 6upx;
+						z-index: 10;
+					}
+				}
+				.time{
+					font-size: 24upx;
+					font-family: Gilroy;
+					font-weight: 500;
+					color: #999999;
+					margin-top: 5upx;
+				}
+				.context{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 40upx;
+					margin-top: 22upx;
+				}
+			}
+		}
+		
+	}
+	
+</style>

+ 260 - 0
pages_user/shopping/refundOrderProduct.vue

@@ -0,0 +1,260 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<view class="goods-list">
+				<view v-if="order!=null&&order.isPackage!=1" class="item" v-for="(item,index) in items" :key="index">
+					<!-- <label style="margin-right: 30upx;">
+						<checkbox :value="item.checked"  :checked="item.checked" @click="checkChange(item)" />
+					</label> -->
+					<image class="goods-img" :src="JSON.parse(item.jsonInfo).image" mode="aspectFit"></image>
+					<view class="info">
+						<view class="top">
+							<view class="title ellipsis2">{{ JSON.parse(item.jsonInfo).productName}}</view>
+							<view class="spec">{{JSON.parse(item.jsonInfo).sku}}</view>
+						</view>
+						<view class="price-num">
+							<view class="price-box">
+								<text class="unit">¥</text>
+								<text class="price">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text>
+							</view>
+							<view class="num">x{{JSON.parse(item.jsonInfo).num}}</view>
+						</view>
+					</view>
+				</view>
+				<view  v-if="order!=null&&order.isPackage==1&&order.packageJson!=null"   class="item">
+					<image class="goods-img" :src="JSON.parse(order.packageJson).imgUrl" mode="aspectFit"></image>
+					<view class="info">
+						<view class="top">
+							<view class="title ellipsis2">
+								<view class="tag">套餐</view>{{JSON.parse(order.packageJson).title}}
+							</view>
+							<view class="spec">{{JSON.parse(order.packageJson).descs}}</view>
+						</view>
+					</view>
+					 
+				</view>
+			</view>
+			 
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-box">
+			<view class="text">提交申请后,客服会与您电话沟通,请保持手机通畅</view>
+			<view class="btns">
+				 <view class="left"></view>
+				<view class="right">
+					<view  class="btn cancel" v-if="order.status==1 || order.status==2" @click="submit(0)" >仅退款</view>
+					<view  class="btn cancel" v-if="order.status==3||order.status==4" @click="submit(1)"  >退款退货</view>
+				</view>
+				
+			</view>
+		
+		</view>
+	 
+	</view>
+</template>
+
+<script>
+	import {getMyStoreOrderItemByOrderId,applyAfterSales} from '../api/storeAfterSales.js'
+	export default {
+		 
+		data() {
+			return {
+				order:null,
+				items:[],
+				 
+			}
+		},
+		onLoad(option) {
+			this.orderId=option.orderId;
+			this.getMyStoreOrderItemByOrderId()
+		},
+		methods: {
+			checkChange(item){
+				item.checked=!item.checked;
+			},
+			submit(type){
+				// // var refundItems=this.items.filter(item => item.checked==true )
+				// // if(refundItems.length==0){
+				// // 	uni.showToast({
+				// // 		icon:'none',
+				// // 		title: '请选择退款商品'
+				// // 	});
+				// // 	return;
+				// // }
+				// uni.navigateTo({
+				// 	url: '/pages_user/user/refundOrder?items='+JSON.stringify(refundItems)+"&type="+type+"&orderCode="+this.order.orderCode
+				// })
+				uni.redirectTo({
+					url: '/pages_user/user/refundOrder?orderId='+this.order.id+"&type="+type+"&orderCode="+this.order.orderCode
+				})
+			},
+			getMyStoreOrderItemByOrderId(){
+				var data={orderId:this.orderId};
+				getMyStoreOrderItemByOrderId(data).then(res => {
+					if(res.code==200){
+						this.order=res.order;
+						this.items=res.items;
+						 
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						 
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content{
+		margin-bottom: 170upx;
+		.inner{
+			padding: 20upx;
+			.goods-list{
+				.item{
+					box-sizing: border-box;
+					height: 221upx;
+					background: #FFFFFF;
+					padding: 30upx;
+					display: flex;
+					align-items: center;
+					&:last-child{
+						margin-bottom: 0;
+					}
+					.goods-img{
+						width: 160upx;
+						height: 160upx;
+						background: #FFFFFF;
+						margin-right: 30upx;
+						flex-shrink: 0;
+					}
+					.info{
+						width: calc(100% - 160upx);
+						height: 160upx;
+						display: flex;
+						flex-direction: column;
+						justify-content: space-between;
+						.top{
+							.title{
+								font-size: 28upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1.4;
+								.tag{
+									display: inline-block;
+									padding: 0 6upx;
+									height: 30upx;
+									background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+									border-radius: 4upx;
+									margin-right: 10upx;
+									font-size: 22upx;
+									font-family: PingFang SC;
+									font-weight: bold;
+									color: #FFFFFF;
+									line-height: 30upx;
+									float: left;
+									margin-top: 7upx;
+								}
+							}
+							.spec{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #999999;
+								line-height: 1;
+								margin-top: 14upx;
+							}
+						}
+						.price-num{
+							display: flex;
+							align-items: center;
+							justify-content: space-between;
+							.price-box{
+								display: flex;
+								align-items: flex-end;
+								.unit{
+									font-size: 24upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1.2;
+									margin-right: 5upx;
+								}
+								.price{
+									font-size: 32upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1;
+								}
+							}
+							.num{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #666666;
+							}
+						}
+					}
+				}
+			}
+			 
+		}
+		.btn-box{
+			width: 100%;
+			height: 160upx;
+			position: fixed;
+			bottom: 0;
+			background: #FFFFFF;
+			.text{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 1;
+				padding: 28upx 0;
+				text-align: center;
+			}
+			.btns{
+				padding: 0upx 30upx;
+				display: flex;
+				flex-direction: row;
+				justify-content: space-between;
+				align-items: center;
+				.left{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+				.right{
+					display: flex;
+					flex-direction: row;
+					justify-content: flex-end;
+					align-items: center;
+					.btn{
+						width: 155upx;
+						height: 64upx;
+						line-height: 64upx;
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						text-align: center;
+						border-radius: 32upx;
+						margin-left: 15upx;
+						&.cancel{
+							border: 1px solid #DDDDDD;
+							color: #666666;
+						}
+					}
+				}
+				
+			}
+			
+		}
+	}
+</style>

+ 545 - 0
pages_user/shopping/storeOrder.vue

@@ -0,0 +1,545 @@
+<template>
+	<view>
+		<view class="top-fixed">
+			<!-- tab切换 -->
+			<view class="pub-tab-box">
+				<view class="tab-inner">
+					<view 
+						v-for="(item,index) in orderStatus" 
+						:key="index"
+						:class="status ==item.value?'item active':'item'"
+						@click="orderStatusChange(item)"
+					>
+						<view class="text">
+							{{ item.name }}
+							<image v-show="status ==item.value" class="tab-bg" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/tab_bg.png" mode=""></image>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="search-cont">
+				<view class="inner">
+					<image class="icon-search" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/search.png" mode=""></image>
+					<input type="text" value="" placeholder="输入订单号" confirm-type="搜索" @confirm="goSearch"   placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+				</view>
+			</view>
+		</view>
+		<view class="top-seat"></view>
+		
+		<!-- 订单列表 -->
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<view class="order-list">
+				<view  v-for="(item,index) in dataList" :key="index" class="item" >
+					<!-- 订单号,状态 -->
+					<view class="ordersn-box" @click="showDetail(item)">
+						<view class="num">订单号:{{item.orderCode}}</view>
+						<view class="status-box">
+							<!-- <view   class="recom-box">推荐订单</view> -->
+							<text   class="text success">
+								{{$getDictLabelName("storeOrderStatus",item.status)}}
+							</text>
+						</view>
+					</view>
+					<!-- 药品列表 -->
+					<view  class="drug-list"  >
+						<view @click="showDetail(item)"  v-if="item.isPackage!=1" v-for="(subItem,subIndex) in item.items" :key="subIndex" class="drug-item" >
+							<view class="img-box">
+								<image :src="JSON.parse(subItem.jsonInfo).image" mode="aspectFill"></image>
+							</view>
+							<view class="drug-info"  >
+								<view>
+									<view class="name-box ellipsis2">
+										<view v-if="subItem.isPrescribe==1" class="tag">处方药</view>{{JSON.parse(subItem.jsonInfo).productName}}
+									</view>
+									<view class="spec ellipsis2">{{JSON.parse(subItem.jsonInfo).sku}}</view>
+								</view>
+								<view class="num-box">
+									<view class="price">
+										<text class="unit">¥</text>
+										<text class="num">{{JSON.parse(subItem.jsonInfo).price.toFixed(2)}}</text>
+									</view>
+									<view class="amount">x{{JSON.parse(subItem.jsonInfo).num}}</view>
+								</view>
+							</view>
+						</view>
+						<view v-if="item.isPackage==1&&item.packageJson!=null" class="drug-item" @click="showDetail(item)">
+							<view class="img-box">
+								<image :src="JSON.parse(item.packageJson).imgUrl" mode="aspectFill"></image>
+							</view>
+							<view class="drug-info"  >
+								<view>
+									<view class="name-box ellipsis2">
+										<view class="tag">套餐</view>{{JSON.parse(item.packageJson).title}}
+									</view>
+									<view class="spec ellipsis2">{{JSON.parse(item.packageJson).descs}}</view>
+								</view>
+								<!-- <view class="num-box">
+									<view class="price">
+										<text class="unit">¥</text>
+										<text class="num">{{JSON.parse(item.packageJson).payMoney.toFixed(2)}}</text>
+									</view>
+									<view class="amount"></view>
+								</view> -->
+							</view>
+						</view>
+						<!-- 实付金额、按钮 -->
+						<view class="bottom-box">
+							<view class="amount-paid">
+								<text class="label">订单金额:</text>
+								<view class="price-box">
+									<view class="unit">¥</view>
+									<view class="num" >{{item.payPrice.toFixed(2)}}</view>
+								</view>
+							</view>
+							<view class="btn-box">
+								<view v-if="item.status == 0" class="btn cancel" @click="cancel(item)">取消订单</view>
+								<view v-if="item.status == 0" class="btn pay" @click="pay(item)">支付</view>
+								<view v-if="item.isAfterSales==1" class="btn cancel" @click="refund(item)">申请售后</view>
+								<view v-if="item.status >=2 &&item.deliveryId!=null" class="btn pay" @click.stop="showDelivery(item)">查看物流</view>
+								<!-- <view v-if="item.status==4" class="btn pay">再次购买</view> -->
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import {getMyStoreOrderList,cancelOrder} from '../api/storeOrder'
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	export default {
+		mixins: [MescrollMixin], 
+		data() {
+			return {
+				searchKey:"",
+				status:0,
+				orderStatus: [
+					{name:"全部",value:""},
+					{name:"待付款",value:"0"},
+					{name:"待发货",value:"1"},
+					{name:"待收货",value:"2"},
+					{name:"已完成",value:"3"}
+				],
+				mescroll:null,
+				// 上拉加载的配置
+				upOption: {
+					onScroll:true,
+					use: true, // 是否启用上拉加载; 默认true
+					page: {
+						num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+						size: 10 // 每页数据的数量,默认10
+					},
+					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					empty: {
+						icon:'/static/images/no_data.png',
+						tip: '暂无数据'
+					}
+				},
+				// 列表数据
+				dataList: [],
+			};
+		},
+		onLoad(option) {
+			this.status = option.status || ""
+			var that=this;
+			uni.$on('refreshOrder', () => {
+				that.mescroll.resetUpScroll()
+			})
+		},
+		methods: {
+			goSearch(e) {
+				this.searchKey=e.detail.value;
+				this.mescroll.resetUpScroll()
+			},
+			refund(item) {
+				uni.navigateTo({
+					url: './refundOrderProduct?orderId='+item.id
+				})	
+			},
+			// tab切换
+			orderStatusChange(item) {
+				this.status = item.value
+				this.mescroll.resetUpScroll()
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				//联网加载数据
+				var that = this;
+				var data = {
+					keyword:this.searchKey,
+					status:this.status,
+					page: page.num,
+					pageSize: page.size
+				};
+				getMyStoreOrderList(data).then(res => {
+					if(res.code==200){
+						//设置列表数据
+						if (page.num == 1) {
+							that.dataList = res.data.list; 
+							
+						} else {
+							that.dataList = that.dataList.concat(res.data.list);
+							 
+						}
+						that.mescroll.endBySize(res.data.list.length, res.data.total);
+						
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						that.dataList = null;
+						that.mescroll.endErr();
+					}
+				});
+			},
+			// 查看订单详情
+			showDetail(item) {
+				console.log(item)
+				uni.navigateTo({
+					url: './storeOrderDetail?id=' + item.id
+				})
+			},
+			cancel(item){
+				var that=this;
+				uni.showModal({
+				    title: '提示',
+				    content: '确定取消订单吗',
+				    success: function (res) {
+				        if (res.confirm) {
+							var data = {
+								orderId:item.id
+							};
+							cancelOrder(data).then(res => {
+								if(res.code==200){
+									uni.showToast({
+										icon:'success',
+										title: "操作成功",
+									});
+									 that.mescroll.resetUpScroll()
+								}else{
+									uni.showToast({
+										icon:'none',
+										title: res.msg,
+									});
+								}
+							});
+				        } 
+						else if (res.cancel) {
+				        }
+				    }
+				});
+			},
+			pay(item) {
+				 uni.navigateTo({
+				 	url: '/pages/shopping/paymentOrder?orderId='+item.id
+				 })
+			},
+			// 查看物流
+			showDelivery(item) {
+				uni.navigateTo({
+					url: './storeOrderDelivery?orderId='+item.id
+				})
+			}
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	.top-fixed{
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 10;
+	}
+	.pub-tab-box{
+		box-sizing: border-box;
+		width: 100%;
+		padding: 0 40upx;
+		background-color: #FFFFFF;
+		.tab-inner{
+			height: 88upx;
+			line-height: 88upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			overflow-x: auto;
+		}
+		.item{
+			font-size: 28upx;
+			white-space: nowrap;
+			line-height: 1;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+			margin-right: 60upx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			&:last-child{
+				margin-right: 0;
+			}
+			&.active{
+				font-weight: bold;
+				color: #333333;
+			}
+			.text{
+				position: relative;
+				z-index: 1;
+			}
+			.tab-bg{
+				width: 72upx;
+				height: 28upx;
+				position: absolute;
+				top: 17upx;
+				left: 50%;
+				transform: translateX(-36upx);
+				z-index: -1;
+			}
+		}
+	}
+	.top-seat{
+		width: 100%;
+		height: 192upx;
+	}
+	.search-cont{
+		padding: 16upx 30upx;
+		background-color: #FFFFFF;
+		.inner{
+			box-sizing: border-box;
+			width: 100%;
+			height: 72upx;
+			background: #F7F7F7;
+			border-radius: 36upx;
+			display: flex;
+			align-items: center;
+			padding: 0 30upx;
+			.icon-search{
+				width: 28upx;
+				height: 28upx;
+				margin-right: 20upx;
+			}
+			input{
+				height: 60upx;
+				line-height: 60upx;
+				flex: 1;
+			}
+		}
+	}
+	.order-list{
+		padding: 20upx;
+		.item{
+			background: #FFFFFF;
+			border-radius: 16upx;
+			padding: 0 30upx;
+			margin-bottom: 20upx;
+			.ordersn-box{
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 34upx 0 20upx;
+				.num{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+				}
+				.status-box{
+					display: flex;
+					align-items: center;
+					.recom-box{
+						width: 108upx;
+						height: 30upx;
+						line-height: 30upx;
+						text-align: left;
+						padding-left: 8upx;
+						font-size: 22upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #FFFFFF;
+						background-image: url('https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/recom.png');
+						background-repeat: no-repeat;
+						background-size: 100% 100%;
+						margin-right: 8upx;
+					}
+					.text{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						line-height: 1;
+						&.success{
+							color: #2BC7B9;
+						}
+						&.black{
+							color: #111111;
+						}
+						&.info{
+							color: #999999;
+						}
+					}
+				}
+			}
+			.drug-list{
+				.drug-item{
+					padding: 30upx 0;
+					border-bottom: 1px soli #F0F0F0;
+					display: flex;
+					align-items: center;
+					.img-box{
+						width: 160upx;
+						height: 160upx;
+						margin-right: 30upx;
+						flex-shrink: 0;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.drug-info{
+						width: calc(100% - 190upx);
+						height: 160upx;
+						display: flex;
+						flex-direction: column;
+						justify-content: space-between;
+						.name-box{
+							font-size: 28upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+							line-height: 40upx;
+							.tag{
+								display: inline-block;
+								padding: 0 6upx;
+								height: 30upx;
+								background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+								border-radius: 4upx;
+								margin-right: 10upx;
+								font-size: 22upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #FFFFFF;
+								line-height: 30upx;
+								float: left;
+								margin-top: 7upx;
+							}
+						}
+						.spec{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+							margin-top: 10upx;
+						}
+						.num-box{
+							display: flex;
+							align-items: center;
+							justify-content: space-between;
+							.price{
+								display: flex;
+								align-items: flex-end;
+								.unit{
+									font-size: 24upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1.2;
+									margin-right: 4upx;
+								}
+								.num{
+									font-size: 32upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1;
+								}
+							}
+							.amount{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #999999;
+								line-height: 1;
+							}
+						}
+					}
+				}
+				.bottom-box{
+					height: 110upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.amount-paid{
+						display: flex;
+						align-items: center;
+						.label{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+						.price-box{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #FF6633;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #FF6633;
+								line-height: 1;
+							}
+						}
+					}
+					.btn-box{
+						box-sizing: border-box;
+						display: flex;
+						align-items: center;
+						.btn{
+							width: 155upx;
+							height: 64upx;
+							line-height: 64upx;
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							text-align: center;
+							border-radius: 32upx;
+							margin-left: 15upx;
+							&:first-child{
+								margin-left: 0;
+							}
+							&.cancel{
+								border: 1px solid #DDDDDD;
+								color: #666666;
+							}
+							&.pay{
+								background: #2BC7B9;
+								color: #FFFFFF;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+	
+</style>

+ 306 - 0
pages_user/shopping/storeOrderDelivery.vue

@@ -0,0 +1,306 @@
+<template>
+	<view>
+		<view class="top-cont">
+			<!-- 背景图片 -->
+			<image class="bg" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/order_top_bg2.png" mode=""></image>
+			<view class="top-inner">			
+				<!-- 这里是状态栏 -->
+				<view class="status_bar" :style="{height: statusBarHeight}"></view>
+				<view class="back-box" @click="back">
+					<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/back_white.png" mode=""></image>
+					<text class="title">物流信息</text>
+					<text></text>
+				</view>
+				<!-- 运单号 -->
+				<view class="waybill-number">
+					<view class="inner">
+						<view class="num-box">
+							<text class="text">运单号</text>
+							<text class="text">{{deliveryId}}</text>
+							<view class="copy" @click="copyOrderSn(deliveryId)">复制</view>
+						</view>
+						<view class="kf-box">
+							<text class="text">{{express.name}}</text>
+							<!-- <text class="text">客服电话:95311</text> -->
+						</view>
+					</view>
+				</view>
+				<view class="content"  v-if="expressList!=null">
+					<!-- 物流信息 -->
+					<view class="refund-steps" v-if="expressList.Traces!=null">
+						<view v-for="(item,index) in expressList.Traces" :key="index" class="steps">
+							<view class="title">
+								<!-- <text v-if="index == 0" class="text black-text">已签收</text> -->
+								<!-- <text  class="text gray-bold">运输中</text> -->
+								<!-- 左侧灰色圆点 -->
+								<view class="dot"></view>
+								<!-- 对号 -->
+								<image  class="img" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/complete.png" mode=""></image>
+								<!-- 运输中图标 -->
+								<image  class="img" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/car40.png" mode=""></image>
+							</view>
+							<view  class="desc-text">
+								{{item.AcceptStation}}
+							</view>
+							 
+							<view class="time">{{item.AcceptTime}}</view>
+						</view>
+					</view>
+				</view>
+				
+			</view>
+			
+		</view>
+		
+	</view>
+</template>
+
+<script>
+	import {getMyStoreOrderById,cancelOrder,getExpress} from '../api/storeOrder'
+	export default {
+		data() {
+			return {
+				statusBarHeight:uni.getStorageSync("menuInfo").statusBarHeight,
+				orderId:null,
+				deliveryId:null,
+				express:{},
+				expressList:[],
+			};
+		},
+		onLoad(option) {
+			this.orderId=option.orderId;
+			this.getExpress();
+		},
+		methods: {
+			getExpress(){
+				var data={orderId:this.orderId};
+				
+				getExpress(data).then(res => {
+					if(res.code==200){
+						this.express=res.express;
+						this.expressList=res.data;
+						this.deliveryId=res.deliveryId
+				 
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						 
+					}
+				});
+			},
+			// 返回上一页
+			back() {
+				uni.navigateBack()
+			},
+			// 复制运单号
+			copyOrderSn(text) {
+				// 复制方法
+				uni.setClipboardData({
+					data:text,
+					success:()=>{
+						uni.showToast({
+							title:'内容已成功复制到剪切板',
+							icon:'none'
+						})
+					}
+				});
+			},
+			// 拨打电话
+			callPhone(phone) {
+				uni.makePhoneCall({
+					phoneNumber: phone
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.top-cont{
+		width: 100%;
+		height: 336upx;
+		position: relative;
+		.bg{
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 1;
+		}
+		.top-inner{
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 2;
+			.back-box{
+				height: 88upx;
+				padding-left: 22upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 20upx;
+				image{
+					width: 40upx;
+					height: 40upx;
+				}
+				.title{
+					font-size: 36upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FFFFFF;
+				}
+			}
+			.waybill-number{
+				padding: 0 20upx;
+				margin-top: 66upx;
+				.inner{
+					box-sizing: border-box;
+					height: 150upx;
+					background: #FFFFFF;
+					border-radius: 16upx;
+					padding: 40upx 30upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					.num-box{
+						display: flex;
+						align-items: center;
+						.text{
+							font-size: 28upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+							line-height: 1;
+							margin-right: 30upx;
+							&:last-child{
+								margin-right: 20upx;
+							}
+						}
+						.copy{
+							width: 58upx;
+							height: 32upx;
+							line-height: 32upx;
+							text-align: center;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #222222;
+							background: #F5F5F5;
+							border-radius: 4upx;
+						}
+					}
+					.kf-box{
+						display: flex;
+						align-items: center;
+						.text{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+							margin-right: 20upx;
+						}
+					}
+				}
+			}
+			
+		}
+	}
+	.content{
+		margin: 20rpx 0rpx;
+		padding: 0 20upx;
+		.refund-steps{
+			background: #FFFFFF;
+			border-radius: 16upx;
+			padding: 40upx 44upx;
+			.steps{
+				padding-left: 40upx;
+				padding-bottom: 56upx;
+				position: relative;
+				&::after{
+					content: "";
+					width: 4upx;
+					height: 100%;
+					background: #F1F1F1;
+					position: absolute;
+					left: 0;
+					top: 20upx;
+				}
+				&:last-child{
+					padding-bottom: 0;
+					&::after{
+						display: none;
+					}
+				}
+				.title{
+					position: relative;
+					.text{
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 38upx;
+						&.black-text{
+							color: #111111;
+							font-weight: bold;
+						}
+						&.gray-bold{
+							font-weight: bold;
+							color: #666666;
+						}
+					}
+					.dot{
+						width: 16upx;
+						height: 16upx;
+						background: #EBEBEB;
+						border-radius: 50%;
+						position: absolute;
+						left: -46upx;
+						top: 11upx;
+						z-index: 10;
+						&.active{
+							background-color: #2BC7B9;
+						}
+					}
+					.img{
+						width: 40upx;
+						height: 40upx;
+						position: absolute;
+						left: -57upx;
+						top: 2upx;
+						z-index: 10;
+					}
+				}
+				.desc-text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 1.6;
+					margin-top: 10upx;
+					.phone{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #2BC7B9;
+						line-height: 1.6;
+					}
+				}
+				.time{
+					font-size: 24upx;
+					font-family: Gilroy;
+					font-weight: 500;
+					color: #999999;
+					margin-top: 10upx;
+				}
+			}
+		}
+		
+	}
+	
+</style>

+ 794 - 0
pages_user/shopping/storeOrderDetail.vue

@@ -0,0 +1,794 @@
+<template>
+	<view>
+		<view class="top-cont">
+			<!-- 背景图片 -->
+			<image class="bg" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/order_top_bg.png" mode=""></image>
+			<view class="top-inner">			
+				<!-- 这里是状态栏 -->
+				<view class="fixed-top-box">
+					<view class="status_bar" :style="{height: statusBarHeight}"></view>
+					<view class="back-box" @click="back">
+						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/back_white.png" mode=""></image>
+						<text class="title">订单详情</text>
+						<text></text>
+					</view>
+				</view>
+				
+				<!-- 顶部固定后站位元素 -->
+				<view style="padding-bottom: 88upx;">
+					<view :style="{height: statusBarHeight}"></view>
+				</view>
+				<!-- 订单状态 -->
+				<view class="order-status">
+					<!-- 待付款 -->
+					<view v-if="order.status == 0" class="inner">
+						<view class="img-box">
+							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/pag96.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">待付款</text>
+							<text class="desc">请在{{payLimitTime}}前完成支付</text>
+						</view>
+					</view>
+					<!-- 待发货 -->
+					<view v-if="order.status == 1" class="inner">
+						<view class="img-box">
+							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/pag96.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">待发货</text>
+							<text class="desc">等待后台发货</text>
+						</view>
+					</view>
+					<!-- 已发货、待收货 -->
+					<view v-if="order.status == 2" class="inner">
+						<view class="img-box">
+							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/receipt.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">待收货</text>
+							<text class="desc">运输中</text>
+						</view>
+					</view>
+					<!-- 已完成 -->
+					<view v-if="order.status == 3" class="inner">
+						<view class="img-box">
+							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/finish96.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">已完成</text>
+							<text class="desc">订单已确认收货,交易完成</text>
+						</view>
+					</view>
+					<!--交易取消 -->
+					<view v-if="order.status == -3" class="inner">
+						<view class="img-box">
+							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/close_trade.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">交易关闭</text>
+							<text class="desc">订单已取消</text>
+						</view>
+					</view>
+					<view v-if="order.status == -1" class="inner">
+						<view class="img-box">
+							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/close_trade.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">申请售后</text>
+							<text class="desc">请等待客服审核</text>
+						</view>
+					</view>
+					<view v-if="order.status == -2" class="inner">
+						<view class="img-box">
+							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/close_trade.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">退款成功</text>
+							<text class="desc">已成功退款</text>
+						</view>
+					</view>
+				</view>
+				<!-- 下单人信息 -->
+				<view class="order-placer">
+					<view class="inner">
+						<image class="location" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/location.png" mode=""></image>
+						<view class="info">
+							<view class="name-phone">
+								<text class="text">{{order.realName}}</text>
+								<text class="text" v-if="order.userPhone!=null">{{$parsePhone(order.userPhone)}}</text>
+							</view>
+							<view class="address ellipsis2">
+								{{order.userAddress}}
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="content">
+					<!-- 药品列表 -->
+					<view class="goods-list">
+						<view v-if="order.isPackage!=1" v-for="(item,index) in items" :key="index" class="item" @click="openDetails(item)">
+							<view class="img-box">
+								<image :src="JSON.parse(item.jsonInfo).image" mode="aspectFill"></image>
+							</view>
+							<view class="info-box">
+								<view>
+									<view class="name-box ellipsis2">
+										<view v-if="item.isPrescribe==1" class="tag">处方药</view>{{JSON.parse(item.jsonInfo).productName}}
+									</view>
+									<view class="spec ellipsis2">{{JSON.parse(item.jsonInfo).sku}}</view>
+								</view>
+								<view class="price-num">
+									<view class="price">
+										<text class="unit">¥</text>
+										<text class="num">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text>
+									</view>
+									<view class="num">x{{JSON.parse(item.jsonInfo).num}}</view>
+								</view>
+							</view>
+						</view>
+						<view  v-if="order.isPackage==1&&order.packageJson!=null"   class="item"  >
+							<view class="img-box">
+								<image :src="JSON.parse(order.packageJson).imgUrl" mode="aspectFill"></image>
+							</view>
+							<view class="info-box">
+								<view>
+									<view class="name-box ellipsis2">
+										<view class="tag">套餐</view>{{JSON.parse(order.packageJson).title}}
+									</view>
+									<view class="spec ellipsis2">{{JSON.parse(order.packageJson).descs}}</view>
+								</view>
+								 
+							</view>
+						</view>
+					 
+						<!-- 已优惠、小计 -->
+						<view class="sub-total">
+							<view class="discount">
+								订单金额:¥{{order.payPrice}}
+							</view>
+							<!-- <text class="label">实付金额:</text>
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{order.payMoney}}</text>
+							</view> -->
+						</view>
+					</view>
+					<!-- 订单信息 -->
+					<view class="order-info">
+						<view class="title">订单信息</view>
+						<view class="item">
+							<text class="label">订单编号</text>
+							<view class="sn-box">
+								<text class="text">{{order.orderCode}}</text>
+								<view class="copy-btn" @click="copyOrderSn(order.orderCode)">复制</view>
+							</view>
+						</view>
+						<view class="item">
+							<text class="label">下单时间</text>
+							<text class="text">{{order.createTime}}</text>
+						</view>
+						<view class="item">
+							<text class="label">支付方式</text>
+							<text class="text" v-if="order.payType==1">微信支付</text>
+							<text class="text" v-if="order.payType==2">物流代收</text>
+						</view>
+						<view   class="item">
+							<text class="label">订单金额</text>
+							<text class="text" v-if="order.totalPrice!=null">¥{{order.totalPrice.toFixed(2)}}</text>
+						</view>
+						
+						<view   class="item">
+							<text class="label">运费</text>
+							<text class="text" v-if="order.payPostage!=null">¥{{order.payPostage.toFixed(2)}}</text>
+						</view>
+						<view   class="item">
+							<text class="label">服务费</text>
+							<text class="text" v-if="order.serviceFee!=null">¥{{order.serviceFee.toFixed(2)}}</text>
+						</view>
+						<view   class="item">
+							<text class="label">优惠金额</text>
+							<text class="text" v-if="order.couponPrice!=null">-¥{{order.couponPrice.toFixed(2)}}</text>
+						</view>
+						<view   class="item">
+							<text class="label">应付金额</text>
+							<text class="text" v-if="order.payPrice!=null">¥{{order.payPrice.toFixed(2)}}</text>
+						</view>
+						<view   class="item">
+							<text class="label">支付金额</text>
+							<text class="text" v-if="order.payMoney!=null">¥{{order.payMoney.toFixed(2)}}</text>
+						</view>
+						<view   class="item">
+							<text class="label">代收金额</text>
+							<text class="text" v-if="order.payDelivery!=null">¥{{order.payDelivery.toFixed(2)}}</text>
+						</view>
+						<view  class="item">
+							<text class="label">支付时间</text>
+							<text class="text" v-if="order.payTime!=null">{{order.payTime}}</text>
+						</view>
+						<!-- <view v-if="order.status >1" class="item">
+							<text class="label">发货时间</text>
+							<text class="text"></text>
+						</view> -->
+						 
+					</view>
+					<!-- 处方信息 -->
+					<view class="order-info" v-if="order.isPrescribe&&prescribe!=null">
+						<view class="title">处方信息</view>
+						<view class="item">
+							<text class="label">处方单号</text>
+							<text class="text">{{prescribe.rpId}}</text>
+						</view>
+						<view class="item" v-if="prescribe.doctorName!=null">
+							<text class="label">开方医生</text>
+							<text class="text">{{prescribe.doctorName}}</text>
+						</view>
+						<view class="item" v-if="prescribe.rpUrl!=null">
+							<text class="label">电子处方</text>
+							<view class="check-box" @click="showImg()">
+								<text class="text">查看</text>
+								<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/arrow4.png" mode=""></image>
+							</view>
+						</view>
+						<view class="item">
+							<text class="label">审核意见</text>
+							<text class="text" v-if="prescribe.auditReason!=null">{{prescribe.auditReason}}</text>
+						</view>
+					</view>
+				</view>
+				
+			</view>
+		</view>
+		<!-- 按钮 -->
+		<view   class="btn-box">
+			<!-- <view class="btn cancel">联系客服</view> -->
+			<view class="btn cancel" v-if="order.status==0" @click="cancel()">取消订单</view>
+			<view class="btn pay" v-if="order.status==0" @click="pay()">立即付款</view>
+			<view class="btn cancel"  v-if="(order.status==0||order.status==1)&&order.isPrescribe==1&&prescribe==null"  @click="addPrescribe()">开处方</view>
+			<view class="btn cancel"  v-if="isAfterSales==1"  @click="refund()">申请售后</view>
+			<view class="btn pay" v-if="order.status>=2&&order.deliveryId!=null" @click="express()">查看物流</view>
+			<view class="btn pay" v-if="order.status==2&&order.payType!=1&&order.isPayRemain==0&&order.deliverySn=='SF'" @click="payRemain()">支付尾款</view>
+			<view class="btn pay" v-if="order.status==2" @click="finish()">确认收货</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getMyStoreOrderById,cancelOrder,express,finishOrder} from '../api/storeOrder'
+	export default {
+		data() {
+			return {
+				isAfterSales:0,
+				payLimitTime:null,
+				orderId:null,
+				order:{},
+				items:[],
+				prescribe:null,
+				// 状态栏的高度
+				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
+		 
+			};
+		},
+		onLoad(option) {
+			this.orderId = option.id
+		},
+		onShow() {
+			this.getMyStoreOrderById()
+		},
+		methods: {
+			openDetails(item){
+				console.log(item)
+				uni.navigateTo({
+					url: '/pages/shopping/productDetails?productId='+item.productId
+				})
+			},
+			addPrescribe(){
+				uni.navigateTo({
+				 	url:"/pages/shopping/prescribe?orderId="+this.order.id
+				})
+			},
+			showImg(){
+				var imgArr = [];
+				imgArr.push(this.prescribe.rpUrl)
+				//预览图片
+				uni.previewImage({
+					urls: imgArr,
+					current: imgArr[0]
+				});
+			},
+			getMyStoreOrderById(){
+				var data={orderId:this.orderId};
+				getMyStoreOrderById(data).then(res => {
+					if(res.code==200){
+						 this.order=res.order;
+						 this.items=res.items;
+						 this.payLimitTime=res.payLimitTime;
+						 this.prescribe=res.prescribe;
+						 this.isAfterSales=res.isAfterSales;
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						 
+					}
+				});
+			},
+			express(){
+				uni.navigateTo({
+					url: './storeOrderDelivery?orderId='+this.order.id
+				})
+			},
+			cancel(){
+				var that=this;
+				uni.showModal({
+				    title: '提示',
+				    content: '确定取消订单吗',
+				    success: function (res) {
+				        if (res.confirm) {
+							var data = {
+								orderId:that.order.id
+							};
+							cancelOrder(data).then(res => {
+								if(res.code==200){
+									 that.getMyStoreOrderById()
+									 uni.$emit('refreshOrder');
+								}else{
+									uni.showToast({
+										icon:'none',
+										title: res.msg,
+									});
+								}
+							});
+				        } 
+						else if (res.cancel) {
+				        }
+				    }
+				});
+			},
+			finish(){
+				var that=this;
+				uni.showModal({
+				    title: '提示',
+				    content: '确定已收货吗',
+				    success: function (res) {
+				        if (res.confirm) {
+							var data = {
+								orderId:that.order.id
+							};
+							finishOrder(data).then(res => {
+								if(res.code==200){
+									 that.getMyStoreOrderById()
+									 uni.$emit('refreshOrder');
+								}else{
+									uni.showToast({
+										icon:'none',
+										title: res.msg,
+									});
+								}
+							});
+				        } 
+						else if (res.cancel) {
+				        }
+				    }
+				});
+			},
+			pay() {
+				 uni.navigateTo({
+				 	url: '/pages_shopping/paymentOrder?orderId='+this.order.id
+				 })
+			},
+			payRemain() {
+				 uni.navigateTo({
+				 	url: '/pages_user/shopping/paymentOrderRemain?orderId='+this.order.id
+				 })
+			},
+			// 返回上一页
+			back() {
+				let pages = getCurrentPages();
+				console.log(pages.length);
+				if(pages.length>1){
+					uni.navigateBack()
+				}
+				else{
+					uni.reLaunch({
+						url:"/pages/common/launch"
+					})
+				}
+				
+			},
+			// 复制订单编号
+			copyOrderSn(text) {
+				// 复制方法
+				uni.setClipboardData({
+					data:text,
+					success:()=>{
+						uni.showToast({
+							title:'内容已成功复制到剪切板',
+							icon:'none'
+						})
+					}
+				});
+			},
+			// 退货
+			refund() {
+				uni.navigateTo({
+					url: './refundOrderProduct?orderId='+this.orderId
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.fixed-top-box{
+		width: 100%;
+		background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 1000;
+	}
+	.top-cont{
+		width: 100%;
+		height: 476upx;
+		position: relative;
+		.bg{
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 1;
+		}
+		.top-inner{
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 2;
+			.back-box{
+				height: 88upx;
+				padding-left: 22upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 20upx;
+				image{
+					width: 40upx;
+					height: 40upx;
+				}
+				.title{
+					font-size: 36upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FFFFFF;
+				}
+			}
+			.order-status{
+				margin-top: 60upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 30upx;
+				.inner{
+					display: flex;
+					align-items: center;
+					.img-box{
+						width: 96upx;
+						height: 96upx;
+						margin-right: 30upx;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.status-box{
+						height: 96upx;
+						display: flex;
+						flex-direction: column;
+						justify-content: center;
+						.status{
+							font-size: 40upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 1;
+						}
+						.desc{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FFFFFF;
+							line-height: 1;
+							margin-top: 30upx;
+						}
+					}
+				}
+			}
+			.order-placer{
+				margin-top: 50upx;
+				padding: 0 20upx;
+				.inner{
+					box-sizing: border-box;
+					border-radius: 16upx;
+					height: 150upx;
+					padding: 40upx 30upx;
+					display: flex;
+					align-items: center;
+					background: #FFFFFF;
+					.location{
+						width: 24upx;
+						height: 27upx;
+						margin-right: 18upx;
+						flex-shrink: 0;
+					}
+					.info{
+						.name-phone{
+							display: flex;
+							align-items: center;
+							.text{
+								font-size: 28upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #333333;
+								line-height: 1;
+								margin-right: 20upx;
+								&:last-child{
+									margin-right: 0;
+								}
+							}
+						}
+						.address{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1.3;
+							margin-top: 10upx;
+						}
+					}
+				}
+				
+			}
+		}
+	}
+	.content{
+		margin: 20rpx 0rpx;
+		padding: 0 20upx 140rpx 20upx;
+		.goods-list{
+			padding: 0 30upx;
+			background-color: #FFFFFF;
+			border-radius: 16upx;
+			.item{
+				padding: 30upx 0;
+				border-bottom: 1px solid #EDEEEF;
+				display: flex;
+				align-items: center;
+				.img-box{
+					width: 160upx;
+					height: 160upx;
+					margin-right: 30upx;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+				.info-box{
+					width: calc(100% - 190upx);
+					height: 160upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					.name-box{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 40upx;
+						.tag{
+							display: inline-block;
+							padding: 0 6upx;
+							height: 30upx;
+							background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+							border-radius: 4upx;
+							margin-right: 10upx;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 30upx;
+							float: left;
+							margin-top: 7upx;
+						}
+					}
+					.spec{
+						margin-top: 18upx;
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						line-height: 1;
+					}
+					.price-num{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.price{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1;
+							}
+						}
+						.num{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+					}
+				}
+			}
+			.sub-total{
+				height: 88upx;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				.discount{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+					margin-right: 30upx;
+				}
+				.label{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 4upx;
+					}
+					.num{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+		}
+		.order-info{
+			margin-top: 20upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			padding: 40upx 30upx;
+			.title{
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #222222;
+				line-height: 1;
+			}
+			.item{
+				margin-top: 40upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				.label{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 1;
+				}
+				.text{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #222222;
+					line-height: 32upx;
+				}
+				.cont-text{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					.bold{
+						color: #111111;
+					}
+				}
+				.sn-box{
+					display: flex;
+					align-items: center;
+					.copy-btn{
+						width: 58upx;
+						height: 32upx;
+						line-height: 32upx;
+						text-align: center;
+						font-size: 22upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						background: #F5F5F5;
+						border-radius: 4upx;
+						margin-left: 24upx;
+					}
+				}
+				.check-box{
+					display: flex;
+					align-items: center;
+					image{
+						width: 14upx;
+						height: 24upx;
+						margin-left: 10upx;
+					}
+				}
+			}
+			.line{
+				width: 100%;
+				height: 1px;
+				background: #F0F0F0;
+				margin-top: 30upx;
+			}
+		}
+	}
+	.btn-box{
+		z-index: 999;
+		bottom: 0;
+		width: 100%;
+		position: fixed;
+		height: 120upx;
+		box-sizing: border-box;
+		background: #FFFFFF;
+		padding: 0 30upx;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		.btn{
+			width: 155upx;
+			height: 64upx;
+			line-height: 64upx;
+			font-size: 26upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			text-align: center;
+			border-radius: 32upx;
+			margin-left: 15upx;
+			&.cancel{
+				border: 1px solid #DDDDDD;
+				color: #666666;
+			}
+			&.pay{
+				background: #2BC7B9;
+				color: #FFFFFF;
+			}
+		}
+	}
+</style>

+ 7 - 0
utils/common.js

@@ -65,6 +65,13 @@ export function isLoginCourse() {
  	return name;
  }
 
+export function getDict(key) {
+	var dicts = uni.getStorageSync('dicts');
+	dicts=JSON.parse(dicts);
+	var dict=dicts[key]
+	return dict;
+}
+
 export function parseText(txt,len) {
 	if(txt.length>len){
 		var text=txt.substr(0,len)+"..."

+ 55 - 0
utils/tools.js

@@ -207,4 +207,59 @@ export function caculateTimeago(dateTimeStamp,type) {
   	  }
     }
     return result;
+  }
+  
+  /**
+   * 格式销售数量
+   * @param {Number} 数字
+   */
+export function formatSalesNum(saleNum) {
+  	const num = Number(saleNum || 0)
+  	if (num < 1000) {
+  		return num
+  	}else if (num < 10000 && num >= 1000) {
+  		let numArr = ((num / 1000) + '').split('.')
+  		if (numArr.length > 1) {
+  			if (numArr[1][0] === '0') {
+  				return numArr[0] + '000+'
+  			} else {
+  				return numArr[0] + numArr[1][0] + '00+'
+  			}
+  		} else {
+  			return (numArr[0] + '000+')
+  		}
+  	} else if (num < 10000000 && num >= 10000) {
+  		let numArr = ((num / 10000) + '').split('.')
+  		if (numArr.length > 1) {
+  			if (numArr[1][0] === '0') {
+  				return numArr[0] + '万+'
+  			} else {
+  				return numArr[0] + '.' + numArr[1][0] + '万+'
+  			}
+  		} else {
+  			return (numArr[0] + '万+')
+  		}
+  	} else if (num > 100000000 && num >= 10000000) {
+  		let numArr = ((num / 10000000) + '').split('.')
+  		if (numArr.length > 1) {
+  			if (numArr[1][0] === '0') {
+  				return numArr[0] + '千万+'
+  			} else {
+  				return numArr[0] + '.' + numArr[1][0] + '千万+'
+  			}
+  		} else {
+  			return (numArr[0] + '千万+')
+  		}
+  	} else {
+  		let numArr = ((num / 100000000) + '').split('.')
+  		if (numArr.length > 1) {
+  			if (numArr[1][0] === '0') {
+  				return numArr[0] + '亿+'
+  			} else {
+  				return numArr[0] + '.' + numArr[1][0] + '亿+'
+  			}
+  		} else {
+  			return (numArr[0] + '亿+')
+  		}
+  	}
   }