Commit e0f074c6 authored by superman's avatar superman

1.4.1

parent 0e4e7c3d
webpackJsonp([35],[function(e,n,t){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}var c=t(12),o=(u(c),t(6)),r=(u(o),t(47)),s=(u(r),t(36)),a=(u(s),t(50)),f=(u(a),t(128)),i=(u(f),t(95)),d=(u(i),t(171)),l=(u(d),t(53)),p=(u(l),t(88)),_=(u(p),t(147)),b=(u(_),t(107)),k=(u(b),t(109)),v=(u(k),t(129)),w=(u(v),t(119));u(w)}]); webpackJsonp([34],[function(e,n,t){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}var c=t(11),o=(u(c),t(6)),r=(u(o),t(47)),s=(u(r),t(46)),a=(u(s),t(50)),f=(u(a),t(121)),i=(u(f),t(100)),d=(u(i),t(189)),l=(u(d),t(61)),p=(u(l),t(85)),_=(u(p),t(162)),b=(u(_),t(109)),k=(u(b),t(124)),v=(u(k),t(133)),w=(u(v),t(120));u(w)}]);
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -160,14 +160,14 @@ export function DetailOperations(command, id, isEdit, dispatch) { ...@@ -160,14 +160,14 @@ export function DetailOperations(command, id, isEdit, dispatch) {
key: 'edit', key: 'edit',
onClick: (e)=> { onClick: (e)=> {
e.preventDefault(); e.preventDefault();
dispatch({type: 'UPDATE_' + command}); dispatch({type: 'EDIT_' + command + '_START'});
} }
}); });
isEdit && buttons.push({ isEdit && buttons.push({
key: 'cancel', key: 'cancel',
onClick: (e)=> { onClick: (e)=> {
e.preventDefault(); e.preventDefault();
dispatch({type: 'CANCEL_UPDATE_' + command}); dispatch({type: 'EDIT_' + command + '_CANCEL'});
} }
}); });
} }
......
...@@ -40,7 +40,8 @@ export default class BaseInfoForm extends Component { ...@@ -40,7 +40,8 @@ export default class BaseInfoForm extends Component {
cates: PropTypes.array, cates: PropTypes.array,
product: PropTypes.object, product: PropTypes.object,
user: PropTypes.object, user: PropTypes.object,
dispatch: PropTypes.func dispatch: PropTypes.func,
isCreate: PropTypes.bool,
}; };
constructor(props, context) { constructor(props, context) {
...@@ -76,7 +77,8 @@ export default class BaseInfoForm extends Component { ...@@ -76,7 +77,8 @@ export default class BaseInfoForm extends Component {
handleSubmit(e) { handleSubmit(e) {
e.preventDefault(); e.preventDefault();
const data = this.props.form.getFieldsValue(); const {isCreate, form, product, dispatch} = this.props;
const data = form.getFieldsValue();
if (Array.isArray(data.categoryId) && data.categoryId.length === 2) { if (Array.isArray(data.categoryId) && data.categoryId.length === 2) {
data.categoryParentId = data.categoryId[0]; data.categoryParentId = data.categoryId[0];
...@@ -89,13 +91,13 @@ export default class BaseInfoForm extends Component { ...@@ -89,13 +91,13 @@ export default class BaseInfoForm extends Component {
data['itemPic'] = this.state.fileList[0].url; data['itemPic'] = this.state.fileList[0].url;
} }
data.id = this.props.product.id; data.id = product.id;
console.log('收到表单值:', data); console.log('收到表单值:', data);
this.props.dispatch({ dispatch({
type: 'UPDATE_PRODUCT_ITEM', type: isCreate ? 'UPDATE_PRODUCT' : 'EDIT_PRODUCT_SUBMIT',
item: data data
}); });
}; };
......
This diff is collapsed.
This diff is collapsed.
import React, {Component, PropTypes} from 'react';
import {
Row,
Col,
Form,
Input,
Button,
Checkbox,
Select,
message,
Tabs,
Cascader,
Radio,
Upload,
Icon,
Modal,
DatePicker,
Table,
Spin
} from 'antd';
export default class PublishForm extends Component {
constructor(props, content) {
super(props, content);
}
handlePublish(e) {
e.preventDefault();
const data = {
id: this.props.product.id,
status: 1
};
this.props.dispatch({
type: 'UPDATE_PRODUCT',
data
});
}
render() {
return (
<div style={{textAlign:'center'}}>
<h1>请确认产品各项信息已经填写完整!</h1>
<Button type="primary" loading={this.props.loading} onClick={this.handlePublish.bind(this)}>
<Icon type="solution"/>创建
</Button>
</div>
);
}
}
...@@ -5,3 +5,4 @@ export ElementForm from './ElementForm'; ...@@ -5,3 +5,4 @@ export ElementForm from './ElementForm';
export DateTimeStatusForm from './DateTimeStatusForm'; export DateTimeStatusForm from './DateTimeStatusForm';
export DocumentsForm from './DocumentsForm'; export DocumentsForm from './DocumentsForm';
export ContactForm from './ContactForm'; export ContactForm from './ContactForm';
export PublishForm from './PublishForm';
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -54,7 +54,7 @@ const columns = [ ...@@ -54,7 +54,7 @@ const columns = [
]; ];
@connect(state=>({ @connect(state=>({
items: state.authInfo.audits, items: state.authInfo.items,
loading: state.authInfo.loading, loading: state.authInfo.loading,
total: state.authInfo.total, total: state.authInfo.total,
})) }))
...@@ -71,10 +71,10 @@ export default class List extends Component { ...@@ -71,10 +71,10 @@ export default class List extends Component {
this.fetchList(this.props.location.query); this.fetchList(this.props.location.query);
}; };
fetchList(query) { fetchList(data) {
this.props.dispatch({ this.props.dispatch({
type: 'FETCH_AUTHINFO_LIST', type: 'FETCH_AUTHINFO_LIST',
query data
}); });
} }
......
This diff is collapsed.
...@@ -42,10 +42,10 @@ export default class List extends Component { ...@@ -42,10 +42,10 @@ export default class List extends Component {
this.fetchList(this.props.location.query); this.fetchList(this.props.location.query);
}; };
fetchList(query) { fetchList(data) {
this.props.dispatch({ this.props.dispatch({
type: 'FETCH_AUTHORITY_LIST', type: 'FETCH_AUTHORITY_LIST',
query data
}); });
}; };
...@@ -95,8 +95,8 @@ export default class List extends Component { ...@@ -95,8 +95,8 @@ export default class List extends Component {
const handleRemove = (id)=> { const handleRemove = (id)=> {
dispatch({ dispatch({
type: 'DELETE_AUTHORITY_ITEM', type: 'DELETE_AUTHORITY',
id data:{id}
}); });
}; };
......
This diff is collapsed.
This diff is collapsed.
...@@ -72,14 +72,16 @@ export default class AddItem extends Component { ...@@ -72,14 +72,16 @@ export default class AddItem extends Component {
console.log(data); console.log(data);
this.props.dispatch({ this.props.dispatch({
type: 'CREATE_MESSAGE_ITEM', type: 'CREATE_MESSAGE',
item: data data
}); });
} }
render = ()=> { render = ()=> {
const {loading, form:{getFieldProps}, location:{query}, dispatch} = this.props; const {loading, form:{getFieldProps}, location:{query}, dispatch} = this.props;
const operation = ( const operation = (
<HeaderOperation history={this.props.history} buttons={[{key: 'rollback'}]}/> <HeaderOperation history={this.props.history} buttons={[{key: 'rollback'}]}/>
); );
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -114,10 +114,10 @@ export default class List extends Component { ...@@ -114,10 +114,10 @@ export default class List extends Component {
} }
}; };
fetchList(query) { fetchList(data) {
this.props.dispatch({ this.props.dispatch({
type: 'FETCH_PRODUCT_LIST', type: 'FETCH_PRODUCT_LIST',
query data
}); });
}; };
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -44,10 +44,10 @@ export default class List extends Component { ...@@ -44,10 +44,10 @@ export default class List extends Component {
this.fetchList(this.props.location.query); this.fetchList(this.props.location.query);
}; };
fetchList(query) { fetchList(data) {
this.props.dispatch({ this.props.dispatch({
type: 'FETCH_RESOURCE_LIST', type: 'FETCH_RESOURCE_LIST',
query data
}); });
}; };
......
...@@ -108,9 +108,8 @@ export default class AddItem extends Component { ...@@ -108,9 +108,8 @@ export default class AddItem extends Component {
console.log(data); console.log(data);
this.props.dispatch({ this.props.dispatch({
type: 'CREATE_TRADE_ITEM', type: 'CREATE_TRADE',
item: data, data,
push: this.props.history.push,
}); });
} }
......
...@@ -46,16 +46,16 @@ export default class Commission extends Component { ...@@ -46,16 +46,16 @@ export default class Commission extends Component {
componentDidMount() { componentDidMount() {
const {dispatch, params:{id}} = this.props; const {dispatch, params:{id}} = this.props;
dispatch({ dispatch({
type: 'FETCH_TRADE_ITEM', type: 'FETCH_TRADE',
id data:{id}
}); });
}; };
handleSubmit() { handleSubmit() {
this.props.dispatch({ this.props.dispatch({
type: 'SETTLEMENT_TRADE_ITEM', type: 'SETTLEMENT_TRADE',
id: this.props.item.id data:{id: this.props.item.id}
}) })
} }
......
...@@ -42,8 +42,8 @@ export default class Contract extends Component { ...@@ -42,8 +42,8 @@ export default class Contract extends Component {
componentDidMount() { componentDidMount() {
const {dispatch, params:{id}} = this.props; const {dispatch, params:{id}} = this.props;
dispatch({ dispatch({
type: 'FETCH_CONTRACT_ITEM', type: 'FETCH_CONTRACT',
id data:{id}
}); });
}; };
...@@ -54,8 +54,8 @@ export default class Contract extends Component { ...@@ -54,8 +54,8 @@ export default class Contract extends Component {
data.id = this.props.params.id; data.id = this.props.params.id;
console.log(data); console.log(data);
this.props.dispatch({ this.props.dispatch({
type: 'UPDATE_CONTRACT_ITEM', type: 'UPDATE_CONTRACT',
item: data data
}); });
} }
......
This diff is collapsed.
...@@ -96,10 +96,10 @@ export default class List extends Component { ...@@ -96,10 +96,10 @@ export default class List extends Component {
this.fetchList(this.props.location.query); this.fetchList(this.props.location.query);
}; };
fetchList(query) { fetchList(data) {
this.props.dispatch({ this.props.dispatch({
type: 'FETCH_TRADE_LIST', type: 'FETCH_TRADE_LIST',
query data
}); });
} }
......
This diff is collapsed.
...@@ -79,10 +79,10 @@ export default class List extends Component { ...@@ -79,10 +79,10 @@ export default class List extends Component {
this.fetchList(this.props.location.query); this.fetchList(this.props.location.query);
}; };
fetchList(query) { fetchList(data) {
this.props.dispatch({ this.props.dispatch({
type: 'FETCH_USER_LIST', type: 'FETCH_USER_LIST',
query data
}); });
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// Use require.context to require reducers automatically // Use require.context to require reducers automatically
// Ref: https://webpack.github.io/docs/context.html // Ref: https://webpack.github.io/docs/context.html
const context = require.context('./', false, /\.js$/); const context = require.context('./', false, /\.js$/);
const keys = context.keys().filter(item => item !== './index.js'); const keys = context.keys().filter(item => item !== './index.js' && item !== './base.js');
const reducers = keys.reduce((memo, key) => { const reducers = keys.reduce((memo, key) => {
memo[key.match(/([^\/]+)\.js$/)[1]] = context(key); memo[key.match(/([^\/]+)\.js$/)[1]] = context(key);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment