|
|
@@ -263,7 +263,7 @@
|
|
|
placeholder="请输入商机编号、商机名称" clearable style="width: 300px; margin-bottom: 20px;"></el-input>
|
|
|
</div>
|
|
|
<el-table :data="opportunityList" style="width: 100%" border
|
|
|
- v-loading="opportunityLoading" >
|
|
|
+ v-loading="opportunityLoading" @current-change="handleCurrentChange">
|
|
|
<el-table-column type="radio" width="55"></el-table-column>
|
|
|
<el-table-column prop="opportunityCode" label="商机编号" width="180"></el-table-column>
|
|
|
<el-table-column prop="opportunityName" label="商机名称" min-width="200"></el-table-column>
|
|
|
@@ -402,17 +402,16 @@ export default {
|
|
|
},
|
|
|
// 选择商机确定
|
|
|
handleSelectOpportunity() {
|
|
|
- if (this.multipleSelection.length > 0) {
|
|
|
- const selected = this.multipleSelection[0];
|
|
|
- this.formData.opportunityCode = selected.opportunityCode;
|
|
|
+ if (this.selectedOpportunity) {
|
|
|
+ this.formData.opportunityCode = this.selectedOpportunity.opportunityCode;
|
|
|
this.dialogVisibleOpportunity = false;
|
|
|
} else {
|
|
|
this.$message.warning('请选择一条商机');
|
|
|
}
|
|
|
},
|
|
|
- // 处理选择变化
|
|
|
- handleSelectionChange(val) {
|
|
|
- this.multipleSelection = val;
|
|
|
+ // 处理单选变化
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.selectedOpportunity = val;
|
|
|
},
|
|
|
}
|
|
|
}
|