Authored by uedxwg

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

... ... @@ -29,6 +29,7 @@ var common={
});
},
__tip:function(message,callback){
//danger
var options={};
if (arguments.length > 1) {
options.title=arguments[0];
... ...
... ... @@ -35,30 +35,6 @@ var edit=function(option){
}
edit.prototype={
constructor:edit,
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;
},
on:function (name,callback) {
var __self = this;
var _e = __self.registerEvent[name];
... ... @@ -88,6 +64,7 @@ edit.prototype={
},
render:function(){
var that=this;
/*初始化checkbox和radis*/
$("input:hidden",that.el).each(function(){
var $this=$(this);
... ...
... ... @@ -3,25 +3,21 @@
*/
'use strict';
var $ = require('jquery'),
dropDown=require('../common/dropDown');
var grid=require('../common/grid');
require('../util/jquery.gritter');
common=require('../common/common');
var menu=require('./index');
var select=require('../common/dropDown');
exports.init = function() {
new select({
el:"#sizeId",
ajax:"sortattribute"
});
// new select({
// el:"#sizeId",
// ajax:"sortattribute"
// });
var g=new grid({
var g=new common.grid({
el:"#basicTable",
parms:function(){
return {
sortId:window.menuid?window.menuid:"",
sortId:window.sortid?window.sortid:"",
};
},
columns:[
... ... @@ -40,69 +36,50 @@ exports.init = function() {
menu.menu(function(){
g.init('/erpproduct/sortattribute/ajax/index');
$("#sortName").val(window.menuname);
});
function __ajax(options,callback){
$.ajax({
type: 'POST',
url: options.url,
dataType: 'json',
data:options.data||{},
success: function(res) {
res=res.data;
if (res.code === 200) {
$.gritter.add({
title: res.message,
class_name: 'growl-success',
sticky: false,
time:1000,
after_open:setTimeout(function() {
callback&&callback();
},100)
});
} else {
$.gritter.add({
title: res.message,
class_name: 'growl-danger',
sticky: false,
time:1000
});
}
}
});
}
var _model=JSON.parse($("#model").val());
$(document).on("click",".delbtn",function(){
var row=g.rows[$(this).data("data-index")];
var data={sortId:row.sortId,attributeId:row.attributeId}
__ajax({
url:'/erpproduct/sortattribute/ajax/delete',
data:data
},function(){
g.reload();
var item=g.rows[$(this).data("index")];
common.dialog.confirm("温馨提示","你确定要删除吗?",function(){
common.util.__ajax({
url:'/erpproduct/sortattribute/ajax/delete',
data:{sortId:item.sortId,attributeId:item.attributeId}
},function(){
g.reload();
});
});
});
$(document).on("click",".add-attr-btn",function(){
var data={sortId:window.menuid,attributeId:$("#sizeId").val(),orderBy:$("#orderBy").val()};
if(!data.sortId){
alert("尺码不可为空");
return;
}
if(!~data.sizeId){
alert("尺码属性不可为空");
return;
}
if(!data.orderBy){
alert("排序不可为空");
return;
}
__ajax({
url:'/erpproduct/sortattribute/ajax/add',
data:data
},function(){
g.reload();
$(document).on("click","#btn-add",function(){
var _title=$(this).text();
common.dialog.confirm(_title,common.util.__template($("#template").html(),{name:_model.name,sortname:window.sortname}),function(){
var data={sortId:window.sortid,attributeId:$("#sizeId").val(),orderBy:$("#orderBy").val()};
if(!data.sortId){
common.util.__tip("尺码不可为空","warning");
return;
}
if(!~data.attributeId){
common.util.__tip("尺码属性不可为空","warning");
return;
}
if(!data.orderBy){
common.util.__tip("排序不可为空","warning");
return;
}
common.util.__ajax({
url:'/erpproduct/sortattribute/ajax/add',
data:data
},function(){
g.reload();
});
});
new common.dropDown({
el:"#sizeId",
ajax:"sortattribute"
});
});
}
\ No newline at end of file
... ...
... ... @@ -3,10 +3,7 @@
*/
'use strict';
var $ = require('jquery'),
dropDown=require('../common/dropDown');
var grid=require('../common/grid');
require('../util/jquery.gritter');
var select=require('../common/dropDown');
common=require('../common/common');
exports.menu=function(callback){
... ... @@ -78,19 +75,8 @@ exports.menu=function(callback){
.removeClass('glyphicon-minus').addClass('glyphicon-plus');
}
}
window.menuid=thisVal;
//获取文案
// 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($(".attr-item-active[data-val="+thisVal+"]"));
window.menuname=$.trim($(".attr-item-active[data-val="+thisVal+"]").text());//c.join('/');
window.sortid=thisVal;
window.sortname=$.trim($(".attr-item-active[data-val="+thisVal+"]").text());//c.join('/');
callback&&callback();
});
... ... @@ -99,16 +85,13 @@ exports.menu=function(callback){
exports.init = function() {
new select({
el:"#sizeId",
ajax:"sortsize"
});
var g=new grid({
var g=new common.grid({
el:"#basicTable",
parms:function(){
return {
sortId:window.menuid?window.menuid:"",
sortId:window.sortid?window.sortid:"",
};
},
columns:[
... ... @@ -119,80 +102,57 @@ exports.init = function() {
{display:"尺码名",name:"sizeName"},
{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>';
}}
]
});
exports.menu(function(){
g.init('/erpproduct/sortsize/ajax/index');
$("#sortName").val(window.menuname);
});
function __ajax(options,callback){
$.ajax({
type: 'POST',
url: options.url,
dataType: 'json',
data:options.data||{},
success: function(res) {
res=res.data;
if (res.code === 200) {
$.gritter.add({
title: res.message,
class_name: 'growl-success',
sticky: false,
time:1000,
after_open:setTimeout(function() {
callback&&callback();
},1000)
});
} else {
$.gritter.add({
title: res.message,
class_name: 'growl-danger',
sticky: false,
time:1000
});
}
var _model=JSON.parse($("#model").val());
$(document).on("click","#btn-add",function(){
var _title=$(this).text();
common.dialog.confirm(_title,common.util.__template($("#template").html(),{name:_model.name,sortname:window.sortname}),function(){
var data={sortId:window.sortid,sizeId:$("#sizeId").val(),orderBy:$("#orderBy").val()};
if(!data.sortId){
common.util.__tip("尺码不可为空","warning");
return;
}
if(!~data.sizeId){
common.util.__tip("尺码属性不可为空","warning");
return;
}
if(!data.orderBy){
common.util.__tip("排序不可为空","warning");
return;
}
common.util.__ajax({
url:'/erpproduct/sortsize/ajax/add',
data:data
},function(){
g.reload();
});
});
}
$(document).on("click",".delbtn",function(){
var _sortid=$(this).data("sortid"),
_sizeid=$(this).data("sizeid");
__ajax({
url:'/erpproduct/sortsize/ajax/delete',
data:{sortId:_sortid,sizeId:_sizeid}
},function(){
g.reload();
$("#addAttr").modal('hide');
new common.dropDown({
el:"#sizeId",
ajax:"sortsize"
});
});
$(document).on("click",".add-attr-btn",function(){
var data={sortId:window.menuid,sizeId:$("#sizeId").val(),orderBy:$("#orderBy").val()};
if(!data.sortId){
alert("尺码不可为空");
return;
}
if(!~data.sizeId){
alert("尺码属性不可为空");
return;
}
if(!data.orderBy){
alert("排序不可为空");
return;
}
__ajax({
url:'/erpproduct/sortsize/ajax/add',
data:data
},function(){
g.reload();
$("#addAttr").modal('hide');
$(document).on("click",".delbtn",function(){
var item=g.rows[$(this).data("index")];
common.dialog.confirm("温馨提示","你确定要删除吗?",function(){
common.util.__ajax({
url:'/erpproduct/sortsize/ajax/delete',
data:{sortId:item.sortId,sizeId:item.sizeId}
},function(){
g.reload();
});
});
});
}
\ No newline at end of file
... ...
... ... @@ -34,7 +34,7 @@ exports.init = function() {
},
columns:[
{display:"供应商",name:"supplierName"},
{display:"更新时间",name:"foundTime"},
{display:"更新时间",name:"updateTime"},
{display:"最近操作",name:"operations",hidden:btnAuthority.columnsHidOper,render:function(item){
return ENUM.operations[item.operations];
}},
... ...
<<<<<<< HEAD
ul{margin-top:0}.admin-icon-yellow{color:#ffbe40}.admin-header{font-size:1.4rem;margin-bottom:0}.admin-header-list a:hover :after{content:none}.admin-main{background:#f3f3f3}.admin-menu{position:fixed;z-index:10;bottom:30px;right:20px}.admin-sidebar{width:260px;min-height:100%;float:left;border-right:1px solid #cecece}.admin-sidebar-list{margin-bottom:0}.admin-sidebar-list li a{color:#5c5c5c;padding-left:24px}.admin-sidebar-list li:first-child{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}.admin-sidebar-sub li:first-child{border-top:1px solid #dedede}.admin-sidebar-panel{margin:10px}.admin-content{width:auto;overflow:hidden;height:100%;background:#fff}.admin-content-list{border:1px solid #e9ecf1;margin-top:0}.admin-content-list li{border:1px solid #e9ecf1;border-width:0 1px;margin-left:-1px}.admin-content-list li:first-child{border-left:none}.admin-content-list li:last-child{border-right:none}.admin-content-table a{color:#535353}.admin-content-file{margin-bottom:0;color:#666}.admin-content-file p{margin:0 0 5px 0;font-size:1.4rem}.admin-content-file li{padding:10px 0}.admin-content-file li:first-child{border-top:none}.admin-content-file li:last-child{border-bottom:none}.admin-content-file li .am-progress{margin-bottom:4px}.admin-content-file li .am-progress-bar{line-height:14px}.admin-content-task{margin-bottom:0}.admin-content-task li{padding:5px 0;border-color:#eee}.admin-content-task li:first-child{border-top:none}.admin-content-task li:last-child{border-bottom:none}.admin-task-meta{font-size:1.2rem;color:#999}.admin-task-bd{font-size:1.4rem;margin-bottom:5px}.admin-content-comment{margin-bottom:0}.admin-content-comment .am-comment-bd{font-size:1.4rem}.admin-content-pagination{margin-bottom:0}.admin-content-pagination li a{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}}@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 0.3s ease;transition:background-color 0.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-info{margin-bottom:15px}.user-info .am-progress{margin-bottom:4px}.user-info p{margin:5px}.user-info-order{font-size:1.4rem}.error-log .am-pre-scrollable{max-height:40rem}.table-main{font-size:1.4rem;padding:.5rem}.table-main button{background:#fff}.table-check{width:30px}.table-id{width:50px}@media only screen and (max-width: 640px){.table-select{margin-top:10px;margin-left:5px}}.gallery-list li{padding:10px}.gallery-list a{color:#666}.gallery-list a:hover{color:#3bb4f2}.gallery-title{margin-top:6px;font-size:1.4rem}.gallery-desc{font-size:1.2rem;margin-top:4px}.page-404{background:#fff;border:none;width:200px;margin:0 auto}.fixed-layout,.fixed-layout body{height:100%;overflow:hidden}.fixed-layout .admin-header{position:fixed;top:0;left:0;right:0;z-index:1500}.fixed-layout .admin-main{position:relative;height:100%;padding-top:51px}.fixed-layout .admin-content,.fixed-layout .admin-sidebar{height:100%;overflow-x:hidden;overflow-y:scroll}.fixed-layout .admin-sidebar.am-active{z-index:1600}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}.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);border-radius:5px;box-shadow:0 5px 10px rgba(0,0,0,0.2);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}.datepicker.dropdown-menu td{padding:4px 5px}.datepicker table{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}.datepicker td{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}.datepicker td.old,.datepicker td.new{color:#999}.datepicker td span.active{background:#2ba6cb}.datepicker td.day.disabled{color:#ccc}.datepicker th{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}.datepicker th.date-switch{width:145px}.datepicker th span.active{background:#2ba6cb}.datepicker .cw{font-size:10px;width:12px;padding:0 2px 0 5px;vertical-align:middle}.datepicker.days div.datepicker-days{display:block}.datepicker.months div.datepicker-months{display:block}.datepicker.years div.datepicker-years{display:block}.datepicker thead tr:first-child th{cursor:pointer}.datepicker thead tr:first-child th.cw{cursor:default;background-color:transparent}.datepicker tfoot tr:first-child th{cursor:pointer}.datepicker-inline{width:220px}.datepicker-rtl{direction:rtl}.datepicker-rtl table tr td span{float:right}.datepicker-dropdown{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}.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}.datepicker>div,.datepicker-dropdown::before,.datepicker-dropdown::after{display:none}.datepicker-close{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}.panel-default .panel-heading{border-top:1px solid #e7e7e7}.red{color:red;font-family:bold}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:0 !important}.show-grid{padding:10px}.brandBtn-group{width:150px;float:left;margin-right:8px}.brandBtn-group-lg{width:280px}.contentpanel td a{margin:0 3px}.mainwrapper .toggle-table tr{cursor:pointer}.mainwrapper .toggle-table tr.level1 td:nth-of-type(1){text-indent:2px}.mainwrapper .toggle-table tr.level2 td:nth-of-type(1){text-indent:15px}.mainwrapper .toggle-table tr.level3 td:nth-of-type(1){text-indent:30px}.pattrscroll{background:#F7F7F7}.pattrscroll ul{padding-left:0}.pattrscroll li{cursor:pointer}.mainwrapper .list-group-item.level1{text-indent:2px}.mainwrapper .list-group-item.level2{text-indent:15px}.mainwrapper .list-group-item.level3{text-indent:30px}.attr-item-active{background:#428bca;color:#fff}.pannel-scroll{height:500px;overflow-y:scroll;overflow-x:hidden}.attr-select{display:block;height:40px;line-height:40px;border:1px solid #ccc;border-radius:3px}#limit-table-box table{vertical-align:middle}#limit-table-box table th,#limit-table-box table td{text-align:center;vertical-align:middle}#limit-table-box table div.checkbox label{height:13px}#limit-table-box table .cover-img{width:100px}#limit-table-box table .width50{width:50px;text-align:center}.height40{height:40px;line-height:40px}.edit-cover-img{width:100px;margin:0 15px;float:left}.quota-text,.quota-img,.quota-video{width:300px;margin-bottom:15px}.quota-text img,.quota-img img,.quota-video img{width:100%}.panel-input{display:inline-block;width:100%}.panel-col,.panel-col2{float:left;width:150px;margin:0 10px 0 0}.panel-col2{width:280px}
=======
ul{margin-top:0}.admin-icon-yellow{color:#ffbe40}.admin-header{font-size:1.4rem;margin-bottom:0}.admin-header-list a:hover :after{content:none}.admin-main{background:#f3f3f3}.admin-menu{position:fixed;z-index:10;bottom:30px;right:20px}.admin-sidebar{width:260px;min-height:100%;float:left;border-right:1px solid #cecece}.admin-sidebar-list{margin-bottom:0}.admin-sidebar-list li a{color:#5c5c5c;padding-left:24px}.admin-sidebar-list li:first-child{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}.admin-sidebar-sub li:first-child{border-top:1px solid #dedede}.admin-sidebar-panel{margin:10px}.admin-content{width:auto;overflow:hidden;height:100%;background:#fff}.admin-content-list{border:1px solid #e9ecf1;margin-top:0}.admin-content-list li{border:1px solid #e9ecf1;border-width:0 1px;margin-left:-1px}.admin-content-list li:first-child{border-left:none}.admin-content-list li:last-child{border-right:none}.admin-content-table a{color:#535353}.admin-content-file{margin-bottom:0;color:#666}.admin-content-file p{margin:0 0 5px 0;font-size:1.4rem}.admin-content-file li{padding:10px 0}.admin-content-file li:first-child{border-top:none}.admin-content-file li:last-child{border-bottom:none}.admin-content-file li .am-progress{margin-bottom:4px}.admin-content-file li .am-progress-bar{line-height:14px}.admin-content-task{margin-bottom:0}.admin-content-task li{padding:5px 0;border-color:#eee}.admin-content-task li:first-child{border-top:none}.admin-content-task li:last-child{border-bottom:none}.admin-task-meta{font-size:1.2rem;color:#999}.admin-task-bd{font-size:1.4rem;margin-bottom:5px}.admin-content-comment{margin-bottom:0}.admin-content-comment .am-comment-bd{font-size:1.4rem}.admin-content-pagination{margin-bottom:0}.admin-content-pagination li a{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}}@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;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-info{margin-bottom:15px}.user-info .am-progress{margin-bottom:4px}.user-info p{margin:5px}.user-info-order{font-size:1.4rem}.error-log .am-pre-scrollable{max-height:40rem}.table-main{font-size:1.4rem;padding:.5rem}.table-main button{background:#fff}.table-check{width:30px}.table-id{width:50px}@media only screen and (max-width: 640px){.table-select{margin-top:10px;margin-left:5px}}.gallery-list li{padding:10px}.gallery-list a{color:#666}.gallery-list a:hover{color:#3bb4f2}.gallery-title{margin-top:6px;font-size:1.4rem}.gallery-desc{font-size:1.2rem;margin-top:4px}.page-404{background:#fff;border:none;width:200px;margin:0 auto}.fixed-layout,.fixed-layout body{height:100%;overflow:hidden}.fixed-layout .admin-header{position:fixed;top:0;left:0;right:0;z-index:1500}.fixed-layout .admin-main{position:relative;height:100%;padding-top:51px}.fixed-layout .admin-content,.fixed-layout .admin-sidebar{height:100%;overflow-x:hidden;overflow-y:scroll}.fixed-layout .admin-sidebar.am-active{z-index:1600}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}.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);border-radius:5px;box-shadow:0 5px 10px rgba(0,0,0,0.2);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}.datepicker.dropdown-menu td{padding:4px 5px}.datepicker table{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}.datepicker td{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}.datepicker td.old,.datepicker td.new{color:#999}.datepicker td span.active{background:#2ba6cb}.datepicker td.day.disabled{color:#ccc}.datepicker th{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}.datepicker th.date-switch{width:145px}.datepicker th span.active{background:#2ba6cb}.datepicker .cw{font-size:10px;width:12px;padding:0 2px 0 5px;vertical-align:middle}.datepicker.days div.datepicker-days{display:block}.datepicker.months div.datepicker-months{display:block}.datepicker.years div.datepicker-years{display:block}.datepicker thead tr:first-child th{cursor:pointer}.datepicker thead tr:first-child th.cw{cursor:default;background-color:transparent}.datepicker tfoot tr:first-child th{cursor:pointer}.datepicker-inline{width:220px}.datepicker-rtl{direction:rtl}.datepicker-rtl table tr td span{float:right}.datepicker-dropdown{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}.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}.datepicker>div,.datepicker-dropdown::before,.datepicker-dropdown::after{display:none}.datepicker-close{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}.panel-default .panel-heading{border-top:1px solid #e7e7e7}.red{color:red;font-family:bold}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:0 !important}.show-grid{padding:10px}.brandBtn-group{width:150px;float:left;margin-right:8px}.brandBtn-group-lg{width:280px}.contentpanel td a{margin:0 3px}.mainwrapper .toggle-table tr{cursor:pointer}.mainwrapper .toggle-table tr.level1 td:nth-of-type(1){text-indent:2px}.mainwrapper .toggle-table tr.level2 td:nth-of-type(1){text-indent:15px}.mainwrapper .toggle-table tr.level3 td:nth-of-type(1){text-indent:30px}.pattrscroll{background:#F7F7F7}.pattrscroll ul{padding-left:0}.pattrscroll li{cursor:pointer}.mainwrapper .list-group-item.level1{text-indent:2px}.mainwrapper .list-group-item.level2{text-indent:15px}.mainwrapper .list-group-item.level3{text-indent:30px}.attr-item-active{background:#428bca;color:#fff}.pannel-scroll{height:500px;overflow-y:scroll;overflow-x:hidden}.attr-select{display:block;height:40px;line-height:40px;border:1px solid #ccc;border-radius:3px}#limit-table-box table{vertical-align:middle}#limit-table-box table th,#limit-table-box table td{text-align:center;vertical-align:middle}#limit-table-box table div.checkbox label{height:13px}#limit-table-box table .cover-img{width:100px}#limit-table-box table .width50{width:50px;text-align:center}.height40{height:40px;line-height:40px}.edit-cover-img{width:100px;margin:0 15px;float:left}.quota-text,.quota-img,.quota-video{width:300px;margin-bottom:15px}.quota-text img,.quota-img img,.quota-video img{width:100%}.panel-input{display:inline-block;width:100%}.panel-col,.panel-col2{float:left;width:150px;margin:0 10px 0 0}.panel-col2{width:280px}
>>>>>>> bbb1667942fd21ba83e4ef9d22f8493813c4da14
... ...
... ... @@ -10,7 +10,7 @@ exports.res = [{
isJsonRaw:true,
data: {
addTitle:"添加尺码",
sortsize:true,
model:'{"name":"尺码"}',
gridurl:"/erpproduct/sortsize/ajax/index"
},
src:'/sortsize/index'
... ... @@ -62,7 +62,7 @@ exports.res = [{
isJsonRaw:true,
data: {
addTitle:"添加尺码属性",
sortattribute:true,
model:'{"name":"尺码属性"}',
gridurl:"/erpproduct/sortattribute/ajax/index"
},
src:'/sortsize/attri'
... ... @@ -74,9 +74,10 @@ exports.res = [{
isJsonRaw:true,
params:[
{name:"page",type:"number"},
{name:"size",type:"number"}
{name:"size",type:"number"},
{name:"sortId",type:"number"}
]
},{//删除品类关联尺码属性接口【待验证,接口没有
},{//删除品类关联尺码属性接口【待验证】
route: '/erpproduct/sortattribute/ajax/delete',
method: 'POST',
url: '/sortAttribute/delete',
... ... @@ -96,7 +97,7 @@ exports.res = [{
{name:"attributeId",type:"number"},
{name:"orderBy",type:"number"}
]
},{//添加品类关联尺码属性接口【验证成功
},{//添加品类关联尺码属性接口【验证通过
route: '/erpproduct/sortattribute/ajax/automatic',
method: 'POST',
url: '/product/querySizeAttributesByName',
... ...
... ... @@ -62,25 +62,24 @@ exports.res = [{
url: '/supplier/supplier/getCreateSupplierList',
isJsonRaw:true,
params: [
{name: 'id', type: 'String'},
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'},
{name: 'id', type: 'String'},
{name: 'status', type: 'String'},
{name: 'timeSort', type: 'String'},
{name:'isFreeze',type:'String'}
{name: 'timeSort', type: 'String'}
]
},{
//创建供应商列表 -> 筛选ajax
//供应商列表 -> 筛选ajax
route: '/supplier/create/getManageSupplierList',
method: 'POST',
url: '/supplier/supplier/getManageSupplierList',
isJsonRaw:true,
params: [
{name: 'id', type: 'String'},
{name: 'curPage', type: 'Number'},
{name: 'pageSize', type: 'Number'},
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'},
{name: 'status', type: 'String'},
{name: 'timeSort', type: 'String'}
{name: 'id', type: 'String'},
{name:'isFreeze',type:'String'}
]
},{
//创建供应商列表 -> 筛选ajax
... ... @@ -89,11 +88,9 @@ exports.res = [{
url: '/supplier/supplier/getAuditSupplierList',
isJsonRaw:true,
params: [
{name: 'id', type: 'String'},
{name: 'curPage', type: 'Number'},
{name: 'pageSize', type: 'Number'},
{name: 'status', type: 'String'},
{name: 'timeSort', type: 'String'}
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'},
{name: 'id', type: 'String'}
]
},
{//修改供应商
... ...
... ... @@ -6,15 +6,19 @@ 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));
// 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:"请求类型错误"});
// }
res.json({
"code":200,
"data" : "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=1444256491,538988776&fm=80",
"message":"success"
});
}else{
res.json({code:"500",message:"请求类型错误"});
}
//方法2
// req.pipe(request.post(domain+'/fileupload/upload'))
// .on('error', onerror)
... ...
... ... @@ -36,7 +36,7 @@
<div class="col-md-9">
<div class="panel panel-default">
<div class="panel-heading noborder">
<button class="btn btn-success model-attr-btn" disabled data-toggle="modal" data-target="#addAttr">
<button id="btn-add" class="btn btn-success model-attr-btn" disabled >
<i class="glyphicon-plus"></i>{{addTitle}}
</button>
</div>
... ... @@ -46,68 +46,38 @@
</div>
</div>
</div>
<input type="hidden" id="model" value="{{model}}" />
<!--模态框-->
<div class="modal fade" id="addAttr" tabindex="-1" role="dialog" aria-labelledby="addAttr">
<div class="modal-dialog" role="document">
<div class="modal-content">
<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">{{addTitle}}</h4>
</div>
<div class="modal-body">
<form id="add-attr-form" class="form-horizontal form-bordered" method="post" action="/product/attr/add">
<div class="form-group">
<label class="col-md-3 control-label">
当前分类<i>*</i>
</label>
<div class="col-md-6">
<input id="sortName" class="form-control" type="text" placeholder="属性名称" required readonly>
</div>
</div>
{{#sortsize}}
<div class="form-group">
<label class="col-md-3 control-label">
尺码<i>*</i>
</label>
<script type="text/template" id="template">
<div class="form-horizontal">
<div class="form-group">
<label class="col-md-3 control-label">
当前分类<i>*</i>
</label>
<div class="col-md-6">
<select id="sizeId" class="attr-select width300" data-placeholder="尺码" required>
<option value="-1">请选择</option>
</select>
</div>
</div>
{{/sortsize}}
{{#sortattribute}}
<div class="form-group">
<label class="col-md-3 control-label">
尺码属性属性<i>*</i>
</label>
<div class="col-md-6">
<select id="sizeId" class="attr-select width300" data-placeholder="尺码属性" required>
<option value="-1">请选择</option>
</select>
</div>
</div>
{{/sortattribute}}
<div class="col-md-6">
<input id="sortName" class="form-control" type="text" placeholder="属性名称" value="{sortname}" required readonly>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">
{name}<i>*</i>
</label>
<div class="form-group">
<label class="col-md-3 control-label">
排序<i>*</i>
</label>
<div class="col-md-6">
<select id="sizeId" class="attr-select width300" data-placeholder="{name}" required>
<option value="-1">请选择</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">
排序<i>*</i>
</label>
<div class="col-md-6">
<input id="orderBy" class="form-control width300" value="" type="number" placeholder="ID" required>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default m-t-20" data-dismiss="modal">关闭</button>
<button type="button" class="add-attr-btn btn btn-primary m-t-20">添加</button>
</div>
<div class="col-md-6">
<input id="orderBy" class="form-control width300" value="" type="number" placeholder="ID" required>
</div>
</div>
</div>
</script>
... ...
... ... @@ -81,9 +81,9 @@
</div>
<div class="form-group">
<label class="col-sm-2 control-label">法人身份证电子版 </label>
<label class="col-sm-2 control-label">法人身份证电子版<span class="red">*</span> </label>
<div class="col-sm-8">
<input type="file" id="legalIdentityCard" name="legalIdentityCard" value="{{legalIdentityCard}}">
<input type="file" id="legalIdentityCard" name="legalIdentityCard" value="{{legalIdentityCard}}" required placeholder="法人身份证电子版">
</div>
</div>
... ... @@ -95,26 +95,44 @@
</div>
<div class="form-group">
<label class="col-sm-2 control-label">营业执照电子版 </label>
<label class="col-sm-2 control-label">营业执照电子版 <span class="red">*</span></label>
<div class="col-sm-8">
<input type="file" id="industryLicense" name="industryLicense" value="{{industryLicense}}">
<input type="file" id="businessLicense" name="businessLicense" value="{{businessLicense}}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">经营许可证 </label>
<label class="col-sm-2 control-label">组织机构代码证<span class="red">*</span></label>
<div class="col-sm-8">
<input type="file" id="businessLicensePic" name="businessLicensePic" value="{{businessLicensePic}}">
<input type="file" id="businessLicensePic" name="businessLicensePic" value="{{businessLicensePic}}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">税务登记证 </label>
<label class="col-sm-2 control-label">税务登记证<span class="red">*</span></label>
<div class="col-sm-8">
<input type="file" id="fortaxpayerQualificationCertificate" name="fortaxpayerQualificationCertificate" value="{{fortaxpayerQualificationCertificate}}">
<input type="file" id="taxCertificate" name="taxCertificate" value="{{taxCertificate}}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">开户许可证<span class="red">*</span></label>
<div class="col-sm-8">
<input type="file" id="accountOpeningLicense" name="accountOpeningLicense" value="{{accountOpeningLicense}}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">纳税人资格证明</label>
<div class="col-sm-8">
<input type="file" id="taxpayerQualificationCertificate" name="taxpayerQualificationCertificate" value="{{taxpayerQualificationCertificate}}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">行业许可证</label>
<div class="col-sm-8">
<input type="file" id="industryLicense" name="industryLicense" value="{{industryLicense}}" required>
</div>
</div>
<div class="form-group">
... ... @@ -125,10 +143,13 @@
</div>
<div class="form-group">
<label class="col-sm-2 control-label">公司联系电话 <span class="red">*</span></label>
<label class="col-sm-2 control-label">公司联系电话
<p><span class="red">注:与联系人电话至少填一个</span></p>
</label>
<div class="col-sm-8">
<input type="text" id="contactPhone" placeholder="请填写公司联系电话" class="form-control" required value="{{contactPhone}}" pattern="/^13[0-9]{9}$/">
<input type="text" id="contactPhone" placeholder="请填写公司联系电话" class="form-control" required value="{{contactPhone}}" >
</div>
<!--pattern="/^13[0-9]{9}$/"-->
</div>
... ... @@ -175,14 +196,14 @@
</div>
<div class="form-group">
<label class="col-sm-2 control-label">开户行</label>
<label class="col-sm-2 control-label">开户行<span class="red">*</span></label>
<div class="col-sm-8">
<input type="text" id="bankName" placeholder="请填写开户行" class="form-control" value="{{bankName}}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">开户账号</label>
<label class="col-sm-2 control-label">开户账号<span class="red">*</span></label>
<div class="col-sm-8">
<input type="text" id="bankAccount" placeholder="请填写开户账号" class="form-control" value="{{bankAccount}}">
</div>
... ...