From 532477b063d17b70341380c502d926336af70db6 Mon Sep 17 00:00:00 2001 From: "0.0" <1092404103.qq.com> Date: Tue, 16 May 2023 18:00:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/api/basicdata/basicdataVehicle.js | 50 ++ src/option/basicdata/basicdataVehicle.js | 342 +++++++++++ src/views/basic/forklift/basicForklift.vue | 8 +- src/views/basic/pda/basicPda.vue | 9 +- .../basicdata/carrier/basicdataCarrier.vue | 8 +- .../driverArtery/basicdataDriverArtery.vue | 107 +++- .../basicdata/vehicle/basicdataVehicle.vue | 562 ++++++++++++++++++ 8 files changed, 1056 insertions(+), 31 deletions(-) create mode 100644 src/api/basicdata/basicdataVehicle.js create mode 100644 src/option/basicdata/basicdataVehicle.js create mode 100644 src/views/basicdata/vehicle/basicdataVehicle.vue diff --git a/package.json b/package.json index 1413614d..a6e5f63e 100644 --- a/package.json +++ b/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", diff --git a/src/api/basicdata/basicdataVehicle.js b/src/api/basicdata/basicdataVehicle.js new file mode 100644 index 00000000..a929c012 --- /dev/null +++ b/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 + }) +} + diff --git a/src/option/basicdata/basicdataVehicle.js b/src/option/basicdata/basicdataVehicle.js new file mode 100644 index 00000000..80ac4060 --- /dev/null +++ b/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, + }, + ] +} diff --git a/src/views/basic/forklift/basicForklift.vue b/src/views/basic/forklift/basicForklift.vue index c06793ea..17eb8bce 100644 --- a/src/views/basic/forklift/basicForklift.vue +++ b/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); }) }, //查看图片 diff --git a/src/views/basic/pda/basicPda.vue b/src/views/basic/pda/basicPda.vue index b15af5c9..ff052f5b 100644 --- a/src/views/basic/pda/basicPda.vue +++ b/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) { diff --git a/src/views/basicdata/carrier/basicdataCarrier.vue b/src/views/basicdata/carrier/basicdataCarrier.vue index 7f86b60c..26113a83 100644 --- a/src/views/basicdata/carrier/basicdataCarrier.vue +++ b/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); diff --git a/src/views/basicdata/driverArtery/basicdataDriverArtery.vue b/src/views/basicdata/driverArtery/basicdataDriverArtery.vue index eb265fd8..ecd76a5f 100644 --- a/src/views/basicdata/driverArtery/basicdataDriverArtery.vue +++ b/src/views/basicdata/driverArtery/basicdataDriverArtery.vue @@ -179,12 +179,12 @@ - + - + @@ -192,7 +192,14 @@ - + + + + @@ -204,8 +211,16 @@ - - + + + + + + @@ -229,8 +244,8 @@ - - + + @@ -240,7 +255,8 @@ - + + @@ -282,13 +298,7 @@ - - - - - - @@ -321,8 +331,6 @@ - - @@ -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; diff --git a/src/views/basicdata/vehicle/basicdataVehicle.vue b/src/views/basicdata/vehicle/basicdataVehicle.vue new file mode 100644 index 00000000..d3389cda --- /dev/null +++ b/src/views/basicdata/vehicle/basicdataVehicle.vue @@ -0,0 +1,562 @@ + + +