WebTM/views/WMSɨÂëÄ£¿é/Éú²úÈë¿â/Kf_ProductInBill_PDA.html
@@ -98,7 +98,7 @@
                                                <label class="layui-form-label" style="width:60px;padding-left:0px;">制单人</label>
                                            </div>
                                            <div class="layui-col-xs9">
                                                <input type="text" name="HMaker" id="HMaker" lay-verify="HMaker" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
                                                <input type="text" name="HMaker" id="HMaker" lay-verify="HMaker" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
                                            </div>
                                        </div>
                                        <div class="layui-row">
@@ -106,7 +106,7 @@
                                                <label class="layui-form-label" style="width:60px;padding-left:0px;">单据号</label>
                                            </div>
                                            <div class="layui-col-xs9">
                                                <input type="text" name="HBillNo" id="HBillNo" lay-verify="HBillNo" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
                                                <input type="text" name="HBillNo" id="HBillNo" lay-verify="HBillNo" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
                                            </div>
                                        </div>
                                        <div class="layui-row">
@@ -114,7 +114,7 @@
                                                <label class="layui-form-label" style="width:60px;padding-left:0px;">单据ID</label>
                                            </div>
                                            <div class="layui-col-xs9">
                                                <input type="text" name="HInterID" id="HInterID" lay-verify="HInterID" value="0" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
                                                <input type="text" name="HInterID" id="HInterID" lay-verify="HInterID" value="0" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
                                            </div>
                                        </div>
                                    </div>
@@ -207,7 +207,7 @@
                                                <label class="layui-form-label" style="width:30px;padding-left:0px;">组织</label>
                                            </div>
                                            <div class="layui-col-xs10">
                                                <input type="text" name="HStockOrgName" id="HStockOrgName" lay-verify="HStockOrgName" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
                                                <input type="text" name="HStockOrgName" id="HStockOrgName" lay-verify="HStockOrgName" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
                                                <input type="hidden" name="HStockOrgID" id="HStockOrgID" lay-verify="HStockOrgID" value="0" autocomplete="off" class="layui-input">
                                            </div>
                                        </div>
@@ -230,7 +230,7 @@
                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">条码</label>
                                            </div>
                                            <div class="layui-col-xs10">
                                                <input type="text" name="HBarCode_B" id="HBarCode_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
                                                <input type="text" name="HBarCode_B" id="HBarCode_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
                                            </div>
                                        </div>
                                    </div>
@@ -240,7 +240,7 @@
                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">物料</label>
                                            </div>
                                            <div class="layui-col-xs10">
                                                <input type="text" name="HMaterName_B" id="HMaterName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
                                                <input type="text" name="HMaterName_B" id="HMaterName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
                                            </div>
                                        </div>
                                    </div>
@@ -250,7 +250,7 @@
                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">规格</label>
                                            </div>
                                            <div class="layui-col-xs10">
                                                <input type="text" name="HMaterModel_B" id="HMaterModel_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
                                                <input type="text" name="HMaterModel_B" id="HMaterModel_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
                                            </div>
                                        </div>
                                    </div>
@@ -260,7 +260,7 @@
                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">批次</label>
                                            </div>
                                            <div class="layui-col-xs10">
                                                <input type="text" name="HBatchNo_B" id="HBatchNo_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
                                                <input type="text" name="HBatchNo_B" id="HBatchNo_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
                                            </div>
                                        </div>
                                    </div>
@@ -270,7 +270,7 @@
                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">单位</label>
                                            </div>
                                            <div class="layui-col-xs10">
                                                <input type="text" name="HUnitName_B" id="HUnitName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
                                                <input type="text" name="HUnitName_B" id="HUnitName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
                                            </div>
                                        </div>
                                    </div>
@@ -280,7 +280,7 @@
                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">数量</label>
                                            </div>
                                            <div class="layui-col-xs10">
                                                <input type="text" name="HQty_B" id="HQty_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
                                                <input type="text" name="HQty_B" id="HQty_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
                                            </div>
                                        </div>
                                    </div>
@@ -290,7 +290,7 @@
                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">容量</label>
                                            </div>
                                            <div class="layui-col-xs10">
                                                <input type="text" name="HTMQty_B" id="HTMQty_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
                                                <input type="text" name="HTMQty_B" id="HTMQty_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
                                            </div>
                                        </div>
                                    </div>
@@ -300,7 +300,7 @@
                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">仓库</label>
                                            </div>
                                            <div class="layui-col-xs10">
                                                <input type="text" name="HWHName_B" id="HWHName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
                                                <input type="text" name="HWHName_B" id="HWHName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
                                            </div>
                                        </div>
                                    </div>
@@ -310,7 +310,7 @@
                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">仓位</label>
                                            </div>
                                            <div class="layui-col-xs10">
                                                <input type="text" name="HSPName_B" id="HSPName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
                                                <input type="text" name="HSPName_B" id="HSPName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
                                            </div>
                                        </div>
                                    </div>
@@ -415,7 +415,8 @@
                                icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                            }, function () { parent.location.href = "../../../views/index_Mobile.html"; });
                        }
                    }
                    },
                    complete: function (XHR, TS) { XHR = null }//回收资源
                });
                layer.closeAll("loading");
            }
@@ -426,12 +427,22 @@
                console.log("playSound");
                var audio = document.getElementById("cs");
                audio.play();
                audio.onended = function () {
                    // å½“音频播报完成时,调用 pause å’Œè®¾ç½® currentTime ä¸º 0 ä»¥åœæ­¢æ’­æŠ¥å¹¶é‡ç½®
                    audio.pause();
                    audio.currentTime = 0;
                };
            }
            //成功提示音
            function playSound_OK() {
                console.log("playSound_OK");
                var audio = document.getElementById("cs2");
                audio.play();
                audio.onended = function () {
                    // å½“音频播报完成时,调用 pause å’Œè®¾ç½® currentTime ä¸º 0 ä»¥åœæ­¢æ’­æŠ¥å¹¶é‡ç½®
                    audio.pause();
                    audio.currentTime = 0;
                };
            }
            //#region åˆå§‹åŒ–界面
@@ -458,13 +469,13 @@
                if (sessionStorage["HWhSPFlag"]) {
                    $("#HStockPlaceID").val("0");
                    $("#HStockPlaceName").val("");
                    $("#HStockPlaceName").attr("readonly", "readonly");
                    $("#HStockPlaceName").attr("disabled", "disabled");
                    $('#HSpID-BT').addClass("layui-btn-disabled").attr("disabled", true);//按钮禁用
                }
                else {
                    $("#HStockPlaceID").val(sessionStorage["HSPID"]);
                    $("#HStockPlaceName").val(sessionStorage["HSPName"]);
                    $("#HStockPlaceName").removeAttr("readonly");
                    $("#HStockPlaceName").removeAttr("disabled");
                    $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//按钮恢复正常状态
                }
@@ -591,7 +602,8 @@
                        else {
                            layer.msg(d.Message, { icon: 0, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    }
                    },
                    complete: function (XHR, TS) { XHR = null }//回收资源
                });
                HSourceFlag = false;
            }
@@ -615,7 +627,7 @@
                            optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '生产订单' + "</option>";
                            $("#HMainSourceBillType").append(optionHtml);
                            layui.form.render('select');
                            $("#HMainSourceBillType").attr("readonly", "readonly");
                            $("#HMainSourceBillType").attr("disabled", "disabled");
                        }
                        else if (d.data[0].HSourceBillType == "3711") {
                            $("#HMainSourceBillType").empty();
@@ -623,7 +635,7 @@
                            optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '生产汇报单' + "</option>";
                            $("#HMainSourceBillType").append(optionHtml);
                            layui.form.render('select');
                            $("#HMainSourceBillType").attr("readonly", "readonly");
                            $("#HMainSourceBillType").attr("disabled", "disabled");
                        }
                        else if (d.data[0].HSourceBillType == "3714") {
                            $("#HMainSourceBillType").empty();
@@ -631,7 +643,7 @@
                            optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '工序汇报单' + "</option>";
                            $("#HMainSourceBillType").append(optionHtml);
                            layui.form.render('select');
                            $("#HMainSourceBillType").attr("readonly", "readonly");
                            $("#HMainSourceBillType").attr("disabled", "disabled");
                        }
                        else {
                            $("#HMainSourceBillType").empty();
@@ -639,13 +651,13 @@
                            optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '手工录入' + "</option>";
                            $("#HMainSourceBillType").append(optionHtml);
                            layui.form.render('select');
                            $("#HMainSourceBillType").attr("readonly", "readonly");
                            $("#HMainSourceBillType").attr("disabled", "disabled");
                        }
                        $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
                        //非多源单模式
                        if (d.data[0].HMulSourceBill == 0) {
                            $("#HSourceBillNo").attr("readonly", "readonly");
                            $("#HSourceBillNo").attr("disabled", "disabled");
                            $('#HSourceBillNo-BT').addClass("layui-btn-disabled").attr("disabled", true);//按钮禁用
                        }
                        if (d.data[0].HDeptID != 0) {
@@ -653,7 +665,8 @@
                            $("#HDeptName").val(d.data[0].HDeptName);
                        }
                        $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                    }
                    },
                    complete: function (XHR, TS) { XHR = null }//回收资源
                })
            }
@@ -672,7 +685,7 @@
                        $("#HWHName").val("");
                        $("#HStockPlaceID").val("0");
                        $("#HStockPlaceName").val("");
                        $("#HStockPlaceName").removeAttr("readonly");
                        $("#HStockPlaceName").removeAttr("disabled");
                        $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//按钮恢复正常状态
                        layer.msg("仓库条码为空!", {
                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
@@ -696,11 +709,11 @@
                                $("#HStockPlaceID").val("0");
                                $("#HStockPlaceName").val("");
                                if (result.data[0].HSPFlag == 0) {
                                    $("#HStockPlaceName").attr("readonly", "readonly");
                                    $("#HStockPlaceName").attr("disabled", "disabled");
                                    $('#HSpID-BT').addClass("layui-btn-disabled").attr("disabled", true);//按钮禁用
                                }
                                else {
                                    $("#HStockPlaceName").removeAttr("readonly");
                                    $("#HStockPlaceName").removeAttr("disabled");
                                    $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//按钮恢复正常状态
                                }
                                element.tabChange('tab-Kf_ProductInBill_PDA', '2');
@@ -714,7 +727,7 @@
                                $("#HWHName").val("");
                                $("#HStockPlaceID").val("0");
                                $("#HStockPlaceName").val("");
                                $("#HStockPlaceName").removeAttr("readonly");
                                $("#HStockPlaceName").removeAttr("disabled");
                                $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//按钮恢复正常状态
                                layer.msg(result.Message, {
                                    icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
@@ -724,7 +737,8 @@
                                });
                            }
                            layer.closeAll("loading");
                        }
                        },
                        complete: function (XHR, TS) { XHR = null }//回收资源
                    });
                }
            });
@@ -804,7 +818,8 @@
                                });
                            }
                            layer.closeAll("loading");
                        }
                        },
                        complete: function (XHR, TS) { XHR = null }//回收资源
                    });
                }
            });
@@ -877,7 +892,8 @@
                                });
                            }
                            layer.closeAll("loading");
                        }
                        },
                        complete: function (XHR, TS) { XHR = null }//回收资源
                    });
                }
            });
@@ -946,7 +962,8 @@
                                });
                            }
                            layer.closeAll("loading");
                        }
                        },
                        complete: function (XHR, TS) { XHR = null }//回收资源
                    });
                }
            });
@@ -1015,7 +1032,8 @@
                                });
                            }
                            layer.closeAll("loading");
                        }
                        },
                        complete: function (XHR, TS) { XHR = null }//回收资源
                    });
                }
            });
@@ -1101,6 +1119,7 @@
                                    layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                                }
                            },
                            complete: function (XHR, TS) { XHR = null },//回收资源
                            error: function (err) {
                                layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
@@ -1177,6 +1196,7 @@
                                        layer.msg(data.Message, { icon: 2, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                                    }
                                },
                                complete: function (XHR, TS) { XHR = null },//回收资源
                                error: function (err) {
                                    layer.msg('错误' + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                                }
@@ -1248,7 +1268,7 @@
                            $("#HMainSourceBillType").attr("disabled", "disabled");
                            form.render('select');
                            if (result.data.hMulSourceFlagField == 0) {
                                $("#HSourceBillNo").attr("readonly", "readonly");
                                $("#HSourceBillNo").attr("disabled", "disabled");
                                $('#HSourceBillNo-BT').addClass("layui-btn-disabled").attr("disabled", true);//按钮禁用
                            }
                            element.tabChange('tab-Kf_ProductInBill_PDA', '2');
@@ -1267,7 +1287,8 @@
                                $("#HSourceBillNo").focus();
                            });
                        }
                    }
                    },
                    complete: function (XHR, TS) { XHR = null }//回收资源
                });
                layer.closeAll("loading");
            }
@@ -1351,6 +1372,7 @@
                                    });
                                }
                            },
                            complete: function (XHR, TS) { XHR = null },//回收资源
                            error: function (err) {
                                playSound();
                                layer.msg('错误' + err, {
@@ -1396,11 +1418,11 @@
                                    $("#HStockPlaceName").val("");
                                    $("#HStockPlaceID").val("0");
                                    if (result.data.hSPFlagField == 0) {
                                        $("#HStockPlaceName").attr("readonly", "readonly");
                                        $("#HStockPlaceName").attr("disabled", "disabled");
                                        $('#HSpID-BT').addClass("layui-btn-disabled").attr("disabled", true);//按钮禁用
                                    }
                                    else {
                                        $("#HStockPlaceName").removeAttr("readonly");
                                        $("#HStockPlaceName").removeAttr("disabled");
                                        $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//按钮恢复正常状态
                                    }
                                    element.tabChange('tab-Kf_ProductInBill_PDA', '2');  //跳转页签
@@ -1434,7 +1456,7 @@
                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '生产订单' + "</option>";
                                        $("#HMainSourceBillType").append(optionHtml);
                                        layui.form.render('select');
                                        $("#HMainSourceBillType").attr("readonly", "readonly");
                                        $("#HMainSourceBillType").attr("disabled", "disabled");
                                    }
                                    else if (result.data.hSourceBillTypeField == "3711") {
                                        $("#HMainSourceBillType").empty();
@@ -1442,7 +1464,7 @@
                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '生产汇报单' + "</option>";
                                        $("#HMainSourceBillType").append(optionHtml);
                                        layui.form.render('select');
                                        $("#HMainSourceBillType").attr("readonly", "readonly");
                                        $("#HMainSourceBillType").attr("disabled", "disabled");
                                    }
                                    else if (result.data.hSourceBillTypeField == "3714") {
                                        $("#HMainSourceBillType").empty();
@@ -1450,7 +1472,7 @@
                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '工序汇报单' + "</option>";
                                        $("#HMainSourceBillType").append(optionHtml);
                                        layui.form.render('select');
                                        $("#HMainSourceBillType").attr("readonly", "readonly");
                                        $("#HMainSourceBillType").attr("disabled", "disabled");
                                    }
                                    else {
                                        $("#HMainSourceBillType").empty();
@@ -1458,10 +1480,10 @@
                                        optionHtml += "<option value = '-1' >" + '手工录入' + "</option>";
                                        $("#HMainSourceBillType").append(optionHtml);
                                        layui.form.render('select');
                                        $("#HMainSourceBillType").attr("readonly", "readonly");
                                        $("#HMainSourceBillType").attr("disabled", "disabled");
                                    }
                                    if (result.data.hMulSourceFlagField == 0) {
                                        $("#HSourceBillNo").attr("readonly", "readonly");
                                        $("#HSourceBillNo").attr("disabled", "disabled");
                                        $('#HSourceBillNo-BT').addClass("layui-btn-disabled").attr("disabled", true);//按钮禁用
                                    }
                                    element.tabChange('tab-Kf_ProductInBill_PDA', '3');
@@ -1485,7 +1507,7 @@
                                            optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '生产订单' + "</option>";
                                            $("#HMainSourceBillType").append(optionHtml);
                                            layui.form.render('select');
                                            $("#HMainSourceBillType").attr("readonly", "readonly");
                                            $("#HMainSourceBillType").attr("disabled", "disabled");
                                        }
                                        else if (result.data.hSourceBillTypeField == "3711") {
                                            $("#HMainSourceBillType").empty();
@@ -1493,7 +1515,7 @@
                                            optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '生产汇报单' + "</option>";
                                            $("#HMainSourceBillType").append(optionHtml);
                                            layui.form.render('select');
                                            $("#HMainSourceBillType").attr("readonly", "readonly");
                                            $("#HMainSourceBillType").attr("disabled", "disabled");
                                        }
                                        else if (result.data.hSourceBillTypeField == "3714") {
                                            $("#HMainSourceBillType").empty();
@@ -1501,7 +1523,7 @@
                                            optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '工序汇报单' + "</option>";
                                            $("#HMainSourceBillType").append(optionHtml);
                                            layui.form.render('select');
                                            $("#HMainSourceBillType").attr("readonly", "readonly");
                                            $("#HMainSourceBillType").attr("disabled", "disabled");
                                        }
                                        else {
                                            $("#HMainSourceBillType").empty();
@@ -1509,10 +1531,10 @@
                                            optionHtml += "<option value = '-1' >" + '手工录入' + "</option>";
                                            $("#HMainSourceBillType").append(optionHtml);
                                            layui.form.render('select');
                                            $("#HMainSourceBillType").attr("readonly", "readonly");
                                            $("#HMainSourceBillType").attr("disabled", "disabled");
                                        }
                                        if (result.data.hMulSourceFlagField == 0) {
                                            $("#HSourceBillNo").attr("readonly", "readonly");
                                            $("#HSourceBillNo").attr("disabled", "disabled");
                                            $('#HSourceBillNo-BT').addClass("layui-btn-disabled").attr("disabled", true);//按钮禁用
                                        }
                                        element.tabChange('tab-Kf_ProductInBill_PDA', '3');
@@ -1533,6 +1555,7 @@
                                });
                            }
                        },
                        complete: function (XHR, TS) { XHR = null },//回收资源
                        error: function (err) {
                            playSound();
                            layer.msg("错误!" + err, {
@@ -1599,9 +1622,11 @@
                            listOption.cols = [columns];
                            listOption.data = result.data.Materlist;
                            listOption.totalRow = true;
                            table.cache['wl-table'] = null;         //清空表格缓存数据
                            table.render(listOption);
                            if (result.data.ICMOReportlist[0].HSourceInterID != 0) {
                                ICMOReportBarCodelistOption.data = result.data.ICMOReportlist;
                                table.cache['ICMOReportBarCode-table'] = null;         //清空表格缓存数据
                                table.render(ICMOReportBarCodelistOption);
                            }
@@ -1653,7 +1678,8 @@
                            $("#HWHName_B").val("");
                            $("#HSPName_B").val("");
                        }
                    }
                    },
                    complete: function (XHR, TS) { XHR = null }//回收资源
                });
            }
@@ -1675,11 +1701,11 @@
                $("#HStockPlaceName").val("");
                $("#HStockPlaceID").val("0");
                if (obj[0].HSPFlag == 0) {
                    $("#HStockPlaceName").attr("readonly", "readonly");
                    $("#HStockPlaceName").attr("disabled", "disabled");
                    $('#HSpID-BT').addClass("layui-btn-disabled").attr("disabled", true);//按钮禁用
                }
                else {
                    $("#HStockPlaceName").removeAttr("readonly");
                    $("#HStockPlaceName").removeAttr("disabled");
                    $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//按钮恢复正常状态
                }
            }