123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740 |
- <template>
- <view class="container product clearfix">
- <view class="container-fiexd-top">
- <view class="club-search clearfix">
- <view class="search-from name">
- <text class="iconfont icon-iconfonticonfontsousuo1"></text>
- <input
- class="input"
- type="text"
- confirm-type="search"
- v-model="listQuery.keyWord"
- @input="onShowClose"
- @confirm="userClubReportAssociatedList"
- placeholder="搜索关键词 / 咨询人 / 机构名称"
- maxlength="16"
- />
- <text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
- </view>
- <view class="search-screen" @click="showScreenDrawer">
- <text class="iconfont icon-gengduo1"></text> 筛选
- </view>
- </view>
- </view>
- <view class="remarks-content" :style="{ paddingBottom: isIphoneX ? '216rpx' : '168rpx' }">
- <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
- <!-- 空白页 -->
- <view class="empty-container" v-if="isEmpty">
- <image class="empty-container-image" :src="StaticUrl + '/icon/icon-remarks-empty@2x.png'"></image>
- <text class="error-text">暂无任何数据~</text>
- </view>
- <!-- 列表 -->
- <view
- class="tui-remarks-cell tui-mtop clearfix"
- v-for="(remark, index) in remarksList"
- :key="index"
- :class="{ orange: remark.followup == 1, blue: remark.followup == 2, grey: remark.followup == 3 }"
- @click.stop="details(remark.remarksId)"
- >
- <view class="tui-remarks-title">
- <view class="tui-remarks-title-top">
- <view class="tui-remarks-time tt">{{ remark.clubName }}</view>
- <view class="tui-remarks-time sm" v-if="remark.followup">
- <text
- :class="{
- orange: remark.followup == 1,
- blue: remark.followup == 2,
- grey: remark.followup == 3
- }"
- >{{ remark.followup | followupFilters }}</text
- >
- </view>
- </view>
- <view class="tui-remarks-title-bot">
- <view class="tui-remarks-text-view">
- <view class="tui-remarks-text h"
- ><text class="iconfont icon-bianji"></text>记录人:{{ remark.recordName }}</view
- >
- </view>
- <view class="tui-remarks-text-view" v-if="listQuery.manager >= 0">
- <view class="tui-remarks-text h"
- ><text class="iconfont icon-guanliyuan"></text>管理员:{{
- remark.leaderName ? remark.leaderName : ''
- }}</view
- >
- <view class="tui-remarks-text y">{{ remark.addTime }}</view>
- </view>
- </view>
- </view>
- <view class="tui-remarks-name">
- <view class="tui-remarks-name-text h">
- 咨询人:{{ remark.clubName ? remark.clubName : '' }}
- </view>
- <view class="tui-remarks-name-text y">
- 咨询类别:{{ remark.consultBack ? remark.consultBack : '无' }}
- </view>
- </view>
- <view class="tui-remarks-name none" v-if="remark.satisfied">
- <view class="tui-remarks-name-text h">
- 意向程度:<text class="red">{{ remark.satisfied | intenActionsFilters }}</text>
- </view>
- <view class="tui-remarks-name-text y">
- 报备状态:<text
- :class="{
- reviewed: remark.status == 1,
- approved: remark.status == 2,
- failed: remark.status == 3
- }"
- >{{ remark.status | statusFilters }}</text
- >
- </view>
- </view>
- <view class="tui-remarks-content">
- <text class="tui-remarks-span" v-for="(label, labelIndex) in remark.remarks" :key="labelIndex">
- {{ label.label }}
- </text>
- </view>
- <view class="tui-remarks-button" v-if="remark.createServiceProviderId === listQuery.serviceProviderId">
- <view class="btn edit" @click.stop="cancelReport(remark.remarksId)">取消关联</view>
- </view>
- </view>
- <!--加载loadding-->
- <tui-loadmore :visible="loadding" :index="3" type="black" />
- <tui-nomore :visible="!pullUpOn" :backgroundColor="'#F7F7F7'" :text="nomoreText" />
- <!--加载loadding-->
- </view>
- </view>
- <!-- 筛选抽屉 -->
- <cm-screenDrawer
- ref="screendrawer"
- :popupType="1"
- :rightDrawer="isScreenDrawer"
- @handSearchConfirm="handSearchConfirmData"
- >
- </cm-screenDrawer>
- <!-- 弹窗提示 -->
- <tui-modal
- :show="modal"
- @click="handleClick"
- @cancel="hideMobel"
- :content="contentModalText"
- :button="modalButton"
- color="#333"
- :size="32"
- shape="circle"
- :maskClosable="false"
- >
- </tui-modal>
- </view>
- </template>
- <script>
- import cmClubpopup from '../components/cm-clubpopup'
- import cmScreenDrawer from '../components/cm-screen-drawer'
- import { mapState, mapMutations } from 'vuex'
- const defaultListQuery = {
- keyWord: '',
- reportId: 0,
- startAddTime: '',
- endAddTime: '',
- consult: '',
- pinceSensitve: 0, //价格敏感度
- satisfied: 0, // 意向程度
- followup: 0, // 跟进状态
- leaderId: 0,
- groupId: 0,
- manager: 0,
- newDeal: 0, // 新增分配机构
- status: 0, // 报备状态
- serviceProviderId: 0
- }
- export default {
- components: {
- cmClubpopup,
- cmScreenDrawer
- },
- data() {
- return {
- StaticUrl: this.$Static,
- isIphoneX: this.$store.state.isIphoneX,
- modalButton: [
- {
- text: '取消',
- type: 'gray',
- plain: true //是否空心
- },
- {
- text: '确认',
- customStyle: {
- color: '#fff',
- bgColor: 'linear-gradient(90deg, #F28F31 0%, #FF5B00 100%)'
- },
- plain: false
- }
- ],
- totalRecord: 0,
- listQuery: Object.assign({}, defaultListQuery),
- remarksList: [],
- scrollTop: 0,
- isEmpty: false,
- loadding: false,
- pullUpOn: true,
- pullFlag: true,
- hasNextPage: false,
- navbarHeight: '',
- nomoreText: '上拉显示更多',
- contentModalText: '', //操作文字提示语句
- modal: false,
- handleRemarksId: 0,
- isScreenDrawer: false
- }
- },
- onLoad(option) {
- this.listQuery.reportId = option.reportId
- this.initGetStotage()
- },
- filters: {
- statusFilters(value) {
- // 订单来源
- const map = {
- 1: '待审核',
- 2: '审核通过',
- 3: '审核未通过'
- }
- return map[value]
- },
- followupFilters(value) {
- // 订单来源
- const map = {
- 1: '跟进中',
- 2: '跟进完成',
- 3: '已放弃'
- }
- return map[value]
- },
- intenActionsFilters(value) {
- // 意向
- if (value) {
- const map = {
- 1: '意向强烈',
- 2: '意向一般',
- 3: '意向平淡',
- 4: '随便看看'
- }
- return map[value]
- } else {
- return ''
- }
- }
- },
- computed: {
- ...mapState(['hasLogin', 'userInfo'])
- },
- methods: {
- ...mapMutations(['login', 'logout']),
- async initGetStotage() {
- const userInfo = await this.$api.getStorage()
- this.listQuery.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
- this.listQuery.manager = userInfo.manager ? userInfo.manager : 0
- this.userClubReportAssociatedList()
- },
- userClubReportAssociatedList() {
- this.remarksList = []
- this.listQuery.pageNum = 1
- this.UserService.userClubReportAssociatedList(this.listQuery)
- .then(response => {
- let data = response.data
- if (data.results && data.results.length > 0) {
- this.isEmpty = false
- this.hasNextPage = data.hasNextPage
- this.totalRecord = data.totalRecord
- this.remarksList = data.results
- this.pullFlag = false
- setTimeout(() => {
- this.pullFlag = true
- }, 500)
- if (this.hasNextPage) {
- this.pullUpOn = false
- this.nomoreText = '上拉显示更多'
- } else {
- if (this.remarksList.length < 8) {
- this.pullUpOn = true
- } else {
- this.pullUpOn = false
- this.loadding = false
- this.nomoreText = '已至底部'
- }
- }
- } else {
- this.isEmpty = true
- }
- this.isRequest = true
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- },
- GetOnReachBottomData(index) {
- //上拉加载
- this.listQuery.pageNum += 1
- this.UserService.userClubReportAssociatedList(this.listQuery)
- .then(response => {
- let data = response.data
- if (data.results && data.results.length > 0) {
- this.hasNextPage = data.hasNextPage
- this.remarksList = this.remarksList.concat(data.results)
- this.pullFlag = false // 防上拉暴滑
- setTimeout(() => {
- this.pullFlag = true
- }, 500)
- if (this.hasNextPage) {
- this.pullUpOn = false
- this.nomoreText = '上拉显示更多'
- } else {
- this.pullUpOn = false
- this.loadding = false
- this.nomoreText = '已至底部'
- }
- }
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- },
- cancelReport(remarksId) {
- this.handleRemarksId = remarksId
- this.modal = true
- this.contentModalText = '确定取消该咨询记录和报备的关联吗?'
- },
- handSearchConfirmData(data) {
- console.log('确定筛选', data)
- //确定筛选
- this.listQuery.startAddTime = data.startAddTime
- this.listQuery.endAddTime = data.endAddTime
- this.listQuery.consult = data.consult
- this.listQuery.leaderId = data.leaderId
- this.listQuery.groupId = data.groupId
- this.listQuery.pinceSensitve = data.pinceSensitve
- this.listQuery.satisfied = data.satisfied
- this.listQuery.followup = data.followup
- this.listQuery.newDeal = data.newDeal
- this.listQuery.status = data.status
- this.userClubReportAssociatedList()
- },
- showScreenDrawer() {
- //显示筛选抽屉
- this.isScreenDrawer = true
- },
- handleClick(e) {
- //确认删除
- if (e.index == 1) {
- this.handleCancelReport()
- }
- this.modal = false
- },
- handleCancelReport() {
- //操作删除资料备注
- this.UserService.userClubReportDisassociation({
- remarksId: this.handleRemarksId
- })
- .then(response => {
- this.$util.msg('取消关联成功', 2000, true, 'success')
- setTimeout(() => {
- this.userClubReportAssociatedList()
- }, 2000)
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- },
- onShowClose() {
- //输入框失去焦点时触发
- if (this.listQuery.keyWord != '') {
- this.isShowClose = true
- } else {
- this.isShowClose = false
- this.userClubReportAssociatedList()
- }
- },
- delInputText() {
- //清除输入框内容
- this.listQuery.keyWord = ''
- this.isShowClose = false
- this.listQuery.pageNum = 1
- this.userClubReportAssociatedList()
- },
- hideMobel() {
- this.modal = false
- },
- details(remarksId) {
- this.$api.navigateTo(`/pages/seller/remarks/details?remarksId=${remarksId}`)
- }
- },
- onPageScroll(e) {
- //实时获取到滚动的值
- },
- onReachBottom() {
- if (this.hasNextPage) {
- this.loadding = true
- this.pullUpOn = true
- this.GetOnReachBottomData()
- }
- },
- onPullDownRefresh() {
- setTimeout(() => {
- this.listQuery.pageNum = 1
- uni.stopPullDownRefresh()
- }, 200)
- },
- onShow() {}
- }
- </script>
- <style lang="scss">
- @import '@/uni.scss';
- page {
- background: #f7f7f7;
- }
- .empty-container {
- z-index: 99;
- }
- .container-fiexd-top {
- width: 100%;
- height: 112rpx;
- background: #f5f5f5;
- box-sizing: border-box;
- position: fixed;
- top: 0;
- left: 0;
- z-index: 982;
- .club-search {
- width: 100%;
- height: 112rpx;
- padding: 24rpx;
- background: #ffffff;
- box-sizing: border-box;
- .search-screen {
- width: 152rpx;
- height: 64rpx;
- float: right;
- box-sizing: border-box;
- padding: 0 20rpx;
- border: 1px solid #999999;
- line-height: 64rpx;
- border-radius: 32rpx;
- color: #333333;
- text-align: center;
- font-size: 28rpx;
- .icon-gengduo1 {
- font-size: 30rpx;
- margin-right: 10rpx;
- }
- }
- .search-from {
- width: 526rpx;
- height: 100%;
- background: #f7f7f7;
- border-radius: 32rpx;
- float: left;
- position: relative;
- .input {
- width: 420rpx;
- height: 64rpx;
- float: left;
- line-height: 64rpx;
- color: $text-color;
- font-size: $font-size-24;
- }
- .icon-iconfonticonfontsousuo1 {
- width: 64rpx;
- height: 64rpx;
- line-height: 64rpx;
- text-align: center;
- display: block;
- font-size: $font-size-38;
- float: left;
- color: #999999;
- }
- .icon-shanchu1 {
- font-size: $font-size-32;
- color: #999999;
- position: absolute;
- width: 64rpx;
- height: 64rpx;
- line-height: 64rpx;
- text-align: center;
- top: 0;
- right: 0;
- z-index: 10;
- }
- }
- }
- }
- .remarks-content {
- width: 100%;
- height: auto;
- position: relative;
- padding: 0;
- box-sizing: border-box;
- padding: 24rpx;
- padding-top: 136rpx;
- .empty-container-image {
- width: 260rpx;
- height: 260rpx;
- margin-top: -300rpx;
- }
- .tui-remarks-cell {
- width: 100%;
- border-radius: 16rpx;
- margin-bottom: 24rpx;
- background: #ffffff;
- box-sizing: border-box;
- padding: 0 24rpx 24rpx 24rpx;
- &.orange {
- background: #ffffff linear-gradient(180deg, #ffede5 0%, rgba(255, 255, 255, 0) 50%);
- }
- &.blue {
- background: #ffffff linear-gradient(180deg, #deefff 0%, rgba(255, 255, 255, 0) 50%);
- }
- &.grey {
- background: #ffffff linear-gradient(180deg, #ececec 0%, rgba(255, 255, 255, 0) 50%);
- }
- .tui-remarks-title {
- width: 100%;
- height: auto;
- box-sizing: border-box;
- padding: 20rpx 0;
- border-bottom: 1px solid #e1e1e1;
- float: left;
- .tui-remarks-title-top {
- width: 100%;
- height: 56rpx;
- line-height: 56rpx;
- .tui-remarks-time {
- float: left;
- &.tt {
- width: 60%;
- font-size: $font-size-32;
- color: #333333;
- text-align: left;
- text-overflow: ellipsis;
- overflow: hidden;
- display: -webkit-box;
- -webkit-line-clamp: 1;
- line-clamp: 1;
- -webkit-box-orient: vertical;
- font-weight: bold;
- .tags {
- display: inline-block;
- padding: 0 10rpx;
- border-radius: 8rpx;
- line-height: 36rpx;
- font-size: 22rpx;
- background-color: #f94b4b;
- color: #ffffff;
- text-align: center;
- float: left;
- margin-right: 10rpx;
- margin-top: 10rpx;
- font-weight: normal;
- }
- }
- &.sm {
- width: 40%;
- font-size: $font-size-26;
- color: #999999;
- text-align: right;
- .orange {
- display: inline-block;
- padding: 0 15rpx;
- border-radius: 24rpx;
- line-height: 48rpx;
- font-size: 24rpx;
- background-color: #FF5B00;
- color: #ffffff;
- text-align: center;
- }
- .blue {
- display: inline-block;
- padding: 0 15rpx;
- border-radius: 24rpx;
- line-height: 48rpx;
- font-size: 24rpx;
- background-color: #1890f9;
- color: #ffffff;
- text-align: center;
- }
- .grey {
- display: inline-block;
- padding: 0 15rpx;
- border-radius: 24rpx;
- line-height: 48rpx;
- font-size: 24rpx;
- background-color: #e1e1e1;
- color: #999999;
- text-align: center;
- }
- }
- }
- }
- .tui-remarks-title-bot {
- width: 100%;
- height: auto;
- .tui-remarks-text-view {
- width: 100%;
- height: 48rpx;
- .tui-remarks-text {
- width: 50%;
- height: 48rpx;
- line-height: 48rpx;
- box-sizing: border-box;
- text-align: left;
- font-size: $font-size-26;
- color: #999999;
- float: left;
- text-overflow: ellipsis;
- overflow: hidden;
- display: -webkit-box;
- -webkit-line-clamp: 1;
- line-clamp: 1;
- -webkit-box-orient: vertical;
- &.a {
- width: 100%;
- }
- &.y {
- text-align: right;
- }
- }
- }
- }
- }
- .tui-remarks-name {
- width: 100%;
- height: 48rpx;
- line-height: 48rpx;
- font-size: $font-size-26;
- color: #666666;
- text-align: left;
- margin-bottom: 10rpx;
- margin-top: 20rpx;
- float: left;
- &.none {
- margin-top: 0;
- margin-bottom: 20rpx;
- }
- .tui-remarks-name-text {
- height: 48rpx;
- box-sizing: border-box;
- text-align: left;
- font-size: $font-size-26;
- color: #333333;
- float: left;
- text-overflow: ellipsis;
- overflow: hidden;
- display: -webkit-box;
- -webkit-line-clamp: 1;
- line-clamp: 1;
- -webkit-box-orient: vertical;
- .red {
- color: #f94b4b;
- }
- &.a {
- width: 100%;
- }
- &.h {
- width: 40%;
- padding-right: 24rpx;
- }
- &.y {
- width: 60%;
- padding-left: 24rpx;
- .reviewed{
- color: #FF5B00;
- }
- .approved{
- color: #0DB26D;
- }
- .failed{
- color: #F94B4B;
- }
- }
- }
- }
- .tui-remarks-content {
- width: 100%;
- height: auto;
- .tui-remarks-span {
- height: 48rpx;
- line-height: 48rpx;
- text-align: center;
- padding: 0 20rpx;
- background-color: #f7f7f7;
- font-size: $font-size-26;
- color: #666666;
- border-radius: 25rpx;
- display: inline-block;
- margin-right: 24rpx;
- margin-bottom: 24rpx;
- &:nth-child(4n) {
- margin-right: none;
- }
- }
- }
- .tui-remarks-button {
- width: 100%;
- height: 68rpx;
- border-top: 1px solid #e1e1e1;
- padding-top: 20rpx;
- .btn {
- width: 100%;
- line-height: 48rpx;
- box-sizing: border-box;
- text-align: center;
- font-size: $font-size-34;
- float: left;
- font-weight: bold;
- &.edit {
- color: #1890f9;
- }
- }
- }
- }
- }
- .tui-popup-box {
- position: relative;
- box-sizing: border-box;
- min-height: 100rpx;
- padding: 6rpx 24rpx;
- .tui-popup-content {
- padding-top: 30rpx;
- }
- }
- .tui-popup-btn {
- width: 100%;
- height: auto;
- float: left;
- box-sizing: border-box;
- margin-top: 30rpx;
- .tui-button {
- width: 600rpx;
- height: 88rpx;
- background: $btn-confirm;
- line-height: 88rpx;
- text-align: center;
- color: #ffffff;
- font-size: $font-size-28;
- border-radius: 44rpx;
- margin: 0 auto;
- }
- .tui-button-text {
- width: 600rpx;
- height: 48rpx;
- line-height: 48rpx;
- text-align: center;
- color: #FF5B00;
- font-size: $font-size-26;
- margin: 0 auto;
- margin-top: 15rpx;
- }
- }
- </style>
|