|
@@ -68,31 +68,40 @@
|
|
|
</el-form-item>
|
|
|
<div style="border: 1px solid #ddd;margin:5px 0;padding:5px 0;">
|
|
|
<el-form-item :label="$t('zhi-hang-ren') + (index+1)" v-for="(executorItem, index) in addForm.executorListFront" :key="index">
|
|
|
- <el-select v-if="user.userNameNeedTranslate != 1" v-model="executorItem.executorId" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" size="small" filterable clearable :placeholder="$t('pleaseselectanexecutor')" style="width:40%;" @change="$forceUpdate()">
|
|
|
- <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
|
|
|
- <span style="float: left">{{ item.name }}</span>
|
|
|
- <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :filterable="true" :subject="users" :subjectId="executorItem.executorId" :distinction="'1'" @selectCal="selectCal" :index="index" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)"></selectCat>
|
|
|
- <span v-if="user.companyId==3092" style="margin-left:30px;margin-right:10px;">{{'项目服务'}}</span>
|
|
|
- <el-select v-if="user.companyId==3092" multiple clearable filterable v-model="executorItem.serviceId" placeholder="请选择项目服务">
|
|
|
- <el-option
|
|
|
- v-for="item in sapServiceList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.serviceName+'-'+item.serviceCode"
|
|
|
- :value="item.id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
-
|
|
|
- <span style="margin-left:30px;margin-right:10px;">{{ $t('plantime') }}</span>
|
|
|
- <el-input-number size="small" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" v-model="gstimday[index]" style="width:16%;" :min="1" :max="100" :placeholder="$t('danweitian')" @change="chggstim(0,index)"></el-input-number ><span style="margin-left:5px;">{{ $t('time.day') }}</span>
|
|
|
- <el-input-number size="small" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" v-model="gstimhour[index]" style="width:16%;" :min="1" :max="999" :placeholder="$t('pleaseentertheplannedworking')" @change="chggstim(1,index)"></el-input-number ><span style="margin-left:5px;">{{ $t('time.hour') }}</span>
|
|
|
+ <div class="editingTask">
|
|
|
+ <div style="margin-right: 30px">
|
|
|
+ <el-select v-if="user.userNameNeedTranslate != 1" v-model="executorItem.executorId" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" size="small" filterable clearable :placeholder="$t('pleaseselectanexecutor')" style="width:40%;" @change="$forceUpdate()">
|
|
|
+ <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :filterable="true" :subject="users" :subjectId="executorItem.executorId" :distinction="'1'" @selectCal="selectCal" :index="index" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)"></selectCat>
|
|
|
+ </div>
|
|
|
+ <!-- 项目服务 -->
|
|
|
+ <div v-if="user.companyId==3092">
|
|
|
+ <span style="margin-left:30px;margin-right:10px;">{{'项目服务'}}</span>
|
|
|
+ <el-select multiple clearable collapse-tags filterable v-model="executorItem.serviceId" size="small" placeholder="请选择项目服务" style="width: 300px" @change="serviceIdChange()">
|
|
|
+ <el-option
|
|
|
+ v-for="item in sapServiceList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.serviceName+'-'+item.serviceCode"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <!-- 计划工时 -->
|
|
|
+ <div>
|
|
|
+ <span style="margin-right:10px;">{{ $t('plantime') }}</span>
|
|
|
+ <el-input-number size="small" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" v-model="gstimday[index]" style="width:120px;" :min="1" :max="100" :placeholder="$t('danweitian')" @change="chggstim(0,index)"></el-input-number ><span style="margin-left:5px;">{{ $t('time.day') }}</span>
|
|
|
+ <el-input-number size="small" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)" v-model="gstimhour[index]" style="width:120px;" :min="1" :max="999" :placeholder="$t('pleaseentertheplannedworking')" @change="chggstim(1,index)"></el-input-number ><span style="margin-left:5px;">{{ $t('time.hour') }}</span>
|
|
|
|
|
|
- <!-- <el-input-number v-model="numnnumnum" @change="handleChange" :min="1" :max="10" label="描述文字"></el-input-number> -->
|
|
|
+ <!-- <el-input-number v-model="numnnumnum" @change="handleChange" :min="1" :max="10" label="描述文字"></el-input-number> -->
|
|
|
|
|
|
- <!-- 移除执行人 -->
|
|
|
- <i class="el-icon-delete" v-if="index>0 && (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id|| permissions.projectManagement || groupResponsibleId == user.id)" style="margin-left:5px" @click="removeExecutorLine(index)"></i>
|
|
|
+ <!-- 移除执行人 -->
|
|
|
+ <i class="el-icon-delete" v-if="index>0 && (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id|| permissions.projectManagement || groupResponsibleId == user.id)" style="margin-left:5px" @click="removeExecutorLine(index)"></i>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
<el-link type="primary" v-if="(((addForm.executorListFront == null || addForm.executorListFront.length<100) &&
|
|
|
(addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id || permissions.projectManagement)) ||
|
|
@@ -867,6 +876,13 @@ export default {
|
|
|
this.timess()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 刷新数据
|
|
|
+ refreshData() {
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+ serviceIdChange() {
|
|
|
+ this.refreshData()
|
|
|
+ },
|
|
|
// 触发外层的会议
|
|
|
meetingCli() {
|
|
|
this.$parent.$parent.parentMeetingCli(this.integrationTask.id)
|
|
@@ -1648,7 +1664,8 @@ export default {
|
|
|
if(this.isRelationItem){return}
|
|
|
this.addFormVisible = true;
|
|
|
this.addForm = {parentTname: this.addForm.name,parentTid: this.addForm.id,projectId: this.addForm.projectId, groupId: this.addForm.groupId, taskLevel:0, planHours: 8, taskType: 0};
|
|
|
- this.addForm.executorListFront = [{executorId:null, planHours:8}];
|
|
|
+ // this.addForm.executorListFront = [{executorId:null, planHours:8}];
|
|
|
+ this.addForm.executorListFront = [{executorId:null, planHours:8, serviceId: []}];
|
|
|
this.addLoading = false;
|
|
|
|
|
|
//创建子任务,非编辑状态
|
|
@@ -2026,6 +2043,10 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.editingTask {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+}
|
|
|
.carts .commentSpan {
|
|
|
float: none;
|
|
|
display: block;
|