AssignPoint.razor 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. <Button Icon="refresh" @onclick="()=>GetProjectInfo()" Loading="@loading">获取专案信息</Button>
  21. </FormItem>
  22. <FormItem Label="案件名称">
  23. <Input @bind-Value="@context.CaseName" />
  24. </FormItem>
  25. <FormItem Label="分配说明">
  26. <TextArea @bind-Value="@context.Reason" Rows="4" />
  27. </FormItem>
  28. @if (Item != null)
  29. {
  30. <Collapse DefaultActiveKey="@(new[]{"1"})">
  31. <Panel Header="项目详情" Key="1">
  32. <FormItem Label="客户">
  33. <span>@Item.Customer.Name</span>
  34. </FormItem>
  35. <FormItem Label="案件状态">
  36. <span>@Item.CaseState</span>
  37. </FormItem>
  38. <FormItem Label="案件备注">
  39. <span>@Item.CaseMemo</span>
  40. </FormItem>
  41. </Panel>
  42. </Collapse>
  43. }
  44. </Form>
  45. </Card>
  46. <Card>
  47. <Button OnClick="AddNew">添加人员绩效</Button>
  48. @if (task.ProjectDoItemPoints != null)
  49. {
  50. <AntDesign.Table TItem="wispro.sp.share.ProjectDoItemPoint"
  51. DataSource="task.ProjectDoItemPoints"
  52. Bordered=@true
  53. Size=@TableSize.Small>
  54. <RowTemplate Context="pp">
  55. <AntDesign.Column Title="处理事项" @bind-Field="@pp.DoItem" />
  56. <AntDesign.Column Title="难度系数" @bind-Field="@pp.DoItemCoefficient"/>
  57. <ActionColumn>
  58. <Space>
  59. <SpaceItem><Button OnClick="() => EditDoItem(pp.DoItem)" Type="@ButtonType.Text">修改</Button></SpaceItem>
  60. <SpaceItem><Button Danger OnClick="() => DeleteDoItem(pp.DoItem)" Type="@ButtonType.Text">删除</Button></SpaceItem>
  61. </Space>
  62. </ActionColumn>
  63. </RowTemplate>
  64. <ExpandTemplate Context="rowData">
  65. <Table DataSource="rowData.Data.PersonPoints">
  66. <AntDesign.Column Title="处理人" @bind-Field="@context.Person" Sortable Filterable />
  67. <AntDesign.Column Title="分配点数" @bind-Field="@context.Point" TData="double">
  68. @if (editId == context.Id && _visible== false)
  69. {
  70. <AntDesign.InputNumber Type="text" @bind-Value="context.Point" OnBlur="stopEdit" AutoFocus />
  71. }
  72. else
  73. {
  74. <div class="editable-cell-value-wrap" style="padding-right:10px" @onclick="() => startEdit(context.Id)">
  75. @context.Point
  76. </div>
  77. }
  78. </AntDesign.Column>
  79. <ActionColumn>
  80. <Space>
  81. <SpaceItem><Button Danger OnClick="() => Delete(rowData.Data.DoItem, context.Id)" Type="@ButtonType.Text">删除</Button></SpaceItem>
  82. </Space>
  83. </ActionColumn>
  84. </Table>
  85. </ExpandTemplate>
  86. </AntDesign.Table>
  87. }
  88. </Card>
  89. <Card>
  90. <Space Style="float:right">
  91. <SpaceItem><Button Type="primary" Icon="save" OnClick="OnSave" Style="float:right">保存</Button></SpaceItem>
  92. <SpaceItem><Button Icon="cancel" OnClick="OnCancel" Style="float:right">取消</Button></SpaceItem>
  93. </Space>
  94. </Card>
  95. </Card>
  96. </ChildContent>
  97. </PageContainer>
  98. <Modal Title="分配点数"
  99. Visible="@_visible"
  100. OnOk="@HandleOk"
  101. OnCancel="@HandleCancel"
  102. MaskClosable="false"
  103. DestroyOnClose="true"
  104. @ref="model">
  105. <Form Model="addDoItem" LabelColSpan="6"
  106. WrapperColSpan="16">
  107. <FormItem Label="处理事项">
  108. <Input @bind-Value="@context.DoItem" />
  109. </FormItem>
  110. <FormItem Label="难度系数">
  111. <Input @bind-Value="@context.DoItemCoefficient" />
  112. </FormItem>
  113. <Button OnClick="addRow" Type="primary" Style="margin-bottom:16px">添加</Button>
  114. <AntDesign.Table TItem="wispro.sp.share.PersonPoint"
  115. DataSource="addDoItem.PersonPoints"
  116. Bordered=@true
  117. Size=@TableSize.Small>
  118. <ChildContent Context="pp">
  119. <AntDesign.Column Title="处理人" TData="string" Sortable Filterable>
  120. @if (editId == pp.Id)
  121. {
  122. <Input Type="text" @bind-Value="pp.Person" />
  123. }
  124. else
  125. {
  126. <div class="editable-cell-value-wrap" style="padding-right:10px">
  127. @pp.Person
  128. </div>
  129. }
  130. </AntDesign.Column>
  131. <AntDesign.Column Width="30%" Title="分配点数" TData="double">
  132. @if (editId == pp.Id)
  133. {
  134. <AntDesign.InputNumber Type="text" @bind-Value="pp.Point" />
  135. }
  136. else
  137. {
  138. <div class="editable-cell-value-wrap" style="padding-right:10px">
  139. @pp.Point
  140. </div>
  141. }
  142. </AntDesign.Column>
  143. <ActionColumn Title="Action">
  144. @if (editId != pp.Id)
  145. {
  146. <a @onclick="() => startEdit(pp.Id)">修改</a>
  147. <a @onclick="() => deletePersonPoint(pp.Id)">删除</a>
  148. }
  149. else
  150. {
  151. <a @onclick="() => stopEdit()" class="save">保存</a>
  152. }
  153. </ActionColumn>
  154. </ChildContent>
  155. </AntDesign.Table>
  156. </Form>
  157. </Modal>