custom/陕西万众-薪资账套薪资核算配置

This commit is contained in:
黎永顺 2024-01-03 11:26:44 +08:00
parent 18b7140f4b
commit 6a8a9f95ed
4 changed files with 0 additions and 113 deletions

View File

@ -250,7 +250,3 @@ export const customCacheExportField = (params) => {
export const salaryacctBatchUpdate = (params) => {
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/batchUpdate", params);
};
//陕西万众-工资单发放薪资项目配置
export const getSalaryItemList = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/acctresult/getSalaryItemList", "GET", params);
};

View File

@ -1,89 +0,0 @@
/*
* Author: 黎永顺
* name: 陕西万众-工资单发放薪资项目设置
* Description:
* Date: 2024/1/2
*/
import React, { Component } from "react";
import { WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaTransfer } from "ecCom";
import { Button, Spin } from "antd";
import { getSalaryItemList } from "../../../../../apis/calculate";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
constructor(props) {
super(props);
this.state = {
loading: false, selectedKeys: [], dataSource: [],
inputRightValue: "", inputLeftValue: ""
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getSalaryItemList(nextProps);
}
getSalaryItemList = (props) => {
const { routeParams: { salaryAcctRecordId } } = props;
this.setState({ loading: true });
getSalaryItemList({ salaryAcctRecordId }).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
this.setState({
dataSource: data,
selectedKeys: _.map(_.filter(data, o => o.default === 1), g => g.id)
});
}
}).catch(() => this.setState({ loading: false }));
};
filterLeft = (items) => {
const { inputLeftValue } = this.state;
if (inputLeftValue) {
items = items.filter((item) => item.name.indexOf(inputLeftValue) > -1);
}
return items;
};
filterRight = (items) => {
const { inputRightValue } = this.state;
if (inputRightValue) {
items = items.filter((item) => item.name.indexOf(inputRightValue) > -1);
}
return items;
};
render() {
const { loading, selectedKeys, inputLeftValue, inputRightValue, dataSource } = this.state;
return (
<WeaDialog
{...this.props} title={getLabel(111, "选择薪资项目")}
hasScroll className="sxwzSalaryItemDialog" initLoadCss
buttons={[
<Button type="primary">{getLabel(826, "确定")}</Button>,
<Button type="ghost">{getLabel(31129, "取消")}</Button>
]}
style={{ width: 784, height: 472 }}
>
<Spin spinning={loading}>
<div style={{ padding: 10 }}>
<WeaTransfer
data={dataSource} selectedKeys={selectedKeys}
onChange={keys => this.setState({ selectedKeys: keys })}
filterLeft={this.filterLeft} filterRight={this.filterRight}
leftHeader={<WeaInputSearch value={inputLeftValue} onChange={(v) => {
this.setState({ inputLeftValue: v });
}}/>}
rightHeader={<WeaInputSearch value={inputRightValue} onChange={(v) => {
this.setState({ inputRightValue: v });
}}/>}
/>
</div>
</Spin>
</WeaDialog>
);
}
}
export default Index;

View File

@ -1,11 +0,0 @@
.sxwzSalaryItemDialog {
.wea-transfer-list-header {
display: flex;
align-items: center;
padding: 10px 5px;
.wea-input-focus {
width: 100%;
}
}
}

View File

@ -16,7 +16,6 @@ import SalaryEditCalc from "./components/salaryEditCalc";
import ProgressModal from "../../../components/progressModal";
import CustomCalcExportDialog from "./components/customCalcExportDialog";
import SalaryEditCalcImport from "./components/salaryEditCalcImport";
import SxwzSalaryItemsSettingDialog from "./components/sxwzSalaryItemsSettingDialog";
import { convertToUrlString } from "../../../util/url";
import "./index.less";
@ -31,7 +30,6 @@ class Index extends Component {
selectedKey: "person", progressVisible: false, progress: 0,
customExpDialog: { visible: false, salaryAcctRecordId: "", checkItems: [], itemsByGroup: [] },
salaryImpDialog: { visible: false, title: "", salaryAcctRecordId: "" },
sxwzVisible: false,//陕西万众-工资单薪资项目配置
accountExceptInfo: "" //核算报错信息,
};
this.calc = null;
@ -149,9 +147,6 @@ class Index extends Component {
</Menu>
);
reqBtns = [
//陕西万众需求
<Button type="ghost"
onClick={() => this.setState({ sxwzVisible: true })}>{getLabel(538012, "工资单发放")}</Button>,
<Dropdown.Button onClick={() => this.doCacl("ALL")} overlay={menu} type="primary">
{getLabel(543545, "核算所有人")}
</Dropdown.Button>,
@ -237,10 +232,6 @@ class Index extends Component {
}, () => isFresh && this.calc.onAdSearch(false));
}}
/>
{/*陕西万众-薪资项目配置*/}
<SxwzSalaryItemsSettingDialog visible={sxwzVisible} {...this.props}
onCancel={() => this.setState({ sxwzVisible: false })}
/>
</WeaReqTop>
</div>
</Layout>