zzr99
2022-08-09 555c1884899ce67775b9e9f1ea2def9c8e328d8d
WebTM/views/ÑéÊÕÈë¿â/ÆäËûÈë¿â/Kf_OtherInBill_FastList.html
@@ -132,6 +132,29 @@
        //初始化界面
        function set_ClearBill() {
            get_Display();
            table.render({
                elem: '#dj-table'
                , 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'
@@ -208,39 +231,21 @@
        //刷新
        form.on('submit(cmdRefresh)', function () {
            get_Display();
            table.render({
                    elem: '#yd-table'
                    , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json'
                    , toolbar: '#toolbarDemo'
                    , where: { HBillType: sBillType, HMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
                    , page: true  // å¼€å¯åˆ†é¡µ
                    , limits: [20, 40, 80, 100]
                    , limit: 20
                    , cols: [[
                        { type: 'radio' }
                        , { field: 'HInterID', title: '单据内码', width: 120 }
                        , { field: 'HBillNo', title: '单据号', width: 150 }
                        , { field: 'HMaker', title: '制单人', width: 120 }
                        , { field: 'HMakeDate', title: '制单日期', width: 150 }
                        , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                        , { field: 'HMaterName', title: '物料名称', width: 150 }
                        , { field: 'HMaterModel', title: '规格型号', width: 150 }
                        , { field: 'HQty', title: '数量', width: 100 }
                        , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                        , { field: 'HOrgID', title: '组织', width: 120 }
                    ]]
                    , height: 500
                    , done: function () {
                        layer.closeAll("loading");
                    }
                })
            location.reload();
        });
        
        //撤销功能
        form.on('submit(cmdRescind)', function () {
            var checkStatus = table.checkStatus('yd-table')
                , data = checkStatus.data;
            var checkStatus = table.checkStatus('yd-table');
            var checkStatus2 = table.checkStatus('sy-table');
            var data = "";
            if (checkStatus.data.length != 0) {
                data = checkStatus.data;
            } else if (checkStatus2.data.length != 0) {
                data = checkStatus2.data;
            } else {
                return layer.msg("请选择一条数据");
            }
            var sInterID = data[0].HInterID
            var sBillNo = data[0].HBillNo
            var sBillType = '1203'
@@ -318,31 +323,63 @@
            }
        });
        //查询
        //form.on('submit(cmdQuery)', function () {
        //    var HBillNo = $("#HBillNo").val();
        //    var HSourceBillNo = $("#HSourceBillNo").val();
        //    //进入页面显示的缓存列表
        //    $.ajax({
        //        url: GetWEBURL() + '/Gy_Mould/list1',
        //        type: "GET",
        //        data: { "BillType": sBillType, "HBillNo": HBillNo, "HSourceBillNo": HSourceBillNo},
        //        success: function (data1) {
        //            if (data1.count == 1) {
        //                option.data = data1.data;
        //                table.render(option);
        //                layer.close(index);
        //            } else {
        //                layer.close(index);
        //                layer.alert(data1.code + data1.Message, { icon: 5 });
        //            }
        //        }, error: function () {
        //            layer.close(index);
        //            layer.alert("接口请求失败!", { icon: 5 });
        //        }
        //    });
        //});
        form.on('submit(cmdQuery)', function () {
            var HBillNo = $("#HBillNo").val();
            var HSourceBillNo = $("#HSourceBillNo").val();
            //进入页面显示的缓存列表
            $.ajax({
                url: GetWEBURL() + '/Gy_Mould/list1',
                type: "GET",
                data: { "BillType": sBillType, "HBillNo": HBillNo, "HSourceBillNo": HSourceBillNo},
                success: function (data1) {
                    if (data1.count == 1) {
                        option.data = data1.data;
                        table.render(option);
                        layer.close(index);
                    } else {
                        layer.close(index);
                        layer.alert(data1.code + data1.Message, { icon: 5 });
                    }
                }, error: function () {
                    layer.close(index);
                    layer.alert("接口请求失败!", { icon: 5 });
            var HSourceBillNo = $("#HSourceBillNo").val();;
            table.render({
                elem: '#sy-table'
                , url: GetWEBURL() + '/ProductInBillList/list1'
                , toolbar: '#toolbarDemo'
                , defaultToolbar: []
                , where: { "BillType": sBillType, "HBillNo": HBillNo, "HSourceBillNo": HSourceBillNo }
                , cols: [[
                    { type: 'radio' }
                    , { field: 'HInterID', title: '单据内码', width: 120 }
                    , { field: 'HBillNo', title: '单据号', width: 150 }
                    , { field: 'HMaker', title: '制单人', width: 120 }
                    , { field: 'HMakeDate', title: '制单日期', width: 150 }
                    , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                    , { field: 'HMaterName', title: '物料名称', width: 150 }
                    , { field: 'HMaterModel', title: '规格型号', width: 150 }
                    , { field: 'HQty', title: '数量', width: 100 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                    , { field: 'HOrgID', title: '组织', width: 120 }
                ]]
                , height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
            });
        });
            })
          });
        //加载缓存列表数据
        function get_Display() {
            var ajaxLoad = layer.load();
@@ -358,6 +395,7 @@
                            data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                        }
                        col.push({ type: 'radio' });
                        for (var i = 0; i < data.length; i++) {
                            if (data[i].name == '单据内码' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列