From f08dd93e49e8461f362c8f45f17fe10e0fbdebec Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期一, 12 一月 2026 18:54:58 +0800
Subject: [PATCH] #新增和得码入库流程,渝程进仓后续下发货主转换
---
src/main/webapp/static/js/locDetlStatis/locDetlStatis.js | 77 +++++++++++++++++++++++++-------------
1 files changed, 51 insertions(+), 26 deletions(-)
diff --git a/src/main/webapp/static/js/locDetlStatis/locDetlStatis.js b/src/main/webapp/static/js/locDetlStatis/locDetlStatis.js
index aac1566..eaa774c 100644
--- a/src/main/webapp/static/js/locDetlStatis/locDetlStatis.js
+++ b/src/main/webapp/static/js/locDetlStatis/locDetlStatis.js
@@ -5,6 +5,8 @@
];
arrRemove(detlCols, "field", "anfme")
arrRemove(detlCols, "field", "zpallet")
+ arrRemove(detlCols, "field", "orderNo")
+ // arrRemove(detlCols, "field", "memo")
cols.push.apply(cols, detlCols);
// cols.push({field: 'anfme', align: 'center',title: '鏁伴噺', style: 'font-weight: bold'}
// )
@@ -24,8 +26,8 @@
headers: {token: localStorage.getItem('token')},
url: baseUrl+'/locDetl/statis/auth',
page: true,
- limit: 16,
- limits: [16, 30, 50, 100, 200, 500],
+ limit: 20,
+ limits: [20, 30, 50, 100, 200, 500],
even: true,
toolbar: '#toolbar',
cellMinWidth: 50,
@@ -59,6 +61,19 @@
res.data[_index][data.value] = 'N';
}
});
+ /**
+ * 鏄剧ず搴撳瓨鎬绘暟閲�
+ */
+ $.ajax({
+ url: baseUrl+"/locDetl/count",
+ headers: {'token': localStorage.getItem('token')},
+ contentType:'application/json;charset=UTF-8',
+ method: 'POST',
+ success: function (res) {
+ $("#countNum").text(res.data + '涓�');
+ }
+ });
+
}
});
@@ -90,45 +105,55 @@
var checkStatus = table.checkStatus(obj.config.id);
switch(obj.event) {
case 'exportAll':
- layer.closeAll();
- layer.load(1, {shade: [0.1,'#fff']});
- location.href = baseUrl + "/locDetl/statis/export";
- layer.closeAll('loading');
- break;
- case 'exportData':
- layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){
- var titles=[];
- var fields=[];
- obj.config.cols[0].map(function (col) {
- if (col.type === 'normal' && col.hide === false && col.toolbar == null) {
- titles.push(col.title);
- fields.push(col.field);
- }
- });
+ layer.confirm('纭畾瀵煎嚭Excel鍚楋紵', {shadeClose: true}, function(){
+ // 鏀堕泦鎼滅储鏉′欢
var exportData = {};
$.each($('#search-box [name]').serializeArray(), function() {
exportData[this.name] = this.value;
});
+
var param = {
- 'locDetl': exportData,
- 'fields': fields
+ locDetl: exportData
};
+
$.ajax({
- url: baseUrl+"/locDetl/export/auth",
+ url: baseUrl + "/locDetl/statis/export/auth",
headers: {'token': localStorage.getItem('token')},
data: JSON.stringify(param),
- dataType:'json',
- contentType:'application/json;charset=UTF-8',
+ dataType: 'json',
+ contentType: 'application/json;charset=UTF-8',
method: 'POST',
success: function (res) {
layer.closeAll();
- if (res.code === 200) {
- table.exportFile(titles,res.data,'xls');
+ if (res.code === 200 && res.data && res.data.length > 0) {
+ var titles = ['搴撳瓨鏁伴噺', '鍟嗗搧缂栧彿', '澶囨敞', '閲囪喘鍗曞彿', '鏉$爜UPC', '鍗曠姣涢噸(kg)', '瀹㈡埛PO'];
+ var fieldKeys = ['anfme', 'matnr', 'memo', 'boxType3', 'standby2', 'units', 'standby1'];
+
+ var exportData = res.data.map(function(item) {
+ return [
+ item.anfme || '',
+ item.matnr || '',
+ item.memo || '', // 濡傛灉 maktx 涓虹┖鍙粯璁�
+ item.boxType3 || '',
+ item.standby2 || '',
+ item.units || '',
+ item.standby1 || '' // 濡傚瓧娈垫槸 order_no 鏀规垚 item.order_no
+ ];
+ });
+
+ table.exportFile(titles, exportData, 'xls');
+ layer.msg('瀵煎嚭鎴愬姛锛屽叡 ' + res.data.length + ' 鏉℃暟鎹�', {icon: 1});
+ } else if (res.code === 200) {
+ layer.msg('娌℃湁绗﹀悎鏉′欢鐨勬暟鎹彲瀵煎嚭', {icon: 2});
} else if (res.code === 403) {
- top.location.href = baseUrl+"/";
+ top.location.href = baseUrl + "/";
} else {
- layer.msg(res.msg)
+ layer.msg(res.msg || '瀵煎嚭澶辫触');
}
+ },
+ error: function() {
+ layer.closeAll();
+ layer.msg('缃戠粶閿欒锛屽鍑哄け璐�');
}
});
});
--
Gitblit v1.9.1