|
@@ -7,8 +7,6 @@ import { renderStatus, statusToBool, boolToStatus } from '../../../utils/utils';
|
|
|
import AXDragSortTable from '../../../components/AXDragSortTable';
|
|
|
import Selector from '../../../components/AXTableSelector/Selector';
|
|
|
import FooterToolbar from '../../../components/FooterToolbar';
|
|
|
-import styles from './TagGroupCreate.less';
|
|
|
-
|
|
|
|
|
|
const formItemLayout = {
|
|
|
labelCol: {
|
|
@@ -55,13 +53,13 @@ export default class TagCreatePage extends Component {
|
|
|
return match[1];
|
|
|
}
|
|
|
return false;
|
|
|
- }
|
|
|
+ };
|
|
|
cleanPageState=() => {
|
|
|
this.props.dispatch({
|
|
|
type: 'tagGroup/cleanItemState',
|
|
|
payload: {},
|
|
|
});
|
|
|
- }
|
|
|
+ };
|
|
|
selectorDataFetcher=(name, params) => {
|
|
|
switch (name) {
|
|
|
case 'Merchant':
|
|
@@ -79,21 +77,21 @@ export default class TagCreatePage extends Component {
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
- }
|
|
|
+ };
|
|
|
handleMerchantSelectorModalShow = () => {
|
|
|
this.setState({
|
|
|
merchantSelectorDestroy: false,
|
|
|
});
|
|
|
this.selectorDataFetcher('Merchant');
|
|
|
- }
|
|
|
+ };
|
|
|
handleMerchantSelectorChange = (params) => {
|
|
|
this.selectorDataFetcher('Merchant', params);
|
|
|
- }
|
|
|
+ };
|
|
|
handleMerchantSelectorCancel = () => {
|
|
|
this.setState({
|
|
|
merchantSelectorDestroy: true,
|
|
|
});
|
|
|
- }
|
|
|
+ };
|
|
|
handleMerchantSelectorFinish = (rows) => {
|
|
|
this.setState({
|
|
|
merchantSelectorDestroy: true,
|
|
@@ -109,19 +107,19 @@ export default class TagCreatePage extends Component {
|
|
|
merchantName: name,
|
|
|
},
|
|
|
});
|
|
|
- }
|
|
|
+ };
|
|
|
handleDragSortTableChange = (rows) => {
|
|
|
this.props.dispatch({
|
|
|
type: 'tagGroup/fixCurrentItem',
|
|
|
payload: { tagList: rows },
|
|
|
});
|
|
|
- }
|
|
|
+ };
|
|
|
handlePageBack = () => {
|
|
|
this.props.dispatch(routerRedux.push({
|
|
|
pathname: '/frontend/tagGroup',
|
|
|
state: this.props.location.state,
|
|
|
}));
|
|
|
- }
|
|
|
+ };
|
|
|
handlePageSubmit = (e) => {
|
|
|
e.preventDefault();
|
|
|
this.props.form.validateFieldsAndScroll((err, values) => {
|
|
@@ -159,7 +157,7 @@ export default class TagCreatePage extends Component {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
+ };
|
|
|
|
|
|
render() {
|
|
|
const { form, submitting, mLoading, merchant, tagGroup } = this.props;
|
|
@@ -239,7 +237,7 @@ export default class TagCreatePage extends Component {
|
|
|
{
|
|
|
required: true, message: '请填写标签组编号',
|
|
|
}, {
|
|
|
- pattern: /^[a-zA-Z0-9|_|-]+$/g, message: '编号包含非法字符',
|
|
|
+ pattern: /^[a-zA-Z0-9_-]+$/g, message: '编号包含非法字符',
|
|
|
},
|
|
|
],
|
|
|
initialValue: code,
|
|
@@ -280,15 +278,15 @@ export default class TagCreatePage extends Component {
|
|
|
{!merchantSelectorDestroy && getMerchantModal()}
|
|
|
</Card>
|
|
|
{/* 标签排序Card */}
|
|
|
- {this.isEdit() &&
|
|
|
- <Card title="标签列表" style={{marginBottom: 70}}>
|
|
|
+ {this.isEdit() && (
|
|
|
+ <Card title="标签列表" style={{ marginBottom: 70 }}>
|
|
|
<AXDragSortTable
|
|
|
data={tagList}
|
|
|
columns={tagColumns}
|
|
|
onChange={this.handleDragSortTableChange}
|
|
|
/>
|
|
|
</Card>
|
|
|
- }
|
|
|
+ )}
|
|
|
<FooterToolbar style={{ width: '100%' }}>
|
|
|
<Button
|
|
|
onClick={this.handlePageBack}
|