Forráskód Böngészése

商邀行程控件修改,新增签证提成录入

wangh 1 éve%!(EXTRA string=óta)
szülő
commit
ba13421c12

+ 1 - 0
DAL/DAL.csproj

@@ -146,6 +146,7 @@
     <Compile Include="ViewbreakfastPriceService.cs" />
     <Compile Include="VisaCheckTimeForBackService.cs" />
     <Compile Include="VisaChekOutTimeService.cs" />
+    <Compile Include="VisaCommissionService.cs" />
     <Compile Include="VisaCustomerCompanyService.cs" />
     <Compile Include="VisaCustomerFamilyService.cs" />
     <Compile Include="VisaCustomerSchoolService.cs" />

+ 11 - 0
DAL/ServiceBase.cs

@@ -2485,6 +2485,17 @@ namespace DAL
                                 (t as grouopExceedView).Coefficient = string.IsNullOrWhiteSpace(dr["Coefficient"].ToString()) ? 0.00M : decimal.Parse(dr["Coefficient"].ToString());
                                 (t as grouopExceedView).remark = dr["remark"].ToString();
                                 break;
+                            case "VisaCommission":
+                                (t as VisaCommission).Id = Convert.ToInt32(dr["Id"]);
+                                (t as VisaCommission).DiId = Convert.ToInt32(dr["DiId"]);
+                                (t as VisaCommission).UId = Convert.ToInt32(dr["UId"]);
+                                (t as VisaCommission).Number = Convert.ToInt32(dr["Number"]);
+                                (t as VisaCommission).Nation = dr["Nation"].ToString();
+                                (t as VisaCommission).CreateUserId = Convert.ToInt32(dr["CreateUserId"]);
+                                (t as VisaCommission).CreateDateTime = dr["CreateDateTime"].ToString();
+                                (t as VisaCommission).Remark = dr["Remark"].ToString();
+                                (t as VisaCommission).IsDel = Convert.ToInt32(dr["IsDel"]);
+                                break;
                         }
                         tList.Add(t);
                     }

+ 121 - 0
DAL/VisaCommissionService.cs

@@ -0,0 +1,121 @@
+using Models;
+using System;
+using System.Collections.Generic;
+using System.Data.SqlClient;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DAL
+{
+    public class VisaCommissionService
+    {
+        /// <summary>
+        /// 查询集合
+        /// </summary>
+        /// <param name="sql"></param>
+        /// <param name="param"></param>
+        /// <returns></returns>
+        List<VisaCommission> excuteSql(string sql, params SqlParameter[] param)
+        {
+            return ServiceBase<VisaCommission>.excuteSql(new VisaCommission(), "VisaCommission", sql, CommandType.Text, param);
+        }
+        /// <summary>
+        /// 查询单个
+        /// </summary>
+        /// <param name="sql"></param>
+        /// <param name="param"></param>
+        /// <returns></returns>
+        VisaCommission excuteType(string sql, params SqlParameter[] param)
+        {
+            //查询结果放入对象集合
+            List<VisaCommission> hdList = excuteSql(sql, param);
+            VisaCommission visa = new VisaCommission();
+
+            //判断集合是否为空
+            if (hdList == null || hdList.Count == 0)
+            {
+                //返回null
+                return null;
+            }
+            //返回单个对象
+            return hdList[0];
+        }
+        /// <summary>
+        /// 根据团组Id和国家查询单条
+        /// </summary>
+        /// <param name="ShortCode"></param>
+        /// <returns></returns>
+        public VisaCommission getByDiId(int diid,string Nation,int UserId)
+        {
+            return excuteType("select * from VisaCommission where Nation='" + Nation + "' and Isdel=0 and DiId=@diid and UId="+ UserId, new SqlParameter("@diid", diid));
+        }
+        /// <summary>
+        /// 增加
+        /// </summary>
+        /// <param name="cd"></param>
+        /// <returns></returns>
+        public bool Add(VisaCommission Vc)
+        {
+            string sql = "insert into VisaCommission values(@DiId,@UId,@Number,@Nation,@CreateUserId,@CreateDateTime,@Remark,@IsDel)";
+
+            SqlParameter[] parameter = new SqlParameter[]{
+                new SqlParameter("@DiId",Vc.DiId),
+                new SqlParameter("@UId",Vc.UId),
+                new SqlParameter("@Number",Vc.Number),
+                new SqlParameter("@Nation",Vc.Nation),
+                new SqlParameter("@CreateUserId",Vc.CreateUserId),
+                new SqlParameter("@CreateDateTime",Vc.CreateDateTime),
+                new SqlParameter("@Remark",Vc.Remark),
+                new SqlParameter("@IsDel",Vc.IsDel)
+            };
+
+            if (SqlHelper.ExecuteNonQuery(sql, CommandType.Text, parameter) > 0)
+                return true;
+            return false;
+        }
+        /// <summary>
+        /// 获取信用卡账单类型费用
+        /// </summary>
+        /// <returns></returns>
+        public List<VisaCommission> GetAll(int diid,int UserId)
+        {
+            return excuteSql("select * from VisaCommission where DiId="+diid+ " and isdel = 0 and UId="+UserId);
+        }
+        /// <summary>
+        /// 编辑
+        /// </summary>
+        /// <param name="sdt"></param>
+        /// <returns></returns>
+        public bool Edit(VisaCommission Vc)
+        {
+            string sql = "update VisaCommission set Number=@Number,CreateUserId=@CreateUserId,CreateDateTime=@CreateDateTime,Remark=@Remark where Id = @Id";
+
+            SqlParameter[] parameter = new SqlParameter[]{
+                new SqlParameter("@Id ",Vc.Id ),
+                new SqlParameter("@Number",Vc.Number),
+                new SqlParameter("@Remark",Vc.Remark),
+                new SqlParameter("@CreateUserId",Vc.CreateUserId),
+                new SqlParameter("@CreateDateTime",Vc.CreateDateTime),
+            };
+
+            if (SqlHelper.ExecuteNonQuery(sql, CommandType.Text, parameter) > 0)
+                return true;
+            return false;
+        }
+
+        /// <summary>
+        /// 删除
+        /// </summary>
+        /// <param name="id"></param>
+        /// <returns></returns>
+        public bool Del(int id)
+        {
+            if (SqlHelper.ExecuteNonQuery("update VisaCommission set IsDel = 1 where Id = @Id", CommandType.Text, new SqlParameter("@Id", id)) > 0)
+                return true;
+            return false;
+        }
+
+    }
+}

+ 1 - 0
Models/Models.csproj

@@ -139,6 +139,7 @@
     <Compile Include="ViewbreakfastPrice.cs" />
     <Compile Include="VisaCheckOutTime.cs" />
     <Compile Include="VisaCheckTimeForBack.cs" />
+    <Compile Include="VisaCommission.cs" />
     <Compile Include="VisaCustomer.cs" />
     <Compile Include="VisaCustomerCompany.cs" />
     <Compile Include="VisaCustomerFamily.cs" />

+ 51 - 0
Models/VisaCommission.cs

@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Models
+{
+    /// <summary>
+    /// 签证提成表
+    /// </summary>
+    public class VisaCommission
+    {
+        /// <summary>
+        /// 主键Id
+        /// </summary>
+        public int Id { get; set; }
+        /// <summary>
+        /// 团组Id
+        /// </summary>
+        public int DiId { get; set; }
+        /// <summary>
+        /// 员工Id
+        /// </summary>
+        public int UId { get; set; }
+        /// <summary>
+        /// 签证办理数量
+        /// </summary>
+        public int Number { get; set; }
+        /// <summary>
+        /// 国家
+        /// </summary>
+        public string Nation { get; set; }
+        /// <summary>
+        /// 创建人Id
+        /// </summary>
+        public int CreateUserId { get; set; }
+        /// <summary>
+        /// 创建时间
+        /// </summary>
+        public string CreateDateTime { get; set; }
+        /// <summary>
+        /// 备注
+        /// </summary>
+        public string Remark { get; set; }
+        /// <summary>
+        /// 是否删除
+        /// </summary>
+        public int IsDel { get; set; }
+    }
+}

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 568 - 0
OA2021/Datetime-master/css/jquery.datetimepicker.css


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 3167 - 0
OA2021/Datetime-master/js/jquery.datetimepicker.full.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 6 - 0
OA2021/Datetime-master/js/jquery.js


+ 11 - 0
OA2021/OA2021.csproj

@@ -310,6 +310,8 @@
     <Content Include="data\Ticket.aspx" />
     <Content Include="data\TranslatorWeb.aspx" />
     <Content Include="data\VisaFile.aspx" />
+    <Content Include="dateTime\jquery.datetimepicker.css" />
+    <Content Include="dateTime\jquery.datetimepicker.full.js" />
     <Content Include="DepartmentPage\AccountingDepartmentPage.aspx" />
     <Content Include="DepartmentPage\AccountingDepartmentPage2.aspx" />
     <Content Include="DepartmentPage\GeneralManagerPage.aspx" />
@@ -365,6 +367,7 @@
     <Content Include="groups\TravelCostBudget.aspx" />
     <Content Include="groups\TravelDetailsWeb.aspx" />
     <Content Include="groups\TravelListComparison.aspx" />
+    <Content Include="groups\VisaCommission.aspx" />
     <Content Include="groups\VisaCustomerWeb.aspx" />
     <Content Include="img\4-4.png" />
     <Content Include="img\b777025ba529e0f791ea7dbfcd95962.png" />
@@ -501,6 +504,7 @@
     <Content Include="js\laydate\laydate.js" />
     <Content Include="js\laydate\theme\default\font\iconfont.svg" />
     <Content Include="js\laydate\theme\default\laydate.css" />
+    <Content Include="js\layui\css\layui.css" />
     <Content Include="js\layui\css\modules\code.css" />
     <Content Include="js\layui\css\modules\laydate\default\laydate.css" />
     <Content Include="js\layui\css\modules\layer\default\icon-ext.png" />
@@ -1459,6 +1463,13 @@
     <Compile Include="groups\TravelListComparison.aspx.designer.cs">
       <DependentUpon>TravelListComparison.aspx</DependentUpon>
     </Compile>
+    <Compile Include="groups\VisaCommission.aspx.cs">
+      <DependentUpon>VisaCommission.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="groups\VisaCommission.aspx.designer.cs">
+      <DependentUpon>VisaCommission.aspx</DependentUpon>
+    </Compile>
     <Compile Include="groups\VisaCustomerWeb.aspx.cs">
       <DependentUpon>VisaCustomerWeb.aspx</DependentUpon>
       <SubType>ASPXCodeBehind</SubType>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 6025 - 2
OA2021/css/layui.css


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 568 - 0
OA2021/dateTime/jquery.datetimepicker.css


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 3167 - 0
OA2021/dateTime/jquery.datetimepicker.full.js


+ 59 - 4
OA2021/groups/ApprovalTravel.aspx

@@ -9,8 +9,15 @@
     <link href="../css/all.css" rel="stylesheet" type="text/css" />
     <link href="../css/stroke.css" rel="stylesheet" type="text/css" />
     <link href="../css/pagination.css" rel="stylesheet" type="text/css" />
+    <link href="../js/layui/css/layui.css" rel="stylesheet" />
+    <link href="../dateTime/jquery.datetimepicker.css" rel="stylesheet" />
+    <script language="javascript" type="text/javascript" src="../My97DatePicker/WdatePicker.js"></script>
+    <script src="../css/dist/js/lib/jquery-2.2.1.js"></script>
+    <script src="../dateTime/jquery.datetimepicker.full.js"></script>
+    <script src="../js/layui/layui.js"></script>
+
 </head>
-<body style="height: 3000px; width: 65%; margin: auto">
+<body style="height: 5000px; width: 65%; margin: auto">
     <form id="form1" runat="server">
         <div style="width: 100%;">
 
@@ -26,7 +33,7 @@
                         || 
                             <asp:Button ID="btnCreate" runat="server" Text="导入机票信息" CssClass="btn" Style="width: 85px;"
                                 OnClick="btnCreate_Click" />
-                       <%-- <asp:Button ID="btnSaveData" runat="server" Text="保存行程" CssClass="btn" Style="width: 65px;"
+                        <%-- <asp:Button ID="btnSaveData" runat="server" Text="保存行程" CssClass="btn" Style="width: 65px;"
                             OnClick="btnSaveData_Click" />--%>
                         || 
                             <%--<asp:Button ID="btnImportTran" runat="server" Text="导出word(EN)" CssClass="btn" Style="width: 85px;"
@@ -40,15 +47,22 @@
             </table>
 
             <div style="text-align: center;">
+
+
                 <span style="font-family: 'Microsoft YaHei'; font-size: 16px; width: auto; text-align: center;">出访行程</span>
+                <div style="text-align: left">
+                    自行选择开始时间:<asp:TextBox ID="txtVisitDate" runat="server" Width="120" 
+                        Style="border: 1px solid #b3b3b3;" OnTextChanged="txtVisitDate_TextChanged" AutoPostBack="true" />
+                </div>
             </div>
 
-            <table cellpadding="2" cellspacing="2" border="1" style="width: 100%">
+            <table cellpadding="2" cellspacing="2" border="1" style="width: 100%" id="table1">
                 <asp:Repeater ID="rpData" runat="server" OnItemDataBound="rpData_ItemDataBound">
                     <ItemTemplate>
                         <tr>
                             <td style="width: 100%; text-align: left" colspan="2">
                                 <asp:HiddenField ID="hdid" runat="server" Value='<%#Eval("Id")%>' />
+
                                 <asp:TextBox runat="server" ID="txtDate" Text='<%#Eval("Date")%>'
                                     Style="font-family: 'Microsoft YaHei'; width: 20%; text-align: center" />
                             </td>
@@ -59,7 +73,9 @@
                                 <tr>
                                     <td style="width: 22%">
                                         <asp:TextBox runat="server" ID="txtTime" Text='<%#Eval("Time")%>'
-                                            Style="font-family: 'Microsoft YaHei'; width: 80%; height: 50px; margin-top: 1%" TextMode="MultiLine" />
+                                            Style="font-family: 'Microsoft YaHei';width:100px" /> ——
+                                        <asp:TextBox runat="server" ID="txtTime1" Text='<%#Eval("Time")%>'
+                                            Style="font-family: 'Microsoft YaHei';width:100px" />
                                     </td>
                                     <td style="width: 78%; text-align: start">
                                         <asp:TextBox runat="server" ID="txtDetail" Text='<%#Eval("Details")%>'
@@ -73,5 +89,44 @@
             </table>
         </div>
     </form>
+    <script>
+        $(function () {
+            
+            var s = $("#table1 tr").length;
+            for (var i = 0; i < (s / 6); i++) {
+                var num = i;
+                for (var j = 0; j < 5; j++) {
+                    $('#rpData_ctl0' + i + '_ChildrpData_ctl0' + j + '_txtTime').datetimepicker({
+                        datepicker: false,
+                        format: 'H:i',
+                        step: 5
+                    })
+                    $('#rpData_ctl0' + i + '_ChildrpData_ctl0' + j + '_txtTime1').datetimepicker({
+                        datepicker: false,
+                        format: 'H:i',
+                        step: 5
+                    })
+                };
+            }
+            layui.use('laydate', function () {
+                var laydate = layui.laydate;
+
+                //执行一个laydate实例
+                laydate.render({
+                    elem: '#txtVisitDate', //指定元素
+                    done: function (value, date) {
+                        //value, date, endDate点击日期、清空、现在、确定均会触发。回调返回三个参数,分别代表:生成的值、日期时间对象、结束的日期时间对象
+                        console.log(value);
+                        console.log(date);
+                        //调用定义好的方法
+                            setTimeout('__doPostBack(\'txtVisitDate\',\'\')', 0)
+
+                    }
+                });
+            });
+           
+        })
+
+    </script>
 </body>
 </html>

+ 84 - 2
OA2021/groups/ApprovalTravel.aspx.cs

@@ -885,7 +885,14 @@ namespace OA2014.groups
                 {
                     foreach (RepeaterItem itemChi in ChiRep.Items)
                     {
-                        var txtTime = (itemChi.FindControl("txtTime") as TextBox).Text;
+                        var txtTime0 = (itemChi.FindControl("txtTime") as TextBox).Text;
+                        var txtTime1 = (itemChi.FindControl("txtTime1") as TextBox).Text;
+                       
+                        var txtTime = txtTime0 + "-" + txtTime1;
+                        if (txtTime=="-")
+                        {
+                            txtTime = "";
+                        }
                         var txtDetail = (itemChi.FindControl("txtDetail") as TextBox).Text;
                         if (indexChi > 0)
                         {
@@ -1139,10 +1146,85 @@ namespace OA2014.groups
             string stringNumberVal = string.Empty;
             for (int i = 0; i < numberval.Length; i++)
             {
-                stringNumberVal += Number[numberval[i]];
+                if (i == 0)
+                {
+                    stringNumberVal += Number[numberval[i]];
+                }
+                else if (i>=1)
+                {
+                    if (numberval[i]=='0')
+                    {
+                        stringNumberVal = "十";
+                    }
+                    else
+                    {
+                        stringNumberVal += "十"+ Number[numberval[i]];
+                    }
+                   
+                }
+                
             }
 
             return stringNumberVal;
         }
+
+        protected void txtVisitDate_TextChanged(object sender, EventArgs e)
+        {
+            //团组信息
+            DelegationInfo di = dis.GetDelegationInfoByID(Convert.ToInt32(ddlTourCode.SelectedValue));
+            DataTable dt = PublicCode.GetTableByBlackCode(di.Id);
+           
+            //日期转换星期
+            string[] weekdays = new string[] { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
+
+            try
+            {
+                if (dt.Rows[0]["Day"] == null || dt.Rows[0]["Day"].ToString() == "")//判断黑屏代码数据是否正确生成
+                {
+                    List<Models.ApprovalTravel> Nulllistapt = new List<Models.ApprovalTravel>();
+
+                    DateTime StartDate = DateTime.Parse(di.VisitStartDate);
+                    DateTime EndDate = DateTime.Parse(di.VisitEndDate);
+                    System.TimeSpan t3 = EndDate - StartDate;  //两个时间相减 。默认得到的是 两个时间之间的天数   得到:365.00:00:00  
+                    DateTime date= Convert.ToDateTime(txtVisitDate.Text);
+                    double getDay = t3.TotalDays + 1;
+                    if (getDay == 0)
+                    {
+                        getDay = 1;
+                    }
+                    for (int i = 0; i < getDay; i++)
+                    {
+                        DateTime NewData = date.AddDays(i);
+                        string[] Day = new string[] { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
+                        string week = Day[Convert.ToInt32(NewData.DayOfWeek.ToString("d"))].ToString();
+                        Models.ApprovalTravel appro = new Models.ApprovalTravel();
+                        appro.Id = i;
+                        int s = i + 1;
+                        appro.Date = NewData.Month + "月" + NewData.Day + "日(" + week + ") 第" + intToString(s) + "天";
+                        Nulllistapt.Add(appro);
+                        //dts.Rows.Add(null, null, null, null, null, null, null, null, null, StartDate.AddDays(i), StartDate.AddDays(i), null, null);
+                    }
+                    //List<string> timeList = PublicCode.GetTimeListByDataTable(dts);
+
+                    //string[] str = new string[timeList.Count];
+                    rpData.DataSource = Nulllistapt;
+                    rpData.DataBind();
+                    //PublicCode.GetAlertMsg(this, GetType(), dt.Rows[dt.Rows.Count - 1]["Error"].ToString());
+                }
+                else
+                {
+                    //生成该时间段日期
+                    List<string> timeList = PublicCode.GetTimeListByDataTable(dt);
+
+                    string[] str = new string[timeList.Count];
+                    rpData.DataSource = str;
+                    rpData.DataBind();
+                }
+            }
+            catch
+            {
+
+            }
+        }
     }
 }

+ 9 - 0
OA2021/groups/ApprovalTravel.aspx.designer.cs

@@ -59,6 +59,15 @@ namespace OA2014.groups
         /// </remarks>
         protected global::System.Web.UI.WebControls.Button btnImport;
 
+        /// <summary>
+        /// txtVisitDate 控件。
+        /// </summary>
+        /// <remarks>
+        /// 自动生成的字段。
+        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+        /// </remarks>
+        protected global::System.Web.UI.WebControls.TextBox txtVisitDate;
+
         /// <summary>
         /// rpData 控件。
         /// </summary>

+ 112 - 0
OA2021/groups/VisaCommission.aspx

@@ -0,0 +1,112 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VisaCommission.aspx.cs" Inherits="OA2021.groups.VisaCommission" %>
+
+<!DOCTYPE html>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head runat="server">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+    <title></title>
+    <link href="../css/all.css" rel="stylesheet" type="text/css" />
+<link href="../css/stroke.css" rel="stylesheet" type="text/css" />
+<link href="../css/pagination.css" rel="stylesheet" type="text/css" />
+<link href="../js/layui/css/layui.css" rel="stylesheet" />
+<link href="../dateTime/jquery.datetimepicker.css" rel="stylesheet" />
+     <link href="../js/Customer/jQueryAutocompletePlugin-master/jquery.autocomplete.css" rel="stylesheet" />
+</head>
+<body>
+    <form id="form1" runat="server">
+        <div>
+            团组:<asp:DropDownList ID="ddlTourCode" runat="server" Width="230" Style="font-family: 'Microsoft YaHei'; border: 1px solid #b3b3b3;"
+                        AutoPostBack="true" OnTextChanged="ddlTourCode_TextChanged" />
+                                        团组名搜索:
+<asp:TextBox ID="GroupSearch" runat="server" Width="200" Style="border: 1px solid #b3b3b3;" />
+            <asp:Button ID="btnSave" runat="server" Text="保存数据"  CssClass="btn" Style=" width: 65px;" OnClick="btnSave_Click" />
+            <table cellpadding="2" cellspacing="2" border="1" style="width: 70%;text-align:center;margin-top:15px">
+                <tr>
+                    <td style="width: 22%">国家</td>
+                    <td style="width: 22%">签证办理数量</td>
+                    <td>备注</td>
+                </tr>
+                <asp:Repeater ID="rpData" runat="server" >
+                    <ItemTemplate>
+                        <tr>
+                            <td style="width: 30%">
+                                <asp:HiddenField ID="hdid" runat="server" Value='<%#Eval("Id")%>' />
+                                <asp:TextBox runat="server" ID="txtNation" Text='<%#Eval("Nation")%>'
+                                    Style="font-family: 'Microsoft YaHei'; width: 50%; text-align: center" />
+                            </td>
+                            <td style="width: 22%">
+                                <asp:TextBox runat="server" ID="txtNumber" Text='<%#Eval("Number")%>'
+                                    Style="font-family: 'Microsoft YaHei'; width: 20%; text-align: center" />本
+                            </td>
+                            <td>
+                                <asp:TextBox ID="txtRemark" Text='<%#Eval("Remark")%>' runat="server"  TextMode="MultiLine" Rows="2" Style="border: 1px solid #b3b3b3;width:95%" />
+                            </td>
+                        </tr>
+                    </ItemTemplate>
+                </asp:Repeater>
+            </table>
+        </div>
+    </form>
+        <script type="text/javascript" src="../js/Customer/jquery-1.9.1.min.js"></script>
+    <script type="text/javascript" src="../js/Customer/jQueryAutocompletePlugin-master/jquery.autocomplete.min.js"></script>
+<script type="text/javascript">
+    
+    $().ready(function () {
+        var datas = [];
+        debugger
+        $("#ddlTourCode").find("option").each(function () {
+            var data = $(this).text();
+            var id = $(this).val();
+            datas.push({
+                text: data,
+                id: id
+            });
+        });
+
+        $("#GroupSearch").autocomplete(datas, {
+            minChars: 1,          //自动完成激活之前填入的最少字符
+            max: 15,              //列表里的条目数
+            width: 300,
+            scrollWidth: 300,     //提示的宽度,溢出隐藏
+            mustMatch: true,      //自动填充
+            matchContains: true,  //包含匹配,是否只显示匹配项
+            autoFill: false,      //自动填充
+            scroll: true,         //是否显示滚动条
+            formatItem: function (data, i, total) {
+                var index = toString.call(data).indexOf('Array');
+                if (index == -1) {
+                    return data.text;
+                } else {
+                    return data[0];
+                }
+            },
+            formatMatch: function (data, i, total) {
+
+                var index = toString.call(data).indexOf('Array');
+                if (index == -1) {
+                    return data.text;
+                } else {
+                    return data[0];
+                }
+            },
+            formatResult: function (data) {
+                var index = toString.call(data).indexOf('Array');
+                if (index == -1) {
+                    return data.text;
+                } else {
+                    return data[0];
+                }
+            }
+        }).result(function (event, data, formatted) {
+            if (data != undefined) {
+                console.log(data);
+                window.parent.$("#content").attr("src", "groups/VisaCommission.aspx?&tourCode=" + data.id);
+            }
+        });;
+
+    });
+   
+</script>
+</body>
+</html>

+ 166 - 0
OA2021/groups/VisaCommission.aspx.cs

@@ -0,0 +1,166 @@
+using DAL;
+using Models;
+using System;
+using System.Collections.Generic;
+using OA2014.publicCode;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using NPOI.Util;
+using static System.Windows.Forms.VisualStyles.VisualStyleElement;
+using System.Text.RegularExpressions;
+
+namespace OA2021.groups
+{
+    public partial class VisaCommission : SessionCode
+    {
+        DelegationInfoService dis = new DelegationInfoService();
+        VisaCommissionService s= new VisaCommissionService();
+        protected void Page_Load(object sender, EventArgs e)
+        {
+            if (!IsPostBack)
+            {
+                bindDDL();
+                //绑定团组及行程资料
+                bindContent();
+            }
+        }
+        void bindDDL()
+        {
+            ddlTourCode.DataSource = dis.GetAll();
+            ddlTourCode.DataTextField = "TeamName";
+            ddlTourCode.DataValueField = "Id";
+            ddlTourCode.DataBind();
+            if (Request.QueryString["tourCode"] != null && !string.IsNullOrEmpty(Request.QueryString["tourCode"].ToString()))
+                ddlTourCode.Items.FindByValue(Request.QueryString["tourCode"].ToString()).Selected = true;
+        }
+        void bindContent()
+        {
+            int diid = Convert.ToInt32(ddlTourCode.SelectedValue);
+            DelegationInfo di = dis.GetDelegationInfoByID(diid);
+            List<Models.VisaCommission> commissions= new List<Models.VisaCommission>();
+            if (di != null)
+            {
+                commissions = s.GetAll(diid, UserId);
+                char[] separators = { ' ', ',', ',','、' }; // 设置要作为分隔符的符号列表
+                string[] result = di.VisitCountry.Split(separators); // 使用 Split 函数对字符串进行切割
+                foreach (var item in result)
+                {
+                    if (!string.IsNullOrWhiteSpace(item))
+                    {
+                       Models.VisaCommission v = commissions.Where(a=>a.Nation==item).FirstOrDefault();
+                        if (v== null)
+                        {
+                            v = new Models.VisaCommission();
+                            v.Id = 0;
+                            v.UId = UserId;
+                            v.DiId = diid;
+                            v.Number = 0;
+                            v.Nation=item.ToString();
+                            v.CreateUserId = UserId;
+                            v.Remark = "";
+                            v.CreateDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+                            v.IsDel = 0;
+                            commissions.Add(v);
+                        }
+                    }
+                }
+                Models.VisaCommission v1 = new Models.VisaCommission();
+                v1.Id = 0;
+                v1.UId = UserId;
+                v1.DiId = diid;
+                v1.Number = 0;
+                v1.Nation = "";
+                v1.CreateUserId = UserId;
+                v1.Remark = "";
+                v1.CreateDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+                v1.IsDel = 0;
+                commissions.Add(v1);
+
+                v1 = new Models.VisaCommission();
+                v1.Id = 0;
+                v1.UId = UserId;
+                v1.DiId = diid;
+                v1.Number = 0;
+                v1.Nation = "";
+                v1.CreateUserId = UserId;
+                v1.Remark = "";
+                v1.CreateDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+                v1.IsDel = 0;
+                commissions.Add(v1);
+                rpData.DataSource = commissions;
+                rpData.DataBind();
+            }
+        }
+        protected void ddlTourCode_TextChanged(object sender, EventArgs e)
+        {
+            bindContent();
+        }
+        /// <summary>
+        /// 保存事件
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        protected void btnSave_Click(object sender, EventArgs e)
+        {
+            foreach (RepeaterItem item in rpData.Items)
+            {
+                int diid = Convert.ToInt32(ddlTourCode.SelectedValue);
+                string Nation = (item.FindControl("txtNation") as System.Web.UI.WebControls.TextBox).Text;
+                int Number= Convert.ToInt32((item.FindControl("txtNumber") as System.Web.UI.WebControls.TextBox).Text);
+                string Remark = (item.FindControl("txtRemark") as System.Web.UI.WebControls.TextBox).Text; 
+                bool isNumeric = Regex.IsMatch(Number.ToString(), @"^\d+$");
+                
+                if (!string.IsNullOrWhiteSpace(Nation))
+                {
+                    if (!isNumeric)
+                    {
+                        Response.Write("<script>alert('请输入正确的数量!')</script>");
+                        return;
+                    }
+                    if (string.IsNullOrWhiteSpace(Nation))
+                    {
+                        Response.Write("<script>alert('请输入国家!')</script>");
+                        return;
+                    }
+                    Models.VisaCommission v = s.getByDiId(diid, Nation,UserId);
+                    if (v != null)
+                    {
+                        v.Id = Convert.ToInt32((item.FindControl("hdid") as HiddenField).Value);
+                        v.Nation = Nation;
+                        v.Number = Number;
+                        v.Remark = Remark;
+                        v.CreateUserId = UserId;
+                        v.CreateDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+                        s.Edit(v);
+                    }
+                    else
+                    {
+                        if (!string.IsNullOrWhiteSpace(Nation))
+                        {
+                            v = new Models.VisaCommission();
+                            v.DiId = diid;
+                            v.UId = UserId;
+                            v.Number = Number;
+                            v.Nation = Nation;
+                            v.CreateUserId = UserId;
+                            v.CreateDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+                            v.Remark = Remark;
+                            v.IsDel = 0;
+                            if (v.Number!=0)
+                            {
+                                s.Add(v);
+                            }
+                            
+                        }
+
+                    }
+                }
+                
+                
+            }
+            Response.Write("<script>alert('温馨提示:" + PublicCode.AlertMsgTrue + "');location.href='VisaCommission.aspx?tourCode=" + ddlTourCode.SelectedValue + "';</script>");
+        }
+    }
+}

+ 62 - 0
OA2021/groups/VisaCommission.aspx.designer.cs

@@ -0,0 +1,62 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+//     此代码由工具生成。
+//
+//     对此文件的更改可能导致不正确的行为,如果
+//     重新生成代码,则所做更改将丢失。
+// </自动生成>
+//------------------------------------------------------------------------------
+
+namespace OA2021.groups
+{
+
+
+    public partial class VisaCommission
+    {
+
+        /// <summary>
+        /// form1 控件。
+        /// </summary>
+        /// <remarks>
+        /// 自动生成的字段。
+        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+        /// </remarks>
+        protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+        /// <summary>
+        /// ddlTourCode 控件。
+        /// </summary>
+        /// <remarks>
+        /// 自动生成的字段。
+        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+        /// </remarks>
+        protected global::System.Web.UI.WebControls.DropDownList ddlTourCode;
+
+        /// <summary>
+        /// GroupSearch 控件。
+        /// </summary>
+        /// <remarks>
+        /// 自动生成的字段。
+        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+        /// </remarks>
+        protected global::System.Web.UI.WebControls.TextBox GroupSearch;
+
+        /// <summary>
+        /// btnSave 控件。
+        /// </summary>
+        /// <remarks>
+        /// 自动生成的字段。
+        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+        /// </remarks>
+        protected global::System.Web.UI.WebControls.Button btnSave;
+
+        /// <summary>
+        /// rpData 控件。
+        /// </summary>
+        /// <remarks>
+        /// 自动生成的字段。
+        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+        /// </remarks>
+        protected global::System.Web.UI.WebControls.Repeater rpData;
+    }
+}

+ 0 - 1
OA2021/groups/hotelReservations.aspx.cs

@@ -2183,7 +2183,6 @@ namespace OA2014.groups
                             txtActualPrice.Style.Add("border", "1px solid green");
                         }
                     }
-
                 }
             }
             catch (Exception)

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 1
OA2021/js/layui/css/layui.css