yee hace 7 años
padre
commit
4638cb3747

+ 20 - 6
js/component/account/services/leftTab.jsx

@@ -36,21 +36,20 @@ const LeftTab = React.createClass({
                 });
             });
             this.state.current = theKey;
-            if(theKey=='createEvaluate') {
+            if (theKey == 'createEvaluate') {
                 this.state.subKey = 'sub4'
                 this.state.current = 'evaluate';
             }
         };
     },
     render() {
-        return (
-            <Menu onClick={this.handleClick}
+        if (window.userData && window.userData.type == 1) {
+            return (<Menu onClick={this.handleClick}
                 selectedKeys={[this.state.current]}
                 defaultOpenKeys={[this.state.subKey]}
                 mode="vertical"
                 className="account-left"
-                mode="inline"
-            >
+                mode="inline" >
                 <SubMenu key="sub1" title={<span>知识产权管理</span>}>
                     <Menu.Item key="contract">
                         合同申请
@@ -114,7 +113,22 @@ const LeftTab = React.createClass({
                     </Menu.Item>
                 </SubMenu>
             </Menu>
-        );
+            );
+        } else {
+            return (<Menu onClick={this.handleClick}
+                selectedKeys={[this.state.current]}
+                defaultOpenKeys={[this.state.subKey]}
+                mode="vertical"
+                className="account-left"
+                mode="inline" >
+                <SubMenu key="sub4" title={<span>科技评估</span>}>
+                    <Menu.Item key="evaluate">
+                        科技评估管理
+                        </Menu.Item>
+                </SubMenu>
+            </Menu>
+            );
+        }
     }
 });
 

+ 1 - 1
js/component/account/set/ablt.less

@@ -1,6 +1,6 @@
 .set-ablt {
     background: #fff;
-    height: 100%;
+    margin-bottom: 48px;
     padding: 20px;
     .acc-title {
         color: #333;

+ 5 - 5
js/component/account/set/base.jsx

@@ -95,8 +95,8 @@ const BaseFrom = Form.create()(React.createClass({
                         sex: data.data.sex,
                         birth: d,
                         idnumber: data.data.idNumber,
-                        oppositeIdUrl: data.data.oppositeIdUrl,
-                        positiveIdUrl: data.data.positiveIdUrl,
+                        //oppositeIdUrl: data.data.oppositeIdUrl,
+                        //positiveIdUrl: data.data.positiveIdUrl,
                         auditStatus: data.data.auditStatus
                     })
                 };
@@ -133,8 +133,8 @@ const BaseFrom = Form.create()(React.createClass({
                         "dateOfBirthYear": values.birth ? values.birth._d.getFullYear() : undefined,
                         "dateOfBirthMonth": values.birth ? values.birth._d.getMonth() + 1 : undefined,
                         "idNumber": values.idcardnum,
-                        "positiveIdUrl": this.state.positiveIdUrl,
-                        "oppositeIdUrl": this.state.positiveIdUrl
+                        //"positiveIdUrl": this.state.positiveIdUrl,
+                        //"oppositeIdUrl": this.state.positiveIdUrl
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
@@ -214,7 +214,7 @@ const BaseFrom = Form.create()(React.createClass({
                         )}
                 </FormItem>
                 <FormItem wrapperCol={{ span: 12, offset: 4 }}>
-                    {this.state.auditStatus == 5 ? <span></span> : <Button className="set-submit" type="primary" htmlType="submit">保存</Button>}
+                    <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
                 </FormItem>
             </Form >
         );

+ 24 - 9
js/component/account/set/changeMobile.jsx

@@ -9,7 +9,8 @@ const ChangePw = React.createClass({
         return {
             visible: false,
             getCodeButton: false,
-            checkMobile: false
+            checkMobile: false,
+            vsCodeSrc: globalConfig.context + '/open/getVCode'
         };
     },
     showModal() {
@@ -57,6 +58,11 @@ const ChangePw = React.createClass({
             visible: false,
         });
     },
+    reloadVCode() {
+        this.setState({
+            vsCodeSrc: globalConfig.context + '/open/getVCode?t=' + Math.random()
+        });
+    },
     newMobileChange(e) {
         this.state.mobile = e.target.value;
         if (/^1[34578]\d{9}$/.test(this.state.mobile)) {
@@ -75,11 +81,15 @@ const ChangePw = React.createClass({
                 dataType: "json",
                 url: globalConfig.context + "/open/getMCode",
                 data: {
-                    "mobile": this.state.mobile
+                    "mobile": this.state.mobile,
+                    "verificationCode": this.state.Vcode
                 },
                 success: function (data) {
                     let _me = this;
-                    if (data.error.length == 0) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                        this.reloadVCode();
+                    } else {
                         message.success('验证码发送成功!');
                         this.setState({
                             getCodeButton: true
@@ -90,8 +100,6 @@ const ChangePw = React.createClass({
                             });
                             clearInterval(interval);
                         }, 60000);
-                    } else {
-                        message.warning(data.error[0].message);
                     }
                 }.bind(this),
             });
@@ -108,10 +116,17 @@ const ChangePw = React.createClass({
                         <Button key="submit" type="primary" size="large" loading={this.state.loading} onClick={this.handleOk}>确认</Button>,
                         <Button key="back" type="ghost" size="large" onClick={this.handleCancel}>取消</Button>
                     ]}
-                    >
-                    <p><span>新手机号码:</span><Input onChange={this.newMobileChange} /></p>
-                    <p><span>验证码:</span><Input className="mixwidth" onChange={this.mcodeChange} />
-                        <Button onClick={this.getMCode} disabled={this.state.getCodeButton}>获取验证码</Button></p>
+                >
+                    <div><span>新手机号码:</span><Input onChange={this.newMobileChange} /></div>
+                    <div>
+                        <span>图形验证码:</span>
+                        <Input className="mixwidth" onChange={(e) => { this.state.Vcode = e.target.value; }} />
+                        <span className="getVcode">
+                            <img id="VCode" src={this.state.vsCodeSrc} alt="点击刷新验证码" onClick={this.reloadVCode} />
+                        </span>
+                    </div>
+                    <div><span>手机验证码:</span><Input className="mixwidth" onChange={this.mcodeChange} />
+                        <Button onClick={this.getMCode} disabled={this.state.getCodeButton}>获取验证码</Button></div>
                 </Modal>
             </div>
         );

+ 19 - 4
js/component/account/set/changeModal.less

@@ -12,16 +12,16 @@
     .ant-modal-body {
         padding: 20px;
         padding-bottom: 10px;
-        p { 
-            margin-bottom:10px; 
-            > span {
+        >div {
+            margin-bottom: 10px;
+            >span {
                 text-align: right;
                 padding-right: 6px;
                 display: inline-block;
                 width: 25%;
             }
             input {
-                width:70%;
+                width: 70%;
             }
             .mixwidth {
                 width: 38%;
@@ -36,5 +36,20 @@
                 margin-right: 6px;
             }
         }
+        .getVcode {
+            height: 28px;
+            width: 92px;
+            padding-top: 28px;
+            position: relative;
+            overflow: hidden;
+            vertical-align: top;
+            img {
+                position: absolute;
+                top: 0;
+                left: 0;
+                width: 100%;
+                height: 28px;
+            }
+        }
     }
 }

+ 0 - 1
js/component/account/set/company.jsx

@@ -229,7 +229,6 @@ const PersonFrom = Form.create()(React.createClass({
         });
     },
     idttTypeChange(e) {
-        debugger
         if (e === '企业') {
             this.setState({
                 companyDis: 'block',

+ 18 - 35
js/component/account/set/edu.jsx

@@ -1,33 +1,17 @@
 import React from 'react';
-import { Input, Button, Form, Select, Upload, Icon, Spin, message } from 'antd';
+import { Input, Button, Form, Select, Upload, Icon, Spin, message, Cascader } from 'antd';
 import './edu.less';
 import { edulvlArr } from '../../dataDic.js';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 
-import EduPfsSelect from './eduPfsSelect.jsx';
+import { techFieldList } from '../../DicTechFieldList';
+import { getBase64, beforeUpload } from '../../tools'
 import YearSelect from '../../yearSelect.jsx';
 
 const FormItem = Form.Item;
 const Option = Select.Option;
 
-function getBase64(img, callback) {
-    const reader = new FileReader();
-    reader.addEventListener('load', () => callback(reader.result));
-    reader.readAsDataURL(img);
-};
-
-function beforeUpload(file) {
-    const isJPG = file.type === 'image/jpeg';
-    if (!isJPG) {
-        message.error('You can only upload JPG file!');
-    }
-    const isLt2M = file.size / 1024 / 1024 < 2;
-    if (!isLt2M) {
-        message.error('Image must smaller than 2MB!');
-    }
-    return isJPG && isLt2M;
-};
 
 class Avatar extends React.Component {
     constructor(props) {
@@ -80,11 +64,13 @@ const EduFrom = Form.create()(React.createClass({
             dataType: "json",
             url: globalConfig.context + "/api/user/educate",
             success: function (data) {
-                if (data.data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                } else {
                     this.setState({
-                        id:data.data.id,
+                        id: data.data.id,
                         edulvl: data.data.education,
-                        eduPfs: [parseInt(data.data.majorCategory), parseInt(data.data.majorName)],
+                        eduPfs: data.data.majorCategory ? data.data.majorCategory.split(',') : [],
                         schoolname: data.data.graduateSchool,
                         graduationTimeYear: data.data.graduationTimeYear,
                         edunum: data.data.diplomaCode,
@@ -102,7 +88,8 @@ const EduFrom = Form.create()(React.createClass({
         return {
             loading: false,
             xueweiPicUrl: '',
-            xueliPicUrl: ''
+            xueliPicUrl: '',
+            eduPfs: []
         };
     },
     componentDidMount() {
@@ -119,10 +106,9 @@ const EduFrom = Form.create()(React.createClass({
                     crossDomain: false,
                     url: globalConfig.context + "/api/user/userEdu",
                     data: {
-                        "id":this.state.id,
+                        "id": this.state.id,
                         "education": values.edulvl,
-                        "majorCategory": this.state.eduPfsA,
-                        "majorName": this.state.eduPfsB,
+                        "majorCategory": values.eduPfs.join(','),
                         "graduateSchool": values.schoolname,
                         "graduationTimeYear": this.state.graduationTimeYear,
                         "diplomaUrl": this.state.xueliPicUrl,
@@ -153,13 +139,8 @@ const EduFrom = Form.create()(React.createClass({
         this.state.xueliPicUrl = e;
     },
     xueweiPicUrl(e) {
-
         this.state.xueweiPicUrl = e;
     },
-    professional(e1, e2) {
-        this.state.eduPfsA = e1;
-        this.state.eduPfsB = e2;
-    },
     render() {
         const { getFieldDecorator } = this.props.form;
         const formItemLayout = {
@@ -188,11 +169,13 @@ const EduFrom = Form.create()(React.createClass({
                 </FormItem>
                 <FormItem
                     {...formItemLayout}
-                    label="专业"
+                    label="专业领域"
                 >
-                    {getFieldDecorator('edupfs')(
-                        <EduPfsSelect defValue={this.state.eduPfs} Professional={this.professional} />
-                    )}
+                    {getFieldDecorator('eduPfs', {
+                        initialValue: this.state.eduPfs || []
+                    })(
+                        <Cascader placeholder="请选择专业领域" options={techFieldList} style={{ width: 300 }} />
+                        )}
                 </FormItem>
                 <FormItem
                     {...formItemLayout}

+ 13 - 60
js/component/account/set/tech.jsx

@@ -1,10 +1,10 @@
 import React from 'react';
-import { Input, Button, Form, Select, Icon, Spin, InputNumber, Tag, message } from 'antd';
+import { Input, Button, Form, Select, Icon, Spin, InputNumber, Tag, message, Cascader } from 'antd';
 import './tech.less';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 
-import TechSelect from './techSelect.jsx';
+import { techFieldList } from '../../DicTechFieldList';
 
 const TechFrom = Form.create()(React.createClass({
     getInitialState() {
@@ -25,9 +25,9 @@ const TechFrom = Form.create()(React.createClass({
             success: function (data) {
                 if (data.data) {
                     this.setState({
-                        id:data.data.id,
+                        id: data.data.id,
                         techpeople: data.data.technicalPeopleNum,
-                        techzoneArr: data.data.searchAreaCategory ? data.data.searchAreaCategory.split(",") : [],
+                        techField: data.data.searchAreaCategory ? data.data.searchAreaCategory.split(",") : [],
                         haveskill: data.data.specialty ? data.data.specialty.split(",") : []
                     });
                 };
@@ -41,7 +41,6 @@ const TechFrom = Form.create()(React.createClass({
     },
     handleSubmit(e) {
         e.preventDefault();
-        let searchArea = this.state.techzoneArr.join(",");
         let specialty = this.state.haveskill.join(",");
         this.props.form.validateFields((err, values) => {
             if (!err) {
@@ -52,9 +51,9 @@ const TechFrom = Form.create()(React.createClass({
                     crossDomain: false,
                     url: globalConfig.context + "/api/user/orgTech",
                     data: {
-                        "id":this.state.id,
+                        "id": this.state.id,
                         "technicalPeopleNum": values.techpeople,
-                        "searchAreaCategory": searchArea,
+                        "searchAreaCategory": values.techField.join(','),
                         "specialty": specialty
                     }
                 }).done(function (data) {
@@ -70,43 +69,6 @@ const TechFrom = Form.create()(React.createClass({
             }
         });
     },
-    techzone(x, y, z) {
-        this.state.selecttech = x + '/' + y + '/' + z;
-    },
-    addtechzone(e) {
-        let _me = this;
-        let newArr = _me.state.techzoneArr;
-        if (this.state.selecttech !== undefined) {
-            if (_me.state.techzoneArr.length > 0) {
-                let thebool = true;
-                _me.state.techzoneArr.map(function (item, i) {
-                    if (item === _me.state.selecttech) {
-                        thebool = false
-                    };
-                });
-                if (thebool) {
-                    newArr = _me.state.techzoneArr.concat(_me.state.selecttech);
-                }
-            } else if (_me.state.techzoneArr.length === 0) {
-                newArr = _me.state.techzoneArr.concat(_me.state.selecttech);
-            }
-            this.setState({
-                techzoneArr: newArr
-            });
-        };
-    },
-    deletetechzone(e) {
-        let _me = this.state;
-        let newArr = [];
-        _me.techzoneArr.map(function (item, i) {
-            if (item !== e) {
-                newArr.push(item);
-            }
-        });
-        this.setState({
-            techzoneArr: newArr
-        })
-    },
     addskill(e) {
         let _me = this;
         let theSkillArr = _me.state.haveskill;
@@ -162,24 +124,15 @@ const TechFrom = Form.create()(React.createClass({
                     <span>人</span>
                 </FormItem>
                 <FormItem
-                    labelCol={{ span: 4 }}
-                    wrapperCol={{ span: 14 }}
-                    label="重点研究领域"
+                    {...formItemLayout}
+                    label="专业领域"
                 >
-                    {getFieldDecorator('techzone')(
-                        <div>
-                            <TechSelect techzone={this.techzone} />
-                            <Button type="primary" onClick={this.addtechzone}>添加</Button>
-                        </div>
-                    )}
+                    {getFieldDecorator('techField', {
+                        initialValue: this.state.techField
+                    })(
+                        <Cascader placeholder="请选择专业领域" options={techFieldList} style={{ width: 380 }} />
+                        )}
                 </FormItem>
-                <div className="set-explain">
-                    {
-                        this.state.techzoneArr.map(function (item, i) {
-                            return <Tag key={item} closable afterClose={_me.deletetechzone.bind(this, item)}>{item}</Tag>
-                        }.bind(this))
-                    }
-                </div>
                 <FormItem
                     labelCol={{ span: 4 }}
                     wrapperCol={{ span: 14 }}

+ 10 - 2
js/component/manageCenter/servicesManage/contract/contractAdd.jsx

@@ -116,6 +116,14 @@ const ContractAddFrom = Form.create()(React.createClass({
         e.preventDefault();
         this.props.form.validateFields((err, values) => {
             if (!err) {
+                if (!values.uid || !values.contacts) {
+                    message.warning('请选择一个公司和联系人!');
+                    return;
+                }
+                if (!values.patentNum && !values.copyrightNum && !values.cognizanceYear && !values.techProjectNum) {
+                    message.warning('请至少选择一个申报项目!');
+                    return;
+                };
                 this.props.spinState(true);
                 $.ajax({
                     method: "POST",
@@ -153,11 +161,11 @@ const ContractAddFrom = Form.create()(React.createClass({
     handleSubmit() {
         this.props.form.validateFields((err, values) => {
             if (!err) {
-                this.props.spinState(true);
-                if (!values.principals || !values.recordTime ) {
+                if (!values.principals || !values.recordTime) {
                     message.warning('请填写审核信息!');
                     return;
                 };
+                this.props.spinState(true);
                 $.ajax({
                     method: "POST",
                     dataType: "json",

+ 1 - 1
js/component/manageCenter/servicesManage/highTech/fosterDesc/ablt.less

@@ -1,6 +1,6 @@
 .set-ablt {
     background: #fff;
-    height: 100%;
+    margin-bottom: 48px;
     padding: 20px;
     .acc-title {
         color: #333;

+ 1 - 1
js/component/manageCenter/userManage/customerList.jsx

@@ -366,7 +366,7 @@ const CustomerList = React.createClass({
                             })
                         }
                     </Select>
-                    <Input placeholder="客户名称" value={this.state.searchName}
+                    <Input placeholder="客户认证名称" value={this.state.searchName}
                         onChange={(e) => { this.setState({ searchName: e.target.value }); }} />
                     <Input placeholder="联系方式" value={this.state.searchEmail}
                         onChange={(e) => { this.setState({ searchEmail: e.target.value }); }} />

+ 3 - 3
js/component/manageCenter/userManage/userList.jsx

@@ -103,7 +103,7 @@ const UserList = React.createClass({
                 email: this.state.searchEmail,
                 createTime: this.state.searchTime,
                 number: this.state.searchAftId, //阿凡提号
-                aftUsername: this.state.searchAftUsername,
+                username: this.state.searchAftUsername,
                 auditStatus: this.state.searchAuditStatus
             },
             success: function (data) {
@@ -169,7 +169,7 @@ const UserList = React.createClass({
                     dataIndex: 'mobile',
                     key: 'mobile',
                 }, {
-                    title: '用户名',
+                    title: '认证名称',
                     dataIndex: 'username',
                     key: 'username',
                 }, {
@@ -182,7 +182,7 @@ const UserList = React.createClass({
                     dataIndex: 'createTimeFormattedDate',
                     key: 'createTimeFormattedDate',
                 }, {
-                    title: '认证名称',
+                    title: '用户名',
                     dataIndex: 'aftUsername',
                     key: 'aftUsername',
                 }, {

+ 3 - 3
js/component/portal/search/subscriber.jsx

@@ -26,7 +26,7 @@ const SubContent = React.createClass({
             data: {
                 "level": this.state.level, //认证状态 (0--未认证,1--认证)
                 "type": this.state.type, //用户类型 (0--个人用户,1--组织用户)
-                "field": this.state.firstField ? ((this.state.firstField || '') + ',' + (this.state.secondField || '') + ',' + (this.state.thirdField || '')) : null,
+                "field": this.state.firstField ? ((this.state.firstField || '') + (this.state.secondField ? (',' + this.state.secondField) : '') + (this.state.thirdField ? (',' + this.state.thirdField) : '')) : null,
                 "province": this.state.province,
                 "city": this.state.city,
                 "area": this.state.area,
@@ -103,9 +103,9 @@ const SubContent = React.createClass({
 
         if (window.location.search) {
             let theUrl = window.location.search
-            this.state.keyword =theUrl.substring(1, theUrl.length);
+            this.state.keyword = theUrl.substring(1, theUrl.length);
         };
-        
+
         this.loadData();
     },
     fieldFirstChange(e) {

+ 7 - 6
js/component/subscriberDetail/content.jsx

@@ -79,7 +79,7 @@ const Content = React.createClass({
                             serialNumber: thisdata.serialNumber,
                             dataCategory: thisdata.dataCategory,
                             name: thisdata.name,
-                            transferPrice:thisdata.transferPrice,
+                            transferPrice: thisdata.transferPrice,
                             fieldA: thisdata.fieldA,
                             fieldB: thisdata.fieldB,
                             bargainingMode: thisdata.bargainingMode,
@@ -133,14 +133,14 @@ const Content = React.createClass({
                             id: thisdata.id,
                             serialNumber: thisdata.serialNumber,
                             dataCategory: thisdata.dataCategory,
-                            problemDes:thisdata.problemDes,
-                            budgetCost:thisdata.budgetCost,
+                            problemDes: thisdata.problemDes,
+                            budgetCost: thisdata.budgetCost,
                             name: thisdata.name,
                             keyword: thisdata.keyword,
                             releaseDate: thisdata.releaseDate,
                             demandType: thisdata.demandType,
-                            industryCategoryA:thisdata.industryCategoryA,
-                            industryCategoryB:thisdata.industryCategoryB,
+                            industryCategoryA: thisdata.industryCategoryA,
+                            industryCategoryB: thisdata.industryCategoryB,
                             validityPeriod: thisdata.validityPeriod,
                             validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
                             releaseDateFormattedDate: thisdata.releaseDateFormattedDate
@@ -314,7 +314,8 @@ const Content = React.createClass({
                     <div className="column-img clearfix">
                         {this.state.theImgsrc.map((item, i) => {
                             return <div className="img-box" key={i}>
-                                <img src={globalConfig.avatarHost + "/upload" + item} alt="" />
+                                <img src={globalConfig.avatarHost + "/upload" + item} alt=""
+                                    onClick={() => { window.open(globalConfig.avatarHost + "/upload" + item) }} />
                             </div>
                         })}
                     </div>

+ 1 - 2
js/component/yearSelect.jsx

@@ -23,10 +23,9 @@ const Yearselect = React.createClass({
         this.state.defYear = this.state.thisYear.toString();
     },
     componentWillUpdate(nextProps) {
-        if (nextProps.defValue) {
+        if (this.props.defValue != nextProps.defValue) {
             this.state.Year = nextProps.defValue;
         };
-        this.state.Year = nextProps.value;
     },
     render() {
         return (