feat: 客户人员审核
This commit is contained in:
@@ -43,3 +43,12 @@ export function SearchForAllPerson(params){
|
|||||||
data: params
|
data: params
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 客户人员新增审核列表
|
||||||
|
export function getCusUserApprovalList(params) {
|
||||||
|
return request.get({
|
||||||
|
url: '/app/appCrmCusUserNewController/getCusUserApprovalList',
|
||||||
|
data: params
|
||||||
|
}, {isTransformResponse: false}
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -13,6 +13,20 @@ export function upadateappCrmCusUserNew (data){
|
|||||||
data
|
data
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
|
// 客户人员审核通过
|
||||||
|
export function clientPersonnelsApproval(data) {
|
||||||
|
return request.get({
|
||||||
|
url: '/app/appCrmCusUserNewController/clientPersonnelsApproval',
|
||||||
|
data
|
||||||
|
}, {isTransformResponse: false});
|
||||||
|
}
|
||||||
|
//客户人员驳回
|
||||||
|
export function customerPersonnelsRejectio(data) {
|
||||||
|
return request.get({
|
||||||
|
url: '/app/appCrmCusUserNewController/customerPersonnelsRejectio',
|
||||||
|
data
|
||||||
|
}, {isTransformResponse: false});
|
||||||
|
}
|
||||||
//主归属人变更提交
|
//主归属人变更提交
|
||||||
export function submissionOfChangeOfMainOwner (data){
|
export function submissionOfChangeOfMainOwner (data){
|
||||||
return request.get({
|
return request.get({
|
||||||
|
|||||||
@@ -274,6 +274,13 @@
|
|||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/business/CRM/customer/customerAudit",
|
||||||
|
//客户人员审核
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/business/CRM/customer/customerUserBelong",
|
"path": "pages/business/CRM/customer/customerUserBelong",
|
||||||
//客户人员归属
|
//客户人员归属
|
||||||
@@ -281,6 +288,13 @@
|
|||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/business/CRM/customer/components/confirmForm",
|
||||||
|
//客户人员主归属人变更审核提交
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/business/CRM/customer/changeCustomerOwner",
|
"path": "pages/business/CRM/customer/changeCustomerOwner",
|
||||||
//客户人员主归属人变更
|
//客户人员主归属人变更
|
||||||
@@ -297,7 +311,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/business/CRM/mainOwner/audit/confirmForm",
|
"path": "pages/business/CRM/mainOwner/audit/confirmForm",
|
||||||
//客户人员主归属人变更审核意见
|
//客户人员主归属人变更审核提交
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<view class="con-body">
|
<view class="con-body">
|
||||||
<view class="con-bg">
|
<view class="con-bg">
|
||||||
<!-- 头部 -->
|
<!-- 头部 -->
|
||||||
<customHeader ref="customHeaderRef" :title="'客户人员归属人变更'" :leftFlag="true" :rightFlag="false">
|
<customHeader ref="customHeaderRef" :title="'客户人员信息'" :leftFlag="true" :rightFlag="false">
|
||||||
</customHeader>
|
</customHeader>
|
||||||
|
|
||||||
<!-- 高度来避免头部遮挡 -->
|
<!-- 高度来避免头部遮挡 -->
|
||||||
@@ -19,9 +19,8 @@
|
|||||||
<view class="search">
|
<view class="search">
|
||||||
<uni-search-bar class="custom-search" radius="28" placeholder="请输入客户人员名称" clearButton="auto"
|
<uni-search-bar class="custom-search" radius="28" placeholder="请输入客户人员名称" clearButton="auto"
|
||||||
cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"
|
cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"
|
||||||
v-model="searchValue"
|
v-model="searchValue" @clear="clearSearchValue"
|
||||||
/>
|
/>
|
||||||
<button type="default" @click="clearSearchValue" size="mini" class="btn-search">清空</button>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 分页部分 -->
|
<!-- 分页部分 -->
|
||||||
@@ -102,7 +101,6 @@ let timerId = null;
|
|||||||
let handleSearch = () => {
|
let handleSearch = () => {
|
||||||
// 防抖搜索 console.log(searchValue.value)
|
// 防抖搜索 console.log(searchValue.value)
|
||||||
if (timerId) clearTimeout(timerId);
|
if (timerId) clearTimeout(timerId);
|
||||||
cssFlag.value = true;
|
|
||||||
timerId = setTimeout(async () => {
|
timerId = setTimeout(async () => {
|
||||||
|
|
||||||
// let res = await getList(1, upOption.value.page.size)
|
// let res = await getList(1, upOption.value.page.size)
|
||||||
@@ -145,13 +143,17 @@ const mescrollInit = (mescroll) => {
|
|||||||
// 下拉刷新
|
// 下拉刷新
|
||||||
const downCallback = async (mescroll) => {
|
const downCallback = async (mescroll) => {
|
||||||
try {
|
try {
|
||||||
|
uni.showLoading();
|
||||||
|
cssFlag.value = true;
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
// 重置页码为第一页
|
// 重置页码为第一页
|
||||||
const res = await getList(1, mescroll.size || upOption.page.size);
|
const res = await getList(1, mescroll.size || upOption.page.size);
|
||||||
cssFlag.value = false;
|
|
||||||
list.value = res.list;
|
list.value = res.list;
|
||||||
|
cssFlag.value = false;
|
||||||
// 正确传递 total 参数
|
// 正确传递 total 参数
|
||||||
mescroll.endSuccess(res.list.length, res.total > (mescroll.size || upOption.page.size));
|
mescroll.endSuccess(res.list.length, res.total > (mescroll.size || upOption.page.size));
|
||||||
|
uni.hideLoading();
|
||||||
|
|
||||||
}, 500);
|
}, 500);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
@@ -161,6 +163,7 @@ const downCallback = async (mescroll) => {
|
|||||||
// 上拉加载更多
|
// 上拉加载更多
|
||||||
const upCallback = async (mescroll) => {
|
const upCallback = async (mescroll) => {
|
||||||
try {
|
try {
|
||||||
|
uni.showLoading();
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
// 使用 mescroll 提供的页码和大小参数
|
// 使用 mescroll 提供的页码和大小参数
|
||||||
const res = await getList(mescroll.num, mescroll.size);
|
const res = await getList(mescroll.num, mescroll.size);
|
||||||
@@ -171,6 +174,7 @@ const upCallback = async (mescroll) => {
|
|||||||
}
|
}
|
||||||
// 正确判断是否还有更多数据
|
// 正确判断是否还有更多数据
|
||||||
mescroll.endSuccess(res.list.length, res.total > mescroll.num * mescroll.size);
|
mescroll.endSuccess(res.list.length, res.total > mescroll.num * mescroll.size);
|
||||||
|
uni.hideLoading();
|
||||||
}, 500);
|
}, 500);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
@@ -243,18 +247,20 @@ let handleChange = (item)=>{
|
|||||||
userName: item.userName,
|
userName: item.userName,
|
||||||
reasonForChange: res.content
|
reasonForChange: res.content
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
uni.showToast({
|
if(res.code===200){
|
||||||
title: '变更成功'
|
uni.showToast({
|
||||||
})
|
title: '操作成功'
|
||||||
}).catch(err=>{
|
})
|
||||||
uni.showToast({
|
}else{
|
||||||
title: '变更失败',
|
uni.showToast({
|
||||||
icon: 'error'
|
title: '操作失败',
|
||||||
})
|
icon: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '变更失败,请补充变更原因',
|
title: '操作失败!变更原因不能为空',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -304,9 +310,7 @@ let handleCopyInfo=(item)=>{
|
|||||||
/* #endif */
|
/* #endif */
|
||||||
}
|
}
|
||||||
|
|
||||||
.search {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search .btn-search {
|
.search .btn-search {
|
||||||
border: none;
|
border: none;
|
||||||
@@ -323,15 +327,6 @@ let handleCopyInfo=(item)=>{
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search .custom-search {
|
|
||||||
width: 80%;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.search .custom-search.uni-searchbar {
|
|
||||||
padding-right: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scroll-h {
|
.scroll-h {
|
||||||
/* #ifdef APP-PLUS */
|
/* #ifdef APP-PLUS */
|
||||||
height: calc(100vh - 120px);
|
height: calc(100vh - 120px);
|
||||||
|
|||||||
721
src/pages/business/CRM/customer/components/confirmForm.vue
Normal file
721
src/pages/business/CRM/customer/components/confirmForm.vue
Normal file
@@ -0,0 +1,721 @@
|
|||||||
|
<!--
|
||||||
|
* @author wangzhuo
|
||||||
|
* @date 2025年8月20日
|
||||||
|
* @description 提交客户人员审批意见
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<view class="con-body">
|
||||||
|
<view class="con-bg">
|
||||||
|
<!-- 头部 -->
|
||||||
|
<customHeader ref="customHeaderRef" :title="'客户人员详情'" :leftFlag="true" :rightFlag="false">
|
||||||
|
</customHeader>
|
||||||
|
|
||||||
|
<!-- 高度来避免头部遮挡 -->
|
||||||
|
<view class="top-height"></view>
|
||||||
|
|
||||||
|
<!-- 正文内容 -->
|
||||||
|
<view class="white-bg">
|
||||||
|
<view class="form-con">
|
||||||
|
<uni-forms ref="formRef" :model="formData" :rules="rules" label-width="40%">
|
||||||
|
<!-- 选择客户 -->
|
||||||
|
<uni-forms-item label="客户名称" name="cusName" required class="f-c-right">
|
||||||
|
<view class="customer-name" ><!--@click="handleCustomerClick"-->
|
||||||
|
<uni-icons type="right" size="20" color="#A0A0A0"></uni-icons>
|
||||||
|
<text> {{ customerUser.cusName || '查询客户名称' }}</text>
|
||||||
|
</view>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 系统推荐等级 -->
|
||||||
|
<uni-forms-item label="系统公司等级" name="cusEstate" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.cusEstate"
|
||||||
|
:placeholder="customerUser.sysThinkLevel?customerUser.sysThinkLevel:'默认显示公司等级'"
|
||||||
|
disabled/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入人员名称 -->
|
||||||
|
<uni-forms-item label="人员姓名" name="userName" required
|
||||||
|
class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.userName" placeholder="请输入姓名" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 选择人员等级 -->
|
||||||
|
<uni-forms-item label="人员等级(K)" name="userType"
|
||||||
|
class="uni-forms-item is-direction-top is-top">
|
||||||
|
<view class="form-picker">
|
||||||
|
<picker @change="handleUserTypeChange" :value="userTypeIndex" :range="userTypeList"
|
||||||
|
:range-key="'name'" :disabled="!editable"> <!--选择等级 索引:index5 ,范围:palceArray3,响应:handlePlace6-->
|
||||||
|
<view class="flex">
|
||||||
|
{{ formData.userType ? formData.userType : '请选择' }} <!-- 等级:userType -->
|
||||||
|
<uni-icons type="down" size="20" color="#A0A0A0"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入人员工作电话 -->
|
||||||
|
<uni-forms-item label="工作电话" name="jobTelphone" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.jobTelphone" placeholder="请输入工作电话" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入人员手机号 -->
|
||||||
|
<uni-forms-item v-if="formData.mobilePhone" label="人员手机号" name="mobilePhone" required class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.mobilePhone" placeholder="请输入手机号" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入人员部门 -->
|
||||||
|
<uni-forms-item label="部门" name="userDept" required class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.userDept" placeholder="请输入所属部门" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 选择职能 -->
|
||||||
|
<uni-forms-item label="职能" name="functionalRequirements" required
|
||||||
|
class="uni-forms-item is-direction-top is-top">
|
||||||
|
<view class="form-picker">
|
||||||
|
<picker @change="handleFunctionChange" :range="functionalRequirementList"
|
||||||
|
:range-key="'name'" :disabled="!editable"> <!--选择职能 索引: :value="functionIndex" index1 响应:handlePlace1 -->
|
||||||
|
<view class="flex">
|
||||||
|
{{ formData.functionalRequirements ? formData.functionalRequirements : '请选择' }}
|
||||||
|
<!-- 职能:functionalRequirements -->
|
||||||
|
<uni-icons type="down" size="20" color="#A0A0A0"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 系统推荐等级 -->
|
||||||
|
<uni-forms-item label="系统推荐等级" name="systemThinkLevel" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.systemThinkLevel" :placeholder="recommendLevel || '默认显示系统推荐等级'"
|
||||||
|
disabled/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 业务员选择人员等级 -->
|
||||||
|
<uni-forms-item label="业务人员填写等级" name="salesmanThinkLevel" required
|
||||||
|
class="uni-forms-item is-direction-top is-top">
|
||||||
|
<view class="form-picker">
|
||||||
|
<picker @change="handleThinkLevelChange" :range="salesmanThinkLevelList"
|
||||||
|
:range-key="'name'" :disabled="!editable"> <!--选择推荐等级 索引:value="thinkLevelIndex" index8 响应:handlePlace9 -->
|
||||||
|
<view class="flex">
|
||||||
|
{{ formData.salesmanThinkLevel ? formData.salesmanThinkLevel : '请选择' }}
|
||||||
|
<!-- 思考人员等级:salesmanThinkLevel-->
|
||||||
|
<uni-icons type="down" size="20" color="#A0A0A0"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</uni-forms-item>
|
||||||
|
|
||||||
|
<!-- 输入人员职务 -->
|
||||||
|
<uni-forms-item label="职务" name="job" required class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.job" placeholder="请输入职务" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入专业产品 majorProduct-->
|
||||||
|
<uni-forms-item label="专业产品" name="majorProduct" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.majorProduct" placeholder="请输入专业产品" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入产品需求 product-->
|
||||||
|
<uni-forms-item label="产品需求" name="product" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.product" placeholder="请输入产品需求" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入办公场地 -->
|
||||||
|
<uni-forms-item label="办公场地" name="officeSite" required class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.officeSite" placeholder="请输入办公场地" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入性别 -->
|
||||||
|
<uni-forms-item label="性别" name="sex" required
|
||||||
|
class="uni-forms-item is-direction-top is-top">
|
||||||
|
<view class="form-picker">
|
||||||
|
<picker @change="handleGenderChange" :value="genderIndex" :range="genderList"
|
||||||
|
:range-key="'name'" :disabled="!editable"> <!--选择性别 索引:index2 ,范围:palceArray2,响应:handlePlace2-->
|
||||||
|
<view class="flex">
|
||||||
|
{{ formData.sex ? formData.sex : '请选择' }} <!-- 性别:sex -->
|
||||||
|
<uni-icons type="down" size="20" color="#A0A0A0"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</uni-forms-item>
|
||||||
|
|
||||||
|
<!-- 选择任职时间 tenureTime-->
|
||||||
|
<uni-forms-item label="任职日期" name="tenureTime" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-datetime-picker type="date" :clear-icon="false" v-model="formData.tenureTime"
|
||||||
|
@change="handleTenureTimeChange" :disabled="!editable"/> <!-- 响应:orderDateChange-->
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入需求层次 hierarchyNeeds-->
|
||||||
|
<uni-forms-item label="需求层次" name="hierarchyNeeds"
|
||||||
|
class="uni-forms-item is-direction-top is-top">
|
||||||
|
<view class="form-picker">
|
||||||
|
<picker @change="handleHierarchyNeedsChange" :value="hierarchyNeedsIndex" :range="hierarchyNeedsList"
|
||||||
|
:range-key="'name'" :disabled="!editable"> <!--选择层次 索引:index4 ,范围:palceArray5,响应:handlePlace5-->
|
||||||
|
<view class="flex">
|
||||||
|
{{ formData.hierarchyNeeds ? formData.hierarchyNeeds : '请选择' }} <!-- 层次:hierarchyNeeds -->
|
||||||
|
<uni-icons type="down" size="20" color="#A0A0A0"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入职务变化 jobChange-->
|
||||||
|
<uni-forms-item label="职务变化" name="jobChange" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.jobChange" placeholder="请输入职务变化" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 选择发展潜能 develop-->
|
||||||
|
<uni-forms-item label="发展潜能" name="develop"
|
||||||
|
class="uni-forms-item is-direction-top is-top">
|
||||||
|
<view class="form-picker">
|
||||||
|
<picker @change="handleDevelopChange" :value="developIndex" :range="developList"
|
||||||
|
:range-key="'name'" :disabled="!editable"> <!--选择潜力 索引:index3 ,范围:handlePlace4,响应:handlePlace5-->
|
||||||
|
<view class="flex">
|
||||||
|
{{ formData.develop ? formData.develop : '请选择' }} <!-- 潜能:develop -->
|
||||||
|
<uni-icons type="down" size="20" color="#A0A0A0"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入生日 -->
|
||||||
|
<uni-forms-item label="生日" name="birthday" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-datetime-picker type="date" :clear-icon="false" v-model="formData.birthday"
|
||||||
|
@change="handleBirthdayChange" :disabled="!editable"/> <!-- 响应:birthdayChange-->
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入爱好 -->
|
||||||
|
<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"
|
||||||
|
@change="handleHobbyChange" :slabel="'name'"
|
||||||
|
|
||||||
|
></multipleSelect><!--placeholder="请选择爱好标签"-->
|
||||||
|
</uni-forms-item>
|
||||||
|
|
||||||
|
<!-- <uni-forms-item label="爱好" name="hobby" class="uni-forms-item is-direction-top is-top">-->
|
||||||
|
<!-- <uni-easyinput v-model="formData.hobby" placeholder="请输入爱好" @click="chooseHobby"/>-->
|
||||||
|
<!-- chooseHobby选择标签 -->
|
||||||
|
<!-- </uni-forms-item>-->
|
||||||
|
<!-- 输入禁忌 taboo-->
|
||||||
|
<uni-forms-item label="禁忌" name="taboo" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.taboo" placeholder="请输入禁忌" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入籍贯 nativec-->
|
||||||
|
<uni-forms-item label="籍贯" name="nativec" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.nativec" placeholder="请输入或选择籍贯" :disabled="!editable"/>
|
||||||
|
<uni-data-picker placeholder="请选择" :localdata="city"
|
||||||
|
:clear-icon="false"
|
||||||
|
:map="{text:'label',value:'value'}"
|
||||||
|
@change="handleNativeChange" :readonly="!editable">
|
||||||
|
|
||||||
|
</uni-data-picker>
|
||||||
|
<!-- {{formData.nativec? formData.nativec:'请选择'}}--><!-- 响应:address-->
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入家庭住址 homeAddress-->
|
||||||
|
<uni-forms-item label="家庭住址" name="homeAddress" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.homeAddress" placeholder="请输入家庭住址" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入家庭情况 familyStatus-->
|
||||||
|
<uni-forms-item label="家庭情况" name="familyStatus" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.familyStatus" placeholder="请输入家庭情况" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入婚姻状况 maritalStatus-->
|
||||||
|
<uni-forms-item label="婚姻状况" name="maritalStatus" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.maritalStatus" placeholder="请输入婚姻状况" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入车型及牌号 motorcycleType-->
|
||||||
|
<uni-forms-item label="车型及牌号" name="motorcycleType" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.motorcycleType" placeholder="请输入车型及牌号" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入毕业院校 graduateIns-->
|
||||||
|
<uni-forms-item label="毕业院校" name="graduateIns" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.graduateIns" placeholder="请输入毕业院校" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入人脉关系 interpersonal-->
|
||||||
|
<uni-forms-item label="人脉关系" name="interpersonal" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<uni-easyinput v-model="formData.interpersonal" placeholder="请输入人脉关系" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入支持程度 support-->
|
||||||
|
<uni-forms-item label="支持程度" name="support" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<view class="form-picker">
|
||||||
|
<picker @change="handleSupportChange" :value="supportIndex" :range="supportLevelList" :disabled="!editable"
|
||||||
|
:range-key="'name'"> <!--选择支持程度 索引:index6 ,范围:palceArray6,响应:handlePlace7-->
|
||||||
|
<view class="flex">
|
||||||
|
{{ formData.support ? formData.support : '请选择' }} <!-- 支持:support -->
|
||||||
|
<uni-icons type="down" size="20" color="#A0A0A0"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 选择工作状态 workingStatus-->
|
||||||
|
<uni-forms-item label="工作状态" name="workingStatus" class="uni-forms-item is-direction-top is-top">
|
||||||
|
<view class="form-picker">
|
||||||
|
<picker @change="handleWorkingStatusChange" :value="workingStatusIndex" :range="workingStatusList"
|
||||||
|
:range-key="'name'" :disabled="!editable"> <!--选择支持程度 索引:index7 ,范围:palceArray7,响应:handlePlace8-->
|
||||||
|
<view class="flex">
|
||||||
|
{{ formData.workingStatus ? formData.workingStatus : '请选择' }} <!-- 工作:workingStatus -->
|
||||||
|
<uni-icons type="down" size="20" color="#A0A0A0"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</uni-forms-item>
|
||||||
|
<!-- 输入备注 -->
|
||||||
|
<uni-forms-item label="备注" name="remark" class="uni-forms-item is-direction-top is-top" style="padding-bottom: 220rpx;">
|
||||||
|
<uni-easyinput type="textarea" autoHeight v-model="formData.reasonForChange" placeholder="请输入备注"
|
||||||
|
class="form-texarea" :disabled="!editable"/>
|
||||||
|
</uni-forms-item>
|
||||||
|
|
||||||
|
<view v-if="formData.userId" class="fab">
|
||||||
|
<button class="mini-btn btn" type="warn" @click="handleReject">✘ 驳回</button>
|
||||||
|
<button class="mini-btn btn" type="primary" @click="handleApprove">✔ 通过</button>
|
||||||
|
</view>
|
||||||
|
</uni-forms>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {ref, reactive, getCurrentInstance} from 'vue'
|
||||||
|
import customHeader from '@/components/customHeader.vue'
|
||||||
|
import multipleSelect from '@/components/multipleSelect.vue'
|
||||||
|
import {
|
||||||
|
developList,
|
||||||
|
functionalRequirementList,
|
||||||
|
genderList,
|
||||||
|
hierarchyNeedsList, hobbyList,
|
||||||
|
salesmanThinkLevelList, supportLevelList,
|
||||||
|
userTypeList, workingStatusList
|
||||||
|
} from "../dataMap";
|
||||||
|
import city from "@/utils/area";
|
||||||
|
import {getCustomerLevel, getCusUserApprovalListDetail} from "@/api/crm/customer/getCustomer";
|
||||||
|
import {customerPersonnelsRejectio, clientPersonnelsApproval} from "@/api/crm/customer/updateCustomer";
|
||||||
|
import {onLoad} from "@dcloudio/uni-app";
|
||||||
|
// 表单引用
|
||||||
|
const formRef = ref({});
|
||||||
|
// 表单数据
|
||||||
|
const formData = ref({
|
||||||
|
// 客户人员的ID
|
||||||
|
userId: null,
|
||||||
|
//部门
|
||||||
|
userDept: null,
|
||||||
|
//客户(公司)ID
|
||||||
|
cusId: null,
|
||||||
|
//客户人员名称
|
||||||
|
customerUserName: null,
|
||||||
|
userName: null,
|
||||||
|
|
||||||
|
//等级(K)
|
||||||
|
userType: null,
|
||||||
|
//手机号
|
||||||
|
iphone: null,
|
||||||
|
mobilePhone: null,
|
||||||
|
//客户姓名
|
||||||
|
cusName: null,
|
||||||
|
//系统中公司等级
|
||||||
|
cusEstate: null,
|
||||||
|
//工作手机号
|
||||||
|
jobTelphone: null,
|
||||||
|
//职能
|
||||||
|
functionalRequirements: '',
|
||||||
|
//职务
|
||||||
|
job: null,
|
||||||
|
//专业产品
|
||||||
|
majorProduct: null,
|
||||||
|
//产品需求
|
||||||
|
product: null,
|
||||||
|
//办公场地
|
||||||
|
officeSite: null,
|
||||||
|
//性别
|
||||||
|
sex: '男',
|
||||||
|
//任职时间
|
||||||
|
tenureTime: null,
|
||||||
|
//需求层次
|
||||||
|
hierarchyNeeds: null,
|
||||||
|
//职务变化
|
||||||
|
jobChange: null,
|
||||||
|
//发展潜能
|
||||||
|
develop: null,
|
||||||
|
//生日
|
||||||
|
birthday: null,
|
||||||
|
//爱好
|
||||||
|
hobby: null,
|
||||||
|
//禁忌
|
||||||
|
taboo: null,
|
||||||
|
//籍贯
|
||||||
|
nativec: null,
|
||||||
|
//家庭情况
|
||||||
|
familyStatus: null,
|
||||||
|
//婚姻状况
|
||||||
|
maritalStatus: null,
|
||||||
|
//车辆及牌号
|
||||||
|
motorcycleType: null,
|
||||||
|
//毕业院校
|
||||||
|
graduateIns: null,
|
||||||
|
//家庭住址
|
||||||
|
homeAddress: null,
|
||||||
|
//人脉关系
|
||||||
|
interpersonal: null,
|
||||||
|
//支持程度
|
||||||
|
support: null,
|
||||||
|
//工作状态
|
||||||
|
workingStatus: null,
|
||||||
|
//备注
|
||||||
|
remark: null,
|
||||||
|
//业务员认为的等级
|
||||||
|
salesmanThinkLevel: null,
|
||||||
|
//系统认为的等级
|
||||||
|
systemThinkLevel: null,
|
||||||
|
//职能
|
||||||
|
function: null,
|
||||||
|
});
|
||||||
|
|
||||||
|
// 客户人员信息
|
||||||
|
const customerUser = ref({
|
||||||
|
cusName: null,
|
||||||
|
sysThinkLevel: null
|
||||||
|
});
|
||||||
|
|
||||||
|
// 表单校验规则
|
||||||
|
let rules;
|
||||||
|
// 初始化校验规则
|
||||||
|
(function bindRules() {
|
||||||
|
rules = reactive({
|
||||||
|
cusName: {rules: [{required: true, errorMessage: '客户名称不能为空', trigger: 'blur'}]},
|
||||||
|
customerUserName: {rules: [{required: true, errorMessage: '人员名称不能为空', trigger: 'blur'}]},
|
||||||
|
iphone: {
|
||||||
|
rules: [{
|
||||||
|
required: true,
|
||||||
|
errorMessage: '请填写手机号码',
|
||||||
|
}, {
|
||||||
|
validateFunction: function (rule, value, data, callback) {
|
||||||
|
let iphoneReg = (
|
||||||
|
/^(13[0-9]|14[1579]|15[0-3,5-9]|16[6]|17[0123456789]|18[0-9]|19[89])\d{8}$/
|
||||||
|
); //手机号码
|
||||||
|
if (!iphoneReg.test(value)) {
|
||||||
|
callback('手机号码格式不正确,请重新填写')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
userDept: {rules: [{required: true, errorMessage: '所属部门不能为空', trigger: 'blur'}]},
|
||||||
|
functionalRequirements: {rules: [{required: true, errorMessage: '职能不能为空', trigger: 'blur'}]},
|
||||||
|
salesmanThinkLevel: {rules: [{required: true, errorMessage: '手填等级不能为空', trigger: 'blur'}]},
|
||||||
|
job: {rules: [{required: true, errorMessage: '职务不能为空', trigger: 'blur'}]},
|
||||||
|
officeSite: {rules: [{required: true, errorMessage: '办公场地不能为空', trigger: 'blur'}]},
|
||||||
|
sex: {rules: [{required: true, errorMessage: '性别不能为空', trigger: 'blur'}]},
|
||||||
|
});
|
||||||
|
console.log(rules, "校验规则");
|
||||||
|
})();
|
||||||
|
const editable = ref(true);
|
||||||
|
// getCurrentInstance().proxy
|
||||||
|
let instance = null;
|
||||||
|
onLoad((options)=>{
|
||||||
|
instance = getCurrentInstance().proxy;
|
||||||
|
const eventChannel = instance.getOpenerEventChannel();
|
||||||
|
eventChannel.on('auditCusUser', async (param) => {
|
||||||
|
editable.value = param.editable;
|
||||||
|
if(!param.editable){ // 只读模式
|
||||||
|
let {userId} = param.data;
|
||||||
|
console.log(param.data, "客户人员所属详情编辑页面读取到参数");
|
||||||
|
let res = await getCusUserApprovalListDetail({userId}).catch(err=>{
|
||||||
|
console.warn(err,'客户人员所属编辑信息获取失败');
|
||||||
|
})
|
||||||
|
const {rows} = res;
|
||||||
|
let source = rows[0];
|
||||||
|
const filteredData = Object.keys(source)
|
||||||
|
.filter(key => source[key] !== null && source[key] !== "null")
|
||||||
|
.reduce((obj, key) => {
|
||||||
|
obj[key] = source[key];
|
||||||
|
return obj;
|
||||||
|
}, {});
|
||||||
|
const {cusName} = source;
|
||||||
|
customerUser.value.cusName = cusName;
|
||||||
|
console.log(filteredData, "过滤空值属性")
|
||||||
|
if(rows.length) Object.assign(formData.value, filteredData); // 对表单赋值
|
||||||
|
formData.value.functionalRequirements = source.function; // 特殊处理
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// 选择客户人员
|
||||||
|
let handleCustomerClick = () => {
|
||||||
|
// 在起始页面跳转到test.vue页面,并监听test.vue发送过来的事件数据
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/business/CRM/customer/selectCustomer',
|
||||||
|
events: {
|
||||||
|
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
|
||||||
|
cuSelected(data) {
|
||||||
|
console.log(data, "获取到返回的数据")
|
||||||
|
let {
|
||||||
|
cusName, // 公司名称
|
||||||
|
cusEstate, // 等级
|
||||||
|
cusId,
|
||||||
|
} = data;
|
||||||
|
customerUser.value.cusName = cusName;
|
||||||
|
if (!cusEstate) customerUser.value.sysThinkLevel = "该客户暂无等级信息,无法进行系统推荐"
|
||||||
|
formData.value.cusEstate = cusEstate;
|
||||||
|
formData.value.cusName = cusName;
|
||||||
|
formData.value.cusId = cusId;
|
||||||
|
getRecommendLevel();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
success: function (res) {
|
||||||
|
// 通过eventChannel向被打开页面传送数据
|
||||||
|
res.eventChannel.emit('requestCusList', {data: {cusName: customerUser.value.cusName}})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选择职能
|
||||||
|
let handleFunctionChange = (e) => {
|
||||||
|
console.log(e.detail.value, '职能索引');
|
||||||
|
const {name} = functionalRequirementList[e.detail.value];
|
||||||
|
formData.value.functionalRequirements = name;
|
||||||
|
getRecommendLevel();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选择等级
|
||||||
|
let handleThinkLevelChange = (e) => {
|
||||||
|
console.log(e.detail.value, '人员等级');
|
||||||
|
const {name} = salesmanThinkLevelList[e.detail.value];
|
||||||
|
formData.value.salesmanThinkLevel = name;
|
||||||
|
}
|
||||||
|
// 系统推荐等级
|
||||||
|
let recommendLevel = ref("");
|
||||||
|
let getRecommendLevel = async () => {
|
||||||
|
if (formData.value.cusEstate && formData.value.functionalRequirements) {
|
||||||
|
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 => {
|
||||||
|
console.error(err, "客户的系统推荐等级获取失败")
|
||||||
|
})
|
||||||
|
if (!res.systemRecommendationLevel) {
|
||||||
|
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
||||||
|
console.log(formData.value.systemThinkLevel + "???")
|
||||||
|
}
|
||||||
|
formData.value.systemThinkLevel = res.systemRecommendationLevel;
|
||||||
|
} else {
|
||||||
|
recommendLevel.value = "无公司等级信息,无法推荐等级";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 性别索引
|
||||||
|
let genderIndex = ref(0);
|
||||||
|
// 选择性别
|
||||||
|
let handleGenderChange = (e) => {
|
||||||
|
const {value} = e.detail;
|
||||||
|
console.log(e.detail.value);
|
||||||
|
const {name} = genderList[value];
|
||||||
|
genderIndex.value = value;
|
||||||
|
formData.value.sex = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 人员等级索引
|
||||||
|
let userTypeIndex = ref(0);
|
||||||
|
// 选择人员等级
|
||||||
|
let handleUserTypeChange = (e) => {
|
||||||
|
let {value} = e.detail;
|
||||||
|
userTypeIndex.value = value;
|
||||||
|
const {name} = userTypeList[value];
|
||||||
|
formData.value.userType = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选择日期
|
||||||
|
function handleTenureTimeChange(e) {
|
||||||
|
let {value} = e.detail;
|
||||||
|
formData.value.tenureTime = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 需求层次索引
|
||||||
|
let hierarchyNeedsIndex = ref(0);
|
||||||
|
// 选择需求层次
|
||||||
|
let handleHierarchyNeedsChange = e => {
|
||||||
|
let {value} = e.detail;
|
||||||
|
const {name} = hierarchyNeedsList[value];
|
||||||
|
hierarchyNeedsIndex.value = value;
|
||||||
|
formData.value.hierarchyNeeds = name;
|
||||||
|
}
|
||||||
|
// 发展潜能索引
|
||||||
|
let developIndex = ref(0);
|
||||||
|
// 选择发展潜能
|
||||||
|
let handleDevelopChange = e => {
|
||||||
|
let {value} = e.detail;
|
||||||
|
developIndex.value = value;
|
||||||
|
formData.value.develop = developList[value].name;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选择生日
|
||||||
|
function handleBirthdayChange(e) {
|
||||||
|
let{value} = e.detail
|
||||||
|
formData.value.birthday = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 爱好标签索引
|
||||||
|
let hobbyIndex = reactive([]);
|
||||||
|
// 选择爱好标签
|
||||||
|
const handleHobbyChange = (item, value) => {
|
||||||
|
// console.log("爱好", item, value);
|
||||||
|
hobbyIndex = value;
|
||||||
|
};
|
||||||
|
// 选择
|
||||||
|
const handleNativeChange = (e) => {
|
||||||
|
formData.value.nativec = (e.detail.value.map(item => {
|
||||||
|
return item.text;
|
||||||
|
}).join("-"))
|
||||||
|
}
|
||||||
|
// 支持程度索引
|
||||||
|
let supportIndex = ref(0);
|
||||||
|
// 选择支持程度
|
||||||
|
let handleSupportChange = e => {
|
||||||
|
let {value} = e.detail;
|
||||||
|
supportIndex.value = value;
|
||||||
|
formData.value.support = supportLevelList[value].name;
|
||||||
|
}
|
||||||
|
// 工作状态索引
|
||||||
|
let workingStatusIndex = ref(0);
|
||||||
|
let handleWorkingStatusChange = e => {
|
||||||
|
let {value} = e.detail;
|
||||||
|
workingStatusIndex.value = 0;
|
||||||
|
formData.value.workingStatus = workingStatusList[value].name;
|
||||||
|
}
|
||||||
|
let handleReject = () => {
|
||||||
|
uni.showModal({
|
||||||
|
title: '是否确认驳回?',
|
||||||
|
editable: true,
|
||||||
|
placeholderText: '请输入驳回原因',
|
||||||
|
async success(res){
|
||||||
|
if(res.confirm){
|
||||||
|
if(res.content){
|
||||||
|
uni.showLoading()
|
||||||
|
let ret = await customerPersonnelsRejectio({
|
||||||
|
userRejectedGrounds: res.content,
|
||||||
|
userId: formData.value.userId
|
||||||
|
})
|
||||||
|
uni.hideLoading()
|
||||||
|
if(ret.code === 200){
|
||||||
|
uni.showToast({
|
||||||
|
title: '驳回成功'
|
||||||
|
})
|
||||||
|
setTimeout(()=>{
|
||||||
|
uni.navigateBack();
|
||||||
|
const eventChannel = instance.getOpenerEventChannel();
|
||||||
|
eventChannel.emit('refreshUserAuditList')
|
||||||
|
},1000)
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: '操作失败',
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: '操作失败!驳回原因不能为空',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
let handleApprove = () => {
|
||||||
|
uni.showLoading();
|
||||||
|
clientPersonnelsApproval({
|
||||||
|
userId: formData.value.userId
|
||||||
|
}).then(res=>{
|
||||||
|
uni.hideLoading();
|
||||||
|
if(res.code==200){
|
||||||
|
uni.showToast({
|
||||||
|
title: '操作成功'
|
||||||
|
})
|
||||||
|
setTimeout(()=>{
|
||||||
|
uni.navigateBack()
|
||||||
|
const eventChannel = instance.getOpenerEventChannel();
|
||||||
|
eventChannel.emit('refreshUserAuditList')
|
||||||
|
},1000)
|
||||||
|
}
|
||||||
|
}).catch(err=>{
|
||||||
|
uni.showToast({
|
||||||
|
title: '操作失败',
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
:deep(.uni-easyinput__content.is-input-border) {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.uni-easyinput__content.is-input-border.is-disabled) {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.uni-easyinput__content.is-input-border.is-disabled .uni-easyinput__content-input) {
|
||||||
|
background-color: #f0f0f0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.is-disabled .uni-easyinput__placeholder-class) {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.uni-select-dc-select .uni-select-multiple) {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-picker {
|
||||||
|
padding: 15rpx;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.uni-date-x .uni-date__x-input) {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white-bg {
|
||||||
|
width: 750rpx;
|
||||||
|
padding: 30rpx 0 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
border-radius: 8px 8px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.customer-name {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row-reverse
|
||||||
|
}
|
||||||
|
|
||||||
|
: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;
|
||||||
|
}
|
||||||
|
.btn{
|
||||||
|
height: 100rpx;
|
||||||
|
width: 180rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
border: none;
|
||||||
|
line-height: 100rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
.fab{
|
||||||
|
padding-top: 10rpx;
|
||||||
|
padding-bottom: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100vw;
|
||||||
|
left: 0;
|
||||||
|
background-color: rgba(255, 255, 255, 0.4);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
box-shadow: 0 0 60rpx rgba(255, 255, 255, 0.9);
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -455,6 +455,7 @@ let handleFunctionChange = (e) => {
|
|||||||
console.log(e.detail.value, '职能索引');
|
console.log(e.detail.value, '职能索引');
|
||||||
const {name} = functionalRequirementList[e.detail.value];
|
const {name} = functionalRequirementList[e.detail.value];
|
||||||
formData.value.functionalRequirements = name;
|
formData.value.functionalRequirements = name;
|
||||||
|
formData.value.function = name;
|
||||||
getRecommendLevel();
|
getRecommendLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -585,17 +586,25 @@ let submitForm = async () => {
|
|||||||
console.log(formData.value, "提交表单数据")
|
console.log(formData.value, "提交表单数据")
|
||||||
// 请求保存
|
// 请求保存
|
||||||
uni.showLoading()
|
uni.showLoading()
|
||||||
upadateappCrmCusUserNew(formData.value).then(res=>{
|
upadateappCrmCusUserNew(formData.value).then(ret=>{
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.showToast({
|
if(ret.code === 200){
|
||||||
title: "更新成功"
|
uni.showToast({
|
||||||
})
|
title: "更新成功"
|
||||||
setTimeout(()=>uni.navigateBack(), 1500);
|
})
|
||||||
}).catch(err=>{
|
setTimeout(()=>{
|
||||||
uni.showToast({
|
uni.navigateBack();
|
||||||
icon: 'none',
|
const eventChannel = instance.getOpenerEventChannel();
|
||||||
title: "更新失败"
|
eventChannel.emit("refreshCusUserList");
|
||||||
})
|
},1000);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: "操作失败",
|
||||||
|
icon: "error"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
// 重置表单
|
// 重置表单
|
||||||
// 清除校验
|
// 清除校验
|
||||||
|
|||||||
@@ -566,9 +566,15 @@ let submitForm = async () => {
|
|||||||
uni.showLoading()
|
uni.showLoading()
|
||||||
saveappCrmCusUserNew(formData.value).then(res=>{
|
saveappCrmCusUserNew(formData.value).then(res=>{
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.showToast({
|
if(res.code === 200){
|
||||||
title: "保存成功"
|
uni.showToast({
|
||||||
})
|
title: "保存成功"
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: "操作失败"
|
||||||
|
})
|
||||||
|
}
|
||||||
setTimeout(()=>uni.navigateBack(), 1500);
|
setTimeout(()=>uni.navigateBack(), 1500);
|
||||||
}).catch(err=>{
|
}).catch(err=>{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
242
src/pages/business/CRM/customer/customerAudit.vue
Normal file
242
src/pages/business/CRM/customer/customerAudit.vue
Normal file
@@ -0,0 +1,242 @@
|
|||||||
|
<!--
|
||||||
|
* @author wangzhuo
|
||||||
|
* @date 2025年8月20日
|
||||||
|
* @description 客户人员审核
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<view class="con-body">
|
||||||
|
<view class="con-bg">
|
||||||
|
<!-- 头部 -->
|
||||||
|
<customHeader ref="customHeaderRef" :title="'客户人员审核'" :leftFlag="true" :rightFlag="false">
|
||||||
|
</customHeader>
|
||||||
|
|
||||||
|
<!-- 高度来避免头部遮挡 -->
|
||||||
|
<view class="top-height" :style="{ paddingTop: navBarPaddingTop + 'px' }"></view>
|
||||||
|
|
||||||
|
<!-- 正文内容 -->
|
||||||
|
<view class="all-body">
|
||||||
|
<!-- 搜索-->
|
||||||
|
<!-- <view class="search">-->
|
||||||
|
<!-- <uni-search-bar class="custom-search" radius="28" placeholder="请输入客户人员名称" clearButton="auto"-->
|
||||||
|
<!-- cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"-->
|
||||||
|
<!-- v-model="searchValue"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- <!– <button type="default" @click="clearSearchValue" size="mini" class="btn-search">清空</button>–>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
|
||||||
|
<!-- 分页部分 -->
|
||||||
|
<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">
|
||||||
|
<view class="report-list" @click.stop="handleDetail(item)">
|
||||||
|
<view class="r-list title">
|
||||||
|
{{ item.cusName }}
|
||||||
|
<view class="r-right" :class="item.auditStatus ? '' : 'btn-pink' ">
|
||||||
|
{{ item.auditStatus ? '' : '待您审批' }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="r-list">
|
||||||
|
<view class="r-left">客户人员名称</view>
|
||||||
|
<view class="r-right">{{ item.userName }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="border-bottom"></view>
|
||||||
|
|
||||||
|
<view class="r-list">
|
||||||
|
<view class="r-left">目前业务员</view>
|
||||||
|
<view class="r-right">{{ item.belonger }}</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">{{ item.function }}</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</mescroll-uni>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {ref, onMounted, watch} from 'vue'
|
||||||
|
import customHeader from '@/components/customHeader.vue'
|
||||||
|
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
||||||
|
import {getNavBarPaddingTop} from '@/utils/system'
|
||||||
|
import {getCusUserApprovalList} from "@/api/crm/customer/getCustomer"
|
||||||
|
|
||||||
|
// 获取导航栏高度用于内容区域padding
|
||||||
|
const navBarPaddingTop = ref(0);
|
||||||
|
onMounted(() => {
|
||||||
|
navBarPaddingTop.value = getNavBarPaddingTop() * 2;
|
||||||
|
})
|
||||||
|
// 搜索内容
|
||||||
|
let searchValue = ref(null);
|
||||||
|
// 分页
|
||||||
|
const mescrollRef = ref(null);
|
||||||
|
// 防抖计时
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(searchValue, (newValue, oldValue) => {
|
||||||
|
handleSearch()
|
||||||
|
})
|
||||||
|
let clearSearchValue = () => {
|
||||||
|
searchValue.value = '';
|
||||||
|
}
|
||||||
|
// 查询列表
|
||||||
|
let list = ref([]);
|
||||||
|
|
||||||
|
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 getList(1, mescroll.size || upOption.page.size);
|
||||||
|
|
||||||
|
list.value = res.list;
|
||||||
|
// 正确传递 total 参数
|
||||||
|
mescroll.endSuccess(res.list.length, res.total > (mescroll.size || upOption.page.size));
|
||||||
|
}, 500);
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
mescroll.endErr();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 上拉加载更多
|
||||||
|
const upCallback = async (mescroll) => {
|
||||||
|
try {
|
||||||
|
setTimeout(async () => {
|
||||||
|
// 使用 mescroll 提供的页码和大小参数
|
||||||
|
const res = await getList(mescroll.num, mescroll.size);
|
||||||
|
if (mescroll.num === 1) {
|
||||||
|
list.value = res.list;
|
||||||
|
} else {
|
||||||
|
list.value.push(...res.list);
|
||||||
|
}
|
||||||
|
// 正确判断是否还有更多数据
|
||||||
|
mescroll.endSuccess(res.list.length, res.total > mescroll.num * mescroll.size);
|
||||||
|
}, 500);
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
mescroll.endErr();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取数据列表
|
||||||
|
const getList = (pageIndex, pageSize) => {
|
||||||
|
return new Promise(async (resolve) => {
|
||||||
|
let param = {
|
||||||
|
pageNum: pageIndex,
|
||||||
|
pageSize,
|
||||||
|
searchContent: searchValue.value
|
||||||
|
}
|
||||||
|
|
||||||
|
let res = await getCusUserApprovalList(param);
|
||||||
|
resolve({
|
||||||
|
list: res.rows,
|
||||||
|
total: res.total
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 跳转到详情
|
||||||
|
let handleDetail = (item) => {
|
||||||
|
const {userId} = item;
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/business/CRM/customer/components/confirmForm",
|
||||||
|
events: {
|
||||||
|
refreshUserAuditList() {
|
||||||
|
handleSearch();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
success(res) {
|
||||||
|
res.eventChannel.emit('auditCusUser', {data: {userId}, editable: false})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.all-body {
|
||||||
|
/* #ifdef APP-PLUS */
|
||||||
|
top: 150rpx;
|
||||||
|
height: calc(100vh - 75px);
|
||||||
|
/* #endif */
|
||||||
|
/* #ifndef APP-PLUS */
|
||||||
|
top: 120rpx;
|
||||||
|
height: calc(100vh);
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.scroll-h {
|
||||||
|
/* #ifdef APP-PLUS */
|
||||||
|
height: calc(100vh - 120px);
|
||||||
|
/* #endif */
|
||||||
|
/* #ifndef APP-PLUS */
|
||||||
|
height: calc(100vh - 110px);
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.white-bg {
|
||||||
|
padding-bottom: 10rpx;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-pink {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -19,9 +19,9 @@
|
|||||||
<view class="search">
|
<view class="search">
|
||||||
<uni-search-bar class="custom-search" radius="28" placeholder="请输入客户名称" clearButton="auto"
|
<uni-search-bar class="custom-search" radius="28" placeholder="请输入客户名称" clearButton="auto"
|
||||||
cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"
|
cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"
|
||||||
|
@clear="clearSearchValue"
|
||||||
v-model="searchValue"
|
v-model="searchValue"
|
||||||
/>
|
/>
|
||||||
<button type="default" @click="clearSearchValue" size="mini" class="btn-search">清空</button>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 分页部分 -->
|
<!-- 分页部分 -->
|
||||||
@@ -29,11 +29,15 @@
|
|||||||
:up="upOption" :down="downOption" :fixed="false" textColor="#ffffff" bgColor="#ffffff"
|
:up="upOption" :down="downOption" :fixed="false" textColor="#ffffff" bgColor="#ffffff"
|
||||||
class="scroll-h" :class="{'loading-scroll':cssFlag}"
|
class="scroll-h" :class="{'loading-scroll':cssFlag}"
|
||||||
>
|
>
|
||||||
<view class="white-bg margin-bottom20" v-for="(item, index) in list" :key="index" @click.stop="handleDetail(item)">
|
<view class="white-bg margin-bottom20" v-for="(item, index) in list" :key="index"
|
||||||
|
@click.stop="handleDetail(item)">
|
||||||
<view class="report-list">
|
<view class="report-list">
|
||||||
<view class="w-b-title title" @touchstart.prevent="handleTouchStart(item)" @touchend.prevent="handleTouchEnd">
|
<view class="w-b-title title" @touchstart.prevent="handleTouchStart(item)"
|
||||||
|
@touchend.prevent="handleTouchEnd">
|
||||||
{{ item.cusName }}
|
{{ item.cusName }}
|
||||||
<view v-if="item.nodeCode" class="r-right btn-edit" :class="statusColorMap[item.nodeCode]">{{ item.nodeCode }}</view><!---->
|
<view v-if="item.nodeCode" class="r-right btn-edit" :class="statusColorMap[item.nodeCode]">
|
||||||
|
{{ item.nodeCode }}
|
||||||
|
</view><!---->
|
||||||
</view>
|
</view>
|
||||||
<view class="r-list">
|
<view class="r-list">
|
||||||
<view class="r-left">客户人员名称</view>
|
<view class="r-left">客户人员名称</view>
|
||||||
@@ -107,7 +111,7 @@ let timerId = null;
|
|||||||
let handleSearch = () => {
|
let handleSearch = () => {
|
||||||
console.log(searchValue.value)
|
console.log(searchValue.value)
|
||||||
if (timerId) clearTimeout(timerId);
|
if (timerId) clearTimeout(timerId);
|
||||||
cssFlag.value = true;
|
|
||||||
timerId = setTimeout(async () => {
|
timerId = setTimeout(async () => {
|
||||||
// let res = await getList(1, upOption.value.page.size)
|
// let res = await getList(1, upOption.value.page.size)
|
||||||
await downCallback(mescrollRef.value.mescroll);
|
await downCallback(mescrollRef.value.mescroll);
|
||||||
@@ -119,7 +123,7 @@ let handleSearch = () => {
|
|||||||
watch(searchValue, (newValue, oldValue) => {
|
watch(searchValue, (newValue, oldValue) => {
|
||||||
handleSearch()
|
handleSearch()
|
||||||
})
|
})
|
||||||
let clearSearchValue = ()=>{
|
let clearSearchValue = () => {
|
||||||
searchValue.value = '';
|
searchValue.value = '';
|
||||||
}
|
}
|
||||||
// 查询列表
|
// 查询列表
|
||||||
@@ -149,6 +153,8 @@ const mescrollInit = (mescroll) => {
|
|||||||
// 下拉刷新
|
// 下拉刷新
|
||||||
const downCallback = async (mescroll) => {
|
const downCallback = async (mescroll) => {
|
||||||
try {
|
try {
|
||||||
|
cssFlag.value = true;
|
||||||
|
uni.showLoading();
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
// 重置页码为第一页
|
// 重置页码为第一页
|
||||||
const res = await getList(1, mescroll.size || upOption.page.size);
|
const res = await getList(1, mescroll.size || upOption.page.size);
|
||||||
@@ -156,6 +162,7 @@ const downCallback = async (mescroll) => {
|
|||||||
list.value = res.list;
|
list.value = res.list;
|
||||||
// 正确传递 total 参数
|
// 正确传递 total 参数
|
||||||
mescroll.endSuccess(res.list.length, res.total > (mescroll.size || upOption.page.size));
|
mescroll.endSuccess(res.list.length, res.total > (mescroll.size || upOption.page.size));
|
||||||
|
uni.hideLoading();
|
||||||
}, 500);
|
}, 500);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
@@ -201,31 +208,40 @@ const getList = (pageIndex, pageSize) => {
|
|||||||
|
|
||||||
// 跳转到详情
|
// 跳转到详情
|
||||||
let handleDetail = (item) => {
|
let handleDetail = (item) => {
|
||||||
uni.navigateTo({
|
if (item.nodeCode !== '完成') {
|
||||||
url: "/pages/business/CRM/customer/components/customerUserEdit",
|
uni.navigateTo({
|
||||||
events: {
|
url: "/pages/business/CRM/customer/components/customerUserEdit",
|
||||||
|
events: {
|
||||||
},
|
refreshCusUserList() {
|
||||||
success(res){
|
handleSearch();
|
||||||
res.eventChannel.emit('editCusData', {param: item, isAdd: false})
|
}
|
||||||
}
|
},
|
||||||
})
|
success(res) {
|
||||||
|
res.eventChannel.emit('editCusData', {param: item, isAdd: false})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: '已完成审核,不可修改',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 长按定时器ID
|
// 长按定时器ID
|
||||||
let touchTimerId = null;
|
let touchTimerId = null;
|
||||||
|
|
||||||
// 开始触摸
|
// 开始触摸
|
||||||
let handleTouchStart = (item)=>{
|
let handleTouchStart = (item) => {
|
||||||
touchTimerId = setTimeout(()=>{
|
touchTimerId = setTimeout(() => {
|
||||||
// console.log(item, "长按客户人员项")
|
// console.log(item, "长按客户人员项")
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
content: "是否确认删除本条消息?",
|
content: "是否确认删除本条消息?",
|
||||||
success(res){
|
success(res) {
|
||||||
if(res.confirm){
|
if (res.confirm) {
|
||||||
handleDelete(item);
|
handleDelete(item);
|
||||||
}else if(res.cancel){
|
} else if (res.cancel) {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -236,26 +252,26 @@ let handleTouchStart = (item)=>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 结束触摸
|
// 结束触摸
|
||||||
let handleTouchEnd = ()=>{
|
let handleTouchEnd = () => {
|
||||||
if(touchTimerId !== null){
|
if (touchTimerId !== null) {
|
||||||
clearTimeout(touchTimerId);
|
clearTimeout(touchTimerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除消息
|
// 删除消息
|
||||||
let handleDelete = async (item)=>{
|
let handleDelete = async (item) => {
|
||||||
// console.log(item)
|
// console.log(item)
|
||||||
const visitId = item.visitId;
|
const visitId = item.visitId;
|
||||||
// await removeVisit({visitId})
|
// await removeVisit({visitId})
|
||||||
// uni.hideLoading();
|
// uni.hideLoading();
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: visitId?visitId:"没有visitId字段,无法删除",
|
title: visitId ? visitId : "没有visitId字段,无法删除",
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="scss" scoped>
|
||||||
.all-body {
|
.all-body {
|
||||||
/* #ifdef APP-PLUS */
|
/* #ifdef APP-PLUS */
|
||||||
top: 150rpx;
|
top: 150rpx;
|
||||||
@@ -267,9 +283,6 @@ let handleDelete = async (item)=>{
|
|||||||
/* #endif */
|
/* #endif */
|
||||||
}
|
}
|
||||||
|
|
||||||
.search {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search .btn-search {
|
.search .btn-search {
|
||||||
border: none;
|
border: none;
|
||||||
@@ -286,14 +299,6 @@ let handleDelete = async (item)=>{
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search .custom-search {
|
|
||||||
width: 80%;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.search .custom-search.uni-searchbar {
|
|
||||||
padding-right: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scroll-h {
|
.scroll-h {
|
||||||
/* #ifdef APP-PLUS */
|
/* #ifdef APP-PLUS */
|
||||||
@@ -306,27 +311,32 @@ let handleDelete = async (item)=>{
|
|||||||
|
|
||||||
.white-bg {
|
.white-bg {
|
||||||
padding-bottom: 10rpx;
|
padding-bottom: 10rpx;
|
||||||
.w-b-title{
|
|
||||||
|
.w-b-title {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-edit{
|
.btn-edit {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
&.wancheng-deal {
|
&.wancheng-deal {
|
||||||
border:solid 1rpx #00aa7f;
|
border: solid 1rpx #00aa7f;
|
||||||
background-color: #00aa7f;
|
background-color: #00aa7f;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.daishenhe-un-deal {
|
&.daishenhe-un-deal {
|
||||||
border:solid 1rpx #ffaa7f;
|
border: solid 1rpx #ffaa7f;
|
||||||
background-color: #ffaa7f;
|
background-color: #ffaa7f;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.chaoqi-deal {
|
&.chaoqi-deal {
|
||||||
border:1rpx solid #ff0000;
|
border: 1rpx solid #ff0000;
|
||||||
background-color: #ff0000;
|
background-color: #ff0000;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tijiao-deal {
|
&.tijiao-deal {
|
||||||
border:1rpx solid #00aaff;
|
border: 1rpx solid #00aaff;
|
||||||
background-color: #00aaff;
|
background-color: #00aaff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,9 +20,9 @@
|
|||||||
<view class="search">
|
<view class="search">
|
||||||
<uni-search-bar class="custom-search" radius="28" placeholder="请输入客户名称" clearButton="auto"
|
<uni-search-bar class="custom-search" radius="28" placeholder="请输入客户名称" clearButton="auto"
|
||||||
cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"
|
cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"
|
||||||
v-model="searchValue"
|
v-model="searchValue" @clear="searchValue=''"
|
||||||
/>
|
/>
|
||||||
<button type="default" @click="searchValue=''" size="mini" class="btn-search">清空</button>
|
<!-- <button type="default" @click="searchValue=''" size="mini" class="btn-search">清空</button>-->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 分页部分 -->
|
<!-- 分页部分 -->
|
||||||
@@ -160,10 +160,12 @@ const upCallback = async (mescroll) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询搜索跳转
|
// 查询搜索跳转
|
||||||
let handleSearch = () => {
|
let handleSearch = async () => {
|
||||||
// 触发下拉刷新以重新加载数据
|
// 触发下拉刷新以重新加载数据
|
||||||
if (mescrollRef.value) {
|
if (mescrollRef.value) {
|
||||||
downCallback(mescrollRef.value.mescroll);
|
uni.showLoading()
|
||||||
|
await downCallback(mescrollRef.value.mescroll);
|
||||||
|
uni.hideLoading()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
@@ -202,10 +204,6 @@ const radioChange = (e) => {
|
|||||||
/* #endif */
|
/* #endif */
|
||||||
}
|
}
|
||||||
|
|
||||||
.search {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search .btn-search {
|
.search .btn-search {
|
||||||
border: none;
|
border: none;
|
||||||
background: none;
|
background: none;
|
||||||
@@ -221,15 +219,6 @@ const radioChange = (e) => {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search .custom-search {
|
|
||||||
width: 80%;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.search .custom-search.uni-searchbar {
|
|
||||||
padding-right: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scroll-h {
|
.scroll-h {
|
||||||
/* #ifdef APP-PLUS */
|
/* #ifdef APP-PLUS */
|
||||||
height: calc(100vh - 120px);
|
height: calc(100vh - 120px);
|
||||||
|
|||||||
@@ -248,7 +248,7 @@
|
|||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
|
|
||||||
<view v-if="formData.userId" class="fab">
|
<view v-if="formData.userId" class="fab">
|
||||||
<button class="mini-btn btn"type="warn" @click="handleReject">✘ 驳回</button>
|
<button class="mini-btn btn" type="warn" @click="handleReject">✘ 驳回</button>
|
||||||
<button class="mini-btn btn" type="primary" @click="handleApprove">✔ 通过</button>
|
<button class="mini-btn btn" type="primary" @click="handleApprove">✔ 通过</button>
|
||||||
</view>
|
</view>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
@@ -420,41 +420,13 @@ onLoad((options)=>{
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// 选择客户人员
|
|
||||||
let handleCustomerClick = () => {
|
|
||||||
// 在起始页面跳转到test.vue页面,并监听test.vue发送过来的事件数据
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/business/CRM/customer/selectCustomer',
|
|
||||||
events: {
|
|
||||||
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
|
|
||||||
cuSelected(data) {
|
|
||||||
console.log(data, "获取到返回的数据")
|
|
||||||
let {
|
|
||||||
cusName, // 公司名称
|
|
||||||
cusEstate, // 等级
|
|
||||||
cusId,
|
|
||||||
} = data;
|
|
||||||
customerUser.value.cusName = cusName;
|
|
||||||
if (!cusEstate) customerUser.value.sysThinkLevel = "该客户暂无等级信息,无法进行系统推荐"
|
|
||||||
formData.value.cusEstate = cusEstate;
|
|
||||||
formData.value.cusName = cusName;
|
|
||||||
formData.value.cusId = cusId;
|
|
||||||
getRecommendLevel();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
success: function (res) {
|
|
||||||
// 通过eventChannel向被打开页面传送数据
|
|
||||||
res.eventChannel.emit('requestCusList', {data: {cusName: customerUser.value.cusName}})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// 选择职能
|
// 选择职能
|
||||||
let handleFunctionChange = (e) => {
|
let handleFunctionChange = (e) => {
|
||||||
console.log(e.detail.value, '职能索引');
|
console.log(e.detail.value, '职能索引');
|
||||||
const {name} = functionalRequirementList[e.detail.value];
|
const {name} = functionalRequirementList[e.detail.value];
|
||||||
formData.value.functionalRequirements = name;
|
formData.value.functionalRequirements = name;
|
||||||
|
formData.value.function = name; // 职能需要特殊处理
|
||||||
getRecommendLevel();
|
getRecommendLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -618,13 +590,27 @@ let handleReject = () => {
|
|||||||
async success(res){
|
async success(res){
|
||||||
if(res.confirm){
|
if(res.confirm){
|
||||||
if(res.content){
|
if(res.content){
|
||||||
await changeOfPrimaryOwnershipNoApproved({
|
let res = await changeOfPrimaryOwnershipNoApproved({
|
||||||
opinionOwn: res.content,
|
opinionOwn: res.content,
|
||||||
userId: formData.value.userId
|
userId: formData.value.userId
|
||||||
})
|
})
|
||||||
uni.showToast({
|
if(res.code==200){
|
||||||
title: '驳回成功'
|
uni.showToast({
|
||||||
})
|
title: '操作成功',
|
||||||
|
success(){
|
||||||
|
const eventChannel = instance.getOpenerEventChannel();
|
||||||
|
eventChannel.emit('refreshOwnerChangeList')
|
||||||
|
setTimeout(()=>{
|
||||||
|
uni.navigateBack()
|
||||||
|
},1000)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: '操作失败',
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '操作失败!驳回原因不能为空',
|
title: '操作失败!驳回原因不能为空',
|
||||||
@@ -644,12 +630,17 @@ let handleApprove = () => {
|
|||||||
title: '操作成功',
|
title: '操作成功',
|
||||||
success(){
|
success(){
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
uni.navigateBack()
|
||||||
const eventChannel = instance.getOpenerEventChannel();
|
const eventChannel = instance.getOpenerEventChannel();
|
||||||
eventChannel.emit('refreshOwnerChangeList')
|
eventChannel.emit('refreshOwnerChangeList')
|
||||||
uni.navigateBack()
|
|
||||||
},1000)
|
},1000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: '操作失败',
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}).catch(err=>{
|
}).catch(err=>{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<view class="con-body">
|
<view class="con-body">
|
||||||
<view class="con-bg">
|
<view class="con-bg">
|
||||||
<!-- 头部 -->
|
<!-- 头部 -->
|
||||||
<customHeader ref="customHeaderRef" :title="'客户人员归属人变更'" :leftFlag="true" :rightFlag="false">
|
<customHeader ref="customHeaderRef" :title="'客户人员主归属人变更审核'" :leftFlag="true" :rightFlag="false">
|
||||||
</customHeader>
|
</customHeader>
|
||||||
|
|
||||||
<!-- 高度来避免头部遮挡 -->
|
<!-- 高度来避免头部遮挡 -->
|
||||||
@@ -31,9 +31,9 @@
|
|||||||
>
|
>
|
||||||
<view class="white-bg margin-bottom20" v-for="(item, index) in list" :key="index">
|
<view class="white-bg margin-bottom20" v-for="(item, index) in list" :key="index">
|
||||||
<view class="report-list" @click.stop="handleDetail(item)">
|
<view class="report-list" @click.stop="handleDetail(item)">
|
||||||
<view class="w-b-title title" >
|
<view class="r-list title" >
|
||||||
{{ item.cusName }}
|
{{ item.cusName }}
|
||||||
<view class="r-right" :class="item.auditStatus ? '' : 'btn-edit' ">{{item.auditStatus?'':'待您审批'}}</view>
|
<view class="r-right" :class="item.auditStatus ? '' : 'btn-pink' ">{{item.auditStatus?'':'待您审批'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="r-list">
|
<view class="r-list">
|
||||||
<view class="r-left">客户人员名称</view>
|
<view class="r-left">客户人员名称</view>
|
||||||
@@ -100,7 +100,7 @@ let timerId = null;
|
|||||||
let handleSearch = () => {
|
let handleSearch = () => {
|
||||||
// 防抖搜索 console.log(searchValue.value)
|
// 防抖搜索 console.log(searchValue.value)
|
||||||
if (timerId) clearTimeout(timerId);
|
if (timerId) clearTimeout(timerId);
|
||||||
cssFlag.value = true;
|
|
||||||
timerId = setTimeout(async () => {
|
timerId = setTimeout(async () => {
|
||||||
|
|
||||||
// let res = await getList(1, upOption.value.page.size)
|
// let res = await getList(1, upOption.value.page.size)
|
||||||
@@ -143,13 +143,17 @@ const mescrollInit = (mescroll) => {
|
|||||||
// 下拉刷新
|
// 下拉刷新
|
||||||
const downCallback = async (mescroll) => {
|
const downCallback = async (mescroll) => {
|
||||||
try {
|
try {
|
||||||
|
cssFlag.value = true;
|
||||||
|
uni.showLoading();
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
// 重置页码为第一页
|
// 重置页码为第一页
|
||||||
const res = await getList(1, mescroll.size || upOption.page.size);
|
const res = await getList(1, mescroll.size || upOption.page.size);
|
||||||
cssFlag.value = false;
|
|
||||||
list.value = res.list;
|
list.value = res.list;
|
||||||
|
cssFlag.value = false;
|
||||||
// 正确传递 total 参数
|
// 正确传递 total 参数
|
||||||
mescroll.endSuccess(res.list.length, res.total > (mescroll.size || upOption.page.size));
|
mescroll.endSuccess(res.list.length, res.total > (mescroll.size || upOption.page.size));
|
||||||
|
uni.hideLoading();
|
||||||
}, 500);
|
}, 500);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
@@ -262,12 +266,12 @@ let handleDetail = (item) => {
|
|||||||
|
|
||||||
.white-bg {
|
.white-bg {
|
||||||
padding-bottom: 10rpx;
|
padding-bottom: 10rpx;
|
||||||
.w-b-title{
|
.title{
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-edit{
|
.btn-pink{
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user