zzr99
2022-03-30 d64724c092e9aa860c888d3e4106d41a8dfe99e8
WebTM/views/ÑéÊÕÈë¿â/ÆäËûÈë¿â/Kf_OtherInBill_FastList.html
@@ -226,60 +226,59 @@
        form.on('submit(cmdDelete)', function () {//删除
            var checkStatus = table.checkStatus('dj-table')
            , data = checkStatus.data;
            // console.log(data);
            // var sInterID = $('#HInterID').val()
            var sInterID = data[0].HInterID
            //var sMaterID = data[0].HMaterID
            //var sBillType = $('#HBillType').val()
            //var sAuxPropID = data[0].HAuxPropID
            ////var sMTONo = data[0].HMTONo
            //var sMTONo = 0
            //var sSourceInterID = data[0].HSourceInterID
            //var sSourceEntryID = data[0].HSourceEntryID
            $.ajax(
               {
                   type: "Get",
                   url: GetWEBURL() + "/Web/Delete_Json",
                   async: true,
                   data: { "sHInterID": sInterID },
                   dataType: "json",
                   success: function (data) {
                       if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                           //layer.msg(data.Message, { icon: 1 });
                           table.render({
                               elem: '#dj-table'
                               , url: GetWEBURL() + '/Web/DisBillEntryList_Mate_Webs_Json'
                               , cellMinWidth: 80
                               , toolbar: '#toolbarDemo'
                               , where: { HBillType: '1203', sWhere: '' }
                               , cols: [[
                                   { type: 'radio' }
                                , { field: 'HInterID', title: '单据内码', width: 80 }
                                , { field: 'HBillNo', title: '单据号', width: 80 }
                                , { field: 'HMaker', title: '制单人', width: 100 }
                                , { field: 'HMakeDate', title: '制单日期', width: 100 }
                                , { field: 'HQty', title: '数量', width: 100 }
                                , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                                , { field: 'HRedBlueFlag', title: '红蓝字', width: 100 }
                                , { field: 'HSourceBillType', title: '源单类型', width: 100 }
                               ]]
                         , height: 500
                           })
                       }
                       else {
                           layer.msg(data.Message, { icon: 2 });
                       }
                   },
                   error: function (err) {
                       layer.msg('错误' + err, {
                           icon: 5,
                           time: 20000
                       }, function () {
                           //do something
                       });
                   }
               });
                , data = checkStatus.data;
            if (checkStatus.data.length === 1) {
                var sInterID = data[0].HInterID
            //逻辑删除方法
                layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                    $.ajax(
                        {
                            type: "Get",
                            url: GetWEBURL() + "/Web/Delete_Json",
                            async: true,
                            data: { "sHInterID": sInterID },
                            dataType: "json",
                            success: function (data) {
                                if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                    //layer.msg(data.Message, { icon: 1 });
                                    table.render({
                                        elem: '#dj-table'
                                        , url: GetWEBURL() + '/Web/DisBillEntryList_Mate_Webs_Json'
                                        , cellMinWidth: 80
                                        , toolbar: '#toolbarDemo'
                                        , where: { HBillType: '1203', sWhere: '' }
                                        , cols: [[
                                            { type: 'radio' }
                                            , { field: 'HInterID', title: '单据内码', width: 80 }
                                            , { field: 'HBillNo', title: '单据号', width: 80 }
                                            , { field: 'HMaker', title: '制单人', width: 100 }
                                            , { field: 'HMakeDate', title: '制单日期', width: 100 }
                                            , { field: 'HQty', title: '数量', width: 100 }
                                            , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                                            , { field: 'HRedBlueFlag', title: '红蓝字', width: 100 }
                                            , { field: 'HSourceBillType', title: '源单类型', width: 100 }
                                        ]]
                                        , height: 500
                                    })
                                }
                                else {
                                    layer.msg(data.Message, { icon: 2 });
                                }
                            },
                            error: function (err) {
                                layer.msg('错误' + err, {
                                    icon: 5,
                                    time: 20000
                                }, function () {
                                    //do something
                                });
                            }
                        });
                })
            }
            else {
                layer.msg('请选择一行数据删除!');
            }
        });