From ebddc02611b0373c1d5bfa342bd781fb5eb82009 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期二, 01 八月 2023 14:23:31 +0800 Subject: [PATCH] 侧边栏样式机销售明细单增加销售机会选择弹窗 --- src/views/sales/salesOpportunity/index.vue | 41 ++++++++++++++++++++++++++++++++++++----- 1 files changed, 36 insertions(+), 5 deletions(-) diff --git a/src/views/sales/salesOpportunity/index.vue b/src/views/sales/salesOpportunity/index.vue index d12fe97..e3bb315 100644 --- a/src/views/sales/salesOpportunity/index.vue +++ b/src/views/sales/salesOpportunity/index.vue @@ -8,14 +8,15 @@ :custom-funnel="true" :operates-list="operatesList" /> - <PagerView class="page" /> + <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> </div> <TableCommonView ref="tableListRef" :table-list="tableList"> <template slot="tableButton"> - <el-table-column label="鎿嶄綔" width="100"> + <el-table-column label="鎿嶄綔" width="120"> <template slot-scope="scope"> <el-button @click="handleClick(scope.row)" type="text" size="small">缂栬緫</el-button> <el-button type="text" size="small">璺熻繘</el-button> + <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button> </template> </el-table-column> </template> @@ -27,11 +28,13 @@ <script> import AddSalesOpportunityDialog from "@/views/sales/salesOpportunity/AddSalesOpportunityDialog" -import { getSaleChanceList } from "@/api/sales/salesOpportunity" +import { getSaleChanceList, getDelSaleChance } from "@/api/sales/salesOpportunity" +import pageMixin from "@/components/makepager/pager/mixin/pageMixin" export default { name: "SalesOpportunity", props: {}, + mixins: [pageMixin], components: { AddSalesOpportunityDialog }, @@ -91,7 +94,7 @@ { label: "鑱旂郴浜哄鍚�", prop: "contact_name", min: 100 }, // 鑱旂郴浜哄鍚� { label: "閿�鍞樁娈�", prop: "sale_stage_id" }, // 閿�鍞樁娈� { label: "鍙兘鎬�(%)", prop: "possibilities_id" }, // 鍙兘鎬� - { label: "棰勮鎴愪氦鏃ユ湡", prop: "expected_time" }, // 棰勮鎴愪氦鏃ユ湡 + { label: "棰勮鎴愪氦鏃ユ湡", prop: "expected_time", isTime: true, min: 130 }, // 棰勮鎴愪氦鏃ユ湡 { label: "棰勮鍚堝悓閲戦", prop: "projected_amount" }, // 棰勮鍚堝悓閲戦 { label: "棰勭畻缁濆鍊�", prop: "capital_budget" }, // 棰勭畻缁濆鍊� { label: "閿�鍞礋璐d汉", prop: "member_id" } // 閿�鍞礋璐d汉 @@ -106,7 +109,11 @@ // 璇锋眰鏁版嵁 async getData() { this.loading = true - await getSaleChanceList() + await getSaleChanceList({ + keyword: "", + page: this.pagerOptions.currPage, + pageSize: this.pagerOptions.pageSize + }) .then((res) => { console.log(res) if (res.code === 200) { @@ -119,6 +126,7 @@ } }) this.tableList.tableInfomation = list || [] + this.pagerOptions.totalCount = res.data.count } else { this.tableList.tableInfomation = [] } @@ -145,6 +153,29 @@ this.editConfig.visible = true this.editConfig.title = "缂栬緫" this.editConfig.infomation = { ...row } + }, + // 鍒犻櫎 + delClick(id) { + this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning" + }) + .then(function () { + return getDelSaleChance({ id: id }) + }) + .then((response) => { + if (response.code === 200) { + this.$message.success("鍒犻櫎鎴愬姛") + this.getData() + } else { + this.$message.warning("鍒犻櫎澶辫触") + } + }) + .catch(function () {}) + }, + getSelectArray(val) { + console.log(val) } } } -- Gitblit v1.8.0