release/3.0.0.2403.01
This commit is contained in:
parent
0771ad9ed3
commit
5e3c20edc0
|
|
@ -24,7 +24,7 @@ export const getTableDatas = (params) => {
|
|||
export const getLogs = params => {
|
||||
const payload = {
|
||||
...params, module: "hrsa", dataset: "dataset", authParams: "{}", transMethod: "hrsa",
|
||||
showColums: "[{\"columName\":\"操作时间\",\"columIndex\":\"createdate\",\"width\":\"5%\"},{\"columName\":\"操作人\",\"columIndex\":\"operatorname\",\"width\":\"2%\"},{\"columName\":\"操作类型\",\"columIndex\":\"operatetypename\",\"width\":\"5%\"},{\"columName\":\"对象\",\"columIndex\":\"targetname\",\"width\":\"4%\"},{\"columName\":\"修改详情\",\"columIndex\":\"operatedesc\",\"width\":\"2%\"},{\"columName\":\"客户端IP\",\"columIndex\":\"clientip\",\"width\":\"5%\"}]"
|
||||
showColums: "[{\"columName\":\"操作时间\",\"columIndex\":\"createdate\",\"width\":\"5%\"},{\"columName\":\"操作人\",\"columIndex\":\"operatorname\",\"width\":\"2%\"},{\"columName\":\"操作类型\",\"columIndex\":\"operatetypename\",\"width\":\"5%\"},{\"columName\":\"对象\",\"columIndex\":\"targetname\",\"width\":\"4%\"},{\"columName\":\"客户端IP\",\"columIndex\":\"clientip\",\"width\":\"5%\"},{\"columName\":\"修改详情\",\"columIndex\":\"operatedesc\",\"width\":\"2%\"}]"
|
||||
};
|
||||
return postFetch("/api/bs/hrmelog/elog/getLogs", payload);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -142,6 +142,30 @@
|
|||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.attendanceFormWrapper {
|
||||
padding: 0 10px;
|
||||
margin: 10px 0;
|
||||
border: 1px solid #e5e5e5;
|
||||
|
||||
.wea-form-cell {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.wea-select, .ant-select-selection, .ant-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wea-select {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ant-select-selection {
|
||||
height: 30px;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import { WeaCheckbox, WeaDialog, WeaInputSearch } from "ecCom";
|
|||
import { Button } from "antd";
|
||||
import "./index.less";
|
||||
|
||||
|
||||
export default class SelectItemModal extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -58,10 +57,19 @@ export default class SelectItemModal extends React.Component {
|
|||
const bottomLeft = <WeaCheckbox content="只显示已选中字段" onChange={onShowOnlyChecked}/>;
|
||||
return (
|
||||
<WeaDialog {...extra} hasScroll title={titleComp}
|
||||
style={{ width: 592, height: 248 }}
|
||||
buttons={btns} moreBtn={moreBtn}
|
||||
initLoadCss className="setWrapper"
|
||||
bottomLeft={bottomLeft}
|
||||
style={{
|
||||
width: 800,
|
||||
height: 606.6,
|
||||
minHeight: 200,
|
||||
minWidth: 380,
|
||||
maxHeight: "90%",
|
||||
maxWidth: "90%",
|
||||
overflow: "hidden",
|
||||
transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</WeaDialog>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
flex-wrap: wrap;
|
||||
|
||||
li {
|
||||
width: 124px;
|
||||
width: 140px;
|
||||
overflow: hidden;
|
||||
padding: 4px 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,21 +11,22 @@ class SelectItemsWrapper extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
searchVal: "",
|
||||
selectItem: [],
|
||||
groupItem: [],
|
||||
showOnlyChecked: false
|
||||
searchVal: "", selectItem: [], groupItem: [], showOnlyChecked: false
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { dataSource } = this.props
|
||||
this.initSelectItem();
|
||||
}
|
||||
|
||||
initSelectItem = () => {
|
||||
const { dataSource } = this.props;
|
||||
this.setState({
|
||||
selectItem: _.map(_.filter(_.reduce(dataSource, (pre, cur) => {
|
||||
return [...pre, ...cur.items];
|
||||
}, []), item => !!item.checked), it => it.id)
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
handleSearchItemSet = (searchVal) => this.setState({ searchVal });
|
||||
handleShowOnlyChecked = (showOnlyChecked) => this.setState({ showOnlyChecked: !!Number(showOnlyChecked) });
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ class AttendanceCustomFieldsModal extends Component {
|
|||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { attendanceStore: { initForm } } = nextProps;
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.handleResetForm();
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) initForm();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -62,12 +64,8 @@ class AttendanceCustomFieldsModal extends Component {
|
|||
<Button type="primary" onClick={this.handleSubmitFields}>保存</Button>
|
||||
];
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 440, height: 202 }}
|
||||
buttons={buttons} hasScroll initLoadCss
|
||||
className="modalWrapper"
|
||||
>
|
||||
{getSearchs(form, conditions, 1)}
|
||||
<WeaDialog {...this.props} style={{ width: 480, height: 202 }} buttons={buttons} initLoadCss>
|
||||
<div className="form-dialog-layout"> {getSearchs(form, conditions, 1)}</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,14 +14,13 @@ import {
|
|||
getLedgerList,
|
||||
getSalaryCycleAndAttendCycle,
|
||||
importAttendQuoteData,
|
||||
previewAttendQuote,
|
||||
returnToAttendanceFieldSettingDefault,
|
||||
saveAttendanceFieldSetting,
|
||||
saveAttendanceFieldSettingAsDefault
|
||||
} from "../../../../apis/attendance";
|
||||
import ImportModal from "../../../../components/importModal";
|
||||
import HeaderSet from "../../../../components/importModal/headerSet";
|
||||
import ImportFormOptions from "./importFormOptions";
|
||||
import ImportModal from "./importDialog";
|
||||
// import HeaderSet from "../../../../components/importModal/headerSet";
|
||||
// import ImportFormOptions from "./importFormOptions";
|
||||
import SelectItemModal from "../../../../components/selectItemsModal";
|
||||
import moment from "moment";
|
||||
import SelectItemsWrapper from "../../../../components/selectItemsModal/selectItemsWrapper";
|
||||
|
|
@ -45,10 +44,7 @@ class AttendanceDataComp extends Component {
|
|||
pageSize: 10,
|
||||
total: 0
|
||||
},
|
||||
importData: {
|
||||
visiable: false, params: {}, step: 0,
|
||||
columns: [], slideDataSource: [], importResult: []
|
||||
},
|
||||
importData: { visible: false, params: {} },
|
||||
importFormPayload: {
|
||||
salaryYearMonth: moment().format("YYYY-MM"), salarySobList: [],
|
||||
salarySobId: "", salaryCycle: "", attendCycle: ""
|
||||
|
|
@ -87,15 +83,24 @@ class AttendanceDataComp extends Component {
|
|||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||
};
|
||||
getLedgerList = () => {
|
||||
getLedgerList = (importData) => {
|
||||
const { importFormPayload } = this.state;
|
||||
getLedgerList().then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
importFormPayload: {
|
||||
...importFormPayload,
|
||||
...importFormPayload, salarySobId: _.head(data).id,
|
||||
salarySobList: _.map(data, it => ({ key: it.id, showname: it.content }))
|
||||
}
|
||||
}, async () => {
|
||||
const { importFormPayload } = this.state;
|
||||
const { salaryYearMonth, salarySobId } = importFormPayload;
|
||||
const payload = { salaryYearMonthStr: salaryYearMonth, salarySobId };
|
||||
const { data } = await getSalaryCycleAndAttendCycle(payload);
|
||||
this.setState({
|
||||
importData: { ...importData, params: { salaryYearMonth, salarySobId } },
|
||||
importFormPayload: { ...importFormPayload, ...data }
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -154,64 +159,12 @@ class AttendanceDataComp extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
handleImportAttendanceData = (importData) => {
|
||||
const { importFormPayload } = this.state;
|
||||
const { salaryYearMonth, salarySobId } = importFormPayload;
|
||||
this.getLedgerList();
|
||||
this.setState({ importData: { ...importData, params: { salaryYearMonth, salarySobId } } });
|
||||
};
|
||||
setStep = step => this.setState({ importData: { ...this.state.importData, step } });
|
||||
handleFinish = () => {
|
||||
handleImportAttendanceData = (importData) => this.getLedgerList(importData);
|
||||
handleFinish = (isFresh) => {
|
||||
const { importData } = this.state;
|
||||
const { step } = importData;
|
||||
this.setState({
|
||||
importData: {
|
||||
...importData, visiable: false, params: {}, step: 0,
|
||||
columns: [], slideDataSource: [], importResult: []
|
||||
}
|
||||
});
|
||||
step === 2 && this.getAttendanceList();
|
||||
};
|
||||
handlePreviewImport = (params) => {
|
||||
const { importData } = this.state;
|
||||
previewAttendQuote(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { headers, list } = data;
|
||||
this.setState({
|
||||
importData: {
|
||||
...importData,
|
||||
columns: _.map(headers, (it, dataIndex) => ({ title: it, dataIndex })),
|
||||
slideDataSource: _.map(list, item => {
|
||||
return _.reduce(item, (pre, cur, key) => (_.assign(pre, { [key]: cur })), {});
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleImport = (params) => {
|
||||
const { importData } = this.state;
|
||||
const { step } = importData;
|
||||
importAttendQuoteData(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
importData: {
|
||||
...importData,
|
||||
step: step + 1,
|
||||
importResult: data
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleTemplateLinkClick = () => {
|
||||
const { importFormPayload } = this.state;
|
||||
const { salarySobId, salaryYearMonth } = importFormPayload;
|
||||
if (!salarySobId || !salaryYearMonth) {
|
||||
message.warning("请完善导入选项,再下载");
|
||||
return;
|
||||
}
|
||||
window.open(`/api/bs/hrmsalary/attendQuote/downloadTemplate?salaryYearMonth=${salaryYearMonth}&salarySobId=${salarySobId}`);
|
||||
importData: { ...importData, visible: false, params: {} }
|
||||
}, () => isFresh && this.getAttendanceList());
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
|
|
@ -236,7 +189,7 @@ class AttendanceDataComp extends Component {
|
|||
onSelectItem={this.handleSelectItem}
|
||||
/>
|
||||
}
|
||||
});
|
||||
}, () => this.setItemRef && this.setItemRef.initSelectItem());
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, headset: false } }));
|
||||
};
|
||||
|
|
@ -392,46 +345,30 @@ class AttendanceDataComp extends Component {
|
|||
}
|
||||
}
|
||||
]}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading.query}
|
||||
/>
|
||||
dataSource={dataSource} pagination={pagination} loading={loading.query}/>
|
||||
{/* 考勤引用导入 */}
|
||||
<ImportModal {...importData} setStep={this.setStep} onFinish={this.handleFinish}
|
||||
previewImport={this.handlePreviewImport} importFile={this.handleImport}
|
||||
templateLink={this.handleTemplateLinkClick} onCancel={this.handleFinish}
|
||||
headerSetCompoent={<HeaderSet
|
||||
loading={loading.headset}
|
||||
onSetClick={() => this.handleHeaderSettings({ sourceType: "IMPORT" })}/>}
|
||||
renderFormComponent={() => <ImportFormOptions
|
||||
{...importFormPayload}
|
||||
onChangeImportForm={this.handleChangeImportPayload}/>
|
||||
}
|
||||
<ImportModal {...importData} importFormPayload={importFormPayload} onCancel={this.handleFinish}
|
||||
onChangeImportForm={this.handleChangeImportPayload} onHeaderSettings={this.handleHeaderSettings}
|
||||
loading={loading.headset} previewUrl="/api/bs/hrmsalary/attendQuote/preview"
|
||||
importAttendQuoteData={importAttendQuoteData}
|
||||
/>
|
||||
{/* 表头设置 */}
|
||||
<SelectItemModal {...fieldSetPayload}
|
||||
onCancel={this.handleCloseSettings}
|
||||
onSearchItemSet={this.handleSearchItemSet}
|
||||
onShowOnlyChecked={this.handleShowOnlyChecked}
|
||||
onMoreOpts={this.handleMoreOpts} onSave={this.handleSave}
|
||||
/>
|
||||
onMoreOpts={this.handleMoreOpts} onSave={this.handleSave}/>
|
||||
{/* 考勤数据引用 */}
|
||||
<AttendanceRefrenceDataModal
|
||||
{...attendanceReferencePayload}
|
||||
onCancel={this.handleCloseQuoteModal}
|
||||
/>
|
||||
<AttendanceRefrenceDataModal {...attendanceReferencePayload} onCancel={this.handleCloseQuoteModal}/>
|
||||
{/* 考勤数据查看 */}
|
||||
<AttendanceDataViewSlide
|
||||
{...attendanceViewPayload}
|
||||
showOperateBtn={showOperateBtn}
|
||||
onClose={() => this.setState({
|
||||
attendanceViewPayload: {
|
||||
...attendanceViewPayload,
|
||||
visible: false,
|
||||
attendQuoteId: ""
|
||||
}
|
||||
})}
|
||||
/>
|
||||
<AttendanceDataViewSlide {...attendanceViewPayload} showOperateBtn={showOperateBtn}
|
||||
onClose={() => this.setState({
|
||||
attendanceViewPayload: {
|
||||
...attendanceViewPayload,
|
||||
visible: false,
|
||||
attendQuoteId: ""
|
||||
}
|
||||
})}/>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,10 @@ import { getSearchs } from "../../../../util";
|
|||
import {
|
||||
checkOperation,
|
||||
getAttendanceFieldSettingList,
|
||||
getLedgerList, returnToAttendanceFieldSettingDefault, saveAttendanceFieldSetting, saveAttendanceFieldSettingAsDefault,
|
||||
getLedgerList,
|
||||
returnToAttendanceFieldSettingDefault,
|
||||
saveAttendanceFieldSetting,
|
||||
saveAttendanceFieldSettingAsDefault,
|
||||
syncAttendanceRefer
|
||||
} from "../../../../apis/attendance";
|
||||
import SelectItemModal from "../../../../components/selectItemsModal";
|
||||
|
|
@ -124,7 +127,7 @@ class AttendanceRefrenceDataModal extends Component {
|
|||
onSelectItem={this.handleSelectItem}
|
||||
/>
|
||||
}
|
||||
});
|
||||
}, () => this.setItemRef && this.setItemRef.initSelectItem());
|
||||
}
|
||||
}).catch(() => this.setState({ headerSetLoading: false }));
|
||||
};
|
||||
|
|
@ -209,12 +212,10 @@ class AttendanceRefrenceDataModal extends Component {
|
|||
<Button type="ghost" onClick={this.handleHeaderSetting} loading={headerSetLoading}>表头设置</Button>
|
||||
];
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 440, height: 156 }}
|
||||
buttons={buttons} hasScroll initLoadCss
|
||||
className="modalWrapper"
|
||||
>
|
||||
{getSearchs(refenceform, condition, 1)}
|
||||
<WeaDialog {...this.props} style={{ width: 480, height: 174 }} buttons={buttons} initLoadCss>
|
||||
<div className="form-dialog-layout">
|
||||
{getSearchs(refenceform, condition, 1)}
|
||||
</div>
|
||||
{/* 表头设置 */}
|
||||
<SelectItemModal {...headerSetPayload}
|
||||
onCancel={this.handleCloseSettings}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:考勤数据-导入
|
||||
* Description:
|
||||
* Date: 2024/3/14
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { Modal } from "antd";
|
||||
import ImportDialog from "../../../../components/importDialog";
|
||||
import HeaderSet from "../../../../components/importModal/headerSet";
|
||||
import ImportFormOptions from "./importFormOptions";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
hasData: false,
|
||||
importDialog: {
|
||||
nextloading: false, link: null, importResult: {}, imageId: "", params: {},
|
||||
previewUrl: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { hasData, importDialog } = this.state;
|
||||
const { params, previewUrl } = nextProps;
|
||||
this.setState({
|
||||
importDialog: { ...importDialog, link: this.handleExportTemp, params, previewUrl, extraPreview: params }
|
||||
});
|
||||
}
|
||||
|
||||
handleExportTemp = () => {
|
||||
const { hasData } = this.state;
|
||||
const { importFormPayload } = this.props;
|
||||
const { salarySobId, salaryYearMonth } = importFormPayload;
|
||||
if (!salarySobId || !salaryYearMonth) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
window.open(`/api/bs/hrmsalary/attendQuote/downloadTemplate?salaryYearMonth=${salaryYearMonth}&salarySobId=${salarySobId}`);
|
||||
};
|
||||
handleImport = (payload) => {
|
||||
const { importDialog } = this.state, { importAttendQuoteData, params } = this.props;
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: true } });
|
||||
importAttendQuoteData({ ...payload, ...params }).then(({ data, status }) => {
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: false } });
|
||||
if (status) {
|
||||
this.setState({
|
||||
importDialog: { ...importDialog, ...payload, importResult: data }
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { importDialog } = this.state;
|
||||
const {
|
||||
visible, onCancel, importFormPayload, onChangeImportForm, onHeaderSettings, loading
|
||||
} = this.props;
|
||||
return (
|
||||
<ImportDialog
|
||||
visible={visible} onCancel={onCancel} {...importDialog} title={getLabel(24023, "数据导入")}
|
||||
onResetImportResult={() => this.setState({
|
||||
importDialog: { ...importDialog, importResult: {}, imageId: "", link: "" }
|
||||
})}
|
||||
importParams={<ImportFormOptions {...importFormPayload} onChangeImportForm={onChangeImportForm}/>}
|
||||
exportDataDom={<HeaderSet loading={loading} onSetClick={() => onHeaderSettings({ sourceType: "IMPORT" })}/>}
|
||||
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
|
||||
nextUplaodCallback={imageId => this.handleImport({ imageId })}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -40,8 +40,9 @@ class ImportFormOptions extends Component {
|
|||
label: "薪资账套",
|
||||
value: salarySobId || "",
|
||||
onChange: this.screenChange,
|
||||
options: [{ key: "", showname: "" }, ...salarySobList],
|
||||
key: "salarySobId"
|
||||
options: salarySobList,
|
||||
key: "salarySobId",
|
||||
viewAttr: 3
|
||||
})
|
||||
},
|
||||
{ com: Input("薪资周期", salaryCycle) },
|
||||
|
|
|
|||
|
|
@ -18,10 +18,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.attendanceFormWrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.attendanceSlideWrapper {
|
||||
.wea-slide-modal-title {
|
||||
height: initial;
|
||||
|
|
|
|||
|
|
@ -57,12 +57,7 @@ class Index extends Component {
|
|||
};
|
||||
handleChangeSalaryMonth = (salaryMonth) => this.setState({ salaryMonth }, () => this.attendanceTableRef.getAttendanceList({ salaryYearMonth: _.compact(this.state.salaryMonth) }));
|
||||
handleAddAttendFileds = () => this.fieldMangRef.handleTriggerAttendFileds();
|
||||
handleImportAttendanceData = () => {
|
||||
this.attendanceTableRef.handleImportAttendanceData({
|
||||
visiable: true, params: {}, step: 0,
|
||||
columns: [], slideDataSource: [], importResult: []
|
||||
});
|
||||
};
|
||||
handleImportAttendanceData = () => this.attendanceTableRef.handleImportAttendanceData({ visible: true, params: {} });
|
||||
handleQuoteAttendanceData = () => {
|
||||
this.attendanceTableRef.handleQuoteAttendanceData({
|
||||
visible: true, title: "引用考勤数据"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
flex-direction: column;
|
||||
|
||||
.wea-form-item {
|
||||
padding: 8px 16px;
|
||||
padding: 8px 16px 0 16px;
|
||||
|
||||
.to {
|
||||
padding: 0 10px
|
||||
|
|
|
|||
|
|
@ -545,7 +545,8 @@ export const DataCollectionDatePicker = (props) => {
|
|||
export const DataCollectionSelect = (props) => {
|
||||
const { value, label, onChange, options, key, labelCol = 10, wrapperCol = 14, viewAttr = 2 } = props;
|
||||
return <WeaFormItem label={label} labelCol={{ span: labelCol }} wrapperCol={{ span: wrapperCol }}>
|
||||
<WeaSelect value={value} onChange={(val) => onChange({ key, value: val })} options={options} viewAttr={viewAttr}/>
|
||||
<WeaSelect style={{ width: 200 }} value={value} onChange={(val) => onChange({ key, value: val })} options={options}
|
||||
viewAttr={viewAttr}/>
|
||||
</WeaFormItem>;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,10 @@ class DataTables extends Component {
|
|||
getTableDate = (extraPayload = {}) => {
|
||||
const { loading, pageInfo } = this.state;
|
||||
const { url, payload } = this.props;
|
||||
const module = { ...pageInfo, url, ...payload, ...extraPayload };
|
||||
const module = {
|
||||
...pageInfo, url, ...payload, ...extraPayload,
|
||||
departmentIds: extraPayload.departmentIds ? extraPayload.departmentIds.split(",") : []
|
||||
};
|
||||
this.setState({ loading: { ...loading, query: true } });
|
||||
getTableDate(module).then(({ status, data }) => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
|
|
|
|||
|
|
@ -1,19 +1,16 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 最优年终奖计税方案-策略-导入
|
||||
* name:数据采集四个基础项-导入
|
||||
* Description:
|
||||
* Date: 2024/3/1
|
||||
* Date: 2024/3/14
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaCheckbox, WeaLocaleProvider } from "ecCom";
|
||||
import ImportDialog from "../../components/importDialog";
|
||||
import { convertToUrlString } from "../../util/url";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("specialAddStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -32,11 +29,24 @@ class Index extends Component {
|
|||
this.setState({
|
||||
importDialog: {
|
||||
...importDialog, link: `${templateLink}?${convertToUrlString({ ...importOpts, hasData })}`,
|
||||
importResult, params: importOpts, previewUrl
|
||||
importResult, params: importOpts, previewUrl, extraPreview: importOpts
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
handleExportTemp = () => {
|
||||
const { hasData } = this.state;
|
||||
const { templateLink, importOpts } = this.props;
|
||||
if (!Object.values(importOpts).every(o => !!o)) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
const payload = { ...importOpts, hasData };
|
||||
window.open(`${templateLink}?${convertToUrlString(payload)}`, "_blank");
|
||||
};
|
||||
handleImport = (payload) => {
|
||||
const { importDialog } = this.state, { onImportFile, importOpts } = this.props;
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: true } });
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import { WeaForm } from "comsMobx";
|
|||
|
||||
export class AttendanceStore {
|
||||
@observable form = new WeaForm();
|
||||
@action("字段管理-新建字段表单初始化")
|
||||
initForm = () => this.form = new WeaForm();
|
||||
@observable refenceform = new WeaForm();
|
||||
//薪酬统计 新增form
|
||||
@observable statisticsForm = new WeaForm();
|
||||
|
|
|
|||
Loading…
Reference in New Issue