From e8f820058b21df737dafdfd2d804cd34f9b779d9 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 25 Dec 2024 10:54:45 +0800 Subject: [PATCH] =?UTF-8?q?release/2.18.2.2412.02-=E4=B8=AA=E7=A8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/components/FormInfo/index.js | 2 +- .../pages/dataAcquisition/otherDeduct/columns.js | 2 +- .../otherDeduct/detailSettingsDialog.js | 13 +++++++++++-- .../dataAcquisition/otherDeduct/taxSetDialog.js | 14 +++++++++++--- pc4mobx/hrmSalary/style/index.less | 7 +++++++ 5 files changed, 31 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/components/FormInfo/index.js b/pc4mobx/hrmSalary/components/FormInfo/index.js index 8d7847c0..55fe099f 100644 --- a/pc4mobx/hrmSalary/components/FormInfo/index.js +++ b/pc4mobx/hrmSalary/components/FormInfo/index.js @@ -21,7 +21,7 @@ export default class FormInfo extends Component { style: { marginLeft: 0 }, tipPosition: "bottom", labelCol: { span: labelCol }, - wrapperCol: { span: 24 - labelCol } + wrapperCol: { span: 22 - labelCol } }; const textAreaProps = { minRows: 4, maxRows: 4 }; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js index 682a7047..4d967592 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js @@ -157,7 +157,7 @@ export const taxDetailSettingsConditions = { domkey: ["freeProperty"], fieldcol: 14, label: "免税性质", - labelcol: 4, + labelcol: 8, value: "", rules: "required|string", viewAttr: 3 diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/detailSettingsDialog.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/detailSettingsDialog.js index 82f72dcb..b4155c08 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/detailSettingsDialog.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/detailSettingsDialog.js @@ -10,10 +10,12 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { WeaDialog, WeaLocaleProvider } from "ecCom"; +import { WeaSwitch } from "comsMobx"; import FormInfo from "../../../components/FormInfo"; import { taxDetailSettingsConditions } from "./columns"; import * as API from "../../../apis/otherDeduct"; import { Button, message } from "antd"; +import { toDecimal_n } from "../../../util"; const getLabel = WeaLocaleProvider.getLabel; @@ -42,7 +44,7 @@ class DetailSettingsDialog extends Component { const payload = settingsForm.getFormParams(); this.setState({ loading: true }); API.saveFreeIncome({ ...payload, mainId }).then(({ status, errormsg }) => { - this.setState({ loading: true }); + this.setState({ loading: false }); if (status) { message.success(getLabel(111, "操作成功!")); this.props.onCancel(this.props.onSuccess()); @@ -58,6 +60,13 @@ class DetailSettingsDialog extends Component { render() { const { otherDeductStore: { settingsForm }, dataType } = this.props, { loading } = this.state; + const itemRender = { + freeAmount: (field, textAreaProps, form, formParams) => { + return ( v && form.updateFields({ freeAmount: { value: toDecimal_n(v, 2) } })}/>); + } + }; return ( {getLabel(111, "取消")} ]} > - ); diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/taxSetDialog.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/taxSetDialog.js index 9d3fc831..77184674 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/taxSetDialog.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/taxSetDialog.js @@ -45,8 +45,16 @@ class TaxSetDialog extends Component { if (status) { const { columns, list: dataSource, pageNum: current, pageSize, total } = data; this.setState({ - columns, - dataSource, pageInfo: { current, pageSize, total } + dataSource, pageInfo: { current, pageSize, total }, + columns: _.map(columns, o => ({ + ...o, width: o.dataIndex === "operate" && 120, + render: (text, record) => o.dataIndex === "operate" ? + (
+ {getLabel(111, "编辑")} + {getLabel(111, "删除")} +
) : + ({text}) + })) }); } }); @@ -93,7 +101,7 @@ class TaxSetDialog extends Component { + scroll={{ y: this.taxSetRef ? this.taxSetRef.state.height - 156 : 600 }}/> this.setState({ detailSettingsDialog: { ...detailSettingsDialog, visible: false } })} onSuccess={this.getList}/> diff --git a/pc4mobx/hrmSalary/style/index.less b/pc4mobx/hrmSalary/style/index.less index 3baf4e56..7e589845 100644 --- a/pc4mobx/hrmSalary/style/index.less +++ b/pc4mobx/hrmSalary/style/index.less @@ -152,3 +152,10 @@ } } +//公共表格操作按钮间距 +.space_div { + a:not(:last-child) { + margin-right: 8px; + } +} +