0

How create a modal with grid

asked 2022-04-15 19:16:15 +0800

Cashjon91 gravatar image Cashjon91
101 2

Hi guys, I have a modal where I enter a range of dates ("from" "to") and one or more shops. The requirement is this: Depending on the inputs entered, a detailed table of the situation of orders being delivered will be displayed, showing the information in the "number of orders / capacity" format:

A row will be shown for each configured store or the row (s) of the store (s) selected in the filter.

A number of columns equal to the selected interval of days and a total summary for each week (intended as a fixed interval Mon-Sun) elapsed in the specified interval will be graphed.

The summary column will show the "total from to" information on the as is for the reference week, showing respectively the weekly total and the average of the delivery orders for the reference range.

Finally, a row of totals will be shown.

Attention: if in a day not have order I must show this "-/-". Image of requiredimage description

how I can do this? Thanks a lot.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-04-18 12:35:50 +0800

hawk gravatar image hawk
3048 1 5
http://hawkphoenix.blogsp... ZK Team

updated 2022-04-20 09:20:01 +0800

I suppose your question is about how to render that complicated Grid.

data model

I suggest you to put all your query result from each store into a ListModelList

template

I guess the Grid's data might come from several objects instead of one object. So you have to merge those object into a custom value object for this grid e.g. MyStoreData

And this value object combines multiple objects, e.g.

public class MyStoreData {
    private Store store;
    private DateRange dateRange;
    private int sum;
}

Then you can render it by the template like:

<template name="model">
    <row>
        <label value="${each.store.id}"/>
        <label value="${each.dateRange.from}"/>
        <label value="${each.dateRange.to}"/>
        <label value="${each.sum}"/>
    </row>
</template>

If this is not your issue, please describe more specifically about what have you tried and what issue do you encounter. It's better to post the related code here.

link publish delete flag offensive edit

Comments

I understand that you have say, I try it thanks a lot.

Cashjon91 ( 2022-04-20 16:53:11 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2022-04-15 19:16:15 +0800

Seen: 6 times

Last updated: Apr 20

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More