From cb9c7650145abce31fab4564ad6e50754ee93242 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 05 三月 2021 15:16:40 +0800
Subject: [PATCH] #
---
src/main/java/zy/cloud/wms/manager/controller/PakoutController.java | 12 ++++++++++++
src/main/webapp/static/js/custOrder/custOrder.js | 6 ++++--
src/main/java/zy/cloud/wms/manager/service/impl/PakoutServiceImpl.java | 6 ++++++
src/main/java/zy/cloud/wms/manager/service/PakoutService.java | 2 ++
4 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/src/main/java/zy/cloud/wms/manager/controller/PakoutController.java b/src/main/java/zy/cloud/wms/manager/controller/PakoutController.java
index 5c26030..db929bc 100644
--- a/src/main/java/zy/cloud/wms/manager/controller/PakoutController.java
+++ b/src/main/java/zy/cloud/wms/manager/controller/PakoutController.java
@@ -127,4 +127,16 @@
return R.ok();
}
+ @RequestMapping(value = "/pakout/print/auth")
+ @ManagerAuth
+ public R print(@RequestParam String docNumber) {
+ List<Pakout> pakouts = pakoutService.selectList(new EntityWrapper<Pakout>().eq("doc_num", docNumber));
+ if (!Cools.isEmpty(pakouts)) {
+ if (pakouts.get(0).getWrkSts() == 1) {
+ pakoutService.stockOutPrint(null, docNumber, getUserId());
+ }
+ }
+ return R.ok();
+ }
+
}
diff --git a/src/main/java/zy/cloud/wms/manager/service/PakoutService.java b/src/main/java/zy/cloud/wms/manager/service/PakoutService.java
index 8609cd8..f35f349 100644
--- a/src/main/java/zy/cloud/wms/manager/service/PakoutService.java
+++ b/src/main/java/zy/cloud/wms/manager/service/PakoutService.java
@@ -5,6 +5,8 @@
public interface PakoutService extends IService<Pakout> {
+ Boolean stockOutPrint(String wrkNo, String docNum, Long userId);
+
Boolean stockOutComplete(String wrkNo, String docNum, Long userId);
}
diff --git a/src/main/java/zy/cloud/wms/manager/service/impl/PakoutServiceImpl.java b/src/main/java/zy/cloud/wms/manager/service/impl/PakoutServiceImpl.java
index c864be2..d711feb 100644
--- a/src/main/java/zy/cloud/wms/manager/service/impl/PakoutServiceImpl.java
+++ b/src/main/java/zy/cloud/wms/manager/service/impl/PakoutServiceImpl.java
@@ -10,7 +10,13 @@
public class PakoutServiceImpl extends ServiceImpl<PakoutMapper, Pakout> implements PakoutService {
@Override
+ public Boolean stockOutPrint(String wrkNo, String docNum, Long userId) {
+ return this.baseMapper.updateWrkSts(wrkNo, docNum, 2, userId)>0;
+ }
+
+ @Override
public Boolean stockOutComplete(String wrkNo, String docNum, Long userId) {
return this.baseMapper.updateWrkSts(wrkNo, docNum, 3, userId)>0;
}
+
}
diff --git a/src/main/webapp/static/js/custOrder/custOrder.js b/src/main/webapp/static/js/custOrder/custOrder.js
index f2ea49f..99453ed 100644
--- a/src/main/webapp/static/js/custOrder/custOrder.js
+++ b/src/main/webapp/static/js/custOrder/custOrder.js
@@ -279,9 +279,11 @@
deferred: $.Deferred().done(function () {
layer.confirm('[閲嶈] 鎵撳嵃鏄惁鎴愬姛锛�', {btn: ['Yes', 'No']}, function(){
$.ajax({
- url: baseUrl+"/trayCode/print/auth",
+ url: baseUrl+"/pakout/print/auth",
headers: {'token': localStorage.getItem('token')},
- data: data.field,
+ data: {
+ docNume: docNumber
+ },
method: 'POST',
success: function (res) {
if (res.code === 200){
--
Gitblit v1.9.1