Commit d004a2f9 by zhangxw

权益提单优化需求开发

1 parent 10c83f18
......@@ -294,12 +294,12 @@
bind:delete="handleDeleteImg"
data-attr="invoice"
></van-uploader>
<view class="label">行驶证</view>
<view class="label">行驶证或车辆合格证</view>
<view class="flex">
<van-uploader
class="driveFront"
file-list="{{ imgObj.driveFront }}"
upload-text="行驶证主页"
upload-text="行驶证主页/车辆合格证"
max-count="1"
deletable
preview-size="var(--fontSize192)"
......@@ -310,7 +310,7 @@
<van-uploader
class="driveBack"
file-list="{{ imgObj.driveBack }}"
upload-text="行驶证副页"
upload-text="行驶证副页/车辆合格证"
max-count="1"
deletable
preview-size="var(--fontSize192)"
......
......@@ -301,7 +301,7 @@
}
.upload .van-uploader__upload-text {
font-size: var(--fontSize22) !important;
font-size: var(--fontSize20) !important;
color: #9B9B9E !important;
}
......
......@@ -39,6 +39,8 @@ Component({
*/
methods: {
handleClick() {
// 信息确认直接关闭弹窗
if (this.data.type == 'warning') return this.triggerEvent('close', {type: 'warning'})
this.triggerEvent('click')
},
handleClose() {
......
......@@ -3,8 +3,9 @@
<view class="bg" bindtap="handleShow" />
<view class="content">
<image wx:if="{{type == 'error'}}" class="icon" src="../../../image/icon-error.png" show-menu-by-longpress="{{true}}"></image>
<image wx:if="{{type == 'warning'}}" class="icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/order_warning.png" mode="" show-menu-by-longpress="{{true}}"/>
<image wx:else class="icon" src="../../../image/icon-success.png" show-menu-by-longpress="{{true}}"></image>
<view class="title">{{title}}</view>
<view class="title {{type == 'warning' ? 'warning_title' : ''}}">{{title}}</view>
<view class="tipTxt">{{tipTxt}}</view>
<view class="btn" bindtap="handleClick">{{btnTxt}}</view>
</view>
......
......@@ -49,6 +49,13 @@
color: #347BFF;
}
.warning_title {
text-align: center;
font-weight: 600;
font-size: var(--fontSize48);
color: #292D33;
}
.tipTxt {
font-size: 14px;
color: #9B9B9E;
......
......@@ -582,7 +582,11 @@ const secondObj = {
name: 'effectiveDate',
type: 'pickerTime',
start: Util.tsFormatTime(new Date(new Date().setDate(new Date(new Date()).getDate() + 1)), 'Y-M-D'),
haveArrow: true
haveArrow: true,
isShowObj: {
attr: 'allWarrantyFlag',
list: ['0']
}
// .toLocaleDateString().replace('/','-')
},
// {
......
......@@ -14,6 +14,12 @@ const errorObj = {
tipTxt: '',
btnTxt: '重新提单'
}
const warningObj = {
type: 'warning',
title: '信息确认',
tipTxt: '',
btnTxt: '继续出单'
}
Page({
/**
* 页面的初始数据
......@@ -195,9 +201,12 @@ Page({
data?.goodInfoList?.forEach(val => {
if (val.printType == 2 && !['YB0001', 'YB0002', 'YB0003'].includes(val.itemsCode)) val.displacementPowerFlag = val.displacementPowerFlag || 0 // 默认是选中排量
})
// 判断购买商品是否全部是延保allWarrantyFlag
const allWarrantyFlag = data?.goodInfoList?.some(v => v.printType != 2)
this.setData({
serviceInfo: data,
['serviceInfo.attachmentList']:data?.attachmentList||[],
['serviceInfo.allWarrantyFlag']: !allWarrantyFlag ? 1 : 0, // 0 显示生效日期 1不显示
step: data.mode ? 'second' : 'first'
})
this.dealTireObj()
......@@ -304,6 +313,10 @@ Page({
// 0草稿,1提单
params.operationType = typeObj[type]
params.addOnsFlag = serviceInfo.addOnsFlag==2?0:1
if (params?.allWarrantyFlag == 1) { // 全部为延保商品 不传生效日期
delete params.effectiveDate
}
delete params.allWarrantyFlag
console.log(params, '调接口---')
this.setData({
isAsk: true
......@@ -394,7 +407,7 @@ Page({
} else {
this.setData({
['conSecondObj.vin']: serviceInfo.vin,
dialogObj: JSON.parse(JSON.stringify(errorObj)),
dialogObj: res?.message?.includes('该车架已经购买过') ? JSON.parse(JSON.stringify(warningObj)) : JSON.parse(JSON.stringify(errorObj)),
['dialogObj.tipTxt']: res.message,
isDialogShow: true,
e: {}
......@@ -402,7 +415,7 @@ Page({
}
} else {
this.setData({
dialogObj: JSON.parse(JSON.stringify(errorObj)),
dialogObj: res?.message?.includes('该车架已经购买过') ? JSON.parse(JSON.stringify(warningObj)) : JSON.parse(JSON.stringify(errorObj)),
['dialogObj.tipTxt']: res.message,
isDialogShow: true,
e: {}
......@@ -413,11 +426,13 @@ Page({
},
handleSecondConfirm(e) {
console.log(e)
let { serviceInfo, conSecondObj, isAsk } = this.data
let { serviceInfo, conSecondObj, isAsk, noCheckVinFlag } = this.data
if (isAsk) {
return true
}
if (e.detail?.type == 'confirm') {
// 校验过车架号重复后,不再做确认,直接提交表单
if (noCheckVinFlag) return this.confirm(e)
this.setData({
secFormData: {
carVin: serviceInfo.vin
......@@ -455,6 +470,7 @@ Page({
this.setData({
isDialogShow: false
})
if (e.detail?.type == 'warning') return this.setData({noCheckVinFlag: true})
wx.$router.reLaunch('packageEquity.equityPage', { tabIndex: 2 })
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!