From 52523aec7a50b9dc6a000e774049132d11468231 Mon Sep 17 00:00:00 2001
From: Demo <Demo@DESKTOP-CPA90BF>
Date: 星期四, 01 二月 2024 08:16:05 +0800
Subject: [PATCH] 修改标签箱码页面及后端方法
---
Wms/WMS.Entity/BllAsnEntity/BllLabelBoxNo.cs | 2
Wms/Wms/Controllers/BllAsnController.cs | 22 +
HTML/views/ASNSetting/LabelBox.html | 637 +++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 659 insertions(+), 2 deletions(-)
diff --git a/HTML/views/ASNSetting/LabelBox.html b/HTML/views/ASNSetting/LabelBox.html
new file mode 100644
index 0000000..97dc71e
--- /dev/null
+++ b/HTML/views/ASNSetting/LabelBox.html
@@ -0,0 +1,637 @@
+<!DOCTYPE html>
+<html>
+
+<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.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+ <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
+ <link rel="stylesheet" href="../../css/public.css" media="all">
+ <style>
+ .rightMargin {
+ margin-right: 0px;
+ }
+
+ .buJu {
+ margin-top: 10px;
+ display: flex;
+ flex-direction: row-reverse;
+ }
+
+ .beiJing {
+ background-color: #fafafa;
+ padding-top: 5px;
+ border-radius: 3px;
+ box-shadow: inset 0 0 3px 1px #ccc;
+ }
+
+ /* 琛ㄦ牸涓嬫媺灏忕澶撮殣钘� */
+ .layui-table-grid-down {
+ display: none;
+ }
+ </style>
+ <script>
+ // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
+ document.addEventListener("DOMContentLoaded", function() {
+
+ //鑾峰彇table榛樿鏄剧ず鏁�
+ pageCntFirst();
+ //鍒ゆ柇鏄惁寮�鍚痶able鍒楄〃鍒楀璋冩暣鍔熻兘銆�
+ GetIsSetColW();
+ });
+ </script>
+</head>
+
+
+<body>
+
+ <div class="layui-fluid" style="padding: 3px;">
+ <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="BoxNo" name="BoxNo" 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;">
+ <input type="text" id="SkuNo" name="SkuNo" 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;">
+ <div class="layui-input-inline" style="margin-right: 0;">
+ <input type="text" id="LotNo" name="LotNo" placeholder="鎵规鍙�" autocomplete="off"
+ class="layui-input">
+ </div>
+ </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;">
+ <div class="layui-input-inline" style="margin-right: 0;">
+ <input type="text" id="LotText" name="LotText" 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">
+ <input type="text" autocomplete="off" name="ProductionTime" id="ProductionTime"
+ class="layui-input" placeholder="鐢熶骇鏃ユ湡">
+ </div>
+ </div>
+
+ <div class="layui-inline">
+ <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit
+ lay-filter="LAY-app-contlist-search">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>鎼滅储
+ </button>
+ </div>
+ </div>
+ </div>
+ <div class="layui-card-body">
+ <!-- <button type="button" class="layui-btn layui-btn-sm" id="daoru1">
+ 瀵煎叆
+ </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);
+ }
+ }}
+ {{ GetBtn3(d) }}
+ </script>
+
+ <script type="text/html" id="templetExpirationTime">
+ {{# function GetBtn4(d){
+ return formatDate2(d.ExpirationTime);
+ }
+ }}
+ {{ GetBtn4(d) }}
+ </script>
+
+ <script type="text/html" id="templetInspectTime">
+ {{# function GetBtn5(d){
+ return formatDate2(d.InspectTime);
+ }
+ }}
+ {{ GetBtn5(d) }}
+ </script>
+
+ <script type="text/html" id="templetCompleteTime">
+ {{# function GetBtn6(d){
+ return formatDate(d.CompleteTime);
+ }
+ }}
+ {{ GetBtn6(d) }}
+ </script>
+
+ <script type="text/html" id="templetIsUse">
+ {{# 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>';
+ default: return "";
+ }
+ }
+ }}
+ {{ GetBtn7(d) }}
+ </script>
+
+
+
+ <script type="text/html" id="templetCreateTime">
+ {{# function GetBtn8(d){
+ return formatDate(d.CreateTime);
+ }
+ }}
+ {{ GetBtn8(d) }}
+ </script>
+ </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" >
+ <i class="layui-icon"></i>娣诲姞
+ </button>
+
+ <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 type="text/html" id="toolbarDemoList">
+ {{# function GetBtn2(d){
+ var html = '';
+ if(d.Origin == "褰曞叆" || d.Origin == "瀵煎叆"){
+ html = `<a class="layui-btn layui-btn-danger layui-btn-xs delClass" lay-event="del">
+ <i class="layui-icon layui-icon-delete"></i>鍒犻櫎</a>`;
+
+ }
+ return html;
+ }
+ }}
+ {{ GetBtn2(d) }}
+ </script>
+ </div>
+
+ </div>
+ </div>
+
+
+ <script src="../../layuiadmin/layui/layui.js"></script>
+ <script src="../../js/public.js"></script>
+ <script src="../../js/jquery-3.5.1.min.js"></script>
+ <script src="../../js/jquery.cookie.js"></script>
+ <script>
+ layui.extend({
+ excel: '../../layuiadmin/layui/layui_exts/excel' // {/}鐨勬剰鎬濆嵆浠h〃閲囩敤鑷湁璺緞锛屽嵆涓嶈窡闅� base 璺緞
+ })
+
+ layui.config({
+ base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['index', 'form', 'layer', 'table', 'laydate', 'upload', 'excel'], function () {
+ var form = layui.form,
+ table = layui.table,
+ layer = layui.layer,
+ laydate = layui.laydate;
+ var upload = layui.upload;
+
+ laydate.render({
+ elem: '#ProductionTime'
+ , format: 'yyyy-MM-dd' //鍙换鎰忕粍鍚�
+ });
+
+ // 鎼滅储鏂规硶
+ form.on('submit(LAY-app-contlist-search)', function (data) {
+ bindTable();
+
+ });
+
+ // 椤甸潰鍔犺浇缁戝畾Table
+ bindTable();
+
+
+ // 娣诲姞瀵煎叆鎸夐挳鍗曟満浜嬩欢
+ table.on('toolbar(Box-list)', function (obj) {
+ switch (obj.event) {
+ case 'add': // 娣诲姞绠辨敮鍏崇郴
+ // 浠g爜鍖哄煙
+ var param = getBoxInforVlues();
+ if (param != "") {
+ console.log(param);
+ sendData(IP + "/BllAsn/AddBllBoxInfo", param, 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ layer.msg(res.msg, {
+ icon: 1,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ bindTable();
+ });
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { doing = true });
+ }
+ });
+ }
+ break;
+
+ default: break;
+ }
+ });
+
+
+ // 鍒犻櫎绠辨敮淇℃伅
+ table.on('tool(Box-list)', function (obj) {
+ var data = obj.data;
+ switch (obj.event) {
+ case "del":
+ layer.confirm('纭畾鍒犻櫎绠辨敮鏄庣粏鍚楋紵', function (index) {
+ // 浠g爜鍖哄煙
+ var param = {
+ Id: data.Id,
+ Status: "0",
+ };
+ console.log(param);
+ sendData(IP + "/BllAsn/DelBllBoxInfo", param, 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ layer.msg(res.msg, {
+ icon: 1,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ bindTable();
+ doing = true
+ });
+ } else { //涓嶆垚鍔�
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { doing = true });
+ }
+ });
+ });
+
+ break;
+ default: break;
+ }
+ });
+
+ //#region 浜嬩欢鏂规硶
+ // 鏌ヨ褰曞叆鐨勭鏀叧绯�
+ //#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: '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'
+ };
+ 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
+ }
+ 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/GetLabelBoxList",
+ 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();
+ //鑷畾涔夊垪瀹�
+ SetTableColW('Box-list','BllAsn/GetLabelBoxList',TotalColsSysArr);
+ },
+ cols: colsJson
+ });
+
+ //缁戝畾瀵煎叆
+ upload.render({
+ elem: '#daoru' //缁戝畾鍏冪礌
+ , url: '' //涓婁紶鎺ュ彛
+ , auto: false //鏄惁閫夊畬鏂囦欢鍚庤嚜鍔ㄤ笂浼犮�傚鏋滆瀹� false锛岄偅涔堥渶瑕佽缃� bindAction 鍙傛暟鏉ユ寚鍚戜竴涓叾瀹冩寜閽彁浜や笂浼�
+ , exts: 'slx|excel|xlsx' //鍏佽涓婁紶鐨勬枃浠跺悗缂�
+ , accept: 'file' //鎸囧畾鍏佽涓婁紶鏃舵牎楠岀殑鏂囦欢绫诲瀷
+ //, bindAction: '#daoru' //鎸囧悜涓�涓寜閽Е鍙戜笂浼�
+ , choose: function (obj) {// 閫夋嫨鏂囦欢鍥炶皟
+ console.log(obj);
+ var files = obj.pushFile(); //灏嗘瘡娆¢�夋嫨鐨勬枃浠惰拷鍔犲埌鏂囦欢闃熷垪
+ var fileArr = Object.values(files);// 娉ㄦ剰杩欓噷鐨勬暟鎹渶瑕佹槸鏁扮粍锛屾墍浠ラ渶瑕佽浆鎹竴涓�
+ console.log(fileArr)
+ // 鐢ㄥ畬灏辨竻鐞嗘帀锛岄伩鍏嶅娆¢�変腑鐩稿悓鏂囦欢鏃跺嚭鐜伴棶棰�
+ for (var index in files) {
+ console.log(index);
+ if (files.hasOwnProperty(index)) {
+ delete files[index];
+ }
+ }
+ console.log("abs");
+ uploadExcel(fileArr); // 濡傛灉鍙渶瑕佹渶鏂伴�夋嫨鐨勬枃浠讹紝鍙互杩欐牱鍐欙細 uploadExcel([files.pop()])
+ }
+ , done: function (res) {
+ console.log(res);
+ //涓婁紶瀹屾瘯鍥炶皟
+ }
+ , error: function (res) {
+ console.log(res);
+ //璇锋眰寮傚父鍥炶皟
+ }
+ });
+ });
+ //#endregion
+ }
+
+ // 鏉冮檺璁剧疆
+ function setRight() {
+ $(function () {
+ $(".addClass").hide();
+ $(".DaoRuClass").hide();
+ $(".delClass").hide();
+ });
+ sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ for (var k = 0; k < res.data.length; k++) {
+ if (res.data[k].MenuName == "娣诲姞绠辨敮褰曞叆") {
+ $(function () {
+ $(".addClass").show();
+ });
+ }
+ if (res.data[k].MenuName == "瀵煎叆绠辨敮褰曞叆") {
+ $(function () {
+ $(".DaoRuClass").show();
+ });
+ }
+ if (res.data[k].MenuName == "鍒犻櫎绠辨敮褰曞叆") {
+ $(function () {
+ $(".delClass").show();
+ });
+ }
+ }
+ } else { //涓嶆垚鍔�
+ layer.msg('鑾峰彇鏉冮檺淇℃伅澶辫触', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ }
+ });
+ }
+
+ // 鑾峰彇绠辨敮淇℃伅
+ function getBoxInforVlues() {
+ var msg = "";
+ if ($("#BoxNo").val() == "") {
+ layer.msg("璇疯緭鍏ョ鐮侊紒", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return msg;
+ }
+ // if ($("#BoxNo2").val() == "") {
+ // layer.msg("璇疯緭鍏ョ洅鐮侊紒", {
+ // icon: 2,
+ // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ // });
+ // return msg;
+ // }
+ if ($("#BoxNo3").val() == "") {
+ layer.msg("璇疯緭鍏ユ敮鐮侊紒", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return msg;
+ }
+ if ($("#SkuNo").val() == "") {
+ layer.msg("璇疯緭鍏ョ墿鏂欑紪鐮侊紒", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return msg;
+ }
+ if ($("#LotNo").val() == "") {
+ layer.msg("璇疯緭鍏ユ壒娆″彿锛�", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return msg;
+ }
+ if ($("#Qty").val() == "") {
+ layer.msg("璇疯緭鍏ュ疄闄呮暟閲忥紒", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return msg;
+ }
+
+ var param = {
+ BoxNo: $("#BoxNo").val(),
+ // BoxNo2: $("#BoxNo2").val(),
+ BoxNo3: $("#BoxNo3").val(),
+ SkuNo: $("#SkuNo").val(),
+ LotNo: $("#LotNo").val(),
+ LotText: $("#LotText").val(),
+ Qty: parseInt($("#Qty").val()),
+ ProductionTime: $("#ProductionTime").val(),
+ InspectMark: $("#InspectMark").val(),
+ BitBoxMark: $("#BitBoxMark").val(),
+ Origin: "褰曞叆",
+ };
+
+ return param;
+ }
+
+ // 瀵煎叆绠辨敮鍏崇郴
+ function uploadExcel(files) {
+ console.log("123");
+ var list = [];
+ try {
+ var excel = layui.excel;
+ excel.importExcel(files, {
+ // 璇诲彇鏁版嵁鐨勫悓鏃舵⒊鐞嗘暟鎹�
+ fields: {
+ 'BoxNo': 'A', //绠卞彿
+ 'BoxNo2': 'B', //鐩掑彿
+ 'BoxNo3': 'C', //鏀彿
+ 'Qty': 'D', //鏁伴噺
+ 'SkuNo': 'E', //鐗╂枡鍙�
+ 'LotNo': 'F', //鎵规
+ 'LotText': 'G', //鎵规鎻忚堪
+ 'ProductionTime': 'H', //鐢熶骇鏃ユ湡
+ 'InspectMark': 'I', //妫�楠屾爣璁�
+ 'BitBoxMark': 'J', //闆剁鏍囪
+ }
+ },
+ function (data) {
+ console.log(data);
+ // var arr = new Array();
+ //excel绗竴琛屼笉璇诲彇銆佽缃负鏍囬
+ for (i = 1; i < data[0].Sheet1.length; i++) {
+
+ var Qty = 0;
+ if (isIntNum(data[0].Sheet1[i].Qty)) {
+ Qty = parseInt(data[0].Sheet1[i].Qty);
+ }
+
+ var InspectMark = "0";
+ var BitBoxMark = "0";
+ if (data[0].Sheet1[i].InspectMark == "鏄�") {
+ InspectMark = "1";
+ }
+ if (data[0].Sheet1[i].BitBoxMark == "鏄�") {
+ BitBoxMark = "1";
+ }
+ var tt = {
+ BoxNo: data[0].Sheet1[i].BoxNo,
+ BoxNo2: data[0].Sheet1[i].BoxNo2,
+ BoxNo3: data[0].Sheet1[i].BoxNo3,
+ Qty: Qty,
+ SkuNo: data[0].Sheet1[i].SkuNo,
+ LotNo: data[0].Sheet1[i].LotNo,
+ LotText: data[0].Sheet1[i].LotText,
+ ProductionTime: data[0].Sheet1[i].ProductionTime,
+ InspectMark: InspectMark,
+ BitBoxMark: BitBoxMark,
+ };
+ list.push(tt);
+ console.log(data[0].Sheet1[i].ProductionTime);
+ }
+ console.log(list);
+ var param = {
+ "OperType": "Add",
+ "ListBoxInfo": list,
+ }
+ console.log(param)
+ layer.load();//鎵撳紑loading
+ sendData(IP + "/BllAsn/ImportBllBoxInfo", param, 'post', function (res) {
+ layer.closeAll(); //鍏抽棴loading
+ if (res.code == 0) { //鎴愬姛
+ layer.msg(res.msg, {
+ icon: 1,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ bindTable();
+ doing = true
+ });
+ } else { //涓嶆垚鍔�
+ if(res.msg==undefined){
+ layer.msg("鍚庡彴姝e湪瀵煎叆涓紝璇风◢鍚庢煡鐪嬬粨鏋�", {
+ icon: 2,
+ time: 3000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { bindTable();doing = true });
+ }else{
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { bindTable();doing = true });
+ }
+ }
+ });
+ });
+ } catch (e) {
+ layer.alert(e.message);
+ }
+
+ }
+ //#endregion
+
+ //#region 鑷畾涔夎〃澶�
+ //鑷畾涔夎〃澶�
+ active = {
+ customCols: function(){
+ layer.open({
+ type: 2,
+ title: '鑷畾涔夊垪',
+ content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetLabelBoxList&ColsSysArr='+TotalColsSysArr,
+ maxmin: false,
+ resize: false,
+ area: ['970px', '650px']
+ });
+ },
+ };
+ $('.layui-btn').on('click', function() {
+ var type = $(this).data('type');
+ active[type] ? active[type].call(this) : '';
+ });
+ //#endregion
+ })
+ </script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/Wms/WMS.Entity/BllAsnEntity/BllLabelBoxNo.cs b/Wms/WMS.Entity/BllAsnEntity/BllLabelBoxNo.cs
index 32e1075..c9a9ccf 100644
--- a/Wms/WMS.Entity/BllAsnEntity/BllLabelBoxNo.cs
+++ b/Wms/WMS.Entity/BllAsnEntity/BllLabelBoxNo.cs
@@ -44,7 +44,7 @@
/// Default:
/// Nullable:False
/// </summary>
- public int Qty { get; set; }
+ public decimal Qty { get; set; }
/// <summary>
/// Desc:鐗╂枡缂栫爜
diff --git a/Wms/Wms/Controllers/BllAsnController.cs b/Wms/Wms/Controllers/BllAsnController.cs
index 72f1158..081f183 100644
--- a/Wms/Wms/Controllers/BllAsnController.cs
+++ b/Wms/Wms/Controllers/BllAsnController.cs
@@ -25,10 +25,11 @@
private readonly IOperationASNServer _logSvc; //鍏ュ簱搴撴搷浣滄棩蹇桽vc
private readonly IPalletUnbindServer _palletUnbind; //鎵樼洏瑙g粦缁戝畾
private readonly IAuditLogServer _auditLog; //瀹℃牳璁板綍
+ private readonly IBllLabelBoxNoServer _labelBox; //绠辩爜鏍囩
#endregion
#region 鏋勯�犲嚱鏁�
- public BllAsnController(IArrivalNoticeServer arrivalNoticeSvc, IPalletBindServer palletBindSvc,IBllBoxInfoServer bllBoxInfoSvc, ITaskServer taskSvc,IOperationASNServer logSvc, IPalletUnbindServer palletUnbind,IAuditLogServer auditLog)
+ public BllAsnController(IArrivalNoticeServer arrivalNoticeSvc, IPalletBindServer palletBindSvc,IBllBoxInfoServer bllBoxInfoSvc, ITaskServer taskSvc,IOperationASNServer logSvc, IPalletUnbindServer palletUnbind,IAuditLogServer auditLog,IBllLabelBoxNoServer labelBox)
{
_arrivalNoticeSvc = arrivalNoticeSvc;
_PalletBindSvc = palletBindSvc;
@@ -37,6 +38,7 @@
_logSvc = logSvc;
_palletUnbind = palletUnbind;
_auditLog = auditLog;
+ _labelBox = labelBox;
}
#endregion
@@ -843,6 +845,24 @@
}
#endregion
+
+ #region 绠辩爜鏍囩
+
+ [HttpPost]
+ public IActionResult GetLabelBoxList(LabelBoxVm model)
+ {
+ try
+ {
+ var list = _labelBox.GetLabelBoxList(model, out int count);
+ return Ok(new { code = 0, count, msg = "绠辩爜鏍囩鍒楄〃", data = list });
+ }
+ catch (Exception e)
+ {
+ return Ok(new { code = 1, count = 0, msg = e.Message });
+ }
+ }
+
+ #endregion
}
}
--
Gitblit v1.8.0