settter
parent
29847b2ad3
commit
d4c18d3a63
|
@ -119,7 +119,6 @@ class Coupon extends Base
|
||||||
*/
|
*/
|
||||||
public function info()
|
public function info()
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->request->isPost()) {
|
if ($this->request->isPost()) {
|
||||||
$model = new CouponMain();
|
$model = new CouponMain();
|
||||||
$repo = CouponRepository::getInstance($model);
|
$repo = CouponRepository::getInstance($model);
|
||||||
|
|
|
@ -197,7 +197,7 @@ trait CouponMainTrait
|
||||||
$effectiveSize = CouponMain::where($whereMap)
|
$effectiveSize = CouponMain::where($whereMap)
|
||||||
->whereTime('start_time', '<=', date('Y-m-d H:i:s'))
|
->whereTime('start_time', '<=', date('Y-m-d H:i:s'))
|
||||||
->whereTime('end_time', '>=', date('Y-m-d H:i:s'))
|
->whereTime('end_time', '>=', date('Y-m-d H:i:s'))
|
||||||
->sum(Db::Raw('(`count` - `received_count`)'));
|
->sum(Db::raw('(`count` - `received_count`)'));
|
||||||
|
|
||||||
return [
|
return [
|
||||||
// 发行总次数
|
// 发行总次数
|
||||||
|
@ -238,7 +238,9 @@ trait CouponMainTrait
|
||||||
->where($whereMap)
|
->where($whereMap)
|
||||||
->when(MemberModel::is_agency($auth['roles'] ), function ($q)use($auth) {
|
->when(MemberModel::is_agency($auth['roles'] ), function ($q)use($auth) {
|
||||||
$q->where('b.agency_code', '=', $auth['business_code']);
|
$q->where('b.agency_code', '=', $auth['business_code']);
|
||||||
});
|
})
|
||||||
|
->field("a.*,b.business_name,b.business_subtitle")
|
||||||
|
;
|
||||||
|
|
||||||
$data["total"] = $rep->count();
|
$data["total"] = $rep->count();
|
||||||
$data["list"] = $rep->order($orders)->select();
|
$data["list"] = $rep->order($orders)->select();
|
||||||
|
|
|
@ -46,18 +46,9 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect','laydate']
|
||||||
{field: 'id' , width: 80, title: 'ID'},
|
{field: 'id' , width: 80, title: 'ID'},
|
||||||
|
|
||||||
{field: 'name', title: '名称'},
|
{field: 'name', title: '名称'},
|
||||||
{templet:function(d){
|
|
||||||
if( d.business != undefined ){
|
{field: 'business_name', title: '所属商家'},
|
||||||
return d.business.business_name!=null?d.business.business_name:''
|
{field: 'business_subtitle', title: '商家简称'},
|
||||||
}
|
|
||||||
return d.business_name;
|
|
||||||
}, title: '所属商家'},
|
|
||||||
{templet:function(d){
|
|
||||||
if( d.business != undefined ){
|
|
||||||
return d.business.business_subtitle!=null?d.business.business_subtitle:''
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}, title: '商家简称'},
|
|
||||||
{field: 'agency_text', title: '渠道商名称'},
|
{field: 'agency_text', title: '渠道商名称'},
|
||||||
{field: 'money', title: '金额'},
|
{field: 'money', title: '金额'},
|
||||||
{field: 'deduction_money', title: '扣费'},
|
{field: 'deduction_money', title: '扣费'},
|
||||||
|
|
Loading…
Reference in New Issue