From 07339fca4fe9f5263c2e74854e9ac5a0a9681d1c Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期日, 28 六月 2020 13:11:07 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/entity/param/CombParam.java | 56 ++++++++++++++++++++++++++++
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 10 +++++
src/main/webapp/views/pda/comb.html | 27 +++++++++++++
src/main/java/com/zy/asrs/controller/MobileController.java | 4 +
src/main/java/com/zy/asrs/service/MobileService.java | 4 ++
5 files changed, 99 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/MobileController.java b/src/main/java/com/zy/asrs/controller/MobileController.java
index 9409681..0af752a 100644
--- a/src/main/java/com/zy/asrs/controller/MobileController.java
+++ b/src/main/java/com/zy/asrs/controller/MobileController.java
@@ -2,6 +2,8 @@
import com.core.annotations.ManagerAuth;
import com.core.common.R;
+import com.zy.asrs.entity.param.CombParam;
+import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -18,7 +20,7 @@
*/
@RequestMapping("/comb/auth")
@ManagerAuth(memo = "缁勬墭")
- public R comb(){
+ public R comb(@RequestBody CombParam combParam){
return R.ok();
}
diff --git a/src/main/java/com/zy/asrs/entity/param/CombParam.java b/src/main/java/com/zy/asrs/entity/param/CombParam.java
new file mode 100644
index 0000000..568b7e6
--- /dev/null
+++ b/src/main/java/com/zy/asrs/entity/param/CombParam.java
@@ -0,0 +1,56 @@
+package com.zy.asrs.entity.param;
+
+import java.util.List;
+
+/**
+ * Created by vincent on 2020/6/28
+ */
+public class CombParam {
+
+ // 鎵樼洏鏉$爜
+ private String barcode;
+
+ private List<CombMat> combMats;
+
+ public static class CombMat {
+
+ // 鐗╂枡缂栧彿
+ private String matNo;
+
+ // 鐗╂枡鏁伴噺
+ private Double count;
+
+ public String getMatNo() {
+ return matNo;
+ }
+
+ public void setMatNo(String matNo) {
+ this.matNo = matNo;
+ }
+
+ public Double getCount() {
+ return count;
+ }
+
+ public void setCount(Double count) {
+ this.count = count;
+ }
+
+ }
+
+ public String getBarcode() {
+ return barcode;
+ }
+
+ public void setBarcode(String barcode) {
+ this.barcode = barcode;
+ }
+
+ public List<CombMat> getCombMats() {
+ return combMats;
+ }
+
+ public void setCombMats(List<CombMat> combMats) {
+ this.combMats = combMats;
+ }
+}
diff --git a/src/main/java/com/zy/asrs/service/MobileService.java b/src/main/java/com/zy/asrs/service/MobileService.java
new file mode 100644
index 0000000..805156c
--- /dev/null
+++ b/src/main/java/com/zy/asrs/service/MobileService.java
@@ -0,0 +1,4 @@
+package com.zy.asrs.service;
+
+public interface MobileService {
+}
diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
new file mode 100644
index 0000000..1743309
--- /dev/null
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -0,0 +1,10 @@
+package com.zy.asrs.service.impl;
+
+import com.zy.asrs.service.MobileService;
+
+/**
+ * 绉诲姩绔湇鍔℃牳蹇冪被
+ * Created by vincent on 2020/6/28
+ */
+public class MobileServiceImpl implements MobileService {
+}
diff --git a/src/main/webapp/views/pda/comb.html b/src/main/webapp/views/pda/comb.html
index 8127d2f..3b0d801 100644
--- a/src/main/webapp/views/pda/comb.html
+++ b/src/main/webapp/views/pda/comb.html
@@ -113,7 +113,7 @@
<footer>
<div class="layui-btn-container">
<button type="button" class="layui-btn layui-btn-xs layui-btn-primary" onclick="reset()">閲嶇疆</button>
- <button type="button" class="layui-btn layui-btn-normal layui-btn-xs" onclick="comb" style="margin-left: 20px">缁勬墭</button>
+ <button type="button" class="layui-btn layui-btn-normal layui-btn-xs" onclick="comb()" style="margin-left: 20px">缁勬墭</button>
</div>
</footer>
</body>
@@ -183,7 +183,32 @@
// 缁勬墭
function comb() {
+ let barcode = $('#code').val();
+ if (isEmpty(barcode)) {
+ layer.msg("璇疯緭鍏ユ墭鐩樻潯鐮�");
+ return;
+ }
+ let combMats = matData;
+ $.ajax({
+ url: baseUrl+"/mobile/comb/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: JSON.stringify({
+ barcode: barcode,
+ combMats: combMats
+ }),
+ contentType:'application/json;charset=UTF-8',
+ method: 'POST',
+ asyne: false,
+ success: function (res) {
+ if (res.code === 200) {
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/pda";
+ } else {
+ alert(res.msg)
+ }
+ }
+ })
}
</script>
</html>
\ No newline at end of file
--
Gitblit v1.9.1