emptyContainerDialog.vue
5.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<template>
<el-dialog
title="空托盘选取"
:visible.sync="visible"
:showcontainer="showcontainer"
width="800px"
append-to-body
@close="$emit('update:showcontainer', false)"
>
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="容器编码" prop="containerCode">
<el-input
v-model="queryParams.containerCode"
placeholder="请输入容器编码"
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="库位编码" prop="locationCode">
<el-input
v-model="queryParams.locationCode"
placeholder="请输入库位编码"
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="cyan"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="containerList">
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="120"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit-outline"
@click="handleSelect(scope.row)"
>选取</el-button
>
</template>
</el-table-column>
<el-table-column
label="库位编码"
align="center"
prop="code"
:show-overflow-tooltip="true"
/>
<el-table-column
label="容器编码"
align="center"
prop="containerCode"
:show-overflow-tooltip="true"
/>
<el-table-column label="仓库编码" align="center" prop="warehouseCode" />
<el-table-column label="行" align="center" prop="iRow" width="55" />
<el-table-column label="列" align="center" prop="iColumn" width="55" />
<el-table-column label="层" align="center" prop="iLayer" width="55" />
<el-table-column label="格" align="center" prop="iGrid" width="55" />
<el-table-column
label="库位类型"
align="center"
prop="locationType"
width="80"
/>
<el-table-column label="库区" align="center" prop="zoneCode" width="60" />
<el-table-column label="状态" align="center" prop="status" width="60" />
<el-table-column
label="创建时间"
align="center"
prop="created"
width="160"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.created) }}</span>
</template>
</el-table-column>
<el-table-column
label="创建用户"
align="center"
prop="createdBy"
:show-overflow-tooltip="true"
/>
<el-table-column
label="更新时间"
align="center"
prop="lastUpdated"
width="160"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.lastUpdated) }}</span>
</template>
</el-table-column>
<el-table-column
label="更新用户"
align="center"
prop="lastUpdatedBy"
:show-overflow-tooltip="true"
/>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-dialog>
</template>
<script>
import { listEmptyContainer } from "@/api/inventory/inventoryHeader/header";
export default {
props: {
showcontainer: {
type: Boolean,
default: false,
},
},
data() {
return {
visible: this.showcontainer,
loading: true,
showSearch: true,
total: 0,
queryParams: {
pageNum: 1,
pageSize: 10,
containerCode: undefined,
locationCode: undefined,
},
containerList: [],
};
},
watch: {
showcontainer() {
this.visible = this.showcontainer;
},
},
created() {
this.getList();
},
methods: {
getList() {
this.loading = true;
listEmptyContainer(this.queryParams).then((response) => {
this.containerList = response.rows;
this.total = response.total;
this.loading = false;
});
},
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
handleSelect(row) {
this.visible = false;
this.$emit("passValue", row.code, row.containerCode);
},
},
};
</script>