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

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

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