Commit 8fe2c02a by 李伟康

```

feat(equity): 统一函数名空格风格并新增权益单相关接口

将所有函数名后的括号前添加空格,统一代码风格。同时新增以下功能接口:
- 提交前检查车架号是否已购买
- 提交权益单
```
1 parent 508ec5ad
...@@ -2,7 +2,7 @@ import http from '../request/http' ...@@ -2,7 +2,7 @@ import http from '../request/http'
module.exports = { module.exports = {
/**新建车损报价单 */ /**新建车损报价单 */
quotationAdd(data) { quotationAdd (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add',
projectName: 'boutique', projectName: 'boutique',
...@@ -10,7 +10,7 @@ module.exports = { ...@@ -10,7 +10,7 @@ module.exports = {
}) })
}, },
/** 报价单支付订单生成(带上签名)返回订单号(商户地址) */ /** 报价单支付订单生成(带上签名)返回订单号(商户地址) */
quotationUpgrade(data) { quotationUpgrade (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.pay.order.generate', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.pay.order.generate',
projectName: 'boutique', projectName: 'boutique',
...@@ -18,7 +18,7 @@ module.exports = { ...@@ -18,7 +18,7 @@ module.exports = {
}) })
}, },
// 校验订单是否需要上传合同协议 // 校验订单是否需要上传合同协议
checkZyPayFlag(data) { checkZyPayFlag (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.check', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.check',
projectName: 'boutique', projectName: 'boutique',
...@@ -27,7 +27,7 @@ module.exports = { ...@@ -27,7 +27,7 @@ module.exports = {
}, },
// 查询店铺配置 // 查询店铺配置
getShopMerchantPointConfig(data) { getShopMerchantPointConfig (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.shopMerchantPointConfig.get', method: 'dj.api.smartcarlife.shopMerchantPointConfig.get',
projectName: 'boutique', projectName: 'boutique',
...@@ -36,7 +36,7 @@ module.exports = { ...@@ -36,7 +36,7 @@ module.exports = {
}, },
/** 查询报价单信息 */ /** 查询报价单信息 */
getQuotationInfoById(data) { getQuotationInfoById (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.find.by.id', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.find.by.id',
projectName: 'boutique', projectName: 'boutique',
...@@ -46,7 +46,7 @@ module.exports = { ...@@ -46,7 +46,7 @@ module.exports = {
/** /**
* 订单详情 * 订单详情
*/ */
getOrderDetail(data) { getOrderDetail (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.order.detail', method: 'dj.api.smartcarlife.order.detail',
projectName: 'boutique', projectName: 'boutique',
...@@ -54,7 +54,7 @@ module.exports = { ...@@ -54,7 +54,7 @@ module.exports = {
}) })
}, },
/**pos支付 */ /**pos支付 */
getPosQr(data) { getPosQr (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.payOrder.create', method: 'dj.api.smartcarlife.payOrder.create',
projectName: 'boutique', projectName: 'boutique',
...@@ -65,7 +65,7 @@ module.exports = { ...@@ -65,7 +65,7 @@ module.exports = {
* 查询门店录单设置 * 查询门店录单设置
}, },
*/ */
orderSettingList(data) { orderSettingList (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.order.field.setting.list', method: 'dj.api.smartcarlife.order.field.setting.list',
projectName: 'boutique', projectName: 'boutique',
...@@ -74,7 +74,7 @@ module.exports = { ...@@ -74,7 +74,7 @@ module.exports = {
}, },
/** 报价单分页列表 */ /** 报价单分页列表 */
quotationPage(data) { quotationPage (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page',
projectName: 'boutique', projectName: 'boutique',
...@@ -82,7 +82,7 @@ module.exports = { ...@@ -82,7 +82,7 @@ module.exports = {
}) })
}, },
/** 根据id查询报价单数据 */ /** 根据id查询报价单数据 */
getQuotationInfo(data) { getQuotationInfo (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.generate', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.generate',
projectName: 'boutique', projectName: 'boutique',
...@@ -90,7 +90,7 @@ module.exports = { ...@@ -90,7 +90,7 @@ module.exports = {
}) })
}, },
/** 修改车损报价单客户基本信息信息 */ /** 修改车损报价单客户基本信息信息 */
updateCustomerInfo(data) { updateCustomerInfo (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.base.info.update', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.base.info.update',
projectName: 'boutique', projectName: 'boutique',
...@@ -99,7 +99,7 @@ module.exports = { ...@@ -99,7 +99,7 @@ module.exports = {
}, },
/** 报价单订单分状态统计信息 */ /** 报价单订单分状态统计信息 */
orderStatistics(data) { orderStatistics (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics',
projectName: 'boutique', projectName: 'boutique',
...@@ -107,7 +107,7 @@ module.exports = { ...@@ -107,7 +107,7 @@ module.exports = {
}) })
}, },
// 查询订单是否支持状态变更 // 查询订单是否支持状态变更
getOrderRefundStep(data) { getOrderRefundStep (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.refundApplyRecord.isExist', method: 'dj.api.smartcarlife.refundApplyRecord.isExist',
projectName: 'boutique', projectName: 'boutique',
...@@ -115,7 +115,7 @@ module.exports = { ...@@ -115,7 +115,7 @@ module.exports = {
}) })
}, },
/**报价单-撤销工单 */ /**报价单-撤销工单 */
cancelOrderById(data) { cancelOrderById (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.quotation.cancel', method: 'dj.api.smartcarlife.quotation.cancel',
projectName: 'boutique', projectName: 'boutique',
...@@ -123,7 +123,7 @@ module.exports = { ...@@ -123,7 +123,7 @@ module.exports = {
}) })
}, },
// 车损报价单战败订单创建 // 车损报价单战败订单创建
defeatOrderCreate(data) { defeatOrderCreate (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add.defeat.order', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add.defeat.order',
projectName: 'boutique', projectName: 'boutique',
...@@ -131,7 +131,7 @@ module.exports = { ...@@ -131,7 +131,7 @@ module.exports = {
}) })
}, },
// 更新合同协议内容 // 更新合同协议内容
updateZyInfo(data) { updateZyInfo (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.update', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.update',
projectName: 'boutique', projectName: 'boutique',
...@@ -139,7 +139,7 @@ module.exports = { ...@@ -139,7 +139,7 @@ module.exports = {
}) })
}, },
/** 根据商户号商品id获取可选升级商品列表 */ /** 根据商户号商品id获取可选升级商品列表 */
quotationGoodsList(data) { quotationGoodsList (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.quotationGoods.list', method: 'dj.api.smartcarlife.quotationGoods.list',
projectName: 'boutique', projectName: 'boutique',
...@@ -148,14 +148,14 @@ module.exports = { ...@@ -148,14 +148,14 @@ module.exports = {
}, },
/** /**
* /** 修改车损报价单信息 */ * /** 修改车损报价单信息 */
updateQuotation(data) { updateQuotation (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.update', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.update',
projectName: 'boutique', projectName: 'boutique',
...data ...data
}) })
}, },
getCheckEmployeeList(data) { getCheckEmployeeList (data) {
// 0->2.0 1->1.1 2->1.2 3->1.3 场景对应 // 0->2.0 1->1.1 2->1.2 3->1.3 场景对应
// data.sceneList = [1] // data.sceneList = [1]
return http.post({ return http.post({
...@@ -166,7 +166,7 @@ module.exports = { ...@@ -166,7 +166,7 @@ module.exports = {
// return api.post("dj.api.smartcarlife.employee.getByMerchantId", data); // return api.post("dj.api.smartcarlife.employee.getByMerchantId", data);
}, },
/** 更新报价单状态 */ /** 更新报价单状态 */
updateOrderStatus(data) { updateOrderStatus (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.status.update', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.status.update',
projectName: 'boutique', projectName: 'boutique',
...@@ -178,7 +178,7 @@ module.exports = { ...@@ -178,7 +178,7 @@ module.exports = {
* 服务信息详情 * 服务信息详情
* *
*/ */
getServiceInfoDetail(data) { getServiceInfoDetail (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.detail', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.detail',
projectName: 'boutique', projectName: 'boutique',
...@@ -186,7 +186,7 @@ module.exports = { ...@@ -186,7 +186,7 @@ module.exports = {
}) })
}, },
/** 权益单分页列表 */ /** 权益单分页列表 */
equityPage(data) { equityPage (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.page', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.page',
projectName: 'boutique', projectName: 'boutique',
...@@ -194,7 +194,7 @@ module.exports = { ...@@ -194,7 +194,7 @@ module.exports = {
}) })
}, },
/** 权益单统计信息 */ /** 权益单统计信息 */
equityStatistics(data) { equityStatistics (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.statics', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.statics',
projectName: 'boutique', projectName: 'boutique',
...@@ -202,7 +202,7 @@ module.exports = { ...@@ -202,7 +202,7 @@ module.exports = {
}) })
}, },
// 更新客户签名 // 更新客户签名
updateCustomerNameUrlAPI(data) { updateCustomerNameUrlAPI (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.updateCustomerNameUrl', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.updateCustomerNameUrl',
projectName: 'boutique', projectName: 'boutique',
...@@ -210,7 +210,7 @@ module.exports = { ...@@ -210,7 +210,7 @@ module.exports = {
}) })
}, },
/** 查询合同*/ /** 查询合同*/
equityOrderList(data) { equityOrderList (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.listContracts', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.listContracts',
projectName: 'boutique', projectName: 'boutique',
...@@ -218,11 +218,31 @@ module.exports = { ...@@ -218,11 +218,31 @@ module.exports = {
}) })
}, },
/** 打印合同*/ /** 打印合同*/
printContract(data) { printContract (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.print', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.print',
projectName: 'boutique', projectName: 'boutique',
...data ...data
}) })
} },
/**
* 提交前检查车架号是否已购买
*/
checkVinBuyEquityOrder (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.vin.check',
projectName: 'boutique',
...data
}, true)
},
/**提交权益单
*
*/
addEquityOrder (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.add',
projectName: 'boutique',
...data
})
},
} }

2.94 MB | W: | H:

2.94 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -85,7 +85,11 @@ export default { ...@@ -85,7 +85,11 @@ export default {
watch: { watch: {
externalData: { externalData: {
handler (val) { handler (val) {
this.serviceInfo = val let { imgObj } = val
this.imgObj = {
retrofitInvoice: imgObj.retrofitInvoice || '',
retrofit: imgObj.retrofit || ''
}
}, },
deep: true, deep: true,
immediate: true immediate: true
...@@ -93,11 +97,8 @@ export default { ...@@ -93,11 +97,8 @@ export default {
}, },
data () { data () {
return { return {
serviceInfo: {},
viewKey: Date.now(), viewKey: Date.now(),
imgObj: { imgObj: {}
other: []
}
} }
}, },
mounted () { mounted () {
...@@ -109,12 +110,11 @@ export default { ...@@ -109,12 +110,11 @@ export default {
urls: Array.isArray(urls) ? urls : [urls], urls: Array.isArray(urls) ? urls : [urls],
}) })
}, },
delImage (key, index, isArray) { delImage (key) {
if (isArray) this.imgObj[key].splice(index, 1) this.imgObj[key] = ''
else this.imgObj[key] = ''
this.viewKey = Date.now() this.viewKey = Date.now()
}, },
async chooseImage (key, isArray) { async chooseImage (key) {
let _this = this let _this = this
try { try {
// #ifdef APP-PLUS // #ifdef APP-PLUS
...@@ -130,8 +130,7 @@ export default { ...@@ -130,8 +130,7 @@ export default {
async success (res) { async success (res) {
uni.showLoading({ title: '上传中...', mask: true }) uni.showLoading({ title: '上传中...', mask: true })
const url = await uploadFile(res.tempFiles[0], res.tempFilePaths[0]) const url = await uploadFile(res.tempFiles[0], res.tempFilePaths[0])
if (isArray) _this.imgObj[key].push(url) _this.imgObj[key] = url
else _this.imgObj[key] = url
_this.viewKey = Date.now() _this.viewKey = Date.now()
uni.hideLoading() uni.hideLoading()
}, },
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
class="equity-goods-box" class="equity-goods-box"
:key="viewKey" :key="viewKey"
> >
<template v-if="serviceInfo.goodInfoList && serviceInfo.goodInfoList.length"> <template v-if="goodInfoList && goodInfoList.length">
<template v-for="(item,index) in serviceInfo.goodInfoList"> <template v-for="(item,index) in goodInfoList">
<view <view
class="goods-item" class="goods-item"
:key="index" :key="index"
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
watch: { watch: {
externalData: { externalData: {
handler (val) { handler (val) {
this.serviceInfo = val this.goodInfoList = val.goodInfoList || []
}, },
deep: true, deep: true,
immediate: true immediate: true
...@@ -191,7 +191,7 @@ export default { ...@@ -191,7 +191,7 @@ export default {
extendServiceFormList, extendServiceFormList,
oilProFormList, oilProFormList,
cellBoxStyle: 'background: #f5f7fa;', cellBoxStyle: 'background: #f5f7fa;',
serviceInfo: {}, goodInfoList:[],
viewKey: Date.now(), viewKey: Date.now(),
currentData: {}, currentData: {},
popupType: 0, popupType: 0,
...@@ -203,7 +203,7 @@ export default { ...@@ -203,7 +203,7 @@ export default {
methods: { methods: {
inputBlur (e, item, index) { inputBlur (e, item, index) {
let { inputLimit, value: keyValue } = item, let { inputLimit, value: keyValue } = item,
value = this.serviceInfo.goodInfoList[index][keyValue] value = this.goodInfoList[index][keyValue]
if (inputLimit) { if (inputLimit) {
let { minVal, maxVal } = inputLimit let { minVal, maxVal } = inputLimit
if (maxVal) { if (maxVal) {
...@@ -248,12 +248,12 @@ export default { ...@@ -248,12 +248,12 @@ export default {
return flag return flag
}, },
updateFormValue (index, key, value) { updateFormValue (index, key, value) {
this.serviceInfo.goodInfoList[index][key] = value this.goodInfoList[index][key] = value
this.viewKey = Date.now() this.viewKey = Date.now()
}, },
changeDisplacementPower (index, value) { changeDisplacementPower (index, value) {
this.serviceInfo.goodInfoList[index].displacementPowerFlag = value this.goodInfoList[index].displacementPowerFlag = value
this.viewKey = Date.now() this.viewKey = Date.now()
}, },
onConfirm (val) { onConfirm (val) {
...@@ -261,15 +261,15 @@ export default { ...@@ -261,15 +261,15 @@ export default {
{ popupIndex } = this, { popupIndex } = this,
_typeValue = popupTypeEnum[popupType] _typeValue = popupTypeEnum[popupType]
if (_typeValue.options) { if (_typeValue.options) {
this.$set(this.serviceInfo.goodInfoList[popupIndex], _typeValue.targetIdKey, chooseContent[_typeValue.sourceIdKey || 'optionId']) this.$set(this.goodInfoList[popupIndex], _typeValue.targetIdKey, chooseContent[_typeValue.sourceIdKey || 'optionId'])
this.$set(this.serviceInfo.goodInfoList[popupIndex], _typeValue.targetNameKey, chooseContent[_typeValue.sourceNameKey || 'optionLabel']) this.$set(this.goodInfoList[popupIndex], _typeValue.targetNameKey, chooseContent[_typeValue.sourceNameKey || 'optionLabel'])
return return
} }
this.$set(this.serviceInfo.goodInfoList[popupIndex], _typeValue.value, chooseContent) this.$set(this.goodInfoList[popupIndex], _typeValue.value, chooseContent)
this.viewKey = Date.now() this.viewKey = Date.now()
}, },
handleCell (val, index) { handleCell (val, index) {
this.currentData = this.serviceInfo.goodInfoList[index] this.currentData = this.goodInfoList[index]
this.popupIndex = index this.popupIndex = index
this.popupType = Object.keys(popupTypeEnum).find(key => popupTypeEnum[key].key === val.key) * 1 this.popupType = Object.keys(popupTypeEnum).find(key => popupTypeEnum[key].key === val.key) * 1
this.$refs.orderPopup.open() this.$refs.orderPopup.open()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="equity-tire"> <view class="equity-tire">
<GlCell <GlCell
:formList="[formList]" :formList="[formList]"
:formData="serviceInfo" :formData="tireObj"
@handleLabelTips="handleLabelTips" @handleLabelTips="handleLabelTips"
> >
<template #tireHtml> <template #tireHtml>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<view class="content"> <view class="content">
<GlCell <GlCell
:formList="[i.list]" :formList="[i.list]"
:formData="serviceInfo" :formData="tireObj"
:index="index" :index="index"
:cellBoxStyle="cellBoxStyle" :cellBoxStyle="cellBoxStyle"
/> />
...@@ -57,14 +57,23 @@ export default { ...@@ -57,14 +57,23 @@ export default {
return { return {
formList: utils.deepClone(TIRE_FORM_LIST), formList: utils.deepClone(TIRE_FORM_LIST),
tireList: utils.deepClone(TIRE_LIST), tireList: utils.deepClone(TIRE_LIST),
serviceInfo: {},
cellBoxStyle: 'background: #f5f7fa;', cellBoxStyle: 'background: #f5f7fa;',
tireObj: {}
} }
}, },
watch: { watch: {
externalData: { externalData: {
handler (val) { handler (val) {
this.serviceInfo = val const keyList = [
'tireBrand', 'tireScale',
'leftFrontDTO', 'leftFrontBatch',
'rightFrontDTO', 'rightFrontBatch',
'leftRearDTO', 'leftRearBatch',
'rightRearDTO', 'rightRearBatch'
]
keyList.map(key => {
this.tireObj[key] = val[key]
})
}, },
deep: true, deep: true,
immediate: true immediate: true
......
...@@ -194,7 +194,14 @@ export default { ...@@ -194,7 +194,14 @@ export default {
watch: { watch: {
externalData: { externalData: {
handler (val) { handler (val) {
this.serviceInfo = val let { imgObj } = val
this.imgObj = {
invoice: imgObj.invoice || '',
driveFront: imgObj.driveFront || '',
driveBack: imgObj.driveBack || '',
contract: imgObj.contract || '',
other: imgObj.other || []
}
}, },
deep: true, deep: true,
immediate: true immediate: true
...@@ -202,11 +209,8 @@ export default { ...@@ -202,11 +209,8 @@ export default {
}, },
data () { data () {
return { return {
serviceInfo: {},
viewKey: Date.now(), viewKey: Date.now(),
imgObj: { imgObj: { }
other: []
}
} }
}, },
mounted () { mounted () {
......
...@@ -645,4 +645,242 @@ const EQUITY_POPUP_ENUM = { ...@@ -645,4 +645,242 @@ const EQUITY_POPUP_ENUM = {
} }
} }
export { FORM_LIST, popupTypeEnum, payTypeList, DEFEAT_FORM_LIST, titleList, UpdateOrderInfo, defeat_titleList, EQUITY_FORM_LIST, EQUITY_FORM_TITLE_LIST, EQUITY_POPUP_ENUM }
/**轮胎配置 */
const tireObjList = [
{
attr: 'leftFrontDTO',
sort: 0,
attributeGroup: 'tireDTONew',
attributeName: 'tireDTONew'
},
{
attr: 'rightFrontDTO',
sort: 1,
attributeGroup: 'tireDTONew',
attributeName: 'tireDTONew'
},
{
attr: 'leftRearDTO',
sort: 2,
attributeGroup: 'tireDTONew',
attributeName: 'tireDTONew'
},
{
attr: 'rightRearDTO',
sort: 3,
attributeGroup: 'tireDTONew',
attributeName: 'tireDTONew'
},
{
attr: 'leftFrontBatch',
sort: 0,
attributeGroup: 'tireBatchNew',
attributeName: 'tireBatchNew'
},
{
attr: 'rightFrontBatch',
sort: 1,
attributeGroup: 'tireBatchNew',
attributeName: 'tireBatchNew'
},
{
attr: 'leftRearBatch',
sort: 2,
attributeGroup: 'tireBatchNew',
attributeName: 'tireBatchNew'
},
{
attr: 'rightRearBatch',
sort: 3,
attributeGroup: 'tireBatchNew',
attributeName: 'tireBatchNew'
}
]
const EQUITY_FORM_RULE = {
vin: [
{ required: true, message: '车架号不能为空' },
{
validator: (rule, value) => {
// VIN 车架号格式校验:17位字符,支持大写 A-H/J-N/P-Z、0-9(排除 I、O、Q)
const VALID_VIN_REG = /^[A-HJ-NPR-Z0-9]{17}$/i
return VALID_VIN_REG.test(value) ? null : { message: '请输入 17 位有效字符(支持大写 A-H/J-N/P-Z、0-9)' }
}
}
],
seatesNum: [{ required: true, message: '座位数不能为空' }],
engineNo: [
{ required: true, message: '发动机号不能为空' },
{
validator: (rule, value) => {
return /^[a-zA-Z0-9]{6,16}$/.test(value) ? null : { message: '发动机号请输入6-16位数字和字母组合' }
}
}
],
vehicleColor: [{ required: true, message: '车身颜色不能为空' }],
billingDate: [{ required: true, message: '购车日期不能为空' }],
vehicleBrandId: [{ required: true, message: '品牌车系不能为空' }],
customerType: [{ required: true, message: '客户类型不能为空' }],
customerName: [{ required: true, message: '姓名不能为空' }],
customerPhone: [
{ required: true, message: '联系电话不能为空' },
{
validator: (rule, value) => {
return !data.phoneRex.test(value) ? { message: '请输入正确的手机号' } : null
}
}
],
cardNo: [
{ required: true, message: '证件号码不能为空' },
{
validator: (rule, value) => {
let reg = value.cardType == 1 || value.cardType == 2 ? /[a-zA-Z0-9]{18}/.test(value) : /\S\s{0,18}/.test(value)
let tip = value.cardType == 1 || value.cardType == 2 ? '证件号码请输入18位数字或字母' : '证件号码不能为空'
return reg ? null : { message: tip }
},
trigger: 'change'
}
],
customerAddress: [{ required: true, message: '联系地址不能为空' }],
effectiveDate: [{ required: true, message: '生效日期不能为空' }],
tireBrand: [{ required: true, message: '轮胎品牌不能为空' }],
tireScale: [{ required: true, message: '轮胎规格不能为空' }],
leftFrontDTO: [{ required: true, message: '左前胎DOT不能为空' }],
leftFrontBatch: [{ required: true, message: '左前胎生产批次不能为空' }],
rightFrontDTO: [{ required: true, message: '右前胎DOT不能为空' }],
rightFrontBatch: [{ required: true, message: '右前胎生产批次不能为空' }],
leftRearDTO: [{ required: true, message: '左后胎DOT不能为空' }],
leftRearBatch: [{ required: true, message: '左后胎生产批次不能为空' }],
rightRearDTO: [{ required: true, message: '右后胎DOT不能为空' }],
rightRearBatch: [{ required: true, message: '右后胎生产批次不能为空' }],
compensationName: [{ required: true, message: '第一受益人不能为空' }],
merchantPhone: [{ required: true, message: '联系电话不能为空' }],
merchantAddress: [{ required: true, message: '联系地址不能为空' }]
}
const energyFormRule = {
servicePeriod: [{ required: true, message: '服务年限不能为空' }],
vehicleRegistrationDate: [{ required: true, message: '车辆登记日期不能为空' }],
vehicleDisplacement: [
{ required: true, message: '车型排量不能为空' },
{
validator: (rule, value) => {
return /^\d+(\.\d{1,2})?$/.test(value) ? null : { message: '车型排量请输入仅有两位小数的数字' }
}
}
],
warrantyPeriod: [
{ required: true, message: '原厂质保年限不能为空' },
{
validator: (rule, value) => {
return /^\d+$/.test(value) ? null : { message: '原厂质保年限请输入整数' }
}
}
],
warrantyKm: [
{ required: true, message: '原厂质保里程数不能为空' },
{
validator: (rule, value) => {
return /^\d+(\.\d{1,2})?$/.test(value) ? null : { message: '原厂质保里程数请输入仅有两位小数的数字' }
}
}
],
mileage: [
{ required: true, message: '合同购买时里程数不能为空' },
{
validator: (rule, value) => {
return /^\d+(\.\d{1,2})?$/.test(value) ? null : { message: '合同购买时里程数请输入仅有两位小数的数字' }
}
}
]
}
const oilFormRule = {
servicePeriod: [{ required: true, message: '服务年限不能为空' }],
vehicleRegistrationDate: [{ required: true, message: '车辆登记日期不能为空' }],
vehicleNatureName: [{ required: true, message: '车辆使用性质不能为空' }],
gearbox: [{ required: true, message: '变速箱类型不能为空' }],
vehicleDisplacement: [
{ required: true, message: '车型排量不能为空' },
{
validator: (rule, value) => {
return /^\d+(\.\d{1,2})?$/.test(value) ? null : { message: '车型排量请输入仅有两位小数的数字' }
}
}
],
warrantyPeriod: [
{ required: true, message: '原厂质保年限不能为空' },
{
validator: (rule, value) => {
return /^\d+$/.test(value) ? null : { message: '原厂质保年限请输入整数' }
}
}
],
warrantyKm: [
{ required: true, message: '原厂质保里程数不能为空' },
{
validator: (rule, value) => {
return /^\d+(\.\d{1,2})?$/.test(value) ? null : { message: '原厂质保里程数请输入仅有两位小数的数字' }
}
}
],
mileage: [
{ required: true, message: '合同购买时里程数不能为空' },
{
validator: (rule, value) => {
return /^\d+(\.\d{1,2})?$/.test(value) ? null : { message: '合同购买时里程数请输入仅有两位小数的数字' }
}
}
]
}
const extendServiceFormRule = {
servicePeriod: [{ required: true, message: '服务年限不能为空' }],
displacementPowerValue: [
{ required: true, message: '排量或功率不能为空' },
{
validator: (rule, value) => {
return /^\d+(\.\d{1,2})?$/.test(value) ? null : { message: '排量或功率请输入仅有两位小数的数字' }
}
}
],
buyDate: [{ required: true, message: '购车发票日期不能为空' }],
qualityBeginDate: [{ required: true, message: '原厂质保开始日期不能为空' }],
warrantyPeriod: [
{ required: true, message: '原厂质保年限不能为空' },
{
validator: (rule, value) => {
return /^\d+$/.test(value) ? null : { message: '原厂质保年限请输入整数' }
}
}
],
warrantyKm: [
{ required: true, message: '原厂质保公里不能为空' },
{
validator: (rule, value) => {
return /^\d+(\.\d{1,2})?$/.test(value) ? null : { message: '原厂质保公里请输入仅有两位小数的数字' }
}
}
],
mileage: [
{ required: true, message: '合同购买时的公里数不能为空' },
{
validator: (rule, value) => {
return /^\d+(\.\d{1,2})?$/.test(value) ? null : { message: '合同购买时的公里数请输入仅有两位小数的数字' }
}
}
]
}
export {
FORM_LIST, popupTypeEnum, payTypeList,
DEFEAT_FORM_LIST, titleList, UpdateOrderInfo,
defeat_titleList, EQUITY_FORM_LIST, EQUITY_FORM_TITLE_LIST,
EQUITY_POPUP_ENUM, tireObjList, EQUITY_FORM_RULE,
energyFormRule,
oilFormRule,
extendServiceFormRule
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!