feature/2.10.1.2401.01-页面操作日志添加
This commit is contained in:
parent
a6f382a36b
commit
4a47fa1e85
|
|
@ -7,12 +7,14 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, DatePicker } from "antd";
|
||||
import { WeaFormItem, WeaNewScroll, WeaTab } from "ecCom";
|
||||
import { WeaFormItem, WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaReqTop } from "ecCom";
|
||||
import AttendanceDataComp from "./components/attendanceDataComp";
|
||||
import FieldMangComp from "./components/fieldMangComp";
|
||||
import LogDialog from "../../../components/logViewModal";
|
||||
import moment from "moment";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const { MonthPicker } = DatePicker;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
|
|
@ -21,9 +23,8 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
fieldName: "",
|
||||
selectedKey: "DATA",
|
||||
salaryMonth: []
|
||||
fieldName: "", selectedKey: "DATA", salaryMonth: [],
|
||||
logDialogVisible: false
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -67,47 +68,70 @@ class Index extends Component {
|
|||
visible: true, title: "引用考勤数据"
|
||||
});
|
||||
};
|
||||
onDropMenuClick = (key) => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({ logDialogVisible: true });
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, salaryMonth, fieldName } = this.state;
|
||||
const { selectedKey, salaryMonth, fieldName, logDialogVisible } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const topTab = [
|
||||
{ title: "考勤数据", viewcondition: "DATA" },
|
||||
{ title: "字段管理", viewcondition: "FIELD" }
|
||||
{ title: "考勤数据", key: "DATA" },
|
||||
{ title: "字段管理", key: "FIELD" }
|
||||
];
|
||||
const buttons = selectedKey === "DATA" ? [
|
||||
<Button type="primary" onClick={this.handleQuoteAttendanceData}>引用</Button>,
|
||||
<Button type="ghost" onClick={this.handleImportAttendanceData}>导入</Button>
|
||||
] : [<Button type="primary" onClick={this.handleAddAttendFileds}>新建</Button>];
|
||||
] : [
|
||||
<Button type="primary" onClick={this.handleAddAttendFileds}>新建</Button>,
|
||||
<WeaInputSearch placeholder={getLabel(511723, "请输入字段名称")}
|
||||
value={fieldName} onChange={fieldName => this.setState({ fieldName })}
|
||||
onSearch={() => this.fieldMangRef.getAttendanceFieldList({ fieldName, current: 1 })}/>
|
||||
];
|
||||
return (
|
||||
<div className="attendanceRefWrapper">
|
||||
<WeaTab
|
||||
datas={topTab} keyParam="viewcondition" selectedKey={selectedKey} buttons={showOperateBtn ? buttons : []}
|
||||
searchType={selectedKey === "FIELD" ? ["base"] : []} searchsBasePlaceHolder="请输入字段名称"
|
||||
onChange={v => this.setState({ selectedKey: v })}
|
||||
searchsBaseValue={fieldName} onSearchChange={fieldName => this.setState({ fieldName })}
|
||||
onSearch={() => this.fieldMangRef.getAttendanceFieldList({ fieldName, current: 1 })}
|
||||
/>
|
||||
{
|
||||
selectedKey === "DATA" && this.getAttendanceDataScreen()
|
||||
}
|
||||
<div className="tableWrapper">
|
||||
<WeaNewScroll height="100%">
|
||||
<WeaReqTop
|
||||
buttonSpace={10} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
tabDatas={topTab} selectedKey={selectedKey} buttons={showOperateBtn ? buttons : []}
|
||||
onChange={v => this.setState({ selectedKey: v })} title={getLabel(525196, "考勤数据")}
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
selectedKey === "DATA" ?
|
||||
<AttendanceDataComp
|
||||
ref={dom => this.attendanceTableRef = dom}
|
||||
showOperateBtn={showOperateBtn}
|
||||
salaryYearMonth={salaryMonth}
|
||||
/> :
|
||||
<FieldMangComp
|
||||
ref={dom => this.fieldMangRef = dom}
|
||||
showOperateBtn={showOperateBtn}
|
||||
fieldName={fieldName}
|
||||
/>
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
</WeaNewScroll>
|
||||
</div>
|
||||
]}
|
||||
>
|
||||
{
|
||||
selectedKey === "DATA" && this.getAttendanceDataScreen()
|
||||
}
|
||||
<div className="tableWrapper">
|
||||
<WeaNewScroll height="100%">
|
||||
{
|
||||
selectedKey === "DATA" ?
|
||||
<AttendanceDataComp
|
||||
ref={dom => this.attendanceTableRef = dom}
|
||||
showOperateBtn={showOperateBtn}
|
||||
salaryYearMonth={salaryMonth}
|
||||
/> :
|
||||
<FieldMangComp
|
||||
ref={dom => this.fieldMangRef = dom}
|
||||
showOperateBtn={showOperateBtn}
|
||||
fieldName={fieldName}
|
||||
/>
|
||||
}
|
||||
</WeaNewScroll>
|
||||
</div>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction={selectedKey === "DATA" ? "attendquote" : "attendfield"}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</WeaReqTop>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@
|
|||
.tableWrapper {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
background: #FFF;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.linkWapper {
|
||||
|
|
|
|||
|
|
@ -548,7 +548,7 @@ class Index extends Component {
|
|||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
|
||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType}
|
||||
exportPayloadType={exportPayloadType} logFunction="addupdeduction"
|
||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
||||
|
|
|
|||
|
|
@ -552,7 +552,7 @@ class Index extends Component {
|
|||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
|
||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType}
|
||||
exportPayloadType={exportPayloadType} logFunction="addupsituation"
|
||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={{ ...importPayload, importOpts: { taxYearMonth: importPayload.importOpts.declareMonth } }}
|
||||
|
|
|
|||
|
|
@ -7,11 +7,14 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
||||
import ImportModal from "../../components/importModal";
|
||||
import SlideModalTitle from "../../components/slideModalTitle";
|
||||
import { getSearchs } from "../../util";
|
||||
import "./index.less";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
|
|
@ -19,7 +22,7 @@ class Layout extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
showSearchAd: false
|
||||
showSearchAd: false, logDialogVisible: false
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -49,14 +52,23 @@ class Layout extends Component {
|
|||
const { onResizeWindowInnerWidth } = this.props;
|
||||
onResizeWindowInnerWidth(window.innerWidth);
|
||||
};
|
||||
onDropMenuClick = (key) => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({ logDialogVisible: true });
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { showSearchAd } = this.state;
|
||||
const { showSearchAd, logDialogVisible } = this.state;
|
||||
const {
|
||||
title, btns, leftComp, children, taxAgentStore: { showOperateBtn },
|
||||
slidePayload, onClose, onSave, slideLoading, form, condition,
|
||||
onAdSearch, onCancel, importPayload, onImportSetStep, onImportFile,
|
||||
onPreviewImport, detailOptBtns, columns
|
||||
onPreviewImport, detailOptBtns, columns, logFunction
|
||||
} = this.props;
|
||||
const { visible, title: subtitle, children: slideChildren } = slidePayload;
|
||||
const {
|
||||
|
|
@ -66,8 +78,14 @@ class Layout extends Component {
|
|||
return (
|
||||
<div className="layoutWrapper">
|
||||
<WeaTop title={title} buttons={showOperateBtn ? btns : []}
|
||||
icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" showDropIcon={false}
|
||||
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
/>
|
||||
<WeaTab
|
||||
searchType={["base", "advanced"]}
|
||||
|
|
@ -124,6 +142,9 @@ class Layout extends Component {
|
|||
content={slideChildren}
|
||||
onClose={onClose}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction={logFunction}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@ class Index extends Component {
|
|||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
|
||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType}
|
||||
exportPayloadType={exportPayloadType} logFunction="otherdeduction"
|
||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
||||
|
|
|
|||
Loading…
Reference in New Issue