| | |
| | | :show-add="false" |
| | | :show-download="false" |
| | | :amount-view="false" |
| | | :show-action-btn="false" |
| | | placeholder="请输入机会名称" |
| | | @searchClick="onFilterSearch" |
| | | > |
| | | <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> |
| | | </div> |
| | |
| | | <TableCommonView |
| | | ref="tableListRef" |
| | | :table-list="tableList" |
| | | :select-box="false" |
| | | @selClientClick="selClientClick" |
| | | @selContactsClick="selContactsClick" |
| | | @selCommonClick="selCommonClick" |
| | |
| | | @selTableCol="selTableCol" |
| | | > |
| | | <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 @click="followupClick(scope.row)" type="text" size="small">跟进</el-button> |
| | | <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> --> |
| | | <el-button @click="deleteItem(scope.row.id)" type="text" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | this.search_map = {} |
| | | } else { |
| | | this.search_map = { |
| | | [this.addConfig.id_name]: this.addConfig.client_name |
| | | [this.addConfig.id_name]: this.addConfig.id |
| | | } |
| | | } |
| | | this.getData(this.search_map) |
| | |
| | | methods: { |
| | | setTable() { |
| | | this.tableList = { |
| | | selectIndex:true, |
| | | tableInfomation: [], |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "新建" |
| | | this.editConfig.infomation = { city_id: 0, ...this.addConfig } |
| | | this.editConfig.infomation = { city_id: 0, ...this.addConfig,currency:1,} |
| | | }, |
| | | // 编辑 |
| | | handleClick(row) { |
| | |
| | | this.editConfig.title = "编辑" |
| | | this.editConfig.infomation = { ...row } |
| | | }, |
| | | // 删除 |
| | | // 批量删除 |
| | | delClick() { |
| | | if (this.selValueList && this.selValueList.length > 0) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | |
| | | } else { |
| | | this.$message.warning("请至少选择一条记录") |
| | | } |
| | | }, |
| | | /** |
| | | * 单个删除 |
| | | * @param id 销售机会id |
| | | */ |
| | | deleteItem(id) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | getDelSaleChance({ids: [id]}).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | | } else { |
| | | this.$message.warning("删除失败") |
| | | } |
| | | }) |
| | | }) |
| | | .catch((err) => { |
| | | if (err!== 'cancel'){ |
| | | console.error(err) |
| | | this.$message.warning("删除失败") |
| | | } |
| | | }) |
| | | }, |
| | | getSelectArray(val) { |
| | | console.log(val) |
| | |
| | | // 跟进 |
| | | followupClick(row) { |
| | | console.log(row) |
| | | this.editFollowupConfig.visible = true |
| | | this.editFollowupConfig.title = "新建" |
| | | this.editFollowupConfig.infomation = { |
| | | ...row, |
| | | currency:1, |
| | | number: "", |
| | | sale_chance_name: row.name, |
| | | sale_chance_id: row.id |
| | | } |
| | | this.editFollowupConfig.infomation.codeStandID='' |
| | | this.editFollowupConfig.visible = true |
| | | } |
| | | } |
| | | } |