Commit 9e2302ef authored by dcy's avatar dcy

移交修改参数,公海池加上批量移交

parent 42151158
...@@ -435,7 +435,7 @@ export default { ...@@ -435,7 +435,7 @@ export default {
/** 表单重置 */ /** 表单重置 */
resetHandOverForm() { resetHandOverForm() {
this.form = { this.form = {
customerId: undefined, customerIdList: undefined,
customerServiceId: undefined customerServiceId: undefined
}; };
this.resetForm("handOverForm"); this.resetForm("handOverForm");
...@@ -482,9 +482,8 @@ export default { ...@@ -482,9 +482,8 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handOver(row) { handOver(row) {
this.resetHandOverForm(); this.resetHandOverForm();
this.openHandOver = true; this.openHandOver = true;
this.handOverForm.customerId = row.id; this.handOverForm.customerIdList = [row.id];
}, },
/** 提交按钮 */ /** 提交按钮 */
...@@ -548,7 +547,7 @@ export default { ...@@ -548,7 +547,7 @@ export default {
this.openHandOver = false; this.openHandOver = false;
this.handOverForm = { this.handOverForm = {
customerId: undefined, customerId: undefined,
customerServiceId: undefined customerIdList : undefined
}; };
}, },
......
...@@ -336,7 +336,7 @@ export default { ...@@ -336,7 +336,7 @@ export default {
} }
handOverCustomer({ handOverCustomer({
customerServiceId:this.service, customerServiceId:this.service,
customerId:this.transferData.id customerIdList :[this.transferData.id]
}).then(r=>{ }).then(r=>{
if(r.code === 0){ if(r.code === 0){
this.transferShow = false; this.transferShow = false;
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" size="mini" @click="batchHandover" <el-button type="primary" size="mini" @click="batchHandover"
:disabled="multipleSelection.length === 0"
>批量移交</el-button> >批量移交</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
...@@ -118,7 +119,8 @@ ...@@ -118,7 +119,8 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="transferShow = false">取 消</el-button> <el-button @click="transferShow = false">取 消</el-button>
<el-button type="primary" @click="transferFn">确 定</el-button> <el-button type="primary" v-if="isBatch" @click="transferFn(multipleSelection.map(item => item.id))">确 定</el-button>
<el-button type="primary" v-else @click="transferFn([transferData.id])">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 分页组件 --> <!-- 分页组件 -->
...@@ -189,6 +191,8 @@ export default { ...@@ -189,6 +191,8 @@ export default {
service:undefined,//客服 service:undefined,//客服
transferData:undefined,//移交数据 transferData:undefined,//移交数据
transferShow:false, transferShow:false,
multipleSelection:[],
isBatch:false,
}; };
}, },
created() { created() {
...@@ -348,6 +352,8 @@ export default { ...@@ -348,6 +352,8 @@ export default {
this.service = row.customerService this.service = row.customerService
this.transferData = row; this.transferData = row;
this.transferShow =true; this.transferShow =true;
this.isBatch = false;
}, },
customerServiceFn(val){ customerServiceFn(val){
if(this.customerServiceList.length > 0){ if(this.customerServiceList.length > 0){
...@@ -357,18 +363,19 @@ export default { ...@@ -357,18 +363,19 @@ export default {
return '' return ''
} }
}, },
transferFn(){ transferFn(val){
if(!this.service){ if(!this.service){
return this.$message.warning('请选择跟进客服!'); return this.$message.warning('请选择跟进客服!');
} }
handOverCustomer({ handOverCustomer({
customerServiceId:this.service, customerServiceId:this.service,
customerId:this.transferData.id customerIdList:val
}).then(r=>{ }).then(r=>{
if(r.code === 0){ if(r.code === 0){
this.transferShow = false; this.transferShow = false;
this.service = ''; this.service = '';
this.getList(); this.getList();
this.multipleSelection = [];
this.$message.success('移交成功!'); this.$message.success('移交成功!');
} }
}) })
...@@ -397,9 +404,10 @@ export default { ...@@ -397,9 +404,10 @@ export default {
}, },
batchHandover(){ batchHandover(){
this.transferShow = true; this.transferShow = true;
this.isBatch = true
}, },
handleSelectionChange(val){ handleSelectionChange(val){
console.log(val); this.multipleSelection = val;
} }
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment