master
wangxinglong 2021-12-22 15:09:53 +08:00
parent 0a851eab84
commit 5027b94738
3 changed files with 6 additions and 4 deletions

View File

@ -3,6 +3,7 @@
namespace app\repository;
use app\exception\RepositoryException;
use app\model\Account;
use app\model\Business;
use app\model\CouponMain;
use app\model\Deduction;
@ -42,6 +43,7 @@ class BusinessRepository extends Repository
$q = $this->model->alias("a")
->join("account b", "a.code = b.business_code")
->join("category c", "a.type = c.id","left")
->where("b.type","=",Account::type_business)
->field(["a.code as business_code",
"b.avatar_url",
"b.nick_name as account_nick_name",

View File

@ -63,7 +63,7 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect','laydate']
{field: 'deduction_money', title: '扣费'},
{field: 'start_time', title: '开始时间'},
{field: 'end_time', title: '结束时间'},
{templet: '#row-on_shelf', title: '上状态'},
{templet: '#row-on_shelf', title: '上架'},
{field: 'state_text', title: '状态'},
{field: 'create_time', title: '创建时间'},
{templet: '#row-operate', field: 'right', align: 'center', title: '操作'}

View File

@ -56,7 +56,7 @@
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">上下状态</label>
<label class="layui-form-label">上下</label>
<div class="layui-inline">
<select name="on_shelf" id="">
<option value=""></option>
@ -88,9 +88,9 @@
<script type="text/html" id="row-operate">
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/coupon/info.html?id={{d.id}}" data-title="【{{ d.name }}】详情" lay-event="info">详情</a>
{{# if(d.on_shelf == 1){ }}
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/coupon/shelf.html?id={{d.id}}&&on_shelf=0" lay-event="shelf">上架</a>
<a class="layui-btn layui-btn-xs" data-href="/manager/coupon/shelf.html?id={{d.id}}&&on_shelf=0" lay-event="shelf">上架</a>
{{# }else{ }}
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/coupon/shelf.html?id={{d.id}}&&on_shelf=1" lay-event="shelf">下架</a>
<a class="layui-btn layui-btn-xs" data-href="/manager/coupon/shelf.html?id={{d.id}}&&on_shelf=1" lay-event="shelf">下架</a>
{{# } }}
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/coupon/edit.html?id={{d.id}}" data-title="【{{ d.name }}】编辑" lay-event="info">编辑</a>
</script>