Commit d7c6bd9c by zhangxw

理赔过的单拦截退款/撤销工单/标记错误工单

1 parent 963245e9
...@@ -245,5 +245,9 @@ module.exports = { ...@@ -245,5 +245,9 @@ module.exports = {
// 工资申述入口判断 // 工资申述入口判断
hasPerformanceConfig(data) { hasPerformanceConfig(data) {
return api.post('dj.staff.api.has.performance.config.formerchant', data, [], '/rop-dj-staff-miniprogram/router') return api.post('dj.staff.api.has.performance.config.formerchant', data, [], '/rop-dj-staff-miniprogram/router')
} },
// 校验订单是否理赔过,不可退单退款
checkOrderCalimStatus(data) {
return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.checkChargeBackAllowed', data)
}
} }
...@@ -10,7 +10,8 @@ import { ...@@ -10,7 +10,8 @@ import {
updateCustomerInfo, updateCustomerInfo,
errorOrderById, errorOrderById,
updateZyInfo, updateZyInfo,
getMoreBtnAPI getMoreBtnAPI,
checkOrderCalimStatus
} from '../../../api' } from '../../../api'
import { import {
checkDailyReport, checkDailyReport,
...@@ -1187,7 +1188,16 @@ Component({ ...@@ -1187,7 +1188,16 @@ Component({
return return
} }
this.repeal(repealId, repealReason) this.repeal(repealId, repealReason)
}, },
showClaimModal() {
wx.showModal({
title: '提示',
content: '由于您的车辆有理赔案件处理当中,请先联系权益服务官18938907441进行处理',
confirmText: '确定',
confirmColor: '#347BFF',
showCancel: false
})
},
async toConfirmReturanOrder(e) { async toConfirmReturanOrder(e) {
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true) let staffCheck = await checkDailyReport(true)
...@@ -1197,9 +1207,11 @@ Component({ ...@@ -1197,9 +1207,11 @@ Component({
if (staffStudyTask) return false if (staffStudyTask) return false
// 校验异常订单 // 校验异常订单
let abnormalOrderCheck = await checkAbnormalOrder() let abnormalOrderCheck = await checkAbnormalOrder()
if (abnormalOrderCheck) return false if (abnormalOrderCheck) return false
console.log(e.currentTarget.dataset, 'e.currentTarget.dataset') const { id, repeal, status, payid } = e.currentTarget.dataset
const { id, repeal, status, payid } = e.currentTarget.dataset // 五月份小版本 校验是否理赔阶段
let orderCalimResult = await checkOrderCalimStatus({orderCode: payid, requestSource: 3})
if (!orderCalimResult?.data?.allowChargeBack) return this.showClaimModal()
let _this = this let _this = this
if (repeal && status == -1) { if (repeal && status == -1) {
this.setData({ this.setData({
...@@ -1305,9 +1317,12 @@ Component({ ...@@ -1305,9 +1317,12 @@ Component({
if (staffStudyTask) return false if (staffStudyTask) return false
// 校验异常订单 // 校验异常订单
let abnormalOrderCheck = await checkAbnormalOrder() let abnormalOrderCheck = await checkAbnormalOrder()
if (abnormalOrderCheck) return false if (abnormalOrderCheck) return false
const { item, payid } = e.currentTarget.dataset
// 五月份小版本 校验是否理赔阶段
let orderCalimResult = await checkOrderCalimStatus({orderCode: payid, requestSource: 3})
if (!orderCalimResult?.data?.allowChargeBack) return this.showClaimModal()
let _this = this let _this = this
const { item } = e.currentTarget.dataset
_this.setData( _this.setData(
{ {
showErrorId: item.payId showErrorId: item.payId
...@@ -1426,20 +1441,26 @@ Component({ ...@@ -1426,20 +1441,26 @@ Component({
moreBtnVisible: !moreBtnVisible moreBtnVisible: !moreBtnVisible
}) })
}, },
handleBtnClick(e) { async handleBtnClick(e) {
const btnName = e.detail.name const btnName = e.detail.name
let { btnOrderInfo } = this.data let { btnOrderInfo } = this.data
switch (btnName) { switch (btnName) {
case '申请开票': case '申请开票':
case '查看发票': case '查看发票':
this.handleInvoiceDetail() this.handleInvoiceDetail()
break break
case '申请退款': case '申请退款':
// 五月份小版本 退款拦截判断
const orderCalimResult = await checkOrderCalimStatus({orderCode: btnOrderInfo?.payId, requestSource: 3})
if (!orderCalimResult?.data?.allowChargeBack) return this.showClaimModal()
// 申请退款点击埋点 // 申请退款点击埋点
wx.$track.setTrackData(0, 'apply_refund_page', {}, '', 0) wx.$track.setTrackData(0, 'apply_refund_page', {}, '', 0)
this.toRefund() this.toRefund()
break break
case '标记退款': case '标记退款':
// 五月份小版本 退款拦截判断
let orderCalimRes = await checkOrderCalimStatus({orderCode: btnOrderInfo?.payId, requestSource: 3})
if (!orderCalimRes?.data?.allowChargeBack) return this.showClaimModal()
this.toRefund(true) this.toRefund(true)
break break
case '退款详情': case '退款详情':
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!