diff --git a/src/views/enterprise_management/basics_info_management/freight_trailer/index.vue b/src/views/enterprise_management/basics_info_management/freight_trailer/index.vue
index b66a80a..27fc30f 100644
--- a/src/views/enterprise_management/basics_info_management/freight_trailer/index.vue
+++ b/src/views/enterprise_management/basics_info_management/freight_trailer/index.vue
@@ -125,6 +125,11 @@
+
@@ -139,7 +144,13 @@ import {
} from "@/request/enterprise_management.js";
import { debounce } from "throttle-debounce";
import { ElMessageBox, ElMessage } from "element-plus";
+import { setRiskPointImport } from "@/request/risk_control.js";
+import LayoutImportFile from "@/components/import_file/index.vue";
+import { reactive } from "vue";
const router = useRouter();
+const data = reactive({
+ importDialogVisible: false,
+});
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
useListData(getFreightTrailerList);
const fnGetDataTransfer = () => {
@@ -158,6 +169,21 @@ const fnResetPaginationTransfer = () => {
DEPARTMENT_NAME: searchForm.value.DEPARTMENT_NAME,
});
};
+const fnImportDialogChangeShow = () => {
+ data.importDialogVisible = !data.importDialogVisible;
+};
+const fnSubmitImport = async (formData) => {
+ const resData = await setRiskPointImport(formData);
+ if (resData.resultStr) {
+ ElMessage({
+ dangerouslyUseHTMLString: true,
+ message: resData.resultStr,
+ type: resData.resultType,
+ });
+ }
+ fnImportDialogChangeShow();
+ fnResetPaginationTransfer();
+};
const fnExport = async () => {
const selectionData = tableRef.value.getSelectionRows();
if (selectionData.length === 0) {
@@ -165,7 +191,9 @@ const fnExport = async () => {
return;
}
await ElMessageBox.confirm("确定要导出到excel吗?", { type: "warning" });
- const DATA_IDS = selectionData.map((item) => item.RISKUNIT_ID).join(",");
+ const DATA_IDS = selectionData
+ .map((item) => item.FREIGHTTRAILER_ID)
+ .join(",");
window.location.href =
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
"/freightTrailer/excel?" +
diff --git a/src/views/enterprise_management/basics_info_management/freight_trailer/view.vue b/src/views/enterprise_management/basics_info_management/freight_trailer/view.vue
index 2d125ed..1ab2822 100644
--- a/src/views/enterprise_management/basics_info_management/freight_trailer/view.vue
+++ b/src/views/enterprise_management/basics_info_management/freight_trailer/view.vue
@@ -33,13 +33,9 @@
{{ info.CAR_OWNERS_TEL }}
-
{{ info.CONTACTS }}
-
-
-
{{ info.CONTACT_PHONE }}
diff --git a/src/views/mechanical_files/assigned_manage/index.vue b/src/views/mechanical_files/assigned_manage/index.vue
index 441aa49..4f9b2a4 100644
--- a/src/views/mechanical_files/assigned_manage/index.vue
+++ b/src/views/mechanical_files/assigned_manage/index.vue
@@ -148,12 +148,6 @@
width="140"
show-overflow-tooltip
/>
-
{
if (val) {
- if (form.value.DUE_DATE && form.value.REMINDER_DAYS) {
- form.value.REMINDER_DATE = subtractDaysFromDate(
- form.value.DUE_DATE,
- form.value.REMINDER_DAYS
- );
+ if (form.value.DUE_DATE) {
+ // 计算提醒日期
+ const reminderDateStr = subtractDaysFromDate(form.value.DUE_DATE, val);
+ const reminderDate = new Date(reminderDateStr);
+ const today = new Date();
+
+ // 检查计算出的提醒日期是否早于当前时间
+ if (reminderDate < today) {
+ // 如果提醒日期早于当前日期,显示错误提示并重置提醒日期
+ ElMessage.error("输入的提醒天数错误,提醒日期不能早于当前日期。");
+ form.value.REMINDER_DATE = ""; // 重置提醒日期
+ } else {
+ // 如果提醒日期正常,更新表单值
+ form.value.REMINDER_DATE = reminderDateStr;
+ }
}
} else {
form.value.REMINDER_DATE = "";
diff --git a/src/views/mechanical_files/beidou/index.vue b/src/views/mechanical_files/beidou/index.vue
index 3e8848c..3157288 100644
--- a/src/views/mechanical_files/beidou/index.vue
+++ b/src/views/mechanical_files/beidou/index.vue
@@ -112,7 +112,13 @@
即将到期
-
+
+
+ 报废
+ 正常
+ 过户
+
+
diff --git a/src/views/mechanical_files/beidou/view.vue b/src/views/mechanical_files/beidou/view.vue
index 7945406..1965c26 100644
--- a/src/views/mechanical_files/beidou/view.vue
+++ b/src/views/mechanical_files/beidou/view.vue
@@ -17,12 +17,6 @@
{{ data.busInfo.TRAILER_TYPE }}
-
- {{ data.busInfo.VEHICLE_MODEL }}
-
-
- {{ data.busInfo.VEHICLE_BRAND }}
-
{{ data.busInfo.CAR_OWNERS }}
diff --git a/src/views/mechanical_files/inspect_annually/add.vue b/src/views/mechanical_files/inspect_annually/add.vue
index b2954cd..695d67a 100644
--- a/src/views/mechanical_files/inspect_annually/add.vue
+++ b/src/views/mechanical_files/inspect_annually/add.vue
@@ -344,12 +344,26 @@ const getDueDate = () => {
const getRemiderDate = (val) => {
if (val) {
if (form.value.DUE_DATE) {
- form.value.REMINDER_DATE = subtractDaysFromDate(form.value.DUE_DATE, val);
+ // 计算提醒日期
+ const reminderDateStr = subtractDaysFromDate(form.value.DUE_DATE, val);
+ const reminderDate = new Date(reminderDateStr);
+ const today = new Date();
+
+ // 检查计算出的提醒日期是否早于当前时间
+ if (reminderDate < today) {
+ // 如果提醒日期早于当前日期,显示错误提示并重置提醒日期
+ ElMessage.error("输入的提醒天数错误,提醒日期不能早于当前日期。");
+ form.value.REMINDER_DATE = ""; // 重置提醒日期
+ } else {
+ // 如果提醒日期正常,更新表单值
+ form.value.REMINDER_DATE = reminderDateStr;
+ }
}
} else {
form.value.REMINDER_DATE = "";
}
};
+
const getVehicle = async (event) => {
const resData = await getTrailerList({ TRAFFIC_TYPE: event });
data.vehicleList = resData.list;
diff --git a/src/views/mechanical_files/insure/add.vue b/src/views/mechanical_files/insure/add.vue
index 60c170a..210ad1f 100644
--- a/src/views/mechanical_files/insure/add.vue
+++ b/src/views/mechanical_files/insure/add.vue
@@ -401,7 +401,20 @@ const getDueDate = (val) => {
const getRemiderDate = (val) => {
if (val) {
if (form.value.DUE_DATE) {
- form.value.REMINDER_DATE = subtractDaysFromDate(form.value.DUE_DATE, val);
+ // 计算提醒日期
+ const reminderDateStr = subtractDaysFromDate(form.value.DUE_DATE, val);
+ const reminderDate = new Date(reminderDateStr);
+ const today = new Date();
+
+ // 检查计算出的提醒日期是否早于当前时间
+ if (reminderDate < today) {
+ // 如果提醒日期早于当前日期,显示错误提示并重置提醒日期
+ ElMessage.error("输入的提醒天数错误,提醒日期不能早于当前日期。");
+ form.value.REMINDER_DATE = ""; // 重置提醒日期
+ } else {
+ // 如果提醒日期正常,更新表单值
+ form.value.REMINDER_DATE = reminderDateStr;
+ }
}
} else {
form.value.REMINDER_DATE = "";
diff --git a/src/views/mechanical_files/maintenance/add.vue b/src/views/mechanical_files/maintenance/add.vue
index 01fb4f2..565b8b3 100644
--- a/src/views/mechanical_files/maintenance/add.vue
+++ b/src/views/mechanical_files/maintenance/add.vue
@@ -116,7 +116,7 @@
-
+
{
const getRemiderDate = (val) => {
if (val) {
if (form.value.DUE_DATE) {
- form.value.REMINDER_DATE = subtractDaysFromDate(form.value.DUE_DATE, val);
+ // 计算提醒日期
+ const reminderDateStr = subtractDaysFromDate(form.value.DUE_DATE, val);
+ const reminderDate = new Date(reminderDateStr);
+ const today = new Date();
+
+ // 检查计算出的提醒日期是否早于当前时间
+ if (reminderDate < today) {
+ // 如果提醒日期早于当前日期,显示错误提示并重置提醒日期
+ ElMessage.error("输入的提醒天数错误,提醒日期不能早于当前日期。");
+ form.value.REMINDER_DATE = ""; // 重置提醒日期
+ } else {
+ // 如果提醒日期正常,更新表单值
+ form.value.REMINDER_DATE = reminderDateStr;
+ }
}
} else {
form.value.REMINDER_DATE = "";
}
};
+
const getVehicle = async (event) => {
const resData = await getTrailerList({ TRAFFIC_TYPE: event });
data.vehicleList = resData.list;
diff --git a/src/views/mechanical_files/maintenance/index.vue b/src/views/mechanical_files/maintenance/index.vue
index 8a3a29c..763c2be 100644
--- a/src/views/mechanical_files/maintenance/index.vue
+++ b/src/views/mechanical_files/maintenance/index.vue
@@ -98,11 +98,11 @@
-
+
+
+ {{ row.MAINTENANCE_CYCLE + "天" }}
+
+
@@ -119,7 +119,13 @@
即将到期
-
+
+
+ 报废
+ 正常
+ 过户
+
+
diff --git a/src/views/mechanical_files/maintenance/view.vue b/src/views/mechanical_files/maintenance/view.vue
index 4b33f26..6d30ad3 100644
--- a/src/views/mechanical_files/maintenance/view.vue
+++ b/src/views/mechanical_files/maintenance/view.vue
@@ -17,12 +17,12 @@
{{ data.busInfo.TRAILER_TYPE }}
-
- {{ data.busInfo.VEHICLE_MODEL }}
-
-
- {{ data.busInfo.VEHICLE_BRAND }}
-
+
+
+
+
+
+
{{ data.busInfo.CAR_OWNERS }}
@@ -53,7 +53,7 @@
{{ info.KILOMETERS }}
- {{ info.MAINTENANCE_CYCLE }}
+ {{ info.MAINTENANCE_CYCLE + "天" }}
{{ info.PROCESSING_DATE }}
diff --git a/src/views/mechanical_files/operations/add.vue b/src/views/mechanical_files/operations/add.vue
index b6a6722..76273b4 100644
--- a/src/views/mechanical_files/operations/add.vue
+++ b/src/views/mechanical_files/operations/add.vue
@@ -311,7 +311,15 @@ const getDueDate = () => {
const getRemiderDate = (val) => {
if (val) {
if (form.value.DUE_DATE) {
- form.value.REMINDER_DATE = subtractDaysFromDate(form.value.DUE_DATE, val);
+ const reminderDateStr = subtractDaysFromDate(form.value.DUE_DATE, val);
+ const reminderDate = new Date(reminderDateStr);
+ const today = new Date();
+ if (reminderDate < today) {
+ ElMessage.error("输入的提醒天数错误,提醒日期不能早于当前日期。");
+ form.value.REMINDER_DAYS = "";
+ } else {
+ form.value.REMINDER_DATE = reminderDateStr;
+ }
}
} else {
form.value.REMINDER_DATE = "";
diff --git a/src/views/mechanical_files/operations/index.vue b/src/views/mechanical_files/operations/index.vue
index 8e25983..b473dcc 100644
--- a/src/views/mechanical_files/operations/index.vue
+++ b/src/views/mechanical_files/operations/index.vue
@@ -98,7 +98,7 @@
{{ serialNumber(pagination, $index) }}
-
+
{{
@@ -133,7 +133,13 @@
即将到期
-
+
+
+ 报废
+ 正常
+ 过户
+
+
diff --git a/src/views/mechanical_files/operations/view.vue b/src/views/mechanical_files/operations/view.vue
index 1ec7624..d54166a 100644
--- a/src/views/mechanical_files/operations/view.vue
+++ b/src/views/mechanical_files/operations/view.vue
@@ -17,12 +17,12 @@
{{ data.busInfo.TRAILER_TYPE }}
-
- {{ data.busInfo.VEHICLE_MODEL }}
-
-
- {{ data.busInfo.VEHICLE_BRAND }}
-
+
+
+
+
+
+
{{ data.busInfo.CAR_OWNERS }}
diff --git a/src/views/mechanical_files/production_accident/add.vue b/src/views/mechanical_files/production_accident/add.vue
index 34e0557..10178bb 100644
--- a/src/views/mechanical_files/production_accident/add.vue
+++ b/src/views/mechanical_files/production_accident/add.vue
@@ -402,7 +402,7 @@