|
|
@@ -114,6 +114,21 @@ import Pagination from "@/components/Pagination";
|
|
|
export default {
|
|
|
name: "EmployeeQueryTab",
|
|
|
components: { ConversationPanelPure, Pagination },
|
|
|
+ props: {
|
|
|
+ corp: {
|
|
|
+ type: Object,
|
|
|
+ default: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ corp(newVal) {
|
|
|
+ if (newVal && newVal.corpId) {
|
|
|
+ this.queryParams.userId = null; // 清空已选员工
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getStaffList();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
// 员工下拉选项(全量,用于查询条件)
|
|
|
@@ -193,6 +208,7 @@ export default {
|
|
|
const params = {
|
|
|
userId: this.queryParams.userId,
|
|
|
qwUserName: this.queryParams.qwUserName,
|
|
|
+ corpId: this.corp ? this.corp.corpId : null,
|
|
|
pageNum: this.queryParams.pageNum,
|
|
|
pageSize: this.queryParams.pageSize
|
|
|
};
|
|
|
@@ -232,7 +248,7 @@ export default {
|
|
|
|
|
|
// 打开抽屉,加载客户列表
|
|
|
openDrawer(row) {
|
|
|
- this.currentStaff = row;
|
|
|
+ this.currentStaff = { ...row, corpId: this.corp?.corpId };
|
|
|
this.drawerVisible = true;
|
|
|
this.selectedCustomerId = null;
|
|
|
this.selectedCustomerAvatar = "";
|
|
|
@@ -248,8 +264,8 @@ export default {
|
|
|
const params = {
|
|
|
pageNum: this.customerPageNum,
|
|
|
pageSize: this.customerPageSize,
|
|
|
- qwUserId: this.currentStaff.it,
|
|
|
- corpId: this.currentStaff.corpId
|
|
|
+ qwUserId: this.currentStaff.id,
|
|
|
+ corpId: this.corp?.corpId
|
|
|
};
|
|
|
const res = await listExternalContact(params);
|
|
|
if (res.rows) {
|