From 02b085c0516ee6cec262b0e848f1f65700ee995f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 20 Sep 2024 16:30:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/customBrowserDialog.js | 15 ++-- .../components/UnifiedTable/index.js | 2 +- pc4mobx/hrmSalary/config.js | 4 +- pc4mobx/hrmSalary/layout.js | 1 + .../pages/analysisOfSalaryStatistics/index.js | 2 +- .../pages/dataAcquisition/dataTables.js | 17 ++-- .../components/customStatisticsItemsModal.js | 88 ++++++++----------- .../hrmSalary/pages/variableSalary/index.js | 2 +- .../hrmSalary/pages/variableSalary/index.less | 1 + pc4mobx/hrmSalary/single.js | 2 + pc4mobx/hrmSalary/stores/taxAgent.js | 1 + 11 files changed, 62 insertions(+), 73 deletions(-) diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserDialog.js b/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserDialog.js index 4fb296c1..9eabe37a 100644 --- a/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserDialog.js +++ b/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserDialog.js @@ -23,7 +23,7 @@ class CustomBrowserDialog extends Component { super(props); this.state = { loading: false, listDatas: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, selectedRowKeys: [], - query: { [props.searchParamsKey]: "" }, + query: { [props.searchParamsKey]: "" }, singleFilterVal: "", leftListSelectedKeys: [], // 左侧table选择的keys leftListSelectedData: [], // 左侧table选择的数据 rightCheckedKeys: [], //右侧选择的keys @@ -157,7 +157,8 @@ class CustomBrowserDialog extends Component { render() { const { - loading, listDatas, pageInfo, selectedRowKeys, query, leftListSelectedKeys, rightDatas, rightCheckedKeys + loading, listDatas, pageInfo, selectedRowKeys, query, leftListSelectedKeys, rightDatas, rightCheckedKeys, + singleFilterVal } = this.state; const { dialogType, tableProps: { rowKey, columns }, isSingle, searchParamsKey } = this.props; const sheight = this.dialog ? this.dialog.state.height - 55 : 260; @@ -214,9 +215,13 @@ class CustomBrowserDialog extends Component { /> : - this.handleRowClick(_.find(listDatas, item => item.id === id))} - checkedKeys={[]}/> + + this.setState({ singleFilterVal })}/> + this.handleRowClick(_.find(listDatas, item => item.id === id))} + data={listDatas.filter((item) => item.name.indexOf(_.trim(singleFilterVal)) > -1)}/> + } ; diff --git a/pc4mobx/hrmSalary/components/UnifiedTable/index.js b/pc4mobx/hrmSalary/components/UnifiedTable/index.js index f8cbff97..cff25bf6 100644 --- a/pc4mobx/hrmSalary/components/UnifiedTable/index.js +++ b/pc4mobx/hrmSalary/components/UnifiedTable/index.js @@ -12,7 +12,7 @@ class Index extends Component { } else if (index === 1) { return { ...item, fixed: "left", width: 176 }; } - if (item.dataIndex === "operate") { + if (item.dataIndex === "operate" || item.dataIndex === "opts") { return { ...item, fixed: "right", width: item.width || "120px" }; } return { ...item, width: "33%" }; diff --git a/pc4mobx/hrmSalary/config.js b/pc4mobx/hrmSalary/config.js index da90a688..ba422c79 100644 --- a/pc4mobx/hrmSalary/config.js +++ b/pc4mobx/hrmSalary/config.js @@ -9,7 +9,7 @@ export const PAGE = { "otherDeduction": ["/dataAcquisition/otherDeduct"], //其他免税扣除 "addUpSituation": ["/dataAcquisition/cumSituation"], //往期累计情况 "attendQuote": ["/dataAcquisition/attendance"], //考勤引用 - "myBill": ["/hrmSalary/mySalary", "/hrmSalary/mySalaryMobile", "/hrmSalary/mobilepayroll"], //薪资福利 + "myBill": ["/hrmSalary/mySalary", "/hrmSalary/mySalaryMobile"], //薪资福利 "taxAgent": ["/hrmSalary/taxAgent"], //个税扣缴义务人 "auth": ["/hrmSalary/roleManagement"], //业务管理线 "variableArchive": ["/hrmSalary/variableSalary"], //浮动薪酬 @@ -18,5 +18,5 @@ export const PAGE = { "salaryField": ["/hrmSalary/fieldManagement"], //字段管理 "salaryItem": ["/hrmSalary/salaryItem"], //薪资项目管理 "siScheme": ["/socialSecurityBenefits/programme"], //社保福利方案 - "report": ["/hrmSalary/analysisOfSalaryStatistics", "/hrmSalary/reportView"], //报表 + "report": ["/hrmSalary/analysisOfSalaryStatistics", "/hrmSalary/reportView"] //报表 }; diff --git a/pc4mobx/hrmSalary/layout.js b/pc4mobx/hrmSalary/layout.js index 816934d6..73fc3cca 100644 --- a/pc4mobx/hrmSalary/layout.js +++ b/pc4mobx/hrmSalary/layout.js @@ -44,6 +44,7 @@ class Layout extends Component { header.appendChild(link); top.$(".ant-message").remove(); window.location.hash.indexOf("mobilepayroll") === -1 && stores.taxAgentStore.getPermission(); + window.location.hash.indexOf("mobilepayroll") !== -1 && stores.taxAgentStore.initPageAndOptAuth(); } } diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js index ee1d3f5b..77f2921a 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js @@ -294,7 +294,7 @@ class Index extends Component { onSearch={() => this.handleReqBtnsClick("search")}/> ] : selectedKey === "detail" ? [ - {getLabel(111, "年薪资核算人员明细:")} + {getLabel(111, "年度:")} this.setState({ year })}/> , ; } }; - } else if (dataIndex === "operate") { + } else if (dataIndex === "operate" || dataIndex === "opts") { return { ...item, width: 150, @@ -169,15 +169,10 @@ class DataTables extends Component { }; } }); - return ; + return ( + ); } } diff --git a/pc4mobx/hrmSalary/pages/reportView/components/customStatisticsItemsModal.js b/pc4mobx/hrmSalary/pages/reportView/components/customStatisticsItemsModal.js index a94d2a07..f9955249 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/customStatisticsItemsModal.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/customStatisticsItemsModal.js @@ -7,7 +7,6 @@ import React, { Component } from "react"; import { Button, message, Modal } from "antd"; import { - WeaBrowser, WeaCheckbox, WeaDialog, WeaError, @@ -19,6 +18,7 @@ import { WeaTable } from "ecCom"; import { reportStatisticsItemSave, statisticsItemChangetab, statisticsItemGetform } from "../../../apis/statistics"; +import CustomBrowser from "../../../components/CustomBrowser"; import "../index.less"; const { getLabel } = WeaLocaleProvider; @@ -263,23 +263,22 @@ class CustomStatisticsItemsModal extends Component { }) }); }; - handleChangeStatisticalItems = (itemValue, _names, datas) => { + handleChangeStatisticalItems = (data) => { + const itemValue = _.keys(data)[0], datas = _.values(data); const { formData } = this.state; this.setState({ formData: { ...formData, itemValue, itemValueSpan: _.map(datas, it => it.name).join(","), - itemName: datas.length === 1 ? _.map(datas, it => it.names).join(",") : "" + itemName: datas.length === 1 ? _.map(datas, it => it.name).join(",") : "" } }, () => { statisticsItemChangetab({ itemId: itemValue }).then(({ status, data }) => { if (status) { const { ruleData } = data; const { columns, data: dataSource } = ruleData; - this.setState({ - columns, dataSource - }); + this.setState({ columns, dataSource }); } }); }); @@ -368,52 +367,37 @@ class CustomStatisticsItemsModal extends Component { className="statisticItemsWrapper" >
- - - ({ - id: it, - name: itemValueSpan.split(",")[idx] - })) : []} - completeParams={{ - type: 162, - fielddbtype: "browser.salaryItemBrowser", - f_weaver_belongto_usertype: "0" - }} - conditionDataParams={{ - type: "browser.salaryItemBrowser", - fielddbtype: "browser.salaryItemBrowser", - f_weaver_belongto_usertype: "0" - }} - dataParams={{ - type: "browser.salaryItemBrowser", - f_weaver_belongto_usertype: "0" - }} - destDataParams={{ - type: "browser.salaryItemBrowser", - f_weaver_belongto_usertype: "0" - }} - // isMultCheckbox - inputStyle={{ width: "100%" }} - onChange={this.handleChangeStatisticalItems} - /> - - - - - this.setState({ formData: { ...formData, itemName } })}/> - - -
- -
+ { + !_.isEmpty(columns) && + + + ({ + id: it, name: itemValueSpan.split(",")[idx] + })) : [], dataParams: { filterType: "QUERY_DATA" }, searchParamsKey: "", filterByName: true + } + }} value={itemValue} onCustomChange={this.handleChangeStatisticalItems}/> + + + + + this.setState({ formData: { ...formData, itemName } })}/> + + +
+ +
+
+ }
); diff --git a/pc4mobx/hrmSalary/pages/variableSalary/index.js b/pc4mobx/hrmSalary/pages/variableSalary/index.js index 6dd17207..16df4811 100644 --- a/pc4mobx/hrmSalary/pages/variableSalary/index.js +++ b/pc4mobx/hrmSalary/pages/variableSalary/index.js @@ -144,7 +144,7 @@ class Index extends Component { ]; return ( } selectedKey={selectedKey} + title={getLabel(111, "浮动数据")} icon={} selectedKey={selectedKey} iconBgcolor="#F14A2D" tabDatas={tabs} className="variable_salary_wrapper" buttons={_.find(tabs, o => selectedKey === o.key).buttons} buttonSpace={10} onChange={selectedKey => this.setState({ selectedKey, SFDialog: { ...SFDialog, visible: false } })} diff --git a/pc4mobx/hrmSalary/pages/variableSalary/index.less b/pc4mobx/hrmSalary/pages/variableSalary/index.less index 55dbb34b..b76440d6 100644 --- a/pc4mobx/hrmSalary/pages/variableSalary/index.less +++ b/pc4mobx/hrmSalary/pages/variableSalary/index.less @@ -4,6 +4,7 @@ } .wea-new-top-req-content { + padding: 16px; .wea-new-table { background: #FFF; diff --git a/pc4mobx/hrmSalary/single.js b/pc4mobx/hrmSalary/single.js index 863c0a8a..1de2325b 100644 --- a/pc4mobx/hrmSalary/single.js +++ b/pc4mobx/hrmSalary/single.js @@ -10,6 +10,7 @@ import { RouterStore, syncHistoryWithStore } from "mobx-react-router"; import { Provider } from "mobx-react"; import Module from "weaHrmSalary"; +import stores from "./stores"; const routing = new RouterStore(); @@ -38,6 +39,7 @@ class Root extends React.Component { header.appendChild(link) top.$(".ant-message").remove(); window.location.hash.indexOf("mobilepayroll") === -1 && allStore.taxAgentStore.getPermission(); + window.location.hash.indexOf("mobilepayroll") !== -1 && allStore.taxAgentStore.initPageAndOptAuth(); if (window.location.hash.indexOf("payroll") !== -1) { window.localStorage.removeItem("template-basedata"); window.localStorage.removeItem("salary-showset"); diff --git a/pc4mobx/hrmSalary/stores/taxAgent.js b/pc4mobx/hrmSalary/stores/taxAgent.js index b198a29a..a65d8b31 100644 --- a/pc4mobx/hrmSalary/stores/taxAgent.js +++ b/pc4mobx/hrmSalary/stores/taxAgent.js @@ -14,6 +14,7 @@ export class TaxAgentStore { @observable roleOperatorForm = new WeaForm(); //权限-角色操作者form表单 @action initRoleOperatorForm = () => this.roleOperatorForm = new WeaForm(); @observable PageAndOptAuth = { able: false, opts: [] }; // 业务线页面权限 + @action initPageAndOptAuth = () => this.PageAndOptAuth = { able: true, opts: ["query", "admin"] };// 设置业务线页面权限 @observable tableStore = new TableStore(); // new table