|
|
@@ -0,0 +1,262 @@
|
|
|
+<template>
|
|
|
+ <div class="app-main app-content">
|
|
|
+ <view class="input-wrap_box">
|
|
|
+ <view>
|
|
|
+ <AppSearchModule placeholder="请输入客户名称,支持拼音首字母" @input="searchFn"/>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <block v-if="!$util.isEmpty(list.data)">
|
|
|
+ <block v-for="(item, index) in list.data" :key="index">
|
|
|
+ <tui-list-cell :arrow="true" @click=" pageTo({url: '/admin/billing/index',type:2,query: {customId: item.id,customName:item.name}})">
|
|
|
+ <div class="tui-msg-box">
|
|
|
+ <img :src="item.avatar" class="tui-msg-pic" mode="widthFix" />
|
|
|
+ <div class="tui-msg-item">
|
|
|
+ <div class="tui-msg-name">
|
|
|
+ <div class="tui-user-name">{{ item.name }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="tui-msg-content">
|
|
|
+ <span>{{ item.visitTime }}</span>
|
|
|
+ <span v-if="item.debtAmount > 0" class="debt-amount">欠款:<span class="amount_num">{{item.debtAmount}}</span></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="tui-msg-right">
|
|
|
+ <badge-module
|
|
|
+ type="danger"
|
|
|
+ :dot="item.level == 3 ? true : false"
|
|
|
+ v-if="item.messageNum > 0"
|
|
|
+ >{{ item.messageNum }}</badge-module
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </tui-list-cell>
|
|
|
+ </block>
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
+ <app-wrapper-empty :is-empty="$util.isEmpty(list.data)" />
|
|
|
+ </block>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import TuiListCell from "@/components/plugin/list-cell";
|
|
|
+import BadgeModule from "@/components/plugin/badge";
|
|
|
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
+import appVipModule from "@/components/module/app-vip";
|
|
|
+import AppTag from "@/components/module/app-tag.vue";
|
|
|
+import AppSearchModule from "@/components/module/app-search";
|
|
|
+import { list } from "@/mixins";
|
|
|
+import { getList } from "@/api/member";
|
|
|
+export default {
|
|
|
+ name: "selectCustom",
|
|
|
+ components: {
|
|
|
+ TuiListCell,
|
|
|
+ BadgeModule,
|
|
|
+ AppWrapperEmpty,
|
|
|
+ appVipModule,
|
|
|
+ AppTag,
|
|
|
+ AppSearchModule
|
|
|
+ },
|
|
|
+ mixins: [list],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tabIndex: 0
|
|
|
+ };
|
|
|
+ },
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.resetList();
|
|
|
+ this._list().then((res) => {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onReachBottom() {
|
|
|
+ if (!this.list.finished) {
|
|
|
+ this._list().then((res) => {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad(option) {},
|
|
|
+ onShow(){
|
|
|
+ uni.removeStorageSync('newClient');
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init() {
|
|
|
+ if(!this.AUTHORITY_SHOW) {
|
|
|
+ this._list();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ searchFn(e) {
|
|
|
+ this.seekVal = e;
|
|
|
+ this._list();
|
|
|
+ },
|
|
|
+ _list() {
|
|
|
+ return getList({
|
|
|
+ search: "",
|
|
|
+ type:this.tabIndex,
|
|
|
+ page: this.list.page,
|
|
|
+ name: this.seekVal,
|
|
|
+ }).then((res) => {
|
|
|
+ this.completes(res);
|
|
|
+ if (this.$util.isEmpty(res.data)){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ change(e) {
|
|
|
+ if (this.tabIndex == e.index) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ this.tabIndex = e.index;
|
|
|
+ this.resetList();
|
|
|
+ this._list();
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.app-content {
|
|
|
+ padding-top: 100px;
|
|
|
+ padding-bottom: 20px;
|
|
|
+}
|
|
|
+.tabs-wrap {
|
|
|
+ position: fixed;
|
|
|
+ .tabs-left {
|
|
|
+ width: 80%;
|
|
|
+ }
|
|
|
+ .tabs-right {
|
|
|
+ width: 19%;
|
|
|
+ border-left: $borderColor;
|
|
|
+ @include disFlex(center, center);
|
|
|
+ }
|
|
|
+}
|
|
|
+ .input-wrap_box {
|
|
|
+ background-color: #fff;
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ z-index: 10;
|
|
|
+ width: 100%;
|
|
|
+ height: 100px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0 30px;
|
|
|
+ & > view:nth-child(1) {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+.tui-msg-box {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .tui-msg-pic {
|
|
|
+ width: 80upx;
|
|
|
+ height: 80upx;
|
|
|
+ border-radius: 50%;
|
|
|
+ margin-right: 20upx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tui-msg-item {
|
|
|
+ max-width: 500upx;
|
|
|
+ min-height: 80upx;
|
|
|
+ overflow: hidden;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+ & > div {
|
|
|
+ @include disFlex(center, flex-start);
|
|
|
+ & > div:first-child {
|
|
|
+ margin-right: 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .level-img {
|
|
|
+ /deep/.vip-text {
|
|
|
+ left: 70px;
|
|
|
+ top: 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .normal-img {
|
|
|
+ width: 70px;
|
|
|
+ padding: 2px 6px;
|
|
|
+ color: #999;
|
|
|
+ background-color: #f0f2f6;
|
|
|
+ border-radius: 20px;
|
|
|
+ .vip-text {
|
|
|
+ font-size: 24px;
|
|
|
+ transform: scale(0.6);
|
|
|
+ position: relative;
|
|
|
+ top: -2px;
|
|
|
+ left: -8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .member-img {
|
|
|
+ width: 70px;
|
|
|
+ padding: 2px 6px;
|
|
|
+ color: green;
|
|
|
+ background-color: #f0f2f6;
|
|
|
+ border-radius: 20px;
|
|
|
+ .vip-text {
|
|
|
+ font-size: 24px;
|
|
|
+ transform: scale(0.6);
|
|
|
+ position: relative;
|
|
|
+ top: -2px;
|
|
|
+ left: -8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .iconfont {
|
|
|
+ color: #00aaed;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .tui-msg-name {
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ font-size: 30upx;
|
|
|
+ line-height: 1;
|
|
|
+ color: #262b3a;
|
|
|
+ .tui-user-name {
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ width: 180rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .tui-msg-content {
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ font-size: 24upx;
|
|
|
+ line-height: 1;
|
|
|
+ color: #9397a4;
|
|
|
+ .debt-amount{
|
|
|
+ margin-left:40rpx;
|
|
|
+ .amount_num{
|
|
|
+ color:red;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.tui-msg-right {
|
|
|
+ max-width: 120upx;
|
|
|
+ height: 80upx;
|
|
|
+ margin-left: auto;
|
|
|
+ margin-right: 24px;
|
|
|
+ text-align: right;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+.user_tag {
|
|
|
+ border: 1px solid #cccccc;
|
|
|
+ padding: 5px 12px 5px 12px;
|
|
|
+ border-radius: 25px;
|
|
|
+ color: #bbbbbb;
|
|
|
+ margin-right: 10px;
|
|
|
+ margin-bottom: 12px;
|
|
|
+ display: inline-block;
|
|
|
+ font-size: 30rpx;
|
|
|
+}
|
|
|
+</style>
|