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 @@ -42,7 +42,7 @@ $("#basicInfo").html(common.util.__template2($("#template2").html(),RESPONSEDATA
42 42
43 /*类目配置*/ 43 /*类目配置*/
44 var ENUM={ 44 var ENUM={
45 - goodsSizeList:{"sizeId":"","salePrice":$("#salesPriceStr").val(),"barCode":"","isSuppled":"N","presaleStorageNum":""} 45 + goodsSizeList:{"sizeId":"","salePrice":$("#salesPriceStr").val(),"factoryCode":"","isSuppled":"N","presaleStorageNum":""}
46 } 46 }
47 47
48 /*公共模块*/ 48 /*公共模块*/
@@ -205,7 +205,7 @@ var g=new common.grid({ @@ -205,7 +205,7 @@ var g=new common.grid({
205 g.__gsm[item.__index]=item.goodsSizeList.length; 205 g.__gsm[item.__index]=item.goodsSizeList.length;
206 } 206 }
207 var html=[]; 207 var html=[];
208 - 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>"); 208 + 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>");
209 html.push('<div class="rows" id="rows__'+item.__index+'">'); 209 html.push('<div class="rows" id="rows__'+item.__index+'">');
210 item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)]; 210 item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)];
211 var ISXIANGO=(common.util.__input("isAdvance")=="Y"&&+RESPONSEDATA.isAuditing==200)?true:false; 211 var ISXIANGO=(common.util.__input("isAdvance")=="Y"&&+RESPONSEDATA.isAuditing==200)?true:false;
@@ -279,7 +279,7 @@ $(document).on("click",".sortadd",function(){ @@ -279,7 +279,7 @@ $(document).on("click",".sortadd",function(){
279 var goodsSizeList=$.extend({},ENUM.goodsSizeList); 279 var goodsSizeList=$.extend({},ENUM.goodsSizeList);
280 goodsSizeList.salePrice=$("#salesPriceStr").val(); 280 goodsSizeList.salePrice=$("#salesPriceStr").val();
281 g.__rows.push({ 281 g.__rows.push({
282 - "modelCode": "", 282 + "factoryCode": "",
283 "goodsColorImage": "", 283 "goodsColorImage": "",
284 goodsName: $(this).text(), 284 goodsName: $(this).text(),
285 colorId: (+$(this).data("id")), 285 colorId: (+$(this).data("id")),
@@ -341,7 +341,7 @@ $(document).on("click",".sortdelete",function(){ @@ -341,7 +341,7 @@ $(document).on("click",".sortdelete",function(){
341 }); 341 });
342 $(document).on("change",".modelCode",function(){ 342 $(document).on("change",".modelCode",function(){
343 var item=g.__rows[$(this).data("index")]; 343 var item=g.__rows[$(this).data("index")];
344 - item.modelCode=$(this).val(); 344 + item.factoryCode=$(this).val();
345 }); 345 });
346 $(document).on("click",".btn-sort-add",function(){ 346 $(document).on("click",".btn-sort-add",function(){
347 var item=g.__rows[$(this).data("index")]; 347 var item=g.__rows[$(this).data("index")];
@@ -375,7 +375,7 @@ $(document).on("change",".btn-sort-tiaoma",function(){ @@ -375,7 +375,7 @@ $(document).on("change",".btn-sort-tiaoma",function(){
375 var _index=$(this).data("index"); 375 var _index=$(this).data("index");
376 var _eq=$(this).data("eq"); 376 var _eq=$(this).data("eq");
377 var item=g.__rows[_index].goodsSizeList[_eq]; 377 var item=g.__rows[_index].goodsSizeList[_eq];
378 - item.barCode=$(this).val(); 378 + item.factoryCode=$(this).val();
379 }); 379 });
380 $(document).on("change",".btn-sort-kebu",function(){ 380 $(document).on("change",".btn-sort-kebu",function(){
381 var _index=$(this).data("index"); 381 var _index=$(this).data("index");
@@ -455,35 +455,35 @@ e.on("validate",function(){ @@ -455,35 +455,35 @@ e.on("validate",function(){
455 } 455 }
456 456
457 //RESPONSEDATA.productSkn 457 //RESPONSEDATA.productSkn
458 - console.log("item1.barCode",item1.barCode) 458 + console.log("item1.factoryCode",item1.factoryCode)
459 map[gname+"_"+item1.sizeId]=""; 459 map[gname+"_"+item1.sizeId]="";
460 //修改 460 //修改
461 if(RESPONSEDATA.productSkn){ 461 if(RESPONSEDATA.productSkn){
462 if(index1>g.__gsm[index]-1){ 462 if(index1>g.__gsm[index]-1){
463 //大于原来的计算 463 //大于原来的计算
464 - if(map2.hasOwnProperty(item1.barCode)){ 464 + if(map2.hasOwnProperty(item1.factoryCode)){
465 _count1++; 465 _count1++;
466 } 466 }
467 - map2[item1.barCode]="";  
468 - console.log("大于原来的计算",item1.barCode+":"+_count1); 467 + map2[item1.factoryCode]="";
  468 + console.log("大于原来的计算",item1.factoryCode+":"+_count1);
469 }else{ 469 }else{
470 //小于原来,并且有值 470 //小于原来,并且有值
471 - if(item1.barCode){  
472 - if(map2.hasOwnProperty(item1.barCode)){ 471 + if(item1.factoryCode){
  472 + if(map2.hasOwnProperty(item1.factoryCode)){
473 _count1++; 473 _count1++;
474 } 474 }
475 - map2[item1.barCode]=""; 475 + map2[item1.factoryCode]="";
476 console.log("小于原来,并且有值",_count1); 476 console.log("小于原来,并且有值",_count1);
477 } 477 }
478 console.log("没值",_count1); 478 console.log("没值",_count1);
479 } 479 }
480 }else{ 480 }else{
481 //添加时候计算 481 //添加时候计算
482 - if(item1.barCode){  
483 - if(map2.hasOwnProperty(item1.barCode)){ 482 + if(item1.factoryCode){
  483 + if(map2.hasOwnProperty(item1.factoryCode)){
484 _count1++; 484 _count1++;
485 } 485 }
486 - map2[item1.barCode]=""; 486 + map2[item1.factoryCode]="";
487 } 487 }
488 console.log("添加时候计算",_count1); 488 console.log("添加时候计算",_count1);
489 } 489 }
@@ -491,7 +491,7 @@ e.on("validate",function(){ @@ -491,7 +491,7 @@ e.on("validate",function(){
491 if(g.__gsm[index]&&index1<g.__gsm[index]){ 491 if(g.__gsm[index]&&index1<g.__gsm[index]){
492 return; 492 return;
493 } 493 }
494 - map3.push(item1.barCode); 494 + map3.push(item1.factoryCode);
495 }); 495 });
496 }); 496 });
497 } 497 }
  1 +
1 /** 2 /**
2 * Created by JiangMin on 2016/3/22. 3 * Created by JiangMin on 2016/3/22.
3 * 试穿信息管理 4 * 试穿信息管理
@@ -41,8 +42,9 @@ var g = new common.grid({ @@ -41,8 +42,9 @@ var g = new common.grid({
41 g.init("/meterManage/tryInfo/index2"); 42 g.init("/meterManage/tryInfo/index2");
42 var modelLists = []; 43 var modelLists = [];
43 //根据productSkn获取所有试穿信息并拼接返回 44 //根据productSkn获取所有试穿信息并拼接返回
44 -var getAllInfo = function (productSkn, maxSortId, callback) {  
45 - common.util.__ajax({url: '/meterManage/tryInfo/info1', data: {productSkn: productSkn}}, function (data) { 45 +var getAllInfo = function (item, callback) {
  46 + console.log("item11",item);
  47 + common.util.__ajax({url: '/meterManage/tryInfo/info1', data: {productSkn: item.productSkn}}, function (data) {
46 var feelIds = { 48 var feelIds = {
47 1: "合适", 49 1: "合适",
48 2: "偏大", 50 2: "偏大",
@@ -75,12 +77,23 @@ var getAllInfo = function (productSkn, maxSortId, callback) { @@ -75,12 +77,23 @@ var getAllInfo = function (productSkn, maxSortId, callback) {
75 callback(modelLists); 77 callback(modelLists);
76 var e = new common.edit("#baseInfo"); 78 var e = new common.edit("#baseInfo");
77 e.init(); 79 e.init();
  80 + var sortId;
  81 + if(item.smallSortId&&item.smallSortId>1){
  82 + sortId=item.smallSortId;
  83 + }else{
  84 + if(item.middleSortId||item.middleSortId>1){
  85 + sortId=item.middleSortId;
  86 + }
  87 + else{
  88 + sortId=item.maxSortId;
  89 + }
  90 + }
78 new common.dropDown({ 91 new common.dropDown({
79 el: '.fit_size', 92 el: '.fit_size',
80 ajax: 'sortsize2', 93 ajax: 'sortsize2',
81 params: function () { 94 params: function () {
82 return { 95 return {
83 - "sortId": maxSortId 96 + "sortId": sortId
84 }; 97 };
85 } 98 }
86 }); 99 });
@@ -110,7 +123,7 @@ var getNewLists = function (modelLists, callback) { @@ -110,7 +123,7 @@ var getNewLists = function (modelLists, callback) {
110 //详情模态 123 //详情模态
111 var Bll = { 124 var Bll = {
112 toast: function (url, item) { 125 toast: function (url, item) {
113 - getAllInfo(item.productSkn, item.maxSortId, function (data) { 126 + getAllInfo(item, function (data) {
114 var a = new common.dialog({ 127 var a = new common.dialog({
115 title: "试穿信息", 128 title: "试穿信息",
116 width: '80%', 129 width: '80%',
@@ -14,11 +14,11 @@ var config = { @@ -14,11 +14,11 @@ var config = {
14 apiKey: 'sd4H1ecAqlp', 14 apiKey: 'sd4H1ecAqlp',
15 // domain:'http://192.168.102.216:8080/platform', 15 // domain:'http://192.168.102.216:8080/platform',
16 // domain: 'http://172.16.6.240:8088/platform', 16 // domain: 'http://172.16.6.240:8088/platform',
17 - // domain:'http://172.16.6.240:8088/platform',// 王书生 17 + domain:'http://172.16.6.176:8088/platform',// 王书生
18 // domain: 'http://172.16.6.214:8088/platform',//陈超 18 // domain: 'http://172.16.6.214:8088/platform',//陈超
19 //http://172.16.6.124:8088/platform/product/queryAllProductAttr 19 //http://172.16.6.124:8088/platform/product/queryAllProductAttr
20 //domain: 'http://172.16.6.146:8088/platform', //玛丽 20 //domain: 'http://172.16.6.146:8088/platform', //玛丽
21 - domain: 'http://192.168.102.202:8088/platform', 21 + // domain: 'http://192.168.102.202:8088/platform',
22 //domain:'http://172.16.6.157:8080/yohobuy-platform-web',//葛超 22 //domain:'http://172.16.6.157:8080/yohobuy-platform-web',//葛超
23 //domain: 'http://172.16.6.239:8080', //孙杰翔 23 //domain: 'http://172.16.6.239:8080', //孙杰翔
24 //domain:'http://172.16.6.189:8088/platform', //李健1 24 //domain:'http://172.16.6.189:8088/platform', //李健1
@@ -88,7 +88,7 @@ @@ -88,7 +88,7 @@
88 <input class="form-control btn-sort-xiaoshou" value="[[item.salePrice]]" placeholder="默认销售价" data-index=[[index]] data-eq=[[__index]] required match="numbers" type="text"></input> 88 <input class="form-control btn-sort-xiaoshou" value="[[item.salePrice]]" placeholder="默认销售价" data-index=[[index]] data-eq=[[__index]] required match="numbers" type="text"></input>
89 </div> 89 </div>
90 <div class="col-sm-2"> 90 <div class="col-sm-2">
91 - <input class="form-control btn-sort-tiaoma" value="[[item.barCode]]" placeholder="条码" data-index=[[index]] data-eq=[[__index]]></input> 91 + <input class="form-control btn-sort-tiaoma" value="[[item.factoryCode]]" placeholder="条码" data-index=[[index]] data-eq=[[__index]]></input>
92 </div> 92 </div>
93 <div class="col-sm-2"> 93 <div class="col-sm-2">
94 <select class="form-control btn-sort-kebu" value="[[item.isSuppled||'N']]" data-index=[[index]] data-eq=[[__index]]> 94 <select class="form-control btn-sort-kebu" value="[[item.isSuppled||'N']]" data-index=[[index]] data-eq=[[__index]]>
@@ -133,8 +133,8 @@ @@ -133,8 +133,8 @@
133 <span>[[_item.sizeName]]</span> 133 <span>[[_item.sizeName]]</span>
134 </th> 134 </th>
135 <th>[[_item.salePrice]]</th> 135 <th>[[_item.salePrice]]</th>
136 - <th>[[item.modelCode]]</th>  
137 - <th>[[_item.barCode]]</th> 136 + <th>[[item.factoryCode]]</th>
  137 + <th>[[_item.factoryCode]]</th>
138 <th>[[item.factoryGoodsName]]</th> 138 <th>[[item.factoryGoodsName]]</th>
139 [[if _item.isSuppled=="Y"]] 139 [[if _item.isSuppled=="Y"]]
140 <th></th> 140 <th></th>