Authored by 陶雨

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

... ... @@ -3,6 +3,9 @@
var $ = require('jquery'),
common=require('../common/common');
var pricePercent = 0.2; //yoho币审核比例线
var loadModal = null;
var importYohoCoinData = null;
var ENUM = {
gender: {
1: '男',
... ... @@ -10,100 +13,46 @@ var ENUM = {
3: '通用'
},
status: {
0: '未设置',
1: '<font color="#428bca">待审核</font>',
2: '<font color="#5cb85c">通过</font>',
3: '<font color="#d9534f">驳回</font>'
}
}
/*
var g = new common.grid({
el: "#yohoCoin_table1",
parms: function() {
return {
product_skn: common.util.__input("skn"),
shop_id: common.util.__input("shop"),
brand_id: common.util.__input("brand"),
supplier_id: common.util.__input("supplier"),
gender: common.util.__input("gender")
};
},
columns: [{
display: 'SKN',
name: 'product_skn'
}, {
display: '商品信息',
name: 'info',
render: function(item) {
return '<div>名称:' + item.product_name + '</div>' +
'<div>品牌:' + item.brand_name + '</div>' +
'<div>类目:' + item.middle_sort_name + '<b> ></b> ' + item.small_sort_name + '</div>';
}
}, {
display: '供应商 / 店铺',
name: 'supplier_name',
render: function(item) {
var html = '';
if (item.supplier_name) {
html += item.supplier_name;
}
if (item.shop_name) {
html += '/' + item.shop_name;
}
return html;
}
}, {
display: '性别',
name: 'gender',
render: function(item) {
return ENUM.gender[item.gender];
}
}, {
display: '吊牌价',
name: 'retail_price'
}, {
display: '销售价',
name: 'sales_price'
}, {
display: '返币金额',
name: 'return_coin'
}, {
display: '状态',
name: 'status',
render: function(item) {
return ENUM.status[item.status];
}
},{
display: '操作信息',
name: 'operateInfo',
render: function(item) {
var html = '';
if (item.founder_name) {
html += '<div>' + item.founder_name + '</div>';
}
if (item.updateTime) {
html += '<div>' + item.updateTime + '</div>';
}
return html;
}
}, {
display: '操作',
render: function(item) {
return '<a href="javascript:;" class="btn btn-info btn-xs btn-modify" data-skn="' + item.product_skn + '">修改</a>'
}
}]
new common.dropDown({
el: '#shop',
ajax: 'shopsRest'
});
new common.dropDown({
el: '#brand',
ajax: 'brand'
});
new common.dropDown({
el: '#supplier',
ajax: 'querySupplier'
});
*/
//多级菜单
var tabTree = new common.tabTree("#sortTree", {status: 1, sortLevel: 1});
tabTree.init();
//grid列表生成
var g = new common.grid({
el: "#yohoCoin_table",
parms: function() {
var select = tabTree.getAddress();
return {
product_skn: common.util.__input("skn"),
shop_id: common.util.__input("shop"),
brand_id: common.util.__input("brand"),
supplier_id: common.util.__input("supplier"),
gender: common.util.__input("gender")
productSkn: common.util.__input("skn"),
shopId: common.util.__input("shop"),
brandId: common.util.__input("brand"),
supplierId: common.util.__input("supplier"),
gender: common.util.__input("gender"),
auditStatus: common.util.__input("auditStatus"),
maxSortId: select[0] ? select[0].id : "",
middleSortId: select[1] ? select[1].id : "",
smallSortId: select[2] ? select[2].id : "",
sortId: select[3] ? select[3].id : ""
};
},
columns: [{
... ... @@ -114,21 +63,263 @@ var g = new common.grid({
$("#yohoCoin_table").find("thead tr th").html($("#coinListHead").html());
}
item.genderName = ENUM.gender[item.gender];
item.statusName = ENUM.status[item.productPrice.coinStatus];
html += common.util.__template2($("#coinList").html(),item);
return html;
}
}]
});
g.init($("#gridurl").val());
//批量上传
ajaxUpload();
/**********************接口*************************/
//保存接口
function ajaxSave(productSkn, yohoCoin, auditorId, salesPrice){
common.util.__ajax({
url:'/good/yohoCoin/set',
data: {
"productSkn": productSkn,
"returnCoin": yohoCoin,
"salesPrice": salesPrice,
"auditorId": auditorId
}
},function(rs){
console.log("yoho币保存返回" + rs);
if(yohoCoin < (salesPrice * pricePercent)){
}
});
}
//批量导入接口
function ajaxUpload(){
common.edit.ajaxfileupload('#yohoCoinUpload',{
params: {
type: "yohoCoin",
__type: "batch-import"
},
onStart: function() {
loadModal = common.dialog.load();
clearImportResult();
},
onComplete: function(response) {
console.log("批量接口返回数据",response);
if (response.code == 200 && response.data.taskId) {
ajaxExeclByTaskId(response.data.taskId);
return true;
}
else if(response.data && response.data.failFileReason.length){
loadingClose();
showImportMessage(response.data.failFileReason.join('<br/>'), "error");
common.util.__tip("上传出错!具体请看批量上传结果。", 'warning');
return false;
}
else{
loadingClose();
showImportMessage(response.message, "error");
common.util.__tip(response.message);
}
}
});
}
//异步批量上传接口
function ajaxExeclByTaskId(taskId){
//异步调用的接口importResult/queryBatchImportResult 参数名param
common.util.__ajax({
url: '/yohoCoin/importResult/queryBatchImportResult',
data: {
param:taskId
}
},function(res){
console.log("异步返回接口",res);
if(res.data.length){
loadingClose();
importYohoCoinData = res.data;
showImportTable(res);
showImportMessage("批量导入成功!", "success");
common.util.__tip("批量导入成功!", 'success');
}else{
setTimeout(function(){
ajaxExeclByTaskId.call(null,taskId);
},5000);
}
},true);
}
//批量上传确认
function ajaxUploadSubmit(data){
common.util.__ajax({
url:'',
data: data
},function(rs){
location.href = '';
});
}
/**********************业务方法*************************/
//显示批量导入结果
function showImportMessage(message, statue){
$("#yohoCoinImportMessage").removeAttr("class").addClass(statue).show();
$("#detailMassage").text(message);
}
//显示批量导入数据表
function showImportTable(data){
$("#importResultTable").html(common.util.__template2($("#yohoCoinImportResultTable").html(),data));
$("#yohoCoinImportResultSet").show();
$("#yohoCoinImportResult").show();
}
//初始化批量导入结果及列表
function clearImportResult(){
$("#detailMassage").empty();
$("#importResultTable").empty();
$("#importAuditor").val("");
$("#yohoCoinImportMessage").hide();
$("#yohoCoinImportResultSet").hide();
$("#yohoCoinImportResult").hide();
}
//吊牌价跟销售价校验
function checkPrice(retailPrice, salesPrice){
if(retailPrice == salesPrice){
return true;
}else{
common.util.__tip("销售价与吊牌价不同,YOHO币只能为0!");
return false;
}
}
//yoho币金额校验
function checkYohoCoin(yohoCoin, auditor, price){
if(yohoCoin.val()){
if(!isNaN(yohoCoin.val())){
if(yohoCoin.val() < 0){
yohoCoin.focus().select().addClass("error");
common.util.__tip("YOHO币金额不能小于0!");
return false;
}
//yoho币大于等于销售额的20%需要校验审核人
if(yohoCoin.val() >= (price * pricePercent)){
return checkAuditor(auditor);
}
}else{
yohoCoin.focus().select().addClass("error");
common.util.__tip("YOHO币金额必须为数字!");
return false;
}
}else{
yohoCoin.focus().addClass("error");
common.util.__tip("YOHO币金额不能为空!");
return false;
}
return true;
}
//审核人校验
function checkAuditor(auditor){
if(auditor.val() == ""){
auditor.focus().addClass("error");
common.util.__tip("审核人不能为空!");
return false;
}
return true;
}
//保存单行数据刷新
function freshYohoCoinRowData(productSkn, yohoCoin, status){
var SknDom = $('._' + productSkn);
SknDom.find(".returnYohoCoin").text(yohoCoin);
SknDom.find(".coinStatus").text(ENUM.status[status]);
}
//关闭loading
function loadingClose(){
if (loadModal) {
loadModal.close();
}
}
/**********************事件*************************/
//批量导入结果列表删除
$(document).on('click', '.btn-delete-yohoCoin', function() {
var index = $(this).data("index");
if(importYohoCoinData){
[].splice.call(importYohoCoinData,index,1);
$("#importResultTable").html(common.util.__template2($("#yohoCoinImportResultTable").html(),data));
}
});
//批量导入结果列表确定
$(document).on('click', '.btn-submit-yohoCoin', function() {
ajaxUploadSubmit();
});
//保存操作
$(document).on('click', '.btn-save', function() {
var productSkn = $(this).data('productskn');
var sknDom = $('._' + productSkn);
var retailPrice = sknDom.find('.retailPrice').text(); //吊牌价
var salesPrice = sknDom.find('.salesPrice').text(); //销售价
if(checkPrice(retailPrice, salesPrice)){
var yohoCoinInput = sknDom.find('.editor-yohoCoin');
var auditorInput = sknDom.find('.editor-auditor');
if(checkYohoCoin(yohoCoinInput, auditorInput, salesPrice)){
ajaxSave(productSkn, yohoCoinInput.val(), auditorInput.val(), salesPrice);
}
}
});
//显示修改
$(document).on('click', '.btn-modify', function() {
if($(this).hasClass("openEditor")){
$(this).text("修改").removeClass("openEditor");
$(this).parents(".dataForShow").find(".dataForEditor td").hide();
var dataForShow = $(this).parents(".dataForShow");
dataForShow.find(".dataForEditor td").hide();
dataForShow.find(".editor-yohoCoin").val(dataForShow.find(".returnYohoCoin").text());
dataForShow.find(".editor-auditor").val("");
}else{
$(this).text("收起").addClass("openEditor");
$(this).parents(".dataForShow").find(".dataForEditor td").show();
}
});
//显示批量导入
$(document).on('click', '#import-btn', function() {
$('#yohoCoin_table').hide();
$('#yohoCoinSearch').hide();
$('#yohoCoin_import').show();
});
//返回列表
$(document).on('click', '#return-btn', function() {
$('#yohoCoin_import').hide();
$('#yohoCoinSearch').show();
$('#yohoCoin_table').show();
});
//筛选
$(document).on('click', '#filter-btn', function() {
g.reload(1);
});
//全部
$(document).on('click', '#all-btn', function() {
location.href = '';
});
//校验失败编辑
$(document).on('change', '#yohoCoin_table .error', function() {
$(this).removeClass('error');
});
\ No newline at end of file
... ...
//yoho币
'use strict';
var $ = require('jquery'),
common=require('../common/common');
var ENUM = {
gender: {
1: '男',
2: '女',
3: '通用'
},
status: {
0: '未设置',
1: '<font color="#428bca">待审核</font>',
2: '<font color="#5cb85c">通过</font>',
3: '<font color="#d9534f">驳回</font>'
}
}
new common.dropDown({
el: '#shop',
ajax: 'shopsRest'
});
new common.dropDown({
el: '#brand',
ajax: 'brand'
});
new common.dropDown({
el: '#supplier',
ajax: 'querySupplier'
});
//多级菜单
var tabTree = new common.tabTree("#sortTree", {status: 1, sortLevel: 1});
tabTree.init();
var g = new common.grid({
el: "#yohoCoinAudit_table",
parms: function() {
var select = tabTree.getAddress();
return {
auditStatus: $("#yohoCoinNav .active").data('status'),
product_skn: common.util.__input("skn"),
shop_id: common.util.__input("shop"),
brand_id: common.util.__input("brand"),
supplier_id: common.util.__input("supplier"),
gender: common.util.__input("gender"),
maxSortId: select[0] ? select[0].id : "",
middleSortId: select[1] ? select[1].id : "",
smallSortId: select[2] ? select[2].id : "",
sortId: select[3] ? select[3].id : ""
};
},
columns: [{
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;}
if(item.middleSortName) {html += "&nbsp;>&nbsp;" + item.middleSortName;}
if(item.smallSortName) {html += "&nbsp;>&nbsp;" + item.smallSortName;}
html += "</div>";
return html;
}
}, {
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 ENUM.gender[item.gender];
}
}, {
display: '吊牌价',
name: 'retailPrice'
}, {
display: '销售价',
name: 'salesPrice'
}, {
display: '返币数',
name: 'returnCoin',
render: function(item) {
return item.productPrice.returnCoin;
}
}, {
display: '状态',
name: 'status',
render: function(item) {
return ENUM.status[item.productPrice.coinStatus];
}
},{
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>';
}
}]
});
g.init($("#gridurl").val());
//选择分类
$(document).on('click', '#yohoCoinNav li', function() {
$(this).addClass("active").siblings().removeClass("active");
g.reload();
});
//审核通过
$(document).on('click', '.btn-checkOk', function() {
var productSkn = $(this).data("skn");
common.dialog.confirm(
"审核通过确认",
"你确认<strong style='color:#5cb85c'>&nbsp;&nbsp;审核通过&nbsp;&nbsp;</strong>么?",
function(){
common.util.__ajax({
url:'/good/yohoCoin/pass',
data: {
"productSkn": productSkn
}
},function(rs){
g.reload();
});
},
function(){}
);
});
//驳回
$(document).on('click', '.btn-checkNo', function() {
var productSkn = $(this).data("skn");
common.dialog.confirm(
"审核驳回确认",
"你确认<strong style='color:#d9534f'>&nbsp;&nbsp;审核驳回&nbsp;&nbsp;</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; font-weight: bold'><span>提示:请填写驳回理由!</span></div>",
function(){
var comment = $("#checkComment").val();
if(comment){
common.util.__ajax({
url:'/good/yohoCoin/reject',
data: {
"productSkn": productSkn,
"comment": comment
}
},function(rs){
g.reload();
});
}else{
$("#checkComment").focus();
$(".checkTip").show();
return false;
}
},
function(){}
);
});
... ...
... ... @@ -176,11 +176,7 @@ $(document).on('click', 'input[name="brandType"]', function () {
function plusStarOP(prefix, url, item) {
if(prefix == "编辑") {
imgArr = item.activityImg||[];
} else {
imgArr = [];
}
var a = new common.edit('#templete-top');
common.dialog.confirm(prefix+'品牌', common.util.__template2($("#template").html(), item), function () {
... ... @@ -217,6 +213,13 @@ function plusStarOP(prefix, url, item) {
$('#activity-name').css('display', 'none');
$('input[name="brandType"][value="' + val + '"]').trigger('click');
if(prefix == "编辑") {
imgArr = item.activityImg||[];
$('#brandId').attr('disabled', true);
} else {
imgArr = [];
$('#brandId').attr('disabled',false);
}
rendBoList(imgArr);
... ...
... ... @@ -95,8 +95,11 @@ var g = new common.grid({
render: function (items) {
var HtmArr = [];
HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-primary btn-xs comment-pass">通过</a>');
HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-danger btn-xs comment-mask">屏蔽</a>');
if(items.auditStatus == 0) {
HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-primary btn-xs comment-pass">通过</a>');
HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-danger btn-xs comment-mask">屏蔽</a>');
}
return HtmArr.join('');
}
... ...
... ... @@ -74,7 +74,7 @@ var g = new common.grid({
articleGender: common.util.__input('articleGender'),
authorId: common.util.__input('authorId'),
maxSortId: common.util.__input('maxSortId'),
status: common.util.__input('status'),
status: $('#status').val(),//common.util.__input('status'),
orderBy: common.util.__input('orderBy'),
startTime: common.util.__input('starttime'),
endTime: common.util.__input('endtime'),
... ... @@ -92,7 +92,11 @@ var g = new common.grid({
}
}, {
display: '文章标题',
name: "articleTitle"
//name: "articleTitle",
width:'15%',
render: function(item) {
return '<span class="text-overflow"">'+item.articleTitle+'</span>'
}
}, {
display: '分类',
name: "maxSortName"
... ... @@ -233,7 +237,7 @@ $(document).on('click', '.info-recommend-cancel', function() {
url: '/guang/article/operation',
data: {
id: item.id,
isRecommend: -1
isRecommend: 0
}
}, function(res) {
... ...
... ... @@ -168,11 +168,6 @@ $(document).on('click', '.info-del', function() {
function plusStarOP(prefix, url, item) {
if(prefix == "编辑") {
imgArr = item.bannerImg||[];
} else {
imgArr = [];
}
var a =new common.edit("#templete-top", {
"bucket" : "plustar"
... ... @@ -208,6 +203,16 @@ function plusStarOP(prefix, url, item) {
a.init();
if(prefix == "编辑") {
imgArr = item.bannerImg||[];
$('#brandId').attr('disabled', true);
} else {
imgArr = [];
$('#brandId').attr('disabled', false);
}
uploadImage();
rendBoList(imgArr);
... ...
... ... @@ -590,4 +590,12 @@ ul {
// background: url(images/closeSelector.png) no-repeat;
cursor: pointer;
z-index: 9999
}
.text-overflow {
display : inline-block;
overflow : hidden;
text-overflow : ellipsis;
white-space : nowrap;
width : 250px;
}
\ No newline at end of file
... ...
... ... @@ -28,11 +28,70 @@
padding: 0;
display: none;
border-bottom: none;
background: #d9edf7;
background1: #d9edf7;
}
#yohoCoin_table .dataForEditor tr:first-child{
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
}
#yohoCoin_table .dataForEditor tr td .form-control{
display: inline-block;
}
#yohoCoin_table .dataForEditor tr td.editorTip{
color: #ff0000;
border-top: 1px solid #ddd
}
#yohoCoin_table .error{ border: 2px solid #ff0000}
#yohoCoin_import{
font-family: "Microsoft YaHei";
}
#yohoCoinImportMessage{
display: none;
margin-top: 10px;
font-size: 18px;
font-weight: bold;
padding: 5px 10px;
background: #ccc;
color: #ffffff;
}
#yohoCoin_import .success{
background:#449d44;
}
#yohoCoin_import .error{
background:#ff0000;
}
#yohoCoin_import .title{
padding: 5px 10px;
background: #5bc0de;
height: auto;
text-align: left;
border:1px solid #46b8da;
color: #FFFFFF;
font-size: 14px;
}
#yohoCoinImportResult, #yohoCoinImportResultSet{
display: none;
margin-top: 10px;
}
#yohoCoinImportResultSet .form-inline{
margin: 10px 0 0;
padding: 0 20px;
}
#importResultTable{
padding: 10px 20px;
text-align: center;
}
#importResultTable th, #importResultTable td{
text-align: center;
vertical-align: inherit;
}
... ...
... ... @@ -381,6 +381,22 @@ exports.res = [
{name: 'bannerTitle', type: 'String'},
{name: 'orderBy', type: 'String'},
]
},{
// Plus/Star列表-修改
route: '/guang/plustar/updatePlustar',
method: 'POST',
url: '/guang/plustar/updatePlustar',
params: [
{name: 'id', type: 'String'},
{name: 'brandType', type: 'String'},
{name: 'status', type: 'String'},
{name: 'brandId', type: 'String'},
{name: 'gender', type: 'String'},
{name: 'coverImg', type: 'String'},
{name: 'bannerImg', type: 'String'},
{name: 'bannerTitle', type: 'String'},
{name: 'orderBy', type: 'String'},
]
}, {
// Plus/Star列表-编辑
route: '/guang/plustar/getDetail',
... ... @@ -536,6 +552,8 @@ exports.res = [
url: '/guang/tagSort/getTagItems',
params: [
{name: 'status', type: 'Number'},
{name: 'idName', type: 'String'}
]
},
... ...
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.214:8088/platform';
exports.res = [
{
/*************************yoho币管理页面接口*******************************/
{//yoho币管理页面渲染
route: '/goods/yohoCoin/index',
method: 'GET',
view: 'pages/goods/yohoCoin',
... ... @@ -10,7 +14,7 @@ exports.res = [
pagetitle: {
level1title: '商品管理',
level2title: '价格管理',
level3title: 'yoho币管理'
level3title: 'YOHO币管理'
},
filter: {
skn: true,
... ... @@ -18,13 +22,94 @@ exports.res = [
brand: true,
supplier: true,
gender: true,
cate_1: true,
cate_2: true,
cate_3: true,
sortTree: true,
returnCoinTime: false,
bulkImport: true
},
gridurl: '/goods/price/list'
gridurl: '/good/yohoCoin/queryPageList'
}
},
{//查询yoho币页面
route: "/good/yohoCoin/queryPageList",
method: "POST",
url: "/yohoCoin/queryPageList",
params:[
{name: 'productSkn', type: 'Number'},
{name: 'shopId', type: 'Number'},
{name: 'brandId', type: 'Number'},
{name: 'supplierId', type: 'Number'},
{name: 'gender', type: 'String'},
{name: 'auditStatus', type: 'Number'},
{name: 'maxSortId', type: 'Number'},
{name: 'middleSortId', type: 'Number'},
{name: 'smallSortId', type: 'Number'},
{name: 'sortId', type: 'Number'}
]
},
{//编辑保存yoho币
route: "/good/yohoCoin/set",
method: "POST",
url: "/yohoCoin/set",
params:[
{name: 'productSkn', type: 'Number'},
{name: 'returnCoin', type: 'Number'},
{name: 'salesPrice', type: 'Number'},
{name: 'auditorId', type: 'Number'}
]
},
{//批量上传
route: "/yohoCoin/importResult/queryBatchImportResult",
method: "POST",
url: "/importResult/queryBatchImportResult",
params:[
{name: 'param', type: 'String'},
]
},
/*************************yoho币审核页面接口*******************************/
{//yoho币审核页面渲染
route: '/goods/yohoCoin/Audit',
method: 'GET',
view: 'pages/goods/yohoCoinAudit',
src:'/goods/yohoCoinAudit',
'data': {
pagetitle: {
level1title: '商品管理',
level2title: '价格管理',
level3title: 'YOHO币审核'
},
filter: {
skn: true,
store: true,
brand: true,
supplier: true,
gender: true,
sortTree: true,
returnCoinTime: false
},
gridurl: '/good/yohoCoin/queryPageList'
}
}
},
{//审核通过
route: "/good/yohoCoin/pass",
method: "POST",
url: "/yohoCoin/pass",
params:[
{name: 'productSkn', type: 'Number'},
]
},
{//驳回
route: "/good/yohoCoin/reject",
method: "POST",
url: "/yohoCoin/reject",
params:[
{name: 'productSkn', type: 'Number'},
{name: 'comment', type: 'String'},
]
},
]
... ...
/*module.exports = {
'/getBrandList': function(req, res) {
var page = 1;
if (req.body.page) {
page = req.body.page;
}
res.json({
code: 200,
data: {
list: [{
id: '1',
brandIco: 'http://img10.static.yhbimg.com/brandLogo/2016/01/18/03/01f7e2adcbe8701d1b3f367157820ea59f.jpg?imageMogr2/thumbnail/60x60/extent/60x60/background/d2hpdGU=/position/center/quality/90',
brandNameCn: '心飞扬',
brandNameEn: 'xinfeiyang',
brandLevel: 'KA',
brandTonality: '0',
createTime: '2016-01-18 11:18:20',
status: 1
}, {
id: '2',
brandIco: 'http://img13.static.yhbimg.com/brandLogo/2016/01/14/08/02ba05d8de88846dd34787e9780afb408a.jpg?imageMogr2/thumbnail/60x60/extent/60x60/background/d2hpdGU=/position/center/quality/90',
brandNameCn: 'A.A.SPECTRUM',
brandNameEn: 'A.A.SPECTRUM',
brandLevel: 'C',
brandTonality: '0',
createTime: '2016-01-14 16:34:42',
status: 0
}],
page: page,
totalPage: 20,
size: 50,
total: 1000
}
})
},
'/brand/editBrand': function(req, res) {
res.json({
code: 200,
message: '操作成功'
});
},
'/interface/brand/info':function(req, res){
var JSON={
"brandName":"nike",
"brandNameEn":"aaaa",
"brandDomain":"yoho",
"brandIco":"http://static.yohobuy.com/newheader/img/logo_e.png",
"brandLevel":"KA",
"promotionLevel":"2",
"mainCategory":"2",
"brandHeadstream":"2",
"brandTypes":"2",
"saleType":"2",
"brandUrl":"www.baidu.com",
"brandIntro":"xxxxxx",
"brandOutline":"xxxxx",
"brandFounder":"jay",
"brandStyle":"街头|暗黑",
"brandNature":"4",
"brandTonality":"xxxx",
"id":"1"
};
res.json(JSON);
return;
},
'/interface/brand/add':function(req, res){
res.json({code:200,message:"添加成功"});
},
'/interface/brand/update':function(req, res){
res.json({code:200,message:"修改成功"});
}
}*/
\ No newline at end of file
... ... @@ -29,12 +29,12 @@
</div>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div id="yohoCoinSearch" class="panel panel-default" style="margin-bottom:10px;">
{{# filter}}
<div class="panel-body">
<div class="row">
{{# skn}}
<div class="panel-col2">
<div class="panel-col">
<input id="skn" class="form-control panel-input height40" type="text" placeholder="请输入SKN" onkeyup="this.value=this.value.replace(/\D/gi,'')">
</div>
{{/ skn}}
... ... @@ -74,29 +74,23 @@
</div>
{{/ gender}}
{{# cate_1}}
<div class="panel-col">
<select name="cate_1" id="cate_1" tabindex="-1" title="" class="form-control">
<option value="-1">请选择一级类目</option>
</select>
</div>
{{/ cate_1}}
{{# cate_2}}
{{# gender}}
<div class="panel-col">
<select name="cate_2" id="cate_2" tabindex="-1" title="" class="form-control">
<option value="-1">请选择二级类目</option>
<select name="auditStatus" id="auditStatus" tabindex="-1" title="" class="form-control">
<option value="-1">选择审核状态</option>
<option value="0">未设置</option>
<option value="1">待审核</option>
<option value="2">通过</option>
<option value="3">驳回</option>
</select>
</div>
{{/ cate_2}}
{{/ gender}}
{{# cate_3}}
<div class="panel-col">
<select name="cate_3" id="cate_3" tabindex="-1" title="" class="form-control">
<option value="-1">请选择三级类目</option>
</select>
{{# sortTree}}
<div class="panel-col2">
<div id="sortTree"></div>
</div>
{{/ cate_3}}
{{/ sortTree}}
{{# returnCoinTime}}
<div class="panel-col form-inline" style="width: auto">
... ... @@ -126,28 +120,65 @@
<div class="panel">
<div class="dataTables_wrapper no-footer" id="yohoCoin_table"></div>
<div class="panel bulk-import">
<div class="import-hd">
<span class="excel-upload-wrap">
<label>选择文件</label>
<input id="upload-input" name="file" class="btn btn-default excel-upload" type="file">
</span>
<div class="panel bulk-import" id="yohoCoin_import">
<a id="return-btn" href="javascript:;" class="btn btn-info">返回列表</a>
<table class="table table-bordered" style="border:1px solid #ddd; margin-top: 10px">
<tr>
<td width="120px" style="line-height: 37px"><b>上传EXCEL:</b></td>
<td style="position: relative;">
<input id="yohoCoinUpload" name="file" type="file" style="cursor: pointer; height: 37px; top: 8px;">
<div class="file-name btn btn-primary">请选择文件</div>
</td>
</tr>
<tr>
<td width="120px"><b>说明:</b></td>
<td>
1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
2、Excel表头为:<span style="color: #67D267;">SKN、品牌、吊牌价、返币金额(大于零,最多俩位小数)</span><br>
3、第一行为表头内容,第二行开始为正式内容<br>
4、每个文件控制在2500行以内<br>
5、<a href="#" style="margin: 0; text-decoration: underline">下载样例.xlsx</a>
</td>
</tr>
</table>
<a class="excel-model" href="/ajax/link/{{download}}">表头下载</a>
<input id="sure-change" class="btn btn-primary" type="button" value="确定变价">
<div id="yohoCoinImportMessage">
<b>批量上传结果:</b><span id="detailMassage"></span>
</div>
<ol id="error-msg" class="error-msg" style="color: red"></ol>
<div class="priceTable-wrap">
<div class="panel panel-warning" style="margin: 0;">
<div class="panel-heading">SKN变价<a id="delete-all" class="btn btn-danger" style="margin-left: 50px;" href="javascript:;">全部删除</a></div>
<div id="yohoCoinImportResultSet">
<div class="title">返还方式设置:</div>
<div class="form-inline" style="display: none">
<label style="width: 80px">反币时间:</label>
<div class="form-group">
<input type="radio" name="returnCoinTime" value="1">
<label>长期</label>
</div>
<div class="form-group">
<input type="radio" name="returnCoinTime" value="2">
<input type="text" class="form-control" style="width: 150px">&nbsp;~&nbsp;<input type="text" class="form-control" style="width: 150px">
</div>
</div>
<div class="form-inline">
<div class="form-group">
<label style="width: 80px">审核人:</label>
<select id="importAuditor" class="form-control" style="width: 150px">
<option value="">-- 请选择审核人 --</option>
<option value="2965">Tracy</option>
<option value="10235">David Wong</option>
</select>
<span style="color: #ff0000; margin-left: 20px">提示:返回金额大于等于销售价20%时必须填写审核人。</span>
</div>
<div class="form-group">
<a href="javascript:;" class="btn btn-success btn-submit-yohoCoin">确定</a>
</div>
</div>
<div class="dataTables_wrapper no-footer" id="priceTable"></div>
</div>
<div class="success-wrap" style="display: none;">
<a class="btn btn-info" href="">返回变价列表</a>
<a id="download-btn" class="btn btn-success" data-domain="{{domain}}" href="javascript:;">下载导入结果</a>
<div id="yohoCoinImportResult">
<div class="title">返币列表:</div>
<div id="importResultTable"></div>
</div>
</div>
</div>
... ... @@ -165,9 +196,9 @@
<td style="width: 5%">性别</td>
<td style="width: 5%">吊牌价</td>
<td style="width: 5%">销售价</td>
<td style="width: 5%">返还金额</td>
<td style="width: 5%">状态</td>
<td style="width: 15%">操作信息</td>
<td style="width: 5%">返币数</td>
<td style="width: 8%">状态</td>
<td style="width: 12%">操作信息</td>
<td style="width: 5%">操作</td>
</tr>
</tbody></table>
... ... @@ -175,55 +206,50 @@
</script>
<script id="coinList" type="text/template">
<div class="dataForShow">
<div class="dataForShow _[[productSkn]]">
<table><tbody>
<tr>
<td rowspan="2" span="2" class="center" style="width: 10%">[[product_skn]]</td>
<td rowspan="2" span="2" class="center" style="width: 10%">[[productSkn]]</td>
<td class="" style="width: 25%">
<p>名称:[[product_name]]</p>
<p>品牌:[[brand_name]]</p>
<div>类目:[[middle_sort_name]] <b>></b>[[small_sort_name]]</div>
<p>名称:[[productName]]</p>
<p>品牌:[[brandName]]</p>
<div>
类目:[[if maxSortName]][[maxSortName]][[/if]]
[[if middleSortName]]&nbsp;>&nbsp;[[middleSortName]][[/if]]
[[if smallSortName]]&nbsp;>&nbsp;[[smallSortName]][[/if]]
</div>
</td>
<td style="width: 20%">
[[if supplier_name]]
[[supplier_name]]
[[/if]]
[[if shop_name]]
/[[shop_name]]
[[/if]]
[[if supplierName]][[supplierName]][[/if]]
[[if shopName]]&nbsp;/&nbsp;[[shopName]][[/if]]
</td>
<td class="center" style="width: 5%">[[genderName]]</td>
<td class="center" style="width: 5%">[[retail_price]]</td>
<td class="center" style="width: 5%">[[sales_price]]</td>
<td class="center" style="width: 5%">[[return_coin]]</td>
<td class="center" style="width: 5%">[[status]]</td>
<td style="width: 15%">
[[if founder_name]]
<p>[[founder_name]]</p>
[[/if]]
[[if updateTime]]
<p>[[updateTime]]</p>
[[/if]]
<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 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" style="width: 5%"><button type="button" class="btn btn-info btn-sm btn-modify">修改</button></td>
[[/if]]
</tr>
<tr class="dataForEditor">
<td colspan="9" style="padding: 0">
<table>
<tr class="center">
<td width="50%"><b>反币时间</b></td>
<td><b>返回金币</b></td>
<td><b>审核人</b></td>
<td><b>操作</b></td>
<!--td width="50%"><b>反币时间</b></td-->
<td width="40%"><b>返回YOHO</b></td>
<td width="40%"><b>审核人</b></td>
<td width="20%"><b>操作</b></td>
</tr>
<tr>
<td>
<td style="display: none">
<div class="radio" style="margin-top: 0">
<label>
<input type="radio" name="returnCoinTime" value="option1" checked>
永久
</label>
<label><input type="radio" name="returnCoinTime" value="option1" checked>永久</label>
</div>
<div class="radio" style="margin-bottom: 0">
<label>
... ... @@ -235,17 +261,22 @@
</label>
</div>
</td>
<td class="center"><input type="text" class="form-control" placeholder="返回yoho币" value="[[return_coin]]"></td>
<td class="center">
<select class="form-control">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<input type="text" class="form-control center editor-yohoCoin" placeholder="YOHO币数量" value="[[productPrice.returnCoin]]" style="width: 100px">
</td>
<td class="center">
<select class="form-control center editor-auditor" style="width: 150px">
<option value="">-- 请选择审核人 --</option>
<option value="2965">Tracy</option>
<option value="10235">David Wong</option>
</select>
</td>
<td class="center"><button type="submit" class="btn btn-primary btn-sm">保存</button></td>
<td class="center">
<button type="submit" class="btn btn-primary btn-sm btn-save" data-productskn="[[productSkn]]">保存</button>
</td>
</tr>
<tr>
<td class="editorTip" colspan="3">* 提示:若返币YOHO币金额&nbsp;&nbsp;<b>大于等于</b>&nbsp;&nbsp;销售价的20%,审核人必须填写,审核通过后才能进入该状态。</td>
</tr>
</table>
</td>
... ... @@ -254,5 +285,30 @@
</div>
</script>
<script id="yohoCoinImportResultTable" type="text/template">
<table class="table table-striped table-bordered" align="center">
<thead>
<tr>
<th>SKN</th>
<th>品牌</th>
<th>吊牌价</th>
<th>反币金额</th>
<th>操作</th>
</tr>
</thead>
<tbody>
[[each data as item _index]]
<tr>
<td>[[item.productSkn]]</td>
<td>[[item.brandName]]</td>
<td>[[item.retailPrice]]</td>
<td>[[item.returnCoin]]</td>
<td><a href="javascript:;" class="btn btn-sm btn-danger btn-delete-yohoCoin" data-index="[[_index]]">删除</a></td>
</tr>
[[/each]]
</tbody>
</table>
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
{{#pagetitle}}
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="">{{level1title}}</a></li>
<li>{{level2title}}</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>{{level3title}}</h4>
</div>
</div>
</div>
{{/pagetitle}}
</div>
</div>
<div class="contentpanel">
<div id="yohoCoinSearch" class="panel panel-default" style="margin-bottom:10px;">
{{# filter}}
<div class="panel-body">
<div class="row">
{{# skn}}
<div class="panel-col">
<input id="skn" class="form-control panel-input height40" type="text" placeholder="请输入SKN" onkeyup="this.value=this.value.replace(/\D/gi,'')">
</div>
{{/ skn}}
{{# store}}
<div class="panel-col">
<select name="shop" id="shop" tabindex="-1" title="" class="form-control">
<option value="-1">请选择店铺</option>
</select>
</div>
{{/ store}}
{{# brand}}
<div class="panel-col">
<select name="brand" id="brand" tabindex="-1" title="" class="form-control">
<option value="-1">请选择品牌</option>
</select>
</div>
{{/ brand}}
{{# supplier}}
<div class="panel-col">
<select name="supplier" id="supplier" tabindex="-1" title="" class="form-control">
<option value="-1">请选择供应商</option>
</select>
</div>
{{/ supplier}}
{{# gender}}
<div class="panel-col">
<select name="gender" id="gender" tabindex="-1" title="" class="form-control">
<option value="-1">选择性别</option>
<option value="1"></option>
<option value="2"></option>
<option value="3">通用</option>
</select>
</div>
{{/ gender}}
{{# sortTree}}
<div class="panel-col2">
<div id="sortTree"></div>
</div>
{{/ sortTree}}
{{# returnCoinTime}}
<div class="panel-col form-inline" style="width: auto">
<div class="form-group" style="margin-right: 0">
<label>反币时间:</label>
<input type="text" class="form-control" jsaction="date:end:endDate" id="startDate" placeholder="开始时间">
</div>
<label>~</label>
<div class="form-group">
<input type="text" class="form-control" jsaction="date:start:startDate" id="endDate" placeholder="结束时间">
</div>
</div>
{{/ returnCoinTime}}
<div class="panel-col" style="width: auto">
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="javascript:;" class="btn btn-info">全部</a>
</div>
</div>
</div>
{{/ filter}}
</div>
<div class="panel">
<ul id="yohoCoinNav" class="nav nav-pills" style="margin-bottom: 10px">
<li data-status="1" class="active"><a href="#">待审核</a></li>
<li data-status="2"><a href="#">通过</a></li>
<li data-status="3"><a href="#">驳回</a></li>
<li data-status=""><a href="#">全部</a></li>
</ul>
<div class="dataTables_wrapper no-footer" id="yohoCoinAudit_table"></div>
</div>
</div>
<input type="hidden" id="gridurl" value="{{gridurl}}">
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -38,7 +38,7 @@
<div class="col-sm-10">
<input type="hidden" name="" value="[[id]]" id="id" class="form-control" pattern="" title="">
<select id="parentId" value="[[parentId]]" class="form-control">
<option value="-1">请选择分类</option>
<option value="0">请选择分类</option>
</select>
</div>
</div>
... ... @@ -53,7 +53,7 @@
<div class="form-group">
<label for="orderBy" class="col-sm-2 control-label">排序:</label>
<div class="col-sm-10">
<input type="number" value="[[orderBy]]" name="content" id="orderBy" placeholder="排序" required="required" class="form-control">
<input type="number" value="[[orderBy||0]]" name="content" id="orderBy" placeholder="排序" required="required" class="form-control">
</div>
</div>
... ...
... ... @@ -149,7 +149,7 @@
<li class="cover-image-item image-list" data-index=[[_index]]>
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[_item]]">
<img src="[[_item.replace(/(gif|png|jpg|jpeg)\?[^"]*/g,'$1')]]">
</a>
<i class="remove-item-btn remove1 glyphicon glyphicon-remove-circle" data-index="[[_index]]"></i>
</div>
... ...
... ... @@ -97,7 +97,11 @@
<label class="col-sm-2 control-label">封面图:<span class="red">*</span> </label>
<div class="col-sm-8">
<<<<<<< HEAD
<input type="file" name="coverImage" id="coverImage" value="[[coverImage]]" required placeholder="封面图"/>
=======
<input type="file" name="coverImage" id="coverImage" required="required" value="[[coverImage]]" />
>>>>>>> develop
</div>
</div>
<div class="form-group">
... ...
... ... @@ -6,8 +6,8 @@
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="">商品管理</a></li>
<li>资讯管理</li>
<li><a href="">资讯管理</a></li>
<li>资讯列表管理</li>
</ul>
<div>
... ...
... ... @@ -141,7 +141,7 @@
<div class="form-group">
<label for="coverImg" class="col-sm-2 control-label">上传封面图:</label>
<div class="col-sm-8" id="colorUrlBox">
<input type="file" id="coverImg" name="coverImg" value="[[coverImg]]">
<input type="file" id="coverImg" name="coverImg" required="required" value="[[coverImg]]">
</div>
</div>
... ... @@ -162,7 +162,7 @@
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">+</a>
<input type="file" class="goods-img-upload picfile" id="picfile" name="picfile"></div>
<input type="file" class="goods-img-upload picfile" required="required" id="picfile" name="picfile"></div>
</li>
</ul>
... ...
... ... @@ -33,7 +33,7 @@
</div>
<div class="panel-col">
<select id="maxSortId" class="form-control">
<select id="maxSortId" class="form-control" >
<option value="-1">请选择分类</option>
</select>
</div>
... ... @@ -82,7 +82,7 @@
<label for="classifyId" class="col-sm-2 control-label">标签分类:</label>
<div class="col-sm-10">
<input type="hidden" name="" value="[[id]]" id="id" class="form-control" pattern="" title="">
<select id="classifyId" value="[[classifyId]]" class="form-control">
<select id="classifyId" value="[[classifyId]]" required="required" class="form-control">
<option value="-1">请选择分类</option>
</select>
</div>
... ...