Authored by 马力

Merge branch 'dev_店铺装修优化_15353' into grey

# Conflicts:
#	dist/yohobuy-portal-fe/5.0.2/index.min.css
#	dist/yohobuy-portal-fe/5.0.2/jquery/SNS.ShareOrderAudit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/activity.yohocoin.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/baserule.CateSize.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/baserule.CateSizeAttr.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/baserule.Porattr.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/brand.Edit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/goods.basegoods.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/goods.netsale.Edit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/goods.netsale.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/goods.productdesc.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/goods.yohoCoin.Audit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/goods.yohoCoin.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/guang.articleCategory.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/guang.author.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/guang.brandConcern.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/guang.comment.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/guang.info.Edit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/guang.info.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/guang.plusStar.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/guang.plusStarCategory.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/guang.tag.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/guang.tagCategory.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/help.Category.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/help.Content.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/libs.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.BrandCoupon.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.CouponList.AddOrUpdate.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.CouponList.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.CouponSend.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.CouponSend.PublicCoupon.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.CouponSend.Send.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.CouponSend.SendHistory.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.CouponSend.UseHistory.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.LimitCode.Edit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.LimitCode.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.LimitCode.Info.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.ProductPool.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.PromotionCode.Edit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.PromotionCode.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.QueryCoupon.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.Vip.Add.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/marketing.Vip.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.activitytemplate.Edit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.activitytemplate.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.activitytemplate.Product.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.category.Edit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.category.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.couponActivity.Add.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.couponActivity.Edit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.couponActivity.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.couponSend.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.entrance.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.generateLinks.Batch.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.generateLinks.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.hotRankTag.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.hotsuggest.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.icon.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.limit.Edit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.limit.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.notice.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.officialAccounts.Edit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.officialAccounts.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.payment.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.productSingleDay.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.salecategory.Edit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.salecategory.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.salecategory.TagMgmt.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.shopsVersionUpdate.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.staticFile.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.subject.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.suggest.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.version.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.webshare.Edit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.webshare.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/operations.ziplist.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/resource.platformManage.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/resource.resourceManage.ContentManage.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/resource.resourceManage.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/resource.resourceSortManage.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/searchWords.HotBrand.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/searchWords.SearchWords.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shootMeter.MeterSize.Add.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shootMeter.MeterSize.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shootMeter.Model.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shootMeter.ProPhoto.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shootMeter.ShootRequire.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shootMeter.TryInfo.Batch.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shootMeter.TryInfo.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shootMeter.TryModel.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shop.Administrator.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shop.Decoration.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shop.DecorationBLK.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shop.DecorationList.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shop.Edit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shop.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shop.Info.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shop.ShopCategory.Batch.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shop.ShopCategory.Edit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shop.ShopCategory.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shop.ShopCategory.Info.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/shop.batch.importShopsPromote.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/supplier.Edit.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/supplier.Index.js
#	dist/yohobuy-portal-fe/5.0.2/jquery/supplier.Info.js
#	server/controllers/goods.basegoods.js
#	server/controllers/goods.netsale.js
#	server/controllers/goods.priceManage.js
#	server/controllers/resource.resource.js
#	server/controllers/searchWords.index.js
#	server/controllers/shop.shopCategory.js
#	server/index.js
#	server/interfaces/common.upload.js
#	server/interfaces/goods.netsale.js
#	server/interfaces/goods.price.js
#	server/interfaces/resource.resource.js
#	server/interfaces/searchWords.index.js
#	server/interfaces/shop.shopCategory.js
#	server/views/operations/notice/Index.html
#	server/views/resource/__partail/jiangming.html
#	server/views/resource/__partail/taoyu.html
#	server/views/resource/__partail/taoyu2.html
#	server/views/resource/__partail/weiqingting.html
#	server/views/resource/resourceManage/Index.html
#	server/views/searchWords/SearchWords/Index.html
... ... @@ -24,4 +24,7 @@ module.exports = function (app){
//根据品牌选择供应商
app.post("/supplier/storeadmin/supplierlist","shopAdministrator_selectSupplierByBrandId");
// 查询店铺管理员列表,筛选框
app.post("/supplier/storeadmin/adminList", "shopAdministrator_getAllShopAdminProfile");
}
\ No newline at end of file
... ...
... ... @@ -6,7 +6,9 @@ module.exports={
url:"/ShopsAdminRest/getShopsAdminList",
params:[
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'}
{name: 'size', type: 'Number'},
{name: 'shopsId', type: 'Number'},
{name: 'adminPid', type: 'Number'}
]
},
... ... @@ -46,6 +48,11 @@ module.exports={
{name:"brandId",type:"Number"}
]
},
getAllShopAdminProfile:{
title: "获取所有的店铺管理员信息",
url: "/ShopsAdminRest/getAllShopAdminProfile"
}
}
}
... ...
... ... @@ -6,6 +6,24 @@
<a class="add btn btn-success"><i class="fa fa-plus"></i> 创建店铺管理员关系</a>
</div>
<input type="hidden" id="url" value="/supplier/storeadmin/indexPage">
<div class="panel-body">
<div class="row">
<div class="panel-col2">
<select name="shop-name" id="shop-name" style="width: 280px;" tabindex="-1" title="" class="form-control">
<option value="-1">请选择店铺</option>
</select>
</div>
<div class="panel-col2">
<select name="admin-name" id="admin-name" style="width: 280px;" tabindex="-1" title="" class="form-control">
<option value="-1">请选择管理员</option>
</select>
</div>
<div class="panel-col2">
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="" class="btn btn-info">全部</a>
</div>
</div>
</div>
<div class="panel panel-primary-head">
<div id="basicTable_wrapper" class="dataTables_wrapper no-footer">
<div class="dataTables_length" id="basicTable"></div>
... ...
... ... @@ -43,7 +43,7 @@
aria-describedby="basic-addon2" required>
<span class="input-group-addon" id="basic-addon2">.yohobuy.com</span>
</div>
<p style="margin-top: 10px"><span class="red">注:1. 4-32个字符;2. 只能填英文、数字和破折号-,不区分大小写,不能以破折号开头或者结尾</span></p>
<p style="margin-top: 10px"><span class="red">注:1. 1-32个字符;2. 只能填英文、数字和破折号-,不区分大小写,不能以破折号开头或者结尾</span></p>
</div>
</div>
<div class="form-group">
... ...
... ... @@ -3,12 +3,23 @@
var $ = require('jquery'),
common=require('../../common/common');
// 筛选项
new common.dropDown({el:"#shop-name",ajax:"shopsRest"});
selectAllManagerInfo();
var g=new common.grid({
el:'#basicTable',
parms: function() {
return {
'shopsId': common.util.__input('shop-name'),
'adminPid': common.util.__input('admin-name')
}
},
columns:[
{display:"ID",name:"id"},
{display:"店铺名称",name:"shopName"},
{display:"店铺管理员",name:"adminName"},
{display:"部门",name:"deptName"},
{display:"创建时间",name:"createTime"},
{display:"更新时间",name:"updateTime"},
{display:"操作",name:"",render:function(item){
... ... @@ -51,7 +62,11 @@ var $ = require('jquery'),
if(+item.pid==eqid){
$option.attr("selected","selected");
}
$option.html(item.truename);
var content = item.truename;
if(item.deptName) {
content += '(' + item.deptName +')';
}
$option.html(content);
$("#manager-name").append($option);
})
};
... ... @@ -114,3 +129,34 @@ var $ = require('jquery'),
});
function selectAllManagerInfo() {
common.util.__ajax({
url: '/supplier/storeadmin/adminList'
}, function(res) {
$('#admin-name').html('<option value="">请选择管理员</option>');
if(res.data&&res.data.length>0){
$.each(res.data,function(index,item){
var $option=$("<option></option>");
$option.attr("value",item.pid);
var content = item.truename;
// 将"真实姓名"为空的数据排除
if(content === undefined || content.length === 0) {
return;
}
if(item.deptName) {
content += '(' + item.deptName +')';
}
$option.html(content);
$("#admin-name").append($option);
})
};
new common.dropDown({el:"#admin-name"});
}, true);
}
$(document).on('click', '#filter-btn', function() {
g.reload(1);
});
... ...
... ... @@ -49,11 +49,13 @@ var g = new common.grid({
render: function(item) {
console.log(item);
if (item.brands instanceof Array && item.brands.length > 0) {
var html = '';
var brandArr = [];
$.each(item.brands, function(i, value) {
html += value.brandName + '<br>';
if($.inArray(value.brandName, brandArr) === -1) {
brandArr.push(value.brandName);
}
});
return html;
return '<p>' + brandArr.join('</p><p>') + '</p>';
} else {
return '';
}
... ...
... ... @@ -276,7 +276,7 @@ e.on("validate", function() {
if(shopDomainVal) {
var shopDomainPattern = new RegExp("^[a-zA-Z0-9]([a-zA-Z0-9-])*[a-zA-Z0-9]$");
if(shopDomainVal.length < 4 || shopDomainVal.length > 32) {
if(shopDomainVal.length < 1 || shopDomainVal.length > 32) {
return "店铺域名输入有误!";
}
... ... @@ -289,7 +289,7 @@ e.on("validate", function() {
e.init();
var submit=function(callback){
e.submit($("#storeForm").attr("action"),function(option){
var result = e.submit($("#storeForm").attr("action"),function(option){
option.data=$.extend({},option.data,_arr);
option.data.shopIntro = UMshopintro.getContent();
console.log(option.data);
... ... @@ -301,24 +301,38 @@ var submit=function(callback){
},'growl-success');
}else{
e.$tip(res.message);
$(".btn-cun").removeAttr("disabled");
$(".btn-success").removeAttr("disabled");
}
return false;
},
option.error=function(res){
e.$tip("提交失败");
$(".btn-cun").removeAttr("disabled");
$(".btn-success").removeAttr("disabled");
}
callback&&callback(option.data);
});
// 发生校验错误
if(result === false) {
$(".btn-cun").removeAttr("disabled");
$(".btn-success").removeAttr("disabled");
}
};
//提交
$(".btn-success").click(function(){
// 为防止同时触发 "提交审核" 和 "暂存",对按钮做灰化处理
$(".btn-cun").attr("disabled", true);
submit(function(item){
item.onCheck=1;
});
});
//暂存
$(".btn-cun").click(function(){
// 为防止同时触发 "提交审核" 和 "暂存",对按钮做灰化处理
$(".btn-success").attr("disabled", true);
submit(function(item){
item.onCheck=0;
});
... ...
... ... @@ -16,26 +16,30 @@ var t = new common.tab({
g.options.columns[1].name = "shopsName";
g.options.columns[2] = {
display: "包含品牌", name: "brands", render: function (item) {
var str = '';
var brandArr = [];
if (item.brands) {
$.each(item.brands, function (index, a) {
str += '<p>' + a.brandName + '</p>';
if($.inArray(a.brandName, brandArr) === -1) {
brandArr.push(a.brandName);
}
});
}
return str;
return '<p>' + brandArr.join('</p><p>') + '</p>';
}
};
} else {
g.options.columns[1].name = "shopName";
g.options.columns[2] = {
display: "包含品牌", name: "shopRelationList", render: function (item) {
var str = '';
var brandArr = [];
if (item.shopRelationList) {
$.each(item.shopRelationList, function (index, a) {
str += '<p>' + a.brandName + '</p>';
if($.inArray(a.brandName, brandArr) === -1) {
brandArr.push(a.brandName);
}
});
}
return str;
return '<p>' + brandArr.join('</p><p>') + '</p>';
}
};
... ... @@ -78,13 +82,16 @@ var g = new common.grid({
{display: "店铺名称", name: "shopName"},
{
display: "包含品牌", name: "shopRelationList", render: function (item) {
var str = '';
var brandArr = [];
if (item.shopRelationList) {
$.each(item.shopRelationList, function (index, a) {
str += '<p>' + a.brandName + '</p>';
if($.inArray(a.brandName, brandArr) === -1) {
brandArr.push(a.brandName);
}
});
}
return str;
return '<p>' + brandArr.join('</p><p>') + '</p>';
}
},
{display: "创建时间", name: "createTime"},
... ...