<%@ Page Language="C#" %>
<%@ Register TagPrefix="aspxform" Namespace="XFormDesigner.Framework.Web.UI" Assembly="XFormDesigner.Framework" %>
<html xmlns:xform="xmlns:xform">
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
    <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-RIGHT: 0px; PADDING-LEFT: 2px; PADDING-BOTTOM: 0px}
    TD.NoPadding {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px}
    INPUT {HEIGHT: 20px}
    INPUT.UL {BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: #33ff33 1px solid}
    TEXTAREA {FONT-SIZE:12px}
    .yz-inp-cnt{display:inline;}
    </style>

    <script type="text/javascript">

        
            agent.on('beforeSubmit', function (action, actionname) {
            

                //更新任务状态
                if (actionname=="继续推进") {
                
                    //   XDropDownList1
                    agent.Eles[document.getElementById("TaskStatus").getAttribute("xform_xele_index")].setValue("处理中");
                }
                if (actionname == "任务关闭") {

                    //   XDropDownList1
                    agent.Eles[document.getElementById("TaskStatus").getAttribute("xform_xele_index")].setValue("关闭");
                }
                if (actionname == "任务结束") {

                    //   XDropDownList1
                    agent.Eles[document.getElementById("TaskStatus").getAttribute("xform_xele_index")].setValue("已完成");
                }

                
                

        });

    </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: 10px">
                        <asp:Label id="XLabel1" runat="server" text="任务分配"></asp:Label></td>
                    <td class="formno">
                        <asp:Label id="XLabel2" runat="server" text="表单号："></asp:Label>
                        <aspxform:XLabel id="XLabel3" runat="server" ForeColor="White" BackColor="#8AB3DF" Value ValueToDisplayText Text="--系统自动生成--" XDataBind="DF_OA_TaskAllocation.FormNo"></aspxform:XLabel>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="6">
                        <asp:Label id="Label22" runat="server" text="用户信息" value valuetodisplaytext></asp:Label>&nbsp;</td>
                </tr>
                <tr>
                    <td height="22" class="tsbottomlabel" style="WIDTH: 8%">
                        <asp:Label id="Label4" runat="server" text="创建用户"></asp:Label>
                        <aspxform:XDropDownList id="XDropDownList1" runat="server" DataMap="Department->DF_OA_TaskAllocation.Department;BUName->DF_OA_TaskAllocation.BU;Region->DF_OA_TaskAllocation.Area;" XDataSource="TableName:V_DF_HR_BasicInfo;Filter:AttendanceKakaNO->DF_OA_TaskAllocation.CreaternAccount" HiddenExpress="1"></aspxform:XDropDownList>
                        <%--<aspxform:XTextBox id="XTextBox12" style="DISPLAY: none" runat="server" Width="10px"  BorderColor="#DCDCDC" BorderWidth="1"   ValueToDisplayText="TableName:V_DF_HR_BasicInfo;FilterColumn:AttendanceKakaNO;DisplayColumn:DF_OA_TaskAllocation.CreaternAccount"  DataMap="Department->DF_OA_TaskAllocation.Department;BUName->DF_OA_TaskAllocation.BU;"></aspxform:XTextBox>--%>
                        <aspxform:XTextBox id="XTextBox1" runat="server" XDataBind="DF_OA_TaskAllocation.CreaternAccount" HiddenExpress="1"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 25%">
                        <aspxform:XTextBox id="XTextBox4" runat="server" BackColor="#e6f1f8" XDataBind="DF_OA_TaskAllocation.CreaternName" DisableExpress="1" BorderColor="#DCDCDC" BorderWidth="1" Width="60%"></aspxform:XTextBox>
                    </td>
                    <td class="ts" style="WIDTH: 8%">
                    </td>
                    <td class="ts1" style="WIDTH: 25%">
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 8%">
                        <asp:Label id="Label5" runat="server" text="创建日期"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 26%">
                        <aspxform:XDateTimePicker id="XDateTimePicker6" runat="server" BackColor="#e6f1f8" XDataBind="DF_OA_TaskAllocation.CreaternDate" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Width="60%" DisplayOnly="True" CssClass="text"></aspxform:XDateTimePicker>
                    </td>
                </tr>
                <tr>
                    <td class="ts" style="WIDTH: 8%">
                        <asp:Label id="XLabel6" runat="server" text="部门" value valuetodisplaytext></asp:Label></td>
                    <td class="ts1" style="WIDTH: 25%">
                        <aspxform:XTextBox id="XTextBox2" style="WIDTH: 60%" runat="server" BackColor="#E6F1F8" ValueToDisplayText XDataBind="DF_OA_TaskAllocation.Department" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Enabled="False"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 8%">
                        <asp:Label id="XLabel24" runat="server" text="BU" value valuetodisplaytext></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 25%">
                        <aspxform:XTextBox id="XTextBox18" style="WIDTH: 60%" runat="server" BackColor="#E6F1F8" XDataBind="DF_OA_TaskAllocation.BU" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Enabled="False"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 8%">
                        <asp:Label id="XLabel25" runat="server" text="地区" value valuetodisplaytext></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 26%">
                        <aspxform:XTextBox id="XTextBox11" style="WIDTH: 60%" runat="server" BackColor="#E6F1F8" XDataBind="DF_OA_TaskAllocation.Area" BorderColor="#DCDCDC" BorderWidth="1" Enabled="False"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="6">
                        <asp:Label id="Label9" runat="server" text="任务信息" value valuetodisplaytext></asp:Label>&nbsp;</td>
                </tr>
                <tr>
                    <td height="22" class="tsbottomlabel" style="WIDTH: 8%">
                        <asp:Label id="Label1" runat="server" text="任务接受人"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 25%">
                        <aspxform:XTextBox id="XTextBox3" runat="server" XDataBind="DF_OA_TaskAllocation.TaskRecipientAccount" HiddenExpress="1"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox5" runat="server" BackColor="#E6F1F8" XDataBind="DF_OA_TaskAllocation.TaskRecipient" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Width="50%" CssClass="text" ReadOnly="True"></aspxform:XTextBox>
                        <aspxform:XDataBrowserButton id="XDataBrowserButton4" runat="server" Text="查询" DataMap="Name->DF_OA_TaskAllocation.TaskRecipient;AttendanceKakaNO->DF_OA_TaskAllocation.TaskRecipientAccount;" XDataSource="TableName:V_DF_HR_BasicInfo" Width="35px" DisplayColumns="AttendanceKakaNO:BPM账号;Name:员工姓名;Department:部门" Height="25px"></aspxform:XDataBrowserButton>
                    </td>
                    <td height="22" class="tsbottomlabel" style="WIDTH: 8%">
                        <asp:Label id="Label8" runat="server" text="要求完成时间"></asp:Label></td>
                    <td class="ts1" style="WIDTH: 25%">
                        <aspxform:XDateTimePicker id="XDateTimePicker1" runat="server" XDataBind="DF_OA_TaskAllocation.CompletionTime" DisableExpress="Global.StepName!='经理分配任务'" BorderColor="#DCDCDC" BorderWidth="1" Width="60%"></aspxform:XDateTimePicker>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 8%">
                        <asp:Label id="Label2" runat="server" text="任务状态"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 26%">
                        <aspxform:XDropDownList id="TaskStatus" runat="server" XDataBind="DF_OA_TaskAllocation.TaskStatus" PromptText="--请选择--">
                            <asp:ListItem Selected="True" Value="处理中">处理中</asp:ListItem>
                            <asp:ListItem Value="已完成">已完成</asp:ListItem>
                            <asp:ListItem Value="关闭">关闭</asp:ListItem>
                        </aspxform:XDropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="ts" style="WIDTH: 8%">
                        <asp:Label id="Label11" runat="server" text="任务概述" value valuetodisplaytext></asp:Label></td>
                    <td class="ts1" style="WIDTH: 25%" colspan="5">
                    </td>
                </tr>
                <tr>
                    <td class="ts1" style="WIDTH: 25%" colspan="6">
                        <aspxform:XTextBox id="XTextBox6" runat="server" XDataBind="DF_OA_TaskAllocation.TaskOverview" BorderColor="#DCDCDC" BorderWidth="1" Height="80px" TextMode="MultiLine" width="100%"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="ts" style="WIDTH: 8%">
                        <asp:Label id="Label3" runat="server" text="任务详细描述" value valuetodisplaytext></asp:Label></td>
                    <td class="ts1" style="WIDTH: 25%" colspan="5">
                    </td>
                </tr>
                <tr>
                    <td class="ts1" style="WIDTH: 25%" colspan="6">
                        <aspxform:XTextBox id="XTextBox7" runat="server" XDataBind="DF_OA_TaskAllocation.TaskDetailed" BorderColor="#DCDCDC" BorderWidth="1" Height="80px" TextMode="MultiLine" width="100%"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="6">
                        <asp:Label id="Label10" runat="server" text="任务交付" value valuetodisplaytext></asp:Label>&nbsp;</td>
                </tr>
                <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label6" runat="server" text="任务说明"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 90%">
                        <aspxform:XTextBox id="XTextBox8" runat="server" XDataBind="DF_OA_TaskAllocation.MissionStatement" BorderColor="#DCDCDC" BorderWidth="1" Height="60px" TextMode="MultiLine" width="100%"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label7" runat="server" text="文件上传"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 90%">
                        <aspxform:XAttachments id="XAttachments1" runat="server" XDataBind="DF_OA_TaskAllocation.TaskEnclosure" width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml;*.emmx"></aspxform:XAttachments>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <aspxform:XRequiredFieldValidator id="请选择任务接受人" runat="server" ValidationGroup="Submit" Display="None" ErrorMessage="请选择任务接受人" ControlToValidate="XTextBox3"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator id="请选择要求完成时间" runat="server" DisableExpress="Global.StepName!='经理分配任务'" ValidationGroup="Submit" Display="None" ErrorMessage="请选择要求完成时间" ControlToValidate="XDateTimePicker1"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator id="请选择任务状态" runat="server" ValidationGroup="Submit" Display="None" ErrorMessage="请选择任务状态" ControlToValidate="TaskStatus"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator id="请填写任务概述" runat="server" ValidationGroup="Submit" Display="None" ErrorMessage="请填写任务描述" ControlToValidate="XTextBox5"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator id="请上传文件" runat="server" DisableExpress="DF_OA_TaskAllocation.MissionStatement!=''|| Global.StepName=='经理分配任务'" ValidationGroup="Submit" Display="None" ErrorMessage="请上传文件" ControlToValidate="XAttachments1"></aspxform:XRequiredFieldValidator>
        <div style="TEXT-ALIGN: center">
            <aspxform:XSignTrace id="XSignTrace1" runat="server" BorderColor="#dcdcdc" BorderWidth="1" Width="1200px"></aspxform:XSignTrace>
        </div>
    </form>
</body>
</html>
