From 5e39c16fa7ebf060d20b8e23da7e5ee60ea6f2c4 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期二, 10 十月 2023 16:40:20 +0800 Subject: [PATCH] feat: 合同管理、服务合同、客户服务单、服务回访单 列表和新建弹窗样式调整 --- src/views/other/commonDialog/SelectChanceDialog.vue | 49 +++++++++++++++++++++++++++++++++++++------------ 1 files changed, 37 insertions(+), 12 deletions(-) diff --git a/src/views/other/commonDialog/SelectChanceDialog.vue b/src/views/other/commonDialog/SelectChanceDialog.vue index 9c4f799..b0b114a 100644 --- a/src/views/other/commonDialog/SelectChanceDialog.vue +++ b/src/views/other/commonDialog/SelectChanceDialog.vue @@ -27,10 +27,14 @@ :table-list="tableList" :select-box="false" @selCommonClick="selNameClick" + @selTableCol="selTableCol" > </TableCommonView> <div slot="footer" class="dialog-footer"> - <div class="remark">璇存槑锛氭敮鎸佸瀛楁妯$硦鏌ヨ锛屼粎鏄剧ず绗﹀悎鏉′欢鐨勫墠5鏉℃暟鎹�</div> + <!-- <div class="remark">璇存槑锛氭敮鎸佸瀛楁妯$硦鏌ヨ锛屼粎鏄剧ず绗﹀悎鏉′欢鐨勫墠5鏉℃暟鎹�</div> --> + <div class="btn-pager"> + <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> + </div> </div> </div> </el-dialog> @@ -39,8 +43,10 @@ <script> import { getSaleChanceList } from "@/api/sales/salesOpportunity" +import pageMixin from "@/components/makepager/pager/mixin/pageMixin" export default { name: "EditSelChanceDialog", + mixins: [pageMixin], props: { editCommonConfig: { type: Object, @@ -64,7 +70,15 @@ tableList: [], searchSelOptions: [], loading: false, - search_map: {} + search_map: {}, + tableColumn: [ + { label: "閿�鍞満浼氱紪鍙�", prop: "number" }, // 閿�鍞満浼氱紪鍙� + { label: "鏈轰細鍚嶇О", prop: "name", isCommonClick: true, default: true }, // 鏈轰細鍚嶇О + { label: "閿�鍞樁娈�", prop: "sale_stage_name" }, // 閿�鍞樁娈� + { label: "閿�鍞礋璐d汉", prop: "member_name" }, // 閿�鍞礋璐d汉 + { label: "棰勮鎴愪氦鏃ユ湡", prop: "expected_time" } // 棰勮鎴愪氦鏃ユ湡 + ], + showCol: ["閿�鍞満浼氱紪鍙�", "鏈轰細鍚嶇О", "閿�鍞樁娈�", "閿�鍞礋璐d汉", "棰勮鎴愪氦鏃ユ湡"] } }, created() { @@ -74,21 +88,31 @@ methods: { setTable() { this.tableList = { + selectIndex: true, tableInfomation: [], - tableColumn: [ - { label: "閿�鍞満浼氱紪鍙�", prop: "number" }, // 閿�鍞満浼氱紪鍙� - { label: "鏈轰細鍚嶇О", prop: "name", isCommonClick: true }, // 鏈轰細鍚嶇О - { label: "閿�鍞樁娈�", prop: "sale_stage_name" }, // 閿�鍞樁娈� - { label: "閿�鍞礋璐d汉", prop: "member_name" }, // 閿�鍞礋璐d汉 - { label: "棰勮鎴愪氦鏃ユ湡", prop: "expected_time" } // 棰勮鎴愪氦鏃ユ湡 - ] + allcol: [], + showcol: this.showCol, + tableColumn: this.setColumnVisible(this.showCol) } + this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label) this.searchOptions = [] for (let i = 0; i < this.tableList.tableColumn.length; i++) { const label = this.tableList.tableColumn[i].label const value = this.tableList.tableColumn[i].prop this.searchOptions.push({ value: value, label: label }) } + }, + setColumnVisible(showCol) { + return this.tableColumn.map((ele) => { + return { + ...ele, + isShowColumn: showCol.includes(ele.label) + } + }) + }, + selTableCol(val) { + this.showcol = val + this.tableList.tableColumn = this.setColumnVisible(val) }, handleClose() { this.editConfig.editVisible = false @@ -98,8 +122,8 @@ this.loading = true await getSaleChanceList({ search_map: this.search_map, - page: 0, - pageSize: 0 + page: this.pagerOptions.currPage, + pageSize: this.pagerOptions.pageSize }) .then((res) => { console.log(res) @@ -112,7 +136,8 @@ sale_stage_name: item.sale_stage.name } }) - this.tableList.tableInfomation = list.slice(0, 5) || [] + this.tableList.tableInfomation = list || [] + this.pagerOptions.totalCount = res.data.count } else { this.tableList.tableInfomation = [] } -- Gitblit v1.8.0