<%@ page language="C#" autoeventwireup="true" inherits="SB_admin_N47_Project_N47_Project_Edit, App_Web_gdfbc0dd" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>编辑项目</title>

    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/SB/control/js/My97DatePicker/WdatePicker.js?v=1")%>"></script>

    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/SB/control/easy_ui/jquery.min.js?v=1")%>"></script>

    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/SB/control/easy_ui/jquery.easyui.min.js?v=1")%>"></script>

    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/SB/control/easy_ui/locale/easyui-lang-zh_CN.js?v=1")%>"></script>

    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/SB/control/easy_ui/jquery.load.js?v=1")%>"></script>

    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/SB/control/easy_ui/jquery.json.js?v=1")%>"></script>

    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/SB/control/easy_ui/jquery.easyui.validtor.js?v=1")%>"></script>

    <script type="text/javascript" language="javascript" src="<%=ResolveUrl("~/SB/control/js/PageDialog.js?v=1")%>"></script>

    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/SB/control/easy_ui/themes/bootstrap/easyui.css?v=1")%>" />
    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/SB/control/easy_ui/themes/icon.css?v=1")%>" />
    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/SB/control/easy_ui/load.css?v=1")%>" />
    <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/SB/control/css/main.css?v=1")%>" />

    <script language="javascript" type="text/javascript">
    function userFormat(row){
            var s = '<span >' + row.u_name + '('+row.u_pys+')</span><br/>' +  
                    '<span style="color:#888">(' +row.u_isLogin+')'+ row.u_note + '</span>';  
            return s;  
    }
    $(function(){
        var value = $("#list_ImageText").val().split(',');
        if(value!="")
        $('#list_ImageText').combobox('setValues',value); 
        var value = $("#list_Photographer").val().split(',');
        if(value!="")
        $('#list_Photographer').combobox('setValues',value); 
        var value = $("#list_Planner").val().split(',');
        if(value!="")
        $('#list_Planner').combobox('setValues',value); 
        var value = $("#list_Servicer").val().split(',');
        if(value!="")
        $('#list_Servicer').combobox('setValues',value); 
        
      
        
        $("body").css("visibility","visible"); 
        
        
    });
    </script>


</head>
<body style="padding-left: 10px;visibility:hidden">
    <%--    <fieldset>--%>
    <h3>
        编辑项目</h3>
    <form id="form1" runat="server">
        <div>
            <fieldset>
                <legend>项目名称</legend>
                <table cellspacing="0" cellpadding="0" width="100%" border="0" >
                    <tr>
                        <td height="25" align="right" style="width: 117px">
                            项目名称<span>*</span>：</td>
                        <td height="25" align="left">
                            <asp:TextBox ID="txtp_name" runat="server" MaxLength="100" Width="60%"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfvp_name" runat="server" ErrorMessage="请填写项目名称"
                                ControlToValidate="txtp_name"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                </table>
            </fieldset>
            
            <fieldset>
                <legend>客户信息</legend>
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td height="25" align="right" style="width: 117px">
                            客户：<span>*</span>：</td>
                        <td height="25" align="left">
                
                            <asp:TextBox ID="txtp_customer" runat="server" MaxLength="100" Width="400px" class="easyui-combobox"  
                                    data-options="  
                                    url:'../N47_Customer/N47_Customer_ComboData.aspx',
                                    valueField: 'id',  
                                    textField: 'c_name',
                                    onSelect:customerSelect
                           ">
                            </asp:TextBox>
                            <script language="javascript"  type="text/javascript">
                                function customerSelect(row){
                                    $("#txtp_linkman").val(row.c_linkman);
                                    $("#txtp_tel").val(row.c_tel);
                                    $("#txtp_qq").val(row.c_qq);
                                    $("#txtp_contact").val(row.c_contact);
                                    $("#txtp_address").val(row.c_address);
                                }
                            </script>
                        </td>
                    </tr>
                    <tr>
                        <td height="25" align="right" style="width: 117px">
                            部门(客户)：</td>
                        <td height="25" align="left">
                            <asp:TextBox ID="txtp_depart" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="25" align="right" style="width: 117px">
                            联系人：</td>
                        <td height="25" align="left">
                            <asp:TextBox ID="txtp_linkman" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="25" align="right" style="width: 117px">
                            联系电话：</td>
                        <td height="25" align="left">
                            <asp:TextBox ID="txtp_tel" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="25" align="right" style="width: 117px">
                            QQ：</td>
                        <td height="25" align="left">
                            <asp:TextBox ID="txtp_qq" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="25" align="right" style="width: 117px">
                            其他联系方式：</td>
                        <td height="25" align="left">
                            <asp:TextBox ID="txtp_contact" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" height="25" style="width: 117px">
                            地址：</td>
                        <td align="left" height="25">
                            <asp:TextBox ID="txtp_address" runat="server" MaxLength="100" Width="400px" ></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td align="right" height="25" style="width: 117px">
                            接单人员：</td>
                        <td align="left" height="25">

                           <asp:TextBox ID="ddlp_orderTakers" runat="server"
                            class="easyui-combobox" Style="width: 200px"
                                data-options="  
                                        panelWidth: 400, 
                                        valueField: 'id',  
                                        textField: 'u_name',  
                                        url: '../N47_User/N47_User_ComboData.aspx?no=1',
                                        formatter: userFormat 
                                 ">
                            </asp:TextBox></td>
                    </tr>
                </table>
            </fieldset>
            
            
            <script language="javascript" type="text/javascript">
                function setneed(obj,id){
                    if($("#"+obj).get(0).checked){
                       $("#"+id).combobox("enable")
                    }else{
                       $("#"+id).combobox("disable").combobox("clear");
                    }
                }
                $(function(){
                    setneed("cbP_needImageText","list_ImageText");
                    setneed("cbP_needPhote","list_Photographer");
                    setneed("cbP_needPlanner","list_Planner");
                    setneed("cbP_needServicer","list_Servicer");
                });
            </script>
            <fieldset>
                <legend>项目人员安排(如果无需人员请取消"需要xx人员"勾选防止工作人员接单)</legend>
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td align="right" height="25" style="width: 117px">
                            图文人员：</td>
                        <td align="left" height="25">
                            <asp:TextBox ID="list_ImageText" runat="server" class="easyui-combobox" Style="width: 400px" 
                                data-options="  
                                        panelWidth: 400,  
                                        multiple:true, 
                                        valueField: 'id',  
                                        textField: 'u_name',  
                                        url: '../N47_User/N47_User_ComboData.aspx?no=1',
                                        formatter: userFormat 
                                 ">
                            </asp:TextBox>
                        <asp:CheckBox ID="cbP_needImageText" runat="server" Checked="True" Text="需要图文人员"  onclick='setneed("cbP_needImageText","list_ImageText")' /></td>
                    </tr>
                    <tr>
                        <td align="right" height="25" style="width: 117px">
                            摄影人员：</td>
                        <td align="left" height="25"> 
                            <asp:TextBox ID="list_Photographer" runat="server" class="easyui-combobox" Style="width: 400px" 
                                data-options="  
                                        panelWidth: 400,  
                                        multiple:true, 
                                        valueField: 'id',  
                                        textField: 'u_name',  
                                        url: '../N47_User/N47_User_ComboData.aspx?no=1',
                                        formatter: userFormat 
                                 ">
                            </asp:TextBox>
                        <asp:CheckBox ID="cbP_needPhote" runat="server" Checked="True" Text="需要摄影人员" onclick='setneed("cbP_needPhote","list_Photographer")' /></td>
                    </tr>
                    <tr>
                        <td align="right" height="25" style="width: 117px">
                            设计人员：</td>
                        <td align="left" height="25"> 
                            <asp:TextBox ID="list_Planner" runat="server" class="easyui-combobox" Style="width: 400px" 
                                data-options="  
                                        panelWidth: 400,  
                                        multiple:true, 
                                        valueField: 'id',  
                                        textField: 'u_name',  
                                        url: '../N47_User/N47_User_ComboData.aspx?no=1',
                                        formatter: userFormat 
                                 ">
                            </asp:TextBox>
                        <asp:CheckBox ID="cbP_needPlanner" runat="server" Checked="True" Text="需要设计人员" onclick='setneed("cbP_needPlanner","list_Planner")' /></td>
                    </tr>
                    <tr>
                        <td align="right" style="width: 117px; height: 25px;">
                            制作人员：</td>
                        <td align="left" style="height: 25px"> 
                            <asp:TextBox ID="list_Servicer" runat="server" class="easyui-combobox" Style="width: 400px" 
                                data-options="  
                                        panelWidth: 400,  
                                        multiple:true, 
                                        valueField: 'id',  
                                        textField: 'u_name',  
                                        url: '../N47_User/N47_User_ComboData.aspx?no=1',
                                        formatter: userFormat 
                                 ">
                            </asp:TextBox>
                        <asp:CheckBox ID="cbP_needServicer" runat="server" Checked="True" Text="需要制作人员" onclick='setneed("cbP_needServicer","list_Servicer")' /></td>
                    </tr>  
                </table>
         
                
            </fieldset>
            
            <fieldset>
            <legend>项目日期安排</legend>
            <table border="0" cellpadding="0" cellspacing="0" >
                <tr>
                    <td align="right" style="width: 117px; height: 25px;">
                        方案稿：</td>
                    <td align="left" style="height: 25px">
                        <asp:TextBox ID="txt_Program" runat="server" Style="width: 400px" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH'})" ></asp:TextBox>
                             </td>
                </tr>
                <tr>
                    <td height="25" align="right" style="width: 117px">
                        制作稿：</td>
                    <td height="25" align="left">
                        <asp:TextBox ID="txt_Production" runat="server" Style="width: 400px" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH'})" ></asp:TextBox>
                             </td>
                </tr> 
                <tr>
                    <td align="right" height="25" style="width: 117px">
                        物料完成：</td>
                    <td align="left" height="25">
                        <asp:TextBox ID="txt_Materiel" runat="server" Style="width: 400px" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH'})" ></asp:TextBox>
                             </td>
                </tr>
                <tr>
                    <td align="right" height="25" style="width: 117px">
                        派送完成：</td>
                    <td align="left" height="25">
                        <asp:TextBox ID="txt_Dispatch" runat="server" Style="width: 400px" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH'})"></asp:TextBox></td>
                </tr>
            </table>
           </fieldset>
            
            <fieldset>
                <legend>项目要求</legend>
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td>
                            设计要求(点击图像图标可放置图片)↓<a href="../../control/editor/setImgeIntroduce.htm" target="_blank">怎么上传图片啊？</a></td>
                    </tr>
                    <tr>
                        <td >
                            <CKEditor:CKEditorControl ID="txtp_design" runat="server" BasePath="~/SB/control/editor/ckeditor/"
                                Height="166px"></CKEditor:CKEditorControl>
                        </td>
                    </tr>
                    <tr>
                        <td >
                     
                     
                     <table border="0" cellpadding="0" cellspacing="0"  >
                            <tr>
                                <td style="width: 95px" >单价：</td> 
                                <td style="width: 254px" ><asp:TextBox ID="txtp_unitPrice" runat="server" MaxLength="14"></asp:TextBox><asp:RegularExpressionValidator ID="revp_unitPrice" runat="server" ControlToValidate="txtp_unitPrice" ErrorMessage="无效格式" ValidationExpression="^\d+(\.\d+)?$"></asp:RegularExpressionValidator></td>
                                <td style="width: 87px" >数量：</td>
                                <td style="width: 246px" ><asp:TextBox ID="txtp_quantity"  runat="server" MaxLength="10"></asp:TextBox><asp:RegularExpressionValidator ID="revp_quantity" runat="server" ControlToValidate="txtp_quantity"  ErrorMessage="无效格式" ValidationExpression="^[0-9]\d*$"></asp:RegularExpressionValidator></td>
                                <td style="width: 89px" >单位：</td>
                                <td ><asp:TextBox ID="txtp_unit" runat="server" MaxLength="50"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td style="width: 95px" >规格：</td>
                                <td style="width: 254px" ><asp:TextBox ID="txtp_spe" runat="server" MaxLength="50"></asp:TextBox></td>
                                <td style="width: 87px" >材料：</td>
                                <td style="width: 246px" ><asp:TextBox ID="txtp_material" runat="server" MaxLength="50"></asp:TextBox></td>
                                <td style="width: 89px" >
                                    其他工艺：</td>
                                <td ><asp:TextBox ID="txtp_technology" runat="server" MaxLength="50"></asp:TextBox></td>
                            </tr>
                                <tr>
                                    <td style="width: 95px; height: 19px">
                                        内页用纸：</td>
                                    <td style="width: 254px; height: 19px">
                                        <asp:TextBox ID="txtp_internalMaterial" runat="server"></asp:TextBox></td>
                                    <td style="width: 87px; height: 19px">
                                        外页用纸：</td>
                                    <td style="width: 246px; height: 19px">
                                        <asp:TextBox ID="txtp_outMaterial" runat="server"></asp:TextBox></td>
                                    <td style="width: 89px; height: 19px">
                                        拆装工艺：</td>
                                    <td style="height: 19px">
                                        <asp:TextBox ID="txtp_binding" runat="server"></asp:TextBox></td>
                                </tr>
                            </table>
                    </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            备注：</td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <asp:TextBox ID="txtp_note" runat="server" MaxLength="500" Rows="2" TextMode="MultiLine"  Width="89%"></asp:TextBox></td>
                    </tr>
                </table>
            </fieldset>
            
            <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td style="width: 117px; height: 24px;">
                    </td>
                    <td style="height: 24px">
                        <asp:Button ID="btnSubmit" runat="server" Text="保存编辑" Width="152px" OnClick="btnSubmit_Click"  OnClientClick="return submitContent();" Height="34px"/>&nbsp;
                        
                        <script language="javascript" type="text/javascript">
                        function submitContent(){
                             if (!Page_ClientValidate()) {
                                 return false; 
                             }
                             if($.trim($('#txtp_customer').combobox('getValue'))==""){
                                $.messager.show({title:'错误',msg:"请填写或选择客户！"});
                                return false;
                             }
                             return true;
                        }
                        


                        </script>
                    </td>
                </tr>
            </table>
        </div>
    </form>
    <%--    </fieldset>--%>
</body>
</html>
