From bcf04dce663d8c06017e9abeac7a80cd4628b50c Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Thu, 9 Jan 2025 09:56:53 +0800 Subject: [PATCH] =?UTF-8?q?custom-=E9=93=B6=E7=9B=9B=E7=A7=91=E6=8A=80?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=9B=86=E5=9B=A2=E6=9C=89=E9=99=90=E5=85=AC?= =?UTF-8?q?=E5=8F=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/attendance.js | 6 +- pc4mobx/hrmSalary/apis/calculate.js | 2 +- .../components/attendanceDataComp.js | 93 +++++++++---------- .../pages/dataAcquisition/attendance/index.js | 12 ++- 4 files changed, 60 insertions(+), 53 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/attendance.js b/pc4mobx/hrmSalary/apis/attendance.js index 50fdc9c2..6a475eb3 100644 --- a/pc4mobx/hrmSalary/apis/attendance.js +++ b/pc4mobx/hrmSalary/apis/attendance.js @@ -1,5 +1,5 @@ import { WeaTools } from "ecCom"; -import { postFetch } from "../util/request"; +import { postExportFetch, postFetch } from "../util/request"; //数据采集-考勤引用-考勤数据列表 export const checkOperation = (params) => { @@ -78,3 +78,7 @@ export const viewAttendQuote = (params) => { export const getSalaryCycleAndAttendCycle = (params) => { return WeaTools.callApi("/api/bs/hrmsalary/attendQuote/getSalaryCycleAndAttendCycle", "get", params); }; +// 银盛二开-批量导出考勤引用数据 +export const exportAttendQuote = params => { + return postExportFetch("/api/bs/hrmsalary/attendQuote/batch/export", params); +}; diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js index 009a9bd8..6398889e 100644 --- a/pc4mobx/hrmSalary/apis/calculate.js +++ b/pc4mobx/hrmSalary/apis/calculate.js @@ -8,7 +8,7 @@ export const getSalaryAcctList = params => { // 薪资记录--保存薪资核算的基本信息 export const saveBasic = params => { - return postFetch("/api/bs/hrmsalary/salaryacct/basic/save", params); + return postFetch("/api/bs/hrmsalary/salaryacct/batch/basic/save", params); }; // 薪资记录--薪资核算详情 diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataComp.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataComp.js index dd103159..42fca7f6 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataComp.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataComp.js @@ -33,17 +33,8 @@ class AttendanceDataComp extends Component { constructor(props) { super(props); this.state = { - loading: { - query: false, - headset: false - }, - dataSource: [], - columns: [], - pageInfo: { - current: 1, - pageSize: 10, - total: 0 - }, + loading: { query: false, headset: false }, dataSource: [], columns: [], selectedRowKeys: [], + pageInfo: { current: 1, pageSize: 10, total: 0 }, importData: { visible: false, params: {} }, importFormPayload: { salaryYearMonth: moment().format("YYYY-MM"), salarySobList: [], @@ -285,7 +276,7 @@ class AttendanceDataComp extends Component { render() { const { dataSource, columns, pageInfo, loading, importData, importFormPayload, fieldSetPayload, - attendanceReferencePayload, attendanceViewPayload + attendanceReferencePayload, attendanceViewPayload, selectedRowKeys } = this.state; const { showOperateBtn, salaryYearMonth } = this.props; const pagination = { @@ -305,47 +296,51 @@ class AttendanceDataComp extends Component { }, () => this.getAttendanceList({ salaryYearMonth: _.compact(salaryYearMonth) })); } }; + const rowSelection = { + selectedRowKeys, + onChange: selectedRowKeys => this.setState({ selectedRowKeys }) + }; return ( - { - return ( -
- this.handleViewAttendanceData(record)}>查看 - {showOperateBtn && - - this.handleDeleteAttendanceData(record)}>删除 - - - this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")} - - - }> - - - - } + this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")} + title: "操作", + width: 120, + dataIndex: "operate", + render: (_, record) => { + return ( + + ); + } } -
- ); - } - } - ]} - dataSource={dataSource} pagination={pagination} loading={loading.query}/> + ]}/> {/* 考勤引用导入 */} { switch (key) { + case "batchExport": + WeaLoadingGlobal.start(); + const promise = exportAttendQuote(this.attendanceTableRef.state.selectedRowKeys); + break; case "log": this.setState({ logDialogVisible: true, @@ -85,7 +90,10 @@ class Index extends Component { ]; const buttons = selectedKey === "DATA" ? [ , - + , + ] : [ ,