This commit is contained in:
DESKTOP-GMUNQ1B\k 2024-03-20 11:55:11 +08:00
parent 4d003d43c1
commit a1f904e97c
5 changed files with 248 additions and 220 deletions

View File

@ -10,25 +10,44 @@
<view class='item presell_item'> <view class='item presell_item'>
<view class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<view class='pictrue' @click="jumpCon(item)"> <view class='pictrue' @click="jumpCon(item)">
<image :src='(item.cart_info.productAttr && item.cart_info.productAttr.image) || item.cart_info.product.image' ></image> <image
:src='(item.cart_info.productAttr && item.cart_info.productAttr.image) || item.cart_info.product.image'>
</image>
</view> </view>
<view class='text'> <view class='text'>
<view class='acea-row row-between-wrapper'> <view class='acea-row row-between-wrapper'>
<view class='name line1' style="width: 360rpx;"><text class="event_name event_bg">预售</text>{{item.cart_info.product.store_name}}</view> <view class='name line1' style="width: 360rpx;"><text
<view class='num'><text class="p-color">{{item.cart_info.productPresellAttr.presell_price}}</text><br/>x {{item.product_num}}</view> class="event_name event_bg">预售</text>{{item.cart_info.product.store_name}}
</view> </view>
<view class='attr line1' v-if="item.cart_info.productAttr.sku" style="margin-top: 0;">{{item.cart_info.productAttr.sku}}</view> <view class='num'><text
<view v-if="evaluate === 0 || evaluate === 10 || evaluate === 11" class="event_ship event_color">发货时间 class="p-color">{{item.cart_info.productPresellAttr.presell_price}}</text><br />x
{{item.product_num}}
</view>
</view>
<view class='attr line1' v-if="item.cart_info.productAttr.sku" style="margin-top: 0;">
{{item.cart_info.productAttr.sku}}
</view>
<view v-if="evaluate === 0 || evaluate === 10 || evaluate === 11"
class="event_ship event_color">发货时间
<!--全款预售--> <!--全款预售-->
<text v-if="item.cart_info.productPresell.presell_type === 1">{{ item.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内</text> <text
v-if="item.cart_info.productPresell.presell_type === 1">{{ item.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内</text>
<!--定金预售--> <!--定金预售-->
<text v-if="item.cart_info.productPresell.presell_type === 2">{{ item.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内</text> <text
v-if="item.cart_info.productPresell.presell_type === 2">{{ item.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ item.cart_info.productPresell.delivery_day }}天内</text>
</view> </view>
<view class="right-btn-box event_box"> <view class="right-btn-box event_box">
<view class="btn-item" v-if="item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0" @click.stop="refund(item)">申请退款</view> <view class="btn-item"
<view class="btn-item err" v-if="item.is_refund ==1">退款中 x {{item.product_num - item.refund_num}}</view> v-if="evaluate != 2 && item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0"
<view class='btn-item err' v-if="item.is_refund >1">已退款 x {{item.product_num - item.refund_num}}</view> @click.stop="refund(item)">申请退款</view>
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.is_refund==0' @click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view> <view class="btn-item err" v-if="item.is_refund ==1">退款中 x
{{item.product_num - item.refund_num}}
</view>
<view class='btn-item err' v-if="item.is_refund >1">已退款 x
{{item.product_num - item.refund_num}}
</view>
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.is_refund==0'
@click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
<view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view> <view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
</view> </view>
</view> </view>
@ -37,44 +56,66 @@
<view v-if="orderData.status >= 10" class="event_progress"> <view v-if="orderData.status >= 10" class="event_progress">
<view class="progress_list"> <view class="progress_list">
<view class="progress_name">阶段一 买家已付款</view> <view class="progress_name">阶段一 买家已付款</view>
<view class="progress_price">商品定金 <text class="align_right">{{ orderData.pay_price }}</text></view> <view class="progress_price">商品定金 <text
<view class="progress_pay">定金实付款<text class="align_right t-color">{{ orderData.pay_price }}</text></view> class="align_right">{{ orderData.pay_price }}</text></view>
<view class="progress_pay">定金实付款<text
class="align_right t-color">{{ orderData.pay_price }}</text></view>
</view> </view>
<view class="progress_list"> <view class="progress_list">
<view class="progress_name">阶段二 <view class="progress_name">阶段二
<text v-if="orderData.status == 10 && orderData.presellOrder.activeStatus == 0">未开始</text> <text
<text v-if="orderData.status == 10 && orderData.presellOrder.activeStatus == 1">等待买家付尾款</text> v-if="orderData.status == 10 && orderData.presellOrder.activeStatus == 0">未开始</text>
<text v-if="orderData.status == 11 || orderData.presellOrder.activeStatus == 2">交易已关闭</text> <text
v-if="orderData.status == 10 && orderData.presellOrder.activeStatus == 1">等待买家付尾款</text>
<text
v-if="orderData.status == 11 || orderData.presellOrder.activeStatus == 2">交易已关闭</text>
</view> </view>
<view class="progress_price">商品尾款 <text class="align_right">{{ orderData.presellOrder.pay_price }}</text></view> <view class="progress_price">商品尾款 <text
<view class="progress_pay">尾款需付款<text class="align_right t-color">{{ orderData.presellOrder.pay_price }}</text></view> class="align_right">{{ orderData.presellOrder.pay_price }}</text></view>
<view class="progress_pay">尾款需付款<text
class="align_right t-color">{{ orderData.presellOrder.pay_price }}</text></view>
</view> </view>
</view> </view>
</view> </view>
<view v-else class='item'> <view v-else class='item'>
<view class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<view class='pictrue' @click="jumpCon(item)"> <view class='pictrue' @click="jumpCon(item)">
<image :src='(item.cart_info.productAttr && item.cart_info.productAttr.image) || item.cart_info.product.image' ></image> <image
:src='(item.cart_info.productAttr && item.cart_info.productAttr.image) || item.cart_info.product.image'>
</image>
</view> </view>
<view class='text'> <view class='text'>
<view class='acea-row row-between-wrapper'> <view class='acea-row row-between-wrapper'>
<view class='name line1'><text v-if="item.product_type != 0 && item.product_type != 10" :class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>{{item.cart_info.product.store_name}}</view> <view class='name line1'><text v-if="item.product_type != 0 && item.product_type != 10"
:class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>{{item.cart_info.product.store_name}}
</view>
<view class='num'>x {{item.product_num}}</view> <view class='num'>x {{item.product_num}}</view>
</view> </view>
<view class='attr line1' v-if="item.cart_info.productAttr.sku">{{item.cart_info.productAttr.sku}}</view> <view class='attr line1' v-if="item.cart_info.productAttr.sku">
<view class='money p-color' v-if="item.cart_info.product_type ==3">{{item.cart_info.productAssistAttr.assist_price}}</view> {{item.cart_info.productAttr.sku}}
<view class='money p-color' v-else-if="item.cart_info.product_type ==4">{{item.cart_info.activeSku.active_price}}</view> </view>
<view class='money p-color' v-if="item.cart_info.product_type ==3">
{{item.cart_info.productAssistAttr.assist_price}}</view>
<view class='money p-color' v-else-if="item.cart_info.product_type ==4">
{{item.cart_info.activeSku.active_price}}</view>
<view class='money acea-row row-middle' v-else> <view class='money acea-row row-middle' v-else>
<text>{{item.cart_info.productAttr.price}}</text> <text>{{item.cart_info.productAttr.price}}</text>
<image v-if="item.cart_info.productAttr.show_svip_price" class="svip-img" :src="`${domain}/static/images/svip.png`"></image> <image v-if="item.cart_info.productAttr.show_svip_price" class="svip-img"
:src="`${domain}/static/images/svip.png`"></image>
</view> </view>
</view> </view>
</view> </view>
<view class="right-btn-box"> <view class="right-btn-box">
<view class="btn-item err" v-if="item.is_refund ==1">退款中 x {{item.product_num - item.refund_num}}</view> <view class="btn-item err" v-if="item.is_refund ==1">退款中 x
<view class='btn-item err' v-if="item.is_refund >1">已退款 x {{item.product_num - item.refund_num}}</view> {{item.product_num - item.refund_num}}
<view class="btn-item" v-if="item.refund_switch==1 && (item.is_refund == 0 && evaluate != 9 && orderData.refund_status || item.refund_num > 0)" @click.stop="refund(item)">申请退款</view> </view>
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.refund_num > 0' @click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view> <view class='btn-item err' v-if="item.is_refund >1">已退款 x {{item.product_num - item.refund_num}}
</view>
<view class="btn-item"
v-if="evaluate != 2 && item.refund_switch==1 && (item.is_refund == 0 && evaluate != 9 && orderData.refund_status || item.refund_num > 0)"
@click.stop="refund(item)">申请退款</view>
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.refund_num > 0'
@click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
<view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view> <view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
</view> </view>
</view> </view>
@ -93,11 +134,21 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { openOrderRefundSubscribe } from '@/utils/SubscribeMessage.js'; import {
import { goShopDetail } from '@/libs/order.js' openOrderRefundSubscribe
import { initiateAssistApi } from '@/api/activity.js'; } from '@/utils/SubscribeMessage.js';
import { mapGetters } from "vuex"; import {
import { HTTP_REQUEST_URL } from '@/config/app'; goShopDetail
} from '@/libs/order.js'
import {
initiateAssistApi
} from '@/api/activity.js';
import {
mapGetters
} from "vuex";
import {
HTTP_REQUEST_URL
} from '@/config/app';
export default { export default {
props: { props: {
evaluate: { evaluate: {
@ -133,17 +184,21 @@
data() { data() {
return { return {
domain: HTTP_REQUEST_URL, domain: HTTP_REQUEST_URL,
totalNmu:'', totalNmu: '',
isTimePay: false, // isTimePay: false, //
}; };
}, },
watch:{ watch: {
cartInfo:function(nVal,oVal){ cartInfo: function(nVal, oVal) {
console.log(nVal);
console.log(oVal);
let num = 0 let num = 0
nVal.forEach((item,index)=>{ nVal.forEach((item, index) => {
num += item.cart_num num += item.cart_num
}) })
this.totalNmu = num this.totalNmu = num
console.log(nVal);
} }
}, },
onShow() { onShow() {
@ -151,25 +206,28 @@
}, },
mounted() {}, mounted() {},
methods: { methods: {
evaluateTap:function(unique,orderId){ evaluateTap: function(unique, orderId) {
uni.navigateTo({ uni.navigateTo({
url:`/pages/users/goods_comment_con/index?uni=${unique}&order_id=${orderId}` url: `/pages/users/goods_comment_con/index?uni=${unique}&order_id=${orderId}`
}) })
}, },
// //
isPayBalance(){ isPayBalance() {
let that = this; let that = this;
if(that.orderData.status === 10){ if (that.orderData.status === 10) {
if(new Date() < new Date(that.orderData.presellOrder.final_start_time)){ if (new Date() < new Date(that.orderData.presellOrder.final_start_time)) {
that.isTimePay = false; // that.isTimePay = false; //
}else if((new Date() >= new Date(that.orderData.presellOrder.final_start_time)) && (new Date() <= new Date(that.orderData.presellOrder.final_start_time)) ){ } else if ((new Date() >= new Date(that.orderData.presellOrder.final_start_time)) && (new Date() <=
new Date(that.orderData.presellOrder.final_start_time))) {
that.isTimePay = true; // that.isTimePay = true; //
} }
} }
}, },
jumpCon:function(item){ jumpCon: function(item) {
if(item.product_type == 4)item.activity_id = item.cart_info && item.cart_info.activeSku.product_group_id if (item.product_type == 4) item.activity_id = item.cart_info && item.cart_info.activeSku
if(item.product_type == 3)item.activity_id = item.cart_info && item.cart_info.productAssistAttr.product_assist_id .product_group_id
if (item.product_type == 3) item.activity_id = item.cart_info && item.cart_info.productAssistAttr
.product_assist_id
goShopDetail(item).then(res => { goShopDetail(item).then(res => {
initiateAssistApi(item.activity_id).then(res => { initiateAssistApi(item.activity_id).then(res => {
let id = res.data.product_assist_set_id; let id = res.data.product_assist_set_id;
@ -186,17 +244,21 @@
}) })
}, },
// 退 // 退
refund(item){ refund(item) {
// #ifdef MP // #ifdef MP
openOrderRefundSubscribe().then(() => { openOrderRefundSubscribe().then(() => {
uni.hideLoading(); uni.hideLoading();
if(this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual != 0){ if (this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual != 0) {
uni.navigateTo({ uni.navigateTo({
url:'/pages/users/refund/confirm?order_id='+this.orderId+'&type=1'+'&ids='+item.order_product_id+'&refund_type=1&order_type='+this.orderData.order_type url: '/pages/users/refund/confirm?order_id=' + this.orderId + '&type=1' +
'&ids=' + item.order_product_id + '&refund_type=1&order_type=' + this
.orderData.order_type
}) })
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url:'/pages/users/refund/select?order_id='+this.orderId+'&type=1&order_type='+this.orderData.order_type+'&ids='+item.order_product_id url: '/pages/users/refund/select?order_id=' + this.orderId +
'&type=1&order_type=' + this.orderData.order_type + '&ids=' + item
.order_product_id
}) })
} }
}).catch(() => { }).catch(() => {
@ -204,13 +266,15 @@
}) })
// #endif // #endif
// #ifdef H5 || APP-PLUS // #ifdef H5 || APP-PLUS
if(this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual != 0){ if (this.evaluate == 0 || this.evaluate == 9 || this.orderData.is_virtual != 0) {
uni.navigateTo({ uni.navigateTo({
url:'/pages/users/refund/confirm?order_id='+this.orderId+'&type=1'+'&ids='+item.order_product_id+'&refund_type=1&order_type='+this.orderData.order_type url: '/pages/users/refund/confirm?order_id=' + this.orderId + '&type=1' + '&ids=' + item
.order_product_id + '&refund_type=1&order_type=' + this.orderData.order_type
}) })
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url:'/pages/users/refund/select?order_id='+this.orderId+'&type=1&order_type='+this.orderData.order_type+'&ids='+item.order_product_id url: '/pages/users/refund/select?order_id=' + this.orderId + '&type=1&order_type=' + this
.orderData.order_type + '&ids=' + item.order_product_id
}) })
} }
// #endif // #endif
@ -223,22 +287,27 @@
.orderGoods { .orderGoods {
background-color: #fff; background-color: #fff;
} }
.p-color { .p-color {
color: var(--view-priceColor); color: var(--view-priceColor);
} }
.t-color{
.t-color {
color: var(--view-theme); color: var(--view-theme);
} }
.svip-img{
.svip-img {
width: 65rpx; width: 65rpx;
height: 28rpx; height: 28rpx;
margin: 4rpx 0 0 4rpx; margin: 4rpx 0 0 4rpx;
} }
.title{
.title {
height: 86rpx; height: 86rpx;
position: relative; position: relative;
padding: 0 30rpx; padding: 0 30rpx;
&::after{
&::after {
content: ""; content: "";
width: 750rpx; width: 750rpx;
border-bottom: 2rpx dotted #D8D8D8; border-bottom: 2rpx dotted #D8D8D8;
@ -246,60 +315,73 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
} }
.item-status{
.item-status {
color: #999999; color: #999999;
font-size: 30rpx; font-size: 30rpx;
&.status0{
&.status0 {
color: #2291F8; color: #2291F8;
} }
} }
.item-date{
.item-date {
color: #666666; color: #666666;
font-size: 28rpx; font-size: 28rpx;
} }
} }
.right-btn-box{
.right-btn-box {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
&.event_box{
&.event_box {
position: static; position: static;
} }
.btn-item{
.btn-item {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width:140rpx; width: 140rpx;
height:46rpx; height: 46rpx;
margin-left: 10rpx; margin-left: 10rpx;
border:1px solid rgba(187,187,187,1); border: 1px solid rgba(187, 187, 187, 1);
border-radius:23rpx; border-radius: 23rpx;
font-size: 24rpx; font-size: 24rpx;
color: #282828; color: #282828;
&.on{
background:rgba(220,220,220,1); &.on {
border-color: rgba(220,220,220,1); background: rgba(220, 220, 220, 1);
border-color: rgba(220, 220, 220, 1);
} }
&.err{
background:rgba(247,247,247,1); &.err {
border-color: rgba(247,247,247,1); background: rgba(247, 247, 247, 1);
border-color: rgba(247, 247, 247, 1);
color: #AAAAAA; color: #AAAAAA;
} }
} }
} }
.event_bg{
.event_bg {
background: #FF7F00; background: #FF7F00;
} }
.event_color{
.event_color {
color: #FF7F00; color: #FF7F00;
} }
.presell_item{
.presell_item {
height: auto; height: auto;
padding-bottom: 15rpx; padding-bottom: 15rpx;
} }
.event_progress{
.event_progress {
margin-top: 20rpx; margin-top: 20rpx;
background: #fff; background: #fff;
.progress_name { .progress_name {
padding-left: 30rpx; padding-left: 30rpx;
height: 60rpx; height: 60rpx;
@ -308,7 +390,8 @@
font-weight: bold; font-weight: bold;
position: relative; position: relative;
color: var(--view-theme); color: var(--view-theme);
&::before{
&::before {
content: ""; content: "";
display: inline-block; display: inline-block;
width: 5rpx; width: 5rpx;
@ -319,23 +402,27 @@
left: 0; left: 0;
} }
} }
.align_right{
.align_right {
float: right; float: right;
font-weight: bold; font-weight: bold;
} }
.progress_price{
.progress_price {
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
color: #999999; color: #999999;
font-size: 22rpx; font-size: 22rpx;
} }
.progress_pay{
.progress_pay {
padding: 25rpx 30rpx; padding: 25rpx 30rpx;
background: var(--view-minorColor); background: var(--view-minorColor);
font-size: 26rpx; font-size: 26rpx;
color: #282828; color: #282828;
} }
} }
.event_name{
.event_name {
display: inline-block; display: inline-block;
margin-right: 9rpx; margin-right: 9rpx;
color: #fff; color: #fff;
@ -345,12 +432,14 @@
text-align: center; text-align: center;
border-radius: 6rpx; border-radius: 6rpx;
} }
.event_ship{
.event_ship {
font-size: 20rpx; font-size: 20rpx;
margin-top: 10rpx; margin-top: 10rpx;
} }
.goodWrapper.item1{
&::after{ .goodWrapper.item1 {
&::after {
content: ""; content: "";
display: block; display: block;
width: 750rpx; width: 750rpx;

View File

@ -1,5 +1,6 @@
<template> <template>
<uni-popup ref="popup" type="bottom" mask-background-color="rgba(0,0,0,0)" safeArea backgroundColor="#fff" :animation="true" @maskClick="maskClick"> <uni-popup ref="popup" type="bottom" mask-background-color="rgba(0,0,0,0)" safeArea backgroundColor="#fff"
:animation="true" @maskClick="maskClick">
<view class="keyboard"> <view class="keyboard">
<view class="keyboard-left"> <view class="keyboard-left">
<block v-for="(item,indx) in keys" :key="indx"> <block v-for="(item,indx) in keys" :key="indx">
@ -30,6 +31,7 @@
}, },
methods: { methods: {
// //
handleClick(item) { handleClick(item) {
if (this.value.length >= 10) return; if (this.value.length >= 10) return;
@ -68,9 +70,11 @@
// //
handlePay() { handlePay() {
if (this.value && this.value.lastIndexOf('.') + 1 == this.value.length) { // .
this.value = this.value.substring(0, this.value.length - 1); if (this.value && this.value.endsWith('.')) {
this.value = this.value.replace('.', '');
} }
this.$emit('confirm', this.value); this.$emit('confirm', this.value);
this.handleClose(); this.handleClose();
}, },
@ -84,9 +88,12 @@
handleClose() { handleClose() {
this.$refs.popup.close(); this.$refs.popup.close();
}, },
maskClick() { maskClick() {
if (this.value && this.value.lastIndexOf('.') + 1 == this.value.length) { // .
this.value = this.value.substring(0, this.value.length - 1); if (this.value && this.value.endsWith('.')) {
this.value = this.value.replace('.', '');
} }
this.$emit('change', this.value); this.$emit('change', this.value);
} }

View File

@ -18,8 +18,7 @@
<view class="v-con-input" @click="handleOpenKeyboard"> <view class="v-con-input" @click="handleOpenKeyboard">
<text style="color: #303133;font-size:32rpx;"></text> <text style="color: #303133;font-size:32rpx;"></text>
<u--input type="text" fontSize="23" height="112rpx" placeholder="请输入金额" border="none" readonly <u--input type="text" fontSize="23" height="112rpx" placeholder="请输入金额" border="none" readonly
v-model="cartForm.total_amount" placeholderStyle="color:#999;font-size:32rpx" v-model="cartForm.total_amount" placeholderStyle="color:#999;font-size:32rpx">
@input="validateDecimal">
</u--input> </u--input>
<view class="placeholder"></view> <view class="placeholder"></view>
</view> </view>
@ -50,19 +49,17 @@
</view> </view>
<!-- 登陆 --> <!-- 登陆 -->
<!-- <authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"> <authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun" />
</authorize> -->
</view> </view>
<!-- 无商户信息提示 --> <!-- 无商户信息提示 -->
<!-- <view class="empty"> <!-- <view class="empty">
<image src="/static/images/no_thing.png"></image>
<text style="margin-top: 60rpx;">{{tips}}</text>
<authorize v-show="!isWeixin" ref="authRef" :isAuto="isAuto" :isGoIndex="false" :isShowAuth="isShowAuth" <authorize v-show="!isWeixin" ref="authRef" :isAuto="isAuto" :isGoIndex="false" :isShowAuth="isShowAuth"
@authColse="authColse" @onLoadFun="onLoadFun"> @authColse="authColse" @onLoadFun="onLoadFun">
</authorize> </authorize>
</view> --> </view> -->
<!-- 键盘 -->
<popups ref="popups" @confirm="handleConfirm" @clear="handleClear" @change="handleChange"></popups> <popups ref="popups" @confirm="handleConfirm" @clear="handleClear" @change="handleChange"></popups>
</view> </view>
</template> </template>
@ -145,7 +142,7 @@
} }
} else { } else {
this.checkForm.cart_id = []; this.checkForm.cart_id = [];
this.getProductInfoByMerid(this.mer_id); this.getProductInfoByMerid();
} }
}, },
methods: { methods: {
@ -166,7 +163,7 @@
} }
}, },
// //
handleConfirm(e) { handleConfirm(e) {
if (!e) return; if (!e) return;
this.cartForm.total_amount = e; this.cartForm.total_amount = e;
@ -176,19 +173,13 @@
// //
handleClear() { handleClear() {
this.cartForm.total_amount = ''; this.cartForm.total_amount = '';
this.merchantInfo = [];
}, },
// //
handleChange(e) { handleChange(e) {
this.cartForm.total_amount = e; this.cartForm.total_amount = e;
}, uni.$u.throttle(that.getProductInfoByMerid, 20)
validateDecimal(event) {
let val = (that.cartForm.total_amount.match(/^\d*(\.?\d{0,2})/g)[0]) || ''
that.$nextTick(() => {
that.cartForm.total_amount = val;
uni.$u.throttle(that.getProductInfoByMerid, 30)
})
}, },
leftClick(e) { leftClick(e) {
@ -215,9 +206,6 @@
}) })
} }
if (this.cartForm.total_amount.endsWith('.')) this.cartForm.cartForm.total_amount = this.cartForm
.cartForm.total_amount.replace('.', '');
// //
for (var i = 0; i < that.merchantInfo.length; i++) { for (var i = 0; i < that.merchantInfo.length; i++) {
let info = { let info = {
@ -263,14 +251,12 @@
}); });
}, },
hide(e) { //
this.keyBoardShow = false;
},
handleOpen() { handleOpen() {
this.isOpen = !this.isOpen; this.isOpen = !this.isOpen;
}, },
//
getProductInfoByMerid(merid, money) { getProductInfoByMerid(merid, money) {
getProductInfo({ getProductInfo({
mer_id: that.mer_id, mer_id: that.mer_id,
@ -298,49 +284,6 @@
that.isEmpty = true; that.isEmpty = true;
// #endif // #endif
}) })
},
//
handleSavePic() {
// URL
let imageUrl = this.qrcodeUrl; // 使
// #ifdef H5
var a = document.createElement("a");
a.download = imageUrl;
a.href = imageUrl;
document.body.appendChild(a);
a.click();
a.remove();
// #endif
// #ifndef H5
let that = this;
uni.downloadFile({
url: imageUrl,
success(res) {
if (res.statusCode === 200) {
let tempFilePath = res.tempFilePath; //
uni.saveImageToPhotosAlbum({
filePath: tempFilePath,
success() {
return that.$util.Tips({
title: '图片已保存至相册!'
});
},
fail(err) {
console.error('保存失败', err);
}
});
} else {
console.error('下载失败', res.statusCode);
}
},
fail(err) {
console.error('下载失败', err);
}
});
// #endif
} }
} }
} }

View File

@ -294,7 +294,7 @@
let data = uni.getStorageSync("datas"); let data = uni.getStorageSync("datas");
this.productData = data.productData; this.productData = data.productData;
this.platformConsumption = data.platformConsumption; this.platformConsumption = data.platformConsumption || [];
this.checkForm.cart_id = data.checkForm.cart_id; this.checkForm.cart_id = data.checkForm.cart_id;
this.payForm.cart_id = this.checkForm.cart_id; this.payForm.cart_id = this.checkForm.cart_id;

View File

@ -427,31 +427,20 @@
value: 'wechat', value: 'wechat',
title: '微信快捷支付', title: '微信快捷支付',
payStatus: 1 payStatus: 1
}, }, {
{
name: "支付宝支付", name: "支付宝支付",
icon: "icon-zhifubao", icon: "icon-zhifubao",
value: 'alipay', value: 'alipay',
title: '支付宝支付', title: '支付宝支付',
payStatus: this.$store.getters.globalData.alipay_open payStatus: this.$store.getters.globalData.alipay_open
}, }, {
{
name: "余额支付", name: "余额支付",
icon: "icon-yuezhifu", icon: "icon-yuezhifu",
value: 'balance', value: 'balance',
title: '可用余额:', title: '可用余额:',
number: 0, number: 0,
payStatus: this.$store.getters.globalData.yue_pay_status payStatus: this.$store.getters.globalData.yue_pay_status
}, }],
{
name: "对公转账",
icon: "icon-yuezhifu",
value: 'public',
title: '对公转账',
number: 0,
payStatus: 1
}
],
pay_close: false, pay_close: false,
pay_order_id: '', pay_order_id: '',
invoice_order_id: '', invoice_order_id: '',