From ab263e01ed12c1972e02fbfef43430b042923df6 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, 2 Jun 2023 15:18:02 +0800 Subject: [PATCH 01/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E8=AF=A6=E6=83=85=E7=BC=96=E8=BE=91=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=B7=BB=E5=8A=A0=E9=98=B2=E6=8A=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/calculateDetail/salaryDetail.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js index 6c018985..0ff9d20c 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js @@ -16,6 +16,7 @@ export default class SalaryDetail extends React.Component { constructor(props) { super(props); this.state = { + loading: false, progressVisible: false, progress: 0, columnIndex: "", @@ -177,13 +178,12 @@ export default class SalaryDetail extends React.Component { } // 侧边栏保存 - handleEditSlideSave() { + handleEditSlideSave = () => { const { calculateStore } = this.props; const { saveAcctResult } = calculateStore; - this.setState({ - slideVisiable: false - }); + this.setState({ loading: true }); saveAcctResult(this.recordId).then(() => { + this.setState({ loading: false }); const childFrameObj = document.getElementById("atdTable"); const salaryAcctRecordId = getQueryString("id"); const payload = { @@ -198,11 +198,11 @@ export default class SalaryDetail extends React.Component { childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); // acctResultList({ salaryAcctRecordId: this.id }); }); - } + }; render() { - const { slideVisiable, columnIndex } = this.state; + const { slideVisiable, columnIndex, loading } = this.state; const { calculateStore, taxAgentStore: { showOperateBtn } } = this.props; const { baseSalarySobCycle, columnDescList } = calculateStore; @@ -271,7 +271,8 @@ export default class SalaryDetail extends React.Component { subtitle="编辑薪资" editable={true} showOperateBtn={showOperateBtn} - onSave={() => this.handleEditSlideSave()} + onSave={this.handleEditSlideSave} + loading={loading} /> } content={} From 1aa2fb4793a56a15e17b62bc9f9c0f6aa3dd24ec 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, 8 Jun 2023 11:27:27 +0800 Subject: [PATCH 02/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E6=89=A3=E7=BC=B4=E4=B9=89=E5=8A=A1=E4=BA=BA=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/taxAgent/editConditions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/taxAgent/editConditions.js b/pc4mobx/hrmSalary/pages/taxAgent/editConditions.js index 542e8869..2f10ce9b 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/editConditions.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/editConditions.js @@ -54,7 +54,7 @@ export const editConditions = [ conditionType: "INPUTNUMBER", domkey: ["sortedIndex"], fieldcol: 14, - label: "排序", + label: "显示顺序", labelcol: 6, value: "", viewAttr: 2, @@ -92,7 +92,7 @@ export const decentralizationConditions = [ conditionType: "INPUTNUMBER", domkey: ["sortedIndex"], fieldcol: 14, - label: "排序", + label: "显示顺序", labelcol: 6, value: "", viewAttr: 2, From 42f2a8ac555f0bd107a3d561508554b3eb176a8e 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, 9 Jun 2023 10:01:07 +0800 Subject: [PATCH 03/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E9=85=AC?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8A=A5=E8=A1=A8=E5=88=97=E8=A1=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BC=98=E5=8C=96=E4=BB=A5=E5=8F=8A=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86=E5=88=97=E8=A1=A8=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/reportView/components/reportContent.js | 2 +- pc4mobx/hrmSalary/pages/reportView/index.js | 12 +++++++++--- .../pages/salaryItem/systemSalaryItemModal.js | 10 +++++++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js index 8db33b36..e0c3c2bf 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js @@ -86,7 +86,7 @@ class ReportContent extends Component { this.setState({ loading: true }); reportStatisticsReportGetData(payload).then(({ status, data }) => { this.setState({ loading: false }); - if (status) { + if (status && id === data.reportId) { const { countResult, columns, pageInfo: { list } } = data; this.setState({ countResult, diff --git a/pc4mobx/hrmSalary/pages/reportView/index.js b/pc4mobx/hrmSalary/pages/reportView/index.js index e16680a2..2031c1c5 100644 --- a/pc4mobx/hrmSalary/pages/reportView/index.js +++ b/pc4mobx/hrmSalary/pages/reportView/index.js @@ -135,9 +135,15 @@ class Index extends Component { this.setState({ - statisticalPayload: { visible: true, id: report.id, dimension: report.dimensionId } - })} + onClick={() => { + if (this.reportRef.state.loading) { + message.info(getLabel(111, "列表正在加载中,请稍后")) + } else { + this.setState({ + statisticalPayload: { visible: true, id: report.id, dimension: report.dimensionId } + }); + } + }} /> diff --git a/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js b/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js index ba12bf48..3530ee29 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js @@ -34,7 +34,15 @@ export default class SystemSalaryItemModal extends React.Component { if (status) { const { columns, list: dataSource, pageNum: current, pageSize, total } = data; this.setState({ - columns, dataSource, + columns: _.map(columns, item => { + return { + ...item, + render: (text) => { + return {text}; + } + }; + }), + dataSource, pageInfo: { ...pageInfo, current, pageSize, total } }); } From b930c35e823f9773b23de157d7f126d262fd8fc0 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, 9 Jun 2023 10:47:51 +0800 Subject: [PATCH 04/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E9=85=AC?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8A=A5=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/reportView/components/reportContent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js index e0c3c2bf..e87e1eed 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js @@ -86,7 +86,7 @@ class ReportContent extends Component { this.setState({ loading: true }); reportStatisticsReportGetData(payload).then(({ status, data }) => { this.setState({ loading: false }); - if (status && id === data.reportId) { + if (status && id.toString() === data.reportId.toString()) { const { countResult, columns, pageInfo: { list } } = data; this.setState({ countResult, From 4d91a9b3651a19d80ed87fc0dcc2ac47cfe45723 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, 12 Jun 2023 14:51:09 +0800 Subject: [PATCH 05/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E7=94=B3=E6=8A=A5=E8=A1=A8=E6=B7=BB=E5=8A=A0=E6=92=A4=E5=9B=9E?= =?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/declare.js | 14 +++-- .../hrmSalary/pages/declare/generateModal.js | 29 +++++++-- pc4mobx/hrmSalary/pages/declare/index.js | 63 ++++++++++++++----- pc4mobx/hrmSalary/pages/declare/index.less | 2 +- 4 files changed, 84 insertions(+), 24 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/declare.js b/pc4mobx/hrmSalary/apis/declare.js index 8cf65377..360c8b62 100644 --- a/pc4mobx/hrmSalary/apis/declare.js +++ b/pc4mobx/hrmSalary/apis/declare.js @@ -1,4 +1,5 @@ import { WeaTools } from 'ecCom'; +import { postFetch } from '../util/request'; //个税申报表-个税申报表列表 export const getDeclareList = params => { @@ -7,7 +8,7 @@ export const getDeclareList = params => { mode: 'cors', headers: { 'Content-Type': 'application/json' - }, + }, body: JSON.stringify(params) }).then(res => res.json()) } @@ -24,7 +25,7 @@ export const saveDeclare = params => { mode: 'cors', headers: { 'Content-Type': 'application/json' - }, + }, body: JSON.stringify(params) }).then(res => res.json()) } @@ -41,7 +42,7 @@ export const getDetailList = params => { mode: 'cors', headers: { 'Content-Type': 'application/json' - }, + }, body: JSON.stringify(params) }).then(res => res.json()) } @@ -52,13 +53,16 @@ export const exportSalaryArchive = (id = "") => { fetch('/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=' + id).then(res => res.blob().then(blob => { var filename=`个税申报表.xlsx` var a = document.createElement('a'); - var url = window.URL.createObjectURL(blob); + var url = window.URL.createObjectURL(blob); a.href = url; a.download = filename; a.click(); window.URL.revokeObjectURL(url); })) } - +//个税申报表-撤回申报 +export const withDrawTaxDeclaration = (params) => { + return postFetch('/api/bs/hrmsalary/taxdeclaration/withDrawTaxDeclaration', params); +} diff --git a/pc4mobx/hrmSalary/pages/declare/generateModal.js b/pc4mobx/hrmSalary/pages/declare/generateModal.js index a8f41b37..cde3f435 100644 --- a/pc4mobx/hrmSalary/pages/declare/generateModal.js +++ b/pc4mobx/hrmSalary/pages/declare/generateModal.js @@ -1,9 +1,19 @@ import React from "react"; -import { WeaDatePicker, WeaDialog, WeaError, WeaFormItem, WeaHelpfulTip, WeaSelect } from "ecCom"; +import { + WeaDatePicker, + WeaDialog, + WeaError, + WeaFormItem, + WeaHelpfulTip, + WeaLocaleProvider, + WeaSelect, + WeaTextarea +} from "ecCom"; import { Button } from "antd"; import { inject, observer } from "mobx-react"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("declareStore", "taxAgentStore") @observer export default class GenerateModal extends React.Component { @@ -12,6 +22,7 @@ export default class GenerateModal extends React.Component { this.state = { date: "", taxAgentId: "", + description: "", loading: false }; } @@ -19,7 +30,7 @@ export default class GenerateModal extends React.Component { // 生成申报表 handleGenerate = () => { const { declareStore: { saveDeclare } } = this.props; - const { date, taxAgentId } = this.state; + const { date, taxAgentId, description } = this.state; if (_.isEmpty(date) && _.isEmpty(taxAgentId)) { this.refs.weaError.showError(); this.refs.weaError1.showError(); @@ -36,7 +47,7 @@ export default class GenerateModal extends React.Component { return; } this.setState({ loading: true }); - saveDeclare({ salaryMonthStr: date, taxAgentId }).then(() => { + saveDeclare({ salaryMonthStr: date, taxAgentId, description }).then(() => { this.setState({ loading: false }); this.props.onGenerate(); }).catch(() => { @@ -116,13 +127,23 @@ export default class GenerateModal extends React.Component { }} /> + + this.setState({ description })} + /> + ); diff --git a/pc4mobx/hrmSalary/pages/declare/index.js b/pc4mobx/hrmSalary/pages/declare/index.js index b56d1f1a..57e37c37 100644 --- a/pc4mobx/hrmSalary/pages/declare/index.js +++ b/pc4mobx/hrmSalary/pages/declare/index.js @@ -1,13 +1,15 @@ import React from "react"; import { inject, observer } from "mobx-react"; -import { Button, DatePicker } from "antd"; -import { WeaNewScroll, WeaTop } from "ecCom"; +import { Button, DatePicker, message, Modal } from "antd"; +import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom"; import CustomTab from "../../components/customTab"; import CustomTable from "../../components/customTable"; import GenerateModal from "./generateModal"; -import { getDeclareList } from "../../apis/declare"; +import { getDeclareList, withDrawTaxDeclaration } from "../../apis/declare"; +import { sysConfCodeRule } from "../../apis/ruleconfig"; import moment from "moment"; +const getLabel = WeaLocaleProvider.getLabel; const { MonthPicker } = DatePicker; @inject("taxAgentStore") @observer @@ -15,6 +17,7 @@ export default class Declare extends React.Component { constructor(props) { super(props); this.state = { + showWithDrawBtn: false, declarationModalVisible: false, startDate: moment(new Date()).startOf("year").format("YYYY-MM"), endDate: moment(new Date()).startOf("month").format("YYYY-MM"), @@ -32,6 +35,7 @@ export default class Declare extends React.Component { componentWillMount() { const { taxAgentStore: { getTaxAgentSelectListAsAdmin } } = this.props; this.getDeclareList(); + this.sysConfCodeRule(); getTaxAgentSelectListAsAdmin(); } @@ -56,7 +60,21 @@ export default class Declare extends React.Component { } }).catch(() => this.setState({ loading: false })); }; - + sysConfCodeRule = () => { + sysConfCodeRule({ code: "WITHDRAW_TAX_DECLARATION" }).then(({ status, data }) => { + if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" }); + }); + }; + withDrawTaxDeclaration = (taxDeclarationId) => { + withDrawTaxDeclaration({ taxDeclarationId }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(111, "撤回成功")); + this.getDeclareList(); + } else { + message.error(errormsg || getLabel(111, "撤回失败")); + } + }); + }; // 日期区间改变事件 handleRangePickerChange = (type, value) => { this.setState({ @@ -81,7 +99,7 @@ export default class Declare extends React.Component { render() { const { taxAgentStore: { showOperateBtn } } = this.props; - const { loading, columns, dataSource, pageInfo } = this.state; + const { loading, columns, dataSource, pageInfo, showWithDrawBtn } = this.state; const renderRightOperation = () => { const { startDate, endDate } = this.state; return ( @@ -135,15 +153,32 @@ export default class Declare extends React.Component { dataIndex: "operate", render: (text, record) => { return ( - { - window.open( - "/spa/hrmSalary/static/index.html#/main/hrmSalary/generateDeclarationDetail?id=" + - record.id - ); - }}> - 查看 - + + { + window.open( + "/spa/hrmSalary/static/index.html#/main/hrmSalary/generateDeclarationDetail?id=" + + record.id + ); + }}> + 查看 + + { + showWithDrawBtn && + { + Modal.confirm({ + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认撤回该条数据吗?"), + onOk: () => this.withDrawTaxDeclaration(record.id) + }); + }} + > + {getLabel(111, "撤回")} + + } + ); } } diff --git a/pc4mobx/hrmSalary/pages/declare/index.less b/pc4mobx/hrmSalary/pages/declare/index.less index d83fc525..81e72b6f 100644 --- a/pc4mobx/hrmSalary/pages/declare/index.less +++ b/pc4mobx/hrmSalary/pages/declare/index.less @@ -15,7 +15,7 @@ .wea-select { .ant-select { - width: 90% !important; + width: 100% !important; .ant-select-selection { border-radius: 0 !important; From 644df23ccc7b438b3e54f989a79fd8d40ee8afae 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, 12 Jun 2023 16:22:27 +0800 Subject: [PATCH 06/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E5=88=97=E8=A1=A8=E5=BB=B6=E8=BF=9F=E7=9A=84?= =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index 49b2c419..f094e5b0 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -247,7 +247,7 @@ class Index extends Component { }); queryList(payload, searchItemsValue, url).then(({ data, status }) => { this.setState({ loading: { ...loading, query: false } }); - if (status) { + if (status && selectedKey === _.lowerCase(data.listType)) { const { pageInfo: paganition } = data; const { list: dataSource, total, pageNum: current, pageSize } = paganition; this.setState({ From 797cb912a293fc3dbd7daee4057f586c4c75f12c 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, 13 Jun 2023 09:10:23 +0800 Subject: [PATCH 07/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=A8=A1=E6=9D=BF=E5=9F=BA=E7=A1=80=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=B0=B4=E5=8D=B0=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payroll/index.js | 24 ++++++++- pc4mobx/hrmSalary/pages/payroll/index.less | 22 ++++++++ .../pages/payroll/templateBaseSettings.js | 52 +++++++++++++++++++ 3 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/payroll/index.less create mode 100644 pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index 9297b134..1a6307d7 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -3,8 +3,16 @@ import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; import { Button, DatePicker, message, Modal } from "antd"; import moment from "moment"; -import { WeaHelpfulTip, WeaInputSearch, WeaNewScroll, WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; -import { renderLoading } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 +import { + WeaHelpfulTip, + WeaInputSearch, + WeaLocaleProvider, + WeaNewScroll, + WeaSelect, + WeaSlideModal, + WeaTop +} from "ecCom"; +import { renderLoading } from "../../util"; import CustomTab from "../../components/customTab"; import StepSlide from "../../components/stepSlide"; import BaseInformForm from "./stepForm/baseInformForm"; @@ -12,11 +20,13 @@ import ShowSettingForm from "./stepForm/showSettingForm"; import SlideModalTitle from "../../components/slideModalTitle"; import TemplateSettingList from "./templateSettingList"; import TemplateSettingForm from "./stepForm/tmplateSettingForm"; +import TemplateBaseSettings from "./templateBaseSettings"; import CopyModal from "./copyModal"; import SalarySendList from "./SalarySendList"; import { getReplenishForm } from "../../apis/payroll"; import "../dataAcquisition/cumDeduct/index.less"; +const getLabel = WeaLocaleProvider.getLabel; const { MonthPicker } = DatePicker; @inject("payrollStore", "taxAgentStore") @@ -256,6 +266,10 @@ export default class Payroll extends React.Component { { title: "工资单模板设置", viewcondition: "1" + }, + { + title: getLabel(111, "工资单模板基础设置"), + viewcondition: "2" } ]; const renderRightOperation = () => { @@ -333,6 +347,8 @@ export default class Payroll extends React.Component { }}/> ); + } else if (this.state.selectedKey === "2") { + return ; } }; const steps = ["基础设置", "正常核算工资单模板", "补发工资单模版"]; @@ -405,6 +421,10 @@ export default class Payroll extends React.Component { onDelete={(record) => this.handleTemplateListDelete(record)} /> } + { + this.state.selectedKey === "2" && + + } diff --git a/pc4mobx/hrmSalary/pages/payroll/index.less b/pc4mobx/hrmSalary/pages/payroll/index.less new file mode 100644 index 00000000..f760536f --- /dev/null +++ b/pc4mobx/hrmSalary/pages/payroll/index.less @@ -0,0 +1,22 @@ +.waterMarkWrapper { + .wea-form-cell-wrapper { + border: 1px solid #e5e5e5; + border-bottom: none; + } + + .wea-form-item { + padding: 5px 16px; + border-bottom: 1px solid #e5e5e5; + + .waterMarkTitle { + margin-left: 10px; + cursor: pointer; + color: #2db7f5; + position: absolute; + display: inline-block; + width: 48px; + top: 50%; + margin-top: -10px; + } + } +} diff --git a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js new file mode 100644 index 00000000..e7ca064b --- /dev/null +++ b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js @@ -0,0 +1,52 @@ +/* + * Author: 黎永顺 + * name: 工资单模板基础设置 + * Description: + * Date: 2023/6/12 + */ +import React, { Component } from "react"; +import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class TemplateBaseSettings extends Component { + constructor(props) { + super(props); + this.state = { + watermarkStatus: "0", + watermark: "DEFAULT" + }; + } + + render() { + const { watermarkStatus, watermark } = this.state; + return ( + + + this.setState({ watermarkStatus, watermark: "DEFAULT" })}/> + + { + watermarkStatus === "1" && + + this.setState({ watermark })} + /> + { + watermark === "CUSTOM" && + {getLabel(111, "水印设置")} + } + + } + + ); + } +} + +export default TemplateBaseSettings; From 19e2958a561df8bc91b384f54dc6edff17964494 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, 13 Jun 2023 09:18:58 +0800 Subject: [PATCH 08/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E6=9D=83=E9=99=90=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/stores/taxAgent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/stores/taxAgent.js b/pc4mobx/hrmSalary/stores/taxAgent.js index d197db2e..38fa966d 100644 --- a/pc4mobx/hrmSalary/stores/taxAgent.js +++ b/pc4mobx/hrmSalary/stores/taxAgent.js @@ -147,7 +147,7 @@ export class TaxAgentStore { this.setSalaryItemBtn((isOpenDevolution && (isChief || isAdminEnable))); //薪酬统计报表权限 this.setStatisticsReportBtn(!isOpenDevolution ? true : !!(isAdminEnable || isChief)); - this.setPayrollPermission(isAdminEnable && isOpenDevolution); + this.setPayrollPermission(isAdminEnable && isOpenDevolution || !isOpenDevolution); resolve({ status, data }); } else { reject(); From 92c73b846a1555b296a8465b0f394a1d967bb0ee 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, 15 Jun 2023 18:28:06 +0800 Subject: [PATCH 09/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=B0=B4=E5=8D=B0=E8=AE=BE=E7=BD=AE=E4=B8=8E=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E7=AD=89=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/payroll.js | 13 ++ pc4mobx/hrmSalary/components/upload/index.js | 84 ++++++++ .../hrmSalary/components/upload/index.less | 68 +++++++ pc4mobx/hrmSalary/index.js | 5 + pc4mobx/hrmSalary/pages/mySalary/index.js | 8 +- .../hrmSalary/pages/mySalary/mySalaryView.js | 39 ++++ .../pages/payroll/components/config.js | 14 ++ .../pages/payroll/components/index.less | 127 ++++++++++++ .../payroll/components/waterMarkSetModal.js | 191 ++++++++++++++++++ .../payroll/components/wmContentSetModal.js | 188 +++++++++++++++++ pc4mobx/hrmSalary/pages/payroll/index.js | 13 +- .../pages/payroll/templateBaseSettings.js | 58 +++++- .../pages/payroll/watermarkPreview.js | 56 +++++ pc4mobx/hrmSalary/stores/mySalary.js | 42 +++- 14 files changed, 895 insertions(+), 11 deletions(-) create mode 100644 pc4mobx/hrmSalary/components/upload/index.js create mode 100644 pc4mobx/hrmSalary/components/upload/index.less create mode 100644 pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js create mode 100644 pc4mobx/hrmSalary/pages/payroll/components/config.js create mode 100644 pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js create mode 100644 pc4mobx/hrmSalary/pages/payroll/components/wmContentSetModal.js create mode 100644 pc4mobx/hrmSalary/pages/payroll/watermarkPreview.js diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js index eaf11a11..e133c537 100644 --- a/pc4mobx/hrmSalary/apis/payroll.js +++ b/pc4mobx/hrmSalary/apis/payroll.js @@ -367,3 +367,16 @@ export const getAvailableSalaryItemSet = (params) => { export const salaryBillSendSum = (params) => { return postFetch("/api/bs/hrmsalary/salaryBill/send/sum", params); }; + +// 工资单基础设置-获取设置列表 +export const getSalaryBillBaseSetForm = (id) => { + return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/baseSet/getForm", "get", {}); +}; +//工资单基础设置-保存工资单基础设置(设置水印) +export const salaryBillBaseSetSave = (params) => { + return postFetch("/api/bs/hrmsalary/salaryBill/baseSet/save", params); +}; +//工资单基础设置-保存工资单基础设置(水印预览) +export const salaryBillBaseSetPreviewWaterMark = (params) => { + return postFetch("/api/bs/hrmsalary/salaryBill/baseSet/previewWaterMark", params); +}; diff --git a/pc4mobx/hrmSalary/components/upload/index.js b/pc4mobx/hrmSalary/components/upload/index.js new file mode 100644 index 00000000..fd7cdd57 --- /dev/null +++ b/pc4mobx/hrmSalary/components/upload/index.js @@ -0,0 +1,84 @@ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaTools, WeaUpload } from "ecCom"; +import { Icon, Modal } from "antd"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; +const { viewer } = WeaTools; + +class ImageUploadList extends Component { + constructor(props) { + super(props); + this.state = { + imageUrl: "" + }; + } + + componentDidMount() { + const { wmImg } = this.props; + if (!_.isEmpty(wmImg)) { + this.setState({ + imageUrl: wmImg[0].imgSrc + }); + } + } + + handleChange = (ids, list) => { + this.setState({ + imageUrl: list[0].imgSrc + }, () => this.props.onChange([{ imgSrc: this.state.imageUrl }])); + }; + handleDelete = () => { + Modal.confirm({ + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认要删除吗?"), + onOk: () => { + this.setState({ + imageUrl: "" + }, () => this.props.onChange(null)); + } + }); + }; + + + render() { + const { imageUrl } = this.state; + const uploadProps = { + uploadUrl: "/api/doc/upload/uploadFile", + listType: "img", + limitType: "jpg,jpeg,png,gif", + category: "string", + maxFilesNumber: 1, + onChange: this.handleChange + }; + const imgPreviewProps = { + src: imageUrl, + width: 100, + height: 100 + }; + return ( +
+ { + imageUrl && +
+ +
+ +
+
+ } + { + !imageUrl && + +
+ +
{getLabel(111, "上传图片")}
+
+
+ } +
+ ); + } +} + +export default ImageUploadList; diff --git a/pc4mobx/hrmSalary/components/upload/index.less b/pc4mobx/hrmSalary/components/upload/index.less new file mode 100644 index 00000000..577de7c7 --- /dev/null +++ b/pc4mobx/hrmSalary/components/upload/index.less @@ -0,0 +1,68 @@ +.textSetting { + .uploadWrapper { + display: flex; + align-items: center; + position: relative; + + .previewWrapper { + border: 1px solid #d9d9d9 !important; + + img { + width: 100%; + height: 100%; + margin-left: 0 !important; + cursor: pointer; + } + + .operateWrapper { + display: none; + } + } + + .previewWrapper:hover { + .operateWrapper { + display: flex; + position: absolute; + align-items: center; + justify-content: flex-end; + width: 30px; + height: 20px; + background-color: rgba(0, 0, 0, 0.3); + bottom: 4px; + right: 13px; + border-radius: 3px; + padding-right: 4px; + } + } + } + + .upload-select-picture-card, .previewWrapper { + border: 1px dashed #d9d9d9; + width: 96px; + height: 96px; + padding: 0; + border-radius: 6px; + background-color: #fbfbfb; + text-align: center; + cursor: pointer; + -webkit-transition: border-color .3s ease; + -o-transition: border-color .3s ease; + transition: border-color .3s ease; + display: flex; + flex-direction: column; + justify-content: center; + margin-right: 8px; + margin-bottom: 8px; + + span.rc-upload { + height: 100%; + display: flex; + align-items: center; + justify-content: center; + } + } + + .upload-select-picture-card:hover { + border-color: #2db7f5; + } +} diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 024d2217..6c0597da 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -35,6 +35,8 @@ import FieldManagement from "./pages/fieldManagement"; import AnalysisOfSalaryStatistics from "./pages/analysisOfSalaryStatistics"; import EmployeeList from "./pages/employeeView"; import ReportView from "./pages/reportView"; +import MySalaryView from "./pages/mySalary/mySalaryView"; +import WatermarkPreview from "./pages/payroll/watermarkPreview"; import stores from "./stores"; import "./style/index"; @@ -53,6 +55,7 @@ const SocialSecurityBenefits = (props) => props.children; const DataAcquisition = (props) => props.children; // mySalary 我的薪资福利 +// mySalaryView 我的薪资福利-查看工资单 // socialSecurityBenefits 社保福利 // programme 社保福利方案 // archives 社保福利档案 @@ -91,6 +94,7 @@ const Routes = ( onEnter={getLocaleLabel} component={Home}> + + { return ( - { - this.handleView(record); - }}>查看 + {getLabel(33564, "查看")} ); } }); diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js new file mode 100644 index 00000000..9872affc --- /dev/null +++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js @@ -0,0 +1,39 @@ +/* + * Author: 黎永顺 + * name: 查看我的薪资-工资单 + * Description: + * Date: 2023/6/14 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { toJS } from "mobx"; +import ComputerTemplate from "../payroll/templatePreview/computerTemplate"; +import "../payroll/templatePreview/index.less"; + +@inject("mySalaryStore") +@observer +class MySalaryView extends Component { + componentDidMount() { + const { mySalaryStore: { getMySalaryBill }, params: { salaryInfoId } } = this.props; + getMySalaryBill(Number(salaryInfoId)); + } + + render() { + const { mySalaryStore: { mySalaryBill } } = this.props; + const employeeInformation = mySalaryBill.employeeInformation && toJS(mySalaryBill.employeeInformation); + const salaryGroups = mySalaryBill.salaryGroups && toJS(mySalaryBill.salaryGroups); + return ( +
+
+ +
+
+ ); + } +} + +export default MySalaryView; diff --git a/pc4mobx/hrmSalary/pages/payroll/components/config.js b/pc4mobx/hrmSalary/pages/payroll/components/config.js new file mode 100644 index 00000000..47e1801b --- /dev/null +++ b/pc4mobx/hrmSalary/pages/payroll/components/config.js @@ -0,0 +1,14 @@ +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; +export const commonVariables = [ + { id: "HRM_Name", name: getLabel(111, "当前操作者姓名")}, + { id: "HRM_Num", name: getLabel(111, "当前操作者编号")}, + { id: "HRM_Mobile", name: getLabel(111, "当前操作者移动电话")}, + { id: "HRM_Email", name: getLabel(111, "当前操作者电子邮件")}, + { id: "HRM_CurrentOperatorId", name: getLabel(111, "当前操作者人员id")}, + { id: "HRM_Department", name: getLabel(111, "当前操作者部门")}, + { id: "HRM_SecondDepartment", name: getLabel(111, "分部")}, + { id: "HRM_CurrentDate", name: getLabel(111, "当前日期")}, + { id: "HRM_CurrentTime", name: getLabel(111, "当前时间")}, +]; diff --git a/pc4mobx/hrmSalary/pages/payroll/components/index.less b/pc4mobx/hrmSalary/pages/payroll/components/index.less index 38191bdb..ee7666e9 100644 --- a/pc4mobx/hrmSalary/pages/payroll/components/index.less +++ b/pc4mobx/hrmSalary/pages/payroll/components/index.less @@ -46,3 +46,130 @@ } } } + +.waterMarkSetWrapper { + & > .rodal { + right: 25% !important; + } +} + +.waterMarkSetWrapper, .wmContentWrapper { + .rodal { + .rodal-dialog { + & > div:nth-child(2) { + height: calc(100% - 52px) !important; + padding-bottom: 0 !important; + } + } + } + + .waterMark-select-header { + padding: 0 5px; + + } + + .wea-transfer-list-wrapper { + .transfer-tree { + li { + cursor: pointer; + margin: 10px 0; + } + } + } + + .wea-slide-modal-content { + padding-bottom: 65px; + } + + .wmTitle { + float: left; + margin-left: 16px; + } + + .slideBottom { + display: flex; + justify-content: flex-end; + padding: 16px 25px; + border-top: 1px solid #e5e5e5; + position: absolute; + width: 100%; + bottom: 0; + background: #f4f4f4; + + button:first-child { + margin-right: 16px; + } + } + + .waterMarkWrapper { + padding-top: 16px; + } + + .wmContGroup { + .wea-title { + border: 1px solid #e5e5e5; + border-bottom: none; + } + + .wea-content { + padding-top: 0; + } + + .content-box { + padding: 16px; + + .ant-col-18 { + height: 319px; + } + } + + .wea-form-cell-wrapper { + border-bottom: none; + } + } + + .mt16 { + .wea-form-cell-wrapper { + border: 1px solid #e5e5e5; + } + } + + .wea-form-cell-wrapper { + border: 1px solid #e5e5e5; + border-bottom: none; + } + + .wea-form-item { + padding: 5px 16px; + border-bottom: 1px solid #e5e5e5; + } + + .textSetting { + display: flex; + align-items: center; + margin-top: 7px; + min-width: 200px; + + .icon-coms-Flow-setting { + font-size: 16px; + color: #666; + cursor: pointer; + } + + img { + margin-left: 5px; + } + } + + .previewBtn { + cursor: pointer; + color: #2db7f5; + position: relative; + margin-left: 10px; + } + + .txtPrew { + margin-left: 20px !important; + } + +} diff --git a/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js b/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js new file mode 100644 index 00000000..48c6658d --- /dev/null +++ b/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js @@ -0,0 +1,191 @@ +/* + * Author: 黎永顺 + * name: 水印设置-弹框 + * Description: + * Date: 2023/6/13 + */ +import React, { Component } from "react"; +import { + WeaError, + WeaFormItem, + WeaInputNumber, + WeaLocaleProvider, + WeaSearchGroup, + WeaSelect, + WeaSlideModal +} from "ecCom"; +import { Button } from "antd"; +import ImageUploadList from "../../../components/upload"; +import WmContentSetModal from "./wmContentSetModal"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class WaterMarkSetModal extends Component { + constructor(props) { + super(props); + this.state = { + wmClassify: "text", wmNoTransparent: 0, + wmRotate: 0, wmImg: null, wmcontSet: { + visible: false, textSet: {} + } + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) { + const { watermarkSetting } = nextProps; + const { + wmClassify = "text", + wmNoTransparent = 0, + wmRotate = 0, + wmImg, + wmOriginText, + wmHeight, + wmWidth, + pureWmText, + wmSelectedFieldIds, + wmText + } = watermarkSetting; + if (wmClassify === "text") { + this.setState({ + wmClassify, wmNoTransparent, wmRotate, + wmcontSet: { + ...this.state.wmcontSet, textSet: wmOriginText ? { + wmOriginText, wmHeight, wmWidth, pureWmText, wmSelectedFieldIds, wmText + } : {} + } + }); + } else { + this.setState({ + wmClassify, wmNoTransparent, wmRotate, wmImg + }); + } + } + } + + handleCustomSave = () => { + const { wmClassify, wmImg, wmRotate, wmNoTransparent, wmcontSet } = this.state; + if ((wmClassify === "text" && _.isEmpty(wmcontSet.textSet)) || (wmClassify !== "text" && !wmImg)) { + this.refs.watermarkContError.showError(); + return; + } + if (wmClassify === "text") { + this.props.onChange({ + wmSetting: { + wmClassify, ...wmcontSet.textSet, + wmNoTransparent, wmRotate + } + }); + } else { + this.props.onChange({ + wmSetting: { + wmClassify, wmImg, + wmNoTransparent, wmRotate + } + }); + } + this.props.onClose(); + }; + + render() { + const { wmClassify, wmNoTransparent, wmRotate, wmImg, wmcontSet } = this.state; + return ( + {getLabel(111, "水印设置")}} + direction="right" top={20} width={800} height={400} + measureT={"%"} measureX="px" measureY="px" + content={ + + + + this.setState({ wmClassify })} + /> + + + { + wmClassify === "text" ? + +
+ this.setState({ wmcontSet: { ...wmcontSet, visible: true } })}/> + { + _.isEmpty(wmcontSet.textSet) ? : + { + window.open(`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/payroll/watermark/preview`, "_blank"); + }}/> 预览 + } +
+
: + +
+ this.setState({ wmImg }, () => { + window.localStorage.setItem("wmSetting", JSON.stringify({ + wmSetting: { + wmClassify, wmRotate, wmNoTransparent, + ...this.state.wmImg + } + })); + })} wmImg={wmImg}/> + { + !wmImg ? : + { + window.open(`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/payroll/watermark/preview`, "_blank"); + }}>预览 + } +
+
+ } +
+ + this.setState({ wmNoTransparent })} + /> + + + this.setState({ wmRotate })} + /> + +
+
+ + +
+ {/* 水印内容设置弹框*/} + this.setState({ + wmcontSet: { + ...wmcontSet, + visible: false, + textSet + } + }, () => { + window.localStorage.setItem("wmSetting", JSON.stringify({ + wmSetting: { + wmClassify, wmRotate, wmNoTransparent, + ...this.state.wmcontSet.textSet + } + })); + })} + /> +
+ } + /> + ); + } +} + +export default WaterMarkSetModal; diff --git a/pc4mobx/hrmSalary/pages/payroll/components/wmContentSetModal.js b/pc4mobx/hrmSalary/pages/payroll/components/wmContentSetModal.js new file mode 100644 index 00000000..beea8bdd --- /dev/null +++ b/pc4mobx/hrmSalary/pages/payroll/components/wmContentSetModal.js @@ -0,0 +1,188 @@ +/* + * Author: 黎永顺 + * name: 水印内容设置 + * Description: + * Date: 2023/6/14 + */ +import React, { Component } from "react"; +import { + WeaFormItem, + WeaHelpfulTip, + WeaInputNumber, + WeaInputSearch, + WeaLocaleProvider, + WeaRichText, + WeaSearchGroup, + WeaSlideModal, + WeaTransfer +} from "ecCom"; +import { Button, Col, message, Row } from "antd"; +import { commonVariables } from "./config"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; +const WeaTransferList = WeaTransfer.list; + +class WmContentSetModal extends Component { + constructor(props) { + super(props); + this.state = { + wmWidth: 100, + wmHeight: 100, + wmOriginText: "", + searchV: "" + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible) { + this.setState({ + wmWidth: nextProps.textSet.wmWidth || 100, + wmHeight: nextProps.textSet.wmHeight || 100, + wmOriginText: nextProps.textSet.wmOriginText || "" + }); + } else { + this.setState({ + wmWidth: 100, + wmHeight: 100, + wmOriginText: "", + searchV: "" + }); + } + } + + handleSaveWMContent = () => { + const html = this.refs.TextContentRichText.getData().replace(/\n/ig, ""); + if (!html) { + message.warning(getLabel(111, "请输入水印内容!")); + return; + } + const { wmWidth, wmHeight } = this.state; + this.props.onClose({ + wmWidth, wmHeight, + wmSelectedFieldIds: this.getHtmlAttrVal(html), + pureWmText: this.convertToPlain(html), + wmOriginText: html, wmText: this.convertToWMText(html) + }); + }; + + convertToWMText = (html) => { + _.map(commonVariables, item => { + const { id, name } = item; + const reg = eval("/" + name + "/g"); + html = html.replace(reg, `$${id}`).replace(/ data-id=\"(.*?)\"/g, ""); + }); + return html.replace(/ contenteditable="false"/g, ""); + }; + getHtmlAttrVal = (html) => { + let attrAndValueArr = html.match(/ data-id=\"(.*?)\"/g); + let valueArr = []; // 放所有该属性的值 + if (!_.isEmpty(attrAndValueArr)) { + for (let i = 0; i < attrAndValueArr.length; i++) { + valueArr.push(attrAndValueArr[i].replace(/ data-id=/g, "").replace(/\"/g, "")); + } + } + return valueArr; + }; + convertToPlain = (html) => { + let tempDivElement = document.createElement("div"); + tempDivElement.innerHTML = html; + return tempDivElement.textContent || tempDivElement.innerText || ""; + }; + + renderItem = (item = {}) => { + return {item.name}; + }; + + selectHeader() { + return ( +
+ { + this.setState({ searchV: v }); + }}/> +
+ ); + } + + render() { + const { wmWidth, wmHeight, wmOriginText, searchV } = this.state; + const ckConfig = { + toolbar: [ + { name: "paragraph", items: ["JustifyLeft", "JustifyCenter", "JustifyRight"] }, + { name: "styles", items: ["Font", "FontSize"] }, + { name: "colors", items: ["TextColor"] } + ], + removePlugins: "resize", + height: 280 + }; + const tempOptions = _.filter(commonVariables, (item) => { + const { name } = item; + let flag = true; + if (searchV && name) { + flag = name.indexOf(searchV) > -1; + } + return flag; + }); + return ( + this.props.onClose(this.props.textSet)} + title={{getLabel(111, "水印内容设置")}} + direction="right" top={-10} width={800} height={480} + measureT={"%"} measureX="px" measureY="px" + content={ + + {getLabel(111, "水印格式设置")}} + showGroup needTigger={false} className="waterMarkWrapper wmContGroup"> + + this.setState({ wmWidth })} + /> + + + this.setState({ wmHeight })} + /> + + + + + + + + + { + let result = _.filter(commonVariables, (item) => item.id === keys[0]); + if (result && result.length > 0) { + this.refs.TextContentRichText.insertHTML(` ${result[0].name} `); + } + }} + height={280} + checkedKeys={[]} + /> + + + +
+ + +
+
+ } + /> + ); + } +} + +export default WmContentSetModal; diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index 1a6307d7..960fbfa9 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -48,7 +48,8 @@ export default class Payroll extends React.Component { templateCurrentId: "", copyModalVisible: false, startDate: moment(new Date()).startOf("year").format("YYYY-MM"), - endDate: moment(new Date()).startOf("month").format("YYYY-MM") + endDate: moment(new Date()).startOf("month").format("YYYY-MM"), + loading: false }; this.recordId = ""; this.salaryYearMonth = [moment(new Date()).startOf("year").format("YYYY-MM"), moment(new Date()).startOf("month").format("YYYY-MM")]; @@ -348,7 +349,10 @@ export default class Payroll extends React.Component { ); } else if (this.state.selectedKey === "2") { - return ; + return ; } }; const steps = ["基础设置", "正常核算工资单模板", "补发工资单模版"]; @@ -423,7 +427,10 @@ export default class Payroll extends React.Component { } { this.state.selectedKey === "2" && - + this.baseSetRef = dom} + onChangeLoading={loading => this.setState({ loading })} + /> } diff --git a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js index e7ca064b..742fa874 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js +++ b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js @@ -6,6 +6,9 @@ */ import React, { Component } from "react"; import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom"; +import { message } from "antd"; +import { getSalaryBillBaseSetForm, salaryBillBaseSetSave } from "../../apis/payroll"; +import WaterMarkSetModal from "./components/waterMarkSetModal"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; @@ -15,12 +18,52 @@ class TemplateBaseSettings extends Component { super(props); this.state = { watermarkStatus: "0", - watermark: "DEFAULT" + watermark: "DEFAULT", + wmSetting: null, + watermarkSet: { + visible: false, watermarkSetting: null + } }; } + componentDidMount() { + this.getSalaryBillBaseSetForm(); + } + + getSalaryBillBaseSetForm = () => { + const { watermarkSet } = this.state; + getSalaryBillBaseSetForm().then(({ status, data }) => { + if (status) { + const { watermarkStatus, watermark = "DEFAULT", watermarkSetting } = data; + this.setState({ + watermark, watermarkStatus: watermarkStatus ? "1" : "0", + watermarkSet: { + ...watermarkSet, + watermarkSetting + } + }, () => window.localStorage.setItem("wmSetting", JSON.stringify({ wmSetting: watermarkSetting }))); + } + }); + }; + salaryBillBaseSetSave = () => { + const { watermark, watermarkStatus, wmSetting } = this.state; + let payload = { watermarkStatus: watermarkStatus === "1" }; + if (watermarkStatus === "1") payload = { ...payload, watermark }; + if (!_.isNil(wmSetting)) payload = { ...payload, watermark, ...wmSetting }; + this.props.onChangeLoading(true); + salaryBillBaseSetSave(payload).then(({ status, errormsg }) => { + this.props.onChangeLoading(false); + if (status) { + message.success(getLabel(111, "保存成功")); + this.getSalaryBillBaseSetForm(); + } else { + message.error(errormsg || getLabel(111, "保存失败")); + } + }).catch(() => this.props.onChangeLoading(false)); + }; + render() { - const { watermarkStatus, watermark } = this.state; + const { watermarkStatus, watermark, watermarkSet } = this.state; return ( @@ -40,8 +83,17 @@ class TemplateBaseSettings extends Component { /> { watermark === "CUSTOM" && - {getLabel(111, "水印设置")} + this.setState({ + watermarkSet: { + ...watermarkSet, + visible: true + } + })}>{getLabel(111, "水印设置")} } + this.setState({ watermarkSet: { ...watermarkSet, visible: false } })} + onChange={wmSetting => this.setState({ wmSetting })} + /> } diff --git a/pc4mobx/hrmSalary/pages/payroll/watermarkPreview.js b/pc4mobx/hrmSalary/pages/payroll/watermarkPreview.js new file mode 100644 index 00000000..12d3e2ff --- /dev/null +++ b/pc4mobx/hrmSalary/pages/payroll/watermarkPreview.js @@ -0,0 +1,56 @@ +/* + * Author: 黎永顺 + * name: 水印预览 + * Description: + * Date: 2023/6/15 + */ +import React, { Component } from "react"; +import { salaryBillBaseSetPreviewWaterMark } from "../../apis/payroll"; +import { WeaTools } from "ecCom"; + +const { watermark } = WeaTools; + +class WatermarkPreview extends Component { + componentDidMount() { + const wmSetting = window.localStorage.getItem("wmSetting"); + wmSetting && this.salaryBillBaseSetPreviewWaterMark(JSON.parse(wmSetting)); + } + + salaryBillBaseSetPreviewWaterMark = (payload) => { + salaryBillBaseSetPreviewWaterMark(payload).then(({ status, data }) => { + if (status) { + watermark({ + text: data, + src: "", + rotate: `-15`, + alpha: 0.15, + interval: 2000, + intervalCheck: true, + clickCheck: true + }); + } + }); + }; + + render() { + return ( +
+

水印预览效果

+

水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

+

水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

+

水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

+

水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

+

水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

+

水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

+
+ ); + } +} + +export default WatermarkPreview; diff --git a/pc4mobx/hrmSalary/stores/mySalary.js b/pc4mobx/hrmSalary/stores/mySalary.js index ef50b397..a4ec964f 100644 --- a/pc4mobx/hrmSalary/stores/mySalary.js +++ b/pc4mobx/hrmSalary/stores/mySalary.js @@ -1,11 +1,12 @@ import { action, observable } from "mobx"; import { message } from "antd"; import { WeaForm, WeaLogView, WeaTableNew } from "comsMobx"; -import { WeaLocaleProvider } from "ecCom"; +import { WeaLocaleProvider, WeaTools } from "ecCom"; import moment from "moment"; import * as API from "../apis/mySalaryBenefits"; +const { watermark } = WeaTools; const { LogStore } = WeaLogView; const getLabel = WeaLocaleProvider.getLabel; const { TableStore } = WeaTableNew; @@ -165,6 +166,45 @@ export class MySalaryStore { return new Promise((resolve, reject) => { API.mySalaryBill(payload).then(res => { if (res.status) { + const { salaryTemplate } = res.data; + const { salaryWatermark } = salaryTemplate; + if (watermark && salaryWatermark) { + const { wmSetting } = JSON.parse(salaryWatermark); + const { + wmText, + wmHeight: height, + wmWidth: width, + wmNoTransparent, + wmRotate, + wmImg, + wmClassify + } = wmSetting; + if (wmClassify === "text") { + watermark({ + text: wmText, + width, + height, + src: "", + rotate: `-${wmRotate || 15}`, + alpha: wmNoTransparent / 100 || 0.15, + interval: 2000, + intervalCheck: true, + clickCheck: true + }); + } else { + watermark({ + text: "", + width, + height, + src: wmImg[0].imgSrc, + rotate: `-${wmRotate || 15}`, + alpha: wmNoTransparent / 100 || 0.15, + interval: 2000, + intervalCheck: true, + clickCheck: true + }); + } + } this.mySalaryBill = res.data; resolve(res.data); } else { From a80c4a37d551bce56a2c2d0d31568184fc6fadca 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, 16 Jun 2023 11:12:20 +0800 Subject: [PATCH 10/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E9=AA=8C=E8=AF=81=E6=96=B9=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/payroll.js | 4 + .../components/captchaModal/index.js | 82 +++++++++++++++++++ .../components/captchaModal/index.less | 29 +++++++ pc4mobx/hrmSalary/pages/mySalary/index.js | 17 ++-- 4 files changed, 127 insertions(+), 5 deletions(-) create mode 100644 pc4mobx/hrmSalary/components/captchaModal/index.js create mode 100644 pc4mobx/hrmSalary/components/captchaModal/index.less diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js index eaf11a11..6440ff2a 100644 --- a/pc4mobx/hrmSalary/apis/payroll.js +++ b/pc4mobx/hrmSalary/apis/payroll.js @@ -367,3 +367,7 @@ export const getAvailableSalaryItemSet = (params) => { export const salaryBillSendSum = (params) => { return postFetch("/api/bs/hrmsalary/salaryBill/send/sum", params); }; +//工资单-验证方式 +export const payrollCheckType = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params); +}; diff --git a/pc4mobx/hrmSalary/components/captchaModal/index.js b/pc4mobx/hrmSalary/components/captchaModal/index.js new file mode 100644 index 00000000..9098df54 --- /dev/null +++ b/pc4mobx/hrmSalary/components/captchaModal/index.js @@ -0,0 +1,82 @@ +/* + * Author: 黎永顺 + * name: 验证码弹框 + * Description: + * Date: 2023/6/16 + */ +import React, { Component } from "react"; +import { WeaDialog, WeaError, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import { Button } from "antd"; +import "./index.less"; + +const { getLabel } = WeaLocaleProvider; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + captcha: "", + time: 60 + }; + this.timeRef = null; + } + + componentWillUnmount() { + clearInterval(this.timeRef); + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && !nextProps.visible) { + this.setState({ captcha: "" }); + } else { + clearInterval(this.timeRef); + this.setState({ time: 60 }); + } + } + + handleSendCaptcha = () => { + this.timeRef = setInterval(() => { + const { time } = this.state; + this.setState({ time: time - 1 }, () => { + if (this.state.time === -1) { + clearInterval(this.timeRef); + this.setState({ time: 60 }); + } + }); + }, 1000); + }; + + render() { + const { captcha, time } = this.state; + return ( + {getLabel(826, "确定")} + ]} + > + + + +
+ this.setState({ captcha })}/> + +
+
+
+
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/components/captchaModal/index.less b/pc4mobx/hrmSalary/components/captchaModal/index.less new file mode 100644 index 00000000..4f8d23b7 --- /dev/null +++ b/pc4mobx/hrmSalary/components/captchaModal/index.less @@ -0,0 +1,29 @@ +.captchaWrapper { + .wea-dialog-body { + padding: 30px 20px; + + .wea-form-item-wrapper { + .wea-error { + width: 100%; + + .captchaInputBox { + display: flex; + align-items: center; + + .wea-input-normal { + flex: 1; + } + + button { + padding: 8px 10px; + border-radius: 0; + min-width: 80px; + text-align: center; + height: 30px; + line-height: 15px; + } + } + } + } + } +} diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.js b/pc4mobx/hrmSalary/pages/mySalary/index.js index 6902836e..da92ac0f 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/index.js +++ b/pc4mobx/hrmSalary/pages/mySalary/index.js @@ -2,12 +2,14 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { DatePicker } from "antd"; import { WeaNewScroll, WeaTop } from "ecCom"; -import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 +import { renderNoright } from "../../util"; import CustomTab from "../../components/customTab"; import moment from "moment"; import PayrollModal from "./payrollModal"; import Authority from "./authority"; import CustomPaginationTable from "../../components/customPaginationTable"; +import CaptchaModal from "../../components/captchaModal"; +import { payrollCheckType } from "../../apis/payroll"; import "./index.less"; const { RangePicker } = DatePicker; @@ -22,15 +24,19 @@ export default class MySalary extends React.Component { selectedKey: "0", salaryBillVisible: false, salaryInfoId: "", - salaryRange: [moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")] + salaryRange: [moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")], + captchaVisible: false }; this.pageInfo = { current: 1, pageSize: 10 }; this.historyPageInfo = { current: 1, pageSize: 10 }; } - componentWillMount() { + async componentWillMount() { const { mySalaryStore: { init } } = this.props; - init(); + const data = await payrollCheckType(); + console.log(data); + this.setState({ captchaVisible: true }); + // init(); } // 查看工资单 @@ -113,7 +119,7 @@ export default class MySalary extends React.Component { recordListPageInfo, myBillPageInfo } = mySalaryStore; - const { salaryBillVisible, salaryInfoId, salaryRange } = this.state; + const { salaryBillVisible, salaryInfoId, salaryRange, captchaVisible } = this.state; if (!hasRight && !loading) return renderNoright(); const topTab = [ @@ -210,6 +216,7 @@ export default class MySalary extends React.Component { }} /> } + this.setState({ captchaVisible: false })}/> ); } From 7d07af3a22bcc9204650a6ee2f73f6bed899f306 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, 16 Jun 2023 11:30:11 +0800 Subject: [PATCH 11/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=B0=B4=E5=8D=B0=E8=AE=BE=E7=BD=AE=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payroll/components/index.less | 6 ------ .../pages/payroll/components/waterMarkSetModal.js | 4 ++-- .../pages/payroll/components/wmContentSetModal.js | 4 ++-- pc4mobx/hrmSalary/stores/mySalary.js | 7 ++++--- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/components/index.less b/pc4mobx/hrmSalary/pages/payroll/components/index.less index ee7666e9..51e742e6 100644 --- a/pc4mobx/hrmSalary/pages/payroll/components/index.less +++ b/pc4mobx/hrmSalary/pages/payroll/components/index.less @@ -47,12 +47,6 @@ } } -.waterMarkSetWrapper { - & > .rodal { - right: 25% !important; - } -} - .waterMarkSetWrapper, .wmContentWrapper { .rodal { .rodal-dialog { diff --git a/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js b/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js index 48c6658d..baaafa6c 100644 --- a/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js +++ b/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js @@ -94,8 +94,8 @@ class WaterMarkSetModal extends Component { {getLabel(111, "水印设置")}} - direction="right" top={20} width={800} height={400} - measureT={"%"} measureX="px" measureY="px" + direction="right" top={0} width={800} height={100} + measureT="%" measureX="px" measureY="%" content={ diff --git a/pc4mobx/hrmSalary/pages/payroll/components/wmContentSetModal.js b/pc4mobx/hrmSalary/pages/payroll/components/wmContentSetModal.js index beea8bdd..d6fecd53 100644 --- a/pc4mobx/hrmSalary/pages/payroll/components/wmContentSetModal.js +++ b/pc4mobx/hrmSalary/pages/payroll/components/wmContentSetModal.js @@ -127,8 +127,8 @@ class WmContentSetModal extends Component { this.props.onClose(this.props.textSet)} title={{getLabel(111, "水印内容设置")}} - direction="right" top={-10} width={800} height={480} - measureT={"%"} measureX="px" measureY="px" + direction="right" top={0} width={800} height={100} + measureT="%" measureX="px" measureY="%" content={ { API.mySalaryBill(payload).then(res => { if (res.status) { + this.mySalaryBill = res.data; + resolve(res.data); const { salaryTemplate } = res.data; const { salaryWatermark } = salaryTemplate; if (watermark && salaryWatermark) { - const { wmSetting } = JSON.parse(salaryWatermark); + const { wmSetting, watermarkStatus } = JSON.parse(salaryWatermark); + if (!watermarkStatus) return; const { wmText, wmHeight: height, @@ -205,8 +208,6 @@ export class MySalaryStore { }); } } - this.mySalaryBill = res.data; - resolve(res.data); } else { message.error(res.errormsg || "获取失败"); reject("获取失败"); From 3c7c03916d7209e30bf384a865025dec72190cf5 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, 16 Jun 2023 11:46:01 +0800 Subject: [PATCH 12/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E9=85=AC?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=88=86=E6=9E=90=E8=AE=BE=E7=BD=AE=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4=E4=B9=89?= =?UTF-8?q?=E5=8A=A1=E4=BA=BA=E9=80=89=E9=A1=B9=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/reportView/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/reportView/index.js b/pc4mobx/hrmSalary/pages/reportView/index.js index 2031c1c5..c315ae53 100644 --- a/pc4mobx/hrmSalary/pages/reportView/index.js +++ b/pc4mobx/hrmSalary/pages/reportView/index.js @@ -31,9 +31,9 @@ class Index extends Component { } componentDidMount() { - const { taxAgentStore: { getTaxAgentSelectListAsAdmin } } = this.props; + const { taxAgentStore: { fetchTaxAgentOption } } = this.props; this.reportGetForm(); - getTaxAgentSelectListAsAdmin(); + fetchTaxAgentOption(); } reportGetForm = () => { @@ -98,7 +98,7 @@ class Index extends Component { render() { const { report, dimensionList, statisticalPayload } = this.state; - const { attendanceStore: { settingForm }, taxAgentStore: { taxAgentAdminOption } } = this.props; + const { attendanceStore: { settingForm }, taxAgentStore: { taxAgentOption } } = this.props; return ( { if (this.reportRef.state.loading) { - message.info(getLabel(111, "列表正在加载中,请稍后")) + message.info(getLabel(111, "列表正在加载中,请稍后")); } else { this.setState({ statisticalPayload: { visible: true, id: report.id, dimension: report.dimensionId } @@ -150,7 +150,7 @@ class Index extends Component { {/*统计数据范围及规则设置弹框*/} this.setState({ statisticalPayload: { visible: false, id: "", dimension: "" } }, () => isRefresh && this.reportRef.reportStatisticsReportGetData(report.id, report.dimensionId))} From cb8ee2332e9e6e9835ee4f81df250ecd9d2d492d 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, 16 Jun 2023 14:45:23 +0800 Subject: [PATCH 13/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=A7=84=E5=88=99?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=BF=9D=E5=AD=98=E6=96=B9=E5=BC=8F=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/ruleConfig/index.js | 400 ++++++++++++++------ 1 file changed, 274 insertions(+), 126 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 3d3ac81f..16c8b786 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -5,13 +5,15 @@ * Date: 2022-09-19 18:15:32 */ import React, { Component } from "react"; -import { WeaFormItem, WeaNewScroll, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom"; +import { WeaFormItem, WeaLocaleProvider, WeaNewScroll, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom"; import { CheckBox } from "../appConfig"; -import { Button, message, Modal } from "antd"; +import { message, Modal } from "antd"; import * as API from "../../apis/ruleconfig"; import "./index.less"; import ProgressModal from "../../components/progressModal"; +const { getLabel } = WeaLocaleProvider; + class Index extends Component { constructor(props) { super(props); @@ -54,7 +56,7 @@ class Index extends Component { com: Select({ label: "排序字段", onChange: this.handleChane, - value: sysOrderRule.data.orderRule, + value: sysOrderRule.data.orderRule || orderOptions[0].value, options: orderOptions }) }, @@ -62,7 +64,7 @@ class Index extends Component { com: Select({ label: "正序/倒序", onChange: this.handleChane, - value: sysOrderRule.data.ascOrDesc, + value: sysOrderRule.data.ascOrDesc || ascOptions[0].value, options: ascOptions }) } @@ -72,7 +74,7 @@ class Index extends Component { com: Select({ label: "人员字段", onChange: this.handleChane, - value: sysConfCodeRule.data, + value: sysConfCodeRule.data || employeeOptions[0].value, options: employeeOptions }) } @@ -97,9 +99,9 @@ class Index extends Component { ], saveParams: { ...this.state.saveParams, - orderRule: sysOrderRule.data.orderRule, - ascOrDesc: sysOrderRule.data.ascOrDesc, - rule: sysConfCodeRule.data, + orderRule: sysOrderRule.data.orderRule || orderOptions[0].value, + ascOrDesc: sysOrderRule.data.ascOrDesc || ascOptions[0].value, + rule: sysConfCodeRule.data || employeeOptions[0].value, enctry: queryAppsetting.data.isOpenEncrypt, operateTaxDeclaration: queryAppsetting.data.isOpenTaxDeclaration } @@ -136,119 +138,122 @@ class Index extends Component { handleSave = (type) => { const { saveParams } = this.state; if (type === "ORDER") { - if (_.isEmpty(saveParams.orderRule) || _.isEmpty(saveParams.ascOrDesc)) { - Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" - }); - return; - } - this.setState({ loading: { ...this.state.loading, order: true } }); - API.updateOrderRule(_.pick(saveParams, ["orderRule", "ascOrDesc"])).then(({ status, errormsg }) => { - this.setState({ loading: { ...this.state.loading, order: false } }); - if (status) { - message.success("保存成功!"); - let sysSetting = this.getSysSetting(); - } else { - message.error(errormsg || "保存失败!"); - } - }); + + // if (_.isEmpty(saveParams.orderRule) || _.isEmpty(saveParams.ascOrDesc)) { + // Modal.warning({ + // title: "信息确认", + // content: "必要信息不完整,红色*为必填项!" + // }); + // return; + // } + // this.setState({ loading: { ...this.state.loading, order: true } }); + // API.updateOrderRule(_.pick(saveParams, ["orderRule", "ascOrDesc"])).then(({ status, errormsg }) => { + // this.setState({ loading: { ...this.state.loading, order: false } }); + // if (status) { + // message.success("保存成功!"); + // let sysSetting = this.getSysSetting(); + // } else { + // message.error(errormsg || "保存失败!"); + // } + // }); + + } else if (type === "EMPLOYEE") { - if (_.isEmpty(saveParams.rule)) { - Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" - }); - return; - } - this.setState({ loading: { ...this.state.loading, employee: true } }); - API.saveMatchEmployeeModeRule(_.pick(saveParams, ["rule"])).then(({ status, errormsg }) => { - this.setState({ loading: { ...this.state.loading, employee: false } }); - if (status) { - message.success("保存成功!"); - let sysSetting = this.getSysSetting(); - } else { - message.error(errormsg || "保存失败!"); - } - }); + // if (_.isEmpty(saveParams.rule)) { + // Modal.warning({ + // title: "信息确认", + // content: "必要信息不完整,红色*为必填项!" + // }); + // return; + // } + // this.setState({ loading: { ...this.state.loading, employee: true } }); + // API.saveMatchEmployeeModeRule(_.pick(saveParams, ["rule"])).then(({ status, errormsg }) => { + // this.setState({ loading: { ...this.state.loading, employee: false } }); + // if (status) { + // message.success("保存成功!"); + // let sysSetting = this.getSysSetting(); + // } else { + // message.error(errormsg || "保存失败!"); + // } + // }); } else if (type === "ENCRYTION") { - Modal.confirm({ - title: "信息确认", - content: "开启/关闭加密前请做好数据库备份!!!逆向解密会花费几分钟时间,请耐心等待!!!", - onOk: () => { - this.setState({ loading: { ...this.state.loading, encry: true } }); - API.saveEncryptSetting({ isOpenEncrypt: saveParams.enctry }).then(({ data, status, errormsg }) => { - this.setState({ loading: { ...this.state.loading, encry: false } }); - if (status) { - const { isSuccess, progressId, msg } = data; - if (!isSuccess) { - message.error(errormsg || msg || "保存失败!"); - return; - } - this.setState({ - progressVisible: true, - progress: 0 - }, () => { - let number = 1; - this.timer && clearInterval(this.timer); - this.timer = setInterval(() => { - API.getEncryptProgress({ progressId }).then(({ status, data, errormsg }) => { - const { progress_statue } = data; - if (progress_statue === "success" && this.timer) { - clearInterval(this.timer); - this.timer = null; - number = 1; - this.setState({ - progress: 100 - }, () => { - this.setState({ - progressVisible: false - }); - }); - message.success("保存成功"); - } else if (progress_statue === "in_progress" && this.timer) { - if (this.state.progress >= 90) { - this.setState({ - progress: this.state.progress + (0.001 * this.state.progress) - }); - } else { - this.setState({ - progress: 10 * number - }, () => number++); - } - } else if (!status || (progress_statue === "fail" && this.timer)) { - clearInterval(this.timer); - this.timer = null; - number = 1; - this.setState({ - progress: 100 - }, () => { - this.setState({ - progressVisible: false - }); - }); - message.error(errormsg || "保存失败!"); - } - }); - }, 1000); - }); - } - }); - }, - onCancel: () => { - } - }); + // Modal.confirm({ + // title: "信息确认", + // content: "开启/关闭加密前请做好数据库备份!!!逆向解密会花费几分钟时间,请耐心等待!!!", + // onOk: () => { + // this.setState({ loading: { ...this.state.loading, encry: true } }); + // API.saveEncryptSetting({ isOpenEncrypt: saveParams.enctry }).then(({ data, status, errormsg }) => { + // this.setState({ loading: { ...this.state.loading, encry: false } }); + // if (status) { + // const { isSuccess, progressId, msg } = data; + // if (!isSuccess) { + // message.error(errormsg || msg || "保存失败!"); + // return; + // } + // this.setState({ + // progressVisible: true, + // progress: 0 + // }, () => { + // let number = 1; + // this.timer && clearInterval(this.timer); + // this.timer = setInterval(() => { + // API.getEncryptProgress({ progressId }).then(({ status, data, errormsg }) => { + // const { progress_statue } = data; + // if (progress_statue === "success" && this.timer) { + // clearInterval(this.timer); + // this.timer = null; + // number = 1; + // this.setState({ + // progress: 100 + // }, () => { + // this.setState({ + // progressVisible: false + // }); + // }); + // message.success("保存成功"); + // } else if (progress_statue === "in_progress" && this.timer) { + // if (this.state.progress >= 90) { + // this.setState({ + // progress: this.state.progress + (0.001 * this.state.progress) + // }); + // } else { + // this.setState({ + // progress: 10 * number + // }, () => number++); + // } + // } else if (!status || (progress_statue === "fail" && this.timer)) { + // clearInterval(this.timer); + // this.timer = null; + // number = 1; + // this.setState({ + // progress: 100 + // }, () => { + // this.setState({ + // progressVisible: false + // }); + // }); + // message.error(errormsg || "保存失败!"); + // } + // }); + // }, 1000); + // }); + // } + // }); + // }, + // onCancel: () => { + // } + // }); } else if (type === "DECLARATION") { - this.setState({ loading: { ...this.state.loading, declare: true } }); - API.operateTaxDeclarationFunction(_.pick(saveParams, ["operateTaxDeclaration"])).then(({ status, errormsg }) => { - this.setState({ loading: { ...this.state.loading, declare: false } }); - if (status) { - message.success("保存成功!"); - let sysSetting = this.getSysSetting(); - } else { - message.error(errormsg || "保存失败!"); - } - }); + // this.setState({ loading: { ...this.state.loading, declare: true } }); + // API.operateTaxDeclarationFunction(_.pick(saveParams, ["operateTaxDeclaration"])).then(({ status, errormsg }) => { + // this.setState({ loading: { ...this.state.loading, declare: false } }); + // if (status) { + // message.success("保存成功!"); + // let sysSetting = this.getSysSetting(); + // } else { + // message.error(errormsg || "保存失败!"); + // } + // }); } }; @@ -257,22 +262,161 @@ class Index extends Component { if (type === "排序字段") { this.setState({ saveParams: { ...this.state.saveParams, orderRule: selected } + }, () => { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "确认要保存吗?"), + onOk: () => { + API.updateOrderRule(_.pick(this.state.saveParams, ["orderRule", "ascOrDesc"])) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(22619, "保存成功!")); + let sysSetting = this.getSysSetting(); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }, + onCancel: () => { + } + }); }); } else if (type === "正序/倒序") { this.setState({ saveParams: { ...this.state.saveParams, ascOrDesc: selected } + }, () => { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "确认要保存吗?"), + onOk: () => { + API.updateOrderRule(_.pick(this.state.saveParams, ["orderRule", "ascOrDesc"])) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(22619, "保存成功!")); + let sysSetting = this.getSysSetting(); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }, + onCancel: () => { + } + }); }); } else if (type === "人员字段") { this.setState({ saveParams: { ...this.state.saveParams, rule: selected } + }, () => { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "确认要保存吗?"), + onOk: () => { + API.saveMatchEmployeeModeRule(_.pick(this.state.saveParams, ["rule"])).then(({ status, errormsg }) => { + this.setState({ loading: { ...this.state.loading, employee: false } }); + if (status) { + message.success(getLabel(22619, "保存成功!")); + let sysSetting = this.getSysSetting(); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }, + onCancel: () => { + } + }); }); } else if (type === "加密设置") { this.setState({ saveParams: { ...this.state.saveParams, enctry: selected } + }, () => { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(543354, "开启/关闭加密前请做好数据库备份!!!逆向解密会花费几分钟时间,请耐心等待!!!"), + onOk: () => { + API.saveEncryptSetting({ isOpenEncrypt: this.state.saveParams.enctry }) + .then(({ data, status, errormsg }) => { + this.setState({ loading: { ...this.state.loading, encry: false } }); + if (status) { + const { isSuccess, progressId, msg } = data; + if (!isSuccess) { + message.error(errormsg || msg || getLabel(22620, "保存失败!")); + return; + } + this.setState({ + progressVisible: true, + progress: 0 + }, () => { + let number = 1; + this.timer && clearInterval(this.timer); + this.timer = setInterval(() => { + API.getEncryptProgress({ progressId }).then(({ status, data, errormsg }) => { + const { progress_statue } = data; + if (progress_statue === "success" && this.timer) { + clearInterval(this.timer); + this.timer = null; + number = 1; + this.setState({ + progress: 100 + }, () => { + this.setState({ + progressVisible: false + }); + }); + message.success(getLabel(22619, "保存成功!")); + } else if (progress_statue === "in_progress" && this.timer) { + if (this.state.progress >= 90) { + this.setState({ + progress: this.state.progress + (0.001 * this.state.progress) + }); + } else { + this.setState({ + progress: 10 * number + }, () => number++); + } + } else if (!status || (progress_statue === "fail" && this.timer)) { + clearInterval(this.timer); + this.timer = null; + number = 1; + this.setState({ + progress: 100 + }, () => { + this.setState({ + progressVisible: false + }); + }); + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }, 1000); + }); + } + }); + }, + onCancel: () => { + } + }); }); } else if (type === "个税申报") { this.setState({ saveParams: { ...this.state.saveParams, operateTaxDeclaration: selected } + }, () => { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "确认要保存吗?"), + onOk: () => { + API.operateTaxDeclarationFunction(_.pick(this.state.saveParams, ["operateTaxDeclaration"])) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(22619, "保存成功!")); + let sysSetting = this.getSysSetting(); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }, + onCancel: () => { + } + }); }); } }; @@ -292,15 +436,17 @@ class Index extends Component { title={
排序规则 - + + {/**/}
} showGroup center items={items}/> 人员校验规则 - + + {/**/} } showGroup center items={importItems}/> { @@ -309,8 +455,9 @@ class Index extends Component { title={
加密规则 - + + {/**/}
} showGroup center items={enctryItems}/> } @@ -318,8 +465,9 @@ class Index extends Component { title={
报税规则 - + + {/**/}
} showGroup center items={declareItems}/> { @@ -354,7 +502,7 @@ export const Select = payload => { } = payload; return ( - Date: Fri, 16 Jun 2023 14:55:32 +0800 Subject: [PATCH 14/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=96=B9=E6=A1=88=E5=88=97=E8=A1=A8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/socialSecurityBenefits/programme/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js index bee748ee..6b206395 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js @@ -396,7 +396,7 @@ export default class Programme extends React.Component { style={{ width: "150px" }} onChange={v => { setCustomSelectkey(v); - this.customBenefitsTableRef.getCustomCategoryList({ curren: 1, welfareTypeEnum: v }); + this.customBenefitsTableRef.getCustomCategoryList({ current: 1, welfareTypeEnum: v }); }} />} From e9546e53290edda71d27e6908c960c999f8d6122 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, 16 Jun 2023 15:32:05 +0800 Subject: [PATCH 15/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E9=AA=8C=E8=AF=81=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/payroll.js | 4 ++++ .../components/captchaModal/index.js | 21 +++++++++++-------- pc4mobx/hrmSalary/pages/mySalary/index.js | 17 +++++---------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js index 6440ff2a..ac0debc2 100644 --- a/pc4mobx/hrmSalary/apis/payroll.js +++ b/pc4mobx/hrmSalary/apis/payroll.js @@ -367,6 +367,10 @@ export const getAvailableSalaryItemSet = (params) => { export const salaryBillSendSum = (params) => { return postFetch("/api/bs/hrmsalary/salaryBill/send/sum", params); }; +//工资单发放-发送短信验证码 +export const sendMobileCode = (params) => { + return postFetch("/api/bs/hrmsalary/salaryBill/sendMobileCode", params); +}; //工资单-验证方式 export const payrollCheckType = params => { return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params); diff --git a/pc4mobx/hrmSalary/components/captchaModal/index.js b/pc4mobx/hrmSalary/components/captchaModal/index.js index 9098df54..10675b57 100644 --- a/pc4mobx/hrmSalary/components/captchaModal/index.js +++ b/pc4mobx/hrmSalary/components/captchaModal/index.js @@ -6,6 +6,7 @@ */ import React, { Component } from "react"; import { WeaDialog, WeaError, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import { sendMobileCode } from "../../apis/payroll"; import { Button } from "antd"; import "./index.less"; @@ -35,15 +36,17 @@ class Index extends Component { } handleSendCaptcha = () => { - this.timeRef = setInterval(() => { - const { time } = this.state; - this.setState({ time: time - 1 }, () => { - if (this.state.time === -1) { - clearInterval(this.timeRef); - this.setState({ time: 60 }); - } - }); - }, 1000); + sendMobileCode({ id: this.props.id }).then(({}) => { + this.timeRef = setInterval(() => { + const { time } = this.state; + this.setState({ time: time - 1 }, () => { + if (this.state.time === -1) { + clearInterval(this.timeRef); + this.setState({ time: 60 }); + } + }); + }, 1000); + }); }; render() { diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.js b/pc4mobx/hrmSalary/pages/mySalary/index.js index da92ac0f..6902836e 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/index.js +++ b/pc4mobx/hrmSalary/pages/mySalary/index.js @@ -2,14 +2,12 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { DatePicker } from "antd"; import { WeaNewScroll, WeaTop } from "ecCom"; -import { renderNoright } from "../../util"; +import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../components/customTab"; import moment from "moment"; import PayrollModal from "./payrollModal"; import Authority from "./authority"; import CustomPaginationTable from "../../components/customPaginationTable"; -import CaptchaModal from "../../components/captchaModal"; -import { payrollCheckType } from "../../apis/payroll"; import "./index.less"; const { RangePicker } = DatePicker; @@ -24,19 +22,15 @@ export default class MySalary extends React.Component { selectedKey: "0", salaryBillVisible: false, salaryInfoId: "", - salaryRange: [moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")], - captchaVisible: false + salaryRange: [moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")] }; this.pageInfo = { current: 1, pageSize: 10 }; this.historyPageInfo = { current: 1, pageSize: 10 }; } - async componentWillMount() { + componentWillMount() { const { mySalaryStore: { init } } = this.props; - const data = await payrollCheckType(); - console.log(data); - this.setState({ captchaVisible: true }); - // init(); + init(); } // 查看工资单 @@ -119,7 +113,7 @@ export default class MySalary extends React.Component { recordListPageInfo, myBillPageInfo } = mySalaryStore; - const { salaryBillVisible, salaryInfoId, salaryRange, captchaVisible } = this.state; + const { salaryBillVisible, salaryInfoId, salaryRange } = this.state; if (!hasRight && !loading) return renderNoright(); const topTab = [ @@ -216,7 +210,6 @@ export default class MySalary extends React.Component { }} /> } - this.setState({ captchaVisible: false })}/> ); } From d71b879290b994058f0bd82f34556ceffec0369e 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, 16 Jun 2023 16:34:03 +0800 Subject: [PATCH 16/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E9=AA=8C=E8=AF=81=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/captchaModal/index.js | 37 ++++-- .../hrmSalary/pages/mobilePayroll/index.js | 23 +++- pc4mobx/hrmSalary/pages/mySalary/index.js | 122 +++++++++--------- .../hrmSalary/pages/mySalary/mySalaryView.js | 51 ++++++-- 4 files changed, 140 insertions(+), 93 deletions(-) diff --git a/pc4mobx/hrmSalary/components/captchaModal/index.js b/pc4mobx/hrmSalary/components/captchaModal/index.js index 10675b57..35661772 100644 --- a/pc4mobx/hrmSalary/components/captchaModal/index.js +++ b/pc4mobx/hrmSalary/components/captchaModal/index.js @@ -28,26 +28,35 @@ class Index extends Component { componentWillReceiveProps(nextProps, nextContext) { if (nextProps.visible !== this.props.visible && !nextProps.visible) { - this.setState({ captcha: "" }); - } else { clearInterval(this.timeRef); - this.setState({ time: 60 }); + this.setState({ captcha: "", time: 60 }); } } handleSendCaptcha = () => { - sendMobileCode({ id: this.props.id }).then(({}) => { - this.timeRef = setInterval(() => { - const { time } = this.state; - this.setState({ time: time - 1 }, () => { - if (this.state.time === -1) { - clearInterval(this.timeRef); - this.setState({ time: 60 }); - } - }); - }, 1000); + sendMobileCode({ id: this.props.id }).then(({ status, data }) => { + if (status) { + console.log(data); + this.timeRef = setInterval(() => { + const { time } = this.state; + this.setState({ time: time - 1 }, () => { + if (this.state.time === -1) { + clearInterval(this.timeRef); + this.setState({ time: 60 }); + } + }); + }, 1000); + } }); }; + handleConfirm = () => { + if (!this.state.captcha) { + this.refs.weaError.showError(); + // return + } + this.props.onCancel(); + this.props.onConfirm(); + }; render() { const { captcha, time } = this.state; @@ -56,7 +65,7 @@ class Index extends Component { initLoadCss {...this.props} style={{ width: 550 }} className="captchaWrapper" title={getLabel(111, "验证码验证")} buttons={[ - + ]} > diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 1978860a..bf310e92 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -8,7 +8,9 @@ import ComputerTemplate from "../payroll/templatePreview/computerTemplate"; import PhoneTemplate from "../payroll/templatePreview/phoneTemplate"; import "../payroll/templatePreview/index.less"; import * as API from "../../apis/mySalaryBenefits"; +import { payrollCheckType } from "../../apis/payroll"; import "./index.less"; +import CaptchaModal from "../../components/captchaModal"; @inject("mySalaryStore") @observer @@ -17,6 +19,7 @@ export default class MobilePayroll extends React.Component { super(props); this.state = { visible: false, + captchaVisible: false, authCode: "", mySalaryBillData: { employeeInformation: {}, @@ -26,13 +29,20 @@ export default class MobilePayroll extends React.Component { this.id = ""; } - componentWillMount() { + async componentWillMount() { const type = getQueryString("type"); this.id = getQueryString("id"); const { mySalaryStore: { init } } = this.props; - type !== "phone" && init(false); - type === "phone" && this.initMobile(); this.getMySalaryBill(this.id); + const { data, status } = await payrollCheckType(); + if (type !== "phone") { + if (status && data === "PWD") { + init(false); + } else { + this.setState({ captchaVisible: true }); + } + } + type === "phone" && this.initMobile(); } initMobile = () => { @@ -96,7 +106,7 @@ export default class MobilePayroll extends React.Component { render() { const { mySalaryStore: { clearLoading } } = this.props; - const { mySalaryBillData, visible } = this.state; + const { mySalaryBillData, visible, captchaVisible } = this.state; const type = getQueryString("type"); const employeeInformation = mySalaryBillData.employeeInformation ? mySalaryBillData.employeeInformation : {}; const salaryGroups = mySalaryBillData.salaryGroups ? mySalaryBillData.salaryGroups : []; @@ -148,6 +158,11 @@ export default class MobilePayroll extends React.Component { } + this.setState({ captchaVisible: false })} + onConfirm={() => this.props.mySalaryStore.setInitEmVerify()} + /> ); } diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.js b/pc4mobx/hrmSalary/pages/mySalary/index.js index 97ce00b8..3b7ad55d 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/index.js +++ b/pc4mobx/hrmSalary/pages/mySalary/index.js @@ -6,7 +6,6 @@ import { renderNoright } from "../../util"; // 渲染form数据的方法:因 import CustomTab from "../../components/customTab"; import moment from "moment"; import PayrollModal from "./payrollModal"; -import Authority from "./authority"; import CustomPaginationTable from "../../components/customPaginationTable"; import "./index.less"; @@ -29,9 +28,9 @@ export default class MySalary extends React.Component { this.historyPageInfo = { current: 1, pageSize: 10 }; } - componentWillMount() { - const { mySalaryStore: { init } } = this.props; - init(); + componentDidMount() { + const { mySalaryStore: { mySalaryBillList } } = this.props; + mySalaryBillList([moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")]); } // 查看工资单 @@ -114,7 +113,6 @@ export default class MySalary extends React.Component { myBillPageInfo } = mySalaryStore; const { salaryBillVisible, salaryInfoId, salaryRange } = this.state; - if (!hasRight && !loading) return renderNoright(); const topTab = [ { @@ -141,64 +139,62 @@ export default class MySalary extends React.Component { }; return (
- - } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={false} // 是否显示下拉按钮 - > - { - this.handleTabChange(v); - this.setState({ selectedKey: v }); - }} - /> -
- - { - this.state.selectedKey === "0" && - { - this.pageInfo.current = value; - this.handlePageChange(); - }} - onShowSizeChange={(current, pageSize) => { - this.pageInfo = { current, pageSize }; - this.handlePageChange(); - }} - /> - } - { - this.state.selectedKey === "2" && - { - this.historyPageInfo.current = value; - this.handleHistoryPageChange(); - }} - onShowSizeChange={(current, pageSize) => { - this.historyPageInfo = { current, pageSize }; - this.handleHistoryPageChange(); - }} - /> - } - -
-
-
+ } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={false} // 是否显示下拉按钮 + > + { + this.handleTabChange(v); + this.setState({ selectedKey: v }); + }} + /> +
+ + { + this.state.selectedKey === "0" && + { + this.pageInfo.current = value; + this.handlePageChange(); + }} + onShowSizeChange={(current, pageSize) => { + this.pageInfo = { current, pageSize }; + this.handlePageChange(); + }} + /> + } + { + this.state.selectedKey === "2" && + { + this.historyPageInfo.current = value; + this.handleHistoryPageChange(); + }} + onShowSizeChange={(current, pageSize) => { + this.historyPageInfo = { current, pageSize }; + this.handleHistoryPageChange(); + }} + /> + } + +
+
{ salaryBillVisible && -
- -
-
+ + +
+
+ +
+
+
+ this.setState({ captchaVisible: false })} + onConfirm={() => mySalaryStore.setInitEmVerify()} + /> +
); } } From cae153cebf084a42ee1d6be62829aa9370736ec2 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, 16 Jun 2023 16:57:03 +0800 Subject: [PATCH 17/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E9=AA=8C=E8=AF=81=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js index 7375cd4e..c5a80327 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js +++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js @@ -43,7 +43,7 @@ class MySalaryView extends Component { return ( -
+
Date: Fri, 16 Jun 2023 17:23:08 +0800 Subject: [PATCH 18/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=9F=A5=E7=9C=8B=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=BA=8C=E6=AC=A1=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/mobilePayroll/index.js | 8 ++++---- .../pages/payroll/templatePreview/phoneTemplate/index.js | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 1978860a..93a3d919 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -37,7 +37,7 @@ export default class MobilePayroll extends React.Component { initMobile = () => { const { mySalaryStore: { setInitEmVerify } } = this.props; - if (window.em) { + // if (window.em) { API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }).then(({ status, isNeedSecondAuth }) => { if (status && isNeedSecondAuth) { this.setState({ visible: true }); @@ -45,9 +45,9 @@ export default class MobilePayroll extends React.Component { setInitEmVerify(); } }); - } else { - setInitEmVerify(); - } + // } else { + // setInitEmVerify(); + // } }; doSecondAuth = () => { const { mySalaryStore: { setInitEmVerify } } = this.props; diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js index 607d2d42..ed72829a 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js @@ -33,7 +33,8 @@ export default class PhoneTemplate extends React.Component { } componentDidMount() { - if (this.props.isMsgPreview && this.props.salaryItemSet && window.em) { + // && window.em + if (this.props.isMsgPreview && this.props.salaryItemSet) { this.setState({ salaryItemSet: JSON.parse(this.props.salaryItemSet), salaryTemplateShowSet: JSON.parse(this.props.salaryTemplateShowSet) From 55bdfa2c457e35473b802ed28301a6e0dfc6775d 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, 16 Jun 2023 17:36:45 +0800 Subject: [PATCH 19/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=91=E6=94=BE=E6=93=8D=E4=BD=9C=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E7=9A=84=E8=AF=A6=E7=BB=86=E6=9D=83=E9=99=90=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payroll/SalarySendList.js | 4 ++-- pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js index 79752acc..2b98919b 100644 --- a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js +++ b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js @@ -92,7 +92,7 @@ export default class SalarySendList extends React.Component { title: "操作", key: "operate", render: (text, record) => { - const { sendNum, sendTotal, salaryAcctType, haveBackCalc } = record; + const { sendNum, sendTotal, salaryAcctType, haveBackCalc, canSeeDetail } = record; //显示发放 const showGrant = haveBackCalc === 1 && salaryAcctType === 0; return ( @@ -100,7 +100,7 @@ export default class SalarySendList extends React.Component { this.handleGrant(record)} style={{ marginRight: 10 }}>发放 { - !showGrant && + canSeeDetail && this.handleShowDetail(record)} style={{ marginRight: 10 }}>查看详情 } diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index aae01241..0be427d5 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -310,7 +310,7 @@ export default class PayrollGrant extends React.Component { dataIndex: "", display: true, render: (text, record) => { - if (record.sendStatus === "1" && !notShowGrantOrWithdraw) { + if (record.sendStatus === "1" && salarySendDetailBaseInfo.canSend) { return ( ); - } else if (!notShowGrantOrWithdraw) { + } else if (salarySendDetailBaseInfo.canSend) { return ( ]; - if (selectedKey === "0" && !notShowGrantOrWithdraw) { + if (selectedKey === "0" && salarySendDetailBaseInfo.canSend) { btnDom = [ , ...btnDom ]; - } else if (selectedKey === "1" && !notShowGrantOrWithdraw) { + } else if (selectedKey === "1" && salarySendDetailBaseInfo.canSend) { btnDom = [ Date: Mon, 19 Jun 2023 09:44:44 +0800 Subject: [PATCH 20/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=91=E6=94=BE=E5=9F=BA=E7=A1=80=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=B0=B4=E5=8D=B0=E8=AE=BE=E7=BD=AE=E7=9A=84=E6=B0=B4=E5=8D=B0?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../payroll/components/waterMarkSetModal.js | 17 ++++++++++------ .../pages/payroll/watermarkPreview.js | 20 ++++++++++--------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js b/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js index baaafa6c..aeaee2aa 100644 --- a/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js +++ b/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js @@ -118,12 +118,17 @@ class WaterMarkSetModal extends Component { onClick={() => this.setState({ wmcontSet: { ...wmcontSet, visible: true } })}/> { _.isEmpty(wmcontSet.textSet) ? : - { - window.open(`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/payroll/watermark/preview`, "_blank"); - }}/> 预览 + { + window.open(`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/payroll/watermark/preview`, "_blank"); + }} + > + + 预览 + }
: diff --git a/pc4mobx/hrmSalary/pages/payroll/watermarkPreview.js b/pc4mobx/hrmSalary/pages/payroll/watermarkPreview.js index 12d3e2ff..4ea21411 100644 --- a/pc4mobx/hrmSalary/pages/payroll/watermarkPreview.js +++ b/pc4mobx/hrmSalary/pages/payroll/watermarkPreview.js @@ -19,11 +19,13 @@ class WatermarkPreview extends Component { salaryBillBaseSetPreviewWaterMark = (payload) => { salaryBillBaseSetPreviewWaterMark(payload).then(({ status, data }) => { if (status) { + const { wmHeight: height, wmWidth: width, wmNoTransparent, wmRotate } = payload; watermark({ text: data, src: "", - rotate: `-15`, - alpha: 0.15, + width, height, + rotate: `-${wmRotate || 15}`, + alpha: wmNoTransparent / 100 || 0.15, interval: 2000, intervalCheck: true, clickCheck: true @@ -34,20 +36,20 @@ class WatermarkPreview extends Component { render() { return ( -
+

水印预览效果

水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

+ style={{ fontSize: 14 }}>水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

+ style={{ fontSize: 14 }}>水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

+ style={{ fontSize: 14 }}>水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

+ style={{ fontSize: 14 }}>水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

+ style={{ fontSize: 14 }}>水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

+ style={{ fontSize: 14 }}>水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果水印预览效果

); } From 0b6571c04d9eb87f961b1d4d03fe84aa12216848 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, 19 Jun 2023 13:49:31 +0800 Subject: [PATCH 21/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=B7=BB=E5=8A=A0=E8=96=AA=E8=B5=84=E6=A0=B8?= =?UTF-8?q?=E7=AE=97=E4=BA=BA=E5=91=98=E5=8C=B9=E9=85=8D=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/ruleconfig.js | 56 +- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 624 +++++++------------- 2 files changed, 254 insertions(+), 426 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js index b0639647..7ff084ce 100644 --- a/pc4mobx/hrmSalary/apis/ruleconfig.js +++ b/pc4mobx/hrmSalary/apis/ruleconfig.js @@ -1,53 +1,57 @@ -import { WeaTools } from 'ecCom'; -import { postFetch } from '../util/request'; +import { WeaTools } from "ecCom"; +import { postFetch } from "../util/request"; //通用字典表 {enumClass:""} export const commonEnumList = (params) => { - return WeaTools.callApi('/api/bs/hrmsalary/common/enum/list', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/common/enum/list", "GET", params); +}; export const sysOrderRule = params => { - return WeaTools.callApi('/api/bs/hrmsalary/sys/orderRule', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/sys/orderRule", "GET", params); +}; //保存排序规则 export const updateOrderRule = (params) => { - return postFetch('/api/bs/hrmsalary/sys/updateOrderRule', params); -} + return postFetch("/api/bs/hrmsalary/sys/updateOrderRule", params); +}; //导入规则详情信息 export const sysConfCodeRule = params => { - return WeaTools.callApi('/api/bs/hrmsalary/sys/conf/code', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/sys/conf/code", "GET", params); +}; //保存导入规则 export const saveMatchEmployeeModeRule = (params) => { - return postFetch('/api/bs/hrmsalary/sys/saveMatchEmployeeModeRule', params); -} + return postFetch("/api/bs/hrmsalary/sys/saveMatchEmployeeModeRule", params); +}; //应用配置查询 export const queryAppsetting = (params) => { - return WeaTools.callApi('/api/bs/hrmsalary/sys/app/setting', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/sys/app/setting", "GET", params); +}; //加密配置保存 export const saveEncryptSetting = (params) => { - return postFetch('/api/bs/hrmsalary/sys/app/setting/saveEncryptSetting', params); -} + return postFetch("/api/bs/hrmsalary/sys/app/setting/saveEncryptSetting", params); +}; //加密配置保存 export const appSettingSave = (params) => { - return postFetch('/api/bs/hrmsalary/sys/app/setting/save', params); -} + return postFetch("/api/bs/hrmsalary/sys/app/setting/save", params); +}; //获取加密进度条 export const getEncryptProgress = params => { - return WeaTools.callApi('/api/bs/hrmsalary/sys/app/getEncryptProgress', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/sys/app/getEncryptProgress", "GET", params); +}; //保存报税规则 export const operateTaxDeclarationFunction = (params) => { - return postFetch('/api/bs/hrmsalary/sys/operateTaxDeclarationFunction', params); -} + return postFetch("/api/bs/hrmsalary/sys/operateTaxDeclarationFunction", params); +}; +//保存匹配规则 +export const saveSalaryAcctEmployeeRule = (params) => { + return postFetch("/api/bs/hrmsalary/sys/saveSalaryAcctEmployeeRule", params); +}; //保存薪酬统计报表 export const reportStatisticsReportSave = (params) => { - return postFetch('/api/bs/hrmsalary/report/statistics/report/save', params); -} + return postFetch("/api/bs/hrmsalary/report/statistics/report/save", params); +}; //薪酬统计维度下拉列表 export const reportGetForm = params => { - return WeaTools.callApi('/api/bs/hrmsalary/report/statistics/report/getForm', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/report/getForm", "GET", params); +}; diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 16c8b786..675273ea 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -5,8 +5,7 @@ * Date: 2022-09-19 18:15:32 */ import React, { Component } from "react"; -import { WeaFormItem, WeaLocaleProvider, WeaNewScroll, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom"; -import { CheckBox } from "../appConfig"; +import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaNewScroll, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom"; import { message, Modal } from "antd"; import * as API from "../../apis/ruleconfig"; import "./index.less"; @@ -14,100 +13,59 @@ import ProgressModal from "../../components/progressModal"; const { getLabel } = WeaLocaleProvider; -class Index extends Component { +export default class Index extends Component { constructor(props) { super(props); this.state = { items: [], - importItems: [], - enctryItems: [], - declareItems: [], - loading: { - order: false, - employee: false, - encry: false, - declare: false - }, + matchRuleOptions: [], orderOptions: [], ascOptions: [], employeeOptions: [], saveParams: { orderRule: "", ascOrDesc: "", rule: "", enctry: "", - operateTaxDeclaration: "" + operateTaxDeclaration: "", + matchRule: "" }, + showEncryptOperationButton: "", progressVisible: false, progress: 50 }; } - componentDidMount() { - let sysSetting = this.getSysSetting(); + async componentDidMount() { + const { saveParams } = this.state; + const [ + matchRuleEnum, orderRuleEnum, ascOrDescEnum, matchEmployeeModeEnum, + orderRules, codeRule, appSettings + ] = await Promise.all([ + this.matchRuleEnum(), this.orderRuleEnum(), this.ascOrDescEnum(), this.matchEmployeeModeEnum(), + this.sysOrderRule(), this.sysConfCodeRule(), this.queryAppsetting() + ]); + const matchRuleOptions = _.map(matchRuleEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); + const orderOptions = _.map(orderRuleEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); + const ascOptions = _.map(ascOrDescEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); + const employeeOptions = _.map(matchEmployeeModeEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); + const { data: { ascOrDesc, orderRule } } = orderRules; + const { data: rule } = codeRule; + const { + data: { + showEncryptOperationButton, + isOpenEncrypt: enctry, + isOpenTaxDeclaration: operateTaxDeclaration, + salaryAcctEmployeeRule: matchRule + } + } = appSettings; + this.setState({ + matchRuleOptions, orderOptions, ascOptions, employeeOptions, + showEncryptOperationButton, + saveParams: { + ...saveParams, + ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule + } + }); } - getSysSetting = async () => { - const [orderRuleEnum, ascOrDescEnum, matchEmployeeModeEnum, sysOrderRule, sysConfCodeRule, queryAppsetting] = await Promise.all([this.orderRuleEnum(), this.ascOrDescEnum(), this.matchEmployeeModeEnum(), this.sysOrderRule(), this.sysConfCodeRule(), this.queryAppsetting()]); - if (orderRuleEnum.status && ascOrDescEnum.status && matchEmployeeModeEnum.status) { - const orderOptions = _.map(orderRuleEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); - const ascOptions = _.map(ascOrDescEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); - const employeeOptions = _.map(matchEmployeeModeEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); - this.setState({ - items: [ - { - com: Select({ - label: "排序字段", - onChange: this.handleChane, - value: sysOrderRule.data.orderRule || orderOptions[0].value, - options: orderOptions - }) - }, - { - com: Select({ - label: "正序/倒序", - onChange: this.handleChane, - value: sysOrderRule.data.ascOrDesc || ascOptions[0].value, - options: ascOptions - }) - } - ], - importItems: [ - { - com: Select({ - label: "人员字段", - onChange: this.handleChane, - value: sysConfCodeRule.data || employeeOptions[0].value, - options: employeeOptions - }) - } - ], - enctryItems: queryAppsetting.data.showEncryptOperationButton === "true" ? [ - { - com: CheckBox({ - label: "加密设置", - value: queryAppsetting.data.isOpenEncrypt, - onChange: (data) => this.handleChane({ type: "加密设置", selected: data }) - }) - } - ] : [], - declareItems: [ - { - com: CheckBox({ - label: "个税申报", - value: queryAppsetting.data.isOpenTaxDeclaration, - onChange: (data) => this.handleChane({ type: "个税申报", selected: data }) - }) - } - ], - saveParams: { - ...this.state.saveParams, - orderRule: sysOrderRule.data.orderRule || orderOptions[0].value, - ascOrDesc: sysOrderRule.data.ascOrDesc || ascOptions[0].value, - rule: sysConfCodeRule.data || employeeOptions[0].value, - enctry: queryAppsetting.data.isOpenEncrypt, - operateTaxDeclaration: queryAppsetting.data.isOpenTaxDeclaration - } - }); - } - }; sysOrderRule = () => { return API.sysOrderRule(); }; @@ -117,6 +75,12 @@ class Index extends Component { queryAppsetting = () => { return API.queryAppsetting(); }; + matchRuleEnum = () => { + const payload = { + enumClass: "com.engine.salary.sys.enums.SalaryAcctEmployeeRuleEnum" + }; + return API.commonEnumList(payload); + }; orderRuleEnum = () => { const payload = { enumClass: "com.engine.salary.sys.enums.OrderRuleEnum" @@ -135,345 +99,207 @@ class Index extends Component { }; return API.commonEnumList(payload); }; - handleSave = (type) => { - const { saveParams } = this.state; - if (type === "ORDER") { - - // if (_.isEmpty(saveParams.orderRule) || _.isEmpty(saveParams.ascOrDesc)) { - // Modal.warning({ - // title: "信息确认", - // content: "必要信息不完整,红色*为必填项!" - // }); - // return; - // } - // this.setState({ loading: { ...this.state.loading, order: true } }); - // API.updateOrderRule(_.pick(saveParams, ["orderRule", "ascOrDesc"])).then(({ status, errormsg }) => { - // this.setState({ loading: { ...this.state.loading, order: false } }); - // if (status) { - // message.success("保存成功!"); - // let sysSetting = this.getSysSetting(); - // } else { - // message.error(errormsg || "保存失败!"); - // } - // }); - - - } else if (type === "EMPLOYEE") { - // if (_.isEmpty(saveParams.rule)) { - // Modal.warning({ - // title: "信息确认", - // content: "必要信息不完整,红色*为必填项!" - // }); - // return; - // } - // this.setState({ loading: { ...this.state.loading, employee: true } }); - // API.saveMatchEmployeeModeRule(_.pick(saveParams, ["rule"])).then(({ status, errormsg }) => { - // this.setState({ loading: { ...this.state.loading, employee: false } }); - // if (status) { - // message.success("保存成功!"); - // let sysSetting = this.getSysSetting(); - // } else { - // message.error(errormsg || "保存失败!"); - // } - // }); - } else if (type === "ENCRYTION") { - // Modal.confirm({ - // title: "信息确认", - // content: "开启/关闭加密前请做好数据库备份!!!逆向解密会花费几分钟时间,请耐心等待!!!", - // onOk: () => { - // this.setState({ loading: { ...this.state.loading, encry: true } }); - // API.saveEncryptSetting({ isOpenEncrypt: saveParams.enctry }).then(({ data, status, errormsg }) => { - // this.setState({ loading: { ...this.state.loading, encry: false } }); - // if (status) { - // const { isSuccess, progressId, msg } = data; - // if (!isSuccess) { - // message.error(errormsg || msg || "保存失败!"); - // return; - // } - // this.setState({ - // progressVisible: true, - // progress: 0 - // }, () => { - // let number = 1; - // this.timer && clearInterval(this.timer); - // this.timer = setInterval(() => { - // API.getEncryptProgress({ progressId }).then(({ status, data, errormsg }) => { - // const { progress_statue } = data; - // if (progress_statue === "success" && this.timer) { - // clearInterval(this.timer); - // this.timer = null; - // number = 1; - // this.setState({ - // progress: 100 - // }, () => { - // this.setState({ - // progressVisible: false - // }); - // }); - // message.success("保存成功"); - // } else if (progress_statue === "in_progress" && this.timer) { - // if (this.state.progress >= 90) { - // this.setState({ - // progress: this.state.progress + (0.001 * this.state.progress) - // }); - // } else { - // this.setState({ - // progress: 10 * number - // }, () => number++); - // } - // } else if (!status || (progress_statue === "fail" && this.timer)) { - // clearInterval(this.timer); - // this.timer = null; - // number = 1; - // this.setState({ - // progress: 100 - // }, () => { - // this.setState({ - // progressVisible: false - // }); - // }); - // message.error(errormsg || "保存失败!"); - // } - // }); - // }, 1000); - // }); - // } - // }); - // }, - // onCancel: () => { - // } - // }); - } else if (type === "DECLARATION") { - // this.setState({ loading: { ...this.state.loading, declare: true } }); - // API.operateTaxDeclarationFunction(_.pick(saveParams, ["operateTaxDeclaration"])).then(({ status, errormsg }) => { - // this.setState({ loading: { ...this.state.loading, declare: false } }); - // if (status) { - // message.success("保存成功!"); - // let sysSetting = this.getSysSetting(); - // } else { - // message.error(errormsg || "保存失败!"); - // } - // }); - } + updateOrderRule = () => { + API.updateOrderRule(_.pick(this.state.saveParams, ["orderRule", "ascOrDesc"])) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(22619, "保存成功!")); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }; + saveMatchEmployeeModeRule = () => { + API.saveMatchEmployeeModeRule(_.pick(this.state.saveParams, ["rule"])).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(22619, "保存成功!")); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }; + saveSalaryAcctEmployeeRule = () => { + API.saveSalaryAcctEmployeeRule({ rule: this.state.saveParams.matchRule }) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(22619, "保存成功!")); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }; + operateTaxDeclarationFunction = () => { + API.operateTaxDeclarationFunction(_.pick(this.state.saveParams, ["operateTaxDeclaration"])) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(22619, "保存成功!")); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }; + saveEncryptSetting = () => { + API.saveEncryptSetting({ isOpenEncrypt: this.state.saveParams.enctry }) + .then(({ data, status, errormsg }) => { + if (status) { + const { isSuccess, progressId, msg } = data; + if (!isSuccess) { + message.error(errormsg || msg || getLabel(22620, "保存失败!")); + return; + } + this.setState({ + progressVisible: true, + progress: 0 + }, () => { + let number = 1; + this.timer && clearInterval(this.timer); + this.timer = setInterval(() => { + API.getEncryptProgress({ progressId }).then(({ status, data, errormsg }) => { + const { progress_statue } = data; + if (progress_statue === "success" && this.timer) { + clearInterval(this.timer); + this.timer = null; + number = 1; + this.setState({ + progress: 100 + }, () => { + this.setState({ + progressVisible: false + }); + }); + message.success(getLabel(22619, "保存成功!")); + } else if (progress_statue === "in_progress" && this.timer) { + if (this.state.progress >= 90) { + this.setState({ + progress: this.state.progress + (0.001 * this.state.progress) + }); + } else { + this.setState({ + progress: 10 * number + }, () => number++); + } + } else if (!status || (progress_statue === "fail" && this.timer)) { + clearInterval(this.timer); + this.timer = null; + number = 1; + this.setState({ + progress: 100 + }, () => { + this.setState({ + progressVisible: false + }); + }); + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }, 1000); + }); + } + }); }; - handleChane = (data) => { - const { type, selected } = data; - if (type === "排序字段") { - this.setState({ - saveParams: { ...this.state.saveParams, orderRule: selected } - }, () => { - Modal.confirm({ - title: getLabel(131329, "信息确认"), - content: getLabel(111, "确认要保存吗?"), - onOk: () => { - API.updateOrderRule(_.pick(this.state.saveParams, ["orderRule", "ascOrDesc"])) - .then(({ status, errormsg }) => { - if (status) { - message.success(getLabel(22619, "保存成功!")); - let sysSetting = this.getSysSetting(); - } else { - message.error(errormsg || getLabel(22620, "保存失败!")); - } - }); - }, - onCancel: () => { + handleChange = (key, val) => { + const { saveParams } = this.state; + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "确认要保存吗?"), + onOk: () => { + this.setState({ + saveParams: { + ...saveParams, + [key]: val + } + }, () => { + switch (key) { + case "orderRule": + case "ascOrDesc": + this.updateOrderRule(); + break; + case "rule": + this.saveMatchEmployeeModeRule(); + break; + case "matchRule": + this.saveSalaryAcctEmployeeRule(); + break; + case "operateTaxDeclaration": + this.operateTaxDeclarationFunction(); + break; + case "enctry": + this.saveEncryptSetting(); + break; + default: + break; } }); - }); - } else if (type === "正序/倒序") { - this.setState({ - saveParams: { ...this.state.saveParams, ascOrDesc: selected } - }, () => { - Modal.confirm({ - title: getLabel(131329, "信息确认"), - content: getLabel(111, "确认要保存吗?"), - onOk: () => { - API.updateOrderRule(_.pick(this.state.saveParams, ["orderRule", "ascOrDesc"])) - .then(({ status, errormsg }) => { - if (status) { - message.success(getLabel(22619, "保存成功!")); - let sysSetting = this.getSysSetting(); - } else { - message.error(errormsg || getLabel(22620, "保存失败!")); - } - }); - }, - onCancel: () => { + }, + onCancel: () => { + this.setState({ + saveParams: { + ...saveParams, + [key]: saveParams[key] } }); - }); - } else if (type === "人员字段") { - this.setState({ - saveParams: { ...this.state.saveParams, rule: selected } - }, () => { - Modal.confirm({ - title: getLabel(131329, "信息确认"), - content: getLabel(111, "确认要保存吗?"), - onOk: () => { - API.saveMatchEmployeeModeRule(_.pick(this.state.saveParams, ["rule"])).then(({ status, errormsg }) => { - this.setState({ loading: { ...this.state.loading, employee: false } }); - if (status) { - message.success(getLabel(22619, "保存成功!")); - let sysSetting = this.getSysSetting(); - } else { - message.error(errormsg || getLabel(22620, "保存失败!")); - } - }); - }, - onCancel: () => { - } - }); - }); - } else if (type === "加密设置") { - this.setState({ - saveParams: { ...this.state.saveParams, enctry: selected } - }, () => { - Modal.confirm({ - title: getLabel(131329, "信息确认"), - content: getLabel(543354, "开启/关闭加密前请做好数据库备份!!!逆向解密会花费几分钟时间,请耐心等待!!!"), - onOk: () => { - API.saveEncryptSetting({ isOpenEncrypt: this.state.saveParams.enctry }) - .then(({ data, status, errormsg }) => { - this.setState({ loading: { ...this.state.loading, encry: false } }); - if (status) { - const { isSuccess, progressId, msg } = data; - if (!isSuccess) { - message.error(errormsg || msg || getLabel(22620, "保存失败!")); - return; - } - this.setState({ - progressVisible: true, - progress: 0 - }, () => { - let number = 1; - this.timer && clearInterval(this.timer); - this.timer = setInterval(() => { - API.getEncryptProgress({ progressId }).then(({ status, data, errormsg }) => { - const { progress_statue } = data; - if (progress_statue === "success" && this.timer) { - clearInterval(this.timer); - this.timer = null; - number = 1; - this.setState({ - progress: 100 - }, () => { - this.setState({ - progressVisible: false - }); - }); - message.success(getLabel(22619, "保存成功!")); - } else if (progress_statue === "in_progress" && this.timer) { - if (this.state.progress >= 90) { - this.setState({ - progress: this.state.progress + (0.001 * this.state.progress) - }); - } else { - this.setState({ - progress: 10 * number - }, () => number++); - } - } else if (!status || (progress_statue === "fail" && this.timer)) { - clearInterval(this.timer); - this.timer = null; - number = 1; - this.setState({ - progress: 100 - }, () => { - this.setState({ - progressVisible: false - }); - }); - message.error(errormsg || getLabel(22620, "保存失败!")); - } - }); - }, 1000); - }); - } - }); - }, - onCancel: () => { - } - }); - }); - } else if (type === "个税申报") { - this.setState({ - saveParams: { ...this.state.saveParams, operateTaxDeclaration: selected } - }, () => { - Modal.confirm({ - title: getLabel(131329, "信息确认"), - content: getLabel(111, "确认要保存吗?"), - onOk: () => { - API.operateTaxDeclarationFunction(_.pick(this.state.saveParams, ["operateTaxDeclaration"])) - .then(({ status, errormsg }) => { - if (status) { - message.success(getLabel(22619, "保存成功!")); - let sysSetting = this.getSysSetting(); - } else { - message.error(errormsg || getLabel(22620, "保存失败!")); - } - }); - }, - onCancel: () => { - } - }); - }); - } + } + }); }; render() { - const { items, importItems, enctryItems, declareItems, loading } = this.state; + const { saveParams, matchRuleOptions, orderOptions, ascOptions, employeeOptions } = this.state; + const { orderRule, ascOrDesc, rule, enctry, operateTaxDeclaration, matchRule } = saveParams; return (
规则配置} + title={{getLabel(543355, "规则配置")}} icon={} iconBgcolor="#F14A2D" buttons={[]} /> - - 排序规则 - - {/**/} -
- } showGroup center items={items}/> - - 人员校验规则 - - {/**/} -
- } showGroup center items={importItems}/> - { - !_.isEmpty(enctryItems) && - - 加密规则 - - {/**/} -
- } showGroup center items={enctryItems}/> - } - - 报税规则 - - {/**/} -
- } showGroup center items={declareItems}/> + + + this.handleChange("orderRule", val)} + /> + + + this.handleChange("ascOrDesc", val)} + /> + + + + + this.handleChange("rule", val)} + /> + + + {/*{*/} + {/* !_.isEmpty(enctryItems) &&*/} + + + this.handleChange("enctry", val)}/> + + + {/*}*/} + + + this.handleChange("operateTaxDeclaration", val)}/> + + + + + this.handleChange("matchRule", val)} + /> + + { this.state.progressVisible && { this.setState({ progressVisible: false, progress: 0 }); @@ -487,8 +313,6 @@ class Index extends Component { } } -export default Index; - export const Select = payload => { const { label, From 4dca3e3d7ddc8ba1cd88a9f868b57b07859785e5 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, 19 Jun 2023 17:51:51 +0800 Subject: [PATCH 22/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=A8=A1=E6=9D=BF=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payroll/index.js | 21 +++- .../pages/payroll/templateSettingList.js | 117 ++++++++++++------ pc4mobx/hrmSalary/stores/payroll.js | 35 ++++-- 3 files changed, 128 insertions(+), 45 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index 960fbfa9..75fe7f6f 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -254,7 +254,15 @@ export default class Payroll extends React.Component { render() { const { payrollStore, taxAgentStore: { showOperateBtn } } = this.props; - const { loading, hasRight, templateStore, deletePayroll, templateBaseData } = payrollStore; + const { + loading, + hasRight, + templateTableSelectedRowKeys, + setTemplateTableSelectedRowKeys, + deletePayroll, + templateBaseData, + setTemplateTablePageInfo + } = payrollStore; const { currentStep, selectedTab, templateSearchValue, templateSelect, startDate, endDate } = this.state; if (!hasRight && !loading) { // 无权限处理 return renderLoading(); @@ -317,7 +325,7 @@ export default class Payroll extends React.Component { style={{ marginLeft: 10 }} type="ghost" onClick={() => { - const selectedRowKeys = toJS(templateStore.selectedRowKeys); + const selectedRowKeys = toJS(templateTableSelectedRowKeys); if (!selectedRowKeys.length) { message.info("未选中任何数据!"); return; @@ -391,7 +399,14 @@ export default class Payroll extends React.Component { topTab={topTab} searchOperationItem={renderRightOperation()} onChange={(v) => { - this.setState({ selectedKey: v, stepSlideVisible: false, editSlideVisible: false }); + this.setState({ + selectedKey: v, + stepSlideVisible: false, + editSlideVisible: false + }, () => { + setTemplateTablePageInfo({ current: 1 }); + setTemplateTableSelectedRowKeys([]); + }); }} />
diff --git a/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js b/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js index 1711e103..05d75b27 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js +++ b/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js @@ -1,10 +1,10 @@ import React from "react"; import { inject, observer } from "mobx-react"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; +import { toJS } from "mobx"; import { Radio, Spin } from "antd"; -import { WeaTableNew } from "comsMobx"; - -const WeaTable = WeaTableNew.WeaTable; +const getLabel = WeaLocaleProvider.getLabel; @inject("payrollStore") @observer export default class TemplateSettingList extends React.Component { @@ -15,23 +15,23 @@ export default class TemplateSettingList extends React.Component { } // 编辑操作按钮 - onEdit(record) { + onEdit = (record) => { this.props.onEdit && this.props.onEdit(record); - } + }; // 复制操作按钮 - onCopy(record) { + onCopy = (record) => { this.props.onCopy && this.props.onCopy(record); - } + }; // 删除操作按钮 - onDelete(record) { + onDelete = (record) => { this.props.onDelete && this.props.onDelete(record); - } + }; // 操作按钮 - onOperatesClick = (record, index, operate, flag) => { - switch (operate.index.toString()) { + onOperatesClick = (record, operate) => { + switch (operate) { case "0": // 编辑 this.onEdit(record); break; @@ -45,21 +45,22 @@ export default class TemplateSettingList extends React.Component { }; // 默认使用配置 - recordItemChange(record) { + recordItemChange = (record) => { const { payrollStore } = this.props; const { changePayrollDefaultUse, getPayrollTemplateList } = payrollStore; changePayrollDefaultUse(record.id).then(() => { getPayrollTemplateList(); }); - } + }; // 增加编辑功能,重写columns绑定事件 - getColumns = columns => { - const { showOperateBtn } = this.props; - let newColumns = ""; - newColumns = columns.map(column => { + getColumns = () => { + const { showOperateBtn, payrollStore } = this.props; + const { templateTableColumns: columns } = payrollStore; + let newColumns = []; + newColumns = _.filter(toJS(columns), item => item.dataIndex !== "id").map(column => { let newColumn = column; - newColumn.render = (text, record, index) => { + newColumn.render = (text, record) => { //前端元素转义 let valueSpan = record[newColumn.dataIndex + "span"] !== undefined @@ -70,10 +71,8 @@ export default class TemplateSettingList extends React.Component { return ( { - this.recordItemChange(record); - }} + checked={record.useType === "1"} + onChange={() => this.recordItemChange(record)} /> ); default: @@ -82,25 +81,73 @@ export default class TemplateSettingList extends React.Component { }; return newColumn; }); - return newColumns; + return [ + ...newColumns, + { + dataIndex: "operate", + title: getLabel(30585, "操作"), + width: 150, + render: (_, record) => { + return + this.onOperatesClick(record, "0")}>{getLabel(501169, "编辑")} + this.onOperatesClick(record, "1")}>{getLabel(77, "复制")} + this.onOperatesClick(record, "2")}>{getLabel(535052, "删除")} + ; + } + } + ]; }; render() { const { payrollStore } = this.props; - const { templateStore, loading } = payrollStore; + const { + templateTableDataSource, + loading, + templateTablePageInfo, + setTemplateTablePageInfo, + getPayrollTemplateList, + templateTableSelectedRowKeys, + setTemplateTableSelectedRowKeys + } = payrollStore; + const pagination = { + ...templateTablePageInfo, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + setTemplateTablePageInfo({ ...templateTablePageInfo, current, pageSize }, () => { + getPayrollTemplateList(); + }); + }, + onChange: current => { + setTemplateTablePageInfo({ ...templateTablePageInfo, current }, () => { + getPayrollTemplateList(); + }); + } + }; + const rowSelection = { + selectedRowKeys: toJS(templateTableSelectedRowKeys), + onChange: selectedRowKeys => setTemplateTableSelectedRowKeys(selectedRowKeys) + }; return (
- {loading - ?
- -
- : } + { + loading + ?
+ +
+ : + }
); } diff --git a/pc4mobx/hrmSalary/stores/payroll.js b/pc4mobx/hrmSalary/stores/payroll.js index d6d3be81..7a2e18d7 100644 --- a/pc4mobx/hrmSalary/stores/payroll.js +++ b/pc4mobx/hrmSalary/stores/payroll.js @@ -55,6 +55,14 @@ export class payrollStore { @observable canWidthdrawColumns = []; // 可以撤回的列表列名 @observable canWithdrawPageInfo = {}; // 可以撤回列表分页对象 + // **** 工资单模板 **** + @observable templateTableColumns = []; // 工资单模板columns + @observable templateTableDataSource = []; // 工资单模板dataSource + @observable templateTablePageInfo = { + current: 1, pageSize: 10, total: 0 + }; // 工资单模板pageInfo + @observable templateTableSelectedRowKeys = []; // 工资单模板复选框 + @action setReplenishSalaryTemplateSalaryItemSet = replenishSalaryTemplateSalaryItemSet => (this.replenishSalaryTemplateSalaryItemSet = replenishSalaryTemplateSalaryItemSet); @@ -80,6 +88,14 @@ export class payrollStore { @action setSalaryItemSet = salaryItemSet => (this.salaryItemSet = salaryItemSet); + @action("工资单模板分页信息修改") + setTemplateTablePageInfo = (pageInfo, callback) => { + this.templateTablePageInfo = { ...this.templateTablePageInfo, ...pageInfo }; + callback && callback(); + }; + @action("工资单模板复选框选择") + setTemplateTableSelectedRowKeys = (selectedRowKeys) => this.templateTableSelectedRowKeys = selectedRowKeys; + // 初始化操作 @action doInit = () => { @@ -136,9 +152,15 @@ export class payrollStore { @action getPayrollTemplateList = (params = {}) => { this.loading = true; - API.getPayrollTemplateList(params).then(res => { + API.getPayrollTemplateList({ ...params, ...this.templateTablePageInfo }).then(res => { if (res.status) { - this.templateStore.getDatas(res.data.datas); + this.templateTableColumns = res.data.columns; + this.templateTableDataSource = res.data.list; + this.setTemplateTablePageInfo({ + current: res.data.pageNum, + pageSize: res.data.pageSize, + total: res.data.total + }); } else { message.error(res.errormsg || "获取失败"); } @@ -149,9 +171,7 @@ export class payrollStore { // 工资单模板-获取工资单模板基础设置表单 @action getPayrollBaseForm = (id = "") => { - let params = { - id - }; + let params = { id }; return new Promise((resolve, reject) => { API.getPayrollBaseForm(params).then(res => { if (res.status) { @@ -354,6 +374,7 @@ export class payrollStore { API.deletePayroll(ids).then(res => { if (res.status) { message.success("删除成功"); + this.setTemplateTableSelectedRowKeys([]); this.getPayrollTemplateList(); } else { message.error(res.errormsg || "删除失败"); @@ -525,7 +546,7 @@ export class payrollStore { reject(); } }).catch(() => { - this.btnLoading = false + this.btnLoading = false; // WeaLoadingGlobal.end(); // WeaLoadingGlobal.destroy(); }); @@ -553,7 +574,7 @@ export class payrollStore { reject(); } }).catch(() => { - this.btnLoading = false + this.btnLoading = false; WeaLoadingGlobal.end(); WeaLoadingGlobal.destroy(); }); From b77aad0e42e0a2a2caa726f0b748191fcce86bbb 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, 19 Jun 2023 18:48:50 +0800 Subject: [PATCH 23/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=A8=A1=E6=9D=BF=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../payroll/components/waterMarkSetModal.js | 21 +++++++++------ pc4mobx/hrmSalary/pages/payroll/index.js | 8 +++--- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 27 ++++++++++++------- pc4mobx/hrmSalary/stores/payroll.js | 2 +- 4 files changed, 36 insertions(+), 22 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js b/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js index aeaee2aa..927e1fbd 100644 --- a/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js +++ b/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js @@ -8,6 +8,7 @@ import React, { Component } from "react"; import { WeaError, WeaFormItem, + WeaHelpfulTip, WeaInputNumber, WeaLocaleProvider, WeaSearchGroup, @@ -100,14 +101,18 @@ class WaterMarkSetModal extends Component { - this.setState({ wmClassify })} - /> +
+ this.setState({ wmClassify })} + /> + +
{ diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index 75fe7f6f..c974b699 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -351,9 +351,11 @@ export default class Payroll extends React.Component { { this.setState({ templateSearchValue: value }); - }} onSearch={(value) => { - this.handleTemplateSearch(value); - }}/> + }} + onSearch={(value) => { + this.handleTemplateSearch(value); + }} + />
); } else if (this.state.selectedKey === "2") { diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 675273ea..6f088528 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -244,7 +244,14 @@ export default class Index extends Component { }; render() { - const { saveParams, matchRuleOptions, orderOptions, ascOptions, employeeOptions } = this.state; + const { + saveParams, + matchRuleOptions, + orderOptions, + ascOptions, + employeeOptions, + showEncryptOperationButton + } = this.state; const { orderRule, ascOrDesc, rule, enctry, operateTaxDeclaration, matchRule } = saveParams; return (
@@ -274,15 +281,15 @@ export default class Index extends Component { /> - {/*{*/} - {/* !_.isEmpty(enctryItems) &&*/} - - - this.handleChange("enctry", val)}/> - - - {/*}*/} + { + showEncryptOperationButton === "true" && + + + this.handleChange("enctry", val)}/> + + + } { this.loading = true; - API.getPayrollTemplateList({ ...params, ...this.templateTablePageInfo }).then(res => { + API.getPayrollTemplateList({ ...this.templateTablePageInfo, ...params }).then(res => { if (res.status) { this.templateTableColumns = res.data.columns; this.templateTableDataSource = res.data.list; From e06728670b2ab4963c7e22060ec41e2708fd2cb7 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, 20 Jun 2023 14:25:30 +0800 Subject: [PATCH 24/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=87=E9=9B=86=E9=A1=B5=E9=9D=A2=E5=88=97=E8=A1=A8=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../attendance/components/attendanceDataViewSlide.js | 6 +++--- .../pages/dataAcquisition/components/tableRecord.js | 3 ++- pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js | 2 +- pc4mobx/hrmSalary/pages/dataAcquisition/layout.js | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js index b692e31e..45fa6bfe 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js @@ -102,8 +102,8 @@ class AttendanceDataViewSlide extends Component { className="attendanceSlideWrapper" top={0} measureT="%" - width={800} - measureX="px" + width={80} + measureX="%" height={100} measureY="%" direction="right" @@ -131,7 +131,7 @@ class AttendanceDataViewSlide extends Component { dataSource={dataSource} pagination={pagination} loading={loading.query} - xWidth={columns.length * 120} + xWidth={columns.length * 180} />
} diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js b/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js index 00fedce7..f3c9e716 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js @@ -58,7 +58,7 @@ class TableRecord extends Component { }, pageInfo: { current: 1, pageSize: 10, total: 0 - }, + } }, () => this.getTableRecordData()); }; @@ -186,6 +186,7 @@ class TableRecord extends Component { dataSource={dataSource} pagination={pagination} loading={loading.query} + xWidth={columns.length * 180} /> ); diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js index 579cb872..7f41b9de 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js @@ -154,7 +154,7 @@ class DataTables extends Component { dataSource={dataSource} pagination={pagination} loading={loading.query} - xWidth={getColumns.length * 150} + xWidth={getColumns.length * 160} />; } } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js b/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js index 631d0586..4c421d60 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js @@ -106,8 +106,8 @@ class Layout extends Component { visible={visible} top={0} measureT="%" - width={1000} - measureX="px" + width={80} + measureX="%" height={100} measureY="%" direction="right" From 2f4eebe6c7b54da6e363bb81adeda3a5b7d314ea 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, 26 Jun 2023 10:24:05 +0800 Subject: [PATCH 25/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=B8=8A=E9=9D=A2=E6=93=8D=E4=BD=9C=E6=8C=89=E9=92=AE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=A4=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../socialSecurityBenefits/archives/index.js | 2 +- .../socialSecurityBenefits/programme/index.js | 120 +++++------------- .../standingBook/index.js | 13 +- 3 files changed, 42 insertions(+), 93 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index 3a8ad7ab..72f9d432 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -103,7 +103,7 @@ export default class Archives extends React.Component { }; getColumns = () => { - const { columns, pageInfo, selectedKey } = this.state; + const { columns, selectedKey } = this.state; const { taxAgentStore: { showOperateBtn } } = this.props; let tmpV = _.map(columns.filter(item => item.display === "TRUE"), item => { return { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js index bee748ee..80fbb6e5 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js @@ -1,10 +1,9 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; -import { Button, Dropdown, Menu, message, Modal, Switch } from "antd"; -import { WeaNewScroll, WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; -import { WeaTableNew } from "comsMobx"; -import { renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 +import { Button, Dropdown, Menu, message, Modal } from "antd"; +import { WeaLocaleProvider, WeaNewScroll, WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; +import { renderNoright } from "../../../util"; import CustomTab from "../../../components/customTab"; import SlideModalTitle from "../../../components/slideModalTitle"; import TipLabel from "../../../components/TipLabel"; @@ -14,11 +13,11 @@ import { paymentScopeEnum, welfareTypeEnum } from "./enum"; import CustomPaginationTable from "../../../components/customPaginationTable"; import TwoColContent from "../../../components/twoColContent"; import CopySchemaModal from "./copySchemaModal"; -import "./index.less"; import CustomBenefitsTable from "./customBenefitsTable"; +import "./index.less"; -const WeaMobxTable = WeaTableNew.WeaTable; +const { getLabel } = WeaLocaleProvider; @inject("programmeStore", "taxAgentStore", "salaryFileStore") @observer export default class Programme extends React.Component { @@ -57,25 +56,17 @@ export default class Programme extends React.Component { newColumns = newColumns.map(column => { let newColumn = column; - newColumn.render = (text, record, index) => { + newColumn.render = (text, record) => { //前端元素转义 let valueSpan = record[newColumn.dataIndex + "span"] !== undefined ? record[newColumn.dataIndex + "span"] : record[newColumn.dataIndex]; - if (newColumn.dataIndex == "id") { - newColumn.display = false; - } + if (newColumn.dataIndex === "id") newColumn.display = false; switch (newColumn.dataIndex) { case "operate": return ( - { - this.onEdit(record); - }}> - 编辑 - + this.onEdit(record)}>编辑 ); default: return
; @@ -87,72 +78,38 @@ export default class Programme extends React.Component { newColumns.push({ title: "操作", dataIndex: "operate", + width: 120, render: (text, record) => { return ( - { - this.onEdit(record); - }}> - {showOperateBtn ? "编辑" : "查看"} - - ); - } - }); - showOperateBtn && newColumns.push({ - key: "moreOperate", - dataIndex: "moreOperate", - render: (text, record) => { - return ( - - - { - this.onCopy(record); - }}> - 复制 - - - {/*暂时隐藏*/} - - { - this.onDelete(record); - }}> - 删除 - - - - }> - - - - - + + this.onEdit(record)} + style={{ marginRight: 10 }}>{showOperateBtn ? "编辑" : "查看"} + { + showOperateBtn && + this.onCopy(record)} + style={{ marginRight: 10 }}>{getLabel(111, "复制")} + } + { + showOperateBtn && + + + this.onDelete(record)}>{getLabel(111, "删除")} + + + }> + + + } + ); } }); return newColumns; }; - handleCategoryStatusChange(record, value) { - const { programmeStore: { updateCustomCategoryStatus } } = this.props; - Modal.confirm({ - title: "信息确认", - content: `确认要${value ? "启用" : "停用"}吗`, - onOk: () => { - updateCustomCategoryStatus(record.id, value); - }, - onCancel: () => { - } - }); - } - - onEdit(record) { + onEdit = (record) => { let id = record.id; const { programmeStore } = this.props; const { getForm, selectedKey } = programmeStore; @@ -162,15 +119,15 @@ export default class Programme extends React.Component { }).then(() => { this.setState({ slideVisiable: true, customEdit: true, currentOperate: "update" }); }); - } + }; - onCopy(record) { + onCopy = (record) => { this.setState({ copyId: record.id, copyModalValue: record.schemeName, copyModalVisible: true }); - } + }; onDelete = (record) => { const { programmeStore: { deleteScheme, deleteLoading, selectedKey } } = this.props; @@ -422,13 +379,6 @@ export default class Programme extends React.Component { welfareTypeEnum={customSelectkey} onCustomEdit={this.onCustomEdit} /> - // } rightContent={renderCustomRightContent()} /> diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js index 9e41557a..1fef7990 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { Button, DatePicker, Dropdown, Menu, message, Modal } from "antd"; -import { WeaNewScroll, WeaTop } from "ecCom"; +import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom"; import { renderNoright } from "../../../util"; import Accountdialog from "./components/accountDialog"; import AbnormalDrawer from "./components/abnormalDrawer"; @@ -12,6 +12,7 @@ import { getCalculateProgress } from "../../../apis/calculate"; import "./index.less"; import UnifiedTable from "../../../components/UnifiedTable"; +const { getLabel } = WeaLocaleProvider; const MonthPicker = DatePicker.MonthPicker; @inject("standingBookStore", "taxAgentStore") @@ -139,6 +140,7 @@ export default class StandingBook extends React.Component { { title: "操作", dataIndex: "operate", + width: 120, key: "operate", render: (text, r) => { const { billStatus, billMonth, creator } = r; @@ -147,7 +149,7 @@ export default class StandingBook extends React.Component { {billStatus === "未归档" && ( this.handleGoDetail(billMonth, "", r.paymentOrganizationId, creator)}> 核算 @@ -155,7 +157,6 @@ export default class StandingBook extends React.Component { {billStatus === "已归档" && ( this.socialSecurityBenefitsRecalculate({ id: r.id })}> 重新核算 @@ -173,12 +174,10 @@ export default class StandingBook extends React.Component { }) }> 归档 - {/* 异常详情 */} 删除 - {/* 操作日志 */} }> - + )} {billStatus === "已归档" && ( @@ -196,7 +195,7 @@ export default class StandingBook extends React.Component { 查看 }> - + )} From ae9d7cc7c004b714483df1b16584de58e26c9312 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, 26 Jun 2023 11:27:27 +0800 Subject: [PATCH 26/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=B8=8A=E9=9D=A2=E6=93=8D=E4=BD=9C=E6=8C=89=E9=92=AE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=A4=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/calculate/index.js | 30 ++++--------- pc4mobx/hrmSalary/pages/salaryItem/index.js | 44 +++++++------------ .../socialSecurityBenefits/programme/index.js | 4 +- .../standingBook/index.js | 19 +++++--- 4 files changed, 39 insertions(+), 58 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js index fda59a8d..84c858a2 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/index.js @@ -1,8 +1,8 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { Button, DatePicker, Dropdown, Menu, message, Modal, Tag } from "antd"; -import { WeaInputSearch, WeaNewScroll, WeaTop } from "ecCom"; -import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 +import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom"; +import { renderNoright } from "../../util"; import CustomTab from "../../components/customTab"; import moment from "moment"; import BaseFormModal from "./baseFormModal"; @@ -10,6 +10,7 @@ import CustomPaginationTable from "../../components/customPaginationTable"; import ProgressModal from "../../components/progressModal"; import "./index.less"; +const { getLabel } = WeaLocaleProvider; const MonthPicker = DatePicker.MonthPicker; @inject("calculateStore", "taxAgentStore") @@ -185,7 +186,7 @@ export default class Calculate extends React.Component {
; }; } - if (item.title == "操作" && showOperateBtn) { + if (item.dataIndex === "operate" && showOperateBtn) { item.render = (text, record) => { const accountBtn = _.filter( record.operate, @@ -327,18 +328,6 @@ export default class Calculate extends React.Component { link: "wui/index.html#/ns_demo03/index", importantlevel: 1 }; - const adBtn = [ - // 高级搜索内部按钮 - , - , - - ]; const renderRightOperation = () => { const { startDate, endDate } = this.state; @@ -393,13 +382,10 @@ export default class Calculate extends React.Component {
{/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */} } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={false} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }}> - {/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */} + title="薪资核算" + icon={} + iconBgcolor="#F14A2D" + showDropIcon={false}>
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js index 40ac86b3..a07c33b2 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { Button, Dropdown, Menu, message, Modal, Switch } from "antd"; -import { WeaInputSearch, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom"; +import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom"; import { renderLoading } from "../../util"; import CustomTab from "../../components/customTab"; import SystemSalaryItemModal from "./systemSalaryItemModal"; @@ -11,6 +11,7 @@ import CustomSalaryItemSlide from "./customSalaryItemSlide"; import CustomPaginationTable from "../../components/customPaginationTable"; import "../socialSecurityBenefits/programme/index.less"; +const { getLabel } = WeaLocaleProvider; @inject("salaryItemStore", "taxAgentStore", "salaryFileStore") @observer export default class SalaryItem extends React.Component { @@ -112,9 +113,9 @@ export default class SalaryItem extends React.Component { this.onEditItem(record, false); }}>{text}; case "useInEmployeeSalary": - return ; + return ; case "useDefault": - return ; + return ; default: return
; } @@ -124,37 +125,22 @@ export default class SalaryItem extends React.Component { columns.push({ key: "operate", title: "操作", + width: 120, render: (text, record) => { return ( - { - this.onEditItem(record, true); - }}>{(showSalaryItemBtn || showOperateBtn) ? "编辑" : "查看"} + + this.onEditItem(record, true)}>{(showSalaryItemBtn || showOperateBtn) ? "编辑" : "查看"} + { + (record.canDelete && (showSalaryItemBtn || showOperateBtn)) && + this.handleDeleteItem(record)} + >{getLabel(535052, "删除")} + } + ); } }); - columns.push({ - title: "", - key: "moreOperate", - dataIndex: "moreOperate", - render: (text, record) => { - if (record.canDelete && (showSalaryItemBtn || showOperateBtn)) { - return ( - - - { - this.handleDeleteItem(record); - }}>删除 - - }> - - - ); - } else { - return ""; - } - } - }); return [ // { // title: "序号", diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js index 80fbb6e5..0f410ce0 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js @@ -87,7 +87,7 @@ export default class Programme extends React.Component { { showOperateBtn && this.onCopy(record)} - style={{ marginRight: 10 }}>{getLabel(111, "复制")} + style={{ marginRight: 10 }}>{getLabel(77, "复制")} } { showOperateBtn && @@ -95,7 +95,7 @@ export default class Programme extends React.Component { overlay={ - this.onDelete(record)}>{getLabel(111, "删除")} + this.onDelete(record)}>{getLabel(535052, "删除")} }> diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js index 1fef7990..be0ad9a8 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js @@ -146,7 +146,7 @@ export default class StandingBook extends React.Component { const { billStatus, billMonth, creator } = r; return ( - {billStatus === "未归档" && ( + {billStatus === "0" && ( )} - {billStatus === "已归档" && ( + {billStatus === "1" && ( this.socialSecurityBenefitsRecalculate({ id: r.id })}> 重新核算 )} - {billStatus === "未归档" && ( + {billStatus === "0" && ( )} - {billStatus === "已归档" && ( + {billStatus === "1" && ( it.dataIndex !== "id").map(item => { - if (item.dataIndex !== "operate") { + if (item.dataIndex !== "operate" && item.dataIndex !== "billStatus") { return { ...item, render: (text) => { @@ -497,6 +497,15 @@ export default class StandingBook extends React.Component { } }; } + if (item.dataIndex === "billStatus") { + return { + ...item, + render: (_, record) => { + return {record.billStatus === "1" ? getLabel(18800, "已归档") : getLabel(17999, "未归档")}; + } + }; + } return { ...item }; })} dataSource={list} From 9ed8b79e64078cc0f679a82a7ddb3ffc661ad4e3 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, 27 Jun 2023 17:11:52 +0800 Subject: [PATCH 27/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E8=96=AA=E8=B5=84=E6=A0=B8=E7=AE=97=E7=9A=84=E7=BA=BF?= =?UTF-8?q?=E4=B8=8B=E5=AF=B9=E6=AF=94=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=9D=83=E9=99=90=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/calculate.js | 4 + .../pages/calculateDetail/compareDetail.js | 119 ++++++++++-------- .../hrmSalary/pages/calculateDetail/index.js | 18 ++- pc4mobx/hrmSalary/stores/taxAgent.js | 1 + 4 files changed, 85 insertions(+), 57 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js index 013bddee..2ffee227 100644 --- a/pc4mobx/hrmSalary/apis/calculate.js +++ b/pc4mobx/hrmSalary/apis/calculate.js @@ -564,3 +564,7 @@ export const cacheImportField = (params) => { body: JSON.stringify(params) }).then(res => res.json()); }; +//薪资核算-页面查看权限 +export const salaryacctAcctresultCheckAuth = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/acctresult/checkAuth", "GET", params); +}; diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js index 8641697c..98fcc22f 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js @@ -6,6 +6,8 @@ import CustomTab from "../../components/customTab"; import { inject, observer } from "mobx-react"; import CompareDetailImportModal from "./compareDetailImportModal"; import CustomPaginationTable from "../../components/customPaginationTable"; +import { salaryacctAcctresultCheckAuth } from "../../apis/calculate"; +import Authority from "../mySalary/authority"; @inject("calculateStore") @observer @@ -17,7 +19,8 @@ export default class CompareDetail extends React.Component { onlyDiffEmployee: true, onlyDiffSalaryItem: true, importModalVisible: false, - searchValue: "" + searchValue: "", + calculateAuth: false }; this.pageInfo = { current: 1, pageSize: 10 }; } @@ -33,8 +36,15 @@ export default class CompareDetail extends React.Component { current: 1 }; fetchComparisonResultList(params); + this.salaryacctAcctresultCheckAuth({ salaryAcctRecordId: getQueryString("id") }) } + salaryacctAcctresultCheckAuth = (params) => { + salaryacctAcctresultCheckAuth(params).then(({ status, data }) => { + this.setState({ calculateAuth: data && status }); + }); + }; + getColumns = (columns) => { let newColumns = [...columns]; newColumns.map(item => { @@ -169,7 +179,7 @@ export default class CompareDetail extends React.Component { comparisonResultColumns } } = this.props; - const { importModalVisible, searchValue } = this.state; + const { importModalVisible, searchValue, calculateAuth } = this.state; const renderRightOperation = () => { return (
@@ -203,60 +213,63 @@ export default class CompareDetail extends React.Component { ); }; return ( -
- -
-
- 公式= - 系统值;线下值;差值 + +
+ +
+
+ 公式= + 系统值;线下值;差值 +
-
-
- { - this.pageInfo.current = value; - this.handleDataPageChange(value); - }} - onShowSizeChange={(current, pageSize) => { - this.pageInfo = { current, pageSize }; - this.handleShowSizeChange(this.pageInfo); - }} - /> -
+
+ { + this.pageInfo.current = value; + this.handleDataPageChange(value); + }} + onShowSizeChange={(current, pageSize) => { + this.pageInfo = { current, pageSize }; + this.handleShowSizeChange(this.pageInfo); + }} + /> +
- { - importModalVisible && { - this.handleComparisonFinish(); - }} - onCancel={() => { - this.setState({ - importModalVisible: false - }); - }} - /> - } -
+ { + importModalVisible && { + this.handleComparisonFinish(); + }} + onCancel={() => { + this.setState({ + importModalVisible: false + }); + }} + /> + } +
+ ); } } diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js index 25b9dcc3..63a8d2b8 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js @@ -7,8 +7,10 @@ import { WeaBrowser, WeaCheckbox, WeaDropdown, WeaFormItem, WeaInput, WeaSearchG import { convertToUrlString, getQueryString } from "../../util/url"; import AcctResultImportModal from "./acctResult/importModal/acctResultImportModal"; import ProgressModal from "../../components/progressModal"; +import { salaryacctAcctresultCheckAuth } from "../../apis/calculate"; import Authority from "../mySalary/authority"; + const { ButtonSelect } = WeaDropdown; @inject("calculateStore", "salaryFileStore", "taxAgentStore") @@ -33,23 +35,31 @@ export default class CalculateDetail extends React.Component { progressVisible: false, progress: 0, accountIds: [], - accountExceptInfo: "" + accountExceptInfo: "", + calculateAuth: false }; this.id = ""; this.timer = null; } - componentWillMount() { + async componentWillMount() { let id = getQueryString("id"); this.id = id; const { calculateStore: { checkTaxAgent }, salaryFileStore } = this.props; const { commonEnumList } = salaryFileStore; + this.salaryacctAcctresultCheckAuth({ salaryAcctRecordId: id }); checkTaxAgent(this.id); let modalParam = { ...this.state.modalParam, salaryAcctRecordId: id }; this.setState({ modalParam }); commonEnumList("user", { enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" }); } + salaryacctAcctresultCheckAuth = (params) => { + salaryacctAcctresultCheckAuth(params).then(({ status, data }) => { + this.setState({ calculateAuth: data && status }); + }); + }; + Input = (value, key) => { const { employeeName, workcode } = this.state.searchItemsValue; return ( @@ -263,7 +273,7 @@ export default class CalculateDetail extends React.Component { }; render() { - const { selectedKey, acctResultImportVisiable, showSearchAd } = this.state; + const { selectedKey, acctResultImportVisiable, showSearchAd, calculateAuth } = this.state; const { taxAgentStore: { payrollPermission } } = this.props; const menu = ( @@ -346,7 +356,7 @@ export default class CalculateDetail extends React.Component { return ( + store={{ loading: false, hasRight: payrollPermission && calculateAuth }}>
Date: Wed, 28 Jun 2023 15:24:15 +0800 Subject: [PATCH 28/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E8=96=AA=E8=B5=84=E6=A0=B8=E7=AE=97=E7=9A=84=E7=BA=BF?= =?UTF-8?q?=E4=B8=8B=E5=AF=B9=E6=AF=94=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=9D=83=E9=99=90=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/calculateDetail/compareDetail.js | 14 +++++++++++--- pc4mobx/hrmSalary/pages/calculateDetail/index.js | 12 ++++++++++-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js index 98fcc22f..49085673 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js @@ -9,7 +9,7 @@ import CustomPaginationTable from "../../components/customPaginationTable"; import { salaryacctAcctresultCheckAuth } from "../../apis/calculate"; import Authority from "../mySalary/authority"; -@inject("calculateStore") +@inject("calculateStore", "taxAgentStore") @observer export default class CompareDetail extends React.Component { constructor(props) { @@ -40,8 +40,16 @@ export default class CompareDetail extends React.Component { } salaryacctAcctresultCheckAuth = (params) => { - salaryacctAcctresultCheckAuth(params).then(({ status, data }) => { - this.setState({ calculateAuth: data && status }); + const { taxAgentStore: { getPermission } } = this.props; + getPermission().then(({ data }) => { + const { isOpenDevolution } = data; + if (isOpenDevolution) { + salaryacctAcctresultCheckAuth(params).then(({ status, data }) => { + this.setState({ calculateAuth: data && status }); + }); + } else { + this.setState({ calculateAuth: true }); + } }); }; diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js index 63a8d2b8..da39bb6c 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js @@ -55,8 +55,16 @@ export default class CalculateDetail extends React.Component { } salaryacctAcctresultCheckAuth = (params) => { - salaryacctAcctresultCheckAuth(params).then(({ status, data }) => { - this.setState({ calculateAuth: data && status }); + const { taxAgentStore: { getPermission } } = this.props; + getPermission().then(({ data }) => { + const { isOpenDevolution } = data; + if (isOpenDevolution) { + salaryacctAcctresultCheckAuth(params).then(({ status, data }) => { + this.setState({ calculateAuth: data && status }); + }); + } else { + this.setState({ calculateAuth: true }); + } }); }; From dc27a3e4911524790c50f88a02c12a4c77bdfceb 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, 29 Jun 2023 14:59:24 +0800 Subject: [PATCH 29/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=91=E6=94=BE=E6=9F=A5=E7=9C=8B=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=E7=9A=84=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/mobilePayroll/index.js | 21 ++++++------- .../hrmSalary/pages/mySalary/mySalaryView.js | 31 ++++++++++++------- .../templatePreview/computerTemplate/index.js | 8 ++--- .../templatePreview/phoneTemplate/index.js | 2 +- pc4mobx/hrmSalary/stores/mySalary.js | 9 +++--- 5 files changed, 39 insertions(+), 32 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 93b46f38..db4f3c2f 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -33,11 +33,10 @@ export default class MobilePayroll extends React.Component { const type = getQueryString("type"); this.id = getQueryString("id"); const { mySalaryStore: { init } } = this.props; - this.getMySalaryBill(this.id); const { data, status } = await payrollCheckType(); if (type !== "phone") { if (status && data === "PWD") { - init(false); + init(false, () => this.getMySalaryBill(this.id)); } else { this.setState({ captchaVisible: true }); } @@ -48,13 +47,14 @@ export default class MobilePayroll extends React.Component { initMobile = () => { const { mySalaryStore: { setInitEmVerify } } = this.props; // if (window.em) { - API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }).then(({ status, isNeedSecondAuth }) => { - if (status && isNeedSecondAuth) { - this.setState({ visible: true }); - } else { - setInitEmVerify(); - } - }); + API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }).then(({ status, isNeedSecondAuth }) => { + if (status && isNeedSecondAuth) { + this.setState({ visible: true }); + } else { + this.getMySalaryBill(getQueryString("id")); + setInitEmVerify(); + } + }); // } else { // setInitEmVerify(); // } @@ -72,6 +72,7 @@ export default class MobilePayroll extends React.Component { message.success(checkMsg); setInitEmVerify(); this.setState({ visible: false }); + this.getMySalaryBill(getQueryString("id")); } else { message.error(checkMsg); } @@ -136,7 +137,6 @@ export default class MobilePayroll extends React.Component {
@@ -150,7 +150,6 @@ export default class MobilePayroll extends React.Component {
diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js index c5a80327..bda458fb 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js +++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js @@ -6,7 +6,6 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { toJS } from "mobx"; import Authority from "./authority"; import ComputerTemplate from "../payroll/templatePreview/computerTemplate"; import { payrollCheckType } from "../../apis/payroll"; @@ -19,35 +18,43 @@ class MySalaryView extends Component { constructor(props) { super(props); this.state = { - captchaVisible: false + captchaVisible: false, + mySalaryStore: {} }; } async componentDidMount() { - const { mySalaryStore: { getMySalaryBill, init }, params: { salaryInfoId } } = this.props; + const { mySalaryStore: { init, getMySalaryBill }, params: { salaryInfoId } } = this.props; const { data, status } = await payrollCheckType(); if (status && data === "PWD") { - init(false); + init(false, () => { + getMySalaryBill(Number(salaryInfoId)).then(data => { + this.setState({ mySalaryStore: data }); + }); + }); } else { this.setState({ captchaVisible: true }); } - getMySalaryBill(Number(salaryInfoId)); } render() { - const { captchaVisible } = this.state; - const { mySalaryStore, params: { salaryInfoId } } = this.props; - const { mySalaryBill } = mySalaryStore; - const employeeInformation = mySalaryBill.employeeInformation && toJS(mySalaryBill.employeeInformation); - const salaryGroups = mySalaryBill.salaryGroups && toJS(mySalaryBill.salaryGroups); + const { captchaVisible, mySalaryStore } = this.state; + const { params: { salaryInfoId } } = this.props; + if (_.isEmpty(mySalaryStore)) { + return
; + } + const employeeInformation = !_.isEmpty(mySalaryStore) && mySalaryStore.employeeInformation; + const salaryGroups = !_.isEmpty(mySalaryStore) && mySalaryStore.salaryGroups; + const salaryTemplateShowSet = !_.isEmpty(mySalaryStore) && mySalaryStore.salaryTemplate; return ( - +
diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js index 691ef30d..6f2e68c2 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js @@ -31,7 +31,7 @@ export default class ComputerTemplate extends React.Component { } componentDidMount() { - if(this.props.isMsgPreview && this.props.salaryItemSet){ + if (this.props.isMsgPreview && this.props.salaryItemSet) { this.setState({ salaryItemSet: JSON.parse(this.props.salaryItemSet), salaryTemplateShowSet: JSON.parse(this.props.salaryTemplateShowSet) @@ -55,7 +55,7 @@ export default class ComputerTemplate extends React.Component { const rowNum = 3; const sumRows = len % rowNum; const sumRowMod = len / rowNum; - const rows = (sumRows == 0 ? sumRowMod : sumRowMod + 1); + const rows = (sumRows == 0 ? sumRowMod : parseInt(sumRowMod.toString()) + 1); for (let j = 0; j < rows; j++) { let iLen = (j + 1) * rowNum; iLen = iLen > len ? len : iLen; @@ -86,7 +86,7 @@ export default class ComputerTemplate extends React.Component {
{ - salaryTemplateShowSet.textContentPosition === "1" && salaryTemplateShowSet.textContent + salaryTemplateShowSet.textContentPosition == 1 && salaryTemplateShowSet.textContent }
@@ -106,7 +106,7 @@ export default class ComputerTemplate extends React.Component {
{ - salaryTemplateShowSet.textContentPosition === "2" && salaryTemplateShowSet.textContent + salaryTemplateShowSet.textContentPosition == 2 && salaryTemplateShowSet.textContent }
diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js index ed72829a..0f85d51d 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js @@ -33,7 +33,7 @@ export default class PhoneTemplate extends React.Component { } componentDidMount() { - // && window.em + // && window.em if (this.props.isMsgPreview && this.props.salaryItemSet) { this.setState({ salaryItemSet: JSON.parse(this.props.salaryItemSet), diff --git a/pc4mobx/hrmSalary/stores/mySalary.js b/pc4mobx/hrmSalary/stores/mySalary.js index 3e5126d9..61988d5b 100644 --- a/pc4mobx/hrmSalary/stores/mySalary.js +++ b/pc4mobx/hrmSalary/stores/mySalary.js @@ -49,29 +49,30 @@ export class MySalaryStore { @action setMySalaryBill = (mySalaryBill) => { this.mySalaryBill = mySalaryBill; }; - @action init = async (isRoot = true) => { + @action init = async (isRoot = true, callback) => { this.clear(); //1.check is need second verify if (window.doCheckSecondaryVerify4ec) { window.doCheckSecondaryVerify4ec({ mouldCode: "HRM", itemCode: "SALARY" }, (data) => this.getData({ ...data, - isRoot + isRoot, callback })); } else { //4.loaddata - this.getData({ status: "1", token: "", isRoot }); + this.getData({ status: "1", token: "", isRoot, callback }); } }; @action getData = async (params = {}) => { if (_.isEmpty(params)) return; - const { status, isRoot, token } = params; + const { status, isRoot, token, callback } = params; if (status == "1") { // Object.assign(this._reqParams, { token }); // this.getFormData({ viewAttr: 1 }); this.hasRight = true; isRoot && this.mySalaryBillList([moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")]); + callback && callback(); } else { this.hasRight = false; } From 3a8dd06e3c6760f8d811fc14cd6b08ac77c89c47 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, 30 Jun 2023 10:17:23 +0800 Subject: [PATCH 30/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=B0=B4=E5=8D=B0=E9=A2=84=E8=A7=88=E5=92=8C=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E4=B8=8D=E4=B8=80=E8=87=B4=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=A4=84=E7=90=86=EF=BC=8C=E8=B4=A6=E5=A5=97=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E9=9A=90=E8=97=8F=E5=88=86=E7=BB=84=E6=9C=AA?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=EF=BC=8C=C2=A0=E6=95=B0=E6=8D=AE=E9=87=87?= =?UTF-8?q?=E9=9B=86=E6=9F=A5=E7=9C=8B=E6=98=8E=E7=BB=86=E6=97=B6=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=AF=B9=E9=BD=90=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/dataAcquisition/components/index.less | 6 +++--- .../dataAcquisition/components/tableRecord.js | 15 +++++++++++++-- pc4mobx/hrmSalary/pages/ledger/slideBaseForm.js | 2 +- .../ledgerPage/components/ledgerBaseSetting.js | 2 +- .../components/ledgerSalaryItemPreviewModal.js | 2 +- .../hrmSalary/pages/payroll/watermarkPreview.js | 2 +- 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/components/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/components/index.less index 80d08cf2..4d16b78a 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/components/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/components/index.less @@ -2,12 +2,12 @@ .accumulated { .wea-form-cell-wrapper { & > div:first-child { - width: 10% !important; + height: 46px !important; line-height: 46px; } & > div:nth-child(2) { - width: 40% !important; + //width: 40% !important; .wea-form-item-wrapper { display: flex !important; @@ -20,7 +20,7 @@ } & > div:last-child { - width: 40% !important; + //width: 40% !important; } } } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js b/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js index f3c9e716..9db08fac 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js @@ -18,6 +18,7 @@ class TableRecord extends Component { loading: { query: false }, + width: 0, dataSource: [], columns: [], selectedRowKeys: [], @@ -37,13 +38,23 @@ class TableRecord extends Component { } componentDidMount() { + this.setState({ width: window.innerWidth }); this.convertData(this.props); + window.addEventListener("resize", this.resizeWidth); + } + + componentWillUnmount() { + window.removeEventListener("resize", this.resizeWidth); } componentWillReceiveProps(nextProps, nextContext) { this.convertData(nextProps); } + resizeWidth = (e) => { + this.setState({ width: e.target.innerWidth }); + }; + convertData = (props) => { const { recordPayload } = this.state; const { record, screenParams } = props; @@ -116,7 +127,7 @@ class TableRecord extends Component { render() { const { className, screenParams, taxAgentOption, record } = this.props; - const { columns, dataSource, loading, selectedRowKeys, pageInfo, recordPayload } = this.state; + const { columns, dataSource, loading, selectedRowKeys, pageInfo, recordPayload, width } = this.state; const rowSelection = { selectedRowKeys, onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }) @@ -172,7 +183,7 @@ class TableRecord extends Component {
{ !_.isEmpty(screenParams) && - + 1280 ? 3 : 2}/> } diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js index 2da6a2ac..cc89cd8a 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js @@ -184,7 +184,7 @@ class LedgerBaseSetting extends Component { type === "CHECKBOX" ? + content="【起薪日期≤薪资周期止】且【最后发薪日期≥薪资周期起】"/> : type === "SELECT" ? diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemPreviewModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemPreviewModal.js index 09c1df43..1ce016da 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemPreviewModal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemPreviewModal.js @@ -23,7 +23,7 @@ export default class LedgerSalaryItemPreviewModal extends React.Component { }; }) }; - columns.push(columnItem); + columnItem.children.length > 0 && columns.push(columnItem); }); return { columns }; }; diff --git a/pc4mobx/hrmSalary/pages/payroll/watermarkPreview.js b/pc4mobx/hrmSalary/pages/payroll/watermarkPreview.js index 4ea21411..a6bd6564 100644 --- a/pc4mobx/hrmSalary/pages/payroll/watermarkPreview.js +++ b/pc4mobx/hrmSalary/pages/payroll/watermarkPreview.js @@ -19,7 +19,7 @@ class WatermarkPreview extends Component { salaryBillBaseSetPreviewWaterMark = (payload) => { salaryBillBaseSetPreviewWaterMark(payload).then(({ status, data }) => { if (status) { - const { wmHeight: height, wmWidth: width, wmNoTransparent, wmRotate } = payload; + const { wmSetting: { wmHeight: height, wmWidth: width, wmNoTransparent, wmRotate } } = payload; watermark({ text: data, src: "", From 9cea2259bcb022392a6ab00d6fdd58a6dd697bd8 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, 30 Jun 2023 16:13:46 +0800 Subject: [PATCH 31/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9=E6=A1=A3?= =?UTF-8?q?=E6=A1=88=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/payrollFiles.js | 8 + pc4mobx/hrmSalary/apis/ruleconfig.js | 4 + pc4mobx/hrmSalary/apis/welfareArchive.js | 156 +++++++++--------- .../components/UnifiedTable/index.js | 2 +- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 34 +++- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 29 +++- .../socialSecurityBenefits/archives/index.js | 107 +++++++++--- 7 files changed, 232 insertions(+), 108 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/payrollFiles.js b/pc4mobx/hrmSalary/apis/payrollFiles.js index 74cf1d72..7ebdb6bb 100644 --- a/pc4mobx/hrmSalary/apis/payrollFiles.js +++ b/pc4mobx/hrmSalary/apis/payrollFiles.js @@ -65,3 +65,11 @@ export const deletePendingTodo = (params) => { export const deleteSuspendTodo = (params) => { return postFetch('/api/bs/hrmsalary/salaryArchive/deleteSuspendTodo', params); } +// 待定薪、停薪员工 是否允许删除薪资档案 +export const salaryArchiveDelete = (params) => { + return WeaTools.callApi('/api/bs/hrmsalary/sys/conf/code?code=salaryArchiveDelete', 'GET', params); +} +// 删除薪资档案 +export const deleteSalaryArchive = (params) => { + return postFetch('/api/bs/hrmsalary/salaryArchive/deleteSalaryArchive', params); +} diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js index 7ff084ce..513f50b4 100644 --- a/pc4mobx/hrmSalary/apis/ruleconfig.js +++ b/pc4mobx/hrmSalary/apis/ruleconfig.js @@ -43,6 +43,10 @@ export const getEncryptProgress = params => { export const operateTaxDeclarationFunction = (params) => { return postFetch("/api/bs/hrmsalary/sys/operateTaxDeclarationFunction", params); }; +//保存档案删除规则 +export const saveArchiveDelete = (params) => { + return postFetch("/api/bs/hrmsalary/sys/saveArchiveDelete", params); +}; //保存匹配规则 export const saveSalaryAcctEmployeeRule = (params) => { return postFetch("/api/bs/hrmsalary/sys/saveSalaryAcctEmployeeRule", params); diff --git a/pc4mobx/hrmSalary/apis/welfareArchive.js b/pc4mobx/hrmSalary/apis/welfareArchive.js index 974ed260..a38f22ce 100644 --- a/pc4mobx/hrmSalary/apis/welfareArchive.js +++ b/pc4mobx/hrmSalary/apis/welfareArchive.js @@ -1,146 +1,150 @@ -import { WeaTools } from 'ecCom'; +import { WeaTools } from "ecCom"; import { postFetch } from "../util/request"; export const tips = params => { - return WeaTools.callApi('/api/bs/hrmsalary/archives/tips', 'get', params); + return WeaTools.callApi("/api/bs/hrmsalary/archives/tips", "get", params); }; export const getCondition = params => { - return WeaTools.callApi('/api/bs/hrmsalary/archives/getSearchCondition', 'get', params); + return WeaTools.callApi("/api/bs/hrmsalary/archives/getSearchCondition", "get", params); }; //社保福利档案列表 export const queryList = (params) => { - return postFetch('/api/bs/hrmsalary/archives/getTable', params); + return postFetch("/api/bs/hrmsalary/archives/getTable", params); }; //社保福利档案列表 export const queryInsuranceTabTotal = (params) => { - return WeaTools.callApi('/api/bs/hrmsalary/archives/queryInsuranceTabTotal', params); + return WeaTools.callApi("/api/bs/hrmsalary/archives/queryInsuranceTabTotal", params); }; //删除待办-待增员 export const updateRunStatus = (params) => { - return postFetch('/api/bs/hrmsalary/archives/updateRunStatus', params); + return postFetch("/api/bs/hrmsalary/archives/updateRunStatus", params); }; //删除待办-待减员 export const cancelStayDel = (params) => { - return postFetch('/api/bs/hrmsalary/archives/cancelStayDel', params); + return postFetch("/api/bs/hrmsalary/archives/cancelStayDel", params); }; //全量增员 export const allStayAddToPay = (params) => { - return WeaTools.callApi('/api/bs/hrmsalary/archives/allStayAddToPay', 'GET', params); + return WeaTools.callApi("/api/bs/hrmsalary/archives/allStayAddToPay", "GET", params); }; //全量减员 export const allStayDelToStop = (params) => { - return WeaTools.callApi('/api/bs/hrmsalary/archives/allStayDelToStop', 'GET', params); + return WeaTools.callApi("/api/bs/hrmsalary/archives/allStayDelToStop", "GET", params); }; //增员 export const stayAddToPay = (params) => { - return postFetch('/api/bs/hrmsalary/archives/stayAddToPay', params); + return postFetch("/api/bs/hrmsalary/archives/stayAddToPay", params); }; //减员 export const stayDelToStop = (params) => { - return postFetch('/api/bs/hrmsalary/archives/stayDelToStop', params); + return postFetch("/api/bs/hrmsalary/archives/stayDelToStop", params); +}; +//删除社保档案 +export const deleteArchive = (params) => { + return postFetch("/api/bs/hrmsalary/archives/deleteArchive", params); }; //取消停缴 export const cancelStopPayment = (params) => { - return postFetch('/api/bs/hrmsalary/archives/cancelStopPayment', params); + return postFetch("/api/bs/hrmsalary/archives/cancelStopPayment", params); }; export const getTable = params => { - return fetch('/api/bs/hrmsalary/archives/getTable', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) + return fetch("/api/bs/hrmsalary/archives/getTable", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); }; export const getBaseForm = params => { - return WeaTools.callApi('/api/bs/hrmsalary/archives/getBaseForm', 'get', params); + return WeaTools.callApi("/api/bs/hrmsalary/archives/getBaseForm", "get", params); }; export const getPaymentForm = params => { - return WeaTools.callApi('/api/bs/hrmsalary/archives/getPaymentForm', 'get', params); + return WeaTools.callApi("/api/bs/hrmsalary/archives/getPaymentForm", "get", params); }; // 保存 export const save = params => { - return fetch('/api/bs/hrmsalary/archives/save', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) + return fetch("/api/bs/hrmsalary/archives/save", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); }; // 导出档案 export const exportDocument = params => { - return WeaTools.callApi('/api/bs/hrmsalary/archives/export', 'get', params); + return WeaTools.callApi("/api/bs/hrmsalary/archives/export", "get", params); }; // 导入档案 - 获取组件的一些前置参数 export const getImportDocumentParams = params => { - return WeaTools.callApi('/api/bs/hrmsalary/archives/getImportParams', 'get', params); + return WeaTools.callApi("/api/bs/hrmsalary/archives/getImportParams", "get", params); }; // 导入档案- 导出现有数据 export const exportCurData = params => { - fetch('/api/bs/hrmsalary/scheme/template/export',{ - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.blob().then(blob => { - var filename=`社保福利档案模板.xlsx` - var a = document.createElement('a'); - var url = window.URL.createObjectURL(blob); - a.href = url; - a.download = filename; - a.click(); - window.URL.revokeObjectURL(url); - })) + fetch("/api/bs/hrmsalary/scheme/template/export", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.blob().then(blob => { + var filename = `社保福利档案模板.xlsx`; + var a = document.createElement("a"); + var url = window.URL.createObjectURL(blob); + a.href = url; + a.download = filename; + a.click(); + window.URL.revokeObjectURL(url); + })); }; // 导入档案-预览 export const previewCurData = (params) => { - return fetch('/api/bs/hrmsalary/scheme/preview', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/scheme/preview", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; // 档案导入 export const importBatch = (params) => { - return fetch('/api/bs/hrmsalary/scheme/importBatch', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/scheme/importBatch", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; // 导出档案 export const exportArchives = (ids) => { - fetch('/api/bs/hrmsalary/scheme/export?ids=' + ids).then(res => res.blob().then(blob => { - var filename=`社保福利档案.xlsx` - var a = document.createElement('a'); - var url = window.URL.createObjectURL(blob); - a.href = url; - a.download = filename; - a.click(); - window.URL.revokeObjectURL(url); - })) -} + fetch("/api/bs/hrmsalary/scheme/export?ids=" + ids).then(res => res.blob().then(blob => { + var filename = `社保福利档案.xlsx`; + var a = document.createElement("a"); + var url = window.URL.createObjectURL(blob); + a.href = url; + a.download = filename; + a.click(); + window.URL.revokeObjectURL(url); + })); +}; diff --git a/pc4mobx/hrmSalary/components/UnifiedTable/index.js b/pc4mobx/hrmSalary/components/UnifiedTable/index.js index 8f406f4f..f8cbff97 100644 --- a/pc4mobx/hrmSalary/components/UnifiedTable/index.js +++ b/pc4mobx/hrmSalary/components/UnifiedTable/index.js @@ -13,7 +13,7 @@ class Index extends Component { return { ...item, fixed: "left", width: 176 }; } if (item.dataIndex === "operate") { - return { ...item, fixed: "right", width: "120px" }; + return { ...item, fixed: "right", width: item.width || "120px" }; } return { ...item, width: "33%" }; }); diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index f094e5b0..0ad6737c 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -14,6 +14,7 @@ import { WeaFormItem, WeaHelpfulTip, WeaInput, + WeaLocaleProvider, WeaPopoverHrm, WeaSearchGroup, WeaSelect, @@ -32,6 +33,7 @@ import SalaryFileViewSlide from "../salaryFile/saralyFileViewSlide"; import ChangeSalaryModal from "../salaryFile/changeSalaryModal"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; const WeaTableComx = WeaTableNew.WeaTable; @inject("payrollFilesStore", "taxAgentStore", "salaryFileStore") @@ -83,7 +85,8 @@ class Index extends Component { paysetParams: { payStartDate: "", payEndDate: "" - } + }, + salaryArchiveDelete: "" //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是 }; } @@ -163,7 +166,7 @@ class Index extends Component { const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props; const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({ dataIndex: it.dataIndex, - width: (it.dataIndex === "username" || it.dataIndex === "operate") ? 120 : it.dataIndex === "taxAgentName" ? 176 : 150, + width: (it.dataIndex === "username" || it.dataIndex === "operate") ? 150 : it.dataIndex === "taxAgentName" ? 176 : 150, title: it.title, align: "left", fixed: (idx === 0 || idx === 1 || idx === 2) ? "left" : it.dataIndex === "operate" ? "right" : "", ellipsis: true @@ -197,14 +200,16 @@ class Index extends Component { postMessageToChild = (payload) => { const childFrameObj = document.getElementById("atdTable"); const { dataSource, columns, showSum, pageInfo, showOperateBtn, selectedKey, selectedRowKeys } = payload; + const { salaryArchiveDelete } = this.state; childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ - dataSource, columns, showSum, pageInfo, showOperateBtn, selectedKey, selectedRowKeys + dataSource, columns, showSum, pageInfo, showOperateBtn, selectedKey, selectedRowKeys, salaryArchiveDelete }), "*"); }; init = async () => { const { data: archiveStatusList } = await this.commonEnumList({ enumClass: "com.engine.salary.enums.salaryarchive.ArchiveStatusEnum" }); const { data: userStatusList } = await this.commonEnumList({ enumClass: "com.engine.salary.enums.UserStatusEnum" }); + const { data: salaryArchiveDelete } = await this.salaryArchiveDelete(); this.setState({ archiveStatusList: [{ key: "", @@ -219,7 +224,8 @@ class Index extends Component { }, ..._.map(userStatusList, it => ({ key: String(it.value), showname: it.defaultLabel - }))] + }))], + salaryArchiveDelete }, () => this.getImportTypes()); }; @@ -290,6 +296,9 @@ class Index extends Component { commonEnumList = (params) => { return API.commonEnumList(params); }; + salaryArchiveDelete = () => { + return API.salaryArchiveDelete(); + }; getImportTypes = () => { API.getImportTypes().then(({ data, status }) => { if (status) { @@ -498,7 +507,7 @@ class Index extends Component { const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props; const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({ dataIndex: it.dataIndex, - width: (it.dataIndex === "username" || it.dataIndex === "operate") ? 120 : it.dataIndex === "taxAgentName" ? 176 : 150, + width: (it.dataIndex === "username" || it.dataIndex === "operate") ? 150 : it.dataIndex === "taxAgentName" ? 176 : 150, title: it.title, align: "left", fixed: (idx === 0 || idx === 1 || idx === 2) ? "left" : it.dataIndex === "operate" ? "right" : "", ellipsis: true @@ -548,6 +557,21 @@ class Index extends Component { this.deleteSuspendTodo([id]); } else if (key === "view") { this.handleEdit(id); + } else if (key === "deleteAchives") { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(388758, "确认要删除吗?"), + onOk: () => { + API.deleteSalaryArchive([id]).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(30700, "操作成功")); + this.query(); + } else { + message.error(errormsg || getLabel(30651, "操作失败")); + } + }); + } + }); } }; // 查看 Slide 头部操作按钮 diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 6f088528..2cc2f31b 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -25,7 +25,8 @@ export default class Index extends Component { rule: "", enctry: "", operateTaxDeclaration: "", - matchRule: "" + matchRule: "", + confValue: "0" }, showEncryptOperationButton: "", progressVisible: false, @@ -53,7 +54,8 @@ export default class Index extends Component { showEncryptOperationButton, isOpenEncrypt: enctry, isOpenTaxDeclaration: operateTaxDeclaration, - salaryAcctEmployeeRule: matchRule + salaryAcctEmployeeRule: matchRule, + salaryArchiveDelete: confValue } } = appSettings; this.setState({ @@ -61,7 +63,7 @@ export default class Index extends Component { showEncryptOperationButton, saveParams: { ...saveParams, - ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule + ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue } }); } @@ -197,6 +199,16 @@ export default class Index extends Component { } }); }; + saveArchiveDelete = () => { + API.saveArchiveDelete(_.pick(this.state.saveParams, ["confValue"])) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(22619, "保存成功!")); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }; handleChange = (key, val) => { const { saveParams } = this.state; @@ -227,6 +239,9 @@ export default class Index extends Component { case "enctry": this.saveEncryptSetting(); break; + case "confValue": + this.saveArchiveDelete(); + break; default: break; } @@ -252,7 +267,7 @@ export default class Index extends Component { employeeOptions, showEncryptOperationButton } = this.state; - const { orderRule, ascOrDesc, rule, enctry, operateTaxDeclaration, matchRule } = saveParams; + const { orderRule, ascOrDesc, rule, enctry, operateTaxDeclaration, matchRule, confValue } = saveParams; return (
this.handleChange("operateTaxDeclaration", val)}/> + + + this.handleChange("confValue", val)}/> + + { + salaryArchiveDelete().then(({ status, data }) => { + if (status) { + this.setState({ + salaryArchiveDelete: data + }); + } + }); + }; handleEdit = (record) => { this.record = record; @@ -103,7 +116,7 @@ export default class Archives extends React.Component { }; getColumns = () => { - const { columns, pageInfo, selectedKey } = this.state; + const { columns, salaryArchiveDelete, selectedKey } = this.state; const { taxAgentStore: { showOperateBtn } } = this.props; let tmpV = _.map(columns.filter(item => item.display === "TRUE"), item => { return { @@ -118,31 +131,68 @@ export default class Archives extends React.Component { return tmpV.length > 0 ? [ ...tmpV, { title: "操作", + width: 150, dataIndex: "operate", render: (text, record) => { return (
this.handleEdit(record)}>{(showOperateBtn && selectedKey !== "stop") ? "编辑" : "查看"} + { + showOperateBtn && selectedKey === "pending" && + this.stayAddToPay([record.baseInfo])}>增员 + } + { + showOperateBtn && selectedKey === "suspend" && + this.stayDelToStop([record.baseInfo])}>减员 + } + { + showOperateBtn && selectedKey === "stop" && salaryArchiveDelete === "1" && + this.deleteSocialArchive([record.baseInfo])}>删除档案 + } + { + showOperateBtn && selectedKey === "stop" && salaryArchiveDelete !== "1" && + this.cancelStopPayment([record.baseInfo])}>取消停缴 + } { showOperateBtn && selectedKey === "pending" && { - if (key === "addMember") { - this.stayAddToPay([record.baseInfo]); - } else { - Modal.warning({ - title: "信息确认", - content: `确定要删除该条待办人员吗?`, - onOk: () => this.deleteTodoList({ runStatus: "4", ids: [record.baseInfo] }) - }); - } - }}> - 增员 - 删除待办 -
} title=""> + content={ + salaryArchiveDelete === "1" ? + { + if (key === "deleteAchives") { + this.deleteSocialArchive([record.baseInfo]); + } else { + Modal.warning({ + title: "信息确认", + content: `确定要删除该条待办人员吗?`, + onOk: () => this.deleteTodoList({ runStatus: "4", ids: [record.baseInfo] }) + }); + } + }}> + 删除档案 + 删除待办 + : + { + if (key === "deleteAchives") { + this.deleteSocialArchive([record.baseInfo]); + } else { + Modal.warning({ + title: "信息确认", + content: `确定要删除该条待办人员吗?`, + onOk: () => this.deleteTodoList({ runStatus: "4", ids: [record.baseInfo] }) + }); + } + }}> + 删除待办 + + } title=""> } @@ -158,18 +208,15 @@ export default class Archives extends React.Component { content: `确定要删除该条待办人员吗?`, onOk: () => this.cancelStayDel({ runStatus: "3", ids: [record.baseInfo] }) }); - } else { - this.stayDelToStop([record.baseInfo]); } }}> - 减员 删除待办 } title=""> } { - showOperateBtn && selectedKey === "stop" && + showOperateBtn && selectedKey === "stop" && salaryArchiveDelete === "1" && { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(388758, "确认要删除吗?"), + onOk: () => { + API.deleteArchive(params).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(30700, "操作成功")); + this.query(); + } else { + message.error(errormsg || getLabel(30651, "操作失败")); + } + }); + } + }); + }; //取消停缴 cancelStopPayment = (payload) => { API.cancelStopPayment(payload).then(({ status, errormsg }) => { From 0c9d4cc47ed8393bcae6c69b9aa02a7d098ad032 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, 30 Jun 2023 16:51:07 +0800 Subject: [PATCH 32/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E7=94=B3=E6=8A=A5=E6=92=A4=E5=9B=9E=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/ruleconfig.js | 4 +++ pc4mobx/hrmSalary/pages/ruleConfig/index.js | 35 ++++++++++++++++++--- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js index 513f50b4..2e3c0c4f 100644 --- a/pc4mobx/hrmSalary/apis/ruleconfig.js +++ b/pc4mobx/hrmSalary/apis/ruleconfig.js @@ -47,6 +47,10 @@ export const operateTaxDeclarationFunction = (params) => { export const saveArchiveDelete = (params) => { return postFetch("/api/bs/hrmsalary/sys/saveArchiveDelete", params); }; +//保存个税申报撤回规则 +export const saveWithDrawTaxDeclaration = (params) => { + return postFetch("/api/bs/hrmsalary/sys/saveWithDrawTaxDeclaration", params); +}; //保存匹配规则 export const saveSalaryAcctEmployeeRule = (params) => { return postFetch("/api/bs/hrmsalary/sys/saveSalaryAcctEmployeeRule", params); diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 2cc2f31b..363531bd 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -26,7 +26,8 @@ export default class Index extends Component { enctry: "", operateTaxDeclaration: "", matchRule: "", - confValue: "0" + confValue: "0", + withDrawTaxDeclaration: "0" }, showEncryptOperationButton: "", progressVisible: false, @@ -55,7 +56,7 @@ export default class Index extends Component { isOpenEncrypt: enctry, isOpenTaxDeclaration: operateTaxDeclaration, salaryAcctEmployeeRule: matchRule, - salaryArchiveDelete: confValue + salaryArchiveDelete: confValue, withDrawTaxDeclaration } } = appSettings; this.setState({ @@ -63,7 +64,7 @@ export default class Index extends Component { showEncryptOperationButton, saveParams: { ...saveParams, - ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue + ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration } }); } @@ -209,6 +210,16 @@ export default class Index extends Component { } }); }; + withDrawTaxDeclaration = () => { + API.saveWithDrawTaxDeclaration({ confValue: _.pick(this.state.saveParams, ["withDrawTaxDeclaration"]).withDrawTaxDeclaration }) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(22619, "保存成功!")); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }; handleChange = (key, val) => { const { saveParams } = this.state; @@ -242,6 +253,9 @@ export default class Index extends Component { case "confValue": this.saveArchiveDelete(); break; + case "withDrawTaxDeclaration": + this.withDrawTaxDeclaration(); + break; default: break; } @@ -267,7 +281,16 @@ export default class Index extends Component { employeeOptions, showEncryptOperationButton } = this.state; - const { orderRule, ascOrDesc, rule, enctry, operateTaxDeclaration, matchRule, confValue } = saveParams; + const { + orderRule, + ascOrDesc, + rule, + enctry, + operateTaxDeclaration, + matchRule, + confValue, + withDrawTaxDeclaration + } = saveParams; return (
this.handleChange("operateTaxDeclaration", val)}/> + + this.handleChange("withDrawTaxDeclaration", val)}/> + From fbf16f97dc0308ae70ed126648d84dfc532dfd89 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, 3 Jul 2023 13:52:20 +0800 Subject: [PATCH 33/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=A8=A1=E6=9D=BF=E5=AE=9A=E6=97=B6=E5=8F=91=E6=94=BE?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/payroll/stepForm/baseInformForm.js | 73 ++++++++++++++++++- .../pages/payroll/stepForm/index.less | 16 ++++ 2 files changed, 86 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js index 69ebf94e..157467d7 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js @@ -1,7 +1,8 @@ import React from "react"; -import { WeaCheckbox, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom"; +import { WeaCheckbox, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaTimePicker } from "ecCom"; import { inject, observer } from "mobx-react"; import { getReplenishRuleSetOptions } from "../../../apis/payroll"; +import moment from "moment"; import { toJS } from "mobx"; import "./index.less"; @@ -35,7 +36,8 @@ export default class BaseInformForm extends React.Component { ...data.templateBaseData, msgStatus: !this.props.id ? "1" : data.templateBaseData.msgStatus, reissueRule: data.templateBaseData.replenishRule ? "1" : "0", - ...JSON.parse(templateBaseData) + ...JSON.parse(templateBaseData), + sendEmail: "" } }, () => { this.props.onChange && this.props.onChange(this.state.request); @@ -73,7 +75,19 @@ export default class BaseInformForm extends React.Component { render() { const { request, options, replenishRuleOptions } = this.state; - const { salarySob, name, description, replenishName, replenishRule, reissueRule, msgStatus, emailStatus } = request; + const { + salarySob, + name, + description, + replenishName, + replenishRule, + reissueRule, + msgStatus, + emailStatus, + autoSendStatus, + autoSendDayOfMonth, + autoSendTimeOfDay + } = request; return ( @@ -164,8 +178,61 @@ export default class BaseInformForm extends React.Component { this.hanldeChange({ emailStatus: value === "1" })}/> + + this.hanldeChange({ autoSendStatus: value === "1" })}/> + + { + autoSendStatus && + + + + } ); } } + +const SendTimeComp = (props) => { + const { value, onChange } = props; + const { autoSendDayOfMonth, autoSendTimeOfDay } = value; + + const handleChangeSendtime = (key, val) => { + onChange({ autoSendDayOfMonth, autoSendTimeOfDay, [key]: val }); + }; + return
+
+ {getLabel(111, "每月")} + ({ key: item, showname: item }))} + onChange={v => handleChangeSendtime("autoSendDayOfMonth", v)} + /> + {getLabel(16992, "号")} +
+ handleChangeSendtime("autoSendTimeOfDay", v)}/> +
; +}; + +const getDay = () => { + let days = []; + let day = getDaysInMonth(moment().year(), moment().month() + 1); + for (let i = 1; i <= day; i++) { + days.push(i); + } + return days; +}; + +const getDaysInMonth = (year, month) => { + month = parseInt(month, 10); + let d = new Date(year, month, 0); + return d.getDate(); +}; diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less b/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less index 4bfbe9d0..f30d0063 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less @@ -234,4 +234,20 @@ border-bottom: 1px solid #e5e5e5; } } + + .customTimeCompWrapper { + display: flex; + justify-content: flex-start; + + & > div { + margin-right: 10px; + display: flex; + align-items: center; + + .wea-select { + width: 80px; + margin: 0 10px; + } + } + } } From 3d04a79fcddf204d6bfedab16b97a688816a5ddf 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, 3 Jul 2023 15:42:11 +0800 Subject: [PATCH 34/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=88=97=E8=A1=A8=E6=93=8D=E4=BD=9C=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/UnifiedTable/index.js | 2 +- .../components/UnifiedTable/index.less | 14 +-- pc4mobx/hrmSalary/pages/calculate/index.js | 92 +++++-------------- .../dataAcquisition/cumDeduct/index.less | 14 +-- .../pages/dataAcquisition/dataTables.js | 9 +- .../dataAcquisition/otherDeduct/index.less | 14 +-- pc4mobx/hrmSalary/pages/ledger/index.less | 12 +-- .../ledgerPage/components/ledgerTable.js | 15 ++- .../standingBook/index.js | 48 ++++++---- pc4mobx/hrmSalary/pages/taxAgent/index.js | 25 ++--- pc4mobx/hrmSalary/pages/taxAgent/index.less | 9 +- 11 files changed, 109 insertions(+), 145 deletions(-) diff --git a/pc4mobx/hrmSalary/components/UnifiedTable/index.js b/pc4mobx/hrmSalary/components/UnifiedTable/index.js index 8f406f4f..f8cbff97 100644 --- a/pc4mobx/hrmSalary/components/UnifiedTable/index.js +++ b/pc4mobx/hrmSalary/components/UnifiedTable/index.js @@ -13,7 +13,7 @@ class Index extends Component { return { ...item, fixed: "left", width: 176 }; } if (item.dataIndex === "operate") { - return { ...item, fixed: "right", width: "120px" }; + return { ...item, fixed: "right", width: item.width || "120px" }; } return { ...item, width: "33%" }; }); diff --git a/pc4mobx/hrmSalary/components/UnifiedTable/index.less b/pc4mobx/hrmSalary/components/UnifiedTable/index.less index e1dbaf1d..616d16f0 100644 --- a/pc4mobx/hrmSalary/components/UnifiedTable/index.less +++ b/pc4mobx/hrmSalary/components/UnifiedTable/index.less @@ -8,17 +8,17 @@ } .linkWapper { - a { - color: #4d7ad8; - margin-right: 8px; - } + //a { + // color: #4d7ad8; + // margin-right: 8px; + //} i { cursor: pointer; } - a:hover { - text-decoration: none; - } + //a:hover { + // text-decoration: none; + //} } } diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js index 84c858a2..473e1ec0 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/index.js @@ -187,15 +187,10 @@ export default class Calculate extends React.Component { }; } if (item.dataIndex === "operate" && showOperateBtn) { + item.width = 150; item.render = (text, record) => { - const accountBtn = _.filter( - record.operate, - it => it.text == "核算" || it.text == "重新核算" - ); - const notAccountBtn = _.filter( - record.operate, - it => it.text != "核算" && it.text != "重新核算" - ); + const accountBtn = _.take(record.operate, 2); + const notAccountBtn = _.drop(record.operate, 2); let operateBtn = []; if (!_.isEmpty(accountBtn)) { operateBtn.push( @@ -207,13 +202,8 @@ export default class Calculate extends React.Component { style={{ display: "inline-block", marginRight: 8 }}> { - if (it.text == "核算" || it.text == "重新核算") { - it.text == "核算" - ? this.handleAccount(record) - : this.handleReaccount(record); - } - }}> + style={it.index !== "4" ? { padding: "0 12px" } : {}} + onClick={() => this.handleOperateClick(it.index, record)}> {it.text}
@@ -229,31 +219,14 @@ export default class Calculate extends React.Component { {notAccountBtn.map(cz => { - if (cz.text == "核算") { - this.handleAccount(record); - } else if (cz.text == "删除") { - this.handleDeleteItem(record); - } else if (cz.text == "归档") { - this.handleFile(record); - } else if (cz.text == "重新核算") { - this.handleReaccount(record); - } else if (cz.text == "查看") { - this.handleDetail(record); - } else if (cz.text == "回算") { - this.handleBackCalculate(record); - } - }}> + onClick={() => this.handleOperateClick(cz.index, record)}> {cz.text} )} }> - + ); } @@ -261,7 +234,23 @@ export default class Calculate extends React.Component { }; } }); - return showOperateBtn ? columns : _.filter(columns, it => it.title != "操作"); + return showOperateBtn ? columns : _.filter(columns, it => it.title !== "操作"); + }; + + handleOperateClick = (index, record) => { + if (index === "0") { + this.handleAccount(record); + } else if (index === "1") { + this.handleDeleteItem(record); + } else if (index === "2") { + this.handleFile(record); + } else if (index === "4") { + this.handleReaccount(record); + } else if (index === "3") { + this.handleDetail(record); + } else if (index === "5") { + this.handleBackCalculate(record); + } }; // 分页 @@ -291,44 +280,13 @@ export default class Calculate extends React.Component { render() { const { calculateStore, taxAgentStore: { showOperateBtn } } = this.props; - const { - salaryListDataSource, - salaryListColumns, - loading, - hasRight, - form, - condition, - tableStore, - showSearchAd, - getTableDatas, - doSearch, - setShowSearchAd, - salaryListPageInfo - } = calculateStore; + const { salaryListDataSource, loading, hasRight, salaryListPageInfo } = calculateStore; const { modalParam } = this.state; if (!hasRight && !loading) { // 无权限处理 return renderNoright(); } - const rightMenu = [ - // 右键菜单 - { - key: "BTN_COLUMN", - icon: , - content: "显示列定制", - onClick: this.showColumn - } - ]; - const collectParams = { - // 收藏功能配置 - favname: "薪资核算", - favouritetype: 1, - objid: 0, - link: "wui/index.html#/ns_demo03/index", - importantlevel: 1 - }; - const renderRightOperation = () => { const { startDate, endDate } = this.state; return ( diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less index ebccaa07..56fd88df 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less @@ -45,18 +45,18 @@ } .linkWapper { - a { - color: #4d7ad8; - margin-right: 8px; - } + //a { + // color: #4d7ad8; + // margin-right: 8px; + //} i { cursor: pointer; } - a:hover { - text-decoration: none; - } + //a:hover { + // text-decoration: none; + //} } } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js index 7f41b9de..de207b22 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js @@ -101,19 +101,22 @@ class DataTables extends Component { } else if (dataIndex === "operate") { return { ...item, + width: 150, render: (text, record) => (
{ !isSpecial && - onViewDetails(record)}>查看明细 + onTableOperate({ key: "handleAddData" }, record)}>编辑 + onViewDetails(record)}>查看明细 { showOperateBtn && onTableOperate(e, record)}> - 编辑 删除 } title=""> @@ -127,7 +130,7 @@ class DataTables extends Component { { showOperateBtn && - onTableOperate({ key: "handleAddData" }, record)}>编辑 onTableOperate({ key: "deleteSelectAddUpDeduction" }, record)}>删除 diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less index 93bc2137..cf86d2f7 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less @@ -11,18 +11,18 @@ } .linkWapper { - a { - color: #4d7ad8; - margin-right: 8px; - } + //a { + // color: #4d7ad8; + // margin-right: 8px; + //} i { cursor: pointer; } - a:hover { - text-decoration: none; - } + //a:hover { + // text-decoration: none; + //} } } diff --git a/pc4mobx/hrmSalary/pages/ledger/index.less b/pc4mobx/hrmSalary/pages/ledger/index.less index 21467cbe..27948111 100644 --- a/pc4mobx/hrmSalary/pages/ledger/index.less +++ b/pc4mobx/hrmSalary/pages/ledger/index.less @@ -222,13 +222,13 @@ .mySalaryBenefitsWrapper { .linkWapper { - a { - color: #4d7ad8; - } + //a { + // color: #4d7ad8; + //} - a:hover { - text-decoration: none; - } + //a:hover { + // text-decoration: none; + //} } } diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js index 97fa0829..2c712894 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js @@ -38,10 +38,10 @@ class LedgerTable extends Component { } componentWillReceiveProps(nextProps, nextContext) { - if (nextProps.doSearch !== this.props.doSearch) this.getLedgerList({current: 1}); + if (nextProps.doSearch !== this.props.doSearch) this.getLedgerList({ current: 1 }); } - getLedgerList = (extra={}) => { + getLedgerList = (extra = {}) => { const { name } = this.props; const { pageInfo } = this.state; const payload = { name, ...pageInfo, ...extra }; @@ -74,17 +74,22 @@ class LedgerTable extends Component { />; }; } else if (dataIndex === "operate") { - item.width = 120; + item.width = 150; item.render = (text, record) => { return
- onEditLedger(record)}>{showOperateBtn ? "编辑" : "查看"} + onEditLedger(record)}>{showOperateBtn ? "编辑" : "查看"} + { + showOperateBtn && + this.handleMenuClick({ key: "copy" }, record)}>复制 + } { showOperateBtn && this.handleMenuClick(e, record)}> - 复制 删除 } title=""> diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js index be0ad9a8..c4ee3869 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js @@ -140,7 +140,7 @@ export default class StandingBook extends React.Component { { title: "操作", dataIndex: "operate", - width: 120, + width: 150, key: "operate", render: (text, r) => { const { billStatus, billMonth, creator } = r; @@ -154,6 +154,32 @@ export default class StandingBook extends React.Component { 核算 )} + {billStatus === "0" && ( + this.handleOperate({ + key: "archive", + billMonth, + paymentOrganizationId: r.paymentOrganizationId, + creator + })}> + 归档 + + )} + {billStatus === "1" && ( + this.handleOperate({ + key: "view", + billMonth, + paymentOrganizationId: r.paymentOrganizationId, + creator + })}> + 查看 + + )} {billStatus === "1" && ( - 归档 删除 }> )} - {billStatus === "1" && ( - - this.handleOperate({ - key, - billMonth, - paymentOrganizationId: r.paymentOrganizationId, - creator - }) - }> - 查看 - - }> - - - )} ); } @@ -492,6 +499,7 @@ export default class StandingBook extends React.Component { if (item.dataIndex !== "operate" && item.dataIndex !== "billStatus") { return { ...item, + width:150, render: (text) => { return {text}; } diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.js b/pc4mobx/hrmSalary/pages/taxAgent/index.js index 6576e595..1010c090 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/index.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/index.js @@ -1,8 +1,8 @@ import React from "react"; import { inject, observer } from "mobx-react"; -import { Button, Col, Dropdown, Menu, message, Modal, Row, Switch } from "antd"; +import { Button, Col, message, Modal, Row, Switch } from "antd"; import { WeaFormItem, WeaInputSearch, WeaSearchGroup, WeaTable, WeaTop } from "ecCom"; -import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 +import { renderNoright } from "../../util"; import EditModal from "./editModal"; import TipLabel from "../../components/TipLabel"; import { decentralizationConditions, editConditions } from "./editConditions"; @@ -357,22 +357,11 @@ export default class TaxAgent extends React.Component { onClick={() => this.showEditModal(record.id)}> 编辑 - - - this.deleteTaxAgent(record.id)}> - 删除 - - - - }> - - - - + this.deleteTaxAgent(record.id)}> + 删除 +
} ], diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.less b/pc4mobx/hrmSalary/pages/taxAgent/index.less index ccff7add..6bfafdb0 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/index.less +++ b/pc4mobx/hrmSalary/pages/taxAgent/index.less @@ -39,12 +39,13 @@ .operationWapper, .employeeRangeWapper { a { - color: #4d7ad8; + //color: #4d7ad8; + margin-right: 10px; } - a:hover { - text-decoration: none; - } + //a:hover { + // text-decoration: none; + //} a.ant-dropdown-link { margin-left: 18px; From afd3163ff52dfbe4112d45532516706013729399 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, 3 Jul 2023 16:03:56 +0800 Subject: [PATCH 35/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=88=97=E8=A1=A8=E6=93=8D=E4=BD=9C=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payroll/SalarySendList.js | 12 ++++++++++-- .../hrmSalary/pages/payroll/templateSettingList.js | 12 +++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js index 2b98919b..947db8db 100644 --- a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js +++ b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js @@ -1,6 +1,6 @@ import React from "react"; import { inject, observer } from "mobx-react"; -import { message, Tag } from "antd"; +import { Dropdown, Menu, message, Tag } from "antd"; import moment from "moment"; import CustomPaginationTable from "../../components/customPaginationTable"; import "../calculate/index.less"; @@ -91,6 +91,7 @@ export default class SalarySendList extends React.Component { { title: "操作", key: "operate", + width: 150, render: (text, record) => { const { sendNum, sendTotal, salaryAcctType, haveBackCalc, canSeeDetail } = record; //显示发放 @@ -106,7 +107,14 @@ export default class SalarySendList extends React.Component { } { sendNum !== sendTotal && !showGrant && - this.handleUpdateTemplate(record)}>更新模板 + this.handleUpdateTemplate(record)}> + 更新模板 + + }> + + }
); diff --git a/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js b/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js index 05d75b27..9e986510 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js +++ b/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js @@ -2,7 +2,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { WeaLocaleProvider, WeaTable } from "ecCom"; import { toJS } from "mobx"; -import { Radio, Spin } from "antd"; +import { Dropdown, Menu, Radio, Spin } from "antd"; const getLabel = WeaLocaleProvider.getLabel; @inject("payrollStore") @@ -93,8 +93,14 @@ export default class TemplateSettingList extends React.Component { onClick={() => this.onOperatesClick(record, "0")}>{getLabel(501169, "编辑")} this.onOperatesClick(record, "1")}>{getLabel(77, "复制")} - this.onOperatesClick(record, "2")}>{getLabel(535052, "删除")} + this.onOperatesClick(record, "2")}> + {getLabel(535052, "删除")} + + }> + +
; } } From a623679975ae24e153509768a789eea9386a6212 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, 3 Jul 2023 17:29:53 +0800 Subject: [PATCH 36/36] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=87=E9=9B=86=E9=A1=B5=E9=9D=A2=E7=BC=96=E8=BE=91=E6=A1=86?= =?UTF-8?q?=E6=8D=A2=E6=88=90=E6=95=B0=E5=AD=97=E8=BE=93=E5=85=A5=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataAcquisition/cumDeduct/columns.js | 21 +++++--- .../dataAcquisition/cumSituation/columns.js | 51 ++++++++++++------- .../dataAcquisition/otherDeduct/columns.js | 15 ++++-- .../components/condition.js | 21 +++++--- 4 files changed, 72 insertions(+), 36 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js index 9d6b6831..9956585a 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js @@ -399,66 +399,73 @@ export const dataCollectCondition = [ { items: [ { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpChildEducation"], fieldcol: 14, label: "累计子女教育", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpContinuingEducation"], fieldcol: 14, label: "累计继续教育", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpHousingLoanInterest"], fieldcol: 14, label: "累计住房贷款利息", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpHousingRent"], fieldcol: 14, label: "累计住房租金", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpSupportElderly"], fieldcol: 14, label: "累计赡养老人", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpIllnessMedical"], fieldcol: 14, label: "累计大病医疗", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpInfantCare"], fieldcol: 14, label: "累计婴幼儿照护", labelcol: 8, value: "", + precision: 2, viewAttr: 2 } ], diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js index 689db6a4..ae006af6 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js @@ -69,156 +69,173 @@ export const dataCollectCondition = [ { items: [ { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpIncome"], fieldcol: 14, label: "累计收入额", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpSubtraction"], fieldcol: 14, label: "累计减除费用", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpSocialSecurityTotal"], fieldcol: 14, label: "累计社保个人合计", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpAccumulationFundTotal"], fieldcol: 14, label: "累计公积金个人合计", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpChildEducation"], fieldcol: 14, label: "累计子女教育", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpContinuingEducation"], fieldcol: 14, label: "累计继续教育", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpHousingLoanInterest"], fieldcol: 14, label: "累计住房贷款利息", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpHousingRent"], fieldcol: 14, label: "累计住房租金", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpSupportElderly"], fieldcol: 14, label: "累计赡养老人", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpIllnessMedical"], fieldcol: 14, label: "累计大病医疗", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpEnterpriseAndOther"], fieldcol: 14, label: "累计企业(职业)年金及其他福利", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpOtherDeduction"], fieldcol: 14, label: "累计其他免税扣除", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpTaxExemptIncome"], fieldcol: 14, label: "累计免税收入", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpAllowedDonation"], fieldcol: 14, label: "累计准予扣除的捐赠额", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpTaxSavings"], fieldcol: 14, label: "累计减免税额", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpAdvanceTax"], fieldcol: 14, label: "累计已预扣预缴税额", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["addUpInfantCare"], fieldcol: 14, label: "累计婴幼儿照护", labelcol: 8, value: "", + precision: 2, viewAttr: 2 } ], diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js index 6f542381..a4b80c9c 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js @@ -69,48 +69,53 @@ export const dataCollectCondition = [ { items: [ { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["businessHealthyInsurance"], fieldcol: 14, label: "商业健康保险", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["taxDelayEndowmentInsurance"], fieldcol: 14, label: "税延养老保险", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["otherDeduction"], fieldcol: 14, label: "其他", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["deductionAllowedDonation"], fieldcol: 14, label: "准予扣除的捐赠额", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["privatePension"], fieldcol: 14, label: "个人养老金", labelcol: 8, value: "", + precision: 2, viewAttr: 2 } ], diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js index aec25fae..68495cc9 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js @@ -2,66 +2,73 @@ export const condition = [ { items: [ { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["childrenEducation"], fieldcol: 14, label: "子女教育", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["continuingEducation"], fieldcol: 14, label: "继续教育", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["housingLoanInterest"], fieldcol: 14, label: "住房贷款利息", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["housingRent"], fieldcol: 14, label: "住房租金", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["supportingElder"], fieldcol: 14, label: "赡养老人", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["seriousIllnessTreatment"], fieldcol: 14, label: "大病医疗", labelcol: 8, value: "", + precision: 2, viewAttr: 2 }, { - conditionType: "INPUT", + conditionType: "INPUTNUMBER", domkey: ["infantCare"], fieldcol: 14, label: "婴幼儿照护", labelcol: 8, value: "", + precision: 2, viewAttr: 2 } ],