This commit is contained in:
parent
709deef5a6
commit
f4ac00ddbd
|
|
@ -158,3 +158,15 @@ export const querySupplementaryForm = (params) => {
|
||||||
params
|
params
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 核算详情页核算
|
||||||
|
export const commonAccount = (params) => {
|
||||||
|
return fetch("/api/bs/hrmsalary/siaccount/commonAccount", {
|
||||||
|
method: "post",
|
||||||
|
mode: "cors",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
body: JSON.stringify(params),
|
||||||
|
}).then((res) => res.json());
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,7 @@ export default class StandingBook extends React.Component {
|
||||||
this.handleOperate({ key, billMonth })
|
this.handleOperate({ key, billMonth })
|
||||||
}>
|
}>
|
||||||
<Menu.Item key="archive">归档</Menu.Item>
|
<Menu.Item key="archive">归档</Menu.Item>
|
||||||
|
<Menu.Item key="detail">异常详情</Menu.Item>
|
||||||
<Menu.Item key="delete">删除</Menu.Item>
|
<Menu.Item key="delete">删除</Menu.Item>
|
||||||
{/* <Menu.Item key="operate">操作日志</Menu.Item> */}
|
{/* <Menu.Item key="operate">操作日志</Menu.Item> */}
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { Icon, Tooltip, Button, Spin } from "antd";
|
import { Icon, Tooltip, Button, Spin } from "antd";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaBrowser, WeaTable } from "ecCom";
|
import { WeaBrowser, WeaTable, WeaInputSearch } from "ecCom";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
@inject("standingBookStore")
|
@inject("standingBookStore")
|
||||||
|
|
@ -18,6 +18,7 @@ export default class AbnormalListIndex extends Component {
|
||||||
this.state = {
|
this.state = {
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
current: 1,
|
current: 1,
|
||||||
|
searchValue: "",
|
||||||
tableData: {
|
tableData: {
|
||||||
list: [],
|
list: [],
|
||||||
columns: [],
|
columns: [],
|
||||||
|
|
@ -43,6 +44,12 @@ export default class AbnormalListIndex extends Component {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleSearch(value) {
|
||||||
|
const { billMonth } = this.props;
|
||||||
|
const { current } = this.state;
|
||||||
|
this.getChangeList({ billMonth, current, userName: value });
|
||||||
|
}
|
||||||
render() {
|
render() {
|
||||||
const { remarks, billMonth, selectedKey } = this.props;
|
const { remarks, billMonth, selectedKey } = this.props;
|
||||||
const { selectedRowKeys } = this.state;
|
const { selectedRowKeys } = this.state;
|
||||||
|
|
@ -78,15 +85,7 @@ export default class AbnormalListIndex extends Component {
|
||||||
</div>
|
</div>
|
||||||
<div className="tabOption">
|
<div className="tabOption">
|
||||||
<Button>导出全部</Button>
|
<Button>导出全部</Button>
|
||||||
<WeaBrowser
|
<WeaInputSearch value={this.state.searchValue} onChange={(value) => {this.setState({searchValue: value})}} onSearch={(value) => {this.handleSearch(value)}}/>
|
||||||
type={17}
|
|
||||||
textDecoration={true}
|
|
||||||
inputStyle={{ width: 200 }}
|
|
||||||
onChange={(ids, names, datas) =>
|
|
||||||
console.log("多人力", ids, names, datas)
|
|
||||||
}
|
|
||||||
isSingle={false}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
{/* table */}
|
{/* table */}
|
||||||
<div style={{ padding: "0 16px" }}>
|
<div style={{ padding: "0 16px" }}>
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,17 @@
|
||||||
padding: 8px 20px;
|
padding: 8px 20px;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|
||||||
i,
|
i,button {
|
||||||
button {
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
// margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.anticon-search {
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-input-focus-btn {
|
||||||
|
margin-right: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -97,7 +97,7 @@ export default class NormalIndex extends Component {
|
||||||
billMonth,
|
billMonth,
|
||||||
billMonthList: billMonthList.split(","),
|
billMonthList: billMonthList.split(","),
|
||||||
includes: includes.split(","),
|
includes: includes.split(","),
|
||||||
excludes: excludes.split(","),
|
// excludes: excludes.split(","),
|
||||||
projects: projects.split(","),
|
projects: projects.split(","),
|
||||||
};
|
};
|
||||||
siaccountSupplementarySave(payload).then(() => {
|
siaccountSupplementarySave(payload).then(() => {
|
||||||
|
|
@ -261,6 +261,20 @@ export default class NormalIndex extends Component {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 核算按钮点击
|
||||||
|
handleCommonAccountClick() {
|
||||||
|
const { remarks, billMonth, selectedKey } = this.props;
|
||||||
|
const { commonAccount } =
|
||||||
|
this.props.standingBookStore;
|
||||||
|
commonAccount({
|
||||||
|
billMonth, includes: []
|
||||||
|
}).then(() => {
|
||||||
|
selectedKey === "1"
|
||||||
|
? this.getNormalList({ billMonth, current: this.state.current })
|
||||||
|
: this.getSupplementaryList({ billMonth, current: this.state.current });
|
||||||
|
})
|
||||||
|
}
|
||||||
render() {
|
render() {
|
||||||
const { remarks, billMonth, selectedKey } = this.props;
|
const { remarks, billMonth, selectedKey } = this.props;
|
||||||
const { selectedRowKeys, addProps, date } = this.state;
|
const { selectedRowKeys, addProps, date } = this.state;
|
||||||
|
|
@ -307,7 +321,7 @@ export default class NormalIndex extends Component {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="tabOption">
|
<div className="tabOption">
|
||||||
{/* <Tooltip title="批量删除">
|
<Tooltip title="批量删除">
|
||||||
<i
|
<i
|
||||||
className="icon-coms-Batch-delete"
|
className="icon-coms-Batch-delete"
|
||||||
onClick={this.handleBatchDelete}
|
onClick={this.handleBatchDelete}
|
||||||
|
|
@ -315,7 +329,7 @@ export default class NormalIndex extends Component {
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip title="添加该月正常缴纳人员">
|
<Tooltip title="添加该月正常缴纳人员">
|
||||||
<i className="icon-coms-Add-to" onClick={this.handleAdd} />
|
<i className="icon-coms-Add-to" onClick={this.handleAdd} />
|
||||||
</Tooltip> */}
|
</Tooltip>
|
||||||
{addProps.visible && (
|
{addProps.visible && (
|
||||||
<WeaDialog
|
<WeaDialog
|
||||||
{...addProps}
|
{...addProps}
|
||||||
|
|
@ -345,10 +359,10 @@ export default class NormalIndex extends Component {
|
||||||
<i className="icon-coms02-Import" />
|
<i className="icon-coms02-Import" />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
{/* <Tooltip title="导出全部">
|
<Tooltip title="导出全部">
|
||||||
<i className="icon-coms02-coms2-export" />
|
<i className="icon-coms02-coms2-export" />
|
||||||
</Tooltip> */}
|
</Tooltip>
|
||||||
{/* {selectedKey === "1" && <Button type="primary">核算</Button>} */}
|
{selectedKey === "1" && <Button type="primary" onClick={() => {this.handleCommonAccountClick()}}>核算</Button>}
|
||||||
|
|
||||||
<WeaInputSearch value={this.state.searchValue} onChange={(value) => {this.setState({searchValue: value})}} onSearch={(value) => {this.handleSearch(value)}}/>
|
<WeaInputSearch value={this.state.searchValue} onChange={(value) => {this.setState({searchValue: value})}} onSearch={(value) => {this.handleSearch(value)}}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,10 @@ class StandingBookDetail extends Component {
|
||||||
const billMonth = this.props.location.query.billMonth;
|
const billMonth = this.props.location.query.billMonth;
|
||||||
getTabList({ billMonth }).then(({ data }) => {
|
getTabList({ billMonth }).then(({ data }) => {
|
||||||
const { tabList, remarks, billMonth } = data;
|
const { tabList, remarks, billMonth } = data;
|
||||||
let newTabList = tabList.filter(item => item.id != "2" && item.id != "3")
|
// let newTabList = tabList.filter(item => item.id != "2" && item.id != "3")
|
||||||
this.setState({
|
this.setState({
|
||||||
selectedKey: newTabList[0].id,
|
selectedKey: tabList[0].id,
|
||||||
tabList: _.map(newTabList, it => ({ title: it.content, viewcondition: it.id })),
|
tabList: _.map(tabList, it => ({ title: it.content, viewcondition: it.id })),
|
||||||
remarks, billMonth
|
remarks, billMonth
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { observable, action, toJS } from "mobx";
|
import { observable, action, toJS } from "mobx";
|
||||||
import { message } from "antd";
|
import { message } from "antd";
|
||||||
import { WeaForm, WeaTableNew } from "comsMobx";
|
import { WeaForm, WeaTableNew } from "comsMobx";
|
||||||
|
import { removePropertyCondition } from "../util/response";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
|
||||||
import * as API from "../apis/standingBook"; // 引入API接口文件
|
import * as API from "../apis/standingBook"; // 引入API接口文件
|
||||||
|
|
@ -294,10 +295,11 @@ export class StandingBookStore {
|
||||||
action((res) => {
|
action((res) => {
|
||||||
if (res.status) {
|
if (res.status) {
|
||||||
// 接口请求成功/失败处理
|
// 接口请求成功/失败处理
|
||||||
this.condition = res.data.condition;
|
let condition = removePropertyCondition(res.data.condition)
|
||||||
this.form.initFormFields(res.data.condition); // 渲染高级搜索form表单
|
this.condition = condition;
|
||||||
|
this.form.initFormFields(condition); // 渲染高级搜索form表单
|
||||||
} else {
|
} else {
|
||||||
message.error(res.msg || "接口调用失败!");
|
message.error(res.errormsg || "接口调用失败!");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
@ -309,10 +311,11 @@ export class StandingBookStore {
|
||||||
action((res) => {
|
action((res) => {
|
||||||
if (res.status) {
|
if (res.status) {
|
||||||
// 接口请求成功/失败处理
|
// 接口请求成功/失败处理
|
||||||
this.condition = res.data.condition;
|
let condition = removePropertyCondition(res.data.condition)
|
||||||
this.form.initFormFields(res.data.condition); // 渲染高级搜索form表单
|
this.condition = condition;
|
||||||
|
this.form.initFormFields(condition); // 渲染高级搜索form表单
|
||||||
} else {
|
} else {
|
||||||
message.error(res.msg || "接口调用失败!");
|
message.error(res.errormsg || "接口调用失败!");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
@ -331,7 +334,7 @@ export class StandingBookStore {
|
||||||
this.tableStore.getDatas(res.datas); // table 请求数据
|
this.tableStore.getDatas(res.datas); // table 请求数据
|
||||||
this.hasRight = res.hasRight;
|
this.hasRight = res.hasRight;
|
||||||
} else {
|
} else {
|
||||||
message.error(res.msg || "接口调用失败!");
|
message.error(res.errormsg || "接口调用失败!");
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
})
|
})
|
||||||
|
|
@ -346,4 +349,19 @@ export class StandingBookStore {
|
||||||
this.getTableDatas();
|
this.getTableDatas();
|
||||||
this.showSearchAd = false;
|
this.showSearchAd = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@action
|
||||||
|
commonAccount = (params) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
API.commonAccount(params).then(res => {
|
||||||
|
if(res.status) {
|
||||||
|
resolve();
|
||||||
|
} else {
|
||||||
|
message.error(res.errormsg || "接口调用失败!")
|
||||||
|
reject();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,9 +89,7 @@ export const getCustomSearchs = (form, condition, col, isCenter) => {
|
||||||
export const getSearchs = (form, condition, col, isCenter) => {
|
export const getSearchs = (form, condition, col, isCenter) => {
|
||||||
const { isFormInit } = form;
|
const { isFormInit } = form;
|
||||||
const formParams = form.getFormParams();
|
const formParams = form.getFormParams();
|
||||||
console.log("formParams: ", formParams);
|
|
||||||
let group = [];
|
let group = [];
|
||||||
console.log("condition:", condition);
|
|
||||||
isFormInit && condition && condition.map(c =>{
|
isFormInit && condition && condition.map(c =>{
|
||||||
let items = [];
|
let items = [];
|
||||||
c.items.map(fields => {
|
c.items.map(fields => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue