|  | @@ -28,77 +28,108 @@
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  			</view>
 | 
	
		
			
				|  |  |  			<!-- 药品列表 -->
 | 
	
		
			
				|  |  | -			<view class="goods-list">
 | 
	
		
			
				|  |  | -				<view v-for="(item,index) in carts" :key="index" class="item">
 | 
	
		
			
				|  |  | -					<view class="img-box">
 | 
	
		
			
				|  |  | -						<image :src="item.productAttrImage!=null?item.productAttrImage:item.productImage" mode="aspectFill"></image>
 | 
	
		
			
				|  |  | -					</view>
 | 
	
		
			
				|  |  | -					<view class="info-box">
 | 
	
		
			
				|  |  | -						<view>
 | 
	
		
			
				|  |  | -							<view class="name-box ellipsis2">
 | 
	
		
			
				|  |  | -								<view class="tag" :style="{background:_background(item.productType)}">{{$getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
 | 
	
		
			
				|  |  | -							</view>
 | 
	
		
			
				|  |  | -							<view class="spec ellipsis2">{{item.productAttrName}}</view>
 | 
	
		
			
				|  |  | +			<view class="shopbox" v-for="(shop,idx) in carts" :key="idx">
 | 
	
		
			
				|  |  | +				<view class="shopbox-name" v-if="shop.storeName && shop.storeName != 'null'">
 | 
	
		
			
				|  |  | +					<text>{{shop.storeName}}</text>
 | 
	
		
			
				|  |  | +				</view>
 | 
	
		
			
				|  |  | +				<view class="goods-list">
 | 
	
		
			
				|  |  | +					<view v-for="(item,index) in shop.list" :key="index" class="item">
 | 
	
		
			
				|  |  | +						<view class="img-box">
 | 
	
		
			
				|  |  | +							<image :src="item.productAttrImage || item.productImage" mode="aspectFill"></image>
 | 
	
		
			
				|  |  |  						</view>
 | 
	
		
			
				|  |  | -						<view class="price-num">
 | 
	
		
			
				|  |  | -							<view class="price">
 | 
	
		
			
				|  |  | -								<text class="unit">¥</text>
 | 
	
		
			
				|  |  | -								<text class="num">{{item.price&&item.price.toFixed(2)}}</text>
 | 
	
		
			
				|  |  | +						<view class="info-box">
 | 
	
		
			
				|  |  | +							<view>
 | 
	
		
			
				|  |  | +								<view class="name-box ellipsis2">
 | 
	
		
			
				|  |  | +									<view class="tag" :style="{background:_background(item.productType)}">{{$getDictLabelName("storeProductType",item.productType)}}</view>{{item.productName}}
 | 
	
		
			
				|  |  | +								</view>
 | 
	
		
			
				|  |  | +								<view class="spec ellipsis2">{{item.productAttrName}}</view>
 | 
	
		
			
				|  |  | +							</view>
 | 
	
		
			
				|  |  | +							<view class="price-num">
 | 
	
		
			
				|  |  | +								<view class="price">
 | 
	
		
			
				|  |  | +									<text class="unit">¥</text>
 | 
	
		
			
				|  |  | +									<text class="num">{{item.price? item.price.toFixed(2): '0.00'}}</text>
 | 
	
		
			
				|  |  | +								</view>
 | 
	
		
			
				|  |  | +								<view class="num">x{{item.cartNum}}</view>
 | 
	
		
			
				|  |  |  							</view>
 | 
	
		
			
				|  |  | -							<view class="num">x{{item.cartNum}}</view>
 | 
	
		
			
				|  |  |  						</view>
 | 
	
		
			
				|  |  |  					</view>
 | 
	
		
			
				|  |  | -				</view>
 | 
	
		
			
				|  |  | -				<!-- 小计 -->
 | 
	
		
			
				|  |  | -				<view class="sub-total">
 | 
	
		
			
				|  |  | -					<text class="label">小计:</text>
 | 
	
		
			
				|  |  | -					<view class="price">
 | 
	
		
			
				|  |  | -						<text class="unit">¥</text>
 | 
	
		
			
				|  |  | -						<text class="num">{{price.totalPrice&&price.totalPrice.toFixed(2)}}</text>
 | 
	
		
			
				|  |  | +					<!-- 运费 -->
 | 
	
		
			
				|  |  | +					<view class="points">
 | 
	
		
			
				|  |  | +						<view class="left">
 | 
	
		
			
				|  |  | +							<text class="text">运费</text>
 | 
	
		
			
				|  |  | +						</view>
 | 
	
		
			
				|  |  | +						<view class="right" v-if="price&&price.length > 0">
 | 
	
		
			
				|  |  | +							<text class="text">{{price[idx].payPostage==null||price[idx].payPostage==0?'免运费':price[idx].payPostage.toFixed(2)}}</text>
 | 
	
		
			
				|  |  | +						</view>
 | 
	
		
			
				|  |  | +					</view>
 | 
	
		
			
				|  |  | +					<!-- 备注 -->
 | 
	
		
			
				|  |  | +					<view class="points">
 | 
	
		
			
				|  |  | +						<view class="left">
 | 
	
		
			
				|  |  | +							<text class="text">备注</text>
 | 
	
		
			
				|  |  | +						</view>
 | 
	
		
			
				|  |  | +						<view class="remarks">
 | 
	
		
			
				|  |  | +							<input type="text" v-model="shop.markinfo" placeholder="备注留言(选填)" placeholder-class="input" />
 | 
	
		
			
				|  |  | +						</view>
 | 
	
		
			
				|  |  |  					</view>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  			</view>
 | 
	
		
			
				|  |  |  			<!-- 积分 -->
 | 
	
		
			
				|  |  | -			<view class="points">
 | 
	
		
			
				|  |  | -				<view class="left">
 | 
	
		
			
				|  |  | -					<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/points.png" mode=""></image>
 | 
	
		
			
				|  |  | -					<text class="text">可用积分</text>
 | 
	
		
			
				|  |  | -				</view>
 | 
	
		
			
				|  |  | -				<view class="right">
 | 
	
		
			
				|  |  | -					<text class="text">{{price.usedIntegral}}积分</text>
 | 
	
		
			
				|  |  | -					<evan-switch @change="integralChange" v-model="checked" activeColor="#2583EB" inactiveColor="rgba(0, 0, 0, 0.1)"></evan-switch>
 | 
	
		
			
				|  |  | -				</view>
 | 
	
		
			
				|  |  | -			</view>
 | 
	
		
			
				|  |  | -			<!-- <view class="points" @click="openCoupon()">
 | 
	
		
			
				|  |  | -				<view class="left">
 | 
	
		
			
				|  |  | -					<text class="text">优惠券</text>
 | 
	
		
			
				|  |  | +			<view class="price-info">
 | 
	
		
			
				|  |  | +				<view class="price-info-title">价格明细</view>
 | 
	
		
			
				|  |  | +				<view class="points">
 | 
	
		
			
				|  |  | +					<view class="left">
 | 
	
		
			
				|  |  | +						<text class="text">商品总价</text>
 | 
	
		
			
				|  |  | +					</view>
 | 
	
		
			
				|  |  | +					<view class="right" style="align-items: baseline;">
 | 
	
		
			
				|  |  | +						<text class="price-info-unit">¥</text>
 | 
	
		
			
				|  |  | +						<text class="price-info-num">{{priceAll.totalPrice.toFixed(2)}}</text>
 | 
	
		
			
				|  |  | +					</view>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  | -				<view class="right">
 | 
	
		
			
				|  |  | -					<text class="text">{{couponText}}</text>
 | 
	
		
			
				|  |  | -					<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/arrow4.png" mode=""></image>
 | 
	
		
			
				|  |  | +				<view class="points">
 | 
	
		
			
				|  |  | +					<view class="left">
 | 
	
		
			
				|  |  | +						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/points.png" mode=""></image>
 | 
	
		
			
				|  |  | +						<text class="text">可用积分</text>
 | 
	
		
			
				|  |  | +					</view>
 | 
	
		
			
				|  |  | +					<view class="right">
 | 
	
		
			
				|  |  | +						<text class="text">{{priceAll.usedIntegral}}积分</text>
 | 
	
		
			
				|  |  | +						<evan-switch @change="integralChange" v-model="checked" activeColor="#0bb3f2" inactiveColor="rgba(0, 0, 0, 0.1)"></evan-switch>
 | 
	
		
			
				|  |  | +					</view>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  | -			</view> -->
 | 
	
		
			
				|  |  | -			<view class="points">
 | 
	
		
			
				|  |  | -				<view class="left">
 | 
	
		
			
				|  |  | -					<text class="text">运费</text>
 | 
	
		
			
				|  |  | +				<view class="points" @click="openCoupon()">
 | 
	
		
			
				|  |  | +					<view class="left">
 | 
	
		
			
				|  |  | +						<text class="text">优惠券</text>
 | 
	
		
			
				|  |  | +					</view>
 | 
	
		
			
				|  |  | +					<view class="right">
 | 
	
		
			
				|  |  | +						<text class="text">{{couponText}}</text>
 | 
	
		
			
				|  |  | +						<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/arrow4.png" mode=""></image>
 | 
	
		
			
				|  |  | +					</view>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  | -				<view class="right">
 | 
	
		
			
				|  |  | -					<text class="text" v-if="address!=null">{{price.payPostage==null||price.payPostage==0?'免运费':price.payPostage.toFixed(2)}}</text>
 | 
	
		
			
				|  |  | -					<text class="text" v-if="address==null">--</text>
 | 
	
		
			
				|  |  | -					
 | 
	
		
			
				|  |  | +				<view class="points">
 | 
	
		
			
				|  |  | +					<view class="left">
 | 
	
		
			
				|  |  | +						<text class="text">合计</text>
 | 
	
		
			
				|  |  | +					</view>
 | 
	
		
			
				|  |  | +					<view class="right" style="align-items: baseline;">
 | 
	
		
			
				|  |  | +						<text class="price-info-unit">¥</text>
 | 
	
		
			
				|  |  | +						<text class="price-info-num">{{priceAll.payPrice.toFixed(2)}}</text>
 | 
	
		
			
				|  |  | +					</view>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  			</view>
 | 
	
		
			
				|  |  | -			<view class="points">
 | 
	
		
			
				|  |  | +			<!-- <view class="points">
 | 
	
		
			
				|  |  |  				<view class="left">
 | 
	
		
			
				|  |  |  					<text class="text">服务费</text>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view class="right">
 | 
	
		
			
				|  |  | -					<text class="text">{{price.serviceFee.toFixed(2)}}</text>
 | 
	
		
			
				|  |  | +					<text class="text">{{price.serviceFee? price.serviceFee.toFixed(2):'0.00'}}</text>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  | -			</view>
 | 
	
		
			
				|  |  | +			</view> -->
 | 
	
		
			
				|  |  |  			<!-- 备注 -->
 | 
	
		
			
				|  |  | -			<view class="remarks">
 | 
	
		
			
				|  |  | +			<!-- <view class="remarks">
 | 
	
		
			
				|  |  |  				<input type="text" v-model="form.mark" placeholder="备注留言(选填)" placeholder-class="input" />
 | 
	
		
			
				|  |  | +			</view> -->
 | 
	
		
			
				|  |  | +			<view class="agreement">
 | 
	
		
			
				|  |  | +				<label>
 | 
	
		
			
				|  |  | +					<checkbox :checked="isAgreement" color="#2583EB" style="transform:scale(0.7)" @click="handleAgreement()" />药品属于特殊特殊商品除药品质量问题外,一经售出,不得退换
 | 
	
		
			
				|  |  | +				</label>
 | 
	
		
			
				|  |  |  			</view>
 | 
	
		
			
				|  |  |  		</view>
 | 
	
		
			
				|  |  |  		<!-- 底部按钮 -->
 | 
	
	
		
			
				|  | @@ -108,7 +139,7 @@
 | 
	
		
			
				|  |  |  					<text class="label">合计:</text>
 | 
	
		
			
				|  |  |  					<view class="price">
 | 
	
		
			
				|  |  |  						<text class="unit">¥</text>
 | 
	
		
			
				|  |  | -						<text class="num">{{price.payPrice.toFixed(2)}}</text>
 | 
	
		
			
				|  |  | +						<text class="num">{{priceAll.payPrice.toFixed(2)}}</text>
 | 
	
		
			
				|  |  |  					</view>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view class="btn" @click="submitOrder">提交订单</view>
 | 
	
	
		
			
				|  | @@ -150,7 +181,7 @@
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  	import {getWeixinOrderTemps} from '@/api/common'
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  | -	import {confirm,computed,create} from './api/storeOrder'
 | 
	
		
			
				|  |  | +	import {confirm,computed,create} from '@/api/myStoreOrder.js'
 | 
	
		
			
				|  |  |  	import { getMyEnableCouponList } from './api/coupon'
 | 
	
		
			
				|  |  |  	 
 | 
	
		
			
				|  |  |  	import EvanSwitch from './components/evan-switch.vue'
 | 
	
	
		
			
				|  | @@ -163,17 +194,13 @@
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  |  		data() {
 | 
	
		
			
				|  |  |  			return {
 | 
	
		
			
				|  |  | +				isAgreement: true,
 | 
	
		
			
				|  |  |  				temps:[],
 | 
	
		
			
				|  |  |  				couponUserId:null,
 | 
	
		
			
				|  |  |  				couponText:"请选择",
 | 
	
		
			
				|  |  |  				couponsList:[],
 | 
	
		
			
				|  |  |  				couponVisible:false,
 | 
	
		
			
				|  |  | -				price:{
 | 
	
		
			
				|  |  | -					payPrice:0,
 | 
	
		
			
				|  |  | -					totalPostage:0,
 | 
	
		
			
				|  |  | -					usedIntegral:0,
 | 
	
		
			
				|  |  | -					totalPrice:0.00,
 | 
	
		
			
				|  |  | -				},
 | 
	
		
			
				|  |  | +				price:[],
 | 
	
		
			
				|  |  |  				address:null,
 | 
	
		
			
				|  |  |  				carts:[],
 | 
	
		
			
				|  |  |  				checked: false,
 | 
	
	
		
			
				|  | @@ -186,8 +213,15 @@
 | 
	
		
			
				|  |  |  					mark:null,
 | 
	
		
			
				|  |  |  					companyId:null,
 | 
	
		
			
				|  |  |  					companyUserId:null
 | 
	
		
			
				|  |  | -				}
 | 
	
		
			
				|  |  | -				
 | 
	
		
			
				|  |  | +				},
 | 
	
		
			
				|  |  | +				storeId: '',
 | 
	
		
			
				|  |  | +				priceAll:{
 | 
	
		
			
				|  |  | +					payPrice:0,
 | 
	
		
			
				|  |  | +					totalPostage:0,
 | 
	
		
			
				|  |  | +					usedIntegral:0,
 | 
	
		
			
				|  |  | +					totalPrice:0.00,
 | 
	
		
			
				|  |  | +				},
 | 
	
		
			
				|  |  | +				confirmParam: []
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  |  		computed: {
 | 
	
	
		
			
				|  | @@ -207,8 +241,10 @@
 | 
	
		
			
				|  |  |  		onLoad(option) {
 | 
	
		
			
				|  |  |  			this.form.companyId=option.companyId;
 | 
	
		
			
				|  |  |  			this.form.companyUserId=option.companyUserId;
 | 
	
		
			
				|  |  | -			this.cartIds=option.cartIds;
 | 
	
		
			
				|  |  | +			// this.cartIds=option.cartIds;
 | 
	
		
			
				|  |  |  			this.type=option.type;
 | 
	
		
			
				|  |  | +			this.storeId=option.storeId;
 | 
	
		
			
				|  |  | +			this.confirmParam = JSON.parse(decodeURIComponent(option.confirmParam))
 | 
	
		
			
				|  |  |  			this.confirm();
 | 
	
		
			
				|  |  |  			uni.$on('updateAddress', (e) => {
 | 
	
		
			
				|  |  |  				this.address=e;
 | 
	
	
		
			
				|  | @@ -218,6 +254,9 @@
 | 
	
		
			
				|  |  |  			this.getWeixinOrderTemps();
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  |  		methods: {
 | 
	
		
			
				|  |  | +			handleAgreement() {
 | 
	
		
			
				|  |  | +				this.isAgreement = !this.isAgreement;
 | 
	
		
			
				|  |  | +			},
 | 
	
		
			
				|  |  |  			getWeixinOrderTemps:function(){
 | 
	
		
			
				|  |  |  				getWeixinOrderTemps().then(
 | 
	
		
			
				|  |  |  					res => {
 | 
	
	
		
			
				|  | @@ -250,39 +289,55 @@
 | 
	
		
			
				|  |  |  				this.form.useIntegral=e?1:0
 | 
	
		
			
				|  |  |  				this.computed()
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  | -			confirm(item){
 | 
	
		
			
				|  |  | -				let data = {type:this.type,cartIds:this.cartIds};
 | 
	
		
			
				|  |  | -				confirm(data).then(
 | 
	
		
			
				|  |  | -					res => {
 | 
	
		
			
				|  |  | -						if(res.code==200){
 | 
	
		
			
				|  |  | -							 
 | 
	
		
			
				|  |  | -							 this.carts=res.carts;
 | 
	
		
			
				|  |  | -							 this.form.orderKey=res.orderKey;
 | 
	
		
			
				|  |  | -							 if(res.address!=null){
 | 
	
		
			
				|  |  | -								 this.form.addressId=res.address.id;
 | 
	
		
			
				|  |  | -								 this.address=res.address;
 | 
	
		
			
				|  |  | -								 console.log(this.form.addreddId)
 | 
	
		
			
				|  |  | -							 }
 | 
	
		
			
				|  |  | -							 this.computed()
 | 
	
		
			
				|  |  | -						}else{
 | 
	
		
			
				|  |  | -							
 | 
	
		
			
				|  |  | -							uni.showToast({
 | 
	
		
			
				|  |  | -								icon:'none',
 | 
	
		
			
				|  |  | -								title: res.msg,
 | 
	
		
			
				|  |  | -							});
 | 
	
		
			
				|  |  | -						}
 | 
	
		
			
				|  |  | -					},
 | 
	
		
			
				|  |  | -					rej => {}
 | 
	
		
			
				|  |  | -				);
 | 
	
		
			
				|  |  | +			confirm(){
 | 
	
		
			
				|  |  | +				if(this.confirmParam && this.confirmParam.length > 0) {
 | 
	
		
			
				|  |  | +					confirm(this.confirmParam).then(
 | 
	
		
			
				|  |  | +						res => {
 | 
	
		
			
				|  |  | +							if(res.code==200){
 | 
	
		
			
				|  |  | +								this.carts=res.carts.map(item=>({
 | 
	
		
			
				|  |  | +									 ...item,
 | 
	
		
			
				|  |  | +									 markinfo: ""
 | 
	
		
			
				|  |  | +								}));
 | 
	
		
			
				|  |  | +								 this.form.orderKey=res.orderKeys;
 | 
	
		
			
				|  |  | +								 if(res.address!=null){
 | 
	
		
			
				|  |  | +									 this.form.addressId=res.address.id;
 | 
	
		
			
				|  |  | +									 this.address=res.address;
 | 
	
		
			
				|  |  | +								 }
 | 
	
		
			
				|  |  | +								 this.computed()
 | 
	
		
			
				|  |  | +							}else{
 | 
	
		
			
				|  |  | +								uni.showToast({
 | 
	
		
			
				|  |  | +									icon:'none',
 | 
	
		
			
				|  |  | +									title: res.msg,
 | 
	
		
			
				|  |  | +								});
 | 
	
		
			
				|  |  | +							}
 | 
	
		
			
				|  |  | +						},
 | 
	
		
			
				|  |  | +						rej => {}
 | 
	
		
			
				|  |  | +					)
 | 
	
		
			
				|  |  | +				}else {
 | 
	
		
			
				|  |  | +					uni.showToast({
 | 
	
		
			
				|  |  | +						icon: 'none',
 | 
	
		
			
				|  |  | +						title:'订单参数不存在~',
 | 
	
		
			
				|  |  | +					});
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  			computed(){
 | 
	
		
			
				|  |  | -				let data = {companyId:this.form.companyId,couponUserId:this.couponUserId,orderKey:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral};
 | 
	
		
			
				|  |  | +				let data = {
 | 
	
		
			
				|  |  | +					companyId:this.form.companyId,
 | 
	
		
			
				|  |  | +					couponUserId:this.couponUserId,
 | 
	
		
			
				|  |  | +					orderKeys: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
 | 
	
		
			
				|  |  | -							 
 | 
	
		
			
				|  |  | +							 this.price= res.data && res.data.length > 0 ? res.data : []
 | 
	
		
			
				|  |  | +							 this.priceAll = res.data && res.data.length > 0 ? res.data[res.data.length -1] : {
 | 
	
		
			
				|  |  | +								 payPrice:0,
 | 
	
		
			
				|  |  | +								 totalPostage:0,
 | 
	
		
			
				|  |  | +								 usedIntegral:0,
 | 
	
		
			
				|  |  | +								 totalPrice:0.00,
 | 
	
		
			
				|  |  | +							 }
 | 
	
		
			
				|  |  |  						}else{
 | 
	
		
			
				|  |  |  							if(res.code==501){
 | 
	
		
			
				|  |  |  								uni.showToast({
 | 
	
	
		
			
				|  | @@ -311,7 +366,7 @@
 | 
	
		
			
				|  |  |  			// 提交订单
 | 
	
		
			
				|  |  |  			submitOrder() {
 | 
	
		
			
				|  |  |  				var that=this;
 | 
	
		
			
				|  |  | -				if(this.form.orderKey==null){
 | 
	
		
			
				|  |  | +				if(this.form.orderKey==null || this.form.orderKey.length == 0){
 | 
	
		
			
				|  |  |  					uni.showToast({
 | 
	
		
			
				|  |  |  						icon:'none',
 | 
	
		
			
				|  |  |  						title: '订单KEY不存在',
 | 
	
	
		
			
				|  | @@ -325,7 +380,13 @@
 | 
	
		
			
				|  |  |  					});
 | 
	
		
			
				|  |  |  					return;
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  | -				
 | 
	
		
			
				|  |  | +				if(!this.isAgreement) {
 | 
	
		
			
				|  |  | +					uni.showToast({
 | 
	
		
			
				|  |  | +						icon:'none',
 | 
	
		
			
				|  |  | +						title: '购买前请同意相关须知',
 | 
	
		
			
				|  |  | +					});
 | 
	
		
			
				|  |  | +					return;
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  |  				uni.requestSubscribeMessage({
 | 
	
		
			
				|  |  |  					tmplIds: this.temps,
 | 
	
		
			
				|  |  |  					success(res) {
 | 
	
	
		
			
				|  | @@ -338,6 +399,7 @@
 | 
	
		
			
				|  |  |  				
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  			createOrder(){
 | 
	
		
			
				|  |  | +				const mark = this.carts.map(item => item.markinfo)
 | 
	
		
			
				|  |  |  				var that=this;
 | 
	
		
			
				|  |  |  				var data=null;
 | 
	
		
			
				|  |  |  				var tuiUserId=uni.getStorageSync('tuiUserId');
 | 
	
	
		
			
				|  | @@ -345,30 +407,48 @@
 | 
	
		
			
				|  |  |  					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};
 | 
	
		
			
				|  |  | +					data = {orderCreateType:1,tuiUserId:tuiUserId,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:mark,orderKeys:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1,appId: getApp().globalData.appId};
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  				else{
 | 
	
		
			
				|  |  | -					data = {orderCreateType:1,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:this.form.mark,orderKey:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1};
 | 
	
		
			
				|  |  | +					data = {orderCreateType:1,companyId:this.form.companyId,companyUserId:this.form.companyUserId,couponUserId:this.couponUserId,mark:mark,orderKeys:this.form.orderKey,addressId:this.form.addressId,useIntegral:this.form.useIntegral,payType:1,appId: getApp().globalData.appId};
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +				if(this.storeId!=null&& this.storeId>0){
 | 
	
		
			
				|  |  | +					data.storeId=this.storeId;
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  				create(data).then(
 | 
	
		
			
				|  |  |  					res => {
 | 
	
		
			
				|  |  |  						uni.hideLoading()
 | 
	
		
			
				|  |  | -						if(res.code==200){
 | 
	
		
			
				|  |  | +						if(res.code == 200){
 | 
	
		
			
				|  |  |  							uni.hideLoading()
 | 
	
		
			
				|  |  | -							if(res.order.isPrescribe==1){
 | 
	
		
			
				|  |  | +							if(res.data.some(item=> item.order.isPrescribe) == 1) {
 | 
	
		
			
				|  |  |  								setTimeout(function(){
 | 
	
		
			
				|  |  | +									let orderIds = res.data.filter(item=> item.order.isPrescribe == 1).map(it=>it.order.id)
 | 
	
		
			
				|  |  | +									orderIds = orderIds.join(',')
 | 
	
		
			
				|  |  |  									uni.redirectTo({
 | 
	
		
			
				|  |  | -										url:"/pages_shopping/prescribe?orderId="+res.order.id
 | 
	
		
			
				|  |  | +										url:"/pages_shopping/prescribe?orderId="+orderIds+"&combinationOrderId="+encodeURIComponent(res.data[0].order.combinationOrderId)
 | 
	
		
			
				|  |  |  									})
 | 
	
		
			
				|  |  |  								},200);
 | 
	
		
			
				|  |  | -							}
 | 
	
		
			
				|  |  | -							else{
 | 
	
		
			
				|  |  | +							} else {
 | 
	
		
			
				|  |  |  								setTimeout(function(){
 | 
	
		
			
				|  |  |  									uni.redirectTo({
 | 
	
		
			
				|  |  | -										url: '/pages_shopping/paymentOrder?orderId='+res.order.id
 | 
	
		
			
				|  |  | +										url: '/pages_shopping/paymentOrder?combinationOrderId='+encodeURIComponent(res.data[0].order.combinationOrderId)
 | 
	
		
			
				|  |  |  									})
 | 
	
		
			
				|  |  |  								},200);
 | 
	
		
			
				|  |  |  							}
 | 
	
		
			
				|  |  | +							// if(res.order.isPrescribe==1){
 | 
	
		
			
				|  |  | +							// 	setTimeout(function(){
 | 
	
		
			
				|  |  | +							// 		uni.redirectTo({
 | 
	
		
			
				|  |  | +							// 			url:"/pages_shopping/prescribe?orderId="+res.order.id
 | 
	
		
			
				|  |  | +							// 		})
 | 
	
		
			
				|  |  | +							// 	},200);
 | 
	
		
			
				|  |  | +							// }
 | 
	
		
			
				|  |  | +							// else{
 | 
	
		
			
				|  |  | +							// 	setTimeout(function(){
 | 
	
		
			
				|  |  | +							// 		uni.redirectTo({
 | 
	
		
			
				|  |  | +							// 			url: '/pages_shopping/paymentOrder?orderId='+res.order.id
 | 
	
		
			
				|  |  | +							// 		})
 | 
	
		
			
				|  |  | +							// 	},200);
 | 
	
		
			
				|  |  | +							// }
 | 
	
		
			
				|  |  |  							return;
 | 
	
		
			
				|  |  |  						}
 | 
	
		
			
				|  |  |  						else{
 | 
	
	
		
			
				|  | @@ -404,7 +484,7 @@
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -<style lang="scss">
 | 
	
		
			
				|  |  | +<style lang="scss" scoped>
 | 
	
		
			
				|  |  |  	.inner-box{
 | 
	
		
			
				|  |  |  		padding: 20upx 20upx 140upx;
 | 
	
		
			
				|  |  |  		.address-box{
 | 
	
	
		
			
				|  | @@ -458,8 +538,29 @@
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | +		.shopbox {
 | 
	
		
			
				|  |  | +			background: #FFFFFF;
 | 
	
		
			
				|  |  | +			border-radius: 16rpx;
 | 
	
		
			
				|  |  | +			margin: 20rpx 0;
 | 
	
		
			
				|  |  | +			.points {
 | 
	
		
			
				|  |  | +				padding: 0 !important;
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +			.remarks {
 | 
	
		
			
				|  |  | +				padding: 0 !important;
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		.shopbox-name {
 | 
	
		
			
				|  |  | +			padding: 30rpx 30rpx 0 30rpx;
 | 
	
		
			
				|  |  | +			font-family: PingFang SC, PingFang SC;
 | 
	
		
			
				|  |  | +			font-weight: bold;
 | 
	
		
			
				|  |  | +			font-size: 30rpx;
 | 
	
		
			
				|  |  | +			color: #111;
 | 
	
		
			
				|  |  | +			overflow: hidden;
 | 
	
		
			
				|  |  | +			white-space: nowrap;
 | 
	
		
			
				|  |  | +			text-overflow: ellipsis;
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  		.goods-list{
 | 
	
		
			
				|  |  | -			margin-top: 20upx;
 | 
	
		
			
				|  |  | +			// margin-top: 20upx;
 | 
	
		
			
				|  |  |  			padding: 0 30upx;
 | 
	
		
			
				|  |  |  			background-color: #FFFFFF;
 | 
	
		
			
				|  |  |  			border-radius: 16upx;
 | 
	
	
		
			
				|  | @@ -493,7 +594,7 @@
 | 
	
		
			
				|  |  |  							display: inline-block;
 | 
	
		
			
				|  |  |  							padding: 0 6upx;
 | 
	
		
			
				|  |  |  							height: 30upx;
 | 
	
		
			
				|  |  | -							background: linear-gradient(90deg, #2583EB 0%, #92C1F5 100%);
 | 
	
		
			
				|  |  | +							background: linear-gradient(90deg, #66b2ef 0%, #0bb3f2 100%);
 | 
	
		
			
				|  |  |  							border-radius: 4upx;
 | 
	
		
			
				|  |  |  							margin-right: 10upx;
 | 
	
		
			
				|  |  |  							font-size: 22upx;
 | 
	
	
		
			
				|  | @@ -578,12 +679,30 @@
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | +		.price-info {
 | 
	
		
			
				|  |  | +			background: #FFFFFF;
 | 
	
		
			
				|  |  | +			border-radius: 16upx;
 | 
	
		
			
				|  |  | +			&-title {
 | 
	
		
			
				|  |  | +					padding: 30rpx 30rpx 20rpx 30rpx;
 | 
	
		
			
				|  |  | +					font-family: PingFang SC, PingFang SC;
 | 
	
		
			
				|  |  | +					font-weight: 500;
 | 
	
		
			
				|  |  | +					font-size: 30rpx;
 | 
	
		
			
				|  |  | +					color: #111;
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +			&-unit {
 | 
	
		
			
				|  |  | +				font-size: 24rpx;
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +			&-num {
 | 
	
		
			
				|  |  | +				font-size: 28rpx;
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  		.points{
 | 
	
		
			
				|  |  |  			height: 88upx;
 | 
	
		
			
				|  |  | +			width: 100%;
 | 
	
		
			
				|  |  |  			padding: 0 30upx;
 | 
	
		
			
				|  |  | +			box-sizing: border-box;
 | 
	
		
			
				|  |  |  			background: #FFFFFF;
 | 
	
		
			
				|  |  |  			border-radius: 16upx;
 | 
	
		
			
				|  |  | -			 
 | 
	
		
			
				|  |  |  			display: flex;
 | 
	
		
			
				|  |  |  			align-items: center;
 | 
	
		
			
				|  |  |  			justify-content: space-between;
 | 
	
	
		
			
				|  | @@ -624,7 +743,6 @@
 | 
	
		
			
				|  |  |  			padding: 0 30upx;
 | 
	
		
			
				|  |  |  			background: #FFFFFF;
 | 
	
		
			
				|  |  |  			border-radius: 16upx;
 | 
	
		
			
				|  |  | -			margin-top: 20upx;
 | 
	
		
			
				|  |  |  			display: flex;
 | 
	
		
			
				|  |  |  			align-items: center;
 | 
	
		
			
				|  |  |  			input{
 | 
	
	
		
			
				|  | @@ -643,13 +761,20 @@
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  | +	.agreement {
 | 
	
		
			
				|  |  | +		font-size: 28rpx;
 | 
	
		
			
				|  |  | +		font-family: PingFang SC;
 | 
	
		
			
				|  |  | +		font-weight: 500;
 | 
	
		
			
				|  |  | +		color: red;
 | 
	
		
			
				|  |  | +		padding: 30rpx 0;
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  |  	.btn-foot{
 | 
	
		
			
				|  |  |  		box-sizing: border-box;
 | 
	
		
			
				|  |  |  		width: 100%;
 | 
	
		
			
				|  |  |  		height: 121upx;
 | 
	
		
			
				|  |  |  		background: #FFFFFF;
 | 
	
		
			
				|  |  | -		padding: 16upx 30upx 16upx 60upx;
 | 
	
		
			
				|  |  | +		padding: 16upx;
 | 
	
		
			
				|  |  |  		display: flex;
 | 
	
		
			
				|  |  |  		align-items: center;
 | 
	
		
			
				|  |  |  		justify-content: flex-end;
 | 
	
	
		
			
				|  | @@ -700,13 +825,13 @@
 | 
	
		
			
				|  |  |  				font-family: PingFang SC;
 | 
	
		
			
				|  |  |  				font-weight: bold;
 | 
	
		
			
				|  |  |  				color: #FFFFFF;
 | 
	
		
			
				|  |  | -				background: #2583EB;
 | 
	
		
			
				|  |  | +				background: #0bb3f2;
 | 
	
		
			
				|  |  |  				border-radius: 44upx;
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  | -</style>
 | 
	
		
			
				|  |  | -<style lang="less" scoped>
 | 
	
		
			
				|  |  | +// </style>
 | 
	
		
			
				|  |  | +// <style lang="less" scoped>
 | 
	
		
			
				|  |  |  	.coupon {
 | 
	
		
			
				|  |  |  	  height: 100%;
 | 
	
		
			
				|  |  |  	}
 |