From 573f2cf62d8aa04c07294ec85b503e285b8bfcf0 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 15 Apr 2025 09:26:52 +0800 Subject: [PATCH 01/11] =?UTF-8?q?release/3.0.1.2504.01-=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datapush/components/pushRecord/index.js | 6 +++-- pc4mobx/hrmSalary/pages/datapush/index.js | 25 +++++++++++-------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/index.js b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/index.js index f73e220b..7bcb8bd5 100644 --- a/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/index.js +++ b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/index.js @@ -47,9 +47,11 @@ class Index extends Component { this.setState({ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, columns: [...columns, { - title: getLabel(111, "操作"), dataIndex: "opts", width: 120, render: (__, record) => ( + title: getLabel(111, "操作"), dataIndex: "opts", width: 140, render: (__, record) => ( this.props.onChange("push", record)}>{getLabel(111, "推送")} + onClick={() => _.debounce(this.props.onChange("push", record), 300)}>{getLabel(111, "推送")} + this.props.onChange("withdraw", record)}>{getLabel(111, "撤回")} this.props.onChange("view", record)}>{getLabel(111, "查看详情")} ) diff --git a/pc4mobx/hrmSalary/pages/datapush/index.js b/pc4mobx/hrmSalary/pages/datapush/index.js index bdabd479..17f23fab 100644 --- a/pc4mobx/hrmSalary/pages/datapush/index.js +++ b/pc4mobx/hrmSalary/pages/datapush/index.js @@ -27,7 +27,7 @@ class Index extends Component { constructor(props) { super(props); this.state = { - selectedKey: "datapush", isQuery: false, query: { name: "" }, + selectedKey: "pushRecord", isQuery: false, query: { name: "" }, DPDialog: { visible: false, title: "", detail: {} }, //数据推送弹框 pushDetailDialog: { visible: false, recordId: "" } //数据推送记录查看推送详情弹框 }; @@ -60,6 +60,9 @@ class Index extends Component { case "view": this.setState({ pushDetailDialog: { visible: true, recordId: detail.id } }); break; + case "push": + console.log(detail) + break; default: break; } @@ -70,16 +73,6 @@ class Index extends Component { const { taxAgentStore: { PageAndOptAuth } } = this.props; const showOperateBtn = PageAndOptAuth.opts.includes("admin"); const tabs = [ - { - title: getLabel(111, "数据推送"), key: "datapush", showDropIcon: false, dropMenuDatas: [], - buttons: showOperateBtn ? [ - , - this.setState({ query: { ...query, name: v } })}/> - ] : [ this.setState({ query: { ...query, name: v } })}/>], - children: - }, { title: getLabel(111, "推送记录"), key: "pushRecord", showDropIcon: false, dropMenuDatas: [], buttons: showOperateBtn ? [ @@ -89,6 +82,16 @@ class Index extends Component { ] : [ this.setState({ query: { ...query, name: v } })}/>], children: + }, + { + title: getLabel(111, "数据推送"), key: "datapush", showDropIcon: false, dropMenuDatas: [], + buttons: showOperateBtn ? [ + , + this.setState({ query: { ...query, name: v } })}/> + ] : [ this.setState({ query: { ...query, name: v } })}/>], + children: } ]; return ( From 1cbb7ce9436fc3e7c86b2ea22768f4cdbdb88024 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 15 Apr 2025 13:49:09 +0800 Subject: [PATCH 02/11] =?UTF-8?q?release/3.0.1.2504.01-=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/datapush.js | 8 ++ .../pushRecord/createPushRecordDialog.js | 134 ++++++++++++++++++ .../datapush/components/pushRecord/index.js | 10 +- .../hrmSalary/pages/datapush/conditions.js | 40 ++++++ pc4mobx/hrmSalary/pages/datapush/index.js | 59 +++++++- pc4mobx/hrmSalary/pages/datapush/index.less | 25 ++++ 6 files changed, 267 insertions(+), 9 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js diff --git a/pc4mobx/hrmSalary/apis/datapush.js b/pc4mobx/hrmSalary/apis/datapush.js index 27d73608..e348875c 100644 --- a/pc4mobx/hrmSalary/apis/datapush.js +++ b/pc4mobx/hrmSalary/apis/datapush.js @@ -32,3 +32,11 @@ export const getPushRecordList = (params) => { export const getPushRecordDetail = (params) => { return postFetch("/api/bs/hrmsalary/push/record/detail", params); }; +// 推送记录-推送 +export const pushRecords = (params) => { + return postFetch("/api/bs/hrmsalary/push/record/push", params); +}; +// 推送记录-撤回 +export const withdrawRecords = (params) => { + return postFetch("/api/bs/hrmsalary/push/record/withdraw", params); +}; diff --git a/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js new file mode 100644 index 00000000..b6de8562 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js @@ -0,0 +1,134 @@ +/* + * 数据推送记录 + * 创建 + * @Author: 黎永顺 + * @Date: 2025/4/15 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaDialog, WeaFormItem, WeaLocaleProvider, WeaTable, WeaTools } from "ecCom"; +import { WeaForm, WeaSwitch } from "comsMobx"; +import { Button } from "antd"; +import moment from "moment"; +import FormInfo from "../../../../components/FormInfo"; +import { RQconditions } from "../../conditions"; +import { MonthRangePicker } from "../../../reportView/components/statisticalMicroSettingsSlide"; +import { getSalaryAcctList } from "../../../../apis/calculate"; + +const form = new WeaForm(); +const getKey = WeaTools.getKey; +const getLabel = WeaLocaleProvider.getLabel; + +class CreatePushRecordDialog extends Component { + constructor(props) { + super(props); + this.state = { + dataSource: [], columns: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 }, + conditions: [] + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) { + this.setState({ + conditions: _.map(RQconditions, item => ({ + ...item, + items: _.map(item.items, o => { + o = { ...o, label: getLabel(o.lanId, o.label) }; + if (getKey(o) === "startMonthStr") { + return { + ...o, value: moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM") + }; + } else if (getKey(o) === "endMonthStr") { + return { + ...o, value: moment(new Date()).endOf("year").format("YYYY-MM") + }; + } + return o; + }) + })) + }, () => { + form.initFormFields(this.state.conditions); + this.getSalaryAcctList(); + }); + } else { + form.resetForm(); + } + } + + getSalaryAcctList = () => { + const { pageInfo } = this.state, payload = { ...pageInfo, ...form.getFormParams() }; + this.setState({ loading: true }); + getSalaryAcctList(payload).then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const { columns, list: dataSource, pageNum: current, pageSize, total } = data; + this.setState({ + dataSource, pageInfo: { current, pageSize, total }, + columns: _.filter(columns, it => (it.dataIndex !== "backCalcStatus" && it.dataIndex !== "acctTimes" && it.dataIndex !== "operate")) + }); + } + }).catch(() => this.setState({ loading: false })); + }; + save = (record) => { + console.log(record); + }; + + render() { + const { loading, conditions, dataSource, columns, pageInfo } = 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.getSalaryAcctList()); + }, + onChange: current => { + this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getSalaryAcctList()); + } + }; + const itemRender = { + name: (field, textAreaProps, form, formParams) => { + return ( this.getSalaryAcctList(), 500)}/>); + }, + startMonthStr: () => null, + endMonthStr: () => null + }; + const childrenComponents = { + startMonthStr: () => { + const { startMonthStr, endMonthStr } = form.getFormParams(); + const coms = [], { fieldMap } = form; + const dateRange = [startMonthStr, endMonthStr]; + coms.push( + {fieldMap["startMonthStr"].label}} labelCol={{ span: 6 }} + wrapperCol={{ span: 14 }}> + { + const [v1, v2] = v; + form.updateFields({ startMonthStr: v1, endMonthStr: v2 }); + this.getSalaryAcctList(); + }}/> + + ); + return [{ com: coms, col: 2 }]; + } + }; + console.log(this.refs.recordRef); + return ({getLabel(111, "取消")} + ]}> + + + ); + } +} + +export default CreatePushRecordDialog; diff --git a/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/index.js b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/index.js index 7bcb8bd5..08287119 100644 --- a/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/index.js +++ b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/index.js @@ -27,7 +27,7 @@ class Index extends Component { } componentWillUnmount() { - this.setState({ selectedRowKeys: [] }); + this.setState({ selectedRowKeys: [] }, () => this.props.onChange("rowKey", [])); } componentWillReceiveProps(nextProps, nextContext) { @@ -49,9 +49,9 @@ class Index extends Component { columns: [...columns, { title: getLabel(111, "操作"), dataIndex: "opts", width: 140, render: (__, record) => ( _.debounce(this.props.onChange("push", record), 300)}>{getLabel(111, "推送")} + onClick={_.debounce(() => this.props.onChange("push", record), 300)}>{getLabel(111, "推送")} this.props.onChange("withdraw", record)}>{getLabel(111, "撤回")} + onClick={_.debounce(() => this.props.onChange("withdraw", record), 300)}>{getLabel(111, "撤回")} this.props.onChange("view", record)}>{getLabel(111, "查看详情")} ) @@ -78,9 +78,9 @@ class Index extends Component { }; const rowSelection = { selectedRowKeys, - onChange: v => this.setState({ selectedRowKeys: v }) + onChange: v => this.setState({ selectedRowKeys: v }, () => this.props.onChange("rowKey", v)) }; - return (); } } diff --git a/pc4mobx/hrmSalary/pages/datapush/conditions.js b/pc4mobx/hrmSalary/pages/datapush/conditions.js index 04401305..c4f12a09 100644 --- a/pc4mobx/hrmSalary/pages/datapush/conditions.js +++ b/pc4mobx/hrmSalary/pages/datapush/conditions.js @@ -145,3 +145,43 @@ export const PDConditions = [ defaultshow: true } ];// 推送详细配置表单 + + +export const RQconditions = [ + { + items: [ + { + conditionType: "MONTHPICKER", + domkey: ["startMonthStr"], + fieldcol: 14, + label: "薪资所属月", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + conditionType: "MONTHPICKER", + domkey: ["endMonthStr"], + fieldcol: 14, + label: "薪资所属月", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["name"], + fieldcol: 14, + label: "薪资账套", + lanId: 111, + labelcol: 6, + value: "", + viewAttr: 2 + } + ], + title: "", + defaultshow: true + } +];// 推送记录查询表单 diff --git a/pc4mobx/hrmSalary/pages/datapush/index.js b/pc4mobx/hrmSalary/pages/datapush/index.js index 17f23fab..49d1d69d 100644 --- a/pc4mobx/hrmSalary/pages/datapush/index.js +++ b/pc4mobx/hrmSalary/pages/datapush/index.js @@ -18,6 +18,7 @@ import PushDetailDialog from "./components/pushRecord/pushDetailDialog"; import { Button, message, Modal } from "antd"; import cs from "classnames"; import "./index.less"; +import CreatePushRecordDialog from "./components/pushRecord/createPushRecordDialog"; const getLabel = WeaLocaleProvider.getLabel; @@ -27,7 +28,8 @@ class Index extends Component { constructor(props) { super(props); this.state = { - selectedKey: "pushRecord", isQuery: false, query: { name: "" }, + selectedKey: "pushRecord", isQuery: false, query: { name: "" }, selectedRowKeys: [], + loading: { push: false, withdraw: false }, visible: false, DPDialog: { visible: false, title: "", detail: {} }, //数据推送弹框 pushDetailDialog: { visible: false, recordId: "" } //数据推送记录查看推送详情弹框 }; @@ -60,23 +62,71 @@ class Index extends Component { case "view": this.setState({ pushDetailDialog: { visible: true, recordId: detail.id } }); break; + case "rowKey": + this.setState({ selectedRowKeys: detail }); + break; + case "addRecord": + this.setState({ visible: true }); + break; case "push": - console.log(detail) + case "batchpush": + if (type === "batchpush" && _.isEmpty(this.state.selectedRowKeys)) { + message.warning(getLabel(111, "请选择数据")); + return; + } + this.pushRecords(type === "push" ? [detail.id] : this.state.selectedRowKeys); + break; + case "withdraw": + case "batchwithdraw": + if (type === "batchwithdraw" && _.isEmpty(this.state.selectedRowKeys)) { + message.warning(getLabel(111, "请选择数据")); + return; + } + this.withdrawRecords(type === "withdraw" ? [detail.id] : this.state.selectedRowKeys); break; default: break; } }; + pushRecords = (ids) => { + this.setState({ loading: { ...this.state.loading, push: true } }); + API.pushRecords({ ids }).then(({ status, errormsg }) => { + this.setState({ loading: { ...this.state.loading, push: false } }); + if (status) { + this.handleAdvanceSearch(); + message.success(getLabel(111, "推送成功!")); + } else { + message.error(errormsg); + } + }); + }; + withdrawRecords = (ids) => { + this.setState({ loading: { ...this.state.loading, withdraw: true } }); + API.withdrawRecords({ ids }).then(({ status, errormsg }) => { + this.setState({ loading: { ...this.state.loading, withdraw: false } }); + if (status) { + this.handleAdvanceSearch(); + message.success(getLabel(111, "撤回成功!")); + } else { + message.error(errormsg); + } + }); + }; render() { - const { selectedKey, DPDialog, isQuery, query, pushDetailDialog } = this.state; + const { selectedKey, DPDialog, isQuery, query, pushDetailDialog, loading, visible } = this.state; const { taxAgentStore: { PageAndOptAuth } } = this.props; const showOperateBtn = PageAndOptAuth.opts.includes("admin"); const tabs = [ { title: getLabel(111, "推送记录"), key: "pushRecord", showDropIcon: false, dropMenuDatas: [], buttons: showOperateBtn ? [ - , + , + , + , this.setState({ query: { ...query, name: v } })}/> ] : [ this.setState({ pushDetailDialog: { ...pushDetailDialog, visible: false } })}/> + this.setState({ visible: false })}/> ); } diff --git a/pc4mobx/hrmSalary/pages/datapush/index.less b/pc4mobx/hrmSalary/pages/datapush/index.less index 316932b9..71919160 100644 --- a/pc4mobx/hrmSalary/pages/datapush/index.less +++ b/pc4mobx/hrmSalary/pages/datapush/index.less @@ -167,3 +167,28 @@ } } } + +.record-dialog { + .wea-dialog-body { + background: #f6f6f6; + padding: 8px 16px; + + .record-form { + background: #FFF; + margin-bottom: 8px; + + .wea-search-group, .wea-content { + padding: 0; + } + + .rangePickerBox { + display: flex; + align-items: center; + } + } + + .wea-new-table { + background: #FFF; + } + } +} From 950fa50d26c9d15594a15f0f344aef45505fe497 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 15 Apr 2025 14:12:21 +0800 Subject: [PATCH 03/11] =?UTF-8?q?release/3.0.1.2504.01-=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/datapush.js | 4 +++ .../pushRecord/createPushRecordDialog.js | 30 ++++++++++++++----- pc4mobx/hrmSalary/pages/datapush/index.js | 3 +- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/datapush.js b/pc4mobx/hrmSalary/apis/datapush.js index e348875c..fb26cf9b 100644 --- a/pc4mobx/hrmSalary/apis/datapush.js +++ b/pc4mobx/hrmSalary/apis/datapush.js @@ -40,3 +40,7 @@ export const pushRecords = (params) => { export const withdrawRecords = (params) => { return postFetch("/api/bs/hrmsalary/push/record/withdraw", params); }; +//创建推送记录 +export const createPushRecords = (params) => { + return postFetch("/api/bs/hrmsalary/push/record/create", params); +}; diff --git a/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js index b6de8562..50a46cbc 100644 --- a/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js +++ b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js @@ -9,13 +9,14 @@ */ import React, { Component } from "react"; import { WeaDialog, WeaFormItem, WeaLocaleProvider, WeaTable, WeaTools } from "ecCom"; -import { WeaForm, WeaSwitch } from "comsMobx"; -import { Button } from "antd"; -import moment from "moment"; import FormInfo from "../../../../components/FormInfo"; import { RQconditions } from "../../conditions"; import { MonthRangePicker } from "../../../reportView/components/statisticalMicroSettingsSlide"; import { getSalaryAcctList } from "../../../../apis/calculate"; +import { createPushRecords } from "../../../../apis/datapush"; +import { WeaForm, WeaSwitch } from "comsMobx"; +import { Button, message } from "antd"; +import moment from "moment"; const form = new WeaForm(); const getKey = WeaTools.getKey; @@ -73,7 +74,16 @@ class CreatePushRecordDialog extends Component { }).catch(() => this.setState({ loading: false })); }; save = (record) => { - console.log(record); + this.setState({ loading: true }); + createPushRecords({ salaryAcctRecordIds: [record.id] }).then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success(getLabel(111, "操作成功!")); + this.props.onCancel(this.props.onSuccess); + } else { + message.error(errormsg); + } + }); }; render() { @@ -117,14 +127,18 @@ class CreatePushRecordDialog extends Component { return [{ com: coms, col: 2 }]; } }; - console.log(this.refs.recordRef); - return ({getLabel(111, "取消")} ]}> - ); diff --git a/pc4mobx/hrmSalary/pages/datapush/index.js b/pc4mobx/hrmSalary/pages/datapush/index.js index 49d1d69d..e3da4cb4 100644 --- a/pc4mobx/hrmSalary/pages/datapush/index.js +++ b/pc4mobx/hrmSalary/pages/datapush/index.js @@ -165,7 +165,8 @@ class Index extends Component { this.setState({ pushDetailDialog: { ...pushDetailDialog, visible: false } })}/> - this.setState({ visible: false })}/> + this.setState({ visible: false }, () => callback && callback())}/> ); } From 142b84ca2d032cbacff3458b7a13139ddd1e9c7e Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 15 Apr 2025 14:51:53 +0800 Subject: [PATCH 04/11] =?UTF-8?q?release/3.0.1.2504.01-=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/pushRecord/createPushRecordDialog.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js index 50a46cbc..9db79ce3 100644 --- a/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js +++ b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js @@ -130,10 +130,11 @@ class CreatePushRecordDialog extends Component { const scrollHeight = this.refs.recordRef ? this.refs.recordRef.state.height - 162 : 606; return ({getLabel(111, "取消")} ]}> Date: Tue, 15 Apr 2025 17:33:12 +0800 Subject: [PATCH 05/11] =?UTF-8?q?feature/2.19.1.2501.01-PC=E7=AB=AFToken?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/ledgerPage/components/index.less | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less index 9e704e4c..724b344a 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less @@ -198,6 +198,10 @@ } } } + + .wea-new-table.wea-new-table-draggable table { + table-layout: fixed + } } .titleWrapper { From 799b086d9b554cdb3cdf7124b2b04715925ce1c6 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 16 Apr 2025 09:42:38 +0800 Subject: [PATCH 06/11] =?UTF-8?q?release/3.0.1.2504.01-=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datapush/components/pushRecord/createPushRecordDialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js index 9db79ce3..e0bd1255 100644 --- a/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js +++ b/pc4mobx/hrmSalary/pages/datapush/components/pushRecord/createPushRecordDialog.js @@ -135,7 +135,7 @@ class CreatePushRecordDialog extends Component { width: 1000, height: 580, minHeight: 200, minWidth: 380, maxHeight: "70%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)" }} buttons={[ - + ]}> From 34b2052926608858ecd8412875681870ce5b9895 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 18 Apr 2025 14:49:19 +0800 Subject: [PATCH 07/11] =?UTF-8?q?feature/2.19.1.2501.01-PC=E7=AB=AFToken?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/calculateQuery/index.js | 13 ++++++++----- pc4mobx/hrmSalary/pages/calculate/index.less | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/components/calculateQuery/index.js b/pc4mobx/hrmSalary/pages/calculate/components/calculateQuery/index.js index 00cd202d..e8e89b97 100644 --- a/pc4mobx/hrmSalary/pages/calculate/components/calculateQuery/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/components/calculateQuery/index.js @@ -21,11 +21,14 @@ class Index extends Component { this.props.onChange({ dateRange: v })}/> - this.props.onChange({ name: v })} - onSearch={this.props.onSearch} - /> +
+ this.props.onChange({ name: v })} + onSearch={this.props.onSearch} + /> + {getLabel(111, "高级搜索")} +
); } diff --git a/pc4mobx/hrmSalary/pages/calculate/index.less b/pc4mobx/hrmSalary/pages/calculate/index.less index 045f4b8c..d7f45047 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.less +++ b/pc4mobx/hrmSalary/pages/calculate/index.less @@ -62,6 +62,24 @@ } } + .advance-custom { + display: flex; + align-items: center; + + & > a { + border-radius: 0; + height: 28px; + position: relative; + color: #474747; + padding: 4px 15px; + background-color: transparent; + display: flex; + align-items: center; + border: 1px solid #d9d9d9; + border-left: none + } + } + .wea-input-focus { margin-top: -4px; } From 82ffd93fd59e86ae401307ec98bca086fe20a858 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 18 Apr 2025 15:10:05 +0800 Subject: [PATCH 08/11] 5release/2.19.1.2501.01 --- pc4mobx/hrmSalary/components/pcTemplate/content.js | 2 +- .../hrmSalary/pages/payroll/templatePreview/index.less | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/components/pcTemplate/content.js b/pc4mobx/hrmSalary/components/pcTemplate/content.js index 6bc3c60e..1665ac9e 100644 --- a/pc4mobx/hrmSalary/components/pcTemplate/content.js +++ b/pc4mobx/hrmSalary/components/pcTemplate/content.js @@ -10,7 +10,7 @@ class Content extends Component { const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "pc"); return (
-
+
{theme || ""}
diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less b/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less index 7eae1948..9a7c033c 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less @@ -173,8 +173,8 @@ .ph-switch { height: 100%; - margin: 0 auto; - text-align: center; + display: flex; + justify-content: center; .active, .phs-btn:hover { background-color: rgba(0, 0, 0, .15); @@ -184,8 +184,9 @@ .phs-btn { height: 50px; min-width: 88px; - line-height: 50px; - display: inline-block; + display: flex; + justify-content: center; + align-items: center; color: #fff; padding: 0 15px; cursor: pointer; From ae43a2aa7cc313cf7362f28255b5944006dc7695 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 18 Apr 2025 16:21:49 +0800 Subject: [PATCH 09/11] release/2.19.1.2501.01 --- .../hrmSalary/pages/calculate/calculate.js | 56 +++++++++++++++---- .../components/calculateQuery/index.js | 2 +- .../components/calculateTablelist/index.js | 8 ++- pc4mobx/hrmSalary/pages/calculate/config.js | 19 +++++++ pc4mobx/hrmSalary/pages/calculate/index.less | 26 +++++++++ 5 files changed, 97 insertions(+), 14 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/calculate/config.js diff --git a/pc4mobx/hrmSalary/pages/calculate/calculate.js b/pc4mobx/hrmSalary/pages/calculate/calculate.js index e6207394..b23739b8 100644 --- a/pc4mobx/hrmSalary/pages/calculate/calculate.js +++ b/pc4mobx/hrmSalary/pages/calculate/calculate.js @@ -6,7 +6,8 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaLocaleProvider, WeaTop } from "ecCom"; +import { WeaLocaleProvider, WeaTools, WeaTop } from "ecCom"; +import { WeaForm } from "comsMobx"; import { Button, message, Modal } from "antd"; import moment from "moment"; import CalculateQuery from "./components/calculateQuery"; @@ -15,9 +16,15 @@ import CalculateDialog from "./components/calculateDialog"; import ProgressModal from "../../components/progressModal"; import LogDialog from "../../components/logViewModal"; import { backCalculate, deleteSalaryacct, fileSalaryAcct, reAccounting } from "../../apis/calculate"; +import FormInfo from "../../components/FormInfo"; +import { queryConditions } from "./config"; +import { getTaxAgentSelectList } from "../../apis/taxAgent"; +import cs from "classnames"; import "./index.less"; +const getKey = WeaTools.getKey; const getLabel = WeaLocaleProvider.getLabel; +const form = new WeaForm(); @inject("calculateStore", "taxAgentStore") @observer @@ -31,17 +38,32 @@ class Calculate extends Component { moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"), moment(new Date()).endOf("year").format("YYYY-MM") ] - }, isRefresh: false, logDialogVisible: false, + }, isRefresh: false, logDialogVisible: false, conditions: [], progressModule: { visible: false, progress: 0, title: getLabel(111, "正在归档中请稍后") }, - calcDaialog: { visible: false, title: "" } + calcDaialog: { visible: false, title: "" }, showAdvance: false }; this.timer = null; this.handleDebounce = null; } + async componentDidMount() { + const { data } = await getTaxAgentSelectList(); + this.setState({ + conditions: _.map(queryConditions, item => ({ + ...item, items: _.map(item.items, o => { + o = { ...o, label: getLabel(o.lanId, o.label) }; + if (getKey(o) === "taxAgentIds") { + return { ...o, options: _.map(data, k => ({ key: k.id, showname: k.content })) }; + } + return { ...o }; + }) + })) + }, () => form.initFormFields(this.state.conditions)); + } + renderCalculateOpts = () => { const { taxAgentStore: { showOperateBtn } } = this.props; - const { queryParams, isRefresh } = this.state; + const { queryParams, isRefresh, showAdvance } = this.state; let calculateOpts = [ , - this.setState({ - isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh, - queryParams: { ...queryParams, ...v } - })} onSearch={() => this.setState({ isRefresh: !isRefresh })}/> + this.setState({ showAdvance: !showAdvance })} + onChange={v => this.setState({ + isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh, + queryParams: { ...queryParams, ...v } + })} onSearch={() => this.setState({ isRefresh: !isRefresh })}/> ]; return !showOperateBtn ? calculateOpts.slice(1) : calculateOpts; }; @@ -188,7 +211,9 @@ class Calculate extends Component { }; render() { - const { queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions } = this.state; + const { + queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions, conditions, showAdvance + } = this.state; return ( } iconBgcolor="#F14A2D" buttons={this.renderCalculateOpts()} className="calculate-main-layout" showDropIcon @@ -201,7 +226,18 @@ class Calculate extends Component { ]} >
- +
+ +
+ + + +
+
+ this.setState({ calcDaialog: { ...calcDaialog, visible: false }, diff --git a/pc4mobx/hrmSalary/pages/calculate/components/calculateQuery/index.js b/pc4mobx/hrmSalary/pages/calculate/components/calculateQuery/index.js index e8e89b97..0c74ccd5 100644 --- a/pc4mobx/hrmSalary/pages/calculate/components/calculateQuery/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/components/calculateQuery/index.js @@ -27,7 +27,7 @@ class Index extends Component { onChange={v => this.props.onChange({ name: v })} onSearch={this.props.onSearch} /> - {getLabel(111, "高级搜索")} + {getLabel(111, "高级搜索")}
); diff --git a/pc4mobx/hrmSalary/pages/calculate/components/calculateTablelist/index.js b/pc4mobx/hrmSalary/pages/calculate/components/calculateTablelist/index.js index eecfa1db..63ab2e87 100644 --- a/pc4mobx/hrmSalary/pages/calculate/components/calculateTablelist/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/components/calculateTablelist/index.js @@ -29,12 +29,14 @@ class Index extends Component { } getSalaryAcctList = (props) => { - const { pageInfo } = this.state; - const { queryParams } = props; + const { pageInfo } = this.state, { queryParams, form } = props; + const { taxAgentIds } = form.getFormParams(); const { dateRange, ...extra } = queryParams; const [startMonthStr, endMonthStr] = dateRange || []; const params = { startMonthStr, endMonthStr, ...extra }; - const payload = { ...pageInfo, ...params }; + const payload = { + ...pageInfo, ...params, taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [] + }; this.setState({ loading: true }); getSalaryAcctList(payload).then(({ status, data }) => { this.setState({ loading: false }); diff --git a/pc4mobx/hrmSalary/pages/calculate/config.js b/pc4mobx/hrmSalary/pages/calculate/config.js new file mode 100644 index 00000000..02da5b10 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/config.js @@ -0,0 +1,19 @@ +export const queryConditions = [ + { + items: [ + { + conditionType: "SELECT", + domkey: ["taxAgentIds"], + fieldcol: 14, + label: "个税扣缴义务人", + lanI: 111, + multiple: true, + options: [], + labelcol: 6, + value: "", + viewAttr: 2 + } + ], + defaultshow: true + } +]; diff --git a/pc4mobx/hrmSalary/pages/calculate/index.less b/pc4mobx/hrmSalary/pages/calculate/index.less index d7f45047..2e73f6b2 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.less +++ b/pc4mobx/hrmSalary/pages/calculate/index.less @@ -90,6 +90,32 @@ overflow-y: hidden; } + .advance-calc { + display: none; + background: #FFF; + margin-bottom: 8px; + + .advance-calc-btns { + display: flex; + justify-content: center; + align-items: center; + padding: 15px 0; + border-top: 1px solid #dadada; + + button { + margin-right: 15px; + } + } + + .wea-search-group, .wea-content { + padding: 0; + } + } + + .show-advance-calc { + display: block; + } + .calculate-body { height: 100%; width: 100%; From ec6874df2e4ab2ad348f7e58049d51eb6540a885 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 18 Apr 2025 16:26:05 +0800 Subject: [PATCH 10/11] release/2.19.1.2501.01 --- pc4mobx/hrmSalary/pages/calculate/calculate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/calculate.js b/pc4mobx/hrmSalary/pages/calculate/calculate.js index 98551065..eb8dba57 100644 --- a/pc4mobx/hrmSalary/pages/calculate/calculate.js +++ b/pc4mobx/hrmSalary/pages/calculate/calculate.js @@ -18,7 +18,7 @@ import LogDialog from "../../components/logViewModal"; import { backCalculate, deleteSalaryacct, fileSalaryAcct, reAccounting } from "../../apis/calculate"; import FormInfo from "../../components/FormInfo"; import { queryConditions } from "./config"; -import { getTaxAgentSelectList } from "../../apis/taxAgent"; +import { postFetch } from "../../util/request"; import cs from "classnames"; import "./index.less"; @@ -47,7 +47,7 @@ class Calculate extends Component { } async componentDidMount() { - const { data } = await getTaxAgentSelectList(); + const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" }); this.setState({ conditions: _.map(queryConditions, item => ({ ...item, items: _.map(item.items, o => { From 1455707c9cb6aa15daac6ec81585cb5fd6859d30 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 18 Apr 2025 16:31:34 +0800 Subject: [PATCH 11/11] release/2.19.1.2501.01 --- pc4mobx/hrmSalary/pages/calculate/calculate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/calculate.js b/pc4mobx/hrmSalary/pages/calculate/calculate.js index eb8dba57..3a7b563d 100644 --- a/pc4mobx/hrmSalary/pages/calculate/calculate.js +++ b/pc4mobx/hrmSalary/pages/calculate/calculate.js @@ -53,7 +53,7 @@ class Calculate extends Component { ...item, items: _.map(item.items, o => { o = { ...o, label: getLabel(o.lanId, o.label) }; if (getKey(o) === "taxAgentIds") { - return { ...o, options: _.map(data, k => ({ key: k.id, showname: k.content })) }; + return { ...o, options: _.map(data, k => ({ key: k.id + "", showname: k.name })) }; } return { ...o }; })