Commit 9e304a0dc2ffcf27387fee43d22342cea8c3bd76

Authored by 肖超群
1 parent ea22fb02

更新用户界面

ant-design-vue-jeecg/src/api/api.js
... ... @@ -213,6 +213,8 @@ export const handleDoubleIn = (params) => postAction('/task/taskHeader/handleDou
213 213 export const queryWarehouse = (params) => getAction("/config/sysUserWarehouse/queryWarehouse", params);
214 214 //查询所有仓库
215 215 export const getAllWarehouseList = (params) => getAction("/config/warehouse/getAllWarehouseList", params);
  216 +//查询所有库区
  217 +export const getAllZoneList = (params) => getAction("/config/zone/getAllZoneList", params);
216 218 // 中转HTTP请求
217 219 export const transitRESTful = {
218 220 get: (url, parameter) => getAction(getTransitURL(url), parameter),
... ...
ant-design-vue-jeecg/src/views/system/UserList.vue
... ... @@ -196,7 +196,7 @@
196 196 import UserModal from './modules/UserModal'
197 197 import PasswordModal from './modules/PasswordModal'
198 198 import {putAction, getFileAccessHttpUrl} from '@/api/manage';
199   -import {frozenBatch, getAllWarehouseList, queryall, getZoneList} from '@/api/api'
  199 +import {frozenBatch, getAllWarehouseList, queryall, getZoneList, getAllZoneList} from '@/api/api'
200 200 import {JeecgListMixin} from '@/mixins/JeecgListMixin'
201 201 import SysUserAgentModal from "./modules/SysUserAgentModal";
202 202 import JInput from '@/components/jeecg/JInput'
... ... @@ -290,16 +290,17 @@ export default {
290 290 title: '所属仓库',
291 291 align: "center",
292 292 dataIndex: 'selectedWarehouses',
293   - width: 300,
294 293 key: 'selectedWarehouses',
295   - scopedSlots: {customRender: 'selectedWarehouses'}
  294 + scopedSlots: {customRender: 'selectedWarehouses'},
  295 + width: 200
296 296 },
297 297 {
298 298 title: '所属库区',
299 299 align: "center",
300 300 dataIndex: 'zoneCodes',
301 301 key: 'zoneCodes',
302   - scopedSlots: {customRender: 'zoneCodes'}
  302 + scopedSlots: {customRender: 'zoneCodes'},
  303 + width: 200
303 304 },
304 305 // {
305 306 // title: '部门',
... ... @@ -352,7 +353,7 @@ export default {
352 353 },
353 354 methods: {
354 355 loadFrom() {
355   - getZoneList().then((res) => {
  356 + getAllZoneList().then((res) => {
356 357 if (res.success) {
357 358 this.zoneList = res.result
358 359 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/zone/controller/ZoneController.java
... ... @@ -186,9 +186,10 @@ public class ZoneController extends JeecgController<Zone, IZoneService> {
186 186 }
187 187  
188 188 @RequestMapping(value = "/getAllZoneList", method = RequestMethod.GET)
189   - public Result<List<Zone>> getAllZoneList() {
  189 + public Result<List<Zone>> getAllZoneList(HttpServletRequest req) {
  190 + String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
190 191 Result<List<Zone>> result = new Result<>();
191   - List<Zone> list = zoneService.getAllZoneList();
  192 + List<Zone> list = zoneService.getAllZoneList(warehouseCode);
192 193 result.setResult(list);
193 194 result.setSuccess(true);
194 195 return result;
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/zone/service/IZoneService.java
... ... @@ -16,5 +16,5 @@ public interface IZoneService extends IService&lt;Zone&gt; {
16 16  
17 17 Zone getZoneByCode(String zoneCode, String wareohuseCode);
18 18  
19   - public List<Zone> getAllZoneList();
  19 + List<Zone> getAllZoneList(String wareohuseCode);
20 20 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/zone/service/impl/ZoneServiceImpl.java
... ... @@ -29,7 +29,9 @@ public class ZoneServiceImpl extends ServiceImpl&lt;ZoneMapper, Zone&gt; implements IZ
29 29 }
30 30  
31 31 @Override
32   - public List<Zone> getAllZoneList() {
  32 + public List<Zone> getAllZoneList(String wareohuseCode) {
  33 + LambdaQueryWrapper<Zone> zoneLambdaQueryWrapper = Wrappers.lambdaQuery();
  34 + zoneLambdaQueryWrapper.eq(Zone::getWarehouseCode, wareohuseCode);
33 35 return list();
34 36 }
35 37 }
... ...