Commit 4d38008c by 前端

Merge branch 'SAAS+V5.8.1' into 'develop'

上线合并

See merge request !528
2 parents cde24afe 5eeef210
...@@ -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)
} }
} }
...@@ -100,6 +100,13 @@ Component({ ...@@ -100,6 +100,13 @@ Component({
lifetimes: { lifetimes: {
async attached() { async attached() {
// 会员权益简版 mode=1:observer 只在 mode!=1 时注入 first/formRule,这里补上否则校验规则为空、客户来源等不生效
if (this.properties.mode == 1) {
this.setData({
first: data.firstObjSimple,
formRule: data.formRuleSimple
})
}
this.getEmployee() this.getEmployee()
this.getShopMerchantPointConfig() this.getShopMerchantPointConfig()
await this.prefillRecentScene() await this.prefillRecentScene()
...@@ -155,7 +162,8 @@ Component({ ...@@ -155,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 : []
......
...@@ -64,6 +64,8 @@ Page({ ...@@ -64,6 +64,8 @@ Page({
carSeriesId: "", carSeriesId: "",
carSeriesName: "", carSeriesName: "",
salesType: 0, salesType: 0,
// GLForm 客户来源展示用 labelName;仅有 salesType 无 label 时会显示「请选择」
salesTypeLabel: constantList.salesTypeList[0].optionLabel,
}, },
mode: 1, mode: 1,
quotationGoodsList: [], //权益商品列表 quotationGoodsList: [], //权益商品列表
...@@ -1977,6 +1979,15 @@ Page({ ...@@ -1977,6 +1979,15 @@ Page({
if ([0, 1, 2].includes(salesTypeNum)) { if ([0, 1, 2].includes(salesTypeNum)) {
owner.salesType = salesTypeNum; owner.salesType = salesTypeNum;
} }
const st = Number(owner.salesType);
const sid = [0, 1, 2].includes(st) ? st : 0;
const salesMatch = constantList.salesTypeList.find(
(item) => item.optionId === sid
);
owner.salesType = sid;
owner.salesTypeLabel =
(salesMatch && salesMatch.optionLabel) ||
constantList.salesTypeList[0].optionLabel;
this.setData({ this.setData({
owner, owner,
orderInfo, orderInfo,
......
...@@ -11,6 +11,7 @@ import { ...@@ -11,6 +11,7 @@ import {
errorOrderById, errorOrderById,
updateZyInfo, updateZyInfo,
getMoreBtnAPI, getMoreBtnAPI,
checkOrderCalimStatus,
} from "../../../api"; } from "../../../api";
import { checkDailyReport, checkStudyTask, checkAbnormalOrder } from "~/store/ModalToQueueControl"; import { checkDailyReport, checkStudyTask, checkAbnormalOrder } from "~/store/ModalToQueueControl";
import data from "../constant/data"; import data from "../constant/data";
...@@ -1037,6 +1038,15 @@ Component({ ...@@ -1037,6 +1038,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);
...@@ -1049,6 +1059,9 @@ Component({ ...@@ -1049,6 +1059,9 @@ Component({
if (abnormalOrderCheck) return false; if (abnormalOrderCheck) return false;
console.log(e.currentTarget.dataset, "e.currentTarget.dataset"); 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({
...@@ -1152,8 +1165,11 @@ Component({ ...@@ -1152,8 +1165,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,
...@@ -1257,7 +1273,7 @@ Component({ ...@@ -1257,7 +1273,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) {
...@@ -1266,11 +1282,17 @@ Component({ ...@@ -1266,11 +1282,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 "退款详情":
......
import { ImgUrl } from '~/config' import { ImgUrl } from '~/config'
import { getSelectOrderGoodsList, defeatOrderCreate } from '../../api' import { getSelectOrderGoodsList,quotationGoodsList, defeatOrderCreate } from '../../api'
import commonApi from '~/api/api' import commonApi from '~/api/api'
import NP from 'number-precision' import NP from 'number-precision'
import { checkStudyTask, checkAbnormalOrder } from '~/store/ModalToQueueControl' import { checkStudyTask, checkAbnormalOrder } from '~/store/ModalToQueueControl'
...@@ -297,11 +297,9 @@ Page({ ...@@ -297,11 +297,9 @@ Page({
return return
} }
wx.showLoading({ title: '加载中...' }) wx.showLoading({ title: '加载中...' })
getSelectOrderGoodsList({ quotationGoodsList({
merchantId: default4SStoreInfo.merchantId, merchantId: default4SStoreInfo.merchantId,
suitCarPrice: '', suitCarPrice: '',
seriesId: '',
sceneType: 0,
baseSceneCode baseSceneCode
}) })
.then(result => { .then(result => {
......
...@@ -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,7 +219,7 @@ Page({ ...@@ -217,7 +219,7 @@ Page({
targetObj: '', targetObj: '',
type: 'input', type: 'input',
maxlength: 36 maxlength: 36
} },
], ],
formFields3: [ formFields3: [
{ {
...@@ -236,7 +238,9 @@ Page({ ...@@ -236,7 +238,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 +280,19 @@ Page({ ...@@ -276,11 +280,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 +665,34 @@ Page({ ...@@ -653,9 +665,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 +1109,13 @@ Page({ ...@@ -1072,6 +1109,13 @@ Page({
return return
} }
} }
if (Number(formData.returnSummarySwitch) === 1) {
const remark = (formData.returnSummaryRemark || '').trim()
if (!remark) {
wx.$util.showToast('请填写回单摘要')
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 +1176,21 @@ Page({ ...@@ -1132,17 +1176,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,9 @@ page { ...@@ -201,6 +201,9 @@ page {
margin-right: 8rpx; margin-right: 8rpx;
} }
} }
&.switch-only-row {
flex-shrink: 0;
}
} }
.form-textarea { .form-textarea {
margin-top: 16rpx; margin-top: 16rpx;
...@@ -215,6 +218,36 @@ page { ...@@ -215,6 +218,36 @@ page {
} }
} }
} }
.return-summary {
padding: 28rpx 32rpx;
.return-summary-row {
width: 100%;
}
.return-summary-label {
color: #292D33;
.requiredLabel {
margin-left: 8rpx;
color: #F24724;
font-weight: 400;
}
}
.return-summary-input-wrap {
margin-top: 16rpx;
}
.return-summary-input-box {
width: 100%;
background: #f4f5f7;
border-radius: 16rpx;
padding: 24rpx;
box-sizing: border-box;
}
.return-summary-input {
width: 100%;
text-align: left;
height: 40rpx;
line-height: 40rpx;
}
}
.upload-container { .upload-container {
.form-item { .form-item {
background: #ffffff; background: #ffffff;
...@@ -374,6 +407,10 @@ page { ...@@ -374,6 +407,10 @@ page {
box-sizing: border-box; box-sizing: border-box;
font-size: 28rpx; font-size: 28rpx;
color: #292D33; color: #292D33;
.break-word {
word-break: break-all;
white-space: normal;
}
.mb-24 { .mb-24 {
margin-bottom: 24rpx; margin-bottom: 24rpx;
} }
......
...@@ -266,6 +266,40 @@ ...@@ -266,6 +266,40 @@
</view> </view>
</view> </view>
</view> </view>
<view class="box-radio" style="padding: 32rpx 0;">
<!-- 回单摘要 -->
<view class="return-summary">
<view class="return-summary-row flex align-center justify-between">
<view class="return-summary-label">
回单摘要
<text wx:if="{{formData.returnSummarySwitch == 1}}" class="requiredLabel">*</text>
</view>
<van-switch
checked="{{formData.returnSummarySwitch}}"
active-value="{{1}}"
inactive-value="{{0}}"
active-color="#347BFF"
inactive-color="#D0D2D6"
size="24px"
bind:change="handleReturnSummarySwitchChange"
data-switch-key="returnSummarySwitch"
/>
</view>
<view wx:if="{{formData.returnSummarySwitch == 1}}" class="return-summary-input-wrap">
<view class="return-summary-input-box">
<input
value="{{formData.returnSummaryRemark}}"
placeholder="请输入回单摘要"
placeholder-class="placeholder"
maxlength="35"
bindinput="handleInput"
data-field="returnSummaryRemark"
class="return-summary-input"
/>
</view>
</view>
</view>
</view>
<view class="box-radio" style="padding: 0;"> <view class="box-radio" style="padding: 0;">
<!-- 随车材料 --> <!-- 随车材料 -->
<view class="upload-container"> <view class="upload-container">
...@@ -467,6 +501,10 @@ ...@@ -467,6 +501,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 class="flex-1 break-word">{{ 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}}">
......
...@@ -226,6 +226,7 @@ Page({ ...@@ -226,6 +226,7 @@ Page({
}, },
input(e) { input(e) {
let { value } = e.detail let { value } = e.detail
value = wx.$util.replaceEmoji(value)
this.setData({ this.setData({
keyword: value keyword: value
}) })
......
...@@ -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 : []
......
...@@ -150,6 +150,7 @@ Page({ ...@@ -150,6 +150,7 @@ Page({
}, },
input(e) { input(e) {
let { value } = e.detail let { value } = e.detail
value = wx.$util.replaceEmoji(value)
this.setData({ this.setData({
keyword: value keyword: value
}) })
......
...@@ -178,6 +178,7 @@ Page({ ...@@ -178,6 +178,7 @@ Page({
}, },
input(e) { input(e) {
let { value } = e.detail let { value } = e.detail
value = wx.$util.replaceEmoji(value)
this.setData({ this.setData({
keyword: value keyword: value
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!