weiximei 5 yıl önce
ebeveyn
işleme
fe60fedcaa
1 değiştirilmiş dosya ile 34 ekleme ve 6 silme
  1. 34
    6
      src/pages/staff/list/StaffList.jsx

+ 34
- 6
src/pages/staff/list/StaffList.jsx Dosyayı Görüntüle

@@ -62,6 +62,33 @@ const CartBody = (props) => {
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 92
   return (
66 93
 
67 94
     <Card className={Styles.card}>
@@ -71,13 +98,13 @@ const CartBody = (props) => {
71 98
           编辑
72 99
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '0.04rem' }} />
73 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 106
           {data.status === 1 ? '停用' : '启用'}
76 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 108
         </Button> */}
82 109
 
83 110
       </div>
@@ -93,7 +120,8 @@ const CartBody = (props) => {
93 120
 
94 121
         <p className={Styles.cardText} >姓名 : {data.userName}
95 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 125
         <p className={Styles.phoneText} >
98 126
           电话 : {data.phone}
99 127
         </p>