退款原因
This commit is contained in:
@@ -224,12 +224,64 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content" style="width: 100%;">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h4 class="modal-title" id="myModalLabel">温馨提示:请选择退款原因</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 text-center">
|
||||||
|
<button type="button" style="width:200px;" v-on:click="refund_reason('连接不上')" class="btn btn-info btn-lg">连接不上</button>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="col-md-6 text-center">
|
||||||
|
<button type="button" style="width:200px;" v-on:click="refund_reason('网速慢')" class="btn btn-info btn-lg">网速慢</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 text-center">
|
||||||
|
<button type="button" style="width:200px;" v-on:click="refund_reason('稳定性差')" class="btn btn-info btn-lg">稳定性差</button>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="col-md-6 text-center">
|
||||||
|
<button type="button" style="width:200px;" v-on:click="refund_reason('IP太少')" class="btn btn-info btn-lg">IP太少</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 text-center">
|
||||||
|
<button type="button" style="width:200px;" v-on:click="refund_reason('想换用其他产品')" class="btn btn-info btn-lg">想换用其他产品</button>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="col-md-6 text-center">
|
||||||
|
<button type="button" style="width:200px;" v-on:click="refund_reason(false)" class="btn btn-info btn-lg">暂时用不到了</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div>
|
||||||
|
<p style="color: red;display:none;" class="refund-info"> * 此类问题可联系专业售后客服帮助解决,解决率为95%,点击联系售后客服。</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
||||||
|
<button type="button" class="btn btn-primary confirm-refund" disabled="disabled">确定退款</button>
|
||||||
|
</div>
|
||||||
|
</div><!-- /.modal-content -->
|
||||||
|
</div><!-- /.modal -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="~/m/js/LCalendar.js" type="text/javascript" charset="utf-8"></script>
|
<script src="~/m/js/LCalendar.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var reason = '';
|
||||||
var app = new Vue({
|
var app = new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
data: {
|
data: {
|
||||||
@@ -380,6 +432,16 @@
|
|||||||
},
|
},
|
||||||
setAccountInfo(info) {
|
setAccountInfo(info) {
|
||||||
this.currentAccount = info;
|
this.currentAccount = info;
|
||||||
|
},
|
||||||
|
refund_reason(reason_info){
|
||||||
|
if(reason_info){
|
||||||
|
$(".refund-info").show();
|
||||||
|
reason = reason_info;
|
||||||
|
} else {
|
||||||
|
$(".refund-info").hide();
|
||||||
|
reason = '暂时用不到了';
|
||||||
|
}
|
||||||
|
$(".confirm-refund").removeAttr('disabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -405,8 +467,9 @@
|
|||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: '/api/course/v1/order/CaclRefund?account=' + account,
|
url: '/api/course/v1/order/CaclRefund?account=' + account,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
|
console.log(res);
|
||||||
if (res.Code == 10000) {
|
if (res.Code == 10000) {
|
||||||
var msg ="剩余:"+res.Data.RefundRestTime+",还需退款:"+ res.Data.RefundAmount+",确定要退款吗?"
|
var msg =res.Data.info +",确定要退款吗?"
|
||||||
if (!confirm(msg)) { return; }
|
if (!confirm(msg)) { return; }
|
||||||
refundFun(account);
|
refundFun(account);
|
||||||
} else {
|
} else {
|
||||||
@@ -418,7 +481,7 @@
|
|||||||
function refund(account) {
|
function refund(account) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: '/api/course/v1/order/Refund?account=' +account,
|
url: '/api/course/v1/order/Refund?account=' +account + "-" + reason,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.Code == 10000) {
|
if (res.Code == 10000) {
|
||||||
alert('退款成功')
|
alert('退款成功')
|
||||||
@@ -429,6 +492,15 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
$(".confirm-refund").on('click', function () {
|
||||||
|
var accounts = [];
|
||||||
|
$.each($('input:checkbox:checked'), function () {
|
||||||
|
accounts.push($(this).val())
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#myModal').modal('hide');
|
||||||
|
caclRefund(accounts[0],refund)
|
||||||
|
})
|
||||||
|
|
||||||
$(".btn-refund").on('click', function () {
|
$(".btn-refund").on('click', function () {
|
||||||
var accounts = [];
|
var accounts = [];
|
||||||
@@ -437,7 +509,7 @@
|
|||||||
});
|
});
|
||||||
if (accounts.length >1) { alert('一次只能退款一个账号'); return; }
|
if (accounts.length >1) { alert('一次只能退款一个账号'); return; }
|
||||||
if (accounts.length == 0) { alert('请选择账号'); return; }
|
if (accounts.length == 0) { alert('请选择账号'); return; }
|
||||||
caclRefund(accounts[0],refund)
|
$('#myModal').modal('show');
|
||||||
})
|
})
|
||||||
|
|
||||||
function isSame(data, property) {
|
function isSame(data, property) {
|
||||||
|
|||||||
Reference in New Issue
Block a user