From 1d1ced8d77faebd0d6a55d1bd80fc09264746cc3 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Thu, 29 Sep 2022 15:45:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6=E6=B7=BB=E5=8A=A0=E7=BA=BF=E4=B8=8B=E5=AF=B9=E6=AF=94?= =?UTF-8?q?=E7=9A=84=E9=A1=B5=E9=9D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/offlineCompare.js | 11 + pc4mobx/hrmSalary/apis/ruleconfig.js | 34 +++ .../components/canDeleteItem/index.js | 63 ++-- .../hrmSalary/components/importModal/index.js | 4 +- .../components/importModal/modalStep1.js | 27 +- .../components/slideModalTitle/index.js | 42 +-- pc4mobx/hrmSalary/index.js | 13 + pc4mobx/hrmSalary/pages/appConfig/index.js | 84 +++++ .../importModal/acctResultImportModal.js | 13 +- .../pages/calculateDetail/compareDetail.js | 34 +-- .../compareDetailImportModal.js | 10 +- .../hrmSalary/pages/calculateDetail/index.js | 27 +- .../pages/calculateDetail/index.less | 2 +- .../pages/calculateDetail/salaryDetail.js | 1 + .../pages/calculateDetail/userSure.js | 63 +++- .../pages/dataAcquisition/attendance/index.js | 1 + .../pages/dataAcquisition/cumDeduct/index.js | 1 + .../dataAcquisition/otherDeduct/index.js | 12 +- .../declare/generateDeclarationDetail.js | 6 +- .../hrmSalary/pages/ledger/addUserModal.js | 4 +- pc4mobx/hrmSalary/pages/ledger/index.js | 2 + pc4mobx/hrmSalary/pages/ledger/index.less | 7 + .../hrmSalary/pages/ledger/salaryItemForm.js | 4 +- .../hrmSalary/pages/ledger/slideBaseForm.js | 2 +- .../pages/ledger/step3/AddSalaryItemModal.js | 2 +- .../pages/ledger/step3/UserInfoSelect.js | 30 +- .../pages/ledger/step3/previewSalaryModal.js | 4 +- .../hrmSalary/pages/payroll/SalarySendList.js | 6 +- .../pages/payroll/payrollDetail/index.js | 20 +- .../pages/payroll/payrollGrant/index.js | 32 +- .../payroll/payrollGrant/payrollGrantModal.js | 1 + .../payrollGrant/payrollWithdrawModal.js | 1 + .../templatePreview/computerTemplate/index.js | 2 +- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 192 ++++++++++++ pc4mobx/hrmSalary/pages/ruleConfig/index.less | 9 + pc4mobx/hrmSalary/pages/salaryFile/index.js | 23 +- pc4mobx/hrmSalary/pages/salaryItem/index.js | 122 +++++--- .../socialSecurityBenefits/archives/index.js | 8 +- .../standingBookDetail/components/normal.js | 103 ++++--- .../condition.js | 17 ++ .../standingBookOfflineComparison/index.js | 162 ++++++++++ .../standingBookOfflineComparison/index.less | 18 ++ pc4mobx/hrmSalary/stores/StandingBook.js | 1 + pc4mobx/hrmSalary/stores/ledger.js | 11 +- pc4mobx/hrmSalary/stores/otherDeduct.js | 4 +- pc4mobx/hrmSalary/stores/salaryItem.js | 287 +++++++++--------- pc4mobx/hrmSalary/util/index.js | 25 +- pc4mobx/hrmSalary/util/url.js | 28 +- 48 files changed, 1139 insertions(+), 436 deletions(-) create mode 100644 pc4mobx/hrmSalary/apis/offlineCompare.js create mode 100644 pc4mobx/hrmSalary/apis/ruleconfig.js create mode 100644 pc4mobx/hrmSalary/pages/appConfig/index.js create mode 100644 pc4mobx/hrmSalary/pages/ruleConfig/index.js create mode 100644 pc4mobx/hrmSalary/pages/ruleConfig/index.less create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookOfflineComparison/condition.js create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookOfflineComparison/index.js create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookOfflineComparison/index.less diff --git a/pc4mobx/hrmSalary/apis/offlineCompare.js b/pc4mobx/hrmSalary/apis/offlineCompare.js new file mode 100644 index 00000000..47169d04 --- /dev/null +++ b/pc4mobx/hrmSalary/apis/offlineCompare.js @@ -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); +} diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js new file mode 100644 index 00000000..1bb7f7fb --- /dev/null +++ b/pc4mobx/hrmSalary/apis/ruleconfig.js @@ -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); +} diff --git a/pc4mobx/hrmSalary/components/canDeleteItem/index.js b/pc4mobx/hrmSalary/components/canDeleteItem/index.js index ea598daf..8008e7cf 100644 --- a/pc4mobx/hrmSalary/components/canDeleteItem/index.js +++ b/pc4mobx/hrmSalary/components/canDeleteItem/index.js @@ -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 ( -
this.handleMouseOver()} onMouseLeave={() => this.handelMouseout()}> - {title} - { - this.state.showDelete && this.props.onDelete(this.props.item)}/> - } -
- ) - } -} \ No newline at end of file + handelMouseout() { + setTimeout(() => { + this.setState({ showDelete: false }); + }, 400); + } + + render() { + const { title } = this.props; + return ( +
this.handleMouseOver()} onMouseLeave={() => this.handelMouseout()}> + {title} + {/*{*/} + {/* this.state.showDelete &&*/} + this.props.onDelete(this.props.item)}/> + {/*}*/} +
+ ); + } +} diff --git a/pc4mobx/hrmSalary/components/importModal/index.js b/pc4mobx/hrmSalary/components/importModal/index.js index d55f207c..05e6481a 100644 --- a/pc4mobx/hrmSalary/components/importModal/index.js +++ b/pc4mobx/hrmSalary/components/importModal/index.js @@ -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 ( { this.setState({ fileId }); }} diff --git a/pc4mobx/hrmSalary/components/importModal/modalStep1.js b/pc4mobx/hrmSalary/components/importModal/modalStep1.js index d676620e..da10cd5d 100644 --- a/pc4mobx/hrmSalary/components/importModal/modalStep1.js +++ b/pc4mobx/hrmSalary/components/importModal/modalStep1.js @@ -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 {

1. 第一步,请选择导出的Excel文件或 { (typeof this.props.templateLink) == "string" ? - 点击这里下载模板 + { + 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") + }}>点击这里下载模板 : { this.props.templateLink(hasData === "1" ? `true` : `false`); diff --git a/pc4mobx/hrmSalary/components/slideModalTitle/index.js b/pc4mobx/hrmSalary/components/slideModalTitle/index.js index 0b09bc29..f8953476 100644 --- a/pc4mobx/hrmSalary/components/slideModalTitle/index.js +++ b/pc4mobx/hrmSalary/components/slideModalTitle/index.js @@ -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

} iconBgcolor="#F14A2D" buttons={(this.props.showOperateBtn && this.state.editable && this.props.selectedTab != 1) ? [ - - ] : !_.isEmpty(customOperate) ? customOperate: []} + + ] : !_.isEmpty(customOperate) ? customOperate : []} showDropIcon={false} dropMenuDatas={[]} tabDatas={tabs || []} selectedKey={String(selectedTab) || ""} - onChange={ key => subItemChange(key) } + onChange={key => subItemChange(key)} />
; - // return
- //
- // - //
- //
- // { - // this.props.subtitle &&
- // { - // this.props.tabs ? - //
- //
{this.props.subtitle}
- //
- // {this.props.tabs.map(item => ( - // this.props.subItemChange(item)}>{item.title} - // ))} - //
- //
:
{this.props.subtitle}
- // } - //
- // } - //
- //
- // {this.props.btns} - // { - // this.props.showOperateBtn && this.state.editable && this.props.selectedTab != 1 && - // - // } - // {this.props.customOperate} - {/*
*/ - } - - {/*
;*/ - } } } diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 0ca4fe47..63686c8c 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -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 = ( + @@ -133,6 +144,8 @@ const Routes = ( + + ); diff --git a/pc4mobx/hrmSalary/pages/appConfig/index.js b/pc4mobx/hrmSalary/pages/appConfig/index.js new file mode 100644 index 00000000..37e5ee12 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/appConfig/index.js @@ -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 = []; + const items = [ + { + com: CheckBox({ + label: "显示薪资核算结果合计列", + value: openAcctResultSum, + onChange: (openAcctResultSum) => { + this.setState({ openAcctResultSum }); + } + }) + } + ]; + return ( +
+ 应用设置} + icon={} + iconBgcolor="#F14A2D" + buttons={btns} + /> + +
+ ); + } +} + +export default AppConfig; + +const CheckBox = payload => { + const { label, onChange, value } = payload; + return ( + + + + ); +}; diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js index 78bf69d6..48545172 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js @@ -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 + return diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js index d583a401..387a866e 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js @@ -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 {
系统值:{record[item.dataIndex].acctResultValue}
线下值:{record[item.dataIndex].excelResultValue}
差值:{this.calculateCompares(record[item.dataIndex].acctResultValue, record[item.dataIndex].excelResultValue)}
+ style={{ color: "red" }}>差值:{calculateCompares(record[item.dataIndex].acctResultValue, record[item.dataIndex].excelResultValue)} ); }; @@ -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 {
- { + { 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 ""; +} diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetailImportModal.js b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetailImportModal.js index 1439fc20..1db577b1 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetailImportModal.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetailImportModal.js @@ -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); } // 初始化导入参数 diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js index de8d75f1..d59b9429 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js @@ -72,16 +72,16 @@ export default class CalculateDetail extends React.Component { { 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 ( this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/> ); diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.less b/pc4mobx/hrmSalary/pages/calculateDetail/index.less index 8bb981ce..8a60c910 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/index.less +++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.less @@ -218,7 +218,7 @@ } .compareDetail { - overflow-y: auto; + overflow-y: hidden; height: 100%; .tabWrapper { diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js index e17ef734..07be33f2 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js @@ -146,6 +146,7 @@ export default class SalaryDetail extends React.Component {