From 691358a9e287a8ab050b1f39eceb058b65ed6b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 1 Dec 2022 14:28:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E7=B3=BB=E7=BB=9F=E5=8F=B3?= =?UTF-8?q?=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/components/index.js | 111 +++--- pc4mobx/hrmSalary/pages/calculate/index.js | 104 +++--- .../pages/dataAcquisition/attendance/index.js | 191 ++++++----- .../pages/dataAcquisition/cumDeduct/index.js | 66 ++-- .../dataAcquisition/cumSituation/index.js | 66 ++-- .../dataAcquisition/otherDeduct/index.js | 94 ++--- pc4mobx/hrmSalary/pages/declare/index.js | 51 ++- .../individualIncomeTaxRateForm/index.js | 85 ++--- pc4mobx/hrmSalary/pages/ledger/index.js | 322 +++++++++--------- .../pages/ledger/step3/canMoveItem.js | 1 + pc4mobx/hrmSalary/pages/mySalary/index.js | 123 ++++--- pc4mobx/hrmSalary/pages/payroll/index.js | 93 +++-- .../pages/salaryItem/customSalaryItemSlide.js | 1 - pc4mobx/hrmSalary/pages/salaryItem/index.js | 86 +++-- .../socialSecurityBenefits/archives/index.js | 81 +++-- .../socialSecurityBenefits/programme/index.js | 163 +++++---- .../standingBook/index.js | 189 +++++----- pc4mobx/hrmSalary/pages/taxAgent/index.js | 110 +++--- pc4mobx/hrmSalary/pages/taxRate/index.js | 225 ++++++------ 19 files changed, 1063 insertions(+), 1099 deletions(-) diff --git a/pc4mobx/hrmSalary/components/index.js b/pc4mobx/hrmSalary/components/index.js index 98497f66..74d0b74a 100644 --- a/pc4mobx/hrmSalary/components/index.js +++ b/pc4mobx/hrmSalary/components/index.js @@ -1,17 +1,17 @@ -import React from 'react'; -import { inject, observer } from 'mobx-react'; -import { toJS } from 'mobx'; +import React from "react"; +import { inject, observer } from "mobx-react"; +import { toJS } from "mobx"; -import { Button } from 'antd'; -import { WeaLogView } from 'comsMobx'; -import { WeaTop, WeaRightMenu, WeaLocaleProvider, WeaNewScroll } from 'ecCom'; +import { Button } from "antd"; +import { WeaLogView } from "comsMobx"; +import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom"; -import { renderNoright, renderLoading, getSearchs } from '../util'; // 从util文件引入公共的方法 +import { getSearchs, renderLoading, renderNoright } from "../util"; // 从util文件引入公共的方法 const getLabel = WeaLocaleProvider.getLabel; const WeaLogViewComp = WeaLogView.Component; -@inject('baseFormStore') +@inject("baseFormStore") @observer export default class BaseForm extends React.Component { componentWillMount() { // 初始化渲染页面 @@ -31,24 +31,24 @@ export default class BaseForm extends React.Component { const { baseFormStore: { setLogVisible, saveForm } } = this.props; let btnArr = [ { - key: 'BTN_SAVE', - icon: , - content : `${getLabel(86,'保存')}`, - onClick : () => saveForm() + key: "BTN_SAVE", + icon: , + content: `${getLabel(86, "保存")}`, + onClick: () => saveForm() }, { - key: 'log', - content: getLabel(83, '日志'), - icon: , - onClick: () => setLogVisible(true), - },] + key: "log", + content: getLabel(83, "日志"), + icon: , + onClick: () => setLogVisible(true) + }]; return btnArr; } - + render() { /* 页面渲染说明: 1、判断是否无权限: 是显示无权限页面 - 2、渲染form页面: + 2、渲染form页面: 2-1: WeaRightMenu 右键菜单 2-2: WeaTop: 顶部: 包括下拉菜单 2-3: renderLoading: 加载数据中的loading效果(统一封装在util中) @@ -56,51 +56,56 @@ export default class BaseForm extends React.Component { 2-5: 通过getSearchs方法渲染form */ const { baseFormStore } = this.props; - const { loading, hasRight, form, condition, logVisible, logStore, saveLoading, setLogVisible, saveForm } = baseFormStore; // 从后台取数据 和 方法 - + const { + loading, + hasRight, + form, + condition, + logVisible, + logStore, + saveLoading, + setLogVisible, + saveForm + } = baseFormStore; // 从后台取数据 和 方法 + if (!hasRight && !loading) { // 无权限处理 return renderNoright(); } const btns = [ // 顶部按钮 - , + ]; const collectParams = { // 收藏功能配置 - favname: '基础表单', + favname: "基础表单", favouritetype: 1, objid: 0, - link: 'wui/index.html#/ns_demo01/index', - importantlevel: 1, + link: "wui/index.html#/ns_demo01/index", + importantlevel: 1 }; return ( - } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + buttons={btns} // 顶部按钮: 这里是保存按钮,不需要可以不显示 + buttonSpace={10} // 按钮之间的间隔 + showDropIcon={true} // 是否显示右侧下拉按钮 + dropMenuDatas={this.getRightMenu()} // 下拉菜单(和页面的右键菜单相同) + dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 > - } // 左侧图标 - iconBgcolor='#F14A2D' // 左侧图标背景色 - buttons={btns} // 顶部按钮: 这里是保存按钮,不需要可以不显示 - buttonSpace={10} // 按钮之间的间隔 - showDropIcon={true} // 是否显示右侧下拉按钮 - dropMenuDatas={this.getRightMenu()} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 - > - {loading ? renderLoading() : - - {getSearchs(form, toJS(condition), 1)} - - } - setLogVisible(false)} // 关闭日志弹框时的操作:设置logVisible属性为false - logStore={logStore} // 日志的store - logType="1" // 模块编码: 该参数要根据模块来给 - logSmallType="1" // 细分模块编码: 该参数要根据模块来给 - /> - - - ) + {loading ? renderLoading() : + + {getSearchs(form, toJS(condition), 1)} + + } + setLogVisible(false)} // 关闭日志弹框时的操作:设置logVisible属性为false + logStore={logStore} // 日志的store + logType="1" // 模块编码: 该参数要根据模块来给 + logSmallType="1" // 细分模块编码: 该参数要根据模块来给 + /> + + ); } } diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js index cc175022..ff83ab84 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 } from "antd"; -import { WeaInputSearch, WeaRightMenu, WeaTop } from "ecCom"; +import { WeaInputSearch, WeaTop } from "ecCom"; import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../components/customTab"; @@ -372,60 +372,56 @@ export default class Calculate extends React.Component { return (
- + {/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */} + } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={false} // 是否显示下拉按钮 + dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + dropMenuProps={{ collectParams }}> {/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */} - } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={false} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }}> - {/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */} - { - }} - /> - { - this.handleDataPageChange(value); - }} - onShowSizeChange={(current, pageSize) => { - this.pageInfo = { current, pageSize }; - this.handleShowSizeChange(this.pageInfo); - }} - /> - - {/*归档进度条*/} - { - this.state.progressVisible && - { - this.setState({ progressVisible: false, progress: 0 }); - }} - progress={this.state.progress} - /> - } - {this.state.baseFormVisible && - this.handleSearch(this.state.searchValue)} - onCancel={() => { - this.setState({ baseFormVisible: false }); - }} - />} - + { + }} + /> + { + this.handleDataPageChange(value); + }} + onShowSizeChange={(current, pageSize) => { + this.pageInfo = { current, pageSize }; + this.handleShowSizeChange(this.pageInfo); + }} + /> + + {/*归档进度条*/} + { + this.state.progressVisible && + { + this.setState({ progressVisible: false, progress: 0 }); + }} + progress={this.state.progress} + /> + } + {this.state.baseFormVisible && + this.handleSearch(this.state.searchValue)} + onCancel={() => { + this.setState({ baseFormVisible: false }); + }} + />}
); } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js index c0ea1200..73eae942 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, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; +import { WeaDatePicker, WeaInputSearch, WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; import moment from "moment"; import { renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../../components/customTab"; @@ -17,7 +17,7 @@ import TwoColContent from "../../../components/twoColContent"; import TipLabel from "../../../components/TipLabel"; import ItemMangeFormModal from "./itemMangeFormModal"; import CustomPaginationTable from "../../../components/customPaginationTable"; -import "../otherDeduct/index.less" +import "../otherDeduct/index.less"; const MonthPicker = DatePicker.MonthPicker; @@ -284,13 +284,16 @@ export default class Attendance extends React.Component { const { attendanceStore, taxAgentStore: { showOperateBtn } } = this.props; const { modalParam } = this.state; const { loading, hasRight, tableStore } = attendanceStore; - const { step, setStep, setSlideVisiable, slideVisiable, doBatchDelete,searchFieldSettingList, - fieldSettingAttendList, fieldSettingCustomList, setFieldSettingAttendList, setFieldSettingCustomList, + const { + step, setStep, setSlideVisiable, slideVisiable, doBatchDelete, searchFieldSettingList, + fieldSettingAttendList, fieldSettingCustomList, setFieldSettingAttendList, setFieldSettingCustomList } = attendanceStore; - const { getAttendanceFieldSettingList, saveAttendanceFieldSetting, fieldDataSource, + const { + getAttendanceFieldSettingList, saveAttendanceFieldSetting, fieldDataSource, fieldTableStore, fieldPageInfo, attendanceDataSource, attendanceColumns, attendancePageInfo, importLedgerList, previewAttendQuoteColumns, previewAttendQuoteDataSource, - importResult, cycle } = attendanceStore; + importResult, cycle + } = attendanceStore; if (!hasRight && !loading) { // 无权限处理 @@ -624,11 +627,11 @@ export default class Attendance extends React.Component { attendanceStore: { saveAttendanceField, getAttendanceFieldList } } = this.props; value.fieldType = value.fieldType == "1" ? "NUMBER" : "TEXT"; - saveAttendanceField(value).then(()=>{ + saveAttendanceField(value).then(() => { this.fieldSearch = { fieldName: this.state.fieldName }; getAttendanceFieldList(this.fieldSearch); this.setState({ itemMangeVisible: false }); - }) + }); }; const handleItemMangeUpdate = value => { @@ -687,94 +690,90 @@ export default class Attendance extends React.Component { return (
- - } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={false} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }}> - {this.state.tabSelectedKey == 0 - ?
- { - this.pageInfo = { current: 1, pageSize: 10 }; - handleTabChange(v); - }} - /> - { - }} - /> + } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={false} // 是否显示下拉按钮 + dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + dropMenuProps={{ collectParams }}> + {this.state.tabSelectedKey == 0 + ?
+ { + this.pageInfo = { current: 1, pageSize: 10 }; + handleTabChange(v); + }} + /> + { + }} + /> - { - this.pageInfo.current = value; - this.handleDataPageChange(value); - }} - onShowSizeChange={(current, pageSize) => { - this.pageInfo = { current, pageSize }; - this.handleDataShowSizeChange(this.pageInfo); - }} - /> -
- :
- { - this.setState({ - tabSelectedKey: v - },()=>{ - this.pageInfo = { current: 1, pageSize: 10 }; - }); - }} - /> - { - this.pageInfo.current = value; - this.handleFieldPageChange(value); - }} - onShowSizeChange={(current, pageSize) => { - this.pageInfo = { current, pageSize }; - this.handleFieldShowSizeChange(this.pageInfo); - }} - /> - } - rightContent={ - - } - /> -
} -
- + { + this.pageInfo.current = value; + this.handleDataPageChange(value); + }} + onShowSizeChange={(current, pageSize) => { + this.pageInfo = { current, pageSize }; + this.handleDataShowSizeChange(this.pageInfo); + }} + /> +
+ :
+ { + this.setState({ + tabSelectedKey: v + }, () => { + this.pageInfo = { current: 1, pageSize: 10 }; + }); + }} + /> + { + this.pageInfo.current = value; + this.handleFieldPageChange(value); + }} + onShowSizeChange={(current, pageSize) => { + this.pageInfo = { current, pageSize }; + this.handleFieldShowSizeChange(this.pageInfo); + }} + /> + } + rightContent={ + + } + /> +
} +
{ this.handleInitImportModal(); @@ -892,7 +891,7 @@ export default class Attendance extends React.Component { measure={"%"} title={ - } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={false} // 是否显示下拉按钮 + dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + buttons={showOperateBtn ? btns : []} > - } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={false} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - buttons={showOperateBtn ? btns : []} - > -
- setShowSearchAd(bool)} //高级搜索面板受控 - searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据 - buttonsAd={adBtn} // 高级搜索内部按钮 - onSearch={() => this.handleSearch()} // 点搜索按钮时的回调 - searchsAdQuick={this.getSearchsAdQuick()} - onSearchChange={(v) => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 - searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步 - /> -
- + setShowSearchAd(bool)} //高级搜索面板受控 + searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据 + buttonsAd={adBtn} // 高级搜索内部按钮 + onSearch={() => this.handleSearch()} // 点搜索按钮时的回调 + searchsAdQuick={this.getSearchsAdQuick()} + onSearchChange={(v) => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 + searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步 /> -
-
+
+ + {modalVisiable && ( - - } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={false} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 - buttons={showOperateBtn ? btns : []}> -
- setShowSearchAd(bool)} //高级搜索面板受控 - searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据 - buttonsAd={adBtn} // 高级搜索内部按钮 - onSearch={() => this.handleSearch()} // 点搜索按钮时的回调 - searchsAdQuick={this.getSearchsAdQuick()} - onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 - searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步 - /> -
- } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={false} // 是否显示下拉按钮 + dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 + buttons={showOperateBtn ? btns : []}> +
+ setShowSearchAd(bool)} //高级搜索面板受控 + searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据 + buttonsAd={adBtn} // 高级搜索内部按钮 + onSearch={() => this.handleSearch()} // 点搜索按钮时的回调 + searchsAdQuick={this.getSearchsAdQuick()} + onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 + searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步 /> - - +
+ +
{modalVisiable && { diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js index 15229dc6..1125e914 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js @@ -2,7 +2,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; import { Button, Col, Dropdown, Menu, message, Modal, Popover, Row } from "antd"; -import { WeaDatePicker, WeaHelpfulTip, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom"; +import { WeaDatePicker, WeaHelpfulTip, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom"; import moment from "moment"; import { getSearchs, renderLoading } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import ImportModal from "../../../components/importModal"; @@ -13,7 +13,6 @@ import EditSlideContent from "./editSlideContent"; import { optionAddAll } from "../../../util/options"; import * as API from "../../../apis/otherDeduct"; import "./index.less"; -import { extendToLastMonth } from "../../../apis/otherDeduct"; @inject("otherDeductStore", "taxAgentStore") @@ -244,7 +243,7 @@ export default class OtherDeduct extends React.Component { //新功能 handleCreateData = (payload) => { - const { editId }= this.state; + const { editId } = this.state; this.setState({ saveLoading: true }); if (!_.isEmpty(editId)) { API.editData({ ...payload, id: editId.id }).then(({ status, errormsg }) => { @@ -296,7 +295,7 @@ export default class OtherDeduct extends React.Component { if (key === "edit") { this.setState({ addVisible: true - },()=>{ + }, () => { API.getData({ id: row.id }).then(({ status, data }) => { if (status) { this.setState({ editId: data }); @@ -386,15 +385,15 @@ export default class OtherDeduct extends React.Component { }; //沿用上月 - extendToLastMonth= ()=>{ + extendToLastMonth = () => { const { monthValue: declareMonth, taxAgentId } = this.state; const { otherDeductStore: { doSearch } } = this.props; - const payload= { + const payload = { declareMonth, - taxAgentId: taxAgentId === "All" ? "" : taxAgentId, - } + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }; this.setState({ lastLoading: true }); - API.extendToLastMonth(payload).then(({ status, data, errormsg })=>{ + API.extendToLastMonth(payload).then(({ status, data, errormsg }) => { this.setState({ lastLoading: false }); if (status) { message.success(data || "操作成功"); @@ -406,7 +405,7 @@ export default class OtherDeduct extends React.Component { message.error(errormsg || "操作失败"); } }).catch(() => this.setState({ lastLoading: false })); - } + }; render() { @@ -442,7 +441,16 @@ export default class OtherDeduct extends React.Component { setPageObj } = otherDeductStore; const selectedRowKeys = toJS(tableStore.selectedRowKeys) || []; - const { modalParam, monthValue, taxAgentId, slideSelectedKey, addVisible, editId, saveLoading, lastLoading } = this.state; + const { + modalParam, + monthValue, + taxAgentId, + slideSelectedKey, + addVisible, + editId, + saveLoading, + lastLoading + } = this.state; const detailSelectedRowKeys = toJS(slideTableStore.selectedRowKeys) || []; @@ -542,7 +550,7 @@ export default class OtherDeduct extends React.Component { this.setState({ addVisible: true, editId: {} - },()=>addForm.resetForm()); + }, () => addForm.resetForm()); }}> 新建 , @@ -678,39 +686,37 @@ export default class OtherDeduct extends React.Component { return (
- - } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={false} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 - buttons={showOperateBtn ? btns : []}> -
- setShowSearchAd(bool)} //高级搜索面板受控 - searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据 - buttonsAd={adBtn} // 高级搜索内部按钮 - onSearch={() => this.handleSearch()} // 点搜索按钮时的回调 - searchsAdQuick={this.getSearchsAdQuick()} - onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 - searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步 - /> -
- } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={false} // 是否显示下拉按钮 + dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 + buttons={showOperateBtn ? btns : []}> +
+ setShowSearchAd(bool)} //高级搜索面板受控 + searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据 + buttonsAd={adBtn} // 高级搜索内部按钮 + onSearch={() => this.handleSearch()} // 点搜索按钮时的回调 + searchsAdQuick={this.getSearchsAdQuick()} + onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 + searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步 /> - - +
+ +
{modalVisiable && - } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={false} // 是否显示下拉按钮 + dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 > - } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={false} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 - > - - { - this.handleDataPageChange(value); - }, - total: pageInfo.total, - showTotal: (total) => `共 ${total} 条`, - current: pageInfo.pageNum - }} - /> - - + + { + this.handleDataPageChange(value); + }, + total: pageInfo.total, + showTotal: (total) => `共 ${total} 条`, + current: pageInfo.pageNum + }} + /> + {this.state.declarationModalVisible && ( { diff --git a/pc4mobx/hrmSalary/pages/individualIncomeTaxRateForm/index.js b/pc4mobx/hrmSalary/pages/individualIncomeTaxRateForm/index.js index 50fce644..13f4e45c 100644 --- a/pc4mobx/hrmSalary/pages/individualIncomeTaxRateForm/index.js +++ b/pc4mobx/hrmSalary/pages/individualIncomeTaxRateForm/index.js @@ -1,20 +1,16 @@ -import React from 'react'; -import { inject, observer } from 'mobx-react'; -import { toJS } from 'mobx'; +import React from "react"; +import { inject, observer } from "mobx-react"; -import { Button, Table, DatePicker } from 'antd'; +import { Button, DatePicker } from "antd"; -import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaTable } from 'ecCom'; +import { WeaTable, WeaTop } from "ecCom"; -import { renderNoright, getSearchs } from '../../util'; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 -import CustomTab from '../../components/customTab'; -import ContentWrapper from '../../components/contentWrapper'; - -import { columns, dataSource } from './columns'; +import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 +import { columns, dataSource } from "./columns"; const { MonthPicker } = DatePicker; -@inject('baseTableStore') +@inject("baseTableStore") @observer export default class IndividualIncomeTaxRateForm extends React.Component { constructor(props) { @@ -22,63 +18,68 @@ export default class IndividualIncomeTaxRateForm extends React.Component { this.state = { value: "", selectedKey: "0" - } + }; } + render() { const { baseTableStore } = this.props; - const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = baseTableStore; + const { + loading, + hasRight, + form, + condition, + tableStore, + showSearchAd, + getTableDatas, + doSearch, + setShowSearchAd + } = baseTableStore; if (!hasRight && !loading) { // 无权限处理 return renderNoright(); } const rightMenu = [// 右键菜单 - { - key: 'BTN_COLUMN', - icon: , - content: '显示列定制', + { + key: "BTN_COLUMN", + icon: , + content: "显示列定制", onClick: this.showColumn - }, + } ]; const collectParams = { // 收藏功能配置 - favname: '个税税率表', + favname: "个税税率表", favouritetype: 1, objid: 0, - link: 'wui/index.html#/ns_demo03/index', - importantlevel: 1, + link: "wui/index.html#/ns_demo03/index", + importantlevel: 1 }; const adBtn = [ // 高级搜索内部按钮 , , - , + ]; - const topTab = [ - ]; + const topTab = []; const renderSearchOperationItem = () => { - return
- - } + return
; + + }; return (
- } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={true} // 是否显示下拉按钮 + dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 > - } // 左侧图标 - iconBgcolor='#F14A2D' // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 - > - - - + +
- ) + ); } } diff --git a/pc4mobx/hrmSalary/pages/ledger/index.js b/pc4mobx/hrmSalary/pages/ledger/index.js index cdf8f2c9..4920a4e6 100644 --- a/pc4mobx/hrmSalary/pages/ledger/index.js +++ b/pc4mobx/hrmSalary/pages/ledger/index.js @@ -1,9 +1,9 @@ import React from "react"; import { inject, observer } from "mobx-react"; -import { Button, DatePicker, Dropdown, Menu, Modal, Switch } from "antd"; +import { Button, Dropdown, Menu, Modal, Switch } from "antd"; -import { WeaInputSearch, WeaRightMenu, WeaSlideModal, WeaTable, WeaTop } from "ecCom"; +import { WeaInputSearch, WeaSlideModal, WeaTable, WeaTop } from "ecCom"; import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../components/customTab"; import StepSlide from "../../components/stepSlide"; @@ -398,170 +398,166 @@ export default class Ledger extends React.Component { return (
- - } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={false} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }}> - { + } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={false} // 是否显示下拉按钮 + dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + dropMenuProps={{ collectParams }}> + { + }} + /> + it.dataIndex !== "operate") + } + dataSource={dataSource} + pagination={pagination} + loading={loading} + scroll={{ x: 1300 }} + /> + {this.state.stepSlideVisible && + { + this.setState({ stepSlideVisible: false }); }} - /> - it.dataIndex !== "operate") - } - dataSource={dataSource} - pagination={pagination} - loading={loading} - scroll={{ x: 1300 }} - /> - {this.state.stepSlideVisible && - { - this.setState({ stepSlideVisible: false }); - }} - customOperate={ - currentStep == 0 ? [ - - ]: currentStep == 1 ? [ - , - - ]:currentStep == 2 ? [ - , - , - - ] : currentStep == 3 ? [ - , - - ] : [] - } - title="新建账套" - content={ -
- {currentStep == 0 && } - {currentStep == 1 && } - {currentStep == 2 && } - {currentStep == 3 && } - {currentStep == 4 && } -
- } - />} - {this.state.editSlideVisible && - this.handleEditSlideSave()} - subItemChange={selectedTab => { - this.setState({ selectedTab }); - }} - /> - } - content={ -
- {selectedTab == 0 && } - {selectedTab == 1 && } - {selectedTab == 2 && } - {selectedTab == 3 && } - {selectedTab == 4 && } -
- } - onClose={() => this.setState({ editSlideVisible: false },()=>{ - this.setState({ selectedTab:0 }); + onClick={() => { + handleStep1Save(); + }}> + 保存并进入下一步 + + ] : currentStep == 1 ? [ + , + + ] : currentStep == 2 ? [ + , + , + + ] : currentStep == 3 ? [ + , + + ] : [] + } + title="新建账套" + content={ +
+ {currentStep == 0 && } + {currentStep == 1 && } + {currentStep == 2 && } + {currentStep == 3 && } + {currentStep == 4 && } +
+ } + />} + {this.state.editSlideVisible && + this.handleEditSlideSave()} + subItemChange={selectedTab => { + this.setState({ selectedTab }); + }} + /> + } + content={ +
+ {selectedTab == 0 && } + {selectedTab == 1 && } + {selectedTab == 2 && } + {selectedTab == 3 && } + {selectedTab == 4 && } +
+ } + onClose={() => this.setState({ editSlideVisible: false }, () => { + this.setState({ selectedTab: 0 }); + })} + showMask={true} + closeMaskOnClick={() => + this.setState({ editSlideVisible: false }, () => { + this.setState({ selectedTab: 0 }); })} - showMask={true} - closeMaskOnClick={() => - this.setState({ editSlideVisible: false },()=>{ - this.setState({ selectedTab:0 }); - })} - />} -
-
+ />} + {this.state.copyFormVisible && { this.handleSaveFormal(data); diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.js b/pc4mobx/hrmSalary/pages/mySalary/index.js index bf19c186..43e22b86 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/index.js +++ b/pc4mobx/hrmSalary/pages/mySalary/index.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { Button, DatePicker } from "antd"; -import { WeaRightMenu, WeaTop } from "ecCom"; +import { WeaTop } from "ecCom"; import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../components/customTab"; import CustomPaginationTable from "../../components/customPaginationTable"; @@ -189,80 +189,75 @@ export default class MySalary extends React.Component { return (
- } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={false} // 是否显示下拉按钮 + dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 > - } // 左侧图标 - 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 == "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 == "2" && + { + this.historyPageInfo.current = value; + this.handleHistoryPageChange(); + }} + onShowSizeChange={(current, pageSize) => { + this.historyPageInfo = { current, pageSize }; + this.handleHistoryPageChange(); + }} + /> + } - - + { salaryBillVisible && { - this.setState({ salaryBillVisible: false },()=>{ - setMySalaryBill({}) + this.setState({ salaryBillVisible: false }, () => { + setMySalaryBill({}); }); }} /> diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index 1168afab..83a1c169 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, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; +import { WeaHelpfulTip, WeaInputSearch, WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; import { renderLoading } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../components/customTab"; @@ -390,58 +390,53 @@ export default class Payroll extends React.Component { return (
- } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={false} // 是否显示下拉按钮 + dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 > - } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={false} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 - > - { - this.setState({ selectedKey: v, stepSlideVisible: false, editSlideVisible: false }); + { + 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 && 删除 }> - + ); } else { @@ -364,50 +365,45 @@ export default class SalaryItem extends React.Component { }; return (
- } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={false} // 是否显示下拉按钮 + dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 > - } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 - > - - 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(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(this.state.searchParams); + }); + }} + /> - - + { systemItemVisible && { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index d574bacb..0bc55999 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, WeaRightMenu, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom"; +import { WeaHelpfulTip, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom"; import { getSearchs, renderLoading } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import BaseForm from "./baseForm"; import SlideModalTitle from "../../../components/slideModalTitle"; @@ -704,49 +704,44 @@ export default class Archives extends React.Component { }; return (
- } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={false} // 是否显示下拉按钮 + dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 > - } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={false} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 - > - setShowSearchAd(bool)} //高级搜索面板受控 - searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据 - buttonsAd={adBtn} // 高级搜索内部按钮 - searchsBasePlaceHolder={"请输入姓名"} - onSearch={this.query} // 点搜索按钮时的回调 - onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 - searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步 - /> - - { - !_.isEmpty(this.getColumns()) && - {this.getTipChildren()} - } - - + setShowSearchAd(bool)} //高级搜索面板受控 + searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据 + buttonsAd={adBtn} // 高级搜索内部按钮 + searchsBasePlaceHolder={"请输入姓名"} + onSearch={this.query} // 点搜索按钮时的回调 + onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 + searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步 + /> + + { + !_.isEmpty(this.getColumns()) && + {this.getTipChildren()} + } + { this.state.editSlideVisible && - + } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={false} // 是否显示下拉按钮 + dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + dropMenuProps={{ collectParams }}> {/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */} - } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={false} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }}> - {/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */} - - {/* 操作按钮权限 */} - {showOperateBtn && - } + + {/* 操作按钮权限 */} + {showOperateBtn && + } - {selectedKey == "custom" && - { - setCustomSelectkey(v); - getCustomCategoryList(v); - }} - />} -
+ {selectedKey == "custom" && + { + setCustomSelectkey(v); + getCustomCategoryList(v); + }} + />} +
+ } + onChange={v => { + setSelectedKey(v); + handleSlideClose(); + if (v == "custom") { + // 自定义福利 + getCustomCategoryList(); + } else { + getTableDatas(v); } - onChange={v => { - setSelectedKey(v); - handleSlideClose(); - if (v == "custom") { - // 自定义福利 - getCustomCategoryList(); - } else { - getTableDatas(v); - } - }} + }} + /> + {selectedKey == "custom" + ? + } + rightContent={renderCustomRightContent()} /> - {selectedKey == "custom" - ? - } - 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); + }} + />} + - } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + buttons={showOperateBtn ? rightBtns : []} + // showDropIcon={true} // 是否显示下拉按钮 + // dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + // dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 > - } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - buttons={showOperateBtn ? rightBtns : []} - // showDropIcon={true} // 是否显示下拉按钮 - // dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - // dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 - > -
-
账单月份:
- { - return current && endTime && current.getTime() > new Date(endTime).getTime(); - }} - onChange={(val) => this.handleChangeMonth("startTime", val)} - /> - - { - return current && startTime && current.getTime() < new Date(startTime).getTime(); - }} - onChange={(val) => this.handleChangeMonth("endTime", val)} - /> -
- +
账单月份:
+ { + return current && endTime && current.getTime() > new Date(endTime).getTime(); + }} + onChange={(val) => this.handleChangeMonth("startTime", val)} + /> + + { + return current && startTime && current.getTime() < new Date(startTime).getTime(); + }} + onChange={(val) => this.handleChangeMonth("endTime", val)} + /> +
+ it.dataIndex !== "id").map(item => { + item.width = "150px"; + if (item.dataIndex === "billMonth") item.fixed = "left"; + if (item.dataIndex === "action") return { ...item }; + return { + ...item, + render: (text) => { + return {text}; + } + }; + })} + dataSource={list} + total={total} + current={this.state.current} + pageSize={this.pageInfo.pageSize} + onPageChange={(value) => { + this.handlePageChange(value); + }} + onShowSizeChange={(current, pageSize) => { + this.pageInfo = { current, pageSize }; + this.handleShowSizeChange(this.pageInfo); + }} + scroll={{ x: 2300 }} + /> + + {dialogProps.visible && ( + this.handleClose()} + onOk={this.handleOk} loading={loading} - columns={_.filter(columns, (it) => it.dataIndex !== "id").map(item => { - item.width = "150px"; - if (item.dataIndex === "billMonth") item.fixed = "left"; - if (item.dataIndex === "action") return { ...item }; - return { - ...item, - render: (text) => { - return {text}; + /> + )} + {/*核算进度条*/} + { + this.state.progressVisible && + { + this.setState({ progressVisible: false, progress: 0 }); + }} + progress={this.state.progress} + /> + } + {drawerProps.visible && ( + { + this.setState({ + drawerProps: { + ...this.state.drawerProps, + title: "", + visible: false } - }; - })} - dataSource={list} - total={total} - current={this.state.current} - pageSize={this.pageInfo.pageSize} + }); + }} + columns={abnormalColumns} + dataSource={this.state.dbnormalTableData.list} + total={this.state.dbnormalTableData.total} onPageChange={(value) => { this.handlePageChange(value); }} - onShowSizeChange={(current, pageSize) => { - this.pageInfo = { current, pageSize }; - this.handleShowSizeChange(this.pageInfo); - }} - scroll={{ x: 2300 }} + // onOk={this.handleOk} + loading={inspectLoading} /> - - {dialogProps.visible && ( - this.handleClose()} - onOk={this.handleOk} - loading={loading} - /> - )} - {/*核算进度条*/} - { - this.state.progressVisible && - { - this.setState({ progressVisible: false, progress: 0 }); - }} - progress={this.state.progress} - /> - } - {drawerProps.visible && ( - { - this.setState({ - drawerProps: { - ...this.state.drawerProps, - title: "", - visible: false - } - }); - }} - columns={abnormalColumns} - dataSource={this.state.dbnormalTableData.list} - total={this.state.dbnormalTableData.total} - onPageChange={(value) => { - this.handlePageChange(value); - }} - // onOk={this.handleOk} - loading={inspectLoading} - /> - )} - - + )} +
); } diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.js b/pc4mobx/hrmSalary/pages/taxAgent/index.js index 66e84489..5896b994 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/index.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/index.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { Button, Col, message, Modal, Row, Switch } from "antd"; -import { WeaFormItem, WeaRightMenu, WeaSearchGroup, WeaTable, WeaTop, WeaInputSearch } from "ecCom"; +import { WeaFormItem, WeaInputSearch, WeaSearchGroup, WeaTable, WeaTop } from "ecCom"; import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import EditModal from "./editModal"; import TipLabel from "../../components/TipLabel"; @@ -14,7 +14,7 @@ export default class TaxAgent extends React.Component { constructor(props) { super(props); this.state = { - name: '', + name: "", editModalProps: { title: "新增个税扣缴义务人", visible: false, @@ -318,7 +318,7 @@ export default class TaxAgent extends React.Component { style={{ width: 250 }} placeholder="请输入个税扣缴义务人名称" onChange={name => this.setState({ name })} - onSearch={() => getTaxAgentList({name})} + onSearch={() => getTaxAgentList({ name })} /> ]; const renderTipsLabel = () => { @@ -399,59 +399,57 @@ export default class TaxAgent extends React.Component { return (
- - } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - buttons={btns} - showDropIcon={true}> - - -
- {permission.isChief && - - - - - } - -
个税扣缴义务人
- {/* 总管理员开启新增功能 */} - {permission.isChief && - this.showEditModal()} - />} -
- } - showGroup> - - -
- - - {renderTipsLabel()} - - - - + } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + buttons={btns} + showDropIcon={true}> + + +
+ {permission.isChief && + + + + + } + +
个税扣缴义务人
+ {/* 总管理员开启新增功能 */} + {permission.isChief && + this.showEditModal()} + />} +
+ } + showGroup> + + +
+ + + {renderTipsLabel()} + + + {editModalProps.visible && { - let newColumns = ''; + 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) { + switch (newColumn.dataIndex) { case "name": return { -this.onEdit(record, false) -}} - dangerouslySetInnerHTML={{ __html: valueSpan }} /> + this.onEdit(record, false); + }} + dangerouslySetInnerHTML={{ __html: valueSpan }}/>; default: - return
+ return
; } - } + }; return newColumn; }); return newColumns; - } + }; onEdit = (record, editable) => { - this.setState({currentOperate: "update", editable: editable}) - const {taxRateStore: {setSlideVisiable, emptyForm, getItemInform }} = this.props; + this.setState({ currentOperate: "update", editable: editable }); + const { taxRateStore: { setSlideVisiable, emptyForm, getItemInform } } = this.props; emptyForm(); setSlideVisiable(true); - getItemInform(record.id) - } + getItemInform(record.id); + }; handleInsertBtnClick = () => { - const {taxRateStore: {setSlideVisiable, emptyForm, initDataSource }} = this.props; + const { taxRateStore: { setSlideVisiable, emptyForm, initDataSource } } = this.props; this.setState({ currentOperate: "add", editable: true - }) + }); emptyForm(); initDataSource(); - setSlideVisiable(true) - } + setSlideVisiable(true); + }; onOperatesClick = (record, index, operate, flag) => { - const {taxRateStore : {doDelete}} = this.props; - switch(operate.index.toString()){ - case '0': // 编辑 + const { taxRateStore: { doDelete } } = this.props; + switch (operate.index.toString()) { + case "0": // 编辑 this.onEdit(record, true); break; case "1": // 删除 @@ -89,9 +86,10 @@ this.onEdit(record, false) title: "信息确认", content: "确定删除吗", onOk() { - doDelete([record.id]) + doDelete([record.id]); }, - onCancel() {} + onCancel() { + } }); break; } @@ -99,8 +97,18 @@ this.onEdit(record, false) render() { const { taxRateStore } = this.props; - const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = taxRateStore; - const { doSave, slideVisiable, setSlideVisiable, emptyForm, doUpdate, doBatchDelete } = taxRateStore + const { + loading, + hasRight, + form, + condition, + tableStore, + showSearchAd, + getTableDatas, + doSearch, + setShowSearchAd + } = taxRateStore; + const { doSave, slideVisiable, setSlideVisiable, emptyForm, doUpdate, doBatchDelete } = taxRateStore; const selectedRowKeys = toJS(tableStore.selectedRowKeys) || []; // tableStore 右侧选中数组 if (!hasRight && !loading) { // 无权限处理 return renderNoright(); @@ -108,104 +116,99 @@ this.onEdit(record, false) const rightMenu = [// 右键菜单 { - key: 'BTN_DEL', - icon: , - content : '批量删除', + key: "BTN_DEL", + icon: , + content: "批量删除", disable: selectedRowKeys.length === 0, // 没有选中禁用 - onClick : doBatchDelete, + onClick: doBatchDelete } ]; const collectParams = { // 收藏功能配置 - favname: '个税税率表', + favname: "个税税率表", favouritetype: 1, objid: 0, - link: 'wui/index.html#/ns_demo03/index', - importantlevel: 1, + link: "wui/index.html#/ns_demo03/index", + importantlevel: 1 }; const adBtn = [ // 高级搜索内部按钮 , , - , + ]; - const topTab = [ - ]; + const topTab = []; const renderSearchOperationItem = () => { return
- - {' '} + + {" "} { -doSearch({name}) -}} - - /> -
- } + doSearch({ name }); + }} + /> +
; + }; return (
- } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={true} // 是否显示下拉按钮 + dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 > - } // 左侧图标 - iconBgcolor='#F14A2D' // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 - dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) - dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 - > - { - this.setState({ selectedKey: v }) - }} - /> - - - + { + this.setState({ selectedKey: v }); + }} + /> + + { - slideVisiable && { -this.state.currentOperate == "add" ? doSave() : doUpdate() -}} - editable={this.state.editable} - /> - } - content={()} - onClose={() => setSlideVisiable(false)} - showMask={true} - closeMaskOnClick={() => setSlideVisiable(false)} /> + slideVisiable && + { + this.state.currentOperate == "add" ? doSave() : doUpdate(); + }} + editable={this.state.editable} + /> + } + content={()} + onClose={() => setSlideVisiable(false)} + showMask={true} + closeMaskOnClick={() => setSlideVisiable(false)}/> }
- ) + ); } }