|
@@ -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>
|