Merge branch 'develop' of http://123.57.20.168:4000/admin/ys-app into develop

This commit is contained in:
xuli3099
2025-09-16 15:08:33 +08:00
2 changed files with 50 additions and 35 deletions

View File

@@ -17,12 +17,12 @@
<view class="all-body"> <view class="all-body">
<!-- 搜索--> <!-- 搜索-->
<view class="search"> <view class="search">
<!-- <uni-search-bar class="custom-search" radius="28" placeholder="请输入客户人员名称" clearButton="auto"--> <!-- <uni-search-bar class="custom-search" radius="28" placeholder="请输入客户人员名称" clearButton="auto"-->
<!-- cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"--> <!-- cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"-->
<!-- v-model="searchValue"--> <!-- v-model="searchValue"-->
<!-- />--> <!-- />-->
<view class="custom-search"></view> <view class="custom-search"></view>
</view> </view>
<!-- 分页部分 --> <!-- 分页部分 -->
<mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" <mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
@@ -110,9 +110,9 @@ let list = ref([]);
const upOption = ref({ const upOption = ref({
page: {num: 0, size: 10}, page: {num: 0, size: 10},
noMoreSize: 5, noMoreSize: 5,
empty: { empty: {
tip: '~ 空空如也 ~', tip: '~ 空空如也 ~',
icon: "../../static/images/mescroll-empty.png" icon: "../../../../static/images/mescroll-empty.png"
}, },
textLoading: '加载中...', textLoading: '加载中...',
textNoMore: '已经到底了' textNoMore: '已经到底了'
@@ -133,10 +133,11 @@ const mescrollInit = (mescroll) => {
// 下拉刷新 // 下拉刷新
const downCallback = async (mescroll) => { const downCallback = async (mescroll) => {
try {
uni.showLoading(); uni.showLoading();
cssFlag.value = true; cssFlag.value = true;
setTimeout(async () => { setTimeout(async () => {
try {
// 重置页码为第一页 // 重置页码为第一页
const res = await getList(1, mescroll.size || upOption.page.size); const res = await getList(1, mescroll.size || upOption.page.size);
@@ -144,17 +145,21 @@ const downCallback = async (mescroll) => {
// 正确传递 total 参数 // 正确传递 total 参数
mescroll.endSuccess(res.list.length, res.total > (mescroll.size || upOption.page.size)); mescroll.endSuccess(res.list.length, res.total > (mescroll.size || upOption.page.size));
uni.hideLoading(); uni.hideLoading();
} catch (error) {
console.log(error)
mescroll.endErr();
} finally {
cssFlag.value = false; cssFlag.value = false;
}, 500); }
} catch (error) { }, 500);
console.log(error)
mescroll.endErr();
}
} }
// 上拉加载更多 // 上拉加载更多
const upCallback = async (mescroll) => { const upCallback = async (mescroll) => {
try {
setTimeout(async () => { setTimeout(async () => {
try {
// 使用 mescroll 提供的页码和大小参数 // 使用 mescroll 提供的页码和大小参数
const res = await getList(mescroll.num, mescroll.size); const res = await getList(mescroll.num, mescroll.size);
if (mescroll.num === 1) { if (mescroll.num === 1) {
@@ -165,11 +170,11 @@ const upCallback = async (mescroll) => {
mescroll.endBySize(res.list.length, res.total); mescroll.endBySize(res.list.length, res.total);
// 正确判断是否还有更多数据 // 正确判断是否还有更多数据
mescroll.endSuccess(res.list.length, res.total > mescroll.num * mescroll.size); mescroll.endSuccess(res.list.length, res.total > mescroll.num * mescroll.size);
}, 500); } catch (error) {
} catch (error) { mescroll.endErr();
console.log(error) }
mescroll.endErr(); }, 500);
}
} }
// 获取数据列表 // 获取数据列表
@@ -180,12 +185,17 @@ const getList = (pageIndex, pageSize) => {
pageSize, pageSize,
searchContent: searchValue.value searchContent: searchValue.value
} }
try {
let res = await getCusUserApprovalList(param); let res = await getCusUserApprovalList(param);
resolve({ resolve({
list: res.rows, list: res.rows,
total: res.total total: res.total
}); });
} catch (e) {
console.log(e, "客户人员审核任务列表获取失败");
} finally {
uni.hideLoading();
}
}); });
} }
@@ -210,12 +220,12 @@ let handleDetail = (item) => {
<style scoped> <style scoped>
.all-body { .all-body {
/* #ifdef APP-PLUS */ /* #ifdef APP-PLUS */
top: 150rpx; top: 160rpx;
height: calc(100vh - 75px); height: calc(100vh - 160rpx);
/* #endif */ /* #endif */
/* #ifndef APP-PLUS */ /* #ifndef APP-PLUS */
top: 120rpx; top: 116rpx;
height: calc(100vh); height: calc(100vh - 116rpx);
/* #endif */ /* #endif */
} }

View File

@@ -28,7 +28,8 @@
class="scroll-h" :class="{ 'loading-scroll': cssFlag }"> class="scroll-h" :class="{ 'loading-scroll': cssFlag }">
<view class="white-bg margin-bottom20" v-for="(item, index) in list" :key="index" <view class="white-bg margin-bottom20" v-for="(item, index) in list" :key="index"
@longpress="touchstart(item)" @longpress="touchstart(item)"
@tap="touchend" longpress-time="1500"
@tap="touchend(item)"
> >
<view> <view>
<view class="report-list"> <view class="report-list">
@@ -257,7 +258,11 @@ function touchstart(item) {
} }
let isLongPressed = ref(false); let isLongPressed = ref(false);
function touchend() { function touchend(item) {
visistId.value = item.visistId
cusName.value = item.cusName
cusId.value = item.cusId
status.value = item.status
// 如果未触发长按,则执行点击逻辑 // 如果未触发长按,则执行点击逻辑
if (!isLongPressed.value) { if (!isLongPressed.value) {
uni.navigateTo({ uni.navigateTo({