diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js index b0efbcef..c37aaf11 100644 --- a/pc4mobx/hrmSalary/apis/calculate.js +++ b/pc4mobx/hrmSalary/apis/calculate.js @@ -250,3 +250,7 @@ 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); +}; diff --git a/pc4mobx/hrmSalary/pages/calculate/calculate.js b/pc4mobx/hrmSalary/pages/calculate/calculate.js index 72f348fe..7f9f791d 100644 --- a/pc4mobx/hrmSalary/pages/calculate/calculate.js +++ b/pc4mobx/hrmSalary/pages/calculate/calculate.js @@ -28,7 +28,7 @@ class Calculate extends Component { name: "", dateRange: [ moment(new Date()).startOf("year").format("YYYY-MM"), - moment(new Date()).startOf("month").format("YYYY-MM") + moment(new Date()).endOf("year").format("YYYY-MM") ] }, isRefresh: false, progressModule: { visible: false, progress: 0, title: getLabel(111, "正在归档中请稍后") }, diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/sxwzSalaryItemsSettingDialog/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/sxwzSalaryItemsSettingDialog/index.js new file mode 100644 index 00000000..b6e64434 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/sxwzSalaryItemsSettingDialog/index.js @@ -0,0 +1,89 @@ +/* + * 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 ( + {getLabel(826, "确定")}, + {getLabel(31129, "取消")} + ]} + style={{ width: 784, height: 472 }} + > + + + this.setState({ selectedKeys: keys })} + filterLeft={this.filterLeft} filterRight={this.filterRight} + leftHeader={ { + this.setState({ inputLeftValue: v }); + }}/>} + rightHeader={ { + this.setState({ inputRightValue: v }); + }}/>} + /> + + + + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/sxwzSalaryItemsSettingDialog/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/sxwzSalaryItemsSettingDialog/index.less new file mode 100644 index 00000000..e3fc642a --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/sxwzSalaryItemsSettingDialog/index.less @@ -0,0 +1,11 @@ +.sxwzSalaryItemDialog { + .wea-transfer-list-header { + display: flex; + align-items: center; + padding: 10px 5px; + + .wea-input-focus { + width: 100%; + } + } +} diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js index d8a8d78e..8fd9565c 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js @@ -16,6 +16,7 @@ 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"; @@ -30,8 +31,8 @@ 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; this.timer = null; @@ -148,6 +149,9 @@ class Index extends Component { ); reqBtns = [ + //陕西万众需求 + this.setState({ sxwzVisible: true })}>{getLabel(538012, "工资单发放")}, this.doCacl("ALL")} overlay={menu} type="primary"> {getLabel(543545, "核算所有人")} , @@ -194,7 +198,7 @@ class Index extends Component { { key: "calc", title: getLabel(538011, "薪资核算") } ]; const { calculateStore: { setOtherConditions } } = this.props; - const { selectedKey, progressVisible, progress, customExpDialog, salaryImpDialog } = this.state; + const { selectedKey, progressVisible, progress, customExpDialog, salaryImpDialog, sxwzVisible } = this.state; return ( @@ -233,6 +237,10 @@ class Index extends Component { }, () => isFresh && this.calc.onAdSearch(false)); }} /> + {/*陕西万众-薪资项目配置*/} + this.setState({ sxwzVisible: false })} + />