Authored by weiqingting

update

Showing 30 changed files with 1193 additions and 31 deletions
module.exports=function(app) {
/**/
app.get("/erpproduct/sortsize/index","baserule.CateSize","porattr_queryProductSortListByConf",function(pros){
this.$extend={
moduleName:'商品基础规则',
pageName:'品类关联尺码列表',
data:pros.data
}
})
app.post("/erpproduct/sortsize/ajax/index","catesize_querySizeListBySortId");
/*添加尺码接口【验证通过】*/
app.post("/erpproduct/sortsize/ajax/add","catesize_addSortSize");
/*删除单个品类尺码接口【待验证】*/
app.post("/erpproduct/sortsize/ajax/delete","catesize_deleteSortSize");
/*修改品类尺码排序接口*/
app.post("/product/updateSortSize","catesize_updateSortSize");
//************************品类尺码属性管理*****************************
app.get("/erpproduct/sortattribute/index","baserule.CateSizeAttr","porattr_queryProductSortListByConf",function(pros){
this.$extend={
moduleName:'商品基础规则',
pageName:'品类尺码属性',
data:pros.data
}
});
/*获取品类关联尺码属性列表【验证通过】*/
app.post("/erpproduct/sortattribute/ajax/index","catesize_queryList");
/*添加品类关联尺码属性接口【待验证】*/
app.post("/erpproduct/sortattribute/ajax/add","catesize_add");
/*删除品类关联尺码属性接口【待验证】*/
app.post("/erpproduct/sortattribute/ajax/delete","catesize_delete");
/*修改品类关联尺码属性接口【待验证】*/
app.post("/sortAttribute/updateOrderBy","catesize_updateOrderBy");
}
\ No newline at end of file
... ...
module.exports=function(app) {
app.get("/erpproduct/color/index","baserule.color.Index",function(pros){
this.$extend={
moduleName:'商品基础规则',
pageName:'颜色管理列表'
}
});
/*获取颜色列表*/
app.post("/erpproduct/product/colorList","color_queryProductColors");
/*获取单个颜色*/
app.post("/erpproduct/product/getColor","color_queryProductColor");
/*新增颜色页面渲染*/
app.get("/erpproduct/product/addColor","baserule.color.Edit",function(){
this.$extend={
moduleName:'商品基础规则',
pageName:'添加颜色'
}
});
/*新增颜色*/
app.post("/erpproduct/product/saveColor","color_addProductColor");
app.get("/erpproduct/product/addColor/:param","baserule.color.Edit",function(){
this.$extend={
moduleName:'商品基础规则',
pageName:'修改颜色'
}
});
/*修改颜色*/
app.post("/erpproduct/product/updatColor","color_updateProductColor");
}
\ No newline at end of file
... ...
module.exports=function(app) {
/*商品管理>【产品属性】页面渲染*/
app.get("/erpproduct/attribute/index","baserule.Porattr","porattr_queryProductSortListByConf",function(pros){
this.$extend={
moduleName:'商品基础规则',
pageName:'产品属性列表',
data:pros.data
}
});
/*商品管理>【产品属性ajax获取】*/
app.post("/product/attr/get","porattr_getAttr");
/*商品管理>【添加产品属性ajax】*/
app.post("/product/attr/add","porattr_addProductAttribute");
/*商品管理>【更新产品属性ajax】*/
app.post("/product/attr/update","porattr_updateProductAttribute");
/*商品管理【根据类目ID ajax查询属性列表】*/
app.post("/product/attr/queryProductAttributeList","porattr_queryProductAttributeList");
/*商品管理【根据类目ID ajax查询属性的详细信息】*/
app.post("/product/attr/getProductAttribute","porattr_getProductAttribute");
}
\ No newline at end of file
... ...
module.exports=function(app) {
/*产品管理【品类列表】页面渲染*/
app.get("/erpproduct/sizeattribute/index","baserule.SizeAttribute",function(){
this.$extend={
moduleName:'商品基础规则',
pageName:'品类关联实物测量属性列表'
}
});
/*列表数据*/
app.post("/erpproduct/sizeattribute/propertyList","sizeattribute_querySizeAttributeList");
/*添加尺码属性*/
app.post("/erpproduct/sizeattribute/propertyAdd","sizeattribute_addSizeAttribute");
/*修改尺码属性*/
app.post("/erpproduct/sizeattribute/propertyModify","sizeattribute_updateSizeAttribute");
}
\ No newline at end of file
... ...
module.exports=function(app) {
/*尺码库列表*/
app.get("/erpproduct/size/index","baserule.Sizelibrary",function(){
this.$extend={
moduleName:'商品基础规则',
pageName:'尺码库列表'
}
});
/*列表数据*/
app.post("/erpproduct/sizeattribute/sizeList","sizelibrary_querySizeList");
/*获取单个尺码*/
app.post("/erpproduct/size/getSize","sizelibrary_getSize");
/*新增尺码*/
app.post("/erpproduct/size/addSize","sizelibrary_addSize");
/*修改尺码*/
app.post("/erpproduct/size/updateSize","sizelibrary_updateSize");
}
\ No newline at end of file
... ...
module.exports={
namespace:"catesize",
apis:{
querySizeListBySortId:{
title:'querySizeListBySortId',
url: '/product/querySizeListBySortId',
params: [
{name: "sortId", type: "number"}
]
},
addSortSize:{
title:'添加尺码接口【验证通过】',
url: '/product/addSortSize',
params: [
{name: "sortId", type: "number"},
{name: "sizeId", type: "number"},
{name: "orderBy", type: "number"}
]
},
deleteSortSize:{
title:'删除单个品类尺码接口【待验证】',
url: '/product/deleteSortSize',
params: [
{name: "sortId", type: "number"},
{name: "sizeId", type: "number"}
]
},
updateSortSize:{
title:'修改品类尺码排序接口',
url: '/product/updateSortSize',
params: [
{name: "sortId", type: "number"},
{name: "sizeId", type: "number"},
{name: "orderBy", type: "number"}
]
},
/**********************品类尺码属性管理*****************************/
queryList:{
title:'获取品类关联尺码属性列表【验证通过】',
url: '/sortAttribute/queryList',
params: [
{name: "page", type: "number"},
{name: "size", type: "number"},
{name: "sortId", type: "number"}
]
},
add:{
title:'添加品类关联尺码属性接口【待验证】',
url: '/sortAttribute/add',
params: [
{name: "sortId", type: "number"},
{name: "attributeId", type: "number"},
{name: "orderBy", type: "number"}
]
},
delete:{
title:'删除品类关联尺码属性接口【待验证】',
url: '/sortAttribute/delete',
params: [
{name: "sortId", type: "number"},
{name: "attributeId", type: "number"}
]
},
updateOrderBy:{
title:'修改品类关联尺码属性接口【待验证】',
url: '/sortAttribute/updateOrderBy',
params: [
{name: "sortId", type: "number"},
{name: "attributeId", type: "number"},
{name: "orderBy", type: "number"}
]
}
}
}
\ No newline at end of file
... ...
module.exports={
namespace:"color",
apis:{
queryProductColors:{
title:'获取颜色列表',
url: '/productColor/queryProductColors'
},
queryProductColor:{
title:'获取单个颜色',
url:"/productColor/queryProductColor",
params:[
{name: 'id', type: 'Number'}
]
},
addProductColor:{
title:'新增颜色',
url:"/productColor/addProductColor",
params:[
{name: 'colorName', type: 'String'},
{name: 'colorCode', type: 'String'},
{name: 'colorValue', type: 'String'}
]
},
updateProductColor:{
title:'修改颜色',
url:"/productColor/updateProductColor",
params:[
{name: 'id', type: 'Number'},
{name: 'colorName', type: 'String'},
{name: 'colorCode', type: 'String'},
{name: 'colorValue', type: 'String'}
]
}
}
}
\ No newline at end of file
... ...
module.exports={
namespace:"porattr",
apis:{
queryProductSortListByConf:{
title:'产品属性',
url:'/product/queryProductSortListByConf',
params:{
status:{type:String,default:1}
}
},
addProductAttribute:{
title:'添加产品属性ajax',
url: '/product/addProductAttribute',
params: [
{name: 'attributeName', type: 'String'},
{name: 'saleType', type: 'Number'},
{name: 'inputType', type: 'String'},
{name: 'attributeType', type: 'String'},
{name: 'isMust', type: 'String'},
{name: 'isSearch', type: 'String'},
{name: 'maxValueLen', type: 'Number'},
{name: 'isAllowAlias', type: 'String'},
{name: 'orderBy', type: 'Number'},
{name: 'state', type: 'Number'},
{name: 'remark', type: 'String'},
{name: 'attributeValues', type: 'String'},
{name: 'displayPosition', type: 'Number'},
{name: 'categoryId', type: 'Number'}
]
},
updateProductAttribute:{
title:'更新产品属性ajax',
url: '/product/updateProductAttribute',
params: [
{name: 'attributeName', type: 'String'},
{name: 'saleType', type: 'Number'},
{name: 'inputType', type: 'String'},
{name: 'attributeType', type: 'String'},
{name: 'isMust', type: 'String'},
{name: 'isSearch', type: 'String'},
{name: 'maxValueLen', type: 'Number'},
{name: 'isAllowAlias', type: 'String'},
{name: 'orderBy', type: 'Number'},
{name: 'state', type: 'Number'},
{name: 'remark', type: 'String'},
{name: 'attributeValues', type: 'String'},
{name: 'displayPosition', type: 'Number'},
{name: 'attributeId', type: 'Number'},
{name: 'categoryId', type: 'Number'}
]
},
queryProductAttributeList:{
title:'根据类目ID ajax查询属性列表',
url: '/product/queryProductAttributeList',
params: [
{name: 'categoryId', type: 'Number'},
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'}
]
},
getProductAttribute:{
title:'ajax查询属性的详细信息',
url: '/product/getProductAttribute',
params: [
{name: 'attributeId', type: 'Number'}
]
}
}
}
\ No newline at end of file
... ...
module.exports={
namespace:"sizeattribute",
apis:{
querySizeAttributeList:{
title:'分页列表数据',
url: '/product/querySizeAttributeList', //接口的url
params:[
{name: 'page', type: 'Number', def: '1'}, //页码
{name: 'size', type: 'Number', def : '10'} //每页条数
]
},
addSizeAttribute:{
title:'添加尺码属性',
url: '/product/addSizeAttribute', //接口的url
params:[
{name: 'attributeName', type: 'String'} //名称
]
},
updateSizeAttribute:{
title:'修改尺码属性',
url: '/product/updateSizeAttribute', //接口的url
params:[
{name: 'id', type: 'Number'}, //id
{name: 'attributeName', type: 'String'} //名称
]
}
}
}
\ No newline at end of file
... ...
module.exports={
namespace:"sizelibrary",
apis:{
querySizeList:{
title:'产品管理【尺寸】页面分页渲染',
url:'/product/querySizeList',
params: [
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number',def:10}
]
},
getSize:{
title:'获取单个尺码',
url:"/product/getSize",
params:[
{name: 'id', type: 'Number'}
]
},
addSize:{
title:'新增尺码',
url:"/product/addSize",
params:[
{name: 'sizeName', type: 'String'}
]
},
updateSize:{
title:'修改尺码',
url:"/product/updateSize",
params:[
{name: 'id', type: 'Number'},
{name: 'sizeName', type: 'String'}
]
}
}
}
\ No newline at end of file
... ...
<%include '../../common/views/__ui/header'%>
<%include '../../common/views/__partail/ListHeader'%>
<div class="contentpanel">
<div class="row">
<div class="col-md-3">
<div class="panel panel-default noborder pattrscroll">
<div class="panel-body">
<div class="pannel-scroll">
<ul class="list-group">
<%if data%>
<%each data as item%>
<li class="list-group-item level<%item.sortLevel%> <%if item.child%>hidden<%/if%>" data-parent="<%item.parentId%>" data-val="<%item.id%>" data-status="close">
<span class="icon expand-icon glyphicon glyphicon-plus"></span>
<%item.sortName%>
</li>
<%/each%>
<%/if%>
</ul>
</div>
</div>
</div>
</div>
<div class="col-md-9">
<div class="panel panel-default">
<div class="panel-heading noborder">
<button id="btn-add" class="btn btn-success model-attr-btn" disabled>
<i class="glyphicon-plus"></i>添加尺码
</button>
</div>
</div>
<div id="basicTable" class="table-responsive">
</div>
</div>
</div>
</div>
<!--编辑模态-->
<script type="text/template" id="template">
<div class="rows" id="baseform">
<div class="form-group">
<label class="col-sm-2 control-label">当前分类<i class="red">*</i></label>
<div class="col-sm-6">
<input type="text" value="[[sortName]]" class="form-control observe" required data-field="sortName" readonly/>
</div>
</div>
[[if name=="尺码"]]
<div class="form-group">
<label class="col-sm-2 control-label">[[name]]<i class="red">*</i></label>
[[if __state=='update']]
<div class="col-sm-6">
<input type="text" value="[[sizeName]]" class="form-control observe" data-field="sizeName" readonly/>
</div>
[[else]]
<div class="col-sm-6" id="sort-content">
</div>
[[/if]]
</div>
[[/if]]
[[if name=="尺码属性"]]
<div class="form-group">
<label class="col-sm-2 control-label">[[name]]<i class="red">*</i></label>
[[if __state=='update']]
<div class="col-sm-6">
<input type="text" value="[[attributeName]]" class="form-control" readonly/>
</div>
[[else]]
<div class="col-sm-6" id="attri-content">
</div>
[[/if]]
</div>
[[/if]]
<div class="form-group">
<label class="col-sm-2 control-label">排序<i class="red">*</i></label>
<div class="col-sm-6">
<input type="text" value="[[orderBy]]" class="form-control observe" data-field="orderBy" match="numbers"
required placeholder="排序值" required/>
</div>
</div>
</div>
</script>
<script type="text/template" id="search-sort">
<select id="choose-sort" title="" class="select2-offscreen form-control" required placehoder="尺码">
<option value="">选择尺码</option>
[[each data as item index]]
<option value="[[item.id]]">[[item.text]]</option>
[[/each]]
</select>
</script>
<script type="text/template" id="search-attri">
<select id="choose-attri" title="" class="select2-offscreen form-control" required placehoder="尺码属性">
<option value="">选择尺码属性</option>
[[each data as item index]]
<option value="[[item.id]]">[[item.text]]</option>
[[/each]]
</select>
</script>
<%include '../../common/views/__ui/footer'%>
\ No newline at end of file
... ...
<%include '../../common/views/__ui/header'%>
<%include '../../common/views/__partail/ListHeader'%>
<div class="contentpanel">
<div class="row">
<div class="col-md-3">
<div class="panel panel-default noborder pattrscroll">
<div class="panel-body">
<div class="pannel-scroll">
<ul class="list-group">
<%if data%>
<%each data as item%>
<li class="list-group-item level<%item.sortLevel%> <%if item.child%>hidden<%/if%>" data-parent="<%item.parentId%>" data-val="<%item.id%>" data-status="close">
<span class="icon expand-icon glyphicon glyphicon-plus"></span>
<%item.sortName%>
</li>
<%/each%>
<%/if%>
</ul>
</div>
</div>
</div>
</div>
<div class="col-md-9">
<div class="panel panel-default">
<div class="panel-heading noborder">
<button id="btn-add" class="btn btn-success model-attr-btn" disabled>
<i class="glyphicon-plus"></i>尺码属性
</button>
</div>
</div>
<div id="basicTable" class="table-responsive">
</div>
</div>
</div>
</div>
<!--编辑模态-->
<script type="text/template" id="template">
<div class="rows" id="baseform">
<div class="form-group">
<label class="col-sm-2 control-label">当前分类<i class="red">*</i></label>
<div class="col-sm-6">
<input type="text" value="[[sortName]]" class="form-control observe" required data-field="sortName" readonly/>
</div>
</div>
[[if name=="尺码"]]
<div class="form-group">
<label class="col-sm-2 control-label">[[name]]<i class="red">*</i></label>
[[if __state=='update']]
<div class="col-sm-6">
<input type="text" value="[[sizeName]]" class="form-control observe" data-field="sizeName" readonly/>
</div>
[[else]]
<div class="col-sm-6" id="sort-content">
</div>
[[/if]]
</div>
[[/if]]
[[if name=="尺码属性"]]
<div class="form-group">
<label class="col-sm-2 control-label">[[name]]<i class="red">*</i></label>
[[if __state=='update']]
<div class="col-sm-6">
<input type="text" value="[[attributeName]]" class="form-control" readonly/>
</div>
[[else]]
<div class="col-sm-6" id="attri-content">
</div>
[[/if]]
</div>
[[/if]]
<div class="form-group">
<label class="col-sm-2 control-label">排序<i class="red">*</i></label>
<div class="col-sm-6">
<input type="text" value="[[orderBy]]" class="form-control observe" data-field="orderBy" match="numbers"
required placeholder="排序值" required/>
</div>
</div>
</div>
</script>
<script type="text/template" id="search-sort">
<select id="choose-sort" title="" class="select2-offscreen form-control" required placehoder="尺码">
<option value="">选择尺码</option>
[[each data as item index]]
<option value="[[item.id]]">[[item.text]]</option>
[[/each]]
</select>
</script>
<script type="text/template" id="search-attri">
<select id="choose-attri" title="" class="select2-offscreen form-control" required placehoder="尺码属性">
<option value="">选择尺码属性</option>
[[each data as item index]]
<option value="[[item.id]]">[[item.text]]</option>
[[/each]]
</select>
</script>
<%include '../../common/views/__ui/footer'%>
\ No newline at end of file
... ...
<%include '../../common/views/__ui/header'%>
<%include '../../common/views/__partail/ListHeader'%>
<div class="contentpanel">
<div class="row">
<div class="col-md-3">
<div class="panel panel-default noborder pattrscroll">
<div class="panel-body">
<div class="pannel-scroll">
<ul class="list-group">
<%if data%>
<%each data as item%>
<li class="list-group-item level<%item.sortLevel%> <%if item.child%>hidden<%/if%>" data-parent="<%item.parentId%>" data-val="<%item.id%>" data-status="close">
<span class="icon expand-icon glyphicon glyphicon-plus"></span>
<%item.sortName%>
</li>
<%/each%>
<%/if%>
</ul>
</div>
</div>
</div>
</div>
<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" id="add-attri" data-target="#addAttr">
<i class="glyphicon-plus"></i>添加属性
</button>
</div>
</div>
<div id="attr-table" class="table-responsive">
</div>
</div>
</div>
</div>
<script type="text/template" id="template">
<form id="add-attr-form" class="form-horizontal form-bordered" method="post" action="/product/attr/add" style="height: 400px;overflow: auto">
<div class="form-group">
<label class="col-md-3 control-label">
属性名称<i class="red">*</i>
</label>
<div class="col-md-6">
<input id="attributeName" value="{attributeName}" class="form-control width300" type="text" placeholder="属性名称" required="required">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">
销售类型<i class="red">*</i>
</label>
<div class="col-md-6">
<select id="saleType" class="attr-select width300" data-placeholder="销售类型" value="{saleType}" required="required">
<option value="">请选择</option>
<option value="1">销售属性</option>
<option value="2">非销售属性</option>
<option value="3">扩展属性</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">
输入类型<i class="red">*</i>
</label>
<div class="col-md-6">
<select id="inputType" class="attr-select width300" data-placeholder="输入类型" value="{inputType}" required="required">
<option value="">请选择</option>
<option value="radio">单选按钮</option>
<option value="checkbox">复选框</option>
<option value="select">下拉列表</option>
<option value="text">单行文本框</option>
<option value="textarea">多行文本框</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">
是否必选
</label>
<div class="col-md-6">
<select id="isMust" value="{isMust}" class="attr-select width300" data-placeholder="是否必选">
<option value="">请选择</option>
<option value="Y"></option>
<option value="N"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">
启用搜索
</label>
<div class="col-md-6">
<select id="isSearch" value="{isSearch}" class="attr-select width300" data-placeholder="启用搜索">
<option value="0">请选择</option>
<option value="Y"></option>
<option value="N"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">
最大输入值
</label>
<div class="col-md-6">
<input id="maxValueLen" class="form-control width300" value="{maxValueLen}" type="text" placeholder="最大输入值">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">
是否允许别名
</label>
<div class="col-md-6">
<select id="isAllowAlias" value="{isAllowAlias}" class="attr-select width300" data-placeholder="是否允许别名">
<option value="">请选择</option>
<option value="Y"></option>
<option value="N"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">
排序
</label>
<div class="col-md-6">
<input id="orderBy" class="form-control width300" type="text" value="{orderBy}" placeholder="排序">
</div>
</div>
<div class="form-group" id="propValue">
<label class="col-md-3 control-label">
属性值<i class="red">*</i>
</label>
<div class="col-md-6" >
<input id="attributeValues" value="{attributeValues}" class="form-control width300" type="text" placeholder="属性值" required="required">
<div id="prop-value-table" class="table-responsive" >
</div>
</div>
</div>
<!--新增-->
<div class="form-group">
<label class="col-md-3 control-label">
展示位置
</label>
<div class="col-md-6">
<select id="displayPosition" value="{displayPosition}" class="attr-select width300" data-placeholder="展示位置">
<option value="">请选择</option>
<option value="1">基础商品-非销售属性</option>
<option value="2">网售信息-上架后补全信息</option>
<option value="3">网售信息-商品参数</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">
备注
</label>
<div class="col-md-6">
<textarea id="remark" value="{remark}" class="form-control width300" rows="2" name="remark"></textarea>
</div>
</div>
<div class="form-group hidden">
<label class="col-md-3 control-label">
ID<i>*</i>
</label>
<div class="col-md-6">
<input id="categoryId" class="form-control width300" value="" type="text" placeholder="ID">
</div>
</div>
<div class="form-group hidden">
<label class="col-md-3 control-label">
attributeId<i class="red">*</i>
</label>
<div class="col-md-6">
<input id="attributeId" class="form-control width300" value="" type="text" placeholder="attributeId">
</div>
</div>
</form>
</script>
<%include '../../common/views/__ui/footer'%>
\ No newline at end of file
... ...
<%include '../../common/views/__ui/header'%>
<%include '../../common/views/__partail/ListHeader'%>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<div class="row">
<a class="btn btn-info" id="add">添加尺码属性</a>
</div>
</div>
<div id="size-property">
</div>
</div>
</div>
<script type="text/template" id="template">
<div class="form-group">
<label for="input" class="col-sm-2 control-label">尺码属性:</label>
<div class="col-sm-10">
<input type="hidden" name="" value="{id}" id="id" class="form-control" value="" required="required" pattern="" title="">
<input type="text" name="" value="{input}" id="input" class="form-control" value="" required="required" pattern="" title="" maxlength="20">
</div>
</div>
</script>
<%include '../../common/views/__ui/footer'%>
\ No newline at end of file
... ...
<%include '../../common/views/__ui/header'%>
<%include '../../common/views/__partail/ListHeader'%>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<div class="row">
<a class="btn btn-info" id="add">添加尺码</a>
</div>
</div>
<div id="size-list">
</div>
</div>
</div>
<script type="text/template" id="template">
<div class="form-group">
<label for="input" class="col-sm-2 control-label">尺码名:</label>
<div class="col-sm-10">
<input type="hidden" name="" value="{id}" id="id" class="form-control" value="" required="required" pattern="" title="">
<input type="text" name="" value="{input}" id="input" class="form-control" value="" required="required" pattern="" title="" maxlength="20">
</div>
</div>
</script>
<%include '../../common/views/__ui/footer'%>
\ No newline at end of file
... ...
<%include '../../../common/views/__ui/header'%>
<%include '../../../common/views/__partail/ListHeader'%>
<div class="contentpanel" id="form-base">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="container" style="margin-top:10px;">
<div class="row form-horizontal" style="margin-bottom:10px;">
<input type="hidden" id='id' value="<%data.id%>" />
<div class="col-xs-10 col-sm-10 col-md-10 col-lg-10">
<div class="form-group">
<label for="colorName" class="col-sm-2 control-label">颜色名称:</label>
<div class="col-sm-8">
<input type="text" name="" id="colorName" class="form-control" value="<%data.colorName%>" required="required" pattern="" title="">
</div>
</div>
<div class="form-group">
<label for="colorCode" class="col-sm-2 control-label">颜色代码:</label>
<div class="col-sm-8">
<input type="text" name="" id="colorCode" class="form-control" value="<%data.colorCode%>" required="required" pattern="" title="" maxlength="6">
</div>
</div>
<div class="form-group">
<label for="colorValue" class="col-sm-2 control-label">颜色值:</label>
<div class="col-sm-8" id="colorUrlBox">
<input type="file" id="colorValue" name="colorValue" value="<%data.colorValue%>">
</div>
</div>
<button id="save" type="button" class="col-sm-offset-3 btn btn-info">保存</button>
</div>
</div>
</div>
</div>
</div>
<input hidden="true" id="route-url" value="<%url%>"/>
<%include '../../../common/views/__ui/footer'%>
\ No newline at end of file
... ...
<%include '../../../common/views/__ui/header'%>
<%include '../../../common/views/__partail/ListHeader'%>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<div class="row">
<a class="btn btn-info" href="/erpproduct/product/addColor">添加颜色</a>
</div>
</div>
<input type="hidden" id="url" value="/erpproduct/product/colorList"/>
<div id="color-list" class="color">
</div>
</div>
</div>
<%include '../../../common/views/__ui/footer'%>
\ No newline at end of file
... ...
module.exports=function(app) {
/*物理类目管理*/
app.get("/erpproduct/sort/index","category.Index","category_queryAllProductSortList",function(plist,req,res){
this.$extend={
moduleName:'物理类目管理',
pageName:'物理类目管理列表',
data:plist.data
}
});
/*添加物理类目管理*/
app.get("/product/class/new","category.Edit",function(){
this.$extend={
moduleName:'物理类目管理',
pageName:'添加物理类目',
action:'/product/sort/addProductSort'
}
});
/*修改物理类目管理*/
app.get("/product/class/edit/:param","category.Edit","category_getProductSort",function(sort){
this.$extend={
moduleName:'物理类目管理',
pageName:'修改物理类目',
action:'/product/sort/update'
}
return sort;
});
/*【添加品类】ajax请求接口*/
app.post("/product/sort/addProductSort","category_addProductSort");
/*【修改品类】ajax请求接口*/
app.post("/product/sort/update","category_updateProductSort");
/*打开*/
app.post("/erpproduct/sorter/open","category_publishProductSort");
/*关闭*/
app.post("/erpproduct/sorter/close","category_closeProductSort");
}
\ No newline at end of file
... ...
module.exports={
namespace:"category",
apis:{
queryAllProductSortList:{
title:'获取所有品类',
url: '/product/queryAllProductSortList',
},
addProductSort:{
title:'商品管理>【添加品类】ajax请求接口',
url: '/product/addProductSort',
params: [
{name: 'sortName', type: 'String'},
{name: 'sortInitials', type: 'String'},
{name:'firstSortId', type: 'Number'},
{name:'secondSortId', type:'Number'},
{name:'threeSortId', type:'Number'},
{name: 'orderBy', type: 'Number'},
{name: 'status', type: 'Number'}
]
},
getProductSort:{
title:'获取商品类目',
url:'/product/getProductSort',
params: [
{name: 'param', type: 'Number'}
]
},
updateProductSort:{
title:'更新商品类目',
url: '/product/updateProductSort',
params: [
{name: 'id', type: 'Number'},
{name: 'sortName', type: 'String'},
{name: 'sortInitials', type: 'String'},
{name:'firstSortId', type: 'Number'},
{name:'secondSortId', type:'Number'},
{name:'threeSortId', type:'Number'},
{name: 'orderBy', type: 'Number'},
{name: 'status', type: 'Number'}
]
},
publishProductSort:{
title:'publishProductSort',
url: '/product/publishProductSort',
params: [
{name: 'param', type: 'Number'}
]
},
closeProductSort:{
title:'closeProductSort',
url: '/product/closeProductSort',
params: [
{name: 'param', type: 'Number'}
]
}
}
}
\ No newline at end of file
... ...
<%include '../../common/views/__ui/header'%>
<%include '../../common/views/__partail/ListHeader'%>
<div class="contentpanel">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-body nopadding">
<form id="new-class-form" class="form-horizontal form-bordered" method="post" action="<%action%>">
</form>
</div>
<div class="panel-footer">
<button type="submit" class="btn btn-success">保存</button>
<a href="/erpproduct/sort/index" class="btn btn-danger">取消</a>
</div>
</div>
</div>
</div>
</div>
<script type="text/template" id="template">
<div class="form-group">
<label class="col-md-2 control-label">
物理类目<span class="red">*</span>
</label>
<div class="col-md-5">
<input id="sortName" class="form-control" required type="text" value="[[sortName]]" placeholder="品类名称">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">
品类缩写<span class="red">*</span>
</label>
<div class="col-md-5">
<input id="sortInitials" class="form-control" required type="text" value="[[sortInitials]]" placeholder="品类缩写">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">
分类
</label>
<div class="col-md-5">
<div id="sortTree"></div>
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">排序
<span class="red">*</span>
</label>
<div class="col-md-5">
<input id="orderBy" class="form-control" required value="[[orderBy]]" type="number" placeholder="">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">状态</label>
<div class="col-md-5">
<div class="radio">
<label><input type="radio" value="1" name="status">开启</label>
</div>
<div class="radio">
<label><input type="radio" value="0" name="status">关闭</label>
</div>
<input id="status" type="hidden" value="[[status||'0']]" for="radio">
</div>
</div>
<input id="id" class="form-control" type="hidden" value="[[id]]">
</script>
<%include '../../common/views/__ui/footer'%>
\ No newline at end of file
... ...
<%include '../../common/views/__ui/header'%>
<%include '../../common/views/__partail/ListHeader'%>
<div class="contentpanel">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading noborder">
<a href="/product/class/new" class="btn btn-success"><i class="glyphicon-plus"></i>添加品类</a>
</div>
</div>
</div>
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-bordered toggle-table">
<thead>
<tr>
<th width="10%"></th>
<th width="10%">ID</th>
<th width="15%">品类名称</th>
<th width="10%">品类缩写</th>
<th width="15%">所属分类</th>
<th width="10%">排序</th>
<th width="10%">状态</th>
<th width="20%">操作</th>
</tr>
</thead>
<tbody>
<%if data%>
<%each data as item%>
<tr class="level<%item.sortLevel%> <%if item.child%>hidden<%/if%>" data-parent="<%item.parentId%>" data-val="<%item.id%>" data-status="close">
<td class="toggle-td"><span class="glyphicon glyphicon-folder-close"></span></td>
<td><%item.id%></td>
<td><%item.sortName%></td>
<td><%item.sortInitials%></td>
<td><%item.sortLevel%>级分类</td>
<td><%item.orderBy%></td>
<td>
<%if item.booleanStatus%>开启<%else%>关闭<%/if%>
</td>
<td data-id="<%item.id%>">
<a href="/product/class/edit/<%item.id%>" class="btn btn-success btn-xs edit-class-btn">编辑</a>
<a href="" class="btn btn-xs open-close-btn <%if item.booleanStatus%>btn-danger <%else%>btn-warning<%/if%>" data-status="<%item.status%>">
<%if item.booleanStatus%>开启<%else%>关闭<%/if%>
</a>
</td>
</tr>
<%/each%>
<%/if%>
</tbody>
</table>
</div>
</div>
</div>
</div>
<%include '../../common/views/__ui/footer'%>
\ No newline at end of file
... ...
... ... @@ -3,8 +3,8 @@
*/
'use strict';
var $ = require('jquery'),
common = require('../common/common');
var sortmenu = require('../common/sortmenu');
common = require('../../common/common');
var sortmenu = require('../../common/sortmenu');
/**
* 初始化排序目录
... ...
... ... @@ -3,8 +3,8 @@
*/
'use strict';
var $ = require('jquery'),
common = require('../common/common');
var sortmenu = require('../common/sortmenu');
common = require('../../common/common');
var sortmenu = require('../../common/sortmenu');
var g = new common.grid({
el: "#basicTable",
... ...
... ... @@ -3,8 +3,8 @@
*@author: chenglong
*/
var $ = require('jquery');
common = require('../common/common');
var sortmenu = require('../common/sortmenu');
common = require('../../common/common');
var sortmenu = require('../../common/sortmenu');
// 把Y、N转换成是、否
function convertNorY(val) {
... ... @@ -225,7 +225,7 @@ function attributeOp(prefix, url, item) {
propValueGrid.__rows = [];
option.success = function (res) {
res = res.data;
res = res;
if (res.code == "200") {
a.$tip("提交成功", function () {
tableGird.reload();
... ... @@ -272,7 +272,7 @@ function attributeOp(prefix, url, item) {
propValueGrid.__rows = [];
option.success = function (res) {
res = res.data;
res = res;
if (res.code == "200") {
tableGird.reload();
d.close();
... ...
/**
* Created by wangqianjun on 16/2/3.
*/
'use strict';
var $ = require('jquery'),
common = require('../../common/common');
var g = new common.grid({
el: '#size-property',
columns: [
{display: "编号", name: "id"},
{display: "属性名", name: "attributeName"},
{
display: "操作", name: "", render: function (item) {
return '<a class="btn btn-info add2" data-index="' + item.__index + '">编辑</a>';
}
}
]
});
g.init("/erpproduct/sizeattribute/propertyList");
$('#size-property').on('click', '.add2', function () {
var item = g.rows[$(this).data("index")];
common.dialog.confirm("修改尺码属性",
common.util.__template($("#template").html(), {id: item.id, input: item.attributeName})
, function () {
common.util.__ajax({
url: '/erpproduct/sizeattribute/propertyModify',
data: (function () {
var input = $('#input').val();
if (input === '' || $.trim(input) === '') return "尺码名不能为空";
return {
id: item.id,
attributeName: $("#input").val()
};
})()
}, function () {
g.reload();
});
});
});
// 添加&编辑 尺码属性
$('#add').on('click', function () {
common.dialog.confirm("添加尺码属性",
common.util.__template($("#template").html(), {id: "", input: ""})
, function () {
common.util.__ajax({
url: '/erpproduct/sizeattribute/propertyAdd',
data: (function () {
var input = $('#input').val();
if (input === '' || $.trim(input) === '') return "尺码名不能为空";
return {
attributeName: input
};
})()
}, function () {
g.reload();
});
});
});
... ...
// 尺码管理
var $ = require('jquery');
common = require('../common/common');
common = require('../../common/common');
var g = new common.grid({
... ... @@ -17,7 +17,7 @@ var $ = require('jquery');
});
g.init($('#url').val());
g.init("/erpproduct/sizeattribute/sizeList");
$('#size-list').on('click', '.add2', function () {
... ...
... ... @@ -2,7 +2,7 @@
* Created by wangqianjun on 16/2/18.
*/
var $ = require('jquery');
var edit = require('../common/edit');
var edit = require('../../../common/edit');
// 上传图片
var e = new edit('#form-base',{
... ...
... ... @@ -2,7 +2,7 @@
'use strict';
var $ = require('jquery'),
common = require('../common/common');
common = require('../../../common/common');
var g = new common.grid({
el: '#color-list',
... ... @@ -22,5 +22,5 @@ var g = new common.grid({
});
g.init($('#url').val());
g.init("/erpproduct/product/colorList");
... ...
var $ = require('jquery');
var common=require('../common/common');
var RESPONSEDATA={};
var param = location.href.match(/(new|edit)\/(\d+)/);
console.log(param);
if(param){
common.util.__ajax({
url:'/product/class/getProductSort',
async:false,
data:{param:param[2]}
},function(res){
RESPONSEDATA=res.data;
console.log("RESPONSEDATA",RESPONSEDATA);
},true);
}
var common=require('../../common/common');
var ViewModel=window.ViewModel;
var RESPONSEDATA=ViewModel.data||{};
$("#new-class-form").html(common.util.__template2($("#template").html(),RESPONSEDATA));
var NUMN={
... ... @@ -75,7 +65,7 @@ $(document).on("click",".btn-success",function(){
console.log(option.data);
// option.debug=true;
option.success=function(res){
res=res.data;
res=res;
if(res.code=="200"){
e.$tip('提交成功',function(){
location.href="/erpproduct/sort/index";
... ...
... ... @@ -5,8 +5,6 @@
var $ = require('jquery');
var edit = require('../common/edit');
var dropDown = require('../common/dropDown');
//列表展示效果
... ... @@ -85,7 +83,7 @@ var dropDown = require('../common/dropDown');
console.log(data);
if (data.data.code === 200) {
if (data.code === 200) {
$target.attr('data-status', status);
if ($target.hasClass('btn-danger')) {
... ...