From ba814d605ad50da217a3dd422bcc7db5360b092f Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期六, 05 八月 2023 17:51:50 +0800 Subject: [PATCH] 销售模块详情页 --- src/views/service/serviceContract/index.vue | 47 +++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 39 insertions(+), 8 deletions(-) diff --git a/src/views/service/serviceContract/index.vue b/src/views/service/serviceContract/index.vue index 61952f9..bd59092 100644 --- a/src/views/service/serviceContract/index.vue +++ b/src/views/service/serviceContract/index.vue @@ -1,11 +1,21 @@ <template> <div class="service-contract"> - <SearchCommonView ref="searchCommonView" :query-class-options="queryClassOptions" :search-options="searchOptions" /> - <div class="btn-pager"> - <PublicFunctionBtnView :submit-approval="true" :operates-list="operatesList" /> - <PagerView class="page" /> + <div v-if="isDetail" class="detail-top"> + <DetailListCommonBtn :query-class-options="queryClassOptions" /> + <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> </div> - <TableCommonView ref="tableListRef" :table-list="tableList"> + <div v-else class="top"> + <SearchCommonView + ref="searchCommonView" + :query-class-options="queryClassOptions" + :search-options="searchOptions" + /> + <div class="btn-pager"> + <PublicFunctionBtnView :submit-approval="true" :operates-list="operatesList" /> + <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> + </div> + </div> + <TableCommonView ref="tableListRef" :table-list="tableList" :select-box="!isDetail"> <template slot="tableButton"> <el-table-column label="鎿嶄綔" width="90"> <template slot-scope="scope"> @@ -23,10 +33,17 @@ <script> import AddServiceContractDialog from "@/views/service/serviceContract/AddServiceContractDialog" import { getServiceContractList, getDelServiceContract } from "@/api/serviceManage/serviceContract" +import pageMixin from "@/components/makepager/pager/mixin/pageMixin" export default { name: "ServiceContract", - props: {}, + props: { + isDetail: { + type: Boolean, + default: false + } + }, + mixins: [pageMixin], components: { AddServiceContractDialog }, @@ -94,7 +111,11 @@ // 璇锋眰鏁版嵁 async getData() { this.loading = true - await getServiceContractList() + await getServiceContractList({ + keyword: "", + page: this.pagerOptions.currPage, + pageSize: this.pagerOptions.pageSize + }) .then((res) => { console.log(res) if (res.code === 200) { @@ -105,6 +126,7 @@ } }) this.tableList.tableInfomation = list || [] + this.pagerOptions.totalCount = res.data.count } else { this.tableList.tableInfomation = [] } @@ -162,7 +184,16 @@ <!-- Add "scoped" attribute to limit CSS to this component only --> <style lang="scss" scoped> .service-contract { - .btn-pager { + .top { + margin-bottom: 20px; + .btn-pager { + display: flex; + .page { + margin-left: auto; + } + } + } + .detail-top { display: flex; .page { margin-left: auto; -- Gitblit v1.8.0