From 9f61460bdb158eedc683edc24506532c831d1d67 Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Mon, 18 Nov 2024 00:27:28 +0800 Subject: [PATCH] =?UTF-8?q?YT-874=EF=BC=9A=E7=BA=B3=E5=85=A5=E5=8F=97?= =?UTF-8?q?=E9=A2=86=E4=B9=A6=E5=AF=BC=E5=85=A5=E5=A4=B1=E8=B4=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ImportForm/src/ImportFormOnlyAdd.vue | 2 +- src/components/ImportForm/src/ImportFormStep.vue | 13 ++++++++++++- .../deliverRecordMain/deliverRecordMain.data.ts | 14 ++++++++++---- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/components/ImportForm/src/ImportFormOnlyAdd.vue b/src/components/ImportForm/src/ImportFormOnlyAdd.vue index 9f8c541e5..803f15125 100644 --- a/src/components/ImportForm/src/ImportFormOnlyAdd.vue +++ b/src/components/ImportForm/src/ImportFormOnlyAdd.vue @@ -223,7 +223,7 @@ const submitForm = async () => { message.error('请上传文件') return } - // 校验文件类型 + // 校验文件类型 const fileName = fileList.value[0].name const fileExtension = fileName.substring(fileName.lastIndexOf('.')).toLowerCase() const acceptedTypes = accept.value.split(',').map(type => type.toLowerCase()) diff --git a/src/components/ImportForm/src/ImportFormStep.vue b/src/components/ImportForm/src/ImportFormStep.vue index 832e09cee..8ab0e67d4 100644 --- a/src/components/ImportForm/src/ImportFormStep.vue +++ b/src/components/ImportForm/src/ImportFormStep.vue @@ -232,7 +232,7 @@ const submitForm = async () => { error.value = false return }else{ - message.success(msg) + message.success("导入成功!") error.value = false active.value = 2 // 设置为第三步 return @@ -258,6 +258,17 @@ const submitForm = async () => { message.error('请上传文件') return } + // 校验文件类型 + const fileName = fileList.value[0].name + const fileExtension = fileName.substring(fileName.lastIndexOf('.')).toLowerCase() + const acceptedTypes = accept.value.split(',').map(type => type.toLowerCase()) + + // 检查文件扩展名是否在允许的类型列表中 + if (!acceptedTypes.some(type => type === fileExtension || type === `.*${fileExtension}`)) { + message.error(`只能上传 ${accept.value} 格式的文件`) + return + } + // 读取文件内容 const fileReader = new FileReader() const originalFile = fileList.value[0].raw diff --git a/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts index fd67da1af..c47de8209 100644 --- a/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts @@ -972,13 +972,14 @@ export const DeliverRecordImportRules = reactive({ */ export const ImportLeadershipDocTempData = useCrudSchemas(reactive([ { - label: '纳入受领书单号', - field: 'incorporationNumber', + label: '编号', + field: 'id', sort: 'custom', + isTable: false, }, { - label: '类型', - field: 'type', + label: '纳入受领书单号', + field: 'incorporationNumber', sort: 'custom', }, { @@ -991,6 +992,11 @@ export const ImportLeadershipDocTempData = useCrudSchemas(reactive field: 'materialCode', sort: 'custom', }, + { + label: '物料描述', + field: 'materialDesc', + sort: 'custom', + }, { label: '背番', field: 'backNumber',