custom/万君筑天科技-合并业务线

This commit is contained in:
lys 2025-04-23 18:15:24 +08:00
parent fd332031a6
commit 4eb957cb17
2 changed files with 51 additions and 4 deletions

View File

@ -0,0 +1,44 @@
/*
* 考勤引用数据编辑
* @Author: 黎永顺
* @Date: 2025/4/23
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaSlideModal } from "ecCom";
import { Button } from "antd";
import "./index.less";
const { getLabel } = WeaLocaleProvider;
class AttendanceDataEditSlide extends Component {
constructor(props) {
super(props);
this.state = {};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
document.querySelector(".attendanceRefWrapper").classList.add("zIndex0-attendance");
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
document.querySelector(".attendanceRefWrapper").classList.remove("zIndex0-attendance");
}
}
render() {
const btns = [
<Button type="primary" onClick={this.handleExportAttendQuote}>{getLabel(111, "保存")}</Button>
];
return (
<WeaSlideModal {...this.props} className="attendanceSlideWrapper" top={0} height={100} width={800}
measureX="px" measureT="%" measureY="%" direction="right"
title="郑世珍"
content={<div></div>}
/>
);
}
}
export default AttendanceDataEditSlide;

View File

@ -6,8 +6,9 @@
*/
import React, { Component } from "react";
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
import { Button } from "antd";
import { viewAttendQuote } from "../../../../apis/attendance";
import AttendanceDataEditSlide from "./attendanceDataEditSlide";
import { Button } from "antd";
import "./index.less";
const { getLabel } = WeaLocaleProvider;
@ -17,7 +18,7 @@ class AttendanceDataViewSlide extends Component {
super(props);
this.state = {
loading: { query: false }, keyword: "", dataSource: [], columns: [],
pageInfo: { current: 1, pageSize: 10, total: 0 }
pageInfo: { current: 1, pageSize: 10, total: 0 }, visible: false
};
}
@ -45,7 +46,8 @@ class AttendanceDataViewSlide extends Component {
..._.map(columns, (o, i) => ({ ...o, width: 150, fixed: i === 0 ? "left" : null })),
{
title: getLabel(111, "操作"), dataIndex: "operate", width: 80,
render: () => (<a href="JavaScript:void(0);">{getLabel(111, "编辑")}</a>)
render: () => (<a href="JavaScript:void(0);"
onClick={() => this.setState({ visible: true })}>{getLabel(111, "编辑")}</a>)
}
]
});
@ -66,7 +68,7 @@ class AttendanceDataViewSlide extends Component {
render() {
const { showOperateBtn, salaryYearMonth, ...extra } = this.props;
const { columns, dataSource, loading, pageInfo, keyword } = this.state;
const { columns, dataSource, loading, pageInfo, keyword, visible } = this.state;
const pagination = {
...pageInfo,
showTotal: (total) => `${total}`,
@ -108,6 +110,7 @@ class AttendanceDataViewSlide extends Component {
<WeaTable
columns={columns} dataSource={dataSource} bordered pagination={pagination}
loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 240px)` }}/>
<AttendanceDataEditSlide visible={visible} onClose={() => this.setState({ visible: false })}/>
</div>
}
/>