From 04e6352d22eb928700d606bdf4e40e0eb2cfe61b Mon Sep 17 00:00:00 2001
From: mrzhssss <pro6@qq.com>
Date: 星期四, 16 十二月 2021 14:29:26 +0800
Subject: [PATCH] 更新
---
src/main/webapp/static/js/locNormal/locNormal.js | 57 +++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 47 insertions(+), 10 deletions(-)
diff --git a/src/main/webapp/static/js/locNormal/locNormal.js b/src/main/webapp/static/js/locNormal/locNormal.js
index 28424f4..fa7b34f 100644
--- a/src/main/webapp/static/js/locNormal/locNormal.js
+++ b/src/main/webapp/static/js/locNormal/locNormal.js
@@ -10,7 +10,7 @@
cols.push.apply(cols, locNormalCols);
cols.push(
{field: 'warehouse$', align: 'center', title: '搴撳尯'}
- , {field: 'state', align: 'center', title: '鍑哄叆搴撶姸鎬�', templet: '#locNormalState'}
+ , {field: 'state$', align: 'center', title: '鍑哄叆搴撶姸鎬�', templet: '#locNormalState'}
, {field: 'modiUser$', align: 'center', title: '淇敼浜哄憳', hide: true}
, {field: 'modiTime$', align: 'center', title: '淇敼鏃堕棿', hide: true}
, {field: 'appeTime$', align: 'center', title: '鍒涘缓鏃堕棿', hide: true}
@@ -107,6 +107,45 @@
}
});
break;
+ // 瀵煎嚭
+ case 'exportData':
+ layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){
+ var fields=[];
+ var titles=[];
+ var exportData = {};
+ obj.config.cols[0].map(function (col) {
+ if (col.type === 'normal' && col.hide === false && col.toolbar == null) {
+ titles.push(col.title);
+ fields.push(col.field);
+ }
+ });
+ $.each($('#search-box [name]').serializeArray(), function() {
+ exportData[this.name] = this.value;
+ });
+ var param = {
+ 'exportData': exportData,
+ 'fields': fields
+ };
+ $.ajax({
+ url: baseUrl+"/locNormal/export/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: JSON.stringify(param),
+ dataType:'json',
+ contentType:'application/json;charset=UTF-8',
+ method: 'POST',
+ success: function (res) {
+ layer.closeAll();
+ if (res.code === 200) {
+ table.exportFile(titles,res.data,'xls');
+ } else if (res.code === 403) {
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg)
+ }
+ }
+ });
+ });
+ break;
}
});
@@ -128,15 +167,6 @@
pageSize: 'limit'
},
parseData: function (res) {
- // 瑙f瀽搴撳尯鍚嶇О
- var records = res.data.records;
- records.map(function (item) {
- locArea.map(function (d) {
- if (d.uuid == item.warehouse) {
- item.warehouse$ = d.name;
- }
- })
- });
return {
'code': res.code,
'msg': res.msg,
@@ -148,6 +178,7 @@
statusCode: 200
},
done: function (res, curr, count) {
+ console.log(res);
if (res.code === 403) {
top.location.href = baseUrl + "/";
}
@@ -258,6 +289,12 @@
}
switch (obj.event) {
case 'outLocNormal':
+ var warehourse = data.warehouse;
+ if(warehourse !== 'cs'){
+ layer.msg("鍙兘鍑烘潗鏂欏钩浠�");
+ return;
+ }
+
layer.confirm('纭畾瑕佸嚭搴揫' + data.matnr + ']鍚楋紵', {
btn: ['纭畾', '鍙栨秷'] //鍙互鏃犻檺涓寜閽�
}, function (index, layero) {
--
Gitblit v1.9.1