Merge pull request 'fix : 修复分摊编辑传参' (#474) from dd into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/474
This commit is contained in:
@@ -320,7 +320,7 @@ const handleSubmit = (instance) => {
|
||||
usrAllocations: formData.value.tableData,
|
||||
deploymentId: processInstanceData.value.deploymentId,
|
||||
}
|
||||
console.log('params', params, formData.value.tableData)
|
||||
// console.log('params', params, formData.value.tableData)
|
||||
const {code, msg} = await addAllocation(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -346,8 +346,6 @@ const handleResubmit = (instance) => {
|
||||
})
|
||||
return;
|
||||
}
|
||||
let newUsrAllocationsObj = {}
|
||||
let newUsrAllocationsObjArray = []
|
||||
let researchPersonnelId = ''
|
||||
formData.value.tableData.forEach(item => {
|
||||
item.allocationId = formData.value.allocationId
|
||||
@@ -356,24 +354,6 @@ const handleResubmit = (instance) => {
|
||||
if (item.performance == 0) {
|
||||
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,
|
||||
}
|
||||
newUsrAllocationsObjArray.push(newUsrAllocationsObj)
|
||||
})
|
||||
if (!researchPersonnelId) {
|
||||
ElNotification({
|
||||
@@ -383,15 +363,14 @@ const handleResubmit = (instance) => {
|
||||
})
|
||||
return;
|
||||
}
|
||||
console.log('formData.value.apportionmentMonth',new Date(formData.value.apportionmentMonth))
|
||||
let params = {
|
||||
allocationId: formData.value.allocationId,
|
||||
shareName: formData.value.shareName,
|
||||
apportionmentMonth: formData.value.apportionmentMonth,
|
||||
usrAllocations:newUsrAllocationsObjArray,
|
||||
usrAllocations:formData.value.tableData,
|
||||
deploymentId: processInstanceData.value.deploymentId,
|
||||
}
|
||||
console.log('params', params, formData.value.tableData)
|
||||
// console.log('params', params, formData.value.tableData)
|
||||
const {code, msg} = await editAllocation(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
|
||||
Reference in New Issue
Block a user