1.修改订单确认页面

master
杨杰 2 years ago
parent d4839f4c8a
commit 5eb259e56f
  1. 13
      high-unionPay/pages/order/confirmation.vue
  2. 353
      high-unionPay/pages/user/coupon/coupon.vue
  3. 3
      high-unionPay/uni.scss

@ -159,13 +159,13 @@
<view class="fotct font18 fontwig6 fcor333 mart10 height30">优惠券选择</view>
<view class="width92 height110 tccs mart10" v-for="(items, index) in UserNormalDiscountList" :key="items"
@click="radioChanges(items)">
<image mode="widthFix" class="flleft" :src="imageUrl+items.highDiscount.discountImg"></image>
<image mode="widthFix" class="flleft" :src="imageUrl+items.discountImg"></image>
<view class="tcrig">
<view class="yhprice">
<radio :checked="items.highDiscount.id == memDiscountId" color="#0083f5" />
<radio :checked="items.id == memDiscountId" color="#0083f5" />
</view>
<view class="font16 fontwig6 fcor333 text1">{{items.highDiscount.discountName}}</view>
<view class="font13 fcor999 mart5">有效期至{{items.highDiscount.salesEndTime | formatDate('-')}}</view>
<view class="font16 fontwig6 fcor333 text1">{{items.discountName}}</view>
<view class="font13 fcor999 mart5">有效期至{{items.salesEndTime | formatDate('-')}}</view>
</view>
</view>
@ -727,11 +727,10 @@
this.isDiscount = 1;
if (this.deductionPrice == 0) {
this.paytheprice = parseFloat(this.saveprice - parseFloat(this.priceValue[1] / 100).toFixed(2))
.toFixed(
2);
.toFixed(2);
} else {
this.paytheprice = parseFloat(this.orderPrice - parseFloat(this.priceValue[1] / 100).toFixed(2) - this
.deductionPrice).toFixed(2);
.deductionPrice).toFixed(2);
}
if (this.paytheprice == 0) {
this.isUse = false;

@ -7,9 +7,9 @@
<view :class="{on:typeClass=='noinvalid'}" @tap="switchType('noinvalid')">已过期</view>
</view>
<scroll-view scroll-x='true' class="srollview width100" scroll-with-animation>
<view class="conent" :class="[ordertypeid == index ? 'activeconent' : 'frontconent']"
v-for="(item,index) in orderTyplist" :key="index">{{item}}</view>
<scroll-view scroll-x='true' :style="{top:headerswiperTop}" class="srollview width100" scroll-with-animation>
<view class="conent" :class="[ordertypeid == item.codeValue ? 'activeconent' : 'frontconent']"
v-for="(item,index) in orderTyplist" :key="index" @tap="selectlist(item)">{{item.codeName}}</view>
</scroll-view>
<view class="place"></view>
<view class="list">
@ -23,31 +23,43 @@
<view class="carrier">
<view class="left">
<view class="alijusstart" style="margin-top: -7px;">
<view class="alijus font12 fotct fcorfff"
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 1"
style="width: 70px;height: 20px;background-color: #FFBDBA;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
满减券
</view>
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 2"
style="width: 70px;height: 20px;background-color: #3ecbb0;margin-right: 2px;">
<image src="../../../static/img/user/user15.png" mode="widthFix" class="icon12">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
抵扣券
</view>
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 3"
style="width: 70px;height: 20px;background-color: #7986AA;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
折扣券
</view>
</view>
<view class="title alijusstart">
<text class="height20 fotct fcorfff font11"
style="width: 50px;background-color: #347edd;border-radius: 20px;">话费券</text>
<view class="text1 width70">{{row.highDiscount.discountName}}</view>
style="width: 50px;background-color: #347edd;border-radius: 20px;">{{orderTyplist | msgFormat(row.discountUseScope)}}</text>
<view class="text1 width70">{{row.discountName}}</view>
</view>
<view class="term">
有效期:{{row.useEndTime | formatDate('-')}}
</view>
</view>
<view class="right">
<view class="ticket">
<view class="num" v-if="row.highDiscount.discountType == 3">
{{row.highDiscount.discountPrice * 10}}
<view class="ticket" style="background-color: #009DFF;padding-top: 1vw;">
<view class="num" v-if="row.discountType == 3">
{{row.discountPrice * 10}}
</view>
<view class="num" v-else>
{{row.highDiscount.discountPrice}}
{{row.discountPrice}}
</view>
<view class="unit" v-if="row.highDiscount.discountType == 3">
<view class="unit" v-if="row.discountType == 3">
</view>
<view class="unit" v-else>
@ -55,7 +67,7 @@
</view>
</view>
<!-- <view class="criteria">
{{row.highDiscount.discountName}}
{{row.discountName}}
</view> -->
<view class="use">
去使用
@ -73,28 +85,52 @@
<!-- content -->
<view class="carrier">
<view class="left">
<view class="title">
{{row.highDiscount.discountName}}
<view class="alijusstart" style="margin-top: -7px;">
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 1"
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
满减券
</view>
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 2"
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
抵扣券
</view>
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 3"
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
折扣券
</view>
</view>
<view class="title alijusstart">
<text class="height20 fotct fcorfff font11"
style="width: 50px;background-color: #999999;border-radius: 20px;">{{orderTyplist | msgFormat(row.discountUseScope)}}</text>
<view class="text1 width70">{{row.discountName}}</view>
</view>
<view class="term">
使用时间:{{row.useTime | formatDate('-')}}
有效期:{{row.useEndTime | formatDate('-')}}
</view>
<image src="../../../static/img/user/use.png" mode="widthFix"
style="position: absolute;right: 5px;top: 5px;" class="icon50"></image>
</view>
<view class="right invalid">
<view class="ticket">
<view class="num">
{{row.highDiscount.discountPrice}}
<view class="right">
<view class="ticket" style="background-color: #999999;padding-top: 7vw;">
<view class="num" v-if="row.discountType == 3">
{{row.discountPrice * 10}}
</view>
<view class="num" v-else>
{{row.discountPrice}}
</view>
<view class="unit" v-if="row.discountType == 3">
</view>
<view class="unit">
<view class="unit" v-else>
</view>
</view>
<view class="criteria">
{{row.highDiscount.discountName}}
</view>
<view class="use">
已使用
</view>
</view>
</view>
</view>
@ -108,28 +144,52 @@
<!-- content -->
<view class="carrier">
<view class="left">
<view class="title">
{{row.highDiscount.discountName}}
<view class="alijusstart" style="margin-top: -7px;">
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 1"
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
满减券
</view>
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 2"
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
抵扣券
</view>
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 3"
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
折扣券
</view>
</view>
<view class="title alijusstart">
<text class="height20 fotct fcorfff font11"
style="width: 50px;background-color: #999999;border-radius: 20px;">{{orderTyplist | msgFormat(row.discountUseScope)}}</text>
<view class="text1 width70">{{row.discountName}}</view>
</view>
<view class="term">
过期时间:{{row.useEndTime | formatDate('-')}}
有效期:{{row.useEndTime | formatDate('-')}}
</view>
<image src="../../../static/img/user/overdue.png" mode="widthFix"
style="position: absolute;right: 5px;top: 5px;" class="icon50"></image>
</view>
<view class="right invalid">
<view class="ticket">
<view class="num">
{{row.highDiscount.discountPrice}}
<view class="right">
<view class="ticket" style="background-color: #999999;padding-top: 7vw;">
<view class="num" v-if="row.discountType == 3">
{{row.discountPrice * 10}}
</view>
<view class="num" v-else>
{{row.discountPrice}}
</view>
<view class="unit">
<view class="unit" v-if="row.discountType == 3">
</view>
<view class="unit" v-else>
</view>
</view>
<view class="criteria">
{{row.highDiscount.discountName}}
</view>
<view class="use">
已过期
</view>
</view>
</view>
</view>
@ -142,7 +202,8 @@
<script>
import {
getUserDiscountList,
useDiscount
useDiscount,
getDictionaryByCodeType
} from '../../../Utils/Api.js';
let app = getApp();
export default {
@ -153,7 +214,8 @@
couponnoinvalidList: [],
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'noorder.png',
headerTop: 0,
headerTop: 0,
headerswiperTop: '45px',
//
typeClass: 'valid',
subState: '',
@ -165,8 +227,10 @@
isNoMoreData: false,
loadingText: '',
couponcout: 0,
orderTyplist: ['全部订单', '在线加油', '肯德基', '星巴克', '话费充值', '卡券订单'], //
ordertypeid: 1 //id
ordertypeid: 1, //id
usercouFeedbackHidden: 'none', //
orderTyplist: '', //
statusid: '' //
}
},
onPageScroll(e) {
@ -179,7 +243,7 @@
}, 1000);
},
onLoad() {
this.getUserDiscountList(1);
// this.getUserDiscountList(1);
//H5
// #ifdef H5
//onLoadhead
@ -190,7 +254,8 @@
clearInterval(Timer); //
}
}, 1);
// #endif
// #endif
this.getDictionaryByCodeType();
},
filters: {
//
@ -208,6 +273,15 @@
mm = mm >= 10 ? mm : "0" + mm;
s = s >= 10 ? s : "0" + s;
return `${year}${spe}${month}${spe}${day} ${h}:${mm}:${s}`;
},
//
msgFormat: function(value, value1) {
for (var i = 0; i < value.length; i++) {
if (value1 == value[i].codeValue) {
let a = value[i].codeName;
return a;
}
}
}
},
onReachBottom() {
@ -221,74 +295,100 @@
},
methods: {
//
getUserDiscountList(item) {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading()
this.loadingText = '到底了';
return false;
}
let pagenum = this.pageNum;
let params = {
pageNum: pagenum,
status: item,
pageSize: this.pageSize
getUserDiscountList(item) {
this.statusid = item;
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading()
this.loadingText = '到底了';
return false;
}
let pagenum = this.pageNum;
let params = {
pageNum: pagenum,
status: item,
pageSize: this.pageSize,
useScope: this.ordertypeid
}
getUserDiscountList(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
if (res.return_data.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
if (this.typeClass == 'valid') {
this.couponValidList = this.couponValidList.concat(res.return_data.list);
this.couponcout = res.return_data.total;
} else if (this.typeClass == 'invalid') {
this.couponinvalidList = this.couponinvalidList.concat(res.return_data.list);
} else {
this.couponnoinvalidList = this.couponnoinvalidList.concat(res.return_data.list);
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.couponValidList = [];
this.couponinvalidList = [];
this.couponnoinvalidList = [];
uni.hideLoading()
}
})
},
//
getDictionaryByCodeType() {
let datas = {
codeType: 'USING_RANGE'
}
getUserDiscountList(params).then(res => {
getDictionaryByCodeType(datas).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
if (res.return_data.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
if (this.typeClass == 'valid') {
this.couponValidList = this.couponValidList.concat(res.return_data.list);
this.couponcout = res.return_data.total;
} else if (this.typeClass == 'invalid') {
this.couponinvalidList = this.couponinvalidList.concat(res.return_data.list);
} else {
this.couponnoinvalidList = this.couponnoinvalidList.concat(res.return_data.list);
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.couponValidList = [];
this.couponinvalidList = [];
this.couponnoinvalidList = [];
uni.hideLoading()
this.orderTyplist = res.return_data;
this.ordertypeid = res.return_data[0].codeValue;
this.getUserDiscountList(1);
}
})
},
//
selectlist(item) {
this.ordertypeid = item.codeValue;
this.pageNum = 1;
this.couponValidList = [];
this.couponinvalidList = [];
this.couponnoinvalidList = [];
this.isNoMoreData = false;
this.getUserDiscountList(this.statusid);
},
//
jumpcoupons(e) {
if(e.highDiscount.useScope == 3){
uni.navigateTo({
url: '../../unionPay/recharge/recharge'
})
}else if (e.highDiscount.useScope == 4) {
if (e.useScope == 3) {
uni.navigateTo({
url: '../../unionPay/recharge/recharge'
})
} else if (e.useScope == 4) {
app.globalData.distinguishid = 1;
uni.navigateTo({
url: '/qianzhu-KFC/buffet-order/buffet-order'
})
} else if (e.highDiscount.useScope == 5) {
} else if (e.useScope == 5) {
app.globalData.distinguishid = 2;
uni.navigateTo({
url: '/qianzhu-KFC/buffet-order/buffet-order'
})
} else if (e.highDiscount.useScope == 6) {
} else if (e.useScope == 6) {
uni.navigateTo({
url: '/member-Recharge/choicepage/choicepage'
})
} else if (e.highDiscount.useScope == 7) {
} else if (e.useScope == 7) {
uni.navigateTo({
url: '../../goods/refuel/refuel'
})
}else if (e.highDiscount.usingRange == 5) {
} else if (e.usingRange == 5) {
this.useDiscount(e.discountAgentCodeId);
} else{
uni.navigateTo({
url: '../mineCouponsDestails/mineCouponsDestails?id=' + e.id
} else {
uni.navigateTo({
url: '../mineCouponsDestails/mineCouponsDestails?id=' + e.id
})
}
@ -303,8 +403,7 @@
uni.showModal({
title: '温馨提示',
content: '请前往微信“中油好客e站”小程序使用,须在有效期30天内使用。(中油好客E站APP也可使用)',
success: function(res) {
}
success: function(res) {}
})
} else {
uni.showToast({
@ -354,13 +453,23 @@
view {
display: flex;
flex-wrap: wrap;
}
.btnsclick {
width: 50px;
height: 20px;
justify-content: center;
align-items: center;
font-size: 12px;
border-radius: 20px;
padding: 0 5px;
position: fixed;
margin-top: 50px;
}
.srollview {
position: fixed;
z-index: 9999;
top: 45px;
height: 60px;
background-color: #ffffff;
display: flex;
@ -396,10 +505,56 @@
}
page {
position: relative;
background-color: #f5f5f5;
}
.popup_content {
position: fixed;
top: 40%;
left: 50%;
width: 520upx;
height: 400upx;
margin-left: -270upx;
margin-top: -270upx;
border: 10px solid white;
background-color: white;
z-index: 1002;
overflow: auto;
border-radius: 20upx;
}
.popup_title {
display: flex;
justify-content: center;
text-align: center;
width: 480upx;
}
//
.popup_overlay {
position: fixed;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index: 1001;
-moz-opacity: 0.8;
opacity: .80;
filter: alpha(opacity=88);
}
.btnno {
height: 40px;
line-height: 40PX;
display: flex;
justify-content: center;
color: #ffffff;
background: #999999;
}
.hidden {
display: none !important;
}
@ -641,8 +796,8 @@
}
.ticket {
background-image: radial-gradient(6px at top left, #f5f5f5 50px, #009DFF);
padding-top: 1vw;
// background-image: radial-gradient(6px at top left, #f5f5f5 50px, #009DFF);
// padding-top: 1vw;
justify-content: center;
align-items: baseline;

@ -826,4 +826,7 @@ $uni-font-size-paragraph:30upx;
.icon45 {
width: 45px;
}
.icon50 {
width: 50px;
}
Loading…
Cancel
Save