Authored by liuyue

保存页面崩溃bug fix 封面图调用图片

... ... @@ -168,78 +168,239 @@ $('#editProductName').on('click', function() {
});
/*商品参数*/
var goodsParamArr = [];
var goodsParamEdit = new common.edit('#goodsParamWrap');
common.util.__ajax({
url: '/goods/product/queryAttributesByConfEx',
data: {
saleType: 2,
displayPosition: 3,
categoryId: basicInfo.smallSortId
// 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}
// });
console.log("productStandardRelationBoList", NETSALEDATA.productStandardRelationBoList);
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
}
}, 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();
// item.attributeValues={name:};
return common.util.__template2($("#template33").html(), item);
}
}, {
display: "备注",
name: "remark"
}],
complete: function() {
ag.__edit.init();
}
});
ag.__edit = new common.edit("#attributeTable");
$('#goodsParamWrap').html(common.util.__template2($('#goodsParamTemp').html(), {
data: data
}));
goodsParamEdit.init();
common.util.__ajax({
url: '/base/goods/queryAllProductAttr',
data: {
param: basicInfo.smallSortId,
displayPosition: 1
}
}, function(res) {
console.log(res.data);
ag.init(res.data);
}, true);
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();
/*非销售属性配置*/
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.attributeValues=item.attributeValues.split(',').map(function(elem, index, arr){
// return {name:elem}
// });
console.log("attributeProValuesBosOne", NETSALEDATA.attributeProValuesBosOne);
var attrs = NETSALEDATA.attributeProValuesBosOne;
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() {
ag2.__edit.init();
}
});
ag2.__edit = new common.edit("#attributeTable");
common.util.__ajax({
url: '/goods/product/queryAttributesByConfEx',
data: {
saleType: 2,
displayPosition: 3,
categoryId: basicInfo.smallSortId
}
}, function(res) {
console.log(res.data);
ag2.init(res.data);
}, 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;*/
if (!ag.__edit.validate(true)) {
return ag.__edit.errMessage;
}
if (!ag2.__edit.validate(true)) {
return ag.__edit.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(',')
var productStandardRelationStr = [];
if (ag.rows.length > 0) {
for (var i in ag.rows) {
if (ag.rows[i].val) {
if (ag.rows[i].inputType != "text" && ag.rows[i].inputType != "textarea") {
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
});
}
}
}
} else {
productStandardRelationStr.push({
standardId: ag.rows[i].attributeId,
standardVal: ag.rows[i].val,
parameterMakeId: ag.rows[i].id
});
data.attributeProValuesOne = JSON.stringify(goodsParamArr);
data.productSkn = $('#productSkn').val();
return data;
}
}
}
}
return JSON.stringify(productStandardRelationStr);
});
$("#propertySave").on('click', function() {
... ...
... ... @@ -285,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",
... ... @@ -294,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');
... ... @@ -315,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) {
$.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();
... ... @@ -347,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);
});
//单独保存封面
... ...
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/queryAllBySortId4Select',
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',
... ... @@ -498,6 +497,26 @@ 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',
... ...
... ... @@ -62,51 +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 btn-default btn-metro">调用图片</a>
<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>
... ...
... ... @@ -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">
... ... @@ -58,4 +60,40 @@
</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
... ...