Browse Source

HL-5940SCP正式环境,设置供应商发票申请,发票附加上传只能上传一个附件

hella_online_20240919
yufei_wang 2 months ago
parent
commit
2db8fb02c0
  1. 16
      src/components/Detail/src/Detail.vue
  2. 2
      src/components/UploadFile/src/UploadFile.vue
  3. 1
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

16
src/components/Detail/src/Detail.vue

@ -589,24 +589,36 @@ const getAnnexFileList = async (row) => {
const annexData = annexTableData.value.find(annex=>annex.label === item.label) const annexData = annexTableData.value.find(annex=>annex.label === item.label)
let subDetailTableData = null let subDetailTableData = null
if(annexData){ if(annexData){
// HL-5940 maxLength // HL-5940 maxLength
let hiddenUpload = false let hiddenUpload = false
if(item.maxLength&&annexList.length>=item.maxLength){ if(item.maxLength){
if(annexList.length>=item.maxLength){
hiddenUpload = true hiddenUpload = true
}else{
hiddenUpload = false
}
let findAnnex = annexTableData.value.find(item1=>item1.label==item.label) let findAnnex = annexTableData.value.find(item1=>item1.label==item.label)
if(findAnnex){ if(findAnnex){
findAnnex.hiddenUpload = hiddenUpload || item.hiddenUpload || false // findAnnex.hiddenUpload = hiddenUpload || item.hiddenUpload || false //
} }
} }
annexData.annexList = annexList annexData.annexList = annexList
subDetailTableData = annexData.subDetailTableData subDetailTableData = annexData.subDetailTableData
}else{ }else{
subDetailTableData = item?.subDetailTableData subDetailTableData = item?.subDetailTableData
// HL-5940 maxLength // HL-5940 maxLength
let hiddenUpload = false let hiddenUpload = false
if(item.maxLength&&annexList.length>=item.maxLength){ if(item.maxLength){
if(annexList.length>=item.maxLength){
hiddenUpload = true hiddenUpload = true
}else{
hiddenUpload = false
} }
}
annexTableData.value.push({ annexTableData.value.push({
align:item.align, align:item.align,

2
src/components/UploadFile/src/UploadFile.vue

@ -124,7 +124,7 @@ const handleFileSuccess: UploadProps['onSuccess'] = (res: any,uploadFile: any):
} }
// //
const handleExceed: UploadProps['onExceed'] = (): void => { const handleExceed: UploadProps['onExceed'] = (): void => {
message.error(`${t('ts.上传文件数量不能过')}${props.limit}!`) message.error(`${t('ts.上传文件数量不能过')}${props.limit}!`)
} }
// //
const excelUploadError: UploadProps['onError'] = (): void => { const excelUploadError: UploadProps['onError'] = (): void => {

1
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -963,6 +963,7 @@ const detailAnnexTable = ref([
showDownload:true, showDownload:true,
fileSize: 20, fileSize: 20,
maxLength:1, maxLength:1,
limit:1,
fileType:['pdf'] fileType:['pdf']
}, },
{ {

Loading…
Cancel
Save