Authored by 周奇琪

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

... ... @@ -42,7 +42,7 @@ $("#basicInfo").html(common.util.__template2($("#template2").html(),RESPONSEDATA
/*类目配置*/
var ENUM={
goodsSizeList:{"sizeId":"","salePrice":$("#salesPriceStr").val(),"barCode":"","isSuppled":"N","presaleStorageNum":""}
goodsSizeList:{"sizeId":"","salePrice":$("#salesPriceStr").val(),"factoryCode":"","isSuppled":"N","presaleStorageNum":""}
}
/*公共模块*/
... ... @@ -205,7 +205,7 @@ var g=new common.grid({
g.__gsm[item.__index]=item.goodsSizeList.length;
}
var html=[];
html.push("<div class='form-group'><div class='col-sm-11 red'><input type=text value='"+item.modelCode+"' data-index="+item.__index+" class='modelCode form-control' placeholder='款型编码' /></div></div>");
html.push("<div class='form-group'><div class='col-sm-11 red'><input type=text value='"+item.factoryCode+"' data-index="+item.__index+" class='modelCode form-control' placeholder='款型编码' /></div></div>");
html.push('<div class="rows" id="rows__'+item.__index+'">');
item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)];
var ISXIANGO=(common.util.__input("isAdvance")=="Y"&&+RESPONSEDATA.isAuditing==200)?true:false;
... ... @@ -279,7 +279,7 @@ $(document).on("click",".sortadd",function(){
var goodsSizeList=$.extend({},ENUM.goodsSizeList);
goodsSizeList.salePrice=$("#salesPriceStr").val();
g.__rows.push({
"modelCode": "",
"factoryCode": "",
"goodsColorImage": "",
goodsName: $(this).text(),
colorId: (+$(this).data("id")),
... ... @@ -341,7 +341,7 @@ $(document).on("click",".sortdelete",function(){
});
$(document).on("change",".modelCode",function(){
var item=g.__rows[$(this).data("index")];
item.modelCode=$(this).val();
item.factoryCode=$(this).val();
});
$(document).on("click",".btn-sort-add",function(){
var item=g.__rows[$(this).data("index")];
... ... @@ -375,7 +375,7 @@ $(document).on("change",".btn-sort-tiaoma",function(){
var _index=$(this).data("index");
var _eq=$(this).data("eq");
var item=g.__rows[_index].goodsSizeList[_eq];
item.barCode=$(this).val();
item.factoryCode=$(this).val();
});
$(document).on("change",".btn-sort-kebu",function(){
var _index=$(this).data("index");
... ... @@ -455,35 +455,35 @@ e.on("validate",function(){
}
//RESPONSEDATA.productSkn
console.log("item1.barCode",item1.barCode)
console.log("item1.factoryCode",item1.factoryCode)
map[gname+"_"+item1.sizeId]="";
//修改
if(RESPONSEDATA.productSkn){
if(index1>g.__gsm[index]-1){
//大于原来的计算
if(map2.hasOwnProperty(item1.barCode)){
if(map2.hasOwnProperty(item1.factoryCode)){
_count1++;
}
map2[item1.barCode]="";
console.log("大于原来的计算",item1.barCode+":"+_count1);
map2[item1.factoryCode]="";
console.log("大于原来的计算",item1.factoryCode+":"+_count1);
}else{
//小于原来,并且有值
if(item1.barCode){
if(map2.hasOwnProperty(item1.barCode)){
if(item1.factoryCode){
if(map2.hasOwnProperty(item1.factoryCode)){
_count1++;
}
map2[item1.barCode]="";
map2[item1.factoryCode]="";
console.log("小于原来,并且有值",_count1);
}
console.log("没值",_count1);
}
}else{
//添加时候计算
if(item1.barCode){
if(map2.hasOwnProperty(item1.barCode)){
if(item1.factoryCode){
if(map2.hasOwnProperty(item1.factoryCode)){
_count1++;
}
map2[item1.barCode]="";
map2[item1.factoryCode]="";
}
console.log("添加时候计算",_count1);
}
... ... @@ -491,7 +491,7 @@ e.on("validate",function(){
if(g.__gsm[index]&&index1<g.__gsm[index]){
return;
}
map3.push(item1.barCode);
map3.push(item1.factoryCode);
});
});
}
... ...
/**
* Created by JiangMin on 2016/3/22.
* 试穿信息管理
... ... @@ -41,8 +42,9 @@ var g = new common.grid({
g.init("/meterManage/tryInfo/index2");
var modelLists = [];
//根据productSkn获取所有试穿信息并拼接返回
var getAllInfo = function (productSkn, maxSortId, callback) {
common.util.__ajax({url: '/meterManage/tryInfo/info1', data: {productSkn: productSkn}}, function (data) {
var getAllInfo = function (item, callback) {
console.log("item11",item);
common.util.__ajax({url: '/meterManage/tryInfo/info1', data: {productSkn: item.productSkn}}, function (data) {
var feelIds = {
1: "合适",
2: "偏大",
... ... @@ -75,12 +77,23 @@ var getAllInfo = function (productSkn, maxSortId, callback) {
callback(modelLists);
var e = new common.edit("#baseInfo");
e.init();
var sortId;
if(item.smallSortId&&item.smallSortId>1){
sortId=item.smallSortId;
}else{
if(item.middleSortId||item.middleSortId>1){
sortId=item.middleSortId;
}
else{
sortId=item.maxSortId;
}
}
new common.dropDown({
el: '.fit_size',
ajax: 'sortsize2',
params: function () {
return {
"sortId": maxSortId
"sortId": sortId
};
}
});
... ... @@ -110,7 +123,7 @@ var getNewLists = function (modelLists, callback) {
//详情模态
var Bll = {
toast: function (url, item) {
getAllInfo(item.productSkn, item.maxSortId, function (data) {
getAllInfo(item, function (data) {
var a = new common.dialog({
title: "试穿信息",
width: '80%',
... ...
... ... @@ -14,11 +14,11 @@ var config = {
apiKey: 'sd4H1ecAqlp',
// domain:'http://192.168.102.216:8080/platform',
// domain: 'http://172.16.6.240:8088/platform',
// domain:'http://172.16.6.240:8088/platform',// 王书生
domain:'http://172.16.6.176:8088/platform',// 王书生
// domain: 'http://172.16.6.214:8088/platform',//陈超
//http://172.16.6.124:8088/platform/product/queryAllProductAttr
//domain: 'http://172.16.6.146:8088/platform', //玛丽
domain: 'http://192.168.102.202:8088/platform',
// domain: 'http://192.168.102.202:8088/platform',
//domain:'http://172.16.6.157:8080/yohobuy-platform-web',//葛超
//domain: 'http://172.16.6.239:8080', //孙杰翔
//domain:'http://172.16.6.189:8088/platform', //李健1
... ...
... ... @@ -88,7 +88,7 @@
<input class="form-control btn-sort-xiaoshou" value="[[item.salePrice]]" placeholder="默认销售价" data-index=[[index]] data-eq=[[__index]] required match="numbers" type="text"></input>
</div>
<div class="col-sm-2">
<input class="form-control btn-sort-tiaoma" value="[[item.barCode]]" placeholder="条码" data-index=[[index]] data-eq=[[__index]]></input>
<input class="form-control btn-sort-tiaoma" value="[[item.factoryCode]]" placeholder="条码" data-index=[[index]] data-eq=[[__index]]></input>
</div>
<div class="col-sm-2">
<select class="form-control btn-sort-kebu" value="[[item.isSuppled||'N']]" data-index=[[index]] data-eq=[[__index]]>
... ...
... ... @@ -133,8 +133,8 @@
<span>[[_item.sizeName]]</span>
</th>
<th>[[_item.salePrice]]</th>
<th>[[item.modelCode]]</th>
<th>[[_item.barCode]]</th>
<th>[[item.factoryCode]]</th>
<th>[[_item.factoryCode]]</th>
<th>[[item.factoryGoodsName]]</th>
[[if _item.isSuppled=="Y"]]
<th></th>
... ...