|
@@ -245,6 +245,7 @@
|
|
|
|
|
|
<el-button size="small" type="primary" @click="handleSelectionZzjgbtn3" v-if="user.userNameNeedTranslate != 1">{{ $t('modifyingDepartments') }}</el-button>
|
|
|
<el-button size="small" type="primary" @click="handJue">{{ $t('modifyingRoles') }}</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="workingHoursDialogClick()">修正工时所属部门</el-button>
|
|
|
|
|
|
|
|
|
|
|
@@ -262,6 +263,24 @@
|
|
|
</el-col>
|
|
|
</div>
|
|
|
|
|
|
+ <!-- 修正工时所属部门 -->
|
|
|
+ <el-dialog title="修正工时" :visible.sync="workingHoursDialog" width="650px" :before-close="handleClose">
|
|
|
+ <div>
|
|
|
+ <div class="workingHours">
|
|
|
+ <el-radio v-model="workingHoursRadio" label="1">全部工时</el-radio>
|
|
|
+ <el-radio v-model="workingHoursRadio" label="2">部分工时</el-radio>
|
|
|
+ </div>
|
|
|
+ <div class="workingHours workingHoursData" v-if="workingHoursRadio == 2">
|
|
|
+ <span class="workingHoursSpan">日期范围</span>
|
|
|
+ <el-date-picker v-model="workingHoursDatas" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="workingHoursDialog = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="workingHours()">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<!-- 批量修改弹出框 -->
|
|
|
<el-dialog :title="$t('changes')" :visible.sync="handleSelectionZzjgshow" v-if="handleSelectionZzjgshow" width="30%">
|
|
|
<el-form model="" label-width="20%">
|
|
@@ -803,6 +822,9 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ workingHoursDialog: false,
|
|
|
+ workingHoursRadio: '1',
|
|
|
+ workingHoursDatas: [],
|
|
|
recordMsgDialog: false,
|
|
|
recordMsg: {indate: [],msg:''},
|
|
|
roleNameFlg: '',
|
|
@@ -1715,6 +1737,16 @@ export default {
|
|
|
}
|
|
|
this.handleSelectionZzjgshow = true;
|
|
|
},
|
|
|
+ workingHoursDialogClick() {
|
|
|
+ let endDate = this.dayjs(`${new Date()}`).format('YYYY-MM-DD')
|
|
|
+ let startDate = this.dayjs(`${new Date()}`).format('YYYY-MM') + '-01'
|
|
|
+ this.workingHoursDatas = [startDate, endDate]
|
|
|
+ if (this.handleSelectionZzjgDate.length == 0) {
|
|
|
+ this.$message(this.$t('pleaseselectpersonnel'));
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.workingHoursDialog = true
|
|
|
+ },
|
|
|
handJue() {
|
|
|
if (this.handleSelectionZzjgDate.length == 0) {
|
|
|
this.$message(this.$t('pleaseselectpersonnel'));
|
|
@@ -3385,6 +3417,36 @@ export default {
|
|
|
this.$message({message: '其它错误',type: "error"});
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ // 修正工时所属部门
|
|
|
+ workingHours() {
|
|
|
+ let obj = {
|
|
|
+ userIds: '',
|
|
|
+ startDate: '',
|
|
|
+ endDate: ''
|
|
|
+ }
|
|
|
+ if(this.workingHoursRadio == '2') {
|
|
|
+ obj.startDate = this.workingHoursDatas[0],
|
|
|
+ obj.endDate = this.workingHoursDatas[1]
|
|
|
+ }
|
|
|
+ let arr = []
|
|
|
+ for(var i in this.handleSelectionZzjgDate) {
|
|
|
+ arr.push(this.handleSelectionZzjgDate[i].id)
|
|
|
+ }
|
|
|
+ obj.userIds = arr.toString()
|
|
|
+ this.http.post('/report/correctWorkingTime', obj,
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.getUser();
|
|
|
+ this.workingHoursDialog = false
|
|
|
+ this.$message({message: '操作成功',type: "success"});
|
|
|
+ } else {
|
|
|
+ this.$message({message: res.msg,type: "error"});
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({message: error,type: "error"});
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -3412,6 +3474,16 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
+.workingHours {
|
|
|
+ padding: 0 60px;
|
|
|
+}
|
|
|
+.workingHoursData {
|
|
|
+ margin-top: 30px;
|
|
|
+}
|
|
|
+.workingHoursSpan {
|
|
|
+ display: inline-block;
|
|
|
+ margin-right: 20px;
|
|
|
+}
|
|
|
.line {
|
|
|
width: 30px;
|
|
|
/* height: 500px; */
|