调整页面错乱问题

This commit is contained in:
cst61
2026-02-01 16:45:15 +08:00
parent eef85dce4a
commit 30b1c8f9ba
14 changed files with 1063 additions and 548 deletions

View File

@@ -50,6 +50,11 @@ const _sfc_main = {
},
mounted() {
this.loadCurrentUserInfo();
common_vendor.index.onWindowResize(() => {
if (this.showCustomerSourceDropdown) {
this.updateDropdownPosition();
}
});
},
methods: {
/**
@@ -70,7 +75,7 @@ const _sfc_main = {
this.formData.salesId = String(loginResponse.userId);
}
} catch (e) {
common_vendor.index.__f__("error", "at pages/furniture_reception/common_begin_reception.vue:239", "加载当前登录用户信息失败:", e);
common_vendor.index.__f__("error", "at pages/furniture_reception/common_begin_reception.vue:247", "加载当前登录用户信息失败:", e);
}
},
onGenderChange(e) {
@@ -78,6 +83,23 @@ const _sfc_main = {
},
toggleCustomerSourceDropdown() {
this.showCustomerSourceDropdown = !this.showCustomerSourceDropdown;
if (this.showCustomerSourceDropdown) {
this.$nextTick(() => {
this.updateDropdownPosition();
});
}
},
updateDropdownPosition() {
const selectEl = this.$refs.customerSourceSelect;
if (selectEl) {
const rect = selectEl.getBoundingClientRect();
const dropdownEl = this.$refs.customerSourceDropdown;
if (dropdownEl) {
dropdownEl.style.top = rect.bottom + 8 + "px";
dropdownEl.style.left = rect.left + "px";
dropdownEl.style.width = rect.width + "px";
}
}
},
selectCustomerSource(option) {
this.formData.customerSource = option;
@@ -126,7 +148,7 @@ const _sfc_main = {
tenantId = common_vendor.index.getStorageSync("backend-tenant-id") || "";
token = common_vendor.index.getStorageSync("backend-token") || "";
} catch (e) {
common_vendor.index.__f__("error", "at pages/furniture_reception/common_begin_reception.vue:296", "获取认证信息失败:", e);
common_vendor.index.__f__("error", "at pages/furniture_reception/common_begin_reception.vue:321", "获取认证信息失败:", e);
}
const headers = {};
if (token) {
@@ -170,7 +192,7 @@ const _sfc_main = {
});
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/furniture_reception/common_begin_reception.vue:348", "查询客户信息失败:", error);
common_vendor.index.__f__("error", "at pages/furniture_reception/common_begin_reception.vue:373", "查询客户信息失败:", error);
} finally {
this.isFetchingContact = false;
}
@@ -250,7 +272,7 @@ const _sfc_main = {
tenantId = common_vendor.index.getStorageSync("backend-tenant-id") || "";
token = common_vendor.index.getStorageSync("backend-token") || "";
} catch (e) {
common_vendor.index.__f__("error", "at pages/furniture_reception/common_begin_reception.vue:437", "获取认证信息失败:", e);
common_vendor.index.__f__("error", "at pages/furniture_reception/common_begin_reception.vue:462", "获取认证信息失败:", e);
}
const headers = {
"Content-Type": "application/json"
@@ -286,7 +308,7 @@ const _sfc_main = {
}
} catch (error) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/furniture_reception/common_begin_reception.vue:480", "保存失败:", error);
common_vendor.index.__f__("error", "at pages/furniture_reception/common_begin_reception.vue:505", "保存失败:", error);
common_vendor.index.showToast({
title: "保存失败,请重试",
icon: "none"