Merge branch 'feature/V2-薪资账套页面重构-1208' into develop
This commit is contained in:
commit
a0b87fa275
|
|
@ -4,7 +4,6 @@ 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";
|
||||
|
|
@ -26,25 +25,7 @@ export default class Calculate extends React.Component {
|
|||
searchValue: "",
|
||||
startDate: moment(new Date()).startOf("year").format("YYYY-MM"),
|
||||
endDate: moment(new Date()).startOf("month").format("YYYY-MM"),
|
||||
current: 1,
|
||||
columns: columns.map(item => {
|
||||
if (item.dataIndex == "cz") {
|
||||
item.render = () =>
|
||||
<div>
|
||||
<a style={{ marginRight: "10px" }}>核算</a>
|
||||
<a style={{ marginRight: "10px" }}>归档</a>
|
||||
<a
|
||||
style={{ marginRight: "10px" }}
|
||||
onClick={() =>
|
||||
window.open(
|
||||
"/spa/hrmSalary/static/index.html#/main/hrmSalary/placeOnFileDetail"
|
||||
)}>
|
||||
查看
|
||||
</a>
|
||||
<a>删除</a>
|
||||
</div>;
|
||||
}
|
||||
})
|
||||
current: 1
|
||||
};
|
||||
this.pageInfo = { current: 1, pageSize: 10 };
|
||||
}
|
||||
|
|
@ -141,6 +122,12 @@ export default class Calculate extends React.Component {
|
|||
message.success("归档成功");
|
||||
this.handleSearch(this.state.searchValue);
|
||||
});
|
||||
}).catch(() => {
|
||||
clearInterval(this.timer);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,13 +14,13 @@ import {
|
|||
WeaFormItem,
|
||||
WeaHelpfulTip,
|
||||
WeaInput,
|
||||
WeaPopoverHrm,
|
||||
WeaSearchGroup,
|
||||
WeaSelect,
|
||||
WeaSlideModal,
|
||||
WeaTab,
|
||||
WeaTable,
|
||||
WeaTop,
|
||||
WeaPopoverHrm
|
||||
WeaTop
|
||||
} from "ecCom";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import { Button, Dropdown, Menu, message, Modal, Popover } from "antd";
|
||||
|
|
@ -230,8 +230,6 @@ class Index extends Component {
|
|||
} else {
|
||||
message.error(errormsg || "操作失败!");
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -289,6 +287,33 @@ class Index extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
handleClick = ({ key }) => {
|
||||
const { selectedRowKeys } = this.state;
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("请选择表格数据");
|
||||
return;
|
||||
}
|
||||
if (key === "batchDelete") {
|
||||
this.deletePendingTodo(selectedRowKeys);
|
||||
} else {
|
||||
API.gotoFixed(selectedRowKeys).then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
if (data.type === "success") {
|
||||
message.success("操作成功!");
|
||||
this.setState({
|
||||
selectedRowKeys: []
|
||||
}, () => {
|
||||
this.query();
|
||||
});
|
||||
} else {
|
||||
message.info(data.msg);
|
||||
}
|
||||
} else {
|
||||
message.error(errormsg || "操作失败!");
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
getRightOptionBtns = () => {
|
||||
const { selectedKey, importType, selectedRowKeys, searchItemsValue, pageInfo } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
|
|
@ -304,7 +329,20 @@ class Index extends Component {
|
|||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>,
|
||||
<Button type="ghost" onClick={this.allGotoFixed}>全部设为发薪人员</Button>
|
||||
<Button type="ghost" onClick={this.allGotoFixed}>全部设为发薪人员</Button>,
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu className="dropdownMenuWrapper" onClick={this.handleClick}>
|
||||
<Menu.Item key="batchSet">批量设为发薪员工</Menu.Item>
|
||||
<Menu.Item key="batchDelete">批量删除待办</Menu.Item>
|
||||
</Menu>
|
||||
}
|
||||
>
|
||||
<Button type="primary">更多<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>
|
||||
];
|
||||
} else if (selectedKey === "fixed" && showOperateBtn) {
|
||||
return [
|
||||
|
|
@ -427,7 +465,7 @@ class Index extends Component {
|
|||
</a>;
|
||||
}
|
||||
};
|
||||
}else if (item.dataIndex === "operate") {
|
||||
} else if (item.dataIndex === "operate") {
|
||||
return {
|
||||
...item,
|
||||
fixed: "right",
|
||||
|
|
|
|||
Loading…
Reference in New Issue