123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- @page "/individualcoefficients"
- @using AIPlatform.Protocol.Entities
- @using AIPlatform.Protocol.Model
- @using aipmgr.Models
- <Table TItem="IndividualCoefficientModel" IsBordered="true" @ref="IndividualCoefficientTable"
- IsPagination="true" PageItemsSource="@PageItemsSource" ShowLoading="true" ShowEmpty="true" EditDialogSize="Size.Large"
- ShowToolbar="true" ShowDefaultButtons="false" ShowSearch="false" ShowExtendButtons="true" ExtendButtonColumnWidth="200"
- IsFixedHeader="true" OnQueryAsync="@OnQueryAsync" OnEditAsync="OnEditAsync" OnSaveAsync="@OnSaveAsync" OnDeleteAsync="OnDeleteAsync">
- <TableToolbarTemplate>
- <TableToolbarButton TItem="IndividualCoefficientModel" Color="BootstrapBlazor.Components.Color.Success" Icon="fa fa-plus" Text="新建" TooltipText="新建个体系数" OnClick="@OnAddAsync" />
- </TableToolbarTemplate>
- <TableColumns>
- <TableColumn @bind-Field="@context.Account.Name" Text="人员" IsReadonlyWhenEdit="true" />
- <TableColumn @bind-Field="@context.CategoryName" Text="大类" IsReadonlyWhenEdit="true" />
- <TableColumn @bind-Field="@context.LabelPriceCoefficient" />
- <TableColumn @bind-Field="@context.LabelQuantityCoefficient" />
- <TableColumn @bind-Field="@context.StartEffectiveTime" FormatString="yyyy-MM-dd" />
- <TableColumn @bind-Field="@context.EndEffectiveTime" FormatString="yyyy-MM-dd" />
- </TableColumns>
- <RowButtonTemplate Context="value">
- <Button Size="Size.ExtraSmall" Color="BootstrapBlazor.Components.Color.Info" style="color:#ffffff" Text="操作记录" OnClickWithoutRender="@(()=>OpenOperateLogAsync(value))" />
- </RowButtonTemplate>
- </Table>
- <Modal @ref="Modal" OnCloseAsync="@OnCloseAsync">
- <ModalDialog Size="Size.Medium" Title="新建个体系数" IsCentered="true" ShowFooter="false">
- <BodyTemplate>
- <ValidateForm Model="@ValidateModel" OnValidSubmit="@OnSubmitAsync">
- <EditorForm TModel="IndividualCoefficientModel" AutoGenerateAllItem="false" RowType="RowType.Inline">
- <FieldItems>
- <EditorItem @bind-Field="@context.CategoryName">
- <EditTemplate Context="value">
- <div class="col-12 col-sm-12">
- <Select @bind-Value="@value.CategoryId" DisplayText="大类" ShowSearch="true" Items="@CategoryItems" OnSelectedItemChanged="@OnCategoryItemChanged" />
- </div>
- </EditTemplate>
- </EditorItem>
- <EditorItem @bind-Field="@context.AccountValues">
- <EditTemplate Context="value">
- <div class="col-12 col-sm-12">
- <MultiSelect @bind-Value="@value.AccountValues" Items="@AccountItems" />
- </div>
- </EditTemplate>
- </EditorItem>
- <EditorItem @bind-Field="@context.LabelPriceCoefficient">
- <EditTemplate Context="value">
- <div class="col-12 col-sm-12">
- <BootstrapInput @bind-Value="@value.LabelPriceCoefficient" />
- </div>
- </EditTemplate>
- </EditorItem>
- <EditorItem @bind-Field="@context.LabelQuantityCoefficient">
- <EditTemplate Context="value">
- <div class="col-12 col-sm-12">
- <BootstrapInput @bind-Value="@value.LabelQuantityCoefficient" />
- </div>
- </EditTemplate>
- </EditorItem>
- <EditorItem @bind-Field="@context.StartEffectiveTime">
- <EditTemplate Context="value">
- <div class="col-12 col-sm-12">
- <DateTimePicker @bind-Value="@value.StartEffectiveTime" />
- </div>
- </EditTemplate>
- </EditorItem>
- <EditorItem @bind-Field="@context.EndEffectiveTime">
- <EditTemplate Context="value">
- <div class="col-12 col-sm-12">
- <DateTimePicker @bind-Value="@value.EndEffectiveTime" />
- </div>
- </EditTemplate>
- </EditorItem>
- </FieldItems>
- <Buttons>
- <div class="text-end">
- <Button ButtonType="ButtonType.Submit" Icon="fa fa-save" Text="提交" />
- </div>
- </Buttons>
- </EditorForm>
- </ValidateForm>
- </BodyTemplate>
- </ModalDialog>
- </Modal>
- <Modal @ref="OperateLogModal" OnCloseAsync="@OnCloseOperateLogAsync">
- <ModalDialog ShowCloseButton="true" IsCentered="true" Size="Size.Large" Title="操作记录" ShowFooter="false">
- <BodyTemplate>
- <Table @ref="PricingOperateLogTable" TItem="PricingOperateLogModel" IsPagination="true" PageItemsSource="@PageItemsSource"
- IsStriped="true" IsBordered="true" IsFixedHeader="true" OnQueryAsync="@OnOperateLogQueryAsync" ShowDefaultButtons="false" IsAutoQueryFirstRender="false">
- <TableColumns>
- <TableColumn @bind-Field="@context.Operation" TextWrap="true" />
- <TableColumn @bind-Field="@context.Message" TextWrap="true" TextEllipsis="true" ShowTips="true" />
- <TableColumn @bind-Field="@context.UpdateTime" TextWrap="true" FormatString="yyyy-MM-dd HH:mm:ss" />
- </TableColumns>
- </Table>
- </BodyTemplate>
- </ModalDialog>
- </Modal>
- <MessageBase @ref="_messageBaseRef"></MessageBase>
|