From 0916bb4ea987c0599b6af6bb8dd251a071770e05 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期四, 23 十月 2025 14:32:15 +0800
Subject: [PATCH] 通用下拉选择框值从视图获取
---
src/main/webapp/static/js/locDetlStatis/locDetlStatis.js | 41 +++++++++++++++++++++++++++++++++--------
1 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/src/main/webapp/static/js/locDetlStatis/locDetlStatis.js b/src/main/webapp/static/js/locDetlStatis/locDetlStatis.js
index aac1566..591f61c 100644
--- a/src/main/webapp/static/js/locDetlStatis/locDetlStatis.js
+++ b/src/main/webapp/static/js/locDetlStatis/locDetlStatis.js
@@ -1,11 +1,14 @@
var pageCurr;
function getCol() {
var cols = [
- {field: 'anfme', align: 'center',title: '搴撳瓨鏁伴噺', style: 'font-weight: bold'}
+ {field: 'brand', align: 'center',title: '鐗屽彿', style: 'font-weight: bold'},
+ {field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿', style: 'font-weight: bold'},
+ {field: 'workshop', align: 'center',title: '杞﹂棿', style: 'font-weight: bold'},
+ {field: 'weight', align: 'center',title: '搴撳瓨閲嶉噺锛圞G锛�', style: 'font-weight: bold'}
];
- arrRemove(detlCols, "field", "anfme")
- arrRemove(detlCols, "field", "zpallet")
- cols.push.apply(cols, detlCols);
+ // arrRemove(detlCols, "field", "anfme")
+ // arrRemove(detlCols, "field", "zpallet")
+ // cols.push.apply(cols, detlCols);
// cols.push({field: 'anfme', align: 'center',title: '鏁伴噺', style: 'font-weight: bold'}
// )
return cols;
@@ -17,17 +20,26 @@
var layer = layui.layer;
var layDate = layui.laydate;
var form = layui.form;
-
+ layDate.render({
+ elem: '.layui-laydate-range'
+ ,type: 'datetime'
+ ,range: true
+ });
// 鏁版嵁娓叉煋
tableIns = table.render({
elem: '#locDetlStatis',
headers: {token: localStorage.getItem('token')},
- url: baseUrl+'/locDetl/statis/auth',
+ url: baseUrl+'/pla/statis/auth',
page: true,
- limit: 16,
- limits: [16, 30, 50, 100, 200, 500],
+ limit: 20,
+ limits: [20, 30, 50, 100, 200, 500],
even: true,
toolbar: '#toolbar',
+ defaultToolbar: ['filter', 'exports', 'print', {
+ title: '鎻愮ず',
+ layEvent: 'LAYTABLE_TIPS',
+ icon: 'layui-icon-tips'
+ }],
cellMinWidth: 50,
cols: [getCol()],
request: {
@@ -59,6 +71,19 @@
res.data[_index][data.value] = 'N';
}
});
+ /**
+ * 鏄剧ず搴撳瓨鎬绘暟閲�
+ */
+ $.ajax({
+ url: baseUrl+"/locDetl/count",
+ headers: {'token': localStorage.getItem('token')},
+ contentType:'application/json;charset=UTF-8',
+ method: 'POST',
+ success: function (res) {
+ $("#countNum").text(res.data + '涓�');
+ }
+ });
+
}
});
--
Gitblit v1.9.1