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/42] =?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/42] =?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/42] =?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/42] =?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/42] =?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/42] =?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/42] =?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/42] =?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/42] =?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 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 10/42] =?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 11/42] =?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 12/42] =?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 13/42] =?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 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 14/42] =?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 15/42] =?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 16/42] =?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 10:05:16 +0800 Subject: [PATCH 17/42] =?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 18/42] =?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 19/42] =?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 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 20/42] =?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 21/42] =?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: Mon, 17 Jul 2023 11:26:13 +0800 Subject: [PATCH 22/42] =?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 23/42] =?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 24/42] =?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 25/42] =?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 26/42] =?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 27/42] =?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 28/42] =?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 29/42] =?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 30/42] =?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 31/42] =?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 32/42] =?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 33/42] =?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:40:42 +0800 Subject: [PATCH 34/42] =?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 d5a625d4c854439accee37e52deb1438855e20a1 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 17:03:20 +0800 Subject: [PATCH 35/42] =?UTF-8?q?=E4=BA=A7=E5=93=81-release/2.8.3.2307.02b?= =?UTF-8?q?ug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../calculateDetail/customExportDialog.js | 2 +- .../calculateDetail/placeOnFileDetail.js | 58 +++++++++++++++---- .../pages/externalPersonManage/index.js | 11 ++-- .../components/ledgerAssociatedPersonnel.js | 2 +- .../hrmSalary/pages/mobilePayroll/index.js | 6 +- .../hrmSalary/pages/mySalary/mySalaryView.js | 8 ++- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 2 +- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 4 +- .../pages/taxAgent/slideTaxagentUser.js | 5 +- 9 files changed, 72 insertions(+), 26 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/customExportDialog.js b/pc4mobx/hrmSalary/pages/calculateDetail/customExportDialog.js index 601890a1..62b0b617 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/customExportDialog.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/customExportDialog.js @@ -36,7 +36,7 @@ class CustomExportDialog extends Component { const { itemsCheckeds } = this.state; customCacheExportField({ salaryItems: _.map(itemsCheckeds, it => it.toString()) }).then(({ status, errorMsg }) => { if (status) { - const { consolidatedTaxation, ...extra } = searchItemsValue; + const { consolidatedTaxation = "0", ...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(",")}` diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js index 8ab69098..e3c795e8 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js @@ -2,13 +2,16 @@ import React from "react"; import { toJS } from "mobx"; import CustomTab from "../../components/customTab"; import { Dropdown, Menu, message } from "antd"; -import { WeaHelpfulTip, WeaInputSearch, WeaSlideModal } from "ecCom"; +import { WeaHelpfulTip, WeaInputSearch, WeaLocaleProvider, WeaSlideModal } from "ecCom"; import SlideModalTitle from "../../components/slideModalTitle"; import FileMergeDetail from "./fileMergeDetail"; import { getQueryString } from "../../util/url"; import { inject, observer } from "mobx-react"; +import { getExportField } from "../../apis/calculate"; import "./index.less"; +import CustomExportDialog from "./customExportDialog"; +const getLabel = WeaLocaleProvider.getLabel; @inject("calculateStore") @observer export default class PlaceOnFileDetail extends React.Component { @@ -18,7 +21,10 @@ export default class PlaceOnFileDetail extends React.Component { slideVisiable: false, selectedRowKeys: [], searchValue: "", - columnIndex: "" + columnIndex: "", + customExportParams: { + visible: false, checkItems: [], itemsByGroup: [] + } }; this.id = ""; } @@ -95,15 +101,33 @@ export default class PlaceOnFileDetail extends React.Component { childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); }; - handleMenuClick() { - const { calculateStore: { exportAll } } = this.props; - const { selectedRowKeys } = this.state; - if (selectedRowKeys.length === 0) { - message.warning("未选择条目"); - return; + handleMenuClick = ({ key }) => { + if (key === "3") { + const { calculateStore: { exportAll } } = this.props; + const { selectedRowKeys } = this.state; + if (selectedRowKeys.length === 0) { + message.warning("未选择条目"); + return; + } + exportAll(this.id, selectedRowKeys.join(",")); + } else if (key === "4") { + this.getExportField(); } - exportAll(this.id, selectedRowKeys.join(",")); - } + }; + + getExportField = () => { + getExportField({ salaryAcctRecordId: getQueryString("id") }).then(({ status, data }) => { + if (status) { + const { checkItems, itemsByGroup } = data; + this.setState({ + customExportParams: { + visible: true, + checkItems, itemsByGroup + } + }); + } + }); + }; handleExportAll = () => { const { calculateStore: { exportAll } } = this.props; @@ -113,11 +137,12 @@ export default class PlaceOnFileDetail extends React.Component { render() { const { calculateStore } = this.props; const { baseSalarySobCycle, columnDescList } = calculateStore; - const { slideVisiable, columnIndex } = this.state; + const { slideVisiable, columnIndex, customExportParams } = this.state; const menu = ( this.handleMenuClick(e)}> 导出所选 + {getLabel(111, "自定义导出")} ); @@ -171,6 +196,17 @@ export default class PlaceOnFileDetail extends React.Component { id="atdTable" />
+ { + this.setState({ + customExportParams: { + visible: false, checkItems: [], itemsByGroup: [] + } + }); + }} + /> { slideVisiable &&
this.handleAdd()}>新建 ] : []} searchType={["base", "advanced"]} showSearchAd={showSearchAd} @@ -143,7 +146,7 @@ class Index extends Component {
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js index 76913307..8b7af5a4 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js @@ -274,7 +274,7 @@ class LedgerAssociatedPersonnel extends Component { return (
{ notSetting && -
+ } diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js index 24bf675e..67374438 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js +++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js @@ -59,13 +59,17 @@ class MySalaryView extends Component { title: getLabel(131329, "信息确认"), content: getLabel(111, "请确认薪资信息是有误,进行反馈并发起反馈流程。"), onOk: () => { - const { params: { salaryInfoId } } = this.props; + const { params: { salaryInfoId }, mySalaryStore: { getMySalaryBill } } = this.props; feedBackSalaryBill({ salaryInfoId }).then(({ status, errorMsg }) => { if (status) { const { mySalaryStore } = this.state; const { salaryTemplate } = mySalaryStore; const { feedbackUrl } = salaryTemplate; - window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`); + getMySalaryBill(Number(salaryInfoId)).then(data => { + this.setState({ mySalaryStore: data }, () => { + window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`); + }); + }); } else { message.error(errorMsg); } diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index 73f7e302..1cf37553 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -778,7 +778,7 @@ class Index extends Component { dropMenuDatas={rightMenu} > Date: Mon, 24 Jul 2023 10:29:29 +0800 Subject: [PATCH 36/42] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=8A=A5=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/index.js | 3 ++ .../hrmSalary/pages/employeedeclare/index.js | 29 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 pc4mobx/hrmSalary/pages/employeedeclare/index.js diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index d004267c..8e9ff9d6 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -20,6 +20,7 @@ import Payroll from "./pages/payroll"; import PayrollGrant from "./pages/payroll/payrollGrant"; import PayrollDetail from "./pages/payroll/payrollDetail"; import Declare from "./pages/declare"; +import Employeedeclare from "./pages/employeedeclare"; import TaxRate from "./pages/taxRate"; import TaxAgent from "./pages/taxAgent"; import CalculateDetail from "./pages/calculateDetail"; @@ -88,6 +89,7 @@ const DataAcquisition = (props) => props.children; // analysisOfSalaryStatistics 薪酬统计分析 // reportView 薪酬报表查看 // externalPersonManage 非系统人员管理 +// employeedeclare 人员信息报送 const Routes = ( + } + buttons={[ + + ]} + > +
children
+ + ); + } +} + +export default Index; From 67d17fcbee3e9f71bc90873da1cb5e52b91b86e8 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, 24 Jul 2023 10:49:30 +0800 Subject: [PATCH 37/42] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=8A=A5=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/components/TipLabel/index.less | 65 ++++++++++--------- .../hrmSalary/pages/employeedeclare/index.js | 12 +++- 2 files changed, 46 insertions(+), 31 deletions(-) diff --git a/pc4mobx/hrmSalary/components/TipLabel/index.less b/pc4mobx/hrmSalary/components/TipLabel/index.less index addc7741..b88403e9 100644 --- a/pc4mobx/hrmSalary/components/TipLabel/index.less +++ b/pc4mobx/hrmSalary/components/TipLabel/index.less @@ -1,36 +1,41 @@ .tipLabelWrapper { - border-left: 1px solid #e2ecf2; + border-left: 1px solid #e2ecf2; + border-bottom: 1px solid #e2ecf2; + border-right: 1px solid #e2ecf2; + border-radius: 0px 0px 5px 5px; + width: 100%; + overflow: hidden; + + .titleWrapper { + width: 100%; + line-height: 19.2px; + padding: 10px; border-bottom: 1px solid #e2ecf2; - border-right: 1px solid #e2ecf2; - border-radius: 0px 0px 5px 5px; + background-color: #f7fbfe; + } + + .tipContentWrapper { + padding: 10px; + background: #FFF; + } + + .tipContentItem { + line-height: 20px; + padding: 10px 16px 0px; + color: rgb(153, 153, 153); + } + + .tipContentItem:first-child { + padding-top: 0; + } + + .formLabel { + font-size: 14px; + } + + .contentWrapper { width: 100%; overflow: hidden; - .titleWrapper { - width: 100%; - line-height: 19.2px; - padding: 10px; - border-bottom: 1px solid #e2ecf2; - background-color: #f7fbfe; - } - .tipContentWrapper { - padding: 10px; - } - .tipContentItem { - line-height: 20px; - padding: 0px 16px; - padding-top: 10px; - color: rgb(153, 153, 153); - } - .tipContentItem:first { - padding-top: 0px; - } - - .formLabel { - font-size: 14px; - } - .contentWrapper { - width: 100%; - overflow: hidden; - } + } } diff --git a/pc4mobx/hrmSalary/pages/employeedeclare/index.js b/pc4mobx/hrmSalary/pages/employeedeclare/index.js index 91e40529..c43be4b3 100644 --- a/pc4mobx/hrmSalary/pages/employeedeclare/index.js +++ b/pc4mobx/hrmSalary/pages/employeedeclare/index.js @@ -6,11 +6,16 @@ */ import React, { Component } from "react"; import { WeaInputSearch, WeaLocaleProvider, WeaTop } from "ecCom"; +import { Col, Row } from "antd"; +import TipLabel from "../../components/TipLabel"; const { getLabel } = WeaLocaleProvider; class Index extends Component { render() { + const tipList = [ + getLabel(111, "1、点击查看详情,管理各个个税扣缴义务人的人员报送信息,如购买了在线报送服务,可在线报送,如未购买在线报送服务,也可导出数据线下报送。") + ]; return ( ]} > -
children
+
+ + + + +
); } From d43b31a5c2a4ff3c56fc68b63d73bfc708a1bb37 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, 10 Aug 2023 14:07:18 +0800 Subject: [PATCH 38/42] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/employeedeclare/index.js | 52 +++++++++++++++++-- 1 file changed, 47 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/employeedeclare/index.js b/pc4mobx/hrmSalary/pages/employeedeclare/index.js index c43be4b3..028f5961 100644 --- a/pc4mobx/hrmSalary/pages/employeedeclare/index.js +++ b/pc4mobx/hrmSalary/pages/employeedeclare/index.js @@ -5,29 +5,71 @@ * Date: 2023/7/24 */ import React, { Component } from "react"; -import { WeaInputSearch, WeaLocaleProvider, WeaTop } from "ecCom"; +import { WeaInputSearch, WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; import { Col, Row } from "antd"; import TipLabel from "../../components/TipLabel"; const { getLabel } = WeaLocaleProvider; class Index extends Component { + constructor(props) { + super(props); + this.state = { + pageInfo: { current: 1, pageSize: 10, total: 0 }, + loading: false + }; + } + render() { + const { pageInfo } = this.state; const tipList = [ - getLabel(111, "1、点击查看详情,管理各个个税扣缴义务人的人员报送信息,如购买了在线报送服务,可在线报送,如未购买在线报送服务,也可导出数据线下报送。") + getLabel(544290, "1、点击查看详情,管理各个个税扣缴义务人的人员报送信息,如购买了在线报送服务,可在线报送,如未购买在线报送服务,也可导出数据线下报送。") ]; return ( } buttons={[ - ]} >
- + + ({getLabel(83110, "查看详情")}) + } + ]} + dataSource={[]} + pagination={{ + ...pageInfo, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ + pageInfo: { ...pageInfo, current, pageSize } + }); + }, + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }); + } + }} + /> +
From a2c2292e60741391b21e310b3ff03449c502466c 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, 11 Aug 2023 16:06:21 +0800 Subject: [PATCH 39/42] =?UTF-8?q?=E6=B1=89=E6=A1=91-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=E6=B7=BB=E5=8A=A0=E7=A6=8F?= =?UTF-8?q?=E5=88=A9=E5=AF=BC=E5=85=A5=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../importDialog/components/impStep1.js | 86 +++++++++++ .../importDialog/components/impStep3.js | 51 ++++++ .../components/importDialog/index.js | 135 ++++++++++++++++ .../components/importDialog/index.less | 145 ++++++++++++++++++ pc4mobx/hrmSalary/index.js | 3 + .../pages/employeedeclareDetail/index.js | 43 ++++++ .../pages/employeedeclareDetail/index.less | 18 +++ 7 files changed, 481 insertions(+) create mode 100644 pc4mobx/hrmSalary/components/importDialog/components/impStep1.js create mode 100644 pc4mobx/hrmSalary/components/importDialog/components/impStep3.js create mode 100644 pc4mobx/hrmSalary/components/importDialog/index.js create mode 100644 pc4mobx/hrmSalary/components/importDialog/index.less create mode 100644 pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js create mode 100644 pc4mobx/hrmSalary/pages/employeedeclareDetail/index.less diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js new file mode 100644 index 00000000..9e24dbf5 --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js @@ -0,0 +1,86 @@ +/* + * Author: 黎永顺 + * name: 导入-步骤一 + * Description: + * Date: 2023/8/11 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import { Icon, Upload, message } from "antd"; + +const Dragger = Upload.Dragger; +const { getLabel } = WeaLocaleProvider; + +class ImpStep1 extends Component { + constructor(props) { + super(props); + this.state = { + fileList: [] + }; + } + + handleChange = (data) => { + const { fileList, file } = data; + if (file.response && typeof (file.response) != "undefined") message.success(getLabel(111, "上传成功")); + this.setState({ fileList }); + }; + + render() { + const { fileList } = this.state; + const dragger = { + accept: ".xlsx", + name: "file", + multiple: false, + action: "/api/doc/upload/uploadFile", + fileList, + onChange: this.handleChange + }; + return ( +
+ {/* 导入选项 */} + { + this.props.importParams && +
+
{getLabel(543201, "导入选项")}
+ {this.props.importParams} +
+ } +
{getLabel(543202, "导入Excel")}
+

+ +

+

+

{getLabel(543203, "点击或将文件拖拽到此区域上传")}

+

{getLabel(543204, "支持单个或批量上传,严禁上传公司内部资料及其他违禁文件")}

+
+ +

+ +
+
{getLabel(27577, "操作步骤")}
+

+ {`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}   + {getLabel(543207, "点击这里下载模板")} +

+

{`2. ${getLabel(543211, "第二步")},${getLabel(543212, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(543213, "没有被修改掉")};`}

+

{`3. ${getLabel(543216, "第三步")},${getLabel(543215, "选择填写好的Excel文档")},${getLabel(543214, "点击“下一步”按钮进行数据预览")};`}

+

+ {`4. ${getLabel(543217, "第四步")},${getLabel(543218, "如果以上步骤和Excel文档正确的话")},${getLabel(543219, "导入成功会有提示")},${getLabel(543220, "数据会被正确导入")}。${getLabel(543221, "如果有问题")},${getLabel(543222, "则会提示Excel文档的错误之处")}。`} +

+
+ +
+
{getLabel(543223, "Excel文件说明")}
+

{`1. ${getLabel(543224, "后缀名为xls或者xlsx")};`}

+

{`2. ${getLabel(543225, "数据请勿放在合并的单元格中")};`}

+

{`3. ${getLabel(543226, "账单月份格式必须为")}:YYYY-MM;`}

+
+ +
+ ); + } +} + +export default ImpStep1; diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js new file mode 100644 index 00000000..481813b4 --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js @@ -0,0 +1,51 @@ +/* + * Author: 黎永顺 + * name: 导入-步骤3 + * Description: + * Date: 2023/8/11 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; +import successImg from "../../importModal/success.svg"; + +const getLabel = WeaLocaleProvider.getLabel; + +class ImpStep3 extends Component { + render() { + const { importResult } = this.props; + return ( +
+ { + !_.isEmpty(importResult) ? +
+

+

+ {getLabel(389249, "已导入")} + {importResult.successCount}   + {`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`} + {importResult.errorCount}  {getLabel(30690, "条数据")} +

+
: +
+

{getLabel(111, "导入失败")}

+
+ } + { + !_.isEmpty(importResult.errorData) && + + } +
+ ); + } +} + +export default ImpStep3; diff --git a/pc4mobx/hrmSalary/components/importDialog/index.js b/pc4mobx/hrmSalary/components/importDialog/index.js new file mode 100644 index 00000000..49956e37 --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/index.js @@ -0,0 +1,135 @@ +/* + * Author: 黎永顺 + * name: 导入弹框-步骤条 + * Description: + * Date: 2023/8/11 + */ +import React, { Component } from "react"; +import { Button, message, Modal } from "antd"; +import { WeaDialog, WeaLocaleProvider, WeaSteps } from "ecCom"; +import ImpStep1 from "./components/impStep1"; +import ImpStep3 from "./components/impStep3"; +import "./index.less"; + +const { getLabel } = WeaLocaleProvider; +const Step = WeaSteps.Step; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + current: 0 + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (JSON.stringify(nextProps.importResult) !== JSON.stringify(this.props.importResult)) { + this.setState({ + current: this.state.current + 1 + }); + } + if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ current: 0 }); + } + + renderChildren = () => { + const { current } = this.state; + const { importParams, link, excludeKey, importResult } = this.props; + let CurrentDom = null; + switch (current) { + case 0: + CurrentDom = this.step1Ref = dom}/>; + break; + case 1: + CurrentDom = null; + if (excludeKey) { + CurrentDom = ; + } + break; + case 2: + CurrentDom = null; + break; + default: + CurrentDom = null; + break; + } + return CurrentDom; + }; + + /* + * Author: 黎永顺 + * Description: 下一步 + * Params: + * Date: 2023/8/11 + */ + handleNext = () => { + const { params } = this.props; + const { fileList } = this.step1Ref.state; + if (!_.isEmpty(params)) { + if (!Object.values(params).every(o => !!o)) { + Modal.warning({ + title: getLabel(131329, "信息确认"), + content: getLabel(518702, "必要信息不完整,红色*为必填项!") + }); + return; + } + } + if (_.isEmpty(fileList)) { + message.error(getLabel(111, "请先上传EXCEL文件")); + return; + } + const [file] = fileList; + const { response } = file; + this.props.nextCallback(response.data.fileid); + }; + + render() { + const { current } = this.state; + const stepData = [ + { key: 0, label: getLabel(543202, "上传EXCEL") }, + { key: 1, label: getLabel(543200, "数据预览") }, + { key: 2, label: getLabel(502835, "导入数据") } + ]; + const btns = [ + , + , + + ]; + return ( + +
+
+ + {/*this.props.key: 不需要展示的步骤*/} + { + _.map(_.filter(stepData, item => item.key !== this.props.excludeKey), it => ( + )) + } + +
+
+ { + this.renderChildren() + } +
+
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/components/importDialog/index.less b/pc4mobx/hrmSalary/components/importDialog/index.less new file mode 100644 index 00000000..8e4dbb53 --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/index.less @@ -0,0 +1,145 @@ +.importBox { + .importCont { + padding: 16px 8px; + + .weapp-batch-impsteps-picker-content-imp-steps { + width: 80%; + margin: 0 auto; + } + + .weapp-batch-impsteps-picker { + margin: 16px auto; + + .weapp-batch-impsteps-picker-content-imp-step1 { + width: 98%; + background-color: #fff; + margin: 8px auto; + border-radius: 3px; + padding: 1px 12px; + + .weapp-batch-impsteps-picker-content-imp-step1 div { + color: #111; + line-height: 22px; + } + + .weapp-salary-tb-border-bottom .weapp-salary-tb-filter.weapp-salary-import-param { + box-sizing: border-box; + padding: 16px; + height: auto; + flex-wrap: wrap; + width: 100%; + } + + .weapp-salary-import-param { + border: 1px solid #ebedf0; + padding: 8px; + margin: 4px 0 14px; + } + + .weapp-salary-tb-filter { + display: flex; + flex-wrap: wrap; + align-items: center; + height: 46px; + } + + .weapp-salary-tb-border-bottom .weapp-salary-tb-filter.weapp-salary-import-param .tbf-item { + display: flex; + justify-content: flex-start !important; + } + + .weapp-salary-tb-filter .tbf-item { + padding: 0 20px 0 0; + display: flex; + align-items: center; + font-size: 12px; + color: #111; + height: 40px; + } + + .weapp-salary-tb-filter .tbf-item > .tbfi-label { + flex-basis: 100px; + flex-shrink: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + padding-right: 10px; + color: #666; + } + + .draggerUploadWrapper { + margin: 16px 0 0; + + .ant-upload-drag-container { + padding: 24px 0 16px; + + .iconUpload { + i { + color: #5d9cec; + font-size: 43px; + } + } + + .uplaod-title { + font-size: 14px; + color: #333; + height: 24px; + line-height: 24px; + margin-top: 8px; + } + + .uplaod-subTitle { + height: 22px; + font-size: 12px; + color: #666; + text-align: center; + line-height: 22px; + } + } + } + + .bottom-border, .description { + margin-top: 12px; + + p { + font-size: 12px; + color: #666; + line-height: 15px; + margin: 12px 0; + } + } + + .bottom-border { + border-bottom: 1px solid #e5e5e5; + + .weapp-salary-link { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + color: #5d9cec; + } + } + + } + } + + .weapp-batch-impsteps-picker-content-imp-step3 { + .weapp-batch-impsteps-picker-spinText { + position: relative; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + padding-top: 80px; + padding-bottom: 80px; + text-align: center; + + p { + margin: 14px 0; + } + } + } + + } +} diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 8e9ff9d6..d584c6e9 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -21,6 +21,7 @@ import PayrollGrant from "./pages/payroll/payrollGrant"; import PayrollDetail from "./pages/payroll/payrollDetail"; import Declare from "./pages/declare"; import Employeedeclare from "./pages/employeedeclare"; +import EmployeedeclareDetail from "./pages/employeedeclareDetail"; import TaxRate from "./pages/taxRate"; import TaxAgent from "./pages/taxAgent"; import CalculateDetail from "./pages/calculateDetail"; @@ -90,6 +91,7 @@ const DataAcquisition = (props) => props.children; // reportView 薪酬报表查看 // externalPersonManage 非系统人员管理 // employeedeclare 人员信息报送 +// employeedeclareDetail 人员信息报送详情 const Routes = ( + {getLabel(111, "全部报送")}, + , + + , - , - + , + , + , + + )} + content={(
Content
)} + /> + ); + } +} + +export default EmployeeDeclareDetailSchemaEditDialog; diff --git a/pc4mobx/hrmSalary/pages/employeedeclareDetail/constants.js b/pc4mobx/hrmSalary/pages/employeedeclareDetail/constants.js index 0d821b12..ab5a82c6 100644 --- a/pc4mobx/hrmSalary/pages/employeedeclareDetail/constants.js +++ b/pc4mobx/hrmSalary/pages/employeedeclareDetail/constants.js @@ -25,3 +25,163 @@ export const submitStatus = [ lanId: 111 } ]; + +export const advanceConditions = [ + { + items: [ + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["keyword"], + fieldcol: 18, + label: "姓名或工号", + lanId: 111, + labelcol: 6, + value: "" + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: true, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "57" + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["departmentIds"], + fieldcol: 18, + label: "部门", + lanId: 27511, + labelcol: 6 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: true, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "278" + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["positionIds"], + fieldcol: 18, + label: "岗位", + lanId: 6086, + labelcol: 6 + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["employmentStatus"], + fieldcol: 18, + label: "人员状态", + lanId: 382300, + labelcol: 6, + value: "", + options: [] + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["employmentType"], + fieldcol: 18, + label: "任职受雇从业类型", + lanId: 111, + labelcol: 6, + value: "", + options: [] + }, + { + colSpan: 1, + conditionType: "RANGEPICKER", + domkey: ["fromEmploymentDate", "endEmploymentDate"], + fieldcol: 18, + label: "任职受雇日期", + lanId: 111, + labelcol: 6, + value: "" + }, + { + colSpan: 1, + conditionType: "RANGEPICKER", + domkey: ["fromDismissDate", "endDismissDate"], + fieldcol: 18, + label: "离职日期", + lanId: 111, + labelcol: 6, + value: "" + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["disability"], + fieldcol: 18, + label: "是否残疾", + lanId: 111, + labelcol: 6, + value: "", + options: [] + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["lonelyOld"], + fieldcol: 18, + label: "是否孤老", + lanId: 111, + labelcol: 6, + value: "", + options: [] + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["martyrDependents"], + fieldcol: 18, + label: "是否是烈属", + lanId: 111, + labelcol: 6, + value: "", + options: [] + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["deductExpenses"], + fieldcol: 18, + label: "是否扣除减除费用", + lanId: 111, + labelcol: 6, + value: "", + options: [] + } + ], + defaultshow: true + } +]; diff --git a/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js b/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js index a6565b04..10474d27 100644 --- a/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js +++ b/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js @@ -6,30 +6,59 @@ */ import React, { Component } from "react"; import { WeaDatePicker, WeaLocaleProvider, WeaSelect, WeaTab, WeaTop } from "ecCom"; -import { submitStatus } from "./constants"; -import { Button, Dropdown, Menu } from "antd"; +import { Button, Dropdown, Menu, Spin } from "antd"; +import BaseInfo from "./components/baseInfo"; +import { advanceConditions, submitStatus } from "./constants"; +import { getSearchs } from "../../util"; import { inject, observer } from "mobx-react"; +import { toJS } from "mobx"; import "./index.less"; const { getLabel } = WeaLocaleProvider; -@inject("taxAgentStore") +@inject("taxAgentStore", "employeeDeclareStore") @observer class Index extends Component { constructor(props) { super(props); this.state = { - selectedKey: "0" + selectedKey: "0", + showSearchAd: false, + declareStatus: "ALL", + taxCycle: new Date() }; } componentDidMount() { + const { employeeDeclareStore: { advanceForm } } = this.props; document.title = getLabel(544289, "人员信息报送"); + advanceForm.initFormFields(advanceConditions); + window.addEventListener("message", this.handleReceive, false); } + componentWillUnmount() { + window.removeEventListener("message", this.handleReceive, false); + } + + handleReceive = ({ data }) => { + const { type, payload: { id, params } = {} } = data; + if (type === "init") { + this.postMessageToChild({}); + } else if (type === "turn") { + if (id === "PAGEINFO") { + const { pageNum: current, size: pageSize } = params; + this.setState({ pageInfo: { ...pageInfo, current, pageSize } }); + } + } + }; + postMessageToChild = (payload) => { + const childFrameObj = document.getElementById("atdTable"); + childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({}), "*"); + }; + render() { - const { selectedKey } = this.state; - const { taxAgentStore: { showOperateBtn } } = this.props; + const { selectedKey, showSearchAd, declareStatus, taxCycle } = this.state; + const { taxAgentStore: { showOperateBtn }, employeeDeclareStore: { advanceForm: form } } = this.props; const menu = ( {getLabel(32136, "批量删除")} @@ -42,7 +71,8 @@ class Index extends Component { , , , - , + console.log(val)}/>, + } + type="primary">{getLabel(1421, "新增")}, ({ ...it, showname: getLabel(it.lanId, it.showname) }))}/> - ]} + value={declareStatus} + style={{ width: 150 }} + options={_.map(submitStatus, it => ({ ...it, showname: getLabel(it.lanId, it.showname) }))} + onChange={declareStatus => this.setState({ declareStatus })} + /> + ]} searchsBaseValue={form.getFormParams().keyword} + onSearchChange={(v) => form.updateFields({ keyword: v })} onChange={key => this.setState({ selectedKey: key })} + onAdReset={() => form.resetForm()} /> +
+ +