wtt
2024-06-11 4475a6d2d7dc245176bcfb704a3275b95a5057fd
WebTM/views/É豸¹ÜÀí/Sb_EquipConkBookBill_PDA.html
@@ -83,7 +83,7 @@
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>故障类别</th>
                                            <th>故障类别<span style="color:red">*</span></th>
                                            <td class="bz_td">
                                                <input type="text" name="HConkTypeName" class="layui-input" id="HConkTypeName" placeholder="选择故障类别" style="background-color:#efefef4d;">
                                                <input type="hidden" name="HConkTypeID" id="HConkTypeID" value="0" autocomplete="off" class="layui-input">
@@ -91,7 +91,7 @@
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>故障原因</th>
                                            <th>故障原因<span style="color:red">*</span></th>
                                            <td class="bz_td">
                                                <input type="text" name="HConkReasonName" class="layui-input" id="HConkReasonName" placeholder="选择故障原因" style="background-color:#efefef4d;">
                                                <input type="hidden" name="HConkReasonID" id="HConkReasonID" value="0" autocomplete="off" class="layui-input">
@@ -118,7 +118,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">
@@ -126,7 +126,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">
@@ -134,7 +134,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">
@@ -414,7 +414,6 @@
                            }
                        },
                        error: function (err) {
                            layer.close(index);
                            layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    });
@@ -424,34 +423,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": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "" }];
                table.render(option);
                    // æ¸…空表单 ï¼ˆâ€œformData”是表单的id)
                    $("#formData")[0].reset();
                    layui.form.render();
                    option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "" }];
                    table.render(option);
                $("#HBarCode").focus();
                //获取最大单据号
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '3907' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HInterID").val("0");
                        $("#HBillNo").val(d.data[0].HBillNo);
                    }
                });
                $("#HConkBeginDate").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": '3907' },
                        success: function (d) {
                            //console.log(d.data);
                            $("#HInterID").val("0");
                            $("#HBillNo").val(d.data[0].HBillNo);
                        }
                    });
                    $("#HConkBeginDate").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 é€€å‡ºæŒ‰é’®
@@ -854,7 +856,19 @@
                    layer.msg("故障类别没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return;
                }
                if ($("#HConkReasonID").val() == 0) {
                    layer.msg("故障原因没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return;
                }
                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 (typeof (sSubStr) == "undefined" || sSubStr == "" || sSubStr == "[]") {
                    layer.msg("没有设备明细记录", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return false;
@@ -906,11 +920,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: "温馨提示" });
                    }