Authored by weiqingting

基础商品bug修改

... ... @@ -71,9 +71,9 @@ var ag=new common.grid({
{display:"名称",name:"attributeName"},
{display:"属性",render:function(item){
item.required=item.isMust=="Y"?"required":"";
item.attributeValues=item.attributeValues.split(',').map(function(elem, index, arr){
return {name:elem}
});
// item.attributeValues=item.attributeValues.split(',').map(function(elem, index, arr){
// return {name:elem}
// });
var attrs=RESPONSEDATA.productStandardRelationBoList;
if(attrs){
for(var i in attrs){
... ... @@ -457,6 +457,7 @@ $(document).on("click","#btnReview",function(){
option.data.isAuditing=RESPONSEDATA.isAuditing?RESPONSEDATA.isAuditing:"";
option.data.seasons=option.data.seasons?option.data.seasons.replace(/\|/g,','):"";
//expectShelfTime
// option.data=new Date(expectShelfTime).getTime();
... ...
... ... @@ -71,8 +71,10 @@ var YNEnum = {
}
/*下拉选择*/
new common.dropDown({el: "#shopId", ajax: "queryShop"});
new common.dropDown({el: "#brandId", ajax: "queryBrand"});
new common.dropDown({el: "#shopId", ajax: "queryShopPass"});
new common.dropDown({el: "#brandId", ajax: "brand",params:function(){
return {status:1};
}});
new common.dropDown({el: "#isOutLets", ajax: ""});
new common.dropDown({el: "#isAdvance", ajax: ""});
new common.dropDown({el: "#gender", ajax: ""});
... ... @@ -165,7 +167,8 @@ var g = new common.grid({
maxSortId:select[0]?select[0].id:"",
middleSortId:select[1]?select[1].id:"",
smallSortId:select[2]?select[2].id:"",
sortId:select[3]?select[3].id:""
sortId:select[3]?select[3].id:"",
founderName:common.util.__input("founderName")
};
},
columns: [
... ...
... ... @@ -29,6 +29,8 @@ var urlObj = {
'queryAll4Select': '/goods/brandSeries/queryAll4Select' //品牌款型系列
};
var minimumResultsForSearch=["sortbybrand","getjitSup"];
var dropDown = function(option) {
new dropDown.prototype.init(option);
}
... ... @@ -45,8 +47,12 @@ dropDown.prototype = {
option[i] = _option[i];
}
}
if(minimumResultsForSearch.indexOf(_option.ajax)>-1){
option.minimumResultsForSearch=Infinity
}
if (option.ajax) {
$(option.el).select2({
minimumResultsForSearch: option.minimumResultsForSearch||0,
ajax: {
url: option.url,
dataType: 'json',
... ...
... ... @@ -72,7 +72,7 @@ edit.prototype = {
$("input:hidden", that.el).each(function() {
var $this = $(this);
var name = $this.attr("id"),
values = String.prototype.split.call($this.val(), '|'),
values = $this.val().split(/[|,]/g),//String.prototype.split.call($this.val(), '|'),
type = $this.attr("for");
if (type) {
... ...
... ... @@ -102,13 +102,16 @@ tabTree.prototype= {
g.dom["cityshow"].on("click", "span>a", function(event) {
var rowid = $(this).attr("data").split("_")[1];
g.select(g.records[rowid]);
// if (p.stepMet != null && g.selected.length != p.datas.length) {
// p.stepMet(g.selected, g.active_count)
// }
g.changeVolume();
if(!p.url){
g.setHeadVal();
}else{
/*既可以选择三级也可以选择四级 hack*/
if(g.active_count>2){
g.setHeadVal();
}
}
return event.stopPropagation()
});
$(document).click(function() {
... ...
... ... @@ -496,7 +496,7 @@ ul {
}
.chooseArea p span {
display: block;
// display: block;
max-width: 60px;
_width: expression(this.offsetWidth>60 ? '60px':'auto');
height: 26px;
... ... @@ -550,6 +550,7 @@ ul {
padding: 5px 7px;
text-decoration: none;
cursor: pointer;
word-break: break-all;
}
.citybox div.cityshow span a:hover {
... ...
... ... @@ -15,7 +15,8 @@ var config = {
//http: //192.168.102.214:8088/platform
// domain: 'http://172.16.6.240:8088/platform',
// domain:'http://172.16.6.240:8088/platform',//王书生
// domain: 'http://172.16.6.252:9080',//陈超
// domain: 'http://172.16.6.124:8088/platform',//陈超
//http://172.16.6.124:8088/platform/product/queryAllProductAttr
//domain: 'http://172.16.6.227:8088/platform', //玛丽
// domain: 'http://192.168.102.202:8088/platform',
//domain:'http://172.16.9.8:8080/yohobuy-platform-web',//葛超
... ...
... ... @@ -40,6 +40,7 @@ exports.res = [
{name: 'size',type: 'Number'},
{name: 'supplierId',type:'Number'},
{name: 'isAuditing',type:'Number'},
{name:'founderName',type:'String'}
]
},
... ... @@ -71,6 +72,7 @@ exports.res = [
{name: 'size',type: 'Number'},
{name: 'supplierId',type:'Number'},
{name: 'isAuditing',type:'Number'},
{name:'founderName',type:'String'}
]
},
... ...
... ... @@ -224,12 +224,12 @@
<label class="col-sm-2 control-label">适销季<span class="red">*</span></label>
<div class="col-sm-2">
<label class="radio-inline">
<input type="checkbox" name="seasons" value="1"></label>
<input type="checkbox" name="seasons" value="summer"></label>
<label class="radio-inline">
<input type="checkbox" name="seasons" value="2"></label>
<input type="checkbox" name="seasons" value="winter"></label>
<label class="radio-inline">
<input type="checkbox" name="seasons" value="3">四季</label>
<input type="hidden" id="seasons" name="seasons" value="[[seasons||'1']]" for="checkbox" placeholder="年龄层" />
<input type="checkbox" name="seasons" value="seasons">四季</label>
<input type="hidden" id="seasons" name="seasons" value="[[seasons||'seasons']]" for="checkbox" placeholder="年龄层" />
</div>
[[else]]
<div class="col-sm-4"></div>
... ... @@ -358,25 +358,25 @@
<script type="text/template" id="template3">
<div class="form-group">
[[if inputType=='checkbox']]
[[each attributeValues as item index ]]
[[each idNameList as item index ]]
<label class="radio-inline">
<input type="checkbox" name="attr_[[__index]]" data-index=[[__index]] class="attr_checkobx_class" value="[[item.name]]">[[item.name]]</label>
<input type="checkbox" name="attr_[[__index]]" data-index=[[__index]] class="attr_checkobx_class" value="[[item.text]]">[[item.text]]</label>
[[/each]]
<input type="hidden" id="attr_[[__index]]" value="[[val||'']]" [[required]] for="checkbox"/>
[[/if]]
[[if inputType=='radio']]
[[each attributeValues as item index ]]
[[each idNameList as item index ]]
<label class="radio-inline">
<input type="radio" name="attr_[[__index]]" data-index=[[__index]] class="attr_input" value="">[[item.name]]</label>
<input type="radio" name="attr_[[__index]]" data-index=[[__index]] class="attr_input" value="[[item.text]]">[[item.text]]</label>
[[/each]]
<input type="hidden" id="attr_[[__index]]" data-index='[[__index]]' value="[[val||'']]" [[required]] for="checkbox"/>
[[/if]]
[[if inputType=='select']]
<select class="form-control attr_input" data-index='[[__index]]' value="[[val||'']]" [[required]]>
[[each attributeValues as item index ]]
<option>[[item.name]]</option>
[[each idNameList as item index ]]
<option value="[[item.text]]">[[item.text]]</option>
[[/each]]
</select>
[[/if]]
... ...
... ... @@ -35,11 +35,9 @@
<div class="panel-col">
<input type="text" id="productName" class="form-control" placeholder="商品名称" style="height: 39px;"/>
</div>
<!-- <div class="panel-col">
<select id="founder" class="form-control">
<option value="-1">创建人</option>
</select>
</div> -->
<div class="panel-col">
<input type="text" id="founderName" class="form-control" placeholder="创建人" style="height: 39px;"/>
</div>
<div class="panel-col">
<select id="shopId" class="form-control">
<option value="-1">请选择店铺</option>
... ... @@ -75,10 +73,6 @@
</select>
</div>
<div class="panel-col2">
<div id="sort"></div>
</div>
<div class="panel-col">
<select id="isJit" class="form-control">
<option value="-1">是否JIT商品</option>
... ... @@ -87,6 +81,10 @@
</select>
</div>
<div class="panel-col2">
<div id="sort"></div>
</div>
<div class="panel-col">
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="" class="btn btn-info">全部</a>
... ...