From 2aa5cec3577cf0f935f074cd8283af669a07f54c Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期六, 10 一月 2026 10:16:38 +0800
Subject: [PATCH] 出入库测试修改
---
src/main/webapp/static/js/orderPakout/out.js | 138 ++++++++++++++++++++--------------
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java | 7 -
src/main/resources/mapper/LocDetlMapper.xml | 44 +++++-----
src/main/webapp/static/js/wrkMast/wrkMast.js | 7 +
4 files changed, 110 insertions(+), 86 deletions(-)
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 5fc61d0..ecb2699 100644
--- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -1483,7 +1483,6 @@
LocMast locMasts = locMastService.selectOne(new EntityWrapper<LocMast>()
.in("loc_no", locs)
.eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type)
- .eq("dev_no", basDevice.getDevNo())
.orderAsc(Arrays.asList("loc_no"))
.last("OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY"));
@@ -1494,9 +1493,8 @@
List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locMasts.getLocNo(),1);
//TODO 1. 鑾峰彇鍏ュ簱绔欑偣锛� 鐩爣搴撲綅 3. 灏嗗嚭搴撴槑缁嗘坊鍔犺嚦鍏ュ簱鏄庣粏
Integer staNo = staNos.stream().findFirst().get();
- WrkMast wrkMast = new WrkMast();
- if (Objects.isNull(wrkMast.getWrkCode())) {
+ if (Objects.isNull(outMast.getWrkCode())) {
throw new CoolException("鏁版嵁閿欒锛屼笂绾т换鍔$紪鐮佷负绌猴紒锛�");
}
String wrkCode;
@@ -1507,6 +1505,7 @@
} else {
throw new CoolException("鏁版嵁閿欒锛屼笂绾т换鍔$紪鐮侀敊璇紒锛�");
}
+ WrkMast wrkMast = new WrkMast();
// 鐢熸垚宸ヤ綔妗�
wrkMast.setWrkNo(workNo);
wrkMast.setWrkCode(wrkCode);
@@ -1550,7 +1549,7 @@
} else {
throw new CoolException(locMasts.getLocNo() + "鐩爣搴撲綅宸茶鍗犵敤");
}
- List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrkNo", outMast.getWrkNo()));
+ List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", outMast.getWrkNo()));
if (Objects.isNull(wrkDetls) || wrkDetls.isEmpty()) {
throw new CoolException("浠诲姟鏄庣粏涓虹┖锛侊紒");
}
diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml
index 958190a..03e2acd 100644
--- a/src/main/resources/mapper/LocDetlMapper.xml
+++ b/src/main/resources/mapper/LocDetlMapper.xml
@@ -27,7 +27,7 @@
<result column="item_num" property="itemNum" />
<result column="safe_qty" property="safeQty" />
<result column="weight" property="weight" />
- <result column="man_length" property="manLength" />
+<!-- <result column="man_length" property="manLength" />-->
<result column="volume" property="volume" />
<result column="three_code" property="threeCode" />
<result column="supp" property="supp" />
@@ -124,17 +124,17 @@
<when test="batch != null and batch != ''">
and a.batch = #{batch}
</when>
- <otherwise>
- and (a.batch IS NULL OR a.batch = '')
- </otherwise>
+<!-- <otherwise>-->
+<!-- and (a.batch IS NULL OR a.batch = '')-->
+<!-- </otherwise>-->
</choose>
<choose>
<when test="brand != null and brand != ''">
and a.brand = #{brand}
</when>
- <otherwise>
- and (a.brand IS NULL OR a.brand = '')
- </otherwise>
+<!-- <otherwise>-->
+<!-- and (a.brand IS NULL OR a.brand = '')-->
+<!-- </otherwise>-->
</choose>
<choose>
<when test="standby1 != null and standby1 != ''">
@@ -148,41 +148,41 @@
<when test="standby2 != null and standby2 != ''">
and a.standby2 = #{standby2}
</when>
- <otherwise>
- and (a.standby2 IS NULL OR a.standby2 = '')
- </otherwise>
+<!-- <otherwise>-->
+<!-- and (a.standby2 IS NULL OR a.standby2 = '')-->
+<!-- </otherwise>-->
</choose>
<choose>
<when test="standby3 != null and standby3 != ''">
and a.standby3 = #{standby3}
</when>
- <otherwise>
- and (a.standby3 IS NULL OR a.standby3 = '')
- </otherwise>
+<!-- <otherwise>-->
+<!-- and (a.standby3 IS NULL OR a.standby3 = '')-->
+<!-- </otherwise>-->
</choose>
<choose>
<when test="boxType1 != null and boxType1 != ''">
and a.box_type1 = #{boxType1}
</when>
- <otherwise>
- and (a.box_type1 IS NULL OR a.box_type1 = '')
- </otherwise>
+<!-- <otherwise>-->
+<!-- and (a.box_type1 IS NULL OR a.box_type1 = '')-->
+<!-- </otherwise>-->
</choose>
<choose>
<when test="boxType2 != null and boxType2 != ''">
and a.box_type2 = #{boxType2}
</when>
- <otherwise>
- and (a.box_type2 IS NULL OR a.box_type2 = '')
- </otherwise>
+<!-- <otherwise>-->
+<!-- and (a.box_type2 IS NULL OR a.box_type2 = '')-->
+<!-- </otherwise>-->
</choose>
<choose>
<when test="boxType3 != null and boxType3 != ''">
and a.box_type3 = #{boxType3}
</when>
- <otherwise>
- and (a.box_type3 IS NULL OR a.box_type3 = '')
- </otherwise>
+<!-- <otherwise>-->
+<!-- and (a.box_type3 IS NULL OR a.box_type3 = '')-->
+<!-- </otherwise>-->
</choose>
</sql>
<sql id="batchSeqNew">
diff --git a/src/main/webapp/static/js/orderPakout/out.js b/src/main/webapp/static/js/orderPakout/out.js
index 0cd07ec..70132ee 100644
--- a/src/main/webapp/static/js/orderPakout/out.js
+++ b/src/main/webapp/static/js/orderPakout/out.js
@@ -4,7 +4,7 @@
base: baseUrl + "/static/layui/lay/modules/"
}).extend({
notice: 'notice/notice',
-}).use(['table','laydate', 'form', 'util', 'admin', 'notice', 'treeTable', 'xmSelect', 'tableMerge', 'tableX'], function(){
+}).use(['table', 'laydate', 'form', 'util', 'admin', 'notice', 'treeTable', 'xmSelect', 'tableMerge', 'tableX'], function () {
var table = layui.table;
var $ = layui.jquery;
var layer = layui.layer;
@@ -21,7 +21,7 @@
insTb2 = table.render({
elem: '#orderDetlTable',
headers: {token: localStorage.getItem('token')},
- url: baseUrl+'/order/pakout/orderDetl/pakout/list/auth',
+ url: baseUrl + '/order/pakout/orderDetl/pakout/list/auth',
page: true,
limit: 15,
limits: [15, 30, 50, 100, 200, 500],
@@ -30,19 +30,19 @@
where: {order_id: 9999999999},
cols: [[
{type: 'checkbox'}
- ,{type: 'numbers', title: '#'}
- ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl', width: 160}
- ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栫爜', width: 160}
- ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', width: 200}
- ,{field: 'standby1', align: 'center',title: '鏈哄彴鍙�'}
- ,{field: 'specs', align: 'center',title: '瑙勬牸'}
+ , {type: 'numbers', title: '#'}
+ , {field: 'orderNo', align: 'center', title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl', width: 160}
+ , {field: 'matnr', align: 'center', title: '鍟嗗搧缂栫爜', width: 160}
+ , {field: 'maktx', align: 'center', title: '鍟嗗搧鍚嶇О', width: 200}
+ , {field: 'standby1', align: 'center', title: '鏈哄彴鍙�'}
+ , {field: 'specs', align: 'center', title: '瑙勬牸'}
// ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
// ,{field: 'qty', align: 'center',title: '浣滀笟鏁伴噺', style: 'font-weight: bold'}
- ,{field: 'enableQty', align: 'center',title: '寰呭嚭鏁伴噺', style: 'font-weight: bold'}
+ , {field: 'enableQty', align: 'center', title: '寰呭嚭鏁伴噺', style: 'font-weight: bold'}
// ,{field: 'name', align: 'center',title: '鍚嶇О'}
// ,{field: 'model', align: 'center',title: '鍨嬪彿'}
- ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true}
- ,{field: 'barcode', align: 'center',title: '鍟嗗搧鏉$爜', hide: true}
+ , {field: 'unit', align: 'center', title: '鍗曚綅', hide: true}
+ , {field: 'barcode', align: 'center', title: '鍟嗗搧鏉$爜', hide: true}
// ,{field: 'supplier', align: 'center',title: '渚涘簲鍟�'}
// ,{field: 'unitPrice', align: 'center',title: '鍗曚环'}
// ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�'}
@@ -54,7 +54,7 @@
// ,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳'}
// ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿'}
// ,{field: 'memo', align: 'center',title: '澶囨敞'}
- ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width: 160}
+ , {fixed: 'right', title: '鎿嶄綔', align: 'center', toolbar: '#operate', width: 160}
]],
request: {
pageName: 'curr',
@@ -71,11 +71,11 @@
response: {
statusCode: 200
},
- done: function(res, curr, count) {
+ done: function (res, curr, count) {
if (res.code === 403) {
- top.location.href = baseUrl+"/";
+ top.location.href = baseUrl + "/";
}
- pageCurr=curr;
+ pageCurr = curr;
limit();
}
});
@@ -134,20 +134,20 @@
success: function (res) {
layer.close(loadIndex);
var tableCache;
- if (res.code === 200){
+ if (res.code === 200) {
layer.open({
type: 1
- ,title: false
- ,closeBtn: false
- ,offset: '50px'
- ,area: ['1200px', '700px']
- ,shade: 0.5
- ,shadeClose: false
- ,btn: ['绔嬪嵆鍑哄簱', '绋嶅悗澶勭悊']
- ,btnAlign: 'c'
- ,moveType: 1 //鎷栨嫿妯″紡锛�0鎴栬��1
- ,content: $('#pakoutPreviewBox').html()
- ,success: function(layero, index){
+ , title: false
+ , closeBtn: false
+ , offset: '50px'
+ , area: ['1200px', '700px']
+ , shade: 0.5
+ , shadeClose: false
+ , btn: ['绔嬪嵆鍑哄簱', '绋嶅悗澶勭悊']
+ , btnAlign: 'c'
+ , moveType: 1 //鎷栨嫿妯″紡锛�0鎴栬��1
+ , content: $('#pakoutPreviewBox').html()
+ , success: function (layero, index) {
stoPreTabIdx = table.render({
elem: '#stoPreTab',
data: res.data,
@@ -160,11 +160,35 @@
{field: 'orderNo', title: '鍗曟嵁缂栧彿', merge: true, align: 'center'},
{field: 'title', title: '鍟嗗搧', merge: true, align: 'center', width: 350},
{field: 'standby1', title: '鏈哄彴鍙�', align: 'center'},
- {field: 'anfme', title: '鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'},
+ {
+ field: 'anfme',
+ title: '鏁伴噺',
+ align: 'center',
+ width: 90,
+ style: 'font-weight: bold'
+ },
{field: 'locNo', title: '璐т綅', align: 'center', width: 100, templet: '#locNoTpl'},
- {field: 'frozen$', title: '鏄庣粏', align: 'center', width: 90, templet: '#locFrozen'},
- {field: 'frozenLoc$', title: '搴撲綅', align: 'center', width: 90, templet: '#locFrozenLoc'},
- {field: 'staNos', align: 'center', title: '鍑哄簱绔�', merge: ['locNo'], templet: '#tbBasicTbStaNos'},
+ {
+ field: 'frozen$',
+ title: '鏄庣粏',
+ align: 'center',
+ width: 90,
+ templet: '#locFrozen'
+ },
+ {
+ field: 'frozenLoc$',
+ title: '搴撲綅',
+ align: 'center',
+ width: 90,
+ templet: '#locFrozenLoc'
+ },
+ {
+ field: 'staNos',
+ align: 'center',
+ title: '鍑哄簱绔�',
+ merge: ['locNo'],
+ templet: '#tbBasicTbStaNos'
+ },
{type: 'checkbox', merge: ['locNo']},
]],
done: function (res) {
@@ -175,9 +199,9 @@
});
// 淇敼鍑哄簱绔�
form.on('select(tbBasicTbStaNos)', function (obj) {
- let index = obj.othis.parents('tr').attr("data-index");
+ let index = obj.othis.parents('tr').attr("data-index");
let data = tableCache[index];
- for (let i = 0; i<tableCache.length; i++) {
+ for (let i = 0; i < tableCache.length; i++) {
if (tableCache[i].locNo === data.locNo) {
tableCache[i]['staNo'] = Number(obj.elem.value);
}
@@ -194,18 +218,18 @@
}
modifySta(stoPreTabData);
});
+
// 鎵归噺淇敼鍑哄簱绔� - 绔欑偣閫夋嫨
function modifySta(stoPreTabData) {
// 鍑哄簱绔欏彇浜ら泦
let staBatchSelectVal = [];
- for(let i = 0; i<stoPreTabData.length; i++) {
+ for (let i = 0; i < stoPreTabData.length; i++) {
let staNos = stoPreTabData[i].staNos;
if (staNos !== null) {
if (staBatchSelectVal.length === 0) {
staBatchSelectVal = staNos;
} else {
- staBatchSelectVal = staBatchSelectVal.filter(val =>
- {
+ staBatchSelectVal = staBatchSelectVal.filter(val => {
return new Set(staNos).has(val)
}
)
@@ -231,8 +255,8 @@
let loadIdx = layer.load(2);
let batchSta = Number(obj.field.batchSta);
let arr = [];
- for (let j = 0; j<stoPreTabData.length; j++) {
- for (let i = 0; i<tableCache.length; i++) {
+ for (let j = 0; j < stoPreTabData.length; j++) {
+ for (let i = 0; i < tableCache.length; i++) {
if (tableCache[i].orderNo === stoPreTabData[j].orderNo
&& tableCache[i].matnr === stoPreTabData[j].matnr
&& tableCache[i].locNo === stoPreTabData[j].locNo) {
@@ -249,7 +273,8 @@
arr.forEach(item => {
$('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .layui-select-title').find("input").css("color", "blue");
});
- layer.close(loadIdx); layer.close(ddIndex);
+ layer.close(loadIdx);
+ layer.close(ddIndex);
return false;
});
// 寮圭獥涓嶅嚭鐜版粴鍔ㄦ潯
@@ -260,18 +285,18 @@
}
}
- ,yes: function(index, layero){
+ , yes: function (index, layero) {
//鎸夐挳銆愮珛鍗冲嚭搴撱�戠殑鍥炶皟
pakout(tableCache, index);
}
- ,btn2: function(index, layero){
+ , btn2: function (index, layero) {
//鎸夐挳銆愮◢鍚庡鐞嗐�戠殑鍥炶皟
layer.close(index)
//return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
}
});
- } else if (res.code === 403){
- top.location.href = baseUrl+"/";
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
} else {
layer.msg(res.msg, {icon: 2})
}
@@ -305,7 +330,6 @@
}
-
/* 鍒犻櫎璁㈠崟 */
function doDelSensor(obj) {
layer.confirm('纭畾瑕佸垹闄ら�変腑鏁版嵁鍚楋紵', {
@@ -315,18 +339,18 @@
layer.close(i);
var loadIndex = layer.load(2);
$.ajax({
- url: baseUrl+"/sensor/delete/auth",
+ url: baseUrl + "/sensor/delete/auth",
headers: {'token': localStorage.getItem('token')},
data: {ids: obj.ids},
method: 'POST',
success: function (res) {
layer.close(loadIndex);
- if (res.code === 200){
+ if (res.code === 200) {
layer.msg(res.msg, {icon: 1});
$(".layui-laypage-btn")[0].click();
- } else if (res.code === 403){
- top.location.href = baseUrl+"/";
- }else {
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
layer.msg(res.msg, {icon: 2});
}
}
@@ -337,10 +361,10 @@
// 淇敼鐘舵��
form.on('switch(statusSwitch)', function (obj) {
- var index = obj.othis.parents('tr').attr("data-index");
+ var index = obj.othis.parents('tr').attr("data-index");
var data = tableData[index];
- data[this.name] = obj.elem.checked?1:0;
- http.post(baseUrl+"/sensor/edit/auth", {id: data.id, status: data[this.name]}, function (res) {
+ data[this.name] = obj.elem.checked ? 1 : 0;
+ http.post(baseUrl + "/sensor/edit/auth", {id: data.id, status: data[this.name]}, function (res) {
layer.msg(res.msg, {icon: 1});
})
})
@@ -351,7 +375,7 @@
function tableReload(child) {
var searchData = {};
- $.each($('#search-box [name]').serializeArray(), function() {
+ $.each($('#search-box [name]').serializeArray(), function () {
searchData[this.name] = this.value;
});
(child ? parent.tableIns : tableIns).reload({
@@ -370,14 +394,14 @@
$.ajax({
url: baseUrl + "/out/pakout/orderDetlIds/auth",
headers: {'token': localStorage.getItem('token')},
- data: { orderId : orderId },
+ data: {orderId: orderId},
method: 'POST',
success: function (res) {
layer.close(loadIndex);
- if (res.code === 200){
+ if (res.code === 200) {
pakoutPreview(res.data);
- } else if (res.code === 403){
- top.location.href = baseUrl+"/";
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
} else {
layer.msg(res.msg, {icon: 2});
}
diff --git a/src/main/webapp/static/js/wrkMast/wrkMast.js b/src/main/webapp/static/js/wrkMast/wrkMast.js
index b367be3..c5a1935 100644
--- a/src/main/webapp/static/js/wrkMast/wrkMast.js
+++ b/src/main/webapp/static/js/wrkMast/wrkMast.js
@@ -21,15 +21,16 @@
cols: [[
{type: 'checkbox'}
,{field: 'wrkNo', align: 'center',title: '宸ヤ綔鍙�',sort: true, width: 95}
+ ,{field: 'wrkCode', align: 'center',title: '涓嬪彂宸ヤ綔鍙�',sort: true, width: 120}
,{field: 'ioTime$', align: 'center',title: '宸ヤ綔鏃堕棿',sort: true, width: 170}
,{field: 'wrkSts$', align: 'center',title: '宸ヤ綔鐘舵��', width: 120}
,{field: 'ioType$', align: 'center',title: '鍏ュ嚭搴撶被鍨�', width: 140}
,{field: 'ioPri', align: 'center',title: '浼樺厛绾�'}
,{field: 'taskType$', align: 'center',title: '浠诲姟绫诲瀷'}
,{field: 'barcode', align: 'center',title: '鏉$爜', width: 120}
- ,{field: 'crnNo$', align: 'center',title: '鍫嗗灈鏈�'}
- ,{field: 'sourceStaNo$', align: 'center',title: '婧愮珯'}
- ,{field: 'staNo$', align: 'center',title: '鐩爣绔�'}
+ ,{field: 'crnNo$', align: 'center',title: '鍫嗗灈鏈�', width: 95}
+ ,{field: 'sourceStaNo$', align: 'center',title: '婧愮珯', width: 95}
+ ,{field: 'staNo$', align: 'center',title: '鐩爣绔�', width: 95}
,{field: 'sourceLocNo', align: 'center',title: '婧愬簱浣�', width: 120}
,{field: 'locNo', align: 'center',title: '鐩爣搴撲綅', width: 120}
,{field: 'preHave', align: 'center',title: '鍏堝叆鍝�', hide: true}
--
Gitblit v1.9.1