Compare commits

2 Commits

Author SHA1 Message Date
PC-202311141343\Administrator
6cb3944a86 处理冲突 2025-08-29 14:51:05 +08:00
PC-202311141343\Administrator
8739cb4a34 整体提交 2025-08-29 14:43:12 +08:00
18 changed files with 423 additions and 571 deletions

View File

@@ -1,9 +0,0 @@
{
"version" : "1.0",
"configurations" : [
{
"playground" : "custom",
"type" : "uni-app:app-android"
}
]
}

View File

@@ -1,29 +0,0 @@
{
"name": "TmSafeSaveFileModule隐私数据保存",
"id": "Tm-TmSafeSaveFileModule",
"version": "1.0.0",
"description": "TmSafeSaveFileModule隐私数据保存",
"_dp_type": "nativeplugin",
"_dp_nativeplugin": {
"android": {
"plugins": [
{
"type": "module",
"name": "Tm-TmSafeSaveFileModule",
"class": "io.dcloud.uniplugin.safesave.TmSafeSaveFileModule"
}
],
"abis": [
"armeabi-v7a",
"x86"
],
"minSdkVersion": "26",
"integrateType": "aar",
"dependencies": [
"androidx.security:security-crypto:1.1.0-alpha06"
],
"permissions": [
]
}
}
}

View File

@@ -93,7 +93,7 @@ export function viewingMarketInfgetDetail(data) {
//市场信审核列表接口 //市场信审核列表接口
export function approvalMarketInfget(data) { export function approvalMarketInfget(data) {
return request.get({ return request.get({
url: 'app/informationMarketInformation/Approval', url: '/crm/app/informationMarketInformation/Approval',
data data
},{ },{
isTransformResponse:false isTransformResponse:false

View File

@@ -25,7 +25,7 @@ export function saveappCrmCusUserNew(params){
// 查询业务员名下所有的客户 // 查询业务员名下所有的客户
export function SearchForAllCustomersSalesperson(params){ export function SearchForAllCustomersSalesperson(params){
return request.get({ return request.get({
url: 'app/appCrmCusUserNewController/SearchForAllCustomersSalesperson', url: '/crm/app/appCrmCusUserNewController/SearchForAllCustomersSalesperson',
data: params data: params
},{isTransformResponse: false}) },{isTransformResponse: false})
} }

View File

@@ -111,7 +111,7 @@ const active = ref(false); // 组件是否激活,
let changevalue = reactive([]); let changevalue = reactive([]);
let realValue = reactive([]); let realValue = reactive([]);
onMounted(() => { onMounted(() => {
// init(); init();
}); });
// 初始化函数 // 初始化函数

View File

@@ -1,7 +1,7 @@
{ {
"id" : "H5E705637", "id" : "H5E705637",
"name" : "718友晟", "name" : "app",
"appid" : "__UNI__4C459F4", // "appid" : "H5E705637",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
@@ -16,7 +16,7 @@
"compilerVersion" : 3, "compilerVersion" : 3,
"splashscreen" : { "splashscreen" : {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender" : true,
"waiting" : false, // 是否显示等待界面 "waiting" : false,// 是否显示等待界面
"autoclose" : true, "autoclose" : true,
"delay" : 0 "delay" : 0
}, },
@@ -43,9 +43,6 @@
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
], ],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ],
"minSdkVersion" : 26,
"targetSdkVersion" : 35,
"icons" : { "icons" : {
"android" : { "android" : {
"hdpi" : "static/icons/72x72.png", "hdpi" : "static/icons/72x72.png",
@@ -56,27 +53,9 @@
} }
}, },
/* ios */ /* ios */
"ios" : { "ios" : {},
"dSYMs" : false
},
/* SDK */ /* SDK */
"sdkConfigs" : {} "sdkConfigs" : {}
},
"nativePlugins" : {
"Tm-TmSafeSaveFileModule" : {
"__plugin_info__" : {
"name" : "TmSafeSaveFileModule隐私数据保存",
"description" : "TmSafeSaveFileModule隐私数据保存",
"platforms" : "Android",
"url" : "",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {}
}
}
} }
}, },
/* */ /* */
@@ -105,8 +84,8 @@
"h5" : { "h5" : {
"router" : { "router" : {
"base" : "" "base" : ""
/*,"mode": "history" H5 */
}, },
/*,"mode": "history" H5 */
"template" : "index.html" "template" : "index.html"
} }
} }

View File

@@ -1,170 +1,256 @@
<template> <template>
<view class="con-body"> <view class="con-body">
<view > <view class="con-bg">
<!-- 头部 --> <!-- 头部 -->
<customHeader ref="customHeaderRef" :title="'选择客户单位'" :leftFlag="true" :rightFlag="false"> <customHeader ref="customHeaderRef" :title="'客户名称列表'" :leftFlag="true" :rightFlag="false">
</customHeader> <template #right>
<!-- 高度来避免头部遮挡 --> <view class="head-right" @click="handleAdd">
<view class="top-height"></view> <uni-icons type="plus" size="24" color="#B7D2FF"></uni-icons>
<uni-easyinput prefixIcon="search" v-model="searchContent" placeholder="请输入客户单位名称" clearable 新增
@iconClick="iconClick"> </view>
</uni-easyinput> </template>
</customHeader>
<!-- 高度来避免头部遮挡 -->
<view class="inner-box"> <view class="top-height" :style="{ paddingTop: navBarPaddingTop + 'px' }"></view>
<view class="list-cont">
<radio-group class="block" @change="radioChange">
<view class="item" v-for="(item, index) in dataList">
<radio class='radio' :value="index" ></radio>
<view class="name">{{item.cusName+""+item.shortName+""}}</view>
</view>
</radio-group>
</view>
</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" @clear="searchValue=''"
/>
<!-- <button type="default" @click="searchValue=''" size="mini" class="btn-search">清空</button>-->
</view> </view>
<!-- 分页部分 -->
<mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
:up="upOption" :down="downOption" :fixed="false" textColor="#ffffff" bgColor="#ffffff"
class="scroll-h" :class="{'loading-scroll':cssFlag}"
><!-- @down="downCallback"-->
<radio-group class="block" @change="radioChange">
<view class="white-bg" v-for="(item, index) in list" :key="index" @click="handleDetail(item)">
<radio class='radio'
:class="index === selectIndex ? 'checked' : ''"
:checked="index === selectIndex"
:value="index+''">
</radio>
<view class="report-list">
<view class="title">{{ item.cusName }}</view>
<!-- <view class="r-list">
<view class="r-name">{{ item.shortName }}</view>
<view class="r-right btn-orange" size="mini">{{ item.statusName }}</view>
</view>-->
<view class="border-bottom"></view>
<!-- <view class="r-list">
<view class="r-left">日期</view>
<view class="r-right">{{ new Date(item.createTime).toLocaleDateString()}}</view>
</view>-->
</view>
</view>
</radio-group>
</mescroll-uni>
</view>
</view> </view>
</view>
</template> </template>
<script setup> <script setup>
import {ref, onMounted, getCurrentInstance, watch} from 'vue'
import customHeader from '@/components/customHeader.vue' import customHeader from '@/components/customHeader.vue'
import { getYsCustomerList } from '../../../api/crm/api_ys.js' import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
import { onMounted, reactive, ref, watch } from 'vue' import {getNavBarPaddingTop} from '@/utils/system.js'
import { onLoad } from '@dcloudio/uni-app' import {onLoad} from "@dcloudio/uni-app";
import { useMessage } from '../../../utils/message.js' import {getCustomerList} from "@/api/crm/customer/getCustomer";
let instance = null;
// 获取导航栏高度用于内容区域padding
const navBarPaddingTop = ref(0);
// 查询列表
let list = ref([]);
const mescrollRef = ref(null);
let searchValue = ref('')
let cssFlag=ref(false);//控制样式
const message = useMessage(); const upOption = ref({
page: { num: 0, size: 10 },
noMoreSize: 5,
empty: {
tip: '~ 空空如也 ~',
icon: "../../static/images/mescroll-empty.png"
},
textLoading: '加载中...',
textNoMore: '已经到底了'
});
//点击查询客户人员 const downOption = ref({
const queryParams = ref({ auto: true,
cusName: '', textInOffset: '下拉刷新',
nickName:'', textOutOffset: '释放更新',
pageNum: 1, textLoading: '刷新中...'
pageSize: 10 });
})
const mescrollInit = (mescroll) => {
cssFlag.value = true;
mescrollRef.value = mescroll;
};
onMounted(() => { onMounted(() => {
navBarPaddingTop.value = getNavBarPaddingTop() * 2;
}) })
onLoad(options => {
queryParams.value.cusName = options.cusName onLoad((options)=>{
instance = getCurrentInstance().proxy;
const eventChannel = instance.getOpenerEventChannel();
eventChannel.on('requestCusList', async (res) => {
let {cusName} = res.data;
// console.log(cusName, "客户选择页读取到参数");
searchValue.value = cusName;
})
}) })
const dataList = ref([])
let timerId = null;
// 搜索
watch(searchValue, (newValue, oldValue) => {
// console.log(`新值: ${newValue}, 旧值: ${oldValue}`);
if(timerId) clearTimeout(timerId);
timerId = setTimeout(async ()=>{
handleSearch();
clearTimeout(timerId);
timerId = null;
}, 500);
});
// 下拉刷新
const downCallback = async (mescroll) => {
//查询某一客户人员 try {
let searchContent = ref('') const res = await getList(1, upOption.value.page.size);
list.value = res.list;
function iconClick() { // 正确结束下拉刷新状态
message.toast('点击了查询,当前内容:' + searchContent.value) mescroll.endSuccess(res.list.length, res.total >= upOption.value.page.size);
} catch (error) {
console.log(error)
// 发生错误时结束下拉刷新
mescroll.endErr();
}
} }
//监视查询的内容的变化 // 上拉加载更多
let queryCusForm = reactive({}) const upCallback = async (mescroll) => {
watch(searchContent,(newValue,oldValue)=>{ try {
console.log("输入内容:",searchContent.value) const res = await getList(mescroll.num, mescroll.size);
queryCusForm.cusName = searchContent.value if (mescroll.num === 1) {
getYsCustomerList(queryCusForm).then(res=>{ list.value = res.list;
dataList.value = res.rows } else {
}) list.value.push(...res.list);
}) }
// 正确结束上拉加载状态
function radioChange(event) { mescroll.endSuccess(res.list.length, res.list.length >= mescroll.size);
const selectedIndex = event.detail.value } catch (error) {
let test = dataList.value[selectedIndex] console.log(error)
// 发送全局事件 // 发生错误时结束上拉加载
uni.$emit('onCustomerSelected', test) mescroll.endErr();
let cusName = test.cusName;//客户名称 }
let cusId = test.cusId;//客户ID
uni.navigateBack()//返回上一页
} }
// 查询搜索跳转
let handleSearch = async () => {
// 触发下拉刷新以重新加载数据
if (mescrollRef.value) {
cssFlag.value = true;
uni.showLoading()
await downCallback(mescrollRef.value.mescroll);
uni.hideLoading()
cssFlag.value = false;
}
}
// 获取数据列表
const getList = async (pageIndex, pageSize) => {
let param = {
pageNum: pageIndex,
pageSize,
cusName: searchValue.value
}
let { rows, total } = await getCustomerList(param)
return {list: rows, total};
}
// 选中项的索引号
const selectIndex = ref(null);
const radioChange = (e) => {
let {value} = e.detail; // index
// console.log(value);
const eventChannel = instance.getOpenerEventChannel();
eventChannel.emit('onCustomerSelected', list.value[value]);
uni.navigateBack()
}
</script> </script>
<style scoped lang="scss"> <style lang="scss" scoped>
.all-body {
.con-body{ /* #ifdef APP-PLUS */
background: white; top: 150rpx;
height: calc(100vh - 75px);
/* #endif */
/* #ifndef APP-PLUS */
top: 120rpx;
height: calc(100vh);
/* #endif */
} }
.search .btn-search {
/* Container for the checkbox group */ border: none;
.checkbox-group.block { background: none;
width: 100%; line-height: normal;
color: #fff;
line-height: 56rpx !important;
padding: 10rpx 0 0;
text-align: left;
cursor: pointer;
} }
/* Each item row */ .search .btn-search::after {
.itemClass { display: none;
display: flex;
align-items: center;
padding: 10rpx 0;
margin-left: 15rpx;
border-bottom: 1px solid #eee;
/* optional divider */
} }
/* Checkbox styling */ .scroll-h {
.checkBoxClass { /* #ifdef APP-PLUS */
margin-right: 12rpx; height: calc(100vh - 120px);
/* #endif */
/* #ifndef APP-PLUS */
height: calc(100vh - 110px);
/* #endif */
} }
/* Content container */ .white-bg {
.clientClass { //padding-bottom:10rpx;
flex: 1; margin-bottom: 0;
display: flex; overflow: hidden;
align-items: center;
flex-wrap: wrap;
font-size: 36rpx;
color: #333;
/* default text color */
}
/* Blue username text */
.blue-text {
/* or any blue you prefer */
margin-right: 5rpx;
}
.inner-box {
width: 100%;
padding: 10px;
box-sizing: border-box;
}
.list-cont {
width: 100%;
}
.block {
width: 100%;
}
.item {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 12px 0;
border-bottom: 1px solid #eee;
} }
.radio { .radio {
margin-right: 12px; padding-right: 20rpx;
transform: scale(0.9);
} }
.name { .title {
flex: 1; font-size: 32rpx;
font-size: 16px; line-height: 48rpx;
color: #333;
} }
.checked { .report-list {
color: #007AFF; /* 选中状态的颜色 */ width: calc(100% - 70rpx);
//background-color: pink;
}
.border-bottom {
margin-top: 6rpx;
} }
</style> </style>

View File

@@ -17,7 +17,7 @@
<view class="all-body"> <view class="all-body">
<!-- 搜索 @blur="blur" @focus="focus" @input="input" @cancel="cancel" @clear="clear"--> <!-- 搜索 @blur="blur" @focus="focus" @input="input" @cancel="cancel" @clear="clear"-->
<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"
@clear="clearSearchValue" @clear="clearSearchValue"
v-model="searchValue" v-model="searchValue"

View File

@@ -10,18 +10,18 @@
<!-- 正文内容 --> <!-- 正文内容 -->
<view> <view>
<!-- 搜索 --> <!-- 搜索 -->
<!-- <view class="search">--> <view class="search">
<!-- <picker mode="date" :value="defaultDate" :start="startDate" :end="endDate" @change="bindDateChange"--> <picker mode="date" :value="defaultDate" :start="startDate" :end="endDate" @change="bindDateChange"
<!-- class="picker-bg">--> class="picker-bg">
<!-- <view class="picker">--> <view class="picker">
<!-- <uni-icons custom-prefix="iconfont" color="#ffffff" type="icon-phoneshizhong"--> <uni-icons custom-prefix="iconfont" color="#ffffff" type="icon-phoneshizhong"
<!-- size="18"></uni-icons>--> size="18"></uni-icons>
<!-- <view>{{ defaultDate }}</view>--> <view>{{ defaultDate }}</view>
<!-- <uni-icons type="down" size="18"></uni-icons>--> <uni-icons type="down" size="18"></uni-icons>
<!-- </view>--> </view>
<!-- </picker>--> </picker>
<!-- <button type="default" @click="handleSearch" size="mini" class="btn-search">查询</button>--> <button type="default" @click="handleSearch" size="mini" class="btn-search">查询</button>
<!-- </view>--> </view>
<!-- 分页部分 --> <!-- 分页部分 -->
<view class="white-bg margin-bottom20" v-for="(item, index) in list"> <view class="white-bg margin-bottom20" v-for="(item, index) in list">

View File

@@ -95,12 +95,7 @@ import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app' import { onLoad } from '@dcloudio/uni-app'
import customHeader from '@/components/customHeader.vue' import customHeader from '@/components/customHeader.vue'
import customTabs from '@/components/customTabs.vue'; import customTabs from '@/components/customTabs.vue';
import { import { auditActivityReport, getVisistDetailList, getYsVisistInfo } from '../../../../api/crm/activity/activity';
auditActivityReport,
getRejectReason,
getVisistDetailList,
getYsVisistInfo
} from '../../../../api/crm/activity/activity';
let visistId = ref(0) let visistId = ref(0)
@@ -132,38 +127,10 @@ const activeTab = ref(0);//默认报告明细
const tabList = ['报告明细']; const tabList = ['报告明细'];
//点击驳回 //点击驳回
// 修正后的驳回方法 function refuse() {
const refuse = async () => { uni.navigateTo({
uni.showModal({ url: './auditReject?visistId=' + visistId.value
title: '驳回原因', })
content: '',
editable: true,
success: async function (modalRes) { // 使用modalRes避免重名
if (modalRes.confirm) {
try {
const param = {
visistId: visistId.value,
rejectReason: modalRes.content // 用户输入的驳回原因
};
const apiRes = await getRejectReason(param); // 避免与modalRes重名
uni.showToast({
title: '驳回成功',
icon: 'success'
});
// 操作完成后返回
setTimeout(() => {
uni.navigateBack(1);
}, 800);
} catch (err) {
console.log('驳回失败:', err);
uni.showToast({
title: '驳回失败',
icon: 'error'
});
}
}
}
});
} }
//点击通过 //点击通过
@@ -178,7 +145,7 @@ function adopt(item) {
reportStaffName: item.staffName, reportStaffName: item.staffName,
}).then(res => { }).then(res => {
if (res.code == 200) { if (res.code == 200) {
mescroll.resetUpScroll() // that.mescroll.resetUpScroll()
} else { } else {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@@ -186,10 +153,6 @@ function adopt(item) {
}); });
} }
}) })
uni.navigateBack({
})
} }
} }

View File

@@ -79,7 +79,6 @@ import customHeader from '@/components/customHeader.vue'
import MescrollUni from 'mescroll-uni/mescroll-uni.vue'; import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
import { getNavBarPaddingTop } from '@/utils/system.js' import { getNavBarPaddingTop } from '@/utils/system.js'
import { getYsVisistList, removeVisist, updateStatus } from '../../../../api/crm/activity/activity'; import { getYsVisistList, removeVisist, updateStatus } from '../../../../api/crm/activity/activity';
import {onHide, onShow} from "@dcloudio/uni-app";
// 获取导航栏高度用于内容区域padding // 获取导航栏高度用于内容区域padding
const navBarPaddingTop = ref(0); const navBarPaddingTop = ref(0);
@@ -87,10 +86,6 @@ onMounted(() => {
navBarPaddingTop.value = getNavBarPaddingTop() * 2; navBarPaddingTop.value = getNavBarPaddingTop() * 2;
}) })
onShow(()=>{
getList()
})
// 查询列表 // 查询列表
let list = ref([]); let list = ref([]);
@@ -215,13 +210,6 @@ const getVisitorReportList = (pageNum, pageSize) => {
}); });
} }
//页面数据方法
function getList(){
getYsVisistList({pageNum: 1, pageSize: 10}).then(res=>{
list.value=res.rows;
})
}
let Loop = ref(0) let Loop = ref(0)
let now let now
@@ -264,7 +252,7 @@ function touchstart(item) {
}); });
} }
// 刷新内容 // 刷新内容
downCallback(mescrollRef.value.mescroll); upCallback()
}); });
} }
} }
@@ -273,10 +261,6 @@ function touchstart(item) {
} }
onHide(()=>{
clearInterval(Loop.value); //再次清空定时器,防止重复注册定时器
})
function touchend() { function touchend() {
let endDate = new Date(); let endDate = new Date();
console.log('结束时间', endDate) console.log('结束时间', endDate)

View File

@@ -1,348 +1,226 @@
<template> <template>
<view class="con-body"> <view class="con-body">
<view class="con-bg"> <view class="con-bg">
<!-- 头部 --> <!-- 头部 -->
<customHeader <customHeader ref="customHeaderRef" :title="'走访查看'" :leftFlag="true" :rightFlag="false"></customHeader>
ref="customHeaderRef" <!-- 高度来避免头部遮挡 -->
:title="!searchShow?'走访查看':'走访搜索'" <view class="top-height" :style="{ paddingTop: navBarPaddingTop + 'px' }"></view>
:leftFlag="true"
:rightFlag="false"
@back="handleBack" :searchType="searchShow?1:undefined"
></customHeader>
<!-- 高度来避免头部遮挡 -->
<view class="top-height" :style="{ paddingTop: navBarPaddingTop + 'px' }"></view>
<!-- 正文内容 --> <!-- 正文内容 -->
<view class="all-body"> <view class="all-body">
<!-- 搜索处理 --> <!-- 搜索 @blur="blur" @focus="focus" @input="input" @cancel="cancel" @clear="clear"-->
<customSearch v-if="searchShow" :searchKeywords="searchText" :searchType="searchTypeObj" <view class="search">
:checkTypeObj="notictTypeCheck" :searchTypeList="noticeTypeList" @confirm="handleSearchConfirm"> <uni-search-bar class="custom-search" radius="28" placeholder="请输入客户名称" clearButton="auto"
</customSearch> cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff" v-model="searchValue" />
<view class="search" v-else @click="handleSearchFocus"> <button type="default" @click="handleSearch" size="mini" class="btn-search">查询</button>
<view class="search-bg"> </view>
<view class="search-left">{{ notictTypeCheck.name ? notictTypeCheck.name : '全部' }}</view>
<view class="search-right">
<input class="uni-input" v-model="inputval" placeholder="请输入您想查询的内容"
placeholder-class="search-color"/>
</view>
</view>
</view>
<!-- 分页部分 --> <!-- 分页部分 -->
<mescroll-uni ref="mescrollRef" v-if="!searchShow" @init="mescrollInit" @down="downCallback" @up="upCallback" <mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
:up="upOption" :down="downOption" :fixed="false" textColor="#ffffff" bgColor="#ffffff" :up="upOption" :down="downOption" :fixed="false" textColor="#ffffff" bgColor="#ffffff"
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"
@click="showDetail(item)"> @click="showDetail(item)">
<view> <view>
<view class="report-list"> <view class="report-list">
<view class="title">客户{{ item.cusName }}</view> <view class="title">客户{{ item.cusName }}</view>
<view class="r-list"> <view class="r-list">
<view class="r-name">{{ item.visistCode }}</view> <view class="r-name">{{ item.visistCode }}</view>
<view> <view>
<view <view
:class="item.myselfBrowsing == 0 ? 'r-right btn-orange' : 'r-right btn-blue'" :class="item.myselfBrowsing == 0 ? 'r-right btn-orange' : 'r-right btn-blue'"
size="mini"> size="mini">
{{ item.myselfBrowsing == 0 ? '未读' : '已读' }} {{ item.myselfBrowsing == 0 ? '未读' : '已读' }}
</view>
</view>
</view>
<view class="border-bottom"></view>
<view class="r-list">
<view class="r-left">报告类型</view>
<view class="r-right">{{ item.visistType === "业务招待" ? "Ⅱ类活动" : "走访报告" }}</view>
</view>
<view class="r-list" v-if="item.joinUser != null">
<view class="r-left">我方领导</view>
<view class="r-right">{{ item.joinUser }}</view>
</view>
<view class="border-bottom"></view>
<view class="r-list">
<view class="r-left">报告人</view>
<view class="r-right">{{ item.staffName }}</view>
</view>
<view class="border-bottom"></view>
<view class="r-list">
<view class="r-left">报告日期</view>
<view class="r-right">{{ item.visistDate }}</view>
</view>
</view>
</view>
</view> </view>
</view> </mescroll-uni>
</view>
<view class="border-bottom"></view>
<view class="r-list">
<view class="r-left">报告类型</view>
<view class="r-right">{{ item.visistType === "业务招待" ? "Ⅱ类活动" : "走访报告" }}</view>
</view>
<view class="r-list" v-if="item.joinUser != null">
<view class="r-left">我方领导</view>
<view class="r-right">{{ item.joinUser }}</view>
</view>
<view class="border-bottom"></view>
<view class="r-list">
<view class="r-left">报告人</view>
<view class="r-right">{{ item.staffName }}</view>
</view>
<view class="border-bottom"></view>
<view class="r-list">
<view class="r-left">报告日期</view>
<view class="r-right">{{ item.visistDate }}</view>
</view>
</view>
</view> </view>
</view> </view>
</mescroll-uni>
</view>
</view> </view>
</view>
</template> </template>
<script setup> <script setup>
import {ref, reactive, onMounted, watch} from 'vue'
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
import {getNavBarPaddingTop} from '@/utils/system.js'
import {getQueryVisistList} from '../../../../api/crm/activity/activity';
import {onHide, onShow} from "@dcloudio/uni-app";
import customHeader from '@/components/customHeader.vue' import customHeader from '@/components/customHeader.vue'
import customSearch from '@/components/customSearch.vue' import { ref, reactive, onMounted } from 'vue'
// 搜索处理 import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
let searchShow = ref(false); import { getNavBarPaddingTop } from '@/utils/system.js'
let searchText = ref(undefined); import { getQueryVisistList } from '../../../../api/crm/activity/activity';
let notictTypeCheck = ref({}); //选中类型 import {onShow} from "@dcloudio/uni-app";
// 新增状态变量存储搜索条件
const selValue = ref(''); // 搜索类型名称
const inputval = ref(''); // 搜索内容
//点击查询方法,搜索当前报告信息
let searchValue = ref(null)
let noticeTypeList = ref([{
id: 1,
name: '客户全称'
},
{
id: 2,
name: '客户简称'
},
{
id: 3,
name: '业务员名称'
},
{
id: 4,
name: '活动单号'
},
{
id: 5,
name: '活动内容'
},
{
id: 6,
name: '模糊搜索'
},
{
id: 7,
name: '未读内容'
}
]);
// 搜索返回操作
const handleBack=()=>{
searchShow.value=false;
}
// 获取input 焦点跳转
const handleSearchFocus = () => {
searchShow.value = true;
}
let searchTypeObj = ref({
typeId: 3,
typeName: '消息类型'
});
// 搜索完返回处理
const handleSearchConfirm = (param1, param2) => {
notictTypeCheck.value = param1.value;
inputval.value = param2.value || '';
selValue.value = param1.value.name || '';
searchValue.value = param2.value;
console.log("selValue" + selValue.value)
console.log("inputval" + inputval.value)
// 重置mescroll触发刷新
if (mescrollRef.value) {
mescrollRef.value.resetUpScroll();
}
searchShow.value = false;
}
//监视查询的内容的变化 onShow(()=>{
// watch(searchValue, (newValue, oldValue) => { downCallback(mescrollRef.value.mescroll)
// //变化了之后,重新查询内容
// var data = {
// pageNum: 1,
// pageSize: 10,
// };
// getQueryVisistList(data).then(res => {
// if (res.code == 200) {
// //设置列表数据
// list.value = res.rows;
// }
// })
// })
onHide(()=>{
searchShow.value=false;
}) })
//====================
// onShow(() => {
// getList();
// })
let list = ref([]) let list = ref([])
let queryParams = reactive({ let queryParams = reactive({
selValue: '' selValue: ''
}) })
// 获取导航栏高度用于内容区域padding // 获取导航栏高度用于内容区域padding
const navBarPaddingTop = ref(0); const navBarPaddingTop = ref(0);
onMounted(() => { onMounted(() => {
navBarPaddingTop.value = getNavBarPaddingTop() * 2; navBarPaddingTop.value = getNavBarPaddingTop() * 2;
}) })
let cssFlag = ref(false);//控制样式 let cssFlag = ref(false);//控制样式
let mescrollRef = ref(null); let mescrollRef = ref(null);
const mescrollInit = (mescroll) => { const mescrollInit = (mescroll) => {
cssFlag.value = true; cssFlag.value = true;
mescrollRef.value = mescroll; mescrollRef.value = mescroll;
}; };
// 下拉刷新 // 下拉刷新
const downCallback = async (mescroll) => { const downCallback = async (mescroll) => {
try { try {
setTimeout(async () => { setTimeout(async () => {
queryParams.pageNum = 1; queryParams.pageNum = 1;
queryParams.pageSize = upOption.value.page.size; queryParams.pageSize = upOption.value.page.size;
//获取当前页的信息 //获取当前页的信息
const res = await getViewReportList(1, upOption.value.page.size) const res = await getQueryVisistList(queryParams)
cssFlag.value = false; cssFlag.value = false;
list.value = res.rows; list.value = res.rows;
}, 500); mescroll.resetUpScroll();
} catch (error) { }, 500);
mescroll.endErr(); } catch (error) {
} finally { mescroll.endErr();
setTimeout(async () => { } finally {
mescroll.endSuccess(); setTimeout(async () => {
}, 500); mescroll.endSuccess();
} }, 500);
}
} }
// 上拉加载更多 // 上拉加载更多
const upCallback = async (mescroll) => { const upCallback = async (mescroll) => {
try { try {
setTimeout(async () => { setTimeout(async () => {
const res = await getViewReportList(mescroll.num, mescroll.size, selValue.value, queryParams.pageNum = 1;
inputval.value); queryParams.pageSize = upOption.value.page.size;
if (mescroll.num === 1) { const res = await getQueryVisistList(queryParams);
list.value = res.list; if (mescroll.num === 1) {
} else { list.value = res.rows;
list.value.push(...res.list); } else {
} list.value.push(...res.rows);
mescroll.endBySize(list.value.length, res.total); }
}, 500); mescroll.endBySize(res.rows.length, res.total);
} catch (error) { }, 500);
mescroll.endErr(); } catch (error) {
} mescroll.endErr();
}
function getList() {
queryParams.pageNum = 1;
queryParams.pageSize = upOption.value.page.size;
getQueryVisistList(queryParams).then(res => {
list.value = res.rows;
})
}
// 获取数据列表
const getViewReportList = (pageNum, pageSize) => {
return new Promise(async (resolve) => {
let param = {
pageNum,
pageSize,
// 添加搜索条件参数
selValue: selValue.value,
inputval: inputval.value
} }
let res = await getQueryVisistList(param);
resolve({
list: res.rows,
total: res.total
});
});
} }
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: '已经到底了'
}); });
const downOption = ref({ const downOption = ref({
auto: true, auto: true,
textInOffset: '下拉刷新', textInOffset: '下拉刷新',
textOutOffset: '释放更新', textOutOffset: '释放更新',
textLoading: '刷新中...' textLoading: '刷新中...'
}); });
//点击某一个进入查看明细信息 //点击某一个进入查看明细信息
function showDetail(item) { function showDetail(item) {
uni.navigateTo({ uni.navigateTo({
url: './visitReportDetail?visistId=' + item.visistId url: './visitReportDetail?visistId=' + item.visistId
}) })
} }
//点击查询方法,搜索当前报告信息
let searchValue = ref()
// function handleSearch() { function handleSearch() {
// queryParams.inputval = searchValue.value queryParams.inputval = searchValue.value
// downCallback(mescrollRef.value.mescroll); downCallback(mescrollRef.value.mescroll);
// } }
</script> </script>
<style scoped> <style scoped>
.all-body { .all-body {
/* #ifdef APP-PLUS */ /* #ifdef APP-PLUS */
top: 150rpx; top: 150rpx;
height: calc(100vh - 75px); height: calc(100vh - 75px);
/* #endif */ /* #endif */
/* #ifndef APP-PLUS */ /* #ifndef APP-PLUS */
top: 120rpx; top: 120rpx;
height: calc(100vh); height: calc(100vh);
/* #endif */ /* #endif */
} }
.search { .search {
display: flex; display: flex;
} }
.search .btn-search { .search .btn-search {
border: none; border: none;
background: none; background: none;
line-height: normal; line-height: normal;
color: #fff; color: #fff;
line-height: 56rpx !important; line-height: 56rpx !important;
padding: 10rpx 0 0; padding: 10rpx 0 0;
text-align: left; text-align: left;
cursor: pointer; cursor: pointer;
} }
.search .btn-search::after { .search .btn-search::after {
display: none; display: none;
} }
.search .custom-search { .search .custom-search {
width: 80%; width: 80%;
} }
.search .custom-search.uni-searchbar { .search .custom-search.uni-searchbar {
padding-right: 0 !important; padding-right: 0 !important;
} }
.scroll-h { .scroll-h {
/* #ifdef APP-PLUS */ /* #ifdef APP-PLUS */
height: calc(100vh - 120px); height: calc(100vh - 120px);
/* #endif */ /* #endif */
/* #ifndef APP-PLUS */ /* #ifndef APP-PLUS */
height: calc(100vh - 110px); height: calc(100vh - 110px);
/* #endif */ /* #endif */
} }
.white-bg { .white-bg {
padding-bottom: 10rpx; padding-bottom: 10rpx;
} }
</style> </style>

View File

@@ -69,10 +69,7 @@
class="uni-forms-item is-direction-top is-top"> class="uni-forms-item is-direction-top is-top">
<multipleSelect :multiple="true" :value="chooseMyLeaderList" downInner <multipleSelect :multiple="true" :value="chooseMyLeaderList" downInner
:options="myLeaderList" :options="myLeaderList" @change="changeValue2" :key="Math.round()" :slabel="'text'">
@change="changeValue2" :key="Math.round()"
:slabel="'text'"
>
</multipleSelect> </multipleSelect>
</uni-forms-item> </uni-forms-item>
@@ -141,9 +138,7 @@ const submitForm = async () => {
icon: 'success' icon: 'success'
}); });
saveVisistReportForm.cusId = formData.value.cusId saveVisistReportForm.cusId = formData.value.cusId
if (Array.isArray(formData.value.leader)) { saveVisistReportForm.joinUser = formData.value.leader.map(item => item.text).join(',')
saveVisistReportForm.joinUser = formData.value.leader.map(item => item.text).join(',');
}
saveVisistReportForm.visistDate = formData.value.visitDate saveVisistReportForm.visistDate = formData.value.visitDate
saveVisistReportForm.visistType = 'I类活动走访' saveVisistReportForm.visistType = 'I类活动走访'
saveVisistReportForm.mapId = mapId.value saveVisistReportForm.mapId = mapId.value
@@ -254,11 +249,10 @@ function chooseRecord(e) {
.form-con { .form-con {
/* #ifdef APP-PLUS */ /* #ifdef APP-PLUS */
height: calc(100vh - 95px) !important; height: calc(100vh - 100px)
/* #endif */ /* #endif */
/* #ifndef APP-PLUS */ /* #ifndef APP-PLUS */
height:calc(100vh - 68px) !important; /* #endif */
/* #endif */
} }
:deep(.uni-date-x) { :deep(.uni-date-x) {

View File

@@ -17,7 +17,7 @@
<view class="top-height"></view> <view class="top-height"></view>
<view class="week-plan-title"> <view class="week-plan-title">
<view>姓名<strong>{{ userInfo.nickName || userInfo.userName }}</strong></view> <view v-if="userInfo.nickName">姓名<strong>{{ userInfo.nickName || userInfo.userName }}</strong></view>
<view v-if="weekNum"> <view v-if="weekNum">
{{ yearMonth }} {{ yearMonth }}
<view v-if="isThisWeek" style=" display: inline-block;"> <view v-if="isThisWeek" style=" display: inline-block;">
@@ -54,10 +54,11 @@
</view> </view>
</view> </view>
</view> </view>
<view class='bottom-spliter bg-gray'></view>
</block> </block>
<!-- 底部加高度来避免tabbar遮挡 --> <!-- 底部加高度来避免tabbar遮挡 -->
<view class="bottom-height"></view> <!-- <view class="bottom-height bg-gray"></view> -->
</view> </view>
@@ -106,12 +107,12 @@ let getWorkEvent = (index) => {
const refreshPlanList = () => { const refreshPlanList = () => {
message.showLoading(); message.showLoading();
// 获取用户信息 // 获取用户信息
getUserInfo().then(res => { // getUserInfo().then(res => {
userInfo.value = res.user; // userInfo.value = res.user;
console.log(route.path, ":用户信息获取成功"); // console.log(route.path, ":用户信息获取成功");
}).catch(err => { // }).catch(err => {
console.warn(err, "用户信息获取失败") // console.warn(err, "用户信息获取失败")
}); // });
// 获取周计划列表 // 获取周计划列表
getWeeklyPlanList(queryParams.value).then(res => { getWeeklyPlanList(queryParams.value).then(res => {
const {rows} = res; const {rows} = res;
@@ -180,11 +181,11 @@ function handleCreate() {
handlePlanEdit({itemList, selectIndex: result.tapIndex}, true); handlePlanEdit({itemList, selectIndex: result.tapIndex}, true);
}).catch((err) => { }).catch((err) => {
console.warn(err, "已存在周计划") console.warn(err, "已存在周计划")
uni.showToast({ // uni.showToast({
icon: 'error', // icon: 'error',
title: '已有本周或下周计划', // title: '已有本周或下周计划',
duration: 2000 // duration: 2000
}) // })
}) })
// }else{ // 创建下周计划 // }else{ // 创建下周计划
// } // }
@@ -234,7 +235,7 @@ function handleEdit(index) {
// console.log(JSON.stringify(formData)) // console.log(JSON.stringify(formData))
console.log(route.path, formData, "前往修改页面"); console.log(route.path, formData, "前往修改页面");
const editFields = [OrdinalDate[index], WorkType[index], WorkEvent[index]]; const editFields = [OrdinalDate[index], WorkType[index], WorkEvent[index]];
let userName = userInfo.value.nickName || userInfo.value.userName; let userName = null; // userInfo.value.userName || userInfo.value.nickName;
handlePlanEdit({userName, formData, editFields}, false); handlePlanEdit({userName, formData, editFields}, false);
} }
@@ -268,9 +269,14 @@ function handleEdit(index) {
} }
.white-bg.white-bg-2 { .white-bg.white-bg-2 {
margin-bottom: 20rpx; /* margin-bottom: 20rpx; */
}
.bottom-spliter{
height: 20rpx;
}
.bg-gray{
background-color: #f0f0f0;
} }
.report-list .w-b-title .btn-edit { .report-list .w-b-title .btn-edit {
background-color: #5C96F7; background-color: #5C96F7;
} }

View File

@@ -4,7 +4,7 @@
<!-- 头部 --> <!-- 头部 -->
<customHeader ref="customHeaderRef" :title="title" :leftFlag="true" :rightFlag="true"> <customHeader ref="customHeaderRef" :title="title" :leftFlag="true" :rightFlag="true">
<template #right> <template #right>
<view class="head-right" @click="submitForm" v-if="userInfo.nickName || userInfo.userName"> <view class="head-right" @click="submitForm">
<uni-icons custom-prefix="iconfont" type="icon-phonebaocun" size="22" <uni-icons custom-prefix="iconfont" type="icon-phonebaocun" size="22"
color="#B7D2FF"></uni-icons> color="#B7D2FF"></uni-icons>
保存 保存
@@ -16,7 +16,7 @@
<!-- 正文内容 --> <!-- 正文内容 -->
<view class="week-plan-title"> <view class="week-plan-title">
<view>姓名<strong>{{ userInfo.nickName || userInfo.userName }}</strong></view> <view v-if="userInfo.nickName">姓名<strong>{{ userInfo.nickName || userInfo.userName }}</strong></view>
<view>{{ currentEditDate.yearMonth }} <strong>{{ currentEditDate.weekNum }}</strong> </view> <view>{{ currentEditDate.yearMonth }} <strong>{{ currentEditDate.weekNum }}</strong> </view>
</view> </view>
<uni-forms ref="formRef" :model="weekPlanFormData" :rules="rules" label-width="100px" label-position="top"> <uni-forms ref="formRef" :model="weekPlanFormData" :rules="rules" label-width="100px" label-position="top">

View File

@@ -266,7 +266,6 @@ const submitForm = () => {
//h5测试用 内网-sn123456 //h5测试用 内网-sn123456
//公司外网 '9516053c-b441-465b-9781-06e7b8031811' //公司外网 '9516053c-b441-465b-9781-06e7b8031811'
//友晟外网 'b97527c8-2ad4-493c-a01c-5f9d0aabaff2' //友晟外网 'b97527c8-2ad4-493c-a01c-5f9d0aabaff2'
//8f9bbe3b-7f1d-4e7f-9734-6faa6b86350f
param.uniqCode = 'b97527c8-2ad4-493c-a01c-5f9d0aabaff2'; param.uniqCode = 'b97527c8-2ad4-493c-a01c-5f9d0aabaff2';
let res = await login(param); let res = await login(param);
userStore.login(res); userStore.login(res);
@@ -279,7 +278,7 @@ const submitForm = () => {
// 读取设备ID // 读取设备ID
safeSave.getSafeFile({ "key": "app_device_id" }, res3 => { safeSave.getSafeFile({ "key": "app_device_id" }, res3 => {
if (res3.code == 1) { if (res3.code == 1) {
let deviceId = res3.data; let deviceId = res3.data;//'b97527c8-2ad4-493c-a01c-5f9d0aabaff2' //
// showAlert("读取成功=>"+deviceId); // showAlert("读取成功=>"+deviceId);
param.uniqCode = deviceId; param.uniqCode = deviceId;
console.log("param=>",param) console.log("param=>",param)

View File

@@ -13,7 +13,7 @@ const requestHooks = {
requestInterceptorsHook(options, config) { requestInterceptorsHook(options, config) {
// console.log("request=>config=>",config) // console.log("request=>config=>",config)
const { urlPrefix, baseUrl, withToken, isAuth } = config; const { urlPrefix, baseUrl, withToken, isAuth } = config;
options.header = options.header ? options.header:{}; options.header = options.header ?? {};
if (urlPrefix) { if (urlPrefix) {
options.url = `${urlPrefix}${options.url}`; options.url = `${urlPrefix}${options.url}`;
} }
@@ -33,19 +33,20 @@ const requestHooks = {
// console.log("response=>",response) // console.log("response=>",response)
// console.log("response=>config=>",config) // console.log("response=>config=>",config)
const { isTransformResponse, isReturnDefaultResponse, isAuth } = config; const { isTransformResponse, isReturnDefaultResponse, isAuth } = config;
if (isReturnDefaultResponse) { if (isReturnDefaultResponse) {
return response; return response;
} }
if (!isTransformResponse) {
return response.data;
}
// const { logout, isLogin } = useUserStore(); // const { logout, isLogin } = useUserStore();
const { code, data, msg, show } = response.data; const { code, data, msg, show } = response.data;
// console.log(code,data,msg,show)
switch (code) { switch (code) {
case RequestCodeEnum.SUCCESS: case RequestCodeEnum.SUCCESS:
msg && show && message.toast(msg); msg && show && message.toast(msg);
if (!isTransformResponse) { return data;
return response.data;
}else{
return data;
}
case RequestCodeEnum.FAILED: case RequestCodeEnum.FAILED:
message.toast(msg); message.toast(msg);
return Promise.reject(msg); return Promise.reject(msg);