custom-银盛科技服务集团有限公司
This commit is contained in:
parent
a2c6b2145d
commit
bcf04dce66
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
||||
// 薪资记录--薪资核算详情
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<React.Fragment>
|
||||
<WeaTable
|
||||
columns={[
|
||||
...columns,
|
||||
{
|
||||
title: "操作",
|
||||
width: 120,
|
||||
dataIndex: "operate",
|
||||
render: (_, record) => {
|
||||
return (
|
||||
<div className="linkWapper">
|
||||
<a href="javascript: void(0);" onClick={() => this.handleViewAttendanceData(record)}>查看</a>
|
||||
{showOperateBtn &&
|
||||
<React.Fragment>
|
||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => this.handleDeleteAttendanceData(record)}>删除</a>
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
</React.Fragment>
|
||||
}
|
||||
<WeaTable dataSource={dataSource} pagination={pagination} loading={loading.query} rowSelection={rowSelection}
|
||||
columns={[
|
||||
...columns,
|
||||
{
|
||||
!showOperateBtn &&
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
title: "操作",
|
||||
width: 120,
|
||||
dataIndex: "operate",
|
||||
render: (_, record) => {
|
||||
return (
|
||||
<div className="linkWapper">
|
||||
<a href="javascript: void(0);"
|
||||
onClick={() => this.handleViewAttendanceData(record)}>查看</a>
|
||||
{showOperateBtn &&
|
||||
<React.Fragment>
|
||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => this.handleDeleteAttendanceData(record)}>删除</a>
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
</React.Fragment>
|
||||
}
|
||||
{
|
||||
!showOperateBtn &&
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
]}
|
||||
dataSource={dataSource} pagination={pagination} loading={loading.query}/>
|
||||
]}/>
|
||||
{/* 考勤引用导入 */}
|
||||
<ImportModal {...importData} importFormPayload={importFormPayload} onCancel={this.handleFinish}
|
||||
onChangeImportForm={this.handleChangeImportPayload} onHeaderSettings={this.handleHeaderSettings}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, DatePicker } from "antd";
|
||||
import { WeaFormItem, WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaReqTop } from "ecCom";
|
||||
import { WeaFormItem, WeaInputSearch, WeaLoadingGlobal, WeaLocaleProvider, WeaNewScroll, WeaReqTop } from "ecCom";
|
||||
import { exportAttendQuote } from "../../../apis/attendance";
|
||||
import AttendanceDataComp from "./components/attendanceDataComp";
|
||||
import FieldMangComp from "./components/fieldMangComp";
|
||||
import LogDialog from "../../../components/logViewModal";
|
||||
|
|
@ -65,6 +66,10 @@ class Index extends Component {
|
|||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
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" ? [
|
||||
<Button type="primary" onClick={this.handleQuoteAttendanceData}>引用</Button>,
|
||||
<Button type="ghost" onClick={this.handleImportAttendanceData}>导入</Button>
|
||||
<Button type="ghost" onClick={this.handleImportAttendanceData}>导入</Button>,
|
||||
<Button type="ghost"
|
||||
disabled={this.attendanceTableRef && _.isEmpty(this.attendanceTableRef.state.selectedRowKeys)}
|
||||
onClick={() => this.onDropMenuClick("batchExport")}>{getLabel(111, "批量导出")}</Button>
|
||||
] : [
|
||||
<Button type="primary" onClick={this.handleAddAttendFileds}>新建</Button>,
|
||||
<WeaInputSearch placeholder={getLabel(511723, "请输入字段名称")}
|
||||
|
|
|
|||
Loading…
Reference in New Issue