Authored by dongjunjie

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

... ... @@ -29,10 +29,14 @@ function batchExport(el, type) {
__type: "batch-import"
},
onStart: function(params) {
params.brandId=common.util.__input("brandId");
params.shopId=common.util.__input("shopId");
params.supplierId=common.util.__input("supplierId");
params.brandName=params.brandId?$("#brandId").find("option[value="+$("#brandId").val()+"]").text():"";
params.shopsName=params.shopId?$("#shopId").find("option[value="+$("#shopId").val()+"]").text():"";
params.supplierName=params.supplierId?$("#supplierId").find("option[value="+$("#supplierId").val()+"]").text():"";
console.log("params",params);
loadModal = common.dialog.load();
... ... @@ -40,6 +44,7 @@ function batchExport(el, type) {
},
onComplete: function(response) {
console.log(response);
$("#message").html('');
if (loadModal) {
loadModal.close();
}
... ... @@ -49,11 +54,10 @@ function batchExport(el, type) {
return;
}
if(response.data&&response.data.failFileReason.length){
$("#message").html(response.data.failFileReason.join('/n'));
$("#message").html(response.data.failFileReason.join('<br/>'));
return false;
}
common.util.__tip(response.message, 'warning');
}
}
}
... ...
... ... @@ -68,7 +68,15 @@ var Bll={
var ag=new common.grid({
el:"#attributeTable",
columns:[
{display:"名称",name:"attributeName"},
{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){
... ... @@ -79,6 +87,7 @@ var ag=new common.grid({
for(var i in attrs){
if(attrs[i].standardId==item.attributeId){
item.val=attrs[i].standardVal
item.__val=attrs[i].parameterMakeId
}
}
}
... ... @@ -199,17 +208,17 @@ var g=new common.grid({
ajax: "sortsize2",
params: function(){
return {
"sortId" : sort
"sortId" : Bll.validateSort()
};
}
});
}
g.__e.init();
for(var i in g.__gsm){
var warp=$("#rows__"+i).children(".form-group").slice(0, 1);
var warp=$("#rows__"+i).children(".form-group").slice(0, g.__gsm[i]);
warp.find("input").prop("readonly",true);
warp.find("select").prop("disabled",true);
warp.find("btn-sort-remove").remove();
warp.find(".btn-sort-remove").remove();
warp.find(".btn-sort-kucun").prop("readonly",false);
}
for(var i=0;i<g.__length;i++){
... ... @@ -239,11 +248,11 @@ g.__e.on("callback", function(obj) {
$(document).on("click",".sortadd",function(){
var text=$(this).text();
if(!Bll.validateSort()){
common.util.__tip("请选择完整的分类目录");
common.util.__tip("请选择完整的分类目录","warning");
return;
}
if ($.trim($("#salesPriceStr").val())=="") {
common.util.__tip("请填写销售价");
common.util.__tip("请填写销售价","warning");
return;
}
if(g.__e.validate()){
... ... @@ -274,6 +283,10 @@ $(document).on("change","#brandId",function(){
tabTree.isfeeze=false;
tabTree.init([{id:"",sortName:""},{id:"",sortName:""},{id:"",sortName:""},{id:"",sortName:""}]);
});
$(document).on("change","#supplierId",function(){
tabTree.isfeeze=false;
tabTree.init([{id:"",sortName:""},{id:"",sortName:""},{id:"",sortName:""},{id:"",sortName:""}]);
});
$(document).on("change",":radio[name=gender]",function(){
Bll.productNameArr[1]=["男","女","通用"][+$(this).val()-1];
Bll.setProductName();
... ... @@ -298,9 +311,11 @@ $(document).on("change",".salesPriceStr",function(){
ENUM.goodsSizeList.salePrice=$.trim($(this).val());
});
$(document).on("click",".sortdelete",function(){
var index=$(this).data("index");
[].splice.call(g.__rows,index,1);
g.reload();
common.dialog.confirm("温馨提示","你确定删除吗?",function(){
var index=$(this).data("index");
[].splice.call(g.__rows,index,1);
g.reload();
});
// g.__e.init();
});
$(document).on("change",".factoryCode",function(){
... ... @@ -387,6 +402,7 @@ $(document).on("change",".attr_input",function(){
$(document).on("change",".attr_checkobx_class",function(){
var item=ag.rows[$(this).data("index")];
item.val=$("#attr_"+$(this).data("index")).val();
console.log(item);
})
var e=new common.edit("#basicInfo");
... ... @@ -401,14 +417,15 @@ e.on("validate",function(){
return "请选择完整的分类目录";
});
e.on("validate",function(){
console.log(g.__gsm);
if(g.__rows.length==0){
return "请添加销售属性";
}
var map={},map2={},_count=0,_count1=0;
var map={},map2={},map3=[],_count=0,_count1=0;
if(g.__rows.length>0){
$.each(g.__rows,function(index,item){
var gname= item.factoryGoodsName;
$.each(item.goodsSizeList,function(index,item1){
$.each(item.goodsSizeList,function(index1,item1){
var key=gname+"_"+item1.sizeId;
if(map.hasOwnProperty(key)){
_count++;
... ... @@ -419,14 +436,32 @@ e.on("validate",function(){
_count1++;
}
map2[item1.barCode]="";
if(g.__gsm[index]&&index1<g.__gsm[index]){
return;
}
map3.push(item1.barCode);
});
});
}
if(_count>0){
return "同一颜色包含两组相同尺码";
}
if(_count1>0&&common.util.__input("supplierId")){
return "JIT商品条码不能重复";
if(_count1>0){
return "商品条码不能重复";
}else{
if(map3.length>0){
var ispass=true;
common.util.__ajax2({
url:'/goods/base/checkSkuBarCodeExist',
async:false,
data:{barCode:map3.join(',')}
},function(res){
if(res.data.length){
ispass="商品条码"+res.data.join(',')+"已经存在";
}
},true);
return ispass;
}
}
});
e.on("validate",function(){
... ... @@ -472,10 +507,29 @@ $(document).on("click","#btnReview",function(){
if(ag.rows.length>0){
for(var i in ag.rows){
if(ag.rows[i].val){
option.data.productStandardRelationStr.push({
standardId:ag.rows[i].attributeId,
standardVal: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){
option.data.productStandardRelationStr.push({
standardId:ag.rows[i].attributeId,
standardVal:idNameList[x].text,
parameterMakeId:idNameList[x].id
});
}
}
}
}else{
option.data.productStandardRelationStr.push({
standardId:ag.rows[i].attributeId,
standardVal:ag.rows[i].val,
parameterMakeId:ag.rows[i].id
});
}
}
}
}
... ...
... ... @@ -35,7 +35,7 @@ var urlObj = {
'guangGetTagCategoryByStatus':'/guang/tagSort/getTagItems',
};
var minimumResultsForSearch=["sortbybrand","getjitSup"];
var minimumResultsForSearch=["sortbybrand","getjitSup","sortsize2"];
var dropDown = function(option) {
new dropDown.prototype.init(option);
... ...
... ... @@ -10,7 +10,7 @@
**************************提示********************************/
(function () {
(function() {
/**
* 编辑器资源文件根路径。它所表示的含义是:以编辑器实例化页面为当前路径,指向编辑器资源文件(即dialog等文件夹)的路径。
* 鉴于很多同学在使用编辑器的时候出现的种种路径问题,此处强烈建议大家使用"相对于网站根目录的相对路径"进行配置。
... ... @@ -19,8 +19,8 @@
* 因此,UEditor提供了针对不同页面的编辑器可单独配置的根路径,具体来说,在需要实例化编辑器的页面最顶部写上如下代码即可。当然,需要令此处的URL等于对应的配置。
* window.UMEDITOR_HOME_URL = "/xxxx/xxxx/";
*/
window.UMEDITOR_HOME_URL="http://"+location.host+"/";
var URL = window.UMEDITOR_HOME_URL || (function(){
window.UMEDITOR_HOME_URL = "http://" + location.host + "/";
var URL = window.UMEDITOR_HOME_URL || (function() {
function PathStack() {
... ... @@ -34,83 +34,83 @@
this.path = this.documentURL;
this.stack = [];
this.push( this.documentURL );
this.push(this.documentURL);
}
PathStack.isParentPath = function( path ){
PathStack.isParentPath = function(path) {
return path === '..';
};
PathStack.hasProtocol = function( path ){
return !!PathStack.getProtocol( path );
PathStack.hasProtocol = function(path) {
return !!PathStack.getProtocol(path);
};
PathStack.getProtocol = function( path ){
PathStack.getProtocol = function(path) {
var protocol = /^[^:]*:\/*/.exec( path );
var protocol = /^[^:]*:\/*/.exec(path);
return protocol ? protocol[0] : null;
};
PathStack.prototype = {
push: function( path ){
push: function(path) {
this.path = path;
update.call( this );
parse.call( this );
update.call(this);
parse.call(this);
return this;
},
getPath: function(){
getPath: function() {
return this + "";
},
toString: function(){
return this.protocol + ( this.stack.concat( [''] ) ).join( this.separator );
toString: function() {
return this.protocol + (this.stack.concat([''])).join(this.separator);
}
};
function update() {
var protocol = PathStack.getProtocol( this.path || '' );
var protocol = PathStack.getProtocol(this.path || '');
if( protocol ) {
if (protocol) {
//根协议
this.protocol = protocol;
//local
this.localSeparator = /\\|\//.exec( this.path.replace( protocol, '' ) )[0];
this.localSeparator = /\\|\//.exec(this.path.replace(protocol, ''))[0];
this.stack = [];
} else {
protocol = /\\|\//.exec( this.path );
protocol = /\\|\//.exec(this.path);
protocol && (this.localSeparator = protocol[0]);
}
}
function parse(){
function parse() {
var parsedStack = this.path.replace( this.currentDirPattern, '' );
var parsedStack = this.path.replace(this.currentDirPattern, '');
if( PathStack.hasProtocol( this.path ) ) {
parsedStack = parsedStack.replace( this.protocol , '');
if (PathStack.hasProtocol(this.path)) {
parsedStack = parsedStack.replace(this.protocol, '');
}
parsedStack = parsedStack.split( this.localSeparator );
parsedStack = parsedStack.split(this.localSeparator);
parsedStack.length = parsedStack.length - 1;
for(var i= 0,tempPath,l=parsedStack.length,root = this.stack;i<l;i++){
for (var i = 0, tempPath, l = parsedStack.length, root = this.stack; i < l; i++) {
tempPath = parsedStack[i];
if(tempPath){
if( PathStack.isParentPath( tempPath ) ) {
if (tempPath) {
if (PathStack.isParentPath(tempPath)) {
root.pop();
} else {
root.push( tempPath );
root.push(tempPath);
}
}
... ... @@ -121,9 +121,9 @@
var currentPath = document.getElementsByTagName('script');
currentPath = currentPath[ currentPath.length -1 ].src;
currentPath = currentPath[currentPath.length - 1].src;
return new PathStack().push( currentPath ) + "";
return new PathStack().push(currentPath) + "";
})();
... ... @@ -134,21 +134,24 @@
window.UMEDITOR_CONFIG = {
//为编辑器实例添加一个路径,这个不能被注释
UMEDITOR_HOME_URL : URL
UMEDITOR_HOME_URL: URL
//图片上传配置区
,imageUrl:URL+"ajax/ueditor" //图片上传提交地址
,imagePath:"" //图片修正地址,引用了fixedImagePath,如有特殊需求,可自行配置
,imageFieldName:"upfile" //图片数据的key,若此处修改,需要在后台对应文件修改对应参数
,
imageUrl: URL + "ajax/ueditor" //图片上传提交地址
,
imagePath: "" //图片修正地址,引用了fixedImagePath,如有特殊需求,可自行配置
,
imageFieldName: "upfile" //图片数据的key,若此处修改,需要在后台对应文件修改对应参数
//工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的从新定义
,toolbar:[
,
toolbar: [
'source | undo redo | bold italic underline strikethrough | superscript subscript | forecolor backcolor | removeformat |',
'insertorderedlist insertunorderedlist | selectall cleardoc paragraph | fontfamily fontsize' ,
'insertorderedlist insertunorderedlist | selectall cleardoc paragraph | fontfamily fontsize',
'| justifyleft justifycenter justifyright justifyjustify |',
'link unlink | emotion image video | map',
'| horizontal print preview fullscreen', 'drafts', 'formula'
'link unlink | emotion image video | map', 'drafts', 'formula'
]
//语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换,当然,前提条件是lang文件夹下存在对应的语言文件:
... ... @@ -203,9 +206,9 @@
//fontfamily
//字体设置
// ,'fontfamily':[
// { name: 'songti', val: '宋体,SimSun'},
// ]
// ,'fontfamily':[
// { name: 'songti', val: '宋体,SimSun'},
// ]
//fontsize
//字号
... ... @@ -247,4 +250,4 @@
//填写过滤规则
//,filterRules: {}
};
})();
})();
\ No newline at end of file
... ...
... ... @@ -42,9 +42,13 @@ var util = {
res = res.data;
if (res.code != 200) {
util.__tip(res.message, "warning");
return false;
} else {
return callback.bind(this, res)();
}
},
error:function(){
return false;
}
});
}
... ...
... ... @@ -33,13 +33,17 @@ window.GOLABDATA = {
}
} else {
var map = {},
args = [].slice.call(arguments, 1);
args = [].slice.call(arguments, 1),
listeners = null;
for (var key in that.registerEvent) {
var listeners = that.registerEvent[key];
listeners = that.registerEvent[key];
for (var i in listeners) {
map[key] = listeners[i].apply(this, args);
}
}
console.log(map);
return map;
}
... ... @@ -75,6 +79,7 @@ if ($('.contentpanel').data('type') == 'info') {
$('#saveAllInfo').hide();
$(".goods-img i").remove();
$("#search-key-list").hide();
$(".brand-list").hide();
// 上架审核的查看页面
if ($('.contentpanel').data('action') != 'audit') {
... ... @@ -101,7 +106,9 @@ if ($('.contentpanel').data('type') == 'info') {
var e = new common.edit('#netsaleAllInfo');
$(document).on("click", "#saveAllInfo", function() {
var data = {};
$.each(GOLABDATA.fire(), function(key, value) {
var allData = GOLABDATA.fire();
$.each(allData, function(key, value) {
if (typeof value == 'string') {
data = value;
return;
... ... @@ -109,15 +116,6 @@ $(document).on("click", "#saveAllInfo", function() {
$.extend(data, value, true);
});
/*common.util.__ajax({
url: '/goods/product/saveNetSaleAllInfo',
data: data
}, function(res) {
});*/
e.submit('/goods/product/saveNetSaleAllInfo', function(option) {
option.data = data;
option.success = function(res) {
... ... @@ -131,7 +129,7 @@ $(document).on("click", "#saveAllInfo", function() {
}
return false;
}
})
});
})
... ... @@ -202,4 +200,11 @@ $('.floatnav').on('mouseenter', function() {
$('.floatnav').addClass('show');
}).on('mouseleave', function() {
$('.floatnav').removeClass('show');
});
\ No newline at end of file
});
if (location.hash) {
var hashPos = location.hash.substring(1);
setTimeout(function() {
$('.floatnav').find('li[name="' + hashPos + '"]').trigger('click');
}, 500);
}
\ No newline at end of file
... ...
... ... @@ -37,8 +37,8 @@ var ENUM = {
},
isVIP: {
"Y": "是",
"N": "否",
"B": "品牌设置"
"N": "否",
"B": "品牌设置"
}
};
... ... @@ -75,6 +75,8 @@ var t = new common.tab({
if (columnname == 1 || columnname == 2) {
editPostion = '#position9';
} else {
editPostion = '';
}
g.init($("#gridurl").val());
... ... @@ -156,14 +158,15 @@ var g = new common.grid({
name: 'picImgUrl',
render: function(item) {
if (item.picImgUrl) {
return '<img src="' + item.picImgUrl + '" width="100" height="60">';
return '<a target="_blank" href="' + item.productUrl + '"><img src="' + item.picImgUrl + '" width="100" height="60"></a>';
} else {
return '';
}
}
}, {
display: '商品信息',width:'30%',
display: '商品信息',
width: '30%',
render: function(item) {
var productName = item.productName ? item.productName : '',
brandName = item.brandName ? item.brandName : '',
... ... @@ -171,7 +174,7 @@ var g = new common.grid({
middleSortName = item.middleSortName ? item.middleSortName : '',
html = '';
html += '<p><strong>名称:</strong>' + productName + '</p>';
html += '<p><strong>名称:</strong><a target="_blank" href="' + item.productUrl + '">' + productName + '</a></p>';
html += '<p><strong>品牌:</strong>' + brandName + '</p>';
html += '<p><strong>类目:</strong>' + maxSortName;
if (middleSortName) {
... ... @@ -338,7 +341,12 @@ function shelveModal(title, html) {
g.reload();
}, 'growl-success');
} else {
e.$tip(res.data.message);
//e.$tip(res.data.message);
var html = '';
$.each(res.data.data, function(key, value) {
html += key + ':' + value + '<br>';
});
e.$tip(html);
}
}
});
... ... @@ -398,31 +406,32 @@ var shelveTable = new common.grid({
display: 'SKC上架操作(状态)',
render: function(item) {
if (item.status == 0) {
return '<a class="btn btn-success btnskc" data-type="1" data-index="'+item.__index+'" href="javascript:;">点击上架</a>';
return '<a class="btn btn-success btnskc" data-type="1" data-index="' + item.__index + '" href="javascript:;">点击上架</a>';
} else {
return '<a class="btn btn-danger btnskc" data-type="0" data-index="'+item.__index+'" href="javascript:;">点击下架</a>';
return '<a class="btn btn-danger btnskc" data-type="0" data-index="' + item.__index + '" href="javascript:;">点击下架</a>';
}
}
}, {
display: '<div class="subhhead"><span>SKU</span><span>尺码</span><span>库存</span><span>SKU上架操作</span><span>SKU上架操作</span></div>',
render: function(item){
render: function(item) {
console.log(item);
return common.util.__template2($("#template2").html(),item)
return common.util.__template2($("#template2").html(), item)
}
}]
});
/*代码优惠*/
var goodsList={},shelveLayer=null;
var goodsList = {},
shelveLayer = null;
//单个sku,skc上下架
$('#basicTable').on('click', '.shelve-btn', function() {
var item=g.rows[$(this).data("index")];
var item = g.rows[$(this).data("index")];
var that = this;
$(that).addClass('disabled');
getdata(item.productSkn,function(res){
getdata(item.productSkn, function(res) {
shelveLayer = common.dialog.open({
title: '上/下架',
width: 900,
... ... @@ -430,78 +439,86 @@ $('#basicTable').on('click', '.shelve-btn', function() {
});
$(that).removeClass('disabled');
goodsList=res.data.goodsList;
goodsList = res.data.goodsList;
shelveTable.init(goodsList);
});
});
function getdata(Skn,callback){
function getdata(Skn, callback) {
common.util.__ajax({
url: '/goods/netsale/getdata',
data: {
param: Skn
}
}, function(res) {
callback&&callback(res);
},true);
callback && callback(res);
}, true);
}
$(document).on("click",".btnskc",function(){
var item=goodsList[$(this).data("index")];
$(document).on("click", ".btnskc", function() {
var item = goodsList[$(this).data("index")];
console.log(item);
common.util.__ajax({
url: '/goods/product/updateGoodsStatus',
data: {productSkc:item.productSkc,targetStatus:item.status}
url: '/goods/product/updateGoodsStatus',
data: {
productSkc: item.productSkc,
targetStatus: item.status ? 0 : 1
}
}, function(res) {
if (res.code == 200) {
getdata(item.productSkc,function(res){
goodsList=res.data.goodsList;
shelveTable.reload();
getdata(item.productSkn, function(res) {
goodsList = res.data.goodsList;
shelveTable.init(res.data.goodsList);
});
}
})
});
$(document).on("click",".btnsku",function(){
var item=goodsList[$(this).data("index")]
var item1=item.goodsSizeList[$(this).data("subindex")];
$(document).on("click", ".btnsku", function() {
var item = goodsList[$(this).data("index")]
var item1 = item.goodsSizeList[$(this).data("subindex")];
common.util.__ajax({
url: '/goods/product/updateProductSkuStatus',
data: {productSkc:item1.productSku,targetStatus:item.status}
url: '/goods/product/updateProductSkuStatus',
data: {
productSku: item1.productSku,
targetStatus: item1.status ? 0 : 1
}
}, function(res) {
if (res.code == 200) {
getdata(item.productSkc,function(res){
goodsList=res.data.goodsList;
getdata(item.productSkn, function(res) {
goodsList = res.data.goodsList;
console.log(goodsList);
shelveTable.reload();
shelveTable.init(res.data.goodsList);
});
}
})
});
$(document).on("change",".wqt_checkbox,.wqt_all",function(){
var _count1=0,_count2=0;
$.each(g.selected,function(index,item){
console.log(item.status);
$(document).on("change", ".wqt_checkbox,.wqt_all", function() {
var _count1 = 0,
_count2 = 0;
$.each(g.selected, function(index, item) {
/*添加兼容逻辑*/
if(item.status){
_count1++;//上
}else{
_count2++;//下
if (item.status == 8 || item.status == 3 || item.status == 2 || item.status == 0) {
_count1++; //上
} else {
_count2++; //下
}
});
if(_count2==g.selected.length){
$("#offshelve").addClass("btn-info").removeClass("btn-default").prop("disabled",false);
}else{
$("#offshelve").addClass("btn-default").removeClass("btn-info").prop("disabled",true);
if (_count1 == g.selected.length) {
$('#onshelve').removeClass('disabled');
} else {
$('#onshelve').addClass('disabled');
}
if(_count1==g.selected.length){
$("#onshelve").addClass("btn-info").removeClass("btn-default").prop("disabled",false);
}else{
$("#onshelve").addClass("btn-default").removeClass("btn-info").prop("disabled",true);
if (_count2 == g.selected.length) {
$('#offshelve').removeClass('disabled');
} else {
$('#offshelve').addClass('disabled');
}
})
\ No newline at end of file
});
\ No newline at end of file
... ...
... ... @@ -73,7 +73,7 @@ GOLABDATA.on("LYaddInfo", function() {
$.ajax({
type: 'POST',
url: '/goods/product/queryAfterSaleInfo',
url: '/goods/product/queryAttributesByConf',
data: {
saleType: 2,
displayPosition: 3,
... ... @@ -105,7 +105,7 @@ $.ajax({
if (NETSALEDATA.attributeProValuesBosTwo) {
$.each(NETSALEDATA.attributeProValuesBosTwo, function(i, value) {
$.each(data.attributes.data, function(i2, value2) {
$.each(data.data, function(i2, value2) {
if (value.attributeId == value2.attributeId) {
value2.selectedValues = value.attributeValueId.replace(/,/g, "|");
}
... ... @@ -113,17 +113,6 @@ $.ajax({
});
}
$.each(data.productComfort.data, function(index, item) {
if (comfort && comfort[index]) {
item.value = comfort[index].value;
} else {
item.value = '';
}
});
$('#addinfo-wrap').html(common.util.__template2($('#addInfoTemp').html(), data));
e.on("bind", function() {
... ... @@ -159,15 +148,16 @@ $.ajax({
brandId: basicInfo.brandId
}
});
e.init();
if ($('.contentpanel').data('type') == 'info') {
$('.contentpanel').find('input').prop('disabled', true);
$('.contentpanel').find('select').prop('disabled', true);
$('.contentpanel').find('.btn').addClass('disabled');
$('#addinfo-wrap').find('input').not(":checked").parents('label').hide();
}
e.init();
}
});
... ... @@ -200,20 +190,28 @@ common.util.__ajax({
});
}
if(res.data.length == 0) {
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("TYcaizhi", function() {
var a= goodsParamEdit.submit(false, function(option) {
var a = goodsParamEdit.submit(false, function(option) {
$('.goods-param-group').each(function() {
goodsParamArr.push({
productSkn: $('#productSkn').val(),
... ... @@ -225,7 +223,7 @@ GOLABDATA.on("TYcaizhi", function() {
option.data.productSkn = $('#productSkn').val();
option.debug = true;
});
return a?a:goodsParamEdit.errMessage;
return a ? a : goodsParamEdit.errMessage;
});
$("#propertySave").on('click', function() {
... ... @@ -233,5 +231,4 @@ $("#propertySave").on('click', function() {
url: '/netSale/saveProductParam',
data: GOLABDATA.fire('TYcaizhi')
}, function() {});
});
});
\ No newline at end of file
... ...
... ... @@ -123,7 +123,7 @@ suppledTable.init(NETSALEDATA.goodsList, 'goodsSizeList')
//上架必填
productExtBo.renderType = $('.contentpanel').data('type');
productExtBo.sellChannels = productExtBo.sellChannels ? productExtBo.sellChannels.replace(/,/g, "|") : '';
productExtBo.shopIds = productExtBo.shopIdList ? productExtBo.shopIdList.join('|') : '';
//productExtBo.shopList =
common.util.__ajax({
url: '/goods/ShopsRest/queryShopsByBrandId',
... ... @@ -132,12 +132,23 @@ common.util.__ajax({
}
}, function(res) {
productExtBo.shopList = res.data;
productExtBo.shopIds = '';
if (productExtBo.shopIdList && productExtBo.shopIdList.length > 0) {
//如有选择店铺
productExtBo.shopIds = productExtBo.shopIdList ? productExtBo.shopIdList.join('|') : '';
} else if (res.data.length > 0) {
//如没有已选择店铺,默认选择全部
$.each(res.data, function(i, value) {
productExtBo.shopIds += value.shopsId + '|';
});
}
//
$('#product-ext').html(common.util.__template2($('#productExtBoTemp').html(), productExtBo));
e.init();
}, true);
$('#product-ext').html(common.util.__template2($('#productExtBoTemp').html(), productExtBo));
//如果是info页,所有input btn置灰
if ($('.contentpanel').data('type') == 'info') {
$('.contentpanel').find('input').prop('disabled', true);
$('.contentpanel').find('.btn').addClass('disabled');
... ... @@ -146,6 +157,7 @@ if ($('.contentpanel').data('type') == 'info') {
var e = new common.edit('#basicInfoWrap');
e.init();
//保存基本信息
$('#saveBasicInfo').on('click', function() {
e.submit('/goods/product/saveNetSaleBaseInfo', function(option) {
option.data = GOLABDATA.fire("LYbasicInfo");;
... ... @@ -177,6 +189,5 @@ GOLABDATA.on("LYbasicInfo", function() {
data[key] = $(this).val().split('|').join(',');
}
});
console.log(data);
return data;
});
\ No newline at end of file
... ...
... ... @@ -4,6 +4,7 @@ var $ = require('jquery'),
var e = new common.edit('#brandWrap'),
brandSelectArr = [];
common.util.__ajax({
url: '/goods/brands/queryBrandsByStatus'
}, function(res) {
... ... @@ -25,9 +26,13 @@ common.util.__ajax({
map['0-9'].push(item);
}
});
$('.brand-list').html(common.util.__template2($('#brandTemp').html(), {
var brandHtml = common.util.__template2($('#brandTemp').html(), {
map: map
}));
});
// var docFrag = new DocumentFragment();
// docFrag.firstChild.nodeValue = brandHtml;
$('#brand-list').html(brandHtml);
if (NETSALEDATA.brandRelationList) {
$('.selected-brand').html(common.util.__template2($('#brandShowTemp').html(), {
... ... @@ -76,9 +81,14 @@ $('#saveBrandRelation').on('click', function() {
});
GOLABDATA.on("LYbrandRelation", function() {
return e.submit('', function(option) {
return {
productSkn: $('#productSkn').val(),
brandRelationList: JSON.stringify($('#brandRelationList').val().split('|'))
}
/*return e.submit('', function(option) {
option.data.productSkn = $('#productSkn').val();
option.data.brandRelationList = JSON.stringify(option.data.brandRelationList.split('|'));
option.debug = true;
});
});*/
});
\ No newline at end of file
... ...
... ... @@ -35,11 +35,12 @@ $(document).on("click", "#btn-descriptioner", function() {
return false;
});
window.UMrecommender = UM.getEditor('edit-recommender');
/*小编推荐*/
window.UMrecommender = UM.getEditor('edit-recommender');
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',
... ... @@ -191,7 +192,9 @@ var Bll = {
$(document).on("dblclick", ".poseditimg img", function(e) {
var pos = {
top: e.pageY - $(this).offset().top,
left: e.pageX - $(this).offset().left
left: e.pageX - $(this).offset().left,
width: 150,
height: 150
}
Bll.posData.push(pos);
var _pos = $(common.util.__template2($("#kapian").html(), {
... ... @@ -355,7 +358,7 @@ $(document).on('click', '.remove-item-btn', function() {
$(document).on("click", "#fenMainSave", function() {
var data = GOLABDATA.fire("fenmian");
if(typeof data == "undefined") {
if (typeof data == "undefined") {
return false;
}
common.util.__ajax({
... ...
'use strict';
var $ = require('jquery');
var common = require('../common/common');
function batchExport(el, type) {
var loadModal = null;
return {
params: {
type: type,
__type: "batch-import"
},
onStart: function (params) {
console.log("params", params);
loadModal = common.dialog.load();
},
onComplete: function (response) {
console.log("response",response);
if (loadModal) {
loadModal.close();
}
if (response.code == 200 && response.data.failFileReason.length == 0) {
common.util.__tip(response.message, 'success');
return;
}
if (response.data && response.data.failFileReason.length) {
$("#message").html(response.data.failFileReason.join('/n'));
return false;
}
common.util.__tip(response.message, 'warning');
}
}
}
common.edit.ajaxfileupload('#productModelTry', batchExport('#productModelTry', 'productModelTry'));
... ...
/**
* Created by JiangMin on 2016/3/24
* 试穿详情.
*/
var $ = require('jquery');
var common = require('../common/common');
var param = location.href.match(/(info)\/(\d+)/);
//尺码列表
var modelLists = [];
common.util.__ajax({url: '/meterManage/tryInfo/info1', data: {productSkn: param[2]}}, function (data) {
var feelIds = {
1: "合适",
2: "偏大",
3: "偏小"
};
var infoLists = data.data || {};
modelLists = infoLists.tryModelList || [];
//如果存在试穿信息
if (infoLists.tryInfoBoMap) {
var tryInfo = infoLists.tryInfoBoMap;
for (var i = 0; i < modelLists.length; i++) {
if (tryInfo[modelLists[i].id]) {
modelLists[i].tryInfo = {};
tryInfo[modelLists[i].id].feel_id = feelIds[tryInfo[modelLists[i].id].feel_id];
modelLists[i].tryInfo = tryInfo[modelLists[i].id];
}
else {
modelLists[i].tryInfo = {};
modelLists[i].tryInfo.fit_size = "";
modelLists[i].tryInfo.feel_id = "";
modelLists[i].tryInfo.fit_remark = "";
}
}
}
//不存在
else {
for (var j = 0; j < modelLists.length; j++) {
modelLists[j].tryInfo = {};
}
}
var a = common.util.__template2($("#template").html(), {modelLists: modelLists});
$(".contentpanel1").html(a);
new common.dropDown({
el: '.fit_size',
ajax: 'sortsize'
});
}, true);
$(document).on("change", ".tryInfo1", function () {
var _index = $(this).data("index");
var item = modelLists[_index].tryInfo;
var name = $(this).data('name');
item[name] = $(this).val();
console.log("item", item);
});
$(document).on("click", "#addInfo", function () {
console.log("modelLists", modelLists);
//var newList = [];
//for (var i = 0; i < modelLists.length; i++) {
// console.log("modelLists");
// console.log(modelLists[i]);
// newList[i]={};
// newList[i].model_id = modelLists[i].id;
// newList[i].feel_id = modelLists[i].tryInfo.feel_id;
// newList[i].fit_size = modelLists[i].tryInfo.fit_size;
// newList[i].fit_remark = modelLists[i].tryInfo.fit_remark;
//}
//console.log("newList");
//console.log(newList);
common.util.__ajax({
url: '/meterManage/tryInfo/add',
data: {
productSkn: param[2],
productModelTry: JSON.stringify(modelLists)
}
}, function () {
console.log("成功")
});
})
... ...
... ... @@ -31,8 +31,10 @@ var g = new common.grid({
{display: "品牌", name: "brandName"},
{
display: "操作", name: "", render: function (item) {
console.log("item");
console.log(item);
var arr = [];
arr.push('<a class="btn btn-info info" data-index="' + item.__index + '">试穿信息</a>');
arr.push('<a data-index="' + item.__index + '" href="/meterManage/tryInfo/info/' + item.productSkn + '" class="btn btn-info ">试穿信息</a>');
return arr.join('');
}
}
... ... @@ -45,3 +47,20 @@ $(document).on('click', '#filter-btn', function () {
g.reload(1);
});
//new common.dialog({
// title:"",
// content:"",
// width:"80%",
// botton:[
// {
// value: "xxx",
// callback: function(){
//
// },
// css: "btn-primary"
// }
// ]
//});
... ...
... ... @@ -17,15 +17,17 @@ var g = new common.grid({
modelName: common.util.__input('content-filter1'),
englishName: common.util.__input('content-filter2'),
status: common.util.__input('status-filter'),
modelType: parseInt($("#aa").val())
modelType: $("#aa").val()
};
},
//列表显示
columns: [
{display: "姓名", name: "modelName"},
{display: "英文名", name: "englishName"},
{
display: "头像", name: "avatar", render: function (item) {
console.log(item);
return '<img src="' + item.avatar + '" width="100" height="60"/>'
}
},//图片显示
... ... @@ -81,7 +83,8 @@ g.init("/shotManage/model/getAllModels");
var Bll = {
toast: function (url, item, hint) {
var e = new common.edit("#baseform", {
bucket: "modelCard"
bucket: "modelCard"//真实的
//bucket: "goodsimg"//测试
});
//验证英文名
e.on("validate", function () {
... ...
... ... @@ -4,6 +4,10 @@
*/
var $ = require('jquery');
var common = require('../common/common');
//日期插件
$('.hasDatepicker').fdatepicker({
format: 'yyyy-mm-dd'
});
/**
* 列表显示数据
* @type {common.grid}
... ... @@ -17,18 +21,18 @@ var g = new common.grid({
productSkn: common.util.__input('content-filter1'),
productSkc: common.util.__input('content-filter2'),
productSku: common.util.__input('content-filter3'),
startTime: common.util.__input('startTime'),
endTime: common.util.__input('endTime')
startTime: common.util.__input('starttime'),
endTime: common.util.__input('endtime')
};
},
//列表显示
columns: [
{display: "SKN", name: "productSkn"},
{
display: "最后上传时间", name: "lastAddTime",
display: "最后上传时间", name: "updateTime",
render: function (item) {
var t = new Date(item.lastAddTime * 1000);
var formatted = common.util.__dateFormat(t, "yyyy-MM-dd hh:mm:ss");
var t = new Date(item.updateTime * 1000);
var formatted = common.util.__dateFormat(t, "yyyy-MM-dd ");
return "<p>" + formatted + "</p>";
}
},
... ... @@ -50,8 +54,7 @@ var g = new common.grid({
{
display: "操作", name: "", render: function (item) {
var arr = [];
arr.push('<a class="btn btn-info update" data-index="' + item.__index + '">修改</a>');
arr.push('<a class="btn btn-danger delete" data-index="' + item.__index + '">删除</a>');
arr.push('<a class="btn btn-info update" data-index="' + item.__index + '">编辑</a>');
return arr.join('');
}
}
... ... @@ -64,16 +67,18 @@ var Bll = {
var a = common.dialog.confirm(hint,
common.util.__template2($("#template1").html(), item),
function () {
console.log("JSON.stringify(pictureBoList)", typeof(JSON.stringify(pictureBoList)));
common.util.__ajax({
url: url,
data: {
productSku: parseInt($("#Sku").val()),
productPhotoAddBoList: JSON.stringify(pictureBoList)
productPhotoAddStrList: JSON.stringify(pictureBoList)
}
}, function (res) {
g.reload();
//a.close();
if(res.code=='200'){
g.reload();
a.close();
}
});
return false;
});
... ... @@ -85,15 +90,15 @@ var Bll = {
valid_extensions: ['png', 'jpg', 'jpeg'],
onComplete: function (response) {
if (response.status && response.code == 200) {
var item = pictureBoList || [];
console.log("response",response);
var data = {
"fileName": response.data
"fileName": response.data,
"originalName": "1035027.jpg"
};
item.push(data);
console.log(JSON.stringify(pictureBoList))
pictureBoList.push(data);
$("#addPic").html(common.util.__template2($("#template2").html(),
{
pictureBoList: item
pictureBoList: pictureBoList
}
));
}
... ... @@ -102,6 +107,13 @@ var Bll = {
}
}
});
$(document).on('click', '.remove-item-btn', function () {
var index = $(this).parents(".cover-image-item").index();
//界面删除
$(this).parents('.cover-image-item').remove();
//数组中删除
pictureBoList.splice(index, 1);
});
}
};
//上传图片--点击事件
... ... @@ -115,12 +127,36 @@ $('#upload-btn').on('click', function () {
$(document).on('click', '#filter-btn', function () {
g.reload(1);
});
//封面图删除
$(document).on('click', '.remove-item-btn', function() {
//界面删除
$(this).parents('.cover-image-item').remove();
//TODO 数组中删除
////删除单张图
//编辑
$(document).on('click', '.update', function () {
var ids = [];
var item = g.rows[$(this).data("index")];
var pics = item.pictureBoList || [];
$(document).on('click', '.remove-item-btn', function () {
var index = $(this).parents(".cover-image-item").index();
//界面删除
$(this).parents('.cover-image-item').remove();
ids.push(pics[index].id);
pics.splice(index, 1);
console.log("ids",ids);
});
var b = common.dialog.confirm("编辑", common.util.__template2($("#template3").html(), item),
function () {
common.util.__ajax({
url: "/shotManage/proPhoto/update",
data: {
productSkn: item.productSkn,
ids: JSON.stringify(ids)
}
}, function (res) {
ids=[];
g.reload();
});
})
});
... ...
{
"name": "yohobuy-portal",
"version": "0.3.2",
"version": "0.2.1",
"description": "yohobuy-portal",
"keywords": [],
"homepage": "",
... ...
... ... @@ -420,7 +420,10 @@ ul {
padding: 0 38px 0 10px;
color: #333;
z-index: 99;
white-space: nowrap
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.citySelect .cityboxbtn:hover {
... ...
... ... @@ -244,4 +244,10 @@ input[type=date], input[type=time], input[type=datetime-local], input[type=month
height: 100%;
text-align: center;
}
}
.edui-editor-body {
img {
max-width: 100%;
}
}
\ No newline at end of file
... ...
... ... @@ -12,15 +12,15 @@ var config = {
'development': {
redis: null,
apiKey: 'sd4H1ecAqlp',
//http: //192.168.102.214:8088/platform
// domain:'http://192.168.102.216:8080/platform',
// domain: 'http://172.16.6.240:8088/platform',
// domain:'http://172.16.6.240:8088/platform',//王书生
// 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://192.168.102.202:8088/platform',
// domain: 'http://192.168.102.202:8088/platform',
//domain:'http://172.16.6.197: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: {
... ...
... ... @@ -190,57 +190,12 @@ exports.res = [
{name:'productStandardRelationStr',type:'String'}
]
},
// {
// route:'/base/goods/ajax/update2',
// method:'POST',
// url:'/product/batchAuditRejectBaseProduct',
// 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:'Number'},
// {name:'retailPriceStr',type:'String'},
// {name:'salesPriceStr',type:'String'},
// {name:'expectShelfTimeStr',type:'String'},
// {name:'expectArrivalTimeStr',type:'String'},
// {name: 'baseGoodInfoStr',type: 'String'},
// {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:'seasons',type:'String'},
// {name:'isOutLets',type:'String'},
// {name:'outletsSetting',type:'String'},
// {name:'isAdvance',type:'String'},
// {name:'isVip',type:'String'},
// {name:'vipSetting',type:'String'},
// {name:'stock',type:'Number'}
// ]
// },
{//基础商品详情空页面
route:'/base/goods/info/:productSkn',
method:'GET',
view:'pages/basegoods/info',
src:'/basegoods/goodsInfo'
},
{
// 获取商品详情数据
route:'/base/goods/getData',
... ... @@ -281,7 +236,7 @@ exports.res = [
// 1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数
{name:'displayPosition',type:'Number'}
]
},{
},{//品类
route:'/goods/query/querySortBySmallSort',
method:'POST',
url:'/product/querySortBySmallSort',
... ... @@ -313,4 +268,12 @@ exports.res = [
domain: exports.domain
}
},
{
route:'/goods/base/checkSkuBarCodeExist',
method:'POST',
url:'/product/checkSkuBarCodeExist',
params:[
{name:"barCode",type:"String"}
]
}
];
\ No newline at end of file
... ...
... ... @@ -4,8 +4,7 @@ exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.162:8088/platform'; //李建
//商品管理路由配置
exports.res = [
{
exports.res = [{
//网销信息 -> 网销信息页面渲染
route: '/goods/netsale/index',
method: 'GET',
... ... @@ -207,8 +206,8 @@ exports.res = [
src: '/goods/netsale-edit',
data: {
type: 'info',
subtitle:"查看",
maintitle:"查看商品信息"
subtitle: "查看",
maintitle: "查看商品信息"
} //,
// params: [{
... ... @@ -225,8 +224,8 @@ exports.res = [
src: '/goods/netsale-edit',
data: {
type: 'edit',
subtitle:"编辑",
maintitle:"编辑商品信息"
subtitle: "编辑",
maintitle: "编辑商品信息"
} //,
// params: [{
... ... @@ -393,44 +392,19 @@ exports.res = [
}]
}, {
//网销信息 -> 查询补全信息
route: '/goods/product/queryAfterSaleInfo',
route: '/goods/product/queryAttributesByConf',
method: 'POST',
apis: {
productStyle: {
url: '/productStyle/queryProductStyles4Select'
},
productComfort: {
url: '/productComfort/queryProductComfortList'
},
productElements: {
url: '/productElements/queryProductElements4Select'
},
makingProcess: {
url: '/product/queryMakingProcess',
params: [{
name: 'categoryId',
type: 'number'
}, {
name: 'displayPosition',
type: 'number'
}],
isJsonRaw: true
},
attributes: {
url: '/product/queryAttributesByConf',
params: [{
name: 'categoryId',
type: 'number'
}, {
name: 'displayPosition',
type: 'number'
}, {
name: 'saleType',
type: 'number'
}],
isJsonRaw: true
}
}
url: '/product/queryAttributesByConf',
params: [{
name: 'categoryId',
type: 'number'
}, {
name: 'displayPosition',
type: 'number'
}, {
name: 'saleType',
type: 'number'
}]
}, {
route: '/goods/ShopsRest/queryShopsByBrandId',
method: 'POST',
... ...
... ... @@ -3,8 +3,8 @@
* 模特管理
*/
//exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.162:8080/platform'; //李建
exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境
exports.domain = 'http://172.16.6.162:8088/platform'; //李建
//exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境
exports.res = [
//主界面
... ... @@ -26,6 +26,7 @@ exports.res = [
{name: 'englishName', type: 'string'},//英文名
{name: 'modelName', type: 'string'},//名称
{name: 'status', type: 'Number'},//模特状态:0 禁用 1 启用
{name: 'modelType', type: 'Number'},//模特类型:1拍摄模特 2试穿模特
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'}
]
... ...
... ... @@ -3,7 +3,7 @@
* 产品图片管理
*/
//exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.162:8080/platform'; //李建
//exports.domain = 'http://172.16.6.162:8088/platform'; //李建
exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境
exports.res = [
... ... @@ -40,7 +40,17 @@ exports.res = [
{name: 'productSkn', type: 'Number'},
{name: 'productSkc', type: 'Number'},
{name: 'productSku', type: 'Number'},
{name: 'productPhotoAddBoList', type: 'string'}
{name: 'productPhotoAddStrList', type: 'string'}
]
},
//编辑图片
{
route: '/shotManage/proPhoto/update',
method: 'POST',
url: '/productPhoto/updateProductPhoto',
params: [
{name: 'productSkn', type: 'Number'},
{name: 'ids', type: 'string'}
]
}
];
\ No newline at end of file
... ...
//exports.domain = require('../config/common.js').domain;
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://localhost:30012';
exports.domain = 'http://172.16.6.115:8080/platform';
//exports.domain = 'http://172.16.6.115:8080/platform';
exports.res = [
{
... ...
// exports.domain = require('../config/common.js').domain;
exports.domain ="http://172.16.6.239:8080/";
exports.domain = require('../config/common.js').domain;
// exports.domain ="http://172.16.6.239:8080/";
//路由配置
exports.res = [
{
... ...
... ... @@ -3,11 +3,10 @@
* 试穿信息管理
*/
//exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.162:8080/platform'; //李建
//exports.domain = 'http://172.16.6.162:8088/platform'; //李建
exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境
exports.res = [
//主界面
{
route: '/meterManage/tryInfo/index',//访问路由
... ... @@ -27,5 +26,38 @@ exports.res = [
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'}
]
},
//查看具体试穿信息
{
route: '/meterManage/tryInfo/info/:productSkn',
method: 'GET',
view: 'pages/meterManage/info',
src: '/meterManage/info'
},
{
// 获取商品详情数据
route: '/meterManage/tryInfo/info1',
method: 'POST',
url: '/productExtraInfo/queryProdExtraInfo',
params: [
{name: 'productSkn', type: 'Number'}
]
},
//保存试穿信息
{
route: '/meterManage/tryInfo/add',
method: 'POST',
url: '/productExtraInfo/saveProdExtraInfo',
params: [
{name: 'productSkn', type: 'Number'},
{name: 'productModelTry', type: 'String'}
]
},
//上传excel文件
{
route: '/meterManage/tryInfo/batch',
method: 'GET',
view: 'pages/meterManage/batch',
src: '/meterManage/batch'
}
];
\ No newline at end of file
... ...
... ... @@ -172,7 +172,6 @@
<label class="col-sm-1 control-label">货品季<span class="red">*</span></label>
<div class="col-sm-1">
<select id="goodsSeason" class="form-control" value="[[goodsSeason]]">
<option value="0">四季</option>
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
... ... @@ -360,30 +359,30 @@
[[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.text]]">[[item.text]]</label>
<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]]"/>
<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.text]]">[[item.text]]</label>
<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]]" />
<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" data-index='[[__index]]' value="[[val||'']]" [[required]]>
<select class="form-control attr_input" style="width: 280px" data-index='[[__index]]' value="[[__val||'']]" [[required]]>
<option value="">请选择</option>
[[each idNameList as item index ]]
<option value="[[item.text]]">[[item.text]]</option>
<option value="[[item.id]]">[[item.text]]</option>
[[/each]]
</select>
[[/if]]
[[if inputType=='text']]
<input type="text" class="form-control attr_input" data-index='[[__index]]' value="[[val||'']]" [[required]] maxlength='[[maxValueLen]]' placeholder="[[attributeName]]"/>
<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>
... ...
... ... @@ -97,6 +97,7 @@
<button class="btn btn-primary apply-success">通过</button>
<button class="btn btn-primary apply-back">驳回</button>
[[/if]]
<button onclick="history.go(-1);" type="button" class="btn btn-primary btn-info">返回</button>
</div>
</form>
</div>
... ... @@ -128,7 +129,7 @@
<span>[[item.factoryGoodsName||""]]</span>
</th>
<th>
<span>[[item.productSkn]]</span>
<span>[[_item.productSku]]</span>
<span>[[_item.sizeName]]</span>
</th>
<th>[[_item.salePrice]]</th>
... ...
... ... @@ -142,8 +142,8 @@
</div>
<div class="row" style="margin: 0 0 0 -5px;">
<a id="onshelve" href="javascript:;" class="btn btn-default" >上架</a>
<a id="offshelve" href="javascript:;" class="btn btn-default">下架</a>
<a id="onshelve" href="javascript:;" class="btn btn-info" >上架</a>
<a id="offshelve" href="javascript:;" class="btn btn-info">下架</a>
<a id="export-btn" href="javascript:;" class="btn btn-info">导出</a>
<a id="import-btn" href="/goods/netsale/batch" class="btn btn-info">批量(排序、款型系列)</a>
</div>
... ... @@ -225,10 +225,10 @@
<span>[[item.stock]]</span>
<span>[[ ["下架","上架"][item.status] ]]</span>
<span>
[[if item.state]]
<a class="btn btn-success btnsku" data-subindex='[[index]]' data-index=[[__index]] href="javascript:;">上架</a>
[[else]]
[[if item.status]]
<a class="btn btn-danger btnsku" data-subindex='[[index]]' data-index=[[__index]] href="javascript:;">下架</a>
[[else]]
<a class="btn btn-success btnsku" data-subindex='[[index]]' data-index=[[__index]] href="javascript:;">上架</a>
[[/if]]
</span>
</div>
... ...
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="">试穿信息管理</a></li>
<li>
试穿信息
</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>文件上传</h4>
</div>
</div>
</div>
</div>
</div>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<table class="table table-bordered">
<tr>
<td rowspan="2">试穿信息</td>
<td>上传EXCEL:</td>
<td>
<div class="panel-col" style="position: relative;">
<input id="productModelTry" name="file" data-type="productModelTry" type="file"
style="cursor: pointer; height: 37px; top: 8px;">
<div class="file-name btn btn-default">上传本地文件</div>
</div>
</td>
</tr>
<tr>
<td>说明:</td>
<td colspan="2">
1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
2、第一行标题栏:<span style="color: red;">试穿模特ID|sku|试穿描述|试穿备注</span><br>
3、<a href="{{domain}}/common/productModelTry.xlsx">下载样例</a>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="panel panel-primary-head">
<div class="panel-body red" id="message">
</div>
</div>
\ No newline at end of file
... ...
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href="#"><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="#">试穿管理</a></li>
<li>试穿信息</li>
</ul>
<h4>试穿详情</h4>
</div>
</div>
</div>
<div class="contentpanel">
<div class="contentpanel1">
</div>
<div class="col-sm-4">
<a class="btn btn-info addInfo" id="addInfo">保存</a>
<!--<a class="btn btn-primary back" >返回</a>-->
</div>
</div>
<script type="text/template" id="template">
<div>
<h4>SKN</h4>
</div>
<table class="table table-bordered">
<tbody>
[[each modelLists as item index]]
<tr>
<th>
<span>[[item.modelName]]</span>
</th>
<th>
<select name="fit_size" data-name="fit_size" data-index="[[index]]" title="" class="select2-offscreen brandBtn-group fit_size tryInfo1">
<option value='[[item.tryInfo.fit_size]]'>[[item.tryInfo.fit_size||'请选择试穿尺码']]</option>
</select>
</th>
<th>
<select name="status" value="[[item.tryInfo.feel_id]]" data-name="feel_id" data-index="[[index]]" title="" class="select2-offscreen brandBtn-group tryInfo1">
<option value="-1">[['请选择试穿描述']]</option>
</select>
</th>
<th>
<input type="text" data-name="fit_remark" data-index="[[index]]" value="[[item.tryInfo.fit_remark]]" name="fit_remark" id="fit_remark" class="tryInfo1 "
placeholder="添加备注,不超过12字">
</th>
</tr>
[[/each]]
</tbody>
</table>
</script>
... ...
... ... @@ -22,17 +22,17 @@
<div class="contentpanel">
<div class="panel panel-default" style="...">
<div class="panel-heading">
<a class="btn btn-success " id="add-content"><i class="fa fa-plus"></i> excel导入</a>
<a class="btn btn-success " id="add-content" href="/meterManage/tryInfo/batch"><i class="fa fa-plus"></i> 上传excel文件</a>
</div>
<div class="panel-body">
<div class="row">
<div class="panel-col">
<input type="text" value="" name="productSku" id="content-filter1" placeholder="SKU"
class="form-control">
class="form-control">
</div>
<div class="panel-col">
<input type="text" value="" name="productSkn" id="content-filter2" placeholder="SKN"
class="form-control">
class="form-control">
</div>
<div class="panel-col">
<input type="text" value="" name="productName" id="content-filter3" placeholder="产品名称"
... ... @@ -48,3 +48,5 @@
<div id="content-list"></div>
</div>
... ...
... ... @@ -52,13 +52,13 @@
</div>
<script type="text/template" id="template">
<div class="rows" id="baseform" >
<div class="rows" id="baseform" style="height: 400px;overflow: auto">
<div class="form-group">
<label class="col-sm-2 control-label" for="avatar">头像</label>
<input type="hidden" value="[[id]]" id="id"/>
<div class="col-sm-6">
<input type="file" value="[[avatar]]" class="form-control" id="avatar" />
<input type="file" value="[[avatar]]" class="form-control avatar" id="avatar" name="avatar" />
</div>
</div>
<div class="form-group">
... ... @@ -130,7 +130,7 @@
<label class="col-sm-2 control-label" for="modelCard">模特卡</label>
<div class="col-sm-10">
<input type="file" value="[[modelCard]]" class="form-control" id="modelCard" />
<input type="file" value="[[modelCard]]" class="form-control modelCard" id="modelCard" name="modelCard"/>
</div>
</div>
</div>
... ...
... ... @@ -24,11 +24,11 @@
<div class="panel-body">
<div class="row">
<div class="panel-col2">
<input type="text" id="startTime" class="form-control panel-input hasDatepicker" name="start_time"
<input type="text" id="starttime" class="form-control panel-input hasDatepicker" name="start_time"
placeholder="开始时间" value="">
</div>
<div class="panel-col2">
<input type="text" id="endTime" class="form-control panel-input hasDatepicker" name="end_time"
<input type="text" id="endtime" class="form-control panel-input hasDatepicker" name="end_time"
placeholder="结束时间" value="">
</div>
<div class="panel-col">
... ... @@ -56,19 +56,22 @@
<!--上传图片-->
<script type="text/template" id="template1">
<div class="rows" style="height: 400px;overflow: auto">
<div class="form-group">
<label class="col-sm-2 control-label" for="Sku">SKU</label>
<div class="col-sm-6">
<input type="text" value="[[productSku]]" class="form-control" id="Sku" />
<input type="text" value="[[productSku]]" class="form-control" id="Sku"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">图片</label>
<div class="cover-image-list col-sm-10" id="addPic">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">图片</label>
<label class="col-sm-2 control-label"></label>
<ul class="cover-image-list col-sm-10" style="padding: 0;margin: 0;">
<li class="cover-image-item fileinput-button">
<div class="goods-img">
... ... @@ -83,14 +86,43 @@
<script type="text/template" id="template2">
<ul class="cover-image-list col-sm-10" style="padding: 0;margin: 0;">
[[each pictureBoList as _item _index]]
<li class="cover-image-item" data-index=[[_index]]>
<li class="cover-image-item" data-index=[[_index]] >
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[_item.fileName]]">
</a>
<i class="remove-item-btn glyphicon glyphicon-remove-circle"></i>
<i class="remove-item-btn glyphicon glyphicon-remove-circle" ></i>
</div>
</li>
[[/each]]
</ul>
</script>
<script type="text/template" id="template3">
<div class="row" style="height: 400px;overflow: auto">
<div class="form-group">
<label class="col-sm-2">SKN</label>
<div class="col-sm-6">
<input type="text" value=[[productSkn]] disabled="disabled">
</div>
</div>
<div class="form-group">
<label class="col-sm-2">图片</label>
<div class="col-sm-10">
<ul class="cover-image-list col-sm-10" style="padding: 0;margin: 0;">
[[each pictureBoList as _item _index]]
<li class="cover-image-item" data-index=[[_index]]>
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[_item.fileName]]">
</a>
<i class="remove-item-btn glyphicon glyphicon-remove-circle"></i>
</div>
</li>
[[/each]]
</ul>
</div>
</div>
</div>
</script>
... ...
... ... @@ -83,31 +83,27 @@
[[/each]]
</div>-->
<script type="text/template" id="addInfoTemp">
[[each attributes as a index]]
[[if index=="data"]]
[[each a as b index]]
<div class="attribute-group form-group">
<label>[[b.attributeName]]</label>
[[if b.inputType=='select']]
<div style="display: inline-block;width: 280px;">
<select class="form-control" id="[[b.attributeId]]" value="[[b.selectedValues||'']]">
[[each b.idNameList as c index]]
<option value="[[c.id]]">[[c.text]]</option>
[[/each]]
</select>
</div>
[[else]]
<span>
[[each data as b index]]
<div class="attribute-group form-group">
<label>[[b.attributeName]]</label>
[[if b.inputType=='select']]
<div style="display: inline-block;width: 280px;">
<select class="form-control" id="[[b.attributeId]]" value="[[b.selectedValues||'']]">
[[each b.idNameList as c index]]
<label style="cursor: pointer;"><input name="[[b.attributeId]]" type="[[b.inputType]]" value="[[c.id]]">[[c.text]]</label>
<option value="[[c.id]]">[[c.text]]</option>
[[/each]]
</span>
<input id="[[b.attributeId]]" type="hidden" for="[[b.inputType]]" value="[[b.selectedValues||'']]">
[[/if]]
</select>
</div>
[[/each]]
[[/if]]
[[else]]
<span>
[[each b.idNameList as c index]]
<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||'']]">
[[/if]]
</div>
[[/each]]
<div id="brandModelWrap" class="form-group">
<label>品牌款型:</label>
... ... @@ -141,7 +137,7 @@
<input id="salesPhrase" class="form-control" type="text" value="[[salesPhrase]]" style="display: inline-block;width: 280px;">
</div>
<div class="form-group">
<label>是否销:</label>
<label>是否销:</label>
<span>
<label class="radio-inline"><input type="radio" name="isHostsell" value="Y"></label>
<label class="radio-inline"><input type="radio" name="isHostsell" value="N"></label>
... ...
... ... @@ -7,12 +7,8 @@
<h2 class="panel-title">(商品)品牌关联</h2>
</div>
<div id="brandWrap" class="panel-body">
<div class="form-group selected-brand" style="min-height: 60px;">
</div>
<div class="form-group brand-list">
</div>
<div class="form-group selected-brand" style="min-height: 60px;"></div>
<div id="brand-list" class="form-group brand-list"></div>
</div>
<div class="panel-footer">
<a id="saveBrandRelation" href="javascript:;" class="btn btn-primary">保存</a>
... ... @@ -25,9 +21,11 @@
<div class="col-sm-1" style="text-align:center;">[[index]]</div>
<div class="col-sm-10">
[[each item as a index]]
<div class="col-sm-2 ckbox ckbox-default">
<input id="brand-[[a.brandName]]" name="brandRelationList" type="checkbox" value="[[a.id]]" data-name="[[a.brandName]]">
<label style="width:80%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" for="brand-[[a.brandName]]">[[a.brandName]]</label>
<div class="col-sm-2">
<label style="width:80%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;cursor: pointer;">
<input name="brandRelationList" type="checkbox" value="[[a.id]]" data-name="[[a.brandName]]">
[[a.brandName]]
</label>
</div>
[[/each]]
</div>
... ...
... ... @@ -39,12 +39,22 @@
[[if b.idNameList && b.idNameList.length>0]]
<div class="goods-param-group form-group">
<label>[[b.attributeName]]</label>
<span>
[[if b.inputType=='select']]
<div style="display: inline-block;width: 280px;">
<select class="form-control" id="[[b.attributeId]]" value="[[b.selectedValues||'']]">
[[each b.idNameList as c index]]
<option value="[[c.id]]">[[c.text]]</option>
[[/each]]
</select>
</div>
[[else]]
<span>
[[each b.idNameList as c index]]
<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]]" required="required">
</span>
<input id="[[b.attributeId]]" type="hidden" for="[[b.inputType]]" value="[[b.selectedValues||'']]">
[[/if]]
</div>
[[/if]]
[[/each]]
... ...