CRM_26-08-13#story#9187,服务商新增车辆规则调整
This commit is contained in:
@@ -18,6 +18,14 @@ export function saveVehicle(data){
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//车辆属性预判(行驶证OCR识别出车辆所有人后调用,命中服务商信息则锁定为自有车辆)
|
||||||
|
export function preJudgeVirtualVehicle(data){
|
||||||
|
return request({
|
||||||
|
url:'/supplierAppV2/dispatchApp/user/preJudgeVirtualVehicle',
|
||||||
|
method:'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
//提交审批车辆信息
|
//提交审批车辆信息
|
||||||
export function saveSupplierApproval(data){
|
export function saveSupplierApproval(data){
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -131,23 +131,29 @@
|
|||||||
<img class="startImg" src="@/assets/start.png" />
|
<img class="startImg" src="@/assets/start.png" />
|
||||||
<span>车辆属性</span>
|
<span>车辆属性</span>
|
||||||
</div>
|
</div>
|
||||||
<el-select
|
<div class="virtualVehicleField">
|
||||||
v-model="virtualVehicle"
|
<el-select
|
||||||
value-key="name"
|
v-model="virtualVehicle"
|
||||||
class="elSelect"
|
value-key="name"
|
||||||
collapse-tags="collapse-tags"
|
class="elSelect"
|
||||||
:disabled="vehicleInfoDisabled"
|
collapse-tags="collapse-tags"
|
||||||
placeholder="请选择" style="width: 55%"
|
:disabled="vehicleInfoDisabled || virtualVehicleLocked"
|
||||||
>
|
placeholder="请选择" style="width: 55%"
|
||||||
<el-option
|
|
||||||
v-for="item in virtualVehicleOptions"
|
|
||||||
:key="item.name"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
>
|
||||||
</el-option>
|
<el-option
|
||||||
</el-select>
|
v-for="item in virtualVehicleOptions"
|
||||||
|
:key="item.name"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<span class="matchRoleArrow" :class="{expanded: matchRoleExpand}"
|
||||||
|
@click="matchRoleExpand = !matchRoleExpand">▾</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="matchRoleExpand" class="matchRolePanel">
|
||||||
|
匹配角色:{{ virtualVehicleMatchRole || '—' }}
|
||||||
</div>
|
</div>
|
||||||
<div class="lineBot"></div>
|
<div class="lineBot"></div>
|
||||||
<div class="itemContent">
|
<div class="itemContent">
|
||||||
@@ -463,7 +469,7 @@
|
|||||||
import {formatDate1} from "@/utils/common"
|
import {formatDate1} from "@/utils/common"
|
||||||
import {myMixins} from "@/utils/myMixins"
|
import {myMixins} from "@/utils/myMixins"
|
||||||
import {vehicleTypeList,saveVehicle,getInfoById,supplierServiceTree, uploadImage, ocrHandler,
|
import {vehicleTypeList,saveVehicle,getInfoById,supplierServiceTree, uploadImage, ocrHandler,
|
||||||
userOperationPermissions,saveSupplierApproval} from "@/api/mine"
|
userOperationPermissions,saveSupplierApproval,preJudgeVirtualVehicle as preJudgeVirtualVehicleApi} from "@/api/mine"
|
||||||
import TwoCommonBtn from "@/components/twoBtnCommon.vue"
|
import TwoCommonBtn from "@/components/twoBtnCommon.vue"
|
||||||
import CellGroup from "@/components/cellGroup.vue";
|
import CellGroup from "@/components/cellGroup.vue";
|
||||||
export default {
|
export default {
|
||||||
@@ -515,6 +521,9 @@ export default {
|
|||||||
vehicleLicenseInfo: {},
|
vehicleLicenseInfo: {},
|
||||||
vehicleLicenseBackOcrFlag: false, // 行驶证副页 修改时默认不需要 ocr识别
|
vehicleLicenseBackOcrFlag: false, // 行驶证副页 修改时默认不需要 ocr识别
|
||||||
isMultiple: false, // 是否支持多选
|
isMultiple: false, // 是否支持多选
|
||||||
|
virtualVehicleLocked: false, // 车辆属性锁定(OCR所有人命中服务商信息时锁定为自有车辆)
|
||||||
|
virtualVehicleMatchRole: '', // 车辆属性自动判定命中的匹配角色
|
||||||
|
matchRoleExpand: false, // 匹配角色面板展开状态
|
||||||
vehicleLicense:'',//牌照
|
vehicleLicense:'',//牌照
|
||||||
vehicleFrontLicensePlate:'',//车头照车牌号码
|
vehicleFrontLicensePlate:'',//车头照车牌号码
|
||||||
insuranceCorp: '',
|
insuranceCorp: '',
|
||||||
@@ -1221,6 +1230,8 @@ export default {
|
|||||||
this.vehicleLicenseInfo.licensePlateNumber = frontInfo?.plateNo;
|
this.vehicleLicenseInfo.licensePlateNumber = frontInfo?.plateNo;
|
||||||
this.vehicleLicenseInfo.vehicleType = frontInfo?.vehicleType;
|
this.vehicleLicenseInfo.vehicleType = frontInfo?.vehicleType;
|
||||||
this.vehicleLicenseInfo.owner = frontInfo?.owner;
|
this.vehicleLicenseInfo.owner = frontInfo?.owner;
|
||||||
|
// 行驶证所有人识别成功后,预判车辆属性(命中服务商信息则锁定为自有车辆)
|
||||||
|
this.preJudgeVirtualVehicle();
|
||||||
this.vehicleLicenseInfo.address = frontInfo?.address;
|
this.vehicleLicenseInfo.address = frontInfo?.address;
|
||||||
this.vehicleLicenseInfo.useNature = frontInfo?.useCharacter;
|
this.vehicleLicenseInfo.useNature = frontInfo?.useCharacter;
|
||||||
this.vehicleLicenseInfo.model = frontInfo?.model;
|
this.vehicleLicenseInfo.model = frontInfo?.model;
|
||||||
@@ -1245,6 +1256,28 @@ export default {
|
|||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
|
// 车辆属性预判:行驶证所有人与车辆归属服务商的名称/法人/关联人员比对,命中自有则锁定选择器
|
||||||
|
async preJudgeVirtualVehicle() {
|
||||||
|
this.virtualVehicleLocked = false;
|
||||||
|
this.virtualVehicleMatchRole = '';
|
||||||
|
const owner = (this.vehicleLicenseInfo.owner || '').trim();
|
||||||
|
if (!owner) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const res = await preJudgeVirtualVehicleApi({
|
||||||
|
owner,
|
||||||
|
supplierId: this.supplierId || undefined // 车辆归属服务商ID,自录场景为空由后端取当前用户服务商
|
||||||
|
});
|
||||||
|
if (res?.data?.locked) {
|
||||||
|
this.virtualVehicleLocked = true;
|
||||||
|
this.virtualVehicleMatchRole = res.data.matchRole || '';
|
||||||
|
this.virtualVehicle = 1;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// 预判失败不影响保存,选择器保持可编辑
|
||||||
|
}
|
||||||
|
},
|
||||||
async vehicleBackOcrHandler() { // 行驶证副页 ocr 识别
|
async vehicleBackOcrHandler() { // 行驶证副页 ocr 识别
|
||||||
this.vehicleLicenseInfo.recordNumber = '';
|
this.vehicleLicenseInfo.recordNumber = '';
|
||||||
this.vehicleLicenseInfo.passengerCapacity = '';
|
this.vehicleLicenseInfo.passengerCapacity = '';
|
||||||
@@ -1323,6 +1356,9 @@ export default {
|
|||||||
});
|
});
|
||||||
this.auditStatus = result.auditStatus;
|
this.auditStatus = result.auditStatus;
|
||||||
this.virtualVehicle = result.virtualVehicle;
|
this.virtualVehicle = result.virtualVehicle;
|
||||||
|
// 车辆属性溯源:编辑场景初始化匹配角色,已是自有车辆且命中角色时锁定选择器
|
||||||
|
this.virtualVehicleMatchRole = result.virtualVehicleMatchRole || '';
|
||||||
|
this.virtualVehicleLocked = !!(result.virtualVehicleMatchRole && result.virtualVehicle === 1);
|
||||||
this.$refs.tree.setCheckedKeys(result.serviceIds)
|
this.$refs.tree.setCheckedKeys(result.serviceIds)
|
||||||
this.vehicleStatus = result.vehicleStatus
|
this.vehicleStatus = result.vehicleStatus
|
||||||
this.vehicleLicenseFront = result.vehicleLicenseFront;
|
this.vehicleLicenseFront = result.vehicleLicenseFront;
|
||||||
@@ -1894,6 +1930,34 @@ export default {
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
/* 车辆属性-匹配角色溯源 */
|
||||||
|
.virtualVehicleField {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
.matchRoleArrow {
|
||||||
|
margin-left: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #909399;
|
||||||
|
user-select: none;
|
||||||
|
display: inline-block;
|
||||||
|
transition: transform .2s;
|
||||||
|
&.expanded {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
color: #354D93;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.matchRolePanel {
|
||||||
|
margin: 0 25px 6px 0;
|
||||||
|
padding: 4px 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #606266;
|
||||||
|
background: #f4f4f5;
|
||||||
|
border-radius: 4px;
|
||||||
|
line-height: 1.6;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
.pop_wrap {
|
.pop_wrap {
|
||||||
width: 340px;
|
width: 340px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
Reference in New Issue
Block a user