Authored by liuyue

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

... ... @@ -51,8 +51,12 @@ var ENUM={
}
/*下拉选择*/
new common.dropDown({el:"#shopId",ajax:"queryShopPass"});
new common.dropDown({el:"#brandId",ajax:"queryBrand"});
new common.dropDown({el:"#shopId",ajax:"queryShopPass",param:function(){
return {brandId:$("#brandId").val()}
}});
new common.dropDown({el:"#supplierId",ajax:"querySupplier"});
var e=new common.edit("#basicInfo");
... ...
... ... @@ -5,15 +5,15 @@ var $ = require('jquery');
var urlObj = {
'supplier': '/supplier/supplier/getSupplierListByIdName',
'brand': '/brand/getBrandNames',
'managerName': '/supplier/storeadmin/managerName',
'managerName': '/supplier/storeadmin/managerName',//根据身份选择管理员
'sortattribute': '/erpproduct/sortattribute/ajax/automatic', // 品类关联实物测量属性
'sortsize': '/erpproduct/sortsize/ajax/automatic',
'queryBrand': '/goods/query/brand',
'querySupplier': '/goods/query/supplier',
'queryShop': '/goods/query/shop', // 获取店铺
'queryShopPass': '/goods/query/shopPass', // 获取通过审核的店铺
'maxSort': '/goods/query/maxSort',
'shopsRest': '/ShopsRest/getShopsByName',
'sortsize': '/erpproduct/sortsize/ajax/automatic',//尺码模糊查询【验证通过】
'queryBrand': '/goods/query/brand',//查询品牌列表接口
'querySupplier': '/goods/query/supplier',//查询供应商列表接口
'queryShop': '/goods/query/shop', // 查询店铺列表接口
'queryShopPass': '/goods/query/shopPass', // 查询通过审核店铺列表接口
'maxSort': '/goods/query/maxSort',//查询一级类目列表接口
'shopsRest': '/ShopsRest/getShopsByName', // 店铺列表
'sortlist': '/product/class/queryAllProductSortList',
'productPool': '/runManage/subjectManage/queryBaseProductPoolListByName',
'firstCategory': '/operations/helpcategory/getCategoryListByPid',
... ... @@ -48,6 +48,10 @@ dropDown.prototype = {
type: 'POST',
delay: 250,
data: function(params) {
if(Object.prototype.toString.call(option.params)=="[object Function]"){
option.params=option.params();
}
var data = $.extend({}, {
idName: params.term
}, option.params || {});
... ...
... ... @@ -177,10 +177,11 @@ $(document).on("change", ".poseditimg .pos-text", function() {
//添加
$(document).on("click", "#dapeiadd", function() {
Bll.toast("添加搭配", {}, "/netSale/insertCollocation");
return false;
});
//保存
$(document).on("click", "#dapeisave", function() {
//添加的时候已经保存
});
//删除
$(document).on("click", "#dapeiTable .delete", function() {
... ... @@ -212,13 +213,13 @@ $(document).on("click", "#dapeiTable .edit", function() {
/*封面设置*/
var goodsImagesList = {};
if (window.NETSALEDATA && window.NETSALEDATA.goodsImagesList) {
goodsImagesList = window.NETSALEDATA.goodsImagesList;
var goodsList = {};
if (window.NETSALEDATA && window.NETSALEDATA.goodsList) {
goodsList = window.NETSALEDATA.goodsList;
}
console.log("封面设置", goodsImagesList);
console.log("封面设置", goodsList);
$("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), {
goodsImagesList: goodsImagesList
goodsList: goodsList
}));
common.edit.ajaxfileupload("#fenmianfile", {
params: {
... ... @@ -228,14 +229,14 @@ common.edit.ajaxfileupload("#fenmianfile", {
valid_extensions: ['gif', 'png', 'jpg', 'jpeg'],
onComplete: function(response) {
if (response.status && response.code == 200) {
var item = goodsImagesList[$(this).data("index")].goodsImagesList;
var item = goodsList[$(this).data("index")].goodsImagesList;
var data = {
"angle": 0,
"genderCover": 0,
"imageUrl": response.data,
"orderBy": item.length,
"productSkc": goodsImagesList[$(this).data("index")].productSkc,
"productSkn": goodsImagesList[$(this).data("index")].productSkn,
"productSkc": goodsList[$(this).data("index")].productSkc,
"productSkn": goodsList[$(this).data("index")].productSkn,
"__index": item.length,
"index": $(this).data("index")
};
... ... @@ -251,7 +252,7 @@ common.edit.ajaxfileupload("#fenmianfile", {
$(document).on("click", ".cover-color .btn-metro", function() {
var index = $(this).parents("ul").data("index");
var index1 = $(this).parents(".cover-image-item").data("index");
var item = goodsImagesList[index].goodsImagesList[index1];
var item = goodsList[index].goodsImagesList[index1];
if ($(this).hasClass("info")) {
$(this).removeClass("info");
} else {
... ... @@ -265,7 +266,7 @@ $(document).on("click", ".cover-color .btn-metro", function() {
});
$(document).on("click", ".goods-color a", function() {
var index = $(this).data("index");
var item = goodsImagesList[index];
var item = goodsList[index];
if ($(this).hasClass("info")) {
$(this).removeClass("info");
} else {
... ... @@ -301,4 +302,6 @@ GOLABDATA.on("fenmian", function() {
return {
"goodsImagesReq": JSON.stringify(map)
}
});
\ No newline at end of file
});
... ...
... ... @@ -42,7 +42,7 @@ var $ = require('jquery');
onClick:function(url, item, hint) {
var e = new common.edit("#baseform");
// console.log(item);
console.log(item);
common.dialog.confirm(hint,
common.util.__template($("#template").html(), item),
function() {
... ... @@ -72,7 +72,7 @@ var $ = require('jquery');
}
}
},true);
});
}
}
... ...
{
"name": "yohobuy-portal",
"version": "0.2.2",
"version": "0.2.3",
"description": "yohobuy-portal",
"keywords": [],
"homepage": "",
... ...
... ... @@ -14,20 +14,7 @@ exports.res = [
bottons:'{"edit":true}',
gridurl:'/brand/getBrandList'
},
}, {
route: '/brand/getBrandNames',
method: 'POST',
url: '/erpproduct/brands/getBrandNames',
params: [
{
name: 'idName',
type: 'String'
},{
name:'status',
type:'Number'
}
]
}, {
}, {
//品牌管理 -> 列表ajax
route: '/brand/getBrandList',
method: 'POST',
... ...
... ... @@ -571,52 +571,7 @@ exports.res = [
name: 'param',
type: 'Number'
}]
}, {
//查询店铺列表接口
route: '/goods/query/shop',
method: 'POST',
url: '/ShopsRest/queryAllShops',
params: [{
name: 'idName',
type: 'String'
}]
}, {
//查询通过审核店铺列表接口
route: '/goods/query/shopPass',
method: 'POST',
url: '/ShopsRest/selectCheckPassShopsByName',
params: [{
name: 'idName',
type: 'String'
}]
}, {
//查询品牌列表接口
route: '/goods/query/brand',
method: 'POST',
url: '/erpproduct/brands/queryAllBrands',
params: [{
name: 'idName',
type: 'String'
}]
}, {
//查询供应商列表接口
route: '/goods/query/supplier',
method: 'POST',
url: '/supplier/supplier/queryAllSupplier',
params: [{
name: 'idName',
type: 'String'
}]
}, {
//查询一级类目列表接口
route: '/goods/query/maxSort',
method: 'POST',
url: '/product/queryMaxSortByName',
params: [{
name: 'idName',
type: 'String'
}]
}, {
},{
//单个变价接口
route: '/goods/updatePrice',
method: 'POST',
... ...
... ... @@ -224,13 +224,6 @@ exports.res = [{
name: 'type',
type: 'String'
}]
},{//模糊查询
route:'/limit/xiangouID/selectActivityListForSelect',
method:'POST',
url:'/DrawlineActivityRest/selectActivityListForSelect',
params:[
{name:"idName",type:'String'}
]
},{
route:'/limit/DrawlineActivityRest/checkActivityIdExists',
method:'POST',
... ...
exports.domain = require('../config/common.js').domain;
// exports.domain = 'http://172.16.6.227:8084/yohobuy-platform-web';
// exports.domain = require('../config/common.js').domain;
exports.domain = 'http://172.16.6.227:8084/yohobuy-platform-web';
exports.res = [
//商品描述
{
... ...
... ... @@ -38,15 +38,7 @@ exports.res = [
{name:"orderBy",type:"number"}
]
},
{//尺码模糊查询【验证通过】
route:'/erpproduct/sortsize/ajax/automatic',
method:'POST',
url: '/product/querySizeByNameForSelect',
params:[
{name:"idName",type:"String"},
{name:"sortId",type:"Number"}
]
},
{//删除单个品类尺码接口【待验证】
route: '/erpproduct/sortsize/ajax/delete',
method: 'POST',
... ... @@ -103,14 +95,5 @@ exports.res = [
{name:"attributeId",type:"number"},
{name:"orderBy",type:"number"}
]
},{//添加品类关联尺码属性接口【验证通过】
route: '/erpproduct/sortattribute/ajax/automatic',
method: 'POST',
url: '/product/querySizeAttributesByName',
params:[
{name:"idName",type:"String"},
{name:"sortId",type:"Number"}
]
}
]
\ No newline at end of file
... ...
... ... @@ -287,16 +287,6 @@ exports.res = [
{name:"identity",type:"Number"}
]
},{
// 根据身份选择管理员
route: '/supplier/storeadmin/managerName',
method: 'POST',
url:"/ShopsAdminRest/getUsersByIdentity",
src:'/store/adminedit',
params:[
{name:"identity",type:"Number"},
{name:"shopsId",type:"Number"}
]
},{
// 根据品牌选择供应商
route: '/supplier/storeadmin/supplierlist',
method: 'POST',
... ... @@ -304,14 +294,6 @@ exports.res = [
params:[
{name:"brandId",type:"Number"}
]
},{
// 店铺列表
route: '/ShopsRest/getShopsByName',
method: 'POST',
url:"/ShopsRest/selectCheckPassShopsByName",
params:[
{name:"idName",type:"String"}
]
}
]
... ...
... ... @@ -249,14 +249,6 @@ exports.res = [
type: 'String'
}
]
},
//*************************************
{
route:'/supplier/supplier/getSupplierListByIdName',
method:'POST',
url: '/supplier/supplier/getSupplierListByIdName',
params:[
{name:"idName",type:"String",def: 1}
]
}
]
\ No newline at end of file
... ...
exports.staticDir = {"test":{"path":"/dist"},"preview":{"path":"http://cdn.yoho.cn/yohobuy-portal/0.2.2","md5":""},"production":{"path":"http://cdn.yoho.cn/yohobuy-portal/0.2.2","md5":""}}
\ No newline at end of file
exports.staticDir = {"test":{"path":"/dist"},"preview":{"path":"http://cdn.yoho.cn/yohobuy-portal/0.2.3","md5":""},"production":{"path":"http://cdn.yoho.cn/yohobuy-portal/0.2.3","md5":""}}
\ No newline at end of file
... ...
... ... @@ -104,23 +104,25 @@
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label">店铺 <span class="red">*</span></label>
<label class="col-sm-2 control-label">品牌 <span class="red">*</span></label>
<div class="col-sm-2">
<select id="shopId" class="form-control" required>
<option value="[[shopId||'-1']]">[[shopName||'店铺']]</option>
<select id="brandId" class="form-control" required>
<option value="[[brandId||'-1']]">[[brandName||'品牌']]</option>
</select>
</div>
<label class="col-sm-1 control-label">品牌 <span class="red">*</span></label>
<label class="col-sm-1 control-label">店铺 </label>
<div class="col-sm-2">
<select id="brandId" class="form-control" required>
<option value="[[brandId||'-1']]">[[brandName||'品牌']]</option>
<select id="shopId" class="form-control">
<option value="[[shopId||'-1']]">[[shopName||'店铺']]</option>
</select>
</div>
<label class="col-sm-1 control-label">供应商 <span class="red">*</span></label>
<label class="col-sm-1 control-label">供应商</label>
<div class="col-sm-2">
<select id="supplierId" class="form-control" required>
<select id="supplierId" class="form-control">
<option value="[[supplierId||'-1']]">[[supplierName||'供应商']]</option>
</select>
</div>
... ...
... ... @@ -15,7 +15,7 @@
</div>
</div>
<script type="text/template" id="fenmianTemp">
[[each goodsImagesList as item index]]
[[each goodsList as item index]]
<div class="form-group">
<div class="col-sm-1">
<div class="goods-img">
... ...