XSLu08042 1 tháng trước cách đây
mục cha
commit
cda1298d95
50 tập tin đã thay đổi với 7669 bổ sung5239 xóa
  1. 107 97
      api/myStoreOrder.js
  2. 1 1
      common/request.js
  3. 14 5
      components/medicineItem.vue
  4. 314 0
      components/px-popup-bottom.vue
  5. 129 123
      pages.json
  6. 2 2
      pages/index/index.vue
  7. 1 1
      pages/index/indexOld.vue
  8. 1 1
      pages/user/index.vue
  9. 103 0
      pages_company/alipayImg.vue
  10. 35 0
      pages_company/api/companyOrder.js
  11. 17 0
      pages_company/api/companyUser.js
  12. 9 17
      pages_company/auth/login.vue
  13. 0 260
      pages_company/bindInfo.vue
  14. 106 0
      pages_company/card.vue
  15. 379 0
      pages_company/coupon.vue
  16. 91 91
      pages_company/couponDetails.vue
  17. 0 460
      pages_company/couponList.vue
  18. 98 72
      pages_company/index.vue
  19. 0 649
      pages_company/inquiryOrderDetails.vue
  20. 0 407
      pages_company/inquiryOrderList.vue
  21. 561 0
      pages_company/order/cart.vue
  22. 447 0
      pages_company/order/confirmCompanyOrder.vue
  23. 572 0
      pages_company/order/confirmOrder.vue
  24. 364 0
      pages_company/order/coupon.vue
  25. 1522 0
      pages_company/order/productDetails.vue
  26. 545 0
      pages_company/order/productList.vue
  27. 1492 0
      pages_company/order/productShowDetails.vue
  28. 0 853
      pages_company/packageDetails.vue
  29. 0 536
      pages_company/packageList.vue
  30. 0 465
      pages_company/packageOrderDetails.vue
  31. 0 398
      pages_company/packageOrderList.vue
  32. 127 175
      pages_company/storeOrder.vue
  33. 0 300
      pages_company/storeOrderDelivery.vue
  34. 320 169
      pages_company/storeOrderDetail.vue
  35. 2 2
      pages_im/pages/common/livePage/index.vue
  36. 1 1
      pages_order/inquirySelect.vue
  37. 1 1
      pages_order/inquirySelectType.vue
  38. 4 1
      pages_order/packageOrderPay.vue
  39. 3 0
      pages_order/storeOrderPay.vue
  40. 266 128
      pages_shopping/confirmCreateOrder.vue
  41. 1 1
      pages_shopping/confirmOrder.vue
  42. 3 3
      pages_shopping/confirmPackageOrder.vue
  43. 8 2
      pages_shopping/paymentOrder.vue
  44. 11 12
      pages_shopping/productDetails.vue
  45. 1 2
      pages_shopping/productList.vue
  46. 5 1
      pages_shopping/success.vue
  47. 1 1
      pages_shopping/user/otherPaySuccess.vue
  48. 1 1
      pages_user/agreement.vue
  49. 1 1
      pages_user/cert.vue
  50. 3 0
      pages_user/integralOrderPay.vue

+ 107 - 97
api/myStoreOrder.js

@@ -1,100 +1,110 @@
 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 getStoreOrderByCombinationId(data) {
-  	 return request('/store/app/storeOrder/getStoreOrderByCombinationId',data,'GET');
-  }
-  export function otherPaymentByCombinationId(data) {
-  	 return request('/store/app/storeOrder/otherPaymentByCombinationId',data,'POST','application/json;charset=UTF-8');
-  }
- export function confirm(data) {
-	 return request('/store/app/storeOrder/confirmMultiStore',data,'POST','application/json;charset=UTF-8');
- 	 // return request('/store/app/storeOrder/confirm',data,'POST','application/json;charset=UTF-8');
- }
- export function computed(data) {
-	 return request('/store/app/storeOrder/computedMultiStore',data,'POST','application/json;charset=UTF-8');
- 	 // return request('/store/app/storeOrder/computed',data,'POST','application/json;charset=UTF-8');
- }
- export function create(data) {
-	 return request('/store/app/storeOrder/createMultiStore',data,'POST','application/json;charset=UTF-8');
- 	 // 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 payByCombinationId(data) {
- 	 return request('/store/app/storeOrder/payByCombinationId',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 editPayTypeByCombinationId(data) {
-  	 return request('/store/app/storeOrder/editPayTypeByCombinationId',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');
- } 
-
- export function addOrderComment(data) {
- 	 return request('/store/app/storeOrder/addOrderComment',data,'POST','application/json;charset=UTF-8');
- }
- 
- export function selectCommentByUser(data) {
- 	 return request('/store/app/storeOrder/selectFsStoreOrderScrmCommentByUser',data,'POST','application/json;charset=UTF-8');
- }
- export function orderPrescription(id) {
- 	 return request('/store/app/storeOrder/orderPrescription/'+id,null,'GET');
- }
+
+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 getStoreOrderByCombinationId(data) {
+	return request('/store/app/storeOrder/getStoreOrderByCombinationId', data, 'GET');
+}
+export function otherPaymentByCombinationId(data) {
+	return request('/store/app/storeOrder/otherPaymentByCombinationId', data, 'POST', 'application/json;charset=UTF-8');
+}
+export function confirm(data, type) {
+	if (type == 1) {
+		return request('/store/app/storeOrder/confirm', data, 'POST', 'application/json;charset=UTF-8');
+	} else {
+		return request('/store/app/storeOrder/confirmMultiStore', data, 'POST', 'application/json;charset=UTF-8');
+	}
+}
+export function computed(data, type) {
+	if (type == 1) {
+		return request('/store/app/storeOrder/computed', data, 'POST', 'application/json;charset=UTF-8');
+	} else {
+		return request('/store/app/storeOrder/computedMultiStore', data, 'POST', 'application/json;charset=UTF-8');
+	}
+}
+export function create(data, type) {
+	if (type == 1) {
+		return request('/store/app/storeOrder/create', data, 'POST', 'application/json;charset=UTF-8');
+	} else {
+		return request('/store/app/storeOrder/createMultiStore', 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 payByCombinationId(data) {
+	return request('/store/app/storeOrder/payByCombinationId', 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 editPayTypeByCombinationId(data) {
+	return request('/store/app/storeOrder/editPayTypeByCombinationId', 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');
+}
+
+export function addOrderComment(data) {
+	return request('/store/app/storeOrder/addOrderComment', data, 'POST', 'application/json;charset=UTF-8');
+}
+
+export function selectCommentByUser(data) {
+	return request('/store/app/storeOrder/selectFsStoreOrderScrmCommentByUser', data, 'POST',
+		'application/json;charset=UTF-8');
+}
+export function orderPrescription(id) {
+	return request('/store/app/storeOrder/orderPrescription/' + id, null, 'GET');
+}

+ 1 - 1
common/request.js

@@ -7,7 +7,7 @@ export default class Request {
 
 		var path = 'https://storeuserapp.bjyjbao.com'; //正式
 		// var path = "https://3ce64c10ba0e.ngrok-free.app"
-		// var path = "http://pc73965f.natappfree.cc"
+		// var path = "http://q8956b49.natappfree.cc"
 		// var path = "http://192.168.10.126:8113"
 		let token="";
 		let type = 0

+ 14 - 5
components/medicineItem.vue

@@ -16,7 +16,7 @@
 				<view class="desc ellipsis">批准文号:{{ item.drugRegCertNo || '--' }}</view>
 				<view class="desc ellipsis">生产厂家:{{ item.mah || '--' }}</view>
 				<!-- <view class="desc"><text style="color: #2583EB;margin: 0 10rpx;">{{item.storeCount||0}}</text> 商家销售 </view> -->
-				<view class="price-box x-bc">
+				<view class="price-box x-bc es-mr-20">
 					<view>
 						<text class="price-box-unit">¥</text>
 						<text class="price-box-integer">{{splitPrice(item.price || 0).intPart}}</text>
@@ -24,7 +24,10 @@
 						<!-- <text class="price-box-text">/日</text> -->
 						<!-- <text class="old" v-show="item.price!=item.otPrice&&item.otPrice!==null&&item.otPrice!==undefined">¥{{item.otPrice.toFixed(2)}}</text> -->
 					</view>
-					<view class="desc" v-if="type!='store'"><text style="color: #2583EB;margin: 0 10rpx;">{{item.storeCount||0}}</text> 商家销售 </view>
+					<view class="desc ellipsis" style="text-align: right;" v-if="type!='store'&&type!='zd'">
+						<text style="color: #2583EB;margin: 0 10rpx;">{{item.storeCount||0}}</text> 商家销售 
+					</view>
+					<view class="desc ellipsis" style="text-align: right;" v-if="type=='zd'">{{item.storeName}}</view>
 				</view>
 			</view>
 		</view>
@@ -59,9 +62,15 @@
 			  return { intPart, decPart: decPart.padEnd(2, '0').slice(0, 2) };
 			},
 			showProduct() {
-				uni.navigateTo({
-					url: '/pages_shopping/productDetails?productId=' + this.item.productId+'&storeId='+this.storeId || ''
-				})
+				if(this.type=='zd') {
+					uni.navigateTo({
+						url: '/pages_company/order/productDetails?productId=' + this.item.productId+'&storeId='+this.storeId || ''
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages_shopping/productDetails?productId=' + this.item.productId+'&storeId='+this.storeId || ''
+					})
+				}
 			},
 		}
 	}

+ 314 - 0
components/px-popup-bottom.vue

@@ -0,0 +1,314 @@
+<template>
+	<view :class="['popup',{'popup-show':show}]" @mousewheel.prevent.stop @touchmove.stop.prevent
+		:style="{'z-index':zindex}">
+		<view class="mask" :style="{'z-index':maskZindex,bottom:bottom+'rpx'}" v-show="show" @click.stop="onClose"
+			@touchmove.prevent.stop></view>
+		<view :class="['content',{show}]" @click.stop @touchmove.prevent.stop :style="{'background-color':bgColor,height:`${height}px`,maxHeight:show ? cotMaxHeight:0,'border-top-right-radius':cotRadius,
+			'border-top-left-radius':cotRadius,transition: `all ${animaTime}s ease-in`,bottom:bottom+'rpx','z-index':zindex}">
+			<view id="title-bar" class="title-bar" v-show="title">
+				<view class="title" :style="{fontWeight:fontweight}">{{title}}</view>
+				<view class="close-wrap" @click.stop="onClose">
+					<image class="close-icon" :src="closeIcon" mode="widthFix"></image>
+				</view>
+			</view>
+			<view class="scroll-wrap">
+				<scroll-view :class="{'scroll-view':isAnimaStart}" scroll-y="true" style="height:100%;"
+					@scrolltolower="onScrollToLower">
+					<view id="popup_content" class="popup_content">
+						<slot></slot>
+					</view>
+				</scroll-view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			title: { //标题
+				type: String,
+				default: ''
+			},
+			fontweight: {
+				type: [String, Number],
+				default: 'normal'
+			},
+			visible: { //隐藏显示标识
+				type: Boolean,
+				default: false
+			},
+			maxHeight: { //内容区域最大高度
+				type: [String, Number],
+				default: '75%'
+			},
+			radius: { //顶部圆角
+				type: [String, Number],
+				default: '0'
+			},
+			animaTime: { //弹窗动画时间
+				type: Number,
+				default: 0.2
+			},
+			bottom: { //离底部距离
+				type: [String, Number],
+				default: 0
+			},
+			bgColor: {
+				type: [String],
+				default: '#ffffff'
+			},
+			zindex: {
+				type: [String, Number],
+				default: 1000
+			},
+			maskZindex: {
+				type: [String, Number],
+				default: 999
+			},
+			always: { //是否每次打开都重新计算内容高度
+				type: Boolean,
+				default: false
+			},
+
+		},
+		data() {
+			return {
+				show: false,
+				height: 0,
+				PopHeight: 0,
+				cotMaxHeight: '',
+				isAnimaStart: false,
+				rpxRate: "",
+				cotRadius: 0,
+				closeIcon: 'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/close40.png'
+			}
+		},
+		watch: {
+			visible(newval) {
+				this.isAnimaStart = true;
+				setTimeout(() => {
+					this.isAnimaStart = false;
+				}, this.animaTime * 1000)
+
+				if (newval && this.height === 0) {
+					if (this.PopHeight === 0 || this.always) {
+						this.setContViewHeight();
+
+					} else {
+						this.height = this.PopHeight
+					}
+
+					// #ifdef H5 
+					this.setBodyOverFlow('hidden') //阻止滚动穿透
+					//#endif
+					this.$emit('open')
+
+				} else {
+					this.height = 0;
+					// #ifdef H5 
+					this.setBodyOverFlow('visible')
+					//#endif
+
+				}
+
+				this.show = newval
+
+			},
+			maxHeight: {
+				handler(newval) {
+					this.cotMaxHeight = this.unitCheck(newval);
+
+				},
+				immediate: true
+			},
+			radius: {
+				handler(newval) {
+					this.cotRadius = this.unitCheck(newval);
+
+				},
+				immediate: true
+			}
+		},
+		created() {
+			this.rpxRate = this.getRpxRate()
+		},
+		mounted() {
+			this.$nextTick(() => {
+				// #ifdef H5
+				this.preventTouch(document.querySelector(
+					'.scroll-wrap .uni-scroll-view .uni-scroll-view')); //防止浏览器报错
+				//#endif
+			})
+		},
+		methods: {
+			onClose() {
+				this.$emit("update:visible", false);
+				this.$emit('close')
+			},
+			//触底
+			onScrollToLower(e) {
+				this.$emit("reachBottom");
+			},
+			getRpxRate() {
+				let res = uni.getSystemInfoSync();
+				let width = res.windowWidth;
+				let rate = 750.00 / width;
+				return rate
+			},
+			unitCheck(value) {
+				const val = String(value);
+				if (!val.includes('px') && !val.includes('%')) {
+					return `${val}rpx`;
+				}
+				return val;
+
+			},
+			preventTouch(el) {
+				el.addEventListener('touchmove', function(e) {
+					e.stopPropagation();
+
+				}, {
+					passive: false
+				});
+			},
+			setBodyOverFlow(val) {
+				document.body.style.overflow = val
+			},
+
+			//设置内容区域高度
+			async setContViewHeight() {
+				let data = await this.computeHeight();
+				this.height = data.height + (this.title ? 100 / parseFloat(this.rpxRate) : 0);
+				this.PopHeight = this.height;
+			},
+			//计算内容区域高度
+			computeHeight() {
+				return new Promise(resolve => {
+					this.$nextTick(() => {
+						const query = uni.createSelectorQuery().in(this);
+						query.select('#popup_content').boundingClientRect(data => {
+							resolve(data)
+						}).exec();
+					})
+				})
+			}
+
+		}
+
+
+	}
+</script>
+
+<style lang="scss" scoped>
+	.popup {
+
+		&.popup-show {
+			position: fixed;
+			top: 0;
+			right: 0;
+			left: 0;
+			bottom: 0;
+			overflow: hidden;
+			z-index: 999;
+		}
+
+		.mask {
+			position: fixed;
+			top: 0;
+			right: 0;
+			bottom: 0;
+			left: 0;
+			background-color: rgba($color: #000000, $alpha: 0.5);
+			z-index: 999;
+		}
+
+		.content {
+			position: fixed;
+			bottom: 0;
+			left: 0;
+			right: 0;
+			height: 0;
+			height: auto;
+			background-color: #ffffff;
+			transition: all 0.2s ease-in;
+			z-index: 1000;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			overflow: hidden;
+
+			.title-bar {
+				width: 100%;
+				flex-shrink: 0;
+				text-align: center;
+				position: relative;
+				padding: 10rpx 70rpx 0;
+				box-sizing: border-box;
+				height: 80rpx;
+
+				.title {
+					font-size: 34upx;
+					font-family: PingFang SC;
+					font-weight: bold !important;
+					color: #111111;
+					width: 100%;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+				}
+
+				.close-wrap {
+					position: absolute;
+					top: 20rpx;
+					right: 10rpx;
+					padding: 10rpx 20rpx;
+					box-sizing: border-box;
+				}
+
+				.close-icon {
+					width: 40rpx;
+					height: 40rpx;
+				}
+			}
+
+			.scroll-wrap {
+				flex: 1;
+				height: 0;
+				width: 100%;
+			}
+
+			&.visible {
+				max-height: 75%;
+				overflow-y: hidden;
+				height: auto;
+
+			}
+		}
+	}
+
+	.scroll-view ::-webkit-scrollbar {
+		display: none !important;
+		width: 0 !important;
+		height: 0 !important;
+		-webkit-appearance: none;
+		background: transparent;
+
+	}
+
+	.popup_content {
+		width: 100%;
+		padding: 0rpx 30rpx;
+		box-sizing: border-box;
+
+		&::after {
+			display: block;
+			width: 100%;
+			content: "\00A0";
+			overflow: hidden;
+			opacity: 0;
+			height: 1rpx;
+		}
+
+	}
+</style>

+ 129 - 123
pages.json

@@ -1477,135 +1477,141 @@
 			"root": "pages_company",
 			"pages": [
 				{
-				    "path" : "login",
-				    "style" :                                                                                    
-				    {
-				        "navigationBarTitleText": "客服登录",
-						"navigationBarTextStyle": "black",
-						"navigationBarBackgroundColor": "#ffffff"
-				    }
-				    
+					"path": "auth/login",
+					"style": {
+						"navigationBarTitleText": "销售员登录",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
 				},
 				{
-				    "path" : "index",
-				    "style" :                                                                                    
-				    {
-				        "navigationBarTitleText": "首页",
-						"navigationBarTextStyle": "black",
-						"navigationBarBackgroundColor": "#ffffff"
-				    }
-				    
-				}
-				,{
-				    "path" : "packageList",
-				    "style" :                                                                                    
-				    {
-				        "navigationBarTitleText": "健康疗法",
-						"navigationBarTextStyle": "black",
-						"navigationBarBackgroundColor": "#ffffff"
-				    }
-				    
-				}
-				,{
-				    "path" : "packageDetails",
-				    "style" :                                                                                    
-				    {
-				        "navigationBarTitleText": "健康疗法详情",
-						"navigationBarTextStyle": "black",
-						"navigationBarBackgroundColor": "#ffffff"
-				    }
-				    
-				}
-				,{
-				    "path" : "packageOrderList",
-				    "style" :                                                                                    
-				    {
-				        "navigationBarTitleText": "疗法订单",
-						"navigationBarTextStyle": "black",
-						"navigationBarBackgroundColor": "#ffffff"
-				    }
-				    
-				}
-				,{
-				    "path" : "packageOrderDetails",
-				    "style" :                                                                                    
-				    {
-				        "navigationBarTitleText": "订单详情"
-				    }
-				    
-				}
-				,{
-				    "path" : "couponList",
-				    "style" :                                                                                    
-				    {
-				        "navigationBarTitleText": "优惠券列表"
-				    }
-				    
-				}
-				,{
-				    "path" : "couponDetails",
-				    "style" :                                                                                    
-				    {
-				        "navigationBarTitleText": "优惠券详情"
-				    }
-				    
-				}
-				,{
-				    "path" : "inquiryOrderList",
-				    "style" :                                                                                    
-				    {
-				        "navigationBarTitleText": "问诊订单",
-						"navigationBarTextStyle": "black",
-						"navigationBarBackgroundColor": "#ffffff"
-				    }
-				    
-				}
-				,{
-				    "path" : "inquiryOrderDetails",
-				    "style" :                                                                                    
-				    {
-				        "navigationBarTitleText": "订单详情"
-				    }
-				    
-				}
-				,{
-				    "path" : "storeOrderList",
-				    "style" :                                                                                    
-				    {
-				        "navigationBarTitleText": "药品订单",
-						"navigationBarTextStyle": "black",
-						"navigationBarBackgroundColor": "#ffffff"
-				    }
-				    
-				}
-				,{
-				    "path" : "storeOrderDetail",
-				    "style" :                                                                                    
-				    {
-				        "navigationBarTitleText": "订单详情"
-				    }
-				    
-				}
-				,{
-				    "path" : "storeOrderDelivery",
-				    "style" :                                                                                    
-				    {
-				        "navigationBarTitleText": "快递信息"
-				    }
-				    
+					"path": "index",
+					"style": {
+						"navigationBarTitleText": "销售管理首页",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "storeOrder",
+					"style": {
+						"navigationBarTitleText": "订单管理",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
 				}
 				,{
-					"path" : "bindInfo",
+					"path" : "storeOrderDetail",
 					"style" :                                                                                    
 					{
-				        "navigationBarTitleText" : "",
-				        "enablePullDownRefresh": false,
-				        "navigationBarBackgroundColor":"#f7f7f7",
-				        "navigationBarTextStyle":"black"
-				    }
-				    
- 				}
-				 
+						"navigationBarTitleText": "订单详情",
+						"navigationStyle": "custom",
+						"enablePullDownRefresh": false
+					}
+					
+				},
+				{
+					"path": "coupon",
+					"style": {
+						"navigationBarTitleText": "优惠券",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "couponDetails",
+					"style": {
+						"navigationBarTitleText": "优惠券详情",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "order/productList",
+					"style": {
+						"navigationBarTitleText": "商品列表",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "order/productDetails",
+					"style": {
+						"navigationBarTitleText": "商品详情",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "order/cart",
+					"style": {
+						"navigationBarTitleText": "购物车",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "order/confirmOrder",
+					"style": {
+						"navigationBarTitleText": "推荐订单信息",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "order/confirmCompanyOrder",
+					"style": {
+						"navigationBarTitleText": "推荐订单",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "order/coupon",
+					"style": {
+						"navigationBarTitleText": "制单优惠券",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "order/productShowDetails",
+					"style": {
+						"navigationBarTitleText": "商品详情",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "alipayImg",
+					"style": {
+						"navigationBarTitleText": "支付宝收款",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "card",
+					"style": {
+						"navigationBarTitleText": "销售名片",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				}
 			]
 		},
 		{

+ 2 - 2
pages/index/index.vue

@@ -457,7 +457,7 @@
 				
 			},
 			getQual(){
-				let param = {key:"his.zzzs"};
+				let param = {key:"his.zzzs",appId:wx.getAccountInfoSync().miniProgram.appId,};
 				getConfigByKey(param).then(
 					res => {
 						if(res.code==200){
@@ -469,7 +469,7 @@
 			},
 			getConfigByKey(key){
 				var that=this;
-				var data={key:key}
+				var data={key:key,appId:wx.getAccountInfoSync().miniProgram.appId,}
 				getConfigByKey(data).then(
 					res => {
 						if(res.code==200){

+ 1 - 1
pages/index/indexOld.vue

@@ -391,7 +391,7 @@
 			},
 			getConfigByKey(key){
 				var that=this;
-				var data={key:key}
+				var data={key:key,appId:wx.getAccountInfoSync().miniProgram.appId,}
 				getConfigByKey(data).then(
 					res => {
 						if(res.code==200){

+ 1 - 1
pages/user/index.vue

@@ -364,7 +364,7 @@
 								 })
 							} else {
 								uni.navigateTo({
-									url: '/pages_company/login'
+									url: '/pages_company/auth/login'
 								})
 							}
 						}

+ 103 - 0
pages_company/alipayImg.vue

@@ -0,0 +1,103 @@
+<template>
+  <view class="content">
+    <view class="images">
+       <image class="slide-image" :src="url" mode="widthFix" show-menu-by-longpress />
+    </view>
+	<view class="btn-box">
+		<view class="btn" @click="shareQr()">分享</view>
+	</view>
+    
+  </view>
+</template>
+<script>
+ 
+import {getUserInfo,getQrImg} from './api/companyUser.js'
+export default {
+  name: 'Poster',
+  components: {
+  },
+  props: {},
+  data: function() {
+    return {
+       url:null,
+    }
+  },
+  mounted: function() {
+    this.getQrImg()
+  },
+  methods: {
+	getQrImg(){
+	  	var data={token:uni.getStorageSync('CompanyUserToken')}
+	  	getQrImg(data).then(
+	  		res => {
+	  			var path=uni.getStorageSync('requestPath')
+	  			this.url =path+ "/"+res.url
+	  		},
+	  		rej => {}
+	  	);
+	},
+	shareQr(){
+		wx.downloadFile({
+		    url: this.url,
+		    success: (res) => {
+		      wx.showShareImageMenu({
+		        path: res.tempFilePath
+		      })
+		    }
+		})
+	},
+     
+     
+  },
+}
+</script>
+
+<style lang="less">
+page {
+	height: 100%;
+}
+
+.content {
+	width: 100%;
+	height: 100%;
+  
+}
+
+.images {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	height: 100%;
+}
+
+.images .slide-image {
+	width: 80%;
+	height: auto;
+}
+.btn-box{
+ 	height: 140upx;
+ 	z-index: 9999;
+ 	width: 100%;
+ 	padding: 0rpx 30upx;
+ 	position: fixed;
+ 	bottom: 0;
+ 	left: 0;
+ 	box-sizing: border-box;
+ 	background-color: #ffffff;
+ 	display: flex;
+ 	align-items: center;
+ 	justify-content: center;
+ 	.btn{
+ 		width: 100%;
+ 		height: 88upx;
+ 		line-height: 88upx;
+ 		text-align: center;
+ 		font-size: 34upx;
+ 		font-family: PingFang SC;
+ 		font-weight: 400;
+ 		color: #FFFFFF;
+ 		background:#2BC7B9 !important;
+ 		border-radius: 44upx;
+ 	}
+ }
+</style>

+ 35 - 0
pages_company/api/companyOrder.js

@@ -0,0 +1,35 @@
+import Request from '@/common/request.js';
+let request = new Request().http
+ 
+ export function getSalesProducts(data) {
+ 	 return request('/store/app/companyOrder/getSalesProducts',data,'GET');
+ }
+ // 多店铺
+ // export function createSalesOrder(data) {
+ // 	 return request('/store/app/companyOrder/createSalesOrder',data,'POST','application/json;charset=UTF-8');
+ // }
+ export function createSalesOrder(data) {
+ 	 return request('/store/app/companyOrder/createSalesOrder',data,'GET' );
+ }
+ export function updateSalseOrderMoney(data) {
+ 	 return request('/store/app/companyOrder/updateSalseOrderMoney',data,'GET' );
+ }
+ // 多店铺修改实付金额
+ export function updateSaleOrderMoney(data) {
+ 	 return request('/store/app/companyOrder/updateSaleOrderMoney',data,'POST','application/json;charset=UTF-8');
+ }
+ 
+ export function getSalesOrder(data) {
+ 	 return request('/store/app/companyOrder/getSalesOrder',data,'GET' );
+ }
+ export function getSalesOrders(data) {
+ 	 return request('/store/app/companyOrder/getSalesOrders',data,'GET' );
+ }
+ export function addUserCart(data) {
+ 	 return request('/store/app/companyOrder/addUserCart',data,'GET' );
+ }
+ 
+ export function editOrderMoney(data) {
+ 	 return request('/store/app/companyOrder/editOrderMoney',data,'GET' );
+ }
+ 

+ 17 - 0
pages_company/api/companyUser.js

@@ -0,0 +1,17 @@
+import Request from '@/common/request.js';
+let request = new Request().http
+
+export function login(data) {
+	return request('/app/companyUser/login', data, 'POST', 'application/json;charset=UTF-8');
+}
+
+export function getUserInfo(data) {
+	return request('/app/companyUser/getUserInfo', data, 'GET', 'application/json;charset=UTF-8');
+}
+export function getQrImg(data) {
+	return request('/app/companyUser/getQrImg', data, 'GET', 'application/json;charset=UTF-8');
+}
+
+export function getCompanyUserCard(data) {
+	return request('/app/companyUser/getCompanyUserCard', data, 'GET', 'application/json;charset=UTF-8');
+}

+ 9 - 17
pages_company/login.vue → pages_company/auth/login.vue

@@ -19,7 +19,7 @@
 </template>
 
 <script>
-import {login} from '@/api/companyUser'
+import {login} from '../api/companyUser.js'
 export default {
   data() {
     return {
@@ -28,17 +28,6 @@ export default {
 			password:null,
 		}
     }
-  },
-  computed: {
-  },
-  onLoad() {
-  },
-  onHide() {
-  },
-  onUnload() {
-  },
-  mounted() {
-    
   },
   methods: {
 	submit(){
@@ -49,10 +38,12 @@ export default {
 	 				 	icon:'success',
 	 				 	title: "登录成功",
 	 				 });
-					 uni.setStorageSync('companyId',res.user.companyId);
-					 uni.setStorageSync('companyUserId',res.user.userId);
 					 uni.setStorageSync('CompanyUserToken',res.companyUserToken);
-					 uni.redirectTo({
+					 //写入TOKEN
+					 uni.navigateBack({
+						delta:1,//返回层数,2则上上页
+					 })
+					 uni.navigateTo({
 					 	url: '/pages_company/index'
 					 }) 
 	 				
@@ -78,7 +69,8 @@ export default {
 	.content{
 		display: flex;
 		flex-direction: column;
-		justify-content: flex-start;
+		justify-content: space-between;
+		
 		.inner{
 			padding: 20upx;
 			.form-box{
@@ -133,7 +125,7 @@ export default {
 				font-family: PingFang SC;
 				font-weight: bold;
 				color: #FFFFFF;
-				background: #2583EB;
+				background: #2BC7B9;
 				border-radius: 44upx;
 			}
 		}

+ 0 - 260
pages_company/bindInfo.vue

@@ -1,260 +0,0 @@
-<template>
-	<view class="container" v-if="imageUrl || urlVal">
-		<view class="qrcode-box x-c">
-			<image class="qrcode" :src="imageUrl" mode="aspectFill" show-menu-by-longpress="true"></image>
-		</view>
-		<view class="share-inner">
-			<view class="share-item">
-				<view class="img">
-					<u-icon name="share-square" size="30" color="#222"></u-icon>
-				</view>
-				<text class="text">分享</text>
-				<button class='share-btn' open-type="share"></button>
-			</view>
-			<!-- <view class="share-item" @click="copyUrl()">
-				<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_copy_link.png" mode=""></image>
-				<text class="text">复制链接</text>
-			</view> -->
-			<!-- #ifndef H5 -->
-			<view class="share-item" @click="downImg()">
-				<view class="img">
-					<u-icon name="download" size="30" color="#222"></u-icon>
-				</view>
-				<text class="text">保存图片</text>
-			</view>
-			<!-- #endif -->
-		</view>
-	</view>
-	<u-empty style="padding-top: 20vh;" mode="data" v-else="imgurl"
-		icon="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/empty_icon.png" text="暂无数据"></u-empty>
-</template>
-
-<script>
-	import {
-		getBindInfo
-	} from "@/api/companyUser.js"
-	export default {
-		data() {
-			return {
-				imageUrl: '',
-				urlVal: '',
-				companyUserId: ''
-			}
-		},
-		//发送给朋友
-		onShareAppMessage(res) {
-			console.log("fe===",this.imageUrl)
-			return {
-				title: '立即绑定,享受更多权益',
-				path: '/pages_user/bindCompanyUser?companyUserId=' + this.companyUserId,
-				imageUrl: this.imageUrl
-				// imageUrl: 'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/sharelogo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
-			}
-			
-		},
-		//分享到朋友圈
-		onShareTimeline(res) {
-			return {
-				title: '立即绑定,享受更多权益',
-				query:'companyUserId='+this.companyUserId,//页面参数
-				imageUrl: this.imageUrl
-			}
-			
-		},
-		onLoad() {
-			this.companyUserId = uni.getStorageSync('companyUserId') || '';
-			this.getInfo()
-		},
-		methods: {
-			getInfo() {
-				getBindInfo().then(res => {
-					if (res.code == 200) {
-						this.imageUrl = res.imageUrl
-						this.urlVal = res.url
-					} else {
-						uni.showToast({
-							title: res.msg,
-							icon: 'none'
-						})
-					}
-				})
-			},
-			copyUrl() {
-				uni.setClipboardData({
-					data: this.urlVal,
-					success: () => {
-						uni.showToast({
-							title: '复制成功',
-							icon: 'none'
-						});
-					},
-					fail: () => {
-						uni.showToast({
-							title: '复制失败',
-							icon: 'none'
-						});
-					}
-				});
-			},
-			downImg() {
-				uni.showLoading({
-					title: "图片保存中..."
-				})
-				uni.downloadFile({
-					url: this.imageUrl,
-					fail: function(res) {
-						uni.showModal({
-							title: '提示',
-							content: '保存失败',
-						})
-						uni.hideLoading();
-					},
-					success: function(res) {
-						var tempFilePath = res.tempFilePath;
-						uni.saveImageToPhotosAlbum({
-							filePath: tempFilePath,
-							success: () => {
-								uni.showToast({
-									title: "保存成功",
-									duration: 2000
-								})
-							},
-							fail: () => {
-								console.log("图片失败");
-								uni.showToast({
-									title: "图片失败",
-									duration: 2000,
-									icon: "error"
-								})
-								uni.hideLoading();
-							},
-							complete: function() {
-								uni.hideLoading();
-							}
-						})
-					},
-				})
-			}
-		}
-	}
-</script>
-
-<style scoped lang="scss">
-	.container {
-		padding: 40rpx 0;
-		padding-top: 16vh;
-		box-sizing: border-box;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		position: relative;
-	}
-
-	.qrcode-box {
-		width: 480rpx;
-		height: 480rpx;
-		box-sizing: border-box;
-		overflow: hidden;
-		flex-direction: column !important;
-		border-radius: 16rpx;
-		background-color: #fff;
-		font-family: PingFang SC, PingFang SC;
-		font-weight: 400;
-		font-size: 28rpx;
-		color: #222;
-
-		.qrcode {
-			width: 450rpx;
-			height: 450rpx;
-		}
-
-		.qrcode-title {
-			font-weight: bold;
-			font-size: 32rpx;
-			color: #222;
-			margin-bottom: 32rpx;
-		}
-
-		.qrcode-tip {
-			margin: 32rpx;
-			color: #999;
-			text-align: center;
-		}
-	}
-
-	.downbtn {
-		width: 160rpx;
-		min-height: 68rpx;
-		border: 1px solid #FF5C03 !important;
-		color: #FF5C03 !important;
-		background-color: #fff !important;
-		border-radius: 168rpx;
-		font-family: PingFang SC, PingFang SC;
-		font-weight: 400;
-		font-size: 28rpx;
-
-		&::after {
-			border: none;
-		}
-	}
-
-	.share-inner {
-		width: 100%;
-		box-sizing: border-box;
-		padding: 0 10%;
-		display: flex;
-		flex-wrap: wrap;
-		position: absolute;
-		bottom: 0;
-		left: 0;
-
-		.share-item {
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-			justify-content: center;
-			margin-bottom: 66upx;
-			position: relative;
-
-			.img {
-				width: 80upx;
-				height: 80upx;
-				margin-bottom: 20upx;
-				background-color: #fff;
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				border-radius: 50%;
-			}
-
-			image {
-				width: 80upx;
-				height: 80upx;
-				margin-bottom: 20upx;
-			}
-
-			.text {
-				font-size: 28upx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #111111;
-				line-height: 1;
-			}
-		}
-	}
-
-	.share-btn {
-		position: absolute;
-		left: 50%;
-		top: 0;
-		width: 80upx;
-		height: 100%;
-		transform: translateX(-50%);
-		background-color: transparent !important;
-
-		&::after {
-			border: none;
-		}
-	}
-</style>

+ 106 - 0
pages_company/card.vue

@@ -0,0 +1,106 @@
+<template>
+  <view class="content">
+    <view class="images">
+       <image class="slide-image" :src="url" mode="widthFix" show-menu-by-longpress />
+    </view>
+	<view class="btn-box">
+		<view class="btn" @click="shareQr()">分享</view>
+	</view>
+    
+  </view>
+</template>
+<script>
+ 
+import { getCompanyUserCard} from './api/companyUser.js'
+export default {
+  components: {
+  },
+  props: {},
+  data: function() {
+    return {
+       url:null,
+	   cardId:null,
+    }
+  },
+  onLoad(options) {
+		console.log(options)
+		if(options.id!=null){
+			this.cardId=options.id;
+		}
+		this.getCompanyUserCard()
+  },
+  methods: {
+	getCompanyUserCard(){
+	  	var data={cardId:this.cardId}
+	  	getCompanyUserCard(data).then(
+	  		res => {
+	  			this.url =res.data.imageUrl
+	  		},
+	  		rej => {}
+	  	);
+	},
+	shareQr(){
+		wx.downloadFile({
+		    url: this.url,
+		    success: (res) => {
+		      wx.showShareImageMenu({
+		        path: res.tempFilePath
+		      })
+		    }
+		})
+	},
+     
+     
+  },
+}
+</script>
+
+<style lang="less">
+page {
+	height: 100%;
+}
+
+.content {
+	width: 100%;
+	height: 100%;
+  
+}
+
+.images {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	height: 100%;
+}
+
+.images .slide-image {
+	width: 80%;
+	height: auto;
+}
+.btn-box{
+ 	height: 140upx;
+ 	z-index: 9999;
+ 	width: 100%;
+ 	padding: 0rpx 30upx;
+ 	position: fixed;
+ 	bottom: 0;
+ 	left: 0;
+ 	box-sizing: border-box;
+ 	background-color: #ffffff;
+ 	display: flex;
+ 	align-items: center;
+ 	justify-content: center;
+ 	.btn{
+ 		width: 100%;
+ 		height: 88upx;
+ 		line-height: 88upx;
+ 		text-align: center;
+ 		font-size: 34upx;
+ 		font-family: PingFang SC;
+ 		font-weight: 400;
+ 		color: #FFFFFF;
+ 		background:#2BC7B9 !important;
+ 		border-radius: 44upx;
+ 	}
+ }
+</style>

+ 379 - 0
pages_company/coupon.vue

@@ -0,0 +1,379 @@
+<template>
+  <view ref="container">
+	<view class="top-fixed">
+		<view class="cate-list">
+			<!-- 关键字列表 -->
+			<scroll-view   scroll-x="true" >
+				<view class="inner">
+					<view v-for="(item,index) in cates" :key="index" :class="cateId == item.dictValue?'item active':'item'" @click="choseCate(item)">
+						{{ item.dictLabel }}
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+	<!-- <image src="/static/images/banner_coupon.png" mode="widthFix" class="tui-coupon-banner"></image> -->
+    <view class="tui-coupon-list">
+      <view class="tui-coupon-item tui-top20" v-for="(item, index) in couponsList" :key="index">
+         <image src="/static/images/bg_coupon_3x.png" class="tui-coupon-bg" mode="widthFix"></image>
+		<view class="tui-coupon-item-left">
+          <view class="tui-coupon-price-box" :class="{ 'tui-color-grey': item.receiveCount>0 }">
+            <view class="tui-coupon-price-sign">¥</view>
+            <view class="tui-coupon-price" :class="{ 'tui-price-small': false }">{{ item.couponPrice }}</view>
+          </view>
+          <view class="tui-coupon-intro">满{{ item.useMinPrice }}元可用</view>
+        </view>
+        <view class="tui-coupon-item-right">
+          <view class="tui-coupon-content">
+            <view class="tui-coupon-title-box">
+              <view class="tui-coupon-title">{{ item.couponName }}</view>
+            </view>
+            <view class="tui-coupon-rule">
+              <view class="tui-rule-box tui-padding-btm">
+                <view class="tui-coupon-circle"></view>
+                <view class="tui-coupon-text">不可叠加使用</view>
+              </view>
+              <view class="tui-rule-box">
+                <view class="tui-coupon-circle"></view>
+                <view class="tui-coupon-text">{{ item.limitTime }} 到期</view>
+            
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="tui-btn-box">
+			<view class="btn receive"   @click="show(item)">查看</view>
+        </view>
+      </view>
+    </view>
+	<Loading :loaded="loadend" :loading="loading"></Loading>
+	<!--暂无优惠券-->
+	<view v-if="couponsList.length == 0 && page > 1" class="no-data-box" >
+		<image src="/static/images/no_data.png" mode="aspectFit"></image>
+		<view class="empty-title">暂无数据</view>
+	</view>
+  </view>
+</template>
+<script>
+import { getCompanyCouponIssueList, receive } from '@/api/coupon'
+import Loading from '@/components/Loading'
+export default {
+  name: 'getCoupon',
+  components: {
+    Loading,
+  },
+  props: {},
+  data: function() {
+    return {
+		cateId:0,
+		cates:[],
+		page: 1,
+		limit: 10,
+		couponsList: [],
+		loading: false,
+		loadend: false,
+    }
+  },
+  onLoad(options) {
+		var cate={dictLabel:"全部",dictValue:0};
+		this.cates.push(cate);
+		this.cates=this.cates.concat(this.$getDict("storeProductPackageCate"));
+  },
+  mounted: function() {
+    
+  },
+  
+  onShow() {
+  	this.getCompanyCouponIssueList()
+  },
+  onReachBottom() {
+    !this.loading && this.getCompanyCouponIssueList()
+  },
+  methods: {
+	choseCate(item){
+	  	this.cateId = item.dictValue;
+		this.couponsList=[];
+		this.loading=false;
+		this.loadend=false;
+		this.page=1;
+		this.getCompanyCouponIssueList();
+	  	 
+	},
+    show(item){
+		uni.navigateTo({
+			url: './couponDetails?id=' +item.id+"&type=1"
+		})
+	},
+    getCompanyCouponIssueList() {
+      if (this.loading) return //阻止下次请求(false可以进行请求);
+      if (this.loadend) return //阻止结束当前请求(false可以进行请求);
+      this.loading = true
+      let q = { couponType:1,page: this.page, pageSize: this.limit,cateId:this.cateId }
+      getCompanyCouponIssueList(q).then(res => {
+        this.loading = false
+        this.couponsList.push.apply(this.couponsList, res.data.list)
+        this.loadend = res.data.list.length < this.limit //判断所有数据是否加载完成;
+        this.page = this.page + 1
+      })
+    },
+  },
+}
+</script>
+
+<style lang="less" scoped>
+page {
+  background-color: #f5f5f5;
+}
+
+.container {
+  padding-bottom: env(safe-area-inset-bottom);
+}
+.top-fixed{
+	width: 100%;
+	position: fixed;
+	top: 0;
+	left: 0;
+	z-index: 99999;
+	.cate-list{
+		box-sizing: border-box;
+		background: #fff;
+		padding: 10upx 27upx;
+		height: 100upx;
+		.inner{
+			display: flex;
+		}
+		.item{
+			flex-shrink: 0;
+			padding: 0 24upx;
+			height: 64upx;
+			line-height: 64upx;
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #2BC7B9;
+			background: #F5FFFE;
+			border: 1px solid #8AD5CE;
+			border-radius: 32upx;
+			margin: 0 20upx 20upx 0;
+			&.active{
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border: 1px solid #2BC7B9;
+			}
+		}
+	}
+}
+.tui-coupon-list {
+	margin-top: 120upx;
+	width: 100%;
+	padding: 0 25rpx;
+	box-sizing: border-box;
+}
+
+.tui-coupon-banner {
+  width: 100%;
+}
+
+.tui-coupon-item {
+  width: 100%;
+  height: 210rpx;
+  position: relative;
+  display: flex;
+  align-items: center;
+  padding-right: 30rpx;
+  box-sizing: border-box;
+  overflow: hidden;
+ 
+}
+
+.tui-coupon-bg {
+  width: 100%;
+  height: 210rpx;
+  position: absolute;
+  left: 0;
+  top: 0;
+  z-index: 1;
+}
+
+.tui-coupon-sign {
+  height: 110rpx;
+  width: 110rpx;
+  position: absolute;
+  z-index: 9;
+  top: -30rpx;
+  right: 40rpx;
+}
+
+.tui-coupon-item-left {
+  width: 218rpx;
+  height: 210rpx;
+  position: relative;
+  z-index: 2;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  flex-shrink: 0;
+}
+
+.tui-coupon-price-box {
+  display: flex;
+  color: #e41f19;
+  align-items: flex-end;
+}
+
+.tui-coupon-price-sign {
+  font-size: 30rpx;
+}
+
+.tui-coupon-price {
+  font-size: 32rpx;
+  line-height: 68rpx;
+  font-weight: bold;
+}
+
+.tui-price-small {
+  font-size: 58rpx !important;
+  line-height: 56rpx !important;
+}
+
+.tui-coupon-intro {
+  background: #f7f7f7;
+  padding: 8rpx 10rpx;
+  font-size: 26rpx;
+  line-height: 26rpx;
+  font-weight: 400;
+  color: #666;
+  margin-top: 18rpx;
+}
+
+.tui-coupon-item-right {
+  flex: 1;
+  height: 210rpx;
+  position: relative;
+  z-index: 2;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding-left: 24rpx;
+  box-sizing: border-box;
+  overflow: hidden;
+}
+
+.tui-coupon-content {
+  width: 82%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.tui-coupon-title-box {
+  display: flex;
+  align-items: center;
+}
+
+.tui-coupon-btn {
+  padding: 6rpx;
+  background: #ffebeb;
+  color: #e41f19;
+  font-size: 25rpx;
+  line-height: 25rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  transform: scale(0.9);
+  transform-origin: 0 center;
+  border-radius: 4rpx;
+  flex-shrink: 0;
+}
+
+.tui-color-grey {
+  color: #888 !important;
+}
+
+.tui-bg-grey {
+  background: #f0f0f0 !important;
+  color: #888 !important;
+}
+
+.tui-coupon-title {
+  width: 100%;
+  font-size: 26rpx;
+  color: #333;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.tui-coupon-rule {
+  padding-top: 52rpx;
+}
+
+.tui-rule-box {
+  display: flex;
+  align-items: center;
+  transform: scale(0.8);
+  transform-origin: 0 100%;
+}
+
+.tui-padding-btm {
+  padding-bottom: 6rpx;
+}
+
+.tui-coupon-circle {
+  width: 8rpx;
+  height: 8rpx;
+  background: rgb(160, 160, 160);
+  border-radius: 50%;
+}
+
+.tui-coupon-text {
+  font-size: 28rpx;
+  line-height: 28rpx;
+  font-weight: 400;
+  color: #666;
+  padding-left: 8rpx;
+  white-space: nowrap;
+}
+
+.tui-top20 {
+  margin-top: 20rpx;
+}
+
+.tui-coupon-title {
+  font-size: 28rpx;
+  line-height: 28rpx;
+}
+
+.tui-coupon-radio {
+  transform: scale(0.7);
+  transform-origin: 100% center;
+}
+
+.tui-btn-box {
+  position: absolute;
+  right: 20rpx;
+  bottom: 40rpx;
+  z-index: 10;
+  .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 red;
+  		color: red;
+  	}
+  	&.receive{
+  		background: red;
+  		color: #FFFFFF;
+  	}
+  }
+}
+</style>

+ 91 - 91
pages_company/couponDetails.vue

@@ -1,19 +1,19 @@
 <template>
   <view class="container">
-    <view class="tui-coupon-list" v-if="item!=null">
+    <view class="tui-coupon-list">
       <view class="tui-coupon-item tui-top20"  >
-         <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/bg_coupon_3x.png" class="tui-coupon-bg" mode="widthFix"></image>
+         <image src="/static/images/bg_coupon_3x.png" class="tui-coupon-bg" mode="widthFix"></image>
 		<view class="tui-coupon-item-left">
           <view class="tui-coupon-price-box"  >
             <view class="tui-coupon-price-sign">¥</view>
-            <view class="tui-coupon-price" :class="{ 'tui-price-small': false }">{{ item.price.toFixed(2) }}</view>
+            <view class="tui-coupon-price" :class="{ 'tui-price-small': false }">{{ item.couponPrice }}</view>
           </view>
-          <view class="tui-coupon-intro">满{{ item.minPrice.toFixed(2) }}元可用</view>
+          <view class="tui-coupon-intro">满{{ item.useMinPrice }}元可用</view>
         </view>
         <view class="tui-coupon-item-right">
           <view class="tui-coupon-content">
             <view class="tui-coupon-title-box">
-              <view class="tui-coupon-title">{{ item.title }}</view>
+              <view class="tui-coupon-title">{{ item.couponName }}</view>
             </view>
             <view class="tui-coupon-rule">
               <view class="tui-rule-box tui-padding-btm">
@@ -28,61 +28,55 @@
             </view>
           </view>
         </view>
-        <view class="tui-btn-box">
-			<view class="btn receive" v-if="item.remainNumber>0" @click="receive()" >立即领取</view>
-			<view class="btn cancel" v-else-if="item.remainNumber==0" >已领完</view>
+        <view class="tui-btn-box" v-if="type==2">
+			<view class="btn cancel" v-if="item.receiveCount>0"  >已领取</view>
+			<view class="btn cancel" v-else-if="item.receiveCount==item.totalCount" >已领完</view>
+			<view class="btn receive" v-else @click="receive(item.id,index)">立即领取</view>
         </view>
       </view>
     </view>
+	
+	<view class="ad">
+		<ad unit-id="adunit-4768dead82e0c4ff" ad-type="video" ad-theme="white"></ad>
+	</view>
   </view>
 </template>
 <script>
-import { getCouponById,genCode, receive } from '@/api/coupon'
+import { getCouponIssueById, companyReceive } from '@/api/coupon'
 export default {
   name: 'getCoupon',
  
   props: {},
   data: function() {
     return {
-		couponId:null,
+		id:null,
 		item:null,
-		isShare:null,
 		code:null,
+		type:0,
+      
     }
   },
   onLoad(options) {
-	this.couponId=options.couponId;
-	this.code=options.code;
-	if(!this.$isEmpty(options.isShare)){
-		this.isShare=options.isShare
-		this.genCode();
-	}
-	else{
-		uni.hideShareMenu()
+	//获取券CODE
+	console.log(options.id)
+	console.log(options.code)
+	this.type=options.type;
+	this.id=JSON.parse(options.id);
+	if(!this.$isEmpty(options.code)){
+		this.code=options.code;
 	}
-	console.log(options.couponId)
-	this.companyId=uni.getStorageSync('companyId');
-	this.companyUserId=uni.getStorageSync('companyUserId');		 
-	this.getCouponById();
+  	uni.showShareMenu({
+  		withShareTicket:true,
+  		//小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
+  		menus:["shareAppMessage"] //不设置默认发送给朋友
+  	})
+	this.getCouponIssueById();
   },
   //发送给朋友
   onShareAppMessage(res) {
-  	//禁止二次转发--
-  	uni.showShareMenu({
-  		withShareTicket: true
-  	});
-  	wx.updateShareMenu({
-  		isPrivateMessage: true,
-  		withShareTicket: true,
-  		success(res) {
-  			console.log('updateShareMenu: ', res);
-  		},
-  		fail() {}
-  	}); 
-  	//禁止二次转发--end
   	return {
-  		title: this.item.title,
-  		path: "/pages_company/couponDetails?couponId="+this.item.couponId+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+"&code="+this.code,
+  		title: this.item.couponName,
+  		path: `/pages_company/couponDetails?id=${this.item.id}&type=2&code=${this.code}`
   	}
   },
   mounted: function() {
@@ -90,27 +84,24 @@ export default {
   onShow() {
   },
   methods: {
-	genCode: function() {
-		let that = this
-		var data={couponId:this.couponId};
-		genCode(data)
-		  .then(function(res) {
-			that.code=res.data;
-			
-		  })
-		  .catch(function(err) {
-			
-		})
+	showImg() {
+		var url=['https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20221116/99f6dedb47394b43adb61a1aa1b2e7e2.jpg']
+	  	uni.previewImage({
+	  	 	urls: url,
+	  	 	current: url[0]
+	  	});
 	},
-	getCouponById: function() {
+	getCouponIssueById: function() {
 	  	let that = this
-	  	var data={
-			couponId:this.couponId
-		}
-	  	getCouponById(data)
+	  	var data={id:this.id}
+	  	getCouponIssueById(data)
 	  	  .then(function(res) {
 				that.item=res.data;
-				
+				console.log(that.code)
+				if(that.$isEmpty(that.code)){
+					that.code=res.code;
+				}
+				console.log(that.code)
 	  	  })
 	  	  .catch(function(err) {
 	  	    uni.showToast({
@@ -122,38 +113,38 @@ export default {
 	    
 	},
     receive: function() {
-		let that = this
-		var data={
-			couponId:this.item.couponId,
-			companyId:this.companyId,
-			companyUserId:this.companyUserId,
-			code:this.code,
+		if(this.$isLogin()){
+			let that = this
+			var data={
+				id:this.item.id,
+				code:this.code
+			}
+			companyReceive(data)
+			  .then(function(res) {
+				  if(res.code==200){
+					  uni.showToast({
+					    title: '领取成功',
+					    icon: 'success',
+					    duration: 2000,
+					  })
+				  }
+				  else{
+					  uni.showToast({
+					    title: res.msg,
+					    duration: 2000,
+					  })
+				  }
+			    
+					   
+			  })
+			  .catch(function(err) {
+			    uni.showToast({
+			      title: err.msg ,
+			      icon: 'none',
+			      duration: 2000,
+			    })
+			  })
 		}
-		receive(data)
-		  .then(function(res) {
-			  if(res.code==200){
-				  uni.showToast({
-				    title: '领取成功',
-				    icon: 'success',
-				    duration: 2000,
-				  })
-			  }
-			  else{
-				  uni.showToast({
-				    title: res.msg,
-				    duration: 2000,
-				  })
-			  }
-		    
-				   
-		  })
-		  .catch(function(err) {
-		    uni.showToast({
-		      title: err.msg ,
-		      icon: 'none',
-		      duration: 2000,
-		    })
-		  })
       
     },
   },
@@ -282,7 +273,7 @@ page {
 .tui-coupon-btn {
   padding: 6rpx;
   background: #ffebeb;
-  color: #2583EB;
+  color: #e41f19;
   font-size: 25rpx;
   line-height: 25rpx;
   display: flex;
@@ -374,14 +365,23 @@ page {
   	margin-left: 15upx;
 
   	&.cancel{
-  		border: 1px solid #2583EB;
-  		color: #2583EB;
+  		border: 1px solid red;
+  		color: red;
   	}
   	&.receive{
-  		background: #2583EB;
+  		background: red;
   		color: #FFFFFF;
   	}
   }
 }
- 
+.banner{
+	margin: 25rpx;
+	.img{
+		height: 700rpx;
+		width: 100%;
+	}
+}
+.ad{
+	margin: 0rpx 0rpx 60rpx;
+}
 </style>

+ 0 - 460
pages_company/couponList.vue

@@ -1,460 +0,0 @@
-<template>
-	<view class="content">
-		<view class="top-content" v-if="couponType==5||couponType==6">
-			<!-- 搜索框 -->
-			<view class="search-cont">
-				<view class="inner">
-					<image class="icon-search" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_search.png" mode=""></image>
-					<input type="text" v-model="keyword" placeholder="输入名称搜索" confirm-type="search" @confirm="doSearch" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
-				</view>
-			</view>
-			<view class="cate-list">
-				<!-- 关键字列表 -->
-				<scroll-view   scroll-x="true" >
-					<view class="inner">
-						<view v-for="(item,index) in cateOptions" :key="index" :class="cateId == item.dictValue?'item active':'item'" @click="choseCate(item)">
-							{{ item.dictLabel }}
-						</view>
-					</view>
-				</scroll-view>
-			</view>
-		</view>
-		<mescroll-body :top="couponType==5||couponType==6?'192rpx':'0rpx'" bottom="0" ref="mescrollRef" @init="mescrollInit"    :down="downOption" :up="upOption" @down="downCallback" @up="upCallback">
-		<view class="tui-coupon-list">
-		  <view class="tui-coupon-item tui-top20" v-for="(item, index) in dataList" :key="index">
-		     <image :src="baseUrl + '/images/bg_coupon_3x.png'" class="tui-coupon-bg" mode="widthFix"></image>
-			<view class="tui-coupon-item-left">
-		      <view class="tui-coupon-price-box" >
-		        <view class="tui-coupon-price-sign">¥</view>
-		        <view class="tui-coupon-price" :class="{ 'tui-price-small': false }">{{ item.price.toFixed(2) }}</view>
-		      </view>
-		      <view class="tui-coupon-intro">满{{ item.minPrice.toFixed(2) }}元可用</view>
-		    </view>
-		    <view class="tui-coupon-item-right">
-		      <view class="tui-coupon-content">
-		        <view class="tui-coupon-title-box">
-		          <view class="tui-coupon-title">{{ item.title }}</view>
-		        </view>
-		        <view class="tui-coupon-rule">
-		          <view class="tui-rule-box tui-padding-btm">
-		            <view class="tui-coupon-circle"></view>
-		            <view class="tui-coupon-text">不可叠加使用</view>
-		          </view>
-		          <view class="tui-rule-box">
-		            <view class="tui-coupon-circle"></view>
-		            <view class="tui-coupon-text">{{ item.limitTime }} 到期</view>
-		          </view>
-		        </view>
-		      </view>
-		    </view>
-		    <view class="tui-btn-box">
-				<view class="btn receive"   @click="navTo('/pages_company/couponDetails?isShare='+isShare+'&couponId='+item.couponId)">查看</view>
-		    </view>
-		  </view>
-		</view>
-		</mescroll-body>
-  </view>
-</template>
-<script>
-import {getDictByKey} from '@/api/common.js'
-import { getCouponList } from '@/api/coupon.js'
-import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
-export default {
-	name: 'UserCoupon',
-	props: {},
-	mixins: [MescrollMixin], // 使用mixin
-	data: function() {
-		return {
-			baseUrl:uni.getStorageSync('requestPath'),
-			keyword: '',
-			cateOptions:[],
-			cateId:null,
-			couponType:null,
-			mescroll:null,
-			downOption: {   //下拉刷新
-				use:true,
-				auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
-			},
-			upOption: {
-				onScroll:false,
-				use: true, // 是否启用上拉加载; 默认true
-				page: {
-					pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
-					size: 10 // 每页数据的数量,默认10
-				},
-				noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
-				textNoMore:"已经到底了",
-				empty: {
-					icon:'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/empty_icon.png',
-					tip: '暂无数据'
-				}
-			},
-			dataList: [],
-			isShare:null,
-		}
-	},
-	watch: {
-    
-	},
-	onLoad(options) {
-		this.couponType=options.couponType;
-		this.isShare=options.isShare;
-	},
-	onShow() {
-		if(this.couponType==5){
-			this.getDictByKey("sys_package_private_type");
-		}
-		else if(this.couponType==6){
-			this.getDictByKey("sys_package_disease_type");
-		}
-	},
-	methods: {
-		choseCate(item) {
-			this.cateId = item.dictValue;
-			this.mescroll.resetUpScroll()
-		},
-		getDictByKey(key){
-			var data={key:key}
-			getDictByKey(data).then(
-				res => {
-					if(res.code==200){
-						this.cateOptions=res.data;
-					}
-				},
-				err => {
-				}
-			);
-			
-		},
-		doSearch(){
-			this.mescroll.resetUpScroll()
-		},
-		navTo(url){
-			uni.navigateTo({
-				url: url
-			})
-		},
-		mescrollInit(mescroll) {
-			this.mescroll = mescroll;
-		},
-		/*下拉刷新的回调 */
-		downCallback() {
-			this.mescroll.resetUpScroll()
-		},
-		/*上拉加载的回调*/
-		upCallback(page) {   
-			//联网加载数据
-			var that = this;
-			var data = {
-				keyword:this.keyword,
-				couponType:this.couponType,
-				pageNum: page.num,
-				pageSize: page.size
-			};
-			if(this.cateId!=null){
-				data.cateId=this.cateId;
-			}
-			getCouponList(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();
-				}
-			});
-		},
-	},
-}
-</script>
-<style lang="less" scoped>
-	.content{
-		height: 100%;
-		.top-content{
-			width: 100%;
-			position: fixed;
-			top: 0;
-			left: 0;
-			z-index: 10;
-		}
-		.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;
-				}
-			}
-		}
-		.cate-list{
-			box-sizing: border-box;
-			background: #fff;
-			padding: 10upx 27upx;
-			height: 100upx;
-			.inner{
-				display: flex;
-			}
-			.item{
-				flex-shrink: 0;
-				padding: 0 24upx;
-				height: 64upx;
-				line-height: 64upx;
-				font-size: 28upx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #2583EB;
-				background: #ffffff;
-				border: 1px solid #2EDAD4;
-				border-radius: 32upx;
-				margin: 0 20upx 20upx 0;
-				&.active{
-					color: #FFFFFF;
-					background: #2583EB;
-					border: 1px solid #2583EB;
-				}
-			}
-		}
-		 
-		 
-	}
-	.tui-coupon-list {
-		margin-top: 0upx;
-		width: 100%;
-		padding: 0 25rpx;
-		box-sizing: border-box;
-	}
-	
-	.tui-coupon-banner {
-	  width: 100%;
-	}
-	
-	.tui-coupon-item {
-	  width: 100%;
-	  height: 210rpx;
-	  position: relative;
-	  display: flex;
-	  align-items: center;
-	  padding-right: 30rpx;
-	  box-sizing: border-box;
-	  overflow: hidden;
-	 
-	}
-	
-	.tui-coupon-bg {
-	  width: 100%;
-	  height: 210rpx;
-	  position: absolute;
-	  left: 0;
-	  top: 0;
-	  z-index: 1;
-	}
-	
-	.tui-coupon-sign {
-	  height: 110rpx;
-	  width: 110rpx;
-	  position: absolute;
-	  z-index: 9;
-	  top: -30rpx;
-	  right: 40rpx;
-	}
-	
-	.tui-coupon-item-left {
-	  width: 218rpx;
-	  height: 210rpx;
-	  position: relative;
-	  z-index: 2;
-	  display: flex;
-	  align-items: center;
-	  justify-content: center;
-	  flex-direction: column;
-	  flex-shrink: 0;
-	}
-	
-	.tui-coupon-price-box {
-	  display: flex;
-	  color: #e41f19;
-	  align-items: flex-end;
-	}
-	
-	.tui-coupon-price-sign {
-	  font-size: 30rpx;
-	}
-	
-	.tui-coupon-price {
-	  font-size: 32rpx;
-	  line-height: 68rpx;
-	  font-weight: bold;
-	}
-	
-	.tui-price-small {
-	  font-size: 58rpx !important;
-	  line-height: 56rpx !important;
-	}
-	
-	.tui-coupon-intro {
-	  background: #f7f7f7;
-	  padding: 8rpx 10rpx;
-	  font-size: 26rpx;
-	  line-height: 26rpx;
-	  font-weight: 400;
-	  color: #666;
-	  margin-top: 18rpx;
-	}
-	
-	.tui-coupon-item-right {
-	  flex: 1;
-	  height: 210rpx;
-	  position: relative;
-	  z-index: 2;
-	  display: flex;
-	  align-items: center;
-	  justify-content: space-between;
-	  padding-left: 24rpx;
-	  box-sizing: border-box;
-	  overflow: hidden;
-	}
-	
-	.tui-coupon-content {
-	  width: 82%;
-	  display: flex;
-	  flex-direction: column;
-	  justify-content: center;
-	}
-	
-	.tui-coupon-title-box {
-	  display: flex;
-	  align-items: center;
-	}
-	
-	.tui-coupon-btn {
-	  padding: 6rpx;
-	  background: #ffebeb;
-	  color: #2583EB;
-	  font-size: 25rpx;
-	  line-height: 25rpx;
-	  display: flex;
-	  align-items: center;
-	  justify-content: center;
-	  transform: scale(0.9);
-	  transform-origin: 0 center;
-	  border-radius: 4rpx;
-	  flex-shrink: 0;
-	}
-	
-	.tui-color-grey {
-	  color: #888 !important;
-	}
-	
-	.tui-bg-grey {
-	  background: #f0f0f0 !important;
-	  color: #888 !important;
-	}
-	
-	.tui-coupon-title {
-	  width: 100%;
-	  font-size: 26rpx;
-	  color: #333;
-	  white-space: nowrap;
-	  overflow: hidden;
-	  text-overflow: ellipsis;
-	}
-	
-	.tui-coupon-rule {
-	  padding-top: 52rpx;
-	}
-	
-	.tui-rule-box {
-	  display: flex;
-	  align-items: center;
-	  transform: scale(0.8);
-	  transform-origin: 0 100%;
-	}
-	
-	.tui-padding-btm {
-	  padding-bottom: 6rpx;
-	}
-	
-	.tui-coupon-circle {
-	  width: 8rpx;
-	  height: 8rpx;
-	  background: rgb(160, 160, 160);
-	  border-radius: 50%;
-	}
-	
-	.tui-coupon-text {
-	  font-size: 28rpx;
-	  line-height: 28rpx;
-	  font-weight: 400;
-	  color: #666;
-	  padding-left: 8rpx;
-	  white-space: nowrap;
-	}
-	
-	.tui-top20 {
-	  margin-top: 20rpx;
-	}
-	
-	.tui-coupon-title {
-	  font-size: 28rpx;
-	  line-height: 28rpx;
-	}
-	
-	.tui-coupon-radio {
-	  transform: scale(0.7);
-	  transform-origin: 100% center;
-	}
-	
-	.tui-btn-box {
-	  position: absolute;
-	  right: 20rpx;
-	  bottom: 40rpx;
-	  z-index: 10;
-	  .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 red;
-	  		color: red;
-	  	}
-	  	&.receive{
-	  		background: #2583EB;
-	  		color: #FFFFFF;
-	  	}
-	  }
-	}
-	
-	
-</style>

+ 98 - 72
pages_company/index.vue

@@ -4,11 +4,11 @@
 			<view class="user-info">
 				<view class="left">
 					<view class="name-phone">
-						<view class="name" v-if="user!=null">{{user.nickName}}</view>
+						<view class="name">{{user.nickName}}</view>
 						<view class="phone" v-if="user!=null">{{$parsePhone(user.phonenumber)}}</view>
 					</view>
 				</view>
-				<view class="msg-box"  v-if="user!=null" >
+				<view class="msg-box"  >
 					 {{user.deptName}}
 				</view>
 			</view>
@@ -16,107 +16,130 @@
 			<view class="used-tools">
 				<view class="title">常用工具</view>
 				<view class="tools-list">
-					<view class="item"  @click="navTo('/pages_company/couponList?isShare=1&couponType=5')">
-						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_my_coupon.png" mode=""></image>
-						<text class="text">私域疗法券</text>
+					<view class="item" @click="toCreateOrder()">
+						<image src="/static/images/order.png" mode=""></image>
+						<text class="text">商品制单</text>
 					</view>
-					<view class="item"  @click="navTo('/pages_company/couponList?isShare=1&couponType=2')">
-						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_my_coupon.png" mode=""></image>
-						<text class="text">中药免单券</text>
+					<!-- <view class="item" @click="toCreateCoupon()">
+						<image src="/static/images/icon_coupon.png" mode=""></image>
+						<text class="text">制单优惠券</text>
+					</view> -->
+					<!-- <view class="item" @click="toPay()">
+						<image src="/static/images/money.png" mode=""></image>
+						<text class="text">微信收款</text>
+					</view> -->
+					<!-- <view class="item" @click="alipay()">
+						<image src="/static/images/money.png" mode=""></image>
+						<text class="text">支付宝收款</text>
+					</view> -->
+					<view class="item" @click="toOrder()">
+						<image src="/static/images/order.png" mode=""></image>
+						<text class="text">我的订单</text>
 					</view>
-					<view class="item"  @click="navTo('/pages_company/couponList?isShare=1&couponType=4')">
-						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_my_coupon.png" mode=""></image>
-						<text class="text">中药打折券</text>
-					</view>
-					<view class="item" @click="navTo('/pages_company/packageList')">
-						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_company_2.png" mode=""></image>
-						<text class="text">疗法</text>
-					</view>
-					<view class="item" @click="navTo('/pages_order/inquirySelectType?companyId='+companyId+'&companyUserId='+companyUserId+'&isShare=1')">
-					 	<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_company_3.png" mode=""></image>
-					 	<text class="text">会诊</text>
-					</view>
-					<view class="item" @click="navTo('/pages_order/inquirySelect?inquiryType=3&companyId='+companyId+'&companyUserId='+companyUserId+'&isShare=1')">
-					 	<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_company_3.png" mode=""></image>
-					 	<text class="text">按方开药</text>
-					</view>
-					<view class="item" @click="navTo('/pages_company/packageOrderList')">
-					 	<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_company_3.png" mode=""></image>
-					 	<text class="text">套餐订单</text>
-					</view>
-					<view class="item" @click="navTo('/pages_company/inquiryOrderList')">
-					 	<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_company_3.png" mode=""></image>
-					 	<text class="text">问诊订单</text>
-					</view>
-					<view class="item" @click="navTo('/pages_company/storeOrderList')">
-					 	<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_company_3.png" mode=""></image>
-					 	<text class="text">药品订单</text>
-					</view>
-					<view class="item" @click="navTo('/pages_user/healthRecords/index')">
-						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_company_3.png" mode=""></image>
-						<view class="text">健康档案</view>
-					</view>
-					<view class="item" @click="navTo('/pages_company/bindInfo')">
-					 	<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_company_3.png" mode=""></image>
-					 	<text class="text">公司码</text>
+	<!-- 				<view class="item" @click="toPackage()">
+						<image src="/static/images/package.png" mode=""></image>
+						<text class="text">商品套餐</text>
 					</view>
+					<view class="item" @click="toCoupon()">
+						<image src="/static/images/icon_coupon.png" mode=""></image>
+						<text class="text">套餐优惠券</text>
+					</view> -->
+					
 				</view>
 			</view>
 			<!-- 退出登录按钮 -->
-			<view class="logout" @click="logout">退出登录</view>
+			<view class="log-out" @click="logout">退出登录</view>
 		</view>
 		
 	</view>
 </template>
 
 <script>
-	import {getUserInfo,getQrImg} from '@/api/companyUser'
+	import {getUserInfo,getQrImg} from './api/companyUser.js'
 	export default {
 		data() {
 			return {
-				companyId:null,
-				companyUserId:null,
-				user:null,
+				 user:null,
 			};
 		},
 		onLoad() {
+			console.log("onload")
 		},
 		onShow() {
-			this.companyId=uni.getStorageSync('companyId');
-			this.companyUserId=uni.getStorageSync('companyUserId');	
-			console.log(this.companyUserId)
+			console.log("onshow")
 			this.getUserInfo()
 		},
-		onShareAppMessage(res) {
-			return {
-				title: "问诊",
-				path: '/pages/TUIKit/TUIPages/TUIConversation/index',
-				imageUrl: 'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/sharelogo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
-			}
-			
-		},
 		methods: {
-			navTo(url){
+			
+			alipay(){
+				// var url="http://alipay.yjf.runtzh.com/#/?companyId="+this.user.companyId+"&companyUserId="+this.user.userId
+				// uni.setClipboardData({
+				// 	data:url,
+				// 	success:()=>{
+				// 		uni.showToast({
+				// 			title:'收款地址已复制到剪切板',
+				// 			icon:'none'
+				// 		})
+						
+				// 	}
+				// });
+				
+				uni.navigateTo({
+					url:'/pages_company/alipayImg'
+				})
+			},
+			toCreateOrder(){
+				uni.navigateTo({
+					url:'/pages_company/order/productList'
+				})
+			},
+			toPay(){
 				uni.navigateTo({
-					url: url
+					url:'/pages_user/user/pay?companyId='+this.user.companyId+"&companyUserId="+this.user.userId
+				})
+			},
+			toOrder(){
+				uni.navigateTo({
+					url:'/pages_company/storeOrder?companyId='+this.user.companyId+"&companyUserId="+this.user.userId
+				})
+			},
+			toPackage(){
+				uni.navigateTo({
+					url:'/pages_company/storeProductPackage?companyId='+this.user.companyId+"&companyUserId="+this.user.userId
+				})
+			},
+			toCoupon(){
+				uni.navigateTo({
+					url:'/pages_company/coupon'
+				})
+			},
+			toCreateCoupon(){
+				uni.navigateTo({
+					url:'/pages_company/order/coupon'
+				})
+			},
+			toCreateOrderCoupon(){
+				uni.navigateTo({
+					url:'/pages_company/order/coupon'
 				})
 			},
 			getUserInfo(){
-				var data={}
+				var data={token:uni.getStorageSync('CompanyUserToken')}
 				getUserInfo(data).then(
 					res => {
 						if(res.code==200){
 							  this.user=res.data;
 						}
-						else{
+						else if(res.code==403){
 							uni.setStorageSync('CompanyUserToken',null);
+							uni.navigateBack({
+								delta:-1
+							})			
+						}else{
 							uni.showToast({
 								icon:'none',
 								title: res.msg,
 							});
-							uni.navigateBack({
-								delta:-1
-							})	
 						}
 					},
 					rej => {}
@@ -157,7 +180,8 @@
 
 <style lang="scss">
 	.content{
-		padding: 20upx;
+		margin: 20upx 0upx;
+		padding: 0 20upx;
 		.user-info{
 			padding: 30upx;
 			display: flex;
@@ -199,13 +223,15 @@
 				}
 			}
 			.msg-box{
-				padding: 10rpx 20upx;
-				font-size: 28upx;
+				padding: 5rpx 15upx;
+				min-height: 30upx;
+				line-height: 30upx;
+				font-size: 22upx;
 				font-family: PingFang SC;
 				font-weight: 500;
 				color: #FFFFFF;
 				border-radius: 8rpx;
-				background-color: #2583EB;
+				background-color: #2BC7B9;
 			}
 		}
 		.used-tools{
@@ -247,7 +273,7 @@
 						line-height: 1;
 						margin-top: 20upx;
 					}
-					.share-btn{
+					.contact-btn{
 						display: inline-block;
 						position: absolute;
 						top: 0;
@@ -259,7 +285,7 @@
 				}
 			}
 		}
-		.logout{
+		.log-out{
 			height: 80upx;
 			line-height: 80upx;
 			text-align: center;

+ 0 - 649
pages_company/inquiryOrderDetails.vue

@@ -1,649 +0,0 @@
-<template>
-	<view class="content">
-		<view class="cont">
-			<view class="other-info" v-if="order!=null">
-				<view class="title">付款详情</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">订单类型:</text>
-						<text class="text">{{$getDictLabelName(inquiryTypeOptions,order.inquiryType)}}</text>
-						<text class="text">-{{$getDictLabelName(orderTypeOptions,order.orderType)}}</text>
-					</view>
-					<view class="status red" v-if="order.status==1">
-						{{$getDictLabelName(orderStatusOptions,order.status)}}
-					</view>
-					<view class="status red" v-if="order.status==2">
-						{{$getDictLabelName(orderStatusOptions,order.status)}}
-					</view>
-					<view class="status green" v-if="order.status==3">
-						{{$getDictLabelName(orderStatusOptions,order.status)}}
-					</view>
-					<view class="status green" v-if="order.status==4">
-						{{$getDictLabelName(orderStatusOptions,order.status)}}
-					</view>
-					<view class="status gray" v-if="order.status<0">
-						{{$getDictLabelName(orderStatusOptions,order.status)}}
-					</view>
-				</view>
-				 
-			</view>
-			<view class="doc-box" v-if="doctor!=null">
-				<view class="title">医生详情</view>
-				<view class="doc-name-box">
-					<view class="doc-name">
-						{{doctor.doctorName}}
-					</view>
-					<view class="doc-star">
-						<u-rate activeColor="#ffc603" count="5" readonly v-model="doctor.pingStar"></u-rate>
-					</view>
-				</view>
-				<view class="doc-dept-box">
-					{{department.deptName}}|{{doctor.position}}
-				</view>
-				<view class="doc-his-box">
-					{{hospital.hospitalName}}
-				</view>
-				<view class="doc-spec-box">
-					<view class="left">
-						<view class="title">擅长:</view>
-						<view class="spec">{{doctor.speciality}}</view>
-					</view>
-					<view class="right">
-						<view class="btn" @click="navTo('/pages/doctor/doctorDetails?doctorId='+doctor.doctorId)" >详情</view>
-					</view>
-				</view>
-			</view>
-			<view class="other-info" v-if="patient!=null&&order.inquiryType==1">
-				<view class="title">咨询内容</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">患者信息:</text>
-						<text class="text">{{patient.patientName}} {{patient.sex==1?"男":"女"}} {{patient.age}}岁</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">病情描述:</text>
-						<text class="text">{{patient.title}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">患病时间:</text>
-						<text class="text">{{patient.duration}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">就诊情况:</text>
-						<text class="text">{{patient.isVisit}}</text>
-					</view>
-				</view>
-			</view>
-			<view class="other-info" v-if="patient!=null&&order.inquiryType==2">
-				<view class="title">咨询内容</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">患者信息:</text>
-						<text class="text">{{patient.patientName}} {{patient.sex==1?"男":"女"}} {{patient.age}}岁</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">身高(CM):</text>
-						<text class="text">{{patient.height}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">体重(KG):</text>
-						<text class="text">{{patient.weight}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">联系电话:</text>
-						<text class="text">{{patient.mobile}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">学习进度:</text>
-						<text class="text">{{patient.study}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">期望会诊方式:</text>
-						<text class="text">{{patient.usage}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">病情描述:</text>
-						<text class="text">{{patient.title}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">正在服用药品:</text>
-						<text class="text">{{patient.drugs}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">本次患病时间:</text>
-						<text class="text">{{patient.duration}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">是否就诊过:</text>
-						<text class="text">{{patient.isVisit}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">舌苔照片:</text>
-					</view>
-					 
-				</view>
-				<view>
-					<u-album :urls="tongueImages"></u-album>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">面部照片:</text>
-					</view>
-					 
-				</view>
-				<view>
-					<u-album :urls="faceImages"></u-album>
-				</view>
-			 
-				<view class="item">
-					<view class="left">
-						<text class="label">检测报告或患处照片:</text>
-					</view>
-					 
-				</view>
-				<view>
-					<u-album :urls="reportImages"></u-album>
-				</view>
-			</view>
-			<view class="other-info" v-if="patient!=null&&order.inquiryType==3">
-				<view class="title">咨询内容</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">患者信息:</text>
-						<text class="text">{{patient.patientName}} {{patient.sex==1?"男":"女"}} {{patient.age}}岁</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">病情描述:</text>
-						<text class="text">{{patient.title}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">正在服用药品:</text>
-						<text class="text">{{patient.drugs}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">本次患病时间:</text>
-						<text class="text">{{patient.duration}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">是否就诊过:</text>
-						<text class="text">{{patient.isVisit}}</text>
-					</view>
-				</view>
-				 
-				<view class="item">
-					<view class="left">
-						<text class="label">检测报告或患处照片:</text>
-					</view>
-					 
-				</view>
-				
-				<view>
-					<u-album :urls="reportImages"></u-album>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">舌苔照片:</text>
-					</view>
-					 
-				</view>
-				<view>
-					<u-album :urls="tongueImages"></u-album>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">面部照片:</text>
-					</view>
-					 
-				</view>
-				<view>
-					<u-album :urls="faceImages"></u-album>
-				</view>
-			</view>
-			<view class="other-info" v-if="report!=null&&order.status>=3"  >
-				<view class="title">体检信息</view>
-				<view class="item"  v-for="(item) in forms">
-					<view class="left">
-						<text class="label">{{item.title}}:</text>
-						<text class="text">
-							<u-tag  size="mini" plain type="success" style="margin-right: 5rpx;margin-bottom: 5rpx;" v-for="(tag,i) in item.option" :key="i" :text="tag"></u-tag>
-						</text>
-					</view>
-				</view>
-			</view>
-			<view class="other-info" v-if="order!=null">
-				<view class="title">订单信息</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">订单号码:</text>
-						<text class="text">{{order.orderSn}}</text>
-					</view>
-					<view class="item-btn" @click="copyOrderSn">复制</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">下单时间:</text>
-						<text class="text">{{order.createTime}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">订单金额:</text>
-						<text class="text">{{order.money.toFixed(2)}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">优惠金额:</text>
-						<text class="text">{{order.discountMoney.toFixed(2)}}</text>
-					</view>
-				</view>
-				<view class="item">
-					<view class="left">
-						<text class="label">支付金额:</text>
-						<text class="text">{{order.payMoney.toFixed(2)}}</text>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="btn-box" v-if="order!=null">
-			<view class="btn" v-if="report!=null&&order.status>=3" @click="navTo('/pages_order/inquiryOrderReport?orderId='+order.orderId)"  >查看报告</view>
-		</view>
-	</view>
-</template>
- 
-<script  >
-	import store from "@/store";
-	import {getCompanyUserInquiryOrderById,cancel} from '@/api/inquiryOrder.js'
-	import {getDictByKey} from '@/api/common.js'
-	import {navigateToDesignatedConversation,setConversation} from "@/pages_im/util/imCommon";
-	import IMSDK, {SessionType} from "openim-uniapp-polyfill";
-	export default {
-		data() {
-			return {
-				report:null,
-				patient:null,
-				hospital:null,
-				department:null,
-				doctor:null,
-				order:null,
-				orderId:null,
-				orderStatusOptions:[],
-				orderTypeOptions:[],
-				inquiryTypeOptions:[],
-				reportImages: [],
-				tongueImages:[],
-				faceImages:[],
-				forms:[],
-			}
-		},
-		 
-		onLoad(options) {
-			this.orderId=options.orderId;
-			this.getDictByKey("sys_inquiry_order_type");
-			this.getDictByKey("sys_inquiry_type");
-			this.getDictByKey("sys_inquiry_status");
-		},
-		onShow() {
-			this.getCompanyUserInquiryOrderById();
-		},
-		methods: {
-			cancel(){
-				var that=this;
-				uni.showModal({
-					title:"提示",
-					content:"确认取消订单吗?",
-					showCancel:true,
-					cancelText:'取消',
-					confirmText:'确定',
-					success:res=>{
-						if(res.confirm){
-							// 用户点击确定
-							var data={orderId:this.orderId}
-							cancel(data).then(
-								res => {
-									if(res.code==200){
-										that.getMyInquiryOrderById()
-										uni.showToast({
-										 	icon:'success',
-										 	title: "操作成功",
-										});
-									}else{
-										uni.showToast({
-											icon:'none',
-											title: res.msg,
-										});
-									}
-								},
-								rej => {}
-							);
-														
-						}else{
-							// 否则点击了取消  
-						}
-					}
-				})
-			},
-			ping(){
-				uni.navigateTo({
-					url: "/pages_order/pingOrder?orderId="+this.orderId+"&doctorId="+this.order.doctorId
-				})
-			},
-			pay(){
-				uni.navigateTo({
-					url: "/pages_order/inquiryPay?orderId="+this.orderId
-				})
-			},
-			toIM(){
-				var that=this;
-				var userId=uni.getStorageSync('userId');
-				var did='D' + this.order.doctorId;
-				var conversationID=`si_D${this.order.doctorId}_U${userId}`;
-				var ex={imType:1,orderId:this.order.orderId,orderType:this.order.orderType,followId:"",type:"startInquiry"}
-				this.$store.commit("timStore/setType","startInquiry");
-				this.$store.commit("timStore/setOrderType",this.order.orderType);
-				this.$store.commit("timStore/setOrderId",this.order.orderId);
-				this.$store.commit("timStore/setFollowId", 0);
-				this.$store.commit("timStore/setImType", 1);
-				this.$store.commit("timStore/setConversationID", conversationID);
-				navigateToDesignatedConversation(did,SessionType.Single,false).then((res) => {
-					// setConversation(conversationID,JSON.stringify(ex)).then(() => {
-						
-					// }).catch(() => {});
-				}).catch(() => uni.$u.toast("操作失败") );
-			},
-			navTo(url){
-				uni.navigateTo({
-					url: url
-				})
-			},
-			copyOrderSn() {
-				uni.setClipboardData({
-					data: this.order.orderSn,
-					success: function () {
-						uni.showToast({
-							title:'复制成功',
-							icon:'none'
-						})
-					}
-				})
-			},
-			getCompanyUserInquiryOrderById(){
-				var that=this;
-				var data={orderId:this.orderId}
-				getCompanyUserInquiryOrderById(data).then(
-					res => {
-						if(res.code==200){
-							this.order=res.data.order;
-							this.report=res.data.report;
-							this.patient=JSON.parse(res.data.order.patientJson);
-							if(this.report!=null&&this.report.formJson!=null){
-							 	this.forms=JSON.parse(this.report.formJson)
-							}
-							if(that.patient.reportImages!=null){
-								that.reportImages=that.patient.reportImages.split(",");
-							}
-							if(that.patient.tongueImages!=null){
-								that.tongueImages=that.patient.tongueImages.split(",");
-							}
-							if(that.patient.faceImages!=null){
-								that.faceImages=that.patient.faceImages.split(",");
-							}
-							
-							this.doctor=res.data.doctor;
-							this.department=res.data.department;
-							this.hospital=res.data.hospital;
-						}
-					},
-					err => {
-					}
-				);
-				
-			},
-			getDictByKey(key){
-				var data={key:key}
-				getDictByKey(data).then(
-					res => {
-						if(res.code==200){
-							if(key=="sys_inquiry_order_type"){
-								this.orderTypeOptions=res.data;
-							}
-							if(key=="sys_inquiry_type"){
-								this.inquiryTypeOptions=res.data;
-							}
-							if(key=="sys_inquiry_status"){
-								this.orderStatusOptions=res.data;
-							}
-						}
-					},
-					err => {
-					}
-				);
-				
-			},
-			navTo(url){
-				uni.navigateTo({
-					url: url
-				})
-			} 
-		}
-	}
-</script>
-<style lang="scss">
-	page{
-		background: #f6f6f6;
-	}
-</style>
-<style scoped lang="scss">
-	.content{
-		position: relative;
-		.cont{
-			position: relative;
-			padding: 0rpx 20rpx 120rpx;
-			z-index: 999;
-			width: 100%;
-			display: flex;
-			flex-direction: column;
-		}
-		.doc-box{
-			margin: 20rpx 0rpx 0rpx;
-			padding: 0rpx 30rpx;
-			background-color: #fff;
-			border-radius: 20upx;
-			.title{
-				height: 80upx;
-				line-height: 80upx;
-				font-size: 30upx;
-				color: #000;
-				font-weight: bold;
-				border-bottom: 2upx solid #eeeeee;
-			}
-			.doc-name-box{
-				margin-top: 15rpx;
-				display: flex;
-				align-items: center;
-				justify-content: flex-start;
-				.doc-name{
-					font-size: 38rpx;
-					font-weight: bold;
-				}
-				.doc-star{
-					margin-left: 10rpx;
-				}
-				
-				
-			}
-			.doc-dept-box{
-				display: flex;
-				align-items: center;
-				justify-content: flex-start;
-				margin-top: 15rpx;
-				font-size: 28upx;
-				font-family: PingFang SC;
-				color: #2d2b36;
-				 
-			}
-			.doc-his-box{
-				display: flex;
-				align-items: center;
-				justify-content: flex-start;
-				margin-top: 15rpx;
-				font-size: 28upx;
-				font-family: PingFang SC;
-				color: #9a9a9c;
-				 
-			}
-			.doc-spec-box{
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
-				.left{
-					display: flex;
-					align-items: center;
-					justify-content: flex-start;
-					.title{
-						font-size: 28upx;
-						font-family: PingFang SC;
-						color: #9a9a9c;
-					}
-					.spec{
-						margin-left: 10rpx;
-						font-size: 28upx;
-						font-family: PingFang SC;
-						color: #9a9a9c;
-					}
-				}
-				.right{
-					.btn{
-						font-size: 28upx;
-						font-family: PingFang SC;
-						color: #2583EB;
-					}
-				}
-				
-			}
-		}
-		 
-		.other-info{
-			margin-top: 20upx;
-			background-color: #fff;
-			border-radius: 20upx;
-			padding: 0 30upx;
-			.title{
-				height: 80upx;
-				line-height: 80upx;
-				font-size: 30upx;
-				color: #000;
-				font-weight: bold;
-				border-bottom: 2upx solid #eeeeee;
-			}
-			.item{
-				min-height: 80upx;
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
-				&:last-child{
-					border-bottom: none;
-				}
-				.left{
-					flex: 1;
-					display: flex;
-					align-items: center;
-					.label{
-						min-width: 140rpx;
-						font-size: 28upx;
-						color: #000;
-					}
-					.text{
-						font-size: 28upx;
-						color: #1b1b1b;
-					}
-				}
-				.status{
-					font-size: 28upx;
-					font-family: PingFang SC;
-					font-weight: bold;
-				}
-				.red{
-					color: #db5053;
-				}
-				.green{
-					color: #2583EB;
-				}
-				.gray{
-					color: #9c9c9c;
-				}
-				.item-btn{
-					max-width: 200rpx;
-					padding: 0rpx 15rpx;
-					height: 48upx;
-					border-radius: 24upx;
-					line-height: 48upx;
-					font-size: 24upx;
-					color: #000;
-					border: 1upx solid #d8d8d8;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-				}
-			}
-		}
-		.btn-box{
-		 	height: 100rpx;
-		 	z-index: 9999;
-		 	width: 100%;
-		 	padding: 0rpx 30upx;
-		 	position: fixed;
-		 	bottom: 0;
-		 	left: 0;
-		 	box-sizing: border-box;
-		 	background-color: #ffffff;
-		 	display: flex;
-		 	align-items: center;
-		 	justify-content: flex-end;
-		 	.btn{
-				padding: 15rpx 30rpx;
-				margin-left: 10rpx;
-		 		text-align: center;
-		 		font-size: 28upx;
-		 		font-family: PingFang SC;
-		 		color: #FFFFFF;
-		 		background: #2583EB;
-		 		border-radius: 45upx;
-		 	}
-		 }
-	}
-</style>

+ 0 - 407
pages_company/inquiryOrderList.vue

@@ -1,407 +0,0 @@
-<template>
-	<view class="content">
-		<view class="top-fixed">
-			 <u-tabs
-			  :scrollable="false"
-			  :list="tabs"  
-			  lineColor="#2583EB"
-			 @change="inquiryTypeChange">
-			 </u-tabs>
-		</view>
-		<mescroll-body top="88rpx" bottom="0" ref="mescrollRef" @init="mescrollInit"    :down="downOption" :up="upOption" @down="downCallback" @up="upCallback">
-		<view class="order-list">
-			<view class="order-item"  v-for="(item) in dataList" @click="navTo('./inquiryOrderDetails?orderId='+item.orderId)">
-				<view class="order-top"  >
-					<view class="left" v-if="item.doctorId!=null">
-						<image class="head" mode="aspectFill" :src="item.avatar"></image>
-						<view class="name">
-							{{item.doctorName}}
-						</view>
-						<view class="dept">
-							{{item.deptName}}
-						</view>
-					</view>
-					<view class="left" v-if="item.inquiryType==2">
-						<view class="title" v-if="item.status==1">
-							支付后为您安排医生接诊
-						</view>
-						<view class="title" v-if="item.status==2">
-							正在为您安排医生接诊
-						</view>
-						<view class="title" v-if="item.status==-1">
-							订单已取消
-						</view>
-						<view class="title" v-if="item.status==-2">
-							订单已退款
-						</view>
-						<view class="title" v-if="item.status==-3">
-							医生已拒单
-						</view>
-					</view>
-					<view class="status red" v-if="item.status==1">
-						{{$getDictLabelName(orderStatusOptions,item.status)}}
-					</view>
-					<view class="status red" v-if="item.status==2">
-						{{$getDictLabelName(orderStatusOptions,item.status)}}
-					</view>
-					<view class="status green" v-if="item.status==3">
-						{{$getDictLabelName(orderStatusOptions,item.status)}}
-					</view>
-					<view class="status green" v-if="item.status==4">
-						{{$getDictLabelName(orderStatusOptions,item.status)}}
-					</view>
-					<view class="status gray" v-if="item.status<0">
-						{{$getDictLabelName(orderStatusOptions,item.status)}}
-					</view>
-				</view>
-				<view class="order-cont">
-					<view class="order-type"  >
-						订单类型:
-						<text>{{$getDictLabelName(inquiryTypeOptions,item.inquiryType)}}</text>
-						<text>-{{$getDictLabelName(orderTypeOptions,item.orderType)}}</text>
-					</view>
-					<view class="order-desc">病情描述:{{item.title}}</view>
-					<view class="order-time-box">
-						<view class="order-time">
-							{{item.createTime}}
-						</view>
-						<view class="right">
-							<view class="btn"  @click.stop="navTo('./inquiryOrderDetails?orderId='+item.orderId)"  >查看</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		</mescroll-body>
-	</view>
-</template>
-
-<script>
-	import store from "@/store";
-	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
-	import {cancel,getCompanyUserInquiryOrderList} from '@/api/inquiryOrder.js'
-	import {getDictByKey} from '@/api/common.js'
-	import {navigateToDesignatedConversation,setConversation} from "@/pages_im/util/imCommon";
-	import IMSDK, {SessionType} from "openim-uniapp-polyfill";
-	export default {
-		mixins: [MescrollMixin], // 使用mixin
-		data() {
-			return {
-				orderStatusOptions:[],
-				orderTypeOptions:[],
-				inquiryTypeOptions:[],
-				tabs:[
-					{
-						id:2,
-						name:'快速问诊'
-					},
-					{
-						id:1,
-						name:'专家问诊'
-					},
-					{
-						id:3,
-						name:'开药问诊'
-					}
-					 
-				],
-				inquiryType:2,
-				mescroll:null,
-				downOption: {   //下拉刷新
-				 	use:true,
-					auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
-				},
-				upOption: {
-					onScroll:false,
-					use: true, // 是否启用上拉加载; 默认true
-					page: {
-						pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
-						size: 10 // 每页数据的数量,默认10
-					},
-					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
-					textNoMore:"已经到底了",
-					empty: {
-						icon:'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/empty_icon.png',
-						tip: '暂无数据'
-					}
-				},
-				dataList: []
-			}
-		},
-		onLoad() {
-			this.getDictByKey("sys_inquiry_order_type");
-			this.getDictByKey("sys_inquiry_type");
-			this.getDictByKey("sys_inquiry_status");
-			var that=this;
-			uni.$on('refreshInquiryOrder', () => {
-				that.mescroll.resetUpScroll()
-			})
-		},
-		onShow() {
-		},
-		methods: {
-			cancel(item){
-				var that=this;
-				uni.showModal({
-					title:"提示",
-					content:"确认取消订单吗?",
-					showCancel:true,
-					cancelText:'取消',
-					confirmText:'确定',
-					success:res=>{
-						if(res.confirm){
-							// 用户点击确定
-							var data={orderId:item.orderId}
-							cancel(data).then(
-								res => {
-									if(res.code==200){
-										this.mescroll.resetUpScroll()
-										uni.showToast({
-										 	icon:'success',
-										 	title: "操作成功",
-										});
-									}else{
-										uni.showToast({
-											icon:'none',
-											title: res.msg,
-										});
-									}
-								},
-								rej => {}
-							);
-														
-						}else{
-							// 否则点击了取消  
-						}
-					}
-				})
-			},
-			ping(item){
-				uni.navigateTo({
-					url: "/pages_order/pingOrder?orderId="+item.orderId
-				})
-			},
-			pay(item){
-				uni.navigateTo({
-					url: "/pages_order/inquiryPay?orderId="+item.orderId
-				})
-			},
-			toIM(item){
-				var that=this;
-				var userId=uni.getStorageSync('userId');
-				var did='D' + item.doctorId;
-				var conversationID=`si_D${item.doctorId}_U${userId}`;
-				this.$store.commit("timStore/setImType", 1);
-				this.$store.commit("timStore/setConversationID", conversationID);
-				navigateToDesignatedConversation(did,SessionType.Single,false).then((res) => {
-					
-				}).catch(() => {
-				    console.warn("获取会话 异常 = ");
-				});
-			},
-			getDictByKey(key){
-				var data={key:key}
-				getDictByKey(data).then(
-					res => {
-						if(res.code==200){
-							if(key=="sys_inquiry_order_type"){
-								this.orderTypeOptions=res.data;
-							}
-							if(key=="sys_inquiry_type"){
-								this.inquiryTypeOptions=res.data;
-							}
-							if(key=="sys_inquiry_status"){
-								this.orderStatusOptions=res.data;
-							}
-						}
-					},
-					err => {
-					}
-				);
-				
-			},
-			inquiryTypeChange(item){
-				this.inquiryType=item.id
-				console.log(item)
-				this.mescroll.resetUpScroll()
-			},
-			navTo(url){
-				uni.navigateTo({
-					url: url
-				})
-			},
-			mescrollInit(mescroll) {
-				this.mescroll = mescroll;
-			},
-			/*下拉刷新的回调 */
-			downCallback() {
-				this.mescroll.resetUpScroll()
-			},
-			/*上拉加载的回调*/
-			upCallback(page) {   
-				//联网加载数据
-				var that = this;
-				var data = {
-					inquiryType:this.inquiryType,
-					pageNum: page.num,
-					pageSize: page.size
-				};
-				getCompanyUserInquiryOrderList(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();
-					}
-				});
-			},
-			
-		}
-	}
-</script>
-
-<style lang="scss">
-	page{
-		
-		height: 100%;
-		background: #f6f6f6;
-	}
-</style>
-<style scoped lang="scss">
-	.content{
-		height: 100%;
-		.top-fixed{
-			width: 100%;
-			position: fixed;
-			top: 0;
-			left: 0;
-			z-index: 10;
-			height: 88upx;
-			background-color: #fff;
-		}
-		.order-list{
-			width: 100%;
-			padding: 15rpx;
-			display: flex;
-			flex-direction: column;
-			align-items: flex-start;
-			justify-content: flex-start;
-			.order-item{
-				margin-bottom: 15rpx;
-				width: 100%;
-				padding: 15rpx;
-				box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
-				background-color: #fff;
-				border-radius: 15rpx;
-				display: flex;
-				flex-direction: column;
-				align-items: flex-start;
-				justify-content: flex-start;
-				.order-top{
-					display: flex;
-					align-items: center;
-					justify-content: space-between;
-					width: 100%;
-					padding-bottom: 15rpx;
-					border-bottom: 1px solid #efefef;
-					.left{
-						display: flex;
-						align-items: center;
-						justify-content: flex-start;
-						image{
-							width:80rpx;
-							height:80rpx;
-							border-radius: 50%;
-						}
-						.title{
-							font-size: 32upx;
-							font-family: PingFang SC;
-							font-weight: bold;
-							color: #111111;
-						}
-						.name{
-							margin-left: 20rpx;
-							font-size: 32upx;
-							font-family: PingFang SC;
-							font-weight: bold;
-							color: #111111;
-						}
-						.dept{
-							margin-left: 15rpx;
-							font-size: 28upx;
-							font-family: PingFang SC;
-							color: #9a9a9c;
-						}
-						 
-					}
-					.status{
-						font-size: 28upx;
-						font-family: PingFang SC;
-					}
-					.red{
-						color: #db5053;
-					}
-					.green{
-						color: #2583EB;
-					}
-					.gray{
-						color: #9c9c9c;
-					}
-				}
-				.order-cont{
-					width: 100%;
-					margin-top: 15rpx;
-					.order-type{
-						font-size: 32upx;
-						font-family: PingFang SC;
-						// font-weight: bold;
-						color: #111111;
-					}
-					.order-desc{
-						margin-top: 15rpx;
-						font-size: 28upx;
-						font-family: PingFang SC;
-						// font-weight: bold;
-						color: #111111;
-					}
-					.order-time-box{
-						width: 100%;
-						margin-top: 15rpx;
-						display: flex;
-						align-items: center;
-						justify-content: space-between;
-						.order-time{
-							font-size: 32upx;
-							font-family: PingFang SC;
-							color: #9a9a9c;
-						}
-						.right{
-							.btn{
-								padding: 10rpx 30rpx;
-								border: 1rpx solid #2583EB;
-								color: #2583EB;
-								font-size: 28rpx;
-								border-radius: 30rpx;
-							}
-						}
-					}
-				}
-				
-			}
-		} 
-		
-	}
-	 
-</style>

+ 561 - 0
pages_company/order/cart.vue

@@ -0,0 +1,561 @@
+<template>
+	<view class="content">
+		<!-- 商品列表 -->
+		<view class="shopbox" v-for="(shop,idx) in carts" :key="idx">
+			<view class="shopbox-name" v-if="shop.storeName && shop.storeName != 'null'">
+				<label style="margin-right: 30upx;">
+					<checkbox :value="shop.checked" :checked="shop.checked" @click="checkShopChange(shop)" style="transform: scale(0.9);" />
+				</label>
+				<text>{{shop.storeName}}</text>
+			</view>
+			<view class="goods-list">
+				<view class="item" v-for="(item,index) in shop.list" :key="index">
+					<label style="margin-right: 30upx;">
+						<checkbox :value="item.checked"  :checked="item.checked" @click="checkChange(item,shop)" style="transform: scale(0.9);" />
+					</label>
+					<image class="goods-img" :src="item.productAttrImage==null||item.productAttrImage==''?item.productImage:item.productAttrImage" mode="aspectFit" @click="handleDetail(item)"></image>
+					<view class="info-box" @click="handleDetail(item)">
+						<view>
+							<view class="title-box">
+								<view class="tag">{{$getDictLabelName("storeProductType",item.productType)}}</view>
+								<view class="title ellipsis">{{ item.commonName&&item.commonName!=='-'?item.commonName:item.productName }}</view>
+							</view>
+							<view class="intro ellipsis">{{item.productAttrName}}</view>
+						</view>
+						<view class="price-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="text">{{item.price}}</text>
+							</view>
+							<view class="num-box" @click.stop>
+								<view class="img-box" @click="delNum(item)">
+									<image v-if="item.cartNum <= 1" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/jian.png" mode=""></image>
+									<image v-else src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/jian2.png" mode=""></image>
+								</view>
+								<input  type="number" @change="changeNum($event,item)" :value="item.cartNum"   />
+								<view class="img-box" @click="addNum(item)">
+									<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/add.png" mode=""></image>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view v-if="carts.length == 0" class="no-data-box">
+			<image src="https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png" mode="aspectFit"></image>
+			<view class="empty-title">暂无数据</view>
+		</view>
+		<!-- 猜你喜欢 -->
+		 
+		<!-- <view class="like-product">
+			<likeProduct  ref="product" />
+		</view> -->
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="left">
+				<label>
+					<checkbox  :checked="checkAll" @click="handleCheckAll()" style="transform: scale(0.9);" />
+				</label>
+				<text class="text">全选</text>
+				<text class="text" @click="delCart()">删除</text>
+			</view>
+			<view class="right">
+				<view class="total">
+					<text class="label">合计:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{totalMoney.toFixed(2)}}</text>
+					</view>
+				</view>
+				<view class="btn" @click="submit">制单</view>
+			</view>
+		</view>
+		
+	</view>
+</template>
+
+<script>
+	import {createSalesOrder} from '../api/companyOrder.js'
+	import {getCarts,cartNum,delCart} from '@/pages_shopping/api/product.js'
+	// import likeProduct from '@/components/likeProduct.vue'
+	export default {
+		// components: {
+		// 	likeProduct
+		// },	
+		data() {
+			return {
+				 
+				totalMoney:0.00,
+				carts:[],
+				checkAll:false,
+			}	
+		},
+		onShow() {
+			this.getCarts();
+		},
+		methods: {
+			handleDetail(item) {
+				uni.navigateTo({
+					url: '/pages_shopping/productDetails?productId=' + item.productId
+				})
+			},
+			delCart(){			
+				var selectCarts = this.carts.flatMap(item => item.list.filter(listItem => listItem.checked === true)).map(el => el.id);
+				
+				if(selectCarts.length==0){
+					uni.showToast({
+						icon:'none',
+						title: "请选择商品删除",
+					});
+					return;
+				}
+				let data = {ids:selectCarts};
+				delCart(data).then(
+					res => {
+						if(res.code==200){
+							uni.showToast({
+								icon:'success',
+								title: "操作成功",
+							});
+							this.getCarts()
+						}else{
+							
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			computedMoney(){
+				var money=0;
+				var that=this;
+				this.carts.forEach((item,index,arr)=>{
+					item.list.forEach(it => {
+						if(it.checked){
+							money+=it.price*it.cartNum;
+						}
+					});
+				})
+				this.totalMoney=money;
+			},
+			handleCheckAll(){
+				this.checkAll=!this.checkAll;
+				var that=this;
+				this.carts.forEach((item,index,arr)=>{
+				     item.checked=that.checkAll;
+					 item.list.forEach(it => {
+					 	it.checked=that.checkAll;
+					 });
+				})
+				this.computedMoney();
+			},
+			checkShopChange(item) {
+				item.checked = !item.checked;
+				item.list.forEach(it => {
+					it.checked= item.checked;
+				});
+				this.checkAll = this.carts.every(it => it.checked == true);
+				this.computedMoney();
+			},
+			checkChange(item,shop){
+				item.checked=!item.checked;
+				shop.checked = shop.list.every(it => it.checked == true);
+				this.checkAll = this.carts.every(it => it.checked == true);
+				this.computedMoney();
+			},
+			changeNum(e,item) {
+				item.cartNum = e.detail.value.replace(/\D/g, '')
+				if (item.cartNum <= 1) {
+				  uni.showToast({
+				    title: "已经是底线啦!",
+				    icon: "none",
+				    duration: 2000
+				  });
+				  return;
+				}
+				if(item.cartNum < 1) {
+					item.cartNum = 1
+				}
+				console.log("item.cartNum==",item.cartNum)
+				// if (item.cartNum>item.stock) {
+				//   uni.showToast({
+				//     title: "已经是最多啦!",
+				//     icon: "none",
+				//     duration: 2000
+				//   });
+				//   item.cartNum=item.stock;
+				//   return
+				// }
+				if(item.cartNum>=item.stock){
+					item.cartNum=item.stock;
+				}
+				this.changeCartNum(item)
+			},
+			changeCartNum(item){
+				let data = {number:item.cartNum,id:item.id,type: 1};
+				cartNum(data).then(
+					res => {
+						if(res.code==200){
+							if(item.cartNum < 1) {
+								item.cartNum = 1
+							}
+							if(item.cartNum>=item.stock){
+								item.cartNum=item.stock;
+							}
+							uni.showToast({
+								icon:'none',
+								title: "操作成功",
+							});
+							this.computedMoney();
+							
+						}else{
+							
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			getCarts(){
+				getCarts().then(
+					res => {
+						if(res.code==200){
+							 this.carts=res.carts;
+							 this.carts.forEach(item => {
+							   item.checked = false;
+							   item.list.forEach(it => {
+							     it.checked = false;
+							   });
+							 });
+							 this.computedMoney();
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// 购物车减法
+			delNum(item) {
+				if (item.cartNum <= 1) {
+				  uni.showToast({
+				    title: "已经是底线啦!",
+				    icon: "none",
+				    duration: 2000
+				  });
+				  return;
+				}
+				item.cartNum --
+				if(item.cartNum < 1) {
+					item.cartNum = 1
+				}
+				 
+				this.changeCartNum(item)
+			},
+			// 购物车加法
+			addNum(item) {
+				console.log(item)
+				item.cartNum++
+				// if (item.cartNum>item.stock) {
+				//   uni.showToast({
+				//     title: "已经是最多啦!",
+				//     icon: "none",
+				//     duration: 2000
+				//   });
+				//   item.cartNum=item.stock;
+				//   return
+				// }
+				if(item.cartNum>=item.stock){
+					item.cartNum=item.stock;
+				}
+				this.changeCartNum(item)
+			},
+			// 结算
+			submit() {
+				console.log("请选择商品111")
+				// let selectCarts = this.carts
+				//   .filter(item => item.list.some(listItem => listItem.checked === true))
+				//   .map(item => ({
+				//     storeId: item.list[0].storeId || "",
+				//     cartIds: item.list.filter(it=>it.checked == true).map(it => it.id).join(","),
+				//   }));
+				// if(selectCarts.length==0){
+				// 	uni.showToast({
+				// 		icon:'none',
+				// 		title: "请选择商品",
+				// 	});
+				// 	return;
+				// }
+				// var data={token:uni.getStorageSync('CompanyUserToken'),data:selectCarts}
+				const selectCarts = [
+				  ...new Set(
+				    this.carts
+				      .flatMap(store =>
+				        store.list
+				          .filter(item => item.checked === true)
+				          .map(item => item.id)
+				      )
+				  )
+				];
+				if(selectCarts.length==0){
+					uni.showToast({
+						icon:'none',
+						title: "请选择商品",
+					});
+					return;
+				}
+				var data={token:uni.getStorageSync('CompanyUserToken'),cateIds:selectCarts.join(',')}
+				createSalesOrder(data).then(
+					res => {
+						if(res.code==200){
+							uni.navigateTo({
+								url: './confirmCompanyOrder?orderKey='+res.orderKey
+							})
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			showProduct(item){
+				uni.navigateTo({
+					url: '../shopping/productDetails?productId='+item.productId
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+	.content{
+		height: 100%;
+		padding: 20upx;
+		.shopbox {
+			background: #FFFFFF;
+			border-radius: 16rpx;
+			margin-bottom: 20rpx;
+		}
+		.shopbox-name {
+			padding: 30rpx 30rpx 0 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			font-size: 30rpx;
+			color: #111;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+		}
+		.goods-list{
+			.item{
+				box-sizing: border-box;
+				height: 221upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				margin-bottom: 20upx;
+				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-box{
+					height: 160upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					width: calc(100% - 255upx);
+					.title-box{
+						width: 100%;
+						display: flex;
+						align-items: center;
+						.tag{
+							padding: 0 6upx;
+							height: 30upx;
+							line-height: 30upx;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							background: linear-gradient(90deg, #66b2ef 0%, #0bb3f2 100%);
+							border-radius: 4upx;
+							margin-right: 10upx;
+							flex-shrink: 0;
+						}
+						.title{
+							flex: 1;
+							font-size: 28upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+							line-height: 1;
+							display: block;
+						}
+					}
+					.intro{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						margin-top: 22upx;
+						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: #FF6633;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.text{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #FF6633;
+								line-height: 1;
+							}
+						}
+						.num-box{
+							display: flex;
+							align-items: center;
+							.img-box{
+								width: 60upx;
+								height: 60upx;
+								// border-radius: 4upx;
+								border: 1px solid #dddddd;
+								display: flex;
+								align-items: center;
+								justify-content: center;
+								image{
+									width: 25rpx;
+									height: 25rpx;
+								}
+							}
+							input{
+								width: 60upx;
+								height: 60upx;
+								line-height: 60upx;
+								font-size: 28upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								// border-radius: 4upx;
+								border-top: 1px solid #dddddd;
+								border-bottom: 1px solid #dddddd;
+								text-align: center;
+								// margin: 0 16upx;
+							}
+						}
+					}
+				}
+			}
+		}
+		.like-product{
+			padding-bottom: 120upx;
+		}
+		.btn-foot{
+			box-sizing: border-box;
+			width: 100%;
+			height: 121upx;
+			background: #FFFFFF;
+			padding: 16upx 30upx 16upx 60upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			position: fixed;
+			left: 0;
+			bottom: 0;
+			z-index: 99;
+			.left{
+				display: flex;
+				align-items: center;
+				.text{
+					margin-left: 14upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 1;
+				}
+			}
+			.right{
+				display: flex;
+				align-items: center;
+				.total{
+					display: flex;
+					align-items: flex-end;
+					margin-right: 36upx;
+					.label{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						line-height: 1.5;
+					}
+					.price{
+						display: flex;
+						align-items: flex-end;
+						.unit{
+							font-size: 32upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 10upx;
+						}
+						.num{
+							font-size: 30upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+				}
+				.btn{
+					width: 200upx;
+					height: 88upx;
+					line-height: 88upx;
+					text-align: center;
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FFFFFF;
+					background: #0bb3f2;
+					border-radius: 44upx;
+				}
+			}
+		}
+	}
+</style>

+ 447 - 0
pages_company/order/confirmCompanyOrder.vue

@@ -0,0 +1,447 @@
+<template>
+	<view>
+		<view class="inner-box">
+			<!-- 药品列表 -->
+			<view class="goods-list">
+				<view v-for="(item,index) in carts" :key="index" class="item" @click="showDetail(item)">
+					<view class="img-box">
+						<image :src="item.productAttrImage!=null?item.productAttrImage:item.productImage" mode="aspectFill"></image>
+					</view>
+					<view class="info-box">
+						<view>
+							<view class="name-box ellipsis2">
+								<view class="tag">{{$getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
+							</view>
+							<view class="spec ellipsis2">{{item.productAttrName}}</view>
+						</view>
+						<view class="price-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="num">x{{item.cartNum}}</view>
+						</view>
+					</view>
+				</view>
+				<!-- 小计 -->
+				<view class="sub-total">
+					<text class="label">合计金额:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.payPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+			</view>
+			 
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="right">
+				<view class="total" >
+					<text class="label">总金额:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.totalPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+				<!-- <view class="btn" @click="openUpdateMoney()" >
+					实收金额
+				</view> -->
+				<view class="btn">
+					分享
+					<button  class="share" data-name="shareBtn" open-type="share">分享</button>
+				</view>
+			</view>
+		</view>
+		<modal v-if="inputShow" title="实收金额" confirm-text="保存" cancel-text="取消" @cancel="cancelUpdateMoney" @confirm="confirmUpdateMoney">
+			<input type="text" v-model="inputTxt" placeholder="请输入实收金额" class="intxt" maxlength="8" />
+		</modal>
+	</view>
+</template>
+
+<script>
+	import {getSalesOrder,getSalesOrders,updateSaleOrderMoney} from '../api/companyOrder.js'
+	export default {
+		data() {
+			return {
+				inputShow:false,
+				inputTxt:null,
+				orderKey:null,
+				price:{
+					payPrice:0.00,
+					totalPrice:0.00,
+				},
+				carts:[],
+				
+			}
+		},
+		onLoad(option) {
+			this.orderKey=option.orderKey;
+			this.getSalesOrder();
+			 
+		},
+		//发送给朋友
+		onShareAppMessage(res) {
+			return {
+				title: "医健宝医药",
+				path: '/pages_company/order/confirmOrder?orderKey='+this.orderKey,
+				imageUrl: 'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/sharelogo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+			}
+			
+		},
+		methods: {
+			openUpdateMoney(){
+				console.log(1)
+				this.inputShow = true
+			},
+			cancelUpdateMoney(){
+				this.inputShow = false
+			},
+			confirmUpdateMoney(){
+				if(parseFloat(this.inputTxt)>0){
+					// var that=this;
+					// var data={createOrderKey:this.orderKey,token:uni.getStorageSync('CompanyUserToken'),money:this.inputTxt}
+					// updateSalseOrderMoney(data).then(
+					// 	res => {
+					// 		if(res.code==200){
+					// 			this.inputShow = false
+					// 			this.getSalesOrder();
+					// 		}else{
+					// 			uni.showToast({
+					// 				icon:'none',
+					// 				title: res.msg,
+					// 			});
+					// 		}
+					// 	},
+					// 	rej => {}
+					// );
+					// 多店铺修改实付金额
+					const param = {
+						token:uni.getStorageSync('CompanyUserToken'),
+						vos: this.carts.map(item => ({
+							createOrderKey: item.createOrderKey, // 购物车id
+							totalPrice: item.totalMoney,//原价
+							payPrice: item.createOrderKey == this.chooseOrderKey ? Number(this.inputTxt || 0) : item.payMoney//实收价
+						}))
+					}
+					console.log(param)
+					updateSaleOrderMoney(param).then(res => {
+							if(res.code==200){
+								this.chooseOrderKey = ""
+								this.idx = 0
+								this.inputShow = false
+								this.getSalesOrder();
+							}else{
+								uni.showToast({
+									icon:'none',
+									title: res.msg,
+								});
+							}
+						},
+						rej => {}
+					);
+				}
+				else{
+					uni.showToast({
+						icon:'none',
+						title: "价格应大于0",
+					});
+				}
+			},
+			showDetail(item) {
+				uni.navigateTo({
+					url: 'productDetails?productId='+item.productId
+				})
+			},
+			getSalesOrder(){
+				var that=this;
+				that.price.payPrice=0;
+				that.price.totalPrice=0;
+				var data={createOrderKey:this.orderKey}
+				getSalesOrder(data).then(
+					res => {
+						if(res.code==200){
+							this.carts=res.carts;
+							this.carts.forEach(function(element) {
+								// that.price.totalPrice += element.payMoney;
+								that.price.payPrice+=element.price*element.cartNum;
+							});
+							that.price.totalPrice=res.totalMoney
+							 
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			 
+		}
+	}
+</script>
+
+<style lang="scss">
+	.inner-box{
+		padding: 20upx 20upx 140upx;
+		 
+		.goods-list{
+			margin-top: 20upx;
+			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: 10upx;
+						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;
+				.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;
+					}
+				}
+			}
+		}
+		.points{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			 
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.left{
+				display: flex;
+				align-items: center;
+				image{
+					width: 28upx;
+					height: 28upx;
+					margin-right: 20upx;
+				}
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+				}
+			}
+			.right{
+				display: flex;
+				align-items: center;
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					 
+				}
+				image{
+					margin-left: 15upx;
+					width: 14upx;
+					height: 24upx;
+				}
+			}
+		}
+		.remarks{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			margin-top: 20upx;
+			display: flex;
+			align-items: center;
+			input{
+				width: 100%;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #000000;
+			}
+			.input{
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+			}
+		}
+	}
+	.btn-foot{
+		box-sizing: border-box;
+		width: 100%;
+		height: 121upx;
+		background: #FFFFFF;
+		padding: 16upx 30upx;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 99;
+		.right{
+			display: flex;
+			align-items: center;
+			.total{
+				display: flex;
+				align-items: flex-end;
+				margin-right: 15upx;
+				.label{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1.5;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+					.num{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+			.btn{
+				margin-left: 10rpx;
+				width: 180upx;
+				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;
+				position: relative;
+				.share{
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%rpx;
+					opacity: 0;
+				}
+			}
+		}
+	}
+</style>
+ 

+ 572 - 0
pages_company/order/confirmOrder.vue

@@ -0,0 +1,572 @@
+<template>
+	<view>
+		<view class="inner-box">
+			<!-- 药品列表 -->
+			<view class="goods-list">
+				<view v-for="(item,index) in carts" :key="index" class="item" @click="showDetail(item)">
+					<view class="img-box">
+						<image :src="item.productImage" mode="aspectFill"></image>
+					</view>
+					<view class="info-box">
+						<view>
+							<view class="name-box ellipsis2">
+								<view class="tag">{{$getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
+							</view>
+							<view class="spec ellipsis2">{{item.productAttrName}}</view>
+						</view>
+						<view class="price-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="num">x{{item.cartNum}}</view>
+						</view>
+					</view>
+				</view>
+				<!-- 小计 -->
+				<view class="sub-total">
+					<text class="label">订单金额:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.totalPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+			</view>
+			 
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="right">
+				<view class="total">
+					<text class="label">实付金额:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.payPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+				 
+				<view class="btn" @click="submitOrder">支付{{price.payPrice.toFixed(2)}}</view>
+			</view>
+		</view>
+		<view class="message-box" v-if="messageShow">
+			<view class="left">
+				<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/images/close24.png" mode="" @click="closeOrder()" ></image>
+				<view class="text ellipsis">您有{{count0}}个待支付订单</view>
+			</view>
+			<view class="btn" @click="showOrder()">查看</view>
+		</view>
+		<!-- <ykscreenRecord></ykscreenRecord> -->
+	</view>
+</template>
+
+<script>
+	import {getOrderCount} from '@/api/myStoreOrder'
+	import {getSalesOrder,getSalesOrders,addUserCart} from '../api/companyOrder.js'
+	// import ykscreenRecord from "@/components/yk-screenRecord/yk-screenRecord.vue"
+	export default {
+		// components: {
+		// 	ykscreenRecord
+		// },
+		data() {
+			return {
+				count0:0,
+				messageShow:false,
+				orderKey:null,
+				price:{
+					totalPrice:0.00,
+					payPrice:0.00,
+				},
+				carts:[],
+				
+			}
+		},
+		onLoad(option) {
+			console.log("qxj option:"+JSON.stringify(option));
+			this.orderKey=option.orderKey;
+		},
+		onShow() {
+			if(this.$isLogin()){
+				this.getOrderCount();
+			}
+			this.getSalesOrder();
+		},
+		methods: {
+			showOrder(){
+				this.$isLogin().then(res => {
+					if(res){
+						uni.navigateTo({
+							url: '/pages_user/shopping/storeOrder?status=0'
+						})
+					}
+				})
+			},
+			closeOrder(){
+				this.messageShow=false;
+			},
+			getOrderCount(){
+				getOrderCount().then(
+					res => {
+						if(res.code==200){
+							this.count0=res.count0;
+							if(this.count0>0){
+								this.messageShow=true;
+							}
+						} 
+					},
+					rej => {}
+				);
+			},
+			showDetail(item) {
+				uni.navigateTo({
+					url: './productShowDetails?productId='+item.productId
+				})
+			},
+			getSalesOrder(item){
+				var that=this;
+				var data={createOrderKey:this.orderKey}
+				getSalesOrder(data).then(
+					res => {
+						if(res.code==200){
+							this.carts=res.carts;
+							this.carts.forEach(function(element) {
+								// that.price.payPrice += element.payMoney;
+								that.price.totalPrice+=element.price*element.cartNum;
+							});
+							that.price.payPrice=res.totalMoney
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// 提交订单
+			submitOrder() {
+				this.$isLogin().then(res => {
+					if(res){
+						var data={createOrderKey:this.orderKey}
+						addUserCart(data).then(
+							res => {
+								if(res.code==200){
+									const confirmParam = res.carts.map((item,i)=>({
+										storeId: item.storeId,
+										data: {
+										  type: "buy",
+										  cartIds: item.cartQueryList.map(it => it.id).join(",")
+										}
+									}))
+									const companyId = res.companyId ||''
+									const companyUserId = res.companyUserId ||''
+									uni.navigateTo({
+										url: '/pages_shopping/confirmCreateOrder?companyId='+companyId+"&companyUserId="+companyUserId+"&createOrderKey="+this.orderKey +'&confirmParam='+encodeURIComponent(JSON.stringify(confirmParam))
+									})
+									// uni.navigateTo({
+									// 	url: '/pages_shopping/confirmCreateOrder?type=buy&cartIds='+res.cartIds.toString()+"&companyId="+res.companyId+"&companyUserId="+res.companyUserId+"&createOrderKey="+this.orderKey
+									// })
+								}else{
+									uni.showToast({
+										icon:'none',
+										title: res.msg,
+									});
+								}
+							},
+							rej => {}
+						);
+						//将购物车产品更新为自己的购物车 
+					}
+				})
+				
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.inner-box{
+		padding: 20upx 20upx 140upx;
+		 
+		.goods-list{
+			margin-top: 20upx;
+			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, #66b2ef 0%, #2BC7B9 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: 10upx;
+						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;
+				.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;
+					}
+				}
+			}
+		}
+		.points{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			 
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.left{
+				display: flex;
+				align-items: center;
+				image{
+					width: 28upx;
+					height: 28upx;
+					margin-right: 20upx;
+				}
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+				}
+			}
+			.right{
+				display: flex;
+				align-items: center;
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					 
+				}
+				image{
+					margin-left: 15upx;
+					width: 14upx;
+					height: 24upx;
+				}
+			}
+		}
+		.remarks{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			margin-top: 20upx;
+			display: flex;
+			align-items: center;
+			input{
+				width: 100%;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #000000;
+			}
+			.input{
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+			}
+		}
+	}
+	
+	
+	.btn-foot{
+		box-sizing: border-box;
+		width: 100%;
+		height: 121upx;
+		background: #FFFFFF;
+		 
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 99;
+		.right{
+			display: flex;
+			align-items: center;
+			.total{
+				display: flex;
+				align-items: flex-end;
+				margin-right: 15upx;
+				.label{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1.5;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+					.num{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+			.btn{
+				margin-right: 15upx;
+				padding: 20rpx 30rpx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #2BC7B9;
+				border-radius: 44upx;
+			}
+		}
+	}
+</style>
+<style lang="less" scoped>
+	.coupon {
+	  height: 100%;
+	}
+	/*优惠券列表公共*/
+	.coupon-list {
+	}
+	.coupon-list .item {
+	  display: flex;
+	  flex-direction: column;
+	  justify-content: center;
+	  align-items: center;
+	  width: 100%;
+	  height: 1.7 * 100rpx;
+	  margin-bottom: 0.16 * 100rpx;
+	}
+	
+	.coupon-list .item .money {
+	  background-size: 100% 100%;
+	  width: 2.4 * 100rpx;
+	  height: 100%;
+	  color: #fff;
+	  font-size: 0.36 * 100rpx;
+	  font-weight: bold;
+	  text-align: center;
+	  display: flex;
+	  flex-direction: column;
+	  align-items: center;
+	  justify-content: center;
+	  position: relative;
+	  
+	}
+	.coupon-list .item .money .img{
+	  position: absolute;
+	  width: 2.4 * 100rpx;
+	  height: 100%;
+	  color: #fff;
+	  
+	}
+	
+	.coupon-list .item .money .num {
+	  font-size: 0.6 * 100rpx;
+	}
+	.coupon-list .item .money .pic-num {
+	  font-size: 20rpx;
+	  z-index: 99;
+	}
+
+	
+	.coupon-list .item .text {
+	  width: 4.5 * 100rpx;
+	  padding: 0 0.17 * 100rpx 0 0.24 * 100rpx;
+	  background-color: #fff;
+	  box-sizing: border-box;
+	}
+	
+	.coupon-list .item .text .condition {
+	  font-size: 0.3 * 100rpx;
+	  color: #282828;
+	  height: 0.93 * 100rpx;
+	  line-height: 0.93 * 100rpx;
+	  border-bottom: 1px solid #f0f0f0;
+	}
+	
+	.coupon-list .item .text .data {
+	  font-size: 0.2 * 100rpx;
+	  color: #999;
+	  height: 0.76 * 100rpx;
+	}
+	
+	.coupon-list .item .text .data .bnt {
+	  width: 1.36 * 100rpx;
+	  height: 0.44 * 100rpx;
+	  border-radius: 0.22 * 100rpx;
+	  font-size: 0.22 * 100rpx;
+	  color: #fff;
+	  text-align: center;
+	  line-height: 0.44 * 100rpx;
+	  background-color: red;
+	}
+	
+	.coupon-list .item .text .data .bnt.gray {
+	  background-color: #ccc;
+	}
+	.message-box{
+		box-sizing: border-box;
+		width: 693upx;
+		height: 84upx;
+		background: #F3FFFD;
+		border: 1px solid #C7E9E5;
+		box-shadow: 0px 4upx 12upx 0px rgba(90, 203, 138, 0.16);
+		border-radius: 16upx;
+		position: fixed;
+		left: 50%;
+		transform: translateX(-50%);
+		bottom: 128upx;
+		z-index: 99;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 0 20upx 0 30upx;
+		.left{
+			width: 80%;
+			display: flex;
+			align-items: center;
+			image{
+				width: 24upx;
+				height: 24upx;
+				margin-right: 18upx;
+			}
+			.text{
+				width: 90%;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #2BC7B9;
+			}
+		}
+		.btn{
+			width: 100upx;
+			height: 48upx;
+			line-height: 48upx;
+			text-align: center;
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			border: 1px solid #D2E6FF;
+			background: linear-gradient(135deg, #66b2ef 0%, #2BC7B9 100%);
+			border-radius: 24upx;
+			margin-left: 30upx;
+		}
+	}
+</style>
+

+ 364 - 0
pages_company/order/coupon.vue

@@ -0,0 +1,364 @@
+<template>
+  <view ref="container">
+	<view class="search-cont">
+		<view class="inner">
+			<image class="icon-search" src="/static/images/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 class="tui-coupon-list">
+      <view class="tui-coupon-item tui-top20" v-for="(item, index) in couponsList" :key="index">
+         <image src="/static/images/bg_coupon_3x.png" class="tui-coupon-bg" mode="widthFix"></image>
+		<view class="tui-coupon-item-left">
+          <view class="tui-coupon-price-box" :class="{ 'tui-color-grey': item.receiveCount>0 }">
+            <view class="tui-coupon-price-sign">¥</view>
+            <view class="tui-coupon-price" :class="{ 'tui-price-small': false }">{{ item.couponPrice }}</view>
+          </view>
+          <view class="tui-coupon-intro">满{{ item.useMinPrice }}元可用</view>
+        </view>
+        <view class="tui-coupon-item-right">
+          <view class="tui-coupon-content">
+            <view class="tui-coupon-title-box">
+              <view class="tui-coupon-title">{{ item.couponName }}</view>
+            </view>
+            <view class="tui-coupon-rule">
+              <view class="tui-rule-box tui-padding-btm">
+                <view class="tui-coupon-circle"></view>
+                <view class="tui-coupon-text">不可叠加使用</view>
+              </view>
+              <view class="tui-rule-box">
+                <view class="tui-coupon-circle"></view>
+                <view class="tui-coupon-text">{{ item.limitTime }} 到期</view>
+            
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="tui-btn-box">
+			<view class="btn receive"   @click="show(item)">查看</view>
+        </view>
+      </view>
+    </view>
+	<Loading :loaded="loadend" :loading="loading"></Loading>
+	<!--暂无优惠券-->
+	<view v-if="couponsList.length == 0 && page > 1" class="no-data-box" >
+		<image src="/static/images/no_data.png" mode="aspectFit"></image>
+		<view class="empty-title">暂无数据</view>
+	</view>
+  </view>
+</template>
+<script>
+import { getCompanyCouponIssueList, receive } from '@/api/coupon'
+import Loading from '@/components/Loading'
+export default {
+  name: 'getCoupon',
+  components: {
+    Loading,
+  },
+  props: {},
+  data: function() {
+    return {
+		searchKey:null,
+		limit: 10,
+		couponsList: [],
+		loading: false,
+		loadend: false,
+		page: 1,
+		limit: 10,
+	}
+  },
+  onLoad(options) {
+  },
+  mounted: function() {
+    
+  },
+  onShow() {
+  	this.getCompanyCouponIssueList()
+  },
+  onReachBottom() {
+    !this.loading && this.getCompanyCouponIssueList()
+  },
+  methods: {
+	goSearch(e) {
+		this.searchKey=e.detail.value;
+		this.page=1;
+		this.couponsList=[];
+		this.getCompanyCouponIssueList()
+	},
+    show(item){
+		uni.navigateTo({
+			url: '../couponDetails?id=' +item.id+"&type=1"
+		})
+	},
+    getCompanyCouponIssueList() {
+      if (this.loading) return //阻止下次请求(false可以进行请求);
+      if (this.loadend) return //阻止结束当前请求(false可以进行请求);
+      this.loading = true
+	  var q=null;
+	  if(this.searchKey!=null){
+		  q = { couponPrice:this.searchKey,  page: this.page, pageSize: this.limit,couponType:2 }
+	  }
+	  else{
+		  q = {    page: this.page, pageSize: this.limit,couponType:2 }
+	  }
+      getCompanyCouponIssueList(q).then(res => {
+        this.loading = false
+        this.couponsList.push.apply(this.couponsList, res.data.list)
+        this.loadend = res.data.list.length < this.limit //判断所有数据是否加载完成;
+        this.page = this.page + 1
+      })
+    },
+  },
+}
+</script>
+
+<style lang="less" scoped>
+page {
+  background-color: #f5f5f5;
+}
+
+.container {
+  padding-bottom: env(safe-area-inset-bottom);
+}
+.search-cont{
+	width: 100%;
+	z-index: 999;
+	position: fixed;
+	top: 0;
+	left: 0;
+	padding: 0upx 30upx;
+	background-color: #FFFFFF;
+	.inner{
+		box-sizing: border-box;
+		width: 100%;
+		height: 72upx;
+		line-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;
+		}
+	}
+}
+ 
+.tui-coupon-list {
+	margin-top: 72rpx;
+	width: 100%;
+	padding: 0 25rpx;
+	box-sizing: border-box;
+}
+ 
+.tui-coupon-item {
+  
+  width: 100%;
+  height: 210rpx;
+  position: relative;
+  display: flex;
+  align-items: center;
+  padding-right: 30rpx;
+  box-sizing: border-box;
+  overflow: hidden;
+ 
+}
+
+.tui-coupon-bg {
+  width: 100%;
+  height: 210rpx;
+  position: absolute;
+  left: 0;
+  top: 0;
+  z-index: 1;
+}
+
+.tui-coupon-sign {
+  height: 110rpx;
+  width: 110rpx;
+  position: absolute;
+  z-index: 9;
+  top: -30rpx;
+  right: 40rpx;
+}
+
+.tui-coupon-item-left {
+  width: 218rpx;
+  height: 210rpx;
+  position: relative;
+  z-index: 2;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  flex-shrink: 0;
+}
+
+.tui-coupon-price-box {
+  display: flex;
+  color: #e41f19;
+  align-items: flex-end;
+}
+
+.tui-coupon-price-sign {
+  font-size: 30rpx;
+}
+
+.tui-coupon-price {
+  font-size: 32rpx;
+  line-height: 68rpx;
+  font-weight: bold;
+}
+
+.tui-price-small {
+  font-size: 58rpx !important;
+  line-height: 56rpx !important;
+}
+
+.tui-coupon-intro {
+  background: #f7f7f7;
+  padding: 8rpx 10rpx;
+  font-size: 26rpx;
+  line-height: 26rpx;
+  font-weight: 400;
+  color: #666;
+  margin-top: 18rpx;
+}
+
+.tui-coupon-item-right {
+  flex: 1;
+  height: 210rpx;
+  position: relative;
+  z-index: 2;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding-left: 24rpx;
+  box-sizing: border-box;
+  overflow: hidden;
+}
+
+.tui-coupon-content {
+  width: 82%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.tui-coupon-title-box {
+  display: flex;
+  align-items: center;
+}
+
+.tui-coupon-btn {
+  padding: 6rpx;
+  background: #ffebeb;
+  color: #e41f19;
+  font-size: 25rpx;
+  line-height: 25rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  transform: scale(0.9);
+  transform-origin: 0 center;
+  border-radius: 4rpx;
+  flex-shrink: 0;
+}
+
+.tui-color-grey {
+  color: #888 !important;
+}
+
+.tui-bg-grey {
+  background: #f0f0f0 !important;
+  color: #888 !important;
+}
+
+.tui-coupon-title {
+  width: 100%;
+  font-size: 26rpx;
+  color: #333;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.tui-coupon-rule {
+  padding-top: 52rpx;
+}
+
+.tui-rule-box {
+  display: flex;
+  align-items: center;
+  transform: scale(0.8);
+  transform-origin: 0 100%;
+}
+
+.tui-padding-btm {
+  padding-bottom: 6rpx;
+}
+
+.tui-coupon-circle {
+  width: 8rpx;
+  height: 8rpx;
+  background: rgb(160, 160, 160);
+  border-radius: 50%;
+}
+
+.tui-coupon-text {
+  font-size: 28rpx;
+  line-height: 28rpx;
+  font-weight: 400;
+  color: #666;
+  padding-left: 8rpx;
+  white-space: nowrap;
+}
+
+.tui-top20 {
+  margin-top: 20rpx;
+}
+
+.tui-coupon-title {
+  font-size: 28rpx;
+  line-height: 28rpx;
+}
+
+.tui-coupon-radio {
+  transform: scale(0.7);
+  transform-origin: 100% center;
+}
+
+.tui-btn-box {
+  position: absolute;
+  right: 20rpx;
+  bottom: 40rpx;
+  z-index: 10;
+  .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 red;
+  		color: red;
+  	}
+  	&.receive{
+  		background: red;
+  		color: #FFFFFF;
+  	}
+  }
+}
+</style>

+ 1522 - 0
pages_company/order/productDetails.vue

@@ -0,0 +1,1522 @@
+<template>
+	<view class="content" style="padding-bottom: 144rpx;">
+		<!-- 商品轮播图片 -->
+		<view class="shop-banner" @click="showImg()">
+			<swiper class="swiper" :indicator-dots="false" :circular="true" :autoplay="true" :interval="3000"
+				:duration="1000" indicator-color="rgba(255, 255, 255, 0.6)" indicator-active-color="#ffffff"
+				@change="swiperChange">
+				<swiper-item class="swiper-item" v-for="(item,index) in  banner" :key="index">
+					<image :src="item" mode="aspectFill"></image>
+				</swiper-item>
+			</swiper>
+			<!-- 底部遮罩 -->
+			<view class="banner-mask"></view>
+			<!-- 数量 -->
+			<view class="num-box">{{ activeBanner }}/{{ banner.length }}</view>
+		</view>
+		<!-- 详细信息 -->
+		<view class="det-info">
+			<view class="price-box">
+				<view class="price">
+					<text class="label" style="color: #FF5C03;">会员价</text>
+					<text class="unit">¥</text>
+					<text class="num">{{product.price}}</text>
+					<text class="label">零售价</text>
+					<text class="old">¥{{product.otPrice}}</text>
+				</view>
+				<view class="share-box">
+					<text class="text">分享</text>
+					<image
+						src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/share1.png"
+						mode=""></image>
+					<button class="share" data-name="shareBtn" open-type="share">分享</button>
+				</view>
+			</view>
+			<view class="name-box">
+				<view class="tag" :style="{background:_background(product.productType)}">
+					{{$getDictLabelName("storeProductType",product.productType)}}</view>
+					{{product.commonName&&product.commonName!=='-'?product.commonName:product.productName}}
+			</view>
+			<u-parse class="intro" v-if="product.productInfo!=null" :content="product.productInfo.replace(/\n/g,'<br>')">
+			</u-parse>
+		</view>
+		<view class="other-box">
+			<view class="other-box-item">
+				<view class="label">商品名称</view>
+				<view class="text">{{product.productName||''}}</view>
+			</view>
+			<view class="other-box-item" v-if="!_showTxt">
+				<view class="label">通用名称</view>
+				<view class="text">{{product.commonName}}</view>
+			</view>
+			<view class="other-box-item">
+				<view class="label">包装规格</view>
+				<view class="text">{{product.prescribeSpec||'--'}}</view>
+			</view>
+			<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>
+				<view class="text">{{product.drugRegCertNo||'--'}}</view>
+			</view>
+			<view class="other-box-item" v-if="!_showTxt">
+				<view class="label">规格</view>
+				<view class="text">{{product.specification||'--'}}</view>
+			</view>
+			<view class="other-box-item">
+				<view class="label">商品条码</view>
+				<view class="text">{{product.barCode||'--'}}</view>
+			</view>
+		</view>
+		
+		<!-- 购买人数、库存 -->
+		<!-- <view class="inventor">
+			<view class="left">
+				<view class="head-box">
+					<view class="head" v-for="(item,j) in 5" :key="j">
+						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/head.jpg" mode=""></image>
+					</view>
+				</view> 
+				<view class="num-box">
+					已有 <text class="text">{{product.sales}}</text> 人购买
+				</view>
+			</view>
+			<view class="right">
+				库存 <text class="text">{{product.stock}}{{product.unitName}}</text>
+			</view>
+			<view class="right">
+				 <text class="text">库存{{product.stock>0?'充足':'售罄'}} </text>
+			</view>
+		</view> -->
+		<!-- 功效 -->
+		<view class="effect" v-if="product.instructionManual">
+			<view class="label">{{product.commonName&&product.commonName!=='-'?product.commonName:product.productName}}药品说明书</view>
+			<view :class="product.productType ==2&&isView==0 ? 'hiddenbox':''" style="margin-top: 20rpx;">
+				<u-parse :content="product.instructionManual" :style="{display: 'block'}"></u-parse>
+			</view>
+			<view class="shadowbox" v-if="product.productType ==2&&isView==0">
+				<view class="shadowbox-btn x-ac" @click="handleShow">
+					<text style="margin-right: 10rpx;">点击查看说明书全文</text>
+					<u-icon name="arrow-down" color="#999" size="14"></u-icon>
+				</view>
+			</view>
+		</view>
+		<u-popup :show="show" mode="center" :round="10" @close="show=false" :closeOnClickOverlay="false">
+			<view class="popupbox">
+				<view class="popupbox-title">如何查看说明书</view>
+				<view class="popupbox-body">
+					需要先问诊获得处方后才能查看说明书,请点<text class="confirm" @click="addCart('buy')">问诊开药</text>开处方!
+				</view>
+				<view class="popupbox-footer" @click="show=false">我知道了</view>
+			</view>
+		</u-popup>
+		<!-- 商品评价 -->
+		<view class="det-box evaluate">
+			<view class="title">商品评价({{evaluateTotal}})</view>
+			<view class="evaluate">
+				<evaluateItem v-for="(item,index) in evaluate" :key="index" :item="item"></evaluateItem>
+				<view class="footer-desc" v-if="evaluate&&evaluate.length>0"> 
+					<text @click="moreEvaluate">查看更多评价</text>
+					<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/arrow_gray.png"></image>
+				</view>
+			</view>
+		</view>
+		<!-- 图文详情 -->
+		<view class="det-box">
+			<view class="title">图文详情</view>
+			<view class="inner">
+				<u-parse :content="product.description" :tagStyle="tagStyle"></u-parse>
+			</view>
+			<view class="other-box product-other-box" style="margin: 0;padding: 24rpx 0;">
+				<view v-if="_showTxt&&product.medicalRegCertNo">
+					<text class="label" style="margin-right: 16rpx;">【医疗器械注册证编号/备案凭证编号】</text>
+					<text class="text">{{product.medicalRegCertNo}}</text>
+				</view>
+				<view v-if="_showTxt&&product.prodLicenseNo">
+					<text class="label" style="margin-right: 16rpx;">【生产许可证/备案凭证编号】</text>
+					<text class="text">{{product.prodLicenseNo}}</text>
+				</view>
+				<view v-if="_showTxt&&product.prodTechReqNo">
+					<text class="label" style="margin-right: 16rpx;">【产品技术要求编号】</text>
+					<text class="text">{{product.prodTechReqNo}}</text>
+				</view>
+				<view v-if="_showTxt&&product.productStructure">
+					<text class="label" style="margin-right: 16rpx;">【结构及组成】</text>
+					<text class="text">{{product.productStructure}}</text>
+				</view>
+				<view v-if="product.dosageForm&&!_showTxt">
+					<text class="label" style="margin-right: 16rpx;">【剂型】</text>
+					<text class="text">{{product.dosageForm}}</text>
+				</view>
+				<view v-if="product.mah">
+					<text class="label" style="margin-right: 16rpx;">{{_showTxt?'【注册人/备案人】':'【上市许可证持有人】'}}</text>
+					<text class="text">{{product.mah}}</text>
+				</view>
+				<view v-if="product.mahAddress">
+					<text class="label" style="margin-right: 16rpx;">{{_showTxt?'【注册人/备案人地址】':'【上市许可证持有人地址】'}}</text>
+					<text class="text">{{product.mahAddress}}</text>
+				</view>
+				<view v-if="product.manufacturer">
+					<text class="label" style="margin-right: 16rpx;">【生产企业】</text>
+					<text class="text">{{product.manufacturer}}</text>
+				</view>
+				<view v-if="product.manufacturerAddress">
+					<text class="label" style="margin-right: 16rpx;">【生产企业地址】</text>
+					<text class="text">{{product.manufacturerAddress}}</text>
+				</view>
+				<template v-if="product.productType !=2||isView==1">
+					<view v-if="product.indications">
+						<text class="label" style="margin-right: 16rpx;">【功能主治/适用范围】</text>
+						<text class="text">{{product.indications}}</text>
+					</view>
+					<view v-if="product.dosage">
+						<text class="label" style="margin-right: 16rpx;">【用法用量】</text>
+						<text class="text">{{product.dosage}}</text>
+					</view>
+					<view v-if="product.adverseReactions">
+						<text class="label" style="margin-right: 16rpx;">【不良反应】</text>
+						<text class="text">{{product.adverseReactions}}</text>
+					</view>
+					<view v-if="product.contraindications">
+						<text class="label" style="margin-right: 16rpx;">{{_showTxt?'【禁忌症】':'【禁忌】'}}</text>
+						<text class="text">{{product.contraindications}}</text>
+					</view>
+					<view v-if="product.precautions">
+						<text class="label" style="margin-right: 16rpx;">【注意事项】</text>
+						<text class="text">{{product.precautions}}</text>
+					</view>
+				</template>
+			</view>
+		</view>
+		<view class="storebox" v-if="chooseStore.storeId">
+			<view class="x-bc">
+				<view class="x-f">
+					<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(chooseStore)">进店</view>
+			</view>
+			<detail :source="'product'" ref="getStoreInfo" :storeInfo="storeInfo"></detail>
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="menu-box">
+				<!-- <view class="item" @click="goHome">
+					<image
+						src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/back_home.png"
+						mode=""></image>
+					<text class="label">首页</text>
+				</view> -->
+				<!-- <view class="item" style="position: relative;">
+					<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/consult_small.png" mode=""></image>
+					<text class="label">咨询</text>
+					<button class="contact-btn" open-type="contact"></button>
+				</view> -->
+				<view class="item" @click="navgetTo('./cart')">
+					<view class="img-item">
+						<u-badge type="error" max="99" :value="cartCount" :offset="[-10,-10]"
+							:absolute="true"></u-badge>
+						<image
+							src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/fs/20250929/73574822bab04a86ae77b772b4e28952.png"
+							mode=""></image>
+					</view>
+					<text class="label">购物车</text>
+				</view>
+			</view>
+			<view class="btn-box">
+				<view class="btn cart" @click="addCart('cart')">加入购物车</view>
+				<!-- <view class="btn buy" @click="addCart('buy')">{{buyText}}</view> -->
+			</view>
+		</view>
+		<!-- 选择药品规格弹窗 -->
+		<popupBottom ref="popup" :visible.sync="specVisible" title=" " radius="32" maxHeight="1024">
+			<view class="product-spec">
+				<!-- 商品信息 -->
+				<view class="pro-info">
+					<view class="img-box" @click="showImg(productValueSelect.image)">
+						<image
+							:src="productValueSelect.image==null||productValueSelect.image==''?product.image:productValueSelect.image"
+							mode="aspectFill"></image>
+					</view>
+					<view class="info-text">
+						<view class="price">
+							<text class="unit">¥</text>
+							<text class="num">{{ productValueSelect.price.toFixed(2) }}</text>
+						</view>
+						<view class="desc-box">
+							<text class="text">已选:{{ productValueSelect.sku }}</text>
+							<text class="text">库存{{ productValueSelect.stock?'充足':'售罄' }}</text>
+						</view>
+					</view>
+				</view>
+				<!-- 规格 -->
+				<view class="spec-box">
+					<view v-for="(item,index) in attrs">
+						<view class="title">{{item.attrName}}</view>
+						<view class="spec-list">
+							<view v-for="(subItem,subindex) in item.values" :key="subindex"
+								:class="subindex==item.index?'item active':'item'" @click="choseSpec(index,subindex)">
+								{{ subItem }}
+							</view>
+						</view>
+					</view>
+				</view>
+				<!-- 数量 -->
+				<view class="price-num">
+					<view class="label">数量</view>
+					<view class="num-box">
+						<view class="img-box" @click="lessNum()">
+							<image v-if="specNum <= 1"
+								src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/jian.png"
+								mode=""></image>
+							<image v-else
+								src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/jian2.png"
+								mode=""></image>
+						</view>
+						<input type="number" @change="changeNum" v-model="specNum" />
+						<view class="img-box" @click="addNum()">
+							<image
+								src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/add.png"
+								mode=""></image>
+						</view>
+					</view>
+				</view>
+				<view class="sub-btn" @click="submit">确定</view>
+			</view>
+		</popupBottom>
+		<view class="loadding" v-if="loadding==true">
+			<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/logo.png"></image>
+			<text class="text">加载中...</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	import detail from '@/components/storeDetail.vue'
+	import {getCartCount,storeDetail} from '@/api/index.js'
+	import {getDicts} from '@/api/common.js'
+	import { getProductDetails, addCart,instructionsViewable } from '@/pages_shopping/api/product.js'
+	import {selectCommentByUser} from '@/api/myStoreOrder.js'
+	import popupBottom from '@/components/px-popup-bottom.vue'
+	import evaluateItem from '@/components/evaluateItem.vue'
+	export default {
+		components: {
+			popupBottom,
+			evaluateItem,
+			detail
+		},
+		data() {
+			return {
+				loadding: true,
+				buyText: "立即购买",
+				type: null,
+				productValueSelect: {
+					price: 0,
+				},
+				banner: [],
+				productId: null,
+				attrs: [],
+				values: [],
+				product: {
+					price: 0,
+					otPrice: 0,
+				},
+
+				// 当前轮播的图片
+				activeBanner: 1,
+				// 购物车数量
+				cartCount: 0,
+				// 规格弹窗
+				specVisible: false,
+				// 规格数量
+				specNum: 1,
+				chooseStore: {},
+				storeList: [],
+				storeId: '',
+				evaluateTotal: 0,
+				evaluate: [],
+				show: false,
+				isView: 0,
+				storeInfo: {},
+				stockNum: 0,
+				tagStyle: {
+					img: 'display: block;'
+				}
+			};
+		},
+		computed: {
+			_background() {
+				//productType: 1:OTC,2:Rx,3:非药品,4:器械
+				return (productType) => {
+					switch (productType) {
+						case 1:
+							return '#37E2EA' // OTC
+						case 2:
+							return 'red' // Rx
+						case 3:
+							return '#2583EB' // 非药品
+						case 4:
+							return '#999' // 器械
+						default:
+							return '#ccc'
+					}
+				}
+			},
+			_showTxt() {
+				if(this.product&&this.product.productType) {
+					const name = this.$getDictLabelName("storeProductType",this.product.productType)
+					return name.includes('器械');
+				}else {
+					return false
+				}
+			}
+		},
+		onLoad(options) {
+			if (options.userId != null) {
+				uni.setStorageSync('tuiUserId', options.userId);
+			} else if (options.hasOwnProperty('q') && options.q) {
+				// 通过下面这步解码,可以拿到url的值
+				const url = decodeURIComponent(options.q)
+				this.url = url;
+				// // 对url中携带的参数提取处理
+				const obj = this.$urlToObj(url)
+				uni.setStorageSync('tuiUserId', obj.userId);
+			}
+			this.storeId = options.storeId || '';
+			uni.showShareMenu({
+				withShareTicket: true,
+				//小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
+				menus: ["shareAppMessage", "shareTimeline"] //不设置默认发送给朋友
+			})
+			this.getDicts();
+			this.productId = options.productId;
+			this.$isLogin().then(res => {
+				if (res) {
+					this.getCartCount();
+				}
+			})
+		},
+		onShow() {
+			this.getProductDetails();
+		},
+		//发送给朋友
+		onShareAppMessage(res) {
+			this.$isLogin().then(res => {
+				if (res) {
+					var user = JSON.parse(uni.getStorageSync('userInfo'))
+					return {
+						title: this.commonName&&this.product.commonName!=='-'?this.product.commonName:this.product.productName,
+						path: '/pages_shopping/productDetails?productId=' + this.product.productId + "&userId=" +
+							user.userId,
+					}
+				}
+			})
+		},
+		//分享到朋友圈
+		onShareTimeline(res) {
+			this.$isLogin().then(res => {
+				if (res) {
+					var user = JSON.parse(uni.getStorageSync('userInfo'))
+					return {
+						title: this.commonName&&this.product.commonName!=='-'?this.product.commonName:this.product.productName,
+						query: 'productId=' + this.product.productId + "&userId=" + user.userId, //页面参数
+					}
+				}
+			})
+
+		},
+		methods: {
+			getStoreInfo() {
+				storeDetail(this.storeId).then(res=>{
+					if(res.code==200) {
+						this.storeInfo =res.data || {}
+						this.storeInfo.doctorList = this.storeInfo.doctorList.map(doctor => {
+							return {
+							  ...doctor,
+							  // 假设images字段是逗号分隔的图片字符串
+							  imagesArray: doctor.practiseImages ? 
+								doctor.practiseImages.split(',').map(img => img.trim()).filter(img => img) : []
+							};
+						  });
+						this.$refs.getStoreInfo.getDescHeight()
+					}
+				})
+			},
+			handleShow() {
+				uni.showLoading({
+					title: '加载中',
+					icon: 'none'
+				})
+				instructionsViewable({productId: this.productId}).then(
+					res => {
+						uni.hideLoading()
+						if(res.code==200){
+							this.isView = res.data ? 1 : 0
+							this.show = this.isView == 0
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			goStoreDetail(item) {
+				uni.navigateTo({
+					url: '/pages_store/storeIndex?storeId=' + item.storeId
+				})
+			},
+			getDicts: function() {
+				getDicts().then(
+					res => {
+						if (res.code == 200) {
+							uni.setStorageSync('dicts', JSON.stringify(res));
+						}
+
+					},
+					rej => {}
+				);
+			},
+			showImg(img) {
+				if (img != null) {
+					var imgs = [];
+					imgs.push(img)
+					//预览图片
+					uni.previewImage({
+						urls: imgs,
+						current: imgs[0]
+					});
+				} else {
+					//预览图片
+					uni.previewImage({
+						urls: this.banner,
+						current: this.banner[0]
+					});
+				}
+			},
+			doAddCart(type) {
+				if (this.specNum == 0) {
+					uni.showToast({
+						icon: 'none',
+						title: "库存不足",
+					});
+					return;
+				}
+				var isBuy = type == "buy" ? 1 : 0;
+				let data = {
+					isBuy: isBuy,
+					cartNum: this.specNum,
+					productId: this.productValueSelect.productId,
+					attrValueId: this.productValueSelect.id,
+					type: 1
+				};
+				addCart(data).then(
+					res => {
+						if (res.code == 200) {
+							if (type == "buy") {
+								const selectCarts = [{
+									storeId: this.storeId,
+									data: {
+										type: this.type,
+										cartIds: res.id,
+									}
+								}]
+								uni.navigateTo({
+									url: '/pages_shopping/confirmOrder?type=' + this.type + '&orderType=' +
+										this.orderType + '&confirmParam=' + encodeURIComponent(JSON.stringify(
+											selectCarts))
+								})
+							} else {
+								this.getCartCount()
+								uni.showToast({
+									icon: 'success',
+									title: "添加成功",
+								});
+							}
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.msg,
+							});
+							this.getProductDetails()
+						}
+					},
+					rej => {}
+				);
+			},
+			getProductDetails() {
+				let data = {
+					productId: this.productId
+				};
+				getProductDetails(data).then(
+					res => {
+						this.loadding = false
+						if (res.code == 200) {
+							this.stockNum = res.num || 0;
+							this.product = res.product;
+							if (this.product.productType == 1) {
+								this.buyText = "立即购买"
+							} else if (this.product.productType == 2) {
+								this.buyText = "开方购买"
+							}
+							this.product.otPrice = this.product.otPrice.toFixed(2);
+							this.product.price = this.product.price.toFixed(2);
+							if (this.product.sliderImage != null) {
+								this.banner = this.product.sliderImage.split(',');
+							} else {
+								this.banner = []
+							}
+							this.attrs = res.productAttr;
+							this.attrs.forEach((item, index, arr) => {
+								item.values = item.attrValues.split(',');
+								item.index = 0
+							})
+							console.log(this.attrs)
+							this.values = res.productValues;
+							this.storeId = res.store.storeId || ''
+							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)
+							this.getCommentByUser()
+							this.getStoreInfo();
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.msg,
+							});
+							setTimeout(function() {
+								uni.reLaunch({
+									url: '/pages/index/index',
+								})
+							}, 2000)
+
+						}
+					},
+					rej => {}
+				);
+			},
+			getCartCount() {
+				let data = {};
+				getCartCount(data).then(
+					cartRes => {
+						if (cartRes.code == 200) {
+							this.cartCount = cartRes.data;
+						}
+					},
+					rej => {}
+				);
+
+			},
+			// swiper变化事件
+			swiperChange(event) {
+				this.activeBanner = event.detail.current + 1
+			},
+			// 回到首页
+			goHome() {
+				uni.switchTab({
+					url: '/pages/index/index'
+				})
+			},
+			// 跳转页面
+			navgetTo(url) {
+				this.$isLogin().then(res => {
+					if (res) {
+						uni.navigateTo({
+							url: url
+						})
+					}
+				})
+			},
+			// 加入购物车
+			addCart(type) {
+				this.show=false
+				this.$isLogin().then(res => {
+					if (res) {
+						this.type = type;
+						this.specVisible = true
+					} else {
+						uni.navigateTo({
+							url: '/pages/auth/login'
+						})
+					}
+				})
+			},
+			// 规格选择
+			choseSpec(index, subIndex) {
+				this.attrs[index].index = subIndex;
+				this.$forceUpdate();
+				let productAttr = this.attrs;
+				let values = [];
+				for (let i = 0; i < productAttr.length; i++) {
+					for (let j = 0; j < productAttr[i].values.length; j++) {
+						if (productAttr[i].index === j) {
+							values.push(productAttr[i].values[j]);
+						}
+					}
+				}
+				var selectVal = values.sort().join(",");
+				console.log('selectVal',selectVal,this.values)
+				var valueSelect = this.values.filter((item) => {
+					return item.sku == selectVal;
+				})
+				if (valueSelect != null && valueSelect.length == 1) {
+					this.productValueSelect = valueSelect[0];
+				}
+				this.updateSpecNum();
+
+			},
+			//更新数量
+			updateSpecNum() {
+				if (this.productValueSelect.stock == 0) {
+					this.specNum = 0;
+				} else {
+					this.specNum = 1;
+				}
+			},
+			changeNum(e) {
+				this.specNum = e.detail.value.replace(/\D/g, '')
+				if (this.specNum < 1) {
+					this.specNum = 1
+				}
+				if (this.specNum >= this.productValueSelect.stock) {
+					this.specNum = this.productValueSelect.stock
+				}
+			},
+			// 数量减法
+			lessNum() {
+				this.specNum--
+				if (this.specNum < 1) {
+					this.specNum = 1
+				}
+				if (this.specNum >= this.productValueSelect.stock) {
+					this.specNum = this.productValueSelect.stock
+				}
+			},
+			// 数量加法
+			addNum() {
+				if (this.specNum < 10) {
+					this.specNum++
+				} else {
+					uni.showToast({
+						icon: 'none',
+						title: '限购10盒',
+					});
+				}
+				if (this.specNum >= this.productValueSelect.stock) {
+					this.specNum = this.productValueSelect.stock
+				}
+
+			},
+			// 确定选择该规格
+			submit() {
+				this.specVisible = false
+				this.doAddCart(this.type);
+
+			},
+			moreEvaluate() {
+				uni.navigateTo({
+					url: '/pages_shopping/evaluate?storeId='+this.storeId+ '&productIds='+this.productId,
+				})
+			},
+			getCommentByUser(){
+				const param = {
+					page: 1,
+					pageSize: 2,
+					storeId:this.storeId,
+					orderId: null,
+					productIds:this.productId,
+					userId: uni.getStorageSync('userId') || null,
+					showSelf: 0
+				}
+				selectCommentByUser(param).then(res=>{
+					if(res.code==200) {
+						this.evaluate = res.data.list
+						this.evaluateTotal = res.data.total
+					} else {
+						this.evaluate = []
+						this.evaluateTotal = 0
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.product-other-box {
+		.other-box-item {
+			.label {
+				// width: 6em;
+			}
+		}
+	}
+	.hiddenbox {
+		height: 240rpx;
+		overflow: hidden;
+	}
+	.popupbox {
+		width: 80vw;
+		font-size: 32upx;
+		font-family: PingFang SC;
+		color: #333333;
+		&-title{
+			font-weight: bold;
+			padding: 30rpx;
+			text-align: center;
+		}
+		&-body {
+			padding: 24rpx 30rpx;
+			line-height: 2;
+		}
+		.confirm {
+			background-color: #2583EB;
+			border-radius: 10rpx;
+			color: #fff;
+			padding: 10rpx 24rpx;
+			margin: 0 10rpx;
+		}
+		&-footer {
+			border-top: 1rpx solid #F7F7F7;
+			padding: 30rpx;
+			color: red;
+			text-align: center;
+		}
+	}
+	.shadowbox{
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		background: linear-gradient(-180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255,0.5) 50%,rgb(255, 255, 255) 80%);
+		padding-top: 240rpx;
+		margin-top: -240rpx;
+		position: relative;
+		&-btn {
+			padding: 10rpx 40rpx;
+			border-radius: 10rpx;
+			border: 1rpx solid #ccc;
+			display: inline-flex;
+		}
+	}
+	.img-item {
+		position: relative;
+		width: 44rpx;
+		height: 44rpx;
+		margin: 0 20rpx 0 10rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.other-box {
+		background: #FFFFFF;
+		border-radius: 16rpx 16rpx 16rpx 16rpx;
+		padding: 12rpx 24rpx;
+		margin: 24rpx;
+
+		&-item {
+			display: flex;
+			align-items: flex-start;
+			padding: 10rpx 0;
+		}
+
+		.label {
+			flex-shrink: 0;
+			color: #999999;
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			line-height: 1.3;
+			margin-right: 40rpx;
+			min-width: 4em;
+			text-align: justify;
+			/* 两端对齐 */
+			text-align-last: justify;
+			/* 最后一行也撑满 */
+		}
+
+		.safe-box {
+			display: flex;
+			align-items: center;
+
+			image {
+				width: 28rpx;
+				height: 28rpx;
+				margin-right: 8rpx;
+			}
+		}
+
+		.text {
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 26rpx;
+			color: #333333;
+		}
+	}
+
+	.shop-banner {
+		height: 756upx;
+		background-color: #FFFFFF;
+		position: relative;
+
+		.swiper-item {
+			box-sizing: border-box;
+		}
+
+		.swiper,
+		.swiper-item,
+		.swiper-item image {
+			width: 100%;
+			height: 100%;
+		}
+
+		.banner-mask {
+			width: 100%;
+			height: 44upx;
+			// background: linear-gradient(0deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
+			// opacity: 0.8;
+			position: absolute;
+			left: 0;
+			bottom: 0;
+			z-index: 9;
+			background-image: url('https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/black_mask.png');
+			background-size: 20upx 44upx;
+			background-repeat: repeat-x;
+		}
+
+		.num-box {
+			width: 80upx;
+			height: 44upx;
+			line-height: 44upx;
+			text-align: center;
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			background: rgba(0, 0, 0, .3);
+			border-radius: 22upx;
+			position: absolute;
+			right: 30upx;
+			bottom: 30upx;
+			z-index: 10;
+		}
+	}
+
+	.det-info {
+		background: #FFFFFF;
+		padding: 36upx 30upx 25upx;
+		margin: 20rpx 24rpx;
+		border-radius: 16rpx 16rpx 16rpx 16rpx;
+
+		.price-box {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+
+			.price {
+				display: flex;
+				align-items: baseline;
+
+				.label {
+					color: #999999;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					line-height: 1.3;
+					margin-right: 5upx;
+				}
+
+				.unit {
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					line-height: 1.3;
+				}
+
+				.num {
+					font-size: 40upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					margin: 0 20upx 0 0;
+					line-height: 1;
+				}
+
+				.old {
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #999999;
+					line-height: 1.3;
+				}
+			}
+
+			.share-box {
+				width: 120upx;
+				height: 46upx;
+				border: 1px solid #2583EB;
+				border-radius: 23upx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				position: relative;
+
+				.text {
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #2583EB;
+				}
+
+				image {
+					margin-left: 2rpx;
+					width: 25upx;
+					height: 24upx;
+				}
+
+				.share {
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%;
+					opacity: 0;
+				}
+			}
+
+			.spec {
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 36upx;
+			}
+		}
+
+		.name-box {
+			font-size: 32upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #111111;
+			line-height: 44upx;
+			margin-top: 32upx;
+
+			.tag {
+				display: inline-block;
+				padding: 0 6upx;
+				height: 30upx;
+				background: linear-gradient(90deg, #2583EB 0%, #92C1F5 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;
+			}
+		}
+
+		.intro {
+			display: block;
+			font-size: 26upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			line-height: 36upx;
+			padding-top: 18upx;
+		}
+	}
+
+	.inventor {
+		height: 88upx;
+		padding: 0 39upx 0 30upx;
+		margin-top: 10upx;
+		background: #FFFFFF;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		.left {
+			display: flex;
+			align-items: center;
+
+			.head-box {
+				margin-right: 27upx;
+				display: flex;
+				align-items: center;
+
+				.head {
+					width: 48upx;
+					height: 48upx;
+					border-radius: 50%;
+					overflow: hidden;
+					box-shadow: 0 0 0 1px #fff;
+					margin-right: -10upx;
+
+					image {
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+
+			.num-box {
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+
+				.text {
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+			}
+		}
+
+		.right {
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+
+			.text {
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+			}
+		}
+	}
+
+	.effect {
+		box-sizing: border-box;
+		padding: 30rpx;
+		background: #FFFFFF;
+		font-size: 28upx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+		line-height: 1.8;
+		margin: 24rpx 24rpx 0 24rpx;
+		border-radius: 16rpx;
+		
+		.label {
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			line-height: 1;
+		}
+	}
+
+	.det-box {
+		padding: 30upx 30upx 0 30upx;
+		background-color: #FFFFFF;
+		margin: 24rpx 24rpx 0 24rpx;
+		border-radius: 16rpx;
+
+		.title {
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			line-height: 1;
+			margin-bottom: 24rpx;
+		}
+
+		.label,
+		.text {
+			font-size: 30upx !important;
+		}
+	}
+
+	.btn-foot {
+		box-sizing: border-box;
+		width: 100%;
+		height: 121upx;
+		background: #FFFFFF;
+		padding: 0 32upx 0 28upx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 99;
+
+		.menu-box {
+			display: flex;
+			align-items: center;
+
+			.item {
+				display: flex;
+				align-items: center;
+				flex-direction: column;
+				margin-right: 48upx;
+
+				&:last-child {
+					margin-right: 0;
+				}
+
+				image {
+					width: 36upx;
+					height: 36upx;
+					margin-bottom: 10upx;
+				}
+
+				.label {
+					font-size: 20upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					text-align: center;
+				}
+			}
+
+			::v-deep.uni-badge--x {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+			}
+
+			::v-deep.uni-badge {
+				border: none;
+				background-color: #FF3636;
+				font-family: Roboto;
+			}
+		}
+
+		.btn-box {
+			display: flex;
+			align-items: center;
+
+			.btn {
+				position: relative;
+				width: 200upx;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				border-radius: 44upx;
+				margin-left: 20upx;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+
+				&:first-child {
+					margin-left: 0;
+				}
+
+				&.cart {
+					background: #FF6633;
+
+					.share {
+						display: inline-block;
+						position: absolute;
+						top: 0;
+						left: 0;
+						width: 100%;
+						height: 100%;
+						opacity: 0;
+					}
+				}
+
+				&.buy {
+					background: #2583EB;
+				}
+			}
+		}
+	}
+
+	.product-spec {
+		.pro-info {
+			display: flex;
+			align-items: center;
+
+			.img-box {
+				width: 200upx;
+				height: 200upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				overflow: hidden;
+				margin-right: 30upx;
+
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+
+			.info-text {
+				height: 200upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+
+				.price {
+					display: flex;
+					align-items: flex-end;
+
+					.unit {
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+
+					.num {
+						font-size: 50upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+
+				.desc-box {
+					display: flex;
+					flex-direction: column;
+					padding-bottom: 9upx;
+
+					.text {
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						margin-top: 27upx;
+						line-height: 1;
+
+						&:first-child {
+							margin-top: 0;
+						}
+					}
+				}
+			}
+		}
+
+		.spec-box {
+			padding-top: 50upx;
+
+			.title {
+				font-size: 34upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #111111;
+				line-height: 1;
+			}
+
+			.spec-list {
+				display: flex;
+				flex-wrap: wrap;
+				margin-top: 30upx;
+
+				.item {
+					box-sizing: border-box;
+					height: 64upx;
+					padding: 0 30upx;
+					line-height: 64upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					background: #F7F7F7;
+					border: 1px solid #F7F7F7;
+					border-radius: 32upx;
+					margin-right: 20upx;
+					margin-bottom: 30upx;
+
+					&.active {
+						background: #F1FFFE;
+						border: 1px solid #2583EB;
+						color: #2583EB;
+					}
+				}
+			}
+		}
+
+		.price-num {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			margin-top: 14upx;
+
+			.label {
+				font-size: 34upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #111111;
+			}
+
+			.num-box {
+				display: flex;
+				align-items: center;
+
+				.img-box {
+					width: 60upx;
+					height: 60upx;
+					// border-radius: 4upx;
+					border: 1px solid #dddddd;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+
+					image {
+						width: 25rpx;
+						height: 25rpx;
+					}
+				}
+
+				input {
+					width: 60upx;
+					height: 60upx;
+					line-height: 60upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					// border-radius: 4upx;
+					border-top: 1px solid #dddddd;
+					border-bottom: 1px solid #dddddd;
+					text-align: center;
+					// margin: 0 16upx;
+				}
+			}
+		}
+
+		.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: #2583EB;
+			border-radius: 44upx;
+			margin-top: 30upx;
+			// margin-bottom: 30upx;
+
+		}
+	}
+
+	.contact-btn {
+		display: inline-block;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		opacity: 0;
+		z-index: 9999;
+	}
+
+	.loadding {
+		background-color: #fff;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		z-index: 9999;
+
+		image {
+			border-radius: 50%;
+			animation: load linear 1s infinite;
+			width: 120rpx;
+			height: 120rpx;
+		}
+
+		.text {
+			font-size: 28rpx;
+			margin-top: 20rpx;
+		}
+	}
+
+	.storebox {
+		margin: 24rpx;
+		padding: 28rpx 26rpx;
+		font-family: PingFang SC, PingFang SC;
+		color: #333;
+		background: #FFFFFF;
+		border-radius: 16rpx 16rpx 16rpx 16rpx;
+
+		.logo {
+			width: 104rpx;
+			height: 104rpx;
+			background: #FFFFFF;
+			border-radius: 16rpx 16rpx 16rpx 16rpx;
+			margin-right: 26rpx;
+		}
+
+		.storename {
+			font-weight: 500;
+			font-size: 32rpx;
+		}
+
+		.storedesc {
+			margin-top: 12rpx;
+			font-weight: 400;
+			font-size: 22rpx;
+		}
+
+		.storebox-r {
+			flex: 1;
+			overflow: hidden;
+		}
+
+		.storebox-btn {
+			flex-shrink: 0;
+			padding: 10rpx 24rpx;
+			font-size: 28rpx;
+			border-radius: 28rpx 28rpx 28rpx 28rpx;
+			border: 2rpx solid #FF5C03;
+			font-weight: 500;
+			font-size: 24rpx;
+			color: #FF5C03;
+		}
+	}
+	.evaluate {
+		.title {
+			margin: 0;
+			padding-bottom: 24rpx;
+		}
+	}
+	.footer-desc {
+		text-align: center;
+		padding: 0 32rpx 24rpx 0;
+		font-size: 28rpx;
+		color: #999;
+		image{
+			margin-left: 10rpx;
+			width:15rpx;
+			height:20rpx;
+		}
+	}
+</style>

+ 545 - 0
pages_company/order/productList.vue

@@ -0,0 +1,545 @@
+<template>
+	<view class="content">
+		<view class="top-fixed">
+			<!-- 搜索框 -->
+			<view class="search-cont">
+				<view class="inner">
+					<image class="icon-search" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_search.png" mode=""></image>
+					<input type="text" @confirm="goSearch"   :value="form.productName" 
+						:placeholder="storeId ? '搜索店内药品' : '输入药品名称'" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+				</view>
+				<view class="icon-search" style="width: auto;">
+				<!-- 	<image @click="showChange(2)" v-if="showType==1"  src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/search1.png" mode=""></image>
+					<image @click="showChange(1)" v-if="showType==2"  src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/search2.png" mode=""></image> -->
+					<image @click="openCart()" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/fs/20260105/6b43c21c15a54639bbf6dab6a83544ad.png" mode=""></image>
+				</view>
+			</view>
+			<!-- 排序框 -->
+			<view class="sort-box">
+				<view class="item" :class="form.defaultOrder=='desc'?'active':''" @click="searchChange('1')">
+					<text class="label">默认</text>
+				</view>
+				<view class="item" @click="searchChange('2')">
+					<text class="label">价格</text>
+					<view class="sort-img">
+						<image v-if="form.priceOrder==null||form.priceOrder=='desc'" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/price_arrow_up.png" mode="" @click="priceUp(true)"></image>
+						<image v-if="form.priceOrder=='asc'" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/price_arrow_up2.png" mode="" @click="priceUp(false)"></image>
+						<image v-if="form.priceOrder==null||form.priceOrder=='asc'" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/price_arrow_down.png" mode="" @click="priceDown(true)"></image>
+						<image v-if="form.priceOrder=='desc'" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/price_arrow_down2.png" mode="" @click="priceDown(false)"></image>
+					</view>
+				</view>
+				<view class="item" @click="searchChange('3')">
+					<text class="label">销量</text>
+					<view class="sort-img">
+						<image v-if="form.salesOrder==null||form.salesOrder=='desc'" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/price_arrow_up.png" mode="" @click="saleUp(true)"></image>
+						<image v-if="form.salesOrder=='asc'" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/price_arrow_up2.png" mode="" @click="saleUp(false)"></image>
+						<image v-if="form.salesOrder==null||form.salesOrder=='asc'" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/price_arrow_down.png" mode="" @click="saleDown(true)"></image>
+						<image v-if="form.salesOrder=='desc'" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/price_arrow_down2.png" mode="" @click="saleDown(false)"></image>
+					</view>
+				</view>
+				<view class="item" :class="form.newOrder=='desc'?'active':''" @click="searchChange('4')">
+					<text class="label">新品</text>
+				</view>
+			</view>
+		</view>
+	 
+		<!-- 数据列表 -->
+		<mescroll-body top="190rpx" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<view class="medic-itemlist" v-if="showType==1">
+				<medicineItem v-for="(item, index) in dataList" :key="index" :item="item" :type="'zd'"></medicineItem>
+			</view>
+			<!-- <view class="medic-list" v-if="showType==1">
+				<view v-for="(item,index) in dataList" :key="index" class="item" @click="showDetail(item)">
+					<view class="img-box">
+						<image :src="item.image" mode="aspectFit"></image>
+						<view class="otctxt" :style="{background:_background(item.productType)}" v-show="item.productType">{{$getDictLabelName("storeProductType",item.productType)}}</view>
+					</view>
+					<view class="info-box">
+						<view class="title ellipsis2">{{item.productName}}</view>
+						<view class="intro ellipsis">{{item.productInfo}}</view>
+						<view class="prce-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}} </text>
+							</view>
+							<view class="cart-img" @click="navgetTo('/pages_shopping/cart')">
+								<view class="sale">已售 {{item.sales}} {{item.unitName}}</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view> -->
+			<view class="goods-list" v-if="showType==2">
+				<view class="item" v-for="(item,index) in dataList" :key="index" @click="showDetail(item)">
+					<view class="img-box">
+						<image :src="item.image" mode="aspectFill"></image>
+						<view class="otctxt" :style="{background:_background(item.productType)}" v-show="item.productType">{{$getDictLabelName("storeProductType",item.productType)}}</view>
+					</view>
+					<view class="info-box">
+						<view class="title ellipsis2">{{item.productName}}</view>
+						<view class="price-box">
+							<view class="now">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="old" v-show="item.price!=item.otPrice&&item.otPrice!==null&&item.otPrice!==undefined">¥{{item.otPrice.toFixed(2)}}</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import medicineItem from '@/components/medicineItem.vue';
+	import {getSalesProducts} from '../api/companyOrder.js';
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	export default {
+		mixins: [MescrollMixin], 
+		components:{
+			medicineItem
+		},
+		data() {
+			return {
+				showType:1,
+				form:{
+					defaultOrder:'desc',
+					newOrder:null,
+					priceOrder:null,
+					salesOrder:null,
+					productName:"",
+					token:''
+				},
+				mescroll:null,
+				downOption: {
+					//下拉刷新
+					use: true,
+					auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
+				},
+				// 上拉加载的配置
+				upOption: {
+					onScroll:true,
+					use: true, // 是否启用上拉加载; 默认true
+					page: {
+						num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+						size: 10 // 每页数据的数量,默认10
+					},
+					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					empty: {
+						icon:'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/empty_icon.png',
+						tip: '暂无数据'
+					},
+					textNoMore:"已经到底了",
+				},
+				// 列表数据
+				dataList: [],
+				storeId: ""
+			};
+		},
+		computed: {
+			_background() {
+				//productType: 1:OTC,2:Rx,3:非药品,4:器械
+				return (productType)=> {
+					switch (productType) {
+						case 1: return '#37E2EA' // OTC
+						case 2: return 'red'     // Rx
+						case 3: return '#2583EB' // 非药品
+						case 4: return '#999'    // 器械
+						default: return '#ccc'
+					}
+				}
+			}
+		},
+		onLoad(option) {
+			if(option.key!=undefined){
+				this.form.productName = option.key
+			}
+			this.storeId = option.storeId || ""
+			this.form.storeId = this.storeId
+		},
+		methods:{
+			goSearch(e) {
+				this.form.productName=e.detail.value;
+				this.mescroll.resetUpScroll();
+			},
+			searchChange(type){
+				if(type==1){
+					this.form.defaultOrder="desc";
+					this.form.priceOrder=null;
+					this.form.salesOrder=null;
+					this.form.newOrder=null;
+					
+				}
+				else if(type==2){
+					this.form.defaultOrder=null;
+					if(this.form.priceOrder==null){
+						this.form.priceOrder="asc"
+					}
+					else if(this.form.priceOrder=="asc"){
+						this.form.priceOrder="desc"
+					}
+					else if(this.form.priceOrder=="desc"){
+						this.form.priceOrder=null;
+					}
+					this.form.salesOrder=null;
+					this.form.newOrder=null;
+				}
+				else if(type==3){
+					this.form.defaultOrder=null;
+					this.form.priceOrder=null;
+					if(this.form.salesOrder==null){
+						this.form.salesOrder="asc"
+					}
+					else if(this.form.salesOrder=="asc"){
+						this.form.salesOrder="desc"
+					}
+					else if(this.form.salesOrder=="desc"){
+						this.form.salesOrder=null;
+					}
+					this.form.newOrder=null;
+					
+				}
+				else if(type==4){
+					this.form.newOrder="desc";
+					this.form.defaultOrder=null;
+					this.form.priceOrder=null;
+					this.form.salesOrder=null;
+					
+					
+				}
+				this.mescroll.resetUpScroll();
+			},
+			showChange(type){
+				this.showType=type;
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				//联网加载数据
+				var that = this;
+				this.form.page=page.num;
+				this.form.pageSize=page.size;
+				this.form.token=uni.getStorageSync('CompanyUserToken');
+				getSalesProducts(this.form).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();
+					}
+				});
+			},
+			// 价格升序是否选中
+			priceUp(value) {
+				this.priceIsUp = value
+				this.priceIsDown = false
+			},
+			// 价格降序是否选中
+			priceDown(value) {
+				this.priceIsDown = value
+				this.priceIsUp = false
+			},
+			// 销量升序是否选中
+			saleUp(value) {
+				this.saleIsUp = value
+				this.saleIsDown = false
+			},
+			// 销量降序是否选中
+			saleDown(value) {
+				this.saleIsDown = value
+				this.saleIsUp = false
+			},
+			// 查看详情
+			showDetail(item) {
+				uni.navigateTo({
+					url: '/pages_company/order/productDetails?productId='+item.productId + `${this.storeId ? '&storeId='+this.storeId : ''}`
+				})
+			},
+			openCart() {
+				uni.navigateTo({
+					url: '/pages_company/order/cart'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.desc {
+		margin-top: 12rpx;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 400;
+		font-size: 24rpx;
+		color: #939599;
+	}
+	.top-fixed{
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 10;
+	}
+	.search-cont{
+		padding: 16upx 30upx;
+		background-color: #FFFFFF;
+		display:flex;
+		align-items: center;
+		justify-content: space-between;
+		.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;
+			}
+			
+		}
+		.icon-search{
+			margin-left: 10upx;
+			width: 40upx;
+			height: 40upx;
+			image{
+				width: 40upx;
+				height: 40upx;
+			}
+			
+		}
+	}
+	.sort-box{
+		height: 88upx;
+		background: #FFFFFF;
+		padding: 0 100upx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		.item{
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			&.active .label{
+				color: #2583EB;
+			}
+			.label{
+				font-size: 26upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+				line-height: 1;
+			}
+			.sort-img{
+				height: 20upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				margin: 3upx 0 0 10upx;
+				image{
+					width: 12upx;
+					height: 8upx;
+				}
+			}
+		}
+	}
+	.otctxt {
+		position: absolute;
+		top: 0;
+		left: 0;
+		background-color: #37E2EA;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 500;
+		font-size: 20rpx;
+		color: #FFFFFF;
+		padding: 4rpx 14rpx;
+		border-radius: 16rpx 0 16rpx 0;
+	}
+	.medic-itemlist {
+		padding: 20upx;
+		.medicine-item {
+			background: #FFF;
+			padding: 20rpx !important;
+			border-radius: 16upx;
+			margin-bottom: 20upx;
+		}
+	}
+	.medic-list{
+		padding: 20upx;
+		.item{
+			box-sizing: border-box;
+			min-height: 200upx;
+			background: #FFFFFF;
+			border: 4upx solid #FFFFFF;
+			border-radius: 16upx;
+			margin-bottom: 20upx;
+			padding: 24rpx;
+			display: flex;
+			.img-box{
+				width: 200upx;
+				height: 200upx;
+				border-radius: 16rpx 16rpx 16rpx 16rpx;
+				overflow: hidden;
+				margin-right: 30upx;
+				position: relative;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.info-box{
+				flex: 1;
+				overflow: hidden;
+				.title{
+					font-size: 32upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+				}
+				.intro{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+					margin-top: 26upx;
+					display: block;
+				}
+			 
+				.prce-num{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					margin-top: 30upx;
+					.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: 36upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+					.cart-img{
+						.sale{
+							font-size: 20upx;
+							font-family: PingFang SC;
+							color: #999999;
+						}
+						 
+					}
+				}
+			}
+		}
+	}
+	.goods-list{
+		padding: 20upx;
+		display: flex;
+		flex-wrap: wrap;
+		.item{
+			margin-right: 20rpx;
+			margin-bottom: 20rpx;
+			width: 345rpx;
+			background: #FFFFFF;
+			box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
+			border-radius: 20rpx;
+			overflow: hidden;
+			&:nth-child(2n) {
+				margin-right: 0;
+			}
+			.img-box{
+				width: 100%;
+				height: 334upx;
+				position: relative;
+				image{
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.info-box{
+				box-sizing: border-box;
+				height: 182upx;
+				padding: 20upx 20upx 30upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				.title{
+					font-size: 32upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					line-height: 40upx;
+				}
+				.price-box{
+					display: flex;
+					align-items: flex-end;
+					.now{
+						display: flex;
+						align-items: flex-end;
+						margin-right: 20upx;
+						.unit{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 4upx;
+						}
+						.num{
+							font-size: 36upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+					.old{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						text-decoration: line-through;
+						color: #BBBBBB;
+						line-height: 1.1;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 1492 - 0
pages_company/order/productShowDetails.vue

@@ -0,0 +1,1492 @@
+<template>
+	<view class="content" style="padding-bottom: 144rpx;">
+		<!-- 商品轮播图片 -->
+		<view class="shop-banner" @click="showImg()">
+			<swiper class="swiper" :indicator-dots="false" :circular="true" :autoplay="true" :interval="3000"
+				:duration="1000" indicator-color="rgba(255, 255, 255, 0.6)" indicator-active-color="#ffffff"
+				@change="swiperChange">
+				<swiper-item class="swiper-item" v-for="(item,index) in  banner" :key="index">
+					<image :src="item" mode="aspectFill"></image>
+				</swiper-item>
+			</swiper>
+			<!-- 底部遮罩 -->
+			<view class="banner-mask"></view>
+			<!-- 数量 -->
+			<view class="num-box">{{ activeBanner }}/{{ banner.length }}</view>
+		</view>
+		<!-- 详细信息 -->
+		<view class="det-info">
+			<view class="price-box">
+				<view class="price">
+					<text class="label" style="color: #FF5C03;">会员价</text>
+					<text class="unit">¥</text>
+					<text class="num">{{product.price}}</text>
+					<text class="label">零售价</text>
+					<text class="old">¥{{product.otPrice}}</text>
+				</view>
+				<view class="share-box">
+					<text class="text">分享</text>
+					<image
+						src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/share1.png"
+						mode=""></image>
+					<button class="share" data-name="shareBtn" open-type="share">分享</button>
+				</view>
+			</view>
+			<view class="name-box">
+				<view class="tag" :style="{background:_background(product.productType)}">
+					{{$getDictLabelName("storeProductType",product.productType)}}</view>
+					{{product.commonName&&product.commonName!=='-'?product.commonName:product.productName}}
+			</view>
+			<u-parse class="intro" v-if="product.productInfo!=null" :content="product.productInfo.replace(/\n/g,'<br>')">
+			</u-parse>
+		</view>
+		<view class="other-box">
+			<view class="other-box-item">
+				<view class="label">商品名称</view>
+				<view class="text">{{product.productName||''}}</view>
+			</view>
+			<view class="other-box-item" v-if="!_showTxt">
+				<view class="label">通用名称</view>
+				<view class="text">{{product.commonName}}</view>
+			</view>
+			<view class="other-box-item">
+				<view class="label">包装规格</view>
+				<view class="text">{{product.prescribeSpec||'--'}}</view>
+			</view>
+			<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>
+				<view class="text">{{product.drugRegCertNo||'--'}}</view>
+			</view>
+			<view class="other-box-item" v-if="!_showTxt">
+				<view class="label">规格</view>
+				<view class="text">{{product.specification||'--'}}</view>
+			</view>
+			<view class="other-box-item">
+				<view class="label">商品条码</view>
+				<view class="text">{{product.barCode||'--'}}</view>
+			</view>
+		</view>
+		
+		<!-- 购买人数、库存 -->
+		<!-- <view class="inventor">
+			<view class="left">
+				<view class="head-box">
+					<view class="head" v-for="(item,j) in 5" :key="j">
+						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/head.jpg" mode=""></image>
+					</view>
+				</view> 
+				<view class="num-box">
+					已有 <text class="text">{{product.sales}}</text> 人购买
+				</view>
+			</view>
+			<view class="right">
+				库存 <text class="text">{{product.stock}}{{product.unitName}}</text>
+			</view>
+			<view class="right">
+				 <text class="text">库存{{product.stock>0?'充足':'售罄'}} </text>
+			</view>
+		</view> -->
+		<!-- 功效 -->
+		<view class="effect" v-if="product.instructionManual">
+			<view class="label">{{product.commonName&&product.commonName!=='-'?product.commonName:product.productName}}药品说明书</view>
+			<view :class="product.productType ==2&&isView==0 ? 'hiddenbox':''" style="margin-top: 20rpx;">
+				<u-parse :content="product.instructionManual" :style="{display: 'block'}"></u-parse>
+			</view>
+			<view class="shadowbox" v-if="product.productType ==2&&isView==0">
+				<view class="shadowbox-btn x-ac" @click="handleShow">
+					<text style="margin-right: 10rpx;">点击查看说明书全文</text>
+					<u-icon name="arrow-down" color="#999" size="14"></u-icon>
+				</view>
+			</view>
+		</view>
+		<u-popup :show="show" mode="center" :round="10" @close="show=false" :closeOnClickOverlay="false">
+			<view class="popupbox">
+				<view class="popupbox-title">如何查看说明书</view>
+				<view class="popupbox-body">
+					需要先问诊获得处方后才能查看说明书,请点<text class="confirm" @click="addCart('buy')">问诊开药</text>开处方!
+				</view>
+				<view class="popupbox-footer" @click="show=false">我知道了</view>
+			</view>
+		</u-popup>
+		<!-- 商品评价 -->
+		<view class="det-box evaluate">
+			<view class="title">商品评价({{evaluateTotal}})</view>
+			<view class="evaluate">
+				<evaluateItem v-for="(item,index) in evaluate" :key="index" :item="item"></evaluateItem>
+				<view class="footer-desc" v-if="evaluate&&evaluate.length>0"> 
+					<text @click="moreEvaluate">查看更多评价</text>
+					<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/arrow_gray.png"></image>
+				</view>
+			</view>
+		</view>
+		<!-- 图文详情 -->
+		<view class="det-box">
+			<view class="title">图文详情</view>
+			<view class="inner">
+				<u-parse :content="product.description" :tagStyle="tagStyle"></u-parse>
+			</view>
+			<view class="other-box product-other-box" style="margin: 0;padding: 24rpx 0;">
+				<view v-if="_showTxt&&product.medicalRegCertNo">
+					<text class="label" style="margin-right: 16rpx;">【医疗器械注册证编号/备案凭证编号】</text>
+					<text class="text">{{product.medicalRegCertNo}}</text>
+				</view>
+				<view v-if="_showTxt&&product.prodLicenseNo">
+					<text class="label" style="margin-right: 16rpx;">【生产许可证/备案凭证编号】</text>
+					<text class="text">{{product.prodLicenseNo}}</text>
+				</view>
+				<view v-if="_showTxt&&product.prodTechReqNo">
+					<text class="label" style="margin-right: 16rpx;">【产品技术要求编号】</text>
+					<text class="text">{{product.prodTechReqNo}}</text>
+				</view>
+				<view v-if="_showTxt&&product.productStructure">
+					<text class="label" style="margin-right: 16rpx;">【结构及组成】</text>
+					<text class="text">{{product.productStructure}}</text>
+				</view>
+				<view v-if="product.dosageForm&&!_showTxt">
+					<text class="label" style="margin-right: 16rpx;">【剂型】</text>
+					<text class="text">{{product.dosageForm}}</text>
+				</view>
+				<view v-if="product.mah">
+					<text class="label" style="margin-right: 16rpx;">{{_showTxt?'【注册人/备案人】':'【上市许可证持有人】'}}</text>
+					<text class="text">{{product.mah}}</text>
+				</view>
+				<view v-if="product.mahAddress">
+					<text class="label" style="margin-right: 16rpx;">{{_showTxt?'【注册人/备案人地址】':'【上市许可证持有人地址】'}}</text>
+					<text class="text">{{product.mahAddress}}</text>
+				</view>
+				<view v-if="product.manufacturer">
+					<text class="label" style="margin-right: 16rpx;">【生产企业】</text>
+					<text class="text">{{product.manufacturer}}</text>
+				</view>
+				<view v-if="product.manufacturerAddress">
+					<text class="label" style="margin-right: 16rpx;">【生产企业地址】</text>
+					<text class="text">{{product.manufacturerAddress}}</text>
+				</view>
+				<template v-if="product.productType !=2||isView==1">
+					<view v-if="product.indications">
+						<text class="label" style="margin-right: 16rpx;">【功能主治/适用范围】</text>
+						<text class="text">{{product.indications}}</text>
+					</view>
+					<view v-if="product.dosage">
+						<text class="label" style="margin-right: 16rpx;">【用法用量】</text>
+						<text class="text">{{product.dosage}}</text>
+					</view>
+					<view v-if="product.adverseReactions">
+						<text class="label" style="margin-right: 16rpx;">【不良反应】</text>
+						<text class="text">{{product.adverseReactions}}</text>
+					</view>
+					<view v-if="product.contraindications">
+						<text class="label" style="margin-right: 16rpx;">{{_showTxt?'【禁忌症】':'【禁忌】'}}</text>
+						<text class="text">{{product.contraindications}}</text>
+					</view>
+					<view v-if="product.precautions">
+						<text class="label" style="margin-right: 16rpx;">【注意事项】</text>
+						<text class="text">{{product.precautions}}</text>
+					</view>
+				</template>
+			</view>
+		</view>
+		<view class="storebox" v-if="chooseStore.storeId">
+			<view class="x-bc">
+				<view class="x-f">
+					<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(chooseStore)">进店</view>
+			</view>
+			<detail :source="'product'" ref="getStoreInfo" :storeInfo="storeInfo"></detail>
+		</view>
+		<!-- 选择药品规格弹窗 -->
+		<popupBottom ref="popup" :visible.sync="specVisible" title=" " radius="32" maxHeight="1024">
+			<view class="product-spec">
+				<!-- 商品信息 -->
+				<view class="pro-info">
+					<view class="img-box" @click="showImg(productValueSelect.image)">
+						<image
+							:src="productValueSelect.image==null||productValueSelect.image==''?product.image:productValueSelect.image"
+							mode="aspectFill"></image>
+					</view>
+					<view class="info-text">
+						<view class="price">
+							<text class="unit">¥</text>
+							<text class="num">{{ productValueSelect.price.toFixed(2) }}</text>
+						</view>
+						<view class="desc-box">
+							<text class="text">已选:{{ productValueSelect.sku }}</text>
+							<text class="text">库存{{ productValueSelect.stock?'充足':'售罄' }}</text>
+						</view>
+					</view>
+				</view>
+				<!-- 规格 -->
+				<view class="spec-box">
+					<view v-for="(item,index) in attrs">
+						<view class="title">{{item.attrName}}</view>
+						<view class="spec-list">
+							<view v-for="(subItem,subindex) in item.values" :key="subindex"
+								:class="subindex==item.index?'item active':'item'" @click="choseSpec(index,subindex)">
+								{{ subItem }}
+							</view>
+						</view>
+					</view>
+				</view>
+				<!-- 数量 -->
+				<view class="price-num">
+					<view class="label">数量</view>
+					<view class="num-box">
+						<view class="img-box" @click="lessNum()">
+							<image v-if="specNum <= 1"
+								src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/jian.png"
+								mode=""></image>
+							<image v-else
+								src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/jian2.png"
+								mode=""></image>
+						</view>
+						<input type="number" @change="changeNum" v-model="specNum" />
+						<view class="img-box" @click="addNum()">
+							<image
+								src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/add.png"
+								mode=""></image>
+						</view>
+					</view>
+				</view>
+				<view class="sub-btn" @click="submit">确定</view>
+			</view>
+		</popupBottom>
+		<view class="loadding" v-if="loadding==true">
+			<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/logo.png"></image>
+			<text class="text">加载中...</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	import detail from '@/components/storeDetail.vue'
+	import {getCartCount,storeDetail} from '@/api/index.js'
+	import {getDicts} from '@/api/common.js'
+	import { getProductDetails, addCart,instructionsViewable } from '@/pages_shopping/api/product.js'
+	import {selectCommentByUser} from '@/api/myStoreOrder.js'
+	import popupBottom from '@/components/px-popup-bottom.vue'
+	import evaluateItem from '@/components/evaluateItem.vue'
+	export default {
+		components: {
+			popupBottom,
+			evaluateItem,
+			detail
+		},
+		data() {
+			return {
+				loadding: true,
+				buyText: "立即购买",
+				type: null,
+				productValueSelect: {
+					price: 0,
+				},
+				banner: [],
+				productId: null,
+				attrs: [],
+				values: [],
+				product: {
+					price: 0,
+					otPrice: 0,
+				},
+
+				// 当前轮播的图片
+				activeBanner: 1,
+				// 购物车数量
+				cartCount: 0,
+				// 规格弹窗
+				specVisible: false,
+				// 规格数量
+				specNum: 1,
+				chooseStore: {},
+				storeList: [],
+				storeId: '',
+				evaluateTotal: 0,
+				evaluate: [],
+				show: false,
+				isView: 0,
+				storeInfo: {},
+				stockNum: 0,
+				tagStyle: {
+					img: 'display: block;'
+				}
+			};
+		},
+		computed: {
+			_background() {
+				//productType: 1:OTC,2:Rx,3:非药品,4:器械
+				return (productType) => {
+					switch (productType) {
+						case 1:
+							return '#37E2EA' // OTC
+						case 2:
+							return 'red' // Rx
+						case 3:
+							return '#2583EB' // 非药品
+						case 4:
+							return '#999' // 器械
+						default:
+							return '#ccc'
+					}
+				}
+			},
+			_showTxt() {
+				if(this.product&&this.product.productType) {
+					const name = this.$getDictLabelName("storeProductType",this.product.productType)
+					return name.includes('器械');
+				}else {
+					return false
+				}
+			}
+		},
+		onLoad(options) {
+			if (options.userId != null) {
+				uni.setStorageSync('tuiUserId', options.userId);
+			} else if (options.hasOwnProperty('q') && options.q) {
+				// 通过下面这步解码,可以拿到url的值
+				const url = decodeURIComponent(options.q)
+				this.url = url;
+				// // 对url中携带的参数提取处理
+				const obj = this.$urlToObj(url)
+				uni.setStorageSync('tuiUserId', obj.userId);
+			}
+			this.storeId = options.storeId || '';
+			uni.showShareMenu({
+				withShareTicket: true,
+				//小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
+				menus: ["shareAppMessage", "shareTimeline"] //不设置默认发送给朋友
+			})
+			this.getDicts();
+			this.productId = options.productId;
+			this.$isLogin().then(res => {
+				if (res) {
+					this.getCartCount();
+				}
+			})
+		},
+		onShow() {
+			this.getProductDetails();
+		},
+		//发送给朋友
+		onShareAppMessage(res) {
+			this.$isLogin().then(res => {
+				if (res) {
+					var user = JSON.parse(uni.getStorageSync('userInfo'))
+					return {
+						title: this.commonName&&this.product.commonName!=='-'?this.product.commonName:this.product.productName,
+						path: '/pages_shopping/productDetails?productId=' + this.product.productId + "&userId=" +
+							user.userId,
+					}
+				}
+			})
+		},
+		//分享到朋友圈
+		onShareTimeline(res) {
+			this.$isLogin().then(res => {
+				if (res) {
+					var user = JSON.parse(uni.getStorageSync('userInfo'))
+					return {
+						title: this.commonName&&this.product.commonName!=='-'?this.product.commonName:this.product.productName,
+						query: 'productId=' + this.product.productId + "&userId=" + user.userId, //页面参数
+					}
+				}
+			})
+
+		},
+		methods: {
+			getStoreInfo() {
+				storeDetail(this.storeId).then(res=>{
+					if(res.code==200) {
+						this.storeInfo =res.data || {}
+						this.storeInfo.doctorList = this.storeInfo.doctorList.map(doctor => {
+							return {
+							  ...doctor,
+							  // 假设images字段是逗号分隔的图片字符串
+							  imagesArray: doctor.practiseImages ? 
+								doctor.practiseImages.split(',').map(img => img.trim()).filter(img => img) : []
+							};
+						  });
+						this.$refs.getStoreInfo.getDescHeight()
+					}
+				})
+			},
+			handleShow() {
+				uni.showLoading({
+					title: '加载中',
+					icon: 'none'
+				})
+				instructionsViewable({productId: this.productId}).then(
+					res => {
+						uni.hideLoading()
+						if(res.code==200){
+							this.isView = res.data ? 1 : 0
+							this.show = this.isView == 0
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			goStoreDetail(item) {
+				uni.navigateTo({
+					url: '/pages_store/storeIndex?storeId=' + item.storeId
+				})
+			},
+			getDicts: function() {
+				getDicts().then(
+					res => {
+						if (res.code == 200) {
+							uni.setStorageSync('dicts', JSON.stringify(res));
+						}
+
+					},
+					rej => {}
+				);
+			},
+			showImg(img) {
+				if (img != null) {
+					var imgs = [];
+					imgs.push(img)
+					//预览图片
+					uni.previewImage({
+						urls: imgs,
+						current: imgs[0]
+					});
+				} else {
+					//预览图片
+					uni.previewImage({
+						urls: this.banner,
+						current: this.banner[0]
+					});
+				}
+			},
+			doAddCart(type) {
+				if (this.specNum == 0) {
+					uni.showToast({
+						icon: 'none',
+						title: "库存不足",
+					});
+					return;
+				}
+				var isBuy = type == "buy" ? 1 : 0;
+				let data = {
+					isBuy: isBuy,
+					cartNum: this.specNum,
+					productId: this.productValueSelect.productId,
+					attrValueId: this.productValueSelect.id,
+					type: 1
+				};
+				addCart(data).then(
+					res => {
+						if (res.code == 200) {
+							if (type == "buy") {
+								const selectCarts = [{
+									storeId: this.storeId,
+									data: {
+										type: this.type,
+										cartIds: res.id,
+									}
+								}]
+								uni.navigateTo({
+									url: '/pages_shopping/confirmOrder?type=' + this.type + '&orderType=' +
+										this.orderType + '&confirmParam=' + encodeURIComponent(JSON.stringify(
+											selectCarts))
+								})
+							} else {
+								this.getCartCount()
+								uni.showToast({
+									icon: 'success',
+									title: "添加成功",
+								});
+							}
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.msg,
+							});
+							this.getProductDetails()
+						}
+					},
+					rej => {}
+				);
+			},
+			getProductDetails() {
+				let data = {
+					productId: this.productId
+				};
+				getProductDetails(data).then(
+					res => {
+						this.loadding = false
+						if (res.code == 200) {
+							this.stockNum = res.num || 0;
+							this.product = res.product;
+							if (this.product.productType == 1) {
+								this.buyText = "立即购买"
+							} else if (this.product.productType == 2) {
+								this.buyText = "开方购买"
+							}
+							this.product.otPrice = this.product.otPrice.toFixed(2);
+							this.product.price = this.product.price.toFixed(2);
+							if (this.product.sliderImage != null) {
+								this.banner = this.product.sliderImage.split(',');
+							} else {
+								this.banner = []
+							}
+							this.attrs = res.productAttr;
+							this.attrs.forEach((item, index, arr) => {
+								item.values = item.attrValues.split(',');
+								item.index = 0
+							})
+							console.log(this.attrs)
+							this.values = res.productValues;
+							this.storeId = res.store.storeId || ''
+							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)
+							this.getCommentByUser()
+							this.getStoreInfo();
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.msg,
+							});
+							setTimeout(function() {
+								uni.reLaunch({
+									url: '/pages/index/index',
+								})
+							}, 2000)
+
+						}
+					},
+					rej => {}
+				);
+			},
+			getCartCount() {
+				let data = {};
+				getCartCount(data).then(
+					cartRes => {
+						if (cartRes.code == 200) {
+							this.cartCount = cartRes.data;
+						}
+					},
+					rej => {}
+				);
+
+			},
+			// swiper变化事件
+			swiperChange(event) {
+				this.activeBanner = event.detail.current + 1
+			},
+			// 回到首页
+			goHome() {
+				uni.switchTab({
+					url: '/pages/index/index'
+				})
+			},
+			// 跳转页面
+			navgetTo(url) {
+				this.$isLogin().then(res => {
+					if (res) {
+						uni.navigateTo({
+							url: url
+						})
+					}
+				})
+			},
+			// 加入购物车
+			addCart(type) {
+				this.show=false
+				this.$isLogin().then(res => {
+					if (res) {
+						this.type = type;
+						this.specVisible = true
+					} else {
+						uni.navigateTo({
+							url: '/pages/auth/login'
+						})
+					}
+				})
+			},
+			// 规格选择
+			choseSpec(index, subIndex) {
+				this.attrs[index].index = subIndex;
+				this.$forceUpdate();
+				let productAttr = this.attrs;
+				let values = [];
+				for (let i = 0; i < productAttr.length; i++) {
+					for (let j = 0; j < productAttr[i].values.length; j++) {
+						if (productAttr[i].index === j) {
+							values.push(productAttr[i].values[j]);
+						}
+					}
+				}
+				var selectVal = values.sort().join(",");
+				console.log('selectVal',selectVal,this.values)
+				var valueSelect = this.values.filter((item) => {
+					return item.sku == selectVal;
+				})
+				if (valueSelect != null && valueSelect.length == 1) {
+					this.productValueSelect = valueSelect[0];
+				}
+				this.updateSpecNum();
+
+			},
+			//更新数量
+			updateSpecNum() {
+				if (this.productValueSelect.stock == 0) {
+					this.specNum = 0;
+				} else {
+					this.specNum = 1;
+				}
+			},
+			changeNum(e) {
+				this.specNum = e.detail.value.replace(/\D/g, '')
+				if (this.specNum < 1) {
+					this.specNum = 1
+				}
+				if (this.specNum >= this.productValueSelect.stock) {
+					this.specNum = this.productValueSelect.stock
+				}
+			},
+			// 数量减法
+			lessNum() {
+				this.specNum--
+				if (this.specNum < 1) {
+					this.specNum = 1
+				}
+				if (this.specNum >= this.productValueSelect.stock) {
+					this.specNum = this.productValueSelect.stock
+				}
+			},
+			// 数量加法
+			addNum() {
+				if (this.specNum < 10) {
+					this.specNum++
+				} else {
+					uni.showToast({
+						icon: 'none',
+						title: '限购10盒',
+					});
+				}
+				if (this.specNum >= this.productValueSelect.stock) {
+					this.specNum = this.productValueSelect.stock
+				}
+
+			},
+			// 确定选择该规格
+			submit() {
+				this.specVisible = false
+				this.doAddCart(this.type);
+
+			},
+			moreEvaluate() {
+				uni.navigateTo({
+					url: '/pages_shopping/evaluate?storeId='+this.storeId+ '&productIds='+this.productId,
+				})
+			},
+			getCommentByUser(){
+				const param = {
+					page: 1,
+					pageSize: 2,
+					storeId:this.storeId,
+					orderId: null,
+					productIds:this.productId,
+					userId: uni.getStorageSync('userId') || null,
+					showSelf: 0
+				}
+				selectCommentByUser(param).then(res=>{
+					if(res.code==200) {
+						this.evaluate = res.data.list
+						this.evaluateTotal = res.data.total
+					} else {
+						this.evaluate = []
+						this.evaluateTotal = 0
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.product-other-box {
+		.other-box-item {
+			.label {
+				// width: 6em;
+			}
+		}
+	}
+	.hiddenbox {
+		height: 240rpx;
+		overflow: hidden;
+	}
+	.popupbox {
+		width: 80vw;
+		font-size: 32upx;
+		font-family: PingFang SC;
+		color: #333333;
+		&-title{
+			font-weight: bold;
+			padding: 30rpx;
+			text-align: center;
+		}
+		&-body {
+			padding: 24rpx 30rpx;
+			line-height: 2;
+		}
+		.confirm {
+			background-color: #2583EB;
+			border-radius: 10rpx;
+			color: #fff;
+			padding: 10rpx 24rpx;
+			margin: 0 10rpx;
+		}
+		&-footer {
+			border-top: 1rpx solid #F7F7F7;
+			padding: 30rpx;
+			color: red;
+			text-align: center;
+		}
+	}
+	.shadowbox{
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		background: linear-gradient(-180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255,0.5) 50%,rgb(255, 255, 255) 80%);
+		padding-top: 240rpx;
+		margin-top: -240rpx;
+		position: relative;
+		&-btn {
+			padding: 10rpx 40rpx;
+			border-radius: 10rpx;
+			border: 1rpx solid #ccc;
+			display: inline-flex;
+		}
+	}
+	.img-item {
+		position: relative;
+		width: 44rpx;
+		height: 44rpx;
+		margin: 0 20rpx 0 10rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.other-box {
+		background: #FFFFFF;
+		border-radius: 16rpx 16rpx 16rpx 16rpx;
+		padding: 12rpx 24rpx;
+		margin: 24rpx;
+
+		&-item {
+			display: flex;
+			align-items: flex-start;
+			padding: 10rpx 0;
+		}
+
+		.label {
+			flex-shrink: 0;
+			color: #999999;
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			line-height: 1.3;
+			margin-right: 40rpx;
+			min-width: 4em;
+			text-align: justify;
+			/* 两端对齐 */
+			text-align-last: justify;
+			/* 最后一行也撑满 */
+		}
+
+		.safe-box {
+			display: flex;
+			align-items: center;
+
+			image {
+				width: 28rpx;
+				height: 28rpx;
+				margin-right: 8rpx;
+			}
+		}
+
+		.text {
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 26rpx;
+			color: #333333;
+		}
+	}
+
+	.shop-banner {
+		height: 756upx;
+		background-color: #FFFFFF;
+		position: relative;
+
+		.swiper-item {
+			box-sizing: border-box;
+		}
+
+		.swiper,
+		.swiper-item,
+		.swiper-item image {
+			width: 100%;
+			height: 100%;
+		}
+
+		.banner-mask {
+			width: 100%;
+			height: 44upx;
+			// background: linear-gradient(0deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
+			// opacity: 0.8;
+			position: absolute;
+			left: 0;
+			bottom: 0;
+			z-index: 9;
+			background-image: url('https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/black_mask.png');
+			background-size: 20upx 44upx;
+			background-repeat: repeat-x;
+		}
+
+		.num-box {
+			width: 80upx;
+			height: 44upx;
+			line-height: 44upx;
+			text-align: center;
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			background: rgba(0, 0, 0, .3);
+			border-radius: 22upx;
+			position: absolute;
+			right: 30upx;
+			bottom: 30upx;
+			z-index: 10;
+		}
+	}
+
+	.det-info {
+		background: #FFFFFF;
+		padding: 36upx 30upx 25upx;
+		margin: 20rpx 24rpx;
+		border-radius: 16rpx 16rpx 16rpx 16rpx;
+
+		.price-box {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+
+			.price {
+				display: flex;
+				align-items: baseline;
+
+				.label {
+					color: #999999;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					line-height: 1.3;
+					margin-right: 5upx;
+				}
+
+				.unit {
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					line-height: 1.3;
+				}
+
+				.num {
+					font-size: 40upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					margin: 0 20upx 0 0;
+					line-height: 1;
+				}
+
+				.old {
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #999999;
+					line-height: 1.3;
+				}
+			}
+
+			.share-box {
+				width: 120upx;
+				height: 46upx;
+				border: 1px solid #2583EB;
+				border-radius: 23upx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				position: relative;
+
+				.text {
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #2583EB;
+				}
+
+				image {
+					margin-left: 2rpx;
+					width: 25upx;
+					height: 24upx;
+				}
+
+				.share {
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%;
+					opacity: 0;
+				}
+			}
+
+			.spec {
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 36upx;
+			}
+		}
+
+		.name-box {
+			font-size: 32upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #111111;
+			line-height: 44upx;
+			margin-top: 32upx;
+
+			.tag {
+				display: inline-block;
+				padding: 0 6upx;
+				height: 30upx;
+				background: linear-gradient(90deg, #2583EB 0%, #92C1F5 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;
+			}
+		}
+
+		.intro {
+			display: block;
+			font-size: 26upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			line-height: 36upx;
+			padding-top: 18upx;
+		}
+	}
+
+	.inventor {
+		height: 88upx;
+		padding: 0 39upx 0 30upx;
+		margin-top: 10upx;
+		background: #FFFFFF;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		.left {
+			display: flex;
+			align-items: center;
+
+			.head-box {
+				margin-right: 27upx;
+				display: flex;
+				align-items: center;
+
+				.head {
+					width: 48upx;
+					height: 48upx;
+					border-radius: 50%;
+					overflow: hidden;
+					box-shadow: 0 0 0 1px #fff;
+					margin-right: -10upx;
+
+					image {
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+
+			.num-box {
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+
+				.text {
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+			}
+		}
+
+		.right {
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+
+			.text {
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+			}
+		}
+	}
+
+	.effect {
+		box-sizing: border-box;
+		padding: 30rpx;
+		background: #FFFFFF;
+		font-size: 28upx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+		line-height: 1.8;
+		margin: 24rpx 24rpx 0 24rpx;
+		border-radius: 16rpx;
+		
+		.label {
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			line-height: 1;
+		}
+	}
+
+	.det-box {
+		padding: 30upx 30upx 0 30upx;
+		background-color: #FFFFFF;
+		margin: 24rpx 24rpx 0 24rpx;
+		border-radius: 16rpx;
+
+		.title {
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			line-height: 1;
+			margin-bottom: 24rpx;
+		}
+
+		.label,
+		.text {
+			font-size: 30upx !important;
+		}
+	}
+
+	.btn-foot {
+		box-sizing: border-box;
+		width: 100%;
+		height: 121upx;
+		background: #FFFFFF;
+		padding: 0 32upx 0 28upx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 99;
+
+		.menu-box {
+			display: flex;
+			align-items: center;
+
+			.item {
+				display: flex;
+				align-items: center;
+				flex-direction: column;
+				margin-right: 48upx;
+
+				&:last-child {
+					margin-right: 0;
+				}
+
+				image {
+					width: 36upx;
+					height: 36upx;
+					margin-bottom: 10upx;
+				}
+
+				.label {
+					font-size: 20upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					text-align: center;
+				}
+			}
+
+			::v-deep.uni-badge--x {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+			}
+
+			::v-deep.uni-badge {
+				border: none;
+				background-color: #FF3636;
+				font-family: Roboto;
+			}
+		}
+
+		.btn-box {
+			display: flex;
+			align-items: center;
+
+			.btn {
+				position: relative;
+				width: 200upx;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				border-radius: 44upx;
+				margin-left: 20upx;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+
+				&:first-child {
+					margin-left: 0;
+				}
+
+				&.cart {
+					background: #FF6633;
+
+					.share {
+						display: inline-block;
+						position: absolute;
+						top: 0;
+						left: 0;
+						width: 100%;
+						height: 100%;
+						opacity: 0;
+					}
+				}
+
+				&.buy {
+					background: #2583EB;
+				}
+			}
+		}
+	}
+
+	.product-spec {
+		.pro-info {
+			display: flex;
+			align-items: center;
+
+			.img-box {
+				width: 200upx;
+				height: 200upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				overflow: hidden;
+				margin-right: 30upx;
+
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+
+			.info-text {
+				height: 200upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+
+				.price {
+					display: flex;
+					align-items: flex-end;
+
+					.unit {
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+
+					.num {
+						font-size: 50upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+
+				.desc-box {
+					display: flex;
+					flex-direction: column;
+					padding-bottom: 9upx;
+
+					.text {
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						margin-top: 27upx;
+						line-height: 1;
+
+						&:first-child {
+							margin-top: 0;
+						}
+					}
+				}
+			}
+		}
+
+		.spec-box {
+			padding-top: 50upx;
+
+			.title {
+				font-size: 34upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #111111;
+				line-height: 1;
+			}
+
+			.spec-list {
+				display: flex;
+				flex-wrap: wrap;
+				margin-top: 30upx;
+
+				.item {
+					box-sizing: border-box;
+					height: 64upx;
+					padding: 0 30upx;
+					line-height: 64upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					background: #F7F7F7;
+					border: 1px solid #F7F7F7;
+					border-radius: 32upx;
+					margin-right: 20upx;
+					margin-bottom: 30upx;
+
+					&.active {
+						background: #F1FFFE;
+						border: 1px solid #2583EB;
+						color: #2583EB;
+					}
+				}
+			}
+		}
+
+		.price-num {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			margin-top: 14upx;
+
+			.label {
+				font-size: 34upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #111111;
+			}
+
+			.num-box {
+				display: flex;
+				align-items: center;
+
+				.img-box {
+					width: 60upx;
+					height: 60upx;
+					// border-radius: 4upx;
+					border: 1px solid #dddddd;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+
+					image {
+						width: 25rpx;
+						height: 25rpx;
+					}
+				}
+
+				input {
+					width: 60upx;
+					height: 60upx;
+					line-height: 60upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					// border-radius: 4upx;
+					border-top: 1px solid #dddddd;
+					border-bottom: 1px solid #dddddd;
+					text-align: center;
+					// margin: 0 16upx;
+				}
+			}
+		}
+
+		.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: #2583EB;
+			border-radius: 44upx;
+			margin-top: 30upx;
+			// margin-bottom: 30upx;
+
+		}
+	}
+
+	.contact-btn {
+		display: inline-block;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		opacity: 0;
+		z-index: 9999;
+	}
+
+	.loadding {
+		background-color: #fff;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		z-index: 9999;
+
+		image {
+			border-radius: 50%;
+			animation: load linear 1s infinite;
+			width: 120rpx;
+			height: 120rpx;
+		}
+
+		.text {
+			font-size: 28rpx;
+			margin-top: 20rpx;
+		}
+	}
+
+	.storebox {
+		margin: 24rpx;
+		padding: 28rpx 26rpx;
+		font-family: PingFang SC, PingFang SC;
+		color: #333;
+		background: #FFFFFF;
+		border-radius: 16rpx 16rpx 16rpx 16rpx;
+
+		.logo {
+			width: 104rpx;
+			height: 104rpx;
+			background: #FFFFFF;
+			border-radius: 16rpx 16rpx 16rpx 16rpx;
+			margin-right: 26rpx;
+		}
+
+		.storename {
+			font-weight: 500;
+			font-size: 32rpx;
+		}
+
+		.storedesc {
+			margin-top: 12rpx;
+			font-weight: 400;
+			font-size: 22rpx;
+		}
+
+		.storebox-r {
+			flex: 1;
+			overflow: hidden;
+		}
+
+		.storebox-btn {
+			flex-shrink: 0;
+			padding: 10rpx 24rpx;
+			font-size: 28rpx;
+			border-radius: 28rpx 28rpx 28rpx 28rpx;
+			border: 2rpx solid #FF5C03;
+			font-weight: 500;
+			font-size: 24rpx;
+			color: #FF5C03;
+		}
+	}
+	.evaluate {
+		.title {
+			margin: 0;
+			padding-bottom: 24rpx;
+		}
+	}
+	.footer-desc {
+		text-align: center;
+		padding: 0 32rpx 24rpx 0;
+		font-size: 28rpx;
+		color: #999;
+		image{
+			margin-left: 10rpx;
+			width:15rpx;
+			height:20rpx;
+		}
+	}
+</style>

+ 0 - 853
pages_company/packageDetails.vue

@@ -1,853 +0,0 @@
-<template>
-	<view class="content">
-		<!-- <view class="img-box"  @click="showImg()">
-			<image  :src="item.imgUrl"></image>
-		</view> -->
-		<!-- 购买轮播列表 -->
-		 <view class="buy-lists" v-if="notics&&notics.length>0" :style="{height: boxHeight+'px'}">
-			<view :class="{'buy-top': animate == true }" :style="{marginTop: animate == true ? `-${marginTop}px`:'0'}">
-				<view class="buy-list buy-txtbox" v-for="(item,index) in notics" :key="index">
-					<view class="buy-item"><text class="textOne buy-name" >{{item.fsUserName|| ''}}</text><text>{{item.timeTxt}} 已下单</text></view>
-				</view>
-			</view>
-		 </view>
-		<view class="cont-box">
-			<view class="goods-banner" @click="showImg()">
-				<swiper
-					class="swiper" 
-					:indicator-dots="false" 
-					:circular="true" 
-					:autoplay="true" 
-					:interval="3000" 
-					:duration="1000"
-					indicator-color="rgba(255, 255, 255, 0.6)"
-					indicator-active-color="#ffffff"
-					@change="swiperChange"
-				>
-					<swiper-item  class="swiper-item" v-for="(item,index) in  imgs" :key="index">
-						<image :src="item" mode="aspectFit"></image>
-					</swiper-item>
-				</swiper>
-				<!-- 数量 -->
-				<view class="num-box">{{ activeImg }}/{{ imgs.length }}</view>
-			</view>
-			<view class="package-box">
-				<view class="title">{{item.packageName}}</view>
-				<view class="desc">
-					<view class="cycle" v-if="item.cycle>0">服务周期{{item.cycle}}天</view>
-					<view class="duration" v-if="item.duration>0">签约时长{{item.duration}}天</view>
-				</view>
-				<view class="num-box">
-					<view class="price-box">
-						<view class="price"  v-if="item!=null">¥{{item.price.toFixed(2)}}元/日</view>
-						<view class="price"  v-if="item!=null&&item.packageSubType==1">咨询包</view>
-						<view class="price"  v-if="item!=null&&item.packageSubType==2">治疗包</view>
-						<view class="price"  v-if="item!=null&&item.packageSubType==3">产品包</view>
-					</view>
-					<view class="count">{{item.sales}}人已购</view>
-				</view>
-			</view>
-			<view class="drug-box" v-if="products.length>0 ">
-				<view class="title-box">
-					<view class="line"></view>
-					<view class="title">处方列表</view>
-				</view>
-				<view class="drug-list"  >
-					<view  v-for="(product,index) in products"  class="drug-item" >
-						<view class="drug" v-if="displayMore==0?index<2:true" >
-							<view class="img-box">
-								<image :src="product.image" mode="aspectFill"></image>
-							</view>
-							<view class="drug-info"   >
-								<view>
-									<view class="name-box ellipsis2">
-										{{product.productName}} 
-									</view>
-									<view class="spec">{{product.sku}}</view>
-								</view>
-								<view class="num-box">
-									<view class="use">
-										{{product.usageMethod}}
-									</view>
-									<view class="price">
-										
-										<!-- <text class="unit">¥</text>
-										<text class="num">{{product.price.toFixed(2)}}</text> -->
-									</view>
-									<!-- <view class="amount">x{{product.count}}</view> -->
-								</view>
-							</view>
-						</view>
-						
-					</view>
-				</view>
-				<view v-if="products.length>2" class="display-more" @click="showMore()" >{{displayText}}</view>
-				
-			</view>
-			<view class="desc-box" v-if="describe.use!=null">
-				<view class="title-box">
-					<view class="line"></view>
-					<view class="title">疗程</view>
-				</view>
-				<view class="desc" v-if="describe!=null" v-html="describe.use">
-				</view>
-			</view>
-			<view class="desc-box" v-if="item.indication!=null">
-				<view class="title-box">
-					<view class="line"></view>
-					<view class="title">功能主治</view>
-				</view>
-				<view class="desc" v-if="item!=null" v-html="item.indication">
-				</view>
-			</view>
-			<view class="desc-box">
-				<view class="title-box">
-					<view class="line"></view>
-					<view class="title">疗法详情</view>
-				</view>
-				<view class="desc" v-html="item.desc">
-				</view>
-			</view>
-			<view class="desc-box" v-if="describe.usageMethod!=null">
-				<view class="title-box">
-					<view class="line"></view>
-					<view class="title">服用/使用方式</view>
-				</view>
-				<view class="desc" v-html="describe.usageMethod">
-				</view>
-			</view>
-			<view class="desc-box" v-if="describe.forPeople!=null">
-				<view class="title-box">
-					<view class="line"></view>
-					<view class="title">适宜人群</view>
-				</view>
-				<view class="desc" v-html="describe.forPeople">
-				</view>
-			</view>
-			<view class="desc-box" v-if="describe.tabooPeople!=null">
-				<view class="title-box">
-					<view class="line"></view>
-					<view class="title">禁忌人群</view>
-				</view>
-				<view class="desc" v-html="describe.tabooPeople">
-				</view>
-			</view>
-			<view class="desc-box" v-if="item.explain!=null">
-				<view class="title-box">
-					<view class="line"></view>
-					<view class="title">方解/搭配优势</view>
-				</view>
-				<view class="desc" v-html="item.explain">
-				</view>
-			</view>
-		</view>
-		<view class="btn-foot">
-			<view class="p-price-box">
-				<view class="p-name">¥</view>
-				<view class="p-price" v-if="item!=null">{{item.totalPrice.toFixed(2)}}</view>
-			</view>
-			<view class="btn-box">
-				<view class="btn buy"   >
-					分享
-					<button class="contact-btn"   data-name="shareBtn" open-type="share">分享</button>
-				</view>
-				
-			</view>
-		</view>
-	</view> 
-</template>
-
-<script>
-	import { caculateTimeago } from '@/utils/tools.js';
-	import {getConfigByKey} from '@/api/common'
-	import {getPackageById,getPackageDoctorList,getNewOrderByPackageId} from '@/api/package.js'
-	export default {
-		data() {
-			return {
-				displayText:"查看更多",
-				displayMore:0,
-				imgs:[],
-				activeImg: 1,
-				doctorShow:false,
-				doctors:[],
-				products:[],
-				packageId:null,
-				item:{},
-				describe:null,
-				doctorId:null,
-				doctorPageNum:1,
-				doctorLastPage:false,
-				doctorTotal:0,
-				choose: 0,
-				boxHeight: 94,
-				marginTop: 30,
-				animate:false,
-				timer:null,
-				notics:[],
-			};
-		},
-		onLoad(option) {
-			this.packageId=option.packageId;
-			this.companyId=uni.getStorageSync('companyId');
-			this.companyUserId=uni.getStorageSync('companyUserId');		
-		},
-		onReady() {
-			this.getNewOrderByPackageId()
-		},
-		onUnload() {
-			if(this.timer) clearInterval(this.timer)
-		},
-		onShow() {
-			this.getPackageById();
-			this.getPackageDoctorList();
-			if(this.packageId) {
-				this.getConfigByKey()
-			}
-		},
-		onShareAppMessage(res) {
-			return {
-				title: this.item.packageName,
-				path: '/pages_index/packageDetails?packageId='+this.packageId+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId+'&choose='+this.choose|| '',
-				imageUrl: this.item.imgUrl //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
-			}
-		},
-		methods:{
-			getNewOrderByPackageId() {
-				if(this.timer) clearInterval(this.timer)
-				getNewOrderByPackageId({packageId:this.packageId}).then(res=>{
-					if(res.code== 200) {
-						this.notics = res.data
-						if(res.data&&res.data.length > 0) {
-							this.notics = res.data.map(item=>({
-								...item,
-								timeTxt: caculateTimeago(new Date(item.payTime).getTime(),1)
-							}))
-							
-							this.getText()
-							this.timer = setInterval(this.scroll, 1200);
-						}
-					} else {
-						this.notics = []
-					}
-				})
-			},
-			scroll() {
-				this.animate = true;
-				setTimeout(() => {
-					this.notics.push(this.notics[0]);
-					this.notics.shift();
-					this.animate = false;
-				}, 1000);
-			},
-			getText() {
-				const query = uni.createSelectorQuery().in(this);
-				query
-				  .select(".buy-txtbox")
-				  .boundingClientRect((data) => {
-					this.marginTop = data.height + 7
-					if(this.notics.length>2) {
-						this.boxHeight = this.marginTop * 3 + 4
-					} else {
-						this.boxHeight = this.marginTop * this.notics.length + 4
-					}
-				  })
-				  .exec();
-			},
-			showMore(){
-				this.displayMore=this.displayMore==1?0:1;
-				this.displayText=this.displayMore==1?'收起':'查看更多'
-				console.log(this.displayText)
-			},
-			swiperChange(event) {
-				this.activeImg = event.detail.current + 1
-			},
-			handleDoctorClick(item){
-				this.doctorShow=false;
-				this.doctorId=item.doctorId
-				uni.navigateTo({
-					url:"/pages_index/packageForm?packageId="+this.packageId+"&doctorId="+this.doctorId
-				})
-				
-			},
-			lower(event) {
-				if(this.doctorTotal>this.doctors.length){
-					this.doctorPageNum++;
-					this.getPackageDoctorList();
-				}
-			},
-			 
-			doctorOpen(){
-				this.doctorShow=true;
-			},
-			doctorClose(){
-				this.doctorShow=false;
-			},
-			showImg() {
-				 //预览图片
-				 uni.previewImage({
-				 	urls: this.imgs,
-				 	current: this.imgs[0]
-				 });
-			},
-			getPackageDoctorList(){
-				if(this.doctorLastPage){
-					return;
-				}
-				var data = {
-					packageId:this.packageId,
-					pageNum: this.doctorPageNum,
-					pageSize: 10
-				};
-				var that=this;
-				getPackageDoctorList(data).then(
-					res => {
-						if(res.code==200){
-							//设置列表数据
-							if (this.doctorPageNum == 0) {
-								that.doctors = res.data.list; 
-								
-							} else {
-								that.doctors = that.doctors.concat(res.data.list);
-								 
-							}
-							this.doctorLastPage=res.data.isLastPage;
-							this.doctorTotal=res.data.total
-							console.log(that.doctors)
-							 
-						}else{
-							uni.showToast({
-								icon:'none',
-								title: "请求失败",
-							});
-						}
-					},
-					rej => {}
-				);
-			},
-			getPackageById(){
-				let data = {packageId:this.packageId};
-				getPackageById(data).then(
-					res => {
-						if(res.code==200){
-							this.item=res.data;
-							if(res.data.images!=null){
-								this.imgs=res.data.images.split(",")
-							}
-							else{
-								this.activeImg=0;
-							}
-							this.describe=JSON.parse(this.item.describeJson);
-							if(this.item.productJson!=null){
-								this.products=JSON.parse(this.item.productJson);
-							}
-							console.log(this.imgs)
-						}else{
-							uni.showToast({
-								icon:'none',
-								title: "请求失败",
-							});
-						}
-					},
-					rej => {}
-				);
-			},
-			getConfigByKey(){
-				let param = {key:"app.config"};
-				getConfigByKey(param).then(
-					res => {
-						if(res.code==200){
-							let data=res.data ? JSON.parse(res.data) : {};
-							const fsPackage = data.fsPackage&&data.fsPackage.length > 0 ? data.fsPackage[0] : {}
-							this.choose = fsPackage&&fsPackage.packageId == this.packageId ? 2 : 0
-						}else{
-							uni.showToast({
-								icon:'none',
-								title: "请求失败",
-							});
-						}
-					},
-					rej => {}
-				);
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	page{
-		height: 100%;
-	}
-	.textOne {
-		overflow: hidden;
-		white-space: nowrap;
-		text-overflow: ellipsis;
-	}
-	.buy-lists{
-		height: 94px;
-		background-color:transparent;
-		overflow: hidden;
-		width: 60%;
-		position: absolute;
-		z-index: 99;
-		top: 20vh;
-		left: 20rpx;
-	}
-	.buy-list{
-		height: 23px;
-		font-size: 26rpx;
-		margin-top: 7px;
-		overflow: hidden;
-		color: #fff;
-		.buy-item {
-			display: inline-flex;
-			align-items: center;
-			height: 100%;
-			line-height: 100%;
-			overflow: hidden;
-			background-color: rgba(0, 0, 0, 0.35);
-			border-radius: 10rpx;
-			padding: 0 20rpx;
-			box-sizing: border-box;
-			word-break: break-all;
-			white-space: nowrap;
-		}
-		.buy-name {
-			width: 50%;
-			margin-right: 10rpx;
-		}
-		text {
-			word-break: break-all;
-			white-space: nowrap;
-		}
-	}
-	.buy-top {
-	    transition: all 0.8s ease-in;
-	    margin-top: -30px;
-	  }
-	.content{
-		height: 100%;
-		display: flex;
-		flex-direction: column;
-		 
-		.cont-box{
-			padding-bottom: 121rpx;
-			.package-box{
-				background-color: #fff;
-				padding: 20rpx;
-				width: 100%;
-				display: flex;
-				flex-direction: column;
-				align-items: flex-start;
-				justify-content: flex-start;
-				 
-				.title{
-					font-weight: bold;
-					font-size: 34upx;
-					font-family: PingFang SC;
-					color: #111;
-				}
-				.desc{
-					margin-top: 15rpx;
-					display: flex;
-					align-items: flex-start;
-					justify-content: flex-start;
-					.cycle{
-						background-color: #eee;
-						border-radius: 30rpx;
-						padding: 5rpx 15rpx;
-						font-size: 26upx;
-						font-family: PingFang SC;
-						color: #2583EB;
-					}
-					.duration{
-						margin-left: 10rpx;
-						background-color: #eee;
-						border-radius: 30rpx;
-						padding: 5rpx 15rpx;
-						font-size: 26upx;
-						font-family: PingFang SC;
-						color: #2583EB;
-					}
-					
-				}
-				.num-box{
-					margin-top: 15rpx;
-					flex: 1;
-					display: flex;
-					align-items: flex-end;
-					justify-content: space-between;
-					width: 100%;
-					.price-box{
-						display: flex;
-						align-items: center;
-						justify-content: flex-start;
-						.price{
-							margin-right: 10rpx;
-							padding: 5rpx 10rpx;
-							background-color: #2583EB;
-							border-radius: 30rpx;
-							font-size: 20upx;
-							font-family: PingFang SC;
-							color: #ffffff;
-						}
-					}
-					.count{
-						font-size: 24upx;
-						font-family: PingFang SC;
-						color: #333333;
-					}
-					
-				}
-				
-				 
-			}
-			.desc-box{
-				background-color: #fff;
-				padding: 20rpx;
-				margin-top: 10rpx;
-				.title-box{
-					display: flex;
-					flex-direction: row;
-					align-items: center;
-					justify-content: flex-start;
-					.title{
-						font-size: 32upx;
-						font-family: PingFang SC;
-						font-weight: bold;
-						color: #111111;
-					}
-					.line{
-						margin-right: 15rpx;
-						height: 30rpx;
-						width: 6rpx;
-						background-color: #2583EB;
-						
-					}
-					 
-				}
-				.desc{
-					margin-top: 15rpx;
-					font-size: 28upx;
-					font-family: PingFang SC;
-					color: #9a9a9c;
-				}
-			}
-			.drug-box{
-				background-color: #fff;
-				padding: 20rpx;
-				margin-top: 10rpx;
-				.title-box{
-					display: flex;
-					flex-direction: row;
-					align-items: center;
-					justify-content: flex-start;
-					.title{
-						font-size: 32upx;
-						font-family: PingFang SC;
-						font-weight: bold;
-						color: #111111;
-					}
-					.line{
-						margin-right: 15rpx;
-						height: 30rpx;
-						width: 6rpx;
-						background-color: #2583EB;
-						
-					}
-					 
-				}
-				.drug-list{
-					margin-top: 15rpx;
-					.drug-item{
-						.drug{
-							padding-bottom: 15upx;
-							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, #2583EB 0%, #92C1F5 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;
-										}
-									}
-									.use{
-										font-size: 24upx;
-										font-family: PingFang SC;
-										color: #999999;
-									}
-									.amount{
-										font-size: 24upx;
-										font-family: PingFang SC;
-										font-weight: 500;
-										color: #999999;
-										line-height: 1;
-									}
-								}
-							}
-						}
-						
-					}
-				}
-				.display-more{
-					font-size: 24upx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #999999;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-				}
-			}
-		}
-	}
-	 
-	.btn-foot{
-		box-sizing: border-box;
-		width: 100%;
-		height: 121upx;
-		background: #FFFFFF;
-		padding: 0 32upx 0 28upx;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		position: fixed;
-		left: 0;
-		bottom: 0;
-		z-index: 99;
-		.p-price-box{
-			display: flex;
-			align-items: center;
-			.p-name{
-				font-size: 28upx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #FF6633;
-			}
-			.p-price{
-				margin-left: 10rpx;
-				color: #FF6633;
-				font-size: 32upx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				
-			}
-		}
-		 
-		.btn-box{
-			display: flex;
-			align-items: center;
-			.btn{
-				width: 200upx;
-				height: 88upx;
-				line-height: 88upx;
-				text-align: center;
-				border-radius: 44upx;
-				margin-left: 20upx;
-				font-size: 30upx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #FFFFFF;
-				&:first-child{
-					margin-left: 0;
-				}
-			 
-				&.buy{
-					background: #2583EB;
-				}
-				.contact-btn{
-					display: inline-block;
-					position: absolute;
-					top: 0;
-					left: 0;
-					width: 100%;
-					height: 100%;
-					opacity: 0;
-					z-index: 9999;
-				}
-			}
-			
-		}
-	}
-	.doctors{
-		overflow-y: auto;
-		padding: 20rpx;
-		height: 650rpx;
-		width: 100%;
-		display: flex;
-		flex-direction: column;
-		align-items: flex-start;
-		justify-content: flex-start;
-		box-sizing: border-box;
-		.scroll-list{
-			height: 650upx;
-		}
-		.doctor{
-			width: 100%;
-			margin-bottom: 15rpx;
-			background: #f9f8fe;
-			padding: 20rpx;
-			display: flex;
-			flex-direction: column;
-			align-items: flex-start;
-			justify-content: flex-start;
-			&:last-child{
-				margin-bottom: 0rpx;
-			}
-			.item{
-				width: 100%;
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
-				.left{
-					flex: 1;
-					width: 100%;
-					display: flex;
-					align-items: flex-start;
-					justify-content: flex-start;
-					.doc-img{
-						width:80rpx;
-						height:80rpx;
-						border-radius: 50%;
-					}
-					.right{
-						width: calc(100% - 100rpx); 
-						margin-left: 20rpx;
-						display: flex;
-						flex-direction: column;
-						align-items: flex-start;
-						justify-content: flex-start;
-						.doc-box{
-							display: flex;
-							align-items: center;
-							justify-content: space-between;
-							.doc-name{
-								font-size: 28upx;
-								font-family: PingFang SC;
-								font-weight: bold;
-								color: #111111;
-								
-							}
-							.doc-position{
-								margin-left: 50rpx;
-								font-size: 26upx;
-								font-family: PingFang SC;
-								color: #2d2b36;
-							}
-						}
-						.hospital{
-							margin-top: 10rpx;
-							font-size: 24upx;
-							font-family: PingFang SC;
-							color: #9a9a9c;
-						}
-					}
-				}
-				.btn{
-					padding: 10rpx 30rpx;
-					text-align: center;
-					border-radius: 30upx;
-					font-size: 28upx;
-					font-family: PingFang SC;
-					color: #2583EB;
-					border:1rpx solid  #2583EB;
-					 
-				}
-				
-			}
-			
-		}
-	}
-	.goods-banner{
-		height: 756upx;
-		background-color: #FFFFFF;
-		position: relative;
-		.swiper-item{
-			box-sizing: border-box;
-		}
-		.swiper,
-		.swiper-item,
-		.swiper-item image{
-			width: 100%;
-			height: 100%;
-		}
-		.num-box{
-			width: 80upx;
-			height: 44upx;
-			line-height: 44upx;
-			text-align: center;
-			font-size: 24upx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #FFFFFF;
-			background: rgba(0, 0, 0, .3);
-			border-radius: 22upx;
-			position: absolute;
-			right: 30upx;
-			bottom: 30upx;
-			z-index: 10;
-		}
-	}
-</style>

+ 0 - 536
pages_company/packageList.vue

@@ -1,536 +0,0 @@
-<template>
-	<view>
-		<view class="top-content">
-			<!-- 搜索框 -->
-			<view class="search-cont">
-				<view class="inner">
-					<image class="icon-search" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_search.png" mode=""></image>
-					<input type="text" v-model="keyword" placeholder="输入健康疗法名称或别名搜索" confirm-type="search" @confirm="doSearch" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
-				</view>
-			</view>
-			<view class="cate-list">
-				<!-- 关键字列表 -->
-				<scroll-view   scroll-x="true" >
-					<view class="inner">
-						<view v-for="(item,index) in cates" :key="index" :class="privateType == item.cateCode?'item active':'item'" @click="choseType(item)">
-							{{ item.cateName }}
-						</view>
-					</view>
-				</scroll-view>
-			</view>
-			 
-		</view>
-		<mescroll-body  top="192rpx"  ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
-			<view class="package-list">
-				<view  v-for="(item,index) in dataList" :key="index" class="item" >
-					<view class="top-box">
-						<view class="title">{{item.packageName}}</view>
-						<view class="subtitle">别名:{{item.secondName}}</view>
-					</view>
-					<!-- 药品列表 -->
-					<view class="drug-list"  >
-						<view v-for="(subItem,subIndex) in item.products" :key="subIndex" class="drug-item" :class="item.displayMore==0?'hide':'show'">
-							<view class="img-box">
-								<image :src="subItem.image" mode="aspectFill"></image>
-							</view>
-							<view class="drug-info"  >
-								<view>
-									<view class="name-box ellipsis2">
-										{{subItem.productName}}
-									</view>
-									<view class="spec">{{subItem.sku}}</view>
-								</view>
-								<view class="num-box">
-									<view class="price" v-if="subItem.price!=null">
-										<text class="unit">¥</text>
-										<text class="num" >{{subItem.price.toFixed(2)}}</text>
-									</view>
-									<view class="amount">x{{subItem.count}}</view>
-								</view>
-							</view>
-						</view>
-						<view class="display-more" @click="showMore(item)" >{{item.displayText}}</view>
-						<!-- 实付金额、按钮 -->
-						<view class="bottom-box">
-							<view class="amount-paid">
-								<text class="label">套餐价格:</text>
-								<view class="price-box" v-if="item.totalPrice!=null">
-									<view class="unit">¥</view>
-									<view class="num" >{{item.totalPrice.toFixed(2)}}</view>
-								</view>
-							</view>
-							<view class="btn-box">
-								<view  class="btn pay" @click.stop="navTo('/pages_company/packageDetails?packageId='+item.packageId)">
-									查看详情
-								</view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-			<!-- <view class="package-box"  >
-				<view class="item"  @click="navTo('/pages_company/packageDetails?packageId='+item.packageId)" v-for="(item,index) in dataList">
-					<view class="top">
-						<image :src="item.imgUrl"></image>
-					</view>
-					<view class="bottom">
-						<view class="title ellipsis2">
-							{{item.packageName}}
-						</view>
-						<view class="price-box">
-							<view class="price">¥{{item.price.toFixed(2)}}元/日</view>
-							<view class="count">{{item.sales}}人已购</view>
-						</view>
-					</view>
-				</view>
-			</view> -->
-		</mescroll-body>
-		
-	</view>
-</template>
-
-<script>
-	import {getPackageList,getPackagCateList} from '@/api/package.js'
-	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
-	export default {
-		mixins: [MescrollMixin], 
-		data() {
-			return {
-				cates:[],
-				privateType:0,
-				keyword: '',
-				mescroll:null,
-				downOption: {   //下拉刷新
-				 	use:true,
-					auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
-				},
-				upOption: {
-					onScroll:false,
-					use: true, // 是否启用上拉加载; 默认true
-					page: {
-						pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
-						size: 10 // 每页数据的数量,默认10
-					},
-					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
-					textNoMore:"已经到底了",
-					empty: {
-						icon:'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/empty_icon.png',
-						tip: '暂无数据'
-					}
-				},
-				dataList: []
-			};
-		},
-		onShow() {
-			this.getPackagCateList(2);
-		},
-		methods:{
-			getPackagCateList(type){
-				var data={type:type}
-				getPackagCateList(data).then(
-					res => {
-						if(res.code==200){
-							 this.cates=res.data;
-						}
-					},
-					err => {
-					}
-				);
-				
-			},
-			showMore(item){
-				item.displayMore=item.displayMore==1?0:1;
-				item.displayText=item.displayMore==1?'收起':'点击查看方案明细'
-			},
-			navTo(url){
-				uni.navigateTo({
-					url: url
-				})
-			},
-			doSearch(){
-				this.mescroll.resetUpScroll()
-			},
-			mescrollInit(mescroll) {
-				this.mescroll = mescroll;
-			},
-			/*下拉刷新的回调 */
-			downCallback(mescroll) {
-				mescroll.resetUpScroll()
-			},
-			upCallback(page) {
-				//联网加载数据
-				var that = this;
-				var data = {
-					isShow:0,
-					keyword:this.keyword,
-					privateType:this.privateType,
-					pageNum: page.num,
-					pageSize: page.size
-				};
-				getPackageList(data).then(res => {
-					if(res.code==200){
-						//设置列表数据
-						res.data.list.forEach(function(element) {
-						   element.displayMore=0
-						   element.displayText='点击查看方案明细'
-						   if(element.productJson!=null){
-							   element.products=JSON.parse(element.productJson)
-						   }
-						   else{
-							   element.products=[]
-						   }
-						   
-						   
-						});
-						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();
-					}
-				});
-			},
-			choseType(item) {
-				this.privateType = item.cateCode;
-				this.mescroll.resetUpScroll()
-			},
-			 
-		}
-	}
-</script>
-
-<style lang="scss">
-	.top-content{
-		width: 100%;
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 10;
-	}
-	.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;
-			}
-		}
-	}
-	.cate-list{
-		box-sizing: border-box;
-		background: #fff;
-		padding: 10upx 27upx;
-		height: 100upx;
-		.inner{
-			display: flex;
-		}
-		.item{
-			flex-shrink: 0;
-			padding: 0 24upx;
-			height: 64upx;
-			line-height: 64upx;
-			font-size: 28upx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #2583EB;
-			background: #ffffff;
-			border: 1px solid #2EDAD4;
-			border-radius: 32upx;
-			margin: 0 20upx 20upx 0;
-			&.active{
-				color: #FFFFFF;
-				background: #2583EB;
-				border: 1px solid #2583EB;
-			}
-		}
-	}
-	.package-box{
-		margin-top: 20rpx;
-		display: flex;
-		align-items: flex-start;
-		justify-content: flex-start;
-		flex-wrap: wrap;
-		.item{
-			box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
-			background-color: #fff;
-			width: calc(50% - 20rpx);
-			border-radius: 15rpx;
-			margin: 10rpx;
-			display: flex;
-			flex-direction: column;
-			align-items: flex-start;
-			justify-content: flex-start;
-			&:last-child{
-			}
-			.top{
-				width:100%;
-				height:300rpx;
-				image{
-					border-radius: 15rpx 15rpx 0rpx 0rpx;
-					width:100%;
-					height:300rpx;
-				}
-				
-			}
-			.bottom{
-				width: 100%;
-				padding: 15rpx 10rpx;
-				.title{
-					font-weight: bold;
-					font-size: 28upx;
-					font-family: PingFang SC;
-					color: #111111;
-				}
-				.price-box{
-					margin-top: 10rpx;
-					display: flex;
-					align-items: center;
-					justify-content: space-between;
-					width: 100%;
-					.price{
-						padding: 5rpx 10rpx;
-						background-color: #2583EB;
-						border-radius: 30rpx;
-						font-size: 20upx;
-						font-family: PingFang SC;
-						color: #ffffff;
-					}
-					.count{
-						font-size: 24upx;
-						font-family: PingFang SC;
-						color: #333333;
-					}
-					
-				}
-			}
-		}
-	}
-	.package-list{
-		padding: 20upx;
-		.item{
-			background: #FFFFFF;
-			border-radius: 16upx;
-			padding: 0 30upx;
-			margin-bottom: 20upx;
-			.top-box{
-				padding: 34upx 0 20upx;
-				.title{
-					font-size: 28upx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					font-weight: bold;
-					color: #111111;
-				}
-				.subtitle{
-					margin-top: 5rpx;
-					font-size: 24upx;
-					font-family: PingFang SC;
-					font-weight: bold;
-					color: #111111;
-				}
-				 
-			}
-			.drug-list{
-				.drug-item{
-					padding-bottom: 30rpx;
-					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, #2583EB 0%, #2583EB 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;
-							}
-						}
-					}
-				}
-				.show{
-					visibility: flex;
-				}
-				.hide{
-					display: none;
-				}
-				.display-more{
-					font-size: 24upx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #999999;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-				}
-				.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: #2583EB;
-								color: #FFFFFF;
-								position: relative;
-								.share{
-									display: inline-block;
-									position: absolute;
-									top: 0;
-									left: 0;
-									width: 100%;
-									height: 100%rpx;
-									opacity: 0;
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-		
-	}
-</style>

+ 0 - 465
pages_company/packageOrderDetails.vue

@@ -1,465 +0,0 @@
-<template>
-	<view>
-		<view class="cont">
-			<view class="bg"></view>
-			<view class="inner">			
-				<!-- 订单状态 -->
-				<view class="order-status">
-					<!-- 待付款 -->
-					<view v-if="order.status == 1" class="inner">
-						<view class="img-box">
-							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/67eda0644e5847008096525b04cd12ca.png" mode=""></image>
-						</view>
-						<view class="status-box">
-							<text class="status">待付款</text>
-							<!-- <text class="desc">请在{{payLimitTime}}前完成支付</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/b71efb4b5ca54564b553569d578738b4.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/0712ba14f3a648afa69c9912fcbf9b61.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/02f95bd03e854a9c8076aef1e6c05e74.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/6020712aa10f4bb08db92957cb7eb8ed.png" mode=""></image>
-						</view>
-						<view class="status-box">
-							<text class="status">退款成功</text>
-							<text class="desc">已成功退款</text>
-						</view>
-					</view>
-				</view>
-				<view class="content">
-					<view class="package-box">
-						<view class="left">
-							<image :src="package.imgUrl"></image>
-						</view>
-						<view class="right">
-							<view class="title">{{package.packageName}}</view>
-							<view class="desc">
-								<view class="cycle">用药周期{{package.cycle}}天</view>
-								<view class="duration">签约时长{{package.duration}}天</view>
-							</view>
-							<!-- <view class="price-box">
-								<view class="price">¥30元/日</view>
-								<view class="count">6.2w人已购</view>
-							</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.orderSn}}</text>
-								<view class="copy-btn" @click="copyOrderSn(order.orderSn)">复制</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>
-							<text class="text" v-if="order.payType==3">货到付款</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.discountMoney!=null">¥{{order.discountMoney.toFixed(2)}}</text>
-						</view>
-						<view   class="item">
-							<text class="label">代收金额</text>
-							<text class="text" v-if="order.payRemain!=null">¥{{order.payRemain.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">{{order.payTime}}</text>
-						</view>
-						 
-						 
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- 按钮 -->
-		<view   class="btn-box">
-			<!-- <view  class="btn cancel" v-if="order.status==1" @click="cancel()">取消订单</view> -->
-			<!-- <view class="btn pay" v-if="order.status==1" @click="pay()">支付</view> -->
-			
-		</view>
-	</view>
-</template>
-
-<script>
-	
-	import {getCompanyUserPackageOrderById,pay} from '@/api/packageOrder'
-	
-	export default {
-		data() {
-			return {
-				orderId:null,
-				order:{},
-				package:null,
-				items:[],
-		 
-			};
-		},
-		onLoad(option) {
-			this.orderId = option.orderId
-			this.getPackageOrderById();
-		},
-		onShow() {
-			 
-		},
-		methods: {
-			 
-			getPackageOrderById(){
-				var data={orderId:this.orderId};
-				getCompanyUserPackageOrderById(data).then(res => {
-					if(res.code==200){
-						this.order=res.order;
-						this.package=JSON.parse(this.order.packageJson)
-					}else{
-						uni.showToast({
-							icon:'none',
-							title: "请求失败",
-						});
-						 
-					}
-				});
-			},
-			pay() {
-				 uni.navigateTo({
-				 	url: '/pages_order/packageOrderPay?orderId='+this.order.orderId
-				 })
-			},
-			// 返回上一页
-			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'
-						})
-					}
-				});
-			},
-			 
-		}
-	}
-</script>
-
-<style lang="scss">
-	.cont{
-		width: 100%;
-		position: relative;
-		.bg{
-			width: 100%;
-			height: 350upx;
-			position: absolute;
-			top: 0;
-			left: 0;
-			z-index: 1;
-			background-color: #2583EB;
-			background: linear-gradient(#2583EB, #2EDAD4);
-			border-radius: 0rpx 0rpx 100rpx 100rpx;
-		}
-		.inner{
-			position: relative;
-			padding: 30upx 0rpx;
-			width: 100%;
-			height: 100%;
-			z-index: 999;
-			.order-status{
-				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;
-						}
-					}
-				}
-			}
-			 
-		}
-	}
-	.content{
-		margin: 20rpx 0rpx;
-		padding: 0 20upx 140rpx 20upx;
-		.package-box{
-			width: 100%;
-			display: flex;
-			padding: 20rpx;
-			background-color: #fff;
-			align-items: flex-start;
-			justify-content: flex-start;
-			box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
-			border-radius: 15rpx;
-			.left{
-				width:200rpx;
-				height:200rpx;
-				image{
-					border-radius: 15rpx;
-					width:100%;
-					height:100%;
-				}
-			}
-			.right{
-				height: 200rpx;
-				display: flex;
-				flex-direction: column;
-				align-items: flex-start;
-				justify-content: flex-start;
-				padding-left: 15rpx;
-				width:calc(100% - 200rpx);
-				.title{
-					font-weight: bold;
-					font-size: 34upx;
-					font-family: PingFang SC;
-					color: #111;
-				}
-				.desc{
-					margin-top: 15rpx;
-					display: flex;
-					align-items: flex-start;
-					justify-content: flex-start;
-					.cycle{
-						background-color: #eee;
-						border-radius: 30rpx;
-						padding: 5rpx 15rpx;
-						font-size: 26upx;
-						font-family: PingFang SC;
-						color: #2583EB;
-					}
-					.duration{
-						margin-left: 10rpx;
-						background-color: #eee;
-						border-radius: 30rpx;
-						padding: 5rpx 15rpx;
-						font-size: 26upx;
-						font-family: PingFang SC;
-						color: #2583EB;
-					}
-					
-				}
-				.price-box{
-					flex: 1;
-					display: flex;
-					align-items: flex-end;
-					justify-content: space-between;
-					width: 100%;
-					.price{
-						padding: 5rpx 10rpx;
-						background-color: #2583EB;
-						border-radius: 30rpx;
-						font-size: 20upx;
-						font-family: PingFang SC;
-						color: #ffffff;
-					}
-					.count{
-						font-size: 24upx;
-						font-family: PingFang SC;
-						color: #333333;
-					}
-					
-				}
-			}
-			
-			 
-		}
-		.order-info{
-			box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
-			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: #2583EB;
-				color: #FFFFFF;
-			}
-		}
-	}
-</style>

+ 0 - 398
pages_company/packageOrderList.vue

@@ -1,398 +0,0 @@
-<template>
-	<view class="content">
-		<view class="top-fixed">
-			 <u-tabs
-			  :scrollable="true"
-			  :list="tabs"  
-			  lineColor="#2583EB"
-			 @change="tabChange">
-			 </u-tabs>
-		</view>
-		<mescroll-body  top="88rpx" bottom="0"  ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
-			<view class="order-box">
-				<view class="order-item" @click.stop="showDetails(item)" v-for="(item) in dataList">
-					<view class="top-box" >
-						<view class="num">订单号:{{item.orderSn}}</view>
-						<view class="status-box">
-							<text   class="text info" v-if="item.status==1">
-							{{$getDictLabelName(orderStatusOptions,item.status)}}
-							</text>
-							<text   class="text success" v-if="item.status>1">
-							{{$getDictLabelName(orderStatusOptions,item.status)}}
-							</text>
-							<text   class="text info" v-if="item.status<0">
-							{{$getDictLabelName(orderStatusOptions,item.status)}}
-							</text>
-						</view>
-					</view>
-					<view class="package-box">
-						<view class="left">
-							<image :src="item.imgUrl"></image>
-						</view>
-						<view class="right">
-							<view class="title">{{item.packageName}}</view>
-							<view class="desc">
-								<view class="cycle">用药周期{{item.cycle}}天</view>
-								<view class="duration">签约时长{{item.duration}}天</view>
-							</view>
-							<!-- <view class="price-box">
-								<view class="price">¥30元/日</view>
-								<view class="count">6.2w人已购</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 == 1" class="btn cancel" @click="cancel(item)">取消订单</view> -->
-							<view v-if="item.status == 1" class="btn pay"  >查看订单</view>
-							
-						</view>
-					</view>
-				</view>
-			</view>
-		</mescroll-body>
-	</view>
-</template>
-
-<script>
-	import {getCompanyUserPackageOrderList} from '@/api/packageOrder'
-	
-	
-	import {getDictByKey} from '@/api/common.js'
-	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
-	
-	export default {
-		mixins: [MescrollMixin], 
-		data() {
-			return {
-				orderStatusOptions:[],
-				searchKey:"",
-				status:"0",
-				tabs: [
-					{name:"全部",id:"0"},
-					{name:"待支付",id:"1"},
-					{name:"服务中",id:"2"},
-					{name:"已完成",id:"3"},
-					{name:"已取消",id:"-1"},
-					{name:"已退款",id:"-2"}
-				],
-				mescroll:null,
-				downOption: {   //下拉刷新
-				 	use:true,
-					auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
-				},
-				upOption: {
-					onScroll:false,
-					use: true, // 是否启用上拉加载; 默认true
-					page: {
-						pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
-						size: 10 // 每页数据的数量,默认10
-					},
-					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
-					textNoMore:"已经到底了",
-					empty: {
-						icon:'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/empty_icon.png',
-						tip: '暂无数据'
-					}
-				},
-				dataList: []
-			}
-		},
-		onLoad(options) {
-			var that=this;
-			uni.$on('refreshPackageOrder', () => {
-			 	that.mescroll.resetUpScroll()
-			})
-			this.getDictByKey("sys_package_order_status");
-		},
-		onShow() {
-		},
-		methods: {
-			getDictByKey(key){
-				var data={key:key}
-				getDictByKey(data).then(
-					res => {
-						if(res.code==200){
-							if(key=="sys_package_order_status"){
-								this.orderStatusOptions=res.data;
-							}
-						}
-					},
-					err => {
-					}
-				);
-				
-			},
-			 
-			showDetails(item){
-				uni.navigateTo({
-					url:"/pages_company/packageOrderDetails?orderId="+item.orderId
-				})
-			},
-			tabChange(item){
-				this.status=item.id
-				console.log(item)
-				this.mescroll.resetUpScroll()
-			},
-			mescrollInit(mescroll) {
-				this.mescroll = mescroll;
-			},
-			/*下拉刷新的回调 */
-			downCallback(mescroll) {
-				mescroll.resetUpScroll()
-			},
-			upCallback(page) {
-				//联网加载数据
-				var that = this;
-				var data = {
-					status:this.status,
-					pageNum: page.num,
-					pageSize: page.size
-				};
-				getCompanyUserPackageOrderList(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();
-					}
-				});
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	page{
-		background: #f6f6f6;
-	}
-</style>
-<style scoped lang="scss">
-	.content{
-		.top-fixed{
-			width: 100%;
-			position: fixed;
-			top: 0;
-			left: 0;
-			z-index: 10;
-			height: 88upx;
-			background-color: #fff;
-		}
-		.order-box{
-			padding: 20rpx;
-			width: 100%;
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-			justify-content: center;
-			.order-item{
-				width: 100%;
-				border-radius: 10rpx;
-				background-color: #fff;
-				padding: 30rpx;
-				margin-bottom: 20rpx;
-				display: flex;
-				flex-direction: column;
-				align-items: flex-start;
-				justify-content: flex-start;
-				.top-box{
-					width: 100%;
-					display: flex;
-					align-items: center;
-					justify-content: space-between;
-					.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: #2583EB;
-							}
-							&.black{
-								color: #111111;
-							}
-							&.info{
-								color: #999999;
-							}
-						}
-					}
-				}
-				.package-box{
-					margin-top: 20rpx;
-					
-					width: 100%;
-					display: flex;
-					align-items: flex-start;
-					justify-content: flex-start;
-					.left{
-						width:200rpx;
-						height:200rpx;
-						image{
-							border-radius: 15rpx;
-							width:100%;
-							height:100%;
-						}
-					}
-					.right{
-						height: 200rpx;
-						display: flex;
-						flex-direction: column;
-						align-items: flex-start;
-						justify-content: flex-start;
-						padding-left: 15rpx;
-						width:calc(100% - 200rpx);
-						.title{
-							font-weight: bold;
-							font-size: 34upx;
-							font-family: PingFang SC;
-							color: #111;
-						}
-						.desc{
-							margin-top: 15rpx;
-							display: flex;
-							align-items: flex-start;
-							justify-content: flex-start;
-							.cycle{
-								background-color: #eee;
-								border-radius: 30rpx;
-								padding: 5rpx 15rpx;
-								font-size: 26upx;
-								font-family: PingFang SC;
-								color: #2583EB;
-							}
-							.duration{
-								margin-left: 10rpx;
-								background-color: #eee;
-								border-radius: 30rpx;
-								padding: 5rpx 15rpx;
-								font-size: 26upx;
-								font-family: PingFang SC;
-								color: #2583EB;
-							}
-							
-						}
-						.price-box{
-							flex: 1;
-							display: flex;
-							align-items: flex-end;
-							justify-content: space-between;
-							width: 100%;
-							.price{
-								padding: 5rpx 10rpx;
-								background-color: #2583EB;
-								border-radius: 30rpx;
-								font-size: 20upx;
-								font-family: PingFang SC;
-								color: #ffffff;
-							}
-							.count{
-								font-size: 24upx;
-								font-family: PingFang SC;
-								color: #333333;
-							}
-							
-						}
-					}
-					
-					 
-				}
-				.bottom-box{
-					margin-top: 20rpx;
-					width: 100%;
-					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: #2583EB;
-								color: #FFFFFF;
-							}
-						}
-					}
-				}
-				
-			}
-			
-		}
-	}
-</style>

+ 127 - 175
pages_company/storeOrderList.vue → pages_company/storeOrder.vue

@@ -1,67 +1,60 @@
 <template>
 	<view>
-		<view class="top-fixed">
-			 <u-tabs
-			  :scrollable="false"
-			  :list="tabs"  
-			  lineColor="#2583EB"
-			 @change="tabChange">
-			 </u-tabs>
+		<view class="search-cont">
+			<view class="inner">
+				<image class="icon-search" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/icon_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>
 		<!-- 订单列表 -->
-		<mescroll-body  top="88rpx" bottom="0"  ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
 			<view class="order-list">
-				<view @click="showDetail(item)" v-for="(item,index) in dataList" :key="index" class="item" >
+				<view v-for="(item,index) in dataList" :key="index" class="item" >
 					<!-- 订单号,状态 -->
-					<view class="ordersn-box"  >
+					<view class="ordersn-box">
 						<view class="num">订单号:{{item.orderCode}}</view>
 						<view class="status-box">
-							<text   class="text info" v-if="item.status==1">	
-							{{$getDictLabelName(orderStatusOptions,item.status)}}
-							</text>
-							<text   class="text success" v-if="item.status>1">
-							{{$getDictLabelName(orderStatusOptions,item.status)}}
-							</text>
-							<text   class="text info" v-if="item.status<0">
-							{{$getDictLabelName(orderStatusOptions,item.status)}}
+							<!-- <view   class="recom-box">推荐订单</view> -->
+							<text   class="text success">
+								{{$getDictLabelName("storeOrderStatus",item.status)}}
 							</text>
 						</view>
 					</view>
 					<!-- 药品列表 -->
-					<view  class="drug-list"  >
-						<view    v-if="item.isPackage!=1" v-for="(subItem,subIndex) in item.items" :key="subIndex" class="drug-item" >
+					<view class="drug-list"  >
+						<view v-for="(subItem,index) in item.items" :key="index" class="drug-item">
 							<view class="img-box">
-								<image :src="JSON.parse(subItem.jsonInfo).image==''?'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/drug.svg':JSON.parse(subItem.jsonInfo).image" mode="aspectFill"></image>
-								
+								<image :src="JSON.parse(subItem.jsonInfo).image" mode="aspectFill"></image>
 							</view>
 							<view class="drug-info"  >
 								<view>
 									<view class="name-box ellipsis2">
-										{{JSON.parse(subItem.jsonInfo).productName}}
+										<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 class="spec">{{JSON.parse(subItem.jsonInfo).sku}}</view>
 								</view>
 								<view class="num-box">
 									<view class="price">
-										<!-- <text class="unit">¥</text> -->
-										<!-- <text class="num" v-if="JSON.parse(subItem.jsonInfo).price!=null">{{JSON.parse(subItem.jsonInfo).price.toFixed(2)}}</text> -->
+										<text class="unit">¥</text>
+										<text class="num" v-if="JSON.parse(subItem.jsonInfo).price!=null">{{JSON.parse(subItem.jsonInfo).price.toFixed(2)}}</text>
 									</view>
-									<view class="amount" v-if="item.ordetType==1">x{{JSON.parse(subItem.jsonInfo).num}}</view>
+									<view class="amount">x{{JSON.parse(subItem.jsonInfo).num}}</view>
 								</view>
 							</view>
 						</view>
 						<!-- 实付金额、按钮 -->
 						<view class="bottom-box">
 							<view class="amount-paid">
-								<text class="label">订单金额:</text>
+								<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   class="btn" @click="showDetail(item)">查看订单</view>
+								<view  class="btn pay" @click.stop="showDetail(item)">
+									查看详情
+								</view>
 							</view>
 						</view>
 					</view>
@@ -72,85 +65,45 @@
 </template>
 
 <script>
-	import {getDictByKey} from '@/api/common.js'
-	import {getCompanyUserStoreOrderList,cancelOrder,finishOrder} from '@/api/storeOrder'
+	import {getCompanyStoreOrderList} from '@/api/myStoreOrder.js'
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	export default {
 		mixins: [MescrollMixin], 
 		data() {
 			return {
-				orderStatusOptions:[],
 				searchKey:"",
-				status:"0",
-				tabs: [
-					{name:"全部",id:"0"},
-					{name:"待付款",id:"1"},
-					{name:"待发货",id:"2"},
-					{name:"待收货",id:"3"},
-					{name:"已完成",id:"4"}
-				],
 				mescroll:null,
-				downOption: {
-					//下拉刷新
-					use: true,
-					auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
-				},
 				// 上拉加载的配置
 				upOption: {
-					onScroll:false,
+					onScroll:true,
 					use: true, // 是否启用上拉加载; 默认true
 					page: {
-						pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+						num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
 						size: 10 // 每页数据的数量,默认10
 					},
 					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
-					textNoMore:"已经到底了",
 					empty: {
 						icon:'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/empty_icon.png',
 						tip: '暂无数据'
 					}
 				},
 				// 列表数据
-				dataList: []
+				dataList: [],
 			};
 		},
-		onLoad(option) {
+		onLoad(options) {
 			var that=this;
-			uni.$on('refreshStoreOrder', () => {
+			uni.$on('refreshOrder', () => {
 				that.mescroll.resetUpScroll()
 			})
-			this.getDictByKey("sys_order_status");
+			this.companyId=options.companyId;
+			this.companyUserId=options.companyUserId;
 		},
 		methods: {
-			
-			getDictByKey(key){
-				var data={key:key}
-				getDictByKey(data).then(
-					res => {
-						if(res.code==200){
-							if(key=="sys_order_status"){
-								this.orderStatusOptions=res.data;
-							}
-						}
-					},
-					err => {
-					}
-				);
-				
-			},
 			goSearch(e) {
 				this.searchKey=e.detail.value;
 				this.mescroll.resetUpScroll()
 			},
-			refund(item) {
-				uni.navigateTo({
-					url: '/pages_order/storeOrderRefundApply?orderId='+item.orderId
-				})	
-			},
-			tabChange(item) {
-				this.status = item.id
-				this.mescroll.resetUpScroll()
-			},
 			mescrollInit(mescroll) {
 				this.mescroll = mescroll;
 			},
@@ -163,16 +116,14 @@
 				var that = this;
 				var data = {
 					keyword:this.searchKey,
-					status:this.status,
-					pageNum: page.num,
+					companyId:this.companyId,
+					companyUserId:this.companyUserId,
+					page: page.num,
 					pageSize: page.size
 				};
-				getCompanyUserStoreOrderList(data).then(res => {
+				getCompanyStoreOrderList(data).then(res => {
 					if(res.code==200){
 						//设置列表数据
-						res.data.list.forEach(function(value, index, array){
-							value.items=JSON.parse(value.itemJson)
-						})
 						if (page.num == 1) {
 							that.dataList = res.data.list; 
 							
@@ -192,97 +143,81 @@
 					}
 				});
 			},
-			// 查看订单详情
 			showDetail(item) {
 				uni.navigateTo({
-					url: './storeOrderDetail?orderId=' + item.orderId
+					url: './storeOrderDetail?id=' + item.id
 				})
 			},
-			finish(item){
-				var that=this;
-				uni.showModal({
-				    title: '提示',
-				    content: '确定已收货吗',
-				    success: function (res) {
-				        if (res.confirm) {
-							var data = {
-								orderId:item.orderId
-							};
-							finishOrder(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) {
-				        }
-				    }
-				});
-			},
-			cancel(item){
-				var that=this;
-				uni.showModal({
-				    title: '提示',
-				    content: '确定取消订单吗',
-				    success: function (res) {
-				        if (res.confirm) {
-							var data = {
-								orderId:item.orderId
-							};
-							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_order/storeOrderPay?orderId='+item.orderId
-				 })
-			},
+			// 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: '../shopping/paymentOrder?orderId='+item.id
+			// 	 })
+			// },
 			// 查看物流
-			showDelivery(item) {
-				uni.navigateTo({
-					url: './storeOrderDelivery?orderId='+item.orderId
-				})
-			}
+			// 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;
-		height: 88upx;
-		background-color: #fff;
+	.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;
@@ -306,13 +241,28 @@
 				.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: #2583EB;
+							color: #2BC7B9;
 						}
 						&.black{
 							color: #111111;
@@ -355,7 +305,7 @@
 								display: inline-block;
 								padding: 0 6upx;
 								height: 30upx;
-								background: linear-gradient(90deg, #2583EB 0%, #2EDAD4 100%);
+								background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
 								border-radius: 4upx;
 								margin-right: 10upx;
 								font-size: 22upx;
@@ -448,7 +398,6 @@
 						display: flex;
 						align-items: center;
 						.btn{
-							position: relative;
 							width: 155upx;
 							height: 64upx;
 							line-height: 64upx;
@@ -466,15 +415,18 @@
 								color: #666666;
 							}
 							&.pay{
-								background: #2583EB;
+								background: #2BC7B9;
 								color: #FFFFFF;
-							}
-							.contact-btn {
-								top: 0;
-								position: absolute;
-								width:100%;
-								height:100%;
-								opacity: 0;
+								position: relative;
+								.share{
+									display: inline-block;
+									position: absolute;
+									top: 0;
+									left: 0;
+									width: 100%;
+									height: 100%rpx;
+									opacity: 0;
+								}
 							}
 						}
 					}

+ 0 - 300
pages_company/storeOrderDelivery.vue

@@ -1,300 +0,0 @@
-<template>
-	<view>
-		<view class="top-cont">
-			<!-- 背景图片 -->
-			<view class="bg"></view>
-			<view class="top-inner">			
-				<!-- 运单号 -->
-				<view class="waybill-number">
-					<view class="inner">
-						<view class="num-box">
-							<text class="text">运单号</text>
-							<text class="text">{{deliverySn}}</text>
-							<view class="copy" @click="copyOrderSn(deliverySn)">复制</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/shop/image/complete.png" mode=""></image>
-								<!-- 运输中图标 -->
-								<image  class="img" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/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,getExpress} from '@/api/storeOrder'
-	export default {
-		data() {
-			return {
-				orderId:null,
-				deliverySn: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.deliverySn=res.deliverySn
-				 
-					}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: 350upx;
-			position: absolute;
-			top: 0;
-			left: 0;
-			z-index: 1;
-			background-color: #2583EB;
-			background: linear-gradient(#2583EB, #2EDAD4);
-			border-radius: 0rpx 0rpx 100rpx 100rpx;
-		}
-		.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: #2583EB;
-						}
-					}
-					.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: #2583EB;
-						line-height: 1.6;
-					}
-				}
-				.time{
-					font-size: 24upx;
-					font-family: Gilroy;
-					font-weight: 500;
-					color: #999999;
-					margin-top: 10upx;
-				}
-			}
-		}
-		
-	}
-	
-</style>

+ 320 - 169
pages_company/storeOrderDetail.vue

@@ -1,14 +1,29 @@
 <template>
 	<view>
-		<view class="cont">
-			<view class="bg"></view>
-			<view class="inner">			
+		<view class="top-cont">
+			<!-- 背景图片 -->
+			<image class="bg" src="/static/images/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="/static/images/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 == 1" class="inner">
+					<view v-if="order.status == 0" class="inner">
 						<view class="img-box">
-							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/67eda0644e5847008096525b04cd12ca.png" mode=""></image>
+							<image src="/static/images/pag96.png" mode=""></image>
 						</view>
 						<view class="status-box">
 							<text class="status">待付款</text>
@@ -16,9 +31,9 @@
 						</view>
 					</view>
 					<!-- 待发货 -->
-					<view v-if="order.status == 2" class="inner">
+					<view v-if="order.status == 1" class="inner">
 						<view class="img-box">
-							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/520e24fba47441b3b0f73b5250bb0b57.png" mode=""></image>
+							<image src="/static/images/pag96.png" mode=""></image>
 						</view>
 						<view class="status-box">
 							<text class="status">待发货</text>
@@ -26,9 +41,9 @@
 						</view>
 					</view>
 					<!-- 已发货、待收货 -->
-					<view v-if="order.status == 3" class="inner">
+					<view v-if="order.status == 2" class="inner">
 						<view class="img-box">
-							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/1e6ba423ff7e4537bef87a022d530015.png" mode=""></image>
+							<image src="/static/images/receipt.png" mode=""></image>
 						</view>
 						<view class="status-box">
 							<text class="status">待收货</text>
@@ -36,20 +51,21 @@
 						</view>
 					</view>
 					<!-- 已完成 -->
-					<view v-if="order.status == 4" class="inner">
+					<view v-if="order.status == 3" class="inner">
 						<view class="img-box">
-							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/0712ba14f3a648afa69c9912fcbf9b61.png" mode=""></image>
+							<image src="/static/images/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/02f95bd03e854a9c8076aef1e6c05e74.png" mode=""></image>
-							</view>
+							<image src="/static/images/close_trade.png" mode=""></image>
+						</view>
 						<view class="status-box">
 							<text class="status">交易关闭</text>
 							<text class="desc">订单已取消</text>
@@ -57,7 +73,7 @@
 					</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/6020712aa10f4bb08db92957cb7eb8ed.png" mode=""></image>
+							<image src="/static/images/close_trade.png" mode=""></image>
 						</view>
 						<view class="status-box">
 							<text class="status">申请售后</text>
@@ -66,7 +82,7 @@
 					</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/6020712aa10f4bb08db92957cb7eb8ed.png" mode=""></image>
+							<image src="/static/images/close_trade.png" mode=""></image>
 						</view>
 						<view class="status-box">
 							<text class="status">退款成功</text>
@@ -75,13 +91,13 @@
 					</view>
 				</view>
 				<!-- 下单人信息 -->
-				<view class="order-placer" v-if="order.userName!=null">
+				<view class="order-placer">
 					<view class="inner">
-						<image class="location" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/location.png" mode=""></image>
+						<image class="location" src="/static/images/location.png" mode=""></image>
 						<view class="info">
 							<view class="name-phone">
-								<text class="text">{{order.userName}}</text>
-								<text class="text" v-if="order.userPhone!=null">{{order.userPhone}}</text>
+								<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}}
@@ -92,37 +108,50 @@
 				<view class="content">
 					<!-- 药品列表 -->
 					<view class="goods-list">
-						<view   v-for="(item,index) in items" :key="index" class="item"  >
+						<view   v-if="order.isPackage!=1" v-for="(item,index) in items" :key="index" class="item">
 							<view class="img-box">
-								<image :src="JSON.parse(item.jsonInfo).image==''?'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/drug.svg':JSON.parse(item.jsonInfo).image" mode="aspectFill"></image>
+								<image :src="JSON.parse(item.jsonInfo).image" mode="aspectFill"></image>
 							</view>
 							<view class="info-box">
 								<view>
 									<view class="name-box ellipsis2">
-										 {{JSON.parse(item.jsonInfo).productName}}
+										<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 class="spec">{{JSON.parse(item.jsonInfo).sku}}</view>
 								</view>
 								<view class="price-num">
 									<view class="price">
-										<!-- <text class="unit">¥</text> -->
-										<!-- <text class="num" v-if="JSON.parse(item.jsonInfo).price!=null">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text> -->
+										<text class="unit">¥</text>
+										<text class="num">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text>
 									</view>
-									<view class="num" v-if="order.ordetType==1">x{{JSON.parse(item.jsonInfo).num}}</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">{{JSON.parse(order.packageJson).descs}}</view>
+								</view>
+								 
+							</view>
+						</view>
 						<!-- 已优惠、小计 -->
 						<view class="sub-total">
 							<view class="discount">
-								订单金额:¥{{order.payPrice }}
+								订单金额:¥{{order.totalPrice}}
 							</view>
-							<!-- <text class="label">实付金额:</text>
+							<text class="label">实付金额:</text>
 							<view class="price">
 								<text class="unit">¥</text>
-								<text class="num">{{order.payMoney}}</text>
-							</view> -->
+								<text class="num">{{order.payPrice}}</text>
+							</view>
 						</view>
 					</view>
 					<!-- 订单信息 -->
@@ -144,25 +173,17 @@
 							<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.discountMoney!=null">¥{{order.discountMoney.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">
+						<view   class="item">
+							<text class="label">代收金额</text>
+							<text class="text" v-if="order.payDelivery!=null">¥{{order.payDelivery.toFixed(2)}}</text>
+						</view>
+						<view v-if="order.status>0" class="item">
 							<text class="label">支付时间</text>
-							<text class="text" v-if="order.payTime!=null">{{order.payTime}}</text>
+							<text class="text">{{order.payTime}}</text>
 						</view>
 						<!-- <view v-if="order.status >1" class="item">
 							<text class="label">发货时间</text>
@@ -170,72 +191,148 @@
 						</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">
+							<text class="label">开方医生</text>
+							<text class="text">{{prescribe.doctorName}}</text>
+						</view>
+						<view class="item">
+							<text class="label">电子处方</text>
+							<view class="check-box" @click="showImg()">
+								<text class="text">查看</text>
+								<image src="/static/images/arrow4.png" mode=""></image>
+							</view>
+						</view>
+					</view>
 				</view>
+				
 			</view>
 		</view>
 		<!-- 按钮 -->
 		<view   class="btn-box">
-			<view class="btn pay" v-if="order.deliverySn!=null"  @click="showDelivery()">查看物流</view>
+			<view class="btn share-btn" v-if="order.status==0">
+				支付分享
+				<button  class="share" data-name="shareBtn" open-type="share">分享</button>
+			</view>
+			<!-- <view class="btn share-btn" v-if="order.status==0" @click="openEditMoney()">
+				修改定金
+			</view> -->
+		</view>
+	 
+		<view class="popup-box" v-if="editShow">
+		  <view class="info-mask"  @tap="cancelEditMoney()" ></view>
+		  <view class="info-form"   >
+				<view class="title">修改订金</view>
+				<view class="form-box">
+					<view class="form-item">
+						<text class="label">支付金额</text>
+						<input type="text" @input="moneyChange()" v-model="payMoney" maxlength="10" placeholder="支付金额" class="form-input" />
+					</view>
+					<view class="form-item">
+						<text class="label">代收金额</text>
+						<input type="text" disabled v-model="payDelivery" maxlength="10" placeholder="代收金额" class="form-input" />
+					</view>
+				</view>
+				<view class="btns">
+					<view class="sub-btn" @click="confirmEditMoney()">提交</view>
+				</view>
+		  </view>
 		</view>
 	</view>
 </template>
 
 <script>
-	import {getPrescribeById} from '@/api/prescribe.js'
-	
-	import {getCompanyUserStoreOrderById,cancelOrder,finishOrder} from '@/api/storeOrder'
+	import {getMyStoreOrderById } from '@/api/myStoreOrder.js'
+	import {editOrderMoney} from './api/companyOrder.js'
 	export default {
 		data() {
 			return {
+				payMoney:0,
+				payDelivery:0,
+				editShow:false,
 				payLimitTime:null,
 				orderId:null,
 				order:{},
 				items:[],
+				prescribe:null,
+				// 状态栏的高度
+				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
 		 
 			};
 		},
 		onLoad(option) {
-			this.orderId = option.orderId
+			this.orderId = option.id
+			this.getMyStoreOrderById()
 		},
-		onShow() {
-			this.getCompanyUserStoreOrderById()
+		onShareAppMessage(res) {
+			return {
+				title: "订单:"+this.order.orderCode,
+				path: `/pages/shopping/paymentOrder?orderId=${this.order.id}`,
+			}
 		},
 		methods: {
-			showPrescribe(){
-				var data={prescribeId:this.order.prescribeId}
-				getPrescribeById(this.order.prescribeId).then(
-					res => {
-						if(res.code==200){
-							if(res.data.prescribe.prescribeImgUrl!=null){
-								var data=[];
-								data.push(res.data.prescribe.prescribeImgUrl)
-								uni.previewImage({
-									current: 0,
-									urls: data
-								});
-							}
-							else{
+			moneyChange(){
+				this.payDelivery=this.order.payPrice-this.payMoney
+			},
+			openEditMoney(){
+				console.log(1)
+				this.editShow = true
+			},
+			cancelEditMoney(){
+				this.editShow = false
+			},
+			confirmEditMoney(){
+				if(parseFloat(this.payMoney)>=0){
+					var that=this;
+					var data={orderId:this.order.id,token:uni.getStorageSync('CompanyUserToken'),money:this.payMoney}
+					editOrderMoney(data).then(
+						res => {
+							if(res.code==200){
+								this.editShow = false
+								this.getMyStoreOrderById();
+							}else{
 								uni.showToast({
 									icon:'none',
-									title: "电子处方单不存在",
+									title: res.msg,
 								});
-								 
 							}
-							
-						}
-					},
-					err => {
-					}
-				);
+						},
+						rej => {}
+					);
+					
+				}
+				else{
+					uni.showToast({
+						icon:'none',
+						title: "支付金额应大于等于0",
+					});
+				}
 			},
-			getCompanyUserStoreOrderById(){
+			showImg(){
+				var imgArr = [];
+				imgArr.push(this.prescribe.rpUrl)
+				//预览图片
+				uni.previewImage({
+					urls: imgArr,
+					current: imgArr[0]
+				});
+			},
+			getMyStoreOrderById(){
 				var data={orderId:this.orderId};
-				getCompanyUserStoreOrderById(data).then(res => {
+				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.payMoney=this.order.payMoney;
+						 this.payDelivery=this.order.payDelivery
 					}else{
 						uni.showToast({
 							icon:'none',
@@ -245,72 +342,15 @@
 					}
 				});
 			},
-			showDelivery(){
+			express(){
 				uni.navigateTo({
-					url: './storeOrderDelivery?orderId='+this.orderId
+					url: './storeOrderDelivery?orderId='+this.order.orderId
 				})
 			},
-			cancel(){
-				var that=this;
-				uni.showModal({
-				    title: '提示',
-				    content: '确定取消订单吗',
-				    success: function (res) {
-				        if (res.confirm) {
-							var data = {
-								orderId:that.order.orderId
-							};
-							cancelOrder(data).then(res => {
-								if(res.code==200){
-									 uni.$emit('refreshStoreOrder');
-								}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.orderId
-							};
-							finishOrder(data).then(res => {
-								if(res.code==200){
-									 uni.$emit('refreshStoreOrder');
-								}else{
-									uni.showToast({
-										icon:'none',
-										title: res.msg,
-									});
-								}
-							});
-				        } 
-						else if (res.cancel) {
-				        }
-				    }
-				});
-			},
-			pay() {
-				 uni.navigateTo({
-				 	url: '/pages_order/storeOrderPay?orderId='+this.order.orderId
-				 })
-			},
-			payRemain() {
-				 uni.navigateTo({
-				 	url: '/pages_user/user/paymentOrderRemain?orderId='+this.order.orderId
-				 })
+			 
+			// 返回上一页
+			back() {
+				uni.navigateBack()
 			},
 			// 复制订单编号
 			copyOrderSn(text) {
@@ -325,38 +365,59 @@
 					}
 				});
 			},
-			// 退货
-			refund() {
-				uni.navigateTo({
-					url: '/pages_order/storeOrderRefundApply?orderId='+this.orderId
-				})
-			}
+			 
 		}
 	}
 </script>
 
 <style lang="scss">
-	.cont{
+	.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: 350upx;
+			height: 100%;
 			position: absolute;
 			top: 0;
 			left: 0;
 			z-index: 1;
-			background-color: #2583EB;
-			background: linear-gradient(#2583EB, #2EDAD4);
-			border-radius: 0rpx 0rpx 100rpx 100rpx;
 		}
-		.inner{
-			position: relative;
-			padding: 30upx 0rpx;
+		.top-inner{
 			width: 100%;
 			height: 100%;
-			z-index: 999;
+			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;
@@ -397,7 +458,7 @@
 				}
 			}
 			.order-placer{
-				margin-top: 30upx;
+				margin-top: 50upx;
 				padding: 0 20upx;
 				.inner{
 					box-sizing: border-box;
@@ -480,7 +541,7 @@
 							display: inline-block;
 							padding: 0 6upx;
 							height: 30upx;
-							background: linear-gradient(90deg, #2583EB 0%, #2EDAD4 100%);
+							background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
 							border-radius: 4upx;
 							margin-right: 10upx;
 							font-size: 22upx;
@@ -661,7 +722,6 @@
 		align-items: center;
 		justify-content: flex-end;
 		.btn{
-			position: relative;
 			width: 155upx;
 			height: 64upx;
 			line-height: 64upx;
@@ -671,22 +731,113 @@
 			text-align: center;
 			border-radius: 32upx;
 			margin-left: 15upx;
-			&.cancel{
+			&.share-btn{
+				background: #2BC7B9;
+				color: #FFFFFF;
+				position: relative;
+				.share{
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%rpx;
+					opacity: 0;
+				}
 				
-				border: 1px solid #DDDDDD;
-				color: #666666;
 			}
-			&.pay{
-				background: #2583EB;
-				color: #FFFFFF;
+		}
+	}
+	.popup-box{
+		position: fixed;
+		top: 0;
+		right: 0;
+		left: 0;
+		bottom: 0;
+		z-index: 999;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.info-mask {
+			position: fixed;
+			top: 0;
+			right: 0;
+			bottom: 0;
+			left: 0;
+			background-color: rgba($color: #000000, $alpha: 0.5);
+			z-index: 999;
+		}
+		.info-form {
+			z-index: 1000;
+			width: 650rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			align-items: center;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			.title{
+				padding: 30rpx 0rpx 15rpx;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				font-size: 40upx;
+				line-height: 44upx;
+				font-family: PingFang SC;
+				color: #222222;
 			}
-			.contact-btn {
-				top: 0;
-				position: absolute;
-				width:100%;
-				height:100%;
-				opacity: 0;
+			.form-box{
+				width: 100%;
+				.form-item{
+					padding: 30upx 0;
+					display: flex;
+					align-items: flex-start;
+					border-bottom: 1px solid #F1F1F1;
+					.label{
+						width: 160upx;
+						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: 34upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						text-align: left;
+					}
+					 
+				}
+			}
+			.btns{
+				width: 100%;
+				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>

+ 2 - 2
pages_im/pages/common/livePage/index.vue

@@ -22,8 +22,8 @@ import {
   judgeIosPermission,
   requestAndroidPermission,
 } from "../../../util/permission";
-import beCalledRing from "../../../static/audio/beCalled.mp3";
-import callingRing from "../../../static/audio/calling.wav";
+import beCalledRing from "..//static/audio/beCalled.mp3";
+import callingRing from "..//static/audio/calling.wav";
 
 let currentWebview;
 let innerAudioContext;

+ 1 - 1
pages_order/inquirySelect.vue

@@ -97,7 +97,7 @@
 		},
 		methods: {
 			getConfigByKey(){
-				let data = {key:"his.inquiryConfig"};
+				let data = {key:"his.inquiryConfig",appId:wx.getAccountInfoSync().miniProgram.appId,};
 				getConfigByKey(data).then(
 					res => {
 						if(res.code==200){

+ 1 - 1
pages_order/inquirySelectType.vue

@@ -42,7 +42,7 @@
 		},
 		methods: {
 			getConfig(){
-				var data={key:"his.inquiryConfig"}
+				var data={key:"his.inquiryConfig",appId:wx.getAccountInfoSync().miniProgram.appId,}
 				getConfigByKey(data).then(
 					res => {
 						if(res.code==200){

+ 4 - 1
pages_order/packageOrderPay.vue

@@ -234,6 +234,9 @@
 			})
 			this.getAddressByDefault();
 		},
+		onUnload() {
+			uni.$off('updateAddress')
+		},
 		onShow() {
 			this.getPackageOrderById();
 			// this.getPackageById();
@@ -265,7 +268,7 @@
 			 
 			getConfigByKey(){
 				var that=this;
-				var data={key:"his.package"}
+				var data={key:"his.package",appId:wx.getAccountInfoSync().miniProgram.appId,}
 				getConfigByKey(data).then(
 					res => {
 						if(res.code==200){

+ 3 - 0
pages_order/storeOrderPay.vue

@@ -180,6 +180,9 @@
 				that.address.address=e.province+e.city+e.district+e.detail
 			})
 		},
+		onUnload() {
+			uni.$off('updateAddress')
+		},
 		onShow() {
 			this.getStoreOrderById();
 		},

+ 266 - 128
pages_shopping/confirmCreateOrder.vue

@@ -28,76 +28,109 @@
 				</view>
 			</view>
 			<!-- 药品列表 -->
-			<view class="goods-list">
-				<view v-for="(item,index) in carts" :key="index" class="item">
-					<view class="img-box">
-						<image :src="item.productAttrImage!=null?item.productAttrImage:item.productImage" mode="aspectFill"></image>
-					</view>
-					<view class="info-box">
-						<view>
-							<view class="name-box ellipsis2">
-								<view class="tag" :style="{background:_background(item.productType)}">{{$getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
-							</view>
-							<view class="spec ellipsis2">{{item.productAttrName}}</view>
+			<view class="shopbox" v-for="(shop,idx) in carts" :key="idx">
+				<view class="shopbox-name" v-if="shop.storeName && shop.storeName != 'null'">
+					<text>{{shop.storeName}}</text>
+				</view>
+				<view class="goods-list">
+					<view v-for="(item,index) in shop.list" :key="index" class="item">
+						<view class="img-box">
+							<image :src="item.productAttrImage || item.productImage" mode="aspectFill"></image>
 						</view>
-						<view class="price-num">
-							<view class="price">
-								<text class="unit">¥</text>
-								<text class="num">{{item.price.toFixed(2)}}</text>
+						<view class="info-box">
+							<view>
+								<view class="name-box ellipsis2">
+									<view class="tag" :style="{background:_background(item.productType)}">{{$getDictLabelName("storeProductType",item.productType)}}</view>
+									{{item.commonName&&item.commonName!=='-'?item.commonName:item.productName}}
+								</view>
+								<view class="spec ellipsis2">{{item.productAttrName}}</view>
+							</view>
+							<view class="price-num">
+								<view class="price">
+									<text class="unit">¥</text>
+									<text class="num">{{item.price? item.price.toFixed(2): '0.00'}}</text>
+								</view>
+								<view class="num">x{{item.cartNum}}</view>
 							</view>
-							<view class="num">x{{item.cartNum}}</view>
 						</view>
 					</view>
-				</view>
-				<!-- 小计 -->
-				<view class="sub-total">
-					<text class="label">小计:</text>
-					<view class="price">
-						<text class="unit">¥</text>
-						<text class="num">{{price.totalPrice.toFixed(2)}}</text>
+					<!-- 运费 -->
+					<view class="points">
+						<view class="left">
+							<text class="text">运费</text>
+						</view>
+						<view class="right" v-if="price&&price.length > 0">
+							<text class="text">{{price[idx].payPostage==null||price[idx].payPostage==0?'免运费':price[idx].payPostage.toFixed(2)}}</text>
+						</view>
+					</view>
+					<!-- 备注 -->
+					<view class="points">
+						<view class="left">
+							<text class="text">备注</text>
+						</view>
+						<view class="remarks">
+							<input type="text" v-model="shop.markinfo" placeholder="备注留言(选填)" placeholder-class="input" />
+						</view>
 					</view>
 				</view>
 			</view>
 			<!-- 积分 -->
-			<view class="points">
-				<view class="left">
-					<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/points.png" mode=""></image>
-					<text class="text">可用积分</text>
-				</view>
-				<view class="right">
-					<text class="text">{{price.usedIntegral}}积分</text>
-					<evan-switch @change="integralChange" v-model="checked" activeColor="#2583EB" inactiveColor="rgba(0, 0, 0, 0.1)"></evan-switch>
-				</view>
-			</view>
-			<view class="points" @click="openCoupon()">
-				<view class="left">
-					<text class="text">优惠券</text>
+			<view class="price-info">
+				<view class="price-info-title">价格明细</view>
+				<view class="points">
+					<view class="left">
+						<text class="text">商品总价</text>
+					</view>
+					<view class="right" style="align-items: baseline;">
+						<text class="price-info-unit">¥</text>
+						<text class="price-info-num">{{priceAll.totalPrice.toFixed(2)}}</text>
+					</view>
 				</view>
-				<view class="right">
-					<text class="text">{{couponText}}</text>
-					<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/arrow4.png" mode=""></image>
+				<view class="points">
+					<view class="left">
+						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/points.png" mode=""></image>
+						<text class="text">可用积分</text>
+					</view>
+					<view class="right">
+						<text class="text">{{priceAll.usedIntegral}}积分</text>
+						<evan-switch @change="integralChange" v-model="checked" activeColor="#0bb3f2" inactiveColor="rgba(0, 0, 0, 0.1)"></evan-switch>
+					</view>
 				</view>
-			</view>
-			<view class="points">
-				<view class="left">
-					<text class="text">运费</text>
+				<view class="points" @click="openCoupon()">
+					<view class="left">
+						<text class="text">优惠券</text>
+					</view>
+					<view class="right">
+						<text class="text">{{couponText}}</text>
+						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/arrow4.png" mode=""></image>
+					</view>
 				</view>
-				<view class="right">
-					<text class="text" v-if="address!=null">{{price.payPostage==null||price.payPostage==0?'免运费':price.payPostage.toFixed(2)}}</text>
-					<text class="text" v-if="address==null">--</text>
+				<view class="points">
+					<view class="left">
+						<text class="text">合计</text>
+					</view>
+					<view class="right" style="align-items: baseline;">
+						<text class="price-info-unit">¥</text>
+						<text class="price-info-num">{{priceAll.payPrice.toFixed(2)}}</text>
+					</view>
 				</view>
 			</view>
-			<view class="points">
+			<!-- <view class="points">
 				<view class="left">
 					<text class="text">服务费</text>
 				</view>
 				<view class="right">
-					<text class="text">{{price.serviceFee.toFixed(2)}}</text>
+					<text class="text">{{price.serviceFee? price.serviceFee.toFixed(2):'0.00'}}</text>
 				</view>
-			</view>
+			</view> -->
 			<!-- 备注 -->
-			<view class="remarks">
+			<!-- <view class="remarks">
 				<input type="text" v-model="form.mark" placeholder="备注留言(选填)" placeholder-class="input" />
+			</view> -->
+			<view class="agreement">
+				<label>
+					<checkbox :checked="isAgreement" color="#2583EB" style="transform:scale(0.7)" @click="handleAgreement()" />药品属于特殊商品除药品质量问题外,一经售出,不得退换
+				</label>
 			</view>
 		</view>
 		<!-- 底部按钮 -->
@@ -107,7 +140,7 @@
 					<text class="label">合计:</text>
 					<view class="price">
 						<text class="unit">¥</text>
-						<text class="num">{{price.payPrice.toFixed(2)}}</text>
+						<text class="num">{{priceAll.payPrice.toFixed(2)}}</text>
 					</view>
 				</view>
 				<view class="btn" @click="submitOrder">提交订单</view>
@@ -115,27 +148,27 @@
 		</view>
 		<popupBottom ref="popup" :visible.sync="couponVisible" title=" " bgColor="#f5f5f5" radius="30"    maxHeight="60%">
 		     <view class="coupon" style="height:650rpx;">
-				 <div class="coupon-list" v-if="couponsList.length > 0">
-				   <div class="item acea-row row-center-wrapper"  v-for="(item, index) in couponsList" :key="index">
-				     <div class="money" >
+				 <view class="coupon-list" v-if="couponsList.length > 0">
+				   <view class="item acea-row row-center-wrapper"  v-for="(item, index) in couponsList" :key="index">
+				     <view class="money" >
 				       <image v-if="item.status==0" class="img" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/coupon1.png" mode="widthFix"></image>
 				 	  <image v-if="item.status!=0" class="img" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/coupon2.png" mode="widthFix"></image>
-				 	  <div style="z-index: 999;">
+				 	  <view style="z-index: 999;">
 				         ¥<span class="num">{{ item.couponPrice }}</span>
-				       </div>
-				       <div class="pic-num"  >满{{ item.useMinPrice }}元可用</div>
-				     </div>
-				     <div class="text">
-				       <div class="condition line1">
+				       </view>
+				       <view class="pic-num"  >满{{ item.useMinPrice }}元可用</view>
+				     </view>
+				     <view class="text">
+				       <view class="condition line1">
 				         {{ item.couponTitle }}
-				       </div>
-				       <div class="data acea-row row-between-wrapper">
-							<div >{{ item.limitTime }}到期</div>
-							<div class="bnt bg-color-red" @click="couponSelect(item)"  >选择</div>
-				       </div>
-				     </div>
-				   </div>
-				 </div>
+				       </view>
+				       <view class="data acea-row row-between-wrapper">
+							<view >{{ item.limitTime }}到期</view>
+							<view class="bnt bg-color-red" @click="couponSelect(item)"  >选择</view>
+				       </view>
+				     </view>
+				   </view>
+				 </view>
 				 <view v-if="couponsList.length == 0" class="no-data-box" >
 				 	<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/empty_icon.png" mode="aspectFit"></image>
 				 	<view class="empty-title">暂无数据</view>
@@ -149,11 +182,11 @@
 <script>
 	import {getWeixinOrderTemps} from '@/api/common'
 	
-	import {confirm,computed,create} from '@/api/storeOrder'
-	import { getMyEnableCouponList } from '@/api/coupon'
+	import {confirm,computed,create} from '@/api/myStoreOrder.js'
+	import { getMyEnableCouponList } from './api/coupon'
 	 
 	import EvanSwitch from './components/evan-switch.vue'
-	import popupBottom from './components/px-popup-bottom.vue'
+	import popupBottom from '@/components/px-popup-bottom.vue'
 	
 	export default {
 		components: {
@@ -162,17 +195,13 @@
 		},
 		data() {
 			return {
+				isAgreement: true,
 				temps:[],
 				couponUserId:null,
 				couponText:"请选择",
 				couponsList:[],
 				couponVisible:false,
-				price:{
-					payPrice:0,
-					totalPostage:0,
-					usedIntegral:0,
-					totalPrice:0.00,
-				},
+				price:[],
 				address:null,
 				carts:[],
 				checked: false,
@@ -186,7 +215,15 @@
 					companyId:null,
 					companyUserId:null,
 					createOrderKey:null,
-				}
+				},
+				storeId: '',
+				priceAll:{
+					payPrice:0,
+					totalPostage:0,
+					usedIntegral:0,
+					totalPrice:0.00,
+				},
+				confirmParam: []
 			}
 		},
 		computed: {
@@ -207,16 +244,25 @@
 			this.form.createOrderKey=option.createOrderKey;
 			this.form.companyId=option.companyId;
 			this.form.companyUserId=option.companyUserId;
-			this.cartIds=option.cartIds;
+			// this.cartIds=option.cartIds;
 			this.type=option.type;
+			this.storeId=option.storeId;
+			this.confirmParam = JSON.parse(decodeURIComponent(option.confirmParam))
 			this.confirm();
 			uni.$on('updateAddress', (e) => {
 				this.address=e;
 				this.form.addressId=e.addressId;
+				this.computed()
 			})
 			this.getWeixinOrderTemps();
 		},
+		onUnload() {
+			uni.$off('updateAddress')
+		},
 		methods: {
+			handleAgreement() {
+				this.isAgreement = !this.isAgreement;
+			},
 			getWeixinOrderTemps:function(){
 				getWeixinOrderTemps().then(
 					res => {
@@ -238,7 +284,7 @@
 			},
 			openCoupon(){
 				let that = this;
-				var data={couponType:2,useMinPrice:this.price.payPrice};
+				var data={couponType:0,useMinPrice:this.price.payPrice};
 				getMyEnableCouponList(data).then(res => {
 				  this.couponVisible=true;
 				  that.couponsList = res.data
@@ -249,39 +295,56 @@
 				this.form.useIntegral=e?1:0
 				this.computed()
 			},
-			confirm(item){
-				let data = {type:this.type,cartIds:this.cartIds};
-				confirm(data).then(
-					res => {
-						if(res.code==200){
-							 
-							 this.carts=res.carts;
-							 this.form.orderKey=res.orderKey;
-							 if(res.address!=null){
-								 this.form.addressId=res.address.id;
-								 this.address=res.address;
-								 console.log(this.form.addreddId)
-							 }
-							 this.computed()
-						}else{
-							
-							uni.showToast({
-								icon:'none',
-								title: res.msg,
-							});
-						}
-					},
-					rej => {}
-				);
+			confirm(){
+				if(this.confirmParam && this.confirmParam.length > 0) {
+					confirm(this.confirmParam).then(
+						res => {
+							if(res.code==200){
+								this.carts=res.carts.map(item=>({
+									 ...item,
+									 markinfo: ""
+								}));
+								 this.form.orderKey=res.orderKeys;
+								 if(res.address!=null){
+									 this.form.addressId=res.address.id;
+									 this.address=res.address;
+								 }
+								 this.computed()
+							}else{
+								uni.showToast({
+									icon:'none',
+									title: res.msg,
+								});
+							}
+						},
+						rej => {}
+					)
+				}else {
+					uni.showToast({
+						icon: 'none',
+						title:'订单参数不存在~',
+					});
+				}
 			},
-			computed(item){
-				let data = {companyUserId:this.form.companyUserId,createOrderKey:this.form.createOrderKey,couponUserId:this.couponUserId,orderKey:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral};
+			computed(){
+				let data = {
+					companyId:this.form.companyId,
+					couponUserId:this.couponUserId,
+					orderKeys:this.form.orderKey,
+					addressId:this.form.addressId,
+					useIntegral:this.form.useIntegral,
+					createOrderKey:this.form.createOrderKey
+				};
 				computed(data).then(
 					res => {
 						if(res.code==200){
-							 console.log(res)
-							 this.price=res.data
-							 
+							 this.price= res.data && res.data.length > 0 ? res.data : []
+							 this.priceAll = res.data && res.data.length > 0 ? res.data[res.data.length -1] : {
+								 payPrice:0,
+								 totalPostage:0,
+								 usedIntegral:0,
+								 totalPrice:0.00,
+							 }
 						}else{
 							if(res.code==501){
 								uni.showToast({
@@ -310,7 +373,7 @@
 			// 提交订单
 			submitOrder() {
 				var that=this;
-				if(this.form.orderKey==null){
+				if(this.form.orderKey==null || this.form.orderKey.length == 0){
 					uni.showToast({
 						icon:'none',
 						title: '订单KEY不存在',
@@ -324,7 +387,13 @@
 					});
 					return;
 				}
-				
+				if(!this.isAgreement) {
+					uni.showToast({
+						icon:'none',
+						title: '购买前请同意相关须知',
+					});
+					return;
+				}
 				uni.requestSubscribeMessage({
 					tmplIds: this.temps,
 					success(res) {
@@ -337,38 +406,62 @@
 				
 			},
 			createOrder(){
+				const mark = this.carts.map(item => item.markinfo)
 				var that=this;
 				var data=null;
 				var tuiUserId=uni.getStorageSync('tuiUserId');
 				uni.showLoading({
 					title: '正在处理中...'
 				});
+				// if(tuiUserId!=null&&tuiUserId!=undefined&&tuiUserId>0){
+				// 	data = {orderCreateType:1,tuiUserId:tuiUserId,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:mark,orderKeys:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1,appId: getApp().globalData.appId};
+				// }
+				// else{
+				// 	data = {orderCreateType:1,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:mark,orderKeys:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1,appId: getApp().globalData.appId};
+				// }
 				if(tuiUserId!=null&&tuiUserId!=undefined&&tuiUserId>0){
-					data = {createOrderKey:this.form.createOrderKey,orderCreateType:3,tuiUserId:tuiUserId,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:this.form.mark,orderKey:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1};
+					data = {createOrderKey:this.form.createOrderKey,orderCreateType:3,tuiUserId:tuiUserId,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:mark,orderKeys:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1,appId: getApp().globalData.appId};
 				}
 				else{
-					data = {createOrderKey:this.form.createOrderKey,orderCreateType:3,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:this.form.mark,orderKey:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1};
+					data = {createOrderKey:this.form.createOrderKey,orderCreateType:3,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:mark,orderKeys:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1,appId: getApp().globalData.appId};
+				}
+				if(this.storeId!=null&& this.storeId>0){
+					data.storeId=this.storeId;
 				}
 				create(data).then(
 					res => {
 						uni.hideLoading()
-						if(res.code==200){
+						if(res.code == 200){
 							uni.hideLoading()
-							if(res.order.isPrescribe==1){
+							if(res.data.some(item=> item.order.isPrescribe) == 1) {
 								setTimeout(function(){
+									let orderIds = res.data.filter(item=> item.order.isPrescribe == 1).map(it=>it.order.id)
+									orderIds = orderIds.join(',')
 									uni.redirectTo({
-										url:"prescribe?orderId="+res.order.id
+										url:"/pages_shopping/prescribe?orderId="+orderIds+"&combinationOrderId="+encodeURIComponent(res.data[0].order.combinationOrderId)
 									})
 								},200);
-							}
-							else{
+							} else {
 								setTimeout(function(){
 									uni.redirectTo({
-										url: './paymentOrder?orderId='+res.order.id
+										url: '/pages_shopping/paymentOrder?combinationOrderId='+encodeURIComponent(res.data[0].order.combinationOrderId)
 									})
 								},200);
 							}
-							
+							// if(res.order.isPrescribe==1){
+							// 	setTimeout(function(){
+							// 		uni.redirectTo({
+							// 			url:"/pages_shopping/prescribe?orderId="+res.order.id
+							// 		})
+							// 	},200);
+							// }
+							// else{
+							// 	setTimeout(function(){
+							// 		uni.redirectTo({
+							// 			url: '/pages_shopping/paymentOrder?orderId='+res.order.id
+							// 		})
+							// 	},200);
+							// }
 							return;
 						}
 						else{
@@ -458,8 +551,29 @@
 				}
 			}
 		}
+		.shopbox {
+			background: #FFFFFF;
+			border-radius: 16rpx;
+			margin: 20rpx 0;
+			.points {
+				padding: 0 !important;
+			}
+			.remarks {
+				padding: 0 !important;
+			}
+		}
+		.shopbox-name {
+			padding: 30rpx 30rpx 0 30rpx;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: bold;
+			font-size: 30rpx;
+			color: #111;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+		}
 		.goods-list{
-			margin-top: 20upx;
+			// margin-top: 20upx;
 			padding: 0 30upx;
 			background-color: #FFFFFF;
 			border-radius: 16upx;
@@ -493,7 +607,7 @@
 							display: inline-block;
 							padding: 0 6upx;
 							height: 30upx;
-							background: linear-gradient(90deg, #2583EB 0%, #92C1F5 100%);
+							background: linear-gradient(90deg, #66b2ef 0%, #0bb3f2 100%);
 							border-radius: 4upx;
 							margin-right: 10upx;
 							font-size: 22upx;
@@ -578,12 +692,30 @@
 				}
 			}
 		}
+		.price-info {
+			background: #FFFFFF;
+			border-radius: 16upx;
+			&-title {
+					padding: 30rpx 30rpx 20rpx 30rpx;
+					font-family: PingFang SC, PingFang SC;
+					font-weight: 500;
+					font-size: 30rpx;
+					color: #111;
+			}
+			&-unit {
+				font-size: 24rpx;
+			}
+			&-num {
+				font-size: 28rpx;
+			}
+		}
 		.points{
 			height: 88upx;
+			width: 100%;
 			padding: 0 30upx;
+			box-sizing: border-box;
 			background: #FFFFFF;
 			border-radius: 16upx;
-			 
 			display: flex;
 			align-items: center;
 			justify-content: space-between;
@@ -624,7 +756,6 @@
 			padding: 0 30upx;
 			background: #FFFFFF;
 			border-radius: 16upx;
-			margin-top: 20upx;
 			display: flex;
 			align-items: center;
 			input{
@@ -643,13 +774,20 @@
 		}
 	}
 	
+	.agreement {
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: red;
+		padding: 30rpx 0;
+	}
 	
 	.btn-foot{
 		box-sizing: border-box;
 		width: 100%;
 		height: 121upx;
 		background: #FFFFFF;
-		padding: 16upx 30upx 16upx 60upx;
+		padding: 16upx;
 		display: flex;
 		align-items: center;
 		justify-content: flex-end;
@@ -700,13 +838,13 @@
 				font-family: PingFang SC;
 				font-weight: bold;
 				color: #FFFFFF;
-				background: #2583EB;
+				background: #0bb3f2;
 				border-radius: 44upx;
 			}
 		}
 	}
-</style>
-<style lang="less" scoped>
+// </style>
+// <style lang="less" scoped>
 	.coupon {
 	  height: 100%;
 	}

+ 1 - 1
pages_shopping/confirmOrder.vue

@@ -186,7 +186,7 @@
 	import { getMyEnableCouponList } from './api/coupon'
 	 
 	import EvanSwitch from './components/evan-switch.vue'
-	import popupBottom from './components/px-popup-bottom.vue'
+	import popupBottom from '@/components/px-popup-bottom.vue'
 	
 	export default {
 		components: {

+ 3 - 3
pages_shopping/confirmPackageOrder.vue

@@ -125,7 +125,7 @@
 	import { getMyEnableCouponList } from '@/api/coupon'
 	 
 	import EvanSwitch from './components/evan-switch.vue'
-	import popupBottom from './components/px-popup-bottom.vue'
+	import popupBottom from '@/components/px-popup-bottom.vue'
 	export default {
 		components: {
 			EvanSwitch,
@@ -165,8 +165,8 @@
 			})
 			this.getWeixinTemps();
 		},
-		onShow() {
-			
+		onUnload() {
+			uni.$off('updateAddress')
 		},
 		methods: {
 			getWeixinTemps:function(){

+ 8 - 2
pages_shopping/paymentOrder.vue

@@ -112,7 +112,8 @@
 				<view class="item">
 					<text class="label">订单编号</text>
 					<view class="sn-box">
-						<view>
+						<view class="text" v-if="!combinationOrderId">{{orderCode}}</view>
+						<view v-else>
 							<view class="text" v-for="item in order.orderCodes" :key="item">{{item}}</view>
 						</view>
 						<view class="copy-btn" @click="copyOrderSn(orderCode)">复制</view>
@@ -234,7 +235,11 @@
 				
 			},
 			payTypeChange(e){
-				this.editPayType(e.detail.value)
+				if(this.combinationOrderId) {
+					this.editPayTypeByCombinationId(e.detail.value)
+				}else {
+					this.editPayType(e.detail.value)
+				}
 			},
 			copyOrderSn(text) {
 				// 复制方法
@@ -259,6 +264,7 @@
 							uni.hideLoading();
 							that.order=res.order;
 							that.payLimitTime=res.payLimitTime;
+							that.orderCode = res.order.orderCode
 							//套餐订单处理
 							if(res.productPackage!=null){
 								this.payType=res.productPackage.payType;

+ 11 - 12
pages_shopping/productDetails.vue

@@ -61,10 +61,10 @@
 				<view class="label">批准文号</view>
 				<view class="text">{{product.drugRegCertNo||'--'}}</view>
 			</view>
-		<!-- 	<view class="other-box-item">
-				<view class="label">生产厂家</view>
-				<view class="text">{{product.mah||'--'}}</view>
-			</view> -->
+			<view class="other-box-item" v-if="!_showTxt">
+				<view class="label">规格</view>
+				<view class="text">{{product.specification||'--'}}</view>
+			</view>
 			<view class="other-box-item">
 				<view class="label">商品条码</view>
 				<view class="text">{{product.barCode||'--'}}</view>
@@ -131,19 +131,19 @@
 			</view>
 			<view class="other-box product-other-box" style="margin: 0;padding: 24rpx 0;">
 				<view v-if="_showTxt&&product.medicalRegCertNo">
-					<text class="label" style="margin-right: 16rpx;">医疗器械注册证编号/备案凭证编号:</text>
+					<text class="label" style="margin-right: 16rpx;">【医疗器械注册证编号/备案凭证编号】</text>
 					<text class="text">{{product.medicalRegCertNo}}</text>
 				</view>
 				<view v-if="_showTxt&&product.prodLicenseNo">
-					<text class="label" style="margin-right: 16rpx;">生产许可证/备案凭证编号:</text>
+					<text class="label" style="margin-right: 16rpx;">【生产许可证/备案凭证编号】</text>
 					<text class="text">{{product.prodLicenseNo}}</text>
 				</view>
 				<view v-if="_showTxt&&product.prodTechReqNo">
-					<text class="label" style="margin-right: 16rpx;">产品技术要求编号:</text>
+					<text class="label" style="margin-right: 16rpx;">【产品技术要求编号】</text>
 					<text class="text">{{product.prodTechReqNo}}</text>
 				</view>
 				<view v-if="_showTxt&&product.productStructure">
-					<text class="label" style="margin-right: 16rpx;">结构及组成:</text>
+					<text class="label" style="margin-right: 16rpx;">【结构及组成】</text>
 					<text class="text">{{product.productStructure}}</text>
 				</view>
 				<view v-if="product.dosageForm&&!_showTxt">
@@ -302,7 +302,7 @@
 	import {getDicts} from '@/api/common.js'
 	import { getProductDetails, addCart,instructionsViewable } from './api/product.js'
 	import {selectCommentByUser} from '@/api/myStoreOrder.js'
-	import popupBottom from './components/px-popup-bottom.vue'
+	import popupBottom from '@/components/px-popup-bottom.vue'
 	import evaluateItem from '@/components/evaluateItem.vue'
 	export default {
 		components: {
@@ -529,8 +529,7 @@
 									}
 								}]
 								uni.navigateTo({
-									url: '/pages_shopping/confirmOrder?type=' + this.type + '&orderType=' +
-										this.orderType + '&confirmParam=' + encodeURIComponent(JSON.stringify(
+									url: '/pages_shopping/confirmOrder?type=' + this.type + '&confirmParam=' + encodeURIComponent(JSON.stringify(
 											selectCarts))
 								})
 							} else {
@@ -893,7 +892,7 @@
 			left: 0;
 			bottom: 0;
 			z-index: 9;
-			background-image: url(https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/black_mask.png);
+			background-image: url('https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/black_mask.png');
 			background-size: 20upx 44upx;
 			background-repeat: repeat-x;
 		}

+ 1 - 2
pages_shopping/productList.vue

@@ -103,7 +103,6 @@
 					empty: {
 						icon:'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/empty_icon.png',
 						tip: '暂无数据',
-						
 					},
 					textNoMore:"已经到底了",
 				},
@@ -182,7 +181,7 @@
 							title: "请求失败",
 						});
 						that.dataList = null;
-						mescroll.endErr();
+						that.mescroll.endErr();
 					}
 				});
 			},

+ 5 - 1
pages_shopping/success.vue

@@ -14,9 +14,12 @@
 				<view class="item">
 					<text class="label">订单编号</text>
 					<view class="sn-box">
-						<view>
+						<view v-if="order.orderCodes">
 							<view class="text" v-for="item in order.orderCodes" :key="item">{{item}}</view>
 						</view>
+						<view v-else>
+							<view class="text">{{orderCode}}</view>
+						</view>
 						<view class="copy-btn" @click="copyOrderSn(orderCode)">复制</view>
 					</view>
 				</view>
@@ -43,6 +46,7 @@
 		},
 		onLoad(option) {
 			this.order=JSON.parse(decodeURIComponent(option.order))
+			console.log(this.order)
 			// orderCodes和ids字段表示店铺订单
 			this.orderCode = this.order && this.order.orderCodes ? this.order.orderCodes.join(',') : this.order.orderCode || '';
 			this.ids = this.order && this.order.ids ? this.order.ids : this.order.id ?  [this.order.id] : [];

+ 1 - 1
pages_shopping/user/otherPaySuccess.vue

@@ -3,7 +3,7 @@
 		<view class="inner">
 			<view class="top">
 				<text class="title">支付成功</text>
-				<image class="icon" src="../../static/images/success.png" ></image>
+				<image class="icon" src="/static/images/success.png" ></image>
 				<view   class="btn-box">
 					<view class="btn cancel" @click="goBack()"> 返回首页</view>
 				</view>

+ 1 - 1
pages_user/agreement.vue

@@ -38,7 +38,7 @@ export default {
 	methods:{
 		getConfig(){
 			var that=this;
-			var data={key:"his.agreementConfig"}
+			var data={key:"his.agreementConfig",appId:wx.getAccountInfoSync().miniProgram.appId,}
 			getConfigByKey(data).then(
 				res => {
 					if(res.code==200){

+ 1 - 1
pages_user/cert.vue

@@ -25,7 +25,7 @@
 			},
 			getConfigByKey(){
 				var that=this;
-				var data={key:"his.certs"}
+				var data={key:"his.certs",appId:wx.getAccountInfoSync().miniProgram.appId,}
 				getConfigByKey(data).then(
 					res => {
 						if(res.code==200){

+ 3 - 0
pages_user/integralOrderPay.vue

@@ -103,6 +103,9 @@
 			this.getIntegralGoodsById();
 			this.getUserInfo();
 		},
+		onUnload() {
+			uni.$off('updateAddress')
+		},
 		methods: {
 			getUserInfo(){
 				getUserInfo().then(