Browse Source

111111111

ZZ 1 month ago
parent
commit
16a0b7c320

+ 21 - 0
mer_mer_admin/src/api/marketing.js

@@ -746,3 +746,24 @@ export function liveGoodsSortApi(id, sort) {
     method: 'GET',
   });
 }
+
+
+/**
+ * 配送费信息
+ */
+export function settingsDeliveryFeeData() {
+  return request({
+    url: `/admin/merchant/market/info`,
+    method: 'get',
+  });
+}
+
+ * 配送费信息修改
+ */
+export function settingsDeliveryFeeUpdate(data) {
+  return request({
+    url: `/admin/merchant/market/update`,
+    method: 'post',
+    data,
+  });
+}

+ 21 - 0
mer_mer_admin/src/router/modules/marketing.js

@@ -170,6 +170,27 @@ const marketingRouter = {
         },
       ],
     },
+    {
+      path: 'settings',
+      name: 'settings',
+      meta: {
+        title: '营销设置',
+        noCache: true,
+      },
+      redirect: 'noRedirect',
+      component: () => import('@/views/marketing/settings/index'),
+      children: [
+        {
+          path: 'deliveryFee',
+          name: 'DeliveryFee',
+          meta: {
+            title: '配送费设置',
+            noCache: true,
+          },
+          component: () => import('@/views/marketing/settings/deliveryFee/index'),
+        },
+      ],
+    },
   ],
 };
 

+ 166 - 0
mer_mer_admin/src/views/marketing/settings/deliveryFee/index.vue

@@ -0,0 +1,166 @@
+<template>
+  <div class="divBox">
+    <el-card
+      class="box-card"
+      :bordered="false"
+      shadow="never"
+      :body-style="{ padding: '40px 50px' }"
+    >
+      <el-form
+        ref="promoterForm"
+        :model="promoterForm"
+        :rules="rules"
+        label-width="200px"
+        class="demo-promoterForm"
+        v-loading="loading"
+      >
+
+        <el-form-item
+          label="首单立减:"
+          prop="firstImmedReduct"
+        >
+          <el-input-number
+            v-model.trim="promoterForm.firstImmedReduct"
+            :min="0"
+            :max="9999"
+            label="首单立减:"
+          ></el-input-number>
+          <span>元</span>
+        </el-form-item>
+        <el-form-item
+          label="起送费:"
+          prop="deliveryFee"
+        >
+          <el-input-number
+            v-model.trim="promoterForm.deliveryFee"
+            :min="0"
+            :max="9999"
+            label="起送费"
+          ></el-input-number>
+          <span>元</span>
+        </el-form-item>
+        <el-form-item
+          label="打包费:"
+          prop="packingFee"
+        >
+          <el-input-number
+            v-model.trim="promoterForm.packingFee"
+            :min="0"
+            :max="9999"
+            label="打包费"
+          ></el-input-number>
+          <span>元</span>
+        </el-form-item>
+        <el-form-item
+          label="配送费开关:"
+          prop="isSwitch"
+        >
+          <el-switch
+            v-model="promoterForm.isSwitch"
+            :active-value="true"
+            :inactive-value="false"
+            active-text="开启"
+            inactive-text="关闭"
+          >
+          </el-switch>
+        </el-form-item>
+        <el-form-item
+          label="减免配送费:"
+          prop="isFullExemption"
+          v-if="promoterForm.isSwitch"
+        >
+          <el-radio-group v-model="promoterForm.isFullExemption">
+            <el-radio :label="false">全免</el-radio>
+            <el-radio :label="true">免部分</el-radio>
+          </el-radio-group>
+          <el-input-number
+            v-if="promoterForm.isFullExemption"
+            v-model.trim="promoterForm.reduceFee"
+            :min="0"
+            :max="9999"
+            label="减免费用"
+          ></el-input-number>
+          <span v-if="promoterForm.isFullExemption">元</span>
+        </el-form-item>
+
+        <el-form-item>
+          <el-button
+            type="primary"
+            :loading="loading"
+            @click="submitForm('promoterForm')"
+            v-hasPermi="['platform:rider:fee:add']"
+          >提交</el-button>
+        </el-form-item>
+      </el-form>
+    </el-card>
+  </div>
+</template>
+
+<script>
+// +---------------------------------------------------------------------
+// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+// +---------------------------------------------------------------------
+// | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+// +---------------------------------------------------------------------
+// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+// +---------------------------------------------------------------------
+// | Author: CRMEB Team <admin@crmeb.com>
+// +---------------------------------------------------------------------
+import { settingsDeliveryFeeData, settingsDeliveryFeeUpdate } from '@/api/marketing';
+import * as selfUtil from '@/utils/ZBKJIutil.js';
+import { checkPermi } from '@/utils/permission'; // 权限判断函数
+import { Debounce } from '@/utils/validate';
+export default {
+  name: 'DeliveryFee',
+  data () {
+    return {
+      promoterForm: {},
+      loading: false,
+      rules: {
+        firstImmedReduct: [{ required: true, message: '请输入立减金额', trigger: 'change' }],
+        deliveryFee: [{ required: true, message: '请输入起送费', trigger: 'blur' }],
+        packingFee: [{ required: true, message: '请输入打包费', trigger: 'blur' }],
+        isFullExemption: [{ required: true, message: '请选择减免类型', trigger: 'change' }],
+      },
+    };
+  },
+  mounted () {
+    if (checkPermi(['platform:rider:fee:add'])) this.getDetal();
+  },
+  methods: {
+    checkPermi,
+    getDetal () {
+      this.loading = true;
+      settingsDeliveryFeeData()
+        .then((res) => {
+          this.loading = false;
+          this.promoterForm = res;
+        })
+        .catch((res) => {
+          this.loading = false;
+          this.$message.error(res.message);
+        });
+    },
+    submitForm: Debounce(function (formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.loading = true;
+          settingsDeliveryFeeUpdate(this.promoterForm)
+            .then((res) => {
+              this.loading = false;
+              this.getDetal();
+              this.$message.success('提交成功');
+            })
+            .catch((err) => {
+              this.loading = false;
+            });
+        } else {
+          return false;
+        }
+      });
+    }),
+  },
+};
+</script>
+
+<style scoped lang="scss"></style>

+ 11 - 0
mer_mer_admin/src/views/marketing/settings/index.vue

@@ -0,0 +1,11 @@
+<template>
+  <div>
+    <router-view />
+  </div>
+</template>
+
+<script>
+export default {};
+</script>
+
+<style lang="sass" scoped></style>

+ 2 - 2
mer_mer_admin/src/views/product/creatProduct/index.vue

@@ -86,11 +86,12 @@
             <el-form-item label="商户商品分类:" prop="cateIds">
               <el-cascader
                 class="from-ipt-width"
+                @change="onChangeCategory"
                 v-model="formValidate.cateIds"
                 :options="merProductClassify"
                 :props="props2"
                 clearable
-                :show-all-levels="false"
+                :show-all-levels="true"
                 :disabled="isDisabled"
               />
               <el-button
@@ -105,7 +106,6 @@
             <el-form-item label="平台商品分类:" prop="categoryId">
               <el-cascader
                 class="from-ipt-width"
-                @change="onChangeCategory"
                 v-model="formValidate.categoryId"
                 :options="productClassify"
                 :props="props1"

+ 0 - 39
mer_mer_admin/src/views/systemSetting/modifyStoreInfo/index.vue

@@ -132,45 +132,6 @@
               >
               </el-switch>
             </el-form-item>
-            <el-form-item label="首单立减:" prop="alertStock">
-              <el-input-number
-                v-model.trim="merInfoForm.alertStock"
-                :min="1"
-                :max="9999"
-                label="起送费"
-              ></el-input-number>
-            </el-form-item>
-            <el-form-item label="起送费:" prop="alertStock">
-              <el-input-number
-                v-model.trim="merInfoForm.alertStock"
-                :min="1"
-                :max="9999"
-                label="起送费"
-              ></el-input-number>
-            </el-form-item>
-            <el-form-item label="配送费开关:" prop="alertStock">
-              <el-switch
-                v-model="merInfoForm.isTakeTheir"
-                :active-value="true"
-                :inactive-value="false"
-                active-text="开启"
-                inactive-text="关闭"
-              >
-              </el-switch>
-            </el-form-item>
-            <el-form-item label="是否减免配送费:" prop="electrPrintingSwitch" v-if="merInfoForm.isTakeTheir">
-              <el-radio-group v-model="merInfoForm.electrPrintingSwitch">
-                <el-radio :label="0">全免</el-radio>
-                <el-radio :label="1">免部分</el-radio>
-              </el-radio-group>
-              <el-input-number
-                v-if="merInfoForm.electrPrintingSwitch === 1"
-                v-model.trim="merInfoForm.alertStock"
-                :min="1"
-                :max="9999"
-                label="起送费"
-              ></el-input-number>
-            </el-form-item>
             <el-form-item label="小票打印开关:" prop="receiptPrintingSwitch">
               <el-radio-group v-model="merInfoForm.receiptPrintingSwitch">
                 <!--                  小票打印开关:0关闭,1=手动打印,2=自动打印,3=自动和手动-->

+ 2 - 2
mer_plat_admin/src/views/rider/list/creatRider.vue

@@ -47,14 +47,14 @@
         </div>
       </div>
     </div>
-    <div class="prompt">
+    <!-- <div class="prompt">
       <el-alert
         title="骑手登录账号为手机号,初始密码为000000,可从个人中心修改密码"
         type="warning"
         effect="light"
       >
       </el-alert>
-    </div>
+    </div> -->
     <el-form
       v-loading="loadingFrom"
       ref="dataForm"

+ 1 - 1
mer_uniapp/components/navBar.vue

@@ -284,7 +284,7 @@
 	}
 
 	.nav_title {
-		width: 200rpx;
+		// width: 200rpx;
 		color: #fff;
 		font-size: 36rpx;
 		position: fixed;

+ 14 - 8
mer_uniapp/components/riderOrder/index.vue

@@ -9,7 +9,7 @@
 			</view>
 		</view>
 		<view class="order-content">
-			<view class="order-info">
+			<view class="order-info" v-if="statusId !== 1">
 				<text class="store-name">{{orderInfo.merName}}</text>
 
 				<view class="scroll-container">
@@ -18,7 +18,6 @@
 						<text>{{item.productName}}x{{item.payNum}}</text>
 					</view>
 				</view>
-
 				<view class="container2">
 					<view style="border-right: 2rpx solid #D5D6DC">
 						<image src="/static/img/ic-iphone1.png" class="image2" />
@@ -33,7 +32,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="bold-size flex-y-center" style="margin: 19rpx 0;">
+			<view class="bold-size flex-y-center" style="padding: 19rpx 0;">
 				<view class="icon-info"></view>
 				<text>配送详情</text>
 			</view>
@@ -75,6 +74,10 @@
 			isButton: {
 				type: Boolean,
 				default: true
+			},
+			statusId: {
+				type: Number,
+				default: null
 			}
 		},
 		data() {
@@ -110,7 +113,7 @@
 		display: flex;
 		align-items: center;
 		justify-content: space-between;
-		padding-bottom: 10rpx;
+		padding: 17rpx;
 		border-bottom: 2rpx dashed #D6D7DC;
 	}
 
@@ -121,6 +124,7 @@
 		font-weight: 500;
 		font-size: 27rpx;
 		color: #141414;
+		z-index: 9999;
 	}
 
 	.onBold-size {
@@ -130,7 +134,7 @@
 	}
 
 	.order-content {
-		padding: 45rpx 0;
+		padding: 17rpx 0 38rpx 0;
 
 		.box-item {
 			display: flex;
@@ -244,11 +248,13 @@
 		background: $bg-color-primary;
 		margin-right: 15rpx;
 	}
-	
+
 	.line {
+		z-index: 1;
 		position: absolute;
-		width: 2rpx;
+		left: 28rpx;
+		width: 1rpx;
 		height: 100%;
-		border-left: 2rpx dashed $bg-color-primary;
+		border-left: 1rpx dashed $bg-color-primary;
 	}
 </style>

+ 1245 - 360
mer_uniapp/pages/goods/order_confirm/index.vue

@@ -1,474 +1,1359 @@
 <template>
-	<view class="container" :style="{ height: winHeight+ 'px' }">
-		<!-- 状态栏高度 -->
-		<view :style="{ height: `${statusBarHeight+20}px` }"></view>
-		<!-- 进行中/历史订单 -->
-		<view class="status-bar">
-			<view>
-				<text :class="isShow? 'status-true': 'status-false'" @click="statusClick">外卖配送</text>
-				<text :class="!isShow? 'status-true': 'status-false'" @click="statusClick">到店自取<text class="box-txt">(15分钟后取餐)</text></text>
-			</view>
+	<view :data-theme="theme">
+		<!-- #ifndef APP-PLUS -->
+		<view class='cart_nav'>
+			<nav-bar :navTitle='navTitle' iconColor='#fff' :isBackgroundColor="true" ref="navBarRef"></nav-bar>
 		</view>
 
-		<view style="background-color: white;border-radius: 23rpx;margin-bottom: 10rpx;padding: 19rpx 38rpx 38rpx 38rpx">
-			<view class='address' @tap='onAddress'>
-				<view class='addressCon' v-if="addressInfo.realName">
-					<view class='name acea-row boxnamae'>
-						<view class="line1 select-name">{{addressInfo.realName}}</view>
-						<view class='phone'>{{addressInfo.phone}}</view>
+		<!-- #endif -->
+		<view class='order-submission' @touchstart="touchStart">
+			<!-- 拼团切换样式 -->
+			<view class="allAddress" v-if="Number(orderInfoVo.secondType)<5 && Number(orderInfoVo.secondType)!==2&&orderInfoVo.type==2">
+				<view class="h-96 relative" v-if="orderInfoVo.merchantInfoList[0].deliveryMethodMer.split(',').length==2">
+					<view class="w-full abs-lb rd-t-24rpx flex bg--w111-fff">
+						<view class="flex-center w-50p h-76 fs-28 rd-lt-24rpx z-2" :class="shippingType == 1 ? 'bg--w111-fff font_color' : 'bg-primary-light'"
+						 @tap="addressType(1)">商家配送</view>
+						<view class="flex-center w-50p h-76 fs-28 rd-rt-24rpx z-2" :class="shippingType == 2 ? 'bg--w111-fff font_color' : 'bg-primary-light'"
+						 @tap="addressType(2)">到店自提</view>
 					</view>
-					<view class="acea-row">
-						<view ><text class='default  font_color' v-if="addressInfo.isDefault">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{ addressInfo.street}}{{addressInfo.detail}}</view>
+					<view class="w-50p rd-t-24rpx bg--w111-fff h-96" :class="shippingType == 1 ? 'abs-lt' : 'abs-rt'">
+						<view class="w-full h-full relative active-card"></view>
 					</view>
 				</view>
-				<view class='addressCon' v-else>
-					<view class='setaddress'>设置收货地址</view>
+				<view class='address   group acea-row row-between-wrapper' :class="orderInfoVo.merchantInfoList[0].deliveryMethodMer.split(',').length == 1?'bd-r-14':''  "
+				 @tap='onAddress' v-if='shippingType == 1'>
+					<view class='addressCon' v-if="addressInfo.realName">
+						<view class='name acea-row'>
+							<view class="line1 select-name">{{addressInfo.realName}}</view>
+							<view class='phone'>{{addressInfo.phone}}</view>
+						</view>
+						<view class="acea-row">
+							<view class="line1"><text class='default  font_color' v-if="addressInfo.isDefault">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{ addressInfo.street}}{{addressInfo.detail}}</view>
+						</view>
+					</view>
+					<view class='addressCon' v-else>
+						<view class='setaddress'>设置收货地址</view>
+					</view>
+					<view class='iconfont icon-jiantou mt30'></view>
+				</view>
+				<view class='address group acea-row row-between-wrapper' v-if='shippingType == 2' :class="orderInfoVo.merchantInfoList[0].deliveryMethodMer.split(',').length == 1?'bd-r-14':''  ">
+					<view class='addressCon' v-for="(item, index) in merchantOrderVoList" :key="index" @click="goMap(item)">
+						<view class='name acea-row'>
+							<view class="line1 select-name">{{item.merName}}</view>
+							<view class='phone'>{{item.phone}}</view>
+						</view>
+						<view class="acea-row">
+							<view class="line1">{{item.addressDetail}}</view>
+						</view>
+					</view>
+					<view class='iconfont icon-jiantou mt30'></view>
+				</view>
+				<view class='line'>
+					<image src='../static/images/line.png'></image>
 				</view>
-				<view class='iconfont icon-jiantou ' style="font-size: 30rpx;"></view>
-			</view>
-			<view class="item-go" @tap="goIndex = true" :class="goIndex ? 'item-go-avt' : ''">
-				<text style="font-weight: 600;font-size: 27rpx;">立即配送</text>
-				<text style="font-weight: 500;font-size: 23rpx;margin-left: 76rpx">预计10:12送达</text>
-				<image class="go-img"></image>
 			</view>
-			<view style="margin-top: 10rpx;" class="item-go" @tap="goIndex = false" :class="!goIndex ? 'item-go-avt' : ''">
-				<text style="font-weight: 600;font-size: 27rpx;">预约配送</text>
-				<text style="font-weight: 500;font-size: 23rpx;margin-left: 76rpx">选择时间 》</text>
-				<image class="go-img"></image>
+			<view v-if="Number(orderInfoVo.secondType)<5 && Number(orderInfoVo.secondType)!==2&&orderInfoVo.type!=2" class="allAddress">
+				<view class='address acea-row row-between-wrapper' @tap='onAddress'>
+					<view class='addressCon' v-if="addressInfo.realName">
+						<view class='name'>{{addressInfo.realName}}
+							<text class='phone'>{{addressInfo.phone}}</text>
+						</view>
+						<view class="acea-row line2">
+							<text class='default font_color' v-if="addressInfo.isDefault">[默认]</text>
+							<text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{ addressInfo.street}}{{addressInfo.detail}}</text>
+						</view>
+					</view>
+					<view class='addressCon' v-else>
+						<view class='setaddress'>设置收货地址</view>
+					</view>
+					<view class='iconfont icon-jiantou'></view>
+				</view>
+				<view class='line'>
+					<image src='../static/images/line.png'></image>
+				</view>
 			</view>
-		</view>
+			<view class="borderPad">
+				<view v-for="(item, index) in merchantOrderVoList" :key="index" class='wrapper borRadius14'>
+					<orderGoods :cartInfo="item.orderInfoList" :orderInfo="item" :secondType="secondType" :orderProNum="orderProNum"
+					 :isShowBtn="false">
+					</orderGoods>
+					<view v-show="Number(orderInfoVo.secondType)===0&&orderInfoVo.type!=2" class="boxs">
+						<view class='item acea-row row-between-wrapper'>
+							<view>配送方式</view>
+							<view v-if="item.deliveryMethodMer.length===3 && item.takeTheirSwitch" class='discount acea-row row-middle'>
+								<text @tap="openShowBox(item,index)">{{item.shippingType === 1 ? '商家配送' : '到店自提'}}</text>
 
-		<view class="item-goods">
-			<text>{{detils.merchantInfoList[0].merName}}</text>
-			<view class="good" v-for="(good, key) in goods_list" :key="key">
-				<image :src="good.image" class="image"></image>
-				<view class="right">
-					<text class="name">{{ good.productName }}</text>
-					<text class="tips">x {{ good.payNum }}</text>
-					<view class="price_and_action">
-						<text class="price">¥{{ good.price }}</text>
-						<view class="btn-group">
-							<view class="dot"></view>
+								<text @tap="openShowBox(item,index)" class='iconfont icon-jiantou'></text>
+							</view>
+							<view v-else class='discount'>
+								{{item.shippingType === 1 ? '商家配送' : '到店自提'}}
+							</view>
+						</view>
+						<view v-if="item.shippingType == 2 && item.takeTheirSwitch" class="store-address acea-row">
+							<view>
+								<view class="name phone">{{item.phone}}</view>
+								<view class="name w-480px">{{item.addressDetail}}</view>
+							</view>
+							<view class="map" @click="goMap(item)">
+								<text class="iconfont icon-chakanditu"></text>
+								<view class="map_text">查看地图</view>
+							</view>
+						</view>
+					</view>
+					<view v-show="item.shippingType === 1 && Number(orderInfoVo.secondType)===0" class='item acea-row row-between-wrapper'>
+						<view>快递费用</view>
+						<view v-if='!item.freightFee || item.freightFee == 0' class="noCoupon">免运费</view>
+						<view v-else class='money'>¥{{item.freightFee}}</view>
+					</view>
+					<view v-show="item.svipDiscountPrice != 0&&orderInfoVo.type!=2" class='item acea-row row-between-wrapper'>
+						<view>会员优惠</view>
+						<view class='money'>-¥{{item.svipDiscountPrice}}</view>
+					</view>
+					<view v-if="isProductType" class='item acea-row row-between-wrapper'>
+						<view>店铺优惠</view>
+						<view v-if="item.merCouponUserList && item.merCouponUserList.length" @tap='couponTap(item.merCouponUserList,item.merId, index)'>
+							<view class='discount acea-row row-between-wrapper'>
+								<text class="couponTitle line1">{{item.couponFee==0?`有${item.merCouponUserList.length}张优惠券可选`:`-¥${item.couponFee}`}}</text>
+								<text class='iconfont icon-jiantou'></text>
+							</view>
 						</view>
+						<view v-else class="noCoupon">暂无优惠券</view>
+					</view>
+					<view class='item acea-row row-between-wrapper' v-if="textareaStatus" style="height: auto;">
+						<view>买家留言</view>
+						<input placeholder-class='placeholder' value="" name="mark" placeholder='选填买家留言' v-model="item.remark" @input='bindHideKeyboard(item.remark,index)'
+						 style="width: 484rpx;text-align: right;"></input>
 					</view>
 				</view>
+				<!--商品关联系统表单-->
+				<view v-if="orderInfoVo.systemFormValue && orderInfoVo.systemFormValue.length" class='wrapper borRadius14'>
+					<systemFrom v-model="orderInfoVo.systemFormValue"></systemFrom>
+					<!--					<systemFrom :orderForm="orderInfoVo.systemFormValue" ></systemFrom>-->
+				</view>
+				<view class='moneyList borRadius14'>
+					<view v-show="secondType !== ProductTypeEnum.Integral" class='item acea-row row-between-wrapper'>
+						<view>商品总价</view>
+						<view class='money'>¥{{orderInfoVo.proTotalFee || 0}}</view>
+					</view>
+					<view class='item acea-row row-between-wrapper' v-if="parseInt(orderInfoVo.freightFee) > 0">
+						<view>运费:</view>
+						<view class='money'>+¥{{orderInfoVo.freightFee}}</view>
+					</view>
+					<view v-show="orderInfoVo.svipDiscountPrice != 0 &&orderInfoVo.type!=2" class='item acea-row row-between-wrapper'>
+						<view>会员优惠</view>
+						<view class='money'>-¥{{orderInfoVo.svipDiscountPrice}}</view>
+					</view>
+					<view class='item acea-row row-between-wrapper' v-if="parseInt(merCouponFee) > 0 && isProductType">
+						<view>店铺优惠</view>
+						<view class='money'>-¥{{merCouponFee}}</view>
+					</view>
+					<view v-if="isProductType" class='item acea-row row-between-wrapper'>
+						<view>平台优惠</view>
+						<view v-if="orderInfoVo.platCouponUserList && orderInfoVo.platCouponUserList.length" class='discount acea-row row-between-wrapper'
+						 @tap='couponTap(orderInfoVo.platCouponUserList,0)'>
+							<text class="couponTitle line1">{{platCouponFee==0?`有${orderInfoVo.platCouponUserList.length}张优惠券可选`:`-¥${platCouponFee}`}}</text>
+							<text class='iconfont icon-jiantou'></text>
+						</view>
+						<view v-else class="noCoupon">暂无优惠券</view>
+					</view>
+					<view class='item acea-row row-between-wrapper' v-if="orderInfoVo.integralDeductionSwitch && isProductType">
+						<view>积分抵扣</view>
+						<view class='discount acea-row row-middle'>
+							<view class="mr14"> {{isUseIntegral ? "使用积分":"当前积分"}}
+								<text class='num font_color'>{{ isUseIntegral ? orderInfoVo.surplusIntegral : orderInfoVo.userIntegral}}</text>
+							</view>
+							<checkbox-group @change="ChangeIntegral">
+								<checkbox :checked='isUseIntegral ? true : false' :disabled="orderInfoVo.userIntegral==0 && !isUseIntegral" />
+							</checkbox-group>
+						</view>
+					</view>
+
+					<view class='item acea-row row-between-wrapper' v-if="Number(orderInfoVo.deductionPrice) > 0">
+						<view>抵扣金额</view>
+						<view class='money'>-¥{{orderInfoVo.deductionPrice}}</view>
+					</view>
+
+				</view>
+				<view style='height:120rpx;'></view>
 			</view>
-			<view style="width: 100%; height: 2rpx;border: 2rpx dashed #D6D7DC;position: relative;bottom: 20rpx;"></view>
-			<view class='item-con'>
-				<text>打包费</text>
-				<text>¥2</text>
-			</view>
-			<view class='item-con' style="margin: 0;">
-				<text>用户配送费</text>
-				<text style="text-decoration: line-through;">¥2 <text>免费配送</text></text>
-			</view>
-			<view style="font-weight: 400;font-size: 21rpx;color: #999999;margin-bottom: 10rpx;">配送高峰期,可能配送费上调</view>
-			<view class='item-con'>
-				<text @tap="isZhuan = !isZhuan">已享优惠 <text :style="{ transform: isZhuan ? 'rotate(90deg)' : 'rotate(-90deg)'}"
-					 class='iconfont icon-jiantou xuanzhuan' style="font-size: 22rpx;display: inline-block;"></text></text>
-				<text>- ¥2</text>
-			</view>
-			<view v-if="isZhuan" class='item-con' style="background: #F8F9FB;padding: 8rpx 19rpx;font-weight: 500;font-size: 21rpx;color: #FF6702;">
-				<text>活动红包</text>
-				<text>- ¥2</text>
+			<view class='footer acea-row row-between-wrapper'>
+				<view class="acea-row row-middle">合计:
+					<!-- 积分价格 -->
+					<PointsPrice v-if="orderInfoVo.secondType === ProductTypeEnum.Integral" :pointsPrice="orderInfoVo"
+					 :pointsGoodsStyle="hotPointsStyle"></PointsPrice>
+					<!-- 其他价格 -->
+					<text v-else class='price_color'>¥{{orderInfoVo.payFee || 0}}</text>
+				</view>
+				<view class='settlement' style='z-index:100' @tap="SubOrder">
+					{{secondType === ProductTypeEnum.Integral?"确认兑换":"立即下单"}}
+				</view>
 			</view>
-			<!-- 备注 -->
-			<view>备注:</view>
-			<textarea class="remark-txt" v-model="remark">
-				
-			</textarea>
-			
 		</view>
-		<viwe style="height: 200rpx;"></viwe>
+		<couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" :openType='openType' @ChangCoupons="ChangCoupons"
+		 :orderShow="orderShow" :surplusFee="surplusFee"></couponListWindow>
 
-		<!-- 购物车栏 begin -->
-		<view class="cart-box" :style="{top: (winHeight - 100) + 'px'}">
-			<view style="margin-left: 39rpx;">
-				<view style="font-weight: 600;font-size: 27rpx;color: #FFFFFF;" class="price">¥{{ total }}</view>
-				<text style="font-weight: 400;font-size: 23rpx;color: #999999;">已优惠¥2</text>
-			</view>
-			<button type="primary" class="pay-btn bg-color" @tap="orderCreate">
-				去支付
-			</button>
+		<view v-if="isShowBox">
+			<checkDelivery :isShowBox="isShowBox" :activeObj="activeObj" @close="boxClose" @confirmBtn="getShippingType">
+			</checkDelivery>
 		</view>
-		<!-- 购物车栏 end -->
+		<!-- 满员提示 -->
+		<uni-popup ref="sh_popup" background-color="#fff" borderRadius="10px">
+			<view class="sh_popup-content">
+				<view class="sh_popup_title">
+					提示
+				</view>
+				<view class="sh_popup_text">
+					该团已拼成,是否自行开团?
+				</view>
+				<view class="sh_popup_btn">
+					<view class="no_btn btn font_color" @click="popupClose">返回首页</view>
+					<view class="yes_btn btn" @click="toAudit">去开团</view>
+				</view>
+			</view>
+		</uni-popup>
 	</view>
 </template>
-
 <script>
+	// +----------------------------------------------------------------------
+	// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+	// +----------------------------------------------------------------------
+	// | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+	// +----------------------------------------------------------------------
+	// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+	// +----------------------------------------------------------------------
+	// | Author: CRMEB Team <admin@crmeb.com>
+	// +----------------------------------------------------------------------
+	import {
+		getCouponsOrderPrice,
+		orderCreate,
+		postOrderComputed,
+		loadPreOrderApi
+	} from '@/api/order.js';
 	import {
 		getAddressDetail,
-		getAddressDefault,
-		getAddressList,
+		getAddressDefault
 	} from '@/api/user.js';
+	// import {
+	// 	openPaySubscribe
+	// } from '@/utils/SubscribeMessage.js';
 	import {
-	
-		loadPreOrderApi,
-		orderCreate
-	} from '@/api/order.js';
-	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
+		takeTheirApi
+	} from '@/api/merchant.js';
+	import {
+		CACHE_LONGITUDE,
+		CACHE_LATITUDE
+	} from '@/config/cache.js';
+	import dayjs from "@/plugin/dayjs/dayjs.min.js";
+	import couponListWindow from '../components/couponListWindow';
+	import orderGoods from '../components/orderGoods'
+	import navBar from '@/components/navBar';
+	import checkDelivery from '../components/checkDelivery/index.vue';
+	import systemFrom from '../components/systemFrom/index.vue';
+	import PointsPrice from '@/components/PointsPrice.vue';
+	import {
+		toLogin
+	} from '@/libs/login.js';
+	import {
+		mapGetters
+	} from "vuex";
+	import {
+		Debounce
+	} from '@/utils/validate.js'
+	import {
+		ProductTypeEnum,
+		ProductMarketingTypeEnum
+	} from "../../../enums/productEnums";
+	import orderPay from "@/mixins/OrderPay.js";
 	let app = getApp();
+	/**
+	 * 积分商品推荐样式
+	 */
+	const hotPointsStyle = {
+		iconStyle: {
+			width: '28rpx',
+			height: '28rpx'
+		},
+		priceStyle: {
+			fontSize: '28rpx',
+		},
+		unitStyle: {
+			fontSize: '26rpx',
+		},
+	}
 	export default {
+		mixins: [orderPay],
+		components: {
+			navBar,
+			couponListWindow,
+			orderGoods,
+			checkDelivery,
+			systemFrom,
+			PointsPrice
+		},
+		computed: {
+			// 是否可以使用优惠券、积分抵扣。 基础订单/云盘订单,卡密,虚拟,可以使用优惠券、积分抵扣
+			isProductType() {
+				return this.type === ProductMarketingTypeEnum.Normal && this.secondType !== this.ProductTypeEnum
+					.Integral && this.secondType !== this.ProductTypeEnum.Video
+			},
+			...mapGetters(['productType', 'isLogin'])
+		},
 		data() {
 			return {
-				total: 0,
-				statusBarHeight: app.globalData.statusBarHeight,
-				navigationBarHeight: 0,
-				winHeight: 0,
-				isZhuan: true,
-				isShow: true,
-				goIndex: true,
-				orderNo: '', //预下单订单号
+				hotPointsStyle: hotPointsStyle,
+				ProductMarketingTypeEnum: ProductMarketingTypeEnum,
+				ProductTypeEnum: ProductTypeEnum,
+				navTitle: '提交订单',
+				homeTop: 20,
+				orderShow: 'orderShow', //下单页面使用优惠券组件不展示tab切换页
+				textareaStatus: true,
+				openType: 1, //优惠券打开方式 1=使用
+				couponShow: false,
+				coupon: {
+					coupon: false,
+					list: [], //商户优惠券
+					statusTile: '立即使用',
+					couponMoney: 0
+				}, //优惠券组件
 				addressInfo: {}, //地址信息
 				addressId: 0, //地址id
-				goods_list: [],  //购物车数据
-				cart: [],
-				detils:'',//详情数据
-				remark:'',//备注
-				
-			}
+				orderMerchantRequestList: [], //商户属性集合
+				cartId: '', //购物车id
+				userInfo: {}, //用户信息
+				mark: '', //买家留言
+				couponFee: '请选择', //优惠券
+				coupon_price: 0, //优惠券抵扣金额
+				isUseIntegral: false, //是否使用积分
+				integral_price: 0, //积分抵扣金额
+				integral: 0,
+				ChangePrice: 0, //使用积分抵扣变动后的金额
+				formIds: [], //收集formid
+				status: 0,
+				is_address: false,
+				toPay: false, //修复进入支付时页面隐藏从新刷新页面
+				shippingType: 1,
+				storePostage: 0,
+				contacts: '',
+				contactsTel: '',
+				mydata: {},
+				merchantOrderVoList: [],
+				priceGroup: {},
+				animated: false,
+				totalPrice: 0,
+				integralRatio: "0",
+				orderKey: "",
+				// usableCoupon: {},
+				offlinePostage: "",
+				news: true,
+				again: false,
+				addAgain: false,
+				bargain: false, //是否是砍价
+				combination: false, //是否是拼团
+				secKill: false, //是否是秒杀
+				orderInfoVo: {},
+				addressList: [], //地址列表数据
+				orderProNum: 0,
+				orderNo: '', //预下单订单号
+				theme: app.globalData.theme,
+				addressChangeId: 0,
+				isShowBox: false,
+				activeObj: {},
+				activeIndex: 0, // 选中店铺索引
+				type: 0, // 0-基础订单,1-秒杀订单,2-拼团订单
+				secondType: 0, //订单二级类型:0-普通订单,1-积分订单,2-虚拟订单,4-视频号订单,5-云盘订单,6-卡密订单
+				merId: 0, //商户id,用于判断商户优惠券还是平台优惠券,平台优惠券商户id为0
+				platUserCouponObj: {}, //平台优惠券对象,用于缓存数据使用
+				platUserCouponId: 0, //平台优惠券id
+				platCouponFee: '', //平台优惠券金额
+				merCouponFee: '', //店铺优惠券总金额
+				surplusFee: 0, //商品总金额-商户优惠券金额=平台端可使用优惠券的门槛
+				merUserCouponId: 0, //店铺使用优惠券的id
+				tempCouponObj: {}, //临时优惠券数据
+				merchangtInfo: {}, //商户信息
+				orderForm: [], //系统表单配置的数据
+				orderExtend: {}, //提交接口表单的数据
+				productId: '',
+				groupActivityId: ''
+			};
 		},
-		//下拉刷新
-		onPullDownRefresh() {
-
+		watch: {
+			isLogin: {
+				handler: function(newV, oldV) {
+					if (newV) {
+						this.getloadPreOrder();
+					}
+				},
+				deep: true
+			},
 		},
 		onLoad(options) {
-	
-			let that = this;
-			that.getAddressList()//获取地址			
-			that.orderNo=options.orderNo
-			console.log('订单号',that.orderNo)
-			that.loadPreOrderApi()  //获取详情
-			// 获取app德地址
-			const app = getApp();
-			let addressList=app.globalData.addressList
-			uni.getSystemInfo({
-				success: function(res) {
-					that.winHeight = res.windowHeight
-				},
-			});
-			//首页数据加载
-			// this.getIndexConfig();
-			// #ifdef MP-WEIXIN
-			// 获取微信胶囊的位置信息 width,height,top,right,left,bottom
-			const custom = wx.getMenuButtonBoundingClientRect()
-			// 导航栏高度(标题栏高度) = 胶囊高度 + (顶部距离 - 状态栏高度) * 2
-			this.navigationBarHeight = custom.height + (custom.top - this.statusBarHeight) * 2
-			// console.log("导航栏高度:"+this.globalData.navigationBarHeight)
-			// #endif
-			this.cart = uni.getStorageSync('cart')
-		
+			this.orderNo = options.orderNo || 0;
+			this.addressChangeId = parseInt(options.addressId) || 0;
+			this.is_address = options.is_address ? true : false;
+			if (this.isLogin) {
+				this.getloadPreOrder();
+			} else {
+				toLogin();
+			}
 		},
-		onShow() {
-				this.getAddressList()//获取地址
+		/**
+		 * 生命周期函数--监听页面显示
+		 */
+		onShow: function() {
+			let _this = this
+			this.textareaStatus = true;
 		},
 		methods: {
-			//订单创建
-			orderCreate(){
-				let orderMerchantRequestList = [] //数组	
-				let merId=this.detils.merchantInfoList[0].merId // 商户id
-				orderMerchantRequestList.push({
-				   merId:merId,              // 商户id
-				   remark:this.remark,             // 备注
-				   shippingType: 1,        // 快递类型: 1-快递配送,2-到店自提,3-虚拟发货
-				   userCouponId: 0,        // 惠券编号(不选时为0)
-				})
-				orderCreate({
-					isUseIntegral:false, // 是否使用积分
-					addressId:this.addressInfo.id, //收货地址id
-					orderExtend:  JSON.stringify([{ key: 'value' }, { field: 'data' }]), //系统表单内容
-					orderMerchantRequestList:orderMerchantRequestList, //订单商户对象
-					platUserCouponId:0,//用户平台优惠券编号(不选时为0)
-					preOrderNo:this.orderNo,//预下单订单号
-					systemFormId: '',//系统表单ID
-					traceId:"1 15N4MJksUcgG7onuaA9xuvoZwoLatM4mAE21CqXmMz6",
-				}).then(res=>{
-					console.log('创建',res)
-					let data=res.data
-					if(res.code){
-						let url = `/pages/goods/order_payment/index?orderNo=${data.orderNo}&payPrice=${data.payPrice}`
-						uni.redirectTo({
-							url: url
-						});
-					}
+			//滚动
+			touchStart() {
+				this.$refs.navBarRef.currentPage = false;
+			},
+			popupClose() {
+				this.$refs.sh_popup.close()
+				uni.switchTab({
+					url: '/pages/index/index'
+				});
+			},
+			//去开团
+			toAudit() {
+				this.$refs.sh_popup.close()
+				uni.navigateTo({
+					url: `/pages/goods/goods_details/index?id=${this.productId}&mt=2&gd=${this.groupActivityId}`
 				})
 			},
-			// 详情数据
-			loadPreOrderApi(){
-				loadPreOrderApi(this.orderNo).then(res=>{
-					console.log('详情数据',res)
-					if(res.code==200){
-						let data=res.data
-						this.detils=data
-						this.goods_list=data.merchantInfoList[0].orderInfoList  //购物车数据
-						// 总价
-						this.total = (this.goods_list.reduce((acc, cur) => acc + cur.payNum * cur.price, 0)).toFixed(2)
-					}
+			addressType(type) {
+				this.merchantOrderVoList[0].shippingType = type
+				this.getShippingType(this.merchantOrderVoList[0])
+				if (type == 2) {
+					setTimeout(() => {
+						this.shippingType = type
+					}, 300)
+				} else {
+					this.shippingType = type
+				}
+			},
+			//选择配送方式回调 
+			getShippingType(item) {
+				this.orderMerchantRequestList[this.activeIndex].shippingType = item.shippingType;
+				this.$set(this.merchantOrderVoList[this.activeIndex], 'shippingType', item.shippingType);
+				if (item.shippingType === 2) this.getTakeTheir(item.merId);
+				this.computedPrice();
+				this.isShowBox = false;
+			},
+			getTakeTheir(id) {
+				takeTheirApi(id).then(res => {
+					this.merchangtInfo = res.data; //商户信息
+					this.$set(this.merchantOrderVoList[this.activeIndex], 'addressDetail', res.data.addressDetail);
+					this.$set(this.merchantOrderVoList[this.activeIndex], 'phone', res.data.phone);
+					this.$set(this.merchantOrderVoList[this.activeIndex], 'latitude', res.data.latitude);
+					this.$set(this.merchantOrderVoList[this.activeIndex], 'longitude', res.data.longitude);
+				}).catch(err => {
+					return this.$util.Tips({
+						title: err
+					});
 				})
 			},
-			// 获取地址数据
-			getAddressList(){
-				getAddressList().then(res=>{
-					console.log('地址',res)
-					if(res.code=200){
-						this.addressInfo=res.data.find(item => item.isDefault === true);
-						console.log('默认地址',this.addressInfo)
+			//查看内置地图
+			goMap(item) {
+				let that = this;
+				//#ifdef H5
+				if (that.$wechat.isWeixin() === true) {
+					that.$wechat.seeLocation({
+						latitude: parseFloat(this.merchantOrderVoList[this.activeIndex].latitude),
+						longitude: parseFloat(this.merchantOrderVoList[this.activeIndex].longitude),
+						name: item.merName,
+						address: item.addressDetail ? item.addressDetail : '',
+					}).then(res => {
+						console.log('success');
+					})
+				} else {
+					//#endif
+					uni.openLocation({
+						latitude: parseFloat(this.merchantOrderVoList[this.activeIndex].latitude),
+						longitude: parseFloat(this.merchantOrderVoList[this.activeIndex].longitude),
+						scale: 8,
+						name: item.merName,
+						address: item.addressDetail ? item.addressDetail : '',
+						success: function(res) {
+							that.go_map = true
+						},
+					});
+					// #ifdef H5
+				}
+				//#endif
+			},
+			// 打开配送方式弹窗
+			openShowBox(item, index) {
+				this.activeObj = item
+				this.activeIndex = index
+				this.isShowBox = true
+			},
+			boxClose() {
+				this.isShowBox = false
+			},
+			// 订单详情
+			getloadPreOrder: function() {
+				loadPreOrderApi(this.orderNo).then(res => {
+					let orderInfoVo = res.data;
+					if (orderInfoVo.merchantInfoList[0].orderInfoList[0].groupBuyActivityId) {
+						this.groupActivityId = orderInfoVo.merchantInfoList[0].orderInfoList[0].groupBuyActivityId
+						this.productId = orderInfoVo.merchantInfoList[0].orderInfoList[0].productId
 					}
+					if (orderInfoVo.merchantInfoList[0].deliveryMethodMer.split(',').length == 1) {
+						this.shippingType = orderInfoVo.merchantInfoList[0].deliveryMethodMer
+					}
+					this.orderInfoVo = {
+						...orderInfoVo,
+						systemFormValue: orderInfoVo.systemFormValue ? this.$util.objToArr(JSON.parse(
+							orderInfoVo.systemFormValue)) : []
+					};
+
+					console.log(orderInfoVo.merchantInfoList, '0000000000000000000000000000000')
+					this.merchantOrderVoList = orderInfoVo.merchantInfoList; //商户端数据
+					this.platCouponFee = orderInfoVo.platCouponFee; //平台优惠券总金额
+					this.platUserCouponId = orderInfoVo.platUserCouponId;
+					this.merCouponFee = orderInfoVo.merCouponFee; //店铺优惠券总金额
+					orderInfoVo.merchantInfoList.map(item => {
+						this.orderMerchantRequestList.push({
+							shippingType: item.shippingType,
+							merId: item.merId,
+							remark: '',
+							userCouponId: item.userCouponId
+						})
+						if (item.shippingType === 2) this.getTakeTheir(item.merId)
+						item.addressDetail = this.merchangtInfo.addressDetail;
+						item.phone = this.merchangtInfo.phone;
+						item.latitude = this.merchangtInfo.latitude;
+						item.longitude = this.merchangtInfo.longitude;
+					});
+					this.type = orderInfoVo.type; //订单类型
+					this.secondType = orderInfoVo
+						.secondType; //订单二级类型:0-普通订单,1-积分订单,2-虚拟订单,4-视频号订单,5-云盘订单,6-卡密订单
+					this.orderProNum = orderInfoVo.orderProNum;
+					if (orderInfoVo.addressId && this.addressChangeId === 0) {
+						this.addressId = orderInfoVo.addressId;
+					} else {
+						this.addressId = this.addressChangeId;
+						if (orderInfoVo.addressId != this.addressChangeId && this.addressChangeId > 0)
+							this.computedPrice();
+					}
+					this.getaddressInfo();
+				}).catch(err => {
+					uni.navigateTo({
+						url: '/pages/goods/order_list/index'
+					});
 				})
 			},
-			
-			statusClick() {
-				this.isShow = !this.isShow;
-			},
-		
-			onAddress: function() {
-				uni.navigateTo({
-					url: '/pages/address/user_address_list/index?orderNo=' + this.orderNo
+			// 计算订单价格
+			computedPrice: function() {
+				uni.showLoading({
+					title: '加载中...'
+				});
+				let shippingType = this.shippingType;
+				postOrderComputed({
+					addressId: this.addressId,
+					isUseIntegral: this.isUseIntegral,
+					orderMerchantRequestList: this.orderMerchantRequestList,
+					preOrderNo: this.orderNo,
+					platUserCouponId: this.platUserCouponId
+				}).then(res => {
+					let data = res.data;
+					//usedIntegral 使用的积分,surplusIntegral 剩余积分
+					data.merOrderResponseList.map((item, i) => {
+						this.merchantOrderVoList[i].freightFee = item.freightFee
+						this.merchantOrderVoList[i].couponFee = item.couponFee
+					});
+					this.orderInfoVo.platCouponUserList = data.platCouponUserList; //平台优惠券数据
+					this.merCouponFee = data.merCouponFee; //店铺优惠券总金额
+					this.orderInfoVo.couponFee = data.couponFee; //优惠券优惠金额
+					this.orderInfoVo.userIntegral = data.surplusIntegral; //使用的积分
+					this.orderInfoVo.deductionPrice = data.deductionPrice;
+					this.orderInfoVo.freightFee = data.freightFee;
+					this.orderInfoVo.payFee = data.payFee;
+					this.orderInfoVo.proTotalFee = data.proTotalFee;
+					this.orderInfoVo.surplusIntegral = data.usedIntegral; //剩余积分
+					this.platCouponFee = data.platCouponFee; //平台优惠金额
+					this.orderInfoVo.integralDeductionSwitch = data.integralDeductionSwitch //积分抵扣开关
+					//选中商户优惠券的值
+					this.merchantOrderVoList[this.activeIndex].merCouponUserList = data.merOrderResponseList[
+						this.activeIndex].merCouponUserList; //商户数据
+					this.merUserCouponId = data.merOrderResponseList[this.activeIndex]
+						.userCouponId //店铺使用优惠券的id
+					uni.hideLoading();
+				}).catch(err => {
+					uni.hideLoading();
+					return this.$util.Tips({
+						title: err
+					});
 				});
 			},
+			bindPickerChange: function(e) {
+				let value = e.detail.value;
+				this.shippingType = value;
+				this.computedPrice();
+			},
+			/**
+			 * 使用积分抵扣
+			 */
+			ChangeIntegral: function() {
+				this.isUseIntegral = !this.isUseIntegral;
+				this.computedPrice();
+			},
+			bindHideKeyboard: function(e, i) {
+				this.orderMerchantRequestList[i].remark = e;
+			},
 			/*
 			 * 获取默认收货地址或者获取某条地址信息
 			 */
 			getaddressInfo: function() {
-				// if (this.addressId) {
+				if (this.addressId) {
 					getAddressDetail(this.addressId).then(res => {
-						console.log('地址信息',res)
 						if (res.data) {
 							res.data.isDefault = res.data.isDefault;
 							this.addressInfo = res.data || {};
 						}
 					})
-				// }
+				}
 			},
-		},
-		mounted() {
 
-		},
+			//关闭优惠券弹窗
+			ChangCouponsClone: function(coupon) {
+				this.coupon.list = [];
+				this.coupon.coupon = false;
+			},
+			//点击优惠券弹窗确定后
+			ChangCoupons: function(item) {
+				this.coupon.list = [];
+				if (item.merId === 0) {
+					this.platUserCouponId = item.isChecked ? item.id : 0;
+				} else {
+					this.$set(this.orderMerchantRequestList[this.activeIndex], 'userCouponId', item.isChecked ? item
+						.id : 0);
+
+				}
+				this.coupon.coupon = false;
+				this.computedPrice();
+			},
+			/**
+			 * 选择优惠券
+			 * @param {Object} item优惠券对象
+			 * @param {Number} merId商户id
+			 * @param {Number} index索引
+			 */
+			couponTap: function(item, merId, index) {
+				this.$set(this.coupon, 'list', item);
+				this.$set(this.coupon, 'couponMoney', item);
+				this.coupon.coupon = true;
+				this.merId = merId; //商户id
+				if (merId !== 0) this.activeIndex = index;
+				this.coupon.loading = false;
+			},
+			/**
+			 * 获取当前金额可用优惠券
+			 *
+			 */
+			getCouponList: function(item, merId) {
+				this.$set(this.coupon, 'list', item);
+				this.openType = 1;
+				uni.hideLoading();
+			},
+			onAddress: function() {
+				uni.navigateTo({
+					url: '/pages/address/user_address_list/index?orderNo=' + this.orderNo
+				});
+			},
+			realName: function(e) {
+				this.contacts = e.detail.value;
+			},
+			phone: function(e) {
+				this.contactsTel = e.detail.value;
+			},
+			payment: function(data) {
+				let that = this;
+				// #ifdef MP
+				uni.checkBeforeAddOrder({
+					success(res) {
+						console.log("下单前置检查 成功:", JSON.stringify(res));
+						const traceId = res.data.traceId;
+						data.traceId = traceId;
+						that.onCreate(data);
+					},
+					fail(res) {
+						console.log("下单前置检查 失败:", JSON.stringify(res));
+					}
+				});
+				// #endif
+				// #ifndef MP
+				that.onCreate(data);
+				// #endif
+			},
+			onCreate(data) {
+				orderCreate(data).then(res => {
+					if (res.data.groupBuyIsFull == 1) {
+						uni.hideLoading();
+						return this.$refs.sh_popup.open('center')
+					}
+					if (this.secondType === this.ProductTypeEnum.Integral && this.orderInfoVo.payFee == 0) {
+						// 积分商品并且支付金额为0时,直接默认走余额支付的逻辑,订单支付成功跳转到支付结果页
+						this.changeOrderPay(res.data.orderNo, 'yue', 'yue', 'integral', 'integral', '0')
+					} else {
+						// 其他商品走正常流程,去支付收银台页面
+						this.getToPayment(this.secondType, res.data)
+					}
+
+					uni.hideLoading();
+				}).catch(err => {
+					uni.hideLoading();
+					return this.$util.Tips({
+						title: err
+					});
+				});
+			},
+			//立即下单
+			SubOrder: Debounce(function(e) {
+				let that = this,
+					data = {};
+				let flag = false;
+				that.orderMerchantRequestList.map(function(v) {
+					if (v.shippingType === 1 && !that.addressId && that.orderInfoVo.secondType !== 2) {
+						flag = true;
+					}
+				});
+				if (flag) {
+					that.$util.Tips({
+						title: '请选择收货地址'
+					});
+					return;
+				}
+
+				let systemFormValue = Array.from(this.orderInfoVo.systemFormValue)
+				let systemFormData = []
+				for (var i = 0; i < systemFormValue.length; i++) {
+					let curdata = systemFormValue[i]
+					if (['radios'].indexOf(curdata.name) == -1 && (curdata.titleShow.val || (['uploadPicture',
+							'dateranges'
+						].indexOf(curdata.name) == -1 && curdata.value && curdata.value.trim()))) {
+						if ((curdata.name === 'texts' && curdata.valConfig.tabVal == 0) || ['dates', 'times',
+								'selects', 'citys', 'checkboxs'
+							].indexOf(curdata.name) != -1) {
+							if (!curdata.value || (curdata.value && !curdata.value.trim())) {
+								return that.$util.Tips({
+									title: `请填写${curdata.titleConfig.val}`
+								});
+							}
+						}
+						if (curdata.name === 'timeranges') {
+							if (!curdata.value) {
+								return that.$util.Tips({
+									title: `请选择${curdata.titleConfig.val}`
+								});
+							}
+						}
+						if (curdata.name === 'dateranges') {
+							if (!curdata.value.length) {
+								return that.$util.Tips({
+									title: `请选择${curdata.titleConfig.val}`
+								});
+							}
+						}
+						if (curdata.name === 'texts' && curdata.valConfig.tabVal == 4) {
+							if (curdata.value <= 0) {
+								return that.$util.Tips({
+									title: `请填写大于0的${curdata.titleConfig.val}`
+								});
+							}
+						}
+						if (curdata.name === 'texts' && curdata.valConfig.tabVal == 3) {
+							if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(curdata.value)) {
+								return that.$util.Tips({
+									title: `请填写正确的${curdata.titleConfig.val}`
+								});
+							}
+						}
+						if (curdata.name === 'texts' && curdata.valConfig.tabVal == 1) {
+							if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(curdata.value)) {
+								return that.$util.Tips({
+									title: `请填写正确的${curdata.titleConfig.val}`
+								});
+							}
+						}
+						if (curdata.name === 'texts' && curdata.valConfig.tabVal == 2) {
+							if (!
+								/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/i
+								.test(curdata.value)) {
+								return that.$util.Tips({
+									title: `请填写正确的${curdata.titleConfig.val}`
+								});
+							}
+						}
+						if (curdata.name === 'uploadPicture') {
+							if (!curdata.value.length) {
+								return that.$util.Tips({
+									title: `请上传${curdata.titleConfig.val}`
+								});
+							}
+						}
+					}
+					this.orderExtend[curdata.key] = curdata.value
+					systemFormData.push({
+						title: curdata.titleConfig.val,
+						value: curdata.value,
+					})
+				}
+				data = {
+					addressId: that.addressId,
+					orderMerchantRequestList: that.orderMerchantRequestList,
+					isUseIntegral: that.isUseIntegral,
+					preOrderNo: that.orderNo,
+					platUserCouponId: this.platUserCouponId,
+					systemFormId: this.orderInfoVo.systemFormId,
+					orderExtend: JSON.stringify(systemFormData)
+
+				};
+				uni.showLoading({
+					title: '订单提交中'
+				});
+				that.payment(data);
+				//// #ifdef MP
+				// openPaySubscribe().then(() => {
+				// 	that.payment(data);
+				// });
+				// // #endif
+				// // #ifndef MP
+				// that.payment(data);
+				// // #endif
+			})
+		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.bg-color {
-		background-color: $bg-color-primary;
+	.w-480px {
+		width: 480rpx;
 	}
 
-	.status-bar {
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		height: 125rpx;
-		background-color: #FF6702;
-		text-align: center;
-		padding: 20px 0 16rpx 0;
+	.noCoupon {
+		color: #999999;
+
 	}
 
-	.status-bar view {
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		background: #EB5E00;
-		border-radius: 37rpx;
+	.icon-jiantou {
+		font-size: 26rpx;
+		color: #515151;
+		margin-left: 14rpx;
 	}
 
-	.status-true {
-		display: inline-block;
-		width: 326rpx;
-		padding: 10rpx 0;
-		background-color: white;
-		color: #FF6600;
-		border-radius: 37rpx;
+	.mr14 {
+		margin-right: 14rpx;
 	}
 
-	.status-false {
+	.couponTitle {
+		width: 430rpx;
 		display: inline-block;
-		width: 326rpx;
-		padding: 10rpx 0;
-		color: #FFCBA9;
-		border-radius: 37rpx;
+		text-align: right;
+		@include main_color(theme);
 	}
 
-	.icon-jiantou {
+	.store-address {
+		padding: 20rpx;
+		margin: 0 24rpx;
+		background: #F6F6F6;
+		border-radius: 8rpx;
+		font-size: 24rpx;
+		/*垂直居中*/
+		-webkit-box-align: center;
+		/*旧版本*/
+		-moz-box-align: center;
+		/*旧版本*/
+		-ms-flex-align: center;
+		/*混合版本*/
+		-webkit-align-items: center;
+		/*新版本*/
+		align-items: center;
+
+		/*新版本*/
+		.phone {
+			margin-bottom: 10rpx;
+			color: #282828;
+			font-weight: bold;
+		}
+
+		.name {
+			padding-right: 20rpx;
+		}
+
+		.info {
+			flex: 1;
+		}
+
+		.line2 {
+			width: 456rpx !important;
+		}
+
+		.map {
+			text-align: center;
+			padding-left: 36rpx;
+			position: relative;
+			@include main_color(theme);
+
+			&::before {
+				content: '';
+				display: inline-block;
+				width: 2rpx;
+				height: 42rpx;
+				background-color: #DDDDDD;
+				position: absolute;
+				left: 0;
+				top: 18rpx;
+			}
+
+			.iconfont {
+				color: var(--view-theme);
+			}
+
+			.map_text {
+				color: var(--view-theme);
+			}
+		}
+	}
+
+	.font_color {
+		@include main_color(theme);
+	}
+
+	.price_color {
+		@include price_color(theme);
+	}
+
+	.line2 {
+		width: 624rpx;
+	}
+
+	.textR {
+		text-align: right;
+	}
+
+	.order-submission .line {
+		width: 100%;
+		height: 3rpx;
+	}
+
+	.order-submission .line image {
+		width: 100%;
+		height: 100%;
+		display: block;
+	}
+
+	.order-submission .address {
+		padding: 40rpx 24rpx;
+		background-color: #fff;
+		box-sizing: border-box;
+	}
+
+	.order-submission .address .addressCon {
+		width: 596rpx;
 		font-size: 26rpx;
-		color: #515151;
-		margin-left: 14rpx;
+		color: #666;
 	}
 
-	.address {
-		margin-bottom: 40rpx;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
+	.order-submission .address .addressCon .name {
+		font-size: 30rpx;
+		color: #282828;
+		font-weight: bold;
+		// margin-bottom: 10rpx;
 	}
 
-	.item-go {
-		position: relative;
+	.order-submission .address .addressCon .name .phone {
+		margin-left: 50rpx;
+	}
+
+	.order-submission .address .addressCon .default {
+		margin-right: 12rpx;
+	}
+
+	.order-submission .address .addressCon .setaddress {
+		color: #333;
+		font-size: 28rpx;
+	}
+
+	.order-submission .address .iconfont {
+		color: #707070;
+	}
+
+	.order-submission .allAddress {
 		width: 100%;
-		padding: 20rpx 0;
-		padding-left: 39rpx;
-		background: #FFFFFF;
-		border-radius: 15rpx;
-		border: 2rpx solid #D6D7DC;
+		@include index-gradient(theme);
+		padding: 30rpx 24rpx 0 24rpx;
+	}
+
+	.order-submission .allAddress .address.group {
+		border-radius: 0;
+	}
+
+	.order-submission .allAddress .address {
+		max-height: 180rpx;
+		margin: -2rpx auto 0 auto;
+		border-radius: 14rpx 14rpx 0 0;
+	}
+
+	.order-submission .allAddress .line {
+		width: 100%;
+		margin: 0 auto;
+	}
+
+	.order-submission .wrapper .item .discount .placeholder {
+		color: #ccc;
+	}
+
+	.order-submission .wrapper {
+		background-color: #fff;
+		margin-top: 24rpx;
+	}
+
+	.order-submission .wrapper .item {
+		padding: 28rpx 24rpx;
+		font-size: 30rpx;
+		color: #333333;
 	}
 
-	.item-go-avt {
+	.order-submission .wrapper .item .discount {
+		font-size: 30rpx;
+		color: #333;
+	}
+
+	.order-submission .wrapper .item .discount .iconfont {
+		color: #515151;
+	}
+
+	.order-submission .wrapper .item .discount .num {
+		font-size: 32rpx;
+		margin-right: 20rpx;
+	}
+
+	.order-submission .wrapper .item .shipping {
+		font-size: 30rpx;
+		color: #999;
 		position: relative;
-		color: #FF6702;
-		background: #FFECE0;
-		border-radius: 15rpx;
-		border: 2rpx solid #FF6702;
+		padding-right: 58rpx;
 	}
 
-	.go-img {
-		width: 54rpx;
-		height: 54rpx;
+	.order-submission .wrapper .item .shipping .iconfont {
+		font-size: 35rpx;
+		color: #707070;
 		position: absolute;
 		right: 0;
-		top: 0;
+		top: 50%;
+		transform: translateY(-50%);
+		margin-left: 30rpx;
+	}
+
+	.order-submission .wrapper .item textarea {
+		background-color: #f9f9f9;
+		width: auto !important;
+		height: 140rpx;
+		border-radius: 14rpx;
+		margin-top: 30rpx;
+		padding: 15rpx;
+		box-sizing: border-box;
+		font-weight: 400;
+	}
+
+	.order-submission .wrapper .item .placeholder {
+		color: #ccc;
+	}
+
+	.order-submission .wrapper .item .list {
+		margin-top: 35rpx;
 	}
 
-	.item-goods {
-		display: flex;
-		flex-direction: column;
-		gap: 20rpx;
+	.order-submission .wrapper .item .list .payItem {
+		border: 1px solid #eee;
+		border-radius: 14rpx;
+		height: 86rpx;
 		width: 100%;
-		// height: 100%;
-		padding: 19rpx 38rpx;
-		background: #FFFFFF;
-		border-radius: 23rpx 23rpx 0rpx 0rpx;
+		box-sizing: border-box;
+		margin-top: 20rpx;
+		font-size: 28rpx;
+		color: #282828;
 	}
 
-	.good {
-		display: flex;
-		align-items: center;
-		
+	.order-submission .wrapper .item .list .payItem.on {
+		// border-color: #fc5445;
+		@include coupons_border_color(theme);
+		color: $theme-color;
+	}
 
-		.image {
-			width: 160rpx;
-			height: 160rpx;
-			margin-right: 20rpx;
-			border-radius: 8rpx;
-		}
+	.order-submission .wrapper .item .list .payItem .name {
+		width: 50%;
+		text-align: center;
+		border-right: 1px solid #eee;
+	}
 
-		.right {
-			flex: 1;
-			// height: 160rpx;
-			overflow: hidden;
-			display: flex;
-			flex-direction: column;
-			align-items: flex-start;
-			justify-content: space-between;
-			padding-right: 14rpx;
+	.order-submission .wrapper .item .list .payItem .name .iconfont {
+		width: 44rpx;
+		height: 44rpx;
+		border-radius: 50%;
+		text-align: center;
+		line-height: 44rpx;
+		background-color: #fe960f;
+		color: #fff;
+		font-size: 30rpx;
+		margin-right: 15rpx;
+	}
 
-			.name {
-				font-size: $font-size-base;
-				margin-bottom: 10rpx;
-			}
+	.order-submission .wrapper .item .list .payItem .name .iconfont.icon-weixin2 {
+		background-color: #41b035;
+	}
 
-			.tips {
-				width: 100%;
-				height: 40rpx;
-				line-height: 40rpx;
-				overflow: hidden;
-				text-overflow: ellipsis;
-				white-space: nowrap;
-				font-size: $font-size-sm;
-				color: $text-color-assist;
-				margin-bottom: 10rpx;
-			}
+	.order-submission .wrapper .item .list .payItem .name .iconfont.icon-zhifubao {
+		background-color: #00AAEA;
+	}
 
-			.price_and_action {
-				width: 100%;
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
+	.order-submission .wrapper .item .list .payItem .tip {
+		width: 49%;
+		text-align: center;
+		font-size: 26rpx;
+		color: #aaa;
+	}
 
-				.price {
-					font-size: $font-size-base;
-					font-weight: 600;
-				}
-			}
-		}
+	.order-submission .moneyList {
+		margin-top: 15rpx;
+		background-color: #fff;
+		padding: 0 30rpx;
+		margin-bottom: calc(constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
+		margin-bottom: calc(env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
 	}
 
-	.cart-box {
-		position: absolute;
-		// bottom: 30rpx;
-		left: 30rpx;
-		right: 30rpx;
+	.order-submission .moneyList .item {
+		font-size: 30rpx;
+		color: #282828;
 		height: 96rpx;
-		border-radius: 48rpx;
-		box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.2);
-		background-color: #000;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		z-index: 9999;
+	}
 
-		.cart-img {
-			width: 50rpx;
-			height: 47rpx;
-			position: relative;
-			// margin-top: -48rpx;
-		}
+	.order-submission .moneyList .item~.item {
+		// margin-top: 20rpx;
+	}
 
-		.pay-btn {
-			height: 100%;
-			padding: 0 30rpx;
-			color: #FFFFFF;
-			border-radius: 0 50rpx 50rpx 0;
-			display: flex;
-			align-items: center;
-			font-size: $font-size-base;
-		}
+	.order-submission .moneyList .item .money {
+		color: #666666;
+	}
 
-		.price {
-			flex: 1;
-			color: $text-color-base;
+	.order-submission .footer {
+		width: 100%;
+		height: 100rpx;
+		background-color: #fff;
+		padding: 0 30rpx;
+		font-size: 28rpx;
+		color: #333;
+		box-sizing: border-box;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
+		height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
+		z-index: 999;
+	}
+
+	.order-submission .footer .settlement {
+		background-color: #fff;
+		font-size: 30rpx;
+		color: #fff;
+		width: 240rpx;
+		height: 70rpx;
+		@include main_bg_color(theme);
+		border-radius: 50rpx;
+		text-align: center;
+		line-height: 70rpx;
+	}
+
+	.footer .transparent {
+		opacity: 0
+	}
+
+	/deep/ checkbox .uni-checkbox-input.uni-checkbox-input-checked {
+		@include main_bg_color(theme);
+		border: none !important;
+		color: #fff !important
+	}
+
+	/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
+		@include main_bg_color(theme);
+		border: none !important;
+		color: #fff !important;
+		margin-right: 0 !important;
+	}
+
+	// 切换
+	/deep/.uni-date-x--border {
+		border: 0;
+	}
+
+	/deep/.uni-icons {
+		font-size: 0 !important;
+	}
+
+	/deep/.uni-date-x {
+		color: #999;
+		font-size: 15px;
+	}
+
+	/deep/.uni-date__x-input {
+		font-size: 15px;
+	}
+
+	/deep/uni-checkbox[disabled] .uni-checkbox-input {
+		background-color: #eee;
+	}
+
+	.abs-lt .active-card {
+		&:after {
+			right: -67rpx;
 		}
 	}
 
+	.abs-rt .active-card {
+		&:after {
+			left: -67rpx;
+			-moz-transform: scaleX(-1);
+			-webkit-transform: scaleX(-1);
+			-o-transform: scaleX(-1);
+			transform: scaleX(-1);
+		}
+	}
 
-	.item-con {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		font-weight: 500;
-		font-size: 21rpx;
-		color: #141414;
-		margin-bottom: 10rpx;
+	.active-card {
+		&:after {
+			content: "";
+			width: 67rpx;
+			height: 76rpx;
+			background-image: url('../static/images/nav_circle_left.png');
+			background-size: contain;
+			background-repeat: no-repeat;
+			position: absolute;
+			bottom: 0;
+			z-index: 4;
+		}
 	}
 
-	.container {
-		overflow: hidden;
-		position: relative;
+	.line {
+		width: 680rpx;
+		margin: auto;
+		height: 3rpx;
 	}
-	.box-txt{
-		 overflow-wrap: break-word;
-	
-		  font-size: 22rpx;
-		  font-family: PingFangSC-Medium;
-		  font-weight: 500;
-		  text-align: left;
-		  white-space: nowrap;
-		  line-height: 40rpx;
-	}
-	.boxnamae{
-		overflow-wrap: break-word;
-		  color: rgba(20, 20, 20, 1);
-		  font-size: 32rpx;
-		  font-family: PingFangSC-Medium;
-		  font-weight: 500;
-		  text-align: center;
-		  white-space: nowrap;
-		  line-height: 44rpx;
-		
-	}
-	.remark-txt{
+
+	.line image {
 		width: 100%;
-		height: 150rpx;
-		background: #D6D7DC;
-		color: #141414;
-		padding: 20rpx;
+		height: 100%;
+		display: block;
+	}
+
+	.address {
+		background-color: #fff;
 		box-sizing: border-box;
 	}
+
+	.footer .transparent {
+		opacity: 0
+	}
+
+	.w-322 {
+		width: 322rpx;
+	}
+
+	.w-450 {
+		width: 450rpx;
+	}
+
+	.w-50p {
+		width: 50%;
+	}
+
+	.h-auto {
+		height: auto;
+	}
+
+	.bd-r-14 {
+		border-radius: 14rpx 14rpx 0 0 !important;
+	}
+
+	.mt30 {
+		margin-top: 30rpx;
+	}
+
+	.bg-primary-light {
+		@include main_rgba_color(theme);
+	}
+
+	.rd-lt-24rpx {
+		border-radius: 24rpx 0 0 0;
+	}
+
+	.rd-rt-24rpx {
+		border-radius: 0 24rpx 0 0;
+	}
+
+	.z-2 {
+		z-index: 2;
+	}
+
+	.gold {
+		color: #DCA658;
+	}
+
+	.select-name {
+		max-width: 300rpx;
+	}
+
+	.font-color {
+		font-weight: 500 !important;
+	}
+
+	/deep/ .uni-popup__wrapper {
+		background: #FFFFFF;
+		border-radius: 32rpx;
+	}
+
+	.sh_popup-content {
+		padding: 40rpx;
+
+		.sh_popup_title {
+			font-weight: 500;
+			font-size: 32rpx;
+			color: #333333;
+			text-align: center;
+		}
+
+		.sh_popup_text {
+			font-weight: 400;
+			font-size: 30rpx;
+			color: #666666;
+			text-align: center;
+			margin-top: 36rpx;
+		}
+
+		.sh_popup_btn {
+			display: flex;
+			margin-top: 60rpx;
+			justify-content: space-between;
+
+			.btn {
+				width: 244rpx;
+				height: 72rpx;
+				border-radius: 50rpx;
+				text-align: center;
+				line-height: 72rpx;
+			}
+
+			.no_btn {
+				@include coupons_border_color(theme);
+				color: $theme-color;
+				margin-right: 32rpx;
+			}
+
+			.yes_btn {
+				@include main_bg_color(theme);
+				color: #FFFFFF;
+			}
+		}
+	}
 </style>

File diff suppressed because it is too large
+ 392 - 403
mer_uniapp/pages/goods_cate/index.vue


+ 2 - 3
mer_uniapp/pages/index/index.vue

@@ -320,9 +320,8 @@
 				uni.setStorageSync('merId', JSON.parse(JSON.stringify(item.id)))
 				// 修改跳转
 				uni.navigateTo({
-					// url: '/pages/merchant/home/index'
-					 url: `/pages/goods_cate/index?id=${item.id}`
-					
+					url: '/pages/merchant/home/index'
+					 // url: `/pages/goods_cate/index?id=${item.id}`
 				})
 			},
 			onCateListClick(url) {

+ 498 - 28
mer_uniapp/pages/merchant/home/index.vue

@@ -1,12 +1,11 @@
 <template>
 	<view class="container" :style="{ height: winHeight+ 'px' }">
-		<!-- 状态栏高度 -->
-		<view :style="{ height: `${statusBarHeight}px` }"></view>
-		<!-- 导航栏 -->
-		<view :style="{ height: `${navigationBarHeight}rpx`,lineHeight: `${navigationBarHeight}rpx`}" class="order-nav">
-			<view class="back-button" @tap="handBack()"></view>
-			<text>{{merchanInfo.name}}</text>
+		<!-- #ifdef MP -->
+		<view class="cart_nav">
+			<nav-bar iconColor='#fff' ref="navBarRef" :navTitle="merchanInfo.name" backgroundColor="#FF6702" :isBackgroundColor="false">
+			</nav-bar>
 		</view>
+		<!-- #endif -->
 		<view class="main">
 			<view class="nav">
 				<view class="header">
@@ -60,23 +59,30 @@
 						<view style="font-weight: 400;font-size: 21rpx;color: #999999;text-align: center;margin-bottom: 19rpx;">————温馨提示:湿度选择,避免浪费
 							————</view>
 						<view class="category" v-for="(item, index) in goods" :key="index" :id="`cate-${item.id}`">
+							<view class="title">
+								<text>{{ item.name }}</text>
+								<image :src="item.icon" class="icon"></image>
+							</view>
 							<view class="items">
 								<!-- 商品 begin -->
 								<!-- <view v-if="!item.goodsList">无商品</view> -->
 								<view class="good" v-for="(good, key) in item.childList" :key="key">
-									<image :src="good.image" class="image" @tap="console.log('点击图片')"></image>
+									<image :src="good.icon" class="image" @tap="console.log('点击图片')"></image>
 									<view class="right">
 										<text class="name">{{ good.name }}</text>
-										<text class="tips">{{ good.content }}</text>
+										<view class="tips">
+											<text>销量 {{good.sales}}</text>
+											<text style="margin-left: 39rpx;">好评率 {{ good.replyChance*100}}%</text>
+										</view>
 										<view class="price_and_action">
-											<text class="price">¥{{ good.otPrice }}</text>
-											<view class="btn-group" v-if="good.use_property">
-												<button type="primary" class="btn property_btn bg-color" hover-class="none" size="mini" @tap="console.log('选规格')">
+											<text class="price">¥{{ good.price }}</text>
+											<view class="btn-group">
+												<button type="primary" class="btn property_btn bg-color" hover-class="none" size="mini" @tap="Selectpox(item, good)">
 													选规格
 												</button>
-												<view class="dot" v-show="goodCartNum(good.id)">{{ goodCartNum(good.id) }}</view>
+												<!-- <view class="dot" v-show="goodCartNum(good.id)">{{ goodCartNum(good.id) }}</view> -->
 											</view>
-											<view class="btn-group" v-else>
+											<!-- <view class="btn-group" v-else>
 												<button type="default" v-show="goodCartNum(good.id)" plain class="btn reduce_btn" size="mini" hover-class="none"
 												 @tap="handleReduceFromCart(item, good)">
 													<view class="iconfont iconsami-select">-</view>
@@ -85,7 +91,7 @@
 												<button type="primary" class="btn add_btn bg-color" size="min" hover-class="none" @tap="handleAddToCart(item, good, 1)">
 													<view class="iconfont iconadd-select">+</view>
 												</button>
-											</view>
+											</view> -->
 										</view>
 									</view>
 								</view>
@@ -99,11 +105,10 @@
 			<!-- goods list end -->
 		</view>
 		<!-- content end -->
-
 		<!-- 购物车栏 begin -->
-		<view class="cart-box" style="bottom: 77rpx">
+		<view class="cart-box">
 			<view class="mark">
-				<image src="/static/img/ic-security-settings.png" class="cart-img" @tap=""></image>
+				<image src="/static/img/ic-shopping-cart.png" class="cart-img" @tap="cart.length !== 0 ? lockcatble = !lockcatble : ''"></image>
 				<view class="tag" v-if="cart.length > 0">{{ getCartGoodsNumber }}</view>
 			</view>
 			<view style="font-weight: 500;font-size: 27rpx;color: #999999;" class="price" v-if="cart.length === 0">配送费2元</view>
@@ -114,6 +119,94 @@
 			</button>
 		</view>
 		<!-- 购物车栏 end -->
+		<!-- 打开的购物车 -->
+		<view class="mode" v-if="cart.length !== 0 && lockcatble" style="z-index: 9;">
+			<view class="mode-1">
+				<!-- 判断数量大于0显示 -->
+				<view class="mode-clear" v-if="getCartGoodsNumber>0">
+					<text class="mode-txt">数量:<text style="color: #FD6716 ;">({{getCartGoodsNumber}})</text></text>
+					<text @tap="cart = [], lockcatble = false" class="mode-txt1">清空</text>
+				</view>
+				<view class="mode-box">
+					<view class="items">
+						<!-- 商品 begin -->
+						<view class="good" v-for="(good, key) in cart" :key="key">
+							<image :src="good.icon" class="image" @tap="console.log('点击图片')"></image>
+							<view class="right" style="margin-left: 50rpx;">
+								<text class="name">{{ good.name }}</text>
+								<view class="tips">
+									<text>销量 {{good.sales}}</text>
+									<text style="margin-left: 39rpx;">好评率 {{ good.replyChance*100}}%</text>
+								</view>
+								<view class="price_and_action">
+									<text class="price">¥{{ good.price * good.number }}</text>
+									<view class="btn-group">
+										<button type="default" v-show="goodCartNum(good.id)" plain class="btn reduce_btn" size="mini" hover-class="none"
+										 @tap="handleReduceFromCart(item, good)">
+											<view class="iconfont iconsami-select">-</view>
+										</button>
+										<view class="number" v-show="goodCartNum(good.id)">{{ goodCartNum(good.id) }}</view>
+										<button type="primary" class="btn add_btn bg-color" size="min" hover-class="none" @tap="handleAddToCart(item, good, 1)">
+											<view class="iconfont iconadd-select">+</view>
+										</button>
+									</view>
+								</view>
+							</view>
+						</view>
+						<!-- 商品 end -->
+					</view>
+					<view style="height: 200rpx;">
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 规格弹窗 -->
+		<view class="mode" v-if="selectble">
+			<view class="sel-mode-1">
+				<view class="close" @click="Close">
+					<text style="padding: 10rpx; 20rpx">x</text>
+				</view>
+				<view class="sel-2">
+					<image class="neximg" :src="specifications.icon" />
+					<view class="nexbox1 flex-around-center">
+						<text>销量 {{specifications.sales}}</text>
+						<text>好评率 {{ specifications.replyChance*100}}%</text>
+						<text class="nexbox-txt3">¥ {{specifications.price}}</text>
+					</view>
+				</view>
+				<!--规格数组  -->
+				<view class="sel-3">
+					<text>规格</text>
+					<view class="sel-4">
+						<view class="sel-5" @click="xubox(item.productId)" :style="{background: item.productId == productid ? '#ff9805' : ''}"
+						 v-for="(item,index) in productValue" :key="index">
+							{{item.optionName}}
+						</view>
+					</view>
+				</view>
+				<!-- 数量 -->
+				<view class="sel-6">
+					<text>数量</text>
+					<!-- 加入购物车 -->
+					<view class="btn-group">
+						<button v-if="!goodCartNum(specifications.id)" type="primary" class="btn property_btn bg-color" size="min"
+						 hover-class="none" @tap="handleAddToCart(specificationsList, specifications, 1)">
+							加入购物车
+						</button>
+						<template v-else>
+							<button type="default" v-show="goodCartNum(specifications.id)" plain class="btn reduce_btn" size="mini"
+							 hover-class="none" @tap="handleReduceFromCart(specificationsList, specifications)">
+								<view class="iconfont iconsami-select">-</view>
+							</button>
+							<view class="number" v-show="goodCartNum(specifications.id)">{{ goodCartNum(specifications.id) }}</view>
+							<button type="primary" class="btn add_btn bg-color" size="min" hover-class="none" @tap="handleAddToCart(specificationsList, specifications, 1)">
+								<view class="iconfont iconadd-select">+</view>
+							</button>
+						</template>
+					</view>
+				</view>
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -132,9 +225,20 @@
 		getMerchantInfo,
 		getMerchantProList
 	} from '@/api/merchant.js';
+	import {
+		getProductDetail
+	} from '@/api/product.js';
+	import {
+		orderCreate,
+		preOrderApi
+	} from '@/api/order.js';
+	import navBar from '@/components/navBar';
 	let app = getApp();
 	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'rpx';
 	export default {
+		components: {
+			navBar
+		},
 		data() {
 			return {
 				merId: 0,
@@ -156,8 +260,14 @@
 				sizeCalcState: false,
 				orderType: 'takeout',
 				store: {
-					min_price: 8
-				}
+					min_price: 0.01
+				},
+				specifications: '', //点击的这一项菜品信息
+				specificationsList: [], //点击的这一项菜品信息的大类
+				selectble: false, //规格弹窗
+				productValue: [], //规格数组
+				productid: '', //选中规格的id
+				lockcatble: false, // 购物车弹窗
 			}
 		},
 		onLoad(options) {
@@ -345,12 +455,16 @@
 						name: good.name,
 						price: good.price,
 						number: num,
-						image: good.images,
+						icon: good.icon,
 						use_property: good.use_property,
 						props_text: good.props_text,
-						props: good.props
+						props: good.props,
+						productid: this.productid,
+						...good
 					})
 				}
+
+				console.log(this.cart, '购物车')
 			},
 			toPay() {
 				// if(!this.isLogin) {
@@ -361,13 +475,57 @@
 				uni.showLoading({
 					title: '加载中'
 				})
-				uni.setStorageSync('cart', JSON.parse(JSON.stringify(this.cart)))
 
-				uni.navigateTo({
-					url: '/pages/goods/order_confirm/index'
+				let orderDetails = this.cart.map((item) => {
+					return {
+						attrValueId: item.productid, //商品规格属性id(立即购买、活动购买必填)
+						groupBuyActivityId: null, //拼团活动id(拼团下单时必填)
+						groupBuyRecordId: 0, // 拼团记录id,营销类型2=拼团 时必填 0=开团 实际
+						productId: item.id, //商品id
+						productNum: item.number //商品数量
+					};
+				});
+				preOrderApi({
+					"preOrderType": 'buyNow',
+					//类型 预下单类型(“shoppingCart”:购物车下单,“buyNow”:
+					// 立即购买,“video”: 视频号商品下单,“seckill”:秒杀下单,“group”:拼团下单)
+					"orderDetails": orderDetails //购物车信息
+				}).then(res => {
+					console.log('预下单接口', res)
+					if (res.code == 200) {
+						let cartList = JSON.stringify(this.cart)
+						uni.setStorageSync('cart', JSON.parse(JSON.stringify(this.cart)))
+						uni.navigateTo({
+							// url: `/pages/goods/order_confirm/index?cartList=${cartList}`
+							url: '/pages/goods/order_confirm/index?orderNo=' + res.data.orderNo
+						})
+					}
 				})
+				uni.setStorageSync('cart', JSON.parse(JSON.stringify(this.cart)))
 				uni.hideLoading()
-			}
+			},
+			// 选规格打开
+			Selectpox(item, itemInfo) {
+				this.specifications = itemInfo //这一项信息
+				this.specificationsList = item //这一项信息
+				getProductDetail(
+					itemInfo.id,
+					0, 0, ''
+				).then((res) => {
+					console.log('规格', res)
+					if (res.code == 200) {
+						this.productValue = res.data.productAttr[0].optionList //规格数组
+						this.productid = res.data.productValue.默认.id //默认选择的id
+						this.selectble = true
+					}
+				})
+			},
+			// 关闭规格
+			Close() {
+				this.specifications = '' //这一项信息
+				this.specificationsList = [] //这一项信息
+				this.selectble = false
+			},
 		}
 	}
 </script>
@@ -762,6 +920,7 @@
 									.price {
 										font-size: $font-size-base;
 										font-weight: 600;
+										color: $bg-color-primary;
 									}
 
 									.btn-group {
@@ -1015,10 +1174,10 @@
 	}
 
 	.cart-box {
-		position: absolute;
+		// position: absolute;
 		// bottom: 30rpx;
-		left: 30rpx;
-		right: 30rpx;
+		// left: 30rpx;
+		// right: 30rpx;
 		height: 96rpx;
 		border-radius: 48rpx;
 		box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.2);
@@ -1190,4 +1349,315 @@
 		display: flex;
 		align-items: center;
 	}
+
+	.mode {
+		position: fixed;
+		width: 100%;
+		height: 100%;
+		left: 0;
+		top: 0;
+		background: rgba(33, 33, 33, 0.8);
+		z-index: 99999;
+		display: flex;
+		align-items: flex-end;
+	}
+
+	.mode-1 {
+		width: 100%;
+		height: 840rpx;
+		background: #FFF;
+		display: flex;
+		flex-direction: column;
+		gap: 20rpx;
+		// padding: 30rpx;
+		box-sizing: border-box;
+		overflow: auto;
+		/* 添加这个属性使容器可以滚动 */
+	}
+
+	// 规格弹窗
+	.sel-mode-1 {
+		width: 100%;
+		// height: 440rpx;
+		background: #FFF;
+		display: flex;
+		flex-direction: column;
+		gap: 20rpx;
+		box-sizing: border-box;
+		overflow: auto;
+		z-index: 99999;
+		padding: 20rpx 20rpx 60rpx 20rpx;
+		box-sizing: border-box;
+		position: relative;
+	}
+
+	.close {
+		text-align: right;
+		font-size: 40rpx;
+	}
+
+	.sel-2 {
+		display: flex;
+		align-items: center;
+		gap: 20rpx;
+
+		.nexbox1 {
+			flex: 1;
+			text-overflow: ellipsis;
+			white-space: nowrap;
+			color: $text-color-assist;
+		}
+	}
+
+	.sel-3 {
+		display: flex;
+		flex-direction: column;
+		gap: 10rpx;
+	}
+
+	.sel-4 {
+		display: flex;
+		align-items: center;
+		gap: 10rpx;
+	}
+
+	.sel-5 {
+		width: 80rpx;
+		height: 40rpx;
+		box-sizing: border-box;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		font-size: 24rpx;
+		background: #999999;
+		color: #FFF;
+		padding: 8rpx;
+		border-radius: 8rpx;
+	}
+
+	.sel-6 {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+	}
+
+	.sel-btn {
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+	}
+
+	.sel-btn1 {
+		width: 110px;
+		height: 60rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		background: rgba(255, 103, 2, 1);
+		color: #FFF;
+		font-size: 30rpx;
+		border-radius: 10rpx;
+	}
+
+	.neximg {
+		width: 160rpx;
+		height: 160rpx;
+		margin-right: 20rpx;
+		border-radius: 8rpx;
+		/* 保持图片等比例缩放,并且不会裁切 */
+	}
+
+
+	.btn-group {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		position: relative;
+
+		.btn {
+			padding: 0 20rpx;
+			box-sizing: border-box;
+			font-size: $font-size-sm;
+			height: 44rpx;
+			line-height: 44rpx;
+
+			&.property_btn {
+				border-radius: 24rpx;
+			}
+
+			&.add_btn,
+			&.reduce_btn {
+				padding: 0;
+				width: 44rpx;
+				border-radius: 44rpx;
+			}
+		}
+
+		.dot {
+			position: absolute;
+			background-color: #ffffff;
+			border: 1px solid $bg-color-primary;
+			color: $bg-color-primary;
+			font-size: $font-size-sm;
+			width: 36rpx;
+			height: 36rpx;
+			line-height: 36rpx;
+			text-align: center;
+			border-radius: 100%;
+			right: -12rpx;
+			top: -10rpx;
+		}
+
+		.number {
+			width: 44rpx;
+			height: 44rpx;
+			line-height: 44rpx;
+			text-align: center;
+		}
+	}
+
+	.nexbox-txt3 {
+		color: $bg-color-primary;
+	}
+
+	.mode-box {
+		width: 100%;
+		display: flex;
+		flex-direction: column;
+		gap: 20rpx;
+		padding: 30rpx;
+		box-sizing: border-box;
+	}
+
+	.items {
+		display: flex;
+		flex-direction: column;
+		padding-bottom: -30rpx;
+
+		.good {
+			display: flex;
+			align-items: center;
+			margin-bottom: 30rpx;
+
+			.image {
+				width: 160rpx;
+				height: 160rpx;
+				margin-right: 20rpx;
+				border-radius: 8rpx;
+			}
+
+			.right {
+				flex: 1;
+				// height: 160rpx;
+				overflow: hidden;
+				display: flex;
+				flex-direction: column;
+				align-items: flex-start;
+				justify-content: space-between;
+				padding-right: 14rpx;
+
+				.name {
+					font-size: $font-size-base;
+					margin-bottom: 10rpx;
+				}
+
+				.tips {
+					width: 100%;
+					height: 40rpx;
+					line-height: 40rpx;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+					font-size: $font-size-sm;
+					color: $text-color-assist;
+					margin-bottom: 10rpx;
+				}
+
+				.price_and_action {
+					width: 100%;
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+
+					.price {
+						font-size: $font-size-base;
+						font-weight: 600;
+						color: $bg-color-primary;
+					}
+
+					.btn-group {
+						display: flex;
+						justify-content: space-between;
+						align-items: center;
+						position: relative;
+
+						.btn {
+							padding: 0 20rpx;
+							box-sizing: border-box;
+							font-size: $font-size-sm;
+							height: 44rpx;
+							line-height: 44rpx;
+
+							&.property_btn {
+								border-radius: 24rpx;
+							}
+
+							&.add_btn,
+							&.reduce_btn {
+								padding: 0;
+								width: 44rpx;
+								border-radius: 44rpx;
+							}
+						}
+
+						.dot {
+							position: absolute;
+							background-color: #ffffff;
+							border: 1px solid $bg-color-primary;
+							color: $bg-color-primary;
+							font-size: $font-size-sm;
+							width: 36rpx;
+							height: 36rpx;
+							line-height: 36rpx;
+							text-align: center;
+							border-radius: 100%;
+							right: -12rpx;
+							top: -10rpx;
+						}
+
+						.number {
+							width: 44rpx;
+							height: 44rpx;
+							line-height: 44rpx;
+							text-align: center;
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.mode-clear {
+		padding: 30rpx;
+		box-sizing: border-box;
+		position: sticky;
+		z-index: 99;
+		top: 0;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		background: #FFF;
+		border-bottom: 1px solid burlywood;
+	}
+
+	.mode-txt {
+		display: flex;
+		align-items: center;
+		gap: 8rpx;
+	}
+
+	.mode-txt1 {
+		font-weight: 500;
+		font-size: 32rpx;
+	}
 </style>

+ 1 - 98
mer_uniapp/pages/rider/rider_shipping/index.vue

@@ -1,33 +1,10 @@
 <template>
 	<view>
-		<!-- 状态栏高度 -->
-		<view :style="{ height: `${statusBarHeight}px`, backgroundColor: '#FF6702' }"></view>
-
-		<!-- 导航栏 -->
-		<view :style="{ height: `${navigationBarHeight}rpx`,lineHeight: `${navigationBarHeight}rpx`}" class="order-nav">
-			<!-- <view class="back-button" @tap="handBack()"></view> -->
-			接单
-		</view>
 		<scroll-view scroll-y="true">
 			<view v-for="item in riderData" :key="item.id" style="margin: 10rpx 0;">
 				<rider-order :orderInfo="item"></rider-order>
 			</view>
 		</scroll-view>
-
-		<!-- 底部导航 -->
-		<view class="page-footer">
-			<view class="foot-item" :class="item.pagePath == activeRouter?'active':''" v-for="(item,index) in footerList" :key="index"
-			 @click="goRouter(item)">
-				<block v-if="item.pagePath == activeRouter">
-					<image :src="item.selectedIconPath"></image>
-					<view class="txt">{{item.text}}</view>
-				</block>
-				<block v-else>
-					<image :src="item.iconPath"></image>
-					<view class="txt">{{item.text}}</view>
-				</block>
-			</view>
-		</view>
 	</view>
 </template>
 
@@ -42,6 +19,7 @@
 	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
 	let app = getApp();
 	export default {
+		name: 'riderShipping',
 		components: {
 			riderOrder,
 		},
@@ -49,21 +27,6 @@
 			return {
 				statusBarHeight: app.globalData.statusBarHeight,
 				navigationBarHeight: 112,
-				// footerList: [{
-				// 		pagePath: "/pages/goods/order_confirm/index",
-				// 		iconPath: require("./static/ddh.png"),
-				// 		selectedIconPath: require("./static/ddl.png"),
-				// 		text: "订单",
-				// 		role: '0'
-				// 	},
-				// 	{
-				// 		pagePath: "/pages/admin/order/index",
-				// 		iconPath: require("./static/wdh.png"),
-				// 		selectedIconPath: require("./static/wdl.png"),
-				// 		text: "我的",
-				// 		role: '1'
-				// 	}
-				// ],
 				riderData: [{
 						cost: '2.00',
 						time: '12:00',
@@ -118,64 +81,4 @@
 </script>
 
 <style scoped lang="scss">
-	.order-nav {
-		font-weight: 500;
-		font-size: 35rpx;
-		color: #FFFFFF;
-		position: relative;
-		background-color: #FF6702;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-
-		.back-button {
-			position: absolute;
-			left: 20rpx;
-		}
-	}
-
-	.page-footer {
-		position: fixed;
-		bottom: 0;
-		z-index: 9;
-		display: flex;
-		align-items: center;
-		justify-content: space-around;
-		width: 100%;
-		height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
-		height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
-		box-sizing: border-box;
-		border-top: solid 1rpx #F3F3F3;
-		background-color: #fff;
-		// box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
-		padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
-		padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
-
-		.foot-item {
-			display: flex;
-			width: max-content;
-			align-items: center;
-			justify-content: center;
-			flex-direction: column;
-			position: relative;
-			padding: 0 20rpx;
-			margin-top: 18rpx;
-
-			&.active {
-				color: $bg-color-primary
-			}
-		}
-
-		.foot-item image {
-			height: 50rpx;
-			width: 50rpx;
-			text-align: center;
-			margin: 0 auto;
-		}
-
-		.foot-item .txt {
-			font-size: 27rpx;
-			margin-top: 8rpx;
-		}
-	}
 </style>

+ 5 - 1
mer_uniapp/pages/rider_index/index.vue

@@ -16,7 +16,7 @@
 			</view>
 			<scroll-view scroll-y style="overflow: hidden;">
 				<view v-for="item in riderData" :key="item.id" style="margin: 10rpx 0;">
-					<rider-order :orderInfo="item" @orderCilck="goOrderClick"></rider-order>
+					<rider-order :orderInfo="item" @orderCilck="goOrderClick" :statusId="riderStatus"></rider-order>
 				</view>
 			</scroll-view>
 		</view>
@@ -92,6 +92,10 @@
 						name: '待接单'
 					},
 					{
+						id: 8,
+						name: '待取货'
+					},
+					{
 						id: 4,
 						name: '配送中'
 					},

BIN
mer_uniapp/static/img/ic-shopping-cart.png


Some files were not shown because too many files changed in this diff