From cfec695c81ab0529a525e4ab73adb80e96775560 Mon Sep 17 00:00:00 2001 From: xiepeng Date: Tue, 26 Mar 2024 18:04:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BD=A6=E7=89=8C=E5=8F=B7?= =?UTF-8?q?=E3=80=81=E8=BD=A6=E6=9E=B6=E5=8F=B7=E3=80=81=E5=8F=91=E5=8A=A8?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7=E6=A0=A1=E9=AA=8C=20=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/js/constant.js | 17 +++++- .../operation_vehicle/add.vue | 24 ++++++++ .../operation_vehicle/edit.vue | 30 ++++------ .../operation_vehicle/index.vue | 57 +++++++++---------- .../operation_vehicle/view.vue | 26 ++++++--- .../mechanical_files/assigned_manage/add.vue | 9 ++- src/views/mechanical_files/beidou/index.vue | 3 - .../mechanical_files/taxation_manage/add.vue | 22 +++++-- .../mechanical_files/taxation_manage/edit.vue | 16 +++++- .../taxation_manage/index.vue | 14 ++--- 10 files changed, 142 insertions(+), 76 deletions(-) diff --git a/src/assets/js/constant.js b/src/assets/js/constant.js index e4ef6a6..74e778e 100644 --- a/src/assets/js/constant.js +++ b/src/assets/js/constant.js @@ -86,17 +86,30 @@ export const DISPOSE_STATUS_LIST = [ ]; export const TAXES_PERIOD = [ - // 处理状态 + // 税费周期 { ID: "1", NAME: "12个月", NUM: "12" }, { ID: "0", NAME: "6个月", NUM: "6" }, ]; export const EXPIRE_STATUS = [ - // 处理状态 + // 到期状态 { ID: "1", NAME: "未到期" }, { ID: "0", NAME: "已到期" }, ]; +export const NETWORK_STATE = [ + // 入网状态 + { ID: "0", NAME: "已入网" }, + { ID: "1", NAME: "未入网" }, + { ID: "2", NAME: "超时入网" }, +]; + +export const REMINDER_STATUS = [ + // 提醒状态 + { ID: "0", NAME: "开启" }, + { ID: "1", NAME: "关闭" }, +]; + // export const MAINTENANCE_LEVEL_LIST = [ // //维保等级 // {ID:'1',NAME:'一级维保'}, diff --git a/src/views/enterprise_management/basics_info_management/operation_vehicle/add.vue b/src/views/enterprise_management/basics_info_management/operation_vehicle/add.vue index 4ba7b6d..6721b13 100644 --- a/src/views/enterprise_management/basics_info_management/operation_vehicle/add.vue +++ b/src/views/enterprise_management/basics_info_management/operation_vehicle/add.vue @@ -387,6 +387,17 @@ const rules = { ], FRAMES_NUMBER: [ { required: true, message: "车架号不能为空", trigger: "change" }, + { min: 17, message: "车架号不能少于17位", trigger: "blur" }, + { + validator: (rule, value, callback) => { + if (!/^[A-HJ-NPR-Z\d]{8}[X\d][A-HJ-NPR-Z\d]{3}\d{5}$/.test(value)) { + callback(new Error("车架号格式不正确")); + } else { + callback(); + } + }, + trigger: "blur", + }, ], OPERATING_CERTIFICATE: [ { required: true, message: "营运证号不能为空", trigger: "blur" }, @@ -434,6 +445,19 @@ const rules = { OPERATING_CERTIFICATE_PHOTO: [ { required: true, message: "营运证照片不能为空", trigger: "blur" }, ], + ENGINE_NUMBER: [ + { required: true, message: "请输入发动机号", trigger: "blur" }, + { min: 7, max: 8, message: "请输入7-8位发动机号", trigger: "blur" }, + { + pattern: + /^[A-Z0-9a-z\d]{7,8}$/, + message: "请输入正确的发动机号", + }, + ], + VOUCH_NUMBERLOAD: [ + { required: true, message: "请输入核定载人数", trigger: "blur" }, + { pattern: /^([1-9][0-9]*)$/, message: "请输入整数", trigger: "blur" }, + ] }; const formRef = ref(null); const form = ref({ diff --git a/src/views/enterprise_management/basics_info_management/operation_vehicle/edit.vue b/src/views/enterprise_management/basics_info_management/operation_vehicle/edit.vue index c62e4a9..7744d9c 100644 --- a/src/views/enterprise_management/basics_info_management/operation_vehicle/edit.vue +++ b/src/views/enterprise_management/basics_info_management/operation_vehicle/edit.vue @@ -69,17 +69,7 @@ - - - + @@ -195,7 +185,7 @@ - 检查内容 + 详细信息 { if (vehicleNumber) { - console.log("车牌号0-=0",vehicleNumber); const vehicleCount = await findByPlateNumber({ vehicleNumber }); - if (vehicleCount.pd) { - callback(new Error("车辆已存在")); - } else callback(); + if(vehicleCount.pd) { + if(vehicleCount.pd.PLATE_NUMBER === plateNumber){ + callback(); + }else{ + callback(new Error("车辆已存在")) + } + }else callback(); } }; const isVehicleNumber = (rule, vehicleNumber, callback) => { @@ -485,7 +479,6 @@ const form = ref({ }); const getVehicleColorList = await layoutFnGetVehicleColor(); const getTransportCategoryList = await layoutFnGetTransportCategory(); -const getBelongingDepartment = await layoutFnGetBelongingDepartment(); const getFuelTypeList = await layoutFnGetFuelType(); const getEmissionStandardList = await layoutFnGetEmissionStandard(); const getVehicleTypeList = await layoutFnGetVehicleType(); @@ -502,6 +495,7 @@ const fnGetData = async () => { form.value.OPERATING_CERTIFICATE_PHOTO = addingPrefixToFile( resData.operatingcertificatephoto ); + plateNumber = form.value.PLATE_NUMBER }; fnGetData(); const fnSubmit = debounce( diff --git a/src/views/enterprise_management/basics_info_management/operation_vehicle/index.vue b/src/views/enterprise_management/basics_info_management/operation_vehicle/index.vue index dd90df9..0944437 100644 --- a/src/views/enterprise_management/basics_info_management/operation_vehicle/index.vue +++ b/src/views/enterprise_management/basics_info_management/operation_vehicle/index.vue @@ -17,7 +17,7 @@ - + - + - - + 搜索 - - 重置 - + 重置 - 导出 + 导出 @@ -88,7 +85,9 @@ @@ -128,19 +127,7 @@ > 查看 - - 画像 - + { fnGetData({ DEPTIDS: searchForm.value.DEPTIDS?.join(","), @@ -228,6 +212,19 @@ const fnDelete = debounce( { atBegin: true } ); +const fnExport = async () => { + const selectionData = tableRef.value.getSelectionRows(); + await ElMessageBox.confirm("确定要导出到excel吗?", { type: "warning" }); + const DATA_IDS = selectionData.map((item) => item.OPERATING_ID).join(","); + window.location.href = + import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] + + "/operationunit/excel?" + + "&KEYWORDS=" + + (searchForm.value.KEYWORDS || "") + + "&DATA_IDS=" + + DATA_IDS; +}; + const buttonJurisdiction = await useButtonJurisdiction("operation"); diff --git a/src/views/enterprise_management/basics_info_management/operation_vehicle/view.vue b/src/views/enterprise_management/basics_info_management/operation_vehicle/view.vue index 4127018..07f87a3 100644 --- a/src/views/enterprise_management/basics_info_management/operation_vehicle/view.vue +++ b/src/views/enterprise_management/basics_info_management/operation_vehicle/view.vue @@ -1,8 +1,11 @@ - - -