Commit 1835b334 authored by 祁正's avatar 祁正

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

parent 126c9bfb
...@@ -140,22 +140,20 @@ const resetForm = () => { ...@@ -140,22 +140,20 @@ const resetForm = () => {
let type = route.query.type let type = route.query.type
let id = parseInt(route.query.id) let id = parseInt(route.query.id)
if (type === "新增"){ if (type === "新增"){
//新增页面
console.log("type",type)
console.log("路由",id)
getCostRequestDetail(id).then(res=>{ getCostRequestDetail(id).then(res=>{
console.log("项目详情",res)
Object.assign(costReimbursementDetail, res.data); Object.assign(costReimbursementDetail, res.data);
}) })
}else if(type === "编辑"){ }else if(type === "编辑"){
//编辑页面 //编辑页面
console.log("type",type)
console.log("路由",id) console.log("路由",id)
// 等后端把 少的两个字段返给我 直接调报销详情的接口
getReimbursementDetail(id).then(res=>{ getReimbursementDetail(id).then(res=>{
console.log("报销详情",res) console.log("报销详情",res)
Object.assign(costReimbursementDetail, res.data); let obj = res.data
getReimbursementDetail() //字典转换
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);
}) })
} }
......
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