社保福利台账添加线下对比的页面功能
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 { Icon } from 'antd'
|
||||
import closeIcon from './close.png'
|
||||
import React from "react";
|
||||
import { Icon } from "antd";
|
||||
|
||||
export default class CanDeleteItem extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
showDelete: false
|
||||
}
|
||||
}
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
showDelete: false
|
||||
};
|
||||
}
|
||||
|
||||
handleMouseOver() {
|
||||
this.setState({showDelete: true})
|
||||
}
|
||||
handleMouseOver() {
|
||||
this.setState({ showDelete: true });
|
||||
}
|
||||
|
||||
handelMouseout() {
|
||||
setTimeout(() => {
|
||||
this.setState({showDelete: false})
|
||||
}, 400)
|
||||
}
|
||||
|
||||
render() {
|
||||
const { title } = this.props;
|
||||
return (
|
||||
<div style={{display: "inline-block", paddingLeft: "10px", paddingRight: '10px'}} 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)}/>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
handelMouseout() {
|
||||
setTimeout(() => {
|
||||
this.setState({ showDelete: false });
|
||||
}, 400);
|
||||
}
|
||||
|
||||
render() {
|
||||
const { title } = this.props;
|
||||
return (
|
||||
<div style={{ display: "inline-block", paddingLeft: "10px", paddingRight: "10px" }}
|
||||
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)}/>
|
||||
{/*}*/}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ export default class ImportModal extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { step, slideDataSource, isInit, isStandingBook } = this.props;
|
||||
const { step, slideDataSource, isInit, isStandingBook, params,needimportSelected } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
title="数据导入" visible={this.props.visiable}
|
||||
|
|
@ -135,6 +135,8 @@ export default class ImportModal extends React.Component {
|
|||
templateLink={this.props.templateLink}
|
||||
headerSetCompoent={this.props.headerSetCompoent}
|
||||
formComponent={this.props.renderFormComponent && this.props.renderFormComponent()}
|
||||
needimportSelected={needimportSelected} //下载模板需要带上导入所选项
|
||||
params={params}
|
||||
onFileIdChange={(fileId) => {
|
||||
this.setState({ fileId });
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import { WeaCheckbox } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, Icon, Upload } from "antd";
|
||||
import { Button, Icon, Upload, message } from "antd";
|
||||
|
||||
const Dragger = Upload.Dragger;
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ export default class ModalStep1 extends React.Component {
|
|||
|
||||
render() {
|
||||
const { datetime, taxAgentId, hasData } = this.state;
|
||||
const { taxAgentStore: { taxAgentOption }, isInit } = this.props;
|
||||
const { taxAgentStore: { taxAgentOption }, isInit, needimportSelected, params } = this.props;
|
||||
let downloadExtra = "";
|
||||
if (isInit) {
|
||||
downloadExtra = hasData === "1" ? `&hasData=true` : `&hasData=false`;
|
||||
|
|
@ -110,7 +110,28 @@ export default class ModalStep1 extends React.Component {
|
|||
<p>1. 第一步,请选择导出的Excel文件或
|
||||
{
|
||||
(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={() => {
|
||||
this.props.templateLink(hasData === "1" ? `true` : `false`);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export default class SlideModalTitle extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { selectedTab, tabs, subtitle, customOperate, subItemChange } = this.props;
|
||||
const { selectedTab, tabs, subtitle, customOperate, subItemChange, loading = false } = this.props;
|
||||
return <div className="reqTopWrapper">
|
||||
<WeaReqTop
|
||||
title={subtitle}
|
||||
|
|
@ -25,48 +25,14 @@ export default class SlideModalTitle extends React.Component {
|
|||
icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D"
|
||||
buttons={(this.props.showOperateBtn && this.state.editable && this.props.selectedTab != 1) ? [
|
||||
<Button type="primary" className="saveBtn" onClick={this.props.onSave}>保存</Button>
|
||||
] : !_.isEmpty(customOperate) ? customOperate: []}
|
||||
<Button type="primary" className="saveBtn" onClick={this.props.onSave} loading={loading}>保存</Button>
|
||||
] : !_.isEmpty(customOperate) ? customOperate : []}
|
||||
showDropIcon={false}
|
||||
dropMenuDatas={[]}
|
||||
tabDatas={tabs || []}
|
||||
selectedKey={String(selectedTab) || ""}
|
||||
onChange={ key => subItemChange(key) }
|
||||
onChange={key => subItemChange(key)}
|
||||
/>
|
||||
</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 StandingBook from "./pages/socialSecurityBenefits/standingBook";
|
||||
import StandingBookDetail from "./pages/socialSecurityBenefits/standingBookDetail";
|
||||
import StandingBookOfflineComparison from "./pages/socialSecurityBenefits/standingBookOfflineComparison";
|
||||
import SalaryItem from "./pages/salaryItem";
|
||||
import SalaryFile from "./pages/salaryFile";
|
||||
import CumDeduct from "./pages/dataAcquisition/cumDeduct";
|
||||
|
|
@ -27,6 +28,8 @@ import GenerateDeclarationDetail from "./pages/declare/generateDeclarationDetail
|
|||
import TemplatePreview from "./pages/payroll/templatePreview";
|
||||
import MobilePayroll from './pages/mobilePayroll';
|
||||
import SysConfig from './pages/sysConfig';
|
||||
import RuleConfig from './pages/ruleConfig';
|
||||
import Appconfig from './pages/appConfig';
|
||||
|
||||
import stores from "./stores";
|
||||
import "./style/index";
|
||||
|
|
@ -49,6 +52,7 @@ const DataAcquisition = (props) => props.children;
|
|||
// programme 社保福利方案
|
||||
// archives 社保福利档案
|
||||
// standingBook 社保福利台账
|
||||
// sbofflineComparison 社保福利台账线下对比
|
||||
// salaryItem 薪资项目管理
|
||||
// salaryFile 薪资档案
|
||||
// dataAcquisition 数据采集
|
||||
|
|
@ -68,6 +72,8 @@ const DataAcquisition = (props) => props.children;
|
|||
// taxAgent 个税扣缴义务人
|
||||
// mobilepayroll 移动端工资单
|
||||
// sysconfig 系統配置
|
||||
// sysconfig-1 规则配置
|
||||
// appconfig 应用配置
|
||||
|
||||
const Routes = (
|
||||
<Route
|
||||
|
|
@ -88,6 +94,11 @@ const Routes = (
|
|||
path="standingBookDetail"
|
||||
component={StandingBookDetail}
|
||||
/>
|
||||
<Route
|
||||
key="sbofflineComparison"
|
||||
path="sbofflineComparison"
|
||||
component={StandingBookOfflineComparison}
|
||||
/>
|
||||
</Route>
|
||||
<Route key="salaryItem" path="salaryItem" component={SalaryItem} />
|
||||
<Route key="salaryFile" path="salaryFile" component={SalaryFile} />
|
||||
|
|
@ -133,6 +144,8 @@ const Routes = (
|
|||
<Route key="taxAgent" path="taxAgent" component={TaxAgent} />
|
||||
<Route key="mobilepayroll" path="mobilepayroll" component={MobilePayroll} />
|
||||
<Route key="sysconfig" path="sysconfig" component={SysConfig} />
|
||||
<Route key="sysconfig-1" path="sysconfig-1" component={RuleConfig} />
|
||||
<Route key="appconfig" path="appconfig" component={Appconfig} />
|
||||
</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() {
|
||||
const { isStandingBook } = this.props;
|
||||
const { isStandingBook, standingBookTabKey } = this.props;
|
||||
let url = "";
|
||||
if (_.isEmpty(this.state.modalParam.salaryItemIds)) {
|
||||
message.warning("请选择表单字段");
|
||||
|
|
@ -46,7 +46,13 @@ export default class AcctResultImportModal extends React.Component {
|
|||
if (!isStandingBook) {
|
||||
url = `${window.location.origin}/api/bs/hrmsalary/salaryacct/acctresult/importtemplate/export?salaryItemIds=${this.state.modalParam.salaryItemIds}&salaryAcctRecordId=${this.state.modalParam.salaryAcctRecordId}`;
|
||||
} 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");
|
||||
}
|
||||
|
|
@ -77,7 +83,8 @@ export default class AcctResultImportModal extends React.Component {
|
|||
|
||||
// 渲染第一步表单
|
||||
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={() => {
|
||||
this.handleSelectedField();
|
||||
}}>请选择表单字段</Button>
|
||||
|
|
|
|||
|
|
@ -37,19 +37,6 @@ export default class CompareDetail extends React.Component {
|
|||
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) {
|
||||
let newColumns = [...columns];
|
||||
newColumns.map(item => {
|
||||
|
|
@ -61,7 +48,7 @@ export default class CompareDetail extends React.Component {
|
|||
<div>系统值:{record[item.dataIndex].acctResultValue}</div>
|
||||
<div>线下值:{record[item.dataIndex].excelResultValue}</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>
|
||||
);
|
||||
};
|
||||
|
|
@ -156,7 +143,7 @@ export default class CompareDetail extends React.Component {
|
|||
// 导出
|
||||
handleExportClick() {
|
||||
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" }}>
|
||||
<Button type="primary" style={{ marginRight: "10px" }} onClick={() => this.handleImportClick()}>导入</Button>
|
||||
<Button type="default" style={{ marginRight: "10px" }} onClick={() => this.handleExportClick()}>导出</Button>
|
||||
<WeaInputSearch value={searchValue} onChange={(value) => {
|
||||
<WeaInputSearch value={searchValue} placeholder="请输入姓名" onChange={(value) => {
|
||||
this.setState({
|
||||
searchValue: value
|
||||
});
|
||||
|
|
@ -231,7 +218,7 @@ export default class CompareDetail extends React.Component {
|
|||
loading={loading}
|
||||
dataSource={comparisonResultPageInfo.list ? comparisonResultPageInfo.list : []}
|
||||
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}
|
||||
current={comparisonResultPageInfo.pageNum}
|
||||
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() {
|
||||
window.open(
|
||||
"/api/bs/hrmsalary/salaryacct/comparisonresult/importtemplate/export?salaryAcctRecordId=" + this.props.id
|
||||
);
|
||||
let url="";
|
||||
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
|
||||
isSingle={false}
|
||||
value={key === "departmentIds" ? departmentIds : key === "subcompanyIds" ? subcompanyIds : positionIds}
|
||||
tabs={key === "departmentIds" ? [
|
||||
{
|
||||
dataParams: { list: "1" },
|
||||
isSearch: true,
|
||||
key: "1",
|
||||
name: "按列表",
|
||||
selected: false,
|
||||
showOrder: 0
|
||||
}
|
||||
] : null}
|
||||
// tabs={key === "departmentIds" ? [
|
||||
// {
|
||||
// dataParams: { list: "1" },
|
||||
// isSearch: true,
|
||||
// key: "1",
|
||||
// name: "按列表",
|
||||
// selected: false,
|
||||
// showOrder: 0
|
||||
// }
|
||||
// ] : null}
|
||||
type={key === "departmentIds" ? 57 : key === "subcompanyIds" ? 164 : 278}
|
||||
onChange={(val) => {
|
||||
this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } });
|
||||
|
|
@ -90,9 +90,7 @@ export default class CalculateDetail extends React.Component {
|
|||
);
|
||||
};
|
||||
Select = (value, key) => {
|
||||
const { salaryFileStore } = this.props;
|
||||
const { status } = this.state.searchItemsValue;
|
||||
const { userStatusList } = salaryFileStore;
|
||||
return (
|
||||
<WeaFormItem
|
||||
label={value}
|
||||
|
|
@ -101,7 +99,10 @@ export default class CalculateDetail extends React.Component {
|
|||
>
|
||||
<WeaSelect
|
||||
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 } })}/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@
|
|||
}
|
||||
|
||||
.compareDetail {
|
||||
overflow-y: auto;
|
||||
overflow-y: hidden;
|
||||
height: 100%;
|
||||
|
||||
.tabWrapper {
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ export default class SalaryDetail extends React.Component {
|
|||
<div className="tableWrapper">
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/atdTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/atdTable"
|
||||
id="atdTable"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -68,16 +68,16 @@ export default class UserSure extends React.Component {
|
|||
<WeaBrowser
|
||||
isSingle={false}
|
||||
value={key === "departmentIds" ? departmentIds : positionIds}
|
||||
tabs={key === "departmentIds" ? [
|
||||
{
|
||||
dataParams: { list: "1" },
|
||||
isSearch: true,
|
||||
key: "1",
|
||||
name: "按列表",
|
||||
selected: false,
|
||||
showOrder: 0
|
||||
}
|
||||
] : null}
|
||||
// tabs={key === "departmentIds" ? [
|
||||
// {
|
||||
// dataParams: { list: "1" },
|
||||
// isSearch: true,
|
||||
// key: "1",
|
||||
// name: "按列表",
|
||||
// selected: false,
|
||||
// showOrder: 0
|
||||
// }
|
||||
// ] : null}
|
||||
type={key === "departmentIds" ? 57 : 278}
|
||||
onChange={(val) => {
|
||||
this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } });
|
||||
|
|
@ -86,9 +86,7 @@ export default class UserSure extends React.Component {
|
|||
);
|
||||
};
|
||||
Select = (value, key) => {
|
||||
const { salaryFileStore } = this.props;
|
||||
const { status } = this.state.searchItemsValue;
|
||||
const { userStatusList } = salaryFileStore;
|
||||
return (
|
||||
<WeaFormItem
|
||||
label={value}
|
||||
|
|
@ -97,7 +95,10 @@ export default class UserSure extends React.Component {
|
|||
>
|
||||
<WeaSelect
|
||||
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 } })}/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
|
|
@ -152,7 +153,7 @@ export default class UserSure extends React.Component {
|
|||
const payload = {
|
||||
type: "PC",
|
||||
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: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
|
|
@ -197,8 +198,10 @@ export default class UserSure extends React.Component {
|
|||
let url = "";
|
||||
if (this.state.selectedKey == 0) {
|
||||
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}`;
|
||||
} else {
|
||||
url = `${window.location.origin}/api/bs/hrmsalary/salaryacct/addedemployee/export?salaryAcctRecordId=${this.id}`;
|
||||
}
|
||||
window.open(url, "_self");
|
||||
}
|
||||
|
|
@ -470,6 +473,36 @@ export default class UserSure extends React.Component {
|
|||
title="提示:环比上期当前选择的账套归档的各个税扣缴义务人下减少的人员"
|
||||
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 className="crumbsOperateWrapper">
|
||||
<WeaTab
|
||||
|
|
|
|||
|
|
@ -508,6 +508,7 @@ export default class Attendance extends React.Component {
|
|||
onChange={value => {
|
||||
this.setState({ fieldName: value });
|
||||
}}
|
||||
placeholder="请输入字段名称"
|
||||
onSearch={value => {
|
||||
this.setState({ fieldSettingSearchValue: value });
|
||||
handleItemSearch(value);
|
||||
|
|
|
|||
|
|
@ -534,6 +534,7 @@ export default class CumDeduct extends React.Component {
|
|||
</WeaRightMenu>
|
||||
{modalVisiable && (
|
||||
<ImportModal
|
||||
needimportSelected //下载模板需要带上导入所选项
|
||||
init={() => {
|
||||
this.handleInitModal();
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -182,7 +182,6 @@ export default class OtherDeduct extends React.Component {
|
|||
|
||||
renderFormComponent() {
|
||||
const { modalParam } = this.state;
|
||||
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||
return (
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
|
|
@ -295,7 +294,10 @@ export default class OtherDeduct extends React.Component {
|
|||
};
|
||||
const adBtn = [
|
||||
// 高级搜索内部按钮
|
||||
<Button type="primary" onClick={doSearch}>
|
||||
<Button type="primary" onClick={()=>doSearch({
|
||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId,
|
||||
declareMonth: monthValue && [monthValue]
|
||||
})}>
|
||||
搜索
|
||||
</Button>,
|
||||
<Button type="ghost" onClick={() => form.resetForm()}>
|
||||
|
|
@ -504,6 +506,7 @@ export default class OtherDeduct extends React.Component {
|
|||
</WeaRightMenu>
|
||||
{modalVisiable &&
|
||||
<ImportModal
|
||||
needimportSelected //下载模板需要带上导入所选项
|
||||
init={() => {
|
||||
this.handleInitImport();
|
||||
}}
|
||||
|
|
@ -515,7 +518,10 @@ export default class OtherDeduct extends React.Component {
|
|||
onFinish={() => {
|
||||
setModalVisiable(false);
|
||||
setStep(0);
|
||||
doSearch();
|
||||
doSearch({
|
||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId,
|
||||
declareMonth: monthValue && [monthValue]
|
||||
});
|
||||
}}
|
||||
importResult={importResult}
|
||||
slideDataSource={slideDataSource}
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ export default class GenerateDeclarationDetail extends React.Component {
|
|||
|
||||
// 导出
|
||||
handleExport() {
|
||||
const { declareStore: { exportSalaryArchive } } = this.props;
|
||||
exportSalaryArchive(this.id);
|
||||
const url = `${window.location.origin}/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=${this.id}`;
|
||||
window.open(url, "_self");
|
||||
}
|
||||
|
||||
getColumns() {
|
||||
|
|
@ -106,4 +106,4 @@ export default class GenerateDeclarationDetail extends React.Component {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ export default class AddUserModal extends React.Component {
|
|||
};
|
||||
}
|
||||
|
||||
onRadioChange(e) {
|
||||
this.setState({ radioValue: e.target.value });
|
||||
onRadioChange(radioValue) {
|
||||
this.setState({ radioValue });
|
||||
}
|
||||
|
||||
// 保存
|
||||
|
|
|
|||
|
|
@ -180,6 +180,7 @@ export default class Ledger extends React.Component {
|
|||
const { ledgerStore, taxAgentStore } = this.props;
|
||||
const {
|
||||
loading,
|
||||
saveLoading,
|
||||
dataSource,
|
||||
columns,
|
||||
pageObj,
|
||||
|
|
@ -530,6 +531,7 @@ export default class Ledger extends React.Component {
|
|||
{ title: "调薪计薪规则", key: 3 }
|
||||
// { title: "校验规则", key: 4 }
|
||||
]}
|
||||
loading={saveLoading}
|
||||
showOperateBtn={showOperateBtn}
|
||||
editable={canEdit === "true"}
|
||||
selectedTab={selectedTab}
|
||||
|
|
|
|||
|
|
@ -119,6 +119,13 @@
|
|||
padding: 10px;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.wea-sortable-grid-item{
|
||||
display: inline-block;
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.tableItemWrapper {
|
||||
|
|
|
|||
|
|
@ -148,10 +148,10 @@ export default class SalaryItemForm extends React.Component {
|
|||
<div className="userInfoWrapper">
|
||||
<div>
|
||||
<span>
|
||||
<span>员工信息</span>
|
||||
<span>员工基本信息</span>
|
||||
<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={100}
|
||||
width={200}
|
||||
title="姓名、部门、个税扣缴义务人为必须项,不可删除"
|
||||
placement="topLeft"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ export default class SlideBaseForm extends React.Component {
|
|||
</Col>
|
||||
<Col span={18}>
|
||||
<WeaSelect
|
||||
disabled={canEdit !== "true"}
|
||||
disabled={edit}
|
||||
options={[
|
||||
{
|
||||
key: "1",
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ export default class AddSalaryItemModal extends React.Component {
|
|||
}}/>
|
||||
</div>
|
||||
|
||||
<div style={{ height: "100%", overflowY: "scroll" }}>
|
||||
<div style={{ height: "calc(100% - 68px)", overflowY: "scroll" }}>
|
||||
<CustomTable
|
||||
loading={loading}
|
||||
dataSource={addSalaryItemDataSource}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import React from "react";
|
||||
import { Icon, message } from "antd";
|
||||
import { WeaSelect } from "ecCom";
|
||||
import { WeaSelect, WeaSortable } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import CanDeleteItem from "../../../components/canDeleteItem";
|
||||
|
||||
@inject("ledgerStore")
|
||||
|
|
@ -41,7 +42,6 @@ export default class UserInfoSelected extends React.Component {
|
|||
const { ledgerStore: { empFields, addEmpFields, setUserSelectedList } } = this.props;
|
||||
addEmpFields(value);
|
||||
this.setState({ showSelect: false });
|
||||
|
||||
}
|
||||
|
||||
handleItemDelete(item) {
|
||||
|
|
@ -62,19 +62,25 @@ export default class UserInfoSelected extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { ledgerStore: { empBrowserList, userSelectedList } } = this.props;
|
||||
const { ledgerStore: { empBrowserList, userSelectedList, setUserSelectedList } } = this.props;
|
||||
const list = _.map(toJS(userSelectedList), it => ({ ...it }));
|
||||
return (
|
||||
<div className="userInfoSelected">
|
||||
{
|
||||
userSelectedList.map(item => (
|
||||
<CanDeleteItem title={item.showname} item={item} onDelete={(item) => {
|
||||
<WeaSortable
|
||||
datas={list}
|
||||
draggableType="icon"
|
||||
onChange={(list) => setUserSelectedList(list)}
|
||||
renderNodeItem={(item) => {
|
||||
return <CanDeleteItem title={item.showname} item={item} onDelete={(item) => {
|
||||
this.handleItemDelete(item);
|
||||
}}/>
|
||||
))
|
||||
}
|
||||
<Icon type="plus" style={{ marginLeft: "10px", marginRight: "10px", cursor: "pointer" }} onClick={() => {
|
||||
this.setState({ showSelect: true });
|
||||
}}/>
|
||||
}}/>;
|
||||
}}
|
||||
className="wea-sortable-grid-item"
|
||||
/>
|
||||
<Icon type="plus" style={{ marginLeft: "10px", marginRight: "10px", cursor: "pointer" }} title="新增"
|
||||
onClick={() => {
|
||||
this.setState({ showSelect: true });
|
||||
}}/>
|
||||
{
|
||||
this.state.showSelect && empBrowserList.length > 0 &&
|
||||
<WeaSelect showSearch options={empBrowserList}
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ import { WeaDialog, WeaTable } from "ecCom";
|
|||
@observer
|
||||
export default class PreviewSalaryModal extends React.Component {
|
||||
getColumns() {
|
||||
const { ledgerStore: { empFields, itemGroups } } = this.props;
|
||||
const { ledgerStore: { userSelectedList, itemGroups } } = this.props;
|
||||
let columns = [];
|
||||
let length = 0;
|
||||
|
||||
empFields.map(item => {
|
||||
userSelectedList.map(item => {
|
||||
columns.push({
|
||||
title: item.fieldName,
|
||||
key: item.fieldId,
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ export default class SalarySendList extends React.Component {
|
|||
key: "moreOperate",
|
||||
dataIndex: "moreOperate",
|
||||
render: (text, record) => {
|
||||
const {sendNum,sendTotal}= record;
|
||||
return (
|
||||
<Dropdown
|
||||
overlay={
|
||||
|
|
@ -113,14 +114,14 @@ export default class SalarySendList extends React.Component {
|
|||
</a>
|
||||
</Menu.Item>
|
||||
|
||||
<Menu.Item>
|
||||
{sendNum!==sendTotal &&<Menu.Item>
|
||||
<a
|
||||
onClick={() => {
|
||||
this.handleUpdateTemplate(record);
|
||||
}}>
|
||||
更新模板
|
||||
</a>
|
||||
</Menu.Item>
|
||||
</Menu.Item>}
|
||||
</Menu>
|
||||
}>
|
||||
<i className="icon-coms-more" />
|
||||
|
|
@ -151,7 +152,6 @@ export default class SalarySendList extends React.Component {
|
|||
render() {
|
||||
const { payrollStore } = this.props;
|
||||
const {
|
||||
salarySendTableStore,
|
||||
salarySendDataSource,
|
||||
pageInfo,
|
||||
loading
|
||||
|
|
|
|||
|
|
@ -135,8 +135,9 @@ export default class PayrollDetail extends React.Component {
|
|||
getPayrollDetailList({ salarySendId: this.state.currentId, ...pageInfo });
|
||||
}
|
||||
|
||||
handleSearch() {
|
||||
const { payrollStore: { getPayrollDetailList } } = this.props;
|
||||
handleSearch=()=> {
|
||||
const { payrollStore: { getPayrollDetailList, setDetailListShowSearchAd } } = this.props;
|
||||
setDetailListShowSearchAd(false);
|
||||
getPayrollDetailList({ salarySendId: this.state.currentId, ...this.pageInfo });
|
||||
}
|
||||
|
||||
|
|
@ -153,6 +154,18 @@ export default class PayrollDetail extends React.Component {
|
|||
salarySendDetailDataSource,
|
||||
salarySendDetailPageInfo
|
||||
} = 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 (
|
||||
<div className="payrollGrant">
|
||||
<WeaTop
|
||||
|
|
@ -164,10 +177,11 @@ export default class PayrollDetail extends React.Component {
|
|||
></WeaTop>
|
||||
<WeaTab
|
||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||
searchsBasePlaceHolder="请输入姓名"
|
||||
showSearchAd={detailListShowSearchAd} // 是否展开高级搜索面板
|
||||
setShowSearchAd={bool => setDetailListShowSearchAd(bool)} //高级搜索面板受控
|
||||
searchsAd={getSearchs(detailListConditionForm, toJS(detailListCondition), 2)} // 高级搜索内部数据
|
||||
// buttonsAd={adBtn} // 高级搜索内部按钮
|
||||
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||
onSearch={() => {
|
||||
this.handleSearch();
|
||||
}} // 点搜索按钮时的回调
|
||||
|
|
|
|||
|
|
@ -159,8 +159,7 @@ export default class PayrollGrant extends React.Component {
|
|||
{/* <Menu.Item key="3">自定义列</Menu.Item> */}
|
||||
</Menu>
|
||||
);
|
||||
return (
|
||||
<div style={{ display: "inline-block" }}>
|
||||
return [
|
||||
<Button
|
||||
type="primary"
|
||||
style={{ marginRight: "10px" }}
|
||||
|
|
@ -168,7 +167,7 @@ export default class PayrollGrant extends React.Component {
|
|||
this.handleGrantAll();
|
||||
}}>
|
||||
全部发放
|
||||
</Button>
|
||||
</Button>,
|
||||
<Button
|
||||
type="default"
|
||||
style={{ marginRight: "10px" }}
|
||||
|
|
@ -176,12 +175,11 @@ export default class PayrollGrant extends React.Component {
|
|||
this.handleWithdrawAll();
|
||||
}}>
|
||||
全部撤回
|
||||
</Button>
|
||||
</Button>,
|
||||
<Dropdown.Button style={{ marginRight: "10px" }} overlay={menu}>
|
||||
更多
|
||||
</Dropdown.Button>
|
||||
</div>
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
handleExportAll = () => {
|
||||
|
|
@ -221,8 +219,9 @@ export default class PayrollGrant extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
handleSearch() {
|
||||
const { payrollStore: { getInfoList } } = this.props;
|
||||
handleSearch=()=> {
|
||||
const { payrollStore: { getInfoList, setGrantListShowSearchAd } } = this.props;
|
||||
setGrantListShowSearchAd(false);
|
||||
getInfoList({
|
||||
salarySendId: this.state.currentId,
|
||||
...this.pageInfo
|
||||
|
|
@ -252,6 +251,18 @@ export default class PayrollGrant extends React.Component {
|
|||
selectedRowKeys,
|
||||
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 (
|
||||
<div className="payrollGrant_new">
|
||||
<WeaTop
|
||||
|
|
@ -259,11 +270,12 @@ export default class PayrollGrant extends React.Component {
|
|||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
buttons={[this.getSearchsAdQuick()]}
|
||||
buttons={this.getSearchsAdQuick()}
|
||||
/>
|
||||
|
||||
<WeaTab
|
||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||
searchsBasePlaceHolder="请输入姓名"
|
||||
showSearchAd={grantListShowSearchAd} // 是否展开高级搜索面板
|
||||
setShowSearchAd={bool => setGrantListShowSearchAd(bool)} //高级搜索面板受控
|
||||
searchsAd={getSearchs(
|
||||
|
|
@ -271,7 +283,7 @@ export default class PayrollGrant extends React.Component {
|
|||
toJS(grantListCondition),
|
||||
2
|
||||
)} // 高级搜索内部数据
|
||||
// buttonsAd={adBtn} // 高级搜索内部按钮
|
||||
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||
onSearch={() => this.handleSearch()} // 点搜索按钮时的回调
|
||||
// searchsAdQuick={this.getSearchsAdQuick()}
|
||||
onSearchChange={v =>
|
||||
|
|
|
|||
|
|
@ -219,6 +219,7 @@ export default class payrollGrantModal extends React.Component {
|
|||
onChange={value => {
|
||||
this.setState({ searchValue: value });
|
||||
}}
|
||||
placeholder="请输入姓名"
|
||||
onSearch={value => {
|
||||
this.handleSearch(value);
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -214,6 +214,7 @@ export default class PayrollWithdrawModal extends React.Component {
|
|||
</span>
|
||||
</div>
|
||||
<WeaInputSearch
|
||||
placeholder="请输入姓名"
|
||||
value={this.state.searchValue}
|
||||
onChange={value => {
|
||||
this.setState({ searchValue: value });
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export default class ComputerTemplate extends React.Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
if(this.props.isMsgPreview){
|
||||
if(this.props.isMsgPreview && this.props.salaryItemSet){
|
||||
this.setState({
|
||||
salaryItemSet: JSON.parse(this.props.salaryItemSet),
|
||||
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() {
|
||||
const {
|
||||
salaryFileStore: { exportSalaryArchive }
|
||||
} = this.props;
|
||||
exportSalaryArchive();
|
||||
handleExportAll=()=> {
|
||||
let url = `${window.location.origin}/api/bs/hrmsalary/salaryArchive/exportList?ids=`;
|
||||
const { searchItemsValue } = this.state;
|
||||
const fileds= Object.keys(searchItemsValue);
|
||||
_.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("未选择条目");
|
||||
return;
|
||||
}
|
||||
const {
|
||||
salaryFileStore: { exportSalaryArchive }
|
||||
} = this.props;
|
||||
exportSalaryArchive(selectedRowKeys.join(","));
|
||||
// const {
|
||||
// salaryFileStore: { exportSalaryArchive }
|
||||
// } = this.props;
|
||||
// exportSalaryArchive(selectedRowKeys.join(","));
|
||||
const url = `${window.location.origin}/api/bs/hrmsalary/salaryArchive/exportList?ids=${selectedRowKeys.join(",")}`;
|
||||
window.open(url, "_self");
|
||||
};
|
||||
|
||||
const menu = (
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ export default class SalaryItem extends React.Component {
|
|||
editable: false,
|
||||
isAdd: false,
|
||||
searchValue: "",
|
||||
formalModalVisible: false
|
||||
formalModalVisible: false,
|
||||
searchParams: { current: 1, pageSize: 10, total: 0 }
|
||||
};
|
||||
this.searchParams = { current: 1, pageSize: 10 };
|
||||
columns.map(item => {
|
||||
if (item.dataIndex == "refere") {
|
||||
item.render = () => {
|
||||
|
|
@ -49,8 +49,16 @@ export default class SalaryItem extends React.Component {
|
|||
|
||||
|
||||
componentWillMount() { // 初始化渲染页面
|
||||
const { salaryItemStore: { doInit } } = this.props;
|
||||
doInit();
|
||||
const { salaryItemStore: { getTableDatas } } = this.props;
|
||||
getTableDatas({}).then(res => {
|
||||
this.setState({
|
||||
searchParams: {
|
||||
...this.state.searchParams,
|
||||
current: res.pageNum,
|
||||
total: res.total
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
onEditItem(record, isedit) {
|
||||
|
|
@ -63,12 +71,21 @@ export default class SalaryItem extends React.Component {
|
|||
|
||||
// 删除列表项
|
||||
handleDeleteItem(record) {
|
||||
const { salaryItemStore: { deleteItemRequest } } = this.props;
|
||||
const { salaryItemStore: { deleteItemRequest,getTableDatas } } = this.props;
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: "确认删除",
|
||||
onOk: () => {
|
||||
deleteItemRequest([record.id]);
|
||||
deleteItemRequest([record.id]).then(()=>{
|
||||
getTableDatas({...this.state.searchParams}).then(res=>{
|
||||
this.setState({
|
||||
searchParams:{
|
||||
...this.state.searchParams,
|
||||
total: res.total
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
|
|
@ -136,19 +153,33 @@ export default class SalaryItem extends React.Component {
|
|||
|
||||
handleSearch(value) {
|
||||
const { salaryItemStore: { getTableDatas } } = this.props;
|
||||
this.searchParams = { name: value, current: 1 };
|
||||
getTableDatas(this.searchParams);
|
||||
getTableDatas({...this.state.searchParams, name: value}).then(res => {
|
||||
this.setState({
|
||||
searchParams: {
|
||||
...this.state.searchParams,
|
||||
current: 1,
|
||||
total: res.total
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
handlePageChnage(value) {
|
||||
this.searchParams.current = value;
|
||||
handlePageChange(value) {
|
||||
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) {
|
||||
const { salaryItemStore: { getTableDatas } } = this.props;
|
||||
getTableDatas(searchParams);
|
||||
getTableDatas({...searchParams});
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
@ -175,7 +206,6 @@ export default class SalaryItem extends React.Component {
|
|||
if (!hasRight && !loading) { // 无权限处理
|
||||
return renderNoright();
|
||||
}
|
||||
|
||||
const batchDelete = () => {
|
||||
setDeleteItemVisible(true);
|
||||
};
|
||||
|
|
@ -187,12 +217,12 @@ export default class SalaryItem extends React.Component {
|
|||
// content: "显示列定制",
|
||||
// onClick: this.showColumn
|
||||
// },
|
||||
{
|
||||
key: "BTN_DEL",
|
||||
icon: <i className="icon-coms-delete"/>,
|
||||
content: "批量删除",
|
||||
onClick: batchDelete
|
||||
}
|
||||
// {
|
||||
// key: "BTN_DEL",
|
||||
// icon: <i className="icon-coms-delete"/>,
|
||||
// content: "批量删除",
|
||||
// onClick: batchDelete
|
||||
// }
|
||||
];
|
||||
const collectParams = { // 收藏功能配置
|
||||
favname: "薪资项目管理",
|
||||
|
|
@ -245,31 +275,36 @@ export default class SalaryItem extends React.Component {
|
|||
|
||||
// 新建和修改保存的回调
|
||||
const handleSlideSave = (continueFlag) => {
|
||||
const { salaryItemStore: { saveItem, request } } = this.props;
|
||||
if (this.state.editable) { // 修改
|
||||
saveItem(request, continueFlag, this.searchParams);
|
||||
} else { // 新建
|
||||
saveItem(request, continueFlag);
|
||||
}
|
||||
const { salaryItemStore: { saveItem, request, getTableDatas } } = this.props;
|
||||
saveItem(request, continueFlag).then(()=>{
|
||||
getTableDatas({...this.state.searchParams}).then(res=>{
|
||||
this.setState({
|
||||
searchParams:{
|
||||
...this.state.searchParams,
|
||||
total: res.total
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
};
|
||||
|
||||
const renderCustomOperate = () => {
|
||||
let arrList=[];
|
||||
if(this.state.isAdd){
|
||||
arrList=[
|
||||
<Button type="primary" onClick={() => {
|
||||
let arrList = [];
|
||||
if (this.state.isAdd) {
|
||||
arrList = [
|
||||
<Button type="primary" onClick={() => {
|
||||
handleSlideSave(false);
|
||||
}}>保存</Button>,
|
||||
<Button type="default" onClick={() => {
|
||||
handleSlideSave(true);
|
||||
}}>保存并继续创建</Button>
|
||||
]
|
||||
}else if(this.state.editable){
|
||||
arrList=[
|
||||
];
|
||||
} else if (this.state.editable) {
|
||||
arrList = [
|
||||
<Button type="primary" onClick={() => {
|
||||
handleSlideSave(false);
|
||||
}}>保存</Button>
|
||||
]
|
||||
];
|
||||
}
|
||||
return arrList;
|
||||
};
|
||||
|
|
@ -278,7 +313,6 @@ export default class SalaryItem extends React.Component {
|
|||
const { salaryItemStore: { setRequest } } = this.props;
|
||||
setRequest(value);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="mySalaryBenefitsWrapper">
|
||||
<WeaRightMenu
|
||||
|
|
@ -302,16 +336,22 @@ export default class SalaryItem extends React.Component {
|
|||
loading={loading}
|
||||
dataSource={tableDataSource}
|
||||
columns={this.getColumns(tableColumns)}
|
||||
total={pageInfo.total}
|
||||
current={pageInfo.pageNum}
|
||||
pageSize={this.searchParams.pageSize}
|
||||
total={this.state.searchParams.total}
|
||||
current={this.state.searchParams.current}
|
||||
pageSize={this.state.searchParams.pageSize}
|
||||
onPageChange={(value) => {
|
||||
this.handlePageChnage(value);
|
||||
this.handlePageChange(value);
|
||||
}}
|
||||
onShowSizeChange={(current, pageSize) => {
|
||||
this.searchParams.current = current;
|
||||
this.searchParams.pageSize = pageSize;
|
||||
this.handleShowSizeChange(this.searchParams);
|
||||
this.setState({
|
||||
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 { archivesStore: { exportArchives } } = this.props;
|
||||
exportArchives();
|
||||
const url = `${window.location.origin}/api/bs/hrmsalary/scheme/export?ids=`;
|
||||
window.open(url, "_self");
|
||||
};
|
||||
|
||||
// 导出选中
|
||||
|
|
@ -197,8 +197,8 @@ export default class Archives extends React.Component {
|
|||
return;
|
||||
}
|
||||
let ids = selectedRowKeys.join(",");
|
||||
const { archivesStore: { exportArchives } } = this.props;
|
||||
exportArchives(ids);
|
||||
const url = `${window.location.origin}/api/bs/hrmsalary/scheme/export?ids=${ids}`;
|
||||
window.open(url, "_self");
|
||||
};
|
||||
|
||||
const btns = [
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { Button, Icon, message, Modal, Spin, Tooltip } from "antd";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaDialog, WeaInputSearch, WeaTable } from "ecCom";
|
||||
import { getSearchs } from "../../../../util";
|
||||
import { getSearchs, calcPageNo } from "../../../../util";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
import ProgressModal from "../../../../components/progressModal";
|
||||
import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal";
|
||||
|
|
@ -64,14 +64,18 @@ export default class NormalIndex extends Component {
|
|||
componentWillReceiveProps(nextProps) {
|
||||
if (nextProps.selectedKey != this.props.selectedKey) {
|
||||
const { billMonth, paymentOrganization } = nextProps;
|
||||
const { current } = this.state;
|
||||
nextProps.selectedKey === "1"
|
||||
? this.getNormalList({ billMonth, current, paymentOrganization })
|
||||
: this.getSupplementaryList({
|
||||
billMonth,
|
||||
current,
|
||||
paymentOrganization
|
||||
});
|
||||
this.setState({
|
||||
current: 1,
|
||||
}, ()=>{
|
||||
const { current } = this.state;
|
||||
nextProps.selectedKey === "1"
|
||||
? this.getNormalList({ billMonth, current, paymentOrganization })
|
||||
: this.getSupplementaryList({
|
||||
billMonth,
|
||||
current,
|
||||
paymentOrganization
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -256,6 +260,10 @@ export default class NormalIndex extends Component {
|
|||
_.filter(list, it => selectedRowKeys.includes(it.id)),
|
||||
item => item.employeeId
|
||||
);
|
||||
const ids = _.map(
|
||||
_.filter(list, it => selectedRowKeys.includes(it.id)),
|
||||
item => item.id
|
||||
);
|
||||
Modal.confirm({
|
||||
title: "确认信息",
|
||||
content: "确认删除勾选的数据吗?",
|
||||
|
|
@ -263,6 +271,7 @@ export default class NormalIndex extends Component {
|
|||
siaccountCommonDelete({
|
||||
billMonth,
|
||||
includes,
|
||||
ids,
|
||||
paymentOrganization
|
||||
}).then(() => {
|
||||
message.success("删除成功");
|
||||
|
|
@ -271,11 +280,11 @@ export default class NormalIndex extends Component {
|
|||
? this.getNormalList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current: this.state.current
|
||||
current: calcPageNo(this.state.tableData.total,this.state.current, 10, includes.length)
|
||||
})
|
||||
: this.getSupplementaryList({
|
||||
billMonth,
|
||||
current: this.state.current,
|
||||
current: calcPageNo(this.state.tableData.total,this.state.current, 10, includes.length),
|
||||
paymentOrganization
|
||||
});
|
||||
});
|
||||
|
|
@ -472,9 +481,22 @@ export default class NormalIndex extends Component {
|
|||
<Tooltip title="导出全部">
|
||||
<i className="icon-coms02-coms2-export" />
|
||||
</Tooltip> */}
|
||||
{selectedKey === "1" && this.props.type !== "detail" && <Button type="primary" onClick={() => {
|
||||
this.handleCommonAccountClick();
|
||||
}}>核算</Button>}
|
||||
{
|
||||
selectedKey === "1" && this.props.type !== "detail" &&
|
||||
<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
|
||||
visible={this.state.progressVisible}
|
||||
|
|
@ -483,30 +505,37 @@ export default class NormalIndex extends Component {
|
|||
}}
|
||||
progress={this.state.progress}
|
||||
/>
|
||||
<Tooltip title="导入数据">
|
||||
<i className="icon-coms02-Template-import1" style={{ color: "#2db7f5", fontSize: 18, marginRight: 10 }}
|
||||
onClick={() => this.setState({ importParams: { ...importParams, visible: true } })}/>
|
||||
</Tooltip>
|
||||
{
|
||||
this.props.type !== "detail" &&
|
||||
<Tooltip title="导入数据">
|
||||
<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}
|
||||
fieldData={this.state.fieldData}
|
||||
onAdd={fieldData => {
|
||||
this.setState({
|
||||
fieldData
|
||||
});
|
||||
}}
|
||||
onCancel={() => {
|
||||
this.setState({ importParams: { ...importParams, visible: false } }, () => {
|
||||
const { billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
const { current } = this.state;
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({ billMonth, current, paymentOrganization })
|
||||
: this.getSupplementaryList({ billMonth, current, paymentOrganization });
|
||||
});
|
||||
}}
|
||||
isStandingBook
|
||||
/>
|
||||
{
|
||||
importParams.visible &&
|
||||
<AcctResultImportModal
|
||||
visiable={importParams.visible}
|
||||
fieldData={this.state.fieldData}
|
||||
onAdd={fieldData => {
|
||||
this.setState({
|
||||
fieldData
|
||||
});
|
||||
}}
|
||||
onCancel={() => {
|
||||
this.setState({ importParams: { ...importParams, visible: false },fieldData: {} }, () => {
|
||||
const { billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
const { current } = this.state;
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({ billMonth, current, paymentOrganization })
|
||||
: this.getSupplementaryList({ billMonth, current, paymentOrganization });
|
||||
});
|
||||
}}
|
||||
isStandingBook
|
||||
standingBookTabKey={selectedKey}
|
||||
/>
|
||||
}
|
||||
|
||||
<Tooltip title="导出全部">
|
||||
<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 {
|
||||
@observable tableStore = new TableStore(); // new table
|
||||
@observable form = new WeaForm(); // nrew 一个form
|
||||
@observable ocForm = new WeaForm(); // 社保福利线下对比form
|
||||
@observable condition = []; // 存储后台得到的form数据
|
||||
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
|
||||
@observable showSearchAd = false; // 高级搜索面板显示
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ export class LedgerStore {
|
|||
@observable condition = []; // 存储后台得到的form数据
|
||||
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
|
||||
@observable showSearchAd = false; // 高级搜索面板显示
|
||||
@observable loading = true; // 数据加载状态
|
||||
@observable loading = false; // 数据加载状态
|
||||
@observable saveLoading = false; // 数据保存loading状态
|
||||
@observable salarySobId = "";
|
||||
@observable includeType = 1; // 0:排除、1:包含
|
||||
@observable userTableStore = {};
|
||||
|
|
@ -379,7 +380,9 @@ export class LedgerStore {
|
|||
if (!this.validateBaseFrom(params)) {
|
||||
reject("保存失败");
|
||||
}
|
||||
this.saveLoading= true;
|
||||
API.saveLedgerBasic(params).then(res => {
|
||||
this.saveLoading= false;
|
||||
if (res.status) {
|
||||
this.salarySobId = res.data;
|
||||
resolve();
|
||||
|
|
@ -559,12 +562,14 @@ export class LedgerStore {
|
|||
|
||||
let params = {
|
||||
salarySobId: this.salarySobId,
|
||||
empFields: this.empFields,
|
||||
empFields: _.map(this.userSelectedList, (it, idx) => ({...it, sortedIndex:idx })),
|
||||
itemGroups: itemGroups.filter(item => item.id != "default"),
|
||||
items: itemGroups.filter(item => item.id == "default")[0].items
|
||||
};
|
||||
return new Promise((resolve, reject) => {
|
||||
this.saveLoading= true;
|
||||
API.saveLedgerItem(params).then(res => {
|
||||
this.saveLoading= false;
|
||||
if (res.status) {
|
||||
resolve();
|
||||
message.success("保存成功");
|
||||
|
|
@ -612,7 +617,9 @@ export class LedgerStore {
|
|||
ruleParams: this.sobItemRuleDataSource
|
||||
};
|
||||
return new Promise((resolve, reject) => {
|
||||
this.saveLoading= true;
|
||||
API.saveAdjustmentRule(params).then(res => {
|
||||
this.saveLoading= false;
|
||||
if (res.status) {
|
||||
resolve();
|
||||
message.success("保存成功");
|
||||
|
|
|
|||
|
|
@ -134,8 +134,8 @@ export class OtherDeductStore {
|
|||
setShowSearchAd = (bool) => (this.showSearchAd = bool);
|
||||
|
||||
// 高级搜索 - 搜索
|
||||
@action doSearch = () => {
|
||||
this.getTableDatas();
|
||||
@action doSearch = (params) => {
|
||||
this.getTableDatas(params);
|
||||
this.showSearchAd = false;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { observable, action, toJS } from 'mobx';
|
||||
import { message } from 'antd';
|
||||
import { WeaForm, WeaTableNew } from 'comsMobx';
|
||||
import { action, observable, toJS } from "mobx";
|
||||
import { message } from "antd";
|
||||
import { WeaForm, WeaTableNew } from "comsMobx";
|
||||
|
||||
import * as API from '../apis/item'; // 引入API接口文件
|
||||
import {notNull} from '../util/validate'
|
||||
import * as API from "../apis/item"; // 引入API接口文件
|
||||
import { notNull } from "../util/validate";
|
||||
|
||||
const { TableStore } = WeaTableNew;
|
||||
|
||||
|
|
@ -20,23 +20,23 @@ export class SalaryItemStore {
|
|||
@observable deleteItemVisible = false; // 删除Modal
|
||||
@observable editSlideVisible = false; // 新建修改设置
|
||||
@observable request = {
|
||||
name: '',
|
||||
name: "",
|
||||
useDefault: 0,
|
||||
useInEmployeeSalary: 0,
|
||||
systemType:0,
|
||||
systemType: 0,
|
||||
roundingMode: "1",
|
||||
pattern: 0,
|
||||
valueType: 1,
|
||||
dataType: "number",
|
||||
description: ""
|
||||
}
|
||||
};
|
||||
|
||||
@observable tableDataSource = []; // 主列表
|
||||
@observable tableColumns = []; // 主列表列
|
||||
@observable pageInfo = {}; // 分页数据
|
||||
|
||||
// 可以删除的项目
|
||||
@observable canDeleteList = []
|
||||
@observable canDeleteList = [];
|
||||
|
||||
// ** 公式 **
|
||||
// 类型列表
|
||||
|
|
@ -52,22 +52,22 @@ export class SalaryItemStore {
|
|||
// 设置字段列表
|
||||
@action
|
||||
setSearchFields = (searchFields) => {
|
||||
this.searchFields = searchFields
|
||||
}
|
||||
this.searchFields = searchFields;
|
||||
};
|
||||
|
||||
|
||||
@action
|
||||
initRequest = () => this.request = {
|
||||
name: '',
|
||||
name: "",
|
||||
useDefault: 0,
|
||||
useInEmployeeSalary: 0,
|
||||
systemType:0,
|
||||
systemType: 0,
|
||||
roundingMode: "1",
|
||||
pattern: 0,
|
||||
valueType: "1",
|
||||
dataType: "number",
|
||||
description: ""
|
||||
}
|
||||
};
|
||||
|
||||
@action
|
||||
setRequest = request => this.request = request;
|
||||
|
|
@ -81,30 +81,28 @@ export class SalaryItemStore {
|
|||
@action
|
||||
setSystemItemVisible = systemItemVisible => this.systemItemVisible = systemItemVisible;
|
||||
|
||||
// 初始化操作
|
||||
// 存储分页以及关键字信息
|
||||
@action
|
||||
doInit = () => {
|
||||
this.getTableDatas({});
|
||||
}
|
||||
setPageInfo = (pageInfo) => this.pageInfo = {...this.pageInfo,...pageInfo};
|
||||
|
||||
// 渲染table数据
|
||||
@action
|
||||
getTableDatas = (params) => {
|
||||
this.loading = true;
|
||||
|
||||
API.getItemList(params).then(action(res => {
|
||||
if (res.status) { // 接口请求成功/失败处理
|
||||
this.tableDataSource = res.data.list
|
||||
this.tableColumns = res.data.columns
|
||||
this.pageInfo = res.data
|
||||
// this.tableStore.getDatas(res.data.datas); // table 请求数据
|
||||
} else {
|
||||
message.error(res.errormsg || '接口调用失败!')
|
||||
}
|
||||
this.loading = false;
|
||||
}));
|
||||
|
||||
}
|
||||
return new Promise((resolve, reject)=>{
|
||||
API.getItemList({...params, ...this.pageInfo}).then(action(res => {
|
||||
this.loading = false;
|
||||
if (res.status) { // 接口请求成功/失败处理
|
||||
this.tableDataSource = res.data.list;
|
||||
this.tableColumns = res.data.columns;
|
||||
resolve(res.data);
|
||||
} else {
|
||||
message.error(res.errormsg || "接口调用失败!");
|
||||
reject();
|
||||
}
|
||||
}));
|
||||
})
|
||||
};
|
||||
|
||||
@action
|
||||
setShowSearchAd = bool => this.showSearchAd = bool;
|
||||
|
|
@ -113,13 +111,13 @@ export class SalaryItemStore {
|
|||
@action doSearch = () => {
|
||||
this.getTableDatas();
|
||||
this.showSearchAd = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 薪资项目-系统薪资项目列表
|
||||
@action
|
||||
formulaDatasourceList = () => {
|
||||
return API.formulaDatasourceList();
|
||||
}
|
||||
};
|
||||
|
||||
// 薪资项目-系统薪资项目列表
|
||||
@action
|
||||
|
|
@ -128,55 +126,55 @@ export class SalaryItemStore {
|
|||
if (res.status) { // 接口请求成功/失败处理
|
||||
this.sysListTableStore.getDatas(res.data.datas); // table 请求数据
|
||||
} else {
|
||||
message.error(res.errormsg || '接口调用失败!')
|
||||
message.error(res.errormsg || "接口调用失败!");
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//薪资项目-添加系统薪资项目
|
||||
@action
|
||||
saveSysItem = () => {
|
||||
let ids = toJS(this.sysListTableStore.selectedRowKeys)
|
||||
if(ids.length == 0) {
|
||||
let ids = toJS(this.sysListTableStore.selectedRowKeys);
|
||||
if (ids.length == 0) {
|
||||
message.warning("未选择任何条目");
|
||||
return
|
||||
return;
|
||||
}
|
||||
API.saveSysItem(ids).then(res => {
|
||||
if(res.status) {
|
||||
this.setSystemItemVisible(false)
|
||||
if (res.status) {
|
||||
this.setSystemItemVisible(false);
|
||||
this.getTableDatas({});
|
||||
message.success("添加成功")
|
||||
message.success("添加成功");
|
||||
} else {
|
||||
message.error(res.errormsg || '添加失败')
|
||||
message.error(res.errormsg || "添加失败");
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//薪资项目-薪资项目详情
|
||||
@action
|
||||
getItemForm = (id) => {
|
||||
API.getItemForm({id}).then(res => {
|
||||
if(res.status) {
|
||||
API.getItemForm({ id }).then(res => {
|
||||
if (res.status) {
|
||||
let data = res.data;
|
||||
Object.keys(data).map(key => {
|
||||
if(data[key]) {
|
||||
data[key] = data[key].toString()
|
||||
if (data[key]) {
|
||||
data[key] = data[key].toString();
|
||||
}
|
||||
})
|
||||
});
|
||||
this.request = data;
|
||||
} else {
|
||||
message.error(res.errormsg || '获取失败')
|
||||
message.error(res.errormsg || "获取失败");
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 对象值转string
|
||||
convertToString(data) {
|
||||
Object.keys(data).map(k => {
|
||||
if(typeof(data[k]) == "number") {
|
||||
if (typeof (data[k]) == "number") {
|
||||
data[k] = data[k].toString();
|
||||
}
|
||||
})
|
||||
});
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
@ -184,167 +182,172 @@ export class SalaryItemStore {
|
|||
@action
|
||||
deleteItemList = (params) => {
|
||||
API.deleteItemList(params).then(res => {
|
||||
if(res.status) {
|
||||
this.deleteTableStore.getDatas(res.data.datas)
|
||||
if (res.status) {
|
||||
this.deleteTableStore.getDatas(res.data.datas);
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
message.error(res.errormsg || "获取失败");
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//薪资项目-批量删除薪资项目
|
||||
@action
|
||||
deleteItem = (ids) => {
|
||||
if(ids.length == 0) {
|
||||
if (ids.length == 0) {
|
||||
message.warning("未选择任何条目");
|
||||
return
|
||||
return;
|
||||
}
|
||||
this.deleteItemRequest(ids)
|
||||
}
|
||||
this.deleteItemRequest(ids);
|
||||
};
|
||||
|
||||
@action
|
||||
deleteItemRequest = (ids) => {
|
||||
API.deleteItem(ids).then(res => {
|
||||
if(res.status) {
|
||||
this.deleteItemVisible = false;
|
||||
this.getTableDatas({})
|
||||
message.success("删除成功")
|
||||
} else {
|
||||
message.error(res.errormsg || "删除失败")
|
||||
}
|
||||
return new Promise((resolve, reject)=>{
|
||||
API.deleteItem(ids).then(res => {
|
||||
if (res.status) {
|
||||
this.deleteItemVisible = false;
|
||||
message.success("删除成功");
|
||||
resolve();
|
||||
} else {
|
||||
message.error(res.errormsg || "删除失败");
|
||||
reject();
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
validateForm(params) {
|
||||
if(!notNull(params.name)) {
|
||||
message.warning("名称不能为空")
|
||||
if (!notNull(params.name)) {
|
||||
message.warning("名称不能为空");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!notNull(params.dataType)) {
|
||||
message.warning("字段类型不能为空")
|
||||
if (!notNull(params.dataType)) {
|
||||
message.warning("字段类型不能为空");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!notNull(params.roundingMode)) {
|
||||
message.warning("舍入规则不能为空")
|
||||
if (!notNull(params.roundingMode)) {
|
||||
message.warning("舍入规则不能为空");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!notNull(params.pattern)) {
|
||||
message.warning("保留小数位不能为空")
|
||||
if (!notNull(params.pattern)) {
|
||||
message.warning("保留小数位不能为空");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!notNull(params.valueType)) {
|
||||
message.warning("取值方式不能为空")
|
||||
if (!notNull(params.valueType)) {
|
||||
message.warning("取值方式不能为空");
|
||||
return false;
|
||||
}
|
||||
|
||||
if((params.valueType == 2 || params.valueType == 3) && !notNull(params.formulaId)) {
|
||||
message.warning("公式不能为空")
|
||||
if ((params.valueType == 2 || params.valueType == 3) && !notNull(params.formulaId)) {
|
||||
message.warning("公式不能为空");
|
||||
return false;
|
||||
}
|
||||
return true
|
||||
return true;
|
||||
}
|
||||
|
||||
//薪资项目-新增薪资项目
|
||||
@action
|
||||
saveItem = (params, continueFlag, searchParams = {}) => {
|
||||
|
||||
if(!this.validateForm(params)) {
|
||||
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 || "保存失败")
|
||||
saveItem = (params, continueFlag) => {
|
||||
return new Promise((resolve, reject)=>{
|
||||
if (!this.validateForm(params)) {
|
||||
return;
|
||||
}
|
||||
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
|
||||
salaryAcctImportTemplateParam = (params = {}) => {
|
||||
API.formualSearchGroup(params).then(res => {
|
||||
if(res.status) {
|
||||
this.searchGroup = res.data
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
if (res.status) {
|
||||
this.searchGroup = res.data;
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败");
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 获取公式变量字段
|
||||
@action
|
||||
formualSearchField = (sourceId, params = {}) => {
|
||||
API.formualSearchField({sourceId, ...params}).then(res => {
|
||||
if(res.status) {
|
||||
this.searchFields = res.data
|
||||
API.formualSearchField({ sourceId, ...params }).then(res => {
|
||||
if (res.status) {
|
||||
this.searchFields = res.data;
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
message.error(res.errormsg || "获取失败");
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 保存公式
|
||||
@action
|
||||
saveFormual = (params) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
API.saveFormual(params).then(res => {
|
||||
if(res.status) {
|
||||
if (res.status) {
|
||||
message.success("保存成功");
|
||||
resolve(res.data)
|
||||
resolve(res.data);
|
||||
} else {
|
||||
message.error(res.errormsg || "保存失败");
|
||||
reject()
|
||||
reject();
|
||||
}
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
// 根据id获取formual
|
||||
@action
|
||||
detailFormual = (formulaId) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
API.detailFormual({formulaId}).then(res => {
|
||||
if(res.status) {
|
||||
this.formulaDetail = res.data
|
||||
resolve(res.data)
|
||||
API.detailFormual({ formulaId }).then(res => {
|
||||
if (res.status) {
|
||||
this.formulaDetail = res.data;
|
||||
resolve(res.data);
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
reject()
|
||||
message.error(res.errormsg || "获取失败");
|
||||
reject();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// 获取可以删除的列表
|
||||
@action
|
||||
listCanDelete = (params = {}) => {
|
||||
this.modalLoading = true;
|
||||
API.listCanDelete(params).then(res => {
|
||||
if(res.status) {
|
||||
let data = res.data
|
||||
if(res.data.list && res.data.list.length > 0) {
|
||||
data.list = res.data.list.map(item => {
|
||||
item = {...item}
|
||||
item.key = item.id
|
||||
return item
|
||||
})
|
||||
if (res.status) {
|
||||
let data = res.data;
|
||||
if (res.data.list && res.data.list.length > 0) {
|
||||
data.list = res.data.list.map(item => {
|
||||
item = { ...item };
|
||||
item.key = item.id;
|
||||
return item;
|
||||
});
|
||||
}
|
||||
this.canDeleteList = data
|
||||
this.canDeleteList = data;
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
message.error(res.errormsg || "获取失败");
|
||||
}
|
||||
this.modalLoading = false;
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,22 +110,11 @@ export const renderNoData = () => (
|
|||
</WeaAlertPage>
|
||||
)
|
||||
|
||||
//动态计算表格高度
|
||||
export function getTableScroll({ extraHeight, id }) {
|
||||
if (typeof extraHeight == "undefined") {
|
||||
// 默认底部分页64 + 边距10
|
||||
extraHeight = 64
|
||||
}
|
||||
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)`
|
||||
//分页计算
|
||||
export function calcPageNo (total, pageNo = 1, pageSize = 10, selectDelDataLen = 1) {
|
||||
const totalPage = Math.ceil((total - selectDelDataLen) / pageSize) // 总页数
|
||||
pageNo = pageNo > totalPage ? totalPage : pageNo
|
||||
pageNo = pageNo < 1 ? 1 : pageNo
|
||||
return pageNo
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,18 +7,18 @@
|
|||
// return null;
|
||||
// }
|
||||
|
||||
export const getQueryString = (variable) => {
|
||||
let split = window.location.hash.split("?");
|
||||
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];
|
||||
}
|
||||
}
|
||||
export const getQueryString = (variable) => {
|
||||
let split = window.location.hash.split("?");
|
||||
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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue