From 65f6959edf123d4fbec992c0d4b929910d9423aa Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期一, 26 二月 2024 13:25:37 +0800
Subject: [PATCH] 海诺尔 物料打印码 pda移库增加
---
src/main/webapp/views/pla/locDetlQuery.html | 314 ++++++++++++++++++++++++
src/main/webapp/views/pla/sellout.html | 1
src/main/webapp/views/pla/stockOut.html | 131 ++++++++++
src/main/webapp/views/pla/plaDetl.html | 2
src/main/webapp/static/js/pla/plaDetl.js | 2
src/main/webapp/static/js/pla/stockOut.js | 258 +++++++++++++++++++
src/main/webapp/static/js/common.js | 68 +++++
7 files changed, 775 insertions(+), 1 deletions(-)
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index 125cb65..d447604 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -276,6 +276,74 @@
,{field: 'owner$', align: 'center',title: '璐т富', hide: false}
]
+var plaCols = [
+ {field: 'id', title: 'id', align: 'center',hide:true}
+ ,{type: 'checkbox',totalRow:true}
+ ,{field:'id', width:80, title: '', sort: true, totalRowText: '鍚堣锛�',hide: true}
+ ,{field: 'pakinTime$', title: '鍏ュ簱鏃堕棿', align: 'center' , sort:true}
+ ,{field: 'matnr', align: 'center',title: '瀛樿揣缂栫爜',hide:true,edit:true}
+ ,{field: 'brand', align: 'center',title: '鐗屽彿',edit:true}
+ ,{field: 'batch', align: 'center',title: '鎵瑰彿',edit:true, width: 150, sort:true}
+ ,{field: 'packageNo', align: 'center',title: '鍖呰鍙�',edit:true, sort:true}
+ ,{field: 'proDate', align: 'center',title: '鐢熶骇鏃ユ湡',edit:true, width: 100}
+ ,{field: 'weight', align: 'center',title: '閲嶉噺KG',edit:true,totalRow:true}
+ ,{field: 'packageType', align: 'center',title: '鍖呰绫诲瀷',edit:true}
+ ,{field: 'zpalletType', align: 'center',title: '鎵樼洏绫诲瀷',edit:true}
+ ,{field: 'filmWrap', align: 'center',title: '缂犺啘',edit:true,hide:true}
+ ,{field: 'fingerMelting', align: 'center',title: '鐔旀寚,g/10min',edit:true}
+ ,{field: 'water', align: 'center',title: '姘村垎,ppm', hide:true,edit:true}
+ ,{field: 'fusingPoint', align: 'center',title: '鐔旂偣,鈩�',edit:true}
+ ,{field: 'vadf1', align: 'center',title: '鎸ュ彂娈�,%', hide:true,edit:true}
+ ,{field: 'vadf2', align: 'center',title: '鍒嗚В娈�,%', hide:true,edit:true}
+ ,{field: 'yellowness', align: 'center',title: '榛勫害',edit:true}
+ ,{field: 'opacity', align: 'center',title: '涓嶉�忔槑搴�,%',edit:true}
+ ,{field: 'l', align: 'center',title: 'L*', hide:true,edit:true}
+ ,{field: 'a', align: 'center',title: 'a*', hide:true,edit:true}
+ ,{field: 'b', align: 'center',title: 'b*', hide:true,edit:true}
+ ,{field: 'fillIn', align: 'center',title: '濉厖,%',hide:true,edit:true}
+ ,{field: 'str1', align: 'center',title: '鎷変几寮哄害,MPa',hide:true,edit:true}
+ ,{field: 'str2', align: 'center',title: '鏂浼搁暱鐜�,%',hide:true,edit:true}
+ ,{field: 'str3', align: 'center',title: '缂哄彛鍐插嚮,KJ/m2',hide:true,edit:true}
+ ,{field: 'str4', align: 'center',title: '缁村崱,鈩�',hide:true,edit:true}
+ ,{field: 'str5', align: 'center',title: '鍗婄粨鏅舵椂闂�,min',hide:true,edit:true}
+ ,{field: 'str6', align: 'center',title: '缁撴櫠搴�.%',hide:true,edit:true}
+ ,{field: 'massState', align: 'center',title: '璐ㄩ噺鐘舵��',edit:true}
+ ,{field: 'problem', align: 'center',title: '澶囨敞',edit:true,hide:true}
+ ,{field: 'direction', align: 'center',title: '搴旂敤鏂瑰悜',edit:true,hide:true}
+ ,{field: 'position', align: 'center',title: '瀛樻斁浣嶇疆',edit:true,hide:true}
+ ,{field: 'stash', align: 'center',title: '浠撳簱',edit:true,hide:true}
+ ,{field: 'locNo', align: 'center',title: '搴撲綅',edit:true}
+ ,{field: 'owner', align: 'center',title: '涓讳綋',edit:true}
+ ,{field: 'type', align: 'center',title: '鐗╄祫绫诲埆',hide:true,edit:true}
+ ,{field: 'proOrderNo', align: 'center',title: '鐢熶骇璁㈠崟缂栧彿',hide:true,edit:true}
+ ,{field: 'workshop', align: 'center',title: '鐢熶骇杞﹂棿',hide:true,edit:true}
+ ,{field: 'line', align: 'center',title: '鐢熶骇绾�',hide:true,edit:true}
+ ,{field: 'weightAnfme', align: 'center',title: '鍓╀綑閲嶉噺锛圞G锛�',edit:true,totalRow:true}
+ ,{field: 'qtyAnfme', align: 'center',title: '寰呭嚭搴撻噸閲忥紙KG锛�',hide:true}
+ ,{field: 'status', align: 'center',title: '鐘舵��', templet: setState ,edit:true}
+ ,{field: 'stockFreeze', align: 'center',title: '搴撳瓨鍐荤粨', templet: '#stockFreezeTpl'}
+ ,{field: 'stockFreezeBy', align: 'center',title: '鎿嶄綔浜哄憳',hide:true}
+ ,{field: 'stockFreezeDate$', align: 'center',title: '鎿嶄綔鏃ユ湡',hide:true}
+ ,{align: 'center', title: '娴佽浆鏄庣粏', toolbar: '#tbLook'}
+ ,{field: 'createTime$', title: '鍒涘缓鏃堕棿', align: 'center' , sort:true}
+]
+
+function setState(data){
+ if(data.status === "寰呭叆搴�"){
+ return "<span style='color: orange'>寰呭叆搴�</span>"
+ }else if(data.status === "宸插叆搴�"){
+ return "<span style='color: blue'>宸插叆搴�</span>"
+ }else if(data.status === "寰呭嚭搴�"){
+ return "<span style='color: red'>寰呭嚭搴�</span>"
+ }else if(data.status === "閮ㄥ垎鍑哄簱"){
+ return "<span style='color: black'>閮ㄥ垎鍑哄簱</span>"
+ }else if(data.status === "鍏ㄩ儴鍑哄簱"){
+ return "<span style='color: gray'>鍏ㄩ儴鍑哄簱</span>"
+ }else if(data.status === "鏆傚叆搴�"){
+ return "<span style='color: purple'>鏆傚叆搴�</span>"
+ }
+}
+
function getQueryVariable(variable)
{
var query = window.location.search.substring(1);
diff --git a/src/main/webapp/static/js/pla/plaDetl.js b/src/main/webapp/static/js/pla/plaDetl.js
index 85dee90..4c5df0a 100644
--- a/src/main/webapp/static/js/pla/plaDetl.js
+++ b/src/main/webapp/static/js/pla/plaDetl.js
@@ -929,5 +929,7 @@
var res = JSON.parse(evt.target.responseText);
layer.msg(res.msg, {icon: 2});
}
+function clearTable(){
+}
diff --git a/src/main/webapp/static/js/pla/stockOut.js b/src/main/webapp/static/js/pla/stockOut.js
new file mode 100644
index 0000000..a7a0fbd
--- /dev/null
+++ b/src/main/webapp/static/js/pla/stockOut.js
@@ -0,0 +1,258 @@
+var locDetlLayerIdx;
+var locDetlData = [];
+function getCol() {
+ var cols = [
+ ];
+ arrRemove(plaCols, 'type', 'checkbox');
+ cols.push.apply(cols, plaCols);
+ cols.push({fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width: 80})
+ return cols;
+}
+
+layui.config({
+ base: baseUrl + "/static/layui/lay/modules/"
+}).use(['table','laydate', 'form', 'admin'], function() {
+ var table = layui.table;
+ var $ = layui.jquery;
+ var layer = layui.layer;
+ var form = layui.form;
+ var admin = layui.admin;
+
+ tableIns = table.render({
+ elem: '#chooseData',
+ headers: {token: localStorage.getItem('token')},
+ data: [],
+ totalRow: true, // 寮�鍚悎璁¤
+ height: function(){
+ var otherHeight = $('.function-area').outerHeight() + $('#search-box').outerHeight(); // 鑷畾涔夊叾浠栧尯鍩熺殑楂樺害
+ console.log($(window).height() - otherHeight);
+ return $(window).height() - otherHeight - 100; // 杩斿洖 number 绫诲瀷
+ },
+ //height: 'full',
+ even: true,
+ toolbar: '#toolbar',
+ cellMinWidth: 50,
+ cols: [function(){
+ var arr = getCol();
+
+ // 鍒濆鍖栫瓫閫夌姸鎬�
+ var local = layui.data('table-filter-test'); // 鑾峰彇瀵瑰簲鐨勬湰鍦拌褰�
+ layui.each(arr, function(index, item){
+ if(item.field in local){
+ item.hide = local[item.field];
+ }
+ });
+ return arr;
+ }() ],
+ request: {
+ pageName: 'curr',
+ pageSize: 'limit'
+ },
+ parseData: function (res) {
+ console.log(res)
+ return {
+ 'code': res.code,
+ 'msg': res.msg,
+ 'count': res.data.total,
+ 'data': res.data.records,
+ }
+ },
+ response: {
+ statusCode: 200
+ },
+ done: function(res, curr, count) {
+ // 璁板綍绛涢�夌姸鎬�
+ var that = this;
+ that.elem.next().on('mousedown', 'input[lay-filter="LAY_TABLE_TOOL_COLS"]+', function(){
+ var input = $(this).prev()[0];
+ // 姝ゅ琛ㄥ悕鍙换鎰忓畾涔�
+ layui.data('table-filter-test', {
+ key: input.name
+ ,value: input.checked
+ })
+ });
+
+ //$(".lavui-table-grid-down").hide();
+ if (res.code === 403) {
+ top.location.href = baseUrl+"/";
+ }
+ tableData = table.cache.locDetl;
+ console.log(tableData);
+ pageCurr=curr;
+ limit();
+ 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';
+ }
+ });
+ let headerTop = $('.layui-table-header').offset().top; //鑾峰彇琛ㄦ牸澶村埌鏂囨。椤堕儴鐨勮窛绂�
+ let headerPage = $('.layui-table-page').offset().top; //鑾峰彇琛ㄦ牸搴曢儴鏂囨。椤堕儴鐨勮窛绂�
+ $(window).scroll(function () {
+ if ((headerTop - $(window).scrollTop()) < 0) { //瓒呰繃浜�
+ $('.layui-table-header').addClass('table-header-fixed'); //娣诲姞鏍峰紡锛屽浐瀹氫綇琛ㄥご
+ } else { //娌¤秴杩�
+ $('.layui-table-header').removeClass('table-header-fixed'); //绉婚櫎鏍峰紡
+ }
+ });
+ }
+ });
+
+ // 椤甸潰淇敼
+ table.on('edit(chooseData)', function (obj) {
+ let index = obj.tr.attr("data-index");
+ let data = locDetlData[index];
+ let modify = true;
+ if (obj.field === 'count'){
+ let vle = Number(obj.value);
+ if (isNaN(vle)) {
+ layer.msg("璇疯緭鍏ユ暟瀛�", {icon: 2});
+ modify = false;
+ } else {
+ if (vle <= 0) {
+ layer.msg("鏁伴噺蹇呴』澶т簬闆�", {icon: 2});
+ modify = false;
+ }
+ if (vle > Number(data.anfme)) {
+ layer.msg("鍑哄簱鏁伴噺涓嶅緱澶т簬搴撳瓨鏁伴噺", {icon: 2});
+ modify = false;
+ }
+ }
+ }
+ if (modify) {
+ data[obj.field] = obj.value;
+ }
+ tableIns.reload({data: locDetlData});
+ });
+
+ // 鐩戝惉澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(chooseData)', function (obj) {
+ switch (obj.event) {
+ case 'outbound':
+ if (locDetlData.length === 0){
+ layer.msg('璇峰厛鎻愬彇鍟嗗搧搴撳瓨', {icon: 2});
+ } else {
+ var data = locDetlData;
+ var brand;
+
+ for(var i=0; i<data.length; i++){
+ if(data[i].status === "鏆傚叆搴�" || data[i].status === "寰呭叆搴�" || data[i].status === "鍏ㄩ儴鍑哄簱"|| data[i].weightAnfme <= data[i].qtyAnfme){
+ layer.msg("閫変腑鐨勬槑缁嗚繕鏈叆搴撴垨鑰呭凡鍏ㄩ儴鍑哄簱鎴栬�呮病鏈夊墿浣欏彲鍑洪噸閲忥紝璇烽噸鏂伴�夋嫨");
+ return;
+ }
+
+ brand = brand ? brand : data[i].brand;
+
+ if(brand != data[i].brand){
+ layer.msg("閫変腑鐨勬槑缁嗕腑鍚湁澶氱鐗屽彿锛岃閲嶆柊閫夋嫨");
+ return;
+ }
+ if(data[i].stockFreeze === 0){
+ layer.msg("閫変腑鐨勬槑缁嗕腑鍚湁鍐荤粨鐨勫簱瀛橈紝璇疯В鍐诲悗鎿嶄綔");
+ return;
+ }
+ }
+
+ layer.open({
+ type: 2,
+ title: '鍑哄簱',
+ maxmin: true,
+ area: ['800px', top.detailHeight],
+ shadeClose: false,
+ content: 'sellout.html',
+ success: function(layero, index){
+ //layer.getChildFrame('#data-detail-submit-edit', index).hide();
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false);
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+
+ var iframe = window['layui-layer-iframe' + index];
+ iframe.child(locDetlData)
+ }
+ });
+ }
+ break;
+ }
+ });
+
+ // 鐩戝惉琛屽伐鍏蜂簨浠�
+ table.on('tool(chooseData)', function(obj){
+ switch (obj.event) {
+ case 'remove':
+ let index = obj.tr.attr("data-index");
+ locDetlData.splice(index, 1);
+ tableIns.reload({data: locDetlData});
+ break;
+ }
+ });
+
+ // 鑾峰彇鍑哄簱鍙�
+ function getOutBound(){
+ $.ajax({
+ url: baseUrl+"/available/take/site",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'POST',
+ async: false,
+ success: function (res) {
+ if (res.code === 200){
+ var tpl = $("#takeSiteSelectTemplate").html();
+ var template = Handlebars.compile(tpl);
+ var html = template(res);
+ $('#staNoSelect').append(html);
+ form.render('select');
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ }
+
+
+
+ $(document).on('click','#mat-query', function () {
+ let loadIndex = layer.msg('璇锋眰涓�...', {icon: 16, shade: 0.01, time: false});
+ locDetlLayerIdx = layer.open({
+ type: 2,
+ title: false,
+ closeBtn: false,
+ maxmin: false,
+ area: ['90%', '85%'],
+ shadeClose: true,
+ content: 'locDetlQuery.html',
+ success: function(layero, index){
+ layer.close(loadIndex);
+ }
+ });
+ })
+
+})
+
+// 娣诲姞琛ㄦ牸鏁版嵁
+function addTableData(data) {
+ for (var i=0;i<data.length;i++){
+ let pass = false;
+ for (var j=0;j<locDetlData.length;j++){
+ if (data[i].matnr === locDetlData[j].matnr && data[i].batch === locDetlData[j].batch && data[i].packageNo === locDetlData[j].packageNo) {
+ pass = true;
+ break;
+ }
+ }
+ if (pass) {
+ data.splice(i--, 1);
+ } else {
+ data[i]["count"] = data[i]["anfme"];
+ }
+ }
+ locDetlData.push.apply(locDetlData, data);
+ tableIns.reload({data: locDetlData});
+ layer.close(locDetlLayerIdx);
+}
+
+function clearTable(){
+ locDetlData = [];
+ tableIns.reload({data: locDetlData});
+ parent.location.reload();
+}
diff --git a/src/main/webapp/views/pla/locDetlQuery.html b/src/main/webapp/views/pla/locDetlQuery.html
new file mode 100644
index 0000000..8c6be84
--- /dev/null
+++ b/src/main/webapp/views/pla/locDetlQuery.html
@@ -0,0 +1,314 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title></title>
+ <meta name="renderer" content="webkit">
+ <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 {
+ }
+ .layui-table-box {
+ border-right: 1px solid #9F9F9F;
+ border-left: 1px solid #9F9F9F;
+ }
+
+ #search-box {
+ padding: 30px 0 20px 0;
+ }
+ #search-box .layui-inline:first-child {
+ margin-left: 30px;
+ }
+ #search-box .layui-inline {
+ margin-right: 5px;
+ }
+
+ #data-search-btn {
+ margin-left: 10px;
+ display: inline-block;
+ }
+ #data-search-btn.layui-btn-container .layui-btn {
+ margin-right: 20px;
+ }
+ </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-form layui-card-header">
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="batch" placeholder="鎵瑰彿" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="package_no" placeholder="鍖呭彿" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline cool-auto-complete">
+ <input id="maktx" class="layui-input" type="text" style="display: none">
+ <input id="maktxV" name="brand" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" placeholder="鐗屽彿" type="text" onfocus=this.blur()>
+ <div class="cool-auto-complete-window">
+ <input class="cool-auto-complete-window-input" data-key="matMaktxQueryByMaktx" onkeyup="autoLoad(this.getAttribute('data-key'))">
+ <select class="cool-auto-complete-window-select" data-key="matMaktxQueryByMaktxSelect" 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="type" placeholder="鐗╄祫绫诲埆" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <!-- <input class="layui-input" type="text" name="status" placeholder="鐘舵��" autocomplete="off">-->
+ <select name="status">
+ <option value="">閫夋嫨鐘舵��</option>
+ <option value="鏆傚叆搴�">鏆傚叆搴�</option>
+ <option value="寰呭叆搴�">寰呭叆搴�</option>
+ <option value="宸插叆搴�" selected>宸插叆搴�</option>
+ <option value="寰呭嚭搴�">寰呭嚭搴�</option>
+ <option value="閮ㄥ垎鍑哄簱">閮ㄥ垎鍑哄簱</option>
+ <option value="鍏ㄩ儴鍑哄簱">鍏ㄩ儴鍑哄簱</option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline" style="width: 300px">
+ <!-- <div class="layui-input-inline">-->
+ <!-- <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="璧峰鏃堕棿 - 缁堟鏃堕棿" autocomplete="off" style="width: 300px">-->
+ <!-- </div>-->
+ <div class="layui-input-inline" style="width: 300px">
+ <input type="text" class="layui-input" name="create_time" id="ID-laydate-range-datetime" placeholder="璧峰鏃堕棿 - 缁堟鏃堕棿">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="condition" placeholder="璇疯緭鍏�" autocomplete="off">
+ </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>
+ <!-- <button id="unreason" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="unreason">鏌ョ湅寮傚父鏁版嵁</button>-->
+ </div>
+ </div>
+ <div class="layui-form layui-card-header">
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="finger_meltingMin" placeholder="鏈�灏忕啍鎸�" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="finger_meltingMax" placeholder="鏈�澶х啍鎸�" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="fusing_pointMin" placeholder="鏈�灏忕啍鐐�" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="fusing_pointMax" placeholder="鏈�澶х啍鐐�" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="yellownessMin" placeholder="鏈�灏忛粍搴�" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="yellownessMax" placeholder="鏈�澶ч粍搴�" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="opacityMin" placeholder="鏈�灏忎笉閫忔槑搴�" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="opacityMax" placeholder="鏈�澶т笉閫忔槑搴�" autocomplete="off">
+ </div>
+ </div>
+ </div>
+ </div>
+</fieldset>
+
+<script type="text/html" id="toolbar">
+ <div class="layui-btn-container">
+ <button class="layui-btn" id="btn-confirm" lay-event="confirm" style="">鎻愬彇</button>
+ </div>
+</script>
+
+<div class="layui-form">
+ <table class="layui-hide" id="stockOut" lay-filter="stockOut"></table>
+</div>
+
+<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
+<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script>
+
+</body>
+<script>
+
+ function getCol() {
+ return plaCols;
+ }
+
+ 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+'/pla/list/auth?step=2',
+ page: true,
+ totalRow: true, // 寮�鍚悎璁¤
+ height: function(){
+ var otherHeight = $('.function-area').outerHeight() + $('#search-box').outerHeight(); // 鑷畾涔夊叾浠栧尯鍩熺殑楂樺害
+ console.log($(window).height() - otherHeight);
+ return $(window).height() - otherHeight - 100; // 杩斿洖 number 绫诲瀷
+ },
+ //height: 'full',
+ limit: 16,
+ limits: [16, 30, 50, 100, 200, 500],
+ even: true,
+ toolbar: '#toolbar',
+ cellMinWidth: 50,
+ cols: [function(){
+ var arr = getCol();
+
+ // 鍒濆鍖栫瓫閫夌姸鎬�
+ var local = layui.data('table-filter-test'); // 鑾峰彇瀵瑰簲鐨勬湰鍦拌褰�
+ layui.each(arr, function(index, item){
+ if(item.field in local){
+ item.hide = local[item.field];
+ }
+ });
+ return arr;
+ }() ],
+ request: {
+ pageName: 'curr',
+ pageSize: 'limit'
+ },
+ parseData: function (res) {
+ console.log(res)
+ return {
+ 'code': res.code,
+ 'msg': res.msg,
+ 'count': res.data.total,
+ 'data': res.data.records,
+ }
+ },
+ response: {
+ statusCode: 200
+ },
+ done: function(res, curr, count) {
+ // 璁板綍绛涢�夌姸鎬�
+ var that = this;
+ that.elem.next().on('mousedown', 'input[lay-filter="LAY_TABLE_TOOL_COLS"]+', function(){
+ var input = $(this).prev()[0];
+ // 姝ゅ琛ㄥ悕鍙换鎰忓畾涔�
+ layui.data('table-filter-test', {
+ key: input.name
+ ,value: input.checked
+ })
+ });
+
+ //$(".lavui-table-grid-down").hide();
+ if (res.code === 403) {
+ top.location.href = baseUrl+"/";
+ }
+ tableData = table.cache.locDetl;
+ console.log(tableData);
+ pageCurr=curr;
+ limit();
+ 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';
+ }
+ });
+ let headerTop = $('.layui-table-header').offset().top; //鑾峰彇琛ㄦ牸澶村埌鏂囨。椤堕儴鐨勮窛绂�
+ let headerPage = $('.layui-table-page').offset().top; //鑾峰彇琛ㄦ牸搴曢儴鏂囨。椤堕儴鐨勮窛绂�
+ $(window).scroll(function () {
+ if ((headerTop - $(window).scrollTop()) < 0) { //瓒呰繃浜�
+ $('.layui-table-header').addClass('table-header-fixed'); //娣诲姞鏍峰紡锛屽浐瀹氫綇琛ㄥご
+ } else { //娌¤秴杩�
+ $('.layui-table-header').removeClass('table-header-fixed'); //绉婚櫎鏍峰紡
+ }
+ });
+ }
+ });
+
+ // 鐩戝惉澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(stockOut)', function (obj) {
+ var checkStatus = table.checkStatus(obj.config.id);
+ var data = checkStatus.data;
+ switch(obj.event) {
+ case 'confirm':
+ if (data.length === 0){
+ layer.msg("璇烽�夋嫨鏁版嵁");
+ return;
+ }
+ parent.addTableData(data);
+ break;
+ }
+ });
+
+ // 鎼滅储鏍忔悳绱簨浠�
+ form.on('submit(search)', function (data) {
+ tableReload();
+ });
+
+ layDate.render({
+ elem: '.layui-laydate-range'
+ ,type: 'datetime'
+ ,range: true
+ });
+ })
+
+ function tableReload() {
+ var searchData = {};
+ $.each($('#search-box [name]').serializeArray(), function() {
+ searchData[this.name] = this.value;
+ });
+ locDetlTableIns.reload({
+ where: searchData,
+ });
+ }
+</script>
+</html>
+
diff --git a/src/main/webapp/views/pla/plaDetl.html b/src/main/webapp/views/pla/plaDetl.html
index b86b20c..193b0e7 100644
--- a/src/main/webapp/views/pla/plaDetl.html
+++ b/src/main/webapp/views/pla/plaDetl.html
@@ -171,7 +171,7 @@
<option value="鏆傚叆搴�">鏆傚叆搴�</option>
<option value="寰呭叆搴�">寰呭叆搴�</option>
<option value="宸插叆搴�">宸插叆搴�</option>
- <option value="寰呭嚭搴�">宸插叆搴�</option>
+ <option value="寰呭嚭搴�">寰呭嚭搴�</option>
<option value="閮ㄥ垎鍑哄簱">閮ㄥ垎鍑哄簱</option>
<option value="鍏ㄩ儴鍑哄簱">鍏ㄩ儴鍑哄簱</option>
</select>
diff --git a/src/main/webapp/views/pla/sellout.html b/src/main/webapp/views/pla/sellout.html
index 51ffc6b..8f64ff7 100644
--- a/src/main/webapp/views/pla/sellout.html
+++ b/src/main/webapp/views/pla/sellout.html
@@ -273,6 +273,7 @@
if (res.code === 200){
layer.msg("淇敼鎴愬姛");
tableReload(true);
+ parent.clearTable();
} else if (res.code === 403){
layer.msg(res.msg, {icon: 2})
return;
diff --git a/src/main/webapp/views/pla/stockOut.html b/src/main/webapp/views/pla/stockOut.html
new file mode 100644
index 0000000..43759e9
--- /dev/null
+++ b/src/main/webapp/views/pla/stockOut.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title></title>
+ <meta name="renderer" content="webkit">
+ <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>
+ html {
+ height: 100%;
+ padding: 10px;
+ background-color: #f1f1f1;
+ box-sizing: border-box;
+ }
+ body {
+ background-color: #fff;
+ border-radius: 5px;
+ box-shadow: 0 0 3px rgba(0,0,0,.3);
+ padding-bottom: 20px;
+ }
+
+ #staNoSpan {
+ text-align: center;
+ display: inline-block;
+ width: 100px;
+ font-size: 13px;
+ }
+ .layui-btn-container .layui-form-select {
+ display: inline-block;
+ width: 150px;
+ height: 30px;
+ }
+ .layui-btn-container .layui-form-select.layui-form-selected {
+ display: inline-block;
+ width: 150px;
+ }
+ .layui-btn-container .layui-select-title input {
+ font-size: 13px;
+ }
+ .layui-btn-container .layui-anim.layui-anim-upbit dd {
+ font-size: 13px;
+ }
+
+ #btn-outbound {
+ margin-left: 60px;
+ display: none;
+ }
+
+ /*----------------------------------*/
+ .function-area {
+ padding: 20px 50px;
+ }
+ .function-btn {
+ font-size: 16px;
+ padding: 1px 2px;
+ width: 100px;
+ height: 50px;
+ border-color: #2b425b;
+ border-radius: 4px;
+ border-width: 2px;
+ background: none;
+ border-style: solid;
+ transition: 0.4s;
+ cursor: pointer;
+ letter-spacing: 1.5px;
+ }
+ .function-btn:hover {
+ background-color: #2b425b;
+ color: #fff;
+ }
+
+ #mat-query {
+ display: none;
+ }
+ </style>
+</head>
+<body>
+
+<!-- 鍔熻兘鍖� -->
+<div class="function-area">
+ <button id="mat-query" class="function-btn">鎻愬彇搴撳瓨</button>
+</div>
+
+<hr>
+
+<!-- 琛ㄦ牸 -->
+<div style="padding-bottom: 5px; margin-bottom: 45px">
+
+ <!-- 澶撮儴 -->
+ <script type="text/html" id="toolbar">
+ <div class="layui-form">
+ <div class="layui-btn-container">
+ <!-- 1.閫夋嫨鍑哄簱鍙� -->
+<!-- <span id="staNoSpan">鍑哄簱鍙o細</span>-->
+<!-- <select id="staNoSelect" lay-verify="required">-->
+<!-- <option value="">璇烽�夋嫨绔欑偣</option>-->
+<!-- </select>-->
+ <!-- 2.鍚姩鍑哄簱 -->
+ <button class="layui-btn layui-btn-lg" id="btn-outbound" lay-event="outbound">鍑哄簱</button>
+ </div>
+ </div>
+ </script>
+
+ <!-- 琛� -->
+ <script type="text/html" id="operate">
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="remove">绉婚櫎</a>
+ </script>
+
+ <table class="layui-table" id="chooseData" lay-filter="chooseData"></table>
+</div>
+
+<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
+<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script>
+<script type="text/javascript" src="../../static/js/pla/stockOut.js" charset="utf-8"></script>
+
+<script type="text/template" id="takeSiteSelectTemplate">
+ {{#each data}}
+ <option value="{{siteId}}">{{desc}}</option>
+ {{/each}}
+</script>
+</body>
+</html>
+
--
Gitblit v1.9.1