From 1293aeec722e06dc11b657455941abbc1c274090 Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期日, 16 二月 2025 11:23:46 +0800
Subject: [PATCH] 修改与小车接口
---
HTML/views/ASNSetting/BoxInfo.html | 265 +++++++++++-----------------------------------------
1 files changed, 56 insertions(+), 209 deletions(-)
diff --git a/HTML/views/ASNSetting/BoxInfo.html b/HTML/views/ASNSetting/BoxInfo.html
index 88a34e5..49f6ef2 100644
--- a/HTML/views/ASNSetting/BoxInfo.html
+++ b/HTML/views/ASNSetting/BoxInfo.html
@@ -36,14 +36,14 @@
</style>
<script>
// 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
- document.addEventListener("DOMContentLoaded", function() {
-
+ document.addEventListener("DOMContentLoaded", function () {
+
//鑾峰彇table榛樿鏄剧ず鏁�
pageCntFirst();
//鍒ゆ柇鏄惁寮�鍚痶able鍒楄〃鍒楀璋冩暣鍔熻兘銆�
GetIsSetColW();
});
- </script>
+ </script>
</head>
@@ -82,10 +82,10 @@
</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="LotNo" name="LotNo" placeholder="鎵规鍙�" autocomplete="off"
+ <input type="text" id="LotNo" name="LotNo" placeholder="杩涘巶缂栧彿" autocomplete="off"
class="layui-input">
</div>
</div>
@@ -213,7 +213,7 @@
{{ GetBtn7(d) }}
</script>
<!-- #endregion -->
- </div>
+ </div>
<script type="text/html" id="toolbarDemo">
<button style="margin-right: 5px;" class="layui-btn layui-btn-sm layuiadmin-btn-list addClass" lay-event="add" >
@@ -271,14 +271,14 @@
// 鎼滅储鏂规硶
form.on('submit(LAY-app-contlist-search)', function (data) {
- bindTable();
-
- });
+ bindTable();
+
+ });
// 椤甸潰鍔犺浇缁戝畾Table
bindTable();
-
+
// 娣诲姞瀵煎叆鎸夐挳鍗曟満浜嬩欢
table.on('toolbar(Box-list)', function (obj) {
switch (obj.event) {
@@ -300,11 +300,11 @@
icon: 2,
time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
}, function () { doing = true });
- }
+ }
});
}
break;
-
+
default: break;
}
});
@@ -349,195 +349,42 @@
// 鏌ヨ褰曞叆鐨勭鏀叧绯�
//#region 鑷畾涔夎〃澶�
var TotalColsArr = [[
- {field: 'BoxNo',title: '绠卞彿',align: 'center',fixed: 'left',width: 220, "disabled": true},
- {field: 'BoxNo2',title: '鐩掑彿',align: 'center',fixed: 'left'},
- {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',fixed: 'left',width: 240, "disabled": true},
- {field: 'LotNo',title: '鎵规鍙�',align: 'center',width: 155,},
- {field: 'Qty',title: '鏁伴噺',align: 'center',width: 100,},
- {field: 'LotText',title: '鎵规鎻忚堪',align: 'center',width: 165},
- {field: 'ProductionTime',title: '鐢熶骇鏃ユ湡',align: 'center',width: 160,templet: '#templetProductionTime'},
- {field: 'ExpirationTime',title: '杩囨湡鏃ユ湡',align: 'center',width: 160,templet: '#templetExpirationTime'},
- {field: 'SupplierLot',title: '渚涜揣鎵规',align: 'center',width: 155},
- {field: 'InspectMark',title: '鎶芥鏍囪',align: 'center',templet: '#templetInspectMark',width: 90},
- {field: 'BitBoxMark',title: '闆剁鏍囪',align: 'center',templet: '#templetBitBoxMark',width: 90},
- {field: 'Origin',title: '鏉ユ簮',align: 'center',},
- {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}
- ]];
- var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
+ { field: 'BoxNo', title: '绠卞彿', align: 'center', fixed: 'left', width: 220, "disabled": true },
+ { field: 'BoxNo2', title: '鐩掑彿', align: 'center', fixed: 'left' },
+ { 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', fixed: 'left', width: 240, "disabled": true },
+ { field: 'LotNo', title: '杩涘巶缂栧彿', align: 'center', width: 155, },
+ { field: 'Qty', title: '鏁伴噺', align: 'center', width: 100, },
+ { field: 'LotText', title: '鎵规鎻忚堪', align: 'center', width: 165 },
+ { field: 'ProductionTime', title: '鐢熶骇鏃ユ湡', align: 'center', width: 160, templet: '#templetProductionTime' },
+ { field: 'ExpirationTime', title: '杩囨湡鏃ユ湡', align: 'center', width: 160, templet: '#templetExpirationTime' },
+ { field: 'SupplierLot', title: '鍘熷巶鎵瑰彿', align: 'center', width: 155 },
+ { field: 'InspectMark', title: '鎶芥鏍囪', align: 'center', templet: '#templetInspectMark', width: 90 },
+ { field: 'BitBoxMark', title: '闆剁鏍囪', align: 'center', templet: '#templetBitBoxMark', width: 90 },
+ { field: 'Origin', title: '鏉ユ簮', align: 'center', },
+ { 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 }
+ ]];
+ var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
//#endregion
function bindTable() {
- //#region 鍘熷闈炶嚜瀹氫箟鍒�
- // var param = {
- // BoxNo: $("#BoxNo").val(),
- // // BoxNo2: $("#BoxNo2").val(),
- // BoxNo3: $("#BoxNo3").val(),
- // SkuNo: $("#SkuNo").val(),
- // LotNo: $("#LotNo").val(),
- // LotText: $("#LotText").val(),
- // ProductionTime: $("#ProductionTime").val(),
- // InspectMark: $("#InspectMark").val(),
- // BitBoxMark: $("#BitBoxMark").val(),
- // // Origin: "褰曞叆",
- // };
-
- // table.render({
- // elem: '#Box-list',
- // url: IP + "/BllAsn/GetBllBoxInfoList",
- // method: 'POST',
- // height: 'full-136',
- // id: 'Box-list',
- // where: param,
- // contentType: 'application/json',
- // toolbar: '#toolbarDemo',
- // defaultToolbar: [], //'filter','print', 'exports'
- // headers: { ToKen: $.cookie('token') },
- // page: true,
- // even: true,
- // limit: pageCnt,
- // limits: pageLimits,
- // cellMinWidth: 60, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
- // done: function (res) {
- // setRight();
- // },
- // cols: [
- // [{
- // field: 'BoxNo',
- // title: '绠卞彿',
- // align: 'center',
- // fixed: 'left',
- // width: 220
- // }, {
- // field: 'BoxNo2',
- // title: '鐩掑彿',
- // align: 'center',
- // fixed: 'left',
- // hide:true
- // }, {
- // field: 'BoxNo3',
- // title: '鏀彿',
- // align: 'center',
- // fixed: 'left',
- // width: 220
- // }, {
- // field: 'SkuNo',
- // title: '鐗╂枡缂栫爜',
- // align: 'center',
- // fixed: 'left',
- // width: 140
- // }, {
- // field: 'SkuName',
- // title: '鐗╂枡鍚嶇О',
- // align: 'center',
- // fixed: 'left',
- // width: 240
- // }, {
- // field: 'LotNo',
- // title: '鎵规鍙�',
- // align: 'center',
- // width: 155,
- // }, {
- // field: 'Qty',
- // title: '鏁伴噺',
- // align: 'center',
- // width: 100,
- // }, {
- // field: 'LotText',
- // title: '鎵规鎻忚堪',
- // align: 'center',
- // width: 165
-
- // }, {
- // field: 'ProductionTime',
- // title: '鐢熶骇鏃ユ湡',
- // align: 'center',
- // width: 160,
- // templet: function (d) {
- // return formatDate2(d.ProductionTime);
- // }
- // }, {
- // field: 'ExpirationTime',
- // title: '杩囨湡鏃ユ湡',
- // align: 'center',
- // width: 160,
- // templet: function (d) {
- // return formatDate2(d.ExpirationTime);
- // }
- // }, {
- // field: 'SupplierLot',
- // title: '渚涜揣鎵规',
- // align: 'center',
- // width: 155
- // }, {
- // field: 'InspectMark',
- // title: '鎶芥鏍囪',
- // align: 'center',
- // templet: function (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 "";
- // }
- // },
- // width: 90
- // }, {
- // field: 'BitBoxMark',
- // title: '闆剁鏍囪',
- // align: 'center',
- // templet: function (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 "";
- // }
- // },
- // width: 90
- // }, {
- // field: 'Origin',
- // title: '鏉ユ簮',
- // align: 'center',
- // }, {
- // field: 'CreateUserName',
- // title: '鍒涘缓浜�',
- // align: 'center',
- // width: 100
- // }, {
- // field: 'CreateTime',
- // title: '鍒涘缓鏃堕棿',
- // align: 'center',
- // width: 160,
- // templet: function (d) {
- // return formatDate(d.CreateTime);
- // }
- // }, {
- // title: '鎿嶄綔',
- // fixed: 'right',
- // width: 100,
- // align: 'center',
- // toolbar: '#toolbarDemoList'
- // }]
- // ],
-
- // });
- //#endregion
-
+
//#region 鑷畾涔夎〃澶�
var colsJson
- var param1={
- Href:'BllAsn/GetBllBoxInfoList'
+ var param1 = {
+ Href: 'BllAsn/GetBllBoxInfoList'
};
- 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 = {
BoxNo: $("#BoxNo").val(),
@@ -549,7 +396,7 @@
ProductionTime: $("#ProductionTime").val(),
InspectMark: $("#InspectMark").val(),
BitBoxMark: $("#BitBoxMark").val(),
- // Origin: "褰曞叆",
+ Origin: "褰曞叆;瀵煎叆;璧嬬爜",
};
table.render({
elem: '#Box-list',
@@ -570,7 +417,7 @@
done: function (res) {
setRight();
//鑷畾涔夊垪瀹�
- SetTableColW('Box-list','BllAsn/GetBllBoxInfoList',TotalColsSysArr);
+ SetTableColW('Box-list', 'BllAsn/GetBllBoxInfoList', TotalColsSysArr);
},
cols: colsJson
});
@@ -616,7 +463,7 @@
$(function () {
$(".addClass").hide();
$(".DaoRuClass").hide();
- $(".delClass").hide();
+ $(".delClass").hide();
});
sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
if (res.code == 0) { //鎴愬姛
@@ -633,7 +480,7 @@
}
if (res.data[k].MenuName == "鍒犻櫎绠辨敮褰曞叆") {
$(function () {
- $(".delClass").show();
+ $(".delClass").show();
});
}
}
@@ -678,7 +525,7 @@
return msg;
}
if ($("#LotNo").val() == "") {
- layer.msg("璇疯緭鍏ユ壒娆″彿锛�", {
+ layer.msg("璇疯緭鍏ヨ繘鍘傜紪鍙凤紒", {
icon: 2,
time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
});
@@ -723,7 +570,7 @@
'BoxNo3': 'C', //鏀彿
'Qty': 'D', //鏁伴噺
'SkuNo': 'E', //鐗╂枡鍙�
- 'LotNo': 'F', //鎵规
+ 'LotNo': 'F', //杩涘巶缂栧彿
'LotText': 'G', //鎵规鎻忚堪
'ProductionTime': 'H', //鐢熶骇鏃ユ湡
'InspectMark': 'I', //妫�楠屾爣璁�
@@ -782,17 +629,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 });
+ }
}
});
});
@@ -806,18 +653,18 @@
//#region 鑷畾涔夎〃澶�
//鑷畾涔夎〃澶�
active = {
- customCols: function(){
+ customCols: function () {
layer.open({
type: 2,
title: '鑷畾涔夊垪',
- content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetBllBoxInfoList&ColsSysArr='+TotalColsSysArr,
+ content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetBllBoxInfoList&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