Merge branch 'feature/V2-薪资账套页面重构-1208' into develop
This commit is contained in:
commit
953a6de120
|
|
@ -1,15 +1,15 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, DatePicker, Dropdown, Menu, message, Modal } from "antd";
|
||||
import { Button, DatePicker, Dropdown, Menu, message, Modal, Tag } from "antd";
|
||||
import { WeaInputSearch, WeaTop } from "ecCom";
|
||||
import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import CustomTab from "../../components/customTab";
|
||||
|
||||
import { columns } from "./columns";
|
||||
import moment from "moment";
|
||||
import BaseFormModal from "./baseFormModal";
|
||||
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
import "./index.less";
|
||||
|
||||
const MonthPicker = DatePicker.MonthPicker;
|
||||
|
||||
|
|
@ -169,13 +169,28 @@ export default class Calculate extends React.Component {
|
|||
}
|
||||
|
||||
// 获取列表
|
||||
getColumns() {
|
||||
getColumns = () => {
|
||||
const {
|
||||
calculateStore: { salaryListColumns },
|
||||
taxAgentStore: { showOperateBtn }
|
||||
} = this.props;
|
||||
let columns = [...salaryListColumns];
|
||||
let columns = [...salaryListColumns].filter(item => item.dataIndex !== "backCalcStatus" && item.dataIndex !== "acctTimes");
|
||||
columns.map(item => {
|
||||
if (item.dataIndex === "salarySobName") {
|
||||
item.width = 300;
|
||||
item.render = (text, record) => {
|
||||
return <div className="salarySobNameWrapper">
|
||||
<span>{text}</span>
|
||||
<div className="salarySobNameTagWrapper">
|
||||
{
|
||||
record.backCalcStatus === 1 &&
|
||||
<i className="icon-coms-Refresh" title="回算"/>
|
||||
}
|
||||
<Tag color="blue">{`第${record.acctTimes}次`}</Tag>
|
||||
</div>
|
||||
</div>;
|
||||
};
|
||||
}
|
||||
if (item.title == "操作" && showOperateBtn) {
|
||||
item.render = (text, record) => {
|
||||
const accountBtn = _.filter(
|
||||
|
|
@ -252,7 +267,7 @@ export default class Calculate extends React.Component {
|
|||
}
|
||||
});
|
||||
return showOperateBtn ? columns : _.filter(columns, it => it.title != "操作");
|
||||
}
|
||||
};
|
||||
|
||||
// 分页
|
||||
handleDataPageChange(value) {
|
||||
|
|
|
|||
|
|
@ -13,3 +13,19 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.salarySobNameWrapper{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
.salarySobNameTagWrapper{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
i{
|
||||
color: #5d9cec;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
{...personalAddModal}
|
||||
APISaveFox={APISaveFox}
|
||||
isTaxgent={false}
|
||||
saveKeyVal={{ key: "salarySobId", value: editId }}
|
||||
saveKeyVal={{ key: "salarySobId", value: editId || saveSalarySobId }}
|
||||
onSuccess={() => this.personalScopeTableRef.getPersonalScopeList()}
|
||||
onCancel={() =>
|
||||
this.setState({
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { message } from "antd";
|
||||
import { message, Tag } from "antd";
|
||||
import moment from "moment";
|
||||
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||
import "../calculate/index.less";
|
||||
|
||||
@inject("payrollStore", "taxAgentStore")
|
||||
@observer
|
||||
|
|
@ -49,10 +50,8 @@ export default class SalarySendList extends React.Component {
|
|||
getColumns = () => {
|
||||
const { payrollStore: { salarySendTableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { columns } = salarySendTableStore;
|
||||
if (!columns) {
|
||||
return [];
|
||||
}
|
||||
let result = columns.filter(item => item.hide === "false");
|
||||
if (!columns) return [];
|
||||
let result = columns.filter(item => (item.hide === "false" && item.dataIndex !== "acctTimes"));
|
||||
result.map(item => {
|
||||
if (item.dataIndex === "salaryYearMonth") {
|
||||
item.render = (text, record) => {
|
||||
|
|
@ -70,6 +69,20 @@ export default class SalarySendList extends React.Component {
|
|||
</span>
|
||||
);
|
||||
};
|
||||
} else if (item.dataIndex === "salarySob") {
|
||||
item.width = 300;
|
||||
item.render = (text, record) => {
|
||||
return <div className="salarySobNameWrapper">
|
||||
<span>{text}</span>
|
||||
<div className="salarySobNameTagWrapper">
|
||||
{
|
||||
record.sendStatus === 1 &&
|
||||
<Tag color="yellow">补发</Tag>
|
||||
}
|
||||
<Tag color="blue">{`第${record.acctTimes}次`}</Tag>
|
||||
</div>
|
||||
</div>;
|
||||
};
|
||||
}
|
||||
});
|
||||
showOperateBtn
|
||||
|
|
|
|||
Loading…
Reference in New Issue