社保福利台账添加线下对比的页面功能
This commit is contained in:
parent
85441a1f69
commit
1d1ced8d77
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { postFetch } from '../util/request';
|
||||||
|
|
||||||
|
//福利核算-线下对比结果列表
|
||||||
|
export const comparisonwelfareList = (params) => {
|
||||||
|
return postFetch('/api/bs/hrmsalary/siaccount/comparisonwelfare/list', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//福利核算-线下对比数据导入
|
||||||
|
export const importExcelInsuranceDetail = (params) => {
|
||||||
|
return postFetch('/api/bs/hrmsalary/siaccount/comparisonwelfare/importExcelInsuranceDetail', params);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
import { WeaTools } from 'ecCom';
|
||||||
|
import { postFetch } from '../util/request';
|
||||||
|
|
||||||
|
//通用字典表 {enumClass:""}
|
||||||
|
export const commonEnumList = (params) => {
|
||||||
|
return WeaTools.callApi('/api/bs/hrmsalary/common/enum/list', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const sysOrderRule = params => {
|
||||||
|
return WeaTools.callApi('/api/bs/hrmsalary/sys/orderRule', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//保存排序规则
|
||||||
|
export const updateOrderRule = (params) => {
|
||||||
|
return postFetch('/api/bs/hrmsalary/sys/updateOrderRule', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//导入规则详情信息
|
||||||
|
export const sysConfCodeRule = params => {
|
||||||
|
return WeaTools.callApi('/api/bs/hrmsalary/sys/conf/code', 'GET', params);
|
||||||
|
}
|
||||||
|
//保存导入规则
|
||||||
|
export const saveMatchEmployeeModeRule = (params) => {
|
||||||
|
return postFetch('/api/bs/hrmsalary/sys/saveMatchEmployeeModeRule', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//应用配置保存
|
||||||
|
export const appSettingSave = (params) => {
|
||||||
|
return postFetch('/api/bs/hrmsalary/sys/app/setting/save', params);
|
||||||
|
}
|
||||||
|
//应用配置查询
|
||||||
|
export const queryAppsetting = (params) => {
|
||||||
|
return WeaTools.callApi('/api/bs/hrmsalary/sys/app/setting', 'GET', params);
|
||||||
|
}
|
||||||
|
|
@ -1,33 +1,36 @@
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
import { Icon } from 'antd'
|
import { Icon } from "antd";
|
||||||
import closeIcon from './close.png'
|
|
||||||
export default class CanDeleteItem extends React.Component {
|
export default class CanDeleteItem extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
showDelete: false
|
showDelete: false
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
handleMouseOver() {
|
handleMouseOver() {
|
||||||
this.setState({showDelete: true})
|
this.setState({ showDelete: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
handelMouseout() {
|
handelMouseout() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setState({showDelete: false})
|
this.setState({ showDelete: false });
|
||||||
}, 400)
|
}, 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { title } = this.props;
|
const { title } = this.props;
|
||||||
return (
|
return (
|
||||||
<div style={{display: "inline-block", paddingLeft: "10px", paddingRight: '10px'}} onMouseEnter={() => this.handleMouseOver()} onMouseLeave={() => this.handelMouseout()}>
|
<div style={{ display: "inline-block", paddingLeft: "10px", paddingRight: "10px" }}
|
||||||
<span className="selectedItem" onBlur>{title}</span>
|
onMouseEnter={() => this.handleMouseOver()} onMouseLeave={() => this.handelMouseout()}>
|
||||||
{
|
<span className="selectedItem" onBlur>{title}</span>
|
||||||
this.state.showDelete && <Icon type="cross" style={{cursor: "pointer", marginLeft: "5px", fontWeight: '600'}} onClick={() => this.props.onDelete(this.props.item)}/>
|
{/*{*/}
|
||||||
}
|
{/* this.state.showDelete &&*/}
|
||||||
</div>
|
<Icon type="cross" style={{ cursor: "pointer", marginLeft: "5px", fontWeight: "600" }}
|
||||||
)
|
onClick={() => this.props.onDelete(this.props.item)}/>
|
||||||
}
|
{/*}*/}
|
||||||
}
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ export default class ImportModal extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { step, slideDataSource, isInit, isStandingBook } = this.props;
|
const { step, slideDataSource, isInit, isStandingBook, params,needimportSelected } = this.props;
|
||||||
return (
|
return (
|
||||||
<WeaDialog
|
<WeaDialog
|
||||||
title="数据导入" visible={this.props.visiable}
|
title="数据导入" visible={this.props.visiable}
|
||||||
|
|
@ -135,6 +135,8 @@ export default class ImportModal extends React.Component {
|
||||||
templateLink={this.props.templateLink}
|
templateLink={this.props.templateLink}
|
||||||
headerSetCompoent={this.props.headerSetCompoent}
|
headerSetCompoent={this.props.headerSetCompoent}
|
||||||
formComponent={this.props.renderFormComponent && this.props.renderFormComponent()}
|
formComponent={this.props.renderFormComponent && this.props.renderFormComponent()}
|
||||||
|
needimportSelected={needimportSelected} //下载模板需要带上导入所选项
|
||||||
|
params={params}
|
||||||
onFileIdChange={(fileId) => {
|
onFileIdChange={(fileId) => {
|
||||||
this.setState({ fileId });
|
this.setState({ fileId });
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { WeaCheckbox } from "ecCom";
|
import { WeaCheckbox } from "ecCom";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { Button, Icon, Upload } from "antd";
|
import { Button, Icon, Upload, message } from "antd";
|
||||||
|
|
||||||
const Dragger = Upload.Dragger;
|
const Dragger = Upload.Dragger;
|
||||||
|
|
||||||
|
|
@ -55,7 +55,7 @@ export default class ModalStep1 extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { datetime, taxAgentId, hasData } = this.state;
|
const { datetime, taxAgentId, hasData } = this.state;
|
||||||
const { taxAgentStore: { taxAgentOption }, isInit } = this.props;
|
const { taxAgentStore: { taxAgentOption }, isInit, needimportSelected, params } = this.props;
|
||||||
let downloadExtra = "";
|
let downloadExtra = "";
|
||||||
if (isInit) {
|
if (isInit) {
|
||||||
downloadExtra = hasData === "1" ? `&hasData=true` : `&hasData=false`;
|
downloadExtra = hasData === "1" ? `&hasData=true` : `&hasData=false`;
|
||||||
|
|
@ -110,7 +110,28 @@ export default class ModalStep1 extends React.Component {
|
||||||
<p>1. 第一步,请选择导出的Excel文件或
|
<p>1. 第一步,请选择导出的Excel文件或
|
||||||
{
|
{
|
||||||
(typeof this.props.templateLink) == "string" ?
|
(typeof this.props.templateLink) == "string" ?
|
||||||
<a href={`${this.props.templateLink}${downloadExtra}`}>点击这里下载模板</a>
|
<a href="javascript:void(0);" onClick={()=>{
|
||||||
|
let url= `${this.props.templateLink}${downloadExtra}`;
|
||||||
|
if(needimportSelected){
|
||||||
|
try {
|
||||||
|
params && Object.keys(params).forEach((key) => {
|
||||||
|
if (!params[key] || params[key] == "") {
|
||||||
|
message.warning("请完善导入选项,再下载!");
|
||||||
|
throw new Error("请完善导入选项,再下载!");
|
||||||
|
}else{
|
||||||
|
if(url.indexOf("?")>0){
|
||||||
|
url= `${url}&${key}=${params[key]}`
|
||||||
|
}else{
|
||||||
|
url= `${url}?${key}=${params[key]}`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.open(url,"_blank")
|
||||||
|
}}>点击这里下载模板</a>
|
||||||
:
|
:
|
||||||
<a onClick={() => {
|
<a onClick={() => {
|
||||||
this.props.templateLink(hasData === "1" ? `true` : `false`);
|
this.props.templateLink(hasData === "1" ? `true` : `false`);
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ export default class SlideModalTitle extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { selectedTab, tabs, subtitle, customOperate, subItemChange } = this.props;
|
const { selectedTab, tabs, subtitle, customOperate, subItemChange, loading = false } = this.props;
|
||||||
return <div className="reqTopWrapper">
|
return <div className="reqTopWrapper">
|
||||||
<WeaReqTop
|
<WeaReqTop
|
||||||
title={subtitle}
|
title={subtitle}
|
||||||
|
|
@ -25,48 +25,14 @@ export default class SlideModalTitle extends React.Component {
|
||||||
icon={<i className="icon-coms-fa"/>}
|
icon={<i className="icon-coms-fa"/>}
|
||||||
iconBgcolor="#F14A2D"
|
iconBgcolor="#F14A2D"
|
||||||
buttons={(this.props.showOperateBtn && this.state.editable && this.props.selectedTab != 1) ? [
|
buttons={(this.props.showOperateBtn && this.state.editable && this.props.selectedTab != 1) ? [
|
||||||
<Button type="primary" className="saveBtn" onClick={this.props.onSave}>保存</Button>
|
<Button type="primary" className="saveBtn" onClick={this.props.onSave} loading={loading}>保存</Button>
|
||||||
] : !_.isEmpty(customOperate) ? customOperate: []}
|
] : !_.isEmpty(customOperate) ? customOperate : []}
|
||||||
showDropIcon={false}
|
showDropIcon={false}
|
||||||
dropMenuDatas={[]}
|
dropMenuDatas={[]}
|
||||||
tabDatas={tabs || []}
|
tabDatas={tabs || []}
|
||||||
selectedKey={String(selectedTab) || ""}
|
selectedKey={String(selectedTab) || ""}
|
||||||
onChange={ key => subItemChange(key) }
|
onChange={key => subItemChange(key)}
|
||||||
/>
|
/>
|
||||||
</div>;
|
</div>;
|
||||||
// return <div className="slideTitleWrapper">
|
|
||||||
// <div className="iconWrapper">
|
|
||||||
// <i className="icon-coms-fa"/>
|
|
||||||
// </div>
|
|
||||||
// <div className="slideTitle">
|
|
||||||
// {
|
|
||||||
// this.props.subtitle && <div className="subtitle">
|
|
||||||
// {
|
|
||||||
// this.props.tabs ?
|
|
||||||
// <div>
|
|
||||||
// <div className="mainTitle">{this.props.subtitle}</div>
|
|
||||||
// <div className="subTab">
|
|
||||||
// {this.props.tabs.map(item => (
|
|
||||||
// <span className={item.key == this.props.selectedTab ? "subItem subItemSelected" : "subItem"}
|
|
||||||
// onClick={() => this.props.subItemChange(item)}>{item.title}</span>
|
|
||||||
// ))}
|
|
||||||
// </div>
|
|
||||||
// </div> : <div>{this.props.subtitle}</div>
|
|
||||||
// }
|
|
||||||
// </div>
|
|
||||||
// }
|
|
||||||
// </div>
|
|
||||||
// <div className="btnWrapper">
|
|
||||||
// {this.props.btns}
|
|
||||||
// {
|
|
||||||
// this.props.showOperateBtn && this.state.editable && this.props.selectedTab != 1 &&
|
|
||||||
// <Button type="primary" className="saveBtn" onClick={this.props.onSave}>保存</Button>
|
|
||||||
// }
|
|
||||||
// {this.props.customOperate}
|
|
||||||
{/* </div>*/
|
|
||||||
}
|
|
||||||
|
|
||||||
{/*</div>;*/
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import Programme from "./pages/socialSecurityBenefits/programme";
|
||||||
import Archives from "./pages/socialSecurityBenefits/archives";
|
import Archives from "./pages/socialSecurityBenefits/archives";
|
||||||
import StandingBook from "./pages/socialSecurityBenefits/standingBook";
|
import StandingBook from "./pages/socialSecurityBenefits/standingBook";
|
||||||
import StandingBookDetail from "./pages/socialSecurityBenefits/standingBookDetail";
|
import StandingBookDetail from "./pages/socialSecurityBenefits/standingBookDetail";
|
||||||
|
import StandingBookOfflineComparison from "./pages/socialSecurityBenefits/standingBookOfflineComparison";
|
||||||
import SalaryItem from "./pages/salaryItem";
|
import SalaryItem from "./pages/salaryItem";
|
||||||
import SalaryFile from "./pages/salaryFile";
|
import SalaryFile from "./pages/salaryFile";
|
||||||
import CumDeduct from "./pages/dataAcquisition/cumDeduct";
|
import CumDeduct from "./pages/dataAcquisition/cumDeduct";
|
||||||
|
|
@ -27,6 +28,8 @@ import GenerateDeclarationDetail from "./pages/declare/generateDeclarationDetail
|
||||||
import TemplatePreview from "./pages/payroll/templatePreview";
|
import TemplatePreview from "./pages/payroll/templatePreview";
|
||||||
import MobilePayroll from './pages/mobilePayroll';
|
import MobilePayroll from './pages/mobilePayroll';
|
||||||
import SysConfig from './pages/sysConfig';
|
import SysConfig from './pages/sysConfig';
|
||||||
|
import RuleConfig from './pages/ruleConfig';
|
||||||
|
import Appconfig from './pages/appConfig';
|
||||||
|
|
||||||
import stores from "./stores";
|
import stores from "./stores";
|
||||||
import "./style/index";
|
import "./style/index";
|
||||||
|
|
@ -49,6 +52,7 @@ const DataAcquisition = (props) => props.children;
|
||||||
// programme 社保福利方案
|
// programme 社保福利方案
|
||||||
// archives 社保福利档案
|
// archives 社保福利档案
|
||||||
// standingBook 社保福利台账
|
// standingBook 社保福利台账
|
||||||
|
// sbofflineComparison 社保福利台账线下对比
|
||||||
// salaryItem 薪资项目管理
|
// salaryItem 薪资项目管理
|
||||||
// salaryFile 薪资档案
|
// salaryFile 薪资档案
|
||||||
// dataAcquisition 数据采集
|
// dataAcquisition 数据采集
|
||||||
|
|
@ -68,6 +72,8 @@ const DataAcquisition = (props) => props.children;
|
||||||
// taxAgent 个税扣缴义务人
|
// taxAgent 个税扣缴义务人
|
||||||
// mobilepayroll 移动端工资单
|
// mobilepayroll 移动端工资单
|
||||||
// sysconfig 系統配置
|
// sysconfig 系統配置
|
||||||
|
// sysconfig-1 规则配置
|
||||||
|
// appconfig 应用配置
|
||||||
|
|
||||||
const Routes = (
|
const Routes = (
|
||||||
<Route
|
<Route
|
||||||
|
|
@ -88,6 +94,11 @@ const Routes = (
|
||||||
path="standingBookDetail"
|
path="standingBookDetail"
|
||||||
component={StandingBookDetail}
|
component={StandingBookDetail}
|
||||||
/>
|
/>
|
||||||
|
<Route
|
||||||
|
key="sbofflineComparison"
|
||||||
|
path="sbofflineComparison"
|
||||||
|
component={StandingBookOfflineComparison}
|
||||||
|
/>
|
||||||
</Route>
|
</Route>
|
||||||
<Route key="salaryItem" path="salaryItem" component={SalaryItem} />
|
<Route key="salaryItem" path="salaryItem" component={SalaryItem} />
|
||||||
<Route key="salaryFile" path="salaryFile" component={SalaryFile} />
|
<Route key="salaryFile" path="salaryFile" component={SalaryFile} />
|
||||||
|
|
@ -133,6 +144,8 @@ const Routes = (
|
||||||
<Route key="taxAgent" path="taxAgent" component={TaxAgent} />
|
<Route key="taxAgent" path="taxAgent" component={TaxAgent} />
|
||||||
<Route key="mobilepayroll" path="mobilepayroll" component={MobilePayroll} />
|
<Route key="mobilepayroll" path="mobilepayroll" component={MobilePayroll} />
|
||||||
<Route key="sysconfig" path="sysconfig" component={SysConfig} />
|
<Route key="sysconfig" path="sysconfig" component={SysConfig} />
|
||||||
|
<Route key="sysconfig-1" path="sysconfig-1" component={RuleConfig} />
|
||||||
|
<Route key="appconfig" path="appconfig" component={Appconfig} />
|
||||||
</Route>
|
</Route>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 应用设置
|
||||||
|
* Description:
|
||||||
|
* Date: 2022-09-27 18:17:02
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaCheckbox, WeaFormItem, WeaSearchGroup, WeaTop } from "ecCom";
|
||||||
|
import * as API from "../../apis/ruleconfig";
|
||||||
|
import { Button, message } from "antd";
|
||||||
|
|
||||||
|
class AppConfig extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
openAcctResultSum: "0",
|
||||||
|
loading: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.queryAppsetting();
|
||||||
|
}
|
||||||
|
|
||||||
|
queryAppsetting = () => {
|
||||||
|
API.queryAppsetting().then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
const { openAcctResultSum } = data;
|
||||||
|
this.setState({ openAcctResultSum });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
appSettingSave = () => {
|
||||||
|
const { openAcctResultSum } = this.state;
|
||||||
|
this.setState({ loading: true });
|
||||||
|
API.appSettingSave({ openAcctResultSum }).then(({ status }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
message.success("设置成功!");
|
||||||
|
this.queryAppsetting();
|
||||||
|
} else {
|
||||||
|
message.error("设置失败!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { openAcctResultSum, loading } = this.state;
|
||||||
|
const btns = [<Button type="primary" loading={loading} onClick={this.appSettingSave}>保存</Button>];
|
||||||
|
const items = [
|
||||||
|
{
|
||||||
|
com: CheckBox({
|
||||||
|
label: "显示薪资核算结果合计列",
|
||||||
|
value: openAcctResultSum,
|
||||||
|
onChange: (openAcctResultSum) => {
|
||||||
|
this.setState({ openAcctResultSum });
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<div className="appConfigWrapper">
|
||||||
|
<WeaTop
|
||||||
|
title={<span>应用设置</span>}
|
||||||
|
icon={<i className="icon-coms-Flow-setting"/>}
|
||||||
|
iconBgcolor="#F14A2D"
|
||||||
|
buttons={btns}
|
||||||
|
/>
|
||||||
|
<WeaSearchGroup title="" showGroup center items={items}/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AppConfig;
|
||||||
|
|
||||||
|
const CheckBox = payload => {
|
||||||
|
const { label, onChange, value } = payload;
|
||||||
|
return (
|
||||||
|
<WeaFormItem label={label} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
|
<WeaCheckbox display="switch" value={value} onChange={onChange}/>
|
||||||
|
</WeaFormItem>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
@ -37,7 +37,7 @@ export default class AcctResultImportModal extends React.Component {
|
||||||
|
|
||||||
// 获取模板
|
// 获取模板
|
||||||
handleAccResultTemplateLink() {
|
handleAccResultTemplateLink() {
|
||||||
const { isStandingBook } = this.props;
|
const { isStandingBook, standingBookTabKey } = this.props;
|
||||||
let url = "";
|
let url = "";
|
||||||
if (_.isEmpty(this.state.modalParam.salaryItemIds)) {
|
if (_.isEmpty(this.state.modalParam.salaryItemIds)) {
|
||||||
message.warning("请选择表单字段");
|
message.warning("请选择表单字段");
|
||||||
|
|
@ -46,7 +46,13 @@ export default class AcctResultImportModal extends React.Component {
|
||||||
if (!isStandingBook) {
|
if (!isStandingBook) {
|
||||||
url = `${window.location.origin}/api/bs/hrmsalary/salaryacct/acctresult/importtemplate/export?salaryItemIds=${this.state.modalParam.salaryItemIds}&salaryAcctRecordId=${this.state.modalParam.salaryAcctRecordId}`;
|
url = `${window.location.origin}/api/bs/hrmsalary/salaryacct/acctresult/importtemplate/export?salaryItemIds=${this.state.modalParam.salaryItemIds}&salaryAcctRecordId=${this.state.modalParam.salaryAcctRecordId}`;
|
||||||
} else {
|
} else {
|
||||||
url = `${window.location.origin}/api/bs/hrmsalary/siaccount/welfare/importtemplate/export?welfareNames=${this.state.modalParam.salaryItemIds}`;
|
const billMonth = getQueryString("billMonth");
|
||||||
|
const paymentOrganization = getQueryString("paymentOrganization");
|
||||||
|
if (standingBookTabKey === "1") {
|
||||||
|
url = `${window.location.origin}/api/bs/hrmsalary/siaccount/welfare/importtemplate/export?welfareNames=${this.state.modalParam.salaryItemIds}`;
|
||||||
|
} else if (standingBookTabKey === "3") {
|
||||||
|
url = `${window.location.origin}/api/bs/hrmsalary/siaccount/welfare/supplyimporttemplate/export?welfareNames=${this.state.modalParam.salaryItemIds}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
window.open(url, "_self");
|
window.open(url, "_self");
|
||||||
}
|
}
|
||||||
|
|
@ -77,7 +83,8 @@ export default class AcctResultImportModal extends React.Component {
|
||||||
|
|
||||||
// 渲染第一步表单
|
// 渲染第一步表单
|
||||||
renderFormComponent() {
|
renderFormComponent() {
|
||||||
return <Badge count={!_.isEmpty(this.state.modalParam.salaryItemIds) ? this.state.modalParam.salaryItemIds.split(",").length : 0}>
|
return <Badge
|
||||||
|
count={!_.isEmpty(this.state.modalParam.salaryItemIds) ? this.state.modalParam.salaryItemIds.split(",").length : 0}>
|
||||||
<Button onClick={() => {
|
<Button onClick={() => {
|
||||||
this.handleSelectedField();
|
this.handleSelectedField();
|
||||||
}}>请选择表单字段</Button>
|
}}>请选择表单字段</Button>
|
||||||
|
|
|
||||||
|
|
@ -37,19 +37,6 @@ export default class CompareDetail extends React.Component {
|
||||||
fetchComparisonResultList(params);
|
fetchComparisonResultList(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 计算差值
|
|
||||||
calculateCompares(systemValue, excelValue) {
|
|
||||||
if (systemValue == null || excelValue == null) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
let systemNum = Number(systemValue);
|
|
||||||
let excelNum = Number(excelValue);
|
|
||||||
if (!isNaN(systemNum) || !isNaN(excelNum)) { // 数字
|
|
||||||
return systemNum - excelNum;
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
getColumns(columns) {
|
getColumns(columns) {
|
||||||
let newColumns = [...columns];
|
let newColumns = [...columns];
|
||||||
newColumns.map(item => {
|
newColumns.map(item => {
|
||||||
|
|
@ -61,7 +48,7 @@ export default class CompareDetail extends React.Component {
|
||||||
<div>系统值:{record[item.dataIndex].acctResultValue}</div>
|
<div>系统值:{record[item.dataIndex].acctResultValue}</div>
|
||||||
<div>线下值:{record[item.dataIndex].excelResultValue}</div>
|
<div>线下值:{record[item.dataIndex].excelResultValue}</div>
|
||||||
<div
|
<div
|
||||||
style={{ color: "red" }}>差值:{this.calculateCompares(record[item.dataIndex].acctResultValue, record[item.dataIndex].excelResultValue)}</div>
|
style={{ color: "red" }}>差值:{calculateCompares(record[item.dataIndex].acctResultValue, record[item.dataIndex].excelResultValue)}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
@ -156,7 +143,7 @@ export default class CompareDetail extends React.Component {
|
||||||
// 导出
|
// 导出
|
||||||
handleExportClick() {
|
handleExportClick() {
|
||||||
window.open(
|
window.open(
|
||||||
'/api/bs/hrmsalary/salaryacct/comparisonresult/export?salaryAcctRecordId=' + this.id
|
"/api/bs/hrmsalary/salaryacct/comparisonresult/export?salaryAcctRecordId=" + this.id
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -182,7 +169,7 @@ export default class CompareDetail extends React.Component {
|
||||||
<div style={{ display: "inline-block" }}>
|
<div style={{ display: "inline-block" }}>
|
||||||
<Button type="primary" style={{ marginRight: "10px" }} onClick={() => this.handleImportClick()}>导入</Button>
|
<Button type="primary" style={{ marginRight: "10px" }} onClick={() => this.handleImportClick()}>导入</Button>
|
||||||
<Button type="default" style={{ marginRight: "10px" }} onClick={() => this.handleExportClick()}>导出</Button>
|
<Button type="default" style={{ marginRight: "10px" }} onClick={() => this.handleExportClick()}>导出</Button>
|
||||||
<WeaInputSearch value={searchValue} onChange={(value) => {
|
<WeaInputSearch value={searchValue} placeholder="请输入姓名" onChange={(value) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
searchValue: value
|
searchValue: value
|
||||||
});
|
});
|
||||||
|
|
@ -231,7 +218,7 @@ export default class CompareDetail extends React.Component {
|
||||||
loading={loading}
|
loading={loading}
|
||||||
dataSource={comparisonResultPageInfo.list ? comparisonResultPageInfo.list : []}
|
dataSource={comparisonResultPageInfo.list ? comparisonResultPageInfo.list : []}
|
||||||
columns={this.getColumns(comparisonResultColumns ? comparisonResultColumns : [])}
|
columns={this.getColumns(comparisonResultColumns ? comparisonResultColumns : [])}
|
||||||
scroll={{ x: this.getColumns(comparisonResultColumns ? comparisonResultColumns : []).length * 150 }}
|
scroll={{ x: this.getColumns(comparisonResultColumns ? comparisonResultColumns : []).length * 150, y: `calc(100vh - 199px)` }}
|
||||||
total={comparisonResultPageInfo.total}
|
total={comparisonResultPageInfo.total}
|
||||||
current={comparisonResultPageInfo.pageNum}
|
current={comparisonResultPageInfo.pageNum}
|
||||||
pageSize={this.pageInfo.pageSize}
|
pageSize={this.pageInfo.pageSize}
|
||||||
|
|
@ -264,3 +251,16 @@ export default class CompareDetail extends React.Component {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 计算差值
|
||||||
|
export const calculateCompares=(systemValue, excelValue)=> {
|
||||||
|
if (systemValue == null || excelValue == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
let systemNum = Number(systemValue);
|
||||||
|
let excelNum = Number(excelValue);
|
||||||
|
if (!isNaN(systemNum) || !isNaN(excelNum)) { // 数字
|
||||||
|
return systemNum - excelNum;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,13 @@ export default class CompareDetailImportModal extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTemplateLink() {
|
handleTemplateLink() {
|
||||||
window.open(
|
let url="";
|
||||||
"/api/bs/hrmsalary/salaryacct/comparisonresult/importtemplate/export?salaryAcctRecordId=" + this.props.id
|
if(this.props.id){
|
||||||
);
|
url= "/api/bs/hrmsalary/salaryacct/comparisonresult/importtemplate/export?salaryAcctRecordId=" + this.props.id
|
||||||
|
}else{
|
||||||
|
url=`/api/bs/hrmsalary/siaccount/comparisonwelfare/importtemplate/export`
|
||||||
|
}
|
||||||
|
window.open(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化导入参数
|
// 初始化导入参数
|
||||||
|
|
|
||||||
|
|
@ -72,16 +72,16 @@ export default class CalculateDetail extends React.Component {
|
||||||
<WeaBrowser
|
<WeaBrowser
|
||||||
isSingle={false}
|
isSingle={false}
|
||||||
value={key === "departmentIds" ? departmentIds : key === "subcompanyIds" ? subcompanyIds : positionIds}
|
value={key === "departmentIds" ? departmentIds : key === "subcompanyIds" ? subcompanyIds : positionIds}
|
||||||
tabs={key === "departmentIds" ? [
|
// tabs={key === "departmentIds" ? [
|
||||||
{
|
// {
|
||||||
dataParams: { list: "1" },
|
// dataParams: { list: "1" },
|
||||||
isSearch: true,
|
// isSearch: true,
|
||||||
key: "1",
|
// key: "1",
|
||||||
name: "按列表",
|
// name: "按列表",
|
||||||
selected: false,
|
// selected: false,
|
||||||
showOrder: 0
|
// showOrder: 0
|
||||||
}
|
// }
|
||||||
] : null}
|
// ] : null}
|
||||||
type={key === "departmentIds" ? 57 : key === "subcompanyIds" ? 164 : 278}
|
type={key === "departmentIds" ? 57 : key === "subcompanyIds" ? 164 : 278}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } });
|
this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } });
|
||||||
|
|
@ -90,9 +90,7 @@ export default class CalculateDetail extends React.Component {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
Select = (value, key) => {
|
Select = (value, key) => {
|
||||||
const { salaryFileStore } = this.props;
|
|
||||||
const { status } = this.state.searchItemsValue;
|
const { status } = this.state.searchItemsValue;
|
||||||
const { userStatusList } = salaryFileStore;
|
|
||||||
return (
|
return (
|
||||||
<WeaFormItem
|
<WeaFormItem
|
||||||
label={value}
|
label={value}
|
||||||
|
|
@ -101,7 +99,10 @@ export default class CalculateDetail extends React.Component {
|
||||||
>
|
>
|
||||||
<WeaSelect
|
<WeaSelect
|
||||||
value={status}
|
value={status}
|
||||||
options={userStatusList}
|
options={[
|
||||||
|
{ key: "", showname: "" }, {key: "ALL", showname: "全部"},
|
||||||
|
{ key: "NORMAL", showname: "在职" }, {key: "UNAVAILABLE", showname: "离职"}
|
||||||
|
]}
|
||||||
onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/>
|
onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/>
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.compareDetail {
|
.compareDetail {
|
||||||
overflow-y: auto;
|
overflow-y: hidden;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.tabWrapper {
|
.tabWrapper {
|
||||||
|
|
|
||||||
|
|
@ -146,6 +146,7 @@ export default class SalaryDetail extends React.Component {
|
||||||
<div className="tableWrapper">
|
<div className="tableWrapper">
|
||||||
<iframe
|
<iframe
|
||||||
style={{ border: 0, width: "100%", height: "100%" }}
|
style={{ border: 0, width: "100%", height: "100%" }}
|
||||||
|
// src="http://localhost:7607/#/atdTable"
|
||||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/atdTable"
|
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/atdTable"
|
||||||
id="atdTable"
|
id="atdTable"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -68,16 +68,16 @@ export default class UserSure extends React.Component {
|
||||||
<WeaBrowser
|
<WeaBrowser
|
||||||
isSingle={false}
|
isSingle={false}
|
||||||
value={key === "departmentIds" ? departmentIds : positionIds}
|
value={key === "departmentIds" ? departmentIds : positionIds}
|
||||||
tabs={key === "departmentIds" ? [
|
// tabs={key === "departmentIds" ? [
|
||||||
{
|
// {
|
||||||
dataParams: { list: "1" },
|
// dataParams: { list: "1" },
|
||||||
isSearch: true,
|
// isSearch: true,
|
||||||
key: "1",
|
// key: "1",
|
||||||
name: "按列表",
|
// name: "按列表",
|
||||||
selected: false,
|
// selected: false,
|
||||||
showOrder: 0
|
// showOrder: 0
|
||||||
}
|
// }
|
||||||
] : null}
|
// ] : null}
|
||||||
type={key === "departmentIds" ? 57 : 278}
|
type={key === "departmentIds" ? 57 : 278}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } });
|
this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } });
|
||||||
|
|
@ -86,9 +86,7 @@ export default class UserSure extends React.Component {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
Select = (value, key) => {
|
Select = (value, key) => {
|
||||||
const { salaryFileStore } = this.props;
|
|
||||||
const { status } = this.state.searchItemsValue;
|
const { status } = this.state.searchItemsValue;
|
||||||
const { userStatusList } = salaryFileStore;
|
|
||||||
return (
|
return (
|
||||||
<WeaFormItem
|
<WeaFormItem
|
||||||
label={value}
|
label={value}
|
||||||
|
|
@ -97,7 +95,10 @@ export default class UserSure extends React.Component {
|
||||||
>
|
>
|
||||||
<WeaSelect
|
<WeaSelect
|
||||||
value={String(status)}
|
value={String(status)}
|
||||||
options={userStatusList}
|
options={[
|
||||||
|
{ key: "", showname: "" }, {key: "ALL", showname: "全部"},
|
||||||
|
{ key: "NORMAL", showname: "在职" }, {key: "UNAVAILABLE", showname: "离职"}
|
||||||
|
]}
|
||||||
onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/>
|
onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/>
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
);
|
);
|
||||||
|
|
@ -152,7 +153,7 @@ export default class UserSure extends React.Component {
|
||||||
const payload = {
|
const payload = {
|
||||||
type: "PC",
|
type: "PC",
|
||||||
listType: "MA",
|
listType: "MA",
|
||||||
url: "/api/bs/hrmsalary/salaryacct/reducedemployee/list",
|
url: this.state.selectedKey === '1'?"/api/bs/hrmsalary/salaryacct/reducedemployee/list":"/api/bs/hrmsalary/salaryacct/addedemployee/list",
|
||||||
queryParams: {
|
queryParams: {
|
||||||
salaryAcctRecordId,
|
salaryAcctRecordId,
|
||||||
employeeName: this.state.userListSearchValue,
|
employeeName: this.state.userListSearchValue,
|
||||||
|
|
@ -197,8 +198,10 @@ export default class UserSure extends React.Component {
|
||||||
let url = "";
|
let url = "";
|
||||||
if (this.state.selectedKey == 0) {
|
if (this.state.selectedKey == 0) {
|
||||||
url = `${window.location.origin}/api/bs/hrmsalary/salaryacct/acctemployee/export?salaryAcctRecordId=${this.id}`;
|
url = `${window.location.origin}/api/bs/hrmsalary/salaryacct/acctemployee/export?salaryAcctRecordId=${this.id}`;
|
||||||
} else {
|
} else if (this.state.selectedKey == 1) {
|
||||||
url = `${window.location.origin}/api/bs/hrmsalary/salaryacct/reducedemployee/export?salaryAcctRecordId=${this.id}`;
|
url = `${window.location.origin}/api/bs/hrmsalary/salaryacct/reducedemployee/export?salaryAcctRecordId=${this.id}`;
|
||||||
|
} else {
|
||||||
|
url = `${window.location.origin}/api/bs/hrmsalary/salaryacct/addedemployee/export?salaryAcctRecordId=${this.id}`;
|
||||||
}
|
}
|
||||||
window.open(url, "_self");
|
window.open(url, "_self");
|
||||||
}
|
}
|
||||||
|
|
@ -470,6 +473,36 @@ export default class UserSure extends React.Component {
|
||||||
title="提示:环比上期当前选择的账套归档的各个税扣缴义务人下减少的人员"
|
title="提示:环比上期当前选择的账套归档的各个税扣缴义务人下减少的人员"
|
||||||
placement="topLeft"
|
placement="topLeft"
|
||||||
/>
|
/>
|
||||||
|
<span style={{ margin: "0 8px" }}>|</span>
|
||||||
|
<span
|
||||||
|
className={
|
||||||
|
this.state.selectedKey == "2"
|
||||||
|
? "crumbItem crumbItemSelected"
|
||||||
|
: "crumbItem"
|
||||||
|
}
|
||||||
|
onClick={() => {
|
||||||
|
this.setState({ selectedKey: "2" }, () => {
|
||||||
|
const childFrameObj = document.getElementById("atdTable");
|
||||||
|
const salaryAcctRecordId = getQueryString("id");
|
||||||
|
const payload = {
|
||||||
|
type: "PC",
|
||||||
|
listType: "MA",
|
||||||
|
url: "/api/bs/hrmsalary/salaryacct/addedemployee/list",
|
||||||
|
queryParams: {
|
||||||
|
salaryAcctRecordId,
|
||||||
|
employeeName: this.state.userListSearchValue
|
||||||
|
}
|
||||||
|
};
|
||||||
|
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||||
|
});
|
||||||
|
}}>
|
||||||
|
环比上月增加人员
|
||||||
|
</span>
|
||||||
|
<WeaHelpfulTip
|
||||||
|
width={200}
|
||||||
|
title="提示:环比上期当前选择的账套归档的各个税扣缴义务人下增加的人员"
|
||||||
|
placement="topLeft"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="crumbsOperateWrapper">
|
<div className="crumbsOperateWrapper">
|
||||||
<WeaTab
|
<WeaTab
|
||||||
|
|
|
||||||
|
|
@ -508,6 +508,7 @@ export default class Attendance extends React.Component {
|
||||||
onChange={value => {
|
onChange={value => {
|
||||||
this.setState({ fieldName: value });
|
this.setState({ fieldName: value });
|
||||||
}}
|
}}
|
||||||
|
placeholder="请输入字段名称"
|
||||||
onSearch={value => {
|
onSearch={value => {
|
||||||
this.setState({ fieldSettingSearchValue: value });
|
this.setState({ fieldSettingSearchValue: value });
|
||||||
handleItemSearch(value);
|
handleItemSearch(value);
|
||||||
|
|
|
||||||
|
|
@ -534,6 +534,7 @@ export default class CumDeduct extends React.Component {
|
||||||
</WeaRightMenu>
|
</WeaRightMenu>
|
||||||
{modalVisiable && (
|
{modalVisiable && (
|
||||||
<ImportModal
|
<ImportModal
|
||||||
|
needimportSelected //下载模板需要带上导入所选项
|
||||||
init={() => {
|
init={() => {
|
||||||
this.handleInitModal();
|
this.handleInitModal();
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,6 @@ export default class OtherDeduct extends React.Component {
|
||||||
|
|
||||||
renderFormComponent() {
|
renderFormComponent() {
|
||||||
const { modalParam } = this.state;
|
const { modalParam } = this.state;
|
||||||
const { taxAgentStore: { taxAgentOption } } = this.props;
|
|
||||||
return (
|
return (
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
|
@ -295,7 +294,10 @@ export default class OtherDeduct extends React.Component {
|
||||||
};
|
};
|
||||||
const adBtn = [
|
const adBtn = [
|
||||||
// 高级搜索内部按钮
|
// 高级搜索内部按钮
|
||||||
<Button type="primary" onClick={doSearch}>
|
<Button type="primary" onClick={()=>doSearch({
|
||||||
|
taxAgentId: taxAgentId === "All" ? "" : taxAgentId,
|
||||||
|
declareMonth: monthValue && [monthValue]
|
||||||
|
})}>
|
||||||
搜索
|
搜索
|
||||||
</Button>,
|
</Button>,
|
||||||
<Button type="ghost" onClick={() => form.resetForm()}>
|
<Button type="ghost" onClick={() => form.resetForm()}>
|
||||||
|
|
@ -504,6 +506,7 @@ export default class OtherDeduct extends React.Component {
|
||||||
</WeaRightMenu>
|
</WeaRightMenu>
|
||||||
{modalVisiable &&
|
{modalVisiable &&
|
||||||
<ImportModal
|
<ImportModal
|
||||||
|
needimportSelected //下载模板需要带上导入所选项
|
||||||
init={() => {
|
init={() => {
|
||||||
this.handleInitImport();
|
this.handleInitImport();
|
||||||
}}
|
}}
|
||||||
|
|
@ -515,7 +518,10 @@ export default class OtherDeduct extends React.Component {
|
||||||
onFinish={() => {
|
onFinish={() => {
|
||||||
setModalVisiable(false);
|
setModalVisiable(false);
|
||||||
setStep(0);
|
setStep(0);
|
||||||
doSearch();
|
doSearch({
|
||||||
|
taxAgentId: taxAgentId === "All" ? "" : taxAgentId,
|
||||||
|
declareMonth: monthValue && [monthValue]
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
importResult={importResult}
|
importResult={importResult}
|
||||||
slideDataSource={slideDataSource}
|
slideDataSource={slideDataSource}
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ export default class GenerateDeclarationDetail extends React.Component {
|
||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const { declareStore: { exportSalaryArchive } } = this.props;
|
const url = `${window.location.origin}/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=${this.id}`;
|
||||||
exportSalaryArchive(this.id);
|
window.open(url, "_self");
|
||||||
}
|
}
|
||||||
|
|
||||||
getColumns() {
|
getColumns() {
|
||||||
|
|
@ -106,4 +106,4 @@ export default class GenerateDeclarationDetail extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,8 @@ export default class AddUserModal extends React.Component {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
onRadioChange(e) {
|
onRadioChange(radioValue) {
|
||||||
this.setState({ radioValue: e.target.value });
|
this.setState({ radioValue });
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,7 @@ export default class Ledger extends React.Component {
|
||||||
const { ledgerStore, taxAgentStore } = this.props;
|
const { ledgerStore, taxAgentStore } = this.props;
|
||||||
const {
|
const {
|
||||||
loading,
|
loading,
|
||||||
|
saveLoading,
|
||||||
dataSource,
|
dataSource,
|
||||||
columns,
|
columns,
|
||||||
pageObj,
|
pageObj,
|
||||||
|
|
@ -530,6 +531,7 @@ export default class Ledger extends React.Component {
|
||||||
{ title: "调薪计薪规则", key: 3 }
|
{ title: "调薪计薪规则", key: 3 }
|
||||||
// { title: "校验规则", key: 4 }
|
// { title: "校验规则", key: 4 }
|
||||||
]}
|
]}
|
||||||
|
loading={saveLoading}
|
||||||
showOperateBtn={showOperateBtn}
|
showOperateBtn={showOperateBtn}
|
||||||
editable={canEdit === "true"}
|
editable={canEdit === "true"}
|
||||||
selectedTab={selectedTab}
|
selectedTab={selectedTab}
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,13 @@
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border: 1px solid #eee;
|
border: 1px solid #eee;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.wea-sortable-grid-item{
|
||||||
|
display: inline-block;
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableItemWrapper {
|
.tableItemWrapper {
|
||||||
|
|
|
||||||
|
|
@ -148,10 +148,10 @@ export default class SalaryItemForm extends React.Component {
|
||||||
<div className="userInfoWrapper">
|
<div className="userInfoWrapper">
|
||||||
<div>
|
<div>
|
||||||
<span>
|
<span>
|
||||||
<span>员工信息</span>
|
<span>员工基本信息</span>
|
||||||
<WeaHelpfulTip
|
<WeaHelpfulTip
|
||||||
style={{ marginLeft: "10px" }}
|
style={{ marginLeft: "10px" }}
|
||||||
width={100}
|
width={200}
|
||||||
title="姓名、部门、个税扣缴义务人为必须项,不可删除"
|
title="姓名、部门、个税扣缴义务人为必须项,不可删除"
|
||||||
placement="topLeft"
|
placement="topLeft"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ export default class SlideBaseForm extends React.Component {
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={18}>
|
<Col span={18}>
|
||||||
<WeaSelect
|
<WeaSelect
|
||||||
disabled={canEdit !== "true"}
|
disabled={edit}
|
||||||
options={[
|
options={[
|
||||||
{
|
{
|
||||||
key: "1",
|
key: "1",
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ export default class AddSalaryItemModal extends React.Component {
|
||||||
}}/>
|
}}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{ height: "100%", overflowY: "scroll" }}>
|
<div style={{ height: "calc(100% - 68px)", overflowY: "scroll" }}>
|
||||||
<CustomTable
|
<CustomTable
|
||||||
loading={loading}
|
loading={loading}
|
||||||
dataSource={addSalaryItemDataSource}
|
dataSource={addSalaryItemDataSource}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Icon, message } from "antd";
|
import { Icon, message } from "antd";
|
||||||
import { WeaSelect } from "ecCom";
|
import { WeaSelect, WeaSortable } from "ecCom";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { toJS } from "mobx";
|
||||||
import CanDeleteItem from "../../../components/canDeleteItem";
|
import CanDeleteItem from "../../../components/canDeleteItem";
|
||||||
|
|
||||||
@inject("ledgerStore")
|
@inject("ledgerStore")
|
||||||
|
|
@ -41,7 +42,6 @@ export default class UserInfoSelected extends React.Component {
|
||||||
const { ledgerStore: { empFields, addEmpFields, setUserSelectedList } } = this.props;
|
const { ledgerStore: { empFields, addEmpFields, setUserSelectedList } } = this.props;
|
||||||
addEmpFields(value);
|
addEmpFields(value);
|
||||||
this.setState({ showSelect: false });
|
this.setState({ showSelect: false });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleItemDelete(item) {
|
handleItemDelete(item) {
|
||||||
|
|
@ -62,19 +62,25 @@ export default class UserInfoSelected extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { ledgerStore: { empBrowserList, userSelectedList } } = this.props;
|
const { ledgerStore: { empBrowserList, userSelectedList, setUserSelectedList } } = this.props;
|
||||||
|
const list = _.map(toJS(userSelectedList), it => ({ ...it }));
|
||||||
return (
|
return (
|
||||||
<div className="userInfoSelected">
|
<div className="userInfoSelected">
|
||||||
{
|
<WeaSortable
|
||||||
userSelectedList.map(item => (
|
datas={list}
|
||||||
<CanDeleteItem title={item.showname} item={item} onDelete={(item) => {
|
draggableType="icon"
|
||||||
|
onChange={(list) => setUserSelectedList(list)}
|
||||||
|
renderNodeItem={(item) => {
|
||||||
|
return <CanDeleteItem title={item.showname} item={item} onDelete={(item) => {
|
||||||
this.handleItemDelete(item);
|
this.handleItemDelete(item);
|
||||||
}}/>
|
}}/>;
|
||||||
))
|
}}
|
||||||
}
|
className="wea-sortable-grid-item"
|
||||||
<Icon type="plus" style={{ marginLeft: "10px", marginRight: "10px", cursor: "pointer" }} onClick={() => {
|
/>
|
||||||
this.setState({ showSelect: true });
|
<Icon type="plus" style={{ marginLeft: "10px", marginRight: "10px", cursor: "pointer" }} title="新增"
|
||||||
}}/>
|
onClick={() => {
|
||||||
|
this.setState({ showSelect: true });
|
||||||
|
}}/>
|
||||||
{
|
{
|
||||||
this.state.showSelect && empBrowserList.length > 0 &&
|
this.state.showSelect && empBrowserList.length > 0 &&
|
||||||
<WeaSelect showSearch options={empBrowserList}
|
<WeaSelect showSearch options={empBrowserList}
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,11 @@ import { WeaDialog, WeaTable } from "ecCom";
|
||||||
@observer
|
@observer
|
||||||
export default class PreviewSalaryModal extends React.Component {
|
export default class PreviewSalaryModal extends React.Component {
|
||||||
getColumns() {
|
getColumns() {
|
||||||
const { ledgerStore: { empFields, itemGroups } } = this.props;
|
const { ledgerStore: { userSelectedList, itemGroups } } = this.props;
|
||||||
let columns = [];
|
let columns = [];
|
||||||
let length = 0;
|
let length = 0;
|
||||||
|
|
||||||
empFields.map(item => {
|
userSelectedList.map(item => {
|
||||||
columns.push({
|
columns.push({
|
||||||
title: item.fieldName,
|
title: item.fieldName,
|
||||||
key: item.fieldId,
|
key: item.fieldId,
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,7 @@ export default class SalarySendList extends React.Component {
|
||||||
key: "moreOperate",
|
key: "moreOperate",
|
||||||
dataIndex: "moreOperate",
|
dataIndex: "moreOperate",
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
|
const {sendNum,sendTotal}= record;
|
||||||
return (
|
return (
|
||||||
<Dropdown
|
<Dropdown
|
||||||
overlay={
|
overlay={
|
||||||
|
|
@ -113,14 +114,14 @@ export default class SalarySendList extends React.Component {
|
||||||
</a>
|
</a>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
|
|
||||||
<Menu.Item>
|
{sendNum!==sendTotal &&<Menu.Item>
|
||||||
<a
|
<a
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
this.handleUpdateTemplate(record);
|
this.handleUpdateTemplate(record);
|
||||||
}}>
|
}}>
|
||||||
更新模板
|
更新模板
|
||||||
</a>
|
</a>
|
||||||
</Menu.Item>
|
</Menu.Item>}
|
||||||
</Menu>
|
</Menu>
|
||||||
}>
|
}>
|
||||||
<i className="icon-coms-more" />
|
<i className="icon-coms-more" />
|
||||||
|
|
@ -151,7 +152,6 @@ export default class SalarySendList extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const { payrollStore } = this.props;
|
const { payrollStore } = this.props;
|
||||||
const {
|
const {
|
||||||
salarySendTableStore,
|
|
||||||
salarySendDataSource,
|
salarySendDataSource,
|
||||||
pageInfo,
|
pageInfo,
|
||||||
loading
|
loading
|
||||||
|
|
|
||||||
|
|
@ -135,8 +135,9 @@ export default class PayrollDetail extends React.Component {
|
||||||
getPayrollDetailList({ salarySendId: this.state.currentId, ...pageInfo });
|
getPayrollDetailList({ salarySendId: this.state.currentId, ...pageInfo });
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSearch() {
|
handleSearch=()=> {
|
||||||
const { payrollStore: { getPayrollDetailList } } = this.props;
|
const { payrollStore: { getPayrollDetailList, setDetailListShowSearchAd } } = this.props;
|
||||||
|
setDetailListShowSearchAd(false);
|
||||||
getPayrollDetailList({ salarySendId: this.state.currentId, ...this.pageInfo });
|
getPayrollDetailList({ salarySendId: this.state.currentId, ...this.pageInfo });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -153,6 +154,18 @@ export default class PayrollDetail extends React.Component {
|
||||||
salarySendDetailDataSource,
|
salarySendDetailDataSource,
|
||||||
salarySendDetailPageInfo
|
salarySendDetailPageInfo
|
||||||
} = payrollStore;
|
} = payrollStore;
|
||||||
|
const adBtn = [
|
||||||
|
// 高级搜索内部按钮
|
||||||
|
<Button type="primary" onClick={()=>this.handleSearch()}>
|
||||||
|
搜索
|
||||||
|
</Button>,
|
||||||
|
<Button type="ghost" onClick={() => detailListConditionForm.resetForm()}>
|
||||||
|
重置
|
||||||
|
</Button>,
|
||||||
|
<Button type="ghost" onClick={() => setDetailListShowSearchAd(false)}>
|
||||||
|
取消
|
||||||
|
</Button>
|
||||||
|
];
|
||||||
return (
|
return (
|
||||||
<div className="payrollGrant">
|
<div className="payrollGrant">
|
||||||
<WeaTop
|
<WeaTop
|
||||||
|
|
@ -164,10 +177,11 @@ export default class PayrollDetail extends React.Component {
|
||||||
></WeaTop>
|
></WeaTop>
|
||||||
<WeaTab
|
<WeaTab
|
||||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||||
|
searchsBasePlaceHolder="请输入姓名"
|
||||||
showSearchAd={detailListShowSearchAd} // 是否展开高级搜索面板
|
showSearchAd={detailListShowSearchAd} // 是否展开高级搜索面板
|
||||||
setShowSearchAd={bool => setDetailListShowSearchAd(bool)} //高级搜索面板受控
|
setShowSearchAd={bool => setDetailListShowSearchAd(bool)} //高级搜索面板受控
|
||||||
searchsAd={getSearchs(detailListConditionForm, toJS(detailListCondition), 2)} // 高级搜索内部数据
|
searchsAd={getSearchs(detailListConditionForm, toJS(detailListCondition), 2)} // 高级搜索内部数据
|
||||||
// buttonsAd={adBtn} // 高级搜索内部按钮
|
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||||
onSearch={() => {
|
onSearch={() => {
|
||||||
this.handleSearch();
|
this.handleSearch();
|
||||||
}} // 点搜索按钮时的回调
|
}} // 点搜索按钮时的回调
|
||||||
|
|
|
||||||
|
|
@ -159,8 +159,7 @@ export default class PayrollGrant extends React.Component {
|
||||||
{/* <Menu.Item key="3">自定义列</Menu.Item> */}
|
{/* <Menu.Item key="3">自定义列</Menu.Item> */}
|
||||||
</Menu>
|
</Menu>
|
||||||
);
|
);
|
||||||
return (
|
return [
|
||||||
<div style={{ display: "inline-block" }}>
|
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
style={{ marginRight: "10px" }}
|
style={{ marginRight: "10px" }}
|
||||||
|
|
@ -168,7 +167,7 @@ export default class PayrollGrant extends React.Component {
|
||||||
this.handleGrantAll();
|
this.handleGrantAll();
|
||||||
}}>
|
}}>
|
||||||
全部发放
|
全部发放
|
||||||
</Button>
|
</Button>,
|
||||||
<Button
|
<Button
|
||||||
type="default"
|
type="default"
|
||||||
style={{ marginRight: "10px" }}
|
style={{ marginRight: "10px" }}
|
||||||
|
|
@ -176,12 +175,11 @@ export default class PayrollGrant extends React.Component {
|
||||||
this.handleWithdrawAll();
|
this.handleWithdrawAll();
|
||||||
}}>
|
}}>
|
||||||
全部撤回
|
全部撤回
|
||||||
</Button>
|
</Button>,
|
||||||
<Dropdown.Button style={{ marginRight: "10px" }} overlay={menu}>
|
<Dropdown.Button style={{ marginRight: "10px" }} overlay={menu}>
|
||||||
更多
|
更多
|
||||||
</Dropdown.Button>
|
</Dropdown.Button>
|
||||||
</div>
|
];
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleExportAll = () => {
|
handleExportAll = () => {
|
||||||
|
|
@ -221,8 +219,9 @@ export default class PayrollGrant extends React.Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSearch() {
|
handleSearch=()=> {
|
||||||
const { payrollStore: { getInfoList } } = this.props;
|
const { payrollStore: { getInfoList, setGrantListShowSearchAd } } = this.props;
|
||||||
|
setGrantListShowSearchAd(false);
|
||||||
getInfoList({
|
getInfoList({
|
||||||
salarySendId: this.state.currentId,
|
salarySendId: this.state.currentId,
|
||||||
...this.pageInfo
|
...this.pageInfo
|
||||||
|
|
@ -252,6 +251,18 @@ export default class PayrollGrant extends React.Component {
|
||||||
selectedRowKeys,
|
selectedRowKeys,
|
||||||
onChange: this.onSelectChange
|
onChange: this.onSelectChange
|
||||||
};
|
};
|
||||||
|
const adBtn = [
|
||||||
|
// 高级搜索内部按钮
|
||||||
|
<Button type="primary" onClick={()=>this.handleSearch()}>
|
||||||
|
搜索
|
||||||
|
</Button>,
|
||||||
|
<Button type="ghost" onClick={() => grantListConditionForm.resetForm()}>
|
||||||
|
重置
|
||||||
|
</Button>,
|
||||||
|
<Button type="ghost" onClick={() => setGrantListShowSearchAd(false)}>
|
||||||
|
取消
|
||||||
|
</Button>
|
||||||
|
];
|
||||||
return (
|
return (
|
||||||
<div className="payrollGrant_new">
|
<div className="payrollGrant_new">
|
||||||
<WeaTop
|
<WeaTop
|
||||||
|
|
@ -259,11 +270,12 @@ export default class PayrollGrant extends React.Component {
|
||||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||||
showDropIcon={true} // 是否显示下拉按钮
|
showDropIcon={true} // 是否显示下拉按钮
|
||||||
buttons={[this.getSearchsAdQuick()]}
|
buttons={this.getSearchsAdQuick()}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<WeaTab
|
<WeaTab
|
||||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||||
|
searchsBasePlaceHolder="请输入姓名"
|
||||||
showSearchAd={grantListShowSearchAd} // 是否展开高级搜索面板
|
showSearchAd={grantListShowSearchAd} // 是否展开高级搜索面板
|
||||||
setShowSearchAd={bool => setGrantListShowSearchAd(bool)} //高级搜索面板受控
|
setShowSearchAd={bool => setGrantListShowSearchAd(bool)} //高级搜索面板受控
|
||||||
searchsAd={getSearchs(
|
searchsAd={getSearchs(
|
||||||
|
|
@ -271,7 +283,7 @@ export default class PayrollGrant extends React.Component {
|
||||||
toJS(grantListCondition),
|
toJS(grantListCondition),
|
||||||
2
|
2
|
||||||
)} // 高级搜索内部数据
|
)} // 高级搜索内部数据
|
||||||
// buttonsAd={adBtn} // 高级搜索内部按钮
|
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||||
onSearch={() => this.handleSearch()} // 点搜索按钮时的回调
|
onSearch={() => this.handleSearch()} // 点搜索按钮时的回调
|
||||||
// searchsAdQuick={this.getSearchsAdQuick()}
|
// searchsAdQuick={this.getSearchsAdQuick()}
|
||||||
onSearchChange={v =>
|
onSearchChange={v =>
|
||||||
|
|
|
||||||
|
|
@ -219,6 +219,7 @@ export default class payrollGrantModal extends React.Component {
|
||||||
onChange={value => {
|
onChange={value => {
|
||||||
this.setState({ searchValue: value });
|
this.setState({ searchValue: value });
|
||||||
}}
|
}}
|
||||||
|
placeholder="请输入姓名"
|
||||||
onSearch={value => {
|
onSearch={value => {
|
||||||
this.handleSearch(value);
|
this.handleSearch(value);
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -214,6 +214,7 @@ export default class PayrollWithdrawModal extends React.Component {
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<WeaInputSearch
|
<WeaInputSearch
|
||||||
|
placeholder="请输入姓名"
|
||||||
value={this.state.searchValue}
|
value={this.state.searchValue}
|
||||||
onChange={value => {
|
onChange={value => {
|
||||||
this.setState({ searchValue: value });
|
this.setState({ searchValue: value });
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ export default class ComputerTemplate extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
if(this.props.isMsgPreview){
|
if(this.props.isMsgPreview && this.props.salaryItemSet){
|
||||||
this.setState({
|
this.setState({
|
||||||
salaryItemSet: JSON.parse(this.props.salaryItemSet),
|
salaryItemSet: JSON.parse(this.props.salaryItemSet),
|
||||||
salaryTemplateShowSet: JSON.parse(this.props.salaryTemplateShowSet)
|
salaryTemplateShowSet: JSON.parse(this.props.salaryTemplateShowSet)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,192 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 规则配置
|
||||||
|
* Description:
|
||||||
|
* Date: 2022-09-19 18:15:32
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaFormItem, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom";
|
||||||
|
import { Button, message, Modal } from "antd";
|
||||||
|
import * as API from "../../apis/ruleconfig";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
items: [],
|
||||||
|
importItems: [],
|
||||||
|
saveParams: {
|
||||||
|
orderRule: "",
|
||||||
|
ascOrDesc: "",
|
||||||
|
rule: ""
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
let sysSetting = this.getSysSetting();
|
||||||
|
}
|
||||||
|
|
||||||
|
getSysSetting = async () => {
|
||||||
|
const [orderRuleEnum, ascOrDescEnum, matchEmployeeModeEnum, sysOrderRule, sysConfCodeRule] = await Promise.all([this.orderRuleEnum(), this.ascOrDescEnum(), this.matchEmployeeModeEnum(), this.sysOrderRule(), this.sysConfCodeRule()]);
|
||||||
|
if (orderRuleEnum.status && ascOrDescEnum.status && matchEmployeeModeEnum.status) {
|
||||||
|
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 }));
|
||||||
|
this.setState({
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
com: Select({
|
||||||
|
label: "排序字段",
|
||||||
|
onChange: this.handleChane,
|
||||||
|
value: sysOrderRule.data.orderRule,
|
||||||
|
options: orderOptions
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
com: Select({
|
||||||
|
label: "正序/倒序",
|
||||||
|
onChange: this.handleChane,
|
||||||
|
value: sysOrderRule.data.ascOrDesc,
|
||||||
|
options: ascOptions
|
||||||
|
})
|
||||||
|
}
|
||||||
|
],
|
||||||
|
importItems: [
|
||||||
|
{
|
||||||
|
com: Select({
|
||||||
|
label: "人员字段",
|
||||||
|
onChange: this.handleChane,
|
||||||
|
value: sysConfCodeRule.data,
|
||||||
|
options: employeeOptions
|
||||||
|
})
|
||||||
|
}
|
||||||
|
],
|
||||||
|
saveParams: {
|
||||||
|
...this.state.saveParams,
|
||||||
|
orderRule: sysOrderRule.data.orderRule,
|
||||||
|
ascOrDesc: sysOrderRule.data.ascOrDesc,
|
||||||
|
rule: sysConfCodeRule.data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
sysOrderRule = () => {
|
||||||
|
return API.sysOrderRule();
|
||||||
|
};
|
||||||
|
sysConfCodeRule = () => {
|
||||||
|
return API.sysConfCodeRule({code:"matchEmployeeMode"});
|
||||||
|
};
|
||||||
|
orderRuleEnum = () => {
|
||||||
|
const payload = {
|
||||||
|
enumClass: "com.engine.salary.sys.enums.OrderRuleEnum"
|
||||||
|
};
|
||||||
|
return API.commonEnumList(payload);
|
||||||
|
};
|
||||||
|
ascOrDescEnum = () => {
|
||||||
|
const payload = {
|
||||||
|
enumClass: "com.engine.salary.sys.enums.AscOrDescEnum"
|
||||||
|
};
|
||||||
|
return API.commonEnumList(payload);
|
||||||
|
};
|
||||||
|
matchEmployeeModeEnum = () => {
|
||||||
|
const payload = {
|
||||||
|
enumClass: "com.engine.salary.sys.enums.MatchEmployeeModeEnum"
|
||||||
|
};
|
||||||
|
return API.commonEnumList(payload);
|
||||||
|
};
|
||||||
|
handleSave = (type) => {
|
||||||
|
const { saveParams } = this.state;
|
||||||
|
if (type === "ORDER") {
|
||||||
|
if (_.isEmpty(saveParams.orderRule) || _.isEmpty(saveParams.ascOrDesc)) {
|
||||||
|
Modal.warning({
|
||||||
|
title: "信息确认",
|
||||||
|
content: "必要信息不完整,红色*为必填项!"
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
API.updateOrderRule(_.pick(saveParams, ["orderRule", "ascOrDesc"])).then(({ status, errormsg }) => {
|
||||||
|
if (status) {
|
||||||
|
message.success("保存成功!");
|
||||||
|
let sysSetting = this.getSysSetting();
|
||||||
|
} else {
|
||||||
|
message.error(errormsg || "保存失败!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (type === "EMPLOYEE") {
|
||||||
|
if (_.isEmpty(saveParams.rule)) {
|
||||||
|
Modal.warning({
|
||||||
|
title: "信息确认",
|
||||||
|
content: "必要信息不完整,红色*为必填项!"
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
API.saveMatchEmployeeModeRule(_.pick(saveParams, ["rule"])).then(({ status, errormsg }) => {
|
||||||
|
if (status) {
|
||||||
|
message.success("保存成功!");
|
||||||
|
let sysSetting = this.getSysSetting();
|
||||||
|
} else {
|
||||||
|
message.error(errormsg || "保存失败!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
handleChane = (data) => {
|
||||||
|
const { type, selected } = data;
|
||||||
|
if (type === "排序字段") {
|
||||||
|
this.setState({
|
||||||
|
saveParams: { ...this.state.saveParams, orderRule: selected }
|
||||||
|
});
|
||||||
|
} else if (type === "正序/倒序") {
|
||||||
|
this.setState({
|
||||||
|
saveParams: { ...this.state.saveParams, ascOrDesc: selected }
|
||||||
|
});
|
||||||
|
} else if (type === "人员字段") {
|
||||||
|
this.setState({
|
||||||
|
saveParams: { ...this.state.saveParams, rule: selected }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { items, importItems } = this.state;
|
||||||
|
return (
|
||||||
|
<div className="ruleWrapper">
|
||||||
|
<WeaTop
|
||||||
|
title={<span>规则配置</span>}
|
||||||
|
icon={<i className="icon-coms-Flow-setting"/>}
|
||||||
|
iconBgcolor="#F14A2D"
|
||||||
|
buttons={[]}
|
||||||
|
/>
|
||||||
|
<WeaSearchGroup
|
||||||
|
title={
|
||||||
|
<div className="titleWrapper">
|
||||||
|
<span>排序规则</span>
|
||||||
|
<Button type="primary" onClick={() => this.handleSave("ORDER")}>保存</Button>
|
||||||
|
</div>
|
||||||
|
} showGroup center items={items}/>
|
||||||
|
<WeaSearchGroup
|
||||||
|
title={
|
||||||
|
<div className="titleWrapper">
|
||||||
|
<span>人员校验规则</span>
|
||||||
|
<Button type="primary" onClick={() => this.handleSave("EMPLOYEE")}>保存</Button>
|
||||||
|
</div>
|
||||||
|
} showGroup center items={importItems}/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
||||||
|
const Select = payload => {
|
||||||
|
const { label, onChange, value, options = [] } = payload;
|
||||||
|
return (
|
||||||
|
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||||
|
<WeaSelect options={[{ key: "", showname: "" }, ...options]} viewAttr={3} value={value}
|
||||||
|
onChange={(selected) => onChange({ type: label, selected })}/>
|
||||||
|
</WeaFormItem>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
.ruleWrapper {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.titleWrapper {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -196,11 +196,14 @@ export default class SalaryFile extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出全部
|
// 导出全部
|
||||||
handleExportAll() {
|
handleExportAll=()=> {
|
||||||
const {
|
let url = `${window.location.origin}/api/bs/hrmsalary/salaryArchive/exportList?ids=`;
|
||||||
salaryFileStore: { exportSalaryArchive }
|
const { searchItemsValue } = this.state;
|
||||||
} = this.props;
|
const fileds= Object.keys(searchItemsValue);
|
||||||
exportSalaryArchive();
|
_.forEach(fileds, it => {
|
||||||
|
url= `${url}&${it}=${searchItemsValue[it]}`
|
||||||
|
})
|
||||||
|
window.open(url, "_self");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 定制列
|
// 定制列
|
||||||
|
|
@ -434,10 +437,12 @@ export default class SalaryFile extends React.Component {
|
||||||
message.warning("未选择条目");
|
message.warning("未选择条目");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const {
|
// const {
|
||||||
salaryFileStore: { exportSalaryArchive }
|
// salaryFileStore: { exportSalaryArchive }
|
||||||
} = this.props;
|
// } = this.props;
|
||||||
exportSalaryArchive(selectedRowKeys.join(","));
|
// exportSalaryArchive(selectedRowKeys.join(","));
|
||||||
|
const url = `${window.location.origin}/api/bs/hrmsalary/salaryArchive/exportList?ids=${selectedRowKeys.join(",")}`;
|
||||||
|
window.open(url, "_self");
|
||||||
};
|
};
|
||||||
|
|
||||||
const menu = (
|
const menu = (
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,9 @@ export default class SalaryItem extends React.Component {
|
||||||
editable: false,
|
editable: false,
|
||||||
isAdd: false,
|
isAdd: false,
|
||||||
searchValue: "",
|
searchValue: "",
|
||||||
formalModalVisible: false
|
formalModalVisible: false,
|
||||||
|
searchParams: { current: 1, pageSize: 10, total: 0 }
|
||||||
};
|
};
|
||||||
this.searchParams = { current: 1, pageSize: 10 };
|
|
||||||
columns.map(item => {
|
columns.map(item => {
|
||||||
if (item.dataIndex == "refere") {
|
if (item.dataIndex == "refere") {
|
||||||
item.render = () => {
|
item.render = () => {
|
||||||
|
|
@ -49,8 +49,16 @@ export default class SalaryItem extends React.Component {
|
||||||
|
|
||||||
|
|
||||||
componentWillMount() { // 初始化渲染页面
|
componentWillMount() { // 初始化渲染页面
|
||||||
const { salaryItemStore: { doInit } } = this.props;
|
const { salaryItemStore: { getTableDatas } } = this.props;
|
||||||
doInit();
|
getTableDatas({}).then(res => {
|
||||||
|
this.setState({
|
||||||
|
searchParams: {
|
||||||
|
...this.state.searchParams,
|
||||||
|
current: res.pageNum,
|
||||||
|
total: res.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onEditItem(record, isedit) {
|
onEditItem(record, isedit) {
|
||||||
|
|
@ -63,12 +71,21 @@ export default class SalaryItem extends React.Component {
|
||||||
|
|
||||||
// 删除列表项
|
// 删除列表项
|
||||||
handleDeleteItem(record) {
|
handleDeleteItem(record) {
|
||||||
const { salaryItemStore: { deleteItemRequest } } = this.props;
|
const { salaryItemStore: { deleteItemRequest,getTableDatas } } = this.props;
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "信息确认",
|
title: "信息确认",
|
||||||
content: "确认删除",
|
content: "确认删除",
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
deleteItemRequest([record.id]);
|
deleteItemRequest([record.id]).then(()=>{
|
||||||
|
getTableDatas({...this.state.searchParams}).then(res=>{
|
||||||
|
this.setState({
|
||||||
|
searchParams:{
|
||||||
|
...this.state.searchParams,
|
||||||
|
total: res.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
onCancel: () => {
|
onCancel: () => {
|
||||||
}
|
}
|
||||||
|
|
@ -136,19 +153,33 @@ export default class SalaryItem extends React.Component {
|
||||||
|
|
||||||
handleSearch(value) {
|
handleSearch(value) {
|
||||||
const { salaryItemStore: { getTableDatas } } = this.props;
|
const { salaryItemStore: { getTableDatas } } = this.props;
|
||||||
this.searchParams = { name: value, current: 1 };
|
getTableDatas({...this.state.searchParams, name: value}).then(res => {
|
||||||
getTableDatas(this.searchParams);
|
this.setState({
|
||||||
|
searchParams: {
|
||||||
|
...this.state.searchParams,
|
||||||
|
current: 1,
|
||||||
|
total: res.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePageChnage(value) {
|
handlePageChange(value) {
|
||||||
this.searchParams.current = value;
|
|
||||||
const { salaryItemStore: { getTableDatas } } = this.props;
|
const { salaryItemStore: { getTableDatas } } = this.props;
|
||||||
getTableDatas(this.searchParams);
|
getTableDatas({...this.state.searchParams, current: value}).then(res=>{
|
||||||
|
this.setState({
|
||||||
|
searchParams: {
|
||||||
|
...this.state.searchParams,
|
||||||
|
current: value,
|
||||||
|
total: res.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
handleShowSizeChange(searchParams) {
|
handleShowSizeChange(searchParams) {
|
||||||
const { salaryItemStore: { getTableDatas } } = this.props;
|
const { salaryItemStore: { getTableDatas } } = this.props;
|
||||||
getTableDatas(searchParams);
|
getTableDatas({...searchParams});
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
@ -175,7 +206,6 @@ export default class SalaryItem extends React.Component {
|
||||||
if (!hasRight && !loading) { // 无权限处理
|
if (!hasRight && !loading) { // 无权限处理
|
||||||
return renderNoright();
|
return renderNoright();
|
||||||
}
|
}
|
||||||
|
|
||||||
const batchDelete = () => {
|
const batchDelete = () => {
|
||||||
setDeleteItemVisible(true);
|
setDeleteItemVisible(true);
|
||||||
};
|
};
|
||||||
|
|
@ -187,12 +217,12 @@ export default class SalaryItem extends React.Component {
|
||||||
// content: "显示列定制",
|
// content: "显示列定制",
|
||||||
// onClick: this.showColumn
|
// onClick: this.showColumn
|
||||||
// },
|
// },
|
||||||
{
|
// {
|
||||||
key: "BTN_DEL",
|
// key: "BTN_DEL",
|
||||||
icon: <i className="icon-coms-delete"/>,
|
// icon: <i className="icon-coms-delete"/>,
|
||||||
content: "批量删除",
|
// content: "批量删除",
|
||||||
onClick: batchDelete
|
// onClick: batchDelete
|
||||||
}
|
// }
|
||||||
];
|
];
|
||||||
const collectParams = { // 收藏功能配置
|
const collectParams = { // 收藏功能配置
|
||||||
favname: "薪资项目管理",
|
favname: "薪资项目管理",
|
||||||
|
|
@ -245,31 +275,36 @@ export default class SalaryItem extends React.Component {
|
||||||
|
|
||||||
// 新建和修改保存的回调
|
// 新建和修改保存的回调
|
||||||
const handleSlideSave = (continueFlag) => {
|
const handleSlideSave = (continueFlag) => {
|
||||||
const { salaryItemStore: { saveItem, request } } = this.props;
|
const { salaryItemStore: { saveItem, request, getTableDatas } } = this.props;
|
||||||
if (this.state.editable) { // 修改
|
saveItem(request, continueFlag).then(()=>{
|
||||||
saveItem(request, continueFlag, this.searchParams);
|
getTableDatas({...this.state.searchParams}).then(res=>{
|
||||||
} else { // 新建
|
this.setState({
|
||||||
saveItem(request, continueFlag);
|
searchParams:{
|
||||||
}
|
...this.state.searchParams,
|
||||||
|
total: res.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderCustomOperate = () => {
|
const renderCustomOperate = () => {
|
||||||
let arrList=[];
|
let arrList = [];
|
||||||
if(this.state.isAdd){
|
if (this.state.isAdd) {
|
||||||
arrList=[
|
arrList = [
|
||||||
<Button type="primary" onClick={() => {
|
<Button type="primary" onClick={() => {
|
||||||
handleSlideSave(false);
|
handleSlideSave(false);
|
||||||
}}>保存</Button>,
|
}}>保存</Button>,
|
||||||
<Button type="default" onClick={() => {
|
<Button type="default" onClick={() => {
|
||||||
handleSlideSave(true);
|
handleSlideSave(true);
|
||||||
}}>保存并继续创建</Button>
|
}}>保存并继续创建</Button>
|
||||||
]
|
];
|
||||||
}else if(this.state.editable){
|
} else if (this.state.editable) {
|
||||||
arrList=[
|
arrList = [
|
||||||
<Button type="primary" onClick={() => {
|
<Button type="primary" onClick={() => {
|
||||||
handleSlideSave(false);
|
handleSlideSave(false);
|
||||||
}}>保存</Button>
|
}}>保存</Button>
|
||||||
]
|
];
|
||||||
}
|
}
|
||||||
return arrList;
|
return arrList;
|
||||||
};
|
};
|
||||||
|
|
@ -278,7 +313,6 @@ export default class SalaryItem extends React.Component {
|
||||||
const { salaryItemStore: { setRequest } } = this.props;
|
const { salaryItemStore: { setRequest } } = this.props;
|
||||||
setRequest(value);
|
setRequest(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mySalaryBenefitsWrapper">
|
<div className="mySalaryBenefitsWrapper">
|
||||||
<WeaRightMenu
|
<WeaRightMenu
|
||||||
|
|
@ -302,16 +336,22 @@ export default class SalaryItem extends React.Component {
|
||||||
loading={loading}
|
loading={loading}
|
||||||
dataSource={tableDataSource}
|
dataSource={tableDataSource}
|
||||||
columns={this.getColumns(tableColumns)}
|
columns={this.getColumns(tableColumns)}
|
||||||
total={pageInfo.total}
|
total={this.state.searchParams.total}
|
||||||
current={pageInfo.pageNum}
|
current={this.state.searchParams.current}
|
||||||
pageSize={this.searchParams.pageSize}
|
pageSize={this.state.searchParams.pageSize}
|
||||||
onPageChange={(value) => {
|
onPageChange={(value) => {
|
||||||
this.handlePageChnage(value);
|
this.handlePageChange(value);
|
||||||
}}
|
}}
|
||||||
onShowSizeChange={(current, pageSize) => {
|
onShowSizeChange={(current, pageSize) => {
|
||||||
this.searchParams.current = current;
|
this.setState({
|
||||||
this.searchParams.pageSize = pageSize;
|
searchParams: {
|
||||||
this.handleShowSizeChange(this.searchParams);
|
...this.state.searchParams,
|
||||||
|
current,
|
||||||
|
pageSize
|
||||||
|
}
|
||||||
|
},()=>{
|
||||||
|
this.handleShowSizeChange(this.state.searchParams);
|
||||||
|
})
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -185,8 +185,8 @@ export default class Archives extends React.Component {
|
||||||
|
|
||||||
// 导出全部
|
// 导出全部
|
||||||
const handleButtonClick = () => {
|
const handleButtonClick = () => {
|
||||||
const { archivesStore: { exportArchives } } = this.props;
|
const url = `${window.location.origin}/api/bs/hrmsalary/scheme/export?ids=`;
|
||||||
exportArchives();
|
window.open(url, "_self");
|
||||||
};
|
};
|
||||||
|
|
||||||
// 导出选中
|
// 导出选中
|
||||||
|
|
@ -197,8 +197,8 @@ export default class Archives extends React.Component {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let ids = selectedRowKeys.join(",");
|
let ids = selectedRowKeys.join(",");
|
||||||
const { archivesStore: { exportArchives } } = this.props;
|
const url = `${window.location.origin}/api/bs/hrmsalary/scheme/export?ids=${ids}`;
|
||||||
exportArchives(ids);
|
window.open(url, "_self");
|
||||||
};
|
};
|
||||||
|
|
||||||
const btns = [
|
const btns = [
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import { Button, Icon, message, Modal, Spin, Tooltip } from "antd";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { toJS } from "mobx";
|
import { toJS } from "mobx";
|
||||||
import { WeaDialog, WeaInputSearch, WeaTable } from "ecCom";
|
import { WeaDialog, WeaInputSearch, WeaTable } from "ecCom";
|
||||||
import { getSearchs } from "../../../../util";
|
import { getSearchs, calcPageNo } from "../../../../util";
|
||||||
import { getQueryString } from "../../../../util/url";
|
import { getQueryString } from "../../../../util/url";
|
||||||
import ProgressModal from "../../../../components/progressModal";
|
import ProgressModal from "../../../../components/progressModal";
|
||||||
import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal";
|
import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal";
|
||||||
|
|
@ -64,14 +64,18 @@ export default class NormalIndex extends Component {
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
if (nextProps.selectedKey != this.props.selectedKey) {
|
if (nextProps.selectedKey != this.props.selectedKey) {
|
||||||
const { billMonth, paymentOrganization } = nextProps;
|
const { billMonth, paymentOrganization } = nextProps;
|
||||||
const { current } = this.state;
|
this.setState({
|
||||||
nextProps.selectedKey === "1"
|
current: 1,
|
||||||
? this.getNormalList({ billMonth, current, paymentOrganization })
|
}, ()=>{
|
||||||
: this.getSupplementaryList({
|
const { current } = this.state;
|
||||||
billMonth,
|
nextProps.selectedKey === "1"
|
||||||
current,
|
? this.getNormalList({ billMonth, current, paymentOrganization })
|
||||||
paymentOrganization
|
: this.getSupplementaryList({
|
||||||
});
|
billMonth,
|
||||||
|
current,
|
||||||
|
paymentOrganization
|
||||||
|
});
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -256,6 +260,10 @@ export default class NormalIndex extends Component {
|
||||||
_.filter(list, it => selectedRowKeys.includes(it.id)),
|
_.filter(list, it => selectedRowKeys.includes(it.id)),
|
||||||
item => item.employeeId
|
item => item.employeeId
|
||||||
);
|
);
|
||||||
|
const ids = _.map(
|
||||||
|
_.filter(list, it => selectedRowKeys.includes(it.id)),
|
||||||
|
item => item.id
|
||||||
|
);
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "确认信息",
|
title: "确认信息",
|
||||||
content: "确认删除勾选的数据吗?",
|
content: "确认删除勾选的数据吗?",
|
||||||
|
|
@ -263,6 +271,7 @@ export default class NormalIndex extends Component {
|
||||||
siaccountCommonDelete({
|
siaccountCommonDelete({
|
||||||
billMonth,
|
billMonth,
|
||||||
includes,
|
includes,
|
||||||
|
ids,
|
||||||
paymentOrganization
|
paymentOrganization
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
|
|
@ -271,11 +280,11 @@ export default class NormalIndex extends Component {
|
||||||
? this.getNormalList({
|
? this.getNormalList({
|
||||||
billMonth,
|
billMonth,
|
||||||
paymentOrganization,
|
paymentOrganization,
|
||||||
current: this.state.current
|
current: calcPageNo(this.state.tableData.total,this.state.current, 10, includes.length)
|
||||||
})
|
})
|
||||||
: this.getSupplementaryList({
|
: this.getSupplementaryList({
|
||||||
billMonth,
|
billMonth,
|
||||||
current: this.state.current,
|
current: calcPageNo(this.state.tableData.total,this.state.current, 10, includes.length),
|
||||||
paymentOrganization
|
paymentOrganization
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -472,9 +481,22 @@ export default class NormalIndex extends Component {
|
||||||
<Tooltip title="导出全部">
|
<Tooltip title="导出全部">
|
||||||
<i className="icon-coms02-coms2-export" />
|
<i className="icon-coms02-coms2-export" />
|
||||||
</Tooltip> */}
|
</Tooltip> */}
|
||||||
{selectedKey === "1" && this.props.type !== "detail" && <Button type="primary" onClick={() => {
|
{
|
||||||
this.handleCommonAccountClick();
|
selectedKey === "1" && this.props.type !== "detail" &&
|
||||||
}}>核算</Button>}
|
<React.Fragment>
|
||||||
|
<Button type="primary" onClick={() => {
|
||||||
|
this.handleCommonAccountClick();
|
||||||
|
}}>核算</Button>
|
||||||
|
</React.Fragment>
|
||||||
|
}
|
||||||
|
{
|
||||||
|
selectedKey === "1" &&
|
||||||
|
<React.Fragment>
|
||||||
|
<Button type="primary" onClick={() => {
|
||||||
|
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/sbofflineComparison?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`)
|
||||||
|
}}>线下对比</Button>
|
||||||
|
</React.Fragment>
|
||||||
|
}
|
||||||
{/*核算进度条*/}
|
{/*核算进度条*/}
|
||||||
<ProgressModal
|
<ProgressModal
|
||||||
visible={this.state.progressVisible}
|
visible={this.state.progressVisible}
|
||||||
|
|
@ -483,30 +505,37 @@ export default class NormalIndex extends Component {
|
||||||
}}
|
}}
|
||||||
progress={this.state.progress}
|
progress={this.state.progress}
|
||||||
/>
|
/>
|
||||||
<Tooltip title="导入数据">
|
{
|
||||||
<i className="icon-coms02-Template-import1" style={{ color: "#2db7f5", fontSize: 18, marginRight: 10 }}
|
this.props.type !== "detail" &&
|
||||||
onClick={() => this.setState({ importParams: { ...importParams, visible: true } })}/>
|
<Tooltip title="导入数据">
|
||||||
</Tooltip>
|
<i className="icon-coms02-Template-import1" style={{ color: "#2db7f5", fontSize: 18, marginRight: 10 }}
|
||||||
|
onClick={() => this.setState({ importParams: { ...importParams, visible: true } })}/>
|
||||||
|
</Tooltip>
|
||||||
|
}
|
||||||
{/*导入弹框*/}
|
{/*导入弹框*/}
|
||||||
<AcctResultImportModal
|
{
|
||||||
visiable={importParams.visible}
|
importParams.visible &&
|
||||||
fieldData={this.state.fieldData}
|
<AcctResultImportModal
|
||||||
onAdd={fieldData => {
|
visiable={importParams.visible}
|
||||||
this.setState({
|
fieldData={this.state.fieldData}
|
||||||
fieldData
|
onAdd={fieldData => {
|
||||||
});
|
this.setState({
|
||||||
}}
|
fieldData
|
||||||
onCancel={() => {
|
});
|
||||||
this.setState({ importParams: { ...importParams, visible: false } }, () => {
|
}}
|
||||||
const { billMonth, selectedKey, paymentOrganization } = this.props;
|
onCancel={() => {
|
||||||
const { current } = this.state;
|
this.setState({ importParams: { ...importParams, visible: false },fieldData: {} }, () => {
|
||||||
selectedKey === "1"
|
const { billMonth, selectedKey, paymentOrganization } = this.props;
|
||||||
? this.getNormalList({ billMonth, current, paymentOrganization })
|
const { current } = this.state;
|
||||||
: this.getSupplementaryList({ billMonth, current, paymentOrganization });
|
selectedKey === "1"
|
||||||
});
|
? this.getNormalList({ billMonth, current, paymentOrganization })
|
||||||
}}
|
: this.getSupplementaryList({ billMonth, current, paymentOrganization });
|
||||||
isStandingBook
|
});
|
||||||
/>
|
}}
|
||||||
|
isStandingBook
|
||||||
|
standingBookTabKey={selectedKey}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
|
||||||
<Tooltip title="导出全部">
|
<Tooltip title="导出全部">
|
||||||
<i className="icon-coms-export" style={{ color: "#2db7f5", fontSize: 18 }}
|
<i className="icon-coms-export" style={{ color: "#2db7f5", fontSize: 18 }}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
export const conditions = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["userName"],
|
||||||
|
fieldcol: 14,
|
||||||
|
label: "姓名",
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2,
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultshow: true,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,162 @@
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaCheckbox, WeaTab, WeaTable } from "ecCom";
|
||||||
|
import { Button } from "antd";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import * as API from "../../../apis/offlineCompare";
|
||||||
|
import { getSearchs } from "../../../util";
|
||||||
|
import { getQueryString } from "../../../util/url";
|
||||||
|
import { calculateCompares } from "../../calculateDetail/compareDetail";
|
||||||
|
import CompareDetailImportModal from "../../calculateDetail/compareDetailImportModal";
|
||||||
|
import { conditions } from "./condition";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
@inject("standingBookStore")
|
||||||
|
@observer
|
||||||
|
class StandingBookOfflineComparison extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
columns: [],
|
||||||
|
dataSource: [],
|
||||||
|
onlyDiffEmployee: "1",
|
||||||
|
showSearchAd: false,
|
||||||
|
loading: false,
|
||||||
|
importVisible: false,
|
||||||
|
pageInfo: {
|
||||||
|
current: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { standingBookStore: { ocForm: form } } = this.props;
|
||||||
|
this.comparisonwelfareList();
|
||||||
|
form.initFormFields(conditions);
|
||||||
|
}
|
||||||
|
|
||||||
|
comparisonwelfareList = () => {
|
||||||
|
const billMonth = getQueryString("billMonth");
|
||||||
|
const paymentOrganization = getQueryString("paymentOrganization");
|
||||||
|
const { onlyDiffEmployee, pageInfo } = this.state;
|
||||||
|
const { standingBookStore: { ocForm: form } } = this.props;
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
const payload = {
|
||||||
|
paymentStatus: 0,
|
||||||
|
billMonth,
|
||||||
|
paymentOrganization,
|
||||||
|
onlyDiffEmployee: onlyDiffEmployee === "1"
|
||||||
|
};
|
||||||
|
this.setState({ loading: true });
|
||||||
|
API.comparisonwelfareList({ ...payload, ...pageInfo, ...formParams }).then(({ status, data }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
const { columns, list: dataSource, total, pageNum: current, pageSize } = data;
|
||||||
|
this.setState({
|
||||||
|
columns: _.map(columns, it => ({
|
||||||
|
...it,
|
||||||
|
width: 150,
|
||||||
|
render: (text, record) => {
|
||||||
|
if (Object.prototype.toString.call(text) === "[object Object]") {
|
||||||
|
return <React.Fragment>
|
||||||
|
<div>系统值:{record[it.dataIndex].acctResultValue || 0}</div>
|
||||||
|
<div>线下值:{record[it.dataIndex].excelResultValue || 0}</div>
|
||||||
|
<div style={{ color: "red" }}>
|
||||||
|
差值:{calculateCompares(record[it.dataIndex].acctResultValue, record[it.dataIndex].excelResultValue)}
|
||||||
|
</div>
|
||||||
|
</React.Fragment>;
|
||||||
|
}
|
||||||
|
return <span>{text}</span>;
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
dataSource,
|
||||||
|
pageInfo: { ...pageInfo, current, total, pageSize }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { onlyDiffEmployee, showSearchAd, pageInfo, dataSource, columns, loading, importVisible } = this.state;
|
||||||
|
const { standingBookStore: { ocForm: form } } = this.props;
|
||||||
|
const buttons = [
|
||||||
|
<Button type="primary" onClick={() => this.setState({ importVisible: true })}>导入</Button>
|
||||||
|
];
|
||||||
|
const adBtn = [
|
||||||
|
<Button type="primary" onClick={() => {
|
||||||
|
this.setState({ showSearchAd: false }, () => {
|
||||||
|
this.comparisonwelfareList();
|
||||||
|
});
|
||||||
|
}}>搜索</Button>,
|
||||||
|
<Button type="ghost" onClick={() => form.resetForm()}>重置</Button>,
|
||||||
|
<Button type="ghost" onClick={() => this.setState({ showSearchAd: false })}>取消</Button>
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<div className="compareWrapper">
|
||||||
|
<WeaTab
|
||||||
|
datas={[]}
|
||||||
|
buttons={buttons}
|
||||||
|
buttonsAd={adBtn}
|
||||||
|
searchType={["base", "advanced"]}
|
||||||
|
searchsBasePlaceHolder="请输入姓名"
|
||||||
|
showSearchAd={showSearchAd}
|
||||||
|
setShowSearchAd={showSearchAd => this.setState({ showSearchAd })}
|
||||||
|
searchsAd={getSearchs(form, conditions, 2)}
|
||||||
|
onSearch={() => {
|
||||||
|
this.setState({ showSearchAd: false }, () => {
|
||||||
|
this.comparisonwelfareList();
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
onSearchChange={v => form.updateFields({ userName: v })}
|
||||||
|
searchsBaseValue={form.getFormParams().userName}
|
||||||
|
searchsAdQuick={
|
||||||
|
<WeaCheckbox
|
||||||
|
value={onlyDiffEmployee}
|
||||||
|
onChange={
|
||||||
|
(onlyDiffEmployee) =>
|
||||||
|
this.setState({ onlyDiffEmployee }, () => {
|
||||||
|
this.comparisonwelfareList();
|
||||||
|
})
|
||||||
|
} content="只显示有差异的人员"/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<WeaTable
|
||||||
|
columns={columns}
|
||||||
|
dataSource={dataSource}
|
||||||
|
className="ocTable-wrapper"
|
||||||
|
scroll={{ x: 1200, y: "calc(100vh - 150px)" }}
|
||||||
|
loading={loading}
|
||||||
|
pagination={{
|
||||||
|
total: pageInfo.total,
|
||||||
|
showTotal: total => `共 ${total} 条`,
|
||||||
|
showSizeChanger: true,
|
||||||
|
pageSizeOptions: ["10", "20", "50", "100"],
|
||||||
|
onShowSizeChange: (current, pageSize) => {
|
||||||
|
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => {
|
||||||
|
this.comparisonwelfareList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onChange: current => {
|
||||||
|
this.setState({ pageInfo: { ...pageInfo, current } }, () => {
|
||||||
|
this.comparisonwelfareList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{
|
||||||
|
importVisible &&
|
||||||
|
<CompareDetailImportModal
|
||||||
|
visiable={importVisible}
|
||||||
|
onFinish={() => {
|
||||||
|
// this.handleComparisonFinish();
|
||||||
|
}}
|
||||||
|
onCancel={() => this.setState({ importVisible: false })}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default StandingBookOfflineComparison;
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
.compareWrapper{
|
||||||
|
.wea-tab{
|
||||||
|
.wea-tab-search-ad-quick-left{
|
||||||
|
height: 46px;
|
||||||
|
line-height: 46px;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
.wea-tab-right-search-ad-quick{
|
||||||
|
margin-top: 0!important;
|
||||||
|
}
|
||||||
|
.wea-search-container-search-ad-quick{
|
||||||
|
top: 47px!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ocTable-wrapper{
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -12,6 +12,7 @@ const { TableStore } = WeaTableNew;
|
||||||
export class StandingBookStore {
|
export class StandingBookStore {
|
||||||
@observable tableStore = new TableStore(); // new table
|
@observable tableStore = new TableStore(); // new table
|
||||||
@observable form = new WeaForm(); // nrew 一个form
|
@observable form = new WeaForm(); // nrew 一个form
|
||||||
|
@observable ocForm = new WeaForm(); // 社保福利线下对比form
|
||||||
@observable condition = []; // 存储后台得到的form数据
|
@observable condition = []; // 存储后台得到的form数据
|
||||||
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
|
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
|
||||||
@observable showSearchAd = false; // 高级搜索面板显示
|
@observable showSearchAd = false; // 高级搜索面板显示
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,8 @@ export class LedgerStore {
|
||||||
@observable condition = []; // 存储后台得到的form数据
|
@observable condition = []; // 存储后台得到的form数据
|
||||||
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
|
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
|
||||||
@observable showSearchAd = false; // 高级搜索面板显示
|
@observable showSearchAd = false; // 高级搜索面板显示
|
||||||
@observable loading = true; // 数据加载状态
|
@observable loading = false; // 数据加载状态
|
||||||
|
@observable saveLoading = false; // 数据保存loading状态
|
||||||
@observable salarySobId = "";
|
@observable salarySobId = "";
|
||||||
@observable includeType = 1; // 0:排除、1:包含
|
@observable includeType = 1; // 0:排除、1:包含
|
||||||
@observable userTableStore = {};
|
@observable userTableStore = {};
|
||||||
|
|
@ -379,7 +380,9 @@ export class LedgerStore {
|
||||||
if (!this.validateBaseFrom(params)) {
|
if (!this.validateBaseFrom(params)) {
|
||||||
reject("保存失败");
|
reject("保存失败");
|
||||||
}
|
}
|
||||||
|
this.saveLoading= true;
|
||||||
API.saveLedgerBasic(params).then(res => {
|
API.saveLedgerBasic(params).then(res => {
|
||||||
|
this.saveLoading= false;
|
||||||
if (res.status) {
|
if (res.status) {
|
||||||
this.salarySobId = res.data;
|
this.salarySobId = res.data;
|
||||||
resolve();
|
resolve();
|
||||||
|
|
@ -559,12 +562,14 @@ export class LedgerStore {
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
salarySobId: this.salarySobId,
|
salarySobId: this.salarySobId,
|
||||||
empFields: this.empFields,
|
empFields: _.map(this.userSelectedList, (it, idx) => ({...it, sortedIndex:idx })),
|
||||||
itemGroups: itemGroups.filter(item => item.id != "default"),
|
itemGroups: itemGroups.filter(item => item.id != "default"),
|
||||||
items: itemGroups.filter(item => item.id == "default")[0].items
|
items: itemGroups.filter(item => item.id == "default")[0].items
|
||||||
};
|
};
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
this.saveLoading= true;
|
||||||
API.saveLedgerItem(params).then(res => {
|
API.saveLedgerItem(params).then(res => {
|
||||||
|
this.saveLoading= false;
|
||||||
if (res.status) {
|
if (res.status) {
|
||||||
resolve();
|
resolve();
|
||||||
message.success("保存成功");
|
message.success("保存成功");
|
||||||
|
|
@ -612,7 +617,9 @@ export class LedgerStore {
|
||||||
ruleParams: this.sobItemRuleDataSource
|
ruleParams: this.sobItemRuleDataSource
|
||||||
};
|
};
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
this.saveLoading= true;
|
||||||
API.saveAdjustmentRule(params).then(res => {
|
API.saveAdjustmentRule(params).then(res => {
|
||||||
|
this.saveLoading= false;
|
||||||
if (res.status) {
|
if (res.status) {
|
||||||
resolve();
|
resolve();
|
||||||
message.success("保存成功");
|
message.success("保存成功");
|
||||||
|
|
|
||||||
|
|
@ -134,8 +134,8 @@ export class OtherDeductStore {
|
||||||
setShowSearchAd = (bool) => (this.showSearchAd = bool);
|
setShowSearchAd = (bool) => (this.showSearchAd = bool);
|
||||||
|
|
||||||
// 高级搜索 - 搜索
|
// 高级搜索 - 搜索
|
||||||
@action doSearch = () => {
|
@action doSearch = (params) => {
|
||||||
this.getTableDatas();
|
this.getTableDatas(params);
|
||||||
this.showSearchAd = false;
|
this.showSearchAd = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import { observable, action, toJS } from 'mobx';
|
import { action, observable, toJS } from "mobx";
|
||||||
import { message } from 'antd';
|
import { message } from "antd";
|
||||||
import { WeaForm, WeaTableNew } from 'comsMobx';
|
import { WeaForm, WeaTableNew } from "comsMobx";
|
||||||
|
|
||||||
import * as API from '../apis/item'; // 引入API接口文件
|
import * as API from "../apis/item"; // 引入API接口文件
|
||||||
import {notNull} from '../util/validate'
|
import { notNull } from "../util/validate";
|
||||||
|
|
||||||
const { TableStore } = WeaTableNew;
|
const { TableStore } = WeaTableNew;
|
||||||
|
|
||||||
|
|
@ -20,23 +20,23 @@ export class SalaryItemStore {
|
||||||
@observable deleteItemVisible = false; // 删除Modal
|
@observable deleteItemVisible = false; // 删除Modal
|
||||||
@observable editSlideVisible = false; // 新建修改设置
|
@observable editSlideVisible = false; // 新建修改设置
|
||||||
@observable request = {
|
@observable request = {
|
||||||
name: '',
|
name: "",
|
||||||
useDefault: 0,
|
useDefault: 0,
|
||||||
useInEmployeeSalary: 0,
|
useInEmployeeSalary: 0,
|
||||||
systemType:0,
|
systemType: 0,
|
||||||
roundingMode: "1",
|
roundingMode: "1",
|
||||||
pattern: 0,
|
pattern: 0,
|
||||||
valueType: 1,
|
valueType: 1,
|
||||||
dataType: "number",
|
dataType: "number",
|
||||||
description: ""
|
description: ""
|
||||||
}
|
};
|
||||||
|
|
||||||
@observable tableDataSource = []; // 主列表
|
@observable tableDataSource = []; // 主列表
|
||||||
@observable tableColumns = []; // 主列表列
|
@observable tableColumns = []; // 主列表列
|
||||||
@observable pageInfo = {}; // 分页数据
|
@observable pageInfo = {}; // 分页数据
|
||||||
|
|
||||||
// 可以删除的项目
|
// 可以删除的项目
|
||||||
@observable canDeleteList = []
|
@observable canDeleteList = [];
|
||||||
|
|
||||||
// ** 公式 **
|
// ** 公式 **
|
||||||
// 类型列表
|
// 类型列表
|
||||||
|
|
@ -52,22 +52,22 @@ export class SalaryItemStore {
|
||||||
// 设置字段列表
|
// 设置字段列表
|
||||||
@action
|
@action
|
||||||
setSearchFields = (searchFields) => {
|
setSearchFields = (searchFields) => {
|
||||||
this.searchFields = searchFields
|
this.searchFields = searchFields;
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
@action
|
@action
|
||||||
initRequest = () => this.request = {
|
initRequest = () => this.request = {
|
||||||
name: '',
|
name: "",
|
||||||
useDefault: 0,
|
useDefault: 0,
|
||||||
useInEmployeeSalary: 0,
|
useInEmployeeSalary: 0,
|
||||||
systemType:0,
|
systemType: 0,
|
||||||
roundingMode: "1",
|
roundingMode: "1",
|
||||||
pattern: 0,
|
pattern: 0,
|
||||||
valueType: "1",
|
valueType: "1",
|
||||||
dataType: "number",
|
dataType: "number",
|
||||||
description: ""
|
description: ""
|
||||||
}
|
};
|
||||||
|
|
||||||
@action
|
@action
|
||||||
setRequest = request => this.request = request;
|
setRequest = request => this.request = request;
|
||||||
|
|
@ -81,30 +81,28 @@ export class SalaryItemStore {
|
||||||
@action
|
@action
|
||||||
setSystemItemVisible = systemItemVisible => this.systemItemVisible = systemItemVisible;
|
setSystemItemVisible = systemItemVisible => this.systemItemVisible = systemItemVisible;
|
||||||
|
|
||||||
// 初始化操作
|
// 存储分页以及关键字信息
|
||||||
@action
|
@action
|
||||||
doInit = () => {
|
setPageInfo = (pageInfo) => this.pageInfo = {...this.pageInfo,...pageInfo};
|
||||||
this.getTableDatas({});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 渲染table数据
|
// 渲染table数据
|
||||||
@action
|
@action
|
||||||
getTableDatas = (params) => {
|
getTableDatas = (params) => {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
return new Promise((resolve, reject)=>{
|
||||||
API.getItemList(params).then(action(res => {
|
API.getItemList({...params, ...this.pageInfo}).then(action(res => {
|
||||||
if (res.status) { // 接口请求成功/失败处理
|
this.loading = false;
|
||||||
this.tableDataSource = res.data.list
|
if (res.status) { // 接口请求成功/失败处理
|
||||||
this.tableColumns = res.data.columns
|
this.tableDataSource = res.data.list;
|
||||||
this.pageInfo = res.data
|
this.tableColumns = res.data.columns;
|
||||||
// this.tableStore.getDatas(res.data.datas); // table 请求数据
|
resolve(res.data);
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || '接口调用失败!')
|
message.error(res.errormsg || "接口调用失败!");
|
||||||
}
|
reject();
|
||||||
this.loading = false;
|
}
|
||||||
}));
|
}));
|
||||||
|
})
|
||||||
}
|
};
|
||||||
|
|
||||||
@action
|
@action
|
||||||
setShowSearchAd = bool => this.showSearchAd = bool;
|
setShowSearchAd = bool => this.showSearchAd = bool;
|
||||||
|
|
@ -113,13 +111,13 @@ export class SalaryItemStore {
|
||||||
@action doSearch = () => {
|
@action doSearch = () => {
|
||||||
this.getTableDatas();
|
this.getTableDatas();
|
||||||
this.showSearchAd = false;
|
this.showSearchAd = false;
|
||||||
}
|
};
|
||||||
|
|
||||||
// 薪资项目-系统薪资项目列表
|
// 薪资项目-系统薪资项目列表
|
||||||
@action
|
@action
|
||||||
formulaDatasourceList = () => {
|
formulaDatasourceList = () => {
|
||||||
return API.formulaDatasourceList();
|
return API.formulaDatasourceList();
|
||||||
}
|
};
|
||||||
|
|
||||||
// 薪资项目-系统薪资项目列表
|
// 薪资项目-系统薪资项目列表
|
||||||
@action
|
@action
|
||||||
|
|
@ -128,55 +126,55 @@ export class SalaryItemStore {
|
||||||
if (res.status) { // 接口请求成功/失败处理
|
if (res.status) { // 接口请求成功/失败处理
|
||||||
this.sysListTableStore.getDatas(res.data.datas); // table 请求数据
|
this.sysListTableStore.getDatas(res.data.datas); // table 请求数据
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || '接口调用失败!')
|
message.error(res.errormsg || "接口调用失败!");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//薪资项目-添加系统薪资项目
|
//薪资项目-添加系统薪资项目
|
||||||
@action
|
@action
|
||||||
saveSysItem = () => {
|
saveSysItem = () => {
|
||||||
let ids = toJS(this.sysListTableStore.selectedRowKeys)
|
let ids = toJS(this.sysListTableStore.selectedRowKeys);
|
||||||
if(ids.length == 0) {
|
if (ids.length == 0) {
|
||||||
message.warning("未选择任何条目");
|
message.warning("未选择任何条目");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
API.saveSysItem(ids).then(res => {
|
API.saveSysItem(ids).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.setSystemItemVisible(false)
|
this.setSystemItemVisible(false);
|
||||||
this.getTableDatas({});
|
this.getTableDatas({});
|
||||||
message.success("添加成功")
|
message.success("添加成功");
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || '添加失败')
|
message.error(res.errormsg || "添加失败");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//薪资项目-薪资项目详情
|
//薪资项目-薪资项目详情
|
||||||
@action
|
@action
|
||||||
getItemForm = (id) => {
|
getItemForm = (id) => {
|
||||||
API.getItemForm({id}).then(res => {
|
API.getItemForm({ id }).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
Object.keys(data).map(key => {
|
Object.keys(data).map(key => {
|
||||||
if(data[key]) {
|
if (data[key]) {
|
||||||
data[key] = data[key].toString()
|
data[key] = data[key].toString();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.request = data;
|
this.request = data;
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || '获取失败')
|
message.error(res.errormsg || "获取失败");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 对象值转string
|
// 对象值转string
|
||||||
convertToString(data) {
|
convertToString(data) {
|
||||||
Object.keys(data).map(k => {
|
Object.keys(data).map(k => {
|
||||||
if(typeof(data[k]) == "number") {
|
if (typeof (data[k]) == "number") {
|
||||||
data[k] = data[k].toString();
|
data[k] = data[k].toString();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -184,167 +182,172 @@ export class SalaryItemStore {
|
||||||
@action
|
@action
|
||||||
deleteItemList = (params) => {
|
deleteItemList = (params) => {
|
||||||
API.deleteItemList(params).then(res => {
|
API.deleteItemList(params).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.deleteTableStore.getDatas(res.data.datas)
|
this.deleteTableStore.getDatas(res.data.datas);
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败")
|
message.error(res.errormsg || "获取失败");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//薪资项目-批量删除薪资项目
|
//薪资项目-批量删除薪资项目
|
||||||
@action
|
@action
|
||||||
deleteItem = (ids) => {
|
deleteItem = (ids) => {
|
||||||
if(ids.length == 0) {
|
if (ids.length == 0) {
|
||||||
message.warning("未选择任何条目");
|
message.warning("未选择任何条目");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.deleteItemRequest(ids)
|
this.deleteItemRequest(ids);
|
||||||
}
|
};
|
||||||
|
|
||||||
@action
|
@action
|
||||||
deleteItemRequest = (ids) => {
|
deleteItemRequest = (ids) => {
|
||||||
API.deleteItem(ids).then(res => {
|
return new Promise((resolve, reject)=>{
|
||||||
if(res.status) {
|
API.deleteItem(ids).then(res => {
|
||||||
this.deleteItemVisible = false;
|
if (res.status) {
|
||||||
this.getTableDatas({})
|
this.deleteItemVisible = false;
|
||||||
message.success("删除成功")
|
message.success("删除成功");
|
||||||
} else {
|
resolve();
|
||||||
message.error(res.errormsg || "删除失败")
|
} else {
|
||||||
}
|
message.error(res.errormsg || "删除失败");
|
||||||
|
reject();
|
||||||
|
}
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}
|
};
|
||||||
|
|
||||||
validateForm(params) {
|
validateForm(params) {
|
||||||
if(!notNull(params.name)) {
|
if (!notNull(params.name)) {
|
||||||
message.warning("名称不能为空")
|
message.warning("名称不能为空");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!notNull(params.dataType)) {
|
if (!notNull(params.dataType)) {
|
||||||
message.warning("字段类型不能为空")
|
message.warning("字段类型不能为空");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!notNull(params.roundingMode)) {
|
if (!notNull(params.roundingMode)) {
|
||||||
message.warning("舍入规则不能为空")
|
message.warning("舍入规则不能为空");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!notNull(params.pattern)) {
|
if (!notNull(params.pattern)) {
|
||||||
message.warning("保留小数位不能为空")
|
message.warning("保留小数位不能为空");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!notNull(params.valueType)) {
|
if (!notNull(params.valueType)) {
|
||||||
message.warning("取值方式不能为空")
|
message.warning("取值方式不能为空");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((params.valueType == 2 || params.valueType == 3) && !notNull(params.formulaId)) {
|
if ((params.valueType == 2 || params.valueType == 3) && !notNull(params.formulaId)) {
|
||||||
message.warning("公式不能为空")
|
message.warning("公式不能为空");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//薪资项目-新增薪资项目
|
//薪资项目-新增薪资项目
|
||||||
@action
|
@action
|
||||||
saveItem = (params, continueFlag, searchParams = {}) => {
|
saveItem = (params, continueFlag) => {
|
||||||
|
return new Promise((resolve, reject)=>{
|
||||||
if(!this.validateForm(params)) {
|
if (!this.validateForm(params)) {
|
||||||
return
|
return;
|
||||||
}
|
|
||||||
API.saveItem(params).then(res => {
|
|
||||||
if(res.status) {
|
|
||||||
if(!continueFlag) {
|
|
||||||
this.editSlideVisible = false;
|
|
||||||
}
|
|
||||||
this.initRequest();
|
|
||||||
this.getTableDatas(searchParams);
|
|
||||||
message.success("保存成功")
|
|
||||||
} else {
|
|
||||||
message.error(res.errormsg || "保存失败")
|
|
||||||
}
|
}
|
||||||
|
API.saveItem(params).then(res => {
|
||||||
|
if (res.status) {
|
||||||
|
if (!continueFlag) {
|
||||||
|
this.editSlideVisible = false;
|
||||||
|
}
|
||||||
|
this.initRequest();
|
||||||
|
message.success("保存成功");
|
||||||
|
resolve();
|
||||||
|
} else {
|
||||||
|
message.error(res.errormsg || "保存失败");
|
||||||
|
reject();
|
||||||
|
}
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}
|
};
|
||||||
|
|
||||||
// 获取公式变量类型
|
// 获取公式变量类型
|
||||||
@action
|
@action
|
||||||
salaryAcctImportTemplateParam = (params = {}) => {
|
salaryAcctImportTemplateParam = (params = {}) => {
|
||||||
API.formualSearchGroup(params).then(res => {
|
API.formualSearchGroup(params).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.searchGroup = res.data
|
this.searchGroup = res.data;
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败")
|
message.error(res.errormsg || "获取失败");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 获取公式变量字段
|
// 获取公式变量字段
|
||||||
@action
|
@action
|
||||||
formualSearchField = (sourceId, params = {}) => {
|
formualSearchField = (sourceId, params = {}) => {
|
||||||
API.formualSearchField({sourceId, ...params}).then(res => {
|
API.formualSearchField({ sourceId, ...params }).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.searchFields = res.data
|
this.searchFields = res.data;
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败")
|
message.error(res.errormsg || "获取失败");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 保存公式
|
// 保存公式
|
||||||
@action
|
@action
|
||||||
saveFormual = (params) => {
|
saveFormual = (params) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
API.saveFormual(params).then(res => {
|
API.saveFormual(params).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
message.success("保存成功");
|
message.success("保存成功");
|
||||||
resolve(res.data)
|
resolve(res.data);
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "保存失败");
|
message.error(res.errormsg || "保存失败");
|
||||||
reject()
|
reject();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
// 根据id获取formual
|
// 根据id获取formual
|
||||||
@action
|
@action
|
||||||
detailFormual = (formulaId) => {
|
detailFormual = (formulaId) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
API.detailFormual({formulaId}).then(res => {
|
API.detailFormual({ formulaId }).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
this.formulaDetail = res.data
|
this.formulaDetail = res.data;
|
||||||
resolve(res.data)
|
resolve(res.data);
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败")
|
message.error(res.errormsg || "获取失败");
|
||||||
reject()
|
reject();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 获取可以删除的列表
|
// 获取可以删除的列表
|
||||||
@action
|
@action
|
||||||
listCanDelete = (params = {}) => {
|
listCanDelete = (params = {}) => {
|
||||||
this.modalLoading = true;
|
this.modalLoading = true;
|
||||||
API.listCanDelete(params).then(res => {
|
API.listCanDelete(params).then(res => {
|
||||||
if(res.status) {
|
if (res.status) {
|
||||||
let data = res.data
|
let data = res.data;
|
||||||
if(res.data.list && res.data.list.length > 0) {
|
if (res.data.list && res.data.list.length > 0) {
|
||||||
data.list = res.data.list.map(item => {
|
data.list = res.data.list.map(item => {
|
||||||
item = {...item}
|
item = { ...item };
|
||||||
item.key = item.id
|
item.key = item.id;
|
||||||
return item
|
return item;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
this.canDeleteList = data
|
this.canDeleteList = data;
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "获取失败")
|
message.error(res.errormsg || "获取失败");
|
||||||
}
|
}
|
||||||
this.modalLoading = false;
|
this.modalLoading = false;
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -110,22 +110,11 @@ export const renderNoData = () => (
|
||||||
</WeaAlertPage>
|
</WeaAlertPage>
|
||||||
)
|
)
|
||||||
|
|
||||||
//动态计算表格高度
|
//分页计算
|
||||||
export function getTableScroll({ extraHeight, id }) {
|
export function calcPageNo (total, pageNo = 1, pageSize = 10, selectDelDataLen = 1) {
|
||||||
if (typeof extraHeight == "undefined") {
|
const totalPage = Math.ceil((total - selectDelDataLen) / pageSize) // 总页数
|
||||||
// 默认底部分页64 + 边距10
|
pageNo = pageNo > totalPage ? totalPage : pageNo
|
||||||
extraHeight = 64
|
pageNo = pageNo < 1 ? 1 : pageNo
|
||||||
}
|
return pageNo
|
||||||
let tHeader = null
|
|
||||||
if (id) {
|
|
||||||
tHeader = document.getElementById(id) ? document.getElementById(id).getElementsByClassName("ant-table-thead")[0] : null
|
|
||||||
} else {
|
|
||||||
tHeader = document.getElementsByClassName("ant-table-thead")[0]
|
|
||||||
}
|
|
||||||
//表格内容距离顶部的距离
|
|
||||||
let tHeaderBottom = 0
|
|
||||||
if (tHeader) {
|
|
||||||
tHeaderBottom = tHeader.getBoundingClientRect().bottom
|
|
||||||
}
|
|
||||||
return `calc(100vh - ${tHeaderBottom + extraHeight}px)`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,18 +7,18 @@
|
||||||
// return null;
|
// return null;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
export const getQueryString = (variable) => {
|
export const getQueryString = (variable) => {
|
||||||
let split = window.location.hash.split("?");
|
let split = window.location.hash.split("?");
|
||||||
if(split.length <= 1) {
|
if (split.length <= 1) {
|
||||||
return null;
|
|
||||||
}
|
|
||||||
var query = split[1];
|
|
||||||
var vars = query.split("&");
|
|
||||||
for (var i=0;i<vars.length;i++) {
|
|
||||||
var pair = vars[i].split("=");
|
|
||||||
if(pair[0] == variable){
|
|
||||||
return pair[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
var query = split[1];
|
||||||
|
var vars = query.split("&");
|
||||||
|
for (var i = 0; i < vars.length; i++) {
|
||||||
|
var pair = vars[i].split("=");
|
||||||
|
if (pair[0] == variable) {
|
||||||
|
return pair[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue