Quellcode durchsuchen

认证页面返回信息报错修复

yee vor 8 Jahren
Ursprung
Commit
3625b20d51

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
build/user/account/set.css


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
build/user/account/set.js


Datei-Diff unterdrückt, da er zu groß ist
+ 9 - 9
build/user/certify.js


Datei-Diff unterdrückt, da er zu groß ist
+ 2 - 2
build/user/groupCertify.js


+ 152 - 110
js/component/account/set/hrSituation.jsx

@@ -75,117 +75,160 @@ const PersonFrom = Form.create()(React.createClass({
         };
         const FormItem = Form.Item;
         return (
-            <Form onSubmit={this.handleSubmit} className="hrSituation-form clearfix">
+            <Form onSubmit={this.handleSubmit} className="hrSituation-form">
                 <p className="hrSituation-title">总体情况</p>
-                <span className="hrSituation-span">总数(人)</span>
-                <FormItem className="half-item"
-                    {...formItemLayout}
-                    label="企业职工"
-                >
-                    {getFieldDecorator('firmTotal', {
-                        initialValue: this.state.nickname || null
-                    })(
-                        <InputNumber />
-                        )}
-                </FormItem>
-                <FormItem className="half-item"
-                style={{marginRight:"50%"}}
-                    {...formItemLayout}
-                    label="科技人员"
-                >
-                    {getFieldDecorator('techTotal', {
-                        initialValue: this.state.nickname || null
-                    })(
-                        <InputNumber />
-                        )}
-                </FormItem>
-                <span className="hrSituation-span">在职人员(人)</span>
-                <FormItem className="half-item"
-                    {...formItemLayout}
-                    label="企业职工"
-                >
-                    {getFieldDecorator('firmInService', {
-                        initialValue: this.state.nickname || null
-                    })(
-                        <InputNumber />
-                        )}
-                </FormItem>
-                <FormItem className="half-item"
-                    {...formItemLayout}
-                    label="科技人员"
-                >
-                    {getFieldDecorator('techInService', {
-                        initialValue: this.state.nickname || null
-                    })(
-                        <InputNumber />
-                        )}
-                </FormItem>
-                <span className="hrSituation-span">兼职人员(人)</span>
-                <FormItem className="half-item"
-                    {...formItemLayout}
-                    label="企业职工"
-                >
-                    {getFieldDecorator('firmPartTime', {
-                        initialValue: this.state.nickname || null
-                    })(
-                        <InputNumber />
-                        )}
-                </FormItem>
-                <FormItem className="half-item"
-                    {...formItemLayout}
-                    label="科技人员"
-                >
-                    {getFieldDecorator('techPartTime', {
-                        initialValue: this.state.nickname || null
-                    })(
-                        <InputNumber />
-                        )}
-                </FormItem>
-                <span className="hrSituation-span">临时聘用人员(人)</span>
-                <FormItem className="half-item"
-                    {...formItemLayout}
-                    label="企业职工"
-                >
-                    {getFieldDecorator('firmPartTime', {
-                        initialValue: this.state.nickname || null
-                    })(
-                        <InputNumber />
-                        )}
-                </FormItem>
-                <FormItem className="half-item"
-                    {...formItemLayout}
-                    label="科技人员"
-                >
-                    {getFieldDecorator('techPartTime', {
-                        initialValue: this.state.nickname || null
-                    })(
-                        <InputNumber />
-                        )}
-                </FormItem>
-                <span className="hrSituation-span">外籍人员(人)</span>
-                <FormItem className="half-item"
-                    {...formItemLayout}
-                    label="企业职工"
-                >
-                    {getFieldDecorator('firmForeign', {
-                        initialValue: this.state.nickname || null
-                    })(
-                        <InputNumber />
-                        )}
-                </FormItem>
-                <FormItem className="half-item"
-                    {...formItemLayout}
-                    label="科技人员"
-                >
-                    {getFieldDecorator('techForeign', {
-                        initialValue: this.state.nickname || null
-                    })(
-                        <InputNumber />
-                        )}
-                </FormItem>
-                <div className="clearfix" style={{ paddingLeft: '3.3%' }}>
-                    <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
+                <div className="clearfix">
+                    <span className="hrSituation-span">总数(人)</span>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="企业职工"
+                    >
+                        {getFieldDecorator('firmTotal', {
+                            initialValue: this.state.nickname || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        style={{ marginRight: "50%" }}
+                        {...formItemLayout}
+                        label="科技人员"
+                    >
+                        {getFieldDecorator('techTotal', {
+                            initialValue: this.state.nickname || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <span className="hrSituation-span">在职人员(人)</span>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="企业职工"
+                    >
+                        {getFieldDecorator('firmInService', {
+                            initialValue: this.state.nickname || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="科技人员"
+                    >
+                        {getFieldDecorator('techInService', {
+                            initialValue: this.state.nickname || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <span className="hrSituation-span">兼职人员(人)</span>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="企业职工"
+                    >
+                        {getFieldDecorator('firmPartTime', {
+                            initialValue: this.state.nickname || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="科技人员"
+                    >
+                        {getFieldDecorator('techPartTime', {
+                            initialValue: this.state.nickname || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <span className="hrSituation-span">临时聘用人员(人)</span>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="企业职工"
+                    >
+                        {getFieldDecorator('firmPartTime', {
+                            initialValue: this.state.nickname || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="科技人员"
+                    >
+                        {getFieldDecorator('techPartTime', {
+                            initialValue: this.state.nickname || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <span className="hrSituation-span">外籍人员(人)</span>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="企业职工"
+                    >
+                        {getFieldDecorator('firmForeign', {
+                            initialValue: this.state.nickname || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="科技人员"
+                    >
+                        {getFieldDecorator('techForeign', {
+                            initialValue: this.state.nickname || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <span className="hrSituation-span">留学归国人员(人)</span>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="企业职工"
+                    >
+                        {getFieldDecorator('firmAbroad', {
+                            initialValue: this.state.nickname || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="科技人员"
+                    >
+                        {getFieldDecorator('techAbroad', {
+                            initialValue: this.state.nickname || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <span className="hrSituation-span">干人计划人员(人)</span>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="企业职工"
+                    >
+                        {getFieldDecorator('firmCore', {
+                            initialValue: this.state.nickname || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="科技人员"
+                    >
+                        {getFieldDecorator('techCore', {
+                            initialValue: this.state.nickname || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
                 </div>
+                <p className="hrSituation-title">全体人员结构</p>
+                <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
             </Form >
         );
     },
@@ -207,7 +250,6 @@ const Person = React.createClass({
             <Spin spinning={this.state.loading} className='spin-box'>
                 <div className="set-person">
                     <div className="acc-detail">
-                        <p className="acc-title">人力状况</p>
                         <PersonFrom spinState={this.spinChange} />
                     </div>
                 </div>

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

@@ -10,7 +10,7 @@
         width: 19%;
     }
     .hrSituation-title {
-        font-size: 14px;
+        font-size: 16px;
     }
     .hrSituation-span {
         float: left;

+ 8 - 3
js/component/certify/audit.jsx

@@ -46,11 +46,16 @@ const Content = Form.create()(React.createClass({
                         bankCardNumber: data.data.bankCardNumber,
                         auditStatus: data.data.auditStatus
                     });
-                } else {
-                    message.warning(data.error[0].message);
                 };
             }.bind(this),
-        });
+        }).done(function (data) {
+            if (data.error.length) {
+                message.warning(data.error[0].message);
+            };
+            this.setState({
+                loading:false
+            });
+        }.bind(this));
     },
     render() {
         const FormItem = Form.Item;

+ 5 - 3
js/component/certify/bank.jsx

@@ -22,11 +22,13 @@ const Content = Form.create()(React.createClass({
                         bankAccount: data.data.bankAccount,
                         bankCardNumber: data.data.bankCardNumber
                     })
-                } else {
-                    message.warning(data.error[0].message);
                 };
             }.bind(this),
-        }).always(function () {
+        }).done(function (data) {
+            if (data.error.length) {
+                message.warning(data.error[0].message);
+            }
+        }.bind(this)).always(function () {
             this.setState({
                 loading: false
             });

+ 6 - 7
js/component/certify/confirm.jsx

@@ -26,14 +26,13 @@ const Content = Form.create()(React.createClass({
                         positiveIdUrl: data.data.positiveIdUrl,
                         oppositeIdUrl: data.data.oppositeIdUrl
                     });
-                } else {
-                    message.warning(data.error[0].message);
-                    this.setState({
-                        loading: false
-                    });
-                }
+                };
             }.bind(this),
-        }).always(function () {
+        }).done(function (data) {
+            if (data.error.length) {
+                message.warning(data.error[0].message);
+            }
+        }.bind(this)).always(function () {
             this.setState({
                 loading: false
             });

+ 8 - 4
js/component/certify/content.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon,message } from 'antd';
+import { Icon, message } from 'antd';
 import './certify.less';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
@@ -88,14 +88,18 @@ const Content = React.createClass({
             dataType: "json",
             url: globalConfig.context + "/api/user/userPro",
             success: function (data) {
-                if (data.data) {
+                if (data.data && data.data.process) {
                     this.state.stepNum = data.data.process + 1
                 } else {
-                    message.warning(data.error[0].message);
+                    this.state.stepNum = 1
                 };
                 this.stepNumSwith(this.state.stepNum);
             }.bind(this),
-        });
+        }).done(function (data) {
+            if (data.error.length) {
+                message.warning(data.error[0].message);
+            }
+        }.bind(this));
     },
     getInitialState() {
         return {

+ 5 - 3
js/component/certify/money.jsx

@@ -21,11 +21,13 @@ const Content = Form.create()(React.createClass({
                         bankCardNumber: data.data.bankCardNumber,
                         auditStatus: data.data.auditStatus
                     });
-                } else {
-                    message.warning(data.error[0].message);
                 };
             }.bind(this),
-        }).always(function () {
+        }).done(function (data) {
+            if (data.error.length) {
+                message.warning(data.error[0].message);
+            }
+        }.bind(this)).always(function () {
             this.setState({
                 loading: false
             });

+ 5 - 3
js/component/certify/personal.jsx

@@ -67,11 +67,13 @@ const Content = Form.create()(React.createClass({
                         idNumber: data.data.idNumber,
                         contactMobile: data.data.contactMobile
                     });
-                } else {
-                    message.warning(data.error[0].message);
                 };
             }.bind(this),
-        }).always(function () {
+        }).done(function (data) {
+            if (data.error.length) {
+                message.warning(data.error[0].message);
+            }
+        }.bind(this)).always(function () {
             this.setState({
                 loading: false
             });

+ 8 - 6
js/component/certify/result.jsx

@@ -41,14 +41,16 @@ const Content = Form.create()(React.createClass({
                     this.setState({
                         auditStatus: data.data.auditStatus
                     });
-                } else {
-                    message.warning(data.error[0].message);
-                    this.setState({
-                        loading: false
-                    });
                 };
             }.bind(this),
-        });
+        }).done(function (data) {
+            if (data.error.length) {
+                message.warning(data.error[0].message);
+            };
+            this.setState({
+                loading:false
+            });
+        }.bind(this));
     },
     render() {
         const _me = this;

+ 8 - 6
js/component/groupCertify/audit.jsx

@@ -47,14 +47,16 @@ const Content = Form.create()(React.createClass({
                         bankCardNumber : data.data.bankCardNumber,
                         auditStatus : data.data.auditStatus
                     });
-                } else {
-                    message.warning(data.error[0].message);
-                    this.setState({
-                            loading: false
-                        });
                 };
             }.bind(this),
-        });
+        }).done(function (data) {
+            if (data.error.length) {
+                message.warning(data.error[0].message);
+            };
+            this.setState({
+                loading:false
+            });
+        }.bind(this));
     },
     render() {
         const FormItem = Form.Item;

+ 5 - 3
js/component/groupCertify/bank.jsx

@@ -26,11 +26,13 @@ const Content = Form.create()(React.createClass({
                         bankBranch: data.data.bankBranch,
                         bankCardNumber: data.data.bankCardNumber,
                     });
-                } else {
-                    message.warning(data.error[0].message);
                 };
             }.bind(this),
-        }).always(function () {
+        }).done(function (data) {
+            if (data.error.length) {
+                message.warning(data.error[0].message);
+            }
+        }.bind(this)).always(function () {
             this.setState({
                 loading: false
             });

+ 5 - 3
js/component/groupCertify/confirm.jsx

@@ -31,11 +31,13 @@ const Content = Form.create()(React.createClass({
                         legalPerson: data.data.legalPerson,
                         legalPersonIdCard: data.data.legalPersonIdCard,
                     });
-                } else {
-                    message.warning(data.error[0].message);
                 };
             }.bind(this),
-        }).always(function () {
+        }).done(function (data) {
+            if (data.error.length) {
+                message.warning(data.error[0].message);
+            }
+        }.bind(this)).always(function () {
             this.setState({
                 loading: false
             });

+ 10 - 6
js/component/groupCertify/content.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon,message } from 'antd';
+import { Icon, message } from 'antd';
 import './certify.less';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
@@ -88,14 +88,18 @@ const Content = React.createClass({
             dataType: "json",
             url: globalConfig.context + "/api/user/orgProcess",
             success: function (data) {
-                if (data.data) {
-                    this.state.stepNum = data.data.process + 1;
-                    this.stepNumSwith(this.state.stepNum);
+                if (data.data && data.data.process) {
+                    this.state.stepNum = data.data.process + 1
                 } else {
-                    message.warning(data.error[0].message);
+                    this.state.stepNum = 1
                 };
+                this.stepNumSwith(this.state.stepNum);
             }.bind(this),
-        });
+        }).done(function (data) {
+            if (data.error.length) {
+                message.warning(data.error[0].message);
+            }
+        }.bind(this));
     },
     getInitialState() {
         return {

+ 5 - 3
js/component/groupCertify/money.jsx

@@ -21,11 +21,13 @@ const Content = Form.create()(React.createClass({
                         bankBranch:data.data.bankBranch,
                         bankCardNumber: data.data.bankCardNumber
                     });
-                } else {
-                    message.warning(data.error[0].message);
                 };
             }.bind(this),
-        }).always(function () {
+        }).done(function (data) {
+            if (data.error.length) {
+                message.warning(data.error[0].message);
+            }
+        }.bind(this)).always(function () {
             this.setState({
                 loading: false
             });

+ 5 - 3
js/component/groupCertify/personal.jsx

@@ -96,11 +96,13 @@ const Content = Form.create()(React.createClass({
                         orgCodeUrl: data.data.orgCodeUrl,
                         lastYearTaxReportUrl: data.data.lastYearTaxReportUrl
                     });
-                } else {
-                    message.warning(data.error[0].message);
                 };
             }.bind(this),
-        }).always(function () {
+        }).done(function (data) {
+            if (data.error.length) {
+                message.warning(data.error[0].message);
+            }
+        }.bind(this)).always(function () {
             this.setState({
                 loading: false
             });

+ 8 - 6
js/component/groupCertify/result.jsx

@@ -45,14 +45,16 @@ const Content = Form.create()(React.createClass({
                     this.setState({
                         auditStatus: data.data.auditStatus
                     });
-                } else {
-                    message.warning(data.error[0].message);
-                    this.setState({
-                        loading: false
-                    });
                 };
             }.bind(this),
-        });
+        }).done(function (data) {
+            if (data.error.length) {
+                message.warning(data.error[0].message);
+            };
+            this.setState({
+                loading:false
+            });
+        }.bind(this));
     },
     render() {
         const _me = this;