Git.Storage.Web/Theme/customer/Storage/Git.Storage.Measure.js

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。


var Measure = {
    PageClick: function (pageIndex, pageSize) {
        pageSize = pageSize == undefined ? 10 : pageSize;
        var name = $("#txtMeasure").val();
        var param = {};
        param["PageIndex"] = pageIndex;
        param["PageSize"] = pageSize;
        param["name"] = name;
        $.gitAjax({
            url: "/Storage/MeasureAjax/GetMeasure",
            data: param,
            type: "post",
            dataType: "json",
            success: function (result) {
                var json = JSON.parse(result.List);
                var Html = "";
                if (json != undefined && json.length > 0) {
                    $(json).each(function (i, item) {
                        Html += "<tr class=\"odd gradeX\">";
                        Html += "<td>" + (i + 1) + "</td>";
                        Html += "<td>" + item.MeasureNum + "</td>";
                        Html += "<td>" + item.MeasureName + "</td>";
                        Html += "<td>";
                        
                        Html += "<a class=\"icon-edit\" href=\"javascript:void(0)\" onclick=\"Measure.Create('" + item.MeasureNum + "','" + item.MeasureName + "')\" title=\"编辑\"></a>&nbsp;&nbsp;";
                        Html += "<a class=\"icon-remove\" href=\"javascript:void(0)\" onclick=\"Measure.Delete('" + item.MeasureNum + "')\" title=\"删除\"></a>";
                        Html += "</td>";
                        Html += "</tr>";
                    });
                }
                $("#tabInfo tbody").html(Html);
                $("#mypager").pager({ pagenumber: pageIndex, recordCount: result.RowCount, pageSize: pageSize, buttonClickCallback: Measure.PageClick });
            }
        });
    },
    Create: function (Num, Name) {
        var submit = function (v, h, f) {
            if (v == true) {
                var Num = h.find("#txtNum").val();
                var Name = h.find("#txtName").val();
                if (git.IsEmpty(Name)) {
                    $.jBox.tip("请输入计量单位名称", "warn");
                    return false;
                }
                var param = {};
                param["Num"] = Num;
                param["Name"] = Name;
                $.gitAjax({
                    url: "/Storage/MeasureAjax/Create",
                    data: param,
                    type: "post",
                    dataType: "json",
                    success: function (result) {
                        if (git.IsEmpty(Num)) {
                            if (result.Key == "1000") {
                                Measure.PageClick(1,10);
                                $.jBox.tip("添加成功", "success");
                            } else {
                                $.jBox.tip("添加失败", "error");
后面还有 42 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。