| | |
| | | <template> |
| | | <!-- 跟进记录 --> |
| | | <view class="container" @click="isShowComments = false"> |
| | | <view class="container"> |
| | | <view> |
| | | <h-tabs |
| | | class="tab" |
| | |
| | | <image v-for="(op,index) in item.albums" @click="previewImg(item.albums,index)" class="content-img mr-10" :src="op.img"></image> |
| | | </view> |
| | | <view class="flex align-center justify-between mt-5 gray font-13"> |
| | | <text>客户: {{item.vipName}}</text> |
| | | <navigator :url="'../../member/detail?id='+item.vipId" hover-class="none" style="padding-right: 50px;">客户: {{item.vipName}}</navigator> |
| | | <view class="flex align-center" v-if="item.nextNotifyTime"> |
| | | <text class="iconfont iconzhong mr-5"></text> |
| | | <text>{{item.nextNotifyTime}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="mt-5 gray font-13"> |
| | | <text>订单:{{item.orderAbstract}}</text> |
| | | <view class="flex align-center justify-between mt-5 gray font-13"> |
| | | <text style="padding-right: 50px;" @click="toOrder(item)">订单: {{item.orderAbstract}}</text> |
| | | </view> |
| | | <view class="right mt-5"> |
| | | <text class="iconfont" :class="item.zans && item.zans.indexOf(userInfo.id)>-1?'red iconxin1':'iconxin2'" @click="thumbsUp(item)"></text> |
| | | <text class="iconfont" :class="item.zans && item.zans.indexOf(userInfo.id)>-1?'blue iconlove-b':'iconlove-b1'" @click="thumbsUp(item)"></text> |
| | | <text class="iconfont iconliuyan1 ml-15" @click.stop="showComment(item.id)"></text> |
| | | </view> |
| | | <view class="content-row-notes flex align-center blue" v-if="item.zanUsers && item.zanUsers.length"> |
| | | <text class="iconfont iconxin2 mr-10"></text> |
| | | <text class="iconfont iconlove-b1 mr-10"></text> |
| | | <text v-for="(op, i) in item.zanUsers">{{op.suName}}<text v-if="i!=item.zanUsers.length-1">,</text></text> |
| | | </view> |
| | | <view class="content-row-notes blue" v-if="item.followupComments && item.followupComments.length"> |
| | |
| | | <uni-load-more :status="loadStatus" color="#a5abaf"></uni-load-more> |
| | | </view> |
| | | <no-record :isShow="!list.length" txt="暂无跟进记录"></no-record> |
| | | <view v-if="isShowComments" class="message-row" @click.stop=""> |
| | | <input type="text" v-model="comment" cursor-spacing="10" :focus="isShowComments" class="message-input" placeholder="评论" placeholder-class="placeholder"/> |
| | | <button class="green-btn message-btn" :disabled="!comment" @click="addFollowupComment">发送</button> |
| | | </view> |
| | | <uni-popup ref="commentEl" type="bottom" :isShowMask="false"> |
| | | <view class="message-row"> |
| | | <input type="text" v-model="comment" :focus="true" class="message-input" placeholder="评论" placeholder-class="placeholder"/> |
| | | <button class="blue-btn message-btn" :disabled="!comment" @click="addFollowupComment">发送</button> |
| | | </view> |
| | | </uni-popup> |
| | | <fillter :isShow="isShowFilter" :staffList="staffList" :vipList="vipList" @reset="resetFilter" @change="changeFilter"></fillter> |
| | | </view> |
| | | </template> |
| | |
| | | import HTabs from "@/components/liuyuno-tabs/liuyuno-tabs.vue"; |
| | | import fillter from './filter' |
| | | import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue'; |
| | | import uniPopup from '../../../components/uni-popup/uni-popup' |
| | | export default { |
| | | components: { |
| | | uniPopup, |
| | | HTabs, |
| | | fillter, |
| | | uniLoadMore |
| | |
| | | type: 1, |
| | | list: [], |
| | | imgIndex: 0, |
| | | isShowComments:false, |
| | | isShowFilter: false, |
| | | pageNum: 0, |
| | | loadStatus: 'more', |
| | |
| | | } |
| | | }, |
| | | onNavigationBarButtonTap(e){ |
| | | if(e.index==0){ |
| | | if(e.width && e.index==0){ |
| | | uni.navigateTo({ |
| | | url:"./addRecord" |
| | | }) |
| | |
| | | this.vipList.push(JSON.parse(options.selectInfo)) |
| | | } |
| | | this.getUserInfo() |
| | | this.reloadList() |
| | | |
| | | // 判断权限 |
| | | // #ifdef APP-PLUS |
| | |
| | | // #endif |
| | | }, |
| | | onShow() { |
| | | this.reloadList() |
| | | this.reloadList(true) |
| | | }, |
| | | onPullDownRefresh(){ |
| | | this.reloadData(); |
| | | this.reload(); |
| | | let timer = setTimeout(function () { |
| | | uni.startPullDownRefresh(); |
| | | uni.stopPullDownRefresh(); |
| | | clearTimeout(timer); |
| | | timer = null; |
| | | }, 800); |
| | |
| | | this.userInfo = roleInfo; |
| | | } |
| | | }, |
| | | reloadList(){ |
| | | // 重新加载数据, 重置分页参数 |
| | | reload(){ |
| | | this.pageNum = 0; |
| | | this.loadStatus = 'more'; |
| | | this.loadList(true) |
| | | }, |
| | | // 重新加载数据, 不重置分页参数 |
| | | reloadList(isNeedAdd){ |
| | | if(!this.list.length){ |
| | | this.loadList(); |
| | | return; |
| | | } |
| | | let staffIds = this.staffList.map((item) => { |
| | | return item.id; |
| | | }); |
| | | let vipIds = this.vipList.map((item) => { |
| | | return item.id; |
| | | }); |
| | | this.$httpUtils.request('/api/followup/findFollowup', { |
| | | startTime: this.startTime, |
| | | endTime: this.endTime, |
| | | limit: isNeedAdd?this.list.length+1:this.list.length, |
| | | offset: 0, |
| | | queryType: this.type, |
| | | staffIds: staffIds, |
| | | vipIds: vipIds |
| | | }, 'POST').then((res) => { |
| | | console.log(res.rows) |
| | | if(res.status == 200){ |
| | | this.list = res.rows |
| | | } |
| | | }) |
| | | }, |
| | | loadList(isRest){ |
| | | if(this.loadStatus!=='more'){ |
| | |
| | | if(result.length < 10){ |
| | | this.loadStatus = 'noMore'; |
| | | } else { |
| | | this.pageNum ++ ; |
| | | this.pageNum = this.pageNum + 10; |
| | | this.loadStatus = 'more'; |
| | | } |
| | | if(isRest){ |
| | |
| | | }, |
| | | changeType(index){ |
| | | this.type = index+1; |
| | | this.reloadList() |
| | | this.reload() |
| | | }, |
| | | // 预览图片 |
| | | previewImg(imgList, index) { |
| | |
| | | }, |
| | | // 评论 |
| | | addFollowupComment(){ |
| | | if(this.isRequesting){ |
| | | return; |
| | | } |
| | | this.isRequesting = true; |
| | | this.$httpUtils.request('/api/followup/addFollowupComment', { |
| | | follId: this.follId, |
| | | content: this.comment |
| | | }, 'POST').then((res) => { |
| | | if(res.status == 200){ |
| | | this.reloadList(); |
| | | this.isShowComments = false; |
| | | this.$refs.commentEl.close(); |
| | | this.comment = ''; |
| | | }else{ |
| | | this.$toast.info(res.info) |
| | | } |
| | | this.isRequesting = false; |
| | | }).catch((err) => { |
| | | this.isRequesting = false; |
| | | }) |
| | | }, |
| | | showComment(id){ |
| | | this.follId = id; |
| | | this.isShowComments=true; |
| | | this.$refs.commentEl.open(); |
| | | }, |
| | | setData(selectItem){ |
| | | let pages = getCurrentPages(); |
| | |
| | | this.endTime = ''; |
| | | this.staffList = []; |
| | | this.vipList = []; |
| | | this.reloadList(); |
| | | this.reload(); |
| | | }, |
| | | changeFilter(data){ |
| | | this.startTime = data.startTime; |
| | | this.endTime = data.endTime; |
| | | this.reloadList(); |
| | | this.reload(); |
| | | }, |
| | | toOrder(item){ |
| | | if(item.orderId){ |
| | | uni.navigateTo({ |
| | | url: '../orderDetail?orderId='+item.orderId |
| | | }) |
| | | } |
| | | if(item.serviceId){ |
| | | uni.navigateTo({ |
| | | url: '../serviceOrderDetail?id='+item.serviceId |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | font-size: 13px; |
| | | } |
| | | .message-row{ |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | background: #F6F6F8; |
| | | background: #eee; |
| | | padding: 10px; |
| | | margin-bottom: var(–safe-area-inset-bottom); |
| | | } |
| | | .message-input{ |
| | | flex: 1; |
| | |
| | | .message-btn{ |
| | | margin: 0; |
| | | line-height: 30px; |
| | | border-radius: 0; |
| | | border-radius: 2px; |
| | | font-size: 14px; |
| | | } |
| | | uni-button[disabled]:not([type]), uni-button[disabled][type=default]{ |
| | | color: #FFFFFF; |
| | | background-color: rgb(31 183 19 / 0.4); |
| | | border: 0; |
| | | } |
| | | </style> |