Commit 62848a07 by 前端

新增访客记录

1 parent 8e11554a
......@@ -9,10 +9,12 @@ import api from './request'
import ssoApi from './ssoApi'
import wechatApi from './wechatApi'
import entmicroApi from './entmicroApi'
import businessApi from './businessApi'
module.exports = {
ssoApi,
entmicroApi,
wechatApi,
businessApi,
commonApi: {
/**获取图片版本号 */
getMockConfig() {
......
import api from "./request";
module.exports = {
/** 访客记录分页列表 */
cardRecordPage(data) {
return api.post({
method: 'entmicro.api.business.cardRecord.list',
...data
},
true
)
},
/** 活动申请记录分页列表 */
activityApplyList(data) {
return api.post({
method: 'entmicro.api.business.card.activity.record.list',
...data
},
true
)
},
}
\ No newline at end of file
......@@ -23,6 +23,10 @@ Component({
shareDisabled: n
})
}
},
isStaff: {
type:Boolean,
defalut: false
}
},
......@@ -110,6 +114,8 @@ Component({
// 跳往名片线索页面
goRecord() {
wx.$router.go("/packagesList/pages/accessRecord/accessRecord");
// let { activeUrl } = this.data
// wx.$router.jumpH5('http://scrm.dev.glsx.com.cn/dj-scrm-wx-work-main-kuangyq/#/proxy/list?sessionId=scrm-base-e059c21e-9e95-40b3-93ee-f1dfbc6411da-rop');
}
},
});
......@@ -29,15 +29,19 @@
<image class="user-bg" webp src="{{IMGURL}}home/user-bg.png?v={{img_version}}" />
</view>
<view class="btn-group">
<view class="phone-btn" bindtap="callPhone">
<image class="icon-dial" webp src="{{IMGURL}}home/icon-dial.png?v={{img_version}}"></image>
<view class="phone-btn">
<view bindtap="callPhone">
<image class="icon-dial" webp src="{{IMGURL}}home/icon-dial.png?v={{img_version}}"></image>
<view class="phone-text">拨打电话</view>
</view>
<view class="line"></view>
<view wx:if="{{isStaff}}" bindtap="goRecord" class="record-dial">
<image class="icon-dial" webp src="{{IMGURL}}index/record.png?v={{img_version}}"></image>
<view class="phone-text">名片线索</view></view>
</view>
<button class="btn-plain btn" bindtap="addPhone">保存名片</button>
<button wx:if="{{shareDisabled}}" class="btn-primary btn" bindtap="shareClick">分享名片</button>
<button wx:else class="btn-primary btn" open-type="share">分享名片</button>
<button class="btn-plain btn" bindtap="goRecord">名片线索</button>
<button class="btn-plain btn {{isStaff ? 'new-padding' : ''}}" bindtap="addPhone">保存名片</button>
<button wx:if="{{shareDisabled}}" class="btn-primary btn {{isStaff ? 'new-padding' : ''}}" bindtap="shareClick">分享名片</button>
<button wx:else class="btn-primary btn {{isStaff ? 'new-padding' : ''}}" open-type="share">分享名片</button>
</view>
</view>
<authorize buttonType="openSetting" show="{{showAuth}}" isShowCheck="{{false}}"></authorize>
\ No newline at end of file
......@@ -129,6 +129,7 @@
padding: 4rpx 32rpx 4rpx 24rpx;
background: #FFFFFF;
box-shadow: 8rpx 0 16rpx 0 rgba(202,211,230,0.30);
display: contents;
}
.icon-dial {
......@@ -164,4 +165,15 @@ button::after {
color: #FFFFFF;
background: #5850FF;
/* margin-left: 24rpx; */
}
/* .record-dial {
border-left: ;
} */
.new-padding {
padding: 12rpx 28rpx;
}
.line {
width: 2rpx;
height: 24rpx;
background-color: #6E6E7A;
}
\ No newline at end of file
// components/recordApply/recordApply.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
applyData: [
{
merchantName: '深圳卡罗拉门店 (新能源·代理商)',
carModel: '宝马',
businessScenario: '6个月以上',
productItems: '360全景导航、氛围灯',
createdTime: '2022-11-15 08:30:05',
contactName: '张无忌',
contactPhone: '13532222298'
}
]
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
/* components/recordApply/recordApply.wxss */
.apply-wrap {
padding: 24rpx;
.content {
height: calc(100% - 160rpx);
overflow: scroll;
}
.apply-item {
box-sizing: border-box;
background: #fff;
box-shadow: 0 8rpx 16rpx 0 rgba(224, 224, 224, 0.5);
margin-bottom: 24rpx;
&-head {
padding: 20rpx 32rpx 24rpx;
border-bottom: 2rpx solid rgba(195, 195, 195, 0.3);
.title {
font-weight: 600;
font-size: 32rpx;
color: #333333;
line-height: 48rpx;
}
.maxWidth {
max-width: 700rpx;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.type {
font-weight: 400;
font-size: 24rpx;
color: #999999;
line-height: 32rpx;
}
}
&-content {
padding: 24rpx 32rpx 20rpx;
border-bottom: 2rpx solid rgba(195, 195, 195, 0.3);
.content-wrap {
margin-bottom: 16rpx;
.title {
font-weight: 400;
font-size: 28rpx;
color: #999999;
width: 112rpx;
text-align: left;
white-space: nowrap;
}
.info {
font-weight: 400;
font-size: 28rpx;
color: #333333;
margin-left: 32rpx;
}
.linkman {
height: 64rpx;
background: #f5f7fa;
border-radius: 8rpx;
line-height: 64rpx;
padding: 0 16rpx;
box-sizing: border-box;
.phone-num {
color: #6e6e7a;
margin: 0 12rpx 0 8rpx;
}
}
}
}
&-footer {
height: 96rpx;
padding: 0 32rpx 0 24rpx;
box-sizing: border-box;
justify-content: space-between;
font-size: 28rpx;
.follew-result {
color: #f0aa06;
}
.fail {
color: #999999 !important;
}
.record {
color: #5850FF;
text-align: right;
}
}
.icon-remove,
.icon-collect {
margin-right:16rpx;
}
}
}
.flex {
display: flex;
}
\ No newline at end of file
<!--components/recordApply/recordApply.wxml-->
<view class="apply-wrap">
<block wx:for="{{applyData}}">
<view class="apply-item">
<view class="apply-item-head">
<view class="title flex">
<view class="maxWidth">{{ item.merchantName }}</view>
</view>
<view class="type">主营: {{ item.carModel ? item.carModel : '--' }}</view>
</view>
<view class="apply-item-content">
<view class="content-wrap flex">
<view class="title">申请场景</view>
<view class="info">{{ item.businessScenario ? item.businessScenario : '--' }}</view>
</view>
<view class="content-wrap flex">
<view class="title">申请活动</view>
<view class="info">{{ item.productItems ? item.productItems : '--' }}</view>
</view>
<view class="content-wrap flex">
<view class="title">申请时间</view>
<view class="info">{{ item.createdTime }}</view>
</view>
<view class="content-wrap flex">
<view class="title">申请人</view>
<view class="info linkman flex">
<view style="max-width: 120rpx; overflow: hidden; white-space: nowrap">{{ item.contactName }}</view>
<span class="phone-num">{{ item.contactPhone }}</span>
<view class="sprite-icon icon-phone"></view>
</view>
</view>
</view>
<view class="apply-item-footer flex">
<view class="flex">
<!-- <block wx:if="{{index == 0}}">
<van-popover theme="dark" placement="top-start">
<view class="tip">点击可切换状态</view>
<block #reference>
<view :class="['sprite-icon', item.followType == 0 ? ' icon-remove' : ' icon-collect']"></view>
</block>
</van-popover>
</block> -->
<!-- <view v-else :class="['sprite-icon', item.followType == 0 ? ' icon-remove' : ' icon-collect']" @click.stop="checkCollect(item)"></view>
<view :class="['follew-result', item.followType == 0 ? 'fail' : 'success']">{{ item.followType == 0 ? '未跟进' : '已跟进' }}</view> -->未跟进
</view>
<view class="record">访问记录</view>
</view>
</view>
</block>
</view>
\ No newline at end of file
// components/recordTable/recordTable.js
Component({
/**
* 组件的属性列表
*/
properties: {
recordData: {
type: Array,
default: [],
observer(n) {
this.setData({
tableData: n
})
}
}
},
/**
* 组件的初始数据
*/
data: {
fruitList: ['访客','联系电话','最后访问时间'],
tableData: []
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* components/recordTable/recordTable.wxss */
.table {
display: flex;
background: white;
border: 1rpx solid rgba(218, 217, 217, 1);
border-bottom: 0;
}
.table_left_column {
min-width: 150rpx;
height: auto;
display: flex;
flex-direction: column;
}
.left_col_item {
width: 100%;
height: 90rpx;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
border-bottom: 1rpx solid #e5e5e5;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #5850FF;
}
.table_right_scroll_box {
display: flex;
white-space: nowrap;
overflow-x: scroll;
border-left: 1rpx solid #e5e5e5;
font-weight: normal;
/* border: 1px solid red; */
}
.flex_direction_column_item {
min-width: 200rpx;
display: inline-block;
/* border: 1px solid #000; */
}
.item_name {
min-width: 200rpx;
height: 90rpx;
display: flex;
align-items: center;
justify-content: center;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 26rpx;
color: #6C737A;
border-bottom: 1rpx solid #e5e5e5;
}
.item_price {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #414141;
}
\ No newline at end of file
<!--components/recordTable/recordTable.wxml-->
<view class='table'>
<!-- 左侧表格滚动 -->
<view class="table_right_scroll_box">
<view class="flex_direction_column_item" wx:for="{{fruitList}}" wx:for-index="index" wx:key="index">
<view class='item_name'>{{item}}</view>
<view wx:for="{{tableData}}" wx:for-item="litem" wx:for-index="lindex" wx:key="lindex" class='item_name item_price'>
<block wx:if="{{item == '访客'}}">{{litem.nickName}}</block>
<block wx:if="{{item == '联系电话'}}">{{litem.phone}}</block>
<block wx:if="{{item == '最后访问时间'}}">{{litem.lastTime}}</block>
</view>
</view>
</view>
<!-- 右侧固定 -->
<view class='table_left_column'>
<view class='item_name'>操作</view>
<view class='left_col_item' wx:for="{{tableData.length}}" wx:for-index="index" wx:key="index">访问记录</view>
</view>
</view>
......@@ -10,9 +10,9 @@
"integrity": "sha512-hFJ48SCSvRgcwT/9TcxwNnNnWSpy2BpaBfwQwVdU6uwgFH+2OqGL435VQN7EDpIMH8YjHbiM84hueTyxAzIPqQ=="
},
"glsx-applet-component": {
"version": "1.0.44",
"resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.44.tgz",
"integrity": "sha512-GEgRy/WYEFjWljh1CAkleW2gRy3/Ss1dk1+z+0O0M29euwR++KS0jwlh3unEIm72c04D3u0FwYiE2vPmgR8qwQ=="
"version": "1.0.46",
"resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.46.tgz",
"integrity": "sha512-3KRrsf42+DWFemtQ/29k8OthzJ5BcaFLPXJp4acDcFzkJJ4yYb22R6B2mKZecwb6WrL+qk7sUa8m4a5VlkW89Q=="
}
}
}
......@@ -5,7 +5,7 @@
"main": "app.js",
"dependencies": {
"@vant/weapp": "^1.10.9",
"glsx-applet-component": "^1.0.44"
"glsx-applet-component": "^1.0.46"
},
"devDependencies": {},
"scripts": {
......
// packagesList/pages/accessRecord/accessRecord.js
import {
businessApi
} from "../../../api/api";
Page({
/**
......@@ -7,364 +10,7 @@ Page({
data: {
tabData: ['访问记录', '活动申请'],
tabIndex: 0,
fruitTypeList: [{
"fruitTypeId": 1,
"typeName": "苹果"
},
{
"fruitTypeId": 2,
"typeName": "香蕉"
},
{
"fruitTypeId": 3,
"typeName": "橙子"
},
{
"fruitTypeId": 4,
"typeName": "山竹"
},
{
"fruitTypeId": 5,
"typeName": "荔枝"
}, {
"fruitTypeId": 6,
"typeName": "芒果"
},
{
"fruitTypeId": 7,
"typeName": "西瓜"
},
{
"fruitTypeId": 8,
"typeName": "草莓"
},
{
"fruitTypeId": 9,
"typeName": "水蜜桃"
},
{
"fruitTypeId": 10,
"typeName": "李子"
},
{
"fruitTypeId": 11,
"typeName": "榴莲"
},
{
"fruitTypeId": 12,
"typeName": "蓝莓"
},
{
"fruitTypeId": 13,
"typeName": "柚子"
},
{
"fruitTypeId": 14,
"typeName": "木瓜"
},
],
fruitList: [{
"name": "果唯伊水果",
"list": [{
"pkId": 1,
"price": "5.8",
"typeName": "苹果"
},
{
"pkId": 2,
"price": "2.08",
"typeName": "香蕉"
},
{
"pkId": 3,
"price": "6.00",
"typeName": "橙子"
},
{
"pkId": 4,
"price": "8.40",
"typeName": "山竹"
},
{
"pkId": 5,
"price": "15",
"typeName": "荔枝"
},
{
"pkId": 6,
"price": "5.8",
"typeName": "芒果"
},
{
"pkId": 7,
"price": "2.10",
"typeName": "西瓜"
},
{
"pkId": 8,
"price": "6.00",
"typeName": "草莓"
},
{
"pkId": 9,
"price": "8.00",
"typeName": "水蜜桃"
},
{
"pkId": 10,
"price": "7.80",
"typeName": "李子"
},
{
"pkId": 11,
"price": "缺货",
"typeName": "榴莲"
},
{
"pkId": 12,
"price": "4.08",
"typeName": "蓝莓"
},
{
"pkId": 13,
"price": "2.80",
"typeName": "柚子"
},
{
"pkId": 14,
"price": "8.00",
"typeName": "木瓜"
},
]
},
{
"name": "恋果",
"list": [{
"pkId": 1,
"price": "5.40",
"typeName": "苹果"
},
{
"pkId": 2,
"price": "2.20",
"typeName": "香蕉"
},
{
"pkId": 3,
"price": "缺货",
"typeName": "橙子"
},
{
"pkId": 4,
"price": "9.00",
"typeName": "山竹"
},
{
"pkId": 5,
"price": "14.00",
"typeName": "荔枝"
},
{
"pkId": 6,
"price": "5.50",
"typeName": "芒果"
},
{
"pkId": 7,
"price": "1.89",
"typeName": "西瓜"
},
{
"pkId": 8,
"price": "6.35",
"typeName": "草莓"
},
{
"pkId": 9,
"price": "8.20",
"typeName": "水蜜桃"
},
{
"pkId": 10,
"price": "8.60",
"typeName": "李子"
},
{
"pkId": 11,
"price": "24.60",
"typeName": "榴莲"
},
{
"pkId": 12,
"price": "4.56",
"typeName": "蓝莓"
},
{
"pkId": 13,
"price": "3.60",
"typeName": "柚子"
},
{
"pkId": 14,
"price": "7.20",
"typeName": "木瓜"
},
],
},
{
"name": "百果园",
"list": [{
"pkId": 1,
"price": "6.10",
"typeName": "苹果"
},
{
"pkId": 2,
"price": "2.30",
"typeName": "香蕉"
},
{
"pkId": 3,
"price": "缺货",
"typeName": "橙子"
},
{
"pkId": 4,
"price": "9.00",
"typeName": "山竹"
},
{
"pkId": 5,
"price": "14.30",
"typeName": "荔枝"
},
{
"pkId": 6,
"price": "5.65",
"typeName": "芒果"
},
{
"pkId": 7,
"price": "2.08",
"typeName": "西瓜"
},
{
"pkId": 8,
"price": "6.60",
"typeName": "草莓"
},
{
"pkId": 9,
"price": "7.80",
"typeName": "水蜜桃"
},
{
"pkId": 10,
"price": "8.2",
"typeName": "李子"
},
{
"pkId": 11,
"price": "23.8",
"typeName": "榴莲"
},
{
"pkId": 12,
"price": "4.36",
"typeName": "蓝莓"
},
{
"pkId": 13,
"price": "3.20",
"typeName": "柚子"
},
{
"pkId": 14,
"price": "8.00",
"typeName": "木瓜"
},
]
},
{
"name": "鲜丰水果",
"list": [{
"pkId": 1,
"price": "4.80",
"typeName": "苹果"
},
{
"pkId": 2,
"price": "1.98",
"typeName": "香蕉"
},
{
"pkId": 3,
"price": "5.20",
"typeName": "橙子"
},
{
"pkId": 4,
"price": "8.25",
"typeName": "山竹"
},
{
"pkId": 5,
"price": "缺货",
"typeName": "荔枝"
},
{
"pkId": 6,
"price": "5.8",
"typeName": "芒果"
},
{
"pkId": 7,
"price": "2.28",
"typeName": "西瓜"
},
{
"pkId": 8,
"price": "6.40",
"typeName": "草莓"
},
{
"pkId": 9,
"price": "8.60",
"typeName": "水蜜桃"
},
{
"pkId": 10,
"price": "15",
"typeName": "李子"
},
{
"pkId": 11,
"price": "29.6",
"typeName": "榴莲"
},
{
"pkId": 12,
"price": "缺货",
"typeName": "蓝莓"
},
{
"pkId": 13,
"price": "4.10",
"typeName": "柚子"
},
{
"pkId": 14,
"price": "6.80",
"typeName": "木瓜"
},
]
}
]
},
// tab切换
selectTab(e) {
......@@ -378,7 +24,44 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let merchant = wx.$storage.get("scene").merchant || wx.$storage.get("scene").merchantId
let cardId = wx.$storage.get("scene").cardId
let params = {
pageNum: 1,
pageSize: 20,
merchant: merchant,
cardId: cardId
}
businessApi.cardRecordPage(params).then(res => {
console.log(res, '000');
if(res&&res.code == 0) {
this.setData({
recordData: res.data.data.data
})
} else {
wx.showToast({
title: res.message || '系统异常',
icon: 'none'
})
}
})
let params1 = {
pageNum: 1,
pageSize: 20,
}
// businessApi.activityApplyList(params1).then(res => {
// console.log(res, '000');
// if(res&&res.code == 0) {
// this.setData({
// applyData: res.data.data.data
// })
// } else {
// wx.showToast({
// title: res.message || '系统异常',
// icon: 'none'
// })
// }
// })
},
/**
......
{
"usingComponents": {},
"usingComponents": {
"RecordTable": "../../../components/recordTable/recordTable",
"RecordApply": "../../../components/recordApply/recordApply"
},
"navigationBarTitleText": "名片访问记录"
}
\ No newline at end of file
......@@ -29,66 +29,9 @@ height: 6rpx;
background: #5850FF;
border-radius: 0.8rpx;
margin-left: 50%;
margin-top: -5rpx;
transform: translateX(-50%);
}
}
.table {
display: flex;
background: white;
border: 1rpx solid rgba(218, 217, 217, 1);
border-bottom: 0;
}
.table_left_column {
min-width: 150rpx;
height: auto;
display: flex;
flex-direction: column;
}
.left_col_item {
width: 100%;
height: 90rpx;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
border-bottom: 1rpx solid #e5e5e5;
color: #000;
font-weight: bolder;
}
.table_right_scroll_box {
display: flex;
white-space: nowrap;
overflow-x: scroll;
border-left: 1rpx solid #e5e5e5;
font-weight: normal;
/* border: 1px solid red; */
}
.flex_direction_column_item {
min-width: 200rpx;
display: inline-block;
/* border: 1px solid #000; */
}
.item_name {
min-width: 200rpx;
height: 90rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-weight: bolder;
color: rebeccapurple;
border-right: 1rpx solid #e5e5e5;
border-bottom: 1rpx solid #e5e5e5;
}
.item_price {
color: #7c2929;
letter-spacing: 1rpx;
}
\ No newline at end of file
......@@ -5,21 +5,9 @@
{{item}}
</view>
</view>
<view class='table'>
<!-- 左侧固定 -->
<view class='table_left_column'>
<view class='left_col_item'>品种</view>
<view class='left_col_item' wx:for="{{fruitTypeList}}" wx:for-index="index" wx:key="index">{{item.typeName}}</view>
</view>
<!-- 右侧表格滚动 -->
<view class="table_right_scroll_box">
<view class="flex_direction_column_item" wx:for="{{fruitList}}" wx:for-index="index" wx:key="index">
<view class='item_name'>{{item.name}}</view>
<view wx:for="{{item.list}}" wx:for-item="litem" wx:for-index="lindex" wx:key="lindex" class='item_name item_price'>
<block wx:if="{{litem.price !='缺货'}}">¥{{litem.price}}/斤</block>
<block wx:else>缺货</block>
</view>
</view>
</view>
</view>
<block wx:if="{{tabIndex == 0}}">
<RecordTable recordData="{{recordData}}"></RecordTable>
</block>
<block wx:else="">
<RecordApply applyData="{{applyData}}"></RecordApply></block>
</view>
\ No newline at end of file
......@@ -176,7 +176,7 @@ const subscriptionSystemData = [
productImgs: productImgs4,
productList: [
{
id: 0,
id: 3,
currentIndex: 0,
proName: '膨胀金',
prodImg: `${IMG_URL}index/prod2/prod4-0.png`,
......
......@@ -20,6 +20,7 @@ Page({
* 页面的初始数据
*/
data: {
isStaff: true,
tabList: [
{
name: '增值转化',
......@@ -221,9 +222,9 @@ Page({
wx.hideShareMenu({
menus: ['shareAppMessage']
})
this.setData({
productData: this.addAll(this.data.productData)
})
// this.setData({
// productData: this.addAll(this.data.productData)
// })
},
addAll(data) {
......@@ -478,7 +479,10 @@ Page({
)
console.log(cardInfo.staffPhone,this.data.phoneNumber);
if (cardInfo.staffPhone === this.data.phoneNumber) {
wx.$storage.set('isStaff', 'true')
// wx.$storage.set('isStaff', 'true')
this.setData({
isStaff: true
})
}
})
},
......
......@@ -97,4 +97,4 @@ page {
height: 300rpx;
margin-bottom: 50rpx;
}
}
\ No newline at end of file
}
......@@ -6,7 +6,7 @@
<loadding wx:if="{{!cardInfo}}"></loadding>
<block wx:if="{{!!cardInfo}}">
<view class="main-box">
<user-info shareDisabled="{{shareDisabled}}" cardInfo="{{cardInfo}}" />
<user-info isStaff="{{isStaff}}" shareDisabled="{{shareDisabled}}" cardInfo="{{cardInfo}}" />
<view class="main-bottom">
<!-- tab介绍 -->
<view class="tab-list">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!