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', url: 'https://hsgcs.dctpay.com/crest',
v1url: 'https://hsgcs.dctpay.com/v1', v1url: 'https://hsgcs.dctpay.com/v1',
orderurl:' https://hsgcs.dctpay.com/order', orderurl:'https://hsgcs.dctpay.com/order',
brestUrl: 'https://hsgcs.dctpay.com/brest', brestUrl: 'https://hsgcs.dctpay.com/brest',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/', imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/', imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',

@ -149,10 +149,7 @@ export const cancelOrder = params => {
export const getOrderById = params => { export const getOrderById = params => {
return POST('GET', `${base}/highOrder/getOrderById`, params).then(res => res.data); 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 => { export const getMerchantList = params => {
@ -248,7 +245,12 @@ export const oilPriceDiscountCompute = params => {
//在线加油优惠券 //在线加油优惠券
export const canUseDiscount = params => { export const canUseDiscount = params => {
return POST('POST', `${base}/userDiscount/canUseDiscount`, params).then(res => res.data); 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 => { export const getDictionaryByCodeType = params => {
return POST('GET', `${base}/common/getDictionaryByCodeType`, params).then(res => res.data); 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); return POST('GET', `${base}/highThirdParty/listByStoreCode`, params).then(res => res.data);
} }
//肯德基订单详情 //肯德基订单详情
export const getThirdOrderByOrderId = params => { export const getThirdOrderByOrderNo = params => {
return POST('GET', `${base}/highThirdParty/getThirdOrderByOrderId`, params).then(res => res.data); return POST('GET', `${base}/highThirdParty/getThirdOrderByOrderNo`, params).then(res => res.data);
} }
//肯德基,星巴克取消订单 //肯德基,星巴克取消订单
export const thirdCancelOrder = params => { export const thirdCancelOrder = params => {
@ -648,3 +650,17 @@ export const getDetailByOrderNo = params => {
export const cancel = params => { export const cancel = params => {
return POST('POST', `${orderbase}/cancel`, params).then(res => res.data); 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 // #endif
} }
}, },
fail(err) { fail(err) {
console.log('======='+JSON.stringify(err))
uni.showToast({ uni.showToast({
title: '网络异常', title: '网络异常',
icon: 'none', icon: 'none',

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

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

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

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

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

@ -15,15 +15,15 @@
</view> </view>
<view class="newscont width90 border-8r backcorfff mart20" v-for="(item,index) in newsList" :key="index"> <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"> <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> <text class="font18 margle" style="color: #0B1D83;">服务通知</text>
</view> </view>
<view class="alijusstart mart10 margle10" v-if="item.type == 2"> <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> <text class="font18 margle" style="color: #0B1D83;">交易信息</text>
</view> </view>
<view class="alijusstart mart10 margle10" v-if="item.type == 3"> <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> <text class="font18 margle" style="color: #0B1D83;">客服消息</text>
</view> </view>
<view class="width90 line1 mart10"></view> <view class="width90 line1 mart10"></view>

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

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

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

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

@ -70,8 +70,8 @@
getHuiLianTongCardBalance, getHuiLianTongCardBalance,
oilCardPay, oilCardPay,
findUser, findUser,
qianzhuorderToPayByWx, wechatPay,
czhltUnionCardPay, cardPay,
getThirdPartyByDetail getThirdPartyByDetail
} from '../../Utils/Api.js' } from '../../Utils/Api.js'
import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue'; import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue';
@ -212,20 +212,19 @@
if (that.paytype == '2') { if (that.paytype == '2') {
// #ifdef H5 // #ifdef H5
let params = { let params = {
"orderId": that.orderNo, "orderNo": that.orderNo,
"openId": app.globalData.openId, "openId": app.globalData.openId,
"orderScene": "GOODS_ORDER",
"openIdType": 2 "openIdType": 2
} }
// #endif // #endif
// #ifdef MP // #ifdef MP
let params = { let params = {
"orderId": that.orderNo, "orderNo": that.orderNo,
"openId": app.globalData.openId, "openId": app.globalData.openId,
"orderScene": "GOODS_ORDER" "openIdType": 1
} }
// #endif // #endif
qianzhuorderToPayByWx(params).then(res => { wechatPay(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
// #ifdef MP // #ifdef MP
uni.showLoading({ uni.showLoading({
@ -335,11 +334,11 @@
}) })
if (this.paytype == '3') { if (this.paytype == '3') {
let params = { let params = {
"orderId": this.orderNo, "orderNo": this.orderNo,
"cardNo": this.user.hltCardNo.cardNo, "cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword "password": this.PaymentPassword
} }
czhltUnionCardPay(params).then(res => { cardPay(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.showToast({ 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, platformId: showType,
id: this.objectId id: this.objectId
} }
findById(datas).then(res => { findById(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.hideLoading();
this.rechargeDes = res.return_data; this.rechargeDes = res.return_data;
this.paytypeList = res.return_data.productPayTypeString.split(','); this.paytypeList = res.return_data.productPayTypeString.split(',');
this.paytypeList = this.paytypeList.slice(0, this.paytypeList.length - 1); this.paytypeList = this.paytypeList.slice(0, this.paytypeList.length - 1);

Loading…
Cancel
Save