fix : 修复项目实施-台账基础信息展示及表格更新功能
This commit is contained in:
@@ -9,9 +9,9 @@
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="projectChargePerson" label="项目负责人">
|
||||
{{currentPerson.name}}
|
||||
{{tableForm.projectChargePerson?tableForm.projectChargePerson: currentPerson.name }}
|
||||
<el-button @click="showPersonnelPicker">
|
||||
{{ currentPerson.name ? '更改' : '请选择研发人员' }}
|
||||
{{ tableForm.projectChargePerson||currentPerson.name ? '更改' : '请选择研发人员' }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -54,9 +54,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="projectCompletionRate" label="项目总体完成率">
|
||||
<el-input v-model="tableForm.projectCompletionRate" placeholder="请输入项目总体完成率" clearable>
|
||||
</el-input>
|
||||
<el-form-item prop="projectCompletionRate" label="项目总体完成率(%)">
|
||||
<el-input-number v-model="tableForm.projectCompletionRate" placeholder="请输入项目总体完成率" :controls="false" style="width: 200px">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16" :offset="1">
|
||||
@@ -82,6 +82,7 @@ import {ref} from "vue";
|
||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {searchUpdateLedgerData} from "@/api/project-manage";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const baseForm = ref()
|
||||
@@ -103,7 +104,7 @@ const userPicker = ref()
|
||||
const selected = (select) => {
|
||||
for (const selectElement of select) {
|
||||
currentPerson.value = selectElement
|
||||
tableForm.value.projectChargePerson=selectElement.id
|
||||
tableForm.value.projectChargePerson = selectElement.id
|
||||
}
|
||||
}
|
||||
const disabledDate = (time) => {
|
||||
@@ -116,22 +117,10 @@ const showPersonnelPicker = () => {
|
||||
userPicker.value.showUserPicker()
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
console.log('tableForm', tableForm.value)
|
||||
let params={
|
||||
let params = {
|
||||
...tableForm.value,
|
||||
projectId:route.query.id
|
||||
projectId: route.query.id
|
||||
}
|
||||
// tableForm.value={
|
||||
// "projectName": "测试上报622",
|
||||
// "completeWork": "已完成系统性需求调研、核心业务流程梳理以及研发计划的制定。",
|
||||
// "endTime": "2024-06-26",
|
||||
// "projectBudgetDescription": "本项目总研发投入预算为xx万元,其中支付给外部专业机构的合作研发费用预计为xx万元。(示例)",
|
||||
// "projectChargePerson": 161,
|
||||
// "projectCompletionRate": "40",
|
||||
// "projectDevelopmentWay": "项目采用合作研发模式,由省国经公司牵头,联合本领域外部专业研究机构作为合作方共同开展。",
|
||||
// "projectId": "",
|
||||
// "startTime": "2024-06-11"
|
||||
// }
|
||||
updateLedger(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
@@ -154,11 +143,19 @@ const getBaseInfo = async () => {
|
||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||
tableForm.value.projectName = data.projectName
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
const init = () => {
|
||||
|
||||
const init = async () => {
|
||||
const {code, msg, data} = await searchUpdateLedgerData(route.query.id)
|
||||
tableForm.value = data
|
||||
if (code !== 1000) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
init()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user