...
|
...
|
@@ -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(){}
|
|
|
);
|
|
|
});
|
|
|
|
|
|
/******************工具方法******************/
|
...
|
...
|
|