From 8bc35cc4f75cfb435577e34763002f69def6a1a2 Mon Sep 17 00:00:00 2001
From: dubin <bindu_bean@163.com>
Date: 星期六, 07 二月 2026 16:53:18 +0800
Subject: [PATCH] 调试
---
src/main/webapp/static/js/locDetl/locDetl.js | 231 ++++++++++++++++++++++++++++++++++-----------------------
1 files changed, 138 insertions(+), 93 deletions(-)
diff --git a/src/main/webapp/static/js/locDetl/locDetl.js b/src/main/webapp/static/js/locDetl/locDetl.js
index 87a177c..b490aad 100644
--- a/src/main/webapp/static/js/locDetl/locDetl.js
+++ b/src/main/webapp/static/js/locDetl/locDetl.js
@@ -49,6 +49,35 @@
return cols;
}
+// 楂樹寒鏄剧ず搴撻緞澶т簬绛変簬1澶╃殑琛� - 娣辩孩鑹�
+function highlightStoreDateRows() {
+ setTimeout(function() {
+ var rows = $('.layui-table-body .layui-table tbody tr');
+
+ rows.each(function() {
+ var $row = $(this);
+ var storeDateText = $row.find('td[data-field="storeDate"] .layui-table-cell').text().trim();
+
+ // 灏濊瘯瑙f瀽搴撻緞鏁板��
+ var storeDays = parseInt(storeDateText);
+
+ // 濡傛灉搴撻緞澶т簬绛変簬1澶╋紝娣诲姞娣辩孩鑹茶儗鏅�
+ if (!isNaN(storeDays) && storeDays >= 1) {
+ $row.css({
+ 'background-color': '#f5222d', // 娣辩孩鑹茶儗鏅�
+ 'color': '#ffffff', // 鐧借壊鏂囧瓧
+ 'font-weight': 'bold'
+ });
+
+ // 涔熷彲浠ョ粰姣忎釜鍗曞厓鏍兼坊鍔犺竟妗�
+ $row.find('td').css({
+ 'border-bottom': '1px solid #ff7875'
+ });
+ }
+ });
+ }, 50); // 绋嶅井澧炲姞寤惰繜纭繚DOM瀹屽叏娓叉煋
+}
+
layui.use(['table','laydate', 'form'], function(){
var table = layui.table;
var $ = layui.jquery;
@@ -89,6 +118,10 @@
}
pageCurr=curr;
limit();
+
+ // 娣诲姞楂樹寒鏁堟灉 - 鍦ㄦ瘡娆¤〃鏍兼覆鏌撳畬鎴愬悗鎵ц
+ highlightStoreDateRows();
+
form.on('checkbox(tableCheckbox)', function (data) {
var _index = $(data.elem).attr('table-index')||0;
if(data.elem.checked){
@@ -119,6 +152,9 @@
}
pageCurr=curr;
limit();
+
+ // 鎺掑簭鍚庨噸鏂板簲鐢ㄩ珮浜�
+ highlightStoreDateRows();
}
});
});
@@ -137,7 +173,7 @@
content: 'locDetl_detail.html',
success: function(layero, index){
layer.getChildFrame('#data-detail-submit-edit', index).hide();
- clearFormVal(layer.getChildFrame('#detail', index));
+ clearFormVal(layer.getChildFrame('#detail', index));
layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
}
});
@@ -146,6 +182,10 @@
tableIns.reload({
page: {
curr: pageCurr
+ },
+ done: function(res, curr, count) {
+ // 鍒锋柊鍚庨噸鏂板簲鐢ㄩ珮浜�
+ highlightStoreDateRows();
}
});
limit();
@@ -267,35 +307,35 @@
if (param === undefined) {
layer.msg("鏃犳暟鎹�");
} else {
- layer.open({
- type: 2,
- title: '搴撲綅鍙疯鎯�',
- maxmin: true,
- area: [top.detailWidth, top.detailHeight],
- shadeClose: false,
- content: '../locMast/locMast_detail.html',
- success: function(layero, index){
- $.ajax({
- url: baseUrl+"/locMast/"+ param +"/auth",
- headers: {'token': localStorage.getItem('token')},
- method: 'GET',
- success: function (res) {
- if (res.code === 200){
- setFormVal(layer.getChildFrame('#detail', index), res.data, true);
- top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
- layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
- layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
- layero.find('iframe')[0].contentWindow.layui.form.render('select');
- layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
- } else if (res.code === 403){
- parent.location.href = "/";
- }else {
- layer.msg(res.msg)
- }
- }
- })
- }
- });
+ layer.open({
+ type: 2,
+ title: '搴撲綅鍙疯鎯�',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: false,
+ content: '../locMast/locMast_detail.html',
+ success: function(layero, index){
+ $.ajax({
+ url: baseUrl+"/locMast/"+ param +"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'GET',
+ success: function (res) {
+ if (res.code === 200){
+ setFormVal(layer.getChildFrame('#detail', index), res.data, true);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
+ layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ } else if (res.code === 403){
+ parent.location.href = "/";
+ }else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ }
+ });
}
break;
case 'modiUser':
@@ -303,35 +343,35 @@
if (param === undefined) {
layer.msg("鏃犳暟鎹�");
} else {
- layer.open({
- type: 2,
- title: '淇敼浜哄憳璇︽儏',
- maxmin: true,
- area: [top.detailWidth, top.detailHeight],
- shadeClose: false,
- content: '../user/user_detail.html',
- success: function(layero, index){
- $.ajax({
- url: baseUrl+"/user/"+ param +"/auth",
- headers: {'token': localStorage.getItem('token')},
- method: 'GET',
- success: function (res) {
- if (res.code === 200){
- setFormVal(layer.getChildFrame('#detail', index), res.data, true);
- top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
- layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
- layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
- layero.find('iframe')[0].contentWindow.layui.form.render('select');
- layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
- } else if (res.code === 403){
- parent.location.href = "/";
- }else {
- layer.msg(res.msg)
- }
- }
- })
- }
- });
+ layer.open({
+ type: 2,
+ title: '淇敼浜哄憳璇︽儏',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: false,
+ content: '../user/user_detail.html',
+ success: function(layero, index){
+ $.ajax({
+ url: baseUrl+"/user/"+ param +"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'GET',
+ success: function (res) {
+ if (res.code === 200){
+ setFormVal(layer.getChildFrame('#detail', index), res.data, true);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
+ layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ } else if (res.code === 403){
+ parent.location.href = "/";
+ }else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ }
+ });
}
break;
case 'appeUser':
@@ -339,35 +379,35 @@
if (param === undefined) {
layer.msg("鏃犳暟鎹�");
} else {
- layer.open({
- type: 2,
- title: '鍒涘缓鑰呰鎯�',
- maxmin: true,
- area: [top.detailWidth, top.detailHeight],
- shadeClose: false,
- content: '../user/user_detail.html',
- success: function(layero, index){
- $.ajax({
- url: baseUrl+"/user/"+ param +"/auth",
- headers: {'token': localStorage.getItem('token')},
- method: 'GET',
- success: function (res) {
- if (res.code === 200){
- setFormVal(layer.getChildFrame('#detail', index), res.data, true);
- top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
- layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
- layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
- layero.find('iframe')[0].contentWindow.layui.form.render('select');
- layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
- } else if (res.code === 403){
- parent.location.href = "/";
- }else {
- layer.msg(res.msg)
- }
- }
- })
- }
- });
+ layer.open({
+ type: 2,
+ title: '鍒涘缓鑰呰鎯�',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: false,
+ content: '../user/user_detail.html',
+ success: function(layero, index){
+ $.ajax({
+ url: baseUrl+"/user/"+ param +"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'GET',
+ success: function (res) {
+ if (res.code === 200){
+ setFormVal(layer.getChildFrame('#detail', index), res.data, true);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
+ layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ } else if (res.code === 403){
+ parent.location.href = "/";
+ }else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ }
+ });
}
break;
// 鏌ョ湅绠�鍥�
@@ -493,13 +533,13 @@
tableReload(false);
});
-
// 鎼滅储鏍忛噸缃簨浠�
form.on('submit(reset)', function (data) {
pageCurr = 1;
clearFormVal($('#search-box'));
tableReload(false);
});
+
layDate.render({
elem: '.layui-laydate-range'
,type: 'datetime'
@@ -515,7 +555,6 @@
type: 'datetime'
});
-
});
// 鍏抽棴鍔ㄤ綔
@@ -524,8 +563,7 @@
});
function tableReload(child) {
- var searchData = {
- };
+ var searchData = {};
$.each($('#search-box [name]').serializeArray(), function() {
searchData[this.name] = this.value;
});
@@ -539,11 +577,18 @@
top.location.href = baseUrl+"/";
}
pageCurr=curr;
+
+ // 鎼滅储/閲嶇疆鍚庨噸鏂板簲鐢ㄩ珮浜�
+ highlightStoreDateRows();
+
if (res.data.length === 0 && count !== 0) {
tableIns.reload({
where: searchData,
page: {
curr: pageCurr-1
+ },
+ done: function(res2, curr2, count2) {
+ highlightStoreDateRows();
}
});
pageCurr -= 1;
@@ -605,4 +650,4 @@
if (event.keyCode === 13) {
$("#search").click();
}
-});
+});
\ No newline at end of file
--
Gitblit v1.9.1