|
|
@@ -26,7 +26,7 @@
|
|
|
|
|
|
<div class="mt-10">
|
|
|
<label class="search__label">{{$t('业务员')}}:</label>
|
|
|
- <el-select v-model="people" class="inline-16" filterable :placeholder="$t('请选择业务员')" size="small"
|
|
|
+ <el-select v-model="people" class="inline-16" filterable :placeholder="$t('请选择业务员')" size="small" clearable
|
|
|
@change="peopleChange">
|
|
|
<el-option
|
|
|
v-for="item in selectList.hr"
|
|
|
@@ -261,17 +261,19 @@ export default {
|
|
|
let res = await this.$api.requested({
|
|
|
"id": 20230620102004,
|
|
|
"content": {
|
|
|
- "isleave":0
|
|
|
+ "isleave":0,
|
|
|
+ "depid":''
|
|
|
}
|
|
|
});
|
|
|
this.selectList = res.data;
|
|
|
this.selectList.dep = this.createMenu(res.data.dep);
|
|
|
},
|
|
|
- async personData(){
|
|
|
+ async personData(depid){
|
|
|
let res = await this.$api.requested({
|
|
|
"id": 20230620102004,
|
|
|
"content": {
|
|
|
- "isleave":this.isleave
|
|
|
+ "isleave":this.isleave,
|
|
|
+ "depid":depid
|
|
|
}
|
|
|
})
|
|
|
this.selectList.hr = res.data.hr
|
|
|
@@ -291,19 +293,24 @@ export default {
|
|
|
this.$refs.list.param.content.where.isleave = this.isleave;
|
|
|
this.people = ''
|
|
|
this.$refs.list.param.content.dataid = this.$refs.list.param.content.type == 0 ? -1 : this.$refs.list.param.content.dataid
|
|
|
- this.personData()
|
|
|
+ this.personData(this.$refs.list.param.content.dataid)
|
|
|
this.$refs.list.listData()
|
|
|
},
|
|
|
depChange(val) {
|
|
|
this.people = '';
|
|
|
this.$refs.list.param.content.type = 1;
|
|
|
- this.$refs.list.param.content.dataid = val[val.length - 1];
|
|
|
+ this.$refs.list.param.content.dataid = val[val.length - 1]?val[val.length - 1]:-1;
|
|
|
+ this.personData(val[val.length - 1]?val[val.length - 1]:-1)
|
|
|
this.$refs.list.listData()
|
|
|
},
|
|
|
peopleChange() {
|
|
|
- this.dep = '';
|
|
|
- this.$refs.list.param.content.type = 0;
|
|
|
- this.$refs.list.param.content.dataid = this.people;
|
|
|
+ if (this.people || this.dep[this.dep.length - 1]){
|
|
|
+ this.$refs.list.param.content.type = this.people? 0 : 1
|
|
|
+ this.$refs.list.param.content.dataid = this.people ? this.people : this.dep[this.dep.length - 1]
|
|
|
+ }else {
|
|
|
+ this.$refs.list.param.content.type = -1
|
|
|
+ this.$refs.list.param.content.dataid = ''
|
|
|
+ }
|
|
|
this.$refs.list.listData()
|
|
|
},
|
|
|
handleSizeChange(val) {
|