Authored by lore-w

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

... ... @@ -16,4 +16,11 @@ require('./js/brand/index');
require('./js/product/add');
require('./js/product/index');
require('./js/store/adminedit');
require('./js/store/adminindex');
require('./js/store/examine');
require('./js/store/indexlist');
require('./js/store/info');
module.exports = demo;
\ No newline at end of file
... ...
... ... @@ -3,22 +3,23 @@ var edit=require('../common/edit');
exports.init = function() {
var e=new edit("#basicForm");
// e.on("validate",function(){
// });
e.init();
$("#save_brand").click(function(){
e.submit($("#basicForm").attr("action"),function(option){
option.success=function(res){
res=res.data;
if(res.code=="200"){
location.href="/erpproduct/brands/index";
e.$tip("修改成功", function() {
location.href="/erpproduct/brands/index"
}, 'growl-success');
}else{
e.$tip("提交失败");
e.$tip(res.message);
}
return false;
},
option.error=function(res){
e.$tip("提交失败");
e.$tip(res.message);
}
});
return false;
... ...
... ... @@ -26,12 +26,12 @@ exports.init = function() {
format: 'yyyy-mm-dd'
});
var btnAuthority=JSON.parse($("#btnAuthority").val());
var g = new grid({
el: '#basicTable',
size: 50,
size: 10,
parms: function() {
return {
... ... @@ -39,7 +39,7 @@ exports.init = function() {
status: $.trim($('#status').val()) || '',
brandLevel: $.trim($('#brand-level').val()) || '',
startTime: $.trim($('#starttime').val()) || '',
endTime: $.trim($('#endtime').val()) || '',
endTime: $.trim($('#endtime').val()) || ''
};
},
columns: [
... ... @@ -50,7 +50,11 @@ exports.init = function() {
{display: '英文名称', name: "brandNameEn"},
{display: '品牌级别', name: "brandLevel"},
{display: '调性分', name: "brandTonality"},
{display: '创建时间', name: "createTime"},
{display: '创建时间', name: "createTime", render: function(item) {
var date = new Date(item.createTime * 1000);
return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' '
+ date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();
}},
{display: '操作', name:"status", render: function(items) {
var HtmArr = [];
... ... @@ -71,9 +75,16 @@ exports.init = function() {
g.init($("#gridurl").val());
$("#filter-btn").click(function(){
g.reload();
location.hash = '';
g.reload({
page: 1
});
});
/*$(window).on('hashchange', function() {
g.reload();
});
*/
function operateAjax(options, callback) {
$.ajax({
type: 'POST',
... ...
/**
* Created by wangqianjun on 16/2/2.
*/
var grid=require('../common/grid');
exports.init = function() {
var g=new grid({
el:"#basicTable",
//parms:function(){
//
// return {
// id:!!~$.trim($('#supplier-name').val())?$('#supplier-name').val():"",
// status:!!~$.trim($('#status').val())?$('#status').val():"",
// timeSort:!!~$.trim($('#time-sort').val())?$('#time-sort').val():"",
// isFreeze:!!~$.trim($('#isFreeze').val())?$('#isFreeze').val():""
// };
//},
columns:[
{display:"SKN",name:"skn"},
{display:"市场价",name:"marketPrice"}
]
});
// 路由
g.init('/erpproduct/price/index1');
}
\ No newline at end of file
... ...
... ... @@ -26,13 +26,12 @@ 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 pagination-lg'></ul></nav>"
+"<nav><ul class='pagination'></ul></nav>"
}
this.options=$.extend({}, defaults, options);
this.grid=$(options.el);
}
grid.prototype={
constructor:grid,
template: function () {
... ... @@ -94,13 +93,41 @@ grid.prototype={
var g = this, p = this.options;
if (!p.page) p.page = 1;
var param = {};
//urlArr = location.hash.substring(1).split('&&');
if (p.parms) {
if (typeof (p.parms) == "function") {
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 !== '') {
param[key] = value;
}
});*/
param.page = p.page;
param.size = p.size;
console.log(param);
var html = '';
$.each(param, function(key, value) {
if (value !== '') {
html += key + '=' + value + '&&';
}
});
location.hash = html;
return param;
},
__pagination:function(pagination){
... ... @@ -111,11 +138,11 @@ grid.prototype={
pages: pagination.total,
currentPage: pagination.page,
edges: 1,
hrefTextPrefix: '#page-',
hrefTextPrefix: '#page=',
ellipsePageSet: false,
onPageClick: function(pageNumber, event) {
p.page=pageNumber;
g.__bodyload();
p.page = pageNumber;
g.renderBody();
return false;
}
});
... ... @@ -163,7 +190,7 @@ grid.prototype={
},
success: function (res) {
var data = res.data.data;
console.log(res);
g.__pagination({total:data.totalPage,page:data.page});
g.__bodyClomun(data.list);
// setpage(res);
... ... @@ -234,9 +261,17 @@ grid.prototype={
}
return content || "";
},
reload:function(){
reload:function(param){
var g = this, p = this.options;
p.page=1;
if (param) {
$.each(param, function(key, value) {
p[key] = value;
});
}
//p.page=1;
g.__bodyload();
}
... ...
... ... @@ -41,5 +41,22 @@ var uploader = function(option){
}
}
});
// $('.js-add-image').fileupload({
// url:'http://upload.static.yohobuy.com',
// dataType: 'html',
// forceIframeTransport: true,
// formData:{pid:0, project:'', is_public:'N', tags:'',exporttype:"html"},
// acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
// autoUpload: false,
// maxFileSize: 5000000,
// add: function (e, data) {
// for(k in data.files){
// console.log(data.files[k]);
// }
// }
// });
}
module.exports=uploader;
\ No newline at end of file
... ...
... ... @@ -72,7 +72,8 @@ exports.init = function() {
});
e.on("bind",function(){
$("input:checkbox[name=promotionInfo-type]").change(function(){
$discount = $("#promotionInfo-action-discount");
$("input:radio[name=promotionInfo-type]").change(function(){
var $checked=$(this);
if ($checked.prop("name") == "promotionInfo-type") {
if ($checked.val() == "3") {
... ... @@ -131,7 +132,9 @@ exports.init = function() {
option.success=function(res){
res=res.data;
if(res.code=="200"){
location.href="/coupon/index";
e.$tip('修改成功',function(){
location.href="/coupon/index";
},'growl-success');
}else{
e.$tip(res.message);
}
... ...
... ... @@ -89,6 +89,8 @@ exports.init = function() {
var btnAuthority = JSON.parse($("#btnAuthority").val());
var g=new grid({
el: '#basicTable',
size: 10,
... ... @@ -96,7 +98,7 @@ exports.init = function() {
return {
batchNo: $.trim($('#filter-id').val()) ||"",
status: parseInt($('.list-tabs').find('.active').data('status')) ||"",
status: parseInt($('.list-tabs').find('.active').data('status')),
name: $.trim($('#filter-name').val()) ||"",
reqDepartment:$.trim($('#filter-dep').val()) ||""
};
... ... @@ -109,7 +111,7 @@ exports.init = function() {
return '<p>名称:' + item.name + '</p><p>次数' + item.limitTimes + '</p><p>部门:' + item.reqDepartment + '</p>';
}},
{display: '使用期限', name: "name", render: function(item) {
return '<p>' + item.limitDateFrom + '</p><p>' + item.limitDateTo + '</p>'
return '<p class="audit-time">' + item.limitDateFrom + '</p><p>' + item.limitDateTo + '</p>'
}},
{display: '优惠码说明', name: "describe"},
{display: '申请人', name: "staff"},
... ... @@ -121,7 +123,6 @@ exports.init = function() {
return html;
}},
{display:"操作",name:"operate",render:function(items){
console.log(this);
var HtmArr=[];
if(btnAuthority.look){
HtmArr.push('<a href="/coupon/info/'+ items.id+'" class="btn btn-info btn-xs">查看详情</a>');
... ... @@ -150,7 +151,10 @@ exports.init = function() {
name: $.trim($('#filter-name').val()),
reqDepartment:$.trim($('#filter-dep').val())
}, parseInt($('.list-tabs').find('.active').data('status')))
g.reload();
location.hash = '';
g.reload({
page: 1
});
});
//作废事件
... ... @@ -213,7 +217,7 @@ exports.init = function() {
//发放列表点击事件
$listBtn.off('click.sendPromotion').on('click.sendPromotion', function() {
var auditTime = $(that).parents('td').siblings('.time').find('p').eq(0).text();
var auditTime = $(that).parents('td').siblings().find('.audit-time').text();
$.ajax({
type: 'post',
... ... @@ -223,7 +227,9 @@ exports.init = function() {
auditTime: auditTime
},
success: function(res) {
if (res.data.data.length === 0) {
var data = res.data.data.list;
if (data.length === 0) {
alert('暂无时间交叉的优惠码');
} else {
$('#send-modal').modal({
... ... @@ -233,7 +239,7 @@ exports.init = function() {
var tpl = Handlebars.compile($('#send-tpl').html());
$('#send-modal tbody').html(tpl({
data: res.data.data
data: data
}));
}
... ... @@ -251,8 +257,11 @@ exports.init = function() {
$('#back-modal').on('click', '.btn-primary', function() {
var reason = $('#back-reason').val();
console.log(reason);
if (reason === '' || $.trim(reason) === '') {
alert('请填写驳回原因');
return;
}
$.ajax({
type: 'post',
... ...
... ... @@ -10,12 +10,12 @@ var dropDown = require('../common/dropDown');
var selectOption =
'{{# data}}' +
'<option value="{{id}}">{{sortName}}</option>' +
'<option value="{{id}}" {{# select}}selected{{/ select}}>{{sortName}}</option>' +
'{{/ data}}';
var optionStr = Handlebars.compile(selectOption);
function getAllSort(callback) {
function getAllSort(callback, selectId) {
$.ajax({
url: '/product/class/queryAllProductSortList',
type: 'POST',
... ... @@ -26,9 +26,15 @@ function getAllSort(callback) {
data = d.data.data,
sortLen = data.length,
i;
var resData;
for (i = 0; i < sortLen; i++) {
if (!data[i].child) {
if (data[i].id === selectId) {
data[i].select = true;
}
firstSort.push(data[i]);
}
}
... ... @@ -37,7 +43,7 @@ function getAllSort(callback) {
});
}
function getChildSort(id, callback) {
function getChildSort(id, callback, selectId) {
$.ajax({
url: '/product/class/queryProductSortList',
type: 'POST',
... ... @@ -47,64 +53,161 @@ function getChildSort(id, callback) {
}
}).then(function (d) {
callback(d);
});
}
var data = d.data.data;
var dataLen = data.length;
var i;
for (i = 0; i < dataLen; i++) {
exports.init = function () {
if (data[i].id === selectId) {
data[i].select = true;
}
}
new dropDown({
el:'.level-select'
callback(data);
});
}
// 页面初始化渲染一级菜单
var $editInput = $('#editId');
var editLevel = $editInput.attr('level');
var toNum = 1;
function createLevelOneOption(selectedId, callback) {
getAllSort(function (data) {
$('#parentSortId').after(optionStr({
data: data
}));
});
new dropDown({
el:'#firstSortId'
});
if (callback) {
callback();
}
}, selectedId*toNum);
}
// 选择一\二级菜单时渲染二\三级菜单
$('.level-select').change(function () {
function createLevelTwoOption(parentId, selectedId) {
var id = $(this).val();
var thisChild = $(this).attr('data-child');
getChildSort(parentId*toNum, function (data) {
$('#secondSortId').find('option:first').after(optionStr({
data: data
}));
new dropDown({
el:'#secondSortId'
});
if (!thisChild) {
return;
}, selectedId*toNum);
}
exports.init = function () {
console.log(editLevel);
// 编辑
if (editLevel) {
switch (editLevel) {
case "1":
createLevelOneOption($editInput.val(), function () {
getChildSort($editInput.val()*toNum, function (data) {
$('#secondSortId').find('option:first').after(optionStr({
data: data
}));
});
});
new dropDown({
el:'#secondSortId'
});
break;
case "2":
createLevelOneOption($editInput.attr('pid'), function () {
createLevelTwoOption($editInput.attr('pid'), $editInput.val());
});
break;
default :
break;
}
} else {
// 添加
getAllSort(function (data) {
$('#parentSortId').after(optionStr({
data: data
}));
});
// 选择一\二级菜单时渲染二
$('.level-select').change(function () {
var id = $(this).val()*toNum;
getChildSort(id, function (data) {
getChildSort(id, function (data) {
$('#' + thisChild).find('option:first').after(optionStr(data.data));
$('#childSortId').after(optionStr({
data: data
}));
});
});
});
new dropDown({
el:'#firstSortId'
});
new dropDown({
el:'#secondSortId'
});
}
// 添加品类表单验证
var newClassVerification = new edit("#new-class-form");
newClassVerification.init();
$(".new-class-btn").click(function(){
var id = $(this).attr('data-id');
var postUrl;
var $this = $(this);
var pid = $('#secondSortId').val();
var ppid = $('#firstSortId').val();
if (ppid*toNum) {
$('#parentId').val(ppid);
}
if (pid*toNum) {
$('#parentId').val(pid);
}
if (!!id) {
postUrl = '/product/updateProductSort'
postUrl = '/product/sort/update'
} else {
postUrl = $("#new-class-form").attr("action");
}
newClassVerification.submit(postUrl, function(option,that) {
option.beforeSend = function () {
$this.attr('disabled', 'disabled');
};
option.success=function(res){
console.log(res);
window.location.href = '/erpproduct/sort/index';
if (res.data.code === 200) {
newClassVerification.$tip('提交成功');
$this.removeAttr('disabled');
setTimeout(function () {
//window.location.href = '/erpproduct/sort/index';
}, 1000);
}
};
option.error=function(res){
... ...
... ... @@ -78,14 +78,16 @@ exports.init = function () {
$.ajax({
type: 'POST',
dataType: 'json',
url: '/product/class/update',
url: '/product/sort/update',
data: {
id: $target.closest('td').attr('data-id'),
status: status
}
}).then(function (data) {
if (data.code === 200) {
console.log(data);
if (data.data.code === 200) {
$target.attr('data-status', status);
if ($target.hasClass('btn-danger')) {
... ... @@ -105,8 +107,5 @@ exports.init = function () {
}
});
new dropDown({
el:'.level-select'
});
};
\ No newline at end of file
... ...
... ... @@ -16,8 +16,8 @@ exports.init=function(){
var g=new grid({
el:'#storeadmin_Tabel',
parms:function(){
var supplierid=$('#supplier-name').val(),
brandId = $('#brand-name').val();
var supplierid=!!~$.trim($('#supplier-name').val())?$('#supplier-name').val():"0",
brandId = !!~$.trim($('#brand-name').val())?$('#brand-name').val():"0";
return {
"supplierId":supplierid,
"brandId":brandId,
... ...
... ... @@ -27,10 +27,10 @@ exports.init = function() {
$('.Add').eq(type).append(inputAdd);
});
new dropDown({
el: "#store-type"
el: "#shopNature"
});
new dropDown({
el: "#store-model"
el: "#shopsType"
});
new dropDown({
el: "#brand-name",
... ... @@ -44,7 +44,7 @@ exports.init = function() {
var check = $(this).closest('tr').html();
var brand = check.split('<td>')[check.split('<td>').length - 2];
var supplier = check.split('<td>')[check.split('<td>').length - 1];
var table = '<tr><td>' + brand + '<td>' + supplier + '<td><button type="button" class="btn btn-danger btn-xs">删除</button></td></tr>';
var table = '<tr><td>' + brand + '<td>' + supplier + '<td><button type="button" class="delete btn btn-danger btn-xs">删除</button></td></tr>';
$('#updateBrand tbody').append(table);
}
})
... ... @@ -54,7 +54,7 @@ exports.init = function() {
var check = $(this).closest('tr').html();
var brand = check.split('<td>')[check.split('<td>').length - 2];
var supplier = check.split('<td>')[check.split('<td>').length - 1];
var table = '<tr><td>' + brand + '<td>' + supplier + '<td><button type="button" class="btn btn-danger btn-xs">删除</button></td></tr>';
var table = '<tr><td>' + brand + '<td>' + supplier + '<td><button type="button" class="delete btn btn-danger btn-xs">删除</button></td></tr>';
$('#updateBrand tbody').append(table);
}
})
... ... @@ -198,4 +198,7 @@ exports.init = function() {
}
})
})
$('#updateBrand').on('click','.delete',function(){
$(this).parents('tr').parent().remove()
})
}
\ No newline at end of file
... ...
... ... @@ -126,8 +126,12 @@ exports.init = function() {
g.init($("#gridurl").val());
$("#filter-btn").click(function(){
g.reload();
location.hash = '';
g.reload({
page: 1
});
});
$("#all-btn").click(function(){
$('#supplier-name').val("-1").trigger("change");
$('#status').val("-1").trigger("change");
... ...
... ... @@ -11,14 +11,14 @@ var env = process.env.NODE_ENV || 'development';
var config = {
'development':{
redis:null,
domain:'http://192.168.102.215:8080/platform'
domain:'http://192.168.102.202:8081/platform'
},
'test': {
redis: {
port:6379,
host:'localhost'
},
domain:'http://192.168.102.202:8081/platform'
domain:'http://192.168.102.215:8080/platform'
},
'preview': {
redis: {
... ...
/**
* Created by wangqianjun on 16/2/2.
*/
//接口主域
var env = process.env.NODE_ENV || 'development';
// exports.domain = 'http://192.168.102.205:18025';
var domain = {
development:'http://localhost:30012',
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: '/erpproduct/price/index',
method: 'GET',
view: 'pages/commodity/index',
src:'/commodity/index'
},{
route: '/erpproduct/price/index1',
method: 'POST',
url: '/interface/commodity/list',
isJsonRaw: true
}
];
\ No newline at end of file
... ...
... ... @@ -75,7 +75,7 @@ exports.res = [
name: 'auditTime',
type: 'String'
}
]
]
},
{
route: '/auditPromotion',
... ... @@ -165,7 +165,10 @@ exports.res = [
src:'/coupon/edit',
data:{
type:"info"
}
},
params: [
{name:"id",type:"String"}
]
},
{
route: '/checkPromotionCode',
... ...
... ... @@ -44,7 +44,7 @@ exports.res = [
]
},{
//产品管理>【品类列表ajax更新】
route: '/product/class/update',
route: '/product/sort/update',
method: 'POST',
url: '/product/updateProductSort',
isJsonRaw:true,
... ... @@ -59,14 +59,8 @@ exports.res = [
name: 'sortInitials',
type: 'String'
},{
name:'firstSortId',
type: 'String'
},{
name: 'secondSortId',
type: 'String'
},{
name: 'thirdSortId',
type: 'String'
name:'parentId',
type: 'Number'
},{
name: 'orderBy',
type: 'Number'
... ... @@ -81,10 +75,15 @@ exports.res = [
method: 'GET',
view: 'pages/product/new-class',
noApi:true,
src: '/product/add'
src: '/product/add',
data: {
data: {
status: 1
}
}
},{
//产品管理>【添加品类】ajax请求接口
route: '/product/class/addProductSort',
route: '/product/sort/addProductSort',
method: 'POST',
url: '/product/addProductSort',
isJsonRaw:true,
... ... @@ -99,14 +98,8 @@ exports.res = [
name: 'sortInitials',
type: 'String'
},{
name:'firstSortId',
type: 'String'
},{
name: 'secondSortId',
type: 'String'
},{
name: 'thirdSortId',
type: 'String'
name:'parentId',
type: 'Number'
},{
name: 'orderBy',
type: 'Number'
... ...
//接口主域
var env = process.env.NODE_ENV || 'development';
// exports.domain = 'http://192.168.102.205:18025';
var domain = {
// development:'http://localhost:30011',
// development:'http://172.16.6.246:8081/platform',
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.domain = require('../config/common.js').domain;
//路由配置
exports.res = [{
// 创建店铺页面渲染
... ... @@ -250,8 +235,6 @@ exports.res = [{
method: 'POST',
url:"/ShopsAdminRest/getUsersByIdentity",
isJsonRaw:true,
url:'/ShopsAdminRest/getAdminRelationDetailById',
src:'/store/index',
src:'/store/adminedit',
params:[
{name:"identity",type:"Number"}
... ...
/**
* Created by wangqianjun on 16/2/2.
*/
module.exports = {
//供应商查看,修改数据
'/interface/commodity/list':function(req, res){
res.json({
code: 200,
message:'请求成功',
data: {
list: [
{
"skn":"1",
//公司名称
"marketPrice":"123.00",
}
],
page: 1,
totalpage: 142,
size: 50,
total:1000
}
})
}
}
\ No newline at end of file
... ...
... ... @@ -217,7 +217,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">调性指数</label>
<div class="col-sm-2">
<input type="text" id="brandTonality" name="brandTonality" class="form-control" placeholder="调性指数" value="{{brandTonality}}">
<input type="text" id="brandTonality" name="brandTonality" class="form-control" pattern="/^((?!0)\d{1,2}|100)$/" placeholder="调性指数(范围:1-100)" value="{{brandTonality}}">
</div>
</div>
... ... @@ -228,7 +228,7 @@
<div class="panel-footer">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<a href="/erpproduct/brands/index" class="btn btn-default">取消</a>
<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>
... ...
... ... @@ -44,7 +44,7 @@
</select>
<input type="text" id="starttime" class="form-control panel-input hasDatepicker" name="start_time" placeholder="开始时间" value="">
<input type="text" id="endtime" class="form-control panel-input hasDatepicker" name="end_time" placeholder="结束时间" value="">
<a id="filter-btn" href="#page1" class="btn btn-info">筛选</a>
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="filter-all" href="/erpproduct/brands/index" class="btn btn-info">全部</a>
</div>
</div>
... ...
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="">供应商管理</a></li>
<li>{{pageTitle}}</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>{{pageTitle}}</h4>
</div>
</div>
</div>
</div>
</div>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<div class="row">
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="javascript:;" class="btn btn-info">全部</a>
</div>
</div>
</div>
<div class="panel panel-primary-head">
<div class="dataTables_wrapper no-footer" id="basicTable">
</div>
</div>
</div>
\ No newline at end of file
... ...
... ... @@ -200,7 +200,7 @@
<div class="panel-footer">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<a href="#" class="btn btn-default">取消</a>
<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>
... ...
... ... @@ -93,7 +93,7 @@
<div class="modal-body">
<p>您确定要驳回该申请吗?</p>
<label class="col-sm-3 control-label">*请填写原因</label>
<input id="cancel-reason" type="text" class="form-control" name="agreement-code" style="width:280px;">
<input id="back-reason" type="text" class="form-control" name="agreement-code" style="width:280px;">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
... ... @@ -123,7 +123,7 @@
</div>
<div class="modal fade" id="send-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-dialog modal-lg" 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>
... ... @@ -131,7 +131,7 @@
</div>
<div class="modal-body">
<div class="send-list">
<table class="coupon-send-table am-table am-table-bordered am-table-radius">
<table style="width:100%;" class="coupon-send-table am-table am-table-bordered am-table-radius">
<thead>
<tr class="am-primary">
<th>批次号</th>
... ... @@ -155,21 +155,20 @@
<script id="send-tpl" type="x-tmpl-handlebars">
\{{# data}}
<tr>
<td class="id"><a href="/couponinfo/\{{id}}">\{{batchNo}}</a></td>
<td class="info">
<td class="id" style="width: 20%;"><a href="/coupon/info/\{{id}}">\{{batchNo}}</a></td>
<td class="info" style="width: 30%;">
<p>名称:\{{name}}</p>
<p>次数:\{{limitTimes}}</p>
<p>部门:\{{reqDepartment}}</p>
</td>
<td class="time">
<td class="time" style="width: 20%;">
<p>\{{limitDateFrom}}</p>
<p>\{{limitDateTo}}</p>
</td>
<td class="describe">
<td class="describe" style="width: 22%;">
<p>\{{describe}}</p>
</td>
<td class="staff">\{{staff}}</td>
<td class="staff" style="width: 8%;">\{{staff}}</td>
</tr>
\{{/ data}}
</script>
... ...
... ... @@ -27,7 +27,7 @@
<div class="panel-body nopadding">
<form id="new-class-form" class="form-horizontal form-bordered" method="post" action="/product/class/addProductSort">
<form id="new-class-form" class="form-horizontal form-bordered" method="post" action="/product/sort/addProductSort">
<div class="form-group">
<label class="col-md-1 control-label">
物理类目<i>*</i>
... ... @@ -54,7 +54,7 @@
</label>
<div class="col-md-5">
<select id="firstSortId" class="level-select width300" required data-child="secondSortId" data-placeholder="">
<select id="firstSortId" class="level-select width300" data-placeholder="">
<option id="parentSortId" value="0">请选择</option>
</select>
</div>
... ... @@ -66,13 +66,13 @@
</label>
<div class="col-md-5">
<select id="secondSortId" class="level-select width300" required data-child="thirdSortId" data-placeholder="">
<option value="0">请选择</option>
<select id="secondSortId" class="level-select width300" data-placeholder="">
<option id="childSortId" value="0">请选择</option>
</select>
</div>
</div>
<div class="form-group">
<!--<div class="form-group">
<label class="col-md-1 control-label">
三级分类
</label>
... ... @@ -82,7 +82,7 @@
<option value="0">请选择</option>
</select>
</div>
</div>
</div>-->
<div class="form-group">
<label class="col-md-1 control-label">排序</label>
... ... @@ -96,20 +96,37 @@
<label class="col-md-1 control-label">状态</label>
<div class="col-md-5">
<div class="radio">
<label><input type="radio" value="1" name="status">关闭</label>
<label><input type="radio" value="1" name="status">开启</label>
</div>
<div class="radio">
<label><input type="radio" value="0" name="status">开启</label>
<label><input type="radio" value="0" name="status">关闭</label>
</div>
<input id="status" type="hidden" value="{{data.status}}" for="radio">
</div>
</div>
<!--隐藏值-->
<div class="form-group hidden">
<label class="col-md-1 control-label">ID</label>
<div class="col-md-5">
<input id="editId" class="form-control" value="{{data.id}}" level="{{data.sortLevel}}" pid="{{data.parentId}}" type="text">
</div>
</div>
<div class="form-group hidden">
<label class="col-md-1 control-label">parentID</label>
<div class="col-md-5">
<input id="parentId" class="form-control" value="" type="text">
</div>
</div>
</form>
</div>
<div class="panel-footer">
<button type="submit" class="btn btn-info btn-xs new-class-btn" data-id="{{data.id}}">保存</button>
<a href="/product/class/index" class="btn btn-default btn-xs">取消</a>
<a href="/erpproduct/sort/index" class="btn btn-default btn-xs">取消</a>
</div>
</div>
</div>
... ...
... ... @@ -56,7 +56,7 @@
<div class="col-sm-6">
<div class="input-group">
<input type="text" form="storeForm" name="shopDomain" id="shopDomain" class="form-control" value="{{ shopDomain}}" placeholder="店铺域名" aria-describedby="basic-addon2">
<span class="input-group-addon" id="basic-addon2">@example.com</span>
<span class="input-group-addon" id="basic-addon2">.yohobuy.com</span>
</div>
</div>
</div>
... ...
... ... @@ -55,12 +55,12 @@
<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-3">
<input type="text" class="form-control" jsaction="date:end:endOperateTime" id="beginOperateTime" placeholder="开始时间" value="{{beginOperateTime}}" readonly>
<input type="text" class="form-control" jsaction="date:end:endOperateTime" id="beginOperateTime" required placeholder="营业期限开始时间" value="{{beginOperateTime}}" readonly>
</div>
<div class="col-sm-3">
<input type="text" class="form-control" jsaction="date:start:beginOperateTime" id="endOperateTime" placeholder="结束时间" value="{{endOperateTime}}" readonly >
<input type="text" class="form-control" jsaction="date:start:beginOperateTime" id="endOperateTime" required placeholder="营业期限结束时间" value="{{endOperateTime}}" readonly >
</div>
<!-- readonly require-->
</div>
... ... @@ -156,7 +156,7 @@
<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="contactPhone" placeholder="请填写公司联系电话" class="form-control" required value="{{contactPhone}}">
<input type="text" id="contactPhone" placeholder="请填写公司联系电话" class="form-control" required value="{{contactPhone}}" pattern="/^13[0-9]{9}$/">
</div>
</div>
... ... @@ -226,7 +226,7 @@
<div class="panel-footer">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<a href="#" class="btn btn-default" onclick="javascript:history.go(-1);">取消</a>
<a href="javascript:;" class="btn btn-default" onclick="javascript:history.go(-1);">取消</a>
{{# add}}
<button type="submit" class="btn btn-info" data-loading-text="暂存中..." id="btnTemporary">暂存</button>
{{/ add}}
... ...