From 8ce8a4d91c121222ce0abdfc6e81b0aef72b9b64 Mon Sep 17 00:00:00 2001
From: 18516761980 <4761516tqsxp>
Date: 星期六, 26 三月 2022 15:56:57 +0800
Subject: [PATCH] #
---
src/main/webapp/views/pakStore/locDetlCheckQuery.html | 83 +++++++++++++----------------------------
1 files changed, 26 insertions(+), 57 deletions(-)
diff --git a/src/main/webapp/views/pakStore/locDetlCheckQuery.html b/src/main/webapp/views/pakStore/locDetlCheckQuery.html
index 0e184ab..f98139a 100644
--- a/src/main/webapp/views/pakStore/locDetlCheckQuery.html
+++ b/src/main/webapp/views/pakStore/locDetlCheckQuery.html
@@ -51,12 +51,12 @@
</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="mat_no" placeholder="鐗╂枡鍙�" autocomplete="off">
</div>
</div>
<div class="layui-inline">
<div class="layui-input-inline">
- <input class="layui-input" type="text" name="maktx" placeholder="鐗╂枡鎻忚堪" autocomplete="off">
+ <input class="layui-input" type="text" name="mat_name" placeholder="鐗╂枡鎻忚堪" autocomplete="off">
</div>
</div>
<!-- 鏃ユ湡鑼冨洿 -->
@@ -93,6 +93,21 @@
<script>
var pageCurr;
+ function getCol() {
+ var cols = [
+ {type: 'checkbox'}
+ ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
+ ];
+ cols.push.apply(cols, detlCols);
+ cols.push(
+ {field: 'str3', align: 'center',title: '瀹㈡埛鍚嶇О'}
+ ,{field: 'str4', align: 'center',title: '椤圭洰淇℃伅'}
+ ,{field: 'str5$', 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;
@@ -109,28 +124,7 @@
even: true,
toolbar: '#toolbar',
cellMinWidth: 50,
- cols: [[
- {type: 'checkbox', event: 'checkbox', templet:function(row){
- var html = "<input type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'";
- return html;
- }}
- ,{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: '澶囨敞'}
- ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
- ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'}
-
- ]],
+ cols: [getCol()],
request: {
pageName: 'curr',
pageSize: 'limit'
@@ -151,6 +145,14 @@
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';
+ }
+ });
}
});
@@ -164,43 +166,10 @@
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;
}
});
-
- // 鐩戝惉琛屽伐鍏蜂簨浠�
- table.on('tool(stockOut)', function(obj) {
- var data = obj.data;
- switch (obj.event) {
- // 璇︽儏
- case 'checkbox':
- var checkbox = $("td[data-field=locNo\\$] div:contains("+ data.locNo +")").parent().prev().children().children("div");
- checkbox.attr("class", "layui-unselect layui-form-checkbox layui-form-checked");
- checkbox.attr("lay-skin", "primary");
- break;
- }
- })
// 鎼滅储鏍忔悳绱簨浠�
form.on('submit(search)', function (data) {
--
Gitblit v1.9.1