From ca5b60f6aa0cfec2791d51e9e07fe79212effd82 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, 12 Oct 2023 13:57:14 +0800 Subject: [PATCH 1/8] =?UTF-8?q?feature/2.9.42310.01-=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E7=94=B3=E6=8A=A5=E8=A1=A8=E9=A1=B5=E9=9D=A2=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/index.js | 3 +- pc4mobx/hrmSalary/pages/declare/columns.js | 37 ----- .../components/declareDialog/condition.js | 43 ++++++ .../declare/components/declareDialog/index.js | 92 +++++++++++ .../declare/components/declareQuery/index.js | 34 +++++ .../components/declareTablelist/index.js | 144 ++++++++++++++++++ pc4mobx/hrmSalary/pages/declare/declare.js | 81 ++++++++++ pc4mobx/hrmSalary/pages/declare/index.less | 64 ++++++++ pc4mobx/hrmSalary/stores/declare.js | 11 +- 9 files changed, 470 insertions(+), 39 deletions(-) delete mode 100644 pc4mobx/hrmSalary/pages/declare/columns.js create mode 100644 pc4mobx/hrmSalary/pages/declare/components/declareDialog/condition.js create mode 100644 pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js create mode 100644 pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js create mode 100644 pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js create mode 100644 pc4mobx/hrmSalary/pages/declare/declare.js diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index ca8f7464..80199485 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -20,7 +20,8 @@ import Calculate from "./pages/calculate/calculate"; //重构的薪资核算页 import Payroll from "./pages/payroll"; import PayrollGrant from "./pages/payroll/payrollGrant"; import PayrollDetail from "./pages/payroll/payrollDetail"; -import Declare from "./pages/declare"; +// import Declare from "./pages/declare"; +import Declare from "./pages/declare/declare"; //重构的个税申报表 import TaxRate from "./pages/taxRate"; import TaxAgent from "./pages/taxAgent"; import CalculateDetail from "./pages/calculateDetail"; diff --git a/pc4mobx/hrmSalary/pages/declare/columns.js b/pc4mobx/hrmSalary/pages/declare/columns.js deleted file mode 100644 index cb5e65d3..00000000 --- a/pc4mobx/hrmSalary/pages/declare/columns.js +++ /dev/null @@ -1,37 +0,0 @@ -export const columns = [ - { - title: "姓名", - dataIndex: 'title', - key: 'title', - }, - { - title: "个税扣缴义务人", - dataIndex: 'title', - key: 'title', - }, - { - title: "部门", - dataIndex: 'title', - key: 'title', - }, - { - title: "手机号", - dataIndex: 'title', - key: 'title', - }, - { - title: "员工状态", - dataIndex: 'title', - key: 'title', - }, - { - title: "基本工资", - dataIndex: 'title', - key: 'title', - }, - { - title: "操作", - dataIndex: 'cz', - key: 'cz', - } -] diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareDialog/condition.js b/pc4mobx/hrmSalary/pages/declare/components/declareDialog/condition.js new file mode 100644 index 00000000..d880c3f1 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declare/components/declareDialog/condition.js @@ -0,0 +1,43 @@ +export const declareConditions = [ + { + items: [ + { + colSpan: 1, + conditionType: "MONTHPICKER", + domkey: ["salaryMonthStr"], + fieldcol: 14, + label: "薪资所属月", + lanId: 542604, + labelcol: 6, + value: "", + rules: "required|string", + viewAttr: 3 + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["taxAgentId"], + fieldcol: 14, + label: "个税扣缴义务人", + lanId: 537996, + labelcol: 6, + options: [], + rules: "required|string", + viewAttr: 3, + }, + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["description"], + fieldcol: 14, + label: "备注", + lanId: 536726, + labelcol: 6, + value: "", + viewAttr: 2 + } + ], + defaultshow: true, + title: "" + } +]; diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js new file mode 100644 index 00000000..a2ce2936 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js @@ -0,0 +1,92 @@ +/* + * Author: 黎永顺 + * name: 个税申报重构- 申报 + * Description: + * Date: 2023/10/12 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom"; +import { Button, message } from "antd"; +import { getSearchs } from "../../../../util"; +import { getTaxAgentSelectListAsAdmin } from "../../../../apis/taxAgent"; +import { saveDeclare } from "../../../../apis/declare"; +import { declareConditions } from "./condition"; + +const getKey = WeaTools.getKey; +const getLabel = WeaLocaleProvider.getLabel; + +@inject("declareStore") +@observer +class Index extends Component { + constructor(props) { + super(props); + this.state = { + conditions: [], loading: false + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) this.getTaxAgentSelectListAsAdmin(nextProps); + if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.declareStore.initDeclareForm(); + } + + getTaxAgentSelectListAsAdmin = (props) => { + const { declareStore: { declareForm } } = props; + getTaxAgentSelectListAsAdmin().then(({ status, data }) => { + if (status) { + this.setState({ + conditions: _.map(declareConditions, item => ({ + ...item, + items: _.map(item.items, o => { + if (getKey(o) === "taxAgentId") { + return { + ...o, options: _.map(data, g => ({ key: g.id, showname: g.content })) + // helpfulTitle: getLabel(563420, "提示:可选择单个个税扣缴义务人进行申报,若不选择,则批量对管理下的所有个税扣缴义务人进行申报;") + }; + } + return { ...o }; + }) + })) + }, () => declareForm.initFormFields(this.state.conditions)); + } + }); + }; + save = () => { + const { declareStore: { declareForm } } = this.props; + declareForm.validateForm().then(f => { + if (f.isValid) { + const payload = declareForm.getFormParams(); + this.setState({ loading: true }); + saveDeclare({ ...payload }).then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success(getLabel(30700, "操作成功")); + this.props.onCancel("refresh"); + } else { + message.error(errormsg); + } + }).catch(() => this.setState({ loading: false })); + } else { + f.showErrors(); + } + }); + }; + + render() { + const { conditions, loading } = this.state; + const { declareStore: { declareForm } } = this.props; + return ( + {getLabel(543618, "生成申报表")} + ]} + > +
{getSearchs(declareForm, conditions, 1, false)}
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js new file mode 100644 index 00000000..f5627a0c --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js @@ -0,0 +1,34 @@ +/* + * Author: 黎永顺 + * name: 个税申报表重构-查询 + * Description: + * Date: 2023/10/12 + */ +import React, { Component } from "react"; +import { WeaInputSearch, WeaLocaleProvider } from "ecCom"; +import { MonthRangePicker } from "../../../reportView/components/statisticalMicroSettingsSlide"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + render() { + const { queryParams } = this.props; + const { dateRange, name } = queryParams; + return ( +
+
+ {getLabel(543549, "薪资所属月:")} + this.props.onChange({ dateRange: v })}/> +
+ this.props.onChange({ taxAgentName: v })} + onSearch={this.props.onSearch} + /> +
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js new file mode 100644 index 00000000..5ee8b1b4 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js @@ -0,0 +1,144 @@ +/* + * Author: 黎永顺 + * name: 个税申报重构-列表 + * Description: + * Date: 2023/10/12 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; +import { message, Modal } from "antd"; +import { getDeclareList, withDrawTaxDeclaration } from "../../../../apis/declare"; +import { sysConfCodeRule } from "../../../../apis/ruleconfig"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + loading: false, columns: [], dataSource: [], showWithDrawBtn: false, + pageInfo: { current: 1, pageSize: 10, total: 0 } + }; + } + + componentDidMount() { + this.getDeclareList(this.props); + this.sysConfCodeRule(); + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.isRefresh !== this.props.isRefresh) this.getDeclareList(nextProps); + } + + sysConfCodeRule = () => { + sysConfCodeRule({ code: "WITHDRAW_TAX_DECLARATION" }).then(({ status, data }) => { + if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" }); + }); + }; + getDeclareList = (props) => { + const { pageInfo } = this.state; + const { queryParams } = props; + const { dateRange, ...extra } = queryParams; + const [fromSalaryMonthStr, endSalaryMonthStr] = dateRange || []; + const params = { fromSalaryMonthStr, endSalaryMonthStr, ...extra }; + const payload = { ...pageInfo, ...params }; + this.setState({ loading: true }); + getDeclareList(payload).then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const { columns, list: dataSource, pageNum, pageSize, total } = data; + this.setState({ + dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total }, + columns: _.map(columns, o => { + const { dataIndex } = o; + let width = ""; + switch (dataIndex) { + case "taxAgentName": + case "operateTime": + width = "15%"; + break; + case "description": + width = "20%"; + break; + default: + width = "10%"; + break; + } + return { ...o, width }; + }) + }); + } + }).catch(() => this.setState({ loading: false })); + }; + taxdeclarationDelete = (taxDeclarationId) => { + withDrawTaxDeclaration({ taxDeclarationId }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(505793, "撤回成功")); + this.getDeclareList(this.props); + } else { + message.error(errormsg); + } + }); + }; + + render() { + const { loading, dataSource, columns, pageInfo, showWithDrawBtn } = this.state; + const 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 } + }, () => this.getDeclareList(this.props)); + }, + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }, () => this.getDeclareList(this.props)); + } + }; + return ( + { + const { id } = record; + return + + {getLabel(83110, "查看详情")} + + { + showWithDrawBtn && + { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(543848, "确认撤回该条数据吗?"), + onOk: () => this.taxdeclarationDelete(id) + }); + }} + > + {getLabel(32025, "撤回")} + + } + ; + } + } + ]} + /> + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/declare/declare.js b/pc4mobx/hrmSalary/pages/declare/declare.js new file mode 100644 index 00000000..0fa5dc90 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/declare/declare.js @@ -0,0 +1,81 @@ +/* + * Author: 黎永顺 + * name: 个税申报表-重构页面 + * Description: + * Date: 2023/10/12 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { WeaHelpfulTip, WeaLocaleProvider, WeaTop } from "ecCom"; +import { Button } from "antd"; +import moment from "moment"; +import DeclareQuery from "./components/declareQuery"; +import DeclareTablelist from "./components/declareTablelist"; +import DeclareDialog from "./components/declareDialog"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +@inject("taxAgentStore") +@observer +class Calculate extends Component { + constructor(props) { + super(props); + this.state = { + queryParams: { + taxAgentName: "", + dateRange: [ + moment(new Date()).startOf("year").format("YYYY-MM"), + moment(new Date()).startOf("month").format("YYYY-MM") + ] + }, isRefresh: false, + declareDaialog: { visible: false, title: "" } + }; + this.handleDebounce = null; + } + + renderCalculateOpts = () => { + const { taxAgentStore: { showOperateBtn } } = this.props; + const { queryParams, isRefresh } = this.state; + let calculateOpts = [ + , + this.setState({ + isRefresh: _.keys(v)[0] === "taxAgentName" ? isRefresh : !isRefresh, + queryParams: { ...queryParams, ...v } + })} onSearch={() => this.setState({ isRefresh: !isRefresh })}/> + ]; + return !showOperateBtn ? calculateOpts.slice(1) : calculateOpts; + }; + + render() { + const { queryParams, isRefresh, declareDaialog } = this.state; + return ( + } iconBgcolor="#F14A2D" + buttons={this.renderCalculateOpts()} className="declare-main-layout" + > +
+ + this.setState({ + declareDaialog: { ...declareDaialog, visible: false }, + isRefresh: bool === "refresh" ? !isRefresh : isRefresh + })} + /> +
+
+ ); + } +} + +export default Calculate; diff --git a/pc4mobx/hrmSalary/pages/declare/index.less b/pc4mobx/hrmSalary/pages/declare/index.less index 81e72b6f..52564e0a 100644 --- a/pc4mobx/hrmSalary/pages/declare/index.less +++ b/pc4mobx/hrmSalary/pages/declare/index.less @@ -24,3 +24,67 @@ } } } + +//个税申报表页面-重构 +.declare-main-layout { + .wea-new-top-content { + overflow-y: hidden; + } + + .declare-body { + height: 100%; + width: 100%; + padding: 16px; + overflow-y: auto; + + .wea-new-table { + background: #fff; + } + + .ant-table-tbody { + td { + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + + } +} + +.declare-dialog-layout { + background: #f6f6f6; + + .wea-search-group { + padding: 16px; + } + + .wea-select, .ant-select-selection, .ant-select { + width: 100%; + } + + .wea-select { + display: inline-block; + position: relative; + } + + .ant-select-selection { + height: 30px; + border-radius: 0; + } + + .wea-content { + padding: 0; + + .wea-form-cell-wrapper { + background: #FFF; + border: 1px solid #e5e5e5; + border-bottom: none; + + .wea-form-cell { + border-bottom: 1px solid #e5e5e5; + } + } + } +} diff --git a/pc4mobx/hrmSalary/stores/declare.js b/pc4mobx/hrmSalary/stores/declare.js index cf80a323..e1691486 100644 --- a/pc4mobx/hrmSalary/stores/declare.js +++ b/pc4mobx/hrmSalary/stores/declare.js @@ -7,13 +7,22 @@ import * as API from "../apis/declare"; // 引入API接口文件 const { TableStore } = WeaTableNew; export class DeclareStore { + @observable declareForm = new WeaForm(); //薪资核算重构-核算form + // ** 薪资核算重构-初始化核算form ** + @action + initDeclareForm = () => this.declareForm = new WeaForm(); + + + + + + @observable tableStore = new TableStore(); // new table @observable form = new WeaForm(); // nrew 一个form @observable condition = []; // 存储后台得到的form数据 @observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据 @observable showSearchAd = false; // 高级搜索面板显示 @observable loading = true; // 数据加载状态 - // 列表 @observable listDataSource = []; @observable listColumns = []; From a84a21600072fb08c230dfc09508f25e278d7665 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, 17 Oct 2023 11:01:29 +0800 Subject: [PATCH 2/8] =?UTF-8?q?hotfix/2.9.42309.01-=E4=B8=AA=E7=A8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ledgerPage/components/ledgerSalaryItemTable.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js index 123b74ab..3d8b690a 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js @@ -261,11 +261,11 @@ class LedgerSalaryItemTable extends Component { return {key.toString() === "1" ? "输入" : key.toString() === "2" ? formulaContent : key.toString() === "3" ? formulaContent : ""} ; } }, - { - title: "个税申请表对应字段", - dataIndex: "taxDeclarationColumn", - key: "taxDeclarationColumn" - }, + // { + // title: "个税申请表对应字段", + // dataIndex: "taxDeclarationColumn", + // key: "taxDeclarationColumn" + // }, { title: Date: Thu, 19 Oct 2023 13:38:00 +0800 Subject: [PATCH 3/8] hotfix/2.9.42310.01 --- pc4mobx/hrmSalary/pages/salaryItem/columns.js | 2 +- pc4mobx/hrmSalary/pages/salaryItem/index.js | 2 +- pc4mobx/hrmSalary/pages/salaryItem/index.less | 22 ++++++++++++++++++- .../syncToSalaryAccountSetDialog.js | 2 +- pc4mobx/hrmSalary/stores/salaryItem.js | 2 +- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/columns.js b/pc4mobx/hrmSalary/pages/salaryItem/columns.js index 47abe5b1..04581655 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/columns.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/columns.js @@ -163,7 +163,7 @@ export const salarySetConditions = [ checkboxValue: false, conditionType: "SELECT", domkey: ["salarySobIds"], - fieldcol: 18, + fieldcol: 14, label: "薪资账套", lanId: 538010, labelcol: 6, diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js index a4ffcd0a..77dcae48 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js @@ -323,7 +323,7 @@ export default class SalaryItem extends React.Component { })} >{getLabel(111, "同步到薪资账套")}, ]; } diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.less b/pc4mobx/hrmSalary/pages/salaryItem/index.less index b0063821..90870f6c 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.less +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.less @@ -105,6 +105,26 @@ .salarySetDialog { .salarySetDialogContent { + background: #f6f6f6; + + .wea-search-group { + padding: 16px; + } + + .wea-content { + padding: 0; + + .wea-form-cell-wrapper { + background: #FFF; + border: 1px solid #e5e5e5; + border-bottom: none; + + .wea-form-cell { + border-bottom: 1px solid #e5e5e5; + } + } + } + .wea-select, .ant-select, .ant-select-selection { width: 100%; } @@ -125,7 +145,7 @@ height: 30px; white-space: nowrap; min-width: 100px; - max-width: 345px; + max-width: 237px; width: 100%; display: inline-block; padding: 4px 17px 4px 4px; diff --git a/pc4mobx/hrmSalary/pages/salaryItem/syncToSalaryAccountSetDialog.js b/pc4mobx/hrmSalary/pages/salaryItem/syncToSalaryAccountSetDialog.js index e8ca847b..797a6466 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/syncToSalaryAccountSetDialog.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/syncToSalaryAccountSetDialog.js @@ -80,7 +80,7 @@ class SyncToSalaryAccountSetDialog extends Component { return ( {getLabel(537558, "确定")}]} > diff --git a/pc4mobx/hrmSalary/stores/salaryItem.js b/pc4mobx/hrmSalary/stores/salaryItem.js index 7e7925bc..54a84562 100644 --- a/pc4mobx/hrmSalary/stores/salaryItem.js +++ b/pc4mobx/hrmSalary/stores/salaryItem.js @@ -309,7 +309,7 @@ export class SalaryItemStore { if (!continueFlag) { this.editSlideVisible = false; } - this.initRequest(); + ((!params.id && continueFlag) || !continueFlag) && this.initRequest(); message.success("保存成功"); resolve(); } else { From f78a59285a13407161d146233aa5c0a6ae2f7235 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, 20 Oct 2023 11:18:27 +0800 Subject: [PATCH 4/8] hotfix/2.9.42310.01 --- .../doCalc/components/salaryEditCalc/index.js | 7 +------ .../hrmSalary/pages/calculate/doCalc/index.js | 17 ++++++++++++++--- .../hrmSalary/pages/calculate/doCalc/index.less | 7 +++++++ 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js index e077a08f..8618f667 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js @@ -6,7 +6,6 @@ */ import React, { Component } from "react"; import { WeaHelpfulTip, WeaLocaleProvider } from "ecCom"; -import { Alert } from "antd"; import { getColumnDesc, getSalarySobCycle } from "../../../../../apis/calculate"; import { sysConfCodeRule } from "../../../../../apis/ruleconfig"; import EditCalcAdvanceSearchPannel from "./editCalcAdvanceSearchPannel"; @@ -52,14 +51,10 @@ class Index extends Component { render() { const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell } = this.state; - const { accountExceptInfo, routeParams: { salaryAcctRecordId } } = this.props; + const { routeParams: { salaryAcctRecordId } } = this.props; const formulaObj = _.get(columnDesc, [formulaTd]) || {}; return (
- { - accountExceptInfo && - - }
{getLabel(542604, "薪资所属月")}: diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js index 17480945..d8a8d78e 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js @@ -130,7 +130,7 @@ class Index extends Component { } }; renderReqBtns = () => { - const { selectedKey } = this.state; + const { selectedKey, accountExceptInfo } = this.state; let reqBtns = []; switch (selectedKey) { case "calc": @@ -155,21 +155,32 @@ class Index extends Component { this.calc.openAdvanceSearch()} onAdvanceSearch={() => this.calc.onAdSearch(false)}/> ]; + accountExceptInfo && reqBtns.unshift( this.downloadTxtfile(accountExceptInfo)}/>); break; default: break; } return reqBtns; }; + downloadTxtfile = (value) => { + const element = document.createElement("a"); + const file = new Blob([value], { type: "text/plain" }); + element.href = URL.createObjectURL(file); + element.download = "核算异常信息.txt"; + document.body.appendChild(element); + element.click(); + }; renderContent = () => { - const { selectedKey, accountExceptInfo } = this.state; + const { selectedKey } = this.state; let dom = null; switch (selectedKey) { case "person": dom = ; break; case "calc": - dom = this.calc = dom}/>; + dom = this.calc = dom}/>; break; default: break; diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.less index b64a4dad..90c0839b 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.less +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.less @@ -5,6 +5,13 @@ height: 100%; background: #f6f6f6; + .icon-jinggao { + color: red; + font-size: 20px; + margin-right: 10px; + cursor: pointer; + } + .wea-new-top-req { z-index: 0 !important; } From 26b25e04dfbcc1d82a9636930f0e37cecb2ba58f 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, 20 Oct 2023 11:21:14 +0800 Subject: [PATCH 5/8] hotfix/2.9.42310.01 --- .../doCalc/components/salaryEditCalc/editSalaryCalcSlide.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js index d04b80bf..16cacd2c 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editSalaryCalcSlide.js @@ -50,7 +50,7 @@ class EditSalaryCalcSlide extends Component {
{getLabel(543559, "编辑薪资")}
- +
; }; From 4898ff833522cc0bfae2573bad8d29341f074ab6 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, 20 Oct 2023 11:39:20 +0800 Subject: [PATCH 6/8] hotfix/2.9.42310.01 --- .../excelEditor/components/codeAction.js | 15 ++++++- .../components/excelEditor/index.less | 43 ++++++++++++++++++- 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js b/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js index bca61000..5dc1a646 100644 --- a/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js +++ b/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js @@ -7,6 +7,7 @@ import React, { Component } from "react"; import { WeaInputSearch, WeaLocaleProvider } from "ecCom"; import { Tree } from "antd"; +import cs from "classnames"; import { formualSearchField, formualSearchGroup, getFormulaDes } from "../../../apis/item"; import "../index.less"; @@ -139,7 +140,7 @@ class CodeAction extends Component { return { _.map([...children.slice(0, 1), ...itemChildren], (child, childIndex) => { - const { name, fieldId } = child; + const { name, fieldId, fieldType } = child; return ( fieldId === "searchInput" ? } key={fieldId + "_" + childIndex}/> : - + + {name} + { + fieldType ? + {fieldType === "number" ? "数字" : "文本"} : + + } +
+ } key={fieldId}/> ); }) } diff --git a/pc4mobx/hrmSalary/components/excelEditor/index.less b/pc4mobx/hrmSalary/components/excelEditor/index.less index 0ea0081a..35de776f 100644 --- a/pc4mobx/hrmSalary/components/excelEditor/index.less +++ b/pc4mobx/hrmSalary/components/excelEditor/index.less @@ -186,14 +186,53 @@ .code-action-list { padding: 10px 0; - .code-action-tips-title{ + + .code-action-tips-title { height: 22px; line-height: 22px; } - .code-action-tips-info{ + + .code-action-tips-info { color: #999 } } + + .weapp-excel-code-action-list-variable { + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + + .weapp-excel-code-action-list-variable-name { + height: 20px; + line-height: 18px; + -webkit-flex: 1 1; + flex: 1 1; + overflow: hidden; + text-overflow: ellipsis; + word-break: keep-all; + white-space: nowrap; + cursor: pointer; + } + + .danger { + color: rgb(255, 102, 106)!important; + border: 1px solid rgb(255, 193, 195)!important; + background-color: rgb(255, 223, 224)!important; + } + + .weapp-excel-code-action-list-variable-tip { + width: 40px; + height: 20px; + line-height: 18px; + text-align: center; + vertical-align: middle; + color: rgb(255, 205, 80); + border: 1px solid rgb(255, 222, 138); + background-color: rgb(255, 245, 219); + border-radius: 2px; + } + } } } } From d075fceb05559dea329c940b6815c301607ee2c1 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, 20 Oct 2023 14:41:42 +0800 Subject: [PATCH 7/8] hotfix/2.9.42310.01 --- .../fieldManagement/components/fieldSlide.js | 33 +++++++++++-------- .../pages/salaryItem/salaryItemForm.js | 7 +++- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js index 9e10b3a6..ab02fe74 100644 --- a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js +++ b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js @@ -306,20 +306,25 @@ class FieldSlide extends Component { onChange={value => this.handleChangeFields("dataType", value)} /> - - this.handleChangeFields("roundingMode", value)} - /> - - - this.handleChangeFields("pattern", value)} - /> - + { + dataType === "number" && + + + this.handleChangeFields("roundingMode", value)} + /> + + + this.handleChangeFields("pattern", value)} + /> + + + } this.handleChangeFields("sortedIndex", value)}/> diff --git a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js index bf80c8f8..4d102ebd 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js @@ -30,7 +30,7 @@ class SalaryItemForm extends Component { componentDidMount() { const { salaryItemFieldsList } = this.state; const { request, editable, record, isAdd = false, taxAgentAdminOption, isLedger = false } = this.props; - const { systemType = "", sharedType, valueType, useInEmployeeSalary } = request; + const { systemType = "", sharedType, valueType, useInEmployeeSalary, dataType } = request; this.setState({ salaryItemFieldsList: _.map(salaryItemFieldsList, item => { const { key } = item; @@ -43,6 +43,9 @@ class SalaryItemForm extends Component { viewAttr: (!isLedger && ((editable && record.canEdit) || isAdd)) ? 2 : 1, display: !isLedger }; + case "pattern": + case "roundingMode": + return { ...item, display: dataType === "number" }; case "sortedIndex": return { ...item }; case "useInEmployeeSalary": @@ -101,6 +104,8 @@ class SalaryItemForm extends Component { salaryItemFieldsList: _.map(salaryItemFieldsList, item => { if (key === "sharedType" && item.key === "taxAgentIds") { return { ...item, display: v === "1", viewAttr: 3 }; + } else if (key === "dataType" && (item.key === "roundingMode" || item.key === "pattern")) { + return { ...item, display: v === "number" }; } else if (key === "valueType" && (item.key === "originSqlContent" || item.key === "originFormulaContent")) { return { ...item, From cd163693c83833e58c70090ce1279aaebe163102 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, 23 Oct 2023 11:06:04 +0800 Subject: [PATCH 8/8] =?UTF-8?q?release/2.9.42310.01-=E4=B8=AA=E7=A8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/declare/components/declareTablelist/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js index 5ee8b1b4..e4c3512c 100644 --- a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js +++ b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js @@ -112,7 +112,7 @@ class Index extends Component { const { id } = record; return {getLabel(83110, "查看详情")}