|
@@ -12,6 +12,7 @@ import { Codes, itemStatuses, productType } from '../../../utils/config';
|
|
|
tagDetail: state.tagDetail,
|
|
|
group: state.group,
|
|
|
tagType: state.tagType,
|
|
|
+ merchant: state.merchant,
|
|
|
}))
|
|
|
export default class TagDetail extends PureComponent {
|
|
|
componentDidMount() {
|
|
@@ -30,6 +31,13 @@ export default class TagDetail extends PureComponent {
|
|
|
pageSize: 1000,
|
|
|
},
|
|
|
});
|
|
|
+ dispatch({
|
|
|
+ type: 'merchant/query',
|
|
|
+ payload: {
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 1000,
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
handleModalShow = () => {
|
|
@@ -110,10 +118,10 @@ export default class TagDetail extends PureComponent {
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
- const { dispatch, form, tagDetail, group, tagType } = this.props;
|
|
|
+ const { dispatch, form, tagDetail, group, tagType, merchant } = this.props;
|
|
|
const { itemLoading, currentItem, filters, modalVisible } = tagDetail;
|
|
|
const { getFieldDecorator } = form;
|
|
|
- const { productList, name, code, type, groupId, typeCode } = currentItem;
|
|
|
+ const { productList, name, code, type, groupId, typeCode, merchantId } = currentItem;
|
|
|
|
|
|
const itemTableColumns = [{
|
|
|
title: '位置',
|
|
@@ -197,6 +205,22 @@ export default class TagDetail extends PureComponent {
|
|
|
</Select>
|
|
|
)}
|
|
|
</Form.Item>
|
|
|
+ <Form.Item label="所属渠道" hasFeedback {...formItemLayout}>
|
|
|
+ {getFieldDecorator('merchantId', {
|
|
|
+ rules: [{ required: true, type: 'string', message: "渠道为必选项!" }],
|
|
|
+ initialValue: merchantId,
|
|
|
+ })(
|
|
|
+ <Select
|
|
|
+ showSearch
|
|
|
+ allowClear
|
|
|
+ placeholder="请输入渠道编号或者名称进行筛选"
|
|
|
+ optionFilterProp="children"
|
|
|
+ filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
|
|
|
+ >
|
|
|
+ {merchant.list.map(item => <Select.Option value={item.id} key={item.id}>{`${item.name}/${item.code}`}</Select.Option>)}
|
|
|
+ </Select>
|
|
|
+ )}
|
|
|
+ </Form.Item>
|
|
|
<Form.Item label="商品排序" {...formItemLayout}>
|
|
|
<Button onClick={this.handleModalShow} disabled={!(productList || []).length} type="primary" size="small" icon="edit">排序</Button>
|
|
|
</Form.Item>
|