0.0
2 years ago
8 changed files with 1056 additions and 31 deletions
@ -0,0 +1,50 @@
|
||||
import request from '@/axios'; |
||||
|
||||
export const getList = (current, size, params) => { |
||||
return request({ |
||||
url: '/api/logpm-basicdata/vehicle/list', |
||||
method: 'get', |
||||
params: { |
||||
...params, |
||||
current, |
||||
size, |
||||
} |
||||
}) |
||||
} |
||||
|
||||
export const getDetail = (id) => { |
||||
return request({ |
||||
url: '/api/logpm-basicdata/vehicle/detail', |
||||
method: 'get', |
||||
params: { |
||||
id |
||||
} |
||||
}) |
||||
} |
||||
|
||||
export const remove = (ids) => { |
||||
return request({ |
||||
url: '/api/logpm-basicdata/vehicle/remove', |
||||
method: 'post', |
||||
params: { |
||||
ids, |
||||
} |
||||
}) |
||||
} |
||||
|
||||
export const add = (row) => { |
||||
return request({ |
||||
url: '/api/logpm-basicdata/vehicle/submit', |
||||
method: 'post', |
||||
data: row |
||||
}) |
||||
} |
||||
|
||||
export const update = (row) => { |
||||
return request({ |
||||
url: '/api/logpm-basicdata/vehicle/submit', |
||||
method: 'post', |
||||
data: row |
||||
}) |
||||
} |
||||
|
@ -0,0 +1,342 @@
|
||||
export default { |
||||
expand: false, |
||||
index: true, |
||||
border: true, |
||||
selection: true, |
||||
column: [ |
||||
{ |
||||
label: "主键", |
||||
prop: "id", |
||||
display: false, |
||||
hide: true, |
||||
}, |
||||
{ |
||||
label: "租户号", |
||||
prop: "tenantId", |
||||
display: false, |
||||
hide: true, |
||||
}, |
||||
{ |
||||
label: "创建人", |
||||
prop: "createUser", |
||||
display: false, |
||||
hide: true, |
||||
}, |
||||
{ |
||||
label: "创建时间", |
||||
prop: "createTime", |
||||
display: false, |
||||
hide: true, |
||||
}, |
||||
{ |
||||
label: "更新人", |
||||
prop: "updateUser", |
||||
display: false, |
||||
hide: true, |
||||
}, |
||||
{ |
||||
label: "更新时间", |
||||
prop: "updateTime", |
||||
display: false, |
||||
hide: true, |
||||
}, |
||||
{ |
||||
label: "状态", |
||||
prop: "status", |
||||
display: false, |
||||
hide: true, |
||||
}, |
||||
{ |
||||
label: "是否已删除;1-未删除,2-已删除", |
||||
prop: "isDeleted", |
||||
display: false, |
||||
hide: true, |
||||
}, |
||||
{ |
||||
label: "创建部门", |
||||
prop: "createDept", |
||||
display: false, |
||||
hide: true, |
||||
}, |
||||
{ |
||||
label: "车牌号", |
||||
prop: "vehicleNub", |
||||
search: true, |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "车辆来源", |
||||
prop: "vehicleSource", |
||||
search: true, |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "是否车头", |
||||
prop: "isHead", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "挂车类型", |
||||
prop: "trailerType", |
||||
search: true, |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "车辆类型", |
||||
prop: "vehicleModel", |
||||
search: true, |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "车厢类型", |
||||
prop: "carType", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "车长(M)", |
||||
prop: "vehicleCommander", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "外廓高(M)", |
||||
prop: "vehicleHeight", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "付款方式", |
||||
prop: "paymentMethod", |
||||
search: true, |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "核定体积", |
||||
prop: "approvedVolume", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "车牌颜色", |
||||
prop: "licensePlateColor", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "车身颜色", |
||||
prop: "vehicleColor", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "能源类型", |
||||
prop: "energyType", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "车牌类型", |
||||
prop: "licensePlateType", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "备注", |
||||
prop: "notes", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "车辆所属人", |
||||
prop: "vehicleOwner", |
||||
width:"120px" |
||||
}, |
||||
{ |
||||
label: "品牌型号", |
||||
prop: "vehicleBrand", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "车辆代号", |
||||
prop: "vehicleCode", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "发动机型号", |
||||
prop: "engineCode", |
||||
width:"120px" |
||||
}, |
||||
{ |
||||
label: "车辆总质量(T)", |
||||
prop: "vehicleQuality", |
||||
width:"120px" |
||||
}, |
||||
{ |
||||
label: "整备质量(T)", |
||||
prop: "curbWeight", |
||||
width:"120px" |
||||
}, |
||||
{ |
||||
label: "载荷质量(T)", |
||||
prop: "loadMass", |
||||
width:"120px" |
||||
}, |
||||
{ |
||||
label: "外廓宽(M)", |
||||
prop: "outerWidth", |
||||
width:"120px" |
||||
}, |
||||
{ |
||||
label: "到期时间", |
||||
prop: "expirationTime", |
||||
format: "yyyy-MM-dd", |
||||
valueFormat: "yyyy-MM-dd", |
||||
width:"120px" |
||||
}, |
||||
{ |
||||
label: "道路运输证号", |
||||
prop: "roadTransport", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "经营许可证号", |
||||
prop: "businessLicense", |
||||
width:"120px" |
||||
}, |
||||
{ |
||||
label: "车辆所属单位", |
||||
prop: "vehicleUnit", |
||||
width:"120px" |
||||
}, |
||||
{ |
||||
label: "车辆所属单位电话", |
||||
prop: "vehicleUnitPhone", |
||||
width:"180px" |
||||
}, |
||||
{ |
||||
label: "车辆所属人手机号", |
||||
prop: "vehicleOwnerPhone", |
||||
width:"180px" |
||||
}, |
||||
{ |
||||
label: "车辆所属人身份证号", |
||||
prop: "vehicleOwnerCard", |
||||
width:"180px" |
||||
}, |
||||
// {
|
||||
// label: "行驶证正面照片",
|
||||
// prop: "drivingLicensePhoto",
|
||||
// },
|
||||
// {
|
||||
// label: "行驶证照片反面",
|
||||
// prop: "drivingLicensePhotoBack",
|
||||
// },
|
||||
// {
|
||||
// label: "许可证照片",
|
||||
// prop: "licensePhoto",
|
||||
// },
|
||||
// {
|
||||
// label: "车辆照片(最新)",
|
||||
// prop: "vehiclePhoto",
|
||||
// },
|
||||
// {
|
||||
// label: "车尾照片",
|
||||
// prop: "vehicleRearPhoto",
|
||||
// },
|
||||
// {
|
||||
// label: "道路运输照片",
|
||||
// prop: "roadTransportPhoto",
|
||||
// },
|
||||
// {
|
||||
// label: "人车合影照片",
|
||||
// prop: "vehiclePeoplePhoto",
|
||||
// },
|
||||
// {
|
||||
// label: "保险卡照片",
|
||||
// prop: "insuranceCardPhoto",
|
||||
// },
|
||||
{ |
||||
label: "承运商", |
||||
prop: "carrierId", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "车辆年审时间", |
||||
prop: "reviewTime", |
||||
format: "yyyy-MM-dd", |
||||
valueFormat: "yyyy-MM-dd", |
||||
width:"150px" |
||||
}, |
||||
{ |
||||
label: "车辆年审有效期(月)", |
||||
prop: "reviewValidity", |
||||
width:"180px" |
||||
}, |
||||
{ |
||||
label: "车辆保险开始时间", |
||||
prop: "insuranceStartTime", |
||||
format: "yyyy-MM-dd", |
||||
valueFormat: "yyyy-MM-dd", |
||||
width:"180px" |
||||
}, |
||||
{ |
||||
label: "车辆保险结束时间", |
||||
prop: "insuranceEndTime", |
||||
format: "yyyy-MM-dd", |
||||
valueFormat: "yyyy-MM-dd", |
||||
width:"180px" |
||||
}, |
||||
{ |
||||
label: "有无车身广告", |
||||
prop: "bodyAdvertising", |
||||
width:"180px" |
||||
}, |
||||
{ |
||||
label: "车身广告跟新时间", |
||||
prop: "advertisementsNewTimes", |
||||
width:"180px" |
||||
}, |
||||
{ |
||||
label: "车辆挂靠公司", |
||||
prop: "vehicleParkingCompany", |
||||
width:"120px" |
||||
}, |
||||
{ |
||||
label: "是否有GPS", |
||||
prop: "withGps", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "GPS服务商", |
||||
prop: "gpsServiceProvider", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "GPS型号", |
||||
prop: "gpsModel", |
||||
width:"100px" |
||||
}, |
||||
{ |
||||
label: "预留1", |
||||
prop: "reserve1", |
||||
display: false, |
||||
hide: true, |
||||
}, |
||||
{ |
||||
label: "预留2", |
||||
prop: "reserve2", |
||||
display: false, |
||||
hide: true, |
||||
}, |
||||
{ |
||||
label: "预留3", |
||||
prop: "reserve3", |
||||
display: false, |
||||
hide: true, |
||||
}, |
||||
{ |
||||
label: "预留4", |
||||
prop: "reserve4", |
||||
display: false, |
||||
hide: true, |
||||
}, |
||||
{ |
||||
label: "预留5", |
||||
prop: "reserve5", |
||||
display: false, |
||||
hide: true, |
||||
}, |
||||
] |
||||
} |
@ -0,0 +1,562 @@
|
||||
<template> |
||||
<basic-container> |
||||
<div class="avue-crud"> |
||||
<el-row :hidden="!search" style="padding:6px 18px"> |
||||
<!-- 查询模块 --> |
||||
<el-form :inline="true" :model="query"> |
||||
<el-form-item label="车牌号:"> |
||||
<el-input v-model="query.vehicleNub" placeholder="请输入车牌号"></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="车辆来源:"> |
||||
<el-select v-model="query.vehicleSource" clearable placeholder="请选择车辆来源"> |
||||
<el-option |
||||
v-for="item in vehicleSourceData" |
||||
:key="item.dictKey" |
||||
:label="item.dictValue" |
||||
:value="item.dictKey"> |
||||
</el-option> |
||||
</el-select> |
||||
|
||||
</el-form-item> |
||||
<el-form-item label="挂车类型:"> |
||||
<el-select v-model="query.trailerType" clearable placeholder="请选择挂车类型"> |
||||
<el-option |
||||
v-for="item in trailerTypeData" |
||||
:key="item.dictKey" |
||||
:label="item.dictValue" |
||||
:value="item.dictKey"> |
||||
</el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
<el-form-item label="车辆类型:"> |
||||
<el-select v-model="query.vehicleModel" clearable placeholder="请选择车辆类型"> |
||||
<el-option |
||||
v-for="item in vehicleModelData" |
||||
:key="item.dictKey" |
||||
:label="item.dictValue" |
||||
:value="item.dictKey"> |
||||
</el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
<el-form-item label="付款方式:"> |
||||
<el-select v-model="query.paymentMethod" clearable placeholder="请选择付款方式"> |
||||
<el-option |
||||
v-for="item in paymentMethodData" |
||||
:key="item.dictKey" |
||||
:label="item.dictValue" |
||||
:value="item.dictKey"> |
||||
</el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
<!-- 查询按钮 --> |
||||
<el-form-item> |
||||
<el-button type="primary" icon="el-icon-search" @click="searchChange">搜 索</el-button> |
||||
<el-button icon="el-icon-delete" @click="searchReset()">清 空</el-button> |
||||
</el-form-item> |
||||
</el-form> |
||||
</el-row> |
||||
<el-row> |
||||
<div class="avue-crud__header"> |
||||
<!-- 头部左侧按钮模块 --> |
||||
<div class="avue-crud__left"> |
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新 增</el-button> |
||||
<el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain>删 除</el-button> |
||||
</div> |
||||
<!-- 头部右侧按钮模块 --> |
||||
<div class="avue-crud__right"> |
||||
<el-button icon="el-icon-refresh" @click="searchChange" circle></el-button> |
||||
<el-button icon="el-icon-search" @click="searchHide" circle></el-button> |
||||
</div> |
||||
</div> |
||||
</el-row> |
||||
<el-row> |
||||
<!-- 列表模块 --> |
||||
<el-table ref="table" v-loading="loading" |
||||
@selection-change="selectionChange" |
||||
:data="data" |
||||
:height="height" |
||||
style="width: 100%" |
||||
:border="option.border"> |
||||
<el-table-column type="selection" v-if="option.selection" width="55" align="center"></el-table-column> |
||||
<el-table-column type="expand" v-if="option.expand" align="center"></el-table-column> |
||||
<el-table-column v-if="option.index" label="序号" type="index" width="80" align="center"> |
||||
</el-table-column> |
||||
<template v-for="(item,index) in option.column"> |
||||
<!-- table字段 --> |
||||
<el-table-column v-if="item.hide!==true" |
||||
:prop="item.prop" |
||||
align="center" |
||||
:label="item.label" |
||||
:width="item.width" |
||||
:key="index"> |
||||
</el-table-column> |
||||
</template> |
||||
<!-- 操作栏模块 --> |
||||
<el-table-column prop="menu" label="操作" :width="220" align="center"> |
||||
<template #="{row}"> |
||||
<el-button type="primary" text icon="el-icon-view" @click="handleView(row)">查看</el-button> |
||||
<el-button type="primary" text icon="el-icon-edit" @click="handleEdit(row)">编辑</el-button> |
||||
<el-button type="primary" text icon="el-icon-delete" @click="rowDel(row)">删除</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
</el-row> |
||||
<el-row> |
||||
<div class="avue-crud__pagination" style="width:100%"> |
||||
<!-- 分页模块 --> |
||||
<el-pagination align="right" |
||||
background |
||||
@size-change="sizeChange" |
||||
@current-change="currentChange" |
||||
:current-page="page.currentPage" |
||||
:page-sizes="[10, 20, 30, 40, 50, 100]" |
||||
:page-size="page.pageSize" |
||||
layout="total, sizes, prev, pager, next, jumper" |
||||
:total="page.total"> |
||||
</el-pagination> |
||||
</div> |
||||
</el-row> |
||||
<!-- 表单模块 --> |
||||
<el-dialog :title="title" |
||||
v-model="box" |
||||
width="50%" |
||||
:before-close="beforeClose" |
||||
append-to-body> |
||||
<el-form :disabled="view" ref="form" :model="form" label-width="80px"> |
||||
|
||||
|
||||
<!-- 表单字段 --> |
||||
<el-row> |
||||
<el-col :span="11"> |
||||
<el-form-item label="车牌号" prop="vehicleNub"> |
||||
<el-input v-model="form.vehicleNub" placeholder="请输入车牌号"/> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="12"> |
||||
<el-form-item label="车辆来源" prop="vehicleSource"> |
||||
<el-select v-model="form.vehicleSource" clearable placeholder="请选择车辆来源" style="position: absolute;right: 0px;width: 100%"> |
||||
<el-option |
||||
v-for="item in vehicleSourceData" |
||||
:key="item.dictKey" |
||||
:label="item.dictValue" |
||||
:value="item.dictKey"> |
||||
</el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-row> |
||||
|
||||
<el-row> |
||||
<el-col :span="11"> |
||||
<el-form-item label="是否车头" prop="isHead"> |
||||
<el-select v-model="form.isHead" clearable placeholder="请选择车辆来源" style="position: absolute;right: 0px;width: 100%"> |
||||
<el-option |
||||
v-for="item in isHeadData" |
||||
:key="item.dictKey" |
||||
:label="item.dictValue" |
||||
:value="item.dictKey"> |
||||
</el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="12"> |
||||
= |
||||
<el-form-item label="挂车类型" prop="trailerType"> |
||||
<!-- <el-input v-model="form.trailerType" placeholder="请输入挂车类型;1-独享,2-共享"/>--> |
||||
<el-select v-model="form.trailerType" clearable placeholder="请选择挂车类型" style="position: absolute;right: 0px;width: 100%"> |
||||
<el-option |
||||
v-for="item in trailerTypeData" |
||||
:key="item.dictKey" |
||||
:label="item.dictValue" |
||||
:value="item.dictKey"> |
||||
</el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-row> |
||||
|
||||
<el-row> |
||||
<el-col :span="11"> |
||||
<el-form-item label="车辆类型" prop="vehicleModel"> |
||||
<el-select v-model="form.vehicleModel" clearable placeholder="请选择车辆类型" style="position: absolute;right: 0px;width: 100%"> |
||||
<el-option |
||||
v-for="item in vehicleModelData" |
||||
:key="item.dictKey" |
||||
:label="item.dictValue" |
||||
:value="item.dictKey"> |
||||
</el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="12"> |
||||
<el-form-item label="车厢类型" prop="carType"> |
||||
<el-select v-model="form.carType" clearable placeholder="请选择车厢类型" style="position: absolute;right: 0px;width: 100%"> |
||||
<el-option |
||||
v-for="item in carTypeData" |
||||
:key="item.dictKey" |
||||
:label="item.dictValue" |
||||
:value="item.dictKey"> |
||||
</el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-row> |
||||
|
||||
|
||||
|
||||
<el-form-item label="车长" prop="vehicleCommander"> |
||||
<el-input v-model="form.vehicleCommander" placeholder="请输入车长;单位(M)"/> |
||||
</el-form-item> |
||||
<el-form-item label="外廓高" prop="vehicleHeight"> |
||||
<el-input v-model="form.vehicleHeight" placeholder="请输入外廓高"/> |
||||
</el-form-item> |
||||
<el-form-item label="付款方式" prop="paymentMethod"> |
||||
<el-input v-model="form.paymentMethod" placeholder="请输入付款方式;1-现付,2-月付,3-到付"/> |
||||
</el-form-item> |
||||
<el-form-item label="核定体积" prop="approvedVolume"> |
||||
<el-input v-model="form.approvedVolume" placeholder="请输入核定体积"/> |
||||
</el-form-item> |
||||
<el-form-item label="车牌颜色" prop="licensePlateColor"> |
||||
<el-input v-model="form.licensePlateColor" placeholder="请输入车牌颜色;1-黄色,2-蓝色,3-绿色,4-蓝绿色,5-其他"/> |
||||
</el-form-item> |
||||
<el-form-item label="车身颜色" prop="vehicleColor"> |
||||
<el-input v-model="form.vehicleColor" placeholder="请输入车身颜色;1-红,2-黄,3-蓝,4-黑,5-白,6-银"/> |
||||
</el-form-item> |
||||
<el-form-item label="能源类型" prop="energyType"> |
||||
<el-input v-model="form.energyType" placeholder="请输入能源类型;1-汽油,2-柴油,3-电,4-天然气,5-混合油,6-燃化石油气,7-甲醇"/> |
||||
</el-form-item> |
||||
<el-form-item label="车牌类型" prop="licensePlateType"> |
||||
<el-input v-model="form.licensePlateType" placeholder="请输入车牌类型;1-大型汽车号牌,2-小型汽车号牌"/> |
||||
</el-form-item> |
||||
<el-form-item label="备注" prop="notes"> |
||||
<el-input v-model="form.notes" placeholder="请输入备注"/> |
||||
</el-form-item> |
||||
<el-form-item label="车辆所属人" prop="vehicleOwner"> |
||||
<el-input v-model="form.vehicleOwner" placeholder="请输入车辆所属人"/> |
||||
</el-form-item> |
||||
<el-form-item label="品牌型号" prop="vehicleBrand"> |
||||
<el-input v-model="form.vehicleBrand" placeholder="请输入品牌型号"/> |
||||
</el-form-item> |
||||
<el-form-item label="车辆代号" prop="vehicleCode"> |
||||
<el-input v-model="form.vehicleCode" placeholder="请输入车辆代号"/> |
||||
</el-form-item> |
||||
<el-form-item label="发动机型号" prop="engineCode"> |
||||
<el-input v-model="form.engineCode" placeholder="请输入发动机型号"/> |
||||
</el-form-item> |
||||
<el-form-item label="车辆总质量" prop="vehicleQuality"> |
||||
<el-input v-model="form.vehicleQuality" placeholder="请输入车辆总质量;单位(T)"/> |
||||
</el-form-item> |
||||
<el-form-item label="整备质量" prop="curbWeight"> |
||||
<el-input v-model="form.curbWeight" placeholder="请输入整备质量;单位(T)"/> |
||||
</el-form-item> |
||||
<el-form-item label="载荷质量" prop="loadMass"> |
||||
<el-input v-model="form.loadMass" placeholder="请输入载荷质量;单位(T)"/> |
||||
</el-form-item> |
||||
<el-form-item label="外廓宽" prop="outerWidth"> |
||||
<el-input v-model="form.outerWidth" placeholder="请输入外廓宽;单位(M)"/> |
||||
</el-form-item> |
||||
<el-form-item label="到期时间" prop="expirationTime"> |
||||
<el-input v-model="form.expirationTime" placeholder="请输入到期时间"/> |
||||
</el-form-item> |
||||
<el-form-item label="道路运输证号" prop="roadTransport"> |
||||
<el-input v-model="form.roadTransport" placeholder="请输入道路运输证号"/> |
||||
</el-form-item> |
||||
<el-form-item label="经营许可证号" prop="businessLicense"> |
||||
<el-input v-model="form.businessLicense" placeholder="请输入经营许可证号"/> |
||||
</el-form-item> |
||||
<el-form-item label="车辆所属单位" prop="vehicleUnit"> |
||||
<el-input v-model="form.vehicleUnit" placeholder="请输入车辆所属单位"/> |
||||
</el-form-item> |
||||
<el-form-item label="车辆所属单位电话" prop="vehicleUnitPhone"> |
||||
<el-input v-model="form.vehicleUnitPhone" placeholder="请输入车辆所属单位电话"/> |
||||
</el-form-item> |
||||
<el-form-item label="车辆所属人手机号" prop="vehicleOwnerPhone"> |
||||
<el-input v-model="form.vehicleOwnerPhone" placeholder="请输入车辆所属人手机号"/> |
||||
</el-form-item> |
||||
<el-form-item label="车辆所属人身份证号" prop="vehicleOwnerCard"> |
||||
<el-input v-model="form.vehicleOwnerCard" placeholder="请输入车辆所属人身份证号"/> |
||||
</el-form-item> |
||||
<el-form-item label="行驶证正面照片" prop="drivingLicensePhoto"> |
||||
<el-input v-model="form.drivingLicensePhoto" placeholder="请输入行驶证正面照片"/> |
||||
</el-form-item> |
||||
<el-form-item label="行驶证照片反面" prop="drivingLicensePhotoBack"> |
||||
<el-input v-model="form.drivingLicensePhotoBack" placeholder="请输入行驶证照片反面"/> |
||||
</el-form-item> |
||||
<el-form-item label="许可证照片" prop="licensePhoto"> |
||||
<el-input v-model="form.licensePhoto" placeholder="请输入许可证照片"/> |
||||
</el-form-item> |
||||
<el-form-item label="车辆照片(最新)" prop="vehiclePhoto"> |
||||
<el-input v-model="form.vehiclePhoto" placeholder="请输入车辆照片(最新)"/> |
||||
</el-form-item> |
||||
<el-form-item label="车尾照片" prop="vehicleRearPhoto"> |
||||
<el-input v-model="form.vehicleRearPhoto" placeholder="请输入车尾照片"/> |
||||
</el-form-item> |
||||
<el-form-item label="道路运输照片" prop="roadTransportPhoto"> |
||||
<el-input v-model="form.roadTransportPhoto" placeholder="请输入道路运输照片"/> |
||||
</el-form-item> |
||||
<el-form-item label="人车合影照片" prop="vehiclePeoplePhoto"> |
||||
<el-input v-model="form.vehiclePeoplePhoto" placeholder="请输入人车合影照片"/> |
||||
</el-form-item> |
||||
<el-form-item label="保险卡照片" prop="insuranceCardPhoto"> |
||||
<el-input v-model="form.insuranceCardPhoto" placeholder="请输入保险卡照片"/> |
||||
</el-form-item> |
||||
<el-form-item label="关联承运商Id" prop="carrierId"> |
||||
<el-input v-model="form.carrierId" placeholder="请输入关联承运商Id"/> |
||||
</el-form-item> |
||||
<el-form-item label="车辆年审时间" prop="reviewTime"> |
||||
<el-input v-model="form.reviewTime" placeholder="请输入车辆年审时间"/> |
||||
</el-form-item> |
||||
<el-form-item label="车辆年审有效期" prop="reviewValidity"> |
||||
<el-input v-model="form.reviewValidity" placeholder="请输入车辆年审有效期"/> |
||||
</el-form-item> |
||||
<el-form-item label="车辆保险开始时间" prop="insuranceStartTime"> |
||||
<el-input v-model="form.insuranceStartTime" placeholder="请输入车辆保险开始时间"/> |
||||
</el-form-item> |
||||
<el-form-item label="车辆保险结束时间" prop="insuranceEndTime"> |
||||
<el-input v-model="form.insuranceEndTime" placeholder="请输入车辆保险结束时间"/> |
||||
</el-form-item> |
||||
<el-form-item label="有无车身广告" prop="bodyAdvertising"> |
||||
<el-input v-model="form.bodyAdvertising" placeholder="请输入有无车身广告"/> |
||||
</el-form-item> |
||||
<el-form-item label="车身广告跟新时间" prop="advertisementsNewTimes"> |
||||
<el-input v-model="form.advertisementsNewTimes" placeholder="请输入车身广告跟新时间"/> |
||||
</el-form-item> |
||||
<el-form-item label="车辆挂靠公司" prop="vehicleParkingCompany"> |
||||
<el-input v-model="form.vehicleParkingCompany" placeholder="请输入车辆挂靠公司"/> |
||||
</el-form-item> |
||||
<el-form-item label="是否有GPS" prop="withGps"> |
||||
<el-input v-model="form.withGps" placeholder="请输入是否有GPS;1-没有,2-有"/> |
||||
</el-form-item> |
||||
<el-form-item label="GPS服务商" prop="gpsServiceProvider"> |
||||
<el-input v-model="form.gpsServiceProvider" placeholder="请输入GPS服务商"/> |
||||
</el-form-item> |
||||
<el-form-item label="GPS型号" prop="gpsModel"> |
||||
<el-input v-model="form.gpsModel" placeholder="请输入GPS型号"/> |
||||
</el-form-item> |
||||
</el-form> |
||||
<!-- 表单按钮 --> |
||||
<template #footer> |
||||
<span v-if="!view" class="dialog-footer"> |
||||
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit">提 交</el-button> |
||||
<el-button icon="el-icon-circle-close" @click="box = false">取 消</el-button> |
||||
</span> |
||||
</template> |
||||
</el-dialog> |
||||
</div> |
||||
</basic-container> |
||||
</template> |
||||
|
||||
<script> |
||||
import { getList, getDetail, add, update, remove } from "@/api/basicdata/basicdataVehicle"; |
||||
import option from "@/option/basicdata/basicdataVehicle"; |
||||
import { mapGetters } from "vuex"; |
||||
import { getDictionaryBiz } from '@/api/system/dict'; |
||||
import { getList as carrierData } from '@/api/basicdata/basicdataCarrier'; |
||||
|
||||
export default { |
||||
data () { |
||||
return { |
||||
height: 0, |
||||
// 弹框标题 |
||||
title: '', |
||||
// 是否展示弹框 |
||||
box: false, |
||||
// 是否显示查询 |
||||
search: true, |
||||
// 加载中 |
||||
loading: true, |
||||
// 是否为查看模式 |
||||
view: false, |
||||
// 查询信息 |
||||
query: {}, |
||||
// 分页信息 |
||||
page: { |
||||
currentPage: 1, |
||||
pageSize: 10, |
||||
total: 40 |
||||
}, |
||||
// 表单数据 |
||||
form: {}, |
||||
// 选择行 |
||||
selectionList: [], |
||||
//车辆来源 |
||||
vehicleSourceData:[], |
||||
//挂车类型 |
||||
trailerTypeData:[], |
||||
//车辆类型 |
||||
vehicleModelData:[], |
||||
//付款方式 |
||||
paymentMethodData:[], |
||||
//是否车头 |
||||
isHeadData:[], |
||||
//车厢类型 |
||||
carTypeData:[], |
||||
// 表单配置 |
||||
option: option, |
||||
// 表单列表 |
||||
data: [], |
||||
} |
||||
}, |
||||
mounted () { |
||||
this.init(); |
||||
|
||||
//查询字典 |
||||
this.queryDictionary(); |
||||
}, |
||||
computed: { |
||||
...mapGetters(["permission"]), |
||||
ids () { |
||||
let ids = []; |
||||
this.selectionList.forEach(ele => { |
||||
ids.push(ele.id); |
||||
}); |
||||
return ids.join(","); |
||||
} |
||||
}, |
||||
methods: { |
||||
queryDictionary() { |
||||
getDictionaryBiz('basic_vehicle_source').then(res => { |
||||
this.vehicleSourceData = res.data.data; |
||||
}); |
||||
getDictionaryBiz('basic_trailer_type').then(res => { |
||||
this.trailerTypeData = res.data.data; |
||||
}); |
||||
getDictionaryBiz('basic_driving_type').then(res => { |
||||
this.drivingTypeData = res.data.data; |
||||
}); |
||||
getDictionaryBiz('basic_vehicle_model').then(res => { |
||||
this.vehicleModelData = res.data.data; |
||||
}); |
||||
getDictionaryBiz('basicdata_vehicle_paymentmethod').then(res => { |
||||
this.paymentMethodData = res.data.data; |
||||
this.onLoad(this.page); |
||||
}); |
||||
|
||||
}, |
||||
init () { |
||||
this.height = this.setPx(document.body.clientHeight - 340); |
||||
}, |
||||
searchHide () { |
||||
this.search = !this.search; |
||||
}, |
||||
searchChange () { |
||||
this.onLoad(this.page); |
||||
}, |
||||
searchReset () { |
||||
this.query = {}; |
||||
this.page.currentPage = 1; |
||||
this.onLoad(this.page); |
||||
}, |
||||
handleSubmit () { |
||||
if (!this.form.id) { |
||||
add(this.form).then(() => { |
||||
this.box = false; |
||||
this.onLoad(this.page); |
||||
this.$message({ |
||||
type: "success", |
||||
message: "操作成功!" |
||||
}); |
||||
}); |
||||
} else { |
||||
update(this.form).then(() => { |
||||
this.box = false; |
||||
this.onLoad(this.page); |
||||
this.$message({ |
||||
type: "success", |
||||
message: "操作成功!" |
||||
}); |
||||
}) |
||||
} |
||||
}, |
||||
handleAdd () { |
||||
this.title = '新增' |
||||
this.form = {} |
||||
this.box = true |
||||
}, |
||||
handleEdit (row) { |
||||
this.title = '编辑' |
||||
this.box = true |
||||
getDetail(row.id).then(res => { |
||||
this.form = res.data.data; |
||||
}); |
||||
}, |
||||
handleView (row) { |
||||
this.title = '查看' |
||||
this.view = true; |
||||
this.box = true; |
||||
getDetail(row.id).then(res => { |
||||
this.form = res.data.data; |
||||
}); |
||||
}, |
||||
handleDelete () { |
||||
if (this.selectionList.length === 0) { |
||||
this.$message.warning("请选择至少一条数据"); |
||||
return; |
||||
} |
||||
this.$confirm("确定将选择数据删除?", { |
||||
confirmButtonText: "确定", |
||||
cancelButtonText: "取消", |
||||
type: "warning" |
||||
}) |
||||
.then(() => { |
||||
return remove(this.ids); |
||||
}) |
||||
.then(() => { |
||||
this.selectionClear(); |
||||
this.onLoad(this.page); |
||||
this.$message({ |
||||
type: "success", |
||||
message: "操作成功!" |
||||
}); |
||||
}); |
||||
}, |
||||
rowDel (row) { |
||||
this.$confirm("确定将选择数据删除?", { |
||||
confirmButtonText: "确定", |
||||
cancelButtonText: "取消", |
||||
type: "warning" |
||||
}) |
||||
.then(() => { |
||||
return remove(row.id); |
||||
}) |
||||
.then(() => { |
||||
this.onLoad(this.page); |
||||
this.$message({ |
||||
type: "success", |
||||
message: "操作成功!" |
||||
}); |
||||
}); |
||||
}, |
||||
beforeClose (done) { |
||||
done() |
||||
this.form = {}; |
||||
this.view = false; |
||||
}, |
||||
selectionChange (list) { |
||||
this.selectionList = list; |
||||
}, |
||||
selectionClear () { |
||||
this.selectionList = []; |
||||
this.$refs.table.clearSelection(); |
||||
}, |
||||
currentChange (currentPage) { |
||||
this.page.currentPage = currentPage; |
||||
this.onLoad(this.page); |
||||
}, |
||||
sizeChange (pageSize) { |
||||
this.page.pageSize = pageSize; |
||||
this.onLoad(this.page); |
||||
}, |
||||
onLoad (page, params = {}) { |
||||
this.loading = true; |
||||
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
||||
const data = res.data.data; |
||||
this.page.total = data.total; |
||||
this.data = data.records; |
||||
this.loading = false; |
||||
this.selectionClear(); |
||||
}); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
Loading…
Reference in new issue