Authored by weiqingting

Merge branch 'release/1.6' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into release/1.6

... ... @@ -43,9 +43,7 @@ var currentSelItem;
var t = new common.tab({
el: "#basicTab",
click: function() {
var columnname = $(this).find('a').attr('columnname');
if (columnname == 'all') {
g.options.columns[1].hidden = false;
g.options.columns[2].hidden = true;
... ... @@ -86,7 +84,6 @@ var t = new common.tab({
}]
}).init(ENUM.tips);
var g = new common.grid({
el: '#basicTable',
parms: function() {
... ... @@ -94,7 +91,6 @@ var g = new common.grid({
brandId: common.util.__input("brandId"),
isPayDelivery: common.util.__input("isPayDelivery"),
checkStatus: ENUM.tab[t.active] //(t.active && t.active!='all') ? t.active : 400
};
},
columns: [{
... ... @@ -107,11 +103,6 @@ var g = new common.grid({
render: function(item) {
var html = [];
html.push("<p>" + ENUM.status[item.isPayDelivery] + "</p>");
//if (item.status == 3 || item.status == 6) {
// html.push("<p style='color:red;'>" + filterNull(item, 'rejectReason') + "</p>");
//}
return html.join('');
}
},
... ... @@ -122,20 +113,15 @@ var g = new common.grid({
render: function(item) {
var html = [];
html.push("<p>" + common.util.__filterNull(item, 'applicant') + "</p>");
return html.join('');
}
}, { //3
display: "申请时间",
hidden: true,
render: function(item) {
//var html = [];
//html.push("<p>" + common.util.__filterNull(item, 'createTime') + "</p>");
//return html.join('');
var t = new Date(item.createTime * 1000);
var formatted = common.util.__dateFormat(t, "yyyy-MM-dd hh:mm:ss");
return "<p>" + formatted + "</p>";
var html = [];
html.push("<p>" + common.util.__filterNull(item, 'createTime') + "</p>");
return html.join('');
}
},{
// 4
... ... @@ -154,9 +140,7 @@ var g = new common.grid({
html.push('<a data-index="' + item.__index + '" href="JavaScript:;" class="btn operation btn-danger btn-xs edit-class-btn" id="btn-item-close" data-type="close">关闭</a>');
} else {
html.push('<a data-index="' + item.__index + '" href="JavaScript:;" class="btn operation btn-success btn-xs edit-class-btn" id="btn-item-open" data-type="open">开启</a>');
}
return html.join('');
}
},{ // 6
... ... @@ -164,15 +148,11 @@ var g = new common.grid({
hidden: true,
render: function(item) {
var html = [];
html.push('<a data-index="' + item.__index + '" href="JavaScript:;" class="btn operation btn-danger btn-xs edit-class-btn" id="btn-item-reject" data-type="reject">驳回</a>');
html.push('<a data-index="' + item.__index + '" href="JavaScript:;" class="btn operation btn-success btn-xs edit-class-btn" id="btn-item-pass" data-type="pass">通过</a>');
return html.join('');
}
},
}
]
});
g.init('/payDelivery/queryTotalBrandPayDelivery');
... ... @@ -189,7 +169,7 @@ var loadTab = function() {
t.init(__dt);
}, true);
}, 800);
}
};
loadTab();
// 筛选
... ... @@ -206,15 +186,11 @@ $(document).on('click', "#filter-btn", function() {
$(document).on('click', ".edit-class-btn", function() {
console.log($(this).data('type'));
currentBtnType = $(this).data('type');
var url = '';
var alertContent;
currentSelItem = g.rows[$(this).data("index")];
var data = function() {
var reason = $('#reason').val();
if (reason === '' || $.trim(reason) === '') {
if(currentBtnType == 'reject') {
... ... @@ -227,16 +203,16 @@ $(document).on('click', ".edit-class-btn", function() {
rejectReason: reason,
isPayDelivery: currentBtnType=='open'?1:0,
checkStatus: currentBtnType=='pass'?200:300,
id: currentSelItem.id,
id: currentSelItem.id
};
}
};
switch (currentBtnType) {
case 'open':
{
url = '/payDelivery/addPayDeliveryCheck';
alertContent = '开启货到付款需组长审核,您确定提交此申请吗?';
alertContent = '开启货到付款无需组长审核,您确定开启吗?';
}
break;
... ...
... ... @@ -6,7 +6,6 @@ var $ = require('jquery'),
common = require('../common/common');
var ENUM = {
tips: {
"100": 0,
"300": 0,
... ... @@ -21,7 +20,6 @@ var ENUM = {
var currentSelItem;
/*下拉选择*/
common.dropDown({
el: "#brandId",
... ... @@ -38,13 +36,10 @@ new common.dropDown({
ajax: ""
});
var t = new common.tab({
el: "#basicTab",
click: function () {
var columnname = $(this).find('a').attr('columnname');
if (columnname == 'all') {
g.options.columns[2].hidden = false;
g.options.columns[3].hidden = true;
... ... @@ -52,7 +47,6 @@ var t = new common.tab({
g.options.columns[5].hidden = true;
g.options.columns[6].hidden = false;
g.options.columns[7].hidden = true;
} else if (columnname == 100) {
g.options.columns[2].hidden = true;
g.options.columns[3].hidden = false;
... ... @@ -85,17 +79,14 @@ var t = new common.tab({
}]
}).init(ENUM.tips);
var g = new common.grid({
el: '#basicTable',
parms: function () {
return {
brandId: common.util.__input("brandId"),
isPayDelivery: common.util.__input("isPayDelivery"),
productSkn: common.util.__input("productSkn"),
status: (t.active && t.active != 'all') ? t.active : 400
};
},
columns: [{
... ... @@ -151,7 +142,6 @@ var g = new common.grid({
html.push('<a data-index="' + item.__index + '" href="JavaScript:;" class="btn operation btn-success btn-xs edit-class-btn" id="btn-item-open" data-type="open">开启</a>');
}
return html.join('');
}
}, { // 7
... ... @@ -159,14 +149,11 @@ var g = new common.grid({
hidden: true,
render: function (item) {
var html = [];
html.push('<a data-index="' + item.__index + '" href="JavaScript:;" class="btn operation btn-danger btn-xs edit-class-btn" id="btn-item-reject" data-type="reject">驳回</a>');
html.push('<a data-index="' + item.__index + '" href="JavaScript:;" class="btn operation btn-success btn-xs edit-class-btn" id="btn-item-pass" data-type="pass">通过</a>');
return html.join('');
}
},
}
]
});
g.init('/payDelivery/queryPayDeliveryList');
... ... @@ -183,7 +170,7 @@ var loadTab = function () {
t.init(__dt);
}, true);
}, 800);
}
};
loadTab();
// 筛选
... ... @@ -198,11 +185,8 @@ $(document).on('click', "#filter-btn", function () {
g.reload();
});
$(document).on('click', ".edit-class-btn", function () {
console.log($(this).data('type'));
var btnType = $(this).data('type');
var url = '';
var alertContent;
currentSelItem = g.rows[$(this).data("index")];
... ... @@ -221,13 +205,13 @@ $(document).on('click', ".edit-class-btn", function () {
rejectReason: reason,
id: currentSelItem.id
};
}
};
switch (btnType) {
case 'open':
{
url = '/payDelivery/openPayDelivery';
alertContent = '开启货到付款需组长审核,您确定提交此申请吗?';
alertContent = '开启货到付款无需组长审核,您确定开启吗?';
}
break;
... ...
... ... @@ -144,8 +144,9 @@ function ajaxUploadSubmit(importAuditorId){
productPrices: JSON.stringify(importYohoCoinData)
}
},function(rs){
if(rs.data.code == 200){
if(rs.code == 200){
common.util.__tip("批量导入保存成功!", "success");
location.href = '';
}else{
common.util.__tip(rs.data.message);
}
... ...
... ... @@ -79,7 +79,6 @@
[[/each]]
</script>
<!--{{> resource/actions}}-->
{{> resource/taoyu}}
{{> resource/weiqingting}}
{{> resource/jiangming}}
... ...
... ... @@ -24,9 +24,9 @@
</div>
<div class="panel-body">
<div class="row">
<div class="panel-col">
<input type="text" id="inputResourceId" placeholder="请输入ID" class="form-control" />
</div>
<!--<div class="panel-col">-->
<!--<input type="text" id="inputResourceId" placeholder="请输入ID" class="form-control" />-->
<!--</div>-->
<div class="panel-col">
<input type="text" id="inputResourceName" placeholder="请输入资源名" class="form-control" />
</div>
... ...