From 4a2ae34a3cf85f5e8b0409b858cfbb12ef8b5ee2 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期三, 02 八月 2023 11:18:51 +0800
Subject: [PATCH] 注掉暂不支持内容
---
src/views/sales/salesOpportunity/index.vue | 176 ++++++++++++++++++++++++++--------------------------------
1 files changed, 78 insertions(+), 98 deletions(-)
diff --git a/src/views/sales/salesOpportunity/index.vue b/src/views/sales/salesOpportunity/index.vue
index 27e9f19..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,10 +28,13 @@
<script>
import AddSalesOpportunityDialog from "@/views/sales/salesOpportunity/AddSalesOpportunityDialog"
+import { getSaleChanceList, getDelSaleChance } from "@/api/sales/salesOpportunity"
+import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
export default {
name: "SalesOpportunity",
props: {},
+ mixins: [pageMixin],
components: {
AddSalesOpportunityDialog
},
@@ -77,35 +81,23 @@
},
created() {
this.setTable()
+ this.getData()
},
methods: {
setTable() {
this.tableList = {
- tableInfomation: [
- {
- opportunityName: "123123",
- customName: "涓婃捣閾冮摏",
- salesOpportunityNo: "POT205",
- contactName: "鍒樻��",
- saleStage: "鍒濇湡娌熼��",
- possible: "A绫诲鎴�",
- expectDealDate: "50",
- expectContractAmount: "2023-05-28",
- budgetAbsoluteValue: "锟�200,000.00",
- salesHead: "绯荤粺绠$悊鍛�"
- }
- ],
+ tableInfomation: [],
tableColumn: [
- { label: "鏈轰細鍚嶇О", prop: "opportunityName", min: 120 }, // 鏈轰細鍚嶇О
- { label: "瀹㈡埛鍚嶇О", prop: "customName", min: 90 }, // 瀹㈡埛鍚嶇О
- { label: "閿�鍞満浼氱紪鍙�", prop: "salesOpportunityNo" }, // 閿�鍞満浼氱紪鍙�
- { label: "鑱旂郴浜哄鍚�", prop: "contactName", min: 100 }, // 鑱旂郴浜哄鍚�
- { label: "閿�鍞樁娈�", prop: "saleStage" }, // 閿�鍞樁娈�
- { label: "鍙兘鎬�(%)", prop: "possible" }, // 鍙兘鎬�
- { label: "棰勮鎴愪氦鏃ユ湡", prop: "expectDealDate" }, // 棰勮鎴愪氦鏃ユ湡
- { label: "棰勮鍚堝悓閲戦", prop: "expectContractAmount" }, // 棰勮鍚堝悓閲戦
- { label: "棰勭畻缁濆鍊�", prop: "budgetAbsoluteValue" }, // 棰勭畻缁濆鍊�
- { label: "閿�鍞礋璐d汉", prop: "salesHead" } // 閿�鍞礋璐d汉
+ { label: "鏈轰細鍚嶇О", prop: "name", min: 120 }, // 鏈轰細鍚嶇О
+ { label: "瀹㈡埛鍚嶇О", prop: "client_name", min: 90 }, // 瀹㈡埛鍚嶇О
+ { label: "閿�鍞満浼氱紪鍙�", prop: "number" }, // 閿�鍞満浼氱紪鍙�
+ { label: "鑱旂郴浜哄鍚�", prop: "contact_name", min: 100 }, // 鑱旂郴浜哄鍚�
+ { label: "閿�鍞樁娈�", prop: "sale_stage_id" }, // 閿�鍞樁娈�
+ { label: "鍙兘鎬�(%)", prop: "possibilities_id" }, // 鍙兘鎬�
+ { label: "棰勮鎴愪氦鏃ユ湡", prop: "expected_time", isTime: true, min: 130 }, // 棰勮鎴愪氦鏃ユ湡
+ { label: "棰勮鍚堝悓閲戦", prop: "projected_amount" }, // 棰勮鍚堝悓閲戦
+ { label: "棰勭畻缁濆鍊�", prop: "capital_budget" }, // 棰勭畻缁濆鍊�
+ { label: "閿�鍞礋璐d汉", prop: "member_id" } // 閿�鍞礋璐d汉
]
}
this.searchOptions = []
@@ -114,88 +106,76 @@
this.searchOptions.push({ value: (i + 1).toString(), label: label })
}
},
+ // 璇锋眰鏁版嵁
+ async getData() {
+ this.loading = true
+ await getSaleChanceList({
+ keyword: "",
+ page: this.pagerOptions.currPage,
+ pageSize: this.pagerOptions.pageSize
+ })
+ .then((res) => {
+ console.log(res)
+ if (res.code === 200) {
+ if (res.data.list && res.data.list.length > 0) {
+ const list = res.data.list.map((item) => {
+ return {
+ ...item,
+ client_name: item.client.name,
+ contact_name: item.contact.name
+ }
+ })
+ this.tableList.tableInfomation = list || []
+ this.pagerOptions.totalCount = res.data.count
+ } else {
+ this.tableList.tableInfomation = []
+ }
+ } else {
+ this.tableList.tableInfomation = []
+ }
+ this.loading = false
+ })
+ .catch((err) => {
+ console.log(err)
+ this.tableList.tableInfomation = []
+ this.loading = false
+ })
+ },
// 鏂板缓
addBtnClick() {
this.editConfig.visible = true
this.editConfig.title = "鏂板缓"
- this.editConfig.infomation = {
- customName: "",
- salesOpportunityNo: "POT521",
- opportunityName: "",
- contactName: "",
- businessSource: "",
- businessType: "",
- saleStage: "",
- salesHead: "",
- oldCustomerMarket: "",
- competitor: "",
- possible: "",
- currency: "",
- budgetAbsoluteValue: "",
- expectDealDate: "",
- expectContractAmount: "",
- currentState: "",
- demandPainPoint: "",
- projectApproval: "",
- fundBudget: "",
- decisionMaker: "",
- decisionFactors: "",
- decisionFlow: "",
- programme: "",
- advantage: "",
- disadvantage: "",
- opportunity: "",
- threaten: "",
- position: "",
- map: "",
- country: "1",
- province: "1",
- city: "1",
- region: "1",
- notes: ""
- }
+ this.editConfig.infomation = {}
},
// 缂栬緫
handleClick(row) {
console.log(row)
this.editConfig.visible = true
this.editConfig.title = "缂栬緫"
- this.editConfig.infomation = {
- customName: "",
- salesOpportunityNo: "POT521",
- opportunityName: "",
- contactName: "",
- businessSource: "",
- businessType: "",
- saleStage: "",
- salesHead: "",
- oldCustomerMarket: "",
- competitor: "",
- possible: "",
- currency: "",
- budgetAbsoluteValue: "",
- expectDealDate: "",
- expectContractAmount: "",
- currentState: "",
- demandPainPoint: "",
- projectApproval: "",
- fundBudget: "",
- decisionMaker: "",
- decisionFactors: "",
- decisionFlow: "",
- programme: "",
- advantage: "",
- disadvantage: "",
- opportunity: "",
- threaten: "",
- position: "",
- map: "",
- country: "1",
- province: "1",
- city: "1",
- region: "1",
- notes: ""
- }
+ 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