From 98bcd061526cad604a83241cc94994e1e225982a Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期一, 10 二月 2025 09:21:03 +0800
Subject: [PATCH] 库存明细统计增加车间,树脂类型搜索框,默认统计库存状态为(已入库+部分出库+待出库),库存重量为0不显示记录
---
src/main/webapp/static/js/order/order.js | 80 +++++++++++++++++++++++++++++++--------
1 files changed, 63 insertions(+), 17 deletions(-)
diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js
index 65ada4d..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');
});
// 娣诲姞
@@ -146,6 +172,7 @@
})
}
+
// 宸ュ叿鏉$偣鍑讳簨浠�
table.on('tool(order)', function (obj) {
var data = obj.data;
@@ -191,9 +218,8 @@
{type: 'numbers'},
{field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
{field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 160},
- {field: 'owner$', title: '璐т富', width: 160},
- {field: 'payment$', 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',
@@ -230,6 +255,9 @@
});
}
});
+ }
+ else if (layEvent === 'printExcel'){
+ printExcel(data);
}
});
@@ -259,20 +287,19 @@
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;
}
}
- for (let xi = 0; xi < nList.length; xi++) {
- if (nList[xi].owner <= 0){
- layer.msg('璐т富缂栧彿璇锋煡鐪嬭揣涓绘。妗�', {icon: 2});
- return false;
- }
- }
+
layer.load(2);
$.ajax({
url: baseUrl+"/order/form/" + (isExpAdd?"add":"modify") + "/auth",
@@ -281,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',
@@ -313,13 +345,12 @@
{type: 'numbers', title: '#'},
{field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
{field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 200},
- {field: 'batch', title: '鎵瑰彿', edit: true},
{field: 'specs', title: '瑙勬牸'},
- {field: 'anfme', title: '鏁伴噺(淇敼)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
- {field: 'owner', title: '璐т富缂栧彿', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
- {field: 'payment', title: '璐т富缂栧彿', style: 'color: blue;font-weight: bold', templet: '#payment'},
+ {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'}
@@ -350,6 +381,7 @@
},
size: ''
};
+
if (!isExpAdd) {
$.ajax({
url: baseUrl+"/order/detl/all/auth?orderId=" + expTpe.id,
@@ -420,7 +452,7 @@
}
}
data[obj.field] = obj.value;
- insTbSSXM.reload({data: xxDataList});
+ insTbSSXM.reloadData({data: xxDataList,scrollPos: true});
});
$('#matAddBtnComment').click(function () {
@@ -502,7 +534,11 @@
}
});
+
+
}
+
+
// 鍒犻櫎鍗曟嵁
function doDel(orderId) {
@@ -582,5 +618,15 @@
,range: true
});
+ function printExcel(data){
+ layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){
+ layer.closeAll();
+ layer.load(1, {shade: [0.1,'#fff']});
+ location.href = baseUrl+"/order/printExport/auth?orderNo="+data.orderNo;
+ layer.closeAll('loading');
+ });
+ }
+
+
});
--
Gitblit v1.9.1