Merge branch 'feature/2.8.3.2308-人员信息报送' into feature/v2-对接e10个税扣缴义务人设置-1121
# Conflicts: # pc4mobx/hrmSalary/index.js
This commit is contained in:
commit
892e0f10f9
|
|
@ -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", {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 导入-步骤一
|
||||
* Description:
|
||||
* Date: 2023/8/11
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { Icon, Upload, message } from "antd";
|
||||
|
||||
const Dragger = Upload.Dragger;
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class ImpStep1 extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
fileList: []
|
||||
};
|
||||
}
|
||||
|
||||
handleChange = (data) => {
|
||||
const { fileList, file } = data;
|
||||
if (file.response && typeof (file.response) != "undefined") message.success(getLabel(111, "上传成功"));
|
||||
this.setState({ fileList });
|
||||
};
|
||||
|
||||
render() {
|
||||
const { fileList } = this.state;
|
||||
const dragger = {
|
||||
accept: ".xlsx",
|
||||
name: "file",
|
||||
multiple: false,
|
||||
action: "/api/doc/upload/uploadFile",
|
||||
fileList,
|
||||
onChange: this.handleChange
|
||||
};
|
||||
return (
|
||||
<div className="weapp-batch-impsteps-picker-content-imp-step1">
|
||||
{/* 导入选项 */}
|
||||
{
|
||||
this.props.importParams &&
|
||||
<div className="weapp-salary-tb-border-bottom import-option">
|
||||
<div>{getLabel(543201, "导入选项")}</div>
|
||||
{this.props.importParams}
|
||||
</div>
|
||||
}
|
||||
<div className="title">{getLabel(543202, "导入Excel")}</div>
|
||||
<p className="draggerUploadWrapper">
|
||||
<Dragger {...dragger}>
|
||||
<div>
|
||||
<p className="iconUpload"><Icon type="inbox"/></p>
|
||||
<p className="uplaod-title">{getLabel(543203, "点击或将文件拖拽到此区域上传")}</p>
|
||||
<p
|
||||
className="uplaod-subTitle">{getLabel(543204, "支持单个或批量上传,严禁上传公司内部资料及其他违禁文件")}</p>
|
||||
</div>
|
||||
</Dragger>
|
||||
</p>
|
||||
|
||||
<div className="bottom-border">
|
||||
<div>{getLabel(27577, "操作步骤")}</div>
|
||||
<p>
|
||||
<span>{`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}</span>
|
||||
<a href={this.props.link} className="weapp-salary-link"
|
||||
target="_blank">{getLabel(543207, "点击这里下载模板")}</a>
|
||||
</p>
|
||||
<p>{`2. ${getLabel(543211, "第二步")},${getLabel(543212, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(543213, "没有被修改掉")};`}</p>
|
||||
<p>{`3. ${getLabel(543216, "第三步")},${getLabel(543215, "选择填写好的Excel文档")},${getLabel(543214, "点击“下一步”按钮进行数据预览")};`}</p>
|
||||
<p>
|
||||
{`4. ${getLabel(543217, "第四步")},${getLabel(543218, "如果以上步骤和Excel文档正确的话")},${getLabel(543219, "导入成功会有提示")},${getLabel(543220, "数据会被正确导入")}。${getLabel(543221, "如果有问题")},${getLabel(543222, "则会提示Excel文档的错误之处")}。`}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="description">
|
||||
<div>{getLabel(543223, "Excel文件说明")}</div>
|
||||
<p>{`1. ${getLabel(543224, "后缀名为xls或者xlsx")};`}</p>
|
||||
<p>{`2. ${getLabel(543225, "数据请勿放在合并的单元格中")};`}</p>
|
||||
<p><span>{`3. ${getLabel(543226, "账单月份格式必须为")}:YYYY-MM;`}</span></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ImpStep1;
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 导入-步骤3
|
||||
* Description:
|
||||
* Date: 2023/8/11
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import successImg from "../../importModal/success.svg";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class ImpStep3 extends Component {
|
||||
render() {
|
||||
const { importResult } = this.props;
|
||||
return (
|
||||
<div className="weapp-batch-impsteps-picker-content-imp-step3">
|
||||
{
|
||||
!_.isEmpty(importResult) ?
|
||||
<div className="weapp-batch-impsteps-picker-spinText">
|
||||
<p><img src={successImg} alt=""/></p>
|
||||
<p>
|
||||
<span>{getLabel(389249, "已导入")}</span>
|
||||
<span style={{ color: "green" }}> {importResult.successCount}</span>
|
||||
<span>{`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`}</span>
|
||||
<span style={{ color: "red" }}> {importResult.errorCount} </span>{getLabel(30690, "条数据")}
|
||||
</p>
|
||||
</div> :
|
||||
<div className="weapp-batch-impsteps-picker-spinText">
|
||||
<p>{getLabel(111, "导入失败")}</p>
|
||||
</div>
|
||||
}
|
||||
{
|
||||
!_.isEmpty(importResult.errorData) &&
|
||||
<WeaTable
|
||||
columns={[
|
||||
{
|
||||
title: getLabel(25700, "错误信息"),
|
||||
dataIndex: "message"
|
||||
}
|
||||
]}
|
||||
dataSource={importResult.errorData} pagination={false}
|
||||
scroll={{ y: `calc(100vh - 387px)` }}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ImpStep3;
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 导入弹框-步骤条
|
||||
* Description:
|
||||
* Date: 2023/8/11
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaSteps } from "ecCom";
|
||||
import ImpStep1 from "./components/impStep1";
|
||||
import ImpStep3 from "./components/impStep3";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
const Step = WeaSteps.Step;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
current: 0
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (JSON.stringify(nextProps.importResult) !== JSON.stringify(this.props.importResult)) {
|
||||
this.setState({
|
||||
current: this.state.current + 1
|
||||
});
|
||||
}
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ current: 0 });
|
||||
}
|
||||
|
||||
renderChildren = () => {
|
||||
const { current } = this.state;
|
||||
const { importParams, link, excludeKey, importResult } = this.props;
|
||||
let CurrentDom = null;
|
||||
switch (current) {
|
||||
case 0:
|
||||
CurrentDom = <ImpStep1 importParams={importParams} link={link} ref={dom => this.step1Ref = dom}/>;
|
||||
break;
|
||||
case 1:
|
||||
CurrentDom = null;
|
||||
if (excludeKey) {
|
||||
CurrentDom = <ImpStep3 importResult={importResult}/>;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
CurrentDom = null;
|
||||
break;
|
||||
default:
|
||||
CurrentDom = null;
|
||||
break;
|
||||
}
|
||||
return CurrentDom;
|
||||
};
|
||||
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 下一步
|
||||
* Params:
|
||||
* Date: 2023/8/11
|
||||
*/
|
||||
handleNext = () => {
|
||||
const { params } = this.props;
|
||||
const { fileList } = this.step1Ref.state;
|
||||
if (!_.isEmpty(params)) {
|
||||
if (!Object.values(params).every(o => !!o)) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (_.isEmpty(fileList)) {
|
||||
message.error(getLabel(111, "请先上传EXCEL文件"));
|
||||
return;
|
||||
}
|
||||
const [file] = fileList;
|
||||
const { response } = file;
|
||||
this.props.nextCallback(response.data.fileid);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { current } = this.state;
|
||||
const stepData = [
|
||||
{ key: 0, label: getLabel(543202, "上传EXCEL") },
|
||||
{ key: 1, label: getLabel(543200, "数据预览") },
|
||||
{ key: 2, label: getLabel(502835, "导入数据") }
|
||||
];
|
||||
const btns = [
|
||||
<Button type="ghost">{getLabel(1876, "上一步")}</Button>,
|
||||
<Button type="primary" onClick={this.handleNext}
|
||||
loading={this.props.nextloading}>{getLabel(1402, "下一步")}</Button>,
|
||||
<Button type="primary" onClick={() => this.props.onCancel(true)}>{getLabel(555, "完成")}</Button>
|
||||
];
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props}
|
||||
scalable hasScroll className="importBox" initLoadCss
|
||||
buttons={current === 0 ? _.nth(btns, 1) : (!this.props.excludeKey && current === 1) ? _.take(btns, 2) : _.takeRight(btns)}
|
||||
style={{
|
||||
width: 800,
|
||||
height: 606.6,
|
||||
minHeight: 200,
|
||||
minWidth: 380,
|
||||
maxHeight: "90%",
|
||||
maxWidth: "90%",
|
||||
overflow: "hidden",
|
||||
transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
<div className="importCont">
|
||||
<div className="weapp-batch-impsteps-picker-content-imp-steps">
|
||||
<WeaSteps current={current}>
|
||||
{/*this.props.key: 不需要展示的步骤*/}
|
||||
{
|
||||
_.map(_.filter(stepData, item => item.key !== this.props.excludeKey), it => (
|
||||
<Step key={it.key} description={it.label}/>))
|
||||
}
|
||||
</WeaSteps>
|
||||
</div>
|
||||
<div className="weapp-batch-impsteps-picker">
|
||||
{
|
||||
this.renderChildren()
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
.importBox {
|
||||
.importCont {
|
||||
padding: 16px 8px;
|
||||
|
||||
.weapp-batch-impsteps-picker-content-imp-steps {
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.weapp-batch-impsteps-picker {
|
||||
margin: 16px auto;
|
||||
|
||||
.weapp-batch-impsteps-picker-content-imp-step1 {
|
||||
width: 98%;
|
||||
background-color: #fff;
|
||||
margin: 8px auto;
|
||||
border-radius: 3px;
|
||||
padding: 1px 12px;
|
||||
|
||||
.weapp-batch-impsteps-picker-content-imp-step1 div {
|
||||
color: #111;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.weapp-salary-tb-border-bottom .weapp-salary-tb-filter.weapp-salary-import-param {
|
||||
box-sizing: border-box;
|
||||
padding: 16px;
|
||||
height: auto;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.weapp-salary-import-param {
|
||||
border: 1px solid #ebedf0;
|
||||
padding: 8px;
|
||||
margin: 4px 0 14px;
|
||||
}
|
||||
|
||||
.weapp-salary-tb-filter {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.weapp-salary-tb-border-bottom .weapp-salary-tb-filter.weapp-salary-import-param .tbf-item {
|
||||
display: flex;
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.weapp-salary-tb-filter .tbf-item {
|
||||
padding: 0 20px 0 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
color: #111;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.weapp-salary-tb-filter .tbf-item > .tbfi-label {
|
||||
flex-basis: 100px;
|
||||
flex-shrink: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
padding-right: 10px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.draggerUploadWrapper {
|
||||
margin: 16px 0 0;
|
||||
|
||||
.ant-upload-drag-container {
|
||||
padding: 24px 0 16px;
|
||||
|
||||
.iconUpload {
|
||||
i {
|
||||
color: #5d9cec;
|
||||
font-size: 43px;
|
||||
}
|
||||
}
|
||||
|
||||
.uplaod-title {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.uplaod-subTitle {
|
||||
height: 22px;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
line-height: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-border, .description {
|
||||
margin-top: 12px;
|
||||
|
||||
p {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
line-height: 15px;
|
||||
margin: 12px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-border {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
.weapp-salary-link {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #5d9cec;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.weapp-batch-impsteps-picker-content-imp-step3 {
|
||||
.weapp-batch-impsteps-picker-spinText {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
padding-top: 80px;
|
||||
padding-bottom: 80px;
|
||||
text-align: center;
|
||||
|
||||
p {
|
||||
margin: 14px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -20,6 +20,8 @@ import Payroll from "./pages/payroll";
|
|||
import PayrollGrant from "./pages/payroll/payrollGrant";
|
||||
import PayrollDetail from "./pages/payroll/payrollDetail";
|
||||
import Declare from "./pages/declare";
|
||||
import Employeedeclare from "./pages/employeedeclare";
|
||||
import EmployeedeclareDetail from "./pages/employeedeclareDetail";
|
||||
import TaxRate from "./pages/taxRate";
|
||||
import TaxAgents from "./pages/taxAgent";
|
||||
import TaxAgent from "./pages/salary/taxAgent";
|
||||
|
|
@ -39,6 +41,7 @@ import ReportView from "./pages/reportView";
|
|||
import MySalaryView from "./pages/mySalary/mySalaryView";
|
||||
import WatermarkPreview from "./pages/payroll/watermarkPreview";
|
||||
import IntelligentCalculateSalarySettings from "./pages/intelligentCalculateSalarySettings";
|
||||
import ExternalPersonManage from "./pages/externalPersonManage";
|
||||
|
||||
import stores from "./stores";
|
||||
import "./style/index";
|
||||
|
|
@ -88,6 +91,9 @@ const DataAcquisition = (props) => props.children;
|
|||
// fieldManagement 字段管理
|
||||
// analysisOfSalaryStatistics 薪酬统计分析
|
||||
// reportView 薪酬报表查看
|
||||
// externalPersonManage 非系统人员管理
|
||||
// employeedeclare 人员信息报送
|
||||
// employeedeclareDetail 人员信息报送详情
|
||||
// intelligentCalculateSalarySettings 智能算薪
|
||||
|
||||
const Routes = (
|
||||
|
|
@ -151,6 +157,8 @@ const Routes = (
|
|||
component={TemplatePreview}
|
||||
/>
|
||||
<Route key="declare" path="declare" component={Declare}/>
|
||||
<Route key="employeedeclare" path="employeedeclare" component={Employeedeclare}/>
|
||||
<Route key="employeedeclareDetail" path="employeedeclareDetail" component={EmployeedeclareDetail}/>
|
||||
<Route
|
||||
key="generateDeclarationDetail"
|
||||
path="generateDeclarationDetail"
|
||||
|
|
@ -169,6 +177,7 @@ const Routes = (
|
|||
<Route key="reportView" path="reportView" component={ReportView}/>
|
||||
<Route key="intelligentCalculateSalarySettings" path="intelligentCalculateSalarySettings"
|
||||
component={IntelligentCalculateSalarySettings}/>
|
||||
<Route key="externalPersonManage" path="externalPersonManage" component={ExternalPersonManage}/>
|
||||
</Route>
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = "0", ...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;
|
||||
|
|
@ -3,14 +3,25 @@ import UserSure from "./userSure";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import SalaryDetail from "./salaryDetail";
|
||||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||
import { WeaBrowser, WeaCheckbox, WeaDropdown, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom";
|
||||
import {
|
||||
WeaBrowser,
|
||||
WeaCheckbox,
|
||||
WeaDropdown,
|
||||
WeaFormItem,
|
||||
WeaInput,
|
||||
WeaLocaleProvider,
|
||||
WeaSearchGroup,
|
||||
WeaSelect,
|
||||
WeaTab
|
||||
} from "ecCom";
|
||||
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 getLabel = WeaLocaleProvider.getLabel;
|
||||
const { ButtonSelect } = WeaDropdown;
|
||||
|
||||
@inject("calculateStore", "salaryFileStore", "taxAgentStore")
|
||||
|
|
@ -36,7 +47,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;
|
||||
|
|
@ -239,9 +253,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({
|
||||
|
|
@ -284,13 +315,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">导入</Menu.Item>
|
||||
<Menu.Item key="2">线下对比</Menu.Item>
|
||||
<Menu.Item key="3">导出全部</Menu.Item>
|
||||
<Menu.Item key="4">{getLabel(111, "自定义导出")}</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
|
|
@ -417,6 +456,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>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -2,13 +2,16 @@ import React from "react";
|
|||
import { toJS } from "mobx";
|
||||
import CustomTab from "../../components/customTab";
|
||||
import { Dropdown, Menu, message } from "antd";
|
||||
import { WeaHelpfulTip, WeaInputSearch, WeaSlideModal } from "ecCom";
|
||||
import { WeaHelpfulTip, WeaInputSearch, WeaLocaleProvider, WeaSlideModal } from "ecCom";
|
||||
import SlideModalTitle from "../../components/slideModalTitle";
|
||||
import FileMergeDetail from "./fileMergeDetail";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { getExportField } from "../../apis/calculate";
|
||||
import "./index.less";
|
||||
import CustomExportDialog from "./customExportDialog";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
@inject("calculateStore")
|
||||
@observer
|
||||
export default class PlaceOnFileDetail extends React.Component {
|
||||
|
|
@ -18,7 +21,10 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
slideVisiable: false,
|
||||
selectedRowKeys: [],
|
||||
searchValue: "",
|
||||
columnIndex: ""
|
||||
columnIndex: "",
|
||||
customExportParams: {
|
||||
visible: false, checkItems: [], itemsByGroup: []
|
||||
}
|
||||
};
|
||||
this.id = "";
|
||||
}
|
||||
|
|
@ -95,15 +101,33 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
};
|
||||
|
||||
handleMenuClick() {
|
||||
const { calculateStore: { exportAll } } = this.props;
|
||||
const { selectedRowKeys } = this.state;
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("未选择条目");
|
||||
return;
|
||||
handleMenuClick = ({ key }) => {
|
||||
if (key === "3") {
|
||||
const { calculateStore: { exportAll } } = this.props;
|
||||
const { selectedRowKeys } = this.state;
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("未选择条目");
|
||||
return;
|
||||
}
|
||||
exportAll(this.id, selectedRowKeys.join(","));
|
||||
} else if (key === "4") {
|
||||
this.getExportField();
|
||||
}
|
||||
exportAll(this.id, selectedRowKeys.join(","));
|
||||
}
|
||||
};
|
||||
|
||||
getExportField = () => {
|
||||
getExportField({ salaryAcctRecordId: getQueryString("id") }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { checkItems, itemsByGroup } = data;
|
||||
this.setState({
|
||||
customExportParams: {
|
||||
visible: true,
|
||||
checkItems, itemsByGroup
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
handleExportAll = () => {
|
||||
const { calculateStore: { exportAll } } = this.props;
|
||||
|
|
@ -113,11 +137,12 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
render() {
|
||||
const { calculateStore } = this.props;
|
||||
const { baseSalarySobCycle, columnDescList } = calculateStore;
|
||||
const { slideVisiable, columnIndex } = this.state;
|
||||
const { slideVisiable, columnIndex, customExportParams } = this.state;
|
||||
|
||||
const menu = (
|
||||
<Menu onClick={(e) => this.handleMenuClick(e)}>
|
||||
<Menu.Item key="3">导出所选</Menu.Item>
|
||||
<Menu.Item key="4">{getLabel(111, "自定义导出")}</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
|
|
@ -171,6 +196,17 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
id="atdTable"
|
||||
/>
|
||||
</div>
|
||||
<CustomExportDialog
|
||||
{...customExportParams}
|
||||
searchItemsValue={{ employeeName: this.state.searchValue }}
|
||||
onCancel={() => {
|
||||
this.setState({
|
||||
customExportParams: {
|
||||
visible: false, checkItems: [], itemsByGroup: []
|
||||
}
|
||||
});
|
||||
}}
|
||||
/>
|
||||
{
|
||||
slideVisiable &&
|
||||
<WeaSlideModal
|
||||
|
|
|
|||
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 人员信息报送
|
||||
* Description:
|
||||
* Date: 2023/7/24
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
|
||||
import { Col, Row } from "antd";
|
||||
import TipLabel from "../../components/TipLabel";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
loading: false
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
const { pageInfo } = this.state;
|
||||
const tipList = [
|
||||
getLabel(544290, "1、点击查看详情,管理各个个税扣缴义务人的人员报送信息,如购买了在线报送服务,可在线报送,如未购买在线报送服务,也可导出数据线下报送。")
|
||||
];
|
||||
return (
|
||||
<WeaTop
|
||||
title={getLabel(544289, "人员信息报送")} iconBgcolor="#F14A2D"
|
||||
icon={<i className="icon-coms-fa"/>}
|
||||
buttons={[
|
||||
<WeaInputSearch placeholder={getLabel(543634, "请输入个税扣缴义务人名称")}
|
||||
/>
|
||||
]}
|
||||
>
|
||||
<div style={{ height: "100%", background: "#f6f6f6", padding: 16 }}>
|
||||
<Row gutter={16}>
|
||||
<Col span={16}>
|
||||
<WeaTable
|
||||
columns={[
|
||||
{
|
||||
title: getLabel(537996, "个税扣缴义务人"),
|
||||
dataIndex: "taxAgentName"
|
||||
},
|
||||
{
|
||||
title: getLabel(30585, "操作"),
|
||||
dataIndex: "operate",
|
||||
width: 260,
|
||||
render: () => (<a href="javascript: void(0);">{getLabel(83110, "查看详情")}</a>)
|
||||
}
|
||||
]}
|
||||
dataSource={[]}
|
||||
pagination={{
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
});
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}><TipLabel tipList={tipList}/></Col>
|
||||
</Row>
|
||||
</div>
|
||||
</WeaTop>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 人员信息报送-基础信息
|
||||
* Description:
|
||||
* Date: 2023/8/14
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { getQueryString } from "../../../util/url";
|
||||
import EmployeeDeclareDetailCalcDialog from "./employeeDeclareDetailCalcDialog";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class BaseInfo extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
declareCalcDialog: {
|
||||
visible: false
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
handleOpenFailDialog = () => {
|
||||
this.setState({
|
||||
declareCalcDialog: {
|
||||
visible: true
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { declareCalcDialog } = this.state;
|
||||
return (
|
||||
<div className="base-info">
|
||||
<div className="left"><span>{getLabel(537996, "个税扣缴义务人")}:{getQueryString("taxName")}</span></div>
|
||||
<div className="right">
|
||||
<div className="header-declare-info">
|
||||
<a href="javascript:void(0);" className="fail"
|
||||
onClick={this.handleOpenFailDialog}>{getLabel(111, "报送失败")}: 0</a>
|
||||
<span className="not">{getLabel(111, "未报送")}: 0</span>
|
||||
</div>
|
||||
</div>
|
||||
{/*报送失败数据查看*/}
|
||||
<EmployeeDeclareDetailCalcDialog
|
||||
{...declareCalcDialog}
|
||||
onCancel={() => {
|
||||
this.setState({
|
||||
declareCalcDialog: {
|
||||
visible: false
|
||||
}
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default BaseInfo;
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 报送信息-失败查看弹框
|
||||
* Description:
|
||||
* Date: 2023/8/14
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { Button, Col, Row } from "antd";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class EmployeeDeclareDetailCalcDialog extends Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props}
|
||||
scalable hasScroll className="declareCalcDialog" initLoadCss
|
||||
title={(<Row className="declareCalcDialogTitle" type="flex">
|
||||
<Col span={12} className="declareCalcDialogTitle-left">
|
||||
<span className="title">{getLabel(111, "报送失败数据详情")}</span>
|
||||
</Col>
|
||||
<Col span={12} className="declareCalcDialogTitle-right">
|
||||
<Button type="primary" onClick={this.handleSubmit}>{getLabel(81272, "导出全部")}</Button>
|
||||
</Col>
|
||||
</Row>)}
|
||||
style={{
|
||||
width: 1150,
|
||||
height: 606.6,
|
||||
minHeight: 200,
|
||||
minWidth: 380,
|
||||
maxHeight: "90%",
|
||||
maxWidth: "90%",
|
||||
overflow: "hidden",
|
||||
transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
<div className="declareCalcDialogContent">
|
||||
<WeaTable
|
||||
columns={[{ dataIndex: "opt", title: "操作" }]}
|
||||
dataSource={[]}
|
||||
/>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default EmployeeDeclareDetailCalcDialog;
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 报送信息-编辑、新增弹框
|
||||
* Description:
|
||||
* Date: 2023/8/14
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaSlideModal } from "ecCom";
|
||||
import { Button, Col, Row } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { declareConditions } from "../constants";
|
||||
import { getSearchs } from "../../../util";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
@inject("employeeDeclareStore")
|
||||
@observer
|
||||
class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
||||
componentDidMount() {
|
||||
const { employeeDeclareStore: { declareForm } } = this.props;
|
||||
declareForm.initFormFields(declareConditions);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
}
|
||||
|
||||
handleSubmit = () => {
|
||||
const { employeeDeclareStore: { declareForm: form } } = this.props;
|
||||
form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = form.getFormParams();
|
||||
console.log(payload);
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { employeeDeclareStore: { declareForm: form } } = this.props;
|
||||
return (
|
||||
<WeaSlideModal
|
||||
{...this.props}
|
||||
top={0} measureT="%"
|
||||
width={800} measureX="px"
|
||||
height={100} measureY="%"
|
||||
direction="right"
|
||||
title={(<Row className="declareSchemeDialogTitle" type="flex">
|
||||
<Col span={12} className="declareSchemeDialogTitle-left">
|
||||
<div className="icon-circle-base"><i className="icon-coms-fa"/></div>
|
||||
<span className="title">{getLabel(111, "本月新增数据")}</span>
|
||||
</Col>
|
||||
<Col span={12} className="declareSchemeDialogTitle-right">
|
||||
<Button type="primary" onClick={this.handleSubmit}>{getLabel(537558, "保存")}</Button>
|
||||
</Col>
|
||||
</Row>)}
|
||||
content={(<div className="declareSchemeDialog">{getSearchs(form, declareConditions, 1)}</div>)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default EmployeeDeclareDetailSchemaEditDialog;
|
||||
|
|
@ -0,0 +1,252 @@
|
|||
export const submitStatus = [
|
||||
{
|
||||
key: "ALL",
|
||||
showname: "全部(报送状态)",
|
||||
lanId: 332
|
||||
},
|
||||
{
|
||||
key: "NOT_DECLARE",
|
||||
showname: "待报送",
|
||||
lanId: 111
|
||||
},
|
||||
{
|
||||
key: "DECLARING",
|
||||
showname: "报送中",
|
||||
lanId: 111
|
||||
},
|
||||
{
|
||||
key: "DECLARE_FAIL",
|
||||
showname: "报送失败",
|
||||
lanId: 111
|
||||
},
|
||||
{
|
||||
key: "DECLARE_SUCCESS",
|
||||
showname: "报送成功",
|
||||
lanId: 111
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
export const advanceConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["keyword"],
|
||||
fieldcol: 18,
|
||||
label: "姓名或工号",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: ""
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "57"
|
||||
},
|
||||
colSpan: 1,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["departmentIds"],
|
||||
fieldcol: 18,
|
||||
label: "部门",
|
||||
lanId: 27511,
|
||||
labelcol: 6
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "278"
|
||||
},
|
||||
colSpan: 1,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["positionIds"],
|
||||
fieldcol: 18,
|
||||
label: "岗位",
|
||||
lanId: 6086,
|
||||
labelcol: 6
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["employmentStatus"],
|
||||
fieldcol: 18,
|
||||
label: "人员状态",
|
||||
lanId: 382300,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["employmentType"],
|
||||
fieldcol: 18,
|
||||
label: "任职受雇从业类型",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "RANGEPICKER",
|
||||
domkey: ["fromEmploymentDate", "endEmploymentDate"],
|
||||
fieldcol: 18,
|
||||
label: "任职受雇日期",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: ""
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "RANGEPICKER",
|
||||
domkey: ["fromDismissDate", "endDismissDate"],
|
||||
fieldcol: 18,
|
||||
label: "离职日期",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: ""
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["disability"],
|
||||
fieldcol: 18,
|
||||
label: "是否残疾",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["lonelyOld"],
|
||||
fieldcol: 18,
|
||||
label: "是否孤老",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["martyrDependents"],
|
||||
fieldcol: 18,
|
||||
label: "是否是烈属",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["deductExpenses"],
|
||||
fieldcol: 18,
|
||||
label: "是否扣除减除费用",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
options: []
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
||||
export const declareConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 2,
|
||||
fieldcol: 12,
|
||||
labelcol: 6,
|
||||
rules: "selectLinkageRequired",
|
||||
conditionType: "SELECT_LINKAGE",
|
||||
selectLinkageDatas: {
|
||||
"1": {
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: true,
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "1"
|
||||
},
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["INPUT"]
|
||||
},
|
||||
"2": {
|
||||
conditionType: "CHECKBOX",
|
||||
domkey: ["CHECKBOX"]
|
||||
}
|
||||
},
|
||||
options: [
|
||||
{ key: "1", showname: "今天" },
|
||||
{ key: "2", showname: "本周" }
|
||||
],
|
||||
domkey: ["secleve"],
|
||||
label: "系统名称",
|
||||
lanId: 111,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["keyword"],
|
||||
fieldcol: 12,
|
||||
label: "证件姓名",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
@ -0,0 +1,165 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 人员信息报送-查看详情
|
||||
* Description:
|
||||
* Date: 2023/8/11
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDatePicker, WeaLocaleProvider, WeaSelect, WeaTab, WeaTop } from "ecCom";
|
||||
import { Button, Dropdown, Menu, Spin } from "antd";
|
||||
import BaseInfo from "./components/baseInfo";
|
||||
import EmployeeDeclareDetailSchemaEditDialog from "./components/employeeDeclareDetailSchemaEditDialog";
|
||||
import { advanceConditions, submitStatus } from "./constants";
|
||||
import { getSearchs } from "../../util";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
@inject("taxAgentStore", "employeeDeclareStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "0",
|
||||
showSearchAd: false,
|
||||
declareStatus: "ALL",
|
||||
taxCycle: new Date(),
|
||||
declareEditDialog: {
|
||||
visible: false
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { employeeDeclareStore: { advanceForm } } = this.props;
|
||||
document.title = getLabel(544289, "人员信息报送");
|
||||
advanceForm.initFormFields(advanceConditions);
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
this.setCss();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
setCss = () => {
|
||||
$($("head")[0]).append("<style id=\"theme-style\" type=\"text/css\">" + ".ant-calendar-picker-container { right: 0 !important; left: auto !important}" + "</style>");
|
||||
};
|
||||
|
||||
handleReceive = ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
if (type === "init") {
|
||||
this.postMessageToChild({});
|
||||
} else if (type === "turn") {
|
||||
if (id === "PAGEINFO") {
|
||||
const { pageNum: current, size: pageSize } = params;
|
||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } });
|
||||
}
|
||||
}
|
||||
};
|
||||
postMessageToChild = (payload) => {
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({}), "*");
|
||||
};
|
||||
handleAdd = () => {
|
||||
this.setState({
|
||||
declareEditDialog: {
|
||||
visible: true
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, showSearchAd, declareStatus, taxCycle, declareEditDialog } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn }, employeeDeclareStore: { advanceForm: form } } = this.props;
|
||||
const menu = (
|
||||
<Menu>
|
||||
<Menu.Item key="1">{getLabel(32136, "批量删除")}</Menu.Item>
|
||||
<Menu.Item key="2">{getLabel(111, "批量编辑")}</Menu.Item>
|
||||
<Menu.Item key="3">{getLabel(81272, "导出全部")}</Menu.Item>
|
||||
<Menu.Item key="4">{getLabel(543715, "导出所选")}</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
const buttons = [
|
||||
<Button type="primary">{getLabel(111, "全部报送")}</Button>,
|
||||
<Button type="ghost">{getLabel(111, "获取报送结果")}</Button>,
|
||||
<Button type="ghost">{getLabel(111, "刷新数据")}</Button>,
|
||||
<WeaDatePicker arrow type="month" className="pickerDateCustom flex a-center" value={taxCycle}
|
||||
onChange={val => console.log(val)}/>,
|
||||
<Dropdown overlay={menu}>
|
||||
<Button type="ghost" icon="ellipsis" className="moreBtn"/>
|
||||
</Dropdown>
|
||||
];
|
||||
const topTab = [
|
||||
{ title: getLabel(332, "全部"), viewcondition: "0" },
|
||||
{ title: getLabel(111, "本月新增"), viewcondition: "1" },
|
||||
{ title: getLabel(111, "本月信息变动"), viewcondition: "2" }
|
||||
];
|
||||
return (
|
||||
<WeaTop
|
||||
title={getLabel(544289, "人员信息报送")} iconBgcolor="#F14A2D"
|
||||
icon={<i className="icon-coms-fa"/>} className="declareWrapper"
|
||||
buttons={showOperateBtn ? buttons : []}
|
||||
>
|
||||
<div style={{ height: "100%", background: "#f6f6f6" }} className="flex flex-rollback">
|
||||
{/*基础信息*/}
|
||||
<BaseInfo/>
|
||||
{/*列表数据*/}
|
||||
<div className="listview-com-layout flex-1 flex flex-rollback">
|
||||
<WeaTab
|
||||
datas={topTab} keyParam="viewcondition" showSearchAd={showSearchAd}
|
||||
selectedKey={selectedKey} searchType={["base", "advanced"]}
|
||||
setShowSearchAd={bool => this.setState({ showSearchAd: bool })}
|
||||
advanceHeight={300} searchsAd={getSearchs(form, toJS(advanceConditions), 2)}
|
||||
buttons={[
|
||||
<Dropdown.Button
|
||||
onClick={this.handleAdd}
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item key="1">{getLabel(32935, "导入")}</Menu.Item>
|
||||
</Menu>
|
||||
}
|
||||
type="primary">{getLabel(1421, "新增")}</Dropdown.Button>,
|
||||
<WeaSelect
|
||||
value={declareStatus}
|
||||
style={{ width: 150 }}
|
||||
options={_.map(submitStatus, it => ({ ...it, showname: getLabel(it.lanId, it.showname) }))}
|
||||
onChange={declareStatus => this.setState({ declareStatus })}
|
||||
/>
|
||||
]} searchsBaseValue={form.getFormParams().keyword}
|
||||
onSearchChange={(v) => form.updateFields({ keyword: v })}
|
||||
onChange={key => this.setState({ selectedKey: key })}
|
||||
onAdReset={() => form.resetForm()}
|
||||
/>
|
||||
<div className="flex-1">
|
||||
<Spin spinning={false}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
src="http://localhost:7607/#/employeeDeclareTable"
|
||||
// src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/employeeDeclareTable"
|
||||
id="atdTable"
|
||||
/>
|
||||
</Spin>
|
||||
{/*新增编辑报送信息*/}
|
||||
<EmployeeDeclareDetailSchemaEditDialog
|
||||
{...declareEditDialog}
|
||||
onClose={() => {
|
||||
this.setState({
|
||||
declareEditDialog: {
|
||||
visible: false
|
||||
}
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</WeaTop>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
.declareWrapper {
|
||||
.wea-new-top {
|
||||
.moreBtn {
|
||||
border: 1px solid transparent;
|
||||
|
||||
i {
|
||||
font-weight: 700;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
.moreBtn:hover {
|
||||
border: 1px solid #57c5f7;
|
||||
background: #ffffff;
|
||||
color: #57c5f7;
|
||||
}
|
||||
}
|
||||
|
||||
.base-info {
|
||||
background: #ebf4ff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-height: 50px;
|
||||
margin-bottom: 8px;
|
||||
border-radius: 4px;
|
||||
padding: 0 16px;
|
||||
|
||||
.right .header-declare-info {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
margin-right: 16px;
|
||||
|
||||
.fail {
|
||||
color: #5d9cec;
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.listview-com-layout {
|
||||
padding: 0 16px;
|
||||
|
||||
.wea-tab .wea-tab-right, .wea-input-focus {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pickerDateCustom {
|
||||
.icon-coms-Browse-box-delete, .icon-coms-Browse-box-Add-to {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1px solid #e5e5e5;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
padding: 0 6px;
|
||||
height: 30px;
|
||||
top: auto;
|
||||
}
|
||||
|
||||
.icon-coms-Browse-box-delete:hover, .icon-coms-Browse-box-Add-to:hover {
|
||||
color: #5d9cec;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//.ant-calendar-picker-container {
|
||||
// right: 0 !important;
|
||||
// left: auto !important;
|
||||
//}
|
||||
|
||||
.wea-slide-modal-title {
|
||||
border-bottom: 1px solid #e5e5e5 !important;
|
||||
}
|
||||
|
||||
.wea-slide-modal-content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.declareSchemeDialogTitle {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
.declareSchemeDialogTitle-left {
|
||||
text-align: left;
|
||||
padding-left: 16px;
|
||||
|
||||
.icon-circle-base {
|
||||
background: rgb(241, 74, 45);
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #111;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.declareSchemeDialogTitle-right {
|
||||
text-align: right;
|
||||
padding-right: 56px;
|
||||
}
|
||||
}
|
||||
|
||||
.declareSchemeDialog {
|
||||
height: 100%;
|
||||
padding: 16px;
|
||||
overflow-y: auto;
|
||||
background: #f6f6f6;
|
||||
|
||||
.wea-search-group .wea-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wea-search-group {
|
||||
border: 1px solid #e5e5e5;
|
||||
border-bottom: none;
|
||||
background: #fff;
|
||||
|
||||
.wea-form-item {
|
||||
padding: 5px 16px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-search-group, .wea-form-cell {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.declareCalcDialog {
|
||||
.declareCalcDialogTitle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.declareCalcDialogTitle-left {
|
||||
text-align: left;
|
||||
|
||||
.title {
|
||||
color: #111;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.declareCalcDialogTitle-right {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.declareCalcDialogContent {
|
||||
height: 100%;
|
||||
padding: 16px;
|
||||
background: #f6f6f6;
|
||||
}
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.flex-rollback {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.flex-1 {
|
||||
flex: 1;
|
||||
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 99%;
|
||||
}
|
||||
}
|
||||
|
||||
.a-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
|
@ -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,180 @@
|
|||
/*
|
||||
* 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, showSalaryItemBtn }
|
||||
} = 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 || showSalaryItemBtn) ? [
|
||||
<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 || showSalaryItemBtn) ? [
|
||||
...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 || showSalaryItemBtn} 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,13 +6,25 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaSlideModal, WeaTextarea, WeaInputNumber } 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";
|
||||
import { commonEnumList } from "../../../apis/payrollFiles";
|
||||
import { dataTypeOptions, patternOptions, roundingModeOptions } from "../../salaryItem/options";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class FieldSlide extends Component {
|
||||
|
|
@ -54,6 +66,7 @@ class FieldSlide extends Component {
|
|||
const {
|
||||
name,
|
||||
useDefault,
|
||||
hideDefault,
|
||||
useInEmployeeSalary,
|
||||
dataType,
|
||||
description,
|
||||
|
|
@ -68,6 +81,7 @@ class FieldSlide extends Component {
|
|||
name,
|
||||
useInEmployeeSalary: useInEmployeeSalary ? useInEmployeeSalary.toString() : "0",
|
||||
useDefault: useDefault ? useDefault.toString() : "0",
|
||||
hideDefault: hideDefault ? hideDefault.toString() : "0",
|
||||
dataType,
|
||||
description,
|
||||
sortedIndex,
|
||||
|
|
@ -120,6 +134,7 @@ class FieldSlide extends Component {
|
|||
const {
|
||||
name,
|
||||
useDefault,
|
||||
hideDefault,
|
||||
useInEmployeeSalary,
|
||||
dataType,
|
||||
description,
|
||||
|
|
@ -133,6 +148,7 @@ class FieldSlide extends Component {
|
|||
name,
|
||||
useInEmployeeSalary: Number(useInEmployeeSalary),
|
||||
useDefault: Number(useDefault),
|
||||
hideDefault: Number(hideDefault),
|
||||
dataType,
|
||||
description,
|
||||
sortedIndex,
|
||||
|
|
@ -168,6 +184,7 @@ class FieldSlide extends Component {
|
|||
name: "",
|
||||
useInEmployeeSalary: "1",
|
||||
useDefault: "0",
|
||||
hideDefault: "0",
|
||||
sharedType: "0",
|
||||
taxAgentIds: "",
|
||||
dataType: "number",
|
||||
|
|
@ -191,6 +208,7 @@ class FieldSlide extends Component {
|
|||
name,
|
||||
useInEmployeeSalary,
|
||||
useDefault,
|
||||
hideDefault,
|
||||
shareTypeList,
|
||||
sharedType,
|
||||
taxAgentIds,
|
||||
|
|
@ -250,6 +268,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="可见性" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||
<WeaSelect
|
||||
value={sharedType}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class FieldTable extends Component {
|
|||
title: "操作"
|
||||
}], 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, 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
|
||||
|
|
@ -39,6 +45,8 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
selectedKey: "listInclude",
|
||||
rowKeys: [],
|
||||
previewDataSource: [],
|
||||
externalPersonModalVisible: false,
|
||||
loading: false,
|
||||
importParams: {
|
||||
visible: false,
|
||||
step: 0,
|
||||
|
|
@ -48,10 +56,45 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
visible: false,
|
||||
title: "关联人员",
|
||||
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: 删除人员范围
|
||||
|
|
@ -59,23 +102,55 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
* Date: 2022/11/30
|
||||
*/
|
||||
taxAgentRangeDelete = () => {
|
||||
const { selectedKey } = this.state;
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: "确认要删除吗?",
|
||||
onOk: () => {
|
||||
deleteLedgerPersonRange(this.state.rowKeys).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
this.setState({ rowKeys: [] }, () => {
|
||||
this.personalScopeTableRef.clearRowkeys();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
});
|
||||
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("正在删除中...", 0);
|
||||
deleteLedgerPersonExtRange(this.state.rowKeys).then(({ status, errormsg }) => {
|
||||
message.destroy();
|
||||
resolve();
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
this.setState({ rowKeys: [] }, () => {
|
||||
this.personalScopeTableRef.clearRowkeys();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
}).catch(() => {
|
||||
message.destroy();
|
||||
reject();
|
||||
});
|
||||
};
|
||||
deleteLedgerPersonRange = (resolve, reject) => {
|
||||
message.destroy();
|
||||
message.loading("正在删除中...", 0);
|
||||
deleteLedgerPersonRange(this.state.rowKeys).then(({ status, errormsg }) => {
|
||||
message.destroy();
|
||||
resolve();
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
this.setState({ rowKeys: [] }, () => {
|
||||
this.personalScopeTableRef.clearRowkeys();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
}).catch(() => {
|
||||
message.destroy();
|
||||
reject();
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:新增人员范围
|
||||
|
|
@ -84,13 +159,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: 黎永顺
|
||||
|
|
@ -138,7 +217,9 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
rowKeys,
|
||||
personalAddModal,
|
||||
importParams,
|
||||
previewDataSource
|
||||
previewDataSource,
|
||||
externalPersonModalVisible,
|
||||
loading, extEmpsWitch
|
||||
} = this.state;
|
||||
const { taxAgentStore: { showOperateBtn }, editId, saveSalarySobId } = this.props;
|
||||
const topTab = [
|
||||
|
|
@ -149,6 +230,10 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
{
|
||||
title: "从范围中排除",
|
||||
viewcondition: "listExclude"
|
||||
},
|
||||
{
|
||||
title: "非系统人员范围",
|
||||
viewcondition: "externalList"
|
||||
}
|
||||
];
|
||||
const btns = showOperateBtn ? [
|
||||
|
|
@ -189,10 +274,10 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
return (
|
||||
<div>
|
||||
<WeaTab
|
||||
datas={topTab}
|
||||
datas={(extEmpsWitch === "0" || !extEmpsWitch) ? _.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
|
||||
|
|
@ -234,6 +319,13 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
}}
|
||||
/>
|
||||
)}
|
||||
{/*非系统人员添加*/}
|
||||
<ExternalPersonModal
|
||||
visible={externalPersonModalVisible}
|
||||
loading={loading}
|
||||
onCancel={() => this.setState({ externalPersonModalVisible: false })}
|
||||
onExternalPersonSave={this.handleSaveExternalPerson}
|
||||
/>
|
||||
{/*新增人员范围*/}
|
||||
<PersonalScopeModal
|
||||
{...personalAddModal}
|
||||
|
|
|
|||
|
|
@ -74,8 +74,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 }}/>;
|
||||
}
|
||||
|
|
@ -96,6 +97,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,16 @@ 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 { 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;
|
||||
|
|
@ -113,6 +114,35 @@ 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;
|
||||
this.getMySalaryBill(getQueryString("id"));
|
||||
window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`);
|
||||
} else {
|
||||
message.error(errorMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { mySalaryStore: { clearLoading, pwdForm } } = this.props;
|
||||
|
|
@ -139,9 +169,10 @@ export default class MobilePayroll extends React.Component {
|
|||
</WeaError>
|
||||
{
|
||||
notSetting &&
|
||||
<div style={{ clear: "both", paddingTop: 10 }} >
|
||||
<div style={{ clear: "both", paddingTop: 10 }}>
|
||||
{getLabel("514970", "您还未设置二次验证密码,点击")}
|
||||
<a href="javascript:void(0);" onClick={() => this.setState({ pwdSetVisible: true })}>{getLabel("30747", "设置")}</a>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.setState({ pwdSetVisible: true })}>{getLabel("30747", "设置")}</a>
|
||||
</div>
|
||||
}
|
||||
</WeaDialog>
|
||||
|
|
@ -156,7 +187,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>
|
||||
|
|
@ -169,7 +208,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>
|
||||
|
|
|
|||
|
|
@ -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,43 @@ 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 }, mySalaryStore: { getMySalaryBill } } = this.props;
|
||||
feedBackSalaryBill({ salaryInfoId }).then(({ status, errorMsg }) => {
|
||||
if (status) {
|
||||
const { mySalaryStore } = this.state;
|
||||
const { salaryTemplate } = mySalaryStore;
|
||||
const { feedbackUrl } = salaryTemplate;
|
||||
getMySalaryBill(Number(salaryInfoId)).then(data => {
|
||||
this.setState({ mySalaryStore: data }, () => {
|
||||
window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
message.error(errorMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { captchaVisible, mySalaryStore } = this.state;
|
||||
const { params: { salaryInfoId } } = this.props;
|
||||
|
|
@ -56,7 +97,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 +120,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>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,10 +21,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}`);
|
||||
}
|
||||
|
||||
// 查看详情
|
||||
|
|
|
|||
|
|
@ -506,7 +506,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="%"
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ export default class PayrollGrant extends React.Component {
|
|||
selectedKey: "0",
|
||||
progressVisible: false,
|
||||
progress: 0,
|
||||
showFeedbackColumn: false,
|
||||
payrollPartModalParams: {
|
||||
visible: false,
|
||||
title: "工资单发放",
|
||||
|
|
@ -39,7 +40,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;
|
||||
|
|
@ -299,11 +303,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: "操作",
|
||||
key: "",
|
||||
|
|
@ -602,6 +607,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,5 +1,15 @@
|
|||
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";
|
||||
|
|
@ -91,17 +101,8 @@ export default class BaseInformForm extends React.Component {
|
|||
render() {
|
||||
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;
|
||||
|
||||
|
|
@ -201,9 +202,12 @@ export default class BaseInformForm extends React.Component {
|
|||
autoSendStatus: value === "1",
|
||||
autoSendDayOfMonth: value === "1" ? "1" : null,
|
||||
autoSendTimeOfDay: value === "1" ? "09:00" : null,
|
||||
autoSendCycleType: value === "1" ? 1 : null,
|
||||
autoSendCycleType: value === "1" ? 1 : null
|
||||
});
|
||||
}}/>
|
||||
<WeaHelpfulTip title={getLabel(111, "开启后,还需在计划任务中配置定时任务,执行工资单定时发送任务;")}
|
||||
style={{ marginLeft: 10 }}
|
||||
placement="top" width={200}/>
|
||||
</WeaFormItem>
|
||||
{
|
||||
autoSendStatus &&
|
||||
|
|
@ -220,6 +224,39 @@ export default class BaseInformForm extends React.Component {
|
|||
</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>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(111, "水印设置")} showGroup needTigger className="waterMarkWrapper">
|
||||
<WeaFormItem label={getLabel(111, "启用水印")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||
<WeaCheckbox value={watermarkStatus} display="switch"
|
||||
onChange={watermarkStatus => this.setState({ watermarkStatus, watermark: "DEFAULT" })}/>
|
||||
</WeaFormItem>
|
||||
{
|
||||
watermarkStatus === "1" &&
|
||||
<WeaFormItem label={getLabel(111, "水印类型")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||
<WeaSelect
|
||||
value={watermark}
|
||||
options={[
|
||||
{ key: "DEFAULT", showname: getLabel(111, "系统默认水印") },
|
||||
{ key: "CUSTOM", showname: getLabel(111, "自定义水印") }
|
||||
]}
|
||||
onChange={watermark => this.setState({ watermark })}
|
||||
/>
|
||||
{
|
||||
watermark === "CUSTOM" &&
|
||||
<span className="waterMarkTitle" onClick={() => this.setState({
|
||||
watermarkSet: {
|
||||
...watermarkSet,
|
||||
visible: true
|
||||
}
|
||||
})}>{getLabel(111, "水印设置")}</span>
|
||||
}
|
||||
<WaterMarkSetModal {...watermarkSet}
|
||||
onClose={() => this.setState({ watermarkSet: { ...watermarkSet, visible: false } })}
|
||||
onChange={wmSetting => this.setState({ wmSetting })}
|
||||
/>
|
||||
<React.Fragment>
|
||||
<WeaSearchGroup title={getLabel(111, "水印设置")} showGroup needTigger className="waterMarkWrapper">
|
||||
<WeaFormItem label={getLabel(111, "启用水印")} 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(111, "水印类型")} labelCol={{ span: 2 }} wrapperCol={{ span: 4 }}>
|
||||
<WeaSelect
|
||||
value={watermark}
|
||||
options={[
|
||||
{ key: "DEFAULT", showname: getLabel(111, "系统默认水印") },
|
||||
{ key: "CUSTOM", showname: getLabel(111, "自定义水印") }
|
||||
]}
|
||||
onChange={watermark => this.setState({ watermark })}
|
||||
/>
|
||||
{
|
||||
watermark === "CUSTOM" &&
|
||||
<span className="waterMarkTitle" onClick={() => this.setState({
|
||||
watermarkSet: {
|
||||
...watermarkSet,
|
||||
visible: true
|
||||
}
|
||||
})}>{getLabel(111, "水印设置")}</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>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,6 +109,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ export default class PhoneTemplate extends React.Component {
|
|||
salaryTemplateShowSet.textContentPosition == 2 && salaryTemplateShowSet.textContent
|
||||
}
|
||||
</div>
|
||||
{this.props.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class ImportMenu extends Component {
|
|||
params.listType = "FIXED";
|
||||
} else {
|
||||
params.listType = this.state.importParams.importType;
|
||||
params.importType = '';
|
||||
params.importType = "";
|
||||
}
|
||||
API.salaryArchivePreview(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
|
|
@ -92,14 +92,15 @@ 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";
|
||||
} else {
|
||||
params.importType = '';
|
||||
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({
|
||||
|
|
@ -113,7 +114,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") {
|
||||
|
|
@ -121,6 +122,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 "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -86,7 +87,8 @@ class Index extends Component {
|
|||
payStartDate: "",
|
||||
payEndDate: ""
|
||||
},
|
||||
salaryArchiveDelete: "" //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是
|
||||
salaryArchiveDelete: "", //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是,
|
||||
extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -155,6 +157,7 @@ class Index extends Component {
|
|||
fetchTaxAgentOption();
|
||||
this.queryTabTotal();
|
||||
this.queryList("/api/bs/hrmsalary/salaryArchive/pendingList");
|
||||
this.getSysinfo();
|
||||
const init = this.init();
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
|
@ -163,6 +166,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) => ({
|
||||
|
|
@ -498,6 +513,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 [];
|
||||
};
|
||||
|
|
@ -584,7 +620,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 });
|
||||
}}>调薪</Button>);
|
||||
|
|
@ -631,7 +667,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) {
|
||||
|
|
@ -664,9 +700,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;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -679,7 +718,8 @@ class Index extends Component {
|
|||
showSearchAd,
|
||||
slideParams,
|
||||
changeSalaryVisible,
|
||||
paysetParams
|
||||
paysetParams,
|
||||
extEmpsWitch
|
||||
} = this.state;
|
||||
const { payrollFilesStore: { tableStore } } = this.props;
|
||||
const renderSearch = () => {
|
||||
|
|
@ -738,7 +778,7 @@ class Index extends Component {
|
|||
dropMenuDatas={rightMenu}
|
||||
>
|
||||
<WeaTab
|
||||
datas={tabCondition}
|
||||
datas={(extEmpsWitch === "0" || !extEmpsWitch) ? _.dropRight(tabCondition) : tabCondition}
|
||||
counts={tabCount}
|
||||
className="payrollFilesTab"
|
||||
keyParam="viewcondition" //主键
|
||||
|
|
|
|||
|
|
@ -24,10 +24,11 @@ export default class Index extends Component {
|
|||
ascOrDesc: "",
|
||||
rule: "",
|
||||
enctry: "",
|
||||
operateTaxDeclaration: "",
|
||||
operateTaxDeclaration: "1",
|
||||
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 = "1", 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(111, "确认要保存吗?"),
|
||||
content: (key === "operateTaxDeclaration" && val === "0") ? getLabel(111, "关闭之后,将无法开启,确认要保存吗?") : getLabel(111, "确认要保存吗?"),
|
||||
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">
|
||||
|
|
@ -331,6 +365,7 @@ export default class Index extends Component {
|
|||
<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 }}>
|
||||
|
|
@ -344,13 +379,19 @@ export default class Index extends Component {
|
|||
onChange={val => this.handleChange("confValue", val)}/>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
<WeaSearchGroup title={getLabel(538011, "薪资核算")} showGroup center>
|
||||
<WeaFormItem label={getLabel(111, "核算人员匹配规则")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaSearchGroup title={getLabel(111, "薪资核算人员匹配规则")} 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
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ export default class SalaryFileViewSlide extends React.Component {
|
|||
{
|
||||
com: PickDate({
|
||||
label: "起始发薪日期",
|
||||
viewAttr: selectedKey === "pending" ? 3 : 1,
|
||||
viewAttr: (selectedKey === "pending" || selectedKey === "ext") ? 3 : 1,
|
||||
value: paysetParams.payStartDate,
|
||||
onChange: handleSetpay
|
||||
})
|
||||
|
|
@ -95,7 +95,7 @@ export default class SalaryFileViewSlide extends React.Component {
|
|||
{
|
||||
com: PickDate({
|
||||
label: "最后发薪日期",
|
||||
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
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { dataTypeOptions, patternOptions, roundingModeOptions } from "./options";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
export const columns = [
|
||||
{
|
||||
title: "名称",
|
||||
|
|
@ -54,11 +56,11 @@ export const columns = [
|
|||
];
|
||||
export const salaryItemFields = [
|
||||
{
|
||||
key: 'name',
|
||||
label: '名称',
|
||||
type: 'INPUT',
|
||||
key: "name",
|
||||
label: "名称",
|
||||
type: "INPUT",
|
||||
viewAttr: 3,
|
||||
tip: ''
|
||||
tip: ""
|
||||
},
|
||||
// {
|
||||
// key: 'useInEmployeeSalary',
|
||||
|
|
@ -68,63 +70,70 @@ export const salaryItemFields = [
|
|||
// tip: '提示:开启后,该薪资项目不可删除或设为无效,取值方式会默认置为输入'
|
||||
// },
|
||||
{
|
||||
key: 'useDefault',
|
||||
label: '默认使用',
|
||||
type: 'SWITCH',
|
||||
key: "useDefault",
|
||||
label: "默认使用",
|
||||
type: "SWITCH",
|
||||
viewAttr: 2,
|
||||
tip: '提示:开启后,每个薪资方案都有该薪资项目,可在具体薪资方案中删除'
|
||||
tip: "提示:开启后,每个薪资方案都有该薪资项目,可在具体薪资方案中删除"
|
||||
},
|
||||
{
|
||||
key: 'sharedType',
|
||||
label: '可见性',
|
||||
type: 'SELECT',
|
||||
key: "hideDefault",
|
||||
label: getLabel(111, "核算时隐藏"),
|
||||
type: "SWITCH",
|
||||
viewAttr: 2,
|
||||
tip: ''
|
||||
tip: getLabel(111, "提示:开启后,在薪资账套中添加该项目时,默认勾选隐藏且在核算时隐藏该薪资项目,可在具体薪资账套中设置是否隐藏")
|
||||
},
|
||||
{
|
||||
key: 'taxAgentIds',
|
||||
label: '可见性范围',
|
||||
type: 'SELECT',
|
||||
key: "sharedType",
|
||||
label: "可见性",
|
||||
type: "SELECT",
|
||||
viewAttr: 2,
|
||||
tip: ""
|
||||
},
|
||||
{
|
||||
key: "taxAgentIds",
|
||||
label: "可见性范围",
|
||||
type: "SELECT",
|
||||
viewAttr: 3,
|
||||
tip: ''
|
||||
tip: ""
|
||||
},
|
||||
{
|
||||
key: 'dataType',
|
||||
label: '字段类型',
|
||||
type: 'SELECT',
|
||||
key: "dataType",
|
||||
label: "字段类型",
|
||||
type: "SELECT",
|
||||
viewAttr: 3,
|
||||
options: dataTypeOptions,
|
||||
tip: ''
|
||||
tip: ""
|
||||
},
|
||||
{
|
||||
key: 'roundingMode',
|
||||
label: '舍入规则',
|
||||
type: 'SELECT',
|
||||
key: "roundingMode",
|
||||
label: "舍入规则",
|
||||
type: "SELECT",
|
||||
viewAttr: 2,
|
||||
options: roundingModeOptions,
|
||||
tip: ''
|
||||
tip: ""
|
||||
},
|
||||
{
|
||||
key: 'pattern',
|
||||
label: '保留小数位',
|
||||
type: 'SELECT',
|
||||
key: "pattern",
|
||||
label: "保留小数位",
|
||||
type: "SELECT",
|
||||
viewAttr: 2,
|
||||
options: patternOptions,
|
||||
tip: ''
|
||||
tip: ""
|
||||
},
|
||||
{
|
||||
key: 'valueType',
|
||||
label: '取值方式',
|
||||
type: 'RADIO',
|
||||
key: "valueType",
|
||||
label: "取值方式",
|
||||
type: "RADIO",
|
||||
viewAttr: 2,
|
||||
tip: ''
|
||||
tip: ""
|
||||
},
|
||||
{
|
||||
key: 'formulaContent',
|
||||
label: '公式',
|
||||
type: 'INPUT',
|
||||
key: "formulaContent",
|
||||
label: "公式",
|
||||
type: "INPUT",
|
||||
viewAttr: 2,
|
||||
tip: ''
|
||||
tip: ""
|
||||
},
|
||||
{
|
||||
key: "sortedIndex",
|
||||
|
|
@ -134,18 +143,18 @@ export const salaryItemFields = [
|
|||
tip: ""
|
||||
},
|
||||
{
|
||||
key: 'description',
|
||||
label: '备注',
|
||||
type: 'TEXTAREA',
|
||||
key: "description",
|
||||
label: "备注",
|
||||
type: "TEXTAREA",
|
||||
viewAttr: 2,
|
||||
tip: ''
|
||||
},
|
||||
tip: ""
|
||||
}
|
||||
];
|
||||
export const valTakeOptions = [
|
||||
{ key: "1", showname: "输入" },
|
||||
{ key: "2", showname: "公式" },
|
||||
{ key: "3", showname: "SQL" }
|
||||
];
|
||||
export const valTakeOptions=[
|
||||
{key: "1", showname: '输入'},
|
||||
{key: "2", showname: '公式'},
|
||||
{key: "3", showname: 'SQL'},
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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 }}/>;
|
||||
|
|
@ -366,9 +366,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 {
|
||||
|
|
@ -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(111, "添加成功"));
|
||||
this.setState({ selectedRowKeys: [] }, () => {
|
||||
this.getSysItemList();
|
||||
this.props.onInitTableList();
|
||||
this.props.onCancel();
|
||||
});
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ class CustomBenefitsTable extends Component {
|
|||
handleCustomBenefitsSwitch = ({ id }, isUse) => {
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: `确认要${isUse ? "启用" : "停用"}吗`,
|
||||
content: `确认要${isUse === "1" ? "启用" : "停用"}吗`,
|
||||
onOk: () => {
|
||||
const payload = { id, isUse };
|
||||
updateCustomCategoryStatus(payload).then(({ status, errormsg }) => {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import CopySchemaModal from "./copySchemaModal";
|
|||
import CustomBenefitsTable from "./customBenefitsTable";
|
||||
import "./index.less";
|
||||
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
@inject("programmeStore", "taxAgentStore", "salaryFileStore")
|
||||
@observer
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { Button } from "antd";
|
|||
import { WeaDialog, WeaFormItem, WeaSearchGroup, WeaSteps, WeaTab } 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ export default class PersonalScope extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
deleteLoading: false,
|
||||
queryLoading: false,
|
||||
submitLoading: false,
|
||||
targetTypeList: [],
|
||||
|
|
@ -46,7 +47,6 @@ export default class PersonalScope extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
|
||||
getTaxAgentRangeListInclude = (pageModule = {}) => {
|
||||
const { taxAgentId } = this.props;
|
||||
const { getTaxAgentRangeListInclude } = this.props.taxAgentStore;
|
||||
|
|
@ -75,6 +75,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;
|
||||
|
|
@ -105,17 +134,93 @@ export default class PersonalScope extends Component {
|
|||
};
|
||||
|
||||
taxAgentRangeDelete = ({ ids, tab }) => {
|
||||
const { taxAgentRangeDelete } = this.props.taxAgentStore;
|
||||
const { pageObj } = this.state;
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: `确认删除该条数据吗?`,
|
||||
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("正在删除中...", 0);
|
||||
taxAgentRangeExtDelete(ids).then(({ status, errormsg }) => {
|
||||
message.destroy();
|
||||
resolve();
|
||||
if (status) {
|
||||
this.tagAgentRef.onSelectChange([]);
|
||||
message.success("删除成功");
|
||||
this.taxAgentRangelistExt({
|
||||
current: pageObj.current,
|
||||
pageSize: pageObj.pageSize
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
}).catch(() => {
|
||||
message.destroy();
|
||||
reject();
|
||||
});
|
||||
};
|
||||
taxAgentRangeDeleteComfirm = (resolve, reject, ids, tab) => {
|
||||
const { taxAgentRangeDelete } = this.props.taxAgentStore;
|
||||
const { pageObj } = this.state;
|
||||
message.destroy();
|
||||
message.loading("正在删除中...", 0);
|
||||
taxAgentRangeDelete(ids).then(({ status, errormsg }) => {
|
||||
message.destroy();
|
||||
resolve();
|
||||
if (status) {
|
||||
this.tagAgentRef.onSelectChange([]);
|
||||
message.success("删除成功");
|
||||
tab == "1"
|
||||
? this.getTaxAgentRangeListInclude({
|
||||
current: pageObj.current,
|
||||
pageSize: pageObj.pageSize
|
||||
})
|
||||
: this.getTaxAgentRangeListExclude({
|
||||
current: pageObj.current,
|
||||
pageSize: pageObj.pageSize
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
}).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("新增成功");
|
||||
this.taxAgentRangelistExt({ current: pageObj.current, pageSize: pageObj.pageSize });
|
||||
} else {
|
||||
message.error(errormsg || "新增失败");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
taxAgentRangeSave({ ...module, taxAgentId }).then(
|
||||
({ status, errormsg }) => {
|
||||
this.setState({ submitLoading: false });
|
||||
if (status) {
|
||||
this.tagAgentRef.onSelectChange([]);
|
||||
message.success("删除成功");
|
||||
tab == "1"
|
||||
this.tagAgentRef.closeModal();
|
||||
message.success("新增成功");
|
||||
includeType == "1"
|
||||
? this.getTaxAgentRangeListInclude({
|
||||
current: pageObj.current,
|
||||
pageSize: pageObj.pageSize
|
||||
|
|
@ -125,41 +230,11 @@ export default class PersonalScope extends Component {
|
|||
pageSize: pageObj.pageSize
|
||||
});
|
||||
} else {
|
||||
message.error(errorMsg || "删除失败");
|
||||
message.error(errormsg || "新增失败");
|
||||
}
|
||||
});
|
||||
},
|
||||
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("新增成功");
|
||||
includeType == "1"
|
||||
? this.getTaxAgentRangeListInclude({
|
||||
current: pageObj.current,
|
||||
pageSize: pageObj.pageSize
|
||||
})
|
||||
: this.getTaxAgentRangeListExclude({
|
||||
current: pageObj.current,
|
||||
pageSize: pageObj.pageSize
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "新增失败");
|
||||
}
|
||||
}
|
||||
);
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
@ -198,7 +273,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 });
|
||||
}
|
||||
);
|
||||
}}
|
||||
|
|
@ -209,12 +285,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,16 @@ import { WeaButtonIcon, WeaFormItem, WeaInput, WeaSearchGroup, WeaTab, WeaTable
|
|||
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";
|
||||
|
||||
export default class SlideTaxagentUser extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
showSearchAd: false,
|
||||
externalPersonModalVisible: false, //外部人员关联弹框
|
||||
addTaxagentModalVisible: false,
|
||||
includeType: "1",
|
||||
selectedRowKeys: [],
|
||||
|
|
@ -22,30 +24,35 @@ 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("未选择条目");
|
||||
return;
|
||||
}
|
||||
|
|
@ -64,9 +71,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 +128,10 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
selectedRowKeys,
|
||||
searchValue,
|
||||
addTaxagentModalVisible,
|
||||
externalPersonModalVisible,
|
||||
importParams,
|
||||
previewDataSource,
|
||||
showSearchAd
|
||||
showSearchAd, extEmpsWitch
|
||||
} = this.state;
|
||||
const {
|
||||
submitLoading,
|
||||
|
|
@ -146,6 +155,7 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
onChange: this.onSelectChange
|
||||
};
|
||||
const pagination = {
|
||||
...pageObj,
|
||||
total: pageObj.total,
|
||||
showTotal: total => `共 ${total} 条`,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
|
|
@ -177,16 +187,30 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
><span className="icon-coms-leading-in" title="导入"></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: "人员范围", viewcondition: "1" },
|
||||
{ title: "从范围中排除", viewcondition: "0" }
|
||||
]}
|
||||
datas={
|
||||
(extEmpsWitch === "0" || !extEmpsWitch) ?
|
||||
[
|
||||
{ title: "人员范围", viewcondition: "1" },
|
||||
{ title: "从范围中排除", viewcondition: "0" }
|
||||
] :
|
||||
[
|
||||
{ title: "人员范围", viewcondition: "1" },
|
||||
{ title: "从范围中排除", viewcondition: "0" },
|
||||
{ title: "非系统人员范围", viewcondition: "2" }
|
||||
]
|
||||
}
|
||||
keyParam="viewcondition" selectedKey={includeType}
|
||||
searchType={["base"]} advanceHeight={200}
|
||||
showSearchAd={showSearchAd} searchsAd={this.getSearchs()}
|
||||
|
|
@ -292,7 +316,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,14 @@
|
|||
import { action, observable } from "mobx";
|
||||
import { WeaForm, WeaTableNew } from "comsMobx";
|
||||
|
||||
const { TableStore } = WeaTableNew;
|
||||
|
||||
export class EmployeeDeclareStore {
|
||||
@observable advanceForm = new WeaForm(); //人员信息报送详情页面,高级搜索form实例
|
||||
@observable declareForm = new WeaForm(); //人员信息报送详情页面,新增编辑报送信息form实例
|
||||
@observable tableStore = new TableStore();
|
||||
|
||||
@action("...")
|
||||
Init = () => {
|
||||
};
|
||||
}
|
||||
|
|
@ -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,8 @@ import { DeclareStore } from "./declare";
|
|||
import { StandingBookStore } from "./StandingBook";
|
||||
import { PayrollFilesStore } from "./payrollFiles";
|
||||
import { SpecialAddStore } from "./specialAdd";
|
||||
import { ExternalPersonManageStore } from "./externalPersonManage";
|
||||
import { EmployeeDeclareStore } from "./employeeDeclare";
|
||||
|
||||
module.exports = {
|
||||
baseFormStore: new BaseFormStore(),
|
||||
|
|
@ -39,5 +41,7 @@ module.exports = {
|
|||
declareStore: new DeclareStore(),
|
||||
standingBookStore: new StandingBookStore(),
|
||||
payrollFilesStore: new PayrollFilesStore(),
|
||||
specialAddStore: new SpecialAddStore()
|
||||
specialAddStore: new SpecialAddStore(),
|
||||
externalPersonManageStore: new ExternalPersonManageStore(),
|
||||
employeeDeclareStore: new EmployeeDeclareStore()
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
@ -177,6 +178,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 => {
|
||||
|
|
|
|||
|
|
@ -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