Compare commits

...

3 Commits

Author SHA1 Message Date
xiepeng 0fc9cd9a76 BUG 优化 2024-03-28 18:31:58 +08:00
xiepeng 5f167d98da Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	src/views/mechanical_files/production_accident/add.vue
2024-03-27 18:17:57 +08:00
xiepeng 3b29fb05fc BUG 优化 2024-03-27 18:09:02 +08:00
33 changed files with 408 additions and 113 deletions

View File

@ -3,11 +3,14 @@ import { post, upload } from "@/request/axios.js";
export const getEnterpriseSafetyProductionList = (params) =>
post("/enterprisesafetyproduction/list", params); // 企业安全生产值班记录列表
export const setEnterpriseSafetyProductEdit = (params) =>
export const getEnterpriseSafetyProductEdit = (params) =>
upload("/enterprisesafetyproduction/goEdit", params); // 修改企业安全生产值班记录
export const setEnterpriseSafetyProductAdd = (params) =>
upload("/enterprisesafetyproduction/add", params); // 新增企业安全生产值班记录
export const setEnterpriseSafetyProductEdit = (params) =>
upload("/enterprisesafetyproduction/edit", params); // 新增企业安全生产值班记录
export const setEnterpriseSafetyProductDelete = (params) =>
upload("/enterprisesafetyproduction/delete", params); // 新增企业安全生产值班记录

View File

@ -20,11 +20,13 @@ export const setInsureAdd = (params) => post("/insure/add", params); // 保险
export const setInsureEdit = (params) => post("/insure/edit", params); // 保险管理修改
export const setInsureDelete = (params) => post("/insure/delete", params); // 保险管理删除
export const setInsureEdit2 = (params) => post("/insure/edit2", params); // 保险管理修改开启关闭
export const getTrailerList2 = (params) => post("/insure/vehicleList", params);
export const getOperationsList = (params) => post("/operations/list", params); // 运营管理列表
export const getOperationsView = (params) => post("/operations/goEdit", params); // 运营管理查看
export const setOperationsAdd = (params) => post("/operations/add", params); // 运营管理新增
export const setOperationsEdit = (params) => post("/operations/edit", params); // 运营管理修改
export const getOperationTrailerList = (params) => post("/operations/vehicleList", params);
export const setOperationsDelete = (params) =>
post("/operations/delete", params); // 运营管理删除
export const setOperationsEdit2 = (params) => post("/operations/edit2", params); // 运营管理修改开启关闭
@ -39,9 +41,13 @@ export const setMaintenanceDelete = (params) =>
export const setMaintenanceEdit2 = (params) =>
post("/maintenance/edit2", params); // 维保管理修改开启关闭
export const getTrailerListMaintenance = (params) => post("/maintenance/vehicleList", params);
export const getBeidouList = (params) => post("/beidou/list", params); // 维保管理列表
export const getBeidouView = (params) => post("/beidou/goEdit", params); // 维保管理查看
export const setBeidouAdd = (params) => post("/beidou/add", params); // 维保管理新增
export const setBeidouEdit = (params) => post("/beidou/edit", params); // 维保管理修改
export const setBeidouDelete = (params) => post("/beidou/delete", params); // 维保管理删除
export const setBeidouEdit2 = (params) => post("/beidou/edit2", params); // 维保管理修改开启关闭
export const getTrailerListCompass = (params) => post("/beidou/vehicleList", params);

View File

@ -100,6 +100,9 @@ export const editOperatingVehicleInfo = (params) =>
export const getOperationVehicleInfo = (params) =>
post("/operatingvehicles/findById", params); // 根据Id获取运营车辆信息
export const setOperationsScrapStatus = (params) =>
post("/operatingvehicles/setOperationsScrapStatus", params); // 根据Id获取运营车辆信息
export const findByPlateNumber = (params) =>
post("/operatingvehicles/findByPlateNumber", params); // 根据Id获取运营车辆信息

View File

@ -158,7 +158,6 @@ const info = ref({});
const fnGetData = async () => {
if (!OPERATING_ID) return;
const resData = await findByIdOperatingVehicleInfo({ OPERATING_ID });
console.log("-=-=-=-",resData);
info.value = resData.pd;
info.value.HEADSTOCK_PHOTO = addingPrefixToFile(resData.headstockphoto);
info.value.DRIVINGLICENSE_PHOTO = addingPrefixToFile(

View File

@ -277,7 +277,7 @@ import {
getFreightTrailerView,
} from "@/request/enterprise_management.js";
import {
findByIdOperatingVehicleInfo,
findByIdOperatingVehicleInfo
} from "@/request/operation_vehicle.js";
import LayoutUpload from "@/components/upload/index.vue";
import { debounce } from "throttle-debounce";
@ -308,7 +308,6 @@ const freightVehicleList = await getAssignedFreightTrailerList();
const assignedWayList = await layoutFnGetAssignedWay();
const operationList = await getAssignedOperationVehicleList();
const rules = {
ASSIGNED_VEHICLE_MODEL: [
{ required: true, message: "过户车型不能为空", trigger: "change" },
@ -344,9 +343,6 @@ const rules = {
NOW_OWNERS: [
{ required: true, message: "请输入现车主/业主", trigger: "blur" },
],
NOW_PLATE_NUMBER: [
{ required: true, message: "请输入现车牌号", trigger: "blur" },
]
};
const formRef = ref(null);
const form = ref({

View File

@ -134,7 +134,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="北斗净费" prop="ACTUAL_COLLECTION">
<el-form-item label="北斗净费(元)" prop="ACTUAL_COLLECTION">
<el-input
v-model.number="form.ACTUAL_COLLECTION"
maxlength="50"
@ -143,7 +143,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="北斗全费" prop="ALL_FEES">
<el-form-item label="北斗全费(元)" prop="ALL_FEES">
<el-input
v-model.number="form.ALL_FEES"
maxlength="50"
@ -241,7 +241,7 @@ import {
getBeidouView,
setBeidouAdd,
setBeidouEdit,
getTrailerList,
getTrailerListCompass,
} from "@/request/mechanical_files.js";
import { setUploadImg } from "@/request/api.js";
import { ElMessage } from "element-plus";
@ -307,6 +307,7 @@ const getRemiderDate = (val) => {
if (form.value.DUE_DATE) {
//
const reminderDateStr = subtractDaysFromDate(form.value.DUE_DATE, val);
console.log(reminderDateStr);
const reminderDate = new Date(reminderDateStr);
const today = new Date();
@ -325,7 +326,7 @@ const getRemiderDate = (val) => {
}
};
const getVehicle = async (event) => {
const resData = await getTrailerList({ TRAFFIC_TYPE: event });
const resData = await getTrailerListCompass({ TRAFFIC_TYPE: event });
data.vehicleList = resData.list;
form.value.VEHICLE = "";
data.busInfo.DRIVING_LICENSE_IMG = [];
@ -339,7 +340,7 @@ const getVehicle = async (event) => {
};
getVehicle("1");
const fnBusChange = async (event) => {
const resData = await getTrailerList({ ID: event });
const resData = await getTrailerListCompass({ ID: event });
data.busInfo = resData.list[0];
data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile(
resData.drivingLicenseImgs

View File

@ -134,7 +134,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="北斗净费" prop="ACTUAL_COLLECTION">
<el-form-item label="北斗净费(元)" prop="ACTUAL_COLLECTION">
<el-input
v-model.number="form.ACTUAL_COLLECTION"
maxlength="50"
@ -143,7 +143,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="北斗全费" prop="ALL_FEES">
<el-form-item label="北斗全费(元)" prop="ALL_FEES">
<el-input
v-model.number="form.ALL_FEES"
maxlength="50"

View File

@ -44,10 +44,10 @@
<el-descriptions-item label-class-name="width_200" label="到期日期">
{{ info.DUE_DATE }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="北斗净费">
<el-descriptions-item label-class-name="width_200" label="北斗净费(元)">
{{ info.ACTUAL_COLLECTION }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="北斗全费">
<el-descriptions-item label-class-name="width_200" label="北斗全费(元)">
{{ info.ALL_FEES }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="提醒天数">

View File

@ -155,7 +155,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="年检费用" prop="INSPECTFEES">
<el-form-item label="年检费用(元)" prop="INSPECTFEES">
<el-input
v-model="form.INSPECTFEES"
maxlength="50"
@ -164,7 +164,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="实收费用" prop="ACTUAL_COLLECTION">
<el-form-item label="实收费用(元)" prop="ACTUAL_COLLECTION">
<el-input
v-model="form.ACTUAL_COLLECTION"
maxlength="50"
@ -351,7 +351,6 @@ const getDueDate = () => {
};
const getRemiderDate = (val) => {
if (val) {
console.log("REMINDER_DAYS",form.value.REMINDER_DAYS);
if (form.value.DUE_DATE) {
//
const reminderDateStr = subtractDaysFromDate(form.value.DUE_DATE, val);

View File

@ -22,7 +22,7 @@
<el-select v-model="form.VEHICLE" @change="getBusInfo">
<el-option
v-for="item in data.vehicleList"
:key="item.ID"
:key="item.PLATE_NUMBER"
:label="item.PLATE_NUMBER"
:value="item.ID"
/>
@ -153,7 +153,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="年检费用" prop="INSPECTFEES">
<el-form-item label="年检费用(元)" prop="INSPECTFEES">
<el-input
v-model="form.INSPECTFEES"
maxlength="50"
@ -162,7 +162,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="实收费用" prop="ACTUAL_COLLECTION">
<el-form-item label="实收费用(元)" prop="ACTUAL_COLLECTION">
<el-input
v-model="form.ACTUAL_COLLECTION"
maxlength="50"

View File

@ -16,10 +16,10 @@
{{ data.busInfo.TRAILER_TYPE }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="车辆型号">
{{ data.busInfo.VEHICLE_MODEL }}
{{ info.VEHICLE_TYPE }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="车辆品牌">
{{ data.busInfo.VEHICLE_BRAND }}
{{ info.VEHICLE_BRAND }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="车主业户">
{{ data.busInfo.CAR_OWNERS }}
@ -36,24 +36,43 @@
</el-descriptions>
<el-divider content-position="left">年检信息</el-divider>
<el-descriptions :column="2" border>
<el-descriptions-item label-class-name="width_200" label="车主业主">
{{ info.CAR_OWNERS }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="联系电话">
{{ info.TELEPHONE }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="办理日期">
{{ info.PROCESSING_DATE }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="年检周期">
{{ info.ANNUAL_INSPECTION_CYCLE_NAME }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="年检费用">
<el-descriptions-item label-class-name="width_200" label="年检费用(元)">
{{ info.INSPECTFEES }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="实收费用(元)">
{{ info.ACTUAL_COLLECTION }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="到期日期">
{{ info.DUE_DATE }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="提醒天数">
{{ info.REMINDER_DAYS }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="提醒日期">
{{ info.REMINDER_DATE }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="年检地址">
{{ info.ADDRESS }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="登记人">
{{ info.REGISTRANT }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="提醒状态">
<span v-if="info.REMINDER_STATUS === '1'"></span>
<span v-else-if="info.REMINDER_STATUS === '0'">关闭</span>
</el-descriptions-item>
<el-descriptions-item
label-class-name="width_200"
label="年检资料"

View File

@ -175,7 +175,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="保险全费" prop="ALL_FEES">
<el-form-item label="保险全费(元)" prop="ALL_FEES">
<el-input
v-model="form.ALL_FEES"
maxlength="50"
@ -184,7 +184,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="净费实收" prop="ACTUAL_COLLECTION">
<el-form-item label="净费实收(元)" prop="ACTUAL_COLLECTION">
<el-input
v-model="form.ACTUAL_COLLECTION"
maxlength="50"
@ -283,6 +283,7 @@ import {
setInsureAdd,
setInsureEdit,
getTrailerList,
getTrailerList2,
} from "@/request/mechanical_files.js";
import {
INSURANCEMENU,
@ -358,7 +359,8 @@ const rules = {
REMINDER_DATE: [{ required: true, message: "请输入", trigger: "blur" }],
};
const getVehicle = async (event) => {
const resData = await getTrailerList({ TRAFFIC_TYPE: event });
const model = "insure"
const resData = await getTrailerList2({ TRAFFIC_TYPE: event, model });
data.vehicleList = resData.list;
form.value.VEHICLE = "";
data.busInfo.DRIVING_LICENSE_IMG = [];
@ -371,7 +373,7 @@ const getVehicle = async (event) => {
data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile([]);
};
const fnBusChange = async (event) => {
const resData = await getTrailerList({ ID: event });
const resData = await getTrailerList2({ ID: event });
data.busInfo = resData.list[0];
data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile(
resData.drivingLicenseImgs

View File

@ -169,12 +169,12 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="保险全费" prop="ALL_FEES">
<el-form-item label="保险全费(元)" prop="ALL_FEES">
<el-input v-model="form.ALL_FEES" maxlength="50" show-word-limit />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="净费实收" prop="ACTUAL_COLLECTION">
<el-form-item label="净费实收(元)" prop="ACTUAL_COLLECTION">
<el-input
v-model="form.ACTUAL_COLLECTION"
maxlength="50"

View File

@ -148,7 +148,6 @@
<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="CREATTIME" label="创建时间" width="150" />
<el-table-column prop="OPERATTIME" label="修改时间" width="150" />
<el-table-column label="操作" width="250">

View File

@ -17,21 +17,27 @@
<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="车辆品牌">
<!-- <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>-->
<el-descriptions-item label-class-name="width_200" label="车主业户">
{{ data.busInfo.CAR_OWNERS }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="车主电话">
{{ data.busInfo.CAR_OWNERS_TEL }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="联系电话">
{{ data.busInfo.CAR_OWNERS_TEL }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="初登日期">
{{ data.busInfo.INITIAL_REGISTRATION_DATE }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="所属区域">
{{ data.busInfo.COMPANY_AREA}}
</el-descriptions-item>
</el-descriptions>
<el-divider content-position="left">年检信息</el-divider>
<el-descriptions :column="2" border>
@ -39,7 +45,8 @@
{{ info.REGISTRANT }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="保险公司">
{{ info.INSURANCE_COMPANY_NAME }}
<span v-if="info.INSURANCE_COMPANY === '1'"></span>
<span v-else-if="info.INSURANCE_COMPANY === '2'">中国人寿</span>
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="保险项目">
{{ info.INSURANCE_COVERAGE }}
@ -56,13 +63,13 @@
<el-descriptions-item label-class-name="width_200" label="生效日期">
{{ info.EFFECTIVE_DATE }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="生效日期">
<el-descriptions-item label-class-name="width_200" label="到期日期">
{{ info.DUE_DATE }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="保险全费">
<el-descriptions-item label-class-name="width_200" label="保险全费(元)">
{{ info.ALL_FEES }}
</el-descriptions-item>
<el-descriptions-item label-class-name="width_200" label="净费实收">
<el-descriptions-item label-class-name="width_200" label="净费实收(元)">
{{ info.ACTUAL_COLLECTION }}
</el-descriptions-item>
<el-descriptions-item
@ -120,6 +127,7 @@ const data = reactive({
},
});
const insuranceCompanyList = await layoutFnGetInsuranceCompany();
const fnBusChange = async (event) => {
const resData = await getTrailerList({ ID: event });
data.busInfo = resData.list[0];

View File

@ -254,7 +254,7 @@ import {
getMaintenanceView,
setMaintenanceAdd,
setMaintenanceEdit,
getTrailerList,
getTrailerListMaintenance,
} from "@/request/mechanical_files.js";
import { MAINTENANCE_LEVEL_LIST, REMIND_DAYS } from "@/assets/js/constant.js";
import { setUploadImg } from "@/request/api.js";
@ -359,7 +359,7 @@ const getRemiderDate = (val) => {
};
const getVehicle = async (event) => {
const resData = await getTrailerList({ TRAFFIC_TYPE: event });
const resData = await getTrailerListMaintenance({ TRAFFIC_TYPE: event });
data.vehicleList = resData.list;
form.value.VEHICLE = "";
data.busInfo.DRIVING_LICENSE_IMG = [];
@ -373,7 +373,7 @@ const getVehicle = async (event) => {
};
getVehicle("1");
const fnBusChange = async (event) => {
const resData = await getTrailerList({ ID: event });
const resData = await getTrailerListMaintenance({ ID: event });
data.busInfo = resData.list[0];
data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile(
resData.drivingLicenseImgs

View File

@ -229,6 +229,7 @@ import {
setOperationsAdd,
setOperationsEdit,
getTrailerList,
getOperationTrailerList,
} from "@/request/mechanical_files.js";
import { OPERATING_VEHICLE_TYPE_LIST, REMIND_DAYS } from "@/assets/js/constant.js";
import { layoutFnGetAnnualInspectionCycle } from "@/assets/js/data_dictionary.js";
@ -334,7 +335,7 @@ const getRemiderDate = (val) => {
}
};
const getVehicle = async (event) => {
const resData = await getTrailerList({ TRAFFIC_TYPE: event });
const resData = await getOperationTrailerList({ TRAFFIC_TYPE: event });
data.vehicleList = resData.list;
form.value.VEHICLE = "";
data.busInfo.DRIVING_LICENSE_IMG = [];
@ -347,7 +348,7 @@ const getVehicle = async (event) => {
data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile([]);
};
const fnBusChange = async (event) => {
const resData = await getTrailerList({ ID: event });
const resData = await getOperationTrailerList({ ID: event });
data.busInfo = resData.list[0];
data.busInfo.DRIVING_LICENSE_IMG = addingPrefixToFile(
resData.drivingLicenseImgs

View File

@ -141,7 +141,6 @@
</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">
<template #default="{ row }">
<el-button
@ -227,6 +226,7 @@ import {
setOperationsDelete,
setOperationsEdit2,
} from "@/request/mechanical_files.js";
import ExportExcel from "./components/export_excel.vue";
import { reactive } from "vue";
import { debounce } from "throttle-debounce";
@ -236,6 +236,8 @@ import {
DUE_STATUS_LIST,
REMINDER_STATUS_LIST,
} from "@/assets/js/constant.js";
const router = useRouter();
const data = reactive({
exportExcelDialog: {

View File

@ -411,6 +411,7 @@ import { useRouter, useRoute } from "vue-router";
import {
addAccidentInvestigationView,
editAccidentInvestigation,
infoAccidentInvestigation
infoAccidentInvestigation,
} from "@/request/production_accident.js";
@ -511,6 +512,25 @@ 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 fnGetData = async () => {
const ACCIDENTINVESTIGATION_ID = route.query.ACCIDENTINVESTIGATION_ID
if (!ACCIDENTINVESTIGATION_ID) return;
const resData = await infoAccidentInvestigation({ ACCIDENTINVESTIGATION_ID });
data.form = resData.pd;
};
fnGetData();
const router = useRouter();
const fnGetUnitsList = async () => {
const resData = await getUserListAll({});

View File

@ -192,13 +192,14 @@ import {
setScrapManageEdit,
layoutFnGetScrapType,
getScrapOperationVehicleList,
getScrapFreightTrailerList
getScrapFreightTrailerList,
} from "@/request/scrap_manage.js";
import {
getFreightTrailerView,
} from "@/request/enterprise_management.js";
import {
getOperationVehicleInfo,
setOperationsScrapStatus
} from "@/request/operation_vehicle.js";
import LayoutUpload from "@/components/upload/index.vue";
import { debounce } from "throttle-debounce";
@ -297,6 +298,7 @@ const fnGetVehicleInfo = async () => {
form.value.SCRAP_VEHICLE
) {
const OPERATING_ID = form.value.OPERATIONVEHICLELIST[i].OPERATING_ID;
await setOperationsScrapStatus({OPERATING_ID})
const resData = await getOperationVehicleInfo({ OPERATING_ID });
info.value = resData.pd;
form.value.VEHICLE.VEHICLEOWNER = info.value.VEHICLEOWNER;

View File

@ -335,6 +335,9 @@ const fnGetExpireDate = async () => {
let day = date.getDate();
day = day < 10 ? "0" + day : day;
form.value.EXPIRE_DATE = year + "-" + month + "-" + day;
if(form.value.TRANSACTION_DATA === null) {
form.value.EXPIRE_DATE = null
}
}
fnGetReminderData()
};
@ -349,6 +352,9 @@ const fnGetReminderData = async () => {
let day = date.getDate();
day = day < 10 ? "0" + day : day;
form.value.REMINDER_DATA = year + "-" + month + "-" + day;
if(form.value.TRANSACTION_DATA === null) {
form.value.REMINDER_DATA = null
}
}
};
const fnGetTrailerInfo = async () => {

View File

@ -185,8 +185,6 @@
<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 {
import {
getTaxationManageList,
setTaxatonManageDelete,
@ -195,7 +193,7 @@ import { useRouter } from "vue-router";
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
import { debounce } from "throttle-debounce";
import { ElMessage, ElMessageBox } from "element-plus";
import { EXPIRE_STATUS, REMINDER_STATUS } from "@/assets/js/constant.js";
import { REMINDER_STATUS } from "@/assets/js/constant.js";
const router = useRouter();
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getTaxationManageList, {});

View File

@ -93,11 +93,11 @@ const rules = {
WATCHLEAD: [{ required: true, message: "值班领导不能为空", trigger: "blur" }],
WATCH_TELEPHONE: [
{ required: true, message: "请输入", trigger: "blur" },
{ min: 11, max: 11, message: "请输入11位机号码", trigger: "blur" },
{ min: 11, max: 11, message: "请输入11位机号码", trigger: "blur" },
{
pattern:
/^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/,
message: "请输入正确的机号码",
/^(\d{3,4}-)?\d{7,8}$/,
message: "请输入正确的机号码",
},
],
WATCH_PHONE: [

View File

@ -68,7 +68,7 @@
import { ref } from "vue";
import {
setEnterpriseSafetyProductEdit,
setEnterpriseSafetyProductAdd,
getEnterpriseSafetyProductEdit
} from "@/request/enterprise_safety_production.js";
import { debounce } from "throttle-debounce";
import useFormValidate from "@/assets/js/useFormValidate.js";
@ -88,11 +88,11 @@ const rules = {
WATCHLEAD: [{ required: true, message: "值班领导不能为空", trigger: "blur" }],
WATCH_TELEPHONE: [
{ required: true, message: "请输入", trigger: "blur" },
{ min: 11, max: 11, message: "请输入11位机号码", trigger: "blur" },
{ min: 11, max: 11, message: "请输入11位机号码", trigger: "blur" },
{
pattern:
/^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/,
message: "请输入正确的机号码",
/^(\d{3,4}-)?\d{7,8}$/,
message: "请输入正确的机号码",
},
],
WATCH_PHONE: [
@ -122,7 +122,7 @@ const form = ref({
});
const fnGetData = async () => {
if (!SAFETYPRODUCTION_ID) return;
const resData = await setEnterpriseSafetyProductEdit({ SAFETYPRODUCTION_ID });
const resData = await getEnterpriseSafetyProductEdit({ SAFETYPRODUCTION_ID });
form.value = resData.pd;
};
fnGetData();
@ -130,7 +130,7 @@ const fnSubmit = debounce(
1000,
async () => {
await useFormValidate(formRef);
await setEnterpriseSafetyProductAdd({ ...form.value });
await setEnterpriseSafetyProductEdit({ ...form.value });
ElMessage.success("提交成功");
router.back();
},

View File

@ -3,29 +3,47 @@
<el-divider content-position="left">基本信息</el-divider>
<el-descriptions border>
<el-descriptions-item label="设施名称">
{{ data.FACILITY_NAME }}
{{ info.FACILITY_NAME }}
</el-descriptions-item>
<el-descriptions-item label="设施编号">
{{ data.FACILITY_NUMBER }}
{{ info.FACILITY_NUMBER }}
</el-descriptions-item>
<el-descriptions-item label="设施单位">
{{ data.FACILITY_UNIT }}
{{ info.FACILITY_UNIT }}
</el-descriptions-item>
<el-descriptions-item label="设施数量">
{{ data.FACILITY_COUNT }}
{{ info.FACILITY_COUNT }}
</el-descriptions-item>
<el-descriptions-item label="设施位置">
{{ data.FACILITY_LOCALTION }}
{{ info.FACILITY_LOCALTION }}
</el-descriptions-item>
<el-descriptions-item label="设施负责人">
{{ data.FACILITY_PRINCIPAL }}
{{ info.FACILITY_PRINCIPAL }}
</el-descriptions-item>
<el-descriptions-item label="登记时间">
{{ data.REGISTRATION_TIME }}
{{ info.REGISTRATION_TIME }}
</el-descriptions-item>
<el-descriptions-item label="备注">
{{ info.FACILITY_REMARK }}
</el-descriptions-item>
<el-descriptions-item label="设备设施">
<img
v-for="item in info.EQUIPMENT_FACILITY"
:key="item.FILEPATH"
v-viewer
:src="item.url"
width="100"
height="100"
alt=""
class="ml-10"
/>
</el-descriptions-item>
</el-descriptions>
<el-divider content-position="left">保养记录</el-divider>
<layout-table :data="list" :show-pagination="false">
<layout-table :data="list"
:show-pagination="false"
@submit.prevent="fnResetPagination"
>
<el-table-column type="index" label="序号" align="center" />
<el-table-column prop="MAINTAIN_DATE" label="保养时间" />
<el-table-column prop="MAINTAIN_CONDITION" label="保养情况" />
@ -87,18 +105,22 @@ import useListData from "@/assets/js/useListData.js";
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
import { debounce } from "throttle-debounce";
import { ElMessage, ElMessageBox } from "element-plus";
import { addingPrefixToFile } from "@/assets/js/utils.js";
const route = useRoute();
const router = useRouter();
const { PRODUCTIONFACILITY_ID } = route.query;
const data = ref({});
const info = ref({});
const getData = async () => {
const { pd } = await getProductionEquipmentFacilityView({
const resData = await getProductionEquipmentFacilityView({
PRODUCTIONFACILITY_ID,
});
data.value = pd;
info.value = resData.pd;
info.value.EQUIPMENT_FACILITY = addingPrefixToFile(
resData.equipmentFacility
);
};
getData();
const { list } = useListData(getMaintainFindProductionEquipmentFacilityId, {
const { list, fnResetPagination } = useListData(getMaintainFindProductionEquipmentFacilityId, {
otherParams: { PRODUCTIONFACILITY_ID },
usePagination: false,
});
@ -109,6 +131,7 @@ const fnDelete = debounce(
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
await setMaintainDelete({ MAINTAIN_ID });
ElMessage.success("删除成功");
fnResetPagination()
},
{ atBegin: true }
);

View File

@ -80,27 +80,16 @@ import { setUploadImg } from "@/request/api.js";
const route = useRoute();
const router = useRouter();
const { MAINTAIN_ID } = route.query;
const rules = {
FACILITY_NUMBER: [
{ required: true, message: "设施编号不能为空", trigger: "blur" },
MAINTAIN_DATE: [
{ required: true, message: "保养时间不能为空", trigger: "blur" },
],
FACILITY_NAME: [
{ required: true, message: "设施名称不能为空", trigger: "blur" },
MAINTAIN_CONDITION: [
{ required: true, message: "保养情况不能为空", trigger: "blur" },
],
FACILITY_UNIT: [
{ required: true, message: "设施单位不能为空", trigger: "blur" },
],
FACILITY_COUNT: [
{ required: true, message: "设施数量不能为空", trigger: "blur" },
],
FACILITY_LOCALTION: [
{ required: true, message: "设施位置不能为空", trigger: "blur" },
],
FACILITY_PRINCIPAL: [
{ required: true, message: "设施负责人不能为空", trigger: "blur" },
],
REGISTRATION_TIME: [
{ required: true, message: "登记时间不能为空", trigger: "change" },
MAINTAIN_PERSON: [
{ required: true, message: "保养人不能为空", trigger: "blur" },
],
};
const formRef = ref(null);

View File

@ -4,25 +4,40 @@
<el-divider content-position="left">基本信息</el-divider>
<el-descriptions border>
<el-descriptions-item label="设施名称">
{{ data.FACILITY_NAME }}
{{ info.FACILITY_NAME }}
</el-descriptions-item>
<el-descriptions-item label="设施编号">
{{ data.FACILITY_NUMBER }}
{{ info.FACILITY_NUMBER }}
</el-descriptions-item>
<el-descriptions-item label="设施单位">
{{ data.FACILITY_UNIT }}
{{ info.FACILITY_UNIT }}
</el-descriptions-item>
<el-descriptions-item label="设施数量">
{{ data.FACILITY_COUNT }}
{{ info.FACILITY_COUNT }}
</el-descriptions-item>
<el-descriptions-item label="设施位置">
{{ data.FACILITY_LOCALTION }}
{{ info.FACILITY_LOCALTION }}
</el-descriptions-item>
<el-descriptions-item label="设施负责人">
{{ data.FACILITY_PRINCIPAL }}
{{ info.FACILITY_PRINCIPAL }}
</el-descriptions-item>
<el-descriptions-item label="登记时间">
{{ data.REGISTRATION_TIME }}
{{ info.REGISTRATION_TIME }}
</el-descriptions-item>
<el-descriptions-item label="备注">
{{ info.FACILITY_REMARK }}
</el-descriptions-item>
<el-descriptions-item label="设备设施">
<img
v-for="item in info.EQUIPMENT_FACILITY"
:key="item.FILEPATH"
v-viewer
:src="item.url"
width="100"
height="100"
alt=""
class="ml-10"
/>
</el-descriptions-item>
</el-descriptions>
<el-divider content-position="left">保养记录</el-divider>
@ -50,14 +65,18 @@ import { useRoute } from "vue-router";
import { ref } from "vue";
import useListData from "@/assets/js/useListData.js";
import { PRINT_STYLE } from "@/assets/js/constant.js";
import { addingPrefixToFile } from "@/assets/js/utils.js";
const route = useRoute();
const { PRODUCTIONFACILITY_ID } = route.query;
const data = ref({});
const info = ref({});
const getData = async () => {
const { pd } = await getProductionEquipmentFacilityView({
const resData = await getProductionEquipmentFacilityView({
PRODUCTIONFACILITY_ID,
});
data.value = pd;
info.value = resData.pd;
info.value.EQUIPMENT_FACILITY = addingPrefixToFile(
resData.equipmentFacility
);
};
getData();
const { list } = useListData(getMaintainFindProductionEquipmentFacilityId, {

View File

@ -31,9 +31,9 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="上报日期" prop="REPORTED_DATE">
<el-form-item label="上报日期" prop="REPORTED_TIME">
<el-date-picker
v-model="searchForm.REPORTED_DATE"
v-model="searchForm.REPORTED_TIME"
value-format="YYYY-MM-DD"
format="YYYY-MM-DD"
type="date"

View File

@ -167,6 +167,7 @@ const data = reactive({
fileList: [],
},
});
const fnSubmit = async () => {
await useFormValidate(formRef);

View File

@ -0,0 +1,201 @@
<template>
<layout-card>
<el-form
ref="formRef"
:model="data.form"
:rules="rules"
label-width="175px"
>
<el-divider content-position="left">添加</el-divider>
<el-row>
<el-col :span="5">
<el-form-item label="从业人员" prop="USER_ID">
<el-select v-model="data.form.USER_ID" placeholder="请选择从业人员">
<el-option
v-for="item in data.unitsList"
:key="item.USER_ID"
:label="item.NAME"
:value="item.USER_ID"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="车牌号" prop="TRANSPORTVEHICLE">
<el-select
v-model="data.form.TRANSPORTVEHICLE"
placeholder="请选择车辆"
>
<el-option
v-for="item in TRUCKMENU"
:key="item.id"
:label="item.id"
:value="item.name"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="处罚方式" prop="PENALTYMETHOD">
<el-select
v-model="data.form.PENALTYMETHOD"
placeholder="请选择会议类型"
>
<el-option
v-for="item in PENALTYMETHODMENU"
:key="item.id"
:label="item.id"
:value="item.name"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="PENALTYTIME" label="处罚时间">
<el-date-picker
v-model="data.form.PENALTYTIME"
type="date"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
placeholder="选择日期"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="处罚事件" prop="PENALTYEVENT">
<el-input
v-model="data.form.PENALTYEVENT"
placeholder="请输入处罚事件"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="处罚措施" prop="PENALTYMEASURES">
<el-input
v-model="data.form.PENALTYMEASURES"
placeholder="请输入处罚措施"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="处罚登记人" prop="PENALTYREGISTRANT">
<el-input
v-model="data.form.PENALTYREGISTRANT"
placeholder="请输入处罚登记人"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="会议文本附件" prop="fileList">
<layout-upload
v-model:file-list="data.form.fileList"
accept=".pdf"
delete-to-server
:limit="9"
:size="100"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="tc mt-10">
<el-button type="primary" @click="fnSubmit"> </el-button>
</div>
</layout-card>
</template>
<script setup>
import { getUserListAll } from "@/request/safety_production_related.js";
import { onMounted, reactive, ref, toRaw } from "vue";
import { PENALTYMETHODMENU, TRUCKMENU } from "@/assets/js/constant.js";
import LayoutUpload from "@/components/upload/index.vue";
import useFormValidate from "@/assets/js/useFormValidate.js";
import { useRoute, useRouter } from "vue-router";
import {
editViolationRegistration,
infoViolationRegistration
} from "@/request/violation_registration.js";
import { ElMessage } from "element-plus";
const formRef = ref(null);
const rules = {
TRANSPORTVEHICLE: [
{ required: true, message: "请选择运行车辆", trigger: "blur" },
],
USER_ID: [{ required: true, message: "请选择从业人员", trigger: "change" }],
PENALTYMETHOD: [
{ required: true, message: "请选择处罚方式", trigger: "blur" },
],
PENALTYEVENT: [
{ required: true, message: "请输入处罚事件", trigger: "change" },
],
PENALTYMEASURES: [
{ required: true, message: "请输入处罚措施", trigger: "blur" },
],
PENALTYREGISTRANT: [
{ required: true, message: "请输入处罚登记人", trigger: "blur" },
],
};
//
const route = useRoute();
const router = useRouter();
//
const isEditMode = ref(false);
const { REGISTRATION_ID } = route.query;
onMounted(() => {
isEditMode.value = route.query.mode === "edit";
});
const fnGetUnitsList = async () => {
const resData = await getUserListAll({});
data.unitsList = resData.userList;
};
fnGetUnitsList();
const data = reactive({
form: {
TRANSPORTVEHICLE: "",
USER_ID: "",
PENALTYMETHOD: "",
PENALTYTIME: "",
PENALTYEVENT: "",
PENALTYMEASURES: "",
PENALTYREGISTRANT: "",
fileList: [],
},
});
const fnGetData = async () => {
if (!REGISTRATION_ID) return;
const resData = await infoViolationRegistration({ REGISTRATION_ID });
data.form = resData.pd
};
fnGetData()
const fnSubmit = async () => {
await useFormValidate(formRef);
const rawForm = toRaw(data.form);
const formData = new FormData();
Object.keys(rawForm).forEach((key) => {
const value = rawForm[key];
formData.append(key, value);
});
await editViolationRegistration(data.form)
ElMessage.success("编辑成功");
router.back();
};
</script>
<style scoped lang="scss">
.flexBox {
display: flex;
align-items: flex-end;
.addBtn {
margin-left: 12px;
}
}
</style>

View File

@ -73,9 +73,14 @@
type="primary"
text
link
@click="fnAddOrEdit(row.REGISTRATION_ID)"
@click="
router.push({
path: '/production_course_regulate/violation_registration/edit',
query: { REGISTRATION_ID: row.REGISTRATION_ID },
})
"
>
编辑
修改
</el-button>
<el-button
type="danger"
@ -139,15 +144,7 @@ const data = reactive({
info: {},
},
});
const fnAddOrEdit = (registrationId) => {
router.push({
path: "/production_course_regulate/violation_registration/add",
query: {
mode: "edit",
registrationId,
},
});
};
//
const deleteItem = async (value) => {
await ElMessageBox.confirm(`确定要删除吗?`, {

View File

@ -126,9 +126,7 @@ const rules = {
TITLE: [{ required: true, message: "请输入通知标题", trigger: "blur" }],
LEVEL: [{ required: true, message: "请选择通知等级", trigger: "blur" }],
PERSON: [{ required: true, message: "请选择通知人员", trigger: "blur" }],
NOTIFICATIONCONTENT: [
{ required: true, message: "请输入通知内容", trigger: "blur" },
],
NOTIFICATIONCONTENT: [{ required: true, message: "请输入通知内容", trigger: "blur" }],
};
const relatedClassificationTempList =
await layoutFnGetNotificationsClassification();

View File

@ -97,6 +97,9 @@ const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } =
clearSelection: false,
});
const stop = watch(
() => props.visible,
(value) => {