Authored by 周奇琪

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

Conflicts:
	.gitignore
	logs/app.log
	logs/yo-api.log
	logs/yo-err.log
	logs/yo.log
	server/app.js
	server/package.json
... ... @@ -30,3 +30,4 @@ coverage
bin
obj
*.log
... ...
... ... @@ -5,7 +5,9 @@ var $=require('jquery');
var urlObj={
'supplier':'/supplier/supplier/getSupplierListByIdName',
'brand':'/brand/getBrandNames',
'managerName':'/supplier/storeadmin/managerName'
'managerName':'/supplier/storeadmin/managerName',
'sortattribute':'/erpproduct/sortattribute/ajax/automatic',
'sortsize':'/erpproduct/sortsize/ajax/automatic'
};
var dropDown=function(option){
... ...
... ... @@ -3,6 +3,7 @@ e.on("validate",function(){
//自定义验证
//返回true通过,返回false或者返回文字表示失败并且给予提示
});
e.init();//执行
$("button").click(function(){
e.submit("url",function(option){
//option是ajax配置对象
... ... @@ -18,7 +19,7 @@ $("button").click(function(){
var $=require('jquery');
var Validator = require('../util/validate');
var file=require('./upload');
require('./upload');
require('../util/datepicker')($);
require('../util/jquery.gritter');
... ... @@ -146,22 +147,41 @@ edit.prototype={
}
/*初始化文件上传*/
// $(".fileinput-button-icon").each(function(){
// var id=$(this).attr("id");
// file({
// button:id,
// uptoken:$("#uptoken").val(),
// callback:function(src){
// var _img=$("#"+id).find("img");
// if(_img.length>0){
// _img.attr("src",src);
// }else{
// $("#"+id).prepend("<img width='76' height='80' src='"+src+"' />");
// }
// $("#"+id).find(":hidden").val(src);
// }
// });
// });
if($('input[type="file"]').length>0){
$('input[type="file"]').each(function(){
var Temp='<ul class="upload-image-list">';
Temp+='<li class="fileinput-button">';
Temp+='<a class="fileinput-button-icon" href="javascript:void(0);">';
if($(this).val()){
Temp+='<img width="76" height="80" src="'+$(this).val()+'">';
}else{
Temp+='+';
}
Temp+='</a>';
Temp+='</li>';
Temp+='</ul>';
$(this).after(Temp);
});
$('input[type="file"]').ajaxfileupload({
'action': '/ajax/upload',
'params':{"userId":543883,"bucket":'smart'},
'onComplete': function(response) {
var _w=$(this).next().find('.fileinput-button-icon');
if(_w.find('img').length>0){
_w.find('img').attr("src",response.data);
}else{
_w.prepend('<img width="76" height="80" src="'+response.data+'">');
}
},
'onStart': function() {
},
'onCancel': function() {
console.log('no file selected');
}
});
}
that.__listen("render");
},
bind:function(){
... ... @@ -257,6 +277,7 @@ edit.prototype={
$("input:text",that.el)//number
.add("input[type=number]",that.el)
.add("input:hidden",that.el)
.add("input[type=file]",that.el)
.add("select",that.el)
.add("textarea",that.el)
.each(function(){
... ...
... ... @@ -26,7 +26,8 @@ var grid=function(options){
size:10,
innerHtml:"<div class='grid'><table class='table table-striped table-bordered responsive dataTable no-footer' role='grid' aria-describedby='basicTable_info'>"
+"<thead></thead><tbody></tbody></table></div>"
+"<nav><ul class='pagination'></ul></nav>"
+"<nav><ul class='pagination'></ul></nav>",
tabUrl: false
}
this.options=$.extend({}, defaults, options);
this.grid=$(options.el);
... ... @@ -73,6 +74,44 @@ grid.prototype={
g.clear();
g.renderHead();
g.renderBody();
g.renderTab();
},
renderTab: function() {
var g = this,
p = this.options,
$tab = $('<ul class="nav nav-pills"></ul>');
if (!p.tabUrl) return;
$('#table-tabs').empty().append($tab);
setTimeout(function() {
$.ajax({
type: 'POST',
dataType: 'json',
url: '/getCodeCount',
data: g.__getparams()
}).then(function(res) {
var data = res.data.data,
_s = g.__getparams().status;
$tab.empty();
$.each(data, function(key, value) {
$tab.append($('<li data-status="' + key + '"><a href="javascript:;">' + p.tabConvert(key) + '(' + value + ')</a></li>'));
});
if ($('#table-tabs').find('[data-status="' + _s + '"]').size() < 1) {
$('#table-tabs').find('[data-status="all"]').addClass('active').siblings().removeClass('active');
} else {
$('#table-tabs').find('[data-status="' + _s + '"]').addClass('active').siblings().removeClass('active');
}
});
}, 500);
$('#table-tabs').on('click', 'li', function() {
$(this).addClass('active').siblings().removeClass('active');
p.status = parseInt($(this).data('status'));
p.page = 1;
g.renderBody();
});
},
renderBody:function(){
var g = this, p = this.options;
... ... @@ -91,8 +130,9 @@ grid.prototype={
},
__getparams:function(){
var g = this, p = this.options;
//if (!p.page) p.page = 1;
var param = {};
var param = {},
urlParam = {},
urlArr = location.hash.substring(1).split('&&');
if (p.parms) {
... ... @@ -100,39 +140,41 @@ grid.prototype={
param = p.parms();
}
}
//param.page = p.page;
param.size = p.size;
$.each(urlArr, function(i, value){
var result = value.split('='),
key = result[0],
value = result[1];
if (key !== undefined) {
param[key] = value;
if (key) {
urlParam[key] = value;
}
});
if (p.page) {
if (!p.page && !urlParam.page) p.page = 1;
if (param.page !== p.page) {
param.page = p.page;
} else {
param.page = urlParam.page;
}
if (p.status !== undefined) {
console.log(p.status);
if (param.status !== p.status) {
param.status = p.status;
} else {
param.status = urlParam.status;
}
var html = '';
param.size = p.size;
var urlHash = '';
$.each(param, function(key, value) {
if (value !== '' && !isNaN(value)) {
html += key + '=' + value + '&&';
if (value || value == '0') {
urlHash += key + '=' + value + '&&';
}
});
location.hash = html;
location.hash = urlHash;
return param;
},
... ... @@ -149,7 +191,6 @@ grid.prototype={
onPageClick: function(pageNumber, event) {
p.page = pageNumber;
g.renderBody();
//g.__getparams();
return false;
}
});
... ... @@ -270,14 +311,8 @@ grid.prototype={
},
reload:function(param){
var g = this, p = this.options;
if (param) {
$.each(param, function(key, value) {
p[key] = value;
});
}
//p.page=1;
p.page=1;
g.renderTab();
g.__bodyload();
},
... ...
var $=require('jquery');
//下拉联动
function Location() {
this.items = {
'0':{1:'衣服',22:'裤子'},
'0,1':{2:'上衣'},
'0,1,2':{3:'夹克',4:'外套',5:'T舍'},
'0,1,2,3':{9:'夹克aaa',8:'外套sss',57:'Tsss舍'}
};
}
Location.prototype.find = function(id) {
if(typeof(this.items[id]) == "undefined")
return false;
return this.items[id];
}
Location.prototype.fillOption = function(el_id , loc_id , selected_id) {
var el = $('#'+el_id);
var json = this.find(loc_id);
if (json) {
var index = 1;
var selected_index = 0;
$.each(json , function(k , v) {
var option = '<option value="'+k+'">'+v+'</option>';
el.append(option);
if (k == selected_id) {
selected_index = index;
}
index++;
})
el.attr('selectedIndex' , selected_index);
}
}
exports.init=function(){
var loc = new Location();
var title = ['所有一级类目' , '所有二级类目' , '所有三级类目','所有四级类目'];
$.each(title , function(k , v) {
title[k] = '<option value="">'+v+'</option>';
})
$('#maxSort').append(title[0]);
$('#middleSort').append(title[1]);
$('#smallSort').append(title[2]);
$('#sort').append(title[3]);
$('#maxSort').change(function() {
$('#middleSort').empty();
$('#middleSort').append(title[1]);
loc.fillOption('middleSort' , '0,'+$('#maxSort').val());
$('#smallSort').empty();
$('#smallSort').append(title[2]);
$('#sort').empty();
$('#sort').append(title[2]);
//$('input[@name=location_id]').val($(this).val());
})
$('#middleSort').change(function() {
$('#smallSort').empty();
$('#smallSort').append(title[2]);
loc.fillOption('smallSort' , '0,' + $('#maxSort').val() + ',' + $('#middleSort').val());
$('#sort').empty();
$('#sort').append(title[2]);
//$('input[@name=location_id]').val($(this).val());
})
$('#smallSort').change(function() {
$('#sort').empty();
$('#sort').append(title[2]);
loc.fillOption('sort' , '0,' + $('#maxSort').val() + ',' + $('#middleSort').val()+','+$('#smallSort').val());
// $('input[@name=location_id]').val($(this).val());
})
// if (province) {
// loc.fillOption('loc_province' , '0' , province);
// if (city) {
// loc.fillOption('loc_city' , '0,'+province , city);
// if (town) {
// loc.fillOption('loc_town' , '0,'+province+','+city , town);
// }
// }
// } else {
// loc.fillOption('loc_province' , '0');
// }
loc.fillOption('maxSort' , '0');
}
\ No newline at end of file
var jQuery=require('jquery');
var $=require('jquery');
// var Qiniu=require("../util/qiniu");
$.fn.ajaxfileupload = function(options) {
var settings = {
params: {},
action: '',
onStart: function() { },
onComplete: function(response) { },
onCancel: function() { },
validate_extensions : true,
valid_extensions : ['gif','png','jpg','jpeg'],
submit_button : null
};
var uploader = function(option){
jQuery.extend({
createUploadIframe: function(id, uri){
//create frame
var frameId = 'jUploadFrame' + id;
var iframeHtml = '<iframe id="' + frameId + '" name="' + frameId + '" style="position:absolute; top:-9999px; left:-9999px"';
if(window.ActiveXObject){
if(jQuery.browser.version=="9.0" || jQuery.browser.version=="10.0"){
var io = document.createElement('iframe');
io.id = frameId;
io.name = frameId;
}else if(jQuery.browser.version=="6.0" || jQuery.browser.version=="7.0" || jQuery.browser.version=="8.0"){
var io = document.createElement('<iframe id="' + frameId + '" name="' + frameId + '" />');
if(typeof uri== 'boolean'){
io.src = 'javascript:false';
} else if(typeof uri== 'string'){
io.src = uri;
}
}
var uploading_file = false;
if ( options ) {
$.extend( settings, options );
}
iframeHtml += ' />';
jQuery(iframeHtml).appendTo(document.body);
return jQuery('#' + frameId).get(0);
},
createUploadForm: function(id, fileElementId, data){
//create form
var formId = 'jUploadForm' + id;
var fileId = 'jUploadFile' + id;
var form = jQuery('<form action="" method="POST" name="' + formId + '" id="' + formId + '" enctype="multipart/form-data"></form>');
if(data){
for(var i in data){
jQuery('<input type="hidden" name="' + i + '" value="' + data[i] + '" />').appendTo(form);
return this.each(function() {
var $element = $(this);
if($element.data('ajaxUploader-setup') === true) return;
$element.change(function()
{
uploading_file = false;
if (settings.submit_button == null)
{
upload_file();
}
}
//single
if(typeof(fileElementId) == 'string'){
fileElementId = [fileElementId];
}
for(var i in fileElementId){
var oldElement = jQuery('#' + fileElementId[i]);
var newElement = jQuery(oldElement).clone();
jQuery(oldElement).attr('id', fileId);
jQuery(oldElement).attr('name', "image");
jQuery(oldElement).before(newElement);
jQuery(oldElement).appendTo(form);
}
//set attributes
jQuery(form).css('position', 'absolute');
jQuery(form).css('top', '-1200px');
jQuery(form).css('left', '-1200px');
jQuery(form).appendTo('body');
return form;
},
ajaxFileUpload: function(s) {
// TODO introduce global settings, allowing the client to modify them for all requests, not only timeout
s = jQuery.extend({}, jQuery.ajaxSettings, s);
var id = new Date().getTime()
var form = jQuery.createUploadForm(id, s.fileElementId, (typeof(s.data)=='undefined'?false:s.data));
var io = jQuery.createUploadIframe(id, s.secureuri);
var frameId = 'jUploadFrame' + id;
var formId = 'jUploadForm' + id;
// Watch for a new set of requests
if ( s.global && ! jQuery.active++ ){
jQuery.event.trigger( "ajaxStart" );
}
var requestDone = false;
// Create the request object
var xml = {};
if ( s.global )
jQuery.event.trigger("ajaxSend", [xml, s]);
// Wait for a response to come back
var uploadCallback = function(isTimeout){
var io = document.getElementById(frameId);
var execontent = function(){
try
{
if(io.contentWindow)
{
xml.responseText = io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null;
xml.responseXML = io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;
});
}else if(io.contentDocument)
{
xml.responseText = io.contentDocument.document.body?io.contentDocument.document.body.innerHTML:null;
xml.responseXML = io.contentDocument.document.XMLDocument?io.contentDocument.document.XMLDocument:io.contentDocument.document;
}
}catch(e)
{
jQuery.handleError(s, xml, null, e);
}
if ( xml || isTimeout == "timeout"){
requestDone = true;
var status;
try {
status = isTimeout != "timeout" ? "success" : "error";
// Make sure that the request was successful or notmodified
if ( status != "error" )
{
// process the data (runs the xml through httpData regardless of callback)
var data = jQuery.uploadHttpData( xml, s.dataType );
// If a local callback was specified, fire it and pass it the data
if ( s.success )
s.success( data, status );
// Fire the global callback
if( s.global )
jQuery.event.trigger( "ajaxSuccess", [xml, s] );
} else
jQuery.handleError(s, xml, status);
} catch(e)
{
status = "error";
jQuery.handleError(s, xml, status, e);
}
// The request was completed
if( s.global )
jQuery.event.trigger( "ajaxComplete", [xml, s] );
// Handle the global AJAX counter
if ( s.global && ! --jQuery.active )
jQuery.event.trigger( "ajaxStop" );
// Process result
if ( s.complete )
s.complete(xml, status);
jQuery(io).unbind();
setTimeout(function(){
try{
jQuery(io).remove();
jQuery(form).remove();
} catch(e){
jQuery.handleError(s, xml, null, e);
}
}, 100);
xml = null;
}
};
execontent();
}
// Timeout checker
if ( s.timeout > 0 ){
setTimeout(function(){
// Check to see if the request is still happening
if( !requestDone ) uploadCallback( "timeout" );
}, s.timeout);
}
try{
var form = jQuery('#' + formId);
jQuery(form).attr('action', s.url);
jQuery(form).attr('method', 'POST');
jQuery(form).attr('target', frameId);
if(form.encoding)
if (settings.submit_button == null)
{
} else
{
settings.submit_button.click(function(e)
{
e.preventDefault();
if (!uploading_file)
{
upload_file();
}
});
}
var upload_file = function()
{
if($element.val() == '') return settings.onCancel.apply($element, [settings.params]);
var ext = $element.val().split('.').pop().toLowerCase();
if(true === settings.validate_extensions && $.inArray(ext, settings.valid_extensions) == -1)
{
jQuery(form).attr('encoding', 'multipart/form-data');
}else{
jQuery(form).attr('enctype', 'multipart/form-data');
settings.onComplete.apply($element, [{status: false, message: 'The select file type is invalid. File must be ' + settings.valid_extensions.join(', ') + '.'}, settings.params]);
} else
{
uploading_file = true;
wrapElement($element);
var ret = settings.onStart.apply($element, [settings.params]);
if(ret !== false)
{
$element.parent('form').submit(function(e) { e.stopPropagation(); }).submit();
}
}
jQuery(form).submit();
} catch(e){
jQuery.handleError(s, xml, null, e);
}
jQuery('#' + frameId).load(uploadCallback );
return {abort: function () {}};
},
uploadHttpData: function( r, type ) {
var data = !type;
data = type == "xml" || data ? r.responseXML : r.responseText;
// If the type is "script", eval it in global context
if ( type == "script" )
jQuery.globalEval( data );
// Get the JavaScript object, if JSON is used.
if ( type == "json" )
eval( "data = " + data );
// evaluate scripts within html
if ( type == "html" )
jQuery("<div>").html(data).evalScripts();
return data;
},
handleError: function( s, xhr, status, e ){
// If a local callback was specified, fire it
if ( s.error ) {
s.error.call( s.context || s, xhr, status, e );
}
// Fire the global callback
if ( s.global ) {
(s.context ? jQuery(s.context) : jQuery.event).trigger( "ajaxError", [xhr, s, e] );
}
}
});
};
$element.data('ajaxUploader-setup', true);
var handleResponse = function(loadedFrame, element) {
var response, responseStr = $(loadedFrame).contents().text();
try {
response = JSON.parse(responseStr);
} catch(e) {
response = responseStr;
}
element.siblings().remove();
element.unwrap();
uploading_file = false;
settings.onComplete.apply(element, [response, settings.params]);
};
var wrapElement = function(element) {
var frame_id = 'ajaxUploader-iframe-' + Math.round(new Date().getTime() / 1000)
$('body').after('<iframe width="0" height="0" style="display:none;" name="'+frame_id+'" id="'+frame_id+'"/>');
$('#'+frame_id).get(0).onload = function() {
handleResponse(this, element);
};
element.wrap(function() {
return '<form action="' + settings.action + '" method="POST" enctype="multipart/form-data" target="'+frame_id+'" />'
})
.before(function() {
var key, html = '';
for(key in settings.params) {
var paramVal = settings.params[key];
if (typeof paramVal === 'function') {
paramVal = paramVal();
}
html += '<input type="hidden" name="' + key + '" value="' + paramVal + '" />';
}
html+='<input type="hidden" name="filename" value="' + $element.attr("name") + '" />'
return html;
});
}
// document.domain = 'yohobuy.com';
//document.domain = "http://192.168.102.215:8080";
});
}
jQuery('#fileupload').on('change', function() {
jQuery.ajaxFileUpload({
url:'http://192.168.102.215:8080/platform/fileupload/upload/',
//url: 'http://upload.static.yohobuy.com',
secureuri:false,
fileElementId:'fileupload',//file标签的id
dataType: 'json',//返回数据的类型
data:{userId:543883,bucket:'smart'},//一同上传的数据
// data:{pid:0, project:"", is_public:"N",exporttype:"html"},
success: function (data, status) {
console.log(data);
//把图片替换
// var obj = jQuery.parseJSON(data);
// $("#upload").attr("src", "../image/"+obj.fileName);
// if(typeof(data.error) != 'undefined') {
// if(data.error != '') {
// alert(data.error);
// } else {
// alert(data.msg);
// }
// }
},
error: function (data, status, e) {
alert(e);
}
});
});
}
module.exports=uploader;
\ No newline at end of file
module.exports=$;
\ No newline at end of file
... ...
var $ = require('jquery');
require('../util/datepicker')($);
var Validator = require('../util/jquery.validate');// 浏览器就不用这句了,Validator是全局变量
/*获取优惠码信息渲染页面*/
exports.renderview = function(id, callback) {
var _content = $("#basicForm");
var options = {
type: 'post',
url: '/getPromotionCode',
data: {
id: id
},
dataType: "json",
success: function(res) {
res = res.data;
if (res.code == 200) {
for (var key in res.data) {
if (key == 'promotionInfo') {
var __promotionInfo = JSON.parse(res.data["promotionInfo"]);
$("#promotionInfo-type").val(__promotionInfo["type"]);
$("#promotionInfo-condition-amount_at_least").val(__promotionInfo["condition"]["amount_at_least"]);
$("#promotionInfo-condition-count_at_least").val(__promotionInfo["condition"]["count_at_least"]);
$("#promotionInfo-action-discount").val(__promotionInfo["action"]["discount"]);
$("#promotionInfo-action-discount_at_most").val(__promotionInfo["action"]["discount_at_most"]);
if ($("#promotionInfo-type").val() == "3") {
$("#resultdiscount").hide();
}
} else if (key == 'reqDepartment') {
$("#" + key).val(res.data[key]);
var arr = String.prototype.split.call(res.data["reqDepartment"], '/');
$("#department1").val(arr[0]);
if (arr[1]) {
$("#department2").val(arr[1]).show();
} else {
$("#department2").hide();
}
} else {
$("#" + key).val(res.data[key]);
if (key == "staff") {
$("#" + key).html(res.data[key]);
}
}
}
$("input:hidden", _content).each(function() {
var _value = $(this).val();
var _name = $(this).attr("id");
$("#" + _name).prev("div").find("[name='" + _name + "']").each(function() {
if (_value.indexOf($(this).val()) > -1) {
$(this).prop("checked", true);
}
});
});
callback && callback(res.data)
}
},
error: function(err) {
console.log(err);
}
};
$.ajax(options);
};
/*点击按钮提交(优惠码添加修改)*/
exports.submit = function(url, callback) {
var $submit = $('#basicForm'),
$startTime = $('#limitDateFrom'),
$endTime = $("#limitDateTo");
//初始化时间控件
//.add($endTime)
var a = $startTime.fdatepicker({
format: 'yyyy-mm-dd hh:ii:ss',
pickTime: true
}).data('datepicker');
$startTime.click(function() {
a.setEndDate($endTime.val());
});
var b = $endTime.fdatepicker({
format: 'yyyy-mm-dd hh:ii:ss',
pickTime: true
}).data('datepicker');
$endTime.click(function() {
b.setStartDate($startTime.val());
});
//点击radio,checkbox,获取相关数据,录入相关隐藏控件中
$discount = $("#promotionInfo-action-discount");
$("input:checkbox").add("input:radio").change(function() {
var _name = $(this).attr("name"),_value = [];
var $checked = $("input[name=" + _name + "]:checked");
if ($checked.prop("name") == "promotionInfo-type") {
if ($checked.val() == "3") {
$discount.prop("disabled", true).val("0.00").parents("#resultdiscount").hide();
} else {
$discount.prop("disabled", false).parents("#resultdiscount").show();
}
}
$checked.each(function() {
_value.push($(this).val());
});
$("#" + _name).val(_value.join(','));
});
//选择部门
var departmentArr = String.prototype.split.call($("#reqDepartment").val(), '/'),
$department1 = $("#department1"),
$department2 = $("#department2");
$("select").change(function() {
if ($(this).is($department1)) {
departmentArr.length = 0;
departmentArr[0] = $(this).val();
if ($(this).val() === "零售运营部") {
$department2.show();
departmentArr[1] = $department2.val();
} else {
$department2.hide();
}
} else {
departmentArr[1] = $(this).val();
}
$("#reqDepartment").val(departmentArr.join('/'));
});
function __isRepeat(arr) {
var hash = {};
for (var i in arr) {
if (hash[arr[i]]) {
return true;
}
hash[arr[i]] = true;
}
return false;
}
function validate() {
var rules = {},data = {};
$("input:text").each(function() {
var id = $(this).attr("id");
var value = $(this).val();
var rule = [];
if ($(this).attr("required")) {
rule.push("required");
}
if ($(this).attr("maxlength")) {
rule.push("max:" + $(this).attr("maxlength"));
}
if ($(this).attr("minlength")) {
rule.push("max:" + $(this).attr("minlength"));
}
if ($(this).attr("pattern")) {
rule.push("regex:" + $(this).attr("pattern"));
}
rules[id] = rule.join('|');
data[id] = value;
});
console.log(rules);
console.log(data);
var v = Validator.make(data, rules);
if (v.fails()) {
console.log(v.messages());
return false;
}
if (v.passes()) {
if ($startTime.val() && $endTime.val()) {
var startTime = new Date($startTime.val().replace(/-/g, "/"));
var endTime = new Date($endTime.val().replace(/-/g, "/"));
if (endTime > startTime) {
return true;
}
}
var arr = String.prototype.split.call($("#code").val(), ',');
if (__isRepeat(arr)) {
validity.valid = false;
return validity;
}
$.ajax({
type: 'POST',
url: '/checkPromotionCode',
data: {
code:$("#code").val()
},
dataType: 'json'
}).then(function(data) {
data = data.data;
if (data.code == "20001") {
var badcode = [];
$.each(data.data, function(index, item) {
if (item.flag == "1") {
badcode.push(item.code);
}
});
if (badcode.length == 0) {
return true
}
}
return false;
}, function() {
console.log("验证codeAjax", false);
return false;
});
return false;
}
}
$("#save_brand").click(function() {
if (validate()) {
var data = {},key2,data2 = {};
$submit.find("input").each(function() {
var _key = $(this).attr("id");
if (_key) {
var _value = $(this).val();
if (_key.indexOf('-') > -1) {
var arr = _key.split('-');
key2 = arr[0];
data[arr[0]] = data[arr[0]] || {};
if (arr.length == 2) {
data2[arr[1]] = _value;
}
if (arr.length == 3) {
data2[arr[1]] = data2[arr[1]] || {};
data2[arr[1]][arr[2]] = _value;
}
} else {
data[_key] = _value;
}
}
});
data[key2] = JSON.stringify(data2);
if (data.status === "2") {
data.status = "0";
}
var options = {
type: 'post',
url: url,
data: data,
dataType: "json",
success: function(res) {
location.href = "/list";
callback && callback(res);
},
error: function(err) {
console.log(err);
}
};
//console.log("AJAX");
$.ajax(options);
return false;
} else {
console.log("验证不通过");
}
});
}
/**
* 优惠码列表页
* 限购码列表页
*/
'use strict';
var $ = require('jquery'),
... ... @@ -20,6 +20,7 @@ exports.init = function() {
* @param: $element(转换的节点), status(转换的状态字符串)
*/
function statusConvert(status) {
var status = parseInt(status);
switch (status) {
case 0:
return '待审核';
... ... @@ -42,85 +43,17 @@ exports.init = function() {
}
}
/**
* 优惠码tab卡文字替换及默认选中
* @param: param(请求count接口参数), indexStatus(切换条件时选中的tab卡)
*/
function tabShow(param, filterStatus) {
var param = param || {};
$.ajax({
type: 'POST',
dataType: 'json',
url: '/getCodeCount',
data: param,
success: function(res) {
var tpl = Handlebars.compile($('#tab-tpl').html()),
$activeTab = null;
$('.list-tabs ul').html(tpl({
data: res.data.data
}));
var urlArr = location.hash.substring(1).split('&&'),
urlStatus = null;
$.each(urlArr, function(i, value){
var result = value.split('='),
key = result[0],
value = result[1];
if (key === 'status') {
urlStatus = value;
}
});
$('.list-tabs').find('li').each(function() {
var status = $(this).data('status');
$(this).find('span').text(statusConvert(status));
});
$activeTab = $('.list-tabs').find('[data-status="all"]');
if (urlStatus) {
$activeTab = $('.list-tabs').find('[data-status="' + urlStatus + '"]');
} else if (filterStatus) {
$activeTab = $('.list-tabs').find('[data-status="' + filterStatus + '"]');
}
if ($activeTab.size() <= 0) {
$activeTab = $('.list-tabs').find('[data-status="all"]');
}
$activeTab.addClass('active').siblings().removeClass('active');
}
})
}
tabShow();
//tab卡切换列表事件
$('.list-tabs').on('click', 'li', function() {
$(this).addClass('active').siblings().removeClass('active');
g.reload({
page: 1,
status: parseInt($('.list-tabs').find('.active').data('status'))
});
});
var btnAuthority = JSON.parse($("#btnAuthority").val());
var g=new grid({
var g = new grid({
el: '#basicTable',
tabUrl: $('#tabUrl').val(),
tabConvert: statusConvert,
size: 10,
parms:function(){
return {
batchNo: $.trim($('#filter-id').val()) ||"",
status: parseInt($('.list-tabs').find('.active').data('status')),
name: $.trim($('#filter-name').val()) ||"",
reqDepartment:$.trim($('#filter-dep').val()) ||""
};
... ... @@ -132,11 +65,12 @@ exports.init = function() {
{display:"基本信息",name:"name", render: function(item) {
return '<p>名称:' + item.name + '</p><p>次数' + item.limitTimes + '</p><p>部门:' + item.reqDepartment + '</p>';
}},
{display: '使用期限', name: "name", render: function(item) {
{display: '使用期限', name: "limit", render: function(item) {
return '<p class="audit-time">' + item.limitDateFrom + '</p><p>' + item.limitDateTo + '</p>'
}},
{display: '优惠码说明', name: "describe"},
{display: '申请人', name: "staff"},
{display: '限购码说明', hidden:btnAuthority.couponDes, name: "describe"},
{display: '优惠码说明', hidden:btnAuthority.limitDes, name: "describe"},
{display: '申请记录', name: "staff"},
{display: '状态', name: "status", render: function(item) {
var html = statusConvert(item.status);
if (item.reason) {
... ... @@ -168,17 +102,7 @@ exports.init = function() {
g.init($("#gridurl").val());
$("#filter-btn").click(function(){
tabShow({
batchNo: $.trim($('#filter-id').val()),
name: $.trim($('#filter-name').val()),
reqDepartment:$.trim($('#filter-dep').val())
}, $('.list-tabs').find('.active').data('status'));
location.hash = '';
g.reload({
status: 'all',
page: 1
});
g.reload();
});
//作废事件
... ... @@ -198,7 +122,7 @@ exports.init = function() {
$.ajax({
type: 'post',
dataType: 'json',
url: '/auditPromotion',
url: '{{auditUrl}}',
data: {
id: applyId,
status: 4,
... ... @@ -225,7 +149,7 @@ exports.init = function() {
$.ajax({
type: 'post',
dataType: 'json',
url: '/auditPromotion',
url: '{{auditUrl}}',
data: {
id: applyId,
status: 1 //审核通过
... ... @@ -246,7 +170,7 @@ exports.init = function() {
$.ajax({
type: 'post',
dataType: 'json',
url: '/sendPromotion',
url: '{{sendUrl}}',
data: {
auditTime: auditTime
},
... ... @@ -281,8 +205,6 @@ exports.init = function() {
$('#back-modal').on('click', '.btn-primary', function() {
var reason = $('#back-reason').val();
console.log(reason);
if (reason === '' || $.trim(reason) === '') {
alert('请填写驳回原因');
return;
... ... @@ -290,7 +212,7 @@ exports.init = function() {
$.ajax({
type: 'post',
dataType: 'json',
url: '/auditPromotion',
url: '{{auditUrl}}',
data: {
id: applyId,
status: 2,
... ...
... ... @@ -20,51 +20,52 @@ function convertNorY(val) {
}
}
function queryAttrList(id) {
var tableGird = new grid({
el:"#attr-table",
parms:function(){
var tableGird = new grid({
el:"#attr-table",
parms:function(){
console.log(window.categoryId);
return {
categoryId: window.categoryId * baseNum
};
},
columns:[
{
display: "属性名称",
name: "attributeName"
}, {
display: "属性类型",
name: "attributeValues"
}, {
display: "输入类型",
name: "inputType"
}, {
display: "是否必选",
name:"isMust",
render:function(item){
return convertNorY(item.isMust);
}
}, {
display: "是否可搜索",
name: "isSearch",
render: function(item){
return convertNorY(item.isSearch);
}
}, {
display:"操作",
name:"categoryId",
render:function(items){
return {
categoryId: id * baseNum
};
},
columns:[
{
display: "属性名称",
name: "attributeName"
}, {
display: "属性类型",
name: "attributeValues"
}, {
display: "输入类型",
name: "inputType"
}, {
display: "是否必选",
name:"isMust",
render:function(item){
return convertNorY(item.isMust);
}
}, {
display: "是否可搜索",
name: "isSearch",
render: function(item){
return convertNorY(item.isSearch);
}
}, {
display:"操作",
name:"categoryId",
render:function(items){
return ('<button attribute-id="' + items.attributeId + '" class="btn btn-success btn-xs edit-class-btn">编辑</button>');
}
return ('<button attribute-id="' + items.attributeId + '" class="btn btn-success btn-xs edit-class-btn">编辑</button>');
}
]
});
tableGird.init('/product/attr/queryProductAttributeList');
}
}
]
});
var $attributeName = $('#attributeName');
var $saleType = $('#saleType');
... ... @@ -120,7 +121,11 @@ exports.init = function () {
$('input#categoryId').val($this.attr('data-val'));
queryAttrList($this.attr('data-val'));
//列表渲染
//queryAttrList($this.attr('data-val'));
window.categoryId = $this.attr('data-val');
tableGird.init('/product/attr/queryProductAttributeList');
}
} else {
... ...
/*
*@time: 2016/2/4
*@author: chenglong
*/
var $ = require('jquery');
var edit = require('../common/edit');
var grid=require('../common/grid');
var baseNum = 1;
var tableGird = new grid({
el:"#limit-table-box",
parms:function(){
return {
//id: window.categoryId * baseNum
};
},
columns:[
{
display: "",
name: "",
render: function () {
return ('<div class="checkbox"><label><input type="checkbox"></label></div>');
}
}, {
display: "名称",
name: "name"
}, {
display: "热门排序",
name: "hotSort",
render: function (item) {
if (item.hotSort === 'null') {
return '-';
} else {
return ('<input class="width50" type="text" value="'+ item.hotSort +'"/>');
}
}
}, {
display: "未发售排序",
name:"notSaleSort",
render: function (item) {
if (item.notSaleSort === 'null') {
return '-';
} else {
return ('<input class="width50" type="text" value="'+ item.notSaleSort +'"/>');
}
}
}, {
display: "封面图",
name: "cover",
render: function(item){
return ('<img class="cover-img" src="'+item.cover+'" />');
}
}, {
display:"SKN",
name:"skn"
}, {
display:"价格",
name:"price"
}, {
display:"发售日期",
name:"saleDate"
}, {
display:"库存",
name:"store"
}, {
display:"是否发售",
name:"isSale",
render:function(items){
if (items.isSale) {
return '是';
} else {
return '否';
}
}
}, {
display:"是否热门",
name:"isHot",
render:function(items){
if (items.isHot) {
return '是';
} else {
return '否';
}
}
}, {
display:"是否开启",
name:"isOpen",
render:function(items){
if (items.isOpen) {
return '是';
} else {
return '否';
}
}
}, {
display:"操作",
name:"skn",
render:function(items){
}
}
]
});
exports.init = function () {
console.log('start');
tableGird.init('/limit/product/page');
};
\ No newline at end of file
... ...
... ... @@ -14,14 +14,14 @@ exports.init = function() {
new select({
el:"#sizeId",
ajax:"supplier"
ajax:"sortattribute"
});
var g=new grid({
el:"#basicTable",
parms:function(){
return {
id:window.menuid?window.menuid:"",
sortId:window.menuid?window.menuid:"",
};
},
columns:[
... ...
... ... @@ -80,17 +80,17 @@ exports.menu=function(callback){
}
window.menuid=thisVal;
//获取文案
var c=[];
function aa(a){
var b=a.prev();
if(b.length>0&&b.find(".glyphicon-minus")){
// var c=[];
// function aa(a){
// var b=a.prev();
// if(b.length>0&&b.find(".glyphicon-minus")){
aa(b);
}
c.push($.trim(a.text()));
}
aa($("[data-val="+thisVal+"]"));
window.menuname=c.join('/');
// aa(b);
// }
// c.push($.trim(a.text()));
// }
// aa($(".attr-item-active[data-val="+thisVal+"]"));
window.menuname=$.trim($(".attr-item-active[data-val="+thisVal+"]").text());//c.join('/');
callback&&callback();
});
... ... @@ -101,14 +101,14 @@ exports.init = function() {
new select({
el:"#sizeId",
ajax:"supplier"
ajax:"sortsize"
});
var g=new grid({
el:"#basicTable",
parms:function(){
return {
id:window.menuid?window.menuid:"",
sortId:window.menuid?window.menuid:"",
};
},
columns:[
... ... @@ -162,10 +162,11 @@ exports.init = function() {
}
$(document).on("click",".delbtn",function(){
var _id=$(this).data("sortid");
var _sortid=$(this).data("sortid"),
_sizeid=$(this).data("sizeid");
__ajax({
url:'/erpproduct/sortsize/ajax/delete',
data:{id:_id}
data:{sortId:_sortid,sizeId:_sizeid}
},function(){
g.reload();
$("#addAttr").modal('hide');
... ... @@ -173,8 +174,8 @@ exports.init = function() {
});
$(document).on("click",".add-attr-btn",function(){
var data={sortName:window.menuid,sizeId:$("#sizeId").val(),orderBy:$("#orderBy").val()};
if(!data.sortName){
var data={sortId:window.menuid,sizeId:$("#sizeId").val(),orderBy:$("#orderBy").val()};
if(!data.sortId){
alert("尺码不可为空");
return;
}
... ...
... ... @@ -9,5 +9,5 @@
}
.panel-col2 {
width: 280px;
width: 280px;
}
\ No newline at end of file
... ...
ul {
margin-top: 0;
margin-top: 0;
}
.admin-icon-yellow {
color: #ffbe40;
color: #ffbe40;
}
.admin-header {
font-size: 1.4rem;
margin-bottom: 0;
font-size: 1.4rem;
margin-bottom: 0;
}
.admin-header-list a:hover :after {
content: none;
content: none;
}
.admin-main {
background: #f3f3f3;
background: #f3f3f3;
}
.admin-menu {
position: fixed;
z-index: 10;
bottom: 30px;
right: 20px;
position: fixed;
z-index: 10;
bottom: 30px;
right: 20px;
}
.admin-sidebar {
width: 260px;
min-height: 100%;
float: left;
border-right: 1px solid #cecece;
width: 260px;
min-height: 100%;
float: left;
border-right: 1px solid #cecece;
}
.admin-sidebar-list {
margin-bottom: 0;
margin-bottom: 0;
}
.admin-sidebar-list li a {
color: #5c5c5c;
padding-left: 24px;
color: #5c5c5c;
padding-left: 24px;
}
.admin-sidebar-list li:first-child {
border-top: none;
border-top: none;
}
.admin-sidebar-sub {
margin-top: 0;
margin-bottom: 0;
box-shadow: 0 16px 8px -15px #e2e2e2 inset;
background: #ececec;
padding-left: 24px;
margin-top: 0;
margin-bottom: 0;
box-shadow: 0 16px 8px -15px #e2e2e2 inset;
background: #ececec;
padding-left: 24px;
}
.admin-sidebar-sub li:first-child {
border-top: 1px solid #dedede;
border-top: 1px solid #dedede;
}
.admin-sidebar-panel {
margin: 10px;
margin: 10px;
}
.admin-content {
width: auto;
overflow: hidden;
height: 100%;
background: #fff;
width: auto;
overflow: hidden;
height: 100%;
background: #fff;
}
.admin-content-list {
border: 1px solid #e9ecf1;
margin-top: 0;
border: 1px solid #e9ecf1;
margin-top: 0;
}
.admin-content-list li {
border: 1px solid #e9ecf1;
border-width: 0 1px;
margin-left: -1px;
border: 1px solid #e9ecf1;
border-width: 0 1px;
margin-left: -1px;
}
.admin-content-list li:first-child {
border-left: none;
border-left: none;
}
.admin-content-list li:last-child {
border-right: none;
border-right: none;
}
.admin-content-table a {
color: #535353;
color: #535353;
}
.admin-content-file {
margin-bottom: 0;
color: #666;
margin-bottom: 0;
color: #666;
}
.admin-content-file p {
margin: 0 0 5px 0;
font-size: 1.4rem;
margin: 0 0 5px 0;
font-size: 1.4rem;
}
.admin-content-file li {
padding: 10px 0;
padding: 10px 0;
}
.admin-content-file li:first-child {
border-top: none;
border-top: none;
}
.admin-content-file li:last-child {
border-bottom: none;
border-bottom: none;
}
.admin-content-file li .am-progress {
margin-bottom: 4px;
margin-bottom: 4px;
}
.admin-content-file li .am-progress-bar {
line-height: 14px;
line-height: 14px;
}
.admin-content-task {
margin-bottom: 0;
margin-bottom: 0;
}
.admin-content-task li {
padding: 5px 0;
border-color: #eee;
padding: 5px 0;
border-color: #eee;
}
.admin-content-task li:first-child {
border-top: none;
border-top: none;
}
.admin-content-task li:last-child {
border-bottom: none;
border-bottom: none;
}
.admin-task-meta {
font-size: 1.2rem;
color: #999;
font-size: 1.2rem;
color: #999;
}
.admin-task-bd {
font-size: 1.4rem;
margin-bottom: 5px;
font-size: 1.4rem;
margin-bottom: 5px;
}
.admin-content-comment {
margin-bottom: 0;
margin-bottom: 0;
}
.admin-content-comment .am-comment-bd {
font-size: 1.4rem;
font-size: 1.4rem;
}
.admin-content-pagination {
margin-bottom: 0;
margin-bottom: 0;
}
.admin-content-pagination li a {
padding: 4px 8px;
padding: 4px 8px;
}
@media only screen and (min-width: 641px) {
.admin-sidebar {
display: block;
position: static;
background: none;
}
.admin-offcanvas-bar {
position: static;
width: auto;
background: none;
-webkit-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.admin-offcanvas-bar:after {
content: none;
}
.admin-sidebar {
display: block;
position: static;
background: none;
}
.admin-offcanvas-bar {
position: static;
width: auto;
background: none;
-webkit-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.admin-offcanvas-bar:after {
content: none;
}
}
@media only screen and (max-width: 640px) {
.admin-sidebar {
width: inherit;
}
.admin-offcanvas-bar {
background: #f3f3f3;
}
.admin-offcanvas-bar:after {
background: #BABABA;
}
.admin-sidebar-list a:hover, .admin-sidebar-list a:active{
-webkit-transition: background-color .3s ease;
-moz-transition: background-color .3s ease;
-ms-transition: background-color .3s ease;
-o-transition: background-color .3s ease;
transition: background-color .3s ease;
background: #E4E4E4;
}
.admin-content-list li {
padding: 10px;
border-width: 1px 0;
margin-top: -1px;
}
.admin-content-list li:first-child {
border-top: none;
}
.admin-content-list li:last-child {
border-bottom: none;
}
.admin-form-text {
text-align: left !important;
}
.admin-sidebar {
width: inherit;
}
.admin-offcanvas-bar {
background: #f3f3f3;
}
.admin-offcanvas-bar:after {
background: #BABABA;
}
.admin-sidebar-list a:hover, .admin-sidebar-list a:active {
-webkit-transition: background-color .3s ease;
-moz-transition: background-color .3s ease;
-ms-transition: background-color .3s ease;
-o-transition: background-color .3s ease;
transition: background-color .3s ease;
background: #E4E4E4;
}
.admin-content-list li {
padding: 10px;
border-width: 1px 0;
margin-top: -1px;
}
.admin-content-list li:first-child {
border-top: none;
}
.admin-content-list li:last-child {
border-bottom: none;
}
.admin-form-text {
text-align: left !important;
}
}
/*
* user.html css
*/
.user-info {
margin-bottom: 15px;
margin-bottom: 15px;
}
.user-info .am-progress {
margin-bottom: 4px;
margin-bottom: 4px;
}
.user-info p {
margin: 5px;
margin: 5px;
}
.user-info-order {
font-size: 1.4rem;
font-size: 1.4rem;
}
/*
... ... @@ -249,7 +251,7 @@ ul {
*/
.error-log .am-pre-scrollable {
max-height: 40rem;
max-height: 40rem;
}
/*
... ... @@ -257,27 +259,27 @@ ul {
*/
.table-main {
font-size: 1.4rem;
padding: .5rem;
font-size: 1.4rem;
padding: .5rem;
}
.table-main button {
background: #fff;
background: #fff;
}
.table-check {
width: 30px;
width: 30px;
}
.table-id {
width: 50px;
width: 50px;
}
@media only screen and (max-width: 640px) {
.table-select {
margin-top: 10px;
margin-left: 5px;
}
.table-select {
margin-top: 10px;
margin-left: 5px;
}
}
/*
... ... @@ -285,25 +287,25 @@ gallery.html css
*/
.gallery-list li {
padding: 10px;
padding: 10px;
}
.gallery-list a {
color: #666;
color: #666;
}
.gallery-list a:hover {
color: #3bb4f2;
color: #3bb4f2;
}
.gallery-title {
margin-top: 6px;
font-size: 1.4rem;
margin-top: 6px;
font-size: 1.4rem;
}
.gallery-desc {
font-size: 1.2rem;
margin-top: 4px;
font-size: 1.2rem;
margin-top: 4px;
}
/*
... ... @@ -311,44 +313,52 @@ gallery.html css
*/
.page-404 {
background: #fff;
border: none;
width: 200px;
margin: 0 auto;
background: #fff;
border: none;
width: 200px;
margin: 0 auto;
}
/*
fixed-layout 固定头部和边栏布局
fixed-layout 鍥哄畾澶撮儴鍜岃竟鏍忓竷灞€
*/
.fixed-layout,
.fixed-layout body {
height: 100%;
overflow: hidden;
height: 100%;
overflow: hidden;
}
.fixed-layout .admin-header {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1500;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1500;
}
.fixed-layout .admin-main {
position: relative;
height: 100%;
padding-top: 51px;
position: relative;
height: 100%;
padding-top: 51px;
}
.fixed-layout .admin-content,
.fixed-layout .admin-sidebar {
height: 100%;
overflow-x: hidden;
overflow-y: scroll;
height: 100%;
overflow-x: hidden;
overflow-y: scroll;
}
.fixed-layout .admin-sidebar.am-active {
z-index: 1600;
z-index: 1600;
}
input[type=file] {
display: block;
opacity: 0;
height: 60px;
width: 100px;
position: absolute;
z-index: 99;
}
\ No newline at end of file
... ...
... ... @@ -52,4 +52,30 @@
line-height: 40px;
border: 1px solid #ccc;
border-radius: 3px;
}
// 限购商品
#limit-table-box {
table {
vertical-align: middle;
th, td {
text-align: center;
vertical-align: middle;
}
div.checkbox label{
height: 13px;
}
.cover-img {
width: 100px;
}
.width50 {
width: 50px;
text-align: center;
}
}
}
\ No newline at end of file
... ...
@charset "UTF-8";
ul {
margin-top: 0;
margin-top: 0;
}
.admin-icon-yellow {
color: #ffbe40;
color: #ffbe40;
}
.admin-header {
font-size: 1.4rem;
margin-bottom: 0;
font-size: 1.4rem;
margin-bottom: 0;
}
.admin-header-list a:hover :after {
content: none;
content: none;
}
.admin-main {
background: #f3f3f3;
background: #f3f3f3;
}
.admin-menu {
position: fixed;
z-index: 10;
bottom: 30px;
right: 20px;
position: fixed;
z-index: 10;
bottom: 30px;
right: 20px;
}
.admin-sidebar {
width: 260px;
min-height: 100%;
float: left;
border-right: 1px solid #cecece;
width: 260px;
min-height: 100%;
float: left;
border-right: 1px solid #cecece;
}
.admin-sidebar-list {
margin-bottom: 0;
margin-bottom: 0;
}
.admin-sidebar-list li a {
color: #5c5c5c;
padding-left: 24px;
color: #5c5c5c;
padding-left: 24px;
}
.admin-sidebar-list li:first-child {
border-top: none;
border-top: none;
}
.admin-sidebar-sub {
margin-top: 0;
margin-bottom: 0;
box-shadow: 0 16px 8px -15px #e2e2e2 inset;
background: #ececec;
padding-left: 24px;
margin-top: 0;
margin-bottom: 0;
box-shadow: 0 16px 8px -15px #e2e2e2 inset;
background: #ececec;
padding-left: 24px;
}
.admin-sidebar-sub li:first-child {
border-top: 1px solid #dedede;
border-top: 1px solid #dedede;
}
.admin-sidebar-panel {
margin: 10px;
margin: 10px;
}
.admin-content {
width: auto;
overflow: hidden;
height: 100%;
background: #fff;
width: auto;
overflow: hidden;
height: 100%;
background: #fff;
}
.admin-content-list {
border: 1px solid #e9ecf1;
margin-top: 0;
border: 1px solid #e9ecf1;
margin-top: 0;
}
.admin-content-list li {
border: 1px solid #e9ecf1;
border-width: 0 1px;
margin-left: -1px;
border: 1px solid #e9ecf1;
border-width: 0 1px;
margin-left: -1px;
}
.admin-content-list li:first-child {
border-left: none;
border-left: none;
}
.admin-content-list li:last-child {
border-right: none;
border-right: none;
}
.admin-content-table a {
color: #535353;
color: #535353;
}
.admin-content-file {
margin-bottom: 0;
color: #666;
margin-bottom: 0;
color: #666;
}
.admin-content-file p {
margin: 0 0 5px 0;
font-size: 1.4rem;
margin: 0 0 5px 0;
font-size: 1.4rem;
}
.admin-content-file li {
padding: 10px 0;
padding: 10px 0;
}
.admin-content-file li:first-child {
border-top: none;
border-top: none;
}
.admin-content-file li:last-child {
border-bottom: none;
border-bottom: none;
}
.admin-content-file li .am-progress {
margin-bottom: 4px;
margin-bottom: 4px;
}
.admin-content-file li .am-progress-bar {
line-height: 14px;
line-height: 14px;
}
.admin-content-task {
margin-bottom: 0;
margin-bottom: 0;
}
.admin-content-task li {
padding: 5px 0;
border-color: #eee;
padding: 5px 0;
border-color: #eee;
}
.admin-content-task li:first-child {
border-top: none;
border-top: none;
}
.admin-content-task li:last-child {
border-bottom: none;
border-bottom: none;
}
.admin-task-meta {
font-size: 1.2rem;
color: #999;
font-size: 1.2rem;
color: #999;
}
.admin-task-bd {
font-size: 1.4rem;
margin-bottom: 5px;
font-size: 1.4rem;
margin-bottom: 5px;
}
.admin-content-comment {
margin-bottom: 0;
margin-bottom: 0;
}
.admin-content-comment .am-comment-bd {
font-size: 1.4rem;
font-size: 1.4rem;
}
.admin-content-pagination {
margin-bottom: 0;
margin-bottom: 0;
}
.admin-content-pagination li a {
padding: 4px 8px;
padding: 4px 8px;
}
@media only screen and (min-width: 641px) {
.admin-sidebar {
display: block;
position: static;
background: none;
}
.admin-offcanvas-bar {
position: static;
width: auto;
background: none;
-webkit-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.admin-offcanvas-bar:after {
content: none;
}
.admin-sidebar {
display: block;
position: static;
background: none;
}
.admin-offcanvas-bar {
position: static;
width: auto;
background: none;
-webkit-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.admin-offcanvas-bar:after {
content: none;
}
}
@media only screen and (max-width: 640px) {
.admin-sidebar {
width: inherit;
}
.admin-offcanvas-bar {
background: #f3f3f3;
}
.admin-offcanvas-bar:after {
background: #BABABA;
}
.admin-sidebar-list a:hover, .admin-sidebar-list a:active {
-webkit-transition: background-color .3s ease;
-moz-transition: background-color .3s ease;
-ms-transition: background-color .3s ease;
-o-transition: background-color .3s ease;
transition: background-color .3s ease;
background: #E4E4E4;
}
.admin-content-list li {
padding: 10px;
border-width: 1px 0;
margin-top: -1px;
}
.admin-content-list li:first-child {
border-top: none;
}
.admin-content-list li:last-child {
border-bottom: none;
}
.admin-form-text {
text-align: left !important;
}
@media only screen and (max-width: 640px) {
.admin-sidebar {
width: inherit;
}
.admin-offcanvas-bar {
background: #f3f3f3;
}
.admin-offcanvas-bar:after {
background: #BABABA;
}
.admin-sidebar-list a:hover, .admin-sidebar-list a:active {
-webkit-transition: background-color .3s ease;
-moz-transition: background-color .3s ease;
-ms-transition: background-color .3s ease;
-o-transition: background-color .3s ease;
transition: background-color .3s ease;
background: #E4E4E4;
}
.admin-content-list li {
padding: 10px;
border-width: 1px 0;
margin-top: -1px;
}
.admin-content-list li:first-child {
border-top: none;
}
.admin-content-list li:last-child {
border-bottom: none;
}
.admin-form-text {
text-align: left !important;
}
}
/*
* user.html css
*/
.user-info {
margin-bottom: 15px;
margin-bottom: 15px;
}
.user-info .am-progress {
margin-bottom: 4px;
margin-bottom: 4px;
}
.user-info p {
margin: 5px;
margin: 5px;
}
.user-info-order {
font-size: 1.4rem;
font-size: 1.4rem;
}
/*
* errorLog.html css
*/
.error-log .am-pre-scrollable {
max-height: 40rem;
max-height: 40rem;
}
/*
* table.html css
*/
.table-main {
font-size: 1.4rem;
padding: .5rem;
font-size: 1.4rem;
padding: .5rem;
}
.table-main button {
background: #fff;
background: #fff;
}
.table-check {
width: 30px;
width: 30px;
}
.table-id {
width: 50px;
width: 50px;
}
@media only screen and (max-width: 640px) {
.table-select {
margin-top: 10px;
margin-left: 5px;
}
.table-select {
margin-top: 10px;
margin-left: 5px;
}
}
/*
gallery.html css
*/
.gallery-list li {
padding: 10px;
padding: 10px;
}
.gallery-list a {
color: #666;
color: #666;
}
.gallery-list a:hover {
color: #3bb4f2;
color: #3bb4f2;
}
.gallery-title {
margin-top: 6px;
font-size: 1.4rem;
margin-top: 6px;
font-size: 1.4rem;
}
.gallery-desc {
font-size: 1.2rem;
margin-top: 4px;
font-size: 1.2rem;
margin-top: 4px;
}
/*
404.html css
*/
.page-404 {
background: #fff;
border: none;
width: 200px;
margin: 0 auto;
background: #fff;
border: none;
width: 200px;
margin: 0 auto;
}
/*
fixed-layout 固定头部和边栏布局
fixed-layout 鍥哄畾澶撮儴鍜岃竟鏍忓竷灞€
*/
.fixed-layout,
.fixed-layout body {
height: 100%;
overflow: hidden;
height: 100%;
overflow: hidden;
}
.fixed-layout .admin-header {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1500;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1500;
}
.fixed-layout .admin-main {
position: relative;
height: 100%;
padding-top: 51px;
position: relative;
height: 100%;
padding-top: 51px;
}
.fixed-layout .admin-content,
.fixed-layout .admin-sidebar {
height: 100%;
overflow-x: hidden;
overflow-y: scroll;
height: 100%;
overflow-x: hidden;
overflow-y: scroll;
}
.fixed-layout .admin-sidebar.am-active {
z-index: 1600;
}
.list-filter input[type="text"], .list-filter select {
display: inline-block;
width: 200px;
}
.list-tabs {
margin: 50px 0 0;
}
.list-table {
margin: 20px 0 0;
z-index: 1600;
}
.coupon-list-table {
margin: 20px 0 0;
}
.coupon-list-table th {
text-align: center;
}
.coupon-list-table td {
display: table-cell;
vertical-align: middle !important;
line-height: 1;
text-align: center;
}
.coupon-list-table td p {
margin: 0;
}
.coupon-list-table td.id {
width: 18%;
}
.coupon-list-table td.info {
width: 23%;
text-align: left;
}
.coupon-list-table td.time {
width: 11%;
}
.coupon-list-table td.describe {
width: 16%;
}
.coupon-list-table td.staff {
width: 7%;
}
.coupon-list-table td.state {
width: 11%;
}
.coupon-list-table td.state .state-reason {
color: red;
word-break: break-all;
}
.coupon-list-table td.operate.wait a.apply-success, .coupon-list-table td.operate.wait a.apply-back, .coupon-list-table td.operate.wait a.apply-cancel {
display: inline-block;
}
.coupon-list-table td.operate.success a.apply-cancel {
display: inline-block;
}
.coupon-list-table td.operate.back a.apply-modify {
display: inline-block;
}
.coupon-list-table td.operate p {
margin: 5px 0;
}
.coupon-list-table td.operate a {
display: none;
}
.coupon-list-table td.operate a.apply-detail {
display: inline-block;
}
.send-list td.time {
width: 160px;
}
.send-list td.info {
width: 352px;
}
.couponview .red {
color: #dd514c;
padding: 0 5px;
input[type=file] {
display: block;
opacity: 0;
height: 60px;
width: 100px;
position: absolute;
z-index: 99;
}
.datepicker {
display: none;
position: absolute;
padding: 4px;
margin-top: 1px;
direction: ltr;
display: none;
position: absolute;
padding: 4px;
margin-top: 1px;
direction: ltr;
}
.datepicker.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
float: left;
display: none;
min-width: 160px;
list-style: none;
background-color: #fff;
border: 1px solid rgba(0, 0, 0, 0.2);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
*border-right-width: 2px;
*border-bottom-width: 2px;
color: #333;
font-size: 13px;
line-height: 18px;
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
float: left;
display: none;
min-width: 160px;
list-style: none;
background-color: #fff;
border: 1px solid rgba(0, 0, 0, 0.2);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
*border-right-width: 2px;
*border-bottom-width: 2px;
color: #333;
font-size: 13px;
line-height: 18px;
}
.datepicker.dropdown-menu th {
padding: 4px 5px;
padding: 4px 5px;
}
.datepicker.dropdown-menu td {
padding: 4px 5px;
padding: 4px 5px;
}
.datepicker table {
border: 0;
margin: 0;
width: auto;
border: 0;
margin: 0;
width: auto;
}
.datepicker table tr td span {
display: block;
width: 23%;
height: 54px;
line-height: 54px;
float: left;
margin: 1%;
cursor: pointer;
display: block;
width: 23%;
height: 54px;
line-height: 54px;
float: left;
margin: 1%;
cursor: pointer;
}
.datepicker td {
text-align: center;
width: 20px;
height: 20px;
border: 0;
font-size: 12px;
padding: 4px 8px;
background: #fff;
cursor: pointer;
text-align: center;
width: 20px;
height: 20px;
border: 0;
font-size: 12px;
padding: 4px 8px;
background: #fff;
cursor: pointer;
}
.datepicker td.active.day, .datepicker td.active.year {
background: #2ba6cb;
background: #2ba6cb;
}
.datepicker td.old, .datepicker td.new {
color: #999;
color: #999;
}
.datepicker td span.active {
background: #2ba6cb;
background: #2ba6cb;
}
.datepicker td.day.disabled {
color: #ccc;
color: #ccc;
}
.datepicker th {
text-align: center;
width: 20px;
height: 20px;
border: 0;
font-size: 12px;
padding: 4px 8px;
background: #fff;
cursor: pointer;
text-align: center;
width: 20px;
height: 20px;
border: 0;
font-size: 12px;
padding: 4px 8px;
background: #fff;
cursor: pointer;
}
.datepicker th.active.day, .datepicker th.active.year {
background: #2ba6cb;
background: #2ba6cb;
}
.datepicker th.date-switch {
width: 145px;
width: 145px;
}
.datepicker th span.active {
background: #2ba6cb;
background: #2ba6cb;
}
.datepicker .cw {
font-size: 10px;
width: 12px;
padding: 0 2px 0 5px;
vertical-align: middle;
font-size: 10px;
width: 12px;
padding: 0 2px 0 5px;
vertical-align: middle;
}
.datepicker.days div.datepicker-days {
display: block;
display: block;
}
.datepicker.months div.datepicker-months {
display: block;
display: block;
}
.datepicker.years div.datepicker-years {
display: block;
display: block;
}
.datepicker thead tr:first-child th {
cursor: pointer;
cursor: pointer;
}
.datepicker thead tr:first-child th.cw {
cursor: default;
background-color: transparent;
cursor: default;
background-color: transparent;
}
.datepicker tfoot tr:first-child th {
cursor: pointer;
cursor: pointer;
}
.datepicker-inline {
width: 220px;
width: 220px;
}
.datepicker-rtl {
direction: rtl;
direction: rtl;
}
.datepicker-rtl table tr td span {
float: right;
float: right;
}
.datepicker-dropdown {
top: 0;
left: 0;
top: 0;
left: 0;
}
.datepicker-dropdown:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: 1px solid rgba(0, 0, 0, 0.2);
position: absolute;
top: -7px;
left: 6px;
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: 1px solid rgba(0, 0, 0, 0.2);
position: absolute;
top: -7px;
left: 6px;
}
.datepicker-dropdown:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #fff;
position: absolute;
top: -6px;
left: 7px;
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #fff;
position: absolute;
top: -6px;
left: 7px;
}
.datepicker > div,
.datepicker-dropdown::before,
.datepicker-dropdown::after {
display: none;
display: none;
}
.datepicker-close {
position: absolute;
top: -30px;
right: 0;
width: 15px;
height: 30px;
padding: 0;
display: none;
position: absolute;
top: -30px;
right: 0;
width: 15px;
height: 30px;
padding: 0;
display: none;
}
.table-striped .datepicker table tr td,
.table-striped .datepicker table tr th {
background-color: transparent;
background-color: transparent;
}
.panel-default .panel-heading {
border-top: 1px solid #e7e7e7;
border-top: 1px solid #e7e7e7;
}
.red {
color: red;
font-family: bold;
color: red;
font-family: bold;
}
input[type=date], input[type=time], input[type=datetime-local], input[type=month] {
line-height: 0 !important;
line-height: 0 !important;
}
.show-grid {
padding: 10px;
padding: 10px;
}
.brandBtn-group {
width: 150px;
float: left;
margin-right: 8px;
width: 150px;
float: left;
margin-right: 8px;
}
.brandBtn-group-lg {
width: 280px;
}
/*列表页操作按钮*/
.supplier-manage-operate .btn-freeze {
display: inline-block;
}
.supplier-manage-operate .btn-recovery {
display: none;
}
.supplier-manage-operate.valid0 .btn-freeze {
display: none;
}
.supplier-manage-operate.valid0 .btn-recovery {
display: inline-block;
}
.supplier-manage-operate.status0 .btn-edit, .supplier-manage-operate.status0 .btn-recovery, .supplier-manage-operate.status0 .btn-freeze {
display: none;
}
.supplier-operate.status0 .btn-edit, .supplier-operate.status0 .btn-submit {
display: none;
}
.brand-operate.operate1 .open-brand {
display: none;
}
.brand-operate.operate0 .close-brand {
display: none;
}
.pact-operate.operate0 .btn-edit {
display: none;
}
.pact-manage-operate.operate0 .renew-btn, .pact-manage-operate.operate0 .relieve-btn, .pact-manage-operate.operate2 .renew-btn, .pact-manage-operate.operate2 .relieve-btn, .pact-manage-operate.status0 .renew-btn, .pact-manage-operate.status0 .relieve-btn {
display: none;
width: 280px;
}
.contentpanel td a {
margin: 0 3px;
margin: 0 3px;
}
.mainwrapper .toggle-table tr {
cursor: pointer;
cursor: pointer;
}
.mainwrapper .toggle-table tr.level1 td:nth-of-type(1) {
text-indent: 2px;
text-indent: 2px;
}
.mainwrapper .toggle-table tr.level2 td:nth-of-type(1) {
text-indent: 15px;
text-indent: 15px;
}
.mainwrapper .toggle-table tr.level3 td:nth-of-type(1) {
text-indent: 30px;
text-indent: 30px;
}
.pattrscroll {
background: #F7F7F7;
background: #F7F7F7;
}
.pattrscroll ul {
padding-left: 0;
padding-left: 0;
}
.pattrscroll li {
cursor: pointer;
cursor: pointer;
}
.mainwrapper .list-group-item.level1 {
text-indent: 2px;
text-indent: 2px;
}
.mainwrapper .list-group-item.level2 {
text-indent: 15px;
text-indent: 15px;
}
.mainwrapper .list-group-item.level3 {
text-indent: 30px;
text-indent: 30px;
}
.attr-item-active {
background: #428bca;
color: #fff;
background: #428bca;
color: #fff;
}
.pannel-scroll {
height: 500px;
overflow-y: scroll;
overflow-x: hidden;
height: 500px;
overflow-y: scroll;
overflow-x: hidden;
}
.attr-select {
display: block;
height: 40px;
line-height: 40px;
border: 1px solid #ccc;
border-radius: 3px;
display: block;
height: 40px;
line-height: 40px;
border: 1px solid #ccc;
border-radius: 3px;
}
.panel-input {
display: inline-block;
width: 280px;
display: inline-block;
width: 100%;
}
.panel-col, .panel-col2 {
float: left;
width: 150px;
margin: 0 10px 0 0;
}
.panel-col2 {
width: 280px;
}
\ No newline at end of file
... ...
... ... @@ -10,14 +10,9 @@ var pageModule = require('./mid/pageModule');//页面加载js中间件
var grayroute = require('./mid/grayroute');//灰度界面中间件
var config = require('./config/common');
var util = require('./util/common');
var multipart = require('connect-multiparty');
var qiniu = require('qiniu');
qiniu.conf.ACCESS_KEY = 'BwWhoJN536BnV3CzlE20AjNKC9O2bP0l5tFpKsDU';
qiniu.conf.SECRET_KEY = '_x2VtO7fEmylgjojmLi7qwTBtRm30S8BrO0FxOPK';
var uptoken = new qiniu.rs.PutPolicy('cmsimg01');
var options = {
//初始化yo的app
appPath: __dirname + '/../', //应用所在目录
... ... @@ -33,6 +28,7 @@ var options = {
port:30012,
beforeMid:function(app,mids) {//使用handlebars-layouts
require('handlebars-layouts').register(mids.hbs.handlebars);
app.use(multipart());
},
beforeCustMid: function (app, routers) {
app.use(auth);//权限验证
... ... @@ -44,7 +40,6 @@ var options = {
if (res.locals.layout === false && res.locals.module) {
str += '<script type="text/javascript">seajs.use("' + res.locals.module + '",function(m){m.init();});</script>';
}
str += "<input type='hidden' id='uptoken' value='" + uptoken.token() + "'>";
return str;
}
}
... ...
... ... @@ -10,12 +10,16 @@ exports.res = [
src: '/coupon/index',
noApi: true,
data: {
bottons:'{"look":true}',
gridurl:'/getPromotion'
pageTitle: '优惠码列表',
createUrl: '/coupon/add',
bottons:'{"look":true, "couponDes": true}',
gridurl:'/getPromotion',
tabUrl: '/getCodeCount',
sendUrl: '/sendPromotion',
auditUrl: '/auditPromotion'
}
},
{
route: '/getPromotionCode',
method: 'POST',
... ... @@ -141,7 +145,7 @@ exports.res = [
},
src:'/coupon/edit'
},
{//添加优惠卷页面
{//编辑优惠卷页面
route: '/coupon/update/:id',
method: 'GET',
view: 'pages/coupon/edit',
... ... @@ -204,7 +208,6 @@ exports.res = [
{name: 'staff',type: 'String'}
]
},
{
route: '/coupon/action/update',
method: 'POST',
... ... @@ -226,5 +229,35 @@ 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'
}
]
... ...
//接口主域
var env = process.env.NODE_ENV || 'development';
// exports.domain = 'http://192.168.102.205:18025';
var domain = {
development:'http://localhost:30012',
//development:'http://172.16.6.227:8083/yohobuy-platform-web',
//development: 'http://192.168.102.215:8080/platform',
test:'http://192.168.102.205:18025/yoho-adminportal-web',
preview:'http://192.168.81.13:8189/yoho-admin-portal',
production:'http://192.168.81.6:8189/yoho-admin-portal'
};
exports.domain = domain[env];
//路由配置
exports.res = [
{
//【限购商品】页面渲染
route: '/limit/product/index',
method: 'GET',
view: 'pages/limit/index',
isJsonRaw:true,
src: '/product/limit'
}, {
// 【限购商品】ajax分页
route: '/limit/product/page',
method: 'POST',
url: '/limit/queryProductList',
isJsonRaw:true
}
];
\ No newline at end of file
... ...
//"http://172.16.6.220:8080/yohobuy-platform-web";
exports.domain ="http://localhost:30012";//require('../config/common.js').domain;
//"http://172.16.6.220:8080/yohobuy-platform-web";"http://localhost:30012";//
exports.domain =require('../config/common.js').domain;
//路由配置
exports.res = [{
... ... @@ -18,28 +18,40 @@ exports.res = [{
route: '/erpproduct/sortsize/ajax/index',
method: 'POST',
url: '/product/querySizeListBySortId',
isJsonRaw:true
isJsonRaw:true,
params:[
{name:"sortId",type:"number"}
]
},
{
route: '/erpproduct/sortsize/ajax/delete',
{//添加尺码接口【验证通过】
route: '/erpproduct/sortsize/ajax/add',
method: 'POST',
url: '/delete/aaaaaaa',
isJsonRaw:true
url: '/product/addSortSize',
isJsonRaw:true,
params:[
{name:"sortId",type:"number"},
{name:"sizeId",type:"number"},
{name:"orderBy",type:"number"}
]
},
{//自动提示
{//尺码模糊查询【待验证】
route:'/erpproduct/sortsize/ajax/automatic',
method:'POST',
url: '/supplier/supplier/getSupplierListByIdName',
url: '/product/querySizeByNameForSelect',
isJsonRaw: true,
params:[
{name:"idName",type:"String",def: 1}
{name:"idName",type:"String"}
]
},
{
route: '/erpproduct/sortsize/ajax/add',
{//删除单个品类尺码接口【待验证】
route: '/erpproduct/sortsize/ajax/delete',
method: 'POST',
url: '/delete/aaaaaaa',
isJsonRaw:true
url: '/product/deleteSortSize',
isJsonRaw:true,
params:[
{name:"sortId",type:"number"},
{name:"sizeId",type:"number"}
]
},
//************************品类尺码属性管理*****************************
{
... ... @@ -55,20 +67,35 @@ exports.res = [{
},
src:'/sortsize/attri'
},{
//获取品类关联尺码属性列表
//获取品类关联尺码属性列表【验证通过】
route: '/erpproduct/sortattribute/ajax/index',
method: 'POST',
url: '/product/querySizeListBySortId',
isJsonRaw:true
},{//删除品类关联尺码属性接口
url: '/product/querySizeAttributeList',
isJsonRaw:true,
params:[
{name:"page",type:"number"},
{name:"size",type:"number"}
]
},{//删除品类关联尺码属性接口【待验证,接口没有】
route: '/erpproduct/sortattribute/ajax/delete',
method: 'POST',
url: '/sortAttribute/delete',
isJsonRaw:true
},
{//添加品类关联尺码属性接口
{//添加品类关联尺码属性接口【待验证】
route: '/erpproduct/sortattribute/ajax/add',
method: 'POST',
url: '/sortAttribute/add',
isJsonRaw:true
url: '/product/addSizeAttribute',
isJsonRaw:true,
params:[
{name:"attributeName",type:"number"}
]
},{//添加品类关联尺码属性接口【待验证】
route: '/erpproduct/sortattribute/ajax/automatic',
method: 'POST',
url: '/product/querySizeAttributesByName',
isJsonRaw:true,
params:[
{name:"idName",type:"String"}
]
}]
\ No newline at end of file
... ...
... ... @@ -16,5 +16,7 @@
"request": "^2.55.0",
"yo.js": "^1.1.1"
},
"devDependencies": {}
"devDependencies": {
"connect-multiparty": "^2.0.0"
}
}
... ...
module.exports = {
'/limit/queryProductList': function (req, res) {
res.json({
data: {
list: [{
'name': 'Hello',
'hotSort': 1,
'notSaleSort': 1,
'cover': 'http://img11.static.yhbimg.com/goodsimg/2015/07/07/08/01315b5bbfd72bc5b59fa2fda6c28b9ae6.jpg',
'skn': '待定',
'price': '400',
'saleDate': '2015.1.2',
'store': 12,
'isSale': true,
'isHot': false,
'isOpen': true,
'id': 1231
},{
'name': 'Hello',
'hotSort': 1,
'notSaleSort': 1,
'cover': 'http://img11.static.yhbimg.com/goodsimg/2015/07/07/08/01315b5bbfd72bc5b59fa2fda6c28b9ae6.jpg',
'skn': '待定',
'price': '400',
'saleDate': '2015.1.2',
'store': 12,
'isSale': true,
'isHot': false,
'isOpen': true,
'id': 1231
},{
'name': 'Hello',
'hotSort': 1,
'notSaleSort': 1,
'cover': 'http://img11.static.yhbimg.com/goodsimg/2015/07/07/08/01315b5bbfd72bc5b59fa2fda6c28b9ae6.jpg',
'skn': '待定',
'price': '400',
'saleDate': '2015.1.2',
'store': 12,
'isSale': true,
'isHot': false,
'isOpen': true,
'id': 1231
}],
page: 1,
totalpage: 142,
size: 50,
total:1000
}
})
}
};
\ No newline at end of file
... ...
var authService = require('../service/auth');
var uploader=require('../service/upload');
module.exports = {
'/auth_bak':function(req, res){
... ... @@ -69,5 +70,8 @@ module.exports = {
var user = req.body.user||'';
var password = req.body.password||'';
authService.callLogin(user,password,res);
},
'/ajax/upload':function(req,res){
uploader.uploadFile(req,res);
}
}
\ No newline at end of file
... ...
var request=require('request');
var fs=require('fs');
var domain = require('../../config/common.js').domain;
exports.uploadFile=function(req,res){
// TODO 代理上传
// 方法1
if(req.is("multipart/form-data")){
req.body.file=fs.createReadStream(req.files[req.body.filename].path);
request.post({url:domain+'/fileupload/upload',formData:req.body},function optionalCallback(err, httpResponse, body){
res.json(JSON.parse(body));
});
}else{
res.json({code:"500",message:"请求类型错误"});
}
//方法2
// req.pipe(request.post(domain+'/fileupload/upload'))
// .on('error', onerror)
// .pipe(res);
// function onerror(err) {
// console.error(err.stack)
// }
}
\ No newline at end of file
... ...
... ... @@ -17,7 +17,7 @@
</div>
<div class="form-group">
<label for="limitTimes" class="col-sm-2 control-label">次数<i class="red">*</i></label>
<label for="limitTimes" class="col-sm-2 control-label">次数</label>
<div class="col-sm-8">
<input type="text" id="limitTimes" placeholder="0 表示不限制" class="form-control" required pattern="^[0-9]+$" value="{{limitTimes}}">
</div>
... ...
... ... @@ -7,12 +7,12 @@
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="">优惠码管理</a></li>
<li>优惠码列表</li>
<li>{{pageTitle}}</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>优惠码列表</h4>
<h4>{{pageTitle}}</h4>
</div>
</div>
</div>
... ... @@ -22,23 +22,29 @@
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-heading">
<a href="/coupon/add" class="btn btn-success"><i class="fa fa-plus"></i> 添加优惠码</a>
<a href="{{createUrl}}" class="btn btn-success"><i class="fa fa-plus"></i> 添加</a>
</div>
<div class="panel-body">
<div class="row">
<input id="filter-id" class="form-control panel-input" type="text" placeholder="请输入批次号">
<input id="filter-name" class="form-control panel-input" type="text" placeholder="请输入名称">
<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 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>
... ... @@ -46,10 +52,7 @@
</div>
<div class="panel panel-primary-head">
<div id="basicTable_wrapper" class="dataTables_wrapper no-footer">
<div class="list-tabs">
<ul class="nav nav-pills">
</ul>
<div id="table-tabs" class="list-tabs">
</div>
<div class="dataTables_length" id="basicTable">
</div>
... ... @@ -62,6 +65,7 @@
<input type="hidden" id="btnAuthority" value="{{bottons}}">
<input type="hidden" id="gridurl" value="{{gridurl}}">
<input type="hidden" id="tabUrl" value="{{tabUrl}}">
<div class="modal fade" id="cancel-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
... ... @@ -172,9 +176,3 @@
</tr>
\{{/ data}}
</script>
<script id="tab-tpl" type="x-tmpl-handlebars">
\{{#each data}}
<li role="presentation" data-status="\{{@key}}"><a href="javascript: void(0)"><span>\{{@key}}</span>(\{{.}})</a></li>
\{{/each}}
</script>
\ No newline at end of file
... ...
<div class="contentpanel">
<div class="row">
<div class="col-md-12">
<form id="basicForm" role="{{type}}" class="form-horizontal form-bordered" method="get" action="{{action}}">
<div class="panel panel-default">
{{# data}}
<div class="panel-heading">
<h4 class="panel-title">基本信息</h4>
</div><!-- panel-heading -->
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label">名称 <span class="red">*</span></label>
<div class="col-sm-8">
<input type="text" id="name" placeholder="名称建议30字以内" class="form-control" required maxlength="15" value="{{name}}">
</div>
</div>
<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}}">
</div>
<!--required pattern="^[0-9]+$"-->
</div>
<div class="form-group">
<label for="limitTimes" 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}}">
</div>
<!--required pattern="^[0-9]+$"-->
</div>
<div class="form-group">
<label class="col-sm-2 control-label">申请部门</label>
<div class="col-sm-3">
<select id="department1" class="form-control">
<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>
<div class="col-sm-3">
<select id="department2" class="form-control">
<option value="平台运营">平台运营</option>
<option value="营销策划">营销策划</option>
<option value="类目运营">类目运营</option>
<option value="店铺运营">店铺运营</option>
</select>
</div>
<input type="hidden" id="reqDepartment" value="{{reqDepartment}}" required>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">使用期限<span class="red">*</span></label>
<input id="limit-time" name="limit-time" type="radio"><label for="limit-time">指定时间</label>
<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>
<input id="no-limit-time" name="limit-time" type="radio"><label for="no-limit-time">不指定</label>
<!-- readonly require-->
</div>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">限购码说明<i class="red">*</i></label>
<div class="col-sm-8">
<textarea class="form-control" id="describe" placeholder="限购码使用条件简介" required>{{describe}}</textarea>
</div>
<!-- require-->
</div>
</div>
</div>
<div class="panel-heading">
<h4 class="panel-title">使用条件</h4>
</div>
<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">
<input type="checkbox" value="1" name="userSourceLimit" > IOS
</label>
<label class="checkbox-inline">
<input type="checkbox" value="2" name="userSourceLimit" > 安卓
</label>
<label class="checkbox-inline">
<input type="checkbox" value="3" name="userSourceLimit" > PC
</label>
<label class="checkbox-inline">
<input type="checkbox" value="4" name="userSourceLimit" > WAP
</label>
<label class="checkbox-inline">
<input type="checkbox" value="5" name="userSourceLimit" > IPAD
</label>
</div>
<input type="hidden" value="{{userSourceLimit}}" id="userSourceLimit" for="checkbox" required>
</div>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">会员身份<i class="red">*</i></label>
<div class="col-sm-10">
<label class="checkbox-inline">
<input type="checkbox" value="1" name="userTypeLimit" > 新注册
</label>
<label class="checkbox-inline">
<input type="checkbox" value="2" name="userTypeLimit"> 注册未购买
</label>
<label class="checkbox-inline">
<input type="checkbox" value="2" name="userTypeLimit"> 普通会员
</label>
<label class="checkbox-inline">
<input type="checkbox" value="2" name="userTypeLimit"> 银卡会员
</label>
<label class="checkbox-inline">
<input type="checkbox" value="2" name="userTypeLimit"> 金卡会员
</label>
<label class="checkbox-inline">
<input type="checkbox" value="2" name="userTypeLimit"> 白金会员
</label>
<label class="checkbox-inline">
<input type="checkbox" value="2" name="userTypeLimit"> 指定用户
</label>
</div>
<div class="col-sm-2">
<input type="text" class="form-control" placeholder="UID">
</div>
<input type="hidden" value="{{userTypeLimit}}" id="userTypeLimit" for="checkbox" required>
</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="">
</div>
</div>
<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 class="form-group">
<label for="name" class="col-sm-2 control-label">商品性别</label>
<div class="col-sm-10">
<label class="checkbox-inline">
<input type="checkbox" value="1" name="userSex" >
</label>
<label class="checkbox-inline">
<input type="checkbox" value="2" name="userSex">
</label>
<label class="checkbox-inline">
<input type="checkbox" value="3" name="userSex"> 通用
</label>
</div>
<input type="hidden" value="{{userSex}}" id="userSex" for="checkbox" required>
</div>
<div class="panel-heading">
<h4 class="panel-title">优惠互斥</h4>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">SKN除外</label>
<div class="col-sm-2">
<input class="form-control" type="text" placeholder="SKN">
</div>
</div>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">优惠互斥</label>
<div class="col-sm-10">
<label class="checkbox-inline">
<input type="checkbox" value="1" name="discountReject" > 销售折扣
</label>
<label class="checkbox-inline">
<input type="checkbox" value="2" name="discountReject" > VIP折扣-商品
</label>
<label class="checkbox-inline">
<input type="checkbox" value="3" name="discountReject" > VIP折扣-运营
</label>
<label class="checkbox-inline">
<input type="checkbox" value="4" name="discountReject" > 促销活动
</label>
<label class="checkbox-inline">
<input type="checkbox" value="5" name="discountReject" > YOHO币-商品
</label>
<label class="checkbox-inline">
<input type="checkbox" value="6" name="discountReject" > YOHO币-运营
</label>
<label class="checkbox-inline">
<input type="checkbox" value="7" name="discountReject" > 优惠券
</label>
<label class="checkbox-inline">
<input type="checkbox" value="8" name="discountReject" > 红包
</label>
<label class="checkbox-inline">
<input type="checkbox" value="9" name="discountReject" > 优惠码
</label>
</div>
<input type="hidden" value="{{discountReject}}" id="discountReject" for="checkbox" required>
</div>
<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>
</div>
</div>
<input type="hidden" value="{{staff}}" id="staff" >
<input type="hidden" value="{{id}}" id="id" >
<input type="hidden" value="{{status}}" id="status" >
{{/ data}}
<div class="panel-footer">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<a href="javascript:;" onclick="history.go(-1);" class="btn btn-default">取消</a>
<button id="save_brand" type="submit" data-loading-text="保存中..." class="btn btn-primary">保存</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
... ...
<div class="am-cf am-padding">
<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">优惠码列表</strong></div>
</div>
<div class="am-g">
<div class="am-u-sm-12">
<div class="list-filter">
<form class="am-form" action="">
<a class="am-btn am-btn-success am-radius" href="/couponadd">
<i class="am-icon-plus"></i>
<span>新增</span>
</a>
<input id="filter-id" type="text" placeholder="请输入批次号">
<input id="filter-name" type="text" placeholder="请输入名称">
<select id="filter-dep">
<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>
<a class="am-btn am-btn-secondary am-round filter-btn" href="javascript:;">筛选</a>
<a class="am-btn am-btn-secondary am-round" href="javascript:;">导出</a>
</form>
</div>
<div class="am-tabs list-tabs" data-am-tabs="{noSwipe: 1}" id="doc-tab-demo-1">
<ul class="am-tabs-nav am-nav am-nav-tabs">
</ul>
</div>
<div class="list-table">
<table class="coupon-list-table am-table am-table-bordered am-table-radius">
<thead>
<tr class="am-primary">
<th>批次号</th>
<th>基本信息</th>
<th>使用期限</th>
<th>优惠码说明</th>
<th>申请人</th>
<th>状态</th>
<th>操作</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<div class="am-modal am-modal-confirm" tabindex="-1" id="success-confirm">
<div class="am-modal-dialog">
<div class="am-modal-hd">温馨提示</div>
<div class="am-modal-bd">您确定要通过该申请吗?</div>
<div class="am-modal-footer">
<span class="am-modal-btn" data-am-modal-cancel>取消</span>
<span class="am-modal-btn" data-am-modal-confirm>确定</span>
<span class="am-modal-btn" data-am-modal-list>发放列表</span>
</div>
</div>
</div>
<div class="am-modal am-modal-prompt" tabindex="-1" id="back-prompt">
<div class="am-modal-dialog">
<div class="am-modal-hd">温馨提示</div>
<div class="am-modal-bd">
<p>您确定要驳回该申请吗?</p>
<p>
<label for="" style="color:red;">*请填写原因:</label>
<input id="back-reason" type="text" class="am-modal-prompt-input">
</p>
</div>
<div class="am-modal-footer">
<span class="am-modal-btn" data-am-modal-cancel>取消</span>
<span class="am-modal-btn" data-am-modal-confirm>确定</span>
</div>
</div>
</div>
<div class="am-modal am-modal-prompt" tabindex="-1" id="cancel-prompt">
<div class="am-modal-dialog">
<div class="am-modal-hd">温馨提示</div>
<div class="am-modal-bd">
<p>您确定要作废此优惠码吗?</p>
<p>
<label for="" style="color:red;">*请填写原因:</label>
<input id="cancel-reason" type="text" class="am-modal-prompt-input">
</p>
</div>
<div class="am-modal-footer">
<span class="am-modal-btn" data-am-modal-cancel>取消</span>
<span class="am-modal-btn" data-am-modal-confirm>确定</span>
</div>
</div>
</div>
<div class="am-modal am-modal-alert" tabindex="-1" id="apply-alert">
<div class="am-modal-dialog">
<div class="am-modal-hd">设置成功!</div>
<div class="am-modal-footer">
<span class="am-modal-btn">确定</span>
</div>
</div>
</div>
<div class="am-modal am-modal-no-btn" tabindex="-1" id="send-modal">
<div class="am-modal-dialog">
<div class="am-modal-hd">发放列表
<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
</div>
<div class="am-modal-bd">
<div class="send-list">
<table class="coupon-list-table am-table am-table-bordered am-table-radius">
<thead>
<tr class="am-primary">
<th>批次号</th>
<th>基本信息</th>
<th>使用期限</th>
<th>优惠码说明</th>
<th>申请人</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script id="list-tpl" type="x-tmpl-handlebars">
\{{# data}}
<tr>
<td class="id"><a href="/couponinfo/\{{id}}">\{{batchNo}}</a></td>
<td class="info">
<p>名称:\{{name}}</p>
<p>次数:\{{limitTimes}}</p>
<p>部门:\{{reqDepartment}}</p>
</td>
<td class="time">
<p>\{{limitDateFrom}}</p>
<p>\{{limitDateTo}}</p>
</td>
<td class="describe">
<p>\{{describe}}</p>
</td>
<td class="staff">\{{staff}}</td>
<td class="state">
<p class="state-title">\{{status}}</p>
<p class="state-reason">\{{reason}}</p>
</td>
<td class="operate" data-state="\{{status}}" data-id="\{{id}}">
<p><a class="am-btn am-btn-default am-round" href="/couponinfo/\{{id}}">查看详情</a></p>
<p><a class="am-btn am-btn-success am-round apply-success" href="javascript:;">通过</a></p>
<p><a class="am-btn am-btn-warning am-round apply-back" href="javascript:;">驳回</a></p>
<p><a class="am-btn am-btn-danger am-round apply-cancel" href="javascript:;">作废</a></p>
<p><a class="am-btn am-btn-secondary am-round apply-modify" href="/couponupdate/\{{id}}">修改</a></p>
</td>
</tr>
\{{/ data}}
</script>
<script id="send-tpl" type="x-tmpl-handlebars">
\{{# data}}
<tr>
<td class="id"><a href="/couponinfo/\{{id}}">\{{batchNo}}</a></td>
<td class="info">
<p>名称:\{{name}}</p>
<p>次数:\{{limitTimes}}</p>
<p>部门:\{{reqDepartment}}</p>
</td>
<td class="time">
<p>\{{limitDateFrom}}</p>
<p>\{{limitDateTo}}</p>
</td>
<td class="describe">
<p>\{{describe}}</p>
</td>
<td class="staff">\{{staff}}</td>
</tr>
\{{/ data}}
</script>
<script id="tab-tpl" type="x-tmpl-handlebars">
\{{#each data}}
<li data-status="\{{@key}}"><a href="javascript: void(0)"><span>\{{@key}}</span>(\{{.}})</a></li>
\{{/each}}
</script>
\ No newline at end of file
<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>限购商品管理</li>
</ul>
<h4>限购商品管理</h4>
</div>
</div>
<!-- media -->
</div>
<div class="contentpanel">
<form class="form-horizontal" action="">
<div class="row">
<div class="col-md-2">
<label class="control-label pull-left">关键词:</label>
<div class="label-leading pull-left">
<input class="form-control" type="text" />
</div>
</div>
<div class="col-md-2">
<label class="control-label pull-left">名称:</label>
<div class="label-leading pull-left">
<input class="form-control" type="text"/>
</div>
</div>
<div class="col-md-2">
<label class="control-label pull-left">SKN:</label>
<div class="label-leading pull-left">
<input class="form-control" type="text"/>
</div>
</div>
<div class="col-md-2">
<label class="control-label pull-left">热门:</label>
<div class="label-leading pull-left">
<div class="radio pull-left mr15">
<label><input type="radio" name="optionsStock" value="" checked=""></label>
</div>
<div class="radio pull-left">
<label><input type="radio" name="optionsStock" value=""></label>
</div>
</div>
</div>
<div class="col-md-2">
<label class="control-label pull-left">是否发售:</label>
<div class="label-leading pull-left">
<div class="radio pull-left mr15">
<label><input type="radio" name="optionsStock" value="" checked=""></label>
</div>
<div class="radio pull-left">
<label><input type="radio" name="optionsStock" value=""></label>
</div>
</div>
</div>
<div class="col-md-2">
<label class="control-label pull-left">是否开启:</label>
<div class="label-leading pull-left">
<div class="radio pull-left mr15">
<label><input type="radio" name="optionsStock" value="" checked=""></label>
</div>
<div class="radio pull-left">
<label><input type="radio" name="optionsStock" value=""></label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 mt20">
<button class="btn btn-primary pull-left mr20">筛选</button>
<button class="btn btn-primary pull-left mr20">全部</button>
<button class="btn btn-primary pull-left mr20">导出</button>
</div>
</div>
<div class="row">
<div class="col-md-12 mt20">
<div id="limit-table-box" class="table-responsive"></div>
</div>
</div>
</form>
</div>
... ...
... ... @@ -11,7 +11,7 @@
</ul>
<div>
<div style="width: 30%;float: left;">
<input type="file" id="fileupload">
<h4>添加供应商</h4>
</div>
</div>
... ... @@ -83,17 +83,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">法人身份证电子版 </label>
<div class="col-sm-8">
<ul class="upload-image-list" style="-webkit-padding-start: 0px;padding-left: 0px;">
<li class="fileinput-button">
<a class="fileinput-button-icon" id="forlegalIdentityCard" href="javascript:void(0);">
{{#legalIdentityCard}}
<img width="76" height="80" src="{{legalIdentityCard}}">
{{/legalIdentityCard}}
<input type="hidden" id="legalIdentityCard" value="{{legalIdentityCard}}">
+</a></li>
</ul>
<input type="file" id="legalIdentityCard" name="legalIdentityCard" value="{{legalIdentityCard}}">
</div>
</div>
... ... @@ -107,43 +97,21 @@
<div class="form-group">
<label class="col-sm-2 control-label">营业执照电子版 </label>
<div class="col-sm-8">
<ul class="upload-image-list" style="-webkit-padding-start: 0px;padding-left: 0px;">
<li class="fileinput-button"><a class="fileinput-button-icon" id="forindustryLicense" href="javascript:void(0);">
{{#industryLicense}}
<img width="76" height="80" src="{{industryLicense}}">
{{/industryLicense}}
<input type="hidden" id="industryLicense" value="{{industryLicense}}">
+</a></li>
</ul>
<input type="file" id="industryLicense" name="industryLicense" value="{{industryLicense}}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">经营许可证 </label>
<div class="col-sm-8">
<ul class="upload-image-list" style="-webkit-padding-start: 0px;padding-left: 0px;">
<li class="fileinput-button"><a class="fileinput-button-icon" id="forbusinessLicensePic" href="javascript:void(0);">
{{#businessLicensePic}}
<img width="76" height="80" src="{{businessLicensePic}}">
{{/businessLicensePic}}
<input type="hidden" id="businessLicensePic" value="{{businessLicensePic}}" >
+</a></li>
</ul>
<input type="file" id="businessLicensePic" name="businessLicensePic" value="{{businessLicensePic}}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">税务登记证 </label>
<div class="col-sm-8">
<ul class="upload-image-list" style="-webkit-padding-start: 0px;padding-left: 0px;">
<li class="fileinput-button"><a class="fileinput-button-icon" id="fortaxpayerQualificationCertificate" href="javascript:void(0);">
{{#taxpayerQualificationCertificate}}
<img width="76" height="80" src="{{taxpayerQualificationCertificate}}">
{{/taxpayerQualificationCertificate}}
<input type="hidden" id="taxpayerQualificationCertificate" value="{{taxpayerQualificationCertificate}}">
+</a></li>
</ul>
<input type="file" id="fortaxpayerQualificationCertificate" name="fortaxpayerQualificationCertificate" value="{{fortaxpayerQualificationCertificate}}">
</div>
</div>
... ...