Merge branch 'release' into release-zhongjiang

This commit is contained in:
liyongshun 2022-06-28 18:08:26 +08:00
commit bac1e217a2
27 changed files with 1231 additions and 866 deletions

View File

@ -78,11 +78,19 @@ export const getAttendanceDetail = (params) => {
//数据采集-考勤引用-删除考勤数据
export const deleteAttendance = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/attendQuote/delete",
"POST",
params
);
return fetch("/api/bs/hrmsalary/attendQuote/delete", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
// return WeaTools.callApi(
// "/api/bs/hrmsalary/attendQuote/delete",
// "POST",
// params
// );
};
//数据采集-考勤引用-导出考勤数据

View File

@ -45,8 +45,8 @@ export default class ImportModal extends React.Component {
try {
params && Object.keys(params).forEach((key) => {
if(!params[key] || params[key] == "") {
message.warning("参数不完整");
throw new Error("参数不完整")
message.warning("请选择税款所属期");
throw new Error("请选择税款所属期")
}
})
} catch(e) {

View File

@ -85,7 +85,7 @@ export default class ModalStep1 extends React.Component {
<div className="stepInformItem">
<div className="stepInformTitle" style={{ margin: "10px 0 10px 0" }}>
导入excel
导入Excel
</div>
<div>
<Dragger {...dragger} fileList={this.state.fileList}>

View File

@ -148,13 +148,19 @@ export default class Calculate extends React.Component {
// 获取列表
getColumns() {
const { calculateStore: { salaryListColumns }, taxAgentStore: { showOperateBtn } } = this.props;
const {
calculateStore: { salaryListColumns },
taxAgentStore: { showOperateBtn }
} = this.props;
let columns = [...salaryListColumns];
columns.map(item => {
if (item.title == "操作" && showOperateBtn ) {
if (item.title == "操作" && showOperateBtn) {
item.render = (text, record) => {
const accountBtn = _.filter(record.operate, it => it.text == "核算");
const notAccountBtn = _.filter(record.operate, it => it.text != "核算");
const accountBtn = _.filter(
record.operate,
it => it.text == "核算" || it.text == "重新核算"
);
const notAccountBtn = _.filter(record.operate, it => it.text != "核算" && it.text != "重新核算");
let operateBtn = [];
if (!_.isEmpty(accountBtn)) {
operateBtn.push(
@ -167,8 +173,10 @@ export default class Calculate extends React.Component {
<a
href="javascript:void(0);"
onClick={() => {
if (it.text == "核算") {
this.handleAccount(record);
if (it.text == "核算" || it.text == "重新核算") {
it.text == "核算"
? this.handleAccount(record)
: this.handleReaccount(record);
}
}}>
{it.text}
@ -205,7 +213,10 @@ export default class Calculate extends React.Component {
)}
</Menu>
}>
<i className="icon-coms-more" style={{ color: "#4d7ad8", cursor: "pointer" }}/>
<i
className="icon-coms-more"
style={{ color: "#4d7ad8", cursor: "pointer" }}
/>
</Dropdown>
);
}
@ -303,8 +314,7 @@ export default class Calculate extends React.Component {
const { startDate, endDate } = this.state;
return (
<div style={{ display: "inline-block" }}>
{
showOperateBtn &&
{showOperateBtn &&
<Button
type="primary"
style={{ marginRight: "10px" }}
@ -313,8 +323,7 @@ export default class Calculate extends React.Component {
this.setState({ baseFormVisible: true });
}}>
核算
</Button>
}
</Button>}
<div
style={{ display: "inline-block", position: "relative", top: 2 }}>
<RangePicker

View File

@ -1,6 +1,6 @@
import React from 'react'
import CustomTab from '../../components/customTab'
import { Dropdown, Menu, Button, Table } from 'antd'
import { Dropdown, Menu, Button, Table, message } from 'antd'
import { WeaHelpfulTip, WeaInputSearch, WeaSlideModal, WeaTable } from 'ecCom'
import { placeOnFileColumns, dataSource } from './columns'
import SlideModalTitle from "../../components/slideModalTitle"
@ -83,7 +83,7 @@ export default class PlaceOnFileDetail extends React.Component {
handleSearch(value){
const { calculateStore: {acctResultList}} = this.props;
acctResultList(this.id, value, this.pageInfo.current, this.pageInfo)
acctResultList(this.id, value, 1, this.pageInfo)
}
// 分页

File diff suppressed because it is too large Load Diff

View File

@ -351,9 +351,7 @@ export default class CumDeduct extends React.Component {
// 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
.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=&declareMonth=${this.state.monthValue}&taxAgentId=${this.state
.taxAgentId == "All"
? ""
: this.state.taxAgentId}`;

View File

@ -11,7 +11,7 @@ import {
Modal,
message,
Row,
Col,
Col
} from "antd";
import {
@ -23,7 +23,7 @@ import {
WeaSelect,
WeaHelpfulTip,
WeaSlideModal,
WeaTable,
WeaTable
} from "ecCom";
import moment from "moment";
@ -52,11 +52,11 @@ export default class CumSituation extends React.Component {
slideSelectedKey: [], //详情表格的选中项
visiable: false,
inited: false,
monthValue: moment(new Date()).format("YYYY-MM"),
monthValue: moment(new Date()).format("YYYY"),
taxAgentId: "All",
modalParam: {
taxYearMonth: "",
},
taxYearMonth: ""
}
};
}
@ -64,12 +64,12 @@ export default class CumSituation extends React.Component {
// 初始化渲染页面
const {
cumSituationStore: { doInit },
taxAgentStore: { fetchTaxAgentOption },
taxAgentStore: { fetchTaxAgentOption }
} = this.props;
doInit({taxYearMonth: [this.state.monthValue], taxAgentId: ""});
doInit({ year: this.state.monthValue, taxAgentId: "" });
fetchTaxAgentOption().then(() => {
this.setState({
inited: true,
inited: true
});
});
}
@ -78,35 +78,35 @@ export default class CumSituation extends React.Component {
const { monthValue, taxAgentId } = this.state;
const {
taxAgentStore: { taxAgentOption },
cumSituationStore: { form, getTableDatas },
cumSituationStore: { form, getTableDatas }
} = this.props;
return (
<div className="searchConditionWrapper">
<div className="searchConditionItem">
<span className="conditionFormLabel">申报月份:</span>
<span className="conditionFormLabel">纳税年度:</span>
<WeaDatePicker
value={monthValue}
format="YYYY-MM"
format="YYYY"
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.taxYearMonth = [v]
if (v != null && v != "") {
params.year = v;
}
getTableDatas(params)
getTableDatas(params);
}}
/>
</div>
<div className="helperWrapper">
<WeaHelpfulTip
title="<div>提示:默认显示本年截至当前月所有员工申报的累计专项附加及其他扣除额</div>"
title="<div>提示:默认显示本年截至上次所有员工的累计收入及各项累计扣除额、已预扣税额,与本月应发和各项应扣除项一起计算出本月应缴纳税额</div>"
placement="bottom"
width={200}
/>
@ -114,38 +114,34 @@ export default class CumSituation 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.taxYearMonth = [monthValue]
if (monthValue != null && monthValue != "") {
params.year = monthValue;
}
getTableDatas(params)
this.setState({taxAgentId: v})
getTableDatas(params);
this.setState({ taxAgentId: v });
}}
/>
}
/>}
</div>
</div>
)
);
}
renderFormComponent() {
const { modalParam } = this.state;
const {
taxAgentStore: { taxAgentOption },
} = this.props;
const { taxAgentStore: { taxAgentOption } } = this.props;
return (
<Row>
<Col span={12}>
@ -157,23 +153,22 @@ export default class CumSituation extends React.Component {
<WeaDatePicker
format="yyyy-MM"
value={modalParam.taxYearMonth}
onChange={(value) =>
this.setState({ modalParam: { taxYearMonth: value } })
}
onChange={value =>
this.setState({ modalParam: { taxYearMonth: value } })}
/>
</Col>
</Row>
);
}
onEdit = (record) => {
onEdit = record => {
const {
cumSituationStore: {
slideVisiable,
setSlideVisiable,
getCumDeductDetailList,
setCurrentRecord,
},
setCurrentRecord
}
} = this.props;
setSlideVisiable(true);
setCurrentRecord(record);
@ -181,12 +176,12 @@ export default class CumSituation extends React.Component {
};
// 增加编辑功能重写columns绑定事件
getColumns = (columns) => {
getColumns = columns => {
let newColumns = [];
if (!columns) {
return [];
}
newColumns = columns.map((column) => {
newColumns = columns.map(column => {
let newColumn = column;
newColumn.render = (text, record, index) => {
//前端元素转义
@ -229,7 +224,6 @@ export default class CumSituation extends React.Component {
setStep(0);
}
onOperatesClick = (record, index, operate, flag) => {
switch (operate.index.toString()) {
case "0": // 查看明细
@ -239,9 +233,7 @@ export default class CumSituation extends React.Component {
};
showColumn = () => {
const {
cumSituationStore: { tableStore },
} = this.props;
const { cumSituationStore: { tableStore } } = this.props;
tableStore.setColSetVisible(true);
tableStore.tableColSet(true);
};
@ -249,34 +241,35 @@ export default class CumSituation extends React.Component {
// 导入参数初始化
handleInitImport = () => {
const {
cumSituationStore: { setSlideDataSource, setImportResult },
cumSituationStore: { setSlideDataSource, setImportResult }
} = this.props;
setSlideDataSource([]);
setImportResult({});
};
onSelectChange = (val) => {
onSelectChange = val => {
this.setState({
selectedKey: val,
selectedKey: val
});
};
// 搜索
handleSearch() {
const { cumSituationStore:{getTableDatas} } = this.props;
const { cumSituationStore: { getTableDatas } } = this.props;
const { monthValue, taxAgentId } = this.state;
let params = {}
if(monthValue != null && monthValue !== "") {
params.taxYearMonth = [monthValue]
let params = {};
if (monthValue != null && monthValue !== "") {
params.year = monthValue;
}
if(taxAgentId != null && taxAgentId !== "" && taxAgentId !== "All") {
params.taxAgentId = taxAgentId
if (taxAgentId != null && taxAgentId !== "" && taxAgentId !== "All") {
params.taxAgentId = taxAgentId;
}
getTableDatas(params)
getTableDatas(params);
}
render() {
const { cumSituationStore, taxAgentStore, slideSelectedKey } = this.props;
const { cumSituationStore, taxAgentStore } = this.props;
const { slideSelectedKey } = this.state;
const {
loading,
dataSource,
@ -291,7 +284,7 @@ export default class CumSituation extends React.Component {
doSearch,
setShowSearchAd,
previewImport,
importFile,
importFile
} = cumSituationStore;
const { taxAgentOption, showOperateBtn } = taxAgentStore;
const {
@ -304,7 +297,7 @@ export default class CumSituation extends React.Component {
setStep,
slideDataSource,
importResult,
setPageObj,
setPageObj
} = cumSituationStore;
const selectedRowKeys = toJS(tableStore.selectedRowKeys) || [];
const { modalParam, monthValue, taxAgentId } = this.state;
@ -329,7 +322,7 @@ export default class CumSituation extends React.Component {
favouritetype: 1,
objid: 0,
link: "wui/index.html#/ns_demo03/index",
importantlevel: 1,
importantlevel: 1
};
const adBtn = [
// 高级搜索内部按钮
@ -341,13 +334,13 @@ export default class CumSituation extends React.Component {
</Button>,
<Button type="ghost" onClick={() => setShowSearchAd(false)}>
取消
</Button>,
</Button>
];
const topTab = [];
const renderSearchOperationItem = () => {
return <div></div>;
return <div />;
};
const handleButtonClick = () => {
@ -357,10 +350,8 @@ export default class CumSituation extends React.Component {
// 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"
.origin}/api/bs/hrmsalary/addUpSituation/export?ids=&year=${this
.state.monthValue}&taxAgentId=${this.state.taxAgentId == "All"
? ""
: this.state.taxAgentId}`;
window.open(url, "_self");
@ -375,7 +366,7 @@ export default class CumSituation extends React.Component {
const url = `${window.location
.origin}/api/bs/hrmsalary/addUpSituation/export?ids=${selectedKey.join(
","
)}&declareMonth=${this.state.monthValue}&taxAgentId=${this.state
)}&year=${this.state.monthValue}&taxAgentId=${this.state
.taxAgentId == "All"
? ""
: this.state.taxAgentId}`;
@ -387,9 +378,7 @@ export default class CumSituation extends React.Component {
};
const handleBtnImport = () => {
const {
cumSituationStore: { setModalVisiable, setStep },
} = this.props;
const { cumSituationStore: { setModalVisiable, setStep } } = this.props;
setStep(0);
setModalVisiable(true);
};
@ -411,12 +400,12 @@ export default class CumSituation extends React.Component {
}
type="ghost">
导出全部
</Dropdown.Button>,
</Dropdown.Button>
];
const handleExportAllDetailClick = () => {
const {
cumSituationStore: { exportCumSituationDetailList, currentRecord },
cumSituationStore: { exportCumSituationDetailList, currentRecord }
} = this.props;
exportCumSituationDetailList(currentRecord.id);
};
@ -427,7 +416,7 @@ export default class CumSituation extends React.Component {
return;
}
const {
cumSituationStore: { exportCumSituationDetailList, currentRecord },
cumSituationStore: { exportCumSituationDetailList, currentRecord }
} = this.props;
exportCumSituationDetailList(
currentRecord.id,
@ -452,7 +441,7 @@ export default class CumSituation extends React.Component {
const pagination = {
total: pageObj.total,
showTotal: (total) => `${total}`,
showTotal: total => `${total}`,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange(current, pageSize) {
@ -460,8 +449,8 @@ export default class CumSituation extends React.Component {
getTableDatas({
current,
pageSize,
taxAgentId:taxAgentId==='All' ? '' : taxAgentId,
declareMonth: monthValue && [monthValue],
taxAgentId: taxAgentId === "All" ? "" : taxAgentId,
year: monthValue
});
},
onChange(current) {
@ -469,47 +458,45 @@ export default class CumSituation extends React.Component {
getTableDatas({
current,
pageSize: pageObj.pageSize,
taxAgentId:taxAgentId==='All' ? '' : taxAgentId,
declareMonth: monthValue && [monthValue],
taxAgentId: taxAgentId === "All" ? "" : taxAgentId,
year: monthValue
});
},
}
};
const rowSelection = {
selectedRowKeys: this.state.selectedKey,
onChange: this.onSelectChange,
onChange: this.onSelectChange
};
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, width: 150 };
@ -518,9 +505,7 @@ export default class CumSituation extends React.Component {
return (
<div className="cumDeductWrapper">
<WeaRightMenu
datas={rightMenu} // 右键菜单
>
<WeaRightMenu datas={rightMenu}>
<WeaTop
title="往期累计情况(工资、薪金)" // 文字
icon={<i className="icon-coms-meeting" />} // 左侧图标
@ -533,7 +518,7 @@ export default class CumSituation 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()} // 点搜索按钮时的回调
@ -553,7 +538,7 @@ export default class CumSituation extends React.Component {
/>
</WeaTop>
</WeaRightMenu>
{modalVisiable && (
{modalVisiable &&
<ImportModal
init={() => {
this.handleInitImport();
@ -570,10 +555,10 @@ export default class CumSituation extends React.Component {
}}
slideDataSource={slideDataSource}
importResult={importResult}
previewImport={(params) => {
previewImport={params => {
previewImport(params);
}}
importFile={(params) => {
importFile={params => {
importFile(params);
}}
renderFormComponent={() => this.renderFormComponent()}
@ -581,9 +566,8 @@ export default class CumSituation extends React.Component {
onCancel={() => {
this.handleCancel();
}}
/>
)}
{slideVisiable && (
/>}
{slideVisiable &&
<WeaSlideModal
visible={slideVisiable}
top={0}
@ -606,16 +590,14 @@ export default class CumSituation 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>
);
}

View File

@ -261,7 +261,7 @@ export default class OtherDeduct extends React.Component {
}
render() {
const { otherDeductStore, taxAgentStore, slideSelectedKey } = this.props;
const { otherDeductStore, taxAgentStore } = this.props;
const {
loading,
dataSource,
@ -292,7 +292,7 @@ export default class OtherDeduct extends React.Component {
setPageObj
} = otherDeductStore;
const selectedRowKeys = toJS(tableStore.selectedRowKeys) || [];
const { modalParam, monthValue, taxAgentId } = this.state;
const { modalParam, monthValue, taxAgentId, slideSelectedKey } = this.state;
const detailSelectedRowKeys = toJS(slideTableStore.selectedRowKeys) || [];
if (!hasRight && !loading) {
@ -341,10 +341,8 @@ export default class OtherDeduct extends React.Component {
// 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"
.origin}/api/bs/hrmsalary/otherDeduction/export?ids=&declareMonth=${this
.state.monthValue}&taxAgentId=${this.state.taxAgentId == "All"
? ""
: this.state.taxAgentId}`;
window.open(url, "_self");

View File

@ -151,8 +151,8 @@ export default class PayrollGrant extends React.Component {
<Menu onClick={handleMenuClick}>
<Menu.Item key="1">批量发放</Menu.Item>
<Menu.Item key="2">批量撤回</Menu.Item>
<Menu.Item key="3">全部导出</Menu.Item>
<Menu.Item key="3">导出选中</Menu.Item>
{/* <Menu.Item key="3"></Menu.Item>
<Menu.Item key="3">导出选中</Menu.Item> */}
{/* <Menu.Item key="3">自定义列</Menu.Item> */}
</Menu>
);

View File

@ -153,6 +153,7 @@ export default class payrollGrantModal extends React.Component {
<Modal
width={800}
visible={this.props.visible}
footer={[]}
onCancel={() => {
this.props.onCancel();
}}>

View File

@ -154,6 +154,7 @@ export default class PayrollWithdrawModal extends React.Component {
<Modal
width={800}
visible={this.props.visible}
footer={[]}
onCancel={() => {
this.props.onCancel();
}}>

View File

@ -87,7 +87,8 @@ export default class AccumulationFundForm extends React.Component {
<Row>
<Col span={6} className="formItem">公积金方案名称</Col>
<Col span={6} className="formItem">
<Select defaultValue={data && data.fundSchemeId} value={data && data.fundSchemeId} style={{ width: "100%" }} onChange={(value) => {
<Select defaultValue={data && data.fundSchemeId}
notFoundContent="暂无数据" value={data && data.fundSchemeId} style={{ width: "100%" }} onChange={(value) => {
this.handleFormChange({fundSchemeId: value})
this.handleFetchPaymentForm(value);
}}>
@ -114,7 +115,8 @@ export default class AccumulationFundForm extends React.Component {
<Row>
<Col span={6} className="formItem">公积金缴纳组织</Col>
<Col span={6} className="formItem">
<Select defaultValue={data && data.paymentOrganization} value={data && data.paymentOrganization} style={{ width: "100%" }} onChange={(value) => this.handleFormChange({paymentOrganization: value})}>
<Select defaultValue={data && data.paymentOrganization}
notFoundContent="暂无数据" value={data && data.paymentOrganization} style={{ width: "100%" }} onChange={(value) => this.handleFormChange({paymentOrganization: value})}>
{
items && items[0].items &&items[0].items[1] && items[0].items[1].options.map(item => (
<Option value={item.key}>{item.showname}</Option>
@ -124,7 +126,8 @@ export default class AccumulationFundForm extends React.Component {
</Col>
<Col span={6} className="formItem">公积金个人实际承担方</Col>
<Col span={6} className="formItem">
<Select defaultValue={data && data.underTake} value={data && data.underTake} style={{ width: "100%" }} onChange={(value) => {
<Select defaultValue={data && data.underTake}
notFoundContent="暂无数据" value={data && data.underTake} style={{ width: "100%" }} onChange={(value) => {
this.handleFormChange({underTake: value})
}}>
{

View File

@ -19,20 +19,20 @@ export default class BaseForm extends React.Component {
<div className="socialFormWrapper">
<GroupCard title="基本信息" >
<Row>
<Col span={4} className="formItem">姓名</Col>
<Col span={4} className="formItem">姓名:</Col>
<Col span={4} className="formItem">{baseFormData.username}</Col>
<Col span={4} className="formItem">部门</Col>
<Col span={4} className="formItem">部门:</Col>
<Col span={4} className="formItem">{baseFormData.department}</Col>
<Col span={4} className="formItem">岗位</Col>
<Col span={4} className="formItem">岗位:</Col>
<Col span={4} className="formItem">{baseFormData.position}</Col>
</Row>
<Row>
<Col span={4} className="formItem">入职日期</Col>
<Col span={4} className="formItem">入职日期:</Col>
<Col span={4} className="formItem">{baseFormData.hiredate}</Col>
<Col span={4} className="formItem">手机号</Col>
<Col span={4} className="formItem">手机号:</Col>
<Col span={4} className="formItem">{baseFormData.telephone}</Col>
<Col span={4} className="formItem">离职时间</Col>
<Col span={4} className="formItem">离职时间:</Col>
<Col span={4} className="formItem">{baseFormData.dimissionDate}</Col>
</Row>
</GroupCard>

View File

@ -154,7 +154,7 @@ export default class Archives extends React.Component {
handleSearch() {
const { archivesStore: {getTableDatas}} = this.props;
getTableDatas(this.pageInfo)
getTableDatas({...this.pageInfo, current: 1})
}
render() {

View File

@ -7,5 +7,7 @@
text-overflow: ellipsis;
padding-left: 10px;
padding-right: 10px;
border: 1px solid #e2e2e2;
margin-bottom: 0!important;
}
}

View File

@ -92,7 +92,8 @@ export default class OtherForm extends React.Component {
<Row>
<Col span={6} className="formItem">其他福利方案名称</Col>
<Col span={6} className="formItem">
<Select defaultValue={data && data.otherName} value={data && data.otherName} style={{ width: "100%" }} onChange={(value) => {
<Select defaultValue={data && data.otherName}
notFoundContent="暂无数据" value={data && data.otherName} style={{ width: "100%" }} onChange={(value) => {
this.handleFormChange({otherName: value})
this.handleFetchPaymentForm(value);
}}>
@ -107,7 +108,8 @@ export default class OtherForm extends React.Component {
<Row>
<Col span={6} className="formItem">社保缴纳组织</Col>
<Col span={6} className="formItem">
<Select defaultValue={data && data.paymentOrganization} value={data && data.paymentOrganization} style={{ width: "100%" }} onChange={(value) => this.handleFormChange({paymentOrganization: value})}>
<Select defaultValue={data && data.paymentOrganization}
notFoundContent="暂无数据" value={data && data.paymentOrganization} style={{ width: "100%" }} onChange={(value) => this.handleFormChange({paymentOrganization: value})}>
{
items && items[0].items &&items[0].items[1] && items[0].items[1].options.map(item => (
<Option value={item.key}>{item.showname}</Option>

View File

@ -88,7 +88,8 @@ export default class SocialSecurityForm extends React.Component {
<Row>
<Col span={6} className="formItem">社保方案名称</Col>
<Col span={6} className="formItem">
<Select defaultValue={data && data.socialName} value={data && data.socialName} style={{ width: "100%" }} onChange={(value) => {
<Select defaultValue={data && data.socialName}
notFoundContent="暂无数据" value={data && data.socialName} style={{ width: "100%" }} onChange={(value) => {
this.handleFormChange({socialName: value})
this.handleFetchPaymentForm(value)
}}>
@ -118,7 +119,8 @@ export default class SocialSecurityForm extends React.Component {
</Col>
<Col span={6} className="formItem">社保个人实际承担方</Col>
<Col span={6} className="formItem">
<Select defaultValue={data && data.underTake} value={data && data.underTake} style={{ width: "100%" }} onChange={
<Select defaultValue={data && data.underTake}
notFoundContent="暂无数据" value={data && data.underTake} style={{ width: "100%" }} onChange={
(value) => {
this.handleFormChange({underTake: value})
this.handleFetchPaymentForm(value)

View File

@ -51,7 +51,7 @@ export default class DefaultSlideForm extends React.Component {
return (
<WeaSelect
options={options}
value={text}
value={String(text)}
onChange={v => {
this.updateDataSource(record, v, "validNum");
}}

View File

@ -2,7 +2,7 @@
* Author: 黎永顺
* Description: 核算弹框
* Date: 2022-04-21 15:16:18
* LastEditTime: 2022-04-21 16:54:59
* LastEditTime: 2022-06-28 15:52:31
*/
import React, { Component } from "react";
import { Button, Form, Input } from "antd";
@ -17,7 +17,7 @@ class Accountdialog extends Component {
this.state = {};
}
handleSubmit = (e) => {
handleSubmit = e => {
const { onOk } = this.props;
e.preventDefault();
this.props.form.validateFields((errors, values) => {
@ -31,7 +31,7 @@ class Accountdialog extends Component {
const { getFieldProps } = this.props.form;
const formItemLayout = {
labelCol: { span: 7 },
wrapperCol: { span: 12 },
wrapperCol: { span: 12 }
};
return (
<WeaDialog
@ -43,7 +43,7 @@ class Accountdialog extends Component {
onClick={this.handleSubmit}
loading={this.props.loading}>
保存并进入核算
</Button>,
</Button>
]}>
<Form horizontal form={this.props.form} style={{ marginTop: 16 }}>
<FormItem {...formItemLayout} label="账单月份" required>
@ -52,22 +52,23 @@ class Accountdialog extends Component {
format="YYYY-MM"
{...getFieldProps("billMonth", {
initialValue: new Date(),
rules: [{ required: true, message: "请选择日期" }],
rules: [{ required: true, message: "请选择日期" }]
})}
/>
</FormItem>
{
this.props.isAdmin && <FormItem {...formItemLayout} label="个税扣缴义务人">
<WeaSelect
style={{ width: "100%" }}
options={this.props.options}
{...getFieldProps("paymentOrganization", {
initialValue: "",
rules: [{ required: true, message: "请选择个税扣缴义务人" }],
})}
/>
</FormItem>
}
{/* {
this.props.isAdmin && */}
<FormItem {...formItemLayout} label="个税扣缴义务人">
<WeaSelect
style={{ width: "100%" }}
options={this.props.options}
{...getFieldProps("paymentOrganization", {
initialValue: "",
rules: [{ required: true, message: "请选择个税扣缴义务人" }]
})}
/>
</FormItem>
{/* } */}
<FormItem {...formItemLayout} label="备注">
<Input
type="textarea"

View File

@ -59,11 +59,11 @@ export default class StandingBook extends React.Component {
componentDidMount() {
const { current, dialogProps } = this.state;
const { taxAgentStore: {getPermission}, standingBookStore: {getAdminTaxAgentList}} = this.props
const { taxAgentStore: {getPermission, fetchTaxAgentOption}, standingBookStore: {getAdminTaxAgentList}} = this.props
getPermission().then(({status, data}) => {
if(status) {
this.setState({adminData : data})
if(data.isAdminEnable) {
if(data.isOpenDevolution) {
getAdminTaxAgentList().then((data) => {
let taxAgentList = data.map(item => {
let result = {}
@ -78,6 +78,20 @@ export default class StandingBook extends React.Component {
isAdmin: true
}})
})
}else{
fetchTaxAgentOption().then(({data}) => {
let taxAgentList = data.map(item => {
let result = {}
result.showname = item.content
result.key = item.id + ""
result.selected = false
return result
})
this.setState({dialogProps: {
...dialogProps,
options: taxAgentList,
}})
})
}
this.getCommonList({ ...this.state.tableParams, current });
}

View File

@ -2,14 +2,21 @@
* Author: 黎永顺
* Description: 正常缴纳月份
* Date: 2022-04-20 08:56:08
* LastEditTime: 2022-05-09 15:05:57
* LastEditTime: 2022-06-28 18:04:37
*/
import React, { Component } from "react";
import { Icon, Tooltip, Button, message, Modal, Spin } from "antd";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { WeaBrowser, WeaTable, WeaPopoverHrm, WeaDialog, WeaInputSearch } from "ecCom";
import {
WeaBrowser,
WeaTable,
WeaPopoverHrm,
WeaDialog,
WeaInputSearch
} from "ecCom";
import { getSearchs } from "../../../../util";
import { getQueryString } from "../../../../util/url";
import _ from "lodash";
import "./index.less";
@ -24,12 +31,12 @@ export default class NormalIndex extends Component {
selectedRowKeys: [],
addProps: {
title: "",
visible: false,
visible: false
},
tableData: {
list: [],
columns: [],
total: 0,
total: 0
},
searchValue: ""
};
@ -49,49 +56,70 @@ export default class NormalIndex extends Component {
const { current } = this.state;
nextProps.selectedKey === "1"
? this.getNormalList({ billMonth, current, paymentOrganization })
: this.getSupplementaryList({ billMonth, current, paymentOrganization });
: this.getSupplementaryList({
billMonth,
current,
paymentOrganization
});
}
}
handleSearch(value) {
const { billMonth, selectedKey, paymentOrganization } = this.props;
const { current } = this.state;
selectedKey === "1"
? this.getNormalList({ billMonth, current, paymentOrganization, userName:value })
: this.getSupplementaryList({ billMonth, current, paymentOrganization, userName:value });
? this.getNormalList({
billMonth,
current: 1,
paymentOrganization,
userName: value
})
: this.getSupplementaryList({
billMonth,
current: 1,
paymentOrganization,
userName: value
});
}
handleSave = () => {
const { siaccountCommonSave, siaccountSupplementarySave, form } =
this.props.standingBookStore;
const {
siaccountCommonSave,
siaccountSupplementarySave,
form
} = this.props.standingBookStore;
const { billMonth, selectedKey, paymentOrganization } = this.props;
if (selectedKey === "1") {
const { includes, excludes } = form.getFormParams();
const payload = {
billMonth,
includes: includes.split(","),
excludes: _.isEmpty(excludes) ? excludes.split(",") : [],
excludes: _.isEmpty(excludes) ? excludes.split(",") : []
};
siaccountCommonSave(payload).then(() => {
message.success("添加成功");
this.getNormalList({ billMonth, paymentOrganization, current: this.state.current });
this.getNormalList({
billMonth,
paymentOrganization,
current: this.state.current
});
this.setState({
addProps: {
...this.state.addProps,
title: "",
visible: false,
},
visible: false
}
});
});
} else {
form.validateForm().then((f) => {
const paymentOrganization = getQueryString("paymentOrganization");
form.validateForm().then(f => {
if (f.isValid) {
const {
includes,
billMonth: billMonthList,
excludes,
projects,
projects
} = form.getFormParams();
const payload = {
billMonth,
@ -99,20 +127,26 @@ export default class NormalIndex extends Component {
includes: includes.split(","),
// excludes: excludes.split(","),
projects: projects.split(","),
paymentOrganization
};
siaccountSupplementarySave(payload).then(() => {
message.success("添加成功");
this.getSupplementaryList({
billMonth,
current: this.state.current,
current: this.state.current
});
this.setState({
addProps: {
...this.state.addProps,
title: "",
visible: false,
this.setState(
{
addProps: {
...this.state.addProps,
title: "",
visible: false
}
},
});
() => {
form.resetForm();
}
);
});
} else {
f.showErrors();
@ -125,81 +159,77 @@ export default class NormalIndex extends Component {
getNormalList = (payload = {}) => {
const { getNormalList } = this.props.standingBookStore;
getNormalList({ ...payload }).then(({ list, columns = [], total }) => {
columns = _.map(
_.filter(columns, (it) => it.dataIndex !== "id"),
(it) => {
if (it.dataIndex === "employeeId") {
it = {
...it,
width: 150,
fixed: "left",
render: (text, r) => {
const { userName, employeeId } = r;
return (
<span>{userName}</span>
);
},
};
it.title = "姓名"
}
return {
columns = _.map(_.filter(columns, it => it.dataIndex !== "id"), it => {
if (it.dataIndex === "employeeId") {
it = {
...it,
title: <span dangerouslySetInnerHTML={{ __html: it.title }}></span>,
width: 150,
fixed: "left",
render: (text, r) => {
const { userName, employeeId } = r;
return (
<span>
{userName}
</span>
);
}
};
it.title = "姓名";
}
);
return {
...it,
title: <span dangerouslySetInnerHTML={{ __html: it.title }} />,
width: 150
};
});
this.setState({
tableData: {
list,
columns,
total,
},
total
}
});
});
};
getSupplementaryList = (payload = {}) => {
const { getSupplementaryList } = this.props.standingBookStore;
getSupplementaryList({ ...payload }).then(
({ list, columns = [], total }) => {
columns = _.map(
_.filter(columns, (it) => it.dataIndex !== "id"),
(it) => {
if (it.dataIndex === "employeeId") {
it = {
...it,
width: 150,
fixed: "left",
render: (text, r) => {
const { userName, employeeId } = r;
return (
<span>{userName}</span>
);
},
};
it.title = "姓名"
getSupplementaryList({
...payload
}).then(({ list, columns = [], total }) => {
columns = _.map(_.filter(columns, it => it.dataIndex !== "id"), it => {
if (it.dataIndex === "employeeId") {
it = {
...it,
width: 150,
fixed: "left",
render: (text, r) => {
const { userName, employeeId } = r;
return (
<span>
{userName}
</span>
);
}
return {
...it,
title: (
<span dangerouslySetInnerHTML={{ __html: it.title }}></span>
),
width: 150,
};
}
);
this.setState({
tableData: {
list,
columns,
total,
},
});
}
);
};
it.title = "姓名";
}
return {
...it,
title: <span dangerouslySetInnerHTML={{ __html: it.title }} />,
width: 150
};
});
this.setState({
tableData: {
list,
columns,
total
}
});
});
};
onSelectChange = (selectedRowKeys) => {
onSelectChange = selectedRowKeys => {
this.setState({ selectedRowKeys });
};
handleBatchDelete = () => {
@ -211,8 +241,8 @@ export default class NormalIndex extends Component {
message.warning("未勾选数据!");
} else {
const includes = _.map(
_.filter(list, (it) => selectedRowKeys.includes(it.id)),
(item) => item.employeeId
_.filter(list, it => selectedRowKeys.includes(it.id)),
item => item.employeeId
);
Modal.confirm({
title: "确认信息",
@ -222,7 +252,11 @@ export default class NormalIndex extends Component {
message.success("删除成功");
this.setState({ selectedRowKeys: [] });
selectedKey === "1"
? this.getNormalList({ billMonth, paymentOrganization, current: this.state.current })
? this.getNormalList({
billMonth,
paymentOrganization,
current: this.state.current
})
: this.getSupplementaryList({
billMonth,
current: this.state.current,
@ -230,13 +264,15 @@ export default class NormalIndex extends Component {
});
});
},
onCancel: () => {},
onCancel: () => {}
});
}
};
handleAdd = () => {
const { siaccountCommonForm, querySupplementaryForm } =
this.props.standingBookStore;
const {
siaccountCommonForm,
querySupplementaryForm
} = this.props.standingBookStore;
const { billMonth, selectedKey } = this.props;
if (selectedKey === "1") {
siaccountCommonForm();
@ -247,86 +283,98 @@ export default class NormalIndex extends Component {
addProps: {
...this.state.addProps,
title: "添加缴纳人员",
visible: true,
},
visible: true
}
});
};
// 核算按钮点击
handleCommonAccountClick() {
const { remarks, billMonth, selectedKey, paymentOrganization } = this.props;
const { commonAccount } =
this.props.standingBookStore;
const { commonAccount } = this.props.standingBookStore;
commonAccount({
billMonth, includes: []
billMonth,
includes: []
}).then(() => {
selectedKey === "1"
? this.getNormalList({ billMonth, paymentOrganization, current: this.state.current })
: this.getSupplementaryList({ billMonth, paymentOrganization, current: this.state.current });
})
? this.getNormalList({
billMonth,
paymentOrganization,
current: this.state.current
})
: this.getSupplementaryList({
billMonth,
paymentOrganization,
current: this.state.current
});
});
}
render() {
const { remarks, billMonth, selectedKey } = this.props;
const { selectedRowKeys, addProps, date } = this.state;
const { loading, form, condition, saveLoading } =
this.props.standingBookStore;
const {
loading,
form,
condition,
saveLoading
} = this.props.standingBookStore;
let { list, columns, total } = this.state.tableData;
const rowSelection = {
selectedRowKeys,
onChange: this.onSelectChange,
onChange: this.onSelectChange
};
const pagination = {
total,
current: this.state.current,
showTotal: (total) => `${total}`,
onChange: (current) => {
showTotal: total => `${total}`,
onChange: current => {
this.setState({ current });
selectedKey === "1"
? this.getNormalList({ billMonth, current })
: this.getSupplementaryList({
billMonth,
current,
current
});
},
}
};
return (
<div className="normalWapper">
{selectedKey === "1" && (
{selectedKey === "1" &&
<div className="topContent">
<div className="month">
<span>
账单月份
<Tooltip
placement="topLeft"
title="提示:正常缴纳,账单月份即社保福利缴纳月份">
<Tooltip placement="topLeft" title="提示:正常缴纳,账单月份即社保福利缴纳月份">
<Icon type="question-circle" />
</Tooltip>
</span>
<span>{billMonth}</span>
<span>
{billMonth}
</span>
</div>
<div>
<span>备注</span>
<span>{remarks}</span>
<span>
{remarks}
</span>
</div>
</div>
)}
</div>}
<div className="tabOption">
{
this.props.type !== "detail" && this.props.selectedKey == "3" ?
<span>
<Tooltip title="批量删除">
<i
className="icon-coms-Batch-delete"
onClick={this.handleBatchDelete}
/>
</Tooltip>
<Tooltip title="添加该月正常缴纳人员">
<i className="icon-coms-Add-to" onClick={this.handleAdd} />
</Tooltip>
</span> : <span></span>
}
{addProps.visible && (
{this.props.type !== "detail" && this.props.selectedKey == "3"
? <span>
<Tooltip title="批量删除">
<i
className="icon-coms-Batch-delete"
onClick={this.handleBatchDelete}
/>
</Tooltip>
<Tooltip title="添加该月正常缴纳人员">
<i className="icon-coms-Add-to" onClick={this.handleAdd} />
</Tooltip>
</span>
: <span />}
{addProps.visible &&
<WeaDialog
{...addProps}
onCancel={() =>
@ -334,10 +382,9 @@ export default class NormalIndex extends Component {
addProps: {
...addProps,
title: "",
visible: false,
},
})
}
visible: false
}
})}
buttons={[
<Button
type="primary"
@ -345,11 +392,10 @@ export default class NormalIndex extends Component {
loading={saveLoading}>
保存
</Button>,
<Button onClick={() => form.resetForm()}>重置</Button>,
<Button onClick={() => form.resetForm()}>重置</Button>
]}>
{getSearchs(form, toJS(condition), 1)}
</WeaDialog>
)}
</WeaDialog>}
{/* {selectedKey === "3" && (
<Tooltip title="导入">
<i className="icon-coms02-Import" />
@ -359,8 +405,16 @@ export default class NormalIndex extends Component {
<i className="icon-coms02-coms2-export" />
</Tooltip> */}
{/* {selectedKey === "1" && this.props.type !== "detail" && <Button type="primary" onClick={() => {this.handleCommonAccountClick()}}>核算</Button>} */}
<WeaInputSearch value={this.state.searchValue} onChange={(value) => {this.setState({searchValue: value})}} onSearch={(value) => {this.handleSearch(value)}}/>
<WeaInputSearch
value={this.state.searchValue}
onChange={value => {
this.setState({ searchValue: value });
}}
onSearch={value => {
this.handleSearch(value);
}}
/>
</div>
{/* table */}
<div style={{ padding: "0 16px" }}>
@ -372,7 +426,7 @@ export default class NormalIndex extends Component {
loading={loading}
pagination={pagination}
rowSelection={rowSelection}
scroll={{ x: 1200 }}
scroll={{ x: 1200, y: 300 }}
/>
</Spin>
</div>

View File

@ -2,7 +2,7 @@
* Author: 黎永顺
* Description: 个税扣缴义务人-人员范围
* Date: 2022-05-31 09:51:59
* LastEditTime: 2022-06-01 17:57:42
* LastEditTime: 2022-06-28 17:43:30
*/
import React, { Component } from "react";
import { message, Modal } from "antd";
@ -140,7 +140,7 @@ export default class PersonalScope extends Component {
const { taxAgentRangeSave } = this.props.taxAgentStore;
this.setState({ submitLoading: true });
taxAgentRangeSave({ ...module, taxAgentId }).then(
({ status, errorMsg }) => {
({ status, errormsg }) => {
this.setState({ submitLoading: false });
if (status) {
this.tagAgentRef.closeModal();
@ -155,7 +155,7 @@ export default class PersonalScope extends Component {
pageSize: pageObj.pageSize,
});
} else {
message.error(errorMsg || "新增失败");
message.error(errormsg || "新增失败");
}
}
);

View File

@ -10,7 +10,7 @@ export default class SlideTaxagentUser extends React.Component {
addTaxagentModalVisible: false,
includeType: 1,
selectedRowKeys: [],
searchValue: "",
searchValue: ""
};
}
@ -18,7 +18,7 @@ export default class SlideTaxagentUser extends React.Component {
const { onChangeTab } = this.props;
this.setState(
{
includeType,
includeType
},
() => {
onChangeTab && onChangeTab(includeType);
@ -26,7 +26,7 @@ export default class SlideTaxagentUser extends React.Component {
);
}
onSelectChange = (selectedRowKeys) => {
onSelectChange = selectedRowKeys => {
this.setState({ selectedRowKeys });
};
@ -40,18 +40,18 @@ export default class SlideTaxagentUser extends React.Component {
onDeleteTaxAgent({ ids: this.state.selectedRowKeys, tab: includeType });
};
handleSearch = (value) => {
handleSearch = value => {
const { includeType } = this.state;
const { onTaxAngetSearch } = this.props;
onTaxAngetSearch({
tab: includeType,
targetName: value,
targetName: value
});
};
closeModal = () => {
this.setState({
addTaxagentModalVisible: false,
addTaxagentModalVisible: false
});
};
@ -60,7 +60,7 @@ export default class SlideTaxagentUser extends React.Component {
includeType,
selectedRowKeys,
searchValue,
addTaxagentModalVisible,
addTaxagentModalVisible
} = this.state;
const {
submitLoading,
@ -71,16 +71,16 @@ export default class SlideTaxagentUser extends React.Component {
setPageObj,
employeeStatus,
targetTypeList,
onTaxAgentSave,
onTaxAgentSave
} = this.props;
const rowSelection = {
selectedRowKeys,
onChange: this.onSelectChange,
onChange: this.onSelectChange
};
const pagination = {
total: pageObj.total,
showTotal: (total) => `${total}`,
showTotal: total => `${total}`,
showSizeChanger: true,
onShowSizeChange: (current, pageSize) => {
setPageObj &&
@ -88,17 +88,17 @@ export default class SlideTaxagentUser extends React.Component {
current,
pageSize,
tab: includeType,
targetName: searchValue,
targetName: searchValue
});
},
onChange: (current) => {
onChange: current => {
setPageObj &&
setPageObj({
current,
tab: includeType,
targetName: searchValue,
targetName: searchValue
});
},
}
};
return (
@ -110,28 +110,26 @@ export default class SlideTaxagentUser extends React.Component {
paddingLeft: "10px",
paddingRight: "10px",
display: "flex",
justifyContent: "space-between",
justifyContent: "space-between"
}}>
<div
style={{
display: "inlineBlock",
color: "#666",
color: "#666"
}}>
<span
style={{
cursor: "pointer",
color: includeType == 1 ? "#4ba9f2" : "#000",
color: includeType == 1 ? "#4ba9f2" : "#000"
}}
onClick={() => {
this.handleTabClick(1);
}}>
关联人员范围
</span>{" "}
{" "} | {" "}{" "}
<span
人员范围
</span>|<span
style={{
cursor: "pointer",
color: includeType == 0 ? "#4ba9f2" : "#000",
color: includeType == 0 ? "#4ba9f2" : "#000"
}}
onClick={() => {
this.handleTabClick(0);
@ -144,7 +142,7 @@ export default class SlideTaxagentUser extends React.Component {
style={{
color: "#4ba9f2",
display: "inlineBlock",
float: "left",
float: "left"
}}>
<Icon
style={{ cursor: "pointer", marginRight: "10px" }}
@ -162,16 +160,16 @@ export default class SlideTaxagentUser extends React.Component {
<WeaInputSearch
style={{ marginTop: "8px", float: "right" }}
value={searchValue}
onChange={(value) => {
onChange={value => {
this.setState({ searchValue: value });
}}
onSearch={(value) => {
onSearch={value => {
this.handleSearch(value);
}}
/>
</div>
</div>
<div style={{height: "500px", scrollY: "scroll"}}>
<div style={{ height: "500px", scrollY: "scroll" }}>
<Table
rowKey="id"
loading={queryLoading}
@ -186,10 +184,9 @@ export default class SlideTaxagentUser extends React.Component {
loading={submitLoading}
employeeStatus={employeeStatus}
targetTypeList={targetTypeList}
onTaxAgentSave={(val) =>
onTaxAgentSave={val =>
onTaxAgentSave &&
onTaxAgentSave({ ...val, includeType: includeType })
}
onTaxAgentSave({ ...val, includeType: includeType })}
visible={addTaxagentModalVisible}
onCancel={() => {
this.setState({ addTaxagentModalVisible: false });

View File

@ -50,31 +50,31 @@ export class AttendanceStore {
// ** 设置导入参数 start **
@action
setPreviewAttendQuoteColumns = (previewAttendQuoteColumns) => {
setPreviewAttendQuoteColumns = previewAttendQuoteColumns => {
this.previewAttendQuoteColumns = previewAttendQuoteColumns;
};
@action
setPreviewAttendQuoteDataSource = (previewAttendQuoteDataSource) => {
setPreviewAttendQuoteDataSource = previewAttendQuoteDataSource => {
this.previewAttendQuoteDataSource = previewAttendQuoteDataSource;
};
@action
setImportResult = (importResult) => {
setImportResult = importResult => {
this.importResult = importResult;
};
// ** 设置导入参数 end **
@action
searchFieldSettingList = (value) => {
searchFieldSettingList = value => {
if (value != "") {
let requestFeildAttendList = [...this.requestFeildAttendList];
this.fieldSettingAttendList = requestFeildAttendList.filter(
(item) => item.name.indexOf(value) > -1
item => item.name.indexOf(value) > -1
);
let requestFeildCustomList = [...this.requestFeildCustomList];
this.fieldSettingCustomList = requestFeildCustomList.filter(
(item) => item.name.indexOf(value) > -1
item => item.name.indexOf(value) > -1
);
} else {
this.fieldSettingAttendList = [...this.requestFeildAttendList];
@ -83,11 +83,11 @@ export class AttendanceStore {
};
@action
setFieldSettingAttendList = (fieldSettingAttendList) => {
setFieldSettingAttendList = fieldSettingAttendList => {
this.fieldSettingAttendList = fieldSettingAttendList;
let requestFeildAttendList = [...this.requestFeildAttendList];
requestFeildAttendList.map((item) => {
this.fieldSettingAttendList.map((inner) => {
requestFeildAttendList.map(item => {
this.fieldSettingAttendList.map(inner => {
if (inner.id == item.id && inner.checked != item.checked) {
item.checked = inner.checked;
}
@ -97,11 +97,11 @@ export class AttendanceStore {
};
@action
setFieldSettingCustomList = (fieldSettingCustomList) => {
setFieldSettingCustomList = fieldSettingCustomList => {
this.fieldSettingCustomList = fieldSettingCustomList;
let requestFeildCustomList = [...this.requestFeildCustomList];
requestFeildCustomList.map((item) => {
this.fieldSettingCustomList.map((inner) => {
requestFeildCustomList.map(item => {
this.fieldSettingCustomList.map(inner => {
if (inner.id == item.id && inner.checked != item.checked) {
item.checked = inner.checked;
}
@ -109,21 +109,19 @@ export class AttendanceStore {
});
};
@action
setCurrentItem = (currentItem) => (this.currentItem = currentItem);
@action setCurrentItem = currentItem => (this.currentItem = currentItem);
@action
setCurrentItemOperate = (currentItemOperate) =>
setCurrentItemOperate = currentItemOperate =>
(this.currentItemOperate = currentItemOperate);
@action
setSlideVisiable = (slideVisiable) => (this.slideVisiable = slideVisiable);
setSlideVisiable = slideVisiable => (this.slideVisiable = slideVisiable);
@action setStep = step => (this.step = step);
@action
setStep = (step) => (this.step = step);
@action
setModalVisiable = (modalVisiable) => (this.modalVisiable = modalVisiable);
setModalVisiable = modalVisiable => (this.modalVisiable = modalVisiable);
// 初始化操作
@action
@ -138,7 +136,7 @@ export class AttendanceStore {
@action
getCondition = () => {
API.getCondition().then(
action((res) => {
action(res => {
if (res.api_status) {
// 接口请求成功/失败处理
this.condition = res.condition;
@ -152,12 +150,12 @@ export class AttendanceStore {
// 渲染table数据
@action
getTableDatas = (params) => {
getTableDatas = params => {
this.loading = true;
const formParams = this.form.getFormParams() || {};
params = params || formParams;
API.getTableDatas(params).then(
action((res) => {
action(res => {
if (res.api_status) {
// 接口请求成功/失败处理
this.tableStore.getDatas(res.datas); // table 请求数据
@ -170,19 +168,20 @@ export class AttendanceStore {
);
};
@action
setShowSearchAd = (bool) => (this.showSearchAd = bool);
@action setShowSearchAd = bool => (this.showSearchAd = bool);
// 高级搜索 - 搜索
@action doSearch = () => {
@action
doSearch = () => {
this.getTableDatas();
this.showSearchAd = false;
};
// 字段列表
@action getAttendanceFieldList = (params) => {
@action
getAttendanceFieldList = params => {
this.loading = true;
API.getAttendanceFieldList(params).then((res) => {
API.getAttendanceFieldList(params).then(res => {
if (res.status) {
// 接口请求成功/失败处理
this.fieldTableStore.getDatas(res.data.dataKey.datas); // table 请求数据
@ -195,8 +194,9 @@ export class AttendanceStore {
});
};
@action saveAttendanceField = (params) => {
API.saveAttendanceField(params).then((res) => {
@action
saveAttendanceField = params => {
API.saveAttendanceField(params).then(res => {
if (res.status) {
message.success("保存成功");
} else {
@ -205,8 +205,9 @@ export class AttendanceStore {
});
};
@action deleteAttendanceField = (params) => {
API.deleteAttendanceField(params).then((res) => {
@action
deleteAttendanceField = params => {
API.deleteAttendanceField(params).then(res => {
if (res.status) {
message.success("删除成功");
} else {
@ -223,7 +224,7 @@ export class AttendanceStore {
message.warning("未选择任何条目");
return;
}
API.deleteAttendanceField(this.tableStore.selectedRowKeys).then((res) => {
API.deleteAttendanceField(this.tableStore.selectedRowKeys).then(res => {
if (res.status) {
message.success("删除成功");
} else {
@ -234,8 +235,8 @@ export class AttendanceStore {
// 更新
@action
updateAttendanceField = (params) => {
API.updateAttendanceField(params).then((res) => {
updateAttendanceField = params => {
API.updateAttendanceField(params).then(res => {
if (res.status) {
message.success("修改成功");
} else {
@ -246,8 +247,8 @@ export class AttendanceStore {
// 更新状态
@action
updateAttendanceFieldStatus = (params) => {
return API.updateAttendanceFieldStatus(params).then((res) => {
updateAttendanceFieldStatus = params => {
return API.updateAttendanceFieldStatus(params).then(res => {
if (res.status) {
message.success("修改成功");
return new Promise((resolve, reject) => {
@ -264,9 +265,9 @@ export class AttendanceStore {
// 考勤数据列表
@action
getAttendanceList = (params) => {
getAttendanceList = params => {
this.loading = true;
API.getAttendanceList(params).then((res) => {
API.getAttendanceList(params).then(res => {
if (res.status) {
// 接口请求成功/失败处理
// this.attendTableStore.getDatas(res.data.datas); // table 请求数据
@ -279,12 +280,17 @@ export class AttendanceStore {
this.loading = false;
});
};
// 删除考勤列表数据
@action
deleteAttendance = params => {
return API.deleteAttendance(params);
};
//数据采集-考勤引用-考勤引用字段设置-列表
@action
getAttendanceFieldSettingList = (params) => {
getAttendanceFieldSettingList = params => {
this.loading = true;
API.getAttendanceFieldSettingList(params).then((res) => {
API.getAttendanceFieldSettingList(params).then(res => {
if (res.status) {
this.requestFeildAttendList = res.data[0] ? res.data[0].items : [];
this.fieldSettingAttendList = this.requestFeildAttendList;
@ -300,19 +306,19 @@ export class AttendanceStore {
//数据采集-考勤引用-考勤引用字段设置-保存
@action
saveAttendanceFieldSetting = (sourceType = "IMPORT") => {
let attendList = this.requestFeildAttendList.map((item) => ({
let attendList = this.requestFeildAttendList.map(item => ({
id: item.id,
checked: item.checked,
checked: item.checked
}));
let customList = this.requestFeildCustomList.map((item) => ({
let customList = this.requestFeildCustomList.map(item => ({
id: item.id,
checked: item.checked,
checked: item.checked
}));
let request = {
sourceType: sourceType,
currentSettingFields: [...attendList, ...customList],
currentSettingFields: [...attendList, ...customList]
};
API.saveAttendanceFieldSetting(request).then((res) => {
API.saveAttendanceFieldSetting(request).then(res => {
if (res.status) {
message.success("保存成功");
} else {
@ -324,36 +330,36 @@ export class AttendanceStore {
//数据采集-考勤引用-考勤引用字段设置-恢复默认设置
@action
returnToAttendanceFieldSettingDefault = (sourceType = "IMPORT") => {
API.returnToAttendanceFieldSettingDefault({ sourceType: sourceType }).then(
(res) => {
if (res.status) {
this.requestFeildAttendList = res.data[0] ? res.data[0].items : [];
this.fieldSettingAttendList = this.requestFeildAttendList;
this.requestFeildCustomList = res.data[1] ? res.data[1].items : [];
this.fieldSettingCustomList = this.requestFeildCustomList;
} else {
message.error(res.errormsg || "获取数据失败");
}
API.returnToAttendanceFieldSettingDefault({
sourceType: sourceType
}).then(res => {
if (res.status) {
this.requestFeildAttendList = res.data[0] ? res.data[0].items : [];
this.fieldSettingAttendList = this.requestFeildAttendList;
this.requestFeildCustomList = res.data[1] ? res.data[1].items : [];
this.fieldSettingCustomList = this.requestFeildCustomList;
} else {
message.error(res.errormsg || "获取数据失败");
}
);
});
};
//数据采集-考勤引用-考勤引用字段设置-设为默认设置
@action
saveAttendanceFieldSettingAsDefault = (sourceType = "IMPORT") => {
let attendList = this.requestFeildAttendList.map((item) => ({
let attendList = this.requestFeildAttendList.map(item => ({
id: item.id,
checked: item.checked,
checked: item.checked
}));
let customList = this.requestFeildCustomList.map((item) => ({
let customList = this.requestFeildCustomList.map(item => ({
id: item.id,
checked: item.checked,
checked: item.checked
}));
let request = {
sourceType: sourceType,
currentSettingFields: [...attendList, ...customList],
currentSettingFields: [...attendList, ...customList]
};
API.saveAttendanceFieldSettingAsDefault(request).then((res) => {
API.saveAttendanceFieldSettingAsDefault(request).then(res => {
if (res.status) {
message.success("设置成功");
} else {
@ -366,7 +372,7 @@ export class AttendanceStore {
@action
getLedgerList = () => {
return new Promise((resolve, reject) => {
API.getLedgerList({}).then((res) => {
API.getLedgerList({}).then(res => {
if (res.status) {
this.importLedgerList = res.data;
resolve(this.importLedgerList);
@ -386,8 +392,8 @@ export class AttendanceStore {
// 导入预览
@action
previewAttendQuote = (params) => {
API.previewAttendQuote(params).then((res) => {
previewAttendQuote = params => {
API.previewAttendQuote(params).then(res => {
if (res.status) {
this.previewAttendQuoteList = res.data;
this.previewAttendQuoteColumns = res.data.headers.map((item, index) => {
@ -398,7 +404,7 @@ export class AttendanceStore {
return column;
});
this.previewAttendQuoteDataSource = res.data.list.map((item) => {
this.previewAttendQuoteDataSource = res.data.list.map(item => {
let data = {};
item.map((i, index) => {
data[index + ""] = i;
@ -413,8 +419,8 @@ export class AttendanceStore {
// 考勤导入
@action
importAttendQuoteData = (params) => {
API.importAttendQuoteData(params).then((res) => {
importAttendQuoteData = params => {
API.importAttendQuoteData(params).then(res => {
if (res.status) {
this.importResult = res.data;
} else {
@ -426,7 +432,7 @@ export class AttendanceStore {
// 考勤数据详情
@action
viewAttendQuote = (params = {}) => {
API.viewAttendQuote(params).then((res) => {
API.viewAttendQuote(params).then(res => {
if (res.status) {
this.attendQuoteDetailPageInfo = res.data.pageInfo;
this.attendQuoteDetailTableStore.getDatas(res.data.dataKey.datas);
@ -438,9 +444,9 @@ export class AttendanceStore {
// 考勤引用同步
@action
syncAttendanceRefer = (params) => {
syncAttendanceRefer = params => {
return new Promise((resolve, reject) => {
API.syncAttendanceRefer(params).then((res) => {
API.syncAttendanceRefer(params).then(res => {
if (res.status) {
message.success("同步成功");
resolve();
@ -453,21 +459,22 @@ export class AttendanceStore {
};
// 考勤引用同步
@action
checkOperation = (params) => {
checkOperation = params => {
return API.checkOperation(params);
};
// 根据所属月和账套获取周期
@action
getSalaryCycleAndAttendCycle = (salaryYearMonthStr, salarySobId) => {
API.getSalaryCycleAndAttendCycle({ salaryYearMonthStr, salarySobId }).then(
(res) => {
if (res.status) {
this.cycle = res.data;
} else {
message.error(res.errormsg || "获取失败");
}
API.getSalaryCycleAndAttendCycle({
salaryYearMonthStr,
salarySobId
}).then(res => {
if (res.status) {
this.cycle = res.data;
} else {
message.error(res.errormsg || "获取失败");
}
);
});
};
}

View File

@ -75,8 +75,8 @@ export class CumSituationStore {
// 初始化操作
@action
doInit = (params = {}) => {
this.getCondition();
doInit = async (params = {}) => {
await this.getCondition();
this.getTableDatas(params);
};

View File

@ -167,7 +167,7 @@ export class TaxAgentStore {
this.taxAgentOption = res.data.map(item => {
return { key: item.id, showname: item.content };
});
resolve();
resolve(res);
} else {
message.error(res.errormsg || "获取失败");
reject();