<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('合约提成发放失败明细新增')" />
    <th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-role-add">
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <!--is-required 增加星号 显示为必填-->
                            <label class="col-sm-3 control-label">提成来源:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="commissionSource" id="commissionSource" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">奖励类型:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="rewardType" id="rewardType" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">发生时间:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="occurrenceTime" id="occurrenceTime" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">订单号:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="orderNumber" id="orderNumber" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">连锁:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="chain" id="chain" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">门店:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="store" id="store" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">券码:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="couponCode" id="couponCode" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">店员工号:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="staffCode" id="staffCode" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">店员ID:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="staffId" id="staffId" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">店员姓名:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="staffName" id="staffName" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">合约ID:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="contractId" id="contractId" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">合约单ID:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="contractOrderNumber" id="contractOrderNumber" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">状态:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="status" id="status" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                </div>
            </div>

        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">

    function submitHandler() {
        if ($.validate.form()) {
            add();
        }
    }

    function add() {
           var commissionSource = $("input[name='commissionSource']").val();
           var rewardType = $("input[name='rewardType']").val();
           var occurrenceTime = $("input[name='occurrenceTime']").val();
           var orderNumber = $("input[name='orderNumber']").val();
           var chain = $("input[name='chain']").val();
           var store = $("input[name='store']").val();
           var couponCode = $("input[name='couponCode']").val();
           var staffCode = $("input[name='staffCode']").val();
           var staffId = $("input[name='staffId']").val();
           var staffName = $("input[name='staffName']").val();
           var contractId = $("input[name='contractId']").val();
           var contractOrderNumber = $("input[name='contractOrderNumber']").val();
           var status = $("input[name='status']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "jkgl/sjkglcommissionrewardinfo/sJkglCommissionrewardinfoAdd",
            data : {
                "commissionSource": commissionSource,
                "rewardType": rewardType,
                "occurrenceTime": occurrenceTime,
                "orderNumber": orderNumber,
                "chain": chain,
                "store": store,
                "couponCode": couponCode,
                "staffCode": staffCode,
                "staffId": staffId,
                "staffName": staffName,
                "contractId": contractId,
                "contractOrderNumber": contractOrderNumber,
                "status": status,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
