Commit 09c1fdb9 authored by dragondean@qq.com's avatar dragondean@qq.com

订单列表增加未分配客户经理筛选

parent 0eb4ad01
<template>
<el-select
v-model="index"
v-model="valueSync"
filterable
:clearable="clearable"
remote
reserve-keyword
:placeholder="placeholder ? placeholder : $t('请选择')"
:loading="loading">
<el-option
v-if="prepend"
:label="`${prepend.nickname}`"
:value="prepend.id">
</el-option>
<el-option
v-for="(item, index) in list"
:key="item.id"
:label="`${item.nickname}`"
:value="index">
:value="item.id">
</el-option>
</el-select>
</template>
......@@ -26,26 +31,23 @@ export default {
manage:{
type:Boolean,
default:false
}
},
prepend: Object
},
data(){
return {
index: null,
list:[],
loading: false,
size: 20
size: 20,
valueSync: this.value
}
},
watch:{
index(val){
this.$emit('input', val !== null && val !== undefined && val != '' ? this.list[val].id : null)
this.$emit('change', val !== null && val !== undefined && val != '' ? this.list[val]: null)
},
value(val){
this.resetIndex()
this.valueSync = this.value
},
list(){
this.resetIndex()
valueSync(val){
this.$emit('input', val)
}
},
created(){
......@@ -60,39 +62,9 @@ export default {
this.list = res.data
})
}
// this.init()
},
methods:{
resetIndex(){
let index = this.list.findIndex(item => item.id == this.value)
if(index < 0) this.index = null
else this.index = index
}
/* init(){
console.log('初始化联系人选择', this.value)
if(!this.value) return
let index = this.list.findIndex(item => item.customerContactsId == this.value)
if(index < 0){
getCustomerContactsSelect({ids: this.value}).then(res => {
if(!res.data || !res.data.length){
return this.$message.error('联系人信息获取失败')
}
this.list.unshift(res.data[0])
this.index = 0
})
}
}, */
/* remoteMethod(keyword){
let params = {
size: this.size
}
params.searchKey = keyword
this.loading = true
getCustomerContactsSelect(params)
.then(res => this.list = res.data)
.finally(() => this.loading = false)
} */
if(this.value){
this.valueSync = this.value
}
}
}
</script>
......@@ -72,7 +72,8 @@
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="queryParams.warehouseType" clearable/>
</el-form-item>
<el-form-item :label="$t('客户经理')" >
<user-selector manage v-model="queryParams.salesmanId" clearable @change="handleQuery"/>
<user-selector manage v-model="queryParams.salesmanId" clearable @change="handleQuery"
:prepend="{ id: 0, nickname: $t('未分配客户经理')}"/>
</el-form-item>
<el-form-item :label="$t('订单状态')" prop="status">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status"
......
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