|
@@ -1539,6 +1539,14 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="操作" v-if="user.companyId == 469 && user.roleName=='超级管理员'">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <el-button type="default" size="small" @click="openModImportTime(scope.row)">修改导入时间</el-button>
|
|
|
+ <!-- <el-button type="primary" @click="delImportTime(scope.row)">删除记录</el-button> -->
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<el-col :span="24" class="paginatis">
|
|
|
<el-pagination
|
|
@@ -1629,6 +1637,8 @@
|
|
|
<el-link v-if="active==0" style="float:right;margin-right:100px;" type="primary" @click="toView()">{{$t('other.viewLaborImportRecords')}}</el-link>
|
|
|
<el-link v-if="active==0" style="float:right;margin-right:100px;" type="primary" @click="downloadProjectRatio">下载填报工时占比表</el-link>
|
|
|
<el-link v-if="active==0 && user.companyId == 469" style="float:right;margin-right:100px;" type="primary" @click="importCardTimeVisi = true">导入考勤时长</el-link>
|
|
|
+ <el-link v-if="active==0 && user.companyId == 469 && user.roleName == '超级管理员'" style="float:right;margin-right:50px;" type="primary" @click="showBatchDeleteReport = true; startDeleting = false;">批量删除日报</el-link>
|
|
|
+ <el-link v-if="active==0 && user.companyId == 469 && user.roleName == '超级管理员'" style="float:right;margin-right:50px;" type="primary" @click="showBatchSimpleApproveReport = true; startDeleting = false;">批量审核日报</el-link>
|
|
|
</div>
|
|
|
|
|
|
<span slot="footer">
|
|
@@ -1647,6 +1657,62 @@
|
|
|
</el-upload>
|
|
|
</p>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="批量删除日报" v-if="showBatchDeleteReport" :visible.sync="showBatchDeleteReport" width="200">
|
|
|
+ <div>
|
|
|
+ <span>{{$t('time.selectdaterange')}}:</span><el-date-picker
|
|
|
+ v-model="deleteReportParam.date" :editable="false"
|
|
|
+ format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
|
|
+ :clearable="true"
|
|
|
+ :range-separator="$t('other.to')"
|
|
|
+ type="daterange"
|
|
|
+ :start-placeholder="$t('time.startDate')"
|
|
|
+ :end-placeholder="$t('time.endDate')"
|
|
|
+ ></el-date-picker>
|
|
|
+ </div>
|
|
|
+ <div style="margin-top:10px;">
|
|
|
+ <span>请选择员工:</span>
|
|
|
+ <el-select v-model="deleteReportParam.userIds" placeholder="请选择" style="width:500px;" filterable multiple>
|
|
|
+ <el-option v-for="item in usersList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
+ <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
|
|
|
+ <span v-else>{{item.name}}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <span slot="footer">
|
|
|
+ <el-button @click="confirmBatchDelReport" :loading="startDeleting" >开始删除</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="批量审核日报" v-if="showBatchSimpleApproveReport" :visible.sync="showBatchSimpleApproveReport" width="200">
|
|
|
+ <div>
|
|
|
+ <span>{{$t('time.selectdaterange')}}:</span><el-date-picker
|
|
|
+ v-model="deleteReportParam.date" :editable="false"
|
|
|
+ format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
|
|
+ :clearable="true"
|
|
|
+ :range-separator="$t('other.to')"
|
|
|
+ type="daterange"
|
|
|
+ :start-placeholder="$t('time.startDate')"
|
|
|
+ :end-placeholder="$t('time.endDate')"
|
|
|
+ ></el-date-picker>
|
|
|
+ </div>
|
|
|
+ <span slot="footer">
|
|
|
+ <el-button @click="confirmBatchApproveReport" :loading="startDeleting" >审批通过</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="修改导入时间" v-if="showModImportTimeDialog" :visible.sync="showModImportTimeDialog" width="200">
|
|
|
+ <div>
|
|
|
+ <span>选择时间:</span><el-date-picker
|
|
|
+ v-model="modImportTime"
|
|
|
+ format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ :clearable="true"
|
|
|
+ type="datetime"
|
|
|
+ ></el-date-picker>
|
|
|
+ </div>
|
|
|
+ <span slot="footer">
|
|
|
+ <el-button @click="confirmChangeModTime" >确认</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
|
|
|
<el-dialog title="导出员工填报工时占比" v-if="exportUserRatio" :visible.sync="exportUserRatio" width="200">
|
|
|
<div>
|
|
@@ -1758,6 +1824,13 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ modItemDataId: null,
|
|
|
+ modImportTime: null,
|
|
|
+ showModImportTimeDialog: false,
|
|
|
+ showBatchSimpleApproveReport: false,
|
|
|
+ startDeleting: false,
|
|
|
+ showBatchDeleteReport: false,
|
|
|
+ deleteReportParam: {date:null, userIds:[]},
|
|
|
isDenying: false,
|
|
|
targetWeekDate: null,//填写周报中的周日期
|
|
|
importCardTimeVisi: false,
|
|
@@ -2091,6 +2164,137 @@
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations(['upDataLoading']),
|
|
|
+ openModImportTime(row) {
|
|
|
+ this.showModImportTimeDialog = true;
|
|
|
+ this.modItemDataId = row.id;
|
|
|
+ },
|
|
|
+ confirmChangeModTime() {
|
|
|
+ if (this.modImportTime == null || this.modImportTime.length == 0) {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择时间',
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.http.post('/report-import-log/changeTime',{
|
|
|
+ modLogDateTime: this.modImportTime,
|
|
|
+ id: this.modItemDataId
|
|
|
+ },res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.$message({
|
|
|
+ message: '修改成功',
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ this.getToView();
|
|
|
+ this.showModImportTimeDialog = false;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ confirmBatchApproveReport() {
|
|
|
+ if (this.deleteReportParam.date == null || this.deleteReportParam.date.length == 0) {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择日期范围',
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$confirm('您确定要审核通过该时间段内全部的日报吗?',this.$t('other.prompts'), {
|
|
|
+ confirmButtonText: this.$t('btn.determine'),
|
|
|
+ cancelButtonText: this.$t('btn.cancel'),
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.startDeleting = true;
|
|
|
+ this.http.post('/report/batchApproveByDate',{
|
|
|
+ startDate: this.deleteReportParam.date[0],
|
|
|
+ endDate: this.deleteReportParam.date[1],
|
|
|
+ },res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.$message({
|
|
|
+ message: '审核通过',
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ this.getReportList();
|
|
|
+ this.getDepartment();
|
|
|
+ this.startDeleting = false;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }).catch(() => {this.startDeleting = false});
|
|
|
+ },
|
|
|
+ confirmBatchDelReport() {
|
|
|
+ if (this.deleteReportParam.userIds.length == 0) {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择人员',
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.deleteReportParam.date == null || this.deleteReportParam.date.length == 0) {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择日期范围',
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$confirm('您确定要删除该时间段内选中人员的日报吗,删除后将不可恢复',this.$t('other.prompts'), {
|
|
|
+ confirmButtonText: this.$t('btn.determine'),
|
|
|
+ cancelButtonText: this.$t('btn.cancel'),
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.startDeleting = true;
|
|
|
+ this.http.post('/report/batchDelete',{
|
|
|
+ userIds: JSON.stringify(this.deleteReportParam.userIds),
|
|
|
+ startDate: this.deleteReportParam.date[0],
|
|
|
+ endDate: this.deleteReportParam.date[1],
|
|
|
+ },res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.$message({
|
|
|
+ message: this.$t('message.successfullyDeleted'),
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ this.getReportList();
|
|
|
+ this.getDepartment();
|
|
|
+ this.startDeleting = false;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }).catch(() => {this.startDeleting = false});
|
|
|
+ },
|
|
|
getRecentlyProject() {
|
|
|
this.http.post('/project/nearProject',{},res => {
|
|
|
if(res.code == 'ok'){
|