|
@@ -93,8 +93,8 @@
|
|
|
<label>商品分类:</label>
|
|
|
<select id="commodityType" class="input-small" onchange="loadBigType()">
|
|
|
<option value="">请选择</option>
|
|
|
- <option value="1">产品</option>
|
|
|
- <option value="2">仪器</option>
|
|
|
+ <option value="1" ${product.commodityType eq 1 ? 'selected' :''}>产品</option>
|
|
|
+ <option value="2" ${product.commodityType eq 2 ? 'selected' :''}>仪器</option>
|
|
|
</select>
|
|
|
<select id="bigType" class="input-small" onchange="loadSmallType()">
|
|
|
<option value="">请选择</option>
|
|
@@ -258,34 +258,7 @@
|
|
|
$this.parent().next().find("input[name='recommendProductID']").attr("checked","true");
|
|
|
});
|
|
|
});
|
|
|
- // 初始化
|
|
|
-/* var currentTinytype = ${product.tinyTypeID};
|
|
|
- var currentSmalltype, currentBigType;
|
|
|
|
|
|
- // 初始分类
|
|
|
- function loadInitType(){
|
|
|
- for(var i=0; i<tinytypeList.length; i++){
|
|
|
- if (currentTinytype == tinytypeList[i].tinyTypeID) {
|
|
|
- currentSmalltype = tinytypeList[i].smallTypeID;
|
|
|
- }
|
|
|
- }
|
|
|
- for(var i=0; i<smalltypeList.length; i++){
|
|
|
- if (currentSmalltype == smalltypeList[i].smallTypeID) {
|
|
|
- currentBigType = smalltypeList[i].bigTypeID;
|
|
|
- }
|
|
|
- }
|
|
|
- if(currentBigType != null && typeof(currentBigType) != "undefined"){
|
|
|
- loadSmallType(currentBigType, '#bigType', '#smallType', '#tinyType');
|
|
|
- setTimeout(function(){
|
|
|
- loadTinyType(currentSmalltype, '#smallType', '#tinyType');
|
|
|
- },0);
|
|
|
- setTimeout(function(){
|
|
|
- $('#tinyType').val(currentTinytype);
|
|
|
- var tinyTypeText = $('#tinyType').find('option:selected').text();
|
|
|
- $('#tinyType').prev().find('.select2-chosen').text(tinyTypeText);
|
|
|
- },500)
|
|
|
- }
|
|
|
- }*/
|
|
|
// 网站分类
|
|
|
var currentBigtype = ${product.bigTypeID};
|
|
|
var currentSmalltype = ${product.smallTypeID};
|
|
@@ -458,69 +431,6 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /*function loadSmallType(id, big, small, tiny){
|
|
|
- if(id){
|
|
|
- $(big).val(id);
|
|
|
- var text = $(big).find('option:selected').text();
|
|
|
- $(big).prev().find(".select2-chosen").text(text);
|
|
|
- }
|
|
|
- var bigType = $(big).val();
|
|
|
- if(typeof(bigType) != "undefined") {
|
|
|
- $(small).html("");
|
|
|
- $(small).prev().find(".select2-chosen").text("请选择");
|
|
|
- $(small).append("<option value=''>请选择</option>");
|
|
|
- $(tiny).html("");
|
|
|
- $(tiny).prev().find(".select2-chosen").text("请选择");
|
|
|
- $(tiny).append("<option value=''>请选择</option>");
|
|
|
- for(var i=0; i<smalltypeList.length; i++){
|
|
|
- if (bigType == smalltypeList[i].bigTypeID) {
|
|
|
- if(currentSmalltype != null && typeof(currentSmalltype) != "undefined" && currentSmalltype == smalltypeList[i].smallTypeID) {
|
|
|
- $(small).append("<option selected value='"+smalltypeList[i].smallTypeID+"'>"+smalltypeList[i].name+"</option>");
|
|
|
- $(small).prev().find(".select2-chosen").text(smalltypeList[i].name);
|
|
|
- setTimeout(function(){
|
|
|
- loadTinyType(currentSmalltype, small, tiny)
|
|
|
- },i*500);
|
|
|
- }else{
|
|
|
- $(small).append("<option value='"+smalltypeList[i].smallTypeID+"'>"+smalltypeList[i].name+"</option>");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- $(small).html("");
|
|
|
- $(small).prev().find(".select2-chosen").text("请选择");
|
|
|
- $(small).append("<option value=''>请选择</option>");
|
|
|
- $(tiny).html("");
|
|
|
- $(tiny).prev().find(".select2-chosen").text("请选择");
|
|
|
- $(tiny).append("<option value=''>请选择</option>");
|
|
|
- }
|
|
|
- }*/
|
|
|
- /*function loadTinyType(id, small, tiny){
|
|
|
- if(id){
|
|
|
- $(small).val(id);
|
|
|
- var text = $(small).find('option:selected').text();
|
|
|
- $(small).prev().find(".select2-chosen").text(text);
|
|
|
- }
|
|
|
- var smallType = $(small).find('option:selected').val();
|
|
|
- if(typeof(smallType) != "undefined") {
|
|
|
- $(tiny).html("");
|
|
|
- $(tiny).prev().find(".select2-chosen").text("请选择");
|
|
|
- $(tiny).append("<option value=''>请选择</option>");
|
|
|
- for(var i=0; i<tinytypeList.length; i++){
|
|
|
- if (smallType == tinytypeList[i].smallTypeID) {
|
|
|
- if(currentTinytype != null && typeof(currentTinytype) != "undefined" && currentTinytype == tinytypeList[i].tinyTypeID) {
|
|
|
- $(tiny).append("<option selected value='"+tinytypeList[i].tinyTypeID+"'>"+tinytypeList[i].name+"</option>");
|
|
|
- $(tiny).prev().find(".select2-chosen").text(tinytypeList[i].name);
|
|
|
- }else{
|
|
|
- $(tiny).append("<option value='"+tinytypeList[i].tinyTypeID+"'>"+tinytypeList[i].name+"</option>");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- $(tiny).html("");
|
|
|
- $(tiny).prev().find(".select2-chosen").text("请选择");
|
|
|
- $(tiny).append("<option value=''>请选择</option>");
|
|
|
- }
|
|
|
- }*/
|
|
|
function changeRecommendType(){
|
|
|
var recommendType = $("input[name='recommendType']:checked").val();
|
|
|
if (recommendType == '0') {
|