weiximei 5 years ago
parent
commit
fe60fedcaa
1 changed files with 34 additions and 6 deletions
  1. 34
    6
      src/pages/staff/list/StaffList.jsx

+ 34
- 6
src/pages/staff/list/StaffList.jsx View File

62
     }
62
     }
63
 
63
 
64
   }
64
   }
65
+
66
+  // 员工离职
67
+  const departure = row => {
68
+    console.log('row:', row)
69
+
70
+    // 是置业顾问
71
+    if (row.isConsultant === true) {
72
+
73
+      return
74
+    }
75
+
76
+    // 不是置业顾问
77
+    Modal.confirm({
78
+      title: '停用后无法登录后台系统',
79
+      content: '确认进行离职操作?',
80
+      okText: '确认',
81
+      cancelText: '取消',
82
+      onOk () {
83
+        // request({ ...apis.staff.change, urlData: { id: data.userId, type: 'off' } }).then((data) => {
84
+        //   message.info("操作成功")
85
+        //   props.onFresh()
86
+        // })
87
+      }
88
+    });
89
+
90
+  }
91
+
65
   return (
92
   return (
66
 
93
 
67
     <Card className={Styles.card}>
94
     <Card className={Styles.card}>
71
           编辑
98
           编辑
72
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '0.04rem' }} />
99
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '0.04rem' }} />
73
         </Button>
100
         </Button>
74
-        <Button type="link" style={{ fontSize: ' 0.106rem', color: '#cacaca', position: 'absolute', top: '40px', right: '0' }} onClick={confirm(data)}>
101
+        <Button type="link" style={{ fontSize: ' 0.106rem', color: '#cacaca', position: 'absolute', top: '40px', right: '0' }} onClick={() => departure(data)}>
102
+          离职
103
+                <Icon type="exclamation-circle" style={{ color: '#C0C4CC', marginLeft: '0.04rem' }} />
104
+        </Button>
105
+        {/* <Button type="link" style={{ fontSize: ' 0.106rem', color: '#cacaca', position: 'absolute', top: '40px', right: '0' }} onClick={confirm(data)}>
75
           {data.status === 1 ? '停用' : '启用'}
106
           {data.status === 1 ? '停用' : '启用'}
76
           <Icon type={data.status === 1 ? 'close-circle' : 'form'} style={{ color: '#C0C4CC', marginLeft: '0.04rem' }} />
107
           <Icon type={data.status === 1 ? 'close-circle' : 'form'} style={{ color: '#C0C4CC', marginLeft: '0.04rem' }} />
77
-        </Button>
78
-        {/* <Button type="link" style={{ fontSize: ' 0.106rem', color: '#FF925C', position: 'absolute', top: '50px', right: '0' }} onClick={confirm}>
79
-          启用
80
-                <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
81
         </Button> */}
108
         </Button> */}
82
 
109
 
83
       </div>
110
       </div>
93
 
120
 
94
         <p className={Styles.cardText} >姓名 : {data.userName}
121
         <p className={Styles.cardText} >姓名 : {data.userName}
95
         </p>
122
         </p>
96
-        <p className={Styles.statusText} > 状态 : {data.status === 1 ? '启用' : '停用'} </p>
123
+        {/* <p className={Styles.statusText} > 状态 : {data.status === 1 ? '启用' : '停用'} </p> */}
124
+        <p className={Styles.statusText} > 绑定状态 : {data.miniStatus === 1 ? '已绑定' : '未绑定'} </p>
97
         <p className={Styles.phoneText} >
125
         <p className={Styles.phoneText} >
98
           电话 : {data.phone}
126
           电话 : {data.phone}
99
         </p>
127
         </p>