yuyou_x
2024-02-04 99185f80296a5bf22e7aed76e56f63624d6e9a58
合并代码
6个文件已修改
542 ■■■■ 已修改文件
HTML/views/ASNSetting/ArrivalNotice.html 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pda/View/AsnSetting/productEnter.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pda/View/AsnSetting/productEnter1.html 325 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/Controllers/PdaAsnController.cs 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/ASNSetting/ArrivalNotice.html
@@ -178,8 +178,6 @@
                                        <i class="layui-icon layui-icon-edit"></i>编辑</a>
                                        <a class="layui-btn layui-btn-danger layui-btn-xs delClass" lay-event="del">
                                        <i class="layui-icon layui-icon-delete"></i>删除</a>
                                        <a class="layui-btn layui-btn-normal layui-btn-xs clossClass" lay-event="closs">
                                        <i class="layui-icon layui-icon-ok"></i>订单关闭</a>`;
                                    break; 
                                case "1" : 
                                html += `<a class="layui-btn layui-btn-normal layui-btn-xs clossClass" lay-event="closs">  <i class="layui-icon layui-icon-ok"></i>订单关闭</a>
Pda/View/AsnSetting/productEnter.html
@@ -512,7 +512,7 @@
                                        var param = {
                                            Id: Id,
                                        };
                                        sendData(IP + "/PdaAsn/DelBoxInfo", param, 'post', function (res) {
                                        sendData(IP + "/BllAsn//DelBindBoxInfo'", param, 'post', function (res) {
                                            if (res.code == 0) { //成功
                                                layer.msg(res.msg, {
                                                    icon: 1,
Pda/View/AsnSetting/productEnter1.html
@@ -110,8 +110,8 @@
            <br />
            <!-- 有码 -->
            <div id="content1">
                <div id="zongDiv" class="layout-bill-info" style="height: 255px;">
                    <form class="layui-form" id="form1" action="">
                <div id="zongDiv" class="layout-bill-info" style="height: 285px;">
                    <form class="layui-form" action="">
                        <div id="" class="layui-form-item layout-dropdownlist">
                            <label class="layui-form-label" lang>入库单:</label>
                            <div class="layui-input-block" id="selectDiv">
@@ -130,7 +130,7 @@
                                <img src="/assets/down_arraw.png">
                            </div>
                        </div>
                        <div id="" class="layui-form-item layout-input">
                            <label class="layui-form-label" lang>托盘条码:</label>
                            <div class="layui-input-block">
@@ -159,12 +159,12 @@
                                    class="layui-input">
                            </div>
                        </div>
                        <table class="layout-tbl-input" border="" cellspacing="" cellpadding="">
                            <tr>
                                <td>
                                    <div id="" class="layui-form-item layout-boxinfo">
                                        <label class="layui-form-label" lang>规格/型号:</label>
                                        <label class="layui-form-label" lang>物料规格:</label>
                                        <div class="layui-input-block">
                                            <input id="Standard" type="text" disabled placeholder="" autocomplete="off"
                                                class="layui-input">
@@ -180,7 +180,7 @@
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>
@@ -202,9 +202,9 @@
                                    </div>
                                </td>
                            </tr>
                        </table>
                        <table class="layout-tbl-submit" border="" cellspacing="" cellpadding="">
                            <tr>
                                <td style="width: 23%;"></td>
@@ -213,10 +213,9 @@
                                        lay-filter="formBind">绑定到托盘</button>
                                </td>
                                <td style="width: 33%;"></td>
                            </tr>
                        </table>
                    </form>
                </div>
@@ -269,7 +268,7 @@
                        <div id="" class="layui-form-item layout-dropdownlist">
                            <label class="layui-form-label" lang>入库单:</label>
                            <div class="layui-input-block" id="selectDiv1">
                                <select id="bar1" lay-filter="getbar" lay-search>
                                <select id="bar1" lay-filter="getbar1" lay-search>
                                    <option value=""></option>
                                </select>
                                <img src="/assets/down_arraw.png">
@@ -277,7 +276,7 @@
                        </div>
                        <div class="layui-form-item layout-dropdownlist" style="margin-top: 10px;">
                            <label class="layui-form-label">物料-批次:</label>
                            <div class="layui-input-block" id="goodDiv">
                            <div class="layui-input-block" id="goodDiv1">
                                <select id="goodSelect1" lay-filter="goodSelect1" lay-search>
                                    <option value=""></option>
                                </select>
@@ -363,10 +362,10 @@
                <div class="layout-tbl-paging" id="">
                    <table id="tableBoxList1" class="tbl-box-list" border="" cellspacing="" cellpadding="">
                        <tr>
                            <th lang style="width: 15%;">编码</th>
                            <th lang style="width: 35%;">名称</th>
                            <th lang style="width: 15%;">物料编码</th>
                            <th lang style="width: 35%;">物料名称</th>
                            <th lang style="width: 25%;">批次</th>
                            <th lang style="width: 15%;">数量</th>
                            <th lang style="width: 15%;">物料数量</th>
                            <th lang style="width: 10%;">操作</th>
                        </tr>
                        <tr id="boxCell" style="display: none;">
@@ -438,27 +437,30 @@
                });
            });
            //清空两个标签页内容
            function qingkong()
            {
                //入库单据
                // $('#form1').reset()
                // $('#form2').reset()
            //清楚文本框中数据
            // function clear() {
            //     if (xianshiyemian == "0")
            //     {
            //         $("#BOXCODE").val("");
            //         $("#BOXCODE2").val("");
                // //表格内容
                // let trs = $("#tableBoxList tr")
                // let len = trs.length
            //         $("#ImportQuantity").val("");
            //         $("#Standard").val("");
            //         $("#ImportFactQuantity").val("");
            //         $("#BoxQty").val("");
            //     }
            //     else if (xianshiyemian == "1")
            //     {
            //         $("#BOXCODE").val("");
            //         $("#BOXCODE2").val("");
                // for (i = len - 1; i >= 2; i--) {
                //     trs[i].remove();
                // }
                // let trs1 = $("#tableBoxList1 tr")
                // let len1 = trs1.length
                // for (i = len1 - 1; i >= 2; i--) {
                //     trs1[i].remove();
                // }
            }
            //         $("#ImportQuantity").val("");
            //         $("#Standard").val("");
            //         $("#ImportFactQuantity").val("");
            //         $("#BoxQty").val("");
            //     }
            // }
            
            /*——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*/
@@ -469,15 +471,6 @@
            var curPageIndex = 1;
            //是否连续组托
            isContinue = "0";
            //清楚文本框中数据
            function clear() {
                $("#ImportQuantity").val("");
                $("#GoodsCode").val("");
                $("#Standard").val("");
                $("#ImportFactQuantity").val("");
                $("#ImportQty").val("");
                $("#BoxQty").val("");
            }
            // 托盘码文本改变时触发
            $("#STOCKCODE").on('input', function () {
@@ -490,7 +483,7 @@
                }
                checkPalletStat()
            })
            // 托盘码文本改变时触发
            // 托盘码文本改变时触发-数量
            $("#STOCKCODE1").on('input', function () {
                if ($("#STOCKCODE1").val() == "" || $("#STOCKCODE1").val().length < 8) {
@@ -506,22 +499,25 @@
            $("#BOXCODE").keydown(function (e) {
                if (e.keyCode === 13) {
                    if ($("#BOXCODE").val() == "") {
                        return
                    }
                    if ($("#STOCKCODE").val() == "") {
                        layer.msg('请先扫描托盘码', {
                        layer.msg('请先扫描箱码', {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        });
                        $("#BOXCODE").val("");
                        $("#STOCKCODE").focus();
                        return;
                        return
                    }
                    // if ($("#STOCKCODE").val() == "") {
                    //     layer.msg('请先扫描托盘码', {
                    //         icon: 2,
                    //         time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    //     });
                    //     $("#BOXCODE").val("");
                    //     $("#STOCKCODE").focus();
                    //     return;
                    // }
                    checkBoxInfo()
                }
            });
            /* 入库单据下拉框 */
            //点击入库单据下拉框事件
@@ -566,7 +562,7 @@
                    form.render('select');
                    var param = {
                        Type: "0,1"
                        Type: "0,1,3"
                    };
                    sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) {
                        if (res.code == 0) { //成功
@@ -643,8 +639,22 @@
                    }, function () { });
                }
            })
            //点击物料下拉框事件-数量
            $("#goodDiv1").click(function () {
                if ($("#bar1").val() == null || $("#bar1").val() == "" || $("#bar1").val() == undefined) {
                    layer.msg("请先选择入库单", {
                        icon: 2,
                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    }, function () { });
                }
            })
            //选中入库单事件
            form.on('select(getbar)', function (data) {
                updateGoodList()
                setOrderGoods();
            });
            //选中入库单事件-数量
            form.on('select(getbar1)', function (data) {
                updateGoodList()
                setOrderGoods();
            });
@@ -662,7 +672,6 @@
            form.on('submit(formBind)', function (data) {
                if(xianshiyemian == 0)
                {
                    console.log(isContinue);
                    console.log($("#goodSelect").val());
                    if ($("#bar").val() == "") {
                        layer.msg('请选择入库单', {
@@ -693,36 +702,36 @@
                        return;
                    }
                    var param = {
                        AsnNo: $("#bar").val(),
                        PalletNo: $("#STOCKCODE").val(),
                        AsnDetailId: parseInt($("#goodSelect").val()),
                        BoxNo: $("#BOXCODE").val(),
                        IsContinue: isContinue,
                        TailBoxNo: $("#BOXCODE2").val(),
                        Origin:"PDA"
                    }
                    //组盘
                    sendData(IP + "/PdaAsn/BindPallet", param, 'post', function (res) {
                        if (res.code == 0) { //成功
                            layer.msg(res.msg, {
                                icon: 1,
                                time: 1000 //2秒关闭(如果不配置,默认是3秒)
                            }, function () {
                                setOrderGoods();
                                refreshTable();
                                $("#BOXCODE").val("");
                                $("#BOXCODE2").val("");
                                $("#QTY").val("");
                            });
                        } else { //不成功
                            layer.msg(res.msg, {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function () {
                                //回调
                            });
                        }
                    });
                    AsnNo: $("#bar").val(),
                    PalletNo: $("#STOCKCODE").val(),
                    AsnDetailId: parseInt($("#goodSelect").val()),
                    BoxNo: $("#BOXCODE").val(),
                    IsContinue: isContinue,
                    TailBoxNo: $("#BOXCODE2").val(),
                    Origin:"PDA"
                }
                //组盘
                sendData(IP + "/PdaAsn/BindPallet", param, 'post', function (res) {
                    if (res.code == 0) { //成功
                        layer.msg(res.msg, {
                            icon: 1,
                            time: 1000 //2秒关闭(如果不配置,默认是3秒)
                        }, function () {
                            setOrderGoods();
                            refreshTable();
                            $("#BOXCODE").val("");
                            $("#BOXCODE2").val("");
                            $("#QTY").val("");
                        });
                    } else { //不成功
                        layer.msg(res.msg, {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function () {
                            //回调
                        });
                    }
                });
                }
                else if(xianshiyemian == 1)
                {
@@ -829,7 +838,7 @@
            var asnDetails = "";
            /* 绑定入库单物料及批次 */ 
            function updateGoodList() {
            function updateGoodList(skuNo) {
                if (xianshiyemian == 0)
                {
                    console.log("aaaa");
@@ -847,16 +856,21 @@
                        if (res.code == 0) { //成功
                            asnDetails = res.data;
                            for (var i = 0; i < res.data.length; i++) {
                                if (i == 0) {
                                if(skuNo!='' && skuNo==res.data[i].SkuNo){
                                    $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
                                        .SkuName + "-" + res.data[i].LotNo +
                                        '</option>');
                                } else {
                                    $("#goodSelect").append('<option value =' + res.data[i].Id + '>' + res.data[i]
                                        .SkuName + "-" + res.data[i].LotNo +
                                        '</option>');
                                }
                                }else{
                                    if (i == 0) {
                                        $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
                                            .SkuName + "-" + res.data[i].LotNo +
                                            '</option>');
                                        } else {
                                            $("#goodSelect").append('<option value =' + res.data[i].Id + '>' + res.data[i]
                                                .SkuName + "-" + res.data[i].LotNo +
                                                '</option>');
                                        }
                                }
                            }
                            form.render('select');
@@ -917,7 +931,6 @@
            function refreshTable() {
                if (xianshiyemian == 0)
                {
                    //先清空一下箱子列表
                    let trs = $("#tableBoxList tr")
                    let len = trs.length
@@ -964,7 +977,7 @@
                                            var param = {
                                                Id: Id,
                                            };
                                            sendData(IP + "/PdaAsn/DelBoxInfo", param, 'post', function (res) {
                                            sendData(IP + "/BllAsn//DelBindBoxInfo'", param, 'post', function (res) {
                                                if (res.code == 0) { //成功
                                                    layer.msg(res.msg, {
                                                        icon: 1,
@@ -987,18 +1000,15 @@
                                arrTrs[i] = tr
                            }
                            //设置分页
                            setPages(1, list.length)
                        } else { //不成功
                            layer.msg("无数据", {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            }, function () { });
                            $("#boxNum").val(0)
                            setPages(1, 0)
                        }
                    });
                }
                else if (xianshiyemian == 1)
                {
@@ -1017,7 +1027,7 @@
                        PalletNo: $.cookie('stockCode1')
                    };
                    //  根据托盘号获取箱码信息
                    sendData(IP + "/PdaAsn/GetBoxInfos", param, 'post', function (res) {
                    sendData(IP + "/PdaAsn/GetPalletBindInfo", param, 'post', function (res) {
                        if (res.code == 0) { //成功
                            var list = res
                            var arrTrs = new Array()
@@ -1030,40 +1040,43 @@
                                tr.attr('BindNo', res.data[i].BindNo)
                                idx++;
                                tr.attr('index', idx)
                                tr.find("td[name='code']").html(res.data[i].BoxNo);
                                tr.find("td[name='code']").html(res.data[i].SkuNo);
                                tr.find("td[name='name']").html(res.data[i].SkuName);
                                tr.find("td[name='lotNo']").html(res.data[i].LotNo);
                                tr.find("td[name='num']").html(res.data[i].Qty);
                                tr.find("td[name='del']").click(function () {
                                    var elem = $(this).parent()
                                    var boxno = elem.attr('boxno')
                                    // var boxno = elem.attr('boxno')
                                    var BindNo = elem.attr('BindNo')
                                    console.log(res)
                                    var Id = elem.attr('id')
                                    layer.alert("确定要从托盘上删除这托物料吗?<br>" + boxno, {
                                    layer.alert("确定要从托盘上删除这托物料吗?<br>" + res.data[0].PalletNo, {
                                        icon: 2,
                                        time: 0, //2秒关闭(如果不配置,默认是3秒)
                                        btn: ['删除', '取消'],
                                        yes: function () {
                                            var param = {
                                                Id: Id,
                                                PalletNo: res.data[0].PalletNo,
                                            };
                                            sendData(IP + "/PdaAsn/DelBoxInfo", param, 'post', function (res) {
                                                if (res.code == 0) { //成功
                                                    layer.msg(res.msg, {
                                                        icon: 1,
                                                        time: 1000 //2秒关闭(如果不配置,默认是3秒)
                                                    });
                                                    elem.remove()
                                                    setOrderGoods();
                                                    refreshTable();
                                                } else { //不成功
                                                    layer.msg(res.msg, {
                                                        icon: 2,
                                                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                                    }, function () { });
                                                }
                                            });
                                            console.log(Id)
                                            console.log(param)
                                            // sendData(IP + "/PdaAsn/DelBoxInfo", param, 'post', function (res) {
                                            //     if (res.code == 0) { //成功
                                            //         layer.msg(res.msg, {
                                            //             icon: 1,
                                            //             time: 1000 //2秒关闭(如果不配置,默认是3秒)
                                            //         });
                                            //         elem.remove()
                                            //         setOrderGoods();
                                            //         refreshTable();
                                            //     } else { //不成功
                                            //         layer.msg(res.msg, {
                                            //             icon: 2,
                                            //             time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                            //         }, function () { });
                                            //     }
                                            // });
                                        }
                                    })
                                })
@@ -1137,15 +1150,33 @@
                var param = {
                    "BoxNo": $("#BOXCODE").val(),
                }
                sendData(IP + "/PdaAsn/GetBoxInfos", param, 'post', function (res) {
                sendData(IP + "/PdaAsn/GetBindBoxInfos", param, 'post', function (res) {
                    if (res.code == 0) { //成功
                        var bl = false; console.log(res.data);
                        var bl = false;
                        if (res.data.length == 0) {
                            layer.msg("未查询到此箱物料信息,请核实!", {
                                icon: 2,
                                time: 2000 //2秒关闭(如果不配置,默认是3秒)
                            });
                            return;
                        }
                        if(res.data[0].ASNNo!='' && res.data[0].ASNNo!=null){
                            $("#bar").empty()
                            $("#bar").append('<option value =>' + '</option>');
                            form.render('select');
                            $("#bar").append('<option value =' + res.data[0].ASNNo + ' selected>' + res.data[0].ASNNo +'</option>');
                            updateGoodList(res.data[0].SkuNo)
                            setOrderGoods();
                        }else{
                            if(asnDetails==''){
                                layer.msg("请先选择入库单据!", {
                                    icon: 2,
                                    time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                });
                                return;
                            }
                        }
                        asnDetails.forEach(element => {
                            console.log(element);
@@ -1365,6 +1396,56 @@
                }
                
            }
            function getBoxPageNum()
            {
                if (xianshiyemian == 0)
                {
                    let num = $("#tableBoxList tr").length
                    if(num <= 2 ){
                        return 0
                    }
                    let pageNum = Math.floor(num / 10);
                    if(num % 10 > 0){
                        pageNum += 1;
                    }
                    return pageNum
                }
                else if (xianshiyemian == 1)
                {
                    let num = $("#tableBoxList1 tr").length
                    if(num <= 2 ){
                        return 0
                    }
                    let pageNum = Math.floor(num / 10);
                    if(num % 10 > 0){
                        pageNum += 1;
                    }
                    return pageNum
                }
            }
            function onClickPrevPage(){
                //console.log("上一页按钮被点击")
                if(curPageIndex == 1){
                    return
                }
                setCurPage(curPageIndex - 1)
            }
            function onClickNextPage(){
                //console.log("下一页按钮被点击")
                let n = getBoxPageNum()
                if(curPageIndex == n){
                    return
                }
                setCurPage(curPageIndex + 1)
            }
          
            /*——————————————————————————————————————————————————————————*/
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -15,6 +15,8 @@
using WMS.Entity.BllSoEntity;
using Model.ModelVm.PdaVm;
using Model.ModelDto.PdaDto;
using Dm;
using Model.InterFaceModel;
namespace WMS.BLL.BllPdaServer
{
@@ -157,6 +159,31 @@
                    sqlString += $"group by BoxNo,SkuNo,SkuName,LotNo; ";
                }
                var models = Db.Ado.SqlQuery<BoxInfoDto>(sqlString);
                return models;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        // 根据托盘号或箱码获取托盘信息   liudl
        public List<PalletBindDto> GetPalletBindInfo(BllPalletBind model)
        {
            try
            {
                string sqlString = string.Empty;
                sqlString = "select b.SkuNo,b.SkuName,a.LotNo,a.Qty,a.PalletNo,a.Id from BllPalletBind a left join BllArrivalNoticeDetail b on a.ASNDetailNo = b.Id where a.IsDel = '0' and b.IsDel = '0' ";
                if (!string.IsNullOrEmpty(model.PalletNo))
                {
                    sqlString += $"and PalletNo = '{model.PalletNo}' and a.Status = '0' ";
                }
                else
                {
                    throw new Exception("托盘号异常!");
                }
                var models = Db.Ado.SqlQuery<PalletBindDto>(sqlString);
                return models;
            }
@@ -474,6 +501,121 @@
                    sqlString = $"update SysPallets set Status = '0' where PalletNo = '{boxModel[0].PalletNo}';";
                    Db.Ado.ExecuteCommand(sqlString);
                }
                Db.CommitTran();
                return strMsg;
            }
            catch (Exception ex)
            {
                Db.RollbackTran();
                throw ex;
            }
        }
        // 删除已组信息
        public string DelPalletBind(BllPalletBind model)
        {
            string strMsg = "";
            string sqlString = string.Empty;
            try
            {
                if (model.Id == 0)
                {
                    throw new Exception("-1:托盘ID不可为0!");
                }
                //获取托盘绑定信息
                var bind = Db.Queryable<BllPalletBind>().First(a => a.IsDel == "0" && a.Status == "0" && a.Id == model.Id);
                //验证托盘绑定信息是否为空
                if (bind == null)
                {
                    throw new Exception("-1:未获取到对应托盘信息,请核实!");
                }
                //判断托盘绑定信息是否不是等待执行
                if (bind.Status != "0")
                {
                    throw new Exception("-1:该托盘已正在入库,请核实!");
                }
                //获取是否有指定库位
                SysStorageLocat locat = new SysStorageLocat();
                int isNullLocat = 0;
                //判断储位是否为空
                if (!string.IsNullOrWhiteSpace(bind.LocatNo))
                {
                    isNullLocat = 1;
                    locat = Db.Queryable<SysStorageLocat>().First(a=>a.IsDel == "0" && a.WareHouseNo == bind.WareHouseNo && a.RoadwayNo == bind.RoadwayNo && a.LocatNo == bind.LocatNo);
                    //判断储位地址是否为正在入库
                    if (locat.Status != "2")
                    {
                        throw new Exception("-1:当前托盘绑定的储位地址不是正在入库,请核实!");
                    }
                }
                //获取托盘信息
                var pallet = Db.Queryable<SysPallets>().First(a => a.IsDel == "0" && a.PalletNo == model.PalletNo);
                //判断托盘信息是否为空
                if (pallet == null)
                {
                    throw new Exception("-1:未获取到对应托盘信息,请核实!");
                }
                //获取对应入库单据总单
                var notice = Db.Queryable<BllArrivalNotice>().First(a => a.IsDel == "0" && a.ASNNo == bind.ASNNo);
                //验证入库单总单信息
                if (notice == null)
                {
                    throw new Exception("-1:未获取到对应入库单总单信息,请核实!");
                }
                //获取对应入库单据明细
                var noticeDetail = Db.Queryable<BllArrivalNoticeDetail>().First(a => a.IsDel == "0" && a.Id == bind.ASNDetailNo);
                //验证入库单单据明细
                if (noticeDetail == null)
                {
                    throw new Exception("-1:未获取到对应入库单单据明细信息,请核实!");
                }
                Db.BeginTran();
                //减少入库单明细数量 判断已组数量是否为0 再判断完成数量是否为0
                noticeDetail.FactQty -= bind.Qty;
                //判断已组数量是否为0
                if (noticeDetail.FactQty == 0)
                {
                    //判断是否有完成数量
                    if (noticeDetail.CompleteQty == 0)
                    {
                        noticeDetail.Status = "0"; //入库单明细状态
                        notice.Status = "0"; //入库单总单状态
                    }
                }
                Db.Updateable(noticeDetail).ExecuteCommand();
                Db.Updateable(notice).ExecuteCommand();
                // 清除托盘绑定上信息
                //ASNNo,ASNDetailNo,Qty,FullQty,LotNo,LotText,SupplierLot,IsDel,UpdateTime,UpdateUser
                bind.ASNNo = ""; //入库单号
                bind.ASNDetailNo = 0; //入库单明细id
                bind.Qty = 0; //数量
                bind.FullQty = 0; //整托数量
                bind.LotNo = ""; //批次
                bind.LotText = ""; //批次描述
                bind.SupplierLot = ""; //供货批次
                bind.IsDel = "1"; //是否删除
                bind.UpdateTime = Db.GetDate(); //修改时间
                bind.UpdateUser = model.CreateUser; //修改人
                if (isNullLocat == 1)
                {
                    bind.LocatNo = ""; //储位地址
                    bind.RoadwayNo = ""; //所属巷道
                    bind.WareHouseNo = ""; //所属仓库
                    //修改储位信息状态
                    locat.Status = "0"; //储位状态 0:空储位
                    Db.Updateable(locat).ExecuteCommand();
                }
                Db.Updateable(bind).ExecuteCommand();
                //修改托盘信息状态
                pallet.Status = "0"; //0:未使用
                Db.Updateable(pallet).ExecuteCommand();
                Db.CommitTran();
                return strMsg;
@@ -1773,7 +1915,7 @@
                //添加托盘记录表数据
                sqlStr += $"insert into LogPalletTrack values('{model.PalletNo}','{model.AsnNo}','组盘','0',getDate(),{userId},NULL,NULL);";
                Db.Ado.ExecuteCommand(sqlStr);
                new OperationASNServer().AddLogOperationAsn("PDA模块", "产品组托", model.AsnNo, "添加", $"添加了托盘码为:{model.PalletNo}、{msgStr}的组盘信息", userId);
                new OperationASNServer().AddLogOperationAsn("PDA模块", "托盘绑定1", model.AsnNo, "添加", $"添加了托盘码为:{model.PalletNo}、{msgStr}的组盘信息", userId);
                Db.CommitTran();
            }
Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs
@@ -5,6 +5,7 @@
using System.Text;
using Model.ModelVm.PdaVm;
using Model.ModelDto.PdaDto;
using WMS.Entity.BllAsnEntity;
namespace WMS.IBLL.IPdaServer
{
@@ -25,6 +26,9 @@
        // 根据箱码或托盘号获取箱支信息
        List<BoxInfoDto> GetBoxInfos(BoxInfoVm model);
        // 根据托盘号或箱码获取托盘信息
        List<PalletBindDto> GetPalletBindInfo(BllPalletBind model);
        // 绑定物料托盘
        void BindPallet(PdaPalletBindVm model,int userId, string origin);
@@ -42,6 +46,9 @@
        // 删除已组信息
        string DelBoxInfo(BoxInfoVm model);
        // 删除已组信息
        string DelPalletBind(BllPalletBind model);
        // 平库完成入库操作
        string CompleteInStock(PalletBindVm model);
Wms/Wms/Controllers/PdaAsnController.cs
@@ -5,6 +5,7 @@
using Model.ModelVm.PdaVm;
using System;
using System.Security.Claims;
using WMS.Entity.BllAsnEntity;
using WMS.IBLL.IPdaServer;
namespace Wms.Controllers
@@ -132,6 +133,26 @@
        }
        /// <summary>
        /// 根据托盘号或箱码获取托盘信息
        /// </summary>
        /// <param name="model">PalletNo:托盘号</param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetPalletBindInfo(BllPalletBind model)
        {
            try
            {
                var models = _PdaAsnSvc.GetPalletBindInfo(model);
                return Ok(new { code = 0, msg = "托盘信息", data = models });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        /// <summary>
        /// 删除箱子信息
        /// </summary>
        /// <param name="model">Id:箱子主键</param>
@@ -171,6 +192,47 @@
            }
        }
        /// <summary>
        /// 删除托盘信息
        /// </summary>
        /// <param name="model">ID\托盘号</param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult DelPalletBind(BllPalletBind model)
        {
            try
            {
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                if (claimsIdentity == null)
                {
                    throw new Exception("未获取到用户信息");
                }
                string UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                if (string.IsNullOrWhiteSpace(UserId))
                {
                    throw new Exception("未获取到用户信息");
                }
                model.CreateUser = int.Parse(UserId);
                var strMsg = _PdaAsnSvc.DelPalletBind(model);
                if (strMsg == "")
                {
                    return Ok(new { code = 0, msg = "删除组托成功!" });
                }
                else
                {
                    return Ok(new { code = 1, msg = strMsg });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        #endregion
        #region 生产入库