From 7ebe16b9abbee8e884db27d2ec360f17455b14f2 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 24 八月 2021 09:03:07 +0800
Subject: [PATCH] #
---
src/main/webapp/views/pakStore/locDetlQuery.html | 104 +++++++++++++++++++++++++++++++++------------------
1 files changed, 67 insertions(+), 37 deletions(-)
diff --git a/src/main/webapp/views/pakStore/locDetlQuery.html b/src/main/webapp/views/pakStore/locDetlQuery.html
index efe43ab..fed937d 100644
--- a/src/main/webapp/views/pakStore/locDetlQuery.html
+++ b/src/main/webapp/views/pakStore/locDetlQuery.html
@@ -51,15 +51,20 @@
</div>
<div class="layui-inline">
<div class="layui-input-inline">
- <input class="layui-input" type="text" name="matnr" placeholder="鐗╂枡鍙�" autocomplete="off">
+ <input class="layui-input" type="text" name="matnr" placeholder="浜у搧鍙�" autocomplete="off">
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline">
- <input class="layui-input" type="text" name="mat_name" placeholder="鐗╂枡鍚嶇О" autocomplete="off">
+ <input class="layui-input" type="text" name="maktx" placeholder="浜у搧鎻忚堪" autocomplete="off">
</div>
</div>
-
+ <!-- 鏃ユ湡鑼冨洿 -->
+ <div class="layui-inline" style="width: 300px">
+ <div class="layui-input-inline">
+ <input class="layui-input layui-laydate-range" name="modi_time" type="text" placeholder="璧峰鏃堕棿 - 缁堟鏃堕棿" autocomplete="off" style="width: 300px">
+ </div>
+ </div>
<!-- 寰呮坊鍔� -->
<div id="data-search-btn" class="layui-btn-container layui-form-item" style="display: inline-block">
<button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">鎼滅储</button>
@@ -88,10 +93,24 @@
<script>
var pageCurr;
+ function getCol() {
+ var cols = [
+ {type: 'checkbox'}
+ ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
+ ];
+ cols.push.apply(cols, detlCols);
+ cols.push(
+ {field: 'memo', align: 'center',title: '澶囨敞'}
+ ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
+ ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'})
+ return cols;
+ }
+
layui.use(['table','laydate', 'form'], function() {
var table = layui.table;
var $ = layui.jquery;
var layer = layui.layer;
+ var layDate = layui.laydate;
var form = layui.form;
// 鏁版嵁娓叉煋
locDetlTableIns = table.render({
@@ -103,23 +122,7 @@
even: true,
toolbar: '#toolbar',
cellMinWidth: 50,
- cols: [[
- {type: 'checkbox'}
- ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
- ,{field: 'matnr', align: 'center',title: '鐗╂枡'}
- // ,{field: 'lgnum', align: 'center',title: '浠撳簱鍙�', width:80}
- // ,{field: 'tbnum', align: 'center',title: '杞偍璇锋眰缂栧彿'}
- // ,{field: 'tbpos', align: 'center',title: '琛岄」鐩�'}
- // ,{field: 'zmatid', align: 'center',title: '鐗╂枡鏍囩ID', width:200}
- ,{field: 'maktx', align: 'center',title: '鐗╂枡鎻忚堪'}
- // ,{field: 'werks', align: 'center',title: '宸ュ巶'}
- ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
- ,{field: 'altme', align: 'center',title: '鍗曚綅'}
- ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'}
- // ,{field: 'bname', align: 'center',title: '鐢ㄦ埛ID'}
- // ,{field: 'memo', align: 'center',title: '澶囨敞'}
-
- ]],
+ cols: [getCol()],
request: {
pageName: 'curr',
pageSize: 'limit'
@@ -140,14 +143,8 @@
top.location.href = baseUrl+"/";
}
pageCurr=curr;
- form.on('checkbox(tableCheckbox)', function (data) {
- var _index = $(data.elem).attr('table-index')||0;
- if(data.elem.checked){
- res.data[_index][data.value] = 'Y';
- }else{
- res.data[_index][data.value] = 'N';
- }
- });
+ $('.layui-form-checkbox').css("pointer-events", "none");
+ $('td[data-field="0').css("cursor", "pointer")
}
});
@@ -161,6 +158,26 @@
layer.msg("璇烽�夋嫨鏁版嵁");
return;
}
+ var locNos = [];
+ data.forEach(function(elem) {
+ locNos.push(elem.locNo);
+ });
+ $.ajax({
+ url: baseUrl+"/locDetl/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {locNos:locNos},
+ method: 'POST',
+ async: false,
+ success: function (res) {
+ if (res.code === 200) {
+ data = res.data;
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
+ layer.msg(res.msg)
+ }
+ }
+ })
parent.addTableData(data);
break;
}
@@ -177,6 +194,26 @@
pageCurr = 1;
clearFormVal($('#search-box'));
tableReload();
+ });
+
+ layDate.render({
+ elem: '.layui-laydate-range'
+ ,type: 'datetime'
+ ,range: true
+ });
+ })
+
+ var b = true;
+ $(function(){
+ $(document.body).on('click','td[data-field="0"]',function(){
+ var locNo = $(this).next().children("div").html();
+ if (b) {
+ b = false;
+ $("tr td[data-field=locNo\\$] div:contains("+ locNo +")").parent().prev().children().children("div").click();
+ setTimeout(function () {
+ b = true;
+ }, 200)
+ }
});
})
@@ -195,15 +232,8 @@
top.location.href = baseUrl+"/";
}
pageCurr=curr;
- if (res.data.length === 0 && count !== 0) {
- locDetlTableIns.reload({
- where: searchData,
- page: {
- curr: pageCurr-1
- }
- });
- pageCurr -= 1;
- }
+ $('.layui-form-checkbox').css("pointer-events", "none");
+ $('td[data-field="0').css("cursor", "pointer")
}
});
}
--
Gitblit v1.9.1