Authored by dongjunjie

blk店铺列表,审核

... ... @@ -28,6 +28,9 @@ module.exports = function (app){
//店铺装修审核列表
app.post("/supplier/store/ajax/shenhezx","shopAudit_findAuditShopsDecorator");
//店铺装修审核
//yoho店铺装修审核通过,驳回
app.post("/shop/ShopsDecoratorRest/auditShopsDecorator","shopAudit_auditShopsDecorator");
//blk店铺装修审核通过,驳回
app.post("/shop/ShopsDecoratorRest/auditBlkShopsDecorator","shopAudit_auditBlkShopsDecorator");
}
\ No newline at end of file
... ...
... ... @@ -19,10 +19,10 @@ module.exports = function (app) {
app.post("/supplier/store/openShops","shopDecoration_openShops");
//blk关店
app.post("/supplier/store/closeShops","shopDecoration_closeShops");
app.post("/supplier/store/closeBlkShops","shopDecoration_closeBlkShops");
//blk开店
app.post("/supplier/store/openShops","shopDecoration_openShops");
app.post("/supplier/store/openBlkShops","shopDecoration_openBlkShops");
/******************************yoho装修*************************************/
... ... @@ -57,7 +57,7 @@ module.exports = function (app) {
//blk店铺装修审核
app.get("/shop/decoration/blkCheck/:shopsId", "shop.DecorationBLK", "shopDecoration_findBlkShopsDecoratorDetail", function (data,req,res){
data.operation = 0;
data.operation = 2;
return data;
});
... ...
... ... @@ -34,19 +34,29 @@ module.exports={
params:[
{name: 'supplierId', type: 'Number'},
{name: 'brandId', type: 'Number'},
{name: 'checkStatus', type: 'Number'}
{name: 'checkStatus', type: 'Number'},
{name: 'blkCheckStatus', type: 'Number'}
]
},
auditShopsDecorator:{
title:"店铺装修审核",
title:"yoho店铺装修审核通过,驳回",
url:"/ShopsDecoratorRest/auditShopsDecorator",
params:[
{name: 'id', type: 'Number'},
{name: 'checkStatus', type: 'Number'},
{name: 'comment', type: 'String'}
]
},
auditBlkShopsDecorator:{
title:"blk店铺装修审核通过,驳回",
url:"/ShopsDecoratorRest/auditBlkShopsDecorator",
params:[
{name: 'id', type: 'Number'},
{name: 'blkCheckStatus', type: 'Number'},
{name: 'comment', type: 'String'}
]
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -10,7 +10,8 @@
{name: 'page', type: 'number'},
{name: 'size', type: 'number'},
{name: 'shopsId', type: 'number'},
{name: 'checkStatus', type: 'number'},
{name: 'checkStatus', type: 'number'},
{name: 'blkCheckStatus', type: 'number'},
{name: 'supplierId', type: 'number'},
{name: 'brandId', type: 'number'}
]
... ... @@ -31,6 +32,22 @@
{name:"shopsId",type:"Number"}
]
},
closeBlkShops:{
title:"blk关店",
url:"/ShopsRest/closeBlkShops",
params: [
{name:"shopsId",type:"Number"}
]
},
openBlkShops:{
title:"blk开店",
url:"/ShopsRest/openBlkShops",
params: [
{name:"shopsId",type:"Number"}
]
},
/*****************店铺装修详情*********************/
... ... @@ -101,6 +118,7 @@
url:"/ShopsDecoratorRest/findBlkProductByShopsId",
params:[
{name: 'shopsId', type: 'Number'},
{name: 'productSkn', type: 'Number'},
{name: 'size', type: 'number'}
]
}
... ...
... ... @@ -29,7 +29,7 @@
</div>
<div id="operations" class="col-sm-4">
<div id="decorationBack" style="display: none; text-align: right; margin-top: -10px">
<input type="button" class="btn btn-default " value="返回" onclick="history.go(-1)">
<input type="button" class="btn btn-default " value="返回" onclick="location.href='/supplier/shop/decoration'">
</div>
<div id="decorationSubmite" style="display: none; text-align: right; margin-top: -10px">
<input id="saveDecoration" type="button" class="btn btn-success delay-btn" value="暂存">
... ... @@ -39,7 +39,7 @@
<div id="decorationCheck" style="display: none; text-align: right; margin-top: -10px">
<input id="checkOk" type="button" class="btn btn-primary delay-btn" value="审核通过">
<input id="checkNo" type="button" class="btn btn-danger delay-btn" value="驳回">
<input type="button" class="btn btn-default " value="返回" onclick="history.go(-1)">
<input type="button" class="btn btn-default " value="返回" onclick="location.href='/supplier/shop/decoration'">
</div>
</div>
</div>
... ... @@ -55,7 +55,7 @@
<div class="shopBanner canEdit" data-dialogid="shopTopBanner">
<img src="[[resources.shopTopBanner.data.shopSrc]]">
[[if resources.shopTopBanner.data.isShowShopName == "Y"]]
<h1>店铺名称</h1>
<h1>[[shopName]]</h1>
[[/if]]
</div>
... ...
... ... @@ -21,8 +21,18 @@
</select>
</div>
<div class="panel-col">
<select name="status" id="status" tabindex="-1" title="" class="form-control">
<option value="" selected="">选择状态</option>
<select name="status" id="yohoStatus" tabindex="-1" title="" class="form-control">
<option value="" selected="">YOHO状态</option>
<option value="0">待装修</option>
<option value="100">暂存</option>
<option value="200">待审核</option>
<option value="300">审核通过</option>
<option value="900">驳回</option>
</select>
</div>
<div class="panel-col">
<select name="status" id="blkStatus" tabindex="-1" title="" class="form-control">
<option value="" selected="">BLK状态</option>
<option value="0">待装修</option>
<option value="100">暂存</option>
<option value="200">待审核</option>
... ...
... ... @@ -108,7 +108,7 @@ var g1 = new common.grid({
parms: function() {
return {
shopsId: curShopId,
skn: common.util.__input("selectSkn")
productSkn: common.util.__input("selectSkn")
};
},
columns: [
... ... @@ -152,6 +152,22 @@ var e = new common.edit2(".editorMain",{bucket:"yhb-img02"});
/***************公共方法层*****************/
var Bll = {
init: function () {
switch(operation){
case 0: //查看
$('#decorationBack').show();
break;
case 1: //编辑
$('#decorationSubmite').show();
break;
case 2: //审核
$('#decorationCheck').show();
break;
default:
break;
}
this._templateRender();
},
//打开弹层
openDialog: function (id) {
curDialogId = id;
... ... @@ -230,18 +246,7 @@ var Bll = {
}
};
switch(operation){
case 0:
$('#decorationBack').show();
break;
case 1:
$('#decorationSubmite').show();
break;
default:
break;
}
Bll._templateRender();
Bll.init();
/***************事件层*****************/
... ... @@ -255,6 +260,10 @@ $(document).on("click", ".editIcon", function () {
var dialogId = $(this).parent('.canEdit').data("dialogid");
Bll.openDialog(dialogId);
});
//通过skn查询
$(document).on("click", "#filterSkn", function(){
g1.reload();
});
//input监听绑定json
$(document).on("change", ".observe", function () {
var value = $(this).val();
... ... @@ -271,6 +280,7 @@ $(document).on("click", ".productsTabs .nav-tabs li", function () {
//全部商品
if(_index == 0){
$('.filter').show();
$('#selectSkn').val('');
g1.init("/shop/decoration/findBlkProductByShopsId");
}
//已选商品
... ... @@ -317,7 +327,7 @@ $(document).on("click", ".cancelProduct2", function () {
$('.selectedProductsNum').text(curDialogData.data.length);
$(this).parent().html('<a href="javascript:" class="btn btn-success btn-xs selectProduct" data-index="'+index+'">选择</a>');
});
//暂存submitStatus=100
//暂存 submitStatus=100
$(document).on("click", "#saveDecoration", function () {
console.log(mainData);
common.util.__ajax({
... ... @@ -334,7 +344,7 @@ $(document).on("click", "#saveDecoration", function () {
}
});
});
//提交审核submitStatus=200
//提交审核 submitStatus=200
$(document).on("click", "#submitDecoration", function () {
common.util.__ajax({
url:'/shop/decoration/saveBlkShopsDecorator',
... ... @@ -344,11 +354,64 @@ $(document).on("click", "#submitDecoration", function () {
resources: JSON.stringify(mainData.resources)
}
},function(rs){
if(rs.data){
mainData = rs.data;
Bll._templateRender();
}
});
common.util.__tip("提交审核成功!","success");
setTimeout(function() {
location.href="/supplier/shop/decoration";
}, 1000);
},true);
});
//审核通过 blkCheckStatus=300
$(document).on("click", "#checkOk", function () {
common.dialog.confirm(
"审核通过确认",
"你确认<strong style='color:#5cb85c'>审核通过</strong>么?",
function(){
common.util.__ajax({
url:'/shop/ShopsDecoratorRest/auditBlkShopsDecorator',
data: {
id: mainData.id,
blkCheckStatus: 300
}
},function(rs){
common.util.__tip("审核通过成功!","success");
setTimeout(function() {
location.href="/supplier/check/index";
}, 1000);
},true);
},
function(){}
);
});
//驳回 blkCheckStatus=900
$(document).on("click","#checkNo",function(){
common.dialog.confirm(
"审核驳回",
"你确认<strong style='color:#d9534f'>审核驳回</strong>么?如果确认,<strong style='color: #f0ad4e'>请填写驳回理由!</strong>" +
"<textarea id='checkComment' class='form-control' rows='3' style='margin: 10px 0'></textarea>" +
"<div class='checkTip' style='display: none;color: #ff0000'><span>提示:请填写驳回理由!</span></div>",
function(){
var comment = $("#checkComment").val();
if(comment){
common.util.__ajax({
url:'/shop/ShopsDecoratorRest/auditBlkShopsDecorator',
data: {
id: mainData.id,
blkCheckStatus: 900,
comment: comment
}
},function(rs){
common.util.__tip("审核驳回成功!","success");
setTimeout(function() {
location.href="/supplier/check/index";
}, 1000);
},true);
}else{
$(".checkTip").show();
return false;
}
},
function(){}
);
});
/******************工具方法******************/
... ...
... ... @@ -31,7 +31,8 @@ var g = new common.grid({
parms: function() {
return {
shopsId: common.util.__input("shop-name"),
checkStatus: common.util.__input("status"),
checkStatus: common.util.__input("yohoStatus"),
blkCheckStatus: common.util.__input("blkStatus"),
supplierId: common.util.__input("supplier-name"),
brandId: common.util.__input("brand-name")
};
... ... @@ -78,7 +79,7 @@ var g = new common.grid({
}
}
}, {
display: "状态",
display: "YOHO状态",
name: "checkStatus",
render: function(item) {
if (item.checkStatus) {
... ... @@ -87,6 +88,16 @@ var g = new common.grid({
return '待装修';
}
}
},{
display: "BLK状态",
name: "blkCheckStatus",
render: function(item) {
if (item.blkCheckStatus) {
return ENUM.checkStatus[item.blkCheckStatus]
} else {
return '待装修';
}
}
}, {
display: "操作",
render: function(item) {
... ... @@ -101,7 +112,11 @@ var g = new common.grid({
}else {
HtmArr.push('<a href="/supplier/store/decorationDetail/'+item.shopsId+'/'+item.shopsType+'/editor/'+item.id+'/" class="btn btn-primary btn-xs">YOHO装修编辑</a>');
}
if (+item.checkStatus == 900) {
HtmArr.push('<a href="javascript:;" class="btn btn-warning btn-xs commentBtn" data-comment="'+item.comment+'">YOHO驳回理由</a>');
}
if(item.passStatus && +item.passStatus == 1){
if(+item.shopStatus == 1){
// 1开启 0 关闭
... ... @@ -117,14 +132,18 @@ var g = new common.grid({
HtmArr.push("<div>");
if(+item.checkStatus == 200){
if(+item.blkCheckStatus == 200){
HtmArr.push('<a href="/shop/decoration/blkView/'+item.shopsId+'" class="btn btn-info btn-xs">BLK装修查看</a>');
}else {
HtmArr.push('<a href="/shop/decoration/blkEdit/'+item.shopsId+'" class="btn btn-primary btn-xs">BLK装修编辑</a>');
}
if(item.passStatus && +item.passStatus == 1){
if(+item.shopStatus == 1){
if (+item.blkCheckStatus == 900) {
HtmArr.push('<a href="javascript:;" class="btn btn-warning btn-xs commentBtn" data-comment="'+item.comment+'">BLK驳回理由</a>');
}
if(item.blkPassStatus && +item.blkPassStatus == 1){
if(+item.blkShopStatus == 1){
// 1开启 0 关闭
HtmArr.push('<a data-index="'+item.__index+'" href="javascript:void(0);" class="closeshops_blk btn btn-danger btn-xs">BLK关店</a>');
}else{
... ... @@ -134,12 +153,6 @@ var g = new common.grid({
HtmArr.push("</div>");
/**********************驳回***************************/
if (+item.checkStatus == 900) {
HtmArr.push('<a href="javascript:void(0)" class="btn btn-warning btn-xs commentBtn" data-comment="'+item.comment+'">驳回理由</a>');
}
return HtmArr.join('');
}
}]
... ... @@ -191,11 +204,11 @@ $(document).on('click', '.openshops', function() {
//关闭blk店铺
$(document).on('click', '.closeshops_blk', function() {
var item=g.rows[$(this).data("index")];
Bll.toast("确定要关闭此BLK店铺吗?","",item.shopsId);
Bll.toast("确定要关闭此BLK店铺吗?","/supplier/store/closeBlkShops",item.shopsId);
});
//开启blk店铺
$(document).on('click', '.openshops_blk', function() {
var item=g.rows[$(this).data("index")];
Bll.toast("确定要开启此BLK店铺吗?","",item.shopsId);
Bll.toast("确定要开启此BLK店铺吗?","/supplier/store/openBlkShops",item.shopsId);
});
\ No newline at end of file
... ...
... ... @@ -69,7 +69,8 @@ var g = new common.grid({
"brandId": common.util.__input("brand-name"),
"checkStatus": (+t.active) ? 200 : common.util.__input("status"),
"operationStatus": authority.operationStatus,
"checkStatusArr": authority.checkStatusArr
"checkStatusArr": authority.checkStatusArr,
"blkCheckStatus": 200
};
},
columns: [
... ... @@ -97,8 +98,14 @@ var g = new common.grid({
display: "操作", name: "", render: function (item) {
var HtmArr = [];
if (t.active == "1") {
HtmArr.push('<a href="/supplier/store/decorationDetail/' + item.shopsId + '/' + item.shopsType + '/check/' + item.id + '/" class="btn btn-info btn-xs">装修查看</a>');
if (t.active == "1") { //店铺装修审核
if(+item.checkStatus == 200){
HtmArr.push('<a href="/supplier/store/decorationDetail/' + item.shopsId + '/' + item.shopsType + '/check/' + item.id + '/" class="btn btn-info btn-xs">YOHO装修查看</a>');
}
if(+item.blkCheckStatus == 200){
HtmArr.push('<a href="/shop/decoration/blkCheck/'+item.shopsId+'" class="btn btn-info btn-xs">BLK装修查看</a>')
}
} else {
HtmArr.push('<a href="/supplier/store/' + authority.info + '/' + item.shopsId + '" href="javascript:void(0);" class="btn btn-info btn-xs">查看</a>');
}
... ...