From 0cec0873fe2c96421736311c8d22624831740754 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Tue, 13 Sep 2022 16:39:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E6=89=80=E6=9C=89=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BD=A0=E7=9A=84=E5=BC=B9=E6=A1=86=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E6=8A=BD=E5=B1=89=E5=A4=B4=E9=83=A8=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/components/importModal/index.js | 71 ++-- .../components/importModal/index.less | 7 + .../components/importModal/modalStep1.js | 7 +- .../components/importModal/modalStep2.js | 10 +- .../components/importModal/modalStep3.js | 19 +- .../components/selectItemsModal/index.js | 158 +++---- .../selectItemsModal/selectItemsWrapper.js | 138 +++--- .../components/slideModalTitle/index.js | 96 +++-- .../components/slideModalTitle/index.less | 9 +- .../hrmSalary/components/stepSlide/index.js | 65 +-- pc4mobx/hrmSalary/index.js | 6 +- .../pages/calculate/baseFormModal.js | 88 ++-- pc4mobx/hrmSalary/pages/calculate/index.js | 2 +- pc4mobx/hrmSalary/pages/calculate/index.less | 7 + .../importModal/selectFieldModal.js | 225 +++++----- .../pages/calculateDetail/userSure.js | 4 +- .../pages/dataAcquisition/attendance/index.js | 11 +- .../dataAcquisition/attendance/index.less | 36 ++ .../attendance/refereAttendFormModal.js | 365 ++++++++-------- .../pages/dataAcquisition/cumDeduct/index.js | 14 +- .../dataAcquisition/cumDeduct/index.less | 28 ++ .../dataAcquisition/cumSituation/index.js | 12 +- .../dataAcquisition/cumSituation/index.less | 27 ++ .../dataAcquisition/otherDeduct/index.js | 50 +-- .../dataAcquisition/otherDeduct/index.less | 29 +- .../hrmSalary/pages/declare/generateModal.js | 101 +++-- pc4mobx/hrmSalary/pages/declare/index.js | 8 +- pc4mobx/hrmSalary/pages/declare/index.less | 20 +- .../hrmSalary/pages/ledger/addUserModal.js | 70 ++-- .../hrmSalary/pages/ledger/calcRulesForm.js | 13 +- .../hrmSalary/pages/ledger/copyFormModal.js | 13 +- pc4mobx/hrmSalary/pages/ledger/index.js | 143 +++---- pc4mobx/hrmSalary/pages/ledger/index.less | 92 +++- .../hrmSalary/pages/ledger/salaryItemForm.js | 9 +- .../hrmSalary/pages/ledger/slideRefereUser.js | 37 +- .../pages/ledger/step3/AddCategoryModal.js | 86 ++-- .../pages/ledger/step3/AddSalaryItemModal.js | 254 ++++++------ .../pages/ledger/step3/UserInfoSelect.js | 160 +++---- .../pages/ledger/step3/canMoveItem.js | 87 ++-- .../pages/ledger/step3/previewSalaryModal.js | 127 +++--- .../pages/ledger/step4/RuleEditModal.js | 6 +- pc4mobx/hrmSalary/pages/mySalary/index.js | 2 +- pc4mobx/hrmSalary/pages/payroll/copyModal.js | 106 +++-- pc4mobx/hrmSalary/pages/payroll/index.js | 165 ++++---- .../pages/payroll/payrollDetail/index.js | 392 +++++++++--------- .../pages/payroll/payrollDetail/index.less | 24 +- .../pages/payroll/payrollGrant/index.js | 56 ++- .../pages/payroll/payrollGrant/index.less | 20 +- .../payroll/payrollGrant/payrollGrantModal.js | 157 ++++--- .../payrollGrant/payrollWithdrawModal.js | 153 ++++--- .../pages/payroll/stepForm/baseInformForm.js | 79 +--- pc4mobx/hrmSalary/pages/salaryFile/index.js | 51 ++- .../pages/salaryItem/deleteSalaryItemModal.js | 195 ++++----- .../pages/salaryItem/formalFormModal.js | 52 +-- pc4mobx/hrmSalary/pages/salaryItem/index.js | 53 +-- pc4mobx/hrmSalary/pages/salaryItem/index.less | 6 + .../pages/salaryItem/systemSalaryItemModal.js | 56 +-- .../socialSecurityBenefits/archives/index.js | 40 +- .../archives/index.less | 28 ++ .../programme/customNewModal.js | 78 ++-- .../socialSecurityBenefits/programme/index.js | 9 +- .../programme/index.less | 30 +- .../components/abnormalList.js | 2 +- .../standingBookDetail/components/normal.js | 16 +- .../standingBookDetail/components/overView.js | 2 +- pc4mobx/hrmSalary/pages/sysConfig/index.js | 136 ++++++ .../pages/taxAgent/slideTaxagentUser.js | 40 +- pc4mobx/hrmSalary/stores/ledger.js | 5 + pc4mobx/hrmSalary/stores/programme.js | 28 +- pc4mobx/hrmSalary/stores/salaryItem.js | 1 - 70 files changed, 2596 insertions(+), 2096 deletions(-) create mode 100644 pc4mobx/hrmSalary/components/importModal/index.less create mode 100644 pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.less create mode 100644 pc4mobx/hrmSalary/pages/sysConfig/index.js diff --git a/pc4mobx/hrmSalary/components/importModal/index.js b/pc4mobx/hrmSalary/components/importModal/index.js index 54b1251e..d55f207c 100644 --- a/pc4mobx/hrmSalary/components/importModal/index.js +++ b/pc4mobx/hrmSalary/components/importModal/index.js @@ -1,15 +1,14 @@ import React from "react"; -import { WeaSteps } from "ecCom"; -import { message, Modal, Upload } from "antd"; +import { WeaDialog, WeaSteps } from "ecCom"; +import { Button, message } from "antd"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; +import "./index.less"; import ModalStep1 from "./modalStep1"; import ModalStep2 from "./modalStep2"; import ModalStep3 from "./modalStep3"; -const Dragger = Upload.Dragger; - const Step = WeaSteps.Step; @inject("taxAgentStore") @@ -40,15 +39,17 @@ export default class ImportModal extends React.Component { } validateDate() { - // const { params } = this.props; + const { params } = this.props; let flag = true; try { - // params && Object.keys(params).forEach((key) => { - // if (!params[key] || params[key] == "") { - // message.warning("请完善导入选项"); - // throw new Error("请完善导入选项"); - // } - // }); + if(this.props.renderFormComponent){ + params && Object.keys(params).forEach((key) => { + if (!params[key] || params[key] == "") { + message.warning("请完善导入选项"); + throw new Error("请完善导入选项"); + } + }); + } } catch (e) { flag = false; } @@ -70,12 +71,12 @@ export default class ImportModal extends React.Component { handlePreviewDate() { const { fileId } = this.state; const { params, isStandingBook } = this.props; - if(!isStandingBook){ + if (!isStandingBook) { this.props.previewImport({ ...params, imageId: fileId }); - }else{ + } else { this.props.previewImport({ imageId: fileId }); @@ -85,12 +86,12 @@ export default class ImportModal extends React.Component { hanleImportData() { const { fileId } = this.state; const { params, isStandingBook } = this.props; - if(!isStandingBook){ + if (!isStandingBook) { this.props.importFile({ ...params, imageId: fileId }); - }else{ + } else { this.props.importFile({ imageId: String(fileId) }); @@ -100,10 +101,25 @@ export default class ImportModal extends React.Component { render() { const { step, slideDataSource, isInit, isStandingBook } = this.props; return ( - this.handleStep1Next()}>下一步 + ] : this.props.step === 1 ? [ + , + + ] : [ + + ] + } >
@@ -122,32 +138,23 @@ export default class ImportModal extends React.Component { onFileIdChange={(fileId) => { this.setState({ fileId }); }} - onStep1Next={() => { - this.handleStep1Next(); - }}/>) + />) } { this.props.step == 1 && ( this.handlePreviewDate()} dataSource={slideDataSource} columns={this.props.columns} - onStep2Next={() => { - this.nextStep(); - this.hanleImportData(); - }} onStep2Pre={() => { - this.preStep(); - }}/>) + />) } { this.props.step == 2 && ( this.hanleImportData()} importResult={toJS(this.props.importResult)} - onFinish={() => { - this.props.onFinish(); - }}/>) + />) } - + ); } } diff --git a/pc4mobx/hrmSalary/components/importModal/index.less b/pc4mobx/hrmSalary/components/importModal/index.less new file mode 100644 index 00000000..e55d83b8 --- /dev/null +++ b/pc4mobx/hrmSalary/components/importModal/index.less @@ -0,0 +1,7 @@ +.importModalWrapper{ + .wea-dialog-body{ + height: 80vh; + overflow: hidden auto; + padding: 16px; + } +} diff --git a/pc4mobx/hrmSalary/components/importModal/modalStep1.js b/pc4mobx/hrmSalary/components/importModal/modalStep1.js index c367b944..d676620e 100644 --- a/pc4mobx/hrmSalary/components/importModal/modalStep1.js +++ b/pc4mobx/hrmSalary/components/importModal/modalStep1.js @@ -70,8 +70,8 @@ export default class ModalStep1 extends React.Component { } }; return ( -
-
+
+
{ this.props.formComponent &&
@@ -152,9 +152,6 @@ export default class ModalStep1 extends React.Component {
-
- -
); } diff --git a/pc4mobx/hrmSalary/components/importModal/modalStep2.js b/pc4mobx/hrmSalary/components/importModal/modalStep2.js index dc2cdefa..e3f140fe 100644 --- a/pc4mobx/hrmSalary/components/importModal/modalStep2.js +++ b/pc4mobx/hrmSalary/components/importModal/modalStep2.js @@ -1,5 +1,4 @@ import React from "react"; -import { Button } from "antd"; import { WeaTable } from "ecCom"; export default class ModalStep2 extends React.Component { @@ -11,15 +10,10 @@ export default class ModalStep2 extends React.Component { render() { const { dataSource, columns } = this.props; return ( -
-
+
+
-
- - -
); } diff --git a/pc4mobx/hrmSalary/components/importModal/modalStep3.js b/pc4mobx/hrmSalary/components/importModal/modalStep3.js index c836622a..c3532c07 100644 --- a/pc4mobx/hrmSalary/components/importModal/modalStep3.js +++ b/pc4mobx/hrmSalary/components/importModal/modalStep3.js @@ -1,6 +1,6 @@ import React from "react"; import successImg from "./success.svg"; -import { Button, Spin } from "antd"; +import { Spin } from "antd"; import { WeaTable } from "ecCom"; export default class ModalStep3 extends React.Component { @@ -33,7 +33,7 @@ export default class ModalStep3 extends React.Component { 正在导入请稍后...
:
- +
数据导入完成
@@ -47,12 +47,7 @@ export default class ModalStep3 extends React.Component { 条数据
} -
+
{
-
- -
); } diff --git a/pc4mobx/hrmSalary/components/selectItemsModal/index.js b/pc4mobx/hrmSalary/components/selectItemsModal/index.js index c86f957f..27cc02a7 100644 --- a/pc4mobx/hrmSalary/components/selectItemsModal/index.js +++ b/pc4mobx/hrmSalary/components/selectItemsModal/index.js @@ -1,91 +1,93 @@ /* * Author: 黎永顺 - * Description: + * Description: * Date: 2022-05-19 15:18:09 * LastEditTime: 2022-06-29 10:06:13 */ -import React from 'react'; -import { WeaInputSearch, WeaCheckbox } from 'ecCom' -import { Row , Col, Modal, Dropdown, Menu, Button } from "antd" +import React from "react"; +import { WeaCheckbox, WeaInputSearch, WeaDialog } from "ecCom"; +import { Button, Dropdown, Menu, Modal } from "antd"; +import "../../pages/dataAcquisition/attendance/index.less" -import SelectItemsWrapper from './selectItemsWrapper' export const items = [ - { - key: "1", - title: "测试", - checked: false - }, - { - key: "2", - title: "测试2", - checked: true - } -] + { + key: "1", + title: "测试", + checked: false + }, + { + key: "2", + title: "测试2", + checked: true + } +]; export default class SelectItemModal extends React.Component { - constructor(props) { - super(props) - this.state = { - searchValue: "" - } - } + constructor(props) { + super(props); + this.state = { + searchValue: "" + }; + } - handleShowChecked(value) { - value = value == 1 ? true : false - this.props.onShowChecked(value) - } - - handleMenuClick(e) { - if(e.key == "1") { //恢复默认设置 - this.props.onRestoreDefault() - } else if(e.key == "2") { - this.props.onSetDefault() - } else if(e.key == "3") { - - } - } + handleShowChecked(value) { + value = value == 1 ? true : false; + this.props.onShowChecked(value); + } + + handleMenuClick(e) { + if (e.key == "1") { //恢复默认设置 + this.props.onRestoreDefault(); + } else if (e.key == "2") { + this.props.onSetDefault(); + } else if (e.key == "3") { - render(){ - const menu = ( - this.handleMenuClick(e)}> - 恢复默认设置 - 设置默认设置 - {/* 操作日志 */} - - ); - return ( - -
- 导入字段设置 - { - this.setState({searchValue: value}) - }} - onSearch={(value) => { - this.props.onSearch(value) - }} - /> -
- {this.props.children} - -
-
- { -this.handleShowChecked(value) -}}/> -
-
- - 更多 -
-
-
- ) } -} \ No newline at end of file + } + + render() { + const menu = ( + this.handleMenuClick(e)}> + 恢复默认设置 + 设置默认设置 + {/* 操作日志 */} + + ); + return ( + { + this.props.onSave(); + }}>保存, + 更多 + ]} + > +
+ { + this.setState({ searchValue: value }); + }} + onSearch={(value) => { + this.props.onSearch(value); + }} + /> +
+ {this.props.children} +
+ { + this.handleShowChecked(value); + }}/> +
+
+ ); + } +} diff --git a/pc4mobx/hrmSalary/components/selectItemsModal/selectItemsWrapper.js b/pc4mobx/hrmSalary/components/selectItemsModal/selectItemsWrapper.js index 275f0165..b29f38b8 100644 --- a/pc4mobx/hrmSalary/components/selectItemsModal/selectItemsWrapper.js +++ b/pc4mobx/hrmSalary/components/selectItemsModal/selectItemsWrapper.js @@ -1,76 +1,78 @@ -import React from 'react' -import { WeaCheckbox } from 'ecCom'; -import { Row, Col, Icon } from 'antd'; +import React from "react"; +import { WeaCheckbox } from "ecCom"; +import { Col, Icon, Row } from "antd"; export default class SelectItemsWrapper extends React.Component { - constructor(props) { - super(props); - this.state = { - showContent: true, - checkStatus: false - } - } + constructor(props) { + super(props); + this.state = { + showContent: true, + checkStatus: false + }; + } - handleAllChecked(value) { - value = value == 1 ? true : false - let items = [...this.props.items] - items.map(item => { - item.checked = value -}) - this.setState({ - checkStatus: value - }) - this.props.onChange(items) - } + handleAllChecked(value) { + value = value == 1 ? true : false; + let items = [...this.props.items]; + items.map(item => { + item.checked = value; + }); + this.setState({ + checkStatus: value + }); + this.props.onChange(items); + } - handleItemChange(value, record) { - value = value == 1 ? true : false - let items = [...this.props.items] - items.map(item => { - if(item.id == record.id) { - item.checked = value - } - }) - this.props.onChange(items) - } + handleItemChange(value, record) { + value = value == 1 ? true : false; + let items = [...this.props.items]; + items.map(item => { + if (item.id == record.id) { + item.checked = value; + } + }); + this.props.onChange(items); + } - render() { - return ( -
-
-
{this.props.title}} onChange={(value) => { -this.handleAllChecked(value) -}} value={this.state.checkStatus}/>
-
this.setState({ - showContent: !this.state.showContent - })}>已选中{this.props.items ? this.props.items.filter(item => item.checked).length : 0}个字段 - + render() { + return ( +
+
+
{this.props.title}} onChange={(value) => { + this.handleAllChecked(value); + }} value={this.state.checkStatus}/>
+
this.setState({ + showContent: !this.state.showContent + })}>已选中{this.props.items ? this.props.items.filter(item => item.checked).length : 0}个字段 + { - this.state.showContent ? : + this.state.showContent ? : } -
-
- { - this.state.showContent &&
- - { - this.props.items && this.props.items.map(item => ( - { -this.handleItemChange(value, item) -}}/> - )) - } - -
- } - -
- ) - } -} \ No newline at end of file +
+
+ { + this.state.showContent &&
+ + { + this.props.items && this.props.items.map(item => ( + { + this.handleItemChange(value, item); + }}/> + )) + } + +
+ } + +
+ ); + } +} diff --git a/pc4mobx/hrmSalary/components/slideModalTitle/index.js b/pc4mobx/hrmSalary/components/slideModalTitle/index.js index 19c3d49b..0b09bc29 100644 --- a/pc4mobx/hrmSalary/components/slideModalTitle/index.js +++ b/pc4mobx/hrmSalary/components/slideModalTitle/index.js @@ -1,48 +1,72 @@ -import React from 'react' -import { Button } from 'antd'; -import "./index.less" +import React from "react"; +import { Button } from "antd"; +import { WeaReqTop } from "ecCom"; +import "./index.less"; export default class SlideModalTitle extends React.Component { componentWillMount() { // 初始化渲染页面 this.state = { editable: this.props.editable - } + }; } - componentWillReceiveProps(nextProps){ + + componentWillReceiveProps(nextProps) { this.setState({ editable: nextProps.editable - }) + }); } - render() { - 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} -
-
+ render() { + const { selectedTab, tabs, subtitle, customOperate, subItemChange } = this.props; + return
+ } + iconBgcolor="#F14A2D" + buttons={(this.props.showOperateBtn && this.state.editable && this.props.selectedTab != 1) ? [ + + ] : !_.isEmpty(customOperate) ? customOperate: []} + showDropIcon={false} + dropMenuDatas={[]} + tabDatas={tabs || []} + selectedKey={String(selectedTab) || ""} + 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/components/slideModalTitle/index.less b/pc4mobx/hrmSalary/components/slideModalTitle/index.less index 3f9e04af..1fadc267 100644 --- a/pc4mobx/hrmSalary/components/slideModalTitle/index.less +++ b/pc4mobx/hrmSalary/components/slideModalTitle/index.less @@ -52,4 +52,11 @@ right: 50px; top: 0px; } -} \ No newline at end of file +} + +.reqTopWrapper{ + .wea-new-top-req-wapper .wea-new-top-req-title>div:last-child{ + right: 16px!important; + } +} + diff --git a/pc4mobx/hrmSalary/components/stepSlide/index.js b/pc4mobx/hrmSalary/components/stepSlide/index.js index 549fb7de..d58989b9 100644 --- a/pc4mobx/hrmSalary/components/stepSlide/index.js +++ b/pc4mobx/hrmSalary/components/stepSlide/index.js @@ -1,34 +1,35 @@ -import React from 'react'; -import StepSlideHeader from './stepSlideHeader' -import { WeaSlideModal } from 'ecCom' -import { Button } from "antd" -import SlideModalTitle from '../../components/slideModalTitle' +import React from "react"; +import StepSlideHeader from "./stepSlideHeader"; +import { WeaSlideModal } from "ecCom"; +import SlideModalTitle from "../../components/slideModalTitle"; export default class StepSlide extends React.Component { - render() { - const { currentStep } = this.props; - return ( - - } - content={( - {this.props.content} - )} - onClose={() => this.props.onCancel()} - showMask={true} - closeMaskOnClick={() => this.props.onCancel()} /> - ) - } -} \ No newline at end of file + render() { + const { currentStep } = this.props; + return ( + + } + content={( + {this.props.content} + )} + onClose={() => this.props.onCancel()} + showMask={true} + closeMaskOnClick={() => this.props.onCancel()}/> + ); + } +} diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 0ee2ad37..0ca4fe47 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -24,9 +24,9 @@ import CalculateDetail from "./pages/calculateDetail"; import PlaceOnFileDetail from "./pages/calculateDetail/placeOnFileDetail"; import CompareDetail from "./pages/calculateDetail/compareDetail"; import GenerateDeclarationDetail from "./pages/declare/generateDeclarationDetail"; -import BaseForm from "./components"; import TemplatePreview from "./pages/payroll/templatePreview"; -import MobilePayroll from './pages/mobilePayroll' +import MobilePayroll from './pages/mobilePayroll'; +import SysConfig from './pages/sysConfig'; import stores from "./stores"; import "./style/index"; @@ -67,6 +67,7 @@ const DataAcquisition = (props) => props.children; // taxRate 个税税率表 // taxAgent 个税扣缴义务人 // mobilepayroll 移动端工资单 +// sysconfig 系統配置 const Routes = ( + ); diff --git a/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js b/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js index 3b85808c..44761173 100644 --- a/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js +++ b/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js @@ -1,14 +1,11 @@ import React from "react"; -import { Button, Col, message, Modal, Row, Select } from "antd"; -import RequiredLabelTip from "../../components/requiredLabelTip"; +import { Button, Col, message, Row } from "antd"; import { inject, observer } from "mobx-react"; -import { WeaDatePicker, WeaInput } from "ecCom"; +import { WeaDatePicker, WeaDialog, WeaError, WeaInput, WeaSelect } from "ecCom"; import { notNull } from "../../util/validate"; import "./index.less"; -const { Option } = Select; - @inject("calculateStore") @observer export default class baseFormModal extends React.Component { @@ -29,7 +26,10 @@ export default class baseFormModal extends React.Component { salaryacctGetForm().then(data => { this.setState({ inited: true, - selectOptions: data.salarySobs + selectOptions: _.isEmpty(data.salarySobs) ? [{ key: "", showname: "" }] : [{ + key: "", + showname: "" + }, ..._.map(data.salarySobs, it => ({ key: String(it.id), showname: it.name }))] }); }); } @@ -61,58 +61,80 @@ export default class baseFormModal extends React.Component { } validate() { + if (!notNull(this.state.salaryMonthStr) && !notNull(this.state.salarySob)) { + this.refs.weaError.showError(); + this.refs.weaError1.showError(); + return false; + } if (!notNull(this.state.salaryMonthStr)) { - message.warning("薪酬所属月不能为空"); + this.refs.weaError.showError(); return false; } else if (!notNull(this.state.salarySob)) { - message.warning("核算账套不能为空"); + this.refs.weaError1.showError(); return false; } return true; } render() { - const { salaryMonthStr, salarySobId, description } = this.state; + const { description } = this.state; return ( - { this.props.onCancel(); }} - footer={} + }}>保存]} > - 薪酬所属月 + 薪酬所属月 - { - this.setState({ - salaryMonthStr: value - }); - }} - /> + tipPosition="bottom" + ref="weaError" + error="请选择薪酬所属月"> + { + if(value === '') this.refs.weaError.showError(); + this.setState({ + salaryMonthStr: value + }); + }} + /> + - 核算账套 + 核算账套 { - this.state.inited && + this.state.inited && + + { + if(value === '') this.refs.weaError1.showError(); + this.handleSelectChange(value) + }} + value={this.state.salarySob} style={{ width: "100%" }}/> + } @@ -123,7 +145,7 @@ export default class baseFormModal extends React.Component { this.setState({ description: value })}/> - + ); } } diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js index 4cb6aa38..2d3bd189 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/index.js @@ -353,7 +353,7 @@ export default class Calculate extends React.Component { title="薪资核算" // 文字 icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 + showDropIcon={false} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) dropMenuProps={{ collectParams }}> {/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */} diff --git a/pc4mobx/hrmSalary/pages/calculate/index.less b/pc4mobx/hrmSalary/pages/calculate/index.less index e6b54dd0..1a510f08 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.less +++ b/pc4mobx/hrmSalary/pages/calculate/index.less @@ -1,6 +1,13 @@ .dataList-wrapper { + .ant-modal-body{ + padding: 16px 120px + } .formItem { + .wea-select, .ant-select { + width: 100%; + } .ant-select-selection { + width: 100%; height: 30px; border-radius: 0; } diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js index 6ee93a2b..5c51b0f1 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js @@ -1,7 +1,7 @@ import React from "react"; -import { Button, Col, Modal, Row } from "antd"; +import { Button, Col, Row } from "antd"; import { inject, observer } from "mobx-react"; -import { WeaCheckbox } from "ecCom"; +import { WeaCheckbox, WeaDialog } from "ecCom"; @inject("calculateStore", "standingBookStore") @observer @@ -15,7 +15,7 @@ export default class SelectFieldModal extends React.Component { componentWillMount() { const { calculateStore: { getImportField }, standingBookStore: { getWelfareList }, isStandingBook } = this.props; - if(!isStandingBook){ + if (!isStandingBook) { getImportField(this.props.id).then(data => { let fieldData = {}; let formulaItems = []; @@ -42,11 +42,11 @@ export default class SelectFieldModal extends React.Component { }); this.fieldData = fieldData; }); - }else{ + } else { getWelfareList().then(result => { let fieldData = {}; let formulaItems = []; - formulaItems = _.map(result, it => ({...it, salaryItemId: it.salaryItemName})); + formulaItems = _.map(result, it => ({ ...it, salaryItemId: it.salaryItemName })); if (this.props.fieldData.formulaItems) { formulaItems = this.props.fieldData.formulaItems; } @@ -56,7 +56,7 @@ export default class SelectFieldModal extends React.Component { fieldData }); this.fieldData = fieldData; - }) + }); } } @@ -143,116 +143,119 @@ export default class SelectFieldModal extends React.Component { render() { const { fieldData } = this.state; + const { isStandingBook } = this.props; return ( - { - this.props.onCancel(); - }} - footer={null} - > -
- 添加表头字段 - + ]} + > +
+ { + !_.isEmpty(fieldData.formulaItems) && +
+
+ { + this.handleTitleCheckboxChange(value, "formula"); + }}/> +
+
+ + {fieldData.formulaItems && fieldData.formulaItems.map(item => ( + + { + this.handleFormalChange(item, value, "formula"); + }}/> + ))} + +
+
+ } + + { + !_.isEmpty(fieldData.inputItems) && +
+
+ { + this.handleTitleCheckboxChange(value, "input"); + }}/> +
+
+ + {fieldData.inputItems && fieldData.inputItems.map(item => ( + + { + this.handleFormalChange(item, value, "input"); + }}/> + ))} + +
+
+ } + + { + !_.isEmpty(fieldData.sqlItems) && +
+
+ { + this.handleTitleCheckboxChange(value, "sql"); + }}/> +
+
+ + {fieldData.sqlItems && fieldData.sqlItems.map(item => ( + + { + this.handleFormalChange(item, value, "sql"); + }}/> + ))} + +
+
+ } + +
+ { + this.showSelectedChange(value); + }}/> +
- { - !_.isEmpty(fieldData.formulaItems) && -
-
- { - this.handleTitleCheckboxChange(value, "formula"); - }}/> -
-
- - {fieldData.formulaItems && fieldData.formulaItems.map(item => ( - - { - this.handleFormalChange(item, value, "formula"); - }}/> - ))} - -
-
- } - - { - !_.isEmpty(fieldData.inputItems) && -
-
- { - this.handleTitleCheckboxChange(value, "input"); - }}/> -
-
- - {fieldData.inputItems && fieldData.inputItems.map(item => ( - - { - this.handleFormalChange(item, value, "input"); - }}/> - ))} - -
-
- } - - { - !_.isEmpty(fieldData.sqlItems) && -
-
- { - this.handleTitleCheckboxChange(value, "sql"); - }}/> -
-
- - {fieldData.sqlItems && fieldData.sqlItems.map(item => ( - - { - this.handleFormalChange(item, value, "sql"); - }}/> - ))} - -
-
- } - -
- { - this.showSelectedChange(value); - }}/> -
- + ); } } diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js index 1a47e1a9..c4187e85 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js @@ -16,7 +16,7 @@ export default class UserSure extends React.Component { employeeName: "", departmentIds: "", positionIds: "", - status: 0 + status: "" }, selectedKey: "0", selectedRowKeys: [], // table 选中项 @@ -98,7 +98,7 @@ export default class UserSure extends React.Component { this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: Number(val) } })}/> + onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/> ); }; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js index fad0f595..843450e9 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js @@ -298,13 +298,7 @@ export default class Attendance extends React.Component { const { loading, hasRight, - form, - condition, tableStore, - showSearchAd, - getTableDatas, - doSearch, - setShowSearchAd } = attendanceStore; const { step, @@ -312,7 +306,6 @@ export default class Attendance extends React.Component { setSlideVisiable, slideVisiable, doBatchDelete, - attendTableStore, fieldSettingAttendList, fieldSettingCustomList, setFieldSettingAttendList, @@ -728,9 +721,9 @@ export default class Attendance extends React.Component { collectParams={collectParams}> } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 + showDropIcon={false} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) dropMenuProps={{ collectParams }}> {this.state.tabSelectedKey == 0 diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.less new file mode 100644 index 00000000..5c937394 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.less @@ -0,0 +1,36 @@ +.attendenceImportWrapper{ + .wea-dialog-body{ + padding: 16px 120px; + .wea-select, .ant-select, .ant-select-selection{ + width: 100%; + } + .ant-select-selection{ + border-radius: 0; + height: 30px; + } + } +} +//导入字段设置 +.fieldSetWrapper{ + .wea-dialog-body{ + padding: 16px 20px; + } + .ant-modal-footer button{ + margin-right: 0!important; + } + .ant-btn-group{ + margin-left: 10px!important; + } + .searchWrapper{ + display: flex; + justify-content: flex-end; + align-items: center; + margin-bottom: 10px; + } + .allInWrapper{ + display: flex; + justify-content: flex-start; + margin-top: 10px; + } +} + diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/refereAttendFormModal.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/refereAttendFormModal.js index b3e22919..fb7dbac1 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/refereAttendFormModal.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/refereAttendFormModal.js @@ -1,182 +1,195 @@ -import React from 'react' -import { Modal, Row, Col, Button, Select, message } from 'antd' -import moment from 'moment' -import { WeaSelect, WeaInput, WeaBrowser, WeaDatePicker } from "ecCom" -import SelectItemModal, {items} from '../../../components/selectItemsModal' -import SelectItemsWrapper from '../../../components/selectItemsModal/selectItemsWrapper' -import { inject, observer } from 'mobx-react'; -import RequiredLabelTip from '../../../components/requiredLabelTip' -import { notNull } from '../../../util/validate' -const { Option } = Select +import React from "react"; +import { Button, Col, message, Row, Select } from "antd"; +import moment from "moment"; +import { WeaDatePicker, WeaDialog, WeaError, WeaInput, WeaSelect } from "ecCom"; +import SelectItemModal from "../../../components/selectItemsModal"; +import SelectItemsWrapper from "../../../components/selectItemsModal/selectItemsWrapper"; +import { inject, observer } from "mobx-react"; +import { notNull } from "../../../util/validate"; -@inject('attendanceStore') +const { Option } = Select; + +@inject("attendanceStore") @observer export default class RefereAttendFormModal extends React.Component { - constructor(props) { - super(props) - this.state = { - headerSetVisible: false, - inited: false, - request: { - salarySobId: "", - salaryYearMonth: moment(new Date()).format("YYYY-MM"), - employeeIds: [], - description: "" + constructor(props) { + super(props); + this.state = { + headerSetVisible: false, + inited: false, + request: { + salarySobId: "", + salaryYearMonth: moment(new Date()).format("YYYY-MM"), + employeeIds: [], + description: "" + } + }; + } + + handleHeaderSet() { + this.setState({ headerSetVisible: true }); + this.props.onHeaderSet(); + } + + componentWillMount() { + const { attendanceStore: { getLedgerList } } = this.props; + getLedgerList().then(() => { + this.setState({ + inited: true + }); + }); + } + + // 请求参数改变事件 + handleRequestChange(params) { + const { request } = this.state; + let result = { ...request, ...params }; + this.setState({ request: result }); + } + + + // 同步点击回调 + handleSync() { + const { attendanceStore: { syncAttendanceRefer, checkOperation } } = this.props; + if (!this.validate()) { + return; + } + const { salarySobId, salaryYearMonth: salaryYearMonthStr } = this.state.request; + const payload = { + salaryYearMonthStr, + salarySobId + }; + checkOperation(payload).then(({ status, data, errorMsg }) => { + if (status && data) { + syncAttendanceRefer(this.state.request).then(() => { + this.props.onCancel(); + }); + } else { + message.warning("已经核算过不可操作"); + } + }); + } + + // 校验数据 + validate() { + const { request } = this.state; + if (!notNull(request.salarySobId) && !notNull(request.salaryYearMonth)) { + this.refs.weaError.showError(); + this.refs.weaError1.showError(); + return false; + } + if (!notNull(request.salarySobId)) { + this.refs.weaError1.showError(); + return false; + } + if (!notNull(request.salaryYearMonth)) { + this.refs.weaError.showError(); + return false; + } + return true; + } + + + render() { + const { attendanceStore: { importLedgerList } } = this.props; + return ( + { + this.handleSync(); + }}>同步, + + ]} + visible={this.props.visible} + onCancel={this.props.onCancel}> + + 薪资所属月: + + + { + if (value === "") this.refs.weaError.showError(); + this.handleRequestChange({ salaryYearMonth: value }); + }} + /> + + + + + 薪资账套: + + { + this.state.inited && + + ({ + key: it.id, + showname: it.content + }))] + } + onChange={(value) => { + if (value === "") this.refs.weaError1.showError(); + this.handleRequestChange({ salarySobId: value }); + }}/> + } - } - } - - handleHeaderSet() { - this.setState({headerSetVisible: true}) - this.props.onHeaderSet(); - } - - componentWillMount() { - const { attendanceStore: { getLedgerList }} = this.props; - getLedgerList().then(() => { - this.setState({ - inited: true - }) - }) - } - - // 请求参数改变事件 - handleRequestChange(params) { - const { request } = this.state; - let result = { ...request, ...params } - this.setState({request: result}) - } + + + + 备注 + + { + this.handleRequestChange({ description: value }); + }}/> + + - // 同步点击回调 - handleSync() { - const { attendanceStore: {syncAttendanceRefer, checkOperation}} = this.props - if(!this.validate()) { - return - } - const { salarySobId, salaryYearMonth:salaryYearMonthStr }=this.state.request - const payload={ - salaryYearMonthStr, - salarySobId - } - checkOperation(payload).then(({status, data, errorMsg})=>{ - if(status && data){ - syncAttendanceRefer(this.state.request).then(() => { - this.props.onCancel() - }) - }else{ - message.warning('已经核算过不可操作'); - } - }) - } - - // 校验数据 - validate() { - const { request } = this.state; - if(!notNull(request.salarySobId)) { - message.warning("薪资账套不能为空"); - return false; - } - if(!notNull(request.salaryYearMonth)) { - message.warning("薪资所属月不能为空") - return false; - } - return true; - } - - - render() { - const { attendanceStore: { importLedgerList }} = this.props; - return ( - - - -
- } visible={this.props.visible} onCancel={this.props.onCancel}> - - 薪资所属月: - - { - this.handleRequestChange({salaryYearMonth: value}) - }} - /> - - - - 薪资账套: - - { - this.state.inited && - } - - - {/* - 添加账套外人员 - - - this.handleRequestChange({employeeIds: ids.split(",")}) - } - isSingle={false} - /> - - */} - - 备注 - - { - this.handleRequestChange({description: value}) - }}/> - - - - - { -this.props.onShowChecked(value) -}} - onRestoreDefault={() => { -this.props.onRestoreDefault() -}} - onSetDefault={() => { -this.props.onSetDefault() -}} - onSearch={(value) => { -this.props.onSearch(value) -}} - onSave={(value) => { -this.props.onSave(value) -}} - visible={this.state.headerSetVisible} onCancel={() => this.setState({headerSetVisible: false})}> - { -this.props.onChange(value) -}}/> - -
- - - ) - } -} \ No newline at end of file + { + this.props.onShowChecked(value); + }} + onRestoreDefault={() => { + this.props.onRestoreDefault(); + }} + onSetDefault={() => { + this.props.onSetDefault(); + }} + onSearch={(value) => { + this.props.onSearch(value); + }} + onSave={(value) => { + this.props.onSave(value); + }} + visible={this.state.headerSetVisible} onCancel={() => this.setState({ headerSetVisible: false })}> + { + this.props.onChange(value); + }}/> + + + ); + } +} diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index b6935152..c3b6a2e0 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -415,7 +415,7 @@ export default class CumDeduct extends React.Component { }; const renderBtns = () => { - return ( + return [ 导出选中 } - type="ghost"> + type="primary"> 导出全部 - ); + ]; }; const pagination = { @@ -504,7 +504,7 @@ export default class CumDeduct extends React.Component { title="累计专项附加扣除" // 文字 icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 + showDropIcon={false} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) buttons={showOperateBtn ? btns : []}>
@@ -549,7 +549,7 @@ export default class CumDeduct extends React.Component { onFinish={() => { setModalVisiable(false); setStep(0); - doSearch({ declareMonth: [this.state.monthValue], taxAgentId: taxAgentId === "All" ? "" : taxAgentId }); + doSearch({ declareMonth: this.state.monthValue ? [this.state.monthValue] : "", taxAgentId: taxAgentId === "All" ? "" : taxAgentId }); }} previewImport={(params) => { previewImport(params); @@ -568,6 +568,7 @@ export default class CumDeduct extends React.Component { {slideVisiable && ( { this.state.currentOperate == "add" ? doSave() : doUpdate(); }} editable={false} showOperateBtn={showOperateBtn} - btns={showOperateBtn ? renderBtns() : null} + customOperate={showOperateBtn ? renderBtns() : []} /> } content={ diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less index ca63e917..d6caad16 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less @@ -55,3 +55,31 @@ } } } + +.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/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index 1a7e54c4..cf47d31b 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -399,7 +399,7 @@ export default class CumSituation extends React.Component { }; const renderBtns = () => { - return ( + return [ 导出选中 } - type="ghost"> + type="primary"> 导出全部 - ); + ]; }; const pagination = { @@ -484,7 +484,7 @@ export default class CumSituation extends React.Component { title="往期累计情况(工资、薪金)" // 文字 icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 + showDropIcon={false} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 buttons={showOperateBtn ? btns : []}> @@ -544,6 +544,7 @@ export default class CumSituation extends React.Component { />} {slideVisiable && { this.state.currentOperate == "add" ? doSave() : doUpdate(); }} editable={false} showOperateBtn={showOperateBtn} - btns={showOperateBtn ? renderBtns() : null} + customOperate={showOperateBtn ? renderBtns() : []} /> } content={ diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.less index e69de29b..8049f9cb 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.less @@ -0,0 +1,27 @@ +.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/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js index 9c3f7dab..e3ee8883 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js @@ -1,43 +1,19 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; -import { - Button, - Table, - DatePicker, - Dropdown, - Menu, - Modal, - message, - Row, - Col -} from "antd"; -import { - WeaTop, - WeaTab, - WeaRightMenu, - WeaRangePicker, - WeaDatePicker, - WeaSelect, - WeaHelpfulTip, - WeaSlideModal, - WeaTable -} from "ecCom"; +import { Button, Col, Dropdown, Menu, message, Row } from "antd"; +import { WeaDatePicker, WeaHelpfulTip, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom"; import moment from "moment"; -import { renderNoright, getSearchs } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 -import CustomTab from "../../../components/customTab"; -import ContentWrapper from "../../../components/contentWrapper"; +import { getSearchs, renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import ImportModal from "../../../components/importModal"; import { modalColumns } from "./columns"; - -const { MonthPicker } = DatePicker; - import "./index.less"; import SlideModalTitle from "../../../components/slideModalTitle"; import EditSlideContent from "./editSlideContent"; import { optionAddAll } from "../../../util/options"; + @inject("otherDeductStore", "taxAgentStore") @observer export default class OtherDeduct extends React.Component { @@ -147,7 +123,7 @@ export default class OtherDeduct extends React.Component { } = this.props; setSlideVisiable(true); setCurrentRecord(record); - getOtherDeductDetailList(record.id,{taxAgentId:record.taxAgentId}); + getOtherDeductDetailList(record.id, { taxAgentId: record.taxAgentId }); }; // 增加编辑功能,重写columns绑定事件 @@ -181,7 +157,7 @@ export default class OtherDeduct extends React.Component { ); default: - return
; + return
; } }; return newColumn; @@ -411,7 +387,7 @@ export default class OtherDeduct extends React.Component { }; const renderBtns = () => { - return ( + return [ 导出选中 } - type="ghost"> + type="primary"> 导出全部 - ); + ]; }; const rowSelection = { @@ -495,9 +471,9 @@ export default class OtherDeduct extends React.Component { } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 + showDropIcon={false} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 buttons={showOperateBtn ? btns : []}> @@ -557,6 +533,7 @@ export default class OtherDeduct extends React.Component { />} {slideVisiable && { this.state.currentOperate == "add" ? doSave() : doUpdate(); }} editable={false} showOperateBtn={showOperateBtn} - btns={showOperateBtn ? renderBtns() : null} + customOperate={showOperateBtn ? renderBtns() : []} /> } content={ diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less index bb9f7d42..eba96b4d 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less @@ -8,4 +8,31 @@ text-decoration: none; } } -} \ No newline at end of file +} +.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/declare/generateModal.js b/pc4mobx/hrmSalary/pages/declare/generateModal.js index eb4713cd..5ae0e1e1 100644 --- a/pc4mobx/hrmSalary/pages/declare/generateModal.js +++ b/pc4mobx/hrmSalary/pages/declare/generateModal.js @@ -1,5 +1,5 @@ import React from "react"; -import { WeaDatePicker, WeaDialog, WeaFormItem, WeaHelpfulTip, WeaSelect } from "ecCom"; +import { WeaDatePicker, WeaDialog, WeaError, WeaFormItem, WeaHelpfulTip, WeaSelect } from "ecCom"; import { Button } from "antd"; import { inject, observer } from "mobx-react"; import "./index.less"; @@ -21,6 +21,21 @@ export default class GenerateModal extends React.Component { declareStore: { saveDeclare } } = this.props; const { date, taxAgentId } = this.state; + if (_.isEmpty(date) && _.isEmpty(taxAgentId)) { + this.refs.weaError.showError(); + this.refs.weaError1.showError(); + return; + } + + if (_.isEmpty(date)) { + this.refs.weaError.showError(); + return; + } + + if (_.isEmpty(taxAgentId)) { + this.refs.weaError1.showError(); + return; + } saveDeclare({ salaryMonthStr: date, taxAgentId }).then(() => { this.props.onGenerate(); }); @@ -35,8 +50,18 @@ export default class GenerateModal extends React.Component { visible={this.props.visible} onCancel={() => this.props.onCancel()} initLoadCss - maxHeight={250} - className={"generateWapper"} + className="generateWapper" + title={ + + 申报 + + + } buttons={ [ - -
- }> + buttons={[ + , + + ]}>
对象类型 - +
@@ -118,6 +116,7 @@ export default class AddUserModal extends React.Component { title={"人员选择"} isSingle={false} inputStyle={{ width: 200 }} + value={this.state.ids} onChange={(ids, names, datas) => { this.setState({ ids }); }} @@ -128,6 +127,7 @@ export default class AddUserModal extends React.Component { type={57} title={"部门选择"} isSingle={false} + value={this.state.ids} inputStyle={{ width: 200 }} onChange={(ids, names, datas) => { this.setState({ ids }); @@ -139,6 +139,7 @@ export default class AddUserModal extends React.Component { type={164} title={"分部选择"} isSingle={false} + value={this.state.ids} inputStyle={{ width: 200 }} onChange={(ids, names, datas) => { this.setState({ ids }); @@ -150,6 +151,7 @@ export default class AddUserModal extends React.Component { type={278} title={"岗位选择"} isSingle={false} + value={this.state.ids} inputStyle={{ width: 200 }} onChange={(ids, names, datas) => { this.setState({ ids }); @@ -162,7 +164,7 @@ export default class AddUserModal extends React.Component { 选择员工状态 - +
- + ); } } diff --git a/pc4mobx/hrmSalary/pages/ledger/calcRulesForm.js b/pc4mobx/hrmSalary/pages/ledger/calcRulesForm.js index e5ce1eb5..4306a345 100644 --- a/pc4mobx/hrmSalary/pages/ledger/calcRulesForm.js +++ b/pc4mobx/hrmSalary/pages/ledger/calcRulesForm.js @@ -1,5 +1,5 @@ import React from "react"; -import { Icon } from "antd"; +import { Button } from 'antd'; import { WeaTable } from "ecCom"; import { slideStep4Columns } from "./columns"; import "./index.less"; @@ -87,9 +87,14 @@ export default class CalRulesForm extends React.Component {
{ canEdit === "true" && - { - this.setState({ modalVisible: true }); - }}/> + }
diff --git a/pc4mobx/hrmSalary/pages/ledger/copyFormModal.js b/pc4mobx/hrmSalary/pages/ledger/copyFormModal.js index f68d4665..4516f676 100644 --- a/pc4mobx/hrmSalary/pages/ledger/copyFormModal.js +++ b/pc4mobx/hrmSalary/pages/ledger/copyFormModal.js @@ -6,7 +6,7 @@ */ import React from "react"; import { Button, Col, Modal, Row } from "antd"; -import { WeaError, WeaInput, WeaSelect } from "ecCom"; +import { WeaError, WeaInput, WeaSelect, WeaDialog } from "ecCom"; import "./index.less"; export default class CopyFormModal extends React.Component { @@ -22,13 +22,14 @@ export default class CopyFormModal extends React.Component { const { taxAgentStore } = this.props; const { taxAgentAdminOption } = taxAgentStore; return ( - this.props.onCancel()} className="copyModalWrapper" - footer={ + buttons={[ - }> + ]}> 账套名称 @@ -84,7 +85,7 @@ export default class CopyFormModal extends React.Component { - + ); } } diff --git a/pc4mobx/hrmSalary/pages/ledger/index.js b/pc4mobx/hrmSalary/pages/ledger/index.js index a010d3f5..344631dd 100644 --- a/pc4mobx/hrmSalary/pages/ledger/index.js +++ b/pc4mobx/hrmSalary/pages/ledger/index.js @@ -16,7 +16,6 @@ import SlideModalTitle from "../../components/slideModalTitle"; import CopyFormModal from "./copyFormModal"; import "./index.less"; -const { MonthPicker } = DatePicker; @inject("ledgerStore", "taxAgentStore") @observer @@ -406,7 +405,7 @@ export default class Ledger extends React.Component { title="薪资账套" // 文字 icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 + showDropIcon={false} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) dropMenuProps={{ collectParams }}> - {currentStep == 0 && + currentStep == 0 ? [ } - {currentStep == 1 && -
- - -
} - {/*{(currentStep == 2 || currentStep == 3) &&*/} - {currentStep == 2 && -
- - - -
} - {/*{currentStep == 4 &&*/} - {currentStep == 3 && -
- - -
} -
+ + ]: currentStep == 1 ? [ + , + + ]:currentStep == 2 ? [ + , + , + + ] : currentStep == 3 ? [ + , + + ] : [] } title="新建账套" content={ @@ -523,6 +513,7 @@ export default class Ledger extends React.Component { />} {this.state.editSlideVisible && this.handleEditSlideSave()} - subItemChange={item => { - this.setState({ selectedTab: item.key }); + subItemChange={selectedTab => { + this.setState({ selectedTab }); }} /> } @@ -557,10 +548,14 @@ export default class Ledger extends React.Component { {selectedTab == 4 && }
} - onClose={() => this.setState({ editSlideVisible: false })} + onClose={() => this.setState({ editSlideVisible: false },()=>{ + this.setState({ selectedTab:0 }); + })} showMask={true} closeMaskOnClick={() => - this.setState({ editSlideVisible: false })} + this.setState({ editSlideVisible: false },()=>{ + this.setState({ selectedTab:0 }); + })} />} diff --git a/pc4mobx/hrmSalary/pages/ledger/index.less b/pc4mobx/hrmSalary/pages/ledger/index.less index b81999a1..ff5d1ae1 100644 --- a/pc4mobx/hrmSalary/pages/ledger/index.less +++ b/pc4mobx/hrmSalary/pages/ledger/index.less @@ -61,18 +61,30 @@ } .headerIcon { - color: #4ba9f2; - display: inline-block; + .ant-btn { + margin-left: 10px; + border-radius: 0; + padding: 0; + background: transparent; + border: none; + font-size: 20px; + line-height: 20px; + } - .iconItem { - cursor: pointer; - margin-right: 10px; + .ant-btn.ant-btn-primary[disabled] { + color: #d8d8d8; + } + + .ant-btn.ant-btn-primary { + color: #55a1f8; } } + } .salaryItemForm { padding: 10px 20px; + padding-bottom: 30px; .btnBar { height: 47px; @@ -114,10 +126,22 @@ .rightBtnsWrapper { float: right; - .iconItem { - margin-right: 10px; - color: #2db7f5; - cursor: pointer; + .ant-btn { + margin-left: 10px; + border-radius: 0; + padding: 0; + background: transparent; + border: none; + font-size: 20px; + line-height: 20px; + } + + .ant-btn.ant-btn-primary[disabled] { + color: #d8d8d8; + } + + .ant-btn.ant-btn-primary { + color: #55a1f8; } } @@ -135,10 +159,22 @@ .headerIcon { float: right; cursor: pointer; + .ant-btn { + margin-left: 10px; + border-radius: 0; + padding: 0; + background: transparent; + border: none; + font-size: 20px; + line-height: 20px; + } - .iconItem { - margin-right: 10px; - color: #2db7f5; + .ant-btn.ant-btn-primary[disabled] { + color: #d8d8d8; + } + + .ant-btn.ant-btn-primary { + color: #55a1f8; } } @@ -200,6 +236,8 @@ .copyModalWrapper { .ant-modal-body { padding-left: 150px; + padding-top: 20px; + padding-bottom: 20px; } .wea-select { @@ -232,3 +270,33 @@ background-color: #f7fbfe; } } + +.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/ledger/salaryItemForm.js b/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js index 3a587be2..c003b565 100644 --- a/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js +++ b/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js @@ -126,7 +126,7 @@ export default class SalaryItemForm extends React.Component {
diff --git a/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js b/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js index 99119893..58645741 100644 --- a/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js +++ b/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js @@ -1,6 +1,6 @@ import React from "react"; import { inject, observer } from "mobx-react"; -import { Icon, message, Modal, Table } from "antd"; +import { message, Modal, Table, Button } from "antd"; import { WeaInputSearch } from "ecCom"; import AddUserModal from "./addUserModal"; import "./index.less"; @@ -154,23 +154,24 @@ export default class SlideRefereUser extends React.Component { this.handleSearch(value); }} /> - {canEdit === "true" && -
- { - this.handleTabDelete(); - }} - /> - { - setAddUserModalVisible(true); - }} - /> -
} + { + canEdit === "true" && +
+ + +
+ }
{ -this.props.onSave(this.state.name) -}}>保存} width={600} - visible={this.props.visible} onCancel={() => { -this.props.onCancel() -}} - > -
- -
分类名称 - - { -this.setState({name: value}) -}}/> - - - - - ) - } + constructor(props) { + super(props); + this.state = { + name: this.props.title ? this.props.title : "" + }; + } + + render() { + return ( + { + if (!this.state.name) { + this.refs.weaError.showError(); + return; + } + this.props.onSave(this.state.name); + }}>保存]} style={{ width: 600 }} + visible={this.props.visible} + onCancel={() => { + this.props.onCancel(); + }} + > +
+ +
分类名称 + + + { + if (value === "") { + this.refs.weaError.showError(); + return; + } + this.setState({ name: value }); + }}/> + + + + + + ); + } } diff --git a/pc4mobx/hrmSalary/pages/ledger/step3/AddSalaryItemModal.js b/pc4mobx/hrmSalary/pages/ledger/step3/AddSalaryItemModal.js index 8114d7f3..2e1789eb 100644 --- a/pc4mobx/hrmSalary/pages/ledger/step3/AddSalaryItemModal.js +++ b/pc4mobx/hrmSalary/pages/ledger/step3/AddSalaryItemModal.js @@ -1,148 +1,140 @@ -import React from 'react' -import { inject, observer } from 'mobx-react'; -import { Modal, Button, message, Switch } from 'antd' -import { WeaInputSearch, WeaTable } from 'ecCom' -import { WeaTableNew } from "comsMobx" -import { toJS } from 'mobx' -import CustomTable from '../../../components/customTable' +import React from "react"; +import { inject, observer } from "mobx-react"; +import { Button, message, Switch } from "antd"; +import { WeaDialog, WeaInputSearch } from "ecCom"; +import CustomTable from "../../../components/customTable"; - -@inject('ledgerStore') +@inject("ledgerStore") @observer export default class AddSalaryItemModal extends React.Component { - constructor(props) { - super(props) - this.state = { - searchValue: "", - selectedRowKeys:[] + constructor(props) { + super(props); + this.state = { + searchValue: "", + selectedRowKeys: [] + }; + } + + componentWillMount() { + const { ledgerStore: { listSalaryItem } } = this.props; + listSalaryItem(); + } + + // 增加编辑功能,重写columns绑定事件 + getColumns(columns) { + if (!columns) { + return []; + } + let newColumns = ""; + newColumns = columns.map(column => { + let newColumn = column; + newColumn.render = (text, record, index) => { //前端元素转义 + let valueSpan = record[newColumn.dataIndex + "span"] !== undefined ? record[newColumn.dataIndex + "span"] : record[newColumn.dataIndex]; + switch (newColumn.dataIndex) { + case "useDefault": + case "useInEmployeeSalary": + return ; + default: + return
; } - } + }; + return newColumn; + }); + return newColumns; + } - componentWillMount() { - const { ledgerStore: {listSalaryItem}} = this.props; - listSalaryItem() + handleAdd() { + const { ledgerStore } = this.props; + const { addSalaryItemDataSource, addItemsToGroup, addExcludeIds } = ledgerStore; + const { selectedRowKeys } = this.state; + if (selectedRowKeys.length == 0) { + message.warning("未选择条目"); + return; } + let selectItems = []; - // 增加编辑功能,重写columns绑定事件 - getColumns(columns) { - if(!columns) { - return [] + addSalaryItemDataSource.map(item => { + item = { ...item }; + selectedRowKeys.map(key => { + if (item.id == key) { + item.salaryItemId = item.id; + item.key = item.id; + selectItems.push(item); } - let newColumns = ''; - newColumns = columns.map(column => { - let newColumn = column; - newColumn.render = (text, record, index) => { //前端元素转义 - let valueSpan = record[newColumn.dataIndex + "span"] !== undefined ? record[newColumn.dataIndex + "span"] : record[newColumn.dataIndex]; - switch(newColumn.dataIndex) { - case "useDefault": - case "useInEmployeeSalary": - return - default: - return
- } - } - return newColumn; - }); - return newColumns; - } + }); + }); - handleAdd() { - const { ledgerStore } = this.props; - const { addSalaryItemDataSource, addItemsToGroup, addExcludeIds } = ledgerStore - const { selectedRowKeys } = this.state; - if(selectedRowKeys.length == 0) { - message.warning("未选择条目") - } - let selectItems = [] - - addSalaryItemDataSource.map(item => { - item = {...item} - selectedRowKeys.map(key => { - if(item.id == key) { - item.salaryItemId = item.id - item.key = item.id - selectItems.push(item) - } - }) - }) - - addItemsToGroup(this.props.title, selectItems) - this.props.onCancel(); - } + addItemsToGroup(this.props.title, selectItems); + this.props.onCancel(); + } - handleSearch = (value) => { - const { ledgerStore: {listSalaryItem}} = this.props - listSalaryItem(value) - } + handleSearch = (value) => { + const { ledgerStore: { listSalaryItem } } = this.props; + listSalaryItem(value); + }; - onSelectChange = selectedRowKeys => { - this.setState({ selectedRowKeys }); - } + onSelectChange = selectedRowKeys => { + this.setState({ selectedRowKeys }); + }; - // 分页 - handleDataPageChange(value) { - const { ledgerStore: {listSalaryItem}} = this.props; - listSalaryItem(this.state.searchValue, value) - } + // 分页 + handleDataPageChange(value) { + const { ledgerStore: { listSalaryItem } } = this.props; + listSalaryItem(this.state.searchValue, value); + } - render() { - const { ledgerStore } = this.props; - const { addSalaryItemDataSource, addSalaryItemColumns, addSalaryItemPageInfo,loading } = ledgerStore - const { searchValue, selectedRowKeys } = this.state; + render() { + const { ledgerStore } = this.props; + const { addSalaryItemDataSource, addSalaryItemColumns, addSalaryItemPageInfo, loading } = ledgerStore; + const { searchValue, selectedRowKeys } = this.state; - const rowSelection = { - selectedRowKeys, - onChange: this.onSelectChange, - }; + const rowSelection = { + selectedRowKeys, + onChange: this.onSelectChange + }; - return ( - { -this.props.onCancel() -}} width={900} height={600} - style={{top: 20}} - footer={null} - > -
- 添加薪资项目 -
- - { -this.setState({searchValue: value}) -}} onSearch={(value) => { -this.handleSearch(value) -}}/> -
-
+ return ( + { + this.props.onCancel(); + }} + title="添加薪资项目" + style={{ width: "80vw", height: 600 }} + buttons={[ + + ]} + > +
+ { + this.setState({ searchValue: value }); + }} onSearch={(value) => { + this.handleSearch(value); + }}/> +
-
- {/* */} - - { -this.handleDataPageChange(value) -}, - total: addSalaryItemPageInfo.total, - showTotal: (total) => `共 ${total} 条`, - current: addSalaryItemPageInfo.pageNum - }} - /> -
-
- ) - } -} \ No newline at end of file +
+ { + this.handleDataPageChange(value); + }, + total: addSalaryItemPageInfo.total, + showTotal: (total) => `共 ${total} 条`, + current: addSalaryItemPageInfo.pageNum + }} + /> +
+ + ); + } +} diff --git a/pc4mobx/hrmSalary/pages/ledger/step3/UserInfoSelect.js b/pc4mobx/hrmSalary/pages/ledger/step3/UserInfoSelect.js index 665ae15c..35894c13 100644 --- a/pc4mobx/hrmSalary/pages/ledger/step3/UserInfoSelect.js +++ b/pc4mobx/hrmSalary/pages/ledger/step3/UserInfoSelect.js @@ -1,86 +1,88 @@ -import React from 'react' -import { Icon, message } from "antd" -import { WeaSelect } from 'ecCom' -import { inject, observer } from 'mobx-react'; -import CanDeleteItem from '../../../components/canDeleteItem' +import React from "react"; +import { Icon, message } from "antd"; +import { WeaSelect } from "ecCom"; +import { inject, observer } from "mobx-react"; +import CanDeleteItem from "../../../components/canDeleteItem"; -@inject('ledgerStore') +@inject("ledgerStore") @observer export default class UserInfoSelected extends React.Component { - constructor(props) { - super(props) - this.state = { - list: [], - showSelect: false - } + constructor(props) { + super(props); + this.state = { + list: [], + showSelect: false + }; + } + + handleSelectChange(value) { + const { ledgerStore: { empBrowserList, userSelectedList } } = this.props; + let list = [...userSelectedList]; + let selectedItem = {}; + empBrowserList.map(item => { + if (item.key == value) { + selectedItem = item; + } + }); + let flag = false; + list.map(item => { + if (item.key == value) { + flag = true; + } + }); + if (!flag) { + list.push(selectedItem); + } + if (flag) { + message.warning("该信息已存在"); + this.setState({ showSelect: false }); + return; + } + const { ledgerStore: { empFields, addEmpFields, setUserSelectedList } } = this.props; + addEmpFields(value); + this.setState({ showSelect: false }); + + } + + handleItemDelete(item) { + const { ledgerStore: { userSelectedList, setUserSelectedList, empFields, setEmpFields } } = this.props; + let list = [...userSelectedList]; + let fields = [...empFields]; + if (item.canDelete === false) { + message.warning("该项不可删除"); + return; } - handleSelectChange(value) { - const { ledgerStore: {empBrowserList, userSelectedList}} = this.props; - let list = [...userSelectedList] - let selectedItem = {} - empBrowserList.map(item => { - if(item.key == value) { - selectedItem = item - } - }) - let flag = false; - list.map(item => { - if(item.key == value) { - flag = true - } - }) - if(!flag) { - list.push(selectedItem) - } - if(flag) { - message.warning("该信息已存在") - this.setState({showSelect: false}) - return - } - const { ledgerStore: {empFields, addEmpFields, setUserSelectedList}} = this.props; - addEmpFields(value) - this.setState({showSelect: false}) - - } + fields = fields.filter(i => item.fieldId != i.fieldId); + fields.map((item, index) => { + item.sortedIndex = index; + }); + setEmpFields(fields); + setUserSelectedList(list.filter(i => item.fieldId != i.fieldId)); + } - handleItemDelete(item) { - const { ledgerStore: {userSelectedList, setUserSelectedList, empFields, setEmpFields}} = this.props; - let list = [...userSelectedList] - let fields = [...empFields] - if(item.canDelete === false) { - message.warning("该项不可删除"); - return + render() { + const { ledgerStore: { empBrowserList, userSelectedList } } = this.props; + return ( +
+ { + userSelectedList.map(item => ( + { + this.handleItemDelete(item); + }}/> + )) } - - fields = fields.filter(i => item.fieldId != i.fieldId) - fields.map((item, index) => { - item.sortedIndex = index - }) - setEmpFields(fields) - setUserSelectedList(list.filter(i => item.fieldId != i.fieldId)) - } - - render() { - const { ledgerStore: {empBrowserList, userSelectedList} } = this.props; - return ( -
- { - userSelectedList.map(item => ( - { - this.handleItemDelete(item) - }}/> - )) - } - { -this.setState({showSelect: true}) -}}/> - { - this.state.showSelect && empBrowserList.length > 0 && { - this.handleSelectChange(value) - }}/> - } -
- ) - } -} \ No newline at end of file + { + this.setState({ showSelect: true }); + }}/> + { + this.state.showSelect && empBrowserList.length > 0 && + { + this.handleSelectChange(value); + }}/> + } +
+ ); + } +} diff --git a/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js b/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js index f5b7d72f..94494d3c 100644 --- a/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js +++ b/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js @@ -1,6 +1,6 @@ import React, { Fragment } from "react"; -import { Icon, message, Modal } from "antd"; -import { WeaHelpfulTip, WeaTable, WeaCheckbox } from "ecCom"; +import { Icon, message, Modal, Button} from "antd"; +import { WeaCheckbox, WeaHelpfulTip, WeaTable } from "ecCom"; import { slideStep3Columns } from "../columns"; import AddSalaryItemModal from "./AddSalaryItemModal"; import { inject, observer } from "mobx-react"; @@ -69,22 +69,22 @@ export default class CanMoveItem extends React.Component { this.title = ""; } - handleChangeItem= (value,id)=>{ + handleChangeItem = (value, id) => { const { dataSource } = this.props; let result = [...dataSource]; this.props.onChange( _.map(result, item => { - if(id === item.id){ + if (id === item.id) { return { ...item, itemHide: String(value) - } + }; } - return {...item} + return { ...item }; }) ); - } - handleChangeAllItem= (value)=>{ + }; + handleChangeAllItem = (value) => { const { dataSource } = this.props; let result = [...dataSource]; this.props.onChange( @@ -92,10 +92,10 @@ export default class CanMoveItem extends React.Component { return { ...item, itemHide: String(value) - } + }; }) ); - } + }; // 编辑公式 handleFormulaClick(formulaId, record) { @@ -183,8 +183,7 @@ export default class CanMoveItem extends React.Component { sortedIndex, ledgerStore: { setAddItemVisible, addItemVisible, itemGroups = [] } } = this.props; - console.log(this.props.dataSource) - const checkValue= _.every(this.props.dataSource, it => it.itemHide && it.itemHide === '1' ) ? "1" : "0"; + const checkValue = _.every(this.props.dataSource, it => it.itemHide && it.itemHide === "1") ? "1" : "0"; const { selectedRowKeys, formalModalVisible, @@ -198,27 +197,26 @@ export default class CanMoveItem extends React.Component { disabled: !record.canDelete }) }; - console.log(checkValue) - const newColumns= [...columns,{ + const newColumns = [...columns, { title: { - this.handleChangeAllItem(value) + this.handleChangeAllItem(value); }} /> 隐藏 , - dataIndex: 'itemHide', - key: 'itemHide', - render: (text,record) => { - this.handleChangeItem(value, record.id) + this.handleChangeItem(value, record.id); }} - />, - }] + /> + }]; return (
@@ -236,6 +234,7 @@ export default class CanMoveItem extends React.Component { marginRight: "10px", cursor: "pointer" }} + title="编辑" onClick={() => { this.handleEditGroupIconClick(this.props.title); }} @@ -243,6 +242,7 @@ export default class CanMoveItem extends React.Component { { this.handleDeleteGroupIconClick(); }} @@ -257,6 +257,7 @@ export default class CanMoveItem extends React.Component { sortedIndex !== 0 && this.props.onUpgo(sortedIndex)} + title="向上移动" style={{ marginRight: 10, cursor: "pointer" @@ -266,7 +267,8 @@ export default class CanMoveItem extends React.Component { { sortedIndex !== toJS(itemGroups).length - 1 && this.props.onDowngo(sortedIndex)} + onClick={() => this.props.onDowngo(sortedIndex)} + title="向下移动" style={{ cursor: "pointer" }} @@ -275,26 +277,27 @@ export default class CanMoveItem extends React.Component { - {!disabled && - - { - this.handleDelete(); - }} - /> - { - this.setState({ addItemVisible: true }); - }} - /> - } - + + + + } + { this.handleTiggleContent(); }} diff --git a/pc4mobx/hrmSalary/pages/ledger/step3/previewSalaryModal.js b/pc4mobx/hrmSalary/pages/ledger/step3/previewSalaryModal.js index d1d341ff..7f5f3f92 100644 --- a/pc4mobx/hrmSalary/pages/ledger/step3/previewSalaryModal.js +++ b/pc4mobx/hrmSalary/pages/ledger/step3/previewSalaryModal.js @@ -1,70 +1,71 @@ -import React from 'react' -import { Modal, Table } from 'antd' -import { inject, observer } from 'mobx-react'; -import { WeaTable } from "ecCom" +import React from "react"; +import { inject, observer } from "mobx-react"; +import { WeaDialog, WeaTable } from "ecCom"; -@inject('ledgerStore') +@inject("ledgerStore") @observer export default class PreviewSalaryModal extends React.Component { - getColumns() { - const { ledgerStore: { empFields, itemGroups }} = this.props; - let columns = [] - let length = 0 + getColumns() { + const { ledgerStore: { empFields, itemGroups } } = this.props; + let columns = []; + let length = 0; - empFields.map(item => { - columns.push({ - title: item.fieldName, - key: item.fieldId, - width: 150 - }) - length ++ - }) + empFields.map(item => { + columns.push({ + title: item.fieldName, + key: item.fieldId, + width: 150 + }); + length++; + }); - itemGroups.map(item => { - if(item.id != "default") { - let columnItem = { - title: item.name, - children: item.items.map(i => { - return { - title: i.name, - key: i.id, - width: 150 - } - length ++ - }) - } - columns.push(columnItem ) - } - }) + itemGroups.map(item => { + if (item.id != "default") { + let columnItem = { + title: item.name, + children: item.items.map(i => { + return { + title: i.name, + key: i.id, + width: 150 + }; + length++; + }) + }; + columns.push(columnItem); + } + }); - itemGroups.map(item => { - if(item.id == "default") { - item.items.map(i => { - columns.push({ - title: i.name, - key: i.id, - width: 150 - }) - length ++ - }) - } - }) + itemGroups.map(item => { + if (item.id == "default") { + item.items.map(i => { + columns.push({ + title: i.name, + key: i.id, + width: 150 + }); + length++; + }); + } + }); - return {columns, length}; - } - render() { - return ( - { -this.props.onCancel() -}} - footer={null} - > - - - ) - } -} \ No newline at end of file + return { columns, length }; + } + + render() { + return ( + { + this.props.onCancel(); + }} + > +
+ +
+
+ ); + } +} diff --git a/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js b/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js index a60abb6b..90734a8a 100644 --- a/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js +++ b/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js @@ -109,12 +109,13 @@ export default class RuleEditModal extends React.Component { >
-
薪资项目 + 薪资项目 { initedSelect && { @@ -124,7 +125,7 @@ export default class RuleEditModal extends React.Component { - 计薪规则 + 计薪规则
{ this.setState({ effectiveDate: value }); diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.js b/pc4mobx/hrmSalary/pages/mySalary/index.js index 6a8fe4c9..bf19c186 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/index.js +++ b/pc4mobx/hrmSalary/pages/mySalary/index.js @@ -197,7 +197,7 @@ export default class MySalary extends React.Component { title="我的薪资福利" // 文字 icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 + showDropIcon={false} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 > diff --git a/pc4mobx/hrmSalary/pages/payroll/copyModal.js b/pc4mobx/hrmSalary/pages/payroll/copyModal.js index 85926196..c8347b51 100644 --- a/pc4mobx/hrmSalary/pages/payroll/copyModal.js +++ b/pc4mobx/hrmSalary/pages/payroll/copyModal.js @@ -1,44 +1,66 @@ -import React from 'react' -import { notNull } from '../../util/validate' -import { Modal, Button, Row, Col, message } from 'antd'; -import { WeaInput } from "ecCom" -import RequiredLabelTip from '../../components/requiredLabelTip'; +import React from "react"; +import { notNull } from "../../util/validate"; +import { Button, Col, Row } from "antd"; +import { WeaDialog, WeaError, WeaInput } from "ecCom"; + export default class CopyModal extends React.Component { - constructor(props) { - super(props) - this.state = { - name: '' - } + constructor(props) { + super(props); + this.state = { + name: "" + }; + } + + handleChange(value) { + this.setState({ name: value }); + } + + handleSave() { + if (!notNull(this.state.name)) { + this.refs.weaError.showError(); + return; } - handleChange(value) { - this.setState({name: value}) - } - handleSave() { - if(!notNull(this.state.name)) { - message.warning("工资单名称不能为空") - } - this.props.onSave && this.props.onSave(this.state.name) - } - render(){ - const { name } = this.state; - return ( - { -this.props.onCancel() -}} footer={ - - }> - -
工资单名称 - - { -this.handleChange(value) -}}/> - - - - ) - } -} \ No newline at end of file + this.props.onSave && this.props.onSave(this.state.name); + } + + render() { + const { name } = this.state; + return ( + { + this.props.onCancel(); + }} + buttons={[ + + ]}> + + 工资单名称 + + + { + if (value === "") { + this.refs.weaError.showError(); + return; + } + this.handleChange(value); + }}/> + + + + + ); + } +} diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index 712a2244..a2f9bf9f 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -1,9 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; - import { Button, DatePicker, message, Modal } from "antd"; import moment from "moment"; - import { WeaHelpfulTip, WeaInputSearch, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../components/customTab"; @@ -17,6 +15,7 @@ import TemplateSettingList from "./templateSettingList"; import { notNull } from "../../util/validate"; import CopyModal from "./copyModal"; import SalarySendList from "./SalarySendList"; +import "../dataAcquisition/cumDeduct/index.less"; const { MonthPicker } = DatePicker; @@ -297,7 +296,7 @@ export default class Payroll extends React.Component { disabledDate={(current) => { return current && startDate && current.getTime() < new Date(startDate).getTime(); }} - getCalendarContainer={trigger=> trigger.parentNode} + getCalendarContainer={trigger => trigger.parentNode} format="YYYY-MM" onChange={(val) => this.handleRangePickerChange("endDate", val)} /> @@ -366,16 +365,16 @@ export default class Payroll extends React.Component { }; return ( -
+
} // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 + showDropIcon={false} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 > @@ -408,14 +407,15 @@ export default class Payroll extends React.Component { { this.state.selectedKey == 1 && - { - this.handleTemplateListEdit(record); - }} - onCopy={(record) => { - this.handleTemplateListCopy(record); - }} - showOperateBtn={showOperateBtn} - onDelete={(record) => this.handleTemplateListDelete(record)} + { + this.handleTemplateListEdit(record); + }} + onCopy={(record) => { + this.handleTemplateListCopy(record); + }} + showOperateBtn={showOperateBtn} + onDelete={(record) => this.handleTemplateListDelete(record)} /> } @@ -430,26 +430,21 @@ export default class Payroll extends React.Component { this.setState({ stepSlideVisible: false }); }} customOperate={ -
- { - currentStep == 0 && - } - { - currentStep == 1 &&
- - - -
- } -
+ currentStep == 0 ? [ + + ] : currentStep == 1 ? [ + , + , + + ] : [] } title="新建工资单模板" content={ @@ -470,65 +465,65 @@ export default class Payroll extends React.Component { { this.state.editSlideVisible && - - { - selectedTab == 0 && - } - { - selectedTab == 1 && - + { this.handleUpdateSave(); - }} style={{ marginRight: "10px" }}>保存 + }}>保存 + ] : selectedTab == 1 ? [ + , - - } - } - subItemChange={ - (item) => { - this.setState({ selectedTab: item.key }); - } - } - /> - } - content={
- { - selectedTab == 0 && - { - this.handleBaseInfoChange(request); - }}/> - } - { - selectedTab == 1 && - } -
} - onClose={() => this.setState({ editSlideVisible: false })} - showMask={true} - closeMaskOnClick={() => this.setState({ editSlideVisible: false })}/> + ] : [] + } + subItemChange={ + (selectedTab) => { + this.setState({ selectedTab }); + } + } + /> + } + content={
+ { + selectedTab == 0 && + { + this.handleBaseInfoChange(request); + }}/> + } + { + selectedTab == 1 && + } +
} + onClose={() => this.setState({ editSlideVisible: false }, () => this.setState({ selectedTab: 0 }))} + showMask={true} + closeMaskOnClick={() => this.setState({ editSlideVisible: false }, () => this.setState({ selectedTab: 0 }))}/> } { this.state.copyModalVisible && - this.handleCopyModalSave(value)} visible={this.state.copyModalVisible} - onCancel={() => { - this.setState({ copyModalVisible: false }); - }}/> + this.handleCopyModalSave(value)} + visible={this.state.copyModalVisible} + onCancel={() => { + this.setState({ copyModalVisible: false }); + }}/> }
); diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js index 9feb3538..22553614 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js @@ -1,178 +1,187 @@ -import React from 'react' -import { inject, observer } from 'mobx-react'; -import { toJS } from 'mobx'; -import { WeaInputSearch, WeaHelpfulTip, WeaTable, WeaTab, WeaTop } from 'ecCom' -import { dataSource, payrollColumns } from '../columns'; -import { Menu, Button, Dropdown, Table } from 'antd' -import CustomTab from '../../../components/customTab' -import "./index.less" -import { getQueryString } from '../../../util/url' -import { renderNoright, getSearchs } from '../../../util'; -import CustomPaginationTable from '../../../components/customPaginationTable'; +import React from "react"; +import { inject, observer } from "mobx-react"; +import { toJS } from "mobx"; +import { WeaHelpfulTip, WeaTab, WeaTop } from "ecCom"; +import { Button, Menu } from "antd"; +import "./index.less"; +import { getQueryString } from "../../../util/url"; +import { getSearchs } from "../../../util"; +import CustomPaginationTable from "../../../components/customPaginationTable"; -@inject('payrollStore') +@inject("payrollStore") @observer export default class PayrollDetail extends React.Component { - constructor(props) { - super(props); - this.state = { - currentId: "", - current: 1 - } - this.pageInfo = {current: 1, pageSize: 10} + constructor(props) { + super(props); + this.state = { + currentId: "", + current: 1 + }; + this.pageInfo = { current: 1, pageSize: 10 }; + } + + componentWillMount() { + let id = getQueryString("id"); + this.setState({ currentId: id }); + const { payrollStore: { getPayrollInfo, getPayrollDetailList, getPayrollDetailSa } } = this.props; + getPayrollInfo(id); + getPayrollDetailList({ salarySendId: id }); + getPayrollDetailSa(); + } + + // 撤回 + handleWithdraw(record) { + const { payrollStore } = this.props; + const { withdrawPayroll, getInfoList } = payrollStore; + withdrawPayroll({ + ids: [record.id], + salarySendId: this.state.currentId + }).then(() => { + getInfoList({ + salarySendId: this.state.currentId + }); + }); + } + + // 发送 + handleGrant(record) { + const { payrollStore } = this.props; + const { grantPayroll, getInfoList } = payrollStore; + grantPayroll({ + ids: [record.id], + salarySendId: this.state.currentId + }).then(() => { + getInfoList({ + salarySendId: this.state.currentId + }); + }); + } + + getColumns() { + const { payrollStore } = this.props; + const { salarySendDetailTableStore } = payrollStore; + const { columns } = salarySendDetailTableStore; + if (!columns) { + return []; } + let result = columns.filter(item => item.hide == "false").map(item => { + item = { ...item }; + if (item.dataIndex == "operation") { + item.render = (text, record) => { + if (text == "ALREADYSEND") { + return ( + { + this.handleWithdraw(record); + }}>撤回 + ); + } else { + return ( + { + this.handleGrant(record); + }}>发送 + ); + } + }; + } + return item; + }); + return result; + } - componentWillMount() { - let id = getQueryString("id") - this.setState({currentId: id}) - const { payrollStore: {getPayrollInfo, getPayrollDetailList, getPayrollDetailSa} } = this.props; - getPayrollInfo(id) - getPayrollDetailList({salarySendId: id}) - getPayrollDetailSa() - } + // 导出所选 + handleExportSelected() { - // 撤回 - handleWithdraw(record) { - const { payrollStore } = this.props; - const { withdrawPayroll, getInfoList } = payrollStore; - withdrawPayroll({ - ids: [record.id], - salarySendId: this.state.currentId - }).then(() => { - getInfoList({ - salarySendId:this.state.currentId - }) - }) - } + } - // 发送 - handleGrant(record) { - const { payrollStore } = this.props; - const { grantPayroll, getInfoList } = payrollStore; - grantPayroll({ - ids: [record.id], - salarySendId: this.state.currentId - }).then(() => { - getInfoList({ - salarySendId:this.state.currentId - }) - }) - } + // 导出全部 + handleExportAll = () => { + // const { payrollStore } = this.props; + // const { exportDetailList } = payrollStore + // exportDetailList({salarySendId: this.state.currentId}) + const url = `${window.location.origin}/api/bs/hrmsalary/salaryBill/send/exportDetailList?salarySendId=${this.state.currentId}`; + window.open(url, "_self"); + }; - getColumns() { - const { payrollStore } = this.props; - const { salarySendDetailTableStore } = payrollStore - const { columns } = salarySendDetailTableStore; - if(!columns) { - return [] - } - let result = columns.filter(item => item.hide == "false").map(item => { - item = {...item} - if(item.dataIndex == "operation") { - item.render = (text,record) => { - if(text == 'ALREADYSEND') { - return ( - { -this.handleWithdraw(record) -}}>撤回 - ) - } else { - return ( - { -this.handleGrant(record) -}}>发送 - ) - } - } - } - return item; - }) - return result; - } - - // 导出所选 - handleExportSelected() { - - } - - // 导出全部 - handleExportAll=()=> { - // const { payrollStore } = this.props; - // const { exportDetailList } = payrollStore - // exportDetailList({salarySendId: this.state.currentId}) - const url= `${window.location.origin}/api/bs/hrmsalary/salaryBill/send/exportDetailList?salarySendId=${this.state.currentId}` - window.open(url, '_self'); - } - - getSearchsAdQuick() { - const handleMenuClick = (e) => { - switch(e.key) { - case "1": - this.handleExportSelected() - break; - } - } - const menu = ( - - 导出所选 - - ); - return ( - // {this.handleExportAll()}}>导出全部 - - ) - // return (
) - } + getSearchsAdQuick() { + const handleMenuClick = (e) => { + switch (e.key) { + case "1": + this.handleExportSelected(); + break; + } + }; + const menu = ( + + 导出所选 + + ); + return ( + // {this.handleExportAll()}}>导出全部 + + ); + // return (
) + } - // 分页 - handleDataPageChange(value) { - const { payrollStore: {getPayrollInfo, getPayrollDetailList, getPayrollDetailSa} } = this.props; - getPayrollDetailList({salarySendId: this.state.currentId, ...this.pageInfo}) - } + // 分页 + handleDataPageChange(value) { + const { payrollStore: { getPayrollInfo, getPayrollDetailList, getPayrollDetailSa } } = this.props; + getPayrollDetailList({ salarySendId: this.state.currentId, ...this.pageInfo }); + } - handleShowSizeChange(pageInfo) { - const { payrollStore: {getPayrollInfo, getPayrollDetailList, getPayrollDetailSa} } = this.props; - getPayrollDetailList({salarySendId: this.state.currentId, ...pageInfo}) - } + handleShowSizeChange(pageInfo) { + const { payrollStore: { getPayrollInfo, getPayrollDetailList, getPayrollDetailSa } } = this.props; + getPayrollDetailList({ salarySendId: this.state.currentId, ...pageInfo }); + } - handleSearch() { - const { payrollStore: {getPayrollDetailList}} = this.props; - getPayrollDetailList({salarySendId: this.state.currentId, ...this.pageInfo}) - } - render() { - const {payrollStore} = this.props; - const { setDetailListShowSearchAd, detailListShowSearchAd, getPayrollDetailList, detailListCondition, detailListConditionForm, salarySendDetailBaseInfo, salarySendDetailTableStore, salarySendDetailDataSource, salarySendDetailPageInfo } = payrollStore; - return ( -
- } // 左侧图标 - iconBgcolor='#F14A2D' // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 - buttons={[this.getSearchsAdQuick()]} - > - setDetailListShowSearchAd(bool)} //高级搜索面板受控 - searchsAd={getSearchs(detailListConditionForm, toJS(detailListCondition), 2)} // 高级搜索内部数据 - // buttonsAd={adBtn} // 高级搜索内部按钮 - onSearch={() => { -this.handleSearch() -}} // 点搜索按钮时的回调 - // searchsAdQuick={this.getSearchsAdQuick()} - onSearchChange={v => detailListConditionForm.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 - searchsBaseValue={detailListConditionForm.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步 - /> -
-
- 薪资所属月:{salarySendDetailBaseInfo.salaryMonth && salarySendDetailBaseInfo.salaryMonth.year}-{salarySendDetailBaseInfo.salaryMonth && salarySendDetailBaseInfo.salaryMonth.monthValue} - + } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={true} // 是否显示下拉按钮 + buttons={[this.getSearchsAdQuick()]} + > + setDetailListShowSearchAd(bool)} //高级搜索面板受控 + searchsAd={getSearchs(detailListConditionForm, toJS(detailListCondition), 2)} // 高级搜索内部数据 + // buttonsAd={adBtn} // 高级搜索内部按钮 + onSearch={() => { + this.handleSearch(); + }} // 点搜索按钮时的回调 + // searchsAdQuick={this.getSearchsAdQuick()} + onSearchChange={v => detailListConditionForm.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 + searchsBaseValue={detailListConditionForm.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步 + /> +
+
+ 薪资所属月:{salarySendDetailBaseInfo.salaryMonth && salarySendDetailBaseInfo.salaryMonth.year}-{salarySendDetailBaseInfo.salaryMonth && salarySendDetailBaseInfo.salaryMonth.monthValue} + - 工资单模板:{salarySendDetailBaseInfo.template} -
+ placement="topLeft" + /> + 工资单模板:{salarySendDetailBaseInfo.template} +
-
- 已发放:{salarySendDetailBaseInfo.sendNum}/{salarySendDetailBaseInfo.sendTotal} -
-
+
+ 已发放:{salarySendDetailBaseInfo.sendNum}/{salarySendDetailBaseInfo.sendTotal} +
+
-
+
- { - this.pageInfo.current = value - this.handleDataPageChange(value) - }} - onShowSizeChange={(current, pageSize) => { - this.pageInfo = {current, pageSize} - this.handleShowSizeChange(this.pageInfo) - }} - /> -
-
- ) - } + { + this.pageInfo.current = value; + this.handleDataPageChange(value); + }} + onShowSizeChange={(current, pageSize) => { + this.pageInfo = { current, pageSize }; + this.handleShowSizeChange(this.pageInfo); + }} + /> +
+
+ ); + } } diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less index fc750e58..bdc41900 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less +++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.less @@ -1,13 +1,15 @@ .payrollGrant { - padding: 20px; - .titleBar { - height: 47px; - line-height: 47px; - .titleBarLeft { - float: left; - } - .titleBarRight { - float: right; - } + .titleBar { + height: 47px; + line-height: 47px; + padding: 0 10px; + + .titleBarLeft { + float: left; } -} \ No newline at end of file + + .titleBarRight { + float: right; + } + } +} diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 1e837409..da89cc8b 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -1,15 +1,13 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; -import { WeaInputSearch, WeaHelpfulTip, WeaTable, WeaTop, WeaTab } from "ecCom"; -import { dataSource, payrollColumns } from "../columns"; -import { Menu, Button, Dropdown, message } from "antd"; -import CustomTab from "../../../components/customTab"; +import { WeaHelpfulTip, WeaTab, WeaTop } from "ecCom"; +import { Button, Dropdown, Menu, message } from "antd"; import "./index.less"; import PayrollGrantModal from "./payrollGrantModal"; import PayrollWithdrawModal from "./payrollWithdrawModal"; import { getQueryString } from "../../../util/url"; -import { renderNoright, getSearchs } from "../../../util"; +import { getSearchs } from "../../../util"; import CustomPaginationTable from "../../../components/customPaginationTable"; @inject("payrollStore") @@ -255,10 +253,10 @@ export default class PayrollGrant extends React.Component { onChange: this.onSelectChange }; return ( -
+
} // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 buttons={[this.getSearchsAdQuick()]} @@ -284,39 +282,39 @@ export default class PayrollGrant extends React.Component {
薪资所属月:{salarySendDetailBaseInfo.salaryMonth && - salarySendDetailBaseInfo.salaryMonth - .year}-{salarySendDetailBaseInfo.salaryMonth && - salarySendDetailBaseInfo.salaryMonth.monthValue} + salarySendDetailBaseInfo.salaryMonth + .year}-{salarySendDetailBaseInfo.salaryMonth && + salarySendDetailBaseInfo.salaryMonth.monthValue} @@ -327,7 +325,7 @@ export default class PayrollGrant extends React.Component {
已发放:{salarySendDetailBaseInfo.sendNum}/ + style={{ color: "red" }}> {salarySendDetailBaseInfo.sendTotal} diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.less b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.less index 285a43e7..1d96b7c2 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.less +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.less @@ -1,8 +1,8 @@ -.payrollGrant { - padding: 20px; +.payrollGrant_new { .titleBar { height: 47px; line-height: 47px; + padding: 0 10px; .titleBarLeft { float: left; } @@ -15,3 +15,19 @@ overflow: auto; } } + +.batchReleaseWrapper{ + .ant-modal-footer button{ + margin-right: 0 !important; + } + .searchWrapper{ + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10px; + } + .tableWrpper{ + max-height: 500px; + overflow-y: auto; + } +} diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollGrantModal.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollGrantModal.js index 78709e23..1204d5a1 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollGrantModal.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollGrantModal.js @@ -1,8 +1,8 @@ import React from "react"; -import { WeaInputSearch, WeaHelpfulTip, WeaTable } from "ecCom"; -import { payrollGrantColumns, dataSource } from "../columns"; -import { Menu, Button, Table, Modal, Dropdown, message } from "antd"; +import { WeaDialog, WeaHelpfulTip, WeaInputSearch, WeaTable } from "ecCom"; +import { Dropdown, Menu, message } from "antd"; import { inject, observer } from "mobx-react"; +import "./index.less"; @inject("payrollStore") @observer @@ -15,6 +15,7 @@ export default class payrollGrantModal extends React.Component { searchValue: "" }; } + // 撤回 handleWithdraw(record) { const { payrollStore } = this.props; @@ -150,26 +151,69 @@ export default class payrollGrantModal extends React.Component { }; return ( - { + this.handleGrantAll(); + }}> + 全部发放 + + ]} onCancel={() => { this.props.onCancel(); }}> -
- 批量发放 -
- { - this.handleGrantAll(); - }}> - 全部发放 - +
+
+
+ + 薪资所属月:{salarySendDetailBaseInfo.salaryMonth && + salarySendDetailBaseInfo.salaryMonth + .year}-{salarySendDetailBaseInfo.salaryMonth && + salarySendDetailBaseInfo.salaryMonth.monthValue} + + + + 工资单模板:{salarySendDetailBaseInfo.template} + +
{ @@ -180,69 +224,24 @@ export default class payrollGrantModal extends React.Component { }} />
-
-
-
- - 薪资所属月:{salarySendDetailBaseInfo.salaryMonth && - salarySendDetailBaseInfo.salaryMonth - .year}-{salarySendDetailBaseInfo.salaryMonth && - salarySendDetailBaseInfo.salaryMonth.monthValue} - - + { + this.handleDataPageChange(value); + }, + total: canGrantPageInfo.total, + current: canGrantPageInfo.pageNum, + showTotal: total => `共 ${total} 条` + }} /> - - 工资单模板:{salarySendDetailBaseInfo.template} -
-
- { - this.handleDataPageChange(value); - }, - total: canGrantPageInfo.total, - current: canGrantPageInfo.pageNum, - showTotal: total => `共 ${total} 条` - }} - /> -
- + ); } } diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollWithdrawModal.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollWithdrawModal.js index 7387af88..f1e93bf6 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollWithdrawModal.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollWithdrawModal.js @@ -1,7 +1,6 @@ import React from "react"; -import { WeaInputSearch, WeaHelpfulTip, WeaTable } from "ecCom"; -import { payrollGrantColumns, dataSource } from "../columns"; -import { Menu, Button, Table, Modal, Dropdown } from "antd"; +import { WeaDialog, WeaHelpfulTip, WeaInputSearch, WeaTable } from "ecCom"; +import { Dropdown, Menu } from "antd"; import { inject, observer } from "mobx-react"; @inject("payrollStore") @@ -151,25 +150,69 @@ export default class PayrollWithdrawModal extends React.Component { }; return ( - { + this.handleWithdrawAll(); + }}> + 全部撤回 + + ]} onCancel={() => { this.props.onCancel(); }}> -
- 批量撤回 -
- { - this.handleWithdrawAll(); - }}> - 全部撤回 - +
+
+
+ + 薪资所属月:{salarySendDetailBaseInfo.salaryMonth && + salarySendDetailBaseInfo.salaryMonth + .year}-{salarySendDetailBaseInfo.salaryMonth && + salarySendDetailBaseInfo.salaryMonth.monthValue} + + + + 工资单模板:{salarySendDetailBaseInfo.template} + +
{ @@ -181,67 +224,23 @@ export default class PayrollWithdrawModal extends React.Component { />
-
-
- - 薪资所属月:{salarySendDetailBaseInfo.salaryMonth && - salarySendDetailBaseInfo.salaryMonth - .year}-{salarySendDetailBaseInfo.salaryMonth && - salarySendDetailBaseInfo.salaryMonth.monthValue} - - + { + this.handleDataPageChange(value); + }, + total: canWithdrawPageInfo.total, + current: canWithdrawPageInfo.pageNum, + showTotal: total => `共 ${total} 条` + }} /> - - 工资单模板:{salarySendDetailBaseInfo.template} -
-
-
- { - this.handleDataPageChange(value); - }, - total: canWithdrawPageInfo.total, - current: canWithdrawPageInfo.pageNum, - showTotal: total => `共 ${total} 条` - }} - /> -
- + ); } } diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js index 72443627..e4c08473 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js @@ -1,10 +1,10 @@ import React from "react"; -import { Row, Col, Switch, Select } from "antd"; +import { Col, Row } from "antd"; import { WeaInput, WeaSelect } from "ecCom"; import { inject, observer } from "mobx-react"; -import RequiredLabelTip from "../../../components/requiredLabelTip"; +import { toJS } from 'mobx'; import "./index.less"; -const { Option } = Select; + @inject("payrollStore") @observer @@ -17,13 +17,17 @@ export default class BaseInformForm extends React.Component { request: {} }; } + componentWillMount() { const { payrollStore } = this.props; const { getPayrollBaseForm } = payrollStore; getPayrollBaseForm(this.props.id).then(data => { this.setState( { - options: data.salarySobOptions, + options: _.isEmpty(toJS(data.salarySobOptions)) ? [{ key: "", showname: "" }] : [{ + key: "", + showname: "" + }, ...toJS(data.salarySobOptions)], request: data.templateBaseData }, () => { @@ -44,17 +48,8 @@ export default class BaseInformForm extends React.Component { } render() { - const { request } = this.state; - const { - salarySob, - salarySobOption, - name, - description, - emailStatus, - sendEmail, - sendEmailOptions, - msgStatus - } = request; + const { request, options } = this.state; + const { salarySob, name, description } = request; return (
@@ -62,32 +57,26 @@ export default class BaseInformForm extends React.Component {
- 薪资账套 + 薪资账套 {this.state.inited && - } + onChange={value => this.hanldeChange({ salarySob: value })}/>} - 工资单模板名称 + 工资单模板名称 this.hanldeChange({ name: value })} /> @@ -103,40 +92,6 @@ export default class BaseInformForm extends React.Component { - {/* 发送位置先隐藏 */} - {/*
- 发送位置 -
- -
- - 邮件 - - {this.hanldeChange({emailStatus: value})}}/> - - - - - - 发送地址 - - {this.hanldeChange({sendEmail: value})}}/> - - - - - - - - 消息中心 - - {this.hanldeChange({msgStatus: value})}}/> - - - - - - */} ); } diff --git a/pc4mobx/hrmSalary/pages/salaryFile/index.js b/pc4mobx/hrmSalary/pages/salaryFile/index.js index 1465078a..d65c5d58 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/index.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/index.js @@ -6,6 +6,7 @@ import { WeaBrowser, WeaCheckbox, WeaDatePicker, + WeaError, WeaFormItem, WeaHelpfulTip, WeaInput, @@ -246,46 +247,43 @@ export default class SalaryFile extends React.Component { > this.setState({ noPayDate })} /> , width: 516, onOk: () => { - stopSalary(this.state.noPayDate).then(()=>{ + if (_.isEmpty(this.state.noPayDate)) { + message.warning("请选择最后发薪日期") + return false; + } + stopSalary(this.state.noPayDate).then(() => { getTableDatas({ ...this.state.searchItemsValue }); - }) + }); }, onCancel: () => { } - }); + }) }; // 查看 Slide 头部操作按钮 renderEditSlideOperate = () => { const { taxAgentStore: { showOperateBtn }, salaryFileStore: { salaryIncreaseUrl, currentId } } = this.props; const { isShow, url } = salaryIncreaseUrl; - return ( -
- { - showOperateBtn && isShow === "true" && - - } - { - showOperateBtn && - - } - { - showOperateBtn && - - } -
- ); + let arrList = []; + if (showOperateBtn && isShow === "true") { + arrList.push(); + } + if (showOperateBtn) { + arrList.push(); + arrList.push(); + } + return arrList; }; // table选中条目 @@ -568,7 +566,7 @@ export default class SalaryFile extends React.Component { > } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) @@ -717,6 +715,7 @@ export default class SalaryFile extends React.Component { {this.state.editSlideVisible && ( { - const { salaryItemStore: { deleteItem } } = this.props; - deleteItem(this.state.selectedRowKeys); - } - - return ( - { -this.props.onCancel() -}} footer={null} width={800}> -
- 批量删除 -
- - { -this.handleSearchChange(value) -}} onSearch={(value) => { -this.handleSearch(value) -}}/> -
-
-
- { -this.handleDataPageChange(value) -}, - total: canDeleteList.total, - showTotal: (total) => `共 ${total} 条`, - current: canDeleteList.pageNum - }} - /> - -
-
- ) - } -} \ No newline at end of file + const rowSelection = { + selectedRowKeys, + onChange: this.onSelectChange.bind(this) + }; + + const handleDelete = () => { + const { salaryItemStore: { deleteItem } } = this.props; + deleteItem(this.state.selectedRowKeys); + }; + + return ( + { + this.props.onCancel(); + }} + buttons={[ + + ]} + style={{ width: "80vw" }} + > +
+ { + this.handleSearchChange(value); + }} onSearch={(value) => { + this.handleSearch(value); + }}/> +
+
+ { + this.handleDataPageChange(value); + }, + total: canDeleteList.total, + showTotal: (total) => `共 ${total} 条`, + current: canDeleteList.pageNum + }} + /> +
+
+ ); + } +} diff --git a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js index cc18813b..fd88d913 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js @@ -1,6 +1,6 @@ import React from "react"; -import { Button, Col, Icon, Modal, Row } from "antd"; -import { WeaFormItem, WeaInput, WeaSelect, WeaTextarea, WeaHelpfulTip } from "ecCom"; +import { Button, Col, Icon, Row } from "antd"; +import { WeaDialog, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaTextarea } from "ecCom"; import { inject, observer } from "mobx-react"; import "./index.less"; @@ -11,10 +11,10 @@ export default class FormalFormModal extends React.Component { super(props); this.state = { value: "", - extendParam:{ - sqlReturnKey: '', - datasource:{ - datasourceId: "", + extendParam: { + sqlReturnKey: "", + datasource: { + datasourceId: "" } }, returnValue: "", @@ -48,8 +48,8 @@ export default class FormalFormModal extends React.Component { this.setState({ extendParam: { sqlReturnKey: extendParam.sqlReturnKey, - datasource:{ - datasourceId: extendParam.datasource ? extendParam.datasource.datasourceId : '', + datasource: { + datasourceId: extendParam.datasource ? extendParam.datasource.datasourceId : "" } } }); @@ -216,18 +216,20 @@ export default class FormalFormModal extends React.Component { const { searchGroup, searchFields } = salaryItemStore; const { value, formulaDatasourceList, extendParam } = this.state; return ( - { - this.handleSave(); - }}>保存 - } - wrapClassName="formula-wrapper" - onCancel={() => { - this.props.onCancel(); - }}> + { + this.handleSave(); + }}>保存 + ]} + className="formula-wrapper" + initLoadCss + onCancel={() => { + this.props.onCancel(); + }}> { (this.props.valueType == "3" || this.referenceType == "sql") && @@ -238,11 +240,11 @@ export default class FormalFormModal extends React.Component { wrapperCol={{ span: 18 }} > { - this.setState({ extendParam: {...extendParam, sqlReturnKey} }); + this.setState({ extendParam: { ...extendParam, sqlReturnKey } }); }}/> -
+ { - this.setState({ extendParam: {...extendParam, datasource:{datasourceId}} }); + this.setState({ extendParam: { ...extendParam, datasource: { datasourceId } } }); }} /> @@ -323,7 +325,7 @@ export default class FormalFormModal extends React.Component { - + ); } } diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js index 33003d42..425a59d2 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js @@ -10,6 +10,7 @@ import SlideModalTitle from "../../components/slideModalTitle"; import CustomSalaryItemSlide from "./customSalaryItemSlide"; import DeleteSalaryItemModal from "./deleteSalaryItemModal"; import CustomPaginationTable from "../../components/customPaginationTable"; +import "../socialSecurityBenefits/programme/index.less"; @inject("salaryItemStore", "taxAgentStore") @observer @@ -206,8 +207,6 @@ export default class SalaryItem extends React.Component { ]; - const topTab = []; - const handleMenuClick = (e) => { const { salaryItemStore: { getSysItemList, setEditSlideVisible, initRequest } } = this.props; if (e.key == "1") { @@ -255,28 +254,24 @@ export default class SalaryItem extends React.Component { }; const renderCustomOperate = () => { - return ( - -
- { - this.state.isAdd ?
- - -
: - this.state.editable ?
- -
: - "" - } - -
- ); + let arrList=[]; + if(this.state.isAdd){ + arrList=[ + , + + ] + }else if(this.state.editable){ + arrList=[ + + ] + } + return arrList; }; const handleSaveSlideChange = (value) => { @@ -292,7 +287,7 @@ export default class SalaryItem extends React.Component { > } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) @@ -338,6 +333,7 @@ export default class SalaryItem extends React.Component { { editSlideVisible && { - this.setState({ selectedTab: item.key }); - } - } + customOperate={(showOperateBtn || showSalaryItemBtn) ? renderCustomOperate() : []} /> } content={ diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.less b/pc4mobx/hrmSalary/pages/salaryItem/index.less index 5ba1b84d..a43ac6fe 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.less +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.less @@ -11,6 +11,12 @@ min-height: 200px; max-height: 85vh; overflow: auto; + padding: 16px 20px !important; + } + .headerSearchWrapper{ + display: flex; + justify-content: flex-end; + margin-bottom: 20px; } } diff --git a/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js b/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js index 8831d317..885e1c23 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js @@ -1,6 +1,6 @@ import React from "react"; -import { WeaInputSearch } from "ecCom"; -import { Button, Modal } from "antd"; +import { WeaDialog, WeaInputSearch } from "ecCom"; +import { Button } from "antd"; import { inject, observer } from "mobx-react"; import { WeaTableNew } from "comsMobx"; import "./index.less"; @@ -40,35 +40,41 @@ export default class SystemSalaryItemModal extends React.Component { }; return ( - { this.props.onCancel(); - }} width={900} + }} + style={{ width: 900 }} + buttons={[ + + ]} > -
- 添加系统薪资项目 -
- - { - this.handleSearchChange(value); - }} onSearch={(value) => { - this.handleSearch(value); - }}/> +
+
+ { + this.handleSearchChange(value); + }} + onSearch={(value) => { + this.handleSearch(value); + }}/>
+
- - + ); } } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index ec8f6898..5b0d6fb9 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -11,6 +11,7 @@ import AccumulationFundForm from "./accumulationFundForm"; import OtherForm from "./otherForm"; import CustomPaginationTable from "../../../components/customPaginationTable"; import ImportModal from "../../../components/importModal"; +import "./index.less"; @inject("archivesStore", "taxAgentStore") @observer @@ -217,7 +218,6 @@ export default class Archives extends React.Component { selectedRowKeys, onChange: this.onSelectChange }; - return (
} // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 + showDropIcon={false} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 buttons={showOperateBtn ? btns : []} @@ -270,34 +270,30 @@ export default class Archives extends React.Component { { this.state.editSlideVisible && - { - showOperateBtn && selectedTab != 0 && - } -
+ (showOperateBtn && selectedTab != 0) ? + [] : [] } subItemChange={ - (item) => { - this.setState({ selectedTab: item.key }); + (selectedTab) => { + this.setState({ selectedTab }); } } /> @@ -317,11 +313,14 @@ export default class Archives extends React.Component { { selectedTab == 3 && } -
} - onClose={() => this.setState({ editSlideVisible: false })} + onClose={() => this.setState({ editSlideVisible: false },()=>{ + this.setState({ selectedTab: '0' }); + })} showMask={true} - closeMaskOnClick={() => this.setState({ editSlideVisible: false })}/> + closeMaskOnClick={() => this.setState({ editSlideVisible: false },()=>{ + this.setState({ selectedTab: '0' }); + })}/> } { this.state.importVisible && { this.handleImportCancel(); - }} /> } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less index 14a479df..ebbc0a7c 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less @@ -23,3 +23,31 @@ border-bottom: none; } } + +.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/socialSecurityBenefits/programme/customNewModal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customNewModal.js index d1449921..3239ea74 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customNewModal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customNewModal.js @@ -1,43 +1,47 @@ -import React from 'react' -import { getCustomSearchs, getSearchs } from '../../../util'; -import { Modal } from 'antd' -import { observable, action, toJS } from 'mobx'; -import { inject, observer } from 'mobx-react'; -import CustomForm from '../../../components/customForm' +import React from "react"; +import { WeaDialog } from "ecCom"; +import { Button } from "antd"; +import { inject, observer } from "mobx-react"; +import CustomForm from "../../../components/customForm"; -@inject('programmeStore') +@inject("programmeStore") @observer export default class CustomNewModal extends React.Component { - constructor(props) { - super(props) - } + constructor(props) { + super(props); + } - handleOK() { - const { programmeStore: {createSICategory, setCustomRequest, customRequest, updateCustomCategory}} = this.props; - if(!this.props.edit) { // 新增 - createSICategory(customRequest).then(() => { - this.props.onCancel() - }) - } else { - updateCustomCategory(customRequest).then(() => { - this.props.onCancel() - }) - } + handleOK() { + const { programmeStore: { createSICategory, customRequest, updateCustomCategory } } = this.props; + if (!this.props.edit) { // 新增 + createSICategory(customRequest).then(() => { + this.props.onCancel(); + }); + } else { + updateCustomCategory(customRequest).then(() => { + this.props.onCancel(); + }); } + } - render() { - const { programmeStore: {customRequest, setCustomRequest}} = this.props; - return ( - { -this.props.onCancel() -}} title="新建自定义福利" onOk={() => { -this.handleOK() -}}> - {/* {getCustomSearchs(this.props.form, toJS(this.props.condition), 1)} */} - { -setCustomRequest(value) -}}/> - - ) - } -} \ No newline at end of file + render() { + const { programmeStore: { customRequest, setCustomRequest } } = this.props; + return ( + this.props.onCancel()} + title="新建自定义福利" + style={{ height: "auto!important" }} + buttons={[ + , + + ]} + > + { + setCustomRequest(value); + }}/> + + ); + } +} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js index 607e1274..5f427049 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js @@ -364,7 +364,6 @@ export default class Programme extends React.Component { const { programmeStore: { getCustomForm, - getCumCustomForm, setCustomNewVisible, setCustomRequest } @@ -435,8 +434,9 @@ export default class Programme extends React.Component { if(_.isEmpty(this.refs.copyRef.state.value)){ this.refs.copyRef.refs.weaError.showError(); }else{ - copyScheme({ id: copyId, schemeName: copyModalValue }); - this.setState({ copyModalVisible: false }); + copyScheme({ id: copyId, schemeName: copyModalValue }).then(() => { + this.setState({ copyModalVisible: false }); + }) } }; @@ -456,7 +456,7 @@ export default class Programme extends React.Component { title="社保福利方案" // 文字 icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 + showDropIcon={false} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) dropMenuProps={{ collectParams }}> {/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */} @@ -536,6 +536,7 @@ export default class Programme extends React.Component { 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/socialSecurityBenefits/standingBookDetail/components/abnormalList.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/abnormalList.js index cb6cd3ec..aad88508 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/abnormalList.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/abnormalList.js @@ -97,7 +97,7 @@ export default class AbnormalListIndex extends Component { />
{/* table */} -
+
this.setState({importParams: {...importParams, visible: true}})}/> + onClick={() => this.setState({ importParams: { ...importParams, visible: true } })}/> {/*导入弹框*/} { - this.setState({importParams: {...importParams, visible: false}},()=>{ + 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 /> @@ -524,7 +524,7 @@ export default class NormalIndex extends Component { />
{/* table */} -
+
导出全部
{/* table */} -
+
, + iconBgcolor: "lightblue", + loading: false, + selectedKey: "main", + selectArray: [ + { key: 200, selected: true, showname: "200" }, + { key: 100, selected: false, showname: "100" } + ], + childComCont: "子组件内容" + }; + } + + render() { + const { + title, + icon, + iconBgcolor, + loading, + selectedKey, + selectArray, + childComCont, + visible + } = this.state; + const btns = [ + , + + ]; + const dropMenuDatas = [ + { + key: 1, + disabled: loading, + icon: , + content: "搜索" + } + ]; + const tabs = [ + { + key: "main", + title: "主页" + }, + { + key: "detail", + title: "详情" + }, + { + key: "detail1", + title: "详情1" + }, + { + key: "detail2", + title: "详情2" + }, + { + key: "detail3", + title: "详情3" + }, + { + key: "detail4", + title: "详情4" + }, + { + key: "detail5", + title: "详情5" + }, + { + key: "detail6", + title: "详情6" + }, + { + key: "detail7", + title: "详情7" + }, + { + key: "detail8", + title: "详情8" + } + ]; + return ( +
+ + this.setState({ visible: false })} + visible={visible} + style={{ width: 800, height: 600 }} + hasScroll + > + { + this.setState({ + selectedKey: key, + childComCont: "你选择了 " + key + " tab页" + }); + }} + > +
{childComCont}
+
+
+
+ ); + } + + onDropMenuClick(key) { + console.log(`点击了下拉菜单的第${key}项`); + } + + dosubmit() { + console.log("点击了提交"); + } +} diff --git a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js index a076a2ea..6f570de2 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js @@ -1,5 +1,5 @@ import React from "react"; -import { Icon, Table, message, Button } from "antd"; +import { Button, message, Table } from "antd"; import { WeaInputSearch } from "ecCom"; import AddTaxAgentModal from "./addTaxAgentModal"; @@ -86,20 +86,20 @@ export default class SlideTaxagentUser extends React.Component { showSizeChanger: true, onShowSizeChange: (current, pageSize) => { setPageObj && - setPageObj({ - current, - pageSize, - tab: includeType, - targetName: searchValue - }); + setPageObj({ + current, + pageSize, + tab: includeType, + targetName: searchValue + }); }, onChange: current => { setPageObj && - setPageObj({ - current, - tab: includeType, - targetName: searchValue - }); + setPageObj({ + current, + tab: includeType, + targetName: searchValue + }); } }; @@ -129,13 +129,13 @@ export default class SlideTaxagentUser extends React.Component { }}> 人员范围 | { - this.handleTabClick(0); - }}> + style={{ + cursor: "pointer", + color: includeType == 0 ? "#4ba9f2" : "#000" + }} + onClick={() => { + this.handleTabClick(0); + }}> 从范围中排除
@@ -156,7 +156,7 @@ export default class SlideTaxagentUser extends React.Component { > diff --git a/pc4mobx/hrmSalary/stores/ledger.js b/pc4mobx/hrmSalary/stores/ledger.js index 23eab4c5..769b3d76 100644 --- a/pc4mobx/hrmSalary/stores/ledger.js +++ b/pc4mobx/hrmSalary/stores/ledger.js @@ -421,6 +421,11 @@ export class LedgerStore { message.warning("选择员工状态不能为空"); return false; } + + if (_.every(params.targetParams, it => !notNull(it.targetId))) { + message.warning("对象类型不能为空"); + return false; + } return true; } diff --git a/pc4mobx/hrmSalary/stores/programme.js b/pc4mobx/hrmSalary/stores/programme.js index 8164a5fd..a7994e62 100644 --- a/pc4mobx/hrmSalary/stores/programme.js +++ b/pc4mobx/hrmSalary/stores/programme.js @@ -219,13 +219,20 @@ export class ProgrammeStore { @action("复制福利方案") copyScheme = (params) => { - API.copyScheme(params).then(res => { - if(res.status) { - message.success("复制成功") - this.getTableDatas(this.selectedKey); - } else { - message.error(res.errormsg || "复制失败") - } + return new Promise((resolve,reject)=>{ + API.copyScheme(params).then(res => { + if(res.status) { + resolve("复制成功"); + message.success("复制成功"); + this.getTableDatas(this.selectedKey); + } else { + reject(res.errormsg || "复制失败"); + message.error(res.errormsg || "复制失败"); + } + }).catch(err => { + reject("方案名称重复"); + message.error(`${err}方案名称重复`); + }) }) } @action("删除社保数据") @@ -276,10 +283,11 @@ export class ProgrammeStore { // 新增自定义福利 @action createSICategory = (params) => { - if(!this.validateCustomRequest()) { - return - } return new Promise((resolve, reject) => { + if(!this.validateCustomRequest()) { + reject(); + return + } API.createSICategory(params).then(res => { if(res.status) { message.success("新增成功") diff --git a/pc4mobx/hrmSalary/stores/salaryItem.js b/pc4mobx/hrmSalary/stores/salaryItem.js index 9a50ffa7..1d33ad1e 100644 --- a/pc4mobx/hrmSalary/stores/salaryItem.js +++ b/pc4mobx/hrmSalary/stores/salaryItem.js @@ -340,7 +340,6 @@ export class SalaryItemStore { return item }) } - console.log("this.canDeleteList:", this.canDeleteList) this.canDeleteList = data } else { message.error(res.errormsg || "获取失败")