From 39196c12a4f6108b3b0790395c8bd202ba475719 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 31 七月 2020 09:21:58 +0800
Subject: [PATCH] #当前本版十分完美、冻结
---
src/main/webapp/static/js/common.js | 137 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 133 insertions(+), 4 deletions(-)
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index 7f8a9b6..da9fc8b 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -1,7 +1,7 @@
// 鐢熶骇
-var baseUrl = "/asrs";
+// var baseUrl = "/asrs";
// 娴嬭瘯
-// var baseUrl = "";
+var baseUrl = "";
// 璇︽儏绐楀彛-楂樺害
@@ -80,12 +80,141 @@
(child?parent:window).$('.'+res.data[i].code).css("display", "inline-block");
}
} else if (res.code === 403){
- top.location.href = baseUrl;
+ top.location.href = baseUrl+"/";
} else {
layer.msg(res.msg)
}
}
});
}
-
}
+
+
+// http璇锋眰
+!function (n) {
+ "use strict";
+
+ var http = {
+ toAjax: function (params) {
+ $.ajax(params);
+ },
+ get: function (url, data, callback) {
+ http.toAjax({
+ method: 'GET',
+ url: url,
+ data: data,
+ dataType: 'json',
+ header: {'token': localStorage.getItem('token')},
+ timeout: 10000,
+ cache: false,
+ 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) {
+
+ }
+ })
+ },
+ // 榛樿琛ㄥ崟
+ post: function (url, param, callback, type) {
+ var headerType;
+ if (type === 'json') {
+ headerType = {'Content-Type': 'application/json'}
+ } else {
+ headerType = {'Content-Type': 'application/x-www-form-urlencoded'}
+ }
+ headerType['token'] = localStorage.getItem('token');
+ http.toAjax({
+ method: 'POST',
+ url: url,
+ data: param,
+ dataType: 'json',
+ headers: headerType,
+ timeout: 10000,
+ cache: false,
+ 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) {
+
+ }
+ })
+ },
+ };
+ "function" == typeof define && define.amd ? define(function () {
+ return http
+ }) : "object" == typeof module && module.exports ? module.exports = http : n.http = http
+}(this);
+
+/*************************************************************************************************************/
+/********************************************** 鐗╂枡涓氬姟鎶借薄 ***************************************************/
+/*************************************************************************************************************/
+
+function arrRemove(arr, key, val) {
+ for(var 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