Compare commits
12 Commits
ed827b09af
...
develop-71
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d359e2708 | ||
|
|
a51ecb2fa0 | ||
|
|
9223b619f5 | ||
|
|
63a9a1def5 | ||
|
|
a0ddac37f5 | ||
|
|
92311e0aaf | ||
|
|
3d8df52107 | ||
|
|
8389a78b3a | ||
|
|
1703e5987c | ||
|
|
050ee0fd8c | ||
|
|
64da5061ac | ||
|
|
7034c138f7 |
@@ -3,7 +3,7 @@ import request from "@/utils/request"
|
||||
// 查询客户人员列表
|
||||
export function getCustomerList(params){
|
||||
return request.get({
|
||||
url: '/app/appCustomerIfno/pageList',
|
||||
url: '/crm/app/appCustomerIfno/pageList',
|
||||
data: params
|
||||
},{isTransformResponse: false})
|
||||
}
|
||||
@@ -11,35 +11,35 @@ export function getCustomerList(params){
|
||||
// 查询系统推荐等级
|
||||
export function getCustomerLevel(params){
|
||||
return request.get({
|
||||
url: '/app/appCrmCusUserNewController/queryCustomerLevel',
|
||||
url: '/crm/app/appCrmCusUserNewController/queryCustomerLevel',
|
||||
data: params
|
||||
},{isTransformResponse: false})
|
||||
}
|
||||
// 客户人员新增
|
||||
export function saveappCrmCusUserNew(params){
|
||||
return request.get({
|
||||
url: '/app/appCrmCusUserNewController/add',
|
||||
url: '/crm/app/appCrmCusUserNewController/add',
|
||||
data: params
|
||||
},{isTransformResponse: false})
|
||||
}
|
||||
// 查询业务员名下所有的客户
|
||||
export function SearchForAllCustomersSalesperson(params){
|
||||
return request.get({
|
||||
url: 'app/appCrmCusUserNewController/SearchForAllCustomersSalesperson',
|
||||
url: '/crm/app/appCrmCusUserNewController/SearchForAllCustomersSalesperson',
|
||||
data: params
|
||||
},{isTransformResponse: false})
|
||||
}
|
||||
// 客户人员归属审核详情
|
||||
export function getCusUserApprovalListDetail(params){
|
||||
return request.get({
|
||||
url: '/app/appCrmCusUserNewController/getCusUserApprovalListDetail',
|
||||
url: '/crm/app/appCrmCusUserNewController/getCusUserApprovalListDetail',
|
||||
data: params
|
||||
},{isTransformResponse: false})
|
||||
}
|
||||
// 查询主归属人列表
|
||||
export function SearchForAllPerson(params){
|
||||
return request.get({
|
||||
url: '/app/appCrmCusUserNewController/SearchForAllPerson',
|
||||
url: '/crm/app/appCrmCusUserNewController/SearchForAllPerson',
|
||||
data: params
|
||||
},{isTransformResponse: false})
|
||||
}
|
||||
@@ -47,7 +47,7 @@ export function SearchForAllPerson(params){
|
||||
// 客户人员新增审核列表
|
||||
export function getCusUserApprovalList(params) {
|
||||
return request.get({
|
||||
url: '/app/appCrmCusUserNewController/getCusUserApprovalList',
|
||||
url: '/crm/app/appCrmCusUserNewController/getCusUserApprovalList',
|
||||
data: params
|
||||
}, {isTransformResponse: false}
|
||||
)
|
||||
|
||||
@@ -2,35 +2,35 @@ import request from "@/utils/request"
|
||||
// 删除客户人员归属消息
|
||||
export function removeVisit(params){
|
||||
return request.get({
|
||||
url: '/app/appVisistReport/remove',
|
||||
url: '/crm/app/appVisistReport/remove',
|
||||
data: params
|
||||
},{isTransformResponse: false})
|
||||
}
|
||||
// 更新客户人员
|
||||
export function upadateappCrmCusUserNew (data){
|
||||
return request.post({
|
||||
url: '/app/appCrmCusUserNewController/update',
|
||||
url: '/crm/app/appCrmCusUserNewController/update',
|
||||
data
|
||||
},{isTransformResponse: false})
|
||||
}
|
||||
// 客户人员审核通过
|
||||
export function clientPersonnelsApproval(data) {
|
||||
return request.get({
|
||||
url: '/app/appCrmCusUserNewController/clientPersonnelsApproval',
|
||||
url: '/crm/app/appCrmCusUserNewController/clientPersonnelsApproval',
|
||||
data
|
||||
}, {isTransformResponse: false});
|
||||
}
|
||||
//客户人员驳回
|
||||
export function customerPersonnelsRejectio(data) {
|
||||
return request.get({
|
||||
url: '/app/appCrmCusUserNewController/customerPersonnelsRejectio',
|
||||
url: '/crm/app/appCrmCusUserNewController/customerPersonnelsRejectio',
|
||||
data
|
||||
}, {isTransformResponse: false});
|
||||
}
|
||||
//主归属人变更提交
|
||||
export function submissionOfChangeOfMainOwner (data){
|
||||
return request.get({
|
||||
url: '/app/appCrmCusUserNewController/submissionOfChangeOfMainOwner',
|
||||
url: '/crm/app/appCrmCusUserNewController/submissionOfChangeOfMainOwner',
|
||||
data
|
||||
},{isTransformResponse: false})
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import request from "@/utils/request";
|
||||
//主归属人变更信息查看(列表)
|
||||
export function queryViewMainOwnerList(params){
|
||||
return request.get({
|
||||
url: '/app/appCrmCusUserNewController/viewInformationChangesInprimaryOwnership',
|
||||
url: '/crm/app/appCrmCusUserNewController/viewInformationChangesInprimaryOwnership',
|
||||
data: params
|
||||
},{isTransformResponse: false})
|
||||
}
|
||||
@@ -12,7 +12,7 @@ export function queryViewMainOwnerList(params){
|
||||
//主归属人变更信息查看(详情)
|
||||
export function queryViewMainOwnerDetail(params){
|
||||
return request.get({
|
||||
url: '/app/appCrmCusUserNewController/getCrmCusUserNewChangeOwnerList',
|
||||
url: '/crm/app/appCrmCusUserNewController/getCrmCusUserNewChangeOwnerList',
|
||||
data: params
|
||||
},{isTransformResponse: false})
|
||||
}
|
||||
@@ -20,7 +20,7 @@ export function queryViewMainOwnerDetail(params){
|
||||
//查询主归属人变更人员的列表数据
|
||||
export function personnelAwaitingReviewForChange(params){
|
||||
return request.get({
|
||||
url: '/app/appCrmCusUserNewController/personnelAwaitingReviewForChange',
|
||||
url: '/crm/app/appCrmCusUserNewController/personnelAwaitingReviewForChange',
|
||||
data: params
|
||||
},{isTransformResponse: false})
|
||||
}
|
||||
@@ -28,14 +28,14 @@ export function personnelAwaitingReviewForChange(params){
|
||||
//主归属人变更驳回
|
||||
export function changeOfPrimaryOwnershipNoApproved(params) {
|
||||
return request.get({
|
||||
url:'/app/appCrmCusUserNewController/changeOfPrimaryOwnershipNoApproved',
|
||||
url:'/crm/app/appCrmCusUserNewController/changeOfPrimaryOwnershipNoApproved',
|
||||
data: params
|
||||
}, {isTransformResponse: false});
|
||||
}
|
||||
//主归属人变更通过
|
||||
export function changeOfPrimaryOwnershipApproved (params) {
|
||||
return request.get({
|
||||
url: '/app/appCrmCusUserNewController/changeOfPrimaryOwnershipApproved',
|
||||
url: '/crm/app/appCrmCusUserNewController/changeOfPrimaryOwnershipApproved',
|
||||
data: params
|
||||
}, {isTransformResponse: false});
|
||||
}
|
||||
@@ -1,36 +1,29 @@
|
||||
import request from "@/utils/request"
|
||||
|
||||
export function getPersonalPlanList(params) {
|
||||
return request.post({
|
||||
url: '/getPersonalPlanList',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function getUserInfo(data) {
|
||||
// 获取用户信息
|
||||
/*export function getUserInfo(data) {
|
||||
return request.get({
|
||||
url: '/app/user/getUserInfo',
|
||||
data
|
||||
}, {isTransformResponse: false})
|
||||
}*/
|
||||
//获取个人周计划列表
|
||||
export function getWeeklyPlanList(data) {
|
||||
return request.get({
|
||||
url: '/crm/app/appWeeklyPlan/getWeeklyListByUser',
|
||||
data
|
||||
}, {isTransformResponse: false})
|
||||
}
|
||||
//获取所有人周计划列表
|
||||
export function getAllWeekPlanList(params){
|
||||
return request.get({
|
||||
url: '/app/appWeeklyPlan/list',
|
||||
url: '/crm/app/appWeeklyPlan/list',
|
||||
data: params
|
||||
},{isTransformResponse: false})
|
||||
}
|
||||
//获取个人周计划列表
|
||||
export function getWeeklyPlanList(data) {
|
||||
return request.get({
|
||||
url: '/app/appWeeklyPlan/getWeeklyListByUser',
|
||||
data
|
||||
}, {isTransformResponse: false})
|
||||
}
|
||||
// 组合查询计划列表
|
||||
export function getWeekPlanListByDate(params){
|
||||
return request.get({
|
||||
url: '/app/appWeeklyPlan/weeklyListByDate',
|
||||
url: '/crm/app/appWeeklyPlan/weeklyListByDate',
|
||||
data: params
|
||||
},{isTransformResponse: false})
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import request from "@/utils/request"
|
||||
|
||||
export function updateWeekPlanList(data){
|
||||
return request.post({
|
||||
url: '/app/appWeeklyPlan/updateWeekly',
|
||||
url: '/crm/app/appWeeklyPlan/updateWeekly',
|
||||
data: data,
|
||||
header: {
|
||||
'Content-Type': 'application/json;charset=UTF-8'
|
||||
@@ -12,7 +12,7 @@ export function updateWeekPlanList(data){
|
||||
// 判断本周是否写过计划
|
||||
export function judgeThisWeek (data){
|
||||
return request.post({
|
||||
url: '/app/appWeeklyPlan/Judgethisweek',
|
||||
url: '/crm/app/appWeeklyPlan/Judgethisweek',
|
||||
data,
|
||||
header: {'Content-Type': 'application/json;charset=UTF-8'}
|
||||
})
|
||||
@@ -21,7 +21,7 @@ export function judgeThisWeek (data){
|
||||
// 新增周计划
|
||||
export function addPlan(data){
|
||||
return request.post({
|
||||
url: '/app/appWeeklyPlan/addComment',
|
||||
url: '/crm/app/appWeeklyPlan/addComment',
|
||||
data,
|
||||
header:{'Content-Type': 'application/json;charset=UTF-8'}
|
||||
})
|
||||
|
||||
@@ -25,6 +25,7 @@ const props = defineProps({
|
||||
title: String,
|
||||
leftFlag:true,//默认左侧显示 false-不显示
|
||||
rightFlag:false,//默认右侧不显示
|
||||
searchType:{default:0}//搜索返回为1,其他暂时不处理
|
||||
})
|
||||
|
||||
const emit = defineEmits(['back'])
|
||||
@@ -35,7 +36,7 @@ let navbarHeight = ref(0)
|
||||
let navHeight = ref(0)
|
||||
|
||||
onMounted(() => {
|
||||
navBarPaddingTop.value = getNavBarPaddingTop();console.log(navBarPaddingTop.value)
|
||||
navBarPaddingTop.value = getNavBarPaddingTop();
|
||||
statusBarHeight.value = getStatusBarHeight();
|
||||
navbarHeight.value = getNavBarHeight();
|
||||
navHeight.value = navbarHeight.value - statusBarHeight.value
|
||||
@@ -43,6 +44,7 @@ onMounted(() => {
|
||||
|
||||
const handleBack = () => {
|
||||
emit('back')
|
||||
if(!props.searchType)
|
||||
uni.navigateBack()
|
||||
}
|
||||
</script>
|
||||
@@ -56,15 +58,15 @@ const handleBack = () => {
|
||||
margin-left:-375rpx;
|
||||
z-index: 999;
|
||||
/* #ifdef APP-PLUS */
|
||||
background: url('@/static/images/bg-Blue-header.png') no-repeat;
|
||||
/* background: url('@/static/images/bg-Blue-header.png') no-repeat;
|
||||
background-size:750rpx 160rpx;
|
||||
height:160rpx;
|
||||
height:160rpx; */
|
||||
/* #endif */
|
||||
|
||||
/* #ifndef APP-PLUS */
|
||||
background: url('@/static/images/bg-Blue-header2.png') no-repeat;
|
||||
/* background: url('@/static/images/bg-Blue-header2.png') no-repeat;
|
||||
background-size:750rpx 116rpx;
|
||||
height:116rpx;
|
||||
height:116rpx; */
|
||||
/* #endif */
|
||||
|
||||
}
|
||||
|
||||
@@ -1,84 +1,307 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 搜索框 -->
|
||||
<uni-search-bar v-model="searchText" @confirm="handleSearch" />
|
||||
<view class="search search-sao">
|
||||
<!-- @confirm="handleSearch" @cancel="handleCancel"-->
|
||||
<uni-search-bar class="custom-search"
|
||||
radius="28"
|
||||
placeholder="请输入您想查询的内容或服务"
|
||||
clearButton="auto"
|
||||
bgColor="#6FA2F8" textColor="#ffffff"
|
||||
v-model="searchText"
|
||||
cancelButton="none"
|
||||
focus
|
||||
/>
|
||||
<text class="search-btn" @click="handleSearch">查询</text>
|
||||
</view>
|
||||
<view class="white-bg">
|
||||
|
||||
<!-- <view v-if="showSuggestions" class="suggestions-list">
|
||||
<view
|
||||
v-for="(item, index) in suggestions"
|
||||
:key="index"
|
||||
class="suggestion-item"
|
||||
@click="selectSuggestion(item)"
|
||||
<!-- 类型列表 -->
|
||||
<view class="search-section" v-if="searchTypeList.length>0">
|
||||
<view class="section-header">
|
||||
<text class="section-title">{{ searchType.typeName }}</text>
|
||||
</view>
|
||||
<view class="tag-container">
|
||||
<view class="search-tag notice-tag" :class="{'notice-check':!searchCheckObj.id}" @click="handleNoticeClick({})">全部</view>
|
||||
<view class="search-tag notice-tag" :class="{'notice-check':item.id==searchCheckObj.id}"
|
||||
v-for="(item, index) in searchTypeList"
|
||||
:key="'notice-' + index"
|
||||
@click="handleNoticeClick(item)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 历史记录 v-if="historyList.length>0" -->
|
||||
<view class="search-section">
|
||||
<view class="section-header">
|
||||
<text class="section-title">历史搜索</text>
|
||||
<uni-icons type="trash" size="18" color="#999" @click="clearHistory"></uni-icons>
|
||||
</view>
|
||||
<view class="tag-container">
|
||||
<view class="search-tag" v-for="(item, index) in historyList" :key="'history-' + index"
|
||||
@click="handleHistoryClick(item)">
|
||||
{{ item }}
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 筛选条件 -->
|
||||
<view class="filter-container">
|
||||
<picker mode="selector" :range="categoryOptions" @change="handleCategoryChange">
|
||||
<view class="filter-item">{{ categoryText }}</view>
|
||||
</picker>
|
||||
<picker mode="selector" :range="sortOptions" @change="handleSortChange">
|
||||
<view class="filter-item">{{ sortText }}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 搜索结果 -->
|
||||
<search-results :list="results" />
|
||||
<!-- <view class="search-result" v-if="searchResult.length > 0">
|
||||
<view class="result-item"
|
||||
v-for="(item, index) in searchResult"
|
||||
:key="'result-' + index"
|
||||
@click="handleResultClick(item)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { ref,watch } from 'vue'
|
||||
|
||||
// const suggestions = ref([])
|
||||
// const showSuggestions = ref(false)
|
||||
const props = defineProps({
|
||||
searchKeywords:{//搜索文本
|
||||
type:String
|
||||
},
|
||||
searchType:{//哪种类型显示对象 typeId:1-首页,2-业务首页,3-消息 之后可以自动添加
|
||||
type:Object
|
||||
},
|
||||
searchTypeList:{//类型列表
|
||||
type:Array,
|
||||
default:[]
|
||||
},
|
||||
checkTypeObj:{//选中的类型对象
|
||||
type:Object
|
||||
},
|
||||
|
||||
// const handleInput = debounce(async () => {
|
||||
// if (!searchText.value.trim()) {
|
||||
// showSuggestions.value = false
|
||||
// return
|
||||
// }
|
||||
})
|
||||
|
||||
// try {
|
||||
// const res = await getSuggestions(searchText.value)
|
||||
// suggestions.value = res
|
||||
// showSuggestions.value = true
|
||||
// } catch (error) {
|
||||
// console.error('获取搜索建议失败:', error)
|
||||
// }
|
||||
// }, 300)
|
||||
const searchText = ref('');// 搜索文本
|
||||
const searchCheckObj = ref({});//选中的类型对象
|
||||
|
||||
const searchText = ref('')
|
||||
const category = ref(0)
|
||||
const sort = ref(0)
|
||||
const showCancel = ref(false)// 是否显示取消按钮
|
||||
const historyList = ref([])// 历史记录列表
|
||||
|
||||
const categoryOptions = ['全部类别', '电子产品', '服装', '食品']
|
||||
const sortOptions = ['默认排序', '价格从低到高', '价格从高到低', '销量最高']
|
||||
const searchResult = ref([])// 搜索结果
|
||||
|
||||
const categoryText = computed(() => categoryOptions[category.value])
|
||||
const sortText = computed(() => sortOptions[sort.value])
|
||||
// 搜索文本内容
|
||||
watch(() => props.searchKeywords, (newVal, oldVal) => {
|
||||
searchText.value = newVal
|
||||
},{
|
||||
deep:true, // 深度监听
|
||||
immediate:true // 立即执行
|
||||
});
|
||||
|
||||
const handleSearch = async () => {
|
||||
const params = {
|
||||
keyword: searchText.value,
|
||||
category: category.value,
|
||||
sort: sort.value
|
||||
// 选中类型对象
|
||||
watch(() => props.checkTypeObj, (newVal, oldVal) => {
|
||||
searchCheckObj.value = newVal
|
||||
},{
|
||||
deep:true, // 深度监听
|
||||
immediate:true // 立即执行
|
||||
});
|
||||
|
||||
|
||||
// 调用父组件的方法
|
||||
const emit = defineEmits(['confirm']);
|
||||
|
||||
// 加载历史记录
|
||||
const loadHistory = () => {
|
||||
let typeId = props.searchType?props.searchType.typeId:undefined
|
||||
const history = uni.getStorageSync('searchHistory'+typeId) || []
|
||||
historyList.value = history
|
||||
}
|
||||
loadHistory();
|
||||
|
||||
// 处理搜索
|
||||
const handleSearch = () => {
|
||||
let txtContent = searchText.value?searchText.value.trim():undefined
|
||||
if (txtContent) {
|
||||
// uni.showToast({
|
||||
// title: '请输入搜索内容',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// return
|
||||
// 添加到历史记录
|
||||
addToHistory(txtContent)
|
||||
}
|
||||
|
||||
// 调用搜索API
|
||||
const res = await searchAPI(params)
|
||||
results.value = res.data
|
||||
// 模拟搜索请求
|
||||
// searchResult.value = [
|
||||
// { id: 1, name: `${searchText.value} 结果1` },
|
||||
// { id: 2, name: `${searchText.value} 结果2` },
|
||||
// { id: 3, name: `${searchText.value} 结果3` }
|
||||
// ]
|
||||
|
||||
|
||||
// 传给父组件
|
||||
emit('confirm',searchCheckObj,searchText);
|
||||
}
|
||||
|
||||
const handleCategoryChange = (e) => {
|
||||
category.value = e.detail.value
|
||||
// 处理输入
|
||||
const handleInput = () => {
|
||||
showCancel.value = searchText.value.length > 0
|
||||
}
|
||||
|
||||
// 清除搜索
|
||||
const clearSearch = () => {
|
||||
searchText.value = ''
|
||||
showCancel.value = false
|
||||
searchResult.value = []
|
||||
}
|
||||
|
||||
|
||||
// 添加到历史记录
|
||||
const addToHistory = (keyword) => {
|
||||
const index = historyList.value.indexOf(keyword)
|
||||
if (index !== -1) {
|
||||
historyList.value.splice(index, 1)
|
||||
}
|
||||
historyList.value.unshift(keyword)
|
||||
|
||||
// 限制历史记录数量
|
||||
if (historyList.value.length > 10) {
|
||||
historyList.value = historyList.value.slice(0, 10)
|
||||
}
|
||||
|
||||
let typeId = props.searchType.typeId
|
||||
uni.setStorageSync('searchHistory'+typeId, historyList.value)
|
||||
}
|
||||
|
||||
// 清除历史记录
|
||||
const clearHistory = () => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要清空历史记录吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
historyList.value = []
|
||||
let typeId = props.searchType.typeId;
|
||||
uni.removeStorageSync('searchHistory'+typeId)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 点击历史记录
|
||||
const handleHistoryClick = (item) => {
|
||||
searchText.value = item
|
||||
handleSearch()
|
||||
}
|
||||
|
||||
const handleSortChange = (e) => {
|
||||
sort.value = e.detail.value
|
||||
// 点击消息类型
|
||||
const handleNoticeClick = (item) => {
|
||||
// searchText.value = item
|
||||
searchCheckObj.value = item;
|
||||
handleSearch()
|
||||
}
|
||||
|
||||
// 点击搜索结果
|
||||
const handleResultClick = (item) => {
|
||||
uni.showToast({
|
||||
title: `点击了 ${item.name}`,
|
||||
icon: 'none'
|
||||
})
|
||||
// 实际项目中这里可以跳转到详情页
|
||||
// uni.navigateTo({ url: `/pages/detail/detail?id=${item.id}` })
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
.search-sao {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.search-sao .custom-search {
|
||||
/* width:615rpx; */
|
||||
width: 590rpx;
|
||||
padding: 0 20rpx;
|
||||
margin-bottom:15rpx;
|
||||
}
|
||||
|
||||
.search-sao :deep(.custom-search.uni-searchbar) {
|
||||
padding-bottom: 15rpx !important;
|
||||
}
|
||||
|
||||
.search-sao .search-btn {
|
||||
margin: 15rpx 30rpx 10rpx 0;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.white-bg {
|
||||
width: 750rpx;
|
||||
padding: 40rpx 0;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px 8px 0 0;
|
||||
/* #ifdef APP-PLUS */
|
||||
height: calc(100vh - 130px);
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
height: calc(100vh - 150px);
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.search-section {
|
||||
margin-bottom: 40rpx;
|
||||
padding:0 45rpx;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tag-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap:20rpx;
|
||||
}
|
||||
|
||||
.search-tag {
|
||||
background-color: #fff;
|
||||
border:1px solid #E8E8E8;
|
||||
border-radius: 10rpx;
|
||||
padding: 10rpx 15rpx;
|
||||
/* margin-right: 20rpx;
|
||||
margin-bottom: 20rpx; */
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.search-tag.notice-tag{
|
||||
padding: 10rpx 45rpx;
|
||||
}
|
||||
.notice-tag:nth-child(3n){
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.notice-check{
|
||||
background-color: #05A3F4;
|
||||
color:#fff;
|
||||
border-color:#05A3F4;
|
||||
}
|
||||
.search-result {
|
||||
margin-top: 20rpx;
|
||||
padding:0 20rpx;
|
||||
}
|
||||
|
||||
.result-item {
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
@@ -43,8 +43,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
|
||||
import { onMounted, reactive, ref, defineExpose} from "vue";
|
||||
const props = defineProps({
|
||||
// 是否显示全部清空按钮
|
||||
showClearIcon: {
|
||||
@@ -175,6 +174,14 @@ const handleChange = (index, item) => {
|
||||
// 触发回调函数
|
||||
emit("change", changevalue, realValue);
|
||||
};
|
||||
// 失去焦点时关闭选项列表
|
||||
const handleBlur = () => {
|
||||
active.value = false;
|
||||
};
|
||||
// 定义组件实例暴露的方法
|
||||
defineExpose({
|
||||
handleBlur
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
"^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
|
||||
}
|
||||
},
|
||||
"pages": [
|
||||
{
|
||||
"pages": [{
|
||||
"path": "pages/loading/loading",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
@@ -353,6 +352,13 @@
|
||||
},
|
||||
//===================================活动报告====================
|
||||
{
|
||||
"path": "pages/business/CRM/mainOwner/view/viewMainOwner", //查看主归属人变更信息
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
"path": "pages/business/CRM/marketActivity/visitReport",
|
||||
//市场信息管理
|
||||
"style": {
|
||||
@@ -501,8 +507,7 @@
|
||||
"backgroundColor": "#000000",
|
||||
"fontSize": "12px",
|
||||
"iconWidth": "24px",
|
||||
"list": [
|
||||
{
|
||||
"list": [{
|
||||
"pagePath": "pages/home/home",
|
||||
"iconPath": "static/images/tabs/menu-home.png",
|
||||
"selectedIconPath": "static/images/tabs/menu-home-on.png",
|
||||
|
||||
@@ -23,14 +23,17 @@
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 分页部分 -->
|
||||
<!-- 分页部分 top="68rpx" -->
|
||||
<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}"
|
||||
>
|
||||
<view class="white-bg margin-bottom20" v-for="(item, index) in list" :key="index"
|
||||
<block v-for="(item, index) in list" :key="index">
|
||||
<view class="white-bg margin-bottom20"
|
||||
@touchstart="handleTouchStart(item)"
|
||||
@touchend="handleTouchEnd">
|
||||
@touchend="handleTouchEnd"
|
||||
v-if="item && item.auditStatus !== '办事处审核通过'"
|
||||
>
|
||||
<view class="report-list">
|
||||
<view class="w-b-title title" @dblclick.stop="handleDetail(item)">
|
||||
{{ item.cusName }}
|
||||
@@ -65,13 +68,14 @@
|
||||
<view class="r-right">{{ item.salesmanThinkLevel }}</view>
|
||||
</view>
|
||||
|
||||
<!-- <view v-if="item.systemThinkLevel" class="r-list">
|
||||
<!--<view v-if="item.systemThinkLevel" class="r-list">
|
||||
<view class="r-left">系统认定等级</view>
|
||||
<view class="r-right">{{ item.systemThinkLevel }}</view>
|
||||
</view>-->
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</mescroll-uni>
|
||||
</view>
|
||||
</view>
|
||||
@@ -113,7 +117,7 @@ let handleSearch = () => {
|
||||
watch(searchValue, (newValue, oldValue) => {
|
||||
handleSearch()
|
||||
})
|
||||
let clearSearchValue = ()=>{
|
||||
let clearSearchValue = () => {
|
||||
searchValue.value = '';
|
||||
}
|
||||
// 查询列表
|
||||
@@ -151,7 +155,7 @@ const downCallback = async (mescroll) => {
|
||||
list.value = res.list;
|
||||
cssFlag.value = false;
|
||||
// 正确传递 total 参数
|
||||
mescroll.endSuccess(res.list.length, res.total > (mescroll.size || upOption.page.size));
|
||||
mescroll.endSuccess(res.list.length, res.total >= mescroll.size);
|
||||
uni.hideLoading();
|
||||
|
||||
}, 500);
|
||||
@@ -173,7 +177,7 @@ const upCallback = async (mescroll) => {
|
||||
list.value.push(...res.list);
|
||||
}
|
||||
// 正确判断是否还有更多数据
|
||||
mescroll.endSuccess(res.list.length, res.total > mescroll.num * mescroll.size);
|
||||
mescroll.endSuccess(res.list.length, res.total >= mescroll.size);
|
||||
uni.hideLoading();
|
||||
}, 500);
|
||||
} catch (error) {
|
||||
@@ -203,10 +207,8 @@ const getList = (pageIndex, pageSize) => {
|
||||
let handleDetail = (item) => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/business/CRM/customer/components/customerUserEdit",
|
||||
events: {
|
||||
|
||||
},
|
||||
success(res){
|
||||
events: {},
|
||||
success(res) {
|
||||
res.eventChannel.emit('editCusData', {param: item, isAdd: false})
|
||||
}
|
||||
})
|
||||
@@ -216,8 +218,8 @@ let handleDetail = (item) => {
|
||||
let touchTimerId = null;
|
||||
|
||||
// 开始触摸
|
||||
let handleTouchStart = (item)=>{
|
||||
touchTimerId = setTimeout(()=>{
|
||||
let handleTouchStart = (item) => {
|
||||
touchTimerId = setTimeout(() => {
|
||||
// console.log(item, "长按客户人员项")
|
||||
handleChange(item)
|
||||
|
||||
@@ -226,39 +228,39 @@ let handleTouchStart = (item)=>{
|
||||
}
|
||||
|
||||
// 结束触摸
|
||||
let handleTouchEnd = ()=>{
|
||||
if(touchTimerId !== null){
|
||||
let handleTouchEnd = () => {
|
||||
if (touchTimerId !== null) {
|
||||
clearTimeout(touchTimerId);
|
||||
}
|
||||
}
|
||||
|
||||
// 变更主归属人
|
||||
let handleChange = (item)=>{
|
||||
let handleChange = (item) => {
|
||||
|
||||
uni.showModal({
|
||||
title: '是否将该客户人员主的归属人变更为自己?',
|
||||
editable: true,
|
||||
placeholderText: '请输入变更理由',
|
||||
success(res){
|
||||
if(res.confirm){
|
||||
if(res.content){
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
if (res.content) {
|
||||
submissionOfChangeOfMainOwner({
|
||||
userId: item.userId,
|
||||
userName: item.userName,
|
||||
reasonForChange: res.content
|
||||
}).then(res=>{
|
||||
if(res.code===200){
|
||||
}).then(res => {
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: '操作成功'
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '操作失败',
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '操作失败!变更原因不能为空',
|
||||
icon: 'none'
|
||||
@@ -270,9 +272,9 @@ let handleChange = (item)=>{
|
||||
}
|
||||
|
||||
// 复制信息
|
||||
let handleCopyInfo=(item)=>{
|
||||
let handleCopyInfo = (item) => {
|
||||
const {cusName, userName, sex, iphone, mobilePhone, jobTelphone, userDept, salesmanThinkLevel} = item;
|
||||
/* item = JSON.stringify({
|
||||
/* item = JSON.stringify({
|
||||
'客户名称':item.cusName,
|
||||
'客户人员名称': item.userName,
|
||||
'性别': item.sex,
|
||||
@@ -284,7 +286,7 @@ let handleCopyInfo=(item)=>{
|
||||
uni.setClipboardData({
|
||||
data: `客户名称:${cusName}
|
||||
客户人员名称:${userName}
|
||||
性别:${iphone||mobilePhone||jobTelphone}
|
||||
性别:${iphone || mobilePhone || jobTelphone}
|
||||
部门:${userDept}
|
||||
业务员认定等级:${salesmanThinkLevel}`,
|
||||
success: function () {
|
||||
@@ -298,7 +300,7 @@ let handleCopyInfo=(item)=>{
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style lang="scss" scoped>
|
||||
.all-body {
|
||||
/* #ifdef APP-PLUS */
|
||||
top: 150rpx;
|
||||
@@ -311,7 +313,6 @@ let handleCopyInfo=(item)=>{
|
||||
}
|
||||
|
||||
|
||||
|
||||
.search .btn-search {
|
||||
border: none;
|
||||
background: none;
|
||||
@@ -338,12 +339,16 @@ let handleCopyInfo=(item)=>{
|
||||
|
||||
.white-bg {
|
||||
padding-bottom: 10rpx;
|
||||
.w-b-title{
|
||||
|
||||
.w-b-title {
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-edit{
|
||||
white-space: nowrap;
|
||||
.white-bg:hover {
|
||||
//background-color: #f1f1f1;
|
||||
background-color: #f1f1f1; /* Chrome, Safari, Opera */
|
||||
box-shadow: 0px 0px 5rpx white;
|
||||
//filter: rgba(237, 242, 250, 0.5);
|
||||
}
|
||||
</style>
|
||||
@@ -168,7 +168,7 @@
|
||||
<uni-forms-item label="爱好" name="hobby" class="uni-forms-item is-direction-top is-top">
|
||||
<!-- 索引:hobbyIndex 范围:hobbyList 响应:handleHobbyChange-->
|
||||
<uni-easyinput v-model="formData.hobby" placeholder="请输入爱好" :disabled="!editable"/>
|
||||
<multipleSelect :multiple="true" :value="hobbyIndex" downInner :options="hobbyList"
|
||||
<multipleSelect ref="hobbySelectRef" :multiple="true" downInner :value="hobbyIds" :options="hobbyList"
|
||||
@change="handleHobbyChange" :slabel="'name'"
|
||||
|
||||
></multipleSelect><!--placeholder="请选择爱好标签"-->
|
||||
@@ -467,20 +467,29 @@ let handleThinkLevelChange = (e) => {
|
||||
// 系统推荐等级
|
||||
let recommendLevel = ref("");
|
||||
let getRecommendLevel = async () => {
|
||||
if (formData.value.cusEstate && formData.value.functionalRequirements) {
|
||||
if (formData.value.cusEstate) {
|
||||
let {cusEstate, functionalRequirements} = formData.value;
|
||||
let param = {cusEstate, functionalRequirements};
|
||||
if (formData.value.salesmanThinkLevel) {
|
||||
param.personnelLevel = formData.value.salesmanThinkLevel;
|
||||
}
|
||||
let res = await getCustomerLevel(param).catch(err => {
|
||||
let res = await getCustomerLevel(param)
|
||||
/*.catch(err => {
|
||||
console.error(err, "客户的系统推荐等级获取失败")
|
||||
})
|
||||
if (!res.systemRecommendationLevel) {
|
||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
||||
console.log(formData.value.systemThinkLevel + "???")
|
||||
})*/
|
||||
try{
|
||||
if(res.data.systemRecommendationLevel){
|
||||
formData.value.systemThinkLevel = res.data.systemRecommendationLevel;
|
||||
}else{
|
||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐";
|
||||
}
|
||||
}catch(e){
|
||||
if (res.systemRecommendationLevel) {
|
||||
formData.value.systemThinkLevel = res.systemRecommendationLevel;
|
||||
}else{
|
||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
recommendLevel.value = "无公司等级信息,无法推荐等级";
|
||||
}
|
||||
@@ -509,8 +518,7 @@ let handleUserTypeChange = (e) => {
|
||||
|
||||
// 选择日期
|
||||
function handleTenureTimeChange(e) {
|
||||
let {value} = e.detail;
|
||||
formData.value.tenureTime = value;
|
||||
formData.value.tenureTime = e;
|
||||
}
|
||||
|
||||
// 需求层次索引
|
||||
@@ -533,16 +541,17 @@ let handleDevelopChange = e => {
|
||||
|
||||
// 选择生日
|
||||
function handleBirthdayChange(e) {
|
||||
let{value} = e.detail
|
||||
formData.value.birthday = value;
|
||||
formData.value.birthday = e;
|
||||
}
|
||||
|
||||
// 爱好标签索引
|
||||
let hobbyIndex = reactive([]);
|
||||
let hobbyIds = ref([]);
|
||||
let hobbies = ref([]);
|
||||
// 选择爱好标签
|
||||
const handleHobbyChange = (item, value) => {
|
||||
// console.log("爱好", item, value);
|
||||
hobbyIndex = value;
|
||||
const handleHobbyChange = (items, ids) => {
|
||||
console.log('选择爱好', items, ids);
|
||||
hobbyIds.value = [];
|
||||
hobbies.value = items;
|
||||
};
|
||||
// 选择
|
||||
const handleNativeChange = (e) => {
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
<uni-forms-item label="爱好" name="hobby" class="uni-forms-item is-direction-top is-top">
|
||||
<!-- 索引:hobbyIndex 范围:hobbyList 响应:handleHobbyChange-->
|
||||
<uni-easyinput v-model="formData.hobby" placeholder="请输入爱好"/>
|
||||
<multipleSelect :multiple="true" :value="hobbyIndex" downInner :options="hobbyList"
|
||||
<multipleSelect ref="hobbySelectRef" :multiple="true" downInner :value="hobbyIds" :options="hobbyList"
|
||||
@change="handleHobbyChange" :slabel="'name'"
|
||||
|
||||
></multipleSelect><!--placeholder="请选择爱好标签"-->
|
||||
@@ -468,20 +468,29 @@ let handleThinkLevelChange = (e) => {
|
||||
// 系统推荐等级
|
||||
let recommendLevel = ref("");
|
||||
let getRecommendLevel = async () => {
|
||||
if (formData.value.cusEstate && formData.value.functionalRequirements) {
|
||||
if (formData.value.cusEstate) {
|
||||
let {cusEstate, functionalRequirements} = formData.value;
|
||||
let param = {cusEstate, functionalRequirements};
|
||||
if (formData.value.salesmanThinkLevel) {
|
||||
param.personnelLevel = formData.value.salesmanThinkLevel;
|
||||
}
|
||||
let res = await getCustomerLevel(param).catch(err => {
|
||||
let res = await getCustomerLevel(param)
|
||||
/*.catch(err => {
|
||||
console.error(err, "客户的系统推荐等级获取失败")
|
||||
})
|
||||
if (!res.systemRecommendationLevel) {
|
||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
||||
console.log(formData.value.systemThinkLevel + "???")
|
||||
})*/
|
||||
try{
|
||||
if(res.data.systemRecommendationLevel){
|
||||
formData.value.systemThinkLevel = res.data.systemRecommendationLevel;
|
||||
}else{
|
||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐";
|
||||
}
|
||||
}catch(e){
|
||||
if (res.systemRecommendationLevel) {
|
||||
formData.value.systemThinkLevel = res.systemRecommendationLevel;
|
||||
}else{
|
||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
recommendLevel.value = "无公司等级信息,无法推荐等级";
|
||||
}
|
||||
@@ -510,8 +519,7 @@ let handleUserTypeChange = (e) => {
|
||||
|
||||
// 选择日期
|
||||
function handleTenureTimeChange(e) {
|
||||
let {value} = e.detail;
|
||||
formData.value.tenureTime = value;
|
||||
formData.value.tenureTime = e;
|
||||
}
|
||||
|
||||
// 需求层次索引
|
||||
@@ -534,17 +542,19 @@ let handleDevelopChange = e => {
|
||||
|
||||
// 选择生日
|
||||
function handleBirthdayChange(e) {
|
||||
let{value} = e.detail
|
||||
formData.value.birthday = value;
|
||||
formData.value.birthday = e;
|
||||
}
|
||||
|
||||
// 爱好标签索引
|
||||
let hobbyIndex = reactive([]);
|
||||
let hobbyIds = ref([]);
|
||||
let hobbies = ref([]);
|
||||
// 选择爱好标签
|
||||
const handleHobbyChange = (item, value) => {
|
||||
// console.log("爱好", item, value);
|
||||
hobbyIndex = value;
|
||||
const handleHobbyChange = (items, ids) => {
|
||||
console.log('选择爱好', items, ids);
|
||||
hobbyIds.value = [];
|
||||
hobbies.value = items;
|
||||
};
|
||||
|
||||
// 选择
|
||||
const handleNativeChange = (e) => {
|
||||
formData.value.nativec = (e.detail.value.map(item => {
|
||||
@@ -568,16 +578,16 @@ let handleWorkingStatusChange = e => {
|
||||
}
|
||||
|
||||
let submitForm = async () => {
|
||||
let hobbyTags = hobbyIndex.map(it => {
|
||||
let {name} = hobbyList[it];
|
||||
let hobbyTags = hobbies.value.map(it => {
|
||||
let {name} = it;
|
||||
return name;
|
||||
})
|
||||
formData.value.iphone = formData.value.mobilePhone; // 特殊处理
|
||||
const hobbyTagString = hobbyTags.join(',');
|
||||
console.log(hobbyTagString);
|
||||
if (hobbyTagString || formData.value.hobby) {
|
||||
formData.value.hobby = formData.value.hobby ? formData.value.hobby + ',' + hobbyTagString : hobbyTagString;
|
||||
formData.value.hobby = hobbyTagString ? (formData.value.hobby ? formData.value.hobby + ',' : '') + hobbyTagString : formData.value.hobby;
|
||||
}
|
||||
formData.value.iphone = formData.value.mobilePhone; // 特殊处理
|
||||
// console.log(formData.value, "校验表单数据")
|
||||
// console.log(recommendLevel);
|
||||
formData.value.cusName = customerUser.value.cusName;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<!-- 正文内容 -->
|
||||
<view class="white-bg">
|
||||
<view class="form-con">
|
||||
<view class="form-con" @click="handleBlur">
|
||||
<uni-forms ref="formRef" :model="formData" :rules="rules" label-width="40%">
|
||||
<!-- 选择客户 -->
|
||||
<uni-forms-item label="客户名称" name="cusName" required class="f-c-right">
|
||||
@@ -178,8 +178,8 @@
|
||||
<uni-forms-item label="爱好" name="hobby" class="uni-forms-item is-direction-top is-top">
|
||||
<!-- 索引:hobbyIndex 范围:hobbyList 响应:handleHobbyChange-->
|
||||
<uni-easyinput v-model="formData.hobby" placeholder="请输入爱好"/>
|
||||
<multipleSelect :multiple="true" :value="hobbyIndex" downInner :options="hobbyList"
|
||||
@change="handleHobbyChange" :key="Math.round()" :slabel="'name'"
|
||||
<multipleSelect ref="hobbySelectRef" :multiple="true" downInner :value="hobbyIds" :options="hobbyList"
|
||||
@change="handleHobbyChange" :slabel="'name'"
|
||||
|
||||
></multipleSelect><!--placeholder="请选择爱好标签"-->
|
||||
</uni-forms-item>
|
||||
@@ -271,7 +271,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ref, onMounted, computed, reactive} from 'vue'
|
||||
import {ref, reactive} from 'vue'
|
||||
import customHeader from '@/components/customHeader.vue'
|
||||
import multipleSelect from '@/components/multipleSelect.vue'
|
||||
import {
|
||||
@@ -284,7 +284,8 @@ import {
|
||||
} from "./dataMap";
|
||||
import city from "@/utils/area";
|
||||
import {getCustomerLevel, saveappCrmCusUserNew} from "@/api/crm/customer/getCustomer";
|
||||
|
||||
// 对 multipleSelect 组件的引用
|
||||
const hobbySelectRef = ref(null);
|
||||
// 表单引用
|
||||
const formRef = ref({});
|
||||
// 表单数据
|
||||
@@ -435,6 +436,7 @@ let handleFunctionChange = (e) => {
|
||||
console.log(e.detail.value, '职能索引');
|
||||
const {name} = functionalRequirementList[e.detail.value];
|
||||
formData.value.functionalRequirements = name;
|
||||
formData.value.function = name;
|
||||
getRecommendLevel();
|
||||
}
|
||||
|
||||
@@ -447,20 +449,29 @@ let handleThinkLevelChange = (e) => {
|
||||
// 系统推荐等级
|
||||
let recommendLevel = ref("");
|
||||
let getRecommendLevel = async () => {
|
||||
if (formData.value.cusEstate && formData.value.functionalRequirements) {
|
||||
if (formData.value.cusEstate) {
|
||||
let {cusEstate, functionalRequirements} = formData.value;
|
||||
let param = {cusEstate, functionalRequirements};
|
||||
if (formData.value.salesmanThinkLevel) {
|
||||
param.personnelLevel = formData.value.salesmanThinkLevel;
|
||||
}
|
||||
let res = await getCustomerLevel(param).catch(err => {
|
||||
let res = await getCustomerLevel(param)
|
||||
/*.catch(err => {
|
||||
console.error(err, "客户的系统推荐等级获取失败")
|
||||
})
|
||||
if (!res.systemRecommendationLevel) {
|
||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
||||
console.log(formData.value.systemThinkLevel + "???")
|
||||
})*/
|
||||
try{
|
||||
if(res.data.systemRecommendationLevel){
|
||||
formData.value.systemThinkLevel = res.data.systemRecommendationLevel;
|
||||
}else{
|
||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐";
|
||||
}
|
||||
}catch(e){
|
||||
if (res.systemRecommendationLevel) {
|
||||
formData.value.systemThinkLevel = res.systemRecommendationLevel;
|
||||
}else{
|
||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
recommendLevel.value = "无公司等级信息,无法推荐等级";
|
||||
}
|
||||
@@ -488,9 +499,9 @@ let handleUserTypeChange = (e) => {
|
||||
}
|
||||
|
||||
// 选择日期
|
||||
function handleTenureTimeChange(e) {
|
||||
let {value} = e.detail;
|
||||
formData.value.tenureTime = value;
|
||||
function handleTenureTimeChange(val) {
|
||||
console.log(val)
|
||||
formData.value.tenureTime = val;
|
||||
}
|
||||
|
||||
// 需求层次索引
|
||||
@@ -512,18 +523,20 @@ let handleDevelopChange = e => {
|
||||
}
|
||||
|
||||
// 选择生日
|
||||
function handleBirthdayChange(e) {
|
||||
let{value} = e.detail
|
||||
formData.value.birthday = value;
|
||||
function handleBirthdayChange(val) {
|
||||
formData.value.birthday = val;
|
||||
}
|
||||
|
||||
// 爱好标签索引
|
||||
let hobbyIndex = reactive([]);
|
||||
let hobbyIds = ref([]);
|
||||
let hobbies = ref([]);
|
||||
// 选择爱好标签
|
||||
const handleHobbyChange = (item, value) => {
|
||||
// console.log("爱好", item, value);
|
||||
hobbyIndex = value;
|
||||
const handleHobbyChange = (items, ids) => {
|
||||
console.log('选择爱好', items, ids);
|
||||
hobbyIds.value = [];
|
||||
hobbies.value = items;
|
||||
};
|
||||
|
||||
// 选择
|
||||
const handleNativeChange = (e) => {
|
||||
formData.value.nativec = (e.detail.value.map(item => {
|
||||
@@ -545,16 +558,93 @@ let handleWorkingStatusChange = e => {
|
||||
workingStatusIndex.value = 0;
|
||||
formData.value.workingStatus = workingStatusList[value].name;
|
||||
}
|
||||
|
||||
let submitForm = async () => {
|
||||
let hobbyTags = hobbyIndex.map(it => {
|
||||
let {name} = hobbyList[it];
|
||||
// 多选组件失去焦点关闭
|
||||
let handleBlur = () => {
|
||||
if (hobbySelectRef.value) hobbySelectRef.value.handleBlur();
|
||||
}
|
||||
// 提取爱好标签处理逻辑
|
||||
const processHobbyTags = () => {
|
||||
let hobbyTags = hobbies.value.map(it => {
|
||||
let {name} = it;
|
||||
return name;
|
||||
})
|
||||
const hobbyTagString = hobbyTags.join(',');
|
||||
console.log(hobbyTagString);
|
||||
if (hobbyTagString || formData.value.hobby) {
|
||||
formData.value.hobby = formData.value.hobby ? formData.value.hobby + ',' + hobbyTagString : hobbyTagString;
|
||||
formData.value.hobby = hobbyTagString ? (formData.value.hobby ? formData.value.hobby + ',' : '') + hobbyTagString : formData.value.hobby;
|
||||
}
|
||||
};
|
||||
|
||||
// 提取表单验证逻辑
|
||||
const validateForm = async () => {
|
||||
formData.value.cusName = customerUser.value.cusName;
|
||||
await formRef.value.validate();
|
||||
console.log(formData.value, "提交表单数据");
|
||||
};
|
||||
|
||||
// 提取API调用逻辑
|
||||
const saveCustomerUser = async () => {
|
||||
uni.showLoading();
|
||||
try {
|
||||
const res = await saveappCrmCusUserNew(formData.value);
|
||||
if(res.code === 200){
|
||||
uni.showToast({
|
||||
title: "保存成功"
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "操作失败",
|
||||
icon: "error"
|
||||
});
|
||||
}
|
||||
setTimeout(() => uni.navigateBack(), 1500);
|
||||
} catch(err) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: "保存失败"
|
||||
});
|
||||
}
|
||||
finally{
|
||||
uni.hideLoading()
|
||||
}
|
||||
};
|
||||
|
||||
// 简化后的 submitForm 方法
|
||||
let submitForm = async () => {
|
||||
console.log(formData.value);
|
||||
try {
|
||||
if(formData.value.iphone){
|
||||
formData.value.mobilePhone = formData.value.iphone;
|
||||
}
|
||||
// 处理爱好标签
|
||||
processHobbyTags();
|
||||
|
||||
// 表单验证
|
||||
await validateForm();
|
||||
|
||||
// 保存客户人员信息
|
||||
await saveCustomerUser();
|
||||
} catch (err) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请检查并完善信息'
|
||||
});
|
||||
console.warn(err);
|
||||
}
|
||||
};
|
||||
|
||||
/*let submitForm = async () => {
|
||||
let hobbyTags = hobbies.value.map(it => {
|
||||
let {name} = it;
|
||||
return name;
|
||||
})
|
||||
const hobbyTagString = hobbyTags.join(',');
|
||||
console.log(hobbyTagString);
|
||||
if (hobbyTagString || formData.value.hobby) {
|
||||
formData.value.hobby = hobbyTagString ? (formData.value.hobby ? formData.value.hobby + ',' : '') + hobbyTagString : formData.value.hobby;
|
||||
}
|
||||
if(formData.value.iphone){
|
||||
formData.value.mobilePhone = formData.value.iphone;
|
||||
}
|
||||
// console.log(formData.value, "校验表单数据")
|
||||
// console.log(recommendLevel);
|
||||
@@ -564,19 +654,19 @@ let submitForm = async () => {
|
||||
console.log(formData.value, "提交表单数据")
|
||||
// 请求保存
|
||||
uni.showLoading()
|
||||
saveappCrmCusUserNew(formData.value).then(res=>{
|
||||
saveappCrmCusUserNew(formData.value).then(res => {
|
||||
uni.hideLoading();
|
||||
if(res.code === 200){
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: "保存成功"
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "操作失败"
|
||||
})
|
||||
}
|
||||
setTimeout(()=>uni.navigateBack(), 1500);
|
||||
}).catch(err=>{
|
||||
setTimeout(() => uni.navigateBack(), 1500);
|
||||
}).catch(() => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: "保存失败"
|
||||
@@ -592,7 +682,7 @@ let submitForm = async () => {
|
||||
})
|
||||
console.warn(err);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
<!-- 正文内容 -->
|
||||
<view class="all-body">
|
||||
<!-- 搜索-->
|
||||
<!-- <view class="search">-->
|
||||
<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="custom-search"></view>
|
||||
</view>
|
||||
|
||||
<!-- 分页部分 -->
|
||||
<mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
|
||||
@@ -90,16 +90,9 @@ let timerId = null;
|
||||
let handleSearch = () => {
|
||||
// 防抖搜索 console.log(searchValue.value)
|
||||
if (timerId) clearTimeout(timerId);
|
||||
uni.showLoading()
|
||||
timerId = setTimeout(async () => {
|
||||
|
||||
cssFlag.value = true;
|
||||
|
||||
// let res = await getList(1, upOption.value.page.size)
|
||||
await downCallback(mescrollRef.value.mescroll);
|
||||
|
||||
cssFlag.value = false;
|
||||
uni.hideLoading();
|
||||
clearTimeout(timerId);
|
||||
timerId = null;
|
||||
}, 500)
|
||||
@@ -138,6 +131,8 @@ 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);
|
||||
@@ -145,6 +140,8 @@ const downCallback = async (mescroll) => {
|
||||
list.value = res.list;
|
||||
// 正确传递 total 参数
|
||||
mescroll.endSuccess(res.list.length, res.total > (mescroll.size || upOption.page.size));
|
||||
uni.hideLoading();
|
||||
cssFlag.value = false;
|
||||
}, 500);
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
@@ -162,6 +159,7 @@ const upCallback = async (mescroll) => {
|
||||
} else {
|
||||
list.value.push(...res.list);
|
||||
}
|
||||
mescroll.endBySize(res.list.length, res.total);
|
||||
// 正确判断是否还有更多数据
|
||||
mescroll.endSuccess(res.list.length, res.total > mescroll.num * mescroll.size);
|
||||
}, 500);
|
||||
@@ -218,7 +216,6 @@ let handleDetail = (item) => {
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
|
||||
.scroll-h {
|
||||
/* #ifdef APP-PLUS */
|
||||
height: calc(100vh - 120px);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<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"
|
||||
<uni-search-bar class="custom-search" radius="28" placeholder="请输入客户人员名称" clearButton="auto"
|
||||
cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"
|
||||
@clear="clearSearchValue"
|
||||
v-model="searchValue"
|
||||
@@ -32,8 +32,8 @@
|
||||
<view class="white-bg margin-bottom20" v-for="(item, index) in list" :key="index"
|
||||
@click.stop="handleDetail(item)">
|
||||
<view class="report-list">
|
||||
<view class="w-b-title title" @touchstart.prevent="handleTouchStart(item)"
|
||||
@touchend.prevent="handleTouchEnd">
|
||||
<view class="w-b-title title" @touchstart="handleTouchStart(item)"
|
||||
@touchend="handleTouchEnd">
|
||||
{{ item.cusName }}
|
||||
<view v-if="item.nodeCode" class="r-right btn-edit" :class="statusColorMap[item.nodeCode]">
|
||||
{{ item.nodeCode }}
|
||||
@@ -132,7 +132,10 @@ let list = ref([]);
|
||||
const upOption = ref({
|
||||
page: {num: 0, size: 10},
|
||||
noMoreSize: 5,
|
||||
empty: {tip: '~ 空空如也 ~'},
|
||||
empty: {
|
||||
tip: '~ 空空如也 ~',
|
||||
icon: "../../static/images/mescroll-empty.png"
|
||||
},
|
||||
textLoading: '加载中...',
|
||||
textNoMore: '已经到底了'
|
||||
});
|
||||
@@ -181,7 +184,8 @@ const upCallback = async (mescroll) => {
|
||||
list.value.push(...res.list);
|
||||
}
|
||||
// 正确判断是否还有更多数据
|
||||
mescroll.endSuccess(res.list.length, res.total > mescroll.num * mescroll.size);
|
||||
mescroll.endBySize(res.list.length, res.total)
|
||||
// mescroll.endSuccess(res.list.length, res.total > mescroll.num * mescroll.size);
|
||||
}, 500);
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
|
||||
@@ -33,10 +33,9 @@
|
||||
<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?true:false"
|
||||
:value="item"
|
||||
:data-index="index">
|
||||
:class="index === selectIndex ? 'checked' : ''"
|
||||
:checked="index === selectIndex"
|
||||
:value="index+''">
|
||||
</radio>
|
||||
|
||||
<view class="report-list">
|
||||
@@ -118,7 +117,6 @@ let timerId = null;
|
||||
watch(searchValue, (newValue, oldValue) => {
|
||||
// console.log(`新值: ${newValue}, 旧值: ${oldValue}`);
|
||||
if(timerId) clearTimeout(timerId);
|
||||
cssFlag.value = true;
|
||||
timerId = setTimeout(async ()=>{
|
||||
handleSearch();
|
||||
clearTimeout(timerId);
|
||||
@@ -130,7 +128,6 @@ watch(searchValue, (newValue, oldValue) => {
|
||||
const downCallback = async (mescroll) => {
|
||||
try {
|
||||
const res = await getList(1, upOption.value.page.size);
|
||||
cssFlag.value = false;
|
||||
list.value = res.list;
|
||||
// 正确结束下拉刷新状态
|
||||
mescroll.endSuccess(res.list.length, res.total >= upOption.value.page.size);
|
||||
@@ -163,9 +160,11 @@ const upCallback = async (mescroll) => {
|
||||
let handleSearch = async () => {
|
||||
// 触发下拉刷新以重新加载数据
|
||||
if (mescrollRef.value) {
|
||||
cssFlag.value = true;
|
||||
uni.showLoading()
|
||||
await downCallback(mescrollRef.value.mescroll);
|
||||
uni.hideLoading()
|
||||
cssFlag.value = false;
|
||||
}
|
||||
}
|
||||
// 获取数据列表
|
||||
@@ -181,12 +180,10 @@ const getList = async (pageIndex, pageSize) => {
|
||||
// 选中项的索引号
|
||||
const selectIndex = ref(null);
|
||||
const radioChange = (e) => {
|
||||
let {value} = e.detail;
|
||||
let {index} = e.target.dataset;
|
||||
let {value} = e.detail; // index
|
||||
// console.log(value);
|
||||
// console.log(e.target.dataset);
|
||||
const eventChannel = instance.getOpenerEventChannel();
|
||||
eventChannel.emit('cuSelected', value);
|
||||
eventChannel.emit('cuSelected', list.value[value]);
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
<uni-forms-item label="爱好" name="hobby" class="uni-forms-item is-direction-top is-top">
|
||||
<!-- 索引:hobbyIndex 范围:hobbyList 响应:handleHobbyChange-->
|
||||
<uni-easyinput v-model="formData.hobby" placeholder="请输入爱好" :disabled="!editable"/>
|
||||
<multipleSelect :multiple="true" :value="hobbyIndex" downInner :options="hobbyList"
|
||||
<multipleSelect ref="hobbySelectRef" :multiple="true" downInner :value="hobbyIds" :options="hobbyList"
|
||||
@change="handleHobbyChange" :slabel="'name'"
|
||||
|
||||
></multipleSelect><!--placeholder="请选择爱好标签"-->
|
||||
@@ -439,20 +439,29 @@ let handleThinkLevelChange = (e) => {
|
||||
// 系统推荐等级
|
||||
let recommendLevel = ref("");
|
||||
let getRecommendLevel = async () => {
|
||||
if (formData.value.cusEstate && formData.value.functionalRequirements) {
|
||||
if (formData.value.cusEstate) {
|
||||
let {cusEstate, functionalRequirements} = formData.value;
|
||||
let param = {cusEstate, functionalRequirements};
|
||||
if (formData.value.salesmanThinkLevel) {
|
||||
param.personnelLevel = formData.value.salesmanThinkLevel;
|
||||
}
|
||||
let res = await getCustomerLevel(param).catch(err => {
|
||||
let res = await getCustomerLevel(param)
|
||||
/*.catch(err => {
|
||||
console.error(err, "客户的系统推荐等级获取失败")
|
||||
})
|
||||
if (!res.systemRecommendationLevel) {
|
||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
||||
console.log(formData.value.systemThinkLevel + "???")
|
||||
})*/
|
||||
try{
|
||||
if(res.data.systemRecommendationLevel){
|
||||
formData.value.systemThinkLevel = res.data.systemRecommendationLevel;
|
||||
}else{
|
||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐";
|
||||
}
|
||||
}catch(e){
|
||||
if (res.systemRecommendationLevel) {
|
||||
formData.value.systemThinkLevel = res.systemRecommendationLevel;
|
||||
}else{
|
||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
recommendLevel.value = "无公司等级信息,无法推荐等级";
|
||||
}
|
||||
@@ -481,8 +490,7 @@ let handleUserTypeChange = (e) => {
|
||||
|
||||
// 选择日期
|
||||
function handleTenureTimeChange(e) {
|
||||
let {value} = e.detail;
|
||||
formData.value.tenureTime = value;
|
||||
formData.value.tenureTime = e;
|
||||
}
|
||||
|
||||
// 需求层次索引
|
||||
@@ -505,17 +513,19 @@ let handleDevelopChange = e => {
|
||||
|
||||
// 选择生日
|
||||
function handleBirthdayChange(e) {
|
||||
let{value} = e.detail
|
||||
formData.value.birthday = value;
|
||||
formData.value.birthday = e;
|
||||
}
|
||||
|
||||
// 爱好标签索引
|
||||
let hobbyIndex = reactive([]);
|
||||
let hobbyIds = ref([]);
|
||||
let hobbies = ref([]);
|
||||
// 选择爱好标签
|
||||
const handleHobbyChange = (item, value) => {
|
||||
// console.log("爱好", item, value);
|
||||
hobbyIndex = value;
|
||||
const handleHobbyChange = (items, ids) => {
|
||||
console.log('选择爱好', items, ids);
|
||||
hobbyIds.value = [];
|
||||
hobbies.value = items;
|
||||
};
|
||||
|
||||
// 选择
|
||||
const handleNativeChange = (e) => {
|
||||
formData.value.nativec = (e.detail.value.map(item => {
|
||||
@@ -539,16 +549,18 @@ let handleWorkingStatusChange = e => {
|
||||
}
|
||||
|
||||
let submitForm = async () => {
|
||||
let hobbyTags = hobbyIndex.map(it => {
|
||||
let {name} = hobbyList[it];
|
||||
let hobbyTags = hobbies.value.map(it => {
|
||||
let {name} = it;
|
||||
return name;
|
||||
})
|
||||
formData.value.iphone = formData.value.mobilePhone; // 特殊处理
|
||||
const hobbyTagString = hobbyTags.join(',');
|
||||
console.log(hobbyTagString);
|
||||
if (hobbyTagString || formData.value.hobby) {
|
||||
formData.value.hobby = formData.value.hobby ? formData.value.hobby + ',' + hobbyTagString : hobbyTagString;
|
||||
formData.value.hobby = hobbyTagString ? (formData.value.hobby ? formData.value.hobby + ',' : '') + hobbyTagString : formData.value.hobby;
|
||||
}
|
||||
|
||||
formData.value.iphone = formData.value.mobilePhone; // 特殊处理
|
||||
|
||||
// console.log(formData.value, "校验表单数据")
|
||||
// console.log(recommendLevel);
|
||||
formData.value.cusName = customerUser.value.cusName;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</customHeader>
|
||||
|
||||
<!-- 高度来避免头部遮挡 -->
|
||||
<view class="top-height" :style="{ paddingTop: navBarPaddingTop + 'px' }"></view>
|
||||
<view class="top-height"></view>
|
||||
|
||||
<!-- 正文内容 -->
|
||||
<view class="all-body">
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
<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>
|
||||
<!-- <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>
|
||||
|
||||
<!-- 分页部分 -->
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="con-body">
|
||||
<view >
|
||||
<view class="con-bg">
|
||||
<!-- 头部 -->
|
||||
<customHeader ref="customHeaderRef" :title="'查看主归属人变更详细信息'" :leftFlag="true"
|
||||
:rightFlag="false"></customHeader>
|
||||
@@ -8,6 +8,9 @@
|
||||
<view class="top-height" :style="{ paddingTop: navBarPaddingTop + 'px' }"></view>
|
||||
<view class="all-body">
|
||||
<!-- 分页部分 -->
|
||||
|
||||
<view class="white-bg margin-bottom20"
|
||||
@click="showDetail(item)">
|
||||
<view>
|
||||
<view class="report-list">
|
||||
<view class="title">客户公司名称:{{ detailInfo.cusName }}</view>
|
||||
@@ -16,10 +19,12 @@
|
||||
<view class="r-left">客户人员名称</view>
|
||||
<view class="r-right">{{ detailInfo.userName }}</view>
|
||||
</view>
|
||||
<view class="border-bottom"></view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">性别</view>
|
||||
<view class="r-right">{{ detailInfo.sex }}</view>
|
||||
</view>
|
||||
<view class="border-bottom"></view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">手机号</view>
|
||||
<view class="r-right">{{ detailInfo.mobilePhone }}</view>
|
||||
@@ -31,12 +36,14 @@
|
||||
</view>
|
||||
<view class="border-bottom"></view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">业务员认定等级</view>
|
||||
<view class="r-right">{{ detailInfo.salesmanThinkLevel }}</view>
|
||||
<view class="r-left title">业务员认定等级</view>
|
||||
<view class="r-right title">{{ detailInfo.salesmanThinkLevel }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="tezt">
|
||||
<qianjue-step :list="list"></qianjue-step>
|
||||
@@ -126,52 +133,9 @@ function getCrmCusUserNewChangeOwnerList() {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.all-body {
|
||||
/* #ifdef APP-PLUS */
|
||||
top: 150rpx;
|
||||
height: calc(100vh - 75px);
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
top: 120rpx;
|
||||
height: calc(100vh);
|
||||
/* #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 {
|
||||
/* #ifdef APP-PLUS */
|
||||
height: calc(100vh - 120px);
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
height: calc(100vh - 110px);
|
||||
/* #endif */
|
||||
.con-bg{
|
||||
background: white;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.white-bg {
|
||||
|
||||
@@ -2,55 +2,57 @@
|
||||
<view class="con-body">
|
||||
<view class="con-bg">
|
||||
<!-- 头部 -->
|
||||
<customHeader ref="customHeaderRef" :title="'市场信息查看'" :leftFlag="true" :rightFlag="true">
|
||||
<template #right>
|
||||
</template>
|
||||
<customHeader ref="customHeaderRef" :title="!searchShow?'市场信息查看':'搜索'"
|
||||
:leftFlag="true"
|
||||
:rightFlag="true"
|
||||
@back="handleBack" :searchType="searchShow?1:undefined"
|
||||
>
|
||||
<!-- <template #right v-if="!searchShow">
|
||||
<view class="head-right" @click="handleRead">
|
||||
<img :src="'static/images/icon-clean@2x.png'" />清除未读
|
||||
</view>
|
||||
</template> -->
|
||||
</customHeader>
|
||||
|
||||
<!-- 高度来避免头部遮挡 -->
|
||||
<view class="top-height" :style="{ paddingTop: navBarPaddingTop + 'px' }"></view>
|
||||
<view class="top-height"></view>
|
||||
|
||||
<!-- 搜索处理 -->
|
||||
<customSearch v-if="searchShow" :searchKeywords="searchText" :searchType="searchTypeObj"
|
||||
:checkTypeObj="notictTypeCheck" :searchTypeList="noticeTypeList" @confirm="handleSearchConfirm">
|
||||
</customSearch>
|
||||
<view class="search" v-else @click="handleSearchFocus">
|
||||
<view class="search-bg">
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 正文内容 -->
|
||||
<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> -->
|
||||
<view class="search_center">
|
||||
<view class="category">
|
||||
<view class="flex_row_center_center" @click="showCate">
|
||||
<text>{{selCategory.val||'全部'}}</text>
|
||||
<image src="@/static/images/icon-notice@2x.png" mode=""></image>
|
||||
</view>
|
||||
<view class="pop_arrow" v-if="maskShow"></view>
|
||||
<view class="pop" v-if="maskShow">
|
||||
<text v-for="(item,index) in categories" :key="index"
|
||||
@click="toList(item.categoryId,item.categoryName)">{{item.categoryName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<image class="search_icon" src="@/static/images/icon-notice@2x.png"></image>
|
||||
<input class='sea_input' :focus="inputFocus" type='text' :value="inputval" placeholder="请输入搜索条件"
|
||||
@input="inputChange" @confirm='search' maxlength="50" placeholder-class="placeClass"></input>
|
||||
<image class='clear_content' v-show="inputval" @click="clearInputVal"
|
||||
src="@/static/images/icon-notice@2x.png" />
|
||||
</view>
|
||||
<text class='sea_btn' @click="btnSearch(1)">{{'搜索'}}</text>
|
||||
|
||||
|
||||
<!-- 分页部分 -->
|
||||
<mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
|
||||
<mescroll-uni v-if="!searchShow" 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 }">
|
||||
<view class="white-bg margin-bottom20" v-for="(item, index) in list" :key="index" @click="showDetail(item)">
|
||||
<view class="white-bg margin-bottom20" v-for="(item, index) in list" :key="index"
|
||||
@click="showDetail(item)">
|
||||
<view>
|
||||
<view class="report-list">
|
||||
<view class="title">信息类型:{{ item.informationType }}</view>
|
||||
|
||||
|
||||
<view class="r-list">
|
||||
<view class="r-name"v-if="item.cusName!=null">公司名称:{{ item.cusName }}</view>
|
||||
<view class="r-right btn-gray flex-auto" :class="item.myselfBrowsing==0?'btn-blue':'btn-green'"
|
||||
size="mini">{{item.myselfBrowsing==0?'未读':'已读'}}</view>
|
||||
<view class="r-name" v-if="item.cusName!=null">公司名称:{{ item.cusName }}</view>
|
||||
<view class="r-right btn-gray flex-auto"
|
||||
:class="item.myselfBrowsing==0?'btn-blue':'btn-green'" size="mini">
|
||||
{{item.myselfBrowsing==0?'未读':'已读'}}</view>
|
||||
|
||||
</view>
|
||||
<view class="border-bottom"></view>
|
||||
@@ -70,7 +72,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-uni>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -82,6 +84,7 @@
|
||||
watch
|
||||
} from 'vue'
|
||||
import customHeader from '@/components/customHeader.vue'
|
||||
import customSearch from '@/components/customSearch.vue'
|
||||
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
||||
import {
|
||||
getNavBarPaddingTop
|
||||
@@ -95,7 +98,8 @@
|
||||
import {
|
||||
onLoad,
|
||||
onShow,
|
||||
onUnload
|
||||
onUnload,
|
||||
onHide
|
||||
} from '@dcloudio/uni-app'
|
||||
// 获取导航栏高度用于内容区域padding
|
||||
const navBarPaddingTop = ref(0);
|
||||
@@ -103,10 +107,45 @@
|
||||
navBarPaddingTop.value = getNavBarPaddingTop() * 2;
|
||||
uni.$on('updateStatus', markVisited)
|
||||
})
|
||||
// 搜索处理
|
||||
let searchShow = ref(false);
|
||||
let searchText = ref(undefined);
|
||||
let searchTypeObj = ref({
|
||||
typeId: 3,
|
||||
typeName: '消息类型'
|
||||
});
|
||||
let noticeTypeList = ref([{
|
||||
id: 1,
|
||||
name: '市场机会'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '重大事项信息'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '竞争对手信息'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '人员变化信息'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '重点型号任务信息'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: '通用信息'
|
||||
}
|
||||
]);
|
||||
let notictTypeCheck = ref({}); //选中类型
|
||||
|
||||
// 查询列表
|
||||
let list = ref([]);
|
||||
|
||||
// 新增状态变量存储搜索条件
|
||||
const selValue = ref(''); // 搜索类型名称
|
||||
const inputval = ref(''); // 搜索内容
|
||||
let searchValue = ref(null)
|
||||
//监视查询的内容的变化
|
||||
watch(searchValue, (newValue, oldValue) => {
|
||||
@@ -114,7 +153,6 @@
|
||||
var data = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
searchContent: searchValue.value
|
||||
};
|
||||
viewingMarketInfForAllMembers(data).then(res => {
|
||||
if (res.code == 200) {
|
||||
@@ -123,6 +161,10 @@
|
||||
}
|
||||
})
|
||||
})
|
||||
onHide(()=>{
|
||||
searchShow.value=false;
|
||||
})
|
||||
|
||||
const index = ref(0)
|
||||
const categories = ref([{
|
||||
categoryId: 1,
|
||||
@@ -143,16 +185,39 @@
|
||||
categoryId: 6,
|
||||
categoryName: '通用信息'
|
||||
}])
|
||||
const selCategory = ref ({
|
||||
const selCategory = ref({
|
||||
id: 1,
|
||||
val: ''
|
||||
})
|
||||
// 搜索返回操作
|
||||
const handleBack=()=>{
|
||||
searchShow.value=false;
|
||||
}
|
||||
// 获取input 焦点跳转
|
||||
const handleSearchFocus=()=>{
|
||||
searchShow.value = true;
|
||||
}
|
||||
// 搜索完返回处理
|
||||
const handleSearchConfirm = (param1,param2)=>{
|
||||
// console.log(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;
|
||||
}
|
||||
// 查询搜索跳转
|
||||
let handleSearch = () => {
|
||||
var data = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
searchContent: searchValue.value
|
||||
|
||||
};
|
||||
viewingMarketInfForAllMembers(data).then(res => {
|
||||
if (res.code == 200) {
|
||||
@@ -218,7 +283,8 @@
|
||||
const upCallback = async (mescroll) => {
|
||||
try {
|
||||
setTimeout(async () => {
|
||||
const res = await getViewingMarketInfForAllMembers(mescroll.num, mescroll.size);
|
||||
const res = await getViewingMarketInfForAllMembers(mescroll.num, mescroll.size,selValue.value,
|
||||
inputval.value);
|
||||
if (mescroll.num === 1) {
|
||||
list.value = res.list;
|
||||
} else {
|
||||
@@ -236,7 +302,10 @@
|
||||
return new Promise(async (resolve) => {
|
||||
let param = {
|
||||
pageNum,
|
||||
pageSize
|
||||
pageSize,
|
||||
// 添加搜索条件参数
|
||||
selValue: selValue.value,
|
||||
inputval: inputval.value
|
||||
}
|
||||
let res = await viewingMarketInfForAllMembers(param);
|
||||
resolve({
|
||||
@@ -245,7 +314,6 @@
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
let Loop = ref(0)
|
||||
let now
|
||||
const visistId = ref();
|
||||
@@ -255,7 +323,8 @@
|
||||
|
||||
function showDetail(item) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/business/CRM/marketInformation/informationDetail?informationId=" + item.informationId + '&selValue=' + item.selValue+ '&inputval=' + item.inputval
|
||||
url: "/pages/business/CRM/marketInformation/informationDetail?informationId=" + item.informationId +
|
||||
'&selValue=' + item.selValue + '&inputval=' + item.inputval
|
||||
})
|
||||
}
|
||||
|
||||
@@ -266,14 +335,16 @@
|
||||
const markVisited = (informationId) => {
|
||||
const newList = [...list.value].map(item => {
|
||||
if (item.informationId == informationId) {
|
||||
return { ...item, myselfBrowsing: 1 };
|
||||
return {
|
||||
...item,
|
||||
myselfBrowsing: 1
|
||||
};
|
||||
}
|
||||
return item;
|
||||
});
|
||||
list.value = newList;
|
||||
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
<template>
|
||||
<view class="con-body">
|
||||
<view class="con-bg">
|
||||
<!-- 头部 -->
|
||||
<customHeader ref="customHeaderRef" :title="'回款计划新增'" :leftFlag="true" :rightFlag="true">
|
||||
<template #right>
|
||||
<view class="head-right" @click="submitForm">
|
||||
<uni-icons custom-prefix="iconfont" type="icon-phonebaocun" size="22"
|
||||
color="#B7D2FF"></uni-icons>保存
|
||||
</view>
|
||||
</template>
|
||||
</customHeader>
|
||||
|
||||
<!-- 高度来避免头部遮挡 -->
|
||||
<view class="top-height"></view>
|
||||
|
||||
<!-- 正文内容 -->
|
||||
<view class="white-bg">
|
||||
<view class="form-con">
|
||||
<uni-forms ref="formRef" :model="formData" :rules="rules" label-width="100px">
|
||||
<uni-forms-item label="客户名称" name="cusName" class="f-c-right">
|
||||
<view @click="chooseCustomer" class="form-item-container">
|
||||
<text class="name">{{ formData.cusName || '点击选择客户' }}</text>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="计划回款金额" name="targetAmount" required
|
||||
class="uni-forms-item is-direction-top is-top">
|
||||
<uni-easyinput type="textarea" autoHeight v-model="formData.targetAmount" placeholder="请输入计划回款金额"
|
||||
class="form-texarea" />
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
reactive,
|
||||
onUnmounted,
|
||||
computed
|
||||
} from 'vue'
|
||||
import customHeader from '@/components/customHeader.vue'
|
||||
import {
|
||||
getGuestList
|
||||
} from '@/api/business.js'
|
||||
import {
|
||||
isEmpty
|
||||
} from '@/utils/validate.js'
|
||||
import {
|
||||
addPaymentCollection
|
||||
} from '@/api/crm/api_ys.js'
|
||||
|
||||
|
||||
let customerUser = reactive({})
|
||||
// 客户相关
|
||||
const guestList = ref([])
|
||||
const guestArr = ref([])
|
||||
const guestIndex = ref(0)
|
||||
|
||||
// 表单数据
|
||||
const formData = ref({
|
||||
cusId: null,
|
||||
promiseCode: null,
|
||||
cusName: null,
|
||||
targetAmount: null
|
||||
|
||||
|
||||
})
|
||||
|
||||
// 表单验证规则
|
||||
const rules = {
|
||||
cusName: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '请选择客户'
|
||||
}]
|
||||
},
|
||||
targetAmount: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '请输入回款计划金额'
|
||||
},
|
||||
{
|
||||
format: 'number',
|
||||
errorMessage: '必须输入数字(可包含小数点)'
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
const imgList = ref([])
|
||||
|
||||
// picker 相关
|
||||
const index = ref(0)
|
||||
// 表单引用 & 客户选择器引用
|
||||
const formRef = ref(null)
|
||||
const customHeaderRef = ref(null)
|
||||
// 选择客户页面跳转
|
||||
function chooseCustomer() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/business/CRM/chooseCus'
|
||||
})
|
||||
}
|
||||
//定义数据接收的值
|
||||
let selectedCustomer = reactive(null)
|
||||
|
||||
//监听时间
|
||||
onMounted(() => {
|
||||
uni.$on('onCustomerSelected', handleCustomerSelected)
|
||||
})
|
||||
//取消监听
|
||||
onUnmounted(() => {
|
||||
uni.$off('onCustomerSelected', handleCustomerSelected)
|
||||
})
|
||||
|
||||
//处理 接收数据
|
||||
const handleCustomerSelected = (data) => {
|
||||
formData.value.cusName = data.cusName
|
||||
formData.value.cusId = data.cusId
|
||||
}
|
||||
// 提交表单
|
||||
const submitForm = async () => {
|
||||
try {
|
||||
// 表单校验
|
||||
await formRef.value.validate()
|
||||
const res = await addPaymentCollection(formData.value);
|
||||
console.log(res)
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
icon: 'success'
|
||||
})
|
||||
uni.$emit('refreshList');
|
||||
uni.navigateBack(1)
|
||||
} catch (err) {
|
||||
console.log('表单验证失败:', err)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.white-bg {
|
||||
width: 750rpx;
|
||||
padding: 30rpx 0 0;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px 8px 0 0;
|
||||
}
|
||||
|
||||
.form-con {
|
||||
/* #ifdef APP-PLUS */
|
||||
height: calc(120vh - 100px)
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
height:calc(120vh - 80px)
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
:deep(.uni-date-x) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
:deep(.uni-date-x .icon-calendar) {
|
||||
float: right;
|
||||
margin-top: 15rpx;
|
||||
margin-right: 20rpx;
|
||||
background: url('../../../static/images/business/icon-date.png') no-repeat;
|
||||
background-size: 32rpx 35rpx;
|
||||
width: 32rpx;
|
||||
height: 35rpx;
|
||||
}
|
||||
|
||||
:deep(.uni-date-x .icon-calendar::before) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:deep(.uni-date-x .uni-date__x-input) {
|
||||
padding-left: 20rpx;
|
||||
color: #919191;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,262 @@
|
||||
<template>
|
||||
<view class="con-body">
|
||||
<view class="con-bg">
|
||||
<!-- 头部 -->
|
||||
<customHeader ref="customHeaderRef" :title="'全员信息查看统计表'" :leftFlag="true" :rightFlag="false"></customHeader>
|
||||
|
||||
<!-- 高度来避免头部遮挡 -->
|
||||
<view class="top-height"></view>
|
||||
|
||||
<!-- 正文内容 -->
|
||||
<view>
|
||||
<!-- 搜索 -->
|
||||
<view class="search">
|
||||
<picker :value="index1" @change="handlePlace1" :range="monthArray" :range-key="'name'"
|
||||
class="picker-bg">
|
||||
<view class="picker">
|
||||
<uni-icons custom-prefix="iconfont" color="#ffffff" type="icon-phoneshizhong"
|
||||
size="18"></uni-icons>
|
||||
<view>{{ monthArray[index1]?.name || '选择月份' }}</view>
|
||||
<uni-icons type="down" size="18"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
<picker @change="handlePlace" :value="index2" :range="palceArray" class="picker-bg"
|
||||
:range-key="'name'">
|
||||
<view class="picker">
|
||||
<uni-icons type="person" size="18"></uni-icons>
|
||||
<view>{{palceArray[index2]?.name || '选择区域' }}</view>
|
||||
<uni-icons type="down" size="18"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
<button type="default" @click="handleSearch" size="mini" class="btn-search">查询</button>
|
||||
</view>
|
||||
|
||||
<!-- 回款信息查询 -->
|
||||
<view class="white-bg">
|
||||
<view class="table-title">回款信息查询</view>
|
||||
<view v-if="loading" class="loading-container">
|
||||
<uni-load-more status="loading" contentText="加载中..."></uni-load-more>
|
||||
</view>
|
||||
<!-- 添加空数据提示 -->
|
||||
<view v-else-if="tableData.length === 0" class="empty-tip">
|
||||
暂无数据
|
||||
</view>
|
||||
|
||||
|
||||
<table v-else class="my-table">
|
||||
<tr>
|
||||
<th class="tab-width100">业务员姓名</th>
|
||||
<!-- <th class="tab-width160">客户名称</th> -->
|
||||
<th>目标回款</th>
|
||||
<th>实际回款</th>
|
||||
<th>完成度</th>
|
||||
</tr>
|
||||
<tr v-for="(item, index) in tableData" :key="index">
|
||||
<td>{{ item.userName }}</td>
|
||||
<!-- <td class="txtLeft">{{ item.guestName }}</td> -->
|
||||
<td>{{ item.targetAmount }}</td>
|
||||
<td>{{ item.backMoneyRatio }}</td>
|
||||
<td>{{ item.jisuan }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
onMounted
|
||||
} from 'vue'
|
||||
import customHeader from '@/components/customHeader.vue'
|
||||
import {
|
||||
getDate
|
||||
} from '@/utils/datetime.js'
|
||||
import {
|
||||
getFullStaffStatisticsViewingTable
|
||||
} from '@/api/crm/api_ys.js'
|
||||
const loading = ref(false) // 加载状态
|
||||
const index1 = ref(0)
|
||||
const index2 = ref(0)
|
||||
let peopleIndex = ref(0);
|
||||
// 选择列表
|
||||
let bindPickerChange = (e) => {
|
||||
console.log('picker发送选择改变,携带值为', e.detail.value)
|
||||
peopleIndex.value = e.detail.value
|
||||
}
|
||||
|
||||
let searchValue = ref(null)
|
||||
// 查询搜索跳转
|
||||
let handleSearch = () => {
|
||||
getCrmMarketInformationList();
|
||||
}
|
||||
// 表单数据
|
||||
const formData = ref({
|
||||
month: "1",
|
||||
region: "北京大区",
|
||||
})
|
||||
const tableData = ref([])
|
||||
const palceArray = ref([{
|
||||
id: 1,
|
||||
name: '北京大区'
|
||||
}, {
|
||||
id: 2,
|
||||
name: '市场三部'
|
||||
}, {
|
||||
id: 3,
|
||||
name: '市场二部'
|
||||
}, {
|
||||
id: 4,
|
||||
name: '南方大区'
|
||||
}, {
|
||||
id: 5,
|
||||
name: '北方大区'
|
||||
}, {
|
||||
id: 6,
|
||||
name: '西部大区'
|
||||
}])
|
||||
const monthArray = ref([
|
||||
{ id: 1, name: '1月' },
|
||||
{ id: 2, name: '2月' },
|
||||
{ id: 3, name: '3月' },
|
||||
{ id: 4, name: '4月' },
|
||||
{ id: 5, name: '5月' },
|
||||
{ id: 6, name: '6月' },
|
||||
{ id: 7, name: '7月' },
|
||||
{ id: 8, name: '8月' },
|
||||
{ id: 9, name: '9月' },
|
||||
{ id: 10, name: '10月' },
|
||||
{ id: 11, name: '11月' },
|
||||
{ id: 12, name: '12月' }
|
||||
])
|
||||
const handlePlace1 = (e) => {
|
||||
index1.value = e.detail.value
|
||||
console.log('index1:', monthArray.value[e.detail.value]?.name)
|
||||
formData.value.month = monthArray.value[e.detail.value]?.id || ''
|
||||
}
|
||||
const handlePlace = (e) => {
|
||||
index2.value = e.detail.value
|
||||
console.log('index2:', palceArray.value[e.detail.value]?.name)
|
||||
formData.value.region = palceArray.value[e.detail.value]?.name || ''
|
||||
}
|
||||
|
||||
// 获取数据列表
|
||||
const getCrmMarketInformationList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await getFullStaffStatisticsViewingTable(formData.value);
|
||||
// 直接赋值给响应式变量
|
||||
tableData.value = res.rows || []
|
||||
console.log('获取到的数据:', tableData.value)
|
||||
} catch (error) {
|
||||
console.error('获取数据失败:', error)
|
||||
uni.showToast({
|
||||
title: '获取数据失败',
|
||||
icon: 'error'
|
||||
})
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
// 获取数据列表(无参数)
|
||||
const getCrmMarketInformationListNoPo = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await getFullStaffStatisticsViewingTable();
|
||||
// 直接赋值给响应式变量
|
||||
tableData.value = res.rows || []
|
||||
console.log('获取到的数据:', tableData.value)
|
||||
} catch (error) {
|
||||
console.error('获取数据失败:', error)
|
||||
uni.showToast({
|
||||
title: '获取数据失败',
|
||||
icon: 'error'
|
||||
})
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
getCrmMarketInformationListNoPo()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search {
|
||||
display: flex;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.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 .picker-bg {
|
||||
display: flex;
|
||||
background-color: #6FA2F8;
|
||||
border-radius: 25px;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
padding: 0rpx 20rpx;
|
||||
/* #ifndef APP-PLUS */
|
||||
padding: 10rpx 20rpx 0 20rpx;
|
||||
/* #endif */
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.search .picker-bg .picker {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* #ifndef APP-PLUS */
|
||||
padding-top: 2rpx;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.search .picker-bg .picker .uni-icons {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.search .picker-bg .picker .uni-icons:first-child {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.search .picker-bg .picker .uniui-down {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.white-bg {
|
||||
width: 750rpx;
|
||||
margin: 0;
|
||||
border-radius: 8px 8px 0 0;
|
||||
padding: 20rpx 0rpx;
|
||||
margin-top: 20rpx;
|
||||
/* #ifdef APP-PLUS */
|
||||
height: calc(100vh - 135px);
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
height: calc(100vh - 112px);
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.table-title {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
border-bottom: 2px solid #E7E7E7;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
</style>
|
||||
254
src/pages/business/CRM/paymentCollection/index.vue
Normal file
254
src/pages/business/CRM/paymentCollection/index.vue
Normal file
@@ -0,0 +1,254 @@
|
||||
<template>
|
||||
<view class="con-body">
|
||||
<view class="con-bg">
|
||||
<!-- 头部 -->
|
||||
<customHeader ref="customHeaderRef" :title="'个人回款信息查看'" :leftFlag="true" :rightFlag="true">
|
||||
<template #right>
|
||||
<view class="head-right" @click="handleAdd">
|
||||
<uni-icons type="plus" size="24" color="#B7D2FF"></uni-icons>新增
|
||||
</view>
|
||||
</template>
|
||||
</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"
|
||||
class="scroll-h" :class="{ 'loading-scroll': cssFlag }">
|
||||
<view class="white-bg margin-bottom20" v-for="(item, index) in list" :key="index" @click="touchstart(item)">
|
||||
<view>
|
||||
<view class="report-list">
|
||||
<view class="title">客户:{{ item.cusName }}</view>
|
||||
<view class="r-list">
|
||||
<!-- <view class="r-name">{{ item.visistCode }}</view> -->
|
||||
|
||||
</view>
|
||||
<view class="border-bottom"></view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">计划年份</view>
|
||||
<view class="r-right">{{ item.year }}</view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">计划月份</view>
|
||||
<view class="r-right">{{ item.month }}</view>
|
||||
</view>
|
||||
<view class="border-bottom"></view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">创建时间</view>
|
||||
<view class="r-right">{{ item.createTime }}</view>
|
||||
</view>
|
||||
<view class="border-bottom"></view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">计划汇款金额</view>
|
||||
<view class="r-right" style="color: red;">{{ item.targetAmount }}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-uni>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, watch,onUnmounted } from 'vue'
|
||||
import customHeader from '@/components/customHeader.vue'
|
||||
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
||||
import { getNavBarPaddingTop } from '@/utils/system.js'
|
||||
import { visitorReportList } from '@/api/business.js'
|
||||
import { getPaymentList } from '@/api/crm/api_ys.js';
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
// 获取导航栏高度用于内容区域padding
|
||||
const navBarPaddingTop = ref(0);
|
||||
onMounted(() => {
|
||||
navBarPaddingTop.value = getNavBarPaddingTop() * 2;
|
||||
})
|
||||
|
||||
// 查询列表
|
||||
let list = ref([]);
|
||||
|
||||
let searchValue = ref(null)
|
||||
|
||||
//监视查询的内容的变化
|
||||
watch(searchValue, (newValue, oldValue) => {
|
||||
//变化了之后,重新查询内容
|
||||
var data = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
searchContent: searchValue.value
|
||||
};
|
||||
getYsVisistList(data).then(res => {
|
||||
if (res.code == 200) {
|
||||
//设置列表数据
|
||||
list.value = res.rows;
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// 新增
|
||||
let handleAdd = () => {
|
||||
uni.navigateTo({url: '/pages/business/CRM/paymentCollection/addPaymentCollection'})
|
||||
}
|
||||
|
||||
|
||||
const mescrollRef = ref(null);
|
||||
const upOption = ref({
|
||||
page: {num: 0, size: 10},
|
||||
noMoreSize: 5,
|
||||
empty: {tip: '~ 空空如也 ~'},
|
||||
textLoading: '加载中...',
|
||||
textNoMore: '已经到底了'
|
||||
});
|
||||
|
||||
const downOption = ref({
|
||||
auto: true,
|
||||
textInOffset: '下拉刷新',
|
||||
textOutOffset: '释放更新',
|
||||
textLoading: '刷新中...'
|
||||
});
|
||||
|
||||
let cssFlag = ref(false);//控制样式
|
||||
const mescrollInit = (mescroll) => {
|
||||
cssFlag.value = true;
|
||||
mescrollRef.value = mescroll;
|
||||
};
|
||||
|
||||
// 下拉刷新
|
||||
const downCallback = async (mescroll) => {
|
||||
try {
|
||||
setTimeout(async () => {
|
||||
const res = await GetPaymentList(1, upOption.value.page.size);
|
||||
cssFlag.value = false;
|
||||
list.value = res.list;
|
||||
mescroll.resetUpScroll();
|
||||
}, 500);
|
||||
} catch (error) {
|
||||
mescroll.endErr();
|
||||
} finally {
|
||||
setTimeout(async () => {
|
||||
mescroll.endSuccess();
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
// 上拉加载更多
|
||||
const upCallback = async (mescroll) => {
|
||||
try {
|
||||
setTimeout(async () => {
|
||||
const res = await GetPaymentList(mescroll.num, mescroll.size);
|
||||
if (mescroll.num === 1) {
|
||||
list.value = res.list;
|
||||
} else {
|
||||
list.value.push(...res.list);
|
||||
}
|
||||
mescroll.endBySize(res.list.length, res.total);
|
||||
}, 500);
|
||||
} catch (error) {
|
||||
mescroll.endErr();
|
||||
}
|
||||
}
|
||||
|
||||
// 获取数据列表
|
||||
const GetPaymentList = (pageNum, pageSize) => {
|
||||
return new Promise(async (resolve) => {
|
||||
let param = {
|
||||
pageNum,
|
||||
pageSize
|
||||
}
|
||||
let res = await getPaymentList(param);
|
||||
resolve({
|
||||
list: res.rows,
|
||||
total: res.total
|
||||
});
|
||||
});
|
||||
}
|
||||
let Loop = ref(0)
|
||||
|
||||
function touchstart(item) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/business/CRM/paymentCollection/paymentDetail?collectionId=" + item.collectionId + '&cusId=' + item.cusId + '&targetAmount=' + item.targetAmount + '&cusName=' + item.cusName
|
||||
})
|
||||
}
|
||||
// 生命周期钩子
|
||||
onShow(() => {
|
||||
// 监听刷新事件
|
||||
|
||||
uni.$on('refreshList', GetPaymentList(1,10))
|
||||
|
||||
// 页面显示时也加载一次数据
|
||||
GetPaymentList(1,10)
|
||||
})
|
||||
onUnmounted(() => {
|
||||
// 移除监听(避免重复触发)
|
||||
uni.$off('refreshList')
|
||||
})
|
||||
onMounted(() => {
|
||||
GetPaymentList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.all-body {
|
||||
/* #ifdef APP-PLUS */
|
||||
top: 150rpx;
|
||||
height: calc(100vh - 75px);
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
top: 120rpx;
|
||||
height: calc(100vh);
|
||||
/* #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 {
|
||||
/* #ifdef APP-PLUS */
|
||||
height: calc(100vh - 120px);
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
height: calc(100vh - 110px);
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.white-bg {
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,106 @@
|
||||
<template>
|
||||
<view class="con-body">
|
||||
<view class="con-bg">
|
||||
<!-- 头部 -->
|
||||
<customHeader ref="customHeaderRef" :title="'回款计划查看'" :leftFlag="true" :rightFlag="true">
|
||||
<template #right>
|
||||
<!-- <view class="head-right" @click="submitForm">
|
||||
<uni-icons custom-prefix="iconfont" type="icon-phonebaocun" size="22"
|
||||
color="#B7D2FF"></uni-icons>保存
|
||||
</view> -->
|
||||
</template>
|
||||
</customHeader>
|
||||
|
||||
<!-- 高度来避免头部遮挡 -->
|
||||
<view class="top-height"></view>
|
||||
|
||||
<!-- 正文内容 -->
|
||||
<view class="white-bg">
|
||||
<view class="form-con">
|
||||
<uni-forms ref="formRef" :model="formData" :rules="rules" label-width="100px">
|
||||
<uni-forms-item label="全员统计查看" name="cusName" class="f-c-right" >
|
||||
<view @click="DiligenceStatistics" class="form-item-container">
|
||||
<text class="name">{{'点击跳转'}}</text>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="个人详细查看" name="cusName" class="f-c-right">
|
||||
<view @click="MarketActivity" class="form-item-container">
|
||||
<text class="name">{{'点击跳转'}}</text>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
reactive,
|
||||
onUnmounted,
|
||||
computed
|
||||
} from 'vue'
|
||||
import customHeader from '@/components/customHeader.vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { useMessage } from '@/utils/message.js'
|
||||
import cache from '@/utils/cache.js'
|
||||
|
||||
|
||||
// 选择客户页面跳转
|
||||
function DiligenceStatistics() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/business/CRM/paymentCollection/fullStaffStatisticsViewingTable'
|
||||
})
|
||||
}
|
||||
// 选择客户页面跳转
|
||||
function MarketActivity() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/business/CRM/paymentCollection/personalPaymentCollectionTable'
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.white-bg {
|
||||
width: 750rpx;
|
||||
padding: 30rpx 0 0;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px 8px 0 0;
|
||||
}
|
||||
|
||||
.form-con {
|
||||
/* #ifdef APP-PLUS */
|
||||
height: calc(120vh - 100px)
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
height:calc(120vh - 80px)
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
:deep(.uni-date-x) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
:deep(.uni-date-x .icon-calendar) {
|
||||
float: right;
|
||||
margin-top: 15rpx;
|
||||
margin-right: 20rpx;
|
||||
background: url('../../../static/images/business/icon-date.png') no-repeat;
|
||||
background-size: 32rpx 35rpx;
|
||||
width: 32rpx;
|
||||
height: 35rpx;
|
||||
}
|
||||
|
||||
:deep(.uni-date-x .icon-calendar::before) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:deep(.uni-date-x .uni-date__x-input) {
|
||||
padding-left: 20rpx;
|
||||
color: #919191;
|
||||
}
|
||||
</style>
|
||||
213
src/pages/business/CRM/paymentCollection/paymentDetail.vue
Normal file
213
src/pages/business/CRM/paymentCollection/paymentDetail.vue
Normal file
@@ -0,0 +1,213 @@
|
||||
<template>
|
||||
<view class="con-body">
|
||||
<view class="con-bg">
|
||||
<!-- 头部 -->
|
||||
<customHeader ref="customHeaderRef" :title="'回款任务单修改'" :leftFlag="true" :rightFlag="true">
|
||||
<template #right>
|
||||
<view class="head-right" @click="submitForm">
|
||||
<uni-icons custom-prefix="iconfont" type="icon-phonebaocun" size="22"
|
||||
color="#B7D2FF"></uni-icons>保存
|
||||
</view>
|
||||
</template>
|
||||
</customHeader>
|
||||
|
||||
<!-- 高度来避免头部遮挡 -->
|
||||
<view class="top-height"></view>
|
||||
|
||||
<!-- 正文内容 -->
|
||||
<view class="white-bg">
|
||||
<view class="form-con">
|
||||
<uni-forms ref="formRef" :model="formData" :rules="rules" label-width="100px">
|
||||
<uni-forms-item label="客户名称" name="cusName" class="f-c-right">
|
||||
<view @click="chooseCustomer" class="form-item-container">
|
||||
<text class="name">{{ formData.cusName || '点击选择客户' }}</text>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="计划回款金额" name="targetAmount" required
|
||||
class="uni-forms-item is-direction-top is-top">
|
||||
<uni-easyinput type="textarea" autoHeight v-model="formData.targetAmount"
|
||||
placeholder="请输入计划回款金额" class="form-texarea" />
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<view class="footer-con">
|
||||
<button class="btn-default" type="default" @click="handleDelete" size="mini">删 除</button>
|
||||
<button class="btn-primary" type="primary" @click="submitForm" size="mini">保存/修改</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
reactive,
|
||||
onUnmounted,
|
||||
computed
|
||||
} from 'vue'
|
||||
import customHeader from '@/components/customHeader.vue'
|
||||
import {
|
||||
getGuestList
|
||||
} from '@/api/business.js'
|
||||
import {
|
||||
isEmpty
|
||||
} from '@/utils/validate.js'
|
||||
import {
|
||||
updatePaymentDetail,deletePaymentDetail
|
||||
} from '@/api/crm/api_ys.js'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { useMessage } from '@/utils/message.js'
|
||||
import cache from '@/utils/cache.js'
|
||||
let customerUser = reactive({})
|
||||
// 客户相关
|
||||
const guestList = ref([])
|
||||
const guestArr = ref([])
|
||||
const guestIndex = ref(0)
|
||||
|
||||
// 表单数据
|
||||
const formData = ref({
|
||||
cusId: null,
|
||||
promiseCode: null,
|
||||
cusName:null,
|
||||
targetAmount:null,
|
||||
collectionId:null
|
||||
})
|
||||
|
||||
// 表单验证规则
|
||||
const rules = {
|
||||
cusName: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '请选择客户'
|
||||
}]
|
||||
},
|
||||
targetAmount: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '请输入回款计划金额'
|
||||
},
|
||||
{
|
||||
format: 'number',
|
||||
errorMessage: '必须输入数字(可包含小数点)'
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
const imgList = ref([])
|
||||
|
||||
// picker 相关
|
||||
const index = ref(0)
|
||||
// 表单引用 & 客户选择器引用
|
||||
const formRef = ref(null)
|
||||
const customHeaderRef = ref(null)
|
||||
// 选择客户页面跳转
|
||||
function chooseCustomer() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/business/CRM/chooseCus'
|
||||
})
|
||||
}
|
||||
//定义数据接收的值
|
||||
let selectedCustomer = reactive(null)
|
||||
|
||||
//监听时间
|
||||
onMounted(() => {
|
||||
uni.$on('onCustomerSelected', handleCustomerSelected)
|
||||
})
|
||||
//取消监听
|
||||
onUnmounted(() => {
|
||||
uni.$off('onCustomerSelected', handleCustomerSelected)
|
||||
})
|
||||
|
||||
//处理 接收数据
|
||||
const handleCustomerSelected = (data) => {
|
||||
formData.value.cusName = data.cusName
|
||||
formData.value.cusId = data.cusId
|
||||
}
|
||||
// 提交表单
|
||||
const submitForm = async () => {
|
||||
try {
|
||||
// 表单校验
|
||||
await formRef.value.validate()
|
||||
const res = await updatePaymentDetail(formData.value);
|
||||
console.log(res)
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
icon: 'success'
|
||||
})
|
||||
uni.$emit('refreshMarketOpportunityList')
|
||||
uni.navigateBack(1)
|
||||
} catch (err) {
|
||||
console.log('表单验证失败:', err)
|
||||
}
|
||||
}
|
||||
|
||||
//定义查询参数
|
||||
const queryParams = ref({
|
||||
informationId: 0
|
||||
})
|
||||
onLoad(options => {
|
||||
formData.value.cusName = options.cusName
|
||||
formData.value.cusId = options.cusId
|
||||
formData.value.collectionId = options.collectionId
|
||||
formData.value.targetAmount = options.targetAmount;
|
||||
})
|
||||
|
||||
// 根据ID删除表单
|
||||
const handleDelete = async () => {
|
||||
try {
|
||||
|
||||
const res = await deletePaymentDetail(formData.value);
|
||||
uni.showToast({
|
||||
title: '删除成功',
|
||||
icon: 'success'
|
||||
})
|
||||
uni.$emit('refreshMarketOpportunityList')
|
||||
uni.navigateBack(1)
|
||||
} catch (err) {
|
||||
console.log('表单验证失败:', err)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.white-bg {
|
||||
width: 750rpx;
|
||||
padding: 30rpx 0 0;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px 8px 0 0;
|
||||
}
|
||||
|
||||
.form-con {
|
||||
/* #ifdef APP-PLUS */
|
||||
height: calc(120vh - 100px)
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
height:calc(120vh - 80px)
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
:deep(.uni-date-x) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
:deep(.uni-date-x .icon-calendar) {
|
||||
float: right;
|
||||
margin-top: 15rpx;
|
||||
margin-right: 20rpx;
|
||||
background: url('../../../static/images/business/icon-date.png') no-repeat;
|
||||
background-size: 32rpx 35rpx;
|
||||
width: 32rpx;
|
||||
height: 35rpx;
|
||||
}
|
||||
|
||||
:deep(.uni-date-x .icon-calendar::before) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:deep(.uni-date-x .uni-date__x-input) {
|
||||
padding-left: 20rpx;
|
||||
color: #919191;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,294 @@
|
||||
<template>
|
||||
<view class="con-body">
|
||||
<view class="con-bg">
|
||||
<!-- 头部 -->
|
||||
<customHeader ref="customHeaderRef" :title="'个人详情查看统计表'" :leftFlag="true" :rightFlag="false"></customHeader>
|
||||
|
||||
<!-- 高度来避免头部遮挡 -->
|
||||
<view class="top-height"></view>
|
||||
|
||||
<!-- 正文内容 -->
|
||||
<view>
|
||||
<!-- 搜索 -->
|
||||
<view class="search">
|
||||
<picker :value="index1" @change="handlePlace1" :range="monthArray" :range-key="'name'"
|
||||
class="picker-bg">
|
||||
<view class="picker">
|
||||
<uni-icons custom-prefix="iconfont" color="#ffffff" type="icon-phoneshizhong"
|
||||
size="18"></uni-icons>
|
||||
<view>{{ monthArray[index1]?.name || '选择月份' }}</view>
|
||||
<uni-icons type="down" size="18"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
<!-- <picker @change="handlePlace" :value="index2" :range="palceArray" class="picker-bg"
|
||||
:range-key="'name'">
|
||||
<view class="picker">
|
||||
<uni-icons type="person" size="18"></uni-icons>
|
||||
<view>{{palceArray[index2]?.name || '选择区域' }}</view>
|
||||
<uni-icons type="down" size="18"></uni-icons>
|
||||
</view>
|
||||
</picker> -->
|
||||
<view class="picker-bg">
|
||||
<view class="picker">
|
||||
<uni-icons type="person" size="18" color="#ffffff"></uni-icons>
|
||||
<input
|
||||
class="search-input"
|
||||
v-model="formData.bandResult"
|
||||
placeholder="输入业务员"
|
||||
placeholder-style="color:#ffffff;font-size:28rpx"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<button type="default" @click="handleSearch" size="mini" class="btn-search">查询</button>
|
||||
</view>
|
||||
|
||||
<!-- 回款信息查询 -->
|
||||
<view class="white-bg">
|
||||
<view class="table-title">回款信息查询</view>
|
||||
<view v-if="loading" class="loading-container">
|
||||
<uni-load-more status="loading" contentText="加载中..."></uni-load-more>
|
||||
</view>
|
||||
<!-- 添加空数据提示 -->
|
||||
<view v-else-if="tableData.length === 0" class="empty-tip">
|
||||
暂无数据
|
||||
</view>
|
||||
|
||||
|
||||
<table v-else class="my-table">
|
||||
<tr>
|
||||
<th class="tab-width100">业务员姓名</th>
|
||||
<th class="tab-width160">客户名称</th>
|
||||
<th>目标回款</th>
|
||||
<th>实际回款</th>
|
||||
<th>完成度</th>
|
||||
</tr>
|
||||
<tr v-for="(item, index) in tableData" :key="index">
|
||||
<td>{{ item.userName }}</td>
|
||||
<td class="txtLeft">{{ item.cusName }}</td>
|
||||
<td>{{ item.targetAmount }}</td>
|
||||
<td>{{ item.backNum }}</td>
|
||||
<td>{{ item.jisuan }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
onMounted
|
||||
} from 'vue'
|
||||
import customHeader from '@/components/customHeader.vue'
|
||||
import {
|
||||
getDate
|
||||
} from '@/utils/datetime.js'
|
||||
import {
|
||||
getPersonalPaymentCollectionTable
|
||||
} from '@/api/crm/api_ys.js'
|
||||
const loading = ref(false) // 加载状态
|
||||
const index1 = ref(0)
|
||||
const index2 = ref(0)
|
||||
let peopleIndex = ref(0);
|
||||
// 选择列表
|
||||
let bindPickerChange = (e) => {
|
||||
console.log('picker发送选择改变,携带值为', e.detail.value)
|
||||
peopleIndex.value = e.detail.value
|
||||
}
|
||||
|
||||
let searchValue = ref(null)
|
||||
// 查询搜索跳转
|
||||
let handleSearch = () => {
|
||||
getCrmMarketInformationList();
|
||||
}
|
||||
// 表单数据
|
||||
const formData = ref({
|
||||
month: "1",
|
||||
bandResult: '',
|
||||
})
|
||||
const tableData = ref([])
|
||||
const palceArray = ref([{
|
||||
id: 1,
|
||||
name: '北京大区'
|
||||
}, {
|
||||
id: 2,
|
||||
name: '市场三部'
|
||||
}, {
|
||||
id: 3,
|
||||
name: '市场二部'
|
||||
}, {
|
||||
id: 4,
|
||||
name: '南方大区'
|
||||
}, {
|
||||
id: 5,
|
||||
name: '北方大区'
|
||||
}, {
|
||||
id: 6,
|
||||
name: '西部大区'
|
||||
}])
|
||||
const monthArray = ref([
|
||||
{ id: 1, name: '1月' },
|
||||
{ id: 2, name: '2月' },
|
||||
{ id: 3, name: '3月' },
|
||||
{ id: 4, name: '4月' },
|
||||
{ id: 5, name: '5月' },
|
||||
{ id: 6, name: '6月' },
|
||||
{ id: 7, name: '7月' },
|
||||
{ id: 8, name: '8月' },
|
||||
{ id: 9, name: '9月' },
|
||||
{ id: 10, name: '10月' },
|
||||
{ id: 11, name: '11月' },
|
||||
{ id: 12, name: '12月' }
|
||||
])
|
||||
const handlePlace1 = (e) => {
|
||||
index1.value = e.detail.value
|
||||
console.log('index1:', monthArray.value[e.detail.value]?.name)
|
||||
formData.value.month = monthArray.value[e.detail.value]?.id || ''
|
||||
}
|
||||
const handlePlace = (e) => {
|
||||
index2.value = e.detail.value
|
||||
console.log('index2:', palceArray.value[e.detail.value]?.name)
|
||||
formData.value.region = palceArray.value[e.detail.value]?.name || ''
|
||||
}
|
||||
|
||||
// 获取数据列表
|
||||
const getCrmMarketInformationList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await getPersonalPaymentCollectionTable(formData.value);
|
||||
// 直接赋值给响应式变量
|
||||
tableData.value = res.rows || []
|
||||
console.log('获取到的数据:', tableData.value)
|
||||
} catch (error) {
|
||||
console.error('获取数据失败:', error)
|
||||
uni.showToast({
|
||||
title: '获取数据失败',
|
||||
icon: 'error'
|
||||
})
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
// 获取数据列表(无参数)
|
||||
const getPersonalPaymentCollectionTableNoPo = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await getPersonalPaymentCollectionTable();
|
||||
// 直接赋值给响应式变量
|
||||
tableData.value = res.rows || []
|
||||
console.log('获取到的数据:', tableData.value)
|
||||
} catch (error) {
|
||||
console.error('获取数据失败:', error)
|
||||
uni.showToast({
|
||||
title: '获取数据失败',
|
||||
icon: 'error'
|
||||
})
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
getPersonalPaymentCollectionTableNoPo()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 新增搜索输入框样式 */
|
||||
.search-input {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: none;
|
||||
padding: 0 10rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.search-input::placeholder {
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
|
||||
/* 保持原有样式 */
|
||||
.search {
|
||||
display: flex;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.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 .picker-bg {
|
||||
/* display: flex; */
|
||||
background-color: #6FA2F8;
|
||||
border-radius: 25px;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
padding: 0rpx 20rpx;
|
||||
/* #ifndef APP-PLUS */
|
||||
padding: 10rpx 20rpx 0 20rpx;
|
||||
/* #endif */
|
||||
margin-right: 20rpx;
|
||||
/* 设置固定宽度确保布局一致 */
|
||||
width: 102.72px;
|
||||
}
|
||||
|
||||
.search .picker-bg .picker {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%; /* 确保picker占据全部宽度 */
|
||||
/* #ifndef APP-PLUS */
|
||||
padding-top: 2rpx;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.search .picker-bg .picker .uni-icons {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.search .picker-bg .picker .uni-icons:first-child {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.search .picker-bg .picker .uniui-down {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.white-bg {
|
||||
width: 750rpx;
|
||||
margin: 0;
|
||||
border-radius: 8px 8px 0 0;
|
||||
padding: 20rpx 0rpx;
|
||||
margin-top: 20rpx;
|
||||
/* #ifdef APP-PLUS */
|
||||
height: calc(100vh - 135px);
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
height: calc(100vh - 112px);
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.table-title {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
border-bottom: 2px solid #E7E7E7;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -8,7 +8,7 @@
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- 高度来避免头部遮挡 -->
|
||||
<view class="top-height" :style="{ paddingTop: navBarPaddingTop + 'px' }"></view>
|
||||
<view class="top-height"></view>
|
||||
|
||||
<view class="white-bg">
|
||||
<navigator url="/pages/business/CRM/plan/myPlan">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<view class="top-height"></view>
|
||||
|
||||
<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">
|
||||
{{ yearMonth }}
|
||||
<view v-if="isThisWeek" style=" display: inline-block;">
|
||||
@@ -54,10 +54,11 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='bottom-spliter bg-gray'></view>
|
||||
</block>
|
||||
|
||||
<!-- 底部加高度来避免tabbar遮挡 -->
|
||||
<view class="bottom-height"></view>
|
||||
<!-- <view class="bottom-height bg-gray"></view> -->
|
||||
</view>
|
||||
|
||||
|
||||
@@ -106,12 +107,12 @@ let getWorkEvent = (index) => {
|
||||
const refreshPlanList = () => {
|
||||
message.showLoading();
|
||||
// 获取用户信息
|
||||
getUserInfo().then(res => {
|
||||
userInfo.value = res.user;
|
||||
console.log(route.path, ":用户信息获取成功");
|
||||
}).catch(err => {
|
||||
console.warn(err, "用户信息获取失败")
|
||||
});
|
||||
// getUserInfo().then(res => {
|
||||
// userInfo.value = res.user;
|
||||
// console.log(route.path, ":用户信息获取成功");
|
||||
// }).catch(err => {
|
||||
// console.warn(err, "用户信息获取失败")
|
||||
// });
|
||||
// 获取周计划列表
|
||||
getWeeklyPlanList(queryParams.value).then(res => {
|
||||
const {rows} = res;
|
||||
@@ -180,11 +181,11 @@ function handleCreate() {
|
||||
handlePlanEdit({itemList, selectIndex: result.tapIndex}, true);
|
||||
}).catch((err) => {
|
||||
console.warn(err, "已存在周计划")
|
||||
uni.showToast({
|
||||
icon: 'error',
|
||||
title: '已有本周或下周计划',
|
||||
duration: 2000
|
||||
})
|
||||
// uni.showToast({
|
||||
// icon: 'error',
|
||||
// title: '已有本周或下周计划',
|
||||
// duration: 2000
|
||||
// })
|
||||
})
|
||||
// }else{ // 创建下周计划
|
||||
// }
|
||||
@@ -234,7 +235,7 @@ function handleEdit(index) {
|
||||
// console.log(JSON.stringify(formData))
|
||||
console.log(route.path, formData, "前往修改页面");
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -268,9 +269,14 @@ function handleEdit(index) {
|
||||
}
|
||||
|
||||
.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 {
|
||||
background-color: #5C96F7;
|
||||
}
|
||||
@@ -280,14 +286,14 @@ function handleEdit(index) {
|
||||
}
|
||||
|
||||
.nav-list {
|
||||
/* display: flex;*/
|
||||
/* width: 690rpx;*/
|
||||
/* display: flex;*/
|
||||
/* width: 690rpx;*/
|
||||
overflow-x: auto; /* 允许横向滚动 */
|
||||
/*overflow-y: hidden; 隐藏垂直滚动 */
|
||||
/*-ms-overflow-style: none; IE 隐藏滚动条 */
|
||||
/* scrollbar-width: none; */ /*Firefox 隐藏滚动条 */
|
||||
/* 添加高度以确保有足够的空间 */
|
||||
/* height: 80rpx;*/
|
||||
/* height: 80rpx;*/
|
||||
white-space: nowrap; /* 保持子元素在同一行显示 */
|
||||
/* 添加这些属性确保滚动正常工作 */
|
||||
scroll-behavior: smooth;
|
||||
@@ -304,7 +310,7 @@ function handleEdit(index) {
|
||||
}
|
||||
.nav-list .nav-item {
|
||||
/* flex: 0 0 auto; 关键:不放大、不缩小、自动宽度 */
|
||||
/* width: 200rpx;*/
|
||||
/* width: 200rpx;*/
|
||||
display: inline-block;
|
||||
background-color: #05A3F4;
|
||||
border-radius: 10rpx;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- 头部 -->
|
||||
<customHeader ref="customHeaderRef" :title="title" :leftFlag="true" :rightFlag="true">
|
||||
<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"
|
||||
color="#B7D2FF"></uni-icons>
|
||||
保存
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<!-- 正文内容 -->
|
||||
<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>
|
||||
<uni-forms ref="formRef" :model="weekPlanFormData" :rules="rules" label-width="100px" label-position="top">
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
</customHeader>
|
||||
|
||||
<!-- 高度来避免头部遮挡 -->
|
||||
<view class="top-height" :style="{ paddingTop: navBarPaddingTop + 'px' }"></view>
|
||||
|
||||
<view class="top-height"></view>
|
||||
<!-- 正文内容 -->
|
||||
<view>
|
||||
|
||||
@@ -366,6 +365,13 @@ let handleDetail = (rowIndex, colIndex) => {
|
||||
width: 690rpx;
|
||||
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*/);
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
min-height: calc(100vh - 116rpx/*.topbar height*/ - 68rpx/*.search height*/ - 40rpx/*.white-bg padding-top*/ - 40rpx/*.white-bg padding-bottom*/);
|
||||
/* #endif */
|
||||
//overflow-y: auto;
|
||||
}
|
||||
|
||||
.white-bg.white-bg-2 {
|
||||
|
||||
@@ -87,6 +87,8 @@ page {
|
||||
|
||||
|
||||
/* 弹出提示框修改样式 begin */
|
||||
/* #ifdef H5 */
|
||||
|
||||
.uni-modal {
|
||||
border-radius: 24rpx !important;
|
||||
width: 70% !important;
|
||||
@@ -136,7 +138,7 @@ page {
|
||||
background-color: #05A3F4 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
/* 弹出提示框修改样式 end */
|
||||
|
||||
/* 搜索框修改样式 begin */
|
||||
@@ -169,13 +171,51 @@ page {
|
||||
}
|
||||
|
||||
.custom-search .uni-searchbar__box-icon-clear {
|
||||
display: none !important;
|
||||
/* display: none !important; */
|
||||
margin-right:10rpx;
|
||||
}
|
||||
|
||||
/* .custom-search .uni-searchbar__box-icon-clear .uniui-clear{
|
||||
.custom-search .uni-searchbar__box-icon-clear .uniui-clear{
|
||||
color:#fff !important;
|
||||
font-size: 40rpx !important;
|
||||
} */
|
||||
}
|
||||
|
||||
/* 自定义搜索框 */
|
||||
.search-bg{
|
||||
background-color: #6FA2F8;
|
||||
border-radius: 28rpx;
|
||||
/* width:690rpx; */
|
||||
width:630rpx;
|
||||
height:56rpx;
|
||||
margin:0 auto 30rpx;
|
||||
padding:0 30rpx;
|
||||
display: flex;
|
||||
color:#fff;
|
||||
font-size:28rpx;
|
||||
flex: auto;
|
||||
}
|
||||
.search-bg .search-left{
|
||||
border-right:1px solid #4687F2;
|
||||
margin-top:10rpx;
|
||||
margin-bottom:10rpx;
|
||||
padding-right:30rpx;
|
||||
/* width:10%; */
|
||||
}
|
||||
.search-bg .search-right{
|
||||
margin-top:10rpx;
|
||||
padding-left:30rpx;
|
||||
/* width:60%; */
|
||||
}
|
||||
.search-bg .search-right .uni-input{
|
||||
color:#fff;
|
||||
font-size:28rpx;
|
||||
}
|
||||
.search-bg .search-right .uni-input .uni-input-input{
|
||||
width: 380rpx;
|
||||
}
|
||||
.search-bg .search-right .uni-input .search-color{
|
||||
color:#fff !important;
|
||||
}
|
||||
/* 搜索框修改样式 end */
|
||||
|
||||
.head-right {
|
||||
|
||||
@@ -45,3 +45,23 @@ export function formatMoney(num, decimals,units){
|
||||
|
||||
return units+retVal;
|
||||
}
|
||||
|
||||
export function dateFormat(fmt, date) {
|
||||
let ret;
|
||||
const opt = {
|
||||
"Y+": date.getFullYear().toString(), // 年
|
||||
"m+": (date.getMonth() + 1).toString(), // 月
|
||||
"d+": date.getDate().toString(), // 日
|
||||
"H+": date.getHours().toString(), // 时
|
||||
"M+": date.getMinutes().toString(), // 分
|
||||
"S+": date.getSeconds().toString() // 秒
|
||||
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||||
};
|
||||
for (let k in opt) {
|
||||
ret = new RegExp("(" + k + ")").exec(fmt);
|
||||
if (ret) {
|
||||
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
|
||||
};
|
||||
};
|
||||
return fmt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user