From eb9d043d7464b2657baf4e1b813ac2f529935103 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, 24 Jan 2024 16:29:27 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.10.1.2401.01-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=A8=A1=E6=9D=BF=E5=A4=8D=E5=88=B6=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=9C=B0=E5=9D=80=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/mobilePayroll/index.js | 4 +- .../pages/payroll/templateBaseSettings.js | 20 ++++++--- .../payrollRelease/components/conditions.js | 30 +++++++++++++- .../components/payrollCopyDialog/index.js | 41 +++++++++++++++---- .../components/payrollTempBaseSet/index.js | 10 +++-- .../payrollTemplateTableList/index.js | 11 +++-- 6 files changed, 93 insertions(+), 23 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 6ae229c8..98912d8a 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -159,9 +159,9 @@ export default class MobilePayroll extends React.Component { if (status) { const { mySalaryBillData } = this.state; const { salaryTemplate } = mySalaryBillData; - const { feedbackUrl } = salaryTemplate; + const { feedbackUrl, mobileFeedbackUrl } = salaryTemplate; this.getMySalaryBill(getQueryString("id")); - window.location.href = `${window.ecologyContentPath || ""}${feedbackUrl}`; + window.location.href = `${window.ecologyContentPath || ""}${getQueryString("type") === "phone" ? mobileFeedbackUrl : feedbackUrl}`; // window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`); } else { message.error(errorMsg); diff --git a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js index 6cd7f5b6..f64ad003 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js +++ b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js @@ -35,7 +35,8 @@ class TemplateBaseSettings extends Component { ackFeedbackSetting: { ackStatus: "0", autoAckDays: 7, - feedBackUrl: "" + feedBackUrl: "", + mobileFeedbackUrl: "" }, salaryBillViewingLimitSetting: { limitMonth: 0 @@ -68,8 +69,8 @@ class TemplateBaseSettings extends Component { }; salaryBillBaseSetSave = () => { const { watermark, watermarkStatus, wmSetting, ackFeedbackSetting, salaryBillViewingLimitSetting } = this.state; - const { feedBackUrl } = ackFeedbackSetting; - if (!feedBackUrl) { + const { feedBackUrl, mobileFeedbackUrl } = ackFeedbackSetting; + if (!feedBackUrl || !mobileFeedbackUrl) { Modal.warning({ title: getLabel(111, "信息确认"), content: getLabel(111, "必要信息不完整,红色*为必填项!") @@ -96,7 +97,7 @@ class TemplateBaseSettings extends Component { render() { const { watermarkStatus, watermark, watermarkSet, ackFeedbackSetting, salaryBillViewingLimitSetting } = this.state; - const { ackStatus, autoAckDays, feedBackUrl } = ackFeedbackSetting; + const { ackStatus, autoAckDays, feedBackUrl, mobileFeedbackUrl } = ackFeedbackSetting; const { limitMonth = 0 } = salaryBillViewingLimitSetting; return ( @@ -158,7 +159,7 @@ class TemplateBaseSettings extends Component { style={{ marginLeft: 10 }} placement="top" width={200}/> - + this.setState({ @@ -167,6 +168,15 @@ class TemplateBaseSettings extends Component { } })}/> + + this.setState({ + ackFeedbackSetting: { + ...ackFeedbackSetting, mobileFeedbackUrl + } + })}/> + } diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/components/conditions.js b/pc4mobx/hrmSalary/pages/payrollRelease/components/conditions.js index 5fec5c74..87d539d4 100644 --- a/pc4mobx/hrmSalary/pages/payrollRelease/components/conditions.js +++ b/pc4mobx/hrmSalary/pages/payrollRelease/components/conditions.js @@ -12,6 +12,19 @@ export const copyConditions = [ value: "", rules: "required|string", viewAttr: 3 + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["salarySobId"], + fieldcol: 14, + label: "薪资账套", + lanId: 538010, + labelcol: 6, + value: "", + options: [], + rules: "required|string", + viewAttr: 3 } ], defaultshow: true, @@ -194,8 +207,21 @@ export const tempBaseSetFbConditions = [ conditionType: "INPUT", domkey: ["feedbackUrl"], fieldcol: 14, - label: "反馈流程地址", - lanId: 544096, + label: "PC端反馈流程地址", + lanId: 111, + labelcol: 6, + value: "/", + viewAttr: 3, + hide: false, + rules: "required|string" + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["mobileFeedbackUrl"], + fieldcol: 14, + label: "移动端反馈流程地址", + lanId: 111, labelcol: 6, value: "/", viewAttr: 3, diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollCopyDialog/index.js b/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollCopyDialog/index.js index de4c41ff..904c84d2 100644 --- a/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollCopyDialog/index.js +++ b/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollCopyDialog/index.js @@ -6,13 +6,14 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaDialog, WeaLocaleProvider } from "ecCom"; +import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom"; import { Button, message } from "antd"; import { getSearchs } from "../../../../util"; import { copyConditions } from "../conditions"; -import { duplicatePayroll } from "../../../../apis/payroll"; +import { duplicatePayroll, getPayrollTemplateLedgerList } from "../../../../apis/payroll"; const getLabel = WeaLocaleProvider.getLabel; +const getKey = WeaTools.getKey; @inject("payrollStore") @observer @@ -20,15 +21,41 @@ class Index extends Component { constructor(props) { super(props); this.state = { - loading: false + loading: false, conditions: [] }; } componentWillReceiveProps(nextProps, nextContext) { - if (nextProps.visible !== this.props.visible && nextProps.visible) nextProps.payrollStore.payrollCopyForm.initFormFields(copyConditions); + if (nextProps.visible !== this.props.visible && nextProps.visible) this.getPayrollTemplateLedgerList(nextProps); if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.payrollStore.initPayrollCopyForm(); } + getPayrollTemplateLedgerList = (props) => { + getPayrollTemplateLedgerList().then(({ status, data }) => { + if (status) { + this.setState({ + conditions: _.map(copyConditions, item => { + return { + ...item, items: _.map(item.items, o => { + if (getKey(o) === "salarySobId") { + return { + ...o, label: getLabel(o.lanId, o.label), + options: _.map(data, d => ({ key: d.id, showname: d.content })) + }; + } else { + return { ...o, label: getLabel(o.lanId, o.label) }; + } + }) + }; + }) + }, () => { + props.payrollStore.payrollCopyForm.initFormFields(this.state.conditions); + props.payrollStore.payrollCopyForm.updateFields({ salarySobId: { value: props.salarySobId } }); + }); + } + }); + }; + save = () => { const { payrollStore: { payrollCopyForm }, copyId: id } = this.props; payrollCopyForm.validateForm().then(f => { @@ -51,16 +78,16 @@ class Index extends Component { }; render() { - const { loading } = this.state; + const { loading, conditions } = this.state; const { payrollStore: { payrollCopyForm } } = this.props; return ( {getLabel(537558, "保存")} ]} > -
{getSearchs(payrollCopyForm, copyConditions, 1, false)}
+
{getSearchs(payrollCopyForm, conditions, 1, false)}
); } diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js b/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js index 56b9bfde..770c1665 100644 --- a/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js +++ b/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js @@ -129,7 +129,7 @@ class Index extends Component { hide: _.isNil(fieldsEchoData["ackFeedbackStatus"]) ? o.hide : !fieldsEchoData["ackFeedbackStatus"], helpfulTitle: getLabel(544273, "开启后,还需在计划任务中配置定时任务,执行自动确认任务;邮箱端查看工资单暂不支持确认及反馈;") }; - } else if (getKey(o) === "feedbackUrl") { + } else if (getKey(o) === "feedbackUrl" || getKey(o) === "mobileFeedbackUrl") { return { ...o, hide: _.isNil(fieldsEchoData["ackFeedbackStatus"]) ? o.hide : !fieldsEchoData["ackFeedbackStatus"] @@ -298,7 +298,7 @@ class Index extends Component { if (it.title === getLabel(544092, "工资单确认反馈设置")) { return { ...it, items: _.map(it.items, o => { - if (getKey(o) === "autoAckDays" || getKey(o) === "feedbackUrl") { + if (getKey(o) === "autoAckDays" || getKey(o) === "feedbackUrl" || getKey(o) === "mobileFeedbackUrl") { return { ...o, hide: params[key].value === "0" }; @@ -312,7 +312,11 @@ class Index extends Component { }, () => { payrollTempFeedbackForm.initFormFields(this.state.fbConditions); const ackFeedbackStatus = payrollTempFeedbackForm.getFormParams().ackFeedbackStatus; - if (ackFeedbackStatus === "0") payrollTempFeedbackForm.updateFields({ autoAckDays: "7", feedbackUrl: "/" }); + if (ackFeedbackStatus === "0") payrollTempFeedbackForm.updateFields({ + autoAckDays: "7", + feedbackUrl: "/", + mobileFeedbackUrl: "/" + }); }); } setHasBeenModify(true); diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTemplateTableList/index.js b/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTemplateTableList/index.js index bc4fd61f..cb9c2402 100644 --- a/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTemplateTableList/index.js +++ b/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTemplateTableList/index.js @@ -22,7 +22,7 @@ class Index extends Component { this.state = { loading: false, columns: [], dataSource: [], selectedRowKeys: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, delLoading: false, - copyDialog: { visible: false, title: "", copyId: "" }, + copyDialog: { visible: false, title: "", copyId: "", salarySobId: "" }, tmplSlide: { visible: false, tmplId: "", top: 0, width: 792, height: 100, measureT: "%", measureX: "px", measureY: "%" @@ -80,7 +80,7 @@ class Index extends Component { }; handleOpts = ({ key }, record) => { const { copyDialog, tmplSlide, selectedRowKeys } = this.state; - const { id } = record; + const { id, salarySobId } = record; switch (key) { case "edit": this.setState({ @@ -89,7 +89,10 @@ class Index extends Component { break; case "copy": this.setState({ - copyDialog: { ...copyDialog, visible: true, copyId: id, title: getLabel(543599, "复制工资单") } + copyDialog: { + ...copyDialog, visible: true, copyId: id, + salarySobId: salarySobId + "", title: getLabel(543599, "复制工资单") + } }); break; case "del": @@ -175,7 +178,7 @@ class Index extends Component { {/*复制工资单模板*/} this.setState({ - copyDialog: { ...copyDialog, visible: false, copyId: "" } + copyDialog: { ...copyDialog, visible: false, copyId: "", salarySobId: "" } }, () => v === "refresh" && this.getPayrollTemplateList(this.props))} /> {/* 新建编辑工资单模板*/}