diff --git a/pc4mobx/hrmSalary/components/UnifiedTable/index.js b/pc4mobx/hrmSalary/components/UnifiedTable/index.js index 8f406f4f..f8cbff97 100644 --- a/pc4mobx/hrmSalary/components/UnifiedTable/index.js +++ b/pc4mobx/hrmSalary/components/UnifiedTable/index.js @@ -13,7 +13,7 @@ class Index extends Component { return { ...item, fixed: "left", width: 176 }; } if (item.dataIndex === "operate") { - return { ...item, fixed: "right", width: "120px" }; + return { ...item, fixed: "right", width: item.width || "120px" }; } return { ...item, width: "33%" }; }); diff --git a/pc4mobx/hrmSalary/components/UnifiedTable/index.less b/pc4mobx/hrmSalary/components/UnifiedTable/index.less index e1dbaf1d..616d16f0 100644 --- a/pc4mobx/hrmSalary/components/UnifiedTable/index.less +++ b/pc4mobx/hrmSalary/components/UnifiedTable/index.less @@ -8,17 +8,17 @@ } .linkWapper { - a { - color: #4d7ad8; - margin-right: 8px; - } + //a { + // color: #4d7ad8; + // margin-right: 8px; + //} i { cursor: pointer; } - a:hover { - text-decoration: none; - } + //a:hover { + // text-decoration: none; + //} } } diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js index 84c858a2..473e1ec0 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/index.js @@ -187,15 +187,10 @@ export default class Calculate extends React.Component { }; } if (item.dataIndex === "operate" && showOperateBtn) { + item.width = 150; item.render = (text, record) => { - const accountBtn = _.filter( - record.operate, - it => it.text == "核算" || it.text == "重新核算" - ); - const notAccountBtn = _.filter( - record.operate, - it => it.text != "核算" && it.text != "重新核算" - ); + const accountBtn = _.take(record.operate, 2); + const notAccountBtn = _.drop(record.operate, 2); let operateBtn = []; if (!_.isEmpty(accountBtn)) { operateBtn.push( @@ -207,13 +202,8 @@ export default class Calculate extends React.Component { style={{ display: "inline-block", marginRight: 8 }}> { - if (it.text == "核算" || it.text == "重新核算") { - it.text == "核算" - ? this.handleAccount(record) - : this.handleReaccount(record); - } - }}> + style={it.index !== "4" ? { padding: "0 12px" } : {}} + onClick={() => this.handleOperateClick(it.index, record)}> {it.text} @@ -229,31 +219,14 @@ export default class Calculate extends React.Component { {notAccountBtn.map(cz => { - if (cz.text == "核算") { - this.handleAccount(record); - } else if (cz.text == "删除") { - this.handleDeleteItem(record); - } else if (cz.text == "归档") { - this.handleFile(record); - } else if (cz.text == "重新核算") { - this.handleReaccount(record); - } else if (cz.text == "查看") { - this.handleDetail(record); - } else if (cz.text == "回算") { - this.handleBackCalculate(record); - } - }}> + onClick={() => this.handleOperateClick(cz.index, record)}> {cz.text} )} }> - + ); } @@ -261,7 +234,23 @@ export default class Calculate extends React.Component { }; } }); - return showOperateBtn ? columns : _.filter(columns, it => it.title != "操作"); + return showOperateBtn ? columns : _.filter(columns, it => it.title !== "操作"); + }; + + handleOperateClick = (index, record) => { + if (index === "0") { + this.handleAccount(record); + } else if (index === "1") { + this.handleDeleteItem(record); + } else if (index === "2") { + this.handleFile(record); + } else if (index === "4") { + this.handleReaccount(record); + } else if (index === "3") { + this.handleDetail(record); + } else if (index === "5") { + this.handleBackCalculate(record); + } }; // 分页 @@ -291,44 +280,13 @@ export default class Calculate extends React.Component { render() { const { calculateStore, taxAgentStore: { showOperateBtn } } = this.props; - const { - salaryListDataSource, - salaryListColumns, - loading, - hasRight, - form, - condition, - tableStore, - showSearchAd, - getTableDatas, - doSearch, - setShowSearchAd, - salaryListPageInfo - } = calculateStore; + const { salaryListDataSource, loading, hasRight, salaryListPageInfo } = calculateStore; const { modalParam } = this.state; 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 renderRightOperation = () => { const { startDate, endDate } = this.state; return ( diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less index ebccaa07..56fd88df 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less @@ -45,18 +45,18 @@ } .linkWapper { - a { - color: #4d7ad8; - margin-right: 8px; - } + //a { + // color: #4d7ad8; + // margin-right: 8px; + //} i { cursor: pointer; } - a:hover { - text-decoration: none; - } + //a:hover { + // text-decoration: none; + //} } } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js index 7f41b9de..de207b22 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js @@ -101,19 +101,22 @@ class DataTables extends Component { } else if (dataIndex === "operate") { return { ...item, + width: 150, render: (text, record) => (
{ !isSpecial && - onViewDetails(record)}>查看明细 + onTableOperate({ key: "handleAddData" }, record)}>编辑 + onViewDetails(record)}>查看明细 { showOperateBtn && onTableOperate(e, record)}> - 编辑 删除 } title=""> @@ -127,7 +130,7 @@ class DataTables extends Component { { showOperateBtn && - onTableOperate({ key: "handleAddData" }, record)}>编辑 onTableOperate({ key: "deleteSelectAddUpDeduction" }, record)}>删除 diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less index 93bc2137..cf86d2f7 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less @@ -11,18 +11,18 @@ } .linkWapper { - a { - color: #4d7ad8; - margin-right: 8px; - } + //a { + // color: #4d7ad8; + // margin-right: 8px; + //} i { cursor: pointer; } - a:hover { - text-decoration: none; - } + //a:hover { + // text-decoration: none; + //} } } diff --git a/pc4mobx/hrmSalary/pages/ledger/index.less b/pc4mobx/hrmSalary/pages/ledger/index.less index 21467cbe..27948111 100644 --- a/pc4mobx/hrmSalary/pages/ledger/index.less +++ b/pc4mobx/hrmSalary/pages/ledger/index.less @@ -222,13 +222,13 @@ .mySalaryBenefitsWrapper { .linkWapper { - a { - color: #4d7ad8; - } + //a { + // color: #4d7ad8; + //} - a:hover { - text-decoration: none; - } + //a:hover { + // text-decoration: none; + //} } } diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js index 97fa0829..2c712894 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js @@ -38,10 +38,10 @@ class LedgerTable extends Component { } componentWillReceiveProps(nextProps, nextContext) { - if (nextProps.doSearch !== this.props.doSearch) this.getLedgerList({current: 1}); + if (nextProps.doSearch !== this.props.doSearch) this.getLedgerList({ current: 1 }); } - getLedgerList = (extra={}) => { + getLedgerList = (extra = {}) => { const { name } = this.props; const { pageInfo } = this.state; const payload = { name, ...pageInfo, ...extra }; @@ -74,17 +74,22 @@ class LedgerTable extends Component { />; }; } else if (dataIndex === "operate") { - item.width = 120; + item.width = 150; item.render = (text, record) => { return
- onEditLedger(record)}>{showOperateBtn ? "编辑" : "查看"} + onEditLedger(record)}>{showOperateBtn ? "编辑" : "查看"} + { + showOperateBtn && + this.handleMenuClick({ key: "copy" }, record)}>复制 + } { showOperateBtn && this.handleMenuClick(e, record)}> - 复制 删除 } title=""> diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js index be0ad9a8..c4ee3869 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js @@ -140,7 +140,7 @@ export default class StandingBook extends React.Component { { title: "操作", dataIndex: "operate", - width: 120, + width: 150, key: "operate", render: (text, r) => { const { billStatus, billMonth, creator } = r; @@ -154,6 +154,32 @@ export default class StandingBook extends React.Component { 核算 )} + {billStatus === "0" && ( + this.handleOperate({ + key: "archive", + billMonth, + paymentOrganizationId: r.paymentOrganizationId, + creator + })}> + 归档 + + )} + {billStatus === "1" && ( + this.handleOperate({ + key: "view", + billMonth, + paymentOrganizationId: r.paymentOrganizationId, + creator + })}> + 查看 + + )} {billStatus === "1" && ( - 归档 删除 }> )} - {billStatus === "1" && ( - - this.handleOperate({ - key, - billMonth, - paymentOrganizationId: r.paymentOrganizationId, - creator - }) - }> - 查看 - - }> - - - )} ); } @@ -492,6 +499,7 @@ export default class StandingBook extends React.Component { if (item.dataIndex !== "operate" && item.dataIndex !== "billStatus") { return { ...item, + width:150, render: (text) => { return {text}; } diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.js b/pc4mobx/hrmSalary/pages/taxAgent/index.js index 6576e595..1010c090 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/index.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/index.js @@ -1,8 +1,8 @@ import React from "react"; import { inject, observer } from "mobx-react"; -import { Button, Col, Dropdown, Menu, message, Modal, Row, Switch } from "antd"; +import { Button, Col, message, Modal, Row, Switch } from "antd"; import { WeaFormItem, WeaInputSearch, WeaSearchGroup, WeaTable, WeaTop } from "ecCom"; -import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 +import { renderNoright } from "../../util"; import EditModal from "./editModal"; import TipLabel from "../../components/TipLabel"; import { decentralizationConditions, editConditions } from "./editConditions"; @@ -357,22 +357,11 @@ export default class TaxAgent extends React.Component { onClick={() => this.showEditModal(record.id)}> 编辑 - - - this.deleteTaxAgent(record.id)}> - 删除 - - - - }> - - - - + this.deleteTaxAgent(record.id)}> + 删除 +
} ], diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.less b/pc4mobx/hrmSalary/pages/taxAgent/index.less index ccff7add..6bfafdb0 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/index.less +++ b/pc4mobx/hrmSalary/pages/taxAgent/index.less @@ -39,12 +39,13 @@ .operationWapper, .employeeRangeWapper { a { - color: #4d7ad8; + //color: #4d7ad8; + margin-right: 10px; } - a:hover { - text-decoration: none; - } + //a:hover { + // text-decoration: none; + //} a.ant-dropdown-link { margin-left: 18px;