|
@@ -76,11 +76,11 @@
|
|
|
|
|
|
<!-- {{timelabel}}{{mileageCup}} -->
|
|
|
<el-form-item :label="!timelabel ? $t('starttimes') : $t('jie-zhi-shi-jian')" prop="startDate">
|
|
|
- <el-date-picker v-model="addForm.startDate" type="date" style="width:40%;" value-format="yyyy-MM-dd"
|
|
|
- :placeholder="$t('pleaseselectadate')" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" @change="DateChange()" v-if="!timelabel"></el-date-picker>
|
|
|
+ <el-date-picker v-model="addForm.startDate" type="datetime" style="width:40%;" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ default-time="09:00:00" :placeholder="$t('pleaseselectadate')" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" @change="DateChange()" v-if="!timelabel"></el-date-picker>
|
|
|
<span style="margin-left:30px;margin-right:10px;" v-if="!timelabel">{{ $t('deadline') }}</span>
|
|
|
- <el-date-picker style="width:40%;" v-model="addForm.endDate" type="date" value-format="yyyy-MM-dd"
|
|
|
- :placeholder="$t('pleaseselectadate')" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" @change="DateChange()"></el-date-picker>
|
|
|
+ <el-date-picker style="width:40%;" v-model="addForm.endDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ default-time="17:30:00" :placeholder="$t('pleaseselectadate')" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" @change="DateChange()"></el-date-picker>
|
|
|
<span style="margin-left:30px;margin-right:10px;" v-if="timelabel && mileageCup">{{ $t('wan-cheng-shi-jian') }}</span>
|
|
|
<el-date-picker style="width:40%;" v-if="timelabel && mileageCup" v-model="addForm.finishDate" type="date" value-format="yyyy-MM-dd"
|
|
|
:placeholder="$t('pleaseselectadate')" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" @change="DateChange()"></el-date-picker>
|
|
@@ -97,8 +97,7 @@
|
|
|
<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="executorItem.indexList" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" :key="executorItem.indexList"></selectCat>
|
|
|
- <!-- <selectPersonnel v-if="user.userNameNeedTranslate == 1" v-model="executorItem.executorId" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" @change="$forceUpdate()" :key="executorItem.indexList" /> -->
|
|
|
+ <el-link v-if="executorItem.executorId && addForm.startDate && addForm.endDate" style="margin-left:5px;" @click.stop="viewTaskTimeList(executorItem.executorId)">查看</el-link>
|
|
|
</div>
|
|
|
|
|
|
<!-- 计划工时 -->
|
|
@@ -924,6 +923,19 @@ export default {
|
|
|
onTypeChange(e) {
|
|
|
this.selectType = this.typeList.filter(a=>a.id == e)[0];
|
|
|
},
|
|
|
+ viewTaskTimeList(executorId) {
|
|
|
+ this.http.post('/task/viewUserTaskSchedule', { taskId: this.addForm.id, userId: executorId, startDate: this.addForm.startDate, endDate: this.addForm.endDate},
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$message({ message: res.msg, type: "error" });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({ message: error, type: "error" });
|
|
|
+ });
|
|
|
+ },
|
|
|
getTaskTypeList() {
|
|
|
this.http.post('/task-type/list', { companyId: this.user.companyId },
|
|
|
res => {
|
|
@@ -1675,14 +1687,14 @@ export default {
|
|
|
if(this.addForm.startDate != undefined && this.addForm.endDate != undefined){
|
|
|
let stdate = Date.parse(this.addForm.startDate)
|
|
|
let eddate = Date.parse(this.addForm.endDate)
|
|
|
- if(stdate <= eddate){
|
|
|
- let days = (eddate - stdate) / (1*24*60*60*1000) + 1
|
|
|
- for (let i=0;i<this.gstimday.length;i++) {
|
|
|
- this.gstimday[i] = days
|
|
|
- this.gstimhour[i] = days * this.user.timeType.allday
|
|
|
- }
|
|
|
- this.$forceUpdate()
|
|
|
- }
|
|
|
+ // if(stdate <= eddate){
|
|
|
+ // let days = (eddate - stdate) / (1*24*60*60*1000) + 1
|
|
|
+ // for (let i=0;i<this.gstimday.length;i++) {
|
|
|
+ // this.gstimday[i] = days
|
|
|
+ // this.gstimhour[i] = days * this.user.timeType.allday
|
|
|
+ // }
|
|
|
+ // this.$forceUpdate()
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -2006,23 +2018,6 @@ export default {
|
|
|
this.timelabel = false
|
|
|
}
|
|
|
},
|
|
|
- DateChange(){
|
|
|
- if(this.addForm.startDate != undefined && this.addForm.endDate != undefined){
|
|
|
- let stdate = Date.parse(this.addForm.startDate)
|
|
|
- let eddate = Date.parse(this.addForm.endDate)
|
|
|
- if(stdate <= eddate){
|
|
|
- let days = (eddate - stdate) / (1*24*60*60*1000) + 1
|
|
|
- for (let i=0;i<this.gstimday.length;i++) {
|
|
|
- this.gstimday[i] = days
|
|
|
- this.gstimhour[i] = days * this.user.timeType.allday
|
|
|
- }
|
|
|
- this.$forceUpdate()
|
|
|
- }
|
|
|
- // console.log("gstimday",this.gstimday);
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
kkk(el){
|
|
|
var k = this.checkLists.indexOf(el.id)
|
|
|
if (k == -1) {
|