diff --git a/pc4mobx/hrmSalary/apis/sysconfig.js b/pc4mobx/hrmSalary/apis/sysconfig.js
new file mode 100644
index 00000000..d98dc045
--- /dev/null
+++ b/pc4mobx/hrmSalary/apis/sysconfig.js
@@ -0,0 +1,10 @@
+export const getSysList = params => {
+ return fetch('/api/bs/hrmsalary/sys/list', {
+ method: 'POST',
+ mode: 'cors',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify(params)
+ }).then(res => res.json())
+};
diff --git a/pc4mobx/hrmSalary/components/customForm/index.js b/pc4mobx/hrmSalary/components/customForm/index.js
index 00c25613..d98bb96b 100644
--- a/pc4mobx/hrmSalary/components/customForm/index.js
+++ b/pc4mobx/hrmSalary/components/customForm/index.js
@@ -1,64 +1,63 @@
-import React from 'react'
-import { Checkbox, Radio, Row, Col } from "antd"
-import { WeaInput } from "ecCom"
-import RequiredLabelTip from '../requiredLabelTip';
-const CheckboxGroup = Checkbox.Group;
+import React from "react";
+import { Col, Row } from "antd";
+import { WeaInput, WeaSelect } from "ecCom";
+
export default class CustomForm extends React.Component {
- handleChange(params) {
- let request = {...this.props.request, ...params}
- this.props.onChange(request);
- }
+ handleChange(params) {
+ let request = { ...this.props.request, ...params };
+ this.props.onChange(request);
+ }
- render() {
- const { request, disable } = this.props;
- return (
-
- {
- this.props.condition.map(item => {
- let disabledValue = disable && disable.indexOf(item.domkey[0]) >= 0
- return (
-
-
- {item.label} {
- item.rules == "required" &&
- } :
-
-
- {
- item.conditionType == "INPUT" &&
- {
-this.handleChange({[item.domkey[0]]: value})
-}}/>
- }
+ render() {
+ const { request, disable } = this.props;
+ return (
+
+ {
+ this.props.condition.map(item => {
+ let disabledValue = disable && disable.indexOf(item.domkey[0]) >= 0;
+ return (
+
+
+ {item.label}:
+
+
+ {
+ item.conditionType == "INPUT" &&
+ {
+ this.handleChange({ [item.domkey[0]]: value });
+ }}/>
+ }
- {
- item.conditionType == "RADIO" && item.options &&
- this.handleChange({[item.domkey[0]]: e.target.value})}>
- {
- item.options.map(o => (
- {o.showname}
- ))
- }
-
- }
+ {
+ item.conditionType == "RADIO" && item.options &&
+ this.handleChange({ [item.domkey[0]]: value })}
+ options={item.options.map(o => ({ showname: o.showname, key: o.key }))}
+ />
+ }
- {
- item.conditionType == "CHECKBOX" &&
- item.options &&
- ({label: o.showname, value: o.key}))} onChange={(value) => this.handleChange({[item.domkey[0]]: value}) }/>
- }
-
-
- )
- })
- }
-
-
- )
- }
-}
\ No newline at end of file
+ {
+ item.conditionType == "CHECKBOX" &&
+ item.options &&
+ ({ showname: o.showname, key: o.key }))}
+ onChange={(value) => this.handleChange({ [item.domkey[0]]: value })}/>
+ }
+
+
+ );
+ })
+ }
+
+ );
+ }
+}
diff --git a/pc4mobx/hrmSalary/components/importModal/index.less b/pc4mobx/hrmSalary/components/importModal/index.less
index e55d83b8..d472ab37 100644
--- a/pc4mobx/hrmSalary/components/importModal/index.less
+++ b/pc4mobx/hrmSalary/components/importModal/index.less
@@ -1,7 +1,16 @@
-.importModalWrapper{
- .wea-dialog-body{
+.importModalWrapper {
+ .wea-dialog-body {
height: 80vh;
overflow: hidden auto;
padding: 16px;
}
+
+ .wea-select, .ant-select, .ant-select-selection {
+ width: 100%;
+ }
+
+ .ant-select-selection {
+ height: 30px;
+ border-radius: 0;
+ }
}
diff --git a/pc4mobx/hrmSalary/components/smallTab/index.js b/pc4mobx/hrmSalary/components/smallTab/index.js
index 1555abe2..0616a34e 100644
--- a/pc4mobx/hrmSalary/components/smallTab/index.js
+++ b/pc4mobx/hrmSalary/components/smallTab/index.js
@@ -1,26 +1,27 @@
-import React from 'react'
-import "./index.less"
+import React from "react";
+import "./index.less";
export default class SmallTab extends React.Component {
- constructor(props) {
- super(props)
- this.state = {
- selectedItem: this.props.items[0]
- }
- }
+ constructor(props) {
+ super(props);
+ this.state = {
+ selectedItem: this.props.items[0]
+ };
+ }
- render() {
- const { selectedItem } = this.state
- return (
-
- {
- this.props.items.map(item => (
- {
-this.setState({selectedItem: item}); this.props.onChange(item)
-}}>{item.title}
- ))
- }
-
- )
- }
-}
\ No newline at end of file
+ render() {
+ const { selectedItem } = this.state;
+ return (
+
+ {
+ this.props.items.map(item => (
+ {
+ this.setState({ selectedItem: item });
+ this.props.onChange(item);
+ }}>{item.title}
+ ))
+ }
+
+ );
+ }
+}
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js
index d221d764..d583a401 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js
@@ -1,262 +1,266 @@
-import React from 'react'
-import { Button, Table } from "antd"
-import { WeaInputSearch, WeaCheckbox, WeaTable } from 'ecCom'
-import { mergeDetailColumns, dataSource } from './columns'
-import { getQueryString } from '../../util/url'
-import CustomTab from '../../components/customTab'
-import { inject, observer } from 'mobx-react';
-import CompareDetailImportModal from './compareDetailImportModal'
-import CustomTable from '../../components/customTable'
-import CustomPaginationTable from '../../components/customPaginationTable'
+import React from "react";
+import { Button } from "antd";
+import { WeaCheckbox, WeaInputSearch } from "ecCom";
+import { getQueryString } from "../../util/url";
+import CustomTab from "../../components/customTab";
+import { inject, observer } from "mobx-react";
+import CompareDetailImportModal from "./compareDetailImportModal";
+import CustomPaginationTable from "../../components/customPaginationTable";
-@inject('calculateStore')
+@inject("calculateStore")
@observer
export default class CompareDetail extends React.Component {
- constructor(props) {
- super(props)
- this.id = ""
- this.state = {
- onlyDiffEmployee: true,
- onlyDiffSalaryItem: true,
- importModalVisible: false,
- searchValue: ""
- }
- this.pageInfo = {current: 1, pageSize: 10}
+ constructor(props) {
+ super(props);
+ this.id = "";
+ this.state = {
+ onlyDiffEmployee: true,
+ onlyDiffSalaryItem: true,
+ importModalVisible: false,
+ searchValue: ""
+ };
+ this.pageInfo = { current: 1, pageSize: 10 };
+ }
+
+ componentWillMount() {
+ let id = getQueryString("id");
+ this.id = id;
+
+ const { calculateStore: { fetchComparisonResultList } } = this.props;
+ const { onlyDiffEmployee, onlyDiffSalaryItem } = this.state;
+ let params = {
+ onlyDiffEmployee,
+ onlyDiffSalaryItem,
+ salaryAcctRecordId: this.id,
+ current: 1
+ };
+ fetchComparisonResultList(params);
+ }
+
+ // 计算差值
+ calculateCompares(systemValue, excelValue) {
+ if (systemValue == null || excelValue == null) {
+ return "";
}
-
- componentWillMount() {
- let id = getQueryString("id");
- this.id = id;
-
- const { calculateStore: {fetchComparisonResultList}} = this.props;
- const { onlyDiffEmployee, onlyDiffSalaryItem} = this.state;
- let params = {
- onlyDiffEmployee,
- onlyDiffSalaryItem,
- salaryAcctRecordId: this.id,
- current: 1
- }
- fetchComparisonResultList(params)
+ let systemNum = Number(systemValue);
+ let excelNum = Number(excelValue);
+ if (!isNaN(systemNum) || !isNaN(excelNum)) { // 数字
+ return systemNum - excelNum;
}
+ return "";
+ }
- // 计算差值
- 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 => {
- let n = Number(item.dataIndex)
- if (!isNaN(n)) { // 数字
- item.render = (text, record) => {
- return (
-
-
系统值:{record[item.dataIndex].acctResultValue}
-
线下值:{record[item.dataIndex].excelResultValue}
-
差值:{this.calculateCompares(record[item.dataIndex].acctResultValue, record[item.dataIndex].excelResultValue)}
-
- )
- }
- }
- })
- return newColumns
- }
-
- // 导入
- handleImportClick() {
- this.setState({
- importModalVisible: true
- })
- }
-
- // 分页变化
- handleDataPageChange(value) {
- const { calculateStore: {fetchComparisonResultList}} = this.props;
- const { onlyDiffEmployee, onlyDiffSalaryItem} = this.state;
-
- let params = {
- onlyDiffEmployee,
- onlyDiffSalaryItem,
- salaryAcctRecordId: this.id,
- current: value,
- ...this.pageInfo
- }
- fetchComparisonResultList(params)
- }
-
- handleShowSizeChange(pageInfo) {
- const { calculateStore: {fetchComparisonResultList}} = this.props;
- const { onlyDiffEmployee, onlyDiffSalaryItem} = this.state;
- let params = {
- onlyDiffEmployee,
- onlyDiffSalaryItem,
- salaryAcctRecordId: this.id,
- ...pageInfo
- }
- fetchComparisonResultList(params)
- }
-
- // 只显示有差异的人员 变化
- onlyDiffEmployeeChange(value) {
- let onlyDiffEmployee = value == 1 ? true : false
- this.setState({onlyDiffEmployee})
-
- const { calculateStore: {fetchComparisonResultList}} = this.props;
- const { onlyDiffSalaryItem} = this.state;
-
- let params = {
- onlyDiffEmployee,
- onlyDiffSalaryItem,
- salaryAcctRecordId: this.id,
- employeeName: this.state.searchValue,
- current: 1
- }
-
- fetchComparisonResultList(params)
- }
-
- // 只显示有差异的薪资项目 变化
- onlyDiffSalaryItemChange(value) {
- let onlyDiffSalaryItem = value == 1 ? true : false
- this.setState({onlyDiffSalaryItem})
- const { calculateStore: {fetchComparisonResultList}} = this.props;
- const { onlyDiffEmployee} = this.state;
- let params = {
- onlyDiffEmployee,
- onlyDiffSalaryItem,
- salaryAcctRecordId: this.id,
- employeeName: this.state.searchValue,
- current: 1
- }
- fetchComparisonResultList(params)
- }
-
- // 搜索
- handleSearch(value) {
- const { calculateStore: {fetchComparisonResultList}} = this.props;
- const { onlyDiffEmployee, onlyDiffSalaryItem } = this.state
- let params = {
- onlyDiffEmployee,
- onlyDiffSalaryItem,
- salaryAcctRecordId: this.id,
- employeeName: value,
- current: 1
- }
- fetchComparisonResultList(params)
- }
-
- // 导出
- handleExportClick() {
- const { calculateStore: {exportComparisonResult}} = this.props;
- exportComparisonResult(this.id)
- }
-
- // 线下对比导入
- handleComparisonFinish() {
- this.pageInfo.current = 1
- this.pageInfo.pageSize = 10
- this.handleSearch(this.state.searchValue)
- }
-
- render() {
- const { calculateStore: {comparisonResultPageInfo, comparisonResultTableStore, loading, comparisonResultColumns}} = this.props;
- const { importModalVisible, searchValue } = this.state;
- const renderRightOperation = () => {
- return (
-
-
-
- {
-this.setState({
- searchValue: value
- })
-}} onSearch={(value) => {
-this.handleSearch(value)
-}}/>
-
- )
- }
-
- const renderLeftOperation = () => {
- return (
-
- {
- this.onlyDiffEmployeeChange(value)
- }}
- />
- {
- this.onlyDiffSalaryItemChange(value)
- }}
- />
-
- )
- }
- return (
-
-
-
-
-
- {
- this.pageInfo.current = value
- this.handleDataPageChange(value)
- }}
- onShowSizeChange={(current, pageSize) => {
- this.pageInfo = {current, pageSize}
- this.handleShowSizeChange(this.pageInfo)
- }}
- />
-
-
- {
- importModalVisible &&
{
- this.handleComparisonFinish()
- }}
- onCancel={() => {
- this.setState({
- importModalVisible: false
- })
- }}
- />
- }
-
-
-
+ getColumns(columns) {
+ let newColumns = [...columns];
+ newColumns.map(item => {
+ let n = Number(item.dataIndex);
+ if (!isNaN(n)) { // 数字
+ item.render = (text, record) => {
+ return (
+
+
系统值:{record[item.dataIndex].acctResultValue}
+
线下值:{record[item.dataIndex].excelResultValue}
+
差值:{this.calculateCompares(record[item.dataIndex].acctResultValue, record[item.dataIndex].excelResultValue)}
- )
- }
-}
\ No newline at end of file
+ );
+ };
+ }
+ });
+ return newColumns;
+ }
+
+ // 导入
+ handleImportClick() {
+ this.setState({
+ importModalVisible: true
+ });
+ }
+
+ // 分页变化
+ handleDataPageChange(value) {
+ const { calculateStore: { fetchComparisonResultList } } = this.props;
+ const { onlyDiffEmployee, onlyDiffSalaryItem } = this.state;
+
+ let params = {
+ onlyDiffEmployee,
+ onlyDiffSalaryItem,
+ salaryAcctRecordId: this.id,
+ current: value,
+ ...this.pageInfo
+ };
+ fetchComparisonResultList(params);
+ }
+
+ handleShowSizeChange(pageInfo) {
+ const { calculateStore: { fetchComparisonResultList } } = this.props;
+ const { onlyDiffEmployee, onlyDiffSalaryItem } = this.state;
+ let params = {
+ onlyDiffEmployee,
+ onlyDiffSalaryItem,
+ salaryAcctRecordId: this.id,
+ ...pageInfo
+ };
+ fetchComparisonResultList(params);
+ }
+
+ // 只显示有差异的人员 变化
+ onlyDiffEmployeeChange(value) {
+ let onlyDiffEmployee = value == 1 ? true : false;
+ this.setState({ onlyDiffEmployee });
+
+ const { calculateStore: { fetchComparisonResultList } } = this.props;
+ const { onlyDiffSalaryItem } = this.state;
+
+ let params = {
+ onlyDiffEmployee,
+ onlyDiffSalaryItem,
+ salaryAcctRecordId: this.id,
+ employeeName: this.state.searchValue,
+ current: 1
+ };
+
+ fetchComparisonResultList(params);
+ }
+
+ // 只显示有差异的薪资项目 变化
+ onlyDiffSalaryItemChange(value) {
+ let onlyDiffSalaryItem = value == 1 ? true : false;
+ this.setState({ onlyDiffSalaryItem });
+ const { calculateStore: { fetchComparisonResultList } } = this.props;
+ const { onlyDiffEmployee } = this.state;
+ let params = {
+ onlyDiffEmployee,
+ onlyDiffSalaryItem,
+ salaryAcctRecordId: this.id,
+ employeeName: this.state.searchValue,
+ current: 1
+ };
+ fetchComparisonResultList(params);
+ }
+
+ // 搜索
+ handleSearch(value) {
+ const { calculateStore: { fetchComparisonResultList } } = this.props;
+ const { onlyDiffEmployee, onlyDiffSalaryItem } = this.state;
+ let params = {
+ onlyDiffEmployee,
+ onlyDiffSalaryItem,
+ salaryAcctRecordId: this.id,
+ employeeName: value,
+ current: 1
+ };
+ fetchComparisonResultList(params);
+ }
+
+ // 导出
+ handleExportClick() {
+ window.open(
+ '/api/bs/hrmsalary/salaryacct/comparisonresult/export?salaryAcctRecordId=' + this.id
+ );
+ }
+
+ // 线下对比导入
+ handleComparisonFinish() {
+ this.pageInfo.current = 1;
+ this.pageInfo.pageSize = 10;
+ this.handleSearch(this.state.searchValue);
+ }
+
+ render() {
+ const {
+ calculateStore: {
+ comparisonResultPageInfo,
+ comparisonResultTableStore,
+ loading,
+ comparisonResultColumns
+ }
+ } = this.props;
+ const { importModalVisible, searchValue } = this.state;
+ const renderRightOperation = () => {
+ return (
+
+
+
+ {
+ this.setState({
+ searchValue: value
+ });
+ }} onSearch={(value) => {
+ this.handleSearch(value);
+ }}/>
+
+ );
+ };
+
+ const renderLeftOperation = () => {
+ return (
+
+ {
+ this.onlyDiffEmployeeChange(value);
+ }}
+ />
+ {
+ this.onlyDiffSalaryItemChange(value);
+ }}
+ />
+
+ );
+ };
+ return (
+
+
+
+
+
+ {
+ this.pageInfo.current = value;
+ this.handleDataPageChange(value);
+ }}
+ onShowSizeChange={(current, pageSize) => {
+ this.pageInfo = { current, pageSize };
+ this.handleShowSizeChange(this.pageInfo);
+ }}
+ />
+
+
+ {
+ importModalVisible &&
{
+ this.handleComparisonFinish();
+ }}
+ onCancel={() => {
+ this.setState({
+ importModalVisible: false
+ });
+ }}
+ />
+ }
+
+ );
+ }
+}
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetailImportModal.js b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetailImportModal.js
index db961055..1439fc20 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetailImportModal.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetailImportModal.js
@@ -1,85 +1,98 @@
-import React from 'react'
-import ImportModal from '../../components/importModal'
-import { inject, observer } from 'mobx-react';
+import React from "react";
+import ImportModal from "../../components/importModal";
+import { inject, observer } from "mobx-react";
-@inject('calculateStore')
+@inject("calculateStore")
@observer
export default class CompareDetailImportModal extends React.Component {
- constructor(props) {
- super(props)
- this.state = {
- step: 0,
- modalParam: {
- salaryAcctRecordId: ""
- }
+ constructor(props) {
+ super(props);
+ this.state = {
+ step: 0,
+ modalParam: {
+ salaryAcctRecordId: ""
+ }
+ };
+ }
+
+ componentWillMount() {
+ const { id } = this.props;
+ let modalParam = { ...this.state.modalParam };
+ modalParam.salaryAcctRecordId = id;
+ this.setState({
+ modalParam
+ });
+ }
+
+ // 设置步骤
+ setStep(step) {
+ this.setState({ step });
+ }
+
+ handleTemplateLink() {
+ window.open(
+ "/api/bs/hrmsalary/salaryacct/comparisonresult/importtemplate/export?salaryAcctRecordId=" + this.props.id
+ );
+ }
+
+ // 初始化导入参数
+ handleInitImportModal() {
+ const {
+ calculateStore: {
+ setComparisonPreviewColumns,
+ setComparisonPreviewDataSource,
+ setComparisonImportAcctResult
+ }
+ } = this.props;
+ setComparisonPreviewColumns([]);
+ setComparisonPreviewDataSource([]);
+ setComparisonImportAcctResult({});
+ }
+
+ render() {
+ const { visiable } = this.props;
+ const { step, modalParam } = this.state;
+ const { calculateStore } = this.props;
+ const {
+ previewComparisonResult,
+ comparisonPreviewColumns,
+ comparisonPreviewDataSource,
+ importComparisonExcelAcctResult,
+ comparisonImportAcctResult
+ } = calculateStore;
+ return (
+
+ {
+ visiable &&
{
+ this.handleInitImportModal();
+ }}
+ params={modalParam}
+ columns={comparisonPreviewColumns}
+ step={step}
+ setStep={this.setStep.bind(this)}
+ slideDataSource={comparisonPreviewDataSource}
+ importResult={comparisonImportAcctResult}
+ onFinish={() => {
+ this.props.onCancel();
+ this.props.onFinish();
+ }}
+ previewImport={(params) => {
+ previewComparisonResult(params);
+ }}
+ importFile={(params) => {
+ importComparisonExcelAcctResult(params);
+ }}
+ templateLink={() => {
+ this.handleTemplateLink();
+ }}
+ visiable={visiable}
+ onCancel={() => {
+ this.props.onCancel();
+ }}
+ />
}
- }
-
- componentWillMount() {
- const { id } = this.props;
- let modalParam = { ...this.state.modalParam }
- modalParam.salaryAcctRecordId = id
- this.setState({
- modalParam
- })
- }
-
- // 设置步骤
- setStep(step) {
- this.setState({step})
- }
-
- handleTemplateLink() {
- const { calculateStore: { exportImportTemplate }} = this.props;
- exportImportTemplate(this.props.id)
- }
-
- // 初始化导入参数
- handleInitImportModal() {
- const { calculateStore: {setComparisonPreviewColumns, setComparisonPreviewDataSource, setComparisonImportAcctResult}} = this.props;
- setComparisonPreviewColumns([])
- setComparisonPreviewDataSource([])
- setComparisonImportAcctResult({})
- }
-
- render() {
- const { visiable } = this.props;
- const { step, modalParam } = this.state;
- const { calculateStore } = this.props
- const { previewComparisonResult, comparisonPreviewColumns, comparisonPreviewDataSource, importComparisonExcelAcctResult, comparisonImportAcctResult } = calculateStore
- return (
-
- {
- visiable && {
- this.handleInitImportModal()
- }}
- params={modalParam}
- columns={comparisonPreviewColumns}
- step={step}
- setStep={this.setStep.bind(this)}
- slideDataSource={comparisonPreviewDataSource}
- importResult={comparisonImportAcctResult}
- onFinish={() => {
- this.props.onCancel();
- this.props.onFinish();
- }}
- previewImport={(params) => {
-previewComparisonResult(params)
-}}
- importFile={(params) => {
-importComparisonExcelAcctResult(params)
-}}
- templateLink={ () => {
- this.handleTemplateLink()
-}}
- visiable={visiable}
- onCancel={() => {
- this.props.onCancel()
-}}
- />
- }
-
- )
- }
-}
\ No newline at end of file
+
+ );
+ }
+}
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/editSalaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/editSalaryDetail.js
index ccc8f6c9..385fa87b 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/editSalaryDetail.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/editSalaryDetail.js
@@ -1,132 +1,157 @@
-import React from 'react'
-import { WeaHelpfulTip, WeaInput } from "ecCom"
-import { Row, Col } from 'antd'
-import { inject, observer } from 'mobx-react';
-import "./index.less"
+import React from "react";
+import { WeaHelpfulTip, WeaInput } from "ecCom";
+import { Col, Row } from "antd";
+import { inject, observer } from "mobx-react";
+import cs from "classnames";
+import "./index.less";
-@inject('calculateStore')
+@inject("calculateStore")
@observer
export default class EditSalaryDetail extends React.Component {
- componentWillMount() {
- const { calculateStore: {acctresultDetail}} = this.props;
- acctresultDetail(this.props.id)
- }
+ componentWillMount() {
+ const { calculateStore: { acctresultDetail } } = this.props;
+ acctresultDetail(this.props.id);
+ }
- handleItemValueChange(field, value, isInput) {
- const { calculateStore: { acctresultDetailForm, setAcctresultDetailForm }} = this.props;
- let form = {...acctresultDetailForm}
- if(isInput) {
- form.inputItems = acctresultDetailForm.inputItems.map(item => {
- item = {...item}
- if(item.salaryItemName == field) {
- item.resultValue = value
- }
- return item;
- })
- } else {
- form.formulaItems = acctresultDetailForm.formulaItems.map(item => {
- item = {...item}
- if(item.salaryItemName == field) {
- item.resultValue = value
- }
- return item;
- })
+ handleItemValueChange(field, value, isInput) {
+ const { calculateStore: { acctresultDetailForm, setAcctresultDetailForm } } = this.props;
+ let form = { ...acctresultDetailForm };
+ if (isInput) {
+ form.inputItems = acctresultDetailForm.inputItems.map(item => {
+ item = { ...item };
+ if (item.salaryItemName == field) {
+ item.resultValue = value;
}
- setAcctresultDetailForm(form)
+ return item;
+ });
+ } else {
+ form.formulaItems = acctresultDetailForm.formulaItems.map(item => {
+ item = { ...item };
+ if (item.salaryItemName == field) {
+ item.resultValue = value;
+ }
+ return item;
+ });
}
+ setAcctresultDetailForm(form);
+ }
+
+ renderTableTr = (data, isInput) => {
+ const tables = [];
+ const len = data.length;
+ const rowNum = 3;
+ const sumRows = len % rowNum;
+ const sumRowMod = len / rowNum;
+ const rows = (sumRows == 0 ? sumRowMod : sumRowMod + 1);
+ for (let j = 0; j < rows; j++) {
+ let iLen = (j + 1) * rowNum;
+ iLen = iLen > len ? len : iLen;
+ tables.push("");
+ for (let i = j * rowNum; i < iLen; i++) {
+ if (!isInput) {
+ const label = data[i].fieldName;
+ const value = data[i].fieldValue || "-";
+ tables.push("| " + label + " | " + "" + value + " | ");
+ }
+ }
+ tables.push("
");
+ }
+ return tables;
+ };
- render() {
- const { calculateStore: { acctresultDetailForm }} = this.props;
- return (
-
-
-
- 基本信息
-
-
+ render() {
+ const { calculateStore: { acctresultDetailForm } } = this.props;
+ return (
+
+
+
+ 基本信息
+
+
-
-
- {
- acctresultDetailForm.employeeInfos && acctresultDetailForm.employeeInfos.map(item => {
- return (
-
-
- {item.fieldName}
- {item.fieldValue}
-
-
- )
- })
- }
+
+ {
+ !_.isEmpty(acctresultDetailForm.employeeInfos) &&
+
+ }
+
+
+
+
+
+
输入项
+
+
+ {
+ acctresultDetailForm.inputItems && acctresultDetailForm.inputItems.map((item, index) => {
+ const len = acctresultDetailForm.inputItems.length;
+ return (
+
+
+ {item.salaryItemName}
+ {
+ this.handleItemValueChange(item.salaryItemName, value, true);
+ }}/>
-
-
-
-
-
- 输入项
-
-
-
-
- {
- acctresultDetailForm.inputItems && acctresultDetailForm.inputItems.map(item => {
- return (
-
-
- {item.salaryItemName}
- {
- this.handleItemValueChange(item.salaryItemName, value, true)
- }}/>
-
-
- )
- })
- }
-
-
-
-
-
-
-
-
- 公式项
-
-
-
-
-
- {
- acctresultDetailForm.formulaItems && acctresultDetailForm.formulaItems.map(item => {
- return (
-
-
- {item.salaryItemName}
- {
- this.handleItemValueChange(item.salaryItemName, value, false)
- }}/>
-
-
- )
- })
- }
-
-
-
+
+ );
+ })
+ }
+
- )
- }
+
+
+
+
+
+
+
+ 公式项
+
+
+
+
+ {
+ acctresultDetailForm.formulaItems && acctresultDetailForm.formulaItems.map((item, index) => {
+ const len = acctresultDetailForm.formulaItems.length;
+ return (
+
+
+ {item.salaryItemName}
+ {
+ this.handleItemValueChange(item.salaryItemName, value, false);
+ }}/>
+
+
+ );
+ })
+ }
+
+
+
+
+
+ );
+ }
}
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js
index cbe8bab7..de8d75f1 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js
@@ -197,8 +197,9 @@ export default class CalculateDetail extends React.Component {
this.id
);
} else if (e.key == "3") {
- const { calculateStore: { exportAll } } = this.props;
- exportAll(this.id);
+ window.open(
+ '/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=' + this.id +"&ids="
+ );
}
};
@@ -248,11 +249,10 @@ export default class CalculateDetail extends React.Component {
return [
,
-
+
更多
];
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.less b/pc4mobx/hrmSalary/pages/calculateDetail/index.less
index 83d4da63..8bb981ce 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/index.less
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.less
@@ -16,9 +16,11 @@
display: flex;
align-items: center;
justify-content: space-between;
- .wea-tab{
- border-bottom: none!important;
+
+ .wea-tab {
+ border-bottom: none !important;
}
+
.crumbsWrapper {
display: inline-block;
@@ -34,15 +36,19 @@
.crumbsOperateWrapper {
flex: 1;
- .wea-advanced-search{
- right: 0!important;
+
+ .wea-advanced-search {
+ right: 0 !important;
}
- .wea-advanced-searchsAd{
- height: inherit!important;
+
+ .wea-advanced-searchsAd {
+ height: inherit !important;
}
- .wea-search-tab{
+
+ .wea-search-tab {
padding-right: 0;
- .iconItem{
+
+ .iconItem {
color: #2db7f5;
cursor: pointer;
}
@@ -76,9 +82,9 @@
}
}
-
.editSalaryDetail {
padding: 20px;
+ padding-bottom: 40px;
.detailItemWrapper {
.itemTitle {
@@ -89,6 +95,73 @@
.itemContent {
margin-top: 10px;
+
+ table {
+ table-layout: fixed;
+ border-collapse: collapse;
+ width: 100%;
+ border: 1px solid rgba(0, 0, 0, .06);
+
+ .descriptions-row {
+ .descriptions-item-label {
+ background-color: #fafafa;
+ padding: 12px 6px;
+ color: #000000d9;
+ font-weight: 400;
+ font-size: 12px;
+ line-height: 1.5715;
+ text-align: start;
+ border: 1px solid rgba(0, 0, 0, .06);
+ min-width: 100px;
+ max-width: 100px;
+ }
+
+ .descriptions-item-content {
+ padding: 12px 6px;
+ display: table-cell;
+ flex: 1;
+ color: #000000d9;
+ font-size: 12px;
+ line-height: 1.5715;
+ word-break: break-word;
+ overflow-wrap: break-word;
+ border-collapse: collapse;
+ border: 1px solid rgba(0, 0, 0, .06);
+ }
+ }
+ }
+
+ & > .ant-row {
+ border: 1px solid rgba(0, 0, 0, .06);
+ }
+
+ .itemLabel {
+ background-color: #fafafa;
+ padding: 12px 6px;
+ height: 45px;
+ display: flex;
+ align-items: center;
+ justify-content: flex-start;
+ border-right: 1px solid rgba(0, 0, 0, .06);
+ border-bottom: 1px solid rgba(0, 0, 0, .06);
+ }
+
+ .borderB-none {
+ border-bottom: none !important;
+ }
+
+ .borderR-none {
+ border-right: none !important;
+ }
+
+ .itemValue {
+ padding: 12px 6px;
+ display: flex;
+ align-items: center;
+ height: 45px;
+ border-right: 1px solid rgba(0, 0, 0, .06);
+ border-bottom: 1px solid rgba(0, 0, 0, .06);
+ }
}
}
@@ -98,13 +171,13 @@
}
.placeOnFileDetail {
- padding: 20px;
height: 100%;
- overflow-y: scroll;
+ overflow-y: auto;
.tabWrapper {
height: 47px;
line-height: 47px;
+ padding-left: 16px;
}
.tableWrapper {
@@ -145,9 +218,13 @@
}
.compareDetail {
- overflow-y: scroll;
+ overflow-y: auto;
height: 100%;
- padding: 20px;
+
+ .tabWrapper {
+ align-items: center;
+ padding-left: 10px;
+ }
.titleBarWrapper {
height: 47px;
@@ -156,9 +233,43 @@
.rightTitle {
float: right;
}
+
+ .titleBar {
+ padding-right: 10px;
+ }
}
.tableWrapper {
margin-top: 10px;
}
}
+
+.slideOuterWrapper {
+ .wea-slide-modal-title {
+ height: initial;
+ line-height: initial;
+ text-align: left;
+ }
+
+ .rodal-close {
+ z-index: 99;
+ top: 10px !important;
+ }
+
+}
+
+@media (min-width: 1260px) {
+ .slideOuterWrapper {
+ .reqTopWrapper .wea-new-top-req-title > div:first-child > div {
+ max-width: 100% !important;
+ }
+ }
+}
+
+@media screen and (min-width: 1060px) and (max-width: 1260px) {
+ .slideOuterWrapper {
+ .reqTopWrapper .wea-new-top-req-title > div:first-child > div {
+ max-width: calc(100% - 96px) !important;
+ }
+ }
+}
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js
index c0cd6fb1..e17ef734 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js
@@ -1,12 +1,12 @@
import React from "react";
import { WeaHelpfulTip, WeaSlideModal } from "ecCom";
import WarningModal from "./warningModal";
-import "./index.less";
import EditSalaryDetail from "./editSalaryDetail";
import SlideModalTitle from "../../components/slideModalTitle";
import { getQueryString } from "../../util/url";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
+import "./index.less";
@inject("calculateStore", "taxAgentStore")
@observer
@@ -156,6 +156,7 @@ export default class SalaryDetail extends React.Component {
{
slideVisiable &&
{this.state.inited &&
- }
+ }}/>}
{
this.props.onCancel();
}}
+ initLoadCss
+ className="associatesWrapper"
style={{ width: 600 }}
title="关联人员"
buttons={[
@@ -92,16 +94,12 @@ export default class AddUserModal extends React.Component {
重置
]}>
-
+
-
- 对象类型
-
-
+ 对象类型:
-
+
{
@@ -113,6 +111,7 @@ export default class AddUserModal extends React.Component {
{this.state.selectedKey == "EMPLOYEE" && (
-
- 选择员工状态
-
-
+ 选择员工状态:
- this.onRadioChange(e)}
- value={this.state.radioValue}>
- 全部
- 在职
- 离职
-
+ value={this.state.radioValue}
+ options={
+ [
+ { key: "", showname: "" },
+ { key: "ALL", showname: "全部" },
+ { key: "NORMAL", showname: "在职" },
+ { key: "UNAVAILABLE", showname: "离职" }
+ ]
+ }
+ />
diff --git a/pc4mobx/hrmSalary/pages/ledger/copyFormModal.js b/pc4mobx/hrmSalary/pages/ledger/copyFormModal.js
index 4516f676..69e28d14 100644
--- a/pc4mobx/hrmSalary/pages/ledger/copyFormModal.js
+++ b/pc4mobx/hrmSalary/pages/ledger/copyFormModal.js
@@ -33,6 +33,11 @@ export default class CopyFormModal extends React.Component {
]}
>
-
+
- 薪资项目
+ 薪资项目:
{
initedSelect &&
@@ -125,7 +125,7 @@ export default class RuleEditModal extends React.Component {
- 计薪规则
+ 计薪规则:
{
item = { ...item };
if (item.dataIndex == "salaryItem") {
- item.title = {item.title};
+ item.title = {item.title};
item.render = (text, record) => {
return (
-