WebTM/views/ÑéÊÕÈë¿â/ÆäËûÈë¿â/Kf_OtherInBill_FastList.html
@@ -125,6 +125,7 @@
        var sBillType = '1203';
        var col = [];
        var option = {}
        //动态加载源单类型列表 new
        //加载源单类型
@@ -141,20 +142,21 @@
                , 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 }
                    , { field: '单据内码', title: '单据内码', width: 80 }
                    , { field: '单据号', title: '单据号', width: 80 }
                    , { field: '制单人', title: '制单人', width: 100 }
                    , { field: '制单日期', title: '制单日期', width: 100 }
                    , { field: '数量', title: '数量', width: 100, totalRow: true}
                    , { field: '源单单号', title: '源单单号', width: 100 }
                    , { field: '红蓝字', title: '红蓝字', width: 100 }
                    , { field: '源单类型', title: '源单类型', width: 100 }
                ]]
                , height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
            })
            table.render(option);
            //已上传列表
            table.render({
                elem: '#yd-table'
@@ -173,7 +175,7 @@
                    , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                    , { field: 'HMaterName', title: '物料名称', width: 150 }
                    , { field: 'HMaterModel', title: '规格型号', width: 150 }
                    , { field: 'HQty', title: '数量', width: 100 }
                    , { field: 'HQty', title: '数量', width: 100, totalRow: true}
                    , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                    , { field: 'HOrgID', title: '组织', width: 120 }
                ]]
@@ -195,7 +197,7 @@
                    , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                    , { field: 'HMaterName', title: '物料名称', width: 150 }
                    , { field: 'HMaterModel', title: '规格型号', width: 150 }
                    , { field: 'HQty', title: '数量', width: 100 }
                    , { field: 'HQty', title: '数量', width: 100, totalRow: true }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                    , { field: 'HOrgID', title: '组织', width: 120 }
                ]]
@@ -204,8 +206,10 @@
        }
        //退出
        form.on('submit(Cancel)', function () {
            parent.location.href = "../../../views/index.html"
        form.on('submit(cmdCancel)', function () {
            layer.confirm('您确定要退出吗?', { icon: 3, title: '提示' }, function (index) {
                parent.location.href = "../../../views/index_Mobile.html"
            });
            //window.close();//关闭当前页
        })
        //编辑
@@ -238,16 +242,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 = '1203'
            $.ajax(
                {
@@ -274,7 +281,7 @@
                    error: function (err) {
                        layer.msg('错误' + err, {
                            icon: 5,
                            time: 20000
                            time: 2000
                        }, function () {
                            //do something
                        });
@@ -289,7 +296,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(
@@ -368,7 +375,7 @@
                    , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                    , { field: 'HMaterName', title: '物料名称', width: 150 }
                    , { field: 'HMaterModel', title: '规格型号', width: 150 }
                    , { field: 'HQty', title: '数量', width: 100 }
                    , { field: 'HQty', title: '数量', width: 100, totalRow: true }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                    , { field: 'HOrgID', title: '组织', width: 120 }
                ]]
@@ -395,6 +402,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列
@@ -405,23 +413,33 @@
                                    case 'DateTime':
                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
                                        break;
                                    case 'long':
                                    case 'Int32':
                                    case 'Int64':
                                    case 'double':
                                    case 'Decimal':
                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120, totalRow: true });
                                        break;
                                    default:
                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
                                }
                            }
                        }
                        //动态显示列名
                        table.render({
                        option = {
                            elem: '#dj-table'
                            , cols: [col]
                            , data: data1.data
                            , height: 550
                            , page: true
                            , totalRow: true
                            , cellMinWidth: 90
                            , limit: 50
                            , limits: [50, 500, 5000, 20000]
                        });
                        };
                        //动态显示列名
                        table.render(option);
                        layer.close(ajaxLoad);
                        //layer.alert("查询成功", { icon: 1 });
@@ -435,7 +453,7 @@
                }
            });
        }
        //刷新明细页签
        table.render({
            elem: '#mx-table'