|
|
@@ -82,6 +82,13 @@ use yii\helpers\Url;
|
|
|
<a href="/admin/withdraw/xls?type=${type!}" class="btn btn-primary">导出XLS</a>
|
|
|
-->
|
|
|
</div>
|
|
|
+
|
|
|
+ <?php if ($type == 2): ?>
|
|
|
+ <div class="btn-group pull-right" style="margin-right: 10px;">
|
|
|
+ <button id="RevokeIntoGold" class="btn btn-primary">撤销出金</button>
|
|
|
+ </div>
|
|
|
+ <?php endif; ?>
|
|
|
+
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
<div class="ibox-content">
|
|
|
@@ -543,5 +550,50 @@ use yii\helpers\Url;
|
|
|
autoclose: true,
|
|
|
format: "yyyy-mm-dd"
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
+ // 撤销出金的操作
|
|
|
+ $('#RevokeIntoGold').click(function () {
|
|
|
+ var data = table.row('.selected').data();
|
|
|
+ if (data != undefined) {
|
|
|
+ swal({
|
|
|
+ title: "您确定吗?",
|
|
|
+ text: "确定撤销此订单",
|
|
|
+ type: "warning",
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonColor: "#DD6B55",
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ closeOnConfirm: true
|
|
|
+ }, function (isConfirm) {
|
|
|
+ if (isConfirm) {
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: "<?= Url::to(['revokegold']) ?>",
|
|
|
+ data: {
|
|
|
+ id: data.id,
|
|
|
+ mt4_order_id:data.mt4_order_id
|
|
|
+ },
|
|
|
+ dataType: "json",
|
|
|
+ beforeSend: function () {
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ if (data.isSuccess) {
|
|
|
+ table.ajax.reload();
|
|
|
+ } else {
|
|
|
+ toastr.error(data.msg, "提示");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ complete: function (XMLHttpRequest, textStatus) {
|
|
|
+ },
|
|
|
+ error: function () {
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
</script>
|
|
|
<?php $this->endBlock(); ?>
|