Browse Source

YT-874:纳入受领书导入失败问题解决

intex
ljlong_2630 6 days ago
parent
commit
9f61460bdb
  1. 2
      src/components/ImportForm/src/ImportFormOnlyAdd.vue
  2. 13
      src/components/ImportForm/src/ImportFormStep.vue
  3. 14
      src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts

2
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())

13
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

14
src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts

@ -972,13 +972,14 @@ export const DeliverRecordImportRules = reactive({
*/
export const ImportLeadershipDocTempData = useCrudSchemas(reactive<CrudSchema[]>([
{
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<CrudSchema[]>
field: 'materialCode',
sort: 'custom',
},
{
label: '物料描述',
field: 'materialDesc',
sort: 'custom',
},
{
label: '背番',
field: 'backNumber',

Loading…
Cancel
Save