From a6cf191c29e5c6abd738b3a6b1359391e2f15152 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, 13 Mar 2023 10:43:25 +0800 Subject: [PATCH 01/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E7=AE=A1=E7=90=86-=E6=96=B0=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/index.js | 3 + .../externalPersonManageEditSlide.js | 40 ++++ .../pages/externalPersonManage/conditions.js | 185 ++++++++++++++++++ .../pages/externalPersonManage/index.js | 89 +++++++++ .../pages/externalPersonManage/index.less | 7 + .../hrmSalary/stores/externalPersonManage.js | 7 + pc4mobx/hrmSalary/stores/index.js | 4 +- 7 files changed, 334 insertions(+), 1 deletion(-) create mode 100644 pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js create mode 100644 pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js create mode 100644 pc4mobx/hrmSalary/pages/externalPersonManage/index.js create mode 100644 pc4mobx/hrmSalary/pages/externalPersonManage/index.less create mode 100644 pc4mobx/hrmSalary/stores/externalPersonManage.js diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index b59a534a..1165659b 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -32,6 +32,7 @@ import SysConfig from "./pages/sysConfig"; import RuleConfig from "./pages/ruleConfig"; import Appconfig from "./pages/appConfig"; import FieldManagement from "./pages/fieldManagement"; +import ExternalPersonManage from "./pages/externalPersonManage"; import stores from "./stores"; import "./style/index"; @@ -78,6 +79,7 @@ const DataAcquisition = (props) => props.children; // sysconfig-1 规则配置 // appconfig 应用配置 // fieldManagement 字段管理 +// externalPersonManage 非系统人员管理 const Routes = ( + ); diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js b/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js new file mode 100644 index 00000000..634a7124 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js @@ -0,0 +1,40 @@ +/* + * Author: 黎永顺 + * name: 非系统人员管理表单项 + * Description: + * Date: 2023/3/13 + */ +import React, { Component } from "react"; +import { WeaSlideModal } from "ecCom"; +import SlideModalTitle from "../../../components/slideModalTitle"; + +class ExternalPersonManageEditSlide extends Component { + render() { + const { visible, title, onCancel, showOperateBtn } = this.props; + return ( + console.log(111)} + /> + } + content={null} + onClose={onCancel} + /> + ); + } +} + +export default ExternalPersonManageEditSlide; diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js b/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js new file mode 100644 index 00000000..6cc054d7 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js @@ -0,0 +1,185 @@ +export const searchCondition = [ + { + items: [ + { + colSpan: 2, + conditionType: "INPUT", + domkey: ["username"], + fieldcol: 16, + label: "姓名", + labelcol: 8, + value: "", + viewAttr: 2, + } + ], + defaultshow: true, + }, +]; +export const condition = [ + { + items: [ + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["username"], + rules: "required|string", + fieldcol: 18, + label: "姓名", + labelcol: 6, + value: "", + viewAttr: 3, + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: true, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "部门", + type: "57", + viewAttr: 2, + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["departmentId"], + fieldcol: 18, + label: "部门", + labelcol: 6, + viewAttr: 2, + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: true, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "分部", + type: "164", + viewAttr: 2, + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["subcompanyId"], + fieldcol: 18, + label: "分部", + labelcol: 6, + viewAttr: 2, + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: true, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "岗位", + type: "24", + viewAttr: 2, + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["jobtitleId"], + fieldcol: 18, + label: "岗位", + labelcol: 6, + viewAttr: 2, + }, + { + colSpan: 1, + conditionType: "DATEPICKER", + domkey: ["companystartdate"], + fieldcol: 18, + label: "入职日期", + labelcol: 6, + value: "", + viewAttr: 2, + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["mobil"], + fieldcol: 18, + label: "手机", + labelcol: 6, + value: "", + viewAttr: 2, + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["workcode"], + fieldcol: 18, + label: "工号", + labelcol: 6, + value: "", + viewAttr: 2, + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["idNo"], + fieldcol: 18, + label: "身份证号码", + labelcol: 6, + value: "", + viewAttr: 2, + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["bankCardNum"], + fieldcol: 18, + label: "本人开户的银行卡卡号", + labelcol: 6, + value: "", + viewAttr: 2, + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["bankName"], + fieldcol: 18, + label: "本人开户的银行卡开户支行全称", + labelcol: 6, + value: "", + viewAttr: 2, + }, + ], + defaultshow: true, + }, +]; diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/index.js b/pc4mobx/hrmSalary/pages/externalPersonManage/index.js new file mode 100644 index 00000000..d2c6eeba --- /dev/null +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/index.js @@ -0,0 +1,89 @@ +/* + * Author: 黎永顺 + * name: 非系统人员管理 + * Description: + * Date: 2023/3/13 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { WeaTab, WeaTop } from "ecCom"; +import ExternalPersonManageEditSlide from "./components/externalPersonManageEditSlide"; +import { Button } from "antd"; +import { getSearchs } from "../../util"; +import { condition, searchCondition } from "./conditions"; +import "./index.less"; + +@inject("externalPersonManageStore", "taxAgentStore") +@observer +class Index extends Component { + constructor(props) { + super(props); + this.state = { + showSearchAd: false, + externalPersonManagePayload: { + visible: false, title: "新建" + } + }; + } + + componentDidMount() { + const { externalPersonManageStore: { form, addForm } } = this.props; + form.initFormFields(searchCondition); + addForm.initFormFields(condition); + } + + handleCancel = () => { + const { externalPersonManagePayload } = this.state; + const { externalPersonManageStore: { addForm } } = this.props; + addForm.resetForm(); + this.setState({ + externalPersonManagePayload: { + ...externalPersonManagePayload, + visible: false, title: "新建" + } + }); + }; + handleAdd = () => { + const { externalPersonManagePayload } = this.state; + this.setState({ + externalPersonManagePayload: { + ...externalPersonManagePayload, + visible: true + } + }); + }; + + + render() { + const { showSearchAd, externalPersonManagePayload } = this.state; + const { externalPersonManageStore: { form, addForm }, taxAgentStore: { showOperateBtn } } = this.props; + return ( +
+ } + iconBgcolor="#F14A2D" showDropIcon={false} + > +
+ 新建 + ]} + searchType={["base", "advanced"]} showSearchAd={showSearchAd} + setShowSearchAd={(showSearchAd) => this.setState({ showSearchAd })} + searchsAd={getSearchs(form, searchCondition, 2)} + searchsBasePlaceHolder="请输入姓名" + onSearchChange={username => form.updateFields({ username })} + searchsBaseValue={form.getFormParams().username} + /> + +
+
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/index.less b/pc4mobx/hrmSalary/pages/externalPersonManage/index.less new file mode 100644 index 00000000..32f8b668 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/index.less @@ -0,0 +1,7 @@ +.externalPerWrapper{ + width: 100%; + height: 100%; + .externalPerCont{ + height: 100%; + } +} diff --git a/pc4mobx/hrmSalary/stores/externalPersonManage.js b/pc4mobx/hrmSalary/stores/externalPersonManage.js new file mode 100644 index 00000000..7640bd04 --- /dev/null +++ b/pc4mobx/hrmSalary/stores/externalPersonManage.js @@ -0,0 +1,7 @@ +import { observable } from "mobx"; +import { WeaForm } from "comsMobx"; + +export class ExternalPersonManageStore { + @observable form = new WeaForm(); + @observable addForm = new WeaForm(); +} diff --git a/pc4mobx/hrmSalary/stores/index.js b/pc4mobx/hrmSalary/stores/index.js index 6b7af8e1..c9590ab3 100644 --- a/pc4mobx/hrmSalary/stores/index.js +++ b/pc4mobx/hrmSalary/stores/index.js @@ -18,6 +18,7 @@ import { DeclareStore } from "./declare"; import { StandingBookStore } from "./StandingBook"; import { PayrollFilesStore } from "./payrollFiles"; import { SpecialAddStore } from "./specialAdd"; +import { ExternalPersonManageStore } from "./externalPersonManage"; module.exports = { baseFormStore: new BaseFormStore(), @@ -39,5 +40,6 @@ module.exports = { declareStore: new DeclareStore(), standingBookStore: new StandingBookStore(), payrollFilesStore: new PayrollFilesStore(), - specialAddStore: new SpecialAddStore() + specialAddStore: new SpecialAddStore(), + externalPersonManageStore: new ExternalPersonManageStore() }; From eb207921cdf70f85a5b9fdc35941c1836de082ce 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, 13 Mar 2023 14:40:19 +0800 Subject: [PATCH 02/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E7=AE=A1=E7=90=86-=E6=96=B0=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/apis/externalPersonManage.js | 27 +++ .../externalPersonManageEditSlide.js | 82 +++++++- .../pages/externalPersonManage/conditions.js | 183 +++++++++--------- .../pages/externalPersonManage/index.js | 116 +++++++++-- 4 files changed, 300 insertions(+), 108 deletions(-) create mode 100644 pc4mobx/hrmSalary/apis/externalPersonManage.js diff --git a/pc4mobx/hrmSalary/apis/externalPersonManage.js b/pc4mobx/hrmSalary/apis/externalPersonManage.js new file mode 100644 index 00000000..91854ebb --- /dev/null +++ b/pc4mobx/hrmSalary/apis/externalPersonManage.js @@ -0,0 +1,27 @@ +import { postFetch } from "../util/request"; +import { WeaTools } from "ecCom"; + +//非系统人员-保存 +export const save = (params) => { + return postFetch("/api/bs/hrmsalary/extEmp/save", params); +}; + +//非系统人员-修改 +export const update = (params) => { + return postFetch("/api/bs/hrmsalary/extEmp/update", params); +}; + +//非系统人员-列表 +export const listPage = (params) => { + return postFetch("/api/bs/hrmsalary/extEmp/listPage", params); +}; + +//非系统人员-删除 +export const deleteExtEmp = (params) => { + return postFetch("/api/bs/hrmsalary/extEmp/delete", params); +}; + +//非系统人员-详情 +export const detail = params => { + return WeaTools.callApi("/api/bs/hrmsalary/extEmp/detail", "get", params); +}; diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js b/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js index 634a7124..6c8d46da 100644 --- a/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js @@ -6,11 +6,86 @@ */ import React, { Component } from "react"; import { WeaSlideModal } from "ecCom"; +import { message } from "antd"; +import { getSearchs } from "../../../util"; import SlideModalTitle from "../../../components/slideModalTitle"; +import { detail, save, update } from "../../../apis/externalPersonManage"; class ExternalPersonManageEditSlide extends Component { + constructor(props) { + super(props); + this.state = { + date: "", + loading: false + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) this.detail(nextProps); + } + + detail = (props) => { + const { form, id } = props; + detail({ id }).then(({ status, data }) => { + if (status) { + const { + departmentName, departmentId, subcompanyName, subcompanyId, + jobtitleName, jobtitleId, ...extraFormfields + } = data; + form.updateFields({ + "departmentId": { + value: departmentId, + valueSpan: departmentName, + valueObj: [{ id: departmentId, name: departmentName }] + } + }); + form.updateFields({ + "subcompanyId": { + value: subcompanyId, + valueSpan: departmentName, + valueObj: [{ id: subcompanyId, name: subcompanyName }] + } + }); + form.updateFields({ + "jobtitleId": { + value: jobtitleId, + valueSpan: jobtitleName, + valueObj: [{ id: jobtitleId, name: jobtitleName }] + } + }); + _.map(_.keys(extraFormfields), item => { + form.updateFields({ [item]: { value: extraFormfields[item] } }, false); + }); + } + }); + }; + + handleSubmit = () => { + const { form, id, onCancel } = this.props; + form.validateForm().then(f => { + if (f.isValid) { + const payload = _.omitBy(form.getFormParams(), _.isEmpty); + this.setState({ loading: true }); + const APIFOX = !id ? save : update; + APIFOX(id ? { ...payload, id } : payload).then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success("创建成功"); + onCancel(true); + } else { + message.error(errormsg || "创建失败"); + } + }).catch(() => this.setState({ loading: false })); + } else { + f.showErrors(); + this.setState({ date: new Date() }); + } + }); + }; + render() { - const { visible, title, onCancel, showOperateBtn } = this.props; + const { loading } = this.state; + const { visible, title, onCancel, showOperateBtn, form, condition } = this.props; return ( console.log(111)} + onSave={this.handleSubmit} /> } - content={null} + content={getSearchs(form, condition, 1)} onClose={onCancel} /> ); diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js b/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js index 6cc054d7..2afc57f0 100644 --- a/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js @@ -29,96 +29,96 @@ export const condition = [ value: "", viewAttr: 3, }, - { - browserConditionParam: { - completeParams: {}, - conditionDataParams: {}, - dataParams: {}, - destDataParams: {}, - hasAddBtn: false, - hasAdvanceSerach: false, - idSeparator: ",", - isAutoComplete: 1, - isDetail: 0, - isMultCheckbox: false, - isSingle: true, - icon: "icon-coms-hrm", - linkUrl: "", - pageSize: 10, - quickSearchName: "", - replaceDatas: [], - title: "部门", - type: "57", - viewAttr: 2, - }, - colSpan: 1, - conditionType: "BROWSER", - domkey: ["departmentId"], - fieldcol: 18, - label: "部门", - labelcol: 6, - viewAttr: 2, - }, - { - browserConditionParam: { - completeParams: {}, - conditionDataParams: {}, - dataParams: {}, - destDataParams: {}, - hasAddBtn: false, - hasAdvanceSerach: false, - idSeparator: ",", - isAutoComplete: 1, - isDetail: 0, - isMultCheckbox: false, - isSingle: true, - icon: "icon-coms-hrm", - linkUrl: "", - pageSize: 10, - quickSearchName: "", - replaceDatas: [], - title: "分部", - type: "164", - viewAttr: 2, - }, - colSpan: 1, - conditionType: "BROWSER", - domkey: ["subcompanyId"], - fieldcol: 18, - label: "分部", - labelcol: 6, - viewAttr: 2, - }, - { - browserConditionParam: { - completeParams: {}, - conditionDataParams: {}, - dataParams: {}, - destDataParams: {}, - hasAddBtn: false, - hasAdvanceSerach: false, - idSeparator: ",", - isAutoComplete: 1, - isDetail: 0, - isMultCheckbox: false, - isSingle: true, - icon: "icon-coms-hrm", - linkUrl: "", - pageSize: 10, - quickSearchName: "", - replaceDatas: [], - title: "岗位", - type: "24", - viewAttr: 2, - }, - colSpan: 1, - conditionType: "BROWSER", - domkey: ["jobtitleId"], - fieldcol: 18, - label: "岗位", - labelcol: 6, - viewAttr: 2, - }, + // { + // browserConditionParam: { + // completeParams: {}, + // conditionDataParams: {}, + // dataParams: {}, + // destDataParams: {}, + // hasAddBtn: false, + // hasAdvanceSerach: false, + // idSeparator: ",", + // isAutoComplete: 1, + // isDetail: 0, + // isMultCheckbox: false, + // isSingle: true, + // icon: "icon-coms-hrm", + // linkUrl: "", + // pageSize: 10, + // quickSearchName: "", + // replaceDatas: [], + // title: "部门", + // type: "57", + // viewAttr: 2, + // }, + // colSpan: 1, + // conditionType: "BROWSER", + // domkey: ["departmentId"], + // fieldcol: 18, + // label: "部门", + // labelcol: 6, + // viewAttr: 2, + // }, + // { + // browserConditionParam: { + // completeParams: {}, + // conditionDataParams: {}, + // dataParams: {}, + // destDataParams: {}, + // hasAddBtn: false, + // hasAdvanceSerach: false, + // idSeparator: ",", + // isAutoComplete: 1, + // isDetail: 0, + // isMultCheckbox: false, + // isSingle: true, + // icon: "icon-coms-hrm", + // linkUrl: "", + // pageSize: 10, + // quickSearchName: "", + // replaceDatas: [], + // title: "分部", + // type: "164", + // viewAttr: 2, + // }, + // colSpan: 1, + // conditionType: "BROWSER", + // domkey: ["subcompanyId"], + // fieldcol: 18, + // label: "分部", + // labelcol: 6, + // viewAttr: 2, + // }, + // { + // browserConditionParam: { + // completeParams: {}, + // conditionDataParams: {}, + // dataParams: {}, + // destDataParams: {}, + // hasAddBtn: false, + // hasAdvanceSerach: false, + // idSeparator: ",", + // isAutoComplete: 1, + // isDetail: 0, + // isMultCheckbox: false, + // isSingle: true, + // icon: "icon-coms-hrm", + // linkUrl: "", + // pageSize: 10, + // quickSearchName: "", + // replaceDatas: [], + // title: "岗位", + // type: "24", + // viewAttr: 2, + // }, + // colSpan: 1, + // conditionType: "BROWSER", + // domkey: ["jobtitleId"], + // fieldcol: 18, + // label: "岗位", + // labelcol: 6, + // viewAttr: 2, + // }, { colSpan: 1, conditionType: "DATEPICKER", @@ -132,7 +132,7 @@ export const condition = [ { colSpan: 1, conditionType: "INPUT", - domkey: ["mobil"], + domkey: ["mobile"], fieldcol: 18, label: "手机", labelcol: 6, @@ -181,5 +181,6 @@ export const condition = [ }, ], defaultshow: true, + title: "基本信息" }, ]; diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/index.js b/pc4mobx/hrmSalary/pages/externalPersonManage/index.js index d2c6eeba..1ab229c2 100644 --- a/pc4mobx/hrmSalary/pages/externalPersonManage/index.js +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/index.js @@ -8,9 +8,11 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { WeaTab, WeaTop } from "ecCom"; import ExternalPersonManageEditSlide from "./components/externalPersonManageEditSlide"; -import { Button } from "antd"; +import { Button, message, Modal } from "antd"; import { getSearchs } from "../../util"; import { condition, searchCondition } from "./conditions"; +import UnifiedTable from "../../components/UnifiedTable"; +import { deleteExtEmp, listPage } from "../../apis/externalPersonManage"; import "./index.less"; @inject("externalPersonManageStore", "taxAgentStore") @@ -19,9 +21,12 @@ class Index extends Component { constructor(props) { super(props); this.state = { + loading: false, + selectedRowKeys: [], + pageInfo: { current: 1, pageSize: 10, total: 0 }, showSearchAd: false, externalPersonManagePayload: { - visible: false, title: "新建" + visible: false, title: "新建", id: "" } }; } @@ -30,33 +35,92 @@ class Index extends Component { const { externalPersonManageStore: { form, addForm } } = this.props; form.initFormFields(searchCondition); addForm.initFormFields(condition); + this.listPage(); } - handleCancel = () => { + listPage = () => { + const { pageInfo } = this.state; + const { externalPersonManageStore: { form } } = this.props; + const payload = { ...pageInfo, ...form.getFormParams() }; + listPage(payload).then(({ status, data }) => { + if (status) { + const { list: dataSource, columns, pageNum: current, pageSize, total } = data; + this.setState({ + dataSource, columns, + pageInfo: { ...pageInfo, current, pageSize, total } + }); + } + }); + }; + deleteExtEmp = (ids) => { + deleteExtEmp(ids).then(({ status, errormsg }) => { + if (status) { + message.success("删除成功"); + this.listPage(); + } else { + message.error(errormsg || "删除失败"); + } + }); + }; + handleDelete = (id) => { + Modal.confirm({ + title: "信息确认", + content: "确定删除吗", + onOk: () => this.deleteExtEmp([id]) + }); + }; + handleCancel = (isRefresh) => { const { externalPersonManagePayload } = this.state; const { externalPersonManageStore: { addForm } } = this.props; addForm.resetForm(); this.setState({ externalPersonManagePayload: { ...externalPersonManagePayload, - visible: false, title: "新建" + visible: false, title: "新建", id: "" } - }); + }, () => isRefresh && this.listPage()); }; - handleAdd = () => { + handleAdd = (id = "") => { const { externalPersonManagePayload } = this.state; this.setState({ externalPersonManagePayload: { ...externalPersonManagePayload, - visible: true + visible: true, id, title: id ? "编辑" : "新建" } }); }; - + getColumns = () => { + const { columns } = this.state; + return _.map(_.filter(columns, item => !!item.display), child => ({ + ...child, + render: (text) => { + return {text}; + } + })); + }; render() { - const { showSearchAd, externalPersonManagePayload } = this.state; + const { showSearchAd, externalPersonManagePayload, loading, pageInfo, selectedRowKeys, dataSource } = this.state; const { externalPersonManageStore: { form, addForm }, taxAgentStore: { showOperateBtn } } = this.props; + const pagination = { + current: pageInfo.current, + pageSize: pageInfo.pageSize, + total: pageInfo.total, + showTotal: total => `共 ${total} 条`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.listPage()); + }, + onChange: current => { + this.setState({ pageInfo: { ...pageInfo, current } }, () => this.listPage()); + } + }; + const rowSelection = { + selectedRowKeys, + onChange: selectedRowKeys => this.setState({ selectedRowKeys }) + }; return (
新建 - ]} + buttons={showOperateBtn ? [ + + ] : []} searchType={["base", "advanced"]} showSearchAd={showSearchAd} setShowSearchAd={(showSearchAd) => this.setState({ showSearchAd })} searchsAd={getSearchs(form, searchCondition, 2)} - searchsBasePlaceHolder="请输入姓名" + searchsBasePlaceHolder="请输入姓名" onSearch={this.listPage} onSearchChange={username => form.updateFields({ username })} searchsBaseValue={form.getFormParams().username} + onAdSearch={() => this.setState({ showSearchAd: false }, () => this.listPage())} + onAdReset={() => form.resetForm()} onAdCancel={() => this.setState({ showSearchAd: false })} + /> + ( + + this.handleAdd(id)} + style={{ paddingRight: 8 }}>编辑 + this.handleDelete(id)}>删除 + + ) + } + ] : []} + dataSource={dataSource} + pagination={pagination} + rowSelection={rowSelection} + xWidth={this.getColumns().length * 120} />
From efadb541f5c00329b28ebef1d9ef740e01c37605 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, 14 Mar 2023 18:14:23 +0800 Subject: [PATCH 03/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E7=AE=A1=E7=90=86-=E6=96=B0=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/ledger.js | 33 ++++ pc4mobx/hrmSalary/apis/taxAgent.js | 12 ++ .../components/externalPersonModal/index.js | 86 ++++++++++ .../externalPersonManageEditSlide.js | 8 +- .../components/ledgerAssociatedPersonnel.js | 115 ++++++++++--- pc4mobx/hrmSalary/pages/taxAgent/editModal.js | 2 + pc4mobx/hrmSalary/pages/taxAgent/index.less | 43 +++++ .../hrmSalary/pages/taxAgent/personalScope.js | 161 +++++++++++++----- .../pages/taxAgent/slideTaxagentUser.js | 73 ++++---- pc4mobx/hrmSalary/stores/taxAgent.js | 16 ++ 10 files changed, 444 insertions(+), 105 deletions(-) create mode 100644 pc4mobx/hrmSalary/components/externalPersonModal/index.js diff --git a/pc4mobx/hrmSalary/apis/ledger.js b/pc4mobx/hrmSalary/apis/ledger.js index b04e881e..834a6c47 100644 --- a/pc4mobx/hrmSalary/apis/ledger.js +++ b/pc4mobx/hrmSalary/apis/ledger.js @@ -71,6 +71,17 @@ export const saveLedgerBasic = params => { }).then(res => res.json()); }; +//薪资帐套外部人员范围(包含)列表 +export const getLedgerPersonRangeExtList = params => { + return fetch("/api/bs/hrmsalary/salarysob/range/ext/list", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //薪资帐套人员范围(包含)列表 export const getLedgerPersonRangeInclude = params => { return fetch("/api/bs/hrmsalary/salarysob/range/listInclude", { @@ -104,6 +115,28 @@ export const getLedgerPersonRangeForm = params => { ); }; +//保存薪资帐套外部人员范围 +export const saveLedgerPersonExtRange = params => { + return fetch("/api/bs/hrmsalary/salarysob/ext/save", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; +//删除薪资帐套外部人员范围 +export const deleteLedgerPersonExtRange = params => { + return fetch("/api/bs/hrmsalary/salarysob/range/ext/delete", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //保存薪资帐套人员范围 export const saveLedgerPersonRange = params => { return fetch("/api/bs/hrmsalary/salarysob/range/save", { diff --git a/pc4mobx/hrmSalary/apis/taxAgent.js b/pc4mobx/hrmSalary/apis/taxAgent.js index 5f2b86ee..25747f12 100644 --- a/pc4mobx/hrmSalary/apis/taxAgent.js +++ b/pc4mobx/hrmSalary/apis/taxAgent.js @@ -70,6 +70,18 @@ export const deleteTaxAgent = (params) => { export const taxAgentRangeSave = (params) => { return postFetch("/api/bs/hrmsalary/taxAgent/range/save", params); }; +//非系统人员范围查询 +export const taxAgentRangelistExt = (params) => { + return postFetch("/api/bs/hrmsalary/taxAgent/range/listExt", params); +}; +//非系统人员范围删除 +export const taxAgentRangeExtDelete = (params) => { + return postFetch("/api/bs/hrmsalary/taxAgent/range/ext/delete", params); +}; +//非系统人员范围保存 +export const taxAgentRangeExtSave = (params) => { + return postFetch("/api/bs/hrmsalary/taxAgent/range/ext/save", params); +}; //人员范围删除 export const taxAgentRangeDelete = (params) => { return postFetch("/api/bs/hrmsalary/taxAgent/range/delete", params); diff --git a/pc4mobx/hrmSalary/components/externalPersonModal/index.js b/pc4mobx/hrmSalary/components/externalPersonModal/index.js new file mode 100644 index 00000000..1d9e17ec --- /dev/null +++ b/pc4mobx/hrmSalary/components/externalPersonModal/index.js @@ -0,0 +1,86 @@ +/* + * Author: 黎永顺 + * name: 外部人员添加弹框 + * Description: + * Date: 2023/3/14 + */ +import React, { Component } from "react"; +import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup } from "ecCom"; +import { Button, Modal } from "antd"; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + targetIds: "", + targetNames: "" + }; + } + + handleExternalPersonSave = () => { + const { targetIds } = this.state; + const { onExternalPersonSave } = this.props; + if (!_.isEmpty(targetIds)) { + onExternalPersonSave({ targetIds: targetIds.split(",") }); + } else { + Modal.warning({ + title: "信息确认", + content: "必要信息不完整,红色*为必填项!" + }); + } + }; + + render() { + const { targetIds, targetNames } = this.state; + const { onCancel, visible, loading } = this.props; + const buttons = [ + , + + ]; + return ( + + + + this.setState({ targetIds, targetNames })} + /> + + + + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js b/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js index 6c8d46da..f8d165f9 100644 --- a/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js @@ -21,7 +21,7 @@ class ExternalPersonManageEditSlide extends Component { } componentWillReceiveProps(nextProps, nextContext) { - if (nextProps.visible !== this.props.visible && nextProps.visible) this.detail(nextProps); + if (nextProps.visible !== this.props.visible && nextProps.visible && nextProps.id) this.detail(nextProps); } detail = (props) => { @@ -61,7 +61,7 @@ class ExternalPersonManageEditSlide extends Component { }; handleSubmit = () => { - const { form, id, onCancel } = this.props; + const { form, id, onCancel, title } = this.props; form.validateForm().then(f => { if (f.isValid) { const payload = _.omitBy(form.getFormParams(), _.isEmpty); @@ -70,10 +70,10 @@ class ExternalPersonManageEditSlide extends Component { APIFOX(id ? { ...payload, id } : payload).then(({ status, errormsg }) => { this.setState({ loading: false }); if (status) { - message.success("创建成功"); + message.success(`${title}成功`); onCancel(true); } else { - message.error(errormsg || "创建失败"); + message.error(errormsg || `${title}失败`); } }).catch(() => this.setState({ loading: false })); } else { diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js index d3660ebe..ae587725 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js @@ -11,19 +11,24 @@ import { WeaButtonIcon, WeaInputSearch, WeaTab } from "ecCom"; import PersonalScopeTable from "../../../components/PersonalScopeTable"; import PersonalScopeModal from "../../../components/PersonalScopeModal"; import { + deleteLedgerPersonExtRange, deleteLedgerPersonRange, getLedgerPersonRangeExclude, + getLedgerPersonRangeExtList, getLedgerPersonRangeInclude, salarysobRangeImportData, salarysobRangePreview, + saveLedgerPersonExtRange, saveLedgerPersonRange } from "../../../apis/ledger"; import ImportModal from "../../../components/importModal"; import { importEmployColumns } from "../../taxAgent/columns"; +import ExternalPersonModal from "../../../components/externalPersonModal"; const APIFox = { listInclude: getLedgerPersonRangeInclude, - listExclude: getLedgerPersonRangeExclude + listExclude: getLedgerPersonRangeExclude, + externalList: getLedgerPersonRangeExtList }; const APISaveFox = { save: saveLedgerPersonRange @@ -39,6 +44,8 @@ class LedgerAssociatedPersonnel extends Component { selectedKey: "listInclude", rowKeys: [], previewDataSource: [], + externalPersonModalVisible: false, + loading: false, importParams: { visible: false, step: 0, @@ -52,6 +59,25 @@ class LedgerAssociatedPersonnel extends Component { }; } + /* + * Author: 黎永顺 + * Description:外部人员保存 + * Params: + * Date: 2023/3/14 + */ + handleSaveExternalPerson = (val) => { + const { editId: salarySobId } = this.props; + saveLedgerPersonExtRange({ ...val, salarySobId }).then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success("保存成功"); + this.setState({ externalPersonModalVisible: false }); + this.personalScopeTableRef.getPersonalScopeList(); + } else { + message.error(errormsg || "保存失败"); + } + }).catch(() => this.setState({ loading: true })); + }; /* * Author: 黎永顺 * Description: 删除人员范围 @@ -59,23 +85,55 @@ class LedgerAssociatedPersonnel extends Component { * Date: 2022/11/30 */ taxAgentRangeDelete = () => { + const { selectedKey } = this.state; Modal.confirm({ title: "信息确认", content: "确认要删除吗?", onOk: () => { - deleteLedgerPersonRange(this.state.rowKeys).then(({ status, errormsg }) => { - if (status) { - message.success("删除成功"); - this.setState({ rowKeys: [] }, () => { - this.personalScopeTableRef.clearRowkeys(); - }); - } else { - message.error(errormsg || "删除失败"); - } - }); + return new Promise((resolve, reject) => { + return selectedKey === "externalList" ? this.deleteLedgerPersonExtRange(resolve, reject) : this.deleteLedgerPersonRange(resolve, reject); + }).catch(() => console.log("出错!")); } }); }; + deleteLedgerPersonExtRange = (resolve, reject) => { + message.destroy(); + message.loading("正在删除中...", 0); + deleteLedgerPersonExtRange(this.state.rowKeys).then(({ status, errormsg }) => { + message.destroy(); + resolve(); + if (status) { + message.success("删除成功"); + this.setState({ rowKeys: [] }, () => { + this.personalScopeTableRef.clearRowkeys(); + }); + } else { + message.error(errormsg || "删除失败"); + } + }).catch(() => { + message.destroy(); + reject(); + }); + }; + deleteLedgerPersonRange = (resolve, reject) => { + message.destroy(); + message.loading("正在删除中...", 0); + deleteLedgerPersonRange(this.state.rowKeys).then(({ status, errormsg }) => { + message.destroy(); + resolve(); + if (status) { + message.success("删除成功"); + this.setState({ rowKeys: [] }, () => { + this.personalScopeTableRef.clearRowkeys(); + }); + } else { + message.error(errormsg || "删除失败"); + } + }).catch(() => { + message.destroy(); + reject(); + }); + }; /* * Author: 黎永顺 * Description:新增人员范围 @@ -84,13 +142,17 @@ class LedgerAssociatedPersonnel extends Component { */ handleAddPersonal = () => { const { personalAddModal, selectedKey } = this.state; - this.setState({ - personalAddModal: { - ...personalAddModal, - visible: true, - includeType: selectedKey === "listInclude" ? 1 : 0 - } - }); + if (selectedKey === "externalList") { + this.setState({ externalPersonModalVisible: true }); + } else { + this.setState({ + personalAddModal: { + ...personalAddModal, + visible: true, + includeType: selectedKey === "listInclude" ? 1 : 0 + } + }); + } }; /* * Author: 黎永顺 @@ -138,7 +200,9 @@ class LedgerAssociatedPersonnel extends Component { rowKeys, personalAddModal, importParams, - previewDataSource + previewDataSource, + externalPersonModalVisible, + loading } = this.state; const { taxAgentStore: { showOperateBtn }, editId, saveSalarySobId } = this.props; const topTab = [ @@ -149,6 +213,10 @@ class LedgerAssociatedPersonnel extends Component { { title: "从范围中排除", viewcondition: "listExclude" + }, + { + title: "非系统人员范围", + viewcondition: "externalList" } ]; const btns = showOperateBtn ? [ @@ -192,7 +260,7 @@ class LedgerAssociatedPersonnel extends Component { datas={topTab} keyParam="viewcondition" //主键 selectedKey={selectedKey} - buttons={showOperateBtn && selectedKey === "listExclude" ? btns.slice(1) : btns} + buttons={showOperateBtn && selectedKey === "listInclude" ? btns : btns.slice(1)} onChange={selectedKey => this.setState({ selectedKey })} /> )} + {/*非系统人员添加*/} + this.setState({ externalPersonModalVisible: false })} + onExternalPersonSave={this.handleSaveExternalPerson} + /> {/*新增人员范围*/} } initLoadCss + className="taxagentModalWrapper" visible={visible} style={{ width: 800, height: 450 }} hasScroll> diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.less b/pc4mobx/hrmSalary/pages/taxAgent/index.less index efc466ba..0f42ec4b 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/index.less +++ b/pc4mobx/hrmSalary/pages/taxAgent/index.less @@ -108,3 +108,46 @@ } } } + +.taxagentModalWrapper { + .topMenuWrapper { + height: 47px; + line-height: 47px; + padding: 0 10px; + display: flex; + justify-content: space-between; + + .topMenuTabWrapper { + display: flex; + align-items: center; + + .menuTabItem { + height: 24px; + padding: 0 16px; + border-radius: 3px; + margin-right: 6px; + display: flex; + align-items: center; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + flex: 1 1 auto; + line-height: normal; + } + + .menuTabItem:hover { + color: #5d9cec; + background: #e9f7ff; + } + + .active { + color: #5d9cec; + background: #e9f7ff; + } + } + } +} diff --git a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js index 767822a1..2a2de5dd 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js @@ -18,6 +18,7 @@ export default class PersonalScope extends Component { constructor(props) { super(props); this.state = { + deleteLoading: false, queryLoading: false, submitLoading: false, targetTypeList: [], @@ -46,7 +47,6 @@ export default class PersonalScope extends Component { } }); }; - getTaxAgentRangeListInclude = (pageModule = {}) => { const { taxAgentId } = this.props; const { getTaxAgentRangeListInclude } = this.props.taxAgentStore; @@ -75,6 +75,35 @@ export default class PersonalScope extends Component { } ); }; + + taxAgentRangelistExt = (pageModule = {}) => { + const { taxAgentId } = this.props; + const { taxAgentRangelistExt } = this.props.taxAgentStore; + this.setState({ queryLoading: true }); + taxAgentRangelistExt({ ...pageModule, taxAgentId }).then( + ({ status, data }) => { + this.setState({ queryLoading: false }); + if (status && !_.isEmpty(data)) { + const { + columns, + list: dataSource, + pageNum: current, + pageSize, + total + } = data; + this.setState({ + columns, + dataSource, + pageObj: { + current, + pageSize, + total + } + }); + } + } + ); + }; getTaxAgentRangeListExclude = (pageModule = {}) => { const { taxAgentId } = this.props; const { getTaxAgentRangeListExclude } = this.props.taxAgentStore; @@ -105,17 +134,93 @@ export default class PersonalScope extends Component { }; taxAgentRangeDelete = ({ ids, tab }) => { - const { taxAgentRangeDelete } = this.props.taxAgentStore; - const { pageObj } = this.state; Modal.confirm({ title: "信息确认", content: `确认删除该条数据吗?`, onOk: () => { - taxAgentRangeDelete(ids).then(({ status, errorMsg }) => { + return new Promise((resolve, reject) => { + return tab == "2" ? this.taxAgentExtRangeDeleteComfirm(resolve, reject, ids) : this.taxAgentRangeDeleteComfirm(resolve, reject, ids, tab); + }).catch(() => console.log("出错!")); + } + }); + }; + taxAgentExtRangeDeleteComfirm = (resolve, reject, ids) => { + const { taxAgentRangeExtDelete } = this.props.taxAgentStore; + const { pageObj } = this.state; + message.destroy(); + message.loading("正在删除中...", 0); + taxAgentRangeExtDelete(ids).then(({ status, errormsg }) => { + message.destroy(); + resolve(); + if (status) { + this.tagAgentRef.onSelectChange([]); + message.success("删除成功"); + this.taxAgentRangelistExt({ + current: pageObj.current, + pageSize: pageObj.pageSize + }); + } else { + message.error(errormsg || "删除失败"); + } + }).catch(() => { + message.destroy(); + reject(); + }); + }; + taxAgentRangeDeleteComfirm = (resolve, reject, ids, tab) => { + const { taxAgentRangeDelete } = this.props.taxAgentStore; + const { pageObj } = this.state; + message.destroy(); + message.loading("正在删除中...", 0); + taxAgentRangeDelete(ids).then(({ status, errormsg }) => { + message.destroy(); + resolve(); + if (status) { + this.tagAgentRef.onSelectChange([]); + message.success("删除成功"); + tab == "1" + ? this.getTaxAgentRangeListInclude({ + current: pageObj.current, + pageSize: pageObj.pageSize + }) + : this.getTaxAgentRangeListExclude({ + current: pageObj.current, + pageSize: pageObj.pageSize + }); + } else { + message.error(errormsg || "删除失败"); + } + }).catch(() => { + message.destroy(); + reject(); + }); + }; + + taxAgentRangeSave = (module) => { + const { taxAgentId } = this.props; + const { pageObj } = this.state; + const { includeType } = module; + const { taxAgentRangeSave, taxAgentRangeExtSave } = this.props.taxAgentStore; + this.setState({ submitLoading: true }); + if (includeType === 2) { + taxAgentRangeExtSave({ taxAgentId, ..._.pick(module, "targetIds") }).then(({ status, errormsg }) => { + this.setState({ submitLoading: false }); + if (status) { + this.tagAgentRef.closeModal(); + message.success("新增成功"); + this.taxAgentRangelistExt({ current: pageObj.current, pageSize: pageObj.pageSize }); + } else { + message.error(errormsg || "新增失败"); + } + }); + } else { + taxAgentRangeSave({ ...module, taxAgentId }).then( + ({ status, errormsg }) => { + this.setState({ submitLoading: false }); if (status) { - this.tagAgentRef.onSelectChange([]); - message.success("删除成功"); - tab == "1" + this.tagAgentRef.closeModal(); + message.success("新增成功"); + includeType == "1" ? this.getTaxAgentRangeListInclude({ current: pageObj.current, pageSize: pageObj.pageSize @@ -125,41 +230,11 @@ export default class PersonalScope extends Component { pageSize: pageObj.pageSize }); } else { - message.error(errorMsg || "删除失败"); + message.error(errormsg || "新增失败"); } - }); - }, - onCancel() { - } - }); - }; - - taxAgentRangeSave = (module) => { - const { taxAgentId } = this.props; - const { pageObj } = this.state; - const { includeType } = module; - const { taxAgentRangeSave } = this.props.taxAgentStore; - this.setState({ submitLoading: true }); - taxAgentRangeSave({ ...module, taxAgentId }).then( - ({ status, errormsg }) => { - this.setState({ submitLoading: false }); - if (status) { - this.tagAgentRef.closeModal(); - message.success("新增成功"); - includeType == "1" - ? this.getTaxAgentRangeListInclude({ - current: pageObj.current, - pageSize: pageObj.pageSize - }) - : this.getTaxAgentRangeListExclude({ - current: pageObj.current, - pageSize: pageObj.pageSize - }); - } else { - message.error(errormsg || "新增失败"); } - } - ); + ); + } }; render() { @@ -209,12 +284,14 @@ export default class PersonalScope extends Component { onTaxAngetSearch={({ targetName, tab }) => { tab == "1" ? this.getTaxAgentRangeListInclude({ targetName }) - : this.getTaxAgentRangeListExclude({ targetName }); + : tab == "0" ? this.getTaxAgentRangeListExclude({ targetName }) : + this.taxAgentRangelistExt({ targetName }); }} onChangeTab={(tab) => { + this.tagAgentRef.onSelectChange([]); tab == "1" ? this.getTaxAgentRangeListInclude() - : this.getTaxAgentRangeListExclude(); + : tab == "0" ? this.getTaxAgentRangeListExclude() : this.taxAgentRangelistExt(); }} />
diff --git a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js index ab52e298..24f73077 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js @@ -5,12 +5,14 @@ import AddTaxAgentModal from "./addTaxAgentModal"; import ImportModal from "../../components/importModal"; import { taxAgentRangeImportData, taxAgentRangePreview } from "../../apis/taxAgent"; import { importEmployColumns } from "./columns"; - +import ExternalPersonModal from "../../components/externalPersonModal"; +import cs from "classnames"; export default class SlideTaxagentUser extends React.Component { constructor(props) { super(props); this.state = { + externalPersonModalVisible: false, //外部人员关联弹框 addTaxagentModalVisible: false, includeType: 1, selectedRowKeys: [], @@ -42,8 +44,8 @@ export default class SlideTaxagentUser extends React.Component { handleTabDelete = () => { const { onDeleteTaxAgent } = this.props; - const { includeType } = this.state; - if (this.state.selectedRowKeys.length == 0) { + const { includeType, selectedRowKeys } = this.state; + if (selectedRowKeys.length === 0) { message.warning("未选择条目"); return; } @@ -61,9 +63,10 @@ export default class SlideTaxagentUser extends React.Component { closeModal = () => { this.setState({ - addTaxagentModalVisible: false + addTaxagentModalVisible: false, + externalPersonModalVisible: false }, () => { - this.addTaxRef.handleReset(); + this.addTaxRef && this.addTaxRef.handleReset(); }); }; handleInitModal = () => { @@ -107,6 +110,7 @@ export default class SlideTaxagentUser extends React.Component { selectedRowKeys, searchValue, addTaxagentModalVisible, + externalPersonModalVisible, importParams, previewDataSource } = this.state; @@ -155,39 +159,23 @@ export default class SlideTaxagentUser extends React.Component { return (
-
-
+
+
{ - this.handleTabClick(1); - }}> + className={cs("menuTabItem", { "active": includeType == 1 })} + onClick={() => this.handleTabClick(1)}> 人员范围 - | { - this.handleTabClick(0); - }}> + + this.handleTabClick(0)}> 从范围中排除 + this.handleTabClick(2)}> + 非系统人员范围 +
@@ -226,6 +215,7 @@ export default class SlideTaxagentUser extends React.Component {
{ this.setState({ searchValue: value }); @@ -246,7 +236,12 @@ export default class SlideTaxagentUser extends React.Component { pagination={pagination} />
- + this.setState({ externalPersonModalVisible: false })} + onExternalPersonSave={val => onTaxAgentSave({ ...val, includeType: includeType })} + /> this.addTaxRef = ref} loading={submitLoading} diff --git a/pc4mobx/hrmSalary/stores/taxAgent.js b/pc4mobx/hrmSalary/stores/taxAgent.js index 7d95a81a..02d3feb6 100644 --- a/pc4mobx/hrmSalary/stores/taxAgent.js +++ b/pc4mobx/hrmSalary/stores/taxAgent.js @@ -4,6 +4,7 @@ import { WeaForm, WeaTableNew } from "comsMobx"; import * as API from "../apis/taxAgent"; // 引入API接口文件 import { decentralizationConditions, editConditions } from "../pages/taxAgent/editConditions"; +import { taxAgentRangeExtDelete } from "../apis/taxAgent"; const { TableStore } = WeaTableNew; @@ -163,6 +164,21 @@ export class TaxAgentStore { getTaxAgentRangeForm = params => { return API.getTaxAgentRangeForm(params); }; + // 非系统人员范围保存 + @action + taxAgentRangeExtSave = params => { + return API.taxAgentRangeExtSave(params); + }; + // 非系统人员范围查询 + @action + taxAgentRangelistExt = params => { + return API.taxAgentRangelistExt(params); + }; + // 非系统人员范围删除 + @action + taxAgentRangeExtDelete = params => { + return API.taxAgentRangeExtDelete(params); + }; // 人员范围保存 @action taxAgentRangeSave = params => { From e14ebaacad55b9796426cf105842a77d8b0cde51 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, 15 Mar 2023 14:21:26 +0800 Subject: [PATCH 04/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E7=AE=A1=E7=90=86=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../payrollFiles/components/importMenu.js | 7 ++-- .../pages/payrollFiles/config/index.js | 7 ++++ pc4mobx/hrmSalary/pages/payrollFiles/index.js | 32 ++++++++++++++++--- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js index 74dd4b0e..90de4d67 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js @@ -26,7 +26,7 @@ class ImportMenu extends Component { params.listType = "FIXED"; } else { params.listType = this.state.importParams.importType; - params.importType = ''; + params.importType = ""; } API.salaryArchivePreview(params).then(({ status, data }) => { if (status) { @@ -92,14 +92,15 @@ class ImportMenu extends Component { }; // 导入档案 handleImportFile = (params) => { + const { isExtEmp = false } = this.props; if (this.state.importParams.importType === "init" || this.state.importParams.importType === "salaryItemAdjust") { params.importType = this.state.importParams.importType; params.listType = "FIXED"; } else { - params.importType = ''; + params.importType = ""; params.listType = this.state.importParams.importType; } - API.importSalaryArchive(params).then(({ status, data }) => { + API.importSalaryArchive({ ...params, isExtEmp }).then(({ status, data }) => { if (status) { data.errorData = data.errorNotice; this.setState({ diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js index 5440dcd5..89fdab3f 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js @@ -26,5 +26,12 @@ export const tabCondition = [ showcount: true, title: "停薪员工", viewcondition: "stop" + }, + { + color: "#000000", + groupid: "EXT", + showcount: false, + title: "非系统人员", + viewcondition: "ext" } ]; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index e52b9e38..1c642e24 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -441,6 +441,27 @@ class Index extends Component { }}/> ]; + } else if (selectedKey === "ext" && showOperateBtn) { + return [ + } + placement="topLeft" + />, + { + this.query(); + this.setState({ selectedRowKeys: [] }); + }}/> + }> + + + ]; } return []; }; @@ -486,7 +507,7 @@ class Index extends Component {
; - } else if (selectedKey === "fixed") { + } else if (selectedKey === "fixed" || selectedKey === "ext") { return this.handleEdit(record)}>调薪; } else if (selectedKey === "suspend") { return
@@ -579,7 +600,7 @@ class Index extends Component { window.open(`${linkUrl}&salaryArchiveId=${id}`); }}>发起调薪); } - if (showOperateBtn && selectedKey === "fixed") { + if (showOperateBtn && (selectedKey === "fixed" || selectedKey === "ext")) { arrList.push(); @@ -624,7 +645,7 @@ class Index extends Component { salaryItemId: it.id, adjustValue: String(it.value || "") })), - status: _.upperCase(selectedKey) + status: selectedKey === "ext" ? "FIXED" : _.upperCase(selectedKey) }; API.savePaySet(payload).then(({ status, errormsg }) => { if (status) { @@ -657,8 +678,11 @@ class Index extends Component { case "suspend": this.queryList("/api/bs/hrmsalary/salaryArchive/suspendList"); break; + case "stop": + this.queryList("/api/bs/hrmsalary/salaryArchive/suspendList"); + break; default: - this.queryList("/api/bs/hrmsalary/salaryArchive/stopList"); + this.queryList("/api/bs/hrmsalary/salaryArchive/extList"); break; } }; From 49fb95755090a1803b7435c0b67e5992e93931c3 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, 16 Mar 2023 09:05:34 +0800 Subject: [PATCH 05/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=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/calculateDetail/userSure.js | 25 +++ .../externalPersonManageEditSlide.js | 39 ++++- .../pages/externalPersonManage/conditions.js | 164 ++++++++++-------- .../components/ledgerAssociatedPersonnel.js | 4 +- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 2 +- pc4mobx/hrmSalary/util/index.js | 68 ++++---- 6 files changed, 185 insertions(+), 117 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js index e74a8d8a..d0701591 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js @@ -497,6 +497,31 @@ export default class UserSure extends React.Component { title="提示:环比上期当前选择的账套归档的各个税扣缴义务人下增加的人员" placement="topLeft" /> + | + { + this.setState({ selectedKey: "3" }, () => { + const childFrameObj = document.getElementById("atdTable"); + const salaryAcctRecordId = getQueryString("id"); + const payload = { + type: "PC", + listType: "MA", + url: "/api/bs/hrmsalary/salaryacct/addedemployee/list", + queryParams: { + salaryAcctRecordId, + employeeName: this.state.userListSearchValue + } + }; + childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); + }); + }}> + 非系统人员 +
{ if (status) { const { - departmentName, departmentId, subcompanyName, subcompanyId, - jobtitleName, jobtitleId, ...extraFormfields + departmentOrgName, departmentId, subcompanyOrgName, subcompanyId, + jobtitleOrgName, jobtitleId, ...extraFormfields } = data; form.updateFields({ "departmentId": { value: departmentId, - valueSpan: departmentName, - valueObj: [{ id: departmentId, name: departmentName }] + valueSpan: departmentOrgName, + valueObj: [{ id: departmentId, name: departmentOrgName }] } }); form.updateFields({ "subcompanyId": { value: subcompanyId, - valueSpan: departmentName, - valueObj: [{ id: subcompanyId, name: subcompanyName }] + valueSpan: subcompanyOrgName, + valueObj: [{ id: subcompanyId, name: subcompanyOrgName }] } }); form.updateFields({ "jobtitleId": { value: jobtitleId, - valueSpan: jobtitleName, - valueObj: [{ id: jobtitleId, name: jobtitleName }] + valueSpan: jobtitleOrgName, + valueObj: [{ id: jobtitleId, name: jobtitleOrgName }] } }); _.map(_.keys(extraFormfields), item => { @@ -64,6 +64,20 @@ class ExternalPersonManageEditSlide extends Component { const { form, id, onCancel, title } = this.props; form.validateForm().then(f => { if (f.isValid) { + const tmpV = _.reduce(_.keys(form.getFormDatas()), (pre, cur) => { + if (cur === "departmentId") { + return _.assign(pre, { + [cur]: form.getFormDatas()[cur].value, + departmentName: form.getFormDatas()["departmentId"].valueSpan + }); + } else if (cur === "subcompanyId") { + return _.assign(pre, { + [cur]: form.getFormDatas()[cur].value, + subcompanyName: form.getFormDatas()["subcompanyId"].valueSpan + }); + } + return _.assign(pre, { [cur]: form.getFormDatas()[cur].value }); + }, {}); const payload = _.omitBy(form.getFormParams(), _.isEmpty); this.setState({ loading: true }); const APIFOX = !id ? save : update; @@ -82,6 +96,13 @@ class ExternalPersonManageEditSlide extends Component { } }); }; + handleFormChange = (res) => { + const { form, id } = this.props; + if (!id && (_.keys(res)[0] === "departmentId" || _.keys(res)[0] === "subcompanyId")) { + const key = _.replace(_.keys(res)[0], "Id", "Name"); + form.updateFields({ [key]: res[_.keys(res)[0]].valueSpan || "" }); + } + }; render() { const { loading } = this.state; @@ -106,7 +127,7 @@ class ExternalPersonManageEditSlide extends Component { onSave={this.handleSubmit} /> } - content={getSearchs(form, condition, 1)} + content={getSearchs(form, condition, 1, false, this.handleFormChange)} onClose={onCancel} /> ); diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js b/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js index 2afc57f0..f150bfdc 100644 --- a/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js @@ -9,11 +9,11 @@ export const searchCondition = [ label: "姓名", labelcol: 8, value: "", - viewAttr: 2, + viewAttr: 2 } ], - defaultshow: true, - }, + defaultshow: true + } ]; export const condition = [ { @@ -27,68 +27,88 @@ export const condition = [ label: "姓名", labelcol: 6, value: "", - viewAttr: 3, + viewAttr: 3 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: true, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "部门", + type: "57", + viewAttr: 2 + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["departmentId"], + fieldcol: 18, + label: "部门", + labelcol: 6, + viewAttr: 2 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["departmentName"], + fieldcol: 18, + label: "部门名称", + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: true, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "分部", + type: "164", + viewAttr: 2 + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["subcompanyId"], + fieldcol: 18, + label: "分部", + labelcol: 6, + viewAttr: 2 + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["subcompanyName"], + fieldcol: 18, + label: "分部名称", + labelcol: 6, + value: "", + viewAttr: 2 }, - // { - // browserConditionParam: { - // completeParams: {}, - // conditionDataParams: {}, - // dataParams: {}, - // destDataParams: {}, - // hasAddBtn: false, - // hasAdvanceSerach: false, - // idSeparator: ",", - // isAutoComplete: 1, - // isDetail: 0, - // isMultCheckbox: false, - // isSingle: true, - // icon: "icon-coms-hrm", - // linkUrl: "", - // pageSize: 10, - // quickSearchName: "", - // replaceDatas: [], - // title: "部门", - // type: "57", - // viewAttr: 2, - // }, - // colSpan: 1, - // conditionType: "BROWSER", - // domkey: ["departmentId"], - // fieldcol: 18, - // label: "部门", - // labelcol: 6, - // viewAttr: 2, - // }, - // { - // browserConditionParam: { - // completeParams: {}, - // conditionDataParams: {}, - // dataParams: {}, - // destDataParams: {}, - // hasAddBtn: false, - // hasAdvanceSerach: false, - // idSeparator: ",", - // isAutoComplete: 1, - // isDetail: 0, - // isMultCheckbox: false, - // isSingle: true, - // icon: "icon-coms-hrm", - // linkUrl: "", - // pageSize: 10, - // quickSearchName: "", - // replaceDatas: [], - // title: "分部", - // type: "164", - // viewAttr: 2, - // }, - // colSpan: 1, - // conditionType: "BROWSER", - // domkey: ["subcompanyId"], - // fieldcol: 18, - // label: "分部", - // labelcol: 6, - // viewAttr: 2, - // }, // { // browserConditionParam: { // completeParams: {}, @@ -127,7 +147,7 @@ export const condition = [ label: "入职日期", labelcol: 6, value: "", - viewAttr: 2, + viewAttr: 2 }, { colSpan: 1, @@ -137,7 +157,7 @@ export const condition = [ label: "手机", labelcol: 6, value: "", - viewAttr: 2, + viewAttr: 2 }, { colSpan: 1, @@ -147,7 +167,7 @@ export const condition = [ label: "工号", labelcol: 6, value: "", - viewAttr: 2, + viewAttr: 2 }, { colSpan: 1, @@ -157,7 +177,7 @@ export const condition = [ label: "身份证号码", labelcol: 6, value: "", - viewAttr: 2, + viewAttr: 2 }, { colSpan: 1, @@ -167,7 +187,7 @@ export const condition = [ label: "本人开户的银行卡卡号", labelcol: 6, value: "", - viewAttr: 2, + viewAttr: 2 }, { colSpan: 1, @@ -177,10 +197,10 @@ export const condition = [ label: "本人开户的银行卡开户支行全称", labelcol: 6, value: "", - viewAttr: 2, - }, + viewAttr: 2 + } ], defaultshow: true, title: "基本信息" - }, + } ]; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js index ae587725..723b56b3 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js @@ -66,8 +66,8 @@ class LedgerAssociatedPersonnel extends Component { * Date: 2023/3/14 */ handleSaveExternalPerson = (val) => { - const { editId: salarySobId } = this.props; - saveLedgerPersonExtRange({ ...val, salarySobId }).then(({ status, errormsg }) => { + const { editId: salarySobId, saveSalarySobId } = this.props; + saveLedgerPersonExtRange({ ...val, salarySobId: salarySobId || saveSalarySobId }).then(({ status, errormsg }) => { this.setState({ loading: false }); if (status) { message.success("保存成功"); diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index 1c642e24..aa20841e 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -679,7 +679,7 @@ class Index extends Component { this.queryList("/api/bs/hrmsalary/salaryArchive/suspendList"); break; case "stop": - this.queryList("/api/bs/hrmsalary/salaryArchive/suspendList"); + this.queryList("/api/bs/hrmsalary/salaryArchive/stopList"); break; default: this.queryList("/api/bs/hrmsalary/salaryArchive/extList"); diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js index ffaa1956..f49caf6e 100644 --- a/pc4mobx/hrmSalary/util/index.js +++ b/pc4mobx/hrmSalary/util/index.js @@ -1,6 +1,7 @@ -import { Spin } from 'antd'; -import { WeaSwitch } from 'comsMobx'; -import { WeaLocaleProvider, WeaAlertPage, WeaSearchGroup, WeaFormItem } from 'ecCom'; +import { Spin } from "antd"; +import { WeaSwitch } from "comsMobx"; +import { WeaAlertPage, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; + const getLabel = WeaLocaleProvider.getLabel; // 渲染form表单: 一般对form的渲染都统一使用该方法 @@ -10,14 +11,14 @@ export const getCustomSearchs = (form, condition, col, isCenter) => { let items = []; let group = []; isFormInit && condition && - condition.map(c =>{ + condition.map(c => { c.items.map(fields => { items.push({ - com:( + com: ( @@ -27,39 +28,39 @@ export const getCustomSearchs = (form, condition, col, isCenter) => { formParams={formParams} /> ), - colSpan:1, - }) + colSpan: 1 + }); }); }); - if(items.length > 0) { + if (items.length > 0) { group.push( ) + />); return group; } -} +}; // 渲染form表单: 一般对form的渲染都统一使用该方法 -export const getSearchs = (form, condition, col, isCenter) => { +export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0)) => { const { isFormInit } = form; const formParams = form.getFormParams(); let group = []; - isFormInit && condition && condition.map(c =>{ + isFormInit && condition && condition.map(c => { let items = []; c.items.map(fields => { items.push({ - com:( + com: ( @@ -67,39 +68,40 @@ export const getSearchs = (form, condition, col, isCenter) => { fieldConfig={fields} form={form} formParams={formParams} + onChange={onChange} /> ), - colSpan:1, - }) + colSpan: 1 + }); }); group.push( ) + />); }); return group; -} +}; // 页面加载中效果处理 export const renderLoading = (loading) => (
- +
-) +); // 无权限处理 export const renderNoright = () => (
- {getLabel(2012,'对不起,您暂时没有权限!')} + {getLabel(2012, "对不起,您暂时没有权限!")}
-) +); // 暂无数据处理 export const renderNoData = () => ( @@ -108,13 +110,13 @@ export const renderNoData = () => ( 暂无数据
-) +); //分页计算 -export function calcPageNo (total, pageNo = 1, pageSize = 10, selectDelDataLen = 1) { - const totalPage = Math.ceil((total - selectDelDataLen) / pageSize) // 总页数 - pageNo = pageNo > totalPage ? totalPage : pageNo - pageNo = pageNo < 1 ? 1 : pageNo - return pageNo +export function calcPageNo(total, pageNo = 1, pageSize = 10, selectDelDataLen = 1) { + const totalPage = Math.ceil((total - selectDelDataLen) / pageSize); // 总页数 + pageNo = pageNo > totalPage ? totalPage : pageNo; + pageNo = pageNo < 1 ? 1 : pageNo; + return pageNo; } From fb3b4c7d59d1c9e59c33204eb2d83d5c3ad6047f 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, 16 Mar 2023 11:03:52 +0800 Subject: [PATCH 06/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/externalPersonModal/index.js | 4 +-- .../pages/calculateDetail/userSure.js | 25 ------------------- .../pages/externalPersonManage/index.js | 10 ++++---- .../pages/salaryFile/saralyFileViewSlide.js | 2 +- 4 files changed, 8 insertions(+), 33 deletions(-) diff --git a/pc4mobx/hrmSalary/components/externalPersonModal/index.js b/pc4mobx/hrmSalary/components/externalPersonModal/index.js index 1d9e17ec..64f21fbf 100644 --- a/pc4mobx/hrmSalary/components/externalPersonModal/index.js +++ b/pc4mobx/hrmSalary/components/externalPersonModal/index.js @@ -46,9 +46,9 @@ class Index extends Component { onCancel={onCancel} > - + - | - { - this.setState({ selectedKey: "3" }, () => { - const childFrameObj = document.getElementById("atdTable"); - const salaryAcctRecordId = getQueryString("id"); - const payload = { - type: "PC", - listType: "MA", - url: "/api/bs/hrmsalary/salaryacct/addedemployee/list", - queryParams: { - salaryAcctRecordId, - employeeName: this.state.userListSearchValue - } - }; - childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); - }); - }}> - 非系统人员 -
this.setState({ showSearchAd: false }, () => this.listPage())} onAdReset={() => form.resetForm()} onAdCancel={() => this.setState({ showSearchAd: false })} /> - ( this.handleAdd(id)} style={{ paddingRight: 8 }}>编辑 - this.handleDelete(id)}>删除 + {/* this.handleDelete(id)}>删除*/} ) } @@ -161,7 +161,7 @@ class Index extends Component { dataSource={dataSource} pagination={pagination} rowSelection={rowSelection} - xWidth={this.getColumns().length * 120} + xWidth={800} /> Date: Thu, 16 Mar 2023 11:44:12 +0800 Subject: [PATCH 07/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/taxAgent/personalScope.js | 3 ++- pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js index 2a2de5dd..2efb06f2 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js @@ -273,7 +273,8 @@ export default class PersonalScope extends Component { () => { tab == "1" ? this.getTaxAgentRangeListInclude({ ...pageObj, ...params }) - : this.getTaxAgentRangeListExclude({ ...pageObj, ...params }); + : tab == "0" ? this.getTaxAgentRangeListExclude({ ...pageObj, ...params }) : + this.taxAgentRangelistExt({ ...pageObj, ...params }); } ); }} diff --git a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js index 24f73077..9823bc49 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js @@ -135,6 +135,7 @@ export default class SlideTaxagentUser extends React.Component { onChange: this.onSelectChange }; const pagination = { + ...pageObj, total: pageObj.total, showTotal: total => `共 ${total} 条`, showSizeChanger: true, From a1b8fc3f51f2bead3cdbd4bf71ac11d089bca839 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, 16 Mar 2023 18:32:24 +0800 Subject: [PATCH 08/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E7=AE=A1=E7=90=86=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payrollFiles/config/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js index 89fdab3f..22a80218 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js @@ -30,7 +30,7 @@ export const tabCondition = [ { color: "#000000", groupid: "EXT", - showcount: false, + showcount: true, title: "非系统人员", viewcondition: "ext" } From 4b241b281628065556d18f9ad72a68e242867d0d 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, 17 Mar 2023 11:00:58 +0800 Subject: [PATCH 09/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E7=AE=A1=E7=90=86=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../externalPersonManageEditSlide.js | 42 +++++++--------- .../pages/externalPersonManage/conditions.js | 6 ++- pc4mobx/hrmSalary/util/index.js | 49 ++++--------------- 3 files changed, 32 insertions(+), 65 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js b/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js index 1ff46da9..c564b29e 100644 --- a/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/components/externalPersonManageEditSlide.js @@ -7,7 +7,7 @@ import React, { Component } from "react"; import { WeaSlideModal } from "ecCom"; import { message } from "antd"; -import { getSearchs } from "../../../util"; +import { getConditionDomkeys, getSearchs } from "../../../util"; import SlideModalTitle from "../../../components/slideModalTitle"; import { detail, save, update } from "../../../apis/externalPersonManage"; @@ -25,36 +25,32 @@ class ExternalPersonManageEditSlide extends Component { } detail = (props) => { - const { form, id } = props; + const { form, id, condition } = props; detail({ id }).then(({ status, data }) => { if (status) { - const { - departmentOrgName, departmentId, subcompanyOrgName, subcompanyId, - jobtitleOrgName, jobtitleId, ...extraFormfields - } = data; form.updateFields({ "departmentId": { - value: departmentId, - valueSpan: departmentOrgName, - valueObj: [{ id: departmentId, name: departmentOrgName }] + value: data["departmentId"], + valueSpan: data["departmentOrgName"], + valueObj: [{ id: data["departmentId"], name: data["departmentOrgName"] }] } }); form.updateFields({ "subcompanyId": { - value: subcompanyId, - valueSpan: subcompanyOrgName, - valueObj: [{ id: subcompanyId, name: subcompanyOrgName }] + value: data["subcompanyId"], + valueSpan: data["subcompanyOrgName"], + valueObj: [{ id: data["subcompanyId"], name: data["subcompanyOrgName"] }] } }); - form.updateFields({ - "jobtitleId": { - value: jobtitleId, - valueSpan: jobtitleOrgName, - valueObj: [{ id: jobtitleId, name: jobtitleOrgName }] - } - }); - _.map(_.keys(extraFormfields), item => { - form.updateFields({ [item]: { value: extraFormfields[item] } }, false); + // form.updateFields({ + // "jobtitleId": { + // value: jobtitleId, + // valueSpan: data["jobtitleOrgName"], + // valueObj: [{ id: jobtitleId, name: data["jobtitleOrgName"] }] + // } + // }); + _.map(_.without(getConditionDomkeys(condition), "departmentId", "subcompanyId"), item => { + form.updateFields({ [item]: { value: data[item] } }, false); }); } }); @@ -78,7 +74,7 @@ class ExternalPersonManageEditSlide extends Component { } return _.assign(pre, { [cur]: form.getFormDatas()[cur].value }); }, {}); - const payload = _.omitBy(form.getFormParams(), _.isEmpty); + const payload = _.omitBy(form.getFormParams(), _.isNil); this.setState({ loading: true }); const APIFOX = !id ? save : update; APIFOX(id ? { ...payload, id } : payload).then(({ status, errormsg }) => { @@ -98,7 +94,7 @@ class ExternalPersonManageEditSlide extends Component { }; handleFormChange = (res) => { const { form, id } = this.props; - if (!id && (_.keys(res)[0] === "departmentId" || _.keys(res)[0] === "subcompanyId")) { + if (_.keys(res)[0] === "departmentId" || _.keys(res)[0] === "subcompanyId") { const key = _.replace(_.keys(res)[0], "Id", "Name"); form.updateFields({ [key]: res[_.keys(res)[0]].valueSpan || "" }); } diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js b/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js index f150bfdc..c208e585 100644 --- a/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/conditions.js @@ -67,7 +67,8 @@ export const condition = [ label: "部门名称", labelcol: 6, value: "", - viewAttr: 2 + hasBorder: true, + viewAttr: 1 }, { browserConditionParam: { @@ -107,7 +108,8 @@ export const condition = [ label: "分部名称", labelcol: 6, value: "", - viewAttr: 2 + hasBorder: true, + viewAttr: 1 }, // { // browserConditionParam: { diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js index f49caf6e..6298e782 100644 --- a/pc4mobx/hrmSalary/util/index.js +++ b/pc4mobx/hrmSalary/util/index.js @@ -4,47 +4,16 @@ import { WeaAlertPage, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ec const getLabel = WeaLocaleProvider.getLabel; -// 渲染form表单: 一般对form的渲染都统一使用该方法 -export const getCustomSearchs = (form, condition, col, isCenter) => { - const { isFormInit } = form; - const formParams = form.getFormParams(); - let items = []; - let group = []; - isFormInit && condition && - condition.map(c => { - c.items.map(fields => { - items.push({ - com: ( - - - ), - colSpan: 1 - }); - }); +// 获取condition的domKey值 +export const getConditionDomkeys = (condition) => { + let domkeyList = []; + _.forEach(condition, item => { + const tmpV = _.reduce(item.items, (pre, cur) => { + return [...pre, cur["domkey"][0]]; + }, []); + domkeyList = domkeyList.concat(tmpV); }); - - if (items.length > 0) { - group.push( - ); - return group; - } + return domkeyList; }; // 渲染form表单: 一般对form的渲染都统一使用该方法 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/61] =?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/61] =?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/61] =?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/61] =?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/61] =?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/61] =?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/61] =?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/61] =?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/61] =?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/61] =?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/61] =?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/61] =?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/61] =?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/61] =?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/61] =?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/61] =?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 eb2d77e399602e35a4e9d45867f001e3e66c46ea 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 17:27:45 +0800 Subject: [PATCH 26/61] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/ruleconfig.js | 4 +++ .../pages/payroll/payrollGrant/index.js | 12 +++++++- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 29 ++++++++++++++++--- 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js index 7ff084ce..869b008d 100644 --- a/pc4mobx/hrmSalary/apis/ruleconfig.js +++ b/pc4mobx/hrmSalary/apis/ruleconfig.js @@ -55,3 +55,7 @@ export const reportStatisticsReportSave = (params) => { export const reportGetForm = params => { return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/report/getForm", "GET", params); }; +//工资单反馈 +export const saveSalarySendFeedback = (params) => { + return postFetch("/api/bs/hrmsalary/sys/saveSalarySendFeedback", params); +}; diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 0be427d5..104d3c08 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -9,6 +9,7 @@ import { getSearchs, renderLoading } from "../../../util"; import CustomPaginationTable from "../../../components/customPaginationTable"; import PayrollPartTable from "./payrollPartTable"; import { getPayrollIssuanceProgressBar } from "../../../apis/payroll"; +import { sysConfCodeRule } from "../../../apis/ruleconfig"; import ProgressModal from "../../../components/progressModal"; const getLabel = WeaLocaleProvider.getLabel; @@ -25,6 +26,7 @@ export default class PayrollGrant extends React.Component { selectedKey: "0", progressVisible: false, progress: 0, + showFeedbackColumn: false, payrollPartModalParams: { visible: false, title: "工资单发放", @@ -49,8 +51,15 @@ export default class PayrollGrant extends React.Component { isGranted: selectedKey !== "0" }); getPaySa(); + this.sysConfCodeRule(); } + sysConfCodeRule = () => { + sysConfCodeRule({ code: "SALARY_SEND_FEEDBACK" }).then(({ status, data }) => { + if (status && data === "1") this.setState({ showFeedbackColumn: data === "1" }); + }); + }; + // 撤回 handleWithdraw = (record) => { const { payrollStore } = this.props; @@ -299,11 +308,12 @@ export default class PayrollGrant extends React.Component { }; getColumns = () => { + const { selectedKey, showFeedbackColumn } = this.state; const { payrollStore } = this.props; const { salaryGrantTableStore: columns, salarySendDetailBaseInfo } = payrollStore; const notShowGrantOrWithdraw = salarySendDetailBaseInfo.haveBackCalc === 1 && salarySendDetailBaseInfo.salaryAcctType === "0"; return _.map([ - ...toJS(columns), + ..._.filter(toJS(columns), it => ((selectedKey === "0" && it.dataIndex !== "billReadStatus" && it.dataIndex !== "billConfirmStatus") || (selectedKey === "1" && !showFeedbackColumn && it.dataIndex !== "billReadStatus" && it.dataIndex !== "billConfirmStatus") || (selectedKey === "1" && showFeedbackColumn))), { title: "操作", key: "", diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 6f088528..ed293c72 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: "", + salarySendFeedback: "" }, showEncryptOperationButton: "", progressVisible: false, @@ -53,7 +54,8 @@ export default class Index extends Component { showEncryptOperationButton, isOpenEncrypt: enctry, isOpenTaxDeclaration: operateTaxDeclaration, - salaryAcctEmployeeRule: matchRule + salaryAcctEmployeeRule: matchRule, + salarySendFeedback } } = 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, salarySendFeedback } }); } @@ -128,6 +130,16 @@ export default class Index extends Component { } }); }; + saveSalarySendFeedback = () => { + API.saveSalarySendFeedback({ confValue: this.state.saveParams.salarySendFeedback }) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(22619, "保存成功!")); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }; operateTaxDeclarationFunction = () => { API.operateTaxDeclarationFunction(_.pick(this.state.saveParams, ["operateTaxDeclaration"])) .then(({ status, errormsg }) => { @@ -227,6 +239,9 @@ export default class Index extends Component { case "enctry": this.saveEncryptSetting(); break; + case "salarySendFeedback": + this.saveSalarySendFeedback(); + 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, salarySendFeedback } = saveParams; return (
+ + + this.handleChange("salarySendFeedback", val)}/> + + { this.state.progressVisible && Date: Tue, 11 Jul 2023 17:49:31 +0800 Subject: [PATCH 27/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E7=AE=A1=E7=90=86=E5=BC=80=E5=8F=91=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js index dcd3f13d..a43e4b18 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js @@ -190,7 +190,8 @@ export default class SlideTaxagentUser extends React.Component { Date: Tue, 11 Jul 2023 18:07:40 +0800 Subject: [PATCH 28/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E7=AE=A1=E7=90=86=E5=BC=80=E5=8F=91=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/taxAgent/slideTaxagentUser.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js index a43e4b18..f2b33310 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js @@ -6,7 +6,6 @@ import ImportModal from "../../components/importModal"; import { taxAgentRangeImportData, taxAgentRangePreview } from "../../apis/taxAgent"; import { importEmployColumns } from "./columns"; import ExternalPersonModal from "../../components/externalPersonModal"; -import cs from "classnames"; export default class SlideTaxagentUser extends React.Component { constructor(props) { @@ -182,16 +181,22 @@ export default class SlideTaxagentUser extends React.Component { >, , - this.setState({ addTaxagentModalVisible: true })}/> + { + const key = includeType === "2" ? "externalPersonModalVisible" : "addTaxagentModalVisible"; + this.setState({ [key]: true }); + }} + /> ]; - includeType === "0" && btns.shift(); + (includeType === "0" || includeType === "2") && btns.shift(); return (
Date: Wed, 12 Jul 2023 10:14:38 +0800 Subject: [PATCH 29/61] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/payroll.js | 4 ++ .../hrmSalary/pages/mobilePayroll/index.js | 41 ++++++++++++++++-- .../hrmSalary/pages/mySalary/mySalaryView.js | 42 ++++++++++++++++++- .../pages/payroll/payrollGrant/index.js | 1 + .../templatePreview/computerTemplate/index.js | 1 + .../pages/payroll/templatePreview/index.less | 33 +++++++++++---- .../templatePreview/phoneTemplate/index.js | 1 + 7 files changed, 108 insertions(+), 15 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js index 1f9b1d64..6f48f359 100644 --- a/pc4mobx/hrmSalary/apis/payroll.js +++ b/pc4mobx/hrmSalary/apis/payroll.js @@ -375,6 +375,10 @@ export const sendMobileCode = (params) => { export const payrollCheckType = params => { return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params); }; +//工资单-确认 +export const confirmSalaryBill = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", params); +}; // 工资单基础设置-获取设置列表 export const getSalaryBillBaseSetForm = (id) => { diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index db4f3c2f..3f0dd6c4 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -1,17 +1,19 @@ 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"; import PhoneTemplate from "../payroll/templatePreview/phoneTemplate"; import "../payroll/templatePreview/index.less"; import * as API from "../../apis/mySalaryBenefits"; -import { payrollCheckType } from "../../apis/payroll"; +import { confirmSalaryBill, payrollCheckType } from "../../apis/payroll"; import "./index.less"; import CaptchaModal from "../../components/captchaModal"; +import { ConfirmBtns } from "../mySalary/mySalaryView"; +const { getLabel } = WeaLocaleProvider; @inject("mySalaryStore") @observer export default class MobilePayroll extends React.Component { @@ -104,6 +106,21 @@ export default class MobilePayroll extends React.Component { } return params; }; + confirmSalaryBill = () => { + confirmSalaryBill({ salaryInfoId: getQueryString("id") }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(30700, "操作成功")); + this.getMySalaryBill(getQueryString("id")); + } else { + message.error(errormsg || getLabel(30651, "操作失败")); + } + }); + }; + handleGoFeedback = () => { + const { mySalaryBillData } = this.state; + const { feedbackWorkflowId } = mySalaryBillData; + window.open(`${window.ecologyContentPath || ""}${feedbackWorkflowId}`); + }; render() { const { mySalaryStore: { clearLoading } } = this.props; @@ -139,7 +156,15 @@ export default class MobilePayroll extends React.Component { isPreview salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)} salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []} - /> + > + { + (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0") && + + } +
@@ -152,7 +177,15 @@ export default class MobilePayroll extends React.Component { isPreview salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)} salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : JSON.stringify([])} - /> + > + { + (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0") && + + } +
diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js index bda458fb..dd16b25f 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js +++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js @@ -6,12 +6,16 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; +import { Button, message } from "antd"; +import { WeaLocaleProvider } from "ecCom"; import Authority from "./authority"; import ComputerTemplate from "../payroll/templatePreview/computerTemplate"; -import { payrollCheckType } from "../../apis/payroll"; +import { confirmSalaryBill, payrollCheckType } from "../../apis/payroll"; import CaptchaModal from "../../components/captchaModal"; import "../payroll/templatePreview/index.less"; +const { getLabel } = WeaLocaleProvider; + @inject("mySalaryStore") @observer class MySalaryView extends Component { @@ -37,6 +41,25 @@ class MySalaryView extends Component { } } + confirmSalaryBill = () => { + const { mySalaryStore: { getMySalaryBill }, params: { salaryInfoId } } = this.props; + confirmSalaryBill({ salaryInfoId }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(30700, "操作成功")); + getMySalaryBill(Number(salaryInfoId)).then(data => { + this.setState({ mySalaryStore: data }); + }); + } else { + message.error(errormsg || getLabel(30651, "操作失败")); + } + }); + }; + handleGoFeedback = () => { + const { mySalaryStore } = this.state; + const { feedbackWorkflowId } = mySalaryStore; + window.open(`${window.ecologyContentPath || ""}${feedbackWorkflowId}`); + }; + render() { const { captchaVisible, mySalaryStore } = this.state; const { params: { salaryInfoId } } = this.props; @@ -56,7 +79,15 @@ class MySalaryView extends Component { isPreview isMsgPreview salaryTemplateShowSet={salaryTemplateShowSet ? JSON.stringify(salaryTemplateShowSet) : []} salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []} - /> + > + { + (_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0") && + + } + @@ -71,3 +102,10 @@ class MySalaryView extends Component { } export default MySalaryView; + +export const ConfirmBtns = (props) => { + return
+ + +
; +}; diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 104d3c08..da625880 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -612,6 +612,7 @@ export default class PayrollGrant extends React.Component { { this.state.progressVisible && { this.setState({ progressVisible: false, progress: 0 }); diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js index 6f2e68c2..0c4c8c07 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js @@ -109,6 +109,7 @@ export default class ComputerTemplate extends React.Component { salaryTemplateShowSet.textContentPosition == 2 && salaryTemplateShowSet.textContent } + {this.props.children} ); } diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less b/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less index 52517511..0d2d5dda 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less @@ -85,7 +85,8 @@ margin: 10px; background-color: #FFF; padding: 10px; - .descript-title{ + + .descript-title { display: flex; align-items: center; margin-bottom: 10px; @@ -100,15 +101,18 @@ border: 1px solid #fafafa; border-bottom: none; } - .descriptions-view{ + + .descriptions-view { width: 100%; - table{ + + table { table-layout: fixed; border-collapse: collapse; width: 100%; - border: 1px solid rgba(0,0,0,.06); - .descriptions-row{ - .descriptions-item-label{ + border: 1px solid rgba(0, 0, 0, .06); + + .descriptions-row { + .descriptions-item-label { background-color: #fafafa; padding: 16px 24px; color: #000000d9; @@ -116,11 +120,12 @@ font-size: 12px; line-height: 1.5715; text-align: start; - border: 1px solid rgba(0,0,0,.06); + border: 1px solid rgba(0, 0, 0, .06); min-width: 100px; max-width: 100px; } - .descriptions-item-content{ + + .descriptions-item-content { padding: 16px 24px; display: table-cell; flex: 1; @@ -130,10 +135,20 @@ word-break: break-word; overflow-wrap: break-word; border-collapse: collapse; - border: 1px solid rgba(0,0,0,.06); + border: 1px solid rgba(0, 0, 0, .06); } } } } } + + .space { + display: flex; + align-items: center; + justify-content: flex-end; + + .ant-btn { + margin-right: 10px; + } + } } diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js index 0f85d51d..2a572966 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js @@ -100,6 +100,7 @@ export default class PhoneTemplate extends React.Component { salaryTemplateShowSet.textContentPosition == 2 && salaryTemplateShowSet.textContent } + {this.props.children} ); } From 147749796ab02cb65bbb5843aa3c3babeb05a054 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, 12 Jul 2023 11:32:15 +0800 Subject: [PATCH 30/61] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js index 1f09d059..15a099ae 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js @@ -47,7 +47,7 @@ class SalaryItemForm extends Component { case "valueType": return { ...item, - viewAttr: isAdd ? 2 : 1 + // viewAttr: isAdd ? 2 : 1 }; case "formulaContent": return { From 38c9d97f54473ccda6ddc3f658173dc9e94df3be 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, 12 Jul 2023 13:43:15 +0800 Subject: [PATCH 31/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E5=BC=80=E5=8F=91=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/taxAgent/personalScope.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js index c91fd77b..da0bd2bb 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js @@ -139,7 +139,7 @@ export default class PersonalScope extends Component { content: `确认删除该条数据吗?`, onOk: () => { return new Promise((resolve, reject) => { - return tab == "2" ? this.taxAgentExtRangeDeleteComfirm(resolve, reject, ids) : this.taxAgentRangeDeleteComfirm(resolve, reject, ids, tab); + return tab === "2" ? this.taxAgentExtRangeDeleteComfirm(resolve, reject, ids) : this.taxAgentRangeDeleteComfirm(resolve, reject, ids, tab); }).catch(() => console.log("出错!")); } }); @@ -202,7 +202,7 @@ export default class PersonalScope extends Component { const { includeType } = module; const { taxAgentRangeSave, taxAgentRangeExtSave } = this.props.taxAgentStore; this.setState({ submitLoading: true }); - if (includeType === 2) { + if (includeType === "2") { taxAgentRangeExtSave({ taxAgentId, ..._.pick(module, "targetIds") }).then(({ status, errormsg }) => { this.setState({ submitLoading: false }); if (status) { From 8356de0fa28993146033ef9a7010e392c34b3ee1 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, 12 Jul 2023 14:34:07 +0800 Subject: [PATCH 32/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E5=BC=80=E5=8F=91=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/externalPersonManage/index.less | 11 +++++++++-- pc4mobx/hrmSalary/util/index.js | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/externalPersonManage/index.less b/pc4mobx/hrmSalary/pages/externalPersonManage/index.less index 32f8b668..8b13dd6f 100644 --- a/pc4mobx/hrmSalary/pages/externalPersonManage/index.less +++ b/pc4mobx/hrmSalary/pages/externalPersonManage/index.less @@ -1,7 +1,14 @@ -.externalPerWrapper{ +.externalPerWrapper { width: 100%; height: 100%; - .externalPerCont{ + + .externalPerCont { height: 100%; } } + +.slideOuterWrapper { + .hideFormItem { + display: none !important; + } +} diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js index de115ede..702a281b 100644 --- a/pc4mobx/hrmSalary/util/index.js +++ b/pc4mobx/hrmSalary/util/index.js @@ -32,6 +32,7 @@ export const getSearchs = (form, condition, col, isCenter, onChange = () => void wrapperCol={{ span: `${fields.fieldcol}` }} // 右侧控件占一行比例 error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验 tipPosition="bottom" // 错误提示的显示位置: top/bottom + className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : ""} > Date: Wed, 12 Jul 2023 16:18:54 +0800 Subject: [PATCH 33/61] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=8D=E9=A6=88=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/payroll/templateBaseSettings.js | 134 +++++++++++++----- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 25 +--- 2 files changed, 98 insertions(+), 61 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js index 742fa874..08b4e813 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js +++ b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js @@ -5,8 +5,16 @@ * Date: 2023/6/12 */ import React, { Component } from "react"; -import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom"; -import { message } from "antd"; +import { + WeaCheckbox, + WeaFormItem, + WeaInput, + WeaInputNumber, + WeaLocaleProvider, + WeaSearchGroup, + WeaSelect +} from "ecCom"; +import { message, Modal } from "antd"; import { getSalaryBillBaseSetForm, salaryBillBaseSetSave } from "../../apis/payroll"; import WaterMarkSetModal from "./components/waterMarkSetModal"; import "./index.less"; @@ -22,6 +30,11 @@ class TemplateBaseSettings extends Component { wmSetting: null, watermarkSet: { visible: false, watermarkSetting: null + }, + ackFeedbackSetting: { + ackStatus: "0", + autoAckDays: 7, + feedBackUrl: "" } }; } @@ -34,9 +47,10 @@ class TemplateBaseSettings extends Component { const { watermarkSet } = this.state; getSalaryBillBaseSetForm().then(({ status, data }) => { if (status) { - const { watermarkStatus, watermark = "DEFAULT", watermarkSetting } = data; + const { watermarkStatus, watermark = "DEFAULT", watermarkSetting, ackFeedbackSetting } = data; this.setState({ - watermark, watermarkStatus: watermarkStatus ? "1" : "0", + watermark, watermarkStatus: watermarkStatus ? "1" : "0", ackFeedbackSetting, + wmSetting: { wmSetting: watermarkSetting }, watermarkSet: { ...watermarkSet, watermarkSetting @@ -46,8 +60,16 @@ class TemplateBaseSettings extends Component { }); }; salaryBillBaseSetSave = () => { - const { watermark, watermarkStatus, wmSetting } = this.state; - let payload = { watermarkStatus: watermarkStatus === "1" }; + const { watermark, watermarkStatus, wmSetting, ackFeedbackSetting } = this.state; + const { feedBackUrl } = ackFeedbackSetting; + if (!feedBackUrl) { + Modal.warning({ + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") + }); + return; + } + let payload = { watermarkStatus: watermarkStatus === "1", ackFeedbackSetting: { ...ackFeedbackSetting } }; if (watermarkStatus === "1") payload = { ...payload, watermark }; if (!_.isNil(wmSetting)) payload = { ...payload, watermark, ...wmSetting }; this.props.onChangeLoading(true); @@ -63,40 +85,76 @@ class TemplateBaseSettings extends Component { }; render() { - const { watermarkStatus, watermark, watermarkSet } = this.state; + const { watermarkStatus, watermark, watermarkSet, ackFeedbackSetting } = this.state; + const { ackStatus, autoAckDays, feedBackUrl } = ackFeedbackSetting; return ( - - - this.setState({ watermarkStatus, watermark: "DEFAULT" })}/> - - { - watermarkStatus === "1" && - - this.setState({ watermark })} - /> - { - watermark === "CUSTOM" && - this.setState({ - watermarkSet: { - ...watermarkSet, - visible: true - } - })}>{getLabel(111, "水印设置")} - } - this.setState({ watermarkSet: { ...watermarkSet, visible: false } })} - onChange={wmSetting => this.setState({ wmSetting })} - /> + + + + this.setState({ watermarkStatus, watermark: "DEFAULT" })}/> - } - + { + watermarkStatus === "1" && + + this.setState({ watermark })} + /> + { + watermark === "CUSTOM" && + this.setState({ + watermarkSet: { + ...watermarkSet, + visible: true + } + })}>{getLabel(111, "水印设置")} + } + this.setState({ watermarkSet: { ...watermarkSet, visible: false } })} + onChange={wmSetting => this.setState({ wmSetting })} + /> + + } + + + + this.setState({ + ackFeedbackSetting: { + ...ackFeedbackSetting, ackStatus, autoAckDays: 7 + } + })}/> + + { + ackStatus === "1" && + + + this.setState({ + ackFeedbackSetting: { + ...ackFeedbackSetting, autoAckDays + } + })}/> + + + this.setState({ + ackFeedbackSetting: { + ...ackFeedbackSetting, feedBackUrl + } + })}/> + + + } + + ); } } diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index ed293c72..535f5e87 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -26,7 +26,6 @@ export default class Index extends Component { enctry: "", operateTaxDeclaration: "", matchRule: "", - salarySendFeedback: "" }, showEncryptOperationButton: "", progressVisible: false, @@ -55,7 +54,6 @@ export default class Index extends Component { isOpenEncrypt: enctry, isOpenTaxDeclaration: operateTaxDeclaration, salaryAcctEmployeeRule: matchRule, - salarySendFeedback } } = appSettings; this.setState({ @@ -63,7 +61,7 @@ export default class Index extends Component { showEncryptOperationButton, saveParams: { ...saveParams, - ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, salarySendFeedback + ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule } }); } @@ -130,16 +128,6 @@ export default class Index extends Component { } }); }; - saveSalarySendFeedback = () => { - API.saveSalarySendFeedback({ confValue: this.state.saveParams.salarySendFeedback }) - .then(({ status, errormsg }) => { - if (status) { - message.success(getLabel(22619, "保存成功!")); - } else { - message.error(errormsg || getLabel(22620, "保存失败!")); - } - }); - }; operateTaxDeclarationFunction = () => { API.operateTaxDeclarationFunction(_.pick(this.state.saveParams, ["operateTaxDeclaration"])) .then(({ status, errormsg }) => { @@ -239,9 +227,6 @@ export default class Index extends Component { case "enctry": this.saveEncryptSetting(); break; - case "salarySendFeedback": - this.saveSalarySendFeedback(); - break; default: break; } @@ -267,7 +252,7 @@ export default class Index extends Component { employeeOptions, showEncryptOperationButton } = this.state; - const { orderRule, ascOrDesc, rule, enctry, operateTaxDeclaration, matchRule, salarySendFeedback } = saveParams; + const { orderRule, ascOrDesc, rule, enctry, operateTaxDeclaration, matchRule } = saveParams; return (
- - - this.handleChange("salarySendFeedback", val)}/> - - { this.state.progressVisible && Date: Thu, 13 Jul 2023 09:37:17 +0800 Subject: [PATCH 34/61] =?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 10:05:16 +0800 Subject: [PATCH 35/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E7=AE=A1=E7=90=86=E5=BC=80=E5=8F=91=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js index 90de4d67..6e84e53f 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js @@ -114,7 +114,7 @@ class ImportMenu extends Component { }; render() { - const { importType, refreshList } = this.props; + const { importType, refreshList, isExtEmp } = this.props; const { importParams, previewColumns, previewDataSource } = this.state; let params = ""; if (importParams.importType === "init" || importParams.importType === "salaryItemAdjust") { @@ -122,6 +122,7 @@ class ImportMenu extends Component { } else { params = "" + "&listType=" + importParams.importType; } + if (isExtEmp) params = "&extSalaryArchiveList=true"; return ( From e83ff0dbccfb85381ed048a3fec5cd81781e23fd 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 10:31:45 +0800 Subject: [PATCH 36/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E7=AE=A1=E7=90=86=E5=BC=80=E5=8F=91=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js index 6e84e53f..42f95e62 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js @@ -122,7 +122,7 @@ class ImportMenu extends Component { } else { params = "" + "&listType=" + importParams.importType; } - if (isExtEmp) params = "&extSalaryArchiveList=true"; + if (isExtEmp) params = params + "&extSalaryArchiveList=true"; return ( From aff963b5c6cc9264c2a5d8d09e1c248c0cd30678 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 14:45:25 +0800 Subject: [PATCH 37/61] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E5=8F=8D?= =?UTF-8?q?=E9=A6=88=E5=8A=9F=E8=83=BD=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/mobilePayroll/index.js | 4 +- .../hrmSalary/pages/mySalary/mySalaryView.js | 4 +- .../hrmSalary/pages/payroll/SalarySendList.js | 5 +-- .../pages/payroll/payrollGrant/index.js | 13 ++---- .../pages/payroll/stepForm/baseInformForm.js | 43 ++++++++++++++++++- 5 files changed, 50 insertions(+), 19 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 3f0dd6c4..c76483cf 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -118,8 +118,8 @@ export default class MobilePayroll extends React.Component { }; handleGoFeedback = () => { const { mySalaryBillData } = this.state; - const { feedbackWorkflowId } = mySalaryBillData; - window.open(`${window.ecologyContentPath || ""}${feedbackWorkflowId}`); + const { feedbackUrl } = mySalaryBillData; + window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`); }; render() { diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js index dd16b25f..9590070e 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js +++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js @@ -56,8 +56,8 @@ class MySalaryView extends Component { }; handleGoFeedback = () => { const { mySalaryStore } = this.state; - const { feedbackWorkflowId } = mySalaryStore; - window.open(`${window.ecologyContentPath || ""}${feedbackWorkflowId}`); + const { feedbackUrl } = mySalaryStore; + window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`); }; render() { diff --git a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js index 2b98919b..84aabc64 100644 --- a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js +++ b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js @@ -21,10 +21,7 @@ export default class SalarySendList extends React.Component { // 发放回调 handleGrant(record) { - window.open( - "/spa/hrmSalary/static/index.html#/main/hrmSalary/payrollGrant?id=" + - record.id - ); + window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/payrollGrant?id=${record.id}&ackFeedbackStatus=${record.ackFeedbackStatus}`); } // 查看详情 diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index da625880..9582c550 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -9,7 +9,6 @@ import { getSearchs, renderLoading } from "../../../util"; import CustomPaginationTable from "../../../components/customPaginationTable"; import PayrollPartTable from "./payrollPartTable"; import { getPayrollIssuanceProgressBar } from "../../../apis/payroll"; -import { sysConfCodeRule } from "../../../apis/ruleconfig"; import ProgressModal from "../../../components/progressModal"; const getLabel = WeaLocaleProvider.getLabel; @@ -41,7 +40,10 @@ export default class PayrollGrant extends React.Component { componentWillMount() { const { selectedKey } = this.state; let id = getQueryString("id"); - this.setState({ currentId: id }); + this.setState({ + currentId: id, + showFeedbackColumn: getQueryString("ackFeedbackStatus") === "1" + }); const { payrollStore: { getPayrollInfo, getInfoList, getPaySa } } = this.props; @@ -51,15 +53,8 @@ export default class PayrollGrant extends React.Component { isGranted: selectedKey !== "0" }); getPaySa(); - this.sysConfCodeRule(); } - sysConfCodeRule = () => { - sysConfCodeRule({ code: "SALARY_SEND_FEEDBACK" }).then(({ status, data }) => { - if (status && data === "1") this.setState({ showFeedbackColumn: data === "1" }); - }); - }; - // 撤回 handleWithdraw = (record) => { const { payrollStore } = this.props; diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js index 69ebf94e..a6bd2e67 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js @@ -1,5 +1,13 @@ import React from "react"; -import { WeaCheckbox, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom"; +import { + WeaCheckbox, + WeaFormItem, + WeaInput, + WeaInputNumber, + WeaLocaleProvider, + WeaSearchGroup, + WeaSelect +} from "ecCom"; import { inject, observer } from "mobx-react"; import { getReplenishRuleSetOptions } from "../../../apis/payroll"; import { toJS } from "mobx"; @@ -73,7 +81,10 @@ 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, + ackFeedbackStatus, autoAckDays, feedbackUrl + } = request; return ( @@ -165,6 +176,34 @@ export default class BaseInformForm extends React.Component { onChange={value => this.hanldeChange({ emailStatus: value === "1" })}/> + + + this.hanldeChange({ + ackFeedbackStatus: value === "1", + autoAckDays: 7, + feedbackUrl: "/" + })}/> + + { + ackFeedbackStatus && + + + this.hanldeChange({ autoAckDays })} + /> + + + this.hanldeChange({ feedbackUrl })} + /> + + + } + ); } From b3e5d2ba1c95950460fb113170ab477e129906e2 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 14:58:27 +0800 Subject: [PATCH 38/61] =?UTF-8?q?dev=E5=90=88=E5=B9=B6=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=8D=E9=A6=88=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/payroll/stepForm/baseInformForm.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js index b3788b60..8c5ec65b 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js @@ -98,13 +98,12 @@ export default class BaseInformForm extends React.Component { }; render() { - const { request, options, replenishRuleOptions } = this.state; + const { request, options, replenishRuleOptions, salaryMonthOptions } = this.state; const { salarySob, name, description, replenishName, replenishRule, reissueRule, msgStatus, emailStatus, - ackFeedbackStatus, autoAckDays, feedbackUrl, autoSendStatus, autoSendDayOfMonth, - autoSendTimeOfDay, autoSendCycleType + ackFeedbackStatus, autoAckDays, feedbackUrl, autoSendStatus, autoSendDayOfMonth, autoSendTimeOfDay, + autoSendCycleType } = request; - return ( @@ -201,7 +200,7 @@ export default class BaseInformForm extends React.Component { autoSendStatus: value === "1", autoSendDayOfMonth: value === "1" ? "1" : null, autoSendTimeOfDay: value === "1" ? "09:00" : null, - autoSendCycleType: value === "1" ? 1 : null, + autoSendCycleType: value === "1" ? 1 : null }); }}/> From 985b9612f6f640ca5080d53caedccff3ba699ac9 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:02:57 +0800 Subject: [PATCH 39/61] =?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 40/61] =?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 cf33419bc3222425f9ece25fc3b670ca472f803d 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 10:39:12 +0800 Subject: [PATCH 41/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E9=85=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/ruleconfig.js | 16 +++ pc4mobx/hrmSalary/pages/ruleConfig/index.js | 114 +++++++++++++++++--- 2 files changed, 117 insertions(+), 13 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js index 7ff084ce..69cfa1fa 100644 --- a/pc4mobx/hrmSalary/apis/ruleconfig.js +++ b/pc4mobx/hrmSalary/apis/ruleconfig.js @@ -6,6 +6,10 @@ export const commonEnumList = (params) => { return WeaTools.callApi("/api/bs/hrmsalary/common/enum/list", "GET", params); }; +export const sysinfo = params => { + return WeaTools.callApi("/api/bs/hrmsalary/sys/info", "GET", params); +}; + export const sysOrderRule = params => { return WeaTools.callApi("/api/bs/hrmsalary/sys/orderRule", "GET", params); }; @@ -43,6 +47,18 @@ 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 saveSysOperate = (params) => { + return postFetch("/api/bs/hrmsalary/sys/operate", 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 6f088528..7e934e77 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -25,7 +25,10 @@ export default class Index extends Component { rule: "", enctry: "", operateTaxDeclaration: "", - matchRule: "" + matchRule: "", + confValue: "0", + withDrawTaxDeclaration: "0", + extEmpsWitch: "0" }, showEncryptOperationButton: "", progressVisible: false, @@ -37,35 +40,52 @@ export default class Index extends Component { const { saveParams } = this.state; const [ matchRuleEnum, orderRuleEnum, ascOrDescEnum, matchEmployeeModeEnum, - orderRules, codeRule, appSettings + // orderRules, codeRule, appSettings, + sysInfo ] = await Promise.all([ this.matchRuleEnum(), this.orderRuleEnum(), this.ascOrDescEnum(), this.matchEmployeeModeEnum(), - this.sysOrderRule(), this.sysConfCodeRule(), this.queryAppsetting() + // this.sysOrderRule(), this.sysConfCodeRule(), this.queryAppsetting(), + this.sysinfo() ]); const matchRuleOptions = _.map(matchRuleEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); const orderOptions = _.map(orderRuleEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); const ascOptions = _.map(ascOrDescEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); const employeeOptions = _.map(matchEmployeeModeEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); - const { data: { ascOrDesc, orderRule } } = orderRules; - const { data: rule } = codeRule; const { data: { - showEncryptOperationButton, - isOpenEncrypt: enctry, - isOpenTaxDeclaration: operateTaxDeclaration, - salaryAcctEmployeeRule: matchRule + ascOrDesc = "", orderRule = "", showEncryptOperationButton, matchEmployeeMode: rule = "", + taxDeclarationFunction: operateTaxDeclaration = "0", salaryArchiveDelete: confValue, + salaryAcctEmployeeRule: matchRule, WITHDRAW_TAX_DECLARATION: withDrawTaxDeclaration = "0", + OPEN_APPLICATION_ENCRYPT: enctry = "0", extEmpsWitch = "0" } - } = appSettings; + } = sysInfo; + // const { data: { ascOrDesc, orderRule } } = orderRules; + // const { data: rule } = codeRule; + // const { + // data: { + // showEncryptOperationButton, + // isOpenEncrypt: enctry + // isOpenTaxDeclaration: operateTaxDeclaration, + // salaryAcctEmployeeRule: matchRule, + // salaryArchiveDelete: confValue, + // withDrawTaxDeclaration + // } + // } = appSettings; this.setState({ matchRuleOptions, orderOptions, ascOptions, employeeOptions, showEncryptOperationButton, saveParams: { ...saveParams, - ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule + ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration, + extEmpsWitch } }); } + sysinfo = () => { + return API.sysinfo(); + }; + sysOrderRule = () => { return API.sysOrderRule(); }; @@ -197,6 +217,36 @@ 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, "保存失败!")); + } + }); + }; + saveSysOperate = (payload) => { + API.saveSysOperate({ ...payload, confValue: this.state.saveParams.extEmpsWitch }) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(22619, "保存成功!")); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }; + 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; @@ -227,6 +277,18 @@ export default class Index extends Component { case "enctry": this.saveEncryptSetting(); break; + case "confValue": + this.saveArchiveDelete(); + break; + case "withDrawTaxDeclaration": + this.withDrawTaxDeclaration(); + break; + case "extEmpsWitch": + this.saveSysOperate({ + title: getLabel(111, "开启非系统人员"), + module: "basic", confKey: key + }); + break; default: break; } @@ -252,7 +314,17 @@ 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, + withDrawTaxDeclaration, + extEmpsWitch + } = saveParams; return (
- this.handleChange("operateTaxDeclaration", val)}/> + + this.handleChange("withDrawTaxDeclaration", val)}/> + + + + + this.handleChange("confValue", val)}/> + @@ -303,6 +385,12 @@ export default class Index extends Component { /> + + + this.handleChange("extEmpsWitch", val)}/> + + { this.state.progressVisible && Date: Fri, 14 Jul 2023 14:09:27 +0800 Subject: [PATCH 42/61] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E9=85=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/ruleconfig.js | 8 +++ .../components/ledgerAssociatedPersonnel.js | 23 ++++++- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 22 +++++- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 68 +++++++++++++++---- .../pages/taxAgent/slideTaxagentUser.js | 48 ++++++++----- 5 files changed, 131 insertions(+), 38 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js index 2e3c0c4f..69cfa1fa 100644 --- a/pc4mobx/hrmSalary/apis/ruleconfig.js +++ b/pc4mobx/hrmSalary/apis/ruleconfig.js @@ -6,6 +6,10 @@ export const commonEnumList = (params) => { return WeaTools.callApi("/api/bs/hrmsalary/common/enum/list", "GET", params); }; +export const sysinfo = params => { + return WeaTools.callApi("/api/bs/hrmsalary/sys/info", "GET", params); +}; + export const sysOrderRule = params => { return WeaTools.callApi("/api/bs/hrmsalary/sys/orderRule", "GET", params); }; @@ -47,6 +51,10 @@ export const operateTaxDeclarationFunction = (params) => { export const saveArchiveDelete = (params) => { return postFetch("/api/bs/hrmsalary/sys/saveArchiveDelete", params); }; +//保存系统规则开关 +export const saveSysOperate = (params) => { + return postFetch("/api/bs/hrmsalary/sys/operate", params); +}; //保存个税申报撤回规则 export const saveWithDrawTaxDeclaration = (params) => { return postFetch("/api/bs/hrmsalary/sys/saveWithDrawTaxDeclaration", params); diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js index 723b56b3..76913307 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js @@ -24,6 +24,7 @@ import { import ImportModal from "../../../components/importModal"; import { importEmployColumns } from "../../taxAgent/columns"; import ExternalPersonModal from "../../../components/externalPersonModal"; +import { sysinfo } from "../../../apis/ruleconfig"; const APIFox = { listInclude: getLedgerPersonRangeInclude, @@ -55,10 +56,26 @@ class LedgerAssociatedPersonnel extends Component { visible: false, title: "关联人员", includeType: "" - } + }, + extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭 }; } + componentDidMount() { + this.getSysinfo(); + } + + /* + * Author: 黎永顺 + * Description: 非系统人员开关查询 + * Params: + * Date: 2023/7/14 + */ + getSysinfo = () => { + sysinfo().then(({ status, data }) => { + if (status) this.setState({ extEmpsWitch: data.extEmpsWitch }); + }); + }; /* * Author: 黎永顺 * Description:外部人员保存 @@ -202,7 +219,7 @@ class LedgerAssociatedPersonnel extends Component { importParams, previewDataSource, externalPersonModalVisible, - loading + loading, extEmpsWitch } = this.state; const { taxAgentStore: { showOperateBtn }, editId, saveSalarySobId } = this.props; const topTab = [ @@ -257,7 +274,7 @@ class LedgerAssociatedPersonnel extends Component { return (
{ + sysinfo().then(({ status, data }) => { + if (status) this.setState({ extEmpsWitch: data.extEmpsWitch }); + }); + }; + handleReceive = ({ data }) => { const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props; const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({ @@ -703,7 +718,8 @@ class Index extends Component { showSearchAd, slideParams, changeSalaryVisible, - paysetParams + paysetParams, + extEmpsWitch } = this.state; const { payrollFilesStore: { tableStore } } = this.props; const renderSearch = () => { @@ -762,7 +778,7 @@ class Index extends Component { dropMenuDatas={rightMenu} > ({ key: it.value, showname: it.defaultLabel })); const orderOptions = _.map(orderRuleEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); const ascOptions = _.map(ascOrDescEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); const employeeOptions = _.map(matchEmployeeModeEnum.data, it => ({ key: it.value, showname: it.defaultLabel })); - const { data: { ascOrDesc, orderRule } } = orderRules; - const { data: rule } = codeRule; const { data: { - showEncryptOperationButton, - isOpenEncrypt: enctry, - isOpenTaxDeclaration: operateTaxDeclaration, - salaryAcctEmployeeRule: matchRule, - salaryArchiveDelete: confValue, withDrawTaxDeclaration + ascOrDesc = "", orderRule = "", showEncryptOperationButton, matchEmployeeMode: rule = "", + taxDeclarationFunction: operateTaxDeclaration = "0", salaryArchiveDelete: confValue, + salaryAcctEmployeeRule: matchRule, WITHDRAW_TAX_DECLARATION: withDrawTaxDeclaration = "0", + OPEN_APPLICATION_ENCRYPT: enctry = "0", extEmpsWitch = "0" } - } = appSettings; + } = sysInfo; + // const { data: { ascOrDesc, orderRule } } = orderRules; + // const { data: rule } = codeRule; + // const { + // data: { + // showEncryptOperationButton, + // isOpenEncrypt: enctry + // isOpenTaxDeclaration: operateTaxDeclaration, + // salaryAcctEmployeeRule: matchRule, + // salaryArchiveDelete: confValue, + // withDrawTaxDeclaration + // } + // } = appSettings; this.setState({ matchRuleOptions, orderOptions, ascOptions, employeeOptions, showEncryptOperationButton, saveParams: { ...saveParams, - ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration + ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration, + extEmpsWitch } }); } + sysinfo = () => { + return API.sysinfo(); + }; + sysOrderRule = () => { return API.sysOrderRule(); }; @@ -210,6 +227,16 @@ export default class Index extends Component { } }); }; + saveSysOperate = (payload) => { + API.saveSysOperate({ ...payload, confValue: this.state.saveParams.extEmpsWitch }) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(22619, "保存成功!")); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }; withDrawTaxDeclaration = () => { API.saveWithDrawTaxDeclaration({ confValue: _.pick(this.state.saveParams, ["withDrawTaxDeclaration"]).withDrawTaxDeclaration }) .then(({ status, errormsg }) => { @@ -256,6 +283,12 @@ export default class Index extends Component { case "withDrawTaxDeclaration": this.withDrawTaxDeclaration(); break; + case "extEmpsWitch": + this.saveSysOperate({ + title: getLabel(111, "开启非系统人员"), + module: "basic", confKey: key + }); + break; default: break; } @@ -289,7 +322,8 @@ export default class Index extends Component { operateTaxDeclaration, matchRule, confValue, - withDrawTaxDeclaration + withDrawTaxDeclaration, + extEmpsWitch } = saveParams; return (
@@ -330,7 +364,7 @@ export default class Index extends Component { } - this.handleChange("operateTaxDeclaration", val)}/> @@ -351,6 +385,12 @@ export default class Index extends Component { /> + + + this.handleChange("extEmpsWitch", val)}/> + + { this.state.progressVisible && { - onChangeTab && onChangeTab(includeType); - } - ); + componentDidMount() { + this.getSysinfo(); } + /* + * Author: 黎永顺 + * Description: 非系统人员开关查询 + * Params: + * Date: 2023/7/14 + */ + getSysinfo = () => { + sysinfo().then(({ status, data }) => { + if (status) this.setState({ extEmpsWitch: data.extEmpsWitch }); + }); + }; + onSelectChange = selectedRowKeys => { this.setState({ selectedRowKeys }); }; @@ -125,7 +130,7 @@ export default class SlideTaxagentUser extends React.Component { externalPersonModalVisible, importParams, previewDataSource, - showSearchAd + showSearchAd, extEmpsWitch } = this.state; const { submitLoading, @@ -193,11 +198,18 @@ export default class SlideTaxagentUser extends React.Component { return (
Date: Fri, 14 Jul 2023 15:31:57 +0800 Subject: [PATCH 43/61] =?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 44/61] =?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)} /> From 778ca2655b6da3b8a22b3e6b0f5858b564a2ef6d 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 11:26:13 +0800 Subject: [PATCH 45/61] =?UTF-8?q?=E8=96=AA=E8=B5=84=E6=A0=B8=E7=AE=97?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=88=97=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/calculateDetail/index.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js index 72ce7a6b..c81deac9 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js @@ -3,14 +3,24 @@ import UserSure from "./userSure"; import { inject, observer } from "mobx-react"; import SalaryDetail from "./salaryDetail"; import { Button, Dropdown, Menu, message, Modal } from "antd"; -import { WeaBrowser, WeaCheckbox, WeaDropdown, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom"; +import { + WeaBrowser, + WeaCheckbox, + WeaDropdown, + WeaFormItem, + WeaInput, + WeaLocaleProvider, + WeaSearchGroup, + WeaSelect, + WeaTab +} from "ecCom"; import { convertToUrlString, getQueryString } from "../../util/url"; import AcctResultImportModal from "./acctResult/importModal/acctResultImportModal"; import ProgressModal from "../../components/progressModal"; import { salaryacctAcctresultCheckAuth } from "../../apis/calculate"; import Authority from "../mySalary/authority"; - +const getLabel = WeaLocaleProvider.getLabel; const { ButtonSelect } = WeaDropdown; @inject("calculateStore", "salaryFileStore", "taxAgentStore") @@ -239,6 +249,9 @@ export default class CalculateDetail extends React.Component { window.open( `/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=${this.id}&ids=&${convertToUrlString(payload)}` ); + } else if (e.key === "4") { + // 自定义导出 + } }; @@ -291,6 +304,7 @@ export default class CalculateDetail extends React.Component { 导入 线下对比 导出全部 + {getLabel(111, "自定义导出")}
); From 4fa57ba637135dab8e9697ddd26891969a0345fa 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 11:43:14 +0800 Subject: [PATCH 46/61] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=8D=E9=A6=88=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/mobilePayroll/index.js | 3 ++- pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index c76483cf..c2793533 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -118,7 +118,8 @@ export default class MobilePayroll extends React.Component { }; handleGoFeedback = () => { const { mySalaryBillData } = this.state; - const { feedbackUrl } = mySalaryBillData; + const { salaryTemplate } = mySalaryBillData; + const { feedbackUrl } = salaryTemplate; window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`); }; diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js index 9590070e..c614c952 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js +++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js @@ -56,7 +56,8 @@ class MySalaryView extends Component { }; handleGoFeedback = () => { const { mySalaryStore } = this.state; - const { feedbackUrl } = mySalaryStore; + const { salaryTemplate } = mySalaryStore; + const { feedbackUrl } = salaryTemplate; window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`); }; From 2af9059775229c650fe480d0614a9c699beec99b 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 14:43:01 +0800 Subject: [PATCH 47/61] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=8D=E9=A6=88=E8=B7=B3=E8=BD=AC=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/payroll.js | 4 +++ .../hrmSalary/pages/mobilePayroll/index.js | 24 +++++++++++++----- .../hrmSalary/pages/mySalary/mySalaryView.js | 25 ++++++++++++++----- 3 files changed, 41 insertions(+), 12 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js index 6f48f359..14c949d5 100644 --- a/pc4mobx/hrmSalary/apis/payroll.js +++ b/pc4mobx/hrmSalary/apis/payroll.js @@ -375,6 +375,10 @@ export const sendMobileCode = (params) => { export const payrollCheckType = params => { return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params); }; +//工资单-反馈验证 +export const feedBackSalaryBill = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/feedBackSalaryBill", "GET", params); +}; //工资单-确认 export const confirmSalaryBill = params => { return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", params); diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index c2793533..05a4c36f 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -2,13 +2,13 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { getQueryString } from "../../util/url"; import { WeaDialog, WeaError, WeaInput, WeaLocaleProvider } from "ecCom"; -import { Button, message } from "antd"; +import { Button, message, Modal } from "antd"; import Authority from "../mySalary/authority"; import ComputerTemplate from "../payroll/templatePreview/computerTemplate"; import PhoneTemplate from "../payroll/templatePreview/phoneTemplate"; import "../payroll/templatePreview/index.less"; import * as API from "../../apis/mySalaryBenefits"; -import { confirmSalaryBill, payrollCheckType } from "../../apis/payroll"; +import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll"; import "./index.less"; import CaptchaModal from "../../components/captchaModal"; import { ConfirmBtns } from "../mySalary/mySalaryView"; @@ -117,10 +117,22 @@ export default class MobilePayroll extends React.Component { }); }; handleGoFeedback = () => { - const { mySalaryBillData } = this.state; - const { salaryTemplate } = mySalaryBillData; - const { feedbackUrl } = salaryTemplate; - window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`); + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "请确认薪资信息是有误,进行反馈并发起反馈流程。"), + onOk: () => { + feedBackSalaryBill({ salaryInfoId: getQueryString("id") }).then(({ status, errorMsg }) => { + if (status) { + const { mySalaryBillData } = this.state; + const { salaryTemplate } = mySalaryBillData; + const { feedbackUrl } = salaryTemplate; + window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`); + } else { + message.error(errorMsg); + } + }); + } + }); }; render() { diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js index c614c952..24bf675e 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js +++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js @@ -6,11 +6,11 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { Button, message } from "antd"; +import { Button, message, Modal } from "antd"; import { WeaLocaleProvider } from "ecCom"; import Authority from "./authority"; import ComputerTemplate from "../payroll/templatePreview/computerTemplate"; -import { confirmSalaryBill, payrollCheckType } from "../../apis/payroll"; +import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll"; import CaptchaModal from "../../components/captchaModal"; import "../payroll/templatePreview/index.less"; @@ -55,10 +55,23 @@ class MySalaryView extends Component { }); }; handleGoFeedback = () => { - const { mySalaryStore } = this.state; - const { salaryTemplate } = mySalaryStore; - const { feedbackUrl } = salaryTemplate; - window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`); + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "请确认薪资信息是有误,进行反馈并发起反馈流程。"), + onOk: () => { + const { params: { salaryInfoId } } = this.props; + feedBackSalaryBill({ salaryInfoId }).then(({ status, errorMsg }) => { + if (status) { + const { mySalaryStore } = this.state; + const { salaryTemplate } = mySalaryStore; + const { feedbackUrl } = salaryTemplate; + window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`); + } else { + message.error(errorMsg); + } + }); + } + }); }; render() { From 8ca7a02f82a4c127485bd556f08568650ebfa509 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 15:21:05 +0800 Subject: [PATCH 48/61] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=8D=E9=A6=88=E8=B7=B3=E8=BD=AC=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/payroll/stepForm/baseInformForm.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js index a6bd2e67..6dab5f84 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js @@ -56,7 +56,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 @@ -101,7 +101,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 })} /> { @@ -150,7 +150,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 })} /> } @@ -161,7 +161,7 @@ export default class BaseInformForm extends React.Component { > this.hanldeChange({ description: value })} + onChange={value => this.handleChange({ description: value })} /> @@ -169,18 +169,18 @@ 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({ + onChange={value => this.handleChange({ ackFeedbackStatus: value === "1", autoAckDays: 7, feedbackUrl: "/" @@ -192,13 +192,13 @@ export default class BaseInformForm extends React.Component { this.hanldeChange({ autoAckDays })} + onChange={autoAckDays => this.handleChange({ autoAckDays })} /> this.hanldeChange({ feedbackUrl })} + onChange={feedbackUrl => this.handleChange({ feedbackUrl })} />
From 57958f9bf909f52506387a5989ff56b4f9845092 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 16:49:02 +0800 Subject: [PATCH 49/61] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E6=8C=89=E8=87=AA=E5=AE=9A=E4=B9=89=E5=88=97?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/calculate.js | 17 +++ .../calculateDetail/customExportDialog.js | 127 ++++++++++++++++++ .../hrmSalary/pages/calculateDetail/index.js | 44 +++++- 3 files changed, 184 insertions(+), 4 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/calculateDetail/customExportDialog.js diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js index 2ffee227..b14015a7 100644 --- a/pc4mobx/hrmSalary/apis/calculate.js +++ b/pc4mobx/hrmSalary/apis/calculate.js @@ -568,3 +568,20 @@ export const cacheImportField = (params) => { export const salaryacctAcctresultCheckAuth = params => { return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/acctresult/checkAuth", "GET", params); }; + +//薪资核算-导出核算结果前生成可选的薪资项目 +export const getExportField = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/acctresult/exportField", "GET", params); +}; + +//薪资核算-导出薪资核算添加表头字段缓存 +export const customCacheExportField = (params) => { + return fetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheExportField", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/customExportDialog.js b/pc4mobx/hrmSalary/pages/calculateDetail/customExportDialog.js new file mode 100644 index 00000000..601890a1 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculateDetail/customExportDialog.js @@ -0,0 +1,127 @@ +/* + * Author: 黎永顺 + * name: 薪资核算-自定义导出字段弹框 + * Description: + * Date: 2023/7/17 + */ +import React, { Component } from "react"; +import { Button, Col, message, Row } from "antd"; +import { WeaCheckbox, WeaDialog, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import { customCacheExportField } from "../../apis/calculate"; +import { convertToUrlString, getQueryString } from "../../util/url"; +import "./acctResult/importModal/index.less"; + + +const { getLabel } = WeaLocaleProvider; + +class CustomExportDialog extends Component { + constructor(props) { + super(props); + this.state = { + itemsCheckeds: [], + showOnlyChecked: false + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) { + this.setState({ + itemsCheckeds: !_.isEmpty(nextProps.checkItems) ? nextProps.checkItems : [] + }); + } + } + + customExportClick = () => { + const { searchItemsValue } = this.props; + const { itemsCheckeds } = this.state; + customCacheExportField({ salaryItems: _.map(itemsCheckeds, it => it.toString()) }).then(({ status, errorMsg }) => { + if (status) { + const { consolidatedTaxation, ...extra } = searchItemsValue; + const payload = { ...extra, consolidatedTaxation: consolidatedTaxation === "0" ? "" : consolidatedTaxation }; + window.open( + `/api/bs/hrmsalary/salaryacct/acctresult/exportWithCustomFields?salaryAcctRecordId=${getQueryString("id")}&ids=&${convertToUrlString(payload)}&salaryItemIds=${itemsCheckeds.join(",")}` + ); + } else { + message.error(errorMsg); + } + }); + }; + handleShowOnlyChecked = (showOnlyChecked) => this.setState({ showOnlyChecked: !!Number(showOnlyChecked) }); + handleSelectGroupAll = (groupId, checked) => { + const { itemsCheckeds } = this.state; + const { itemsByGroup } = this.props; + _.map(itemsByGroup, item => { + if (item.salarySobItemGroupId === groupId) { + if (!!Number(checked)) { + this.setState({ + itemsCheckeds: [...itemsCheckeds, ..._.map(item.salaryItems, child => child.salaryItemId)] + }); + } else { + this.setState({ + itemsCheckeds: _.differenceWith(itemsCheckeds, _.map(item.salaryItems, child => child.salaryItemId), _.isEqual) + }); + } + } + }); + }; + + render() { + const { showOnlyChecked, itemsCheckeds } = this.state; + const { itemsByGroup } = this.props; + let dataSource = _.map(itemsByGroup, item => { + return { + ...item, + salaryItems: _.map(item.salaryItems, child => { + return { ...child, checked: itemsCheckeds.includes(child.salaryItemId) }; + }) + }; + }); + if (showOnlyChecked) { + dataSource = _.map(dataSource, item => { + return { ...item, salaryItems: _.filter(item.salaryItems, it => !!it.checked) }; + }); + } + return ( + {getLabel(17416, "导出")}, + + ]} + bottomLeft={} + > + { + _.map(dataSource, item => { + const { salarySobItemGroupName, salaryItems, salarySobItemGroupId } = item; + const value = _.every(salaryItems, it => !!it.checked) ? "1" : "0"; + return this.handleSelectGroupAll(salarySobItemGroupId, val)}/>}> + + { + !_.isEmpty(salaryItems) ? + _.map(salaryItems, it => { + const { salaryItemId, salaryItemName, checked } = it; + return + this.setState({ itemsCheckeds: _.xorWith(itemsCheckeds, [salaryItemId], _.isEqual) })}/> + ; + }) : {getLabel(83553, "暂无数据")} + } + + ; + }) + } + + ); + } +} + +export default CustomExportDialog; diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js index c81deac9..d43cfb66 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js @@ -17,7 +17,8 @@ import { import { convertToUrlString, getQueryString } from "../../util/url"; import AcctResultImportModal from "./acctResult/importModal/acctResultImportModal"; import ProgressModal from "../../components/progressModal"; -import { salaryacctAcctresultCheckAuth } from "../../apis/calculate"; +import { getExportField, salaryacctAcctresultCheckAuth } from "../../apis/calculate"; +import CustomExportDialog from "./customExportDialog"; import Authority from "../mySalary/authority"; const getLabel = WeaLocaleProvider.getLabel; @@ -46,7 +47,10 @@ export default class CalculateDetail extends React.Component { progress: 0, accountIds: [], accountExceptInfo: "", - calculateAuth: false + calculateAuth: false, + customExportParams: { + visible: false, checkItems: [], itemsByGroup: [] + } }; this.id = ""; this.timer = null; @@ -251,10 +255,24 @@ export default class CalculateDetail extends React.Component { ); } else if (e.key === "4") { // 自定义导出 - + this.getExportField(); } }; + getExportField = () => { + getExportField({ salaryAcctRecordId: getQueryString("id") }).then(({ status, data }) => { + if (status) { + const { checkItems, itemsByGroup } = data; + this.setState({ + customExportParams: { + visible: true, + checkItems, itemsByGroup + } + }); + } + }); + }; + // 导入表单添加表头回调 handleAcctModalAdd(fieldData) { this.setState({ @@ -297,7 +315,14 @@ export default class CalculateDetail extends React.Component { }; render() { - const { selectedKey, acctResultImportVisiable, showSearchAd, calculateAuth } = this.state; + const { + selectedKey, + acctResultImportVisiable, + showSearchAd, + calculateAuth, + customExportParams, + searchItemsValue + } = this.state; const { taxAgentStore: { payrollPermission } } = this.props; const menu = ( @@ -431,6 +456,17 @@ export default class CalculateDetail extends React.Component { }} progress={this.state.progress} />} + { + this.setState({ + customExportParams: { + visible: false, checkItems: [], itemsByGroup: [] + } + }); + }} + />
); From 377039ade2fdf5d48c0856f86ca16ce42aafe472 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 17:40:30 +0800 Subject: [PATCH 50/61] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=8D=E9=A6=88=E6=B7=BB=E5=8A=A0=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payroll/index.js | 2 +- .../pages/payroll/stepForm/baseInformForm.js | 11 ++++++++++- .../hrmSalary/pages/payroll/templateBaseSettings.js | 6 ++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index c974b699..10c526ea 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -506,7 +506,7 @@ export default class Payroll extends React.Component { className="slideOuterWrapper" visible={this.state.editSlideVisible} top={0} - width={50} + width={65} height={100} direction="right" measure="%" diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js index 5a3d8681..94719f8d 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js @@ -2,6 +2,7 @@ import React from "react"; import { WeaCheckbox, WeaFormItem, + WeaHelpfulTip, WeaInput, WeaInputNumber, WeaLocaleProvider, @@ -201,9 +202,12 @@ export default class BaseInformForm extends React.Component { autoSendStatus: value === "1", autoSendDayOfMonth: value === "1" ? "1" : null, autoSendTimeOfDay: value === "1" ? "09:00" : null, - autoSendCycleType: value === "1" ? 1 : null, + autoSendCycleType: value === "1" ? 1 : null }); }}/> + { autoSendStatus && @@ -236,8 +240,13 @@ export default class BaseInformForm extends React.Component { this.handleChange({ autoAckDays })} /> + this.setState({ ackFeedbackSetting: { ...ackFeedbackSetting, autoAckDays } })}/> + Date: Tue, 18 Jul 2023 15:25:16 +0800 Subject: [PATCH 51/61] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86=E6=B7=BB=E5=8A=A0=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E9=9A=90=E8=97=8F=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fieldManagement/components/fieldSlide.js | 31 +++++- .../fieldManagement/components/fieldTable.js | 2 +- pc4mobx/hrmSalary/pages/salaryItem/columns.js | 101 ++++++++++-------- pc4mobx/hrmSalary/pages/salaryItem/index.js | 24 ++++- .../pages/salaryItem/salaryItemForm.js | 6 +- .../pages/salaryItem/systemSalaryItemModal.js | 2 +- pc4mobx/hrmSalary/stores/salaryItem.js | 2 + 7 files changed, 111 insertions(+), 57 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js index 94295816..b3217d65 100644 --- a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js +++ b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js @@ -6,13 +6,25 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaSlideModal, WeaTextarea, WeaInputNumber } from "ecCom"; +import { + WeaCheckbox, + WeaFormItem, + WeaHelpfulTip, + WeaInput, + WeaInputNumber, + WeaLocaleProvider, + WeaSelect, + WeaSlideModal, + WeaTextarea +} from "ecCom"; import { message, Modal } from "antd"; import SlideModalTitle from "../../../components/slideModalTitle"; import { getSalaryFieldForm, saveSalaryField } from "../../../apis/fieldManage"; import { commonEnumList } from "../../../apis/payrollFiles"; import { dataTypeOptions, patternOptions, roundingModeOptions } from "../../salaryItem/options"; +const getLabel = WeaLocaleProvider.getLabel; + @inject("taxAgentStore") @observer class FieldSlide extends Component { @@ -54,6 +66,7 @@ class FieldSlide extends Component { const { name, useDefault, + hideDefault, useInEmployeeSalary, dataType, description, @@ -68,6 +81,7 @@ class FieldSlide extends Component { name, useInEmployeeSalary: useInEmployeeSalary ? useInEmployeeSalary.toString() : "0", useDefault: useDefault ? useDefault.toString() : "0", + hideDefault: hideDefault ? hideDefault.toString() : "0", dataType, description, sortedIndex, @@ -120,6 +134,7 @@ class FieldSlide extends Component { const { name, useDefault, + hideDefault, useInEmployeeSalary, dataType, description, @@ -133,6 +148,7 @@ class FieldSlide extends Component { name, useInEmployeeSalary: Number(useInEmployeeSalary), useDefault: Number(useDefault), + hideDefault: Number(hideDefault), dataType, description, sortedIndex, @@ -168,6 +184,7 @@ class FieldSlide extends Component { name: "", useInEmployeeSalary: "1", useDefault: "0", + hideDefault: "0", sharedType: "0", taxAgentIds: "", dataType: "number", @@ -191,6 +208,7 @@ class FieldSlide extends Component { name, useInEmployeeSalary, useDefault, + hideDefault, shareTypeList, sharedType, taxAgentIds, @@ -250,6 +268,17 @@ class FieldSlide extends Component { placement="topLeft" /> + + this.handleChangeFields("hideDefault", value)} + /> + + { const { dataIndex } = item; - if (dataIndex === "useDefault") { + if (dataIndex === "useDefault" || dataIndex === "hideDefault") { item.render = (text) => (); } else if (dataIndex === "operate") { item.width = 120; diff --git a/pc4mobx/hrmSalary/pages/salaryItem/columns.js b/pc4mobx/hrmSalary/pages/salaryItem/columns.js index 573795b4..ce744d37 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/columns.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/columns.js @@ -1,5 +1,7 @@ +import { WeaLocaleProvider } from "ecCom"; import { dataTypeOptions, patternOptions, roundingModeOptions } from "./options"; +const getLabel = WeaLocaleProvider.getLabel; export const columns = [ { title: "名称", @@ -54,11 +56,11 @@ export const columns = [ ]; export const salaryItemFields = [ { - key: 'name', - label: '名称', - type: 'INPUT', + key: "name", + label: "名称", + type: "INPUT", viewAttr: 3, - tip: '' + tip: "" }, // { // key: 'useInEmployeeSalary', @@ -68,63 +70,70 @@ export const salaryItemFields = [ // tip: '提示:开启后,该薪资项目不可删除或设为无效,取值方式会默认置为输入' // }, { - key: 'useDefault', - label: '默认使用', - type: 'SWITCH', + key: "useDefault", + label: "默认使用", + type: "SWITCH", viewAttr: 2, - tip: '提示:开启后,每个薪资方案都有该薪资项目,可在具体薪资方案中删除' + tip: "提示:开启后,每个薪资方案都有该薪资项目,可在具体薪资方案中删除" }, { - key: 'sharedType', - label: '可见性', - type: 'SELECT', + key: "hideDefault", + label: getLabel(111, "默认隐藏"), + type: "SWITCH", viewAttr: 2, - tip: '' + tip: getLabel(111, "提示:开启后,在薪资账套中添加该项目时,默认勾选隐藏且在核算时隐藏该薪资项目,可在具体薪资账套中设置是否隐藏") }, { - key: 'taxAgentIds', - label: '可见性范围', - type: 'SELECT', + key: "sharedType", + label: "可见性", + type: "SELECT", + viewAttr: 2, + tip: "" + }, + { + key: "taxAgentIds", + label: "可见性范围", + type: "SELECT", viewAttr: 3, - tip: '' + tip: "" }, { - key: 'dataType', - label: '字段类型', - type: 'SELECT', + key: "dataType", + label: "字段类型", + type: "SELECT", viewAttr: 3, options: dataTypeOptions, - tip: '' + tip: "" }, { - key: 'roundingMode', - label: '舍入规则', - type: 'SELECT', + key: "roundingMode", + label: "舍入规则", + type: "SELECT", viewAttr: 2, options: roundingModeOptions, - tip: '' + tip: "" }, { - key: 'pattern', - label: '保留小数位', - type: 'SELECT', + key: "pattern", + label: "保留小数位", + type: "SELECT", viewAttr: 2, options: patternOptions, - tip: '' + tip: "" }, { - key: 'valueType', - label: '取值方式', - type: 'RADIO', + key: "valueType", + label: "取值方式", + type: "RADIO", viewAttr: 2, - tip: '' + tip: "" }, { - key: 'formulaContent', - label: '公式', - type: 'INPUT', + key: "formulaContent", + label: "公式", + type: "INPUT", viewAttr: 2, - tip: '' + tip: "" }, { key: "sortedIndex", @@ -134,18 +143,18 @@ export const salaryItemFields = [ tip: "" }, { - key: 'description', - label: '备注', - type: 'TEXTAREA', + key: "description", + label: "备注", + type: "TEXTAREA", viewAttr: 2, - tip: '' - }, + tip: "" + } +]; +export const valTakeOptions = [ + { key: "1", showname: "输入" }, + { key: "2", showname: "公式" }, + { key: "3", showname: "SQL" } ]; -export const valTakeOptions=[ - {key: "1", showname: '输入'}, - {key: "2", showname: '公式'}, - {key: "3", showname: 'SQL'}, -] diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js index a07c33b2..57ecbbeb 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js @@ -112,9 +112,9 @@ export default class SalaryItem extends React.Component { return { this.onEditItem(record, false); }}>{text}; - case "useInEmployeeSalary": - return ; case "useDefault": + case "hideDefault": + case "useInEmployeeSalary": return ; default: return
; @@ -366,9 +366,23 @@ export default class SalaryItem extends React.Component { { - systemItemVisible && { - setSystemItemVisible(false); - }}/> + systemItemVisible && + { + setSystemItemVisible(false); + }} + onInitTableList={() => { + getTableDatas({ ...this.state.searchParams, name: this.state.searchValue }).then(res => { + this.setState({ + searchParams: { + ...this.state.searchParams, + total: res.total + } + }); + }); + }} + /> } { editSlideVisible && diff --git a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js index 1f09d059..05a3ba25 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js @@ -5,7 +5,7 @@ * Date: 2023/2/9 */ import React, { Component } from "react"; -import { WeaCheckbox, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect, WeaTextarea, WeaInputNumber } from "ecCom"; +import { WeaCheckbox, WeaFormItem, WeaInput, WeaInputNumber, WeaSearchGroup, WeaSelect, WeaTextarea } from "ecCom"; import { salaryItemFields, valTakeOptions } from "./columns"; class SalaryItemForm extends Component { @@ -86,7 +86,7 @@ class SalaryItemForm extends Component { if (key === "valueType") { onChangeFieldsItem({ formulaContent: "", formulaId: 0, valueType: v }); } else { - onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary") ? Number(v) : v }); + onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v }); } }); }; @@ -131,7 +131,7 @@ class SalaryItemForm extends Component { (type === "INPUTNUMBER" && display) ? this.handleChangeSalaryFiledItems(key, v)}/> + onChange={v => this.handleChangeSalaryFiledItems(key, v)}/> : null } ; diff --git a/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js b/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js index 3530ee29..2e7d169f 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js @@ -60,7 +60,7 @@ export default class SystemSalaryItemModal extends React.Component { if (status) { message.success(getLabel(111, "添加成功")); this.setState({ selectedRowKeys: [] }, () => { - this.getSysItemList(); + this.props.onInitTableList(); this.props.onCancel(); }); } else { diff --git a/pc4mobx/hrmSalary/stores/salaryItem.js b/pc4mobx/hrmSalary/stores/salaryItem.js index 6eb365de..696fed61 100644 --- a/pc4mobx/hrmSalary/stores/salaryItem.js +++ b/pc4mobx/hrmSalary/stores/salaryItem.js @@ -23,6 +23,7 @@ export class SalaryItemStore { @observable request = { name: "", useDefault: 0, + hideDefault: 0, useInEmployeeSalary: 0, systemType: 0, roundingMode: "1", @@ -63,6 +64,7 @@ export class SalaryItemStore { initRequest = () => this.request = { name: "", useDefault: 0, + hideDefault: 0, useInEmployeeSalary: 0, systemType: 0, roundingMode: "1", From ee4915093063cc8158d1d0409721d93dad9b997d 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, 18 Jul 2023 15:47:56 +0800 Subject: [PATCH 52/61] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86=E6=B7=BB=E5=8A=A0=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E9=9A=90=E8=97=8F=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/ledgerPage/components/ledgerSalaryItemAddModal.js | 1 + 1 file changed, 1 insertion(+) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js index f0ddd511..470c1956 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js @@ -96,6 +96,7 @@ export default class LedgerSalaryItemAddModal extends React.Component { if (item.id === key) { item.salaryItemId = item.id; item.key = item.id; + item.itemHide = item.hideDefault; item.sortedIndex = (!_.isEmpty(_.maxBy(arrItems, it => it.sortedIndex)) ? _.maxBy(arrItems, it => it.sortedIndex).sortedIndex : 0) + keyIdx + 1; selectItems.push(item); } From 192533e8470deca91d4c5b1754cf49c52ff01da0 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, 18 Jul 2023 16:01:45 +0800 Subject: [PATCH 53/61] =?UTF-8?q?bug-=E8=87=AA=E5=AE=9A=E4=B9=89=E7=A6=8F?= =?UTF-8?q?=E5=88=A9=E5=85=B3=E9=97=AD=E5=90=AF=E7=94=A8=E6=97=B6=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../socialSecurityBenefits/programme/customBenefitsTable.js | 2 +- .../hrmSalary/pages/socialSecurityBenefits/programme/index.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js index 58b51944..ab5cb070 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js @@ -87,7 +87,7 @@ class CustomBenefitsTable extends Component { handleCustomBenefitsSwitch = ({ id }, isUse) => { Modal.confirm({ title: "信息确认", - content: `确认要${isUse ? "启用" : "停用"}吗`, + content: `确认要${isUse === "1" ? "启用" : "停用"}吗`, onOk: () => { const payload = { id, isUse }; updateCustomCategoryStatus(payload).then(({ status, errormsg }) => { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js index d9350651..1181f8a0 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js @@ -16,7 +16,6 @@ import CopySchemaModal from "./copySchemaModal"; import CustomBenefitsTable from "./customBenefitsTable"; import "./index.less"; - const { getLabel } = WeaLocaleProvider; @inject("programmeStore", "taxAgentStore", "salaryFileStore") @observer From 4e3e090c3c14513af32247fca1bfa8c06c6842d9 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, 18 Jul 2023 16:50:16 +0800 Subject: [PATCH 54/61] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=9A=90=E8=97=8F=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/ledgerPage/components/ledgerSalaryItemAddModal.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js index 470c1956..774269f5 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js @@ -74,8 +74,9 @@ export default class LedgerSalaryItemAddModal extends React.Component { let valueSpan = record[newColumn.dataIndex + "span"] !== undefined ? record[newColumn.dataIndex + "span"] : record[newColumn.dataIndex]; switch (newColumn.dataIndex) { case "useDefault": + case "hideDefault": case "useInEmployeeSalary": - return ; + return ; default: return
; } From da3fd957aba7d06de976fb1e7cc5891183204ba2 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, 18 Jul 2023 17:27:51 +0800 Subject: [PATCH 55/61] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=A7=84=E5=88=99?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=B3=BB=E7=BB=9F=E7=AE=97=E7=A8=8E=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E5=85=B3=E9=97=AD=E5=90=8E=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 1de2e589..dafb4d07 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -225,7 +225,7 @@ export default class Index extends Component { const { saveParams } = this.state; Modal.confirm({ title: getLabel(131329, "信息确认"), - content: getLabel(111, "确认要保存吗?"), + content: (key === "operateTaxDeclaration" && val === "0") ? getLabel(111, "关闭之后,将无法开启,确认要保存吗?") : getLabel(111, "确认要保存吗?"), onOk: () => { this.setState({ saveParams: { @@ -331,6 +331,7 @@ export default class Index extends Component { this.handleChange("operateTaxDeclaration", val)}/> From 77645b717ac0320bd56e6275ccf24ab42953075f 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, 18 Jul 2023 17:31:13 +0800 Subject: [PATCH 56/61] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=B7=BB=E5=8A=A0=E9=BB=98=E8=AE=A4=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/fieldManagement/components/fieldSlide.js | 2 +- pc4mobx/hrmSalary/pages/salaryItem/columns.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js index b3217d65..77e8d62f 100644 --- a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js +++ b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js @@ -268,7 +268,7 @@ class FieldSlide extends Component { placement="topLeft" /> - + Date: Thu, 20 Jul 2023 13:35:37 +0800 Subject: [PATCH 57/61] =?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=E6=B7=BB=E5=8A=A0=E5=8F=91=E6=94=BE?= =?UTF-8?q?=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AE=E5=90=8D=E7=A7=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payroll/index.js | 2 +- .../pages/payroll/stepForm/index.less | 2 + .../payroll/stepForm/salaryItemSettings.js | 69 ++++++++++++++++++- .../pages/payroll/stepForm/showSettingForm.js | 4 +- pc4mobx/hrmSalary/stores/payroll.js | 4 ++ 5 files changed, 75 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index c974b699..7c22d715 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -316,7 +316,7 @@ export default class Payroll extends React.Component { { showOperateBtn && } { diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less b/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less index f30d0063..ebcbbe4c 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less @@ -192,9 +192,11 @@ .salaryItemName { width: 100%; + min-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + cursor: pointer; } i.anticon-cross { diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js index c1441f0c..ca07715c 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js @@ -22,7 +22,9 @@ class SalaryItemSettings extends Component { title: "", groupId: "", groupName: "", - options: [] + options: [], + salaryItemName: "", + salaryItemId: "" } }; } @@ -98,7 +100,9 @@ class SalaryItemSettings extends Component { title: "", groupId: "", groupName: "", - options: [] + options: [], + salaryItemName: "", + salaryItemId: "" } }); }; @@ -211,6 +215,57 @@ class SalaryItemSettings extends Component { }); } }; + handleEditSalaryItemName = (item, field, viewAttr, name) => { + const { salaryBillItemNameSet } = this.props; + const { groupId } = item, { salaryItemId } = field, { dataList } = this.state; + if (groupId === "111111111111111111") return; + this.setState({ + dataList: _.map(dataList, item => { + if (item.groupId === groupId) { + return { + ...item, + items: _.map(item.items, child => { + if (child.salaryItemId === salaryItemId) { + console.log(child, name); + const originName = salaryBillItemNameSet[salaryItemId] && salaryBillItemNameSet[salaryItemId].salaryItemName; + return { + ...child, + name: (name && name !== (originName || child.originName)) ? `${child.name}(${originName || child.originName})` : `${child.name}`, + viewAttr + }; + } + return { ...child, viewAttr: 1 }; + }) + }; + } + return { + ...item, + items: _.map(item.items, child => { + return { ...child, viewAttr: 1 }; + }) + }; + }) + }); + }; + handleChangeSalaryItemShowName = (item, field, name) => { + const { groupId } = item, { salaryItemId } = field, { dataList } = this.state; + this.setState({ + dataList: _.map(dataList, item => { + if (item.groupId === groupId) { + return { + ...item, + items: _.map(item.items, child => { + if (child.salaryItemId === salaryItemId) { + return { ...child, name }; + } + return { ...child }; + }) + }; + } + return { ...item }; + }) + }, () => this.props.onChangeSalaryItem(this.state.dataList)); + }; render() { const { onChangeSalaryItem } = this.props; @@ -248,7 +303,15 @@ class SalaryItemSettings extends Component { renderNodeItem={(filed) => { return
-
{filed.name}
+ { + filed.viewAttr === 2 ? + this.handleEditSalaryItemName(item, filed, 1, val)} + onChange={(val) => this.handleChangeSalaryItemShowName(item, filed, val)} + /> : +
this.handleEditSalaryItemName(item, filed, 2)}>{filed.name}
+ } this.handleDeleteSalaryItem(item, filed)}/>
; diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js index 3b27a87b..9b18e299 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js @@ -45,7 +45,7 @@ export default class ShowSettingForm extends React.Component { const { payrollStore, id } = this.props; const salaryTemplateShowSetStorage = (id ? "{}" : window.localStorage.getItem("salary-showset") || "{}"); const { salaryTemplateShowSet } = payrollStore; - const { salaryItemSet, templateBaseData } = payrollStore; + const { salaryItemSet, templateBaseData, salaryBillItemNameSet } = payrollStore; const { theme, background, @@ -142,7 +142,7 @@ export default class ShowSettingForm extends React.Component { dataSource={salaryItemSet} onChangeSalaryItem={this.handleChangeSalaryItem} salarySobId={toJS(templateBaseData).salarySob} - isReplenish={false} + isReplenish={false} salaryBillItemNameSet={salaryBillItemNameSet} />
diff --git a/pc4mobx/hrmSalary/stores/payroll.js b/pc4mobx/hrmSalary/stores/payroll.js index e42cdba0..09d23eef 100644 --- a/pc4mobx/hrmSalary/stores/payroll.js +++ b/pc4mobx/hrmSalary/stores/payroll.js @@ -26,6 +26,7 @@ export class payrollStore { @observable salaryTemplateShowSet = {}; // 显示设置基础表单 @observable replenishSalaryTemplateSalaryItemSet = []; // 补发工资单模版基础表单 @observable salaryItemSet = []; // 显示设置薪资项 + @observable salaryBillItemNameSet = {}; // 工资单模板薪资项目名称修改列表 // **** 工资单页面 **** @observable salarySendTableStore = new TableStore(); // 工资单列表 @@ -214,6 +215,7 @@ export class payrollStore { if (res.status) { if (id !== "") { this.salaryItemSet = res.data.salaryTemplateSalaryItemSet; + this.salaryBillItemNameSet = res.data.salaryBillItemNameSet; this.replenishSalaryTemplateSalaryItemSet = res.data.salaryTemplateSalaryItemSet; } this.salaryTemplateShowSet = { ...res.data.salaryTemplateShowSet.data, ...JSON.parse(salaryTemplateShowSetStorage) }; @@ -289,6 +291,8 @@ export class payrollStore { return new Promise((resolve, reject) => { let params = this.convertParams(); params.id = id; + console.log(params); + return API.updatePayroll(params).then(res => { if (res.status) { message.success("保存成功"); From c48c73a755b30255587d35e800183c60a6ded320 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, 20 Jul 2023 13:40:42 +0800 Subject: [PATCH 58/61] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E9=9D=9E=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E4=BA=BA=E5=91=98=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js b/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js index c6719241..32a53167 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js @@ -95,7 +95,7 @@ export default class SalaryFileViewSlide extends React.Component { { com: PickDate({ label: "最后发薪日期", - viewAttr: (selectedKey === "pending" || selectedKey === "fixed") ? 2 : selectedKey === "stop" ? 1 : 3, + viewAttr: (selectedKey === "pending" || selectedKey === "fixed" || selectedKey === "ext") ? 2 : selectedKey === "stop" ? 1 : 3, value: paysetParams.payEndDate, onChange: handleSetpay }) From f7cd085c92f33e730ab6d8a443fcfe4629035900 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, 20 Jul 2023 16:16:43 +0800 Subject: [PATCH 59/61] =?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=E6=B7=BB=E5=8A=A0=E5=8F=91=E6=94=BE?= =?UTF-8?q?=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AE=E5=90=8D=E7=A7=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payroll/index.js | 4 +- .../payroll/stepForm/salaryItemSettings.js | 38 +++++++++++++------ .../pages/payroll/stepForm/showSettingForm.js | 10 +++++ .../payroll/stepForm/tmplateSettingForm.js | 15 +++++++- pc4mobx/hrmSalary/stores/payroll.js | 19 +++++++++- 5 files changed, 69 insertions(+), 17 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index 7c22d715..f5ae1050 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -64,7 +64,7 @@ export default class Payroll extends React.Component { getReplenishForm = (isEdit = false, params = {}) => { const { payrollStore } = this.props; - const { templateBaseData, salaryTemplateShowSet, setReplenishSalaryTemplateSalaryItemSet } = payrollStore; + const { templateBaseData, salaryTemplateShowSet, setReplenishSalaryTemplateSalaryItemSet, setSalaryBillItemNameSet } = payrollStore; if (!salaryTemplateShowSet.theme && !isEdit) { Modal.warning({ title: "信息确认", @@ -77,10 +77,12 @@ export default class Payroll extends React.Component { if (!isEdit) { this.setState({ currentStep: this.state.currentStep + 1 }, () => { setReplenishSalaryTemplateSalaryItemSet(data.replenishSalaryTemplateSalaryItemSet); + setSalaryBillItemNameSet(data.salaryBillItemNameSet) window.localStorage.setItem("salary-showset", JSON.stringify(salaryTemplateShowSet)); }); } else { setReplenishSalaryTemplateSalaryItemSet(data.replenishSalaryTemplateSalaryItemSet); + setSalaryBillItemNameSet(data.salaryBillItemNameSet) window.localStorage.setItem("salary-showset", JSON.stringify(salaryTemplateShowSet)); } } diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js index ca07715c..720241b6 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js @@ -16,6 +16,7 @@ class SalaryItemSettings extends Component { super(props); this.state = { dataList: [], + itemShowNamesetting: [], //名称修改集合 checkedValue: "", modalPayload: { visible: false, @@ -215,8 +216,7 @@ class SalaryItemSettings extends Component { }); } }; - handleEditSalaryItemName = (item, field, viewAttr, name) => { - const { salaryBillItemNameSet } = this.props; + handleEditSalaryItemName = (item, field, viewAttr) => { const { groupId } = item, { salaryItemId } = field, { dataList } = this.state; if (groupId === "111111111111111111") return; this.setState({ @@ -226,11 +226,8 @@ class SalaryItemSettings extends Component { ...item, items: _.map(item.items, child => { if (child.salaryItemId === salaryItemId) { - console.log(child, name); - const originName = salaryBillItemNameSet[salaryItemId] && salaryBillItemNameSet[salaryItemId].salaryItemName; return { ...child, - name: (name && name !== (originName || child.originName)) ? `${child.name}(${originName || child.originName})` : `${child.name}`, viewAttr }; } @@ -248,7 +245,7 @@ class SalaryItemSettings extends Component { }); }; handleChangeSalaryItemShowName = (item, field, name) => { - const { groupId } = item, { salaryItemId } = field, { dataList } = this.state; + const { groupId } = item, { salaryItemId } = field, { dataList, itemShowNamesetting } = this.state; this.setState({ dataList: _.map(dataList, item => { if (item.groupId === groupId) { @@ -263,12 +260,16 @@ class SalaryItemSettings extends Component { }; } return { ...item }; - }) - }, () => this.props.onChangeSalaryItem(this.state.dataList)); + }), + itemShowNamesetting: _.unionBy([{ salaryItemId, salaryItemShowName: name }], itemShowNamesetting, "salaryItemId") + }, () => { + this.props.onChangeSalaryItem(this.state.dataList); + this.props.onChangeSalaryItemShowNamesetting(this.state.itemShowNamesetting); + }); }; render() { - const { onChangeSalaryItem } = this.props; + const { onChangeSalaryItem, salaryBillItemNameSet } = this.props; const { dataList, modalPayload, checkedValue } = this.state; return (
@@ -301,16 +302,29 @@ class SalaryItemSettings extends Component { }) )} renderNodeItem={(filed) => { + const salaryBillItemNameObj = salaryBillItemNameSet[filed.id] || {}; return
-
+
{ filed.viewAttr === 2 ? this.handleEditSalaryItemName(item, filed, 1, val)} + onBlur={() => this.handleEditSalaryItemName(item, filed, 1)} onChange={(val) => this.handleChangeSalaryItemShowName(item, filed, val)} /> :
this.handleEditSalaryItemName(item, filed, 2)}>{filed.name}
+ onClick={() => this.handleEditSalaryItemName(item, filed, 2)}> + { + (item.groupId !== "111111111111111111" && (!_.isEmpty(salaryBillItemNameObj) || (filed.name !== filed.originName))) ? + `${salaryBillItemNameObj.salaryItemShowName || filed.name}(${filed.originName})` : + filed.name + } +
} this.handleDeleteSalaryItem(item, filed)}/>
diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js index 9b18e299..7cfd9404 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js @@ -40,6 +40,15 @@ export default class ShowSettingForm extends React.Component { const { payrollStore: { setSalaryItemSet } } = this.props; setSalaryItemSet(resultSet); }; + handleChangeSalaryItemShowNamesetting = (itemShowNamesetting) => { + const { payrollStore: { setSalaryBillItemNameSetting, salaryBillItemNameSetting } } = this.props; + setSalaryBillItemNameSetting(_.map(salaryBillItemNameSetting, it => { + if (it.salaryBillType === 0) { + return { ...it, salaryTemplateId: this.props.id, itemShowNameSetting: itemShowNamesetting }; + } + return { ...it, salaryTemplateId: this.props.id }; + })); + }; render() { const { payrollStore, id } = this.props; @@ -141,6 +150,7 @@ export default class ShowSettingForm extends React.Component { ref={dom => this.salaryItemSettingsRef = dom} dataSource={salaryItemSet} onChangeSalaryItem={this.handleChangeSalaryItem} + onChangeSalaryItemShowNamesetting={this.handleChangeSalaryItemShowNamesetting} salarySobId={toJS(templateBaseData).salarySob} isReplenish={false} salaryBillItemNameSet={salaryBillItemNameSet} /> diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/tmplateSettingForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/tmplateSettingForm.js index ad0fabfe..ce64f1e4 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/tmplateSettingForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/tmplateSettingForm.js @@ -14,9 +14,19 @@ export default class TemplateSettingForm extends React.Component { setReplenishSalaryTemplateSalaryItemSet(resultSet); }; + handleChangeSalaryItemShowNamesetting = (itemShowNamesetting) => { + const { payrollStore: { setSalaryBillItemNameSetting, salaryBillItemNameSetting } } = this.props; + setSalaryBillItemNameSetting(_.map(salaryBillItemNameSetting, it => { + if (it.salaryBillType === 1) { + return { ...it, salaryTemplateId: this.props.id, itemShowNameSetting: itemShowNamesetting }; + } + return { ...it, salaryTemplateId: this.props.id }; + })); + }; + render() { const { payrollStore } = this.props; - const { replenishSalaryTemplateSalaryItemSet, templateBaseData } = payrollStore; + const { replenishSalaryTemplateSalaryItemSet, templateBaseData, salaryBillItemNameSet } = payrollStore; return (
this.salaryItemSettingsRef = dom} dataSource={replenishSalaryTemplateSalaryItemSet} onChangeSalaryItem={this.handleChangeSalaryItem} + onChangeSalaryItemShowNamesetting={this.handleChangeSalaryItemShowNamesetting} salarySobId={toJS(templateBaseData).salarySob} - isReplenish={true} + isReplenish={true} salaryBillItemNameSet={salaryBillItemNameSet} />
diff --git a/pc4mobx/hrmSalary/stores/payroll.js b/pc4mobx/hrmSalary/stores/payroll.js index 09d23eef..4411b5fb 100644 --- a/pc4mobx/hrmSalary/stores/payroll.js +++ b/pc4mobx/hrmSalary/stores/payroll.js @@ -26,6 +26,18 @@ export class payrollStore { @observable salaryTemplateShowSet = {}; // 显示设置基础表单 @observable replenishSalaryTemplateSalaryItemSet = []; // 补发工资单模版基础表单 @observable salaryItemSet = []; // 显示设置薪资项 + @observable salaryBillItemNameSetting = [ + { + salaryTemplateId: "", + salaryBillType: 0, + itemShowNameSetting: [] + }, + { + salaryTemplateId: "", + salaryBillType: 1, + itemShowNameSetting: [] + } + ]; // 工资单模板薪资项目名称修改列表 @observable salaryBillItemNameSet = {}; // 工资单模板薪资项目名称修改列表 // **** 工资单页面 **** @@ -88,6 +100,10 @@ export class payrollStore { @action setSalaryItemSet = salaryItemSet => (this.salaryItemSet = salaryItemSet); + @action + setSalaryBillItemNameSet = salaryBillItemNameSet => (this.salaryBillItemNameSet = salaryBillItemNameSet); + @action + setSalaryBillItemNameSetting = salaryBillItemNameSetting => (this.salaryBillItemNameSetting = salaryBillItemNameSetting); @action("工资单模板分页信息修改") setTemplateTablePageInfo = (pageInfo, callback) => { @@ -264,6 +280,7 @@ export class payrollStore { : false; params.salaryItemSetting = toJS(this.salaryItemSet); params.replenishSalaryItemSetting = toJS(this.replenishSalaryTemplateSalaryItemSet); + params.salaryBillItemNameSetting = toJS(this.salaryBillItemNameSetting); return params; }; @@ -291,8 +308,6 @@ export class payrollStore { return new Promise((resolve, reject) => { let params = this.convertParams(); params.id = id; - console.log(params); - return API.updatePayroll(params).then(res => { if (res.status) { message.success("保存成功"); From 8e399f979a1a677d6bc43335393d47e28d12e576 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, 20 Jul 2023 18:26:34 +0800 Subject: [PATCH 60/61] =?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=E6=B7=BB=E5=8A=A0=E5=8F=91=E6=94=BE?= =?UTF-8?q?=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AE=E5=90=8D=E7=A7=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payroll/index.js | 27 +++++++++++++++--- .../payroll/stepForm/salaryItemSettings.js | 28 +++++++++++-------- pc4mobx/hrmSalary/stores/payroll.js | 3 ++ 3 files changed, 43 insertions(+), 15 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index f5ae1050..9054c866 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -64,7 +64,12 @@ export default class Payroll extends React.Component { getReplenishForm = (isEdit = false, params = {}) => { const { payrollStore } = this.props; - const { templateBaseData, salaryTemplateShowSet, setReplenishSalaryTemplateSalaryItemSet, setSalaryBillItemNameSet } = payrollStore; + const { + templateBaseData, + salaryTemplateShowSet, + setReplenishSalaryTemplateSalaryItemSet, + setSalaryBillItemNameSet + } = payrollStore; if (!salaryTemplateShowSet.theme && !isEdit) { Modal.warning({ title: "信息确认", @@ -77,12 +82,12 @@ export default class Payroll extends React.Component { if (!isEdit) { this.setState({ currentStep: this.state.currentStep + 1 }, () => { setReplenishSalaryTemplateSalaryItemSet(data.replenishSalaryTemplateSalaryItemSet); - setSalaryBillItemNameSet(data.salaryBillItemNameSet) + setSalaryBillItemNameSet(data.salaryBillItemNameSet); window.localStorage.setItem("salary-showset", JSON.stringify(salaryTemplateShowSet)); }); } else { setReplenishSalaryTemplateSalaryItemSet(data.replenishSalaryTemplateSalaryItemSet); - setSalaryBillItemNameSet(data.salaryBillItemNameSet) + setSalaryBillItemNameSet(data.salaryBillItemNameSet); window.localStorage.setItem("salary-showset", JSON.stringify(salaryTemplateShowSet)); } } @@ -263,7 +268,9 @@ export default class Payroll extends React.Component { setTemplateTableSelectedRowKeys, deletePayroll, templateBaseData, - setTemplateTablePageInfo + setTemplateTablePageInfo, + setSalaryBillItemNameSetting, + salaryBillItemNameSetting } = payrollStore; const { currentStep, selectedTab, templateSearchValue, templateSelect, startDate, endDate } = this.state; if (!hasRight && !loading) { // 无权限处理 @@ -467,10 +474,16 @@ export default class Payroll extends React.Component { customOperate={ currentStep === 0 ? [ ] : currentStep === 1 ? [ , , @@ -479,6 +492,9 @@ export default class Payroll extends React.Component { }}>预览 ] : currentStep === 2 ? [ , @@ -541,6 +557,9 @@ export default class Payroll extends React.Component { } subItemChange={(selectedTab) => { this.setState({ selectedTab: Number(selectedTab) }, () => { + setSalaryBillItemNameSetting(_.map(salaryBillItemNameSetting, it => { + return { ...it, salaryTemplateId: "", itemShowNameSetting: [] }; + })); if (this.state.selectedTab === 2) this.getReplenishForm(true, { id: this.state.templateCurrentId }); }); }} diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js index 720241b6..1b70707f 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js @@ -242,7 +242,7 @@ class SalaryItemSettings extends Component { }) }; }) - }); + }, () => document.getElementById("salaryItemInput") && document.getElementById("salaryItemInput").focus()); }; handleChangeSalaryItemShowName = (item, field, name) => { const { groupId } = item, { salaryItemId } = field, { dataList, itemShowNamesetting } = this.state; @@ -253,7 +253,7 @@ class SalaryItemSettings extends Component { ...item, items: _.map(item.items, child => { if (child.salaryItemId === salaryItemId) { - return { ...child, name }; + return { ...child, salaryItemShowName: name, name }; } return { ...child }; }) @@ -306,23 +306,29 @@ class SalaryItemSettings extends Component { return
{ filed.viewAttr === 2 ? - this.handleEditSalaryItemName(item, filed, 1)} - onChange={(val) => this.handleChangeSalaryItemShowName(item, filed, val)} + this.handleEditSalaryItemName(item, filed, 1)} + onChange={(val) => this.handleChangeSalaryItemShowName(item, filed, val)} /> :
this.handleEditSalaryItemName(item, filed, 2)}> { - (item.groupId !== "111111111111111111" && (!_.isEmpty(salaryBillItemNameObj) || (filed.name !== filed.originName))) ? - `${salaryBillItemNameObj.salaryItemShowName || filed.name}(${filed.originName})` : - filed.name + (item.groupId !== "111111111111111111" && (!_.isEmpty(salaryBillItemNameObj) || (filed.salaryItemShowName !== filed.originName))) ? + `${filed.salaryItemShowName}(${filed.originName})` : + filed.salaryItemShowName }
} diff --git a/pc4mobx/hrmSalary/stores/payroll.js b/pc4mobx/hrmSalary/stores/payroll.js index 4411b5fb..6c2e7d34 100644 --- a/pc4mobx/hrmSalary/stores/payroll.js +++ b/pc4mobx/hrmSalary/stores/payroll.js @@ -293,6 +293,9 @@ export class payrollStore { if (res.status) { message.success("保存成功"); this.getPayrollTemplateList(); + this.setSalaryBillItemNameSetting(_.map(this.salaryBillItemNameSetting, it => { + return { ...it, salaryTemplateId: "", itemShowNameSetting: [] }; + })); resolve(); } else { message.error(res.errormsg || "保存失败"); From 3091232181dee5b3c6b1c400b55b50bd5c4fca6b 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, 21 Jul 2023 10:15:48 +0800 Subject: [PATCH 61/61] =?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=E6=B7=BB=E5=8A=A0=E5=8F=91=E6=94=BE?= =?UTF-8?q?=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AE=E5=90=8D=E7=A7=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/payroll/stepForm/salaryItemSettings.js | 11 +++++++---- .../payroll/templatePreview/computerTemplate/index.js | 7 ++++--- .../payroll/templatePreview/phoneTemplate/index.js | 3 ++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js index 1b70707f..0e5803e5 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js @@ -245,7 +245,7 @@ class SalaryItemSettings extends Component { }, () => document.getElementById("salaryItemInput") && document.getElementById("salaryItemInput").focus()); }; handleChangeSalaryItemShowName = (item, field, name) => { - const { groupId } = item, { salaryItemId } = field, { dataList, itemShowNamesetting } = this.state; + const { groupId } = item, { salaryItemId, originName } = field, { dataList, itemShowNamesetting } = this.state; this.setState({ dataList: _.map(dataList, item => { if (item.groupId === groupId) { @@ -261,7 +261,10 @@ class SalaryItemSettings extends Component { } return { ...item }; }), - itemShowNamesetting: _.unionBy([{ salaryItemId, salaryItemShowName: name }], itemShowNamesetting, "salaryItemId") + itemShowNamesetting: _.unionBy([{ + salaryItemId, + salaryItemShowName: originName === name ? "" : name + }], itemShowNamesetting, "salaryItemId") }, () => { this.props.onChangeSalaryItem(this.state.dataList); this.props.onChangeSalaryItemShowNamesetting(this.state.itemShowNamesetting); @@ -308,7 +311,7 @@ class SalaryItemSettings extends Component { title={ (item.groupId !== "111111111111111111" && (!_.isEmpty(salaryBillItemNameObj) || (filed.salaryItemShowName !== filed.originName))) ? `${filed.salaryItemShowName}(${filed.originName})` : - filed.salaryItemShowName + filed.name } > { @@ -328,7 +331,7 @@ class SalaryItemSettings extends Component { { (item.groupId !== "111111111111111111" && (!_.isEmpty(salaryBillItemNameObj) || (filed.salaryItemShowName !== filed.originName))) ? `${filed.salaryItemShowName}(${filed.originName})` : - filed.salaryItemShowName + filed.name }
} diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js index 6f2e68c2..50e76732 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js @@ -49,7 +49,7 @@ export default class ComputerTemplate extends React.Component { } - renderTableTr = (data) => { + renderTableTr = (data, groupId) => { const tables = []; const len = data.length; const rowNum = 3; @@ -61,8 +61,9 @@ export default class ComputerTemplate extends React.Component { iLen = iLen > len ? len : iLen; tables.push(""); for (let i = j * rowNum; i < iLen; i++) { + const key = (!this.props.isPreview && groupId !== "111111111111111111") ? data[i].salaryItemShowName : data[i].name; const value = data[i].salaryItemValue || "-"; - tables.push("" + data[i].name + "" + "" + value + ""); + tables.push("" + key + "" + "" + value + ""); } tables.push(""); } @@ -98,7 +99,7 @@ export default class ComputerTemplate extends React.Component {
{group.groupName}
+ dangerouslySetInnerHTML={{ __html: this.renderTableTr(group.items, group.groupId).join(",").replace(/,/g, "") }}/> ; }) diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js index 0f85d51d..50670de2 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js @@ -83,7 +83,8 @@ export default class PhoneTemplate extends React.Component { { _.map(group.items, item => { return - + ; })
{item.name}{(!this.props.isPreview && group.groupId !== "111111111111111111") ? item.salaryItemShowName : item.name} {item.salaryItemValue || "-"}