Merge remote-tracking branch 'origin/phyzwms2' into phyzwms2
| | |
| | | return R.error("当前操作已被阻止,请联系管理员"); |
| | | } |
| | | int br = 0; |
| | | if (locMast.getLocSts() == "O" || locMast.getLocSts() == "X"){ |
| | | switch (locMast.getBarcode().substring(0,2)) { |
| | | case "10": |
| | | br = 1; |
| | |
| | | if (oldLocMast.getLocType1() != br) { |
| | | return R.error("货架和库位类型不匹配!"); |
| | | } |
| | | } |
| | | Date now = new Date(); |
| | | // 有物料时修改为空库位或者空板库位,则删除库存明细 |
| | | if (oldLocMast.getLocSts().equals("R") || oldLocMast.getLocSts().equals("F") || oldLocMast.getLocSts().equals("S")) { |
| | |
| | | /* |
| | | 查询库存 入库订单与销售单号 |
| | | */ |
| | | @PostMapping("/query/locDetl/v3") |
| | | public R queryAgvLocDetl3(@RequestBody HashMap<String,String> params){ |
| | | |
| | | String orderNo = params.get("orderNo"); |
| | | String threeCode = params.get("threeCode"); |
| | | String matnr = params.get("matnr"); |
| | | String floor = params.get("floor"); |
| | | |
| | | Wrapper<AgvLocDetl> wrapper = new EntityWrapper<AgvLocDetl>().eq("matnr", matnr).ne("process_sts",1); |
| | | |
| | | |
| | | // wrapper.eq("orderNo",orderNo); |
| | | |
| | | wrapper = Cools.isEmpty(threeCode) ? wrapper.isNull("three_code") : wrapper.eq("three_code",threeCode); |
| | | |
| | | if (threeCode.substring(0,2).equals(30)) { |
| | | wrapper.isNull("specs").or().eq("specs","").eq("floor",1); |
| | | } |
| | | List<AgvLocDetl> agvLocDetls = agvLocDetlService.selectList(wrapper); |
| | | List<AgvLocDetl> locDetls = new ArrayList<>(); |
| | | for (AgvLocDetl agvLocDetl : agvLocDetls) { |
| | | AgvLocMast agvLocMast = new AgvLocMast(); |
| | | if (Cools.isEmpty(floor)) { |
| | | agvLocMast = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_no", agvLocDetl.getLocNo()).notLike("loc_no","F1")); |
| | | } else { |
| | | agvLocMast = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_no", agvLocDetl.getLocNo()).like("loc_no",floor)); |
| | | } |
| | | |
| | | if (Cools.isEmpty(agvLocMast)) continue; |
| | | agvLocDetl.setLocSts(agvLocMast.getLocSts()); |
| | | agvLocDetl.setLocSts$(agvLocMast.getLocSts$()); |
| | | locDetls.add(agvLocDetl); |
| | | } |
| | | |
| | | |
| | | return R.ok(locDetls); |
| | | } |
| | | |
| | | /* |
| | | 查询库存 入库订单与销售单号 |
| | | */ |
| | | @PostMapping("/query/locDetl/v2") |
| | | public R queryAgvLocDetl2(@RequestBody HashMap<String,String> params){ |
| | | |
| | |
| | | throw new CoolException("保存工作明细失败"); |
| | | } |
| | | // 更新订单 |
| | | OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("order_no", "DB" + agvLocDetl.getOrderNo()).eq("matnr", agvLocDetl.getMatnr()).eq("three_code",agvLocDetl.getThreeCode())); |
| | | OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("source",33).eq("matnr", agvLocDetl.getMatnr()).eq("three_code",agvLocDetl.getThreeCode())); |
| | | orderDetl.setQty(orderDetl.getQty() + agvLocDetl.getAnfme()); |
| | | if (!orderDetlService.update(orderDetl,new EntityWrapper<OrderDetl>().eq("order_no","DB" + agvLocDetl.getOrderNo()).eq("matnr", agvLocDetl.getMatnr()).eq("three_code",agvLocDetl.getThreeCode()))){ |
| | | if (!orderDetlService.update(orderDetl,new EntityWrapper<OrderDetl>().eq("source",33).eq("matnr", agvLocDetl.getMatnr()).eq("three_code",agvLocDetl.getThreeCode()))){ |
| | | throw new CoolException("修改订单明细失败,请联系管理员"+agvLocDetl.getOrderNo()+agvLocDetl.getMatnr()); |
| | | } |
| | | } |
| | | // 更新源库位 |
| | | AgvLocMast locMast = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_no", locNo)); |
| | | locMast.setLocSts("R"); |
| | | agvLocMastService.updateById(locMast); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/agv/v3/locMove") |
| | | @Transactional |
| | | @ManagerAuth(memo = "回调单任务下发") |
| | | @Synchronized |
| | | public R agvLocMove3(@RequestBody HashMap<String,Object> params){ |
| | | Date now = new Date(); |
| | | List<HashMap<String,String>> dbList = (List<HashMap<String, String>>) params.get("dbList"); |
| | | params.get("dbList"); |
| | | for (HashMap<String, String> map : dbList) { |
| | | String locNo = map.get("locNo"); |
| | | String barcode = map.get("suppCode"); |
| | | AgvWrkMast source_loc_no = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("source_loc_no", locNo)); |
| | | if (!Cools.isEmpty(source_loc_no)) { |
| | | throw new CoolException("当前库位已生成任务!"); |
| | | } |
| | | AgvLocMast locMastS = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_no", locNo).eq("loc_sts","F")); |
| | | if (Cools.isEmpty(locMastS)) { |
| | | throw new CoolException("当前库位非在库状态!库位号="+locNo); |
| | | } |
| | | AgvWrkMast wrkMast = createWrkMast(114, 22L, locNo, "", barcode, now, getUserId(), 30,1); |
| | | // 同步调拨单 |
| | | List<AgvLocDetl> agvLocDetls = agvLocDetlService.selectList(new EntityWrapper<AgvLocDetl>().eq("loc_no", locNo)); |
| | | for (AgvLocDetl agvLocDetl : agvLocDetls) { |
| | | AgvWrkDetl wrkDetl = new AgvWrkDetl(); |
| | | wrkDetl.setWrkNo(wrkMast.getWrkNo()); |
| | | wrkDetl.sync(agvLocDetl); |
| | | wrkDetl.setSuppCode(agvLocDetl.getSuppCode()); |
| | | wrkDetl.setIoTime(now); |
| | | wrkDetl.setAppeUser(getUserId()); |
| | | wrkDetl.setAppeTime(now); |
| | | wrkDetl.setModiUser(getUserId()); |
| | | wrkDetl.setModiTime(now); |
| | | if (!agvWrkDetlService.insert(wrkDetl)) { |
| | | throw new CoolException("保存工作明细失败"); |
| | | } |
| | | // 更新订单 |
| | | // 先查询库订单明细 所属的订单 |
| | | |
| | | OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("source",36).eq("matnr", agvLocDetl.getMatnr()).eq("three_code",agvLocDetl.getThreeCode())); |
| | | orderDetl.setQty(orderDetl.getQty() + agvLocDetl.getAnfme()); |
| | | if (!orderDetlService.update(orderDetl,new EntityWrapper<OrderDetl>().eq("source",36).eq("matnr", agvLocDetl.getMatnr()).eq("three_code",agvLocDetl.getThreeCode()))){ |
| | | throw new CoolException("修改订单明细失败,请联系管理员"+agvLocDetl.getOrderNo()+agvLocDetl.getMatnr()); |
| | | } |
| | | } |
| | |
| | | } |
| | | return R.ok(page); |
| | | } |
| | | @RequestMapping(value = "/order/backStocks/detls/pakin/page/auth") |
| | | @ManagerAuth |
| | | public R backStocksOrderDetls(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "100")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<OrderDetl> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | // return R.ok(orderDetlService.getPakoutPage(toPage(curr, limit, param, OrderDetl.class))); |
| | | List<DocType> pakins = docTypeService.selectList(new EntityWrapper<DocType>().eq("pakout", 1)); |
| | | List<Long> docIds = new ArrayList<>(); |
| | | for (DocType pakin : pakins) { |
| | | if (pakin.getDocId() == 36) { |
| | | docIds.add(pakin.getDocId()); |
| | | } |
| | | } |
| | | wrapper.in("source",docIds); |
| | | Page<OrderDetl> page = orderDetlService.selectPage(new Page<>(curr, limit), wrapper); |
| | | for (OrderDetl record : page.getRecords()) { |
| | | Double sumAnfme = agvLocDetlService.getSumAnfmeback(record.getMatnr(), record.getThreeCode(),1); |
| | | record.setStock(sumAnfme == null ? 0 : sumAnfme); |
| | | } |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @RequestMapping(value = "/order/detl/all/auth") |
| | | @ManagerAuth |
| | |
| | | list.add(dto); |
| | | orderDetl.setOrderId(order.getId()); |
| | | orderDetl.setOrderNo(order.getOrderNo()); |
| | | orderDetl.setSource(param.getDocType().intValue()); |
| | | orderDetl.setCreateBy(getUserId()); |
| | | orderDetl.setCreateTime(now); |
| | | orderDetl.setUpdateBy(getUserId()); |
| | |
| | | orderDetl2.setDeadTime(isocode); |
| | | orderDetl2.setStatus(1); |
| | | orderDetl2.setQty(0.0D); |
| | | orderDetl2.setProcessSts(proSts); |
| | | if (!orderDetlService.insert(orderDetl2)) { |
| | | throw new CoolException("生成单据明细失败,请重新导入!"); |
| | | } |
| | |
| | | orderDetl3.setDeadTime(isocode); |
| | | orderDetl3.setStatus(1); |
| | | orderDetl3.setQty(0.0D); |
| | | orderDetl3.setProcessSts(proSts); |
| | | if (!orderDetlService.insert(orderDetl3)) { |
| | | throw new CoolException("生成单据明细失败,请重新导入!"); |
| | | } |
| | |
| | | @Select("select sum(a.anfme) as sum from agv_loc_detl a left join agv_loc_mast b on a.loc_no = b.loc_no where (b.loc_sts = 'F' or b.loc_sts = 'R') and b.floor = #{floor} and a.matnr = #{matnr} AND a.three_code = #{threeCode} AND a.process_sts != 1") |
| | | Double selectSumAnfmeByMatnr2(@Param("matnr") String matnr,@Param("threeCode") String threeCode,@Param("floor") Integer floor); |
| | | |
| | | @Select("select sum(a.anfme) as sum from agv_loc_detl a left join agv_loc_mast b on a.loc_no = b.loc_no where (b.loc_sts = 'F' or b.loc_sts = 'R') and b.floor != #{floor} and a.matnr = #{matnr} AND a.three_code = #{threeCode} AND a.process_sts != 1") |
| | | Double getSumAnfmeback(@Param("matnr") String matnr,@Param("threeCode") String threeCode,@Param("floor") Integer floor); |
| | | |
| | | @Select("SELECT SUM(anfme) FROM agv_loc_detl") |
| | | Integer sum(); |
| | | |
| | |
| | | |
| | | Double getSumAnfmeDb(String matnr, String threeCode, Integer floor); |
| | | |
| | | Double getSumAnfmeback(String matnr, String threeCode, Integer floor); |
| | | |
| | | Integer sum(); |
| | | |
| | | List<AgvLocDetl> getStockStatisExcel(); |
| | |
| | | return this.baseMapper.selectSumAnfmeByMatnr2(matnr, threeCode, floor); |
| | | } |
| | | |
| | | @Override |
| | | public Double getSumAnfmeback(String matnr, String threeCode,Integer floor) { |
| | | return this.baseMapper.getSumAnfmeback(matnr, threeCode, floor); |
| | | } |
| | | |
| | | /* |
| | | 获取库存总数 |
| | | */ |
| | |
| | | //检索库位,选择合适的库位 |
| | | AgvLocMast agvLocMast = new AgvLocMast(); |
| | | |
| | | //查询库存 |
| | | AgvLocMast locMast = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("barcode", containerCode)); |
| | | if (!Cools.isEmpty(locMast)) { |
| | | throw new CoolException("当前货架已在库存中,无法进行入库"); |
| | | } |
| | | |
| | | //查询入库通知档 |
| | | List<AgvWaitPakin> agvWaitPakinList = agvWaitPakinService.selectByContainerCode(containerCode); |
| | |
| | | //更新源站点状态 |
| | | updateAgvBasDevp(agvBasDevp,"R",containerType); |
| | | }else { |
| | | //查询工作档 |
| | | AgvWrkMast agvWrkMast1 = agvWrkMastService.selectByContainerCode(containerCode); |
| | | if (!Cools.isEmpty(agvWrkMast1)) { |
| | | throw new CoolException("当前货架已有入库任务,无法进行入库"); |
| | | } |
| | | agvLocMast = agvCommonService.getLocNo(locType,agvBasDevp.getFloor(),true,true); |
| | | // 生成工作档 10.空板入库 |
| | | createWrkMast(10,201L,agvBasDevp.getDevNo(),agvLocMast.getLocNo(),containerCode,now,userId,containerType); |
| | |
| | | switch (agvWrkMast.getIoType()) { |
| | | case 108: |
| | | case 12: |
| | | case 57: |
| | | agvTaskCreateParam.setTaskTyp("F06"); |
| | | break; |
| | | case 109: |
| | |
| | | } |
| | | break; |
| | | case 1: |
| | | case 57: |
| | | // 入库任务是只有 接驳位 -- > 库位 |
| | | AgvLocMast loc = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_no", agvWrkMast.getLocNo())); |
| | | String locSub = loc.getLocNo().substring(loc.getLocNo().length() - 4).substring(0, 2).substring(0, 2); |
| | | AgvBasDevp agvBasDevp = agvBasDevpService.selectByDevNo(agvWrkMast.getSourceLocNo()); |
| | | if ("02".equals(locSub)) { |
| | | if (agvBasDevp.getFloor() == 4) { |
| | | agvTaskCreateParam.setTaskTyp("F01"); |
| | | } else { |
| | | agvTaskCreateParam.setTaskTyp("F06"); |
| | | } |
| | | |
| | | } else { |
| | | // 目标楼层位1楼 但源库位(接驳位)在吸塑二楼 |
| | | if (agvBasDevp.getFloor() == 4) { |
| | | agvTaskCreateParam.setTaskTyp("F06"); |
| | | } else { |
| | | agvTaskCreateParam.setTaskTyp("F01"); |
| | | } |
| | | |
| | | |
| | | } |
| | | break; |
| | | default: |
| | | agvTaskCreateParam.setTaskTyp("F01"); |
| | |
| | | .or().eq("io_type",111) |
| | | .or().eq("io_type",112) |
| | | .or().eq("io_type",113) |
| | | .or().eq("io_type",114) |
| | | .or().eq("io_type",121) |
| | | ); |
| | | if(!Cools.isEmpty(agvWrkMastList)){ |
| | |
| | | * ioType 108.自动调拨 |
| | | * crnNo :2目标楼层 |
| | | */ |
| | | @Scheduled(cron = "0/2 * * * * ? ") |
| | | private void execute2(){ |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private synchronized void execute2(){ |
| | | List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>() |
| | | .eq("wrk_sts", 22) |
| | | .andNew().eq("io_type",108) |
| | |
| | | |
| | | } |
| | | |
| | | @Scheduled(cron = "0/2 * * * * ? ") |
| | | private void execute4(){ |
| | | List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>() |
| | | .eq("wrk_sts", 22) |
| | | .andNew().eq("io_type",114) |
| | | .orderBy("io_pri",false) |
| | | .orderBy("appe_time",true) |
| | | ); |
| | | if (agvWrkMastList.isEmpty()) { |
| | | return; |
| | | } |
| | | for (AgvWrkMast agvWrkMast : agvWrkMastList) { |
| | | try{ |
| | | autoMoveHandler.start4(agvWrkMast); |
| | | } catch (Exception e){ |
| | | log.error("工作号"+agvWrkMast.getWrkNo()+"调拨出库,处理失败:===》异常原因:"+e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // // 空板自动回库 库位-接驳点 |
| | | // //@Scheduled(cron = "0/2 * * * * ? ") |
| | | // private void autoEmptyBack(){ |
| | |
| | | agvBasDevpService.updateLocStsAndBarcodeByDevNo(agvWrkMast.getSourceLocNo(),"O","",agvWrkMast.getWhsType().shortValue()); |
| | | break; |
| | | case 108: |
| | | case 114: |
| | | agvLocMastService.updateLocStsByLocNo(agvWrkMast.getLocNo(),"F",agvWrkMast.getBarcode(),agvWrkMast.getWhsType().shortValue()); |
| | | //更新库存明细 |
| | | agvLocDetlService.updateStock(agvWrkMast.getSourceLocNo(),agvWrkMast.getLocNo()); |
| | |
| | | doHandMove2(agvWrkMast); |
| | | return SUCCESS; |
| | | } |
| | | |
| | | public ReturnT<String> start4(AgvWrkMast agvWrkMast) { |
| | | // locType 1. 自动, 2. 手动 |
| | | doAutoMove3(agvWrkMast); |
| | | return SUCCESS; |
| | | } |
| | | //根据库位的loctype值发送任务--弃用 |
| | | private ReturnT<String> doAutoMove(AgvLocMast agvLocMast) { |
| | | Date now = new Date(); |
| | |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException("暂无库位"); |
| | | } |
| | | AgvWrkMast workingMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("loc_no", locMast.getLocNo())); |
| | | if (!Cools.isEmpty(workingMast)) { |
| | | throw new CoolException("当前库位正在进行入库,进行下一次轮询"); |
| | | } |
| | | agvWrkMast.setWrkSts(201L); |
| | | agvWrkMast.setLocNo(locMast.getLocNo()); |
| | | agvWrkMastService.updateById(agvWrkMast); |
| | | //更新目标库位状态 |
| | | updateAgvLocMast(locMast,"S"); |
| | | AgvLocMast locMast1 = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_no", locMast.getLocNo())); |
| | | log.info("自动调拨任务 ==> 源库位:{},目标库位:{},库位状态{}",agvWrkMast.getSourceLocNo(),agvWrkMast.getLocNo(),locMast1.getLocSts()); |
| | | |
| | | return SUCCESS; |
| | | } |
| | | |
| | | private ReturnT<String> doAutoMove3(AgvWrkMast agvWrkMast) { |
| | | Date now = new Date(); |
| | | //检索库位,选择合适的库位 |
| | | AgvLocMast locMast = agvCommonService.getLocNo(3,agvWrkMast.getCrnNo(),false,false); |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException("暂无库位"); |
| | | } |
| | | agvWrkMast.setWrkSts(201L); |
| | | agvWrkMast.setLocNo(locMast.getLocNo()); |
| | | agvWrkMast.setLogErrMemo("start2-doAutoMove2"); |
| | |
| | | |
| | | return SUCCESS; |
| | | } |
| | | |
| | | private ReturnT<String> doHandMove2(AgvWrkMast agvWrkMast) { |
| | | Date now = new Date(); |
| | | String lev1 = agvWrkMast.getSourceLocNo().substring(agvWrkMast.getSourceLocNo().length() - 4).substring(0, 2); |
| | |
| | | if ("01".equals(lev1)) { |
| | | devpNo = agvCommonService.getDevpNo(3, 1, "Y", "Y"); |
| | | } else { |
| | | devpNo = agvCommonService.getDevpNo(3, 5, "Y", "Y"); |
| | | devpNo = agvCommonService.getDevpNo(3, 4, "Y", "Y"); |
| | | } |
| | | |
| | | if (Cools.isEmpty(devpNo)) { |
| | |
| | | // generator.table="sys_host"; |
| | | // sqlserver |
| | | generator.sqlOsType = SqlOsType.SQL_SERVER; |
| | | generator.url="192.168.4.15:1433;databasename=phyzasrs"; |
| | | generator.url="127.0.0.1:1433;databasename=phyzasrs"; |
| | | generator.username="sa"; |
| | | generator.password="sa@123"; |
| | | generator.table="agv_wrk_mast_execute_log"; |
| | | generator.packagePath="com.zy.asrs"; |
| | | generator.table="sys_role_pda_resource"; |
| | | generator.packagePath="com.zy.system"; |
| | | generator.sql = false; |
| | | generator.build(); |
| | | } |
| | |
| | | Boolean orderBy = false; |
| | | int levCount = 0; |
| | | int times = 1; |
| | | if (floor == 1) { |
| | | if (floor == 1 || floor >= 4) { |
| | | if (floor >= 4 ) { |
| | | floor = 1; |
| | | } |
| | | orderBy = true; |
| | | levCount = 2; |
| | | } else { |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * Created by vincent on 2019-07-30 |
| | |
| | | @Autowired |
| | | private ResourceService resourceService; |
| | | @Autowired |
| | | private PdaResourceService pdaResourceService; |
| | | @Autowired |
| | | private RoleResourceService roleResourceService; |
| | | @Autowired |
| | | private PermissionService permissionService; |
| | | @Autowired |
| | | private RolePermissionService rolePermissionService; |
| | | @Autowired |
| | | private RolePdaResourceService rolePdaResourceService; |
| | | |
| | | @RequestMapping("/login.action") |
| | | @ManagerAuth(value = ManagerAuth.Auth.NONE, memo = "登录") |
| | |
| | | |
| | | // 功能模块 |
| | | Map<String, Object> functions = new HashMap<>(); |
| | | functions.put("title", "指定功能"); |
| | | functions.put("title", "pda功能"); |
| | | functions.put("id", "function"); |
| | | functions.put("spread", true); |
| | | List<Map> funcs = new ArrayList<>(); |
| | | functions.put("children", funcs); |
| | | List<Permission> permissions = permissionService.selectList(new EntityWrapper<Permission>().eq("status", 1)); |
| | | for (Permission permission : permissions) { |
| | | Map<String, Object> func = new HashMap<>(); |
| | | func.put("title", permission.getName()); |
| | | func.put("id", permission.getAction()); |
| | | func.put("spread", true); |
| | | funcs.add(func); |
| | | List<PdaResource> oneLevs = pdaResourceService.selectList(new EntityWrapper<PdaResource>().eq("level", 1).eq("status", 1).orderBy("sort")); |
| | | // 一级 |
| | | for (PdaResource oneLev : oneLevs) { |
| | | List<Map> twoLevelsList = new ArrayList<>(); |
| | | Map<String, Object> oneLevelMap = new HashMap<>(); |
| | | oneLevelMap.put("title", oneLev.getName()); |
| | | oneLevelMap.put("id", oneLev.getId()); |
| | | oneLevelMap.put("spread", true); |
| | | oneLevelMap.put("checked", false); |
| | | oneLevelMap.put("children", twoLevelsList); |
| | | |
| | | List<PdaResource> twoLevels = pdaResourceService.selectList(new EntityWrapper<PdaResource>().eq("resource_id", oneLev.getId()).eq("level", 2).eq("status", 1).orderBy("sort")); |
| | | // 二级 |
| | | for (PdaResource twoLevel : twoLevels){ |
| | | Map<String, Object> twoLevelMap = new HashMap<>(); |
| | | twoLevelMap.put("title", twoLevel.getName()); |
| | | twoLevelMap.put("id", twoLevel.getId()); |
| | | twoLevelMap.put("spread", false); |
| | | twoLevelMap.put("checked", false); |
| | | List<Map> threeLevelsList = new ArrayList<>(); |
| | | twoLevelMap.put("children", threeLevelsList); |
| | | // 三级 |
| | | List<PdaResource> threeLevels = pdaResourceService.selectList(new EntityWrapper<PdaResource>().eq("resource_id", twoLevel.getId()).eq("level", 3).eq("status", 1).orderBy("sort")); |
| | | for (PdaResource threeLevel : threeLevels){ |
| | | Map<String, Object> threeLevelMap = new HashMap<>(); |
| | | threeLevelMap.put("title", threeLevel.getName()); |
| | | threeLevelMap.put("id", threeLevel.getId()); |
| | | threeLevelMap.put("checked", false); |
| | | threeLevelsList.add(threeLevelMap); |
| | | } |
| | | twoLevelsList.add(twoLevelMap); |
| | | } |
| | | funcs.add(oneLevelMap); |
| | | } |
| | | result.add(functions); |
| | | |
| | |
| | | result.add(permission.getAction()); |
| | | } |
| | | } |
| | | // pda权限 |
| | | List<RolePdaResource> rolePdaResources = rolePdaResourceService.selectList(new EntityWrapper<RolePdaResource>().eq("role_id", roleId)); |
| | | for (RolePdaResource rolePdaResource : rolePdaResources) { |
| | | PdaResource pdaResource = pdaResourceService.selectById(rolePdaResource.getResourceId()); |
| | | if (!Cools.isEmpty(pdaResource)) { |
| | | if (pdaResource.getLevel() == 1){ |
| | | List<PdaResource> pdaResources = pdaResourceService.selectList(new EntityWrapper<PdaResource>().eq("resource_id", pdaResource.getId())); |
| | | if (Cools.isEmpty(pdaResources)) { |
| | | result.add(pdaResource.getId()); |
| | | } |
| | | } |
| | | if (pdaResource.getLevel() == 2){ |
| | | List<PdaResource> pdaResources = pdaResourceService.selectList(new EntityWrapper<PdaResource>().eq("resource_id", pdaResource.getId())); |
| | | if (Cools.isEmpty(pdaResources)) { |
| | | result.add(pdaResource.getId()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | |
| | | Long leaderId = role.getLeader(); |
| | | roleResourceService.delete(new EntityWrapper<RoleResource>().eq("role_id", roleId)); |
| | | rolePermissionService.delete(new EntityWrapper<RolePermission>().eq("role_id", roleId)); |
| | | rolePdaResourceService.delete(new EntityWrapper<RolePdaResource>().eq("role_id", roleId)); |
| | | if (!Cools.isEmpty(powers)){ |
| | | List<PowerDto> dtos = JSON.parseArray(powers, PowerDto.class); |
| | | for (PowerDto dto : dtos) { |
| | | if (isNumber(dto.getTwo())) { |
| | | Resource resource = resourceService.selectOne(new EntityWrapper<Resource>().eq("id", dto.getTwo()).eq("level", 2)); |
| | | if (!Cools.isEmpty(resource)) { |
| | | // 校验上级权限 |
| | |
| | | roleResource.setRoleId(roleId); |
| | | roleResource.setResourceId(resource.getId()); |
| | | roleResourceService.insert(roleResource); |
| | | } |
| | | |
| | | } else { |
| | | if (dto.getTwo().substring(0,1).contains("-")) { |
| | | PdaResource pdaResource = pdaResourceService.selectOne(new EntityWrapper<PdaResource>().eq("id", dto.getTwo()).eq("level", 1)); |
| | | if (!Cools.isEmpty(pdaResource)) { |
| | | // 校验上级权限 |
| | | if (leaderId != null) { |
| | | RolePdaResource rolePdaResource = rolePdaResourceService.selectOne(new EntityWrapper<RolePdaResource>().eq("role_id", leaderId).eq("resource_id", pdaResource.getId())); |
| | | if (null == rolePdaResource) { |
| | | throw new CoolException(pdaResource.getName().concat("无法授权给").concat(role.getName())); |
| | | } |
| | | } |
| | | RolePdaResource rolePdaResource = new RolePdaResource(); |
| | | rolePdaResource.setRoleId(roleId); |
| | | rolePdaResource.setResourceId(pdaResource.getId()); |
| | | rolePdaResourceService.insert(rolePdaResource); |
| | | } |
| | | } else { |
| | | Permission permission = permissionService.selectOne(new EntityWrapper<Permission>().eq("action", dto.getTwo())); |
| | | if (!Cools.isEmpty(permission)){ |
| | |
| | | rolePermissionService.insert(rolePermission); |
| | | } |
| | | } |
| | | |
| | | } |
| | | for (String three : dto.getThree()){ |
| | | if (three.substring(0,1).contains("-")) { |
| | | PdaResource pdaResource = pdaResourceService.selectOne(new EntityWrapper<PdaResource>().eq("id", three).eq("level", 2)); |
| | | if (!Cools.isEmpty(pdaResource)) { |
| | | // 校验上级权限 |
| | | if (leaderId != null) { |
| | | RolePdaResource rolePdaResource = rolePdaResourceService.selectOne(new EntityWrapper<RolePdaResource>().eq("role_id", leaderId).eq("resource_id", pdaResource.getId())); |
| | | if (null == rolePdaResource) { |
| | | throw new CoolException(pdaResource.getName().concat("无法授权给").concat(role.getName())); |
| | | } |
| | | } |
| | | RolePdaResource rolePdaResource = new RolePdaResource(); |
| | | rolePdaResource.setRoleId(roleId); |
| | | rolePdaResource.setResourceId(pdaResource.getId()); |
| | | rolePdaResourceService.insert(rolePdaResource); |
| | | } |
| | | } else { |
| | | Resource resource1 = resourceService.selectOne(new EntityWrapper<Resource>().eq("id", three).eq("level", 3)); |
| | | if (!Cools.isEmpty(resource1)) { |
| | | // 校验上级权限 |
| | | if (leaderId != null) { |
| | | RoleResource roleResource = roleResourceService.selectOne(new EntityWrapper<RoleResource>().eq("role_id", leaderId).eq("resource_id", resource1.getId())); |
| | | if (null == roleResource) { |
| | | throw new CoolException(resource.getName().concat("的").concat(resource1.getName().concat("无法授权给").concat(role.getName()))); |
| | | throw new CoolException(resource1.getName().concat("无法授权给").concat(role.getName())); |
| | | } |
| | | } |
| | | RoleResource roleResource = new RoleResource(); |
| | |
| | | roleResource.setResourceId(resource1.getId()); |
| | | roleResourceService.insert(roleResource); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | return R.ok("激活成功,有效期至"+DateUtils.convert(exprTime)); |
| | | } |
| | | |
| | | @RequestMapping("/menu/pda/auth") |
| | | @ManagerAuth |
| | | public R menuPda(@RequestBody HashMap<String,String> params){ |
| | | Long userId = getUserId(); |
| | | String level = params.get("level"); |
| | | Long id = Long.valueOf(params.get("id")); |
| | | List<RolePdaResource> rolePdaResources; |
| | | if (userId == 9527L) { |
| | | rolePdaResources = rolePdaResourceService.selectList(new EntityWrapper<>()); |
| | | } else { |
| | | Long roleId = getUser().getRoleId(); |
| | | rolePdaResources = rolePdaResourceService.selectList(new EntityWrapper<RolePdaResource>().eq("role_id", roleId)); |
| | | } |
| | | if (Cools.isEmpty(rolePdaResources)) { |
| | | return R.ok(); |
| | | } |
| | | List<Long> collect = rolePdaResources.stream().map(RolePdaResource::getResourceId).distinct().collect(Collectors.toList()); |
| | | List<PdaResource> pdaResources = pdaResourceService.selectBatchIds(collect); |
| | | List<PdaResource> results = new ArrayList<>(); |
| | | |
| | | for (PdaResource pdaResource : pdaResources) { |
| | | if (Integer.parseInt(level) == 1) { |
| | | if (pdaResource.getLevel().equals(Short.valueOf(level))) { |
| | | results.add(pdaResource); |
| | | } |
| | | } else { |
| | | if (pdaResource.getLevel().equals(Short.valueOf(level)) && pdaResource.getResourceId().equals(id)) { |
| | | results.add(pdaResource); |
| | | } |
| | | } |
| | | } |
| | | return R.ok().add(results); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | public static boolean isNumber(String str){ |
| | | for (int i = str.length();--i>=0;){ |
| | | if (!Character.isDigit(str.charAt(i))){ |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | } |
New file |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.system.entity.PdaResource; |
| | | import com.zy.system.entity.Resource; |
| | | import com.zy.system.service.PdaResourceService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class PdaResourceController extends BaseController { |
| | | |
| | | @Autowired |
| | | private PdaResourceService pdaResourceService; |
| | | |
| | | @RequestMapping(value = "/pdaResource/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(pdaResourceService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pdaResource/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<PdaResource> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(PdaResource.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(pdaResourceService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/pdaResource/add/auth") |
| | | @ManagerAuth(memo = "菜单添加") |
| | | public R add(PdaResource pdaResource) { |
| | | pdaResourceService.insert(pdaResource); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pdaResource/update/auth") |
| | | @ManagerAuth |
| | | public R update(PdaResource pdaResource){ |
| | | if (Cools.isEmpty(pdaResource) || null==pdaResource.getId()){ |
| | | return R.error(); |
| | | } |
| | | pdaResourceService.updateById(pdaResource); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pdaResource/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | pdaResourceService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pdaResource/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<PdaResource> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("pdaResource")); |
| | | convert(map, wrapper); |
| | | List<PdaResource> list = pdaResourceService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pdaResourceQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<PdaResource> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("name", condition); |
| | | Page<PdaResource> page = pdaResourceService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (PdaResource pdaResource : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", pdaResource.getId()); |
| | | map.put("value", pdaResource.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pdaResource/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<PdaResource> wrapper = new EntityWrapper<PdaResource>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != pdaResourceService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(PdaResource.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pdaResource/tree/auth") |
| | | @ManagerAuth |
| | | public R tree(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<PdaResource> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | else { |
| | | wrapper.orderBy("sort"); |
| | | } |
| | | return R.parse("0-操作成功").add(pdaResourceService.selectList(wrapper)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.system.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.system.entity.RolePdaResource; |
| | | import com.zy.system.service.RolePdaResourceService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class RolePdaResourceController extends BaseController { |
| | | |
| | | @Autowired |
| | | private RolePdaResourceService rolePdaResourceService; |
| | | |
| | | @RequestMapping(value = "/rolePdaResource/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(rolePdaResourceService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/rolePdaResource/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<RolePdaResource> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(RolePdaResource.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(rolePdaResourceService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/rolePdaResource/add/auth") |
| | | @ManagerAuth |
| | | public R add(RolePdaResource rolePdaResource) { |
| | | rolePdaResourceService.insert(rolePdaResource); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/rolePdaResource/update/auth") |
| | | @ManagerAuth |
| | | public R update(RolePdaResource rolePdaResource){ |
| | | if (Cools.isEmpty(rolePdaResource) || null==rolePdaResource.getId()){ |
| | | return R.error(); |
| | | } |
| | | rolePdaResourceService.updateById(rolePdaResource); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/rolePdaResource/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | rolePdaResourceService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/rolePdaResource/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<RolePdaResource> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("rolePdaResource")); |
| | | convert(map, wrapper); |
| | | List<RolePdaResource> list = rolePdaResourceService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/rolePdaResourceQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<RolePdaResource> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<RolePdaResource> page = rolePdaResourceService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (RolePdaResource rolePdaResource : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", rolePdaResource.getId()); |
| | | map.put("value", rolePdaResource.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/rolePdaResource/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<RolePdaResource> wrapper = new EntityWrapper<RolePdaResource>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != rolePdaResourceService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(RolePdaResource.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.ResourceService; |
| | | import com.zy.system.entity.Resource; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("sys_pda_resource") |
| | | public class PdaResource implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 菜单编码 |
| | | */ |
| | | @ApiModelProperty(value= "菜单编码") |
| | | private String code; |
| | | |
| | | /** |
| | | * 菜单名称 |
| | | */ |
| | | @ApiModelProperty(value= "菜单名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 菜单标题 |
| | | */ |
| | | @ApiModelProperty(value= "菜单标题") |
| | | private String title; |
| | | |
| | | /** |
| | | * 父级菜单 |
| | | */ |
| | | @ApiModelProperty(value= "父级菜单") |
| | | @TableField("resource_id") |
| | | private Long resourceId; |
| | | |
| | | /** |
| | | * 菜单等级 1: 一级菜单 2: 二级菜单 |
| | | */ |
| | | @ApiModelProperty(value= "菜单等级 1: 一级菜单 2: 二级菜单 ") |
| | | private Short level; |
| | | |
| | | /** |
| | | * 排序 |
| | | */ |
| | | @ApiModelProperty(value= "排序") |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | private Short status; |
| | | |
| | | public PdaResource() {} |
| | | |
| | | public PdaResource(String code,String name,String title,Long resourceId,Short level,Integer sort,Short status) { |
| | | this.code = code; |
| | | this.name = name; |
| | | this.title = title; |
| | | this.resourceId = resourceId; |
| | | this.level = level; |
| | | this.sort = sort; |
| | | this.status = status; |
| | | } |
| | | |
| | | // PdaResource pdaResource = new PdaResource( |
| | | // null, // 菜单编码[非空] |
| | | // null, // 菜单名称[非空] |
| | | // null, // 菜单标题[非空] |
| | | // null, // 父级菜单 |
| | | // null, // 菜单等级[非空] |
| | | // null, // 排序 |
| | | // null // 状态[非空] |
| | | // ); |
| | | |
| | | public String getResourceId$(){ |
| | | ResourceService service = SpringUtils.getBean(ResourceService.class); |
| | | Resource resource = service.selectById(this.resourceId); |
| | | if (!Cools.isEmpty(resource)){ |
| | | return String.valueOf(resource.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getLevel$(){ |
| | | if (null == this.level){ return null; } |
| | | switch (this.level){ |
| | | case 1: |
| | | return "一级菜单"; |
| | | case 2: |
| | | return "二级菜单"; |
| | | default: |
| | | return String.valueOf(this.level); |
| | | } |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "禁用"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public Short getLevel() { |
| | | return level; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.system.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.RoleService; |
| | | import com.zy.system.entity.Role; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.PdaResourceService; |
| | | import com.zy.system.entity.PdaResource; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("sys_role_pda_resource") |
| | | public class RolePdaResource implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 角色 |
| | | */ |
| | | @ApiModelProperty(value= "角色") |
| | | @TableField("role_id") |
| | | private Long roleId; |
| | | |
| | | /** |
| | | * pda权限 |
| | | */ |
| | | @ApiModelProperty(value= "pda权限") |
| | | @TableField("resource_id") |
| | | private Long resourceId; |
| | | |
| | | public RolePdaResource() {} |
| | | |
| | | public RolePdaResource(Long id,Long roleId,Long resourceId) { |
| | | this.roleId = roleId; |
| | | this.resourceId = resourceId; |
| | | } |
| | | |
| | | // RolePdaResource rolePdaResource = new RolePdaResource( |
| | | // null, // 编号[非空] |
| | | // null, // 角色[非空] |
| | | // null // pda权限[非空] |
| | | // ); |
| | | |
| | | public String getRoleId$(){ |
| | | RoleService service = SpringUtils.getBean(RoleService.class); |
| | | Role role = service.selectById(this.roleId); |
| | | if (!Cools.isEmpty(role)){ |
| | | return String.valueOf(role.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getResourceId$(){ |
| | | PdaResourceService service = SpringUtils.getBean(PdaResourceService.class); |
| | | PdaResource pdaResource = service.selectById(this.resourceId); |
| | | if (!Cools.isEmpty(pdaResource)){ |
| | | return String.valueOf(pdaResource.getTitle()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.zy.system.entity.PdaResource; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface PdaResourceMapper extends BaseMapper<PdaResource> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.zy.system.entity.RolePdaResource; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface RolePdaResourceMapper extends BaseMapper<RolePdaResource> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.zy.system.entity.PdaResource; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface PdaResourceService extends IService<PdaResource> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.zy.system.entity.RolePdaResource; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface RolePdaResourceService extends IService<RolePdaResource> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.zy.system.mapper.PdaResourceMapper; |
| | | import com.zy.system.entity.PdaResource; |
| | | import com.zy.system.service.PdaResourceService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("pdaResourceService") |
| | | public class PdaResourceServiceImpl extends ServiceImpl<PdaResourceMapper, PdaResource> implements PdaResourceService { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.zy.system.mapper.RolePdaResourceMapper; |
| | | import com.zy.system.entity.RolePdaResource; |
| | | import com.zy.system.service.RolePdaResourceService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("rolePdaResourceService") |
| | | public class RolePdaResourceServiceImpl extends ServiceImpl<RolePdaResourceMapper, RolePdaResource> implements RolePdaResourceService { |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.system.mapper.PdaResourceMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.system.entity.PdaResource"> |
| | | <id column="id" property="id" /> |
| | | <result column="code" property="code" /> |
| | | <result column="name" property="name" /> |
| | | <result column="title" property="title" /> |
| | | <result column="resource_id" property="resourceId" /> |
| | | <result column="level" property="level" /> |
| | | <result column="sort" property="sort" /> |
| | | <result column="status" property="status" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.system.mapper.RolePdaResourceMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.system.entity.RolePdaResource"> |
| | | <result column="id" property="id" /> |
| | | <result column="role_id" property="roleId" /> |
| | | <result column="resource_id" property="resourceId" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'defNumber', align: 'center', title: '操作系统号', hide: false, width: 120}, |
| | | {field: '操作单据', align: 'center', title: '操作单据', hide: true}, |
| | | {field: '操作类型', align: 'center', title: '操作类型', hide: true}, |
| | | {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl'}, |
| | | //{field: 'itemName', align: 'center', title: '核算主体'}, |
| | | {field: 'docType$', align: 'center', title: '单据类型'}, |
| | |
| | | //{field: 'postFee', align: 'center', title: '总数量', minWidth: 130, width: 130}, |
| | | {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160}, |
| | | {field: 'createTime$', title: '创建时间'}, |
| | | {field: 'shipCode', align: 'center',title: '制单人', hide: false}, |
| | | {field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 160, width: 160}, |
| | | {field: 'memo', align: 'center',title: '备注', hide: true}, |
| | | {field: 'orderTime', align: 'center',title: '单据日期', hide: true}, |
| | |
| | | {field: 'tel', align: 'center',title: '仓库', hide: true}, |
| | | {field: 'operMemb', align: 'center',title: '出入库类别', hide: true}, |
| | | {field: 'salesman', align: 'center',title: '部门', hide: true}, |
| | | {field: 'shipCode', align: 'center',title: '制单人', hide: true}, |
| | | |
| | | {align: 'center', title: '操作', toolbar: '#operate', width: 180} |
| | | ]], |
| | | request: { |
New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#pdaResource', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/pdaResource/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: '编号'} |
| | | ,{field: 'code', align: 'center',title: '菜单编码'} |
| | | ,{field: 'name', align: 'center',title: '菜单名称'} |
| | | ,{field: 'title', align: 'center',title: '菜单标题'} |
| | | ,{field: 'resourceId$', align: 'center',title: '父级菜单'} |
| | | ,{field: 'level$', align: 'center',title: '菜单等级'} |
| | | ,{field: 'sort', align: 'center',title: '排序'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(pdaResource)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(pdaResource)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'pdaResource': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/pdaResource/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(pdaResource)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/pdaResource/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/pdaResource/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| | |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | console.log(res) |
| | | if (res.code === 200){ |
| | | powerTreeData = res.data; |
| | | } else if (res.code === 403){ |
| | |
| | | data: parent.powerTreeData, |
| | | isJump: true |
| | | }); |
| | | |
| | | console.log(parent.powerTreeData) |
| | | loadPower(); |
| | | function loadPower(){ |
| | | $.ajax({ |
| | |
| | | form.on('submit(save)', function () { |
| | | var param = []; |
| | | var checkData = tree.getChecked('powerTree'); |
| | | console.log(checkData) |
| | | checkData.map(function (obj) { |
| | | obj.children.map(function (resource) { |
| | | |
| | | //console.log(resource) |
| | | var childrens = []; |
| | | if (resource.children) { |
| | | resource.children.map(function (resource) { |
| | | childrens.push(resource.id); |
| | | }); |
| | | } |
| | | var one = { |
| | | 'two': resource.id, |
| | | 'three': childrens |
New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#rolePdaResource', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/rolePdaResource/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: '编号'} |
| | | ,{field: 'roleId$', align: 'center',title: '角色'} |
| | | ,{field: 'resourceId$', align: 'center',title: 'pda权限'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(rolePdaResource)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(rolePdaResource)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'rolePdaResource': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/rolePdaResource/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(rolePdaResource)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/rolePdaResource/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/rolePdaResource/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| | |
| | | <!-- 头部 --> |
| | | <div class="layui-header"> |
| | | <div class="layui-logo"> |
| | | <img src="../static/image/logo.png" style="display: inline-block; width: 60%;height: auto"> |
| | | <img src="../static/image/logo1.png" style="display: inline-block; width: 60%;height: auto"> |
| | | <!-- <span style="margin-top: 0; letter-spacing: 10px">中扬立库</span>--> |
| | | <!-- <img src="../static/image/logo.svg"/>--> |
| | | <!-- <cite>中扬 - Zoneyung</cite>--> |
| | |
| | | z-index: 100; |
| | | top: 22px; |
| | | left: 20px;"> |
| | | <img src="../static/image/logo.png" alt="" style="width: 20%"> |
| | | <img src="../static/image/logo2.png" alt="" style="width: 20%"> |
| | | </div> |
| | | <div class="p-sketch-outline"> |
| | | <h2 class="p-sketch-outline__title">Automatic Storage and Retrieval System</h2> |
| | |
| | | <div id="sidebar"> |
| | | <div class="login-contain"> |
| | | <div class="login-box"> |
| | | <img src="../static/image/logo.png" alt="" style="width: 80%"> |
| | | <img src="../static/image/logo1.png" alt="" style="width: 80%"> |
| | | <!-- <span class="login100-form-title p-t-20 p-b-45">中扬立库</span>--> |
| | | <!-- <span class="login100-form-title p-t-20 p-b-45" style="margin: 15px 0;color: #868686;font-size: 24px">WMS</span>--> |
| | | <div class="wrap-input100 validate-input m-b-10" data-validate="请输入用户名"> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | | #detail { |
| | | padding: 25px 30px 0 0; |
| | | } |
| | | .ew-tree-table-box { |
| | | height: 100%; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | | |
| | | <!-- 正文开始 --> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <!-- 数据表格 --> |
| | | <table id="resource"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-del" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form" style="margin: 0"> |
| | | <input name="id" type="hidden"> |
| | | <input name="uuid" type="hidden"> |
| | | <input name="level" type="hidden"> |
| | | <div class="layui-row"> |
| | | |
| | | <div class="layui-col-md6"> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">上级菜单</label> |
| | | <div class="layui-input-block"> |
| | | <div id="resourceParentSel" class="ew-xmselect-tree"></div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">菜单编码</label> |
| | | <div class="layui-input-block"> |
| | | <input name="code" placeholder="请输入菜单编码" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">类型</label> |
| | | <div class="layui-input-block"> |
| | | <select name="level" lay-vertype="tips" lay-verify="required" required=""> |
| | | <option value="">请选择类型</option> |
| | | <option value="1">一级菜单</option> |
| | | <option value="2">二级菜单</option> |
| | | <option value="3">按钮</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">状态</label> |
| | | <div class="layui-input-block"> |
| | | <select name="status" lay-vertype="tips" lay-verify="required" required=""> |
| | | <option value="">请选择状态</option> |
| | | <option value="1">正常</option> |
| | | <option value="0">禁用</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <div class="layui-col-md6"> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">菜单标题</label> |
| | | <div class="layui-input-block"> |
| | | <input name="title" placeholder="请输入菜单标题" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">菜单名称</label> |
| | | <div class="layui-input-block"> |
| | | <input name="name" placeholder="请输入菜单名称" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">排序</label> |
| | | <div class="layui-input-block"> |
| | | <input name="sort" placeholder="请输入排序" class="layui-input" lay-verify="number"> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | <script type="text/html" id="typeTpl"> |
| | | {{# if( d.level === 1 ){ }} |
| | | <span name="level" class="layui-badge layui-badge-green">菜单</span> |
| | | {{# } else if(d.level === 2){ }} |
| | | <span name="level" class="layui-badge layui-badge-green">菜单</span> |
| | | {{# } else if(d.level === 3){ }} |
| | | <span name="level" class="layui-badge layui-badge-gray">按钮</span> |
| | | {{# } }} |
| | | </script> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | |
| | | <script> |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['form','treeTable', 'admin', 'xmSelect'], function() { |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | var treeTable = layui.treeTable; |
| | | var xmSelect = layui.xmSelect; |
| | | var tbDataList = []; |
| | | |
| | | var insTb = treeTable.render({ |
| | | elem: '#resource', |
| | | url: baseUrl+'/pdaResource/tree/auth', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | height: 'full-200', |
| | | toolbar: ['<p>', |
| | | '<button lay-event="add" class="layui-btn layui-btn-sm icon-btn"><i class="layui-icon"></i>添加</button> ', |
| | | '<button lay-event="del" class="layui-btn layui-btn-sm layui-btn-danger icon-btn"><i class="layui-icon"></i>删除</button>', |
| | | '</p>'].join(''), |
| | | tree: { |
| | | iconIndex: 2, // 折叠图标显示在第几列 |
| | | isPidData: true, // 是否是id、pid形式数据 |
| | | idName: 'id', // id字段名称 |
| | | pidName: 'resourceId' // pid字段名称 |
| | | }, |
| | | cols: [[ |
| | | {type: 'checkbox', fixed: 'left'} |
| | | ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80, hide: true} |
| | | ,{field: 'name', align: 'left',title: '菜单名称'} |
| | | ,{field: 'title', align: 'left',title: '菜单标题'} |
| | | ,{field: 'code', align: 'center',title: '菜单编码'} |
| | | // ,{field: 'resourceName', align: 'center',title: '父级菜单'} |
| | | // ,{field: 'level$', align: 'center',title: '菜单等级'} |
| | | ,{field: 'type', align: 'center',title: '类型', templet: '#typeTpl', width: 120} |
| | | ,{field: 'sort', align: 'center',title: '排序'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | | ]], |
| | | done: function (data) { |
| | | $('.ew-tree-table-box').css('height', '100%'); |
| | | // insTb.expandAll(); |
| | | tbDataList = data; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | /* 表格头工具栏点击事件 */ |
| | | treeTable.on('toolbar(resource)', function (obj) { |
| | | if (obj.event === 'add') { // 添加 |
| | | showEditModel(); |
| | | } else if (obj.event === 'del') { // 删除 |
| | | var checkRows = insTb.checkStatus(); |
| | | if (checkRows.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | var ids = checkRows.map(function (d) { |
| | | if (!d.LAY_INDETERMINATE) { |
| | | return d.id; |
| | | } else { |
| | | return null; |
| | | } |
| | | }); |
| | | doDel({ids: ids}); |
| | | } |
| | | }); |
| | | |
| | | /* 表格操作列点击事件 */ |
| | | treeTable.on('tool(resource)', function (obj) { |
| | | if (obj.event === 'edit') { // 修改 |
| | | showEditModel(obj.data); |
| | | } else if (obj.event === 'del') { // 删除 |
| | | doDel(obj); |
| | | } |
| | | }); |
| | | |
| | | /* 显示表单弹窗 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '菜单', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | // 回显表单数据 |
| | | form.val('detail', mData); |
| | | // 表单提交事件 |
| | | form.on('submit(editSubmit)', function (data) { |
| | | data.field.resourceId = insXmSel.getValue('valueStr'); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/pdaResource/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | insTb.refresh(); |
| | | setTimeout(function () { |
| | | insTb.expand(data.field.resourceId); |
| | | }, 200) |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | |
| | | // 渲染下拉树 |
| | | var insXmSel = xmSelect.render({ |
| | | el: '#resourceParentSel', |
| | | height: '250px', |
| | | data: insTb.options.data, |
| | | initValue: mData&&mData.resourceId!=null ? [mData.resourceId] : [], |
| | | model: {label: {type: 'text'}}, |
| | | prop: { |
| | | name: 'name', |
| | | value: 'id' |
| | | }, |
| | | radio: true, |
| | | clickClose: true, |
| | | tree: { |
| | | show: true, |
| | | indent: 15, |
| | | strict: false, |
| | | expandedKeys: false |
| | | } |
| | | }); |
| | | // 弹窗不出现滚动条 |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function doDel(obj) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | var ids; |
| | | if (obj.data) { |
| | | ids = []; |
| | | ids[0] = obj.data.id; |
| | | } else { |
| | | ids = obj.ids; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl+"/pdaResource/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | insTb.refresh(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |
| | | |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="rolePdaResource" lay-filter="rolePdaResource"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/rolePdaResource/rolePdaResource.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="id" placeholder="请输入编号" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">角色: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="roleId" placeholder="请输入角色" lay-vertype="tips" lay-verify="required" style="display: none"> |
| | | <input id="roleId$" name="roleId$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入角色" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="roleQueryByroleId" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="roleQueryByroleIdSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">pda权限: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="resourceId" placeholder="请输入pda权限" lay-vertype="tips" lay-verify="required" style="display: none"> |
| | | <input id="resourceId$" name="resourceId$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入pda权限" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="pdaResourceQueryByresourceId" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="pdaResourceQueryByresourceIdSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |