duhe
2023-09-03 5a883c26ed3d27dfbacbacbaabc5a579f6f604cb
WebTM/views/ÏîÄ¿¹ÜÀí/ÏîÄ¿½×¶Î/PM_ProjectReportBill.html
@@ -1136,49 +1136,7 @@
            }
            //#endregion
            //#region ä¸‹è½½å·²ä¸Šä¼ çš„æ–‡ä»¶
            function dowload(r) {
                //得到当前所在行
                var rows = r.parentNode.parentNode.rowIndex;
                //得到所在行的第五列的内容:文件地址
                var url = $("#ProImgByList1 tr:eq(" + (rows - 1) + ") td:eq(5)").html();
                /*window.location.href = url;*/
                window.open(url)
            }
            //#endregion
            //#region åˆ é™¤å·²ä¸Šä¼ çš„æ–‡ä»¶
            function toManager(r) {
                //得到当前所在行
                var rows = r.parentNode.parentNode.rowIndex;
                //得到所在行的第一列的内容:主键ID
                var HItemID = $("#ProImgByList1 tr:eq(" + (rows - 1) + ") td:eq(0)").html();
                //得到所在行的第二列的内容:单据号
                var HSourceBillNo = $("#ProImgByList1 tr:eq(" + (rows - 1) + ") td:eq(1)").html();
                //得到所在行的第三列的内容:文件名称
                var HFileName = $("#ProImgByList1 tr:eq(" + (rows - 1) + ") td:eq(2)").html();
                layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                    //删除已上传文件
                    $.ajax({
                        url: GetWEBURL() + '/Cj_StationOutBill/DeleteFilelist',
                        type: "GET",
                        data: { "HItemID": HItemID, "HSourceBillNo": HSourceBillNo, "HFileName": HFileName },
                        success: function (data1) {
                            if (data1.count == 1) {
                                layer.alert(data1.Message, { icon: 1 });
                                $("#ProImgByList1 tr").eq((rows - 1)).remove();
                            }
                            else {
                                layer.alert(data1.code + data1.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                })
            }
            //#endregion
            //#region ä¿å­˜HMaker
            function set_AddNew(data) {
@@ -1742,7 +1700,49 @@
        });
        //#region ä¸‹è½½å·²ä¸Šä¼ çš„æ–‡ä»¶
        function dowload(r) {
            //得到当前所在行
            var rows = r.parentNode.parentNode.rowIndex;
            //得到所在行的第五列的内容:文件地址
            var url = $("#ProImgByList1 tr:eq(" + (rows - 1) + ") td:eq(5)").html();
            /*window.location.href = url;*/
            window.open(url)
        }
        //#endregion
        //#region åˆ é™¤å·²ä¸Šä¼ çš„æ–‡ä»¶
        function toManager(r) {
            //得到当前所在行
            var rows = r.parentNode.parentNode.rowIndex;
            //得到所在行的第一列的内容:主键ID
            var HItemID = $("#ProImgByList1 tr:eq(" + (rows - 1) + ") td:eq(0)").html();
            //得到所在行的第二列的内容:单据号
            var HSourceBillNo = $("#ProImgByList1 tr:eq(" + (rows - 1) + ") td:eq(1)").html();
            //得到所在行的第三列的内容:文件名称
            var HFileName = $("#ProImgByList1 tr:eq(" + (rows - 1) + ") td:eq(2)").html();
            layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                //删除已上传文件
                $.ajax({
                    url: GetWEBURL() + '/Cj_StationOutBill/DeleteFilelist',
                    type: "GET",
                    data: { "HItemID": HItemID, "HSourceBillNo": HSourceBillNo, "HFileName": HFileName },
                    success: function (data1) {
                        if (data1.count == 1) {
                            layer.alert(data1.Message, { icon: 1 });
                            $("#ProImgByList1 tr").eq((rows - 1)).remove();
                        }
                        else {
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            })
        }
            //#endregion
    </script>
</body>