zhengjinyi 3 anni fa
parent
commit
c489319d10

+ 1 - 1
components/cm-module/cm-seller/cm-clubmodal.vue

@@ -24,7 +24,7 @@ export default {
 		},
 		modalType:{
 			type: Number,
-			default:0
+			default:2
 		}
 	},
 	data() {

+ 1 - 1
components/cm-module/cm-seller/user.vue

@@ -177,7 +177,7 @@
 						icon:'https://static.caimei365.com/app/img/icon/icon_seller_6@2x.png',
 					},
 					{
-						name:'客户画像',
+						name:'客户咨询记录',
 						path:'/pages/seller/remarks/list',
 						icon:'https://static.caimei365.com/app/img/icon/icon_seller_7@2x.png',
 					}

+ 7 - 7
pages.json

@@ -607,43 +607,43 @@
                 {
                     "path": "remarks/list",
                     "style": {
-                        "navigationBarTitleText": "客户画像"
+                        "navigationBarTitleText": "注册客户咨询记录"
                     }
                 },
                 {
                     "path": "remarks/add",
                     "style": {
-                        "navigationBarTitleText": "添加画像"
+                        "navigationBarTitleText": "添加记录"
                     }
                 },
                 {
                     "path": "remarks/details",
                     "style": {
-                        "navigationBarTitleText": "画像详情"
+                        "navigationBarTitleText": "记录详情"
                     }
                 },
                 {
                     "path": "remarks/customer-list",
                     "style": {
-                        "navigationBarTitleText": "潜在客户"
+                        "navigationBarTitleText": "未注册客户咨询记录"
                     }
                 },
                 {
                     "path": "remarks/record-list",
                     "style": {
-                        "navigationBarTitleText": "画像记录"
+                        "navigationBarTitleText": "未注册客户咨询记录"
                     }
                 },
                 {
                     "path": "remarks/add-record",
                     "style": {
-                        "navigationBarTitleText": "添加画像"
+                        "navigationBarTitleText": "添加记录"
                     }
                 },
                 {
                     "path": "remarks/record-details",
                     "style": {
-                        "navigationBarTitleText": "画像详情"
+                        "navigationBarTitleText": "记录详情"
                     }
                 }
             ]

+ 1 - 1
pages/seller/remarks/add-record.vue

@@ -98,7 +98,7 @@ export default {
 			this.questionMan = option.questionMan
 			this.handleType = option.type
 			this.getUserRemarksVisitDetail(option.remarksId)
-			uni.setNavigationBarTitle({title:'修改画像'})
+			uni.setNavigationBarTitle({title:'修改记录'})
 		} else {
 			this.questionMan = option.questionMan
 			this.remarksParams.questionManId = option.questionManId

+ 1 - 1
pages/seller/remarks/add.vue

@@ -122,7 +122,7 @@ export default {
 		if (option.type == 'edit') {
 			this.getUserClubRemarksDetail(option.remarksId)
 			this.handleType = option.type
-			uni.setNavigationBarTitle({ title: '修改画像' })
+			uni.setNavigationBarTitle({ title: '修改记录' })
 		} else {
 			this.clubUserId = option.userId
 			this.getCulbInfo()

+ 1 - 1
pages/seller/remarks/customer-list.vue

@@ -106,7 +106,7 @@ export default {
 			navbarHeight: '',
 			nomoreText: '上拉显示更多',
 			handleUpdataVisitorId: 0,
-			modalType: 0,
+			modalType: 1,
 			isClubModalShow: false
 		}
 	},

+ 5 - 5
pages/seller/remarks/list.vue

@@ -49,10 +49,10 @@
 			<view class="tui-popup-box clearfix">
 				<view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
 					<view class="tui-flex-1">
-						<view class="tui-button" @click="handleShowClubpopup">添加画像</view>
+						<view class="tui-button" @click="handleShowClubpopup">添加已注册客户记录</view>
 					</view>
 					<view class="tui-flex-1">
-						<view class="tui-button-text" @click="handleAllUnder">潜在客户信息 ></view>
+						<view class="tui-button-text" @click="handleAllUnder">未注册客户咨询记录 ></view>
 					</view>
 				</view>
 			</view>
@@ -220,12 +220,12 @@ export default {
 			this.contentModalText = '确定删除这条记录吗?'
 		},
 		handEditRemark(remarksId){
-			//跳转修改客户画像
+			//跳转修改客户咨询记录
 			this.$api.navigateTo(`/pages/seller/remarks/add?type=edit&remarksId=${remarksId}`)
 		},
 		handleAllUnder() {
-			//跳转潛在客戶頁
-			this.$api.navigateTo('/pages/seller/remarks/customer-list')
+			//跳转未注册客户咨询记录也
+			this.$api.navigateTo('/pages/seller/remarks/record-list')
 		},
 		handleShowClubpopup(){ 
 			this.isClubpopupShow = true

+ 70 - 36
pages/seller/remarks/record-list.vue

@@ -17,13 +17,13 @@
 					<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
 				</view>
 			</view>
-			<view class="search-from-title"> 咨询人:{{ questionMan }} </view>
 		</view>
 		<view class="remarks-content" :style="{ paddingBottom: isIphoneX ? '182rpx' : '148rpx' }">
 			<view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
 				<!-- 空白页 -->
 				<view class="empty-container" v-if="isEmpty">
-					<text class="error-text">点击下方添加按钮开始记录吧~</text>
+					<image class="empty-container-image" :src="StaticUrl + '/icon/icon-remarks-empty@2x.png'"></image>
+					<text class="error-text">暂无任何记录~</text>
 				</view>
 				<template v-else>
 					<!-- 列表 -->
@@ -60,15 +60,18 @@
 			<view class="tui-popup-box clearfix">
 				<view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
 					<view class="tui-flex-1">
-						<view class="tui-button" :class="isEmpty ? 'disabled' : 'cancel'" @click="handleShowClubpopup"
-							>同步至机构</view
+						<view class="tui-button" :class="isEmpty ? 'disabled' : 'cancel'" 
+							>添加记录</view
 						>
-						<view class="tui-button confirm" @click="handleAddRecord">添加画像</view>
+						<view class="tui-button confirm" @click="handleAddRecord">新增咨询人</view>
+					</view>
+					<view class="tui-flex-1">
+						<view class="tui-button-text" @click="handleShowClubpopup">同步记录至机构 ></view>
 					</view>
 				</view>
 			</view>
 		</tui-bottom-popup>
-		<!-- 添加记录 -->
+		<!-- 同步机构 -->
 		<cm-clubpopup
 			ref="clubpopup"
 			v-if="isClubpopupShow"
@@ -89,16 +92,27 @@
 			:maskClosable="false"
 		>
 		</tui-modal>
+		<!-- 操作弹窗 -->
+		<cm-clubmodal
+			ref="clubModal"
+			v-if="isClubModalShow"
+			:show="isClubModalShow"
+			:modalType="2"
+			@handleChoiceaText="handleChoiceaTextData"
+		>
+		</cm-clubmodal>
 	</view>
 </template>
 <script>
 import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
 import tuiNomore from '@/components/tui-components/nomore/nomore'
 import cmClubpopup from '@/components/cm-module/cm-seller/cm-clubpopup'
+import cmClubmodal from '@/components/cm-module/cm-seller/cm-clubmodal'
+
 
 import { mapState, mapMutations } from 'vuex'
 const defaultListQuery = {
-	questionManId: 0,
+	serviceProviderId: 0,
 	pageNum: 1,
 	pageSize: 10
 }
@@ -106,7 +120,8 @@ export default {
 	components: {
 		tuiLoadmore,
 		tuiNomore,
-		cmClubpopup
+		cmClubpopup,
+		cmClubmodal
 	},
 	data() {
 		return {
@@ -145,7 +160,8 @@ export default {
 			questionMan: '',
 			questionManId: '',
 			handleRemarksId: 0,
-			isClubpopupShow: false
+			isClubpopupShow: false,
+			isClubModalShow: false
 		}
 	},
 	onLoad(option) {
@@ -165,13 +181,14 @@ export default {
 	methods: {
 		...mapMutations(['login', 'logout']),
 		async init() {
-			const VisitorInfo = await this.$api.getComStorage('VisitorInfo')
-			this.questionMan = VisitorInfo.questionMan
-			this.listQuery.questionManId = VisitorInfo.questionManId
-			this.GetProductListInfo()
-			this.$api.removeStorage('VisitorInfo')
+			const userInfo = await this.$api.getStorage()
+			this.listQuery.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
+			// const VisitorInfo = await this.$api.getComStorage('VisitorInfo')
+			// this.questionMan = VisitorInfo.questionMan
+			// this.listQuery.questionManId = VisitorInfo.questionManId
+			this.getUserClubVisitorRecordlist()
 		},
-		GetProductListInfo() {
+		getUserClubVisitorRecordlist() {
 			this.remarksList = []
 			this.listQuery.pageNum = 1
 			this.UserService.getUserClubVisitorRecordlist(this.listQuery)
@@ -204,7 +221,7 @@ export default {
 					this.isRequest = true
 				})
 				.catch(error => {
-					this.$util.msg(error.msg, 2000)
+					console.log('=======>查询列表异常~')
 				})
 		},
 		GetOnReachBottomData(index) {
@@ -231,7 +248,7 @@ export default {
 					}
 				})
 				.catch(error => {
-					this.$util.msg(error.msg, 2000)
+					console.log('=======>查询列表异常~')
 				})
 		},
 		deleteRemark(remarksId) {
@@ -273,12 +290,31 @@ export default {
 				this.$util.msg(error.msg, 2000)
 			})
 		},
-		handleAddRecord() {
-			this.$api.redirectTo(
-				`/pages/seller/remarks/add-record?questionManId=${this.listQuery.questionManId}&questionMan=${
-					this.questionMan
-				}`
-			)
+		handleAddRecord() {// 新增咨询人
+			this.isClubModalShow = true
+		},
+		handleChoiceaTextData(data) {// 监听弹窗事件
+			console.log('data',data)
+			this.handleSaveVisitor(data)
+		},
+		handleSaveVisitor(data) {
+			// 添加咨询人
+			this.UserService.getUserClubVisitorSave({
+				name: data,
+				serviceProviderId: this.listQuery.serviceProviderId
+			})
+				.then(response => {
+					setTimeout(() => {
+						this.$api.navigateTo(
+							`/pages/seller/remarks/add-record?questionManId=${response.data.questionManId}&questionMan=${
+								response.data.questionMan
+							}`
+						)
+					}, 1000)
+				})
+				.catch(error => {
+					console.log('=======>添加咨询人失败~')
+				})
 		},
 		handleClick(e) {
 			//取消收藏
@@ -359,25 +395,13 @@ page {
 }
 .club-search {
 	width: 100%;
-	height: 192rpx;
+	height: 112rpx;
 	background: #ffffff;
 	box-sizing: border-box;
 	position: fixed;
 	top: 0;
 	left: 0;
 	z-index: 100;
-	.search-from-title {
-		width: 100%;
-		height: 80rpx;
-		line-height: 80rpx;
-		box-sizing: border-box;
-		padding: 0 24rpx;
-		font-size: $font-size-34;
-		float: left;
-		color: #1890f9;
-		background-color: #f2f9ff;
-		font-weight: normal;
-	}
 	.club-search-form {
 		width: 100%;
 		height: 112rpx;
@@ -549,6 +573,16 @@ page {
 				color: #ffffff;
 			}
 		}
+		.tui-button-text{
+			width: 600rpx;
+			height: 48rpx;
+			line-height: 48rpx;
+			text-align: center;
+			color: #E15616;
+			font-size: $font-size-26;
+			margin: 0 auto;
+			margin-top: 15rpx;
+		}
 	}
 }
 </style>