1.修改2.0 订单下单对接

yj-dev
杨杰 2 years ago
parent 67bcc52646
commit eededf481d
  1. 2
      App.vue
  2. 30
      Utils/Api.js
  3. 3
      Utils/Request.js
  4. 159
      member-Recharge/rec-confirmation/rec-confirmation.vue
  5. 337
      pages/goods/refuel-confirm/refuel-confirm.vue
  6. 34
      pages/goods/refuel-succes/refuel-succes.vue
  7. 321
      pages/order/confirmation.vue
  8. 32
      pages/user/deposit/deposit.vue
  9. 6
      pages/user/news/news.vue
  10. 133
      pages/user/order_details/order_details.vue
  11. 152
      pages/user/order_list/order_list.vue
  12. 129
      qianzhu-KFC/confirmOrder/confirmOrder.vue
  13. 37
      qianzhu-KFC/order-details/order-details.vue
  14. 17
      qianzhu-KFC/payment-method/payment-method.vue
  15. BIN
      static/img/user/kefu.png
  16. BIN
      static/img/user/notive.png
  17. BIN
      static/img/user/order.png
  18. 4
      subPages/unionComfirmation/unionComfirmation.vue

@ -15,7 +15,7 @@
//
url: 'https://hsgcs.dctpay.com/crest',
v1url: 'https://hsgcs.dctpay.com/v1',
orderurl:' https://hsgcs.dctpay.com/order',
orderurl:'https://hsgcs.dctpay.com/order',
brestUrl: 'https://hsgcs.dctpay.com/brest',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',

@ -149,10 +149,7 @@ export const cancelOrder = params => {
export const getOrderById = params => {
return POST('GET', `${base}/highOrder/getOrderById`, params).then(res => res.data);
}
//已完成未查看
export const orderCheck = params => {
return POST('GET', `${base}/highOrder/orderCheck`, params).then(res => res.data);
}
//获取商户列表
export const getMerchantList = params => {
@ -248,7 +245,12 @@ export const oilPriceDiscountCompute = params => {
//在线加油优惠券
export const canUseDiscount = params => {
return POST('POST', `${base}/userDiscount/canUseDiscount`, params).then(res => res.data);
}
}
//在线加油详情
export const getOrderByOrderNo = params => {
return POST('GET', `${base}/gasOrder/getOrderByOrderNo`, params).then(res => res.data);
}
//查询卡数据字典
export const getDictionaryByCodeType = params => {
return POST('GET', `${base}/common/getDictionaryByCodeType`, params).then(res => res.data);
@ -391,8 +393,8 @@ export const listByStoreCode = params => {
return POST('GET', `${base}/highThirdParty/listByStoreCode`, params).then(res => res.data);
}
//肯德基订单详情
export const getThirdOrderByOrderId = params => {
return POST('GET', `${base}/highThirdParty/getThirdOrderByOrderId`, params).then(res => res.data);
export const getThirdOrderByOrderNo = params => {
return POST('GET', `${base}/highThirdParty/getThirdOrderByOrderNo`, params).then(res => res.data);
}
//肯德基,星巴克取消订单
export const thirdCancelOrder = params => {
@ -648,3 +650,17 @@ export const getDetailByOrderNo = params => {
export const cancel = params => {
return POST('POST', `${orderbase}/cancel`, params).then(res => res.data);
}
//微信支付
export const wechatPay = params => {
return POST('POST', `${orderbase}/orderPay/wechatPay`, params).then(res => res.data);
}
//工会卡、油卡
export const cardPay = params => {
return POST('POST', `${orderbase}/orderPay/cardPay`, params).then(res => res.data);
}
//已完成未查看
export const orderCheck = params => {
return POST('GET', `${orderbase}/highOrder/orderCheck`, params).then(res => res.data);
}

@ -71,7 +71,8 @@ function request(method, url, data) {
// #endif
}
},
fail(err) {
fail(err) {
console.log('======='+JSON.stringify(err))
uni.showToast({
title: '网络异常',
icon: 'none',

@ -72,26 +72,26 @@
<view class="width20 flright fotrt paddtright10 font15 fcor666 alijun" style="align-items: center;">
¥{{priceValue[1] / 100}}
</view>
</view>
<view class="width94 line1 marb5"></view>
<view class="height50 width100 backcorfff">
<view class="width40 flleft fcor333 fontwig6 font15 text1 alijusstart" style="padding-left: 4%;">
<image src="../../static/img/rebate.png" mode="widthFix" style="width: 25px;"></image>
<text>下单返积分</text>
</view>
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 1"
style="align-items: center;">
{{rebateIntegral}}积分
</view>
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 2"
style="align-items: center;">
{{rebateIntegral}}
</view>
</view>
<view class=" width100 backcorfff alijusstart paddbotm10" style="padding-left: 4%;">
<image src="../../static/img/sigh.png" mode="widthFix" class="icon20"></image>
<text class="fcor999 font13">积分抵扣与优惠券抵扣不同享</text>
</view>
</view>
<view class="width94 line1 marb5"></view>
<view class="height50 width100 backcorfff">
<view class="width40 flleft fcor333 fontwig6 font15 text1 alijusstart" style="padding-left: 4%;">
<image src="../../static/img/rebate.png" mode="widthFix" style="width: 25px;"></image>
<text>下单返积分</text>
</view>
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 1"
style="align-items: center;">
{{rebateIntegral}}积分
</view>
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 2"
style="align-items: center;">
{{rebateIntegral}}
</view>
</view>
<view class=" width100 backcorfff alijusstart paddbotm10" style="padding-left: 4%;">
<image src="../../static/img/sigh.png" mode="widthFix" class="icon20"></image>
<text class="fcor999 font13">积分抵扣与优惠券抵扣不同享</text>
</view>
<view class="width94 line1 marb5"></view>
<view class="height50 width100">
<view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
@ -127,7 +127,7 @@
<view class="width70 fcorfff">
合计: ¥<text class="font16 fontwig6" style="margin: 0px 6px;">{{payPrice}}</text>
</view>
<view class="width30 fotrt" @click="qzaddorder()">
<view class="width30 fotrt" @click="create()">
<view class="btnpay fotct font13 fcorfff" style="background-color: #c72a20;">去支付
</view>
</view>
@ -167,14 +167,14 @@
import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue';
import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
import {
xbkaddOrder,
create,
getThirdPartyByDetail,
getHuiLianTongCardBalance,
findUser,
qianzhuorderToPayByWx,
czhltUnionCardPay,
wechatPay,
cardPay,
getUserOrderPreList,
thirdCancelOrder,
thirdCancelOrder,
getRebateIntegral
} from '../../Utils/Api.js';
// #ifdef H5
@ -215,9 +215,9 @@
OrderPreList: [], //
imageUrl: app.globalData.imgUrl, //
orderPrice: 0, //
rechargeDes: '', //
rebateIntegral: '' ,//
Integrastu:1 //
rechargeDes: '', //
rebateIntegral: '', //
Integrastu: 1 //
}
},
onLoad(options) {
@ -271,7 +271,7 @@
this.user = res.return_data;
this.getHuiLianTongCardBalance();
this.getThirdPartyByDetail();
this.getUserOrderPreList();
this.getUserOrderPreList();
this.getRebateIntegral();
uni.setStorage({
key: "user",
@ -279,24 +279,24 @@
})
}
});
},
//
getRebateIntegral() {
let datas = {
"companyId": app.globalData.companyId,
"price": this.payPrice,
"productId": 3,
"type": 4,
}
getRebateIntegral(datas).then(res => {
if (res.return_code == '000000') {
this.rebateIntegral = res.return_data;
this.Integrastu = 1;
}else{
this.rebateIntegral = res.return_msg;
this.Integrastu = 2;
}
})
},
//
getRebateIntegral() {
let datas = {
"companyId": app.globalData.companyId,
"price": this.payPrice,
"productId": 3,
"type": 4,
}
getRebateIntegral(datas).then(res => {
if (res.return_code == '000000') {
this.rebateIntegral = res.return_data;
this.Integrastu = 1;
} else {
this.rebateIntegral = res.return_msg;
this.Integrastu = 2;
}
})
},
//
getHuiLianTongCardBalance() {
@ -340,7 +340,7 @@
this.paytype = '';
} else {
this.isUse = true;
}
}
this.getRebateIntegral();
},
//
@ -362,7 +362,7 @@
}
},
//
qzaddorder() {
create() {
if (this.customerMobile == '') {
uni.showToast({
title: '请输入充值手机号',
@ -394,26 +394,30 @@
title: '提交订单中...'
})
let datas = {
"customerMobile": this.customerMobile,
"regionId": app.globalData.cityId,
"productType": 3,
"platformId": this.showType,
"password": this.PaymentPassword,
"integralNum": this.priceValue[1],
"childOrderList": [{
"goodsId": this.goodId,
"customerMobile": this.customerMobile,
"platformId": this.showType,
"productType": this.productType,
"goodsType": 10,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
// "promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
"goodsId": this.goodId
}
xbkaddOrder(datas).then(res => {
create(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.orderId = res.return_data.id;
this.orderId = res.return_data.orderNo;
let params = {
"orderId": res.return_data.id,
"orderNo": res.return_data.orderNo,
"openId": app.globalData.openId,
"openIdType": this.showType
}
this.qianzhuorderToPayByWx(params);
this.wechatPay(params);
} else {
uni.showToast({
title: res.return_msg,
@ -503,9 +507,9 @@
.toFixed(2));
} else {
this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(
2)) - this
2)) - this
.deductionPrice).toFixed(2));
}
}
this.getRebateIntegral();
},
rechangeload() {
@ -518,10 +522,10 @@
this.$nextTick(() => (this.isDiscount = true))
},
//
qianzhuorderToPayByWx(item) {
wechatPay(item) {
let that = this;
if (that.paytype == '2') {
qianzhuorderToPayByWx(item).then(res => {
wechatPay(item).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
uni.showLoading({
@ -633,20 +637,25 @@
}
if (this.payPrice == 0) {
let datas = {
"customerMobile": this.customerMobile,
"regionId": app.globalData.cityId,
"productType": 3,
"platformId": this.showType,
"password": this.PaymentPassword,
"integralNum": this.priceValue[1],
"childOrderList": [{
"goodsId": this.goodId,
"customerMobile": this.customerMobile,
"platformId": this.showType,
"productType": 3,
"goodsType": 10,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
// "promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
"goodsId": this.goodId
"payPwd": this.PaymentPassword
}
xbkaddOrder(datas).then(res => {
create(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.orderId = res.return_data.id;
this.orderId = res.return_data.orderNo;
uni.reLaunch({
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderId
})
@ -668,11 +677,11 @@
return;
}
let params = {
"orderId": this.orderId,
"orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}
czhltUnionCardPay(params).then(res => {
cardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({

@ -134,47 +134,47 @@
v-if="Integrastu == 2">
{{rebateIntegral}}
</view>
</view>
<view class=" width100 backcorfff alijusstart paddbotm10" style="padding-left: 2%;">
<image src="../../../static/img/sigh.png" mode="widthFix" class="icon20"></image>
<text class="fcor999 font13">积分抵扣与优惠券抵扣不同享</text>
</view>
<view class=" width100 backcorfff alijusstart paddbotm10" style="padding-left: 2%;">
<image src="../../../static/img/sigh.png" mode="widthFix" class="icon20"></image>
<text class="fcor999 font13">积分抵扣与优惠券抵扣不同享</text>
</view>
</view>
<!-- // -->
<view class="mart10 heightl60 paddleft10 fcor333 fontwig6 font18 width100 backcorfff">支付方式:</view>
<view class="line1"></view>
<view class="width100 backcorfff">
<view class="width100 backcorfff" v-for="(item,index) in paytypeList" :key="index">
<view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='weixin'">
<view class="line1" v-if="item == 2"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" v-if="item == 2" @tap="paytype='2'">
<view class="width60 flleft font14">
微信支付
</view>
<view class="flright width30 fotct" v-if="isUse">
<radio :checked="paytype=='weixin'" color="#0083f5" />
<radio :checked="paytype=='2'" color="#0083f5" />
</view>
</view>
<view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='oilcard'">
<view class="line1" v-if="item == 6"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" v-if="item == 6" @tap="paytype='6'">
<view class="width60 flleft font14">
油卡支付<text class="font14 fcor666 margle">余额: {{oilPirce}}</text>
</view>
<view class="flright width30 fotct" v-if="isUse">
<radio :checked="paytype=='oilcard'" @click="changeRiado()" color="#0083f5" />
<radio :checked="paytype=='6'" @click="changeRiado()" color="#0083f5" />
</view>
</view>
<!-- <view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='gonghuika'">
<view class="line1" v-if="item == 3"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" v-if="item == 3" @tap="paytype='3'">
<view class="width60 flleft fontwig6">
汇联通工会卡<text class="font14 fcor666 margle">余额: {{tongCardPrice}}</text>
</view>
<view class="flright width30 fotct">
<radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" />
<view class="flright width30 fotct" v-if="isUse">
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" />
</view>
</view> -->
</view>
</view>
<view class="width100 mart15 fcor333 font16 fontwig6 paddleft10">重要说明</view>
@ -188,7 +188,7 @@
<view class="width50 flleft fcoreb5 padleft15 font15">
合计: <text class="font24">{{payPrice}}</text>
</view>
<button class="reBtn flright" @click="addOrder">去支付</button>
<button class="reBtn flright" @click="create">去支付</button>
</view>
@ -228,7 +228,7 @@
<script>
import {
orderToPay,
wechatPay,
getHuiLianTongCardBalance,
hltUnionCardPay,
orderToGoldPay,
@ -236,10 +236,11 @@
oilCardPay,
getUserOrderPreList,
canUseDiscount,
addOrder,
cancelOrder,
create,
cancel,
oilPriceDiscountCompute,
getRebateIntegral
getRebateIntegral,
getThirdPartyByDetail
} from '../../../Utils/Api.js';
import ssPaymentPassword from '../../../components/sanshui-payment-password/index.vue';
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
@ -257,7 +258,6 @@
data() {
return {
orderNo: '',
payprice: '',
orderList: '',
tongCardPrice: 0,
imageUrl: app.globalData.imgUrl,
@ -277,8 +277,10 @@
priceValue: [0, 0], //
availIntegal: 0, //
gasOrderList: '', //
rechargeDes: '', //
rebateIntegral: '', //
Integrastu: 1 //
Integrastu: 1, //
paytypeList: [], //
}
},
onLoad(e) {
@ -294,6 +296,38 @@
this.calculatepayPrice();
},
methods: {
//
getThirdPartyByDetail() {
// #ifdef H5
this.showType = 2;
// #endif
// #ifdef MP
this.showType = 1;
// #endif
let datas = {
platformId: this.showType,
regionId: app.globalData.cityId,
productType: 5
}
getThirdPartyByDetail(datas).then(res => {
if (res.return_code == '000000') {
this.rechargeDes = res.return_data;
this.paytypeList = res.return_data.productPayType.split(',');
this.paytypeList = this.paytypeList.slice(0, this.paytypeList.length - 1);
let zkprice = parseFloat(res.return_data.integralDiscount / 100).toFixed(2);
let pprice = parseFloat(this.payPrice * 100).toFixed(0)
let payprice = parseFloat(this.payPrice * 100 * zkprice).toFixed(
0);
if (payprice > this.user.gold) {
this.availIntegal = this.user.gold;
} else {
this.availIntegal = payprice;
}
}
});
},
//
findUser() {
let params;
findUser(params).then(res => {
@ -314,6 +348,9 @@
},
//
getRebateIntegral() {
if (!this.payPrice) {
return;
}
let datas = {
"companyId": app.globalData.companyId,
"price": this.payPrice,
@ -356,15 +393,16 @@
if (res.return_code == '000000') {
this.orderList = res.return_data;
this.payPrice = res.return_data.payPrice;
let payprice = parseFloat(this.payPrice * 100).toFixed(
0);
if (payprice > this.user.gold) {
this.availIntegal = this.user.gold;
} else {
this.availIntegal = payprice;
}
// let payprice = parseFloat(this.payPrice * 100).toFixed(
// 0);
// if (payprice > this.user.gold) {
// this.availIntegal = this.user.gold;
// } else {
// this.availIntegal = payprice;
// }
this.getRebateIntegral();
this.getRebateIntegral();
this.getThirdPartyByDetail();
}
})
},
@ -442,8 +480,8 @@
this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(
2)) - this
.deductionPrice).toFixed(2));
}
this.getRebateIntegral();
}
this.getRebateIntegral();
},
rechangeload() {
this.isUse = false;
@ -476,7 +514,7 @@
this.paytype = '';
} else {
this.isUse = true;
}
}
this.getRebateIntegral();
},
@ -496,25 +534,21 @@
})
if (this.payPrice == 0 && !this.orderNo) {
let goods = {
"identificationCode": this.gasOrderList.identificationCode,
"isTyAgent": this.gasOrderList.isTyAgent,
"gasStaffCode": app.globalData.staffCode,
"payGold": this.priceValue[1],
"memDiscountId": this.memDiscountId,
"payPwd": this.PaymentPassword,
"highChildOrderList": [{
"goodsType": this.gasOrderList.highChildOrderList[0].goodsType,
"goodsId": this.gasOrderList.highChildOrderList[0].goodsId,
"saleCount": 1,
"goodsPrice": this.gasOrderList.highChildOrderList[0].goodsPrice,
"childOrderList": [{
"gasGunNo": this.gasOrderList.highChildOrderList[0].gasGunNo,
"gasOilNo": this.gasOrderList.highChildOrderList[0].gasOilNo,
"gasOilType": this.gasOrderList.highChildOrderList[0].gasOilType,
"gasPriceGun": this.gasOrderList.highChildOrderList[0].gasPriceGun,
"gasPriceVip": this.gasOrderList.highChildOrderList[0].gasPriceVip,
}]
"isTyAgent": this.gasOrderList.isTyAgent,
"goodsId": this.gasOrderList.highChildOrderList[0].goodsId,
"goodsPrice": this.gasOrderList.highChildOrderList[0].goodsPrice,
"goodsType": 3,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"promoteCode": this.gasOrderList.identificationCode,
"payPwd": this.PaymentPassword
}
addOrder(goods).then(res => {
create(goods).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
if (app.globalData.gasKey) {
@ -528,7 +562,7 @@
})
}
this.orderNo = res.return_data.id;
this.orderNo = res.return_data.orderNo;
uni.reLaunch({
url: '/pages/goods/refuel-succes/refuel-succes?id=' +
this.orderNo
@ -550,37 +584,38 @@
})
return;
}
if (this.paytype == 'jifen') {
let params = {
"orderId": this.orderNo,
"password": this.PaymentPassword
}
orderToGoldPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '/pages/goods/refuel-succes/refuel-succes?id=' + this.orderNo
});
return;
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
})
return;
}
if (this.paytype == 'gonghuika') {
// if (this.paytype == 'jifen') {
// let params = {
// "orderId": this.orderNo,
// "password": this.PaymentPassword
// }
// orderToGoldPay(params).then(res => {
// uni.hideLoading();
// if (res.return_code == '000000') {
// uni.showToast({
// title: ''
// })
// uni.reLaunch({
// url: '/pages/goods/refuel-succes/refuel-succes?id=' + this.orderNo
// });
// return;
// }
// if (res.return_code == '102130') {
// uni.navigateTo({
// url: '../../login/updatePas/updatePas'
// })
// return;
// }
// uni.showToast({
// title: res.return_msg,
// icon: 'none'
// })
// })
// return;
// }
if (this.paytype == '3' || this.paytype == '6') {
let params = {
"orderId": this.orderNo,
"cardNo": this.user.hltCardNo.cardNo,
@ -598,14 +633,14 @@
return;
}
if (res.return_code == '102130') {
this.cancelOrder();
this.cancel();
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
if (res.return_code == '102132') {
this.cancelOrder();
this.cancel();
uni.showToast({
title: res.return_msg,
icon: 'none'
@ -620,54 +655,54 @@
})
return;
}
if (this.paytype == 'oilcard') {
let params = {
"orderId": this.orderNo,
"cardNo": this.user.oilCard.cardNo,
"password": this.PaymentPassword
}
oilCardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '/pages/goods/refuel-succes/refuel-succes?id=' + this.orderNo
});
return;
}
if (res.return_code == '102130') {
this.cancelOrder();
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
if (res.return_code == '102132') {
this.cancelOrder();
uni.showToast({
title: res.return_msg,
icon: 'none'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
uni.navigateBack({})
})
return;
}
// if (this.paytype == '4') {
// let params = {
// "orderId": this.orderNo,
// "cardNo": this.user.oilCard.cardNo,
// "password": this.PaymentPassword
// }
// oilCardPay(params).then(res => {
// uni.hideLoading();
// if (res.return_code == '000000') {
// uni.showToast({
// title: ''
// })
// uni.reLaunch({
// url: '/pages/goods/refuel-succes/refuel-succes?id=' + this.orderNo
// });
// return;
// }
// if (res.return_code == '102130') {
// this.cancel();
// uni.navigateTo({
// url: '../../login/updatePas/updatePas'
// })
// return;
// }
// if (res.return_code == '102132') {
// this.cancel();
// uni.showToast({
// title: res.return_msg,
// icon: 'none'
// })
// return;
// }
// uni.showToast({
// title: res.return_msg,
// icon: 'none'
// })
// uni.navigateBack({})
// })
// return;
// }
},
//
cancelOrder() {
cancel() {
let params = {
orderId: this.orderNo
orderNo: this.orderNo
}
cancelOrder(params).then(res => {
cancel(params).then(res => {
if (res.return_code == '000000') {
this.orderNo = '';
}
@ -721,7 +756,7 @@
});
},
//
addOrder() {
create() {
if (this.payPrice == 0) {
this.$refs.paymentPassword.modalFun('show');
return;
@ -736,31 +771,29 @@
return;
}
if (this.orderNo) {
this.orderToPay();
this.wechatPay();
return;
}
uni.showLoading({
title: '提交订单中...'
})
let goods = {
"identificationCode": this.gasOrderList.identificationCode,
"isTyAgent": this.gasOrderList.isTyAgent,
"gasStaffCode": app.globalData.staffCode,
"payGold": this.priceValue[1],
"memDiscountId": this.memDiscountId,
"highChildOrderList": [{
"goodsType": this.gasOrderList.highChildOrderList[0].goodsType,
"goodsId": this.gasOrderList.highChildOrderList[0].goodsId,
"saleCount": 1,
"goodsPrice": this.gasOrderList.highChildOrderList[0].goodsPrice,
"childOrderList": [{
"gasGunNo": this.gasOrderList.highChildOrderList[0].gasGunNo,
"gasOilNo": this.gasOrderList.highChildOrderList[0].gasOilNo,
"gasOilType": this.gasOrderList.highChildOrderList[0].gasOilType,
"gasPriceGun": this.gasOrderList.highChildOrderList[0].gasPriceGun,
"gasPriceVip": this.gasOrderList.highChildOrderList[0].gasPriceVip,
}]
"isTyAgent": this.gasOrderList.isTyAgent,
"goodsId": this.gasOrderList.highChildOrderList[0].goodsId,
"goodsPrice": this.gasOrderList.highChildOrderList[0].goodsPrice,
"goodsType": 3,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"promoteCode": this.gasOrderList.identificationCode,
"payPwd": this.PaymentPassword
}
addOrder(goods).then(res => {
create(goods).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
if (app.globalData.gasKey) {
@ -773,8 +806,8 @@
key: 'staffCode'
})
}
this.orderNo = res.return_data.id;
this.orderToPay();
this.orderNo = res.return_data.orderNo;
this.wechatPay();
} else {
uni.showToast({
title: res.return_msg,
@ -785,7 +818,7 @@
})
},
//
orderToPay() {
wechatPay() {
let that = this;
if (that.paytype == '') {
uni.showToast({
@ -795,23 +828,22 @@
})
return;
}
if (that.paytype == 'weixin') {
if (that.paytype == '2') {
// #ifdef H5
let params = {
"orderId": that.orderNo,
"orderNo": that.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER",
"openIdType": 2
}
// #endif
// #ifdef MP
let params = {
"orderId": that.orderNo,
"orderNo": that.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
"openIdType": 1
}
// #endif
orderToPay(params).then(res => {
wechatPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
uni.showLoading({
@ -848,6 +880,7 @@
// #endif
} else {
that.cancel();
uni.showToast({
title: res.return_msg,
icon: 'none'

@ -29,18 +29,18 @@
<text class="paddleft10">油站名称</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">{{orderInfo.highChildOrderList[0].goodsName}}</text>
<text class="paddtright10">{{orderInfo.storeName}}</text>
</view>
</view>
<view class="width90 mart1 height50 backcorfff mart1 fcor666 font14">
<!-- <view class="width90 mart1 height50 backcorfff mart1 fcor666 font14">
<view class="width30 flleft">
<text class="paddleft10">下单时间</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">{{orderInfo.createTime | formatDate('-')}}</text>
</view>
</view>
</view> -->
<view class="width90 mart1 height50 backcorfff mart1 fcor666 font14">
<view class="width30 flleft">
@ -56,18 +56,28 @@
<text class="paddleft10">加油金额</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">{{orderInfo.totalPrice}}</text>
<text class="paddtright10">{{orderInfo.gasRefuelPrice}}</text>
</view>
</view>
<view class="width90 mart1 height50 backcorfff mart1 fcor666 font14">
<view class="width30 flleft">
<text class="paddleft10">积分抵扣</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">{{orderInfo.payGold / 100}}</text>
</view>
</view>
<view class="width90 mart1 height50 backcorfff mart1 fcor666 font14" style="border-radius: 0 0 10px 10px;">
<view class="width30 flleft">
<text class="paddleft10">立即优惠</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">{{orderInfo.deductionPrice}}</text>
<text class="paddtright10">{{orderInfo.totalDeductionPrice}}</text>
</view>
</view>
</view>
<view class="btn mart50" @click="backHome()">返回首页</view>
<!-- #ifdef H5 -->
@ -82,7 +92,7 @@
<script>
import {
getOrderById
getOrderByOrderNo
} from '../../../Utils/Api.js';
let app = getApp();
export default {
@ -117,18 +127,18 @@
},
onLoad(options) {
this.orderNo = options.id;
this.getOrderById();
this.getOrderByOrderNo();
},
methods: {
getOrderById() {
getOrderByOrderNo() {
uni.showLoading({
title: '加载中...'
})
let params = {
orderId: this.orderNo
orderNo: this.orderNo
}
getOrderById(params).then(res => {
getOrderByOrderNo(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.orderInfo = res.return_data;

@ -8,29 +8,29 @@
<view class="font18 fontwig6 fcor333 text1">{{couponList.couponName}}</view>
<view class="font13 fcor666 mart10">规格: 默认</view>
<view class="price-number mart10" v-if="isDiscont">
<view class="price font16" v-if="couponList.payType == 1">{{couponList.salesPrice}}</view>
<view class="price font16" v-else>
<view class="price font16">{{couponList.salesPrice}}</view>
<!-- <view class="price font16" v-else>
<image style="width: 15px;height: 15px;" src="../../static/img/jfx.png">
</image>{{couponList.salesPrice * 100}}
</view>
</view> -->
<view class="flright fotrt paddleft10">x1</view>
</view>
<view class="price-number mart10" v-if="!isDiscont">
<view class="price font16" v-if="couponList.payType == 1">{{couponList.discountPrice}}</view>
<view class="price font16" v-else>
<view class="price font16">{{couponList.discountPrice}}</view>
<!-- <view class="price font16" v-else>
<image style="width: 15px;height: 15px;" src="../../static/img/jfx.png">
</image>{{couponList.discountPrice*100}}
</view>
</view> -->
<view class="number fcor666 font13 margle"
v-if="couponList.payType == 1 && couponList.salesPrice != couponList.discountPrice">
v-if="couponList.salesPrice != couponList.discountPrice">
{{couponList.salesPrice}}
</view>
<view class="number fcor666 font13 margle"
<!-- <view class="number fcor666 font13 margle"
v-if="couponList.payType != 1 && couponList.salesPrice != couponList.discountPrice">
<image style="width: 15px;height: 15px;" src="../../static/img/jfh.png">
</image>{{couponList.salesPrice*100}}
</view>
</view> -->
<view class="flright fotrt paddleft10">x1</view>
</view>
</view>
@ -40,24 +40,22 @@
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
商品总额
</view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor999"
v-if="couponList.payType == 1 && isDiscont">
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor999" v-if=" isDiscont">
{{couponList.salesPrice}}
</view>
<view class="width40 flright alijun paddtright10 font15 fontwig6 fcor666 aliitem"
<!-- <view class="width40 flright alijun paddtright10 font15 fontwig6 fcor666 aliitem"
v-if="couponList.payType != 1 && isDiscont">
<image style="width: 15px;height: 15px;" src="../../static/img/jfx.png">
</image>{{couponList.salesPrice*100}}
</view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor999"
v-if="couponList.payType == 1 && !isDiscont">
</view> -->
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor999" v-if="!isDiscont">
{{couponList.discountPrice}}
</view>
<view class="width40 flright alijun paddtright10 font15 fontwig6 fcor666 aliitem"
<!-- <view class="width40 flright alijun paddtright10 font15 fontwig6 fcor666 aliitem"
v-if="couponList.payType != 1 && !isDiscont">
<image style="width: 15px;height: 15px;" src="../../static/img/jfx.png">
</image>{{couponList.discountPrice*100}}
</view>
</view> -->
</view>
<view class="width94 line1 mart5 marb5"></view>
@ -153,14 +151,13 @@
</view>
<!-- <view class="width94 line1 mart5 marb5"></view> -->
<view class="width100" v-for="(item,index) in paytypeList" :key="index">
<view class="width94 line1 mart5 marb5"
v-if="item == 2"></view>
<view class="width94 line1 mart5 marb5" v-if="item == 2"></view>
<view class="height50 width100 backcorfff" @tap="paytype='2'" v-if="item == 2">
<view class="width50 flleft fcor333 font16" style="padding-left: 4%;">
微信支付
</view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;">
style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='2'" color="#0083f5" />
</view>
</view>
@ -170,7 +167,7 @@
汇联通工会卡<text class="font14 fcor666 margle">可用余额: {{tongCardPrice}}</text>
</view>
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;">
style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" />
</view>
</view>
@ -193,11 +190,11 @@
<view class="width100 height60"></view>
<view class="footer">
<view class="settlement">
<view class="sum">实付:<view class="money" v-if="couponList.payType == 1">{{paytheprice}}</view>
<view class="money aliitem" v-else>
<view class="sum">实付:<view class="money">{{paytheprice}}</view>
<!-- <view class="money aliitem" v-else>
<image style="width: 15px;height: 15px;vertical-align: sub;" src="../../static/img/jfx.png">
</image>{{paytheprice*100}}
</view>
</view> -->
</view>
<!-- #ifdef MP -->
<button class="btn" open-type="getPhoneNumber" v-if="user == null"
@ -233,18 +230,17 @@
<script>
import {
addOrder,
create,
getCouponById,
loginByPhone,
getUserNormalDiscountList,
orderToPay,
orderToGoldPay,
findUser,
hltUnionCardPay,
cardPay,
getRebateIntegral,
getHuiLianTongCardBalance,
getThirdPartyByDetail
getThirdPartyByDetail,
wechatPay
} from '../../Utils/Api.js';
import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
import cjSlider from '../../components/cj-slider/cj-slider.vue';
@ -272,7 +268,9 @@
UserNormalDiscountList: [],
imageUrl: app.globalData.imgUrl,
deductionPrice: '0.00',
paytheprice: '',
paytheprice: '', //
saveprice: '', //
orderPrice: '', //
radioStatus: true,
memDiscountId: '',
user: '',
@ -362,8 +360,8 @@
this.paytypeList = res.return_data.productPayType.split(',');
this.paytypeList = this.paytypeList.slice(0, this.paytypeList.length - 1);
let zkprice = parseFloat(res.return_data.integralDiscount / 100).toFixed(2);
let pprice = parseFloat(this.totalprice * 100).toFixed(0)
let payprice = parseFloat(this.totalprice * 100 * zkprice).toFixed(
let pprice = parseFloat(this.paytheprice * 100).toFixed(0)
let payprice = parseFloat(this.paytheprice * 100 * zkprice).toFixed(
0);
if (payprice > this.user.gold) {
this.availIntegal = this.user.gold;
@ -380,8 +378,6 @@
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data;
this.user = res.return_data;
this.availIntegal = res.return_data.gold;
this.findById();
if (this.user.hltCardNo) {
this.getHuiLianTongCardBalance();
}
@ -425,6 +421,8 @@
if (res.return_code == '000000') {
this.couponList = res.return_data;
this.paytheprice = res.return_data.discountPrice;
this.saveprice = res.return_data.discountPrice;
this.orderPrice = res.return_data.salesPrice
this.getThirdPartyByDetail();
}
})
@ -433,36 +431,126 @@
showPopup() {
this.$refs.popup.show();
},
// radioChanges(item) {
// if (this.memDiscountId == item.id) { //
// this.memDiscountId = '';
// this.coupondiscountid = '';
// this.paytheprice = this.couponList.discountPrice;
// this.deductionPrice = '0.00';
// this.isDiscont = false;
// } else { //
// this.isDiscont = true;
// this.memDiscountId = item.id;
// this.coupondiscountid = item.id;
// if (item.highDiscount.discountType == 1) {
// //
// this.deductionPrice = item.highDiscount.discountPrice;
// this.paytheprice = parseFloat(this.couponList.salesPrice - this.deductionPrice).toFixed(2);
// } else if (item.highDiscount.discountType == 2) {
// //
// this.deductionPrice = item.highDiscount.discountPrice;
// this.paytheprice = parseFloat(this.couponList.salesPrice - this.deductionPrice).toFixed(2);
// } else if (item.highDiscount.discountType == 3) {
// //
// this.deductionPrice = parseFloat(this.couponList.salesPrice - (this.couponList.salesPrice *
// item
// .highDiscount.discountPrice)).toFixed(2)
// this.paytheprice = parseFloat(this.couponList.salesPrice * item.highDiscount.discountPrice)
// .toFixed(2);
// }
// }
// this.$refs.popup.hide();
// },
//
radioChanges(item) {
this.paytheprice = this.orderPrice;
this.rechangeload();
if (this.memDiscountId == item.id) { //
this.memDiscountId = '';
this.coupondiscountid = '';
this.paytheprice = this.couponList.discountPrice;
this.deductionPrice = '0.00';
this.priceCaluc(this.saveprice);
this.isDiscont = false;
} else { //
this.isDiscont = true;
this.memDiscountId = item.id;
this.coupondiscountid = item.id;
if (item.highDiscount.discountType == 1) {
//
this.deductionPrice = item.highDiscount.discountPrice;
this.paytheprice = parseFloat(this.couponList.salesPrice - this.deductionPrice).toFixed(2);
} else if (item.highDiscount.discountType == 2) {
if (this.orderPrice > item.highDiscount.discountCondition) {
this.memDiscountId = item.id;
//
this.deductionPrice = item.highDiscount.discountPrice;
let oldprice = this.orderPrice - this.deductionPrice;
this.priceCaluc(oldprice);
} else {
uni.showToast({
title: '请满' + item.highDiscount.discountCondition + '使用此券',
icon: 'none',
duration: 2000
})
}
}
if (item.highDiscount.discountType == 2) {
//
this.deductionPrice = item.highDiscount.discountPrice;
this.paytheprice = parseFloat(this.couponList.salesPrice - this.deductionPrice).toFixed(2);
} else if (item.highDiscount.discountType == 3) {
let oldprice = this.orderPrice - this.deductionPrice;
this.priceCaluc(oldprice);
}
if (item.highDiscount.discountType == 3) {
//
this.deductionPrice = parseFloat(this.couponList.salesPrice - (this.couponList.salesPrice *
item
.highDiscount.discountPrice)).toFixed(2)
this.paytheprice = parseFloat(this.couponList.salesPrice * item.highDiscount.discountPrice)
this.deductionPrice = parseFloat(this.orderPrice - (this.orderPrice * item.highDiscount
.discountPrice))
.toFixed(2);
let oldprice = parseFloat(this.orderPrice * item.highDiscount.discountPrice).toFixed(2);
this.priceCaluc(oldprice);
}
}
this.$refs.popup.hide();
},
//
priceCaluc(item) {
let zkprice = parseFloat(this.rechargeDes.integralDiscount / 100).toFixed(2);
let pprice = parseFloat(item * 100).toFixed(0);
let payprice = parseFloat(item * 100 * zkprice).toFixed(0);
if (payprice > this.user.gold) {
this.availIntegal = this.user.gold;
this.priceValue[1] = 0;
// if (this.availIntegal < this.priceValue[1]) {
// this.priceValue[1] = this.user.gold;
// this.reload();
// }
} else {
this.availIntegal = payprice;
this.priceValue[1] = 0;
// this.reload();
}
this.reload();
this.calculatepayPrice();
},
//
calculatepayPrice() {
if (this.deductionPrice == 0) {
this.paytheprice = parseFloat(this.saveprice - (parseFloat(this.priceValue[1] / 100).toFixed(2)))
.toFixed(
2);
} else {
this.paytheprice = parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(2)) -
this
.deductionPrice).toFixed(2);
}
this.getRebateIntegral();
},
rechangeload() {
this.isUse = false;
this.$nextTick(() => (this.isUse = true))
},
//
reload() {
this.isDiscount = false;
this.$nextTick(() => (this.isDiscount = true))
},
//
getUserNormalDiscountList() {
let params = {
@ -532,16 +620,29 @@
});
},
toPay() {
if (this.paytype == '') {
uni.showToast({
title: '请选择支付方式',
icon: 'none',
duration: 2000
})
if (this.paytheprice == 0) {
if (!this.user.isSetPayPwd) {
uni.navigateTo({
url: '../login/updatePas/updatePas'
})
return;
}
this.$refs.paymentPassword.modalFun('show');
return;
}
if (this.paytype == '') {
uni.showToast({
title: '请选择支付方式',
icon: 'none',
duration: 2000
})
return;
}
if (this.orderDetails) {
this.orderToPay(this.orderDetails);
this.wechatPay(this.orderDetails);
return;
}
uni.showLoading({
@ -550,33 +651,23 @@
if (this.couponList.reserveStatus) {
this.storeId = app.globalData.storeid
}
if (this.paytype == 'jinbi' && this.user.gold < this.paytheprice * 100 && this.couponList.buyPoints) {
this.payGold = this.user.gold;
}
let goods = {
"memDiscountId": this.coupondiscountid,
"identificationCode": this.identificationCode,
"payGold": this.payGold,
"highChildOrderList": [{
"goodsType": 1,
"childOrderList": [{
"goodsId": this.couponId,
"goodsPrice": this.paytheprice,
"goodsType": 1,
"saleCount": 1,
"storeId": this.storeId
}]
}],
"payGold": this.priceValue[1],
"promoteCode": this.identificationCode
}
addOrder(goods).then(res => {
create(goods).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
// uni.redirectTo({
// url: '../pay/payment/payment?amount=' + res.return_data.payPrice +
// '&paytype=' + this.couponList.payType + '&orderId=' + res.return_data.id +
// '&couponId=' + this.couponId + '&typeaout=' + res.return_data
// .highChildOrderList[0].ext1
// })
this.jumpType = res.return_data.highChildOrderList[0].ext1;
this.orderId = res.return_data.id;
this.orderDetails = res.return_data;
this.orderToPay(res.return_data);
this.wechatPay(res.return_data);
} else {
uni.showToast({
title: res.return_msg,
@ -605,25 +696,24 @@
}
},
//
orderToPay(item) {
wechatPay(item) {
let that = this;
if (that.paytype == '2') {
// #ifdef H5
let params = {
"orderId": item.id,
"orderNo": item.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER",
"openIdType": 2
}
// #endif
// #ifdef MP
let params = {
"orderId": item.id,
"orderNo": item.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
"openIdType": 1
}
// #endif
orderToPay(params).then(res => {
wechatPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
uni.showLoading({
@ -720,44 +810,48 @@
uni.showLoading({
title: '支付中...'
})
// if (this.paytype == 'jinbi') {
// let params = {
// "orderId": this.orderId,
// "password": this.PaymentPassword
// }
// orderToGoldPay(params).then(res => {
// uni.hideLoading();
// if (res.return_code == '000000') {
// uni.showToast({
// title: ''
// })
// app.globalData.storeid = '';
// app.globalData.storename = '';
// uni.reLaunch({
// url: '../pay/success/success?id=' + this.couponId
// });
// return;
// }
// if (res.return_code == '102130') {
// uni.navigateTo({
// url: '../../login/updatePas/updatePas'
// })
// return;
// }
// uni.showToast({
// title: res.return_msg,
// icon: 'none'
// })
// })
// return;
// }
if (this.paytheprice == 0) {
let goods = {
"childOrderList": [{
"goodsId": this.couponId,
"goodsPrice": this.paytheprice,
"goodsType": 1,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"promoteCode": this.identificationCode,
"payPwd": this.PaymentPassword
}
create(goods).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
app.globalData.storeid = '';
app.globalData.storename = '';
uni.reLaunch({
url: '../pay/success/success?id=' + this
.couponId
});
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
});
}
})
return;
}
let params = {
"orderId": this.orderId,
"orderNo": item.orderNo,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}
hltUnionCardPay(params).then(res => {
cardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
@ -851,13 +945,14 @@
blockEnd() {
this.isDiscount = 1;
if (this.deductionPrice == 0) {
this.payPrice = parseFloat(this.saveprice - parseFloat(this.priceValue[1] / 100).toFixed(2)).toFixed(
2);
this.paytheprice = parseFloat(this.saveprice - parseFloat(this.priceValue[1] / 100).toFixed(2))
.toFixed(
2);
} else {
this.payPrice = 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);
}
if (this.payPrice == 0) {
if (this.paytheprice == 0) {
this.isUse = false;
this.paytype = '';
} else {

@ -65,8 +65,8 @@
<script>
let app = getApp()
import {
addOrder,
orderToPay
create,
wechatPay
} from "../../../Utils/Api.js";
// #ifdef H5
var jweixin = require('jweixin-module');
@ -115,16 +115,17 @@
uni.showLoading({
title: '正在提交订单...'
})
let goods = {
"identificationCode": app.globalData.identificationCode,
"highChildOrderList": [{
"goodsType": 2,
"goodsId": app.globalData.userInfo.id,
"saleCount": 1,
"goodsPrice": this.inputAmount
}]
}
addOrder(goods).then(res => {
let goods = {
"childOrderList": [{
"goodsId": app.globalData.userInfo.id,
"goodsPrice": this.inputAmount,
"goodsType": 2,
"saleCount": 1,
}],
"promoteCode": app.globalData.identificationCode
}
create(goods).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
///
@ -132,18 +133,17 @@
let params = {
"orderId": res.return_data.id,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER",
"openIdType": 2
}
// #endif
// #ifdef MP
let params = {
"orderId": res.return_data.id,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
"openId": app.globalData.openId,
"openIdType": 1
}
// #endif
orderToPay(params).then(res => {
wechatPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
uni.showLoading({

@ -15,15 +15,15 @@
</view>
<view class="newscont width90 border-8r backcorfff mart20" v-for="(item,index) in newsList" :key="index">
<view class="alijusstart mart10 margle10" v-if="item.type == 1">
<image src="../../../static/img/cusservice.png" mode="widthFix" class="icon30"></image>
<image src="../../../static/img/user/notive.png" mode="widthFix" class="icon30"></image>
<text class="font18 margle" style="color: #0B1D83;">服务通知</text>
</view>
<view class="alijusstart mart10 margle10" v-if="item.type == 2">
<image src="../../../static/img/cusservice.png" mode="widthFix" class="icon30"></image>
<image src="../../../static/img/user/order.png" mode="widthFix" class="icon30"></image>
<text class="font18 margle" style="color: #0B1D83;">交易信息</text>
</view>
<view class="alijusstart mart10 margle10" v-if="item.type == 3">
<image src="../../../static/img/cusservice.png" mode="widthFix" class="icon30"></image>
<image src="../../../static/img/user/kefu.png" mode="widthFix" class="icon30"></image>
<text class="font18 margle" style="color: #0B1D83;">客服消息</text>
</view>
<view class="width90 line1 mart10"></view>

@ -21,7 +21,7 @@
<view class="width90 mart20 alijusnostart font12">
<view class="paddleft5 paddtright5 border-r" style="border: 1px solid #5BB5F3;color: #5BB5F3;">本单优惠
</view>
<view class="fcorfff margle">立减-¥8.15</view>
<view class="fcorfff margle">立减-¥{{recinfo.totalDeductionPrice}}</view>
</view>
<view class="width90 mart20 backcorfff height50 fcor333 font15 border-8r">
<view class="width94">感谢您信任嗨森逛欢迎再次消费</view>
@ -30,80 +30,87 @@
<!-- 订单信息 -->
<view class="width90 backcorfff border-8r mart10 paddbotm15">
<view class="paddtop20 font22 width94 fcor333">商家/订单信息</view>
<view class="paddtop20 font22 width94 fcor333" v-if="recinfo.productType == 6">商家/订单信息</view>
<view class="paddtop20 font22 width94 fcor333" v-if="recinfo.productType != 6">订单信息</view>
<view class="mart15 alijusstart font14 width94">
<view class="width20 fcor777">交易单号</view>
<view class="width80p fotrt fcor333">HF202220823829374671902</view>
<view class="width80p fotrt fcor333">{{recinfo.orderNo}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.paySerialNo">
<view class="width20 fcor777">流水号</view>
<view class="width80p fotrt fcor333">433423423425123123123211</view>
<view class="width80p fotrt fcor333">{{recinfo.paySerialNo}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="width20 fcor777">下单时间</view>
<view class="width80p fotrt fcor333">2022-09-06 10:36:38</view>
<view class="width80p fotrt fcor333">{{recinfo.createTime | formatDate('-')}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType == 6">
<view class="width20 fcor777">油站名称</view>
<view class="width80p fotrt fcor333">延长壳牌南充亚华加油站</view>
<view class="width80p fotrt fcor333">{{oilList.storeName}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.payType">
<view class="width20 fcor777">支付方式</view>
<view class="width80p fotrt fcor333">微信</view>
<view class="width80p fotrt fcor333" v-if="recinfo.payType == 1">支付宝</view>
<view class="width80p fotrt fcor333" v-if="recinfo.payType == 2">微信</view>
<view class="width80p fotrt fcor333" v-if="recinfo.payType == 4">汇联通工会卡</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType == 6">
<view class="width20 fcor777">地址</view>
<view class="width80p fotrt fcor333 text1">四川省南充市顺庆区金鱼领路541号1</view>
<view class="width80p fotrt fcor333 text1">{{oilList.storeAddress}}</view>
</view>
</view>
<!-- 商品信息 -->
<view class="width90 backcorfff border-8r mart10 paddbotm15">
<view class="paddtop20 font22 width94 fcor333">商品信息</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType != 6">
<view class="width50 fcor777">商品名称</view>
<view class="width50 fotrt fcor333">100元电信话费充值</view>
<view class="width50 fotrt fcor333">{{recinfo.highChildOrderList[0].goodsName}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType != 6">
<view class="width50 fcor777">商品单价</view>
<view class="width50 fotrt fcor333">¥99.00</view>
<view class="width50 fotrt fcor333">¥{{recinfo.highChildOrderList[0].goodsPrice}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType != 6">
<view class="width50 fcor777">商品数量</view>
<view class="width50 fotrt fcor333">2</view>
<view class="width50 fotrt fcor333">{{recinfo.highChildOrderList[0].saleCount}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType != 6">
<view class="width50 fcor777">商品总金额</view>
<view class="width50 fotrt fcor333">¥188.00</view>
<view class="width50 fotrt fcor333">¥{{recinfo.highChildOrderList[0].totalActualPrice}}</view>
</view>
<!-- <view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType == 6">
<view class="width50 fcor777">油号/枪号</view>
<view class="width50 fotrt fcor333">92#/25号枪</view>
<view class="width50 fotrt fcor333">{{oilList.gasOilNo}}#/{{oilList.gasGunNo}}号枪</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType == 6">
<view class="width50 fcor777">油站单价</view>
<view class="width50 fotrt fcor333">¥7.14/L</view>
<view class="width50 fotrt fcor333">¥{{oilList.gasPriceGun}}/L</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType == 6">
<view class="width70 fcor777">加油升数<text class="font11 fcor999">实际升数以油站加油机为准</text> </view>
<view class="width30 fotrt fcor333">44.12</view>
<view class="width30 fotrt fcor333">{{oilList.gasOilLiters}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="mart15 alijusstart font14 width94" v-if="recinfo.productType == 6">
<view class="width50 fcor777">加油金额</view>
<view class="width50 fotrt fcor333">¥315.00</view>
</view> -->
<view class="width50 fotrt fcor333">¥{{oilList.gasRefuelPrice}}</view>
</view>
</view>
<!-- 支付信息 -->
<view class="width90 backcorfff mart10 concont">
<view class="paddtop20 font22 width94 fcor333">商品信息</view>
<view class="paddtop20 font22 width94 fcor333">优惠信息</view>
<view class="mart15 alijusstart font14 width94">
<view class="width50 fcor777">商品优惠</view>
<view class="width50 fotrt fcoreb5">-¥{{recinfo.deductionProductPrice}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="width50 fcor777">加油优惠</view>
<view class="width50 fotrt fcoreb5">-¥2.86</view>
<view class="width50 fcor777">优惠券优惠</view>
<view class="width50 fotrt fcoreb5">-¥{{recinfo.deductionCouponPrice}}</view>
</view>
<view class="mart15 alijusstart font14 width94">
<view class="width50 fcor777">积分抵扣</view>
<view class="width50 fotrt fcoreb5">-¥1.86</view>
<view class="width50 fotrt fcoreb5">-¥{{recinfo.payGold / 100}}</view>
</view>
<view class="width95 height20 borderleft alijusnostart">
<view style="width: 5%;"></view>
@ -113,8 +120,11 @@
<view class="gooddes width90 backcorfff marb20">
<view class="width90w height20 bordertopleft alijusnostart">
</view>
<view class="width90 height50 fotrt fcor777 font16 paddbotm10">
<view class="width90 height50 fotrt fcor777 font16 paddbotm10" v-if="!recinfo.payRealPrice">
</view>
<view class="width90 height50 fotrt fcor777 font16 paddbotm10" v-else>
加油实付 <text class="font24 fcor333 margle">{{recinfo.payRealPrice}}</text>
</view>
</view>
@ -432,10 +442,11 @@
<script>
import {
getOrderById,
getDetailByOrderNo,
cancelOrder,
getPreByOrderIdId,
orderComplete
orderComplete,
getOrderByOrderNo
} from '../../../Utils/Api.js';
let app = getApp()
export default {
@ -449,7 +460,8 @@
int: 1200, //
deduction: 0, //
recinfo: [],
orderId: '',
orderId: '',
timers: null, //
imageUrl: app.globalData.imgUrl,
imagewxUrl: app.globalData.imageWxImg,
imgadres1: 'dhf.png',
@ -458,6 +470,7 @@
countdownm: '', //
countdowns: '', //
timer: null, //
oilList: '', //
typeText: {
1: '待支付',
2: '已支付',
@ -472,14 +485,14 @@
},
onShow() {
//
this.getOrderById();
this.getPreByOrderIdId();
this.getDetailByOrderNo();
// this.getPreByOrderIdId();
},
onHide() {
},
onUnload() {
clearInterval(this.timer);
clearInterval(this.timers);
},
onLoad(option) {
this.orderId = option.id
@ -518,22 +531,42 @@
}
},
getOrderById() {
//
getDetailByOrderNo() {
uni.showLoading({
title: '加载中...'
})
let params = {
orderId: this.orderId,
orderNo: this.orderId,
}
getOrderById(params).then(res => {
getDetailByOrderNo(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.hideLoading();
this.recinfo = res.return_data;
} else {
uni.hideLoading()
if (res.return_data.productType == 6) {
this.getOrderByOrderNo();
}
if (res.return_data.orderStatus == 1) {
this.timers = setInterval(() => {
this.showtime()
})
}
}
})
},
//
getOrderByOrderNo() {
let params = {
orderNo: this.orderId,
}
getOrderByOrderNo(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.oilList = res.return_data;
}
})
},
//
getPreByOrderIdId() {
let params = {
@ -548,7 +581,7 @@
//
showtime() {
var nowtime = new Date(), //
endtime = this.orderList.createTime + 900000; //
endtime = this.recinfo.createTime + 900000; //
var lefttime = endtime - nowtime, //
leftd = Math.floor(lefttime / (1000 * 60 * 60 * 24)), //
lefth = Math.floor((lefttime / (1000 * 60 * 60) % 24) + leftd * 24) < 10 ? "0" + Math.floor((lefttime /
@ -563,8 +596,8 @@
this.countdowns = lefts //
// 00:00:00
if (lefttime < 0) {
this.getThirdOrderByOrderId();
clearInterval(this.timer);
clearInterval(this.timers);
// this.getDetailByOrderNo();
this.countdownh = this.countdownm = this.countdowns = "00"
}
},

@ -1,7 +1,7 @@
<template>
<view>
<!-- 搜索 -->
<view class="backcorfff width100 height120" style="position: fixed;z-index: 999;" :style="{top:headerTop}" >
<view class="backcorfff width100 height120" style="position: fixed;z-index: 999;" :style="{top:headerTop}">
<view class="alijusstart">
<view class="input-box">
<view class="icon search"></view>
@ -14,15 +14,16 @@
<!-- 顶部导航 -->
<view class="topTabBar">
<view class="grid" v-for="(grid,tbIndex) in orderType" :key="tbIndex" @tap="showType(tbIndex)">
<view class="text" :class="[tbIndex==tabbarIndex?'on':'']">{{grid}}
<view class="text" :class="[tbIndex==tabbarIndex?'on':'']">{{grid}}
</view>
</view>
</view>
</view>
<scroll-view scroll-x='true' :style="{top:headerswper}" class="srollview width100" scroll-with-animation>
<view class="conent" :class="[ordertypeid == index ? 'activeconent' : 'frontconent']"
v-for="(item,index) in orderTyplist" :key="index">{{item}}</view>
<view class="conent" :class="[ordertypeid == item.codeValue ? 'activeconent' : 'frontconent']"
v-for="(item,index) in orderTyplist" :key="index" @click="selectlist(item.codeValue)">{{item.codeName}}
</view>
</scroll-view>
<!-- 考虑非APP端长列表和复杂的DOM使用scroll-view会卡顿所以漂浮顶部选项卡使用page本身的滑动 -->
<view class="order-list">
@ -30,11 +31,10 @@
<view class="onorder" v-if="orderList.length==0">
<image :src="imagewxUrl+imgadres"></image>
</view>
<view class="row" v-for="(row,index) in orderList" :key="index"
@click="jumpDetails(row.highChildOrderList[0].goodsType,row.id)">
<view class="row" v-for="(row,index) in orderList" :key="index" @click="jumpDetails(row.orderNo,row.productType)">
<view class="width96 mart10 alijusstart">
<view class="width70">
<view class="orderlabel">在线加油</view>
<view class="orderlabel">{{orderTyplist | msgFormat(row.productType)}}</view>
<view class="unread" v-if="row.orderStatus == 3 && !row.whetherCheck"></view>
</view>
<view class="width30 fotrt fcor666 font12">
@ -42,11 +42,12 @@
</view>
</view>
<view class="width96 height40p mart10">
<view class="width96 height22 mart10">
<view class="width70 flleft fotlt ">
<view class="font16 fontwig6 text1 fcor333 alijusstart">
<view class="font16 fontwig6 fcor333 alijusstart">
<image src="../../../static/img/order5.png" class="marglerig"
style="width: 50rpx;height: 50rpx;"></image>{{row.highChildOrderList[0].goodsName}}
style="width: 50rpx;height: 50rpx;"></image>
<view class="width100 text1">{{row.title}}</view>
</view>
</view>
<view class="width30 flright fotrt fcor666 font15 fotrt">
@ -59,24 +60,23 @@
订单编号:{{row.orderNo}}
</view>
<view class="width96 height25 paddbotm10 alijusstart">
<view class="width70 fotlt ">
<view class="width60 fotlt ">
<view class="font12 text1 fcor999 mart5">
下单时间 : {{row.createTime | formatDate('-')}}
</view>
</view>
<view class="width30 fotrt fcor666 font15 fotrt">
<view class="fotrt font12 text1 fcor999 mart5">
合计:<text class="fcor333 font18"> {{row.payPrice}} </text>
<view class="width40 fotrt fcor666 font15 fotrt alijusend">
<view class="font12 width25 fcor999">合计:</view>
<view class="fotlt text1 font18 fcor333 ">
{{row.payPrice}}
</view>
</view>
</view>
<view class="width96 mart10 marb5" style="border:1px dashed #f4f4f4;"
v-if="(row.orderStatus==1 && row.highChildOrderList[0].goodsType !=6 && row.highChildOrderList[0].goodsType !=5)">
<view class="width96 mart10 marb5" style="border:1px dashed #f4f4f4;" v-if="(row.orderStatus==1)">
</view>
<view class="btns"
v-if="(row.orderStatus==1 && row.highChildOrderList[0].goodsType !=6 && row.highChildOrderList[0].goodsType !=5)">
<view class="btns" v-if="(row.orderStatus==1)">
<block>
<view class="default" @click.stop="cancelOrder(row.id,row.highChildOrderList[0].goodsType)">
<view class="default" @click.stop="cancel(row.orderNo)">
取消订单
</view>
<view class="pay" @click.stop="toPayment(row)">立即支付</view>
@ -90,9 +90,9 @@
<script>
import {
getUserOrderList,
cancelOrder,
thirdCancelOrder,
orderCheck
cancel,
orderCheck,
getDictionaryByCodeType
} from '../../../Utils/Api.js';
let app = getApp()
export default {
@ -101,8 +101,8 @@
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'noorder.png',
imgadres1: 'dhf.png',
headerTop: "0px",
headerswper:'120px',
headerTop: "0px",
headerswper: '120px',
typeText: {
1: '等待付款',
2: '订单已支付',
@ -125,15 +125,18 @@
typeId: '',
imageUrl: app.globalData.imgUrl,
reFresh: "",
orderTyplist: ['全部订单', '在线加油', '肯德基', '星巴克', '话费充值', '卡券订单'], //
ordertypeid: 1 //id
orderTyplist: [{
codeValue: '',
codeName: '全部'
}], //
ordertypeid: '', //id
couponName: '' //
}
},
onLoad(option) {
// #ifdef H5
this.headerTop = '44px';
this.headerswper = '150px';
this.headerTop = '44px';
this.headerswper = '150px';
// #endif
let tbIndex = parseInt(option.tbIndex) + 1;
if (tbIndex == 0) {
@ -144,6 +147,7 @@
this.list = this.orderList[this.typeId];
this.tabbarIndex = tbIndex;
this.getUserOrderList();
this.getDictionaryByCodeType();
},
onReachBottom() {
this.getUserOrderList();
@ -167,6 +171,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;
}
}
}
},
watch: {
@ -190,16 +203,11 @@
uni.hideLoading()
return false;
}
let statusId;
if (this.typeId == 2) {
statusId = '2,6,7';
} else {
statusId = this.typeId;
}
let pagenum = this.pageNum;
let params = {
status: statusId,
status: this.typeId,
searchTitle: this.couponName,
productType: this.ordertypeid,
pageNum: this.pageNum,
pageSize: this.pageSize
}
@ -218,13 +226,24 @@
uni.hideLoading()
}
})
},
//
getDictionaryByCodeType() {
let datas = {
codeType: 'ORDER_PRODUCT_TYPE'
}
getDictionaryByCodeType(datas).then(res => {
if (res.return_code == '000000') {
for(var i = 0 ;i < res.return_data.length;i++){
this.orderTyplist.push(res.return_data[i]);
}
}
})
},
//
jumpDetails(item, e) {
jumpDetails(e, item) {
this.orderCheck(e);
if (item == 4 || item == 9 || item == 10) {
if (item == 1 || item == 2 || item == 3) {
uni.navigateTo({
url: '/qianzhu-KFC/order-details/order-details?id=' + e
})
@ -238,7 +257,7 @@
//
orderCheck(item) {
let datas = {
orderId: item
orderNo: item
}
orderCheck(datas).then(res => {
@ -256,15 +275,24 @@
}
this.getUserOrderList();
},
showLogistics(row) {
//
selectlist(item) {
this.ordertypeid = item;
this.pageNum = 1;
this.orderList = []
this.isNoMoreData = false;
this.getUserOrderList();
},
remindDeliver(row) {
uni.showToast({
title: '已提醒商家发货'
})
//
toSearch() {
this.pageNum = 1;
this.orderList = []
this.isNoMoreData = false;
this.getUserOrderList();
},
cancelOrder(row, item) {
//
cancel(row) {
let that = this;
uni.showModal({
title: '取消订单',
@ -275,33 +303,9 @@
title: '加载中...'
})
let params = {
orderId: row,
}
if (item == 9 || item == 4) {
thirdCancelOrder(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({
title: res.return_data,
icon: 'none',
duration: 2000
})
this.pageNum = 1;
this.orderList = []
this.isNoMoreData = false;
that.getUserOrderList();
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
uni.hideLoading()
}
})
return;
orderNo: row,
}
cancelOrder(params).then(res => {
cancel(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({

@ -280,12 +280,12 @@
import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue'
import wybPopup from '@/components/wyb-popup/wyb-popup.vue'
import {
xbkaddOrder,
create,
getThirdPartyByDetail,
getHuiLianTongCardBalance,
findUser,
qianzhuorderToPayByWx,
czhltUnionCardPay,
wechatPay,
cardPay,
getUserOrderPreList,
thirdCancelOrder,
getRebateIntegral
@ -305,7 +305,7 @@
orderList: [],
sttypeid: 1,
paytype: '2', //
typeid: app.globalData.distinguishid, //
typeid: app.globalData.distinguishid, // 2: 1:
priceValue: [0, 0], //
availIntegal: 0, //
totalprice: 0, //
@ -585,39 +585,52 @@
})
data2 = data1.join(',');
datas = {
customerMobile: this.customerMobile,
regionId: app.globalData.cityId,
storeCode: this.storeCode,
productType: this.productType,
platformId: this.showType,
orderItems: data2,
eatType: this.sttypeid,
integralNum: this.priceValue[1],
memDiscountId: this.memDiscountId
}
"childOrderList": [{
"goodsId": 9999,
"customerMobile": this.customerMobile,
"storeCode":this.storeCode,
"platformId": this.showType,
"productType": this.productType,
"orderItems": data2,
"eatType": this.sttypeid,
"goodsType": 9,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
// "promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
}
console.log('======'+JSON.stringify(datas));
}
if (this.typeid == 2) {
datas = {
customerMobile: this.customerMobile,
regionId: app.globalData.cityId,
storeCode: this.storeCode,
productType: this.productType,
platformId: this.showType,
orderItems: this.orderList,
integralNum: this.priceValue[1],
memDiscountId: this.memDiscountId
"childOrderList": [{
"goodsId": 9999,
"customerMobile": this.customerMobile,
"storeCode":this.storeCode,
"platformId": this.showType,
"productType": this.productType,
"orderItems": data2,
"goodsType": 4,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
// "promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
}
}
xbkaddOrder(datas).then(res => {
create(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.orderId = res.return_data.id;
this.orderId = res.return_data.orderNo;
let params = {
"orderId": res.return_data.id,
"orderNo": res.return_data.orderNo,
"openId": app.globalData.openId,
"openIdType": this.showType
}
this.qianzhuorderToPayByWx(params);
this.wechatPay(params);
} else {
uni.showToast({
title: res.return_msg,
@ -727,7 +740,7 @@
this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(
2)) - this
.deductionPrice).toFixed(2));
}
}
this.getRebateIntegral();
},
rechangeload() {
@ -740,10 +753,10 @@
this.$nextTick(() => (this.isDiscount = true))
},
//
qianzhuorderToPayByWx(item) {
wechatPay(item) {
let that = this;
if (that.paytype == '2') {
qianzhuorderToPayByWx(item).then(res => {
wechatPay(item).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
uni.showLoading({
@ -853,36 +866,48 @@
})
data2 = data1.join(',');
datas = {
customerMobile: this.customerMobile,
regionId: app.globalData.cityId,
storeCode: this.storeCode,
productType: this.productType,
platformId: this.showType,
orderItems: data2,
eatType: this.sttypeid,
password: this.PaymentPassword,
integralNum: this.priceValue[1],
memDiscountId: this.memDiscountId
"childOrderList": [{
"goodsId": 9999,
"customerMobile": this.customerMobile,
"storeCode":this.storeCode,
"platformId": this.showType,
"productType": this.productType,
"orderItems": data2,
"eatType": this.sttypeid,
"goodsType": 9,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
// "promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
"payPwd": this.PaymentPassword
}
}
if (this.typeid == 2) {
datas = {
customerMobile: this.customerMobile,
regionId: app.globalData.cityId,
storeCode: this.storeCode,
productType: this.productType,
platformId: this.showType,
orderItems: this.orderList,
password: this.PaymentPassword,
integralNum: this.priceValue[1],
memDiscountId: this.memDiscountId
"childOrderList": [{
"goodsId": 9999,
"customerMobile": this.customerMobile,
"storeCode":this.storeCode,
"platformId": this.showType,
"productType": this.productType,
"orderItems": data2,
"goodsType": 4,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
// "promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
"payPwd": this.PaymentPassword
}
}
xbkaddOrder(datas).then(res => {
create(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.orderId = res.return_data.id;
this.orderId = res.return_data.orderNo;
uni.reLaunch({
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderId
})
@ -904,11 +929,11 @@
return;
}
let params = {
"orderId": this.orderId,
"orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}
czhltUnionCardPay(params).then(res => {
cardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({

@ -183,8 +183,9 @@
<script>
import {
getThirdOrderByOrderId,
thirdCancelOrder
getThirdOrderByOrderNo,
thirdCancelOrder,
getDetailByOrderNo
} from '../../Utils/Api.js';
export default {
data() {
@ -209,14 +210,15 @@
6: '退款中',
7: '退款失败'
},
phonestu: 1 //
phonestu: 1 ,//
recinfo: [], //
}
},
onLoad(options) {
this.orderId = options.id;
},
onShow() {
this.getThirdOrderByOrderId();
this.getThirdOrderByOrderNo();
},
onUnload() {
clearInterval(this.timer);
@ -232,16 +234,31 @@
this.orderList.highChildOrderList.forEach((food) => {
this.coutnums += food.saleCount
})
},
//
getDetailByOrderNo() {
uni.showLoading({
title: '加载中...'
})
let params = {
orderNo: this.orderId,
}
getDetailByOrderNo(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.recinfo = res.return_data;
}
})
},
//
getThirdOrderByOrderId() {
//
getThirdOrderByOrderNo() {
// uni.showLoading({
// title: '...'
// })
let datas = {
orderId: this.orderId
orderNo: this.orderId
}
getThirdOrderByOrderId(datas).then(res => {
getThirdOrderByOrderNo(datas).then(res => {
// uni.hideLoading();
if (res.return_code == '000000') {
this.typeid = res.return_data.highChildOrderList[0].goodsType;
@ -324,7 +341,7 @@
this.timerdjs = setInterval(() => {
if (holdTime <= 0) {
clearInterval(this.timerdjs);
this.getThirdOrderByOrderId();
this.getThirdOrderByOrderNo();
holdTime = 10;
return;
}
@ -349,7 +366,7 @@
this.countdowns = lefts //
// 00:00:00
if (lefttime < 0) {
this.getThirdOrderByOrderId();
this.getThirdOrderByOrderNo();
clearInterval(this.timer);
this.countdownh = this.countdownm = this.countdowns = "00"
}

@ -70,8 +70,8 @@
getHuiLianTongCardBalance,
oilCardPay,
findUser,
qianzhuorderToPayByWx,
czhltUnionCardPay,
wechatPay,
cardPay,
getThirdPartyByDetail
} from '../../Utils/Api.js'
import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue';
@ -212,20 +212,19 @@
if (that.paytype == '2') {
// #ifdef H5
let params = {
"orderId": that.orderNo,
"orderNo": that.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER",
"openIdType": 2
}
// #endif
// #ifdef MP
let params = {
"orderId": that.orderNo,
"orderNo": that.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
"openIdType": 1
}
// #endif
qianzhuorderToPayByWx(params).then(res => {
wechatPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
uni.showLoading({
@ -335,11 +334,11 @@
})
if (this.paytype == '3') {
let params = {
"orderId": this.orderNo,
"orderNo": this.orderNo,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}
czhltUnionCardPay(params).then(res => {
cardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -281,9 +281,9 @@
platformId: showType,
id: this.objectId
}
findById(datas).then(res => {
findById(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.hideLoading();
this.rechargeDes = res.return_data;
this.paytypeList = res.return_data.productPayTypeString.split(',');
this.paytypeList = this.paytypeList.slice(0, this.paytypeList.length - 1);

Loading…
Cancel
Save