退款原因
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
async:false,
|
||||
url: 'http://autophp.wyk/order/CashOutIndex/getData',
|
||||
url: 'http://php-api.juip.com/order/CashOutIndex/getData',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(cashOutData),
|
||||
|
||||
@@ -409,7 +409,7 @@
|
||||
}
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'http://autophp.wyk/order/CashOutIndex/index',
|
||||
url: 'http://php-api.juip.com/order/CashOutIndex/index',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(cashOutData),
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
async:false,
|
||||
url: 'http://autophp.wyk/order/CashOutIndex/getData',
|
||||
url: 'http://php-api.juip.com/order/CashOutIndex/getData',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(cashOutData),
|
||||
|
||||
@@ -496,7 +496,7 @@
|
||||
}
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'http://autophp.wyk/order/CashOutIndex/index',
|
||||
url: 'http://php-api.juip.com/order/CashOutIndex/index',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(cashOutData),
|
||||
|
||||
@@ -325,7 +325,10 @@
|
||||
</div>
|
||||
<div class="row xufeiBar">
|
||||
<div class="col-lg-6 text-left xuTui">
|
||||
<button type="button" class="btn btn-danger btn-rebuy"><img src="~/img/xufei.png"> 续费</button> <button type="button" class="btn btn-primary btn-refund"><img src="~/img/tui.png"> 退货</button><a style="color:red"> *非本系统开通账号无法退款,请联系客服处理</a>
|
||||
<button type="button" class="btn btn-danger btn-rebuy"><img src="~/img/xufei.png"> 续费</button>
|
||||
<button type="button" class="btn btn-primary btn-refund">
|
||||
<img src="~/img/tui.png"> 退货</button>
|
||||
<a style="color:red"> *非本系统开通账号无法退款,请联系客服处理</a>
|
||||
</div>
|
||||
<div class="col-lg-6 text-right">
|
||||
<button type="button" class="btn btn-primary laozhanghao"><img src="~/img/renzheng_gray.png"> 老账号认证</button>
|
||||
@@ -369,10 +372,58 @@
|
||||
@*<div class="fenye">
|
||||
@await Component.InvokeAsync("Pager", new PagerModel() { Total = Model.RowCount, PageIndex = this.Context.Request.GetInt("PageIndex") })
|
||||
</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: 70%;">
|
||||
<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:160px;" v-on:click="refund_reason('连接不上')" class="btn btn-info btn-lg">连接不上</button>
|
||||
</div>
|
||||
<div class="col-md-6 text-center">
|
||||
<button type="button" style="width:160px;" 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:160px;" v-on:click="refund_reason('稳定性差')" class="btn btn-info btn-lg">稳定性差</button>
|
||||
</div>
|
||||
<div class="col-md-6 text-center">
|
||||
<button type="button" style="width:160px;" 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:160px;" v-on:click="refund_reason('想换用其他产品')" class="btn btn-info btn-lg">想换用其他产品</button>
|
||||
</div>
|
||||
<div class="col-md-6 text-center">
|
||||
<button type="button" style="width:160px;" 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>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var reason = '';
|
||||
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
@@ -582,6 +633,16 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
refund_reason(reason_info){
|
||||
if(reason_info){
|
||||
$(".refund-info").show();
|
||||
reason = reason_info;
|
||||
} else {
|
||||
$(".refund-info").hide();
|
||||
reason = '暂时用不到了';
|
||||
}
|
||||
$(".confirm-refund").removeAttr('disabled');
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -627,7 +688,7 @@
|
||||
function refund(account) {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/api/course/v1/order/Refund?account=' +account,
|
||||
url: '/api/course/v1/order/Refund?account=' +account + "-" + reason,
|
||||
success: function (res) {
|
||||
if (res.Code == 10000) {
|
||||
alert('退款成功')
|
||||
@@ -643,11 +704,22 @@
|
||||
$.each($('input:checkbox:checked'), function () {
|
||||
accounts.push($(this).val())
|
||||
});
|
||||
if (accounts.length >1) { alert('一次只能退款一个账号'); return; }
|
||||
if (accounts.length == 0) { alert('请选择账号'); return; }
|
||||
|
||||
if (accounts.length >1) { alert('一次只能退款一个账号'); return; }
|
||||
if (accounts.length == 0) { alert('请先选择账号'); return; }
|
||||
$('#myModal').modal('show');
|
||||
})
|
||||
$(".confirm-refund").on('click', function () {
|
||||
var accounts = [];
|
||||
$.each($('input:checkbox:checked'), function () {
|
||||
accounts.push($(this).val())
|
||||
});
|
||||
|
||||
$('#myModal').modal('hide');
|
||||
caclRefund(accounts[0],refund)
|
||||
})
|
||||
|
||||
|
||||
function isSame(data, property) {
|
||||
if (data.length == 0) return true;
|
||||
var first = data[0];
|
||||
|
||||
@@ -50,6 +50,8 @@ namespace Hncore.Pass.Vpn.Domain
|
||||
public int? IsAutoRefund { get; set; } = 0;
|
||||
|
||||
public decimal? BackAmount { get; set; } = 0;
|
||||
public string RefundReason { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -689,6 +689,12 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
|
||||
|
||||
public async Task<ApiResult> Refund(int userId, string account)
|
||||
{
|
||||
var reason = "";
|
||||
if(account.Contains("-")){
|
||||
string[] arrStr = account.Split('-');
|
||||
account = arrStr[0];
|
||||
reason = arrStr[1];
|
||||
}
|
||||
var accountInfo = await m_ProductAccountService.GetAccountInfo(account, userId);
|
||||
|
||||
if (accountInfo == null)
|
||||
@@ -746,6 +752,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
|
||||
RefundAmount = refundAmount,
|
||||
RefundCount = 1,
|
||||
Remark = "退款",
|
||||
RefundReason = reason,
|
||||
};
|
||||
var time = (lastOrder.EndTime - DateTime.Now).Value;
|
||||
order.RefundRestTime = time.ToString(@"d\天hh\时mm\分");
|
||||
|
||||
Reference in New Issue
Block a user