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,
|
usrAllocations: formData.value.tableData,
|
||||||
deploymentId: processInstanceData.value.deploymentId,
|
deploymentId: processInstanceData.value.deploymentId,
|
||||||
}
|
}
|
||||||
console.log('params', params, formData.value.tableData)
|
// console.log('params', params, formData.value.tableData)
|
||||||
const {code, msg} = await addAllocation(params)
|
const {code, msg} = await addAllocation(params)
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -346,8 +346,6 @@ const handleResubmit = (instance) => {
|
|||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let newUsrAllocationsObj = {}
|
|
||||||
let newUsrAllocationsObjArray = []
|
|
||||||
let researchPersonnelId = ''
|
let researchPersonnelId = ''
|
||||||
formData.value.tableData.forEach(item => {
|
formData.value.tableData.forEach(item => {
|
||||||
item.allocationId = formData.value.allocationId
|
item.allocationId = formData.value.allocationId
|
||||||
@@ -356,24 +354,6 @@ const handleResubmit = (instance) => {
|
|||||||
if (item.performance == 0) {
|
if (item.performance == 0) {
|
||||||
item.performance = null
|
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) {
|
if (!researchPersonnelId) {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -383,15 +363,14 @@ const handleResubmit = (instance) => {
|
|||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log('formData.value.apportionmentMonth',new Date(formData.value.apportionmentMonth))
|
|
||||||
let params = {
|
let params = {
|
||||||
allocationId: formData.value.allocationId,
|
allocationId: formData.value.allocationId,
|
||||||
shareName: formData.value.shareName,
|
shareName: formData.value.shareName,
|
||||||
apportionmentMonth: formData.value.apportionmentMonth,
|
apportionmentMonth: formData.value.apportionmentMonth,
|
||||||
usrAllocations:newUsrAllocationsObjArray,
|
usrAllocations:formData.value.tableData,
|
||||||
deploymentId: processInstanceData.value.deploymentId,
|
deploymentId: processInstanceData.value.deploymentId,
|
||||||
}
|
}
|
||||||
console.log('params', params, formData.value.tableData)
|
// console.log('params', params, formData.value.tableData)
|
||||||
const {code, msg} = await editAllocation(params)
|
const {code, msg} = await editAllocation(params)
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|||||||
Reference in New Issue
Block a user