|
@@ -8,7 +8,7 @@
|
|
<el-date-picker size="small" v-model="date" :editable="false" format="yyyy-MM" value-format="yyyy-MM"
|
|
<el-date-picker size="small" v-model="date" :editable="false" format="yyyy-MM" value-format="yyyy-MM"
|
|
style="width:190px;"
|
|
style="width:190px;"
|
|
@change="changeMonthOut" :clearable="false" type="month" placeholder="选择月份"></el-date-picker>
|
|
@change="changeMonthOut" :clearable="false" type="month" placeholder="选择月份"></el-date-picker>
|
|
- <el-button style="margin-left:10px;" icon="iconfont firerock-icongongshitongji" size="mini" @click="showMonthWorkTime"></el-button>
|
|
|
|
|
|
+ <el-button style="margin-left:10px;" icon="iconfont firerock-icongongshitongji" size="mini" @click="showWorkTime"></el-button>
|
|
</div>
|
|
</div>
|
|
<span v-for="(item,index) in allDate" :id="'day'+index" :class="index==choseDay?'chooseDate date_item':'date_item'"
|
|
<span v-for="(item,index) in allDate" :id="'day'+index" :class="index==choseDay?'chooseDate date_item':'date_item'"
|
|
@click="choseDate(index, item)" :key="index" >
|
|
@click="choseDate(index, item)" :key="index" >
|
|
@@ -116,12 +116,11 @@
|
|
<span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0">[
|
|
<span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0">[
|
|
<span v-if="item2.isDeptAudit==0">
|
|
<span v-if="item2.isDeptAudit==0">
|
|
<span v-if="item2.projectAuditState==0">
|
|
<span v-if="item2.projectAuditState==0">
|
|
- 待项目负责人审核
|
|
|
|
|
|
+ 待项目审核人<span v-if="item2.projectAuditorName != null">({{item2.projectAuditorName}})</span>审核
|
|
</span>
|
|
</span>
|
|
<span style="color:#32CD32;" v-else-if="item2.projectAuditState==1">
|
|
<span style="color:#32CD32;" v-else-if="item2.projectAuditState==1">
|
|
- 项目负责人审核通过
|
|
|
|
|
|
+ 项目审核人<span v-if="item2.projectAuditorName != null">({{item2.projectAuditorName}})</span>审核通过
|
|
</span>
|
|
</span>
|
|
- <!-- {{item2.isDeptAudit==0?(item2.projectAuditState==0?'待项目负责人审核':'项目负责人审核通过'):('待'+item2.auditDeptName+'审核')}} -->
|
|
|
|
</span>
|
|
</span>
|
|
<span v-else-if="item2.isDeptAudit==1">
|
|
<span v-else-if="item2.isDeptAudit==1">
|
|
{{('待'+item2.auditDeptName+'审核')}}
|
|
{{('待'+item2.auditDeptName+'审核')}}
|
|
@@ -145,11 +144,11 @@
|
|
|
|
|
|
<!--每个项目上单独审核 -->
|
|
<!--每个项目上单独审核 -->
|
|
<span style="float:right;">
|
|
<span style="float:right;">
|
|
- <el-button v-if="(user.role == 1 || user.role == 2 || user.id == item2.inchargerId) && item2.state == 0 && item2.isDeptAudit==0 && item2.projectAuditState==0" type="primary" :loading="logining"
|
|
|
|
|
|
+ <el-button v-if="(user.role == 1 || user.role == 2 || user.id == item2.projectAuditorId) && item2.state == 0 && item2.isDeptAudit==0 && item2.projectAuditState==0" type="primary" :loading="logining"
|
|
size="small" @click="approve(item1.id, item2)">通过</el-button>
|
|
size="small" @click="approve(item1.id, item2)">通过</el-button>
|
|
- <el-button v-if="(user.role == 1 || user.role == 2 || user.id == item2.inchargerId) && item2.state == 0 && item2.isDeptAudit==0 && item2.projectAuditState==0" type="danger" :loading="logining"
|
|
|
|
|
|
+ <el-button v-if="(user.role == 1 || user.role == 2 || user.id == item2.projectAuditorId) && item2.state == 0 && item2.isDeptAudit==0 && item2.projectAuditState==0" type="danger" :loading="logining"
|
|
size="small" @click="showDenyDialog(item1.id,0, item2)">驳回</el-button>
|
|
size="small" @click="showDenyDialog(item1.id,0, item2)">驳回</el-button>
|
|
- <el-button v-if="(user.role == 1 || user.role == 2 || user.id == item2.inchargerId) && item2.state == 1" type="normal" :loading="logining" size="small"
|
|
|
|
|
|
+ <el-button v-if="(user.role == 1 || user.role == 2 || user.id == item2.projectAuditorId) && item2.state == 1" type="normal" :loading="logining" size="small"
|
|
@click="showDenyDialog(item1.id,1, item2)">撤销</el-button>
|
|
@click="showDenyDialog(item1.id,1, item2)">撤销</el-button>
|
|
<!--自己可以撤回待审核状态的报告 -->
|
|
<!--自己可以撤回待审核状态的报告 -->
|
|
<el-button v-if="user.id == item1.id && (item2.state == 0 || item2.state == -1)" type="normal" :loading="logining" size="small" @click="cancel(item1)">撤回</el-button>
|
|
<el-button v-if="user.id == item1.id && (item2.state == 0 || item2.state == -1)" type="normal" :loading="logining" size="small" @click="cancel(item1)">撤回</el-button>
|
|
@@ -303,6 +302,7 @@
|
|
</el-select>
|
|
</el-select>
|
|
<span v-if="domain.subProjectList != null && domain.subProjectList.length> 0"
|
|
<span v-if="domain.subProjectList != null && domain.subProjectList.length> 0"
|
|
style="margin-left:45px;">子项目</span>
|
|
style="margin-left:45px;">子项目</span>
|
|
|
|
+
|
|
<!--子项目 -->
|
|
<!--子项目 -->
|
|
<el-select v-model="domain.subProjectId" placeholder="请选择子项目" style="width:200px;margin-left:10px;" clearable="true"
|
|
<el-select v-model="domain.subProjectId" placeholder="请选择子项目" style="width:200px;margin-left:10px;" clearable="true"
|
|
v-if="domain.subProjectList != null && domain.subProjectList.length> 0"
|
|
v-if="domain.subProjectList != null && domain.subProjectList.length> 0"
|
|
@@ -317,6 +317,12 @@
|
|
<el-link type="primary" v-if="workForm.domains[index].state == 0 || workForm.domains[index].state == 2"
|
|
<el-link type="primary" v-if="workForm.domains[index].state == 0 || workForm.domains[index].state == 2"
|
|
:underline="false" style="margin-left:10px;" @click="copyProject(index)">复制</el-link>
|
|
:underline="false" style="margin-left:10px;" @click="copyProject(index)">复制</el-link>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+
|
|
|
|
+ <el-form-item label="项目审核人" >
|
|
|
|
+ <el-select v-model="domain.projectAuditorId" :disabled="!canEdit" @change="$forceUpdate()">
|
|
|
|
+ <el-option v-for="item in domain.auditUserList" :label="item.auditorName" :value="item.auditorId" :key="item.id"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="任务分组" v-if="user.company.packageProject == 1">
|
|
<el-form-item label="任务分组" v-if="user.company.packageProject == 1">
|
|
<!-- 任务分组 -->
|
|
<!-- 任务分组 -->
|
|
<el-select v-model="domain.groupId" placeholder="请选择任务分组" style="width:200px;" clearable="true"
|
|
<el-select v-model="domain.groupId" placeholder="请选择任务分组" style="width:200px;" clearable="true"
|
|
@@ -335,14 +341,14 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 相关维度 -->
|
|
<!-- 相关维度 -->
|
|
<el-form-item :label="yonghuUser.customDegreeName" v-if="domain.projectId && yonghuUser.customDegreeActive == 1">
|
|
<el-form-item :label="yonghuUser.customDegreeName" v-if="domain.projectId && yonghuUser.customDegreeActive == 1">
|
|
- <el-select v-model="domain.degreeId" clearable placeholder="请选择">
|
|
|
|
|
|
+ <el-select v-model="domain.degreeId" clearable placeholder="请选择" :disabled="!canEdit">
|
|
<el-option v-for="item in domain.wuduList" :key="item.value" :label="item.name" :value="item.id">
|
|
<el-option v-for="item in domain.wuduList" :key="item.value" :label="item.name" :value="item.id">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 相关数值 -->
|
|
<!-- 相关数值 -->
|
|
<el-form-item :label="yonghuUser.customDataName" v-if="domain.projectId && yonghuUser.customDataActive == 1">
|
|
<el-form-item :label="yonghuUser.customDataName" v-if="domain.projectId && yonghuUser.customDataActive == 1">
|
|
- <el-input-number :id="'numberData_'+index" v-model="domain.customData" style="width:200px;" @keyup.native="restrictNumber('numberData_'+index)"></el-input-number>
|
|
|
|
|
|
+ <el-input-number :id="'numberData_'+index" :disabled="!canEdit" v-model="domain.customData" style="width:200px;" @keyup.native="restrictNumber('numberData_'+index)"></el-input-number>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item v-if="reportTimeType.type == 3" label="用时占比" :prop="'domains.' + index + '.'+timeFields[reportTimeType.type]"
|
|
<el-form-item v-if="reportTimeType.type == 3" label="用时占比" :prop="'domains.' + index + '.'+timeFields[reportTimeType.type]"
|
|
@@ -399,6 +405,11 @@
|
|
<el-link type="primary" v-if="workForm.domains[index].state == 0 || workForm.domains[index].state == 2"
|
|
<el-link type="primary" v-if="workForm.domains[index].state == 0 || workForm.domains[index].state == 2"
|
|
:underline="false" style="margin-left:10px;" @click="copyProject(index)">复制</el-link>
|
|
:underline="false" style="margin-left:10px;" @click="copyProject(index)">复制</el-link>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="项目审核人" >
|
|
|
|
+ <el-select v-model="domain.projectAuditorId" :disabled="!canEdit" @change="$forceUpdate()">
|
|
|
|
+ <el-option v-for="item in domain.auditUserList" :label="item.auditorName" :value="item.auditorId" :key="item.id"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="任务分组" v-if="user.company.packageProject == 1">
|
|
<el-form-item label="任务分组" v-if="user.company.packageProject == 1">
|
|
<!-- 任务分组 -->
|
|
<!-- 任务分组 -->
|
|
<el-select v-model="domain.groupId" placeholder="请选择任务分组" style="width:200px;" clearable="true"
|
|
<el-select v-model="domain.groupId" placeholder="请选择任务分组" style="width:200px;" clearable="true"
|
|
@@ -683,53 +694,354 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog title="员工每日填报工时数" v-if="monthWorkTimeDialog" :visible.sync="monthWorkTimeDialog" :close-on-click-modal="false" customClass="customWidth" width="90%">
|
|
|
|
- <!-- <el-input style="width:100%" v-model="filterName" placeholder="请输入姓名搜索" @change="findUserInTree"></el-input> -->
|
|
|
|
- <el-table :data="monthWorkData" border :height="500" highlight-current-row style="width: 100%;">
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
+ v-if="monthWorkTimeDialog"
|
|
|
|
+ :visible.sync="monthWorkTimeDialog"
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
+ customClass="customWidth selectworktime"
|
|
|
|
+ width="90%"
|
|
|
|
+ title=""
|
|
|
|
+ >
|
|
|
|
+ <!-- <el-input style="width:100%" v-model="filterName" placeholder="请输入姓名搜索" @change="findUserInTree"></el-input> -->
|
|
|
|
+ <el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
|
+ <el-tab-pane label="已填工时情况" name="first">
|
|
|
|
+ <div class="selectworktime_export">
|
|
|
|
+ <div class="selectworktime_export_l">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ class="selecteworktime_datapick"
|
|
|
|
+ v-model="WorktimeDatepickValue1"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ type="daterange"
|
|
|
|
+ align="right"
|
|
|
|
+ unlink-panels
|
|
|
|
+ range-separator="至"
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
+ end-placeholder="结束日期"
|
|
|
|
+ :default-time="['12:00:00', '12:00:00']"
|
|
|
|
+ size="small"
|
|
|
|
+ popper-class="selecteorktime_datapick_popper"
|
|
|
|
+ @change="showMonthWorkTime()"
|
|
|
|
+ >
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ <el-button size="small" @click="getLastWeek(1)">上周</el-button>
|
|
|
|
+ <el-button size="small" @click="getThisWeek(1)">本周</el-button>
|
|
|
|
+ <el-button size="small" @click="getNextWeek(1)">下周</el-button>
|
|
|
|
+ <!-- 222 -->
|
|
|
|
+ </div>
|
|
|
|
+ <el-link
|
|
|
|
+ type="primary"
|
|
|
|
+ style="float: right; margin-right: 60px; vertical-align: middle"
|
|
|
|
+ @click="exportMembAlreadyWorkHours()"
|
|
|
|
+ >导出数据</el-link
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <el-table
|
|
|
|
+ :data="monthworkDate"
|
|
|
|
+ border
|
|
|
|
+ :height="500"
|
|
|
|
+ highlight-current-row
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ >
|
|
<el-table-column width="60" type="index" fixed="left" label="序号">
|
|
<el-table-column width="60" type="index" fixed="left" label="序号">
|
|
- <template slot-scope="scope" >
|
|
|
|
- {{scope.$index+1}}
|
|
|
|
- </template>
|
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ {{ scope.$index + 1 }}
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
-
|
|
|
|
- <el-table-column width="100" prop="name" fixed="left" label="姓名">
|
|
|
|
|
|
|
|
|
|
+ <el-table-column width="100" prop="name" fixed="left" label="姓名">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column width="90" v-for="(item,index) in allDate" :key="index" :label="item.showDate+'/'+item.weekDay" align="center">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <div style="color:red;"
|
|
|
|
- v-if="scope.row.worktimeList.filter(w=>w.createDate.split('-')[2] == item.date.split('月')[1].replace('日','')
|
|
|
|
- || w.createDate.split('-')[2] == '0'+item.date.split('月')[1].replace('日','') ).length > 0 && scope.row.worktimeList.filter(w=>w.createDate.split('-')[2] == item.date.split('月')[1].replace('日','')
|
|
|
|
- || w.createDate.split('-')[2] == '0'+item.date.split('月')[1].replace('日','') )[0].workingTime < reportTimeType.allday">
|
|
|
|
- {{scope.row.worktimeList.filter(w=>w.createDate.split('-')[2] == item.date.split('月')[1].replace('日','')
|
|
|
|
- || w.createDate.split('-')[2] == '0'+item.date.split('月')[1].replace('日','') )[0].workingTime
|
|
|
|
- }}</div>
|
|
|
|
- <div style="color:#20a0ff;"
|
|
|
|
- v-if="scope.row.worktimeList.filter(w=>w.createDate.split('-')[2] == item.date.split('月')[1].replace('日','')
|
|
|
|
- || w.createDate.split('-')[2] == '0'+item.date.split('月')[1].replace('日','') ).length > 0 && scope.row.worktimeList.filter(w=>w.createDate.split('-')[2] == item.date.split('月')[1].replace('日','')
|
|
|
|
- || w.createDate.split('-')[2] == '0'+item.date.split('月')[1].replace('日','') )[0].workingTime > reportTimeType.allday">
|
|
|
|
- {{scope.row.worktimeList.filter(w=>w.createDate.split('-')[2] == item.date.split('月')[1].replace('日','')
|
|
|
|
- || w.createDate.split('-')[2] == '0'+item.date.split('月')[1].replace('日','') )[0].workingTime
|
|
|
|
- }}</div>
|
|
|
|
- <div v-if="scope.row.worktimeList.filter(w=>w.createDate.split('-')[2] == item.date.split('月')[1].replace('日','')
|
|
|
|
- || w.createDate.split('-')[2] == '0'+item.date.split('月')[1].replace('日','') ).length > 0 && scope.row.worktimeList.filter(w=>w.createDate.split('-')[2] == item.date.split('月')[1].replace('日','')
|
|
|
|
- || w.createDate.split('-')[2] == '0'+item.date.split('月')[1].replace('日','') )[0].workingTime == reportTimeType.allday">
|
|
|
|
- {{scope.row.worktimeList.filter(w=>w.createDate.split('-')[2] == item.date.split('月')[1].replace('日','')
|
|
|
|
- || w.createDate.split('-')[2] == '0'+item.date.split('月')[1].replace('日','') )[0].workingTime
|
|
|
|
- }}</div>
|
|
|
|
- <div v-if="scope.row.worktimeList.filter(w=>w.createDate.split('-')[2] == item.date.split('月')[1].replace('日','')
|
|
|
|
- || w.createDate.split('-')[2] == '0'+item.date.split('月')[1].replace('日','') ).length == 0">
|
|
|
|
- 0
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ width="90"
|
|
|
|
+ v-for="(item, index) in allDate"
|
|
|
|
+ :key="index"
|
|
|
|
+ :label="item.showDate + '/' + item.weekDay"
|
|
|
|
+ align="center"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div
|
|
|
|
+ style="color: red"
|
|
|
|
+ v-if="
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ item.date.split('月')[1].replace('日', '') ||
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ '0' + item.date.split('月')[1].replace('日', '')
|
|
|
|
+ ).length > 0 &&
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ item.date.split('月')[1].replace('日', '') ||
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ '0' + item.date.split('月')[1].replace('日', '')
|
|
|
|
+ )[0].workingTime < reportTimeType.allday
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ {{
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split("-")[2] ==
|
|
|
|
+ item.date.split("月")[1].replace("日", "") ||
|
|
|
|
+ w.createDate.split("-")[2] ==
|
|
|
|
+ "0" + item.date.split("月")[1].replace("日", "")
|
|
|
|
+ )[0].workingTime
|
|
|
|
+ }}
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ style="color: #20a0ff"
|
|
|
|
+ v-if="
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ item.date.split('月')[1].replace('日', '') ||
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ '0' + item.date.split('月')[1].replace('日', '')
|
|
|
|
+ ).length > 0 &&
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ item.date.split('月')[1].replace('日', '') ||
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ '0' + item.date.split('月')[1].replace('日', '')
|
|
|
|
+ )[0].workingTime > reportTimeType.allday
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ {{
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split("-")[2] ==
|
|
|
|
+ item.date.split("月")[1].replace("日", "") ||
|
|
|
|
+ w.createDate.split("-")[2] ==
|
|
|
|
+ "0" + item.date.split("月")[1].replace("日", "")
|
|
|
|
+ )[0].workingTime
|
|
|
|
+ }}
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ v-if="
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ item.date.split('月')[1].replace('日', '') ||
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ '0' + item.date.split('月')[1].replace('日', '')
|
|
|
|
+ ).length > 0 &&
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ item.date.split('月')[1].replace('日', '') ||
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ '0' + item.date.split('月')[1].replace('日', '')
|
|
|
|
+ )[0].workingTime == reportTimeType.allday
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ {{
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split("-")[2] ==
|
|
|
|
+ item.date.split("月")[1].replace("日", "") ||
|
|
|
|
+ w.createDate.split("-")[2] ==
|
|
|
|
+ "0" + item.date.split("月")[1].replace("日", "")
|
|
|
|
+ )[0].workingTime
|
|
|
|
+ }}
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ v-if="
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ item.date.split('月')[1].replace('日', '') ||
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ '0' + item.date.split('月')[1].replace('日', '')
|
|
|
|
+ ).length == 0
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ 0
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- </el-table>
|
|
|
|
- <div slot="title" class="dialog-title">
|
|
|
|
- <label style="font-size:16px;">员工每日填报工时数</label>
|
|
|
|
- <el-link type="primary" style="float:right;margin-right:60px;" @click="exportMembWorkHours()" >导出数据</el-link>
|
|
|
|
- <!-- <el-button >导出</el-button> -->
|
|
|
|
|
|
+ </el-table>
|
|
|
|
+
|
|
|
|
+ <!-- <div slot="title" class="dialog-title selectworktime_title">
|
|
|
|
+ <label style="font-size: 16px">员工每日已填报工时数</label>
|
|
|
|
+ <el-link
|
|
|
|
+ type="primary"
|
|
|
|
+ style="float: right; margin-right: 60px"
|
|
|
|
+ @click="exportMembWorkHours()"
|
|
|
|
+ >导出已填报数据</el-link
|
|
|
|
+ > -->
|
|
|
|
+ <!-- <el-button >导出</el-button> -->
|
|
|
|
+ <!-- </div> -->
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+
|
|
|
|
+ <el-tab-pane label="未填人员列表" name="second">
|
|
|
|
+ <div class="selectworktime_export">
|
|
|
|
+ <div class="selectworktime_export_l">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ class="selecteworktime_datapick"
|
|
|
|
+ v-model="WorktimeDatepickValue2"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ type="daterange"
|
|
|
|
+ align="right"
|
|
|
|
+ unlink-panels
|
|
|
|
+ range-separator="至"
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
+ end-placeholder="结束日期"
|
|
|
|
+ :default-time="['12:00:00', '12:00:00']"
|
|
|
|
+ size="small"
|
|
|
|
+ popper-class="selecteorktime_datapick_popper"
|
|
|
|
+ @change="showMonthNotWorkTime()"
|
|
|
|
+ >
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ <el-button size="small" @click="getLastWeek()">上周</el-button>
|
|
|
|
+ <el-button size="small" @click="getThisWeek()">本周</el-button>
|
|
|
|
+ <el-button size="small" @click="getNextWeek()">下周</el-button>
|
|
</div>
|
|
</div>
|
|
- </el-dialog>
|
|
|
|
|
|
+ <el-link
|
|
|
|
+ type="primary"
|
|
|
|
+ style="float: right; margin-right: 60px; vertical-align: middle"
|
|
|
|
+ @click="exportMembNotWorkHours()"
|
|
|
|
+ >导出数据</el-link
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ <el-table
|
|
|
|
+ :data="monthNotWorkDate"
|
|
|
|
+ border
|
|
|
|
+ :height="500"
|
|
|
|
+ highlight-current-row
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column width="300" fixed="left" label="部门" prop="department">
|
|
|
|
+ <!-- <template slot-scope="scope">
|
|
|
|
+ {{ scope.$index + 1 }}
|
|
|
|
+ </template> -->
|
|
|
|
+ </el-table-column>
|
|
|
|
+
|
|
|
|
+ <el-table-column width="300" prop="name" fixed="left" label="姓名" >
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ width="300"
|
|
|
|
+ label="未填日期"
|
|
|
|
+ align="center"
|
|
|
|
+ prop="createDate"
|
|
|
|
+ >
|
|
|
|
+
|
|
|
|
+ <!-- <template slot-scope="scope">
|
|
|
|
+ <div
|
|
|
|
+ style="color: red"
|
|
|
|
+ v-if="
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ item.date.split('月')[1].replace('日', '') ||
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ '0' + item.date.split('月')[1].replace('日', '')
|
|
|
|
+ ).length > 0 &&
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ item.date.split('月')[1].replace('日', '') ||
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ '0' + item.date.split('月')[1].replace('日', '')
|
|
|
|
+ )[0].workingTime < reportTimeType.allday
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ {{
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split("-")[2] ==
|
|
|
|
+ item.date.split("月")[1].replace("日", "") ||
|
|
|
|
+ w.createDate.split("-")[2] ==
|
|
|
|
+ "0" + item.date.split("月")[1].replace("日", "")
|
|
|
|
+ )[0].workingTime
|
|
|
|
+ }}
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ style="color: #20a0ff"
|
|
|
|
+ v-if="
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ item.date.split('月')[1].replace('日', '') ||
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ '0' + item.date.split('月')[1].replace('日', '')
|
|
|
|
+ ).length > 0 &&
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ item.date.split('月')[1].replace('日', '') ||
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ '0' + item.date.split('月')[1].replace('日', '')
|
|
|
|
+ )[0].workingTime > reportTimeType.allday
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ {{
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split("-")[2] ==
|
|
|
|
+ item.date.split("月")[1].replace("日", "") ||
|
|
|
|
+ w.createDate.split("-")[2] ==
|
|
|
|
+ "0" + item.date.split("月")[1].replace("日", "")
|
|
|
|
+ )[0].workingTime
|
|
|
|
+ }}
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ v-if="
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ item.date.split('月')[1].replace('日', '') ||
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ '0' + item.date.split('月')[1].replace('日', '')
|
|
|
|
+ ).length > 0 &&
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ item.date.split('月')[1].replace('日', '') ||
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ '0' + item.date.split('月')[1].replace('日', '')
|
|
|
|
+ )[0].workingTime == reportTimeType.allday
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ {{
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split("-")[2] ==
|
|
|
|
+ item.date.split("月")[1].replace("日", "") ||
|
|
|
|
+ w.createDate.split("-")[2] ==
|
|
|
|
+ "0" + item.date.split("月")[1].replace("日", "")
|
|
|
|
+ )[0].workingTime
|
|
|
|
+ }}
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ v-if="
|
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
|
+ (w) =>
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ item.date.split('月')[1].replace('日', '') ||
|
|
|
|
+ w.createDate.split('-')[2] ==
|
|
|
|
+ '0' + item.date.split('月')[1].replace('日', '')
|
|
|
|
+ ).length == 0
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ 0
|
|
|
|
+ </div>
|
|
|
|
+ </template> -->
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <!-- <div slot="title" class="dialog-title">
|
|
|
|
+ <label style="font-size: 16px">员工每日未填报工时数</label>
|
|
|
|
+ <el-link
|
|
|
|
+ type="primary"
|
|
|
|
+ style="float: right; margin-right: 60px"
|
|
|
|
+ @click="exportMembWorkHours()"
|
|
|
|
+ >导出未填报数据</el-link
|
|
|
|
+ > -->
|
|
|
|
+ <!-- <el-button >导出</el-button> -->
|
|
|
|
+ <!-- </div> -->
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ </el-tabs>
|
|
|
|
+ </el-dialog>
|
|
<!--驳回弹出框 -->
|
|
<!--驳回弹出框 -->
|
|
<el-dialog title="请输入原因" v-if="denyReasonDialog" :visible.sync="denyReasonDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
<el-dialog title="请输入原因" v-if="denyReasonDialog" :visible.sync="denyReasonDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
<div>
|
|
<div>
|
|
@@ -870,6 +1182,10 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+
|
|
|
|
+ WorktimeDatepickValue1: [],
|
|
|
|
+ WorktimeDatepickValue2: [],
|
|
|
|
+ activeName:"first",
|
|
submitingReport: false,
|
|
submitingReport: false,
|
|
importResultMsg:null,
|
|
importResultMsg:null,
|
|
showImportResult:false,
|
|
showImportResult:false,
|
|
@@ -1048,6 +1364,8 @@
|
|
inpu.value = parseFloat(inpu.value);
|
|
inpu.value = parseFloat(inpu.value);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+
|
|
//获取项目下的任务分组
|
|
//获取项目下的任务分组
|
|
getTaskGroups(domain, index) {
|
|
getTaskGroups(domain, index) {
|
|
this.workForm.domains[index].groupId=null;
|
|
this.workForm.domains[index].groupId=null;
|
|
@@ -1417,51 +1735,232 @@
|
|
|
|
|
|
this.selectProject(itemDomain, newIndex);
|
|
this.selectProject(itemDomain, newIndex);
|
|
},
|
|
},
|
|
- //导出员工每日填报工时数
|
|
|
|
- exportMembWorkHours() {
|
|
|
|
- this.http.post('/report/exportUserDailyWorkTime',{
|
|
|
|
- month: this.date
|
|
|
|
- },
|
|
|
|
- res => {
|
|
|
|
- if (res.code == "ok") {
|
|
|
|
- var url = res.data;
|
|
|
|
- this.downloadByA("人员每日工时统计.xls", url);
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- error => {
|
|
|
|
- this.$message({
|
|
|
|
- message: error,
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
- },
|
|
|
|
- downloadByA(name, url) {
|
|
|
|
- const a = document.createElement('a'); // 创建a标签
|
|
|
|
- a.setAttribute('download', name);// download属性
|
|
|
|
- a.setAttribute('href', url);// href链接
|
|
|
|
- a.click();// 自执行点击事件
|
|
|
|
- a.remove();
|
|
|
|
- },
|
|
|
|
- showMonthWorkTime() {
|
|
|
|
- this.monthWorkTimeDialog = true;
|
|
|
|
- this.http.post('/report/getUserDailyWorkTime',{
|
|
|
|
- month: this.date
|
|
|
|
- },
|
|
|
|
- res => {
|
|
|
|
- if (res.code == "ok") {
|
|
|
|
- this.monthWorkData = res.data.list;
|
|
|
|
- this.$forceUpdate();
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- error => {
|
|
|
|
- this.$message({
|
|
|
|
- message: error,
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
- },
|
|
|
|
|
|
+ // tabupdata(){
|
|
|
|
+ // if(this.WorktimeDatepickValue2.length == 0){
|
|
|
|
+ // this.WorktimeDatepickValue2 = [this.getAutoWeekDate()[0],this.getAutoWeekDate()[6]];
|
|
|
|
+ // // this.showMonthNotWorkTime()
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+ showWorkTime(){
|
|
|
|
+ this.monthWorkTimeDialog = true;
|
|
|
|
+ this.showMonthWorkTime()
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ handleClick(t,e){
|
|
|
|
+ console.log("tabname",t.name);
|
|
|
|
+ if (t.name == "first") {
|
|
|
|
+ this.showMonthWorkTime()
|
|
|
|
+ }else{
|
|
|
|
+ this.showMonthNotWorkTime()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //导出员工每日填报工时数
|
|
|
|
+ exportMembAlreadyWorkHours() {
|
|
|
|
+ console.log("exportMembAlreadyWorkHours",this.WorktimeDatepickValue1);
|
|
|
|
+ this.http.post(
|
|
|
|
+ "/report/exportUserDailyWorkTime",
|
|
|
|
+ {
|
|
|
|
+ // month: this.date,
|
|
|
|
+ startDate: this.WorktimeDatepickValue1[0],
|
|
|
|
+ endDate: this.WorktimeDatepickValue1[1],
|
|
|
|
+ },
|
|
|
|
+ (res) => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ let url = res.data;
|
|
|
|
+ console.log(res);
|
|
|
|
+ this.downloadByA("人员每日工时统计.xls", url);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ (error) => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ exportMembNotWorkHours() {
|
|
|
|
+
|
|
|
|
+ this.http.post(
|
|
|
|
+ "/report/exportNoReportUserList",
|
|
|
|
+ {
|
|
|
|
+ // month: this.date,
|
|
|
|
+ startDate: this.WorktimeDatepickValue2[0],
|
|
|
|
+ endDate: this.WorktimeDatepickValue2[1],
|
|
|
|
+ },
|
|
|
|
+ (res) => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ let url = res.data;
|
|
|
|
+ // console.log(res.data);
|
|
|
|
+ this.downloadByA("人员每日工时统计.xls", url);
|
|
|
|
+ console.log(url);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ (error) => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ downloadByA(name, url) {
|
|
|
|
+ console.log(name,url);
|
|
|
|
+ const a = document.createElement("a"); // 创建a标签
|
|
|
|
+ a.setAttribute("download", name); // download属性
|
|
|
|
+ a.setAttribute("href", url); // href链接
|
|
|
|
+ a.click(); // 自执行点击事件
|
|
|
|
+ a.remove();
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 111
|
|
|
|
+ showMonthWorkTime() {
|
|
|
|
+
|
|
|
|
+ if(this.WorktimeDatepickValue1.length == 0){
|
|
|
|
+ let newdate = new Date();
|
|
|
|
+ let nowdate = newdate.toLocaleDateString();
|
|
|
|
+ let nowwd = [this.getAutoWeekDate(nowdate)[0],this.getAutoWeekDate(nowdate)[6]]
|
|
|
|
+ this.WorktimeDatepickValue1 = nowwd
|
|
|
|
+ }
|
|
|
|
+ this.allDate = this.alreadyAllDate(this.WorktimeDatepickValue1[0],this.WorktimeDatepickValue1[1])
|
|
|
|
+ this.http.post(
|
|
|
|
+ "/report/getUserDailyWorkTime",
|
|
|
|
+ // "/report/getNoReportUserList",
|
|
|
|
+ {
|
|
|
|
+ // month: this.date,
|
|
|
|
+ startDate: this.WorktimeDatepickValue1[0],
|
|
|
|
+ endDate: this.WorktimeDatepickValue1[1],
|
|
|
|
+ },
|
|
|
|
+ (res) => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.monthworkDate = res.data.list;
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
+ console.log("monthworkdate", this.monthworkDate);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ (error) => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ showMonthNotWorkTime() {
|
|
|
|
+ if(this.WorktimeDatepickValue2.length == 0){
|
|
|
|
+ let newdate = new Date();
|
|
|
|
+ let nowdate = newdate.toLocaleDateString();
|
|
|
|
+ let nowwd = [this.getAutoWeekDate(nowdate)[0],this.getAutoWeekDate(nowdate)[6]]
|
|
|
|
+ this.WorktimeDatepickValue2 = nowwd
|
|
|
|
+ }
|
|
|
|
+ console.log("exportMembNotWorkHours",this.WorktimeDatepickValue2);
|
|
|
|
+ this.http.post(
|
|
|
|
+ // "/report/getUserDailyWorkTime",
|
|
|
|
+ "/report/getNoReportUserList",
|
|
|
|
+ {
|
|
|
|
+ // month: this.date,
|
|
|
|
+ startDate: this.WorktimeDatepickValue2[0],
|
|
|
|
+ endDate: this.WorktimeDatepickValue2[1],
|
|
|
|
+ },
|
|
|
|
+ (res) => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.monthNotWorkDate = res.data;
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
+ console.log("monthNotWorkDate", this.monthNotWorkDate);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ (error) => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ // 获取默认这zhou日期参数 222
|
|
|
|
+ getLastWeek(e){
|
|
|
|
+ let newdate = new Date()
|
|
|
|
+ let lastdate = newdate.toLocaleDateString(newdate.setDate(newdate.getDate() - 7))
|
|
|
|
+ let lastwd = [this.getAutoWeekDate(lastdate)[0],this.getAutoWeekDate(lastdate)[6]]
|
|
|
|
+ if(e){
|
|
|
|
+ this.WorktimeDatepickValue1 = lastwd
|
|
|
|
+ this.showMonthWorkTime()
|
|
|
|
+ }else{
|
|
|
|
+ this.WorktimeDatepickValue2 = lastwd
|
|
|
|
+ this.showMonthNotWorkTime()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ getThisWeek(e){
|
|
|
|
+ let newdate = new Date();
|
|
|
|
+ let nowdate = newdate.toLocaleDateString();
|
|
|
|
+ let nowwd = [this.getAutoWeekDate(nowdate)[0],this.getAutoWeekDate(nowdate)[6]]
|
|
|
|
+ if(e){
|
|
|
|
+ this.WorktimeDatepickValue1 = nowwd
|
|
|
|
+ this.showMonthWorkTime()
|
|
|
|
+ }else{
|
|
|
|
+ this.WorktimeDatepickValue2 = nowwd
|
|
|
|
+ this.showMonthNotWorkTime()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ getNextWeek(e){
|
|
|
|
+ let newdate = new Date()
|
|
|
|
+ let nextdate = newdate.toLocaleDateString(newdate.setDate(newdate.getDate() + 7))
|
|
|
|
+ let nextwd = [this.getAutoWeekDate(nextdate)[0],this.getAutoWeekDate(nextdate)[6]]
|
|
|
|
+ if(e){
|
|
|
|
+ this.WorktimeDatepickValue1 = nextwd
|
|
|
|
+ this.showMonthWorkTime()
|
|
|
|
+ }else{
|
|
|
|
+ this.WorktimeDatepickValue2 = nextwd
|
|
|
|
+ this.showMonthNotWorkTime()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ alreadyAllDate(stime,etime){
|
|
|
|
+ let diffdate = new Array();
|
|
|
|
+ let i=0;
|
|
|
|
+ while(stime<=etime){
|
|
|
|
+ let dateArray = stime.split("-");
|
|
|
|
+ let date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
|
|
|
|
+ let stimewk = "周" + "日一二三四五六".charAt(date.getDay());
|
|
|
|
+ let timedate = (stime.split("-")[1].charAt(0) == 0 ? stime.split("-")[1].charAt(1) : stime.split("-")[1]) + "月" + (stime.split("-")[2].charAt(0) == 0 ? stime.split("-")[2].charAt(1) : stime.split("-")[2]) + "日"
|
|
|
|
+ let timeshowdate = (stime.split("-")[1].charAt(0) == 0 ? stime.split("-")[1].charAt(1) : stime.split("-")[1]) + "." + (stime.split("-")[2].charAt(0) == 0 ? stime.split("-")[2].charAt(1) : stime.split("-")[2])
|
|
|
|
+
|
|
|
|
+ diffdate[i] = {date:timedate,showDate:timeshowdate,weekDay:stimewk};
|
|
|
|
+
|
|
|
|
+ let stime_ts = new Date(stime).getTime();
|
|
|
|
+ let next_date = stime_ts + (24*60*60*1000);
|
|
|
|
+ let next_dates_y = new Date(next_date).getFullYear()+'-';
|
|
|
|
+ let next_dates_m = (new Date(next_date).getMonth()+1 < 10)?'0'+(new Date(next_date).getMonth()+1)+'-':(new Date(next_date).getMonth()+1)+'-';
|
|
|
|
+ let next_dates_d = (new Date(next_date).getDate() < 10)?'0'+new Date(next_date).getDate():new Date(next_date).getDate();
|
|
|
|
+ stime = next_dates_y+next_dates_m+next_dates_d;
|
|
|
|
+ i++;
|
|
|
|
+ }
|
|
|
|
+ return diffdate
|
|
|
|
+ },
|
|
|
|
+ getAutoWeekDate(e) {
|
|
|
|
+ let dateString = e;
|
|
|
|
+ let dateStringReg = /^\d{4}[/-]\d{1,2}[/-]\d{1,2}$/;
|
|
|
|
+ if (dateString.match(dateStringReg)) {
|
|
|
|
+ let presentDate = new Date(dateString),
|
|
|
|
+ today = presentDate.getDay() !== 0 ? presentDate.getDay() : 7;
|
|
|
|
+ return Array.from(new Array(7), function (val, index) {
|
|
|
|
+ let formatDate = new Date(
|
|
|
|
+ presentDate.getTime() - (today - index - 1) * 24 * 60 * 60 * 1000
|
|
|
|
+ );
|
|
|
|
+ return (
|
|
|
|
+ formatDate.getFullYear() +
|
|
|
|
+ "-" +
|
|
|
|
+ ((formatDate.getMonth() + 1) < 10 ? "0" + (formatDate.getMonth() + 1) : (formatDate.getMonth() + 1)) +
|
|
|
|
+ "-" +
|
|
|
|
+ (formatDate.getDate() < 10 ? "0" + formatDate.getDate() : formatDate.getDate())
|
|
|
|
+ );
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ throw new Error(
|
|
|
|
+ 'dateString should be like "yyyy-mm-dd" or "yyyy/mm/dd"'
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ },
|
|
onProgressChange() {
|
|
onProgressChange() {
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
},
|
|
},
|
|
@@ -1720,6 +2219,38 @@
|
|
this.dimension(domain, index);
|
|
this.dimension(domain, index);
|
|
//获取项目下的任务分组
|
|
//获取项目下的任务分组
|
|
this.getTaskGroups(domain, index);
|
|
this.getTaskGroups(domain, index);
|
|
|
|
+ //获取项目审核人
|
|
|
|
+ this.getProjectAuditorList(domain, index);
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ //获取项目审核人
|
|
|
|
+ getProjectAuditorList(domainItem, index) {
|
|
|
|
+ if(domainItem.projectId == '') {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ domainItem.projectAuditorId = null;
|
|
|
|
+ domainItem.projectAuditorName = null;
|
|
|
|
+
|
|
|
|
+ this.http.post('/project-auditor/getList',{
|
|
|
|
+ projectId: domainItem.projectId,
|
|
|
|
+ },
|
|
|
|
+ res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ domainItem.auditUserList = res.data
|
|
|
|
+ if (res.data.length==1) {
|
|
|
|
+ domainItem.projectAuditorId = domainItem.auditUserList[0].auditorId;
|
|
|
|
+ domainItem.projectAuditorName = domainItem.auditUserList[0].auditorName;
|
|
|
|
+ }
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ );
|
|
},
|
|
},
|
|
|
|
|
|
// 获取维度数据
|
|
// 获取维度数据
|
|
@@ -1937,7 +2468,7 @@
|
|
for (var j=0;j<report.data.length; j++) {
|
|
for (var j=0;j<report.data.length; j++) {
|
|
if (report.data[j].state == 0
|
|
if (report.data[j].state == 0
|
|
&& (this.user.company.packageEngineering==0 || (this.user.company.packageEngineering==1 && report.data[j].departmentAuditState == 1))
|
|
&& (this.user.company.packageEngineering==0 || (this.user.company.packageEngineering==1 && report.data[j].departmentAuditState == 1))
|
|
- && (this.user.role == 1 || this.user.role == 2 || report.data[j].inchargerId == this.user.id)) {
|
|
|
|
|
|
+ && (this.user.role == 1 || this.user.role == 2 || report.data[j].projectAuditorId == this.user.id)) {
|
|
hasUnChecked = true;
|
|
hasUnChecked = true;
|
|
id += report.data[j].id+',';
|
|
id += report.data[j].id+',';
|
|
}
|
|
}
|
|
@@ -2551,6 +3082,9 @@
|
|
wuduList: list.report[i].degreeList,
|
|
wuduList: list.report[i].degreeList,
|
|
taskGroups:list.report[i].taskGroups,
|
|
taskGroups:list.report[i].taskGroups,
|
|
customData: list.report[i].customData,//自定义的数值
|
|
customData: list.report[i].customData,//自定义的数值
|
|
|
|
+ auditUserList: list.report[i].auditUserList,
|
|
|
|
+ projectAuditorId: list.report[i].projectAuditorId,
|
|
|
|
+ projectAuditorName: list.report[i].projectAuditorName,
|
|
})
|
|
})
|
|
if (list.report[i].state >= 2) {
|
|
if (list.report[i].state >= 2) {
|
|
this.canEdit = true;
|
|
this.canEdit = true;
|
|
@@ -3565,6 +4099,15 @@
|
|
} else {
|
|
} else {
|
|
formData.append("stage", "-");
|
|
formData.append("stage", "-");
|
|
}
|
|
}
|
|
|
|
+ if (this.workForm.domains[i].projectAuditorId) {
|
|
|
|
+ formData.append("projectAuditorId", this.workForm.domains[i].projectAuditorId);
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "请指定项目审核人",
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.submitingReport = true;
|
|
this.submitingReport = true;
|
|
this.http.uploadFile( this.port.report.editPort, formData,
|
|
this.http.uploadFile( this.port.report.editPort, formData,
|
|
@@ -3748,7 +4291,7 @@
|
|
this.getTimeType();
|
|
this.getTimeType();
|
|
this.getDepartment();
|
|
this.getDepartment();
|
|
this.scrollFunction()
|
|
this.scrollFunction()
|
|
- this.userssHu()
|
|
|
|
|
|
+ this.userssHu();
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -3839,6 +4382,9 @@
|
|
margin-left: 10px;
|
|
margin-left: 10px;
|
|
vertical-align: bottom;
|
|
vertical-align: bottom;
|
|
}
|
|
}
|
|
|
|
+ .selectworktime .el-table__fixed-body-wrapper{
|
|
|
|
+ top: 48px !important;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|