WebTM/views/ÁìÁÏ·¢»õ/ÁìÁϳö¿â/Kf_MateOutBill_FastList.html
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>领料出库单缓存列表</title>
    <title>生产领料缓存列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@@ -120,7 +120,8 @@
        , layer = layui.layer
        , table = layui.table
        , form = layui.form
        , element = layui.element;
            , element = layui.element;
        var option = {};
        //清空界面  new
@@ -133,52 +134,70 @@
        //
         //退出
        form.on('submit(cmdCancel)', function () {
            parent.location.href = "../../../views/index.html"
            layer.confirm('您确定要退出吗?', { icon: 3, title: '提示' }, function (index) {
                parent.location.href = "../../../views/index.html";
            });
            //window.close();//关闭当前页
        })
         //编辑
        //编辑
        form.on('submit(cmdModify)', function () {
            var checkStatus = table.checkStatus('dj-table')
                     , data = checkStatus.data;
            //ajaxLabelData = data;
            //layer.alert(rows);
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '领料单'
                , shade: 0.6 //遮罩透明度
                , maxmin: false //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../领料发货/领料出库/Kf_MateOutBill_Fast.html?linterid=' + data[0].HInterID, 'yes']
                , resize: false
                , cancel: function () {
                    $(".layui-btn").removeClass("layui-btn-disabled");
                , data = checkStatus.data;
            $.ajax({
                type: "GET",
                url: GetWEBURL() + "/WEBSController/TempList_Modify_Json",
                async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                data: { "HInterID": data[0].HInterID, "HBillNo": data[0].HBillNo, "HBillType": 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_MateOutBill_Fast.html?OperationType=2&HInterID=' + data[0].HInterID, '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: "温馨提示" });
                    }
                },
                error: function (err) {
                    layer.msg("错误" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                }
            })
            });
        });
        // //编辑
        //form.on('submit(cmdModify)', function () {
        //    var checkStatus = table.checkStatus('dj-table')
        //             , data = checkStatus.data;
        //    //ajaxLabelData = data;
        //    //layer.alert(rows);
        //    layer.open({
        //        type: 2
        //        , area: ['100%', '100%']
        //        , title: '领料单'
        //        , shade: 0.6 //遮罩透明度
        //        , maxmin: false //允许全屏最小化
        //        , anim: 0 //0-6的动画形式,-1不开启
        //        , content: ['../../领料发货/领料出库/Kf_MateOutBill_Fast.html?linterid=' + data[0].HInterID, 'yes']
        //        , resize: false
        //        , cancel: function () {
        //            $(".layui-btn").removeClass("layui-btn-disabled");
        //        }
        //    })
        //});
        //刷新
        form.on('submit(cmdRefresh)', function () {
            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: 120 }
                    , { field: 'HBillNo', title: '单据号', width: 150 }
                    , { field: 'HMaker', title: '制单人', width: 120 }
                    , { field: 'HMakeDate', title: '制单日期', width: 150 }
                    , { field: 'HQty', title: '数量', width: 100 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                    , { field: 'HRedBlueFlag', title: '红蓝字', width: 120 }
                    , { field: 'HSourceBillType', title: '源单类型', width: 100 }
                ]]
                , height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
            }),
            //动态列-刷新缓存列表
            table.render(option),
                //刷新已上传列表
                table.render({
                    elem: '#yd-table'
                    , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json'
@@ -235,16 +254,19 @@
        form.on('submit(cmdRescind)', function () {
            var checkStatus = table.checkStatus('yd-table');
            var checkStatus2 = table.checkStatus('sy-table');
            var checkStatus3 = table.checkStatus('dj-table');
            var data = "";
            if (checkStatus.data.length != 0) {
                data = checkStatus.data;
            } else if (checkStatus2.data.length != 0) {
                data = checkStatus2.data;
            } else {
            } else if (checkStatus3.data.length != 0) {
                data = checkStatus3.data;
            }  else {
                return layer.msg("请选择一条数据");
            }
            var sInterID = data[0].HInterID
            var sBillNo = data[0].HBillNo
            var sInterID = data[0].HInterID == 'undefined' ? data[0].单据内码 : data[0].HInterID;
            var sBillNo = data[0].HBillNo == 'undefined' ? data[0].单据号 : data[0].HBillNo;
            var sBillType = '1204'
            $.ajax(
                {
@@ -285,7 +307,7 @@
            var checkStatus = table.checkStatus('dj-table')
                , data = checkStatus.data;
            if (checkStatus.data.length === 1) {
                var sInterID = data[0].HInterID;
                var sInterID = data[0].HInterID == 'undefined' ? data[0].单据内码 : data[0].HInterID;
                //逻辑删除方法
                layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                    $.ajax(
@@ -334,14 +356,14 @@
            , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
            , cols: [[
                { type: 'radio' }
                , { field: 'HInterID', title: '单据内码', width: 120 }
                , { field: 'HBillNo', title: '单据号', width: 150 }
                , { field: 'HMaker', title: '制单人', width: 120 }
                , { field: 'HMakeDate', title: '制单日期', width: 150 }
                , { field: 'HQty', title: '数量', width: 100 }
                , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                , { field: 'HRedBlueFlag', title: '红蓝字', width: 120 }
                , { field: 'HSourceBillType', title: '源单类型', width: 100 }
                , { field: '单据内码', title: '单据内码', width: 120 }
                , { field: '单据号', title: '单据号', width: 150 }
                , { field: '制单人', title: '制单人', width: 120 }
                , { field: '制单日期', title: '制单日期', width: 150 }
                , { field: '数量', title: '数量', width: 100 }
                , { field: '源单单号', title: '源单单号', width: 150 }
                , { field: '红蓝字', title: '红蓝字', width: 120 }
                , { field: '源单类型', title: '源单类型', width: 100 }
            ]]
            , height: 500
            , done: function () {
@@ -349,6 +371,8 @@
            }
        })
        //已上传列表
        table.render({
            elem: '#yd-table'