+ }
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
index c8ebb561..81ba2bae 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
@@ -112,11 +112,19 @@ export default class CumDeduct extends React.Component {
return newColumns;
}
+ handleCancel() {
+ const { cumDeductStore } = this.props;
+ const { modalVisiable, setModalVisiable, setStep } = cumDeductStore
+ setModalVisiable(false);
+ setStep(0);
+
+ }
+
render() {
const { cumDeductStore, taxAgentStore } = this.props;
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = cumDeductStore;
const { taxAgentOption, step } = taxAgentStore
- const { slideVisiable, setSlideVisiable } = cumDeductStore
+ const { slideVisiable, setSlideVisiable, modalVisiable, setModalVisiable } = cumDeductStore
if (!hasRight && !loading) { // 无权限处理
return renderNoright();
@@ -158,9 +166,9 @@ export default class CumDeduct extends React.Component {
}
const handleBtnImport = () => {
- this.setState({
- visiable: true
- })
+ const { cumDeductStore: { setModalVisiable, setStep } } = this.props;
+ setStep(0);
+ setModalVisiable(true)
}
@@ -222,7 +230,7 @@ export default class CumDeduct extends React.Component {
/>
- { this.setState({ visiable: false }) }} />
+ { this.handleCancel() }} />
{
slideVisiable && this.modalVisiable = visiable
+
@action
setStep = step => this.step = step;
@@ -73,7 +81,16 @@ export class CumDeductStore {
@action importFile = (params) => {
API.importCumDeductParam(params).then(action(res => {
if(res.status) {
- alert(JSON.stringify(res.data))
+ this.importResult = res.data
+ }
+ }))
+ }
+
+ // 导入预览
+ @action previewImport = (params) => {
+ API.importCumDeductPreview(params).then(action(res => {
+ if(res.status) {
+ this.slideDataSource = res.data.preview
}
}))
}