@using Common;
@model string
<div class="main">
    <form method="post" class="form-horizontal form form-inline ui-validForm" action="@Url.Action()">
        <div class="control-group">
            <label class="control-label">收件公司</label>
            <div class="controls">
                <input type="text" name="reveiver_company" id="reveiver_company" data-validate="dataType:'*" class="form-control" nullMsg:'请填写收件公司!" />
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">收件人</label>
            <div class="controls">
                <input type="text" name="reveiver_name" id="reveiver_name" data-validate="dataType:'*" class="form-control" nullMsg:'请填写收件人!" />
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">收件地址</label>
            <div class="controls">
                <input type="text" name="reveiver_address" id="reveiver_address" data-validate="dataType:'*" class="form-control" nullMsg:'请填写收件地址!" />
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">邮政编码</label>
            <div class="controls">
                <input type="text" name="reveiver_postcode" id="reveiver_postcode" maxlength="30" data-validate="dataType:'n" class="form-control" nullMsg:'请填写邮政编码!" />
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">电话号码</label>
            <div class="controls">
                <input type="text" name="reveiver_phone" id="reveiver_phone" maxlength="30" data-validate="dataType:'n" class="form-control" nullMsg:'请填写电话号码!" />
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">发票抬头</label>
            <div class="controls">
                <input type="text" name="header" id="header" data-validate="dataType:'*" class="form-control" nullMsg:'请填写发票抬头!" />
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label radio">发票类型</label>
            <div class="controls">
                <label class="radio-inline">
                    <input type="radio" name="thetype" id="thetype" checked value="0">普通发票
                </label>
                <label class="radio-inline">
                    <input type="radio" name="thetype" id="thetype" value="1">增值税发票
                </label>
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label radio">发件方式</label>
            <div class="controls">
                <label class="radio-inline">
                    <input type="radio" name="send_way" id="send_way" checked value="0">快递
                </label>
                <label class="radio-inline">
                    <input type="radio" name="send_way" id="send_way" value="1">自己取件
                </label>
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">备注</label>
            <div class="controls">
                <textarea type="password" name="remark" id="remark" style="height:80px;width:100%;" class="form-control"></textarea>
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label radio">发票状态</label>
            <div class="controls">
                <label class="radio-inline">
                    <input type="radio" name="state" id="state" checked value="0">提交中
                </label>
                <label class="radio-inline">
                    <input type="radio" name="state" id="state" value="1">已确定
                </label>
                <label class="radio-inline">
                    <input type="radio" name="state" id="state" value="2">已寄出
                </label>
                <label class="radio-inline">
                    <input type="radio" name="state" id="state" value="3">已收到
                </label>
                <label class="radio-inline">
                    <input type="radio" name="state" id="state" value="-1">已退回
                </label>
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group express_number">
            <label class="control-label">快递号</label>
            <div class="controls">
                <input type="text" maxlength="30" name="express_number" style="width:250px;" id="express_number" data-validate="dataType:'n" class="form-control" nullMsg:'请填写快递号!"/>
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group express_str">
            <label class="control-label">快递公司</label>
            <div class="controls">
                <input type="text" name="express_str" style="width:250px;" id="express_str" data-validate="dataType:'*" class="form-control" nullMsg:'请填写快递公司!" />
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group invoice_number">
            <label class="control-label">快递费</label>
            <div class="controls">
                <input type="text" maxlength="30" name="amount" style="width:250px;" id="amount" data-validate="dataType:'n" class="form-control" nullMsg:'请填写快递费!" />
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group invoice_number">
            <label class="control-label">发票号</label>
            <div class="controls">
                <input type="text" maxlength="30" name="invoice_number" style="width:250px;" id="invoice_number" data-validate="dataType:'n" class="form-control" nullMsg:'请填写发票号!"/>
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group content">
            <label class="control-label">备注</label>
            <div class="controls">
                <textarea type="password" name="content" id="content" style="height:80px;width:100%;" class="form-control"></textarea>
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label"></label>
            <div class="controls">
                <input type="hidden" name="id" id="id" value="{id}" />
                <input type="hidden" name="username" id="username" value="@PA.GetCurrentUser().UserName"/>
                <button type="button" class="btn btn-primary btn-sm ui-pagePost" id="bt_submit" data-custom-params="url:'@Url.Action()',callBack:'PostRefreshBack'">提交</button>
                <button type="button" class="btn btn-default btn-sm ui-closeDialog">关闭</button>
                <span class="help-block"></span>
            </div>
        </div>
    </form>
<script>
    //绑定数据
    var id =Request("id");
    if (id != "")
    {
        var data = @Html.Raw(Model??"null");
        $(".form").FormBind(data);
    }
</script>
</div>