Authored by 周奇琪

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

require('../util/jquery.gritter');
var grid=require('./grid'),
edit = require('./edit'),
dropDown = require('./dropDown'),
dialog=require('./dialog');
var common={
grid:grid,
dialog:dialog,
dropDown:dropDown,
edit:edit,
util:{
__ajax:function(options,callback){
$.ajax({
type: 'POST',
url: options.url,
dataType: 'json',
data:options.data||{},
success: function(res) {
res=res.data;
if (res.code === 200) {
common.util.__tip(res.message,"success",callback);
} else {
common.util.__tip(res.message,"danger",callback);
}
}
});
},
__tip:function(message,callback){
if (arguments.length > 1) {
options.title=arguments[0];
if (typeof (arguments[1]) === "string") {
options.class_name="growl-"+arguments[1];
}else{
options.class_name="growl-success";
}
var lastargs = Array.prototype.slice.call(arguments, arguments.length-1);
if(typeof lastargs==="function"){
options.after_open=setTimeout(function() {
lastargs&&lastargs();
},100)
}
} else {
console.log("__tip error");
return false;
};
options.sticky=false;
options.time=1000;
$.gritter.add(options);
},
__template: function () {
var args = arguments, result;
if (args.length > 0) {
if (typeof args[0]==="string") {
result = args[0];
if (args.length == 2 && typeof args[1]=="object") {
for (var key in args[1]) {
if (args[1][key] != undefined) {
var reg = new RegExp("({" + key + "})", "g");
result = result.replace(reg, args[1][key]);
}
}
} else {
for (var i = 1; i < args.length; i++) {
if (args[i] != undefined) {
var reg = new RegExp("({[" + (i - 1) + "]})", "g");
result = result.replace(reg, args[i]);
}
}
}
}
}
return result;
}
}
}
module.exports=common;
\ No newline at end of file
... ...
var $=require('jquery');
var toast = function (options, ok, cancel) {
options = options || {};
if (typeof options=="string") {
options = { content: options };
}
options = $.extend({}, toast.defaults, options);
if (!$.isArray(options.button)) {
options.button = [];
}
if (ok !== undefined) {
options.ok = ok;
}
if (options.ok) {
options.button.push({
id: 'ok',
value: options.okValue,
callback: options.ok,
css:"btn-primary"
});
}
if (cancel !== undefined) {
options.cancel = cancel;
}
if (options.cancel) {
options.button.push({
id: 'cancel',
value: options.cancelValue,
callback: options.cancel
});
}
// toast.superclass.constructor.call(this, options);
return new toast.prototype.init(options);
}
toast.list = {};
toast.prototype.constructor=toast,
toast.prototype.closed = true;
toast.prototype.destroyed = true;
toast.prototype.current = true;
toast.prototype.init = function (options) {
var __self = this, _o = options;
__self.options=options;
__self.closed = false;
__self.destroyed = false;
var wrap = $('<div />')
.css({
display: 'none'
})
.addClass('modal')
.html(_o.template)
.appendTo('body');
__self.dom = __self.dom || __self.__dom(wrap, _o.className);
//<div class="modal-backdrop fade in"></div>
__self.dom.backdrop = $('<div />').addClass(_o.className+"backdrop");
__self.dom.backdrop.insertAfter(__self.dom.wrap);
__self
.button(_o.button)
.title(_o.title)
.content(_o.content)
.addclass(_o.addClass)
.show();
__self.dom.close[_o.show === false ? 'hide' : 'show']().attr('title', _o.cancelValue)
.on('click', function (event) {
__self._trigger('cancel');
event.preventDefault();
});
__self.dom.wrap.on('click', '[data-id]', function (event) {
var $this = $(this);
if (!$this.attr('disabled')) {
__self._trigger($this.data('id'));
}
event.preventDefault();
});
return __self;
},
toast.prototype.addclass = function (css) {
var __self = this, _o = __self.options;
__self.dom.wrap.addClass(css);
return __self;
},
toast.prototype.content = function (html) {
var __self = this, _o = __self.options;
if (!__self.dom.body) {
return __self;
}
__self.dom.body.empty('')[typeof html === 'object' ? 'append' : 'html'](typeof html === 'object' ? html.innerHTML : html);
return __self;
},
toast.prototype.title = function (text) {
var __self = this, _o = __self.options;
if (!__self.dom.title) {
return __self;
}
__self.dom.title.html(text);
__self.dom.title[text ? 'show' : 'hide']();
return __self;
},
toast.prototype.button = function () {
var __self = this, _o = __self.options;
var html = '', args = _o.button;
__self.callbacks = {};
if (!__self.dom.button) {
return this;
}
if (typeof args === 'string') {
html = args;
} else {
$.each(args, function (i, val) {
val.id = val.id || val.value;
__self.callbacks[val.id] = val.callback;
html +=
'<button'
+ ' type="button"'
+ ' data-id="' + val.id + '"'
+ ' class="' + (_o.className + val.id) + ' btn '+(val.css ? val.css : 'btn-default')+'"'
+ '>'
+ val.value
+ '</button>';
});
}
if ($.trim(html) == "")
__self.dom.button.hide();
else
__self.dom.button.html(html).show();
return __self;
},
toast.prototype.time = function (second) {
var __self = this, _o = __self.options;
var cancel = _o.cancelValue, timer = __self._timer;
timer && clearTimeout(timer);
if (second) {
__self._timer = setTimeout(function () {
__self._click(cancel);
}, 1000 * second);
};
return __self;
},
toast.prototype.show = function () {
var __self = this, _o = __self.options;
if (__self.destroyed) {
return this;
}
__self.dom.wrap.show().addClass("fade in");
__self.dom.backdrop.show().addClass("fade in");
__self.open = true;
return __self;
},
toast.prototype.close = function () {
var __self = this, _o = __self.options;
if (!__self.destroyed && __self.open) {
__self.dom.wrap.removeClass('in');
setTimeout(function () {
__self.dom.wrap.hide();
__self.dom.backdrop.hide();
__self.remove();
__self.open = false;
}, 200);
}
return this;
},
toast.prototype.remove = function () {
var __self = this, _o = __self.options;
if (__self.destroyed) {
return g;
}
if (__self.current === this)
__self.current = null;
__self.dom.wrap.remove();
__self.dom.backdrop.remove();
for (var i in __self) {
delete this[i];
}
return this;
},
toast.prototype._trigger = function (id) {
var __self = this, _o = __self.options;
var fn = __self.callbacks[id];
return typeof fn !== 'function' || fn.call(__self) !== false ?
__self.close() : __self;
},
toast.prototype._click = function (name) {
var __self = this, _o = __self.options;
var fn = __self.callbacks[name];
return typeof fn !== 'function' || fn.call(__self, window) !== false ?
__self.close() : __self;
},
toast.prototype.__dom= function ($select, classCss) {
var wrap = $select;
var name, DOM = {
wrap: $(wrap)
},
els = wrap[0].getElementsByTagName("*"),
elsLen = els.length;
for (var i = 0; i < elsLen; i++) {
name = els[i].className;
if (name.indexOf(classCss) > -1) {
name = name.split(classCss)[1];
}
if (name) {
DOM[name] = $(els[i], wrap)
}
}
return DOM
},
toast._through = function () {
var __self = this, _o = __self.options;
var api = new toast(arguments[0]);
return api;
}
toast.alert = function (content, callback) {
var __self = this, _o = __self.options;
return __self._through({
title: '提示',
addClass: 'alert',
icon: 'alert',
width: 440,
lock: true,
content: content,
ok: callback || true
});
}
toast.confirm = function (title,content, yes, no) {
var __self = this, _o = __self.options;
return __self._through({
title: title||'确认',
icon: 'confirm',
addClass: 'confirm',
lock: true,
show: false,
content: content,
ok: function (here) {
return yes.call(this, here);
},
cancel: function (here) {
return no && no.call(this, here);
}
});
};
toast.tip = function (content, time) {
var __self = this, _o = __self.options;
return __self._through({
icon: 'tip',
addClass: 'tip',
content: content,
show: false,
time: time || 2
});
}
toast.close = function () {
// var __self = this, _o = __self.options;
// var _api = __self.top().me.get(window.frameElement.name);
// _api.close();
}
toast.defaults = {
init: null,
zIndex: 1024,
lock: true,
content: 'Loading...',
title: '',
show: true,
button: null,
ok: null,
cancel: null,
okValue: '确定',
cancelValue: '取消',
addClass:'fade in',
className: 'modal-',
template:'<div class="modal-dialog">'
+'<div class="modal-content">'
+'<div class="modal-header">'
+'<button type="button" class="close" ><span aria-hidden="true">&times;</span></button>'
+'<h4 class="modal-title"></h4>'
+'</div>'
+'<div class="modal-body">'
+'</div>'
+'<div class="modal-footer">'
+'<div class="modal-button">'
+'</div>'
+'</div>'
+'</div>'
+'</div>'
}
toast.prototype.init.prototype=toast.prototype;
module.exports=toast;
\ No newline at end of file
... ...
... ... @@ -35,30 +35,7 @@ var grid=function(options){
grid.prototype={
constructor:grid,
template: function () {
var args = arguments, result;
if (args.length > 0) {
if (me.isString(args[0])) {
result = args[0];
if (args.length == 2 && me.isObject(args[1])) {
for (var key in args[1]) {
if (args[1][key] != undefined) {
var reg = new RegExp("({" + key + "})", "g");
result = result.replace(reg, args[1][key]);
}
}
} else {
for (var i = 1; i < args.length; i++) {
if (args[i] != undefined) {
var reg = new RegExp("({[" + (i - 1) + "]})", "g");
result = result.replace(reg, args[i]);
}
}
}
}
}
return result;
},
init:function(url){
var g = this, p = this.options;
p.url=url;
... ... @@ -271,6 +248,7 @@ grid.prototype={
if (!item) continue;
_h += ('<tr >');
g.records.push(_count);
item.__index=_count;
g.rows.push(item);
$(p.columns).each(function (i, column) {
if(!column.hidden)
... ...
/**
* umeditor完整配置项
* 可以在这里配置整个编辑器的特性
*/
/**************************提示********************************
* 所有被注释的配置项均为UEditor默认值。
* 修改默认配置请首先确保已经完全明确该参数的真实用途。
* 主要有两种修改方案,一种是取消此处注释,然后修改成对应参数;另一种是在实例化编辑器时传入对应参数。
* 当升级编辑器时,可直接使用旧版配置文件替换新版配置文件,不用担心旧版配置文件中因缺少新功能所需的参数而导致脚本报错。
**************************提示********************************/
exports.ueditorConf = function () {
/**
* 编辑器资源文件根路径。它所表示的含义是:以编辑器实例化页面为当前路径,指向编辑器资源文件(即dialog等文件夹)的路径。
* 鉴于很多同学在使用编辑器的时候出现的种种路径问题,此处强烈建议大家使用"相对于网站根目录的相对路径"进行配置。
* "相对于网站根目录的相对路径"也就是以斜杠开头的形如"/myProject/umeditor/"这样的路径。
* 如果站点中有多个不在同一层级的页面需要实例化编辑器,且引用了同一UEditor的时候,此处的URL可能不适用于每个页面的编辑器。
* 因此,UEditor提供了针对不同页面的编辑器可单独配置的根路径,具体来说,在需要实例化编辑器的页面最顶部写上如下代码即可。当然,需要令此处的URL等于对应的配置。
* window.UMEDITOR_HOME_URL = "/xxxx/xxxx/";
*/
var URL = window.UMEDITOR_HOME_URL || (function () {
function PathStack() {
this.documentURL = self.document.URL || self.location.href;
this.separator = '/';
this.separatorPattern = /\\|\//g;
this.currentDir = './';
this.currentDirPattern = /^[.]\/]/;
this.path = this.documentURL;
this.stack = [];
this.push(this.documentURL);
}
PathStack.isParentPath = function (path) {
return path === '..';
};
PathStack.hasProtocol = function (path) {
return !!PathStack.getProtocol(path);
};
PathStack.getProtocol = function (path) {
var protocol = /^[^:]*:\/*/.exec(path);
return protocol ? protocol[0] : null;
};
PathStack.prototype = {
push: function (path) {
this.path = path;
update.call(this);
parse.call(this);
return this;
},
getPath: function () {
return this + "";
},
toString: function () {
return this.protocol + ( this.stack.concat(['']) ).join(this.separator);
}
};
function update() {
var protocol = PathStack.getProtocol(this.path || '');
if (protocol) {
//根协议
this.protocol = protocol;
//local
this.localSeparator = /\\|\//.exec(this.path.replace(protocol, ''))[0];
this.stack = [];
} else {
protocol = /\\|\//.exec(this.path);
protocol && (this.localSeparator = protocol[0]);
}
}
function parse() {
var parsedStack = this.path.replace(this.currentDirPattern, '');
if (PathStack.hasProtocol(this.path)) {
parsedStack = parsedStack.replace(this.protocol, '');
}
parsedStack = parsedStack.split(this.localSeparator);
parsedStack.length = parsedStack.length - 1;
for (var i = 0, tempPath, l = parsedStack.length, root = this.stack; i < l; i++) {
tempPath = parsedStack[i];
if (tempPath) {
if (PathStack.isParentPath(tempPath)) {
root.pop();
} else {
root.push(tempPath);
}
}
}
}
var currentPath = document.getElementsByTagName('script');
currentPath = currentPath[currentPath.length - 1].src;
return new PathStack().push(currentPath) + "";
})();
/**
* 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。
*/
window.UMEDITOR_CONFIG = {
//为编辑器实例添加一个路径,这个不能被注释
UMEDITOR_HOME_URL: URL
//图片上传配置区
, imageUrl: URL + "php/imageUp.php" //图片上传提交地址
, imagePath: URL + "php/" //图片修正地址,引用了fixedImagePath,如有特殊需求,可自行配置
, imageFieldName: "upfile" //图片数据的key,若此处修改,需要在后台对应文件修改对应参数
//工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的从新定义
, toolbar: [
'source | undo redo | bold italic underline strikethrough | superscript subscript | forecolor backcolor | removeformat |',
'insertorderedlist insertunorderedlist | selectall cleardoc paragraph | fontfamily fontsize',
'| justifyleft justifycenter justifyright justifyjustify |',
'link unlink | emotion image video | map',
'| horizontal print preview fullscreen', 'drafts', 'formula'
]
//语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换,当然,前提条件是lang文件夹下存在对应的语言文件:
//lang值也可以通过自动获取 (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase()
//,lang:"zh-cn"
//,langPath:URL +"lang/"
//ie下的链接自动监测
//,autourldetectinie:false
//主题配置项,默认是default。有需要的话也可以使用如下这样的方式来自动多主题切换,当然,前提条件是themes文件夹下存在对应的主题文件:
//现有如下皮肤:default
//,theme:'default'
//,themePath:URL +"themes/"
//针对getAllHtml方法,会在对应的head标签中增加该编码设置。
//,charset:"utf-8"
//常用配置项目
//,isShow : true //默认显示编辑器
//,initialContent:'欢迎使用UMEDITOR!' //初始化编辑器的内容,也可以通过textarea/script给值,看官网例子
//,initialFrameWidth:500 //初始化编辑器宽度,默认500
//,initialFrameHeight:500 //初始化编辑器高度,默认500
//,autoClearinitialContent:true //是否自动清除编辑器初始内容,注意:如果focus属性设置为true,这个也为真,那么编辑器一上来就会触发导致初始化的内容看不到了
//,textarea:'editorValue' // 提交表单时,服务器获取编辑器提交内容的所用的参数,多实例时可以给容器name属性,会将name给定的值最为每个实例的键值,不用每次实例化的时候都设置这个值
//,focus:false //初始化时,是否让编辑器获得焦点true或false
//,autoClearEmptyNode : true //getContent时,是否删除空的inlineElement节点(包括嵌套的情况)
//,fullscreen : false //是否开启初始化时即全屏,默认关闭
//,readonly : false //编辑器初始化结束后,编辑区域是否是只读的,默认是false
//,zIndex : 900 //编辑器层级的基数,默认是900
//如果自定义,最好给p标签如下的行高,要不输入中文时,会有跳动感
//注意这里添加的样式,最好放在.edui-editor-body .edui-body-container这两个的下边,防止跟页面上css冲突
//,initialStyle:'.edui-editor-body .edui-body-container p{line-height:1em}'
//,autoSyncData:true //自动同步编辑器要提交的数据
//,emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
//,allHtmlEnabled:false //提交到后台的数据是否包含整个html字符串
//fontfamily
//字体设置
// ,'fontfamily':[
// { name: 'songti', val: '宋体,SimSun'},
// ]
//fontsize
//字号
//,'fontsize':[10, 11, 12, 14, 16, 18, 20, 24, 36]
//paragraph
//段落格式 值留空时支持多语言自动识别,若配置,则以配置值为准
//,'paragraph':{'p':'', 'h1':'', 'h2':'', 'h3':'', 'h4':'', 'h5':'', 'h6':''}
//undo
//可以最多回退的次数,默认20
//,maxUndoCount:20
//当输入的字符数超过该值时,保存一次现场
//,maxInputCount:1
//imageScaleEnabled
// 是否允许点击文件拖拽改变大小,默认true
//,imageScaleEnabled:true
//dropFileEnabled
// 是否允许拖放图片到编辑区域,上传并插入,默认true
//,dropFileEnabled:true
//pasteImageEnabled
// 是否允许粘贴QQ截屏,上传并插入,默认true
//,pasteImageEnabled:true
//autoHeightEnabled
// 是否自动长高,默认true
//,autoHeightEnabled:true
//autoFloatEnabled
//是否保持toolbar的位置不动,默认true
//,autoFloatEnabled:true
//浮动时工具栏距离浏览器顶部的高度,用于某些具有固定头部的页面
//,topOffset:30
//填写过滤规则
//,filterRules: {}
};
}
... ...
This diff could not be displayed because it is too large.
/**
* 中文语言包
*/
exports.init = function (UM) {
UM.I18N['zh-cn'] = {
'labelMap': {
'anchor': '锚点',
'undo': '撤销',
'redo': '重做',
'bold': '加粗',
'indent': '首行缩进',
'snapscreen': '截图',
'italic': '斜体',
'underline': '下划线',
'strikethrough': '删除线',
'subscript': '下标',
'fontborder': '字符边框',
'superscript': '上标',
'formatmatch': '格式刷',
'source': '源代码',
'blockquote': '引用',
'pasteplain': '纯文本粘贴模式',
'selectall': '全选',
'print': '打印',
'preview': '预览',
'horizontal': '分隔线',
'removeformat': '清除格式',
'time': '时间',
'date': '日期',
'unlink': '取消链接',
'insertrow': '前插入行',
'insertcol': '前插入列',
'mergeright': '右合并单元格',
'mergedown': '下合并单元格',
'deleterow': '删除行',
'deletecol': '删除列',
'splittorows': '拆分成行',
'splittocols': '拆分成列',
'splittocells': '完全拆分单元格',
'mergecells': '合并多个单元格',
'deletetable': '删除表格',
'cleardoc': '清空文档',
'insertparagraphbeforetable': "表格前插入行",
'insertcode': '代码语言',
'fontfamily': '字体',
'fontsize': '字号',
'paragraph': '段落格式',
'image': '图片',
'edittable': '表格属性',
'edittd': '单元格属性',
'link': '超链接',
'emotion': '表情',
'spechars': '特殊字符',
'searchreplace': '查询替换',
'map': '百度地图',
'gmap': 'Google地图',
'video': '视频',
'help': '帮助',
'justifyleft': '居左对齐',
'justifyright': '居右对齐',
'justifycenter': '居中对齐',
'justifyjustify': '两端对齐',
'forecolor': '字体颜色',
'backcolor': '背景色',
'insertorderedlist': '有序列表',
'insertunorderedlist': '无序列表',
'fullscreen': '全屏',
'directionalityltr': '从左向右输入',
'directionalityrtl': '从右向左输入',
'rowspacingtop': '段前距',
'rowspacingbottom': '段后距',
'highlightcode': '插入代码',
'pagebreak': '分页',
'insertframe': '插入Iframe',
'imagenone': '默认',
'imageleft': '左浮动',
'imageright': '右浮动',
'attachment': '附件',
'imagecenter': '居中',
'wordimage': '图片转存',
'lineheight': '行间距',
'edittip': '编辑提示',
'customstyle': '自定义标题',
'autotypeset': '自动排版',
'webapp': '百度应用',
'touppercase': '字母大写',
'tolowercase': '字母小写',
'background': '背景',
'template': '模板',
'scrawl': '涂鸦',
'music': '音乐',
'inserttable': '插入表格',
'drafts': '草稿箱',
'formula': '数学公式'
},
'paragraph': {'p': '段落', 'h1': '标题 1', 'h2': '标题 2', 'h3': '标题 3', 'h4': '标题 4', 'h5': '标题 5', 'h6': '标题 6'},
'fontfamily': {
'songti': '宋体',
'kaiti': '楷体',
'heiti': '黑体',
'lishu': '隶书',
'yahei': '微软雅黑',
'andaleMono': 'andale mono',
'arial': 'arial',
'arialBlack': 'arial black',
'comicSansMs': 'comic sans ms',
'impact': 'impact',
'timesNewRoman': 'times new roman'
},
'ok': "确认",
'cancel': "取消",
'closeDialog': "关闭对话框",
'tableDrag': "表格拖动必须引入uiUtils.js文件!",
'autofloatMsg': "工具栏浮动依赖编辑器UI,您首先需要引入UI文件!",
'anthorMsg': "链接",
'clearColor': '清空颜色',
'standardColor': '标准颜色',
'themeColor': '主题颜色',
'property': '属性',
'default': '默认',
'modify': '修改',
'justifyleft': '左对齐',
'justifyright': '右对齐',
'justifycenter': '居中',
'justify': '默认',
'clear': '清除',
'anchorMsg': '锚点',
'delete': '删除',
'clickToUpload': "点击上传",
'unset': '尚未设置语言文件',
't_row': '行',
't_col': '列',
'more': '更多',
'pasteOpt': '粘贴选项',
'pasteSourceFormat': "保留源格式",
'tagFormat': '只保留标签',
'pasteTextFormat': '只保留文本',
//===============dialog i18N=======================
'image': {
'static': {
'lang_tab_local': "本地上传",
'lang_tab_imgSearch': "网络图片",
'lang_input_dragTip': "支持图片拖拽上传",
'lang_btn_add': "添加"
},
'uploadError': '上传出错'
},
'emotion': {
'static': {
'lang_input_choice': '精选',
'lang_input_Tuzki': '兔斯基',
'lang_input_BOBO': 'BOBO',
'lang_input_lvdouwa': '绿豆蛙',
'lang_input_babyCat': 'baby猫',
'lang_input_bubble': '泡泡',
'lang_input_youa': '有啊'
}
},
'gmap': {
'static': {
'lang_input_address': '地址',
'lang_input_search': '搜索',
'address': {'value': "北京"}
},
'searchError': '无法定位到该地址!'
},
'link': {
'static': {
'lang_input_text': '文本内容:',
'lang_input_url': '链接地址:',
'lang_input_title': '标题:',
'lang_input_target': '是否在新窗口打开:'
},
'validLink': '只支持选中一个链接时生效',
'httpPrompt': '您输入的超链接中不包含http等协议名称,默认将为您添加http://前缀'
},
'map': {
'static': {
'lang_city': "城市",
'lang_address': "地址",
'city': {'value': "北京"},
'lang_search': "搜索",
'lang_dynamicmap': "插入动态地图"
},
'cityMsg': "请选择城市",
'errorMsg': "抱歉,找不到该位置!"
},
'video': {
'static': {
'lang_tab_insertV': "插入视频",
'lang_video_url': "视频网址",
'lang_video_size': "视频尺寸",
'lang_videoW': "宽度",
'lang_videoH': "高度",
'lang_alignment': "对齐方式",
'videoSearchTxt': {'value': "请输入搜索关键字!"},
'videoType': {'options': ["全部", "热门", "娱乐", "搞笑", "体育", "科技", "综艺"]},
'videoSearchBtn': {'value': "百度一下"},
'videoSearchReset': {'value': "清空结果"}
},
'numError': "请输入正确的数值,如123,400",
'floatLeft': "左浮动",
'floatRight': "右浮动",
'default': "默认",
'block': "独占一行",
'urlError': "输入的视频地址有误,请检查后再试!",
'loading': " &nbsp;视频加载中,请等待……",
'clickToSelect': "点击选中",
'goToSource': '访问源视频',
'noVideo': " &nbsp; &nbsp;抱歉,找不到对应的视频,请重试!"
},
'formula': {
'static': {
'lang_tab_common': '常用公式',
'lang_tab_symbol': '符号',
'lang_tab_letter': '字母'
}
}
};
}
\ No newline at end of file
... ...
... ... @@ -24,14 +24,11 @@ exports.init = function() {
e.on("bind",function(){
if($("#reqDepartment").val()){
var departmentArr = String.prototype.split.call($("#reqDepartment").val(), '/'),
$department1 = $("#department1"),
$department2 = $("#department2");
$("select").change(function() {
console.log(11);
console.log(11);
if ($(this).is($department1)) {
departmentArr.length = 0;
departmentArr[0] = $(this).val();
... ... @@ -49,15 +46,34 @@ exports.init = function() {
}
});
$('#limit-time').on('click', function() {
console.log(1);
$('#limitDateFrom, #limitDateTo').attr('disabled', false);
});
e.init();
$('#no-limit-time').on('click', function() {
console.log(2);
$('#limitDateFrom, #limitDateTo').attr('disabled', true);
});
var submit=function(callback){
e.submit($("#basicForm").attr("action"),function(option){
option.success=function(res){
res=res.data;
if(res.code=="200"){
e.$tip('修改成功',function(){
location.href="/limit/index";
},'growl-success');
}else{
e.$tip(res.message);
}
return false;
},
option.error=function(res){
e.$tip("提交失败");
}
callback&&callback(option.data);
});
}
e.init();
$("#save_brand").click(function(){
submit(function(data){
// 限购码状态0:待审核 1:审核通过 2:驳回 3:过期 4:作废
data.status=0;
});
return false;
});
}
\ No newline at end of file
... ...
'use strict';
var $ = require('jquery'),
common=require('../common/common');
exports.init = function() {
new common.dropDown({el: '#filter-dep'});
var g = new common.grid({
el: '#basicTable',
url:$("#gridurl").val(),
parms:function(){
return {};
},
columns:[
{display:"批次号",name:"batchNo"},
{display:"基本信息",render:function(item){
var arr=[];
arr.push("<p>名称:"+item.name+"</p>");
arr.push("<p>次数:"+item.limitTimes+"</p>");
arr.push("<p>数量:"+item.userUseLimit+"</p>");
arr.push("<p>部门:"+item.reqDepartment+"</p>");
return arr.join('');
}},
{display:"使用日期",render:function(item){
return item.limitDateFrom+"</br> 至 "+item.limitDateTo;
}},
{display:"限购码使用说明",name:"describe"},
{display:"申请人",name:"creatorName"},
{display:"操作",render:function(){
var HtmArr=[];
//限购码状态0:待审核 1:审核通过 2:驳回 3:过期 4:作废
HtmArr.push('<a href="/limit/code/info/'+ items.id+'" class="btn btn-info btn-xs">查看详情</a>');
if(items.status == 0){
HtmArr.push('<a class="btn btn-primary btn-xs apply-success" data-index="'+ items.__index+'" href="javascript:;">通过</a>');
HtmArr.push('<a class="btn btn-warning btn-xs apply-back" data-index="'+ items.__index+'" href="javascript:;">驳回</a>');
HtmArr.push('<a class="btn btn-danger btn-xs apply-cancel" data-index="'+ items.__index+'" href="javascript:;">作废</a>');
}else if(status==1){
HtmArr.push('<a class="btn btn-danger btn-xs apply-cancel" data-index="'+ items.__index+'" href="javascript:;">作废</a>');
}else if(status==2){
HtmArr.push('<a class="btn btn-info btn-xs apply-modify" href="/limit/code/update/'+ items.id+'">修改</a>');
}
return HtmArr.join('');
}}
]
});
g.init();
var tool={
toast:function(content,data){
common.dialog.confirm("温馨提示",content,function(){
common.util.__ajax({
url:'/limit/code/auditLimitCode',
data:data
},function(){
g.reload();
});
});
}
}
//审核通过
$('#basicTable').on('click', '.apply-success', function() {
var item=g.rows[$(this).data("data-index")];
var data={
id:item.id,
status:1,
reason:"预算不够"
};
tool.toast("确定要通过该申请吗?",data);
});
//驳回
$('#basicTable').on('click', '.apply-back', function() {
var item=g.rows[$(this).data("data-index")];
var data={
id:item.id,
status:2,
reason:"预算不够"
};
tool.toast(common.util.__template($("#template").html(),{title:"你确定要驳回该申请吗?"}),data);
});
//作废
$('#basicTable').on('click', '.apply-cancel', function() {
var item=g.rows[$(this).data("data-index")];
var data={
id:item.id,
status: 3,
reason:"预算不够"
};
tool.toast(common.util.__template($("#template").html(),{title:"你确定要作废此限购码吗?"}),data);
});
}
\ No newline at end of file
... ...
/*
*@time: 2016/2/15
*@author: chenglong
*/
var $ = require('jquery');
var edit = require('../common/edit');
var uploadImg = new edit('#coverImgBox');
//uploadImg.init();
exports.init = function () {
/*$('.add-pic-btn').click(function () {
console.log(111);
var str = '<img src="http://img11.static.yhbimg.com/goodsimg/2015/07/07/08/01315b5bbfd72bc5b59fa2fda6c28b9ae6.jpg"/>';
$('.quota-img').html(str);
$('#picDialog').modal('toggle');
});*/
};
\ No newline at end of file
... ...
... ... @@ -7,13 +7,22 @@
var $ = require('jquery');
var edit = require('../common/edit');
var grid=require('../common/grid');
var ueditor = require('../common/umeditor.config');
var UM = require('../common/umeditor');
var UMLanguage = require('../common/zh-cn');
var baseNum = 1;
/*ueditor.ueditorConf();
UMLanguage.init(UM);
var um = UM.getEditor('text-dialog-body');*/
var tableGird = new grid({
el:"#limit-table-box",
parms:function(){
//todo
return {
//id: window.categoryId * baseNum
};
... ...
... ... @@ -28,11 +28,11 @@ exports.init = function() {
//分类ID 分类名称 尺码属性ID 尺码属性名 排序 操作
{display:"分类ID",name:"sortId"},
{display:"分类名称",name:"sortName"},
{display:"尺码属性ID",name:"sizeId"},
{display:"尺码属性名",name:"sizeName"},
{display:"尺码属性ID",name:"attributeId"},
{display:"尺码属性名",name:"attributeName"},
{display:"排序",name:"orderBy"},
{display:"操作",name:'id',render:function(item){
return '<a data-sortid="'+item.sortId+'" href="javascript:void(0)" class="btn btn-success btn-xs delbtn">删除</a>';
return '<a data-index="'+item.__index+'" href="javascript:void(0)" class="btn btn-success btn-xs delbtn">删除</a>';
}}
]
... ... @@ -74,17 +74,18 @@ exports.init = function() {
}
$(document).on("click",".delbtn",function(){
var _id=$(this).data("sortid");
var row=g.rows[$(this).data("data-index")];
var data={sortId:row.sortId,attributeId:row.attributeId}
__ajax({
url:'/erpproduct/sortattribute/ajax/delete',
data:{id:_id}
data:data
},function(){
g.reload();
});
});
$(document).on("click",".add-attr-btn",function(){
var data={sortId:window.menuid,sizeId:$("#sizeId").val(),orderBy:$("#orderBy").val()};
var data={sortId:window.menuid,attributeId:$("#sizeId").val(),orderBy:$("#orderBy").val()};
if(!data.sortId){
alert("尺码不可为空");
return;
... ... @@ -99,7 +100,7 @@ exports.init = function() {
}
__ajax({
url:'/erpproduct/sortattribute/ajax/add',
data:{sortId:"",sortName:"",sizeId:"",orderBy:""}
data:data
},function(){
g.reload();
});
... ...
This diff could not be displayed because it is too large.
/*global plupload ,mOxie*/
/*global ActiveXObject */
/*exported Qiniu */
/*exported QiniuJsSDK */
require("./plupload.min");
function QiniuJsSDK() {
this.detectIEVersion = function() {
var v = 4,
div = document.createElement('div'),
all = div.getElementsByTagName('i');
while (
div.innerHTML = '<!--[if gt IE ' + v + ']><i></i><![endif]-->',
all[0]
) {
v++;
}
return v > 4 ? v : false;
};
this.isImage = function(url) {
var res, suffix = "";
var imageSuffixes = ["png", "jpg", "jpeg", "gif", "bmp"];
var suffixMatch = /\.([a-zA-Z0-9]+)(\?|\@|$)/;
if (!url || !suffixMatch.test(url)) {
return false;
}
res = suffixMatch.exec(url);
suffix = res[1].toLowerCase();
for (var i = 0, l = imageSuffixes.length; i < l; i++) {
if (suffix === imageSuffixes[i]) {
return true;
}
}
return false;
};
this.getFileExtension = function(filename) {
var tempArr = filename.split(".");
var ext;
if (tempArr.length === 1 || (tempArr[0] === "" && tempArr.length === 2)) {
ext = "";
} else {
ext = tempArr.pop().toLowerCase(); //get the extension and make it lower-case
}
return ext;
};
this.utf8_encode = function(argString) {
// http://kevin.vanzonneveld.net
// + original by: Webtoolkit.info (http://www.webtoolkit.info/)
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + improved by: sowberry
// + tweaked by: Jack
// + bugfixed by: Onno Marsman
// + improved by: Yves Sucaet
// + bugfixed by: Onno Marsman
// + bugfixed by: Ulrich
// + bugfixed by: Rafal Kukawski
// + improved by: kirilloid
// + bugfixed by: kirilloid
// * example 1: this.utf8_encode('Kevin van Zonneveld');
// * returns 1: 'Kevin van Zonneveld'
if (argString === null || typeof argString === 'undefined') {
return '';
}
var string = (argString + ''); // .replace(/\r\n/g, '\n').replace(/\r/g, '\n');
var utftext = '',
start, end, stringl = 0;
start = end = 0;
stringl = string.length;
for (var n = 0; n < stringl; n++) {
var c1 = string.charCodeAt(n);
var enc = null;
if (c1 < 128) {
end++;
} else if (c1 > 127 && c1 < 2048) {
enc = String.fromCharCode(
(c1 >> 6) | 192, (c1 & 63) | 128
);
} else if (c1 & 0xF800 ^ 0xD800 > 0) {
enc = String.fromCharCode(
(c1 >> 12) | 224, ((c1 >> 6) & 63) | 128, (c1 & 63) | 128
);
} else { // surrogate pairs
if (c1 & 0xFC00 ^ 0xD800 > 0) {
throw new RangeError('Unmatched trail surrogate at ' + n);
}
var c2 = string.charCodeAt(++n);
if (c2 & 0xFC00 ^ 0xDC00 > 0) {
throw new RangeError('Unmatched lead surrogate at ' + (n - 1));
}
c1 = ((c1 & 0x3FF) << 10) + (c2 & 0x3FF) + 0x10000;
enc = String.fromCharCode(
(c1 >> 18) | 240, ((c1 >> 12) & 63) | 128, ((c1 >> 6) & 63) | 128, (c1 & 63) | 128
);
}
if (enc !== null) {
if (end > start) {
utftext += string.slice(start, end);
}
utftext += enc;
start = end = n + 1;
}
}
if (end > start) {
utftext += string.slice(start, stringl);
}
return utftext;
};
this.base64_encode = function(data) {
// http://kevin.vanzonneveld.net
// + original by: Tyler Akins (http://rumkin.com)
// + improved by: Bayron Guevara
// + improved by: Thunder.m
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + bugfixed by: Pellentesque Malesuada
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// - depends on: this.utf8_encode
// * example 1: this.base64_encode('Kevin van Zonneveld');
// * returns 1: 'S2V2aW4gdmFuIFpvbm5ldmVsZA=='
// mozilla has this native
// - but breaks in 2.0.0.12!
//if (typeof this.window['atob'] == 'function') {
// return atob(data);
//}
var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,
ac = 0,
enc = '',
tmp_arr = [];
if (!data) {
return data;
}
data = this.utf8_encode(data + '');
do { // pack three octets into four hexets
o1 = data.charCodeAt(i++);
o2 = data.charCodeAt(i++);
o3 = data.charCodeAt(i++);
bits = o1 << 16 | o2 << 8 | o3;
h1 = bits >> 18 & 0x3f;
h2 = bits >> 12 & 0x3f;
h3 = bits >> 6 & 0x3f;
h4 = bits & 0x3f;
// use hexets to index into b64, and append result to encoded string
tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);
} while (i < data.length);
enc = tmp_arr.join('');
switch (data.length % 3) {
case 1:
enc = enc.slice(0, -2) + '==';
break;
case 2:
enc = enc.slice(0, -1) + '=';
break;
}
return enc;
};
this.URLSafeBase64Encode = function(v) {
v = this.base64_encode(v);
return v.replace(/\//g, '_').replace(/\+/g, '-');
};
this.createAjax = function(argument) {
var xmlhttp = {};
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
} else {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlhttp;
};
this.parseJSON = function(data) {
// Attempt to parse using the native JSON parser first
if (window.JSON && window.JSON.parse) {
return window.JSON.parse(data);
}
if (data === null) {
return data;
}
if (typeof data === "string") {
// Make sure leading/trailing whitespace is removed (IE can't handle it)
data = this.trim(data);
if (data) {
// Make sure the incoming data is actual JSON
// Logic borrowed from http://json.org/json2.js
if (/^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, "@").replace(/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) {
return (function() {
return data;
})();
}
}
}
};
this.trim = function(text) {
return text === null ? "" : this.trim.call(text);
};
//Todo ie7 handler / this.parseJSON bug;
var that = this;
this.uploader = function(op) {
if (!op.domain) {
throw 'uptoken_url or domain is required!';
}
if (!op.browse_button) {
throw 'browse_button is required!';
}
var option = {};
var _Error_Handler = op.init && op.init.Error;
var _FileUploaded_Handler = op.init && op.init.FileUploaded;
op.init.Error = function() {};
op.init.FileUploaded = function() {};
that.uptoken_url = op.uptoken_url;
that.token = '';
that.key_handler = typeof op.init.Key === 'function' ? op.init.Key : '';
this.domain = op.domain;
var ctx = '';
var speedCalInfo = {
isResumeUpload: false,
resumeFilesize: 0,
startTime: '',
currentTime: ''
};
var reset_chunk_size = function() {
var ie = that.detectIEVersion();
var BLOCK_BITS, MAX_CHUNK_SIZE, chunk_size;
var isSpecialSafari = (mOxie.Env.browser === "Safari" && mOxie.Env.version <= 5 && mOxie.Env.os === "Windows" && mOxie.Env.osVersion === "7") || (mOxie.Env.browser === "Safari" && mOxie.Env.os === "iOS" && mOxie.Env.osVersion === "7");
if (ie && ie <= 9 && op.chunk_size && op.runtimes.indexOf('flash') >= 0) {
// link: http://www.plupload.com/docs/Frequently-Asked-Questions#when-to-use-chunking-and-when-not
// when plupload chunk_size setting is't null ,it cause bug in ie8/9 which runs flash runtimes (not support html5) .
op.chunk_size = 0;
} else if (isSpecialSafari) {
// win7 safari / iOS7 safari have bug when in chunk upload mode
// reset chunk_size to 0
// disable chunk in special version safari
op.chunk_size = 0;
} else {
BLOCK_BITS = 20;
MAX_CHUNK_SIZE = 4 << BLOCK_BITS; //4M
chunk_size = plupload.parseSize(op.chunk_size);
if (chunk_size > MAX_CHUNK_SIZE) {
op.chunk_size = MAX_CHUNK_SIZE;
}
// qiniu service max_chunk_size is 4m
// reset chunk_size to max_chunk_size(4m) when chunk_size > 4m
}
};
reset_chunk_size();
var getUpToken = function() {
if (!op.uptoken) {
var ajax = that.createAjax();
ajax.open('GET', that.uptoken_url, true);
ajax.setRequestHeader("If-Modified-Since", "0");
ajax.onreadystatechange = function() {
if (ajax.readyState === 4 && ajax.status === 200) {
var res = that.parseJSON(ajax.responseText);
that.token = res.uptoken;
}
};
ajax.send();
} else {
that.token = op.uptoken;
}
};
var getFileKey = function(up, file, func) {
var key = '',
unique_names = false;
if (!op.save_key) {
unique_names = up.getOption && up.getOption('unique_names');
unique_names = unique_names || (up.settings && up.settings.unique_names);
if (unique_names) {
var ext = that.getFileExtension(file.name);
key = ext ? file.id + '.' + ext : file.id;
} else if (typeof func === 'function') {
key = func(up, file);
} else {
key = file.name;
}
}
return key;
};
plupload.extend(option, op, {
url: 'http://upload.qiniu.com',
multipart_params: {
token: ''
}
});
var uploader = new plupload.Uploader(option);
uploader.bind('Init', function(up, params) {
getUpToken();
});
uploader.init();
uploader.bind('FilesAdded', function(up, files) {
var auto_start = up.getOption && up.getOption('auto_start');
auto_start = auto_start || (up.settings && up.settings.auto_start);
if (auto_start) {
plupload.each(files, function(i, file) {
up.start();
});
}
up.refresh(); // Reposition Flash/Silverlight
});
uploader.bind('BeforeUpload', function(up, file) {
file.speed = file.speed || 0; // add a key named speed for file obj
ctx = '';
var directUpload = function(up, file, func) {
speedCalInfo.startTime = new Date().getTime();
var multipart_params_obj;
if (op.save_key) {
multipart_params_obj = {
'token': that.token
};
} else {
multipart_params_obj = {
'key': getFileKey(up, file, func),
'token': that.token
};
}
var x_vars = op.x_vars;
if (x_vars !== undefined && typeof x_vars === 'object') {
for (var x_key in x_vars) {
if (x_vars.hasOwnProperty(x_key)) {
if (typeof x_vars[x_key] === 'function') {
multipart_params_obj['x:' + x_key] = x_vars[x_key](up, file);
} else if (typeof x_vars[x_key] !== 'object') {
multipart_params_obj['x:' + x_key] = x_vars[x_key];
}
}
}
}
up.setOption({
'url': 'http://upload.qiniu.com/',
'multipart': true,
'chunk_size': undefined,
'multipart_params': multipart_params_obj
});
};
var chunk_size = up.getOption && up.getOption('chunk_size');
chunk_size = chunk_size || (up.settings && up.settings.chunk_size);
if (uploader.runtime === 'html5' && chunk_size) {
if (file.size < chunk_size) {
directUpload(up, file, that.key_handler);
} else {
var localFileInfo = localStorage.getItem(file.name);
var blockSize = chunk_size;
if (localFileInfo) {
localFileInfo = JSON.parse(localFileInfo);
var now = (new Date()).getTime();
var before = localFileInfo.time || 0;
var aDay = 24 * 60 * 60 * 1000; // milliseconds
if (now - before < aDay) {
if (localFileInfo.percent !== 100) {
if (file.size === localFileInfo.total) {
// 通过文件名和文件大小匹配,找到对应的 localstorage 信息,恢复进度
file.percent = localFileInfo.percent;
file.loaded = localFileInfo.offset;
ctx = localFileInfo.ctx;
// 计算速度时,会用到
speedCalInfo.isResumeUpload = true;
speedCalInfo.resumeFilesize = localFileInfo.offset;
if (localFileInfo.offset + blockSize > file.size) {
blockSize = file.size - localFileInfo.offset;
}
} else {
localStorage.removeItem(file.name);
}
} else {
// 进度100%时,删除对应的localStorage,避免 499 bug
localStorage.removeItem(file.name);
}
} else {
localStorage.removeItem(file.name);
}
}
speedCalInfo.startTime = new Date().getTime();
up.setOption({
'url': 'http://upload.qiniu.com/mkblk/' + blockSize,
'multipart': false,
'chunk_size': chunk_size,
'required_features': "chunks",
'headers': {
'Authorization': 'UpToken ' + that.token
},
'multipart_params': {}
});
}
} else {
directUpload(up, file, that.key_handler);
}
});
uploader.bind('UploadProgress', function(up, file) {
// 计算速度
speedCalInfo.currentTime = new Date().getTime();
var timeUsed = speedCalInfo.currentTime - speedCalInfo.startTime; // ms
var fileUploaded = file.loaded || 0;
if (speedCalInfo.isResumeUpload) {
fileUploaded = file.loaded - speedCalInfo.resumeFilesize;
}
file.speed = (fileUploaded / timeUsed * 1000).toFixed(0) || 0; // unit: byte/s
});
uploader.bind('ChunkUploaded', function(up, file, info) {
var res = that.parseJSON(info.response);
ctx = ctx ? ctx + ',' + res.ctx : res.ctx;
var leftSize = info.total - info.offset;
var chunk_size = up.getOption && up.getOption('chunk_size');
chunk_size = chunk_size || (up.settings && up.settings.chunk_size);
if (leftSize < chunk_size) {
up.setOption({
'url': 'http://upload.qiniu.com/mkblk/' + leftSize
});
}
localStorage.setItem(file.name, JSON.stringify({
ctx: ctx,
percent: file.percent,
total: info.total,
offset: info.offset,
time: (new Date()).getTime()
}));
});
uploader.bind('Error', (function(_Error_Handler) {
return function(up, err) {
var errTip = '';
var file = err.file;
if (file) {
switch (err.code) {
case plupload.FAILED:
errTip = '上传失败。请稍后再试。';
break;
case plupload.FILE_SIZE_ERROR:
var max_file_size = up.getOption && up.getOption('max_file_size');
max_file_size = max_file_size || (up.settings && up.settings.max_file_size);
errTip = '浏览器最大可上传' + max_file_size + '。更大文件请使用命令行工具。';
break;
case plupload.FILE_EXTENSION_ERROR:
errTip = '文件验证失败。请稍后重试。';
break;
case plupload.HTTP_ERROR:
if (err.response === '') {
// Fix parseJSON error ,when http error is like net::ERR_ADDRESS_UNREACHABLE
errTip = err.message || '未知网络错误。';
break;
}
var errorObj = that.parseJSON(err.response);
var errorText = errorObj.error;
switch (err.status) {
case 400:
errTip = "请求报文格式错误。";
break;
case 401:
errTip = "客户端认证授权失败。请重试或提交反馈。";
break;
case 405:
errTip = "客户端请求错误。请重试或提交反馈。";
break;
case 579:
errTip = "资源上传成功,但回调失败。";
break;
case 599:
errTip = "网络连接异常。请重试或提交反馈。";
break;
case 614:
errTip = "文件已存在。";
try {
errorObj = that.parseJSON(errorObj.error);
errorText = errorObj.error || 'file exists';
} catch (e) {
errorText = errorObj.error || 'file exists';
}
break;
case 631:
errTip = "指定空间不存在。";
break;
case 701:
errTip = "上传数据块校验出错。请重试或提交反馈。";
break;
default:
errTip = "未知错误。";
break;
}
errTip = errTip + '(' + err.status + ':' + errorText + ')';
break;
case plupload.SECURITY_ERROR:
errTip = '安全配置错误。请联系网站管理员。';
break;
case plupload.GENERIC_ERROR:
errTip = '上传失败。请稍后再试。';
break;
case plupload.IO_ERROR:
errTip = '上传失败。请稍后再试。';
break;
case plupload.INIT_ERROR:
errTip = '网站配置错误。请联系网站管理员。';
uploader.destroy();
break;
default:
errTip = err.message + err.details;
break;
}
if (_Error_Handler) {
_Error_Handler(up, err, errTip);
}
}
up.refresh(); // Reposition Flash/Silverlight
};
})(_Error_Handler));
uploader.bind('FileUploaded', (function(_FileUploaded_Handler) {
return function(up, file, info) {
var last_step = function(up, file, info) {
if (op.downtoken_url) {
var ajax_downtoken = that.createAjax();
ajax_downtoken.open('POST', op.downtoken_url, true);
ajax_downtoken.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
ajax_downtoken.onreadystatechange = function() {
if (ajax_downtoken.readyState === 4) {
if (ajax_downtoken.status === 200) {
var res_downtoken;
try {
res_downtoken = that.parseJSON(ajax_downtoken.responseText);
} catch (e) {
throw ('invalid json format');
}
var info_extended = {};
plupload.extend(info_extended, that.parseJSON(info), res_downtoken);
if (_FileUploaded_Handler) {
_FileUploaded_Handler(up, file, JSON.stringify(info_extended));
}
} else {
uploader.trigger('Error', {
status: ajax_downtoken.status,
response: ajax_downtoken.responseText,
file: file,
code: plupload.HTTP_ERROR
});
}
}
};
ajax_downtoken.send('key=' + that.parseJSON(info).key + '&domain=' + op.domain);
} else if (_FileUploaded_Handler) {
_FileUploaded_Handler(up, file, info);
}
};
var res = that.parseJSON(info.response);
ctx = ctx ? ctx : res.ctx;
if (ctx) {
var key = '';
if (!op.save_key) {
key = getFileKey(up, file, that.key_handler);
key = key ? '/key/' + that.URLSafeBase64Encode(key) : '';
}
var x_vars = op.x_vars,
x_val = '',
x_vars_url = '';
if (x_vars !== undefined && typeof x_vars === 'object') {
for (var x_key in x_vars) {
if (x_vars.hasOwnProperty(x_key)) {
if (typeof x_vars[x_key] === 'function') {
x_val = that.URLSafeBase64Encode(x_vars[x_key](up, file));
} else if (typeof x_vars[x_key] !== 'object') {
x_val = that.URLSafeBase64Encode(x_vars[x_key]);
}
x_vars_url += '/x:' + x_key + '/' + x_val;
}
}
}
var url = 'http://upload.qiniu.com/mkfile/' + file.size + key + x_vars_url;
var ajax = that.createAjax();
ajax.open('POST', url, true);
ajax.setRequestHeader('Content-Type', 'text/plain;charset=UTF-8');
ajax.setRequestHeader('Authorization', 'UpToken ' + that.token);
ajax.onreadystatechange = function() {
if (ajax.readyState === 4) {
localStorage.removeItem(file.name);
if (ajax.status === 200) {
var info = ajax.responseText;
last_step(up, file, info);
} else {
uploader.trigger('Error', {
status: ajax.status,
response: ajax.responseText,
file: file,
code: -200
});
}
}
};
ajax.send(ctx);
} else {
last_step(up, file, info.response);
}
};
})(_FileUploaded_Handler));
return uploader;
};
this.getUrl = function(key) {
if (!key) {
return false;
}
key = encodeURI(key);
var domain = this.domain;
if (domain.slice(domain.length - 1) !== '/') {
domain = domain + '/';
}
return domain + key;
};
this.imageView2 = function(op, key) {
var mode = op.mode || '',
w = op.w || '',
h = op.h || '',
q = op.q || '',
format = op.format || '';
if (!mode) {
return false;
}
if (!w && !h) {
return false;
}
var imageUrl = 'imageView2/' + mode;
imageUrl += w ? '/w/' + w : '';
imageUrl += h ? '/h/' + h : '';
imageUrl += q ? '/q/' + q : '';
imageUrl += format ? '/format/' + format : '';
if (key) {
imageUrl = this.getUrl(key) + '?' + imageUrl;
}
return imageUrl;
};
this.imageMogr2 = function(op, key) {
var auto_orient = op['auto-orient'] || '',
thumbnail = op.thumbnail || '',
strip = op.strip || '',
gravity = op.gravity || '',
crop = op.crop || '',
quality = op.quality || '',
rotate = op.rotate || '',
format = op.format || '',
blur = op.blur || '';
//Todo check option
var imageUrl = 'imageMogr2';
imageUrl += auto_orient ? '/auto-orient' : '';
imageUrl += thumbnail ? '/thumbnail/' + thumbnail : '';
imageUrl += strip ? '/strip' : '';
imageUrl += gravity ? '/gravity/' + gravity : '';
imageUrl += quality ? '/quality/' + quality : '';
imageUrl += crop ? '/crop/' + crop : '';
imageUrl += rotate ? '/rotate/' + rotate : '';
imageUrl += format ? '/format/' + format : '';
imageUrl += blur ? '/blur/' + blur : '';
if (key) {
imageUrl = this.getUrl(key) + '?' + imageUrl;
}
return imageUrl;
};
this.watermark = function(op, key) {
var mode = op.mode;
if (!mode) {
return false;
}
var imageUrl = 'watermark/' + mode;
if (mode === 1) {
var image = op.image || '';
if (!image) {
return false;
}
imageUrl += image ? '/image/' + this.URLSafeBase64Encode(image) : '';
} else if (mode === 2) {
var text = op.text ? op.text : '',
font = op.font ? op.font : '',
fontsize = op.fontsize ? op.fontsize : '',
fill = op.fill ? op.fill : '';
if (!text) {
return false;
}
imageUrl += text ? '/text/' + this.URLSafeBase64Encode(text) : '';
imageUrl += font ? '/font/' + this.URLSafeBase64Encode(font) : '';
imageUrl += fontsize ? '/fontsize/' + fontsize : '';
imageUrl += fill ? '/fill/' + this.URLSafeBase64Encode(fill) : '';
} else {
// Todo mode3
return false;
}
var dissolve = op.dissolve || '',
gravity = op.gravity || '',
dx = op.dx || '',
dy = op.dy || '';
imageUrl += dissolve ? '/dissolve/' + dissolve : '';
imageUrl += gravity ? '/gravity/' + gravity : '';
imageUrl += dx ? '/dx/' + dx : '';
imageUrl += dy ? '/dy/' + dy : '';
if (key) {
imageUrl = this.getUrl(key) + '?' + imageUrl;
}
return imageUrl;
};
this.imageInfo = function(key) {
if (!key) {
return false;
}
var url = this.getUrl(key) + '?imageInfo';
var xhr = this.createAjax();
var info;
var that = this;
xhr.open('GET', url, false);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
info = that.parseJSON(xhr.responseText);
}
};
xhr.send();
return info;
};
this.exif = function(key) {
if (!key) {
return false;
}
var url = this.getUrl(key) + '?exif';
var xhr = this.createAjax();
var info;
var that = this;
xhr.open('GET', url, false);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
info = that.parseJSON(xhr.responseText);
}
};
xhr.send();
return info;
};
this.get = function(type, key) {
if (!key || !type) {
return false;
}
if (type === 'exif') {
return this.exif(key);
} else if (type === 'imageInfo') {
return this.imageInfo(key);
}
return false;
};
this.pipeline = function(arr, key) {
var isArray = Object.prototype.toString.call(arr) === '[object Array]';
var option, errOp, imageUrl = '';
if (isArray) {
for (var i = 0, len = arr.length; i < len; i++) {
option = arr[i];
if (!option.fop) {
return false;
}
switch (option.fop) {
case 'watermark':
imageUrl += this.watermark(option) + '|';
break;
case 'imageView2':
imageUrl += this.imageView2(option) + '|';
break;
case 'imageMogr2':
imageUrl += this.imageMogr2(option) + '|';
break;
default:
errOp = true;
break;
}
if (errOp) {
return false;
}
}
if (key) {
imageUrl = this.getUrl(key) + '?' + imageUrl;
var length = imageUrl.length;
if (imageUrl.slice(length - 1) === '|') {
imageUrl = imageUrl.slice(0, length - 1);
}
}
return imageUrl;
}
return false;
};
}
var Qiniu = new QiniuJsSDK();
module.exports=Qiniu;
... ... @@ -90,4 +90,4 @@
width: 100px;
margin: 0 15px;
float: left;
}
}
\ No newline at end of file
... ...
@import url('bootstrap.min.css');
@import url('bootstrap-override.css');
@import url('font-awesome.min.css');
@import url('newselect2.css');
@import url('jquery.gritter.css');
... ...
... ... @@ -43,4 +43,4 @@ exports.res =
method: 'GET',
view: 'pages/index',
noApi:true
}];
\ No newline at end of file
}];
... ...
... ... @@ -229,35 +229,5 @@ exports.res = [
{name: 'reqDepartment',type: 'String'},
{name: 'status',type: 'String'}
]
},
{
route: '/limit/index',
method: 'GET',
view: 'pages/coupon/index',
src: '/coupon/index',
noApi: true,
data: {
pageTitle: '限购码列表',
createUrl: '/limit/add',
bottons:'{"look":true, "limitDes": true}',
gridurl:'/getPromotion',
tabUrl: '/getCodeCount',
sendUrl: '/sendPromotion',
auditUrl: '/auditPromotion'
}
},
{
//添加限购码页面
route: '/limit/add',
method: 'GET',
view: 'pages/coupon/limit-edit',
data: {
action:"/coupon/action/add",
type:"add",
data:{
}
},
src:'/coupon/limit-edit'
}
]
... ...
... ... @@ -34,7 +34,7 @@ exports.res = [
route: '/limit/product/add',
method: 'GET',
view: 'pages/limit/add',
src: '/product/limit',
//src: '/product/limit-add',
isJsonRaw:true
}
];
\ No newline at end of file
... ...
exports.domain = require('../config/common.js').domain;
//路由配置
exports.res = [
{
route: '/limit/index',
method: 'GET',
view: 'pages/limitcode/index',
src: '/limitcode/index',
noApi: true,
data: {
pageTitle: '限购码列表',
createUrl: '/limit/code/add',
gridurl:'/limit/code/ajax/index'
}
},
{
route: '/limit/code/ajax/index',
method: 'POST',
url: '/limitCode/getLimitCodeList',
isJsonRaw:true,
params: [
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'}
]
},
{
//添加限购码页面
route: '/limit/code/add',
method: 'GET',
view: 'pages/limitcode/edit',
data: {
action:"/limit/code/ajax/add",
type:"add",
data:{
reqDepartment: "零售运营部/平台运营",
}
},
src:'/limitcode/edit'
},{
route:'/limit/code/ajax/add',
method:'POST',
url:'/limitCode/addLimitCode',
params:[
{name:"name",type:"String"},
{name:"limitTimes",type:"Number"},
{name:"reqDepartment",type:"String"},
{name:"limitDateFrom",type:"String"},
{name:"limitDateTo",type:"String"},
{name:"describe",type:"String"},
{name:"userUseLimit",type:"Number"},
{name:"userTypeLimit",type:"Number"},
//{name:"limitSkn",type:"String"},
{name:"creatorName",type:"String"},
{name:"creatorId",type:"Number"},
{name:"status",type:"Number"}
]
}
,{
route: '/limit/code/info/:id',
method: 'GET',
view: 'pages/limitcode/info',
url:"/limitCode/getLimitCode",
isJsonRaw: true,
params: [
{name: 'id',type: 'String'}
]
},{//审核限购码接口
route: '/limit/code/auditLimitCode',
method: 'GET',
view: 'pages/limitcode/info',
url:"/limitCode/auditLimitCode",
isJsonRaw: true,
params: [
{name: 'id',type: 'Number'},
{name: 'status',type: 'Number'},
{name: 'reason',type: 'String'}
]
}
]
\ No newline at end of file
... ...
... ... @@ -34,7 +34,7 @@ exports.res = [{
{name:"orderBy",type:"number"}
]
},
{//尺码模糊查询【待验证
{//尺码模糊查询【验证通过
route:'/erpproduct/sortsize/ajax/automatic',
method:'POST',
url: '/product/querySizeByNameForSelect',
... ... @@ -70,7 +70,7 @@ exports.res = [{
//获取品类关联尺码属性列表【验证通过】
route: '/erpproduct/sortattribute/ajax/index',
method: 'POST',
url: '/product/querySizeAttributeList',
url: '/sortAttribute/queryList',
isJsonRaw:true,
params:[
{name:"page",type:"number"},
... ... @@ -80,17 +80,23 @@ exports.res = [{
route: '/erpproduct/sortattribute/ajax/delete',
method: 'POST',
url: '/sortAttribute/delete',
isJsonRaw:true
isJsonRaw:true,
params:[
{name:"sortId",type:"number"},
{name:"attributeId",type:"number"}
]
},
{//添加品类关联尺码属性接口【待验证】
route: '/erpproduct/sortattribute/ajax/add',
method: 'POST',
url: '/product/addSizeAttribute',
url: '/sortAttribute/add',
isJsonRaw:true,
params:[
{name:"attributeName",type:"number"}
{name:"sortId",type:"number"},
{name:"attributeId",type:"number"},
{name:"orderBy",type:"number"}
]
},{//添加品类关联尺码属性接口【待验证
},{//添加品类关联尺码属性接口【验证成功
route: '/erpproduct/sortattribute/ajax/automatic',
method: 'POST',
url: '/product/querySizeAttributesByName',
... ...
... ... @@ -83,12 +83,19 @@
<div class="panel-body">
<div class="row mb20">
<div class="col-md-1 height40">封面图*</div>
<div class="col-md-1">
<img class="edit-cover-img" src="http://img11.static.yhbimg.com/goodsimg/2015/07/07/08/01315b5bbfd72bc5b59fa2fda6c28b9ae6.jpg"
alt=""/>
<div class="col-md-1" id="coverImgBox">
<!-- <input type="file" name="coverImg" id="coverImg"/>-->
</div>
</div>
<!--<div class="row mb20">
<div class="col-md-12">
<div class="quota-text"></div>
<div class="quota-img"></div>
<div class="quota-video"></div>
</div>
</div>-->
<div class="row">
<div class="col-md-12">
<button class="btn btn-primary mr5" data-toggle="modal" data-target="#textDialog">文本</button>
... ... @@ -111,9 +118,9 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="addAttrTitle">添加文本</h4>
<h4 class="modal-title" id="textDialogTitle">添加文本</h4>
</div>
<div class="modal-body">
<div class="modal-body" id="text-dialog-body">
</div>
<div class="modal-footer">
... ... @@ -155,7 +162,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default m-t-20 add-attr-btn-close" data-dismiss="modal">关闭</button>
<button type="button" class="add-attr-btn btn btn-primary m-t-20">添加</button>
<button type="button" class="add-pic-btn btn btn-primary m-t-20">添加</button>
</div>
</div>
</div>
... ...
... ... @@ -19,17 +19,16 @@
<div class="form-group">
<label for="numbers" class="col-sm-2 control-label">数量<i class="red">*</i></label>
<div class="col-sm-8">
<input type="text" id="numbers" placeholder="数量" class="form-control" required pattern="^[0-9]+$" value="{{limitTimes}}">
<input type="text" id="limitTimes" placeholder="数量" class="form-control" required pattern="^[0-9]+$" value="{{limitTimes}}">
</div>
<!--required pattern="^[0-9]+$"-->
</div>
<div class="form-group">
<label for="limitTimes" class="col-sm-2 control-label">使用次数<i class="red">*</i></label>
<label for="userUseLimit" class="col-sm-2 control-label">使用次数<i class="red">*</i></label>
<div class="col-sm-8">
<input type="text" id="limitTimes" placeholder="0 表示不限制" class="form-control" required pattern="^[0-9]+$" value="{{limitTimes}}">
<input type="text" id="userUseLimit" placeholder="0 表示不限制" class="form-control" required pattern="^[0-9]+$" value="{{userUseLimit}}">
</div>
<!--required pattern="^[0-9]+$"-->
</div>
... ... @@ -55,27 +54,27 @@
<option value="店铺运营">店铺运营</option>
</select>
</div>
<input type="hidden" id="reqDepartment" value="{{reqDepartment}}" required>
<input type="hidden" id="reqDepartment" value="{{reqDepartment}}">
</div>
<div class="form-group">
<label class="col-sm-2 control-label">使用期限<span class="red">*</span></label>
<div class="col-sm-6">
<div class="col-sm-2">
<label id="limit-time"><input name="limit-time" type="radio">指定时间</label>
</div>
<div class="col-sm-3">
<input type="text" class="form-control" jsaction="time:end:limitDateTo" id="limitDateFrom" placeholder="优惠开始时间" value="{{limitDateFrom}}" readonly required>
</div>
<div class="col-sm-3">
<input type="text" class="form-control" jsaction="time:start:limitDateFrom" id="limitDateTo" placeholder="优惠结束时间" value="{{limitDateTo}}" readonly required>
<!-- <div class="col-sm-2">
<label><input name="limitTimeType" type="radio" value="1">指定时间</label>
</div> -->
<div class="col-sm-6">
<input type="text" class="form-control" jsaction="time:end:limitDateTo" id="limitDateFrom" placeholder="优惠开始时间" value="{{limitDateFrom}}" readonly >
</div>
<div class="col-sm-6">
<label id="no-limit-time"><input name="limit-time" type="radio">不指定</label>
<input type="text" class="form-control" jsaction="time:start:limitDateFrom" id="limitDateTo" placeholder="优惠结束时间" value="{{limitDateTo}}" readonly >
</div>
<!-- <div class="col-sm-6">
<label id="no-limit-time"><input name="limitTimeType" type="radio" value="2">不指定</label>
</div> -->
</div>
<!-- <input type="hidden" value="{{limitTimeType}}" id="limitTimeType" for="radio" required placeholder="使用期限"> -->
<!-- readonly require-->
</div>
... ... @@ -94,7 +93,7 @@
<div class="panel-heading">
<h4 class="panel-title">使用条件</h4>
</div>
<div class="form-group">
<!-- <div class="form-group">
<label for="userSourceLimit" class="col-sm-2 control-label">用户来源<i class="red">*</i></label>
<div class="col-sm-8">
<label class="checkbox-inline">
... ... @@ -113,8 +112,8 @@
<input type="checkbox" value="5" name="userSourceLimit" > IPAD
</label>
</div>
<input type="hidden" value="{{userSourceLimit}}" id="userSourceLimit" for="checkbox" required>
</div>
<input type="hidden" value="{{userSourceLimit}}" id="userSourceLimit" for="checkbox" required placeholder="用户来源">
</div> -->
<div class="form-group">
<label for="name" class="col-sm-2 control-label">会员身份<i class="red">*</i></label>
... ... @@ -145,25 +144,24 @@
<input type="text" class="form-control" placeholder="UID">
</div>
<input type="hidden" value="{{userTypeLimit}}" id="userTypeLimit" for="checkbox" required>
<input type="hidden" value="{{userTypeLimit}}" id="userTypeLimit" for="checkbox" required placeholder="用户来源">
</div>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">指定商品</label>
<div class="col-sm-2">
<input type="text" placeholder="SKN/SKU/SKC" class="form-control" value="">
<input type="text" id="limitSkn" placeholder="SKN/SKU/SKC" class="form-control" value="{{limitSkn}}">
</div>
</div>
<div class="form-group">
<!-- <div class="form-group">
<label for="name" class="col-sm-2 control-label">限制次数<i class="red">*</i></label>
<div class="col-sm-8">
<input type="text" id="userUseLimit" placeholder="限制次数" class="form-control" value="{{userUseLimit}}" required pattern="^[1-9]+$">
<!--required pattern="^[1-9]+$"-->
</div>
</div>
</div> -->
<div class="form-group">
<!-- <div class="form-group">
<label for="name" class="col-sm-2 control-label">商品性别</label>
<div class="col-sm-10">
<label class="checkbox-inline">
... ... @@ -176,10 +174,10 @@
<input type="checkbox" value="3" name="userSex"> 通用
</label>
</div>
<input type="hidden" value="{{userSex}}" id="userSex" for="checkbox" required>
</div>
<input type="hidden" value="{{userSex}}" id="userSex" for="checkbox">
</div> -->
<div class="panel-heading">
<!-- <div class="panel-heading">
<h4 class="panel-title">优惠互斥</h4>
</div>
... ... @@ -221,21 +219,22 @@
<input type="checkbox" value="9" name="discountReject" > 优惠码
</label>
</div>
<input type="hidden" value="{{discountReject}}" id="discountReject" for="checkbox" required>
</div>
<input type="hidden" value="{{discountReject}}" id="discountReject" for="checkbox">
</div> -->
<div class="form-group">
<input type="hidden" value="{{status}}" id="status" >
{{/ data}}
<div class="form-group">
<label class="col-sm-2 control-label">申请人</label>
<div class="col-sm-8">
<label class="form-label" id="staff">{{staff}}</label>
<label class="form-label" id="creatorName">{{auth.name}}</label>
</div>
</div>
<input type="hidden" value="{{staff}}" id="staff" >
<input type="hidden" value="{{id}}" id="id" >
<input type="hidden" value="{{status}}" id="status" >
{{/ data}}
<input type="hidden" value="{{auth.uid}}" id="creatorId" >
<input type="hidden" value="{{auth.name}}" id="creatorName" >
<div class="panel-footer">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
... ...
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="">优惠码管理</a></li>
<li>{{pageTitle}}</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>{{pageTitle}}</h4>
</div>
</div>
</div>
</div>
</div>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-heading">
<a href="{{createUrl}}" class="btn btn-success"><i class="fa fa-plus"></i> 添加</a>
</div>
<div class="panel-body">
<div class="row">
<div class="panel-col2">
<input id="filter-id" class="form-control panel-input" type="text" placeholder="请输入批次号">
</div>
<div class="panel-col2">
<input id="filter-name" class="form-control panel-input" type="text" placeholder="请输入名称">
</div>
<div class="panel-col">
<select id="filter-dep" name="filter-dep" tabindex="-1" title="" class="select2-offscreen brandBtn-group">
<option value="">全部</option>
<option value="商品部">商品部</option>
<option value="市场部">市场部</option>
<option value="会员部">会员部</option>
<option value="零售运营部">零售运营部</option>
<option value="品牌合作部">品牌合作部</option>
<option value="零售业务部">零售业务部</option>
<option value="潮流资源部">潮流资源部</option>
<option value="其他">其他</option>
</select>
</div>
<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>
<div class="panel panel-primary-head">
<div id="basicTable_wrapper" class="dataTables_wrapper no-footer">
<div id="table-tabs" class="list-tabs">
</div>
<div id="basicTable">
</div>
</div>
</div>
</div>
<input type="hidden" id="btnAuthority" value="{{bottons}}">
<input type="hidden" id="gridurl" value="{{gridurl}}">
<script id="template" type="text/template">
<p>{title}</p>
<label class="col-sm-3 control-label">*请填写原因</label>
<input id="cancel-reason" type="text" class="form-control" name="agreement-code" style="width:280px;">
</script>
... ...
<div class="container">
<div class="row">
{{#data}}
<div class="col-md-offset-1 col-xs-10 col-sm-10 col-md-10 col-lg-10">
<div class="page-header">
<h4>查看限购码</h4>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">批次号 :</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ batchNo}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">名称 :</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ name}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">数量 :</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ limitTimes}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">使用次数 :</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ userUseLimit}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">申请部门 :</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ reqDepartment}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">使用期限 :</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ limitDateFrom}}至{{limitDateTo}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">限购码说明 :</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ describe}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">会员身份 :</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ userTypeLimit}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">指定商品 :</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{limitSkn}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">申请人 :</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{creatorName}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">申请时间 :</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{createTime}}</div>
</div>
</div>
{{/data}}
</div>
</div>
\ No newline at end of file
... ...