Merge branch 'release/2.15.2.2409.01' into hotfix/2.15.1.2409.01

This commit is contained in:
黎永顺 2024-09-14 10:43:55 +08:00
commit c738ba0c6f
30 changed files with 1946 additions and 148 deletions

View File

@ -1,5 +1,5 @@
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
import { postExportFetch, postFetch } from "../util/request";
// 薪资项目-获取列表
export const getItemList = params => {
@ -84,3 +84,19 @@ export const getSalarySobBySalaryItem = params => {
export const syncSalaryItemToSalarySobItem = params => {
return postFetch("/api/bs/hrmsalary/salaryitem/syncSalaryItemToSalarySobItem", params);
};
// 导出薪资项目
export const exportSalaryitem = (params) => {
return postExportFetch("/api/bs/hrmsalary/salaryitem/export", params);
};
// 下载模板
export const downloadTemplate = (params) => {
return postExportFetch("/api/bs/hrmsalary/salaryitem/downloadTemplate", params);
};
// 导入薪资项目
export const importSalaryitem = (params) => {
return postFetch("/api/bs/hrmsalary/salaryitem/import", params);
};

View File

@ -79,3 +79,11 @@ export const saveSalarySendFeedback = (params) => {
export const exportDataReport = (params) => {
return postExportFetch("/api/bs/hrmsalary/report/statistics/report/exportData", params);
};
//迁入配置
export const uploadConfig = (params) => {
return postFetch("/api/bs/hrmsalary/sys/uploadConfig", params);
};
//迁入配置
export const downloadConfig = (params) => {
return postExportFetch("/api/bs/hrmsalary/sys/downloadConfig", params);
};

View File

@ -0,0 +1,53 @@
import { WeaTools } from "ecCom";
import { postExportFetch, postFetch } from "../util/request";
//浮动薪酬项目列表
export const getVariableSalaryItemList = params => {
return postFetch("/api/bs/hrmsalary/variableSalaryItem/listPage", params);
};
//删除浮动薪酬项目
export const deleteVariableSalaryItem = params => {
return postFetch("/api/bs/hrmsalary/variableSalaryItem/delete", params);
};
//获取浮动薪酬项目详情
export const getVariableSalaryItemDetail = params => {
return postFetch("/api/bs/hrmsalary/variableSalaryItem/getDetail", params);
};
//保存/更新 浮动薪酬项目
export const saveVariableSalaryItem = params => {
return postFetch("/api/bs/hrmsalary/variableSalaryItem/save", params);
};
//创建浮动薪酬档案时获取项目信息
export const getCreateForm = params => {
return postFetch("/api/bs/hrmsalary/variableSalary/getCreateForm", params);
};
//创建浮动薪酬档案
export const createVariableSalary = params => {
return postFetch("/api/bs/hrmsalary/variableSalary/createData", params);
};
//创建浮动薪酬档案
export const getVariableSalaryList = params => {
return postFetch("/api/bs/hrmsalary/variableSalary/list", params);
};
//导入浮动薪酬档案
export const importVariableSalary = params => {
return postFetch("/api/bs/hrmsalary/variableSalary/importData", params);
};
//删除浮动薪酬档案
export const deleteVariableSalary = params => {
return postFetch("/api/bs/hrmsalary/variableSalary/deleteSelectData", params);
};
//获取浮动薪酬档案明细
export const getVariableSalaryDetail = params => {
return postFetch("/api/bs/hrmsalary/variableSalary/getDetail", params);
};
// 获取当前管理员下的所有的个税扣缴义务人
export const getAdminTaxAgentList = () => {
return WeaTools.callApi("/api/bs/hrmsalary/siaccount/getAdminTaxAgentList", "get", {});
};
// 浮动薪酬档案导出
export const exportVariableSalary = (params) => {
return postExportFetch("/api/bs/hrmsalary/variableSalary/export", params);
};

View File

@ -33,7 +33,8 @@ class ImpStep1 extends Component {
multiple: false,
action: "/api/doc/upload/uploadFile",
fileList,
onChange: this.handleChange
onChange: this.handleChange,
...this.props.customDragger
};
return (
<div className="weapp-batch-impsteps-picker-content-imp-step1">
@ -45,7 +46,7 @@ class ImpStep1 extends Component {
{this.props.importParams}
</div>
}
<div className="title">{getLabel(543202, "导入Excel")}</div>
{_.isEmpty(this.props.customDragger) && <div className="title">{getLabel(543202, "导入Excel")}</div>}
<p className="draggerUploadWrapper">
<Dragger {...dragger}>
<div>
@ -56,36 +57,39 @@ class ImpStep1 extends Component {
</div>
</Dragger>
</p>
{
(_.isNil(this.props.customDragger) || this.props.customDragger.showOperateDesc) &&
<React.Fragment>
<div className="bottom-border">
<div>{getLabel(27577, "操作步骤")}</div>
<p>
<span>{`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}</span>&nbsp;&nbsp;
{
typeof this.props.link === "string" ?
<a href={this.props.link} className="weapp-salary-link"
target="_blank">{getLabel(543207, "点击这里下载模板")}</a> :
<a className="weapp-salary-link"
onClick={this.props.link}
>{getLabel(543207, "点击这里下载模板")}</a>
}
&nbsp;&nbsp;
{this.props.exportDataDom}
</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="bottom-border">
<div>{getLabel(27577, "操作步骤")}</div>
<p>
<span>{`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}</span>&nbsp;&nbsp;
{
typeof this.props.link === "string" ?
<a href={this.props.link} className="weapp-salary-link"
target="_blank">{getLabel(543207, "点击这里下载模板")}</a> :
<a className="weapp-salary-link"
onClick={this.props.link}
>{getLabel(543207, "点击这里下载模板")}</a>
}
&nbsp;&nbsp;
{this.props.exportDataDom}
</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 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>
</React.Fragment>
}
</div>
);
}

View File

@ -7,6 +7,7 @@
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import successImg from "../../importModal/success.svg";
import MoveInResult from "./moveInResult";
const getLabel = WeaLocaleProvider.getLabel;
@ -16,32 +17,41 @@ class ImpStep3 extends Component {
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>&nbsp;&nbsp;
<span>{`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`}</span>
<span style={{ color: "red" }}> {importResult.errorCount}&nbsp;&nbsp;</span>{getLabel(30690, "")}
</p>
</div> :
<div className="weapp-batch-impsteps-picker-spinText">
<p>{getLabel(111, "导入失败")}</p>
</div>
}
{
(!_.isEmpty(importResult.errorNotice) || !_.isEmpty(importResult.errorData)) &&
<WeaTable
columns={[
importResult.results ? <MoveInResult dataSource={importResult.results}/> :
<React.Fragment>
{
title: getLabel(25700, "错误信息"),
dataIndex: "message"
!_.isEmpty(importResult) ?
<div className="weapp-batch-impsteps-picker-spinText">
<p><img src={successImg} alt=""/></p>
{
importResult.successCount &&
<p>
<span>{getLabel(389249, "已导入")}</span>
<span style={{ color: "green" }}> {importResult.successCount}</span>&nbsp;&nbsp;
<span>{`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`}</span>
<span
style={{ color: "red" }}> {importResult.errorCount}&nbsp;&nbsp;</span>{getLabel(30690, "")}
</p>
}
</div> :
<div className="weapp-batch-impsteps-picker-spinText">
<p>{getLabel(111, "导入失败")}</p>
</div>
}
]}
dataSource={importResult.errorData || importResult.errorNotice} pagination={false}
scroll={{ y: `calc(100vh - 387px)` }}
/>
{
!_.isEmpty(importResult) && (!_.isEmpty(importResult.errorNotice) || !_.isEmpty(importResult.errorData)) &&
<WeaTable
columns={[
{
title: getLabel(25700, "错误信息"),
dataIndex: "message"
}
]}
dataSource={importResult.errorData || importResult.errorNotice} pagination={false}
scroll={{ y: `calc(100vh - 387px)` }}
/>
}
</React.Fragment>
}
</div>
);

View File

@ -0,0 +1,56 @@
/*
* 薪酬迁入结果展示
*
* @Author: 黎永顺
* @Date: 2024/8/16
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
class MoveInResult extends Component {
downloadTxtfile = (value, type) => {
if (!value) return;
const element = document.createElement("a");
const file = new Blob([value], { type: "text/plain" });
element.href = URL.createObjectURL(file);
element.download = `导入${type}信息.txt`;
document.body.appendChild(element);
element.click();
};
render() {
const { dataSource } = this.props;
return (
<WeaTable
columns={[
{ title: getLabel(111, "导入信息"), dataIndex: "message" },
{
title: getLabel(111, "下载信息"), dataIndex: "download", width: 250,
render: (text, record) => (<React.Fragment>
<span
style={{ marginRight: 16, color: "#0BB746", cursor: "pointer", display: "inline-block", minWidth: 60 }}
onClick={() => this.downloadTxtfile(record.success.join("\n"), getLabel(111, "成功"))}>
<i className="iconfont icon-successful"/><span
style={{ marginLeft: 8 }}>{record.success.length}</span></span>
<span
style={{ marginRight: 16, color: "#E6960C", cursor: "pointer", display: "inline-block", minWidth: 60 }}
onClick={() => this.downloadTxtfile(record.warning.join("\n"), getLabel(111, "警告"))}><i
className="iconfont icon-warning"/><span style={{ marginLeft: 8 }}>{record.warning.length}</span></span>
<span style={{ color: "#CF3736", cursor: "pointer", display: "inline-block", minWidth: 60 }}
onClick={() => this.downloadTxtfile(record.error.join("\n"), getLabel(111, "错误"))}><i
className="iconfont icon-error"/><span style={{ marginLeft: 8 }}>{record.error.length}</span></span>
</React.Fragment>)
}
]}
dataSource={dataSource} pagination={false} bordered scroll={{ y: `calc(100vh - 333px)` }}
/>
);
}
}
export default MoveInResult;

View File

@ -36,13 +36,17 @@ class Index extends Component {
}
renderChildren = () => {
const { current } = this.state, { importParams, link, excludeKey, importResult, exportDataDom = null } = this.props;
const { current } = this.state, {
importParams, link, excludeKey, importResult,
exportDataDom = null, customDragger
} = this.props;
const scrollHeight = this.importRef ? this.importRef.state.height - 232 : 606.6;
let CurrentDom = null;
switch (current) {
case 0:
CurrentDom = <ImpStep1 importParams={importParams} link={link} exportDataDom={exportDataDom}
ref={dom => this.step1Ref = dom}/>;
CurrentDom =
<ImpStep1 importParams={importParams} customDragger={customDragger} link={link} exportDataDom={exportDataDom}
ref={dom => this.step1Ref = dom}/>;
break;
case 1:
CurrentDom = <ImpStep2 {...this.props} scrollHeight={scrollHeight}/>;
@ -99,13 +103,16 @@ class Index extends Component {
}
const [file] = fileList;
const { response } = file;
this.setState({
current: this.state.current + 1,
fileid: response.data.fileid
}, () => {
!excludeKey && this.props.nextCallback && this.props.nextCallback(this.state.fileid);
excludeKey && this.props.nextUplaodCallback && this.props.nextUplaodCallback(this.state.fileid);
});
if (!excludeKey) {
this.setState({
current: this.state.current + 1,
fileid: response.data.fileid
}, () => {
this.props.nextCallback && this.props.nextCallback(this.state.fileid);
});
} else {
this.props.nextUplaodCallback && this.props.nextUplaodCallback(response.data.fileid);
}
} else {
this.props.nextUplaodCallback && this.props.nextUplaodCallback(this.state.fileid);
}

View File

@ -52,6 +52,7 @@ import ExternalPersonManage from "./pages/externalPersonManage";
import AdjustSalaryManage from "./pages/adjustSalaryManage";
import TopologyMap from "./pages/topologyMap";
import SupplementaryCalc from "./pages/supplementaryCalc";
import VariableSalary from "./pages/variableSalary";
import Layout from "./layout";
import stores from "./stores";
@ -113,6 +114,7 @@ const DataAcquisition = (props) => props.children;
// externalPersonManage 非系统人员管理
// adjustSalaryManage 档案管理
// supplementaryCalc 补算
// variableSalary 浮动薪酬
const Routes = (
<Route key="hrmSalary" path="hrmSalary" onEnter={getLocaleLabel} component={Layout}>
@ -167,6 +169,7 @@ const Routes = (
<Route key="externalPersonManage" path="externalPersonManage" component={ExternalPersonManage}/>
<Route key="topologyView" path="topologyView/:salarySobId/:salaryItemId" component={TopologyMap}/>
<Route key="supplementaryCalc" path="supplementaryCalc" component={SupplementaryCalc}/>
<Route key="variableSalary" path="variableSalary" component={VariableSalary}/>
</Route>
);

View File

@ -5,7 +5,17 @@
* Date: 2022-09-27 18:17:02
*/
import React, { Component } from "react";
import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaInput, WeaSearchGroup, WeaTop } from "ecCom";
import {
WeaCheckbox,
WeaDatePicker,
WeaFormItem,
WeaInput,
WeaLoadingGlobal,
WeaLocaleProvider,
WeaSearchGroup,
WeaTop
} from "ecCom";
import MoveInDialog from "./moveInDialog";
import * as API from "../../apis/ruleconfig";
import { Button, message } from "antd";
import "./index.less";
@ -18,6 +28,7 @@ const Input = (props) => {
</WeaFormItem>
);
};
const getLabel = WeaLocaleProvider.getLabel;
class AppConfig extends Component {
constructor(props) {
@ -28,7 +39,8 @@ class AppConfig extends Component {
isLog: "0",
openFormulaForcedEditing: "0",
version: "",
loading: false
loading: false,
moveInDialog: { visible: false, title: getLabel(111, "数据迁入") }
};
}
@ -62,10 +74,29 @@ class AppConfig extends Component {
}
});
};
handleOperate = (type) => {
switch (type) {
case "import":
this.setState({ moveInDialog: { ...this.state.moveInDialog, visible: true } });
break;
case "export":
WeaLoadingGlobal.start();
const promise = API.downloadConfig();
break;
default:
break;
}
};
render() {
const { openAcctResultSum, displayEmpInfoReport, loading, openFormulaForcedEditing, isLog, version } = this.state;
const btns = [<Button type="primary" loading={loading} onClick={this.appSettingSave}>保存</Button>];
const {
openAcctResultSum, displayEmpInfoReport, loading, openFormulaForcedEditing, isLog, version, moveInDialog
} = this.state;
const btns = [
<Button type="primary" loading={loading} onClick={this.appSettingSave}>保存</Button>,
<Button type="ghost" onClick={() => this.handleOperate("import")}>{getLabel(111, "迁入")}</Button>,
<Button type="ghost" onClick={() => this.handleOperate("export")}>{getLabel(111, "迁出")}</Button>
];
const items = [
{
com: Input({
@ -115,6 +146,8 @@ class AppConfig extends Component {
buttons={btns}
/>
<WeaSearchGroup title="" showGroup center items={items}/>
<MoveInDialog {...moveInDialog}
onCancel={() => this.setState({ moveInDialog: { ...this.state.moveInDialog, visible: false } })}/>
</div>
);
}

View File

@ -0,0 +1,73 @@
/*
* 数据迁入
*
* @Author: 黎永顺
* @Date: 2024/8/12
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaLocaleProvider } from "ecCom";
import { message } from "antd";
import ImportDialog from "../../components/importDialog";
import * as API from "../../apis/ruleconfig";
const getLabel = WeaLocaleProvider.getLabel;
class MoveInDialog extends Component {
constructor(props) {
super(props);
this.state = {
importDialog: {
nextloading: false, importResult: {}, imageId: "",
customDragger: { showOperateDesc: false, accept: ".xml" }
}
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
this.setState({
importDialog: {
...this.state.importDialog,
importResult: {}, imageId: "",
customDragger: { showOperateDesc: false, accept: ".xml" }
}
});
}
}
handleImport = (payload) => {
const { importDialog } = this.state;
this.setState({ importDialog: { ...importDialog, nextloading: true } });
API.uploadConfig({ ...payload }).then(({ data, status, errormsg }) => {
this.setState({ importDialog: { ...importDialog, nextloading: false } });
if (status) {
this.setState({
importDialog: { ...importDialog, ...payload, importResult: data }
});
} else {
message.error(errormsg);
}
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
};
render() {
const { importDialog } = this.state;
return (
<ImportDialog
{...this.props} {...importDialog} excludeKey={1}
onResetImportResult={() => this.setState({
importDialog: {
...importDialog, importResult: {}, imageId: "", link: ""
}
})}
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
nextUplaodCallback={imageId => this.handleImport({ imageId })}
/>
);
}
}
export default MoveInDialog;

View File

@ -40,7 +40,7 @@ class PayrollItemsTable extends Component {
const { canEdit, dataType, pattern } = record;
return dataType === "number" ? <WeaInputNumber
disabled={!canEdit}
precision={pattern || 2}
precision={!_.isNil(pattern) ? pattern : 0}
value={text || 0}
onChange={(value) => onChangeIssueReissueValue(record.salaryItemId, value, "itemsByGroup", salarySobItemGroupId)}
/> : <WeaInput

View File

@ -1,9 +1,8 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { Button, Dropdown, Menu, message, Modal, Switch } from "antd";
import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom";
import { WeaInputSearch, WeaLoadingGlobal, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom";
import { renderLoading, toDecimal_n } from "../../util";
import CustomTab from "../../components/customTab";
import SystemSalaryItemModal from "./systemSalaryItemModal";
import { columns } from "./columns";
import SlideModalTitle from "../../components/slideModalTitle";
@ -12,6 +11,8 @@ import CustomPaginationTable from "../../components/customPaginationTable";
import SyncToSalaryAccountSetDialog from "./syncToSalaryAccountSetDialog";
import "../socialSecurityBenefits/programme/index.less";
import LogDialog from "../../components/logViewModal";
import SalaryItemImportDialog from "./salaryItemImport";
import * as API from "../../apis/item";
const { getLabel } = WeaLocaleProvider;
@inject("salaryItemStore", "taxAgentStore", "salaryFileStore")
@ -29,7 +30,8 @@ export default class SalaryItem extends React.Component {
searchParams: { current: 1, pageSize: 10, total: 0 },
selectedRowKeys: [],
syncSalarySetDialog: { visible: false, title: "", id: "" },
logDialogVisible: false, filterConditions: "[]"
logDialogVisible: false, filterConditions: "[]",
salaryItemImpDialog: { visible: false, title: getLabel(24023, "数据导入") }
};
columns.map(item => {
if (item.dataIndex == "refere") {
@ -213,6 +215,19 @@ export default class SalaryItem extends React.Component {
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
});
break;
case "export":
WeaLoadingGlobal.start();
const { selectedRowKeys } = this.state;
const promise = API.exportSalaryitem({ ids: selectedRowKeys });
WeaLoadingGlobal.destroy();
break;
case "import":
this.setState({
salaryItemImpDialog: {
...this.state.salaryItemImpDialog, visible: true
}
});
break;
default:
break;
}
@ -220,12 +235,10 @@ export default class SalaryItem extends React.Component {
render() {
const {
salaryItemStore,
salaryFileStore,
taxAgentStore: { showOperateBtn, showSalaryItemBtn, taxAgentOption }
salaryItemStore, salaryFileStore, taxAgentStore: { showOperateBtn, showSalaryItemBtn, taxAgentOption }
} = this.props;
const { userStatusList } = salaryFileStore;
const { selectedRowKeys, logDialogVisible, filterConditions } = this.state;
const { selectedRowKeys, logDialogVisible, filterConditions, salaryItemImpDialog } = this.state;
const { loading, deleteItemRequest, getTableDatas } = salaryItemStore;
const {
tableDataSource,
@ -257,51 +270,36 @@ export default class SalaryItem extends React.Component {
</Menu>
);
const renderRightOperation = () => {
return (<div style={{ display: "inline-block" }}>
{
(showOperateBtn || showSalaryItemBtn) &&
<Dropdown.Button overlay={menu} type="primary" onClick={() => handleMenuClick({ key: "1" })}
style={{ marginRight: "10px" }}>{getLabel(111, "新增自定义薪资项")}</Dropdown.Button>
const buttons = [
<Dropdown.Button overlay={menu} type="primary"
onClick={() => handleMenuClick({ key: "1" })}>{getLabel(111, "新增自定义薪资项")}</Dropdown.Button>,
<Button type="primary" onClick={() => {
if (!selectedRowKeys.length) {
message.info("未选中任何数据!");
return;
}
{
(showOperateBtn || showSalaryItemBtn) &&
<Button
type="primary"
style={{ marginRight: "10px" }}
onClick={() => {
if (!selectedRowKeys.length) {
message.info("未选中任何数据!");
return;
}
Modal.confirm({
title: "信息确认",
content: `确定要将所选的薪资项(共${selectedRowKeys.length}条数据)删除吗?`,
onOk: () => {
deleteItemRequest(selectedRowKeys).then(() => {
getTableDatas({ ...this.state.searchParams }).then(res => {
this.setState({
selectedRowKeys: [],
searchParams: {
...this.state.searchParams,
total: res.total
}
});
});
});
}
Modal.confirm({
title: "信息确认",
content: `确定要将所选的薪资项(共${selectedRowKeys.length}条数据)删除吗?`,
onOk: () => {
deleteItemRequest(selectedRowKeys).then(() => {
getTableDatas({ ...this.state.searchParams }).then(res => {
this.setState({
selectedRowKeys: [],
searchParams: {
...this.state.searchParams,
total: res.total
}
});
});
}}>{getLabel(32136, "批量删除")}</Button>
}
<WeaInputSearch value={this.state.searchValue} placeholder={"请输入名称"} onChange={(value) => {
this.setState({ searchValue: value });
}} onSearch={(value) => {
this.handleSearch(value);
}}/>
</div>);
};
});
}
});
}}>{getLabel(32136, "批量删除")}</Button>,
<WeaInputSearch value={this.state.searchValue} placeholder={getLabel(111, "请输入名称")}
onChange={value => this.setState({ searchValue: value })}
onSearch={value => this.handleSearch(value)}/>
];
// 新建和修改保存的回调
const handleSlideSave = (continueFlag) => {
const { salaryItemStore: { saveItem, request, getTableDatas } } = this.props;
@ -367,23 +365,31 @@ export default class SalaryItem extends React.Component {
};
const rowSelection = {
selectedRowKeys,
onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }),
getCheckboxProps: record => ({
disabled: !record.canDelete // Column configuration not to be checked
})
onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
// getCheckboxProps: record => ({
// disabled: !record.canDelete // Column configuration not to be checked
// })
};
return (
<div className="mySalaryBenefitsWrapper">
<WeaTop title="薪资项目管理" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
showDropIcon onDropMenuClick={this.onDropMenuClick}
dropMenuDatas={[
{
key: "import",
icon: <i className="icon-coms02-Template-import1"/>,
content: getLabel(111, "导入")
},
{
key: "export",
icon: <i className="iconfont icon-daochu"/>,
content: getLabel(111, "导出")
},
{
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
content: getLabel(545781, "操作日志")
}
]}
>
<CustomTab searchOperationItem={renderRightOperation()}/>
]} buttons={(showOperateBtn || showSalaryItemBtn) ? buttons : buttons.slice(-1)}>
<div className="tableWrapper">
<WeaNewScroll height="100%">
<CustomPaginationTable
@ -425,6 +431,13 @@ export default class SalaryItem extends React.Component {
{/*操作日志*/}
<LogDialog visible={logDialogVisible} logFunction="salaryitem" filterConditions={filterConditions}
onCancel={() => this.setState({ logDialogVisible: false })}/>
{/* 导入*/}
<SalaryItemImportDialog {...salaryItemImpDialog}
onCancel={callback => {
this.setState({
salaryItemImpDialog: { ...salaryItemImpDialog, visible: false }
}, () => callback && this.handleSearch(this.state.searchValue));
}}/>
{
systemItemVisible &&
<SystemSalaryItemModal

View File

@ -0,0 +1,87 @@
/*
* 薪资项目导入
*
* @Author: 黎永顺
* @Date: 2024/8/7
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaCheckbox, WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
import ImportDialog from "../../../components/importDialog";
import * as API from "../../../apis/item";
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
constructor(props) {
super(props);
this.state = {
importDialog: {
nextloading: false, link: null, importResult: {}, imageId: "",
previewUrl: "/api/bs/hrmsalary/salaryitem/preview", hasData: false
}
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
this.setState({ importDialog: { ...this.state.importDialog, link: this.handleExportTemp } });
} else {
this.setState({
importDialog: {
nextloading: false, link: null, importResult: {}, imageId: "",
previewUrl: "/api/bs/hrmsalary/salaryitem/preview", hasData: false
}
});
}
}
handleExportTemp = () => {
const { importDialog } = this.state;
const { hasData } = importDialog;
WeaLoadingGlobal.start();
const promise = API.downloadTemplate({ hasData });
WeaLoadingGlobal.destroy();
};
handleImport = (payload) => {
const { importDialog } = this.state, { isExtEmp } = this.props;
const { extraPreview } = importDialog;
this.setState({ importDialog: { ...importDialog, nextloading: true } });
API.importSalaryitem({ ...payload, ...extraPreview, isExtEmp }).then(({ data, status }) => {
this.setState({ importDialog: { ...importDialog, nextloading: false } });
if (status) {
this.setState({
importDialog: { ...importDialog, ...payload, importResult: data }
});
}
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
};
render() {
const { importDialog } = this.state;
return (
<ImportDialog
{...this.props} {...importDialog}
onResetImportResult={() => this.setState({
importDialog: { ...importDialog, importResult: {}, imageId: "", link: null }
})}
exportDataDom={
<WeaCheckbox
value={importDialog.hasData ? "1" : "0"}
content={getLabel(543208, "导出现有数据")}
helpfulTip={getLabel(111, "提示:建议先导出现有最新数据,修改后再导入")}
onChange={val => {
this.setState({ importDialog: { ...importDialog, hasData: val === "1" } });
}}
/>
}
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
nextUplaodCallback={imageId => this.handleImport({ imageId })}
/>
);
}
}
export default Index;

View File

@ -0,0 +1,76 @@
/*
* 方案信息确认
* 保存并自动修改基数仅保存方案设置
* @Author: 黎永顺
* @Date: 2024/8/19
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaDialog, WeaLocaleProvider, WeaTransfer } from "ecCom";
import { Alert, Button } from "antd";
const getLabel = WeaLocaleProvider.getLabel;
const WeaTransferList = WeaTransfer.list;
class BaseValidateDialog extends Component {
constructor(props) {
super(props);
this.state = { dataSource: [] };
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
this.setState({
dataSource: _.filter(_.map(nextProps.baseChangeInfo.split("\n"), (g, gi) => ({
id: gi + 1, name: g
})), k => !!k.name)
});
}
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
dataSource: []
});
}
render() {
const { dataSource } = this.state, { onCancel } = this.props;
const scrollHeight = this.baseChangeRef ? this.baseChangeRef.state.height - 118 : 606.6;
const buttons = [
<Button type="primary" onClick={() => onCancel({
validate: false, changeData: true
})}>{getLabel(111, "保存并自动修改基数")}</Button>,
<Button type="ghost" onClick={() => onCancel({
validate: false, changeData: false
})}>{getLabel(111, "仅保存方案设置")}</Button>
];
return (
<WeaDialog
{...this.props} hasScroll className="baseChangeDialog" initLoadCss ref={dom => this.baseChangeRef = dom}
title={getLabel(131329, "信息确认")} buttons={buttons}
style={{
width: 750, height: 606.6, minHeight: 200, minWidth: 380,
maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
}}
>
<div className="baseChangeContent">
<Alert
message={getLabel(111, "是否需要将社保档案中不满足上下限的基数值,自动设置为对应的上限或下限值?")}
description={getLabel(111, "以下员工的社保福利档案基数大于上限值,或小于下限值:")}
type="warning"/>
{
!_.isEmpty(dataSource) ? <WeaTransferList
data={dataSource} renderItem={(it) => (<div className="detailBox">
<div className="order">{it.id}</div>
<div className="content" title={it.name}>{it.name}</div>
</div>)}
height={scrollHeight} checkedCb={() => ({})} checkedKeys={[]}
/> : <div className="empty">{getLabel(111, "")}</div>
}
</div>
</WeaDialog>
);
}
}
export default BaseValidateDialog;

View File

@ -12,6 +12,7 @@ import { Button, message, Modal } from "antd";
import * as API from "../../../../../apis/welfareScheme";
import { getTaxAgentSelectListAsAdmin } from "../../../../../apis/taxAgent";
import { getConditionDomkeys, getSearchs } from "../../../../../util";
import BaseValidateDialog from "./baseValidateDialog";
import { planConditons } from "../../config";
import cs from "classnames";
@ -24,7 +25,10 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
loading: false, conditions: [], selectedKey: "2", planDatas: []
loading: false, conditions: [], selectedKey: "2", planDatas: [],
baseValidateDialog: {
visible: false, baseChangeInfo: [], validatePayload: { validate: true, changeData: false }
}
};
}
@ -86,21 +90,37 @@ class Index extends Component {
if (planForm.getFormParams().sharedType === "1" && _.isEmpty(planForm.getFormParams().taxAgentIds)) {
planForm.showError("taxAgentIds", getLabel(111, "\"可见范围\"未填写"));
} else {
const { planDatas } = this.state;
const payload = {
const { planDatas, baseValidateDialog } = this.state;
const { validatePayload } = baseValidateDialog;
let payload = {
insuranceScheme: {
...planForm.getFormParams(), welfareType: welfareTypeEnum, id,
paymentArea: planForm.getFormParams().paymentType
},
insuranceSchemeDetailList: planDatas
};
id && (payload = { ...payload, ...validatePayload });
this.setState({ loading: true });
API[id ? "updateScheme" : "createScheme"](payload).then(({ status, errormsg }) => {
API[id ? "updateScheme" : "createScheme"](payload).then(({ status, data, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success(getLabel(30700, "操作成功!"));
setHasBeenModify(false);
this.props.onClose(true);
if (id && Object.prototype.toString.call(data) === "[object String]" && data.indexOf("\n") !== -1) {
this.setState({
baseValidateDialog: {
visible: true, baseChangeInfo: data,
validatePayload: { ...baseValidateDialog.validatePayload, validate: false }
}
});
} else {
message.success(getLabel(30700, "操作成功!"));
setHasBeenModify(false);
this.props.onClose(true);
this.setState({
baseValidateDialog: {
...baseValidateDialog, baseChangeInfo: [], validatePayload: { validate: true, changeData: false }
}
});
}
} else {
message.error(errormsg);
}
@ -194,7 +214,7 @@ class Index extends Component {
render() {
const { conditions, planDatas, selectedKey } = this.state;
const { conditions, planDatas, selectedKey, baseValidateDialog } = this.state;
const { programmeStore: { planForm }, showOperateBtn } = this.props;
return (
<WeaSlideModal
@ -207,6 +227,14 @@ class Index extends Component {
<PlanSetTable dataSource={planDatas} selectedKey={selectedKey} showOperateBtn={showOperateBtn}
onPlanSet={this.handleSetPlanDatas}/>
</WeaSearchGroup>
{/* */}
<BaseValidateDialog {...baseValidateDialog}
onCancel={(validatePayload = {}) => this.setState({
baseValidateDialog: {
visible: false, baseChangeInfo: [],
validatePayload: { validate: true, changeData: false, ...validatePayload }
}
}, () => !_.isEmpty(validatePayload) && this.save())}/>
</div>}
/>
);

View File

@ -13,7 +13,6 @@ import WelfarePlanList from "./components/welfarePlanList";
import LogDialog from "../../../components/logViewModal";
import cs from "classnames";
import "./index.less";
import { tabList } from "../welfareArchive/config";
const getLabel = WeaLocaleProvider.getLabel;

View File

@ -269,3 +269,91 @@
}
}
//方案基数变化
.baseChangeDialog {
.wea-dialog-body {
overflow-y: hidden;
}
.baseChangeContent {
background: #F6F6F6;
padding: 16px;
width: 100%;
height: 100%;
.empty {
width: 100%;
display: flex;
height: 100%;
justify-content: center;
align-items: center;
background: #ffff;
}
.wea-search-group {
padding: 0;
margin-bottom: 10px;
background: #FFF;
.wea-form-cell {
padding: 0;
.wea-form-item {
padding: 10px;
}
}
}
.logTable {
background: #FFFFFF;
}
.wea-transfer-list-wrapper {
border: none;
.ant-tree-switcher {
display: none;
}
.transfer-tree {
background: #FFF;
border: 1px solid #dadada;
padding: 0;
& > li:not(:last-child) {
.detailBox .content {
border-bottom: 1px solid #dadada;
}
}
& > li {
margin: 0 !important;
.detailBox {
display: flex;
align-items: center;
.order {
width: 35px;
color: #999;
text-align: center;
}
.content {
position: relative;
flex: 1;
min-height: 40px;
line-height: 40px;
color: #000;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
}
}
}

View File

@ -0,0 +1,35 @@
/*
* Author: 黎永顺
* name:薪酬统计报表-高级搜索
* Description:
* Date: 2024/3/26
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { Button } from "antd";
import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("baseTableStore")
@observer
class Index extends Component {
render() {
const { baseTableStore: { VSalryForm }, searchType } = this.props;
return (
<div className="variable-advance-search">
<WeaInputSearch value={VSalryForm.getFormParams().username}
onChange={v => VSalryForm.updateFields({ username: v })}
onSearch={this.props.onAdvanceSearch}
/>
{
searchType === "advance" && <Button type="ghost" className="wea-advanced-search text-elli"
onClick={this.props.onOpenAdvanceSearch}>{getLabel(545754, "高级搜索")}</Button>
}
</div>
);
}
}
export default Index;

View File

@ -0,0 +1,28 @@
.variable-advance-search {
display: flex;
align-items: center;
position: relative;
top: -1.5px;
.wea-advanced-search {
top: 1px;
left: -1px;
height: 28px;
line-height: 1;
border-radius: 0;
position: relative;
color: #474747;
padding: 4px 15px;
}
.wea-advanced-search:hover {
border: 1px solid #dadada;
color: #474747;
}
.text-elli {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}

View File

@ -0,0 +1,146 @@
/*
* 浮动薪酬
* 新建编辑薪资档案
* @Author: 黎永顺
* @Date: 2024/8/8
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
import { Button, message } from "antd";
import { getSearchs } from "../../../../util";
import { salaryFileConditions } from "../../conditions";
import * as API from "../../../../apis/variableSalary";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@inject("baseTableStore")
@observer
class Index extends Component {
constructor(props) {
super(props);
this.state = {
conditions: [], loading: false
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
document.querySelector(".variable_salary_wrapper").classList.add("zIndex0-weaslide-title");
this.initForm(nextProps);
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
document.querySelector(".variable_salary_wrapper").classList.remove("zIndex0-weaslide-title");
this.props.baseTableStore.initVSSalaryFileForm();
}
}
initForm = (props) => {
const { baseTableStore: { VSSalaryFileForm }, detail, taxAgentOption } = props;
API.getCreateForm().then(({ data }) => {
this.setState({
conditions: [
..._.map(salaryFileConditions, item => ({
...item, items: _.map(item.items, o => {
if (getKey(o) === "taxAgentIds") {
return {
...o, viewAttr: !_.isEmpty(detail) ? 1 : 3, label: getLabel(o.lanId, o.label),
options: taxAgentOption, value: detail[getKey(o)] || ""
};
}
return {
...o, viewAttr: !_.isEmpty(detail) ? 1 : 3, label: getLabel(o.lanId, o.label),
value: detail[getKey(o)] || ""
};
})
})),
{
items: _.map(data, o => ({
conditionType: "INPUT",
domkey: [String(o.id)],
fieldcol: 14,
label: o.name,
labelcol: 6,
value: detail[`${String(o.id)}_variableItem`] || "",
viewAttr: !_.isEmpty(detail) ? 1 : 2
})),
title: "", col: 2,
defaultshow: true
}
]
}, () => {
VSSalaryFileForm.initFormFields(this.state.conditions);
if (!_.isEmpty(detail)) {
VSSalaryFileForm.updateFields({
employeeId: {
value: detail["employeeId"],
valueSpan: detail["username"],
valueObj: [{ id: detail["employeeId"], name: detail["username"] }]
}
});
}
});
});
};
convertPayload = (payload) => {
const itemValueList = [];
return _.reduce(_.keys(payload), (pre, cur) => {
if (!_.isNaN(parseInt(cur))) {
itemValueList.push({ variableItemId: cur, itemValue: payload[cur] });
return { ...pre, itemValueList };
}
return { ...pre, [cur]: payload[cur] };
}, {});
};
save = () => {
const { baseTableStore: { VSSalaryFileForm }, onSearch, id } = this.props;
VSSalaryFileForm.validateForm().then(f => {
if (f.isValid) {
const payload = VSSalaryFileForm.getFormParams();
this.setState({ loading: true });
API.createVariableSalary({ ...this.convertPayload(payload), id })
.then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success(getLabel(30700, "操作成功"));
this.props.onClose(onSearch());
} else {
message.error(errormsg);
}
}).catch(() => this.setState({ loading: false }));
} else {
f.showErrors();
}
});
};
renderTitle = () => {
const { loading } = this.state, { title, detail } = this.props;
return <div className="titleDialog">
<div className="titleCol titleLeftBox">
<div className="titleIcon"><i className="icon-coms-fa"/></div>
<div className="title">{title}</div>
</div>
<div className="titleCol titleRightBox">
{
_.isEmpty(detail) &&
<Button type="primary" loading={loading} onClick={this.save}>{getLabel(537558, "保存")}</Button>
}
</div>
</div>;
};
render() {
const { conditions } = this.state;
const { baseTableStore: { VSSalaryFileForm }, onClose } = this.props;
return (<WeaSlideModal
className="variable_salary_file_dialog" {...this.props} direction="right" onClose={() => onClose()}
top={0} width={800} height={100} measureT="%" measureX="px" measureY="%" title={this.renderTitle()}
content={<div className="form-dialog-layout">{getSearchs(VSSalaryFileForm, conditions)}</div>}
/>);
}
}
export default Index;

View File

@ -0,0 +1,120 @@
/*
* 浮动薪酬
* 薪资档案导入
* @Author: 黎永顺
* @Date: 2024/8/8
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaLocaleProvider } from "ecCom";
import ImportDialog from "../../../../components/importDialog";
import * as API from "../../../../apis/variableSalary";
import { convertToUrlString } from "../../../../util/url";
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
constructor(props) {
super(props);
this.state = {
importDialog: {
nextloading: false, link: "/api/bs/hrmsalary/variableSalary/downloadTemplate",
importResult: {}, imageId: "", hasData: false, salaryMonth: "",
previewUrl: "/api/bs/hrmsalary/variableSalary/preview"
}
};
}
componentWillReceiveProps(nextProps, nextContext) {
const { importDialog } = this.state;
if (nextProps.visible !== this.props.visible && nextProps.visible) {
const { baseTableStore: { VSalryForm }, salaryMonth, taxAgentIds } = nextProps;
const payload = {
salaryMonth, taxAgentIds, ...VSalryForm.getFormParams(), hasData: importDialog.hasData
};
this.setState({
importDialog: { ...importDialog, salaryMonth, link: `${importDialog.link}?${convertToUrlString(payload)}` }
});
} else {
this.setState({
importDialog: {
nextloading: false, link: "/api/bs/hrmsalary/variableSalary/downloadTemplate", hasData: false,
importResult: {}, imageId: "", previewUrl: "/api/bs/hrmsalary/variableSalary/preview", salaryMonth: ""
}
});
}
}
handleImport = (payload) => {
const { taxAgentIds } = this.props;
const { importDialog } = this.state;
const { salaryMonth } = importDialog;
this.setState({ importDialog: { ...importDialog, nextloading: true } });
API.importVariableSalary({
...payload, salaryMonth, taxAgentIds: _.isEmpty(taxAgentIds) ? [] : taxAgentIds.split(",")
}).then(({ data, status }) => {
this.setState({ importDialog: { ...importDialog, nextloading: false } });
if (status) {
this.setState({
importDialog: { ...importDialog, ...payload, importResult: data }
});
}
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
};
renderFormComponent = () => {
const { baseTableStore: { VSalryForm }, taxAgentIds } = this.props;
const { importDialog } = this.state;
const { salaryMonth: month, hasData } = importDialog;
return <div style={{ padding: "8px 16px", border: "1px solid #e5e5e5", margin: "4px 0" }}>
<WeaFormItem label={getLabel(111, "薪资所属月")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaDatePicker format="YYYY-MM" value={month}
onChange={val => {
const payload = { salaryMonth: val, hasData, taxAgentIds, ...VSalryForm.getFormParams() };
this.setState({
importDialog: {
...importDialog, salaryMonth: val,
link: `/api/bs/hrmsalary/variableSalary/downloadTemplate?${convertToUrlString(payload)}`
}
});
}}/>
</WeaFormItem>
</div>;
};
render() {
const { importDialog } = this.state;
return (
<ImportDialog
{...this.props} {...importDialog}
onResetImportResult={() => this.setState({
importDialog: { ...importDialog, importResult: {}, imageId: "", link: null }
})}
importParams={this.renderFormComponent()}
exportDataDom={
<WeaCheckbox
value={importDialog.hasData ? "1" : "0"}
content={getLabel(543208, "导出现有数据")}
helpfulTip={getLabel(111, "提示:建议先导出现有最新数据,修改后再导入")}
onChange={val => {
const { baseTableStore: { VSalryForm }, taxAgentIds } = this.props;
const { salaryMonth } = importDialog;
const payload = { salaryMonth, taxAgentIds, ...VSalryForm.getFormParams(), hasData: val === "1" };
this.setState({
importDialog: {
...importDialog, hasData: val === "1",
link: `/api/bs/hrmsalary/variableSalary/downloadTemplate?${convertToUrlString(payload)}`
}
});
}}
/>
}
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
nextUplaodCallback={imageId => this.handleImport({ imageId })}
/>
);
}
}
export default Index;

View File

@ -0,0 +1,162 @@
/*
* 浮动薪酬
* 薪资档案列表
* @Author: 黎永顺
* @Date: 2024/8/8
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider } from "ecCom";
import { WeaTableNew } from "comsMobx";
import { message, Modal, Spin } from "antd";
import * as API from "../../../../apis/variableSalary";
import { toJS } from "mobx";
const WeaTableComx = WeaTableNew.WeaTable;
const getLabel = WeaLocaleProvider.getLabel;
@inject("baseTableStore")
@observer
class Index extends Component {
constructor(props) {
super(props);
this.state = {
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], columns: []
};
}
componentDidMount() {
window.addEventListener("message", this.handleReceive, false);
window.addEventListener("resize", this.handleResize, false);
this.getVariableSalaryList();
}
componentWillUnmount() {
window.removeEventListener("message", this.handleReceive, false);
window.removeEventListener("resize", this.handleResize, false);
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.isQuery !== this.props.isQuery) this.setState({
pageInfo: { ...this.state.pageInfo, current: 1 }
}, () => this.getVariableSalaryList());
}
handleReceive = async ({ data }) => {
const { type, payload: { id, params } = {} } = data;
if (type === "init") {
this.getColumns();
} else if (type === "turn") {
switch (id) {
case "PAGEINFO":
this.setState({
pageInfo: { ...this.state.pageInfo, ...params }
}, () => this.getVariableSalaryList());
break;
case "DEL":
this.handleDelete([params.id]);
break;
case "VIEW":
this.handleView(params.id);
break;
default:
break;
}
}
};
getVariableSalaryList = () => {
const { baseTableStore: { VSalryForm, getVariableSalaryList }, salaryMonth, taxAgentIds } = this.props;
const { pageInfo } = this.state;
const { departmentIds } = VSalryForm.getFormParams();
this.setState({ loading: true });
getVariableSalaryList({
...pageInfo, salaryMonth, taxAgentIds: _.isEmpty(taxAgentIds) ? [] : taxAgentIds.split(","),
...VSalryForm.getFormParams(), departmentIds: !_.isEmpty(departmentIds) ? departmentIds.split(",") : []
}).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { pageInfo: result } = data;
const { list: dataSource, pageNum: current, pageSize, total } = result;
this.setState({
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource
}
);
}
});
};
handleView = (id) => {
API.getVariableSalaryDetail({ id }).then(({ status, data }) => {
if (status) this.props.onViewSalaryFile(data.data);
});
};
handleDelete = (ids) => {
Modal.confirm({
title: getLabel(111, "信息确认"),
content: getLabel(111, "确认删除吗?"),
onOk: () => {
API.deleteVariableSalary({ ids }).then(({ status, errormsg }) => {
if (status) {
message.success(getLabel(111, "删除成功"));
this.getVariableSalaryList();
} else {
message.error(errormsg);
}
});
}
});
};
getColumns = () => {
const { baseTableStore: { SFTableStore }, showOperateBtn } = this.props;
const columns = _.map(_.filter(toJS(SFTableStore.columns), (item) => item.display === "true"), (it, idx) => ({
dataIndex: it.dataIndex, title: it.title, align: "left",
width: 150, ellipsis: true
}));
if (!_.isEmpty(columns)) {
this.postMessageToChild({
columns, showOperateBtn, dataSource: this.state.dataSource, scrollHeight: 98,
pageInfo: this.state.pageInfo, unitTableType: "variableSalary"
});
}
return columns;
};
postMessageToChild = (payload = {}) => {
const i18n = {
"操作": getLabel(30585, "操作"), "查看详情": getLabel(111, "查看详情"),
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
"删除": getLabel(111, "删除")
};
const childFrameObj = document.getElementById("unitTable");
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
};
render() {
const { loading, dataSource } = this.state;
const { baseTableStore: { SFTableStore } } = this.props;
const dom = document.querySelector(".wea-new-top-req-content");
let height = 280;
if (dom && dataSource.length > 0) {
height = (parseFloat(dom.style.height) > 620 && dataSource.length === 10) ? dataSource.length * 46 + 108 : dataSource.length < 10 ? dataSource.length * 46 + 108 : parseFloat(dom.style.height) - 16;
}
return (
<React.Fragment>
<div style={{ height: height + "px" }}>
<Spin spinning={loading}>
<iframe
style={{ border: 0, width: "100%", height: "100%" }}
// src="http://localhost:7607/#/unitTable"
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/unitTable"
id="unitTable"
/>
</Spin>
</div>
<WeaTableComx style={{ display: "none" }} comsWeaTableStore={SFTableStore} needScroll={true}
columns={this.getColumns()}/>
</React.Fragment>
);
}
}
export default Index;

View File

@ -0,0 +1,80 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
import { Button, message } from "antd";
import { getSearchs } from "../../../../util";
import { salaryItemsConditions } from "../../conditions";
import * as API from "../../../../apis/variableSalary";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@inject("baseTableStore")
@observer
class Index extends Component {
constructor(props) {
super(props);
this.state = {
conditions: [], loading: false
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) this.initForm(nextProps);
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.baseTableStore.initVSSalaryItemForm();
}
initForm = (props) => {
const { baseTableStore: { VSSalaryItemForm } } = props;
this.setState({
conditions: _.map(salaryItemsConditions, item => ({
...item,
items: _.map(item.items, o => {
if (getKey(o) === "dataType") {
return { ...o, options: _.map(o.options, g => ({ ...g, showname: getLabel(g.lanId, g.showname) })) };
}
return { ...o, label: getLabel(o.lanId, o.label) };
})
}))
}, () => VSSalaryItemForm.initFormFields(this.state.conditions));
};
save = () => {
const { baseTableStore: { VSSalaryItemForm }, onSearch, id } = this.props;
VSSalaryItemForm.validateForm().then(f => {
if (f.isValid) {
const payload = VSSalaryItemForm.getFormParams();
this.setState({ loading: true });
API.saveVariableSalaryItem({ ...payload, id })
.then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success(getLabel(30700, "操作成功"));
this.props.onCancel(onSearch());
} else {
message.error(errormsg);
}
}).catch(() => this.setState({ loading: false }));
} else {
f.showErrors();
}
});
};
render() {
const { conditions, loading } = this.state;
const { baseTableStore: { VSSalaryItemForm } } = this.props;
return (
<WeaDialog
{...this.props} style={{ width: 480, height: 127 }} initLoadCss
buttons={[
<Button onClick={() => this.props.onCancel()}>{getLabel(111, "取消")}</Button>,
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(111, "保存")}</Button>
]}
>
<div className="form-dialog-layout">{getSearchs(VSSalaryItemForm, conditions, 1, false)}</div>
</WeaDialog>
);
}
}
export default Index;

View File

@ -0,0 +1,113 @@
/*
* 浮动薪酬
* 薪资项目列表
* @Author: 黎永顺
* @Date: 2024/8/8
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import { message, Modal } from "antd";
import * as API from "../../../../apis/variableSalary";
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
constructor(props) {
super(props);
this.state = {
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], columns: []
};
}
componentDidMount() {
this.getVariableSalaryItemList();
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.isQuery !== this.props.isQuery) this.setState({
pageInfo: { ...this.state.pageInfo, current: 1 }
}, () => this.getVariableSalaryItemList());
}
getVariableSalaryItemList = () => {
const { baseTableStore: { VSalryForm } } = this.props;
const { pageInfo } = this.state;
const { username: itemName } = VSalryForm.getFormParams();
this.setState({ loading: true });
API.getVariableSalaryItemList({ ...pageInfo, itemName }).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { list: dataSource, columns, pageNum: current, pageSize, total } = data;
this.setState({
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
columns: [
..._.filter(columns, o => o.dataIndex !== "id"),
{
title: getLabel(111, "操作"), dataIndex: "oprate",
render: (__, record) => (<React.Fragment>
<a href="javascript: void(0)" style={{ marginRight: 10 }}
onClick={() => this.handleEdit(record.id)}>{getLabel(111, "编辑")}</a>
{
record.canDelete && <a href="javascript: void(0)"
onClick={() => this.handleDelete([record.id])}>{getLabel(111, "删除")}</a>
}
</React.Fragment>)
}
]
}
);
}
});
};
handleEdit = (id) => {
API.getVariableSalaryItemDetail({ id }).then(({ status, data }) => {
if (status) this.props.onEditSalaryItem(data);
});
};
handleDelete = (itemIds) => {
Modal.confirm({
title: getLabel(111, "信息确认"),
content: getLabel(111, "确认删除吗?"),
onOk: () => {
API.deleteVariableSalaryItem({ itemIds }).then(({ status, errormsg }) => {
if (status) {
message.success(getLabel(111, "删除成功"));
this.getVariableSalaryItemList();
} else {
message.error(errormsg);
}
});
}
});
};
render() {
const { columns, dataSource, loading, pageInfo } = this.state;
const 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 }
}, () => this.getVariableSalaryItemList());
},
onChange: current => {
this.setState({
pageInfo: { ...pageInfo, current }
}, () => this.getVariableSalaryItemList());
}
};
return (
<WeaTable columns={columns} dataSource={dataSource} loading={loading} bordered
pagination={pagination} scroll={{ y: `calc(100vh - 202px)` }}/>
);
}
}
export default Index;

View File

@ -0,0 +1,70 @@
/*
* Author: 黎永顺
* name:薪酬统计报薪资明细-高级查询
* Description:
* Date: 2024/3/26
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTools } from "ecCom";
import { Button } from "antd";
import { inject, observer } from "mobx-react";
import { getSearchs } from "../../../../util";
import { conditions } from "../../conditions";
const getLabel = WeaLocaleProvider.getLabel;
const getKey = WeaTools.getKey;
@inject("baseTableStore")
@observer
class VariableSalarySearchPannel extends Component {
constructor(props) {
super(props);
this.state = {
searchConditions: []
};
}
componentDidMount() {
this.setState({
searchConditions: _.map(conditions, item => {
return {
...item,
items: _.map(item.items, child => {
return { ...child, label: getLabel(child.lanId, child.label) };
})
};
})
}, () => {
const { baseTableStore: { VSalryForm } } = this.props;
VSalryForm.initFormFields(this.state.searchConditions);
});
}
render() {
const { searchConditions } = this.state;
const { baseTableStore: { VSalryForm } } = this.props;
return (
<React.Fragment>
<div className="wea-advanced-searchsAd">
{getSearchs(VSalryForm, searchConditions, 2, false)}
</div>
<div className="wea-search-buttons">
<div style={{ textAlign: "center" }}>
<span style={{ marginLeft: 15 }}>
<Button type="primary" onClick={this.props.onAdSearch}>{getLabel(388113, "搜索")}</Button>
</span>
<span style={{ marginLeft: 15 }}>
<Button type="ghost" onClick={() => VSalryForm.resetForm()}>{getLabel(2022, "重置")}</Button>
</span>
<span style={{ marginLeft: 15 }}>
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(31129, "取消")}</Button>
</span>
</div>
</div>
</React.Fragment>
);
}
}
export default VariableSalarySearchPannel;

View File

@ -0,0 +1,167 @@
export const conditions = [
{
items: [
{
conditionType: "INPUT",
domkey: ["itemName"],
fieldcol: 14,
label: "项目名称",
lanId: 111,
labelcol: 6,
value: "",
hide: true,
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["username"],
fieldcol: 14,
label: "名称",
lanId: 111,
labelcol: 6,
value: "",
viewAttr: 2
},
{
browserConditionParam: {
completeParams: {},
conditionDataParams: {},
dataParams: {},
destDataParams: {},
hasAddBtn: false,
hasAdvanceSerach: false,
idSeparator: ",",
isAutoComplete: 1,
isDetail: 0,
isMultCheckbox: false,
isSingle: false,
icon: "icon-coms-hrm",
linkUrl: "",
pageSize: 10,
quickSearchName: "",
replaceDatas: [],
title: "",
type: "57",
viewAttr: 2
},
conditionType: "BROWSER",
domkey: ["departmentIds"],
fieldcol: 14,
label: "部门",
lanId: 111,
labelcol: 6,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["workcode"],
fieldcol: 14,
label: "工号",
lanId: 111,
labelcol: 6,
value: "",
viewAttr: 2
}
],
title: "",
defaultshow: true
}
];
export const salaryItemsConditions = [
{
items: [
{
conditionType: "INPUT",
domkey: ["name"],
fieldcol: 14,
label: "名称",
lanId: 111,
labelcol: 6,
value: "",
rules: "required|string",
viewAttr: 3
},
{
conditionType: "SELECT",
domkey: ["dataType"],
fieldcol: 14,
label: "字段类型",
lanId: 111,
labelcol: 6,
value: "",
options: [
{ key: "number", showname: "数值", lanId: 111, selected: true },
{ key: "string", showname: "字符", lanId: 111, selected: false }
],
rules: "required|string",
viewAttr: 3
}
],
title: "",
defaultshow: true
}
];
export const salaryFileConditions = [
{
items: [
{
conditionType: "MONTHPICKER",
domkey: ["salaryMonth"],
fieldcol: 16,
label: "薪资所属月",
lanId: 111,
labelcol: 8,
value: "",
rules: "required|string",
viewAttr: 3
},
{
conditionType: "SELECT",
domkey: ["taxAgentIds"],
fieldcol: 16,
label: "个税扣缴义务人",
lanId: 111,
labelcol: 8,
value: "",
options: [],
rules: "required|string",
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: "17",
viewAttr: 2
},
conditionType: "BROWSER",
domkey: ["employeeId"],
fieldcol: 16,
label: "人员",
lanId: 111,
labelcol: 8,
value: "",
rules: "required|string",
viewAttr: 3
}
],
title: "", col: 2,
defaultshow: true
}
];

View File

@ -0,0 +1,174 @@
/*
* 浮动薪酬
*
* @Author: 黎永顺
* @Date: 2024/8/8
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { WeaDatePicker, WeaLoadingGlobal, WeaLocaleProvider, WeaReqTop, WeaSelect } from "ecCom";
import * as API from "../../apis/variableSalary";
import AdvanceInputBtn from "./components/advanceInputBtn";
import SearchPannel from "./components/searchPannel";
import SalaryItemDialog from "./components/salaryItemDialog";
import SalaryFileDialog from "./components/salaryFileDialog";
import SalaryItemList from "./components/salaryItemList";
import SalaryFileList from "./components/salaryFileList";
import SalaryFileImportDialog from "./components/salaryFileImportDialog";
import moment from "moment";
import { Button } from "antd";
import cs from "classnames";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore", "baseTableStore")
@observer
class Index extends Component {
constructor(props) {
super(props);
this.state = {
selectedKey: "salaryFile", isQuery: false, showSearchAd: false, taxAgentIds: "",
salaryMonth: moment(new Date()).format("YYYY-MM"), taxAgentOption: [],
SIDialog: { visible: false, title: "", id: "", taxAgentOption: [] }, //薪资项目薪资编辑弹框
SFDialog: { visible: false, title: "", detail: {}, taxAgentOption: [] }, //薪资档案编辑弹框
SFImpDialog: { visible: false, title: getLabel(24023, "数据导入") }//薪资档案导入
};
}
componentDidMount() {
API.getAdminTaxAgentList().then(({ status, data }) => {
if (status) {
const taxAgentOption = _.map(data, (o, i) => ({ key: String(o.id), showname: o.name }));
this.setState({
taxAgentOption, taxAgentIds: _.map(taxAgentOption, o => o.key).join(","),
SIDialog: { ...this.state.SIDialog, taxAgentOption },
SFDialog: { ...this.state.SFDialog, taxAgentOption }
});
}
});
}
handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
openAdvanceSearch = () => this.setState({ showSearchAd: !this.state.showSearchAd });
handleOperate = (type, detail = {}) => {
const { baseTableStore: { SFTableStore, VSalryForm } } = this.props;
switch (type) {
case "create":
this.setState({
SFDialog: {
...this.state.SFDialog, visible: true, detail,
title: _.isEmpty(detail) ? getLabel(111, "新增薪资档案") : getLabel(111, "查看薪资档案")
}
});
break;
case "import":
this.setState({ SFImpDialog: { ...this.state.SFImpDialog, visible: true } });
break;
case "export":
const columns = _.map(_.filter(toJS(SFTableStore.columns), (item) => item.display === "true"), it => it.dataIndex);
const { salaryMonth, taxAgentIds } = this.state;
const payload = {
...VSalryForm.getFormParams(),
taxAgentIds: !_.isEmpty(taxAgentIds) ? taxAgentIds.split(",") : [],
departmentIds: !_.isEmpty(VSalryForm.getFormParams().taxAgentIds) ? VSalryForm.getFormParams().taxAgentIds.split(",") : [],
salaryMonth, columns
};
WeaLoadingGlobal.start();
const promise = API.exportVariableSalary(payload);
break;
case "custom_cols":
SFTableStore.setColSetVisible(true);
SFTableStore.tableColSet(true);
break;
default:
break;
}
};
render() {
const {
selectedKey, SIDialog, SFDialog, SFImpDialog, showSearchAd, isQuery, salaryMonth, taxAgentOption, taxAgentIds
} = this.state;
const { taxAgentStore: { showOperateBtn }, baseTableStore: { VSSalaryItemForm } } = this.props;
const tabs = [
{
title: getLabel(111, "薪资档案"), key: "salaryFile", showDropIcon: true,
dropMenuDatas: showOperateBtn ? [
{ key: "export", icon: <i className="icon-coms-export"/>, content: getLabel(111, "导出") },
{ key: "custom_cols", icon: <i className="icon-coms-Custom"/>, content: getLabel(32535, "显示列定制") }
] : [
{ key: "custom_cols", icon: <i className="icon-coms-Custom"/>, content: getLabel(32535, "显示列定制") }
],
buttons: showOperateBtn ? [
<Button type="primary" onClick={() => this.handleOperate("create")}>{getLabel(111, "新建")}</Button>,
<Button type="ghost" onClick={() => this.handleOperate("import")}>{getLabel(111, "导入")}</Button>,
<WeaDatePicker format="YYYY-MM" value={salaryMonth}
onChange={val => this.setState({ salaryMonth: val }, () => this.handleAdvanceSearch())}/>,
<WeaSelect options={taxAgentOption} style={{ width: 200, display: "flex" }} multiple value={taxAgentIds}
onChange={val => this.setState({ taxAgentIds: val }, () => this.handleAdvanceSearch())}/>,
<AdvanceInputBtn searchType="advance" onOpenAdvanceSearch={() => this.openAdvanceSearch()}
onAdvanceSearch={this.handleAdvanceSearch}/>
] : [
<WeaDatePicker format="YYYY-MM" value={salaryMonth}
onChange={val => this.setState({ salaryMonth: val }, () => this.handleAdvanceSearch())}/>,
<WeaSelect options={taxAgentOption} style={{ width: 200, display: "flex" }} multiple value={taxAgentIds}
onChange={val => this.setState({ taxAgentIds: val }, () => this.handleAdvanceSearch())}/>,
<AdvanceInputBtn searchType="advance" onOpenAdvanceSearch={() => this.openAdvanceSearch()}
onAdvanceSearch={this.handleAdvanceSearch}/>
],
children: <SalaryFileList {...this.props} salaryMonth={salaryMonth} taxAgentIds={taxAgentIds} isQuery={isQuery}
onViewSalaryFile={(data) => this.handleOperate("create", data)}/>
},
{
title: getLabel(111, "薪资项目"), key: "salaryItem", showDropIcon: false, dropMenuDatas: [],
buttons: showOperateBtn ? [
<Button type="primary" onClick={() => this.setState({
SIDialog: { visible: true, id: "", title: getLabel(111, "新增薪资项目") }
})}>{getLabel(111, "新建")}</Button>,
<AdvanceInputBtn onAdvanceSearch={this.handleAdvanceSearch}/>
] : [<AdvanceInputBtn onAdvanceSearch={this.handleAdvanceSearch}/>],
children: <SalaryItemList {...this.props} isQuery={isQuery} onEditSalaryItem={data => this.setState({
SIDialog: { visible: true, id: data.id, title: getLabel(111, "编辑薪资项目") }
}, () => VSSalaryItemForm.updateFields({
name: data.name, dataType: data.dataType
}))}/>
}
];
return (
<WeaReqTop
title={getLabel(111, "浮动薪酬")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
iconBgcolor="#F14A2D" tabDatas={tabs} className="variable_salary_wrapper"
buttons={_.find(tabs, o => selectedKey === o.key).buttons} buttonSpace={10}
onChange={selectedKey => this.setState({ selectedKey, SFDialog: { ...SFDialog, visible: false } })}
showDropIcon={_.find(tabs, o => selectedKey === o.key).showDropIcon} onDropMenuClick={this.handleOperate}
dropMenuDatas={_.find(tabs, o => selectedKey === o.key).dropMenuDatas}
>
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
<SearchPannel onCancel={() => this.setState({ showSearchAd: false })} onAdSearch={this.handleAdvanceSearch}/>
</div>
{_.find(tabs, o => selectedKey === o.key).children}
{/*薪资项目*/}
<SalaryItemDialog {...SIDialog} onSearch={this.handleAdvanceSearch} onCancel={callback => this.setState({
SIDialog: { ...SIDialog, visible: false }
}, () => callback && callback())}/>
{/*薪资档案*/}
<SalaryFileDialog {...SFDialog} onSearch={this.handleAdvanceSearch} onClose={callback => this.setState({
SFDialog: { ...SFDialog, visible: false }
}, () => callback && callback())}/>
{/* 薪资档案导入*/}
<SalaryFileImportDialog {...this.props} {...SFImpDialog} salaryMonth={salaryMonth} taxAgentIds={taxAgentIds}
onCancel={callback => {
this.setState({ SFImpDialog: { ...SFImpDialog, visible: false } },
() => callback && this.handleAdvanceSearch());
}}/>
</WeaReqTop>
);
}
}
export default Index;

View File

@ -0,0 +1,115 @@
.variable_salary_wrapper {
.wea-new-top-req-title > div:last-child {
right: 16px !important;
}
.wea-new-top-req-content {
padding: 16px;
.wea-new-table {
background: #FFF;
}
.ant-spin-nested-loading, .ant-spin-container {
height: 100% !important;
}
}
.searchAdvanced-condition-hide {
display: none;
}
.searchAdvanced-condition-container {
background: #FFF;
margin-bottom: 10px;
border: 1px solid #e5e5e5;
.wea-search-buttons {
border-top: 1px solid #dadada;
padding: 15px 0;
}
.wea-advanced-searchsAd {
height: 108px;
overflow: hidden auto;
.formItem-delete {
position: absolute;
top: 0;
right: -40px;
}
.searchAdvanced-commonSelect {
border-top: 1px solid #ebebeb;
margin: 0 25px;
padding: 10px 0;
}
.custom-advance-largeSpacing {
padding-left: 26px;
.link {
border: none;
border-radius: 0;
padding: 12px 10px 12px 26px;
color: #2db7f5
}
}
}
}
.variable_salary_file_dialog {
.scroller {
background: #f6f6f6 !important;
}
.wea-slide-modal-title {
border-bottom: 1px solid #e5e5e5 !important;
}
.titleDialog {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 46px 0 16px;
.titleCol {
flex: 1;
display: flex;
align-items: center;
}
.titleLeftBox {
.titleIcon {
color: #fff;
margin: 0;
width: 40px;
height: 40px;
line-height: 40px;
font-size: 22px;
display: flex;
align-items: center;
justify-content: center;
background: #F14A2D;
border-radius: 50%;
}
.title {
font-size: 14px;
color: #333;
padding-left: 6px;
}
}
.titleRightBox {
justify-content: flex-end;
button:last-child {
margin-left: 10px;
}
}
}
}
}

View File

@ -1,8 +1,9 @@
import { observable, action, toJS } from 'mobx';
import { message } from 'antd';
import { WeaForm, WeaTableNew } from 'comsMobx';
import { action, observable } from "mobx";
import { message } from "antd";
import { WeaForm, WeaTableNew } from "comsMobx";
import * as API from '../apis'; // 引入API接口文件
import * as API from "../apis"; // 引入API接口文件
import { getVariableSalaryList } from "../apis/variableSalary"; //浮动薪酬-薪资档案列表查询
const { TableStore } = WeaTableNew;
@ -14,12 +15,38 @@ export class BaseTableStore {
@observable showSearchAd = false; // 高级搜索面板显示
@observable loading = true; // 数据加载状态
// 浮动薪酬相关
@observable VSalryForm = new WeaForm(); // 浮动薪酬查询form
@observable VSSalaryItemForm = new WeaForm(); // 新增编辑浮动薪酬项目form
@action initVSSalaryItemForm = () => this.VSSalaryItemForm = new WeaForm();
@observable VSSalaryFileForm = new WeaForm(); // 新增编辑薪资档案form
@action initVSSalaryFileForm = () => this.VSSalaryFileForm = new WeaForm();
@observable SFTableStore = new TableStore(); // 浮动薪酬-薪资档案table
@action("浮动薪酬-薪资档案列表查询")
getVariableSalaryList = (payload) => {
return new Promise((resolve, reject) => {
getVariableSalaryList(payload).then(res => {
const { data, status } = res;
if (status) {
const { dataKey } = data;
const { datas } = dataKey;
this.SFTableStore.getDatas(datas);
}
resolve(res);
}).catch(() => {
reject();
});
});
};
// 初始化操作
@action
doInit = () => {
this.getCondition();
this.getTableDatas();
}
};
// 获得高级搜索表单数据
@action
@ -29,10 +56,10 @@ export class BaseTableStore {
this.condition = res.condition;
this.form.initFormFields(res.condition); // 渲染高级搜索form表单
} else {
message.error(res.msg || '接口调用失败!')
message.error(res.msg || "接口调用失败!");
}
}));
}
};
// 渲染table数据
@action
@ -45,11 +72,11 @@ export class BaseTableStore {
this.tableStore.getDatas(res.datas); // table 请求数据
this.hasRight = res.hasRight;
} else {
message.error(res.msg || '接口调用失败!')
message.error(res.msg || "接口调用失败!");
}
this.loading = false;
}));
}
};
@action
setShowSearchAd = bool => this.showSearchAd = bool;
@ -58,6 +85,6 @@ export class BaseTableStore {
@action doSearch = () => {
this.getTableDatas();
this.showSearchAd = false;
}
};
}
}

View File

@ -117,3 +117,10 @@
}
//公共slide框标题样式
.zIndex0-weaslide-title {
.wea-new-top-req {
z-index: 0 !important;
}
}