- {
- !_.isEmpty(dataList) ?
- _.map(dataList, it => ( this.handleClickItem(it)}>{it.name})) :
-
-
- {getLabel(83553, "暂无数据")}
-
- }
-
- } trigger="click" placement="right" overlayClassName="income_pop_wrapper"
- visible={record.visible}
- onVisibleChange={(visible) => onChangeSwitch(visible, record.id)}
- >
- alert(1)}
+
+
+ {
+ !_.isEmpty(dataList) ?
+ _.map(dataList, it => ( this.handleClickItem(it)}>{it.name})) :
+
+
+ {getLabel(83553, "暂无数据")}
+
+ }
+
+ } trigger="click" placement="right" overlayClassName="income_pop_wrapper"
+ visible={record.visible}
+ onVisibleChange={(visible) => onChangeSwitch(visible, record.id)}
+ >
+ this.setState({
+ salaryItemSelectDialog: {
+ ...salaryItemSelectDialog,
+ visible: true,
+ salarySobId
+ }
+ })}
+ />
+
+ {
+ this.setState({
+ salaryItemSelectDialog: {
+ ...salaryItemSelectDialog,
+ visible: false,
+ salarySobId: ""
+ }
+ }, () => this.props.onChange([], this.props.record.id));
+ }}
+ onCancel={() => this.setState({
+ salaryItemSelectDialog: {
+ ...salaryItemSelectDialog,
+ visible: false,
+ salarySobId: ""
+ }
+ })}
/>
-
+
);
}
}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemSelectDialog.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemSelectDialog.js
new file mode 100644
index 00000000..137b8067
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemSelectDialog.js
@@ -0,0 +1,119 @@
+/*
+ * Author: 黎永顺
+ * name: 个税对应字段-薪资项目选择弹框
+ * Description:
+ * Date: 2023/8/17
+ */
+import React, { Component } from "react";
+import { WeaDialog, WeaInputSearch, WeaLocaleProvider } from "ecCom";
+import { Button, Col, Row, Table } from "antd";
+import { commonBrowserData } from "../../../apis";
+
+const { getLabel } = WeaLocaleProvider;
+
+class LedgerSalaryItemSelectDialog extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ pageInfo: { current: 1, pageSize: 10, total: 0 },
+ loading: false, columns: [], dataSource: [],
+ keywords: ""
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) this.commonBrowserData(nextProps);
+ }
+
+ commonBrowserData = (props) => {
+ const { salarySobId } = props;
+ const { keywords, pageInfo } = this.state;
+ const payload = {
+ type: "salaryItemBrowser",
+ jsonParam: JSON.stringify({ salarySobId, key: keywords }),
+ ...pageInfo
+ };
+ this.setState({ loading: true });
+ commonBrowserData(payload).then(({ status, data }) => {
+ this.setState({ loading: false });
+ if (status) {
+ const { list: dataSource, columns, pageNum: current, pageSize, total } = data;
+ this.setState({
+ dataSource, columns,
+ pageInfo: { ...pageInfo, current, pageSize, total }
+ });
+ }
+ }).catch(() => this.setState({ loading: false }));
+ };
+ handleRowClick = (record) => {
+ this.props.onCancel();
+ this.props.handleClickItem(record);
+ };
+
+ render() {
+ const { loading, columns, dataSource, pageInfo, keywords } = this.state;
+ const pagination = {
+ ...pageInfo,
+ showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
+ showQuickJumper: true,
+ showSizeChanger: true,
+ pageSizeOptions: ["10", "20", "50", "100"],
+ onShowSizeChange: (current, pageSize) => {
+ this.setState({
+ pageInfo: { ...pageInfo, current, pageSize }
+ }, () => this.commonBrowserData(this.props));
+ },
+ onChange: current => {
+ this.setState({
+ pageInfo: { ...pageInfo, current }
+ }, () => this.commonBrowserData(this.props));
+ }
+ };
+ return (
+