This commit is contained in:
东皇 2017-09-05 19:53:03 +08:00
parent c26f8c6ab0
commit 2435e3fcce
9 changed files with 25 additions and 14 deletions

View File

@ -98,6 +98,10 @@ public class CustomerController
if (!user.isAdmin()) {
search.setAttr(User.ACCOUNT, user.getAccount());
}
// search year
if (StringUtils.isNotBlank(strSearch)) {
search.setAttr("YTD_SALE", true);
}
final ListResult<ViewModel<Customer>> result =
listViewModels(search(criteria(search, criteria), start, limit, strSearch, sorters));
return result;

View File

@ -92,13 +92,6 @@
from <include refid="table" /> customer
<!--
<if test="s.getAttr('YTD_SALE') != null">
join crm_customer_year_to_date_sale
on customer.id = customer_id
</if>
-->
<if test="s.getAttr('YTD_SALE') != null">
left join (select customer_id, max(year) year
from crm_customer_year_to_date_sale

View File

@ -6,12 +6,15 @@ export default Ember.Component.extend(BaseComponentMixin, {
classNames: ['cursor-pointer'],
'dialog-title': 'Data Filter',
'full-width': false,
filtered: Ember.computed('options.@each.selected', function() {
return this.get('options').filterBy('selected', true).length > 0;
}),
didReceiveAttrs() {
let me = this;
let filters = me.getFilters()[me.get('name')];
if (filters && filters.length) {
me.get('options').forEach(option => {
option.selected = filters.includes(option.value);
Ember.set(option, 'selected', filters.includes(option.value));
});
}
},

View File

@ -3,5 +3,9 @@ import Ember from 'ember';
export default Ember.Route.extend({
beforeModel() {
// this.transitionTo('app.list', 1);
},
activate() {
Ember.Logger.info('Index active.');
Ember.run.later(() => Ember.$('.page-content').addClass('desktop'), 1000)
}
});

View File

@ -36,7 +36,8 @@
.desktop {
background: url('../images/desktop.jpg') no-repeat center center;
background-size: contain;
/* background-size: contain; */
background-size: 100%;
}
.textarea-resize-vertical {

View File

@ -1,4 +1,4 @@
<span class="{{if (get this 'full-width') 'col-xs-12 no-padding'}}" data-rel="tooltip" title="Filter" {{action 'onClick'}}>
<span class="{{if filtered 'green'}} {{if (get this 'full-width') 'col-xs-12 no-padding'}}" data-rel="tooltip" title="Filter" {{action 'onClick'}}>
{{text}}
</span>
{{#if showModal}}

View File

@ -46,7 +46,7 @@
<th style='min-width: 86px; max-width: 168px;'>Name</th>
{{/if}}
{{#if tableOptions.showDateAdded}}
{{#sortable-th name='dateAdded' style='min-width: 102px;'}}
{{#sortable-th name='dateAdded' style='min-width: 82px;'}}
{{th-filter name='dateAdded' text='Added' label='Added Filter' options=model.dateAddedList}}
{{/sortable-th}}
{{/if}}
@ -56,7 +56,7 @@
{{/sortable-th}}
{{/if}}
{{#if tableOptions.showYtdSale}}
{{sortable-th name='sumYtdSales' text='Sales' style='min-width: 102px;'}}
{{sortable-th name='sumYtdSales' text='Sales(3Ys)' style='min-width: 102px;'}}
{{/if}}
{{#if tableOptions.showCountryCode}}
<th>
@ -126,7 +126,7 @@
{{/if}}
{{#if tableOptions.showDateAdded}}
<td>
{{date-cell value=it.dateAdded format='M/D/YYYY'}}
{{date-cell value=it.dateAdded format='YYYY'}}
</td>
{{/if}}
{{#if tableOptions.showYears}}

View File

@ -1 +1,7 @@
Lemo CMS
<div class="row center">
<i class="fa fa-envira" style="color: rgba(255, 255, 255, 0); font-size: 32em"></i>
</div>
{{!-- <div class="page-content center desktop">
TODO desktop
</div> --}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 88 KiB