bug修复

This commit is contained in:
hongchao 2024-12-20 17:54:25 +08:00
parent 30db2836f6
commit 3518ba8398
2 changed files with 37 additions and 15 deletions

View File

@ -297,7 +297,7 @@ const getDetailData = async (row: any) => {
if(addAndEditForm.tableList!=null){
addAndEditForm.tableList.forEach((item:any) =>{
equipTableList.value.push({
identifyCodes: item.identifyCodes,
identifyCode: item.identifyCode,
name2: item.insurancePdf[0].fileUrl,
checkMan: item.checkMan,
checkDate: item.checkDate,
@ -309,7 +309,7 @@ const getDetailData = async (row: any) => {
})
}else{
equipTableList.value = [{
identifyCodes: '',
identifyCode: '',
name2: '',
checkMan: '',
checkDate: '',
@ -323,7 +323,7 @@ const getDetailData = async (row: any) => {
if(addAndEditForm.tableList!=null){
addAndEditForm.tableList.forEach((item:any) =>{
equipTableList.value.push({
identifyCodes: item.identifyCodes,
identifyCode: item.identifyCode,
name2: item.insurancePdf[0].fileUrl,
checkMan: item.checkMan,
checkDate: item.checkDate,
@ -489,7 +489,7 @@ const dialogTypeChange = async () => {
addAndEditFormRef.value.clearValidate(['unitName', 'dayLeasePrice'])
equipTableList.value = []
equipTableList.value.push({
identifyCodes: '',
identifyCode: '',
name2: '',
checkMan: '',
checkDate: '',
@ -687,7 +687,7 @@ const submitFun = (type: any) => {
addAndEditFormRef.value.validate(async (valid: any) => {
if (valid) {
let isDescription = false
addAndEditForm.identifyCodes = []
addAndEditForm.identifyCode = []
descriptionFormList.value.forEach((e: any, index: number) => {
e.insurancePdfs = [...e.insurancePdfs, ...e.insuranceATempPdf]
e.examinationPdfs = [...e.examinationPdfs, ...e.examinationTempPdf]
@ -703,7 +703,7 @@ const submitFun = (type: any) => {
} else {
addAndEditForm.insurancePdfs[index] = e.insurancePdfs
addAndEditForm.examinationPdfs[index] = e.examinationPdfs
addAndEditForm.identifyCodes.push(e.identifyCode)
addAndEditForm.identifyCode.push(e.identifyCode)
}
})
@ -1023,7 +1023,7 @@ const addAndEditForm = reactive<any>({
insurancePdfs: [],
examinationPdfs: [],
devInfoProperties: [],
identifyCodes: [],
identifyCode: [],
tableList: [],
})
// const addAndEditFormTemp = reactive<any>()
@ -1158,7 +1158,7 @@ const onDialogClose = () => {
examinationPdf: [],
insurancePdfs: [],
examinationPdfs: [],
identifyCodes: [],
identifyCode: [],
})
}
const propertyNames = ref<any>([])
@ -1182,7 +1182,7 @@ const equipTableList = ref<any>([])
const handleAddBack = () => {
let obj = {
identifyCodes: '',
identifyCode: '',
name2: '',
checkMan: '',
checkDate: '',
@ -1963,13 +1963,13 @@ const changeDate = (row:any,index:number) => {
<el-table-column label="序号" type="index" width="55" align="center" />
<el-table-column
label="唯一标识符"
prop="identifyCodes"
prop="identifyCode"
align="center"
:show-overflow-tooltip="true"
>
<template #default="{row,$index}">
<el-input
v-model="row.identifyCodes"
v-model="row.identifyCode"
style="width: 100%"
placeholder="请输入唯一标识符"
maxlength="20"

View File

@ -178,18 +178,20 @@
style="width: 100%"
placeholder="请选择关联装备"
v-model="addOrEditForm.maId"
@change="onChange"
filterable
>
<el-option
:key="item.maId"
:value="item.maId * 1"
:label="item.deviceName"
:label="item.deviceName+' '+ '->' + ' '+item.code"
v-for="item in associationList"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<!-- <el-row :gutter="20">
<el-col :span="24">
<el-form-item label="质检名称" prop="qcName">
<el-input
@ -198,7 +200,7 @@
/>
</el-form-item>
</el-col>
</el-row>
</el-row> -->
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="质检员" prop="qcUser">
@ -225,6 +227,21 @@
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="下次质检日期" prop="nextQcTime">
<el-date-picker
clearable
type="date"
style="width: 100%"
value-format="YYYY-MM-DD"
v-model="addOrEditForm.nextQcTime"
placeholder="请选择下次质检日期"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
@ -469,7 +486,7 @@ const checkMaxNum = (rule: any, value: any, callback: any) => {
const addOrEditFormRules = reactive({
maId: [{ required: true, message: '请选择关联装备', trigger: 'change' }],
qcName: [{ required: true, message: '请输入质检名称', trigger: 'blur' }],
nextQcTime: [{ required: true, message: '请输入下次质检日期', trigger: 'blur' }],
qcUser: [{ required: true, message: '请输入质检员', trigger: 'change' }],
qcTime: [{ required: true, message: '请选择质检日期', trigger: 'change' }],
fileInfoList: [{ required: true, message: '请上传质检附件', trigger: 'blur' }],
@ -617,6 +634,10 @@ const onFileChange = (fileList: any) => {
addOrEditForm.value.fileInfoTempList.push(...fileListTemp)
}
const onChange = (value: any) => {
addOrEditForm.value.qcTime = ''
addOrEditForm.value.nextQcTime = ''
}
//
const onCancel = () => {
@ -628,6 +649,7 @@ const onClose = () => {
}
}
onMounted(() => {
getLeaseListData()
getAssociationListData()