Authored by weiqingting

提交

... ... @@ -239,11 +239,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()){
... ... @@ -425,8 +425,8 @@ e.on("validate",function(){
if(_count>0){
return "同一颜色包含两组相同尺码";
}
if(_count1>0&&common.util.__input("supplierId")){
return "JIT商品条码不能重复";
if(_count1>0){
return "商品条码不能重复";
}
});
e.on("validate",function(){
... ...
... ... @@ -14,13 +14,13 @@ var config = {
apiKey: 'sd4H1ecAqlp',
//http: //192.168.102.214:8088/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://172.16.9.8:8080/yohobuy-platform-web',//葛超
domain: 'http://192.168.102.202:8088/platform',
// domain: 'http://192.168.102.202:8088/platform',
//domain: 'http://172.16.6.239:8080', //孙杰翔
loggers: {
api: {
... ...
... ... @@ -3,7 +3,7 @@
* @type {Object}
*/
module.exports = {
url:'http://admin.portal.yohobuy.com',
url:'http://admin.yohobuy.com',//'http://admin.portal.yohobuy.com',
sessionKeep:'/account/profile/display',
timeout:30000
};
\ No newline at end of file
... ...
... ... @@ -25,21 +25,20 @@ var errorMessage = {
util.setLogger(res.app.logger);
var options = {
url:oldService.login,
form:{
account:user,
password:password,
website:WEBSITE
}
form:'["'+user+'","'+password+'",1]'
}
//调用登陆
util.httpCall(options,function(err,ret){
console.log("************************************");
console.log(ret);
if(err) {
res.json(errorMessage);
return;
} else {
//调用菜单
_callGetMenu(ret.data.pid,function(err,data){
_callGetMenu(ret.data.pid,ret.data.role_id,function(err,data){
if(err) {
res.json(errorMessage);
} else {
... ... @@ -66,21 +65,18 @@ var errorMessage = {
* @param {Number} pid 操作员ID
* @param {Function} callback 回调
*/
function _callGetMenu(pid,callback) {
function _callGetMenu(pid,roleid,callback) {
var options = {
url:oldService.getResourceByPid,
form:{
pid:pid,
website:WEBSITE
}
form:'['+pid+','+roleid+',1]'
}
console.log(options);
util.httpCall(options,function(err,ret){
if(err) {
callback(err);
} else {
var menuData = {menu:[],right:{}};
if(ret.data && ret.data.length>0) {
if(ret.data) {
menuData = _makeMenu(ret.data);
}
_getAllMenu(function(ret){
... ... @@ -103,9 +99,9 @@ function filterRight(ret,menuData) {
var noRight = {};
//匹配没有权限
_.forEach(ret,function(v,k){
if(v.module_url!=='') {
if(!menuData.right[v.module_url]) {
noRight[v.module_url] = true;
if(v.menu_url!=='') {
if(!menuData.right[v.menu_url]) {
noRight[v.menu_url] = true;
}
}
});
... ... @@ -140,27 +136,51 @@ function _getAllMenu (callback) {
function _makeMenu (data) {
var menu = [];
var right = {};
_.forEach(data,function(v){
var item = {
title:v.resource_name,
for(var key in data){
var v=data[key];
var item = {
title:v.menu_name,
}
if(v.parent_id === "0") {
item.parent = 'menu-template';
var itemSubs = [];
_.forEach(v.sub,function(val) {
var sub = {
title:val.resource_name,
href:val.module_url,
title:val.menu_name,
href:val.menu_url,
icon: 'list-alt'
}
right[val.module_url] = true;
right[val.menu_url] = true;
itemSubs.push(sub);
});
item.menu = itemSubs;
}
menu.push(item);
});
}
// _.forEach(data,function(v){
// var item = {
// title:v.menu_name,
// }
// if(v.parent_id === "0") {
// item.parent = 'menu-template';
// var itemSubs = [];
// _.forEach(v.sub,function(val) {
// console.log(v.sub);
// var sub = {
// title:val.menu_name,
// href:val.menu_url,
// icon: 'list-alt'
// }
// right[val.menu_url] = true;
// itemSubs.push(sub);
// });
// item.menu = itemSubs;
// }
// menu.push(item);
// });
return {
menu:menu,
... ...
var oldSerDomain = 'http://service.api.yohobuy.com';
// var oldSerDomain = 'http://service.api.yohobuy.com';
// module.exports = {
// login: oldSerDomain + '/account/api/v1/profile/login',
// getResourceByPid: oldSerDomain + '/account/api/v1/profile/getResourceByPid',
// getAllResByWebsite: oldSerDomain + '/account/api/v1/resources/getAllResByWebsite'
// };
var oldSerDomain = 'http://lserve.yohobuy.com';
module.exports = {
login: oldSerDomain + '/account/api/v1/profile/login',
getResourceByPid: oldSerDomain + '/account/api/v1/profile/getResourceByPid',
getAllResByWebsite: oldSerDomain + '/account/api/v1/resources/getAllResByWebsite'
};
\ No newline at end of file
login: oldSerDomain + '/service/account/v1/Profile/login',
getResourceByPid: oldSerDomain + '/service/account/v1/Profile/getMenuByPid',
getAllResByWebsite: oldSerDomain + '/service/setting/v1/menu/getAllMenu'
};
... ...
... ... @@ -111,7 +111,7 @@
<thead>
<tr>
<th>SKC</th>
<th>SKU</th>
<th>SKN</th>
<th>销售价</th>
<th>款型编码</th>
<th>条码</th>
... ...