Przeglądaj źródła

feat: 新增制单管理-分销管理模块

wenxingxing 12 godzin temu
rodzic
commit
4c44fb974f

+ 14 - 3
api/companyOrder.js

@@ -23,7 +23,18 @@ let request = new Request().http
  export function editOrderMoney(data) {
  export function editOrderMoney(data) {
  	 return request('/app/companyOrder/editOrderMoney',data,'GET' );
  	 return request('/app/companyOrder/editOrderMoney',data,'GET' );
  }
  }
+
+  //分销商品
+  export function getStoreProductList(data) {
+  	 return request('/app/storeProduct/list',data,'GET' );
+
+ }
+ //分销商品详情
+  export function getStoreProductDetail(data) {
+	  var info={
+		  companyId:data.companyId,
+		  companyUserId:data.companyUserId
+	  }
+  	 return request('/app/storeProduct/'+data.productId,info,'GET' );
  
  
-  
- 
- 
+ }

+ 2 - 2
api/storeProductPackage.js

@@ -2,11 +2,11 @@ import Request from '../common/request.js';
 let request = new Request().http
 let request = new Request().http
 
 
  export function getStoreProductPackage(data) {
  export function getStoreProductPackage(data) {
- 	 return request('/app/storeProductPackage/getStoreProductPackage',data,'GET');
+ 	 return request('/store/app/storeProductPackage/getStoreProductPackage',data,'GET');
  } 
  } 
  
  
  export function getStoreProductPackageDetails(data) {
  export function getStoreProductPackageDetails(data) {
- 	 return request('/app/storeProductPackage/getStoreProductPackageDetails',data,'GET');
+ 	 return request('/store/app/storeProductPackage/getStoreProductPackageDetails',data,'GET');
  } 
  } 
  
  
   
   

+ 25 - 0
pages.json

@@ -4226,6 +4226,31 @@
 					"style": {
 					"style": {
 						"navigationBarTitleText": "我的名片"
 						"navigationBarTitleText": "我的名片"
 					}
 					}
+				},
+				{
+					"path": "managerOrder/productList",
+					"style": {
+						"navigationBarTitleText": "商品列表",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "managerOrder/productDetails",
+					"style": {
+						"navigationBarTitleText": "商品详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "managerOrder/confirmOrder",
+					"style": {
+						"navigationBarTitleText": "提交订单",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
 				}
 				}
 			]
 			]
 		},
 		},

+ 4 - 7
pages/shopping/productDetails.vue

@@ -22,13 +22,10 @@
 		<view class="det-info">
 		<view class="det-info">
 			<view class="price-box">
 			<view class="price-box">
 				<view class="price">
 				<view class="price">
-					<text class="label" v-if="userinfo.isShow==1&&isuser==false">会员价</text>
-					<text class="label" v-else>零售价</text>
-					<text class="unit">¥</text>
-					<text class="num" v-if="userinfo.isShow==1&&isuser==false">{{product.price}}</text>
-					<text class="num" v-else>{{product.otPrice}}</text>
-					<text class="label" v-if="userinfo.isShow==1&&isuser==false">零售价</text>
-					<text class="old" v-if="userinfo.isShow==1&&isuser==false">¥{{product.otPrice}}</text>
+					<text class="label">会员价</text>
+					<text class="num">{{product.price}}</text>
+					<text class="label">零售价</text>
+					<text class="old">¥{{product.otPrice}}</text>
 				</view>
 				</view>
 				<!-- <view class="share-box" v-if="userinfo.isShow==1&&isuser==false">
 				<!-- <view class="share-box" v-if="userinfo.isShow==1&&isuser==false">
 					<text class="text">分享</text>
 					<text class="text">分享</text>

+ 1 - 1
pages_company/auth/login.vue

@@ -55,7 +55,7 @@ export default {
 					 // uni.navigateBack({
 					 // uni.navigateBack({
 						// delta:1,//返回层数,2则上上页
 						// delta:1,//返回层数,2则上上页
 					 // })
 					 // })
-					 uni.navigateTo({
+					 uni.redirectTo({
 					 	url: '/pages_company/index'
 					 	url: '/pages_company/index'
 					 }) 
 					 }) 
 	 				
 	 				

+ 15 - 8
pages_company/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
 	<view class="top-cont">
 	<view class="top-cont">
 		<view class="content">
 		<view class="content">
-			<view class="user-info">
+			<view v-if="user" class="user-info">
 				<view class="left">
 				<view class="left">
 					<view class="name-phone">
 					<view class="name-phone">
 						<view class="name">{{user.nickName}}</view>
 						<view class="name">{{user.nickName}}</view>
@@ -16,11 +16,11 @@
 			<view class="used-tools">
 			<view class="used-tools">
 				<view class="title">常用工具</view>
 				<view class="title">常用工具</view>
 				<view class="tools-list">
 				<view class="tools-list">
-					<view class="item" @click="toCreateOrder()">
+					<view v-if="false" class="item" @click="toCreateOrder()">
 						<image src="https://zkzh-2025.oss-cn-beijing.aliyuncs.com/shop/images/order.png" mode=""></image>
 						<image src="https://zkzh-2025.oss-cn-beijing.aliyuncs.com/shop/images/order.png" mode=""></image>
 						<text class="text">商品制单</text>
 						<text class="text">商品制单</text>
 					</view>
 					</view>
-					<view class="item" @click="toCreateCoupon()">
+					<view v-if="false" class="item" @click="toCreateCoupon()">
 						<image src="https://zkzh-2025.oss-cn-beijing.aliyuncs.com/shop/images/icon_coupon.png" mode=""></image>
 						<image src="https://zkzh-2025.oss-cn-beijing.aliyuncs.com/shop/images/icon_coupon.png" mode=""></image>
 						<text class="text">制单优惠券</text>
 						<text class="text">制单优惠券</text>
 					</view>
 					</view>
@@ -40,7 +40,11 @@
 						<image src="https://zkzh-2025.oss-cn-beijing.aliyuncs.com/shop/images/package.png" mode=""></image>
 						<image src="https://zkzh-2025.oss-cn-beijing.aliyuncs.com/shop/images/package.png" mode=""></image>
 						<text class="text">商品套餐</text>
 						<text class="text">商品套餐</text>
 					</view>
 					</view>
-					<view class="item" @click="toCoupon()">
+					<view class="item" @click="toDistributionPage()">
+						<image src="https://zkzh-2025.oss-cn-beijing.aliyuncs.com/shop/images/order.png" mode=""></image>
+						<text class="text">分销管理</text>
+					</view>
+					<view v-if="false" class="item" @click="toCoupon()">
 						<image src="https://zkzh-2025.oss-cn-beijing.aliyuncs.com/shop/images/icon_coupon.png" mode=""></image>
 						<image src="https://zkzh-2025.oss-cn-beijing.aliyuncs.com/shop/images/icon_coupon.png" mode=""></image>
 						<text class="text">套餐优惠券</text>
 						<text class="text">套餐优惠券</text>
 					</view>
 					</view>
@@ -73,6 +77,11 @@
 			this.getUserInfo()
 			this.getUserInfo()
 		},
 		},
 		methods: {
 		methods: {
+			toDistributionPage() {
+				uni.navigateTo({
+					url: '/pages_company/managerOrder/productList?companyId=' + this.user.companyId + "&companyUserId=" + this.user.userId
+				})
+			},
 			toPaywechat(){
 			toPaywechat(){
 				uni.navigateTo({
 				uni.navigateTo({
 					url:'/pages_company/wechatcode?companyId='+this.user.companyId
 					url:'/pages_company/wechatcode?companyId='+this.user.companyId
@@ -167,9 +176,7 @@
 			 		success:res=>{
 			 		success:res=>{
 			 			if(res.confirm){
 			 			if(res.confirm){
 			 				uni.setStorageSync('CompanyUserToken',null);
 			 				uni.setStorageSync('CompanyUserToken',null);
-			 				uni.navigateBack({
-			 					delta:-1
-			 				})							
+			 				uni.navigateBack()							
 			 			}else{
 			 			}else{
 			 			}
 			 			}
 			 		}
 			 		}
@@ -237,7 +244,7 @@
 			.msg-box{
 			.msg-box{
 				padding: 5rpx 15upx;
 				padding: 5rpx 15upx;
 				height: 30upx;
 				height: 30upx;
-				line-height: 30upx;
+				line-height: 20upx;
 				font-size: 22upx;
 				font-size: 22upx;
 				font-family: PingFang SC;
 				font-family: PingFang SC;
 				font-weight: 500;
 				font-weight: 500;

+ 453 - 0
pages_company/managerOrder/cart.vue

@@ -0,0 +1,453 @@
+<template>
+	<view class="content">
+		<!-- 商品列表 -->
+		<view class="goods-list">
+			<view class="item" v-for="(item,index) in carts" :key="index">
+				<label style="margin-right: 30upx;">
+					<checkbox :value="item.checked"  :checked="item.checked" @click="checkChange(item)" />
+				</label>
+				<image class="goods-img" :src="item.productAttrImage==null||item.productAttrImage==''?item.productImage:item.productAttrImage" mode="aspectFit"></image>
+				<view class="info-box">
+					<view>
+						<view class="title-box">
+							<!-- <view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view> -->
+							<view class="title ellipsis">{{ 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">
+							<view class="img-box" @click="delNum(item)">
+								<image v-if="item.cartNum <= 1" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/jian.png" mode=""></image>
+								<image v-else src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/jian2.png" mode=""></image>
+							</view>
+							<input type="text"  @change="changeNum($event,item)" :value="item.cartNum"   />
+							<view class="img-box" @click="addNum(item)">
+								<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/add.png" mode=""></image>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="left">
+				<label>
+					<checkbox  :checked="checkAll" @click="handleCheckAll()" />
+				</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 {getCarts,cartNum,delCart} from '@/api/product'
+	import {createSalesOrder} from '@/api/companyOrder.js'
+	export default {
+		 
+		data() {
+			return {
+				totalMoney:0.00,
+				carts:[],
+				checkAll:false,
+			}	
+		},
+		onLoad() {
+			this.getCarts();
+ 
+		},
+		 
+		methods: {
+			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
+				}
+				if(item.cartNum>=item.stock){
+					item.cartNum=item.stock;
+				}
+				this.changeCartNum(item)
+			},
+			delCart(){
+				var selectCarts=this.carts.filter(ele => ele.checked==true).map(ele => {
+				  return ele.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 => {}
+				);
+				console.log(selectCarts)
+			},
+			computedMoney(){
+				var money=0;
+				var that=this;
+				this.carts.forEach((item,index,arr)=>{
+					 if(item.checked){
+						 money+=item.price*item.cartNum;
+					 }
+				})
+				console.log(money);
+				this.totalMoney=money;
+			},
+			handleCheckAll(){
+				this.checkAll=!this.checkAll;
+				var that=this;
+				this.carts.forEach((item,index,arr)=>{
+				     item.checked=that.checkAll;
+				})
+				this.computedMoney();
+			},
+			checkChange(item){
+				item.checked=!item.checked;
+				this.computedMoney();
+			},
+			changeCartNum(item){
+				let data = {number:item.cartNum,id:item.id};
+				cartNum(data).then(
+					res => {
+						if(res.code==200){
+							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,index,arr)=>{
+							      item.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){
+					item.cartNum=item.stock;
+				}
+				this.changeCartNum(item)
+			},
+			// 结算
+			submit() {
+				var selectCarts=this.carts.filter(ele => ele.checked==true).map(ele => {
+				  return ele.id
+				});
+				if(selectCarts.length==0){
+					uni.showToast({
+						icon:'none',
+						title: "请选择商品",
+					});
+					return;
+				}
+				var data={token:uni.getStorageSync('CompanyUserToken'),cateIds:selectCarts.toString()}
+				createSalesOrder(data).then(
+					res => {
+						if(res.code==200){
+							uni.navigateTo({
+								url: './confirmCompanyOrder?orderKey='+res.orderKey
+							})
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+	.content{
+		height: 100%;
+		padding: 20upx;
+		.goods-list{
+			padding-bottom: 120upx;
+			.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%, #FF233C 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;
+						}
+					}
+					.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;
+							}
+						}
+					}
+				}
+			}
+		}
+		.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: #FF233C;
+					border-radius: 44upx;
+				}
+			}
+		}
+	}
+</style>

+ 157 - 0
pages_company/managerOrder/components/GoodsCard.vue

@@ -0,0 +1,157 @@
+<template>
+	<view class="goods-card" @click="showProduct(item)">
+		<view class="img-wrap">
+			<image class="img" :src="item.image" mode="aspectFill"></image>
+			<view class="tag-row" v-if="tagList && tagList.length > 0">
+				<text class="tag-chip" v-for="(t, i) in tagList" :key="i">{{ t }}</text>
+			</view>
+		</view>
+		<view class="info">
+			<view class="title line2">{{ item.productName }}</view>
+			<view class="x-bc">
+				<view class="price-row">
+					<text class="unit"v-if="showPrice">¥</text>
+					<text class="price" v-if="showPrice">{{item.price != null ? item.price : item.payPrice || 0 }}</text>
+					<text class="ot-price" v-if="item.otPrice != null">原价¥{{item.otPrice }}</text>
+				</view>
+				<view class="meta-row" v-if="item.sales != null || item.positiveRating != null">
+					<text class="sales" v-if="item.sales != null">已售{{ item.sales }}</text>
+					<text v-if="item.positiveRating">I</text>
+					<text class="good-rate" v-if="item.positiveRating != null">好评{{ item.positiveRating }}%</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'GoodsCard',
+	props: {
+		item: { type: Object, required: true },
+		showPrice: { type: Boolean, default: true },
+		defaultImg: {
+			type: String,
+			default: 'https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/no-img.png'
+		}
+	},
+	computed: {
+		tagList() {
+			const item = this.item
+			if (!item) return []
+			if (Array.isArray(item.tagList)) return item.tagList
+			if (Array.isArray(item.tagNames)) return item.tagNames
+			if (Array.isArray(item.tags)) return item.tags.map(t => typeof t === 'string' ? t : (t.tagName || t.name))
+			if (item.tag) return [item.tag]
+			return []
+		}
+	},
+	methods:{
+		showProduct(item) {
+			this.$emit('goPage',item)
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.goods-card {
+	width: 100%;
+	background: #fff;
+	border-radius: 16rpx;
+	overflow: hidden;
+	box-sizing: border-box;
+	display: flex;
+	flex-direction:column;
+	align-items: stretch;
+}
+.img-wrap {
+	width: 100%;
+	height: 394rpx;
+	flex-shrink: 0;
+	background: #f5f5f5;
+	position: relative;
+}
+.img {
+	width: 100%;
+	height: 100%;
+}
+.info {
+	flex: 1;
+	padding: 20rpx;
+	display: flex;
+	flex-direction: column;
+	justify-content: space-between;
+	min-width: 0;
+}
+.tag-row {
+	position: absolute;
+	bottom:0;
+	display: flex;
+	flex-wrap: wrap;
+	gap: 12rpx;
+	padding: 0 12rpx;
+	margin-bottom: 12rpx;
+}
+.tag-chip {
+	font-family: PingFangSC, PingFang SC;
+	font-weight: 400;
+	font-size: 30rpx;
+	color: #AA4726;
+	line-height: 42rpx;
+	background: #FFF4F1;
+	padding: 4rpx 12rpx;
+	border-radius: 6rpx;
+}
+.title {
+	font-family: PingFangSC, PingFang SC;
+	font-weight: 500;
+	font-size: 36rpx;
+	color: rgba(0,0,0,0.85);
+	line-height: 50rpx;
+}
+.line2 {
+	display: -webkit-box;
+	-webkit-line-clamp: 1;
+	-webkit-box-orient: vertical;
+	overflow: hidden;
+}
+.price-row {
+	display: flex;
+	align-items: baseline;
+	gap: 12rpx;
+	margin-top: 8rpx;
+}
+.unit{
+	font-weight: 600;
+	font-size: 28rpx;
+	color: #FF233C;
+}
+.price {
+	font-size: 44rpx;
+	font-weight: 600;
+	color: #FF233C;
+}
+.ot-price {
+	font-size: 28rpx;
+	color: #999;
+	text-decoration: line-through;
+}
+.meta-row {
+	display: flex;
+	align-items: center;
+	gap: 8rpx;
+	margin-top: 8rpx;
+	font-size: 28rpx;
+	color: #999;
+}
+// .sales,
+// .good-rate {
+// 	font-size: 28rpx;
+// 	color: #999;
+// }
+.sales{
+	// border-right: 1rpx solid #e5e5e5; /* 右侧竖线 */
+	// padding-right: 14rpx; /* 竖线与文字的间距 */
+}
+</style>

+ 67 - 0
pages_company/managerOrder/components/GoodsList.vue

@@ -0,0 +1,67 @@
+<template>
+	<view class="goods-list">
+		<view class="list-column" v-if="list && list.length > 0">
+			<view class="list-item" v-for="(item, index) in list" :key="item.productId">
+				<GoodsCard :item="item" :show-price="showPrice" @click="$emit('itemClick', item)" />
+			</view>
+		</view>
+		<view class="empty" v-else-if="!loading">
+			<text class="empty-text">暂无商品</text>
+		</view>
+		<view class="loading" v-if="loading">
+			<text class="loading-text">加载中...</text>
+		</view>
+		<view class="load-more" v-if="hasMore && !loading && list.length > 0" @click="$emit('loadMore')">
+			<text>加载更多</text>
+		</view>
+	</view>
+</template>
+
+<script>
+import GoodsCard from './GoodsCard.vue';
+export default {
+	name: 'GoodsList',
+	components: { GoodsCard },
+	props: {
+		list: { type: Array, default: () => [] },
+		loading: { type: Boolean, default: false },
+		hasMore: { type: Boolean, default: true },
+		showPrice: { type: Boolean, default: true }
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.goods-list {
+	padding: 24rpx;
+	background: #f5f5f5;
+	min-height: 400rpx;
+	padding-bottom: 120rpx;
+}
+.list-column {
+	display: flex;
+	flex-direction: column;
+	gap: 24rpx;
+}
+.list-item {
+	width: 100%;
+}
+.empty,
+.loading {
+	padding: 80rpx 0;
+	text-align: center;
+}
+.empty-text,
+.loading-text {
+	font-size: 28rpx;
+	color: #999;
+}
+.load-more {
+	padding: 32rpx 0;
+	text-align: center;
+}
+.load-more text {
+	font-size: 28rpx;
+	color: #FF233C;
+}
+</style>

+ 121 - 0
pages_company/managerOrder/components/SearchBar.vue

@@ -0,0 +1,121 @@
+<template>
+	<view class="search-bar" :style="{ background:`url(${bgColor})` }">
+		<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
+		<!-- <view class="top-title">
+			<view class="name">{{ title }}</view>
+		</view> -->
+		<view class="func-cont" :style="{marginTop: marginTop}">
+			<view class="search-cont" :style="{ width: searchWidth }" @click="$emit('searchClick')">
+				<image class="icon-search" :src="searchIcon" mode=""></image>
+				<input type="text" :value="keyword" :placeholder="placeholder" placeholder-class="placeholder"
+					disabled />
+			</view>
+			<!-- <uni-badge size="small" :text="cartCount" absolute="rightTop" type="error" v-show="cartCount > 0">
+				<view class="img-item" @click="$emit('cartClick')">
+					<image :src="cartIcon" mode=""></image>
+				</view>
+			</uni-badge>
+			<view class="img-item" v-show="cartCount <= 0" @click="$emit('cartClick')">
+				<image :src="cartIcon" mode=""></image>
+			</view>
+			<view class="img-item" style="position: relative;">
+				<image :src="serviceIcon" mode=""></image>
+				<button class="contact-btn" open-type="contact"></button>
+			</view> -->
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'SearchBar',
+	props: {
+		title: { type: String, default: '岚财良品' },
+		keyword: { type: String, default: '' },
+		placeholder: { type: String, default: '请输入产品名称' },
+		bgColor: { type: String, default: 'rgba(43,199,185, 0)' },
+		statusBarHeight: { type: Number, default: 20 },
+		cartCount: { type: Number, default: 0 },
+		searchWidth: { type: String, default: '' },
+		marginTop:{ type: String, default: '' },
+		searchIcon: {
+			type: String,
+			// default: 'https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/search.png',
+			default: '/static/images/search.png'
+		},
+		cartIcon: {
+			type: String,
+			default: 'https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/cart_wihte.png'
+		},
+		serviceIcon: {
+			type: String,
+			default: 'https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/customer.png'
+		}
+	}
+};
+</script>
+<style lang="stylus">
+	.placeholder{
+		color: rgba(0,0,0,0.25) !important;
+	}
+</style>
+<style lang="scss" scoped>
+.search-bar {
+	position: fixed;
+	top: 0;
+	left: 0;
+	right: 0;
+	z-index: 10000;
+}
+.top-title .name {
+	font-size: 36rpx;
+	font-weight: bold;
+	color: #fff;
+	padding: 20rpx 0;
+}
+.func-cont {
+	display: flex;
+	align-items: center;
+	padding: 0 24rpx 20rpx;
+}
+.search-cont {
+	display: flex;
+	align-items: center;
+	height: 64rpx;
+	background: rgba(255,255,255,0.5);
+	border-radius: 38rpx;
+	padding: 0 24rpx;
+	// flex: 1;
+	margin-right: 20rpx;
+}
+.icon-search {
+	width: 44rpx;
+	height: 44rpx;
+	margin-right: 16rpx;
+}
+.search-cont input {
+	flex: 1;
+	font-family: PingFangSC, PingFang SC;
+	font-weight: 400;
+	font-size: 32rpx;
+	color: rgba(0,0,0,0.25);
+	line-height: 44rpx;
+}
+.img-item {
+	width: 48rpx;
+	height: 48rpx;
+	margin-left: 24rpx;
+}
+.img-item image {
+	width: 100%;
+	height: 100%;
+}
+.contact-btn {
+	position: absolute;
+	top: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+	opacity: 0;
+}
+</style>

+ 446 - 0
pages_company/managerOrder/confirmCompanyOrder.vue

@@ -0,0 +1,446 @@
+<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">{{utils.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" />
+			<!-- <input type="text" v-model="payAmount" placeholder="请输入货到付款金额" class="intxt pay_type" maxlength="8" /> -->
+		</modal>
+	</view>
+</template>
+
+<script>
+	import {getSalesOrder,addUserCart,updateSalseOrderMoney} from '@/api/companyOrder.js'
+	export default {
+		data() {
+			return {
+				inputShow:false,
+				inputTxt:null,
+				orderKey:null,
+				price:{
+					payPrice:0.00,
+					totalPrice:0.00,
+				},
+				carts:[],
+				isAgreement:false,
+				payAmount:null
+			}
+		},
+		onLoad(option) {
+			this.orderKey=option.orderKey;
+			this.getSalesOrder();
+			 
+		},
+		//发送给朋友
+		onShareAppMessage(res) {
+			return {
+				title: "岚财良品-您的专属解决方案",
+				path: '/pages_company/order/confirmOrder?orderKey='+this.orderKey,
+				imageUrl: 'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/share.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+			}
+			
+		},
+		//分享到朋友圈
+		onShareTimeline(res) {
+			return {
+				title:"岚财良品-您的专属解决方案",
+				query:'orderKey='+this.orderKey,
+				imageUrl:  'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/share.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+			}
+		},
+		methods: {
+			handleAgreement(){
+				this.isAgreement=!this.isAgreement
+			},
+			openUpdateMoney(){
+				console.log(1)
+				this.inputShow = true
+			},
+			cancelUpdateMoney(){
+				this.inputShow = false
+			},
+			confirmUpdateMoney(){
+				console.log(parseFloat(this.inputTxt) )
+				console.log(parseFloat(this.payAmount) )
+				if(parseFloat(this.inputTxt)>0||parseFloat(this.payAmount)>0){
+					var that=this;
+					if(this.inputTxt==0){
+						this.inputTxt=this.price.totalPrice.toFixed(2)
+					}
+					// ,payAmount:this.payAmount
+					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 => {}
+					);
+					
+				}
+				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.payPrice+=element.price*element.cartNum;
+							});
+							that.price.totalPrice=res.totalMoney
+							 
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			 
+		}
+	}
+</script>
+
+<style lang="scss">
+	.pay_type{
+		margin-top: 20rpx;
+	}
+	.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%, #FF233C 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: #FF233C;
+				border-radius: 44upx;
+				position: relative;
+				.share{
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%rpx;
+					opacity: 0;
+				}
+			}
+		}
+	}
+</style>
+ 

+ 893 - 0
pages_company/managerOrder/confirmOrder.vue

@@ -0,0 +1,893 @@
+<template>
+	<view>
+		<view class="inner-box">
+			<!-- 收货人 -->
+			<view class="address-box" v-if="address==null" @click="openAddress()">
+				<view class="left">
+					<view class="name-box">
+						<text class="text name">添加收货地址</text>
+					</view>
+					</vie>
+				</view>
+				<view class="arrow-box">
+					<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/arrow_gray.png"
+						mode=""></image>
+				</view>
+			</view>
+			<view class="address-box" v-if="address!=null" @click="openAddress()">
+				<view class="left">
+					<view class="name-box">
+						<text class="text name">{{address.realName}}</text>
+						<text class="text" v-if="address.phone!=null">{{utils.parsePhone(address.phone)}}</text>
+					</view>
+					<view class="address">
+						{{address.province}}{{address.city}}{{address.district}}{{address.detail}}
+					</view>
+				</view>
+				<view class="arrow-box">
+					<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/arrow_gray.png"
+						mode=""></image>
+				</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||item.productImage" mode="aspectFill"></image>
+					</view>
+					<view class="info-box">
+						<view>
+							<view class="name-box ellipsis2">
+								<!-- <view class="tag">{{utils.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 class="points">
+				<view class="left">
+					<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/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="#FF233C"
+						inactiveColor="rgba(0, 0, 0, 0.1)"></evan-switch>
+				</view>
+			</view>
+			<view class="points" @click="openCoupon()">
+				<view class="left">
+					<text class="text">优惠券</text>
+				</view>
+				<view class="right">
+					<text class="text">{{couponText}}</text>
+					<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/arrow4.png" mode="">
+					</image>
+				</view>
+			</view>
+			<view class="points">
+				<view class="left">
+					<text class="text">运费</text>
+				</view>
+				<view class="right">
+					<text
+						class="text">{{price.payPostage==null||price.payPostage==0?'免运费':price.payPostage.toFixed(2)}}</text>
+				</view>
+			</view>
+			<!-- 备注 -->
+			<view class="remarks">
+				<input type="text" v-model="form.mark" placeholder="备注留言(选填)" placeholder-class="input" />
+			</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">提交订单</view>
+			</view>
+		</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">
+							<image v-if="item.status==0" class="img"
+								src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/coupon1.png"
+								mode="widthFix"></image>
+							<image v-if="item.status!=0" class="img"
+								src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/coupon2.png"
+								mode="widthFix"></image>
+							<div 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">
+								{{ 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 v-if="couponsList.length == 0" class="no-data-box">
+					<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/no_data.png"
+						mode="aspectFit"></image>
+					<view class="empty-title">暂无数据</view>
+				</view>
+			</view>
+
+		</popupBottom>
+	</view>
+</template>
+
+<script>
+	import {
+		getWeixinOrderTemps
+	} from '@/api/common'
+
+	import {
+		confirm,
+		computed,
+		create
+	} from '@/api/storeOrder'
+	import {
+		getMyEnableCouponList
+	} from '@/api/coupon'
+
+	import EvanSwitch from '@/components/evan-switch/evan-switch.vue'
+	import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
+
+	export default {
+		components: {
+			EvanSwitch,
+			popupBottom
+		},
+		data() {
+			return {
+				temps: [],
+				couponUserId: null,
+				couponText: "请选择",
+				couponsList: [],
+				couponVisible: false,
+				price: {
+					payPrice: 0,
+					totalPostage: 0,
+					usedIntegral: 0,
+					totalPrice: 0.00,
+				},
+				address: null,
+				carts: [],
+				checked: false,
+				type: null,
+				cartIds: null,
+				storeId: null,
+				form: {
+					useIntegral: 0,
+					orderKey: null,
+					addressId: null,
+					mark: null,
+					companyId: null,
+					companyUserId: null
+				},
+				courseId:null
+
+			}
+		},
+		onLoad(option) {
+			console.log("确认订单option是", option)
+			this.form.companyId = option.companyId;
+			this.form.companyUserId = option.companyUserId;
+			this.cartIds = option.cartIds;
+			this.type = option.type;
+			this.storeId = option.storeId;
+			this.courseId = option.courseId
+			this.confirm();
+			uni.$on('updateAddress', (e) => {
+				this.address = e;
+				this.form.addressId = e.id;
+				this.computed();
+			})
+			this.getWeixinOrderTemps();
+		},
+		onUnload() {
+			uni.$off('updateAddress')
+		},
+		methods: {
+			getWeixinOrderTemps: function() {
+				getWeixinOrderTemps().then(
+					res => {
+						if (res.code == 200) {
+							this.temps = res.temp
+							console.log(this.temps)
+						} else {
+
+						}
+					},
+					rej => {}
+				);
+			},
+			couponSelect(item) {
+				this.couponText = "-¥" + item.couponPrice.toFixed(2);
+				this.couponUserId = item.id;
+				this.couponVisible = false;
+				this.computed();
+			},
+			openCoupon() {
+				let that = this;
+				var data = {
+					couponType: 0,
+					useMinPrice: this.price.payPrice
+				};
+				getMyEnableCouponList(data).then(res => {
+					this.couponVisible = true;
+					that.couponsList = res.data
+				})
+			},
+			integralChange(e) {
+				console.log(e)
+				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 => {}
+				);
+			},
+			computed(item) {
+				let data = {
+					couponUserId: this.couponUserId,
+					orderKey: this.form.orderKey,
+					addressId: this.form.addressId,
+					useIntegral: this.form.useIntegral
+				};
+				computed(data).then(
+					res => {
+						if (res.code == 200) {
+							console.log(res)
+							this.price = res.data
+
+						} else {
+							if (res.code == 501) {
+								uni.showToast({
+									icon: 'none',
+									title: res.msg,
+								});
+								setTimeout(function() {
+									uni.navigateBack({
+										delta: 1
+									})
+								}, 500);
+								return;
+							} else {
+								uni.showToast({
+									icon: 'none',
+									title: res.msg,
+								});
+							}
+
+						}
+					},
+					rej => {}
+				);
+			},
+			// 提交订单
+			submitOrder() {
+				var that = this;
+				if (this.form.orderKey == null) {
+					uni.showToast({
+						icon: 'none',
+						title: '订单KEY不存在',
+					});
+					return;
+				}
+				if (this.form.addressId == null) {
+					uni.showToast({
+						icon: 'none',
+						title: '收货地址不能为空',
+					});
+					return;
+				}
+
+				uni.requestSubscribeMessage({
+					tmplIds: this.temps,
+					success(res) {
+						that.createOrder();
+					},
+					fail(res) {
+						that.createOrder();
+					}
+				})
+
+			},
+			createOrder() {
+				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: this.form.mark,
+						orderKey: this.form.orderKey,
+						addressId: this.form.addressId,
+						useIntegral: this.form.useIntegral,
+						payType: 1
+					};
+				} else {
+					data = {
+						orderCreateType: 1,
+						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
+					};
+				}
+				if (this.storeId != null && this.storeId > 0) {
+					data.storeId = this.storeId;
+				}
+				var urlInfo = uni.getStorageSync('urlInfo')
+				console.log('this.isCourse',this.courseId)
+				if(this.courseId!=null && this.courseId > 0){
+					data.courseId=urlInfo.courseId
+					data.videoId=urlInfo.videoId
+					data.periodId = urlInfo.periodId
+					data.projectId = urlInfo.projectId
+					data.companyUserId=urlInfo.companyUserId
+					data.companyId=urlInfo.companyId
+					data.orderType=3
+				}
+				uni.hideLoading()
+				create(data).then(
+					res => {
+						uni.hideLoading()
+						if (res.code == 200) {
+							uni.hideLoading()
+							if (res.order.isPrescribe == 1) {
+								setTimeout(function() {
+									uni.redirectTo({
+										url: "prescribe?orderId=" + res.order.id
+									})
+								}, 200);
+							} else {
+								// try {
+								// 	const urlInfo = uni.getStorageSync('urlInfo') || {};
+								// 	if (urlInfo.videoId) {
+								// 		uni.setStorageSync('videovip_myPurchase_' + urlInfo.videoId, {
+								// 			ts: Date.now()
+								// 		});
+								// 	}
+								// } catch (e) {}
+								setTimeout(function() {
+									uni.redirectTo({
+										url: './paymentOrder?orderId=' + res.order.id
+									})
+								}, 200);
+							}
+							return;
+						} else {
+							if (res.code == 501) {
+								uni.showToast({
+									icon: 'none',
+									title: res.msg,
+								});
+								setTimeout(function() {
+									uni.navigateBack({
+										delta: 1
+									})
+								}, 200);
+								return;
+							} else {
+								uni.showToast({
+									icon: 'none',
+									title: res.msg,
+								});
+							}
+						}
+					},
+					rej => {}
+				);
+			},
+			openAddress() {
+				uni.navigateTo({
+					url: '/pages_user/user/address'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.inner-box {
+		padding: 20upx 20upx 140upx;
+
+		.address-box {
+			box-sizing: border-box;
+			min-height: 171upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			background-image: url("https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/address_bg.png");
+			background-repeat: no-repeat;
+			background-size: 100% 30upx;
+			background-position: left bottom;
+			padding: 38upx 30upx 36upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+
+			.left {
+				width: 92%;
+
+				.name-box {
+					display: flex;
+					align-items: center;
+
+					.text {
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #111111;
+						line-height: 1;
+
+						&.name {
+							margin-right: 30upx;
+						}
+					}
+				}
+
+				.address {
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 42upx;
+					text-align: left;
+					margin-top: 23upx;
+				}
+			}
+
+			.arrow-box {
+				width: 12upx;
+				height: 23upx;
+				display: flex;
+				align-items: cenetr;
+				justify-content: cenetr;
+
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+
+		.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%, #FF233C 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 16upx 60upx;
+		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: 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: 50upx;
+						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: #FF233C;
+				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;
+	}
+</style>

+ 351 - 0
pages_company/managerOrder/coupon.vue

@@ -0,0 +1,351 @@
+<template>
+  <view ref="container">
+    <view class="tui-coupon-list">
+      <view class="tui-coupon-item tui-top20" v-for="(item, index) in couponsList" :key="index">
+         <image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/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="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/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 {
+	limit: 10,
+		couponsList: [],
+		loading: false,
+		loadend: false,
+		page: 1,
+		limit: 10,
+    }
+  },
+  onLoad(options) {
+  },
+  mounted: function() {
+    
+  },
+  onShow() {
+  	this.getCompanyCouponIssueList()
+  },
+  onReachBottom() {
+    !this.loading && this.getCompanyCouponIssueList()
+  },
+  methods: {
+    show(item){
+		uni.navigateTo({
+			url: '../couponDetails?id=' +item.id
+		})
+	},
+    getCompanyCouponIssueList() {
+      if (this.loading) return //阻止下次请求(false可以进行请求);
+      if (this.loadend) return //阻止结束当前请求(false可以进行请求);
+      this.loading = true
+      let 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);
+}
+.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: #FF233C;
+			background: #F5FFFE;
+			border: 1px solid #8AD5CE;
+			border-radius: 32upx;
+			margin: 0 20upx 20upx 0;
+			&.active{
+				color: #FFFFFF;
+				background: #FF233C;
+				border: 1px solid #FF233C;
+			}
+		}
+	}
+}
+.tui-coupon-list {
+	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: 70rpx;
+  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>

+ 1369 - 0
pages_company/managerOrder/productDetails.vue

@@ -0,0 +1,1369 @@
+<template>
+	<view class="content">
+		<!-- 商品轮播图片 -->
+		<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>
+					<!-- <view class="cf-box" v-if="product.productType==2">
+						<view class="title">处方药</view>
+						<view class="subTitle">请在医师指导下使用</view>
+					</view> -->
+				</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">会员价</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>
+					<u-icon name="share-fill" color="#FF233C" size="18"></u-icon>
+				</view>
+			</view>
+			<view class="name-box">
+				<!-- <view class="tag">{{utils.getDictLabelName("storeProductType",product.productType)}}</view> -->
+				{{product.productName}}
+			</view>
+			<view class="intro" v-if="product.productInfo!=null" v-html="product.productInfo.replace(/\n/g,'<br>')">
+			</view>
+			<!-- <view class="safe-box">
+				<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/safe.png" mode=""></image>
+				<text class="text" v-if="userinfo.isShow==1&&isuser==false">免邮发货</text>
+				<view class="line" v-if="userinfo.isShow==1&&isuser==false"></view>
+				<view class="line"></view>
+				<text class="text">药师服务</text>
+				<view class="line"></view>
+				<text class="text">隐私保护</text>
+			</view> -->
+		</view>
+		<!-- 购买人数、库存 -->
+		<view class="inventor" v-if="userinfo.isShow==1&&isuser==false">
+			<view class="left">
+				<!-- <view class="head-box">
+					<view class="head" v-for="(item,j) in 5" :key="j">
+						<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/head.jpg" mode=""></image>
+					</view>
+				</view> -->
+				<view class="num-box">
+					已有 <text class="text">{{product.sales}}</text> 人购买
+					<view v-if=" purchaseLimit > 0" class="limit-text">
+						 限购{{purchaseLimit}}件<text v-if="remainingPurchaseLimit !== null && remainingPurchaseLimit >= 0">,已购{{purchaseLimit - remainingPurchaseLimit}}件</text>
+					</view> 
+				</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">
+			<view class="label">产品说明书</view>
+			<view class="label">查看</view>
+			
+		</view> -->
+		<!-- 图文详情 -->
+		<view class="det-box">
+			<view class="title">图文详情</view>
+			<view class="inner">
+				<view v-html="product.description" style="font-size:0"></view>
+			</view>
+		</view>
+		<!-- 底部按钮 -->
+		<!-- userinfo.isShow==1&& -->
+		<view class="btn-foot" >
+			<view class="menu-box" v-if="isuser==false">
+				<view class="item" @click="goHome">
+					<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/back_home.png"
+						mode=""></image>
+					<text class="label">首页</text>
+				</view>
+				<view v-if="false" class="item" style="position: relative;">
+					<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/consult_small.png"
+						mode=""></image>
+					<text class="label">咨询</text>
+					<button class="contact-btn" open-type="contact"></button>
+				</view>
+				<!-- <view class="item" @click="toCart('./cart')">
+					<uni-badge size="small" :text="cartCount" absolute="rightTop" type="error">
+						<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/cart36.png"
+							mode=""></image>
+					</uni-badge>
+					<text class="label">购物车</text>
+				</view> -->
+			</view>
+			<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 form-item" v-if="stores.length>0">
+					<text class="label">所属门店</text> 
+					<picker  class="birth-picker"  mode="selector" :value="storeIdx" :range="storeNames" @change="pickerChange"  @columnchange="pickerColumnchange">
+						<view class="right-box">
+							<view class="input-box">
+								<input type="text" v-model="storeName" placeholder="请选择门店" class="form-input" disabled="disabled" />
+							</view>
+							<image class="arrow" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/arrow_gray.png" mode=""></image>
+						</view>
+					</picker>
+				</view> -->
+
+				<!-- 规格 -->
+				<view class="spec-box">
+					<view v-for="(item,index) in attrs" :key="index">
+						<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://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/jian.png"
+								mode=""></image>
+							<image v-else
+								src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/jian2.png"
+								mode=""></image>
+						</view>
+						<input type="number" @change="changeNum" v-model="specNum" />
+						<view class="img-box" :style="{backgroundColor:isSingle?'#ddd':'#fff'}" @click="addNum()">
+							<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/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://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/share.png"></image>
+			<text class="text">加载中...</text>
+		</view>
+    <CustomToast ref="customToast">
+    </CustomToast>
+		<!-- <u-modal :show="showModal" title="温馨提示" content="处方药须凭处方在药师指导下购买和使用" @confirm="hideModal()"></u-modal> -->
+	</view>
+</template>
+
+<script>
+import {CustomToast} from '@/components/custom-toast.vue';
+
+	import {
+		getDicts
+	} from '@/api/index'
+	import {
+		getUserInfo
+	} from '@/api/user'
+	import {
+		getStoreProductDetail
+	} from '@/api/companyOrder.js'
+	import {
+		getCartCount,
+		addCart
+	} from '@/api/product'
+	import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
+	export default {
+		components: {
+			item: {},
+			popupBottom,
+      CustomToast
+		},
+		data() {
+			return {
+				loadding: true,
+				buyText: "立即购买",
+				// mTitle:"温馨提示",
+				// mContent:"处方药须凭处方在药师指导下购买和使用",
+				type: null,
+				productValueSelect: {
+					price: 0,
+					serviceFee: 0
+				},
+				banner: [],
+				productId: null,
+				attrs: [],
+				values: [],
+				stores: [],
+				storeId: null,
+				storeNames: [],
+				storeIdx: 0,
+				storeName: "",
+				product: {
+					price: 0,
+					otPrice: 0,
+				},
+				showModal: false,
+				// 当前轮播的图片
+				activeBanner: 1,
+				// 购物车数量
+				cartCount: 0,
+				// 规格弹窗
+				specVisible: false,
+				// 规格数量
+				specNum: 1,
+				config: null,
+				showServiceFee: false,
+				selectVal: "",
+				userinfo: [],
+				isuser: false,
+				remainingPurchaseLimit:null,
+				singlePurchaseLimit:null,//商品购买上限
+				isSingle:false,
+				purchaseLimit:0, // 总限购数量
+				courseId:null,
+				companyUserId:null,
+				companyId:null
+			};
+		},
+		onLoad(options) {
+			console.log("qxj options:",options);
+			uni.showShareMenu({
+				withShareTicket: true,
+				//小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
+				menus: ["shareAppMessage", "shareTimeline"] //不设置默认发送给朋友
+			})
+			this.getDicts();
+			this.productId = options.productId;
+			this.companyUserId= options.companyUserId
+			this.companyId = options.companyId
+		},
+		onShow() {
+			this.getProductDetails();
+			if (uni.getStorageSync('AppToken')) {
+				this.getuser()
+			} else {
+				this.isuser = true
+			}
+		},
+		methods: {
+			getuser() {
+				getUserInfo().then(
+					res => {
+						if (res.code == 200) {
+							if (res.user != null) {
+								this.userinfo = res.user;
+								console.log(this.userinfo)
+								uni.setStorageSync('userInfo', JSON.stringify(res.user));
+							}
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			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.remainingPurchaseLimit !== null && typeof this.remainingPurchaseLimit === 'number') {
+					// 如果限购数量为0,提示库存不足
+					if (this.remainingPurchaseLimit === 0) {
+            this.$refs.customToast.show({
+              title: `该商品限购:${this.purchaseLimit}件\n已达购买上限`,
+              duration: 2000
+            });
+						// uni.showToast({
+						// 	icon: 'none',
+						// 	title: "该商品限购:" + this.purchaseLimit +",已达到购买上限",
+						// });
+						return;
+					}
+					// 如果购买数量超过限购数量,提示
+					if (this.specNum > this.remainingPurchaseLimit) {
+            this.$refs.customToast.show({
+              title: "购买数量不能超过限购数量:" + this.remainingPurchaseLimit,
+              duration: 2000
+            });
+						// uni.showToast({
+						// 	icon: 'none',
+						// 	title: "购买数量不能超过限购数量:" + this.remainingPurchaseLimit,
+						// });
+						return;
+					}
+				}
+				if (this.specNum == 0) {
+					uni.showToast({
+						icon: 'none',
+						title: "购买商品数量必须大于0",
+					});
+					return;
+				}
+				var isBuy = type == "buy" ? 1 : 0;
+				let data = {
+					isBuy: isBuy,
+					cartNum: this.specNum,
+					productId: this.productValueSelect.productId,
+					attrValueId: this.productValueSelect.id
+				};
+				addCart(data).then(
+					res => {
+						if (res.code == 200) {
+							if (type == "buy") {
+								uni.navigateTo({
+									url: '/pages/shopping/confirmOrder?type=' + this.type + "&cartIds=" + res
+										.id + "&orderType=" + this.orderType + "&storeId=" + this.storeId +"&companyId="+this.companyId+"&companyUserId="+this.companyUserId
+								})
+							} 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,
+					companyId:this.companyId,
+					companyUserId:this.companyUserId
+				};
+				getStoreProductDetail(data).then(
+					res => {
+						this.loadding = false
+						if (res.code == 200) {
+							this.product = res.product;
+							this.remainingPurchaseLimit = res.remainingPurchaseLimit;
+							this.singlePurchaseLimit = res.product.singlePurchaseLimit!==0?res.product.singlePurchaseLimit:null
+							// 如果接口返回了总限购数量和已购买数量,也保存
+							if (res.product.purchaseLimit !== null) {
+								this.purchaseLimit = res.product.purchaseLimit;
+							}
+							if (this.product.productType == 1) {
+								this.buyText = "立即购买"
+							} else if (this.product.productType == 2) {
+								this.showModal = true;
+								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
+							});
+							this.values = res.productValues;
+							this.choseSpec(0, 0)
+							// this.stores=res.stores;
+							// this.storeNames=this.stores.map(store => store.storeName);
+							// if(this.stores.length>0){
+							// 	this.storeName=this.storeNames[this.storeIdx];
+							// 	this.storeId=this.stores[this.storeIdx].storeId;
+							// }
+
+
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.msg,
+							});
+							// setTimeout(function() {
+							// 	uni.reLaunch({
+							// 		url: '/pages/home/index',
+							// 	})
+							// }, 2000)
+
+						}
+					},
+					rej => {}
+				);
+			},
+			getCartCount() {
+				let data = {
+					productId: this.productId
+				};
+				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) {
+				if(this.$isLogin()){
+					uni.navigateTo({
+						url: url
+					})
+				}
+			},
+			toCart(url) {
+				if(this.$isLogin()){
+					uni.switchTab({
+						url: url
+					})
+				}
+			},
+
+			// 加入购物车
+			addCart(type) {
+				if (type == 'buy') {
+					let userInfoStr = uni.getStorageSync('userInfo');
+					if(Object.prototype.toString.call(userInfoStr) == '[object String]'){
+						userInfoStr = userInfoStr!=''?JSON.parse(userInfoStr):''
+					}
+					//console.log('userInfoStr.phone',userInfoStr.phone)
+					if (!userInfoStr || !userInfoStr.maOpenId|| !userInfoStr.phone) {
+						uni.navigateTo({
+							url: '/pages/auth/login'
+						});
+						return;
+					}
+				}
+				if(this.$isLogin()){
+					this.type = type;
+					this.specVisible = true
+				}
+			},
+			// 规格选择
+			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]);
+						}
+					}
+				}
+				let selectVal = values.sort().join(","); //返回值:默认
+				this.selectVal = selectVal;
+				// var valueSelect=this.values.filter((item)=>{
+				//      return item.sku==selectVal;
+				// });
+				var valueSelect = this.getValueSelect();
+				console.log("qxj valueSelect:" + valueSelect);
+				if (valueSelect != null && valueSelect.length > 0) {
+					this.productValueSelect = valueSelect[0];
+				}
+				//console.log("qxj productValueSelect:" + JSON.stringify(this.productValueSelect));
+				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, '')
+				this.isSingle=false
+				if (this.specNum < 1) {
+					this.specNum = 1
+				}
+				if (this.specNum >= this.productValueSelect.stock) {
+					this.specNum = this.productValueSelect.stock
+				}
+				// 检查限购数量
+				if (this.remainingPurchaseLimit !== null && typeof this.remainingPurchaseLimit === 'number' && this.specNum > this.remainingPurchaseLimit) {
+					this.specNum = this.remainingPurchaseLimit;
+          this.$refs.customToast.show({
+            title: `该商品限购:${this.remainingPurchaseLimit}件\n已达购买上限`,
+            duration: 2000
+          });
+		 }
+		 //单笔商品限购
+		 if (this.singlePurchaseLimit !== null && typeof this.singlePurchaseLimit === 'number' && this.specNum > this.singlePurchaseLimit) {
+			 this.isSingle=true
+		 this.specNum = this.singlePurchaseLimit;
+		 this.$refs.customToast.show({
+		   title: `已达单笔最高购买件数`,
+		   duration: 3000
+		 });
+		 }
+			},
+			// 数量减法
+			lessNum() {
+				this.specNum--
+				this.isSingle=false
+				if (this.specNum < 1) {
+					this.specNum = 1
+				}
+				if (this.specNum >= this.productValueSelect.stock) {
+					this.specNum = this.productValueSelect.stock
+				}
+				// 检查限购数量
+				if (this.remainingPurchaseLimit !== null && typeof this.remainingPurchaseLimit === 'number' && this.specNum > this.remainingPurchaseLimit) {
+					this.specNum = this.remainingPurchaseLimit;
+          this.$refs.customToast.show({
+            title: `该商品限购:${this.remainingPurchaseLimit}件\n已达购买上限`,
+            duration: 2000
+          });
+				}
+				//单笔商品限购
+				if (this.singlePurchaseLimit !== null && typeof this.singlePurchaseLimit === 'number' && this.specNum > this.singlePurchaseLimit) {
+					this.isSingle=true
+					this.specNum = this.singlePurchaseLimit;
+				this.$refs.customToast.show({
+				  title: `已达单笔最高购买件数`,
+				  duration: 3000
+				});
+				}
+			},
+			// 数量加法
+			addNum() {
+				this.specNum++
+				this.isSingle=false
+				if (this.specNum >= this.productValueSelect.stock) {
+					this.specNum = this.productValueSelect.stock
+				}
+				// 检查限购数量
+				if (this.remainingPurchaseLimit !== null && typeof this.remainingPurchaseLimit === 'number' && this.specNum > this.remainingPurchaseLimit) {
+					this.specNum = this.remainingPurchaseLimit;
+                 this.$refs.customToast.show({
+                 title: `该商品限购:${this.remainingPurchaseLimit}件\n已达购买上限`,
+                  duration: 2000
+                  });
+				}
+				//单笔商品限购
+				if (this.singlePurchaseLimit !== null && typeof this.singlePurchaseLimit === 'number' && this.specNum > this.singlePurchaseLimit) {
+					this.isSingle=true
+				this.specNum = this.singlePurchaseLimit;
+				this.$refs.customToast.show({
+				  title: `已达单笔最高购买件数`,
+				  duration: 3000
+				});
+				}
+			},
+			// 确定选择该规格
+			submit() {
+				this.specVisible = false
+				this.doAddCart(this.type);
+			},
+			hideModal() {
+				this.showModal = false;
+			},
+			getValueSelect() {
+				var valueSelect = this.values.filter((item) => {
+					return item.sku == this.selectVal;
+				});
+				return valueSelect;
+			},
+			pickerChange(e) {
+				console.log("pickerChange index:" + e.detail.value);
+				var valueSelect = this.getValueSelect();
+				this.productValueSelect = valueSelect[0];
+
+			},
+			pickerColumnchange(e) {
+
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.shop-banner {
+		height: 756upx;
+		background-color: #FFFFFF;
+		position: relative;
+
+		.swiper-item {
+			box-sizing: border-box;
+			position: relative;
+		}
+
+		.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://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/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;
+		}
+
+		.cf-box {
+			position: absolute;
+			z-index: 10;
+			left: 0;
+			right: 0;
+			top: calc(50% - 200rpx);
+			bottom: calc(50% - 200rpx);
+			background-color: rgba(0, 0, 0, 0.3);
+			backdrop-filter: blur(2rpx);
+			/* 背景模糊度 */
+			display: flex;
+			flex-direction: column;
+			flex: 1;
+			justify-content: center;
+			align-items: center;
+			color: #EDEEEF;
+
+			.title {
+				font-size: 40rpx;
+				font-weight: bold;
+			}
+
+			.subTitle {
+				font-size: 28rpx;
+				font-weight: bold;
+				margin-top: 10rpx;
+			}
+		}
+
+
+	}
+
+	.det-info {
+		background: #FFFFFF;
+		padding: 36upx 30upx 25upx;
+
+		.price-box {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+
+			.price {
+				display: flex;
+				align-items: flex-end;
+
+				.label {
+					color: #333;
+					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 10upx;
+					line-height: 1;
+				}
+
+				.old {
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #BBBBBB;
+					line-height: 1.3;
+				}
+			}
+
+			.share-box {
+				width: 120upx;
+				height: 46upx;
+				border: 1px solid #FF233C;
+				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: #FF233C;
+				}
+
+				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, #FFC5C5 0%, #FF233C 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 {
+			font-size: 26upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			line-height: 36upx;
+			padding: 18upx 0 23upx;
+			border-bottom: 1px solid #f7f7f7;
+		}
+
+		.safe-box {
+			display: flex;
+			align-items: center;
+			padding-top: 24upx;
+
+			image {
+				width: 20upx;
+				height: 24upx;
+				margin-right: 20upx;
+			}
+
+			.text {
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 1;
+			}
+
+			.line {
+				width: 1px;
+				height: 23upx;
+				background: #EDEEEF;
+				margin: 0 20upx;
+			}
+		}
+	}
+
+	.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;
+				}
+				
+				.limit-text {
+					font-size: 32rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FF6633;
+					margin-left: 20upx;
+				}
+			}
+		}
+
+		.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: 20upx 30upx;
+		background: #FFFFFF;
+		font-size: 28upx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+		line-height: 1.8;
+		margin-top: 10upx;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-between;
+
+		.label {
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #111111;
+			line-height: 1.8;
+		}
+	}
+
+	.det-box {
+		margin-top: 10upx;
+		padding: 40upx 30upx 130upx 30upx;
+		background-color: #FFFFFF;
+
+		.title {
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			line-height: 1;
+			margin-bottom: 25upx;
+		}
+
+	}
+
+	.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;
+				}
+			}
+
+			:deep(.uni-badge--x) {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+			}
+
+			:deep(.uni-badge) {
+				border: none;
+				background-color: #FF3636;
+				font-family: Roboto;
+			}
+		}
+
+		.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;
+				}
+
+				&.cart {
+					background: #FF6633;
+				}
+
+				&.buy {
+					background: #FF233C;
+				}
+			}
+		}
+	}
+
+	.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: #fff;
+						border: 1px solid #FF233C;
+						color: #FF233C;
+					}
+				}
+			}
+		}
+
+		.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: #FF233C;
+			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;
+		}
+	}
+
+	.form-item {
+		padding: 30upx 0;
+		display: flex;
+		align-items: flex-start;
+		border-bottom: 1px solid #F1F1F1;
+
+		&:last-child {
+			border-bottom: none;
+		}
+
+		.label {
+			width: 180upx;
+			text-align: left;
+			font-size: 30upx;
+			line-height: 44upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #222222;
+			flex-shrink: 0;
+		}
+
+		input {
+			text-align: left;
+		}
+
+		.form-input {
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			text-align: left;
+		}
+
+		.form-textarea {
+			font-size: 30upx;
+			color: #999999;
+			height: 100upx;
+			padding: 4upx 0;
+		}
+
+		.birth-picker {
+			flex: 1;
+			display: flex;
+			align-items: center;
+
+			.right-box {
+				width: 100%;
+				display: flex;
+				align-items: center;
+
+				.input-box {
+					width: 470upx;
+				}
+
+				.arrow {
+					width: 13upx;
+					height: 23upx;
+					margin-left: 20upx;
+				}
+			}
+		}
+	}
+</style>

+ 293 - 0
pages_company/managerOrder/productList.vue

@@ -0,0 +1,293 @@
+<template>
+	<view class="content">
+		<view class="top-fixed">
+			<!-- 搜索框 -->
+			<view class="search-cont">
+				<view class="inner">
+					<image class="icon-search" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/search.png" mode=""></image>
+					<input type="text" @confirm="goSearch"   :value="form.keyword" placeholder="输入产品名称" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+				</view>
+				<!-- <view class="icon-search">
+					<image @click="showChange(2)" v-if="showType==1"  src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/search1.png" mode=""></image>
+					<image @click="showChange(1)" v-if="showType==2"  src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/search2.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" :class="form.defaultOrder=='desc'?'active':''" @click="searchChange('1')">
+					<text class="label">新品</text>
+				</view>
+				<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://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/price_arrow_up.png" mode="" @click="priceUp(true)"></image>
+						<image v-if="form.priceOrder=='asc'" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/price_arrow_up2.png" mode="" @click="priceUp(false)"></image>
+						<image v-if="form.priceOrder==null||form.priceOrder=='asc'" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/price_arrow_down.png" mode="" @click="priceDown(true)"></image>
+						<image v-if="form.priceOrder=='desc'" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/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://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/price_arrow_up.png" mode="" @click="saleUp(true)"></image>
+						<image v-if="form.salesOrder=='asc'" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/price_arrow_up2.png" mode="" @click="saleUp(false)"></image>
+						<image v-if="form.salesOrder==null||form.salesOrder=='asc'" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/price_arrow_down.png" mode="" @click="saleDown(true)"></image>
+						<image v-if="form.salesOrder=='desc'" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/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="100rpx" bottom="40rpx" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<view class="goods-grid">
+				<view class="grid-item" v-for="(item, index) in dataList" :key="index">
+					<GoodsCard :item="item" @goPage="showDetail"/>
+				</view>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import { getStoreProductList } from '@/api/companyOrder.js'
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	import GoodsCard from './components/GoodsCard.vue';
+	export default {
+		components: { GoodsCard },
+		mixins: [MescrollMixin], 
+		data() {
+			return {
+				downOption: {
+					auto: false, 
+					use:true,
+				},
+				form:{
+					// defaultOrder:'desc',
+					// newOrder:null,
+					// priceOrder:null,
+					// salesOrder:null,
+					//position:1,
+					productName:"",
+					companyUserId:null,
+					companyId:null
+				},
+				mescroll:null,
+				// 上拉加载的配置
+				upOption: {
+					onScroll:true,
+					use: true, // 是否启用上拉加载; 默认true
+					page: {
+						num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+						size: 10 // 每页数据的数量,默认10
+					},
+					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					empty: {
+						icon:'https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/no_data.png',
+						tip: '暂无数据'
+					},
+					textNoMore:"已经到底了",
+				},
+				// 列表数据
+				dataList: [],
+				companyId:null,
+				companyUserId:null,
+			};
+		},
+		onLoad(option) {
+			if(option.key!=undefined){
+				this.form.productName = option.key
+			}
+			if(option.id != undefined){
+				this.form.id= option.id
+			}
+			if(option.type!=undefined){
+				this.searchChange(option.type)
+			}
+			this.companyId = option.companyId||'';
+			this.companyUserId = option.companyUserId||'';
+			this.form.companyId=option.companyId||'';
+			this.form.companyUserId=option.companyUserId||'';
+		},
+		methods:{
+			goSearch(e) {
+				this.form.productName=e.detail.value;
+				this.mescroll.resetUpScroll();
+			},
+			searchChange(type){
+				
+				this.mescroll.resetUpScroll();
+			},
+			showChange(type){
+				this.showType=type;
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				// 与 newindex 瀑布流使用同一接口:getHomeGoods,id 为分类(0=全部)
+				//联网加载数据
+				var that = this;
+				this.form.pageNum=page.num;
+				this.form.pageSize=page.size;
+				getStoreProductList(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();
+					}
+				}).catch(() => {
+				that.dataList = page.num == 1 ? [] : that.dataList
+				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: './productDetails?productId='+item.productId+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.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: #FF233C;
+			}
+			.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;
+				}
+			}
+		}
+	}
+	.goods-grid {
+		padding: 20rpx;
+		display: flex;
+		flex-direction: column;
+		gap: 20rpx;
+		// display: flex;
+		// flex-wrap: wrap;
+		// gap: 20rpx;
+	}
+	.goods-grid .grid-item {
+		width: 100%;
+	}
+</style>

+ 476 - 0
pages_company/managerOrder/productShowDetails.vue

@@ -0,0 +1,476 @@
+<template>
+	<view class="content">
+		<!-- 商品轮播图片 -->
+		<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">会员价</text>
+					<text class="unit">¥</text>
+					<text class="num" >{{product.price}}</text>
+					<text class="label">零售价</text>
+					<text class="old" >¥{{product.otPrice}}</text>
+				</view>
+			</view>
+			<view class="name-box">
+				<!-- <view class="tag">{{utils.getDictLabelName("storeProductType",product.productType)}}</view> -->
+				{{product.productName}}
+			</view>
+			<view class="intro">
+				{{product.productInfo}}
+			</view>
+			<!-- <view class="safe-box">
+				<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/safe.png" mode=""></image>
+				<text class="text">免邮发货</text>
+				<view class="line"></view>
+				<text class="text">药师服务</text>
+				<view class="line"></view>
+				<text class="text">隐私保护</text>
+			</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://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/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">
+			<view class="label">产品说明书</view>
+			<view class="label">查看</view>
+			
+		</view> -->
+		<!-- 图文详情 -->
+		<view class="det-box">
+			<view class="title">图文详情</view>
+			<view class="inner">
+				<view  v-html="product.description" style="font-size:0"></view>
+			</view>
+		</view>
+		
+		<view class="loadding" v-if="loadding==true">
+			<image src="../..https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/share.png"></image>
+			<text class="text">加载中...</text>
+		</view>
+		
+
+	</view>
+</template>
+
+<script>
+	import {getDicts} from '@/api/index'
+	import {getProductDetails,getCartCount,addCart} from '@/api/product'
+	export default {
+		components: {
+		},
+		data() {
+			return {
+				banner:[],
+				productId:null,
+				product:{
+					price:0,
+					otPrice:0,
+				},
+				// 当前轮播的图片
+				activeBanner: 0,
+				loadding:true,
+			};
+		},
+		onLoad(options) {
+			this.getDicts();
+			this.productId = options.productId;
+		},
+		onShow() {
+			this.getProductDetails();
+		},
+		 
+		methods: {
+			getDicts:function(){
+				getDicts().then(
+					res => {
+						if(res.code==200){
+							uni.setStorageSync('dicts',JSON.stringify(res));
+						} 
+						 
+					},
+					rej => {}
+				);
+			},
+			showImg() {
+				 //预览图片
+				 uni.previewImage({
+				 	urls: this.banner,
+				 	current: this.banner[0]
+				 });
+			},
+			 
+			getProductDetails(){
+				let data = {productId:this.productId};
+				getProductDetails(data).then(
+					res => {
+						this.loadding=false;
+						if(res.code==200){
+							this.product=res.product;
+							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=[]
+							}
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+							setTimeout(function(){
+								uni.reLaunch({
+									url: '/pages/home/index',
+								})
+							},2000)
+							
+						}
+					},
+					rej => {}
+				);
+			},
+			// swiper变化事件
+			swiperChange(event) {
+				this.activeBanner = event.detail.current + 1
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.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://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/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;
+		.price-box{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.price{
+				display: flex;
+				align-items: flex-end;
+				.label{
+					color: #333;
+					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 10upx;
+					line-height: 1;
+				}
+				.old{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #BBBBBB;
+					line-height: 1.3;
+				}
+			}
+			.share-box{
+				width: 120upx;
+				height: 46upx;
+				border: 1px solid #FF233C;
+				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: #FF233C;
+				}
+				image{
+					margin-left: 2rpx;
+					width: 25upx;
+					height: 24upx;
+				}
+				.share{
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%rpx;
+					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, #66b2ef 0%, #FF233C 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{
+			font-size: 26upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			line-height: 36upx;
+			padding: 18upx 0 23upx;
+			border-bottom: 1px solid #f7f7f7;
+		}
+		.safe-box{
+			display: flex;
+			align-items: center;
+			padding-top: 24upx;
+			image{
+				width: 20upx;
+				height: 24upx;
+				margin-right: 20upx;
+			}
+			.text{
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 1;
+			}
+			.line{
+				width: 1px;
+				height: 23upx;
+				background: #EDEEEF;
+				margin: 0 20upx;
+			}
+		}
+	}
+	.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: 20upx 30upx;
+		background: #FFFFFF;
+		font-size: 28upx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+		line-height: 1.8;
+		margin-top: 10upx;
+		display: flex; 
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-between;
+		.label{
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #111111;
+			line-height: 1.8;
+		}
+	}
+	.det-box{
+		margin-top: 10upx;
+		padding: 40upx 30upx;
+		background-color: #FFFFFF;
+		.title{
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			line-height: 1;
+			margin-bottom: 25upx;
+		}
+		
+	}
+	
+   .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;
+	 	}
+	 }
+	 
+	 
+	 
+</style>

+ 13 - 1
pages_mall/my.vue

@@ -335,7 +335,7 @@
 					return
 					return
 				}
 				}
 				if (e.salesManagement && !e.url) {
 				if (e.salesManagement && !e.url) {
-					this.documentPreparationFun()
+					this.toManagerCourse()
 					return
 					return
 				}
 				}
 				uni.navigateTo({
 				uni.navigateTo({
@@ -353,6 +353,18 @@
 					})
 					})
 				}
 				}
 			},
 			},
+			toManagerCourse() {
+				if (uni.getStorageSync('ManageToken')) {
+					uni.navigateTo({
+						url: '/pages_manage/index'
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages_manage/login'
+					})
+				}
+
+			},
 			toCompany() {
 			toCompany() {
 				if (this.$isLogin()) {
 				if (this.$isLogin()) {
 					var token = uni.getStorageSync('CompanyUserToken');
 					var token = uni.getStorageSync('CompanyUserToken');