|
@@ -567,6 +567,58 @@ const PersonnelAll = React.createClass({
|
|
this.loadData();
|
|
this.loadData();
|
|
this.departmentList();
|
|
this.departmentList();
|
|
},
|
|
},
|
|
|
|
+ export() {
|
|
|
|
+ const data = {
|
|
|
|
+ pageSize: 9999,
|
|
|
|
+ name: this.state.nameSearch ? this.state.nameSearch : undefined,
|
|
|
|
+ status: this.state.statusSearch ? this.state.statusSearch : undefined,
|
|
|
|
+ company: this.state.departmenttList
|
|
|
|
+ ? this.state.departmenttList
|
|
|
|
+ : undefined,
|
|
|
|
+ sex: this.state.sexSearch ? this.state.sexSearch : undefined,
|
|
|
|
+ marriage: this.state.marriageSearch
|
|
|
|
+ ? this.state.marriageSearch
|
|
|
|
+ : undefined,
|
|
|
|
+ politicalOutlook: this.state.politicalOutlookSearch
|
|
|
|
+ ? this.state.politicalOutlookSearch
|
|
|
|
+ : undefined,
|
|
|
|
+ birthdayMonth: this.state.birthdayMonthSearch
|
|
|
|
+ ? this.state.birthdayMonthSearch
|
|
|
|
+ : undefined,
|
|
|
|
+ promotionStart: this.state.promotionTime[0]
|
|
|
|
+ ? this.state.promotionTime[0]
|
|
|
|
+ : undefined,
|
|
|
|
+ promotionEnd: this.state.promotionTime[1]
|
|
|
|
+ ? this.state.promotionTime[1]
|
|
|
|
+ : undefined,
|
|
|
|
+ entryStart: this.state.entryTime[0] ? this.state.entryTime[0] : undefined,
|
|
|
|
+ entryStart: this.state.entryTime[1] ? this.state.entryTime[1] : undefined,
|
|
|
|
+ quitStart: this.state.quitTime[0] ? this.state.quitTime[0] : undefined,
|
|
|
|
+ quitEnd: this.state.quitTime[1] ? this.state.quitTime[1] : undefined,
|
|
|
|
+ system: this.state.systemSearch ? this.state.systemSearch : undefined,
|
|
|
|
+ workingYears: this.state.workingYearsSearch
|
|
|
|
+ ? this.state.workingYearsSearch
|
|
|
|
+ : undefined,
|
|
|
|
+ education: this.state.educationSearch
|
|
|
|
+ ? this.state.educationSearch
|
|
|
|
+ : undefined,
|
|
|
|
+ contractStart: this.state.contractTime[0]
|
|
|
|
+ ? this.state.contractTime[0]
|
|
|
|
+ : undefined,
|
|
|
|
+ contractEnd: this.state.contractTime[1]
|
|
|
|
+ ? this.state.contractTime[1]
|
|
|
|
+ : undefined,
|
|
|
|
+ };
|
|
|
|
+ for(let key in data) {
|
|
|
|
+ if(!data.key) {
|
|
|
|
+ delete data[key]
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ window.location.href =
|
|
|
|
+ globalConfig.context +
|
|
|
|
+ "/api/admin/personnel/exportPersonnelList?" +
|
|
|
|
+ $.param(data);
|
|
|
|
+ },
|
|
departmentList() {
|
|
departmentList() {
|
|
$.ajax({
|
|
$.ajax({
|
|
method: "get",
|
|
method: "get",
|
|
@@ -763,6 +815,33 @@ const PersonnelAll = React.createClass({
|
|
marriage: undefined,
|
|
marriage: undefined,
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ verifyDoor() {
|
|
|
|
+ this.setState({
|
|
|
|
+ loading: true,
|
|
|
|
+ });
|
|
|
|
+ $.ajax({
|
|
|
|
+ method: "get",
|
|
|
|
+ dataType: "json",
|
|
|
|
+ crossDomain: false,
|
|
|
|
+ url: globalConfig.context + "/api/admin/personnel/checkDoorId",
|
|
|
|
+ data: {
|
|
|
|
+ doorId: this.state.doorId,
|
|
|
|
+ },
|
|
|
|
+ success: function (data) {
|
|
|
|
+ if (data.error && data.error.length) {
|
|
|
|
+ message.warning(data.error[0].message);
|
|
|
|
+ } else {
|
|
|
|
+ message.success("此编号未被占用");
|
|
|
|
+ }
|
|
|
|
+ }.bind(this),
|
|
|
|
+ }).always(
|
|
|
|
+ function () {
|
|
|
|
+ this.setState({
|
|
|
|
+ loading: false,
|
|
|
|
+ });
|
|
|
|
+ }.bind(this)
|
|
|
|
+ );
|
|
|
|
+ },
|
|
addOk() {
|
|
addOk() {
|
|
this.setState({
|
|
this.setState({
|
|
loading: true,
|
|
loading: true,
|
|
@@ -2039,19 +2118,10 @@ const PersonnelAll = React.createClass({
|
|
</Button>
|
|
</Button>
|
|
</TabPane>
|
|
</TabPane>
|
|
<TabPane tab="导出Excel" key="4">
|
|
<TabPane tab="导出Excel" key="4">
|
|
- <Button type="primary" style={{ margin: "11px 0px 10px 10px" }}>
|
|
|
|
|
|
+ <Button type="primary" onClick={this.export} style={{ margin: "11px 0px 10px 10px" }}>
|
|
导出当前列表
|
|
导出当前列表
|
|
</Button>
|
|
</Button>
|
|
</TabPane>
|
|
</TabPane>
|
|
- <TabPane tab="查看" key="5">
|
|
|
|
- <Button
|
|
|
|
- type="primary"
|
|
|
|
- style={{ margin: "11px 0px 10px 10px" }}
|
|
|
|
- onClick={() => {}}
|
|
|
|
- >
|
|
|
|
- 详情收款流水
|
|
|
|
- </Button>
|
|
|
|
- </TabPane>
|
|
|
|
</Tabs>
|
|
</Tabs>
|
|
<div className="patent-table" style={{ marginTop: 10 }}>
|
|
<div className="patent-table" style={{ marginTop: 10 }}>
|
|
<Spin spinning={this.state.loading}>
|
|
<Spin spinning={this.state.loading}>
|
|
@@ -2124,6 +2194,7 @@ const PersonnelAll = React.createClass({
|
|
});
|
|
});
|
|
}}
|
|
}}
|
|
/>
|
|
/>
|
|
|
|
+ <Button disabled={this.state.doorId ? false : true} style={{position: "absolute" }} type={"primary"} onClick={this.verifyDoor}>验证重复</Button>
|
|
</FormItem>
|
|
</FormItem>
|
|
</div>
|
|
</div>
|
|
<div className="clearfix">
|
|
<div className="clearfix">
|