1
yangle
2025-04-08 2bf78eb12b5911a5a7c662422e3c84bce3d42a9f
WebTM/views/É豸¹ÜÀí/Sb_EquipMaintainBillEdit.html
@@ -46,10 +46,11 @@
                        </div>
                        <div class="layui-card-body">
                            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                                <!--<ul class="layui-tab-title">
                                <li class="layui-this">基本信息</li>-->
                                <!--<li>其他信息</li>-->
                                <!--</ul>-->
                                <ul class="layui-tab-title">
                                    <li class="layui-this">基本信息</li>
                                    <li>附件信息</li>
                                    <li>制单信息</li>
                                </ul>
                                <h1 style="text-align: center; padding: 10px 0;"><b>设备保养记录单</b></h1>
                                <div class="layui-tab-content">
                                    <div class="layui-tab-item layui-show">
@@ -145,6 +146,106 @@
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">最终结论</label>
                                                <div class="layui-input-inline">
                                                    <input type="radio" name="HLastResult" id="HLastResult" value="OK" title="OK" checked>
                                                    <input type="radio" name="HLastResult" id="HLastResult" value="NG" title="NG">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--附件信息-->
                                    <div class="layui-tab-item">
                                        <div class="layui-form-item" style="padding-top: 10px;">
                                            <div class="layui-upload">
                                                <button type="button" class="layui-btn" id="testList">选择文件</button><input class="layui-upload-file" type="file" accept="" name="file" multiple="">
                                                <div class="layui-upload-list">
                                                    <table class="layui-table" lay-filter="fileTable">
                                                        <thead>
                                                            <tr>
                                                                <th>文件名</th>
                                                                <th>图片</th>
                                                                <th>大小</th>
                                                                <th>状态</th>
                                                                <th>操作</th>
                                                            </tr>
                                                        </thead>
                                                        <tbody id="ProImgByList" class="ProImgByList">
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--制单信息-->
                                    <div class="layui-tab-item">
                                        <div class="layui-form-item">
                                            <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="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly>
                                                </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="HChecker" id="HChecker" style="background-color:#efefef4d;" readonly>
                                                </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="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly>
                                                </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="HUpDater" id="HUpDater" style="background-color:#efefef4d;" readonly>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <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="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly>
                                                </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="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
                                                </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="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
                                                </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="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <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="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" readonly>
                                                </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="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
@@ -209,6 +310,7 @@
    <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/zgqCustom/zgqCustom.js"></script>
    <script>
        var OptionData = [];
        //获取参数
@@ -226,7 +328,7 @@
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
        }).use(['index', 'form', 'laydate', 'table', 'element', 'upload'], function () {
            //#region å…¬å…±å˜é‡
            var $ = layui.$
                , admin = layui.admin
@@ -234,6 +336,7 @@
                , table = layui.table
                , form = layui.form
                , laydate = layui.laydate
                , upload = layui.upload
                , element = layui.element;
            //查询条件
            var option = [];//保养
@@ -260,9 +363,14 @@
            //判断操作类型
            if (OperationType == 1) {//无源新增
                set_AddFNew();
                //文件选择初始化
                PicUpload();
            }
            else if (OperationType == 3) {//编辑
                set_EditFromGrid(linterid);
                //文件选择初始化
                PicUpload();
                getFile();
            }
            else {
                layer.alert("未知操作类型!", { icon: 5 });
@@ -313,6 +421,35 @@
                set_GridCellCheck1(obj); //行内快捷键筛选
            });
            //行选择处理(点检结果)
            form.on('select(HMaintainResult)', function (data) {
                //获取下拉框选中的值
                var elem = data.othis.parents('tr');
                var dataindex = elem.attr("data-index");
                $.each(option.data, function (index, value) {
                    if (value.LAY_TABLE_INDEX == dataindex) {
                        value.HMaintainResult = data.value;//把选中下拉框id值赋值给表格缓存
                    }
                });
                console.log(table.cache['mainTable']);
                var HQty = 0;//表体行不合格数量
                for (let i = 0; i < table.cache['mainTable'].length; i++) {
                    if (table.cache['mainTable'][i].HMaintainResult == "X") {
                        HQty++;
                    }
                }
                if (HQty > 0) {
                    document.querySelectorAll("[name='HLastResult']")[0].removeAttribute('checked'); //删除选择属性
                    $("input:radio[name=HLastResult][value=" + "NG" + "]").attr("checked", "true"); //添加选择属性
                } else {
                    document.querySelectorAll("[name='HLastResult']")[1].removeAttribute('checked'); //删除选择属性
                    $("input:radio[name=HLastResult][value=" + "OK" + "]").attr("checked", "true"); //添加选择属性
                }
                form.render('radio');
            });
            //表头信息设备弹窗
            form.on('submit(ProductModulList)', function () {
                //页面层-自定义
@@ -324,7 +461,7 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true
                    , content: ['../设备管理/设备档案/Gy_EquipFileMainList.html', 'yes']
                    , content: ['../设备管理/设备档案/Gy_EquipFileMainList.html?openType=2', 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
@@ -422,7 +559,7 @@
                    shift: 2,
                    area: ['90%', '90%'],
                    maxmin: true,
                    content: ['../基础资料/公用基础资料/Gy_MaintainLev.html', 'yes'],
                    content: ['../基础资料/公用基础资料/Gy_MaintainLev.html?openType=2', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
@@ -459,7 +596,7 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../设备管理/设备规程单/Sb_EquipMaintainRuleList.html', 'yes'],
                    content: ['../设备管理/设备规程单/Sb_EquipMaintainRuleList.html?openType=2', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
@@ -497,7 +634,7 @@
                                var rowdate1 = layui.table.cache["mainTable"];
                                var rowdate2 = layui.table.cache["mainTable1"];
                                option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }];
                                option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HRemark": "", "HMaintainResult": "Y"}];
                                option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HRemark": "", "HMaintainResult": "Y" }];
                                table.render(option);
                                table.render(option1);
@@ -512,9 +649,11 @@
                                        };
                                        buttonArr.push(checkrow);  //将之前的数据存储
                                    }
                                    table.reload("mainTable", {
                                        data: buttonArr    //将数据重新载入表格
                                    })
                                    option.data = buttonArr;
                                    table.render(option);
                                    //table.reload("mainTable", {
                                    //    data: option.data    //将数据重新载入表格
                                    //})
                                }
@@ -531,9 +670,11 @@
                                        };
                                        buttonArr.push(checkrow);  //将之前的数据存储
                                    }
                                    table.reload("mainTable1", {
                                        data: buttonArr    //将数据重新载入表格
                                    })
                                    option1.data = buttonArr;
                                    table.render(option1);
                                    //table.reload("mainTable1", {
                                    //    data: option1.data    //将数据重新载入表格
                                    //})
                                }
                            } else {
@@ -562,7 +703,7 @@
                                var rowdate1 = layui.table.cache["mainTable"];
                                var rowdate2 = layui.table.cache["mainTable1"];
                                option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }];
                                option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HRemark": "", "HMaintainResult": "Y"}];
                                option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HRemark": "", "HMaintainResult": "Y" }];
                                table.render(option);
                                table.render(option1);
@@ -621,7 +762,7 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../设备管理/Sb_EquipMaintainPlanBillList.html', 'yes'],
                    content: ['../设备管理/Sb_EquipMaintainPlanBillList.html?openType=2', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
@@ -866,11 +1007,12 @@
                    data: {
                        "HID": linterid
                    },
                    async: false,
                    success: function (result) {
                        //console.log(result.code)
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            //console.log(result)
                            var data = result.data.h_v_Sb_EquipMaintainBillList[0];
                            var data = result.data.h_v_Sb_EquipMaintainBill_Edit[0];
                            form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                "HBillNo": data.单据号
                                , "HDate": formatDate(data.日期)
@@ -888,7 +1030,26 @@
                                , "HEquipMaintainRuleInterNo": data.设备保养规程                //备注
                                , "HMaintainLevID": data.HMaintainLevID
                                , "HMaintainLevName": data.保养级别名称
                                , "HMaker": data.制单人
                                , "HMakeDate": data.制单日期 == null ? "" : Format(new Date(data.制单日期), "yyyy-MM-dd")
                                , "HChecker": data.审核人
                                , "HCheckDate": data.审核日期 == null ? "" : Format(new Date(data.审核日期), "yyyy-MM-dd")
                                , "HUpDater": data.修改人
                                , "HUpDateDate": data.修改日期 == null ? "" : Format(new Date(data.修改日期), "yyyy-MM-dd")
                                , "HCloseMan": data.关闭人
                                , "HCloseDate": data.关闭日期 == null ? "" : Format(new Date(data.关闭日期), "yyyy-MM-dd")
                                , "HDeleteMan": data.作废人
                                , "HDeleteDate": data.作废日期 == null ? "" : Format(new Date(data.作废日期), "yyyy-MM-dd")
                            });
                            if (data.最终结论 == "不合格") {
                                document.querySelectorAll("[name='HLastResult']")[0].removeAttribute('checked'); //删除选择属性
                                $("input:radio[name=HLastResult][value=" + "NG" + "]").attr("checked", "true"); //添加选择属性
                            } else {
                                document.querySelectorAll("[name='HLastResult']")[1].removeAttribute('checked'); //删除选择属性
                                $("input:radio[name=HLastResult][value=" + "OK" + "]").attr("checked", "true"); //添加选择属性
                            }
                            form.render('radio');
                        } else {
                            layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
@@ -911,12 +1072,19 @@
                        //console.log('gouba' + result);
                        if (result.count == 1) {
                            option.data = result.list[0];
                            for (let i = 0; i < option.data.length; i++) {
                                if (option.data[i].HMaintainResult == "合格") {
                                    option.data[i].HMaintainResult = "Y";
                                } else {
                                    option.data[i].HMaintainResult = "X";
                                }
                            }
                            table.render(option);
                            option1.data = result.list[1];
                            table.render(option1);
                            for (let j = 0; j < result.list.length; j++) {
                                $("#HMaintainResult" + (j + 1)).val(result.list[j].保养结果 == "合格" ? 'Y' : 'X')
                            for (let j = 0; j < result.list[0].length; j++) {
                                $("#HMaintainResult" + (j + 1)).val(result.list[0][j].HMaintainResult == "合格" ? 'Y' : (result.list[0][j].HMaintainResult == 'Y' ? 'Y' : 'X'))
                            }
                            form.render('select');
                        } else {
@@ -942,15 +1110,14 @@
            }
            //增加一行
            function btnAddLine(NewRow) {
                var tableBak = table.cache["mainTable"]; //获取之前编辑过的表格数据
                buttonArr = [];//清空数组
                for (var i = 0; i < tableBak.length; i++) {
                    buttonArr.push(tableBak[i]);  //将之前的数据存储
                table.cache["mainTable"].push(NewRow);
                option.data = table.cache["mainTable"];
                table.render(option);
                for (var i = 1; i <= option.data.length; i++) {
                    $('#HMaintainResult' + i + '').find("option[value='" + option.data[i - 1].HMaintainResult + "']").attr("selected", true);
                }
                buttonArr.push(NewRow);  //在尾部加一行
                table.reload("mainTable", {
                    data: buttonArr    //将数据重新载入表格
                })
                form.render('select');
            }
            //增加一行1
            function btnAddLine1(NewRow) {
@@ -979,6 +1146,11 @@
                    table.cache["mainTable"].push(JSON.parse(copyrow));//将复制的行强转成json追加到表格上
                    option.data = table.cache["mainTable"];//将数据绑定到data上
                    table.render(option);//将数据渲染到表格上
                    for (var i = 1; i <= option.data.length; i++) {
                        $('#HMaintainResult' + i + '').find("option[value='" + option.data[i - 1].HMaintainResult + "']").attr("selected", true);
                    }
                    form.render('select');
                }
            }
            //复制一行1
@@ -1368,6 +1540,113 @@
                layer.alert(sMsg, { icon: 5 });
            }
            //#region æ–‡ä»¶ä¸Šä¼ 
            function PicUpload() {
                //多图片上传
                //多文件列表示例
                var ProImgByList = $('#ProImgByList')
                    , uploadListIns = upload.render({
                        elem: '#testList'
                        , url: GetWEBURL() + "/Sb_EquipMaintainBill/UploadFile"
                        , accept: 'file'
                        , multiple: true
                        , auto: false
                        //, bindAction: '#testListAction' //按扭绑定
                        , data: { "HBillNo": $("#HBillNo").val(), "HRemark": $("#HRemark").val(), "HUserName": sessionStorage["HUserName"] }
                        , choose: function (obj) {
                            var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列
                            //读取本地文件
                            obj.preview(function (index, file, result) {
                                var tr = $(['<tr id="upload-' + index + '">'
                                    , '<td>' + file.name + '</td>'
                                    , '<td>' + '<img onclick=\"previewImg(this)\" id="showImg" class="ImgClass" style="width: 150px; margin:10px;cursor:pointer;"src="' + result + '" alt="' + file.name + '">' + '</td>'
                                    , '<td>' + (file.size / 1014).toFixed(1) + 'kb</td>'
                                    , '<td>等待上传</td>'
                                    , '<td>'
                                    , '<button class="layui-btn layui-btn-xs demo-reload ">上传</button>'
                                    , '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">删除</button>'
                                    , '</td>'
                                    , '</tr>'].join(''));
                                //单个重传
                                tr.find('.demo-reload').on('click', function () {
                                    obj.upload(index, file);
                                    return false;
                                });
                                //删除
                                tr.find('.demo-delete').on('click', function () {
                                    delete files[index]; //删除对应的文件
                                    tr.remove();
                                    uploadListIns.config.elem.next()[0].value = ''; //清空 input file å€¼ï¼Œä»¥å…åˆ é™¤åŽå‡ºçŽ°åŒåæ–‡ä»¶ä¸å¯é€‰
                                });
                                ProImgByList.append(tr);
                            });
                        }
                        , done: function (res, index, upload) {
                            if (res.code == 1) { //上传成功
                                var tr = ProImgByList.find('tr#upload-' + index)
                                    , tds = tr.children();
                                tds.eq(3).html('<span style="color: #5FB878;">上传成功</span>');
                                tds.eq(4).html(''); //清空操作
                                return delete this.files[index]; //删除文件队列已经上传成功的文件
                            }
                            this.error(index, upload);
                        }
                        , error: function (index, upload) {
                            var tr = ProImgByList.find('tr#upload-' + index)
                                , tds = tr.children();
                            tds.eq(2).html('<span style="color: #FF5722;">上传失败[检查文件名及文件格式]</span>');
                            tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //显示上传
                        }
                    });
            }
            //#endregion
            //#region ç¼–辑时,获取已上传的文件列表
            function getFile() {
                var ProImgByList = $('#ProImgByList')
                $.ajax({
                    url: GetWEBURL() + '/Sb_EquipMaintainBill/Filelist',
                    type: "GET",
                    data: { "HBillNo": $("#HBillNo").val() },
                    success: function (data1) {
                        if (data1.count == 1) {
                            var index = 0;
                            for (var i = 0; i < data1.data.length; i++) {
                                var tr = $(['<tr id="upload-' + i + '">'
                                    , '<td style="display:none">' + data1.data[i].HItemID + '</td>'
                                    , '<td style="display:none">' + data1.data[i].HSourceBillNo + '</td>'
                                    , '<td>' + data1.data[i].HFileName + '</td>'
                                    , '<td>' + '<img onclick=\"previewImg(this)\" id="showImg' + i + '" class="ImgClass" style="width: 150px; margin:10px;cursor:pointer;"src="' + data1.data[i].HFilePath + '" alt="' + data1.data[i].HFileName + '">' + '</td>'
                                    , '<td>' + (data1.data[i].HFileSize / 1014).toFixed(1) + 'kb</td>'
                                    , '<td style="color: #5FB878;">上传成功</td>'
                                    , '<td style="display:none">' + data1.data[i].url + '</td>'
                                    , '<td>'
                                    , '<button class="layui-btn layui-btn-xs  demo-dowload" type="button" id="deltefile" onclick="javascript:dowload(this)"><i class="layui-icon layui-icon-download-circle layuiadmin-button-btn"></i>下载</button>'
                                    , '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete" type="button" id="deltefile" onclick="javascript:toManager(this)"><i class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>删除</button>'
                                    , '</td>'
                                    , '</tr>'].join(''));
                                $('#ProImgByList').append(tr);
                            }
                        } else {
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //#endregion
            //#endregion
        });
@@ -1401,6 +1680,71 @@
        function GetMaterValue(obj) {
            OptionData = obj;
        }
        function previewImg(obj) {
            var img = new Image();
            img.src = obj.src;
            var height = img.height * 1.2; //获取图片高度
            var width = img.width * 1.2; //获取图片宽度
            var imgHtml = "<img src='" + obj.src + "' width='100%' height='100%'/>";
            //弹出层
            layer.open({
                type: 1,
                shade: 0.8,
                offset: 'auto',
                area: ['80%', '80%'],
                shadeClose: true,
                scrollbar: false,
                title: "图片预览", //不显示标题
                content: imgHtml, //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
                cancel: function () {
                    //layer.msg('捕获就是从页面已经存在的元素上,包裹layer的结构', { time: 5000, icon: 6 });
                }
            });
        }
        //#region ä¸‹è½½å·²ä¸Šä¼ çš„æ–‡ä»¶
        function dowload(r) {
            //得到当前所在行
            var rows = r.parentNode.parentNode.rowIndex;
            //得到所在行的第五列的内容:文件地址
            var url = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(6)").html();
            /*window.location.href = url;*/
            window.open(url)
        }
        //#endregion
        //#region åˆ é™¤å·²ä¸Šä¼ çš„æ–‡ä»¶
        function toManager(r) {
            //得到当前所在行
            var rows = r.parentNode.parentNode.rowIndex;
            //得到所在行的第一列的内容:主键ID
            var HItemID = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(0)").html();
            //得到所在行的第二列的内容:单据号
            var HSourceBillNo = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(1)").html();
            //得到所在行的第三列的内容:文件名称
            var HFileName = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(2)").html();
            layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                //删除已上传文件
                $.ajax({
                    url: GetWEBURL() + '/Sb_EquipMaintainBill/DeleteFilelist',
                    type: "GET",
                    data: { "HItemID": HItemID, "HSourceBillNo": HSourceBillNo, "HFileName": HFileName },
                    success: function (data1) {
                        if (data1.count == 1) {
                            layer.alert(data1.Message, { icon: 1 });
                            $("#ProImgByList tr").eq((rows - 1)).remove();
                        }
                        else {
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            })
        }
    </script>
</body>
</html>