From dc210006de9ebe049c0dd5fcc1afcf1b23fa2de8 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期三, 22 七月 2020 15:57:55 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/common.js | 73 +++++++++++++++++++++++++++++++++++- 1 files changed, 70 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js index 3e2e453..fe57871 100644 --- a/src/main/webapp/static/js/common.js +++ b/src/main/webapp/static/js/common.js @@ -104,11 +104,17 @@ url: url, data: data, dataType: 'json', - header: {'Content-Type': 'application/json'}, + header: {'token': localStorage.getItem('token')}, timeout: 10000, cache: false, - success: function (result) { - callback(result); + success: function (res) { + if (res.code === 200){ + callback(res); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg); + } }, error: function (res, type) { @@ -151,3 +157,64 @@ return http }) : "object" == typeof module && module.exports ? module.exports = http : n.http = http }(this); + +/*************************************************************************************************************/ +/********************************************** 鐗╂枡涓氬姟鎶借薄 ***************************************************/ +/*************************************************************************************************************/ + +function arrRemove(arr, key, val) { + for(let i=arr.length-1; i>=0; i--){ + if(arr[i][key] === val){ + arr.splice(i,1); + } + } +} + +var matCols = [ + {field: 'matNo', align: 'center',title: '鍟嗗搧缂栫爜'} + ,{field: 'barcode', align: 'center',title: '鏉″舰鐮�'} + ,{field: 'matName', align: 'center',title: '鍟嗗搧鍚嶇О'} + ,{field: 'str1', align: 'center',title: '鍩烘湰鍗曚綅'} + ,{field: 'str2', align: 'center',title: '鍟嗗搧绫诲埆'} + ,{field: 'str3', align: 'center',title: '瑙勬牸鍨嬪彿'} + ,{field: 'str4', align: 'center',title: '鐘舵��', hide: true} + ,{field: 'str5', align: 'center',title: '鍔╄鐮�'} + ,{field: 'str6', align: 'center',title: '榛樿渚涘簲鍟�'} + ,{field: 'str7', align: 'center',title: '榛樿浠撳簱'} + // ,{field: 'str8', align: 'center',title: '鍝佺墝'} + // ,{field: 'str9', align: 'center',title: '閲囪喘鍛�'} + // ,{field: 'str10', align: 'center',title: '浜у湴'} + // ,{field: 'str11', align: 'center',title: '搴忓垪鍙风鐞�'} + // ,{field: 'str12', align: 'center',title: '鎵规绠$悊'} + // ,{field: 'str13', align: 'center',title: '淇濊川鏈熷崟浣�'} + // ,{field: 'str14', align: 'center',title: '淇濊川鏈熺鐞�'} + // ,{field: 'str15', align: 'center',title: '淇濊川鏈�'} + // ,{field: 'str16', align: 'center',title: '鍙攢鍞�'} + ,{field: 'str17', align: 'center',title: '鍙噰璐�', hide: true} + ,{field: 'str18', align: 'center',title: '鍙负瀛愪欢', hide: true} + // ,{field: 'str19', align: 'center',title: '鍙负缁勪欢'} + // ,{field: 'str20', align: 'center',title: '杈呭姪灞炴�х鐞�'} + ,{field: 'str21', align: 'center',title: '鎴愭湰璁$畻鏂规硶', hide: true} + ,{field: 'str22', align: 'center',title: '閲囪喘鍗曚綅', hide: true} + ,{field: 'str23', align: 'center',title: '閿�鍞崟浣�', hide: true} + // ,{field: 'num1', align: 'center',title: '棰勮澶╂暟'} + // ,{field: 'num2', align: 'center',title: '鏈�浣庡簱瀛樻暟閲�'} + // ,{field: 'num3', align: 'center',title: '鏈�楂樺簱瀛樻暟閲�'} + // ,{field: 'num4', align: 'center',title: '瀹夊叏搴撳瓨'} + // ,{field: 'num5', align: 'center',title: '绋庣巼'} +] + +var detlCols = [ + {field: 'matnr', align: 'center',title: '鍟嗗搧缂栫爜'} + ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О'} + ,{field: 'lgnum', align: 'center',title: '瑙勬牸'} + ,{field: 'type', align: 'center',title: '鍟嗗搧绫诲埆'} + // ,{field: 'mnemonic', align: 'center',title: '鍔╄鐮�'} + // ,{field: 'supplier', align: 'center',title: '渚涘簲鍟�'} + // ,{field: 'warehouse', align: 'center',title: '浠撳簱'} + // ,{field: 'brand', align: 'center',title: '鍝佺墝'} + ,{field: 'anfme', align: 'center',title: '鏁伴噺'} + ,{field: 'altme', align: 'center',title: '鍗曚綅'} + ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'} +] + -- Gitblit v1.9.1