chenhaozhe
2026-04-10 d019cea0c8e74fcb28d4834ae9fe0e95085b4a46
pages/EmployeeRecords/EmployeeRecordsBill.vue
@@ -327,6 +327,7 @@
         this.getHGroupList()
         this.getHShiftsList()
         this.getHProcList()
            this.getHShiftCurrent()
         //先获取角色列表,然后获取用户绑定的角色
         this.getRoleList().then(() => {
            this.getUserBoundRoles();
@@ -719,6 +720,41 @@
               }
            }
         },
            async getHShiftCurrent() {
                // 根据当前用户绑定的工作中心和部门获取到班次信息(没有则不获取)
                let HDeptID = getUserInfo()["HDeptID"]
                let HCenterID = getUserInfo()["HWorkCenterID"]
                console.log(HDeptID, HCenterID)
                if(!HDeptID || !HCenterID) {
                    return
                }
                try{
                   let res = await CommonUtils.doRequest2Async({
                       url: "/Gy_ShiftsController/Get_HWorkShift",
                       data: {
                           HDeptID,
                           HCenterID
                       }
                   })
                    let {count, data,Message} = res.data
                    if(count == 1) {
                        this.hform.HShiftsID = data[0]["HInterID"]
                        this.hform.HShiftsName = data[0]["班次"]
                    }else {
                        CommonUtils.showTips({
                            title: "温馨提示",
                            message: `获取班次信息失败: ${Message}`
                        })
                    }
                }catch(err) {
                    CommonUtils.showTips({
                        title: "温馨提示",
                        message: `获取班次信息失败: ${err.message}`
                    })
                }
            },
         // 获取用户已绑定的角色
         async getUserBoundRoles() {
            try {