|
@@ -13,13 +13,26 @@
|
|
</li>
|
|
</li>
|
|
</template>
|
|
</template>
|
|
</ul>
|
|
</ul>
|
|
- <ul>
|
|
|
|
- <li :class="{ active: currentIndex === 0 }" @click="switchHandle(0)">项目信息</li>
|
|
|
|
- <li :class="{ active: currentIndex === 1 }" @click="switchHandle(1)">项目成员</li>
|
|
|
|
- <li v-show="isMaster" :class="{ active: currentIndex === 2 }" @click="switchHandle(2)"
|
|
|
|
- >项目阶段</li
|
|
|
|
|
|
+ <div class="right_box">
|
|
|
|
+ <span
|
|
|
|
+ v-if="
|
|
|
|
+ !isMaster &&
|
|
|
|
+ (projectPermis.projectPermisState.all ||
|
|
|
|
+ projectPermis.projectPermisState.xmLeader ||
|
|
|
|
+ projectPermis.projectPermisState['childButton'][currentProjectId])
|
|
|
|
+ "
|
|
|
|
+ class="edit_btn"
|
|
|
|
+ @click="saveChildProject"
|
|
|
|
+ >{{ cEditor ? '保存项目' : '编辑项目' }}</span
|
|
>
|
|
>
|
|
- </ul>
|
|
|
|
|
|
+ <ul>
|
|
|
|
+ <li :class="{ active: currentIndex === 0 }" @click="switchHandle(0)">项目信息</li>
|
|
|
|
+ <li :class="{ active: currentIndex === 1 }" @click="switchHandle(1)">项目成员</li>
|
|
|
|
+ <li v-show="isMaster" :class="{ active: currentIndex === 2 }" @click="switchHandle(2)"
|
|
|
|
+ >项目阶段</li
|
|
|
|
+ >
|
|
|
|
+ </ul>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="content" v-if="projectDetail != null">
|
|
<div class="content" v-if="projectDetail != null">
|
|
<template v-if="currentIndex === 0">
|
|
<template v-if="currentIndex === 0">
|
|
@@ -35,7 +48,7 @@
|
|
<el-input
|
|
<el-input
|
|
class="form-item-disable-style"
|
|
class="form-item-disable-style"
|
|
v-model="projectDetail['xmmc']"
|
|
v-model="projectDetail['xmmc']"
|
|
- :disabled="!editor"
|
|
|
|
|
|
+ :disabled="!cEditor"
|
|
/>
|
|
/>
|
|
</td>
|
|
</td>
|
|
<td class="th">项目编号:</td>
|
|
<td class="th">项目编号:</td>
|
|
@@ -54,7 +67,7 @@
|
|
class="form-item-disable-style"
|
|
class="form-item-disable-style"
|
|
v-model="projectDetail['xmjlId']"
|
|
v-model="projectDetail['xmjlId']"
|
|
@node-click="xmjlNodeClickHandler"
|
|
@node-click="xmjlNodeClickHandler"
|
|
- :disabled="!editor"
|
|
|
|
|
|
+ :disabled="isMaster ? !editor : !cEditor"
|
|
/>
|
|
/>
|
|
</td>
|
|
</td>
|
|
<td class="th">责任部门:</td>
|
|
<td class="th">责任部门:</td>
|
|
@@ -63,7 +76,7 @@
|
|
class="form-item-disable-style"
|
|
class="form-item-disable-style"
|
|
v-model="projectDetail['zrbmId']"
|
|
v-model="projectDetail['zrbmId']"
|
|
@node-click="nodeClickHandler"
|
|
@node-click="nodeClickHandler"
|
|
- :disabled="!editor"
|
|
|
|
|
|
+ :disabled="isMaster ? !editor : !cEditor"
|
|
/>
|
|
/>
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
@@ -140,7 +153,7 @@
|
|
<el-input
|
|
<el-input
|
|
class="form-item-disable-style"
|
|
class="form-item-disable-style"
|
|
v-model="projectDetail['yggq']"
|
|
v-model="projectDetail['yggq']"
|
|
- :disabled="!editor"
|
|
|
|
|
|
+ :disabled="isMaster ? !editor : !cEditor"
|
|
/>
|
|
/>
|
|
</td>
|
|
</td>
|
|
<template v-if="isMaster && projectDetail['isSign'] === 1 && isEstimateAmount">
|
|
<template v-if="isMaster && projectDetail['isSign'] === 1 && isEstimateAmount">
|
|
@@ -149,7 +162,7 @@
|
|
<el-input
|
|
<el-input
|
|
class="form-item-disable-style"
|
|
class="form-item-disable-style"
|
|
v-model="projectDetail['estimateAmount']"
|
|
v-model="projectDetail['estimateAmount']"
|
|
- :disabled="!editor"
|
|
|
|
|
|
+ :disabled="isMaster ? !editor : !cEditor"
|
|
/>
|
|
/>
|
|
</td>
|
|
</td>
|
|
</template>
|
|
</template>
|
|
@@ -186,7 +199,7 @@
|
|
<el-input
|
|
<el-input
|
|
class="form-item-disable-style"
|
|
class="form-item-disable-style"
|
|
v-model="projectDetail['outputValue']"
|
|
v-model="projectDetail['outputValue']"
|
|
- :disabled="!editor"
|
|
|
|
|
|
+ :disabled="isMaster ? !editor : !cEditor"
|
|
/></td>
|
|
/></td>
|
|
<td class="th">利益分成(公司/部门):</td>
|
|
<td class="th">利益分成(公司/部门):</td>
|
|
<td>
|
|
<td>
|
|
@@ -218,6 +231,7 @@
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import { ElMessage } from 'element-plus'
|
|
import { ElMessage } from 'element-plus'
|
|
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
|
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
|
|
|
+import { useProjectPermis } from '@/store/modules/projectPermis'
|
|
import UserOrgTree from '@/views/OaSystem/components/UserOrgTree/index.vue'
|
|
import UserOrgTree from '@/views/OaSystem/components/UserOrgTree/index.vue'
|
|
import DeptTree from '@/views/OaSystem/components/DeptTree/index.vue'
|
|
import DeptTree from '@/views/OaSystem/components/DeptTree/index.vue'
|
|
import DistrictTree from '@/views/OaSystem/components/DistrictTree/index.vue'
|
|
import DistrictTree from '@/views/OaSystem/components/DistrictTree/index.vue'
|
|
@@ -230,9 +244,11 @@ import ProjectMember from '@/views/OaSystem/projectCenter/projectDetail/componen
|
|
import ProjectMileStone from '@/views/OaSystem/projectCenter/projectDetail/components/xmxx/ProjectMileStone.vue'
|
|
import ProjectMileStone from '@/views/OaSystem/projectCenter/projectDetail/components/xmxx/ProjectMileStone.vue'
|
|
|
|
|
|
defineOptions({ name: 'XmxxComp' })
|
|
defineOptions({ name: 'XmxxComp' })
|
|
|
|
+const projectPermis = useProjectPermis()
|
|
const industryList = getDictOptions(DICT_TYPE.PROJECT_HY)
|
|
const industryList = getDictOptions(DICT_TYPE.PROJECT_HY)
|
|
const props = defineProps<{ editor: boolean; isEstimateAmount: boolean }>()
|
|
const props = defineProps<{ editor: boolean; isEstimateAmount: boolean }>()
|
|
const { editor, isEstimateAmount } = toRefs(props)
|
|
const { editor, isEstimateAmount } = toRefs(props)
|
|
|
|
+const cEditor = ref<boolean>(false)
|
|
const { query } = useRoute()
|
|
const { query } = useRoute()
|
|
const { id = '', flowStatus = '' } = query as {
|
|
const { id = '', flowStatus = '' } = query as {
|
|
id: string
|
|
id: string
|
|
@@ -317,10 +333,17 @@ const onHandleSuccess = () => {
|
|
subProjectShow.value = false
|
|
subProjectShow.value = false
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const saveChildProject = () => {
|
|
|
|
+ cEditor.value = !cEditor.value
|
|
|
|
+ if (cEditor.value) return
|
|
|
|
+ saveProjectHandle(1)
|
|
|
|
+}
|
|
/**
|
|
/**
|
|
* 项目编辑保存成操作
|
|
* 项目编辑保存成操作
|
|
|
|
+ * @param type 0表示主项目 1表示子项目
|
|
* **/
|
|
* **/
|
|
-const saveProjectHandle = (): void => {
|
|
|
|
|
|
+const saveProjectHandle = (type: number): void => {
|
|
|
|
+ if (type === 0 && !isMaster) return
|
|
const obj = {
|
|
const obj = {
|
|
xzqdm: parentProjectDetail.xzqdm,
|
|
xzqdm: parentProjectDetail.xzqdm,
|
|
projectTypeId: parentProjectDetail.projectTypeId,
|
|
projectTypeId: parentProjectDetail.projectTypeId,
|