Merge branch 'feature/230701-列表上面操作按钮显示两个' into develop
# Conflicts: # pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
This commit is contained in:
commit
91b2e92c11
|
|
@ -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;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, DatePicker, Dropdown, Menu, message, Modal, Tag } from "antd";
|
||||
import { WeaInputSearch, WeaNewScroll, WeaTop } from "ecCom";
|
||||
import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom";
|
||||
import { renderNoright } from "../../util";
|
||||
import CustomTab from "../../components/customTab";
|
||||
import moment from "moment";
|
||||
import BaseFormModal from "./baseFormModal";
|
||||
|
|
@ -10,6 +10,7 @@ import CustomPaginationTable from "../../components/customPaginationTable";
|
|||
import ProgressModal from "../../components/progressModal";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
const MonthPicker = DatePicker.MonthPicker;
|
||||
|
||||
@inject("calculateStore", "taxAgentStore")
|
||||
|
|
@ -185,16 +186,11 @@ export default class Calculate extends React.Component {
|
|||
</div>;
|
||||
};
|
||||
}
|
||||
if (item.title == "操作" && showOperateBtn) {
|
||||
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(
|
||||
|
|
@ -206,13 +202,8 @@ export default class Calculate extends React.Component {
|
|||
style={{ display: "inline-block", marginRight: 8 }}>
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
onClick={() => {
|
||||
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}
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -228,31 +219,14 @@ export default class Calculate extends React.Component {
|
|||
{notAccountBtn.map(cz =>
|
||||
<Menu.Item>
|
||||
<a
|
||||
onClick={() => {
|
||||
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}
|
||||
</a>
|
||||
</Menu.Item>
|
||||
)}
|
||||
</Menu>
|
||||
}>
|
||||
<i
|
||||
className="icon-coms-more"
|
||||
style={{ color: "#4d7ad8", cursor: "pointer" }}
|
||||
/>
|
||||
<a href="javascript:void(0);"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
);
|
||||
}
|
||||
|
|
@ -260,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);
|
||||
}
|
||||
};
|
||||
|
||||
// 分页
|
||||
|
|
@ -290,56 +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: <i className="icon-coms-Custom"/>,
|
||||
content: "显示列定制",
|
||||
onClick: this.showColumn
|
||||
}
|
||||
];
|
||||
const collectParams = {
|
||||
// 收藏功能配置
|
||||
favname: "薪资核算",
|
||||
favouritetype: 1,
|
||||
objid: 0,
|
||||
link: "wui/index.html#/ns_demo03/index",
|
||||
importantlevel: 1
|
||||
};
|
||||
const adBtn = [
|
||||
// 高级搜索内部按钮
|
||||
<Button type="primary" onClick={doSearch}>
|
||||
搜索
|
||||
</Button>,
|
||||
<Button type="ghost" onClick={() => form.resetForm()}>
|
||||
重置
|
||||
</Button>,
|
||||
<Button type="ghost" onClick={() => setShowSearchAd(false)}>
|
||||
取消
|
||||
</Button>
|
||||
];
|
||||
|
||||
const renderRightOperation = () => {
|
||||
const { startDate, endDate } = this.state;
|
||||
return (
|
||||
|
|
@ -393,13 +340,10 @@ export default class Calculate extends React.Component {
|
|||
<div className="mySalaryBenefitsWrapper">
|
||||
{/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */}
|
||||
<WeaTop
|
||||
title="薪资核算" // 文字
|
||||
icon={<i className="icon-coms-fa"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={false} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
dropMenuProps={{ collectParams }}>
|
||||
{/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */}
|
||||
title="薪资核算"
|
||||
icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D"
|
||||
showDropIcon={false}>
|
||||
<CustomTab searchOperationItem={renderRightOperation()}/>
|
||||
<div className="tableWrapper">
|
||||
<WeaNewScroll height="100%">
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,19 +101,22 @@ class DataTables extends Component {
|
|||
} else if (dataIndex === "operate") {
|
||||
return {
|
||||
...item,
|
||||
width: 150,
|
||||
render: (text, record) => (
|
||||
<div className="linkWapper">
|
||||
{
|
||||
!isSpecial &&
|
||||
<React.Fragment>
|
||||
<a href="javaScript:void(0);" onClick={() => onViewDetails(record)}>查看明细</a>
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 12 }}
|
||||
onClick={() => onTableOperate({ key: "handleAddData" }, record)}>编辑</a>
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 12 }}
|
||||
onClick={() => onViewDetails(record)}>查看明细</a>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => onTableOperate(e, record)}>
|
||||
<Menu.Item key="handleAddData">编辑</Menu.Item>
|
||||
<Menu.Item key="deleteSelectAddUpDeduction">删除</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
|
|
@ -127,7 +130,7 @@ class DataTables extends Component {
|
|||
{
|
||||
showOperateBtn &&
|
||||
<React.Fragment>
|
||||
<a href="javaScript:void(0);"
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 12 }}
|
||||
onClick={() => onTableOperate({ key: "handleAddData" }, record)}>编辑</a>
|
||||
<a href="javaScript:void(0);"
|
||||
onClick={() => onTableOperate({ key: "deleteSelectAddUpDeduction" }, record)}>删除</a>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -222,13 +222,13 @@
|
|||
|
||||
.mySalaryBenefitsWrapper {
|
||||
.linkWapper {
|
||||
a {
|
||||
color: #4d7ad8;
|
||||
}
|
||||
//a {
|
||||
// color: #4d7ad8;
|
||||
//}
|
||||
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
//a:hover {
|
||||
// text-decoration: none;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <div className="optWrapper">
|
||||
<a href="javascript:void(0);" className="mr10" onClick={()=> onEditLedger(record)}>{showOperateBtn ? "编辑" : "查看"}</a>
|
||||
<a href="javascript:void(0);" className="mr10"
|
||||
onClick={() => onEditLedger(record)}>{showOperateBtn ? "编辑" : "查看"}</a>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<a href="javascript:void(0);" className="mr10"
|
||||
onClick={() => this.handleMenuClick({ key: "copy" }, record)}>复制</a>
|
||||
}
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => this.handleMenuClick(e, record)}>
|
||||
<Menu.Item key="copy">复制</Menu.Item>
|
||||
<Menu.Item key="delete">删除</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, Dropdown, Menu, message, Modal, Switch } from "antd";
|
||||
import { WeaInputSearch, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom";
|
||||
import { renderLoading } from "../../util";
|
||||
import CustomTab from "../../components/customTab";
|
||||
import SystemSalaryItemModal from "./systemSalaryItemModal";
|
||||
|
|
@ -11,6 +11,7 @@ import CustomSalaryItemSlide from "./customSalaryItemSlide";
|
|||
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||
import "../socialSecurityBenefits/programme/index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
@inject("salaryItemStore", "taxAgentStore", "salaryFileStore")
|
||||
@observer
|
||||
export default class SalaryItem extends React.Component {
|
||||
|
|
@ -112,9 +113,9 @@ export default class SalaryItem extends React.Component {
|
|||
this.onEditItem(record, false);
|
||||
}}>{text}</a>;
|
||||
case "useInEmployeeSalary":
|
||||
return <Switch checked={text == 1} disabled/>;
|
||||
return <Switch checked={text === 1} disabled/>;
|
||||
case "useDefault":
|
||||
return <Switch checked={text == 1} disabled/>;
|
||||
return <Switch checked={text === 1} disabled/>;
|
||||
default:
|
||||
return <div dangerouslySetInnerHTML={{ __html: valueSpan }}/>;
|
||||
}
|
||||
|
|
@ -124,37 +125,22 @@ export default class SalaryItem extends React.Component {
|
|||
columns.push({
|
||||
key: "operate",
|
||||
title: "操作",
|
||||
width: 120,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<a onClick={() => {
|
||||
this.onEditItem(record, true);
|
||||
}}>{(showSalaryItemBtn || showOperateBtn) ? "编辑" : "查看"}</a>
|
||||
<React.Fragment>
|
||||
<a
|
||||
onClick={() => this.onEditItem(record, true)}>{(showSalaryItemBtn || showOperateBtn) ? "编辑" : "查看"}</a>
|
||||
{
|
||||
(record.canDelete && (showSalaryItemBtn || showOperateBtn)) &&
|
||||
<a href="javascript:void(0)" style={{ marginLeft: 10 }}
|
||||
onClick={() => this.handleDeleteItem(record)}
|
||||
>{getLabel(535052, "删除")}</a>
|
||||
}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
});
|
||||
columns.push({
|
||||
title: "",
|
||||
key: "moreOperate",
|
||||
dataIndex: "moreOperate",
|
||||
render: (text, record) => {
|
||||
if (record.canDelete && (showSalaryItemBtn || showOperateBtn)) {
|
||||
return (
|
||||
<Dropdown overlay={<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript: void(0);" onClick={() => {
|
||||
this.handleDeleteItem(record);
|
||||
}}>删除</a>
|
||||
</Menu.Item>
|
||||
</Menu>}>
|
||||
<a href="javascript:void(0)" style={{ textDecoration: "none" }}><i className="icon-coms-more"
|
||||
style={{ fontSize: 18 }}></i></a>
|
||||
</Dropdown>
|
||||
);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
});
|
||||
return [
|
||||
// {
|
||||
// title: "序号",
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { Button, Dropdown, Menu, message, Modal, Switch } from "antd";
|
||||
import { WeaNewScroll, WeaSelect, WeaSlideModal, WeaTop } from "ecCom";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import { renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||
import { WeaLocaleProvider, WeaNewScroll, WeaSelect, WeaSlideModal, WeaTop } from "ecCom";
|
||||
import { renderNoright } from "../../../util";
|
||||
import CustomTab from "../../../components/customTab";
|
||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||
import TipLabel from "../../../components/TipLabel";
|
||||
|
|
@ -14,11 +13,11 @@ import { paymentScopeEnum, welfareTypeEnum } from "./enum";
|
|||
import CustomPaginationTable from "../../../components/customPaginationTable";
|
||||
import TwoColContent from "../../../components/twoColContent";
|
||||
import CopySchemaModal from "./copySchemaModal";
|
||||
import "./index.less";
|
||||
import CustomBenefitsTable from "./customBenefitsTable";
|
||||
import "./index.less";
|
||||
|
||||
const WeaMobxTable = WeaTableNew.WeaTable;
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
@inject("programmeStore", "taxAgentStore", "salaryFileStore")
|
||||
@observer
|
||||
export default class Programme extends React.Component {
|
||||
|
|
@ -57,25 +56,17 @@ export default class Programme extends React.Component {
|
|||
|
||||
newColumns = newColumns.map(column => {
|
||||
let newColumn = column;
|
||||
newColumn.render = (text, record, index) => {
|
||||
newColumn.render = (text, record) => {
|
||||
//前端元素转义
|
||||
let valueSpan =
|
||||
record[newColumn.dataIndex + "span"] !== undefined
|
||||
? record[newColumn.dataIndex + "span"]
|
||||
: record[newColumn.dataIndex];
|
||||
if (newColumn.dataIndex == "id") {
|
||||
newColumn.display = false;
|
||||
}
|
||||
if (newColumn.dataIndex === "id") newColumn.display = false;
|
||||
switch (newColumn.dataIndex) {
|
||||
case "operate":
|
||||
return (
|
||||
<a
|
||||
href="javascript: void(0);"
|
||||
onClick={() => {
|
||||
this.onEdit(record);
|
||||
}}>
|
||||
编辑
|
||||
</a>
|
||||
<a href="javascript: void(0);" onClick={() => this.onEdit(record)}>编辑</a>
|
||||
);
|
||||
default:
|
||||
return <div dangerouslySetInnerHTML={{ __html: valueSpan }}/>;
|
||||
|
|
@ -87,72 +78,38 @@ export default class Programme extends React.Component {
|
|||
newColumns.push({
|
||||
title: "操作",
|
||||
dataIndex: "operate",
|
||||
width: 120,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
onClick={() => {
|
||||
this.onEdit(record);
|
||||
}}>
|
||||
{showOperateBtn ? "编辑" : "查看"}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
});
|
||||
showOperateBtn && newColumns.push({
|
||||
key: "moreOperate",
|
||||
dataIndex: "moreOperate",
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a
|
||||
onClick={() => {
|
||||
this.onCopy(record);
|
||||
}}>
|
||||
复制
|
||||
</a>
|
||||
</Menu.Item>
|
||||
{/*暂时隐藏*/}
|
||||
<Menu.Item>
|
||||
<a
|
||||
onClick={() => {
|
||||
this.onDelete(record);
|
||||
}}>
|
||||
删除
|
||||
</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)" style={{ textDecoration: "none" }}>
|
||||
<i
|
||||
className="icon-coms-more"
|
||||
style={{ fontSize: 18 }}>
|
||||
</i>
|
||||
</a>
|
||||
</Dropdown>
|
||||
<React.Fragment>
|
||||
<a href="javascript:void(0);" onClick={() => this.onEdit(record)}
|
||||
style={{ marginRight: 10 }}>{showOperateBtn ? "编辑" : "查看"}</a>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<a href="javascript:void(0)" onClick={() => this.onCopy(record)}
|
||||
style={{ marginRight: 10 }}>{getLabel(77, "复制")}</a>
|
||||
}
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0)" onClick={() => this.onDelete(record)}>{getLabel(535052, "删除")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
});
|
||||
return newColumns;
|
||||
};
|
||||
|
||||
handleCategoryStatusChange(record, value) {
|
||||
const { programmeStore: { updateCustomCategoryStatus } } = this.props;
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: `确认要${value ? "启用" : "停用"}吗`,
|
||||
onOk: () => {
|
||||
updateCustomCategoryStatus(record.id, value);
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onEdit(record) {
|
||||
onEdit = (record) => {
|
||||
let id = record.id;
|
||||
const { programmeStore } = this.props;
|
||||
const { getForm, selectedKey } = programmeStore;
|
||||
|
|
@ -162,15 +119,15 @@ export default class Programme extends React.Component {
|
|||
}).then(() => {
|
||||
this.setState({ slideVisiable: true, customEdit: true, currentOperate: "update" });
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onCopy(record) {
|
||||
onCopy = (record) => {
|
||||
this.setState({
|
||||
copyId: record.id,
|
||||
copyModalValue: record.schemeName,
|
||||
copyModalVisible: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDelete = (record) => {
|
||||
const { programmeStore: { deleteScheme, deleteLoading, selectedKey } } = this.props;
|
||||
|
|
@ -422,13 +379,6 @@ export default class Programme extends React.Component {
|
|||
welfareTypeEnum={customSelectkey}
|
||||
onCustomEdit={this.onCustomEdit}
|
||||
/>
|
||||
// <WeaMobxTable // table内部做了loading加载处理,页面就不需要再加了
|
||||
// comsWeaTableStore={tableStore} // table store
|
||||
// hasOrder={true} // 是否启用排序
|
||||
// needScroll={true} // 是否启用table内部列表滚动,将自适应到父级高度
|
||||
// getColumns={this.getCustomColumns}
|
||||
// onOperatesClick={this.onCustomOperatesClick.bind(this)}
|
||||
// />
|
||||
}
|
||||
rightContent={renderCustomRightContent()}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, DatePicker, Dropdown, Menu, message, Modal } from "antd";
|
||||
import { WeaNewScroll, WeaTop } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom";
|
||||
import { renderNoright } from "../../../util";
|
||||
import Accountdialog from "./components/accountDialog";
|
||||
import AbnormalDrawer from "./components/abnormalDrawer";
|
||||
|
|
@ -12,6 +12,7 @@ import { getCalculateProgress } from "../../../apis/calculate";
|
|||
import "./index.less";
|
||||
import UnifiedTable from "../../../components/UnifiedTable";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
const MonthPicker = DatePicker.MonthPicker;
|
||||
|
||||
@inject("standingBookStore", "taxAgentStore")
|
||||
|
|
@ -139,28 +140,54 @@ export default class StandingBook extends React.Component {
|
|||
{
|
||||
title: "操作",
|
||||
dataIndex: "operate",
|
||||
width: 150,
|
||||
key: "operate",
|
||||
render: (text, r) => {
|
||||
const { billStatus, billMonth, creator } = r;
|
||||
return (
|
||||
<React.Fragment>
|
||||
{billStatus === "未归档" && (
|
||||
{billStatus === "0" && (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
className="linkTo"
|
||||
style={{ padding: "0 12px" }}
|
||||
onClick={() => this.handleGoDetail(billMonth, "", r.paymentOrganizationId, creator)}>
|
||||
核算
|
||||
</a>
|
||||
)}
|
||||
{billStatus === "已归档" && (
|
||||
{billStatus === "0" && (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
style={{ padding: "0 12px" }}
|
||||
onClick={() => this.handleOperate({
|
||||
key: "archive",
|
||||
billMonth,
|
||||
paymentOrganizationId: r.paymentOrganizationId,
|
||||
creator
|
||||
})}>
|
||||
归档
|
||||
</a>
|
||||
)}
|
||||
{billStatus === "1" && (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
style={{ padding: "0 12px" }}
|
||||
onClick={() => this.handleOperate({
|
||||
key: "view",
|
||||
billMonth,
|
||||
paymentOrganizationId: r.paymentOrganizationId,
|
||||
creator
|
||||
})}>
|
||||
查看
|
||||
</a>
|
||||
)}
|
||||
{billStatus === "1" && (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
className="linkTo"
|
||||
onClick={() => this.socialSecurityBenefitsRecalculate({ id: r.id })}>
|
||||
重新核算
|
||||
</a>
|
||||
)}
|
||||
{billStatus === "未归档" && (
|
||||
{billStatus === "0" && (
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu
|
||||
|
|
@ -172,31 +199,10 @@ export default class StandingBook extends React.Component {
|
|||
creator
|
||||
})
|
||||
}>
|
||||
<Menu.Item key="archive">归档</Menu.Item>
|
||||
{/* <Menu.Item key="detail">异常详情</Menu.Item> */}
|
||||
<Menu.Item key="delete">删除</Menu.Item>
|
||||
{/* <Menu.Item key="operate">操作日志</Menu.Item> */}
|
||||
</Menu>
|
||||
}>
|
||||
<i className="icon-coms-more more"/>
|
||||
</Dropdown>
|
||||
)}
|
||||
{billStatus === "已归档" && (
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu
|
||||
onClick={({ key }) =>
|
||||
this.handleOperate({
|
||||
key,
|
||||
billMonth,
|
||||
paymentOrganizationId: r.paymentOrganizationId,
|
||||
creator
|
||||
})
|
||||
}>
|
||||
<Menu.Item key="view">查看</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<i className="icon-coms-more more"/>
|
||||
<i className="icon-coms-more" style={{ marginLeft: 10 }}/>
|
||||
</Dropdown>
|
||||
)}
|
||||
</React.Fragment>
|
||||
|
|
@ -490,14 +496,24 @@ export default class StandingBook extends React.Component {
|
|||
<UnifiedTable
|
||||
loading={loading}
|
||||
columns={_.filter(columns, (it) => it.dataIndex !== "id").map(item => {
|
||||
if (item.dataIndex !== "operate") {
|
||||
if (item.dataIndex !== "operate" && item.dataIndex !== "billStatus") {
|
||||
return {
|
||||
...item,
|
||||
width:150,
|
||||
render: (text) => {
|
||||
return <span className="ellipsis" title={text}>{text}</span>;
|
||||
}
|
||||
};
|
||||
}
|
||||
if (item.dataIndex === "billStatus") {
|
||||
return {
|
||||
...item,
|
||||
render: (_, record) => {
|
||||
return <span
|
||||
className="ellipsis">{record.billStatus === "1" ? getLabel(18800, "已归档") : getLabel(17999, "未归档")}</span>;
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})}
|
||||
dataSource={list}
|
||||
|
|
|
|||
|
|
@ -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)}>
|
||||
编辑
|
||||
</a>
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item key="0">
|
||||
<a
|
||||
href="javaScript:void(0);"
|
||||
onClick={() => this.deleteTaxAgent(record.id)}>
|
||||
删除
|
||||
</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a className="ant-dropdown-link" href="javaScript:void(0);">
|
||||
<i className="icon-coms-more"/>
|
||||
</a>
|
||||
</Dropdown>
|
||||
<a
|
||||
href="javaScript:void(0);"
|
||||
onClick={() => this.deleteTaxAgent(record.id)}>
|
||||
删除
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue