Browse Source

车辆信息

test
0.0 2 years ago
parent
commit
532477b063
  1. 1
      package.json
  2. 50
      src/api/basicdata/basicdataVehicle.js
  3. 342
      src/option/basicdata/basicdataVehicle.js
  4. 8
      src/views/basic/forklift/basicForklift.vue
  5. 9
      src/views/basic/pda/basicPda.vue
  6. 8
      src/views/basicdata/carrier/basicdataCarrier.vue
  7. 107
      src/views/basicdata/driverArtery/basicdataDriverArtery.vue
  8. 562
      src/views/basicdata/vehicle/basicdataVehicle.vue

1
package.json

@ -7,6 +7,7 @@
"serve": "vite preview --host"
},
"dependencies": {
"@antfu/utils": "^0.7.2",
"@element-plus/icons-vue": "^2.0.9",
"@saber/nf-design-base-elp": "^1.0.0",
"@smallwei/avue": "^3.2.13",

50
src/api/basicdata/basicdataVehicle.js

@ -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
})
}

342
src/option/basicdata/basicdataVehicle.js

@ -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,
},
]
}

8
src/views/basic/forklift/basicForklift.vue

@ -458,12 +458,13 @@ export default {
},
mounted () {
this.init();
this.onLoad(this.page);
//
this.queryDictionary();
},
created() {
//
this.queryDictionary();
},
computed: {
...mapGetters(["permission"]),
@ -499,6 +500,7 @@ export default {
})
getDictionaryBiz("basic_forklift_payment").then(res=>{
this.paymentMethodData =res.data.data
this.onLoad(this.page);
})
},
//

9
src/views/basic/pda/basicPda.vue

@ -364,11 +364,12 @@ export default {
},
mounted() {
this.init();
this.onLoad(this.page);
},
created() {
//
this.queryDictionary();
},
created() {
},
computed: {
...mapGetters(["permission"]),
@ -401,9 +402,9 @@ export default {
getDictionaryBiz('yes_no').then(res => {
this.isDepositData = res.data.data;
});
getDictionaryBiz('basic_pad_state').then(res => {
this.stateData = res.data.data;
this.onLoad(this.page);
});
},
handleRemove(file, fileList) {

8
src/views/basicdata/carrier/basicdataCarrier.vue

@ -368,11 +368,11 @@ export default {
},
mounted () {
this.init();
this.onLoad(this.page);
//
this.queryDictionary();
},
created() {
//
this.queryDictionary();
},
computed: {
...mapGetters(["permission"]),
@ -388,8 +388,8 @@ export default {
queryDictionary() {
getDictionaryBiz('basic_carrier_type').then(res => {
this.typeData = res.data.data;
this.onLoad(this.page);
});
},
init () {
this.height = this.setPx(document.body.clientHeight - 340);

107
src/views/basicdata/driverArtery/basicdataDriverArtery.vue

@ -179,12 +179,12 @@
<el-row>
<el-col :span="11">
<el-form-item label="合同开始时间" label-width="100px" prop="contractStartTime">
<el-date-picker v-model="form.contractStartTime" value-format="YYYY-MM-DD" placeholder="请输入合同开始时间"/>
<el-date-picker v-model="form.contractStartTime" value-format="YYYY-MM-DD" placeholder="请输入合同开始时间" style="position: absolute;right: 0px;width: 100%"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="合同结束时间" label-width="100px" prop="contractEndTime">
<el-date-picker v-model="form.contractEndTime" value-format="YYYY-MM-DD" placeholder="请输入合同结束时间"/>
<el-date-picker v-model="form.contractEndTime" value-format="YYYY-MM-DD" placeholder="请输入合同结束时间" style="position: absolute;right: 0px;width: 100%"/>
</el-form-item>
</el-col>
</el-row>
@ -192,7 +192,14 @@
<el-row>
<el-col :span="11">
<el-form-item label="性别" prop="gender">
<el-input v-model="form.gender" placeholder="请输入性别"/>
<el-select v-model="form.gender" clearable placeholder="请选择性别" style="position: absolute;right: 0px;width: 100%">
<el-option
v-for="item in genderData"
: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="residentialAddress">
@ -204,8 +211,16 @@
<el-row>
<el-col :span="11">
<el-form-item label="银行类型" prop="bankType">
<el-input v-model="form.bankType" placeholder="请输入银行类型"/>
</el-form-item> </el-col>
<el-select v-model="form.bankType" clearable placeholder="请选择银行类型" style="position: absolute;right: 0px;width: 100%">
<el-option
v-for="item in bankTypeData"
: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="bankCardNub">
<el-input v-model="form.bankCardNub" placeholder="请输入银行卡号"/>
@ -229,8 +244,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="银行卡号" prop="bankCardNub">
<el-input v-model="form.bankCardNub" placeholder="请输入银行卡号" style="position: absolute;right: 0px;width: 100%"/>
<el-form-item label="备注" prop="notes">
<el-input v-model="form.notes" placeholder="请输入备注" style="position: absolute;right: 0px;width: 100%"/>
</el-form-item>
</el-col>
</el-row>
@ -240,7 +255,8 @@
<el-col :span="11">
<el-form-item label="驾驶证号" prop="driverLicenseNub">
<el-input v-model="form.driverLicenseNub" placeholder="请输入驾驶证号" style="position: absolute;right: 0px;width: 100%"/>
</el-form-item> </el-col>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="驾驶证发证机关" label-width="120px" prop="driverLicenseOrgan">
<el-input v-model="form.driverLicenseOrgan" placeholder="请输入驾驶证发证机关" style="position: absolute;right: 0px;width: 100%"/>
@ -282,13 +298,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="notes">
<el-input v-model="form.notes" placeholder="请输入备注" style="position: absolute;right: 0px;width: 100%"/>
</el-form-item>
</el-col>
</el-row>
@ -321,8 +331,6 @@
<el-form-item label="驾驶证背面照片" label-width="120px" prop="driverLicensePhotoBack">
<el-input v-model="form.driverLicensePhotoBack" placeholder="请输入驾驶证背面照片"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
@ -400,6 +408,8 @@ export default {
jobTypeData:[],
carrierData:[],
drivingTypeData:[],
genderData:[],
bankTypeData:[],
//
option: option,
//
@ -420,12 +430,13 @@ export default {
},
mounted () {
this.init();
this.onLoad(this.page);
},
created() {
//
this.queryDictionary();
},
created() {
//
// this.queryDictionary();
},
computed: {
...mapGetters(["permission"]),
ids () {
@ -447,11 +458,18 @@ export default {
getDictionaryBiz('basic_driving_type').then(res => {
this.drivingTypeData = res.data.data;
});
getDictionaryBiz('sex').then(res => {
this.genderData = res.data.data;
});
getDictionaryBiz('basic_bank_type').then(res => {
this.bankTypeData = res.data.data;
});
//
let params ={}
carrierData(this.carrierpage.currentPage, this.carrierpage.pageSize, Object.assign(params, this.carrierquery)).then(res => {
console.log("res.data.data.records>>>>>>>>>>>>>>>>>>>>>>>>",res.data.data.records);
this.carrierData = res.data.data.records
this.onLoad(this.page);
});
},
@ -470,6 +488,8 @@ export default {
this.onLoad(this.page);
},
handleSubmit () {
this.$refs.form.validate(valid=>{
if (valid) {
if (!this.form.id) {
add(this.form).then(() => {
this.box = false;
@ -489,6 +509,11 @@ export default {
});
})
}
} else {
console.log('error submit!!');
return false;
}
});
},
handleAdd () {
this.title = '新增'
@ -573,6 +598,48 @@ export default {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
// eslint-disable-next-line no-empty
for (let i = 0; i < data.records.length; i++) {
// eslint-disable-next-line no-empty
for (let j = 0; j < this.typeData.length; j++) {
// eslint-disable-next-line no-empty
if (data.records[i].type == this.typeData[j].dictKey){
data.records[i].type=this.typeData[j].dictValue;
}
}
for (let j = 0; j < this.jobTypeData.length; j++) {
// eslint-disable-next-line no-empty
if (data.records[i].jobType == this.jobTypeData[j].dictKey){
data.records[i].jobType=this.jobTypeData[j].dictValue;
}
}
for (let j = 0; j < this.drivingTypeData.length; j++) {
// eslint-disable-next-line no-empty
if (data.records[i].drivingType == this.drivingTypeData[j].dictKey){
data.records[i].drivingType=this.drivingTypeData[j].dictValue;
}
}
for (let j = 0; j < this.genderData.length; j++) {
// eslint-disable-next-line no-empty
if (data.records[i].gender == this.genderData[j].dictKey){
data.records[i].gender=this.genderData[j].dictValue;
}
}
for (let j = 0; j < this.bankTypeData.length; j++) {
// eslint-disable-next-line no-empty
if (data.records[i].bankType == this.bankTypeData[j].dictKey){
data.records[i].bankType=this.bankTypeData[j].dictValue;
}
}
for (let j = 0; j < this.carrierData.length; j++) {
// eslint-disable-next-line no-empty
if (data.records[i].carrierId == this.carrierData[j].id){
data.records[i].carrierId =this.carrierData[j].number;
}
}
}
this.page.total = data.total;
this.data = data.records;
this.loading = false;

562
src/views/basicdata/vehicle/basicdataVehicle.vue

@ -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…
Cancel
Save