Authored by weiqingting

Merge branch 'release/1.6' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into release/1.6

... ... @@ -72,7 +72,7 @@ edit.prototype = {
$("input:hidden", that.el).each(function() {
var $this = $(this);
var name = $this.attr("id"),
values = $this.val().split(/[|,]/g),//String.prototype.split.call($this.val(), '|'),
values = $this.val().split(/[|,]/g), //String.prototype.split.call($this.val(), '|'),
type = $this.attr("for");
if (type) {
... ... @@ -128,22 +128,22 @@ edit.prototype = {
/*初始化文件上传*/
if($('input[type="file"]',that.el).length>0){
$('input[type="file"]',that.el).each(function(){
var src=$(this).attr("value");
var _id=$(this).attr("id")||$(this).attr("name");
var Temp='<ul class="upload-image-list" id="img-'+_id+'">';
Temp+='<li class="fileinput-button">';
Temp+='<a class="fileinput-button-icon" href="javascript:void(0);">';
if(src){
if ($('input[type="file"]', that.el).length > 0) {
$('input[type="file"]', that.el).each(function() {
var src = $(this).attr("value");
var _id = $(this).attr("id") || $(this).attr("name");
var Temp = '<ul class="upload-image-list" id="img-' + _id + '">';
Temp += '<li class="fileinput-button">';
Temp += '<a class="fileinput-button-icon" href="javascript:void(0);">';
if (src) {
var ext = src.split('.').pop().toLowerCase();
if("mp4,rmvb,avi,mov".indexOf(ext)>-1){
Temp+='<video width="76" height="80" src="'+src+'"></video>';
}else{
Temp+='<img width="76" height="80" src="'+src+'">';
if ("mp4,rmvb,avi,mov".indexOf(ext) > -1) {
Temp += '<video width="76" height="80" src="' + src + '"></video>';
} else {
Temp += '<img width="76" height="80" src="' + src + '">';
}
}else{
Temp+='+';
} else {
Temp += '+';
}
Temp += '</a>';
Temp += '</li>';
... ... @@ -261,7 +261,7 @@ edit.prototype = {
err.push("<p>" + name + "不可为空</p>");
});
}
if ((id || name) && $(this).attr("match")&&$.trim($(this).val())) {
if ((id || name) && $(this).attr("match") && $.trim($(this).val())) {
new Validator.init($(this)[0], {
rules: {
match: $(this).attr("match")
... ... @@ -320,10 +320,10 @@ edit.prototype = {
// return false;
// }
if (err.length > 0) {
if(!isTip){
if (!isTip) {
that.__err(err.join(''));
}else{
that.errMessage=err.join('');
} else {
that.errMessage = err.join('');
}
return false;
}
... ... @@ -337,21 +337,18 @@ edit.prototype = {
});
if (zierr > 0) {
if(!isTip){
if (!isTip) {
that.__err(err.join(''));
}else{
that.errMessage=err.join('');
} else {
that.errMessage = err.join('');
}
return false;
}
return true;
},
submit: function(url, callback) {
getSubmitData: function() {
var that = this;
if (!that.validate(url?false:true)) {
return false;
}
var data = {};
$("input:text", that.el) //number
.add("input[type=number]", that.el)
... ... @@ -368,6 +365,15 @@ edit.prototype = {
var value = $(this).attr("value");
data[name] = value;
});
return data;
},
submit: function(url, callback) {
var that = this;
if (!that.validate(url ? false : true)) {
return false;
}
var data = that.getSubmitData();
var options = {
type: 'post',
... ...
... ... @@ -42,8 +42,6 @@ window.GOLABDATA = {
map[key] = listeners[i].apply(this, args);
}
}
console.log(map);
return map;
}
... ... @@ -65,7 +63,7 @@ require('./partials/basic-info');
require('./partials/editor_recommend');
require('./partials/model');
require('./partials/video.js');
require('./partials/brand-relation');
//require('./partials/brand-relation');
require('./partials/add-info');
require('./partials/netsale-ty.js');
... ... @@ -105,32 +103,37 @@ if ($('.contentpanel').data('type') == 'info') {
//保存完整网销信息
var e = new common.edit('#netsaleAllInfo');
$(document).on("click", "#saveAllInfo", function() {
var data = {};
var allData = GOLABDATA.fire();
var data = {},
errorMsg = '',
allData = GOLABDATA.fire();
console.log(allData);
$.each(allData, function(key, value) {
if (typeof value == 'string') {
data = value;
errorMsg += data;
return;
}
$.extend(data, value, true);
});
e.submit('/goods/product/saveNetSaleAllInfo', function(option) {
option.data = data;
option.success = function(res) {
res = res.data;
if (errorMsg !== '') {
common.util.__tip(errorMsg, 'warning');
} else {
common.util.__ajax({
url: '/goods/product/saveNetSaleAllInfo',
data: data
}, function(res) {
if (res.code == '200') {
e.$tip(res.message, function() {
common.util.__tip(res.message, 'success', function() {
history.go(-1);
}, 'growl-success');
});
} else {
e.$tip(res.message);
common.util.__tip(res.message);
}
return false;
}, true);
}
});
})
});
var Bll = {
... ...
... ... @@ -165,12 +165,189 @@ $.ajax({
//去编辑商品名称
$('#editProductName').on('click', function() {
$('#productName').focus();
})
});
/*商品参数*/
var goodsParamArr = [];
var goodsParamEdit = new common.edit('#goodsParamWrap');
// var goodsParamArr = [];
// var goodsParamEdit = new common.edit('#goodsParamWrap');
// common.util.__ajax({
// url: '/goods/product/queryAttributesByConfEx',
// data: {
// saleType: 2,
// displayPosition: 3,
// categoryId: basicInfo.smallSortId
// }
// }, function(res) {
// var data = res.data;
// if (NETSALEDATA.attributeProValuesBosOne) {
// $.each(NETSALEDATA.attributeProValuesBosOne, function(i, value) {
// $.each(data, function(i2, value2) {
// if (value.attributeId == value2.attributeId) {
// value2.selectedValues = value.attributeValueId.replace(/,/g, "|");
// }
// });
// });
// }
// if (res.data.length == 0) {
// $("#goodsParams-footer").hide();
// }
// $('#goodsParamWrap').html(common.util.__template2($('#goodsParamTemp').html(), {
// data: data
// }));
// goodsParamEdit.init();
// if ($('.contentpanel').data('type') == 'info') {
// $('.contentpanel').find('input').prop('disabled', true);
// $('.contentpanel').find('select').prop('disabled', true);
// $('.contentpanel').find('.btn').addClass('disabled');
// $('#goodsParamWrap').find('input').not(":checked").parents('label').hide();
// }
// }, true);
// GOLABDATA.on("TYgoodsParams", function() {
// var a = goodsParamEdit.submit(false, function(option) {
// $('.goods-param-group').each(function() {
// goodsParamArr.push({
// productSkn: $('#productSkn').val(),
// attributeId: $(this).find('[id]').attr('id'),
// attributeValueId: $(this).find('[id]').val().split('|').join(',')
// });
// });
// option.data.attributeProValuesOne = JSON.stringify(goodsParamArr);
// option.data.productSkn = $('#productSkn').val();
// option.debug = true;
// });
// return a ? a : goodsParamEdit.errMessage;
// var data = null;
// if (!goodsParamEdit.validate(true)) {
// return goodsParamEdit.errMessage;
// } else {
// data = {};
// $('.goods-param-group').each(function() {
// goodsParamArr.push({
// productSkn: $('#productSkn').val(),
// attributeId: $(this).find('[id]').attr('id'),
// attributeValueId: $(this).find('[id]').val().split('|').join(',')
// });
// });
// data.attributeProValuesOne = JSON.stringify(goodsParamArr);
// data.productSkn = $('#productSkn').val();
// return data;
// }
// });
/*陈超*/
var ag = new common.grid({
el: "#attributeTable",
columns: [{
display: "名称",
name: "attributeName",
render: function(item) {
item.required = item.isMust == "Y" ? "required" : "";
var arr = [];
arr.push(item.attributeName);
if (item.required) {
arr.push("<span class='red'>*</span>");
}
return arr.join('');
}
}, {
display: "属性",
render: function(item) {
item.required = item.isMust == "Y" ? "required" : "";
// item.attributeValues=item.attributeValues.split(',').map(function(elem, index, arr){
// return {name:elem}
// });
var attrs = NETSALEDATA.productStandardRelationBoList;
if (attrs) {
for (var i in attrs) {
if (attrs[i].standardId == item.attributeId) {
item.val = attrs[i].standardVal;
item.__val = attrs[i].parameterMakeId;
}
}
}
// item.attributeValues={name:};
return common.util.__template2($("#template33").html(), item);
}
}, {
display: "备注",
name: "remark"
}],
complete: function() {
ag.__edit.init();
}
});
ag.__edit = new common.edit("#attributeTable");
common.util.__ajax({
url: '/base/goods/queryAllProductAttr',
data: {
param: basicInfo.smallSortId,
displayPosition: 1
}
}, function(res) {
ag.init(res.data);
}, true);
/*马力*/
console.log("attributeProValuesBosOne", NETSALEDATA.attributeProValuesBosOne);
var ag2 = new common.grid({
el: "#goodsParamWrap",
columns: [{
display: "名称",
name: "attributeName",
render: function(item) {
item.required = item.isMust == "Y" ? "required" : "";
var arr = [];
arr.push(item.attributeName);
if (item.required) {
arr.push("<span class='red'>*</span>");
}
return arr.join('');
}
}, {
display: "属性",
render: function(item) {
item.required = item.isMust == "Y" ? "required" : "";
item.id = item.parameterMakeId;
// item.attributeValues=item.attributeValues.split(',').map(function(elem, index, arr){
// return {name:elem}
// });
var attrs = NETSALEDATA.attributeProValuesBosOne;
if (attrs) {
for (var i in attrs) {
if (attrs[i].attributeId == item.attributeId) {
item.val = attrs[i].standardVal;
item.__val = attrs[i].attributeValueId.replace(/,/g, '|');
}
}
}
// item.attributeValues={name:};
return common.util.__template2($("#template33").html(), item);
}
}, {
display: "备注",
name: "remark"
}],
complete: function() {
ag2.__edit.init();
}
});
ag2.__edit = new common.edit("#goodsParamWrap");
common.util.__ajax({
url: '/goods/product/queryAttributesByConfEx',
data: {
... ... @@ -179,56 +356,80 @@ common.util.__ajax({
categoryId: basicInfo.smallSortId
}
}, function(res) {
var data = res.data;
if (NETSALEDATA.attributeProValuesBosOne) {
$.each(NETSALEDATA.attributeProValuesBosOne, function(i, value) {
$.each(data, function(i2, value2) {
if (value.attributeId == value2.attributeId) {
value2.selectedValues = value.attributeValueId.replace(/,/g, "|");
}
});
});
}
console.log("res.data", res.data);
ag2.init(res.data);
}, true);
if (res.data.length == 0) {
$("#goodsParams-footer").hide();
}
$(document).on("change", "#goodsParamWrap .attr_input", function() {
var item = ag2.rows[$(this).data("index")];
item.val = $(this).val();
});
$(document).on("change", "#goodsParamWrap .attr_checkobx_class", function() {
var item = ag2.rows[$(this).data("index")];
item.val = $("#attr_" + $(this).data("index")).val().replace(/\|/g, ',');
})
$(document).on("change", "#attributeTable .attr_input", function() {
var item = ag.rows[$(this).data("index")];
item.val = $(this).val();
});
$('#goodsParamWrap').html(common.util.__template2($('#goodsParamTemp').html(), {
data: data
}));
goodsParamEdit.init();
if ($('.contentpanel').data('type') == 'info') {
$('.contentpanel').find('input').prop('disabled', true);
$('.contentpanel').find('select').prop('disabled', true);
$('.contentpanel').find('.btn').addClass('disabled');
$('#goodsParamWrap').find('input').not(":checked").parents('label').hide();
/*保存*/
GOLABDATA.on("TYgoodsParams", function() {
var data = {};
if (!ag.__edit.validate(true)) {
return ag.__edit.errMessage;
}
if (!ag2.__edit.validate(true)) {
return ag.__edit.errMessage;
}
var productStandardRelationStr = [];
if (ag.rows.length > 0) {
for (var i in ag.rows) {
if (ag.rows[i].val) {
var arr = ag.rows[i].val.split('|');
var idNameList = ag.rows[i].idNameList;
for (var x in idNameList) {
for (var y in arr) {
if (arr[y] == idNameList[x].id) {
productStandardRelationStr.push({
standardId: ag.rows[i].attributeId,
standardVal: idNameList[x].text,
parameterMakeId: idNameList[x].id
});
}
}
}
}
}
}
data.productStandardRelationStr = JSON.stringify(productStandardRelationStr);
}, true);
var goodsParamArr = [];
if (ag2.rows.length > 0) {
for (var i in ag2.rows) {
if (ag2.rows[i].val) {
GOLABDATA.on("TYcaizhi", function() {
var a = goodsParamEdit.submit(false, function(option) {
$('.goods-param-group').each(function() {
goodsParamArr.push({
attributeId: ag2.rows[i].attributeId,
productSkn: $('#productSkn').val(),
attributeId: $(this).find(':hidden').attr('id'),
attributeValueId: $(this).find(':hidden').val().split('|').join(',')
});
attributeValueId: ag2.rows[i].val
});
option.data.attributeProValuesOne = JSON.stringify(goodsParamArr);
option.data.productSkn = $('#productSkn').val();
option.debug = true;
});
return a ? a : goodsParamEdit.errMessage;
}
}
}
data.attributeProValuesOne = JSON.stringify(goodsParamArr);
data.productSkn = $('#productSkn').val();
console.log(data);
return data;
});
$("#propertySave").on('click', function() {
common.util.__ajax({
url: '/netSale/saveProductParam',
data: GOLABDATA.fire('TYcaizhi')
data: GOLABDATA.fire('TYgoodsParams')
}, function() {});
});
\ No newline at end of file
... ...
... ... @@ -174,20 +174,14 @@ $('#saveBasicInfo').on('click', function() {
});
GOLABDATA.on("LYbasicInfo", function() {
/*return e.submit('', function(option) {
var list = option.data.sellChannels.split('|').join(',');
option.data.productSkn = $('#productSkn').val();
option.data.sellChannels = list;
option.data.shopIds = $('#shopIds').val() ? $('#shopIds').val().split('|').join(',') : '';
option.debug = true;
});*/
var data = {};
var data = null;
if (!e.validate(true)) {
return e.errMessage;
} else {
data = e.getSubmitData();
data.productSkn = $('#productSkn').val();
$('#basicInfoWrap').find('input').each(function() {
var key = $(this).attr('id');
if (key) {
data[key] = $(this).val().split('|').join(',');
}
});
data.sellChannels = data.sellChannels.split('|').join(',');
data.shopIds = data.shopIds ? data.shopIds.split('|').join(',') : '';
return data;
}
});
\ No newline at end of file
... ...
... ... @@ -14,71 +14,87 @@ if (window.NETSALEDATA && window.NETSALEDATA.baseProductInfo && window.NETSALEDA
productSkn = window.NETSALEDATA.baseProductInfo.baseProduct.productSkn;
}
window.UMdescriptioner = UM.getEditor('edit-descriptioner');
/*商品描述*/
var descriptionEdit = new common.edit('#descriptionerWrap');
window.UMdescriptioner = UM.getEditor('edit-descriptioner');
descriptionEdit.init();
if (window.NETSALEDATA && window.NETSALEDATA.productExtBo.productDesc && window.NETSALEDATA.productExtBo.productDesc) {
UMdescriptioner.setContent(window.NETSALEDATA.productExtBo.productDesc)
}
};
GOLABDATA.on("LYproductDesc", function() {
var data = null;
$('#productDesc').val(UMdescriptioner.getContent());
if (!descriptionEdit.validate(true)) {
return descriptionEdit.errMessage;
} else {
data = descriptionEdit.getSubmitData();
data.productSkn = $('#productSkn').val();
return data;
}
});
$(document).on("click", "#btn-descriptioner", function() {
common.util.__ajax({
url: '/netSale/saveProductDesc',
data: {
"productSkn": productSkn,
"productDesc": UMdescriptioner.getContent()
$('#productDesc').val(UMdescriptioner.getContent());
descriptionEdit.submit('/netSale/saveProductDesc', function(option) {
option.data = GOLABDATA.fire('LYproductDesc');
option.success = function(res) {
res = res.data;
if (res.code == '200') {
descriptionEdit.$tip(res.message, function() {}, 'growl-success');
} else {
descriptionEdit.$tip(res.message);
}
}, function(res) {
console.log(res);
});
return false;
}
});
});
/*小编推荐*/
var recommendEdit = new common.edit('#recommenderWrap');
window.UMrecommender = UM.getEditor('edit-recommender');
recommendEdit.init();
if (window.NETSALEDATA && window.NETSALEDATA.productExtBo && window.NETSALEDATA.productExtBo.recommend) {
UMrecommender.setContent(window.NETSALEDATA.productExtBo.recommend);
}
};
$(document).on("click", "#btn-recommand", function() {
common.util.__ajax({
url: '/netSale/saveNetSaleRecommend',
data: {
"productSkn": productSkn,
"recommend": UMrecommender.getContent()
GOLABDATA.on("LYrecommend", function() {
var data = null;
$('#recommend').val(UMrecommender.getContent());
if (!recommendEdit.validate(true)) {
return recommendEdit.errMessage;
} else {
data = recommendEdit.getSubmitData();
data.productSkn = $('#productSkn').val();
return data;
}
}, function(res) {
console.log(res);
});
return false;
});
GOLABDATA.on("bianjiqi", function() {
/*if (UMdescriptioner.getContent() != '') {
return {
recommend: UMrecommender.getContent(),
productDesc: UMdescriptioner.getContent()
}
$(document).on("click", "#btn-recommand", function() {
recommendEdit.submit('/netSale/saveNetSaleRecommend', function(option) {
option.data = GOLABDATA.fire('LYrecommend');
option.success = function(res) {
res = res.data;
if (res.code == '200') {
recommendEdit.$tip(res.message, function() {}, 'growl-success');
} else {
common.util.__tip('商品描述不可为空', 'warning');
return;
recommendEdit.$tip(res.message);
}
*/
$('#productDesc').val(UMdescriptioner.getContent());
return {
recommend: UMrecommender.getContent(),
productDesc: $('#productDesc').val()
return false;
}
});
});
if (editType == 'info') {
window.UMrecommender.setDisabled('fullscreen');
window.UMdescriptioner.setDisabled('fullscreen');
}
/*逛*/
/*关联逛*/
common.util.__ajax({
url: '/goods/article/queryArticlesBySKN',
data: {
... ... @@ -91,7 +107,6 @@ common.util.__ajax({
}, true);
/*搭配*/
var g = new common.grid({
el: "#dapeiTable",
hash: false,
... ... @@ -270,6 +285,31 @@ $("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), {
goodsList: goodsList
}));
/*
* 添加封面
* @param {index} goodsList[index]
* {src} 图片地址
* @return {data} 添加的图片数据
*/
function addFengmian(index, src) {
var item = goodsList[index].goodsImagesList || [];
var len = item ? item.length : 1;
var data = {
"angle": 0,
"genderCover": 0,
"imageUrl": src,
"orderBy": len,
"productSkc": goodsList[index].productSkc,
"productSkn": goodsList[index].productSkn,
"__index": len,
"index": index
};
item.push(data);
goodsList[index].goodsImagesList = item;
return data;
}
//添加封面图
common.edit.ajaxfileupload(".fenmianfile", {
params: {
__type: "upload",
... ... @@ -279,20 +319,7 @@ common.edit.ajaxfileupload(".fenmianfile", {
onComplete: function(response) {
console.log(response);
if (response.status && response.code == 200) {
var item = goodsList[$(this).data("index")].goodsImagesList || [];
var len = item ? item.length : 1;
var data = {
"angle": 0,
"genderCover": 0,
"imageUrl": response.data,
"orderBy": len,
"productSkc": goodsList[$(this).data("index")].productSkc,
"productSkn": goodsList[$(this).data("index")].productSkn,
"__index": len,
"index": $(this).data("index")
};
item.push(data);
goodsList[$(this).data("index")].goodsImagesList = item;
var data = addFengmian($(this).data("index"), response.data);
$(this).parents(".cover-image-item").before(common.util.__template2($("#fenmianImgTemp").html(), data));
} else {
common.util.__tip(response.message, 'warning');
... ... @@ -300,7 +327,44 @@ common.edit.ajaxfileupload(".fenmianfile", {
}
});
//颜色封面点击事件
//封面调用图片
var uesImgDialog = null;
$(document).on('click', '.btn-use-img', function() {
var productSkc = $(this).data('productSkc'),
index = $(this).data("index");
common.util.__ajax({
url: '/goods/productPhoto/queryProductPhotoList',
data: {
productSkn: $('#productSkn').val(),
productSkc: productSkc
}
}, function(res) {
var data = res.data;
var imgHtml = '';
if (res.code == 200 && data.list instanceof Array && data.list[0].pictureBoList instanceof Array) {
$.each(data.list[0].pictureBoList, function(i, value) {
imgHtml += '<img class="use-img" src="' + value.fileName + '" alt="" width="100" height="140" data-index="' + index + '" style="cursor:pointer;margin: 0 0 10px 10px;" />';
});
uesImgDialog = common.dialog.open({
title: '调用图片',
content: imgHtml
});
} else {
common.util.__tip('没有可调用的图片', 'warning');
}
}, true);
});
//点击调用的图片添加封面图
$(document).on('click', '.use-img', function() {
var data = addFengmian($(this).data("index"), $(this).attr("src"));
$('.cover-image-list[data-index="' + $(this).data("index") + '"]').find(".cover-image-item:last").before(common.util.__template2($("#fenmianImgTemp").html(), data));
uesImgDialog.close();
});
//设置颜色封面
$('.cover-image-list').on("click", ".btn-metro", function() {
var index = $(this).parents(".cover-image-list").data("index");
var index1 = $(this).parents(".cover-image-item").index();
... ... @@ -332,26 +396,25 @@ $('.cover-image-list').on("click", ".btn-metro", function() {
item.isDefault = isDefault;
});
//商品封面点击事件
$(document).on("click", ".cover-goods a", function() {
//设置商品封面
$(document).on("click", ".cover-goods .btn-goods-cover", function() {
var index = $(this).data("index");
var item = goodsList[index];
if ($(this).hasClass("info")) {
$(this).removeClass("info");
} else {
$('.cover-goods a').removeClass("info");
$('.cover-goods .btn-goods-cover').removeClass("info");
$(this).addClass("info");
}
item.isDefault = $(this).hasClass("info") ? "Y" : "N";
});
//封面图删除
//删除封面图
$(document).on('click', '.remove-item-btn', function() {
var index = $(this).parents(".cover-image-list").data("index");
var index1 = $(this).parents(".cover-image-item").index();
$(this).parents('.cover-image-item').remove();
goodsList[index].goodsImagesList.splice(index1, 1);
console.log(goodsList[index].goodsImagesList);
});
//单独保存封面
... ... @@ -371,7 +434,8 @@ $(document).on("click", "#fenMainSave", function() {
GOLABDATA.on("fenmian", function() {
var map = {
goodsImagesBoList: []
};
},
errorMsg = '';
$.each(goodsList, function(index, item) {
if (item.isDefault == "Y") {
... ... @@ -380,7 +444,7 @@ GOLABDATA.on("fenmian", function() {
}
if (!item.goodsImagesList || item.goodsImagesList == 0) {
common.util.__tip('请设置skc:' + item.productSkc + '的封面', 'warning');
errorMsg += '<p>请设置skc:' + item.productSkc + '的封面</p>';
return;
}
$.each(item.goodsImagesList, function(_index, _item) {
... ... @@ -388,10 +452,14 @@ GOLABDATA.on("fenmian", function() {
map.goodsImagesBoList.push(_item);
});
});
if (map.goodsImagesBoList.length == 0) return;
//if (map.goodsImagesBoList.length == 0) return;
map.goodsImagesBoList = JSON.stringify(map.goodsImagesBoList);
if (errorMsg === '') {
return {
"goodsImagesReq": JSON.stringify(map)
}
} else {
return errorMsg;
}
});
\ No newline at end of file
... ...
... ... @@ -17,10 +17,10 @@ var config = {
// domain:'http://172.16.6.240:8088/platform',// 王书生
// domain: 'http://172.16.6.124:8088/platform',//陈超
//http://172.16.6.124:8088/platform/product/queryAllProductAttr
//domain: 'http://172.16.6.227:8088/platform', //玛丽
domain: 'http://172.16.6.227:8088/platform', //玛丽
// domain: 'http://192.168.102.202:8088/platform',
//domain:'http://172.16.9.8:8080/yohobuy-platform-web',//葛超
domain: 'http://192.168.102.202:8088/platform',
// domain: 'http://192.168.102.202:8088/platform',
//domain: 'http://172.16.6.239:8080', //孙杰翔
loggers: {
api: {
... ...
exports.domain =require('../config/common.js').domain;
exports.domain = require('../config/common.js').domain;
// exports.domain="http://172.16.6.240:8088/platform";
// exports.domain = "http://172.16.6.227:8088/platform";
exports.res = [
{//基础商品列表
route:'/supplier/baseproduct/index',
method:'GET',
view:'pages/basegoods/index',
exports.res = [{ //基础商品列表
route: '/supplier/baseproduct/index',
method: 'GET',
view: 'pages/basegoods/index',
src: '/basegoods/index',
data:{
iscreate:true
data: {
iscreate: true
}
},
{
// 列表头部各个审核状态的数量
route:'/base/goods/ajax/auditCount',
method:'POST',
url:'/product/getbaseProductCountByStatus',
params:[
{name: 'supplierId',type:'Number'},
{name: 'productSkn',type: 'Number'},
{name: 'productName',type: 'String'},
{name: 'founder',type:'Number'},
{name: 'shopId',type: 'Number'},
{name: 'brandId',type: 'Number'},
route: '/base/goods/ajax/auditCount',
method: 'POST',
url: '/product/getbaseProductCountByStatus',
params: [{
name: 'supplierId',
type: 'Number'
}, {
name: 'productSkn',
type: 'Number'
}, {
name: 'productName',
type: 'String'
}, {
name: 'founder',
type: 'Number'
}, {
name: 'shopId',
type: 'Number'
}, {
name: 'brandId',
type: 'Number'
},
{name: 'isOutLets',type:'String'},
{name: 'isAdvance',type:'String'},
{
name: 'isOutLets',
type: 'String'
}, {
name: 'isAdvance',
type: 'String'
},
{name: 'gender',type:'String'},
{name: 'isJit',type:'String'},
{
name: 'gender',
type: 'String'
}, {
name: 'isJit',
type: 'String'
},
{name: 'maxSortId',type:'Number'},
{name: 'middleSortId',type: 'Number'},
{name: 'smallSortId',type: 'Number'},
{name: 'sortId',type: 'Number'},
{
name: 'maxSortId',
type: 'Number'
}, {
name: 'middleSortId',
type: 'Number'
}, {
name: 'smallSortId',
type: 'Number'
}, {
name: 'sortId',
type: 'Number'
},
{name: 'page',type: 'Number'},
{name: 'size',type: 'Number'},
{name: 'supplierId',type:'Number'},
{name: 'isAuditing',type:'Number'},
{name:'founderName',type:'String'}
{
name: 'page',
type: 'Number'
}, {
name: 'size',
type: 'Number'
}, {
name: 'supplierId',
type: 'Number'
}, {
name: 'isAuditing',
type: 'Number'
}, {
name: 'founderName',
type: 'String'
}
]
},
{//ajax列表数据
route:'/base/goods/ajax/index',
method:'POST',
url:'/product/getBaseProductList',
params:[
{ //ajax列表数据
route: '/base/goods/ajax/index',
method: 'POST',
url: '/product/getBaseProductList',
params: [
{name: 'supplierId',type:'Number'},
{name: 'productSkn',type: 'Number'},
{name: 'productName',type: 'String'},
{name: 'founder',type:'Number'},
{name: 'shopId',type: 'Number'},
{name: 'brandId',type: 'Number'},
{
name: 'supplierId',
type: 'Number'
}, {
name: 'productSkn',
type: 'Number'
}, {
name: 'productName',
type: 'String'
}, {
name: 'founder',
type: 'Number'
}, {
name: 'shopId',
type: 'Number'
}, {
name: 'brandId',
type: 'Number'
},
{name: 'isOutLets',type:'String'},
{name: 'isAdvance',type:'String'},
{
name: 'isOutLets',
type: 'String'
}, {
name: 'isAdvance',
type: 'String'
},
{name: 'gender',type:'String'},
{name: 'isJit',type:'String'},
{
name: 'gender',
type: 'String'
}, {
name: 'isJit',
type: 'String'
},
{name: 'maxSortId',type:'Number'},
{name: 'middleSortId',type: 'Number'},
{name: 'smallSortId',type: 'Number'},
{name: 'sortId',type: 'Number'},
{
name: 'maxSortId',
type: 'Number'
}, {
name: 'middleSortId',
type: 'Number'
}, {
name: 'smallSortId',
type: 'Number'
}, {
name: 'sortId',
type: 'Number'
},
{name: 'page',type: 'Number'},
{name: 'size',type: 'Number'},
{name: 'supplierId',type:'Number'},
{name: 'isAuditing',type:'Number'},
{name:'founderName',type:'String'}
{
name: 'page',
type: 'Number'
}, {
name: 'size',
type: 'Number'
}, {
name: 'supplierId',
type: 'Number'
}, {
name: 'isAuditing',
type: 'Number'
}, {
name: 'founderName',
type: 'String'
}
]
}, { //添加页面
route: '/base/goods/add',
method: 'GET',
view: 'pages/basegoods/edit',
url: '/productColor/queryProductColors',
data: {
pageTitle: "创建基础商品",
action: "/base/goods/ajax/add"
},
{//添加页面
route:'/base/goods/add',
method:'GET',
view:'pages/basegoods/edit',
url:'/productColor/queryProductColors',
data:{
pageTitle:"创建基础商品",
action:"/base/goods/ajax/add"
},
src:'/basegoods/edit'
},
{//添加接口
route:'/base/goods/ajax/add',
method:'POST',
url:'/product/addBaseProduct',
params:[
src: '/basegoods/edit'
}, { //添加接口
route: '/base/goods/ajax/add',
method: 'POST',
url: '/product/addBaseProduct',
params: [
{name:'ageLevel',type:'String'},
{name: 'attribute',type: 'Number'},
{name:'factoryCode',type:'String'},
{name:'gender',type:'String'},
{name:'goodsSeason',type:'Number'},
{name:'goodsYears',type:'Number'},
{name:'grade',type:'Number'},
{name:'isLimitbuy',type:'String'},
{name:'isLimited',type:'String'},
{name:'isPromotionalGifts',type:'String'},
{name:'productName',type:'String'},
{name:'productTag',type:'String'},
{name:'retailPriceStr',type:'String'},
{name:'salesPriceStr',type:'String'},
{name:'expectShelfTimeStr',type:'String'},
{name:'expectArrivalTimeStr',type:'String'},
{
name: 'ageLevel',
type: 'String'
}, {
name: 'attribute',
type: 'Number'
}, {
name: 'factoryCode',
type: 'String'
}, {
name: 'gender',
type: 'String'
}, {
name: 'goodsSeason',
type: 'Number'
}, {
name: 'goodsYears',
type: 'Number'
}, {
name: 'grade',
type: 'Number'
}, {
name: 'isLimitbuy',
type: 'String'
}, {
name: 'isLimited',
type: 'String'
}, {
name: 'isPromotionalGifts',
type: 'String'
}, {
name: 'productName',
type: 'String'
}, {
name: 'productTag',
type: 'String'
}, {
name: 'retailPriceStr',
type: 'String'
}, {
name: 'salesPriceStr',
type: 'String'
}, {
name: 'expectShelfTimeStr',
type: 'String'
}, {
name: 'expectArrivalTimeStr',
type: 'String'
},
{name: 'baseGoodInfoStr',type: 'String'},
{
name: 'baseGoodInfoStr',
type: 'String'
},
{name:'shopId',type:'Number'},
{name:'brandId',type:'Number'},
{name:'supplierId',type:'Number'},
{
name: 'shopId',
type: 'Number'
}, {
name: 'brandId',
type: 'Number'
}, {
name: 'supplierId',
type: 'Number'
},
{name:'maxSortId',type:'Number'},
{name:'middleSortId',type:'Number'},
{name:'smallSortId',type:'Number'},
{name:'productStandardRelationStr',type:'String'}
]
},
{//修改页面
route:'/base/goods/update/:productSkn',
method:'GET',
view:'pages/basegoods/edit',
url:'/productColor/queryProductColors',
src:'/basegoods/edit',
data:{
pageTitle:"修改基础商品",
action:"/base/goods/ajax/update"
{
name: 'maxSortId',
type: 'Number'
}, {
name: 'middleSortId',
type: 'Number'
}, {
name: 'smallSortId',
type: 'Number'
}, {
name: 'productStandardRelationStr',
type: 'String'
}
},
{//删除
route:'/base/goods/ajax/delete',
method:'POST',
url:'/product/deleteBaseProduct',
params:[
{name:'productSkn',type:'Number'},
{name:'isAuditing',type:'String'}
]
}, { //修改页面
route: '/base/goods/update/:productSkn',
method: 'GET',
view: 'pages/basegoods/edit',
url: '/productColor/queryProductColors',
src: '/basegoods/edit',
data: {
pageTitle: "修改基础商品",
action: "/base/goods/ajax/update"
}
}, { //删除
route: '/base/goods/ajax/delete',
method: 'POST',
url: '/product/deleteBaseProduct',
params: [{
name: 'productSkn',
type: 'Number'
}, {
name: 'isAuditing',
type: 'String'
}]
}, { //修改接口
route: '/base/goods/ajax/update',
method: 'POST',
url: '/product/updateBaseProduct',
params: [{
name: 'productSkn',
type: 'Number'
}, {
name: 'ageLevel',
type: 'String'
}, {
name: 'attribute',
type: 'Number'
}, {
name: 'factoryCode',
type: 'String'
}, {
name: 'gender',
type: 'String'
}, {
name: 'goodsSeason',
type: 'Number'
}, {
name: 'goodsYears',
type: 'Number'
}, {
name: 'grade',
type: 'Number'
}, {
name: 'isLimitbuy',
type: 'String'
}, {
name: 'isLimited',
type: 'String'
}, {
name: 'isPromotionalGifts',
type: 'String'
}, {
name: 'productName',
type: 'String'
}, {
name: 'productTag',
type: 'String'
}, {
name: 'retailPriceStr',
type: 'String'
}, {
name: 'salesPriceStr',
type: 'String'
}, {
name: 'expectShelfTimeStr',
type: 'String'
}, {
name: 'expectArrivalTimeStr',
type: 'String'
},
{//修改接口
route:'/base/goods/ajax/update',
method:'POST',
url:'/product/updateBaseProduct',
params:[
{name:'productSkn',type:'Number'},
{name:'ageLevel',type:'String'},
{name: 'attribute',type: 'Number'},
{name:'factoryCode',type:'String'},
{name:'gender',type:'String'},
{name:'goodsSeason',type:'Number'},
{name:'goodsYears',type:'Number'},
{name:'grade',type:'Number'},
{name:'isLimitbuy',type:'String'},
{name:'isLimited',type:'String'},
{name:'isPromotionalGifts',type:'String'},
{name:'productName',type:'String'},
{name:'productTag',type:'String'},
{name:'retailPriceStr',type:'String'},
{name:'salesPriceStr',type:'String'},
{name:'expectShelfTimeStr',type:'String'},
{name:'expectArrivalTimeStr',type:'String'},
{name: 'baseGoodInfoStr',type: 'String'},
{
name: 'baseGoodInfoStr',
type: 'String'
},
{name:'shopId',type:'Number'},
{name:'brandId',type:'Number'},
{name:'supplierId',type:'Number'},
{
name: 'shopId',
type: 'Number'
}, {
name: 'brandId',
type: 'Number'
}, {
name: 'supplierId',
type: 'Number'
},
{name:'maxSortId',type:'Number'},
{name:'middleSortId',type:'Number'},
{name:'smallSortId',type:'Number'},
{
name: 'maxSortId',
type: 'Number'
}, {
name: 'middleSortId',
type: 'Number'
}, {
name: 'smallSortId',
type: 'Number'
},
{name:'seasons',type:'String'},
{name:'isOutLets',type:'String'},
{name:'isOutLets',type:'String'},
{name:'isAdvance',type:'String'},
{name:'isVip',type:'String'},
{name:'vipSetting',type:'String'},
{name:'stock',type:'Number'},
{name:'isAuditing',type:'Number'},
{name:'productStandardRelationStr',type:'String'}
{
name: 'seasons',
type: 'String'
}, {
name: 'isOutLets',
type: 'String'
}, {
name: 'isOutLets',
type: 'String'
}, {
name: 'isAdvance',
type: 'String'
}, {
name: 'isVip',
type: 'String'
}, {
name: 'vipSetting',
type: 'String'
}, {
name: 'stock',
type: 'Number'
}, {
name: 'isAuditing',
type: 'Number'
}, {
name: 'productStandardRelationStr',
type: 'String'
}
]
},
// {
... ... @@ -234,91 +438,102 @@ exports.res = [
// {name:'stock',type:'Number'}
// ]
// },
{//基础商品详情空页面
route:'/base/goods/info/:productSkn',
method:'GET',
view:'pages/basegoods/info',
src:'/basegoods/goodsInfo'
{ //基础商品详情空页面
route: '/base/goods/info/:productSkn',
method: 'GET',
view: 'pages/basegoods/info',
src: '/basegoods/goodsInfo'
},
{
// 获取商品详情数据
route:'/base/goods/getData',
method:'POST',
url:'/product/getBaseProduct',
params:[
{name:'productSkn',type:'Number'},
]
},
{//获取颜色
route:'/base/goods/queryProductColors',
method:'POST',
url:'/productColor/queryProductColors'
},
{
route: '/base/goods/getData',
method: 'POST',
url: '/product/getBaseProduct',
params: [{
name: 'productSkn',
type: 'Number'
}, ]
}, { //获取颜色
route: '/base/goods/queryProductColors',
method: 'POST',
url: '/productColor/queryProductColors'
}, {
// 通过
route:'/base/goods/pass',
method:'POST',
url:'/product/batchAuditPassBaseProduct',
params:[
{name:'productSknList',type:'String'},
]
},{
route: '/base/goods/pass',
method: 'POST',
url: '/product/batchAuditPassBaseProduct',
params: [{
name: 'productSknList',
type: 'String'
}, ]
}, {
// 驳回
route:'/base/goods/reject',
method:'POST',
url:'/product/batchAuditRejectBaseProduct',
params:[
{name:'productSknList',type:'String'},
{name:'rejectReason',type:"String"}
]
},{
route:'/base/goods/queryAllProductAttr',
method:'POST',
url:'/product/queryAllProductAttr',
params:[
{name:'categoryId',type:'Number'},
// 1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数
{name:'displayPosition',type:'Number'}
]
},{
route:'/goods/query/querySortBySmallSort',
method:'POST',
url:'/product/querySortBySmallSort',
params:[
{name:"brandId",type:"Number"},
{name:"sortId",type:"Number"},
{name:"supplierId",type:"Number"}
]
route: '/base/goods/reject',
method: 'POST',
url: '/product/batchAuditRejectBaseProduct',
params: [{
name: 'productSknList',
type: 'String'
}, {
name: 'rejectReason',
type: "String"
}]
}, {
route: '/base/goods/queryAllProductAttr',
method: 'POST',
url: '/standard/queryAllBySortId4Html',
params: [{
name: 'param',
type: 'Number'
},
// 1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数
{
route:'/goods/piliang/batch',
method:'GET',
view:'pages/basegoods/batch',
src:'/basegoods/batch',
data:{
pageTitle:"批量功能",
secondTitle:"基础商品",
name: 'displayPosition',
type: 'Number'
}
]
}, {
route: '/goods/query/querySortBySmallSort',
method: 'POST',
url: '/product/querySortBySmallSort',
params: [{
name: "brandId",
type: "Number"
}, {
name: "sortId",
type: "Number"
}, {
name: "supplierId",
type: "Number"
}]
}, {
route: '/goods/piliang/batch',
method: 'GET',
view: 'pages/basegoods/batch',
src: '/basegoods/batch',
data: {
pageTitle: "批量功能",
secondTitle: "基础商品",
domain: exports.domain
}
},
{
route:'/goods/base/batch',
method:'GET',
view:'pages/basegoods/basebatch',
src:'/basegoods/batch',
data:{
pageTitle:"基础商品导入",
secondTitle:"基础商品",
}, {
route: '/goods/base/batch',
method: 'GET',
view: 'pages/basegoods/basebatch',
src: '/basegoods/batch',
data: {
pageTitle: "基础商品导入",
secondTitle: "基础商品",
domain: exports.domain
}
},
{
route:'/goods/base/checkSkuBarCodeExist',
method:'POST',
url:'/product/checkSkuBarCodeExist',
params:[
{name:"barCode",type:"String"}
]
}, {
route: '/goods/base/checkSkuBarCodeExist',
method: 'POST',
url: '/product/checkSkuBarCodeExist',
params: [{
name: "barCode",
type: "String"
}]
}
];
\ No newline at end of file
... ...
... ... @@ -245,9 +245,8 @@ exports.res = [{
action: 'audit'
}
},
{
}, {
//网销信息 -> 查询网销详情
route: '/goods/netsale/getdata',
method: 'POST',
url: '/product/getNetSaleInfo',
... ... @@ -332,6 +331,9 @@ exports.res = [{
}, {
name: 'goodsImagesReq',
type: 'string'
}, {
name: 'productStandardRelationStr',
type: 'string'
}]
}, {
//网销信息 -> 保存基本信息接口
... ... @@ -498,6 +500,27 @@ exports.res = [{
type: 'number'
}]
}, {
//网销信息 -> 调用图片
route: '/goods/productPhoto/queryProductPhotoList',
method: 'POST',
url: '/productPhoto/queryProductPhotoList',
params: [{
name: 'productSkn',
type: 'number'
}, {
name: 'productSkc',
type: 'number'
}, {
name: 'productSku',
type: 'number'
}, {
name: 'startTime',
type: 'number'
}, {
name: 'endTime',
type: 'number'
}]
}, {
//价格管理 -> 代销变价页面渲染
route: '/goods/pricechange/index',
method: 'GET',
... ...
... ... @@ -79,5 +79,8 @@ exports.res = [{
}, {
name: 'attributeProValuesOne',
type: 'string'
}, {
name: 'productStandardRelationStr',
type: 'string'
}]
}];
\ No newline at end of file
... ...
... ... @@ -56,7 +56,7 @@
{{> netsale/add_info}}
{{> netsale/editor_recommend}}
{{> netsale/model}}
{{> netsale/brand_relation}}
<!-- {{> netsale/brand_relation}} -->
{{> netsale/close_match}}
</div>
</div>
... ... @@ -91,7 +91,7 @@
<a href="javascript:;">上架后补全</a>
<ul class="sub-floatnav">
<li name="position10"><a href="javascript:;">模特</a></li>
<li name="position11"><a href="javascript:;">品牌关联</a></li>
<!-- <li name="position11"><a href="javascript:;">品牌关联</a></li> -->
<li name="position12"><a href="javascript:;">小编推荐</a></li>
<li name="position13"><a href="javascript:;">搭配</a></li>
</ul>
... ...
... ... @@ -7,8 +7,9 @@
</div>
<h2 class="panel-title">小编推荐</h2>
</div>
<div class="panel-body nopadding">
<div id="recommenderWrap" class="panel-body nopadding">
<script id="edit-recommender" type="text/plain" style="width:100%;height:500px;"></script>
<input id="recommend" type="hidden">
<p>
<span class="red">提示:与商品相关的逛信息自动抓取到下列各模块中,若要在商品详情中展示,请将其编辑在【小编推荐】中。
</span>
... ...
... ... @@ -62,50 +62,21 @@
</li>
</ul>
</div>
<!-- <div class="form-group">
<div class="col-sm-2">
<div class="height40">颜色封面:</div>
</div>
<div class="col-sm-10">
<div class="cover-color col-sm-12">
[[each item.goodsImagesList as _item _index]]
<div class="cover-color-box height40">
[[if _item.isDefault=="Y"]]
<a href="javascript:;" class="btn btn-default btn-metro info">默认</a>
[[else]]
<a href="javascript:;" class="btn btn-default btn-metro">默认</a>
[[/if]]
[[if _item.genderCover==1]]
<a href="javascript:;" class="btn btn-default btn-metro info">男封</a>
[[else]]
<a href="javascript:;" class="btn btn-default btn-metro">男封</a>
[[/if]]
[[if _item.genderCover==2]]
<a href="javascript:;" class="btn btn-default btn-metro info">女封</a>
[[else]]
<a href="javascript:;" class="btn btn-default btn-metro">女封</a>
[[/if]]
</div>
[[/each]]
</div>
</div>
</div> -->
<div class="form-group">
<div class="fm-side col-sm-2">商品封面:</div>
<div class="cover-goods col-sm-10">
[[if item.isDefault=="Y"]]
<a href="javascript:;" class="btn btn-default btn-metro info" data-index=[[index]]>设置默认</a>
<a href="javascript:;" class="btn-goods-cover btn btn-default btn-metro info" data-index=[[index]]>设置默认</a>
[[else]]
<a href="javascript:;" class="btn btn-default btn-metro" data-index=[[index]]>设置默认</a>
<a href="javascript:;" class="btn-goods-cover btn btn-default btn-metro" data-index=[[index]]>设置默认</a>
[[/if]]
<a href="javascript:;" class="btn-use-img btn btn-default btn-metro" data-productSkc="[[item.productSkc]]" data-index="[[index]]">调用图片</a>
</div>
</div>
[[/each]]
</script>
<script type="text/template" id="fenmianImgTemp">
<li class="cover-image-item fileinput-button" data-index=[[_index]]>
<li class="cover-image-item fileinput-button" data-index=[[__index]]>
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);"><img src="[[imageUrl]]"></a>
<i class="remove-item-btn glyphicon glyphicon-remove-circle"></i>
... ...
... ... @@ -7,12 +7,12 @@
</div>
<h2 class="panel-title">商品描述</h2>
</div>
<div class="panel-body nopadding">
<div id="descriptionerWrap" class="panel-body nopadding">
<script id="edit-descriptioner" type="text/plain" style="width:100%;height:500px;"></script>
<input id="productDesc" type="hidden" required placeholder="商品描述">
</div>
<div class="panel-footer">
<input type="hidden" id="productDesc" required placeholder="商品描述">
<button class="btn btn-primary" id="btn-descriptioner">保存描述</button>
<a href="javascript:;" class="btn btn-primary" id="btn-descriptioner">保存描述</a>
</div>
</form>
</div>
\ No newline at end of file
... ...
... ... @@ -8,6 +8,8 @@
</div>
<div id="goodsParamWrap" class="panel-body nopadding">
</div>
<div id="attributeTable" class="panel-body nopadding">
</div>
<div class="panel-footer" id="goodsParams-footer">
<a href="javascript:;" class="btn btn-primary" id="propertySave">保存</a>
</div>
... ... @@ -34,7 +36,7 @@
<input type="hidden" id="washTips" value="{washTips}" for="checkbox">
</script> -->
<script type="text/template" id="goodsParamTemp">
<!-- <script type="text/template" id="goodsParamTemp">
[[each data as b index]]
[[if b.idNameList && b.idNameList.length>0]]
<div class="goods-param-group form-group">
... ... @@ -53,9 +55,45 @@
<label style="cursor: pointer;"><input name="[[b.attributeId]]" type="[[b.inputType]]" value="[[c.id]]">[[c.text]]</label>
[[/each]]
</span>
<input id="[[b.attributeId]]" type="hidden" for="[[b.inputType]]" value="[[b.selectedValues||'']]">
<input id="[[b.attributeId]]" type="hidden" for="[[b.inputType]]" value="[[b.selectedValues||'']]" placeholder="[[b.attributeName]]" required>
[[/if]]
</div>
[[/if]]
[[/each]]
</script> -->
<script type="text/template" id="template33">
<div class="form-group">
[[if inputType=='checkbox']]
[[each idNameList as item index ]]
<label class="radio-inline">
<input type="checkbox" name="attr_[[__index]]" data-index=[[__index]] class="attr_checkobx_class" value="[[item.id]]">[[item.text]]</label>
[[/each]]
<input type="hidden" id="attr_[[__index]]" value="[[__val||'']]" [[required]] for="checkbox" placeholder="[[attributeName]]"/>
[[/if]]
[[if inputType=='radio']]
[[each idNameList as item index ]]
<label class="radio-inline">
<input type="radio" name="attr_[[__index]]" data-index=[[__index]] class="attr_input" value="[[item.id]]">[[item.text]]</label>
[[/each]]
<input type="hidden" id="attr_[[__index]]" data-index='[[__index]]' value="[[__val||'']]" [[required]] for="radio" placeholder="[[attributeName]]" />
[[/if]]
[[if inputType=='select']]
<select class="form-control attr_input" style="width: 280px" data-index='[[__index]]' value="[[__val||'']]" [[required]]>
<option value="">请选择[[attributeName]]</option>
[[each idNameList as item index ]]
<option value="[[item.id]]">[[item.text]]</option>
[[/each]]
</select>
[[/if]]
[[if inputType=='text']]
<input type="text" class="form-control attr_input" style="width: 280px" data-index='[[__index]]' value="[[val||'']]" [[required]] maxlength='[[maxValueLen]]' placeholder="[[attributeName]]"/>
[[/if]]
[[if inputType=='textarea']]
<textarea class="form-control attr_input" data-index='[[__index]]' [[required]] maxlength='[[maxValueLen]]' placeholder="[[attributeName]]">[[val||'']]</textarea>
[[/if]]
</div>
</script>
\ No newline at end of file
... ...