123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <template>
- <uni-swipe-action v-if="openSlider">
- <uni-swipe-action-item>
- <view class="list-item" @click="handleToDetail">
- <view class="list-item-main">
- <text class="left">
- {{ itemData.leadsName }}
- </text>
- </view>
- <view class="list-item-desc">
- <text class="left">
- 最后跟进时间:{{ itemData.lastTime || '--' }}
- </text>
- <text class="right">
- {{ itemData.ownerUserName }}
- </text>
- </view>
- </view>
- <template v-slot:right>
- <view class="delete" @click="setFollow">
- 跟进
- </view>
- </template>
- </uni-swipe-action-item>
- </uni-swipe-action>
- <view v-else class="list-item" @click="handleToDetail">
- <view class="list-item-main">
- <text class="left">
- {{ itemData.leadsName }}
- </text>
- </view>
- <view class="list-item-desc">
- <text class="left">
- 最后跟进时间:{{ itemData.lastTime || '--' }}
- </text>
- <text class="right">
- {{ itemData.ownerUserName }}
- </text>
- </view>
- </view>
- </template>
- <script>
- import {LeadsSetFollow} from 'API/crm/message'
- export default {
- name: 'DetailLeadsItem',
- props: {
- itemData: {
- type: Object,
- required: true
- },
- openSlider: {
- type: Boolean,
- default: false
- }
- },
- data() {
- return {
- rightOptions: [
- {
- text: '跟进',
- style: {
- backgroundColor: '#3c80f7',
- width: 50
- }
- }
- ]
- }
- },
- methods: {
- handleToDetail() {
- console.log('to detail')
- this.$Router.navigateTo({
- url: '/pages_crm/leads/detail',
- query: {
- id: this.itemData.leadsId
- }
- })
- },
- setFollow() {
- LeadsSetFollow([
- this.itemData.leadsId
- ]).then(() => {
- this.$toast('跟进成功')
- this.$emit('refresh')
- }).catch()
- },
- }
- }
- </script>
- <style scoped lang="scss">
- @import "detailItem";
- .delete {
- width: 170rpx;
- height: 100%;
- color: white;
- font-size: 28rpx;
- background-color: $theme-color;
- @include center;
- }
- </style>
|