yusijie
2023-12-01 56b15c48939c9be8ed4fb1315d0cdbde963d3ea6
WebTM/views/³µ¼ä¹ÜÀí/µ¥Æ·¹ýÕ¾/Cj_ProcessItemStationPlatform.html
@@ -1,8 +1,11 @@
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <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>
@@ -10,7 +13,8 @@
    <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="../../../layuiadmin/PubCustom.js"></script>-->
    <script src="../../CreateControl.js"></script>
</head>
<body>
    <div class="layui-fluid" style="padding: 0;">
@@ -30,7 +34,7 @@
                                        <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="HBarCodeSN" lay-verify="HBarCodeSN" placeholder="请键入后回车" id="HBarCodeSN" style="width: 500px;">
                                                <input type="text" class="layui-input" name="HBarCodeSN" lay-verify="HBarCodeSN"  autocomplete="off" placeholder="请键入后回车" id="HBarCodeSN" style="width: 500px;">
                                            </div>
                                        </div>
                                    </div>
@@ -111,7 +115,7 @@
                                        <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="HProcExchBillNo" lay-verify="HProcExchBillNo" id="HProcExchBillNo" value="" style="background-color:#efefef4d;">
                                                <input type="text" class="layui-input" name="HProcExchBillNo"  lay-verify="HProcExchBillNo" id="HProcExchBillNo" value="" style="background-color:#efefef4d;">
                                                <input type="hidden" class="layui-input" name="HProcExchInterID" lay-verify="HProcExchInterID" id="HProcExchInterID" value="0">
                                                <input type="hidden" class="layui-input" name="HProcExchEntryID" lay-verify="HProcExchEntryID" id="HProcExchEntryID" value="0">
                                            </div>
@@ -174,7 +178,7 @@
                                        <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" lay-verify="HMaterModel" name="HMaterModel" id="HMaterModel" style="background-color:#efefef4d;" readonly>
                                                <input type="text" class="layui-input" lay-verify="HQualifiedCount" name="HQualifiedCount" id="HQualifiedCount" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
                                    </div>
@@ -182,8 +186,7 @@
                                        <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:#efefef4d;" readonly>
                                                <input type="hidden" name="HInterID" id="HInterID" lay-verify="HInterID">
                                                <input type="text" class="layui-input" name="HBadCount" lay-verify="HBadCount" id="HBadCount" style="background-color:#efefef4d;" readonly>
                                            </div>
                                        </div>
                                    </div>
@@ -211,13 +214,13 @@
                                <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="HBardCodeProcExchBillNo" lay-verify="HBardCodeProcExchBillNo" id="HBardCodeProcExchBillNo">
                                        <input type="text" class="layui-input" name="HBardCodeProcExchBillNo" autocomplete="off" lay-verify="HBardCodeProcExchBillNo" id="HBardCodeProcExchBillNo">
                                    </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="HBardCodeMater" lay-verify="HBardCodeMater" id="HBardCodeMater">
                                        <input type="text" class="layui-input" name="HBardCodeMater" autocomplete="off" lay-verify="HBardCodeMater" id="HBardCodeMater">
                                    </div>
                                </div>
                            </div>
@@ -332,6 +335,16 @@
                    if (!HBarCode) {
                        layer.msg("条形码不能为空!")
                        return;
                    } else {
                        if (HBarCode.length != 29) {
                            layer.alert("子件条码长度不为29位!", { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                            return;
                        }
                        if (HBarCode.match(/[^\x00-\xff]/g) != null) {
                            layer.alert("必须是半角字符!", { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                            return;
                        }
                    }
                }
                for (var i = 0; i < option.data.length; i++) {
@@ -448,7 +461,7 @@
        function set_ClearBill() {
            //进入页面默认光标在流转卡上
            $("#HBardCodeProcExchBillNo").focus();
            createBillNo();
            get_Display();
            get_CriticalPartsList();//关键件清单 ä¸è‰¯è®°å½•  åˆæ ¼è®°å½•
          
@@ -456,14 +469,28 @@
        // ç”Ÿæˆå•据号
        function createBillNo() {
            var sql = "select * from Sc_StationOutBillMain  where HProcExchBillNo='" + $("#HProcExchBillNo").val() + "' and HProcID=" + $("#HProcID").val()
            $.ajax({
                url: GetWEBURL() + "/Web/GetMAXNum",
                url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList",
                async: false,
                type: "GET",
                data: { "HBillType": '3791' },
                success: function (d) {
                    $("#HInterID").val(d.data[0].HInterID);
                    $("#HBillNo").val(d.data[0].HBillNo);
                data: { "sWhere": sql },
                success: function (data) {
                    if (data.data.length > 0) {
                        $("#HInterID").val(data.data[0].HInterID);
                        $("#HBillNo").val(data.data[0].HBillNo);
                    } else {
                        $.ajax({
                            url: GetWEBURL() + "/Web/GetMAXNum",
                            async: false,
                            type: "GET",
                            data: { "HBillType": '3791' },
                            success: function (d) {
                                $("#HInterID").val(d.data[0].HInterID);
                                $("#HBillNo").val(d.data[0].HBillNo);
                            }
                        });
                    }
                }
            });
        }
@@ -512,12 +539,12 @@
            option= {
                elem: '#mainTable2'
                //, toolbar: '#toolbarDemo'
                , async: true
                , page: false
                //, totalRow: true
                , cellMinWidth: 120
                , data: []
                , height: 185
                , limit: Number.MAX_VALUE
                , cols: [[
                    { type: 'numbers', title: '序号' }
                    , { field: '日期', title: '日期' }
@@ -540,10 +567,10 @@
            option2 = {
                elem: '#mainTable3'
                //, toolbar: '#toolbarDemo'
                , async: true
                , page: false
                //, totalRow: true
                , cellMinWidth: 120
                , limit: Number.MAX_VALUE
                , data: []
                , height: 325
                , cols: [[
@@ -563,10 +590,10 @@
            option3 = {
                elem: '#mainTable'
                //, toolbar: '#toolbarDemo'
                , async: true
                , page: false
                //, totalRow: true
                , cellMinWidth: 120
                , limit: Number.MAX_VALUE
                , data: []
                , height: 370
                , cols: [[
@@ -609,6 +636,7 @@
                    if (data1.count == 1) {
                        option2.data = data1.data;
                        table.render(option2);
                        $("#HBadCount").val(data1.data.length);
                        layer.close(ajaxLoad);
                    } else {
                        layer.close(ajaxLoad);
@@ -638,6 +666,7 @@
                    if (data1.count == 1) {
                        option3.data = data1.data;
                        table.render(option3);
                        $("#HQualifiedCount").val(data1.data.length);
                        layer.close(ajaxLoad);
                    } else {
                        layer.close(ajaxLoad);
@@ -693,8 +722,10 @@
                    }
                    else {
                        layer.close(indexs);
                        layer.msg(data1.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        layer.msg(data1.Message);
                    }
                    //光标跳转到SN条码文本框上
                    //$("#HBarCodeSN").focus();
                    $("#HBarCodeSN").val("");
                },
                error: function (err) {
@@ -801,10 +832,35 @@
                        $("#HPieceQty").val(data1.data[0]["HPieceQty"]);
                        $("#HICMOQty").val(data1.data[0]["HICMOQty"]);
                        createBillNo();
                        option.data = data1.data;
                        table.render(option)
                    }
                    else {
                    else if (data1.count == 2) {
                        layer.close(index);
                        $("#HBardCodeProcExchBillNo").attr("readonly", "readonly");//流转卡只读
                        $("#HBardCodeProcExchBillNo").css("background-color", "#efefef4d");//流转卡灰色
                        //光标跳转到SN条码文本框上
                        $("#HBarCodeSN").focus();
                        $("#HMaterNumber").val(data1.data[0]["HMainMaterNumber"]);
                        $("#HMaterID").val(data1.data[0]["HMainMaterID"]);
                        $("#HMaterName").val(data1.data[0]["HMainMaterName"]);
                        $("#HMaterModel").val(data1.data[0]["HMainModel"]);
                        $("#HProcExchInterID").val(data1.data[0]["HProcExchInterID"]);
                        $("#HProcExchEntryID").val(data1.data[0]["HProcExchEntryID"]);
                        $("#HProcExchBillNo").val(data1.data[0]["HProcExchBillNo"]);
                        $("#HICMOBillNo").val(data1.data[0]["HICMOBillNo"]);
                        $("#HICMOInterID").val(data1.data[0]["HICMOInterID"]);
                        $("#HICMOEntryID").val(data1.data[0]["HICMOEntryID"]);
                        $("#HProcNo").val(data1.data[0]["HProcNo"]);
                        $("#HPieceQty").val(data1.data[0]["HPieceQty"]);
                        $("#HICMOQty").val(data1.data[0]["HICMOQty"]);
                        createBillNo();
                    } else {
                        layer.close(index);
                        layer.msg(data1.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    }
@@ -893,7 +949,7 @@
                    }
                    else {
                        layer.close(index);
                        layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        layer.msg(data.Message);
                    }
                },
                error: function (err) {
@@ -1059,9 +1115,9 @@
        //不良汇报
        function BadReport() {
            var HBarCode_P = $("#HBarCode_P").val();
            var len = option3.data.length;
            if (HBarCode_P != "") {
            if (len != 0) {
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
@@ -1099,6 +1155,8 @@
                        //$('#btnSave').addClass("layui-btn-disabled").attr("disabled", true);
                        layer.close(index);
                        layer.msg("提交成功");
                        //光标跳转到SN条码文本框上
                        $("#HBarCodeSN").focus();
                        //保存到临时表
                        get_AddBomTempList();
                        var HBardCodeProcExchBillNo = $("#HBardCodeProcExchBillNo").val();