From b260a41c7e58de7e8592b6ea272c22a75c6310a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 12 Oct 2023 15:52:15 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feature/2.9.42310.01-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E5=AF=BC=E5=85=A5=E4=B8=8B=E8=BD=BD=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E6=8E=A5=E5=8F=A3=E6=9B=B4=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/benefitsProgramme.js | 0 pc4mobx/hrmSalary/apis/standingBook.js | 14 ++++++++++- .../importModal/acctResultImportModal.js | 23 ++++++++++++++++--- pc4mobx/hrmSalary/util/request.js | 22 ++++++++++++++++++ 4 files changed, 55 insertions(+), 4 deletions(-) delete mode 100644 pc4mobx/hrmSalary/apis/benefitsProgramme.js diff --git a/pc4mobx/hrmSalary/apis/benefitsProgramme.js b/pc4mobx/hrmSalary/apis/benefitsProgramme.js deleted file mode 100644 index e69de29b..00000000 diff --git a/pc4mobx/hrmSalary/apis/standingBook.js b/pc4mobx/hrmSalary/apis/standingBook.js index 28235f77..cef1aa55 100644 --- a/pc4mobx/hrmSalary/apis/standingBook.js +++ b/pc4mobx/hrmSalary/apis/standingBook.js @@ -1,5 +1,5 @@ import { WeaTools } from "ecCom"; -import { postFetch } from "../util/request"; +import { postExportFetch, postFetch } from "../util/request"; //社会福利台账-获取正常缴纳列表 export const getCommonList = (params) => { @@ -339,3 +339,15 @@ export const compensationConfigSave = (params) => { export const compensationBack = (params) => { return postFetch("/api/bs/hrmsalary/siaccount/compensationBack", params); }; + +export const exportSiaccountWelfareImporttemplate = params => { + return postExportFetch("/api/bs/hrmsalary/siaccount/welfare/importtemplate/export", params); +}; + +export const exportSiaccountWelfaresupplyimporttemplatetemplate = params => { + return postExportFetch("/api/bs/hrmsalary/siaccount/welfare/supplyimporttemplate/export", params); +}; + +export const exportSiaccountWelfarebalanceimporttemplatetetemplate = params => { + return postExportFetch("/api/bs/hrmsalary/siaccount/welfare/balanceimporttemplate/export", params); +}; diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js index b7bc7c27..23d5a034 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js @@ -6,6 +6,11 @@ import SelectFieldModal from "./selectFieldModal"; import { getQueryString } from "../../../../util/url"; import AddHeaderFieldsModal from "./addHeaderFieldsModal"; import { cacheImportField } from "../../../../apis/calculate"; +import { + exportSiaccountWelfarebalanceimporttemplatetetemplate, + exportSiaccountWelfareImporttemplate, + exportSiaccountWelfaresupplyimporttemplatetemplate +} from "../../../../apis/standingBook"; @inject("calculateStore", "standingBookStore") @observer @@ -76,11 +81,23 @@ export default class AcctResultImportModal extends React.Component { const billMonth = getQueryString("billMonth"); const paymentOrganization = getQueryString("paymentOrganization"); if (standingBookTabKey === "1") { - url = `${window.location.origin}/api/bs/hrmsalary/siaccount/welfare/importtemplate/export?welfareNames=${this.state.modalParam.salaryItemIds}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`; + const promise = exportSiaccountWelfareImporttemplate({ + billMonth, + welfareNames: this.state.modalParam.salaryItemIds.split(","), + paymentOrganization: Number(paymentOrganization) + }); } else if (standingBookTabKey === "3") { - url = `${window.location.origin}/api/bs/hrmsalary/siaccount/welfare/supplyimporttemplate/export?welfareNames=${this.state.modalParam.salaryItemIds}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`; + const promise = exportSiaccountWelfaresupplyimporttemplatetemplate({ + billMonth, + welfareNames: this.state.modalParam.salaryItemIds.split(","), + paymentOrganization: Number(paymentOrganization) + }); } else if (standingBookType === "difference") { - url = `${window.location.origin}/api/bs/hrmsalary/siaccount/welfare/balanceimporttemplate/export?welfareNames=${this.state.modalParam.salaryItemIds}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`; + const promise = exportSiaccountWelfarebalanceimporttemplatetetemplate({ + billMonth, + welfareNames: this.state.modalParam.salaryItemIds.split(","), + paymentOrganization: Number(paymentOrganization) + }); } } window.open(url, "_self"); diff --git a/pc4mobx/hrmSalary/util/request.js b/pc4mobx/hrmSalary/util/request.js index 3c7ecf02..a7a1c7f2 100644 --- a/pc4mobx/hrmSalary/util/request.js +++ b/pc4mobx/hrmSalary/util/request.js @@ -30,3 +30,25 @@ export const headerRequestFetch = (url, method, params, header) => { body: JSON.stringify(params) }).then(res => res.json()); }; +export const postExportFetch = (url, params) => { + url = url + "?__random__=" + (new Date()).valueOf(); + return fetch(url, { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => { + const filename = res.headers.get("Content-Disposition").split("filename=")[1]; + res.blob().then(blob => { + const url = window.URL.createObjectURL(blob); + const a = document.createElement("a"); + a.href = url; + a.download = decodeURI(filename); + a.click(); + window.URL.revokeObjectURL(url); + }); + }); +}; + From 7b79fe5dc5b8953803f0b357893804116d749f60 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, 13 Oct 2023 09:51:50 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feature/2.9.42310.01-=E8=B0=83=E8=96=AA?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/adjustManage.js | 6 ++ pc4mobx/hrmSalary/index.js | 3 + .../pages/adjustSalaryManage/index.js | 88 +++++++++++++++++++ .../pages/adjustSalaryManage/index.less | 0 4 files changed, 97 insertions(+) create mode 100644 pc4mobx/hrmSalary/apis/adjustManage.js create mode 100644 pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js create mode 100644 pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less diff --git a/pc4mobx/hrmSalary/apis/adjustManage.js b/pc4mobx/hrmSalary/apis/adjustManage.js new file mode 100644 index 00000000..0ccce814 --- /dev/null +++ b/pc4mobx/hrmSalary/apis/adjustManage.js @@ -0,0 +1,6 @@ +import { postFetch } from "../util/request"; + +// 薪资项目调整记录列表 +export const adjustRecordItemList = (params) => { + return postFetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/adjustRecordItemList", params); +}; diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index bd2d3c12..c2e84f5e 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -38,6 +38,7 @@ import ReportView from "./pages/reportView"; import MySalaryView from "./pages/mySalary/mySalaryView"; import WatermarkPreview from "./pages/payroll/watermarkPreview"; import ExternalPersonManage from "./pages/externalPersonManage"; +import AdjustSalaryManage from "./pages/adjustSalaryManage"; import stores from "./stores"; import "./style/index"; @@ -88,6 +89,7 @@ const DataAcquisition = (props) => props.children; // analysisOfSalaryStatistics 薪酬统计分析 // reportView 薪酬报表查看 // externalPersonManage 非系统人员管理 +// adjustSalaryManage 档案管理 const Routes = ( + { + const { pageInfo } = this.state; + const payload = { ...pageInfo }; + this.setState({ loading: true }); + adjustRecordItemList(payload).then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const { columns, list: dataSource, pageNum, pageSize, total } = data; + this.setState({ + dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total }, + columns: _.map(columns, o => { + const { dataIndex } = o; + let width = ""; + return { ...o, width }; + }) + }); + } + }).catch(() => this.setState({ loading: false })); + }; + + render() { + const { loading, dataSource, columns, pageInfo } = 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 } + }, () => { + }); + }, + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }, () => { + }); + } + }; + return ( + } iconBgcolor="#F14A2D" + buttons={[ + + ]} + > + + + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less new file mode 100644 index 00000000..e69de29b From 9a03c6ad8b021130c9c24a003dbbb2039a48032b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 16 Oct 2023 15:27:29 +0800 Subject: [PATCH 3/5] =?UTF-8?q?feature/2.9.42310.01-=E8=B0=83=E8=96=AA?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/adjustManage.js | 2 +- .../adjustAdvanceSearchPannel/index.js | 101 ++++++++++ .../components/advanceInputBtn/index.js | 27 +++ .../components/advanceInputBtn/index.less | 28 +++ .../components/conditions.js | 176 ++++++++++++++++++ .../pages/adjustSalaryManage/index.js | 75 ++++++-- .../pages/adjustSalaryManage/index.less | 47 +++++ pc4mobx/hrmSalary/stores/payrollFiles.js | 4 +- 8 files changed, 445 insertions(+), 15 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/adjustSalaryManage/components/adjustAdvanceSearchPannel/index.js create mode 100644 pc4mobx/hrmSalary/pages/adjustSalaryManage/components/advanceInputBtn/index.js create mode 100644 pc4mobx/hrmSalary/pages/adjustSalaryManage/components/advanceInputBtn/index.less create mode 100644 pc4mobx/hrmSalary/pages/adjustSalaryManage/components/conditions.js diff --git a/pc4mobx/hrmSalary/apis/adjustManage.js b/pc4mobx/hrmSalary/apis/adjustManage.js index 0ccce814..8eda378d 100644 --- a/pc4mobx/hrmSalary/apis/adjustManage.js +++ b/pc4mobx/hrmSalary/apis/adjustManage.js @@ -2,5 +2,5 @@ import { postFetch } from "../util/request"; // 薪资项目调整记录列表 export const adjustRecordItemList = (params) => { - return postFetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/adjustRecordItemList", params); + return postFetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/salaryItemList", params); }; diff --git a/pc4mobx/hrmSalary/pages/adjustSalaryManage/components/adjustAdvanceSearchPannel/index.js b/pc4mobx/hrmSalary/pages/adjustSalaryManage/components/adjustAdvanceSearchPannel/index.js new file mode 100644 index 00000000..fc98193a --- /dev/null +++ b/pc4mobx/hrmSalary/pages/adjustSalaryManage/components/adjustAdvanceSearchPannel/index.js @@ -0,0 +1,101 @@ +/* + * Author: 黎永顺 + * name: 调薪记录-查看面板 + * Description: + * Date: 2023/10/16 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaTools } from "ecCom"; +import { Button } from "antd"; +import { inject, observer } from "mobx-react"; +import { adjustSearchConditions } from "../conditions"; +import { getSearchs } from "../../../../util"; +import { commonEnumList } from "../../../../apis/ruleconfig"; + +const getKey = WeaTools.getKey; +const getLabel = WeaLocaleProvider.getLabel; + +@inject("payrollFilesStore") +@observer +class Index extends Component { + constructor(props) { + super(props); + this.state = { + searchConditions: [] + }; + } + + componentDidMount() { + commonEnumList({ enumClass: "com.engine.salary.enums.salaryarchive.SalaryArchiveItemAdjustReasonEnum" }) + .then(({ status, data }) => { + if (status) { + this.setState({ + searchConditions: _.map(adjustSearchConditions, item => { + return { + ...item, + items: _.map(item.items, o => { + if (getKey(o) === "userStatus") { + return { + ...o, + options: [ + { key: "0", showname: getLabel(18883, "试用") }, { + key: "1", + showname: getLabel(15711, "正式") + }, + { key: "2", showname: getLabel(480, "临时") }, { + key: "3", + showname: getLabel(15844, "试用延期") + }, + { key: "4", showname: getLabel(542707, "解雇") }, { + key: "5", + showname: getLabel(6091, "离职") + }, + { key: "6", showname: getLabel(6092, "退休") } + ] + }; + } else if (getKey(o) === "adjustReason") { + return { + ...o, + options: _.map(data, item => ({ + key: item.value, + showname: item.defaultLabel + })) + }; + } + return { ...o }; + }), + title: getLabel(32905, "常用条件") + }; + }) + }, () => { + const { payrollFilesStore: { adjustForm } } = this.props; + adjustForm.initFormFields(this.state.searchConditions); + }); + } + }); + } + + render() { + const { searchConditions } = this.state; + const { payrollFilesStore: { adjustForm } } = this.props; + return ( + +
+ {getSearchs(adjustForm, searchConditions, 2, false)} +
+
+
+ + + +
+
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/adjustSalaryManage/components/advanceInputBtn/index.js b/pc4mobx/hrmSalary/pages/adjustSalaryManage/components/advanceInputBtn/index.js new file mode 100644 index 00000000..847db526 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/adjustSalaryManage/components/advanceInputBtn/index.js @@ -0,0 +1,27 @@ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { Button } from "antd"; +import { WeaInputSearch, WeaLocaleProvider } from "ecCom"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +@inject("payrollFilesStore") +@observer +class Index extends Component { + render() { + const { payrollFilesStore: { adjustForm } } = this.props; + return ( +
+ adjustForm.updateFields({ username: v })} + onSearch={this.props.onAdvanceSearch} + /> + +
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/adjustSalaryManage/components/advanceInputBtn/index.less b/pc4mobx/hrmSalary/pages/adjustSalaryManage/components/advanceInputBtn/index.less new file mode 100644 index 00000000..1a3d7283 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/adjustSalaryManage/components/advanceInputBtn/index.less @@ -0,0 +1,28 @@ +.advance-search { + display: flex; + align-items: center; + position: relative; + top: -2.5px; + + .wea-advanced-search { + top: 2px; + left: -1px; + height: 28px; + line-height: 1; + border-radius: 0; + position: relative; + color: #474747; + padding: 4px 15px; + } + + .wea-advanced-search:hover { + border: 1px solid #dadada; + color: #474747; + } + + .text-elli { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } +} diff --git a/pc4mobx/hrmSalary/pages/adjustSalaryManage/components/conditions.js b/pc4mobx/hrmSalary/pages/adjustSalaryManage/components/conditions.js new file mode 100644 index 00000000..22674611 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/adjustSalaryManage/components/conditions.js @@ -0,0 +1,176 @@ +export const adjustSearchConditions = [ + { + items: [ + { + colSpan: 2, + conditionType: "INPUT", + domkey: ["username"], + fieldcol: 12, + label: "姓名", + lanId: 25034, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "57", + viewAttr: 2 + }, + colSpan: 2, + conditionType: "BROWSER", + domkey: ["departmentIds"], + fieldcol: 12, + label: "部门", + lanId: 27511, + labelcol: 6, + viewAttr: 2 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "24", + viewAttr: 2 + }, + colSpan: 2, + conditionType: "BROWSER", + domkey: ["positionIds"], + fieldcol: 12, + label: "岗位", + lanId: 6086, + labelcol: 6, + viewAttr: 2 + }, + { + colSpan: 2, + conditionType: "SELECT", + domkey: ["userStatus"], + fieldcol: 12, + label: "状态", + lanId: 535101, + labelcol: 6, + options: [], + viewAttr: 2 + }, + { + colSpan: 2, + conditionType: "INPUT", + domkey: ["adjustItem"], + fieldcol: 12, + label: "项目名称", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + colSpan: 2, + conditionType: "SELECT", + domkey: ["adjustReason"], + fieldcol: 12, + label: "调整原因", + lanId: 1897, + labelcol: 6, + options: [], + viewAttr: 2 + }, + { + colSpan: 2, + conditionType: "RANGEPICKER", + domkey: ["effectiveTime1", "effectiveTime2"], + fieldcol: 12, + label: "生效日期", + lanId: 19548, + labelcol: 6, + viewAttr: 2 + }, + { + colSpan: 2, + conditionType: "RANGEPICKER", + domkey: ["operateTime1", "operateTime2"], + fieldcol: 12, + label: "操作日期", + lanId: 111, + labelcol: 6, + viewAttr: 2 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "17", + viewAttr: 2 + }, + colSpan: 2, + conditionType: "BROWSER", + domkey: ["operatorIds"], + fieldcol: 12, + label: "操作人", + lanId: 111, + labelcol: 6, + viewAttr: 2 + }, + { + colSpan: 2, + conditionType: "INPUT", + domkey: ["description"], + fieldcol: 12, + label: "备注", + lanId: 536726, + labelcol: 6, + value: "", + viewAttr: 2 + }, + ], + defaultshow: true, + title: "common" + } +]; diff --git a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js index 40b5a61a..e57ffa58 100644 --- a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js +++ b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js @@ -5,19 +5,26 @@ * Date: 2023/10/13 */ import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; import { adjustRecordItemList } from "../../apis/adjustManage"; +import AdvanceInputBtn from "./components/advanceInputBtn"; +import AdjustAdvanceSearchPannel from "./components/adjustAdvanceSearchPannel"; +import cs from "classnames"; import { Button } from "antd"; import "./index.less"; +import { convertToUrlString } from "../../util/url"; const getLabel = WeaLocaleProvider.getLabel; +@inject("payrollFilesStore") +@observer class Index extends Component { constructor(props) { super(props); this.state = { - loading: false, columns: [], dataSource: [], + loading: false, columns: [], dataSource: [], showSearchAd: false, pageInfo: { current: 1, pageSize: 10, total: 0 } }; } @@ -27,8 +34,22 @@ class Index extends Component { } adjustRecordItemList = () => { + const { payrollFilesStore: { adjustForm } } = this.props; + const { + departmentIds, positionIds, operatorIds, + effectiveTime1 = "", effectiveTime2 = "", + operateTime1 = "", operateTime2 = "", + ...extra + } = adjustForm.getFormParams(); const { pageInfo } = this.state; - const payload = { ...pageInfo }; + const payload = { + ...pageInfo, ...extra, + departmentIds: departmentIds ? departmentIds.split(",") : [], + positionIds: departmentIds ? departmentIds.split(",") : [], + operatorIds: departmentIds ? departmentIds.split(",") : [], + effectiveTime: effectiveTime1 ? [effectiveTime1, effectiveTime2] : [], + operateTime: operateTime1 ? [operateTime1, operateTime2] : [] + }; this.setState({ loading: true }); adjustRecordItemList(payload).then(({ status, data }) => { this.setState({ loading: false }); @@ -37,17 +58,39 @@ class Index extends Component { this.setState({ dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total }, columns: _.map(columns, o => { - const { dataIndex } = o; - let width = ""; - return { ...o, width }; + if (o.dataIndex === "username") { + return { ...o, width: 150, fixed: "left" }; + } + return { ...o, width: 150 }; }) }); } }).catch(() => this.setState({ loading: false })); }; + openAdvanceSearch = () => this.setState({ showSearchAd: !this.state.showSearchAd }); + adjustExport = () => { + if (!this.handleDebounce) { + this.handleDebounce = _.debounce(() => { + const { payrollFilesStore: { adjustForm } } = this.props; + const { + effectiveTime1 = "", effectiveTime2 = "", + operateTime1 = "", operateTime2 = "", + ...extra + } = adjustForm.getFormParams(); + const payload = { + ...extra, + effectiveTime: effectiveTime1 ? `${effectiveTime1},${effectiveTime2}` : "", + operateTime: operateTime1 ? `${operateTime1},${operateTime2}` : "" + }; + window.open(`${window.location.origin}/api/bs/hrmsalary/salaryArchive/adjustRecord/exportSalaryItemList?${convertToUrlString(payload)}`, "_target"); + this.handleDebounce = null; + }, 500); + } + this.handleDebounce(); + }; render() { - const { loading, dataSource, columns, pageInfo } = this.state; + const { loading, dataSource, columns, pageInfo, showSearchAd } = this.state; const pagination = { ...pageInfo, showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, @@ -57,26 +100,32 @@ class Index extends Component { onShowSizeChange: (current, pageSize) => { this.setState({ pageInfo: { ...pageInfo, current, pageSize } - }, () => { - }); + }, () => this.adjustRecordItemList()); }, onChange: current => { this.setState({ pageInfo: { ...pageInfo, current } - }, () => { - }); + }, () => this.adjustRecordItemList()); } }; return ( } iconBgcolor="#F14A2D" buttons={[ - + , + this.openAdvanceSearch()} + onAdvanceSearch={this.adjustRecordItemList}/> ]} > +
+ +
diff --git a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less index e69de29b..f7648ef8 100644 --- a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less +++ b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less @@ -0,0 +1,47 @@ +.adjustManageLayout { + + .searchAdvanced-condition-hide { + display: none; + } + + .searchAdvanced-condition-container { + background: #FFF; + margin-bottom: 10px; + border: 1px solid #e5e5e5; + + .wea-search-buttons { + border-top: 1px solid #dadada; + padding: 15px 0; + } + + .wea-advanced-searchsAd { + height: 320px; + overflow: hidden auto; + + .formItem-delete { + position: absolute; + top: 0; + right: -40px; + } + + .searchAdvanced-commonSelect { + border-top: 1px solid #ebebeb; + margin: 0 25px; + padding: 10px 0; + } + + .custom-advance-largeSpacing { + padding-left: 26px; + + .link { + border: none; + border-radius: 0; + padding: 12px 10px 12px 26px; + color: #2db7f5 + } + } + + } + } +} + diff --git a/pc4mobx/hrmSalary/stores/payrollFiles.js b/pc4mobx/hrmSalary/stores/payrollFiles.js index 70088da8..529bde71 100644 --- a/pc4mobx/hrmSalary/stores/payrollFiles.js +++ b/pc4mobx/hrmSalary/stores/payrollFiles.js @@ -1,5 +1,5 @@ import { action, observable } from "mobx"; -import { WeaTableNew } from "comsMobx"; +import { WeaForm, WeaTableNew } from "comsMobx"; import * as API from "../apis/payrollFiles"; import { getDataPerspective, statisticsEmployeeDetailList } from "../apis/statistics"; @@ -10,6 +10,8 @@ export class PayrollFilesStore { @observable tableStore = new TableStore(); @observable employeeTableStore = new TableStore(); @observable pivotTableStore = new TableStore(); + @observable adjustForm = new WeaForm(); //调薪记录-核算form + @action initAdjustForm = () => this.adjustForm = new WeaForm();//调薪记录-初始化核算form @action("薪资档案-列表查询") queryList = (payload = {}, searchItemsValue = {}, url = "") => { From db166275c47ec8a16b3cc1160216bf5dacc2cfe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 18 Oct 2023 10:24:13 +0800 Subject: [PATCH 4/5] =?UTF-8?q?hotfix/2.9.42310.01-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=9D=9E=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E4=BA=BA=E5=91=98tab=E6=98=BE=E7=A4=BA=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../socialSecurityBenefits/archives/index.js | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index 4caa10dc..66ce8099 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -18,6 +18,7 @@ import { convertToUrlString, getURLParameters } from "../../../util/url"; import { salaryArchiveDelete } from "../../../apis/payrollFiles"; import ImportDialog from "../../../components/importDialog"; import "./index.less"; +import { sysinfo } from "../../../apis/ruleconfig"; const getLabel = WeaLocaleProvider.getLabel; const APILIST = { @@ -64,7 +65,8 @@ export default class Archives extends React.Component { visible: false, title: "", nextloading: false, link: "", importResult: {}, imageId: "", previewUrl: "/api/bs/hrmsalary/scheme/preview" - } + }, + extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭 }; this.record = {}; } @@ -73,9 +75,21 @@ export default class Archives extends React.Component { const { archivesStore: { doInit } } = this.props; doInit(); this.salaryArchiveDelete(); + this.getSysinfo(); this.queryList({ runStatuses: ["1"] }); } + /* + * Author: 黎永顺 + * Description: 非系统人员开关查询 + * Params: + * Date: 2023/7/14 + */ + getSysinfo = () => { + sysinfo().then(({ status, data }) => { + if (status) this.setState({ extEmpsWitch: data.extEmpsWitch }); + }); + }; queryInsuranceTabTotal = () => { API.queryInsuranceTabTotal().then(({ data = {}, status }) => { if (status) { @@ -612,7 +626,8 @@ export default class Archives extends React.Component { pageInfo, tabCount, loading, - importDialog + importDialog, + extEmpsWitch } = this.state; const { form, condition, showSearchAd, setShowSearchAd, @@ -805,7 +820,7 @@ export default class Archives extends React.Component { showDropIcon={false} // 是否显示下拉按钮 > Date: Wed, 18 Oct 2023 17:18:44 +0800 Subject: [PATCH 5/5] =?UTF-8?q?hotfix/2.9.42310.01=20=E5=85=AC=E5=BC=8F?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=BB=93=E6=9E=9C=E6=98=BE=E7=A4=BA=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js index fcfbf8a7..bb93a200 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js @@ -320,7 +320,7 @@ export default class FormalFormModal extends React.Component { if (status) { message.success("测试结果已更新"); this.setState({ - showTestVal: data + showTestVal: !_.isNil(data) ? data.toString() : data }); } else { message.error(errormsg || "");