Commit ed88a5b4 authored by 祁正's avatar 祁正

项目费用申报销-编辑改bug

parent 1835b334
......@@ -141,7 +141,12 @@ let type = route.query.type
let id = parseInt(route.query.id)
if (type === "新增"){
getCostRequestDetail(id).then(res=>{
Object.assign(costReimbursementDetail, res.data);
let obj = res.data
//字典转换
obj.projectType = projectTypeOptions.find(item=>item.dictValue === String(obj.projectType)).dictLabel
obj.projectStatus = projectStatusOptions.find(item=>item.dictValue === String(obj.projectStatus)).dictLabel
Object.assign(costReimbursementDetail, obj);
})
}else if(type === "编辑"){
//编辑页面
......@@ -163,13 +168,13 @@ const handleSubmit = ()=>{
if (valid) {
//验证通过
console.log('表单验证通过');
let obj = {
rid:id,
actualAmount:costReimbursementDetail.actualAmount,
description:costReimbursementDetail.description
}
if (type === "新增") {
if (type === "新增") {
let obj = {
rid:id,
actualAmount:costReimbursementDetail.actualAmount,
description:costReimbursementDetail.description
}
// 发 新增报销 请求
addReimbursement(obj).then(response => {
if (response.code === 200) {
......@@ -182,6 +187,11 @@ const handleSubmit = ()=>{
});
} else if (type === "编辑") {
let obj = {
id:id,
actualAmount:costReimbursementDetail.actualAmount,
description:costReimbursementDetail.description
}
console.log("修改后数据",obj)
// 发 修改报销 请求
updateReimbursement(obj).then(response => {
......
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