|
|
@@ -490,22 +490,122 @@
|
|
|
}
|
|
|
|
|
|
//单式注单作废
|
|
|
- function invalid(url,ids) {
|
|
|
- layer.confirm('是否确认作废?', {
|
|
|
- btn: ['确认', '取消'] //按钮
|
|
|
- }, function() {
|
|
|
- $.getJSON(url, function(data, textStatus) {
|
|
|
- //console.log(data);
|
|
|
- if (data == '1') {
|
|
|
- reloadDataTable();
|
|
|
- layer.msg('作废成功');
|
|
|
- } else {
|
|
|
- layer.msg(data.msg);
|
|
|
+ function invalid(url,order_id,league) {
|
|
|
+ // 请求订单数据
|
|
|
+ $.getJSON("/admin/SoccerNoteList/manualmatchget", {'order_id' : order_id}, function(res) {
|
|
|
+ console.log(res);
|
|
|
+ if(1 == res.status){
|
|
|
+ const getData = res.data.matchdatas;
|
|
|
+ let content = '<div class="ibox-content" id="box" style="width: 400px !important;">';
|
|
|
+ let id = '';
|
|
|
+ let teamName = '';
|
|
|
+ let detail = '';
|
|
|
+ // 拼接玩法数据
|
|
|
+ for (let o in getData) {
|
|
|
+ id = getData[o].id;
|
|
|
+ teamName = getData[o].home_team + ' VS ' + getData[o].guest_team;
|
|
|
+ detail += getData[o].odds_name+' '+getData[o].condition+'@'+getData[o].odds+'<br>';
|
|
|
}
|
|
|
- });
|
|
|
- }, function() {
|
|
|
+ content +=
|
|
|
+ ' <div style="margin-top: 20px;margin-left: 15px; margin-bottom: 10px;">' +
|
|
|
+ ' <div class="col-5 layui-inline">' +
|
|
|
+ ' <label class="layui-form-label">联赛名称:</label>' +
|
|
|
+ ' <div class="layui-input-inline" style="line-height: 38px;">' + league +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div><br>' +
|
|
|
+ ' <div class="col-5 layui-inline">' +
|
|
|
+ ' <label class="layui-form-label">主客队:</label>' +
|
|
|
+ ' <div class="layui-input-inline" style="line-height: 38px;">' + teamName +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div><br>' +
|
|
|
+ ' <div class="col-5 layui-inline">' +
|
|
|
+ ' <label class="layui-form-label">投注信息:</label>' +
|
|
|
+ ' <div class="layui-input-inline" style="line-height: 38px;">' + detail +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div><br>' +
|
|
|
+ ' <div class="col-5 layui-inline">' +
|
|
|
+ ' <label class="layui-form-label">投注金额 :</label>' +
|
|
|
+ ' <div class="layui-input-inline" style="line-height: 38px;">' + res.data.money +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div><br>' +
|
|
|
+ ' <div class="col-5 layui-inline">' +
|
|
|
+ ' <label class="layui-form-label">最高可赢 :</label>' +
|
|
|
+ ' <div class="layui-input-inline" style="line-height: 38px;">' + res.data.prize_money +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div><br>' +
|
|
|
+ ' <div class="col-5 layui-inline">' +
|
|
|
+ ' <label class="layui-form-label">下注时间 :</label>' +
|
|
|
+ ' <div class="layui-input-inline" style="line-height: 38px;">' + res.data.money_time +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div><br>' +
|
|
|
+// ' <div style="color: #5f5f5f; margin-left: 10px; margin-bottom: 10px;">' + teamName + '</div>' +
|
|
|
+ ' <div class="col-5 layui-inline">' +
|
|
|
+ ' <label class="layui-form-label">作废原因:</label>' +
|
|
|
+ ' <div class="layui-input-inline" style="">' +
|
|
|
+ ' <input type="text" name="" id="reason' + id + '" placeholder="请输入作废原因" eventType="event-query" lay-verify="required" autocomplete="off" class="layui-input">' +
|
|
|
+ ' </div><br>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>';
|
|
|
+ content += '</div>';
|
|
|
+ // 打开弹窗.
|
|
|
+ layer.open({
|
|
|
+ area: ['400px', '480px'], //宽高
|
|
|
+ type: 1,
|
|
|
+ title: '注单作废',
|
|
|
+ content: content, //这里content是一个DOM,注意:最好该元素要存放在body最外层,否则可能被其它的相对元素所影响,
|
|
|
+ btn: ['提交', '取消'],
|
|
|
+ yes: function(index, layero){
|
|
|
+ let orderdata = [];
|
|
|
+ let reason = '';
|
|
|
+ let resultInfo = '';
|
|
|
+ // 循环获取输入的数据.
|
|
|
+
|
|
|
+ reason = $("#reason" + id).val();
|
|
|
+ //console.log(reason);
|
|
|
+ url = url+'&reason='+reason;
|
|
|
+ // 请求设置接口
|
|
|
+ console.log(url);
|
|
|
+ $.ajax({
|
|
|
+ type: 'get',
|
|
|
+ dataType: 'json',
|
|
|
+ url: url,
|
|
|
+ data: {reason: reason},
|
|
|
+ success: function(res) {
|
|
|
+ console.log(res);
|
|
|
+ if (1 == res) {
|
|
|
+ layer.alert("设置成功", {title: '友情提示', icon: 1, closeBtn: 0}, function(){
|
|
|
+ window.location.reload();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ layer.alert("服务器异常", {title: '友情提示', icon: 2});
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function () {
|
|
|
+ layer.alert("服务器异常", {title: '友情提示', icon: 2});
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ layer.alert("数据拉取失败", {title: '友情提示', icon: 2});
|
|
|
+ }
|
|
|
|
|
|
- });
|
|
|
+ });
|
|
|
+// layer.confirm('是否确认作废?', {
|
|
|
+// btn: ['确认', '取消'] //按钮
|
|
|
+// }, function() {
|
|
|
+// $.getJSON(url, function(data, textStatus) {
|
|
|
+// //console.log(data);
|
|
|
+// if (data == '1') {
|
|
|
+// reloadDataTable();
|
|
|
+// layer.msg('作废成功');
|
|
|
+// } else {
|
|
|
+// layer.msg(data.msg);
|
|
|
+// }
|
|
|
+// });
|
|
|
+// }, function() {
|
|
|
+//
|
|
|
+// });
|
|
|
|
|
|
}
|
|
|
</script>
|