正在显示
10 个修改的文件
包含
72 行增加
和
15 行删除
| @@ -61,7 +61,7 @@ class Activity extends Backend | @@ -61,7 +61,7 @@ class Activity extends Backend | ||
| 61 | ->paginate($limit); | 61 | ->paginate($limit); |
| 62 | 62 | ||
| 63 | foreach ($list as $row) { | 63 | foreach ($list as $row) { |
| 64 | - $row->visible(['id','title','verification_coupon_ids','createtime','updatetime','closetime','price','content','phone']); | 64 | + $row->visible(['id','title','verification_coupon_ids','image','createtime','updatetime','closetime','price','content','phone']); |
| 65 | $row->visible(['store']); | 65 | $row->visible(['store']); |
| 66 | $row->getRelation('store')->visible(['name']); | 66 | $row->getRelation('store')->visible(['name']); |
| 67 | $row->visible(['coupon']); | 67 | $row->visible(['coupon']); |
| @@ -49,6 +49,7 @@ class Coupon extends Backend | @@ -49,6 +49,7 @@ class Coupon extends Backend | ||
| 49 | return $this->selectpage(); | 49 | return $this->selectpage(); |
| 50 | } | 50 | } |
| 51 | list($where, $sort, $order, $offset, $limit) = $this->buildparams(); | 51 | list($where, $sort, $order, $offset, $limit) = $this->buildparams(); |
| 52 | + | ||
| 52 | $list = $this->model | 53 | $list = $this->model |
| 53 | ->with(['store']) | 54 | ->with(['store']) |
| 54 | ->where($where) | 55 | ->where($where) |
| @@ -56,7 +57,7 @@ class Coupon extends Backend | @@ -56,7 +57,7 @@ class Coupon extends Backend | ||
| 56 | ->paginate($limit); | 57 | ->paginate($limit); |
| 57 | 58 | ||
| 58 | foreach ($list as $row) { | 59 | foreach ($list as $row) { |
| 59 | - $row->visible(['id','name','verification_coupon_ids','createtime','closetime','updatetime','type','voucher_amount','gift','consumption','reduction','consumption_name']); | 60 | + $row->visible(['id','name','createtime','closetime','updatetime','type','voucher_amount','gift','consumption','reduction','consumption_name','image']); |
| 60 | $row->visible(['store']); | 61 | $row->visible(['store']); |
| 61 | $row->getRelation('store')->visible(['name']); | 62 | $row->getRelation('store')->visible(['name']); |
| 62 | } | 63 | } |
| @@ -68,13 +69,4 @@ class Coupon extends Backend | @@ -68,13 +69,4 @@ class Coupon extends Backend | ||
| 68 | return $this->view->fetch(); | 69 | return $this->view->fetch(); |
| 69 | } | 70 | } |
| 70 | 71 | ||
| 71 | - //多选卡卷 | ||
| 72 | - public function selectbystore_id(){ | ||
| 73 | - $keyField=$this->request->request(); | ||
| 74 | - $res=$this->model->where('verification_store_id','=',$keyField['custom']['verification_store_id'])->field('id,name')->select(); | ||
| 75 | - $data['list']=$res; | ||
| 76 | - $data['total']=count($res); | ||
| 77 | - return $data; | ||
| 78 | - } | ||
| 79 | - | ||
| 80 | } | 72 | } |
| @@ -9,6 +9,7 @@ return [ | @@ -9,6 +9,7 @@ return [ | ||
| 9 | 'Updatetime' => '更新时间', | 9 | 'Updatetime' => '更新时间', |
| 10 | 'Closetime' => '截止时间', | 10 | 'Closetime' => '截止时间', |
| 11 | 'Price' => '价格', | 11 | 'Price' => '价格', |
| 12 | + 'Image' => '封面图', | ||
| 12 | 'Phone' => '联系电话', | 13 | 'Phone' => '联系电话', |
| 13 | 'Store.name' => '门店名称', | 14 | 'Store.name' => '门店名称', |
| 14 | 'Coupon.name' => '卡卷名称' | 15 | 'Coupon.name' => '卡卷名称' |
| @@ -17,5 +17,6 @@ return [ | @@ -17,5 +17,6 @@ return [ | ||
| 17 | 'Consumption' => '满减卷消费', | 17 | 'Consumption' => '满减卷消费', |
| 18 | 'Reduction' => '满减卷满减', | 18 | 'Reduction' => '满减卷满减', |
| 19 | 'Consumption_name' => '消费卷名称', | 19 | 'Consumption_name' => '消费卷名称', |
| 20 | + 'Image' => '封面图', | ||
| 20 | 'Store.name' => '门店名称' | 21 | 'Store.name' => '门店名称' |
| 21 | ]; | 22 | ]; |
| @@ -14,6 +14,20 @@ | @@ -14,6 +14,20 @@ | ||
| 14 | </div> | 14 | </div> |
| 15 | </div> | 15 | </div> |
| 16 | <div class="form-group"> | 16 | <div class="form-group"> |
| 17 | + <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label> | ||
| 18 | + <div class="col-xs-12 col-sm-8"> | ||
| 19 | + <div class="input-group"> | ||
| 20 | + <input id="c-image" class="form-control" size="50" name="row[image]" type="text"> | ||
| 21 | + <div class="input-group-addon no-border no-padding"> | ||
| 22 | + <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span> | ||
| 23 | + <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span> | ||
| 24 | + </div> | ||
| 25 | + <span class="msg-box n-right" for="c-image"></span> | ||
| 26 | + </div> | ||
| 27 | + <ul class="row list-inline faupload-preview" id="p-image"></ul> | ||
| 28 | + </div> | ||
| 29 | + </div> | ||
| 30 | + <div class="form-group"> | ||
| 17 | <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label> | 31 | <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label> |
| 18 | <div class="col-xs-12 col-sm-8"> | 32 | <div class="col-xs-12 col-sm-8"> |
| 19 | <input id="c-title" class="form-control" name="row[title]" type="text"> | 33 | <input id="c-title" class="form-control" name="row[title]" type="text"> |
| @@ -13,6 +13,20 @@ | @@ -13,6 +13,20 @@ | ||
| 13 | </div> | 13 | </div> |
| 14 | </div> | 14 | </div> |
| 15 | <div class="form-group"> | 15 | <div class="form-group"> |
| 16 | + <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label> | ||
| 17 | + <div class="col-xs-12 col-sm-8"> | ||
| 18 | + <div class="input-group"> | ||
| 19 | + <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}"> | ||
| 20 | + <div class="input-group-addon no-border no-padding"> | ||
| 21 | + <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span> | ||
| 22 | + <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span> | ||
| 23 | + </div> | ||
| 24 | + <span class="msg-box n-right" for="c-image"></span> | ||
| 25 | + </div> | ||
| 26 | + <ul class="row list-inline faupload-preview" id="p-image"></ul> | ||
| 27 | + </div> | ||
| 28 | + </div> | ||
| 29 | + <div class="form-group"> | ||
| 16 | <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label> | 30 | <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label> |
| 17 | <div class="col-xs-12 col-sm-8"> | 31 | <div class="col-xs-12 col-sm-8"> |
| 18 | <input id="c-title" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}"> | 32 | <input id="c-title" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}"> |
| @@ -7,6 +7,20 @@ | @@ -7,6 +7,20 @@ | ||
| 7 | </div> | 7 | </div> |
| 8 | </div> | 8 | </div> |
| 9 | <div class="form-group"> | 9 | <div class="form-group"> |
| 10 | + <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label> | ||
| 11 | + <div class="col-xs-12 col-sm-8"> | ||
| 12 | + <div class="input-group"> | ||
| 13 | + <input id="c-image" class="form-control" size="50" name="row[image]" type="text"> | ||
| 14 | + <div class="input-group-addon no-border no-padding"> | ||
| 15 | + <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span> | ||
| 16 | + <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span> | ||
| 17 | + </div> | ||
| 18 | + <span class="msg-box n-right" for="c-image"></span> | ||
| 19 | + </div> | ||
| 20 | + <ul class="row list-inline faupload-preview" id="p-image"></ul> | ||
| 21 | + </div> | ||
| 22 | + </div> | ||
| 23 | + <div class="form-group"> | ||
| 10 | <label class="control-label col-xs-12 col-sm-2">{:__('Closetime')}:</label> | 24 | <label class="control-label col-xs-12 col-sm-2">{:__('Closetime')}:</label> |
| 11 | <div class="col-xs-12 col-sm-8"> | 25 | <div class="col-xs-12 col-sm-8"> |
| 12 | <input id="c-closetime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[closetime]" type="text" value="{:date('Y-m-d H:i:s')}"> | 26 | <input id="c-closetime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[closetime]" type="text" value="{:date('Y-m-d H:i:s')}"> |
| @@ -24,7 +38,7 @@ | @@ -24,7 +38,7 @@ | ||
| 24 | 38 | ||
| 25 | <select id="c-type" class="form-control selectpicker" name="row[type]"> | 39 | <select id="c-type" class="form-control selectpicker" name="row[type]"> |
| 26 | {foreach name="typeList" item="vo"} | 40 | {foreach name="typeList" item="vo"} |
| 27 | - <option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option> | 41 | + <option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option> |
| 28 | {/foreach} | 42 | {/foreach} |
| 29 | </select> | 43 | </select> |
| 30 | 44 |
| @@ -60,6 +60,20 @@ | @@ -60,6 +60,20 @@ | ||
| 60 | <input id="c-consumption_name" class="form-control" name="row[consumption_name]" type="text" value="{$row.consumption_name|htmlentities}"> | 60 | <input id="c-consumption_name" class="form-control" name="row[consumption_name]" type="text" value="{$row.consumption_name|htmlentities}"> |
| 61 | </div> | 61 | </div> |
| 62 | </div> | 62 | </div> |
| 63 | + <div class="form-group"> | ||
| 64 | + <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label> | ||
| 65 | + <div class="col-xs-12 col-sm-8"> | ||
| 66 | + <div class="input-group"> | ||
| 67 | + <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}"> | ||
| 68 | + <div class="input-group-addon no-border no-padding"> | ||
| 69 | + <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span> | ||
| 70 | + <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span> | ||
| 71 | + </div> | ||
| 72 | + <span class="msg-box n-right" for="c-image"></span> | ||
| 73 | + </div> | ||
| 74 | + <ul class="row list-inline faupload-preview" id="p-image"></ul> | ||
| 75 | + </div> | ||
| 76 | + </div> | ||
| 63 | <div class="form-group layer-footer"> | 77 | <div class="form-group layer-footer"> |
| 64 | <label class="control-label col-xs-12 col-sm-2"></label> | 78 | <label class="control-label col-xs-12 col-sm-2"></label> |
| 65 | <div class="col-xs-12 col-sm-8"> | 79 | <div class="col-xs-12 col-sm-8"> |
| @@ -32,6 +32,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -32,6 +32,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
| 32 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | 32 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, |
| 33 | {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | 33 | {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, |
| 34 | {field: 'closetime', title: __('Closetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | 34 | {field: 'closetime', title: __('Closetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, |
| 35 | + {field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image}, | ||
| 35 | {field: 'price', title: __('Price'), operate:'BETWEEN'}, | 36 | {field: 'price', title: __('Price'), operate:'BETWEEN'}, |
| 36 | {field: 'phone', title: __('Phone'), operate: 'LIKE'}, | 37 | {field: 'phone', title: __('Phone'), operate: 'LIKE'}, |
| 37 | {field: 'store.name', title: __('Store.name'), operate: 'LIKE'}, | 38 | {field: 'store.name', title: __('Store.name'), operate: 'LIKE'}, |
| @@ -29,9 +29,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -29,9 +29,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
| 29 | {checkbox: true}, | 29 | {checkbox: true}, |
| 30 | {field: 'id', title: __('Id')}, | 30 | {field: 'id', title: __('Id')}, |
| 31 | {field: 'name', title: __('Name'), operate: 'LIKE'}, | 31 | {field: 'name', title: __('Name'), operate: 'LIKE'}, |
| 32 | - {field: 'createtime', title: __('Createtime'), operate:'RANGE',datetimeFormat:"YYYY-MM-DD", addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | ||
| 33 | - {field: 'closetime', title: __('Closetime'), operate:'RANGE', datetimeFormat:"YYYY-MM-DD",addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | 32 | + {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, |
| 33 | + {field: 'closetime', title: __('Closetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | ||
| 34 | {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, | 34 | {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, |
| 35 | + {field: 'type', title: __('Type'), searchList: {"0":__('Type 0'),"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3')}, formatter: Table.api.formatter.normal}, | ||
| 36 | + {field: 'voucher_amount', title: __('Voucher_amount'), operate:'BETWEEN'}, | ||
| 37 | + {field: 'gift', title: __('Gift'), operate: 'LIKE'}, | ||
| 38 | + {field: 'consumption', title: __('Consumption'), operate:'BETWEEN'}, | ||
| 39 | + {field: 'reduction', title: __('Reduction'), operate:'BETWEEN'}, | ||
| 40 | + {field: 'consumption_name', title: __('Consumption_name'), operate: 'LIKE'}, | ||
| 41 | + {field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image}, | ||
| 35 | {field: 'store.name', title: __('Store.name'), operate: 'LIKE'}, | 42 | {field: 'store.name', title: __('Store.name'), operate: 'LIKE'}, |
| 36 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | 43 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} |
| 37 | ] | 44 | ] |
| @@ -83,7 +90,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -83,7 +90,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
| 83 | Controller.api.bindevent(); | 90 | Controller.api.bindevent(); |
| 84 | 91 | ||
| 85 | }, | 92 | }, |
| 86 | - | ||
| 87 | edit: function () { | 93 | edit: function () { |
| 88 | Controller.api.bindevent(); | 94 | Controller.api.bindevent(); |
| 89 | }, | 95 | }, |
-
请 注册 或 登录 后发表评论