fix : 调整费用分摊,表格更新人员回显
This commit is contained in:
@@ -411,6 +411,12 @@ const getDetailList = async () => {
|
||||
if (code === 1000) {
|
||||
data.rows.forEach(item => {
|
||||
item.researchPersonnelId = Number(item.researchPersonnelId)
|
||||
let userObj = {
|
||||
id: item.researchPersonnelId,
|
||||
name: item.researchPersonnel,
|
||||
companyName: item.companyName,
|
||||
}
|
||||
userList.value.push(userObj)
|
||||
})
|
||||
formData.value.tableData = data.rows
|
||||
nextTick(() => {
|
||||
|
||||
@@ -257,6 +257,7 @@ const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||
baseForm.value.setValues(data)
|
||||
await init()
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
@@ -275,7 +276,6 @@ const init = async () => {
|
||||
// }
|
||||
}
|
||||
getBaseInfo()
|
||||
init()
|
||||
const headBtnClick = (key) => {
|
||||
switch (key) {
|
||||
case 'add':
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="projectChargePerson" label="项目负责人">
|
||||
{{tableForm.projectChargePersonName}}
|
||||
{{ tableForm.projectChargePersonName }}
|
||||
<el-button @click="showPersonnelPicker">
|
||||
{{ tableForm.projectChargePersonName ? '更改' : '请选择项目负责人' }}
|
||||
</el-button>
|
||||
@@ -55,7 +55,8 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="projectCompletionRate" label="项目总体完成率(%)">
|
||||
<el-input-number v-model="tableForm.projectCompletionRate" placeholder="请输入项目总体完成率" min="0" max="100" :controls="false" style="width: 200px">
|
||||
<el-input-number v-model="tableForm.projectCompletionRate" placeholder="请输入项目总体完成率" min="0" max="100"
|
||||
:controls="false" style="width: 200px">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -67,7 +68,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<user-picker :multiple="false" ref="userPicker" title="请选择项目负责人" @ok="selected"/>
|
||||
<user-picker :multiple="false" ref="userPicker" title="请选择项目负责人" @ok="selected" v-model:value="userList"/>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
@@ -94,13 +95,14 @@ const tableForm = ref({
|
||||
endTime: '',
|
||||
projectBudgetDescription: '',
|
||||
projectChargePerson: '',
|
||||
projectChargePersonName:'',
|
||||
projectChargePersonName: '',
|
||||
projectCompletionRate: '',
|
||||
projectDevelopmentWay: '',
|
||||
projectId: '',
|
||||
startTime: ''
|
||||
})
|
||||
const userPicker = ref()
|
||||
const userList = ref([])
|
||||
|
||||
const showPersonnelPicker = () => {
|
||||
userPicker.value.showUserPicker()
|
||||
@@ -113,6 +115,7 @@ const selected = (select) => {
|
||||
tableForm.value.projectChargePerson = selectElement.id
|
||||
tableForm.value.projectChargePersonName = selectElement.name
|
||||
}
|
||||
userList.value = select
|
||||
}
|
||||
const disabledDate = (time) => {
|
||||
return time.getTime() < new Date(tableForm.value.startTime).getTime();
|
||||
@@ -151,6 +154,12 @@ getBaseInfo()
|
||||
const init = async () => {
|
||||
const {code, msg, data} = await searchUpdateLedgerData(route.query.id)
|
||||
tableForm.value = data
|
||||
let userObj = {
|
||||
id: data.projectChargePerson,
|
||||
name: data.projectChargePersonName,
|
||||
companyName: data.companyName,
|
||||
}
|
||||
userList.value.push(userObj)
|
||||
if (code !== 1000) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
|
||||
Reference in New Issue
Block a user