zzr99
2021-12-25 015b016d9075ba6fd913290e2251f26757e305f4
WebTM/views/ÑéÊÕÈë¿â/²úÆ·Èë¿â/Kf_ProductInBill_FastList.html
@@ -93,11 +93,11 @@
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
        var $ = layui.$
        , admin = layui.admin
        , layer = layui.layer
        , table = layui.table
        , form = layui.form
        , element = layui.element;
            , admin = layui.admin
            , layer = layui.layer
            , table = layui.table
            , form = layui.form
            , element = layui.element;
        //清空界面  new
        //动态加载源单类型列表 new
@@ -137,8 +137,45 @@
        form.on('submit(cmdModify)', function () {
            //var checkStatus = table.checkStatus('dj-table')
            //    , data = checkStatus.data;
            //var sInterID = data[0].HInterID
            //var sBillNo = data[0].HBillNo
            //var sBillType = '1202'
            //$.ajax({
            //    url: GetWEBURL() + "/ProductIn/ProductInTempList_Modify",
            //    type: "GET",
            //    data: { "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType },
            //    success: function (result) {
            //        if (result.count == 1) {
            //            layer.open({
            //                type: 2
            //                , area: ['100%', '100%']
            //                , title: '产品入库单'
            //                , shade: 0.6 //遮罩透明度
            //                , maxmin: false //允许全屏最小化
            //                , anim: 0 //0-6的动画形式,-1不开启
            //                , content: ['../../验收入库/产品入库/Kf_ProductInBill_Fast.html?linterid=' + data[0].HInterID, 'yes']
            //                // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + JSON.stringify(data), 'yes']
            //                // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + rows, 'yes']
            //                , resize: false
            //                , cancel: function () {
            //                    $(".layui-btn").removeClass("layui-btn-disabled");
            //                }
            //            })
            //        }
            //        else {
            //            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //        }
            //    }
            //        })
            //      }
            ////ajaxLabelData = data;
            ////layer.alert(rows);
            var checkStatus = table.checkStatus('dj-table')
                     , data = checkStatus.data;
                , data = checkStatus.data;
            //ajaxLabelData = data;
            //layer.alert(rows);
            layer.open({
@@ -157,30 +194,73 @@
                }
            })
        });
        var option = {
            elem: '#dj-table'
            //, url: GetWEBURL() + '/ProductIn/DisBillEntryList_Json'
            , toolbar: '#toolbarDemo'
            , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
            , 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
            , done: function () {
                layer.closeAll("loading");
            }
        }
        // url: GetWEBURL() + '/Web/chanpinruk',
        form.on('submit(cmdRefresh)', function () {//刷新
            var sBillType = '1202'
            table.render({
                elem: '#dj-table'
                    , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Mate_Webs_Json'
                    ,toolbar: '#toolbarDemo'
                    , where: { HBillType: sBillType,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
                      , done: function () {
                          layer.closeAll("loading");
                      }
            });
                ,url: GetWEBURL() + '/Web/chanpinruk'
                , toolbar: '#toolbarDemo'
                , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
                , 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
                , done: function () {
                    layer.closeAll("loading");
                }
            }),
            table.render({
                elem: '#yd-table'
                , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json'
                , toolbar: '#toolbarDemo'
                , where: { HBillType: sBillType, HMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
                , cols: [[
                    { type: 'radio' }
                    , { field: 'HInterID', title: '单据内码', width: 80 }
                    , { field: 'HBillNo', title: '单据号', width: 80 }
                    , { field: 'HMaker', title: '制单人', width: 100 }
                    , { field: 'HMakeDate', title: '制单日期', width: 100 }
                    , { field: 'HMaterNumber', title: '物料代码', width: 100 }
                    , { field: 'HMaterName', title: '物料名称', width: 100 }
                    , { field: 'HMaterModel', title: '规格型号', width: 100 }
                    , { field: 'HQty', title: '数量', width: 100 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                    , { field: 'HOrgID', title: '组织', width: 100 }
                ]]
                , height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
            })
        });
@@ -190,7 +270,7 @@
                , data = checkStatus.data;
            var sInterID = data[0].HInterID
            var sBillNo = data[0].HBillNo
            var sBillType = '1205'
            var sBillType = '1202'
            $.ajax(
                {
                    type: "Get",
@@ -200,14 +280,15 @@
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                            layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
                                // å¾—到frame索引
                                var index = layer.getFrameIndex(window.name);
                                //关闭当前frame
                                layer.close(index);
                                //修改为功后刷新界面
                                window.location.reload();
                            }
                            });
                        }
                       else {
                            layer.msg(data.Message, { icon: 2 });
                        }
@@ -229,16 +310,7 @@
        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",
@@ -247,14 +319,15 @@
                   data: { "sHInterID": sInterID },
                   dataType: "json",
                   success: function (data) {
                       if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                           layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                       if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†,
                           layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
                               // å¾—到frame索引
                               var index = layer.getFrameIndex(window.name);
                               //关闭当前frame
                               layer.close(index);
                               //修改为功后刷新界面
                               window.location.reload();
                           });
                       }
                       else {
                           layer.msg(data.Message, { icon: 2 });
@@ -276,9 +349,9 @@
        var sBillType = '1202'
                table.render({
                    elem: '#dj-table'
                    , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Mate_Webs_Json'
                    , url: GetWEBURL() + '/Web/chanpinruk'
                    ,toolbar: '#toolbarDemo'
                    , where: { HBillType: sBillType,sWhere:''}
                    , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"]}
                    , cols: [[
                          { type: 'radio' }
                        , { field: 'HInterID', title: '单据内码', width: 80 }
@@ -298,14 +371,13 @@
        //已上传列表
        var
            table.render({
                elem: '#yd-table'
                , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json'
                , toolbar: '#toolbarDemo'
                , where: { HBillType: sBillType, HMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
                , cols: [[
                    { type: 'radio' }
                      { type: 'radio' }
                    , { field: 'HInterID', title: '单据内码', width: 80 }
                    , { field: 'HBillNo', title: '单据号', width: 80 }
                    , { field: 'HMaker', title: '制单人', width: 100 }