From af2b318da9d4c51b5b8afb2f4cefe86ff049bc7c Mon Sep 17 00:00:00 2001 From: songshankun <songshankun@foxmail.com> Date: 星期二, 17 十月 2023 21:16:45 +0800 Subject: [PATCH] feat: 添加缺失的请求 --- src/views/client/salesLead/index.vue | 36 ++++++++++++++++++++++-------------- 1 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/views/client/salesLead/index.vue b/src/views/client/salesLead/index.vue index 014a51c..698a695 100644 --- a/src/views/client/salesLead/index.vue +++ b/src/views/client/salesLead/index.vue @@ -12,7 +12,7 @@ > <template slot="leftButton"> <el-button size="small" type="primary" @click="addBtnClick">鏂板缓</el-button> - <el-button size="small" @click="delClick">鍒犻櫎</el-button> + <!-- <el-button size="small" @click="delClick">鍒犻櫎</el-button> --> </template> </CommonSearch> @@ -31,12 +31,12 @@ @selTableCol="selTableCol" > <template slot="tableButton"> - <el-table-column label="鎿嶄綔" width="120"> + <el-table-column label="鎿嶄綔" width="150"> <template slot-scope="scope"> <el-button @click="handleClick(scope.row)" type="text" size="small">缂栬緫</el-button> - <el-button @click="followupClick(scope.row)" type="text" size="small">璺熻繘</el-button> + <!-- <el-button @click="followupClick(scope.row)" type="text" size="small">璺熻繘</el-button> --> <el-button @click="advanceClick(scope.row)" type="text" size="small">鎺ㄨ繘</el-button> - <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button> --> + <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button> </template> </el-table-column> </template> @@ -156,6 +156,7 @@ methods: { setTable() { this.tableList = { + selectIndex: true, tableInfomation: [], allcol: [], showcol: this.showCol, @@ -212,22 +213,23 @@ }, // 鏂板缓 addBtnClick() { - this.editSalesLeadConfig.visible = true this.editSalesLeadConfig.title = "鏂板缓" - this.editSalesLeadConfig.infomation = { businessStatus: "鏂板缓", city_id: 0 } + this.editSalesLeadConfig.infomation = { businessStatus: "鏂板缓", city_id: 0,province_id:'' } + this.editSalesLeadConfig.visible = true }, // 缂栬緫 handleClick(row) { console.log(row) - this.editSalesLeadConfig.visible = true this.editSalesLeadConfig.title = "缂栬緫" this.editSalesLeadConfig.infomation = { ...row, businessStatus: "鏂板缓" } + this.editSalesLeadConfig.visible = true }, // 璺熻繘 followupClick(row) { - this.editConfig.visible = true this.editConfig.title = "鏂板缓" this.editConfig.infomation = { sales_leads_name: row.name } + + this.editConfig.visible = true }, // 瀵煎叆 importClitk() { @@ -243,8 +245,13 @@ } }, // 鍒犻櫎 - delClick() { - if (this.selValueList && this.selValueList.length > 0) { + delClick(id) { + if(!id){ + if (this.selValueList && this.selValueList.length == 0) { + this.$message.warning("璇疯嚦灏戦�夋嫨涓�鏉¤褰�") + return true; + } + } this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", { confirmButtonText: "纭畾", cancelButtonText: "鍙栨秷", @@ -252,7 +259,11 @@ }) .then(() => { console.log("dddd") - getDeleteSalesLeads({ ids: this.selValueList }).then((response) => { + let params={ids: this.selValueList } + if(id){ + params={ids: [id]} + } + getDeleteSalesLeads(params).then((response) => { if (response.code === 200) { this.$message.success("鍒犻櫎鎴愬姛") this.getData() @@ -262,9 +273,6 @@ }) }) .catch(() => {}) - } else { - this.$message.warning("璇疯嚦灏戦�夋嫨涓�鏉¤褰�") - } }, getSelectArray(val) { this.selValueList = [] -- Gitblit v1.8.0