From 513ae49dd33d2e3fb9c4513ea3be2e501c4a80f2 Mon Sep 17 00:00:00 2001 From: pang.jiabao <pang_jiabao@163.com> Date: 星期一, 10 二月 2025 08:48:37 +0800 Subject: [PATCH] 库存明细行内容超出隐藏,默认显示500条数据 --- src/main/webapp/static/js/order/order.js | 51 ++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 42 insertions(+), 9 deletions(-) diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js index 232a262..3e27de8 100644 --- a/src/main/webapp/static/js/order/order.js +++ b/src/main/webapp/static/js/order/order.js @@ -47,6 +47,8 @@ {align: 'center', title: '鏄庣粏', toolbar: '#tbLook', minWidth: 160, width: 160}, {field: 'createTime$', title: '鍒涘缓鏃堕棿', minWidth: 200, width: 200}, {field: 'settle$', align: 'center', title: '鐘舵��', templet: '#settleTpl', minWidth: 160, width: 160}, + {field: 'cstmrName', align: 'center',title: '瀹㈡埛鍚嶇О'}, + {field: 'itemName', align: 'center',title: '璋冩嫧鍒�'}, {field: 'memo', align: 'center',title: '澶囨敞', hide: true}, {field: 'createBy$', align: 'center', title: '鎿嶄綔鍛�', minWidth: 160, width: 160}, {align: 'center', title: '鎿嶄綔', toolbar: '#operate', width: 260} @@ -78,6 +80,30 @@ // 鎼滅储 form.on('submit(tbSearch)', function (data) { insTb.reload({where: data.field, page: {curr: 1}}); + }); + + // 瀵煎嚭鎵�鏈� + form.on('submit(exportAll)', function (data) { + layer.closeAll(); + layer.load(1, {shade: [0.1,'#fff']}); + $.ajax({ + url: baseUrl+"/order/exportAll/auth", + headers: {'token': localStorage.getItem('token')}, + data: {}, + dataType:'json', + contentType:'application/json;charset=UTF-8', + method: 'POST', + success: function (res) { + if (res.code === 200) { + table.exportFile(['鍗曟嵁缂栧彿','鏁伴噺','浣滀笟鏁伴噺','瀹屾垚鏁伴噺','鍟嗗搧缂栫爜','鍟嗗搧鍚嶇О','瑙勬牸','閲嶉噺','璐т富id','璐х墿褰㈡�乮d'],res.data,'xls'); + } else if (res.code === 403) { + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg) + } + } + }); + layer.closeAll('loading'); }); // 娣诲姞 @@ -193,7 +219,7 @@ {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160}, {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 160}, - // {field: 'batch', title: '鎵瑰彿'}, + {field: 'batch', title: '鎵瑰彿'}, {field: 'anfme', title: '鏁伴噺'}, {field: 'workQty', title: '浣滀笟鏁伴噺'}, {field: 'qty', title: '瀹屾垚鏁伴噺', style: 'font-weight: bold'}, @@ -206,7 +232,6 @@ // {field: 'inQty', title: '宸插叆搴撻噺'}, // {field: 'color', title: '棰滆壊'}, // {field: 'specs', title: '瑙勬牸'}, - {field: 'weight', title: '閲嶉噺'} ]], request: { pageName: 'curr', @@ -262,9 +287,13 @@ console.log(nList); for (let xi = 0; xi < nList.length; xi++) { if (nList[xi].anfme <= 0){ - layer.msg('鏄庣粏淇敼鏁伴噺涓嶅悎娉�', {icon: 2}); + layer.msg('鏄庣粏鏁伴噺涓嶅悎娉�', {icon: 2}); return false; } + // if (nList[xi].batch == null || nList[xi].batch == ""){ + // layer.msg('鎵规涓嶅悎娉�', {icon: 2}); + // return false; + // } if (nList[xi].anfme < nList[xi].workQty){ layer.msg('鏁伴噺涓嶈兘灏忎簬宸蹭綔涓氭暟閲�', {icon: 2}); return false; @@ -279,6 +308,11 @@ orderId: Number(data.field.id), docType: Number(data.field.docType), orderNo: data.field.orderNo, + cstmr: data.field.cstmr, + cstmrName: data.field.cstmrName, + tel: data.field.tel, + number: data.field.number, + itemName: data.field.itemName, orderDetlList: nList }), contentType:'application/json;charset=UTF-8', @@ -312,11 +346,11 @@ {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160}, {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 200}, {field: 'specs', title: '瑙勬牸'}, - {field: 'weight', title: '閲嶉噺', edit: true}, - {field: 'anfme', title: '鏁伴噺(淇敼)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, + {field: 'batch', title: '鎵规', edit: true}, + {field: 'anfme', title: '鏁伴噺(淇敼)kg', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, // {field: 'payment', title: '璐х墿鐘舵��',align: 'center', templet: '#payment'}, - {field: 'qty', title: '浣滀笟鏁伴噺', minWidth: 100, width: 100}, + {field: 'qty', title: '浣滀笟鏁伴噺kg', minWidth: 100, width: 100}, // {field: 'unit', title: '鍗曚綅', width: 80}, {field: 'memo', title: '澶囨敞' , edit: true}, {align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'} @@ -418,7 +452,7 @@ } } data[obj.field] = obj.value; - insTbSSXM.reloadData({data: xxDataList,scrollPos: true}); + insTbSSXM.reloadData({data: xxDataList,scrollPos: true}); }); $('#matAddBtnComment').click(function () { @@ -588,8 +622,7 @@ layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){ layer.closeAll(); layer.load(1, {shade: [0.1,'#fff']}); - // location.href = "http://192.168.4.121:8082/stwms/orderCheck/printExport/auth?orderNo="+data.orderNo; - location.href = "http://10.114.97.100:8080/stwms/order/printExport/auth?orderNo="+data.orderNo; + location.href = baseUrl+"/order/printExport/auth?orderNo="+data.orderNo; layer.closeAll('loading'); }); } -- Gitblit v1.9.1