...
|
...
|
@@ -224,7 +224,7 @@ function getOrderList(){ |
|
|
buttons += "<a role='detail' dataId='"+ rowData.orderCode +"' style='margin-left:10px;background-color: #5cb85c !important;'>详情</a>";
|
|
|
// 卖家已发货
|
|
|
if(rowData.status == 2){
|
|
|
buttons += "<a role='cancelOrder' dataId='"+ rowData.orderCode +"' style='margin-left:10px;background-color: #5cb85c !important;'>取消订单</a>";
|
|
|
buttons += "<a role='cancelOrder' dataId='"+ rowData.orderCode +"' style='margin-left:10px;background-color: #D31225 !important;'>取消订单</a>";
|
|
|
}
|
|
|
return buttons;
|
|
|
}
|
...
|
...
|
@@ -235,27 +235,37 @@ function getOrderList(){ |
|
|
idField: "id",
|
|
|
singleSelect: true,
|
|
|
onLoadSuccess: function (data) {
|
|
|
$(this).datagrid("getPanel").find("a[role='detail']").linkbutton({
|
|
|
|
|
|
var me = $(this);
|
|
|
|
|
|
me.datagrid("getPanel").find("a[role='detail']").linkbutton({
|
|
|
onClick: function () {
|
|
|
var orderCode = $(this).attr("dataId");
|
|
|
window.open(contextPath + "/html/orderManage/detail.html?orderCode=" + orderCode + "&ver=" + new Date().getTime())
|
|
|
}
|
|
|
});
|
|
|
$(this).datagrid("getPanel").find("a[role='cancelOrder']").linkbutton({
|
|
|
|
|
|
me.datagrid("getPanel").find("a[role='cancelOrder']").linkbutton({
|
|
|
onClick: function () {
|
|
|
var orderCode = $(this).attr("dataId");
|
|
|
$.post(contextPath + "/buyerOrder/cancelBuyerOrder", {
|
|
|
orderCode : orderCode
|
|
|
}, function(data) {
|
|
|
if (data.code == 200) {
|
|
|
window.self.$.messager.show({
|
|
|
title : "提示",
|
|
|
msg : "取消订单成功!"
|
|
|
$.messager.confirm('取消订单确认','确认取消该订单?',function(r){
|
|
|
if (r){
|
|
|
$.post(contextPath + "/buyerOrder/cancelBuyerOrder", {
|
|
|
orderCode : orderCode
|
|
|
}, function(data) {
|
|
|
if (data.code == 200) {
|
|
|
window.self.$.messager.show({
|
|
|
title : "提示",
|
|
|
msg : "取消订单成功!"
|
|
|
});
|
|
|
me.datagrid('reload');
|
|
|
}else {
|
|
|
window.self.$.messager.alert("失败", data.message, "error");
|
|
|
}
|
|
|
});
|
|
|
}else {
|
|
|
window.self.$.messager.alert("失败", data.message, "error");
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
...
|
...
|
|