bug优化

dev
WenShiJun 2024-03-27 18:05:30 +08:00
parent cf7e5686e4
commit 301b97d4f4
18 changed files with 178 additions and 89 deletions

View File

@ -125,6 +125,11 @@
</template>
</layout-table>
</layout-card>
<layout-import-file
v-model:visible="data.importDialogVisible"
template-url="/template/truckExcelTemplate.xls"
@submit="fnSubmitImport"
/>
</div>
</template>
@ -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?" +

View File

@ -33,13 +33,9 @@
<el-descriptions-item label-class-name="width_200" label="车主电话">
{{ info.CAR_OWNERS_TEL }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="联系人">
{{ info.CONTACTS }}
</el-descriptions-item>
<!-- <el-descriptions-item label-class-name="width_200" label="车主电话">-->
<!-- {{ info.CAR_OWNERS_TEL }}-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label-class-name="width_200" label="联系电话">
{{ info.CONTACT_PHONE }}
</el-descriptions-item>

View File

@ -148,12 +148,6 @@
width="140"
show-overflow-tooltip
/>
<el-table-column
prop="OPERATTIME"
label="修改时间"
width="140"
show-overflow-tooltip
/>
<el-table-column label="操作" width="150">
<template #default="{ row }">
<el-button

View File

@ -295,11 +295,21 @@ const rules = {
};
const getRemiderDate = (val) => {
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 = "";

View File

@ -112,7 +112,13 @@
<el-tag v-else-if="row.DUE_DATE_TYPE === 2">即将到期</el-tag>
</template>
</el-table-column>
<el-table-column prop="ARCHIVES_TYPE" label="档案状态" width="150" />
<el-table-column prop="NEW_ARCHIVES_TYPE" label="车辆状态" width="150">
<template #default="{ row }">
<el-tag v-if="row.NEW_ARCHIVES_TYPE === '1'"></el-tag>
<el-tag v-else-if="row.NEW_ARCHIVES_TYPE === '0'">正常</el-tag>
<el-tag v-else-if="row.NEW_ARCHIVES_TYPE === '2'">过户</el-tag>
</template>
</el-table-column>
<el-table-column prop="CREATTIME" label="创建时间" width="150" />
<el-table-column prop="OPERATTIME" label="修改时间" width="150" />
<el-table-column label="操作" width="250">

View File

@ -17,12 +17,6 @@
<el-descriptions-item label-class-name="width_200" label="车辆类型">
{{ data.busInfo.TRAILER_TYPE }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="车辆型号">
{{ data.busInfo.VEHICLE_MODEL }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="车辆品牌">
{{ data.busInfo.VEHICLE_BRAND }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="车主业户">
{{ data.busInfo.CAR_OWNERS }}
</el-descriptions-item>

View File

@ -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;

View File

@ -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 = "";

View File

@ -116,7 +116,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="维保周期" prop="MAINTENANCE_CYCLE">
<el-form-item label="维保周期(天)" prop="MAINTENANCE_CYCLE">
<el-input
v-model.number="form.MAINTENANCE_CYCLE"
type="number"
@ -330,12 +330,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;

View File

@ -98,11 +98,11 @@
</template>
</el-table-column>
<el-table-column prop="PROCESSING_DATE" label="办理日期" width="150" />
<el-table-column
prop="MAINTENANCE_CYCLE"
label="维保周期"
width="150"
/>
<el-table-column prop="MAINTENANCE_CYCLE" label="维保周期" width="150">
<template #default="{ row }">
{{ row.MAINTENANCE_CYCLE + "天" }}
</template>
</el-table-column>
<el-table-column prop="DUE_DATE" label="到期日期" width="150" />
<el-table-column prop="REGISTRANT" label="登记人" width="150" />
<!--<el-table-column prop="CONTACTS" label="经营企业" width="150"/>-->
@ -119,7 +119,13 @@
<el-tag v-else-if="row.DUE_DATE_TYPE === 2">即将到期</el-tag>
</template>
</el-table-column>
<el-table-column prop="ARCHIVES_TYPE" label="档案状态" width="150" />
<el-table-column prop="NEW_ARCHIVES_TYPE" label="车辆状态" width="150">
<template #default="{ row }">
<el-tag v-if="row.NEW_ARCHIVES_TYPE === '1'"></el-tag>
<el-tag v-else-if="row.NEW_ARCHIVES_TYPE === '0'">正常</el-tag>
<el-tag v-else-if="row.NEW_ARCHIVES_TYPE === '2'">过户</el-tag>
</template>
</el-table-column>
<el-table-column prop="CREATTIME" label="创建时间" width="150" />
<el-table-column prop="OPERATTIME" label="修改时间" width="150" />
<el-table-column label="操作" width="250">

View File

@ -17,12 +17,12 @@
<el-descriptions-item label-class-name="width_200" label="车辆类型">
{{ data.busInfo.TRAILER_TYPE }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="车辆型号">
{{ data.busInfo.VEHICLE_MODEL }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="车辆品牌">
{{ data.busInfo.VEHICLE_BRAND }}
</el-descriptions-item>
<!-- <el-descriptions-item label-class-name="width_200" label="车辆型号">-->
<!-- {{ data.busInfo.VEHICLE_MODEL }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item label-class-name="width_200" label="车辆品牌">-->
<!-- {{ data.busInfo.VEHICLE_BRAND }}-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label-class-name="width_200" label="车主业户">
{{ data.busInfo.CAR_OWNERS }}
</el-descriptions-item>
@ -53,7 +53,7 @@
{{ info.KILOMETERS }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="维保周期">
{{ info.MAINTENANCE_CYCLE }}
{{ info.MAINTENANCE_CYCLE + "天" }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="办理日期">
{{ info.PROCESSING_DATE }}

View File

@ -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 = "";

View File

@ -98,7 +98,7 @@
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column prop="OPERATIONS_ID" label="编号" width="150" />
<!-- <el-table-column prop="OPERATIONS_ID" label="编号" width="150" />-->
<el-table-column prop="VEHICLE_MODEL" label="运营车型" width="150">
<template #default="{ row }">
{{
@ -133,7 +133,13 @@
<span v-else-if="row.DUE_DATE_TYPE === 2">即将到期</span>
</template>
</el-table-column>
<el-table-column prop="ARCHIVES_TYPE" label="档案状态" width="150" />
<el-table-column prop="NEW_ARCHIVES_TYPE" label="车辆状态" width="150">
<template #default="{ row }">
<el-tag v-if="row.NEW_ARCHIVES_TYPE === '1'"></el-tag>
<el-tag v-else-if="row.NEW_ARCHIVES_TYPE === '0'">正常</el-tag>
<el-tag v-else-if="row.NEW_ARCHIVES_TYPE === '2'">过户</el-tag>
</template>
</el-table-column>
<el-table-column prop="CREATTIME" label="创建时间" width="150" />
<el-table-column prop="OPERATTIME" label="修改时间" width="150" />
<el-table-column label="操作" width="250">

View File

@ -17,12 +17,12 @@
<el-descriptions-item label-class-name="width_200" label="车辆类型">
{{ data.busInfo.TRAILER_TYPE }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="车辆型号">
{{ data.busInfo.VEHICLE_MODEL }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="车辆品牌">
{{ data.busInfo.VEHICLE_BRAND }}
</el-descriptions-item>
<!-- <el-descriptions-item label-class-name="width_200" label="车辆型号">-->
<!-- {{ data.busInfo.VEHICLE_MODEL }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item label-class-name="width_200" label="车辆品牌">-->
<!-- {{ data.busInfo.VEHICLE_BRAND }}-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label-class-name="width_200" label="车主业户">
{{ data.busInfo.CAR_OWNERS }}
</el-descriptions-item>

View File

@ -402,7 +402,7 @@
<script setup>
import { getUserListAll } from "@/request/safety_production_related.js";
import { onMounted, reactive, ref, toRaw } from "vue";
import { reactive, ref, toRaw } from "vue";
import { ACCIDENTNATUREMENU, EDUCATIONALMENU } from "@/assets/js/constant.js";
import LayoutUpload from "@/components/upload/index.vue";
import useFormValidate from "@/assets/js/useFormValidate.js";
@ -411,6 +411,7 @@ import { useRouter, useRoute } from "vue-router";
import {
addAccidentInvestigationView,
editAccidentInvestigation,
infoAccidentInvestigation,
} from "@/request/production_accident.js";
//
@ -510,17 +511,6 @@ const rules = reactive({
],
});
onMounted(() => {
isEditMode.value = route.query.mode === "edit";
ACCIDENTINVESTIGATION_ID.value = route.query.ACCIDENTINVESTIGATION_ID || "";
if (isEditMode.value) {
Object.keys(rules).forEach((key) => {
rules[key] = []; //
});
}
});
const router = useRouter();
const fnGetUnitsList = async () => {
const resData = await getUserListAll({});
@ -570,6 +560,23 @@ const data = reactive({
},
});
const fnGetData = async () => {
isEditMode.value = route.query.mode === "edit";
ACCIDENTINVESTIGATION_ID.value = route.query.ACCIDENTINVESTIGATION_ID || "";
if (ACCIDENTINVESTIGATION_ID.value) {
const resData = await infoAccidentInvestigation({
ACCIDENTINVESTIGATION_ID: ACCIDENTINVESTIGATION_ID.value,
});
if (resData && resData.pd) {
Object.keys(resData.pd).forEach((key) => {
if (Object.prototype.hasOwnProperty.call(data.form, key)) {
data.form[key] = resData.pd[key];
}
});
}
}
};
fnGetData();
const fnSubmit = async () => {
await useFormValidate(formRef);
@ -580,13 +587,17 @@ const fnSubmit = async () => {
formData.append(key, value);
});
data.form.fileList.forEach((file) => {
if (file.raw) formData.append("FFILEONE", file.raw);
});
if (Array.isArray(data.form.fileList)) {
data.form.fileList.forEach((file) => {
if (file.raw) formData.append("FFILEONE", file.raw);
});
}
data.form.ACCIDENTANALYSISRECORD.forEach((file) => {
if (file.raw) formData.append("FFILETWO", file.raw);
});
if (Array.isArray(data.form.ACCIDENTANALYSISRECORD)) {
data.form.ACCIDENTANALYSISRECORD.forEach((file) => {
if (file.raw) formData.append("FFILETWO", file.raw);
});
}
if (isEditMode.value && ACCIDENTINVESTIGATION_ID.value) {
formData.append("ACCIDENTINVESTIGATION_ID", ACCIDENTINVESTIGATION_ID.value);

View File

@ -52,7 +52,7 @@
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column prop="INCIDENTNUMBER" label="事故编号" width="250" />
<!-- <el-table-column prop="INCIDENTNUMBER" label="事故编号" width="250" />-->
<el-table-column prop="NAME" label="事故人员" />
<el-table-column prop="CORP_NAME" label="工作部门" />
<el-table-column prop="JOBTYPE" label="人员工种" />
@ -66,7 +66,7 @@
prop="WORKINJURYIDENTIFICATIONLEVEL"
label="工伤等级"
/>
<el-table-column prop="CERTIFICATIONNUMBER" label="认定书编号" />
<!-- <el-table-column prop="CERTIFICATIONNUMBER" label="认定书编号" />-->
<el-table-column prop="ACCIDENTRECORDPERSON" label="事故登记人" />
<el-table-column prop="ACCIDENTDATE" label="事故日期" />
<el-table-column prop="REGISTRATIONDATE" label="登记日期" />

View File

@ -101,12 +101,6 @@
width="140"
show-overflow-tooltip
/>
<el-table-column
prop="OPERATTIME"
label="修改时间"
width="140"
show-overflow-tooltip
/>
<el-table-column label="操作" width="150">
<template #default="{ row }">
<el-button

View File

@ -48,12 +48,8 @@
v-model="searchForm.EXPIRE_STATUS"
placeholder="请选择到期状态"
>
<el-option
v-for="item in EXPIRE_STATUS"
:key="item.NAME"
:label="item.NAME"
:value="item.NAME"
/>
<el-option label="未到期" value="1"></el-option>
<el-option label="已到期" value="0"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -117,14 +113,15 @@
</el-table-column>
<el-table-column prop="EXPIRE_STATUS" label="到期状态">
<template #default="{ row }">
<el-tag v-if="row.EXPIRE_STATUS === '已到期'"></el-tag>
<el-tag v-else-if="row.EXPIRE_STATUS === ''">未到期</el-tag>
<el-tag v-if="row.EXPIRE_STATUS === '0'"></el-tag>
<el-tag v-else-if="row.EXPIRE_STATUS === '1'">未到期</el-tag>
</template>
</el-table-column>
<el-table-column prop="RECORD_STATUS" label="档案状态" >
<el-table-column prop="NEW_ARCHIVES_TYPE" label="车辆状态" width="150">
<template #default="{ row }">
<el-tag v-if="row.RECORD_STATUS === ''"></el-tag>
<el-tag v-else></el-tag>
<el-tag v-if="row.NEW_ARCHIVES_TYPE === '1'"></el-tag>
<el-tag v-else-if="row.NEW_ARCHIVES_TYPE === '0'">正常</el-tag>
<el-tag v-else-if="row.NEW_ARCHIVES_TYPE === '2'">过户</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="150">
@ -186,9 +183,7 @@
<script setup>
import { serialNumber } from "@/assets/js/utils.js";
import useListData from "@/assets/js/useListData.js";
import {
layoutFnGetRemindStatus,
} from "@/assets/js/taxation_manage.js";
import { layoutFnGetRemindStatus } from "@/assets/js/taxation_manage.js";
import {
getTaxationManageList,
setTaxatonManageDelete,