Merge branch 'wcd-2411-update' into wcd
| | |
| | | public interface AttendanceLeaveRepository extends JpaRepository<AttendanceLeave, Long>, JpaSpecificationExecutor<AttendanceLeave> {
|
| | |
|
| | | //添加时查询请假时间是否冲突
|
| | | @Query(value = "SELECT * FROM attendance_leave WHERE user_id = ?3 AND approval_status IN ('approval_status_under_approval', 'approval_status_passed') AND ((leave_start_time > ?1 and leave_start_time < ?2) OR \n" +
|
| | | "(leave_start_time < ?1 and leave_end_time > ?2) OR (leave_end_time > ?1 and leave_end_time < ?2) OR (leave_start_time > ?1 and leave_end_time < ?2))", nativeQuery = true)
|
| | | @Query(value = "SELECT * FROM attendance_leave WHERE user_id = ?3 AND approval_status IN ('approval_status_under_approval', 'approval_status_passed') AND leave_start_time <= ?2 AND leave_end_time >= ?1", nativeQuery = true)
|
| | | List<AttendanceLeave> checkCreateLeaveTime(String startTime, String endTime, Long userId);
|
| | |
|
| | | //修改时查询请假时间是否冲突
|
| | | @Query(value = "SELECT * FROM attendance_leave WHERE user_id = ?3 AND approval_status IN ('approval_status_under_approval', 'approval_status_passed') AND id NOT IN ?4 AND ((leave_start_time > ?1 and leave_start_time < ?2) OR \n" +
|
| | | "(leave_start_time < ?1 and leave_end_time > ?2) OR (leave_end_time > ?1 and leave_end_time < ?2) OR (leave_start_time > ?1 and leave_end_time < ?2))", nativeQuery = true)
|
| | | @Query(value = "SELECT * FROM attendance_leave WHERE user_id = ?3 AND approval_status IN ('approval_status_under_approval', 'approval_status_passed') AND id NOT IN ?4 AND leave_start_time <= ?2 AND leave_end_time >= ?1", nativeQuery = true)
|
| | | List<AttendanceLeave> checkUpdateForLeaveTime(String startTime, String endTime, Long userId, Set<Long> ids);
|
| | |
|
| | | //查询今年已使用的年假时长
|
| | |
| | | Double getSurplusYearTime(Long userId,String startTime,String endTime);
|
| | |
|
| | | //查询请假记录
|
| | | @Query(value = "SELECT * from attendance_leave where user_id = ?1 and leave_start_time < ?3 and leave_end_time > ?2 and approval_status IN ('approval_status_passed')", nativeQuery = true)
|
| | | @Query(value = "SELECT * from attendance_leave where user_id = ?1 and leave_start_time <= ?3 and leave_end_time >= ?2 and approval_status IN ('approval_status_passed')", nativeQuery = true)
|
| | | List<AttendanceLeave> findByUserIdAndDate(Long userId, LocalDateTime startDate, LocalDateTime endDate);
|
| | |
|
| | | //查询请假记录(根据请假类型)
|
| | | @Query(value = "SELECT * from attendance_leave where user_id = ?1 and leave_start_time < ?3 and leave_end_time > ?2 and approval_status IN ('approval_status_passed') and leave_type = ?4", nativeQuery = true)
|
| | | @Query(value = "SELECT * from attendance_leave where user_id = ?1 and leave_start_time <= ?3 and leave_end_time >= ?2 and approval_status IN ('approval_status_passed') and leave_type = ?4", nativeQuery = true)
|
| | | List<AttendanceLeave> findByUserIdAndDateAndLeaveType(Long userId, LocalDateTime startDate, LocalDateTime endDate,String LeaveType);
|
| | |
|
| | | @Query(value = "SELECT SUM(leave_duration) from attendance_leave where user_id = ?1 and approval_status IN ('approval_status_passed') and leave_type = ?2", nativeQuery = true)
|
| | |
| | | :disabled=" |
| | | crud.selections.length < 1 || |
| | | !crud.selections.every( |
| | | selection => selection.approvalStatus === dictGoOutAppRev |
| | | selection => selection.approvalStatus === dictBussinessAppRev |
| | | ) |
| | | " |
| | | style="margin-left: 4px !important;" |
| | |
| | | :disabled=" |
| | | crud.selections.length < 1 || |
| | | !crud.selections.every( |
| | | selection => selection.approvalStatus === dictGoOutAppRev |
| | | selection => selection.approvalStatus === dictBussinessAppRev |
| | | ) |
| | | " |
| | | style="margin-left: 4px !important;" |
| | |
| | | clearable |
| | | placeholder="请选择" |
| | | style="width: 340px;" |
| | | :disabled="form.approvalStatus == dictGoOutAgree || form.approvalStatus == dictGoOutReturn || form.wecomSpNo !== null" |
| | | :disabled="form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null" |
| | | > |
| | | <el-option |
| | | v-for="item in users" |
| | |
| | | clearable |
| | | placeholder="请选择" |
| | | style="width: 340px;" |
| | | :disabled="form.approvalStatus == dictGoOutAgree || form.approvalStatus == dictGoOutReturn || form.wecomSpNo !== null" |
| | | :disabled="form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null" |
| | | > |
| | | <el-option |
| | | v-for="item in approvalUsers" |
| | |
| | | } |
| | | }" |
| | | :default-time="$store.state.user.user.sysRostering.workStartTime + ':00'" |
| | | :disabled="form.approvalStatus == dictGoOutAgree || form.approvalStatus == dictGoOutReturn || form.wecomSpNo !== null" |
| | | :disabled="form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null" |
| | | @change="checkTime" |
| | | /> |
| | | </el-form-item> |
| | |
| | | } |
| | | }" |
| | | :default-time="$store.state.user.user.sysRostering.workEndTime + ':00'" |
| | | :disabled="form.approvalStatus == dictGoOutAgree || form.approvalStatus == dictGoOutReturn || form.wecomSpNo !== null" |
| | | :disabled="form.approvalStatus == dictBussinessAppAgree || form.approvalStatus == dictBussinessAppReturn || form.wecomSpNo !== null" |
| | | @change="checkTime" |
| | | /> |
| | | </el-form-item> |
| | |
| | | rows="3" |
| | | style="width: 340px;" |
| | | :disabled=" |
| | | form.approvalStatus == dictGoOutAgree || |
| | | form.approvalStatus == dictGoOutReturn || |
| | | form.approvalStatus == dictBussinessAppAgree || |
| | | form.approvalStatus == dictBussinessAppReturn || |
| | | form.wecomSpNo !== null |
| | | " |
| | | /> |
| | |
| | | v-model="form.departureCity" |
| | | style="width: 340px;" |
| | | :disabled=" |
| | | form.approvalStatus == dictGoOutAgree || |
| | | form.approvalStatus == dictGoOutReturn || |
| | | form.approvalStatus == dictBussinessAppAgree || |
| | | form.approvalStatus == dictBussinessAppReturn || |
| | | form.wecomSpNo !== null |
| | | " |
| | | /> |
| | |
| | | v-model="form.arrivalCity" |
| | | style="width: 340px;" |
| | | :disabled=" |
| | | form.approvalStatus == dictGoOutAgree || |
| | | form.approvalStatus == dictGoOutReturn || |
| | | form.approvalStatus == dictBussinessAppAgree || |
| | | form.approvalStatus == dictBussinessAppReturn || |
| | | form.wecomSpNo !== null |
| | | " |
| | | /> |
| | |
| | | placeholder="请选择" |
| | | style="width: 340px;" |
| | | :disabled=" |
| | | form.approvalStatus == dictGoOutAgree || |
| | | form.approvalStatus == dictGoOutReturn |
| | | form.approvalStatus == dictBussinessAppAgree || |
| | | form.approvalStatus == dictBussinessAppReturn |
| | | " |
| | | > |
| | | <el-option |
| | |
| | | placeholder="请选择" |
| | | style="width: 340px;" |
| | | :disabled=" |
| | | form.approvalStatus == dictGoOutAgree || |
| | | form.approvalStatus == dictGoOutReturn || |
| | | form.approvalStatus == dictBussinessAppAgree || |
| | | form.approvalStatus == dictBussinessAppReturn || |
| | | form.wecomSpNo !== null |
| | | " |
| | | > |
| | |
| | | rows="3" |
| | | style="width: 340px;" |
| | | :disabled=" |
| | | form.approvalStatus == dictGoOutAgree || |
| | | form.approvalStatus == dictGoOutReturn || |
| | | form.approvalStatus == dictBussinessAppAgree || |
| | | form.approvalStatus == dictBussinessAppReturn || |
| | | form.wecomSpNo !== null |
| | | " |
| | | /> |
| | |
| | | {{ form.travelReason }} |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="form.approvalStatus === dictGoOutReturn" |
| | | v-if="form.approvalStatus === dictBussinessAppReturn" |
| | | label="退回原因" |
| | | prop="approvalDescription" |
| | | > |
| | |
| | | @click="approveFunction(1, form)" |
| | | >审核退回</el-button> |
| | | <el-button |
| | | v-if="form.approvalStatus !== dictGoOutReturn" |
| | | v-if="form.approvalStatus !== dictBussinessAppReturn" |
| | | :loading="successLoading" |
| | | type="success" |
| | | @click="approveFunction(2, form)" |
| | |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tag |
| | | v-if="scope.row.approvalStatus === dictGoOutAppRev" |
| | | v-if="scope.row.approvalStatus === dictBussinessAppRev" |
| | | type="warning" |
| | | >{{ |
| | | dict.label[dictBussinessStatus][scope.row.approvalStatus] |
| | | }}</el-tag> |
| | | <el-tag |
| | | v-if="scope.row.approvalStatus === dictGoOutAgree" |
| | | v-if="scope.row.approvalStatus === dictBussinessAppAgree" |
| | | type="success" |
| | | >{{ |
| | | dict.label[dictBussinessStatus][scope.row.approvalStatus] |
| | | }}</el-tag> |
| | | <el-tag |
| | | v-if="scope.row.approvalStatus === dictGoOutReturn" |
| | | v-if="scope.row.approvalStatus === dictBussinessAppReturn" |
| | | type="danger" |
| | | >{{ |
| | | dict.label[dictBussinessStatus][scope.row.approvalStatus] |
| | |
| | | type="primary" |
| | | icon="el-icon-s-check" |
| | | :disabled=" |
| | | scope.row.approvalStatus === dictGoOutAppRev ? false : true |
| | | scope.row.approvalStatus === dictBussinessAppRev ? false : true |
| | | " |
| | | @click="toApprove(scope.row)" |
| | | >审核 |
| | |
| | | icon="el-icon-edit-outline" |
| | | size="mini" |
| | | :disabled=" |
| | | scope.row.approvalStatus === dictGoOutAppRev ? true : false |
| | | scope.row.approvalStatus === dictBussinessAppRev ? true : false |
| | | " |
| | | >撤销 |
| | | </el-button> |
| | |
| | | > |
| | | <template slot-scope="scope"> |
| | | <udOperation v-if="!scope.row.wecomSpNo" :data="scope.row" :permission="permission" /> |
| | | <el-button |
| | | v-if="scope.row.wecomSpNo && user.id === scope.row.userId && scope.row.approvalStatus === dictBussinessAppReturn" |
| | | size="mini" |
| | | type="primary" |
| | | icon="el-icon-refresh-right" |
| | | @click="reAdd(scope.row)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | // 项目列表 |
| | | projects: [], |
| | | dictBussinessStatus: constant.BUSSINESS_APPROVE_STATUS, |
| | | dictGoOutAppRev: constant.BUSSINESS_APPROVE_STATUS_REVIEWED, |
| | | dictGoOutAgree: constant.BUSSINESS_APPROVE_STATUS_AGREE, |
| | | dictGoOutReturn: constant.BUSSINESS_APPROVE_STATUS_REFUSE, |
| | | dictBussinessAppRev: constant.BUSSINESS_APPROVE_STATUS_REVIEWED, |
| | | dictBussinessAppAgree: constant.BUSSINESS_APPROVE_STATUS_AGREE, |
| | | dictBussinessAppReturn: constant.BUSSINESS_APPROVE_STATUS_REFUSE, |
| | | dictLeaveTimeTypeDay: constant.LEAVE_TIME_TYPE_DAY, |
| | | dictLeaveTimeType: constant.LEAVE_TIME_TYPE, |
| | | dictBusinessTravelCategory: constant.BUSINESS_TRAVEL_CATEGORY, |
| | |
| | | } |
| | | if ( |
| | | (data.approvalStatus !== null && |
| | | data.approvalStatus === this.dictGoOutAgree) || |
| | | data.approvalStatus === this.dictGoOutReturn |
| | | data.approvalStatus === this.dictBussinessAppAgree) || |
| | | data.approvalStatus === this.dictBussinessAppReturn |
| | | ) { |
| | | return true |
| | | } |
| | |
| | | } |
| | | // 判断通过状态 |
| | | if (Number === 2) { |
| | | this.form.approvalStatus = this.dictGoOutAgree |
| | | this.form.approvalStatus = this.dictBussinessAppAgree |
| | | } else { |
| | | // 退回改状态显示退回原因 |
| | | this.form.approvalStatus = this.dictGoOutReturn |
| | | this.form.approvalStatus = this.dictBussinessAppReturn |
| | | if (this.form.approvalDescription == null) { |
| | | return |
| | | } |
| | |
| | | // 撤消功能 |
| | | revoke(data) { |
| | | this.toApprove(data, '1') |
| | | this.form.approvalStatus = this.dictGoOutAppRev |
| | | this.form.approvalStatus = this.dictBussinessAppRev |
| | | this.successLoading = true |
| | | crudAttendanceBusinessTravel |
| | | .approve(this.form) |
| | |
| | | // 取消 |
| | | canel(data) { |
| | | this.$refs[`popover_${data.id}`].showPopper = false |
| | | }, |
| | | // 再新增(企微) |
| | | reAdd(data) { |
| | | const that = this |
| | | that.crud.toAdd() |
| | | that.$set(that.form, 'userId', data.userId) |
| | | that.$set(that.form, 'approvalUserId', data.approvalUserId) |
| | | that.$set(that.form, 'travelStartTime', data.travelStartTime) |
| | | that.$set(that.form, 'travelEndTime', data.travelEndTime) |
| | | that.$set(that.form, 'travelDuration', data.travelDuration) |
| | | that.$set(that.form, 'travelReason', data.travelReason) |
| | | that.$set(that.form, 'departureCity', data.departureCity) |
| | | that.$set(that.form, 'arrivalCity', data.arrivalCity) |
| | | that.$set(that.form, 'projectId', data.projectId) |
| | | that.$set(that.form, 'category', data.category) |
| | | that.$set(that.form, 'remarks', data.remarks) |
| | | } |
| | | } |
| | | } |
| | |
| | | > |
| | | <template slot-scope="scope"> |
| | | <udOperation v-if="!scope.row.wecomSpNo" :data="scope.row" :permission="permission" /> |
| | | <el-button |
| | | v-if="scope.row.wecomSpNo && user.id === scope.row.userId && scope.row.approvalStatus === dictGoOutReturn" |
| | | size="mini" |
| | | type="primary" |
| | | icon="el-icon-refresh-right" |
| | | @click="reAdd(scope.row)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | // 取消 |
| | | canel(data) { |
| | | this.$refs[`popover_${data.id}`].showPopper = false |
| | | }, |
| | | // 再新增(企微) |
| | | reAdd(data) { |
| | | const that = this |
| | | that.crud.toAdd() |
| | | that.$set(that.form, 'userId', data.userId) |
| | | that.$set(that.form, 'approvalUserId', data.approvalUserId) |
| | | that.$set(that.form, 'outOfOfficeType', data.outOfOfficeType) |
| | | that.$set(that.form, 'outStartTime', data.outStartTime) |
| | | that.$set(that.form, 'outEndTime', data.outEndTime) |
| | | that.$set(that.form, 'outDuration', data.outDuration) |
| | | that.$set(that.form, 'outReason', data.outReason) |
| | | that.$set(that.form, 'remarks', data.remarks) |
| | | } |
| | | } |
| | | } |
| | |
| | | :data="scope.row" |
| | | :permission="permission" |
| | | /> |
| | | <el-button |
| | | v-if="scope.row.wecomSpNo && user.id === scope.row.userId && scope.row.approvalStatus === dictAppRovalStatusReturn" |
| | | size="mini" |
| | | type="primary" |
| | | icon="el-icon-refresh-right" |
| | | @click="reAdd(scope.row)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | // 取消 |
| | | canel(data) { |
| | | this.$refs[`popover_${data.id}`].showPopper = false |
| | | }, |
| | | // 再新增(企微) |
| | | reAdd(data) { |
| | | const that = this |
| | | that.crud.toAdd() |
| | | that.$set(that.form, 'userId', data.userId) |
| | | that.$set(that.form, 'approvalUserId', data.approvalUserId) |
| | | that.$set(that.form, 'leaveType', data.leaveType) |
| | | that.$set(that.form, 'leaveStartTime', data.leaveStartTime) |
| | | that.$set(that.form, 'leaveEndTime', data.leaveEndTime) |
| | | that.$set(that.form, 'leaveDuration', data.leaveDuration) |
| | | that.$set(that.form, 'leaveReason', data.leaveReason) |
| | | that.$set(that.form, 'remarks', data.remarks) |
| | | // 固定操作 |
| | | that.checkLeaveTime() |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div class="iframe-container"> |
| | | <iframe :src="iframeSrc" class="iframe-content"></iframe> |
| | | <iframe :src="iframeSrc" class="iframe-content" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | data() { |
| | | return { |
| | | // iframeSrc: 'https://www.baidu.com/index.htm' |
| | | iframeSrc: 'http://114.116.101.63:30800/' |
| | | }; |
| | | // iframeSrc: 'http://114.116.101.63:30800/' |
| | | iframeSrc: 'https://www.yhzhg.cn/' |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .iframe-container { |
| | |
| | | <el-table-column v-if="checkPer(['admin','projectReimburse:edit','projectReimburse:del'])" label="操作" width="150px" align="center" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <udOperation |
| | | v-if="!scope.row.wecomSpNo" |
| | | :data="scope.row" |
| | | :permission="permission" |
| | | /> |
| | | <el-button |
| | | v-if="scope.row.wecomSpNo && user.id === scope.row.userId && scope.row.approvalStatus === dictReimburseApproveStatusRefuse" |
| | | size="mini" |
| | | type="primary" |
| | | icon="el-icon-refresh-right" |
| | | @click="reAdd(scope.row)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!--分页组件--> |
| | | <pagination /> |
| | | |
| | | <cp-approval-del-dialog ref="cpApprovalDelDialog" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import udOperation from '@crud/UD.operation' |
| | | import pagination from '@crud/Pagination' |
| | | import approvalLine from '@/components/ApprovalLine' |
| | | import cpApprovalDelDialog from '@/components/CpApprovalDelDialog' |
| | | import fileUpload from '@/views/assembly/fileUpload' |
| | | import { mapGetters } from 'vuex' |
| | | import constant from '@/utils/constant' |
| | |
| | | const defaultForm = { id: null, userId: null, approvalUserId: null, projectId: null, reimburseType: null, reimburseReason: null, expenseType: null, startTime: null, endTime: null, expenseAmount: null, expenseComment: null, originFileName: null, filePath: null, approvalStatus: null, approvalDescription: null, createTime: null, createBy: null, updateTime: null, updateBy: null, wecomSpNo: null, event: null, userName: null, appUserName: null, projectName: null, reimburseTypes: null, expenseTypes: null } |
| | | export default { |
| | | name: 'ProjectReimburse', |
| | | components: { pagination, crudOperation, rrOperation, udOperation, approvalLine, fileUpload }, |
| | | components: { pagination, crudOperation, rrOperation, udOperation, approvalLine, fileUpload, cpApprovalDelDialog }, |
| | | mixins: [presenter(), header(), form(defaultForm), crud()], |
| | | dicts: [constant.REIMBURSE_APPROVE_STATUS, constant.REIMBURSE_TYPE, constant.REIMBURSE_EXPENSE_TYPE, constant.APPROVAL_SITE_TYPE], |
| | | cruds() { |
| | |
| | | const that = this |
| | | that.$set(that.form, 'reimburseTypes', undefined) |
| | | that.$set(that.form, 'expenseTypes', undefined) |
| | | return true |
| | | }, |
| | | // 钩子:删除 - 之前 |
| | | [CRUD.HOOK.beforeDelete]() { |
| | | const that = this |
| | | if (that.crud.selections.some(selection => selection.wecomSpNo !== null && selection.wecomSpNo !== undefined && selection.wecomSpNo !== '')) { |
| | | that.$refs.cpApprovalDelDialog.handleOpen() |
| | | that.crud.delAllLoading = false |
| | | return false |
| | | } |
| | | return true |
| | | }, |
| | | |
| | |
| | | return |
| | | } |
| | | } |
| | | }, |
| | | // 再新增(企微) |
| | | reAdd(data) { |
| | | const that = this |
| | | that.crud.toAdd() |
| | | that.$set(that.form, 'userId', data.userId) |
| | | that.$set(that.form, 'approvalUserId', data.approvalUserId) |
| | | that.$set(that.form, 'projectId', data.projectId) |
| | | that.$set(that.form, 'reimburseTypes', data.reimburseType.split(',')) |
| | | that.$set(that.form, 'reimburseReason', data.reimburseReason) |
| | | that.$set(that.form, 'expenseTypes', data.expenseType.split(',')) |
| | | that.$set(that.form, 'startTime', data.startTime) |
| | | that.$set(that.form, 'endTime', data.endTime) |
| | | that.$set(that.form, 'expenseAmount', data.expenseAmount) |
| | | that.$set(that.form, 'expenseComment', data.expenseComment) |
| | | that.$set(that.form, 'filePath', data.filePath) |
| | | } |
| | | } |
| | | } |