bug
This commit is contained in:
parent
5df78a31d8
commit
6adf1a83fa
|
|
@ -398,8 +398,8 @@ export const importAcctResult = (params) => {
|
|||
|
||||
|
||||
// 核算结果-导出全部
|
||||
export const exportAcctResult = (salaryAcctRecordId) => {
|
||||
fetch('/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=' + salaryAcctRecordId ).then(res => res.blob().then(blob => {
|
||||
export const exportAcctResult = (salaryAcctRecordId, ids) => {
|
||||
fetch('/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=' + salaryAcctRecordId +"&ids=" + ids ).then(res => res.blob().then(blob => {
|
||||
var filename=`薪资核算.xlsx`
|
||||
var a = document.createElement('a');
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ export default class CompareDetail extends React.Component {
|
|||
|
||||
getColumns(columns) {
|
||||
let newColumns = [...columns]
|
||||
newColumns = newColumns.filter(item => item.hide == "false")
|
||||
newColumns.map(item => {
|
||||
let n = Number(item.dataIndex)
|
||||
if (!isNaN(n)) { // 数字
|
||||
|
|
@ -151,7 +150,7 @@ export default class CompareDetail extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { calculateStore: {comparisonResultPageInfo, comparisonResultTableStore, loading}} = this.props;
|
||||
const { calculateStore: {comparisonResultPageInfo, comparisonResultTableStore, loading, comparisonResultColumns}} = this.props;
|
||||
const { importModalVisible, searchValue } = this.state;
|
||||
const renderRightOperation = () => {
|
||||
return (
|
||||
|
|
@ -202,7 +201,8 @@ export default class CompareDetail extends React.Component {
|
|||
<CustomTable
|
||||
loading={loading}
|
||||
dataSource={comparisonResultPageInfo.list ? comparisonResultPageInfo.list : []}
|
||||
columns={this.getColumns(comparisonResultTableStore.columns ? comparisonResultTableStore.columns : [])}
|
||||
columns={this.getColumns(comparisonResultColumns ? comparisonResultColumns : [])}
|
||||
scroll={{x: this.getColumns(comparisonResultColumns ? comparisonResultColumns : []).length * 150}}
|
||||
pagination={{
|
||||
onChange: (value) => {this.handleDataPageChange(value)},
|
||||
total: comparisonResultPageInfo.total,
|
||||
|
|
|
|||
|
|
@ -81,6 +81,8 @@
|
|||
|
||||
.placeOnFileDetail {
|
||||
padding: 20px;
|
||||
height: 100%;
|
||||
overflow-y: scroll;
|
||||
.tabWrapper {
|
||||
height: 47px;
|
||||
line-height: 47px;
|
||||
|
|
@ -119,6 +121,8 @@
|
|||
}
|
||||
|
||||
.compareDetail {
|
||||
overflow-y: scroll;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
.titleBarWrapper {
|
||||
height: 47px;
|
||||
|
|
|
|||
|
|
@ -22,11 +22,14 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
})
|
||||
this.state = {
|
||||
slideVisiable: false,
|
||||
selectedRowKeys: []
|
||||
}
|
||||
this.id = "";
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
let id = getQueryString("id");
|
||||
this.id = id;
|
||||
const { calculateStore: { getSalarySobCycle, acctResultList } } = this.props;
|
||||
getSalarySobCycle(id)
|
||||
acctResultList(id)
|
||||
|
|
@ -71,13 +74,40 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
acctResultList(this.id, this.props.employeeName, value)
|
||||
}
|
||||
|
||||
handleMenuClick() {
|
||||
const {calculateStore: {exportAll}} = this.props;
|
||||
const { selectedRowKeys } = this.state;
|
||||
if(selectedRowKeys.length == 0) {
|
||||
message.warning("未选择条目")
|
||||
return
|
||||
}
|
||||
exportAll(this.id, selectedRowKeys.join(","))
|
||||
}
|
||||
|
||||
handleExportAll() {
|
||||
const {calculateStore: {exportAll}} = this.props;
|
||||
exportAll(this.id)
|
||||
}
|
||||
|
||||
onSelectChange = selectedRowKeys => {
|
||||
this.setState({ selectedRowKeys });
|
||||
}
|
||||
|
||||
|
||||
|
||||
render() {
|
||||
|
||||
const { calculateStore } = this.props;
|
||||
const { baseSalarySobCycle, acctResultListDateSource, acctResultListColumns, acctResultListPageInfo } = calculateStore
|
||||
const { selectedRowKeys } = this.state;
|
||||
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: this.onSelectChange,
|
||||
};
|
||||
|
||||
const menu = (
|
||||
<Menu>
|
||||
<Menu onClick={(e) => this.handleMenuClick(e)}>
|
||||
<Menu.Item key="3">导出所选</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
|
|
@ -85,7 +115,7 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
const renderRightOperation = () => {
|
||||
return (
|
||||
<div style={{display: "inline-block"}}>
|
||||
<Dropdown.Button type="primary" style={{marginRight: "10px"}} overlay={menu}>导出全部</Dropdown.Button>
|
||||
<Dropdown.Button type="primary" style={{marginRight: "10px"}} onClick={() => {this.handleExportAll()}} overlay={menu}>导出全部</Dropdown.Button>
|
||||
<WeaInputSearch />
|
||||
</div>
|
||||
)
|
||||
|
|
@ -118,8 +148,9 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
</div>
|
||||
<div className="tableWrapper">
|
||||
<WeaTable columns={this.getColumns()}
|
||||
scroll={{x: this.getColumns().length * 100}}
|
||||
scroll={{x: this.getColumns().length * 150}}
|
||||
dataSource={acctResultListDateSource}
|
||||
rowSelection={rowSelection}
|
||||
pagination={{
|
||||
onChange: (value) => {this.handleDataPageChange(value)},
|
||||
total: acctResultListPageInfo.total,
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ export default class SalaryDetail extends React.Component {
|
|||
{
|
||||
slideVisiable && <WeaSlideModal visible={slideVisiable}
|
||||
top={0}
|
||||
width={40}
|
||||
width={60}
|
||||
height={100}
|
||||
direction={'right'}
|
||||
measure={'%'}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ export default class UserSure extends React.Component {
|
|||
const { calculateStore: { deleteAcctemployee, reducedemployeeList, acctemployeeList } } = this.props;
|
||||
if(selectedRowKeys.length == 0) {
|
||||
message.warning("未选择条目")
|
||||
return
|
||||
}
|
||||
Modal.confirm({
|
||||
title: '信息确认',
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ export default class Ledger extends React.Component {
|
|||
break;
|
||||
case "3": // 关联人员
|
||||
this.handleItemClick(record, 1)
|
||||
break;
|
||||
case "4": // 删除
|
||||
Modal.confirm({
|
||||
title: '信息确认',
|
||||
|
|
|
|||
|
|
@ -412,7 +412,7 @@ export default class Programme extends React.Component {
|
|||
measure={'%'}
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle="新增社保方案"
|
||||
subtitle={this.state.customEdit ? "修改社保方案": "新增社保方案"}
|
||||
subTabs={[{title: "基础设置"}]}
|
||||
onSave={() => {
|
||||
handleOnSave();
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ export class calculateStore {
|
|||
@observable comparisonPreviewColumns = []; // 线下对比预览列表
|
||||
@observable comparisonPreviewDataSource = []; // 线下对比列表数据
|
||||
@observable comparisonImportAcctResult = {}; // 导入结果
|
||||
@observable comparisonResultColumns = []; // 表头
|
||||
|
||||
// ** 核算进度 **
|
||||
@observable calculateProgress = 0;
|
||||
|
|
@ -295,7 +296,12 @@ export class calculateStore {
|
|||
API.acctResultList({salaryAcctRecordId, employeeName, current}).then(res => {
|
||||
if(res.status) {
|
||||
// this.acctResultListTableStore.getDatas(res.data.dataKey.datas)
|
||||
this.acctResultListDateSource = res.data.pageInfo.list ? res.data.pageInfo.list: [];
|
||||
|
||||
let list = res.data.pageInfo.list ? res.data.pageInfo.list: [];
|
||||
list.map(item => {
|
||||
item.key = item.id
|
||||
})
|
||||
this.acctResultListDateSource = list;
|
||||
this.acctResultListPageInfo = res.data.pageInfo
|
||||
this.acctResultListColumns = res.data.columns;
|
||||
} else {
|
||||
|
|
@ -512,8 +518,8 @@ export class calculateStore {
|
|||
|
||||
// 核算结果-导出全部
|
||||
@action
|
||||
exportAll = (salaryAcctRecordId) => {
|
||||
API.exportAcctResult(salaryAcctRecordId)
|
||||
exportAll = (salaryAcctRecordId, ids = "") => {
|
||||
API.exportAcctResult(salaryAcctRecordId, ids)
|
||||
}
|
||||
|
||||
// 线下对比-列表
|
||||
|
|
@ -522,8 +528,9 @@ export class calculateStore {
|
|||
this.loading = true
|
||||
API.comparisonResultList(params).then(res => {
|
||||
if(res.status) {
|
||||
this.comparisonResultPageInfo = res.data.pageInfo
|
||||
this.comparisonResultTableStore.getDatas(res.data.dataKey.datas)
|
||||
this.comparisonResultPageInfo = res.data
|
||||
this.comparisonResultColumns = res.data.columns
|
||||
// this.comparisonResultTableStore.getDatas(res.data.dataKey.datas)
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ export class CumSituationStore {
|
|||
|
||||
// 查询明细
|
||||
@action getCumDeductDetailList = (id, param = {}) => {
|
||||
let requestParams = {"accumulatedSituationId": id};
|
||||
requestParams = {...requestParams, ...param}
|
||||
API.getCumSituationDetailList(requestParams).then(res => {
|
||||
if(res.status) {
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ export class OtherDeductStore {
|
|||
|
||||
// 查询明细
|
||||
@action getOtherDeductDetailList = (id, param = {}) => {
|
||||
let requestParams = {"otherTaxExemptDeductionId": id};
|
||||
requestParams = {...requestParams, ...param}
|
||||
API.getOtherDeductDetailList(requestParams).then(res => {
|
||||
if(res.status) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue