diff --git a/src/components/AttachmentUpload.vue b/src/components/AttachmentUpload.vue index 3a317b4..70bb806 100644 --- a/src/components/AttachmentUpload.vue +++ b/src/components/AttachmentUpload.vue @@ -223,21 +223,20 @@ const isSingleFile = ref(false) const allFileList = ref([]) const deleteFileVal = ref({}) const singleFileList = ref([]) -if (props.formData.fileList !== null && props.formData.fileList?.length > 0) { - allFileList.value = props.formData.fileList -} - +// if (props.formData.fileList !== null && props.formData.fileList?.length > 0) { +// allFileList.value = props.formData.fileList +// } watch(() => props.showSingleTable, (newVal) => { props.showSingleTable = newVal }, {deep: true}) -// watch(() => props.formData.fileList, (newVal) => { -// console.log('newVal-fileList', newVal) -// if (props.preview) { -// // newVal?.forEach(item => { -// // allFileList.value.push(item) -// // }) -// } -// }, {deep: true}) +watch(() => props.formData.fileList, (newVal) => { + console.log('newVal-fileList', newVal) + if (props.preview) { + newVal?.forEach(item => { + allFileList.value.push(item) + }) + } +}, {immediate: true}) // watch(() => props.otherFileList, (newVal) => { // props.otherFileList=newVal // if (props.preview) { @@ -280,8 +279,6 @@ const handleDelete = (row, type) => { singleFileList.value.splice(singleFileList.value.findIndex((item) => item.fileId === row.fileId), 1); isSingleFile.value = false } else { - console.log('allFileList.value',allFileList.value,row) - console.log('allFileList.value.findIndex((item) => item.id === row.fileId)',allFileList.value.findIndex((item) => item.id === row.fileId)) allFileList.value.splice(allFileList.value.findIndex((item) => item.fileId === row.fileId), 1); } } diff --git a/src/views/expense-management/share/add.vue b/src/views/expense-management/share/add.vue index 1e868fe..d74d6b5 100644 --- a/src/views/expense-management/share/add.vue +++ b/src/views/expense-management/share/add.vue @@ -115,7 +115,7 @@
-
流程图
+
流程图
{ name: row.researchPersonnel, companyName: row.companyName, } - userList.value.push(userObj) + userList.value=[userObj] } - userPicker.value.showUserPicker() + nextTick(() => { + userPicker.value.showUserPicker() + }) } const selected = (select) => { + console.log('select',select) if (!select || select.length === 0) { return } @@ -228,7 +231,7 @@ const selected = (select) => { item.researchPersonnel = select[0].name } }) - userList.value=select + // userList.value=select } const getResearchOptions = async () => { const res = await getResearchUser() @@ -353,13 +356,18 @@ const handleResubmit = (instance) => { item.performance = null } newUsrAllocationsObj = { + allocationId: formData.value.allocationId, + id: item.id, projectId: item.projectId, projectName: item.projectName, + researchPersonnel: item.researchPersonnel, researchPersonnelId: item.researchPersonnelId, wagesPayable: item.wagesPayable, performance: item.performance, reserveFund: item.reserveFund, socialSecurity: item.socialSecurity, + time: item.time, + subtotal: item.subtotal, annuity: item.annuity, workday: item.workday, researchDuration: item.researchDuration, @@ -378,9 +386,10 @@ const handleResubmit = (instance) => { allocationId: formData.value.allocationId, shareName: formData.value.shareName, apportionmentMonth: formData.value.apportionmentMonth, - usrAllocations: newUsrAllocationsObjArray, + usrAllocations:newUsrAllocationsObjArray, deploymentId: processInstanceData.value.deploymentId, } + console.log('params', params, formData.value.tableData) const {code, msg} = await editAllocation(params) ElNotification({ title: '提示',