123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <%@ include file="../../common/head.jsp"%>
- <link rel="stylesheet" type="text/css" href="../res/js//plugins/webuploader/webuploader.css">
- <link rel="stylesheet" type="text/css" href="../res/css/demo/webuploader-demo.css">
- <script type="text/javascript" src="../res/js/plugins/webuploader/webuploader.js"></script>
- <script type="text/javascript" src="../res/js/plugins/webuploader/uploader.js"></script>
- <script type="text/javascript" charset="utf-8" src="<%=basePath %>res/js/plugins/UEditor/ueditor.config.js"></script>
- <script type="text/javascript" charset="utf-8" src="<%=basePath %>res/js/plugins/UEditor/ueditor.all.min.js"> </script>
- <cs:initFile/>
- <script type="text/javascript">
- $(function () {
- $("#airportDiv").hide();
- $("#airwaysDiv").hide();
- });
- function dotype(type){
- if(type == 0){
- $("#airportDiv").hide();
- $("#airwaysDiv").hide();
- }else if(type == 1){
- $("#airportDiv").show();
- $("#airwaysDiv").hide();
- }else if(type ==2){
- $("#airportDiv").show();
- $("#airwaysDiv").show();
- }
- }
- function doItem(id) {
- $('#airwaysId').empty();
- $('#airwaysId').html('<option value="">--无--</option>');
- $.getJSON('../machine/getAirways.cs', {
- 'airportId': $('#airportId').val()
- }, function (data) {
- $.each(data, function (i, obj) {
- $("#airwaysId").append('<option value="' + obj.id+'">' + obj.name + '</option>');
- });
- });
- }
- </script>
- <script>
- function initUe(){
- var productImg = $("input[name='productImg']");
- var productGroupImg = $("#input[name='productGroupImg']");
- if(productImg.length > 2){
- layer.msg("主图只能有1个");
- return false;
- }
- if(productGroupImg.length > 6){
- layer.msg("组图最多5个");
- return false;
- }
- $("#newsContent").val(ue.getContent());
-
- $("#addUserForm").submit();
- return true;
- }
-
- </script>
- </head>
- <body>
- <div class="wrapper wrapper-content">
- <div class="row">
- <div class="col-sm-12">
- <cs:form_validate formId="addUserForm"/><!-- action="edit.cs" -->
- <form class="form-horizontal" id="addUserForm" method="POST" onsubmit="return false;">
- <input name="id" id="id" type="hidden" value="${mgmProduct.id }"/>
- <div class="form-group">
- <label class="col-sm-3 control-label">产品名称:</label>
- <div class="col-sm-6">
- <input id="productName" name="productName" value="${mgmProduct.productName }" readonly="readonly" class="form-control" validate="{required:true}" validateMessage="{required:'请输入名称'}" >
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label">产品型号:</label>
- <div class="col-sm-6">
- <input id="productModel" name="productModel" value="${mgmProduct.productModel }" readonly="readonly" class="form-control" validate="{required:true}" validateMessage="{required:'请输入型号'}" >
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label">产品标示:</label>
- <div class="col-sm-6">
- <input id="productRemark" name="productRemark" value="${mgmProduct.productRemark }" readonly="readonly" class="form-control" >
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label">佣金比例:</label>
- <div class="col-sm-6">
- <input id="commissionRate" name="commissionRate" value="${mgmProduct.commissionRate }" readonly="readonly" class="form-control" validate="{required:true}" validateMessage="{required:'请输入佣金比例'}" >
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label">联系电话:</label>
- <div class="col-sm-6">
- <input id="hotline" name="hotline" class="form-control" value="${mgmProduct.hotline }" readonly="readonly" validate="{required:true}" validateMessage="{required:'请输入联系电话'}" >
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label">产品价格:</label>
- <div class="col-sm-6">
- <input id="productPrice" name="productPrice" value="${mgmProduct.productPrice }" readonly="readonly" class="form-control" validate="{required:true}" validateMessage="{required:'请输入产品价格'}" >
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label">单位:</label>
- <div class="col-sm-6">
- <input id="unit" name="unit" value="${mgmProduct.unit }" class="form-control" readonly="readonly" validate="{required:true}" validateMessage="{required:'请输入单位'}" >
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label">权重:</label>
- <div class="col-sm-6">
- <input id="weight" name="weight" value="${mgmProduct.weight }" class="form-control" readonly="readonly" validate="{required:true,min:0}" validateMessage="{required:'请输入权重,内容为数字'}" >
- </div>
- </div>
-
- <div class="form-group col-sm-12">
- <div class="form-group col-sm-6">
- <label class="col-sm-4 control-label">是否推荐:</label>
- <div class="col-sm-8">
- <div class="radio i-checks">
- <label><input type="radio" name ="isHome" value="1" readonly="readonly" <c:if test="${mgmProduct.isHome == '1' }">checked="checked"</c:if>> <i></i> 是</label>
- <label><input type="radio" name="isHome" value="0" readonly="readonly" <c:if test="${mgmProduct.isHome == '0' }">checked="checked"</c:if>> <i></i> 否</label>
- </div>
- </div>
- </div>
-
- <div class="form-group col-sm-6">
- <label class="col-sm-4 control-label">是否公开:</label>
- <div class="col-sm-8">
- <select id="openFlag" name="openFlag" class="form-control">
- <option value="1" <c:if test="${mgmProduct.openFlag}">selected</c:if>>公开</option>
- <option value="0" <c:if test="${!mgmProduct.openFlag}">selected</c:if>>内部</option>
- </select>
- </div>
- </div>
- </div>
-
-
-
- <div class="form-group" style="display:none;">
- <label class="col-sm-3 control-label">上级分类:</label>
- <div class="col-sm-6">
- <select class="form-control m-b" id="gcId" name="gcId" onchange="menuChange(this)" readonly="readonly" validate="{required:true}" validateMessage="{required:'请选择分类'}">
- <option value="">请选择</option>
- <c:forEach items="${firstCategory }" var="superMenu">
- <option value="${superMenu.id }" >${superMenu.gcName}</option>
- </c:forEach>
- </select>
- </div>
- </div>
- <script type="text/javascript">
- function menuChange(obj){
- var ss = $(obj).children('option:selected').val();
- $("#tlb").css("display","none");
- $("#thlb").css("display","none");
- $("#folb").css("display","none");
- $('#dcfllb').css("display","none");
- $("#gcParentId").empty();
- $("#gcThreeId").empty();
- $("#gcFourId").empty();
- $.ajax({
- type: "get",
- url: "<%=basePath%>mgmProductCategoryCtl/nextCategory.cs",
- data: {id:ss},
- dataType: "json",
- success: function(data){
- if(data.mlist.length > 0){
- $("#tlb").css("display","block");
- $("#gcParentId").empty();
- $("#gcParentId").append("<option value='0'>请选择</option>");
- data.mlist.forEach(function(val,index,arr){
- $("#gcParentId").append("<option value='"+val.id+"'>"+ val.gcName+"</option>");
- });
- }
- if(data.type == "1"){
- $('#dcfllb').css("display","block");
- }
- }
- });
-
- }
-
- function twoMenuChange(obj){
- var ss = $(obj).children('option:selected').val();
- $("#thlb").css("display","none");
- $("#folb").css("display","none");
- $("#gcThreeId").empty();
- $("#gcFourId").empty();
- $.ajax({
- type: "get",
- url: "<%=basePath%>mgmProductCategoryCtl/nextCategory.cs",
- data: {id:ss},
- dataType: "json",
- success: function(data){
- if(data.mlist.length > 0){
- $("#thlb").css("display","block");
- $("#gcThreeId").empty();
- $("#gcThreeId").append("<option value='0'>请选择</option>");
- data.mlist.forEach(function(val,index,arr){
- $("#gcThreeId").append("<option value='"+val.id+"'>"+ val.gcName+"</option>");
- });
- }
- }
- });
-
- }
- function threeMenuChange(obj){
- var ss = $(obj).children('option:selected').val();
- $("#folb").css("display","none");
- $("#gcFourId").empty();
- $.ajax({
- type: "get",
- url: "<%=basePath%>mgmProductCategoryCtl/nextCategory.cs",
- data: {id:ss},
- dataType: "json",
- success: function(data){
- if(data.mlist.length > 0){
- $("#folb").css("display","block");
- $("#gcFourId").empty();
- $("#gcFourId").append("<option value='0'>请选择</option>");
- data.mlist.forEach(function(val,index,arr){
- $("#gcFourId").append("<option value='"+val.id+"'>"+ val.gcName+"</option>");
- });
- }
- }
- });
-
- }
- </script>
-
- <div id="tlb" class="form-group" style="display:none;">
- <label class="col-sm-3 control-label">二级分类:</label>
- <div class="col-sm-6">
- <select class="form-control m-b" id="gcParentId" name="gcParentId" readonly="readonly" onchange="twoMenuChange(this)" validate="{required:true}" validateMessage="{required:'请选择分类'}">
- <option value="0">请选择</option>
- </select>
- </div>
- </div>
-
- <div id="thlb" class="form-group" style="display:none;">
- <label class="col-sm-3 control-label">三级分类:</label>
- <div class="col-sm-6">
- <select class="form-control m-b" id="gcThreeId" name="gcThreeId" readonly="readonly" onchange="threeMenuChange(this)" validate="{required:true}" validateMessage="{required:'请选择分类'}">
- <option value="0">请选择</option>
- </select>
- </div>
- </div>
-
- <div id="folb" class="form-group" style="display:none;">
- <label class="col-sm-3 control-label">四级分类:</label>
- <div class="col-sm-6">
- <select class="form-control m-b" id="gcFourId" name="gcFourId" readonly="readonly" validate="{required:true}" validateMessage="{required:'请选择分类'}">
- <option value="0">请选择</option>
- </select>
- </div>
- </div>
-
- <!-- //地产项目分类 -->
- <div id="dcfllb" class="form-group" <c:if test="${mgmProduct.productType != '1' }">style="display:none;"</c:if>>
- <label class="col-sm-3 control-label">地产项目分类:</label>
- <div class="col-sm-6">
- <select class="form-control m-b" id="xmCode" name="xmCode" readonly="readonly" validate="{required:true}" validateMessage="{required:'请输入地产项目分类'}">
- <option value="">请选择</option>
- <c:forEach items="${diclist }" var="superMenu">
- <option value="${superMenu.code }" <c:if test="${mgmProduct.xmCode == superMenu.code }">selected</c:if>>${superMenu.name}</option>
- </c:forEach>
- </select>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label">商品主图:</label>
- <div class="col-sm-6">
- <cs:file name="productImg" type="100" url="${mgmProduct.productImg }" num="1"></cs:file>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label">商品组图:</label>
- <div class="col-sm-6">
- <cs:file name="productGroupImg" type="100" url="${mgmProduct.productGroupImg }" num="5"></cs:file>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label">产品说明:</label>
- <div class="col-sm-6">
- <div class="content">
- <!-- <script id="editor" type="text/plain" style="width:100%;height:500px;"></script>
- <script type="text/javascript">
-
- //实例化编辑器
- //建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例
- var ue = UE.getEditor('editor');
- ue.ready(function(){
- ue.setContent('${mgmProduct.productMsg }');
- });
- ue.addListener('selectionchange',function(){
- $("#productMsg").val(ue.getContent());
- console.log("选区已经变化!");
- })
- </script> -->
- ${mgmProduct.productMsg }
- <!-- <textarea rows="" cols="" id="productMsg" readonly="readonly" name="productMsg"></textarea> -->
- </div>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label">产品参数:</label>
- <div class="col-sm-6">
- <div class="content">
- <!-- <script id="editor1" type="text/plain" style="width:100%;height:500px;"></script>
- <script type="text/javascript">
-
- //实例化编辑器
- //建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例
- var ue1 = UE.getEditor('editor1');
- ue1.ready(function(){
- ue1.setContent('${mgmProduct.productAttr }');
- });
- ue1.addListener('selectionchange',function(){
- $("#productAttr").val(ue1.getContent());
- console.log("选区已经变化!");
- })
- </script> -->
- <!-- <textarea rows="" cols="" id="productAttr" style="display:none;" name="productAttr"></textarea> -->
- ${mgmProduct.productAttr }
- </div>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label">产品详情:</label>
- <div class="col-sm-6">
- <div class="content">
- <!-- <script id="editor2" type="text/plain" style="width:100%;height:500px;"></script>
- <script type="text/javascript">
-
- //实例化编辑器
- //建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例
- var ue2 = UE.getEditor('editor2');
- ue2.ready(function(){
- ue2.setContent('${mgmProduct.productBody }');
- });
- ue2.addListener('selectionchange',function(){
- $("#productBody").val(ue2.getContent());
- console.log("选区已经变化!");
- })
- </script>
- <textarea rows="" cols="" id="productBody" style="display:none;" name="productBody"></textarea> -->
- ${mgmProduct.productBody }
- </div>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label">佣金说明:</label>
- <div class="col-sm-6">
- <div class="content">
- <!-- <script id="editor3" type="text/plain" style="width:100%;height:500px;"></script>
- <script type="text/javascript">
-
- //实例化编辑器
- //建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例
- var ue3 = UE.getEditor('editor3');
- ue3.ready(function(){
- ue3.setContent('${mgmProduct.commissionRemark }');
- });
- ue3.addListener('selectionchange',function(){
- $("#commissionRemark").val(ue3.getContent());
- console.log("选区已经变化!");
- })
- </script>
- <textarea rows="" cols="" id="commissionRemark" style="display:none;" name="commissionRemark"></textarea> -->
- ${mgmProduct.commissionRemark }
- </div>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label">优惠政策:</label>
- <div class="col-sm-6">
- <div class="content">
- <!-- <script id="editor4" type="text/plain" style="width:100%;height:500px;"></script>
- <script type="text/javascript">
-
- //实例化编辑器
- //建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例
- var ue4 = UE.getEditor('editor4');
- ue4.ready(function(){
- ue4.setContent('${mgmProduct.policy }');
- });
- ue4.addListener('selectionchange',function(){
- $("#policy").val(ue4.getContent());
- console.log("选区已经变化!");
- })
- </script>
- <textarea rows="" cols="" id="policy" name=policy style="display:none;"></textarea> -->
- ${mgmProduct.policy }
- </div>
- </div>
- </div>
-
- <!-- <div class="form-group">
- <label class="col-sm-3 control-label">省:</label>
- <div class="col-sm-6">
- <select id="provinceCode" name="provinceCode" class="form-control" validate="{required:true}" validateMessage="{required:'请输入名称'}">
- <option value="" disabled selected hidden>省</option>
- </select>
-
- <input type="hidden" id="province" name="province"/>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label">市:</label>
- <div class="col-sm-6">
- <select id="cityCode" name="cityCode" class="form-control" validate="{required:true}" validateMessage="{required:'请输入名称'}">
- <option value="" disabled selected hidden>市</option>
- </select>
- <input type="hidden" id="city" name="city"/>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label">区 / 县:</label>
- <div class="col-sm-6">
- <select id="countyCode" name="countyCode" class="form-control" validate="{required:true}" validateMessage="{required:'请输入名称'}">
- <option value="" disabled selected hidden>区 / 县</option>
- </select>
- <input type="hidden" id="county" name="county"/>
- </div>
- </div> -->
-
-
- <!-- <div class="form-group">
- <div class="col-sm-4 col-sm-offset-3 pull-left">
- <button class="btn btn-default btn-dlg-close">取消</button>
- <button class="btn btn-primary" type="button" onclick="initUe();">提交</button>
- </div>
- </div> -->
-
- </form>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- <%-- $.get('<%=basePath%>area/getProvice.cs',function(data){
- for(var i in data){
- var _option = '';
- if(curProvinceCode ==data[i].code ){
- _option = '<option value="' + data[i].code + '" selected>' + data[i].name + '</option>';
- $('#province').val(data[i].name);
- }else{
- _option = '<option value="' + data[i].code + '" >' + data[i].name + '</option>';
- }
- $('#provinceCode').append(_option);
- }
- });
- if(curProvinceCode != ''){
- $.get('<%=basePath%>area/getByParentCode.cs',{'param': curProvinceCode}, function(data){
- for(var i in data){
- var _option = '<option value="' + data[i].code + '" >' + data[i].name + '</option>';
- $('#cityCode').append(_option);
- }
- });
- }
- ///省
- $("#provinceCode").change(function(){
- var self = $(this);
-
- $('#cityCode').empty();
- var _option = '<option>请选择</option>';
- $('#cityCode').append(_option);
- $('#city').val("");
-
- $('#countyCode').empty();
- var _option = '<option>请选择</option>';
- $('#countyCode').append(_option);
- $('#county').val("");
-
- $('#townshipCode').empty();
- var _option = '<option>请选择</option>';
- $('#townshipCode').append(_option);
- $('#township').val("");
-
-
-
- $.get('<%=basePath%>area/getByParentCode.cs',{'param': self.val()}, function(data){
- for(var i in data){
- var _option = '<option value="' + data[i].code + '" >' + data[i].name + '</option>';
- $('#cityCode').append(_option);
- }
- });
- $('#province').val(self.find("option:selected").text());
- });
- ///城市
- $("#cityCode").change(function(){
- var self = $(this);
- $('#countyCode').empty();
- var _option = '<option>请选择</option>';
- $('#countyCode').append(_option);
- $('#county').val("");
-
- $('#townshipCode').empty();
- var _option = '<option>请选择</option>';
- $('#townshipCode').append(_option);
- $('#township').val("");
-
-
- $.get('<%=basePath%>area/getByParentCode.cs',{'param': self.val()}, function(data){
- for(var i in data){
- var _option = '<option value="' + data[i].code + '" >' + data[i].name + '</option>';
- //if(num == 1){
- $('#countyCode').append(_option);
- // }
- }
- });
-
- $('#city').val(self.find("option:selected").text());
- });
- ///县、区
- $("#countyCode").change(function(){
- var self = $(this);
- $('#townshipCode').empty();
- var _option = '<option>请选择</option>';
- $('#townshipCode').append(_option);
- $('#township').val("");
-
-
- $.get('<%=basePath%>area/getByParentCode.cs',{'param': self.val()}, function(data){
- for(var i in data){
- var _option = '<option value="' + data[i].code + '" >' + data[i].name + '</option>';
- //if(num == 1){
- $('#townshipCode').append(_option);
- // }
- }
- });
-
- $('#county').val(self.find("option:selected").text());
- }); --%>
- </script>
- </body>
- </html>
|