|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- <template>
- <view class="box">
- <view style="width: 690rpx;margin: 0 auto;margin-top: 20rpx;">
- <u-search @search='searchinfo()' :show-action='false' placeholder="请输入" v-model="keyword"></u-search>
- </view>
- <!-- <view @click="searchinfo()">搜索</view> -->
- <view class="content" style="background: #F8F8F8;">
- <view class="content-tips" v-for="(item,index) in recordList" :key='index' @click="tapThevisiting(item)">
- <view class="content-first">
- <view class="left">
- <!-- <view class="img">{{item.agentName.slice(0,1)}}</view> -->
- <view class="name">{{item.agentName}}</view>
- <view class="status" v-if="item.replaceReception==1">代接待</view>
- </view>
-
- <view class="right" v-if="item.recording!=0">
- <view v-if="methodsisshow==true">
- <text v-if="item.taboo==1">违禁接待 |</text>
- </view>
- <!-- <view class="point"></view> -->
- <view v-if="item.markAdvisor==0" class="">未标记</view>
- <view v-if="item.markAdvisor==1" class="">已标记</view>
- </view>
- <view class="right" v-else>
- <view class="">无录音</view>
- </view>
- </view>
- <view class="content-sec">
- <view class="left">
- <view class="cus">客户:{{item.name || '--'}} |</view>
- <view class="arriveNum">{{item.visitRecord || "0"}}次到访</view>
- </view>
- <view class="right">
- {{item.fraction || '0'}}%
- <!-- | {{item.fraction || '0'}}分 -->
- </view>
- </view>
- <view class="content-last">
- {{item.createTime}} | {{item.mm || '0'}}分钟
- </view>
- </view>
- </view>
- </view>
- </template>
-
- <script>
- export default{
- data(){
- return{
- keyword:'',
- recordList:[],
- buildingID:'',
- nextPage:1,
- totalRecord:"",
- methodsisshow:false,
- userInfo:{}
- }
- },
- onShow() {
- this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
- if(this.userInfo.dataCode==6 || this.userInfo.dataCode==3){
- this.methodsisshow=false;
- }else{
- this.methodsisshow=true;
- }
- this.buildingID = uni.getStorageSync('buildingID').id;
- this.nextPage=1;
- this.recordList=[];
- },
- onReachBottom() {
- if(this.totalRecord==this.nextPage){
- uni.showToast({
- icon:'none',
- title: '到底了',
- duration: 2000
- });
- return
- }else{
- this.nextPage+=1;
- this.getMyCustom();
- }
- },
- methods:{
- tapThevisiting(item) {
- if(item.status==0){
- uni.showToast({
- icon: "none",
- title: "排队中"
- })
- return
- }else{
- const parames = {
- pageNum: 1,
- pageSize: 100,
- query: {
- customerId: item.id,
- }
- }
- var item={
- bg:0,
- customerId:item.id,
- }
- uni.setStorageSync("searchobj", item); //写入缓存
- this.$u.post("/corpus/findByPage", parames).then(res => {
- if(res==null){
- uni.showToast({
- icon: "none",
- title: "暂无音频"
- })
- return
- }else{
- let newobj = res[0];
- if(res[0].merge==0){
- uni.navigateTo({
- url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&stateisshow=${"2"}`
- })
- }else{
- uni.navigateTo({
- url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&stateisshow=${"1"}`
- })
- }
- }
- })
- }
-
- },
- searchinfo(){
- this.nextPage=1;
- this.recordList=[];
- this.getMyCustom();
- },
- getMyCustom(){
- var parames = {
- pageNum: this.nextPage,
- pageSize: 10,
- query: {
- projectId:this.buildingID,
- time:1,
- nameOrPhone:this.keyword
- }
- };
- this.$u.post("/customer/findbypage", parames).then(data => {
- var list = data.results || [];
- this.recordList = [...this.recordList, ...list];
- this.totalRecord=data.totalPage;
- })
- },
- }
- }
- </script>
-
- <style lang="scss" scoped>
- .box {
- width: 100%;
- height: 100vh;
- background: #FFFFFF;
- }
- .content{
- .content-tips{
- background: #fff;
- padding: 0 20rpx;
- box-sizing: border-box;
- overflow: hidden;
- margin-top: 20rpx;
- .content-first{
- margin-top: 19rpx;
- display: flex;
- justify-content: space-between;
- .left{
- display: flex;
- .img{
- width: 52rpx;
- height: 52rpx;
- background: #FFFFFF;
- border: 1px solid #C9C9C9;
- border-radius: 50%;
- text-align: center;
- line-height: 52rpx;
- }
- .name{
- font-weight: 600;
- color: #333333;
- // margin-left: 20rpx;
- margin-top: 11rpx;
- }
- .status{
- width: 110rpx;
- height: 42rpx;
- background: #FFF9F5;
- border-radius: 4rpx;
- font-size: 26rpx;
- font-weight: 400;
- color: #EC8D49;
- line-height: 42rpx;
- text-align: center;
- margin-left: 19rpx;
- margin-top: 11rpx;
- }
- }
- .right{
- display: flex;
- margin-top: 11rpx;
- .point{
- width: 12rpx;
- height: 12rpx;
- background: #2B6EFF;
- border-radius: 50%;
- margin-right: 9rpx;
- margin-top: 16rpx;
-
- }
- }
- }
-
-
- .content-sec{
- display: flex;
- justify-content: space-between;
- margin-top: 19rpx;
- .left{
- display: flex;
- .cus{
- font-size: 30rpx;
- font-weight: 400;
- color: #666666;
- line-height: 30rpx;
- }
- .arriveNum{
- font-size: 30rpx;
- font-weight: 400;
- line-height: 30rpx;
- margin-left: 10rpx;
- }
- }
- .right{
- width: 120rpx;
- height: 46rpx;
- background: #F4F8FD;
- border-radius: 6rpx;
- text-align: center;
- line-height: 46rpx;
- font-weight: 400;
- color: #2671E2;
- }
- }
- .content-last{
- margin: 30rpx 0;
- font-size: 30rpx;
- font-weight: 400;
- color: #666666;
- line-height: 30rpx;
- }
-
- }
- }
- </style>
|