metroui

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <link href="/static/css/metro.css" rel="stylesheet">
    <link href="/static/css/metro-icons.css" rel="stylesheet">
    <link href="/static/css/metro-responsive.css" rel="stylesheet">
    <link href="/static/css/datatables/autoFill.dataTables.min.css" rel="stylesheet">
    <link href="/static/css/datatables/buttons.dataTables.min.css" rel="stylesheet">
    <link href="/static/css/datatables/select.dataTables.min.css" rel="stylesheet">
    <script src="/static/css/site.css"></script>

    <script src="/static/js/jquery.min.js"></script>
    <script src="/static/js/metro.js"></script>
    <script src="/static/js/datatables/jquery.dataTables.min.js"></script>
    <script src="/static/js/datatables/dataTables.buttons.min.js"></script>
    <script src="/static/js/datatables/buttons.flash.min.js"></script>
    <script src="/static/js/datatables/jszip.min.js"></script>
    <script src="/static/js/datatables/pdfmake.min.js"></script>
    <script src="/static/js/datatables/vfs_fonts.js"></script>
    <script src="/static/js/datatables/buttons.html5.min.js"></script>
    <script src="/static/js/datatables/buttons.print.min.js"></script>
    <script src="/static/js/datatables/dataTables.select.min.js"></script>
    <script src="/static/js/knockout.js"></script>
    <script src="/static/js/jquery.tmpl.min.js"></script>
    <script src="/static/js/select2.min.js"></script>
    <script src="/static/js/site.js"></script>
    <script src="/static/js/usp.js"></script>
</head>

<body>

<h2>corpAdd <button id="btnBack" data-bind="click: usp.admin.corp.add.goBack" class="button place-right primary"><span class="mif-keyboard-return "></span></button></h2>
<hr class="thin bg-grayLighter">
<form data-role="validator" data-hint-mode="hint" data-on-submit="return usp.admin.corp.add.save()">
    <div class="grid">
        <div class="row cells2">
            <div class="cell">
                <label>公司名称</label>
                <div class="input-control text full-size">
                    <input type="text" data-bind="value:Name" data-validate-func="required" data-validate-hint-position="top" data-validate-hint="不能为空!" />
                    <span class="input-state-error mif-warning"></span>
                    <span class="input-state-success mif-checkmark"></span>
                </div>
            </div>
            <div class="cell">
                <label>Parent</label>
                <div class="input-control text full-size">
                    <input type="text" data-bind="value:Type" data-validate-func="required" data-validate-hint-position="top" data-validate-hint="不能为空!" />
                    <span class="input-state-error mif-warning"></span>
                    <span class="input-state-success mif-checkmark"></span>
                </div>
            </div>
        </div>

    </div>
    <button data-bind='click:usp.admin.corp.add.save' class="button place-right primary">保存</button>
</form>
<script src="/static/js/usp.admin.corp.add.js"></script>
<script>
    $(function() {
        usp.init()
        usp.admin.corp.add.init()
    })
</script>

</body>
</html>
html
(function() {
    usp.namespace("usp.admin.corp.add");
    usp.admin.corp.add.viewModel = {
        Name: ko.observable(""),
        Type: ko.observable(""),
        adminLoginName: ko.observable(""),
        adminPassWord: ko.observable(""),
    };
    usp.admin.corp.add.init = function() {
        ko.applyBindings(usp.admin.corp.add.viewModel);
    };
    usp.admin.corp.add.goBack = function() {
        window.location.href = "/admin/Corp/List"
    };
    usp.admin.corp.add.save = function() {
        $.ajax({
            url: "Add",
            data: ko.toJS(usp.admin.corp.add.viewModel),
            async: false,
            success: function(data) {
                if (data.status) {
                    usp.Notify('系统信息', '保存成功', 'success')
                    usp.admin.corp.add.goBack()
                } else {
                    usp.Notify('系统信息', data.info, 'alert')
                }
            }
        })
        return false;
    }
})(this);
usp.admin.corp.add.js

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值