Commit 60b6a846 by Jaxon

Merge branch 'merge/from5.8.1to5.8.2' into 'saas+v5.8.2'

Merge/from5.8.1to5.8.2

See merge request !527
2 parents fe447a97 98ceba68
...@@ -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)
} }
} }
...@@ -162,7 +162,8 @@ Component({ ...@@ -162,7 +162,8 @@ Component({
commonApi commonApi
.getUserScene({ .getUserScene({
sceneType: String(userInfo.sceneType ?? ''), sceneType: String(userInfo.sceneType ?? ''),
phone: userInfo.phone phone: userInfo.phone,
merchantId: userInfo.shopMerchantId || ''
}) })
.then(res => { .then(res => {
const list = res?.code == 0 && res?.data?.length ? res.data : [] const list = res?.code == 0 && res?.data?.length ? res.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,
...@@ -1188,6 +1189,15 @@ Component({ ...@@ -1188,6 +1189,15 @@ Component({
} }
this.repeal(repealId, repealReason) this.repeal(repealId, repealReason)
}, },
showClaimModal(message) {
wx.showModal({
title: '提示',
content: `${message || '由于您的车辆有理赔案件处理当中,请先联系权益服务官18938907441进行处理'}`,
confirmText: '确定',
confirmColor: '#347BFF',
showCancel: false
})
},
async toConfirmReturanOrder(e) { async toConfirmReturanOrder(e) {
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true) let staffCheck = await checkDailyReport(true)
...@@ -1198,8 +1208,10 @@ Component({ ...@@ -1198,8 +1208,10 @@ Component({
// 校验异常订单 // 校验异常订单
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(orderCalimResult?.data?.message)
let _this = this let _this = this
if (repeal && status == -1) { if (repeal && status == -1) {
this.setData({ this.setData({
...@@ -1306,8 +1318,11 @@ Component({ ...@@ -1306,8 +1318,11 @@ Component({
// 校验异常订单 // 校验异常订单
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(orderCalimResult?.data?.message)
let _this = this let _this = this
const { item } = e.currentTarget.dataset
_this.setData( _this.setData(
{ {
showErrorId: item.payId showErrorId: item.payId
...@@ -1426,7 +1441,7 @@ Component({ ...@@ -1426,7 +1441,7 @@ 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) {
...@@ -1435,11 +1450,17 @@ Component({ ...@@ -1435,11 +1450,17 @@ Component({
this.handleInvoiceDetail() this.handleInvoiceDetail()
break break
case '申请退款': case '申请退款':
// 五月份小版本 退款拦截判断
let orderCalimResult = await checkOrderCalimStatus({orderCode: btnOrderInfo?.payId, requestSource: 3})
if (!orderCalimResult?.data?.allowChargeBack) return this.showClaimModal(orderCalimResult?.data?.message)
// 申请退款点击埋点 // 申请退款点击埋点
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(orderCalimRes?.data?.message)
this.toRefund(true) this.toRefund(true)
break break
case '退款详情': case '退款详情':
......
...@@ -207,6 +207,10 @@ Page({ ...@@ -207,6 +207,10 @@ Page({
key: "signingInfo.saleContract.bankOfDeposit", key: "signingInfo.saleContract.bankOfDeposit",
}, },
{ {
label: "回单摘要",
key: "signingInfo.saleContract.returnSummaryRemark",
},
{
label: "身份证", label: "身份证",
keys: [ keys: [
"signingInfo.saleContract.payerIdCardFrontUrl", "signingInfo.saleContract.payerIdCardFrontUrl",
......
...@@ -101,6 +101,10 @@ ...@@ -101,6 +101,10 @@
<text class="popup-cell-title">开户行</text> <text class="popup-cell-title">开户行</text>
<text class="popup-cell-value">{{ payPopupObj.bankOfDeposit }}</text> <text class="popup-cell-value">{{ payPopupObj.bankOfDeposit }}</text>
</view> </view>
<view class="align-center mb-16">
<text class="popup-cell-title">回单摘要</text>
<text class="popup-cell-value">{{ payPopupObj.returnSummaryRemark || '-' }}</text>
</view>
<view class="flex align-center"> <view class="flex align-center">
<text class="popup-cell-title">付款方式</text> <text class="popup-cell-title">付款方式</text>
<view class="popup-cell-value flex"> <view class="popup-cell-value flex">
......
...@@ -147,7 +147,9 @@ Page({ ...@@ -147,7 +147,9 @@ Page({
signerType: 0, signerType: 0,
handler: '', handler: '',
orgLicenseNumber: '', orgLicenseNumber: '',
orgLicenseUrl: '' orgLicenseUrl: '',
returnSummarySwitch: 0,
returnSummaryRemark: ''
}, },
formFields: [], formFields: [],
formFields1: [ formFields1: [
...@@ -217,6 +219,18 @@ Page({ ...@@ -217,6 +219,18 @@ Page({
targetObj: '', targetObj: '',
type: 'input', type: 'input',
maxlength: 36 maxlength: 36
},
{
key: 'returnSummary',
label: '回单摘要',
required: false,
fullWidth: false,
switchKey: 'returnSummarySwitch',
remarkKey: 'returnSummaryRemark',
targetKey: 'returnSummarySwitch',
placeholder: '请输入回单摘要',
type: 'switchInput',
maxlength: 35
} }
], ],
formFields3: [ formFields3: [
...@@ -236,7 +250,9 @@ Page({ ...@@ -236,7 +250,9 @@ Page({
show: false, show: false,
value1: dayjs().format('YYYY-MM-DD HH:mm:ss'), value1: dayjs().format('YYYY-MM-DD HH:mm:ss'),
sysInfo: {}, sysInfo: {},
orgLicenseImages: [] orgLicenseImages: [],
defaultReturnSummaryRemark: '',
returnSummaryRemarkTouched: false
}, },
/** /**
...@@ -276,11 +292,19 @@ Page({ ...@@ -276,11 +292,19 @@ Page({
}) })
if (res.data.code == 0) { if (res.data.code == 0) {
wx.hideLoading() wx.hideLoading()
const detail = res.data.data || {}
const licensePlate = (
detail.evalOrder?.licensePlate ||
detail.licensePlate ||
detail.evalCarBase?.licensePlate ||
''
).slice(0, 35)
this.setData({ this.setData({
'formData.partAName': res.data.data.evalCarLicense.previousOwnerName, 'formData.partAName': detail.evalCarLicense.previousOwnerName,
'formData.payeeName': res.data.data.evalCarLicense.previousOwnerName, 'formData.payeeName': detail.evalCarLicense.previousOwnerName,
'formData.phone': res.data.data.evalCarLicense.previousOwnerPhone, 'formData.phone': detail.evalCarLicense.previousOwnerPhone,
'formData.address': `${res.data.data.evalCarBase.registrationProvinceName}-${res.data.data.evalCarBase.registrationCityName}` 'formData.address': `${detail.evalCarBase.registrationProvinceName}-${detail.evalCarBase.registrationCityName}`,
defaultReturnSummaryRemark: licensePlate
}) })
} else { } else {
wx.hideLoading() wx.hideLoading()
...@@ -653,9 +677,34 @@ Page({ ...@@ -653,9 +677,34 @@ Page({
}) })
}, },
handleReturnSummarySwitchChange(e) {
const { switchKey } = e.currentTarget.dataset
const switchValue = e.detail
const update = {
[`formData.${switchKey}`]: switchValue
}
if (Number(switchValue) === 1) {
const { formData, defaultReturnSummaryRemark, returnSummaryRemarkTouched } =
this.data
if (!returnSummaryRemarkTouched && !formData.returnSummaryRemark) {
update['formData.returnSummaryRemark'] = (
defaultReturnSummaryRemark || ''
).slice(0, 35)
}
}
this.setData(update)
},
handleInput(e) { handleInput(e) {
let { field } = e.currentTarget.dataset let { field } = e.currentTarget.dataset
let { value } = e.detail let { value } = e.detail
if (field === 'returnSummaryRemark') {
this.setData({
'formData.returnSummaryRemark': value.slice(0, 35),
returnSummaryRemarkTouched: true
})
return
}
if (field == 'idCard' || field == 'orgLicenseNumber') { if (field == 'idCard' || field == 'orgLicenseNumber') {
let filteredValue = value.replace(/[^A-Za-z0-9]/g, '') let filteredValue = value.replace(/[^A-Za-z0-9]/g, '')
this.setData({ this.setData({
...@@ -1072,6 +1121,15 @@ Page({ ...@@ -1072,6 +1121,15 @@ Page({
return return
} }
} }
for (const field of formFields2) {
if (field.type === 'switchInput' && Number(formData[field.switchKey]) === 1) {
const remark = (formData[field.remarkKey] || '').trim()
if (!remark) {
wx.$util.showToast(`请填写${field.label}`)
return
}
}
}
const phoneRex = /^[1]([3-9])[0-9]{9}$/ const phoneRex = /^[1]([3-9])[0-9]{9}$/
if (!phoneRex.test(formData.phone)) { if (!phoneRex.test(formData.phone)) {
wx.$util.showToast("请输入正确的手机号") wx.$util.showToast("请输入正确的手机号")
...@@ -1132,17 +1190,21 @@ Page({ ...@@ -1132,17 +1190,21 @@ Page({
async confirm() { async confirm() {
let { formData, query } = this.data let { formData, query } = this.data
const submitData = { ...formData, evalOrderNo: query.evalOrderNo }
if (formData.paymentType == 2) { if (formData.paymentType == 2) {
delete formData.depositPrice delete submitData.depositPrice
delete formData.finalPrice delete submitData.finalPrice
} }
if (formData.signerType == 2) { if (formData.signerType == 2) {
delete formData.idCard delete submitData.idCard
}
if (Number(submitData.returnSummarySwitch) !== 1) {
submitData.returnSummaryRemark = ''
} }
wx.$util.showLoading('加载中') wx.$util.showLoading('加载中')
if (this.data.confirmFlag) return if (this.data.confirmFlag) return
this.setData({confirmFlag: true}) this.setData({confirmFlag: true})
newApi.evalOrderSignContract({ ...formData, evalOrderNo: query.evalOrderNo }).then(res => { newApi.evalOrderSignContract(submitData).then(res => {
wx.hideLoading() wx.hideLoading()
this.setData({confirmFlag: false}) this.setData({confirmFlag: false})
if (res.data.code == 0) { if (res.data.code == 0) {
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
"van-popup": "@vant/weapp/popup/index", "van-popup": "@vant/weapp/popup/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index", "van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-overlay": "@vant/weapp/overlay/index", "van-overlay": "@vant/weapp/overlay/index",
"van-icon": "@vant/weapp/icon/index" "van-icon": "@vant/weapp/icon/index",
"van-switch": "@vant/weapp/switch/index"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
\ No newline at end of file \ No newline at end of file
...@@ -201,6 +201,14 @@ page { ...@@ -201,6 +201,14 @@ page {
margin-right: 8rpx; margin-right: 8rpx;
} }
} }
&.switch-input-row {
flex-shrink: 0;
gap: 24rpx;
.switch-input-field {
width: 320rpx;
text-align: right;
}
}
} }
.form-textarea { .form-textarea {
margin-top: 16rpx; margin-top: 16rpx;
......
...@@ -197,9 +197,31 @@ ...@@ -197,9 +197,31 @@
<view class="form-item flex align-center justify-between"> <view class="form-item flex align-center justify-between">
<view class="form-label"> <view class="form-label">
{{item.label}} {{item.label}}
<text wx:if="{{item.required}}" class="requiredLabel">*</text> <text wx:if="{{item.type === 'switchInput' ? formData[item.switchKey] == 1 : item.required}}" class="requiredLabel">*</text>
</view>
<view wx:if="{{item.type === 'switchInput'}}" class="form-value switch-input-row flex align-center">
<van-switch
checked="{{formData[item.switchKey]}}"
active-value="{{1}}"
inactive-value="{{0}}"
active-color="#347BFF"
inactive-color="#D0D2D6"
size="24px"
bind:change="handleReturnSummarySwitchChange"
data-switch-key="{{item.switchKey}}"
/>
<input
wx:if="{{formData[item.switchKey] == 1}}"
value="{{formData[item.remarkKey]}}"
placeholder="{{item.placeholder || '请输入'}}"
placeholder-class="placeholder"
maxlength="{{item.maxlength}}"
bindinput="handleInput"
data-field="{{item.remarkKey}}"
class="form-input switch-input-field"
/>
</view> </view>
<view class="form-value"> <view wx:else class="form-value">
<input value="{{formData[item.key]}}" <input value="{{formData[item.key]}}"
placeholder="{{item.placeholder || '请输入'}}" placeholder="{{item.placeholder || '请输入'}}"
placeholder-class="placeholder" placeholder-class="placeholder"
...@@ -467,6 +489,10 @@ ...@@ -467,6 +489,10 @@
<view class="title-label-see">开户行</view> <view class="title-label-see">开户行</view>
<view>{{ formData.bankOfDeposit || '-' }}</view> <view>{{ formData.bankOfDeposit || '-' }}</view>
</view> </view>
<view class="flex align-center mb-24">
<view class="title-label-see">回单摘要</view>
<view>{{ formData.returnSummaryRemark || '-' }}</view>
</view>
<view class="flex {{formData.payerBankCardUrl ? 'mb-24' : ''}}" wx:if="{{formData.payerIdCardFrontUrl || formData.payerIdCardBackUrl}}"> <view class="flex {{formData.payerBankCardUrl ? 'mb-24' : ''}}" wx:if="{{formData.payerIdCardFrontUrl || formData.payerIdCardBackUrl}}">
<view class="title-label-see">身份证</view> <view class="title-label-see">身份证</view>
<view class="image-box" wx:if="{{formData.payerIdCardBackUrl}}"> <view class="image-box" wx:if="{{formData.payerIdCardBackUrl}}">
......
...@@ -547,9 +547,13 @@ Page({ ...@@ -547,9 +547,13 @@ Page({
? this.data.userInfo ? this.data.userInfo
: freshUserInfo) || {} : freshUserInfo) || {}
try { try {
const { orderObj } = this.data
const merchantId =
orderObj?.merchantId || userInfo?.shopMerchantId || ''
const res = await api.getUserScene({ const res = await api.getUserScene({
sceneType: String(userInfo.sceneType || ''), sceneType: String(userInfo.sceneType || ''),
phone: userInfo.phone phone: userInfo.phone,
merchantId
}) })
const list = const list =
res?.code == 0 && res?.data?.length ? res.data : [] res?.code == 0 && res?.data?.length ? res.data : []
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!