|
@@ -119,10 +119,9 @@
|
|
|
<van-picker show-toolbar :columns="roleList" value-key="label" @confirm="choseRole"
|
|
|
@cancel="item.showPickerRole = false; $forceUpdate();" />
|
|
|
</van-popup>
|
|
|
-
|
|
|
<!--任务分组 -->
|
|
|
<van-field readonly name="groupId" :disabled="!item.canEdit"
|
|
|
- v-if="user.company.packageProject == 1 && item.taskGroups != null && item.taskGroups.length > 0 && (user.company.nonProjectSimple==0 || (user.company.nonProjectSimple==1&& (item.projectId && projectss.filter(p => p.id == item.projectId)[0].isPublic!=1)))"
|
|
|
+ v-if="user.company.packageProject == 1 && item.taskGroups != null && item.taskGroups.length > 0 && (user.company.nonProjectSimple==0 || (user.company.nonProjectSimple==1&& (item.projectId && (projectss.filter(p => p.id == item.projectId)[0] || {}).isPublic!=1)))"
|
|
|
clickable :rules="[{ required: user.companyId == 3092 ? true : false, message: '请选择任务分组' }]"
|
|
|
:value="item.groupName" label="任务分组" placeholder="请选择任务分组"
|
|
|
@click="clickPickTaskGroup(index, item)" />
|
|
@@ -168,8 +167,9 @@
|
|
|
<!-- 工单号 -->
|
|
|
<van-field readonly name="stage" :disabled="!item.canEdit"
|
|
|
v-if="user.timeType.reportExtraField4Name"
|
|
|
- clickable :value="item.extraField4" :label="user.timeType.reportExtraField4Name" placeholder="请选择"
|
|
|
- @click="clickPickExtraField4(index, item)" />
|
|
|
+ clickable :value="item.extraField4" :label="user.timeType.reportExtraField4Name" :placeholder="!item.canEdit ? '' : `请选择`" :right-icon="!item.canEdit ? '' : 'close'"
|
|
|
+ @click-right-icon.stop="clearClickPickExtraField4(index, item)"
|
|
|
+ @focus="clickPickExtraField4(index, item)" />
|
|
|
<van-popup v-model="item.showPickerExtraField4" position="bottom" :close-on-click-overlay="false">
|
|
|
<van-picker show-toolbar :columns="(item.reportExtraField4List || [])" value-key="stagesName" @confirm="choseExtraField4"
|
|
|
@cancel="item.showPickerExtraField4 = false; $forceUpdate();" />
|
|
@@ -177,8 +177,8 @@
|
|
|
<!-- 行号 -->
|
|
|
<van-field readonly name="stage" :disabled="!item.canEdit"
|
|
|
v-if="user.timeType.reportExtraField5Name"
|
|
|
- clickable :value="item.extraField5" :label="user.timeType.reportExtraField5Name" :placeholder="`请选择`"
|
|
|
- @click="clickPickExtraField5(index, item)" />
|
|
|
+ clickable :value="item.extraField5" :label="user.timeType.reportExtraField5Name" :placeholder="!item.canEdit ? '' : `请选择`"
|
|
|
+ @focus="clickPickExtraField5(index, item)" />
|
|
|
<van-popup v-model="item.showPickerExtraField5" position="bottom" :close-on-click-overlay="false">
|
|
|
<van-picker v-if="item.showPickerExtraField5" show-toolbar :columns="(item.reportExtraField5List || [])" value-key="stagesName" @confirm="choseExtraField5" @cancel="item.showPickerExtraField5 = false; $forceUpdate();" />
|
|
|
</van-popup>
|
|
@@ -324,7 +324,7 @@
|
|
|
<van-stepper v-model="pItem.progress" integer min="0" max="100" />%
|
|
|
</template>
|
|
|
</van-field>
|
|
|
- <van-field v-if="user.company.packageProject == 1 && !user.timeType.hideTask && (user.company.nonProjectSimple==0 || (user.company.nonProjectSimple==1&& (item.projectId && projectss.filter(p => p.id == item.projectId)[0].isPublic!=1)))" readonly name="taskId" :value="item.taskName"
|
|
|
+ <van-field v-if="user.company.packageProject == 1 && !user.timeType.hideTask && (user.company.nonProjectSimple==0 || (user.company.nonProjectSimple==1&& (item.projectId && (projectss.filter(p => p.id == item.projectId)[0] || {}).isPublic!=1)))" readonly name="taskId" :value="item.taskName"
|
|
|
:rules="[{ required: reportTimeType.taskRequired? true : false, message: '请选择任务/里程碑' }]" label="任务/里程碑" :disabled="!item.canEdit"
|
|
|
placeholder="请选择任务/里程碑" @click="clickPickerTask(index, item)"></van-field>
|
|
|
<van-field v-if="user.companyId == 3092" readonly name="sapServiceId" :value="item.sapServiceName"
|
|
@@ -731,7 +731,8 @@ export default {
|
|
|
userReportDeptList: [], // 可选部门
|
|
|
showSelectDeptPopup: false,
|
|
|
|
|
|
- showAddMore: false
|
|
|
+ showAddMore: false,
|
|
|
+ businessTripsArray: []
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -1084,8 +1085,8 @@ export default {
|
|
|
// let arrList = Array.from(new Set(dataTree))
|
|
|
// this.projectss = arrList
|
|
|
// console.log(this.userName.toUpperCase())
|
|
|
- let data = this.proads.filter(item => { return item.projectName.indexOf(this.userName.toUpperCase()) != '-1' });
|
|
|
- let dataList = this.proads.filter(item => { return item.projectCode.indexOf(this.userName.toUpperCase()) != '-1' });
|
|
|
+ let data = this.proads.filter(item => { return item.projectName.toUpperCase().indexOf(this.userName.toUpperCase()) != '-1' });
|
|
|
+ let dataList = this.proads.filter(item => { return item.projectCode.toUpperCase().indexOf(this.userName.toUpperCase()) != '-1' });
|
|
|
let dataTree = data.concat(dataList)
|
|
|
let arrList = Array.from(new Set(dataTree))
|
|
|
this.projectss = arrList
|
|
@@ -1201,6 +1202,16 @@ export default {
|
|
|
.then(res => {
|
|
|
if (res.code == "ok") {
|
|
|
domainItem.taskGroups = res.data;
|
|
|
+
|
|
|
+ const projectIdStr = domainItem.projectId;
|
|
|
+ const businessTripsArray = this.businessTripsArray
|
|
|
+ const list = businessTripsArray.filter(item => item.projectId == projectIdStr)
|
|
|
+ if(list.length > 0) {
|
|
|
+ const obj = res.data.find(item => item.name.indexOf('出差工时') != -1) || {}
|
|
|
+ domainItem.groupId = obj.id || ''
|
|
|
+ domainItem.groupName = obj.name || ''
|
|
|
+ }
|
|
|
+ this.$forceUpdate();
|
|
|
}
|
|
|
this.$forceUpdate();
|
|
|
}).catch(err => { this.$toast.clear(); });
|
|
@@ -1772,6 +1783,7 @@ export default {
|
|
|
if (res.code == "ok") {
|
|
|
this.$toast.clear();
|
|
|
this.report = res.data;
|
|
|
+ this.businessTripsArray = res.data.businessTrips || []
|
|
|
var t = res.data.timeType;
|
|
|
var timeType = [];
|
|
|
//转化时间格式
|
|
@@ -1933,7 +1945,7 @@ export default {
|
|
|
this.canCancelInDialog = true
|
|
|
}
|
|
|
const { reportExtraField4Name, reportExtraField5Name } = this.user.timeType
|
|
|
- if(reportExtraField4Name || reportExtraField5Name) {
|
|
|
+ if((reportExtraField4Name || reportExtraField5Name) && copyData.extraField4) {
|
|
|
const { projectCode } = this.proads.find(item => item.id == list[i].projectId)
|
|
|
this.getInfoByProjectId(projectCode, i, false)
|
|
|
}
|
|
@@ -2134,12 +2146,25 @@ export default {
|
|
|
item.showPickerExtraField4 = true;
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
+ clearClickPickExtraField4(i, item) {
|
|
|
+ if (!item.canEdit) return;
|
|
|
+ this.clickIndex = i;
|
|
|
+ this.form.domains[this.clickIndex].extraField4 = ''
|
|
|
+ this.form.domains[this.clickIndex].extraField5 = ''
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
clickPickExtraField5(i, item) {
|
|
|
if (!item.canEdit) return;
|
|
|
this.clickIndex = i;
|
|
|
item.showPickerExtraField5 = true;
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
+ clearClickPickExtraField5(i, item) {
|
|
|
+ if (!item.canEdit) return;
|
|
|
+ this.clickIndex = i;
|
|
|
+ this.form.domains[this.clickIndex].extraField5 = ''
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
selectDeptPopup(i, item) {
|
|
|
this.clickIndex = i;
|
|
|
this.showSelectDeptPopup = true;
|