diff --git a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js index cdfe5a73..91a1a88f 100644 --- a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js +++ b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js @@ -1,27 +1,24 @@ import React from "react"; -import CustomTab from "../../components/customTab"; import { inject, observer } from "mobx-react"; +import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; import { getQueryString } from "../../util/url"; import * as API from "../../apis/declare"; import { Button } from "antd"; -import UnifiedTable from "../../components/UnifiedTable"; import "./index.less"; +const { getLabel } = WeaLocaleProvider; @inject("taxAgentStore") @observer export default class GenerateDeclarationDetail extends React.Component { constructor(props) { super(props); this.state = { - loading: false, - dataSource: [], - columns: [], - pageInfo: { current: 1, pageSize: 10, total: 0 }, - declareInfo: {} + loading: false, dataSource: [], columns: [], declareInfo: {}, + pageInfo: { current: 1, pageSize: 10, total: 0 } }; } - componentWillMount() { + componentDidMount() { this.getDetailList(); this.getDeclareInfo(); } @@ -37,31 +34,19 @@ export default class GenerateDeclarationDetail extends React.Component { if (status) { const { columns, list: dataSource, pageNum: current, pageSize, total } = data; this.setState({ - dataSource, - pageInfo: { - ...pageInfo, - current, pageSize, total - }, + dataSource, pageInfo: { ...pageInfo, current, pageSize, total }, columns: _.map(_.filter(columns, it => it.dataIndex !== "jobNum"), item => { if (item.dataIndex === "username") { return { - ...item, - render: (text, record) => { - return window.pointerXY(e)} - title={text} - > - {text} - ; - } + ...item, width: 180, + render: (text, record) => ( window.pointerXY(e)} + title={text}>{text}) }; } return { - ...item, - render: (text) => { - return {text}; - } + ...item, width: (item.dataIndex === "cardType" || item.dataIndex === "cardNum") ? 180 : 100, + render: (text) => ({text}) }; }) }); @@ -78,26 +63,19 @@ export default class GenerateDeclarationDetail extends React.Component { const url = `${window.location.origin}/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=${getQueryString("id")}`; window.open(url, "_self"); }; + renderTitle = () => { + const { declareInfo } = this.state; + return ( + {getLabel(111, "薪资所属月")}:{declareInfo.salaryMonth} + {getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName} + ); + }; render() { - const { declareInfo, loading, pageInfo, columns, dataSource } = this.state; + const { loading, pageInfo, columns, dataSource } = this.state; const { taxAgentStore: { showOperateBtn } } = this.props; - - const renderRightOperation = () => { - return ( -
- -
- ); - }; - const renderLeftOperation = () => { - return ( -
- 薪资所属月:{declareInfo.salaryMonth} - 个税扣缴义务人:{declareInfo.taxAgentName} -
- ); - }; + const buttons = showOperateBtn ? [] : []; const pagination = { ...pageInfo, showTotal: (total) => `共 ${total} 条`, @@ -115,23 +93,12 @@ export default class GenerateDeclarationDetail extends React.Component { }, () => this.getDetailList()); } }; - return ( -
- -
- -
+ return (} iconBgcolor="#F14A2D" + buttons={buttons}> +
+
- ); +
); } } diff --git a/pc4mobx/hrmSalary/pages/declare/index.less b/pc4mobx/hrmSalary/pages/declare/index.less index 9e4ced1a..01b8fd58 100644 --- a/pc4mobx/hrmSalary/pages/declare/index.less +++ b/pc4mobx/hrmSalary/pages/declare/index.less @@ -1,11 +1,10 @@ -.generateDeclarationDetail { - .tabWrapper { - padding-left: 10px - } +.declare-detail-table-container { + height: 100%; + background: #f6f6f6; + padding: 8px 16px; - .tableWrapper { - height: calc(100vh - 48px); - overflow: auto; + .wea-new-table { + background: #FFF; } } diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js index af75ac82..8a333ea5 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js @@ -18,10 +18,8 @@ class LedgerMovoTo extends Component { ]; return ( + {...extraProps} buttons={buttons} hasScroll initLoadCss className="moveModalWrapper" + style={{ width: 440, height: Math.ceil((dataList.length - 1) / 3) * 25 + 41 }}> item.showname === "未分类")} diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 8cde7da5..f140ab79 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -599,6 +599,7 @@ export default class PayrollGrant extends React.Component { this.setState({ selectedKey: v }, () => { + this.pageInfo = { current: 1, pageSize: 10 }; getInfoList({ salarySendId: currentId, isGranted: v !== "0" }); })} searchsBasePlaceHolder="请输入姓名" showSearchAd={grantListShowSearchAd} buttonsAd={adBtn} @@ -652,7 +653,7 @@ export default class PayrollGrant extends React.Component { this.pageInfo = { current, pageSize }; this.handleShowSizeChange(this.pageInfo); }} - scroll={{ y: `calc(100vh - 236px)` }} + scroll={{ y: `calc(100vh - 255px)` }} /> : renderLoading() }
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js index c5701013..5813e659 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js @@ -188,6 +188,15 @@ export const conditions = [ lanId: 111, labelcol: 8, viewAttr: 2 + }, + { + conditionType: "SWITCH", + domkey: ["SHOT_EMP_BTN"], + fieldcol: 10, + label: "启用组织快照", + lanId: 111, + labelcol: 8, + viewAttr: 2 } ], title: "薪资核算", diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js index 573bc864..ab502d5c 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js @@ -154,6 +154,7 @@ class RuleConfig extends Component { case "APPROVAL_CAN_RE_CALC_STATUS": case "APPROVAL_CAN_EDIT_RESULT_STATUS": case "ATTENDANCE_SERIAL_COLLECTION_BTN": + case "SHOT_EMP_BTN": if (!this.handleDebounce) { this.handleDebounce = _.debounce(() => { const confTitle = { @@ -171,7 +172,8 @@ class RuleConfig extends Component { APPROVAL_CAN_MANUAL_FILE_STATUS: getLabel(111, "开启审批的核算记录允许手动归档"), APPROVAL_CAN_RE_CALC_STATUS: getLabel(111, "开启审批的核算记录允许重新核算"), APPROVAL_CAN_EDIT_RESULT_STATUS: getLabel(111, "审批流程发起后允许修改核算数据"), - ATTENDANCE_SERIAL_COLLECTION_BTN: getLabel(111, "考勤引用是否采集班次数据") + ATTENDANCE_SERIAL_COLLECTION_BTN: getLabel(111, "考勤引用是否采集班次数据"), + SHOT_EMP_BTN: getLabel(111, "启用组织快照") }; this.unifiedSettings(key, confTitle[key]); this.handleDebounce = null; diff --git a/pc4mobx/hrmSalary/style/index.less b/pc4mobx/hrmSalary/style/index.less index b7fa7ca3..c28edfd8 100644 --- a/pc4mobx/hrmSalary/style/index.less +++ b/pc4mobx/hrmSalary/style/index.less @@ -39,6 +39,10 @@ .form-dialog-layout { background: #f6f6f6; + .wea-form-item-wrapper { + display: block !important; + } + .wea-form-item .wea-form-item-wrapper .wea-field-readonly { line-height: 28px; }