Authored by 陶雨

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

... ... @@ -7,11 +7,7 @@ require('../util/custom.js');
*/
window.NETSALEDATA = require('./partials/data.js');
// console.log(NETSALEDATA);
// window.NETSALEEDIT = new common.edit('#netsaleAllInfo', {
// bucket: 'goodsimg'
// });
window.GOLABDATA={
on:function(key,callback){
var that=this;
... ... @@ -21,7 +17,7 @@ window.GOLABDATA={
if(!that.registerEvent[key]){
that.registerEvent[key]=[];
}
if(!~Util.Array.indexOf(that.registerEvent,key)){
if(that.registerEvent.indexOf(key)==-1){
that.registerEvent[key].push(callback);
}
},
... ... @@ -44,7 +40,6 @@ if(NETSALEDATA&&NETSALEDATA.baseProductInfo&&NETSALEDATA.baseProductInfo.basePro
$('#productSkn').val(NETSALEDATA.baseProductInfo.baseProduct.productSkn);
}else{
common.util.__tip("SKN不存在");
return;
}
... ...
... ... @@ -80,6 +80,7 @@ e.init();
$('#saveBasicInfo').on('click', function() {
e.submit('/goods/product/saveNetSaleBaseInfo', function(option) {
var list = option.data.sellChannels.split('|').join(',');
option.data.productSkn = $('#productSkn').val();
option.data.sellChannels = list;
option.success = function(res) {
res = res.data;
... ...
... ... @@ -46,7 +46,6 @@ $('#brandWrap').on('change', 'input[name="brandRelationList"]', function() {
var $val = parseInt($(this).val()),
position = brandSelectArr.indexOf($val);
console.log($val, position);
if (position == -1) {
brandSelectArr.push($val);
$('<div class="col-sm-2" data-id="' + $val + '">' + $(this).data('name') + '</div>').appendTo($('.selected-brand'));
... ...
... ... @@ -244,6 +244,19 @@ $(document).on("click",".goods-color a",function(){
item.isDefault=$(this).hasClass("info")?"Y":"N";
});
$(document).on("click","#fenMainSave",function(){
var data=GOLABDATA.fire("weiqingting");
console.log(data);
common.util.__ajax({
url:'/netSale/manageProductImg',
data:data
},function(data){
console.log(data);
});
return false;
});
GOLABDATA.on("weiqingting",function(){
var map={
goodsImagesBoList:[]
};
... ... @@ -258,17 +271,7 @@ $(document).on("click","#fenMainSave",function(){
});
});
map.goodsImagesBoList=JSON.stringify(map.goodsImagesBoList);
common.util.__ajax({
url:'/netSale/manageProductImg',
data:{"goodsImagesReq":JSON.stringify(map)}
},function(data){
console.log(data);
});
return false;
});
GOLABDATA.on("weiqingting",function(){
return {"goodsImagesReq":JSON.stringify(map)}
});
... ...
... ... @@ -25,7 +25,7 @@ if(window.NETSALEDATA) {
}
$("#material").val(materials.join("|"));
e.init();
});
},true);
//洗涤提示初始化
common.util.__ajax({
... ... @@ -39,7 +39,7 @@ if(window.NETSALEDATA) {
}
$("#washTips").val(washTips.join("|"));
e.init();
});
},true);
$(document).on('change','.material', function() {
... ...
... ... @@ -38,7 +38,7 @@ new common.dropDown({
});
var e = new common.edit('#form-base',{
"bucket" : "activity"
"bucket" : "brandBanner"
});
e.init();
... ... @@ -50,7 +50,7 @@ var g = new common.grid({
seriesName: common.util.__input("models-name"),
shopsId: common.util.__input("shop"),
brandId: common.util.__input("brand"),
type: common.util.__input("productName"),
type: common.util.__input("models-type"),
status: common.util.__input("status"),
bannarImg: common.util.__input("bannarImg")
};
... ...
... ... @@ -46,6 +46,12 @@ exports.res = [
},
{
name: 'status',
type: 'Number',
},
{
name: 'orderBy',
type: 'Number',
},
... ...
... ... @@ -73,7 +73,6 @@
<div class="col-sm-3">是否VIP</div>
<div class="col-sm-3">预计上架时间:[[expectShelfTime]]</div>
</div>
</script>
<script type="text/template" id="goodsList">
... ... @@ -116,7 +115,7 @@
<div class="col-sm-1 height40">商品短评<i class="red">*</i>:</div>
<div class="col-sm-8 height40">
[[if renderType=='edit']]
<input class="form-control" placeholder="商品短评" value="[[phrase]]" type="text" required>
<input id="phrase" class="form-control" placeholder="商品短评" value="[[phrase]]" type="text" required>
[[else]]
<span>[[phrase]]</span>
[[/if]]
... ... @@ -139,6 +138,12 @@
</div>
<div class="form-group">
<div class="col-sm-12">下架时间:售罄<span style="text-decoration:underline;">[[outSaleTime]]</span>天下架</div>
<div class="col-sm-12">下架时间:售罄
[[if outSaleTime]]
<input id="outSaleTime" value="[[outSaleTime]]" type="text" required>
[[else]]
<input id="outSaleTime" value="0" type="text" required>
[[/if]]
天下架</div>
</div>
</script>
\ No newline at end of file
... ...