<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:82:"D:\wwwroot\127.0.0.1010\public/../application/simple\view\member\member_peifu.html";i:1591672596;s:65:"D:\wwwroot\127.0.0.1010\application\Simple\view\public\heard.html";i:1591672596;}*/ ?>
<!doctype html>
<html class="x-admin-sm">
    <head>
        <meta charset="UTF-8">
        <title>后台登录-X-admin2.2</title>
        <meta name="renderer" content="webkit|ie-comp|ie-stand">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <link rel="stylesheet" href="/static/simple/css/font.css">
        <link rel="stylesheet" href="/static/simple/css/xadmin.css">
        <script src="/static/simple/lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="/static/simple/js/xadmin.js"></script>
        <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
        <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <div class="layui-fluid">
            <div class="layui-row">
                <form class="layui-form">
                      <div class="layui-form">
							  <table class="layui-table">
								<colgroup>
								  <col width="100">
								  <col width="200">
								  <col width="100">
								 <col >
								</colgroup>
								<tbody>
								  <tr>
									<td>订单号</td>
									<td><?php echo $res['orderno']; ?></td>
									<td>运营商</td>
									<td><?php echo $res['class']; ?></td>
								  </tr>
								  <tr>
									<td>卡号</td>
									<td><?php echo $res['card_no']; ?></td>
									<td>密码</td>
									<td><?php echo $res['card_key']; ?></td>
								  </tr>
								  <tr>
									<td>提交面额</td>
									<td><?php echo $res['money']; ?></td>
									<td>实际面额</td>
									<td><?php echo $res['settle_amt']; ?></td>
								  </tr>
								  <tr>
									<td>用户金额</td>
									<td><?php echo $res['amount']; ?></td>
									<td>系统金额</td>
									<td><?php echo $res['amount']+$res['profit']; ?></td>
								  </tr>
								  <tr>
									<td>卡状态</td>
									<td><?php echo cardstate($res['state']); ?></td>
									<td>错误详情</td>
									<td><?php echo $res['remarks']; ?></td>
								  </tr>
								  <tr>
									<td>提交时间</td>
									<td><?php echo $res['create_time']; ?></td>
									<td>处理时间</td>
									<td><?php echo $res['update_time']; ?> </td>
								  </tr>
								  <tr>
									<td>提交IP</td>
									<td><?php echo $res['ip']; ?></td>
									<td>渠道</td>
									<td><?php echo $res['atype']; ?> </td>
								  </tr>
								  
								  <tr>
                                   <td>成功渠道</td>
								   <td><select name="ChannelType" id="ChannelType" data-am-selected="{dropUp: 1}">
								                 <option value="0" >无此渠道</option>
								                <?php if(is_array($op) || $op instanceof \think\Collection || $op instanceof \think\Paginator): $i = 0; $__LIST__ = $op;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$h): $mod = ($i % 2 );++$i;?>
												  <option value="<?php echo $h['id']; ?>" <?php if($h['id'] == $res['type']): ?>selected="selected"<?php endif; ?>><?php echo $h['name']; ?></option>
												<?php endforeach; endif; else: echo "" ;endif; ?>
												</select>
								  </td>
                                <td class="am-text-left">
                                    操作
                                </td>

                                <td>
								<p>
								<input type="hidden" id="textid" value="<?php echo $res['id']; ?>"><input id="ContentPlaceHolder1_txtRealMoney" type="text" value="<?php echo $res['money']; ?>" <?php if($res['state'] == '1'): ?>disabled="disabled"<?php endif; ?> class="layui-input" placeholder="成功面额" style="width:150px;    float: left;" />
								
								<button class="layui-btn <?php if($res['state'] == '1'): ?>layui-btn-disabled"<?php endif; ?>" lay-filter="sok" lay-submit="">成功</button></p>
								</p>
                                 <input id="ContentPlaceHolder1_txtErrinfo" name="txtErrinfo" style="width:150px;    float: left;"  type="text"  <?php if($res['state'] == '2'): ?>disabled="disabled"<?php endif; ?> class="layui-input" placeholder="错误详情" />
								 </p>
                                 <button class="layui-btn <?php if($res['state'] == '2'): ?>layui-btn-disabled"<?php endif; ?>" lay-filter="sno" lay-submit="">失败</button>     

                                    
                                </td>
                                
                            </tr>
								</tbody>
							  </table>
							</div>
                </form>
            </div>
        </div>
        <script>
		layui.use(['form', 'layer'],
            function() {
                $ = layui.jquery;
                var form = layui.form,
                layer = layui.layer;
                //监听提交
                form.on('submit(sok)',
                   function(data) {
				        var id=$("#textid").val();
				        var t=$("#ChannelType").val();
				        var m=$("#ContentPlaceHolder1_txtRealMoney").val();
						layer.confirm('您确定要订单赔付吗？', function(index){
								var loading =layer.load(3, {shade: [0.1,'#fff']});
								$.post("<?php echo U('simple/card/dasucc'); ?>",{id:id,op:t,amt:m},function(res){
										layer.close(loading);
										layer.alert(res.msg,{icon:1},function(index){
										     xadmin.close();
						                     xadmin.father_reload();
											 layer.closeAll();
										});
										
								})
							})
						return false;
                  
                });
				form.on('submit(sno)',
                   function(data) {
				        var id=$("#textid").val();
						var t=$("#ChannelType").val();
				        var e=$("#ContentPlaceHolder1_txtErrinfo").val();
						layer.confirm('您确定要订单赔付吗？', function(index){
								var loading =layer.load(3, {shade: [0.1,'#fff']});
								$.post("<?php echo U('simple/card/daerr'); ?>",{id:id,op:t,str:e},function(res){
										layer.close(loading);
										layer.alert(res.msg,{icon:1},function(index){
										     xadmin.close();
						                     xadmin.father_reload();
											 layer.closeAll();
										});
								})
							})
						return false;
                  
                });

            });</script>
    </body>

</html>