From 4eac82a5cb9db6cdfd3a127c8174af8e5c215560 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期二, 12 八月 2025 08:38:20 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/orderPakout/out.js | 100 ++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 92 insertions(+), 8 deletions(-)
diff --git a/src/main/webapp/static/js/orderPakout/out.js b/src/main/webapp/static/js/orderPakout/out.js
index b6ccc03..70ba831 100644
--- a/src/main/webapp/static/js/orderPakout/out.js
+++ b/src/main/webapp/static/js/orderPakout/out.js
@@ -32,16 +32,21 @@
{type: 'checkbox'}
,{type: 'numbers', title: '#'}
,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl', width: 160}
+ ,{field: 'cstmrName$', align: 'center',title: '瀹㈡埛', width: 160}
+ ,{field: 'standby1$', align: 'center',title: '鍑哄簱浠撳簱', width: 160}
,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栫爜', width: 160}
,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', width: 200}
- ,{field: 'batch', align: 'center',title: '搴忓垪鐮�'}
+ ,{field: 'batch', align: 'center',title: '鎵规'}
+ ,{field: 'sku', align: 'center',title: 'U8鏃у搧鍚�'}
,{field: 'specs', align: 'center',title: '瑙勬牸'}
- // ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
+ ,{field: 'anfme', align: 'center',title: '涓绘暟閲�'}
+ ,{field: 'weight', align: 'center',title: '杈呮暟閲�'}
+ ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: false}
+ ,{field: 'manu', align: 'center',title: '杈呭崟浣�'}
// ,{field: 'qty', 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: 'supplier', align: 'center',title: '渚涘簲鍟�'}
// ,{field: 'unitPrice', align: 'center',title: '鍗曚环'}
@@ -86,9 +91,32 @@
return false;
});
+ form.on('submit(defaultOutSta)', function (data) {
+ let val = $("#defaultOutStaSelect").val();
+ $.ajax({
+ url: baseUrl + "/user/updateDefaultOutSta",
+ headers: {'token': localStorage.getItem('token')},
+ contentType: 'application/json;charset=UTF-8',
+ data: JSON.stringify({
+ defaultOutSta: val
+ }),
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200){
+ layer.msg(res.msg, {icon: 1})
+ $("#defaultOutSta").html(val)
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg, {icon: 2})
+ }
+ }
+ })
+ return false;
+ });
+
/* 琛ㄦ牸2澶村伐鍏锋爮鐐瑰嚮浜嬩欢 */
table.on('toolbar(orderDetlTable)', function (obj) {
-
var checkStatus = table.checkStatus(obj.config.id).data;
if (obj.event === 'pakoutPreview') { // 娣诲姞
if (checkStatus.length === 0) {
@@ -108,8 +136,41 @@
return d.id;
});
doDelSensor({ids: ids});
+ } else if (obj.event === 'restartSync') {
+ restartSyncOrder(checkStatus.map(function (d) {
+ return d.id;
+ }))
}
});
+
+ function restartSyncOrder(ids) {
+ layer.confirm('纭畾瑕侀噸鏂板悓姝ヨ璁㈠崟鏁版嵁鍚楋紵', {
+ skin: 'layui-layer-admin',
+ shade: .1
+ }, function (i) {
+ layer.close(i);
+ var loadIndex = layer.load(2);
+ $.ajax({
+ url: baseUrl+"/order/restartSyncOrder",
+ headers: {'token': localStorage.getItem('token')},
+ contentType: 'application/json;charset=UTF-8',
+ data: JSON.stringify(ids),
+ method: 'POST',
+ success: function (res) {
+ layer.close(loadIndex);
+ 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 {
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ })
+
+ });
+ }
/* 琛ㄦ牸2宸ュ叿鏉$偣鍑讳簨浠� */
table.on('tool(orderDetlTable)', function (obj) {
@@ -129,7 +190,10 @@
url: baseUrl + "/out/pakout/preview/auth",
headers: {'token': localStorage.getItem('token')},
contentType: 'application/json;charset=UTF-8',
- data: JSON.stringify(ids),
+ data: JSON.stringify({
+ ids: ids,
+ cstateid: $("#defaultCstateid").val()
+ }),
method: 'POST',
success: function (res) {
layer.close(loadIndex);
@@ -159,10 +223,15 @@
// {type: 'checkbox', merge: ['orderNo']},
{field: 'orderNo', title: '鍗曟嵁缂栧彿', merge: true, align: 'center'},
{field: 'title', title: '鍟嗗搧', merge: true, align: 'center', width: 350},
- {field: 'batch', title: '搴忓垪鐮�', align: 'center'},
- {field: 'anfme', title: '鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'},
+ {field: 'batch', title: '鎵规', align: 'center'},
+ {field: 'initialWeight', title: '鍘熸墭鐩樿緟鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'},
+ {field: 'initialAnfme', title: '鍘熸墭鐩樻暟閲�', align: 'center', width: 90, style: 'font-weight: bold'},
+ {field: 'anfme', title: '涓绘暟閲�', align: 'center', width: 90, style: 'font-weight: bold'},
+ {field: 'weight', title: '杈呮暟閲�', align: 'center', width: 90, style: 'font-weight: bold'},
+ {field: 'unit', align: 'center',title: '鍗曚綅'},
{field: 'locNo', title: '璐т綅', align: 'center', width: 100, templet: '#locNoTpl'},
- {field: 'frozen$', title: '鍐荤粨', align: 'center', width: 90, templet: '#locFrozen'},
+ {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']},
]],
@@ -348,6 +417,21 @@
});
+$.ajax({
+ url: baseUrl + "/user/getDefaultOutSta",
+ headers: {'token': localStorage.getItem('token')},
+ contentType: 'application/json;charset=UTF-8',
+ data: {},
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200){
+ $("#defaultOutSta").html(res.data)
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }
+ }
+})
+
function tableReload(child) {
var searchData = {};
$.each($('#search-box [name]').serializeArray(), function() {
--
Gitblit v1.9.1