Commit 60c7426d by 朱继来

调整js

parent 4d30f0fc
Showing with 15 additions and 56 deletions
......@@ -906,11 +906,8 @@
layer.open({
title: '提醒',
content: '<div>确定推送到 <i class="error">'+sale_name+'</i> 吗?</div>',
btn:['取消','确定'],
btn:['确定', '取消'],
yes: function(index, layero){
layer.close(index);
},
btn2: function(index, layero){
$.ajax({
url : '/sendSales',
type: 'post',
......@@ -933,6 +930,9 @@
console.log(res);
}
})
},
btn2: function(index, layero){
layer.close(index);
}
});
......@@ -947,17 +947,17 @@
layer.open({
title: '删除商品'
,content: '<div><textarea type="text" class="reason" style="width:300px;height: 100px"></textarea></div><span class="error">请填写删除商品原因,100字以内</span>'
,btn:['取消','确定']
,btn:['确定', '取消']
,yes: function(index, layero){
layer.close(index);
}
,btn2: function(index, layero){
if(!$('.reason').val()){
layer.tips('请填写删除商品原因',$('.reason'));
return false;
}
deletegoods(thisobj);
}
,btn2: function(index, layero){
layer.close(index);
}
});
})
......@@ -1416,11 +1416,8 @@
layer.open({
title: '提醒',
content: content,
btn:['取消','确定'],
btn:['确定', '取消'],
yes: function(index, layero){
layer.close(index);
},
btn2: function(index, layero){
$.ajax({
url : '/ajaxSaveChange',
type: 'post',
......@@ -1444,6 +1441,9 @@
console.log(res);
}
})
},
btn2: function(index, layero){
layer.close(index);
}
});
})
......@@ -1555,11 +1555,8 @@
layer.open({
title: title
,content: shipping_section
,btn:['取消','确定']
,btn:['确定', '取消']
,yes: function(index, layero){
layer.close(index);
}
,btn2: function(index, layero){
var shipping_id = $('.shipping_id').val();
var express_no = $('.express_no').val();
......@@ -1593,49 +1590,11 @@
}
})
}
});
}
// 订单取消
$('.self_cancel').click(function(){
var order_id = $(this).data('id');
layer.open({
title: '取消订单'
,content: '<div><textarea name="cancelorder" id="cancelorder" cols="40" rows="5" placeholder="请填写取消订单的原因"></textarea></div>'
,btn:['取消','确定']
,yes: function(index, layero){
layer.close(index);
}
,btn2: function(index, layero){
var cancelorder = $('#cancelorder').val();
if(!cancelorder){
layer.tips('原因不能为空',$('#cancelorder'));
return false;
}
$.ajax({
url: '/ajaxSelfCancel',
type: 'post',
data: {order_id:order_id, reason:cancelorder},
dataType:'json',
success: function(resp) {
if(resp.errcode === 0){
layer.msg(resp.errmsg || '操作成功');
setTimeout(function(){
location.reload();
}, 1000);
} else {
layer.alert(resp.errmsg || '网络异常');
}
},
error: function(err) {
console.log(err)
}
})
layer.close(index);
}
});
})
}
// 自营审单
$('.self-check').click(function(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment