Commit 8fe2c02a by 李伟康

```

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

将所有函数名后的括号前添加空格,统一代码风格。同时新增以下功能接口:
- 提交前检查车架号是否已购买
- 提交权益单
```
1 parent 508ec5ad
......@@ -2,7 +2,7 @@ import http from '../request/http'
module.exports = {
/**新建车损报价单 */
quotationAdd(data) {
quotationAdd (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add',
projectName: 'boutique',
......@@ -10,7 +10,7 @@ module.exports = {
})
},
/** 报价单支付订单生成(带上签名)返回订单号(商户地址) */
quotationUpgrade(data) {
quotationUpgrade (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.pay.order.generate',
projectName: 'boutique',
......@@ -18,7 +18,7 @@ module.exports = {
})
},
// 校验订单是否需要上传合同协议
checkZyPayFlag(data) {
checkZyPayFlag (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.check',
projectName: 'boutique',
......@@ -27,7 +27,7 @@ module.exports = {
},
// 查询店铺配置
getShopMerchantPointConfig(data) {
getShopMerchantPointConfig (data) {
return http.post({
method: 'dj.api.smartcarlife.shopMerchantPointConfig.get',
projectName: 'boutique',
......@@ -36,7 +36,7 @@ module.exports = {
},
/** 查询报价单信息 */
getQuotationInfoById(data) {
getQuotationInfoById (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.find.by.id',
projectName: 'boutique',
......@@ -46,7 +46,7 @@ module.exports = {
/**
* 订单详情
*/
getOrderDetail(data) {
getOrderDetail (data) {
return http.post({
method: 'dj.api.smartcarlife.order.detail',
projectName: 'boutique',
......@@ -54,7 +54,7 @@ module.exports = {
})
},
/**pos支付 */
getPosQr(data) {
getPosQr (data) {
return http.post({
method: 'dj.api.smartcarlife.payOrder.create',
projectName: 'boutique',
......@@ -65,7 +65,7 @@ module.exports = {
* 查询门店录单设置
},
*/
orderSettingList(data) {
orderSettingList (data) {
return http.post({
method: 'dj.api.smartcarlife.order.field.setting.list',
projectName: 'boutique',
......@@ -74,7 +74,7 @@ module.exports = {
},
/** 报价单分页列表 */
quotationPage(data) {
quotationPage (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page',
projectName: 'boutique',
......@@ -82,7 +82,7 @@ module.exports = {
})
},
/** 根据id查询报价单数据 */
getQuotationInfo(data) {
getQuotationInfo (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.generate',
projectName: 'boutique',
......@@ -90,7 +90,7 @@ module.exports = {
})
},
/** 修改车损报价单客户基本信息信息 */
updateCustomerInfo(data) {
updateCustomerInfo (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.base.info.update',
projectName: 'boutique',
......@@ -99,7 +99,7 @@ module.exports = {
},
/** 报价单订单分状态统计信息 */
orderStatistics(data) {
orderStatistics (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics',
projectName: 'boutique',
......@@ -107,7 +107,7 @@ module.exports = {
})
},
// 查询订单是否支持状态变更
getOrderRefundStep(data) {
getOrderRefundStep (data) {
return http.post({
method: 'dj.api.smartcarlife.refundApplyRecord.isExist',
projectName: 'boutique',
......@@ -115,7 +115,7 @@ module.exports = {
})
},
/**报价单-撤销工单 */
cancelOrderById(data) {
cancelOrderById (data) {
return http.post({
method: 'dj.api.smartcarlife.quotation.cancel',
projectName: 'boutique',
......@@ -123,7 +123,7 @@ module.exports = {
})
},
// 车损报价单战败订单创建
defeatOrderCreate(data) {
defeatOrderCreate (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add.defeat.order',
projectName: 'boutique',
......@@ -131,7 +131,7 @@ module.exports = {
})
},
// 更新合同协议内容
updateZyInfo(data) {
updateZyInfo (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.update',
projectName: 'boutique',
......@@ -139,7 +139,7 @@ module.exports = {
})
},
/** 根据商户号商品id获取可选升级商品列表 */
quotationGoodsList(data) {
quotationGoodsList (data) {
return http.post({
method: 'dj.api.smartcarlife.quotationGoods.list',
projectName: 'boutique',
......@@ -148,14 +148,14 @@ module.exports = {
},
/**
* /** 修改车损报价单信息 */
updateQuotation(data) {
updateQuotation (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.update',
projectName: 'boutique',
...data
})
},
getCheckEmployeeList(data) {
getCheckEmployeeList (data) {
// 0->2.0 1->1.1 2->1.2 3->1.3 场景对应
// data.sceneList = [1]
return http.post({
......@@ -166,7 +166,7 @@ module.exports = {
// return api.post("dj.api.smartcarlife.employee.getByMerchantId", data);
},
/** 更新报价单状态 */
updateOrderStatus(data) {
updateOrderStatus (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.status.update',
projectName: 'boutique',
......@@ -178,7 +178,7 @@ module.exports = {
* 服务信息详情
*
*/
getServiceInfoDetail(data) {
getServiceInfoDetail (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.detail',
projectName: 'boutique',
......@@ -186,7 +186,7 @@ module.exports = {
})
},
/** 权益单分页列表 */
equityPage(data) {
equityPage (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.page',
projectName: 'boutique',
......@@ -194,7 +194,7 @@ module.exports = {
})
},
/** 权益单统计信息 */
equityStatistics(data) {
equityStatistics (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.statics',
projectName: 'boutique',
......@@ -202,7 +202,7 @@ module.exports = {
})
},
// 更新客户签名
updateCustomerNameUrlAPI(data) {
updateCustomerNameUrlAPI (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.updateCustomerNameUrl',
projectName: 'boutique',
......@@ -210,7 +210,7 @@ module.exports = {
})
},
/** 查询合同*/
equityOrderList(data) {
equityOrderList (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.listContracts',
projectName: 'boutique',
......@@ -218,11 +218,31 @@ module.exports = {
})
},
/** 打印合同*/
printContract(data) {
printContract (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.print',
projectName: 'boutique',
...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
})
},
}
......@@ -275,6 +275,10 @@
background-position: calc(100vmin * (1173 / 768) * -0.21994884910485935) calc(100vmin * (1173 / 768) * -0.4825234441602728);}
.icon-points { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646);
background-position: calc(100vmin * (1173 / 768) * -0.4884910485933504) calc(100vmin * (1173 / 768) * -0.6381074168797954);}
.icon-preview { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.5954816709292413) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-previewDownLoad { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.6155157715260017) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-promotion { width: calc(100vmin * (1173 / 768) * 0.020460358056265986); height: calc(100vmin * (1173 / 768) * 0.020460358056265986);
background-position: calc(100vmin * (1173 / 768) * -0.7020460358056266) calc(100vmin * (1173 / 768) * -0.252770673486786);}
.icon-prompt { width: calc(100vmin * (1173 / 768) * 0.10230179028132992); height: calc(100vmin * (1173 / 768) * 0.10230179028132992);
......@@ -298,9 +302,9 @@
.icon-rbkk-icon { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.1875532821824382) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-rear-gear { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.5954816709292413) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
background-position: calc(100vmin * (1173 / 768) * -0.6355498721227621) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-rear-window { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.6155157715260017) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
background-position: calc(100vmin * (1173 / 768) * -0.6555839727195226) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-reception-1 { width: calc(100vmin * (1173 / 768) * 0.020460358056265986); height: calc(100vmin * (1173 / 768) * 0.020460358056265986);
background-position: calc(100vmin * (1173 / 768) * -0.7020460358056266) calc(100vmin * (1173 / 768) * -0.30647911338448425);}
.icon-reception-2 { width: calc(100vmin * (1173 / 768) * 0.020460358056265986); height: calc(100vmin * (1173 / 768) * 0.020460358056265986);
......@@ -320,7 +324,7 @@
.icon-revokeOrder { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646);
background-position: calc(100vmin * (1173 / 768) * -0.5558397271952259) calc(100vmin * (1173 / 768) * -0.6381074168797954);}
.icon-right-arrow { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.6355498721227621) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
background-position: calc(100vmin * (1173 / 768) * -0.675618073316283) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-role-1 { width: calc(100vmin * (1173 / 768) * 0.028985507246376812); height: calc(100vmin * (1173 / 768) * 0.028985507246376812);
background-position: calc(100vmin * (1173 / 768) * -0.1483375959079284) calc(100vmin * (1173 / 768) * -0.6381074168797954);}
.icon-role-2 { width: calc(100vmin * (1173 / 768) * 0.028985507246376812); height: calc(100vmin * (1173 / 768) * 0.028985507246376812);
......@@ -328,9 +332,9 @@
.icon-rule { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.3371696504688832) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-scan { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.6555839727195226) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
background-position: calc(100vmin * (1173 / 768) * -0.6956521739130435) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-scanIcon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.675618073316283) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
background-position: calc(100vmin * (1173 / 768) * 0) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-scanIconX { width: calc(100vmin * (1173 / 768) * 0.02557544757033248); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.7020460358056266) calc(100vmin * (1173 / 768) * -0.17561807331628304);}
.icon-scene-0 { width: calc(100vmin * (1173 / 768) * 0.04092071611253197); height: calc(100vmin * (1173 / 768) * 0.04092071611253197);
......@@ -342,7 +346,7 @@
.icon-scene-active { width: calc(100vmin * (1173 / 768) * 0.0443307757885763); height: calc(100vmin * (1173 / 768) * 0.0443307757885763);
background-position: calc(100vmin * (1173 / 768) * -0.10144927536231885) calc(100vmin * (1173 / 768) * -0.5400682011935208);}
.icon-scene-change { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.6956521739130435) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
background-position: calc(100vmin * (1173 / 768) * -0.020034100596760442) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-scene { width: calc(100vmin * (1173 / 768) * 0.0443307757885763); height: calc(100vmin * (1173 / 768) * 0.0443307757885763);
background-position: calc(100vmin * (1173 / 768) * -0.15217391304347827) calc(100vmin * (1173 / 768) * -0.5400682011935208);}
.icon-search { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
......@@ -354,7 +358,7 @@
.icon-second-right { width: calc(100vmin * (1173 / 768) * 0.05456095481670929); height: calc(100vmin * (1173 / 768) * 0.04092071611253197);
background-position: calc(100vmin * (1173 / 768) * -0.48934356351236147) calc(100vmin * (1173 / 768) * -0.30008525149190113);}
.icon-seeIcon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * 0) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.040068201193520885) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-setting { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646);
background-position: calc(100vmin * (1173 / 768) * -0.5895140664961637) calc(100vmin * (1173 / 768) * -0.6381074168797954);}
.icon-short-first-nav { width: calc(100vmin * (1173 / 768) * 0.1773231031543052); height: calc(100vmin * (1173 / 768) * 0.0443307757885763);
......@@ -364,15 +368,15 @@
.icon-short-task-title { width: calc(100vmin * (1173 / 768) * 0.020460358056265986); height: calc(100vmin * (1173 / 768) * 0.020460358056265986);
background-position: calc(100vmin * (1173 / 768) * -0.7020460358056266) calc(100vmin * (1173 / 768) * -0.36018755328218244);}
.icon-sign_del { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.020034100596760442) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.06010230179028133) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-start-text { width: calc(100vmin * (1173 / 768) * 0.0733162830349531); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.4761295822676897) calc(100vmin * (1173 / 768) * -0.2659846547314578);}
.icon-stick-top-blue { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.040068201193520885) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.08013640238704177) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-stick-top { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.06010230179028133) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.10017050298380221) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-store-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.08013640238704177) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.12020460358056266) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-store { width: calc(100vmin * (1173 / 768) * 0.04092071611253197); height: calc(100vmin * (1173 / 768) * 0.04092071611253197);
background-position: calc(100vmin * (1173 / 768) * -0.6547314578005116) calc(100vmin * (1173 / 768) * -0.18925831202046037);}
.icon-study-active { width: calc(100vmin * (1173 / 768) * 0.0443307757885763); height: calc(100vmin * (1173 / 768) * 0.0443307757885763);
......@@ -388,9 +392,9 @@
.icon-suggestions-arrow { width: calc(100vmin * (1173 / 768) * 0.015345268542199489); height: calc(100vmin * (1173 / 768) * 0.015345268542199489);
background-position: calc(100vmin * (1173 / 768) * -0.47868712702472294) calc(100vmin * (1173 / 768) * -0.45865302642796246);}
.icon-suggestions-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.10017050298380221) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.1402387041773231) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-sun-roof { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.12020460358056266) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.16027280477408354) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-tag-checked { width: calc(100vmin * (1173 / 768) * 0.02557544757033248); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.7020460358056266) calc(100vmin * (1173 / 768) * -0.44075021312872975);}
.icon-task-pass { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
......@@ -398,11 +402,11 @@
.icon-tdcj-icon { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.25788576300085253) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-time-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.1402387041773231) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.18030690537084398) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-time { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.2813299232736573) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-tips-b { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.16027280477408354) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.20034100596760443) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-tips-g { width: calc(100vmin * (1173 / 768) * 0.020460358056265986); height: calc(100vmin * (1173 / 768) * 0.020460358056265986);
background-position: calc(100vmin * (1173 / 768) * -0.7020460358056266) calc(100vmin * (1173 / 768) * -0.38704177323103156);}
.icon-tips { width: calc(100vmin * (1173 / 768) * 0.03410059676044331); height: calc(100vmin * (1173 / 768) * 0.03410059676044331);
......@@ -416,7 +420,7 @@
.icon-topTipsRightIcon { width: calc(100vmin * (1173 / 768) * 0.06990622335890878); height: calc(100vmin * (1173 / 768) * 0.05115089514066496);
background-position: calc(100vmin * (1173 / 768) * -0.2855924978687127) calc(100vmin * (1173 / 768) * -0.20758738277919864);}
.icon-total { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.18030690537084398) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.22037510656436488) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-two-arrow { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.010230179028132993);
background-position: calc(100vmin * (1173 / 768) * -0.4279624893435635) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-up-arrow { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
......@@ -428,16 +432,12 @@
.icon-visible { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.32821824381926684) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-warning-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.20034100596760443) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.24040920716112532) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-work-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.22037510656436488) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.26044330775788577) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-ybtc_icon { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.3516624040920716) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-yw-icon { width: calc(100vmin * (1173 / 768) * 0.015345268542199489); height: calc(100vmin * (1173 / 768) * 0.015345268542199489);
background-position: calc(100vmin * (1173 / 768) * -0.5004262574595055) calc(100vmin * (1173 / 768) * -0.45865302642796246);}
.icon-zj-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.24040920716112532) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-preview { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.26044330775788577) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-previewDownLoad { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.2804774083546462) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
\ No newline at end of file

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
<template>
<view class="equity-box">
<view class="common-title">服务信息录入</view>
<view class="box">
<scroll-view
scroll-y
class="scroll-view"
>
<view
class="box-content"
:key="viewKey"
<template v-if="loadComplete">
<view class="box">
<scroll-view
scroll-y
class="scroll-view"
>
<GlCell
:formList="formList"
:formData="orderObj"
@inputBlur="inputBlur"
@handleCell="handleCell"
:titleList="titleList"
@collapseAll="collapseAll"
collapseControl
@radioChange="radioChange"
<view
class="box-content"
:key="viewKey"
>
<template #goodsHtml>
<EquityGoods
:externalData="orderObj"
ref="goodsRef"
/>
</template>
<template #tireHtml>
<template v-if="orderObj.tireFlag == 1">
<EquityTire
<GlCell
:formList="formList"
:formData="orderObj"
@inputBlur="inputBlur"
@handleCell="handleCell"
:titleList="titleList"
@collapseAll="collapseAll"
collapseControl
@radioChange="radioChange"
>
<template #goodsHtml>
<EquityGoods
:externalData="orderObj"
ref="goodsRef"
/>
</template>
<template #tireHtml>
<template v-if="orderObj.tireFlag == 1">
<EquityTire
:externalData="orderObj"
ref="tireRef"
/>
</template>
</template>
<template #uploadHtml>
<EquityUpload
:externalData="orderObj"
ref="tireRef"
ref="uplopdRef"
/>
</template>
</template>
<template #uploadHtml>
<EquityUpload ref="uplopdRef" />
</template>
<template #conversion>
<template v-if="orderObj.inclueType == 1">
<EquityConversion ref="conversionRef" />
<template #conversion>
<template v-if="orderObj.inclueType == 1">
<EquityConversion
:externalData="orderObj"
ref="conversionRef"
/>
</template>
</template>
</template>
</GlCell>
</GlCell>
</view>
<view class="btns flex">
<view
class="btn save"
@click="handleEditSave"
>存草稿</view>
<view
@click="submit"
class="btn"
>确认提交</view>
</view>
</scroll-view>
</view>
</view>
<view class="btns flex">
<view
class="btn save"
@click="handleEditSave"
>存草稿</view>
<view
@click="submit"
class="btn"
>确认提交</view>
</view>
</scroll-view>
</view>
</template>
<order-popup
ref="orderPopup"
:data="orderObj"
......@@ -81,13 +89,29 @@
:date="orderObj.effectiveDate"
showBottomBtn
/>
<NoticePopup
ref="reportNotice"
:title="noticeObj.title"
:text="noticeObj.text"
:type="noticeObj.type || 'success'"
:buttons="noticeObj.buttons"
></NoticePopup>
</view>
</template>
<script type='text/ecmascript-6'>
import utils from '@/utils/utils'
import { EQUITY_FORM_LIST, EQUITY_FORM_TITLE_LIST, EQUITY_POPUP_ENUM } from '../contant'
import {
EQUITY_FORM_LIST
, EQUITY_FORM_TITLE_LIST,
EQUITY_POPUP_ENUM,
tireObjList,
EQUITY_FORM_RULE,
energyFormRule,
oilFormRule,
extendServiceFormRule
} from '../contant'
import GlCell from '@/components/Form/GlCell.vue'
import OrderPopup from '@/components/OrderPopup/index.vue'
import dayjs from 'dayjs'
......@@ -96,7 +120,36 @@ import EquityTire from './EquityForm/EquityTire.vue'
import EquityUpload from './EquityForm/EquityUpload.vue'
import EquityConversion from './EquityForm/EquityConversion.vue'
import NP from 'number-precision'
import NoticePopup from '@/components/NoticePopup.vue'
const codeToAttr = {
YB0001: 'invoice',
YB0003: 'driveFront',
YB0004: 'driveBack',
YB0002: 'contract',
YB0005: 'other',
QS0001: 'retrofitInvoice',
QS0002: 'retrofit'
},
attrToCode = {
invoice: 'YB0001',
driveFront: 'YB0003',
driveBack: 'YB0004',
contract: 'YB0002',
other: 'YB0005',
retrofitInvoice: 'QS0001',
retrofit: 'QS0002'
},
ybAttachmentFlagTips = {
YB0001: '购车发票',
YB0003: '行驶证主页',
YB0004: '行驶证副页',
YB0002: '合同购买时里程数',
YB0005: '其他',
},
qsFlagTips = {
QS0001: '发票或收据',
QS0002: '加改装部位'
}
export default {
name: 'CreateEquity',
components: {
......@@ -105,20 +158,24 @@ export default {
EquityGoods,
EquityTire,
EquityUpload,
EquityConversion
EquityConversion,
NoticePopup
},
data () {
return {
formList: utils.deepClone(EQUITY_FORM_LIST),
titleList: utils.deepClone(EQUITY_FORM_TITLE_LIST),
endDate: dayjs().format('YYYY-MM-DD'),
equityFormRule: utils.deepClone(EQUITY_FORM_RULE),
orderObj: {
vehicleSeriesId: '',
goodInfoList: []
},
loadComplete: false,
popupType: 0,
viewKey: Date.now()
viewKey: Date.now(),
conSecondObj: {
vin: ''
},
noticeObj: {}
}
},
......@@ -128,7 +185,7 @@ export default {
}
},
mounted () {
this.getServiceInfoDetail()
this.getServiceInfoDetail('car995580848107536384')
},
methods: {
// 单选框change事件
......@@ -166,126 +223,152 @@ export default {
inputBlur (e, val) {
this.orderObj[val.value] = this.orderObj[val.value]
},
async getServiceInfoDetail () {
const data = await uni.$api.equityApi.getServiceInfoDetail({
contractNo: 'car994817154207522816'
})
if (data.ybAttachmentFlag != 0) this.formList[3] = []
if (data.qsFlag != 1) this.formList[4] = []
async getServiceInfoDetail (contractNo) {
try {
uni.showLoading({
title: '加载中...',
mask: true
})
const data = await uni.$api.equityApi.getServiceInfoDetail({
contractNo
})
if (!data) throw '获取数据失败'
if (data.ybAttachmentFlag != 0) this.formList[3] = []
if (data.qsFlag != 1) this.formList[4] = []
this.orderObj.goodInfoList = data.goodInfoList
this.orderObj.tireFlag = data.tireFlag
let carInfo = {},
params = {}
if (data.vehicleShapeId) {
carInfo = {
carBrandText: `${data.vehicleBrandName}/${data.vehicleSubBrandName}/${data.vehicleSeriesName}/${data.vehicleShapeName}`,
vehicleShapeId: data.vehicleShapeId,
vehicleShapeName: data.vehicleShapeName,
vehicleSeriesId: data.vehicleSeriesId,
vehicleSeriesName: data.vehicleSeriesName,
vehicleBrandId: data.vehicleBrandId,
vehicleBrandName: data.vehicleBrandName,
vehicleSubBrandId: data.vehicleSubBrandId,
vehicleSubBrandName: data.vehicleSubBrandName,
}
}
if (!data.customerType) data.customerType = 1
if (data.customerType) {
const customerTypeEnum = this.orderPopupRef.componentObject[21].options
params = {
customerType: data.customerType,
customerTypeName: customerTypeEnum.find(i => i.optionId == data.customerType).optionLabel
this.orderObj.goodInfoList = data.goodInfoList
this.orderObj.tireFlag = data.tireFlag
let carInfo = {},
params = {}
if (data.vehicleShapeId) {
carInfo = {
carBrandText: `${data.vehicleBrandName}/${data.vehicleSubBrandName}/${data.vehicleSeriesName}/${data.vehicleShapeName}`,
vehicleShapeId: data.vehicleShapeId,
vehicleShapeName: data.vehicleShapeName,
vehicleSeriesId: data.vehicleSeriesId,
vehicleSeriesName: data.vehicleSeriesName,
vehicleBrandId: data.vehicleBrandId,
vehicleBrandName: data.vehicleBrandName,
vehicleSubBrandId: data.vehicleSubBrandId,
vehicleSubBrandName: data.vehicleSubBrandName,
}
}
}
if (data.cardType) {
const cardTypeEnum = this.orderPopupRef.componentObject[22].options
params.cardType = data.cardType
params.cardTypeName = cardTypeEnum.find(i => i.optionId == data.cardType).optionLabel
}
if (data.buyCarType == null) data.buyCarType = 1
if (data.buyCarType != null) {
const buyCarTypeEnum = this.orderPopupRef.componentObject[23].options
params.buyCarType = data.buyCarType
params.buyCarTypeName = buyCarTypeEnum.find(i => i.optionId == data.buyCarType).optionLabel
}
let priceList = ['actualSalesPrice']
data.goodInfoList.map((item, idx) => {
priceList.forEach(k => {
data.goodInfoList[idx][k] = item[k] === null ? null : (item[k] / 100).toFixed(2)
})
if (item.vehicleRegistrationDate) {
item.vehicleRegistrationDate = dayjs(item.vehicleRegistrationDate).format('YYYY-MM-DD')
if (!data.customerType) data.customerType = 1
if (data.customerType) {
const customerTypeEnum = this.orderPopupRef.componentObject[21].options
params = {
customerType: data.customerType,
customerTypeName: customerTypeEnum.find(i => i.optionId == data.customerType).optionLabel
}
}
if (item.buyDate) {
item.buyDate = dayjs(item.buyDate).format('YYYY-MM-DD')
if (data.cardType) {
const cardTypeEnum = this.orderPopupRef.componentObject[22].options
params.cardType = data.cardType
params.cardTypeName = cardTypeEnum.find(i => i.optionId == data.cardType).optionLabel
}
if (item.qualityBeginDate) {
item.qualityBeginDate = dayjs(item.qualityBeginDate).format('YYYY-MM-DD')
if (data.buyCarType == null) data.buyCarType = 1
if (data.buyCarType != null) {
const buyCarTypeEnum = this.orderPopupRef.componentObject[23].options
params.buyCarType = data.buyCarType
params.buyCarTypeName = buyCarTypeEnum.find(i => i.optionId == data.buyCarType).optionLabel
}
if (item.itemsCode == 'YB0003') {
item.gearbox = item.gearbox || ''
item.vehicleNature = typeof item.vehicleNature == 'number' ? item.vehicleNature : 1
let val = constantData.vehicleNatureList.find(k => k.optionId == item.vehicleNature)
if (val) {
item.vehicleNatureName = val.optionLabel
let priceList = ['actualSalesPrice']
data.goodInfoList.map((item, idx) => {
priceList.forEach(k => {
data.goodInfoList[idx][k] = item[k] === null ? null : (item[k] / 100).toFixed(2)
})
if (item.vehicleRegistrationDate) {
item.vehicleRegistrationDate = dayjs(item.vehicleRegistrationDate).format('YYYY-MM-DD')
}
if (item.buyDate) {
item.buyDate = dayjs(item.buyDate).format('YYYY-MM-DD')
}
if (item.qualityBeginDate) {
item.qualityBeginDate = dayjs(item.qualityBeginDate).format('YYYY-MM-DD')
}
if (item.itemsCode == 'YB0003') {
item.gearbox = item.gearbox || ''
item.vehicleNature = typeof item.vehicleNature == 'number' ? item.vehicleNature : 1
let val = constantData.vehicleNatureList.find(k => k.optionId == item.vehicleNature)
if (val) {
item.vehicleNatureName = val.optionLabel
}
}
if (item.printType == 2 && !['YB0001', 'YB0002', 'YB0003'].includes(item.itemsCode)) item.displacementPowerFlag = item.displacementPowerFlag || 0
})
// 判断购买商品是否全部是延保allWarrantyFlag
const allWarrantyFlag = data?.goodInfoList?.some(v => v.printType != 2),
imgObj = {}
Object.keys(codeToAttr).map(key => {
if (codeToAttr[key] == 'other') imgObj[codeToAttr[key]] = []
else imgObj[codeToAttr[key]] = ''
})
this.formList.map(i => {
i.map(e => {
if (e.value == 'effectiveDate') e.hidden = !allWarrantyFlag //false 显示生效日期 true不显示
})
})
/**图片 */
if ((data.ybAttachmentFlag == 0 || data.qsFlag == 1) && data.attachmentList?.length) {
data.attachmentList.forEach(item => {
if (item.attachmentCode == 'YB0005') imgObj[codeToAttr[item.attachmentCode]].push(item.attachmentFile)
else imgObj[codeToAttr[item.attachmentCode]] = item.attachmentFile
})
}
if (item.printType == 2 && !['YB0001', 'YB0002', 'YB0003'].includes(item.itemsCode)) item.displacementPowerFlag = item.displacementPowerFlag || 0
})
// 判断购买商品是否全部是延保allWarrantyFlag
const allWarrantyFlag = data?.goodInfoList?.some(v => v.printType != 2),
codeToAttr = {
YB0001: 'invoice',
YB0003: 'driveFront',
YB0004: 'driveBack',
YB0002: 'contract',
YB0005: 'other',
QS0001: 'retrofitInvoice',
QS0002: 'retrofit'
},
imgObj = {}
this.formList.map(i => {
i.map(e => {
if (e.value == 'effectiveDate') e.hidden = !allWarrantyFlag //false 显示生效日期 true不显示
if (data.tireFlag == 0) {
const list = ['tireBrand', 'tireScale', 'leftFrontDTO', 'leftFrontBatch', 'rightFrontDTO', 'rightFrontBatch', 'leftRearDTO', 'leftRearBatch', 'rightRearDTO', 'rightRearBatch']
list.map(key => {
this.equityFormRule[key][0].required = false
})
}
/**轮胎 */
if (data.attributeList?.length) {
data.attributeList.map((e, idx) => {
if (e.attributeValue) data[tireObjList[idx].attr] = e.attributeValue
})
}
let inclueType = data.addOnsFlag == 0 ? 2 : 1
Object.assign(this.orderObj, {
...data,
vin: data.vin,
invoicePrice: NP.divide(data.invoicePrice || 0, 100).toFixed(2),
seatesNum: data.seatesNum,
engineNo: data.engineNo,
vehicleColor: data.vehicleColor,
billingDate: data.billingDate ? dayjs(data.billingDate).format('YYYY-MM-DD') : dayjs().format('YYYY-MM-DD'),
customerName: data.customerName,
customerPhone: data.customerPhone,
cardNo: data.cardNo,
customerAddress: data.customerAddress,
goodInfoList: data.goodInfoList,
effectiveDate: data.effectiveDate ? dayjs(data.effectiveDate).format('YYYY-MM-DD') : dayjs().add(1, 'day').format('YYYY-MM-DD'),
tireFlag: data.tireFlag,
compensationName: data.compensationName || data.customerName,
attachmentList: data.attachmentList || [],
merchantName: data.merchantName,
merchantPhone: data.merchantPhone,
merchantAddress: data.merchantAddress,
imgObj,
inclueType,
...carInfo,
...params
})
})
if ((data.ybAttachmentFlag == 0 || data.qsFlag == 1) && data.attachmentList?.length) {
data.attachmentList.forEach(item => {
imgObj[codeToAttr[item.attachmentCode]].push({ url: item.attachmentFile })
this.formList[4].map(e => {
if (e.value == 'inclueType') e.current = inclueType
})
console.log(JSON.parse(JSON.stringify(this.orderObj)))
this.viewKey = Date.now()
this.loadComplete = true
uni.hideLoading()
} catch (error) {
uni.hideLoading()
this.viewKey = Date.now()
this.loadComplete = true
if (error) uni.showToast({
title: error,
icon: 'none'
})
}
console.log(imgObj,'----')
Object.assign(this.orderObj, {
...data,
vin: data.vin,
invoicePrice: NP.divide(data.invoicePrice || 0, 100).toFixed(2),
seatesNum: data.seatesNum,
engineNo: data.engineNo,
vehicleColor: data.vehicleColor,
billingDate: data.billingDate || dayjs().format('YYYY-MM-DD'),
customerName: data.customerName,
customerPhone: data.customerPhone,
cardNo: data.cardNo,
customerAddress: data.customerAddress,
goodInfoList: data.goodInfoList,
effectiveDate: data.effectiveDate || dayjs().add(1, 'day').format('YYYY-MM-DD'),
tireFlag: data.tireFlag,
compensationName: data.compensationName || data.customerName,
attachmentList: data.attachmentList || [],
merchantName: data.merchantName,
merchantPhone: data.merchantPhone,
merchantAddress: data.merchantAddress,
imgObj,
inclueType: data.qsFlag == 1 ? 1 : '',
...carInfo,
...params
})
this.formList[4].map(e => {
if (e.value == 'inclueType') e.current = data.qsFlag == 1 ? 1 : ''
})
console.log(JSON.parse(JSON.stringify(this.orderObj)))
this.viewKey = Date.now()
},
collapseAll (index) {
this.titleList[index].collapseAll = !this.titleList[index].collapseAll
......@@ -293,15 +376,191 @@ export default {
confirmCalendar (e, key) {
this.orderObj[key] = e.fulldate
},
submit () {
const { orderObj } = this,
async submit () {
uni.showLoading({
title: '提交中...',
mask: true
})
const { orderObj, conSecondObj } = this,
{ goodsRef, tireRef, uplopdRef, conversionRef } = this.$refs
console.log(goodsRef, tireRef, uplopdRef, conversionRef)
let params = orderObj,
attachmentList = [],
attributeList = []
if (tireRef) {
let { tireObj } = tireRef
tireObjList.map(item => {
if (tireObj[item.attr]) {
attributeList.push({
attributeValue: tireObj[item.attr],
sort: item.sort,
attributeGroup: item.attributeGroup,
attributeName: item.attributeName
})
}
})
params.attributeList = attributeList
}
if (goodsRef) params.goodInfoList = goodsRef.goodInfoList
if (uplopdRef || conversionRef) {
let imgObj = {}
if (uplopdRef) imgObj = uplopdRef.imgObj
if (conversionRef) imgObj = {
...imgObj,
...conversionRef.imgObj
}
Object.keys(imgObj).map(key => {
if (Array.isArray(imgObj[key])) {
imgObj[key].map(item => {
attachmentList.push({
attachmentCode: attrToCode[key],
attachmentType: 'IMG',
attachmentFile: item
})
})
} else {
attachmentList.push({
attachmentCode: attrToCode[key],
attachmentType: 'IMG',
attachmentFile: imgObj[key]
})
}
})
}
params.invoicePrice = NP.times(params.invoicePrice, 100)
params.attachmentList = attachmentList
if (!this.checkOrder(params)) return uni.hideLoading()
const { code, message } = await uni.$api.equityApi.checkVinBuyEquityOrder({
vin: orderObj.vin
})
if (code == 0) {
this.confirm(params)
} else if (code == '-2') {
if (conSecondObj.vin == orderObj.vin) {
this.confirm(params)
this.conSecondObj.vin = ''
} else {
this.conSecondObj.vin = orderObj.vin
this.openNotice(message, params)
}
} else this.openNotice(message, params)
},
checkOrder (params) {
let { equityFormRule } = this
try {
Object.keys(equityFormRule).map(key => {
let [nullCheck, validatorCheck] = equityFormRule[key]
if (nullCheck.required) {
if (!params[key]) throw equityFormRule[key][0].message
} else {
if (validatorCheck && validatorCheck.validator) {
const res = validatorCheck.validator('', params[key])
console.log(res, key)
if (res && res.message) throw res.message
}
}
})
params.goodInfoList?.map(item => {
if (item.itemsCode == 'YB0003') Object.keys(oilFormRule).map(key => {
let [nullCheck, validatorCheck] = oilFormRule[key]
if (nullCheck.required) {
if (!item[key]) throw oilFormRule[key][0].message
else {
if (validatorCheck && validatorCheck.validator) {
const res = validatorCheck.validator('', item[key])
if (res && res.message) throw res.message
}
}
}
})
if (item.itemsCode == 'YB0001' || item.itemsCode == 'YB0002') Object.keys(energyFormRule).map(key => {
let [nullCheck, validatorCheck] = energyFormRule[key]
if (nullCheck.required) {
if (!item[key]) throw energyFormRule[key][0].message
} else {
if (validatorCheck && validatorCheck.validator) {
const res = validatorCheck.validator('', item[key])
if (res && res.message) throw res.message
}
}
})
if (item.itemsCode != 'YB0001' && item.itemsCode != 'YB0002' && item.itemsCode != 'YB0003') Object.keys(extendServiceFormRule).map(key => {
let [nullCheck, validatorCheck] = extendServiceFormRule[key]
if (nullCheck.required) {
if (!item[key]) throw extendServiceFormRule[key][0].message
} else {
if (validatorCheck && validatorCheck.validator) {
const res = validatorCheck.validator('', item[key])
if (res && res.message) throw res.message
}
}
})
})
if (params.ybAttachmentFlag == 0 || params.qsFlag == 1) {
if (params.ybAttachmentFlag == 0) {
params.attachmentList.map(e => {
let item = ybAttachmentFlagTips[e.attachmentCode]
if (e.attachmentCode != 'YB0005') {
if (!e.attachmentFile) throw `请上传${item}`
}
})
}
if (params.qsFlag == 0) {
params.attachmentList.map(e => {
let item = qsFlagTips[e.attachmentCode]
if (!e.attachmentFile) throw `请上传${item}`
})
}
}
} catch (error) {
console.log(error, '===')
uni.showToast({
title: error,
icon: 'none'
})
return false
}
return true
},
handleEditSave () {
}
},
async confirm (params) {
this.$refs.reportNotice.close()
console.log(params, '===')
const data = await uni.$api.equityApi.addEquityOrder(params)
console.log(data)
uni.hideLoading()
},
openNotice (message, params) {
uni.hideLoading()
let title = '出单失败',
btnText = '重新提单',
callbackFun = () => { }
if (message.includes('该车架已经购买过')) {
title = '信息确认'
btnText = '继续出单'
callbackFun = () => {
this.confirm(params)
}
}
this.noticeObj = {
title,
text: message,
type: 'warning',
buttons: [
{
text: btnText,
type: 'primary',
callback: callbackFun
}
]
}
this.$nextTick(() => this.$refs.reportNotice.open())
},
}
}
</script>
......
......@@ -85,7 +85,11 @@ export default {
watch: {
externalData: {
handler (val) {
this.serviceInfo = val
let { imgObj } = val
this.imgObj = {
retrofitInvoice: imgObj.retrofitInvoice || '',
retrofit: imgObj.retrofit || ''
}
},
deep: true,
immediate: true
......@@ -93,11 +97,8 @@ export default {
},
data () {
return {
serviceInfo: {},
viewKey: Date.now(),
imgObj: {
other: []
}
imgObj: {}
}
},
mounted () {
......@@ -109,12 +110,11 @@ export default {
urls: Array.isArray(urls) ? urls : [urls],
})
},
delImage (key, index, isArray) {
if (isArray) this.imgObj[key].splice(index, 1)
else this.imgObj[key] = ''
delImage (key) {
this.imgObj[key] = ''
this.viewKey = Date.now()
},
async chooseImage (key, isArray) {
async chooseImage (key) {
let _this = this
try {
// #ifdef APP-PLUS
......@@ -130,8 +130,7 @@ export default {
async success (res) {
uni.showLoading({ title: '上传中...', mask: true })
const url = await uploadFile(res.tempFiles[0], res.tempFilePaths[0])
if (isArray) _this.imgObj[key].push(url)
else _this.imgObj[key] = url
_this.imgObj[key] = url
_this.viewKey = Date.now()
uni.hideLoading()
},
......
......@@ -3,8 +3,8 @@
class="equity-goods-box"
:key="viewKey"
>
<template v-if="serviceInfo.goodInfoList && serviceInfo.goodInfoList.length">
<template v-for="(item,index) in serviceInfo.goodInfoList">
<template v-if="goodInfoList && goodInfoList.length">
<template v-for="(item,index) in goodInfoList">
<view
class="goods-item"
:key="index"
......@@ -176,7 +176,7 @@ export default {
watch: {
externalData: {
handler (val) {
this.serviceInfo = val
this.goodInfoList = val.goodInfoList || []
},
deep: true,
immediate: true
......@@ -191,7 +191,7 @@ export default {
extendServiceFormList,
oilProFormList,
cellBoxStyle: 'background: #f5f7fa;',
serviceInfo: {},
goodInfoList:[],
viewKey: Date.now(),
currentData: {},
popupType: 0,
......@@ -203,7 +203,7 @@ export default {
methods: {
inputBlur (e, item, index) {
let { inputLimit, value: keyValue } = item,
value = this.serviceInfo.goodInfoList[index][keyValue]
value = this.goodInfoList[index][keyValue]
if (inputLimit) {
let { minVal, maxVal } = inputLimit
if (maxVal) {
......@@ -248,12 +248,12 @@ export default {
return flag
},
updateFormValue (index, key, value) {
this.serviceInfo.goodInfoList[index][key] = value
this.goodInfoList[index][key] = value
this.viewKey = Date.now()
},
changeDisplacementPower (index, value) {
this.serviceInfo.goodInfoList[index].displacementPowerFlag = value
this.goodInfoList[index].displacementPowerFlag = value
this.viewKey = Date.now()
},
onConfirm (val) {
......@@ -261,15 +261,15 @@ export default {
{ popupIndex } = this,
_typeValue = popupTypeEnum[popupType]
if (_typeValue.options) {
this.$set(this.serviceInfo.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.targetIdKey, chooseContent[_typeValue.sourceIdKey || 'optionId'])
this.$set(this.goodInfoList[popupIndex], _typeValue.targetNameKey, chooseContent[_typeValue.sourceNameKey || 'optionLabel'])
return
}
this.$set(this.serviceInfo.goodInfoList[popupIndex], _typeValue.value, chooseContent)
this.$set(this.goodInfoList[popupIndex], _typeValue.value, chooseContent)
this.viewKey = Date.now()
},
handleCell (val, index) {
this.currentData = this.serviceInfo.goodInfoList[index]
this.currentData = this.goodInfoList[index]
this.popupIndex = index
this.popupType = Object.keys(popupTypeEnum).find(key => popupTypeEnum[key].key === val.key) * 1
this.$refs.orderPopup.open()
......
......@@ -2,7 +2,7 @@
<view class="equity-tire">
<GlCell
:formList="[formList]"
:formData="serviceInfo"
:formData="tireObj"
@handleLabelTips="handleLabelTips"
>
<template #tireHtml>
......@@ -24,7 +24,7 @@
<view class="content">
<GlCell
:formList="[i.list]"
:formData="serviceInfo"
:formData="tireObj"
:index="index"
:cellBoxStyle="cellBoxStyle"
/>
......@@ -57,14 +57,23 @@ export default {
return {
formList: utils.deepClone(TIRE_FORM_LIST),
tireList: utils.deepClone(TIRE_LIST),
serviceInfo: {},
cellBoxStyle: 'background: #f5f7fa;',
tireObj: {}
}
},
watch: {
externalData: {
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,
immediate: true
......
......@@ -194,7 +194,14 @@ export default {
watch: {
externalData: {
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,
immediate: true
......@@ -202,11 +209,8 @@ export default {
},
data () {
return {
serviceInfo: {},
viewKey: Date.now(),
imgObj: {
other: []
}
imgObj: { }
}
},
mounted () {
......
......@@ -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!