Browse Source

add:货位管理增加筛选条件

master
刘先源 3 weeks ago
parent
commit
23829b1cc6
  1. 4
      acs2/nladmin-system/src/main/java/org/nl/acs/device/service/impl/StorageCellServiceImpl.java
  2. 17
      acs2/nladmin-ui/src/views/acs/device/storageCell/index.vue

4
acs2/nladmin-system/src/main/java/org/nl/acs/device/service/impl/StorageCellServiceImpl.java

@ -47,10 +47,14 @@ public class StorageCellServiceImpl implements StorageCellService {
@Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
String storage_code = MapUtil.getStr(whereJson, "storage_code");
String region_code = MapUtil.getStr(whereJson, "region_code");
String where = "";
if (StrUtil.isNotEmpty(storage_code)) {
where = " and storage_code like '%" + storage_code + "%'";
}
if (StrUtil.isNotEmpty(region_code)) {
where = " and region_code = '" + region_code + "'";
}
WQLObject wo = WQLObject.getWQLObject("acs_storage_cell");
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "1 = 1 " + where, "update_time desc");
final JSONObject json = rb.pageResult();

17
acs2/nladmin-ui/src/views/acs/device/storageCell/index.vue

@ -12,6 +12,18 @@
style="width: 200px;"
class="filter-item"
/>
<el-select
v-model="query.region_code"
clearable
filterable
size="small"
placeholder="区域"
class="filter-item"
style="width: 190px"
@change="crud.toQuery"
>
<el-option v-for="item in dict.point_region" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
<rrOperation />
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
@ -60,6 +72,7 @@
<el-table-column prop="create_by" label="创建者" />
<el-table-column prop="create_time" label="创建时间" />
<el-table-column prop="parent_storage_code" label="父级系统编码" />
<el-table-column prop="region_code" label="区域" :formatter="formatRegion"/>
<el-table-column v-permission="['admin','storageCell:edit','storageCell:del']" label="操作" width="150px" align="center">
<template slot-scope="scope">
<udOperation
@ -88,6 +101,7 @@ export default {
name: 'StorageCell',
components: { pagination, crudOperation, udOperation, rrOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
dicts: ['point_region'],
cruds() {
return CRUD({ title: '库位管理', url: 'api/storageCell', idField: 'storage_id', sort: 'storage_id,desc', crudMethod: { ...crudStorageCell }})
},
@ -136,6 +150,9 @@ export default {
// false
[CRUD.HOOK.beforeRefresh]() {
return true
},
formatRegion(row) {
return this.dict.label.point_region[row.region_code]
}
}
}

Loading…
Cancel
Save