Merge branch 'develop' into feature/V2-dev合并多语言
# Conflicts: # pc4mobx/hrmSalary/pages/calculateDetail/index.js # pc4mobx/hrmSalary/pages/calculateDetail/userSure.js # pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js # pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js # pc4mobx/hrmSalary/pages/mobilePayroll/index.js # pc4mobx/hrmSalary/pages/payroll/index.js # pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js # pc4mobx/hrmSalary/pages/payrollFiles/index.js # pc4mobx/hrmSalary/pages/ruleConfig/index.js # pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js # pc4mobx/hrmSalary/pages/salaryItem/columns.js # pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js # pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js # pc4mobx/hrmSalary/pages/taxAgent/personalScope.js # pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js
This commit is contained in:
commit
8bac520ff0
|
|
@ -568,3 +568,20 @@ export const cacheImportField = (params) => {
|
|||
export const salaryacctAcctresultCheckAuth = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/acctresult/checkAuth", "GET", params);
|
||||
};
|
||||
|
||||
//薪资核算-导出核算结果前生成可选的薪资项目
|
||||
export const getExportField = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/acctresult/exportField", "GET", params);
|
||||
};
|
||||
|
||||
//薪资核算-导出薪资核算添加表头字段缓存
|
||||
export const customCacheExportField = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheExportField", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
import { postFetch } from "../util/request";
|
||||
import { WeaTools } from "ecCom";
|
||||
|
||||
//非系统人员-保存
|
||||
export const save = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/extEmp/save", params);
|
||||
};
|
||||
|
||||
//非系统人员-修改
|
||||
export const update = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/extEmp/update", params);
|
||||
};
|
||||
|
||||
//非系统人员-列表
|
||||
export const listPage = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/extEmp/listPage", params);
|
||||
};
|
||||
|
||||
//非系统人员-删除
|
||||
export const deleteExtEmp = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/extEmp/delete", params);
|
||||
};
|
||||
|
||||
//非系统人员-详情
|
||||
export const detail = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/extEmp/detail", "get", params);
|
||||
};
|
||||
|
|
@ -71,6 +71,17 @@ export const saveLedgerBasic = params => {
|
|||
}).then(res => res.json());
|
||||
};
|
||||
|
||||
//薪资帐套外部人员范围(包含)列表
|
||||
export const getLedgerPersonRangeExtList = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/range/ext/list", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
//薪资帐套人员范围(包含)列表
|
||||
export const getLedgerPersonRangeInclude = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/range/listInclude", {
|
||||
|
|
@ -104,6 +115,28 @@ export const getLedgerPersonRangeForm = params => {
|
|||
);
|
||||
};
|
||||
|
||||
//保存薪资帐套外部人员范围
|
||||
export const saveLedgerPersonExtRange = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/ext/save", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
//删除薪资帐套外部人员范围
|
||||
export const deleteLedgerPersonExtRange = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/range/ext/delete", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
//保存薪资帐套人员范围
|
||||
export const saveLedgerPersonRange = params => {
|
||||
return fetch("/api/bs/hrmsalary/salarysob/range/save", {
|
||||
|
|
|
|||
|
|
@ -31,6 +31,15 @@ export const mySalaryBill = params => {
|
|||
export const isNeedSecondPwdVerify = params => {
|
||||
return WeaTools.callApi("/api/encrypt/secondauthsetting/isNeedSecondAuth", "POST", params);
|
||||
};
|
||||
export const getSecondAuthForm = params => {
|
||||
return WeaTools.callApi("/api/encrypt/secondauthsetting/getSecondAuthForm", "POST", params);
|
||||
};
|
||||
export const doSecondAuth = params => {
|
||||
return WeaTools.callApi("/api/encrypt/secondauthsetting/doSecondAuth", "POST", params);
|
||||
};
|
||||
export const checkPassword = params => {
|
||||
return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params);
|
||||
};
|
||||
export const saveSecondaryPwd = params => {
|
||||
return WeaTools.callApi("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -375,6 +375,14 @@ export const sendMobileCode = (params) => {
|
|||
export const payrollCheckType = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params);
|
||||
};
|
||||
//工资单-反馈验证
|
||||
export const feedBackSalaryBill = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/feedBackSalaryBill", "GET", params);
|
||||
};
|
||||
//工资单-确认
|
||||
export const confirmSalaryBill = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", params);
|
||||
};
|
||||
|
||||
// 工资单基础设置-获取设置列表
|
||||
export const getSalaryBillBaseSetForm = (id) => {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@ export const commonEnumList = (params) => {
|
|||
return WeaTools.callApi("/api/bs/hrmsalary/common/enum/list", "GET", params);
|
||||
};
|
||||
|
||||
export const sysinfo = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/sys/info", "GET", params);
|
||||
};
|
||||
|
||||
export const sysOrderRule = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/sys/orderRule", "GET", params);
|
||||
};
|
||||
|
|
@ -47,6 +51,10 @@ export const operateTaxDeclarationFunction = (params) => {
|
|||
export const saveArchiveDelete = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/sys/saveArchiveDelete", params);
|
||||
};
|
||||
//保存系统规则开关
|
||||
export const saveSysOperate = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/sys/operate", params);
|
||||
};
|
||||
//保存个税申报撤回规则
|
||||
export const saveWithDrawTaxDeclaration = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/sys/saveWithDrawTaxDeclaration", params);
|
||||
|
|
@ -63,3 +71,7 @@ export const reportStatisticsReportSave = (params) => {
|
|||
export const reportGetForm = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/report/getForm", "GET", params);
|
||||
};
|
||||
//工资单反馈
|
||||
export const saveSalarySendFeedback = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/sys/saveSalarySendFeedback", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -70,6 +70,18 @@ export const deleteTaxAgent = (params) => {
|
|||
export const taxAgentRangeSave = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxAgent/range/save", params);
|
||||
};
|
||||
//非系统人员范围查询
|
||||
export const taxAgentRangelistExt = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxAgent/range/listExt", params);
|
||||
};
|
||||
//非系统人员范围删除
|
||||
export const taxAgentRangeExtDelete = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxAgent/range/ext/delete", params);
|
||||
};
|
||||
//非系统人员范围保存
|
||||
export const taxAgentRangeExtSave = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxAgent/range/ext/save", params);
|
||||
};
|
||||
//人员范围删除
|
||||
export const taxAgentRangeDelete = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxAgent/range/delete", params);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 外部人员添加弹框
|
||||
* Description:
|
||||
* Date: 2023/3/14
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup } from "ecCom";
|
||||
import { Button, Modal } from "antd";
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
targetIds: "",
|
||||
targetNames: ""
|
||||
};
|
||||
}
|
||||
|
||||
handleExternalPersonSave = () => {
|
||||
const { targetIds } = this.state;
|
||||
const { onExternalPersonSave } = this.props;
|
||||
if (!_.isEmpty(targetIds)) {
|
||||
onExternalPersonSave({ targetIds: targetIds.split(",") });
|
||||
} else {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { targetIds, targetNames } = this.state;
|
||||
const { onCancel, visible, loading } = this.props;
|
||||
const buttons = [
|
||||
<Button type="primary" onClick={this.handleExternalPersonSave} loading={loading}>确定</Button>,
|
||||
<Button type="ghost" onClick={onCancel}>取消</Button>
|
||||
];
|
||||
return (
|
||||
<WeaDialog
|
||||
title="关联非系统人员"
|
||||
visible={visible}
|
||||
style={{ width: 600 }}
|
||||
buttons={buttons}
|
||||
onCancel={onCancel}
|
||||
>
|
||||
<WeaSearchGroup col={1} needTigger title="" showGroup center>
|
||||
<WeaFormItem label="非系统人员" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaBrowser
|
||||
title="非系统人员"
|
||||
type={162}
|
||||
viewAttr={3}
|
||||
isSingle={false}
|
||||
value={targetIds}
|
||||
valueSpan={targetNames}
|
||||
completeParams={{
|
||||
type: 162,
|
||||
fielddbtype: "browser.salaryExtEmp",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
conditionDataParams={{
|
||||
type: "browser.salaryExtEmp",
|
||||
fielddbtype: "browser.salaryExtEmp",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
dataParams={{
|
||||
type: "browser.salaryExtEmp",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
destDataParams={{
|
||||
type: "browser.salaryExtEmp",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
isMultCheckbox
|
||||
inputStyle={{ width: 375 }}
|
||||
onChange={(targetIds, targetNames) => this.setState({ targetIds, targetNames })}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -37,6 +37,7 @@ import EmployeeList from "./pages/employeeView";
|
|||
import ReportView from "./pages/reportView";
|
||||
import MySalaryView from "./pages/mySalary/mySalaryView";
|
||||
import WatermarkPreview from "./pages/payroll/watermarkPreview";
|
||||
import ExternalPersonManage from "./pages/externalPersonManage";
|
||||
|
||||
import stores from "./stores";
|
||||
import "./style/index";
|
||||
|
|
@ -86,6 +87,7 @@ const DataAcquisition = (props) => props.children;
|
|||
// fieldManagement 字段管理
|
||||
// analysisOfSalaryStatistics 薪酬统计分析
|
||||
// reportView 薪酬报表查看
|
||||
// externalPersonManage 非系统人员管理
|
||||
|
||||
const Routes = (
|
||||
<Route
|
||||
|
|
@ -163,6 +165,7 @@ const Routes = (
|
|||
<Route key="analysisOfSalaryStatistics" path="analysisOfSalaryStatistics" component={AnalysisOfSalaryStatistics}/>
|
||||
<Route key="analysisOfSalaryStatisticsId" path="analysisOfSalaryStatistics/:employeeId" component={EmployeeList}/>
|
||||
<Route key="reportView" path="reportView" component={ReportView}/>
|
||||
<Route key="externalPersonManage" path="externalPersonManage" component={ExternalPersonManage}/>
|
||||
</Route>
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ export default class Calculate extends React.Component {
|
|||
style={{ display: "inline-block", marginRight: 8 }}>
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
style={it.index !== "4" ? { padding: "0 12px" } : {}}
|
||||
style={(idx === 1 && it.text.length === 2) ? { padding: "0 12px" } : {}}
|
||||
onClick={() => this.handleOperateClick(it.index, record)}>
|
||||
{it.text}
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@
|
|||
}
|
||||
|
||||
.formItem {
|
||||
display: flex;
|
||||
|
||||
.ant-col-8 {
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.wea-select, .ant-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,127 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 薪资核算-自定义导出字段弹框
|
||||
* Description:
|
||||
* Date: 2023/7/17
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Button, Col, message, Row } from "antd";
|
||||
import { WeaCheckbox, WeaDialog, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { customCacheExportField } from "../../apis/calculate";
|
||||
import { convertToUrlString, getQueryString } from "../../util/url";
|
||||
import "./acctResult/importModal/index.less";
|
||||
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class CustomExportDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
itemsCheckeds: [],
|
||||
showOnlyChecked: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
this.setState({
|
||||
itemsCheckeds: !_.isEmpty(nextProps.checkItems) ? nextProps.checkItems : []
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
customExportClick = () => {
|
||||
const { searchItemsValue } = this.props;
|
||||
const { itemsCheckeds } = this.state;
|
||||
customCacheExportField({ salaryItems: _.map(itemsCheckeds, it => it.toString()) }).then(({ status, errorMsg }) => {
|
||||
if (status) {
|
||||
const { consolidatedTaxation, ...extra } = searchItemsValue;
|
||||
const payload = { ...extra, consolidatedTaxation: consolidatedTaxation === "0" ? "" : consolidatedTaxation };
|
||||
window.open(
|
||||
`/api/bs/hrmsalary/salaryacct/acctresult/exportWithCustomFields?salaryAcctRecordId=${getQueryString("id")}&ids=&${convertToUrlString(payload)}&salaryItemIds=${itemsCheckeds.join(",")}`
|
||||
);
|
||||
} else {
|
||||
message.error(errorMsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
handleShowOnlyChecked = (showOnlyChecked) => this.setState({ showOnlyChecked: !!Number(showOnlyChecked) });
|
||||
handleSelectGroupAll = (groupId, checked) => {
|
||||
const { itemsCheckeds } = this.state;
|
||||
const { itemsByGroup } = this.props;
|
||||
_.map(itemsByGroup, item => {
|
||||
if (item.salarySobItemGroupId === groupId) {
|
||||
if (!!Number(checked)) {
|
||||
this.setState({
|
||||
itemsCheckeds: [...itemsCheckeds, ..._.map(item.salaryItems, child => child.salaryItemId)]
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
itemsCheckeds: _.differenceWith(itemsCheckeds, _.map(item.salaryItems, child => child.salaryItemId), _.isEqual)
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { showOnlyChecked, itemsCheckeds } = this.state;
|
||||
const { itemsByGroup } = this.props;
|
||||
let dataSource = _.map(itemsByGroup, item => {
|
||||
return {
|
||||
...item,
|
||||
salaryItems: _.map(item.salaryItems, child => {
|
||||
return { ...child, checked: itemsCheckeds.includes(child.salaryItemId) };
|
||||
})
|
||||
};
|
||||
});
|
||||
if (showOnlyChecked) {
|
||||
dataSource = _.map(dataSource, item => {
|
||||
return { ...item, salaryItems: _.filter(item.salaryItems, it => !!it.checked) };
|
||||
});
|
||||
}
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} hasScroll initLoadCss
|
||||
scalable title={getLabel(111, "选择字段")}
|
||||
style={{ width: 700, height: 484 }} className="addHeaderFieldsWrapper"
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.customExportClick}>{getLabel(17416, "导出")}</Button>,
|
||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(31129, "取消")}</Button>
|
||||
]}
|
||||
bottomLeft={<WeaCheckbox content={getLabel(543378, "只显示已选中字段")}
|
||||
onChange={this.handleShowOnlyChecked}/>}
|
||||
>
|
||||
{
|
||||
_.map(dataSource, item => {
|
||||
const { salarySobItemGroupName, salaryItems, salarySobItemGroupId } = item;
|
||||
const value = _.every(salaryItems, it => !!it.checked) ? "1" : "0";
|
||||
return <WeaSearchGroup showGroup needTigger
|
||||
title={<WeaCheckbox content={salarySobItemGroupName} value={value}
|
||||
onChange={(val) => this.handleSelectGroupAll(salarySobItemGroupId, val)}/>}>
|
||||
<Row gutter={16}>
|
||||
{
|
||||
!_.isEmpty(salaryItems) ?
|
||||
_.map(salaryItems, it => {
|
||||
const { salaryItemId, salaryItemName, checked } = it;
|
||||
return <Col span={8} style={{ marginBottom: 16 }}>
|
||||
<WeaCheckbox content={salaryItemName} value={checked ? "1" : "0"}
|
||||
onChange={() => this.setState({ itemsCheckeds: _.xorWith(itemsCheckeds, [salaryItemId], _.isEqual) })}/>
|
||||
</Col>;
|
||||
}) : <Col span={24} style={{
|
||||
minHeight: 20,
|
||||
padding: "5%",
|
||||
textAlign: "center"
|
||||
}}>{getLabel(83553, "暂无数据")}</Col>
|
||||
}
|
||||
</Row>
|
||||
</WeaSearchGroup>;
|
||||
})
|
||||
}
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CustomExportDialog;
|
||||
|
|
@ -17,12 +17,12 @@ import {
|
|||
import { convertToUrlString, getQueryString } from "../../util/url";
|
||||
import AcctResultImportModal from "./acctResult/importModal/acctResultImportModal";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
import { salaryacctAcctresultCheckAuth } from "../../apis/calculate";
|
||||
import { getExportField, salaryacctAcctresultCheckAuth } from "../../apis/calculate";
|
||||
import CustomExportDialog from "./customExportDialog";
|
||||
import Authority from "../mySalary/authority";
|
||||
|
||||
|
||||
const { ButtonSelect } = WeaDropdown;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const { ButtonSelect } = WeaDropdown;
|
||||
@inject("calculateStore", "salaryFileStore", "taxAgentStore")
|
||||
@observer
|
||||
export default class CalculateDetail extends React.Component {
|
||||
|
|
@ -36,7 +36,7 @@ export default class CalculateDetail extends React.Component {
|
|||
departmentIds: "",
|
||||
positionIds: "",
|
||||
subcompanyIds: "",
|
||||
status: "",
|
||||
statuses: "",
|
||||
consolidatedTaxation: "0"
|
||||
},
|
||||
selectedKey: "0",
|
||||
|
|
@ -46,7 +46,10 @@ export default class CalculateDetail extends React.Component {
|
|||
progress: 0,
|
||||
accountIds: [],
|
||||
accountExceptInfo: "",
|
||||
calculateAuth: false
|
||||
calculateAuth: false,
|
||||
customExportParams: {
|
||||
visible: false, checkItems: [], itemsByGroup: []
|
||||
}
|
||||
};
|
||||
this.id = "";
|
||||
this.timer = null;
|
||||
|
|
@ -125,7 +128,7 @@ export default class CalculateDetail extends React.Component {
|
|||
);
|
||||
};
|
||||
Select = (value, key) => {
|
||||
const { status } = this.state.searchItemsValue;
|
||||
const { statuses } = this.state.searchItemsValue;
|
||||
return (
|
||||
<WeaFormItem
|
||||
label={value}
|
||||
|
|
@ -133,10 +136,13 @@ export default class CalculateDetail extends React.Component {
|
|||
wrapperCol={{ span: 18 }}
|
||||
>
|
||||
<WeaSelect
|
||||
value={status}
|
||||
multiple
|
||||
value={statuses}
|
||||
options={[
|
||||
{ key: "", showname: "" }, { key: "ALL", showname: getLabel(332, "全部") },
|
||||
{ key: "NORMAL", showname: getLabel(1831, "在职") }, { key: "UNAVAILABLE", showname: getLabel(6091, "离职") }
|
||||
{ key: "0", showname: getLabel(111, "试用") }, { key: "1", showname: getLabel(111, "正式") },
|
||||
{ key: "2", showname: getLabel(111, "临时") }, { key: "3", showname: getLabel(111, "试用延期") },
|
||||
{ key: "4", showname: getLabel(111, "解雇") }, { key: "5", showname: getLabel(6091, "离职") },
|
||||
{ key: "6", showname: getLabel(111, "退休") }
|
||||
]}
|
||||
onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/>
|
||||
</WeaFormItem>
|
||||
|
|
@ -246,9 +252,26 @@ export default class CalculateDetail extends React.Component {
|
|||
window.open(
|
||||
`/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=${this.id}&ids=&${convertToUrlString(payload)}`
|
||||
);
|
||||
} else if (e.key === "4") {
|
||||
// 自定义导出
|
||||
this.getExportField();
|
||||
}
|
||||
};
|
||||
|
||||
getExportField = () => {
|
||||
getExportField({ salaryAcctRecordId: getQueryString("id") }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { checkItems, itemsByGroup } = data;
|
||||
this.setState({
|
||||
customExportParams: {
|
||||
visible: true,
|
||||
checkItems, itemsByGroup
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 导入表单添加表头回调
|
||||
handleAcctModalAdd(fieldData) {
|
||||
this.setState({
|
||||
|
|
@ -291,13 +314,21 @@ export default class CalculateDetail extends React.Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, acctResultImportVisiable, showSearchAd, calculateAuth } = this.state;
|
||||
const {
|
||||
selectedKey,
|
||||
acctResultImportVisiable,
|
||||
showSearchAd,
|
||||
calculateAuth,
|
||||
customExportParams,
|
||||
searchItemsValue
|
||||
} = this.state;
|
||||
const { taxAgentStore: { payrollPermission } } = this.props;
|
||||
const menu = (
|
||||
<Menu onClick={this.handleMenuClick.bind(this)}>
|
||||
<Menu.Item key="1">{getLabel(32935, "导入")}</Menu.Item>
|
||||
<Menu.Item key="2">{getLabel(543249, "线下对比")}</Menu.Item>
|
||||
<Menu.Item key="3">{getLabel(81272, "导出全部")}</Menu.Item>
|
||||
<Menu.Item key="4">{getLabel(111, "自定义导出")}</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
|
|
@ -348,7 +379,7 @@ export default class CalculateDetail extends React.Component {
|
|||
workcode: "",
|
||||
departmentIds: "",
|
||||
positionIds: "",
|
||||
status: "",
|
||||
statuses: "",
|
||||
consolidatedTaxation: "0"
|
||||
}
|
||||
})}>
|
||||
|
|
@ -366,7 +397,7 @@ export default class CalculateDetail extends React.Component {
|
|||
{ com: this.Browser(getLabel(33553, "分部"), "subcompanyIds") },
|
||||
{ com: this.Browser(getLabel(27511, "部门"), "departmentIds") },
|
||||
{ com: this.Browser(getLabel(6086, "岗位"), "positionIds") },
|
||||
{ com: this.Select(getLabel(535101, "状态"), "status") },
|
||||
{ com: this.Select(getLabel(535101, "状态"), "statuses") },
|
||||
{ com: this.Checkbox(getLabel(542607, "合并计税"), "consolidatedTaxation") }
|
||||
];
|
||||
return <WeaSearchGroup title={getLabel(1361, "基本信息")} items={searchItems} showGroup/>;
|
||||
|
|
@ -401,7 +432,7 @@ export default class CalculateDetail extends React.Component {
|
|||
/>
|
||||
{selectedKey == 0 && <UserSure/>}
|
||||
{selectedKey == 1 && <SalaryDetail onChangeAccountIds={(ids) => this.setState({ accountIds: ids })}
|
||||
employeeName={this.state.searchValue}/>}
|
||||
employeeName={this.state.searchItemsValue}/>}
|
||||
{acctResultImportVisiable &&
|
||||
<AcctResultImportModal
|
||||
visiable={acctResultImportVisiable}
|
||||
|
|
@ -424,6 +455,17 @@ export default class CalculateDetail extends React.Component {
|
|||
}}
|
||||
progress={this.state.progress}
|
||||
/>}
|
||||
<CustomExportDialog
|
||||
{...customExportParams}
|
||||
searchItemsValue={searchItemsValue}
|
||||
onCancel={() => {
|
||||
this.setState({
|
||||
customExportParams: {
|
||||
visible: false, checkItems: [], itemsByGroup: []
|
||||
}
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Authority>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ export default class SalaryDetail extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.props.employeeName,
|
||||
...this.props.employeeName,
|
||||
current, pageSize
|
||||
}
|
||||
};
|
||||
|
|
@ -111,7 +111,7 @@ export default class SalaryDetail extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.props.employeeName
|
||||
...this.props.employeeName
|
||||
}
|
||||
};
|
||||
type && childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
|
|
@ -160,7 +160,7 @@ export default class SalaryDetail extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.props.employeeName
|
||||
...this.props.employeeName
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
|
|
@ -194,7 +194,7 @@ export default class SalaryDetail extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.props.employeeName
|
||||
...this.props.employeeName
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export default class UserSure extends React.Component {
|
|||
workcode: "",
|
||||
departmentIds: "",
|
||||
positionIds: "",
|
||||
status: ""
|
||||
statuses: ""
|
||||
},
|
||||
selectedKey: "0",
|
||||
selectedRowKeys: [], // table 选中项
|
||||
|
|
@ -112,7 +112,7 @@ export default class UserSure extends React.Component {
|
|||
);
|
||||
};
|
||||
Select = (value, key) => {
|
||||
const { status } = this.state.searchItemsValue;
|
||||
const { statuses } = this.state.searchItemsValue;
|
||||
return (
|
||||
<WeaFormItem
|
||||
label={value}
|
||||
|
|
@ -120,13 +120,13 @@ export default class UserSure extends React.Component {
|
|||
wrapperCol={{ span: 18 }}
|
||||
>
|
||||
<WeaSelect
|
||||
value={String(status)}
|
||||
multiple
|
||||
value={String(statuses)}
|
||||
options={[
|
||||
{ key: "", showname: "" }, { key: "ALL", showname: getLabel(332, "全部") },
|
||||
{ key: "NORMAL", showname: getLabel(1831, "在职") }, {
|
||||
key: "UNAVAILABLE",
|
||||
showname: getLabel(6091, "离职")
|
||||
}
|
||||
{ key: "0", showname: getLabel(1831, "试用") }, { key: "1", showname: getLabel(111, "正式") },
|
||||
{ key: "2", showname: getLabel(1831, "临时") }, { key: "3", showname: getLabel(1831, "在职") },
|
||||
{ key: "4", showname: getLabel(1831, "解雇") }, { key: "5", showname: getLabel(6091, "离职") },
|
||||
{ key: "6", showname: getLabel(1831, "退休") }
|
||||
]}
|
||||
onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/>
|
||||
</WeaFormItem>
|
||||
|
|
@ -154,7 +154,7 @@ export default class UserSure extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue
|
||||
...this.state.searchItemsValue,
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); //window.postMessage
|
||||
|
|
@ -174,7 +174,7 @@ export default class UserSure extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
...this.state.searchItemsValue,
|
||||
current,
|
||||
pageSize
|
||||
}
|
||||
|
|
@ -187,7 +187,7 @@ export default class UserSure extends React.Component {
|
|||
url: this.state.selectedKey === "1" ? "/api/bs/hrmsalary/salaryacct/reducedemployee/list" : "/api/bs/hrmsalary/salaryacct/addedemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
...this.state.searchItemsValue,
|
||||
current, pageSize
|
||||
}
|
||||
};
|
||||
|
|
@ -214,7 +214,7 @@ export default class UserSure extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
...this.state.searchItemsValue,
|
||||
...this.pageInfo
|
||||
}
|
||||
};
|
||||
|
|
@ -261,7 +261,7 @@ export default class UserSure extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
...this.state.searchItemsValue,
|
||||
...this.pageInfo,
|
||||
current: 1
|
||||
}
|
||||
|
|
@ -292,7 +292,7 @@ export default class UserSure extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
...this.state.searchItemsValue,
|
||||
...this.pageInfo
|
||||
}
|
||||
};
|
||||
|
|
@ -318,7 +318,7 @@ export default class UserSure extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
...this.state.searchItemsValue,
|
||||
...this.pageInfo
|
||||
}
|
||||
};
|
||||
|
|
@ -379,7 +379,7 @@ export default class UserSure extends React.Component {
|
|||
employeeName: "",
|
||||
departmentIds: "",
|
||||
positionIds: "",
|
||||
status: ""
|
||||
statuses: ""
|
||||
}
|
||||
})}>
|
||||
{getLabel(2022, "重置")}
|
||||
|
|
@ -395,7 +395,7 @@ export default class UserSure extends React.Component {
|
|||
{ com: this.Input(getLabel(1933, "工号"), "workcode") },
|
||||
{ com: this.Browser(getLabel(27511, "部门"), "departmentIds") },
|
||||
{ com: this.Browser(getLabel(6086, "岗位"), "positionIds") },
|
||||
{ com: this.Select(getLabel(535101, "状态"), "status") }
|
||||
{ com: this.Select(getLabel(535101, "状态"), "statuses") }
|
||||
];
|
||||
return <WeaSearchGroup title={getLabel(1361, "基本信息")} items={searchItems} showGroup/>;
|
||||
};
|
||||
|
|
@ -464,7 +464,7 @@ export default class UserSure extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue
|
||||
...this.state.searchItemsValue,
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); //window.postMessage
|
||||
|
|
@ -494,7 +494,7 @@ export default class UserSure extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/reducedemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue
|
||||
...this.state.searchItemsValue,
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
|
|
@ -524,7 +524,7 @@ export default class UserSure extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/addedemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue
|
||||
...this.state.searchItemsValue,
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,133 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 非系统人员管理表单项
|
||||
* Description:
|
||||
* Date: 2023/3/13
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaSlideModal } from "ecCom";
|
||||
import { message } from "antd";
|
||||
import { getConditionDomkeys, getSearchs } from "../../../util";
|
||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||
import { detail, save, update } from "../../../apis/externalPersonManage";
|
||||
|
||||
class ExternalPersonManageEditSlide extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
date: "",
|
||||
loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible && nextProps.id) this.detail(nextProps);
|
||||
}
|
||||
|
||||
detail = (props) => {
|
||||
const { form, id, condition } = props;
|
||||
detail({ id }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
form.updateFields({
|
||||
"departmentId": {
|
||||
value: data["departmentId"],
|
||||
valueSpan: data["departmentOrgName"],
|
||||
valueObj: [{ id: data["departmentId"], name: data["departmentOrgName"] }]
|
||||
}
|
||||
});
|
||||
form.updateFields({
|
||||
"subcompanyId": {
|
||||
value: data["subcompanyId"],
|
||||
valueSpan: data["subcompanyOrgName"],
|
||||
valueObj: [{ id: data["subcompanyId"], name: data["subcompanyOrgName"] }]
|
||||
}
|
||||
});
|
||||
// form.updateFields({
|
||||
// "jobtitleId": {
|
||||
// value: jobtitleId,
|
||||
// valueSpan: data["jobtitleOrgName"],
|
||||
// valueObj: [{ id: jobtitleId, name: data["jobtitleOrgName"] }]
|
||||
// }
|
||||
// });
|
||||
_.map(_.without(getConditionDomkeys(condition), "departmentId", "subcompanyId"), item => {
|
||||
form.updateFields({ [item]: { value: data[item] } }, false);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
handleSubmit = () => {
|
||||
const { form, id, onCancel, title } = this.props;
|
||||
form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const tmpV = _.reduce(_.keys(form.getFormDatas()), (pre, cur) => {
|
||||
if (cur === "departmentId") {
|
||||
return _.assign(pre, {
|
||||
[cur]: form.getFormDatas()[cur].value,
|
||||
departmentName: form.getFormDatas()["departmentId"].valueSpan
|
||||
});
|
||||
} else if (cur === "subcompanyId") {
|
||||
return _.assign(pre, {
|
||||
[cur]: form.getFormDatas()[cur].value,
|
||||
subcompanyName: form.getFormDatas()["subcompanyId"].valueSpan
|
||||
});
|
||||
}
|
||||
return _.assign(pre, { [cur]: form.getFormDatas()[cur].value });
|
||||
}, {});
|
||||
const payload = _.omitBy(form.getFormParams(), _.isNil);
|
||||
this.setState({ loading: true });
|
||||
const APIFOX = !id ? save : update;
|
||||
APIFOX(id ? { ...payload, id } : payload).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(`${title}成功`);
|
||||
onCancel(true);
|
||||
} else {
|
||||
message.error(errormsg || `${title}失败`);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
this.setState({ date: new Date() });
|
||||
}
|
||||
});
|
||||
};
|
||||
handleFormChange = (res) => {
|
||||
const { form, id } = this.props;
|
||||
if (_.keys(res)[0] === "departmentId" || _.keys(res)[0] === "subcompanyId") {
|
||||
const key = _.replace(_.keys(res)[0], "Id", "Name");
|
||||
form.updateFields({ [key]: res[_.keys(res)[0]].valueSpan || "" });
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading } = this.state;
|
||||
const { visible, title, onCancel, showOperateBtn, form, condition } = this.props;
|
||||
return (
|
||||
<WeaSlideModal
|
||||
className="slideOuterWrapper"
|
||||
visible={visible}
|
||||
top={0}
|
||||
measureT="%"
|
||||
width={800}
|
||||
measureX="px"
|
||||
height={100}
|
||||
measureY="%"
|
||||
direction="right"
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={title}
|
||||
editable={true}
|
||||
loading={loading}
|
||||
showOperateBtn={showOperateBtn}
|
||||
onSave={this.handleSubmit}
|
||||
/>
|
||||
}
|
||||
content={getSearchs(form, condition, 1, false, this.handleFormChange)}
|
||||
onClose={onCancel}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ExternalPersonManageEditSlide;
|
||||
|
|
@ -0,0 +1,208 @@
|
|||
export const searchCondition = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 2,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["username"],
|
||||
fieldcol: 16,
|
||||
label: "姓名",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const condition = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["username"],
|
||||
rules: "required|string",
|
||||
fieldcol: 18,
|
||||
label: "姓名",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: true,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "部门",
|
||||
type: "57",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 1,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["departmentId"],
|
||||
fieldcol: 18,
|
||||
label: "部门",
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["departmentName"],
|
||||
fieldcol: 18,
|
||||
label: "部门名称",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
hasBorder: true,
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: true,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "分部",
|
||||
type: "164",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 1,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["subcompanyId"],
|
||||
fieldcol: 18,
|
||||
label: "分部",
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["subcompanyName"],
|
||||
fieldcol: 18,
|
||||
label: "分部名称",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
hasBorder: true,
|
||||
viewAttr: 1
|
||||
},
|
||||
// {
|
||||
// browserConditionParam: {
|
||||
// completeParams: {},
|
||||
// conditionDataParams: {},
|
||||
// dataParams: {},
|
||||
// destDataParams: {},
|
||||
// hasAddBtn: false,
|
||||
// hasAdvanceSerach: false,
|
||||
// idSeparator: ",",
|
||||
// isAutoComplete: 1,
|
||||
// isDetail: 0,
|
||||
// isMultCheckbox: false,
|
||||
// isSingle: true,
|
||||
// icon: "icon-coms-hrm",
|
||||
// linkUrl: "",
|
||||
// pageSize: 10,
|
||||
// quickSearchName: "",
|
||||
// replaceDatas: [],
|
||||
// title: "岗位",
|
||||
// type: "24",
|
||||
// viewAttr: 2,
|
||||
// },
|
||||
// colSpan: 1,
|
||||
// conditionType: "BROWSER",
|
||||
// domkey: ["jobtitleId"],
|
||||
// fieldcol: 18,
|
||||
// label: "岗位",
|
||||
// labelcol: 6,
|
||||
// viewAttr: 2,
|
||||
// },
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "DATEPICKER",
|
||||
domkey: ["companystartdate"],
|
||||
fieldcol: 18,
|
||||
label: "入职日期",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["mobile"],
|
||||
fieldcol: 18,
|
||||
label: "手机",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["workcode"],
|
||||
fieldcol: 18,
|
||||
label: "工号",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["idNo"],
|
||||
fieldcol: 18,
|
||||
label: "身份证号码",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["bankCardNum"],
|
||||
fieldcol: 18,
|
||||
label: "本人开户的银行卡卡号",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["bankName"],
|
||||
fieldcol: 18,
|
||||
label: "本人开户的银行卡开户支行全称",
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
defaultshow: true,
|
||||
title: "基本信息"
|
||||
}
|
||||
];
|
||||
|
|
@ -0,0 +1,177 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 非系统人员管理
|
||||
* Description:
|
||||
* Date: 2023/3/13
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaTab, WeaTable, WeaTop } from "ecCom";
|
||||
import ExternalPersonManageEditSlide from "./components/externalPersonManageEditSlide";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { getSearchs } from "../../util";
|
||||
import { condition, searchCondition } from "./conditions";
|
||||
import { deleteExtEmp, listPage } from "../../apis/externalPersonManage";
|
||||
import "./index.less";
|
||||
|
||||
@inject("externalPersonManageStore", "taxAgentStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false,
|
||||
selectedRowKeys: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
showSearchAd: false,
|
||||
externalPersonManagePayload: {
|
||||
visible: false, title: "新建", id: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { externalPersonManageStore: { form, addForm } } = this.props;
|
||||
form.initFormFields(searchCondition);
|
||||
addForm.initFormFields(condition);
|
||||
this.listPage();
|
||||
}
|
||||
|
||||
listPage = () => {
|
||||
const { pageInfo } = this.state;
|
||||
const { externalPersonManageStore: { form } } = this.props;
|
||||
const payload = { ...pageInfo, ...form.getFormParams() };
|
||||
listPage(payload).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { list: dataSource, columns, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
dataSource, columns,
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
deleteExtEmp = (ids) => {
|
||||
deleteExtEmp(ids).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
this.listPage();
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
handleDelete = (id) => {
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: "确定删除吗",
|
||||
onOk: () => this.deleteExtEmp([id])
|
||||
});
|
||||
};
|
||||
handleCancel = (isRefresh) => {
|
||||
const { externalPersonManagePayload } = this.state;
|
||||
const { externalPersonManageStore: { addForm } } = this.props;
|
||||
addForm.resetForm();
|
||||
this.setState({
|
||||
externalPersonManagePayload: {
|
||||
...externalPersonManagePayload,
|
||||
visible: false, title: "新建", id: ""
|
||||
}
|
||||
}, () => isRefresh && this.listPage());
|
||||
};
|
||||
handleAdd = (id = "") => {
|
||||
const { externalPersonManagePayload } = this.state;
|
||||
this.setState({
|
||||
externalPersonManagePayload: {
|
||||
...externalPersonManagePayload,
|
||||
visible: true, id, title: id ? "编辑" : "新建"
|
||||
}
|
||||
});
|
||||
};
|
||||
getColumns = () => {
|
||||
const { columns } = this.state;
|
||||
return _.map(_.filter(columns, item => !!item.display), child => ({
|
||||
...child,
|
||||
render: (text) => {
|
||||
return <span className="ellipsis" title={text}>{text}</span>;
|
||||
}
|
||||
}));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { showSearchAd, externalPersonManagePayload, loading, pageInfo, selectedRowKeys, dataSource } = this.state;
|
||||
const { externalPersonManageStore: { form, addForm }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const pagination = {
|
||||
current: pageInfo.current,
|
||||
pageSize: pageInfo.pageSize,
|
||||
total: pageInfo.total,
|
||||
showTotal: total => `共 ${total} 条`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.listPage());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.listPage());
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: selectedRowKeys => this.setState({ selectedRowKeys })
|
||||
};
|
||||
return (
|
||||
<div className="externalPerWrapper">
|
||||
<WeaTop
|
||||
title="非系统人员管理" icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" showDropIcon={false}
|
||||
>
|
||||
<div className="externalPerCont">
|
||||
<WeaTab
|
||||
buttons={showOperateBtn ? [
|
||||
<Button type="primary" onClick={() => this.handleAdd()}>新建</Button>
|
||||
] : []}
|
||||
searchType={["base", "advanced"]} showSearchAd={showSearchAd}
|
||||
setShowSearchAd={(showSearchAd) => this.setState({ showSearchAd })}
|
||||
searchsAd={getSearchs(form, searchCondition, 2)}
|
||||
searchsBasePlaceHolder="请输入姓名" onSearch={this.listPage}
|
||||
onSearchChange={username => form.updateFields({ username })}
|
||||
searchsBaseValue={form.getFormParams().username}
|
||||
onAdSearch={() => this.setState({ showSearchAd: false }, () => this.listPage())}
|
||||
onAdReset={() => form.resetForm()} onAdCancel={() => this.setState({ showSearchAd: false })}
|
||||
/>
|
||||
<WeaTable
|
||||
rowKey="id"
|
||||
loading={loading}
|
||||
columns={showOperateBtn ? [
|
||||
...this.getColumns(),
|
||||
{
|
||||
dataIndex: "operate",
|
||||
title: "操作",
|
||||
width: 120,
|
||||
render: (_, { id }) => (
|
||||
<React.Fragment>
|
||||
<a href="javascript: void(0);" onClick={() => this.handleAdd(id)}
|
||||
style={{ paddingRight: 8 }}>编辑</a>
|
||||
{/*<a href="javascript: void(0);" onClick={() => this.handleDelete(id)}>删除</a>*/}
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
] : []}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
rowSelection={rowSelection}
|
||||
xWidth={800}
|
||||
/>
|
||||
<ExternalPersonManageEditSlide
|
||||
showOperateBtn={showOperateBtn} form={addForm} condition={condition}
|
||||
onCancel={this.handleCancel} {...externalPersonManagePayload}
|
||||
/>
|
||||
</div>
|
||||
</WeaTop>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
.externalPerWrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.externalPerCont {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.slideOuterWrapper {
|
||||
.hideFormItem {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
|
@ -6,7 +6,17 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaSlideModal, WeaTextarea, WeaInputNumber, WeaLocaleProvider } from "ecCom";
|
||||
import {
|
||||
WeaCheckbox,
|
||||
WeaFormItem,
|
||||
WeaHelpfulTip,
|
||||
WeaInput,
|
||||
WeaInputNumber,
|
||||
WeaLocaleProvider,
|
||||
WeaSelect,
|
||||
WeaSlideModal,
|
||||
WeaTextarea
|
||||
} from "ecCom";
|
||||
import { message, Modal } from "antd";
|
||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||
import { getSalaryFieldForm, saveSalaryField } from "../../../apis/fieldManage";
|
||||
|
|
@ -55,6 +65,7 @@ class FieldSlide extends Component {
|
|||
const {
|
||||
name,
|
||||
useDefault,
|
||||
hideDefault,
|
||||
useInEmployeeSalary,
|
||||
dataType,
|
||||
description,
|
||||
|
|
@ -69,6 +80,7 @@ class FieldSlide extends Component {
|
|||
name,
|
||||
useInEmployeeSalary: useInEmployeeSalary ? useInEmployeeSalary.toString() : "0",
|
||||
useDefault: useDefault ? useDefault.toString() : "0",
|
||||
hideDefault: hideDefault ? hideDefault.toString() : "0",
|
||||
dataType,
|
||||
description,
|
||||
sortedIndex,
|
||||
|
|
@ -121,6 +133,7 @@ class FieldSlide extends Component {
|
|||
const {
|
||||
name,
|
||||
useDefault,
|
||||
hideDefault,
|
||||
useInEmployeeSalary,
|
||||
dataType,
|
||||
description,
|
||||
|
|
@ -134,6 +147,7 @@ class FieldSlide extends Component {
|
|||
name,
|
||||
useInEmployeeSalary: Number(useInEmployeeSalary),
|
||||
useDefault: Number(useDefault),
|
||||
hideDefault: Number(hideDefault),
|
||||
dataType,
|
||||
description,
|
||||
sortedIndex,
|
||||
|
|
@ -169,6 +183,7 @@ class FieldSlide extends Component {
|
|||
name: "",
|
||||
useInEmployeeSalary: "1",
|
||||
useDefault: "0",
|
||||
hideDefault: "0",
|
||||
sharedType: "0",
|
||||
taxAgentIds: "",
|
||||
dataType: "number",
|
||||
|
|
@ -192,6 +207,7 @@ class FieldSlide extends Component {
|
|||
name,
|
||||
useInEmployeeSalary,
|
||||
useDefault,
|
||||
hideDefault,
|
||||
shareTypeList,
|
||||
sharedType,
|
||||
taxAgentIds,
|
||||
|
|
@ -251,6 +267,17 @@ class FieldSlide extends Component {
|
|||
placement="topLeft"
|
||||
/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem label={getLabel(111, "核算时隐藏")} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||
<WeaCheckbox
|
||||
value={hideDefault}
|
||||
display="switch"
|
||||
onChange={value => this.handleChangeFields("hideDefault", value)}
|
||||
/>
|
||||
<WeaHelpfulTip style={{ marginLeft: "10px" }}
|
||||
title={getLabel(111, "提示:开启后,在薪资账套中添加该项目时,默认勾选隐藏且在核算时隐藏该薪资项目,可在具体薪资账套中设置是否隐藏")}
|
||||
placement="topLeft"
|
||||
/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem label={getLabel(543164, "可见性")} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||
<WeaSelect
|
||||
value={sharedType}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class FieldTable extends Component {
|
|||
title: getLabel(30585, "操作")
|
||||
}], item => {
|
||||
const { dataIndex } = item;
|
||||
if (dataIndex === "useDefault") {
|
||||
if (dataIndex === "useDefault" || dataIndex === "hideDefault") {
|
||||
item.render = (text) => (<Switch checked={text === 1} disabled/>);
|
||||
} else if (dataIndex === "operate") {
|
||||
item.width = 120;
|
||||
|
|
|
|||
|
|
@ -11,19 +11,25 @@ import { WeaButtonIcon, WeaInputSearch, WeaLocaleProvider, WeaTab } from "ecCom"
|
|||
import PersonalScopeTable from "../../../components/PersonalScopeTable";
|
||||
import PersonalScopeModal from "../../../components/PersonalScopeModal";
|
||||
import {
|
||||
deleteLedgerPersonExtRange,
|
||||
deleteLedgerPersonRange,
|
||||
getLedgerPersonRangeExclude,
|
||||
getLedgerPersonRangeExtList,
|
||||
getLedgerPersonRangeInclude,
|
||||
salarysobRangeImportData,
|
||||
salarysobRangePreview,
|
||||
saveLedgerPersonExtRange,
|
||||
saveLedgerPersonRange
|
||||
} from "../../../apis/ledger";
|
||||
import ImportModal from "../../../components/importModal";
|
||||
import { importEmployColumns } from "../../taxAgent/columns";
|
||||
import ExternalPersonModal from "../../../components/externalPersonModal";
|
||||
import { sysinfo } from "../../../apis/ruleconfig";
|
||||
|
||||
const APIFox = {
|
||||
listInclude: getLedgerPersonRangeInclude,
|
||||
listExclude: getLedgerPersonRangeExclude
|
||||
listExclude: getLedgerPersonRangeExclude,
|
||||
externalList: getLedgerPersonRangeExtList
|
||||
};
|
||||
const APISaveFox = {
|
||||
save: saveLedgerPersonRange
|
||||
|
|
@ -41,6 +47,8 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
selectedKey: "listInclude",
|
||||
rowKeys: [],
|
||||
previewDataSource: [],
|
||||
externalPersonModalVisible: false,
|
||||
loading: false,
|
||||
importParams: {
|
||||
visible: false,
|
||||
step: 0,
|
||||
|
|
@ -50,10 +58,45 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
visible: false,
|
||||
title: getLabel(543467, "关联人员"),
|
||||
includeType: ""
|
||||
}
|
||||
},
|
||||
extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getSysinfo();
|
||||
}
|
||||
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 非系统人员开关查询
|
||||
* Params:
|
||||
* Date: 2023/7/14
|
||||
*/
|
||||
getSysinfo = () => {
|
||||
sysinfo().then(({ status, data }) => {
|
||||
if (status) this.setState({ extEmpsWitch: data.extEmpsWitch });
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:外部人员保存
|
||||
* Params:
|
||||
* Date: 2023/3/14
|
||||
*/
|
||||
handleSaveExternalPerson = (val) => {
|
||||
const { editId: salarySobId, saveSalarySobId } = this.props;
|
||||
saveLedgerPersonExtRange({ ...val, salarySobId: salarySobId || saveSalarySobId }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success("保存成功");
|
||||
this.setState({ externalPersonModalVisible: false });
|
||||
this.personalScopeTableRef.getPersonalScopeList();
|
||||
} else {
|
||||
message.error(errormsg || "保存失败");
|
||||
}
|
||||
}).catch(() => this.setState({ loading: true }));
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 删除人员范围
|
||||
|
|
@ -61,23 +104,55 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
* Date: 2022/11/30
|
||||
*/
|
||||
taxAgentRangeDelete = () => {
|
||||
const { selectedKey } = this.state;
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(388758, "确认要删除吗?"),
|
||||
onOk: () => {
|
||||
deleteLedgerPersonRange(this.state.rowKeys).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功"));
|
||||
this.setState({ rowKeys: [] }, () => {
|
||||
this.personalScopeTableRef.clearRowkeys();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || getLabel(20462, "删除失败"));
|
||||
}
|
||||
});
|
||||
return new Promise((resolve, reject) => {
|
||||
return selectedKey === "externalList" ? this.deleteLedgerPersonExtRange(resolve, reject) : this.deleteLedgerPersonRange(resolve, reject);
|
||||
}).catch(() => console.log("出错!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
deleteLedgerPersonExtRange = (resolve, reject) => {
|
||||
message.destroy();
|
||||
message.loading(getLabel(111, "正在删除中..."), 0);
|
||||
deleteLedgerPersonExtRange(this.state.rowKeys).then(({ status, errormsg }) => {
|
||||
message.destroy();
|
||||
resolve();
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功"));
|
||||
this.setState({ rowKeys: [] }, () => {
|
||||
this.personalScopeTableRef.clearRowkeys();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || getLabel(20462, "删除失败"));
|
||||
}
|
||||
}).catch(() => {
|
||||
message.destroy();
|
||||
reject();
|
||||
});
|
||||
};
|
||||
deleteLedgerPersonRange = (resolve, reject) => {
|
||||
message.destroy();
|
||||
message.loading(getLabel(111, "正在删除中..."), 0);
|
||||
deleteLedgerPersonRange(this.state.rowKeys).then(({ status, errormsg }) => {
|
||||
message.destroy();
|
||||
resolve();
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功"));
|
||||
this.setState({ rowKeys: [] }, () => {
|
||||
this.personalScopeTableRef.clearRowkeys();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || getLabel(20462, "删除失败"));
|
||||
}
|
||||
}).catch(() => {
|
||||
message.destroy();
|
||||
reject();
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:新增人员范围
|
||||
|
|
@ -86,13 +161,17 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
*/
|
||||
handleAddPersonal = () => {
|
||||
const { personalAddModal, selectedKey } = this.state;
|
||||
this.setState({
|
||||
personalAddModal: {
|
||||
...personalAddModal,
|
||||
visible: true,
|
||||
includeType: selectedKey === "listInclude" ? 1 : 0
|
||||
}
|
||||
});
|
||||
if (selectedKey === "externalList") {
|
||||
this.setState({ externalPersonModalVisible: true });
|
||||
} else {
|
||||
this.setState({
|
||||
personalAddModal: {
|
||||
...personalAddModal,
|
||||
visible: true,
|
||||
includeType: selectedKey === "listInclude" ? 1 : 0
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
|
|
@ -140,7 +219,9 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
rowKeys,
|
||||
personalAddModal,
|
||||
importParams,
|
||||
previewDataSource
|
||||
previewDataSource,
|
||||
externalPersonModalVisible,
|
||||
loading, extEmpsWitch
|
||||
} = this.state;
|
||||
const { taxAgentStore: { showOperateBtn }, editId, saveSalarySobId } = this.props;
|
||||
const topTab = [
|
||||
|
|
@ -151,6 +232,10 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
{
|
||||
title: getLabel(543489, "从范围中排除"),
|
||||
viewcondition: "listExclude"
|
||||
},
|
||||
{
|
||||
title: "非系统人员范围",
|
||||
viewcondition: "externalList"
|
||||
}
|
||||
];
|
||||
const btns = showOperateBtn ? [
|
||||
|
|
@ -191,10 +276,10 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
return (
|
||||
<div>
|
||||
<WeaTab
|
||||
datas={topTab}
|
||||
datas={extEmpsWitch === "0" ? _.dropRight(topTab) : topTab}
|
||||
keyParam="viewcondition" //主键
|
||||
selectedKey={selectedKey}
|
||||
buttons={showOperateBtn && selectedKey === "listExclude" ? btns.slice(1) : btns}
|
||||
buttons={showOperateBtn && selectedKey === "listInclude" ? btns : btns.slice(1)}
|
||||
onChange={selectedKey => this.setState({ selectedKey })}
|
||||
/>
|
||||
<PersonalScopeTable
|
||||
|
|
@ -236,6 +321,13 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
}}
|
||||
/>
|
||||
)}
|
||||
{/*非系统人员添加*/}
|
||||
<ExternalPersonModal
|
||||
visible={externalPersonModalVisible}
|
||||
loading={loading}
|
||||
onCancel={() => this.setState({ externalPersonModalVisible: false })}
|
||||
onExternalPersonSave={this.handleSaveExternalPerson}
|
||||
/>
|
||||
{/*新增人员范围*/}
|
||||
<PersonalScopeModal
|
||||
{...personalAddModal}
|
||||
|
|
|
|||
|
|
@ -75,8 +75,9 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
let valueSpan = record[newColumn.dataIndex + "span"] !== undefined ? record[newColumn.dataIndex + "span"] : record[newColumn.dataIndex];
|
||||
switch (newColumn.dataIndex) {
|
||||
case "useDefault":
|
||||
case "hideDefault":
|
||||
case "useInEmployeeSalary":
|
||||
return <Switch checked={text == 1}/>;
|
||||
return <Switch checked={text === 1}/>;
|
||||
default:
|
||||
return <div dangerouslySetInnerHTML={{ __html: valueSpan }}/>;
|
||||
}
|
||||
|
|
@ -97,6 +98,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
if (item.id === key) {
|
||||
item.salaryItemId = item.id;
|
||||
item.key = item.id;
|
||||
item.itemHide = item.hideDefault;
|
||||
item.sortedIndex = (!_.isEmpty(_.maxBy(arrItems, it => it.sortedIndex)) ? _.maxBy(arrItems, it => it.sortedIndex).sortedIndex : 0) + keyIdx + 1;
|
||||
selectItems.push(item);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,15 +2,17 @@ import React from "react";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import { WeaDialog, WeaError, WeaInput, WeaLocaleProvider } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import Authority from "../mySalary/authority";
|
||||
import ComputerTemplate from "../payroll/templatePreview/computerTemplate";
|
||||
import PhoneTemplate from "../payroll/templatePreview/phoneTemplate";
|
||||
import "../payroll/templatePreview/index.less";
|
||||
import * as API from "../../apis/mySalaryBenefits";
|
||||
import { payrollCheckType } from "../../apis/payroll";
|
||||
import "./index.less";
|
||||
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
|
||||
import CaptchaModal from "../../components/captchaModal";
|
||||
import PassSetDialog from "./passSetDialog";
|
||||
import { ConfirmBtns } from "../mySalary/mySalaryView";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
@inject("mySalaryStore")
|
||||
|
|
@ -19,9 +21,11 @@ export default class MobilePayroll extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pwdSetVisible: false,
|
||||
visible: false,
|
||||
captchaVisible: false,
|
||||
authCode: "",
|
||||
notSetting: false,
|
||||
mySalaryBillData: {
|
||||
employeeInformation: {},
|
||||
salaryTemplate: []
|
||||
|
|
@ -50,7 +54,11 @@ export default class MobilePayroll extends React.Component {
|
|||
// if (window.em) {
|
||||
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }).then(({ status, isNeedSecondAuth }) => {
|
||||
if (status && isNeedSecondAuth) {
|
||||
this.setState({ visible: true });
|
||||
this.setState({ visible: true }, () => {
|
||||
API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }).then(({ status, notSetting }) => {
|
||||
this.setState({ notSetting });
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.getMySalaryBill(getQueryString("id"));
|
||||
setInitEmVerify();
|
||||
|
|
@ -105,10 +113,38 @@ export default class MobilePayroll extends React.Component {
|
|||
}
|
||||
return params;
|
||||
};
|
||||
confirmSalaryBill = () => {
|
||||
confirmSalaryBill({ salaryInfoId: getQueryString("id") }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功"));
|
||||
this.getMySalaryBill(getQueryString("id"));
|
||||
} else {
|
||||
message.error(errormsg || getLabel(30651, "操作失败"));
|
||||
}
|
||||
});
|
||||
};
|
||||
handleGoFeedback = () => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
|
||||
onOk: () => {
|
||||
feedBackSalaryBill({ salaryInfoId: getQueryString("id") }).then(({ status, errorMsg }) => {
|
||||
if (status) {
|
||||
const { mySalaryBillData } = this.state;
|
||||
const { salaryTemplate } = mySalaryBillData;
|
||||
const { feedbackUrl } = salaryTemplate;
|
||||
window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`);
|
||||
} else {
|
||||
message.error(errorMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { mySalaryStore: { clearLoading } } = this.props;
|
||||
const { mySalaryBillData, visible, captchaVisible } = this.state;
|
||||
const { mySalaryStore: { clearLoading, pwdForm } } = this.props;
|
||||
const { mySalaryBillData, visible, captchaVisible, notSetting, pwdSetVisible } = this.state;
|
||||
const type = getQueryString("type");
|
||||
const employeeInformation = mySalaryBillData.employeeInformation ? mySalaryBillData.employeeInformation : {};
|
||||
const salaryGroups = mySalaryBillData.salaryGroups ? mySalaryBillData.salaryGroups : [];
|
||||
|
|
@ -127,9 +163,17 @@ export default class MobilePayroll extends React.Component {
|
|||
]}
|
||||
>
|
||||
<WeaError tipPosition="bottom" ref="weaError" error={getLabel(385869, "此项必填")}>
|
||||
<WeaInput value={this.state.authCode} onChange={authCode => this.setState({ authCode })}/>
|
||||
<WeaInput value={this.state.authCode} viewAttr={3} onChange={authCode => this.setState({ authCode })}/>
|
||||
</WeaError>
|
||||
{
|
||||
notSetting &&
|
||||
<div style={{ clear: "both", paddingTop: 10 }} >
|
||||
{getLabel("514970", "您还未设置二次验证密码,点击")}
|
||||
<a href="javascript:void(0);" onClick={() => this.setState({ pwdSetVisible: true })}>{getLabel("30747", "设置")}</a>
|
||||
</div>
|
||||
}
|
||||
</WeaDialog>
|
||||
<PassSetDialog form={pwdForm} visible={pwdSetVisible} onCancel={() => this.setState({ pwdSetVisible: false })}/>
|
||||
{
|
||||
type === "phone" ?
|
||||
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||
|
|
@ -140,7 +184,15 @@ export default class MobilePayroll extends React.Component {
|
|||
isPreview
|
||||
salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)}
|
||||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
|
||||
/>
|
||||
>
|
||||
{
|
||||
(_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0") &&
|
||||
<ConfirmBtns
|
||||
confirmSalaryBill={this.confirmSalaryBill}
|
||||
goFeedback={this.handleGoFeedback}
|
||||
/>
|
||||
}
|
||||
</PhoneTemplate>
|
||||
</div>
|
||||
</div>
|
||||
</Authority>
|
||||
|
|
@ -153,7 +205,15 @@ export default class MobilePayroll extends React.Component {
|
|||
isPreview
|
||||
salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)}
|
||||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : JSON.stringify([])}
|
||||
/>
|
||||
>
|
||||
{
|
||||
(_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0") &&
|
||||
<ConfirmBtns
|
||||
confirmSalaryBill={this.confirmSalaryBill}
|
||||
goFeedback={this.handleGoFeedback}
|
||||
/>
|
||||
}
|
||||
</ComputerTemplate>
|
||||
</div>
|
||||
</div>
|
||||
</Authority>
|
||||
|
|
|
|||
|
|
@ -15,3 +15,27 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pwdSetWrapper {
|
||||
.ant-modal-content {
|
||||
width: 80vw !important;
|
||||
|
||||
.wea-dialog-body, .wea-new-scroll {
|
||||
height: 195px !important;
|
||||
|
||||
.wea-search-group .wea-form-cell {
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.validatecodeWrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.wea-input-normal {
|
||||
width: 50% !important;
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,141 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 二次验证密码设置
|
||||
* Description:
|
||||
* Date: 2023/7/7
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import { condition, loginCondition } from "./pwdCondtion";
|
||||
import { Button, message } from "antd";
|
||||
import { RSAEcrypt } from "../../util/RSAUtil";
|
||||
import { checkPassword, saveSecondaryPwd } from "../../apis/mySalaryBenefits";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class PassSetDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
src: (window.ecologyContentPath || "") + "/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4",
|
||||
num: 0,
|
||||
isPassLoginPassword: false
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.props.form.initFormFields(loginCondition);
|
||||
this.props.form.initFormFields(condition);
|
||||
}
|
||||
|
||||
getSearchs = (form, condition) => {
|
||||
const { isFormInit } = form, formParams = form.getFormParams();
|
||||
let group = [];
|
||||
isFormInit && condition && condition.map(c => {
|
||||
let items = [];
|
||||
c.items.map(fields => {
|
||||
items.push({
|
||||
com: (
|
||||
<WeaFormItem
|
||||
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
|
||||
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
||||
tipPosition="bottom"
|
||||
>
|
||||
{
|
||||
fields.domkey[0] === "validatecode" ?
|
||||
<div className="validatecodeWrapper">
|
||||
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams}/>
|
||||
<img
|
||||
style={{ height: 30, cursor: "pointer" }}
|
||||
src={this.state.src}
|
||||
onClick={() => {
|
||||
this.setState({ num: this.state.num + 1 }, () => {
|
||||
this.setState({ src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}` });
|
||||
});
|
||||
}}
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
: <WeaSwitch fieldConfig={fields} form={form} formParams={formParams}/>
|
||||
}
|
||||
</WeaFormItem>),
|
||||
colSpan: 1
|
||||
});
|
||||
});
|
||||
group.push(
|
||||
<WeaSearchGroup
|
||||
col={1} needTigger={false} title={c.title}
|
||||
showGroup={c.defaultshow} items={items}
|
||||
/>);
|
||||
});
|
||||
return group;
|
||||
};
|
||||
saveSecondaryPassword = () => {
|
||||
const { isPassLoginPassword } = this.state;
|
||||
const { form } = this.props;
|
||||
const { secondaryPwd1, secondaryPwd2, validatecode, password } = form.getFormParams();
|
||||
if (isPassLoginPassword) {
|
||||
if (!validatecode || !secondaryPwd1 || !secondaryPwd2) {
|
||||
message.error(getLabel(518702, "必要信息不完整,红色*为必填项!"));
|
||||
return;
|
||||
}
|
||||
if (secondaryPwd1 !== secondaryPwd2) {
|
||||
message.error(getLabel("504376", "密码确认不正确!"));
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!password) {
|
||||
message.error(getLabel(518702, "必要信息不完整,红色*为必填项!"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
const params = isPassLoginPassword ? { secondaryPwd1, secondaryPwd2 } : { password };
|
||||
RSAEcrypt("1", params).then(RSAParam => {
|
||||
isPassLoginPassword ?
|
||||
saveSecondaryPwd({ ...RSAParam, validatecode }).then(({ sign, message: msg }) => {
|
||||
if (sign === "1") {
|
||||
message.success(msg);
|
||||
this.props.onCancel();
|
||||
form.resetForm();
|
||||
} else {
|
||||
message.warning(msg);
|
||||
this.setState({ num: this.state.num + 1 }, () => {
|
||||
this.setState({ src: `${window.ecologyContentPath || ""}/weaver/weaver.file.MakeValidateCode?notneedvalidate=1&isView=1&validatetype=0&validatenum=4&seriesnum_=${this.state.num}` });
|
||||
});
|
||||
}
|
||||
}) :
|
||||
checkPassword({ ...RSAParam }).then(({ result }) => {
|
||||
if (result) {
|
||||
this.setState({ isPassLoginPassword: true });
|
||||
form.resetForm();
|
||||
} else {
|
||||
message.error(getLabel(504343, "登录密码错误"));
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { isPassLoginPassword } = this.state;
|
||||
return (
|
||||
<WeaDialog
|
||||
onCancel={this.props.onCancel}
|
||||
title={isPassLoginPassword ? getLabel(504332, "二次验证密码设置") : getLabel(504331, "请先输入登录密码")}
|
||||
visible={this.props.visible}
|
||||
initLoadCss className="pwdSetWrapper" hasScroll buttons={[
|
||||
<Button type="primary" size="small" onClick={this.saveSecondaryPassword}>{getLabel(537558, "保存")}</Button>
|
||||
]}
|
||||
>
|
||||
{
|
||||
isPassLoginPassword ?
|
||||
this.getSearchs(this.props.form, condition) :
|
||||
this.getSearchs(this.props.form, loginCondition)
|
||||
}
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PassSetDialog;
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
export const loginCondition = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
checkbox: false,
|
||||
checkboxValue: false,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["password"],
|
||||
fieldcol: 18,
|
||||
label: getLabel(388431, "登录密码"),
|
||||
labelcol: 6,
|
||||
detailtype: 3,
|
||||
rules: "required|string",
|
||||
type: "password",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const condition = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
checkbox: false,
|
||||
checkboxValue: false,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["secondaryPwd1"],
|
||||
fieldcol: 18,
|
||||
label: getLabel(409, "密码"),
|
||||
labelcol: 6,
|
||||
detailtype: 3,
|
||||
rules: "required|string",
|
||||
viewAttr: 3,
|
||||
type: "password"
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["secondaryPwd2"],
|
||||
fieldcol: 18,
|
||||
label: getLabel(511112, "确认密码"),
|
||||
labelcol: 6,
|
||||
rules: "required|string",
|
||||
viewAttr: 3,
|
||||
type: "password"
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["validatecode"],
|
||||
fieldcol: 18,
|
||||
label: getLabel(511113, "验证码"),
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
@ -6,12 +6,16 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import Authority from "./authority";
|
||||
import ComputerTemplate from "../payroll/templatePreview/computerTemplate";
|
||||
import { payrollCheckType } from "../../apis/payroll";
|
||||
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
|
||||
import CaptchaModal from "../../components/captchaModal";
|
||||
import "../payroll/templatePreview/index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
@inject("mySalaryStore")
|
||||
@observer
|
||||
class MySalaryView extends Component {
|
||||
|
|
@ -37,6 +41,39 @@ class MySalaryView extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
confirmSalaryBill = () => {
|
||||
const { mySalaryStore: { getMySalaryBill }, params: { salaryInfoId } } = this.props;
|
||||
confirmSalaryBill({ salaryInfoId }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功"));
|
||||
getMySalaryBill(Number(salaryInfoId)).then(data => {
|
||||
this.setState({ mySalaryStore: data });
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || getLabel(30651, "操作失败"));
|
||||
}
|
||||
});
|
||||
};
|
||||
handleGoFeedback = () => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
|
||||
onOk: () => {
|
||||
const { params: { salaryInfoId } } = this.props;
|
||||
feedBackSalaryBill({ salaryInfoId }).then(({ status, errorMsg }) => {
|
||||
if (status) {
|
||||
const { mySalaryStore } = this.state;
|
||||
const { salaryTemplate } = mySalaryStore;
|
||||
const { feedbackUrl } = salaryTemplate;
|
||||
window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`);
|
||||
} else {
|
||||
message.error(errorMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { captchaVisible, mySalaryStore } = this.state;
|
||||
const { params: { salaryInfoId } } = this.props;
|
||||
|
|
@ -56,7 +93,15 @@ class MySalaryView extends Component {
|
|||
isPreview isMsgPreview
|
||||
salaryTemplateShowSet={salaryTemplateShowSet ? JSON.stringify(salaryTemplateShowSet) : []}
|
||||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
|
||||
/>
|
||||
>
|
||||
{
|
||||
(_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0") &&
|
||||
<ConfirmBtns
|
||||
confirmSalaryBill={this.confirmSalaryBill}
|
||||
goFeedback={this.handleGoFeedback}
|
||||
/>
|
||||
}
|
||||
</ComputerTemplate>
|
||||
</div>
|
||||
</div>
|
||||
</Authority>
|
||||
|
|
@ -71,3 +116,10 @@ class MySalaryView extends Component {
|
|||
}
|
||||
|
||||
export default MySalaryView;
|
||||
|
||||
export const ConfirmBtns = (props) => {
|
||||
return <div className="space">
|
||||
<Button type="primary" onClick={props.confirmSalaryBill}>{getLabel(111, "确认")}</Button>
|
||||
<Button type="ghost" onClick={props.goFeedback}>{getLabel(111, "反馈")}</Button>
|
||||
</div>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -23,10 +23,7 @@ export default class SalarySendList extends React.Component {
|
|||
|
||||
// 发放回调
|
||||
handleGrant(record) {
|
||||
window.open(
|
||||
"/spa/hrmSalary/static/index.html#/main/hrmSalary/payrollGrant?id=" +
|
||||
record.id
|
||||
);
|
||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/payrollGrant?id=${record.id}&ackFeedbackStatus=${record.ackFeedbackStatus}`);
|
||||
}
|
||||
|
||||
// 查看详情
|
||||
|
|
|
|||
|
|
@ -64,7 +64,12 @@ export default class Payroll extends React.Component {
|
|||
|
||||
getReplenishForm = (isEdit = false, params = {}) => {
|
||||
const { payrollStore } = this.props;
|
||||
const { templateBaseData, salaryTemplateShowSet, setReplenishSalaryTemplateSalaryItemSet } = payrollStore;
|
||||
const {
|
||||
templateBaseData,
|
||||
salaryTemplateShowSet,
|
||||
setReplenishSalaryTemplateSalaryItemSet,
|
||||
setSalaryBillItemNameSet
|
||||
} = payrollStore;
|
||||
if (!salaryTemplateShowSet.theme && !isEdit) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
|
|
@ -77,10 +82,12 @@ export default class Payroll extends React.Component {
|
|||
if (!isEdit) {
|
||||
this.setState({ currentStep: this.state.currentStep + 1 }, () => {
|
||||
setReplenishSalaryTemplateSalaryItemSet(data.replenishSalaryTemplateSalaryItemSet);
|
||||
setSalaryBillItemNameSet(data.salaryBillItemNameSet);
|
||||
window.localStorage.setItem("salary-showset", JSON.stringify(salaryTemplateShowSet));
|
||||
});
|
||||
} else {
|
||||
setReplenishSalaryTemplateSalaryItemSet(data.replenishSalaryTemplateSalaryItemSet);
|
||||
setSalaryBillItemNameSet(data.salaryBillItemNameSet);
|
||||
window.localStorage.setItem("salary-showset", JSON.stringify(salaryTemplateShowSet));
|
||||
}
|
||||
}
|
||||
|
|
@ -261,7 +268,9 @@ export default class Payroll extends React.Component {
|
|||
setTemplateTableSelectedRowKeys,
|
||||
deletePayroll,
|
||||
templateBaseData,
|
||||
setTemplateTablePageInfo
|
||||
setTemplateTablePageInfo,
|
||||
setSalaryBillItemNameSetting,
|
||||
salaryBillItemNameSetting
|
||||
} = payrollStore;
|
||||
const { currentStep, selectedTab, templateSearchValue, templateSelect, startDate, endDate } = this.state;
|
||||
if (!hasRight && !loading) { // 无权限处理
|
||||
|
|
@ -316,7 +325,7 @@ export default class Payroll extends React.Component {
|
|||
{
|
||||
showOperateBtn &&
|
||||
<Button type="primary" onClick={() => {
|
||||
this.setState({ stepSlideVisible: true });
|
||||
this.setState({ stepSlideVisible: true, currentStep: 0 });
|
||||
}}>{getLabel(365, "新建")}</Button>
|
||||
}
|
||||
{
|
||||
|
|
@ -465,10 +474,16 @@ export default class Payroll extends React.Component {
|
|||
customOperate={
|
||||
currentStep === 0 ? [
|
||||
<Button type="primary" onClick={() => {
|
||||
setSalaryBillItemNameSetting(_.map(salaryBillItemNameSetting, it => {
|
||||
return { ...it, salaryTemplateId: "", itemShowNameSetting: [] };
|
||||
}));
|
||||
nextStep();
|
||||
}}>{getLabel(1402, "下一步")}</Button>
|
||||
] : currentStep === 1 ? [
|
||||
<Button type="default" onClick={() => {
|
||||
setSalaryBillItemNameSetting(_.map(salaryBillItemNameSetting, it => {
|
||||
return { ...it, salaryTemplateId: "", itemShowNameSetting: [] };
|
||||
}));
|
||||
prevStep();
|
||||
}}>{getLabel(1876, "上一步")}</Button>,
|
||||
<Button type="primary" onClick={() => this.getReplenishForm()}>{getLabel(1402, "下一步")}</Button>,
|
||||
|
|
@ -477,6 +492,9 @@ export default class Payroll extends React.Component {
|
|||
}}>{getLabel(221, "预览")}</Button>
|
||||
] : currentStep === 2 ? [
|
||||
<Button type="default" onClick={() => {
|
||||
setSalaryBillItemNameSetting(_.map(salaryBillItemNameSetting, it => {
|
||||
return { ...it, salaryTemplateId: "", itemShowNameSetting: [] };
|
||||
}));
|
||||
prevStep();
|
||||
}}>{getLabel(1876, "上一步")}</Button>,
|
||||
<Button type="primary" onClick={this.handleSave}>{getLabel(537558, "保存")}</Button>
|
||||
|
|
@ -506,7 +524,7 @@ export default class Payroll extends React.Component {
|
|||
className="slideOuterWrapper"
|
||||
visible={this.state.editSlideVisible}
|
||||
top={0}
|
||||
width={50}
|
||||
width={65}
|
||||
height={100}
|
||||
direction="right"
|
||||
measure="%"
|
||||
|
|
@ -539,6 +557,9 @@ export default class Payroll extends React.Component {
|
|||
}
|
||||
subItemChange={(selectedTab) => {
|
||||
this.setState({ selectedTab: Number(selectedTab) }, () => {
|
||||
setSalaryBillItemNameSetting(_.map(salaryBillItemNameSetting, it => {
|
||||
return { ...it, salaryTemplateId: "", itemShowNameSetting: [] };
|
||||
}));
|
||||
if (this.state.selectedTab === 2) this.getReplenishForm(true, { id: this.state.templateCurrentId });
|
||||
});
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ export default class PayrollGrant extends React.Component {
|
|||
selectedKey: "0",
|
||||
progressVisible: false,
|
||||
progress: 0,
|
||||
showFeedbackColumn: false,
|
||||
payrollPartModalParams: {
|
||||
visible: false,
|
||||
title: getLabel(538012, "工资单发放"),
|
||||
|
|
@ -38,7 +39,10 @@ export default class PayrollGrant extends React.Component {
|
|||
componentWillMount() {
|
||||
const { selectedKey } = this.state;
|
||||
let id = getQueryString("id");
|
||||
this.setState({ currentId: id });
|
||||
this.setState({
|
||||
currentId: id,
|
||||
showFeedbackColumn: getQueryString("ackFeedbackStatus") === "1"
|
||||
});
|
||||
const {
|
||||
payrollStore: { getPayrollInfo, getInfoList, getPaySa }
|
||||
} = this.props;
|
||||
|
|
@ -298,11 +302,12 @@ export default class PayrollGrant extends React.Component {
|
|||
};
|
||||
|
||||
getColumns = () => {
|
||||
const { selectedKey, showFeedbackColumn } = this.state;
|
||||
const { payrollStore } = this.props;
|
||||
const { salaryGrantTableStore: columns, salarySendDetailBaseInfo } = payrollStore;
|
||||
const notShowGrantOrWithdraw = salarySendDetailBaseInfo.haveBackCalc === 1 && salarySendDetailBaseInfo.salaryAcctType === "0";
|
||||
return _.map([
|
||||
...toJS(columns),
|
||||
..._.filter(toJS(columns), it => ((selectedKey === "0" && it.dataIndex !== "billReadStatus" && it.dataIndex !== "billConfirmStatus") || (selectedKey === "1" && !showFeedbackColumn && it.dataIndex !== "billReadStatus" && it.dataIndex !== "billConfirmStatus") || (selectedKey === "1" && showFeedbackColumn))),
|
||||
{
|
||||
title: getLabel(30585, "操作"),
|
||||
key: "",
|
||||
|
|
@ -601,6 +606,7 @@ export default class PayrollGrant extends React.Component {
|
|||
{
|
||||
this.state.progressVisible &&
|
||||
<ProgressModal
|
||||
title={getLabel(111, "正在发放中,请稍后...")}
|
||||
visible={this.state.progressVisible}
|
||||
onCancel={() => {
|
||||
this.setState({ progressVisible: false, progress: 0 });
|
||||
|
|
|
|||
|
|
@ -1,11 +1,23 @@
|
|||
import React from "react";
|
||||
import { WeaCheckbox, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaTimePicker } from "ecCom";
|
||||
import {
|
||||
WeaCheckbox,
|
||||
WeaFormItem,
|
||||
WeaHelpfulTip,
|
||||
WeaInput,
|
||||
WeaInputNumber,
|
||||
WeaLocaleProvider,
|
||||
WeaSearchGroup,
|
||||
WeaSelect,
|
||||
WeaTimePicker
|
||||
} from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { getReplenishRuleSetOptions } from "../../../apis/payroll";
|
||||
import { commonEnumList } from "../../../apis/payrollFiles";
|
||||
import moment from "moment";
|
||||
import { toJS } from "mobx";
|
||||
import "./index.less";
|
||||
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
@inject("payrollStore")
|
||||
@observer
|
||||
|
|
@ -16,6 +28,7 @@ export default class BaseInformForm extends React.Component {
|
|||
inited: false,
|
||||
options: [],
|
||||
replenishRuleOptions: [],
|
||||
salaryMonthOptions: [],
|
||||
request: {}
|
||||
};
|
||||
}
|
||||
|
|
@ -24,6 +37,7 @@ export default class BaseInformForm extends React.Component {
|
|||
const { payrollStore } = this.props;
|
||||
const { getPayrollBaseForm } = payrollStore;
|
||||
const templateBaseData = window.localStorage.getItem("template-basedata") || "{}";
|
||||
this.commonEnumList();
|
||||
getPayrollBaseForm(this.props.id).then(data => {
|
||||
this.setState(
|
||||
{
|
||||
|
|
@ -37,7 +51,8 @@ export default class BaseInformForm extends React.Component {
|
|||
msgStatus: !this.props.id ? "1" : data.templateBaseData.msgStatus,
|
||||
reissueRule: data.templateBaseData.replenishRule ? "1" : "0",
|
||||
...JSON.parse(templateBaseData),
|
||||
sendEmail: ""
|
||||
sendEmail: "",
|
||||
autoSendStatus: !_.isNil(data.templateBaseData.autoSendStatus) ? data.templateBaseData.autoSendStatus : false
|
||||
}
|
||||
}, () => {
|
||||
this.props.onChange && this.props.onChange(this.state.request);
|
||||
|
|
@ -50,7 +65,7 @@ export default class BaseInformForm extends React.Component {
|
|||
JSON.parse(templateBaseData).salarySob && this.getReplenishRuleSetOptions({ salarySobId: JSON.parse(templateBaseData).salarySob });
|
||||
}
|
||||
|
||||
hanldeChange = (params) => {
|
||||
handleChange = (params) => {
|
||||
let request = { ...this.state.request, ...params };
|
||||
this.setState({
|
||||
request
|
||||
|
|
@ -72,23 +87,24 @@ export default class BaseInformForm extends React.Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
commonEnumList = () => {
|
||||
commonEnumList({ enumClass: "com.engine.salary.enums.salarysend.SalaryAutoSendCycleTypeEnum" })
|
||||
.then(({ status, data }) => {
|
||||
if (status && !_.isEmpty(data)) {
|
||||
this.setState({
|
||||
salaryMonthOptions: _.map(data, it => ({ key: it.value.toString(), showname: it.defaultLabel }))
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { request, options, replenishRuleOptions } = this.state;
|
||||
const { request, options, replenishRuleOptions, salaryMonthOptions } = this.state;
|
||||
const {
|
||||
salarySob,
|
||||
name,
|
||||
description,
|
||||
replenishName,
|
||||
replenishRule,
|
||||
reissueRule,
|
||||
msgStatus,
|
||||
emailStatus,
|
||||
autoSendStatus,
|
||||
autoSendDayOfMonth,
|
||||
autoSendTimeOfDay
|
||||
salarySob, name, description, replenishName, replenishRule, reissueRule, msgStatus, emailStatus,
|
||||
ackFeedbackStatus, autoAckDays, feedbackUrl, autoSendStatus, autoSendDayOfMonth, autoSendTimeOfDay,
|
||||
autoSendCycleType
|
||||
} = request;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<WeaSearchGroup title="基础信息" items={[]} needTigger showGroup col={1} className="payrollBaseInfoWrapper">
|
||||
|
|
@ -104,7 +120,7 @@ export default class BaseInformForm extends React.Component {
|
|||
options={options}
|
||||
value={salarySob ? salarySob : ""}
|
||||
style={{ width: 200 }}
|
||||
onChange={value => this.hanldeChange({ salarySob: value })}/>
|
||||
onChange={value => this.handleChange({ salarySob: value })}/>
|
||||
}
|
||||
</WeaFormItem>
|
||||
<WeaFormItem
|
||||
|
|
@ -115,7 +131,7 @@ export default class BaseInformForm extends React.Component {
|
|||
<WeaInput
|
||||
value={name}
|
||||
viewAttr={3}
|
||||
onChange={value => this.hanldeChange({ name: value })}
|
||||
onChange={value => this.handleChange({ name: value })}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem
|
||||
|
|
@ -126,7 +142,7 @@ export default class BaseInformForm extends React.Component {
|
|||
<WeaInput
|
||||
value={replenishName}
|
||||
viewAttr={3}
|
||||
onChange={value => this.hanldeChange({ replenishName: value })}
|
||||
onChange={value => this.handleChange({ replenishName: value })}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem
|
||||
|
|
@ -139,7 +155,7 @@ export default class BaseInformForm extends React.Component {
|
|||
value={reissueRule}
|
||||
detailtype={3}
|
||||
viewAttr={3}
|
||||
onChange={value => this.hanldeChange({ reissueRule: value })}
|
||||
onChange={value => this.handleChange({ reissueRule: value })}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
{
|
||||
|
|
@ -153,7 +169,7 @@ export default class BaseInformForm extends React.Component {
|
|||
options={replenishRuleOptions}
|
||||
value={replenishRule}
|
||||
viewAttr={3}
|
||||
onChange={value => this.hanldeChange({ replenishRule: value })}
|
||||
onChange={value => this.handleChange({ replenishRule: value })}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
}
|
||||
|
|
@ -164,7 +180,7 @@ export default class BaseInformForm extends React.Component {
|
|||
>
|
||||
<WeaInput
|
||||
value={description}
|
||||
onChange={value => this.hanldeChange({ description: value })}
|
||||
onChange={value => this.handleChange({ description: value })}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
|
|
@ -172,47 +188,97 @@ export default class BaseInformForm extends React.Component {
|
|||
className="payrollBaseInfoWrapper">
|
||||
<WeaFormItem label={getLabel(543707, "系统消息")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaCheckbox value={msgStatus ? "1" : "0"} display="switch"
|
||||
onChange={value => this.hanldeChange({ msgStatus: value === "1" })}/>
|
||||
onChange={value => this.handleChange({ msgStatus: value === "1" })}/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem label={getLabel(71, "邮件")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaCheckbox value={emailStatus ? "1" : "0"} display="switch"
|
||||
onChange={value => this.hanldeChange({ emailStatus: value === "1" })}/>
|
||||
onChange={value => this.handleChange({ emailStatus: value === "1" })}/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem label={getLabel(111, "定时发送")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaCheckbox value={autoSendStatus ? "1" : "0"} display="switch"
|
||||
onChange={value => this.hanldeChange({ autoSendStatus: value === "1" })}/>
|
||||
onChange={value => {
|
||||
this.handleChange({
|
||||
autoSendStatus: value === "1",
|
||||
autoSendDayOfMonth: value === "1" ? "1" : null,
|
||||
autoSendTimeOfDay: value === "1" ? "09:00" : null,
|
||||
autoSendCycleType: value === "1" ? 1 : null
|
||||
});
|
||||
}}/>
|
||||
<WeaHelpfulTip title={getLabel(111, "开启后,还需在计划任务中配置定时任务,执行工资单定时发送任务;")}
|
||||
style={{ marginLeft: 10 }}
|
||||
placement="top" width={200}/>
|
||||
</WeaFormItem>
|
||||
{
|
||||
autoSendStatus &&
|
||||
<WeaFormItem label={getLabel(111, "发送时间")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<SendTimeComp
|
||||
salaryMonthOptions={salaryMonthOptions}
|
||||
value={{
|
||||
autoSendDayOfMonth,
|
||||
autoSendTimeOfDay
|
||||
autoSendTimeOfDay,
|
||||
autoSendCycleType
|
||||
}}
|
||||
onChange={this.hanldeChange}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
}
|
||||
</WeaSearchGroup>
|
||||
<WeaSearchGroup title={getLabel(111, "工资单确认反馈设置")} showGroup needTigger col={1}
|
||||
className="payrollBaseInfoWrapper">
|
||||
<WeaFormItem label={getLabel(111, "启用工资单确认")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaCheckbox value={ackFeedbackStatus ? "1" : "0"} display="switch"
|
||||
onChange={value => this.handleChange({
|
||||
ackFeedbackStatus: value === "1",
|
||||
autoAckDays: 7,
|
||||
feedbackUrl: "/"
|
||||
})}/>
|
||||
</WeaFormItem>
|
||||
{
|
||||
ackFeedbackStatus &&
|
||||
<React.Fragment>
|
||||
<WeaFormItem label={getLabel(111, "自动确认超时天数")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaInputNumber
|
||||
min={1} value={autoAckDays} viewAttr={3}
|
||||
style={{ width: "95%" }}
|
||||
onChange={autoAckDays => this.handleChange({ autoAckDays })}
|
||||
/>
|
||||
<WeaHelpfulTip
|
||||
title={getLabel(111, "开启后,还需在计划任务中配置定时任务,执行自动确认任务;邮箱端查看工资单暂不支持确认及反馈;")}
|
||||
style={{ marginLeft: 10 }}
|
||||
placement="top" width={200}/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem label={getLabel(111, "反馈流程地址")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaInput
|
||||
value={feedbackUrl} viewAttr={3}
|
||||
onChange={feedbackUrl => this.handleChange({ feedbackUrl })}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
</React.Fragment>
|
||||
}
|
||||
</WeaSearchGroup>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const SendTimeComp = (props) => {
|
||||
const { value, onChange } = props;
|
||||
const { autoSendDayOfMonth, autoSendTimeOfDay } = value;
|
||||
const { value, onChange, salaryMonthOptions } = props;
|
||||
const { autoSendDayOfMonth, autoSendTimeOfDay, autoSendCycleType } = value;
|
||||
|
||||
const handleChangeSendtime = (key, val) => {
|
||||
onChange({ autoSendDayOfMonth, autoSendTimeOfDay, [key]: val });
|
||||
onChange({ autoSendDayOfMonth, autoSendTimeOfDay, autoSendCycleType, [key]: val });
|
||||
};
|
||||
return <div className="customTimeCompWrapper">
|
||||
<div>
|
||||
<span>{getLabel(111, "每月")}</span>
|
||||
<span>{getLabel(542604, "薪资所属月")}</span>
|
||||
<WeaSelect
|
||||
value={autoSendCycleType.toString()}
|
||||
options={salaryMonthOptions}
|
||||
onChange={v => handleChangeSendtime("autoSendCycleType", Number(v))}
|
||||
/>
|
||||
<WeaSelect
|
||||
value={!_.isNil(autoSendDayOfMonth) ? autoSendDayOfMonth : "1"}
|
||||
options={_.map(getDay(), item => ({ key: item, showname: item }))}
|
||||
options={_.map(getDay(autoSendCycleType), item => ({ key: item, showname: item }))}
|
||||
onChange={v => handleChangeSendtime("autoSendDayOfMonth", v)}
|
||||
/>
|
||||
<span>{getLabel(16992, "号")}</span>
|
||||
|
|
@ -222,15 +288,14 @@ const SendTimeComp = (props) => {
|
|||
</div>;
|
||||
};
|
||||
|
||||
const getDay = () => {
|
||||
const getDay = (num = 1) => {
|
||||
let days = [];
|
||||
let day = getDaysInMonth(moment().year(), moment().month() + 1);
|
||||
let day = getDaysInMonth(moment().year(), moment().month() + num);
|
||||
for (let i = 1; i <= day; i++) {
|
||||
days.push(i);
|
||||
}
|
||||
return days;
|
||||
};
|
||||
|
||||
const getDaysInMonth = (year, month) => {
|
||||
month = parseInt(month, 10);
|
||||
let d = new Date(year, month, 0);
|
||||
|
|
|
|||
|
|
@ -192,9 +192,11 @@
|
|||
|
||||
.salaryItemName {
|
||||
width: 100%;
|
||||
min-height: 18px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
i.anticon-cross {
|
||||
|
|
|
|||
|
|
@ -17,13 +17,16 @@ class SalaryItemSettings extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
dataList: [],
|
||||
itemShowNamesetting: [], //名称修改集合
|
||||
checkedValue: "",
|
||||
modalPayload: {
|
||||
visible: false,
|
||||
title: "",
|
||||
groupId: "",
|
||||
groupName: "",
|
||||
options: []
|
||||
options: [],
|
||||
salaryItemName: "",
|
||||
salaryItemId: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -99,7 +102,9 @@ class SalaryItemSettings extends Component {
|
|||
title: "",
|
||||
groupId: "",
|
||||
groupName: "",
|
||||
options: []
|
||||
options: [],
|
||||
salaryItemName: "",
|
||||
salaryItemId: ""
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -212,9 +217,63 @@ class SalaryItemSettings extends Component {
|
|||
});
|
||||
}
|
||||
};
|
||||
handleEditSalaryItemName = (item, field, viewAttr) => {
|
||||
const { groupId } = item, { salaryItemId } = field, { dataList } = this.state;
|
||||
if (groupId === "111111111111111111") return;
|
||||
this.setState({
|
||||
dataList: _.map(dataList, item => {
|
||||
if (item.groupId === groupId) {
|
||||
return {
|
||||
...item,
|
||||
items: _.map(item.items, child => {
|
||||
if (child.salaryItemId === salaryItemId) {
|
||||
return {
|
||||
...child,
|
||||
viewAttr
|
||||
};
|
||||
}
|
||||
return { ...child, viewAttr: 1 };
|
||||
})
|
||||
};
|
||||
}
|
||||
return {
|
||||
...item,
|
||||
items: _.map(item.items, child => {
|
||||
return { ...child, viewAttr: 1 };
|
||||
})
|
||||
};
|
||||
})
|
||||
}, () => document.getElementById("salaryItemInput") && document.getElementById("salaryItemInput").focus());
|
||||
};
|
||||
handleChangeSalaryItemShowName = (item, field, name) => {
|
||||
const { groupId } = item, { salaryItemId, originName } = field, { dataList, itemShowNamesetting } = this.state;
|
||||
this.setState({
|
||||
dataList: _.map(dataList, item => {
|
||||
if (item.groupId === groupId) {
|
||||
return {
|
||||
...item,
|
||||
items: _.map(item.items, child => {
|
||||
if (child.salaryItemId === salaryItemId) {
|
||||
return { ...child, salaryItemShowName: name, name };
|
||||
}
|
||||
return { ...child };
|
||||
})
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
}),
|
||||
itemShowNamesetting: _.unionBy([{
|
||||
salaryItemId,
|
||||
salaryItemShowName: originName === name ? "" : name
|
||||
}], itemShowNamesetting, "salaryItemId")
|
||||
}, () => {
|
||||
this.props.onChangeSalaryItem(this.state.dataList);
|
||||
this.props.onChangeSalaryItemShowNamesetting(this.state.itemShowNamesetting);
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { onChangeSalaryItem } = this.props;
|
||||
const { onChangeSalaryItem, salaryBillItemNameSet } = this.props;
|
||||
const { dataList, modalPayload, checkedValue } = this.state;
|
||||
return (
|
||||
<div className="salaryItemSettingWrapper">
|
||||
|
|
@ -247,9 +306,36 @@ class SalaryItemSettings extends Component {
|
|||
})
|
||||
)}
|
||||
renderNodeItem={(filed) => {
|
||||
const salaryBillItemNameObj = salaryBillItemNameSet[filed.id] || {};
|
||||
return <div className="salaryItemList">
|
||||
<div className="salaryItem" title={filed.name}>
|
||||
<div className="salaryItemName">{filed.name}</div>
|
||||
<div className="salaryItem"
|
||||
title={
|
||||
(item.groupId !== "111111111111111111" && (!_.isEmpty(salaryBillItemNameObj) || (filed.salaryItemShowName !== filed.originName))) ?
|
||||
`${filed.salaryItemShowName}(${filed.originName})` :
|
||||
filed.name
|
||||
}
|
||||
>
|
||||
{
|
||||
filed.viewAttr === 2 ?
|
||||
<WeaInput
|
||||
value={
|
||||
item.groupId !== "111111111111111111" ?
|
||||
filed.salaryItemShowName :
|
||||
filed.name
|
||||
}
|
||||
id="salaryItemInput"
|
||||
onBlur={() => this.handleEditSalaryItemName(item, filed, 1)}
|
||||
onChange={(val) => this.handleChangeSalaryItemShowName(item, filed, val)}
|
||||
/> :
|
||||
<div className="salaryItemName"
|
||||
onClick={() => this.handleEditSalaryItemName(item, filed, 2)}>
|
||||
{
|
||||
(item.groupId !== "111111111111111111" && (!_.isEmpty(salaryBillItemNameObj) || (filed.salaryItemShowName !== filed.originName))) ?
|
||||
`${filed.salaryItemShowName}(${filed.originName})` :
|
||||
filed.name
|
||||
}
|
||||
</div>
|
||||
}
|
||||
<Icon type="cross" onClick={() => this.handleDeleteSalaryItem(item, filed)}/>
|
||||
</div>
|
||||
</div>;
|
||||
|
|
|
|||
|
|
@ -40,12 +40,21 @@ export default class ShowSettingForm extends React.Component {
|
|||
const { payrollStore: { setSalaryItemSet } } = this.props;
|
||||
setSalaryItemSet(resultSet);
|
||||
};
|
||||
handleChangeSalaryItemShowNamesetting = (itemShowNamesetting) => {
|
||||
const { payrollStore: { setSalaryBillItemNameSetting, salaryBillItemNameSetting } } = this.props;
|
||||
setSalaryBillItemNameSetting(_.map(salaryBillItemNameSetting, it => {
|
||||
if (it.salaryBillType === 0) {
|
||||
return { ...it, salaryTemplateId: this.props.id, itemShowNameSetting: itemShowNamesetting };
|
||||
}
|
||||
return { ...it, salaryTemplateId: this.props.id };
|
||||
}));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { payrollStore, id } = this.props;
|
||||
const salaryTemplateShowSetStorage = (id ? "{}" : window.localStorage.getItem("salary-showset") || "{}");
|
||||
const { salaryTemplateShowSet } = payrollStore;
|
||||
const { salaryItemSet, templateBaseData } = payrollStore;
|
||||
const { salaryItemSet, templateBaseData, salaryBillItemNameSet } = payrollStore;
|
||||
const {
|
||||
theme,
|
||||
background,
|
||||
|
|
@ -141,8 +150,9 @@ export default class ShowSettingForm extends React.Component {
|
|||
ref={dom => this.salaryItemSettingsRef = dom}
|
||||
dataSource={salaryItemSet}
|
||||
onChangeSalaryItem={this.handleChangeSalaryItem}
|
||||
onChangeSalaryItemShowNamesetting={this.handleChangeSalaryItemShowNamesetting}
|
||||
salarySobId={toJS(templateBaseData).salarySob}
|
||||
isReplenish={false}
|
||||
isReplenish={false} salaryBillItemNameSet={salaryBillItemNameSet}
|
||||
/>
|
||||
</WeaSearchGroup>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -14,9 +14,19 @@ export default class TemplateSettingForm extends React.Component {
|
|||
setReplenishSalaryTemplateSalaryItemSet(resultSet);
|
||||
};
|
||||
|
||||
handleChangeSalaryItemShowNamesetting = (itemShowNamesetting) => {
|
||||
const { payrollStore: { setSalaryBillItemNameSetting, salaryBillItemNameSetting } } = this.props;
|
||||
setSalaryBillItemNameSetting(_.map(salaryBillItemNameSetting, it => {
|
||||
if (it.salaryBillType === 1) {
|
||||
return { ...it, salaryTemplateId: this.props.id, itemShowNameSetting: itemShowNamesetting };
|
||||
}
|
||||
return { ...it, salaryTemplateId: this.props.id };
|
||||
}));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { payrollStore } = this.props;
|
||||
const { replenishSalaryTemplateSalaryItemSet, templateBaseData } = payrollStore;
|
||||
const { replenishSalaryTemplateSalaryItemSet, templateBaseData, salaryBillItemNameSet } = payrollStore;
|
||||
return (
|
||||
<div className="showSettingForm">
|
||||
<WeaSearchGroup
|
||||
|
|
@ -32,8 +42,9 @@ export default class TemplateSettingForm extends React.Component {
|
|||
ref={dom => this.salaryItemSettingsRef = dom}
|
||||
dataSource={replenishSalaryTemplateSalaryItemSet}
|
||||
onChangeSalaryItem={this.handleChangeSalaryItem}
|
||||
onChangeSalaryItemShowNamesetting={this.handleChangeSalaryItemShowNamesetting}
|
||||
salarySobId={toJS(templateBaseData).salarySob}
|
||||
isReplenish={true}
|
||||
isReplenish={true} salaryBillItemNameSet={salaryBillItemNameSet}
|
||||
/>
|
||||
</WeaSearchGroup>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,17 @@
|
|||
* Date: 2023/6/12
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom";
|
||||
import { message } from "antd";
|
||||
import {
|
||||
WeaCheckbox,
|
||||
WeaFormItem,
|
||||
WeaHelpfulTip,
|
||||
WeaInput,
|
||||
WeaInputNumber,
|
||||
WeaLocaleProvider,
|
||||
WeaSearchGroup,
|
||||
WeaSelect
|
||||
} from "ecCom";
|
||||
import { message, Modal } from "antd";
|
||||
import { getSalaryBillBaseSetForm, salaryBillBaseSetSave } from "../../apis/payroll";
|
||||
import WaterMarkSetModal from "./components/waterMarkSetModal";
|
||||
import "./index.less";
|
||||
|
|
@ -22,6 +31,11 @@ class TemplateBaseSettings extends Component {
|
|||
wmSetting: null,
|
||||
watermarkSet: {
|
||||
visible: false, watermarkSetting: null
|
||||
},
|
||||
ackFeedbackSetting: {
|
||||
ackStatus: "0",
|
||||
autoAckDays: 7,
|
||||
feedBackUrl: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -34,9 +48,10 @@ class TemplateBaseSettings extends Component {
|
|||
const { watermarkSet } = this.state;
|
||||
getSalaryBillBaseSetForm().then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { watermarkStatus, watermark = "DEFAULT", watermarkSetting } = data;
|
||||
const { watermarkStatus, watermark = "DEFAULT", watermarkSetting, ackFeedbackSetting } = data;
|
||||
this.setState({
|
||||
watermark, watermarkStatus: watermarkStatus ? "1" : "0",
|
||||
watermark, watermarkStatus: watermarkStatus ? "1" : "0", ackFeedbackSetting,
|
||||
wmSetting: { wmSetting: watermarkSetting },
|
||||
watermarkSet: {
|
||||
...watermarkSet,
|
||||
watermarkSetting
|
||||
|
|
@ -46,8 +61,16 @@ class TemplateBaseSettings extends Component {
|
|||
});
|
||||
};
|
||||
salaryBillBaseSetSave = () => {
|
||||
const { watermark, watermarkStatus, wmSetting } = this.state;
|
||||
let payload = { watermarkStatus: watermarkStatus === "1" };
|
||||
const { watermark, watermarkStatus, wmSetting, ackFeedbackSetting } = this.state;
|
||||
const { feedBackUrl } = ackFeedbackSetting;
|
||||
if (!feedBackUrl) {
|
||||
Modal.warning({
|
||||
title: getLabel(111, "信息确认"),
|
||||
content: getLabel(111, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
let payload = { watermarkStatus: watermarkStatus === "1", ackFeedbackSetting: { ...ackFeedbackSetting } };
|
||||
if (watermarkStatus === "1") payload = { ...payload, watermark };
|
||||
if (!_.isNil(wmSetting)) payload = { ...payload, watermark, ...wmSetting };
|
||||
this.props.onChangeLoading(true);
|
||||
|
|
@ -63,40 +86,81 @@ class TemplateBaseSettings extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { watermarkStatus, watermark, watermarkSet } = this.state;
|
||||
const { watermarkStatus, watermark, watermarkSet, ackFeedbackSetting } = this.state;
|
||||
const { ackStatus, autoAckDays, feedBackUrl } = ackFeedbackSetting;
|
||||
return (
|
||||
<WeaSearchGroup title={getLabel(538702, "水印设置")} showGroup needTigger className="waterMarkWrapper">
|
||||
<WeaFormItem label={getLabel(504479, "启用水印")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||
<WeaCheckbox value={watermarkStatus} display="switch"
|
||||
onChange={watermarkStatus => this.setState({ watermarkStatus, watermark: "DEFAULT" })}/>
|
||||
</WeaFormItem>
|
||||
{
|
||||
watermarkStatus === "1" &&
|
||||
<WeaFormItem label={getLabel(389186, "水印类型")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||
<WeaSelect
|
||||
value={watermark}
|
||||
options={[
|
||||
{ key: "DEFAULT", showname: getLabel(504453, "系统默认水印") },
|
||||
{ key: "CUSTOM", showname: getLabel(517111, "自定义水印") }
|
||||
]}
|
||||
onChange={watermark => this.setState({ watermark })}
|
||||
/>
|
||||
{
|
||||
watermark === "CUSTOM" &&
|
||||
<span className="waterMarkTitle" onClick={() => this.setState({
|
||||
watermarkSet: {
|
||||
...watermarkSet,
|
||||
visible: true
|
||||
}
|
||||
})}>{getLabel(538702, "水印设置")}</span>
|
||||
}
|
||||
<WaterMarkSetModal {...watermarkSet}
|
||||
onClose={() => this.setState({ watermarkSet: { ...watermarkSet, visible: false } })}
|
||||
onChange={wmSetting => this.setState({ wmSetting })}
|
||||
/>
|
||||
<React.Fragment>
|
||||
<WeaSearchGroup title={getLabel(538702, "水印设置")} showGroup needTigger className="waterMarkWrapper">
|
||||
<WeaFormItem label={getLabel(504479, "启用水印")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||
<WeaCheckbox value={watermarkStatus} display="switch"
|
||||
onChange={watermarkStatus => this.setState({ watermarkStatus, watermark: "DEFAULT" })}/>
|
||||
</WeaFormItem>
|
||||
}
|
||||
</WeaSearchGroup>
|
||||
{
|
||||
watermarkStatus === "1" &&
|
||||
<WeaFormItem label={getLabel(389186, "水印类型")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||
<WeaSelect
|
||||
value={watermark}
|
||||
options={[
|
||||
{ key: "DEFAULT", showname: getLabel(504453, "系统默认水印") },
|
||||
{ key: "CUSTOM", showname: getLabel(517111, "自定义水印") }
|
||||
]}
|
||||
onChange={watermark => this.setState({ watermark })}
|
||||
/>
|
||||
{
|
||||
watermark === "CUSTOM" &&
|
||||
<span className="waterMarkTitle" onClick={() => this.setState({
|
||||
watermarkSet: {
|
||||
...watermarkSet,
|
||||
visible: true
|
||||
}
|
||||
})}>{getLabel(538702, "水印设置")}</span>
|
||||
}
|
||||
<WaterMarkSetModal {...watermarkSet}
|
||||
onClose={() => this.setState({ watermarkSet: { ...watermarkSet, visible: false } })}
|
||||
onChange={wmSetting => this.setState({ wmSetting })}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
}
|
||||
</WeaSearchGroup>
|
||||
<WeaSearchGroup title={getLabel(111, "工资单确认反馈设置")} showGroup needTigger className="waterMarkWrapper">
|
||||
<WeaFormItem label={getLabel(111, "启用工资单确认")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||
<WeaCheckbox value={ackStatus} display="switch"
|
||||
onChange={ackStatus => this.setState({
|
||||
ackFeedbackSetting: {
|
||||
...ackFeedbackSetting, ackStatus, autoAckDays: 7
|
||||
}
|
||||
})}/>
|
||||
</WeaFormItem>
|
||||
{
|
||||
ackStatus === "1" &&
|
||||
<React.Fragment>
|
||||
<WeaFormItem label={getLabel(111, "自动确认超时天数")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||
<WeaInputNumber
|
||||
min={1} value={autoAckDays} viewAttr={3}
|
||||
style={{ width: "90%" }}
|
||||
onChange={autoAckDays => this.setState({
|
||||
ackFeedbackSetting: {
|
||||
...ackFeedbackSetting, autoAckDays
|
||||
}
|
||||
})}/>
|
||||
<WeaHelpfulTip
|
||||
title={getLabel(111, "开启后,还需在计划任务中配置定时任务,执行自动确认任务;邮箱端查看工资单暂不支持确认及反馈;")}
|
||||
style={{ marginLeft: 10 }}
|
||||
placement="top" width={200}/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem label={getLabel(111, "反馈流程地址")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||
<WeaInput
|
||||
value={feedBackUrl} viewAttr={3}
|
||||
onChange={feedBackUrl => this.setState({
|
||||
ackFeedbackSetting: {
|
||||
...ackFeedbackSetting, feedBackUrl
|
||||
}
|
||||
})}/>
|
||||
</WeaFormItem>
|
||||
</React.Fragment>
|
||||
}
|
||||
</WeaSearchGroup>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ export default class ComputerTemplate extends React.Component {
|
|||
}
|
||||
|
||||
|
||||
renderTableTr = (data) => {
|
||||
renderTableTr = (data, groupId) => {
|
||||
const tables = [];
|
||||
const len = data.length;
|
||||
const rowNum = 3;
|
||||
|
|
@ -61,8 +61,9 @@ export default class ComputerTemplate extends React.Component {
|
|||
iLen = iLen > len ? len : iLen;
|
||||
tables.push("<tr class='descriptions-row'>");
|
||||
for (let i = j * rowNum; i < iLen; i++) {
|
||||
const key = (!this.props.isPreview && groupId !== "111111111111111111") ? data[i].salaryItemShowName : data[i].name;
|
||||
const value = data[i].salaryItemValue || "-";
|
||||
tables.push("<th class=\"descriptions-item-label\">" + data[i].name + "</th>" + "<td class=\"descriptions-item-content\">" + value + "</td>");
|
||||
tables.push("<th class=\"descriptions-item-label\">" + key + "</th>" + "<td class=\"descriptions-item-content\">" + value + "</td>");
|
||||
}
|
||||
tables.push("</tr>");
|
||||
}
|
||||
|
|
@ -98,7 +99,7 @@ export default class ComputerTemplate extends React.Component {
|
|||
<div className="descript-title">{group.groupName}</div>
|
||||
<div className="descriptions-view">
|
||||
<table
|
||||
dangerouslySetInnerHTML={{ __html: this.renderTableTr(group.items).join(",").replace(/,/g, "") }}/>
|
||||
dangerouslySetInnerHTML={{ __html: this.renderTableTr(group.items, group.groupId).join(",").replace(/,/g, "") }}/>
|
||||
</div>
|
||||
</div>;
|
||||
})
|
||||
|
|
@ -109,6 +110,7 @@ export default class ComputerTemplate extends React.Component {
|
|||
salaryTemplateShowSet.textContentPosition == 2 && salaryTemplateShowSet.textContent
|
||||
}
|
||||
</div>
|
||||
{this.props.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,8 @@
|
|||
margin: 10px;
|
||||
background-color: #FFF;
|
||||
padding: 10px;
|
||||
.descript-title{
|
||||
|
||||
.descript-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
|
|
@ -100,15 +101,18 @@
|
|||
border: 1px solid #fafafa;
|
||||
border-bottom: none;
|
||||
}
|
||||
.descriptions-view{
|
||||
|
||||
.descriptions-view {
|
||||
width: 100%;
|
||||
table{
|
||||
|
||||
table {
|
||||
table-layout: fixed;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
border: 1px solid rgba(0,0,0,.06);
|
||||
.descriptions-row{
|
||||
.descriptions-item-label{
|
||||
border: 1px solid rgba(0, 0, 0, .06);
|
||||
|
||||
.descriptions-row {
|
||||
.descriptions-item-label {
|
||||
background-color: #fafafa;
|
||||
padding: 16px 24px;
|
||||
color: #000000d9;
|
||||
|
|
@ -116,11 +120,12 @@
|
|||
font-size: 12px;
|
||||
line-height: 1.5715;
|
||||
text-align: start;
|
||||
border: 1px solid rgba(0,0,0,.06);
|
||||
border: 1px solid rgba(0, 0, 0, .06);
|
||||
min-width: 100px;
|
||||
max-width: 100px;
|
||||
}
|
||||
.descriptions-item-content{
|
||||
|
||||
.descriptions-item-content {
|
||||
padding: 16px 24px;
|
||||
display: table-cell;
|
||||
flex: 1;
|
||||
|
|
@ -130,10 +135,20 @@
|
|||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid rgba(0,0,0,.06);
|
||||
border: 1px solid rgba(0, 0, 0, .06);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.space {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
.ant-btn {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,8 @@ export default class PhoneTemplate extends React.Component {
|
|||
{
|
||||
_.map(group.items, item => {
|
||||
return <tr className="descriptions-row">
|
||||
<th className="descriptions-item-label">{item.name}</th>
|
||||
<th
|
||||
className="descriptions-item-label">{(!this.props.isPreview && group.groupId !== "111111111111111111") ? item.salaryItemShowName : item.name}</th>
|
||||
<td className="descriptions-item-content">{item.salaryItemValue || "-"}</td>
|
||||
</tr>;
|
||||
})
|
||||
|
|
@ -100,6 +101,7 @@ export default class PhoneTemplate extends React.Component {
|
|||
salaryTemplateShowSet.textContentPosition == 2 && salaryTemplateShowSet.textContent
|
||||
}
|
||||
</div>
|
||||
{this.props.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ class ImportMenu extends Component {
|
|||
};
|
||||
// 导入档案
|
||||
handleImportFile = (params) => {
|
||||
const { isExtEmp = false } = this.props;
|
||||
if (this.state.importParams.importType === "init" || this.state.importParams.importType === "salaryItemAdjust") {
|
||||
params.importType = this.state.importParams.importType;
|
||||
params.listType = "FIXED";
|
||||
|
|
@ -102,7 +103,7 @@ class ImportMenu extends Component {
|
|||
params.importType = "";
|
||||
params.listType = this.state.importParams.importType;
|
||||
}
|
||||
API.importSalaryArchive(params).then(({ status, data }) => {
|
||||
API.importSalaryArchive({ ...params, isExtEmp }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
data.errorData = data.errorNotice;
|
||||
this.setState({
|
||||
|
|
@ -116,7 +117,7 @@ class ImportMenu extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { importType, refreshList } = this.props;
|
||||
const { importType, refreshList, isExtEmp } = this.props;
|
||||
const { importParams, previewColumns, previewDataSource } = this.state;
|
||||
let params = "";
|
||||
if (importParams.importType === "init" || importParams.importType === "salaryItemAdjust") {
|
||||
|
|
@ -124,6 +125,7 @@ class ImportMenu extends Component {
|
|||
} else {
|
||||
params = "" + "&listType=" + importParams.importType;
|
||||
}
|
||||
if (isExtEmp) params = params + "&extSalaryArchiveList=true";
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Menu className="dropdownMenuWrapper" onClick={this.handleMenuClick}>
|
||||
|
|
|
|||
|
|
@ -26,5 +26,12 @@ export const tabCondition = [
|
|||
showcount: true,
|
||||
title: "停薪员工",
|
||||
viewcondition: "stop"
|
||||
},
|
||||
{
|
||||
color: "#000000",
|
||||
groupid: "EXT",
|
||||
showcount: true,
|
||||
title: "非系统人员",
|
||||
viewcondition: "ext"
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import BatchSuspendsPay from "./components/batchSuspendsPay";
|
|||
import SlideModalTitle from "../../components/slideModalTitle";
|
||||
import SalaryFileViewSlide from "../salaryFile/saralyFileViewSlide";
|
||||
import ChangeSalaryModal from "../salaryFile/changeSalaryModal";
|
||||
import { sysinfo } from "../../apis/ruleconfig";
|
||||
import { i18n } from "../calculateDetail/userSure";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -71,7 +72,7 @@ class Index extends Component {
|
|||
workcode: "",
|
||||
departmentIds: "",
|
||||
positionIds: "",
|
||||
userstatus: "",
|
||||
statuses: "",
|
||||
// archiveStatus: "EFFICIENT",
|
||||
taxAgentId: "",
|
||||
subcompanyIds: ""
|
||||
|
|
@ -87,7 +88,8 @@ class Index extends Component {
|
|||
payStartDate: "",
|
||||
payEndDate: ""
|
||||
},
|
||||
salaryArchiveDelete: "" //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是
|
||||
salaryArchiveDelete: "", //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是,
|
||||
extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -129,9 +131,9 @@ class Index extends Component {
|
|||
};
|
||||
Select = (value, key) => {
|
||||
const { taxAgentStore } = this.props;
|
||||
const { userstatus, archiveStatus, taxAgentId } = this.state.searchItemsValue;
|
||||
const { statuses, archiveStatus, taxAgentId } = this.state.searchItemsValue;
|
||||
const { archiveStatusList, userStatusList } = this.state;
|
||||
const { taxAgentAdminOption } = taxAgentStore;
|
||||
const { taxAgentOption } = taxAgentStore;
|
||||
return (
|
||||
<WeaFormItem
|
||||
label={value}
|
||||
|
|
@ -139,11 +141,12 @@ class Index extends Component {
|
|||
wrapperCol={{ span: 18 }}
|
||||
>
|
||||
<WeaSelect
|
||||
value={key === "userstatus" ? userstatus : key === "taxAgentId" ? taxAgentId : archiveStatus}
|
||||
options={key === "userstatus" ? userStatusList : key === "taxAgentId" ? [{
|
||||
multiple={key === "statuses"}
|
||||
value={key === "statuses" ? statuses : key === "taxAgentId" ? taxAgentId : archiveStatus}
|
||||
options={key === "statuses" ? userStatusList : key === "taxAgentId" ? [{
|
||||
key: "",
|
||||
showname: ""
|
||||
}, ...taxAgentAdminOption] : archiveStatusList}
|
||||
}, ...taxAgentOption] : archiveStatusList}
|
||||
onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
|
|
@ -151,10 +154,11 @@ class Index extends Component {
|
|||
|
||||
componentDidMount() {
|
||||
const { taxAgentStore } = this.props;
|
||||
const { getTaxAgentSelectListAsAdmin } = taxAgentStore;
|
||||
getTaxAgentSelectListAsAdmin();
|
||||
const { fetchTaxAgentOption } = taxAgentStore;
|
||||
fetchTaxAgentOption();
|
||||
this.queryTabTotal();
|
||||
this.queryList("/api/bs/hrmsalary/salaryArchive/pendingList");
|
||||
this.getSysinfo();
|
||||
const init = this.init();
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
|
@ -163,6 +167,18 @@ class Index extends Component {
|
|||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 非系统人员开关查询
|
||||
* Params:
|
||||
* Date: 2023/7/14
|
||||
*/
|
||||
getSysinfo = () => {
|
||||
sysinfo().then(({ status, data }) => {
|
||||
if (status) this.setState({ extEmpsWitch: data.extEmpsWitch });
|
||||
});
|
||||
};
|
||||
|
||||
handleReceive = ({ data }) => {
|
||||
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({
|
||||
|
|
@ -219,10 +235,7 @@ class Index extends Component {
|
|||
key: String(it.value),
|
||||
showname: it.defaultLabel
|
||||
}))],
|
||||
userStatusList: [{
|
||||
key: "",
|
||||
showname: ""
|
||||
}, ..._.map(userStatusList, it => ({
|
||||
userStatusList: [..._.map(userStatusList, it => ({
|
||||
key: String(it.value),
|
||||
showname: it.defaultLabel
|
||||
}))],
|
||||
|
|
@ -502,6 +515,27 @@ class Index extends Component {
|
|||
}}/></Button>
|
||||
</Dropdown>
|
||||
];
|
||||
} else if (selectedKey === "ext" && showOperateBtn) {
|
||||
return [
|
||||
<WeaHelpfulTip
|
||||
width={300}
|
||||
title={<HelpfulDiv/>}
|
||||
placement="topLeft"
|
||||
/>,
|
||||
<Dropdown overlay={
|
||||
<ImportMenu
|
||||
isExtEmp importType={importType}
|
||||
refreshList={() => {
|
||||
this.query();
|
||||
this.setState({ selectedRowKeys: [] });
|
||||
}}/>
|
||||
}>
|
||||
<Button type="primary">导入<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>
|
||||
];
|
||||
}
|
||||
return [];
|
||||
};
|
||||
|
|
@ -588,7 +622,7 @@ class Index extends Component {
|
|||
window.open(`${linkUrl}&salaryArchiveId=${id}`);
|
||||
}}>发起调薪</Button>);
|
||||
}
|
||||
if (showOperateBtn && selectedKey === "fixed") {
|
||||
if (showOperateBtn && (selectedKey === "fixed" || selectedKey === "ext")) {
|
||||
arrList.push(<Button type="primary" onClick={() => {
|
||||
this.setState({ changeSalaryVisible: true });
|
||||
}}>{getLabel(542686, "调薪")}</Button>);
|
||||
|
|
@ -636,7 +670,7 @@ class Index extends Component {
|
|||
salaryItemId: it.id,
|
||||
adjustValue: String(it.value || "")
|
||||
})),
|
||||
status: _.upperCase(selectedKey)
|
||||
status: selectedKey === "ext" ? "FIXED" : _.upperCase(selectedKey)
|
||||
};
|
||||
API.savePaySet(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
|
|
@ -669,9 +703,12 @@ class Index extends Component {
|
|||
case "suspend":
|
||||
this.queryList("/api/bs/hrmsalary/salaryArchive/suspendList");
|
||||
break;
|
||||
default:
|
||||
case "stop":
|
||||
this.queryList("/api/bs/hrmsalary/salaryArchive/stopList");
|
||||
break;
|
||||
default:
|
||||
this.queryList("/api/bs/hrmsalary/salaryArchive/extList");
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -684,7 +721,8 @@ class Index extends Component {
|
|||
showSearchAd,
|
||||
slideParams,
|
||||
changeSalaryVisible,
|
||||
paysetParams
|
||||
paysetParams,
|
||||
extEmpsWitch
|
||||
} = this.state;
|
||||
const { payrollFilesStore: { tableStore } } = this.props;
|
||||
const renderSearch = () => {
|
||||
|
|
@ -693,7 +731,7 @@ class Index extends Component {
|
|||
{ com: this.Browser(getLabel(33553, "分部"), "subcompanyIds") },
|
||||
{ com: this.Browser(getLabel(27511, "部门"), "departmentIds") },
|
||||
{ com: this.Browser(getLabel(6086, "岗位"), "positionIds") },
|
||||
{ com: this.Select(getLabel(382300, "人员状态"), "userstatus") },
|
||||
{ com: this.Select(getLabel(382300, "人员状态"), "statuses") },
|
||||
// { com: this.Select(getLabel(543311, "档案状态"), "archiveStatus") },
|
||||
{ com: this.Select(getLabel(537996, "个税扣缴义务人"), "taxAgentId") },
|
||||
{ com: this.Input(getLabel(1933, "工号"), "workcode") }
|
||||
|
|
@ -718,7 +756,7 @@ class Index extends Component {
|
|||
workcode: "",
|
||||
departmentIds: "",
|
||||
positionIds: "",
|
||||
userstatus: "",
|
||||
statuses: "",
|
||||
archiveStatus: ""
|
||||
}
|
||||
})}> {getLabel(2022, "重置")} </Button>,
|
||||
|
|
@ -743,7 +781,7 @@ class Index extends Component {
|
|||
dropMenuDatas={rightMenu}
|
||||
>
|
||||
<WeaTab
|
||||
datas={tabCondition}
|
||||
datas={extEmpsWitch === "0" ? _.dropRight(tabCondition) : tabCondition}
|
||||
counts={tabCount}
|
||||
className="payrollFilesTab"
|
||||
keyParam="viewcondition" //主键
|
||||
|
|
|
|||
|
|
@ -0,0 +1,451 @@
|
|||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { format_with_regex } from "../../../util";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
export const condition = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 2,
|
||||
checkbox: false,
|
||||
checkboxValue: false,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgent"],
|
||||
fieldcol: 18,
|
||||
label: getLabel(111, "个税扣缴义务人"),
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
multiple: true,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: getLabel(111, "分部"),
|
||||
type: "164",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 2,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["subCompany"],
|
||||
fieldcol: 18,
|
||||
isQuickSearch: false,
|
||||
label: getLabel(111, "分部"),
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: getLabel(111, "部门"),
|
||||
type: "57",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 2,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["department"],
|
||||
fieldcol: 18,
|
||||
isQuickSearch: false,
|
||||
label: getLabel(111, "部门"),
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
// {
|
||||
// browserConditionParam: {
|
||||
// completeParams: {},
|
||||
// conditionDataParams: {},
|
||||
// dataParams: {},
|
||||
// destDataParams: {},
|
||||
// hasAddBtn: false,
|
||||
// hasAdvanceSerach: true,
|
||||
// idSeparator: ",",
|
||||
// isAutoComplete: 1,
|
||||
// isDetail: 0,
|
||||
// isMultCheckbox: false,
|
||||
// isSingle: false,
|
||||
// linkUrl: "",
|
||||
// pageSize: 10,
|
||||
// quickSearchName: "",
|
||||
// replaceDatas: [],
|
||||
// title: getLabel(111, "岗位"),
|
||||
// type: "278",
|
||||
// viewAttr: 2
|
||||
// },
|
||||
// colSpan: 2,
|
||||
// conditionType: "BROWSER",
|
||||
// domkey: ["position"],
|
||||
// fieldcol: 18,
|
||||
// isQuickSearch: false,
|
||||
// label: getLabel(111, "岗位"),
|
||||
// labelcol: 6,
|
||||
// viewAttr: 2
|
||||
// },
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: getLabel(111, "人员"),
|
||||
type: "17",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 2,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["employee"],
|
||||
fieldcol: 18,
|
||||
isQuickSearch: false,
|
||||
label: getLabel(111, "人员"),
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 2,
|
||||
conditionType: "RANGEPICKER",
|
||||
domkey: ["hiredate1", "hiredate2"],
|
||||
fieldcol: 18,
|
||||
label: getLabel(111, "入职日期"),
|
||||
labelcol: 6,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
||||
const colorList = [
|
||||
"#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81",
|
||||
"#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81",
|
||||
"#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81", "#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81"
|
||||
];
|
||||
export const mapBarOptions = (params) => ({
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "shadow"
|
||||
},
|
||||
backgroundColor: "#FFF",
|
||||
borderColor: "#FFF",
|
||||
borderWidth: "1",
|
||||
borderRadius: "5",
|
||||
textStyle: {
|
||||
color: "#333"
|
||||
},
|
||||
formatter: function (params) {
|
||||
let str = params[0].axisValue + "<br>";
|
||||
for (let item of params) {
|
||||
str += `<div>${item.marker}${item.seriesName}<span style='display:inline-block;width: 10px'></span><span style='font-weight: bold'>${format_with_regex(item.value)}</span></div>`;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
type: "scroll",
|
||||
icon: "rect",
|
||||
top: "0%",
|
||||
right: "center",
|
||||
itemGap: 10,
|
||||
textStyle: {
|
||||
fontSize: 12,//字体大小
|
||||
color: "#B8B8B8"//字体颜色
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top: "10%",
|
||||
right: "0%",
|
||||
left: "5%",
|
||||
bottom: "0%",
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: params.xAxis.map((item, index) => {
|
||||
const data = Array(params.xAxis.length).fill("");
|
||||
data[index] = item;
|
||||
return {
|
||||
type: "category",
|
||||
position: "bottom",
|
||||
data: data,
|
||||
axisTick: {
|
||||
alignWithLabel: true,
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
margin: 10,
|
||||
textStyle: {
|
||||
fontSize: 11
|
||||
}
|
||||
}
|
||||
};
|
||||
}),
|
||||
yAxis: {
|
||||
name: params.name,
|
||||
type: "value",
|
||||
axisLabel: {
|
||||
padding: [3, 0, 0, 0],
|
||||
formatter: "{value}",
|
||||
color: "#666",
|
||||
textStyle: {
|
||||
fontSize: 11
|
||||
}
|
||||
},
|
||||
nameTextStyle: {
|
||||
color: "#787E95",
|
||||
fontSize: 12
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: "transparent"
|
||||
}
|
||||
},
|
||||
axisTick: {
|
||||
show: false // 不显示坐标轴刻度线
|
||||
},
|
||||
splitLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: "rgba(66, 192, 255, 0.1)"
|
||||
}
|
||||
}
|
||||
},
|
||||
series: params.data.map(item => {
|
||||
return [...dealBar(_.map(item.data, (it) => parseFloat(it.replace(/,/g, ""))), item.name)];
|
||||
}).reduce((acc, cur) => acc.concat(cur), [])
|
||||
});
|
||||
export const mapLineOptions = (params) => ({
|
||||
tooltip: {
|
||||
// 坐标轴指示器,坐标轴触发有效
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
// 默认为直线,可选为:'line' | 'shadow'
|
||||
type: "line"
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
type: "scroll",
|
||||
icon: "circle",
|
||||
top: "0%",
|
||||
right: "center",
|
||||
itemGap: 20,
|
||||
textStyle: {
|
||||
fontSize: 12,//字体大小
|
||||
color: "#787E95"//字体颜色
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top: "10%",
|
||||
left: "3%",
|
||||
right: "2%",
|
||||
bottom: "3%",
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: "category",
|
||||
boundaryGap: false,
|
||||
data: params.xAxis,
|
||||
axisTick: {
|
||||
alignWithLabel: true,
|
||||
show: false
|
||||
},
|
||||
// 修改坐标值样式
|
||||
axisLabel: {
|
||||
color: "#B8B8B8",
|
||||
fontSize: 12,
|
||||
show: true
|
||||
},
|
||||
axisLine: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: "value",
|
||||
// 修改坐标值样式
|
||||
axisLabel: {
|
||||
color: "#787E95",
|
||||
fontSize: 14
|
||||
},
|
||||
nameTextStyle: {
|
||||
color: "#787E95",
|
||||
fontSize: 16
|
||||
},
|
||||
// 修改坐标轴线样式
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: "transparent"
|
||||
}
|
||||
},
|
||||
axisTick: {
|
||||
show: false // 不显示坐标轴刻度线
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: "rgba(93,126,158,1)"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
series: _.map(params.data, (item, index) => {
|
||||
return {
|
||||
name: item.name,
|
||||
data: _.map(item.data, (it) => it.replace(/,/g, "")),
|
||||
type: "line",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: function (params) {
|
||||
return colorList[params.seriesIndex] || colorList[Math.floor((Math.random() * colorList.length))];
|
||||
},
|
||||
lineStyle: {
|
||||
color: colorList[index] || colorList[Math.floor((Math.random() * colorList.length))]
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
})
|
||||
});
|
||||
export const mapPieOptions = (params) => ({
|
||||
tooltip: {
|
||||
show: true,
|
||||
formatter: function (params) {
|
||||
let str = params.seriesName + "<br>";
|
||||
str += params.marker + params.name + ":" + format_with_regex(params.value) + "(" + params.percent + "%" + ")" + "<br>";
|
||||
return str;
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
type: "scroll",
|
||||
icon: "rect",
|
||||
top: "0%",
|
||||
left: "2%",
|
||||
orient: "vertical",
|
||||
itemGap: 10,
|
||||
textStyle: {
|
||||
fontSize: 12,//字体大小
|
||||
color: "#787E95"//字体颜色
|
||||
}
|
||||
},
|
||||
series: _.map(params.data, item => {
|
||||
return {
|
||||
name: item.name,
|
||||
data: _.map(item.data, (it) => ({ ...it, value: it.value.replace(/,/g, "") })),
|
||||
type: "pie",
|
||||
radius: "60%",
|
||||
avoidLabelOverlap: true,
|
||||
animation: false,
|
||||
labelLine: {
|
||||
show: true,
|
||||
normal: {
|
||||
length: 5,
|
||||
align: "center"
|
||||
}
|
||||
},
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: function (colors) {
|
||||
return colorList[colors.dataIndex] || colorList[Math.floor((Math.random() * colorList.length))];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
})
|
||||
});
|
||||
|
||||
const dealBar = (arr, name) => {
|
||||
const bar = [];
|
||||
arr.forEach((item, index) => {
|
||||
const data = [];
|
||||
for (let i = 0; i < index; i++) {
|
||||
data.push("");
|
||||
}
|
||||
if (item) {
|
||||
data.push(item);
|
||||
bar.push({
|
||||
name,
|
||||
type: "bar",
|
||||
xAxisIndex: index,
|
||||
barWidth: 32,
|
||||
data,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: function (params) {
|
||||
return colorList[params.seriesIndex] || colorList[Math.floor((Math.random() * colorList.length))];
|
||||
}
|
||||
}
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
position: "insideBottom",
|
||||
distance: 15,
|
||||
align: "left",
|
||||
verticalAlign: "middle",
|
||||
rotate: "90",
|
||||
formatter: function (params) {
|
||||
if (parseInt(params.value) === 0) {
|
||||
return ``;
|
||||
} else {
|
||||
return [
|
||||
`{a|${format_with_regex(params.value)}} {b|${params.seriesName}}`
|
||||
];
|
||||
}
|
||||
},
|
||||
rich: {
|
||||
a: {
|
||||
fontWeight: "bold",
|
||||
fontSize: 14,
|
||||
color: "#333",
|
||||
marginRight: 10
|
||||
},
|
||||
b: {
|
||||
fontSize: 12,
|
||||
color: "#333"
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
return bar;
|
||||
};
|
||||
|
|
@ -176,6 +176,7 @@ export const mapBarOptions = (params) => ({
|
|||
}
|
||||
},
|
||||
legend: {
|
||||
type: "scroll",
|
||||
icon: "rect",
|
||||
top: "0%",
|
||||
right: "center",
|
||||
|
|
@ -188,8 +189,8 @@ export const mapBarOptions = (params) => ({
|
|||
grid: {
|
||||
top: "10%",
|
||||
right: "0%",
|
||||
left: "2%",
|
||||
bottom: "0%",
|
||||
left: "5%",
|
||||
bottom: "10%",
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
|
|
@ -209,6 +210,7 @@ export const mapBarOptions = (params) => ({
|
|||
},
|
||||
yAxis: {
|
||||
name: params.name,
|
||||
type: "value",
|
||||
axisLabel: {
|
||||
padding: [3, 0, 0, 0],
|
||||
formatter: "{value}",
|
||||
|
|
@ -241,6 +243,7 @@ export const mapBarOptions = (params) => ({
|
|||
return {
|
||||
name: item.name,
|
||||
barWidth: "32",
|
||||
barGap: "0%",
|
||||
data: _.map(item.data, (it) => it.replace(/,/g, "")),
|
||||
type: "bar",
|
||||
itemStyle: {
|
||||
|
|
@ -280,7 +283,18 @@ export const mapBarOptions = (params) => ({
|
|||
}
|
||||
}
|
||||
};
|
||||
})
|
||||
}),
|
||||
dataZoom: [
|
||||
{
|
||||
type: "inside"
|
||||
|
||||
},
|
||||
{
|
||||
type: "slider",
|
||||
show: true,
|
||||
bottom: 20,
|
||||
}
|
||||
]
|
||||
});
|
||||
export const mapLineOptions = (params) => ({
|
||||
tooltip: {
|
||||
|
|
@ -360,7 +374,7 @@ export const mapLineOptions = (params) => ({
|
|||
series: _.map(params.data, (item, index) => {
|
||||
return {
|
||||
name: item.name,
|
||||
data: _.map(item.data, (it) => it.replace(/,/g, "")),
|
||||
data: _.map(item.data, (it) => parseFloat(it.replace(/,/g, ""))),
|
||||
type: "line",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
|
|
@ -385,6 +399,7 @@ export const mapPieOptions = (params) => ({
|
|||
}
|
||||
},
|
||||
legend: {
|
||||
type: "scroll",
|
||||
icon: "rect",
|
||||
top: "0%",
|
||||
left: "2%",
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@ export default class Index extends Component {
|
|||
operateTaxDeclaration: "",
|
||||
matchRule: "",
|
||||
confValue: "0",
|
||||
withDrawTaxDeclaration: "0"
|
||||
withDrawTaxDeclaration: "0",
|
||||
extEmpsWitch: "0"
|
||||
},
|
||||
showEncryptOperationButton: "",
|
||||
progressVisible: false,
|
||||
|
|
@ -39,36 +40,52 @@ export default class Index extends Component {
|
|||
const { saveParams } = this.state;
|
||||
const [
|
||||
matchRuleEnum, orderRuleEnum, ascOrDescEnum, matchEmployeeModeEnum,
|
||||
orderRules, codeRule, appSettings
|
||||
// orderRules, codeRule, appSettings,
|
||||
sysInfo
|
||||
] = await Promise.all([
|
||||
this.matchRuleEnum(), this.orderRuleEnum(), this.ascOrDescEnum(), this.matchEmployeeModeEnum(),
|
||||
this.sysOrderRule(), this.sysConfCodeRule(), this.queryAppsetting()
|
||||
// this.sysOrderRule(), this.sysConfCodeRule(), this.queryAppsetting(),
|
||||
this.sysinfo()
|
||||
]);
|
||||
const matchRuleOptions = _.map(matchRuleEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
|
||||
const orderOptions = _.map(orderRuleEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
|
||||
const ascOptions = _.map(ascOrDescEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
|
||||
const employeeOptions = _.map(matchEmployeeModeEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
|
||||
const { data: { ascOrDesc, orderRule } } = orderRules;
|
||||
const { data: rule } = codeRule;
|
||||
const {
|
||||
data: {
|
||||
showEncryptOperationButton,
|
||||
isOpenEncrypt: enctry,
|
||||
isOpenTaxDeclaration: operateTaxDeclaration,
|
||||
salaryAcctEmployeeRule: matchRule,
|
||||
salaryArchiveDelete: confValue, withDrawTaxDeclaration
|
||||
ascOrDesc = "", orderRule = "", showEncryptOperationButton, matchEmployeeMode: rule = "",
|
||||
taxDeclarationFunction: operateTaxDeclaration = "0", salaryArchiveDelete: confValue,
|
||||
salaryAcctEmployeeRule: matchRule, WITHDRAW_TAX_DECLARATION: withDrawTaxDeclaration = "0",
|
||||
OPEN_APPLICATION_ENCRYPT: enctry = "0", extEmpsWitch = "0"
|
||||
}
|
||||
} = appSettings;
|
||||
} = sysInfo;
|
||||
// const { data: { ascOrDesc, orderRule } } = orderRules;
|
||||
// const { data: rule } = codeRule;
|
||||
// const {
|
||||
// data: {
|
||||
// showEncryptOperationButton,
|
||||
// isOpenEncrypt: enctry
|
||||
// isOpenTaxDeclaration: operateTaxDeclaration,
|
||||
// salaryAcctEmployeeRule: matchRule,
|
||||
// salaryArchiveDelete: confValue,
|
||||
// withDrawTaxDeclaration
|
||||
// }
|
||||
// } = appSettings;
|
||||
this.setState({
|
||||
matchRuleOptions, orderOptions, ascOptions, employeeOptions,
|
||||
showEncryptOperationButton,
|
||||
saveParams: {
|
||||
...saveParams,
|
||||
ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration
|
||||
ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration,
|
||||
extEmpsWitch
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
sysinfo = () => {
|
||||
return API.sysinfo();
|
||||
};
|
||||
|
||||
sysOrderRule = () => {
|
||||
return API.sysOrderRule();
|
||||
};
|
||||
|
|
@ -210,6 +227,16 @@ export default class Index extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
saveSysOperate = (payload) => {
|
||||
API.saveSysOperate({ ...payload, confValue: this.state.saveParams.extEmpsWitch })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
} else {
|
||||
message.error(errormsg || getLabel(22620, "保存失败!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
withDrawTaxDeclaration = () => {
|
||||
API.saveWithDrawTaxDeclaration({ confValue: _.pick(this.state.saveParams, ["withDrawTaxDeclaration"]).withDrawTaxDeclaration })
|
||||
.then(({ status, errormsg }) => {
|
||||
|
|
@ -225,7 +252,7 @@ export default class Index extends Component {
|
|||
const { saveParams } = this.state;
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(543854, "确认要保存吗?"),
|
||||
content: (key === "operateTaxDeclaration" && val === "0") ? getLabel(111, "关闭之后,将无法开启,确认要保存吗?") : getLabel(543854, "确认要保存吗?"),
|
||||
onOk: () => {
|
||||
this.setState({
|
||||
saveParams: {
|
||||
|
|
@ -256,6 +283,12 @@ export default class Index extends Component {
|
|||
case "withDrawTaxDeclaration":
|
||||
this.withDrawTaxDeclaration();
|
||||
break;
|
||||
case "extEmpsWitch":
|
||||
this.saveSysOperate({
|
||||
title: getLabel(111, "开启非系统人员"),
|
||||
module: "basic", confKey: key
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -289,7 +322,8 @@ export default class Index extends Component {
|
|||
operateTaxDeclaration,
|
||||
matchRule,
|
||||
confValue,
|
||||
withDrawTaxDeclaration
|
||||
withDrawTaxDeclaration,
|
||||
extEmpsWitch
|
||||
} = saveParams;
|
||||
return (
|
||||
<div className="ruleWrapper">
|
||||
|
|
@ -328,29 +362,36 @@ export default class Index extends Component {
|
|||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
}
|
||||
<WeaSearchGroup title={getLabel(543359, "报税规则")} showGroup center>
|
||||
<WeaFormItem label={getLabel(543353, "个税申报")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||
<WeaSearchGroup title={getLabel(111, "算税规则")} showGroup center>
|
||||
<WeaFormItem label={getLabel(111, "系统算税")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||
<WeaCheckbox display="switch" value={operateTaxDeclaration}
|
||||
disabled={!operateTaxDeclaration || operateTaxDeclaration === "0"}
|
||||
onChange={val => this.handleChange("operateTaxDeclaration", val)}/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem label={getLabel(111, "允许个税申报撤回")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||
<WeaFormItem label={getLabel(111, "撤回申报表")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||
<WeaCheckbox display="switch" value={withDrawTaxDeclaration}
|
||||
onChange={val => this.handleChange("withDrawTaxDeclaration", val)}/>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
<WeaSearchGroup title={getLabel(111, "档案删除规则")} showGroup center>
|
||||
<WeaSearchGroup title={getLabel(538004, "薪资档案")} showGroup center>
|
||||
<WeaFormItem label={getLabel(111, "允许删除档案")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||
<WeaCheckbox display="switch" value={confValue}
|
||||
onChange={val => this.handleChange("confValue", val)}/>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
<WeaSearchGroup title={getLabel(543855, "薪资核算人员匹配规则")} showGroup center>
|
||||
<WeaFormItem label={getLabel(19835, "匹配规则")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaSearchGroup title={getLabel(538011, "薪资核算")} showGroup center>
|
||||
<WeaFormItem label={getLabel(111, "核算人员匹配规则")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaSelect options={matchRuleOptions} value={matchRule}
|
||||
onChange={val => this.handleChange("matchRule", val)}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
<WeaSearchGroup title={getLabel(111, "非系统人员")} showGroup center>
|
||||
<WeaFormItem label={getLabel(111, "开启非系统人员")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||
<WeaCheckbox display="switch" value={extEmpsWitch}
|
||||
onChange={val => this.handleChange("extEmpsWitch", val)}/>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
{
|
||||
this.state.progressVisible &&
|
||||
<ProgressModal
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ export default class SalaryFileViewSlide extends React.Component {
|
|||
{
|
||||
com: PickDate({
|
||||
label: getLabel(542346, "起始发薪日期"),
|
||||
viewAttr: selectedKey === "pending" ? 3 : 1,
|
||||
viewAttr: (selectedKey === "pending" || selectedKey === "ext") ? 3 : 1,
|
||||
value: paysetParams.payStartDate,
|
||||
onChange: handleSetpay
|
||||
})
|
||||
|
|
@ -96,7 +96,7 @@ export default class SalaryFileViewSlide extends React.Component {
|
|||
{
|
||||
com: PickDate({
|
||||
label: getLabel(542347, "最后发薪日期"),
|
||||
viewAttr: (selectedKey === "pending" || selectedKey === "fixed") ? 2 : selectedKey === "stop" ? 1 : 3,
|
||||
viewAttr: (selectedKey === "pending" || selectedKey === "fixed" || selectedKey === "ext") ? 2 : selectedKey === "stop" ? 1 : 3,
|
||||
value: paysetParams.payEndDate,
|
||||
onChange: handleSetpay
|
||||
})
|
||||
|
|
|
|||
|
|
@ -84,6 +84,13 @@ export const salaryItemFields = [
|
|||
viewAttr: 2,
|
||||
tip: ""
|
||||
},
|
||||
{
|
||||
key: "hideDefault",
|
||||
label: getLabel(111, "核算时隐藏"),
|
||||
type: "SWITCH",
|
||||
viewAttr: 2,
|
||||
tip: getLabel(111, "提示:开启后,在薪资账套中添加该项目时,默认勾选隐藏且在核算时隐藏该薪资项目,可在具体薪资账套中设置是否隐藏")
|
||||
},
|
||||
{
|
||||
key: "taxAgentIds",
|
||||
label: getLabel(543165, "可见性范围"),
|
||||
|
|
|
|||
|
|
@ -112,9 +112,9 @@ export default class SalaryItem extends React.Component {
|
|||
return <a onClick={() => {
|
||||
this.onEditItem(record, false);
|
||||
}}>{text}</a>;
|
||||
case "useInEmployeeSalary":
|
||||
return <Switch checked={text === 1} disabled/>;
|
||||
case "useDefault":
|
||||
case "hideDefault":
|
||||
case "useInEmployeeSalary":
|
||||
return <Switch checked={text === 1} disabled/>;
|
||||
default:
|
||||
return <div dangerouslySetInnerHTML={{ __html: valueSpan }}/>;
|
||||
|
|
@ -367,9 +367,23 @@ export default class SalaryItem extends React.Component {
|
|||
</WeaTop>
|
||||
|
||||
{
|
||||
systemItemVisible && <SystemSalaryItemModal visible={systemItemVisible} onCancel={() => {
|
||||
setSystemItemVisible(false);
|
||||
}}/>
|
||||
systemItemVisible &&
|
||||
<SystemSalaryItemModal
|
||||
visible={systemItemVisible}
|
||||
onCancel={() => {
|
||||
setSystemItemVisible(false);
|
||||
}}
|
||||
onInitTableList={() => {
|
||||
getTableDatas({ ...this.state.searchParams, name: this.state.searchValue }).then(res => {
|
||||
this.setState({
|
||||
searchParams: {
|
||||
...this.state.searchParams,
|
||||
total: res.total
|
||||
}
|
||||
});
|
||||
});
|
||||
}}
|
||||
/>
|
||||
}
|
||||
{
|
||||
editSlideVisible &&
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Date: 2023/2/9
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect, WeaTextarea, WeaInputNumber } from "ecCom";
|
||||
import { WeaCheckbox, WeaFormItem, WeaInput, WeaInputNumber, WeaSearchGroup, WeaSelect, WeaTextarea } from "ecCom";
|
||||
import { salaryItemFields, valTakeOptions } from "./columns";
|
||||
|
||||
class SalaryItemForm extends Component {
|
||||
|
|
@ -47,7 +47,7 @@ class SalaryItemForm extends Component {
|
|||
case "valueType":
|
||||
return {
|
||||
...item,
|
||||
viewAttr: isAdd ? 2 : 1
|
||||
// viewAttr: isAdd ? 2 : 1
|
||||
};
|
||||
case "formulaContent":
|
||||
return {
|
||||
|
|
@ -86,7 +86,7 @@ class SalaryItemForm extends Component {
|
|||
if (key === "valueType") {
|
||||
onChangeFieldsItem({ formulaContent: "", formulaId: 0, valueType: v });
|
||||
} else {
|
||||
onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary") ? Number(v) : v });
|
||||
onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v });
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -131,7 +131,7 @@ class SalaryItemForm extends Component {
|
|||
(type === "INPUTNUMBER" && display) ?
|
||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||
<WeaInputNumber value={value} viewAttr={viewAttr} precision={0}
|
||||
onChange={v => this.handleChangeSalaryFiledItems(key, v)}/>
|
||||
onChange={v => this.handleChangeSalaryFiledItems(key, v)}/>
|
||||
</WeaFormItem> : null
|
||||
}
|
||||
</React.Fragment>;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ export default class SystemSalaryItemModal extends React.Component {
|
|||
if (status) {
|
||||
message.success(getLabel(26712, "添加成功"));
|
||||
this.setState({ selectedRowKeys: [] }, () => {
|
||||
this.getSysItemList();
|
||||
this.props.onInitTableList();
|
||||
this.props.onCancel();
|
||||
});
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import * as API from "../../../apis/welfareArchive";
|
|||
import ImportModal from "../../../components/importModal";
|
||||
import TipLabel from "../../../components/TipLabel";
|
||||
import UnifiedTable from "../../../components/UnifiedTable";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import { salaryArchiveDelete } from "../../../apis/payrollFiles";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -611,16 +612,16 @@ export default class Archives extends React.Component {
|
|||
let url = `${window.location.origin}/api/bs/hrmsalary/scheme/export?ids=`;
|
||||
switch (selectedKey) {
|
||||
case "pending":
|
||||
url = `${url}&runStatuses=1`;
|
||||
url = `${url}&runStatuses=1&${convertToUrlString(form.getFormParams())}`;
|
||||
break;
|
||||
case "fixed":
|
||||
url = `${url}&runStatuses=2,3`;
|
||||
url = `${url}&runStatuses=2,3&${convertToUrlString(form.getFormParams())}`;
|
||||
break;
|
||||
case "suspend":
|
||||
url = `${url}&runStatuses=3`;
|
||||
url = `${url}&runStatuses=3&${convertToUrlString(form.getFormParams())}`;
|
||||
break;
|
||||
default:
|
||||
url = `${url}&runStatuses=4,5`;
|
||||
url = `${url}&runStatuses=4,5&${convertToUrlString(form.getFormParams())}`;
|
||||
break;
|
||||
}
|
||||
window.open(url, "_self");
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import CopySchemaModal from "./copySchemaModal";
|
|||
import CustomBenefitsTable from "./customBenefitsTable";
|
||||
import "./index.less";
|
||||
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
@inject("programmeStore", "taxAgentStore", "salaryFileStore")
|
||||
@observer
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default class StandingBook extends React.Component {
|
|||
{billStatus === "0" && (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
style={{ padding: "0 12px" }}
|
||||
style={{ marginRight: 10 }}
|
||||
onClick={() => this.handleGoDetail(billMonth, "", r.paymentOrganizationId, creator)}>
|
||||
{getLabel(538780, "核算")}
|
||||
</a>
|
||||
|
|
@ -157,7 +157,7 @@ export default class StandingBook extends React.Component {
|
|||
{billStatus === "0" && (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
style={{ padding: "0 12px" }}
|
||||
style={{ marginRight: 10 }}
|
||||
onClick={() => this.handleOperate({
|
||||
key: "archive",
|
||||
billMonth,
|
||||
|
|
@ -170,7 +170,7 @@ export default class StandingBook extends React.Component {
|
|||
{billStatus === "1" && (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
style={{ padding: "0 12px" }}
|
||||
style={{ marginRight: 10 }}
|
||||
onClick={() => this.handleOperate({
|
||||
key: "view",
|
||||
billMonth,
|
||||
|
|
@ -499,7 +499,7 @@ export default class StandingBook extends React.Component {
|
|||
if (item.dataIndex !== "operate" && item.dataIndex !== "billStatus") {
|
||||
return {
|
||||
...item,
|
||||
width:150,
|
||||
width: 150,
|
||||
render: (text) => {
|
||||
return <span className="ellipsis" title={text}>{text}</span>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { Button } from "antd";
|
|||
import { WeaDialog, WeaFormItem, WeaSearchGroup, WeaSteps, WeaTab, WeaLocaleProvider } from "ecCom";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import PersonalScope from "./personalScope";
|
||||
import "./index.less";
|
||||
|
||||
const titleOuter = {
|
||||
display: "flex",
|
||||
|
|
@ -136,6 +137,7 @@ export default class EditModal extends React.Component {
|
|||
</div>
|
||||
}
|
||||
initLoadCss
|
||||
className="taxagentModalWrapper"
|
||||
visible={visible}
|
||||
style={{ width: 800, height: 450 }}
|
||||
hasScroll>
|
||||
|
|
|
|||
|
|
@ -113,3 +113,46 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.taxagentModalWrapper {
|
||||
.topMenuWrapper {
|
||||
height: 47px;
|
||||
line-height: 47px;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.topMenuTabWrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.menuTabItem {
|
||||
height: 24px;
|
||||
padding: 0 16px;
|
||||
border-radius: 3px;
|
||||
margin-right: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
flex: 1 1 auto;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.menuTabItem:hover {
|
||||
color: #5d9cec;
|
||||
background: #e9f7ff;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #5d9cec;
|
||||
background: #e9f7ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ export default class PersonalScope extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
deleteLoading: false,
|
||||
queryLoading: false,
|
||||
submitLoading: false,
|
||||
targetTypeList: [],
|
||||
|
|
@ -47,7 +48,6 @@ export default class PersonalScope extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
|
||||
getTaxAgentRangeListInclude = (pageModule = {}) => {
|
||||
const { taxAgentId } = this.props;
|
||||
const { getTaxAgentRangeListInclude } = this.props.taxAgentStore;
|
||||
|
|
@ -76,6 +76,35 @@ export default class PersonalScope extends Component {
|
|||
}
|
||||
);
|
||||
};
|
||||
|
||||
taxAgentRangelistExt = (pageModule = {}) => {
|
||||
const { taxAgentId } = this.props;
|
||||
const { taxAgentRangelistExt } = this.props.taxAgentStore;
|
||||
this.setState({ queryLoading: true });
|
||||
taxAgentRangelistExt({ ...pageModule, taxAgentId }).then(
|
||||
({ status, data }) => {
|
||||
this.setState({ queryLoading: false });
|
||||
if (status && !_.isEmpty(data)) {
|
||||
const {
|
||||
columns,
|
||||
list: dataSource,
|
||||
pageNum: current,
|
||||
pageSize,
|
||||
total
|
||||
} = data;
|
||||
this.setState({
|
||||
columns,
|
||||
dataSource,
|
||||
pageObj: {
|
||||
current,
|
||||
pageSize,
|
||||
total
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
getTaxAgentRangeListExclude = (pageModule = {}) => {
|
||||
const { taxAgentId } = this.props;
|
||||
const { getTaxAgentRangeListExclude } = this.props.taxAgentStore;
|
||||
|
|
@ -106,17 +135,93 @@ export default class PersonalScope extends Component {
|
|||
};
|
||||
|
||||
taxAgentRangeDelete = ({ ids, tab }) => {
|
||||
const { taxAgentRangeDelete } = this.props.taxAgentStore;
|
||||
const { pageObj } = this.state;
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(543548, "确认删除吗?"),
|
||||
onOk: () => {
|
||||
taxAgentRangeDelete(ids).then(({ status, errorMsg }) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
return tab === "2" ? this.taxAgentExtRangeDeleteComfirm(resolve, reject, ids) : this.taxAgentRangeDeleteComfirm(resolve, reject, ids, tab);
|
||||
}).catch(() => console.log("出错!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
taxAgentExtRangeDeleteComfirm = (resolve, reject, ids) => {
|
||||
const { taxAgentRangeExtDelete } = this.props.taxAgentStore;
|
||||
const { pageObj } = this.state;
|
||||
message.destroy();
|
||||
message.loading(getLabel(111, "正在删除中..."), 0);
|
||||
taxAgentRangeExtDelete(ids).then(({ status, errormsg }) => {
|
||||
message.destroy();
|
||||
resolve();
|
||||
if (status) {
|
||||
this.tagAgentRef.onSelectChange([]);
|
||||
message.success(getLabel(502230, "删除成功"));
|
||||
this.taxAgentRangelistExt({
|
||||
current: pageObj.current,
|
||||
pageSize: pageObj.pageSize
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || getLabel(20462, "删除失败"));
|
||||
}
|
||||
}).catch(() => {
|
||||
message.destroy();
|
||||
reject();
|
||||
});
|
||||
};
|
||||
taxAgentRangeDeleteComfirm = (resolve, reject, ids, tab) => {
|
||||
const { taxAgentRangeDelete } = this.props.taxAgentStore;
|
||||
const { pageObj } = this.state;
|
||||
message.destroy();
|
||||
message.loading(getLabel(111, "正在删除中..."), 0);
|
||||
taxAgentRangeDelete(ids).then(({ status, errormsg }) => {
|
||||
message.destroy();
|
||||
resolve();
|
||||
if (status) {
|
||||
this.tagAgentRef.onSelectChange([]);
|
||||
message.success(getLabel(502230, "删除成功"));
|
||||
tab == "1"
|
||||
? this.getTaxAgentRangeListInclude({
|
||||
current: pageObj.current,
|
||||
pageSize: pageObj.pageSize
|
||||
})
|
||||
: this.getTaxAgentRangeListExclude({
|
||||
current: pageObj.current,
|
||||
pageSize: pageObj.pageSize
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || getLabel(20462, "删除失败"));
|
||||
}
|
||||
}).catch(() => {
|
||||
message.destroy();
|
||||
reject();
|
||||
});
|
||||
};
|
||||
|
||||
taxAgentRangeSave = (module) => {
|
||||
const { taxAgentId } = this.props;
|
||||
const { pageObj } = this.state;
|
||||
const { includeType } = module;
|
||||
const { taxAgentRangeSave, taxAgentRangeExtSave } = this.props.taxAgentStore;
|
||||
this.setState({ submitLoading: true });
|
||||
if (includeType === "2") {
|
||||
taxAgentRangeExtSave({ taxAgentId, ..._.pick(module, "targetIds") }).then(({ status, errormsg }) => {
|
||||
this.setState({ submitLoading: false });
|
||||
if (status) {
|
||||
this.tagAgentRef.closeModal();
|
||||
message.success(getLabel(528075, "新增成功"));
|
||||
this.taxAgentRangelistExt({ current: pageObj.current, pageSize: pageObj.pageSize });
|
||||
} else {
|
||||
message.error(errormsg || getLabel(543346, "新增失败"));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
taxAgentRangeSave({ ...module, taxAgentId }).then(
|
||||
({ status, errormsg }) => {
|
||||
this.setState({ submitLoading: false });
|
||||
if (status) {
|
||||
this.tagAgentRef.onSelectChange([]);
|
||||
message.success(getLabel(502230, "删除成功"));
|
||||
tab == "1"
|
||||
this.tagAgentRef.closeModal();
|
||||
message.success(getLabel(528075, "新增成功"));
|
||||
includeType == "1"
|
||||
? this.getTaxAgentRangeListInclude({
|
||||
current: pageObj.current,
|
||||
pageSize: pageObj.pageSize
|
||||
|
|
@ -126,41 +231,11 @@ export default class PersonalScope extends Component {
|
|||
pageSize: pageObj.pageSize
|
||||
});
|
||||
} else {
|
||||
message.error(errorMsg || getLabel(20462, "删除失败"));
|
||||
message.error(errormsg || getLabel(543346, "新增失败"));
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel() {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
taxAgentRangeSave = (module) => {
|
||||
const { taxAgentId } = this.props;
|
||||
const { pageObj } = this.state;
|
||||
const { includeType } = module;
|
||||
const { taxAgentRangeSave } = this.props.taxAgentStore;
|
||||
this.setState({ submitLoading: true });
|
||||
taxAgentRangeSave({ ...module, taxAgentId }).then(
|
||||
({ status, errormsg }) => {
|
||||
this.setState({ submitLoading: false });
|
||||
if (status) {
|
||||
this.tagAgentRef.closeModal();
|
||||
message.success(getLabel(528075, "新增成功"));
|
||||
includeType == "1"
|
||||
? this.getTaxAgentRangeListInclude({
|
||||
current: pageObj.current,
|
||||
pageSize: pageObj.pageSize
|
||||
})
|
||||
: this.getTaxAgentRangeListExclude({
|
||||
current: pageObj.current,
|
||||
pageSize: pageObj.pageSize
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || getLabel(543346, "新增失败"));
|
||||
}
|
||||
}
|
||||
);
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
@ -199,7 +274,8 @@ export default class PersonalScope extends Component {
|
|||
() => {
|
||||
tab == "1"
|
||||
? this.getTaxAgentRangeListInclude({ ...pageObj, ...params })
|
||||
: this.getTaxAgentRangeListExclude({ ...pageObj, ...params });
|
||||
: tab == "0" ? this.getTaxAgentRangeListExclude({ ...pageObj, ...params }) :
|
||||
this.taxAgentRangelistExt({ ...pageObj, ...params });
|
||||
}
|
||||
);
|
||||
}}
|
||||
|
|
@ -210,12 +286,14 @@ export default class PersonalScope extends Component {
|
|||
onTaxAngetSearch={({ targetName, targetWorkcode, tab }) => {
|
||||
tab == "1"
|
||||
? this.getTaxAgentRangeListInclude({ targetName, targetWorkcode })
|
||||
: this.getTaxAgentRangeListExclude({ targetName, targetWorkcode });
|
||||
: tab == "0" ? this.getTaxAgentRangeListExclude({ targetName, targetWorkcode }):
|
||||
this.taxAgentRangelistExt({ targetName, targetWorkcode });
|
||||
}}
|
||||
onChangeTab={(tab) => {
|
||||
this.tagAgentRef.onSelectChange([]);
|
||||
tab == "1"
|
||||
? this.getTaxAgentRangeListInclude()
|
||||
: this.getTaxAgentRangeListExclude();
|
||||
: tab == "0" ? this.getTaxAgentRangeListExclude() : this.taxAgentRangelistExt();
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,14 +4,18 @@ import { WeaButtonIcon, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup
|
|||
import AddTaxAgentModal from "./addTaxAgentModal";
|
||||
import ImportModal from "../../components/importModal";
|
||||
import { taxAgentRangeImportData, taxAgentRangePreview } from "../../apis/taxAgent";
|
||||
import { sysinfo } from "../../apis/ruleconfig";
|
||||
import { importEmployColumns } from "./columns";
|
||||
import ExternalPersonModal from "../../components/externalPersonModal";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
export default class SlideTaxagentUser extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
showSearchAd: false,
|
||||
externalPersonModalVisible: false, //外部人员关联弹框
|
||||
addTaxagentModalVisible: false,
|
||||
includeType: "1",
|
||||
selectedRowKeys: [],
|
||||
|
|
@ -22,30 +26,34 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
visible: false,
|
||||
step: 0,
|
||||
importResult: {}
|
||||
}
|
||||
},
|
||||
extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭
|
||||
};
|
||||
}
|
||||
|
||||
handleTabClick(includeType) {
|
||||
const { onChangeTab } = this.props;
|
||||
this.setState(
|
||||
{
|
||||
includeType
|
||||
},
|
||||
() => {
|
||||
onChangeTab && onChangeTab(includeType);
|
||||
}
|
||||
);
|
||||
componentDidMount() {
|
||||
this.getSysinfo();
|
||||
}
|
||||
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 非系统人员开关查询
|
||||
* Params:
|
||||
* Date: 2023/7/14
|
||||
*/
|
||||
getSysinfo = () => {
|
||||
sysinfo().then(({ status, data }) => {
|
||||
if (status) this.setState({ extEmpsWitch: data.extEmpsWitch });
|
||||
});
|
||||
};
|
||||
|
||||
onSelectChange = selectedRowKeys => {
|
||||
this.setState({ selectedRowKeys });
|
||||
};
|
||||
|
||||
handleTabDelete = () => {
|
||||
const { onDeleteTaxAgent } = this.props;
|
||||
const { includeType } = this.state;
|
||||
if (this.state.selectedRowKeys.length == 0) {
|
||||
const { includeType, selectedRowKeys } = this.state;
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning(getLabel(543306, "未选择条目"));
|
||||
return;
|
||||
}
|
||||
|
|
@ -64,9 +72,10 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
|
||||
closeModal = () => {
|
||||
this.setState({
|
||||
addTaxagentModalVisible: false
|
||||
addTaxagentModalVisible: false,
|
||||
externalPersonModalVisible: false
|
||||
}, () => {
|
||||
this.addTaxRef.handleReset();
|
||||
this.addTaxRef && this.addTaxRef.handleReset();
|
||||
});
|
||||
};
|
||||
handleInitModal = () => {
|
||||
|
|
@ -120,9 +129,10 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
selectedRowKeys,
|
||||
searchValue,
|
||||
addTaxagentModalVisible,
|
||||
externalPersonModalVisible,
|
||||
importParams,
|
||||
previewDataSource,
|
||||
showSearchAd
|
||||
showSearchAd, extEmpsWitch
|
||||
} = this.state;
|
||||
const {
|
||||
submitLoading,
|
||||
|
|
@ -146,6 +156,7 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
onChange: this.onSelectChange
|
||||
};
|
||||
const pagination = {
|
||||
...pageObj,
|
||||
total: pageObj.total,
|
||||
showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
|
|
@ -177,16 +188,30 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
><span className="icon-coms-leading-in" title={getLabel(32935, "导入")}></span></Button>,
|
||||
<WeaButtonIcon buttonType="del" type="primary" disabled={_.isEmpty(selectedRowKeys)}
|
||||
onClick={this.handleTabDelete}/>,
|
||||
<WeaButtonIcon buttonType="add" type="primary" onClick={() => this.setState({ addTaxagentModalVisible: true })}/>
|
||||
<WeaButtonIcon
|
||||
buttonType="add" type="primary"
|
||||
onClick={() => {
|
||||
const key = includeType === "2" ? "externalPersonModalVisible" : "addTaxagentModalVisible";
|
||||
this.setState({ [key]: true });
|
||||
}}
|
||||
/>
|
||||
];
|
||||
includeType === "0" && btns.shift();
|
||||
(includeType === "0" || includeType === "2") && btns.shift();
|
||||
return (
|
||||
<div className="slideRefereUser">
|
||||
<WeaTab
|
||||
datas={[
|
||||
{ title: getLabel(124810, "人员范围"), viewcondition: "1" },
|
||||
{ title: getLabel(543489, "从范围中排除"), viewcondition: "0" }
|
||||
]}
|
||||
datas={
|
||||
extEmpsWitch === "0" ?
|
||||
[
|
||||
{ title: getLabel(124810, "人员范围"), viewcondition: "1" },
|
||||
{ title: getLabel(543489, "从范围中排除"), viewcondition: "0" },
|
||||
] :
|
||||
[
|
||||
{ title: getLabel(124810, "人员范围"), viewcondition: "1" },
|
||||
{ title: getLabel(543489, "从范围中排除"), viewcondition: "0" },
|
||||
{ title: getLabel(111, "非系统人员范围"), viewcondition: "2" }
|
||||
]
|
||||
}
|
||||
keyParam="viewcondition" selectedKey={includeType}
|
||||
searchType={["base"]} advanceHeight={200}
|
||||
showSearchAd={showSearchAd} searchsAd={this.getSearchs()}
|
||||
|
|
@ -292,7 +317,12 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
pagination={pagination}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<ExternalPersonModal
|
||||
visible={externalPersonModalVisible}
|
||||
loading={submitLoading}
|
||||
onCancel={() => this.setState({ externalPersonModalVisible: false })}
|
||||
onExternalPersonSave={val => onTaxAgentSave({ ...val, includeType: includeType })}
|
||||
/>
|
||||
<AddTaxAgentModal
|
||||
ref={(ref) => this.addTaxRef = ref}
|
||||
loading={submitLoading}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
import { observable } from "mobx";
|
||||
import { WeaForm } from "comsMobx";
|
||||
|
||||
export class ExternalPersonManageStore {
|
||||
@observable form = new WeaForm();
|
||||
@observable addForm = new WeaForm();
|
||||
}
|
||||
|
|
@ -18,6 +18,7 @@ import { DeclareStore } from "./declare";
|
|||
import { StandingBookStore } from "./StandingBook";
|
||||
import { PayrollFilesStore } from "./payrollFiles";
|
||||
import { SpecialAddStore } from "./specialAdd";
|
||||
import { ExternalPersonManageStore } from "./externalPersonManage";
|
||||
|
||||
module.exports = {
|
||||
baseFormStore: new BaseFormStore(),
|
||||
|
|
@ -39,5 +40,6 @@ module.exports = {
|
|||
declareStore: new DeclareStore(),
|
||||
standingBookStore: new StandingBookStore(),
|
||||
payrollFilesStore: new PayrollFilesStore(),
|
||||
specialAddStore: new SpecialAddStore()
|
||||
specialAddStore: new SpecialAddStore(),
|
||||
externalPersonManageStore: new ExternalPersonManageStore()
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ const { TableStore } = WeaTableNew;
|
|||
export class MySalaryStore {
|
||||
@observable tableStore = new TableStore(); // new table
|
||||
@observable form = new WeaForm(); // nrew 一个form
|
||||
@observable pwdForm = new WeaForm(); // new 一个密码验证form
|
||||
@observable condition = []; // 存储后台得到的form数据
|
||||
@observable hasRight = false; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
|
||||
@observable showSearchAd = false; // 高级搜索面板显示
|
||||
|
|
|
|||
|
|
@ -26,6 +26,19 @@ export class payrollStore {
|
|||
@observable salaryTemplateShowSet = {}; // 显示设置基础表单
|
||||
@observable replenishSalaryTemplateSalaryItemSet = []; // 补发工资单模版基础表单
|
||||
@observable salaryItemSet = []; // 显示设置薪资项
|
||||
@observable salaryBillItemNameSetting = [
|
||||
{
|
||||
salaryTemplateId: "",
|
||||
salaryBillType: 0,
|
||||
itemShowNameSetting: []
|
||||
},
|
||||
{
|
||||
salaryTemplateId: "",
|
||||
salaryBillType: 1,
|
||||
itemShowNameSetting: []
|
||||
}
|
||||
]; // 工资单模板薪资项目名称修改列表
|
||||
@observable salaryBillItemNameSet = {}; // 工资单模板薪资项目名称修改列表
|
||||
|
||||
// **** 工资单页面 ****
|
||||
@observable salarySendTableStore = new TableStore(); // 工资单列表
|
||||
|
|
@ -87,6 +100,10 @@ export class payrollStore {
|
|||
|
||||
@action
|
||||
setSalaryItemSet = salaryItemSet => (this.salaryItemSet = salaryItemSet);
|
||||
@action
|
||||
setSalaryBillItemNameSet = salaryBillItemNameSet => (this.salaryBillItemNameSet = salaryBillItemNameSet);
|
||||
@action
|
||||
setSalaryBillItemNameSetting = salaryBillItemNameSetting => (this.salaryBillItemNameSetting = salaryBillItemNameSetting);
|
||||
|
||||
@action("工资单模板分页信息修改")
|
||||
setTemplateTablePageInfo = (pageInfo, callback) => {
|
||||
|
|
@ -214,6 +231,7 @@ export class payrollStore {
|
|||
if (res.status) {
|
||||
if (id !== "") {
|
||||
this.salaryItemSet = res.data.salaryTemplateSalaryItemSet;
|
||||
this.salaryBillItemNameSet = res.data.salaryBillItemNameSet;
|
||||
this.replenishSalaryTemplateSalaryItemSet = res.data.salaryTemplateSalaryItemSet;
|
||||
}
|
||||
this.salaryTemplateShowSet = { ...res.data.salaryTemplateShowSet.data, ...JSON.parse(salaryTemplateShowSetStorage) };
|
||||
|
|
@ -262,6 +280,7 @@ export class payrollStore {
|
|||
: false;
|
||||
params.salaryItemSetting = toJS(this.salaryItemSet);
|
||||
params.replenishSalaryItemSetting = toJS(this.replenishSalaryTemplateSalaryItemSet);
|
||||
params.salaryBillItemNameSetting = toJS(this.salaryBillItemNameSetting);
|
||||
return params;
|
||||
};
|
||||
|
||||
|
|
@ -274,6 +293,9 @@ export class payrollStore {
|
|||
if (res.status) {
|
||||
message.success("保存成功");
|
||||
this.getPayrollTemplateList();
|
||||
this.setSalaryBillItemNameSetting(_.map(this.salaryBillItemNameSetting, it => {
|
||||
return { ...it, salaryTemplateId: "", itemShowNameSetting: [] };
|
||||
}));
|
||||
resolve();
|
||||
} else {
|
||||
message.error(res.errormsg || "保存失败");
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { action, observable } from "mobx";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import * as API from "../apis/payrollFiles";
|
||||
import { statisticsEmployeeDetailList, getDataPerspective } from "../apis/statistics";
|
||||
import { getDataPerspective, statisticsEmployeeDetailList } from "../apis/statistics";
|
||||
|
||||
|
||||
const { TableStore } = WeaTableNew;
|
||||
|
|
@ -14,11 +14,12 @@ export class PayrollFilesStore {
|
|||
@action("薪资档案-列表查询")
|
||||
queryList = (payload = {}, searchItemsValue = {}, url = "") => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const { departmentIds, positionIds, subcompanyIds, ...extra } = searchItemsValue;
|
||||
const { departmentIds, positionIds, subcompanyIds, statuses, ...extra } = searchItemsValue;
|
||||
API.queryList({
|
||||
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
||||
positionIds: positionIds ? positionIds.split(",") : [],
|
||||
subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [],
|
||||
statuses: statuses ? statuses.split(",") : [],
|
||||
...payload, ...extra, url
|
||||
}).then(res => {
|
||||
const { data, status } = res;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ export class SalaryItemStore {
|
|||
@observable request = {
|
||||
name: "",
|
||||
useDefault: 0,
|
||||
hideDefault: 0,
|
||||
useInEmployeeSalary: 0,
|
||||
systemType: 0,
|
||||
roundingMode: "1",
|
||||
|
|
@ -63,6 +64,7 @@ export class SalaryItemStore {
|
|||
initRequest = () => this.request = {
|
||||
name: "",
|
||||
useDefault: 0,
|
||||
hideDefault: 0,
|
||||
useInEmployeeSalary: 0,
|
||||
systemType: 0,
|
||||
roundingMode: "1",
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { WeaForm, WeaTableNew } from "comsMobx";
|
|||
|
||||
import * as API from "../apis/taxAgent"; // 引入API接口文件
|
||||
import { decentralizationConditions, editConditions } from "../pages/taxAgent/editConditions";
|
||||
import { taxAgentRangeExtDelete } from "../apis/taxAgent";
|
||||
|
||||
const { TableStore } = WeaTableNew;
|
||||
|
||||
|
|
@ -171,6 +172,21 @@ export class TaxAgentStore {
|
|||
getTaxAgentRangeForm = params => {
|
||||
return API.getTaxAgentRangeForm(params);
|
||||
};
|
||||
// 非系统人员范围保存
|
||||
@action
|
||||
taxAgentRangeExtSave = params => {
|
||||
return API.taxAgentRangeExtSave(params);
|
||||
};
|
||||
// 非系统人员范围查询
|
||||
@action
|
||||
taxAgentRangelistExt = params => {
|
||||
return API.taxAgentRangelistExt(params);
|
||||
};
|
||||
// 非系统人员范围删除
|
||||
@action
|
||||
taxAgentRangeExtDelete = params => {
|
||||
return API.taxAgentRangeExtDelete(params);
|
||||
};
|
||||
// 人员范围保存
|
||||
@action
|
||||
taxAgentRangeSave = params => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
import loadjs from "loadjs";
|
||||
|
||||
const RSAEcrypt = (openRSA, param) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
//异步加载ras文件
|
||||
loadjs.isDefined("rsa") ? loadjs.ready("rsa", () => {
|
||||
if (openRSA && openRSA == "1") {
|
||||
Object.keys(param).forEach(key => {
|
||||
param[key] = __RSAEcrypt__.rsa_data_encrypt(param[key]);
|
||||
});
|
||||
}
|
||||
resolve(param);
|
||||
}) : loadjs(["/js/rsa/jsencrypt.js", "/js/rsa/rsa.js"], "rsa", {
|
||||
async: false,
|
||||
success: () => {
|
||||
if (openRSA && openRSA == "1") {
|
||||
const callback = () => {
|
||||
Object.keys(param).forEach(key => {
|
||||
param[key] = __RSAEcrypt__.rsa_data_encrypt(param[key]);
|
||||
});
|
||||
resolve(param);
|
||||
};
|
||||
__RSAEcrypt__.initRsaCode(callback);
|
||||
} else {
|
||||
resolve(param);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
export { RSAEcrypt };
|
||||
|
|
@ -32,6 +32,7 @@ export const getSearchs = (form, condition, col, isCenter, onChange = () => void
|
|||
wrapperCol={{ span: `${fields.fieldcol}` }} // 右侧控件占一行比例
|
||||
error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验
|
||||
tipPosition="bottom" // 错误提示的显示位置: top/bottom
|
||||
className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : ""}
|
||||
>
|
||||
<WeaSwitch
|
||||
fieldConfig={fields}
|
||||
|
|
|
|||
Loading…
Reference in New Issue