zzr99
2022-08-09 555c1884899ce67775b9e9f1ea2def9c8e328d8d
WebTM/views/ÑéÊÕÈë¿â/ÆäËûÈë¿â/Kf_OtherInBill_Fast.html
@@ -207,7 +207,7 @@
                        </div>
                    </div>
                    <div class="layer-footer" style="z-index: 10; position: fixed; text-align: center; bottom: 0; width:100%; height:50px">
                        <button type="button" lay-submit="" class="layui-btn" lay-filter="Saver">提交</button>
                        <button type="button" lay-submit="" class="layui-btn" id="Saver" lay-filter="Saver">提交</button>
                        <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdModify">编辑</button>
                        <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdRefresh">刷新</button>
                        <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdDelete">删除</button>
@@ -337,7 +337,7 @@
                $("#HBillNo").val("");
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    url: GetWEBURL() + "/Web/GetMAXNumPDA",
                    type: "GET",
                    data: { "HBillType": '1203' },
                    success: function (d) {
@@ -688,64 +688,106 @@
            });
            form.on('submit(cmdDelete)', function () {//删除
                var checkStatus = table.checkStatus('wl-table')
                    , data = checkStatus.data;
                // console.log(data);
                var sInterID = $('#HInterID').val()
                var sMaterID = data[0].HMaterID
                var sBillType = '1203'
                var sAuxPropID = data[0].HAuxPropID
                //var sMTONo = data[0].HMTONo
                var sMTONo = ''
                var sSourceInterID = data[0].HSourceInterID
                var sSourceEntryID = data[0].HSourceEntryID
                $.ajax(
                    {
                        type: "Get",
                        //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/Delete_Json", //方法所在页面和方法名
                        url: GetWEBURL() + "/OtherInBill/Delete_Json",
                        async: true,
                        data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
                        dataType: "json",
                        success: function (data) {
                            if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                table.render({
                                    elem: '#wl-table'
                                    , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
                                    , toolbar: '#toolbarDemo'
                                    , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
                                    , cols: [[
                                        { type: 'radio' }
                                        , { field: 'HQty', title: '数量', width: 150 }
                                        , { field: 'HQtyMust', title: '应收数量', width: 150 }
                                        , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                                        , { field: 'HMaterName', title: '物料名称', width: 150 }
                                        , { field: 'HMaterModel', title: '规格型号', width: 150 }
                                        , { field: 'HSourceInterID', title: '源单主内码', width: 150 }
                                        , { field: 'HSourceEntryID', title: '源单子内码', width: 150 }
                                        , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                                        , { field: 'HBatchNo', title: '批次', width: 150 }
                                    ]]
                                    , height: 500
                                    , done: function () {
                                        layer.closeAll("loading");
                                    }
                                });
                            }
                            else {
                                layer.msg(data.Message, { icon: 2 });
                            }
                        },
                        error: function (err) {
                            layer.msg('错误' + err, {
                                icon: 5,
                                time: 20000
                            }, function () {
                                //do something
                            });
                        }
                    });
                //var checkStatus = table.checkStatus('wl-table')
                //    , data = checkStatus.data;
                //// console.log(data);
                //var sInterID = $('#HInterID').val()
                //var sMaterID = data[0].HMaterID
                //var sBillType = '1203'
                //var sAuxPropID = data[0].HAuxPropID
                ////var sMTONo = data[0].HMTONo
                //var sMTONo = ''
                //var sSourceInterID = data[0].HSourceInterID
                //var sSourceEntryID = data[0].HSourceEntryID
                //$.ajax(
                //    {
                //        type: "Get",
                //        //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/Delete_Json", //方法所在页面和方法名
                //        url: GetWEBURL() + "/OtherInBill/Delete_Json",
                //        async: true,
                //        data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
                //        dataType: "json",
                //        success: function (data) {
                //            if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                //                table.render({
                //                    elem: '#wl-table'
                //                    , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
                //                    , toolbar: '#toolbarDemo'
                //                    , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
                //                    , cols: [[
                //                        { type: 'radio' }
                //                        , { field: 'HQty', title: '数量', width: 150 }
                //                        , { field: 'HQtyMust', title: '应收数量', width: 150 }
                //                        , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                //                        , { field: 'HMaterName', title: '物料名称', width: 150 }
                //                        , { field: 'HMaterModel', title: '规格型号', width: 150 }
                //                        , { field: 'HSourceInterID', title: '源单主内码', width: 150 }
                //                        , { field: 'HSourceEntryID', title: '源单子内码', width: 150 }
                //                        , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                //                        , { field: 'HBatchNo', title: '批次', width: 150 }
                //                    ]]
                //                    , height: 500
                //                    , done: function () {
                //                        layer.closeAll("loading");
                //                    }
                //                });
                //            }
                //            else {
                //                layer.msg(data.Message, { icon: 2 });
                //            }
                //        },
                //        error: function (err) {
                //            layer.msg('错误' + err, {
                //                icon: 5,
                //                time: 20000
                //            }, function () {
                //                //do something
                //            });
                //        }
                //    });
            });
            //form.on('submit(Saver)', function (data) {//提交
            //    //灰度提交按钮Saver
            //    document.getElementById("Saver").disabled = true;
            //    //debugger;
            //    data.field.HSTOCKORGID = sessionStorage["OrganizationID"];//组织
            //    var sMainStr = JSON.stringify(data.field);
            //    //var hOrgID = sessionStorage["OrganizationID"];
            //    var sMain = sMainStr;
            //    var sSubStr = table.cache['wl-table'];
            //    var sSourceType = $("#HBillType").val();
            //    $.ajax(
            //        {
            //            type: "POST",
            //            url: GetWEBURL() + "/OtherInStockBill/set_SaveOtherInStockBill_Json",
            //            //url: "http://localhost:12761/OtherInStockBill/set_SaveOtherInStockBill_Json", //方法所在页面和方法名
            //            async: true,
            //            data: { "oMain": sMain },
            //            dataType: "json",
            //            success: function (data) {
            //                if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
            //                    layer.msg(data.Message , { icon: 1 });
            //                    //
            //                    //Sub_ClearBill();
            //                    //
            //                    //灰度提交按钮Saver
            //                    document.getElementById("Saver").disabled = false;
            //                }
            //                else {
            //                    layer.msg(data.Message, { icon: 5 });
            //                    //灰度提交按钮Saver
            //                    document.getElementById("Saver").disabled = false;
            //                }
            //                layer.closeAll("loading");
            //            },
            //            error: function (err) {
            //                layer.msg("错误:" + err, { icon: 5 });
            //                //灰度提交按钮Saver
            //                document.getElementById("Saver").disabled = false;
            //            }
            //        });
            //});
            form.on('submit(Saver)', function (data) {//提交
                //灰度提交按钮Saver
@@ -770,12 +812,6 @@
                            dataType: "json",
                            success: function (data) {
                                if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                    //layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
                                    ////
                                    ////Sub_ClearBill();
                                    ////
                                    ////灰度提交按钮Saver
                                    //document.getElementById("Saver").disabled = false;
                                    layer.confirm("生成其他入库单" + data.Message + $("#HBillNo").val(), {
                                        icon: 1, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['新增'],
                                        btn2: function () {
@@ -1065,6 +1101,7 @@
                elem: '#wl-table'
                , toolbar: '#toolbarDemo'
                , cellMinWidth: 90
                ,limit:3000
                , totalRow: true
                , cols: [[
                    { type: 'radio' }
@@ -1078,7 +1115,7 @@
                    , { field: 'HSourceEntryID', title: '源单子内码', width: 150 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                    , { field: 'HBatchNo', title: '批次', width: 150 }
                    , { field: 'HPieceQty', title: '条码数量', width: 150 }+
                    , { field: 'HPieceQty', title: '条码数量', width: 150 }
                ]]
                , height: 500
                , done: function () {