From 25ce139a0c7abc4c26ade0d0746616d85c08f9ce 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, 21 Aug 2023 10:53:19 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E4=BA=A7=E7=9C=8B=E9=A1=B5=E9=9D=A2dom=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=E9=A1=BA=E5=BA=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/mobilePayroll/index.js | 4 ++-- pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 7ad8bb01..8116c06a 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -189,7 +189,7 @@ export default class MobilePayroll extends React.Component { salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []} > { - (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0") && + (!_.isEmpty(salaryGroups) && (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0")) && { - (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0") && + (!_.isEmpty(salaryGroups) && (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0")) && { - (_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0") && + (!_.isEmpty(salaryGroups) && (_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0")) && Date: Fri, 25 Aug 2023 16:12:05 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E4=BF=9D=E7=95=99=E5=B0=8F=E6=95=B0?= =?UTF-8?q?=E4=BD=8D=E6=95=B0=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/index.js | 12 ++----- .../hrmSalary/pages/calculateDetail/index.js | 24 +++++-------- .../pages/calculateDetail/index.less | 36 ++++++++++++++++--- .../calculateDetail/issuedAndReissueTable.js | 4 +-- .../calculateDetail/payrollItemsTable.js | 4 +-- .../calculateDetail/placeOnFileDetail.js | 3 +- .../components/ledgerSalaryItemNormal.js | 4 +-- .../components/ledgerSalaryItemTable.js | 4 +-- .../pages/salaryFile/saralyFileViewSlide.js | 2 +- 9 files changed, 52 insertions(+), 41 deletions(-) diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index d004267c..bd2d3c12 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -129,16 +129,8 @@ const Routes = ( - - + + diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js index d43cfb66..5b882dee 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js @@ -353,18 +353,10 @@ export default class CalculateDetail extends React.Component { onClick={() => this.downloadTxtfile(accountExceptInfo)}/>); return buttons; }; - const topTab = [ - { - title: "人员确认", - viewcondition: "0" - }, - { - title: "薪资核算", - viewcondition: "1" - } + { title: "人员确认", viewcondition: "0" }, + { title: "薪资核算", viewcondition: "1" } ]; - const adBtn = [ // 高级搜索内部按钮 } ; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js index 57522e83..55892da2 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js @@ -255,9 +255,9 @@ class LedgerSalaryItemTable extends Component { dataIndex: "valueType", key: "valueType", render: (e, record) => { - const { valueType } = record; + const { valueType, formulaContent } = record; const key = !_.isNil(valueType) ? valueType : ""; - return {key.toString() === "1" ? "输入" : key.toString() === "2" ? "自定义公式" : key.toString() === "3" ? "SQL" : ""} ; + return {key.toString() === "1" ? "输入" : key.toString() === "2" ? formulaContent : key.toString() === "3" ? formulaContent : ""} ; } }, { diff --git a/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js b/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js index 32a53167..59428135 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js @@ -152,7 +152,7 @@ export default class SalaryFileViewSlide extends React.Component { item.dataType === "number" ? { item.value = value; From ecc20219169d42c58c2da9520b6b0688fc319884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 29 Aug 2023 14:24:43 +0800 Subject: [PATCH 3/6] =?UTF-8?q?2.9.42308.02bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/socialSecurityBenefits/programme/defaultSlideForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js index 3e7ebcfa..fabf6a86 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js @@ -203,7 +203,7 @@ export default class DefaultSlideForm extends React.Component { return ( { this.updateDataSource(record, v, "paymentProportion"); From f65b7979d76c18aa260ca8948a7f95eeda6c2bf3 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, 31 Aug 2023 09:40:09 +0800 Subject: [PATCH 4/6] =?UTF-8?q?hotfix-=E8=96=AA=E8=B5=84=E6=A0=B8=E7=AE=97?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E7=BC=96=E8=BE=91=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E5=88=86=E9=A1=B5=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js index bbcdaad6..327d9b72 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js @@ -151,6 +151,7 @@ export default class SalaryDetail extends React.Component { progressVisible: false, progress: 0 }, () => { + const { current, pageSize } = this.pageInfo; const childFrameObj = document.getElementById("atdTable"); const payload = { type: "PR", @@ -158,7 +159,8 @@ export default class SalaryDetail extends React.Component { url: "/api/bs/hrmsalary/salaryacct/acctresult/list", queryParams: { salaryAcctRecordId, - ...this.props.employeeName + ...this.props.employeeName, + current, pageSize } }; childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); @@ -186,13 +188,15 @@ export default class SalaryDetail extends React.Component { this.setState({ loading: false }); const childFrameObj = document.getElementById("atdTable"); const salaryAcctRecordId = getQueryString("id"); + const { current, pageSize } = this.pageInfo; const payload = { type: "PR", listType: "", url: "/api/bs/hrmsalary/salaryacct/acctresult/list", queryParams: { salaryAcctRecordId, - ...this.props.employeeName + ...this.props.employeeName, + current, pageSize } }; childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); From b6ac297242f4af24d003f554972633c083522c7f 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, 31 Aug 2023 11:15:32 +0800 Subject: [PATCH 5/6] =?UTF-8?q?hotfix-=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E4=BB=A5=E5=8F=8A=E8=96=AA=E8=B5=84=E6=A1=A3?= =?UTF-8?q?=E6=A1=88=E7=9A=84=E5=AF=BC=E5=85=A5=E4=B8=8B=E8=BD=BD=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/calculateDetail/index.less | 6 ++ .../pages/calculateDetail/salaryDetail.js | 17 ++---- .../pages/calculateDetail/userSure.js | 59 +++++++++++++++---- .../payrollFiles/components/importMenu.js | 6 +- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 3 + .../socialSecurityBenefits/archives/index.js | 4 +- .../standingBookDetail/components/index.less | 26 +++++++- .../standingBookDetail/index.js | 58 +++++++++--------- 8 files changed, 120 insertions(+), 59 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.less b/pc4mobx/hrmSalary/pages/calculateDetail/index.less index 64b163fa..37d09d86 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/index.less +++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.less @@ -270,3 +270,9 @@ } } } + +.salaryMonthTip-layout{ + display: flex; + flex-direction: column; + +} diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js index 327d9b72..84e7dbf5 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js @@ -6,9 +6,10 @@ import EditSalaryDetail from "./editSalaryDetail"; import SlideModalTitle from "../../components/slideModalTitle"; import { getQueryString } from "../../util/url"; import { inject, observer } from "mobx-react"; +import ProgressModal from "../../components/progressModal"; +import { SalaryMonthTip } from "./userSure"; import { toJS } from "mobx"; import "./index.less"; -import ProgressModal from "../../components/progressModal"; @inject("calculateStore", "taxAgentStore") @observer @@ -215,17 +216,9 @@ export default class SalaryDetail extends React.Component {
薪资所属月:{baseSalarySobCycle.salaryMonth} : ""} placement="topLeft" /> {/*暂时隐藏*/} diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js index 89f77d11..b7c3ac5f 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js @@ -1,10 +1,20 @@ import React from "react"; import { Button, Col, Icon, message, Modal, Row } from "antd"; -import { WeaBrowser, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom"; +import { + WeaBrowser, + WeaFormItem, + WeaHelpfulTip, + WeaInput, + WeaLocaleProvider, + WeaSearchGroup, + WeaSelect, + WeaTab +} from "ecCom"; import { inject, observer } from "mobx-react"; -import "./index.less"; import { getQueryString } from "../../util/url"; +import "./index.less"; +const { getLabel } = WeaLocaleProvider; @inject("calculateStore", "salaryFileStore") @observer export default class UserSure extends React.Component { @@ -120,7 +130,7 @@ export default class UserSure extends React.Component { url: "/api/bs/hrmsalary/salaryacct/acctemployee/list", queryParams: { salaryAcctRecordId, - ...this.state.searchItemsValue, + ...this.state.searchItemsValue } }; childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); //window.postMessage @@ -375,12 +385,8 @@ export default class UserSure extends React.Component { 薪资所属月: : ""} placement="topLeft" /> @@ -430,7 +436,7 @@ export default class UserSure extends React.Component { url: "/api/bs/hrmsalary/salaryacct/acctemployee/list", queryParams: { salaryAcctRecordId, - ...this.state.searchItemsValue, + ...this.state.searchItemsValue } }; childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); //window.postMessage @@ -460,7 +466,7 @@ export default class UserSure extends React.Component { url: "/api/bs/hrmsalary/salaryacct/reducedemployee/list", queryParams: { salaryAcctRecordId, - ...this.state.searchItemsValue, + ...this.state.searchItemsValue } }; childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); @@ -490,7 +496,7 @@ export default class UserSure extends React.Component { url: "/api/bs/hrmsalary/salaryacct/addedemployee/list", queryParams: { salaryAcctRecordId, - ...this.state.searchItemsValue, + ...this.state.searchItemsValue } }; childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); @@ -587,3 +593,32 @@ export default class UserSure extends React.Component { ); } } + +export const SalaryMonthTip = (props) => { + const { baseSalarySobCycle } = props; + const { salaryCycle, taxCycle, attendCycle, socialSecurityCycle } = baseSalarySobCycle; + const { fromDate: salaryCycleFromDate, endDate: salaryCycleEndDate } = salaryCycle; + const { fromDate: attendCycleFromDate, endDate: attendCycleEndDate } = attendCycle; + return ( +
+
+
{getLabel(543375, "薪资周期")}
+
{`${salaryCycleFromDate}${getLabel(15322, "至")}${salaryCycleEndDate}`}
+
+
+
{getLabel(542240, "税款所属期")}
+
{taxCycle}
+
+
+
{getLabel(543475, "考勤取值周期")}
+
{`${attendCycleFromDate}${getLabel(15322, "至")}${attendCycleEndDate}`}
+
+
+
{getLabel(543466, "福利台账月份")}
+
+ {`${getLabel(19422, "引用")}${socialSecurityCycle}${getLabel(543476, "的福利台账数据")}`} +
+
+
+ ); +}; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js index 42f95e62..2e0b01d6 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js @@ -3,6 +3,7 @@ import ImportModal from "../../../components/importModal"; import * as API from "../../../apis/payrollFiles"; import { Menu, Modal } from "antd"; import "../index.less"; +import { convertToUrlString } from "../../../util/url"; class ImportMenu extends Component { constructor(props) { @@ -114,7 +115,7 @@ class ImportMenu extends Component { }; render() { - const { importType, refreshList, isExtEmp } = this.props; + const { importType, refreshList, isExtEmp, searchItemsValue = {} } = this.props; const { importParams, previewColumns, previewDataSource } = this.state; let params = ""; if (importParams.importType === "init" || importParams.importType === "salaryItemAdjust") { @@ -153,8 +154,7 @@ class ImportMenu extends Component { }} previewImport={(params) => this.salaryArchivePreview(params)} importFile={(params) => this.handleImportFile(params)} - templateLink={ - "/api/bs/hrmsalary/salaryArchive/downloadTemplate?importType=" + params + templateLink={`/api/bs/hrmsalary/salaryArchive/downloadTemplate?importType=${params}&${convertToUrlString(searchItemsValue)}` } visiable={importParams.visible} onCancel={() => { diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index 1cf37553..74326a8f 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -433,6 +433,7 @@ class Index extends Component { { this.query(); this.setState({ selectedRowKeys: [] }); @@ -523,6 +524,7 @@ class Index extends Component { { this.query(); this.setState({ selectedRowKeys: [] }); @@ -834,6 +836,7 @@ class Index extends Component {
this.importRef = dom} + searchItemsValue={this.state.searchItemsValue} refreshList={() => { this.query(); this.setState({ selectedRowKeys: [] }); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index 8b078187..cab89a87 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -293,8 +293,10 @@ export default class Archives extends React.Component { // 模板点击 handleTemplateLinkClick = (exportData) => { + const { archivesStore: { form } } = this.props; + const formParams = form.getFormParams() || {}; const { selectedKey } = this.state; - let url = `/api/bs/hrmsalary/scheme/template/export?exportData=${exportData}&runStatuses=${selectedKey === "pending" ? "1" : "2,3"}`; + let url = `/api/bs/hrmsalary/scheme/template/export?exportData=${exportData}&runStatuses=${selectedKey === "pending" ? "1" : "2,3"}&${convertToUrlString(formParams)}`; window.open(`${window.location.origin}${url}`); }; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less index 9ed9d668..7bb28208 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less @@ -2,12 +2,26 @@ display: flex; flex-direction: column; height: 100%; + background: #f6f6f6; + + .wea-new-top-req-wapper .wea-new-top-req-main { + background: #f6f6f6 !important; + } + + .wea-new-top-req-wapper .wea-new-top-req { + z-index: 0 !important; + } + + .wea-search-tab, .wea-input-focus { + background: #f6f6f6; + } .normalWapper { - flex: 1; + height: 100%; display: flex; flex-direction: column; overflow: hidden; + padding: 0 16px; .tableWrapper { flex: 1; @@ -16,12 +30,18 @@ .ant-spin-nested-loading, .ant-spin-container { height: 100%; } + + .wea-new-table { + background: #fff; + } } .topContent { padding: 8px 20px; display: flex; align-items: center; + background: #fff; + margin-top: 16px; .month { margin-right: 26px; @@ -69,14 +89,16 @@ //退差;补差 .regressionWrapper, .differenceWrapper { - flex: 1; + height: 100%; overflow: hidden; display: flex; flex-direction: column; + padding: 16px; .tableWrapper { flex: 1; overflow: hidden; + .ant-spin-nested-loading, .ant-spin-container { height: 100%; } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js index a5ae1a93..f58a9740 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js @@ -6,13 +6,15 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaTab } from "ecCom"; +import { WeaLocaleProvider, WeaReqTop } from "ecCom"; import NormalIndex from "./components/normal"; import OverViewIndex from "./components/overView"; import AbnormalListIndex from "./components/abnormalList"; import Regression from "./components/regression"; import MakeupDifference from "./components/makeupDifference"; +const { getLabel } = WeaLocaleProvider; + @inject("standingBookStore") @observer class StandingBookDetail extends Component { @@ -43,7 +45,7 @@ class StandingBookDetail extends Component { newTabList.push(newTabList.splice(_.findIndex(newTabList, it => it.id === "4"), 1)[0]); this.setState({ selectedKey: newTabList[0].id, - tabList: _.map(newTabList, it => ({ title: it.content, viewcondition: it.id })), + tabList: _.map(newTabList, it => ({ title: it.content, key: it.id })), remarks, billMonth }); }); @@ -53,33 +55,31 @@ class StandingBookDetail extends Component { const { selectedKey, tabList, remarks, billMonth } = this.state; return (
- { - this.setState({ selectedKey }); - }} - /> - { - (selectedKey === "1" || selectedKey === "3") && - - } - { - selectedKey === "2" && - - } - { - selectedKey === "4" && - - } - { - selectedKey === "5" && - } - { - selectedKey === "6" && - } + } + iconBgcolor="#F14A2D" showDropIcon={false} tabDatas={tabList} selectedKey={selectedKey} + onChange={selectedKey => this.setState({ selectedKey })} + > + { + (selectedKey === "1" || selectedKey === "3") && + + } + { + selectedKey === "2" && + + } + { + selectedKey === "4" && + + } + { + selectedKey === "5" && + } + { + selectedKey === "6" && + } +
); } From a5e0ca30845e79993c6423751f8698d0bd245a8a 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, 31 Aug 2023 15:02:56 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=85=AC=E5=BC=8F=E4=BF=9D=E5=AD=98=E5=8F=82=E6=95=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ledgerSalaryItemEditSlide.js | 2 +- .../ledgerPage/components/ledgerSalaryItemTable.js | 9 +++++---- .../pages/salaryItem/customSalaryItemSlide.js | 14 +++++++++----- .../hrmSalary/pages/salaryItem/formalFormModal.js | 2 +- .../hrmSalary/pages/salaryItem/salaryItemForm.js | 2 +- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemEditSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemEditSlide.js index de0c2871..d476edbd 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemEditSlide.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemEditSlide.js @@ -23,7 +23,7 @@ class LedgerSalaryItemEditSlide extends Component { const key = Object.keys(params)[0]; this.props.onUpdateRequest(request, key); }; - handleShowFormal = () => this.props.onEditFormnul(); + handleShowFormal = (salaryItemName) => this.props.onEditFormnul(salaryItemName); render() { return ( diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js index 55892da2..123b74ab 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js @@ -28,7 +28,8 @@ class LedgerSalaryItemTable extends Component { visible: false, formulaId: "", valueType: "", - dataType: "" + dataType: "", + name: "" } }; } @@ -163,13 +164,13 @@ class LedgerSalaryItemTable extends Component { originSqlContent: ((valueType.toString() === "2" && (!originFormulaContent || originFormulaContent === " ")) || (valueType.toString() === "1") || (valueType.toString() === "2" && originFormulaContent)) ? " " : originSqlContent }, salaryItemId); }; - handleEditFormnul = () => { + handleEditFormnul = (salaryItemName) => { const { salaryItemPayload, editFormulModal } = this.state; const { record } = salaryItemPayload; const { valueType, formulaId, dataType, originFormulaContent, originSqlContent } = record; this.setState({ editFormulModal: { - ...editFormulModal, visible: true, valueType, dataType, + ...editFormulModal, visible: true, valueType, dataType, name: salaryItemName, formulaId: ((valueType.toString() === "2" && (originFormulaContent || originFormulaContent !== " ")) || valueType.toString() === "3" && (originSqlContent || originSqlContent === " ")) ? formulaId : "" } }); @@ -180,7 +181,7 @@ class LedgerSalaryItemTable extends Component { editFormulModal: { ...editFormulModal, visible: false, - formulaId: "", + formulaId: "", name: "", valueType: "", dataType: "" } }); diff --git a/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js b/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js index fe601cc5..9e407f56 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js @@ -8,7 +8,8 @@ export default class CustomSalaryItemSlide extends React.Component { super(props); this.state = { showForm: false, - formalModalVisible: false + formalModalVisible: false, + salaryItemName: "" }; } @@ -16,9 +17,10 @@ export default class CustomSalaryItemSlide extends React.Component { this.props.onChange({ ...this.props.request, ...params }); }; - handleShowFormal = () => { + handleShowFormal = (salaryItemName) => { this.setState({ - formalModalVisible: true + formalModalVisible: true, + salaryItemName }); }; @@ -34,12 +36,13 @@ export default class CustomSalaryItemSlide extends React.Component { render() { const { request } = this.props; const { valueType, dataType, formulaId } = request; - const { formalModalVisible } = this.state; + const { formalModalVisible, salaryItemName } = this.state; return (
{formalModalVisible && this.setState({ - formalModalVisible: false + formalModalVisible: false, + salaryItemName: "" })} />}
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js index 58808c61..98c706fc 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js @@ -208,7 +208,7 @@ export default class FormalFormModal extends React.Component { }); this.parameters = result; let params = { - name: "公式1", + name: this.props.name || "公式1", description: "备注", module: "salary", useFor: "salaryitem", diff --git a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js index 73418bad..16a8a099 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js @@ -133,7 +133,7 @@ class SalaryItemForm extends Component { (type === "INPUT" && display) ? (key === "originSqlContent" || key === "originFormulaContent") && onShowFormal()} + onClick={() => (key === "originSqlContent" || key === "originFormulaContent") && onShowFormal(request["name"])} onChange={v => this.handleChangeSalaryFiledItems(key, v)}/> : (type === "SWITCH" && display) ?