Commit 7b5594b4 authored by 朱彩云's avatar 朱彩云

Merge branch 'func_eccs_2250' into 'master'

【商保系统】-回款管理-账单列表和已关联账单分tab展示支持搜索;回款单关联账单以及账单报表,增加备注列;其它优化项

See merge request !45
parents 4535ff39 fc72fcae
import Vue from "vue"; import Vue from "vue";
import { import {
Row, Row,
Col, Col,
menu, menu,
dropdown, dropdown,
Table, Table,
message, message,
pagination, pagination,
FormModel, FormModel,
Select, Select,
DatePicker, DatePicker,
Input, Input,
InputNumber, InputNumber,
Radio, Radio,
upload, upload,
Button, Button,
notification, notification,
popconfirm, popconfirm,
Modal, Modal,
modal, modal,
Spin, Spin,
Collapse, Collapse,
Tabs, Tabs,
Tooltip Tooltip,
} from "ant-design-vue"; Popover,
Empty
export default () => { } from "ant-design-vue";
let els = [
Row, export default () => {
Col, let els = [
menu, Row,
dropdown, Col,
Table, menu,
message, dropdown,
pagination, Table,
FormModel, message,
Select, pagination,
DatePicker, FormModel,
Input, Select,
InputNumber, DatePicker,
Radio, Input,
upload, InputNumber,
Button, Radio,
notification, upload,
popconfirm, Button,
Modal, notification,
modal, popconfirm,
Spin, Modal,
Collapse, modal,
Tabs, Spin,
Tooltip Collapse,
]; Tabs,
// 注册 Tooltip,
els.forEach((item) => { Popover,
Vue.use(item); Empty
}); ];
// 全局提示 // 注册
Vue.prototype.$msg = notification; els.forEach((item) => {
Vue.prototype.$message = message; Vue.use(item);
Vue.prototype.$modal = Modal; });
}; // 全局提示
Vue.prototype.$msg = notification;
Vue.prototype.$message = message;
Vue.prototype.$modal = Modal;
};
<template> <template>
<!--分页--> <!--分页-->
<div class="flex my-pagination" v-if="pagination.total > pagination.pageSize"> <div class="flex my-pagination" v-if="pagination.total > pagination.pageSize">
<a-pagination <a-pagination
v-model="pagination.pageNum" v-model="pagination.pageNum"
:total="pagination.total" :total="pagination.total"
:page-size="pagination.pageSize" :page-size="pagination.pageSize"
:item-render="itemRender" :item-render="itemRender"
@change="pageChange" @change="pageChange"
/> />
<a-input <a-input
v-model.trim="jumpPage" v-model.trim="jumpPage"
class="jump-page" class="jump-page"
type="number" type="number"
:min="0" :min="0"
@blur="inputPageChange" @blur="inputPageChange"
/> />
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
//分页器 //分页器
pagination: { pagination: {
default: {}, default: {},
}, },
}, },
data() { data() {
return { return {
//跳转到第几页 //跳转到第几页
jumpPage: "", jumpPage: "",
}; };
}, },
methods: { methods: {
//自定义分页 //自定义分页
itemRender(current, type, originalElement) { itemRender(current, type, originalElement) {
if (type === "prev") { if (type === "prev") {
return <li class="page pre">上一页</li>; return <li class="page pre">上一页</li>;
} else if (type === "next") { } else if (type === "next") {
return <li class="page next">下一页</li>; return <li class="page next">下一页</li>;
} else if (type === "page") { } else if (type === "page") {
//当前页面 //当前页面
if (current == this.pagination.pageNum) { if (current == this.pagination.pageNum) {
return ( return (
<div class="cur-page page"> <div class="cur-page page">
<span class="cur">{current}</span>/ <span class="cur">{current}</span>/
<span class="total"> <span class="total">
{Math.ceil(this.pagination.total / this.pagination.pageSize)} {Math.ceil(this.pagination.total / this.pagination.pageSize)}
</span> </span>
</div> </div>
); );
} else { } else {
return null; return null;
} }
} else if (type == "jump-prev") { } else if (type == "jump-prev") {
return null; return null;
} else if (type == "jump-next") { } else if (type == "jump-next") {
return null; return null;
} }
return originalElement; return originalElement;
}, },
//跳转页面 //跳转页面
inputPageChange() { inputPageChange() {
this.jumpPage = parseInt(this.jumpPage); this.jumpPage = parseInt(this.jumpPage);
let pages = Math.ceil(this.pagination.total / this.pagination.pageSize); let pages = Math.ceil(this.pagination.total / this.pagination.pageSize);
this.jumpPage = this.jumpPage < 0 ? 0 : this.jumpPage; this.jumpPage = this.jumpPage < 0 ? 0 : this.jumpPage;
this.jumpPage = this.jumpPage > pages ? pages : this.jumpPage; this.jumpPage = this.jumpPage > pages ? pages : this.jumpPage;
this.pagination.pageNum = this.jumpPage; this.pagination.pageNum = this.jumpPage;
this.$emit("pageChange", { pageNum: this.jumpPage }); this.$emit("pageChange", { pageNum: this.jumpPage });
}, },
//改变分页 //改变分页
pageChange(pager) { pageChange(pager) {
this.pagination.pageNum = pager; this.pagination.pageNum = pager;
this.$emit("pageChange", { pageNum: pager }); this.$emit("pageChange", { pageNum: pager });
}, },
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.my-pagination { .my-pagination {
justify-content: flex-end; justify-content: flex-end;
margin-top: 33px; margin-top: 33px;
.page { .page {
width: 80px; width: 80px;
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
background: #f8fafb; background: #f8fafb;
font-weight: 400; font-weight: 400;
color: #252631; color: #252631;
&.cur-page { &.cur-page {
background: transparent; background: transparent;
} }
span { span {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
&.cur { &.cur {
color: #4d7cfe; color: #4d7cfe;
} }
} }
} }
.jump-page { .jump-page {
width: 80px; width: 80px;
margin-left: 30px; margin-left: 30px;
height: 36px; height: 36px;
text-align: center; text-align: center;
} }
} }
::v-deep .ant-pagination-jump-prev, ::v-deep .ant-pagination-jump-prev,
::v-deep .ant-pagination-jump-next { ::v-deep .ant-pagination-jump-next {
display: none !important; display: none !important;
} }
</style> </style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment