@model string
<div class="current-location">
    <ul>
        <li class="left"><i class="glyphicon glyphicon-home"></i><a href="javascript:void(0)" onclick="location.href=location.href">财务操作</a></li>
        <li class="right"><a href="javascript:void(0)" onclick="LoadData()" title="刷新"><span class="glyphicon glyphicon-refresh"></span></a></li>
    </ul>
</div>
<div class="main">
    <form method="post" name="pa_member" target="post_iframe" id="fm_member" class="form-horizontal form form-inline form-group-sm ui-validForm" action="@Url.Action()">
        <div class="control-group">
            <label class="control-label">操作类型</label>
            <div class="controls">
                <label class="radio-inline">
                    <input type="radio" name="operationtype" id="operationtype" class="ui-show-hide" showobjs=".remittance,.rkmoney" hideobjs=".kkmoney,.fkmoney,.cost,.deductions,.backreason" checked value="0"/>入款
                </label>
                <label class="radio-inline">
                    <input type="radio" name="operationtype" id="operationtype" class="ui-show-hide" showobjs=".cost,.deductions,.kkmoney" hideobjs=".rkmoney,.fkmoney,.remittance,.backreason" value="1"/>扣款
                </label>
                <label class="radio-inline">
                    <input type="radio" name="operationtype" id="operationtype" class="ui-show-hide" showobjs=".backreason,.fkmoney" hideobjs=".kkmoney,.rkmoney,.remittance,.cost,.deductions" value="2"/>返款
                </label>
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group username">
            <label class="control-label">用户名</label>
            <div class="controls form-inline form-group-sm">
                <input type="text" name="username" id="username" style="max-width:600px;" data-validate="dataType:'*" nullMsg:'请填写用户名!" class="form-control" />
                <div class="btn-group btn-group-sm">
                    <a href="javascript:void(0)" class="btn btn-default btn-sm ui-dialog" data-custom-params="title:'选择用户',url:'@Url.Action("Select","Member")?objid=username',width:'800px',height:'90%',target:'_self'">选择用户</a>
                </div>
                <span class="help-block username_s">多个用户之间用半角逗号隔开</span>
            </div>
        </div>
        <div class="control-group rkmoney">
            <label class="control-label">入款金额</label>
            <div class="controls">
                <input type="text" name="fnc_rkze" id="fnc_rkze" data-validate="dataType:'zs|xs" datatype_1="zs|xs" nullMsg:'请填写入款金额!" style="width:100px;" class="form-control"/>
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group kkmoney">
            <label class="control-label">扣款金额</label>
            <div class="controls">
                <input type="text" name="fnc_xfze" id="fnc_xfze" data-validate="dataType:'zs|xs" datatype_1="zs|xs" nullMsg:'请填写扣款金额!" style="width:100px;" class="form-control"/>
                <span class="help-block fnc_xfze_s"></span>
            </div>
        </div>
        <div class="control-group fkmoney">
            <label class="control-label">返款金额</label>
            <div class="controls">
                <input type="text" name="fnc_fkze" id="fnc_fkze" data-validate="dataType:'zs|xs" datatype_1="zs|xs" nullMsg:'请填写返款金额!" style="width:100px;" class="form-control"/>
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group cost">
            <label class="control-label">本次成本</label>
            <div class="controls">
                <input type="text" name="cost" id="cost" class="form-control" style="width:100px;"/>
                <span class="help-block">用于准确计算实际利润</span>
            </div>
        </div>
        <div class="control-group deductions">
            <label class="control-label">扣除事由</label>
            <div class="controls">
                <input type="text" name="deductions" id="deductions" data-validate="dataType:'*" datatype_1="*" nullMsg:'请填写扣除事由!" class="form-control" style="width:300px;"/>
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group backreason">
            <label class="control-label">返款事由</label>
            <div class="controls">
                <select name="backreason" id="backreason" style="width:100px" class="form-control">
                    <option value="返点">返点</option>
                    <option value="奖励">奖励</option>
                    <option value="优惠">优惠</option>
                    <option value="其他">其他</option>
                </select>
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group remittance">
            <label class="control-label">汇款方式</label>
            <div class="controls">
                <select name="remittance" id="remittance" data-validate="dataType:'*" nullMsg:'请选择汇款方式!" style="width:200px" class="form-control">
                    <option value="建设银行">建设银行</option>
                    <option value="邮政汇款">邮政汇款</option>
                    <option value="工商银行">工商银行</option>
                    <option value="中国银行">中国银行</option>
                    <option value="农业银行">农业银行</option>
                    <option value="招商银行">招商银行</option>
                    <option value="交通银行">交通银行</option>
                    <option value="在线支付">在线支付</option>
                    <option value="公司帐号">公司帐号</option>
                    <option value="现金支付">现金支付</option>
                    <option value="其它方式">其它方式</option>
                </select>
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">操作日期</label>
            <div class="controls">
                <input type="text" name="date" value="@DateTime.Now" id="date" class="form-control laydate-icon" style="width:200px" onclick="laydate({istime:true,format:'YYYY-MM-DD hh:mm:ss'})">
                <span class="help-block"></span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">备注</label>
            <div class="controls">
                <textarea type="text" name="beizhu" id="beizhu" class="form-control" style="height:80px;"></textarea>
                <span class="help-block" id="description"></span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label"></label>
            <div class="controls">
                <button type="button" class="btn btn-primary btn-sm ui-pagePost" id="bt_submit" data-custom-params="url:'@Url.Action("Operation")',failCallBack:'failCallBackFun'">提交</button>
                <span class="help-block"></span>
            </div>
        </div>
    </form>
</div>
<script>
    function failCallBackFun(data) {
        $(".username_s").text(data.Msg).css({ "color": "red" });
    }
    $(function () {
        $.Datatype.xs = /(^\+?|^\d?)\d*\.\d+$/;
        $.Datatype.zs = /(^-?|^\+?|\d)\d+$/;
        $("input[name='operationtype']").each(function (i) {
            $("input[name='operationtype']").eq(i).click(function () { $(".username_s").text("多个用户之间用半角逗号隔开").removeAttr("style"); })
        })
    })
</script>