From d77a3f5fca77cf8e8071b6b0401c724c56dab984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 13 Feb 2023 10:41:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=96=AA=E9=85=AC=E9=A1=B5=E9=9D=A2=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/appConfig/index.js | 1 + pc4mobx/hrmSalary/pages/appConfig/index.less | 11 + pc4mobx/hrmSalary/pages/calculate/index.js | 42 +-- .../pages/dataAcquisition/attendance/index.js | 83 +++--- .../pages/dataAcquisition/cumDeduct/index.js | 25 +- .../dataAcquisition/cumDeduct/index.less | 13 +- .../dataAcquisition/cumSituation/index.js | 28 +- .../dataAcquisition/otherDeduct/index.js | 25 +- .../dataAcquisition/otherDeduct/index.less | 32 ++ .../specialAddDeduction/index.js | 22 +- .../specialAddDeduction/index.less | 6 + pc4mobx/hrmSalary/pages/declare/columns.js | 250 ---------------- .../hrmSalary/pages/declare/generateModal.js | 25 +- pc4mobx/hrmSalary/pages/declare/index.js | 280 ++++++------------ pc4mobx/hrmSalary/pages/mySalary/index.js | 164 ++++------ pc4mobx/hrmSalary/pages/mySalary/index.less | 11 + pc4mobx/hrmSalary/pages/payroll/index.js | 64 ++-- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 58 ++-- .../hrmSalary/pages/payrollFiles/index.less | 11 + pc4mobx/hrmSalary/pages/salaryItem/index.js | 61 ++-- .../socialSecurityBenefits/archives/index.js | 28 +- .../archives/index.less | 39 ++- .../socialSecurityBenefits/programme/index.js | 118 +++----- .../programme/index.less | 19 +- .../standingBook/index.js | 84 ++---- .../standingBook/index.less | 16 +- .../standingBookDetail/components/index.less | 115 ++++--- .../components/makeupDifference.js | 63 ++-- .../standingBookDetail/components/normal.js | 28 +- .../standingBookDetail/components/overView.js | 26 +- .../components/regression.js | 39 +-- .../components/supplementarySlide.js | 6 +- pc4mobx/hrmSalary/pages/taxAgent/index.js | 2 +- pc4mobx/hrmSalary/pages/taxAgent/index.less | 41 +-- pc4mobx/hrmSalary/stores/declare.js | 94 +++--- 35 files changed, 834 insertions(+), 1096 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/appConfig/index.less diff --git a/pc4mobx/hrmSalary/pages/appConfig/index.js b/pc4mobx/hrmSalary/pages/appConfig/index.js index ec4dc5a5..a7b3d7ce 100644 --- a/pc4mobx/hrmSalary/pages/appConfig/index.js +++ b/pc4mobx/hrmSalary/pages/appConfig/index.js @@ -8,6 +8,7 @@ import React, { Component } from "react"; import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaInput, WeaSearchGroup, WeaTop } from "ecCom"; import * as API from "../../apis/ruleconfig"; import { Button, message } from "antd"; +import "./index.less"; const Input = (props) => { const { label, value } = props; diff --git a/pc4mobx/hrmSalary/pages/appConfig/index.less b/pc4mobx/hrmSalary/pages/appConfig/index.less new file mode 100644 index 00000000..53fd7ecb --- /dev/null +++ b/pc4mobx/hrmSalary/pages/appConfig/index.less @@ -0,0 +1,11 @@ +.appConfigWrapper { + height: 100%; + display: flex; + flex-direction: column; + + .wea-search-group { + flex: 1; + height: 100%; + overflow: auto; + } +} diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js index 426b4219..fda59a8d 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/index.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { Button, DatePicker, Dropdown, Menu, message, Modal, Tag } from "antd"; -import { WeaInputSearch, WeaTop } from "ecCom"; +import { WeaInputSearch, WeaNewScroll, WeaTop } from "ecCom"; import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../components/customTab"; import moment from "moment"; @@ -400,26 +400,26 @@ export default class Calculate extends React.Component { dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) dropMenuProps={{ collectParams }}> {/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */} - { - }} - /> - { - this.handleDataPageChange(value); - }} - onShowSizeChange={(current, pageSize) => { - this.pageInfo = { current, pageSize }; - this.handleShowSizeChange(this.pageInfo); - }} - /> + +
+ + { + this.handleDataPageChange(value); + }} + onShowSizeChange={(current, pageSize) => { + this.pageInfo = { current, pageSize }; + this.handleShowSizeChange(this.pageInfo); + }} + /> + +
{/*归档进度条*/} { diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js index f7d4a8d6..b017ee3c 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { Button, Col, DatePicker, Dropdown, Menu, message, Modal, Row, Switch } from "antd"; -import { WeaDatePicker, WeaInputSearch, WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; +import { WeaDatePicker, WeaInputSearch, WeaNewScroll, WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; import moment from "moment"; import { renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../../components/customTab"; @@ -698,7 +698,7 @@ export default class Attendance extends React.Component { dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) dropMenuProps={{ collectParams }}> {this.state.tabSelectedKey == 0 - ?
+ ?
{ }} /> - - { - this.pageInfo.current = value; - this.handleDataPageChange(value); - }} - onShowSizeChange={(current, pageSize) => { - this.pageInfo = { current, pageSize }; - this.handleDataShowSizeChange(this.pageInfo); - }} - /> +
+ + { + this.pageInfo.current = value; + this.handleDataPageChange(value); + }} + onShowSizeChange={(current, pageSize) => { + this.pageInfo = { current, pageSize }; + this.handleDataShowSizeChange(this.pageInfo); + }} + /> + +
- :
+ :
{ - this.pageInfo.current = value; - this.handleFieldPageChange(value); - }} - onShowSizeChange={(current, pageSize) => { - this.pageInfo = { current, pageSize }; - this.handleFieldShowSizeChange(this.pageInfo); - }} - /> +
+ + { + this.pageInfo.current = value; + this.handleFieldPageChange(value); + }} + onShowSizeChange={(current, pageSize) => { + this.pageInfo = { current, pageSize }; + this.handleFieldShowSizeChange(this.pageInfo); + }} + /> + +
} rightContent={
- +
+ + + +
{modalVisiable && (
- +
+ + + +
{modalVisiable &&
- +
+ + + +
{modalVisiable && div.attendanceContent { + height: 100%; + display: flex; + flex-direction: column; + overflow: hidden; + + .tableWrapper { + flex: 1; + overflow: hidden; + } + } + + .ant-row, .ant-col-18, .tableWrapper { + height: 100%; + overflow: hidden; + } + } +} + .moreIconWrapper { .ant-popover-inner { min-width: 106px diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js index 074f5706..0d31317b 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js @@ -1,7 +1,7 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { Button, Col, Dropdown, Menu, message, Modal, Popover, Row } from "antd"; -import { WeaPopoverHrm, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTools, WeaTop } from "ecCom"; +import { WeaPopoverHrm, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTools, WeaTop, WeaNewScroll } from "ecCom"; import InlineForm from "./components/inlineForm"; import { getSearchs, renderLoading } from "../../../util"; import * as API from "../../../apis/special"; @@ -524,14 +524,18 @@ class SpecialAddDeduction extends Component { searchsAd={this.getSearchsAdQuick(true)} setShowSearchAd={bool => this.setState({ advanceParams: { ...advanceParams, visible: bool } })} /> - +
+ + + +
{ + const { declareStore: { saveDeclare } } = this.props; const { date, taxAgentId } = this.state; if (_.isEmpty(date) && _.isEmpty(taxAgentId)) { this.refs.weaError.showError(); @@ -36,16 +35,18 @@ export default class GenerateModal extends React.Component { this.refs.weaError1.showError(); return; } + this.setState({ loading: true }); saveDeclare({ salaryMonthStr: date, taxAgentId }).then(() => { + this.setState({ loading: false }); this.props.onGenerate(); + }).catch(() => { + this.setState({ loading: false }); }); - } + }; render() { - const { - taxAgentStore: { taxAgentAdminOption }, - declareStore: { loading } - } = this.props; + const { taxAgentStore: { taxAgentAdminOption } } = this.props; + const { loading } = this.state; return ( { - this.handleGenerate(); - }}> + onClick={this.handleGenerate}> 生成申报表 ] }> diff --git a/pc4mobx/hrmSalary/pages/declare/index.js b/pc4mobx/hrmSalary/pages/declare/index.js index 78f43a4d..b0ec9c95 100644 --- a/pc4mobx/hrmSalary/pages/declare/index.js +++ b/pc4mobx/hrmSalary/pages/declare/index.js @@ -1,186 +1,81 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { Button, DatePicker } from "antd"; -import { WeaTop } from "ecCom"; -import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 +import { WeaNewScroll, WeaTop } from "ecCom"; import CustomTab from "../../components/customTab"; import CustomTable from "../../components/customTable"; -import { columns } from "./columns"; import GenerateModal from "./generateModal"; +import { getDeclareList } from "../../apis/declare"; import moment from "moment"; const { MonthPicker } = DatePicker; - -@inject("declareStore", "taxAgentStore") +@inject("taxAgentStore") @observer export default class Declare extends React.Component { constructor(props) { super(props); this.state = { - value: "", - selectedKey: "0", declarationModalVisible: false, startDate: moment(new Date()).startOf("year").format("YYYY-MM"), - endDate: moment(new Date()) - .startOf("month") - .format("YYYY-MM") - }; - this.searchParams = { current: 1 }; - this.pageInfo = { current: 1, pageSize: 10 }; - columns.map((item) => { - if (item.dataIndex == "cz") { - item.render = (text, record) => { - return ( - { - window.open( - "/spa/hrmSalary/static/index.html#/main/hrmSalary/generateDeclarationDetail?id=" + - record.id - ); - }}> - 查看 - - ); - }; + endDate: moment(new Date()).startOf("month").format("YYYY-MM"), + loading: false, + dataSource: [], + columns: [], + pageInfo: { + current: 1, + pageSize: 10, + total: 0 } - }); + }; } componentWillMount() { - const { - taxAgentStore: { getTaxAgentSelectListAsAdmin }, - declareStore: { getDeclareList } - } = this.props; - this.searchParams = { - fromSalaryMonthStr: this.state.startDate, - endSalaryMonthStr: this.state.endDate, - current: 1 - }; - getDeclareList(this.searchParams); + const { taxAgentStore: { getTaxAgentSelectListAsAdmin } } = this.props; + this.getDeclareList(); getTaxAgentSelectListAsAdmin(); } - // 日期区间改变事件 - handleRangePickerChange(type, value) { - const { - declareStore: { getDeclareList } - } = this.props; - this.setState({ - [type]: value ? moment(value).format("YYYY-MM") : moment().format("YYYY-MM") - }, () => { - this.pageInfo.current = 1; - const { startDate: fromSalaryMonthStr, endDate: endSalaryMonthStr } = this.state; - getDeclareList({ - fromSalaryMonthStr, - endSalaryMonthStr, - ...this.pageInfo - }); - }); - } - - // 查询列表 - handleSearch() { - this.setState({ declarationModalVisible: false }, () => { - const { declareStore } = this.props; - const { getDeclareList } = declareStore; - this.searchParams = { - fromSalaryMonthStr: this.state.startDate, - endSalaryMonthStr: this.state.endDate, - current: 1 - }; - getDeclareList(this.searchParams); - }); - } - - getColumns() { - const { - declareStore: { listColumns } - } = this.props; - let columns = [...listColumns]; - columns.push({ - title: "操作", - dataIndex: "operate", - render: (text, record) => { - return ( - { - window.open( - "/spa/hrmSalary/static/index.html#/main/hrmSalary/generateDeclarationDetail?id=" + - record.id - ); - }}> - 查看 - - ); - } - }); - return columns; - } - - handleDataPageChange(value) { - const { - declareStore: { getDeclareList } - } = this.props; - this.searchParams = { - fromSalaryMonthStr: this.state.startDate, - endSalaryMonthStr: this.state.endDate, - current: value - }; - getDeclareList(this.searchParams); - } - - handleShowSizeChange(pageInfo) { - const { - declareStore: { getDeclareList } - } = this.props; - this.searchParams = { - fromSalaryMonthStr: this.state.startDate, - endSalaryMonthStr: this.state.endDate, + getDeclareList = () => { + const { pageInfo, startDate: fromSalaryMonthStr, endDate: endSalaryMonthStr } = this.state; + const payload = { + fromSalaryMonthStr, endSalaryMonthStr, ...pageInfo }; - getDeclareList(this.searchParams); - } + this.setState({ loading: true }); + getDeclareList(payload).then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const { columns, list: dataSource, total, pageNum: current, pageSize } = data; + this.setState({ + columns, dataSource, total, current, pageSize + }); + } + }).catch(() => this.setState({ loading: false })); + }; + + // 日期区间改变事件 + handleRangePickerChange = (type, value) => { + this.setState({ + [type]: value ? moment(value).format("YYYY-MM") : moment().format("YYYY-MM"), + pageInfo: { ...this.state.pageInfo, current: 1 } + }, () => { + this.getDeclareList(); + }); + }; + handleSearch = () => { + this.setState({ declarationModalVisible: false }, () => this.getDeclareList()); + }; + handleDataPageChange = (current, pageSize = 10) => { + this.setState({ + ...this.state.pageInfo, + current, + pageSize + }, () => this.getDeclareList()); + }; render() { - const { declareStore, taxAgentStore: { showOperateBtn } } = this.props; - const { - loading, - hasRight, - form, - condition, - tableStore, - showSearchAd, - getTableDatas, - doSearch, - setShowSearchAd, - listDataSource, - listColumns, - pageInfo - } = declareStore; - - if (!hasRight && !loading) { - // 无权限处理 - return renderNoright(); - } - - const rightMenu = [ - // 右键菜单 - // { - // key: "BTN_COLUMN", - // icon: , - // content: "显示列定制", - // onClick: this.showColumn - // } - ]; - const collectParams = { - // 收藏功能配置 - favname: "个税申报表", - favouritetype: 1, - objid: 0, - link: "wui/index.html#/ns_demo03/index", - importantlevel: 1 - }; - + const { taxAgentStore: { showOperateBtn } } = this.props; + const { loading, columns, dataSource, pageInfo } = this.state; const renderRightOperation = () => { const { startDate, endDate } = this.state; return ( @@ -219,38 +114,59 @@ export default class Declare extends React.Component { return (
- } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={false} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 + } + iconBgcolor="#F14A2D" showDropIcon={false} > - { - this.handleDataPageChange(value); - }, - total: pageInfo.total, - showTotal: (total) => `共 ${total} 条`, - current: pageInfo.pageNum - }} - /> +
+ + { + return ( + { + window.open( + "/spa/hrmSalary/static/index.html#/main/hrmSalary/generateDeclarationDetail?id=" + + record.id + ); + }}> + 查看 + + ); + } + } + ]} + dataSource={dataSource} + pagination={{ + onChange: (value) => { + this.handleDataPageChange(value); + }, + total: pageInfo.total, + showTotal: (total) => `共 ${total} 条`, + current: pageInfo.current, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + showQuickJumper: true, + pageSize: pageInfo.pageSize, + onShowSizeChange: (current, pageSize) => { + this.handleDataPageChange(current, pageSize); + } + }} + /> + +
{this.state.declarationModalVisible && ( { - this.handleSearch(); - }} + onGenerate={this.handleSearch} visible={this.state.declarationModalVisible} - onCancel={() => { - this.setState({ declarationModalVisible: false }); - }} + onCancel={() => this.setState({ declarationModalVisible: false })} /> )}
diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.js b/pc4mobx/hrmSalary/pages/mySalary/index.js index 43e22b86..67fd26e2 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/index.js +++ b/pc4mobx/hrmSalary/pages/mySalary/index.js @@ -1,14 +1,14 @@ import React from "react"; import { inject, observer } from "mobx-react"; -import { Button, DatePicker } from "antd"; -import { WeaTop } from "ecCom"; +import { DatePicker } from "antd"; +import { WeaNewScroll, WeaTop } from "ecCom"; import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../components/customTab"; -import CustomPaginationTable from "../../components/customPaginationTable"; import moment from "moment"; -import "./index.less"; import PayrollModal from "./payrollModal"; import Authority from "./authority"; +import CustomPaginationTable from "../../components/customPaginationTable"; +import "./index.less"; const { RangePicker } = DatePicker; @@ -84,7 +84,7 @@ export default class MySalary extends React.Component { handleTabChange(selectedKey) { - if (selectedKey == "2") { + if (selectedKey === "2") { const { mySalaryStore: { getRecordList } } = this.props; getRecordList(); } @@ -102,14 +102,7 @@ export default class MySalary extends React.Component { render() { const { mySalaryStore } = this.props; - const { - loading, - hasRight, - form, - setMySalaryBill, - doSearch, - setShowSearchAd - } = mySalaryStore; + const { loading, hasRight, setMySalaryBill } = mySalaryStore; const { myBillDataSource, recordListColumns, @@ -121,15 +114,6 @@ export default class MySalary extends React.Component { if (!hasRight && !loading) { // 无权限处理 return renderNoright(); } - - const rightMenu = [// 右键菜单 - // { - // key: 'BTN_COLUMN', - // icon: , - // content: '显示列定制', - // onClick: this.showColumn - // }, - ]; const collectParams = { // 收藏功能配置 favname: "我的薪资福利", favouritetype: 1, @@ -137,55 +121,30 @@ export default class MySalary extends React.Component { link: "wui/index.html#/ns_demo03/index", importantlevel: 1 }; - const adBtn = [ // 高级搜索内部按钮 - , - , - - ]; const topTab = [ { title: "工资单", viewcondition: "0" }, - // { - // title: "社保福利", - // viewcondition: "1" - // }, { title: "调薪记录", viewcondition: "2" } ]; - const renderSearchOperationItem = () => { - if (this.state.selectedKey == "0") { + if (this.state.selectedKey === "0") { return (
薪资所属月: - - this.handleSalaryRangePickerChange(value)} + this.handleSalaryRangePickerChange(value)} />
); - } else if (this.state.selectedKey == "1") { - return (
缴纳月份: -
-
- -
- - 至 - -
- -
-
-
); } else { return (
); } - }; - return (
@@ -194,61 +153,56 @@ export default class MySalary extends React.Component { icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={false} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 > - { - this.handleTabChange(v); - this.setState({ selectedKey: v }); - }} + { + this.handleTabChange(v); + this.setState({ selectedKey: v }); + }} /> - - { - this.state.selectedKey == "0" && - - { - this.pageInfo.current = value; - this.handlePageChange(); - }} - onShowSizeChange={(current, pageSize) => { - this.pageInfo = { current, pageSize }; - this.handlePageChange(); - }} - /> - } - {/* { - this.state.selectedKey == '1' && - } */} - { - this.state.selectedKey == "2" && - { - this.historyPageInfo.current = value; - this.handleHistoryPageChange(); - }} - onShowSizeChange={(current, pageSize) => { - this.historyPageInfo = { current, pageSize }; - this.handleHistoryPageChange(); - }} - /> - } - +
+ + { + this.state.selectedKey === "0" && + { + this.pageInfo.current = value; + this.handlePageChange(); + }} + onShowSizeChange={(current, pageSize) => { + this.pageInfo = { current, pageSize }; + this.handlePageChange(); + }} + /> + } + { + this.state.selectedKey === "2" && + { + this.historyPageInfo.current = value; + this.handleHistoryPageChange(); + }} + onShowSizeChange={(current, pageSize) => { + this.historyPageInfo = { current, pageSize }; + this.handleHistoryPageChange(); + }} + /> + } + +
{ diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.less b/pc4mobx/hrmSalary/pages/mySalary/index.less index d989101a..8a2b690e 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/index.less +++ b/pc4mobx/hrmSalary/pages/mySalary/index.less @@ -8,4 +8,15 @@ margin-left: 10px; margin-right: 10px } + + .wea-new-top-content { + display: flex; + flex-direction: column; + overflow: hidden; + + .tableWrapper { + flex: 1; + overflow: hidden; + } + } } diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index e098f240..9297b134 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -3,7 +3,7 @@ import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; import { Button, DatePicker, message, Modal } from "antd"; import moment from "moment"; -import { WeaHelpfulTip, WeaInputSearch, WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; +import { WeaHelpfulTip, WeaInputSearch, WeaNewScroll, WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; import { renderLoading } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../components/customTab"; import StepSlide from "../../components/stepSlide"; @@ -360,7 +360,7 @@ export default class Payroll extends React.Component { }; return ( -
+
} // 左侧图标 @@ -374,35 +374,39 @@ export default class Payroll extends React.Component { this.setState({ selectedKey: v, stepSlideVisible: false, editSlideVisible: false }); }} /> - { - this.state.selectedKey === "0" && - { - this.handleTemplateListEdit(record); - }} - salaryYearMonth={this.salaryYearMonth} - handleListDataPageChange={(value, pageInfo) => { - this.handleListDataPageChange(value, pageInfo); - }} - handleListShowSizeChange={(pageInfo) => { - this.handleListShowSizeChange(pageInfo); - }} - /> - } +
+ + { + this.state.selectedKey === "0" && + { + this.handleTemplateListEdit(record); + }} + salaryYearMonth={this.salaryYearMonth} + handleListDataPageChange={(value, pageInfo) => { + this.handleListDataPageChange(value, pageInfo); + }} + handleListShowSizeChange={(pageInfo) => { + this.handleListShowSizeChange(pageInfo); + }} + /> + } - { - this.state.selectedKey === "1" && - { - this.handleTemplateListEdit(record); - }} - onCopy={(record) => { - this.handleTemplateListCopy(record); - }} - showOperateBtn={showOperateBtn} - onDelete={(record) => this.handleTemplateListDelete(record)} - /> - } + { + this.state.selectedKey === "1" && + { + this.handleTemplateListEdit(record); + }} + onCopy={(record) => { + this.handleTemplateListCopy(record); + }} + showOperateBtn={showOperateBtn} + onDelete={(record) => this.handleTemplateListDelete(record)} + /> + } + +
{ this.state.stepSlideVisible && { this.setState({ loading: { ...loading, query: false } }); @@ -743,18 +744,6 @@ class Index extends Component { })}> 重置 , ]; - const rightMenu = [ - // 右键菜单 - { - key: "BTN_COLUMN", - icon: , - content: "显示列定制", - onClick: () => { - tableStore.setColSetVisible(true); - tableStore.tableColSet(true); - } - } - ]; const rowSelection = { selectedRowKeys, onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }) @@ -766,7 +755,6 @@ class Index extends Component { icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) > - record.archiveStatus === "ARCHIVE" ? "archiveRow" : ""} - rowSelection={rowSelection} - scroll={{ x: 1200 }} - /> - {/*人员卡片*/} - - +
+ + record.archiveStatus === "ARCHIVE" ? "archiveRow" : ""} + rowSelection={rowSelection} + scroll={{ x: 1200 }} + /> + {/*人员卡片*/} + + + +
- - record.id} - loading={loading} - rowSelection={rowSelection} - dataSource={tableDataSource} - columns={this.getColumns(tableColumns)} - total={this.state.searchParams.total} - current={this.state.searchParams.current} - pageSize={this.state.searchParams.pageSize} - onPageChange={(value) => { - this.handlePageChange(value); - }} - onShowSizeChange={(current, pageSize) => { - this.setState({ - searchParams: { - ...this.state.searchParams, - current, - pageSize - } - }, () => { - this.handleShowSizeChange({ name: this.state.searchValue, ...this.state.searchParams }); - }); - }} - /> - + +
+ + record.id} + loading={loading} + rowSelection={rowSelection} + dataSource={tableDataSource} + columns={this.getColumns(tableColumns)} + total={this.state.searchParams.total} + current={this.state.searchParams.current} + pageSize={this.state.searchParams.pageSize} + onPageChange={(value) => { + this.handlePageChange(value); + }} + onShowSizeChange={(current, pageSize) => { + this.setState({ + searchParams: { + ...this.state.searchParams, + current, + pageSize + } + }, () => { + this.handleShowSizeChange({ name: this.state.searchValue, ...this.state.searchParams }); + }); + }} + /> + +
{ diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index a61e6cc7..421dd1ac 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -2,7 +2,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; import { Button, Dropdown, Menu, message, Modal, Popover } from "antd"; -import { WeaHelpfulTip, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom"; +import { WeaHelpfulTip, WeaSlideModal, WeaTab, WeaTable, WeaTop, WeaNewScroll } from "ecCom"; import { getSearchs, renderLoading } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import BaseForm from "./baseForm"; import SlideModalTitle from "../../../components/slideModalTitle"; @@ -760,17 +760,21 @@ export default class Archives extends React.Component { onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步 /> - - { - !_.isEmpty(this.getColumns()) && - {this.getTipChildren()} - } +
+ + + { + !_.isEmpty(this.getColumns()) && + {this.getTipChildren()} + } + +
{ this.state.editSlideVisible && diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less index dd3e3a88..b8a94e63 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less @@ -9,7 +9,8 @@ padding-right: 10px; border: 1px solid #e2e2e2; margin-bottom: 0 !important; - .ant-select-selection{ + + .ant-select-selection { height: 30px; border-radius: 0; } @@ -23,14 +24,21 @@ border-bottom: none; } } -.mySalaryBenefitsWrapper{ - .tdEllipsis{ + +.mySalaryBenefitsWrapper { + .tableWrapper { + flex: 1; + overflow: hidden; + } + + .tdEllipsis { display: inline-block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + .optWrapper { display: flex; align-items: center; @@ -40,6 +48,7 @@ } } } + //提示语 .helpWrapper { display: flex; @@ -50,30 +59,32 @@ } } -.slideOuterWrapper{ - .wea-slide-modal-title{ +.slideOuterWrapper { + .wea-slide-modal-title { height: initial; line-height: initial; text-align: left; } - .rodal-close{ + + .rodal-close { z-index: 99; - top: 10px!important; + top: 10px !important; } } -@media (min-width: 1260px){ - .slideOuterWrapper{ - .reqTopWrapper .wea-new-top-req-title>div:first-child>div{ - max-width: 100%!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; + .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/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js index c134a812..309fca0f 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js @@ -2,7 +2,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; import { Button, Dropdown, Menu, message, Modal, Switch } from "antd"; -import { WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; +import { WeaNewScroll, WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; import { WeaTableNew } from "comsMobx"; import { renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../../components/customTab"; @@ -260,17 +260,7 @@ export default class Programme extends React.Component { render() { const { programmeStore, taxAgentStore: { showOperateBtn } } = this.props; - const { - loading, - hasRight, - form, - condition, - tableStore, - showSearchAd, - getTableDatas, - doSearch, - setShowSearchAd - } = programmeStore; + const { loading, hasRight, form, tableStore, getTableDatas } = programmeStore; const { selectedKey, setSelectedKey, @@ -287,34 +277,7 @@ export default class Programme extends React.Component { tableColumns, tablePageInfo } = programmeStore; - if (!hasRight && !loading) { - // 无权限处理 - return renderNoright(); - } - - const rightMenu = [ - // 右键菜单 - ]; - const collectParams = { - // 收藏功能配置 - favname: "社保福利方案", - favouritetype: 1, - objid: 0, - link: "wui/index.html#/ns_demo03/index", - importantlevel: 1 - }; - const adBtn = [ - // 高级搜索内部按钮 - , - , - - ]; + if (!hasRight && !loading) return renderNoright(); const topTab = [ { @@ -377,11 +340,6 @@ export default class Programme extends React.Component { this.setState({ customEdit: false }); }; - // const renderSearchOperationItem = () => { - // const { programmeStore: {setCustomSelectkey, getCustomCategoryList}} = this.props; - // return - // } - const handleOnSave = () => { const { programmeStore } = this.props; const { currentOperate } = this.state; @@ -449,15 +407,13 @@ export default class Programme extends React.Component { }; return ( -
+
} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={false} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }}> - {/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */} + > - {selectedKey == "custom" - ? + + {selectedKey == "custom" + ? + } + rightContent={renderCustomRightContent()} /> - } - rightContent={renderCustomRightContent()} - /> - : { - this.handlePageChange(value); - }} - onShowSizeChange={(current, pageSize) => { - this.pageInfo = { current, pageSize }; - const { - programmeStore: { form, getTableDatas, selectedKey } - } = this.props; - getTableDatas(selectedKey, this.pageInfo); - }} - />} + : { + this.handlePageChange(value); + }} + onShowSizeChange={(current, pageSize) => { + this.pageInfo = { current, pageSize }; + const { + programmeStore: { form, getTableDatas, selectedKey } + } = this.props; + getTableDatas(selectedKey, this.pageInfo); + }} + />} + +
{/* table */} -
- - - +
+ + + + + {/*编辑弹框*/} 导出全部
{/* table */} -
- - - +
+ + + + +
); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js index f36b76ef..841500e9 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js @@ -6,6 +6,7 @@ */ import React, { Component } from "react"; import { message, Modal } from "antd"; +import { WeaNewScroll } from "ecCom"; import RegTop from "./regTop"; import RegList from "./regList"; import RegAddEmployee from "./regAddEmployee"; @@ -132,23 +133,27 @@ class Regression extends Component { onChange={this.handleChangeOpt} selectKey={selectKey} /> - this.regListRef = dom} - visible={returnPersonModal.visible} - onChangeRowkey={(selectKey) => this.setState({ selectKey })} - onEdit={this.handleEdit} - /> - {/*编辑弹框*/} - - {/* 弹框 */} - this.regEmmployeeRef = dom} - {...returnPersonModal} - loading={loading} - onCancel={this.handleCloseModal} - onSave={this.handleSave} - /> +
+ + this.regListRef = dom} + visible={returnPersonModal.visible} + onChangeRowkey={(selectKey) => this.setState({ selectKey })} + onEdit={this.handleEdit} + /> + {/*编辑弹框*/} + + {/* 弹框 */} + this.regEmmployeeRef = dom} + {...returnPersonModal} + loading={loading} + onCancel={this.handleCloseModal} + onSave={this.handleSave} + /> + +
); } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js index 2802b7e4..4beb586f 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js @@ -370,10 +370,12 @@ class SupplementarySlide extends Component { className="supplementarySlideWrapper" visible={visible} top={0} - width={45} + measureT="%" + width={800} + measureX="px" height={100} + measureY="%" direction="right" - measure="%" title={ +
} // 左侧图标 diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.less b/pc4mobx/hrmSalary/pages/taxAgent/index.less index 204792e3..efc466ba 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/index.less +++ b/pc4mobx/hrmSalary/pages/taxAgent/index.less @@ -1,4 +1,4 @@ -.mySalaryBenefitsWrapper { +.taxWithholdingAgentWrapper { height: 100%; .wea-new-top-wapper { @@ -80,27 +80,30 @@ } } -.slideWrapper{ - .slideRefereUser{ - .operateBtn{ +.slideWrapper { + .slideRefereUser { + .operateBtn { display: flex; align-items: center; //.addOrDelBtn{ - .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; - } + .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; + } + //} } } diff --git a/pc4mobx/hrmSalary/stores/declare.js b/pc4mobx/hrmSalary/stores/declare.js index c4e006d8..cf80a323 100644 --- a/pc4mobx/hrmSalary/stores/declare.js +++ b/pc4mobx/hrmSalary/stores/declare.js @@ -1,8 +1,8 @@ -import { observable, action, toJS } from 'mobx'; -import { message } from 'antd'; -import { WeaForm, WeaTableNew } from 'comsMobx'; +import { action, observable } from "mobx"; +import { message } from "antd"; +import { WeaForm, WeaTableNew } from "comsMobx"; -import * as API from '../apis/declare'; // 引入API接口文件 +import * as API from "../apis/declare"; // 引入API接口文件 const { TableStore } = WeaTableNew; @@ -17,21 +17,22 @@ export class DeclareStore { // 列表 @observable listDataSource = []; @observable listColumns = []; - @observable pageInfo = {} + @observable pageInfo = {}; // 详情页 @observable declareInfo = {}; // 详情基本信息 @observable detailTableStore = new TableStore(); @observable detailDataSource = []; @observable datailColumns = []; - @observable detailPageInfo = {} + @observable detailPageInfo = {}; + @action setPageinfo = pageinfo => this.pageInfo = pageinfo; // 初始化操作 @action doInit = () => { this.getCondition(); this.getTableDatas(); - } + }; // 获得高级搜索表单数据 @action @@ -41,10 +42,10 @@ export class DeclareStore { this.condition = res.condition; this.form.initFormFields(res.condition); // 渲染高级搜索form表单 } else { - message.error(res.msg || '接口调用失败!') + message.error(res.msg || "接口调用失败!"); } })); - } + }; // 渲染table数据 @action @@ -57,11 +58,11 @@ export class DeclareStore { this.tableStore.getDatas(res.datas); // table 请求数据 this.hasRight = res.hasRight; } else { - message.error(res.msg || '接口调用失败!') + message.error(res.msg || "接口调用失败!"); } this.loading = false; })); - } + }; @action setShowSearchAd = bool => this.showSearchAd = bool; @@ -70,77 +71,76 @@ export class DeclareStore { @action doSearch = () => { this.getTableDatas(); this.showSearchAd = false; - } + }; //个税申报表-个税申报表列表 @action getDeclareList = (params = {}) => { - this.loading = true + this.loading = true; API.getDeclareList(params).then(res => { - if(res.status) { - this.listDataSource = res.data.list ? res.data.list: []; - this.listColumns = res.data.columns - this.pageInfo = res.data + if (res.status) { + this.listDataSource = res.data.list ? res.data.list : []; + this.listColumns = res.data.columns; + // this.setPageinfo({...this.pageInfo, }) + this.pageInfo = res.data; } else { - message.error(res.errormsg || '获取失败') + message.error(res.errormsg || "获取失败"); } - this.loading = false - }) - } + this.loading = false; + }); + }; //个税申报表-个税申报表生成 @action saveDeclare = (params) => { return new Promise((resolve, reject) => { - this.loading= true; + this.loading = true; API.saveDeclare(params).then(res => { - this.loading= false; - if(res.status) { - message.success("生成成功") + this.loading = false; + if (res.status) { + message.success("生成成功"); resolve(); } else { - message.error(res.errormsg || "生成失败") - reject() + message.error(res.errormsg || "生成失败"); + reject(); } - }) - }) + }); + }); - } + }; //个税申报表-个税申报表相关信息 @action getDeclareInfo = (taxDeclarationId) => { - API.getDeclareInfo({taxDeclarationId}).then(res => { - if(res.status) { - this.declareInfo = res.data + API.getDeclareInfo({ taxDeclarationId }).then(res => { + if (res.status) { + this.declareInfo = res.data; } else { - message.error(res.errormsg || "获取失败") + message.error(res.errormsg || "获取失败"); } - }) - } + }); + }; // 个税申报表详情列表 @action getDetailList = (taxDeclarationIdStr, params = {}) => { - API.getDetailList({taxDeclarationIdStr, ...params}).then(res => { - if(res.status) { + API.getDetailList({ taxDeclarationIdStr, ...params }).then(res => { + if (res.status) { this.detailDataSource = res.data.list ? res.data.list : []; - this.datailColumns = res.data.columns - this.detailPageInfo = res.data + this.datailColumns = res.data.columns; + this.detailPageInfo = res.data; // this.detailTableStore.getDatas(res.data.dataKey.datas) } else { - message.error(res.errrmsg || "获取失败") + message.error(res.errrmsg || "获取失败"); } - }) - } + }); + }; // 个税申报表导出 @action exportSalaryArchive = (id) => { - API.exportSalaryArchive(id) - } - - + API.exportSalaryArchive(id); + }; }