112 lines
6.5 KiB
PHP
112 lines
6.5 KiB
PHP
<!-- 交易列表-->
|
|
<?php
|
|
use common\utils\CommUtil;
|
|
use common\utils\EnumUtil;
|
|
use yii\widgets\LinkPager;
|
|
|
|
?>
|
|
|
|
<section class="content-header">
|
|
<!-- 查询-->
|
|
<div id="app">
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="4">
|
|
<div class="grid-content">
|
|
<el-select v-model="type" placeholder="类型" clearable >
|
|
<el-option
|
|
v-for="item in typeList"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value">
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
</el-col>
|
|
<el-button type="primary" @click="submit">查询</el-button>
|
|
</el-row>
|
|
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Main content -->
|
|
<section class="content">
|
|
<div class="box">
|
|
<div class="box-header">
|
|
<h3 class="box-title">交易列表</h3>
|
|
</div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body">
|
|
<div id="example2_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
|
|
<div class="row">
|
|
<div class="col-sm-6"></div>
|
|
<div class="col-sm-6"></div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<table id="example2" class="table table-bordered table-hover dataTable" role="grid" aria-describedby="example2_info">
|
|
<thead>
|
|
<tr role="row">
|
|
<th class="sorting_asc" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-sort="ascending"
|
|
aria-label="Rendering engine: activate to sort column descending">ID
|
|
</th>
|
|
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">发起用户ID</th>
|
|
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending">发起用户昵称</th>
|
|
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">接受用户ID</th>
|
|
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending">接受用户昵称</th>
|
|
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending">类型</th>
|
|
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending">发起用户是否确认</th>
|
|
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending">接收用户是否确认</th>
|
|
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending">是否完成</th>
|
|
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending">内容</th>
|
|
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending">创建时间</th>
|
|
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<?php foreach ($list as $item): ?>
|
|
<tr role="row">
|
|
<td><?= $item['deal_id'] ?></td>
|
|
<td><?= $item['from_user_id'] ?></td>
|
|
<td><?= $item['from_user_nickname'] ?></td>
|
|
<td><?= $item['be_user_id'] ?></td>
|
|
<td><?= $item['be_user_nickname'] ?></td>
|
|
<td><?= EnumUtil::DEAL_TYPE_LIST_STR[$item['type']] ?></td>
|
|
<td><?= EnumUtil::CONFIRM_LIST_STR[$item['from_user_confirm']] ?></td>
|
|
<td><?= EnumUtil::CONFIRM_LIST_STR[$item['be_user_confirm']] ?></td>
|
|
<td><?= EnumUtil::COMPETE_LIST_STR[$item['complete']] ?></td>
|
|
<td><?= $item['dealData'] ?></td>
|
|
<td><?= CommUtil::formatDate($item['created_at']) ?></td>
|
|
<td>
|
|
<a href="<?=\yii\helpers\Url::to(['deal/deal-edit','id'=>$item['deal_id'],'type'=>'1'])?>"><i class="fa fa-check"></i></a>
|
|
<a href="<?=\yii\helpers\Url::to(['deal/deal-edit','id'=>$item['deal_id'],'type'=>'2'])?>"><i class="fa fa-ban"></i></a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-sm-5">
|
|
<div class="dataTables_info" id="example2_info" role="status" aria-live="polite"><?= sprintf('总共%d条数据',$totalCount); ?></div>
|
|
</div>
|
|
<div class="col-sm-7">
|
|
<div class="dataTables_paginate paging_simple_numbers" id="example2_paginate">
|
|
<?= LinkPager::widget(['pagination' => $pages]); ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
</section>
|
|
|
|
<script>
|
|
let sumbitURL = "<?=\yii\helpers\Url::to(["deal/deal-list"]) ?>";
|
|
let type = "<?=Yii::$app->request->get('type');?>";
|
|
</script>
|
|
<script src="<?= Yii::$app->getHomeUrl() ?>logicjs/deal_list.js"></script>
|