修改导出的bug
This commit is contained in:
parent
9a6344dae1
commit
aa165e70da
|
|
@ -43,11 +43,11 @@ export const exportOtherDeductList = (ids = "") => {
|
|||
window.URL.revokeObjectURL(url);
|
||||
})
|
||||
);
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/otherDeduction/export",
|
||||
"POST",
|
||||
params
|
||||
);
|
||||
// return WeaTools.callApi(
|
||||
// "/api/bs/hrmsalary/otherDeduction/export",
|
||||
// "POST",
|
||||
// params
|
||||
// );
|
||||
};
|
||||
|
||||
//数据采集-获取其他免税扣除记录
|
||||
|
|
|
|||
|
|
@ -112,7 +112,10 @@ export default class RefereAttendFormModal extends React.Component {
|
|||
<Col span={16}>
|
||||
{
|
||||
this.state.inited && <Select
|
||||
defaultValue={this.state.request.salarySobId} value={this.state.request.salarySobId} style={{ width: "200px" }} onChange={(value) => {
|
||||
defaultValue={this.state.request.salarySobId} value={this.state.request.salarySobId} style={{ width: "200px" }}
|
||||
className="wea-select"
|
||||
notFoundContent="暂无数据"
|
||||
onChange={(value) => {
|
||||
this.handleRequestChange({salarySobId: value})
|
||||
}}>
|
||||
{importLedgerList.map(item => (
|
||||
|
|
|
|||
|
|
@ -345,10 +345,19 @@ export default class CumDeduct extends React.Component {
|
|||
};
|
||||
|
||||
const handleButtonClick = () => {
|
||||
const {
|
||||
cumDeductStore: { exportCumDeductList },
|
||||
} = this.props;
|
||||
exportCumDeductList();
|
||||
// const {
|
||||
// cumDeductStore: { exportCumDeductList },
|
||||
// } = this.props;
|
||||
// exportCumDeductList();
|
||||
const { selectedKey } = this.state;
|
||||
const url = `${window.location
|
||||
.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=${selectedKey.join(
|
||||
","
|
||||
)}&declareMonth=${this.state.monthValue}&taxAgentId=${this.state
|
||||
.taxAgentId == "All"
|
||||
? ""
|
||||
: this.state.taxAgentId}`;
|
||||
window.open(url, "_self");
|
||||
};
|
||||
|
||||
const handleMenuClick = () => {
|
||||
|
|
@ -356,10 +365,18 @@ export default class CumDeduct extends React.Component {
|
|||
message.warning("未选择条目");
|
||||
return;
|
||||
}
|
||||
const {
|
||||
cumDeductStore: { exportCumDeductList },
|
||||
} = this.props;
|
||||
exportCumDeductList(this.state.selectedKey.join(","));
|
||||
const url = `${window.location
|
||||
.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=${this.state.selectedKey.join(
|
||||
","
|
||||
)}&declareMonth=${this.state.monthValue}&taxAgentId=${this.state
|
||||
.taxAgentId == "All"
|
||||
? ""
|
||||
: this.state.taxAgentId}`;
|
||||
window.open(url, "_self");
|
||||
// const {
|
||||
// cumDeductStore: { exportCumDeductList },
|
||||
// } = this.props;
|
||||
// exportCumDeductList(this.state.selectedKey.join(","));
|
||||
};
|
||||
|
||||
const handleBtnImport = () => {
|
||||
|
|
|
|||
|
|
@ -351,21 +351,39 @@ export default class CumSituation extends React.Component {
|
|||
};
|
||||
|
||||
const handleButtonClick = () => {
|
||||
const {
|
||||
cumSituationStore: { exportCumSituationList },
|
||||
} = this.props;
|
||||
exportCumSituationList();
|
||||
// const {
|
||||
// cumSituationStore: { exportCumSituationList },
|
||||
// } = this.props;
|
||||
// exportCumSituationList();
|
||||
const { selectedKey } = this.state;
|
||||
const url = `${window.location
|
||||
.origin}/api/bs/hrmsalary/addUpSituation/export?ids=${selectedKey.join(
|
||||
","
|
||||
)}&declareMonth=${this.state.monthValue}&taxAgentId=${this.state
|
||||
.taxAgentId == "All"
|
||||
? ""
|
||||
: this.state.taxAgentId}`;
|
||||
window.open(url, "_self");
|
||||
};
|
||||
|
||||
const handleMenuClick = () => {
|
||||
if (selectedRowKeys.length == 0) {
|
||||
const { selectedKey } = this.state;
|
||||
if (_.isEmpty(selectedKey)) {
|
||||
message.warning("未选择条目");
|
||||
return;
|
||||
}
|
||||
const {
|
||||
cumSituationStore: { exportCumDeductList },
|
||||
} = this.props;
|
||||
exportCumDeductList(selectedRowKeys.join(","));
|
||||
const url = `${window.location
|
||||
.origin}/api/bs/hrmsalary/addUpSituation/export?ids=${selectedKey.join(
|
||||
","
|
||||
)}&declareMonth=${this.state.monthValue}&taxAgentId=${this.state
|
||||
.taxAgentId == "All"
|
||||
? ""
|
||||
: this.state.taxAgentId}`;
|
||||
window.open(url, "_self");
|
||||
// const {
|
||||
// cumSituationStore: { exportCumDeductList },
|
||||
// } = this.props;
|
||||
// exportCumDeductList(selectedRowKeys.join(","));
|
||||
};
|
||||
|
||||
const handleBtnImport = () => {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {
|
|||
Modal,
|
||||
message,
|
||||
Row,
|
||||
Col,
|
||||
Col
|
||||
} from "antd";
|
||||
import {
|
||||
WeaTop,
|
||||
|
|
@ -21,7 +21,7 @@ import {
|
|||
WeaSelect,
|
||||
WeaHelpfulTip,
|
||||
WeaSlideModal,
|
||||
WeaTable,
|
||||
WeaTable
|
||||
} from "ecCom";
|
||||
import moment from "moment";
|
||||
import { renderNoright, getSearchs } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
|
|
@ -52,8 +52,8 @@ export default class OtherDeduct extends React.Component {
|
|||
taxAgentId: "All",
|
||||
inited: false,
|
||||
modalParam: {
|
||||
declareMonth: "",
|
||||
},
|
||||
declareMonth: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -61,12 +61,12 @@ export default class OtherDeduct extends React.Component {
|
|||
// 初始化渲染页面
|
||||
const {
|
||||
otherDeductStore: { doInit },
|
||||
taxAgentStore: { fetchTaxAgentOption },
|
||||
taxAgentStore: { fetchTaxAgentOption }
|
||||
} = this.props;
|
||||
doInit({declareMonth: [this.state.monthValue],taxAgentId:"" });
|
||||
doInit({ declareMonth: [this.state.monthValue], taxAgentId: "" });
|
||||
fetchTaxAgentOption().then(() => {
|
||||
this.setState({
|
||||
inited: true,
|
||||
inited: true
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
@ -75,7 +75,7 @@ export default class OtherDeduct extends React.Component {
|
|||
const { monthValue, taxAgentId } = this.state;
|
||||
const {
|
||||
taxAgentStore: { taxAgentOption },
|
||||
otherDeductStore: { form, getTableDatas },
|
||||
otherDeductStore: { form, getTableDatas }
|
||||
} = this.props;
|
||||
return (
|
||||
<div className="searchConditionWrapper">
|
||||
|
|
@ -86,17 +86,17 @@ export default class OtherDeduct extends React.Component {
|
|||
format="YYYY-MM"
|
||||
width={200}
|
||||
onChange={v => {
|
||||
this.setState({monthValue: v})
|
||||
let params = {}
|
||||
if(taxAgentId == "All") {
|
||||
params.taxAgentId = ""
|
||||
this.setState({ monthValue: v });
|
||||
let params = {};
|
||||
if (taxAgentId == "All") {
|
||||
params.taxAgentId = "";
|
||||
} else {
|
||||
params.taxAgentId = taxAgentId
|
||||
params.taxAgentId = taxAgentId;
|
||||
}
|
||||
if(v != null && v != "") {
|
||||
params.declareMonth = [v]
|
||||
if (v != null && v != "") {
|
||||
params.declareMonth = [v];
|
||||
}
|
||||
getTableDatas(params)
|
||||
getTableDatas(params);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -111,40 +111,39 @@ export default class OtherDeduct extends React.Component {
|
|||
|
||||
<div className="searchConditionItem">
|
||||
<span className="conditionFormLabel">个税扣缴义务人:</span>
|
||||
{
|
||||
this.state.inited && <WeaSelect
|
||||
{this.state.inited &&
|
||||
<WeaSelect
|
||||
showSearch // 设置select可搜索
|
||||
style={{ width: 200 }}
|
||||
options={optionAddAll(taxAgentOption)}
|
||||
value={taxAgentId}
|
||||
onChange={v => {
|
||||
let params = {}
|
||||
if(v == "All") {
|
||||
params.taxAgentId = ""
|
||||
let params = {};
|
||||
if (v == "All") {
|
||||
params.taxAgentId = "";
|
||||
} else {
|
||||
params.taxAgentId = v
|
||||
params.taxAgentId = v;
|
||||
}
|
||||
if(monthValue != null && monthValue != "") {
|
||||
params.declareMonth = [monthValue]
|
||||
if (monthValue != null && monthValue != "") {
|
||||
params.declareMonth = [monthValue];
|
||||
}
|
||||
getTableDatas(params)
|
||||
this.setState({taxAgentId: v})
|
||||
getTableDatas(params);
|
||||
this.setState({ taxAgentId: v });
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
onEdit = (record) => {
|
||||
onEdit = record => {
|
||||
const {
|
||||
otherDeductStore: {
|
||||
slideVisiable,
|
||||
setSlideVisiable,
|
||||
getOtherDeductDetailList,
|
||||
setCurrentRecord,
|
||||
},
|
||||
setCurrentRecord
|
||||
}
|
||||
} = this.props;
|
||||
setSlideVisiable(true);
|
||||
setCurrentRecord(record);
|
||||
|
|
@ -152,9 +151,9 @@ export default class OtherDeduct extends React.Component {
|
|||
};
|
||||
|
||||
// 增加编辑功能,重写columns绑定事件
|
||||
getColumns = (columns) => {
|
||||
getColumns = columns => {
|
||||
let newColumns = "";
|
||||
newColumns = columns.map((column) => {
|
||||
newColumns = columns.map(column => {
|
||||
let newColumn = column;
|
||||
newColumn.render = (text, record, index) => {
|
||||
//前端元素转义
|
||||
|
|
@ -207,9 +206,7 @@ export default class OtherDeduct extends React.Component {
|
|||
|
||||
renderFormComponent() {
|
||||
const { modalParam } = this.state;
|
||||
const {
|
||||
taxAgentStore: { taxAgentOption },
|
||||
} = this.props;
|
||||
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||
return (
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
|
|
@ -221,9 +218,8 @@ export default class OtherDeduct extends React.Component {
|
|||
<WeaDatePicker
|
||||
format="yyyy-MM"
|
||||
value={modalParam.declareMonth}
|
||||
onChange={(value) =>
|
||||
this.setState({ modalParam: { declareMonth: value } })
|
||||
}
|
||||
onChange={value =>
|
||||
this.setState({ modalParam: { declareMonth: value } })}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
|
@ -231,9 +227,7 @@ export default class OtherDeduct extends React.Component {
|
|||
}
|
||||
|
||||
showColumn = () => {
|
||||
const {
|
||||
otherDeductStore: { tableStore },
|
||||
} = this.props;
|
||||
const { otherDeductStore: { tableStore } } = this.props;
|
||||
tableStore.setColSetVisible(true);
|
||||
tableStore.tableColSet(true);
|
||||
};
|
||||
|
|
@ -241,29 +235,29 @@ export default class OtherDeduct extends React.Component {
|
|||
// 初始化导入参数
|
||||
handleInitImport() {
|
||||
const {
|
||||
otherDeductStore: { setSlideDataSource, setImportResult },
|
||||
otherDeductStore: { setSlideDataSource, setImportResult }
|
||||
} = this.props;
|
||||
setSlideDataSource([]);
|
||||
setImportResult({});
|
||||
}
|
||||
|
||||
onSelectChange = (val) => {
|
||||
onSelectChange = val => {
|
||||
this.setState({
|
||||
selectedKey: val,
|
||||
selectedKey: val
|
||||
});
|
||||
};
|
||||
|
||||
handleSearch() {
|
||||
const { otherDeductStore:{getTableDatas} } = this.props;
|
||||
const { otherDeductStore: { getTableDatas } } = this.props;
|
||||
const { monthValue, taxAgentId } = this.state;
|
||||
let params = {}
|
||||
if(monthValue != null && monthValue !== "") {
|
||||
params.declareMonth = [monthValue]
|
||||
let params = {};
|
||||
if (monthValue != null && monthValue !== "") {
|
||||
params.declareMonth = [monthValue];
|
||||
}
|
||||
if(taxAgentId != null && taxAgentId !== "" && taxAgentId !== "All") {
|
||||
params.taxAgentId = taxAgentId
|
||||
if (taxAgentId != null && taxAgentId !== "" && taxAgentId !== "All") {
|
||||
params.taxAgentId = taxAgentId;
|
||||
}
|
||||
getTableDatas(params)
|
||||
getTableDatas(params);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
@ -282,7 +276,7 @@ export default class OtherDeduct extends React.Component {
|
|||
doSearch,
|
||||
setShowSearchAd,
|
||||
previewImport,
|
||||
importFile,
|
||||
importFile
|
||||
} = otherDeductStore;
|
||||
const { taxAgentOption, showOperateBtn } = taxAgentStore;
|
||||
const {
|
||||
|
|
@ -295,7 +289,7 @@ export default class OtherDeduct extends React.Component {
|
|||
setStep,
|
||||
slideDataSource,
|
||||
importResult,
|
||||
setPageObj,
|
||||
setPageObj
|
||||
} = otherDeductStore;
|
||||
const selectedRowKeys = toJS(tableStore.selectedRowKeys) || [];
|
||||
const { modalParam, monthValue, taxAgentId } = this.state;
|
||||
|
|
@ -321,7 +315,7 @@ export default class OtherDeduct extends React.Component {
|
|||
favouritetype: 1,
|
||||
objid: 0,
|
||||
link: "wui/index.html#/ns_demo03/index",
|
||||
importantlevel: 1,
|
||||
importantlevel: 1
|
||||
};
|
||||
const adBtn = [
|
||||
// 高级搜索内部按钮
|
||||
|
|
@ -333,37 +327,52 @@ export default class OtherDeduct extends React.Component {
|
|||
</Button>,
|
||||
<Button type="ghost" onClick={() => setShowSearchAd(false)}>
|
||||
取消
|
||||
</Button>,
|
||||
</Button>
|
||||
];
|
||||
|
||||
const topTab = [];
|
||||
|
||||
const renderSearchOperationItem = () => {
|
||||
return <div></div>;
|
||||
return <div />;
|
||||
};
|
||||
|
||||
const handleButtonClick = () => {
|
||||
const {
|
||||
otherDeductStore: { exportOtherDeductList },
|
||||
} = this.props;
|
||||
exportOtherDeductList();
|
||||
// const { otherDeductStore: { exportOtherDeductList } } = this.props;
|
||||
// exportOtherDeductList();
|
||||
const { selectedKey } = this.state;
|
||||
const url = `${window.location
|
||||
.origin}/api/bs/hrmsalary/otherDeduction/export?ids=${selectedKey.join(
|
||||
","
|
||||
)}&declareMonth=${this.state.monthValue}&taxAgentId=${this.state
|
||||
.taxAgentId == "All"
|
||||
? ""
|
||||
: this.state.taxAgentId}`;
|
||||
window.open(url, "_self");
|
||||
};
|
||||
|
||||
const handleMenuClick = () => {
|
||||
if (selectedRowKeys.length == 0) {
|
||||
const { selectedKey } = this.state;
|
||||
if (_.isEmpty(selectedKey)) {
|
||||
message.warning("未选择条目");
|
||||
return;
|
||||
}
|
||||
const {
|
||||
otherDeductStore: { exportOtherDeductList },
|
||||
} = this.props;
|
||||
exportOtherDeductList(selectedRowKeys.join(","));
|
||||
|
||||
const url = `${window.location
|
||||
.origin}/api/bs/hrmsalary/otherDeduction/export?ids=${selectedKey.join(
|
||||
","
|
||||
)}&declareMonth=${this.state.monthValue}&taxAgentId=${this.state
|
||||
.taxAgentId == "All"
|
||||
? ""
|
||||
: this.state.taxAgentId}`;
|
||||
window.open(url, "_self");
|
||||
// const {
|
||||
// otherDeductStore: { exportOtherDeductList },
|
||||
// } = this.props;
|
||||
// exportOtherDeductList(selectedKey.join(","));
|
||||
};
|
||||
|
||||
const handleBtnImport = () => {
|
||||
const {
|
||||
otherDeductStore: { setModalVisiable, setStep },
|
||||
} = this.props;
|
||||
const { otherDeductStore: { setModalVisiable, setStep } } = this.props;
|
||||
setStep(0);
|
||||
setModalVisiable(true);
|
||||
};
|
||||
|
|
@ -385,12 +394,12 @@ export default class OtherDeduct extends React.Component {
|
|||
}
|
||||
type="ghost">
|
||||
导出全部
|
||||
</Dropdown.Button>,
|
||||
</Dropdown.Button>
|
||||
];
|
||||
|
||||
const handleExportAllDetailClick = () => {
|
||||
const {
|
||||
otherDeductStore: { exportOtherDeductDetailList, currentRecord },
|
||||
otherDeductStore: { exportOtherDeductDetailList, currentRecord }
|
||||
} = this.props;
|
||||
exportOtherDeductDetailList(currentRecord.id);
|
||||
};
|
||||
|
|
@ -401,7 +410,7 @@ export default class OtherDeduct extends React.Component {
|
|||
return;
|
||||
}
|
||||
const {
|
||||
otherDeductStore: { exportOtherDeductDetailList, currentRecord },
|
||||
otherDeductStore: { exportOtherDeductDetailList, currentRecord }
|
||||
} = this.props;
|
||||
exportOtherDeductDetailList(
|
||||
currentRecord.id,
|
||||
|
|
@ -426,11 +435,11 @@ export default class OtherDeduct extends React.Component {
|
|||
|
||||
const rowSelection = {
|
||||
selectedRowKeys: this.state.selectedKey,
|
||||
onChange: this.onSelectChange,
|
||||
onChange: this.onSelectChange
|
||||
};
|
||||
const pagination = {
|
||||
total: pageObj.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
showTotal: total => `共 ${total} 条`,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange(current, pageSize) {
|
||||
|
|
@ -438,8 +447,8 @@ export default class OtherDeduct extends React.Component {
|
|||
getTableDatas({
|
||||
current,
|
||||
pageSize,
|
||||
taxAgentIdL:taxAgentId==='All' ? '' : taxAgentId,
|
||||
declareMonth: monthValue && [monthValue],
|
||||
taxAgentIdL: taxAgentId === "All" ? "" : taxAgentId,
|
||||
declareMonth: monthValue && [monthValue]
|
||||
});
|
||||
},
|
||||
onChange(current) {
|
||||
|
|
@ -447,44 +456,42 @@ export default class OtherDeduct extends React.Component {
|
|||
getTableDatas({
|
||||
current,
|
||||
pageSize: pageObj.pageSize,
|
||||
taxAgentId:taxAgentId==='All' ? '' : taxAgentId,
|
||||
declareMonth: monthValue && [monthValue],
|
||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId,
|
||||
declareMonth: monthValue && [monthValue]
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
const newColumns = _.map([...columns], (item) => {
|
||||
const newColumns = _.map([...columns], item => {
|
||||
if (item.dataIndex === "username") {
|
||||
return {
|
||||
...item,
|
||||
width: 100,
|
||||
fixed: "left",
|
||||
render: (text, record) => (
|
||||
render: (text, record) =>
|
||||
<div className="linkWapper">
|
||||
<a href="javaScript:void(0);" onClick={() => this.onEdit(record)}>
|
||||
{text}
|
||||
</a>
|
||||
</div>
|
||||
),
|
||||
};
|
||||
} else if (item.dataIndex === "taxAgentName") {
|
||||
return {
|
||||
...item,
|
||||
width: 180,
|
||||
fixed: "left",
|
||||
fixed: "left"
|
||||
};
|
||||
} else if (item.dataIndex === "operate") {
|
||||
return {
|
||||
...item,
|
||||
width: 100,
|
||||
fixed: "right",
|
||||
render: (text, record) => (
|
||||
render: (text, record) =>
|
||||
<div className="linkWapper">
|
||||
<a href="javaScript:void(0);" onClick={() => this.onEdit(record)}>
|
||||
查看明细
|
||||
</a>
|
||||
</div>
|
||||
),
|
||||
};
|
||||
} else {
|
||||
return { ...item };
|
||||
|
|
@ -493,9 +500,7 @@ export default class OtherDeduct extends React.Component {
|
|||
|
||||
return (
|
||||
<div className="cumDeductWrapper">
|
||||
<WeaRightMenu
|
||||
datas={rightMenu} // 右键菜单
|
||||
>
|
||||
<WeaRightMenu datas={rightMenu}>
|
||||
<WeaTop
|
||||
title="其他免税扣除" // 文字
|
||||
icon={<i className="icon-coms-meeting" />} // 左侧图标
|
||||
|
|
@ -508,12 +513,12 @@ export default class OtherDeduct extends React.Component {
|
|||
<WeaTab
|
||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
||||
setShowSearchAd={(bool) => setShowSearchAd(bool)} //高级搜索面板受控
|
||||
setShowSearchAd={bool => setShowSearchAd(bool)} //高级搜索面板受控
|
||||
searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据
|
||||
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||
onSearch={() => this.handleSearch()} // 点搜索按钮时的回调
|
||||
searchsAdQuick={this.getSearchsAdQuick()}
|
||||
onSearchChange={(v) => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
|
||||
onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
|
||||
searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -528,7 +533,7 @@ export default class OtherDeduct extends React.Component {
|
|||
/>
|
||||
</WeaTop>
|
||||
</WeaRightMenu>
|
||||
{modalVisiable && (
|
||||
{modalVisiable &&
|
||||
<ImportModal
|
||||
init={() => {
|
||||
this.handleInitImport();
|
||||
|
|
@ -545,10 +550,10 @@ export default class OtherDeduct extends React.Component {
|
|||
}}
|
||||
importResult={importResult}
|
||||
slideDataSource={slideDataSource}
|
||||
previewImport={(params) => {
|
||||
previewImport={params => {
|
||||
previewImport(params);
|
||||
}}
|
||||
importFile={(params) => {
|
||||
importFile={params => {
|
||||
importFile(params);
|
||||
}}
|
||||
renderFormComponent={() => this.renderFormComponent()}
|
||||
|
|
@ -556,9 +561,8 @@ export default class OtherDeduct extends React.Component {
|
|||
onCancel={() => {
|
||||
this.handleCancel();
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{slideVisiable && (
|
||||
/>}
|
||||
{slideVisiable &&
|
||||
<WeaSlideModal
|
||||
visible={slideVisiable}
|
||||
top={0}
|
||||
|
|
@ -581,16 +585,14 @@ export default class OtherDeduct extends React.Component {
|
|||
content={
|
||||
<EditSlideContent
|
||||
slideSelectedKey={slideSelectedKey}
|
||||
onChangeSlideSelectKey={(val) =>
|
||||
this.setState({ slideSelectedKey: val })
|
||||
}
|
||||
onChangeSlideSelectKey={val =>
|
||||
this.setState({ slideSelectedKey: val })}
|
||||
/>
|
||||
}
|
||||
onClose={() => setSlideVisiable(false)}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => setSlideVisiable(false)}
|
||||
/>
|
||||
)}
|
||||
/>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,86 +1,110 @@
|
|||
import React from 'react'
|
||||
import { Row, Col, Switch, Select } from 'antd'
|
||||
import { WeaInput, WeaSelect } from 'ecCom'
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import RequiredLabelTip from '../../../components/requiredLabelTip';
|
||||
import "./index.less"
|
||||
const { Option } = Select
|
||||
import React from "react";
|
||||
import { Row, Col, Switch, Select } from "antd";
|
||||
import { WeaInput, WeaSelect } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import RequiredLabelTip from "../../../components/requiredLabelTip";
|
||||
import "./index.less";
|
||||
const { Option } = Select;
|
||||
|
||||
@inject('payrollStore')
|
||||
@inject("payrollStore")
|
||||
@observer
|
||||
export default class BaseInformForm extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
inited: false,
|
||||
options: [],
|
||||
request: {}
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
inited: false,
|
||||
options: [],
|
||||
request: {}
|
||||
};
|
||||
}
|
||||
componentWillMount() {
|
||||
const { payrollStore } = this.props;
|
||||
const { getPayrollBaseForm } = payrollStore;
|
||||
getPayrollBaseForm(this.props.id).then(data => {
|
||||
this.setState(
|
||||
{
|
||||
options: data.salarySobOptions,
|
||||
request: data.templateBaseData
|
||||
},
|
||||
() => {
|
||||
this.setState({
|
||||
inited: true
|
||||
});
|
||||
}
|
||||
}
|
||||
componentWillMount() {
|
||||
const { payrollStore} = this.props;
|
||||
const { getPayrollBaseForm} = payrollStore
|
||||
getPayrollBaseForm(this.props.id).then(data => {
|
||||
this.setState({
|
||||
options: data.salarySobOptions,
|
||||
request: data.templateBaseData
|
||||
}, () => {
|
||||
this.setState({
|
||||
inited: true,
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
hanldeChange(params) {
|
||||
let request = {...this.state.request, ...params};
|
||||
this.setState({
|
||||
request
|
||||
})
|
||||
this.props.onChange && this.props.onChange(request)
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
const { request } = this.state;
|
||||
const { salarySob, salarySobOption, name,
|
||||
description, emailStatus, sendEmail,
|
||||
sendEmailOptions, msgStatus } = request;
|
||||
return (
|
||||
<div className="baseInformForm">
|
||||
<div className="formItemWrapper">
|
||||
<div className="itemTitle">基础信息</div>
|
||||
<div className="formWrapper">
|
||||
<Row className="formItem">
|
||||
<Col span={8}>薪资账套<RequiredLabelTip /></Col>
|
||||
<Col span={16}>
|
||||
hanldeChange(params) {
|
||||
let request = { ...this.state.request, ...params };
|
||||
this.setState({
|
||||
request
|
||||
});
|
||||
this.props.onChange && this.props.onChange(request);
|
||||
}
|
||||
|
||||
{
|
||||
this.state.inited && this.state.options.length > 0 && <Select
|
||||
defaultValue={salarySob ? salarySob : ""} value={salarySob ? salarySob : ""} style={{ width: "200px" }} onChange={(value) => this.hanldeChange({salarySob: value})}>
|
||||
{this.state.options.map(item => (
|
||||
<Option value={item.key} key={item.key}>{item.showname}</Option>
|
||||
))}
|
||||
</Select>
|
||||
}
|
||||
</Col>
|
||||
</Row>
|
||||
<Row className="formItem">
|
||||
<Col span={8}>工资单模板名称<RequiredLabelTip /></Col>
|
||||
<Col span={16}>
|
||||
<WeaInput value={name} onChange={(value) => this.hanldeChange({name: value})}/>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row className="formItem">
|
||||
<Col span={8}>备注</Col>
|
||||
<Col span={16}>
|
||||
<WeaInput value={description} onChange={(value) => this.hanldeChange({description: value})}/>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</div>
|
||||
{/* 发送位置先隐藏 */}
|
||||
{/* <div className="formItemWrapper">
|
||||
render() {
|
||||
const { request } = this.state;
|
||||
const {
|
||||
salarySob,
|
||||
salarySobOption,
|
||||
name,
|
||||
description,
|
||||
emailStatus,
|
||||
sendEmail,
|
||||
sendEmailOptions,
|
||||
msgStatus
|
||||
} = request;
|
||||
return (
|
||||
<div className="baseInformForm">
|
||||
<div className="formItemWrapper">
|
||||
<div className="itemTitle">基础信息</div>
|
||||
<div className="formWrapper">
|
||||
<Row className="formItem">
|
||||
<Col span={8}>
|
||||
薪资账套<RequiredLabelTip />
|
||||
</Col>
|
||||
<Col span={16}>
|
||||
{this.state.inited &&
|
||||
<Select
|
||||
defaultValue={salarySob ? salarySob : ""}
|
||||
value={salarySob ? salarySob : ""}
|
||||
style={{ width: "200px" }}
|
||||
className="wea-select"
|
||||
notFoundContent="暂无数据"
|
||||
onChange={value => this.hanldeChange({ salarySob: value })}>
|
||||
{this.state.options.map(item =>
|
||||
<Option value={item.key} key={item.key}>
|
||||
{item.showname}
|
||||
</Option>
|
||||
)}
|
||||
</Select>}
|
||||
</Col>
|
||||
</Row>
|
||||
<Row className="formItem">
|
||||
<Col span={8}>
|
||||
工资单模板名称<RequiredLabelTip />
|
||||
</Col>
|
||||
<Col span={16}>
|
||||
<WeaInput
|
||||
value={name}
|
||||
onChange={value => this.hanldeChange({ name: value })}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row className="formItem">
|
||||
<Col span={8}>备注</Col>
|
||||
<Col span={16}>
|
||||
<WeaInput
|
||||
value={description}
|
||||
onChange={value => this.hanldeChange({ description: value })}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</div>
|
||||
{/* 发送位置先隐藏 */}
|
||||
{/* <div className="formItemWrapper">
|
||||
<span className="itemTitle">发送位置</span>
|
||||
<div className="formWrapper">
|
||||
<Row className="formItem">
|
||||
|
|
@ -113,7 +137,7 @@ export default class BaseInformForm extends React.Component {
|
|||
</Row>
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ export default class StandingBook extends React.Component {
|
|||
value: "",
|
||||
selectedKey: "0",
|
||||
tableParams: {
|
||||
startTime: moment(new Date()).subtract(3,'months').startOf('month').format('YYYY-MM'),
|
||||
endTime: moment(new Date()).subtract(-3,'months').startOf('month').format('YYYY-MM')
|
||||
startTime: moment(new Date()).subtract(5,'months').startOf('month').format('YYYY-MM'),
|
||||
endTime: moment(new Date()).startOf('month').format('YYYY-MM')
|
||||
},
|
||||
current: 1,
|
||||
dialogProps: {
|
||||
|
|
@ -115,6 +115,7 @@ export default class StandingBook extends React.Component {
|
|||
title: "操作",
|
||||
dataIndex: "action",
|
||||
key: "action",
|
||||
fixed: 'right',
|
||||
render: (text, r) => {
|
||||
const { billStatus, billMonth } = r;
|
||||
return (
|
||||
|
|
@ -450,6 +451,7 @@ export default class StandingBook extends React.Component {
|
|||
loading={loading}
|
||||
columns={_.filter(columns, (it) => it.dataIndex !== "id").map(item => {
|
||||
item.width = "150px"
|
||||
if(item.dataIndex ==='billMonth') item.fixed= 'left';
|
||||
return item
|
||||
})}
|
||||
dataSource={list}
|
||||
|
|
|
|||
Loading…
Reference in New Issue