|
@@ -1,12 +1,12 @@
|
1
|
1
|
import React, { useState, useEffect } from 'react';
|
2
|
|
-import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal,Breadcrumb } from 'antd';
|
3
|
|
-import { FormattedMessage } from 'umi-plugin-react/locale';
|
4
|
|
-import styles from '../style/GoodsList.less';
|
|
2
|
+import { Form, Input, Button, Icon, Select, message, Table, Pagination, Modal } from 'antd';
|
5
|
3
|
import router from 'umi/router';
|
|
4
|
+import AuthButton from '@/components/AuthButton';
|
|
5
|
+import withActions from '@/components/ActionList';
|
6
|
6
|
import BuildSelect from '../../components/SelectButton/BuildSelect'
|
7
|
7
|
import apis from '../../services/apis';
|
8
|
8
|
import request from '../../utils/request'
|
9
|
|
-import AuthButton from '@/components/AuthButton';
|
|
9
|
+import styles from '../style/GoodsList.less';
|
10
|
10
|
|
11
|
11
|
const { Option } = Select;
|
12
|
12
|
|
|
@@ -134,21 +134,19 @@ function header(props) {
|
134
|
134
|
dataIndex: 'handle',
|
135
|
135
|
key: 'handle',
|
136
|
136
|
align: 'center',
|
137
|
|
- render: (x, row) => (
|
138
|
|
- <>
|
|
137
|
+ render: withActions((x, row) => [
|
139
|
138
|
<AuthButton name="admin.taGoods.change.put" noRight={null}>
|
140
|
|
- <span style={{ color: '#EF273A', marginRight: '20px',cursor: 'pointer' }} onClick={changeGoodsStatus(row)}>
|
141
|
|
- {row.status == 1 ? '下架' : '上架'}
|
142
|
|
- {<Icon type="shopping-cart" className={styles.shoppingCart} />}
|
|
139
|
+ <span style={{ color: '#EF273A', marginRight: '20px', cursor: 'pointer' }} onClick={changeGoodsStatus(row)}>
|
|
140
|
+ {row.status === 1 ? '下架' : '上架'}
|
|
141
|
+ <Icon type="shopping-cart" className={styles.shoppingCart} />
|
143
|
142
|
</span>
|
144
|
|
- </AuthButton>
|
|
143
|
+ </AuthButton>,
|
145
|
144
|
<AuthButton name="admin.taGoods.put" noRight={null}>
|
146
|
|
- <span style={{ color: '#FF925C',cursor: 'pointer' }} onClick={toEditGoods(row.goodsId)}>
|
|
145
|
+ <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={toEditGoods(row.goodsId)}>
|
147
|
146
|
编辑<Icon type="form" className={styles.edit} />
|
148
|
147
|
</span>
|
149
|
|
- </AuthButton>
|
150
|
|
- </>
|
151
|
|
- ),
|
|
148
|
+ </AuthButton>,
|
|
149
|
+ ]),
|
152
|
150
|
},
|
153
|
151
|
];
|
154
|
152
|
|