From 026e5b463f0ece904dec682c9e261069251b73e9 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期四, 04 七月 2024 15:53:04 +0800
Subject: [PATCH] #u8接口
---
src/main/webapp/static/js/pla/plaDetl.js | 106 ++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 81 insertions(+), 25 deletions(-)
diff --git a/src/main/webapp/static/js/pla/plaDetl.js b/src/main/webapp/static/js/pla/plaDetl.js
index 28312ed..f8e03f1 100644
--- a/src/main/webapp/static/js/pla/plaDetl.js
+++ b/src/main/webapp/static/js/pla/plaDetl.js
@@ -21,26 +21,26 @@
,{field: 'packageNo', align: 'center',title: '鍖呰鍙�',edit:true, sort:true}
,{field: 'proDate', align: 'center',title: '鐢熶骇鏃ユ湡',edit:true, width: 100}
,{field: 'weight', align: 'center',title: '閲嶉噺KG',edit:true,totalRow:true}
- ,{field: 'packageType', align: 'center',title: '鍖呰绫诲瀷',edit:true}
- ,{field: 'zpalletType', align: 'center',title: '鎵樼洏绫诲瀷',edit:true}
,{field: 'filmWrap', align: 'center',title: '缂犺啘',edit:true,hide:true}
- ,{field: 'fingerMelting', align: 'center',title: '鐔旀寚,g/10min',edit:true}
- ,{field: 'water', align: 'center',title: '姘村垎,ppm', hide:true,edit:true}
- ,{field: 'fusingPoint', align: 'center',title: '鐔旂偣,鈩�',edit:true}
- ,{field: 'vadf1', align: 'center',title: '鎸ュ彂娈�,%', hide:true,edit:true}
- ,{field: 'vadf2', align: 'center',title: '鍒嗚В娈�,%', hide:true,edit:true}
+ ,{field: 'fingerMelting', align: 'center',title: '鐔旀寚锛実/10min',edit:true}
+ ,{field: 'water', align: 'center',title: '姘村垎锛宲pm', hide:true,edit:true}
+ ,{field: 'fusingPoint', align: 'center',title: '鐔旂偣锛屸剝',edit:true}
+ ,{field: 'vadf1', align: 'center',title: '鎸ュ彂娈碉紝%', hide:true,edit:true}
+ ,{field: 'vadf2', align: 'center',title: '鍒嗚В娈碉紝%', hide:true,edit:true}
,{field: 'yellowness', align: 'center',title: '榛勫害',edit:true}
- ,{field: 'opacity', align: 'center',title: '涓嶉�忔槑搴�,%',edit:true}
+ ,{field: 'opacity', align: 'center',title: '涓嶉�忔槑搴︼紝%',edit:true}
,{field: 'l', align: 'center',title: 'L*', hide:true,edit:true}
,{field: 'a', align: 'center',title: 'a*', hide:true,edit:true}
,{field: 'b', align: 'center',title: 'b*', hide:true,edit:true}
- ,{field: 'fillIn', align: 'center',title: '濉厖,%',hide:true,edit:true}
- ,{field: 'str1', align: 'center',title: '鎷変几寮哄害,MPa',hide:true,edit:true}
- ,{field: 'str2', align: 'center',title: '鏂浼搁暱鐜�,%',hide:true,edit:true}
- ,{field: 'str3', align: 'center',title: '缂哄彛鍐插嚮,KJ/m2',hide:true,edit:true}
- ,{field: 'str4', align: 'center',title: '缁村崱,鈩�',hide:true,edit:true}
- ,{field: 'str5', align: 'center',title: '鍗婄粨鏅舵椂闂�,min',hide:true,edit:true}
- ,{field: 'str6', align: 'center',title: '缁撴櫠搴�.%',hide:true,edit:true}
+ ,{field: 'fillIn', align: 'center',title: '濉厖锛�%',hide:true,edit:true}
+ ,{field: 'str1', align: 'center',title: '鎷変几寮哄害锛孧Pa',hide:true,edit:true}
+ ,{field: 'str2', align: 'center',title: '鏂浼搁暱鐜囷紝%',hide:true,edit:true}
+ ,{field: 'str3', align: 'center',title: '缂哄彛鍐插嚮锛孠J/m2',hide:true,edit:true}
+ ,{field: 'str4', align: 'center',title: '缁村崱锛屸剝',hide:true,edit:true}
+ ,{field: 'str5', align: 'center',title: '鍗婄粨鏅舵椂闂达紝min',hide:true,edit:true}
+ ,{field: 'str6', align: 'center',title: '缁撴櫠搴︼紝%',hide:true,edit:true}
+ ,{field: 'packageType', align: 'center',title: '鍖呰绫诲瀷',edit:true}
+ ,{field: 'zpalletType', align: 'center',title: '鎵樼洏绫诲瀷',edit:true}
,{field: 'massState', align: 'center',title: '璐ㄩ噺鐘舵��',edit:true}
,{field: 'problem', align: 'center',title: '澶囨敞',edit:true,hide:true}
,{field: 'direction', align: 'center',title: '搴旂敤鏂瑰悜',edit:true,hide:true}
@@ -53,13 +53,16 @@
,{field: 'workshop', align: 'center',title: '鐢熶骇杞﹂棿',hide:true,edit:true}
,{field: 'line', align: 'center',title: '鐢熶骇绾�',hide:true,edit:true}
,{field: 'weightAnfme', align: 'center',title: '鍓╀綑閲嶉噺锛圞G锛�',edit:true,totalRow:true}
- ,{field: 'qtyAnfme', align: 'center',title: '寰呭嚭搴撻噸閲忥紙KG锛�',hide:true}
+ ,{field: 'qtyAnfme', align: 'center',title: '寰呭嚭搴撻噸閲忥紙KG锛�',hide:true,edit:true}
,{field: 'status', align: 'center',title: '鐘舵��', templet: setState ,edit:true}
,{field: 'stockFreeze', align: 'center',title: '搴撳瓨鍐荤粨', templet: '#stockFreezeTpl'}
,{field: 'stockFreezeBy', align: 'center',title: '鎿嶄綔浜哄憳',hide:true}
,{field: 'stockFreezeDate$', align: 'center',title: '鎿嶄綔鏃ユ湡',hide:true}
,{align: 'center', title: '娴佽浆鏄庣粏', toolbar: '#tbLook'}
,{field: 'createTime$', title: '鍒涘缓鏃堕棿', align: 'center' , sort:true}
+ ,{field: 'newBrand', align: 'center',title: '鍏宠仈鐗屽彿',edit:true}
+ ,{field: 'newBatch', align: 'center',title: '鍏宠仈鎵瑰彿',edit:true, width: 150, sort:true}
+ ,{field: 'newPackageNo', align: 'center',title: '鍏宠仈鍖呰鍙�',edit:true, sort:true}
// ,{field: 'orderNo', align: 'center',title: '鍗曞彿', hide:true}
// ,{field: 'pakoutTime', align: 'center',title: '鍑哄簱鏃堕棿', hide:true}
// ,{field: 'orderWeight', align: 'center',title: '閲嶉噺', hide:true}
@@ -90,7 +93,8 @@
layui.config({
base: baseUrl + "/static/layui/lay/modules/"
-}).use(['table','laydate', 'form', 'admin', 'dropdown'], function() {
+}).use(['table','laydate', 'form', 'admin', 'xmSelect', 'dropdown'], function() {
+ var dropdown = layui.dropdown;
var table = layui.table;
var $ = layui.jquery;
var layer = layui.layer;
@@ -120,7 +124,7 @@
},
//height: 'full',
limit: 16,
- limits: [ 50, 100, 200, 500,2000,5000,10000],
+ limits: [16, 50, 100, 200, 500,2000,5000,10000],
even: true,
toolbar: '#toolbar',
cellMinWidth: 50,
@@ -136,12 +140,18 @@
});
return arr;
}() ],
+ where:{
+ type: function() {
+ const tabPosition = JSON.parse(sessionStorage.getItem('easyweb-iframe_tempData')).tabPosition
+ return tabPosition.match(/\d+$/)[0] === '90646' ? '鏀规�ф爲鑴�' :
+ (tabPosition.match(/\d+$/)[0] === '90657' ? '绾爲鑴�' : '')
+ }
+ },
request: {
pageName: 'curr',
pageSize: 'limit'
},
parseData: function (res) {
- console.log(res)
return {
'code': res.code,
'msg': res.msg,
@@ -191,6 +201,36 @@
});
}
});
+
+ // 娓叉煋鐗╂枡閫夋嫨
+ var matXmSelect = xmSelect.render({
+ el: '#mat',
+ style: {
+ width: '270px',
+ },
+ autoRow: true,
+ toolbar: { show: true },
+ filterable: true,
+ remoteSearch: true,
+ remoteMethod: function(val, cb, show){
+ $.ajax({
+ url: baseUrl+"/pla/batch/all/get/kv",
+ headers: {'token': localStorage.getItem('token')},
+ data: {
+ condition: val
+ },
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200){
+ cb(res.data)
+ } else {
+ cb([]);
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ });
+ }
+ })
// 澶嶉�夋浜嬩欢
table.on('checkbox(plaDetl)', function(obj){
@@ -242,6 +282,7 @@
headers: {token: localStorage.getItem('token')},
url: baseUrl+'/plaQty/list/auth',
where: {
+ brand: data.brand,
batch: data.batch,
package_no: data.packageNo
},
@@ -466,9 +507,9 @@
layer.closeAll();
for (let i=0;i<printData.data.length;i++){
if (className === 'template-barcode') {
- printData.data[i]["barcodeUrl"]=baseUrl+"/mac/code/auth?type=1¶m="+(printData.data[i].batch+";"+printData.data[i].packageNo)
+ printData.data[i]["barcodeUrl"]=baseUrl+"/mac/code/auth?type=1¶m="+(printData.data[i].brand+";"+printData.data[i].batch+";"+printData.data[i].packageNo+";"+printData.data[i].line)
} else {
- printData.data[i]["barcodeUrl"]=baseUrl+"/mac/code/auth?type=2¶m="+(printData.data[i].batch+";"+printData.data[i].packageNo)
+ printData.data[i]["barcodeUrl"]=baseUrl+"/mac/code/auth?type=2¶m="+(printData.data[i].brand+";"+printData.data[i].batch+";"+printData.data[i].packageNo+";"+printData.data[i].line)
}
}
var tpl = templateDom.html();
@@ -519,8 +560,11 @@
tableReload(false);
});
+ // 鐢ㄦ潵鏍囪瘑鎼滅储閲嶇疆鏃讹紝鏀规�ф爲鑴傚拰绾爲鑴備粠鐐瑰嚮浜嬩欢浼犺繃鏉ュ悕绉帮紝杩涜鐗╄川绫诲埆闄愬畾
+ let customValue = undefined
// 閲嶇疆浜嬩欢
form.on('submit(reset)', function (data) {
+ customValue = $(this).attr('data-value');
reset();
});
@@ -528,7 +572,8 @@
clearFormVal($('#search-box'));
matCodeData = [];
tableReload();
- locTips(false);
+
+ // locTips(false);
}
// 閲嶈浇琛ㄦ牸
@@ -541,6 +586,13 @@
$.each($('#search-box [name]').serializeArray(), function() {
searchData[this.name] = this.value;
});
+ if(customValue !== undefined){
+ searchData['type'] = customValue
+ }
+ if(searchData.select){
+ searchData.batch = searchData.select;
+ searchData.select = null;
+ }
(child ? parent.tableIns : tableIns).reload({
where: searchData,
page: {
@@ -726,7 +778,7 @@
for(var i=0; i<data.length; i++){
if(data[i].LAY_CHECKED){
- if(data[i].status === "鏆傚叆搴�" || data[i].status === "寰呭叆搴�" || data[i].status === "鍏ㄩ儴鍑哄簱"|| data[i].weightAnfme <= data[i].qtyAnfme){
+ if(data[i].status === "鏆傚叆搴�" || data[i].status === "寰呭叆搴�" || data[i].status === "鍏ㄩ儴鍑哄簱"|| data[i].weightAnfme < data[i].qtyAnfme){
layer.msg("閫変腑鐨勬槑缁嗚繕鏈叆搴撴垨鑰呭凡鍏ㄩ儴鍑哄簱鎴栬�呮病鏈夊墿浣欏彲鍑洪噸閲忥紝璇烽噸鏂伴�夋嫨");
return;
}
@@ -737,10 +789,14 @@
layer.msg("閫変腑鐨勬槑缁嗕腑鍚湁澶氱鐗屽彿锛岃閲嶆柊閫夋嫨");
return;
}
- if(data[i].stockFreeze === 0){
- layer.msg("閫変腑鐨勬槑缁嗕腑鍚湁鍐荤粨鐨勫簱瀛橈紝璇疯В鍐诲悗鎿嶄綔");
+ if (data[i].zpalletType == null && data[i].packageType == null && data[i].massState == null) {
+ layer.msg("璐ㄩ噺鎸囨爣鏈笂浼�");
return;
}
+ // if(data[i].stockFreeze === 0){
+ // layer.msg("閫変腑鐨勬槑缁嗕腑鍚湁鍐荤粨鐨勫簱瀛橈紝璇疯В鍐诲悗鎿嶄綔");
+ // return;
+ // }
dataSave.push(data[i]);
}else {
dataOld.push(data[i]);
--
Gitblit v1.9.1