|
@@ -204,15 +204,22 @@
|
|
:rules="[{ required: user.companyId==3092?true:false, message: '请选择任务/里程碑' }]"
|
|
:rules="[{ required: user.companyId==3092?true:false, message: '请选择任务/里程碑' }]"
|
|
label="任务/里程碑" placeholder="请选择任务/里程碑" @click="clickPickerTask(index,item)"
|
|
label="任务/里程碑" placeholder="请选择任务/里程碑" @click="clickPickerTask(index,item)"
|
|
></van-field>
|
|
></van-field>
|
|
|
|
+ <van-field v-if="user.companyId==3092" readonly name="sapServiceId" :value="item.sapServiceName"
|
|
|
|
+ :rules="[{ required: true, message: '请选择服务' }]"
|
|
|
|
+ label="服务" placeholder="请选择服务" @click="clickPickerService(index,item)"
|
|
|
|
+ ></van-field>
|
|
<van-field name="taskFinish" label="是否已完成" v-if="item.taskId != null">
|
|
<van-field name="taskFinish" label="是否已完成" v-if="item.taskId != null">
|
|
<template #input>
|
|
<template #input>
|
|
<van-checkbox :disabled="!item.canEdit" v-model="item.taskFinish" shape="square">已完成</van-checkbox>
|
|
<van-checkbox :disabled="!item.canEdit" v-model="item.taskFinish" shape="square">已完成</van-checkbox>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
</van-field>
|
|
</van-field>
|
|
<van-popup v-model="item.showPickerTask" position="bottom">
|
|
<van-popup v-model="item.showPickerTask" position="bottom">
|
|
<van-picker show-toolbar :columns="item.taskList" value-key="taskName" @confirm="choseTask" @cancel="item.showPickerTask = false;$forceUpdate()" />
|
|
<van-picker show-toolbar :columns="item.taskList" value-key="taskName" @confirm="choseTask" @cancel="item.showPickerTask = false;$forceUpdate()" />
|
|
</van-popup>
|
|
</van-popup>
|
|
|
|
+
|
|
|
|
+ <van-popup v-model="item.showPickerService" position="bottom">
|
|
|
|
+ <van-picker show-toolbar :columns="item.serviceList" value-key="serviceName" @confirm="choseService" @cancel="item.showPickerService = false;$forceUpdate()" />
|
|
|
|
+ </van-popup>
|
|
<!-- <van-field readonly clickable class="form_input" :value="item.workingTime" name="workingTime" label="工作时长" placeholder="请输入工作时长(单位:小时)"
|
|
<!-- <van-field readonly clickable class="form_input" :value="item.workingTime" name="workingTime" label="工作时长" placeholder="请输入工作时长(单位:小时)"
|
|
:rules="[{ required: true, message: '请输入工作时长(单位:小时)' }]" @touchstart.native.stop="showNumberKey = true"/>
|
|
:rules="[{ required: true, message: '请输入工作时长(单位:小时)' }]" @touchstart.native.stop="showNumberKey = true"/>
|
|
<van-number-keyboard v-model="item.workingTime" :show="showNumberKey" close-button-text="完成" extra-key="." :maxlength="4" @blur="showNumberKey = false" /> -->
|
|
<van-number-keyboard v-model="item.workingTime" :show="showNumberKey" close-button-text="完成" extra-key="." :maxlength="4" @blur="showNumberKey = false" /> -->
|
|
@@ -911,7 +918,7 @@ import timetoolVue from '../timetool/timetool.vue';
|
|
this.getTaskGroups(this.form.domains[this.clickIndex], this.clickIndex);
|
|
this.getTaskGroups(this.form.domains[this.clickIndex], this.clickIndex);
|
|
|
|
|
|
// 获取1相关维度
|
|
// 获取1相关维度
|
|
- this.getTaskList(domainItem.projectId)
|
|
|
|
|
|
+ this.getTaskList(domainItem)
|
|
this.dimension(domainItem.projectId)
|
|
this.dimension(domainItem.projectId)
|
|
//获取相关日报提交选择人
|
|
//获取相关日报提交选择人
|
|
domainItem.projectAuditorId = null;
|
|
domainItem.projectAuditorId = null;
|
|
@@ -1517,7 +1524,10 @@ import timetoolVue from '../timetool/timetool.vue';
|
|
extraField3: list[i].extraField3,
|
|
extraField3: list[i].extraField3,
|
|
extraField3Name: list[i].extraField3Name,
|
|
extraField3Name: list[i].extraField3Name,
|
|
workContentList: list[i].workContentList,
|
|
workContentList: list[i].workContentList,
|
|
- filteredRespList: filteredRespList
|
|
|
|
|
|
+ filteredRespList: filteredRespList,
|
|
|
|
+ sapServiceId: list[i].sapServiceId,
|
|
|
|
+ sapServiceName: list[i].sapServiceName,
|
|
|
|
+ serviceList: list[i].serviceList,
|
|
})
|
|
})
|
|
if (list[i].state >= 2) {
|
|
if (list[i].state >= 2) {
|
|
this.canEdit = true;
|
|
this.canEdit = true;
|
|
@@ -1663,8 +1673,8 @@ import timetoolVue from '../timetool/timetool.vue';
|
|
// var proId = this.form.domains[this.clickIndex].projectId
|
|
// var proId = this.form.domains[this.clickIndex].projectId
|
|
// this.dimension(proId)
|
|
// this.dimension(proId)
|
|
},
|
|
},
|
|
- //选择任务
|
|
|
|
- clickPickerTask(i,item) {
|
|
|
|
|
|
+ //选择服务
|
|
|
|
+ clickPickerService(i,item) {
|
|
if (!item.canEdit) return;
|
|
if (!item.canEdit) return;
|
|
// console.log(i);
|
|
// console.log(i);
|
|
this.clickIndex = i;
|
|
this.clickIndex = i;
|
|
@@ -1672,15 +1682,33 @@ import timetoolVue from '../timetool/timetool.vue';
|
|
// this.getTaskList(proId)
|
|
// this.getTaskList(proId)
|
|
// console.log(this.form.domains[this.clickIndex].taskList);
|
|
// console.log(this.form.domains[this.clickIndex].taskList);
|
|
this.$toast.clear();
|
|
this.$toast.clear();
|
|
- if(!this.form.domains[this.clickIndex].taskList){
|
|
|
|
- this.$toast.fail('当前项目暂无可选的任务/里程碑');
|
|
|
|
- }else if(this.form.domains[this.clickIndex].taskList.length == 0){
|
|
|
|
|
|
+ if(!this.form.domains[this.clickIndex].serviceList || this.form.domains[this.clickIndex].serviceList.length == 0){
|
|
|
|
+ this.$toast.fail('当前任务暂无服务');
|
|
|
|
+ } else{
|
|
|
|
+ this.form.domains[this.clickIndex].showPickerService= true;
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ choseService(value, index) {
|
|
|
|
+ if(value){
|
|
|
|
+ this.form.domains[this.clickIndex].sapServiceId = value.id;
|
|
|
|
+ this.form.domains[this.clickIndex].sapServiceName = value.serviceName;
|
|
|
|
+ }
|
|
|
|
+ this.form.domains[this.clickIndex].showPickerService = false;
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ //选择任务
|
|
|
|
+ clickPickerTask(i,item) {
|
|
|
|
+ if (!item.canEdit) return;
|
|
|
|
+ this.clickIndex = i;
|
|
|
|
+ this.$toast.clear();
|
|
|
|
+ if(!this.form.domains[this.clickIndex].taskList || this.form.domains[this.clickIndex].taskList.length == 0){
|
|
this.$toast.fail('当前项目暂无可选的任务/里程碑');
|
|
this.$toast.fail('当前项目暂无可选的任务/里程碑');
|
|
- }else{
|
|
|
|
|
|
+ } else{
|
|
this.form.domains[this.clickIndex].showPickerTask = true;
|
|
this.form.domains[this.clickIndex].showPickerTask = true;
|
|
|
|
+ this.$forceUpdate();
|
|
}
|
|
}
|
|
-
|
|
|
|
- this.$forceUpdate();
|
|
|
|
},
|
|
},
|
|
choseTask(value, index) {
|
|
choseTask(value, index) {
|
|
if(value){
|
|
if(value){
|
|
@@ -1689,8 +1717,21 @@ import timetoolVue from '../timetool/timetool.vue';
|
|
}
|
|
}
|
|
this.form.domains[this.clickIndex].showPickerTask = false;
|
|
this.form.domains[this.clickIndex].showPickerTask = false;
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
|
|
+ if (this.user.companyId == 3092) {
|
|
|
|
+ //依斯贝,加载服务
|
|
|
|
+ this.$axios.post("/task/getMyTaskService", {taskId: value.taskId})
|
|
|
|
+ .then(res => {
|
|
|
|
+ if(res.code == "ok") {
|
|
|
|
+ this.$set(this.form.domains[this.clickIndex],'sapServiceId',null);
|
|
|
|
+ this.$set(this.form.domains[this.clickIndex],'sapServiceName',null);
|
|
|
|
+ this.$set(this.form.domains[this.clickIndex],'serviceList',res.data);
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
+ } else {
|
|
|
|
+ this.$toast.fail('获取失败:'+res.msg);
|
|
|
|
+ }
|
|
|
|
+ }).catch(err=> {this.$toast.clear();});
|
|
|
|
+ }
|
|
},
|
|
},
|
|
-
|
|
|
|
choseProjects(value, index) {
|
|
choseProjects(value, index) {
|
|
// console.log(value)
|
|
// console.log(value)
|
|
if(value){
|
|
if(value){
|
|
@@ -1765,6 +1806,7 @@ import timetoolVue from '../timetool/timetool.vue';
|
|
if(res.code == "ok") {
|
|
if(res.code == "ok") {
|
|
domain.stage = '';
|
|
domain.stage = '';
|
|
domain.stages = res.data;
|
|
domain.stages = res.data;
|
|
|
|
+ this.getTaskList(domain);
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
} else {
|
|
} else {
|
|
this.$toast.fail('获取失败');
|
|
this.$toast.fail('获取失败');
|
|
@@ -1800,15 +1842,27 @@ import timetoolVue from '../timetool/timetool.vue';
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
- getTaskList(projectId) {
|
|
|
|
|
|
+ getTaskList(domainItem) {
|
|
//如果是专业版,需要列出任务列表
|
|
//如果是专业版,需要列出任务列表
|
|
if (this.user.company.packageProject == 1) {
|
|
if (this.user.company.packageProject == 1) {
|
|
- this.$axios.post("/task/getRecentTask", {projectId: projectId})
|
|
|
|
|
|
+ //清空选中的任务
|
|
|
|
+ this.$set(domainItem, 'taskId', null);
|
|
|
|
+ this.$set(domainItem, 'taskName', null);
|
|
|
|
+ this.$set(domainItem, 'sapServiceId', null);
|
|
|
|
+ this.$set(domainItem, 'sapServiceName', null);
|
|
|
|
+ this.$set(domainItem, 'serviceList', null);
|
|
|
|
+ var param = {projectId: domainItem.projectId}
|
|
|
|
+ if (domainItem.groupId) {
|
|
|
|
+ param.groupId = domainItem.groupId;
|
|
|
|
+ }
|
|
|
|
+ if (domainItem.stage) {
|
|
|
|
+ param.stage = domainItem.stage;
|
|
|
|
+ }
|
|
|
|
+ this.$axios.post("/task/getRecentTask", param)
|
|
.then(res => {
|
|
.then(res => {
|
|
if(res.code == "ok") {
|
|
if(res.code == "ok") {
|
|
this.form.domains[this.clickIndex].taskList = res.data;
|
|
this.form.domains[this.clickIndex].taskList = res.data;
|
|
this.form = this.form;
|
|
this.form = this.form;
|
|
- // this.$forceUpdate();
|
|
|
|
} else {
|
|
} else {
|
|
this.$toast.fail('获取失败');
|
|
this.$toast.fail('获取失败');
|
|
}
|
|
}
|
|
@@ -2263,6 +2317,9 @@ import timetoolVue from '../timetool/timetool.vue';
|
|
formData.append('extraField2', this.form.domains[i].extraField2);
|
|
formData.append('extraField2', this.form.domains[i].extraField2);
|
|
formData.append('extraField3', this.form.domains[i].extraField3);
|
|
formData.append('extraField3', this.form.domains[i].extraField3);
|
|
}
|
|
}
|
|
|
|
+ if (this.user.companyId == 3092) {
|
|
|
|
+ formData.append('sapServiceId', this.form.domains[i].sapServiceId);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if(!this.flgLg) {
|
|
if(!this.flgLg) {
|
|
return
|
|
return
|