|
@@ -12,7 +12,7 @@ const ActivityDescFrom = Form.create()(React.createClass({
|
|
|
return {
|
|
|
loading: false,
|
|
|
activityNumberOption: [],
|
|
|
- activityNumberObj: [],
|
|
|
+ activityNumberObj:{},
|
|
|
yearOption: []
|
|
|
};
|
|
|
},
|
|
@@ -46,23 +46,16 @@ const ActivityDescFrom = Form.create()(React.createClass({
|
|
|
if (this.props.activityNumberList) {
|
|
|
this.props.activityNumberList.map(function (item) {
|
|
|
_me.state.activityNumberOption.push(
|
|
|
- <Select.Option value={item.aid} key={item.uid}>{item.activityNumber}</Select.Option>
|
|
|
+ <Select.Option key={item.aid}>{item.activityNumber}</Select.Option>
|
|
|
);
|
|
|
_me.state.activityNumberObj[item.aid] = item.activityNumber;
|
|
|
});
|
|
|
- }
|
|
|
+ };
|
|
|
},
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
this.allCostCount(nextProps.form);
|
|
|
let _me = this;
|
|
|
- if (!this.props.visible && nextProps.visible && nextProps.activityNumberList) {
|
|
|
- _me.state.activityNumberOption = [];
|
|
|
- nextProps.activityNumberList.map(function (item) {
|
|
|
- _me.state.activityNumberOption.push(
|
|
|
- <Select.Option value={item.aid} key={item.uid}>{item.activityNumber}</Select.Option>
|
|
|
- );
|
|
|
- _me.state.activityNumberObj[item.aid] = item.activityNumber;
|
|
|
- });
|
|
|
+ if (!this.props.visible && nextProps.visible) {
|
|
|
this.state.fileList = [];
|
|
|
this.state.accountUrl = undefined;
|
|
|
this.state.internalAllCost = nextProps.data.internalLaborCost + nextProps.data.internalDirectCost +
|
|
@@ -131,7 +124,7 @@ const ActivityDescFrom = Form.create()(React.createClass({
|
|
|
<p className="activityCost-title">项目编号</p>
|
|
|
{getFieldDecorator('activityNumber', {
|
|
|
rules: [{ required: true, message: '此项为必填项!' }],
|
|
|
- initialValue: theData.activityNumber
|
|
|
+ initialValue: theData.aid
|
|
|
})(
|
|
|
<Select
|
|
|
notFoundContent="无项目可选"
|