<!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="taskCode" id="taskCode" 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="haitianTaskId" id="haitianTaskId" 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="inventoryType" id="inventoryType" 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="inventoryMode" id="inventoryMode" 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="storeAttribute" id="storeAttribute" 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="storeCode" id="storeCode" 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>
                            <label class="col-sm-3 control-label">完成时间:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="completionTime" id="completionTime" 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="inventoriedProducts" id="inventoriedProducts" 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="discrepancyProducts" id="discrepancyProducts" 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="inventoriedVarietyBatch" id="inventoriedVarietyBatch" 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="discrepancyVarietyBatch" id="discrepancyVarietyBatch" 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="createTime" id="createTime" 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 taskCode = $("input[name='taskCode']").val();
           var haitianTaskId = $("input[name='haitianTaskId']").val();
           var inventoryType = $("input[name='inventoryType']").val();
           var inventoryMode = $("input[name='inventoryMode']").val();
           var storeName = $("input[name='storeName']").val();
           var storeAttribute = $("input[name='storeAttribute']").val();
           var storeCode = $("input[name='storeCode']").val();
           var status = $("input[name='status']").val();
           var completionTime = $("input[name='completionTime']").val();
           var inventoriedProducts = $("input[name='inventoriedProducts']").val();
           var discrepancyProducts = $("input[name='discrepancyProducts']").val();
           var inventoriedVarietyBatch = $("input[name='inventoriedVarietyBatch']").val();
           var discrepancyVarietyBatch = $("input[name='discrepancyVarietyBatch']").val();
           var createTime = $("input[name='createTime']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skcknpdrwinventorytask/sKcKnPdrwInventorytaskAdd",
            data : {
                "taskCode": taskCode,
                "haitianTaskId": haitianTaskId,
                "inventoryType": inventoryType,
                "inventoryMode": inventoryMode,
                "storeName": storeName,
                "storeAttribute": storeAttribute,
                "storeCode": storeCode,
                "status": status,
                "completionTime": completionTime,
                "inventoriedProducts": inventoriedProducts,
                "discrepancyProducts": discrepancyProducts,
                "inventoriedVarietyBatch": inventoriedVarietyBatch,
                "discrepancyVarietyBatch": discrepancyVarietyBatch,
                "createTime": createTime,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
