AssignPoint.razor 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. @page "/Project/AssignPoint"
  2. <PageContainer>
  3. <Breadcrumb>
  4. <Breadcrumb>
  5. <BreadcrumbItem>
  6. <a href="/Home"><Icon Type="home"></Icon></a>
  7. </BreadcrumbItem>
  8. <BreadcrumbItem>
  9. <span>分配项目点数</span>
  10. </BreadcrumbItem>
  11. </Breadcrumb>
  12. </Breadcrumb>
  13. <Content></Content>
  14. <ChildContent>
  15. <Card>
  16. <Card>
  17. <Form Model="task">
  18. <FormItem Label="我方文号">
  19. <Input @bind-Value="@context.CaseNo" />
  20. </FormItem>
  21. <FormItem Label="案件名称">
  22. <Input @bind-Value="@context.CaseName" />
  23. </FormItem>
  24. <FormItem Label="分配说明">
  25. <TextArea @bind-Value="@context.Reason" Rows="4"/>
  26. </FormItem>
  27. </Form>
  28. </Card>
  29. <Card>
  30. <Button OnClick="AddNew">添加人员绩效</Button>
  31. @if (task.ProjectDoItemPoints != null)
  32. {
  33. <AntDesign.Table TItem="wispro.sp.share.ProjectDoItemPoint"
  34. DataSource="task.ProjectDoItemPoints"
  35. Bordered=@true
  36. Size=@TableSize.Small>
  37. <RowTemplate Context="pp">
  38. <AntDesign.Column Title="处理事项" @bind-Field="@pp.DoItem" />
  39. <AntDesign.Column Title="难度系数" @bind-Field="@pp.DoItemCoefficient"/>
  40. <ActionColumn>
  41. <Space>
  42. <SpaceItem><Button OnClick="() => EditDoItem(pp.DoItem)" Type="@ButtonType.Text">修改</Button></SpaceItem>
  43. <SpaceItem><Button Danger OnClick="() => DeleteDoItem(pp.DoItem)" Type="@ButtonType.Text">删除</Button></SpaceItem>
  44. </Space>
  45. </ActionColumn>
  46. </RowTemplate>
  47. <ExpandTemplate Context="rowData">
  48. <Table DataSource="rowData.Data.PersonPoints">
  49. <AntDesign.Column Title="处理人" @bind-Field="@context.Person" Sortable Filterable />
  50. <AntDesign.Column Title="分配点数" @bind-Field="@context.Point" TData="double">
  51. @if (editId == context.Id && _visible== false)
  52. {
  53. <AntDesign.InputNumber Type="text" @bind-Value="context.Point" OnBlur="stopEdit" AutoFocus />
  54. }
  55. else
  56. {
  57. <div class="editable-cell-value-wrap" style="padding-right:10px" @onclick="() => startEdit(context.Id)">
  58. @context.Point
  59. </div>
  60. }
  61. </AntDesign.Column>
  62. <ActionColumn>
  63. <Space>
  64. <SpaceItem><Button Danger OnClick="() => Delete(rowData.Data.DoItem, context.Id)" Type="@ButtonType.Text">删除</Button></SpaceItem>
  65. </Space>
  66. </ActionColumn>
  67. </Table>
  68. </ExpandTemplate>
  69. </AntDesign.Table>
  70. }
  71. </Card>
  72. <Card>
  73. <Space Style="float:right">
  74. <SpaceItem><Button Type="primary" Icon="save" OnClick="OnSave" Style="float:right">保存</Button></SpaceItem>
  75. <SpaceItem><Button Icon="cancel" OnClick="OnCancel" Style="float:right">取消</Button></SpaceItem>
  76. </Space>
  77. </Card>
  78. </Card>
  79. </ChildContent>
  80. </PageContainer>
  81. <Modal Title="分配点数"
  82. Visible="@_visible"
  83. OnOk="@HandleOk"
  84. OnCancel="@HandleCancel"
  85. MaskClosable="false"
  86. DestroyOnClose="true"
  87. @ref="model">
  88. <Form Model="addDoItem" LabelColSpan="6"
  89. WrapperColSpan="16">
  90. <FormItem Label="处理事项">
  91. <Input @bind-Value="@context.DoItem" />
  92. </FormItem>
  93. <FormItem Label="难度系数">
  94. <Input @bind-Value="@context.DoItemCoefficient" />
  95. </FormItem>
  96. <Button OnClick="addRow" Type="primary" Style="margin-bottom:16px">添加</Button>
  97. <AntDesign.Table TItem="wispro.sp.share.PersonPoint"
  98. DataSource="addDoItem.PersonPoints"
  99. Bordered=@true
  100. Size=@TableSize.Small>
  101. <ChildContent Context="pp">
  102. <AntDesign.Column Title="处理人" TData="string" Sortable Filterable>
  103. @if (editId == pp.Id)
  104. {
  105. <Input Type="text" @bind-Value="pp.Person" />
  106. }
  107. else
  108. {
  109. <div class="editable-cell-value-wrap" style="padding-right:10px">
  110. @pp.Person
  111. </div>
  112. }
  113. </AntDesign.Column>
  114. <AntDesign.Column Width="30%" Title="分配点数" TData="double">
  115. @if (editId == pp.Id)
  116. {
  117. <AntDesign.InputNumber Type="text" @bind-Value="pp.Point" />
  118. }
  119. else
  120. {
  121. <div class="editable-cell-value-wrap" style="padding-right:10px">
  122. @pp.Point
  123. </div>
  124. }
  125. </AntDesign.Column>
  126. <ActionColumn Title="Action">
  127. @if (editId != pp.Id)
  128. {
  129. <a @onclick="() => startEdit(pp.Id)">修改</a>
  130. <a @onclick="() => deletePersonPoint(pp.Id)">删除</a>
  131. }
  132. else
  133. {
  134. <a @onclick="() => stopEdit()" class="save">保存</a>
  135. }
  136. </ActionColumn>
  137. </ChildContent>
  138. </AntDesign.Table>
  139. </Form>
  140. </Modal>