Authored by linlong

update

@@ -215,8 +215,12 @@ var g = new common.grid({ @@ -215,8 +215,12 @@ var g = new common.grid({
215 { 215 {
216 display: "申请类型", 216 display: "申请类型",
217 render: function(item) { 217 render: function(item) {
  218 + if((typeof(item.applyType) == "undefined")){
  219 + return "<p></p>"
  220 + }else{
218 return "<p>" + applyTypeEnum.applyType[item.applyType] + "</p>" 221 return "<p>" + applyTypeEnum.applyType[item.applyType] + "</p>"
219 } 222 }
  223 + }
220 }, { 224 }, {
221 display: 'SKN', 225 display: 'SKN',
222 name: 'productSkn' 226 name: 'productSkn'
@@ -310,7 +310,7 @@ var g = new common.grid({ @@ -310,7 +310,7 @@ var g = new common.grid({
310 } 310 }
311 HtmArr.push('<a href="/goods/netsale/info/' + item.productSkn + editPostion + '" class="btn btn-info btn-xs info-btn">查看</a>'); 311 HtmArr.push('<a href="/goods/netsale/info/' + item.productSkn + editPostion + '" class="btn btn-info btn-xs info-btn">查看</a>');
312 HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs chima-btn" data-index="' + item.__index + '">尺码</a>'); 312 HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs chima-btn" data-index="' + item.__index + '">尺码</a>');
313 - HtmArr.push('<br><br><input type="text" style="width:100px" name="brandSort" />'); 313 + HtmArr.push('<br><br><input type="text" style="width:100px" name="brandSort" class="brandSortText" data-index="' + item.__index + '" />');
314 HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs brandSort-btn" data-index="' + item.__index + '" >品牌排序</a>'); 314 HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs brandSort-btn" data-index="' + item.__index + '" >品牌排序</a>');
315 return HtmArr.join(''); 315 return HtmArr.join('');
316 } 316 }
@@ -642,7 +642,7 @@ $(document).on("click", ".brandSort-btn", function () { @@ -642,7 +642,7 @@ $(document).on("click", ".brandSort-btn", function () {
642 var item = g.rows[$(this).data("index")]; 642 var item = g.rows[$(this).data("index")];
643 var num = $("input:text[name='brandSort']").eq($(this).data("index")).val(); 643 var num = $("input:text[name='brandSort']").eq($(this).data("index")).val();
644 var searchSortList = []; 644 var searchSortList = [];
645 - for (var i = 0; i < 3; i++) { 645 + for (var i = 0; i < 1; i++) {
646 searchSortList[i] = { 646 searchSortList[i] = {
647 id:item.productSearchId, 647 id:item.productSearchId,
648 productSkn: item.productSkn, 648 productSkn: item.productSkn,
@@ -658,5 +658,27 @@ $(document).on("click", ".brandSort-btn", function () { @@ -658,5 +658,27 @@ $(document).on("click", ".brandSort-btn", function () {
658 } 658 }
659 }); 659 });
660 }); 660 });
  661 +
  662 +$(document).on("change", ".brandSortText", function () {
  663 + var item = g.rows[$(this).data("index")];
  664 + var num = $("input:text[name='brandSort']").eq($(this).data("index")).val();
  665 + var searchSortList = [];
  666 + for (var i = 0; i < 1; i++) {
  667 + searchSortList[i] = {
  668 + id:item.productSearchId,
  669 + productSkn: item.productSkn,
  670 + modelId: i + 1,
  671 + projectId: 1,
  672 + intValue: num
  673 + };
  674 + }
  675 + common.util.__ajax({
  676 + url: '/netSale/saveSearchSort',
  677 + data: {
  678 + searchSortList: JSON.stringify(searchSortList)
  679 + }
  680 + });
  681 + });
  682 +
661 //当点击“无需测量”,该列输入框不可编辑 683 //当点击“无需测量”,该列输入框不可编辑
662 common.sizeInfo.check(); 684 common.sizeInfo.check();
@@ -163,11 +163,13 @@ if (window.NETSALEDATA) { @@ -163,11 +163,13 @@ if (window.NETSALEDATA) {
163 } 163 }
164 } 164 }
165 searchSortList = item; 165 searchSortList = item;
  166 + var sortList = [];
  167 + sortList.push(searchSortList[0])
166 $('#sort-save').on('click', function () { 168 $('#sort-save').on('click', function () {
167 common.util.__ajax({ 169 common.util.__ajax({
168 url: '/netSale/saveSearchSort', 170 url: '/netSale/saveSearchSort',
169 data: { 171 data: {
170 - searchSortList: JSON.stringify(searchSortList) 172 + searchSortList: JSON.stringify(sortList)
171 } 173 }
172 }); 174 });
173 return false; 175 return false;