Commit ae5196ca by Lin

Merge branch 'saas+v5.8.3' of http://192.168.3.233:8090/glsx/gl_tape into saas+v5.8.3

2 parents ba93e79f 34db4cd5
......@@ -3,7 +3,7 @@ import environment from '@/env'
module.exports = {
/**查询当前门店是否有客户档案权限 */
haveCustomerAccess (data) {
haveCustomerAccess(data) {
return http.post({
method: 'dj.api.smartcarlife.customervisits.findPermissionsMerchantList',
projectName: 'boutique',
......@@ -11,7 +11,7 @@ module.exports = {
})
},
/**查询当前门店客户档案列表 */
getCustomerFileList (data) {
getCustomerFileList(data) {
return http.post({
method: 'dj.api.smartcarlife.customervisits.customerInfoPage',
projectName: 'boutique',
......@@ -19,7 +19,7 @@ module.exports = {
})
},
/* 删除客户档案*/
delCustomerFile (data) {
delCustomerFile(data) {
return http.post({
method: 'dj.api.smartcarlife.customervisits.deleteVisitsInfo',
projectName: 'boutique',
......@@ -27,7 +27,7 @@ module.exports = {
})
},
/** 根据业务查询接待场景 */
findAllSence (data) {
findAllSence(data) {
return http.post({
method: 'dj.api.smartcarlife.customervisits.findAllSence',
projectName: 'boutique',
......@@ -35,7 +35,7 @@ module.exports = {
})
},
/**根据业务查询客户标签 */
findCustomerTags (data) {
findCustomerTags(data) {
return http.post({
method: 'dj.api.smartcarlife.customervisits.findSenceTag',
projectName: 'boutique',
......@@ -45,7 +45,7 @@ module.exports = {
/**
* 查询客户档案详情
*/
findVisitsInfo (data) {
findVisitsInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.customervisits.findVisitsInfo',
projectName: 'boutique',
......@@ -55,7 +55,7 @@ module.exports = {
/*
* 保存客户档案
*/
saveVisitsInfo (data) {
saveVisitsInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.customervisits.saveVisitsInfo',
projectName: 'boutique',
......@@ -65,7 +65,7 @@ module.exports = {
/**
* 更新客户档案
*/
updateVisitsInfo (data) {
updateVisitsInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.customervisits.updateVisitsInfo',
projectName: 'boutique',
......@@ -73,7 +73,7 @@ module.exports = {
})
},
/**查询客户档案列表 */
getCustomerInfoList (data) {
getCustomerInfoList(data) {
return http.post({
method: 'dj.api.smartcarlife.customervisits.customerInfoList',
projectName: 'boutique',
......@@ -83,7 +83,7 @@ module.exports = {
/**接待客户素材
*
*/
getMaterialResponsePage (data) {
getMaterialResponsePage(data) {
return http.post({
method: 'dj.api.smartcarlife.customervisits.getMaterialResponsePage',
projectName: 'boutique',
......@@ -91,7 +91,7 @@ module.exports = {
})
},
/**素材详情 查询素材详情 */
getMaterialDetail (data) {
getMaterialDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.customervisits.getMaterialById',
projectName: 'boutique',
......@@ -99,11 +99,51 @@ module.exports = {
})
},
/**直营驻店人员 */
saleOpen (data) {
saleOpen(data) {
return http.post({
method: 'dj.api.car.boutique.resident.direct.sale.merchant',
projectName: 'boutique',
...data
})
},
/**
* 查询今日待执行触达客户
*/
getTodaySopTaskCustomerPage(data) {
return http.post({
method: 'dj.pad.api.today.sop.task.customer.page',
projectName: 'pad',
...data
})
},
/**
* 查询近7天已触达客户
*/
getLastWeekSopTaskCustomerPage(data) {
return http.post({
method: 'dj.pad.api.last.week.sop.task.customer.page',
projectName: 'pad',
...data
})
},
/**
* 查询客户今日未触达任务列表
*/
getTodaySopTaskDetailList(data) {
return http.post({
method: 'dj.pad.api.today.sop.task.detail.list',
projectName: 'pad',
...data
})
},
/**
* 查询客户近7天推送任务记录列表
*/
getLastWeekSopTaskDetailList(data) {
return http.post({
method: 'dj.pad.api.last.week.sop.task.detail.list',
projectName: 'pad',
...data
})
}
}
......@@ -128,6 +128,26 @@ const getStoreBaseSceneCodeList = async (data = {}) => {
...data
})
}
/**
* 统计客户今日计划到店数
*/
const getTodayPlanStoreCount = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.customer.todayPlanStore.count',
projectName: 'boutique',
...data
})
}
/**
* 查询客户今日计划到店列表
*/
const getTodayPlanStoreList = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.customer.todayPlanStore.list',
projectName: 'boutique',
...data
})
}
module.exports = {
getDailyTemplate,
......@@ -140,5 +160,7 @@ module.exports = {
submitReport,
getGoodsOrderList,
getStaffBaseSceneCodeList,
getStoreBaseSceneCodeList
getStoreBaseSceneCodeList,
getTodayPlanStoreCount,
getTodayPlanStoreList
}

3.23 MB | W: | H:

3.24 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -15,7 +15,7 @@
<template v-if="item.block">
<view :class="['block', item.status == 1 ? 'success' : 'failed']">{{ item.content }}</view>
</template>
<text v-else>{{ item.content }}</text>
<text v-else>{{ options.data[item.key] }}</text>
</view>
</view>
</template>
......@@ -38,18 +38,19 @@ import TaskItem from './TaskItem.vue'
export default {
components: { TaskItem },
name: 'CustomerPopup',
inject: ['userInfo'],
data() {
return {
options: {},
customerObject: [
{ title: '客户姓名', content: '张三' },
{ title: '手机号码', content: '一级' },
{ title: '车型', content: '朋友介绍' },
{ title: '客户群', content: '潜在客户' },
{ title: '订单状态', content: '潜在客户', block: true, status: 1 },
{ title: '订单时间', content: '潜在客户' },
{ title: '客户姓名', key: 'customerName' },
{ title: '手机号码', key: 'customerPhone' },
{ title: '车型', key: 'carSeriesName' },
{ title: '客户群', key: 'qwGroupName' },
{ title: '订单状态', key: 'customerStatus', block: true },
{ title: '订单时间', key: 'orderHandleTime' },
],
taskList: new Array(10).fill({})
taskList: []
}
},
watch: {},
......@@ -82,13 +83,28 @@ export default {
mounted() { },
methods: {
open(options) {
console.log(options)
uni.showLoading({
mask: true,
title: '加载中...'
})
this.options = options
this.$refs.popup.open()
this.getData(options)
},
close() {
this.$refs.popup.close()
}
},
async getData(options) {
let { shopMerchantId: merchantId } = this.userInfo,
targetApi = {
task: 'getTodaySopTaskDetailList',
taskRecord: 'getLastWeekSopTaskDetailList'
}[options.type],
{ customerInstanceId } = options.data,
data = await uni.$api.customerApi[targetApi]({ merchantId, customerInstanceId })
uni.hideLoading()
this.taskList = data
this.$refs.popup.open()
},
}
}
</script>
......@@ -186,6 +202,7 @@ export default {
height: calc(100% - #{toRpx(484)});
box-sizing: border-box;
}
.p-b {
height: 28rpx;
}
......
<template>
<view class="nothing-box">
<image
class="icon"
:src="require('@/assets/images/common/noData.webp')"
/>
<text class="text">{{ text }}</text>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'Nothing',
props: {
text: {
type: String,
default: '暂无数据'
}
},
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.nothing-box {
width: 100%;
height: calc(100% - #{toRpx(72)});
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.icon {
width: 300rpx;
height: 236rpx;
margin-bottom: 8rpx;
}
.text {
font-size: 24rpx;
line-height: 28rpx;
color: #999;
}
}
</style>
\ No newline at end of file
......@@ -7,30 +7,34 @@
<view class="header-item follower-col">跟进人</view>
<view class="header-item action-col">操作</view>
</view>
<scroll-view class="table-body" scroll-y>
<view v-for="(item, index) in tableData" :key="index" class="table-row">
<template v-if="loadComplete">
<template v-if="list.length">
<scroll-view class="table-body" scroll-y @scrolltolower="$emit('loadMore')">
<view v-for="(item, index) in list" :key="index" class="table-row">
<view class="row-item customer-col">
<view class="customer-info">
<view class="avatar">{{ getAvatar(item.name) }}</view>
<view class="avatar">{{ getAvatar(item.customerName) }}</view>
<view class="customer-detail">
<view class="name-row">
<text class="name text-hide">{{ item.name }}</text>
<text class="car-model text-hide">{{ item.carModel }}</text>
<text class="name text-hide">{{ formatName(item.customerName) }}</text>
<text class="car-model text-hide" v-if="item.carSeriesName">{{ item.carSeriesName }}</text>
</view>
<view class="phone">{{ item.phone }}</view>
<view class="customer-group">{{ item.customerGroup }}</view>
<view class="phone">{{ formatPhone(item.customerPhone) }}</view>
<view class="customer-group">{{ item.qwGroupName || '客户群不存在' }}</view>
</view>
</view>
</view>
<view class="row-item order-col">
<view class="order-status" :class="item.statusClass">{{ item.status }}</view>
<view class="order-date">{{ item.orderDate }}</view>
<view :class="['order-status', orderStatusClass(item.customerStatus)]">{{ orderStatus(item.customerStatus)
}}</view>
<view class="order-date">{{ orderHandleTime(item.orderHandleTime) }}</view>
</view>
<view class="row-item tag-col">
<view class="tag-list" :id="`tag-list-${index}`">
<view v-for="(tag, tagIndex) in item.tags" :key="tagIndex" class="tag" :id="`tag-${index}-${tagIndex}`">
<view v-for="(tag, tagIndex) in item.tagList" :key="tagIndex" class="tag"
:id="`tag-${index}-${tagIndex}`">
{{ tag }}
</view>
<view v-if="item.hasMoreTags" class="tag more-tags">...</view>
......@@ -38,8 +42,8 @@
</view>
<view class="row-item follower-col">
<text>{{ item.follower }}</text>
<view v-if="type == 1" class="date">{{ item.orderDate }}</view>
<text>{{ item.confirmBy || '-' }}</text>
<view v-if="type == 1" class="date">{{ lastExecuteTime(item.lastExecuteTime) }}</view>
</view>
<view class="row-item action-col">
......@@ -47,110 +51,88 @@
<view class="action-btn secondary-btn" @click="viewTaskRecord(item)">查看任务记录</view>
</view>
</view>
<template v-if="noMore">
<view class="noMore">没有更多了</view>
</template>
</scroll-view>
</template>
<nothing v-else />
</template>
</view>
</template>
<script type='text/ecmascript-6'>
import Nothing from './Nothing'
import dayjs from 'dayjs';
export default {
components: { Nothing },
name: 'Table',
props: {
type: {
type: Number,
default: 0
}
},
data() {
return {
tableData: [
{
name: '张**',
carModel: '奥迪 A6L',
phone: '136****6789',
customerGroup: '张先生2827-客户大定精品服务群吉...',
status: '已升级',
statusClass: 'success',
orderDate: '2016-02-23',
tags: ['全款购车', '家庭用车', '价格敏感', '30-25岁', '高意向客户'],
hasMoreTags: false,
follower: '郭莎莎'
},
{
name: '李**',
carModel: '宝马 5系',
phone: '138****1234',
customerGroup: '李女士5820-客户专属服务群奔驰车主',
status: '战败',
statusClass: 'failed',
orderDate: '2021-05-10',
tags: ['分期购车', '中等预算', '25-20岁'],
hasMoreTags: false,
follower: '李明'
list: {
type: Array,
default: () => []
},
{
name: '王**',
carModel: '奔驰 C级',
phone: '139****5678',
customerGroup: '王先生2931-客户定制车服务群豪车...',
status: '战败',
statusClass: 'failed',
orderDate: '2020-08-05',
tags: ['二手车交易', '学生用车', '性价比高', '20-18岁', '低意向客户', '年轻人首车', '实打实的铝合金发送到', '寄售点开始点', '测试标签'],
hasMoreTags: false,
follower: '张婷'
},
{
name: '赵**',
carModel: '丰田 凯美瑞',
phone: '137****9876',
customerGroup: '客户群不存在',
status: '已升级',
statusClass: 'success',
orderDate: '2023-01-15',
tags: ['豪华车购置', '商务用车', '高预算', '40-30岁'],
hasMoreTags: false,
follower: '陈晓华'
},
{
name: '刘**',
carModel: '特斯拉 Model 3',
phone: '135****4321',
customerGroup: '刘先生3748-客户新能源车服务群绿...',
status: '已升级',
statusClass: 'success',
orderDate: '2024-03-30',
tags: ['11111111111111111111111111111111111111111111111', '环保意识强', '中高预算', '35-28岁', '高意向客户', 'sdjkfhsdkfh', 'jjddjdjdj'],
hasMoreTags: false,
follower: '刘芳'
},
{
name: '陈**',
carModel: '比亚迪唐',
phone: '134****7890',
customerGroup: '陈女士4659-客户优惠活动服务群新能源...',
status: '战败',
statusClass: 'failed',
orderDate: '2022-09-18',
tags: ['新能源车购买', '家庭用车', '预算充足', '28-25岁', '低意向客户'],
hasMoreTags: false,
follower: '王伟'
}
]
data() {
return {
loadComplete: false,
noMore: false
}
},
watch: {},
computed: {},
mounted() {
watch: {
list: {
handler(val) {
this.$nextTick(() => {
this.tableData.forEach((item, index) => {
val.forEach((item, index) => {
this.showTagMore(item.tags, index)
})
})
},
immediate: true,
deep: true
}
},
computed: {},
mounted() {
},
methods: {
lastExecuteTime(time) {
return dayjs(time).format('MM-DD HH:mm')
},
getAvatar(name) {
return name.charAt(0)
},
formatName(name) {
if (!name) return '';
return name.charAt(0) + '**';
},
formatPhone(phone) {
return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
},
orderStatus(status) {
return {
1: '待跟进',
2: '已升级',
3: '战败',
4: '已退款',
}[status]
},
orderStatusClass(status) {
return {
1: 'failed',
2: 'success',
3: 'failed',
4: 'failed',
}[status]
},
orderHandleTime(time) {
return dayjs(time).format('YYYY-MM-DD')
},
showTagMore(tags, index) {
let query = uni.createSelectorQuery(),
listItem = null,
......@@ -160,7 +142,7 @@ export default {
query.select(`#tag-list-${index}`).boundingClientRect((data) => {
listItem = data
}).exec()
tags.forEach((tag, tagIndex) => {
tags?.forEach((tag, tagIndex) => {
query.select(`#tag-${index}-${tagIndex}`).boundingClientRect((data) => {
if (listItem && data.top > (listItem.height + listItem.top) && !targetIndex) targetIndex = tagIndex - 1
}).exec()
......@@ -180,13 +162,13 @@ export default {
})
},
pushTask(data) {
this.$emit('openPopup',{
this.$emit('openPopup', {
type: 'task',
data
})
},
viewTaskRecord(data) {
this.$emit('openPopup',{
this.$emit('openPopup', {
type: 'taskRecord',
data
})
......@@ -293,7 +275,7 @@ export default {
font-weight: 500;
color: #1A1A2E;
margin-right: 12rpx;
max-width: 25%;
max-width: 20%;
}
.car-model {
......@@ -303,7 +285,7 @@ export default {
box-sizing: border-box;
border-radius: 8rpx;
border: 1px solid #DCE1E6;
max-width: calc(75% - #{toRpx(8)});
max-width: calc(80% - #{toRpx(8)});
margin-left: 8rpx;
}
......@@ -339,6 +321,7 @@ export default {
margin-bottom: 16rpx;
line-height: 44rpx;
height: 44rpx;
&.success {
background-color: #EAF9F1;
color: #35C376;
......@@ -392,7 +375,8 @@ export default {
color: #292D33;
text-align: center;
word-break: break-all;
.date{
.date {
color: #999EA8;
margin-top: 10rpx;
}
......@@ -419,6 +403,7 @@ export default {
display: flex;
align-items: center;
justify-content: center;
&.primary-btn {
background-color: #2C66F70D;
color: #2C66F7;
......@@ -444,4 +429,11 @@ export default {
}
}
}
.noMore {
font-size: toRpx(26);
color: #808291;
text-align: center;
line-height: 80rpx;
}
</style>
\ No newline at end of file
......@@ -6,16 +6,16 @@
向客户群发送消息
<template v-if="type == 'taskRecord'">
<view class="line"></view>
文本
{{ messageType(item.messageType) }}
</template>
</view>
<view class="btn-box flex">
<template v-if="type == 'task'">
<template v-if="item.taskStatus == 0">
<view class="btn primary-btn">立即推送</view>
<view class="btn">暂不推送</view>
</template>
<template v-else>
<view :class="['status flex', { success: item.status != 1 }]">已推送</view>
<view :class="['status flex', { success: item.taskStatus == 1 }]">{{ taskStatus(item.taskStatus) }}</view>
</template>
</view>
</view>
......@@ -36,7 +36,22 @@ export default {
watch: {},
computed: {},
mounted() { },
methods: {}
methods: {
messageType(type){
return {
1: '文本',
2: '图片',
3: '视频',
4: '网页链接',
}[type]
},
taskStatus(status){
return {
1: '已推送',
2: '暂不推送',
}[status]
}
}
}
</script>
<style scoped lang='scss'>
......
......@@ -18,7 +18,7 @@
</template>
</view>
<view class="customer-content">
<Table :type="tabIndex" @openPopup="openPopup" />
<Table :type="tabIndex" @openPopup="openPopup" @loadMore="loadMore" :list="tableData" ref="table" />
</view>
<CustomerPopup ref="customerPopup" />
</view>
......@@ -30,19 +30,45 @@ import CustomerPopup from './components/CustomerPopup'
export default {
name: 'CustomerOpportunities',
components: { Table, CustomerPopup },
inject: ['userInfo'],
props: {
show: Boolean
},
data() {
return {
tabIndex: 0,
tabs: ['待执行推送客户(12)', '近7日已推送客户(18)'],
toDay: dayjs().format('MM-DD')
tabs: ['待执行推送客户(0)', '近7日已推送客户(0)'],
toDay: dayjs().format('MM-DD'),
total: 0,
pageNum: 1,
pageSize: 10,
tableData: []
}
},
watch: {
show: {
handler(val) {
if (val) {
this.getTodaySopTaskCustomerPage()
this.getLastWeekSopTaskCustomerPage(false)
} else this.initRequestParams()
},
immediate: true,
deep: true
}
},
watch: {},
computed: {},
computed: {
},
mounted() {
},
methods: {
initRequestParams() {
this.pageNum = 1
this.pageSize = 10
this.tableData = []
this.$refs.table.loadComplete = false
this.$refs.table.noMore = false
},
/**
* 切换标签
* @param {number} index
......@@ -50,9 +76,52 @@ export default {
changeTab(index) {
if (index == this.tabIndex) return
this.tabIndex = index
this.initRequestParams()
if (index == 0) this.getTodaySopTaskCustomerPage()
else this.getLastWeekSopTaskCustomerPage()
},
openPopup(data) {
this.$refs.customerPopup.open(data)
},
loadMore() {
let { total, pageSize, pageNum, tabIndex } = this
if (Math.ceil(total / pageSize) > pageNum) {
this.pageNum += 1
if (tabIndex == 0) this.getTodaySopTaskCustomerPage()
else this.getLastWeekSopTaskCustomerPage()
} else this.$refs.table.noMore = true
},
async getTodaySopTaskCustomerPage() {
try {
uni.showLoading({ title: '加载中' })
let { shopMerchantId: merchantId } = this.userInfo,
{ pageNum, pageSize, tableData } = this,
{ list, total } = await uni.$api.customerApi.getTodaySopTaskCustomerPage({ merchantId, pageNum, pageSize })
this.tableData = [...tableData, ...list]
this.$refs.table.loadComplete = true
this.total = total
if (total) this.$set(this.tabs, 0, `待执行推送客户(${total})`)
uni.hideLoading()
} catch (error) {
this.$refs.table.loadComplete = true
}
},
async getLastWeekSopTaskCustomerPage(assignment = true) {
try {
if (assignment) uni.showLoading({ title: '加载中' })
let { shopMerchantId: merchantId } = this.userInfo,
{ pageNum, pageSize, tableData } = this,
{ list, total } = await uni.$api.customerApi.getLastWeekSopTaskCustomerPage({ merchantId, pageNum, pageSize })
if (assignment) {
this.tableData = [...tableData, ...list]
this.$refs.table.loadComplete = true
this.total = total
uni.hideLoading()
}
if (total) this.$set(this.tabs, 1, `近7日已推送客户(${total})`)
} catch (error) {
this.$refs.table.loadComplete = true
}
}
}
}
......
......@@ -111,7 +111,7 @@
</view>
<!-- 挖掘潜客机会 -->
<view v-show="homeContentTabIndex === 2" class="right-content-box flex right-content-box-scene1 customer-opportunities-box">
<customer-opportunities />
<customer-opportunities :show="homeContentTabIndex === 2" />
</view>
</view>
......@@ -427,7 +427,8 @@ export default {
provide() {
return {
showPage: this.handleShowPage,
hideFooter: this.handleFooter
hideFooter: this.handleFooter,
userInfo: this.userInfo,
}
},
computed: {
......
const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 2
const index = 1
/**
*
0本地
......
......@@ -4,7 +4,8 @@
<template v-if="currentDate">
<view class="box">
<view class="popup-title flex">
{{ userInfo.name }}的待接待客户
<view class="text text-hide"> {{ userInfo.name }}</view>
的待接待客户
<view class="popup-close flex" @click="close">
<uni-icons type="closeempty" size="16"></uni-icons>
</view>
......@@ -115,7 +116,6 @@ export default {
this.loadComplete = false
this.customerList = []
if (val) this.getCustomerList()
},
deep: true
}
......@@ -128,57 +128,24 @@ export default {
title: '加载中...',
mask: true
})
setTimeout(() => {
this.customerList = [
{
customerName: '张宇',
customerPhone: '138****1234',
carSeriesName: '问界M7 Plus',
inviteDate: '2026-06-20',
advanceUserName: '张三',
advanceUserId: '123456',
selected: false,
carBrandId: '车辆品牌id',
carBrand: '车辆品牌名称',
carChildsBrandId: '子品牌id',
carChildsBrandName: '子品牌名字',
carSeriesId: '车系id',
carSeriesName: '车系名字'
},
{
customerName: '迪丽热巴·迪丽热巴',
customerPhone: '138****1234',
carSeriesName: '问界M7',
advanceUserName: '张三',
advanceUserId: '123456',
inviteDate: '2026-06-10',
selected: false,
carBrandId: '车辆品牌id',
carBrand: '车辆品牌名称',
carChildsBrandId: '子品牌id',
carChildsBrandName: '子品牌名字',
carSeriesId: '车系id',
carSeriesName: '车系名字'
},
{
customerName: '黄小小',
customerPhone: '138****9239',
carSeriesName: '问界M7',
advanceUserName: '张三',
advanceUserId: '123456',
inviteDate: '2026-06-10',
selected: false,
carBrandId: '车辆品牌id',
carBrand: '车辆品牌名称',
carChildsBrandId: '子品牌id',
carChildsBrandName: '子品牌名字',
carSeriesId: '车系id',
carSeriesName: '车系名字'
},
]
try {
const { uuid, shopMerchantId } = this.userInfo,
data = await uni.$api.dailyTemplateApi.getTodayPlanStoreList({
merchantId: shopMerchantId,
advanceUserId: uuid,
inviteDate: this.currentDate.format('YYYY-MM-DD')
})
console.log(data)
this.customerList = data.map(item => ({
...item,
selected: false
}))
this.loadComplete = true
uni.hideLoading()
}, 1000)
} catch (error) {
uni.hideLoading()
console.log(error)
}
},
open() {
this.currentDate = dayjs()
......@@ -258,6 +225,10 @@ export default {
font-weight: 500;
line-height: 48rpx;
.text {
max-width: 50%;
}
.popup-close {
position: absolute;
height: 100%;
......
......@@ -6,7 +6,7 @@
<view class="fixed-box flex">
<view class="fixed-title flex">
<view class="sprite-icon icon-negotiation-detail-count"></view>
今日待接待客户数<text class="text-primary">5</text>
今日待接待客户数<text class="text-primary">{{ customerCount }}</text>
</view>
<view class="fixed-btn flex" @click="$refs.CustomerDrawer.open()">
查看客户
......@@ -62,10 +62,11 @@ import Footer from '../components/Footer'
import utils from '@/utils/utils'
import EditForm from '../components/EditForm'
import CustomerDrawer from './components/CustomerDrawer'
import dayjs from 'dayjs'
export default {
components: { Table, Nothing, Footer, EditForm, CustomerDrawer },
name: 'edit',
inject: ['sceneType'],
inject: ['sceneType', 'userInfo'],
props: {
templateData: {
type: Array,
......@@ -77,7 +78,8 @@ export default {
return {
loadComplete: false,
list: [],
saveBtn: true
saveBtn: true,
customerCount: 0
}
},
watch: {
......@@ -87,6 +89,7 @@ export default {
this.list = utils.deepClone(val)
setTimeout(() => {
this.loadComplete = true
this.getTodayPlanStoreCount()
}, 200)
},
immediate: true,
......@@ -110,6 +113,19 @@ export default {
mounted() {
},
methods: {
async getTodayPlanStoreCount() {
try {
const { uuid, shopMerchantId } = this.userInfo,
data = await uni.$api.dailyTemplateApi.getTodayPlanStoreCount({
merchantId: shopMerchantId,
advanceUserId: uuid,
inviteDate: dayjs().format('YYYY-MM-DD')
})
this.customerCount = data
} catch (error) {
console.log(error)
}
},
handleRowClick(row, rowIndex, index) {
let parent = this.list[index]
this.$refs.editForm.open(row, rowIndex, index, parent)
......
......@@ -2,7 +2,7 @@
<view class="nothing-box">
<image
class="icon"
:src="require('@//assets/images/common/noData.webp')"
:src="require('@/assets/images/common/noData.webp')"
/>
<text class="text">{{ text }}</text>
</view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!