1、合作商余额查询
2、分油账户司机可用额度
This commit is contained in:
@@ -44,18 +44,28 @@
|
||||
</view>
|
||||
<!-- 申请支付码 -->
|
||||
<view class="goods-refund">
|
||||
<text v-if="goods.use_status" class="stata-text">已加油</text>
|
||||
<text v-if="goods.refund_status == 2" class="stata-text">已退款</text>
|
||||
<text v-else-if="goods.oil_status && oilRemain(goods) <= 0" class="stata-text">已加完</text>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view v-else-if="item.order_status === 10 && goods.oil_status" class="action-btn" @click.stop="layerPayQrcode(goods.order_goods_id)">核销码</view>
|
||||
<view v-else-if="item.order_status === 10 && goods.oil_status" class="action-btn" @click.stop="layerPayQrcode(goods.order_goods_id)">去加油</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef !MP-WEIXIN -->
|
||||
<view v-else-if="item.order_status === 10 && goods.oil_status" class="action-btn" @click.stop="handlePayQrcode(goods.order_goods_id)">核销码</view>
|
||||
<view v-else-if="item.order_status === 10 && goods.oil_status" class="action-btn" @click.stop="handlePayQrcode(goods.order_goods_id)">去加油</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 发放进度:7.7 运单油费下发是异步的,受理后要等上游发放结果 -->
|
||||
<view v-if="goods.oilCardType === 'zsy_ticket' && goods.oilCardNo && !goods.oil_status" class="order-countdown">
|
||||
<text v-if="goods.oil_status_zsy == 3" class="f-24 col-m">发放失败:{{ goods.oil_text || '请联系客服' }}</text>
|
||||
<text v-else class="f-24 col-9">油费发放中,请稍候…</text>
|
||||
</view>
|
||||
<!-- 加油进度:一张订单可以分多次加油 -->
|
||||
<view v-if="goods.used_num > 0" class="order-countdown">
|
||||
<text class="f-24 col-9">已加油¥{{ goods.used_amount }}({{ goods.used_num }}次),剩余¥{{ oilRemain(goods).toFixed(2) }}</text>
|
||||
</view>
|
||||
<!-- 过期剩余时间 -->
|
||||
<view v-if="item.order_status === 10 && goods.oil_status && !goods.use_status" class="order-countdown">
|
||||
<view v-if="item.order_status === 10 && goods.oil_status && !goods.use_status && goods.expiration_time > 0" class="order-countdown">
|
||||
<text class="m-r-6">剩余时间</text>
|
||||
<count-down :date="goods.expiration_time" separator="zh" theme="text" />
|
||||
</view>
|
||||
@@ -352,6 +362,14 @@
|
||||
});
|
||||
},
|
||||
|
||||
// 剩余可加油金额 = 发放金额 - 已加油 - 已退款(一单可分多次加油)
|
||||
oilRemain(goods) {
|
||||
const total = Number(goods.total_price || 0)
|
||||
const used = Number(goods.used_amount || 0)
|
||||
const refund = Number(goods.refund_amount || 0)
|
||||
return Math.max(0, Math.round((total - used - refund) * 100) / 100)
|
||||
},
|
||||
|
||||
// 获取核销码,弹窗展示二维码
|
||||
layerPayQrcode(orderGoodsId) {
|
||||
uni.navigateTo({
|
||||
|
||||
Reference in New Issue
Block a user