From 404b933adebf3e43722a018e560c8ad2c4774e2d Mon Sep 17 00:00:00 2001
From: admin <841110950@qq.com>
Date: 星期二, 31 八月 2021 14:50:31 +0800
Subject: [PATCH] 1.0.6
---
src/main/webapp/views/locMast/locMast.html | 24 +++++++
src/main/java/com/zy/asrs/controller/BasWrkIotypeController.java | 21 +++++++
src/main/java/com/zy/asrs/controller/LocDetlController.java | 33 +++++++++++
src/main/webapp/static/js/pakStore/stockAdjust.js | 2
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java | 9 +++
src/main/webapp/views/stoMan/stoQue.html | 34 +++++++++++
src/main/webapp/static/js/matStore/matStore.js | 1
src/main/webapp/static/js/locMast/locMast.js | 2
src/main/webapp/static/js/stoMan/stoQue.js | 1
src/main/webapp/static/js/cool.js | 33 ++++++++++
10 files changed, 155 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/BasWrkIotypeController.java b/src/main/java/com/zy/asrs/controller/BasWrkIotypeController.java
index 18edf8c..20b2776 100644
--- a/src/main/java/com/zy/asrs/controller/BasWrkIotypeController.java
+++ b/src/main/java/com/zy/asrs/controller/BasWrkIotypeController.java
@@ -5,7 +5,9 @@
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
+import com.zy.asrs.entity.BasLocSts;
import com.zy.asrs.entity.BasWrkIotype;
+import com.zy.asrs.service.BasLocStsService;
import com.zy.asrs.service.BasWrkIotypeService;
import com.zy.common.web.BaseController;
import com.core.annotations.ManagerAuth;
@@ -23,6 +25,9 @@
@Autowired
private BasWrkIotypeService basWrkIotypeService;
+
+ @Autowired
+ private BasLocStsService basLocStsService;
@RequestMapping(value = "/basWrkIotype/{id}/auth")
@ManagerAuth
@@ -134,6 +139,22 @@
return R.ok(result);
}
+ @RequestMapping(value = "/locStacQuery/auth")
+ @ManagerAuth
+ public R queryloc(String condition) {
+ EntityWrapper<BasLocSts> wrapper = new EntityWrapper<>();
+ wrapper.like("lo_sts", condition);
+ Page<BasLocSts> page = basLocStsService.selectPage(new Page<>(0, 10), wrapper);
+ List<Map<String, Object>> result = new ArrayList<>();
+ for (BasLocSts basLocSts : page.getRecords()){
+ Map<String, Object> map = new HashMap<>();
+ map.put("id", basLocSts.getLocSts());
+ map.put("value", basLocSts.getLocDesc());
+ result.add(map);
+ }
+ return R.ok(result);
+ }
+
@RequestMapping(value = "/basWrkIotype/check/column/auth")
@ManagerAuth
public R query(@RequestBody JSONObject param) {
diff --git a/src/main/java/com/zy/asrs/controller/LocDetlController.java b/src/main/java/com/zy/asrs/controller/LocDetlController.java
index fa4279c..da624a0 100644
--- a/src/main/java/com/zy/asrs/controller/LocDetlController.java
+++ b/src/main/java/com/zy/asrs/controller/LocDetlController.java
@@ -11,7 +11,9 @@
import com.core.common.DateUtils;
import com.core.common.R;
import com.zy.asrs.entity.LocDetl;
+import com.zy.asrs.entity.LocMast;
import com.zy.asrs.service.LocDetlService;
+import com.zy.asrs.service.LocMastService;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -23,6 +25,9 @@
@Autowired
private LocDetlService locDetlService;
+
+ @Autowired
+ private LocMastService locMastService;
@RequestMapping(value = "/locDetl/update")
public R update1() {
@@ -104,6 +109,34 @@
}
}
+
+ @RequestMapping(value = "/locDetl/list/sts")
+ @ManagerAuth
+ public R stsList(@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){
+ excludeTrash(param);
+ String value= null;
+ for (String s : param.keySet()) {
+ value= (String) param.get(s);
+ }
+ LocMast loc_no = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", value));
+ if (loc_no.getLocSts().equals("O")||loc_no.getLocSts().equals("F")){
+ EntityWrapper<LocDetl> wrapper = new EntityWrapper<>();
+ convert(param, wrapper);
+ allLike(LocDetl.class, param.keySet(), wrapper, condition);
+ if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
+ return R.ok(locDetlService.selectPage(new Page<>(curr, limit), wrapper));
+ }else {
+ return R.error("璇ュ簱浣嶅綋鍓嶇姸鎬佷笉鑳借皟鏁�");
+ }
+ }
+
+
+
@RequestMapping(value = "/locDetl/add/auth")
@ManagerAuth(memo = "搴撲綅鏄庣粏娣诲姞")
public R add(LocDetl locDetl) {
diff --git a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
index 4f3c4fe..b501208 100644
--- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -551,6 +551,15 @@
if (Cools.isEmpty(locMast)) {
throw new CoolException("搴撲綅涓嶅瓨鍦�");
}
+ //鏌ヨ搴撲綅鐘舵��
+ if (locMast.getLocSts().equals("O")){
+ //鏇存柊搴撲綅鐘舵��
+ locMast.setLocSts("F");
+// boolean b = locMastService.updateById(locMast);
+ if (!locMastService.updateById(locMast)){
+ throw new CoolException("鏇存柊搴撲綅鐘舵�佸け璐�");
+ }
+ }
for (LocDetlAdjustParam.LocDetlAdjust adjust : param.getList()) {
if (Cools.isEmpty(adjust.getMatNo())) {
diff --git a/src/main/webapp/static/js/cool.js b/src/main/webapp/static/js/cool.js
index 1bb67f5..1f79213 100644
--- a/src/main/webapp/static/js/cool.js
+++ b/src/main/webapp/static/js/cool.js
@@ -16,7 +16,6 @@
function autoShow(id) {
var cac = document.getElementById(id).parentNode;
var cacw = cac.getElementsByClassName("cool-auto-complete-window")[0];
- console.log(cacw)
if (cacw.style.display === "none" || cacw.style.display === ""){
cacw.style.display = "block";
var cacwi = cacw.getElementsByClassName("cool-auto-complete-window-input")[0];
@@ -62,6 +61,38 @@
});
}
+function autoLoad2(val) {
+ var inputDomVal = document.querySelector("input[data-key="+val+"]").value;
+ var selectDom = document.querySelector("select[data-key="+val+"Select]");
+ selectDom.length = 0;
+ var defaultOption = new Option("鍙栨秷閫夋嫨", "");
+ defaultOption.title = "";
+ selectDom.appendChild(defaultOption);
+ selectDom.style.display='none';
+ $.ajax({
+ url: baseUrl+"/"+getForeignKeyQuery(val)+"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {condition: inputDomVal},
+ method: 'POST',
+ traditional:true,
+ success: function (res) {
+ if (res.code === 200){
+ var list = res.data;
+ for (var i=0;i<list.length;i++){
+ var option = new Option(list[i].value, i);
+ option.title = list[i].id;
+ selectDom.options[i+1] = option;
+ }
+ selectDom.style.display='block';
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg)
+ }
+ }
+ });
+}
+
/**
* 鎼滅储鑷姩琛ュ叏 -- select
*/
diff --git a/src/main/webapp/static/js/locMast/locMast.js b/src/main/webapp/static/js/locMast/locMast.js
index 2c8959e..a817a62 100644
--- a/src/main/webapp/static/js/locMast/locMast.js
+++ b/src/main/webapp/static/js/locMast/locMast.js
@@ -5,6 +5,7 @@
var layer = layui.layer;
var layDate = layui.laydate;
var form = layui.form;
+ var dropdown = layui.dropdown
// 鏁版嵁娓叉煋
tableIns = table.render({
@@ -91,6 +92,7 @@
}
});
+
// 鐩戝惉鎺掑簭浜嬩欢
table.on('sort(locMast)', function (obj) {
var searchData = {};
diff --git a/src/main/webapp/static/js/matStore/matStore.js b/src/main/webapp/static/js/matStore/matStore.js
index da52595..0f5d761 100644
--- a/src/main/webapp/static/js/matStore/matStore.js
+++ b/src/main/webapp/static/js/matStore/matStore.js
@@ -71,7 +71,6 @@
return;
}
}
- console.log(matCodeData)
$.ajax({
url: baseUrl+"/mat/store/start",
headers: {'token': localStorage.getItem('token')},
diff --git a/src/main/webapp/static/js/pakStore/stockAdjust.js b/src/main/webapp/static/js/pakStore/stockAdjust.js
index 3e73eb3..6cc64ca 100644
--- a/src/main/webapp/static/js/pakStore/stockAdjust.js
+++ b/src/main/webapp/static/js/pakStore/stockAdjust.js
@@ -123,7 +123,7 @@
});
function init(locNo) {
- http.post(baseUrl + "/locDetl/list/auth", {locNo: locNo,limit: 1000}, function (res) {
+ http.post(baseUrl + "/locDetl/list/sts", {locNo: locNo,limit: 1000}, function (res) {
matCodeData = [];
let data = res.data.records;
for (var i = 0; i<data.length; i++) {
diff --git a/src/main/webapp/static/js/stoMan/stoQue.js b/src/main/webapp/static/js/stoMan/stoQue.js
index 8c946b5..1556e3e 100644
--- a/src/main/webapp/static/js/stoMan/stoQue.js
+++ b/src/main/webapp/static/js/stoMan/stoQue.js
@@ -33,6 +33,7 @@
,{field: 'row1', align: 'center',title: '鎺�'}
,{field: 'bay1', align: 'center',title: '鍒�'}
,{field: 'lev1', align: 'center',title: '灞�'}
+ ,{field: 'barcode', align: 'center',title: '鏉$爜'}
,{field: 'fullPlt', align: 'center',title: '婊℃澘', templet:function(row){
var html = "<input value='fullPlt' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'";
if(row.fullPlt === 'Y'){html += " checked ";}
diff --git a/src/main/webapp/views/locMast/locMast.html b/src/main/webapp/views/locMast/locMast.html
index b736512..ad7afdb 100644
--- a/src/main/webapp/views/locMast/locMast.html
+++ b/src/main/webapp/views/locMast/locMast.html
@@ -29,11 +29,31 @@
<input class="layui-input" type="text" name="loc_no" placeholder="搴撲綅鍙�" autocomplete="off">
</div>
</div>
+
<div class="layui-inline">
- <div class="layui-input-inline">
- <input class="layui-input" type="text" name="loc_sts" placeholder="搴撲綅鐘舵��" autocomplete="off">
+ <div class="layui-input-inline cool-auto-complete">
+ <input id="locSts" name="loc_sts" class="layui-input" type="text" style="display: none">
+ <input id="locSts$" 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="locStacQueryBylocSts" onkeyup="autoLoad2(this.getAttribute('data-key'))">
+ <select class="cool-auto-complete-window-select" data-key="locStacQueryBylocStsSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
+ </select>
+ </div>
</div>
</div>
+
+<!-- <div class="layui-inline">-->
+<!-- <div class="layui-input-inline">-->
+<!-- <input class="layui-input" type="text" name="loc_sts" placeholder="搴撲綅鐘舵��" autocomplete="off">-->
+<!-- </div>-->
+<!-- </div>-->
+
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="crn_no" placeholder="鍫嗗灈鏈哄彿" autocomplete="off">
+ </div>
+ </div>
+
<div class="layui-inline">
<div class="layui-input-inline">
<input class="layui-input" type="text" name="row1" placeholder="鎺�" autocomplete="off">
diff --git a/src/main/webapp/views/stoMan/stoQue.html b/src/main/webapp/views/stoMan/stoQue.html
index adc66c0..8411cc6 100644
--- a/src/main/webapp/views/stoMan/stoQue.html
+++ b/src/main/webapp/views/stoMan/stoQue.html
@@ -32,6 +32,40 @@
<input class="layui-input" type="text" name="loc_no" placeholder="搴撲綅鍙�" autocomplete="off">
</div>
</div>
+
+ <div class="layui-inline">
+ <div class="layui-input-inline cool-auto-complete">
+ <input id="locSts" name="loc_sts" class="layui-input" type="text" style="display: none">
+ <input id="locSts$" 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="locStacQueryBylocSts" onkeyup="autoLoad2(this.getAttribute('data-key'))">
+ <select class="cool-auto-complete-window-select" data-key="locStacQueryBylocStsSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
+ </select>
+ </div>
+ </div>
+ </div>
+
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="crn_no" placeholder="鍫嗗灈鏈哄彿" autocomplete="off">
+ </div>
+ </div>
+
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="row1" placeholder="鎺�" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="bay1" placeholder="鍒�" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="lev1" placeholder="灞�" autocomplete="off">
+ </div>
+ </div>
<!-- 鏃ユ湡鑼冨洿 -->
<div class="layui-inline" style="width: 300px">
<div class="layui-input-inline">
--
Gitblit v1.9.1