<template>
	<el-container>
		<el-header>
			<div class="left-panel">
				<el-input v-model="search.keyword" placeholder="关键词" style="width:150px; margin-right: 10px;" clearable></el-input>
				<el-input v-model="search.name" placeholder="申请人" style="width:150px; margin-right: 10px;" clearable />
				<el-input v-model="search.mobile" placeholder="手机号码" style="width:150px; margin-right: 10px;" clearable />
				<el-button-group style="margin-left: 10px;">
					<el-button type="primary" icon="el-icon-search" @click="upsearch">搜索</el-button>
				</el-button-group>
			</div>

		</el-header>
		<el-main class="nopadding">
			<scTable tableName="member" ref="table" :apiObj="list.apiObj" :column="list.column" row-key="id" @selection-change="selectionChange" border stripe>
				<el-table-column type="selection" width="50"></el-table-column>
				
				<el-table-column label="操作" fixed="right" align="center" width="140">
					
				</el-table-column>
			</scTable>
		</el-main>
	</el-container>
</template>

<script>

export default{
	name: 'order.exchange',
	components:{

	},
	data(){
		return {
			dialog: {search: false, import: false, print: false},
			list: {
				apiObj: this.$API.order.exchange.list,
				column: [
					{prop: 'id', label: 'ID', width: 80},
					{prop: 'name', label: '置换申请人', width: 120},
					{prop: 'mobile', label: '手机号', width: 120},
					{prop: 'address', label: '地址'},
					{prop: 'remark', label: '行业备注'},
					{prop: 'status', label: '状态', width: 120},
					{prop: 'created_at', label: '添加时间', width: 140},
				],
			},
			selection: [],
			search: {},
		}
	},
	methods:{
		upsearch(){
			this.$refs.table.reload(this.search);
		},
		moreUpsearch(search){
			this.search = search;
			this.upsearch();
		},
		moreSearch(){
			this.dialog.search = true
			this.$nextTick(() => {
				this.$refs.searchBox.open().setData(this.search)
			})
		},
		//表格选择后回调事件
		selectionChange(selection){
			this.selection = selection;
		}
	}
}
</script>
