优化
This commit is contained in:
parent
1e061b101b
commit
e33bda2f9a
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-select ref="otherSelected" v-model="otherSelected" clearable @blur="$emit('input-blur', $event)">
|
||||
<el-select ref="otherSelected" v-model="otherSelected" clearable filterable :filter-method="searchByName" @blur="$emit('input-blur', $event)">
|
||||
<el-option v-for="other in otherList" :key="other.id" :label="other.name" :value="other.id" v-show="false"/>
|
||||
<el-table v-loading="loading" :data="otherList" :stripe="true" :show-overflow-tooltip="true" @row-click="rowClick">
|
||||
<el-table-column label="序号" align="center">
|
||||
@ -8,20 +8,21 @@
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="180"
|
||||
align="right">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
size="mini"
|
||||
@keyup.enter.native="getPage"
|
||||
placeholder="输入关键字搜索"/>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.name}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" prop="name" width="180"/>
|
||||
<!-- <el-table-column-->
|
||||
<!-- width="180"-->
|
||||
<!-- align="right">-->
|
||||
<!-- <template slot="header" slot-scope="scope">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.name"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @keyup.enter.native="getPage"-->
|
||||
<!-- placeholder="输入关键字搜索"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{scope.row.name}}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="价格" prop="price" :show-overflow-tooltip="true" width="180"/>
|
||||
</el-table>
|
||||
<pagination @pagination="getPage" v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@ -71,6 +72,10 @@ export default {
|
||||
rowClick(row){
|
||||
this.$emit("selected", row)
|
||||
this.$refs.otherSelected.blur()
|
||||
},
|
||||
async searchByName(val){
|
||||
this.queryParams.name = val
|
||||
await this.getPage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-select ref="projectSelect" v-model="projectSelected" clearable @blur="$emit('input-blur', $event)">
|
||||
<el-select ref="projectSelect" v-model="projectSelected" clearable filterable :filter-method="searchByName" @blur="$emit('input-blur', $event)">
|
||||
<el-option v-for="project in projectList" :key="project.id" :label="project.name" :value="project.id" v-show="false"/>
|
||||
<el-table v-loading="loading" :data="projectList" :stripe="true" :show-overflow-tooltip="true" @row-click="rowClick">
|
||||
<el-table-column label="序号" align="center">
|
||||
@ -8,21 +8,21 @@
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="商品名称" prop="name" :show-overflow-tooltip="true" width="180" />-->
|
||||
<el-table-column
|
||||
width="180"
|
||||
align="right">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
size="mini"
|
||||
@keyup.enter.native="listPage"
|
||||
placeholder="输入关键字搜索"/>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.name}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" prop="name" :show-overflow-tooltip="true" width="180" />
|
||||
<!-- <el-table-column-->
|
||||
<!-- width="180"-->
|
||||
<!-- align="right">-->
|
||||
<!-- <template slot="header" slot-scope="scope">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.name"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @keyup.enter.native="listPage"-->
|
||||
<!-- placeholder="输入关键字搜索"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{scope.row.name}}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="规格" prop="spec" :show-overflow-tooltip="true" width="180"/>
|
||||
<el-table-column label="商品编码" prop="code" :show-overflow-tooltip="true" width="180"/>
|
||||
</el-table>
|
||||
@ -73,6 +73,10 @@ export default {
|
||||
rowClick(row){
|
||||
this.$emit("selected", row)
|
||||
this.$refs.projectSelect.blur()
|
||||
},
|
||||
async searchByName(val){
|
||||
this.queryParams.name = val
|
||||
await this.listPage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-select ref="ticketSelect" v-model="ticketSelected" clearable>
|
||||
<el-select ref="ticketSelect" v-model="ticketSelected" clearable filterable :filter-method="searchByNo">
|
||||
<el-option v-for="ticket in ticketList" :key="ticket.id" :label="ticket.ticketNo" :value="ticket.id" v-show="false"/>
|
||||
<el-table v-loading="loading" :data="ticketList" :stripe="true" :show-overflow-tooltip="true" @row-click="rowClick">
|
||||
<el-table-column label="序号" align="center">
|
||||
@ -38,7 +38,8 @@ export default {
|
||||
queryParams:{
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
ticketsStatus: "01"
|
||||
ticketsStatus: "01",
|
||||
ticketNo: null
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -61,6 +62,10 @@ export default {
|
||||
this.ticketSelected = row.id
|
||||
this.$emit("selected", row.id)
|
||||
this.$refs.ticketSelect.blur()
|
||||
},
|
||||
async searchByNo(val){
|
||||
this.queryParams.ticketNo = val
|
||||
await this.listTicket()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user