Commit 0fabb89f authored by chenzj's avatar chenzj

生产报工人员选择框加筛选

parent ef2e8f0f
<template>
<view class="dmodel-table">
<view class="search">
<u-search :showAction="false" v-model="userName" inputAlign="center" placeholder="请输入编号" ></u-search>
<u-search :showAction="false" v-model="nickName" inputAlign="center" placeholder="请输入名称" ></u-search>
<u-button type="primary" @click="getList" size="medium">搜索</u-button>
</view>
<zb-table ref="zbTable" rowKey="recordId"
:columns="tableColumn" :data="tableData" :stripe="true" @toggleAllSelection="toggl
eAllSelection"
:columns="tableColumn" :data="tableData" :stripe="true" @toggleAllSelection="toggleAllSelection"
@toggleRowSelection="toggleRowSelection">
</zb-table>
</view>
......@@ -20,20 +24,22 @@
return {
tableData: [],
tableSelectData: [],
userName: null,
nickName: null,
tableColumn: [{
type: 'selection',
width: 35
},
{
name: 'nickName',
label: '名称',
width: 200,
},
{
name: 'userName',
label: '编号',
width: 160,
},
{
name: 'nickName',
label: '名称',
width: 200,
},
{
name: 'workstationName',
......@@ -57,6 +63,7 @@
// this.data.workstationName
},
methods: {
rowClick(row, index) {
console.log(this.$refs.zbTable)
this.$refs.zbTable.checkboxSelectedAll({checked: false})
......@@ -84,11 +91,17 @@
},
async getList() {
const params = {
let params = {
pageNum: 1,
pageSize: 10,
workstationId: this.data.workstationId
}
if (this.userName) {
params.userName = this.userName
}
if (this.nickName) {
params.nickName = this.nickName
}
const res = await this.$u.api.userQuery(params)
console.log(res, 'res')
if (res.code == 200) {
......@@ -117,4 +130,13 @@
margin-top: 20rpx;
padding: 0 20rpx;
}
.search{
display: flex;
margin-bottom:20rpx;
align-items: center;
.u-search{
width: 400rpx !important;
margin-right:20rpx !important;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment