|
@@ -293,7 +293,7 @@ import autoUpdateMixins from "@/mixins/autoUpdate";
|
|
|
import { ghsList } from "@/api/purchase";
|
|
import { ghsList } from "@/api/purchase";
|
|
|
import { changeDelStatus } from "@/api/ghs";
|
|
import { changeDelStatus } from "@/api/ghs";
|
|
|
import {currentShop} from "@/api/shop";
|
|
import {currentShop} from "@/api/shop";
|
|
|
-import { clearLogin,hasNotice,delStaff } from "@/api/admin";
|
|
|
|
|
|
|
+import { clearLogin,hasNotice } from "@/api/admin";
|
|
|
export default {
|
|
export default {
|
|
|
name: "workbench",
|
|
name: "workbench",
|
|
|
components: { NotLogin },
|
|
components: { NotLogin },
|
|
@@ -454,10 +454,8 @@ export default {
|
|
|
// 店主显示改进建议
|
|
// 店主显示改进建议
|
|
|
that.suggest()
|
|
that.suggest()
|
|
|
}else{
|
|
}else{
|
|
|
- // 员工显示离职确认
|
|
|
|
|
- that.$util.confirmModal({content:'确认离职?'}, () => {
|
|
|
|
|
- that.handleStaffResignation()
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ // 员工显示离职
|
|
|
|
|
+ that.$util.pageTo({url: '/admin/staff/dimission'})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if(res.tapIndex == 2){
|
|
if(res.tapIndex == 2){
|
|
@@ -695,38 +693,6 @@ export default {
|
|
|
success (res) {
|
|
success (res) {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- },
|
|
|
|
|
- handleStaffResignation() {
|
|
|
|
|
- let that = this
|
|
|
|
|
- // 显示加载提示
|
|
|
|
|
- uni.showLoading({ title: '处理中...' })
|
|
|
|
|
-
|
|
|
|
|
- delStaff({adminId: that.loginInfo.admin.id, staffId: that.loginInfo.shopAdminId }).then(res => {
|
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- that.$msg('离职成功')
|
|
|
|
|
- // 清理本地数据
|
|
|
|
|
- uni.clearStorage()
|
|
|
|
|
- that.$store.commit("setLoginInfo", {})
|
|
|
|
|
-
|
|
|
|
|
- // 根据不同平台处理重启
|
|
|
|
|
- // #ifdef APP-PLUS
|
|
|
|
|
- plus.runtime.restart()
|
|
|
|
|
- // #endif
|
|
|
|
|
- // #ifdef MP-WEIXIN
|
|
|
|
|
- uni.reLaunch({url:'/admin/home/workbench'})
|
|
|
|
|
- // #endif
|
|
|
|
|
- // #ifdef H5
|
|
|
|
|
- window.location.reload()
|
|
|
|
|
- // #endif
|
|
|
|
|
- } else {
|
|
|
|
|
- that.$msg(res.msg || '离职失败,请重试')
|
|
|
|
|
- }
|
|
|
|
|
- }).catch(err => {
|
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
- console.error('离职API调用失败:', err)
|
|
|
|
|
- that.$msg('网络错误,请重试')
|
|
|
|
|
- })
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|