|
@@ -226,7 +226,7 @@ const ActivityForm = Form.create()(React.createClass({
|
|
|
selectedKeys={this.state.selectedKeys}
|
|
|
onChange={this.intellectualChange}
|
|
|
onSelectChange={this.intellectualSelectChange}
|
|
|
- render={item => `${item.name}-${item.key}`}
|
|
|
+ render={item => `${item.name}-${item.number}`}
|
|
|
/>
|
|
|
</div>
|
|
|
<FormItem className="half-div"
|
|
@@ -428,74 +428,77 @@ const Activity = React.createClass({
|
|
|
})).done((data1, data2) => {
|
|
|
let data = data1[0];
|
|
|
let intellectualList = data2[0];
|
|
|
+ let theArr = [], theObj = {};
|
|
|
if (data.error.length || !data.data || !data.data.list) {
|
|
|
message.warning(data.error[0].message);
|
|
|
- return;
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < data.data.list.length; i++) {
|
|
|
+ let thisdata = data.data.list[i];
|
|
|
+ this.state.data.push({
|
|
|
+ key: i,
|
|
|
+ id: thisdata.id,
|
|
|
+ uid: thisdata.uid,
|
|
|
+ activityNumber: thisdata.activityNumber,
|
|
|
+ activityName: thisdata.activityName,
|
|
|
+ startDate: thisdata.startDate,
|
|
|
+ endDate: thisdata.endDate,
|
|
|
+
|
|
|
+ mockData: this.state.mockData,
|
|
|
+
|
|
|
+ techField: [thisdata.technicalField1, thisdata.technicalField2, thisdata.technicalField3],
|
|
|
+ technicalField: getTechField(thisdata.technicalField1, thisdata.technicalField2, thisdata.technicalField3),
|
|
|
+ technicalField1: thisdata.technicalField1,
|
|
|
+ technicalField2: thisdata.technicalField2,
|
|
|
+ technicalField3: thisdata.technicalField3,
|
|
|
+ technicalSource: thisdata.technicalSource || thisdata.technicalSource == 0 ? String(thisdata.technicalSource) : undefined,
|
|
|
+ intellectualPropertyNumber: thisdata.intellectualPropertyNumber ? thisdata.intellectualPropertyNumber.split(",") : [],
|
|
|
+ intellectualPropertyNumberText: thisdata.intellectualPropertyNumber,
|
|
|
+ budget: thisdata.budget,
|
|
|
+ firstYearExpenditure: thisdata.firstYearExpenditure,
|
|
|
+ secondYearExpenditure: thisdata.secondYearExpenditure,
|
|
|
+ thirdYearExpenditure: thisdata.thirdYearExpenditure,
|
|
|
+ implement: thisdata.implement,
|
|
|
+ technologyInnovation: thisdata.technologyInnovation,
|
|
|
+ achievement: thisdata.achievement,
|
|
|
+ internalLaborCost: thisdata.internalLaborCost,
|
|
|
+ internalDirectCost: thisdata.internalDirectCost,
|
|
|
+ internalDepreciationCost: thisdata.internalDepreciationCost,
|
|
|
+ internalAmortizationCost: thisdata.internalAmortizationCost,
|
|
|
+ internalDesignCost: thisdata.internalDesignCost,
|
|
|
+ internalEquipmentCost: thisdata.internalEquipmentCost,
|
|
|
+ internalOtherCost: thisdata.internalOtherCost,
|
|
|
+ externalTotalCost: thisdata.externalTotalCost,
|
|
|
+ externalAbroadCost: thisdata.externalAbroadCost,
|
|
|
+ enterpriseFiller: thisdata.enterpriseFiller,
|
|
|
+ signDate: thisdata.signDate,
|
|
|
+ sortNumber: thisdata.sortNumber,
|
|
|
+ startDateFormattedDate: thisdata.startDateFormattedDate,
|
|
|
+ endDateFormattedDate: thisdata.endDateFormattedDate,
|
|
|
+ projectMode: thisdata.projectMode,
|
|
|
+ proofUrl: thisdata.proofUrl,
|
|
|
+ proofDownloadFileName: thisdata.proofDownloadFileName
|
|
|
+ });
|
|
|
+ };
|
|
|
+ this.state.pagination.current = data.data.pageNo;
|
|
|
+ this.state.pagination.total = data.data.totalCount;
|
|
|
};
|
|
|
if (intellectualList.error.length || !intellectualList.data || !intellectualList.data.list) {
|
|
|
message.warning(intellectualList.error[0].message);
|
|
|
- return;
|
|
|
- };
|
|
|
- let theArr = [];
|
|
|
- for (let i = 0; i < intellectualList.data.list.length; i++) {
|
|
|
- theArr.push({
|
|
|
- key: intellectualList.data.list[i].intellectualPropertyNumber,
|
|
|
- name: intellectualList.data.list[i].intellectualPropertyName
|
|
|
- });
|
|
|
- };
|
|
|
- this.state.mockData = theArr;
|
|
|
- for (let i = 0; i < data.data.list.length; i++) {
|
|
|
- let thisdata = data.data.list[i];
|
|
|
- this.state.data.push({
|
|
|
- key: i,
|
|
|
- id: thisdata.id,
|
|
|
- uid: thisdata.uid,
|
|
|
- activityNumber: thisdata.activityNumber,
|
|
|
- activityName: thisdata.activityName,
|
|
|
- startDate: thisdata.startDate,
|
|
|
- endDate: thisdata.endDate,
|
|
|
-
|
|
|
- mockData: this.state.mockData,
|
|
|
-
|
|
|
- techField: [thisdata.technicalField1, thisdata.technicalField2, thisdata.technicalField3],
|
|
|
- technicalField: getTechField(thisdata.technicalField1, thisdata.technicalField2, thisdata.technicalField3),
|
|
|
- technicalField1: thisdata.technicalField1,
|
|
|
- technicalField2: thisdata.technicalField2,
|
|
|
- technicalField3: thisdata.technicalField3,
|
|
|
- technicalSource: thisdata.technicalSource ? String(thisdata.technicalSource) : undefined,
|
|
|
- intellectualPropertyNumber: thisdata.intellectualPropertyNumber ? thisdata.intellectualPropertyNumber.split(",") : [],
|
|
|
- intellectualPropertyNumberText: thisdata.intellectualPropertyNumber,
|
|
|
- budget: thisdata.budget,
|
|
|
- firstYearExpenditure: thisdata.firstYearExpenditure,
|
|
|
- secondYearExpenditure: thisdata.secondYearExpenditure,
|
|
|
- thirdYearExpenditure: thisdata.thirdYearExpenditure,
|
|
|
- implement: thisdata.implement,
|
|
|
- technologyInnovation: thisdata.technologyInnovation,
|
|
|
- achievement: thisdata.achievement,
|
|
|
- internalLaborCost: thisdata.internalLaborCost,
|
|
|
- internalDirectCost: thisdata.internalDirectCost,
|
|
|
- internalDepreciationCost: thisdata.internalDepreciationCost,
|
|
|
- internalAmortizationCost: thisdata.internalAmortizationCost,
|
|
|
- internalDesignCost: thisdata.internalDesignCost,
|
|
|
- internalEquipmentCost: thisdata.internalEquipmentCost,
|
|
|
- internalOtherCost: thisdata.internalOtherCost,
|
|
|
- externalTotalCost: thisdata.externalTotalCost,
|
|
|
- externalAbroadCost: thisdata.externalAbroadCost,
|
|
|
- enterpriseFiller: thisdata.enterpriseFiller,
|
|
|
- signDate: thisdata.signDate,
|
|
|
- sortNumber: thisdata.sortNumber,
|
|
|
- startDateFormattedDate: thisdata.startDateFormattedDate,
|
|
|
- endDateFormattedDate: thisdata.endDateFormattedDate,
|
|
|
- projectMode: thisdata.projectMode,
|
|
|
- proofUrl: thisdata.proofUrl,
|
|
|
- proofDownloadFileName: thisdata.proofDownloadFileName
|
|
|
- });
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < intellectualList.data.list.length; i++) {
|
|
|
+ theArr.push({
|
|
|
+ key: intellectualList.data.list[i].id,
|
|
|
+ number: intellectualList.data.list[i].intellectualPropertyNumber,
|
|
|
+ name: intellectualList.data.list[i].intellectualPropertyName
|
|
|
+ });
|
|
|
+ theObj[intellectualList.data.list[i].id] = intellectualList.data.list[i].intellectualPropertyNumber;
|
|
|
+ };
|
|
|
};
|
|
|
- this.state.pagination.current = data.data.pageNo;
|
|
|
- this.state.pagination.total = data.data.totalCount;
|
|
|
this.setState({
|
|
|
dataSource: this.state.data,
|
|
|
- pagination: this.state.pagination
|
|
|
+ pagination: this.state.pagination,
|
|
|
+ mockData: theArr,
|
|
|
+ mockDataObj: theObj
|
|
|
});
|
|
|
}).always(function () {
|
|
|
this.setState({
|
|
@@ -508,6 +511,7 @@ const Activity = React.createClass({
|
|
|
getInitialState() {
|
|
|
return {
|
|
|
mockData: [],
|
|
|
+ mockDataObj: {},
|
|
|
selectedRowKeys: [],
|
|
|
selectedRows: [],
|
|
|
loading: false,
|
|
@@ -544,7 +548,16 @@ const Activity = React.createClass({
|
|
|
}, {
|
|
|
title: '知识产权编号',
|
|
|
dataIndex: 'intellectualPropertyNumberText',
|
|
|
- key: 'intellectualPropertyNumberText'
|
|
|
+ key: 'intellectualPropertyNumberText',
|
|
|
+ render: (text) => {
|
|
|
+ let arr = [], _me = this;
|
|
|
+ if (text && text.split(',').length) {
|
|
|
+ text.split(',').map((item) => {
|
|
|
+ arr.push(_me.state.mockDataObj[item]);
|
|
|
+ });
|
|
|
+ };
|
|
|
+ return arr.join(',');
|
|
|
+ }
|
|
|
}, {
|
|
|
title: '开始时间',
|
|
|
dataIndex: 'startDateFormattedDate',
|