Authored by dongjunjie

yoho币

... ... @@ -225,7 +225,9 @@ function freshYohoCoinRowData(productSkn, yohoCoin, status){
SknDom.find(".returnYohoCoin").text(yohoCoin);
SknDom.find(".coinStatus").html(ENUM.status[status]);
if(status == 1){
SknDom.find(".operation button").hide();
SknDom.find(".operation").empty();
}else{
SknDom.find(".operation").html("<button type='button' name='修改' class='btn btn-info btn-sm btn-modify openEditor'>收起</button>");
}
}
... ... @@ -280,7 +282,7 @@ $(document).on('click', '.btn-save', function() {
//显示修改
$(document).on('click', '.btn-modify', function() {
if($(this).hasClass("openEditor")){
$(this).text("修改").removeClass("openEditor");
$(this).text($(this).attr("name")).removeClass("openEditor");
var dataForShow = $(this).parents(".dataForShow");
dataForShow.find(".dataForEditor td").hide();
dataForShow.find(".editor-yohoCoin").val(dataForShow.find(".returnYohoCoin").text());
... ... @@ -291,6 +293,12 @@ $(document).on('click', '.btn-modify', function() {
}
});
//查看驳回理由
$(document).on('click', '.noCheckReason', function() {
var reason = $(this).data("text");
common.dialog.confirm("查看驳回理由", reason, function(){}, function(){});
});
//显示批量导入
$(document).on('click', '#import-btn', function() {
$('#yohoCoin_table').hide();
... ...
... ... @@ -51,13 +51,10 @@ var g = new common.grid({
sortId: select[3] ? select[3].id : ""
};
},
columns: [{
display: 'SKN',
name: 'productSkn'
}, {
display: '商品信息',
name: 'info',
render: function(item) {
columns: [
{display: '', type: 'checkbox'},
{display: 'SKN', name: 'productSkn'},
{display: '商品信息', name: 'info', render: function(item) {
var html = ""
html += "<p>名称:" + item.productName + "</p>" + "<p>品牌:" + item.brandName + "</p>" + "<div>类目:";
if(item.maxSortName) {html += item.maxSortName;}
... ... @@ -65,56 +62,39 @@ var g = new common.grid({
if(item.smallSortName) {html += "&nbsp;>&nbsp;" + item.smallSortName;}
html += "</div>";
return html;
}
}, {
display: '供应商 / 店铺',
name: 'supplier_name',
render: function(item) {
}},
{display: '供应商 / 店铺', name: 'supplier_name', render: function(item) {
var html = '';
if (item.supplierName) {html += item.supplierName;}
if (item.shopName) {html += '&nbsp;/&nbsp;' + item.shopName;}
return html;
}
}, {
display: '性别',
name: 'gender',
render: function(item) {
return html;
}},
{display: '性别', name: 'gender', render: function(item) {
return ENUM.gender[item.gender];
}
}, {
display: '吊牌价',
name: 'retailPrice'
}, {
display: '销售价',
name: 'salesPrice'
}, {
display: '返币数',
name: 'returnCoin',
render: function(item) {
}},
{display: '吊牌价', name: 'retailPrice'},
{display: '销售价', name: 'salesPrice'},
{display: '返币数', name: 'returnCoin', render: function(item) {
return item.productPrice.returnCoin;
}
}, {
display: '状态',
name: 'status',
render: function(item) {
}},
{display: '状态', name: 'status', render: function(item) {
return ENUM.status[item.productPrice.coinStatus];
}
},{
display: '操作信息',
name: 'operateInfo',
render: function(item) {
}},
{display: '操作信息', name: 'operateInfo', render: function(item) {
var html = '';
if (item.productPrice.founder) {html += '<p>' + item.productPrice.founder + '</p>';}
if (item.productPrice.updateTime) {html += '<p>' + item.productPrice.updateTime + '</p>';}
return html;
}
}, {
display: '操作',
render: function(item) {
return '<a href="javascript:;" class="btn btn-success btn-xs btn-checkOk" data-skn="' + item.productSkn + '">审核通过</a>' +
'<a href="javascript:;" class="btn btn-danger btn-xs btn-checkNo" data-skn="' + item.productSkn + '">驳回</a>';
}
}]
return html;
}},
{display: '操作', render: function(item) {
if(item.productPrice.coinStatus == 1){
return '<a href="javascript:;" class="btn btn-success btn-xs btn-checkOk" data-skn="' + item.productSkn + '">审核通过</a>' +
'<a href="javascript:;" class="btn btn-danger btn-xs btn-checkNo" data-skn="' + item.productSkn + '">驳回</a>';
}else{
return '无操作';
}
}}
]
});
g.init($("#gridurl").val());
... ... @@ -122,6 +102,11 @@ g.init($("#gridurl").val());
$(document).on('click', '#yohoCoinNav li', function() {
$(this).addClass("active").siblings().removeClass("active");
g.reload();
if($(this).data("status") == "1"){
$("#checkOperation").show();
}else{
$("#checkOperation").hide();
}
});
//审核通过
... ...
... ... @@ -229,13 +229,21 @@
<td class="center retailPrice" style="width: 5%">[[retailPrice]]</td>
<td class="center salesPrice" style="width: 5%">[[salesPrice]]</td>
<td class="center returnYohoCoin" style="width: 5%">[[productPrice.returnCoin]]</td>
<td class="center coinStatus" style="width: 8%">[[statusName]]</td>
<td class="center coinStatus" style="width: 8%">
[[statusName]]<br>
[[if productPrice.coinStatus == 3]]
<a class="noCheckReason" href="javascript:" data-text="[[productPrice.reason]]" style="color: #ff0000">驳回理由</a>
[[/if]]
</td>
<td style="width: 12%">
[[if productPrice.founder]]<p>[[productPrice.founder]]</p>[[/if]]
[[if productPrice.updateTime]]<p>[[productPrice.updateTime]]</p>[[/if]]
</td>
[[if productPrice.coinStatus != 1]]
<td class="center operation" style="width: 5%"><button type="button" class="btn btn-primary btn-sm btn-modify">修改</button></td>
[[if productPrice.coinStatus == 0]]
<td class="center operation" style="width: 5%"><button type="button" name="设置" class="btn btn-primary btn-sm btn-modify">设置</button></td>
[[/if]]
[[if productPrice.coinStatus == 2 || productPrice.coinStatus == 3]]
<td class="center operation" style="width: 5%"><button type="button" name="修改" class="btn btn-info btn-sm btn-modify">修改</button></td>
[[/if]]
</tr>
... ...
... ... @@ -97,6 +97,11 @@
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="javascript:;" class="btn btn-info">全部</a>
</div>
<div id="checkOperation" class="panel-col" style="width: auto;">
<a id="all-checkOk" href="javascript:;" class="btn btn-success">审核通过</a>
<a id="all-checkNo" href="javascript:;" class="btn btn-danger">驳回</a>
</div>
</div>
</div>
{{/ filter}}
... ...