...
|
...
|
@@ -300,7 +300,7 @@ var g = new common.grid({ |
|
|
display: '操作',
|
|
|
render: function (item) {
|
|
|
var HtmArr = [];
|
|
|
|
|
|
var intValue ;
|
|
|
if (item.status == 4 || item.status == 1 || item.status == 5 || item.status == 6) {
|
|
|
HtmArr.push('<a href="/goods/netsale/edit/' + item.productSkn + editPostion + '" class="btn btn-info btn-xs edit-btn">编辑</a>');
|
|
|
HtmArr.push('<a href="javascript:;" class="btn btn-danger btn-xs shelve-btn" data-index="' + item.__index + '">下架</a>');
|
...
|
...
|
@@ -310,7 +310,12 @@ var g = new common.grid({ |
|
|
}
|
|
|
HtmArr.push('<a href="/goods/netsale/info/' + item.productSkn + editPostion + '" class="btn btn-info btn-xs info-btn">查看</a>');
|
|
|
HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs chima-btn" data-index="' + item.__index + '">尺码</a>');
|
|
|
HtmArr.push('<br><br><input type="text" style="width:100px" name="brandSort" class="brandSortText" data-index="' + item.__index + '" value='[[productSearchId]]' />');
|
|
|
if(typeof(item.productSearch) == "undefined"){
|
|
|
intValue = "";
|
|
|
}else{
|
|
|
intValue=item.productSearch.intValue;
|
|
|
}
|
|
|
HtmArr.push('<br><br><input type="text" style="width:100px" name="brandSort" class="brandSortText" data-index="' + item.__index + '" value='+intValue+'>');
|
|
|
HtmArr.push('<a href="javascript:;" class="btn btn-success btn-xs brandSort-btn" data-index="' + item.__index + '" >品牌排序</a>');
|
|
|
return HtmArr.join('');
|
|
|
}
|
...
|
...
|
@@ -644,7 +649,6 @@ $(document).on("click", ".brandSort-btn", function () { |
|
|
var searchSortList = [];
|
|
|
for (var i = 0; i < 1; i++) {
|
|
|
searchSortList[i] = {
|
|
|
id:item.productSearchId,
|
|
|
productSkn: item.productSkn,
|
|
|
modelId: i + 1,
|
|
|
projectId: 1,
|
...
|
...
|
@@ -656,29 +660,31 @@ $(document).on("click", ".brandSort-btn", function () { |
|
|
data: {
|
|
|
searchSortList: JSON.stringify(searchSortList)
|
|
|
}
|
|
|
});
|
|
|
},function(res){
|
|
|
g.reload();
|
|
|
}
|
|
|
);
|
|
|
});
|
|
|
|
|
|
$(document).on("change", ".brandSortText", function () {
|
|
|
var item = g.rows[$(this).data("index")];
|
|
|
var num = $("input:text[name='brandSort']").eq($(this).data("index")).val();
|
|
|
var searchSortList = [];
|
|
|
for (var i = 0; i < 1; i++) {
|
|
|
searchSortList[i] = {
|
|
|
id:item.productSearchId,
|
|
|
productSkn: item.productSkn,
|
|
|
modelId: i + 1,
|
|
|
projectId: 1,
|
|
|
intValue: num
|
|
|
};
|
|
|
}
|
|
|
common.util.__ajax({
|
|
|
url: '/netSale/saveSearchSort',
|
|
|
data: {
|
|
|
searchSortList: JSON.stringify(searchSortList)
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
// $(document).on("change", ".brandSortText", function () {
|
|
|
// var item = g.rows[$(this).data("index")];
|
|
|
// var num = $("input:text[name='brandSort']").eq($(this).data("index")).val();
|
|
|
// var searchSortList = [];
|
|
|
// for (var i = 0; i < 1; i++) {
|
|
|
// searchSortList[i] = {
|
|
|
// productSkn: item.productSkn,
|
|
|
// modelId: i + 1,
|
|
|
// projectId: 1,
|
|
|
// intValue: num
|
|
|
// };
|
|
|
// }
|
|
|
// common.util.__ajax({
|
|
|
// url: '/netSale/saveSearchSort',
|
|
|
// data: {
|
|
|
// searchSortList: JSON.stringify(searchSortList)
|
|
|
// }
|
|
|
// });
|
|
|
// });
|
|
|
|
|
|
//当点击“无需测量”,该列输入框不可编辑
|
|
|
common.sizeInfo.check(); |
|
|
\ No newline at end of file |
...
|
...
|
|