From 4a912ddfed47ffc057c1885993034bbcc77acc5c Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期二, 11 七月 2023 17:22:50 +0800
Subject: [PATCH] 订单出库,对小数之间的减法误差进行修复
---
src/main/webapp/static/js/order/order.js | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 50 insertions(+), 4 deletions(-)
diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js
index 133061c..0bd403c 100644
--- a/src/main/webapp/static/js/order/order.js
+++ b/src/main/webapp/static/js/order/order.js
@@ -146,6 +146,7 @@
})
}
+
// 宸ュ叿鏉$偣鍑讳簨浠�
table.on('tool(order)', function (obj) {
var data = obj.data;
@@ -206,7 +207,7 @@
// {field: 'inQty', title: '宸插叆搴撻噺'},
// {field: 'color', title: '棰滆壊'},
// {field: 'specs', title: '瑙勬牸'},
- // {field: 'weight', title: '閲嶉噺'}
+ {field: 'weight', title: '閲嶉噺'}
]],
request: {
pageName: 'curr',
@@ -230,6 +231,9 @@
});
}
});
+ }
+ else if (layEvent === 'printExcel'){
+ printExcel(data);
}
});
@@ -256,6 +260,7 @@
return false;
}
let nList = admin.util.deepClone(xxDataList);
+ console.log(nList);
for (let xi = 0; xi < nList.length; xi++) {
if (nList[xi].anfme <= 0){
layer.msg('鏄庣粏淇敼鏁伴噺涓嶅悎娉�', {icon: 2});
@@ -312,20 +317,44 @@
{type: 'numbers', title: '#'},
{field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
{field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 200},
- {field: 'batch', title: '鎵瑰彿', edit: true},
{field: 'specs', title: '瑙勬牸'},
+ {field: 'weight', title: '閲嶉噺', edit: true},
{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: 'payment', title: '璐х墿鐘舵��',align: 'center', templet: '#payment'},
{field: 'qty', title: '浣滀笟鏁伴噺', 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'}
]],
- done: function (res) {
+ done: function (res, curr, count) {
$(layero).find('.layui-table-view').css('margin', '0');
+ var options = this;
+
+ // 鑾峰彇褰撳墠琛屾暟鎹�
+ table.getRowData = function(elem){
+ var index = $(elem).closest('tr').data('index');
+ return table.cache[options.id][index] || {};
+ };
+
+ $('.select-primary').on('change', function(){
+ var value = this.value; // 鑾峰彇閫変腑椤� value
+ var data = table.getRowData(this);
+ console.log(value);
+ xxDataList.forEach(res => {
+ if (data.id === res.id){
+ console.log(res)
+ res.payment = value;
+ }
+ })
+
+
+ });
},
size: ''
};
+
if (!isExpAdd) {
$.ajax({
url: baseUrl+"/order/detl/all/auth?orderId=" + expTpe.id,
@@ -396,7 +425,7 @@
}
}
data[obj.field] = obj.value;
- insTbSSXM.reload({data: xxDataList});
+ insTbSSXM.reloadData({data: xxDataList,scrollPos: true});
});
$('#matAddBtnComment').click(function () {
@@ -478,7 +507,11 @@
}
});
+
+
}
+
+
// 鍒犻櫎鍗曟嵁
function doDel(orderId) {
@@ -557,4 +590,17 @@
,type: 'datetime'
,range: true
});
+
+ function printExcel(data){
+ 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;
+ layer.closeAll('loading');
+ });
+ }
+
+
+
});
--
Gitblit v1.9.1