<!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="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="productCategory" id="productCategory" 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="salesAttributes" id="salesAttributes" 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="minimumPrice" id="minimumPrice" 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="productionLicenseNumber" id="productionLicenseNumber" 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="productionLicenseValidUntil" id="productionLicenseValidUntil" 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="unitOfDispensing" id="unitOfDispensing" 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="isDispensable" id="isDispensable" 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="dispensingRatio" id="dispensingRatio" 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="uniqueCode" id="uniqueCode" 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="marketingAuthorizationHolder" id="marketingAuthorizationHolder" 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="prescriptionCategory" id="prescriptionCategory" 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="prescriptionCategorySecondLevel" id="prescriptionCategorySecondLevel" 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="prescriptionCategoryThirdLevel" id="prescriptionCategoryThirdLevel" 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="approvalNumber" id="approvalNumber" 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="approvalNumberValidUntil" id="approvalNumberValidUntil" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">批准文号2:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="approvalNumberTwo" id="approvalNumberTwo" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">批准文号2有效期:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="approvalNumberTwoValidUntil" id="approvalNumberTwoValidUntil" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">批准文号3:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="approvalNumberThree" id="approvalNumberThree" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">批准文号3有效期:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="approvalNumberThreeValidUntil" id="approvalNumberThreeValidUntil" 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="registrationNumber" id="registrationNumber" 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="registrationNumberValidUntil" id="registrationNumberValidUntil" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">注册证号2:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="registrationNumberTwo" id="registrationNumberTwo" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">注册证号2有效期:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="registrationNumberTwoValidUntil" id="registrationNumberTwoValidUntil" 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 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 productCategory = $("input[name='productCategory']").val();
           var brandName = $("input[name='brandName']").val();
           var retailPrice = $("input[name='retailPrice']").val();
           var salesAttributes = $("input[name='salesAttributes']").val();
           var minimumPrice = $("input[name='minimumPrice']").val();
           var productionLicenseNumber = $("input[name='productionLicenseNumber']").val();
           var productionLicenseValidUntil = $("input[name='productionLicenseValidUntil']").val();
           var unitOfDispensing = $("input[name='unitOfDispensing']").val();
           var isDispensable = $("input[name='isDispensable']").val();
           var dispensingRatio = $("input[name='dispensingRatio']").val();
           var uniqueCode = $("input[name='uniqueCode']").val();
           var marketingAuthorizationHolder = $("input[name='marketingAuthorizationHolder']").val();
           var prescriptionCategory = $("input[name='prescriptionCategory']").val();
           var prescriptionCategorySecondLevel = $("input[name='prescriptionCategorySecondLevel']").val();
           var prescriptionCategoryThirdLevel = $("input[name='prescriptionCategoryThirdLevel']").val();
           var approvalNumber = $("input[name='approvalNumber']").val();
           var approvalNumberValidUntil = $("input[name='approvalNumberValidUntil']").val();
           var approvalNumberTwo = $("input[name='approvalNumberTwo']").val();
           var approvalNumberTwoValidUntil = $("input[name='approvalNumberTwoValidUntil']").val();
           var approvalNumberThree = $("input[name='approvalNumberThree']").val();
           var approvalNumberThreeValidUntil = $("input[name='approvalNumberThreeValidUntil']").val();
           var registrationNumber = $("input[name='registrationNumber']").val();
           var registrationNumberValidUntil = $("input[name='registrationNumberValidUntil']").val();
           var registrationNumberTwo = $("input[name='registrationNumberTwo']").val();
           var registrationNumberTwoValidUntil = $("input[name='registrationNumberTwoValidUntil']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "spgl/sspglproductdetails/sSpglProductdetailsAdd",
            data : {
                "productCode": productCode,
                "productName": productName,
                "specification": specification,
                "manufacturer": manufacturer,
                "genericName": genericName,
                "productCategory": productCategory,
                "brandName": brandName,
                "retailPrice": retailPrice,
                "salesAttributes": salesAttributes,
                "minimumPrice": minimumPrice,
                "productionLicenseNumber": productionLicenseNumber,
                "productionLicenseValidUntil": productionLicenseValidUntil,
                "unitOfDispensing": unitOfDispensing,
                "isDispensable": isDispensable,
                "dispensingRatio": dispensingRatio,
                "uniqueCode": uniqueCode,
                "marketingAuthorizationHolder": marketingAuthorizationHolder,
                "prescriptionCategory": prescriptionCategory,
                "prescriptionCategorySecondLevel": prescriptionCategorySecondLevel,
                "prescriptionCategoryThirdLevel": prescriptionCategoryThirdLevel,
                "approvalNumber": approvalNumber,
                "approvalNumberValidUntil": approvalNumberValidUntil,
                "approvalNumberTwo": approvalNumberTwo,
                "approvalNumberTwoValidUntil": approvalNumberTwoValidUntil,
                "approvalNumberThree": approvalNumberThree,
                "approvalNumberThreeValidUntil": approvalNumberThreeValidUntil,
                "registrationNumber": registrationNumber,
                "registrationNumberValidUntil": registrationNumberValidUntil,
                "registrationNumberTwo": registrationNumberTwo,
                "registrationNumberTwoValidUntil": registrationNumberTwoValidUntil,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
