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