|
@@ -35,7 +35,7 @@ const PicturesWall = React.createClass({
|
|
|
this.props.fileList(fileList);
|
|
|
},
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
- this.state.fileList = nextProps.pictureUrl;
|
|
|
+ this.state.fileList = nextProps.pictureUrl;
|
|
|
},
|
|
|
render() {
|
|
|
const { previewVisible, previewImage, fileList } = this.state;
|
|
@@ -369,6 +369,10 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
return "软著";
|
|
|
} else if (record.type == 3) {
|
|
|
return "审计";
|
|
|
+ }else if(record.type == 4) {
|
|
|
+ return "双软"
|
|
|
+ }else if(record.type == 5) {
|
|
|
+ return "高新"
|
|
|
}
|
|
|
},
|
|
|
},
|
|
@@ -380,7 +384,7 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
this.selectSuperId();
|
|
|
},
|
|
|
//获取上级品类
|
|
|
- selectSuperId() {
|
|
|
+ selectSuperId() {
|
|
|
this.state.data = []
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
@@ -390,15 +394,15 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
data:{
|
|
|
flag:0,
|
|
|
},
|
|
|
- success: function (data) {
|
|
|
+ success: function (data) {
|
|
|
let theArr = [];
|
|
|
let thedata=data.data;
|
|
|
if (!thedata) {
|
|
|
if (data.error && data.error.length) {
|
|
|
message.warning(data.error[0].message);
|
|
|
- };
|
|
|
- thedata = {};
|
|
|
- };
|
|
|
+ };
|
|
|
+ thedata = {};
|
|
|
+ };
|
|
|
var contactIds=[];
|
|
|
for(var i=0;i<data.data.length;i++){
|
|
|
let theData = data.data[i];
|
|
@@ -406,13 +410,13 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
<Select.Option value={i.toString()} key={theData.cname}>{theData.cname}</Select.Option>
|
|
|
);
|
|
|
};
|
|
|
- this.setState({
|
|
|
+ this.setState({
|
|
|
SuperArr:thedata,
|
|
|
- contactsOption: theArr,
|
|
|
+ contactsOption: theArr,
|
|
|
orderStatusOptions:data.data,
|
|
|
});
|
|
|
console.log(theArr);
|
|
|
-
|
|
|
+
|
|
|
}.bind(this),
|
|
|
}).always(function () {
|
|
|
this.loadData(this.state.ispage);
|
|
@@ -423,7 +427,7 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
},
|
|
|
//编辑部门,保存
|
|
|
edithandleSubmit(e){
|
|
|
- e.preventDefault();
|
|
|
+ e.preventDefault();
|
|
|
let offsetText;
|
|
|
if(this.state.editOffset){
|
|
|
if(this.state.editOffset>10||this.state.editOffset<0){
|
|
@@ -454,13 +458,13 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
});
|
|
|
thecompanyLogoUrl = picArr.join(",");
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
if(!err) {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
|
let nameText=this.state.SuperArr
|
|
|
- let num = 0
|
|
|
+ let num = 0
|
|
|
nameText.forEach((item,index) => {
|
|
|
if(item.cname == this.state.editCname) {
|
|
|
num = index
|
|
@@ -505,7 +509,7 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
activityPrice:this.state.editActivityPrice,//活动价
|
|
|
activityFlag:this.state.editActivityFlag,//活动生效标识
|
|
|
memberPrice:this.state.editMemberPrice,//项目ID
|
|
|
- status:this.state.editStatus,//项目状态
|
|
|
+ status:this.state.editStatus,//项目状态
|
|
|
type: this.state.typeStatus,//项目分类
|
|
|
country:isCountry,//是否全国
|
|
|
province:pro?pro:'',//省
|
|
@@ -513,18 +517,18 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
district:dis?dis:'',//区
|
|
|
minLogo:theorgCodeUrl,
|
|
|
maxLogo:thecompanyLogoUrl,
|
|
|
- introduce:this.state.editIntroduce,//项目介绍
|
|
|
+ introduce:this.state.editIntroduce,//项目介绍
|
|
|
projectUrl:this.state.editProjectUrl,//项目地址
|
|
|
valueEffect:this.state.editValueEffect,//项目价值及作用
|
|
|
- clientSize:this.state.editClientSize,//项目基本条件
|
|
|
+ clientSize:this.state.editClientSize,//项目基本条件
|
|
|
boutique:this.state.editBoutique,
|
|
|
}
|
|
|
- }).done(function (data) {
|
|
|
+ }).done(function (data) {
|
|
|
this.setState({
|
|
|
loading: false
|
|
|
});
|
|
|
if (!data.error.length) {
|
|
|
- message.success('保存成功!');
|
|
|
+ message.success('保存成功!');
|
|
|
this.edithandleCancel();
|
|
|
this.selectSuperId();
|
|
|
} else {
|
|
@@ -532,7 +536,7 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
}
|
|
|
}.bind(this));
|
|
|
}
|
|
|
- })
|
|
|
+ })
|
|
|
},
|
|
|
//规格列表整行点击
|
|
|
formatTableRowClick(record, index){
|
|
@@ -547,7 +551,7 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
formatActivityPrice:record.formatActivityPrice,//活动价
|
|
|
formatActivityFlag:record.formatActivityFlag,//活动生效标识
|
|
|
formatMemberPrice:record.formatMemberPrice,//会员价
|
|
|
- formatStatus:record.formatStatus.toString(),//项目状态
|
|
|
+ formatStatus:record.formatStatus.toString(),//项目状态
|
|
|
});
|
|
|
},
|
|
|
//项目列表整行点击
|
|
@@ -593,6 +597,10 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
str = "软著"
|
|
|
}else if(thisdata.type == 3) {
|
|
|
str = "审计"
|
|
|
+ }else if(thisdata.type == 4) {
|
|
|
+ str = "双软"
|
|
|
+ }else if(thisdata.type == 5) {
|
|
|
+ str = "高新"
|
|
|
}
|
|
|
theArr.push({
|
|
|
editId: thisdata.id,//每一条记录的ID
|
|
@@ -609,7 +617,7 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
editOffset: thisdata.offset,//最低折扣
|
|
|
editMemberPrice: thisdata.memberPrice,//会员价
|
|
|
editActivityFlag:thisdata.activityFlag,//活动生效标识
|
|
|
- editStatus:thisdata.status,//品类状态
|
|
|
+ editStatus:thisdata.status,//品类状态
|
|
|
typeStr: str,
|
|
|
typeStatus: thisdata.type,
|
|
|
editCreateId:thisdata.createName,//创建人
|
|
@@ -621,8 +629,9 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
editBoutique:thisdata.boutique,//是否精品
|
|
|
orgCodeUrl: thisdata.minLogo ? splitUrl(thisdata.minLogo, ',', globalConfig.avatarHost + '/upload') : [],
|
|
|
cditCompanyLogoUrl: thisdata.maxLogo ? splitUrl(thisdata.maxLogo, ',', globalConfig.avatarHost + '/upload') : [],
|
|
|
- });
|
|
|
+ });
|
|
|
};
|
|
|
+ //0 正常 1专利 2软著 3审计 4双软 5高新
|
|
|
let str = ""
|
|
|
if(thisdata.type == 0) {
|
|
|
str = "通用"
|
|
@@ -632,6 +641,10 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
str = "软著"
|
|
|
}else if(thisdata.type == 3) {
|
|
|
str = "审计"
|
|
|
+ }else if(thisdata.type == 4) {
|
|
|
+ str = "双软"
|
|
|
+ }else if(thisdata.type == 5) {
|
|
|
+ str = "高新"
|
|
|
}
|
|
|
this.setState({
|
|
|
editId: thisdata.id, //每一条记录的ID
|
|
@@ -702,11 +715,11 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
offsetText=this.state.formatOffset;
|
|
|
}
|
|
|
}
|
|
|
- this.props.form.validateFields((err, values) => {
|
|
|
+ this.props.form.validateFields((err, values) => {
|
|
|
if (!err) {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
- });
|
|
|
+ });
|
|
|
$.ajax({
|
|
|
method: "post",
|
|
|
dataType: "json",
|
|
@@ -720,14 +733,14 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
activityPrice:this.state.formatActivityPrice,//活动价
|
|
|
activityFlag:this.state.formatActivityFlag,//活动生效标识
|
|
|
memberPrice:this.state.formatMemberPrice,//会员价
|
|
|
- status:this.state.formatStatus,//项目状态
|
|
|
+ status:this.state.formatStatus,//项目状态
|
|
|
}
|
|
|
- }).done(function (data) {
|
|
|
+ }).done(function (data) {
|
|
|
this.setState({
|
|
|
loading: false
|
|
|
});
|
|
|
if (!data.error.length) {
|
|
|
- message.success('修改规格成功!');
|
|
|
+ message.success('修改规格成功!');
|
|
|
this.formatLoadData();
|
|
|
this.editformathandleCancel();
|
|
|
} else {
|
|
@@ -749,11 +762,11 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
offsetText=this.state.formatOffset;
|
|
|
}
|
|
|
}
|
|
|
- this.props.form.validateFields((err, values) => {
|
|
|
+ this.props.form.validateFields((err, values) => {
|
|
|
if (!err) {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
- });
|
|
|
+ });
|
|
|
$.ajax({
|
|
|
method: "post",
|
|
|
dataType: "json",
|
|
@@ -767,14 +780,14 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
activityPrice:this.state.formatActivityPrice,//活动价
|
|
|
activityFlag:this.state.formatActivityFlag,//活动生效标识
|
|
|
memberPrice:this.state.formatMemberPrice,//会员价
|
|
|
- status:this.state.formatStatus,//项目状态
|
|
|
+ status:this.state.formatStatus,//项目状态
|
|
|
}
|
|
|
- }).done(function (data) {
|
|
|
+ }).done(function (data) {
|
|
|
this.setState({
|
|
|
loading: false
|
|
|
});
|
|
|
if (!data.error.length) {
|
|
|
- message.success('新增规格成功!');
|
|
|
+ message.success('新增规格成功!');
|
|
|
this.formathandleCancel();
|
|
|
this.formatLoadData();
|
|
|
} else {
|
|
@@ -786,7 +799,7 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
},
|
|
|
//新增一个项目,保存
|
|
|
addhandleSubmit(e){
|
|
|
- e.preventDefault();
|
|
|
+ e.preventDefault();
|
|
|
if(!this.state.categoryName){
|
|
|
message.warning('请输入项目名称');
|
|
|
return false;
|
|
@@ -813,11 +826,11 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
isCountry=1;
|
|
|
pro='';
|
|
|
}
|
|
|
- this.props.form.validateFields((err, values) => {
|
|
|
+ this.props.form.validateFields((err, values) => {
|
|
|
if (!err) {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
- });
|
|
|
+ });
|
|
|
//上级组织字典
|
|
|
let nameText=this.state.SuperArr;
|
|
|
let superText=nameText[parseInt(this.state.addCid)].id;
|
|
@@ -835,12 +848,12 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
city:city,//市
|
|
|
district:dis,//区
|
|
|
}
|
|
|
- }).done(function (data) {
|
|
|
+ }).done(function (data) {
|
|
|
this.setState({
|
|
|
loading: false
|
|
|
});
|
|
|
if (!data.error.length) {
|
|
|
- message.success('新增项目成功!');
|
|
|
+ message.success('新增项目成功!');
|
|
|
this.handleCancel();
|
|
|
this.selectSuperId();
|
|
|
} else {
|
|
@@ -1012,18 +1025,18 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
this.setState({ visible: false })
|
|
|
},
|
|
|
edithandleCancel(e) {
|
|
|
- this.setState({
|
|
|
- editvisible: false
|
|
|
+ this.setState({
|
|
|
+ editvisible: false
|
|
|
});
|
|
|
},
|
|
|
formathandleCancel(e) {
|
|
|
- this.setState({
|
|
|
- formatvisible: false
|
|
|
+ this.setState({
|
|
|
+ formatvisible: false
|
|
|
});
|
|
|
},
|
|
|
editformathandleCancel(e) {
|
|
|
- this.setState({
|
|
|
- editformatvisible: false
|
|
|
+ this.setState({
|
|
|
+ editformatvisible: false
|
|
|
});
|
|
|
},
|
|
|
search() {
|
|
@@ -1037,7 +1050,7 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
this.state.activityFlag = undefined;//活动生效清零
|
|
|
this.state.status = undefined;//项目状态清零
|
|
|
this.state.type = undefined;//项目分类清零
|
|
|
- this.loadData();
|
|
|
+ this.loadData();
|
|
|
},
|
|
|
//新增部分的清零
|
|
|
addReset(){
|
|
@@ -1055,7 +1068,7 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
this.state.formatMemberPrice = '';//会员价清零
|
|
|
this.state.formatActivityFlag = undefined;//活动生效标识清零
|
|
|
this.state.formatStatus= undefined;//项目状态清零
|
|
|
- this.formatLoadData();
|
|
|
+ this.formatLoadData();
|
|
|
},
|
|
|
//详情tab切换数据处理
|
|
|
callback(e) {
|
|
@@ -1063,7 +1076,7 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
callnub: e,
|
|
|
})
|
|
|
if(e == 1) {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
if(e == 2) {
|
|
|
this.formatLoadData();
|
|
@@ -1106,7 +1119,7 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
const { getFieldDecorator } = this.props.form;
|
|
|
const hasSelected = this.state.selectedRowKeys.length > 0;
|
|
|
const { RangePicker } = DatePicker;
|
|
|
-
|
|
|
+
|
|
|
return (
|
|
|
<div className="user-content">
|
|
|
<div className="content-title">
|
|
@@ -2151,6 +2164,7 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
wrapperCol={{ span: 12 }}
|
|
|
label="项目分类"
|
|
|
>
|
|
|
+ {/* 0 正常 1专利 2软著 3审计 4双软 5高新*/}
|
|
|
<Select
|
|
|
placeholder="项目分类"
|
|
|
value={this.state.typeStr}
|
|
@@ -2165,6 +2179,10 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
str = "软著";
|
|
|
} else if (e == 3) {
|
|
|
str = "审计";
|
|
|
+ } else if (e == 4) {
|
|
|
+ str = "双软";
|
|
|
+ } else if (e == 5) {
|
|
|
+ str = "高新";
|
|
|
}
|
|
|
this.setState({
|
|
|
typeStatus: e,
|
|
@@ -2176,6 +2194,8 @@ const BusinessProject=Form.create()(React.createClass({
|
|
|
<Select.Option key={1}>专利</Select.Option>
|
|
|
<Select.Option key={2}>软著</Select.Option>
|
|
|
<Select.Option key={3}>审计</Select.Option>
|
|
|
+ <Select.Option key={4}>双软</Select.Option>
|
|
|
+ <Select.Option key={5}>高新</Select.Option>
|
|
|
</Select>
|
|
|
</FormItem>
|
|
|
<FormItem
|