shish 1 год назад
Родитель
Сommit
dce2fa3ef3
1 измененных файлов с 14 добавлено и 21 удалено
  1. 14 21
      ghsPad/src/pages/home/components/customerList.vue

+ 14 - 21
ghsPad/src/pages/home/components/customerList.vue

@@ -2,36 +2,29 @@
   <view class="app-select_user">
     <view class="title">请选客户</view>
     <view class="app-userList_box">
-      <block v-for="(item,index) in list" :key="item.id">
-        
-            <view class="user-list-item_box" @click.stop="fastKd()" v-if="index == 12"
+      
+               
+            <view @click="confirmCustom(item)" class="user-list-item_box" v-for="(item,index) in list" :key="item.id">
+              <view class="head-box">
+                <view class="name">{{item.name}}</view>
+              </view>
+            </view>
+      
+
+            <view class="user-list-item_box" @click.stop="fastKd()"
             style="background-color:#3385FF;border:1upx solid #3385FF;text-align:center;">
               <view class="head-box">
                 <view class="name" style="color:white;font-size:15upx;font-weight:bold;">快捷开单</view>
               </view>
             </view>
         
-            <view class="user-list-item_box" @click.stop="cancelChoose()" v-else-if="index == 13"
+            <view class="user-list-item_box" @click.stop="cancelChoose()" 
             style="background-color:#a0a5ad;border:1upx solid #a0a5ad;text-align:center;">
               <view class="head-box">
                 <view class="name" style="color:white;font-size:15upx;font-weight:bold;">取消</view>
               </view>
             </view>
-        
-            <view @click="confirmCustom(item)" class="user-list-item_box" v-else>
-              <view class="head-box">
-                <view class="name">{{item.name}}</view>
-              </view>
-            </view>
-      </block>
-      <block v-if="list.length && list.length < 6">
-        <view class="user-list-item_box" @click.stop="fastKd()" 
-        style="background-color:#3385FF;border:1upx solid #3385FF;text-align:center;">
-          <view class="head-box">
-            <view class="name" style="color:white;font-size:15upx;font-weight:bold;">快捷开单</view>
-          </view>
-        </view>
-      </block>
+
     </view>
     <view style="position: relative;">
         <input class="input-serach_box" v-model="searchUser" type="text" :focus="focusInput" @focus="clearInput" @input="changSearch" placeholder-class="input-placeholder" placeholder="请输入客户名称"/>
@@ -96,8 +89,8 @@ export default {
     searchCustomer() {
       customList({ name: this.searchUser,isCashier:1 }).then(res=>{
         if(res.code == 1){
-          if(res.data.list.length > 14){
-            this.list = res.data.list.slice(0,14)
+          if(res.data.list.length > 12){
+            this.list = res.data.list.slice(0,12)
           }else{
             this.list = res.data.list
           }