From d36cadd06f5da671817b61c037bc3dc778a7ce1f Mon Sep 17 00:00:00 2001 From: wangzhuo Date: Fri, 12 Sep 2025 16:57:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BD=91=E7=BB=9C?= =?UTF-8?q?=E8=B6=85=E6=97=B6loading=E6=8F=90=E7=A4=BA=E4=B8=8D=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E7=9A=84=E9=97=AE=E9=A2=98=20fix:=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E9=A1=B5=E9=9D=A2=E9=AB=98=E5=BA=A6=E9=80=82=E9=85=8D?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CRM/customer/changeCustomerOwner.vue | 103 +++++++----------- .../CRM/customer/customerUserBelong.vue | 64 ++++++----- .../business/CRM/customer/selectCustomer.vue | 15 ++- .../mainOwner/audit/mainOwnerChangeAudit.vue | 94 +++++++++------- .../CRM/mainOwner/view/viewMainOwner.vue | 14 +-- .../mainOwner/view/viewMainOwnerDetail.vue | 12 ++ src/pages/business/CRM/plan/myPlan.vue | 6 +- 7 files changed, 155 insertions(+), 153 deletions(-) diff --git a/src/pages/business/CRM/customer/changeCustomerOwner.vue b/src/pages/business/CRM/customer/changeCustomerOwner.vue index feb555b..c37f3b2 100644 --- a/src/pages/business/CRM/customer/changeCustomerOwner.vue +++ b/src/pages/business/CRM/customer/changeCustomerOwner.vue @@ -24,7 +24,7 @@ - @@ -126,7 +126,7 @@ let list = ref([]); const upOption = ref({ page: {num: 0, size: 10}, noMoreSize: 5, - empty: { + empty: { tip: '~ 空空如也 ~', icon: "../../../../static/images/mescroll-empty.png" }, @@ -149,44 +149,31 @@ const mescrollInit = (mescroll) => { // 下拉刷新 const downCallback = async (mescroll) => { - try { - uni.showLoading(); - cssFlag.value = true; - setTimeout(async () => { - // 重置页码为第一页 - const res = await getList(1, mescroll.size || upOption.page.size); - list.value = res.list; - cssFlag.value = false; - // 正确传递 total 参数 - mescroll.endSuccess(res.list.length, res.total >= mescroll.size); - uni.hideLoading(); - - }, 500); - } catch (error) { - console.log(error) - mescroll.endErr(); - } + uni.showLoading(); + cssFlag.value = true; + setTimeout(async () => { + // 重置页码为第一页 + const res = await getList(1, mescroll.size || upOption.page.size); + cssFlag.value = false; + list.value = res.list; + // 正确传递 total 参数 + mescroll.endSuccess(res.list.length, res.total >= mescroll.size); + }, 500); } // 上拉加载更多 const upCallback = async (mescroll) => { - try { - uni.showLoading(); - setTimeout(async () => { - // 使用 mescroll 提供的页码和大小参数 - const res = await getList(mescroll.num, mescroll.size); - if (mescroll.num === 1) { - list.value = res.list; - } else { - list.value.push(...res.list); - } - // 正确判断是否还有更多数据 - mescroll.endSuccess(res.list.length, res.total >= mescroll.size); - uni.hideLoading(); - }, 500); - } catch (error) { - console.log(error) - mescroll.endErr(); - } + uni.showLoading(); + setTimeout(async () => { + // 使用 mescroll 提供的页码和大小参数 + const res = await getList(mescroll.num, mescroll.size); + if (mescroll.num === 1) { + list.value = res.list; + } else { + list.value.push(...res.list); + } + // 正确判断是否还有更多数据 + mescroll.endSuccess(res.list.length, res.total >= mescroll.size); + }, 500); } // 获取数据列表 @@ -197,12 +184,17 @@ const getList = (pageIndex, pageSize) => { pageSize, searchContent: searchValue.value } - - let res = await SearchForAllPerson(param); - resolve({ - list: res.rows, - total: res.total - }); + try { + let res = await SearchForAllPerson(param); + resolve({ + list: res.rows, + total: res.total + }); + } catch (e) { + console.log(e, '数据获取失败'); + } finally { + uni.hideLoading(); + } }); } @@ -306,16 +298,14 @@ let handleCopyInfo = (item) => { \ No newline at end of file diff --git a/src/pages/business/CRM/customer/customerUserBelong.vue b/src/pages/business/CRM/customer/customerUserBelong.vue index 6e57682..523dd3e 100644 --- a/src/pages/business/CRM/customer/customerUserBelong.vue +++ b/src/pages/business/CRM/customer/customerUserBelong.vue @@ -134,7 +134,7 @@ const upOption = ref({ noMoreSize: 5, empty: { tip: '~ 空空如也 ~', - icon: "../../static/images/mescroll-empty.png" + icon: "../../../../static/images/mescroll-empty.png" }, textLoading: '加载中...', textNoMore: '已经到底了' @@ -155,27 +155,27 @@ const mescrollInit = (mescroll) => { // 下拉刷新 const downCallback = async (mescroll) => { - try { - cssFlag.value = true; - uni.showLoading(); - setTimeout(async () => { + cssFlag.value = true; + uni.showLoading(); + setTimeout(async () => { + try { // 重置页码为第一页 const res = await getList(1, mescroll.size || upOption.page.size); - cssFlag.value = false; list.value = res.list; // 正确传递 total 参数 mescroll.endSuccess(res.list.length, res.total > (mescroll.size || upOption.page.size)); - uni.hideLoading(); - }, 500); - } catch (error) { - console.log(error) - mescroll.endErr(); - } + } catch (error) { + mescroll.endErr(); + } finally { + cssFlag.value = false; + } + }, 500); + } // 上拉加载更多 const upCallback = async (mescroll) => { - try { - setTimeout(async () => { + setTimeout(async () => { + try { // 使用 mescroll 提供的页码和大小参数 const res = await getList(mescroll.num, mescroll.size); if (mescroll.num === 1) { @@ -186,11 +186,10 @@ const upCallback = async (mescroll) => { // 正确判断是否还有更多数据 mescroll.endBySize(res.list.length, res.total) // mescroll.endSuccess(res.list.length, res.total > mescroll.num * mescroll.size); - }, 500); - } catch (error) { - console.log(error) - mescroll.endErr(); - } + } catch (error) { + mescroll.endErr(); + } + }, 500); } // 获取数据列表 @@ -201,12 +200,18 @@ const getList = (pageIndex, pageSize) => { pageSize, searchContent: searchValue.value } + try { + let res = await SearchForAllCustomersSalesperson(param); + resolve({ + list: res.rows, + total: res.total + }); + } catch (e) { + console.log(e, "获取所有客户人员所属失败"); + } finally { + uni.hideLoading(); + } - let res = await SearchForAllCustomersSalesperson(param); - resolve({ - list: res.rows, - total: res.total - }); }); } @@ -224,7 +229,7 @@ let handleDetail = (item) => { res.eventChannel.emit('editCusData', {param: item, isAdd: false}) } }) - }else{ + } else { uni.showToast({ title: '已完成审核,不可修改', icon: 'none' @@ -278,16 +283,15 @@ let handleDelete = async (item) => { \ No newline at end of file diff --git a/src/pages/business/CRM/mainOwner/view/viewMainOwner.vue b/src/pages/business/CRM/mainOwner/view/viewMainOwner.vue index 621d22f..31e7bc4 100644 --- a/src/pages/business/CRM/mainOwner/view/viewMainOwner.vue +++ b/src/pages/business/CRM/mainOwner/view/viewMainOwner.vue @@ -155,9 +155,9 @@ const upCallback = async (mescroll) => { const upOption = ref({ page: { num: 0, size: 10 }, noMoreSize: 5, - empty: { - tip: '~ 空空如也 ~', - icon: "../../static/images/mescroll-empty.png" + empty: { + tip: '~ 空空如也 ~', + icon: "../../../../../static/images/mescroll-empty.png" }, textLoading: '加载中...', textNoMore: '已经到底了' @@ -184,12 +184,12 @@ function showDetail(item) { .all-body { /* #ifdef APP-PLUS */ - top: 150rpx; - height: calc(100vh - 75px); + top: 160rpx; + height: calc(100vh - 160rpx); /* #endif */ /* #ifndef APP-PLUS */ - top: 120rpx; - height: calc(100vh); + top: 116rpx; + height: calc(100vh - 116rpx); /* #endif */ } diff --git a/src/pages/business/CRM/mainOwner/view/viewMainOwnerDetail.vue b/src/pages/business/CRM/mainOwner/view/viewMainOwnerDetail.vue index 0d52803..a5c63dc 100644 --- a/src/pages/business/CRM/mainOwner/view/viewMainOwnerDetail.vue +++ b/src/pages/business/CRM/mainOwner/view/viewMainOwnerDetail.vue @@ -138,6 +138,18 @@ function getCrmCusUserNewChangeOwnerList() { /* min-height: 100vh; */ } +.all-body { + /* #ifdef APP-PLUS */ + top: 160rpx; + height: calc(100vh - 160rpx); + /* #endif */ + /* #ifndef APP-PLUS */ + top: 116rpx; + height: calc(100vh - 116rpx); + /* #endif */ + overflow-y: auto; +} + .white-bg { padding-bottom: 10rpx; } diff --git a/src/pages/business/CRM/plan/myPlan.vue b/src/pages/business/CRM/plan/myPlan.vue index f9670ab..ffbd47b 100644 --- a/src/pages/business/CRM/plan/myPlan.vue +++ b/src/pages/business/CRM/plan/myPlan.vue @@ -56,7 +56,9 @@ - + + 暂无数据 + @@ -282,7 +284,7 @@ function handleEdit(index) { } .con-bg { - height: 445rpx; + /*height: 445rpx;*/ } .nav-list {