shish 2 лет назад
Родитель
Сommit
e563781894
2 измененных файлов с 24 добавлено и 13 удалено
  1. 23 12
      ghs/src/views/book/custom.vue
  2. 1 1
      ghs/src/views/order/book.vue

+ 23 - 12
ghs/src/views/book/custom.vue

@@ -16,6 +16,10 @@
 				{{ scope.row.name }}<span v-if="scope.row.seatSn!=0">({{ scope.row.seatSn }})</span>
 			</template>
 
+			<template #slot-option-area-list>
+        		<el-input v-model="search" placeholder="搜索客户" size="big" clearable="true" style="width:300px;" ref="customSearchRef" @input="changeSearch()" @focus="search=''"></el-input>
+			</template>
+
 		</x-crud>
 	</div>
 </template>
@@ -38,10 +42,25 @@ export default {
 			ghsInfoList: [],
 			loading: false,
 			ghsId:0,
-            endTime:''
+            endTime:'',
+			search:''
 		};
 	},
+	mounted() {
+		this.$nextTick(() => {
+			this.$refs.customSearchRef.focus()
+		})
+	},
 	methods: {
+		changeSearch(){
+			let that = this
+			if(this.T != null){
+				clearTimeout(this.T)
+			}
+			this.T = setTimeout(function(){
+				that.app.refresh({search:that.search})
+			},700)
+		},
 		goDetail(info){
 			let query = {customId:info.customId,customName:info.name}
 			this.$router.push({path:'/book/itemCustom',query})
@@ -98,21 +117,13 @@ export default {
 						layout: ['slot-column-option']
 					}
 				})
-				.set('dict', {
-					search: {
-						keyWord: 'name'
-					}
-				})
-				.set('search', {
-					key: { placeholder: '...' }
-				})
 				.set('layout', [
 					['slot-tabs'],
-					['data-table'],
-					['flex1']
+					['slot-option-area-list'],
+					['data-table']
 				])
 				.done();
-				app.refresh()
+				app.refresh({search:this.search})
 		}
 	}
 };

+ 1 - 1
ghs/src/views/order/book.vue

@@ -19,7 +19,7 @@
 			</template>
 
 			<template #slot-option-area-list>
-        <el-input v-model="search" placeholder="搜索花材" size="big" style="width:200px;" ref="itemSearchRef" @input="changeSearch()" @focus="search=''"></el-input>
+        <el-input v-model="search" placeholder="搜索花材" size="big" style="width:200px;" clearable="true" ref="itemSearchRef" @input="changeSearch()" @focus="search=''"></el-input>
 
         <el-popover style="margin-left:40px;" placement="top" width="160" ref="openCloseBookRef">
           <p>确认{{ shop.bookSn==0?'开启':'结束' }}?</p>