<%@ Page Title="" Language="C#" MasterPageFile="~/SignBox/Site1.Master" AutoEventWireup="true" CodeBehind="ScanConfirmValidateGoods.aspx.cs" Inherits="GxHub.Wms.Abroad.Web.SignBox.ScanConfirmValidateGoods" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script language="javascript" src="../lodop/LodopFuncs.js"></script>
    <script language="javascript" src="../lodop/CLodopfuncs.js"></script>
    <script language="javascript" type="text/javascript" src="../Scripts/PrintTemplate.js"></script>
    <style>
        @font-face {
            font-family: 'KhmerOSFont';
            src: url('../Scripts/KhmerOS.ttf') format('truetype');
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <yee:PageTitle ID="ptTitle" runat="server" Title="拣货扫描确认"></yee:PageTitle>
    <yee:MessageBox ID="msg" runat="server">
    </yee:MessageBox>

    <table cellpadding="0" cellspacing="0" border="0" class="table">

        <tr>
            <td class="tbpostheader">
                <%=GetText("流水号") %>
            </td>
            <td class="tbpost">
                <asp:TextBox ID="txtExpressNo" runat="server" Font-Size="XX-Large"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="tbpostheader">
                <%=GetText("仓库") %>
            </td>
            <td class="tbpost">
                <yee:UserWarehousesDropDownList runat="server" ID="ddlWare" WarehouseType="海外仓储"></yee:UserWarehousesDropDownList>
            </td>
        </tr>
        <tr>
            <td class="tbpostheader"></td>
            <td class="tbpost">
                <asp:Button ID="btnPickGood" runat="server" CssClass="button" OnClick="btnPickGood_Click" Text="扫描拣货" />
            </td>
        </tr>
    </table>
    <script language="javascript" type="text/javascript">

        function printReMin(id) {
      
            $.get("../Ajax/GetDeliveryExpressDetail.ashx", { id: id }, function (data) {
                var arr = eval(data);
                var boxes = eval(arr.Boxes);
                var box = boxes[0]; 
                // 转站配送
                var printData = [{
                    OrderNo: arr.OrderNo,
                    ReceName: arr.ReceName,
                    Mobile: arr.Mobile,
                    Address: arr.Address,
                    WareGroup: arr.WareGroup,
                    WareKhName: arr.WareKhName,
                    WareTel:arr.WareTel,
                    CustomerCode: arr.CustomerCode,
                    BoxSerialNo: box.BoxSerialNo,
                    Qty: arr.BoxCount,
                    Weight: box.Weight,
                    Size: box.Size
                }];

                var printTemplate = [];
                if(arr.ServiceTypeId === 1)
                {   // 转站
                    printTemplate.push('TransferDelivery');
                }
                else if(arr.ServiceTypeId === 2)
                {   // 转本土
                    printTemplate.push('TransferLocal');
                }
                else if(arr.ServiceTypeId === 3)
                {   // 第三方
                    printTemplate.push('TransferThirdParty');
                }

                if(arr.BoxCount > 1){
                    printTemplate.push('print_box_noes_2022');
                    printData.push({
                        code:arr.CustomerCode, mobile:arr.Mobile, boxes:boxes
                    });
                }
                if(printTemplate.length > 0){
                    var pageSize = {IntOrient:0,PageWidth:700,PageHeight:500,StrPageName:'A4'};
                    PrintWithTemplate('outPrinterGK888t',printTemplate,printData,true,pageSize);
                }
            });   
        }

    </script>
</asp:Content>