From 87c32f45921678fd91b879fcc9a992096a0d2a01 Mon Sep 17 00:00:00 2001
From: Demo <Demo@DESKTOP-CPA90BF>
Date: 星期五, 02 二月 2024 16:44:41 +0800
Subject: [PATCH] 修改标签页
---
HTML/views/ASNSetting/LabelBox.html | 248 ++++++++++++++++++++++++++++--------------------
1 files changed, 144 insertions(+), 104 deletions(-)
diff --git a/HTML/views/ASNSetting/LabelBox.html b/HTML/views/ASNSetting/LabelBox.html
index 7986772..5800979 100644
--- a/HTML/views/ASNSetting/LabelBox.html
+++ b/HTML/views/ASNSetting/LabelBox.html
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
- <title>鐗╂枡淇℃伅褰曞叆</title>
+ <title>鐗╂枡鏍囩</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
@@ -36,14 +36,14 @@
</style>
<script>
// 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
- document.addEventListener("DOMContentLoaded", function() {
-
+ document.addEventListener("DOMContentLoaded", function () {
+
//鑾峰彇table榛樿鏄剧ず鏁�
pageCntFirst();
//鍒ゆ柇鏄惁寮�鍚痶able鍒楄〃鍒楀璋冩暣鍔熻兘銆�
GetIsSetColW();
});
- </script>
+ </script>
</head>
@@ -53,6 +53,13 @@
<div class="layui-card">
<div class="layui-form layui-card-header layuiadmin-card-header-auto">
<div class="layui-form-item">
+ <div class="layui-inline" style="margin-right: 0;">
+ <label class="layui-form-label" style="width: 60px;">鍏ュ簱鍗曞彿</label>
+ <div class="layui-input-inline" style="margin-right: 0;">
+ <input type="text" id="ASNNo" name="ASNNo" placeholder="鍏ュ簱鍗曞彿" autocomplete="off"
+ class="layui-input">
+ </div>
+ </div>
<div class="layui-inline" style="margin-right: 0;">
<label class="layui-form-label" style="width: 60px;">绠� 鍙�</label>
<div class="layui-input-inline" style="margin-right: 0;">
@@ -77,11 +84,25 @@
</div>
</div>
<div class="layui-inline" style="margin-right: 0;">
- <label class="layui-form-label" style="width: 60px;">鎵规鎻忚堪</label>
+ <label class="layui-form-label" style="width: 60px;">渚涜揣鎵规</label>
<div class="layui-input-inline" style="margin-right: 0;">
<div class="layui-input-inline" style="margin-right: 0;">
- <input type="text" id="LotText" name="LotText" placeholder="鎵规鎻忚堪" autocomplete="off"
- class="layui-input">
+ <input type="text" id="SupplierLot" name="SupplierLot" placeholder="渚涜揣鎵规"
+ autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ </div>
+
+ <div class="layui-inline" style="margin-right: 0;">
+ <label class="layui-form-label">鏄惁浣跨敤</label>
+ <div class="layui-input-inline" style="margin-right: 0;">
+ <div class="layui-input-inline" style="margin-right: 0;">
+ <select name="Status" id="Status" lay-filter="Status" lay-search>
+ <option value=""></option>
+ <option value="0">鍚�</option>
+ <option value="1">鏄�</option>
+
+ </select>
</div>
</div>
</div>
@@ -108,13 +129,13 @@
</button> -->
<div class="position-relative">
<table id="Box-list" lay-filter="Box-list"></table>
-
+
<div class="headerSetIcon">
<button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols">
<i class="layui-icon"></i>
</button>
</div>
-
+
<script type="text/html" id="templetProductionTime">
{{# function GetBtn3(d){
return formatDate2(d.ProductionTime);
@@ -130,15 +151,15 @@
}}
{{ GetBtn4(d) }}
</script>
-
- <script type="text/html" id="templetInspectTime">
+
+ <script type="text/html" id="templetStoreTimeTime">
{{# function GetBtn5(d){
- return formatDate2(d.InspectTime);
+ return formatDate2(d.StoreTimeTime);
}
}}
{{ GetBtn5(d) }}
</script>
-
+
<script type="text/html" id="templetCompleteTime">
{{# function GetBtn6(d){
return formatDate(d.CompleteTime);
@@ -147,19 +168,42 @@
{{ GetBtn6(d) }}
</script>
- <script type="text/html" id="templetIsUse">
+ <script type="text/html" id="templetStatus">
{{# function GetBtn7(d){
- switch (d.IsUse) {
- case "0": return '<button class="layui-btn layui-btn-radius layui-btn-xs">鍚�</button>';
- case "1": return '<button class="layui-btn layui-btn-radius layui-btn-xs layui-btn-danger ">鏄�</button>';
+ switch (d.Status) {
+ case "0": return '<button class="layui-btn layui-btn-radius layui-btn-xs">鏈粍鎵�</button>';
+ case "1": return '<button class="layui-btn layui-btn-radius layui-btn-xs layui-btn-danger ">宸茬粍鎵�</button>';
+ case "2": return '<button class="layui-btn layui-btn-radius layui-btn-xs layui-btn-normal ">宸插叆搴�</button>';
default: return "";
}
}
}}
{{ GetBtn7(d) }}
</script>
+ <script type="text/html" id="templetInspectMark">
+ {{# function GetBtn9(d){
+ switch (d.InspectMark) {
+ case "0": return '<button class="layui-btn layui-btn-radius layui-btn-xs">鍚�</button>';
+ case "1": return '<button class="layui-btn layui-btn-radius layui-btn-xs layui-btn-danger ">鏄�</button>';
+ default: return "";
+ }
+ }
+ }}
+ {{ GetBtn9(d) }}
+ </script>
+ <script type="text/html" id="templetBitBoxMark">
+ {{# function GetBtn10(d){
+ switch (d.BitBoxMark) {
+ case "0": return '<button class="layui-btn layui-btn-radius layui-btn-xs">鍚�</button>';
+ case "1": return '<button class="layui-btn layui-btn-radius layui-btn-xs layui-btn-danger ">鏄�</button>';
+ default: return "";
+ }
+ }
+ }}
+ {{ GetBtn10(d) }}
+ </script>
+
-
<script type="text/html" id="templetCreateTime">
{{# function GetBtn8(d){
@@ -168,9 +212,9 @@
}}
{{ GetBtn8(d) }}
</script>
- </div>
+ </div>
- <script type="text/html" id="toolbarDemo">
+ <!-- <script type="text/html" id="toolbarDemo">
<button style="margin-right: 5px;" class="layui-btn layui-btn-sm layuiadmin-btn-list addClass" lay-event="add" >
<i class="layui-icon"></i>娣诲姞
</button>
@@ -178,12 +222,12 @@
<button style="margin-right: 5px;" id="daoru" class="layui-btn layui-btn-sm layuiadmin-btn-list DaoRuClass" lay-event="import" >
<i class="layui-icon"></i>瀵煎叆
</button>
- </script>
+ </script> -->
<script type="text/html" id="toolbarDemoList">
{{# function GetBtn2(d){
var html = '';
- if(d.Origin == "褰曞叆" || d.Origin == "瀵煎叆"){
+ if(d.Origin == "WMS鐢熸垚" || d.Status == "0"){
html = `<a class="layui-btn layui-btn-danger layui-btn-xs delClass" lay-event="del">
<i class="layui-icon layui-icon-delete"></i>鍒犻櫎</a>`;
@@ -226,36 +270,36 @@
// 鎼滅储鏂规硶
form.on('submit(LAY-app-contlist-search)', function (data) {
- bindTable();
-
- });
+ bindTable();
+
+ });
// 椤甸潰鍔犺浇缁戝畾Table
bindTable();
-
+
// 娣诲姞瀵煎叆鎸夐挳鍗曟満浜嬩欢
table.on('toolbar(Box-list)', function (obj) {
switch (obj.event) {
case 'add': // 娣诲姞绠辨敮鍏崇郴
- // layer.open({
- // type: 2,
- // title: '鑷畾涔夊垪',
- // content: '../SystemSettings/HeaderSetting.html',
- // maxmin: false,
- // resize: false,
- // area: ['970px', '650px']
- // });
- layer.open({
- type: 2,
- title: '鎵撳嵃',
- content: 'LabelPrint.html?',
- maxmin: true,
- area: ['600px', '670px'],
- btn: ['鍙栨秷']
- });
+ // layer.open({
+ // type: 2,
+ // title: '鑷畾涔夊垪',
+ // content: '../SystemSettings/HeaderSetting.html',
+ // maxmin: false,
+ // resize: false,
+ // area: ['970px', '650px']
+ // });
+ layer.open({
+ type: 2,
+ title: '鎵撳嵃',
+ content: 'LabelPrint.html?',
+ maxmin: true,
+ area: ['600px', '670px'],
+ btn: ['鍙栨秷']
+ });
break;
-
+
default: break;
}
});
@@ -300,60 +344,65 @@
// 鏌ヨ褰曞叆鐨勭鏀叧绯�
//#region 鑷畾涔夎〃澶�
var TotalColsArr = [[
-
- {field: 'BoxNo',title: '绠卞彿',align: 'center',fixed: 'left',width: 220, "disabled": true},
- {field: 'ParentBoxNo',title: '鐖剁骇绠卞彿',align: 'center',fixed: 'left',width: 220, "disabled": true},
- {field: 'SkuNo',title: '鐗╂枡缂栫爜',align: 'center',fixed: 'left',width: 140, "disabled": true },
- {field: 'SkuName',title: '鐗╂枡鍚嶇О',align: 'center',width: 240, },
- {field: 'Qty',title: '鏁伴噺',align: 'center',width: 100,},
- {field: 'LotNo',title: '鎵规鍙�',align: 'center',width: 155,},
- {field: 'LotText',title: '鎵规鎻忚堪',align: 'center',width: 165},
- {field: 'AsnNo',title: '鍗曟嵁鍙�',align: 'center',width: 155,},
- {field: 'IsUse',title: '鏄惁浣跨敤',align: 'center',templet: '#templetIsUse',width: 90},
- {field: 'Level',title: '绾у埆',align: 'center',width: 90},
- {field: 'ProductionTime',title: '鐢熶骇鏃ユ湡',align: 'center',width: 160,templet: '#templetProductionTime'},
- {field: 'ExpirationTime',title: '杩囨湡鏃ユ湡',align: 'center',width: 160,templet: '#templetExpirationTime'},
- {field: 'InspectTime',title: '澶嶉獙鏃ユ湡',align: 'center',width: 160,templet: '#templetInspectTime'},
- {field: 'CompleteTime',title: '瀹屾垚鏃ユ湡',align: 'center',width: 160,templet: '#templetCompleteTime'},
- {field: 'SupplierName',title: '渚涘簲鍟�',align: 'center',width: 155},
- {field: 'SupplierLot',title: '渚涜揣鎵规',align: 'center',width: 155},
+
+ { field: 'ASNNo', title: '鍏ュ簱鍗曞彿', align: 'center',fixed: 'left', width: 180, "disabled": true },
+ { field: 'BoxNo', title: '绠卞彿', align: 'center', fixed: 'left', width: 220, "disabled": true },
+ { field: 'BoxNo2', title: '鐩掑彿', align: 'center', fixed: 'left', width: 220, },
+ { field: 'BoxNo3', title: '鏀彿', align: 'center', fixed: 'left', width: 220, "disabled": true },
+ { field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center', fixed: 'left', width: 140, "disabled": true },
+ { field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center', width: 240, },
+ { field: 'Qty', title: '鏁伴噺', align: 'center', width: 100, },
+ { field: 'FullQty', title: '鏁寸鏁伴噺', align: 'center', width: 100, },
+ { field: 'LotNo', title: '鎵规鍙�', align: 'center', width: 155, },
+ { field: 'LotText', title: '鎵规鎻忚堪', align: 'center', width: 165 },
+ { field: 'SupplierLot', title: '渚涜揣鎵规', align: 'center', width: 155 },
+ { field: 'Status', title: '鐘舵��', align: 'center', templet: '#templetStatus', width: 90 },
- {field: 'CreateUserName',title: '鍒涘缓浜�',align: 'center',width: 100},
- {field: 'CreateTime',title: '鍒涘缓鏃堕棿',align: 'center',width: 160,templet: '#templetCreateTime'},
- {field: 'caozuo',title: '鎿嶄綔',fixed: 'right',width: 100,align: 'center',toolbar: '#toolbarDemoList', "disabled": true}
- ]];
- //url缂栫爜
- var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
+ { field: 'Standard', title: '瑙勬牸/鍨嬪彿', align: 'center', width: 165 },
+ { field: 'PackageStandard', title: '鍖呰瑙勬牸', align: 'center', width: 165 },
+
+ { field: 'ProductionTime', title: '鐢熶骇鏃ユ湡', align: 'center', width: 160, templet: '#templetProductionTime' },
+ { field: 'ExpirationTime', title: '杩囨湡鏃ユ湡', align: 'center', width: 160, templet: '#templetExpirationTime' },
+ { field: 'StoreTime', title: '鍌ㄥ瓨鏈熻嚦', align: 'center', width: 160, templet: '#templetStoreTime' },
+ { field: 'CompleteTime', title: '瀹屾垚鏃ユ湡', align: 'center', width: 160, templet: '#templetCompleteTime' },
+
+ {field: 'InspectMark',title: '鎶芥鏍囪',align: 'center',templet: '#templetInspectMark',width: 90},
+ {field: 'BitBoxMark',title: '闆剁鏍囪',align: 'center',templet: '#templetBitBoxMark',width: 90},
+ {field: 'Origin',title: '鏉ユ簮',align: 'center',width: 90},
+
+ { field: 'CreateUserName', title: '鍒涘缓浜�', align: 'center', width: 100 },
+ { field: 'CreateTime', title: '鍒涘缓鏃堕棿', align: 'center', width: 160, templet: '#templetCreateTime' },
+ //{ field: 'caozuo', title: '鎿嶄綔', fixed: 'right', width: 100, align: 'center', toolbar: '#toolbarDemoList', "disabled": true }
+ ]];
+ //url缂栫爜
+ var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
//#endregion
function bindTable() {
-
+
//#region 鑷畾涔夎〃澶�
var colsJson
- var param1={
- Href:'BllAsn/GetLabelBoxList'
+ var param1 = {
+ Href: 'BllAsn/GetLabelBoxList'
};
- sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) {
- if (res.code == 0){
- if(res.data=='' || res.data==undefined || res.data==null){
- colsJson=TotalColsArr
- }else{
- colsJson= eval(res.data);
+ sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) {
+ if (res.code == 0) {
+ if (res.data == '' || res.data == undefined || res.data == null) {
+ colsJson = TotalColsArr
+ } else {
+ colsJson = eval(res.data);
}
- }else{
- colsJson=TotalColsArr
+ } else {
+ colsJson = TotalColsArr
}
var param = {
+ AsnNo:$("#ASNNo").val(),
BoxNo: $("#BoxNo").val(),
- // BoxNo2: $("#BoxNo2").val(),
- BoxNo3: $("#BoxNo3").val(),
+ Status: $("#Status").val(),
SkuNo: $("#SkuNo").val(),
- LotNo: $("#LotNo").val(),
- LotText: $("#LotText").val(),
+ LotNo: $("#LotNo").val(),
ProductionTime: $("#ProductionTime").val(),
- InspectMark: $("#InspectMark").val(),
- BitBoxMark: $("#BitBoxMark").val(),
- // Origin: "褰曞叆",
+ SupplierLot: $("#SupplierLot").val(),
};
table.render({
elem: '#Box-list',
@@ -363,7 +412,6 @@
id: 'Box-list',
where: param,
contentType: 'application/json',
- toolbar: '#toolbarDemo',
defaultToolbar: [], //'filter','print', 'exports'
headers: { ToKen: $.cookie('token') },
page: true,
@@ -374,7 +422,7 @@
done: function (res) {
setRight();
//鑷畾涔夊垪瀹�
- SetTableColW('Box-list','BllAsn/GetLabelBoxList',TotalColsSysArr);
+ SetTableColW('Box-list', 'BllAsn/GetLabelBoxList', TotalColsSysArr);
},
cols: colsJson
});
@@ -420,7 +468,7 @@
$(function () {
$(".addClass").hide();
$(".DaoRuClass").hide();
- $(".delClass").hide();
+ $(".delClass").hide();
});
sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
if (res.code == 0) { //鎴愬姛
@@ -437,7 +485,7 @@
}
if (res.data[k].MenuName == "鍒犻櫎绠辨敮褰曞叆") {
$(function () {
- $(".delClass").show();
+ $(".delClass").show();
});
}
}
@@ -460,13 +508,6 @@
});
return msg;
}
- // if ($("#BoxNo2").val() == "") {
- // layer.msg("璇疯緭鍏ョ洅鐮侊紒", {
- // icon: 2,
- // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- // });
- // return msg;
- // }
if ($("#BoxNo3").val() == "") {
layer.msg("璇疯緭鍏ユ敮鐮侊紒", {
icon: 2,
@@ -498,7 +539,6 @@
var param = {
BoxNo: $("#BoxNo").val(),
- // BoxNo2: $("#BoxNo2").val(),
BoxNo3: $("#BoxNo3").val(),
SkuNo: $("#SkuNo").val(),
LotNo: $("#LotNo").val(),
@@ -586,17 +626,17 @@
doing = true
});
} else { //涓嶆垚鍔�
- if(res.msg==undefined){
+ if (res.msg == undefined) {
layer.msg("鍚庡彴姝e湪瀵煎叆涓紝璇风◢鍚庢煡鐪嬬粨鏋�", {
icon: 2,
time: 3000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function () { bindTable();doing = true });
- }else{
+ }, function () { bindTable(); doing = true });
+ } else {
layer.msg(res.msg, {
icon: 2,
time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function () { bindTable();doing = true });
- }
+ }, function () { bindTable(); doing = true });
+ }
}
});
});
@@ -610,18 +650,18 @@
//#region 鑷畾涔夎〃澶�
//鑷畾涔夎〃澶�
active = {
- customCols: function(){
+ customCols: function () {
layer.open({
type: 2,
title: '鑷畾涔夊垪',
- content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetLabelBoxList&ColsSysArr='+TotalColsSysArr,
+ content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetLabelBoxList&ColsSysArr=' + TotalColsSysArr,
maxmin: false,
resize: false,
area: ['970px', '650px']
});
},
};
- $('.layui-btn').on('click', function() {
+ $('.layui-btn').on('click', function () {
var type = $(this).data('type');
active[type] ? active[type].call(this) : '';
});
--
Gitblit v1.8.0