|
@@ -13,11 +13,8 @@
|
|
<view v-if="previewData.hasCity && mchIndex === 1" class="group">
|
|
<view v-if="previewData.hasCity && mchIndex === 1" class="group">
|
|
<app-address-bar :address="previewData.address" :has-ziti="previewData.has_ziti" :all-ziti="previewData.allZiti" :city="mch.city"></app-address-bar>
|
|
<app-address-bar :address="previewData.address" :has-ziti="previewData.has_ziti" :all-ziti="previewData.allZiti" :city="mch.city"></app-address-bar>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
-
|
|
|
|
- <!-- 循环商户列表start -->
|
|
|
|
<view :key="mchIndex" class="group">
|
|
<view :key="mchIndex" class="group">
|
|
- <!-- 商铺名 -->
|
|
|
|
|
|
+ <!-- 循环商户列表start -->
|
|
<view style="padding: 26rpx 32rpx;">
|
|
<view style="padding: 26rpx 32rpx;">
|
|
<view class="dir-left-nowrap cross-center" style="padding: 10rpx 0;line-height: 1.2;">
|
|
<view class="dir-left-nowrap cross-center" style="padding: 10rpx 0;line-height: 1.2;">
|
|
<!-- 商户名start -->
|
|
<!-- 商户名start -->
|
|
@@ -77,7 +74,6 @@
|
|
</template><!-- 自提门店信息end -->
|
|
</template><!-- 自提门店信息end -->
|
|
</view>
|
|
</view>
|
|
<view class="line"></view>
|
|
<view class="line"></view>
|
|
- <!-- 配送方式 -->
|
|
|
|
<view v-if="mch.show_delivery !== false" style="padding: 18rpx 32rpx;">
|
|
<view v-if="mch.show_delivery !== false" style="padding: 18rpx 32rpx;">
|
|
<!-- 选择配送方式start -->
|
|
<!-- 选择配送方式start -->
|
|
<view class="dir-left-nowrap cross-center" style="padding: 18rpx 0;">
|
|
<view class="dir-left-nowrap cross-center" style="padding: 18rpx 0;">
|
|
@@ -95,8 +91,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view><!-- 选择配送方式end -->
|
|
</view><!-- 选择配送方式end -->
|
|
- <!-- 同城配送 -->
|
|
|
|
- <template v-if="mch.delivery && mch.delivery.send_type === 'city' && mch.city">
|
|
|
|
|
|
+ <template v-if="mch.delivery && mch.delivery.send_type === 'city' && mch.city">
|
|
<!-- 同城配送信息start -->
|
|
<!-- 同城配送信息start -->
|
|
<view class="line"></view>
|
|
<view class="line"></view>
|
|
<view v-if="mch.city.error" class="dir-left-nowrap cross-center" style="padding: 36rpx 32rpx;">
|
|
<view v-if="mch.city.error" class="dir-left-nowrap cross-center" style="padding: 36rpx 32rpx;">
|
|
@@ -119,14 +114,8 @@
|
|
<view v-if="!mch.pick_up_enable" style="height: 80rpx;line-height: 80rpx; background: #fff4f3;padding: 0 24rpx;">
|
|
<view v-if="!mch.pick_up_enable" style="height: 80rpx;line-height: 80rpx; background: #fff4f3;padding: 0 24rpx;">
|
|
<view>以下商品满{{mch.pick_up_price}}元起送</view>
|
|
<view>以下商品满{{mch.pick_up_price}}元起送</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
- <!-- 商品循环 -->
|
|
|
|
<app-submit-goods :theme="theme" v-on:updateList="updateList" :index="mchIndex" :plugin="plugin" :list="mch"></app-submit-goods>
|
|
<app-submit-goods :theme="theme" v-on:updateList="updateList" :index="mchIndex" :plugin="plugin" :list="mch"></app-submit-goods>
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
<view class="line"></view>
|
|
<view class="line"></view>
|
|
- <!-- 优惠券 -->
|
|
|
|
<template v-if="(mch.coupon && mch.coupon.enabled) ||
|
|
<template v-if="(mch.coupon && mch.coupon.enabled) ||
|
|
(mch.member_discount > 0 || mch.member_discount < 0) ||
|
|
(mch.member_discount > 0 || mch.member_discount < 0) ||
|
|
(mch.integral && mch.integral.can_use) ||
|
|
(mch.integral && mch.integral.can_use) ||
|
|
@@ -237,8 +226,7 @@
|
|
</view>
|
|
</view>
|
|
<view class="line"></view>
|
|
<view class="line"></view>
|
|
</template>
|
|
</template>
|
|
- <!-- 运费 -->
|
|
|
|
- <template v-if="mch.show_express_price !== false">
|
|
|
|
|
|
+ <template v-if="mch.show_express_price !== false">
|
|
<!-- 运费信息start -->
|
|
<!-- 运费信息start -->
|
|
<view class="dir-left-nowrap cross-center" style="height: 84rpx; padding: 0 32rpx;">
|
|
<view class="dir-left-nowrap cross-center" style="height: 84rpx; padding: 0 32rpx;">
|
|
<view class="box-grow-1">运费</view>
|
|
<view class="box-grow-1">运费</view>
|
|
@@ -251,21 +239,31 @@
|
|
<template v-else>¥{{mch.express_price}}</template>
|
|
<template v-else>¥{{mch.express_price}}</template>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- </template><!-- 运费信息end -->
|
|
|
|
- <template v-if="previewData.total_sku_tax_amount !== false">
|
|
|
|
|
|
+ </template><!-- 运费信息end -->
|
|
|
|
+
|
|
|
|
+ <template v-if="mch.total_sku_tax_amount >0">
|
|
<!-- 综合税费start -->
|
|
<!-- 综合税费start -->
|
|
<view class="dir-left-nowrap cross-center" style="height: 84rpx; padding: 0 32rpx;">
|
|
<view class="dir-left-nowrap cross-center" style="height: 84rpx; padding: 0 32rpx;">
|
|
<view class="box-grow-1">综合税费</view>
|
|
<view class="box-grow-1">综合税费</view>
|
|
<view class="box-grow-0" :class="[themeTextClass]" :style="{'color': !is_gift ? theme.color : '','text-align':'right'}">
|
|
<view class="box-grow-0" :class="[themeTextClass]" :style="{'color': !is_gift ? theme.color : '','text-align':'right'}">
|
|
- <template v-if="previewData.total_sku_tax_amount">
|
|
|
|
- <view :style="{'color': theme.color}">¥{{previewData.total_sku_tax_amount}}</view>
|
|
|
|
- </template>
|
|
|
|
- <template v-else>¥{{previewData.total_sku_tax_amount}}</template>
|
|
|
|
|
|
+ <template>¥{{mch.total_sku_tax_amount}}</template>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- </template><!-- 综合税费end -->
|
|
|
|
- <!-- 买家留言 -->
|
|
|
|
- <template v-if="
|
|
|
|
|
|
+ </template><!-- 综合税费end -->
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <template v-if="balance < 0">
|
|
|
|
+ <!-- 欠款金额start -->
|
|
|
|
+ <view class="dir-left-nowrap cross-center" style="height: 84rpx; padding: 0 32rpx;">
|
|
|
|
+ <view class="box-grow-1">欠款金额</view>
|
|
|
|
+ <view class="box-grow-0" :class="[themeTextClass]" :style="{'color': !is_gift ? theme.color : '','text-align':'right'}">
|
|
|
|
+ <template>¥{{Math.abs(balance)}}</template>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- 欠款金额end -->
|
|
|
|
+
|
|
|
|
+ <template v-if="
|
|
!(mch.order_form && mch.order_form.status == '1')
|
|
!(mch.order_form && mch.order_form.status == '1')
|
|
&& mch.show_remark !== false
|
|
&& mch.show_remark !== false
|
|
&& mch.has_goods_form !== true">
|
|
&& mch.has_goods_form !== true">
|
|
@@ -275,18 +273,14 @@
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
<view class="line"></view>
|
|
<view class="line"></view>
|
|
- <!-- 小计 -->
|
|
|
|
<view class="dir-right-nowrap cross-center" style="height: 84rpx; padding: 0 32rpx;">
|
|
<view class="dir-right-nowrap cross-center" style="height: 84rpx; padding: 0 32rpx;">
|
|
<view class="box-grow-0 dir-left-nowrap">
|
|
<view class="box-grow-0 dir-left-nowrap">
|
|
<view>小计:</view>
|
|
<view>小计:</view>
|
|
- <view :class="[themeTextClass]" :style="{'color': !is_gift ? theme.color : ''}">¥{{mch.total_price}}</view>
|
|
|
|
|
|
+ <view :class="[themeTextClass]" :style="{'color': !is_gift ? theme.color : ''}">¥{{balance < 0 ? setPrice(mch.total_price, balance) : FlorPrice(mch.total_price) }}</view>
|
|
</view>
|
|
</view>
|
|
<view class="box-grow-0 font-gray mr-12">共{{mch.goods_count}}件</view>
|
|
<view class="box-grow-0 font-gray mr-12">共{{mch.goods_count}}件</view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <!-- 循环商户列表end -->
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ </view><!-- 循环商户列表end -->
|
|
</template>
|
|
</template>
|
|
<view v-for="(mch, mchIndex) in previewData.mch_list" :key="mchIndex">
|
|
<view v-for="(mch, mchIndex) in previewData.mch_list" :key="mchIndex">
|
|
<view v-if="mch.order_form && mch.order_form.status == '1'" class="group">
|
|
<view v-if="mch.order_form && mch.order_form.status == '1'" class="group">
|
|
@@ -352,9 +346,9 @@
|
|
{{custom_currency}}+
|
|
{{custom_currency}}+
|
|
</text>
|
|
</text>
|
|
<template v-if="previewData.vip_card_discount_total_price">
|
|
<template v-if="previewData.vip_card_discount_total_price">
|
|
- ¥{{previewData.vip_card_discount_total_price}}
|
|
|
|
|
|
+ ¥{{balance <0 ? setPrice(previewData.vip_card_discount_total_price, balance) :FlorPrice(previewData.vip_card_discount_total_price) }}
|
|
</template>
|
|
</template>
|
|
- <template v-else>¥{{previewData.total_price}}</template>
|
|
|
|
|
|
+ <template v-else>¥{{balance <0 ? setPrice(previewData.total_price, balance) :FlorPrice(previewData.total_price) }}</template>
|
|
</view>
|
|
</view>
|
|
<view v-if="previewData.vip_card_price > 0" :class="[themeTextClass]" :style="{'color': !is_gift ? theme.color : '','font-size': '20rpx'}">包含SVIP费用:
|
|
<view v-if="previewData.vip_card_price > 0" :class="[themeTextClass]" :style="{'color': !is_gift ? theme.color : '','font-size': '20rpx'}">包含SVIP费用:
|
|
¥{{previewData.vip_card_price}}
|
|
¥{{previewData.vip_card_price}}
|
|
@@ -386,8 +380,6 @@ import AppAddressBar from "./app-address-bar";
|
|
import AppSubmitCheckbox from "./app-submit-checkbox";
|
|
import AppSubmitCheckbox from "./app-submit-checkbox";
|
|
import AppClose from '../../components/basic-component/app-close/app-close.vue';
|
|
import AppClose from '../../components/basic-component/app-close/app-close.vue';
|
|
|
|
|
|
-import deepClone from '@/core/deepClone.js'
|
|
|
|
-
|
|
|
|
export default {
|
|
export default {
|
|
name: 'order-submit',
|
|
name: 'order-submit',
|
|
components: {
|
|
components: {
|
|
@@ -401,6 +393,7 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ balance: 0, // 余额
|
|
totalTitle: '合计',
|
|
totalTitle: '合计',
|
|
check: false,
|
|
check: false,
|
|
previewData: {
|
|
previewData: {
|
|
@@ -449,8 +442,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- onLoad(options) {
|
|
|
|
- this.$commonLoad.onload(options);
|
|
|
|
|
|
+ onLoad(options) { this.$commonLoad.onload(options);
|
|
let mchList = JSON.parse(options.mch_list);
|
|
let mchList = JSON.parse(options.mch_list);
|
|
let list = [];
|
|
let list = [];
|
|
for(let item of mchList) {
|
|
for(let item of mchList) {
|
|
@@ -496,6 +488,7 @@ export default {
|
|
// #endif
|
|
// #endif
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
|
|
+ this.getSetting()
|
|
this.showClose = false;
|
|
this.showClose = false;
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
this.showClose = true;
|
|
this.showClose = true;
|
|
@@ -540,7 +533,27 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ // 获取余额接口
|
|
|
|
+ getSetting: function () {
|
|
|
|
+ const self = this;
|
|
|
|
+ self.$request({
|
|
|
|
+ url: self.$api.balance.index,
|
|
|
|
+ }).then(info => {
|
|
|
|
+ if (info.code === 0) {
|
|
|
|
+ this.balance = Number(info.data.balance);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ setPrice(price, balance) {
|
|
|
|
+
|
|
|
|
+ price = Number(price)
|
|
|
|
+ balance = Math.abs(balance)
|
|
|
|
+ return (price + balance).toFixed(2)
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ FlorPrice(florPrice){
|
|
|
|
+ return Number(florPrice).toFixed(2)
|
|
|
|
+ },
|
|
noCouponStatus(mchIndex) {
|
|
noCouponStatus(mchIndex) {
|
|
const mchNoCouponStatusList = this.$store.getters['orderSubmit/getMchNoCouponStatusList'];
|
|
const mchNoCouponStatusList = this.$store.getters['orderSubmit/getMchNoCouponStatusList'];
|
|
if (mchNoCouponStatusList[mchIndex])
|
|
if (mchNoCouponStatusList[mchIndex])
|
|
@@ -588,7 +601,6 @@ export default {
|
|
this.$store.commit('orderSubmit/mutSetFormData', formData);
|
|
this.$store.commit('orderSubmit/mutSetFormData', formData);
|
|
},
|
|
},
|
|
setFormData(options) {
|
|
setFormData(options) {
|
|
- console.log(options.preview_url)
|
|
|
|
this.previewUrl = decodeURIComponent(options.preview_url || this.$api.order.preview);
|
|
this.previewUrl = decodeURIComponent(options.preview_url || this.$api.order.preview);
|
|
this.submitUrl = decodeURIComponent(options.submit_url || this.$api.order.submit);
|
|
this.submitUrl = decodeURIComponent(options.submit_url || this.$api.order.submit);
|
|
this.plugin = options.plugin || null;
|
|
this.plugin = options.plugin || null;
|
|
@@ -599,29 +611,7 @@ export default {
|
|
this.showPayResult = options.show_pay_result || true;
|
|
this.showPayResult = options.show_pay_result || true;
|
|
if (this.showPayResult === 'true') this.showPayResult = true;
|
|
if (this.showPayResult === 'true') this.showPayResult = true;
|
|
if (this.showPayResult === 'false') this.showPayResult = false;
|
|
if (this.showPayResult === 'false') this.showPayResult = false;
|
|
- let list = JSON.parse(options.mch_list);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- // console.log('================123===============')
|
|
|
|
- // console.log(list)
|
|
|
|
-
|
|
|
|
- // let tempGoods = []
|
|
|
|
- // for (let i = 0; i < list.length; i ++) {
|
|
|
|
- // const goods_list = list[i].goods_list
|
|
|
|
- // if (i === 0) {
|
|
|
|
- // goods_list.forEach(item => { item['is_jingwai'] = 0 })
|
|
|
|
- // } else if (i === 1) {
|
|
|
|
- // goods_list.forEach(item => { item['is_jingwai'] = 1 })
|
|
|
|
- // }
|
|
|
|
- // tempGoods = [...tempGoods, ...goods_list]
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
- // const tempList = [list[0]]
|
|
|
|
- // tempList[0].mch_id = 0
|
|
|
|
- // tempList[0].goods_list = tempGoods
|
|
|
|
-
|
|
|
|
- // list = deepClone(tempList)
|
|
|
|
-
|
|
|
|
|
|
+ const list = JSON.parse(options.mch_list);
|
|
|
|
|
|
// 商户列表先做下排序,主商城必须在最前
|
|
// 商户列表先做下排序,主商城必须在最前
|
|
for (let i in list) {
|
|
for (let i in list) {
|
|
@@ -690,19 +680,6 @@ export default {
|
|
response.data.mch_list[i].showInsertRows = false;
|
|
response.data.mch_list[i].showInsertRows = false;
|
|
}
|
|
}
|
|
this.previewData = response.data;
|
|
this.previewData = response.data;
|
|
-
|
|
|
|
-
|
|
|
|
- // const arr = this.$store.state.orderSubmit.formData.list[0].goods_list
|
|
|
|
- // // 添加境内外信息
|
|
|
|
- // console.log(arr)
|
|
|
|
- // this.previewData.mch_list[0].goods_list.forEach(item => {
|
|
|
|
- // const t = arr.find(i => i.id === item.id)
|
|
|
|
- // item.is_jingwai = t.is_jingwai
|
|
|
|
- // })
|
|
|
|
- // console.log('====================================')
|
|
|
|
- // console.log(this.previewData.mch_list[0].goods_list)
|
|
|
|
-
|
|
|
|
-
|
|
|
|
this.setDiyFormScrollStatus();
|
|
this.setDiyFormScrollStatus();
|
|
this.checkCouponError();
|
|
this.checkCouponError();
|
|
this.updateStoreDistance();
|
|
this.updateStoreDistance();
|
|
@@ -923,25 +900,6 @@ export default {
|
|
form_data: JSON.stringify(this.$store.state.orderSubmit.formData),
|
|
form_data: JSON.stringify(this.$store.state.orderSubmit.formData),
|
|
},
|
|
},
|
|
}).then(response => {
|
|
}).then(response => {
|
|
- if (response.code === 99) {
|
|
|
|
- // 未实名认证,需要使命认证
|
|
|
|
- uni.hideLoading()
|
|
|
|
- this.submitLock = false;
|
|
|
|
- const _this = this
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '您的账号尚未实名认证,请前往认证',
|
|
|
|
- success: function (res) {
|
|
|
|
- if (res.confirm) {
|
|
|
|
- _this.$jump({
|
|
|
|
- open_type: 'navigate',
|
|
|
|
- url: '/pages/identify/identify'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
this.getPayOrderId(response.data.queue_id, response.data.token);
|
|
this.getPayOrderId(response.data.queue_id, response.data.token);
|
|
} else {
|
|
} else {
|
|
@@ -1466,18 +1424,4 @@ $yWidth: #{24rpx};
|
|
color: #FF4544;
|
|
color: #FF4544;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-.collapse-item-titlebar {
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- height: 80rpx;
|
|
|
|
- .collapse-item-titlebar-txt {
|
|
|
|
- padding-left: 24rpx;
|
|
|
|
- font-weight: bold;
|
|
|
|
- font-size: 30rpx;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-::v-deep .uni-collapse {
|
|
|
|
- background-color: transparent !important;
|
|
|
|
-}
|
|
|
|
</style>
|
|
</style>
|