Compare commits

5 Commits

Author SHA1 Message Date
wangzhuo
3e5a70f147 fix: 优化客户人员所属 2025-09-17 21:59:03 +08:00
wangzhuo
f3e20ce31a fix: 客户人员审核 2025-09-17 21:52:58 +08:00
wangzhuo
409597fa7f fix: 调整滚动视图高度 2025-09-17 21:49:53 +08:00
wangzhuo
1a3c014c83 fix: 主归属人变更审核 2025-09-17 21:47:23 +08:00
wangzhuo
3a1339fc76 feat: 周计划查看支持下拉刷新 2025-09-17 21:44:01 +08:00
8 changed files with 103 additions and 154 deletions

View File

@@ -331,7 +331,8 @@
"path": "pages/business/CRM/plan/planView",
//周计划查看
"style": {
"navigationBarTitleText": ""
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
{

View File

@@ -295,7 +295,7 @@ let handleCopyInfo = (item) => {
}
</script>
<style lang="scss" scoped>
<style scoped>
.all-body {
/* #ifdef APP-PLUS */
top: 160rpx;
@@ -306,19 +306,9 @@ let handleCopyInfo = (item) => {
height: calc(100vh - 116rpx);
/* #endif */
}
.search .btn-search {
border: none;
background: none;
line-height: normal;
color: #fff;
line-height: 56rpx !important;
padding: 10rpx 0 0;
text-align: left;
cursor: pointer;
}
.search .btn-search::after {
display: none;
.scroll-h {
height: 100%;
}
.white-bg {

View File

@@ -612,12 +612,11 @@ let submitForm = async () => {
uni.showToast({
title: "更新成功"
})
setTimeout(()=>{
uni.navigateBack();
const eventChannel = instance.getOpenerEventChannel();
eventChannel.emit("refreshCusUserList");
setTimeout(()=>{
uni.navigateBack();
},1000);
}else{
uni.showToast({
title: "操作失败",

View File

@@ -7,7 +7,13 @@
<view class="con-body">
<view class="con-bg">
<!-- 头部 -->
<customHeader ref="customHeaderRef" :title="'客户人员审核'" :leftFlag="true" :rightFlag="false">
<customHeader ref="customHeaderRef" :title="'客户人员审核'" :leftFlag="true" :rightFlag="list.length > 0">
<template #right>
<view class="head-right" @click="handleReSort">
<uni-icons type="arrow-down" size="20" color="#B7D2FF"></uni-icons>
{{iconType==='arrow-up'?'最新':'最早'}}
</view>
</template>
</customHeader>
<!-- 高度来避免头部遮挡 -->
@@ -101,9 +107,13 @@ let handleSearch = () => {
watch(searchValue, (newValue, oldValue) => {
handleSearch()
})
let clearSearchValue = () => {
searchValue.value = '';
// 排序图标
const iconType = ref('arrow-up');
let handleReSort = () => {
iconType.value = iconType.value === 'arrow-down' ? 'arrow-up' : 'arrow-down';
list.value = list.value.reverse();
}
// 查询列表
let list = ref([]);
@@ -230,12 +240,7 @@ let handleDetail = (item) => {
}
.scroll-h {
/* #ifdef APP-PLUS */
height: calc(100vh - 120px);
/* #endif */
/* #ifndef APP-PLUS */
height: calc(100vh - 110px);
/* #endif */
height: 100%;
}
.white-bg {

View File

@@ -222,6 +222,7 @@ let handleDetail = (item) => {
url: "/pages/business/CRM/customer/components/customerUserEdit",
events: {
refreshCusUserList() {
console.log('refreshCusUserList',"响应刷新")
handleSearch();
}
},

View File

@@ -16,13 +16,12 @@
<!-- 正文内容 -->
<view class="all-body">
<!-- 搜索-->
<!-- <view class="search">-->
<!-- <uni-search-bar class="custom-search" radius="28" placeholder="请输入客户人员名称" clearButton="auto"-->
<!-- cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"-->
<!-- v-model="searchValue"-->
<!-- />-->
<!-- <button type="default" @click="clearSearchValue" size="mini" class="btn-search">清空</button>-->
<!-- </view>-->
<!-- <view class="search">-->
<!-- <uni-search-bar class="custom-search" radius="28" placeholder="请输入客户人员名称" clearButton="auto"-->
<!-- cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"-->
<!-- v-model="searchValue"-->
<!-- />-->
<!-- </view>-->
<!-- 分页部分 -->
<mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
@@ -34,7 +33,7 @@
<view class="r-list title">
{{ item.cusName }}
<view class="r-right no-wrap" :class="item.auditStatus ? 'btn-blue' : 'btn-pink' ">
{{ item.auditStatus ? item.auditStatus : '待审核' }}
{{ item.auditStatus ? item.auditStatus : '待审核' }}
</view>
</view>
<view class="r-list">
@@ -100,7 +99,8 @@ const mescrollRef = ref(null);
let timerId = null;
// 查询搜索跳转
let handleSearch = () => {
// 防抖搜索 console.log(searchValue.value)
// 防抖搜索
console.log(searchValue.value)
if (timerId) clearTimeout(timerId);
timerId = setTimeout(async () => {
@@ -236,29 +236,6 @@ let handleDetail = (item) => {
/* #endif */
}
.search {
display: flex;
}
.search .btn-search {
border: none;
background: none;
line-height: normal;
color: #fff;
line-height: 56rpx !important;
padding: 10rpx 0 0;
text-align: left;
cursor: pointer;
}
.search .btn-search::after {
display: none;
}
.search .custom-search {
width: 80%;
}
.scroll-h{
/* #ifdef APP-PLUS */
top: 160rpx;
@@ -270,10 +247,6 @@ let handleDetail = (item) => {
/* #endif */
}
.search .custom-search.uni-searchbar {
padding-right: 0 !important;
}
.white-bg {
padding-bottom: 10rpx;
@@ -282,11 +255,11 @@ let handleDetail = (item) => {
}
}
.no-wrap{
.no-wrap {
white-space: nowrap;
}
.btn-blue{
.btn-blue {
border-radius: 10rpx;
}
</style>

View File

@@ -1,19 +1,17 @@
<!--
* @description 查看主归属人变更
* @update date 2025/9/17 21:45
-->
<template>
<view class="con-body">
<view class="con-bg">
<!-- 头部 -->
<customHeader ref="customHeaderRef" :title="'查看主归属人变更'" :leftFlag="true" :rightFlag="false"></customHeader>
<customHeader ref="customHeaderRef" :title="'查看主归属人变更'" :leftFlag="true"
:rightFlag="false"></customHeader>
<!-- 高度来避免头部遮挡 -->
<view class="top-height" :style="{ paddingTop: navBarPaddingTop + 'px' }"></view>
<view class="all-body">
<!-- 搜索 @blur="blur" @focus="focus" @input="input" @cancel="cancel" @clear="clear"-->
<view class="search">
<!-- <uni-search-bar class="custom-search" radius="28" placeholder="检索功能待开发,感谢您的耐心等待" clearButton="auto"-->
<!-- cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff" v-model="searchValue" />-->
<!-- <button type="default" @click="handleSearch" size="mini" class="btn-search">查询</button>-->
</view>
<!-- 分页部分 -->
<mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
:up="upOption" :down="downOption" :fixed="false" textColor="#ffffff" bgColor="#ffffff"
@@ -22,25 +20,17 @@
@click="showDetail(item)">
<view>
<view class="report-list">
<view class="title">客户{{ item.cusName }}</view>
<view class="r-list">
<view class="r-list title">{{ item.cusName }}
<view class="r-name">{{ item.visistCode }}</view>
<view>
<view
class="r-right btn-blue"
size="mini">
查看
</view>
<view class="r-right btn-blue no-wrap"> 查看 </view>
</view>
</view>
<view class="border-bottom"></view>
<view class="r-list">
<view class="r-left">客户人员名称</view>
<view class="r-right">{{ item.userName}}</view>
<view class="r-right">{{ item.userName }}</view>
</view>
<view class="r-list" >
<view class="r-list">
<view class="r-left">目前业务员</view>
<view class="r-right">{{ item.belonger }}</view>
</view>
@@ -68,7 +58,7 @@
<script setup>
import customHeader from "../../../../../components/customHeader.vue";
import { onMounted, ref } from 'vue';
import {onMounted, ref} from 'vue';
import {getNavBarPaddingTop} from "../../../../../utils/system";
import MescrollUni from "mescroll-uni/mescroll-uni.vue";
@@ -88,14 +78,15 @@ let queryParams = ref({
onMounted(() => {
navBarPaddingTop.value = getNavBarPaddingTop() * 2;
})
onShow(()=>{
onShow(() => {
getList(queryParams)
})
let list = ref([])
//获取列表信息
function getList(queryParams){
function getList(queryParams) {
queryViewMainOwnerList(queryParams.value).then(res => {
list.value = res.rows
})
@@ -153,7 +144,7 @@ const upCallback = async (mescroll) => {
}
const upOption = ref({
page: { num: 0, size: 10 },
page: {num: 0, size: 10},
noMoreSize: 5,
empty: {
tip: '~ 空空如也 ~',
@@ -180,7 +171,7 @@ function showDetail(item) {
</script>
<style lang="scss" scoped>
<style scoped>
.all-body {
/* #ifdef APP-PLUS */
@@ -193,44 +184,30 @@ function showDetail(item) {
/* #endif */
}
.search {
display: flex;
}
.search .btn-search {
border: none;
background: none;
line-height: normal;
color: #fff;
line-height: 56rpx !important;
padding: 10rpx 0 0;
text-align: left;
cursor: pointer;
}
.search .btn-search::after {
display: none;
}
.search .custom-search {
width: 80%;
}
.search .custom-search.uni-searchbar {
padding-right: 0 !important;
}
.scroll-h {
.scroll-h{
/* #ifdef APP-PLUS */
height: calc(100vh - 120px);
top: 160rpx;
height: calc(100vh - 160rpx);
/* #endif */
/* #ifndef APP-PLUS */
height: calc(100vh - 110px);
top: 116rpx;
height: calc(100vh - 116rpx);
/* #endif */
}
.white-bg {
padding-bottom: 10rpx;
}
.title {
align-items: baseline
}
.no-wrap {
white-space: nowrap;
}
.btn-blue {
border-radius: 10rpx;
}
</style>

View File

@@ -44,7 +44,7 @@
<view style="text-align: center; margin-bottom: 30rpx; font-size: 30rpx;">
{{ parseInt(searchValue.selectDate.substring(5, 7)) }}
<span class="line"></span>
{{searchValue.selectDate.substring(0, 4) }}
{{ searchValue.selectDate.substring(0, 4) }}
</view>
<uni-row class="demo-uni-row">
<uni-col :span="1">
@@ -58,6 +58,7 @@
<view class="demo-uni-col mar-left">
<text>{{ WeekShortCN[i] }}</text>
<text v-if="list[0][field]">{{ list[0][field].substring(8) }}</text>
<text v-else>{{ getWeek(i) }}</text>
</view>
</uni-col>
</block>
@@ -103,9 +104,10 @@ import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
import {getNavBarPaddingTop} from '@/utils/system.js'
import {getAllWeekPlanList} from "@/api/crm/plan/getPlan";
import {AreaList, COLOR_MAP, OrdinalDate, WeekShortCN, WorkEvent, WorkType} from "./dataMap";
import {getCurrentWeekNum} from "./dateTimeUtils";
import {getCurrentWeekNum, getWeek2} from "./dateTimeUtils";
import {getDate} from "@/utils/datetime";
import {getWeekPlanListByDate} from "@/api/crm/plan/getPlan";
import {onPullDownRefresh} from "@dcloudio/uni-app";
// const currentYear = new Date().getFullYear();
const currentMonth = new Date().getMonth() + 1;
@@ -116,10 +118,13 @@ const navBarPaddingTop = ref(0);
onMounted(() => {
navBarPaddingTop.value = getNavBarPaddingTop() * 2;
uni.showLoading({})
getPlanList().then(res=>{
getPlanList().then(res => {
let {total, rows} = res;
console.log(rows, "周计划数据获取成功")
console.log(total, rows, "周计划数据获取成功")
list.value = rows;
}).catch((err) => {
console.warn(err, "周计划数据获取失败")
}).finally(() => {
uni.hideLoading();
})
})
@@ -140,22 +145,21 @@ let searchValue = ref({
// 查询列表
let list = ref([]);
const mescrollRef = ref(null);
const upOption = ref({
page: {num: 0, size: 10},
noMoreSize: 5,
empty: {tip: '~ 空空如也 ~'},
textLoading: '加载中...',
textNoMore: '已经到底了'
onPullDownRefresh(() => {
getPlanList().then(res => {
const {rows} = res;
list.value = rows;
console.log(rows,'刷新周计划成功');
}).finally(()=>{
uni.stopPullDownRefresh();
})
});
const downOption = ref({
auto: true,
textInOffset: '下拉刷新',
textOutOffset: '释放更新',
textLoading: '刷新中...'
});
let cssFlag = ref(false);//控制样式
// 查询当前周一周日期
const aweek = getWeek2('本周');
const getWeek = (i) => {
return aweek[OrdinalDate[i]].substring(7)
}
// 获取数据列表
const getPlanList = (month, date, pageIndex, pageSize) => {
@@ -187,20 +191,17 @@ let bindDateChange = (e) => {
let handleSearch = () => {
console.log(searchValue.value, '查询参数')
uni.showLoading();
getWeekPlanListByDate(searchValue.value).then(res=>{
const {total, rows } = res;
getWeekPlanListByDate(searchValue.value).then(res => {
const {total, rows} = res;
list.value = rows;
console.log(rows, '查询成功');
}).catch(err=>{
console.warn(err,'数据获取失败');
}).finally(()=>{
}).catch(err => {
console.warn(err, '数据获取失败');
}).finally(() => {
uni.hideLoading();
})
}
const mescrollInit = (mescroll) => {
cssFlag.value = true;
mescrollRef.value = mescroll;
};
// 搜索区域变更
const bindPickerChange = (e) => {
// console.log('picker发送选择改变携带值为', peopleIndex.value)
@@ -216,7 +217,7 @@ let handleDetail = (rowIndex, colIndex) => {
let workDate = detail[OrdinalDate[colIndex]];
let workType = detail[WorkType[colIndex]];
let workEvent = detail[WorkEvent[colIndex]];
if(workType && workEvent){
if (workType && workEvent) {
uni.showModal({
title: `${workDate}\n${workType}`,
content: `${workEvent}`,
@@ -231,8 +232,7 @@ let handleDetail = (rowIndex, colIndex) => {
}
}
})
}
else{
} else {
uni.showToast({
title: "暂无内容",
icon: "none",
@@ -366,10 +366,12 @@ let handleDetail = (rowIndex, colIndex) => {
margin: 20rpx 0 0 0;
border-radius: 8px 8px 0 0;
/* #ifdef APP-PLUS */
min-height: calc(100vh - 160rpx/*.topbar height*/ - 68rpx/*.search height*/ - 40rpx/*.white-bg padding-top*/ - 40rpx/*.white-bg padding-bottom*/);
min-height: calc(100vh - 160rpx/*.topbar height*/ - 68rpx/*.search height*/ - 40rpx/*.white-bg padding-top*/ - 40rpx /*.white-bg padding-bottom*/
);
/* #endif */
/* #ifndef APP-PLUS */
min-height: calc(100vh - 116rpx/*.topbar height*/ - 68rpx/*.search height*/ - 40rpx/*.white-bg padding-top*/ - 40rpx/*.white-bg padding-bottom*/);
min-height: calc(100vh - 116rpx/*.topbar height*/ - 68rpx/*.search height*/ - 40rpx/*.white-bg padding-top*/ - 40rpx /*.white-bg padding-bottom*/
);
/* #endif */
//overflow-y: auto;
}
@@ -394,6 +396,7 @@ let handleDetail = (rowIndex, colIndex) => {
:deep(.form-con .uni-forms-item) {
margin-bottom: 22px !important;
}
/*.con-bg {
height: 420rpx;
}*/