<!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="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="productCode" id="productCode" 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="productName" id="productName" 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="specification" id="specification" 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="manufacturer" id="manufacturer" 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="genericName" id="genericName" 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="brandName" id="brandName" 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="retailPrice" id="retailPrice" 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="prohibitTransfer" id="prohibitTransfer" 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="prohibitOrder" id="prohibitOrder" 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="prohibitSale" id="prohibitSale" 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="prohibitReturnFactory" id="prohibitReturnFactory" 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="prohibitReturnWarehouse" id="prohibitReturnWarehouse" 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="prohibitDelivery" id="prohibitDelivery" 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="prohibitPurchase" id="prohibitPurchase" 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="configurationType" id="configurationType" 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="operationAttribute" id="operationAttribute" 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="salesAttribute" id="salesAttribute" 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="minimumDisplayQuantity" id="minimumDisplayQuantity" 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 storeName = $("input[name='storeName']").val();
           var productCode = $("input[name='productCode']").val();
           var productName = $("input[name='productName']").val();
           var specification = $("input[name='specification']").val();
           var manufacturer = $("input[name='manufacturer']").val();
           var genericName = $("input[name='genericName']").val();
           var brandName = $("input[name='brandName']").val();
           var retailPrice = $("input[name='retailPrice']").val();
           var prohibitTransfer = $("input[name='prohibitTransfer']").val();
           var prohibitOrder = $("input[name='prohibitOrder']").val();
           var prohibitSale = $("input[name='prohibitSale']").val();
           var prohibitReturnFactory = $("input[name='prohibitReturnFactory']").val();
           var prohibitReturnWarehouse = $("input[name='prohibitReturnWarehouse']").val();
           var prohibitDelivery = $("input[name='prohibitDelivery']").val();
           var prohibitPurchase = $("input[name='prohibitPurchase']").val();
           var configurationType = $("input[name='configurationType']").val();
           var operationAttribute = $("input[name='operationAttribute']").val();
           var salesAttribute = $("input[name='salesAttribute']").val();
           var minimumDisplayQuantity = $("input[name='minimumDisplayQuantity']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "spgl/sspglmdspstoreproductdetails/sSpglMdspStoreproductdetailsAdd",
            data : {
                "storeName": storeName,
                "productCode": productCode,
                "productName": productName,
                "specification": specification,
                "manufacturer": manufacturer,
                "genericName": genericName,
                "brandName": brandName,
                "retailPrice": retailPrice,
                "prohibitTransfer": prohibitTransfer,
                "prohibitOrder": prohibitOrder,
                "prohibitSale": prohibitSale,
                "prohibitReturnFactory": prohibitReturnFactory,
                "prohibitReturnWarehouse": prohibitReturnWarehouse,
                "prohibitDelivery": prohibitDelivery,
                "prohibitPurchase": prohibitPurchase,
                "configurationType": configurationType,
                "operationAttribute": operationAttribute,
                "salesAttribute": salesAttribute,
                "minimumDisplayQuantity": minimumDisplayQuantity,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
