Showing
1 changed file
with
29 additions
and
0 deletions
@@ -210,6 +210,12 @@ webpackJsonp([0],[ | @@ -210,6 +210,12 @@ webpackJsonp([0],[ | ||
210 | }else if(items.guangSyncFlag == 1){ | 210 | }else if(items.guangSyncFlag == 1){ |
211 | HtmArr.push('<a data-index="' + items.__index + '" data-type="noSync" href="JavaScript:;" class="btn btn-danger btn-xs guangSynFlag">取消同步到逛</a>'); | 211 | HtmArr.push('<a data-index="' + items.__index + '" data-type="noSync" href="JavaScript:;" class="btn btn-danger btn-xs guangSynFlag">取消同步到逛</a>'); |
212 | } | 212 | } |
213 | + | ||
214 | + if(items.grassSyncFlag == 1 ){ | ||
215 | + HtmArr.push('<a data-index="' + items.__index + '" data-type="0" href="JavaScript:;" class="btn btn-primary btn-xs ">已同步到种草</a>'); | ||
216 | + }else { | ||
217 | + HtmArr.push('<a data-index="' + items.__index + '" data-type="sync" href="JavaScript:;" class="btn btn-danger btn-xs grassSynFlag">同步到种草</a>'); | ||
218 | + } | ||
213 | return HtmArr.join(''); | 219 | return HtmArr.join(''); |
214 | } | 220 | } |
215 | } | 221 | } |
@@ -333,6 +339,29 @@ webpackJsonp([0],[ | @@ -333,6 +339,29 @@ webpackJsonp([0],[ | ||
333 | 339 | ||
334 | }); | 340 | }); |
335 | 341 | ||
342 | +// 晒单同步到种草 | ||
343 | + $(document).on('click', '.grassSynFlag', function () { | ||
344 | + var item = g.rows[$(this).data("index")]; | ||
345 | + | ||
346 | + var type = $(this).data('type'); | ||
347 | + common.util.__ajax({ | ||
348 | + url: '/shareOrder/shareOrderSyncToGrass', | ||
349 | + data: { | ||
350 | + commentId: item.id, | ||
351 | + result : type | ||
352 | + } | ||
353 | + }, function (res) { | ||
354 | + // g.reload(); | ||
355 | + if (res.code == 200) { | ||
356 | + g.reload(); | ||
357 | + common.util.__tip('操作成功', 'success'); | ||
358 | + | ||
359 | + } else { | ||
360 | + common.util.__tip(res.message,'danger'); | ||
361 | + } | ||
362 | + }, false); | ||
363 | + | ||
364 | + }); | ||
336 | $(document).on('click', '#filter', function () { | 365 | $(document).on('click', '#filter', function () { |
337 | var startTime = common.util.__input('beginTime'); | 366 | var startTime = common.util.__input('beginTime'); |
338 | var endTime = common.util.__input('endTime'); | 367 | var endTime = common.util.__input('endTime'); |
-
Please register or login to post a comment