|
|
@@ -5,12 +5,12 @@
|
|
|
<view>
|
|
|
<AppSearchModule placeholder="这里搜索" @input="searchFn"/>
|
|
|
</view>
|
|
|
- <view style="padding:0 10upx 0 10upx;" >
|
|
|
- <button class="admin-button-com middle blue" @click="addCustom()">添加</button>
|
|
|
+ <view style="padding:0 0upx 0 10upx;" >
|
|
|
+ <button class="admin-button-com middle blue" @click="addCustom()">添加客户</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="app-tabs">
|
|
|
- <app-tabs :tabs="tabs" :isFixed="false" :top="50" :currentTab="tabIndex" :height="100" @change="change" itemWidth="33%" :isAdd="false" />
|
|
|
+ <app-tabs :tabs="tabs" :isFixed="false" :top="50" :currentTab="tabIndex" :height="100" @change="change" itemWidth="25%" :isAdd="false" />
|
|
|
</view>
|
|
|
|
|
|
<view class="list-wrap">
|
|
|
@@ -79,17 +79,26 @@ export default {
|
|
|
tabs: [
|
|
|
{
|
|
|
name: "全部",
|
|
|
- value: 0
|
|
|
+ value: 0,
|
|
|
+ type:0
|
|
|
},
|
|
|
{
|
|
|
- name: "消费排行",
|
|
|
- value: 0
|
|
|
+ name: "余额",
|
|
|
+ value: 0,
|
|
|
+ type:2
|
|
|
},
|
|
|
{
|
|
|
- name: "赊账排行",
|
|
|
- value: 0
|
|
|
+ name: "消费",
|
|
|
+ value: 0,
|
|
|
+ type:1
|
|
|
},
|
|
|
- ]
|
|
|
+ {
|
|
|
+ name: "生日",
|
|
|
+ value: 0,
|
|
|
+ type:3
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ customType:0
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -115,6 +124,8 @@ export default {
|
|
|
return false;
|
|
|
}
|
|
|
this.tabIndex = e.index;
|
|
|
+ let tab = this.tabs[this.tabIndex]
|
|
|
+ this.customType = tab.type
|
|
|
this.resetList();
|
|
|
this.getMyCustomList();
|
|
|
},
|
|
|
@@ -135,7 +146,7 @@ export default {
|
|
|
this.getMyCustomList()
|
|
|
},
|
|
|
getMyCustomList() {
|
|
|
- return getList({ search:"", page:this.list.page,type:this.tabIndex,name: this.seekVal }).then(res => {
|
|
|
+ return getList({ search:"", page:this.list.page,type:this.customType,name: this.seekVal }).then(res => {
|
|
|
if(res.code == 1){
|
|
|
this.completes(res)
|
|
|
}
|
|
|
@@ -149,14 +160,14 @@ export default {
|
|
|
padding-top: 100upx;
|
|
|
padding-bottom: 20upx;
|
|
|
}
|
|
|
- .list-wrap {
|
|
|
- padding-top: 100upx;
|
|
|
-
|
|
|
- .list {
|
|
|
- background-color: #fff;
|
|
|
- margin-bottom: 20upx;
|
|
|
- }
|
|
|
+.list-wrap {
|
|
|
+ padding-top: 100upx;
|
|
|
+
|
|
|
+ .list {
|
|
|
+ background-color: #fff;
|
|
|
+ margin-bottom: 20upx;
|
|
|
}
|
|
|
+}
|
|
|
.app-tabs {
|
|
|
position: fixed;
|
|
|
@media screen and (max-width: 1100px) {
|
|
|
@@ -175,138 +186,131 @@ export default {
|
|
|
@include disFlex(center, center);
|
|
|
}
|
|
|
}
|
|
|
- .input-wrap_box {
|
|
|
- background-color: #fff;
|
|
|
- position: fixed;
|
|
|
- top: 0;
|
|
|
- z-index: 10;
|
|
|
- /* 手机mobile屏幕小于1000px */
|
|
|
- @media screen and (max-width: 1100px) {
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
- /* 收银台cashier屏幕大于1000px */
|
|
|
- @media screen and (min-width:1100px) {
|
|
|
- width: 40%;
|
|
|
- }
|
|
|
- height: 100upx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- padding: 0 30upx;
|
|
|
- & > view:nth-child(1) {
|
|
|
- flex: 1;
|
|
|
- }
|
|
|
+.input-wrap_box {
|
|
|
+ background-color: #fff;
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ z-index: 10;
|
|
|
+ width: 100%;
|
|
|
+ height: 100upx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0 10upx;
|
|
|
+ & > view:nth-child(1) {
|
|
|
+ flex: 1;
|
|
|
}
|
|
|
+}
|
|
|
|
|
|
- .user-card {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- padding: 12upx 0;
|
|
|
- width: 100%;
|
|
|
- position: relative;
|
|
|
+.user-card {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding: 12upx 0;
|
|
|
+ width: 100%;
|
|
|
+ position: relative;
|
|
|
|
|
|
- .user-avatar {
|
|
|
- width: 80upx;
|
|
|
- height: 80upx;
|
|
|
- border-radius: 50%;
|
|
|
- overflow: hidden;
|
|
|
- margin-left: 16upx;
|
|
|
- margin-right: 16upx;
|
|
|
+ .user-avatar {
|
|
|
+ width: 80upx;
|
|
|
+ height: 80upx;
|
|
|
+ border-radius: 50%;
|
|
|
+ overflow: hidden;
|
|
|
+ margin-left: 16upx;
|
|
|
+ margin-right: 16upx;
|
|
|
|
|
|
- .avatar-img {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
- }
|
|
|
+ .avatar-img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .user-info {
|
|
|
- flex: 1;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- justify-content: space-between;
|
|
|
- height: 80upx;
|
|
|
- padding-right: 210upx;
|
|
|
- }
|
|
|
+ .user-info {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+ height: 80upx;
|
|
|
+ padding-right: 210upx;
|
|
|
+ }
|
|
|
|
|
|
- .user-main {
|
|
|
- display: flex;
|
|
|
- align-items: flex-start;
|
|
|
- margin-bottom: 4upx;
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
+ .user-main {
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-start;
|
|
|
+ margin-bottom: 4upx;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
|
|
|
- .user-name {
|
|
|
- flex: 1;
|
|
|
- font-size: 28upx;
|
|
|
- font-weight: bold;
|
|
|
- color: #333;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- white-space: nowrap;
|
|
|
- margin-right: 10upx;
|
|
|
- max-width: calc(100% - 160upx);
|
|
|
- }
|
|
|
+ .user-name {
|
|
|
+ flex: 1;
|
|
|
+ font-size: 28upx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ margin-right: 10upx;
|
|
|
+ max-width: calc(100% - 160upx);
|
|
|
+ }
|
|
|
|
|
|
- .right-info {
|
|
|
- position: absolute;
|
|
|
- right: 50upx;
|
|
|
- top: 12upx;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: flex-end;
|
|
|
- gap: 4upx;
|
|
|
- width: 200upx;
|
|
|
- z-index: 1;
|
|
|
- text-align: right;
|
|
|
- }
|
|
|
+ .right-info {
|
|
|
+ position: absolute;
|
|
|
+ right: 50upx;
|
|
|
+ top: 12upx;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: flex-end;
|
|
|
+ gap: 4upx;
|
|
|
+ width: 200upx;
|
|
|
+ z-index: 1;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
|
|
|
- .user-balance {
|
|
|
- display: flex;
|
|
|
- align-items: baseline;
|
|
|
- white-space: nowrap;
|
|
|
- width: 100%;
|
|
|
- justify-content: flex-end;
|
|
|
- }
|
|
|
+ .user-balance {
|
|
|
+ display: flex;
|
|
|
+ align-items: baseline;
|
|
|
+ white-space: nowrap;
|
|
|
+ width: 100%;
|
|
|
+ justify-content: flex-end;
|
|
|
+ }
|
|
|
|
|
|
- .balance {
|
|
|
- font-size: 26upx;
|
|
|
- font-weight: bold;
|
|
|
- text-align: right;
|
|
|
- }
|
|
|
+ .balance {
|
|
|
+ font-size: 26upx;
|
|
|
+ font-weight: bold;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
|
|
|
- .positive {
|
|
|
- color: #049E2C;
|
|
|
- }
|
|
|
+ .positive {
|
|
|
+ color: #049E2C;
|
|
|
+ }
|
|
|
|
|
|
- .negative {
|
|
|
- color: #ff0000;
|
|
|
- }
|
|
|
+ .negative {
|
|
|
+ color: #ff0000;
|
|
|
+ }
|
|
|
|
|
|
- .user-meta {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- font-size: 22upx;
|
|
|
- color: #9397a4;
|
|
|
- }
|
|
|
+ .user-meta {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 22upx;
|
|
|
+ color: #9397a4;
|
|
|
+ }
|
|
|
|
|
|
- .visit-time {
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- white-space: nowrap;
|
|
|
- }
|
|
|
+ .visit-time {
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ }
|
|
|
|
|
|
- .member-badge {
|
|
|
- background: linear-gradient(135deg, #049E2C, #06c235);
|
|
|
- color: #ffffff;
|
|
|
- padding: 6upx 16upx;
|
|
|
- border-radius: 18upx;
|
|
|
- font-size: 24upx;
|
|
|
- font-weight: bold;
|
|
|
- box-shadow: 0 2upx 8upx rgba(4, 158, 44, 0.25);
|
|
|
- border: 1upx solid rgba(255, 255, 255, 0.3);
|
|
|
- white-space: nowrap;
|
|
|
- flex-shrink: 0;
|
|
|
- letter-spacing: 1px;
|
|
|
- }
|
|
|
+ .member-badge {
|
|
|
+ background: linear-gradient(135deg, #049E2C, #06c235);
|
|
|
+ color: #ffffff;
|
|
|
+ padding: 6upx 16upx;
|
|
|
+ border-radius: 18upx;
|
|
|
+ font-size: 24upx;
|
|
|
+ font-weight: bold;
|
|
|
+ box-shadow: 0 2upx 8upx rgba(4, 158, 44, 0.25);
|
|
|
+ border: 1upx solid rgba(255, 255, 255, 0.3);
|
|
|
+ white-space: nowrap;
|
|
|
+ flex-shrink: 0;
|
|
|
+ letter-spacing: 1px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 确保箭头正常显示
|