@inherits FeedbackComponent<CreateAppealModel>



<Card Style="width:100%" Bordered>
    <div>
        <Row>
            <AntDesign.Col Span="4"><b>我方文号:</b></AntDesign.Col>
            <AntDesign.Col Span="8">@_Model.Item.CaseNo</AntDesign.Col>
            <AntDesign.Col Span="4"><b>处理事项:</b></AntDesign.Col>
            <AntDesign.Col Span="8">@_Model.Item.DoItem</AntDesign.Col>
        </Row>
        <Row><AntDesign.Col Span="24">&nbsp;</AntDesign.Col></Row>
        <Row>
            <AntDesign.Col Span="4"><b>案件名称:</b></AntDesign.Col>
            <AntDesign.Col Span="20">@_Model.Item.CaseName</AntDesign.Col>

        </Row>
    </div>
</Card>
@if (!string.IsNullOrEmpty(_ErrorMessage)) 
{ 
<Alert Message="@_ErrorMessage" Type="@AlertType.Error" />
}
<Card>
    <Form Model="@_Model" LabelColSpan="6" WrapperColSpan="16" Size="@AntSizeLDSType.Small">
        <FormItem Label="请谁确认">
            <StaffSelect @bind-StaffId="@context.AppealRecord.ReviewerId" />
        </FormItem>


        @foreach (InputField field in context.inputFields)
        {
            List<InputFieldValue> fValues = context.inputFieldValues.Where<InputFieldValue>(iv => iv.InputFieldId == field.Id).ToList();

            if (!string.IsNullOrEmpty(field.MapObjectField) && !string.IsNullOrEmpty(field.MapObjectFieldLabel))
            {
                <Divider />
                <FormItem><span>请输入 @field.FieldName ：</span></FormItem>

                @foreach (InputFieldValue temValue in fValues)
                {
                    
                            <FormItem Label="@temValue.Label">
                                @switch (temValue.InputField.FieldType)
                                {
                                    case "System.String":
                                        if (temValue.InputField.SelectValues != null && temValue.InputField.SelectValues.Count > 0)
                                        {
                                            <Select @bind-Value="@temValue.Value" DataSource="@temValue.InputField.SelectValues"
                                                    ValueName="@nameof(SelectValue.Value)"
                                                    LabelName="@nameof(SelectValue.Value)" />
                                        }
                                        else
                                        {
                                            <Input @bind-Value="@temValue.Value" />
                                        }

                                        break;
                                    case "System.DateTime":
                                        <DatePicker @bind-Value="@temValue.Value" />
                                        break;

                                    default:
                                        <Input @bind-Value="@temValue.Value" />
                                        break;

                                }

                            </FormItem>
                       
                }
                <Divider />

            }
            else
            {
                @foreach (InputFieldValue temValue in fValues)
                {
                    <FormItem Label="@temValue.InputField.FieldName">
                        @switch (temValue.InputField.FieldType)
                        {
                            case "System.String":
                                if (temValue.InputField.SelectValues != null && temValue.InputField.SelectValues.Count > 0)
                                {
                                    <Select @bind-Value="@temValue.Value" DataSource="@temValue.InputField.SelectValues"
                                            ValueName="@nameof(SelectValue.Value)"
                                            LabelName="@nameof(SelectValue.Value)" />
                                }
                                else
                                {
                                    if (temValue.InputField.MaxSize != null && temValue.InputField.MaxSize > 20)
                                    {
                                        <TextArea @bind-Value="@temValue.Value" Rows="5" />
                                    }
                                    else
                                    {
                                        <Input @bind-Value="@temValue.Value" />
                                    }

                                }

                                break;
                            case "System.DateTime":
                                <DatePicker @bind-Value="@temValue.Value" />
                                break;

                            default:
                                if (temValue.InputField.MaxSize != null && temValue.InputField.MaxSize > 20)
                                {
                                    <TextArea @bind-Value="@temValue.Value" Rows="5" />
                                }
                                else
                                {
                                    <Input @bind-Value="@temValue.Value" />
                                }
                                break;

                        }

                    </FormItem>
                }
            }

        }

        <FormItem Label="附件">
            <Upload @attributes="attrs"
                    FileList="_Model.FileList"
                    OnChange="HandleChange"
                    OnRemove="RemoveFile">
                <Button Icon="upload"><span>添加附件</span></Button>
            </Upload>
        </FormItem>
    </Form>
    
</Card>
<Divider />






