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 01/30] =?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 02/30] =?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 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 03/30] =?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 04/30] =?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 05/30] =?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 06/30] =?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 07/30] =?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 08/30] =?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 09/30] =?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 } ], From 61ebfdf9f1c90f965fc33788dd60162134d37b6e 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, 4 Jul 2023 15:42:39 +0800 Subject: [PATCH 10/30] =?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=9B=BE=E8=A1=A8=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/reportView/components/condition.js | 149 +++++++++++------- 1 file changed, 89 insertions(+), 60 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/reportView/components/condition.js b/pc4mobx/hrmSalary/pages/reportView/components/condition.js index c8422666..fba734b3 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/condition.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/condition.js @@ -153,7 +153,11 @@ export const condition = [ } ]; -const colorList = ["#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81"]; +const colorList = [ + "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", + "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", + "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81" +]; export const mapBarOptions = (params) => ({ tooltip: { trigger: "axis", @@ -176,6 +180,7 @@ export const mapBarOptions = (params) => ({ } }, legend: { + type: "scroll", icon: "rect", top: "0%", right: "center", @@ -188,27 +193,33 @@ export const mapBarOptions = (params) => ({ grid: { top: "10%", right: "0%", - left: "2%", + left: "5%", bottom: "0%", containLabel: true }, - xAxis: { - type: "category", - axisTick: { - alignWithLabel: true, - show: false - }, - data: params.xAxis, - axisLabel: { - interval: 0, - margin: 10, - textStyle: { - fontSize: 11 + xAxis: params.xAxis.map((item, index) => { + const data = Array(params.xAxis.length).fill(""); + data[index] = item; + return { + type: "category", + position: "bottom", + data: data, + axisTick: { + alignWithLabel: true, + show: false + }, + axisLabel: { + interval: 0, + margin: 10, + textStyle: { + fontSize: 11 + } } - } - }, + }; + }), yAxis: { name: params.name, + type: "value", axisLabel: { padding: [3, 0, 0, 0], formatter: "{value}", @@ -237,50 +248,9 @@ export const mapBarOptions = (params) => ({ } } }, - series: _.map(params.data, (item, index) => { - return { - name: item.name, - barWidth: "32", - data: _.map(item.data, (it) => it.replace(/,/g, "")), - type: "bar", - itemStyle: { - normal: { - color: function (params) { - return colorList[params.seriesIndex] || colorList[Math.floor((Math.random() * colorList.length))]; - } - } - }, - label: { - show: true, - position: "insideBottom", - distance: 15, - align: "left", - verticalAlign: "middle", - rotate: "90", - formatter: function (params) { - if (parseInt(params.value) === 0) { - return ``; - } else { - return [ - `{a|${format_with_regex(params.value)}} {b|${params.seriesName}}` - ]; - } - }, - rich: { - a: { - fontWeight: "bold", - fontSize: 14, - color: "#333", - marginRight: 10 - }, - b: { - fontSize: 12, - color: "#333" - } - } - } - }; - }) + series: params.data.map(item => { + return [...dealBar(_.map(item.data, (it) => parseFloat(it.replace(/,/g, ""))), item.name)]; + }).reduce((acc, cur) => acc.concat(cur), []) }); export const mapLineOptions = (params) => ({ tooltip: { @@ -292,6 +262,7 @@ export const mapLineOptions = (params) => ({ } }, legend: { + type: "scroll", icon: "circle", top: "0%", right: "center", @@ -385,6 +356,7 @@ export const mapPieOptions = (params) => ({ } }, legend: { + type: "scroll", icon: "rect", top: "0%", left: "2%", @@ -420,3 +392,60 @@ export const mapPieOptions = (params) => ({ }; }) }); + +const dealBar = (arr, name) => { + const bar = []; + arr.forEach((item, index) => { + const data = []; + for (let i = 0; i < index; i++) { + data.push(""); + } + if (item) { + data.push(item); + bar.push({ + name, + type: "bar", + xAxisIndex: index, + barWidth: 32, + data, + itemStyle: { + normal: { + color: function (params) { + return colorList[params.seriesIndex] || colorList[Math.floor((Math.random() * colorList.length))]; + } + } + }, + label: { + show: true, + position: "insideBottom", + distance: 15, + align: "left", + verticalAlign: "middle", + rotate: "90", + formatter: function (params) { + if (parseInt(params.value) === 0) { + return ``; + } else { + return [ + `{a|${format_with_regex(params.value)}} {b|${params.seriesName}}` + ]; + } + }, + rich: { + a: { + fontWeight: "bold", + fontSize: 14, + color: "#333", + marginRight: 10 + }, + b: { + fontSize: 12, + color: "#333" + } + } + } + }); + } + }); + return bar; +}; From 17a1262d46c684d1ed93afa94fad3f99dab914a5 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, 4 Jul 2023 15:56:06 +0800 Subject: [PATCH 11/30] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E5=88=97=E8=A1=A8=E6=A0=B7=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/calculate/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js index 473e1ec0..cf34c232 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/index.js @@ -202,7 +202,6 @@ export default class Calculate extends React.Component { style={{ display: "inline-block", marginRight: 8 }}> this.handleOperateClick(it.index, record)}> {it.text} From 0772c85c010c816fee57ec14838d51796badff4f 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, 4 Jul 2023 16:00:01 +0800 Subject: [PATCH 12/30] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E5=88=97=E8=A1=A8=E6=A0=B7=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/calculate/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js index cf34c232..8223f240 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/index.js @@ -202,6 +202,7 @@ export default class Calculate extends React.Component { style={{ display: "inline-block", marginRight: 8 }}> this.handleOperateClick(it.index, record)}> {it.text} From ff7ef86172c01b33f864320d476d0524a99ef4cb 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, 4 Jul 2023 16:02:15 +0800 Subject: [PATCH 13/30] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E5=88=97=E8=A1=A8=E6=A0=B7=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/calculate/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js index 8223f240..d9a3699a 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/index.js @@ -202,7 +202,7 @@ export default class Calculate extends React.Component { style={{ display: "inline-block", marginRight: 8 }}> this.handleOperateClick(it.index, record)}> {it.text} From d2fe01c7592555d36365191b0d3fdbad06436f38 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, 4 Jul 2023 17:37:04 +0800 Subject: [PATCH 14/30] =?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?bug=E5=A4=84=E7=90=86=E4=BB=A5=E5=8F=8A=E8=A7=84=E5=88=99?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/payroll/stepForm/baseInformForm.js | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js index 157467d7..251b8e7e 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js @@ -37,7 +37,8 @@ export default class BaseInformForm extends React.Component { msgStatus: !this.props.id ? "1" : data.templateBaseData.msgStatus, reissueRule: data.templateBaseData.replenishRule ? "1" : "0", ...JSON.parse(templateBaseData), - sendEmail: "" + sendEmail: "", + autoSendStatus: !_.isNil(data.templateBaseData.autoSendStatus) ? data.templateBaseData.autoSendStatus : false } }, () => { this.props.onChange && this.props.onChange(this.state.request); @@ -50,7 +51,7 @@ export default class BaseInformForm extends React.Component { JSON.parse(templateBaseData).salarySob && this.getReplenishRuleSetOptions({ salarySobId: JSON.parse(templateBaseData).salarySob }); } - hanldeChange = (params) => { + handleChange = (params) => { let request = { ...this.state.request, ...params }; this.setState({ request @@ -104,7 +105,7 @@ export default class BaseInformForm extends React.Component { options={options} value={salarySob ? salarySob : ""} style={{ width: 200 }} - onChange={value => this.hanldeChange({ salarySob: value })}/> + onChange={value => this.handleChange({ salarySob: value })}/> } this.hanldeChange({ name: value })} + onChange={value => this.handleChange({ name: value })} /> this.hanldeChange({ replenishName: value })} + onChange={value => this.handleChange({ replenishName: value })} /> this.hanldeChange({ reissueRule: value })} + onChange={value => this.handleChange({ reissueRule: value })} /> { @@ -153,7 +154,7 @@ export default class BaseInformForm extends React.Component { options={replenishRuleOptions} value={replenishRule} viewAttr={3} - onChange={value => this.hanldeChange({ replenishRule: value })} + onChange={value => this.handleChange({ replenishRule: value })} /> } @@ -164,7 +165,7 @@ export default class BaseInformForm extends React.Component { > this.hanldeChange({ description: value })} + onChange={value => this.handleChange({ description: value })} /> @@ -172,15 +173,21 @@ export default class BaseInformForm extends React.Component { className="payrollBaseInfoWrapper"> this.hanldeChange({ msgStatus: value === "1" })}/> + onChange={value => this.handleChange({ msgStatus: value === "1" })}/> this.hanldeChange({ emailStatus: value === "1" })}/> + onChange={value => this.handleChange({ emailStatus: value === "1" })}/> this.hanldeChange({ autoSendStatus: value === "1" })}/> + onChange={value => { + this.handleChange({ + autoSendStatus: value === "1", + autoSendDayOfMonth: value === "1" ? "1" : null, + autoSendTimeOfDay: value === "1" ? "09:00" : null + }); + }}/> { autoSendStatus && @@ -190,7 +197,7 @@ export default class BaseInformForm extends React.Component { autoSendDayOfMonth, autoSendTimeOfDay }} - onChange={this.hanldeChange} + onChange={this.handleChange} /> } From e501aa293e3bdbec674c13a0c8a880f5ade96c83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 5 Jul 2023 10:54:39 +0800 Subject: [PATCH 15/30] =?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?=E6=B7=BB=E5=8A=A0=E8=96=AA=E8=B5=84=E6=89=80=E5=B1=9E=E6=9C=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/payroll/stepForm/baseInformForm.js | 46 ++++++++++++++----- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js index 251b8e7e..82be3188 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js @@ -2,10 +2,12 @@ import React from "react"; import { WeaCheckbox, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaTimePicker } from "ecCom"; import { inject, observer } from "mobx-react"; import { getReplenishRuleSetOptions } from "../../../apis/payroll"; +import { commonEnumList } from "../../../apis/payrollFiles"; import moment from "moment"; import { toJS } from "mobx"; import "./index.less"; + const getLabel = WeaLocaleProvider.getLabel; @inject("payrollStore") @observer @@ -16,6 +18,7 @@ export default class BaseInformForm extends React.Component { inited: false, options: [], replenishRuleOptions: [], + salaryMonthOptions: [], request: {} }; } @@ -24,6 +27,7 @@ export default class BaseInformForm extends React.Component { const { payrollStore } = this.props; const { getPayrollBaseForm } = payrollStore; const templateBaseData = window.localStorage.getItem("template-basedata") || "{}"; + this.commonEnumList(); getPayrollBaseForm(this.props.id).then(data => { this.setState( { @@ -73,9 +77,19 @@ export default class BaseInformForm extends React.Component { } }); }; + commonEnumList = () => { + commonEnumList({ enumClass: "com.engine.salary.enums.salarysend.SalaryAutoSendCycleTypeEnum" }) + .then(({ status, data }) => { + if (status && !_.isEmpty(data)) { + this.setState({ + salaryMonthOptions: _.map(data, it => ({ key: it.value.toString(), showname: it.defaultLabel })) + }); + } + }); + }; render() { - const { request, options, replenishRuleOptions } = this.state; + const { request, options, replenishRuleOptions, salaryMonthOptions } = this.state; const { salarySob, name, @@ -87,7 +101,8 @@ export default class BaseInformForm extends React.Component { emailStatus, autoSendStatus, autoSendDayOfMonth, - autoSendTimeOfDay + autoSendTimeOfDay, + autoSendCycleType } = request; return ( @@ -185,7 +200,8 @@ export default class BaseInformForm extends React.Component { this.handleChange({ autoSendStatus: value === "1", autoSendDayOfMonth: value === "1" ? "1" : null, - autoSendTimeOfDay: value === "1" ? "09:00" : null + autoSendTimeOfDay: value === "1" ? "09:00" : null, + autoSendCycleType: 0 }); }}/> @@ -193,9 +209,11 @@ export default class BaseInformForm extends React.Component { autoSendStatus && @@ -208,18 +226,23 @@ export default class BaseInformForm extends React.Component { } const SendTimeComp = (props) => { - const { value, onChange } = props; - const { autoSendDayOfMonth, autoSendTimeOfDay } = value; + const { value, onChange, salaryMonthOptions } = props; + const { autoSendDayOfMonth, autoSendTimeOfDay, autoSendCycleType } = value; const handleChangeSendtime = (key, val) => { - onChange({ autoSendDayOfMonth, autoSendTimeOfDay, [key]: val }); + onChange({ autoSendDayOfMonth, autoSendTimeOfDay, autoSendCycleType, [key]: val }); }; return
- {getLabel(111, "每月")} + {getLabel(542604, "薪资所属月")} + handleChangeSendtime("autoSendCycleType", Number(v))} + /> ({ key: item, showname: item }))} + options={_.map(getDay(autoSendCycleType), item => ({ key: item, showname: item }))} onChange={v => handleChangeSendtime("autoSendDayOfMonth", v)} /> {getLabel(16992, "号")} @@ -229,15 +252,14 @@ const SendTimeComp = (props) => {
; }; -const getDay = () => { +const getDay = (num = 1) => { let days = []; - let day = getDaysInMonth(moment().year(), moment().month() + 1); + let day = getDaysInMonth(moment().year(), moment().month() + num); 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); From ae79ab24c37fedf6151d6afa29298eceb4c7e54c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 5 Jul 2023 14:04:26 +0800 Subject: [PATCH 16/30] =?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?=E6=B7=BB=E5=8A=A0=E8=96=AA=E8=B5=84=E6=89=80=E5=B1=9E=E6=9C=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js index 82be3188..5cd3f6f1 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js @@ -201,7 +201,7 @@ export default class BaseInformForm extends React.Component { autoSendStatus: value === "1", autoSendDayOfMonth: value === "1" ? "1" : null, autoSendTimeOfDay: value === "1" ? "09:00" : null, - autoSendCycleType: 0 + autoSendCycleType: value === "1" ? 1 : null, }); }}/> From 153be5b7a72d1525199e0374fc8750ff4cef27fb 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, 7 Jul 2023 10:47:45 +0800 Subject: [PATCH 17/30] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=95=B0=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/socialSecurityBenefits/standingBook/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js index c4ee3869..7e8a8af8 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js @@ -149,7 +149,7 @@ export default class StandingBook extends React.Component { {billStatus === "0" && ( this.handleGoDetail(billMonth, "", r.paymentOrganizationId, creator)}> 核算 @@ -157,7 +157,7 @@ export default class StandingBook extends React.Component { {billStatus === "0" && ( this.handleOperate({ key: "archive", billMonth, @@ -170,7 +170,7 @@ export default class StandingBook extends React.Component { {billStatus === "1" && ( this.handleOperate({ key: "view", billMonth, @@ -499,7 +499,7 @@ export default class StandingBook extends React.Component { if (item.dataIndex !== "operate" && item.dataIndex !== "billStatus") { return { ...item, - width:150, + width: 150, render: (text) => { return {text}; } From aa9c4223b65bd8ff129f6f3926356e790da62ef1 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, 7 Jul 2023 13:45:11 +0800 Subject: [PATCH 18/30] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E5=BC=B9=E6=A1=86=E6=A0=B7=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/calculate/index.less | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pc4mobx/hrmSalary/pages/calculate/index.less b/pc4mobx/hrmSalary/pages/calculate/index.less index cec45959..2a274b60 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.less +++ b/pc4mobx/hrmSalary/pages/calculate/index.less @@ -4,6 +4,12 @@ } .formItem { + display: flex; + + .ant-col-8 { + line-height: 30px; + } + .wea-select, .ant-select { width: 100%; } From 9226ef19b3a1d842c3c48fbdd664e0772ce99de7 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, 10 Jul 2023 09:21:57 +0800 Subject: [PATCH 19/30] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E4=BA=8C=E6=AC=A1=E9=AA=8C=E8=AF=81=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/mySalaryBenefits.js | 6 + .../hrmSalary/pages/mobilePayroll/index.js | 29 ++++- .../hrmSalary/pages/mobilePayroll/index.less | 24 ++++ .../pages/mobilePayroll/passSetDialog.js | 113 ++++++++++++++++++ .../pages/mobilePayroll/pwdCondtion.js | 45 +++++++ pc4mobx/hrmSalary/stores/mySalary.js | 1 + pc4mobx/hrmSalary/util/RSAUtil.js | 32 +++++ 7 files changed, 244 insertions(+), 6 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js create mode 100644 pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js create mode 100644 pc4mobx/hrmSalary/util/RSAUtil.js diff --git a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js index a2f5be7a..274544aa 100644 --- a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js +++ b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js @@ -31,6 +31,12 @@ export const mySalaryBill = params => { export const isNeedSecondPwdVerify = params => { return WeaTools.callApi("/api/encrypt/secondauthsetting/isNeedSecondAuth", "POST", params); }; +export const getSecondAuthForm = params => { + return WeaTools.callApi("/api/encrypt/secondauthsetting/getSecondAuthForm", "POST", params); +}; export const doSecondAuth = params => { return WeaTools.callApi("/api/encrypt/secondauthsetting/doSecondAuth", "POST", params); }; +export const saveSecondaryPwd = params => { + return WeaTools.callApi("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params); +}; diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index db4f3c2f..5a41f8ac 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { getQueryString } from "../../util/url"; -import { WeaDialog, WeaError, WeaInput } from "ecCom"; +import { WeaDialog, WeaError, WeaInput, WeaLocaleProvider } from "ecCom"; import { Button, message } from "antd"; import Authority from "../mySalary/authority"; import ComputerTemplate from "../payroll/templatePreview/computerTemplate"; @@ -9,8 +9,11 @@ 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"; +import PassSetDialog from "./passSetDialog"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; @inject("mySalaryStore") @observer @@ -18,9 +21,11 @@ export default class MobilePayroll extends React.Component { constructor(props) { super(props); this.state = { + pwdSetVisible: false, visible: false, captchaVisible: false, authCode: "", + notSetting: false, mySalaryBillData: { employeeInformation: {}, salaryTemplate: [] @@ -49,7 +54,11 @@ export default class MobilePayroll extends React.Component { // if (window.em) { API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }).then(({ status, isNeedSecondAuth }) => { if (status && isNeedSecondAuth) { - this.setState({ visible: true }); + this.setState({ visible: true }, () => { + API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }).then(({ status, notSetting }) => { + this.setState({ notSetting }); + }); + }); } else { this.getMySalaryBill(getQueryString("id")); setInitEmVerify(); @@ -106,8 +115,8 @@ export default class MobilePayroll extends React.Component { }; render() { - const { mySalaryStore: { clearLoading } } = this.props; - const { mySalaryBillData, visible, captchaVisible } = this.state; + const { mySalaryStore: { clearLoading, pwdForm } } = this.props; + const { mySalaryBillData, visible, captchaVisible, notSetting, pwdSetVisible } = this.state; const type = getQueryString("type"); const employeeInformation = mySalaryBillData.employeeInformation ? mySalaryBillData.employeeInformation : {}; const salaryGroups = mySalaryBillData.salaryGroups ? mySalaryBillData.salaryGroups : []; @@ -126,9 +135,17 @@ export default class MobilePayroll extends React.Component { ]} > - this.setState({ authCode })}/> + this.setState({ authCode })}/> + { + notSetting && + + } + this.setState({ pwdSetVisible: false })}/> { type === "phone" ? { + const { isFormInit } = form, formParams = form.getFormParams(); + let group = []; + isFormInit && condition && condition.map(c => { + let items = []; + c.items.map(fields => { + items.push({ + com: ( + + { + fields.domkey[0] === "validatecode" ? +
+ + { + this.setState({ num: this.state.num + 1 }, () => { + this.setState({ src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}` }); + }); + }} + alt="" + /> +
+ : + } +
), + colSpan: 1 + }); + }); + group.push( + ); + }); + return group; + }; + saveSecondaryPassword = () => { + const { form } = this.props; + const { secondaryPwd1, secondaryPwd2, validatecode } = form.getFormParams(); + if (!validatecode || !secondaryPwd1 || !secondaryPwd2) { + message.error(getLabel(518702, "必要信息不完整,红色*为必填项!")); + return; + } + if (secondaryPwd1 !== secondaryPwd2) { + message.error(getLabel("504376", "密码确认不正确!")); + return; + } + const params = { secondaryPwd1, secondaryPwd2 }; + RSAEcrypt("1", params).then(RSAParam => { + saveSecondaryPwd({ ...RSAParam, validatecode }).then(({ sign, message: msg }) => { + if (sign === "1") { + message.success(msg); + this.props.onCancel(); + form.resetForm(); + } else { + message.warning(msg); + } + }); + }); + }; + + render() { + return ( + {getLabel(537558, "保存")} + ]} + > + {this.getSearchs(this.props.form, condition)} + + ); + } +} + +export default PassSetDialog; diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js b/pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js new file mode 100644 index 00000000..c2b9df7a --- /dev/null +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js @@ -0,0 +1,45 @@ +import { WeaLocaleProvider } from "ecCom"; + +const { getLabel } = WeaLocaleProvider; +export const condition = [ + { + items: [ + { + colSpan: 1, + checkbox: false, + checkboxValue: false, + conditionType: "INPUT", + domkey: ["secondaryPwd1"], + fieldcol: 18, + label: getLabel(409, "密码"), + labelcol: 6, + detailtype: 3, + rules: "required|string", + viewAttr: 3 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["secondaryPwd2"], + fieldcol: 18, + label: getLabel(511112, "确认密码"), + labelcol: 6, + rules: "required|string", + viewAttr: 3 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["validatecode"], + fieldcol: 18, + label: getLabel(511113, "验证码"), + labelcol: 6, + value: "", + rules: "required|string", + viewAttr: 3 + } + ], + title: "", + defaultshow: true + } +]; diff --git a/pc4mobx/hrmSalary/stores/mySalary.js b/pc4mobx/hrmSalary/stores/mySalary.js index 61988d5b..916c3be9 100644 --- a/pc4mobx/hrmSalary/stores/mySalary.js +++ b/pc4mobx/hrmSalary/stores/mySalary.js @@ -14,6 +14,7 @@ const { TableStore } = WeaTableNew; export class MySalaryStore { @observable tableStore = new TableStore(); // new table @observable form = new WeaForm(); // nrew 一个form + @observable pwdForm = new WeaForm(); // new 一个密码验证form @observable condition = []; // 存储后台得到的form数据 @observable hasRight = false; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据 @observable showSearchAd = false; // 高级搜索面板显示 diff --git a/pc4mobx/hrmSalary/util/RSAUtil.js b/pc4mobx/hrmSalary/util/RSAUtil.js new file mode 100644 index 00000000..97b76234 --- /dev/null +++ b/pc4mobx/hrmSalary/util/RSAUtil.js @@ -0,0 +1,32 @@ +import loadjs from "loadjs"; + +const RSAEcrypt = (openRSA, param) => { + return new Promise((resolve, reject) => { + //异步加载ras文件 + loadjs.isDefined("rsa") ? loadjs.ready("rsa", () => { + if (openRSA && openRSA == "1") { + Object.keys(param).forEach(key => { + param[key] = __RSAEcrypt__.rsa_data_encrypt(param[key]); + }); + } + resolve(param); + }) : loadjs(["/js/rsa/jsencrypt.js", "/js/rsa/rsa.js"], "rsa", { + async: false, + success: () => { + if (openRSA && openRSA == "1") { + const callback = () => { + Object.keys(param).forEach(key => { + param[key] = __RSAEcrypt__.rsa_data_encrypt(param[key]); + }); + resolve(param); + }; + __RSAEcrypt__.initRsaCode(callback); + } else { + resolve(param); + } + } + }); + }); +}; + +export { RSAEcrypt }; From d984a105fd2d404e30aa1d18c96112731743c2ba 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, 10 Jul 2023 11:00:47 +0800 Subject: [PATCH 20/30] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=A4=9A=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=BC=A0=E5=8F=82=E7=BB=9F=E4=B8=80=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=95=B0=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/calculateDetail/index.js | 17 ++++++++++------- .../pages/calculateDetail/userSure.js | 17 ++++++++++------- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 18 ++++++++---------- pc4mobx/hrmSalary/stores/payrollFiles.js | 5 +++-- 4 files changed, 31 insertions(+), 26 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js index da39bb6c..1bc1e55a 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js @@ -26,7 +26,7 @@ export default class CalculateDetail extends React.Component { departmentIds: "", positionIds: "", subcompanyIds: "", - status: "", + statuses: "", consolidatedTaxation: "0" }, selectedKey: "0", @@ -115,7 +115,7 @@ export default class CalculateDetail extends React.Component { ); }; Select = (value, key) => { - const { status } = this.state.searchItemsValue; + const { statuses } = this.state.searchItemsValue; return ( this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/> @@ -338,7 +341,7 @@ export default class CalculateDetail extends React.Component { workcode: "", departmentIds: "", positionIds: "", - status: "", + statuses: "", consolidatedTaxation: "0" } })}> @@ -356,7 +359,7 @@ export default class CalculateDetail extends React.Component { { com: this.Browser("分部", "subcompanyIds") }, { com: this.Browser("部门", "departmentIds") }, { com: this.Browser("岗位", "positionIds") }, - { com: this.Select("状态", "status") }, + { com: this.Select("状态", "statuses") }, { com: this.Checkbox("合并计税", "consolidatedTaxation") } ]; return ; diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js index b67558e1..6ef24cbb 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js @@ -17,7 +17,7 @@ export default class UserSure extends React.Component { workcode: "", departmentIds: "", positionIds: "", - status: "" + statuses: "" }, selectedKey: "0", selectedRowKeys: [], // table 选中项 @@ -78,7 +78,7 @@ export default class UserSure extends React.Component { ); }; Select = (value, key) => { - const { status } = this.state.searchItemsValue; + const { statuses } = this.state.searchItemsValue; return ( this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/> @@ -342,7 +345,7 @@ export default class UserSure extends React.Component { employeeName: "", departmentIds: "", positionIds: "", - status: "" + statuses: "" } })}> 重置 @@ -358,7 +361,7 @@ export default class UserSure extends React.Component { { com: this.Input("工号", "workcode") }, { com: this.Browser("部门", "departmentIds") }, { com: this.Browser("岗位", "positionIds") }, - { com: this.Select("状态", "status") } + { com: this.Select("状态", "statuses") } ]; return ; }; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index f094e5b0..61d0c031 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -68,7 +68,7 @@ class Index extends Component { workcode: "", departmentIds: "", positionIds: "", - userstatus: "", + statuses: "", // archiveStatus: "EFFICIENT", taxAgentId: "", subcompanyIds: "" @@ -125,7 +125,7 @@ class Index extends Component { }; Select = (value, key) => { const { taxAgentStore } = this.props; - const { userstatus, archiveStatus, taxAgentId } = this.state.searchItemsValue; + const { statuses, archiveStatus, taxAgentId } = this.state.searchItemsValue; const { archiveStatusList, userStatusList } = this.state; const { taxAgentAdminOption } = taxAgentStore; return ( @@ -135,8 +135,9 @@ class Index extends Component { wrapperCol={{ span: 18 }} > ({ + userStatusList: [..._.map(userStatusList, it => ({ key: String(it.value), showname: it.defaultLabel }))] @@ -666,7 +664,7 @@ class Index extends Component { { com: this.Browser("分部", "subcompanyIds") }, { com: this.Browser("部门", "departmentIds") }, { com: this.Browser("岗位", "positionIds") }, - { com: this.Select("人员状态", "userstatus") }, + { com: this.Select("人员状态", "statuses") }, // { com: this.Select("档案状态", "archiveStatus") }, { com: this.Select("个税扣缴义务人", "taxAgentId") }, { com: this.Input("工号", "workcode") } @@ -691,7 +689,7 @@ class Index extends Component { workcode: "", departmentIds: "", positionIds: "", - userstatus: "", + statuses: "", archiveStatus: "" } })}> 重置 , diff --git a/pc4mobx/hrmSalary/stores/payrollFiles.js b/pc4mobx/hrmSalary/stores/payrollFiles.js index 7efc0dd2..70088da8 100644 --- a/pc4mobx/hrmSalary/stores/payrollFiles.js +++ b/pc4mobx/hrmSalary/stores/payrollFiles.js @@ -1,7 +1,7 @@ import { action, observable } from "mobx"; import { WeaTableNew } from "comsMobx"; import * as API from "../apis/payrollFiles"; -import { statisticsEmployeeDetailList, getDataPerspective } from "../apis/statistics"; +import { getDataPerspective, statisticsEmployeeDetailList } from "../apis/statistics"; const { TableStore } = WeaTableNew; @@ -14,11 +14,12 @@ export class PayrollFilesStore { @action("薪资档案-列表查询") queryList = (payload = {}, searchItemsValue = {}, url = "") => { return new Promise((resolve, reject) => { - const { departmentIds, positionIds, subcompanyIds, ...extra } = searchItemsValue; + const { departmentIds, positionIds, subcompanyIds, statuses, ...extra } = searchItemsValue; API.queryList({ departmentIds: departmentIds ? departmentIds.split(",") : [], positionIds: positionIds ? positionIds.split(",") : [], subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [], + statuses: statuses ? statuses.split(",") : [], ...payload, ...extra, url }).then(res => { const { data, status } = res; From cc4cccf1114adaf0cd128234a7c142e1e946a278 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, 10 Jul 2023 11:39:36 +0800 Subject: [PATCH 21/30] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=A4=9A=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=BC=A0=E5=8F=82=E7=BB=9F=E4=B8=80=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=95=B0=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/socialSecurityBenefits/archives/index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index 3a8ad7ab..3e28be10 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -14,6 +14,7 @@ import * as API from "../../../apis/welfareArchive"; import ImportModal from "../../../components/importModal"; import TipLabel from "../../../components/TipLabel"; import UnifiedTable from "../../../components/UnifiedTable"; +import { convertToUrlString } from "../../../util/url"; import "./index.less"; @inject("archivesStore", "taxAgentStore") @@ -548,16 +549,16 @@ export default class Archives extends React.Component { let url = `${window.location.origin}/api/bs/hrmsalary/scheme/export?ids=`; switch (selectedKey) { case "pending": - url = `${url}&runStatuses=1`; + url = `${url}&runStatuses=1&${convertToUrlString(form.getFormParams())}`; break; case "fixed": - url = `${url}&runStatuses=2,3`; + url = `${url}&runStatuses=2,3&${convertToUrlString(form.getFormParams())}`; break; case "suspend": - url = `${url}&runStatuses=3`; + url = `${url}&runStatuses=3&${convertToUrlString(form.getFormParams())}`; break; default: - url = `${url}&runStatuses=4,5`; + url = `${url}&runStatuses=4,5&${convertToUrlString(form.getFormParams())}`; break; } window.open(url, "_self"); From c8fe01dfdaecd119bba7e71248473d608270700d 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, 10 Jul 2023 15:52:25 +0800 Subject: [PATCH 22/30] =?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=A8echarts=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=B0=81=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../condition-柱状图数据为0不占位.js | 451 ++++++++++++++++++ .../pages/reportView/components/condition.js | 160 +++---- 2 files changed, 524 insertions(+), 87 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/reportView/components/condition-柱状图数据为0不占位.js diff --git a/pc4mobx/hrmSalary/pages/reportView/components/condition-柱状图数据为0不占位.js b/pc4mobx/hrmSalary/pages/reportView/components/condition-柱状图数据为0不占位.js new file mode 100644 index 00000000..fba734b3 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/reportView/components/condition-柱状图数据为0不占位.js @@ -0,0 +1,451 @@ +import { WeaLocaleProvider } from "ecCom"; +import { format_with_regex } from "../../../util"; + +const { getLabel } = WeaLocaleProvider; +export const condition = [ + { + items: [ + { + colSpan: 2, + checkbox: false, + checkboxValue: false, + conditionType: "SELECT", + domkey: ["taxAgent"], + fieldcol: 18, + label: getLabel(111, "个税扣缴义务人"), + labelcol: 6, + options: [], + multiple: true, + viewAttr: 2 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: true, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: getLabel(111, "分部"), + type: "164", + viewAttr: 2 + }, + colSpan: 2, + conditionType: "BROWSER", + domkey: ["subCompany"], + fieldcol: 18, + isQuickSearch: false, + label: getLabel(111, "分部"), + labelcol: 6, + viewAttr: 2 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: true, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: getLabel(111, "部门"), + type: "57", + viewAttr: 2 + }, + colSpan: 2, + conditionType: "BROWSER", + domkey: ["department"], + fieldcol: 18, + isQuickSearch: false, + label: getLabel(111, "部门"), + labelcol: 6, + viewAttr: 2 + }, + // { + // browserConditionParam: { + // completeParams: {}, + // conditionDataParams: {}, + // dataParams: {}, + // destDataParams: {}, + // hasAddBtn: false, + // hasAdvanceSerach: true, + // idSeparator: ",", + // isAutoComplete: 1, + // isDetail: 0, + // isMultCheckbox: false, + // isSingle: false, + // linkUrl: "", + // pageSize: 10, + // quickSearchName: "", + // replaceDatas: [], + // title: getLabel(111, "岗位"), + // type: "278", + // viewAttr: 2 + // }, + // colSpan: 2, + // conditionType: "BROWSER", + // domkey: ["position"], + // fieldcol: 18, + // isQuickSearch: false, + // label: getLabel(111, "岗位"), + // labelcol: 6, + // viewAttr: 2 + // }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: true, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: getLabel(111, "人员"), + type: "17", + viewAttr: 2 + }, + colSpan: 2, + conditionType: "BROWSER", + domkey: ["employee"], + fieldcol: 18, + isQuickSearch: false, + label: getLabel(111, "人员"), + labelcol: 6, + viewAttr: 2 + }, + { + colSpan: 2, + conditionType: "RANGEPICKER", + domkey: ["hiredate1", "hiredate2"], + fieldcol: 18, + label: getLabel(111, "入职日期"), + labelcol: 6, + viewAttr: 2 + } + ], + title: "", + defaultshow: true + } +]; + +const colorList = [ + "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", + "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", + "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81" +]; +export const mapBarOptions = (params) => ({ + tooltip: { + trigger: "axis", + axisPointer: { + type: "shadow" + }, + backgroundColor: "#FFF", + borderColor: "#FFF", + borderWidth: "1", + borderRadius: "5", + textStyle: { + color: "#333" + }, + formatter: function (params) { + let str = params[0].axisValue + "
"; + for (let item of params) { + str += `
${item.marker}${item.seriesName}${format_with_regex(item.value)}
`; + } + return str; + } + }, + legend: { + type: "scroll", + icon: "rect", + top: "0%", + right: "center", + itemGap: 10, + textStyle: { + fontSize: 12,//字体大小 + color: "#B8B8B8"//字体颜色 + } + }, + grid: { + top: "10%", + right: "0%", + left: "5%", + bottom: "0%", + containLabel: true + }, + xAxis: params.xAxis.map((item, index) => { + const data = Array(params.xAxis.length).fill(""); + data[index] = item; + return { + type: "category", + position: "bottom", + data: data, + axisTick: { + alignWithLabel: true, + show: false + }, + axisLabel: { + interval: 0, + margin: 10, + textStyle: { + fontSize: 11 + } + } + }; + }), + yAxis: { + name: params.name, + type: "value", + axisLabel: { + padding: [3, 0, 0, 0], + formatter: "{value}", + color: "#666", + textStyle: { + fontSize: 11 + } + }, + nameTextStyle: { + color: "#787E95", + fontSize: 12 + }, + axisLine: { + show: true, + lineStyle: { + color: "transparent" + } + }, + axisTick: { + show: false // 不显示坐标轴刻度线 + }, + splitLine: { + show: false, + lineStyle: { + color: "rgba(66, 192, 255, 0.1)" + } + } + }, + series: params.data.map(item => { + return [...dealBar(_.map(item.data, (it) => parseFloat(it.replace(/,/g, ""))), item.name)]; + }).reduce((acc, cur) => acc.concat(cur), []) +}); +export const mapLineOptions = (params) => ({ + tooltip: { + // 坐标轴指示器,坐标轴触发有效 + trigger: "axis", + axisPointer: { + // 默认为直线,可选为:'line' | 'shadow' + type: "line" + } + }, + legend: { + type: "scroll", + icon: "circle", + top: "0%", + right: "center", + itemGap: 20, + textStyle: { + fontSize: 12,//字体大小 + color: "#787E95"//字体颜色 + } + }, + grid: { + top: "10%", + left: "3%", + right: "2%", + bottom: "3%", + containLabel: true + }, + xAxis: [ + { + type: "category", + boundaryGap: false, + data: params.xAxis, + axisTick: { + alignWithLabel: true, + show: false + }, + // 修改坐标值样式 + axisLabel: { + color: "#B8B8B8", + fontSize: 12, + show: true + }, + axisLine: { + show: false + } + } + ], + yAxis: [ + { + type: "value", + // 修改坐标值样式 + axisLabel: { + color: "#787E95", + fontSize: 14 + }, + nameTextStyle: { + color: "#787E95", + fontSize: 16 + }, + // 修改坐标轴线样式 + axisLine: { + show: true, + lineStyle: { + color: "transparent" + } + }, + axisTick: { + show: false // 不显示坐标轴刻度线 + }, + splitLine: { + lineStyle: { + color: "rgba(93,126,158,1)" + } + } + } + ], + series: _.map(params.data, (item, index) => { + return { + name: item.name, + data: _.map(item.data, (it) => it.replace(/,/g, "")), + type: "line", + itemStyle: { + normal: { + color: function (params) { + return colorList[params.seriesIndex] || colorList[Math.floor((Math.random() * colorList.length))]; + }, + lineStyle: { + color: colorList[index] || colorList[Math.floor((Math.random() * colorList.length))] + } + } + } + }; + }) +}); +export const mapPieOptions = (params) => ({ + tooltip: { + show: true, + formatter: function (params) { + let str = params.seriesName + "
"; + str += params.marker + params.name + ":" + format_with_regex(params.value) + "(" + params.percent + "%" + ")" + "
"; + return str; + } + }, + legend: { + type: "scroll", + icon: "rect", + top: "0%", + left: "2%", + orient: "vertical", + itemGap: 10, + textStyle: { + fontSize: 12,//字体大小 + color: "#787E95"//字体颜色 + } + }, + series: _.map(params.data, item => { + return { + name: item.name, + data: _.map(item.data, (it) => ({ ...it, value: it.value.replace(/,/g, "") })), + type: "pie", + radius: "60%", + avoidLabelOverlap: true, + animation: false, + labelLine: { + show: true, + normal: { + length: 5, + align: "center" + } + }, + itemStyle: { + normal: { + color: function (colors) { + return colorList[colors.dataIndex] || colorList[Math.floor((Math.random() * colorList.length))]; + } + } + } + }; + }) +}); + +const dealBar = (arr, name) => { + const bar = []; + arr.forEach((item, index) => { + const data = []; + for (let i = 0; i < index; i++) { + data.push(""); + } + if (item) { + data.push(item); + bar.push({ + name, + type: "bar", + xAxisIndex: index, + barWidth: 32, + data, + itemStyle: { + normal: { + color: function (params) { + return colorList[params.seriesIndex] || colorList[Math.floor((Math.random() * colorList.length))]; + } + } + }, + label: { + show: true, + position: "insideBottom", + distance: 15, + align: "left", + verticalAlign: "middle", + rotate: "90", + formatter: function (params) { + if (parseInt(params.value) === 0) { + return ``; + } else { + return [ + `{a|${format_with_regex(params.value)}} {b|${params.seriesName}}` + ]; + } + }, + rich: { + a: { + fontWeight: "bold", + fontSize: 14, + color: "#333", + marginRight: 10 + }, + b: { + fontSize: 12, + color: "#333" + } + } + } + }); + } + }); + return bar; +}; diff --git a/pc4mobx/hrmSalary/pages/reportView/components/condition.js b/pc4mobx/hrmSalary/pages/reportView/components/condition.js index fba734b3..103793c3 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/condition.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/condition.js @@ -153,11 +153,7 @@ export const condition = [ } ]; -const colorList = [ - "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", - "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", - "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81" -]; +const colorList = ["#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81"]; export const mapBarOptions = (params) => ({ tooltip: { trigger: "axis", @@ -194,29 +190,24 @@ export const mapBarOptions = (params) => ({ top: "10%", right: "0%", left: "5%", - bottom: "0%", + bottom: "10%", containLabel: true }, - xAxis: params.xAxis.map((item, index) => { - const data = Array(params.xAxis.length).fill(""); - data[index] = item; - return { - type: "category", - position: "bottom", - data: data, - axisTick: { - alignWithLabel: true, - show: false - }, - axisLabel: { - interval: 0, - margin: 10, - textStyle: { - fontSize: 11 - } + xAxis: { + type: "category", + axisTick: { + alignWithLabel: true, + show: false + }, + data: params.xAxis, + axisLabel: { + interval: 0, + margin: 10, + textStyle: { + fontSize: 11 } - }; - }), + } + }, yAxis: { name: params.name, type: "value", @@ -248,9 +239,62 @@ export const mapBarOptions = (params) => ({ } } }, - series: params.data.map(item => { - return [...dealBar(_.map(item.data, (it) => parseFloat(it.replace(/,/g, ""))), item.name)]; - }).reduce((acc, cur) => acc.concat(cur), []) + series: _.map(params.data, (item, index) => { + return { + name: item.name, + barWidth: "32", + barGap: "0%", + data: _.map(item.data, (it) => it.replace(/,/g, "")), + type: "bar", + itemStyle: { + normal: { + color: function (params) { + return colorList[params.seriesIndex] || colorList[Math.floor((Math.random() * colorList.length))]; + } + } + }, + label: { + show: true, + position: "insideBottom", + distance: 15, + align: "left", + verticalAlign: "middle", + rotate: "90", + formatter: function (params) { + if (parseInt(params.value) === 0) { + return ``; + } else { + return [ + `{a|${format_with_regex(params.value)}} {b|${params.seriesName}}` + ]; + } + }, + rich: { + a: { + fontWeight: "bold", + fontSize: 14, + color: "#333", + marginRight: 10 + }, + b: { + fontSize: 12, + color: "#333" + } + } + } + }; + }), + dataZoom: [ + { + type: "inside" + + }, + { + type: "slider", + show: true, + bottom: 20, + } + ] }); export const mapLineOptions = (params) => ({ tooltip: { @@ -262,7 +306,6 @@ export const mapLineOptions = (params) => ({ } }, legend: { - type: "scroll", icon: "circle", top: "0%", right: "center", @@ -331,7 +374,7 @@ export const mapLineOptions = (params) => ({ series: _.map(params.data, (item, index) => { return { name: item.name, - data: _.map(item.data, (it) => it.replace(/,/g, "")), + data: _.map(item.data, (it) => parseFloat(it.replace(/,/g, ""))), type: "line", itemStyle: { normal: { @@ -392,60 +435,3 @@ export const mapPieOptions = (params) => ({ }; }) }); - -const dealBar = (arr, name) => { - const bar = []; - arr.forEach((item, index) => { - const data = []; - for (let i = 0; i < index; i++) { - data.push(""); - } - if (item) { - data.push(item); - bar.push({ - name, - type: "bar", - xAxisIndex: index, - barWidth: 32, - data, - itemStyle: { - normal: { - color: function (params) { - return colorList[params.seriesIndex] || colorList[Math.floor((Math.random() * colorList.length))]; - } - } - }, - label: { - show: true, - position: "insideBottom", - distance: 15, - align: "left", - verticalAlign: "middle", - rotate: "90", - formatter: function (params) { - if (parseInt(params.value) === 0) { - return ``; - } else { - return [ - `{a|${format_with_regex(params.value)}} {b|${params.seriesName}}` - ]; - } - }, - rich: { - a: { - fontWeight: "bold", - fontSize: 14, - color: "#333", - marginRight: 10 - }, - b: { - fontSize: 12, - color: "#333" - } - } - } - }); - } - }); - return bar; -}; From 405e2a9bc60d6c63853d75182a765274643a91c4 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, 11 Jul 2023 10:44:49 +0800 Subject: [PATCH 23/30] =?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=E7=A7=BB=E5=8A=A8=E7=AB=AF=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E5=AF=86=E7=A0=81=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js b/pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js index 1043d662..ff0acaba 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js @@ -90,6 +90,9 @@ class PassSetDialog extends Component { form.resetForm(); } else { message.warning(msg); + this.setState({ num: this.state.num + 1 }, () => { + this.setState({ src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}` }); + }); } }); }); From d8fdc8096b6dc9c2a75e385ff6d45030bc2e02c7 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, 11 Jul 2023 11:43:05 +0800 Subject: [PATCH 24/30] =?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=E7=A7=BB=E5=8A=A8=E7=AB=AF=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E5=AF=86=E7=A0=81=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/mySalaryBenefits.js | 3 +++ .../pages/mobilePayroll/passSetDialog.js | 3 ++- .../pages/mobilePayroll/pwdCondtion.js | 22 +++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js index 274544aa..c87cd3ab 100644 --- a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js +++ b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js @@ -37,6 +37,9 @@ export const getSecondAuthForm = params => { export const doSecondAuth = params => { return WeaTools.callApi("/api/encrypt/secondauthsetting/doSecondAuth", "POST", params); }; +export const checkPassword = params => { + return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params); +}; export const saveSecondaryPwd = params => { return WeaTools.callApi("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params); }; diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js b/pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js index ff0acaba..82c6ca98 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js @@ -20,7 +20,8 @@ class PassSetDialog extends Component { super(props); this.state = { src: (window.ecologyContentPath || "") + "/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4", - num: 0 + num: 0, + isPassLoginPassword: false }; } diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js b/pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js index c2b9df7a..a54f2909 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js @@ -1,6 +1,28 @@ import { WeaLocaleProvider } from "ecCom"; const { getLabel } = WeaLocaleProvider; +export const loginCondition = [ + { + items: [ + { + colSpan: 1, + checkbox: false, + checkboxValue: false, + conditionType: "INPUT", + domkey: ["password"], + fieldcol: 18, + label: getLabel(388431, "登录密码"), + labelcol: 6, + detailtype: 3, + rules: "required|string", + type: "password", + viewAttr: 3 + } + ], + title: "", + defaultshow: true + } +]; export const condition = [ { items: [ From a13f31eefa1983c19719e25880aabf828cb25318 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, 11 Jul 2023 12:08:01 +0800 Subject: [PATCH 25/30] =?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=E7=A7=BB=E5=8A=A8=E7=AB=AF=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E5=AF=86=E7=A0=81=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/mobilePayroll/passSetDialog.js | 74 ++++++++++++------- 1 file changed, 49 insertions(+), 25 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js b/pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js index 82c6ca98..f857ff41 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js @@ -7,10 +7,10 @@ import React, { Component } from "react"; import { WeaDialog, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import { WeaSwitch } from "comsMobx"; -import { condition } from "./pwdCondtion"; +import { condition, loginCondition } from "./pwdCondtion"; import { Button, message } from "antd"; import { RSAEcrypt } from "../../util/RSAUtil"; -import { saveSecondaryPwd } from "../../apis/mySalaryBenefits"; +import { checkPassword, saveSecondaryPwd } from "../../apis/mySalaryBenefits"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; @@ -26,6 +26,7 @@ class PassSetDialog extends Component { } componentDidMount() { + this.props.form.initFormFields(loginCondition); this.props.form.initFormFields(condition); } @@ -72,43 +73,66 @@ class PassSetDialog extends Component { return group; }; saveSecondaryPassword = () => { + const { isPassLoginPassword } = this.state; const { form } = this.props; - const { secondaryPwd1, secondaryPwd2, validatecode } = form.getFormParams(); - if (!validatecode || !secondaryPwd1 || !secondaryPwd2) { - message.error(getLabel(518702, "必要信息不完整,红色*为必填项!")); - return; + const { secondaryPwd1, secondaryPwd2, validatecode, password } = form.getFormParams(); + if (isPassLoginPassword) { + if (!validatecode || !secondaryPwd1 || !secondaryPwd2) { + message.error(getLabel(518702, "必要信息不完整,红色*为必填项!")); + return; + } + if (secondaryPwd1 !== secondaryPwd2) { + message.error(getLabel("504376", "密码确认不正确!")); + return; + } + } else { + if (!password) { + message.error(getLabel(518702, "必要信息不完整,红色*为必填项!")); + return; + } } - if (secondaryPwd1 !== secondaryPwd2) { - message.error(getLabel("504376", "密码确认不正确!")); - return; - } - const params = { secondaryPwd1, secondaryPwd2 }; + const params = isPassLoginPassword ? { secondaryPwd1, secondaryPwd2 } : { password }; RSAEcrypt("1", params).then(RSAParam => { - saveSecondaryPwd({ ...RSAParam, validatecode }).then(({ sign, message: msg }) => { - if (sign === "1") { - message.success(msg); - this.props.onCancel(); - form.resetForm(); - } else { - message.warning(msg); - this.setState({ num: this.state.num + 1 }, () => { - this.setState({ src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}` }); - }); - } - }); + isPassLoginPassword ? + saveSecondaryPwd({ ...RSAParam, validatecode }).then(({ sign, message: msg }) => { + if (sign === "1") { + message.success(msg); + this.props.onCancel(); + form.resetForm(); + } else { + message.warning(msg); + this.setState({ num: this.state.num + 1 }, () => { + this.setState({ src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}` }); + }); + } + }) : + checkPassword({ ...RSAParam }).then(({ result }) => { + if (result) { + this.setState({ isPassLoginPassword: true }); + form.resetForm(); + } else { + message.error(getLabel(504343, "登录密码错误")); + } + }); }); }; render() { + const { isPassLoginPassword } = this.state; return ( {getLabel(537558, "保存")} ]} > - {this.getSearchs(this.props.form, condition)} + { + isPassLoginPassword ? + this.getSearchs(this.props.form, condition) : + this.getSearchs(this.props.form, loginCondition) + } ); } From 7c908c81dba21f3b24557e12a29d84d3f50e8916 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, 13 Jul 2023 09:37:17 +0800 Subject: [PATCH 26/30] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B3=87?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E6=A0=B8=E7=AE=97=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=B8=A6=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E7=BF=BB=E9=A1=B5=E6=9F=A5=E8=AF=A2=E4=B8=8D=E9=94=99=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 --- .../hrmSalary/pages/calculateDetail/index.js | 2 +- .../pages/calculateDetail/salaryDetail.js | 8 ++++---- .../pages/calculateDetail/userSure.js | 20 +++++++++---------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js index 1bc1e55a..72ce7a6b 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js @@ -394,7 +394,7 @@ export default class CalculateDetail extends React.Component { /> {selectedKey == 0 && } {selectedKey == 1 && this.setState({ accountIds: ids })} - employeeName={this.state.searchValue}/>} + employeeName={this.state.searchItemsValue}/>} {acctResultImportVisiable && Date: Thu, 13 Jul 2023 15:02:57 +0800 Subject: [PATCH 27/30] =?UTF-8?q?=E8=96=AA=E8=B5=84=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4=E4=B9=89=E5=8A=A1=E4=BA=BA?= =?UTF-8?q?=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/payrollFiles/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index 61d0c031..e44df54d 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -127,7 +127,7 @@ class Index extends Component { const { taxAgentStore } = this.props; const { statuses, archiveStatus, taxAgentId } = this.state.searchItemsValue; const { archiveStatusList, userStatusList } = this.state; - const { taxAgentAdminOption } = taxAgentStore; + const { taxAgentOption } = taxAgentStore; return ( this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/> ); @@ -148,8 +148,8 @@ class Index extends Component { componentDidMount() { const { taxAgentStore } = this.props; - const { getTaxAgentSelectListAsAdmin } = taxAgentStore; - getTaxAgentSelectListAsAdmin(); + const { fetchTaxAgentOption } = taxAgentStore; + fetchTaxAgentOption(); this.queryTabTotal(); this.queryList("/api/bs/hrmsalary/salaryArchive/pendingList"); const init = this.init(); From 626f8721fbb75d22f07cc96e545c3d54c53517c8 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, 13 Jul 2023 15:23:38 +0800 Subject: [PATCH 28/30] =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js b/pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js index a54f2909..e7c1fbbb 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/pwdCondtion.js @@ -37,7 +37,8 @@ export const condition = [ labelcol: 6, detailtype: 3, rules: "required|string", - viewAttr: 3 + viewAttr: 3, + type: "password" }, { colSpan: 1, @@ -47,7 +48,8 @@ export const condition = [ label: getLabel(511112, "确认密码"), labelcol: 6, rules: "required|string", - viewAttr: 3 + viewAttr: 3, + type: "password" }, { colSpan: 1, From 90bb69f292592639580f2e3b7e1dea34b48794c6 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, 14 Jul 2023 15:31:57 +0800 Subject: [PATCH 29/30] =?UTF-8?q?bug-=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E5=8F=B0=E8=B4=A6=E6=A0=B8=E7=AE=97=E9=A1=B5=E9=9D=A2=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=96=87=E5=AD=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standingBookDetail/components/normal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js index c078312f..4a2b5783 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js @@ -459,7 +459,7 @@ export default class NormalIndex extends Component { const { loading } = standingBookStore; const btn1 = [ , - + ]; const btn2 = [ , From ce93eff7348513aa9ad5b4bc248a9fb0ac7730ed 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, 17 Jul 2023 10:58:02 +0800 Subject: [PATCH 30/30] =?UTF-8?q?=E8=A7=84=E5=88=99=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 363531bd..1de2e589 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -328,24 +328,24 @@ export default class Index extends Component {
} - - + + this.handleChange("operateTaxDeclaration", val)}/> - + this.handleChange("withDrawTaxDeclaration", val)}/> - + this.handleChange("confValue", val)}/> - - + + this.handleChange("matchRule", val)} />