Compare commits
5 Commits
92311e0aaf
...
develop-71
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d359e2708 | ||
|
|
a51ecb2fa0 | ||
|
|
9223b619f5 | ||
|
|
63a9a1def5 | ||
|
|
a0ddac37f5 |
@@ -3,7 +3,7 @@ import request from "@/utils/request"
|
|||||||
// 查询客户人员列表
|
// 查询客户人员列表
|
||||||
export function getCustomerList(params){
|
export function getCustomerList(params){
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appCustomerIfno/pageList',
|
url: '/crm/app/appCustomerIfno/pageList',
|
||||||
data: params
|
data: params
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
@@ -11,35 +11,35 @@ export function getCustomerList(params){
|
|||||||
// 查询系统推荐等级
|
// 查询系统推荐等级
|
||||||
export function getCustomerLevel(params){
|
export function getCustomerLevel(params){
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appCrmCusUserNewController/queryCustomerLevel',
|
url: '/crm/app/appCrmCusUserNewController/queryCustomerLevel',
|
||||||
data: params
|
data: params
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
// 客户人员新增
|
// 客户人员新增
|
||||||
export function saveappCrmCusUserNew(params){
|
export function saveappCrmCusUserNew(params){
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appCrmCusUserNewController/add',
|
url: '/crm/app/appCrmCusUserNewController/add',
|
||||||
data: params
|
data: params
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
// 查询业务员名下所有的客户
|
// 查询业务员名下所有的客户
|
||||||
export function SearchForAllCustomersSalesperson(params){
|
export function SearchForAllCustomersSalesperson(params){
|
||||||
return request.get({
|
return request.get({
|
||||||
url: 'app/appCrmCusUserNewController/SearchForAllCustomersSalesperson',
|
url: '/crm/app/appCrmCusUserNewController/SearchForAllCustomersSalesperson',
|
||||||
data: params
|
data: params
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
// 客户人员归属审核详情
|
// 客户人员归属审核详情
|
||||||
export function getCusUserApprovalListDetail(params){
|
export function getCusUserApprovalListDetail(params){
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appCrmCusUserNewController/getCusUserApprovalListDetail',
|
url: '/crm/app/appCrmCusUserNewController/getCusUserApprovalListDetail',
|
||||||
data: params
|
data: params
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
// 查询主归属人列表
|
// 查询主归属人列表
|
||||||
export function SearchForAllPerson(params){
|
export function SearchForAllPerson(params){
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appCrmCusUserNewController/SearchForAllPerson',
|
url: '/crm/app/appCrmCusUserNewController/SearchForAllPerson',
|
||||||
data: params
|
data: params
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ export function SearchForAllPerson(params){
|
|||||||
// 客户人员新增审核列表
|
// 客户人员新增审核列表
|
||||||
export function getCusUserApprovalList(params) {
|
export function getCusUserApprovalList(params) {
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appCrmCusUserNewController/getCusUserApprovalList',
|
url: '/crm/app/appCrmCusUserNewController/getCusUserApprovalList',
|
||||||
data: params
|
data: params
|
||||||
}, {isTransformResponse: false}
|
}, {isTransformResponse: false}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,35 +2,35 @@ import request from "@/utils/request"
|
|||||||
// 删除客户人员归属消息
|
// 删除客户人员归属消息
|
||||||
export function removeVisit(params){
|
export function removeVisit(params){
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appVisistReport/remove',
|
url: '/crm/app/appVisistReport/remove',
|
||||||
data: params
|
data: params
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
// 更新客户人员
|
// 更新客户人员
|
||||||
export function upadateappCrmCusUserNew (data){
|
export function upadateappCrmCusUserNew (data){
|
||||||
return request.post({
|
return request.post({
|
||||||
url: '/app/appCrmCusUserNewController/update',
|
url: '/crm/app/appCrmCusUserNewController/update',
|
||||||
data
|
data
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
// 客户人员审核通过
|
// 客户人员审核通过
|
||||||
export function clientPersonnelsApproval(data) {
|
export function clientPersonnelsApproval(data) {
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appCrmCusUserNewController/clientPersonnelsApproval',
|
url: '/crm/app/appCrmCusUserNewController/clientPersonnelsApproval',
|
||||||
data
|
data
|
||||||
}, {isTransformResponse: false});
|
}, {isTransformResponse: false});
|
||||||
}
|
}
|
||||||
//客户人员驳回
|
//客户人员驳回
|
||||||
export function customerPersonnelsRejectio(data) {
|
export function customerPersonnelsRejectio(data) {
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appCrmCusUserNewController/customerPersonnelsRejectio',
|
url: '/crm/app/appCrmCusUserNewController/customerPersonnelsRejectio',
|
||||||
data
|
data
|
||||||
}, {isTransformResponse: false});
|
}, {isTransformResponse: false});
|
||||||
}
|
}
|
||||||
//主归属人变更提交
|
//主归属人变更提交
|
||||||
export function submissionOfChangeOfMainOwner (data){
|
export function submissionOfChangeOfMainOwner (data){
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appCrmCusUserNewController/submissionOfChangeOfMainOwner',
|
url: '/crm/app/appCrmCusUserNewController/submissionOfChangeOfMainOwner',
|
||||||
data
|
data
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ import request from "@/utils/request";
|
|||||||
//主归属人变更信息查看(列表)
|
//主归属人变更信息查看(列表)
|
||||||
export function queryViewMainOwnerList(params){
|
export function queryViewMainOwnerList(params){
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appCrmCusUserNewController/viewInformationChangesInprimaryOwnership',
|
url: '/crm/app/appCrmCusUserNewController/viewInformationChangesInprimaryOwnership',
|
||||||
data: params
|
data: params
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ export function queryViewMainOwnerList(params){
|
|||||||
//主归属人变更信息查看(详情)
|
//主归属人变更信息查看(详情)
|
||||||
export function queryViewMainOwnerDetail(params){
|
export function queryViewMainOwnerDetail(params){
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appCrmCusUserNewController/getCrmCusUserNewChangeOwnerList',
|
url: '/crm/app/appCrmCusUserNewController/getCrmCusUserNewChangeOwnerList',
|
||||||
data: params
|
data: params
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,7 @@ export function queryViewMainOwnerDetail(params){
|
|||||||
//查询主归属人变更人员的列表数据
|
//查询主归属人变更人员的列表数据
|
||||||
export function personnelAwaitingReviewForChange(params){
|
export function personnelAwaitingReviewForChange(params){
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appCrmCusUserNewController/personnelAwaitingReviewForChange',
|
url: '/crm/app/appCrmCusUserNewController/personnelAwaitingReviewForChange',
|
||||||
data: params
|
data: params
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
@@ -28,14 +28,14 @@ export function personnelAwaitingReviewForChange(params){
|
|||||||
//主归属人变更驳回
|
//主归属人变更驳回
|
||||||
export function changeOfPrimaryOwnershipNoApproved(params) {
|
export function changeOfPrimaryOwnershipNoApproved(params) {
|
||||||
return request.get({
|
return request.get({
|
||||||
url:'/app/appCrmCusUserNewController/changeOfPrimaryOwnershipNoApproved',
|
url:'/crm/app/appCrmCusUserNewController/changeOfPrimaryOwnershipNoApproved',
|
||||||
data: params
|
data: params
|
||||||
}, {isTransformResponse: false});
|
}, {isTransformResponse: false});
|
||||||
}
|
}
|
||||||
//主归属人变更通过
|
//主归属人变更通过
|
||||||
export function changeOfPrimaryOwnershipApproved (params) {
|
export function changeOfPrimaryOwnershipApproved (params) {
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appCrmCusUserNewController/changeOfPrimaryOwnershipApproved',
|
url: '/crm/app/appCrmCusUserNewController/changeOfPrimaryOwnershipApproved',
|
||||||
data: params
|
data: params
|
||||||
}, {isTransformResponse: false});
|
}, {isTransformResponse: false});
|
||||||
}
|
}
|
||||||
@@ -1,36 +1,29 @@
|
|||||||
import request from "@/utils/request"
|
import request from "@/utils/request"
|
||||||
|
// 获取用户信息
|
||||||
export function getPersonalPlanList(params) {
|
/*export function getUserInfo(data) {
|
||||||
return request.post({
|
|
||||||
url: '/getPersonalPlanList',
|
|
||||||
params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getUserInfo(data) {
|
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/user/getUserInfo',
|
url: '/app/user/getUserInfo',
|
||||||
data
|
data
|
||||||
}, {isTransformResponse: false})
|
}, {isTransformResponse: false})
|
||||||
|
}*/
|
||||||
|
//获取个人周计划列表
|
||||||
|
export function getWeeklyPlanList(data) {
|
||||||
|
return request.get({
|
||||||
|
url: '/crm/app/appWeeklyPlan/getWeeklyListByUser',
|
||||||
|
data
|
||||||
|
}, {isTransformResponse: false})
|
||||||
}
|
}
|
||||||
//获取所有人周计划列表
|
//获取所有人周计划列表
|
||||||
export function getAllWeekPlanList(params){
|
export function getAllWeekPlanList(params){
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appWeeklyPlan/list',
|
url: '/crm/app/appWeeklyPlan/list',
|
||||||
data: params
|
data: params
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
//获取个人周计划列表
|
|
||||||
export function getWeeklyPlanList(data) {
|
|
||||||
return request.get({
|
|
||||||
url: '/app/appWeeklyPlan/getWeeklyListByUser',
|
|
||||||
data
|
|
||||||
}, {isTransformResponse: false})
|
|
||||||
}
|
|
||||||
// 组合查询计划列表
|
// 组合查询计划列表
|
||||||
export function getWeekPlanListByDate(params){
|
export function getWeekPlanListByDate(params){
|
||||||
return request.get({
|
return request.get({
|
||||||
url: '/app/appWeeklyPlan/weeklyListByDate',
|
url: '/crm/app/appWeeklyPlan/weeklyListByDate',
|
||||||
data: params
|
data: params
|
||||||
},{isTransformResponse: false})
|
},{isTransformResponse: false})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import request from "@/utils/request"
|
|||||||
|
|
||||||
export function updateWeekPlanList(data){
|
export function updateWeekPlanList(data){
|
||||||
return request.post({
|
return request.post({
|
||||||
url: '/app/appWeeklyPlan/updateWeekly',
|
url: '/crm/app/appWeeklyPlan/updateWeekly',
|
||||||
data: data,
|
data: data,
|
||||||
header: {
|
header: {
|
||||||
'Content-Type': 'application/json;charset=UTF-8'
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
@@ -12,7 +12,7 @@ export function updateWeekPlanList(data){
|
|||||||
// 判断本周是否写过计划
|
// 判断本周是否写过计划
|
||||||
export function judgeThisWeek (data){
|
export function judgeThisWeek (data){
|
||||||
return request.post({
|
return request.post({
|
||||||
url: '/app/appWeeklyPlan/Judgethisweek',
|
url: '/crm/app/appWeeklyPlan/Judgethisweek',
|
||||||
data,
|
data,
|
||||||
header: {'Content-Type': 'application/json;charset=UTF-8'}
|
header: {'Content-Type': 'application/json;charset=UTF-8'}
|
||||||
})
|
})
|
||||||
@@ -21,7 +21,7 @@ export function judgeThisWeek (data){
|
|||||||
// 新增周计划
|
// 新增周计划
|
||||||
export function addPlan(data){
|
export function addPlan(data){
|
||||||
return request.post({
|
return request.post({
|
||||||
url: '/app/appWeeklyPlan/addComment',
|
url: '/crm/app/appWeeklyPlan/addComment',
|
||||||
data,
|
data,
|
||||||
header:{'Content-Type': 'application/json;charset=UTF-8'}
|
header:{'Content-Type': 'application/json;charset=UTF-8'}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -43,8 +43,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, reactive, ref } from "vue";
|
import { onMounted, reactive, ref, defineExpose} from "vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 是否显示全部清空按钮
|
// 是否显示全部清空按钮
|
||||||
showClearIcon: {
|
showClearIcon: {
|
||||||
@@ -175,6 +174,14 @@ const handleChange = (index, item) => {
|
|||||||
// 触发回调函数
|
// 触发回调函数
|
||||||
emit("change", changevalue, realValue);
|
emit("change", changevalue, realValue);
|
||||||
};
|
};
|
||||||
|
// 失去焦点时关闭选项列表
|
||||||
|
const handleBlur = () => {
|
||||||
|
active.value = false;
|
||||||
|
};
|
||||||
|
// 定义组件实例暴露的方法
|
||||||
|
defineExpose({
|
||||||
|
handleBlur
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -168,7 +168,7 @@
|
|||||||
<uni-forms-item label="爱好" name="hobby" class="uni-forms-item is-direction-top is-top">
|
<uni-forms-item label="爱好" name="hobby" class="uni-forms-item is-direction-top is-top">
|
||||||
<!-- 索引:hobbyIndex 范围:hobbyList 响应:handleHobbyChange-->
|
<!-- 索引:hobbyIndex 范围:hobbyList 响应:handleHobbyChange-->
|
||||||
<uni-easyinput v-model="formData.hobby" placeholder="请输入爱好" :disabled="!editable"/>
|
<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'"
|
@change="handleHobbyChange" :slabel="'name'"
|
||||||
|
|
||||||
></multipleSelect><!--placeholder="请选择爱好标签"-->
|
></multipleSelect><!--placeholder="请选择爱好标签"-->
|
||||||
@@ -467,20 +467,29 @@ let handleThinkLevelChange = (e) => {
|
|||||||
// 系统推荐等级
|
// 系统推荐等级
|
||||||
let recommendLevel = ref("");
|
let recommendLevel = ref("");
|
||||||
let getRecommendLevel = async () => {
|
let getRecommendLevel = async () => {
|
||||||
if (formData.value.cusEstate && formData.value.functionalRequirements) {
|
if (formData.value.cusEstate) {
|
||||||
let {cusEstate, functionalRequirements} = formData.value;
|
let {cusEstate, functionalRequirements} = formData.value;
|
||||||
let param = {cusEstate, functionalRequirements};
|
let param = {cusEstate, functionalRequirements};
|
||||||
if (formData.value.salesmanThinkLevel) {
|
if (formData.value.salesmanThinkLevel) {
|
||||||
param.personnelLevel = 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, "客户的系统推荐等级获取失败")
|
console.error(err, "客户的系统推荐等级获取失败")
|
||||||
})
|
})*/
|
||||||
if (!res.systemRecommendationLevel) {
|
try{
|
||||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
if(res.data.systemRecommendationLevel){
|
||||||
console.log(formData.value.systemThinkLevel + "???")
|
formData.value.systemThinkLevel = res.data.systemRecommendationLevel;
|
||||||
|
}else{
|
||||||
|
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐";
|
||||||
}
|
}
|
||||||
|
}catch(e){
|
||||||
|
if (res.systemRecommendationLevel) {
|
||||||
formData.value.systemThinkLevel = res.systemRecommendationLevel;
|
formData.value.systemThinkLevel = res.systemRecommendationLevel;
|
||||||
|
}else{
|
||||||
|
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
recommendLevel.value = "无公司等级信息,无法推荐等级";
|
recommendLevel.value = "无公司等级信息,无法推荐等级";
|
||||||
}
|
}
|
||||||
@@ -509,8 +518,7 @@ let handleUserTypeChange = (e) => {
|
|||||||
|
|
||||||
// 选择日期
|
// 选择日期
|
||||||
function handleTenureTimeChange(e) {
|
function handleTenureTimeChange(e) {
|
||||||
let {value} = e.detail;
|
formData.value.tenureTime = e;
|
||||||
formData.value.tenureTime = value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 需求层次索引
|
// 需求层次索引
|
||||||
@@ -533,16 +541,17 @@ let handleDevelopChange = e => {
|
|||||||
|
|
||||||
// 选择生日
|
// 选择生日
|
||||||
function handleBirthdayChange(e) {
|
function handleBirthdayChange(e) {
|
||||||
let{value} = e.detail
|
formData.value.birthday = e;
|
||||||
formData.value.birthday = value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 爱好标签索引
|
// 爱好标签索引
|
||||||
let hobbyIndex = reactive([]);
|
let hobbyIds = ref([]);
|
||||||
|
let hobbies = ref([]);
|
||||||
// 选择爱好标签
|
// 选择爱好标签
|
||||||
const handleHobbyChange = (item, value) => {
|
const handleHobbyChange = (items, ids) => {
|
||||||
// console.log("爱好", item, value);
|
console.log('选择爱好', items, ids);
|
||||||
hobbyIndex = value;
|
hobbyIds.value = [];
|
||||||
|
hobbies.value = items;
|
||||||
};
|
};
|
||||||
// 选择
|
// 选择
|
||||||
const handleNativeChange = (e) => {
|
const handleNativeChange = (e) => {
|
||||||
|
|||||||
@@ -168,7 +168,7 @@
|
|||||||
<uni-forms-item label="爱好" name="hobby" class="uni-forms-item is-direction-top is-top">
|
<uni-forms-item label="爱好" name="hobby" class="uni-forms-item is-direction-top is-top">
|
||||||
<!-- 索引:hobbyIndex 范围:hobbyList 响应:handleHobbyChange-->
|
<!-- 索引:hobbyIndex 范围:hobbyList 响应:handleHobbyChange-->
|
||||||
<uni-easyinput v-model="formData.hobby" placeholder="请输入爱好"/>
|
<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'"
|
@change="handleHobbyChange" :slabel="'name'"
|
||||||
|
|
||||||
></multipleSelect><!--placeholder="请选择爱好标签"-->
|
></multipleSelect><!--placeholder="请选择爱好标签"-->
|
||||||
@@ -468,20 +468,29 @@ let handleThinkLevelChange = (e) => {
|
|||||||
// 系统推荐等级
|
// 系统推荐等级
|
||||||
let recommendLevel = ref("");
|
let recommendLevel = ref("");
|
||||||
let getRecommendLevel = async () => {
|
let getRecommendLevel = async () => {
|
||||||
if (formData.value.cusEstate && formData.value.functionalRequirements) {
|
if (formData.value.cusEstate) {
|
||||||
let {cusEstate, functionalRequirements} = formData.value;
|
let {cusEstate, functionalRequirements} = formData.value;
|
||||||
let param = {cusEstate, functionalRequirements};
|
let param = {cusEstate, functionalRequirements};
|
||||||
if (formData.value.salesmanThinkLevel) {
|
if (formData.value.salesmanThinkLevel) {
|
||||||
param.personnelLevel = 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, "客户的系统推荐等级获取失败")
|
console.error(err, "客户的系统推荐等级获取失败")
|
||||||
})
|
})*/
|
||||||
if (!res.systemRecommendationLevel) {
|
try{
|
||||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
if(res.data.systemRecommendationLevel){
|
||||||
console.log(formData.value.systemThinkLevel + "???")
|
formData.value.systemThinkLevel = res.data.systemRecommendationLevel;
|
||||||
|
}else{
|
||||||
|
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐";
|
||||||
}
|
}
|
||||||
|
}catch(e){
|
||||||
|
if (res.systemRecommendationLevel) {
|
||||||
formData.value.systemThinkLevel = res.systemRecommendationLevel;
|
formData.value.systemThinkLevel = res.systemRecommendationLevel;
|
||||||
|
}else{
|
||||||
|
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
recommendLevel.value = "无公司等级信息,无法推荐等级";
|
recommendLevel.value = "无公司等级信息,无法推荐等级";
|
||||||
}
|
}
|
||||||
@@ -510,8 +519,7 @@ let handleUserTypeChange = (e) => {
|
|||||||
|
|
||||||
// 选择日期
|
// 选择日期
|
||||||
function handleTenureTimeChange(e) {
|
function handleTenureTimeChange(e) {
|
||||||
let {value} = e.detail;
|
formData.value.tenureTime = e;
|
||||||
formData.value.tenureTime = value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 需求层次索引
|
// 需求层次索引
|
||||||
@@ -534,17 +542,19 @@ let handleDevelopChange = e => {
|
|||||||
|
|
||||||
// 选择生日
|
// 选择生日
|
||||||
function handleBirthdayChange(e) {
|
function handleBirthdayChange(e) {
|
||||||
let{value} = e.detail
|
formData.value.birthday = e;
|
||||||
formData.value.birthday = value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 爱好标签索引
|
// 爱好标签索引
|
||||||
let hobbyIndex = reactive([]);
|
let hobbyIds = ref([]);
|
||||||
|
let hobbies = ref([]);
|
||||||
// 选择爱好标签
|
// 选择爱好标签
|
||||||
const handleHobbyChange = (item, value) => {
|
const handleHobbyChange = (items, ids) => {
|
||||||
// console.log("爱好", item, value);
|
console.log('选择爱好', items, ids);
|
||||||
hobbyIndex = value;
|
hobbyIds.value = [];
|
||||||
|
hobbies.value = items;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 选择
|
// 选择
|
||||||
const handleNativeChange = (e) => {
|
const handleNativeChange = (e) => {
|
||||||
formData.value.nativec = (e.detail.value.map(item => {
|
formData.value.nativec = (e.detail.value.map(item => {
|
||||||
@@ -568,16 +578,16 @@ let handleWorkingStatusChange = e => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let submitForm = async () => {
|
let submitForm = async () => {
|
||||||
let hobbyTags = hobbyIndex.map(it => {
|
let hobbyTags = hobbies.value.map(it => {
|
||||||
let {name} = hobbyList[it];
|
let {name} = it;
|
||||||
return name;
|
return name;
|
||||||
})
|
})
|
||||||
formData.value.iphone = formData.value.mobilePhone; // 特殊处理
|
|
||||||
const hobbyTagString = hobbyTags.join(',');
|
const hobbyTagString = hobbyTags.join(',');
|
||||||
console.log(hobbyTagString);
|
console.log(hobbyTagString);
|
||||||
if (hobbyTagString || formData.value.hobby) {
|
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(formData.value, "校验表单数据")
|
||||||
// console.log(recommendLevel);
|
// console.log(recommendLevel);
|
||||||
formData.value.cusName = customerUser.value.cusName;
|
formData.value.cusName = customerUser.value.cusName;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<!-- 正文内容 -->
|
<!-- 正文内容 -->
|
||||||
<view class="white-bg">
|
<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 ref="formRef" :model="formData" :rules="rules" label-width="40%">
|
||||||
<!-- 选择客户 -->
|
<!-- 选择客户 -->
|
||||||
<uni-forms-item label="客户名称" name="cusName" required class="f-c-right">
|
<uni-forms-item label="客户名称" name="cusName" required class="f-c-right">
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
<uni-forms-item label="爱好" name="hobby" class="uni-forms-item is-direction-top is-top">
|
<uni-forms-item label="爱好" name="hobby" class="uni-forms-item is-direction-top is-top">
|
||||||
<!-- 索引:hobbyIndex 范围:hobbyList 响应:handleHobbyChange-->
|
<!-- 索引:hobbyIndex 范围:hobbyList 响应:handleHobbyChange-->
|
||||||
<uni-easyinput v-model="formData.hobby" placeholder="请输入爱好"/>
|
<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'"
|
@change="handleHobbyChange" :slabel="'name'"
|
||||||
|
|
||||||
></multipleSelect><!--placeholder="请选择爱好标签"-->
|
></multipleSelect><!--placeholder="请选择爱好标签"-->
|
||||||
@@ -271,7 +271,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {ref, onMounted, computed, reactive} from 'vue'
|
import {ref, reactive} from 'vue'
|
||||||
import customHeader from '@/components/customHeader.vue'
|
import customHeader from '@/components/customHeader.vue'
|
||||||
import multipleSelect from '@/components/multipleSelect.vue'
|
import multipleSelect from '@/components/multipleSelect.vue'
|
||||||
import {
|
import {
|
||||||
@@ -284,7 +284,8 @@ import {
|
|||||||
} from "./dataMap";
|
} from "./dataMap";
|
||||||
import city from "@/utils/area";
|
import city from "@/utils/area";
|
||||||
import {getCustomerLevel, saveappCrmCusUserNew} from "@/api/crm/customer/getCustomer";
|
import {getCustomerLevel, saveappCrmCusUserNew} from "@/api/crm/customer/getCustomer";
|
||||||
|
// 对 multipleSelect 组件的引用
|
||||||
|
const hobbySelectRef = ref(null);
|
||||||
// 表单引用
|
// 表单引用
|
||||||
const formRef = ref({});
|
const formRef = ref({});
|
||||||
// 表单数据
|
// 表单数据
|
||||||
@@ -448,20 +449,29 @@ let handleThinkLevelChange = (e) => {
|
|||||||
// 系统推荐等级
|
// 系统推荐等级
|
||||||
let recommendLevel = ref("");
|
let recommendLevel = ref("");
|
||||||
let getRecommendLevel = async () => {
|
let getRecommendLevel = async () => {
|
||||||
if (formData.value.cusEstate && formData.value.functionalRequirements) {
|
if (formData.value.cusEstate) {
|
||||||
let {cusEstate, functionalRequirements} = formData.value;
|
let {cusEstate, functionalRequirements} = formData.value;
|
||||||
let param = {cusEstate, functionalRequirements};
|
let param = {cusEstate, functionalRequirements};
|
||||||
if (formData.value.salesmanThinkLevel) {
|
if (formData.value.salesmanThinkLevel) {
|
||||||
param.personnelLevel = 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, "客户的系统推荐等级获取失败")
|
console.error(err, "客户的系统推荐等级获取失败")
|
||||||
})
|
})*/
|
||||||
if (!res.systemRecommendationLevel) {
|
try{
|
||||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
if(res.data.systemRecommendationLevel){
|
||||||
console.log(formData.value.systemThinkLevel + "???")
|
formData.value.systemThinkLevel = res.data.systemRecommendationLevel;
|
||||||
|
}else{
|
||||||
|
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐";
|
||||||
}
|
}
|
||||||
|
}catch(e){
|
||||||
|
if (res.systemRecommendationLevel) {
|
||||||
formData.value.systemThinkLevel = res.systemRecommendationLevel;
|
formData.value.systemThinkLevel = res.systemRecommendationLevel;
|
||||||
|
}else{
|
||||||
|
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
recommendLevel.value = "无公司等级信息,无法推荐等级";
|
recommendLevel.value = "无公司等级信息,无法推荐等级";
|
||||||
}
|
}
|
||||||
@@ -489,9 +499,9 @@ let handleUserTypeChange = (e) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 选择日期
|
// 选择日期
|
||||||
function handleTenureTimeChange(e) {
|
function handleTenureTimeChange(val) {
|
||||||
let {value} = e.detail;
|
console.log(val)
|
||||||
formData.value.tenureTime = value;
|
formData.value.tenureTime = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 需求层次索引
|
// 需求层次索引
|
||||||
@@ -513,18 +523,20 @@ let handleDevelopChange = e => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 选择生日
|
// 选择生日
|
||||||
function handleBirthdayChange(e) {
|
function handleBirthdayChange(val) {
|
||||||
let{value} = e.detail
|
formData.value.birthday = val;
|
||||||
formData.value.birthday = value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 爱好标签索引
|
// 爱好标签索引
|
||||||
let hobbyIndex = reactive([]);
|
let hobbyIds = ref([]);
|
||||||
|
let hobbies = ref([]);
|
||||||
// 选择爱好标签
|
// 选择爱好标签
|
||||||
const handleHobbyChange = (item, value) => {
|
const handleHobbyChange = (items, ids) => {
|
||||||
// console.log("爱好", item, value);
|
console.log('选择爱好', items, ids);
|
||||||
hobbyIndex = value;
|
hobbyIds.value = [];
|
||||||
|
hobbies.value = items;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 选择
|
// 选择
|
||||||
const handleNativeChange = (e) => {
|
const handleNativeChange = (e) => {
|
||||||
formData.value.nativec = (e.detail.value.map(item => {
|
formData.value.nativec = (e.detail.value.map(item => {
|
||||||
@@ -546,16 +558,93 @@ let handleWorkingStatusChange = e => {
|
|||||||
workingStatusIndex.value = 0;
|
workingStatusIndex.value = 0;
|
||||||
formData.value.workingStatus = workingStatusList[value].name;
|
formData.value.workingStatus = workingStatusList[value].name;
|
||||||
}
|
}
|
||||||
|
// 多选组件失去焦点关闭
|
||||||
let submitForm = async () => {
|
let handleBlur = () => {
|
||||||
let hobbyTags = hobbyIndex.map(it => {
|
if (hobbySelectRef.value) hobbySelectRef.value.handleBlur();
|
||||||
let {name} = hobbyList[it];
|
}
|
||||||
|
// 提取爱好标签处理逻辑
|
||||||
|
const processHobbyTags = () => {
|
||||||
|
let hobbyTags = hobbies.value.map(it => {
|
||||||
|
let {name} = it;
|
||||||
return name;
|
return name;
|
||||||
})
|
})
|
||||||
const hobbyTagString = hobbyTags.join(',');
|
const hobbyTagString = hobbyTags.join(',');
|
||||||
console.log(hobbyTagString);
|
console.log(hobbyTagString);
|
||||||
if (hobbyTagString || formData.value.hobby) {
|
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(formData.value, "校验表单数据")
|
||||||
// console.log(recommendLevel);
|
// console.log(recommendLevel);
|
||||||
@@ -577,7 +666,7 @@ let submitForm = async () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
setTimeout(() => uni.navigateBack(), 1500);
|
setTimeout(() => uni.navigateBack(), 1500);
|
||||||
}).catch(err=>{
|
}).catch(() => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: "保存失败"
|
title: "保存失败"
|
||||||
@@ -593,7 +682,7 @@ let submitForm = async () => {
|
|||||||
})
|
})
|
||||||
console.warn(err);
|
console.warn(err);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<view class="all-body">
|
<view class="all-body">
|
||||||
<!-- 搜索 @blur="blur" @focus="focus" @input="input" @cancel="cancel" @clear="clear"-->
|
<!-- 搜索 @blur="blur" @focus="focus" @input="input" @cancel="cancel" @clear="clear"-->
|
||||||
<view class="search">
|
<view class="search">
|
||||||
<uni-search-bar class="custom-search" radius="28" placeholder="请输入客户名称" clearButton="auto"
|
<uni-search-bar class="custom-search" radius="28" placeholder="请输入客户人员名称" clearButton="auto"
|
||||||
cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"
|
cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"
|
||||||
@clear="clearSearchValue"
|
@clear="clearSearchValue"
|
||||||
v-model="searchValue"
|
v-model="searchValue"
|
||||||
@@ -132,7 +132,10 @@ let list = ref([]);
|
|||||||
const upOption = ref({
|
const upOption = ref({
|
||||||
page: {num: 0, size: 10},
|
page: {num: 0, size: 10},
|
||||||
noMoreSize: 5,
|
noMoreSize: 5,
|
||||||
empty: {tip: '~ 空空如也 ~'},
|
empty: {
|
||||||
|
tip: '~ 空空如也 ~',
|
||||||
|
icon: "../../static/images/mescroll-empty.png"
|
||||||
|
},
|
||||||
textLoading: '加载中...',
|
textLoading: '加载中...',
|
||||||
textNoMore: '已经到底了'
|
textNoMore: '已经到底了'
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -168,7 +168,7 @@
|
|||||||
<uni-forms-item label="爱好" name="hobby" class="uni-forms-item is-direction-top is-top">
|
<uni-forms-item label="爱好" name="hobby" class="uni-forms-item is-direction-top is-top">
|
||||||
<!-- 索引:hobbyIndex 范围:hobbyList 响应:handleHobbyChange-->
|
<!-- 索引:hobbyIndex 范围:hobbyList 响应:handleHobbyChange-->
|
||||||
<uni-easyinput v-model="formData.hobby" placeholder="请输入爱好" :disabled="!editable"/>
|
<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'"
|
@change="handleHobbyChange" :slabel="'name'"
|
||||||
|
|
||||||
></multipleSelect><!--placeholder="请选择爱好标签"-->
|
></multipleSelect><!--placeholder="请选择爱好标签"-->
|
||||||
@@ -439,20 +439,29 @@ let handleThinkLevelChange = (e) => {
|
|||||||
// 系统推荐等级
|
// 系统推荐等级
|
||||||
let recommendLevel = ref("");
|
let recommendLevel = ref("");
|
||||||
let getRecommendLevel = async () => {
|
let getRecommendLevel = async () => {
|
||||||
if (formData.value.cusEstate && formData.value.functionalRequirements) {
|
if (formData.value.cusEstate) {
|
||||||
let {cusEstate, functionalRequirements} = formData.value;
|
let {cusEstate, functionalRequirements} = formData.value;
|
||||||
let param = {cusEstate, functionalRequirements};
|
let param = {cusEstate, functionalRequirements};
|
||||||
if (formData.value.salesmanThinkLevel) {
|
if (formData.value.salesmanThinkLevel) {
|
||||||
param.personnelLevel = 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, "客户的系统推荐等级获取失败")
|
console.error(err, "客户的系统推荐等级获取失败")
|
||||||
})
|
})*/
|
||||||
if (!res.systemRecommendationLevel) {
|
try{
|
||||||
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
if(res.data.systemRecommendationLevel){
|
||||||
console.log(formData.value.systemThinkLevel + "???")
|
formData.value.systemThinkLevel = res.data.systemRecommendationLevel;
|
||||||
|
}else{
|
||||||
|
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐";
|
||||||
}
|
}
|
||||||
|
}catch(e){
|
||||||
|
if (res.systemRecommendationLevel) {
|
||||||
formData.value.systemThinkLevel = res.systemRecommendationLevel;
|
formData.value.systemThinkLevel = res.systemRecommendationLevel;
|
||||||
|
}else{
|
||||||
|
recommendLevel.value = "客户无等级信息,暂无法进行等级推荐"
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
recommendLevel.value = "无公司等级信息,无法推荐等级";
|
recommendLevel.value = "无公司等级信息,无法推荐等级";
|
||||||
}
|
}
|
||||||
@@ -481,8 +490,7 @@ let handleUserTypeChange = (e) => {
|
|||||||
|
|
||||||
// 选择日期
|
// 选择日期
|
||||||
function handleTenureTimeChange(e) {
|
function handleTenureTimeChange(e) {
|
||||||
let {value} = e.detail;
|
formData.value.tenureTime = e;
|
||||||
formData.value.tenureTime = value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 需求层次索引
|
// 需求层次索引
|
||||||
@@ -505,17 +513,19 @@ let handleDevelopChange = e => {
|
|||||||
|
|
||||||
// 选择生日
|
// 选择生日
|
||||||
function handleBirthdayChange(e) {
|
function handleBirthdayChange(e) {
|
||||||
let{value} = e.detail
|
formData.value.birthday = e;
|
||||||
formData.value.birthday = value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 爱好标签索引
|
// 爱好标签索引
|
||||||
let hobbyIndex = reactive([]);
|
let hobbyIds = ref([]);
|
||||||
|
let hobbies = ref([]);
|
||||||
// 选择爱好标签
|
// 选择爱好标签
|
||||||
const handleHobbyChange = (item, value) => {
|
const handleHobbyChange = (items, ids) => {
|
||||||
// console.log("爱好", item, value);
|
console.log('选择爱好', items, ids);
|
||||||
hobbyIndex = value;
|
hobbyIds.value = [];
|
||||||
|
hobbies.value = items;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 选择
|
// 选择
|
||||||
const handleNativeChange = (e) => {
|
const handleNativeChange = (e) => {
|
||||||
formData.value.nativec = (e.detail.value.map(item => {
|
formData.value.nativec = (e.detail.value.map(item => {
|
||||||
@@ -539,16 +549,18 @@ let handleWorkingStatusChange = e => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let submitForm = async () => {
|
let submitForm = async () => {
|
||||||
let hobbyTags = hobbyIndex.map(it => {
|
let hobbyTags = hobbies.value.map(it => {
|
||||||
let {name} = hobbyList[it];
|
let {name} = it;
|
||||||
return name;
|
return name;
|
||||||
})
|
})
|
||||||
formData.value.iphone = formData.value.mobilePhone; // 特殊处理
|
|
||||||
const hobbyTagString = hobbyTags.join(',');
|
const hobbyTagString = hobbyTags.join(',');
|
||||||
console.log(hobbyTagString);
|
console.log(hobbyTagString);
|
||||||
if (hobbyTagString || formData.value.hobby) {
|
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(formData.value, "校验表单数据")
|
||||||
// console.log(recommendLevel);
|
// console.log(recommendLevel);
|
||||||
formData.value.cusName = customerUser.value.cusName;
|
formData.value.cusName = customerUser.value.cusName;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</customHeader>
|
</customHeader>
|
||||||
|
|
||||||
<!-- 高度来避免头部遮挡 -->
|
<!-- 高度来避免头部遮挡 -->
|
||||||
<view class="top-height" :style="{ paddingTop: navBarPaddingTop + 'px' }"></view>
|
<view class="top-height"></view>
|
||||||
|
|
||||||
<!-- 正文内容 -->
|
<!-- 正文内容 -->
|
||||||
<view class="all-body">
|
<view class="all-body">
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
|
||||||
<!-- 高度来避免头部遮挡 -->
|
<!-- 高度来避免头部遮挡 -->
|
||||||
<view class="top-height" :style="{ paddingTop: navBarPaddingTop + 'px' }"></view>
|
<view class="top-height"></view>
|
||||||
|
|
||||||
<view class="white-bg">
|
<view class="white-bg">
|
||||||
<navigator url="/pages/business/CRM/plan/myPlan">
|
<navigator url="/pages/business/CRM/plan/myPlan">
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<view class="top-height"></view>
|
<view class="top-height"></view>
|
||||||
|
|
||||||
<view class="week-plan-title">
|
<view class="week-plan-title">
|
||||||
<view>姓名:<strong>{{ userInfo.nickName || userInfo.userName }}</strong></view>
|
<view v-if="userInfo.nickName">姓名:<strong>{{ userInfo.nickName || userInfo.userName }}</strong></view>
|
||||||
<view v-if="weekNum">
|
<view v-if="weekNum">
|
||||||
{{ yearMonth }}
|
{{ yearMonth }}
|
||||||
<view v-if="isThisWeek" style=" display: inline-block;">
|
<view v-if="isThisWeek" style=" display: inline-block;">
|
||||||
@@ -54,10 +54,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class='bottom-spliter bg-gray'></view>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<!-- 底部加高度来避免tabbar遮挡 -->
|
<!-- 底部加高度来避免tabbar遮挡 -->
|
||||||
<view class="bottom-height"></view>
|
<!-- <view class="bottom-height bg-gray"></view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
@@ -106,12 +107,12 @@ let getWorkEvent = (index) => {
|
|||||||
const refreshPlanList = () => {
|
const refreshPlanList = () => {
|
||||||
message.showLoading();
|
message.showLoading();
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
getUserInfo().then(res => {
|
// getUserInfo().then(res => {
|
||||||
userInfo.value = res.user;
|
// userInfo.value = res.user;
|
||||||
console.log(route.path, ":用户信息获取成功");
|
// console.log(route.path, ":用户信息获取成功");
|
||||||
}).catch(err => {
|
// }).catch(err => {
|
||||||
console.warn(err, "用户信息获取失败")
|
// console.warn(err, "用户信息获取失败")
|
||||||
});
|
// });
|
||||||
// 获取周计划列表
|
// 获取周计划列表
|
||||||
getWeeklyPlanList(queryParams.value).then(res => {
|
getWeeklyPlanList(queryParams.value).then(res => {
|
||||||
const {rows} = res;
|
const {rows} = res;
|
||||||
@@ -180,11 +181,11 @@ function handleCreate() {
|
|||||||
handlePlanEdit({itemList, selectIndex: result.tapIndex}, true);
|
handlePlanEdit({itemList, selectIndex: result.tapIndex}, true);
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.warn(err, "已存在周计划")
|
console.warn(err, "已存在周计划")
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
icon: 'error',
|
// icon: 'error',
|
||||||
title: '已有本周或下周计划',
|
// title: '已有本周或下周计划',
|
||||||
duration: 2000
|
// duration: 2000
|
||||||
})
|
// })
|
||||||
})
|
})
|
||||||
// }else{ // 创建下周计划
|
// }else{ // 创建下周计划
|
||||||
// }
|
// }
|
||||||
@@ -234,7 +235,7 @@ function handleEdit(index) {
|
|||||||
// console.log(JSON.stringify(formData))
|
// console.log(JSON.stringify(formData))
|
||||||
console.log(route.path, formData, "前往修改页面");
|
console.log(route.path, formData, "前往修改页面");
|
||||||
const editFields = [OrdinalDate[index], WorkType[index], WorkEvent[index]];
|
const editFields = [OrdinalDate[index], WorkType[index], WorkEvent[index]];
|
||||||
let userName = userInfo.value.nickName || userInfo.value.userName;
|
let userName = null; // userInfo.value.userName || userInfo.value.nickName;
|
||||||
handlePlanEdit({userName, formData, editFields}, false);
|
handlePlanEdit({userName, formData, editFields}, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -268,9 +269,14 @@ function handleEdit(index) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.white-bg.white-bg-2 {
|
.white-bg.white-bg-2 {
|
||||||
margin-bottom: 20rpx;
|
/* margin-bottom: 20rpx; */
|
||||||
|
}
|
||||||
|
.bottom-spliter{
|
||||||
|
height: 20rpx;
|
||||||
|
}
|
||||||
|
.bg-gray{
|
||||||
|
background-color: #f0f0f0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.report-list .w-b-title .btn-edit {
|
.report-list .w-b-title .btn-edit {
|
||||||
background-color: #5C96F7;
|
background-color: #5C96F7;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<!-- 头部 -->
|
<!-- 头部 -->
|
||||||
<customHeader ref="customHeaderRef" :title="title" :leftFlag="true" :rightFlag="true">
|
<customHeader ref="customHeaderRef" :title="title" :leftFlag="true" :rightFlag="true">
|
||||||
<template #right>
|
<template #right>
|
||||||
<view class="head-right" @click="submitForm" v-if="userInfo.nickName || userInfo.userName">
|
<view class="head-right" @click="submitForm">
|
||||||
<uni-icons custom-prefix="iconfont" type="icon-phonebaocun" size="22"
|
<uni-icons custom-prefix="iconfont" type="icon-phonebaocun" size="22"
|
||||||
color="#B7D2FF"></uni-icons>
|
color="#B7D2FF"></uni-icons>
|
||||||
保存
|
保存
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<!-- 正文内容 -->
|
<!-- 正文内容 -->
|
||||||
<view class="week-plan-title">
|
<view class="week-plan-title">
|
||||||
<view>姓名:<strong>{{ userInfo.nickName || userInfo.userName }}</strong></view>
|
<view v-if="userInfo.nickName">姓名:<strong>{{ userInfo.nickName || userInfo.userName }}</strong></view>
|
||||||
<view>{{ currentEditDate.yearMonth }} 第 <strong>{{ currentEditDate.weekNum }}</strong> 周</view>
|
<view>{{ currentEditDate.yearMonth }} 第 <strong>{{ currentEditDate.weekNum }}</strong> 周</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-forms ref="formRef" :model="weekPlanFormData" :rules="rules" label-width="100px" label-position="top">
|
<uni-forms ref="formRef" :model="weekPlanFormData" :rules="rules" label-width="100px" label-position="top">
|
||||||
|
|||||||
@@ -11,8 +11,7 @@
|
|||||||
</customHeader>
|
</customHeader>
|
||||||
|
|
||||||
<!-- 高度来避免头部遮挡 -->
|
<!-- 高度来避免头部遮挡 -->
|
||||||
<view class="top-height" :style="{ paddingTop: navBarPaddingTop + 'px' }"></view>
|
<view class="top-height"></view>
|
||||||
|
|
||||||
<!-- 正文内容 -->
|
<!-- 正文内容 -->
|
||||||
<view>
|
<view>
|
||||||
|
|
||||||
|
|||||||
@@ -45,3 +45,23 @@ export function formatMoney(num, decimals,units){
|
|||||||
|
|
||||||
return units+retVal;
|
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