<%@ Page Language="C#" %>
<%@ Register TagPrefix="aspxform" Namespace="XFormDesigner.Framework.Web.UI" Assembly="XFormDesigner.Framework" %>
<script runat="server">

    // Insert page code here
    //
        protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["qid"] != null)
            {
                this.questionnaireId.Text = Request.QueryString["qid"].ToString();
            }
        }
    }

</script>
<html xmlns:XForm="xmlns:xform">
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
     <link href="/Oimec/Styles/css/StyleSheet.css" rel="stylesheet" type="text/css" />
    <title>BPM Form</title>
    <style>
    BODY {FONT-SIZE: 12px; FONT-FAMILY: verdana}
    TABLE {border-collapse: collapse; FONT-SIZE: 12px; FONT-FAMILY: verdana}
    P {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-SIZE: 12px; FONT-FAMILY: verdana}
    TD {padding:1px}
    TD.NoPadding {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px}
    /*INPUT {height: 15px}*/
    INPUT.UL {BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: #33ff33 1px solid}
    TEXTAREA {FONT-SIZE:12px}
    input {vertical-align:middle;/*margin-right:-3px*/}
    </style>
    <script type="text/javascript">

        //加载时 刷新表单号
        Ext.onReady(function () {

            //任务编号存在时刷新
            var FormNo = agent.Eles[document.getElementById("FormNo").getAttribute("xform_xele_index")].getValue();
            if (FormNo != "" && FormNo != "--系统自动生成--")
            {
                XFormOnChange(agent.Eles[document.getElementById('FormNo').getAttribute("xform_xele_index")]);
            }

        });

    </script>
</head>
<body>
    <form runat="server">
        <!-- Insert content here -->
        <table width="1200" align="center" class="head" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td class="logo">
                    </td>
                    <td class="biaoti" style="PADDING-LEFT: 30px">
                        <asp:Label id="Label1" runat="server" text="发起问卷调查"></asp:Label></td>
                    <td class="formno">
                        <asp:Label id="Label6" runat="server" text="表单号："></asp:Label>
                        <aspxform:XLabel id="FormNo" runat="server" BackColor="#8AB3DF" Value ValueToDisplayText XDataBind="DF_OA_QuestionnaireApp_Info.FormNo" Text="--系统自动生成--"></aspxform:XLabel>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr class="title1">
                    <td height="18" colspan="4">
                        <asp:Label id="Label2" runat="server" text="基本信息"></asp:Label>
                        <aspxform:XLabel id="XLabel3" runat="server" BackColor="#D4E4FE" XDataBind="DF_OA_QuestionnaireApp_Info.Id" HiddenExpress="1"></aspxform:XLabel>
                        &nbsp; 
                    </td>
                </tr>
                <tr>
                    <td height="22" class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label8" runat="server" text="发起人"></asp:Label>
                        <aspxform:XTextBox id="XTextBox4" runat="server" XDataBind="DF_OA_QuestionnaireApp_Info.AppAccount" HiddenInput="True" BorderColor="#DCDCDC" BorderWidth="1" Width="50px"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XLabel id="XLabel1" runat="server" BackColor="#D4E4FE" XDataBind="DF_OA_QuestionnaireApp_Info.AppName"></aspxform:XLabel>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label9" runat="server" text="创建时间"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XLabel id="XLabel9" runat="server" BackColor="#D4E4FE" XDataBind="DF_OA_QuestionnaireApp_Info.CreateDate"></aspxform:XLabel>
                    </td>
                </tr>
                <tr>
                    <td height="19" class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label11" runat="server" text="BU"></asp:Label>
                        <aspxform:XDropDownList id="XDropDownList1" runat="server" HiddenExpress="1" XDataSource="TableName:V_DF_HR_BasicInfo;Filter:AttendanceKakaNO->DF_OA_QuestionnaireApp_Info.AppAccount" DataMap="BUName->DF_OA_QuestionnaireApp_Info.BU;Department->DF_OA_QuestionnaireApp_Info.Department"></aspxform:XDropDownList>
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XLabel id="XLabel7" runat="server" BackColor="#D4E4FE" XDataBind="DF_OA_QuestionnaireApp_Info.BU"></aspxform:XLabel>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label12" runat="server" text="部门"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XLabel id="XLabel8" runat="server" BackColor="#D4E4FE" XDataBind="DF_OA_QuestionnaireApp_Info.Department"></aspxform:XLabel>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label13" runat="server" text="问卷"></asp:Label>
                        <aspxform:XDropDownList id="XDropDownList2" runat="server" HiddenExpress="1" XDataSource="TableName:DF_OA_QuestionnaireInfo;Filter:Id->DF_OA_QuestionnaireApp_Info.questionnaireId" DataMap="questionnaireTitle->title"></aspxform:XDropDownList>
                        <aspxform:XTextBox id="questionnaireId" runat="server" XDataBind="DF_OA_QuestionnaireApp_Info.questionnaireId" HiddenInput="True" BorderColor="#DCDCDC" BorderWidth="1" Width="50px"></aspxform:XTextBox>
                        <aspxform:XDataBrowserButton id="XDataBrowserButton2" runat="server" Text="查询" XClass="YZSoft.Forms.Field.DataBrowserButton" HiddenExpress="1" Width="40px" XDataSource="TableName:DF_OA_QuestionnaireInfo" DataMap="Id->DF_OA_QuestionnaireApp_Info.questionnaireId;questionnaireTitle->title" DisplayColumns="questionnaireTitle:问卷标题;createDate:创建时间" Height="22px" PopupWndWidth="-1" PopupWndHeight="-1" UseSubmitBehavior="False"></aspxform:XDataBrowserButton>
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XLabel id="XLabel6" runat="server" BackColor="#D4E4FE" XDataBind="title" Font-Bold="True"></aspxform:XLabel>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        发送问卷 
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XDropDownList id="AppType" runat="server" XDataBind="DF_OA_QuestionnaireApp_Info.AppType">
                            <asp:ListItem Selected="True" Value="BPM">BPM代办</asp:ListItem>
                            <asp:ListItem Value="企业微信">企业微信</asp:ListItem>
                        </aspxform:XDropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        标题
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 35%" colspan="3">
                         <aspxform:XTextBox runat="server" Width="70%" ID="title" Express="title" XDataBind="DF_OA_QuestionnaireApp_Info.Title"></aspxform:XTextBox>
                    </td>
                </tr>
				 <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        问卷说明
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 35%" colspan="3">
                         <aspxform:XTextBox runat="server" Width="70%" ID="QuestionnaireDescription"  XDataBind="DF_OA_QuestionnaireApp_Info.QuestionnaireDescription" Rows="4"  TextMode="MultiLine" ></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1198" align="center" class="table" id="tablenew" border="0" cellspacing="0" cellpadding="0" dynamicarea="2,1" deletelastrow="Denied" >
            <tbody>
                <tr class="title1">
                    <td width="1198" colspan="3">
                        <asp:Label id="Label3" runat="server" text="调查对象"></asp:Label>
                        <aspxform:XSelectUserButton id="XSelectUserButton2" runat="server" Text="按员工添加" HiddenExpress='DF_OA_QuestionnaireApp_Info.Id!=""' Width="91px" DataMap="Account->DF_OA_QuestionnaireApp_Respondent.respondentId;DisplayName->DF_OA_QuestionnaireApp_Respondent.respondent" Height="25px" MultiSelect="True"></aspxform:XSelectUserButton>
                        &nbsp;
						 <aspxform:XExcelDataImportButton runat="server" Text="导入员工信息"  DataMap="A->DF_OA_QuestionnaireApp_Respondent.respondentId;B->DF_OA_QuestionnaireApp_Respondent.respondent"/>
                        <asp:Label id="Label4" runat="server" style="color:Red;"   Font-Size="8" text="导入规则：员工信息表格A列为员工编号，B列为员工姓名。"></asp:Label>
						</td>
                </tr>
                <tr>
                    <td class="tds">
                        姓名</td>
                    <td class="tds">
                        填写完成时间</td>
                    <td class="tds">
                        查看详情</td>
                </tr>
                <tr align="center">
                    <td align="left" class="tds1" style="WIDTH: 30%">
                        <aspxform:XTextBox id="XTextBox6" runat="server" ValueToDisplayText XDataBind="DF_OA_QuestionnaireApp_Respondent.respondent" HiddenInput="False" BorderColor="Gainsboro" BorderWidth="1px" Width="502px" Max="0" Min="0" Height="30px" TextAlign="Center" ReadOnly="True" DisableExpress="1"></aspxform:XTextBox>
                        
                    </td>
                    <td class="tds1" style="WIDTH: 30%">
                        <aspxform:XLabel id="XLabel2" runat="server" BackColor="#E9F1F4" XDataBind="subdate"></aspxform:XLabel>
                        <aspxform:XTextBox id="XTextBox8" runat="server" XDataBind="DF_OA_QuestionnaireApp_Respondent.type" HiddenInput="True" BorderColor="#DCDCDC" BorderWidth="1" Width="20px"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox5" runat="server" XDataBind="DF_OA_QuestionnaireApp_Respondent.respondentId" HiddenInput="True" BorderColor="#DCDCDC" BorderWidth="1" Width="20px"></aspxform:XTextBox>
                        <aspxform:XDropDownList id="XDropDownList3" runat="server" HiddenExpress="1" XDataSource="TableName:V_DF_OA_Questionnaire_AnswerInfo;Filter:AppAccount->DF_OA_QuestionnaireApp_Respondent.respondentId,AID->DF_OA_QuestionnaireApp_Info.Id" DataMap="TaskID->aFormNo;CompletionTime->subdate"></aspxform:XDropDownList>
                    </td>
                    <td class="tds1" style="WIDTH: 30%">
                        <aspxform:XHistoryFormLink id="XHistoryFormLink1" runat="server" BackColor="#E9F1F4" XDataBind="aFormNo" HiddenExpress="aFormNo==''" EmptyText="尚未关联">#SerialNum</aspxform:XHistoryFormLink>
                    </td>
                </tr>
            </tbody>
        </table>
    </form>
</body>
</html>
