|
|
@@ -0,0 +1,103 @@
|
|
|
+<template>
|
|
|
+ <div class="app-content">
|
|
|
+ <div>
|
|
|
+ <form>
|
|
|
+ <div class="module-com input-line-wrap" style="padding:20upx 26upx 0upx 26upx;font-size:32upx;">
|
|
|
+ 您正在申请离职,如你之前有注册过门店,离职后将会回到你自己的门店。如没有注册过,离职后将退出登录状态。
|
|
|
+ </div>
|
|
|
+ <div class="confirm-btn">
|
|
|
+ <button class="admin-button-com big blue" @click="confirmDim()">确认离职</button>
|
|
|
+ <button class="admin-button-com big default" style="margin-top:30upx;" @click="changeCg(1)">返回</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+import { delStaff } from "@/api/admin";
|
|
|
+export default {
|
|
|
+ name: "dimission",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo",myShopInfo:"getMyShopInfo" })
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init(){
|
|
|
+ },
|
|
|
+ confirmDim(){
|
|
|
+ this.$util.confirmModal({content:'确认离职?'},() => {
|
|
|
+ this.handleStaffResignation()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleStaffResignation() {
|
|
|
+ let that = this
|
|
|
+ // 显示加载提示
|
|
|
+ uni.showLoading({ title: '处理中...' })
|
|
|
+
|
|
|
+ delStaff().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('网络错误,请重试')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.app-content {
|
|
|
+ min-height: calc(100vh - 20upx);
|
|
|
+ padding-top: 20upx;
|
|
|
+}
|
|
|
+.prompt-text {
|
|
|
+ color: $fontColor3;
|
|
|
+ padding-left: 30upx;
|
|
|
+ margin-bottom: 30upx;
|
|
|
+}
|
|
|
+.module-com {
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ .member-wrap {
|
|
|
+ .member-det {
|
|
|
+ font-size: 24upx;
|
|
|
+ margin-left: 20upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .remark-wrap {
|
|
|
+ align-items: flex-start;
|
|
|
+ .remark {
|
|
|
+ height: 240upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.confirm-btn {
|
|
|
+ width: calc(100% - 60upx);
|
|
|
+ margin: 60upx 30upx 20upx;
|
|
|
+ .admin-button-com {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|