<!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">连锁ID:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="chainId" id="chainId" 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="chainName" id="chainName" 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="storeName" id="storeName" 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="inspectionUser" id="inspectionUser" 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="taskName" id="taskName" 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="inspectionTime" id="inspectionTime" 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="inspectionProcess" id="inspectionProcess" 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="inspectionScore" id="inspectionScore" 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="inspectionStatus" id="inspectionStatus" 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="createdAt" id="createdAt" 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="updatedAt" id="updatedAt" 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 chainId = $("input[name='chainId']").val();
           var chainName = $("input[name='chainName']").val();
           var storeName = $("input[name='storeName']").val();
           var inspectionUser = $("input[name='inspectionUser']").val();
           var taskName = $("input[name='taskName']").val();
           var inspectionTime = $("input[name='inspectionTime']").val();
           var inspectionProcess = $("input[name='inspectionProcess']").val();
           var inspectionScore = $("input[name='inspectionScore']").val();
           var inspectionStatus = $("input[name='inspectionStatus']").val();
           var createdAt = $("input[name='createdAt']").val();
           var updatedAt = $("input[name='updatedAt']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "dtp/sdtpsjdcqualityinspectiontask/sDtpSjdcQualityInspectionTaskAdd",
            data : {
                "chainId": chainId,
                "chainName": chainName,
                "storeName": storeName,
                "inspectionUser": inspectionUser,
                "taskName": taskName,
                "inspectionTime": inspectionTime,
                "inspectionProcess": inspectionProcess,
                "inspectionScore": inspectionScore,
                "inspectionStatus": inspectionStatus,
                "createdAt": createdAt,
                "updatedAt": updatedAt,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
