仓位列表添加打印功能;生产订单列表取消隐藏工艺路线字段;批量拆分流转卡/工艺路线编辑页面子表字段超出单元格长度则收缩起来;关键件绑定;网页/PDA出站汇报单自动带出合格数量;
10个文件已修改
5个文件已添加
1280 ■■■■■ 已修改文件
WebTM/WebTM.csproj 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/layuiadmin/Scripts/webConfig.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/grf/仓位标签.grf 225 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/公用基础资料/Gy_StockPlace_List.html 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/公用基础资料/Gy_Warehouse.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/公用基础资料/HBarPlanPrint.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/公用基础资料/xmlLBM_Gy_StockPlaceList.aspx 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/公用基础资料/xmlLBM_Gy_StockPlaceList.aspx.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/公用基础资料/xmlLBM_Gy_StockPlaceList.aspx.designer.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/生产任务单/Sc_ICMOBillList.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/计划管理/工艺路线/Gy_RoutingBill.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/关键件绑定/Sc_KeyElementBinding.html 916 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBill.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/工序流转/MES_StationOutBill_PDA.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/工序流转卡/Sc_ProcessExchangeBill_BatchSplit.html 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/WebTM.csproj
@@ -357,6 +357,7 @@
    <Content Include="views\基础资料\公用基础资料\Gy_PreventErrMould.html" />
    <Content Include="views\基础资料\公用基础资料\Gy_WorkCenter_Excel.html" />
    <Content Include="views\基础资料\公用基础资料\Gy_UnitConvertRateList.html" />
    <Content Include="views\基础资料\公用基础资料\xmlLBM_Gy_StockPlaceList.aspx" />
    <Content Include="views\基础资料\公用基础资料\xmlLBM_HPayMentBill.aspx" />
    <Content Include="views\基础资料\公用基础资料\xmlLBM_HPOOrderBillByID.aspx" />
    <Content Include="views\基础资料\公用基础资料\xmlLBM_HPOStockInBillByID.aspx" />
@@ -416,6 +417,7 @@
    <Content Include="views\模治具管理\模治具点检保养\Sc_MouldDotCheckBill_PDA_OLD.html" />
    <Content Include="views\模治具管理\模治具点检保养\Sc_MouldMaintainBill_PDA.html" />
    <Content Include="views\模治具管理\模治具管理\Sc_MouldMaintainRuleBillList_PDA.html" />
    <Content Include="views\车间管理\关键件绑定\Sc_KeyElementBinding.html" />
    <Content Include="views\生产管理\异常反馈单\OA_ErrMsgBackSignBill_BrushCard.html" />
    <Content Include="views\生产管理\异常反馈单\Sc_MESExecptFeedBackBillResumeList.html" />
    <Content Include="views\生产管理\异常反馈单\Sc_MESExecptFeedBackBillType.html" />
@@ -2201,6 +2203,13 @@
    <Compile Include="views\基础资料\公用基础资料\xmlLBM_EquipTypeBill.aspx.designer.cs">
      <DependentUpon>xmlLBM_EquipTypeBill.aspx</DependentUpon>
    </Compile>
    <Compile Include="views\基础资料\公用基础资料\xmlLBM_Gy_StockPlaceList.aspx.cs">
      <DependentUpon>xmlLBM_Gy_StockPlaceList.aspx</DependentUpon>
      <SubType>ASPXCodeBehind</SubType>
    </Compile>
    <Compile Include="views\基础资料\公用基础资料\xmlLBM_Gy_StockPlaceList.aspx.designer.cs">
      <DependentUpon>xmlLBM_Gy_StockPlaceList.aspx</DependentUpon>
    </Compile>
    <Compile Include="views\基础资料\公用基础资料\xmlLBM_HGy_CardChangeType.aspx.cs">
      <DependentUpon>xmlLBM_HGy_CardChangeType.aspx</DependentUpon>
      <SubType>ASPXCodeBehind</SubType>
WebTM/layuiadmin/Scripts/webConfig.js
@@ -5,11 +5,11 @@
    //var WEBURL = "http://61.164.86.218:8099/ABAPI/";
   // var WEBURL = "http://localhost/API/";  //           //颜晓军本地配置
    /*var WEBURL = "http://localhost:8082/API/";    //杜贺本地配置*/
    var WEBURL = "http://localhost:8082/API/";    //张瑞广本地配置
    //var WEBURL = "http://localhost:8082/API/";    //张瑞广本地配置
   /* var WEBURL = "http://localhost:81/API/"    //翁涛涛本地配置*/
    //var WEBURL = "http://47.96.97.237/API/";          //智云服务器
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";   //杨乐本地配置
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";   //余思杰本地配置
    var WEBURL = "http://localhost:8082/LuBaoAPI/";   //余思杰本地配置
    //var WEBURL = "http://localhost:8088/ARAPI/";      //余思杰本地配置(安瑞)
    //var WEBURL = "http://localhost:8082/API/";        //杜贺本地配置
    //var WEBURL = "http://localhost/API/";             //潘浙游本地配置
WebTM/views/grf/²Öλ±êÇ©.grf
New file
@@ -0,0 +1,225 @@
Object Report
    Version='6.8.2.5'
    Title='你的报表标题'
    PrintAsDesignPaper=F
    Object Font
        Name='宋体'
        Size=105000,0
        Weight=400
        Charset=134
    End
    Object Printer
        Size=256
        Width=6
        Height=8
        Oriention=Landscape
        LeftMargin=0
        TopMargin=0
        RightMargin=0
        BottomMargin=0
    End
    Object DetailGrid
        CenterView=T
        ShowColLine=F
        ShowRowLine=F
        Object Border
            Object Pen
                Width=1.5
            End
        End
        Object Recordset
            Items Field
                Item
                    Name='条码编号'
                End
                Item
                    Name='仓位代码'
                End
                Item
                    Name='仓位名称'
                End
                Item
                    Name='组织名称'
                End
                    End
    End
    Items Column
        Item
            Name='Column1'
            Width=7.9375
        End
    End
Object ColumnContent
    Height=5.79438
    Items ColumnContentCell
        Item
            Column='Column1'
            FreeCell=T
            Items Control
                Item
                    Type=Barcode
                    Name='Barcode4'
                    Left=2.32833
                    Top=2.2225
                    Width=3.20146
                    Height=3.20146
                    BarcodeType=QRCode
                    CheckSum=T
                    Text='[#条码编号#]'
                    Object Font
                        Name='黑体'
                        Size=67500,0
                        Weight=400
                        Charset=134
                    End
                End
                Item
                    Type=Line
                    Name='Line32'
                    Left=0.185208
                    Top=1.13771
                    Width=7.48771
                End
                Item
                    Type=Line
                    Name='Line33'
                    Left=0.185208
                    Top=0.185208
                    Height=5.5
                    U2D=F
                End
                Item
                    Type=MemoBox
                    Name='MemoBox18'
                    Left=1.74625
                    Top=1.16417
                    Width=5.84729
                    Height=0.846667
                    Object Font
                        Name='黑体'
                        Size=105000,0
                        Bold=T
                        Charset=134
                    End
                    ShrinkFontToFit=T
                    WordWrap=T
                    Text='[#仓位名称#]'
                End
                Item
                    Type=StaticBox
                    Name='StaticBox20'
                    Left=0.343958
                    Top=0.47625
                    Width=1.00542
                    Height=0.396875
                    Object Font
                        Name='黑体'
                        Size=105000,0
                        Weight=400
                        Charset=134
                    End
                    WordWrap=T
                    TextAlign=MiddleCenter
                    Text='代码'
                End
                Item
                    Type=Line
                    Name='Line34'
                    Left=0.19
                    Top=5.65
                    Width=7.48771
                End
                Item
                    Type=Line
                    Name='Line35'
                    Left=0.185208
                    Top=0.185208
                    Width=7.5
                End
                Item
                    Type=Line
                    Name='Line36'
                    Left=0.185208
                    Top=2.01083
                    Width=7.48771
                End
                Item
                    Type=StaticBox
                    Name='StaticBox21'
                    Left=0.343958
                    Top=1.40229
                    Width=1.00542
                    Height=0.396875
                    Object Font
                        Name='黑体'
                        Size=105000,0
                        Weight=400
                        Charset=134
                    End
                    WordWrap=T
                    TextAlign=MiddleCenter
                    Text='名称'
                End
                Item
                    Type=MemoBox
                    Name='MemoBox20'
                    Left=1.74625
                    Top=0.238125
                    Width=5.84729
                    Height=0.846667
                    Object Font
                        Name='黑体'
                        Size=105000,0
                        Bold=T
                        Charset=134
                    End
                    ShrinkFontToFit=T
                    WordWrap=T
                    Text='[#仓位代码#]'
                End
                Item
                    Type=Line
                    Name='Line41'
                    Left=1.53458
                    Top=0.185208
                    Height=1.82
                    U2D=F
                End
                Item
                    Type=Line
                    Name='Line42'
                    Left=7.69
                    Top=0.19
                    Height=5.5
                    U2D=F
                End
                    End
    End
End
End
Object ColumnTitle
    Height=0
    Items ColumnTitleCell
        Item
            GroupTitle=F
            Column='Column1'
            TextAlign=MiddleCenter
            Text='Column1'
        End
    End
End
End
Items ReportHeader
    Item
        Name='ReportHeader1'
        Height=0
        RepeatOnPage=T
    End
End
Items ReportFooter
    Item
        Name='ReportFooter1'
        Height=0
    End
End
End
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/Gy_StockPlace_List.html
@@ -89,6 +89,7 @@
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-add-1"></i>新增</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>编辑</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-form"></i>删除</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Print"><i class="layui-icon layui-icon-print"></i>打印</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>列设置</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close"><i class="layui-icon layui-icon-circle"></i>退出</button>
                            </div>
@@ -148,7 +149,10 @@
                        break;
                    case 'btn-Delete':
                        set_DeleteBill();
                        break;
                        break;
                    //打印
                    case 'set_Print': set_Print();
                        break;
                    //退出按钮
                    case 'btn-Close':
                        parent.layui.admin.events.closeThisTabs();
@@ -484,9 +488,35 @@
                    layer.msg('请选择一行数据删除!');
                }
            }
            //#endregion          
            //#region æ‰“印
            function set_Print() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length >= 1) {
                    var rows = [];
                    for (var i = 0; i < data.length; i++) {
                        rows.push(data[i].HMainID.toString());
                    }
                    layer.open({
                        type: 2
                        , area: ['80%', '80%']
                        , title: '打印模版选择'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + rows.toString() + '&MyMsg=' + rows.toString() + '&Type=HStockPlace', 'yes']
                        , resize: false
                    })
                }
                else {
                    layer.msg('请选择一行数据打印!');
                }
            }
            //#endregion
            //#region éšè—åˆ—设置
            function get_HideColumn() {
                var colName = "";
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/Gy_Warehouse.html
@@ -842,7 +842,7 @@
                    layer.open({
                        type: 2
                        , area: ['50%', '50%']
                        , area: ['80%', '80%']
                        , title: '打印模版选择'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/HBarPlanPrint.html
@@ -223,6 +223,9 @@
            case "HWarehouse"://仓库列表
                CreateDisplayViewerEx("100%", "100%", "../../grf/" + OpenTmp + ".grf", "xmlLBM_Gy_WarehouseList.aspx?linterid=" + value, true, "");
                break;
            case "HStockPlace"://仓位列表
                CreateDisplayViewerEx("100%", "100%", "../../grf/" + OpenTmp + ".grf", "xmlLBM_Gy_StockPlaceList.aspx?linterid=" + value, true, "");
                break;
            case "Kf_OtherOutBillList"://其他出库单维护  å‡ºåº“码单
                CreateDisplayViewerEx("100%", "100%", "../../grf/" + OpenTmp + ".grf", "xmlLBM_Kf_OtherOutBillList.aspx?linterid=" + value, true, "");
                break;
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/xmlLBM_Gy_StockPlaceList.aspx
New file
@@ -0,0 +1,26 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="xmlLBM_Gy_StockPlaceList.aspx.cs" Inherits="WebTM.views.基础资料.公用基础资料.xmlLBM_Gy_StockPlaceList" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        //★特别提示★:
        //不同的数据库应该选用不同的报表XML数据生成类,SQL Server数据库用SqlXMLReportData,Oracle数据库用OracleXMLReportData
        //OledbXMLReportData适合于Access等本地数据库,为了演示方便,这里从Grid++Report的Access例子数据库中获取报表数据
        SqlXMLReportData.GenOneRecordset(this, "select * from h_v_Gy_StockPlaceList where HItemID in(" + Request.Params["linterid"] + ")");
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
        </div>
    </form>
</body>
</html>
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/xmlLBM_Gy_StockPlaceList.aspx.cs
New file
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebTM.views.基础资料.公用基础资料
{
    public partial class xmlLBM_Gy_StockPlaceList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
    }
}
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/xmlLBM_Gy_StockPlaceList.aspx.designer.cs
New file
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <自动生成>
//     æ­¤ä»£ç ç”±å·¥å…·ç”Ÿæˆã€‚
//
//     å¯¹æ­¤æ–‡ä»¶çš„æ›´æ”¹å¯èƒ½å¯¼è‡´ä¸æ­£ç¡®çš„行为,如果
//     é‡æ–°ç”Ÿæˆä»£ç ï¼Œåˆ™æ‰€åšæ›´æ”¹å°†ä¸¢å¤±ã€‚
// </自动生成>
//------------------------------------------------------------------------------
namespace WebTM.views.基础资料.公用基础资料
{
    public partial class xmlLBM_Gy_StockPlaceList
    {
        /// <summary>
        /// form1 æŽ§ä»¶ã€‚
        /// </summary>
        /// <remarks>
        /// è‡ªåŠ¨ç”Ÿæˆçš„å­—æ®µã€‚
        /// è‹¥è¦è¿›è¡Œä¿®æ”¹ï¼Œè¯·å°†å­—段声明从设计器文件移到代码隐藏文件。
        /// </remarks>
        protected global::System.Web.UI.HtmlControls.HtmlForm form1;
    }
}
WebTM/views/Éú²ú¹ÜÀí/Éú²úÈÎÎñµ¥/Sc_ICMOBillList.html
@@ -340,7 +340,7 @@
            var HDeptID = params[params[0]];
            var option = [];
            var ins;                        //用于导出excel
            var titleData = ["hmainid", "HEntryID", "作废人", "作废日期", "销售订单日期", "订单跟踪号", "HDeptID", "HMaterID", "hunitid", "hempid", "业务员代码", "业务员", "hcusid", "客户代码", "客户", "HCenterID", "工作中心代码", "工作中心", "hbomid", "BOM单编码", "HRoutingInterID", "工艺路线代码", "工艺路线", "订单包装备注", "hsubid", "源单单号", "源单主内码", "源单子内码", "行关闭人", "关闭类型", "单据类型", "计划跟踪号"];//不需要显示的字段 å¯æ‰©å±•
            var titleData = ["hmainid", "HEntryID", "作废人", "作废日期", "销售订单日期", "订单跟踪号", "HDeptID", "HMaterID", "hunitid", "hempid", "业务员代码", "业务员", "hcusid", "客户代码", "客户", "HCenterID", "工作中心代码", "工作中心", "hbomid", "BOM单编码", "HRoutingInterID", "工艺路线代码", "订单包装备注", "hsubid", "源单单号", "源单主内码", "源单子内码", "行关闭人", "关闭类型", "单据类型", "计划跟踪号"];//不需要显示的字段 å¯æ‰©å±•
            //var titleData = ["hmainid", "HEntryID", "作废人", "作废日期", "销售订单日期", "订单跟踪号", "HDeptID", "HMaterID", "hunitid", "hempid", "业务员代码", "业务员", "hcusid", "客户代码", "客户", "HCenterID", "工作中心代码", "工作中心", "hbomid", "BOM单编码", "HRoutingInterID", "工艺路线代码", "工艺路线", "订单包装备注", "hsubid", "源单单号", "源单主内码", "源单子内码", "行关闭人", "关闭类型", "单据类型", "计划跟踪号"];//不需要显示的字段 å¯æ‰©å±•
            //titleData = [];
            //判断是否有参数传递
WebTM/views/¼Æ»®¹ÜÀí/¹¤ÒÕ·Ïß/Gy_RoutingBill.html
@@ -44,6 +44,12 @@
        .layui-form-label {
            width: 25%;
        }
        .layui-table th, .layui-table td {
            white-space: nowrap; /* ä¸æ¢è¡Œ */
            overflow: hidden; /* è¶…出内容隐藏 */
            text-overflow: ellipsis; /* æ˜¾ç¤ºçœç•¥å· */
        }
    </style>
</head>
WebTM/views/³µ¼ä¹ÜÀí/¹Ø¼ü¼þ°ó¶¨/Sc_KeyElementBinding.html
New file
@@ -0,0 +1,916 @@
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; 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, maximum-scale=1">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <!--<script src="../../../layuiadmin/PubCustom.js"></script>-->
    <script src="../../CreateControl.js"></script>
</head>
<body>
    <div class="layui-fluid" style="padding: 0;">
        <div class="layui-card" style="padding: 2px;background-color: #efefef;">
            <div class="layui-card-body" style="padding: 1px;">
                <form class="layui-form" action="" lay-filter="formData" style="background-color:white;">
                    <div style="padding: 10px;">
                        <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">保存</button>
                        <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnRefresh" id="btnRefresh">刷新</button>
                        <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnExit" id="btnExit">退出</button>
                    </div>
                    <h1 style="text-align:center;margin-bottom:25px;"><b>关键件绑定</b></h1>
                    <div class="layui-form-item" style="padding-top: 3px;">
                        <div class="layui-row" style="text-align: center;">
                            <div class="layui-col-xs3 layui-inline" style="margin-left:205px;">
                                <label class="layui-form-label">流转卡</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input" name="HProcessExchangeBillNo" id="HProcessExchangeBillNo" onfocus="this.select();">
                                    <input type="hidden" name="HProcessExchangeInterID" id="HProcessExchangeInterID" value="0">
                                    <input type="hidden" name="HProcessExchangeEntryID" id="HProcessExchangeEntryID" value="0">
                                </div>
                            </div>
                            <div class="layui-col-xs3 layui-inline">
                                <label class="layui-form-label">产品码</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input" name="HBarCode_P" id="HBarCode_P" onfocus="this.select();">
                                </div>
                            </div>
                            <div class="layui-col-xs3 layui-inline">
                                <label class="layui-form-label">配件码</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input" name="HBarCode" id="HBarCode" onfocus="this.select();">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab" lay-filter="tab-POStockInBill" style="width: 45%; float: left; height:calc(60vh);background-color:white;">
                        <div class="layui-tab-content">
                            <!--基本信息-->
                            <div class="layui-tab-item layui-show">
                                <div class="layui-form-item" style="padding-top: 10px;">
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">日期</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="date" class="layui-input" lay-verify="HDate" name="HDate" id="HDate" style="padding-left: 80px;width:184px;">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">追溯单号</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" style="background-color:#EDEDED;" readonly>
                                                <input type="hidden" name="HInterID" id="HInterID" lay-verify="HInterID">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">生产订单</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HICMOBillNo" lay-verify="HICMOBillNo" id="HICMOBillNo" style="        background-color: #EDEDED;" readonly>
                                                <input type="hidden" name="HICMOInterID" id="HICMOInterID" lay-verify="HICMOInterID">
                                                <input type="hidden" name="HICMOEntryID" id="HICMOEntryID" lay-verify="HICMOEntryID">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">销售订单</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HSeOrderBillNo" lay-verify="HSeOrderBillNo" id="HSeOrderBillNo" style="        background-color: #EDEDED;" readonly>
                                                <input type="hidden" name="HSeOrderInterID" id="HSeOrderInterID" lay-verify="HSeOrderInterID">
                                                <input type="hidden" name="HSeOrderEntryID" id="HSeOrderEntryID" lay-verify="HSeOrderEntryID">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">物料代码</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HMaterNumber" lay-verify="HMaterNumber" id="HMaterNumber" style="        background-color: #EDEDED;" readonly>
                                                <input type="hidden" name="HMaterID" id="HMaterID" lay-verify="HMaterID">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">物料名称</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HMaterName" lay-verify="HMaterName" id="HMaterName" style="        background-color: #EDEDED;" readonly>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">规格型号</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HMaterModel" lay-verify="HMaterModel" id="HMaterModel" style="        background-color: #EDEDED;" readonly>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">生产资源</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HSourceName" lay-verify="HSourceName" id="HSourceName" style="background-color: #EDEDED; width: 60%; display: inline-block;" readonly>
                                                <input type="hidden" name="HSourceID" id="HSourceID" lay-verify="HSourceID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHSource" id="btnHSource" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px; padding: 9px 18px;">生产车间</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" lay-verify="HDeptName" name="HDeptName" id="HDeptName" style="background-color: #EDEDED; width: 60%; display: inline-block;" readonly>
                                                <input type="hidden" class="layui-input" lay-verify="HDeptID" name="HDeptID" id="HDeptID">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHDept" id="btnHDept" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px; padding: 9px 18px;">生产班组</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HGroupName" id="HGroupName" lay-verify="HGroupName" value="" style="background-color:#EDEDED;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" class="layui-input" name="HGroupID" lay-verify="HGroupID" id="HGroupID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHGroup" id="btnHGroup" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">操作员</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" lay-verify="HEmpName" name="HEmpName" id="HEmpName" value="" style="background-color:#EDEDED;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" class="layui-input" lay-verify="HEmpID" name="HEmpID" id="HEmpID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHEmp" id="btnHEmp" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">质检员</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" lay-verify="HCheckEmpName" name="HCheckEmpName" id="HCheckEmpName" value="" style="background-color:#EDEDED;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" class="layui-input" lay-verify="HCheckEmpID" name="HCheckEmpID" id="HCheckEmpID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHCheckEmp" id="btnHCheckEmp" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">工序</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HProcName" lay-verify="HProcName" id="HProcName" style="background-color: #EDEDED; width: 60%; display: inline-block;" readonly>
                                                <input type="hidden" name="HProcID" id="HProcID" lay-verify="HProcID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHProc" id="btnHProc" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">工序号</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HProcNo" lay-verify="HProcNo" id="HProcNo">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div style="width: 0.2%; float: left; height: calc(60vh);background-color:#2baaca"></div>
                    <div class="layui-tab" lay-filter="tab-POStockInBill" style="width: 54.8%; float: left; height:calc(60vh);background-color:white;">
                        <div style="width:100px;height:23px; background: linear-gradient(-135deg, transparent 30px, #2baaca 0);"><span style="color:aliceblue;">绑定信息</span></div>
                        <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                    </div>
                    <div class="layui-tab" lay-filter="tab-POStockInBill" style="width: 99.8%; float: left; height:calc(100vh);background-color:white;margin-left:0.2%">
                        <div style="width:100%;height:23px; background-color: #2baaca;text-align:center;font-weight:bold"><span style="color:aliceblue;">历史记录</span></div>
                        <table class="layui-hide" id="detailTable" lay-filter="detailTable"></table>
                    </div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
<script>
    layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
        //#region å…¬å…±å˜é‡
        var $ = layui.$
            , admin = layui.admin
            , layer = layui.layer
            , table = layui.table
            , form = layui.form
            , element = layui.element;
        //定义全局变量
        var HModName = "Sc_KeyElementBinding";
        var option = [];
        var option_detail = [];
        var setIntervalIndex = null;
        //#endregion
        //#region è¿›å…¥é¡µé¢å³åŠ è½½
        set_ClearBill();
        //#endregion
        //#region è§¦å‘事件:包括form.on(){}格式的所有点击事件、选择事件等
        //#region æµè½¬å¡å›žè½¦æ–¹æ³•
        $('#HProcessExchangeBillNo').on('keydown', function (event) {
            var HBarCode = $('#HProcessExchangeBillNo').val();
            if (event.keyCode == 13) {
                if (!HBarCode) {
                    layer.msg("流转卡不能为空!")
                    return;
                }
                //查询流转卡相关信息
                get_ProcessExchangeList(HBarCode);
            }
        });
        //#endregion
        //#region äº§å“ç å›žè½¦æ–¹æ³•
        $('#HBarCode_P').on('keydown', function (event) {
            var HBarCode = $('#HBarCode_P').val();
            var HProcessExchangeBillNo = $('#HProcessExchangeBillNo').val();
            if (event.keyCode == 13) {
                if (!HProcessExchangeBillNo) {
                    layer.msg("请先扫流转卡!")
                    return;
                } else {
                    if (!HBarCode) {
                        layer.msg("条形码不能为空!")
                        return;
                    } else {
                        //if (HBarCode.match(/[^\x00-\xff]/g) != null) {
                        //    layer.alert("必须是半角字符!", { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        //    return;
                        //}
                    }
                }
                txtHProductBarCode_KeyDown(HBarCode);
            }
        });
        //#endregion
        //#region é…ä»¶å›žè½¦æ–¹æ³•
        $('#HBarCode').on('keydown', function (event) {
            var HBarCode = $('#HBarCode').val();
            var HProcessExchangeBillNo = $('#HProcessExchangeBillNo').val();
            var HBarCode_P = $('#HBarCode_P').val();
            if (event.keyCode == 13) {
                if (!HProcessExchangeBillNo || !HBarCode_P) {
                    layer.msg("请先扫流转卡或产品码!")
                    return;
                } else {
                    if (!HBarCode) {
                        layer.msg("配件不能为空!")
                        return;
                    }
                }
                txtHPartsBarCode_KeyDown(HBarCode);
            }
        });
        //#endregion
        //绑定信息行内事件
        table.on('tool(mainTable)', function (obj) {
            set_GridDelete(obj);   //行内删除
        });
        //#region åŸºç¡€èµ„料按钮
        //选择质检员
        form.on('submit(btnHCheckEmp)', function () {
            btnHCheckEmp();
        });
        //选择操作员
        form.on('submit(btnHEmp)', function () {
            btnHEmp();
        });
        //选择生产资源
        form.on('submit(btnHSource)', function () {
            btnHSource();
        });
        //选择生产班组按钮
        form.on('submit(btnHGroup)', function () {
            btnHGroup();
        });
        //选择生产车间按钮
        form.on('submit(btnHDept)', function () {
            btnHDept();
        });
        //选择工序按钮
        form.on('submit(btnHProc)', function () {
            btnHProc();
        });
        //#endregion
        //保存
        form.on('submit(btnSave)', function (data) {
            if (AllowLoadData(data)) {
                set_SaveBill(data);
            }
        });
        //退出
        form.on('submit(btnEdit)', function (data) {
            if (params[1] != null) {
                Pub_Close(1);
            } else if (params[1] == null) {
                Pub_Close(2);
            }
        });
        //#endregion
        //#region æ­¤é¡µé¢æ‰€æœ‰çš„æ–¹æ³•
        //#region åˆå§‹åŒ–界面
        function set_ClearBill() {
            //进入页面默认光标在流转卡上
            $("#HProcessExchangeBillNo").focus();
            //获取单据号
            $.ajax({
                url: GetWEBURL() + "/Web/GetMAXNumPDA",
                type: "GET",
                data: { "HBillType": '3727' },
                success: function (d) {
                    $("#HInterID").val(d.data[0].HInterID);
                    $("#HBillNo").val(d.data[0].HBillNo);
                    $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));  //默认为当前日期
                }
            });
            //#region åŸºç¡€èµ„料信息根据用户绑定带出
            $("#HSourceID").val(sessionStorage["HSourceID"]);//生产资源ID
            $("#HSourceName").val(sessionStorage["HSource"]);//生产资源
            //$("#HDeptID").val(sessionStorage["HDeptID"]);//生产车间ID
            //$("#HDeptName").val(sessionStorage["HDept"]);//生产车间
            $("#HGroupID").val(sessionStorage["HGroupID"]);//班组ID
            $("#HGroupName").val(sessionStorage["HGroup"]);//班组
            $("#HCheckEmpID").val(sessionStorage["HCheckEmpID"]);//质检员ID
            $("#HCheckEmpName").val(sessionStorage["HCheckEmpName"]);//质检员ID
            $("#HEmpID").val(sessionStorage["HEmpID"]);//操作员ID
            $("#HEmpName").val(sessionStorage["HEmpName"]);//操作员
            //#endregion
            //初始化绑定信息表格
            set_InitGrid();
            //历史绑定记录查询
            //get_Display();
        }
        //#endregion
        //#region åˆå§‹åŒ–表格
        function set_InitGrid() {
            //本次绑定信息
            option = {
                elem: '#mainTable'
                , page: false
                , height: 'full-358'
                , loading: false
                , limit: 200
                , cols: [[ //绑定信息表
                    { type: 'numbers', title: '序号', width: 50 }
                    , { field: 'HBarCode_P', title: '产品码', width: 265 }
                    , { field: 'HBarCode', title: '配件码', width: 265 }
                    , { field: 'HPartsQty', title: '配件数', width: 72 }
                    , { field: 'HBindingQty', title: '已绑数', width: 72 }
                    , { field: 'HMaterID', title: 'HMaterID', hide: true }
                    , { field: 'HMaterNumber', title: '物料代码', width: 160 }
                    , { field: 'HMaterName', title: '物料名称', width: 160 }
                    , { field: 'HMaterModel', title: '规格型号', width: 160, hide: true }
                    , { field: 'HBatchNo', title: '批次', width: 160 }
                    , { field: 'HSourceID', title: 'HSourceID', width: 160, hide: true }
                    , { field: 'HEquipID', title: 'HEquipID', width: 160, hide: true }
                    , { field: 'HGroupID', title: 'HGroupID', width: 160, hide: true }
                    , { field: 'HWorkerID', title: 'HWorkerID', width: 160, hide: true }
                    , { field: 'HScanDate', title: 'HScanDate', width: 160, hide: true }
                    , { field: 'HSourceInterID', title: 'HSourceInterID', width: 160, hide: true }
                    , { field: 'HSourceEntryID', title: 'HSourceEntryID', width: 160, hide: true }
                    , { field: 'HSourceBillNo', title: 'HSourceBillNo', width: 160, hide: true }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 66 }
                ]]
            }
            //初始表格数据
            var rowdata = [{
                "HBarCode_P": "", "HBarCode": "", "HPartsQty": 0, "HBindingQty": 0, "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HMaterModel": ""
                , "HBatchNo": "", "HSourceID": 0, "HEquipID": 0, "HGroupID": 0, "HWorkerID": 0, "HScanDate": new Date(), "HSourceInterID": 0
                , "HSourceEntryID": 0, "HSourceBillNo": ""
            }];
            option.data = [];
            table.render(option);
            //历史绑定信息
            option_detail = {
                elem: '#detailTable'
                , page: false
                , height: 'full-30'
                , loading: false
                , limit: 2000
                , cols: [[ //历史记录表
                    { type: 'numbers', title: '序号', width: 50 }
                    , { field: 'HBarCode_P', title: '产品码', width: 400 }
                    , { field: 'HBarCode', title: '配件码', width: 400 }
                    , { field: 'HPartsQty', title: '配件数量', width: 90 }
                    , { field: 'HMaterID', title: 'HMaterID', hide: true }
                    , { field: 'HMaterNumber', title: '物料代码', width: 260 }
                    , { field: 'HMaterName', title: '物料名称', width: 260 }
                    , { field: 'HMaterModel', title: '规格型号', width: 160, hide: true }
                    , { field: 'HBatchNo', title: '批次', width: 200 }
                    , { field: 'HSourceID', title: 'HSourceID', width: 160, hide: true }
                    , { field: 'HEquipID', title: 'HEquipID', width: 160, hide: true }
                    , { field: 'HGroupID', title: 'HGroupID', width: 160, hide: true }
                    , { field: 'HWorkerID', title: 'HWorkerID', width: 160, hide: true }
                    , { field: 'HScanDate', title: 'HScanDate', width: 160, hide: true }
                    , { field: 'HSourceInterID', title: 'HSourceInterID', width: 160, hide: true }
                    , { field: 'HSourceEntryID', title: 'HSourceEntryID', width: 160, hide: true }
                    , { field: 'HSourceBillNo', title: 'HSourceBillNo', width: 160, hide: true }
                ]]
            }
            option_detail.data = [];
            table.render(option_detail);
        }
        //#endregion
        //#region ä¿å­˜æ–¹æ³•
        function set_SaveBill(data) {
            //序列化表头信息和子表信息
            var sMainStr = JSON.stringify(data.field);
            var sSubStr = JSON.stringify(option.data);
            //拼接参数
            var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"];
            var index = layer.load();
            $.ajax({
                type: "POST",
                url: GetWEBURL() + "/Sc_KeyElementBinding/Save", //方法所在页面和方法名
                async: true,
                data: { "msg": sMainSub },
                dataType: "json",
                success: function (data) {
                    if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                        layer.msg(data.Message, { icon: 1 });
                        $("#btnSave").addClass("layui-btn-disabled").attr("disabled", true);
                        layer.close(index);
                    }
                    else {
                        layer.alert(data.Message, { icon: 5 });
                        layer.close(index);
                    }
                },
                error: function (err) {
                    layer.alert("错误:" + err, { icon: 5 });
                    layer.close(index);
                }
            });
        }
        //#endregion
        //查询
        function get_Display() {
            var sWhere = " and ç¼–码='" + sessionStorage["Czybm"] + "'";
            var ajaxLoad = layer.load();
            //进入页面显示的缓存列表
            $.ajax({
                url: GetWEBURL() + '/Cj_SingleStation/Cj_CollectionOfSingleProductDefectsUserList',
                type: "GET",
                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                success: function (data1) {
                    if (data1.count == 1) {
                        $("#HDeptID").val(data1.data[0]["HDeptID"]);
                        $("#HDeptName").val(data1.data[0]["车间"]);
                        $("#HProcName").val(data1.data[0]["工序"]);
                        $("#HProcID").val(data1.data[0]["HProcID"]);
                        $("#HSourceID").val(data1.data[0]["HSourceID"]);
                        $("#HSourceName").val(data1.data[0]["生产资源"]);
                        $("#HCheckEmpID").val(data1.data[0]["HCheckEmpID"]);
                        $("#HCheckEmpName").val(data1.data[0]["质检员"]);
                        $("#HEmpID").val(data1.data[0]["HCheckEmpID"]);
                        $("#HEmpName").val(data1.data[0]["质检员"]);
                        $("#HGroupID").val(data1.data[0]["HGroupID"]);
                        $("#HGroupName").val(data1.data[0]["生产班组"]);
                        layer.close(ajaxLoad);
                        //layer.alert("查询成功", { icon: 1 });
                    } else {
                        layer.close(ajaxLoad);
                        layer.alert(data1.code + data1.Message, { icon: 5 });
                    }
                }, error: function () {
                    layer.close(ajaxLoad);
                    layer.alert("接口请求失败!", { icon: 5 });
                }
            });
        }
        //流转卡回车查询(查询流转卡相关信息)
        function get_ProcessExchangeList(HBarCode) {
            var ajaxLoad = layer.load();
            $.ajax({
                url: GetWEBURL() + '/Sc_KeyElementBinding/GetProcessExchangeList',
                async: false,
                type: "GET",
                data: { "HBillNo": HBarCode, "user": sessionStorage["HUserName"] },
                success: function (data1) {
                    if (data1.count == 1) {
                        var data = data1.data;
                        $("#HICMOInterID").val(data[0].HICMOInterID);
                        $("#HICMOEntryID").val(data[0].HICMOEntryID);
                        $("#HICMOBillNo").val(data[0].生产订单号);
                        $("#HSeOrderBillNo").val(data[0].销售订单号);
                        $("#HMaterID").val(data[0].HMaterID);
                        $("#HMaterNumber").val(data[0].物料代码);
                        $("#HMaterName").val(data[0].物料名称);
                        $("#HMaterModel").val(data[0].规格型号);
                        $("#HDeptID").val(data[0].HDeptID);
                        $("#HDeptName").val(data[0].生产车间名称);
                        //禁用输入框,背景色变灰
                        $("#HDate").prop('disabled', true);//禁用
                        $("#HDate").css('background', '#EDEDED')//背景色变灰
                        $("#HProcessExchangeBillNo").attr('disabled', 'disabled')//禁用
                        $("#HProcessExchangeBillNo").css('background', '#EDEDED')//背景色变灰
                        $("#HProcNo").attr('disabled', 'disabled')//禁用
                        $("#HProcNo").css('background', '#EDEDED')//背景色变灰
                        //按钮禁用
                        $("#btnHSource").addClass("layui-btn-disabled").attr("disabled", true);//生产资源按钮禁用
                        $("#btnHDept").addClass("layui-btn-disabled").attr("disabled", true);//生产车间按钮禁用
                        $("#btnHGroup").addClass("layui-btn-disabled").attr("disabled", true);//生产班组按钮禁用
                        $("#btnHEmp").addClass("layui-btn-disabled").attr("disabled", true);//操作员按钮禁用
                        $("#btnHCheckEmp").addClass("layui-btn-disabled").attr("disabled", true);//质检员按钮禁用
                        $("#btnHProc").addClass("layui-btn-disabled").attr("disabled", true);//工序按钮禁用
                        //光标跳转至产品码输入框位置
                        $("#HBarCode_P").focus();
                        layer.close(ajaxLoad);
                    } else {
                        layer.close(ajaxLoad);
                        layer.alert(data1.code + data1.Message, { icon: 5 });
                    }
                }, error: function () {
                    layer.close(ajaxLoad);
                    layer.alert("接口请求失败!" + data1.Message, { icon: 5 });
                }
            });
        }
        //产品码回车查询
        function txtHProductBarCode_KeyDown(HBarCode) {
            var HProcExchBillNo = $("#HProcessExchangeBillNo").val();
            var HBillNo = $("#HBillNo").val();
            var indexs = layer.load();
            $.ajax({
                type: "GET",
                url: GetWEBURL() + "/Sc_KeyElementBinding/ProductBardCode_JX",
                async: false,
                data: { "HBarCode": HBarCode, "HProcExchBillNo": HProcExchBillNo, "HBillNo": HBillNo, "user": sessionStorage["HUserName"], "HOrgID": sessionStorage["OrganizationID"] },
                dataType: "json",
                success: function (data1) {
                    if (data1.count == 1) {
                        var data = data1.data
                        var rowarr = [];
                        for (var i = 0; i < data.length; i++) {
                            rowarr.push({
                                "HBarCode_P": data[i].产品码, "HPartsBarCode": "", "HPartsQty": data[i].分子子项用量, "HBindingQty": 0
                                , "HMaterID": data[i].子项物料ID, "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HBatchNo": ""
                                , "HSourceID": $("#HSourceID").val(), "HEquipID": 0, "HGroupID": $("#HGroupID").val(), "HWorkerID": $("#HEmpID").val()
                                , "HScanDate": new Date(), "HSourceInterID": $("#HICMOInterID").val()
                                , "HSourceEntryID": $("#HICMOEntryID").val(), "HSourceBillNo": $("#HICMOBillNo").val()
                            });
                        }
                        option.data = rowarr;
                        table.render(option);
                        layer.close(indexs);
                        //禁用输入框,背景色变灰
                        $("#HBarCode_P").attr('disabled', 'disabled')//禁用
                        $("#HBarCode_P").css('background', '#EDEDED')//背景色变灰
                        //光标跳转到配件码文本框上
                        $("#HBarCode").focus();
                    }
                    else {
                        layer.close(indexs);
                        layer.msg(data1.Message);
                    }
                },
                error: function (err) {
                    layer.close(indexs);
                    layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                }
            });
        }
        //配件码回车查询
        function txtHPartsBarCode_KeyDown(HBarCode) {
            var indexs = layer.load();
            var HProcExchBillNo = $("#HProcessExchangeBillNo").val();
            var HBillNo = $("#HBillNo").val();
            $.ajax({
                type: "GET",
                url: GetWEBURL() + "/Sc_KeyElementBinding/PartsBardCode_JX",
                async: false,
                data: { "HBarCode": HBarCode, "HProcExchBillNo": HProcExchBillNo, "HBillNo": HBillNo, "user": sessionStorage["HUserName"], "HOrgID": sessionStorage["OrganizationID"] },
                dataType: "json",
                success: function (data1) {
                    if (data1.count == 1) {
                        var data = data1.data
                        for (var i = 0; i < option.data.length; i++) {
                            if (data[0].HMaterID == option.data[i].HMaterID && option.data[i].HBindingQty < option.data[i].HPartsQty) {
                                option.data[i].HMaterID = data[0].HMaterID
                                option.data[i].HMaterNumber = data[0].物料代码
                                option.data[i].HMaterName = data[0].物料名称
                                option.data[i].HMaterModel = data[0].规格型号
                                option.data[i].HBarCode = data[0].配件码
                                option.data[i].HBindingQty = option.data[i].HBindingQty + 1
                                break;
                            } else if (data[0].HMaterID == option.data[i].HMaterID && i == option.data.length - 1) {
                                layer.msg("第" + (i + 1) + "行已全部绑定,请勿超量绑定");
                            } else if (data[0].HMaterID != option.data[i].HMaterID && i == option.data.length - 1) {
                                layer.msg("所扫配件码:" + HBarCode + " ,对应物料不在生产用料清单中!");
                            }
                        }
                        //option.data = rowarr;
                        table.render(option);
                        //光标跳转到配件码文本框上
                        $("#HBarCode").focus();
                        $("#HBarCode").val("");
                        layer.close(indexs);
                    }
                    else {
                        layer.close(indexs);
                        layer.msg(data1.Message);
                    }
                },
                error: function (err) {
                    layer.close(indexs);
                    layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                }
            });
        }
        //表格行内事件删除
        function set_GridDelete(obj) {
            var data = obj.data;
            var rowIndex = $(obj.tr).attr("data-index");
            if (obj.event === 'del') {
                layer.confirm('真的删除行吗?', function (index) {
                    var wait = layer.load();
                    //删除临时表数据
                    $.ajax({
                        url: GetWEBURL() + 'Deltet_Sc_AssemblyBill_BindBarCodeTemp',
                        type: "GET",
                        data: { "HBillNo": $("#HBillNo").val(), "HBarCode": option.data[rowIndex].HBarCode , "user": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message,{ icon: 1 ,time: 500}, function () {
                                    //关闭当前frame
                                    layer.close(wait);
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                                layer.close(wait);
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                            layer.close(wait);
                        }
                    });
                    //刷新表格数据
                    option.data[rowIndex].HBarCode = "";
                    option.data[rowIndex].HBindingQty = option.data[rowIndex].HBindingQty - 1;
                    //option.data[rowIndex].HMaterID = 0;
                    option.data[rowIndex].HMaterNumber = "";
                    option.data[rowIndex].HMaterName = "";
                    option.data[rowIndex].HMaterModel = "";
                    option.data[rowIndex].HBarCode = "";
                    table.render(option);
                    layer.close(index);
                });
            }
        }
        //#region åŸºç¡€èµ„料选择弹框
        //质检员选择页面
        function btnHCheckEmp() {
            layer.open({
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '质检员列表'//标题
                , shift: 2//弹出动画
                , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length === 0) {
                        return layer.msg('请选择数据');
                    }
                    //获取数据
                    $("#HCheckEmpID").val(checkStatus.data[0].HItemID);
                    $("#HCheckEmpName").val(checkStatus.data[0].职员名称);
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
            })
        }
        //操作员选择页面
        function btnHEmp() {
            layer.open({
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '操作员列表'//标题
                , shift: 2//弹出动画
                , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length === 0) {
                        return layer.msg('请选择数据');
                    }
                    //获取数据
                    $("#HEmpID").val(checkStatus.data[0].HItemID);
                    $("#HEmpName").val(checkStatus.data[0].职员名称);
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
            })
        }
        //生产资源选择页面
        function btnHSource() {
            layer.open({
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '生产资源列表'//标题
                , shift: 2//弹出动画
                , content: ['../../基础资料/生产基础资料/Gy_Source.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length === 0) {
                        return layer.msg('请选择数据');
                    }
                    //获取数据
                    $("#HSourceID").val(checkStatus.data[0].HItemID);
                    $("#HSourceName").val(checkStatus.data[0].生产资源名称);
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
                , btn2: function (index, layero) { }
            })
        }
        //生产班组选择页面
        function btnHGroup() {
            layer.open({
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '班组表'//标题
                , shift: 2//弹出动画
                , content: ['../../基础资料/工资基础资料/Gy_Group.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length != 1) {
                        return layer.msg('请选择一条数据');
                    }
                    //获取数据
                    $("#HGroupID").val(checkStatus.data[0].HItemID);//班组id
                    $("#HGroupName").val(checkStatus.data[0].班组名称);//计量单位名称
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
                , btn2: function (index, layero) { }
            })
        }
        //生产车间选择页面
        function btnHDept() {
            layer.open({
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '生产车间列表'//标题
                , shift: 2//弹出动画
                , content: ['../../基础资料/公用基础资料/Gy_DepartmentList.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length != 1) {
                        return layer.msg('请选择一条数据');
                    }
                    //获取数据
                    $("#HDeptID").val(checkStatus.data[0].HItemID);//
                    $("#HDeptName").val(checkStatus.data[0].部门名称);//
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
                , btn2: function (index, layero) { }
            })
        }
        //工序选择页面
        function btnHProc() {
            layer.open({
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '工序列表'//标题
                , shift: 2//弹出动画
                , content: ['../../基础资料/生产基础资料/Gy_Process.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length != 1) {
                        return layer.msg('请选择一条数据');
                    }
                    //获取数据
                    $("#HProcID").val(checkStatus.data[0].HItemID);//
                    $("#HProcName").val(checkStatus.data[0].工序名称);//
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
                , btn2: function (index, layero) { }
            })
        }
        //#endregion
        //非空验证
        function AllowLoadData() {
            var HBarCode = $("#HBarCode_P").val();
            if (HBarCode == "") {
                layer.msg("产品码不能为空!")
                return false;
            }
            var sSubStr = JSON.stringify(table.cache['mainTable']);
            if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") {
                sSubStr = JSON.parse(sSubStr);
                for (var i = 0; i < sSubStr.length; i++) {
                    if (sSubStr[i].HBarCode == "" || sSubStr[i].HBarCode == undefined || sSubStr[i].HBarCode == null) {
                        layer.msg("明细记录第" + (i + 1) + "行,配件码未绑定!", { icon: 5, btn: ['确认'], time: 4000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        return Result = false;
                    }
                }
            }
            return true;
        }
        //#endregion
    });
</script>
WebTM/views/³µ¼ä¹ÜÀí/¹¤Ðò³öÕ¾»ã±¨µ¥/Cj_StationOutBill.html
@@ -1296,6 +1296,7 @@
                                , "HCenterName": data.工作中心
                                , "HCenterID": data.HCenterID
                                , "NoOutboundHqty": (data.流转卡数量 - data.出站报废关联数量 - data.出站关联数量)
                                , "HQty": data.合格数量
                            });
                            if (data.首道工序 == "是") {
                                FirstEndHProcNo = 1;
WebTM/views/³µ¼ä¹ÜÀí/¹¤ÐòÁ÷ת/MES_StationOutBill_PDA.html
@@ -1171,6 +1171,7 @@
                                , "HCenterName": data.工作中心
                                , "HCenterID": data.HCenterID
                                , "NoOutboundHqty": (data.流转卡数量 - data.出站报废关联数量 - data.出站关联数量)
                                , "HQty": data.合格数量
                            });
                            if (data.首道工序 == "是") {
                                FirstEndHProcNo = 1;
WebTM/views/³µ¼ä¹ÜÀí/¹¤ÐòÁ÷ת¿¨/Sc_ProcessExchangeBill_BatchSplit.html
@@ -35,6 +35,12 @@
            margin-left: -15px;
            margin-right: -15px;
        }
        .layui-table th, .layui-table td {
            white-space: nowrap; /* ä¸æ¢è¡Œ */
            overflow: hidden; /* è¶…出内容隐藏 */
            text-overflow: ellipsis; /* æ˜¾ç¤ºçœç•¥å· */
        }
    </style>
</head>
<body>
@@ -395,7 +401,7 @@
                            layer.close(ajaxLoad);
                        } else {
                            layer.close(ajaxLoad);
                            layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                            layer.alert(result.Message, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);