Browse Source

为扫码查看库存页面添加直接出库申请

lwx_dev
erdanergou 2 years ago
parent
commit
cab8941d39
  1. 43
      src/main/java/com/dreamchaser/depository_manage/controller/PageController.java
  2. 1370
      src/main/resources/templates/pages/applicationForStorageCenter/application-out_admin_temporaryValue.html
  3. 20
      src/main/resources/templates/pages/showInventory/showInventoryForLocation.html
  4. 20
      target/classes/templates/pages/showInventory/showInventoryForLocation.html

43
src/main/java/com/dreamchaser/depository_manage/controller/PageController.java

@ -3265,6 +3265,32 @@ public class PageController {
return mv;
}
// 获取扫描结果并跳转到出库
@GetMapping("/application_Immediate_Out_temporaryValue")
public ModelAndView applicationImmediateOutScanQrCode(HttpServletRequest request) {
ModelAndView mv = new ModelAndView();
String token = request.getHeader("user-token");
if (token == null) {
token = (String) request.getSession().getAttribute("userToken");
}
List<BusinessType> businessTypeAll = businessTypeService.findBusinessTypeAll();
mv.addObject("btList", businessTypeAll);
UserByPort userToken = AuthenticationTokenPool.getUserToken(token);
List<String> range = redisPool.getRedisTemplateByDb(15).boundListOps("WMS_temporaryValue_Out" + userToken.getNumber()).range(0, -1);
Integer maindeparment = userToken.getMaindeparment();
if (range != null && range.size() > 0) {
if (PublicConfig.roleAdminorgList.contains(maindeparment)) {
mv.setViewName("pages/applicationForStorageCenter/application-out_admin_temporaryValue");
}
} else {
if (PublicConfig.roleAdminorgList.contains(maindeparment)) {
mv.setViewName("pages/applicationForStorageCenter/application-out_admin");
}
}
return mv;
}
// 当前仓库中该用户的子订单详情,用于pc端
@GetMapping("/ApplicationOutMinByDid")
public ModelAndView ApplicationOutMinByDid(Integer depositoryId, Integer state, HttpServletRequest request) {
@ -3485,16 +3511,14 @@ public class PageController {
public ModelAndView noticeView(Integer id, HttpServletRequest request) {
ModelAndView mv = new ModelAndView();
mv.setViewName("pages/notice/notice-view");
String token = request.getHeader("user-token");
String userKey = request.getHeader("user-key");
if (token == null) {
token = (String) request.getSession().getAttribute("userToken");
userKey = (String) request.getSession().getAttribute("userKey");
}
NoticeP noticeById = noticeService.findNoticeById(id, userKey, token);
UserByPort userToken = AuthenticationTokenPool.getUserToken(token);
NoticeP noticeById = noticeService.findNoticeById(id, userKey, token);
if (Integer.compare(noticeById.getUserId(), userToken.getId()) == 0) {
String header = request.getHeader("user-agent");
String crypt = Md5.crypt(header);
@ -3637,9 +3661,20 @@ public class PageController {
// 用于展示库存数据
@GetMapping("/toShowInventory")
public ModelAndView toShowInventory(@RequestParam Map<String, String> param) {
public ModelAndView toShowInventory(@RequestParam Map<String, String> param,HttpServletRequest request) {
ModelAndView mv = new ModelAndView();
String token = request.getHeader("user-token");
String userKey = request.getHeader("user-key");
if (token == null) {
token = (String) request.getSession().getAttribute("userToken");
userKey = (String) request.getSession().getAttribute("userKey");
}
UserByPort userToken = AuthenticationTokenPool.getUserToken(token);
if (param.containsKey("id")) {
Integer maindeparment = userToken.getMaindeparment();
if(PublicConfig.roleAdminorgList.contains(maindeparment)){
mv.addObject("display","inline-block");
}
String type = param.get("type");
mv.addObject("id", param.get("id"));
if ("m".equals(type)) {

1370
src/main/resources/templates/pages/applicationForStorageCenter/application-out_admin_temporaryValue.html

File diff suppressed because it is too large

20
src/main/resources/templates/pages/showInventory/showInventoryForLocation.html

@ -46,7 +46,7 @@
#chooseBusinessType {
position: fixed;
width: 400px;
width: 500px;
bottom: 20px;
left: 0;
right: 0;
@ -90,6 +90,10 @@
<button class="layui-btn layui-btn-customize" type="button"
onclick="applicationOut()">出库申请
</button>
<button class="layui-btn layui-btn-customize" type="button" th:style="'display:'+${display}"
onclick="applicationImmediateOut()">直接出库申请
</button>
</div>
</div>
</div>
@ -117,6 +121,10 @@
}
function applicationImmediateOut() {
}
var depositoryId = "-1";
var placeId = "0";
@ -317,6 +325,16 @@
});
};
/**
* 用于跳转到直接出库页面
*/
applicationImmediateOut = function () {
miniTab.openNewTabByIframeNew({
href: "/application_Immediate_Out_temporaryValue",
title: "出库申请"
});
};
/**
* 用于选择选择框

20
target/classes/templates/pages/showInventory/showInventoryForLocation.html

@ -46,7 +46,7 @@
#chooseBusinessType {
position: fixed;
width: 400px;
width: 500px;
bottom: 20px;
left: 0;
right: 0;
@ -90,6 +90,10 @@
<button class="layui-btn layui-btn-customize" type="button"
onclick="applicationOut()">出库申请
</button>
<button class="layui-btn layui-btn-customize" type="button" th:style="'display:'+${display}"
onclick="applicationImmediateOut()">直接出库申请
</button>
</div>
</div>
</div>
@ -117,6 +121,10 @@
}
function applicationImmediateOut() {
}
var depositoryId = "-1";
var placeId = "0";
@ -317,6 +325,16 @@
});
};
/**
* 用于跳转到直接出库页面
*/
applicationImmediateOut = function () {
miniTab.openNewTabByIframeNew({
href: "/application_Immediate_Out_temporaryValue",
title: "出库申请"
});
};
/**
* 用于选择选择框

Loading…
Cancel
Save