Merge branch 'dev6.8.5-2899' into test6.8.5
Showing
1 changed file
with
22 additions
and
12 deletions
@@ -224,7 +224,7 @@ function getOrderList(){ | @@ -224,7 +224,7 @@ function getOrderList(){ | ||
224 | buttons += "<a role='detail' dataId='"+ rowData.orderCode +"' style='margin-left:10px;background-color: #5cb85c !important;'>详情</a>"; | 224 | buttons += "<a role='detail' dataId='"+ rowData.orderCode +"' style='margin-left:10px;background-color: #5cb85c !important;'>详情</a>"; |
225 | // 卖家已发货 | 225 | // 卖家已发货 |
226 | if(rowData.status == 2){ | 226 | if(rowData.status == 2){ |
227 | - buttons += "<a role='cancelOrder' dataId='"+ rowData.orderCode +"' style='margin-left:10px;background-color: #5cb85c !important;'>取消订单</a>"; | 227 | + buttons += "<a role='cancelOrder' dataId='"+ rowData.orderCode +"' style='margin-left:10px;background-color: #D31225 !important;'>取消订单</a>"; |
228 | } | 228 | } |
229 | return buttons; | 229 | return buttons; |
230 | } | 230 | } |
@@ -235,27 +235,37 @@ function getOrderList(){ | @@ -235,27 +235,37 @@ function getOrderList(){ | ||
235 | idField: "id", | 235 | idField: "id", |
236 | singleSelect: true, | 236 | singleSelect: true, |
237 | onLoadSuccess: function (data) { | 237 | onLoadSuccess: function (data) { |
238 | - $(this).datagrid("getPanel").find("a[role='detail']").linkbutton({ | 238 | + |
239 | + var me = $(this); | ||
240 | + | ||
241 | + me.datagrid("getPanel").find("a[role='detail']").linkbutton({ | ||
239 | onClick: function () { | 242 | onClick: function () { |
240 | var orderCode = $(this).attr("dataId"); | 243 | var orderCode = $(this).attr("dataId"); |
241 | window.open(contextPath + "/html/orderManage/detail.html?orderCode=" + orderCode + "&ver=" + new Date().getTime()) | 244 | window.open(contextPath + "/html/orderManage/detail.html?orderCode=" + orderCode + "&ver=" + new Date().getTime()) |
242 | } | 245 | } |
243 | }); | 246 | }); |
244 | - $(this).datagrid("getPanel").find("a[role='cancelOrder']").linkbutton({ | 247 | + |
248 | + me.datagrid("getPanel").find("a[role='cancelOrder']").linkbutton({ | ||
245 | onClick: function () { | 249 | onClick: function () { |
246 | var orderCode = $(this).attr("dataId"); | 250 | var orderCode = $(this).attr("dataId"); |
247 | - $.post(contextPath + "/buyerOrder/cancelBuyerOrder", { | ||
248 | - orderCode : orderCode | ||
249 | - }, function(data) { | ||
250 | - if (data.code == 200) { | ||
251 | - window.self.$.messager.show({ | ||
252 | - title : "提示", | ||
253 | - msg : "取消订单成功!" | 251 | + $.messager.confirm('取消订单确认','确认取消该订单?',function(r){ |
252 | + if (r){ | ||
253 | + $.post(contextPath + "/buyerOrder/cancelBuyerOrder", { | ||
254 | + orderCode : orderCode | ||
255 | + }, function(data) { | ||
256 | + if (data.code == 200) { | ||
257 | + window.self.$.messager.show({ | ||
258 | + title : "提示", | ||
259 | + msg : "取消订单成功!" | ||
260 | + }); | ||
261 | + me.datagrid('reload'); | ||
262 | + }else { | ||
263 | + window.self.$.messager.alert("失败", data.message, "error"); | ||
264 | + } | ||
254 | }); | 265 | }); |
255 | - }else { | ||
256 | - window.self.$.messager.alert("失败", data.message, "error"); | ||
257 | } | 266 | } |
258 | }); | 267 | }); |
268 | + | ||
259 | } | 269 | } |
260 | }); | 270 | }); |
261 | } | 271 | } |
-
Please register or login to post a comment