wtt
2024-06-11 4475a6d2d7dc245176bcfb704a3275b95a5057fd
WebTM/views/É豸¹ÜÀí/Sb_EqpMaintenanceBill_PDA.html
@@ -163,7 +163,7 @@
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>部门</th>
                                            <th>部门<span style=" color:red">*</span></th>
                                            <td class="bz_td">
                                                <input type="text" name="HDeptName" class="layui-input" id="HDeptName" placeholder="选择部门" style="background-color:#efefef4d;">
                                                <input type="hidden" name="HDeptID" id="HDeptID" value="0" autocomplete="off" class="layui-input">
@@ -171,7 +171,7 @@
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>维修人</th>
                                            <th>维修人<span style=" color:red">*</span></th>
                                            <td class="bz_td">
                                                <input type="text" name="HEmpName" class="layui-input" id="HEmpName" placeholder="选择维修人" style="background-color:#efefef4d;">
                                                <input type="hidden" name="HEmpID" id="HEmpID" value="0" autocomplete="off" class="layui-input">
@@ -179,7 +179,7 @@
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>维修项目</th>
                                            <th>维修项目<span style=" color:red">*</span></th>
                                            <td class="bz_td">
                                                <input type="text" name="HRepair" class="layui-input" id="HRepair" placeholder="选择维修项目" style="background-color:#efefef4d;">
                                                <input type="hidden" name="HRepairID" id="HRepairID" value="0" autocomplete="off" class="layui-input">
@@ -203,7 +203,7 @@
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>故障登记单</th>
                                            <th>故障登记单<span style=" color:red">*</span></th>
                                            <td class="bz_td">
                                                <input type="text" name="HMainSourceBillNo" class="layui-input" id="HMainSourceBillNo" placeholder="选择故障登记单" style="background-color:#efefef4d;">
                                                <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" value="0" autocomplete="off" class="layui-input">
@@ -212,7 +212,7 @@
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>负责人</th>
                                            <th>负责人<span style=" color:red">*</span></th>
                                            <td class="bz_td">
                                                <input type="text" name="HManagerName" class="layui-input" id="HManagerName" placeholder="选择负责人" style="background-color:#efefef4d;">
                                                <input type="hidden" name="HManagerID" id="HManagerID" value="0" autocomplete="off" class="layui-input">
@@ -489,7 +489,6 @@
                            }
                        },
                        error: function (err) {
                            layer.close(index);
                            layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    });
@@ -499,34 +498,37 @@
            //新增
            form.on('submit(Add)', function (data) {
                $('#Saver').addClass("buttom_box_little");
                $('#Saver').addClass("layui-btn-disabled").attr("disabled", false);
                $("#HBarCode").removeAttr("readonly");//条形码清除只读
                $("#HBarCode").removeAttr("background-color");//条形码清除背景色
                layer.confirm('新增后页面数据将消失?', { icon: 3, title: '提示' }, function (index) {
                    $('#Saver').addClass("buttom_box_little");
                    $('#Saver').addClass("layui-btn-disabled").attr("disabled", false);
                    $("#HBarCode").removeAttr("readonly");//条形码清除只读
                    $("#HBarCode").removeAttr("background-color");//条形码清除背景色
                // æ¸…空表单 ï¼ˆâ€œformData”是表单的id)
                $("#formData")[0].reset();
                layui.form.render();
                option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": $("#HManagerID").val(), "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": $("#HRemark").val(), "HEmpID": 0, "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "" }];
                table.render(option);
                    // æ¸…空表单 ï¼ˆâ€œformData”是表单的id)
                    $("#formData")[0].reset();
                    layui.form.render();
                    option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": $("#HManagerID").val(), "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": $("#HRemark").val(), "HEmpID": 0, "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "" }];
                    table.render(option);
                $("#HBarCode").focus();
                //获取最大单据号
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '3910' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HInterID").val("0");
                        $("#HBillNo").val(d.data[0].HBillNo);
                    }
                });
                $("#HRepairBeginDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //维修开始时间
                $("#HRepairEndDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));    //维修结束时间
                $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));      //单据日期
                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //创建日期
                $("#HMaker").val(sessionStorage["HUserName"]);     //创建人
                    $("#HBarCode").focus();
                    //获取最大单据号
                    $.ajax({
                        url: GetWEBURL() + "/Web/GetMAXNum",
                        type: "GET",
                        data: { "HBillType": '3910' },
                        success: function (d) {
                            //console.log(d.data);
                            $("#HInterID").val("0");
                            $("#HBillNo").val(d.data[0].HBillNo);
                        }
                    });
                    $("#HRepairBeginDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //维修开始时间
                    $("#HRepairEndDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));    //维修结束时间
                    $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));      //单据日期
                    $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //创建日期
                    $("#HMaker").val(sessionStorage["HUserName"]);     //创建人
                    layer.close(index);
                });
            })
            //#region é€€å‡ºæŒ‰é’®
@@ -849,10 +851,26 @@
            }
            //非空验证
            function AllowLoadData(sSubStr) {
                if ($("#HDeptID").val() == 0) {
                    layer.msg("部门没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return;
                }
                if ($("#HEmpID").val() == 0) {
                    layer.msg("维修人没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return;
                }
                if ($("#HRepairID").val() == 0) {
                    layer.msg("维修项目没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return;
                }
                if ($("#HMainSourceInterID").val() == 0) {
                    layer.msg("故障登记单没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return;
                }
                if ($("#HManagerID").val() == 0) {
                    layer.msg("负责人没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return;
                }
                if (typeof (sSubStr) == "undefined" || sSubStr == "" || sSubStr == "[]") {
                    layer.msg("没有设备明细记录", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
@@ -909,11 +927,13 @@
                            layer.close(index);
                        }
                        else {
                            $("#HBarCode").val("");
                            layer.close(index);
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    },
                    error: function (err) {
                        $("#HBarCode").val("");
                        layer.close(index);
                        layer.msg("接口请求失败!" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    }