Commit a22a5886 by yuzhenWang

修复bug

parent 47535175
......@@ -321,12 +321,7 @@ import { getToken } from '@/utils/auth'
import { getNowTime, formatToDate, formatToDateTime } from '@/utils/date'
const filePreviewRef = ref(null)
let tempPolicyNo = ref('')
const previewVisible = ref(false)
const currentFileUrl = ref('')
const currentFileName = ref('')
const currentOtherFile = ref({ fileUrl: '', fileName: '' })
const { proxy } = getCurrentInstance()
const userStore = useUserStore()
// 分页相关
const currentPage = ref(1)
const pageSize = ref(10)
......@@ -1093,18 +1088,18 @@ const editRemittance = async row => {
newObj.insuranceCompany = addCheckRecordFormModel.value.insuranceCompany
// 上传回显得格式是[{url:''}]所以要处理一下
for (const key in newObj) {
if (
key == 'accountVerificationDtoList' ||
(key == 'paymentVoucherDtoList' && newObj[key] && newObj[key].length > 0)
) {
if (key == 'accountVerificationDtoList' || key == 'paymentVoucherDtoList') {
console.log('key', key)
newObj[key] = newObj[key].map(item => {
return {
url: item.fileUrl,
name: item.fileName
}
})
if (newObj[key] && newObj[key].length > 0) {
newObj[key] = newObj[key].map(item => {
return {
url: item.fileUrl,
name: item.fileName
}
})
} else {
newObj[key] = []
}
}
if (key == 'apiPremiumRemittanceFileDtoList' && newObj[key] && newObj[key].length > 0) {
newObj[key] = newObj[key].map(item => {
......@@ -1114,28 +1109,26 @@ const editRemittance = async row => {
url: item.fileUrl
}
}
// else {
// return {
// url: item.fileUrl,
// name: item.fileName
// }
// }
})
}
}
remittanceFormModel.value = newObj
console.log('remittanceFormModel.value', remittanceFormModel.value)
if (newObj.accountVerificationDtoList && newObj.accountVerificationDtoList.length > 0) {
remittanceFormModel.value.accountVerificationList = newObj.accountVerificationDtoList
} else {
remittanceFormModel.value.accountVerificationList = []
}
if (newObj.paymentVoucherDtoList && newObj.paymentVoucherDtoList.length > 0) {
remittanceFormModel.value.paymentVoucherList = newObj.paymentVoucherDtoList
} else {
remittanceFormModel.value.paymentVoucherList = []
}
if (remittanceFormModel.value.apiPremiumRemittanceFileDtoList.length > 0) {
tempOtherFileList.value = remittanceFormModel.value.apiPremiumRemittanceFileDtoList
}
console.log('remittanceFormModel.value', remittanceFormModel.value)
showRemittance.value = true
}
// 删除汇款记录
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment