import modal 改造

This commit is contained in:
MustangDeng 2022-03-11 16:13:36 +08:00
parent 7cdc3ed9b2
commit 6ea3bfef6e
13 changed files with 463 additions and 154 deletions

View File

@ -48,7 +48,7 @@ export const getCumSituationDetailList = params => {
}
//数据采集-累计情况-导出明细
export const exportCumSituationDetailList = params => {
export const exportCumSituationDetailList = ids => {
fetch('/api/bs/hrmsalary/addUpSituation/exportDetail?ids=' + ids).then(res => res.blob().then(blob => {
var filename=`往期累计情况(工资、薪金).xlsx`
var a = document.createElement('a');
@ -58,4 +58,28 @@ export const exportCumSituationDetailList = params => {
a.click();
window.URL.revokeObjectURL(url);
}))
}
// 数据采集-累计情况-导入
export const importCumSituationParam = params => {
return fetch('/api/bs/hrmsalary/addUpSituation/importAddUpSituation', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json())
}
// 数据采集-累计情况-导入预览
export const importCumSituationPreview = params => {
return fetch('/api/bs/hrmsalary/addUpSituation/addUpSituation', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json())
}

View File

@ -39,7 +39,14 @@ export const exportOtherDeductList = (ids = "") => {
//数据采集-获取其他免税扣除记录
export const getOtherDeductDetailList = params => {
return WeaTools.callApi('/api/bs/hrmsalary/otherDeduction/getDetailList', 'get', params);
return fetch('/api/bs/hrmsalary/otherDeduction/getDetailList', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json())
}
//数据采集-其他免税扣除-导出明细
@ -53,4 +60,29 @@ export const exportOtherDeductDetailList = ids => {
a.click();
window.URL.revokeObjectURL(url);
}))
}
}
// 数据采集-其他免税扣除-导入
export const importOtherDeductionParam = params => {
return fetch('/api/bs/hrmsalary/otherDeduction/importData', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json())
}
// 数据采集-其他免税扣除-导入预览
export const importOtherDeductionPreview = params => {
return fetch('/api/bs/hrmsalary/otherDeduction/preview', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json())
}

View File

@ -1,62 +0,0 @@
export const columns = [
{
title: "姓名",
dataIndex: 'username',
key: 'username',
},
{
title: "个税扣缴义务人",
dataIndex: 'taxAgentName',
key: 'taxAgentName',
},
{
title: "部门",
dataIndex: 'departmentName',
key: 'departmentName',
},
{
title: "手机号",
dataIndex: 'mobile',
key: 'mobile',
},
{
title: "工号",
dataIndex: 'jobNum',
key: 'jobNum',
},
{
title: "证件号码",
dataIndex: 'idNo',
key: 'idNo',
},
{
title: "入职日期",
dataIndex: 'hiredate',
key: 'hiredate',
},
{
title: "累计子女教育",
dataIndex: 'addUpChildEducation',
key: 'addUpChildEducation',
},
{
title: "累计继续教育",
dataIndex: 'addUpContinuingEducation',
key: 'addUpContinuingEducation',
},
{
title: "累计住房贷款利息",
dataIndex: 'addUpHousingLoanInterest',
key: 'addUpHousingLoanInterest',
},
{
title: "累计住房租金",
dataIndex: 'addUpHousingRent',
key: 'addUpHousingRent',
},
{
title: "累计赡养老人",
dataIndex: 'addUpSupportElderly',
key: 'addUpSupportElderly',
}
]

View File

@ -8,21 +8,16 @@ import ModalStep1 from './modalStep1'
import ModalStep2 from './modalStep2'
import ModalStep3 from './modalStep3'
import { columns } from './columns'
const Dragger = Upload.Dragger;
const Step = WeaSteps.Step;
@inject("taxAgentStore", "cumDeductStore")
@inject("taxAgentStore")
@observer
export default class ImportModal extends React.Component {
constructor(props) {
super(props)
this.state = {
currentStep: 0,
datetime: "",
taxAgentId: "",
fileId: ""
}
}
@ -33,71 +28,40 @@ export default class ImportModal extends React.Component {
}
nextStep() {
const { cumDeductStore: { step, setStep }} = this.props;
setStep(step + 1)
const { step } = this.props;
this.props.setStep(step + 1)
}
preStep() {
const { cumDeductStore: { step, setStep }} = this.props;
setStep(step - 1);
const { step } = this.props;
this.props.setStep(step - 1);
}
renderFormComponent() {
const { datetime, taxAgentId } = this.state
const { taxAgentStore: {taxAgentOption} } = this.props;
return (
<Row>
<Col span={12}>
<span className="formLabel" style={{ lineHeight: "30px", marginRight: "10px" }}>税款所属期</span>
<WeaDatePicker
format="yyyy-MM"
value={datetime}
onChange={value => this.setState({ datetime: value })}
/>
</Col>
<Col span={12}>
<span className="formLabel" style={{ lineHeight: "30px", marginRight: "10px" }}>个税扣缴义务人</span>
<WeaSelect
showSearch // 设置select可搜索
style={{ width: 200, display: "inline-block" }}
options={taxAgentOption}
value={taxAgentId}
onChange={v => {
this.setState({ taxAgentId: v });
}}
/>
</Col>
</Row>
)
}
handleStep1Next() {
const { cumDeductStore: { importFile, setStep }} = this.props;
const { fileId, datetime, taxAgentId} = this.state;
setStep(1)
this.props.setStep(1)
}
handlePreviewDate() {
const { cumDeductStore: { previewImport }} = this.props;
const { fileId, datetime, taxAgentId } = this.state;
previewImport({
imageId: fileId,
declareMonth: datetime,
taxAgentId: taxAgentId
const { fileId } = this.state;
const { params } = this.props;
this.props.previewImport({
...params,
imageId: fileId
})
}
hanleImportData() {
const { cumDeductStore: { importFile }} = this.props;
const { fileId, datetime, taxAgentId } = this.state;
importFile({
const { fileId } = this.state;
const { params } = this.props;
this.props.importFile({
...params,
imageId: fileId,
declareMonth: datetime,
taxAgentId: taxAgentId
})
}
render() {
const { cumDeductStore: { step, slideDataSource, importResult, setSlideVisiable, setStep, setModalVisiable }} = this.props;
const { step, slideDataSource } = this.props;
return (
<Modal title="数据导入" visible={this.props.visiable}
onCancel={this.props.onCancel}
@ -112,25 +76,26 @@ export default class ImportModal extends React.Component {
</WeaSteps>
</div>
{
step == 0 && (<ModalStep1
formComponent={this.renderFormComponent()}
this.props.step == 0 && (<ModalStep1
templateLink={this.props.templateLink}
formComponent={this.props.renderFormComponent()}
onFileIdChange={(fileId) => {this.setState({fileId})}}
onStep1Next={() => {
this.handleStep1Next();
}}/>)
}
{
step == 1 && (<ModalStep2
this.props.step == 1 && (<ModalStep2
onPreviewDate={() => this.handlePreviewDate()}
dataSource={slideDataSource}
columns={columns}
columns={this.props.columns}
onStep2Next={() => {this.nextStep()}} onStep2Pre={() => {this.preStep()}}/>)
}
{
step == 2 && (<ModalStep3
this.props.step == 2 && (<ModalStep3
onImportData={() => this.hanleImportData()}
importResult={toJS(importResult)}
onFinish={() => {setModalVisiable(false); setStep(0)}}/>)
importResult={toJS(this.props.importResult)}
onFinish={() => {this.props.onFinish()}}/>)
}
</Modal>

View File

@ -78,7 +78,7 @@ export default class ModalStep1 extends React.Component {
</div>
<div style={{ lineHeight: "30px" }}>
<p>1. 第一步请选择导出的Excel文件或 <a href="/api/bs/hrmsalary/addUpDeduction/downloadTemplate">点击这里下载模板</a></p>
<p>1. 第一步请选择导出的Excel文件或 <a href={this.props.templateLink}>点击这里下载模板</a></p>
<p>2. 第二步请一定要确定Excel文档中的格式是模板中的格式没有被修改掉</p>
<p>3. 第三步选择填写好的Excel文档点击下一步按钮进行数据预览</p>
<p>4. 第四步如果以上步骤和Excel文档正确的话数据会被正确导入导入成功会有提示如果有问题则会提示Excel文档的错误之处</p>

View File

@ -67,6 +67,70 @@ export const columns = [
]
export const modalColumns = [
{
title: "姓名",
dataIndex: 'username',
key: 'username',
},
{
title: "个税扣缴义务人",
dataIndex: 'taxAgentName',
key: 'taxAgentName',
},
{
title: "部门",
dataIndex: 'departmentName',
key: 'departmentName',
},
{
title: "手机号",
dataIndex: 'mobile',
key: 'mobile',
},
{
title: "工号",
dataIndex: 'jobNum',
key: 'jobNum',
},
{
title: "证件号码",
dataIndex: 'idNo',
key: 'idNo',
},
{
title: "入职日期",
dataIndex: 'hiredate',
key: 'hiredate',
},
{
title: "累计子女教育",
dataIndex: 'addUpChildEducation',
key: 'addUpChildEducation',
},
{
title: "累计继续教育",
dataIndex: 'addUpContinuingEducation',
key: 'addUpContinuingEducation',
},
{
title: "累计住房贷款利息",
dataIndex: 'addUpHousingLoanInterest',
key: 'addUpHousingLoanInterest',
},
{
title: "累计住房租金",
dataIndex: 'addUpHousingRent',
key: 'addUpHousingRent',
},
{
title: "累计赡养老人",
dataIndex: 'addUpSupportElderly',
key: 'addUpSupportElderly',
}
]
export const dataSource = [];

View File

@ -2,7 +2,7 @@ import React from 'react';
import { inject, observer } from 'mobx-react';
import { toJS } from 'mobx';
import { Button, Table, DatePicker, Dropdown, Menu, Modal, message } from 'antd';
import { Button, Table, DatePicker, Dropdown, Menu, Modal, message, Row, Col } from 'antd';
import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaDatePicker, WeaSelect, WeaHelpfulTip, WeaSlideModal } from 'ecCom';
import { WeaTableNew } from "comsMobx"
@ -14,7 +14,7 @@ import { renderNoright, getSearchs } from '../../../util'; // 渲染form数据
import CustomTab from '../../../components/customTab';
import ContentWrapper from '../../../components/contentWrapper';
import ImportModal from '../../../components/importModal'
import { columns, dataSource } from './columns';
import { columns, dataSource, modalColumns } from './columns';
const { MonthPicker } = DatePicker;
@ -35,7 +35,12 @@ export default class CumDeduct extends React.Component {
selectedKey: "0",
visiable: false,
monthValue: moment(new Date()).format("YYYY-MM"),
taxAgentId: ""
taxAgentId: "",
datetime: "",
modalParam: {
declareMonth: "",
taxAgentId: ""
}
}
}
@ -88,6 +93,35 @@ export default class CumDeduct extends React.Component {
)
}
renderFormComponent() {
const { modalParam } = this.state
const { taxAgentStore: {taxAgentOption} } = this.props;
return (
<Row>
<Col span={12}>
<span className="formLabel" style={{ lineHeight: "30px", marginRight: "10px" }}>税款所属期</span>
<WeaDatePicker
format="yyyy-MM"
value={modalParam.declareMonth}
onChange={value => this.setState({ modalParam: {...modalParam, declareMonth: value} })}
/>
</Col>
<Col span={12}>
<span className="formLabel" style={{ lineHeight: "30px", marginRight: "10px" }}>个税扣缴义务人</span>
<WeaSelect
showSearch // 设置select可搜索
style={{ width: 200, display: "inline-block" }}
options={taxAgentOption}
value={modalParam.taxAgentId}
onChange={v => {
this.setState({ modalParam: {...modalParam, taxAgentId: v} });
}}
/>
</Col>
</Row>
)
}
onEdit = (record) => {
const { cumDeductStore: { slideVisiable, setSlideVisiable, getCumDeductDetailList, setCurrentRecord } } = this.props;
setSlideVisiable(true)
@ -134,10 +168,11 @@ export default class CumDeduct extends React.Component {
};
render() {
const { modalParam } = this.state;
const { cumDeductStore, taxAgentStore } = this.props;
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = cumDeductStore;
const { taxAgentOption, step } = taxAgentStore
const { slideVisiable, setSlideVisiable, modalVisiable, setModalVisiable, slideTableStore } = cumDeductStore
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd, previewImport, importFile } = cumDeductStore;
const { taxAgentOption } = taxAgentStore
const { slideVisiable, setSlideVisiable, modalVisiable, setModalVisiable, slideTableStore, step, setStep, slideDataSource, importResult } = cumDeductStore
const selectedRowKeys = toJS(tableStore.selectedRowKeys) || [];
const detailSelectedRowKeys = toJS(slideTableStore.selectedRowKeys) || [];
@ -271,7 +306,21 @@ export default class CumDeduct extends React.Component {
/>
</WeaTop>
</WeaRightMenu>
<ImportModal visiable={modalVisiable} onCancel={() => { this.handleCancel() }} />
<ImportModal
params={modalParam}
columns={modalColumns}
step={step}
setStep={setStep}
slideDataSource={slideDataSource}
importResult={importResult}
onFinish={() => {setModalVisiable(false); setStep(0)}}
previewImport={(params) => {previewImport(params)}}
importFile={(params) => {importFile(params)}}
templateLink={"/api/bs/hrmsalary/addUpDeduction/downloadTemplate"}
renderFormComponent={() => this.renderFormComponent()}
visiable={modalVisiable}
onCancel={() => { this.handleCancel() }}
/>
{
slideVisiable && <WeaSlideModal visible={slideVisiable}
top={0}

View File

@ -67,6 +67,115 @@ export const columns = [
]
export const modalColumns = [
{
title: "姓名",
dataIndex: 'username',
key: 'username',
},
{
title: "个税扣缴义务人",
dataIndex: 'taxAgentName',
key: 'taxAgentName',
},
{
title: "部门",
dataIndex: 'departmentName',
key: 'departmentName',
},
{
title: "手机号",
dataIndex: 'mobile',
key: 'mobile',
},
{
title: "工号",
dataIndex: 'jobNum',
key: 'jobNum',
},
{
title: "证件号码",
dataIndex: 'idNo',
key: 'idNo',
},
{
title: "入职日期",
dataIndex: 'hiredate',
key: 'hiredate',
},
{
title: "累计收入额",
dataIndex: 'addUpChildEducation',
key: 'addUpChildEducation',
},
{
title: "累计减除费用",
dataIndex: 'addUpContinuingEducation',
key: 'addUpContinuingEducation',
},
{
title: "累计社保个人合计",
dataIndex: 'addUpHousingLoanInterest',
key: 'addUpHousingLoanInterest',
},
{
title: "累计公积金个人合计",
dataIndex: 'addUpHousingRent',
key: 'addUpHousingRent',
},
{
title: "累计子女教育",
dataIndex: 'addUpSupportElderly',
key: 'addUpSupportElderly',
},
{
title: "累计继续教育",
dataIndex: 'addUpSupportElderly',
key: 'addUpSupportElderly',
},
{
title: "累计住房租金",
dataIndex: 'addUpSupportElderly',
key: 'addUpSupportElderly',
},
{
title: "累计赡养老人",
dataIndex: 'addUpSupportElderly',
key: 'addUpSupportElderly',
},
{
title: "累计企业(职业)年金及其他福利",
dataIndex: 'addUpSupportElderly',
key: 'addUpSupportElderly',
},
{
title: "累计住房租金",
dataIndex: 'addUpSupportElderly',
key: 'addUpSupportElderly',
},
{
title: "累计其他扣除",
dataIndex: 'addUpSupportElderly',
key: 'addUpSupportElderly',
},
{
title: "累计免税收入",
dataIndex: 'addUpSupportElderly',
key: 'addUpSupportElderly',
},
{
title: "累计准予扣除的捐赠额",
dataIndex: 'addUpSupportElderly',
key: 'addUpSupportElderly',
},
{
title: "累计已预扣预缴税额",
dataIndex: 'addUpSupportElderly',
key: 'addUpSupportElderly',
}
]
export const dataSource = [];

View File

@ -2,7 +2,7 @@ import React from 'react';
import { inject, observer } from 'mobx-react';
import { toJS } from 'mobx';
import { Button, Table, DatePicker, Dropdown, Menu, Modal, message } from 'antd';
import { Button, Table, DatePicker, Dropdown, Menu, Modal, message, Row, Col } from 'antd';
import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaDatePicker, WeaSelect, WeaHelpfulTip, WeaSlideModal } from 'ecCom';
import { WeaTableNew } from "comsMobx"
@ -14,7 +14,7 @@ import { renderNoright, getSearchs } from '../../../util'; // 渲染form数据
import CustomTab from '../../../components/customTab';
import ContentWrapper from '../../../components/contentWrapper';
import ImportModal from '../../../components/importModal'
import { columns, dataSource } from './columns';
import { columns, dataSource, modalColumns } from './columns';
const { MonthPicker } = DatePicker;
@ -35,7 +35,10 @@ export default class CumSituation extends React.Component {
selectedKey: "0",
visiable: false,
monthValue: moment(new Date()).format("YYYY-MM"),
taxAgentId: ""
taxAgentId: "",
modalParam: {
declareMonth: "",
}
}
}
@ -88,6 +91,24 @@ export default class CumSituation extends React.Component {
)
}
renderFormComponent() {
const { modalParam } = this.state
const { taxAgentStore: {taxAgentOption} } = this.props;
return (
<Row>
<Col span={12}>
<span className="formLabel" style={{ lineHeight: "30px", marginRight: "10px" }}>税款所属期</span>
<WeaDatePicker
format="yyyy-MM"
value={modalParam.declareMonth}
onChange={value => this.setState({ modalParam: {declareMonth: value} })}
/>
</Col>
</Row>
)
}
onEdit = (record) => {
const { cumSituationStore: { slideVisiable, setSlideVisiable, getCumDeductDetailList, setCurrentRecord } } = this.props;
setSlideVisiable(true)
@ -135,11 +156,11 @@ export default class CumSituation extends React.Component {
render() {
const { cumSituationStore, taxAgentStore } = this.props;
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = cumSituationStore;
const { taxAgentOption, step } = taxAgentStore
const { slideVisiable, setSlideVisiable, modalVisiable, setModalVisiable, slideTableStore } = cumSituationStore
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd, previewImport, importFile } = cumSituationStore;
const { taxAgentOption } = taxAgentStore
const { slideVisiable, setSlideVisiable, modalVisiable, setModalVisiable, slideTableStore, step, setStep, slideDataSource, importResult } = cumSituationStore
const selectedRowKeys = toJS(tableStore.selectedRowKeys) || [];
const { modalParam } = this.state;
const detailSelectedRowKeys = toJS(slideTableStore.selectedRowKeys) || [];
if (!hasRight && !loading) { // 无权限处理
return renderNoright();
@ -271,7 +292,20 @@ export default class CumSituation extends React.Component {
/>
</WeaTop>
</WeaRightMenu>
<ImportModal visiable={modalVisiable} onCancel={() => { this.handleCancel() }} />
<ImportModal
templateLink={"/api/bs/hrmsalary/addUpSituation/downloadTemplate"}
params={modalParam}
columns={modalColumns}
step={step}
setStep={setStep}
onFinish={() => {setModalVisiable(false); setStep(0)}}
slideDataSource={slideDataSource}
importResult={importResult}
previewImport={(params) => {previewImport(params)}}
importFile={(params) => {importFile(params)}}
renderFormComponent={() => this.renderFormComponent()}
visiable={modalVisiable}
onCancel={() => { this.handleCancel() }} />
{
slideVisiable && <WeaSlideModal visible={slideVisiable}
top={0}

View File

@ -67,6 +67,64 @@ export const columns = [
]
export const modalColumns = [
{
title: "姓名",
dataIndex: 'username',
key: 'username',
},
{
title: "个税扣缴义务人",
dataIndex: 'taxAgentName',
key: 'taxAgentName',
},
{
title: "部门",
dataIndex: 'departmentName',
key: 'departmentName',
},
{
title: "手机号",
dataIndex: 'mobile',
key: 'mobile',
},
{
title: "工号",
dataIndex: 'jobNum',
key: 'jobNum',
},
{
title: "证件号码",
dataIndex: 'idNo',
key: 'idNo',
},
{
title: "入职日期",
dataIndex: 'hiredate',
key: 'hiredate',
},
{
title: "商业健康保险",
dataIndex: 'businessHealthyInsurance',
key: 'businessHealthyInsurance',
},
{
title: "税延养老保险",
dataIndex: 'taxDelayEndowmentInsurance',
key: 'taxDelayEndowmentInsurance',
},
{
title: "其他",
dataIndex: 'otherDeduction',
key: 'otherDeduction',
},
{
title: "准予扣除的捐赠额",
dataIndex: 'deductionAllowedDonation',
key: 'deductionAllowedDonation',
}
]
export const dataSource = [];

View File

@ -2,7 +2,7 @@ import React from 'react';
import { inject, observer } from 'mobx-react';
import { toJS } from 'mobx';
import { Button, Table, DatePicker, Dropdown, Menu, Modal, message } from 'antd';
import { Button, Table, DatePicker, Dropdown, Menu, Modal, message, Row, Col } from 'antd';
import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaDatePicker, WeaSelect, WeaHelpfulTip, WeaSlideModal } from 'ecCom';
import { WeaTableNew } from "comsMobx"
@ -14,7 +14,7 @@ import { renderNoright, getSearchs } from '../../../util'; // 渲染form数据
import CustomTab from '../../../components/customTab';
import ContentWrapper from '../../../components/contentWrapper';
import ImportModal from '../../../components/importModal'
import { columns, dataSource } from './columns';
import { columns, dataSource, modalColumns } from './columns';
const { MonthPicker } = DatePicker;
@ -35,7 +35,10 @@ export default class OtherDeduct extends React.Component {
selectedKey: "0",
visiable: false,
monthValue: moment(new Date()).format("YYYY-MM"),
taxAgentId: ""
taxAgentId: "",
modalParam: {
declareMonth: "",
}
}
}
@ -133,12 +136,31 @@ export default class OtherDeduct extends React.Component {
}
};
renderFormComponent() {
const { modalParam } = this.state
const { taxAgentStore: {taxAgentOption} } = this.props;
return (
<Row>
<Col span={12}>
<span className="formLabel" style={{ lineHeight: "30px", marginRight: "10px" }}>税款所属期</span>
<WeaDatePicker
format="yyyy-MM"
value={modalParam.declareMonth}
onChange={value => this.setState({ modalParam: {declareMonth: value} })}
/>
</Col>
</Row>
)
}
render() {
const { otherDeductStore, taxAgentStore } = this.props;
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = otherDeductStore;
const { taxAgentOption, step } = taxAgentStore
const { slideVisiable, setSlideVisiable, modalVisiable, setModalVisiable, slideTableStore } = otherDeductStore
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd, previewImport, importFile } = otherDeductStore;
const { taxAgentOption } = taxAgentStore
const { slideVisiable, setSlideVisiable, modalVisiable, setModalVisiable, slideTableStore, step, setStep, slideDataSource, importResult } = otherDeductStore
const selectedRowKeys = toJS(tableStore.selectedRowKeys) || [];
const { modalParam } = this.state;
const detailSelectedRowKeys = toJS(slideTableStore.selectedRowKeys) || [];
if (!hasRight && !loading) { // 无权限处理
@ -271,7 +293,21 @@ export default class OtherDeduct extends React.Component {
/>
</WeaTop>
</WeaRightMenu>
<ImportModal visiable={modalVisiable} onCancel={() => { this.handleCancel() }} />
<ImportModal
templateLink={"/api/bs/hrmsalary/otherDeduction/downloadTemplate"}
params={modalParam}
columns={modalColumns}
step={step}
setStep={setStep}
onFinish={() => {setModalVisiable(false); setStep(0)}}
importResult={importResult}
slideDataSource={slideDataSource}
previewImport={(params) => {previewImport(params)}}
importFile={(params) => {importFile(params)}}
renderFormComponent={() => this.renderFormComponent()}
visiable={modalVisiable}
onCancel={() => { this.handleCancel() }}
/>
{
slideVisiable && <WeaSlideModal visible={slideVisiable}
top={0}

View File

@ -86,7 +86,7 @@ export class CumSituationStore {
// 导入
@action importFile = (params) => {
API.importCumDeductParam(params).then(action(res => {
API.importCumSituationParam(params).then(action(res => {
if(res.status) {
this.importResult = res.data
}
@ -95,7 +95,7 @@ export class CumSituationStore {
// 导入预览
@action previewImport = (params) => {
API.importCumDeductPreview(params).then(action(res => {
API.importCumSituationPreview(params).then(action(res => {
if(res.status) {
this.slideDataSource = res.data.preview
}

View File

@ -86,7 +86,7 @@ export class OtherDeductStore {
// 导入
@action importFile = (params) => {
API.importCumDeductParam(params).then(action(res => {
API.importOtherDeductionParam(params).then(action(res => {
if(res.status) {
this.importResult = res.data
}
@ -95,7 +95,7 @@ export class OtherDeductStore {
// 导入预览
@action previewImport = (params) => {
API.importCumDeductPreview(params).then(action(res => {
API.importOtherDeductionPreview(params).then(action(res => {
if(res.status) {
this.slideDataSource = res.data.preview
}
@ -109,9 +109,9 @@ export class OtherDeductStore {
// 查询明细
@action getCumDeductDetailList = (id, param = {}) => {
let requestParams = {"accumulatedSpecialAdditionalDeductionId": id};
let requestParams = {"otherTaxExemptDeductionId": id};
requestParams = {...requestParams, ...param}
API.getCumDeductDetailList(requestParams).then(res => {
API.getOtherDeductDetailList(requestParams).then(res => {
if(res.status) {
if (res.status) { // 接口请求成功/失败处理
this.slideTableStore.getDatas(res.data.datas); // table 请求数据