diff --git a/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js b/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js index 927e1fbd..cc58acc7 100644 --- a/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js +++ b/pc4mobx/hrmSalary/pages/payroll/components/waterMarkSetModal.js @@ -90,7 +90,7 @@ class WaterMarkSetModal extends Component { }; render() { - const { wmClassify, wmNoTransparent, wmRotate, wmImg, wmcontSet } = this.state; + const { wmClassify, wmNoTransparent, wmRotate, wmImg, wmcontSet } = this.state, { showOperateBtn } = this.props; return (
- this.setState({ wmcontSet: { ...wmcontSet, visible: true } })}/> + { + showOperateBtn && + this.setState({ wmcontSet: { ...wmcontSet, visible: true } })}/> + } { _.isEmpty(wmcontSet.textSet) ? : this.setState({ wmNoTransparent })} /> this.setState({ wmRotate })} /> -
- - -
+ { + showOperateBtn && +
+ + +
+ } {/* 水印内容设置弹框*/} this.setState({ diff --git a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js index 7d2edc9c..55f518cd 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js +++ b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js @@ -104,6 +104,7 @@ class TemplateBaseSettings extends Component { }; render() { + const { showOperateBtn } = this.props; const { watermarkStatus, watermark, watermarkSet, ackFeedbackSetting, salaryBillViewingLimitSetting } = this.state; const { ackStatus, feedbackStatus, autoAckDays, feedBackUrl, mobileFeedbackUrl } = ackFeedbackSetting; const { monthType = "SALARY_DATE", limitMonth, burningAfterReadingMin } = salaryBillViewingLimitSetting; @@ -111,14 +112,14 @@ class TemplateBaseSettings extends Component { - this.setState({ watermarkStatus, watermark: "DEFAULT" })}/> { watermarkStatus === "1" && {getLabel(111, "水印设置")}
} - this.setState({ watermarkSet: { ...watermarkSet, visible: false } })} onChange={wmSetting => this.setState({ wmSetting })} /> @@ -143,7 +144,7 @@ class TemplateBaseSettings extends Component { - this.setState({ ackFeedbackSetting: { ...ackFeedbackSetting, ackStatus, autoAckDays: 7 @@ -155,7 +156,7 @@ class TemplateBaseSettings extends Component { this.setState({ ackFeedbackSetting: { @@ -170,7 +171,7 @@ class TemplateBaseSettings extends Component { } - this.setState({ ackFeedbackSetting: { ...ackFeedbackSetting, feedbackStatus @@ -182,7 +183,7 @@ class TemplateBaseSettings extends Component { this.setState({ ackFeedbackSetting: { ...ackFeedbackSetting, feedBackUrl @@ -191,7 +192,7 @@ class TemplateBaseSettings extends Component { this.setState({ ackFeedbackSetting: { ...ackFeedbackSetting, mobileFeedbackUrl @@ -207,12 +208,12 @@ class TemplateBaseSettings extends Component { this.setState({ salaryBillViewingLimitSetting: { ...salaryBillViewingLimitSetting, monthType } - })} + })} viewAttr={2} disabled={!showOperateBtn} options={[ { key: "SALARY_DATE", showname: getLabel(111, "薪资所属月"), selected: true }, { key: "SEND_DATE", showname: getLabel(111, "发放日期") } ]}/> - this.setState({ salaryBillViewingLimitSetting: { ...salaryBillViewingLimitSetting, limitMonth @@ -226,7 +227,7 @@ class TemplateBaseSettings extends Component {
{getLabel(111, "首次查看")} - this.setState({ salaryBillViewingLimitSetting: { ...salaryBillViewingLimitSetting, burningAfterReadingMin diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/components/grantTableList/index.js b/pc4mobx/hrmSalary/pages/payrollRelease/components/grantTableList/index.js index fbe07cb7..4bdb7293 100644 --- a/pc4mobx/hrmSalary/pages/payrollRelease/components/grantTableList/index.js +++ b/pc4mobx/hrmSalary/pages/payrollRelease/components/grantTableList/index.js @@ -140,7 +140,7 @@ class Index extends Component { >{getLabel(83110, "查看详情")} } { - sendNum === sendTotal && !showGrant && + (!record.opts.includes("admin") || (sendNum === sendTotal && !showGrant)) && this.handleOpts(e, record)}> {getLabel(545781, "操作日志")} @@ -151,7 +151,7 @@ class Index extends Component { } { - sendNum !== sendTotal && !showGrant && + sendNum !== sendTotal && !showGrant && record.opts.includes("admin") && this.handleOpts(e, record)}> {getLabel(543603, "更新模板")} diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/index.js b/pc4mobx/hrmSalary/pages/payrollRelease/index.js index b601298a..cad4fc94 100644 --- a/pc4mobx/hrmSalary/pages/payrollRelease/index.js +++ b/pc4mobx/hrmSalary/pages/payrollRelease/index.js @@ -86,7 +86,9 @@ class Index extends Component { return reqBtns; }; renderContent = () => { + const { taxAgentStore: { PageAndOptAuth } } = this.props; const { selectedKey, queryParams, isRefresh } = this.state; + const showOperateBtn = PageAndOptAuth.opts.includes("admin"); let dom = null; switch (selectedKey) { case "grant": @@ -104,7 +106,7 @@ class Index extends Component { break; case "watermark": dom = this.baseSetRef = dom} + ref={dom => this.baseSetRef = dom} showOperateBtn={showOperateBtn} onChangeLoading={loading => this.setState({ baseSetSaveLoading: loading })} />; break; diff --git a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js index a655f21c..81075f89 100644 --- a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js +++ b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js @@ -68,7 +68,7 @@ class Index extends Component { label: o.name, labelcol: 6, value: detail[`${String(o.id)}_variableItem`] || "", - viewAttr: 2, dataType: o.dataType + viewAttr: !_.isEmpty(detail) ? detail.viewAttr : 2, dataType: o.dataType })), title: "", col: 2, defaultshow: true @@ -119,14 +119,17 @@ class Index extends Component { }); }; renderTitle = () => { - const { loading } = this.state, { title } = this.props; + const { loading } = this.state, { title, detail } = this.props; return
{title}
- + { + (_.isEmpty(detail) || detail.viewAttr === 2) && + + }
; }; diff --git a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileList/index.js b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileList/index.js index c204be4e..f7309e98 100644 --- a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileList/index.js +++ b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileList/index.js @@ -91,7 +91,8 @@ class Index extends Component { this.handleDelete([params.id]); break; case "EDIT": - this.handleView(params.id); + case "VIEW": + this.handleView(params.id, id === "VIEW"); break; default: break; @@ -118,9 +119,9 @@ class Index extends Component { } }); }; - handleView = (id) => { + handleView = (id, view) => { API.getVariableSalaryDetail({ id }).then(({ status, data }) => { - if (status) this.props.onViewSalaryFile(data.data); + if (status) this.props.onViewSalaryFile({ ...data.data, viewAttr: view ? 1 : 2 }); }); }; handleDelete = (ids) => { @@ -157,7 +158,7 @@ class Index extends Component { const i18n = { "操作": getLabel(30585, "操作"), "编辑": getLabel(111, "编辑"), "共": getLabel(18609, "共"), "条": getLabel(18256, "条"), - "删除": getLabel(111, "删除") + "删除": getLabel(111, "删除"), "查看": getLabel(111, "查看") }; const childFrameObj = document.getElementById("unitTable"); childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); diff --git a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryItemList/index.js b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryItemList/index.js index d131e375..e58ea887 100644 --- a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryItemList/index.js +++ b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryItemList/index.js @@ -46,7 +46,7 @@ class Index extends Component { columns: [ ..._.filter(columns, o => o.dataIndex !== "id"), { - title: getLabel(111, "操作"), dataIndex: "oprate", + title: getLabel(111, "操作"), dataIndex: "operate", render: (__, record) => ( this.handleEdit(record.id)}>{getLabel(111, "编辑")} @@ -85,7 +85,7 @@ class Index extends Component { }; render() { - const { columns, dataSource, loading, pageInfo } = this.state; + const { columns, dataSource, loading, pageInfo } = this.state, { showOperateBtn } = this.props; const pagination = { ...pageInfo, showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, @@ -104,8 +104,9 @@ class Index extends Component { } }; return ( - + o.dataIndex !== "operate")} + dataSource={dataSource} loading={loading} bordered pagination={pagination} + scroll={{ y: `calc(100vh - 170px)` }}/> ); } diff --git a/pc4mobx/hrmSalary/pages/variableSalary/index.js b/pc4mobx/hrmSalary/pages/variableSalary/index.js index 639355ea..a8aaa626 100644 --- a/pc4mobx/hrmSalary/pages/variableSalary/index.js +++ b/pc4mobx/hrmSalary/pages/variableSalary/index.js @@ -109,11 +109,12 @@ class Index extends Component { })}>{getLabel(111, "新建")}, ] : [], - children: this.setState({ - SIDialog: { visible: true, id: data.id, title: getLabel(111, "编辑薪资项目") } - }, () => VSSalaryItemForm.updateFields({ - name: data.name, dataType: data.dataType - }))}/> + children: this.setState({ + SIDialog: { visible: true, id: data.id, title: getLabel(111, "编辑薪资项目") } + }, () => VSSalaryItemForm.updateFields({ + name: data.name, dataType: data.dataType + }))}/> } ]; return (