|
|
@@ -2,9 +2,10 @@
|
|
|
<view class="app-select_user">
|
|
|
<view class="title">客户列表</view>
|
|
|
<view class="app-userList_box">
|
|
|
- <view
|
|
|
- :key="item.id"
|
|
|
- class="userList-item_box" v-for="item in list">
|
|
|
+ <view
|
|
|
+ :key="item.id"
|
|
|
+ @click="selectUser(item)"
|
|
|
+ class="userList-item_box" v-for="item in list">
|
|
|
<view class="head-box">
|
|
|
<image
|
|
|
class="img"
|
|
|
@@ -18,31 +19,17 @@
|
|
|
<view>欠{{item.debtAmount}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- <view class="userList-item_box">
|
|
|
- <view class="head-box">
|
|
|
- <image
|
|
|
- class="img"
|
|
|
- src="../../../static/images/member/bg.png"
|
|
|
- mode=""
|
|
|
- ></image>
|
|
|
- <view class="name">花落谁家</view>
|
|
|
- </view>
|
|
|
- <view class="footer-box">
|
|
|
- <view> 03-07 12:00 </view>
|
|
|
- <view>欠28755</view>
|
|
|
- </view>
|
|
|
- </view> -->
|
|
|
</view>
|
|
|
- <input
|
|
|
- disabled
|
|
|
- class="input-serach_box"
|
|
|
- v-model="searchUser"
|
|
|
+ <input
|
|
|
+ disabled
|
|
|
+ class="input-serach_box"
|
|
|
+ v-model="searchUser"
|
|
|
type="text"
|
|
|
@change="changSearch"
|
|
|
placeholder-class="input-placeholder"
|
|
|
placeholder="搜索客户"/>
|
|
|
<view class="keyboard-body_box">
|
|
|
-
|
|
|
+
|
|
|
<VKeyboard
|
|
|
ref="keyboard"
|
|
|
:pointIsShow="false"
|
|
|
@@ -75,14 +62,18 @@ export default {
|
|
|
this.activeKeyboard();
|
|
|
},
|
|
|
methods: {
|
|
|
+ selectUser(val){
|
|
|
+ this.$emit('selectUser',val)
|
|
|
+ },
|
|
|
changSearch(val){
|
|
|
this.init()
|
|
|
},
|
|
|
async init() {
|
|
|
try {
|
|
|
- let { data } = await customList({
|
|
|
- name: this.searchUser
|
|
|
- })
|
|
|
+ let { data:{list} } = await customList({
|
|
|
+ name: this.searchUser
|
|
|
+ })
|
|
|
+ this.list = list
|
|
|
}catch(err) {
|
|
|
|
|
|
}
|
|
|
@@ -92,17 +83,15 @@ export default {
|
|
|
this.$refs.keyboard.activate();
|
|
|
},
|
|
|
typing(e) {
|
|
|
- if(e.char === '确定') {
|
|
|
- return false
|
|
|
- }
|
|
|
- if (e.backspace) {
|
|
|
+ if (e.backspace) {
|
|
|
this.searchUser = this.searchUser.substring(0, this.searchUser.length - 1);
|
|
|
} else {
|
|
|
this.searchUser += e.char;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
enter() {
|
|
|
+ this.init()
|
|
|
//this.$refs.keyboard.deactivate();
|
|
|
},
|
|
|
},
|
|
|
@@ -124,8 +113,10 @@ export default {
|
|
|
& .app-userList_box {
|
|
|
padding: 5rpx;
|
|
|
display: flex;
|
|
|
- align-items: center;
|
|
|
+ // align-items: center;
|
|
|
flex-wrap: wrap;
|
|
|
+ min-height: 140rpx;
|
|
|
+ overflow-y: scroll;
|
|
|
& .userList-item_box {
|
|
|
margin: 0 5rpx 5rpx 0;
|
|
|
width: 130rpx;
|
|
|
@@ -159,7 +150,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
& .keyboard-body_box {
|
|
|
- flex: 1;
|
|
|
+ flex: 1;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
& .input-serach_box {
|
|
|
@@ -167,11 +158,11 @@ export default {
|
|
|
line-height: 28rpx;
|
|
|
text-align: center;
|
|
|
height: 28rpx;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
& .input-placeholder {
|
|
|
font-size: 18rpx!important;
|
|
|
- color: #333!important;
|
|
|
+ color: #333!important;
|
|
|
}
|
|
|
}
|
|
|
</style>
|