|  | @@ -1,40 +1,6 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  |    <div class="app-container">
 | 
	
		
			
				|  |  |      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
 | 
	
		
			
				|  |  | -      <el-form-item label="所属公司" prop="companyName">
 | 
	
		
			
				|  |  | -        <el-select
 | 
	
		
			
				|  |  | -          v-model="queryCompanyId"
 | 
	
		
			
				|  |  | -          placeholder="请选择所属公司"
 | 
	
		
			
				|  |  | -          clearable
 | 
	
		
			
				|  |  | -          filterable
 | 
	
		
			
				|  |  | -          size="small"
 | 
	
		
			
				|  |  | -          @change="handleQueryCompanyChange"
 | 
	
		
			
				|  |  | -        >
 | 
	
		
			
				|  |  | -          <el-option
 | 
	
		
			
				|  |  | -            v-for="item in companyQueryOptions"
 | 
	
		
			
				|  |  | -            :key="item.companyId"
 | 
	
		
			
				|  |  | -            :label="item.companyName"
 | 
	
		
			
				|  |  | -            :value="item.companyId">
 | 
	
		
			
				|  |  | -          </el-option>
 | 
	
		
			
				|  |  | -        </el-select>
 | 
	
		
			
				|  |  | -      </el-form-item>
 | 
	
		
			
				|  |  | -      <el-form-item label="所属销售" prop="companyUserId">
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        <el-select
 | 
	
		
			
				|  |  | -          v-model="queryCompanyUserId"
 | 
	
		
			
				|  |  | -          placeholder="请选择所属销售"
 | 
	
		
			
				|  |  | -          clearable
 | 
	
		
			
				|  |  | -          filterable
 | 
	
		
			
				|  |  | -          size="small"
 | 
	
		
			
				|  |  | -        >
 | 
	
		
			
				|  |  | -          <el-option
 | 
	
		
			
				|  |  | -            v-for="item in companyQueryUserOptions"
 | 
	
		
			
				|  |  | -            :key="item.userId"
 | 
	
		
			
				|  |  | -            :label="item.nickName"
 | 
	
		
			
				|  |  | -            :value="item.userId">
 | 
	
		
			
				|  |  | -          </el-option>
 | 
	
		
			
				|  |  | -        </el-select>
 | 
	
		
			
				|  |  | -      </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item label="会员ID" prop="userId">
 | 
	
		
			
				|  |  |          <el-input
 | 
	
		
			
				|  |  |            v-model="queryParams.userId"
 | 
	
	
		
			
				|  | @@ -149,8 +115,6 @@
 | 
	
		
			
				|  |  |                <dict-tag :options="userOptions" :value="scope.row.status"/>
 | 
	
		
			
				|  |  |           </template>
 | 
	
		
			
				|  |  |        </el-table-column>
 | 
	
		
			
				|  |  | -      <el-table-column label="所属公司" align="center" prop="companyName" />
 | 
	
		
			
				|  |  | -      <el-table-column label="所属销售" align="center" prop="companyUserNickName" />
 | 
	
		
			
				|  |  |        <el-table-column label="用户备注" align="center" prop="remark" />
 | 
	
		
			
				|  |  |        <el-table-column label="上级昵称" align="center" prop="tuiName" />
 | 
	
		
			
				|  |  |        <el-table-column label="app来源" align="center" prop="source" />
 | 
	
	
		
			
				|  | @@ -262,10 +226,6 @@ export default {
 | 
	
		
			
				|  |  |    components: {userDetails,userDetailsByNew},
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | -      companyQueryOptions:[],
 | 
	
		
			
				|  |  | -      companyQueryUserOptions:[],
 | 
	
		
			
				|  |  | -      queryCompanyId:null,
 | 
	
		
			
				|  |  | -      queryCompanyUserId:null,
 | 
	
		
			
				|  |  |        companyName: null,
 | 
	
		
			
				|  |  |        companyUserNickName: null,
 | 
	
		
			
				|  |  |        companyOptions: [],
 | 
	
	
		
			
				|  | @@ -322,6 +282,7 @@ export default {
 | 
	
		
			
				|  |  |          isBuy:null,
 | 
	
		
			
				|  |  |          source:null,
 | 
	
		
			
				|  |  |          companyName: null,
 | 
	
		
			
				|  |  | +        userId: null
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        // 表单参数
 | 
	
		
			
				|  |  |        form: {},
 | 
	
	
		
			
				|  | @@ -369,10 +330,6 @@ export default {
 | 
	
		
			
				|  |  |      this.getDicts("sys_company_or").then(response => {
 | 
	
		
			
				|  |  |        this.orOptions = response.data;
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  | -    getCompanyList().then(response => {
 | 
	
		
			
				|  |  | -        if (response.code === 200) {
 | 
	
		
			
				|  |  | -          this.companyQueryOptions = response.data;
 | 
	
		
			
				|  |  | -        }});
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  |      /** 销售选择变化 */
 | 
	
	
		
			
				|  | @@ -398,26 +355,6 @@ export default {
 | 
	
		
			
				|  |  |                   this.$refs.userDetailsByNew.getDetails(row.userId);
 | 
	
		
			
				|  |  |              }, 1);
 | 
	
		
			
				|  |  |       },
 | 
	
		
			
				|  |  | -     handleQueryCompanyChange(companyId){
 | 
	
		
			
				|  |  | -      // 清空已选择的销售
 | 
	
		
			
				|  |  | -      this.queryCompanyUserId = null;
 | 
	
		
			
				|  |  | -      // 根据公司ID获取对应的销售列表
 | 
	
		
			
				|  |  | -      if (companyId) {
 | 
	
		
			
				|  |  | -        getCompanyUserList({ companyId: companyId }).then(response => {
 | 
	
		
			
				|  |  | -          if (response.code === 200) {
 | 
	
		
			
				|  |  | -            this.companyQueryUserOptions = response.data;
 | 
	
		
			
				|  |  | -          } else {
 | 
	
		
			
				|  |  | -            this.$message.error(response.msg || '获取销售列表失败');
 | 
	
		
			
				|  |  | -            this.companyQueryUserOptions = [];
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        }).catch(() => {
 | 
	
		
			
				|  |  | -          this.$message.error('获取销售列表失败');
 | 
	
		
			
				|  |  | -          this.companyQueryUserOptions = [];
 | 
	
		
			
				|  |  | -        });
 | 
	
		
			
				|  |  | -      } else {
 | 
	
		
			
				|  |  | -        this.companyQueryUserOptions = [];
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -     },
 | 
	
		
			
				|  |  |      /** 查询用户列表 */
 | 
	
		
			
				|  |  |      getList() {
 | 
	
		
			
				|  |  |        this.loading = true;
 | 
	
	
		
			
				|  | @@ -460,8 +397,6 @@ export default {
 | 
	
		
			
				|  |  |      /** 搜索按钮操作 */
 | 
	
		
			
				|  |  |      handleQuery() {
 | 
	
		
			
				|  |  |        this.queryParams.pageNum = 1;
 | 
	
		
			
				|  |  | -      this.queryParams.companyId = this.queryCompanyId;
 | 
	
		
			
				|  |  | -      this.queryParams.companyUserId = this.queryCompanyUserId;
 | 
	
		
			
				|  |  |        this.getList();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      /** 重置按钮操作 */
 | 
	
	
		
			
				|  | @@ -470,10 +405,6 @@ export default {
 | 
	
		
			
				|  |  |         this.createTime=null;
 | 
	
		
			
				|  |  |        this.queryParams.sTime=null;
 | 
	
		
			
				|  |  |        this.queryParams.eTime=null;
 | 
	
		
			
				|  |  | -      this.queryParams.companyName = null;
 | 
	
		
			
				|  |  | -      this.queryParams.companyUserNickName = null;
 | 
	
		
			
				|  |  | -      this.queryParams.companyId = null;
 | 
	
		
			
				|  |  | -      this.queryParams.companyUserId = null;
 | 
	
		
			
				|  |  |        this.handleQuery();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      // 多选框选中数据
 | 
	
	
		
			
				|  | @@ -575,7 +506,9 @@ export default {
 | 
	
		
			
				|  |  |          }).then(response => {
 | 
	
		
			
				|  |  |            this.download(response.msg);
 | 
	
		
			
				|  |  |            this.exportLoading = false;
 | 
	
		
			
				|  |  | -        }).catch(() => {});
 | 
	
		
			
				|  |  | +        }).catch(() => {
 | 
	
		
			
				|  |  | +          this.exportLoading = false;
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  };
 |