From be554d9e52799a0ee14c98b0959d07ab3847c8e6 Mon Sep 17 00:00:00 2001
From: dubin <bindu_bean@163.com>
Date: 星期一, 20 十月 2025 15:24:27 +0800
Subject: [PATCH] 联调
---
src/main/webapp/views/pakStore/locDetlQuery.html | 164 +++++++++++++++++++++++++++++++-----------------------
1 files changed, 93 insertions(+), 71 deletions(-)
diff --git a/src/main/webapp/views/pakStore/locDetlQuery.html b/src/main/webapp/views/pakStore/locDetlQuery.html
index b30d55f..1fd1dda 100644
--- a/src/main/webapp/views/pakStore/locDetlQuery.html
+++ b/src/main/webapp/views/pakStore/locDetlQuery.html
@@ -7,11 +7,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all">
<link rel="stylesheet" href="../../static/css/cool.css" media="all">
<link rel="stylesheet" href="../../static/css/common.css" media="all">
<style>
body {
- padding: 0 20px;
}
.layui-table-box {
border-right: 1px solid #9F9F9F;
@@ -38,12 +38,25 @@
</style>
</head>
<body>
-
+<div style="padding: 25px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;">
+ <span style="font-size: large; font-weight: bold">鎻愬彇搴撳瓨鍟嗗搧</span>
+</div>
<!-- 鎼滅储鏍� -->
<fieldset class="layui-elem-field site-demo-button" style="margin: 20px;">
<legend>鎼滅储鏍�</legend>
<!-- 鎼滅储鏍� -->
<div id="search-box" class="layui-form layui-card-header">
+ <div class="layui-inline">
+ <div class="layui-input-inline cool-auto-complete">
+ <input id="crnNo" class="layui-input" name="crnNo" type="text" placeholder="璇疯緭鍏�" autocomplete="off" style="display: none">
+ <input id="crnNo$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="鍫嗗灈鏈哄彿" onfocus=this.blur()>
+ <div class="cool-auto-complete-window">
+ <input class="cool-auto-complete-window-input" data-key="basCrnpQueryBycrnNo" onkeyup="autoLoad(this.getAttribute('data-key'))">
+ <select class="cool-auto-complete-window-select" data-key="basCrnpQueryBycrnNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
+ </select>
+ </div>
+ </div>
+ </div>
<div class="layui-inline">
<div class="layui-input-inline">
<input class="layui-input" type="text" name="loc_no" placeholder="搴撲綅鍙�" autocomplete="off">
@@ -51,19 +64,43 @@
</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="specs" placeholder="瑙勬牸" autocomplete="off">
</div>
</div>
-
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="zpallet" placeholder="鎵樼洏鐮�" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="temp1" placeholder="鎬荤О" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="temp2" placeholder="瀹㈡埛鍥惧彿" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="outOrderNo" 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>
- <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">閲嶇疆</button>
</div>
</div>
</fieldset>
@@ -87,39 +124,41 @@
</body>
<script>
- var pageCurr;
- layui.use(['table','laydate', 'form'], function() {
+ function getCol() {
+ var cols = [
+ {type: 'checkbox', merge: ['locNo']}
+ ,{field: 'locNo', align: 'center',title: '搴撲綅鍙�', merge: true, style: 'font-weight: bold'}
+ // ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
+ ];
+ cols.push.apply(cols, detlCols);
+ cols.push({field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
+ ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'})
+ return cols;
+ }
+
+ layui.config({
+ base: baseUrl + "/static/layui/lay/modules/"
+ }).use(['table','laydate', 'form', 'admin', 'tableMerge'], function() {
var table = layui.table;
var $ = layui.jquery;
var layer = layui.layer;
+ var layDate = layui.laydate;
var form = layui.form;
+ var admin = layui.admin;
+ var tableMerge = layui.tableMerge;
+
// 鏁版嵁娓叉煋
locDetlTableIns = table.render({
elem: '#stockOut',
headers: {token: localStorage.getItem('token')},
url: baseUrl+'/stock/out/list/auth',
page: true,
- limit: 10,
+ limits: [16, 30, 50, 100, 200, 500],
+ limit: 16,
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: '鐗╂枡鎻忚堪', width:150}
- ,{field: 'werks', align: 'center',title: '宸ュ巶'}
- ,{field: 'anfme', align: 'center',title: '鏁伴噺', width:80}
- ,{field: 'altme', align: 'center',title: '鍗曚綅', width:80}
- ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'}
- ,{field: 'bname', align: 'center',title: '鐢ㄦ埛ID'}
- // ,{field: 'memo', align: 'center',title: '澶囨敞'}
-
- ]],
+ cols: [getCol()],
request: {
pageName: 'curr',
pageSize: 'limit'
@@ -136,18 +175,10 @@
statusCode: 200
},
done: function(res, curr, count) {
+ tableMerge.render(this);
if (res.code === 403) {
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';
- }
- });
}
});
@@ -158,63 +189,54 @@
switch(obj.event) {
case 'confirm':
if (data.length === 0){
- layer.msg("璇烽�夋嫨鏁版嵁");
+ layer.msg("璇烽�夋嫨鏁版嵁", {icon: 2});
return;
}
- parent.locDetlData.push.apply(parent.locDetlData, data);
- parent.tableIns.reload({data: parent.locDetlData});
- parent.layer.close(parent.locDetlLayerIdx);
+ let 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;
}
});
// 鎼滅储鏍忔悳绱簨浠�
form.on('submit(search)', function (data) {
- pageCurr = 1;
tableReload();
});
- // 鎼滅储鏍忛噸缃簨浠�
- form.on('submit(reset)', function (data) {
- pageCurr = 1;
- clearFormVal($('#search-box'));
- tableReload();
+ layDate.render({
+ elem: '.layui-laydate-range'
+ ,type: 'datetime'
+ ,range: true
});
})
- function tableReload(child) {
+ function tableReload() {
var searchData = {};
$.each($('#search-box [name]').serializeArray(), function() {
searchData[this.name] = this.value;
});
locDetlTableIns.reload({
where: searchData,
- page: {
- curr: pageCurr
- },
- done: function (res, curr, count) {
- if (res.code === 403) {
- top.location.href = baseUrl+"/";
- }
- pageCurr=curr;
- if (res.data.length === 0 && count !== 0) {
- locDetlTableIns.reload({
- where: searchData,
- page: {
- curr: pageCurr-1
- }
- });
- pageCurr -= 1;
- }
- }
});
- }
-
- function clearFormVal(el) {
- $(':input', el)
- .val('')
- .removeAttr('checked')
- .removeAttr('selected');
}
</script>
</html>
--
Gitblit v1.9.1