BUG优化

dev
xiepeng 2024-05-15 18:08:36 +08:00
parent 274b58f12f
commit fd40d59ede
7 changed files with 34 additions and 22 deletions

View File

@ -67,6 +67,9 @@ export const setFreightTrailerEdit = (params) =>
export const setFreightTrailerDelete = (params) =>
post("/freightTrailer/delete", params); // 货运挂车删除
export const findTrailerByPlateNumber = (params) =>
post("/freightTrailer/findTrailerByPlateNumber", params); // 根据Id获取运营车辆信息
export const getChoiceTrailerList = (params) =>
post("/taxationmanage/choicetrailerlist", params); // 车船税添加选择挂车

View File

@ -17,7 +17,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="演练时间" prop="CATEGORY">
<el-form-item label="演练时间" prop="dates">
<el-date-picker
v-model="searchForm.dates"
type="daterange"

View File

@ -154,7 +154,12 @@
</el-col>
<el-col :span="24">
<el-form-item label="相关附件" prop="file">
<layout-upload v-model:file-list="form.file" />
<layout-upload
v-model:file-list="form.file"
accept=".pdf"
:limit="99"
delete-to-server
/>
</el-form-item>
</el-col>
</el-row>
@ -245,12 +250,14 @@ const fnGetData = async () => {
if (!EMERGENCYPLAN_ID) return;
const resData = await getEmergencyPlanManagementView({ EMERGENCYPLAN_ID });
form.value = resData.pd;
form.value.file = [
{
url: VITE_FILE_URL + resData.pd.PLAN_ATTACH_IDS,
name: resData.pd.PLAN_ATTACH_NAME,
},
];
if(form.value.PLAN_ATTACH_NAME) {
form.value.file = [
{
url: VITE_FILE_URL + resData.pd.PLAN_ATTACH_IDS,
name: resData.pd.PLAN_ATTACH_NAME,
},
];
}
};
fnGetData();
const applicableFieldsList = await layoutFnGetApplicableFields();

View File

@ -290,6 +290,7 @@ import {
getFreightTrailerView,
setFreightTrailerAdd,
setFreightTrailerEdit,
findTrailerByPlateNumber
} from "@/request/enterprise_management.js";
import { setUploadImg } from "@/request/api.js";
import { ElMessage } from "element-plus";
@ -326,6 +327,14 @@ const form = ref({
OPER_CERTIFICATE_IMG: [],
TRAILER_INFO: [],
});
const isPlateNumberRepetition = async (rule, vehicleNumber, callback) => {
if (vehicleNumber) {
const vehicleCount = await findTrailerByPlateNumber({ vehicleNumber });
if (vehicleCount.pd) {
callback(new Error("车辆已存在"));
} else callback();
}
};
const isVehicleNumber = (rule, vehicleNumber, callback) => {
if (vehicleNumber) {
const xreg =
@ -349,6 +358,7 @@ const rules = {
PLATE_NUMBER: [
{ required: true, message: "请输入", trigger: "blur" },
{ validator: isVehicleNumber, trigger: "blur" },
{ validator: isPlateNumberRepetition, trigger: "blur" },
],
VIN: [{ required: true, message: "请输入", trigger: "blur" }],
TRAILER_TYPE: [{ required: true, message: "请输入", trigger: "blur" }],

View File

@ -204,6 +204,8 @@ const data = reactive({
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
useListData(getOperationVehicleList, {});
const varList = await getOperationVehicleList();
console.log(varList);
const troubleshootingCycleList = await layoutFnGetVehicleColor();
const fnGetDataTransfer = () => {
fnGetData({

View File

@ -803,15 +803,9 @@ const rules = {
],
NATION: [{ required: true, message: "民族不能为空", trigger: "change" }],
SEX: [{ required: true, message: "性别不能为空", trigger: "change" }],
POLITICAL_OUTLOOK: [
{ required: true, message: "政治面貌不能为空", trigger: "change" },
],
DATE_OF_BIRTH: [
{ required: true, message: "请选择出生年月", trigger: "change" },
],
DEGREE_OF_EDUCATION: [
{ required: true, message: "文化程度不能为空", trigger: "change" },
],
PERSONNEL_TYPE: [
{ required: true, message: "人员类型不能为空", trigger: "change" },
],
@ -819,14 +813,11 @@ const rules = {
ENTRY_DATE: [
{ required: true, message: "请选择入职日期", trigger: "change" },
],
WORKING_DATE: [
{ required: true, message: "请选择参加工作日期", trigger: "change" },
],
INCUMBENCY: [
{ required: true, message: "在职情况不能为空", trigger: "change" },
],
TITLE: [{ required: true, message: "职称不能为空", trigger: "change" }],
DUTIES: [{ required: true, message: "职务不能为空", trigger: "change" }],
SHIFTDUTYONE: [{ required: true, message: "请选择排班", trigger: "change" }],
SHIFTDUTYTWO: [{ required: true, message: "请选择排班", trigger: "change" }],
periodStr: [

View File

@ -306,7 +306,7 @@ const fnGetVehicleInfo = async () => {
form.value.VEHICLE.VEHICLEOWNER_NUMBER = info.value.VEHICLEOWNER_NUMBER;
form.value.VEHICLE.PLATE_NUMBER = info.value.PLATE_NUMBER;
form.value.VEHICLE.FRAMES_NUMBER = info.value.FRAMES_NUMBER;
form.value.VEHICLE.SCRAP_VEHICLEMODEL = info.value.VEHICLE_MODEL;
form.value.VEHICLE.SCRAP_VEHICLEMODEL = form.value.SCRAP_VEHICLEMODEL;
form.value.VEHICLE.BRAND = info.value.VEHICLE_BRAND;
form.value.VEHICLE.EMISSION_STANDARD = info.value.EMISSION_STANDARD;
form.value.VEHICLE.POWER_TYPE = info.value.VEHICLE_BRAND;
@ -344,8 +344,7 @@ const fnGetVehicleInfo = async () => {
form.value.VEHICLE.PLATE_NUMBER =
form.value.FREIGHTVEHICLELIST[i].PLATE_NUMBER;
form.value.VEHICLE.FRAMES_NUMBER = form.value.FREIGHTVEHICLELIST[i].VIN;
form.value.VEHICLE.SCRAP_VEHICLEMODEL =
form.value.FREIGHTVEHICLELIST[i].TRAILER_MODEL;
form.value.VEHICLE.SCRAP_VEHICLEMODEL = form.value.SCRAP_VEHICLEMODEL;
form.value.VEHICLE.BRAND =
form.value.FREIGHTVEHICLELIST[i].TRAILER_BRAND;
form.value.VEHICLE.EMISSION_STANDARD =