CB2-20200827ONU\Administrator
2021-10-08 d789099e9dc45e7fa3ee0eb73ee97f80b1963466
no message
7个文件已修改
4个文件已添加
812 ■■■■■ 已修改文件
CY_ECommercePlatform/CY.Model/OA/OA_CorporateClients.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CY_ECommercePlatform/CY.WebForm/CY.WebForm.csproj 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsContractShow.aspx 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsContractShow.aspx.cs 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsContractShow.aspx.designer.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsList.aspx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsList.aspx.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsUpLoadContract.aspx 202 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsUpLoadContract.aspx.cs 338 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsUpLoadContract.aspx.designer.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CY_ECommercePlatform/CY.WebForm/js/PictureShow/spotlight.bundle.js 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CY_ECommercePlatform/CY.Model/OA/OA_CorporateClients.cs
@@ -606,6 +606,10 @@
        /// 应收款订单数量
        /// </summary>
        public int? NoOverOderCount { get; set; }
        /// <summary>
        /// 合同数量
        /// </summary>
        public int? ContractCount { get; set; }
        /// <summary>
        /// 是否需要执行了日常维护
CY_ECommercePlatform/CY.WebForm/CY.WebForm.csproj
@@ -732,6 +732,7 @@
    <Content Include="js\Inquiry\Calculator.js" />
    <Content Include="js\Inquiry\Inquiry.js" />
    <Content Include="js\jquery.form.js" />
    <Content Include="js\PictureShow\spotlight.bundle.js" />
    <Content Include="js\procurement\GoodsName.js" />
    <Content Include="js\procurement\PaperWeight.js" />
    <Content Include="js\utils\calendar.js" />
@@ -1872,6 +1873,7 @@
    <Content Include="Pages\business\ComplaintsManage.aspx" />
    <Content Include="Pages\business\ComplaintsView.aspx" />
    <Content Include="Pages\business\CompledWork.aspx" />
    <Content Include="Pages\business\CorporateClientsContractShow.aspx" />
    <Content Include="Pages\business\CorporateClientsDetail.aspx" />
    <Content Include="Pages\business\CorporateClientsEdit.aspx" />
    <Content Include="Pages\business\CorporateClientsList.aspx" />
@@ -3283,6 +3285,13 @@
    <Compile Include="Pages\business\CompledWork.aspx.designer.cs">
      <DependentUpon>CompledWork.aspx</DependentUpon>
    </Compile>
    <Compile Include="Pages\business\CorporateClientsContractShow.aspx.cs">
      <DependentUpon>CorporateClientsContractShow.aspx</DependentUpon>
      <SubType>ASPXCodeBehind</SubType>
    </Compile>
    <Compile Include="Pages\business\CorporateClientsContractShow.aspx.designer.cs">
      <DependentUpon>CorporateClientsContractShow.aspx</DependentUpon>
    </Compile>
    <Compile Include="Pages\business\CorporateClientsDetail.aspx.cs">
      <DependentUpon>CorporateClientsDetail.aspx</DependentUpon>
      <SubType>ASPXCodeBehind</SubType>
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsContractShow.aspx
New file
@@ -0,0 +1,50 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CorporateClientsContractShow.aspx.cs" Inherits="CY.WebForm.Pages.business.CorporateClientsContractShow" %>
<%-- 合同浏览页面。主要是用来按照以浏览方式 --%>
<!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>
    <script src="./../../js/PictureShow/spotlight.bundle.js"></script>
     <style type="text/css">
     .textcenter{text-align:center}
      .horizontal{
        float:left;
        border:1px solid black;
        margin-left:20px;
    }
</style>
</head>
<form id="form1" runat="server">
     <div class="textcenter">合同预览</div>
<asp:Repeater id="RepClientList" runat="server">
         <ItemTemplate>
             <div class="textcenter horizontal"  width="100" >
            <a class="spotlight" href="<%#Eval("FilePath").ToString() %>">
                <img src="<%#Eval("FilePath").ToString() %>" width="100" height="200" >
            </a>
               <p >第<%#Eval("PageCode")%>页</p>
                </div>
           </ItemTemplate>
</asp:Repeater>
</form>
</html>
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsContractShow.aspx.cs
New file
@@ -0,0 +1,91 @@
using CY.Infrastructure.Common;
using CY.Infrastructure.Logging;
using CY.Model.OA;
using CY.SQLDAL;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using static CY.WebForm.MainPage;
namespace CY.WebForm.Pages.business
{
    public partial class CorporateClientsContractShow : System.Web.UI.Page
    {
        /// <summary>
        /// 合同附件集合
        /// </summary>
        List<OA_CorporateClientsContract> fileDataList { set; get; } = new List<OA_CorporateClientsContract>();
        protected void Page_Load(object sender, EventArgs e)
        {
            ReadList();
        }
        private void ReadList()
        {
            Guid Keyid = Request["Keyid"].ToGuid2();
            if (Keyid == null)
            {
                JavaScript.MessageBox("未找到该客户", this, false, false);
                return;
            }
            Database DC = new Database();
            string sqlStr = string.Format(@"USE [ECTEST]    select * from  [dbo].[OA_CorporateClientContract] where CorporateClientsid='{0}' order by PageCode  ", Keyid);
            int count = 0;
            try
            {
                SqlCommand myCmd = new SqlCommand(sqlStr, DC.Connection);
                //SqlDataAdapter myDa = new SqlDataAdapter(myCmd);
                var a = myCmd.ExecuteReader();
                //myDa.Dispose();
                fileDataList = new List<OA_CorporateClientsContract>();
                OA_CorporateClientsContract Contract;
                while (a.Read())
                {   //注意如何将每次读取到的记录添加到listbox1中(因为第一次做时出错了,嘿嘿)
                    Contract = new OA_CorporateClientsContract();
                    Contract.Keyid = a.GetGuid(0);
                    Contract.CorporateClientsid = a.GetGuid(1);
                    Contract.CorporateClientsName = a.GetString(2);
                    Contract.FileName = a.GetString(3);
                    Contract.PageCode = a.GetInt32(4);
                    Contract.FilePath = a.GetString(5);
                    Contract.Remark = a.GetString(6);
                    fileDataList.Add(Contract);
                }
                a.Close();     //关闭sqldatareader
                sqlStr = string.Format("select  count(*) from [dbo].[OA_CorporateClientContract] where CorporateClientsid='{0}'", Keyid);
                myCmd = new SqlCommand(sqlStr, DC.Connection);
                count = (int)myCmd.ExecuteScalar();
            }
            catch (Exception ee)
            {
                new Log4NetAdapter().Log("查找合同出错:" + ee.Message);
            }
            finally
            {
                if (DC.Connection.State != System.Data.ConnectionState.Closed)
                    DC.Connection.Close();
            }
            this.RepClientList.DataSource = fileDataList;// fileDataList.AsEnumerable<OA_CorporateClientsContract>();
            this.RepClientList.DataBind();
        }
    }
}
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsContractShow.aspx.designer.cs
New file
@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// <自动生成>
//     此代码由工具生成。
//
//     对此文件的更改可能导致不正确的行为,如果
//     重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace CY.WebForm.Pages.business
{
    public partial class CorporateClientsContractShow
    {
        /// <summary>
        /// form1 控件。
        /// </summary>
        /// <remarks>
        /// 自动生成的字段。
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
        /// </remarks>
        protected global::System.Web.UI.HtmlControls.HtmlForm form1;
        /// <summary>
        /// RepClientList 控件。
        /// </summary>
        /// <remarks>
        /// 自动生成的字段。
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
        /// </remarks>
        protected global::System.Web.UI.WebControls.Repeater RepClientList;
    }
}
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsList.aspx
@@ -357,7 +357,9 @@
                                <span menu_member_case_id="case_setinquiryCorporateClients" menu_member_case_name="询价设置" onclick="SetInquiryPar('<%#Eval("Keyid")%>')">询价设置</span> 
                                <span menu_member_case_id="case_orderapplyCorporateClients" menu_member_case_name="订单关联" onclick="onChange('<%#Eval("Keyid")%>')" title="线下客户转换为线上客户" style="display: <%#Eval("Keyid").ToString() == Eval("MemberId").ToString() ? "inline" : "none"%>;">订单关联</span>
                                <span onclick="onViewWeihu('<%#Eval("Keyid")%>')">维护记录</span>
                                <span onclick="onViewuplod('<%#Eval("Keyid")%>')">查看合同</span>
                                <span onclick="onViewuplod('<%#Eval("Keyid")%>')"  <%#Eval("ContractCount").ToString() == "0" ? "hidden" : ""%>>查看合同</span>
                            </td>
                        </tr>
                    </ItemTemplate>
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsList.aspx.cs
@@ -11,6 +11,7 @@
using CY.BLL.Sys;
using CY.BLL.OA;
using CY.SQLDAL;
using System.Data.SqlClient;
namespace CY.WebForm.Pages.business
{
@@ -155,6 +156,26 @@
                item.LessOrderMoneyProperty = item.Contractmoney-item.OrderMoney;
                item.NoOverOderCount = bll_eC_OrderBasicDAL.GetOrderById(item.Keyid, -1).Count;
                Database DC = new Database();
                try
                {
                    string sqlStr = string.Format("select  count(*) from [dbo].[OA_CorporateClientContract] where CorporateClientsid='{0}'", item.Keyid);
                    SqlCommand myCmd = new SqlCommand(sqlStr, DC.Connection);
                    item.ContractCount = (int)myCmd.ExecuteScalar();
                }
                catch (Exception)
                {
                    item.ContractCount = 0;
                }
                finally
                {
                    if (DC.Connection.State != System.Data.ConnectionState.Closed)
                        DC.Connection.Close();
                }
            }
            this.RepClientList.DataBind();
            UCPager1.AspNetPager.RecordCount = pa.RecordCount;
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsUpLoadContract.aspx
@@ -1,8 +1,9 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CorporateClientsUpLoadContract.aspx.cs" Inherits="CY.WebForm.Pages.business.CorporateClientsUpLoadContract" %>
<%-- 上传合同页面  廖 20210916增加--%>
<!DOCTYPE html>
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/jquery.hammer.min.js" type="text/javascript"></script>
<script src="./../../myPagination/js/share/js/jquery.min.js" type="text/javascript"></script>
<%--<script src="./../../js/jquery.hammer.min.js" type="text/javascript"></script>--%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head  id="Head1"  runat="server">
@@ -11,25 +12,49 @@
    
 
      <uc:CMSHead ID="CMSHead1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
           <div class="box1" paneltitle="功能面板" roller="false">
            <table class="TableNewStyle">
                <tr>
                      <td class="ali03">新增合同页面:
                        </td>
                    <td class="ali03">
                        页码:
                    <td style="width:200px">新增或者替换合同页面:
                    </td>
                    <td>
                        第 <input type="text" runat="server" id="TextPage" /> 页
                    <td style="width:100px">第
                        <input type="text" runat="server" id="TextPage" style="width:40px" onkeyup="value=value.replace(/[^\d]/g,'')" />
                        页
                    </td>
                     <td class="ali03"></td>
                  
                    <td class="ali03"><input type="file" id="filesel" name="__hetongFile"  keepdefaultstyle="true" multiple="multiple" runat="server"  /></td>
                    <td> <asp:Button ID="UpdateFileNew" Text="新增或者替换该页(上传图片)" runat="server" OnClick="btn_Submit_Click"   OnClientClick="return checkSelFile()" /></td>
                    <td class="ali03">
                        <input type="file" id="filesel" name="__hetongFile" keepdefaultstyle="true" runat="server" text="请选择文件" /></td>
                    <td>
                        <asp:Button ID="UpdateFileNew" Text="上传" runat="server" OnClick="btn_Submit_Click" OnClientClick="return checkSelFile()" /></td>
                </tr>
            </table>
        </div>
        <div class="box1" paneltitle="功能面板" roller="false">
            <table class="TableNewStyle">
                <tr>
                    <td class="ali06" style="width:200px">
                        批量上传:
                    </td>
                    <td class="ali03" style="width:100px">
                    </td>
                    <td class="ali03"></td>
                    <td class="ali03">
                        <input type="file" id="file2" name="__hetongMutilfiles" keepdefaultstyle="true" multiple="multiple" runat="server"  text="请选择文件"/></td>
                    <td>
                        <asp:Button ID="Button1" Text="批量上传" runat="server" OnClick="btn_Submit_Click_multi" OnClientClick="return checkSelMulitFile()" /></td>
                </tr>
            </table>
        </div>
@@ -37,24 +62,21 @@
  
              <p style="text-align:center"> 已有页面</p>
   
            <asp:repeater id="RepClientList" runat="server" >
                <headertemplate>
            <asp:Repeater ID="RepClientList" runat="server">
                <HeaderTemplate>
                    <table class="tableStyle">
                        <tr>
                           <%-- <th width="25"></th>--%>
                            <th width="60" style="text-align:center">
                                页码
                            <th width="60" style="text-align: center">页码
                            </th>
                            <th style="text-align:center" >
                                预览
                            <th style="text-align: center">预览
                            </th>
                           <th style="text-align:center">
                                操作
                            <th style="text-align: center">操作
                            </th>               
                          
                          
                        </tr>
                </headertemplate>
                </HeaderTemplate>
              
                <ItemTemplate>
@@ -62,13 +84,13 @@
                           <%-- <td>
                                <input type="checkbox" class="SelectCheck" value_kid="<%#Eval("Keyid")%>" />
                            </td>--%>
                            <td>
                               第  <%#Eval("PageCode")%> 页
                        <td>第  <%#Eval("PageCode")%> 页
                            </td>
                            <td>
                                 
                             <a   title="点击查看原图"   href="<%#Eval("FilePath").ToString() %>" target="view_window">
                                   <img src="<%#Eval("FilePath").ToString() %>"  width="80" height="100"/> </a>
                                <img src="<%#Eval("FilePath").ToString() %>" width="80" height="100" />
                            </a>
                       
                            </td>
@@ -96,7 +118,7 @@
                </asp:repeater>
            </asp:Repeater>
                     <div id="page">
                    <uc:UCPager ID="UCPager1" runat="server" />
                </div>
@@ -105,12 +127,29 @@
                 
             
              </div>
        <button id="Buttonupload" onclick="onViewuplodshow('<%= Request["Keyid"]%>')">浏览全部</button>
        <asp:Button ID="Button3"  Text="删除所有合同"  runat="server"  OnClick="btn_Submit_Click_DELLALL" />
       
    </form>
</body>
</html>
<script type="text/javascript">
    //查看
    function checkSelMulitFile() {
        var oFile = document.getElementById('file2');
        if (oFile.value == "") {
            alertMsg('没有选择文件');
            return false;
        }
        //debugger;
        //replaceParamVal("deleteKeyIds", "");
        return true;
    }
    //查看
    function checkSelFile() {
    
@@ -125,12 +164,50 @@
                return false;
               
}
        //debugger;
        //replaceParamVal("deleteKeyIds", "");
        return true;
    }
    //改变参数
    function changeURLArg(url, arg, arg_val) {
        var pattern = arg + '=([^&]*)';
        var replaceText = arg + '=' + arg_val;
        if (url.match(pattern)) {
            var tmp = '/(' + arg + '=)([^&]*)/gi';
            tmp = url.replace(eval(tmp), replaceText);
            return tmp;
        } else {
            if (url.match('[\?]')) {
                return url + '&' + replaceText;
            } else {
                return url + '?' + replaceText;
            }
        }
    }
    // 获取url里的参数
    function getURLString(arg) {
        var reg = new RegExp("(^|&)" + arg + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null)
            return unescape(r[2]);
        return null;
    }
    //替换指定传入参数的值,paramName为参数,replaceWith为新值
    function replaceParamVal(paramName, replaceWith) {
        var oUrl = this.location.href.toString();
        var re = eval('/(' + paramName + '=)([^&]*)/gi');
        var nUrl = oUrl.replace(re, paramName + '=' + replaceWith);
        this.location = nUrl;
        window.location.href = nUrl
    }
    //删除制定合同页面
    function delelid(KeyID,pageID) {
        top.Dialog.confirm("是否要删除该合同页面?", function () {
            window.location = "/Pages/business/CorporateClientsUpLoadContract.aspx?deleteKeyIds=" + KeyID + "&Keyid=" + pageID;
@@ -138,4 +215,81 @@
        );
    }
            
    //维护
    function onViewuplodshow(keyid) {
        top.Dialog.open({ URL: "/Pages/business/CorporateClientsContractShow.aspx?Keyid=" + keyid, Title: "浏览合同", Width: 1024, Height: 750 });
    }
    $(document).ready(function () {
        $("#file2").change(function () {
            var myfile = document.getElementById('file2');
            for (let i = 0; i < myfile.files.length; i++)
        {
                var filepath = myfile.files[i].name;
            var extStart = filepath.lastIndexOf(".");
            var ext = filepath.substring(extStart, filepath.length).toUpperCase();
            if (ext != ".BMP" && ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
                alertMsg("图片限于bmp,png,gif,jpeg,jpg格式");
                return false;
            } else { $("#fileType").text(ext) }
                var ext = filepath.substring(0, extStart);
                if (isNumber(ext)) {
                }
                else {
                    alertMsg(filepath + '文件名有误');
                    return false;
                }
        }
            //var file_size = 0;
            //if ($.browser.msie) {
            //    var img = new Image();
            //    img.src = filepath;
            //    while (true) {
            //        if (img.fileSize > 0) {
            //            if (img.fileSize > 3 * 1024 * 1024) {
            //                alert("图片不大于100MB。");
            //            } else {
            //                var num03 = img.fileSize / 1024;
            //                num04 = num03.toFixed(2)
            //                $("#fileSize").text(num04 + "KB");
            //            }
            //            break;
            //        }
            //    }
            //} else {
            //    file_size = this.files[0].size;
            //    var size = file_size / 1024;
            //    if (size > 10240) {
            //        alert("上传的图片大小不能超过10M!");
            //    } else {
            //        var num01 = file_size / 1024;
            //        num02 = num01.toFixed(2);
            //        $("#fileSize").text(num02 + " KB");
            //    }
            //}
            return true;
        });
    });
    function isNumber(val) {
        var regPos = /^\d+(\.\d+)?$/; //非负浮点数
        var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
        if (regPos.test(val) || regNeg.test(val)) {
            return true;
        } else {
            return false;
        }
    }
</script>
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsUpLoadContract.aspx.cs
@@ -39,7 +39,77 @@
            
            
                if (Request["deleteKeyIds"] != null)
                if (Request["deleteKeyIds"] != null&& Request["deleteKeyIds"]!="")
            {
                if (Request["deleteKeyIds"] == "all")
                {
                    //删除说有页面
                    string keyid = Request["deleteKeyIds"].ToString();
                    string pageID = Request["Keyid"];
                    Database DC = new Database();
                    string sqlStr = string.Format(@"USE [ECTEST] SELECT[Keyid]      ,[CorporateClientsid]       ,[CorporateClientsName]       ,[FileName]       ,[PageCode]       ,[FilePath]       ,[Remark]     FROM[dbo].[OA_CorporateClientContract] where CorporateClientsid='{0}'ORDER BY PageCode ", pageID);
                    try
                    {
                        SqlCommand myCmd = new SqlCommand(sqlStr, DC.Connection);
                        //SqlDataAdapter myDa = new SqlDataAdapter(myCmd);
                        var a = myCmd.ExecuteReader();
                        //myDa.Dispose();
                        fileDataList = new List<OA_CorporateClientsContract>();
                        OA_CorporateClientsContract Contract;
                        while (a.Read())
                        {   //注意如何将每次读取到的记录添加到listbox1中(因为第一次做时出错了,嘿嘿)
                            Contract = new OA_CorporateClientsContract();
                            Contract.Keyid = a.GetGuid(0);
                            Contract.CorporateClientsid = a.GetGuid(1);
                            Contract.CorporateClientsName = a.GetString(2);
                            Contract.FileName = a.GetString(3);
                            Contract.PageCode = a.GetInt32(4);
                            Contract.FilePath = a.GetString(5);
                            Contract.Remark = a.GetString(6);
                            fileDataList.Add(Contract);
                        }
                        a.Close();     //关闭sqldatareader
                        if (fileDataList.Count > 0)
                        {
                            foreach (var item in fileDataList)
                            {
                                FileInfo file = new FileInfo(Server.MapPath(item.FilePath));//指定文件路径
                                if (file.Exists)//判断文件是否存在
                                {
                                    file.Attributes = FileAttributes.Normal;//将文件属性设置为普通,比方说只读文件设置为普通
                                    file.Delete();//删除文件
                                }
                                sqlStr = string.Format(@"USE [ECTEST]DELETE FROM [dbo].[OA_CorporateClientContract] where Keyid='{0}'", item.Keyid);
                                myCmd = new SqlCommand(sqlStr, DC.Connection);
                                myCmd.ExecuteNonQuery();
                                myCmd.Dispose();
                            }
                        }
                        JavaScript.MessageBox("删除成功", this);
                        //  Response.Redirect("/Pages/business/CorporateClientsUpLoadContract.aspx");
                    }
                    catch (Exception ee)
                    {
                        new Log4NetAdapter().Log("查找合同出错:" + ee.Message);
                        JavaScript.MessageBox("删除失败", this);
                    }
                    finally
                    {
                        if (DC.Connection.State != System.Data.ConnectionState.Closed)
                            DC.Connection.Close();
                    }
                }
                else
            {
                //删除页面
                string  keyid = Request["deleteKeyIds"].ToString();
@@ -71,7 +141,8 @@
                    }
                    a.Close();     //关闭sqldatareader
                    if (fileDataList.Count > 0)
                    { FileInfo file = new FileInfo(Server.MapPath(fileDataList[0].FilePath));//指定文件路径
                        {
                            FileInfo file = new FileInfo(Server.MapPath(fileDataList[0].FilePath));//指定文件路径
                        if (file.Exists)//判断文件是否存在
                        {
                            file.Attributes = FileAttributes.Normal;//将文件属性设置为普通,比方说只读文件设置为普通
@@ -95,13 +166,20 @@
                    if (DC.Connection.State != System.Data.ConnectionState.Closed)
                        DC.Connection.Close();
                }
                }
                Response.AppendHeader("deleteKeyIds", "");
            }
            if (!IsPostBack)
                BindList();
            
        }
        public Guid GetKeyid()
        {
            return Request["Keyid"].ToGuid2();
        }
        //绑定列表
        private void BindList()
        {
@@ -176,15 +254,212 @@
            BindList();
        }
        protected void btn_Submit_Click_multi(object sender, EventArgs e)
        {
            var files = Request.Files;
            //if (files.Count <= 0)
            //    return;
            HttpPostedFile postedFile;
            List<HttpPostedFile> fileList = new List<HttpPostedFile>();
            for (int i=0;i< files.Count;i++)
            {
                if (files.Keys[i]=="file2")
                {
                    postedFile = files[i];
                    if (postedFile.ContentLength == 0)
                        continue;
                    fileList.Add(postedFile);
                }
            }
            upLoadContractFile uploadContract = null;
            OA_CorporateClientsContract contract = null;
            Guid? g = null;
            foreach (var item in fileList)
            {
                int page = 0;
                try
                {
                    page = pagecount(item);
                }
                catch (Exception)
                {
                    continue;
                }
                try
                {
                    g = GetContractFileID(page);
                }
                catch (Exception)
                {
                    continue;
                }
                uploadContract = new upLoadContractFile();
                if (g != null)
                {
                    try
                    {
                        uploadContract.SavAndUpDataContractFile(item, CountractFileKeiId: g);
                        JavaScript.MessageBox( "上传文件成功", this);
                        //JavaScript.RefreshSelf(this);
                        //JavaScript.RefreshOpener(this);
                    }
                    catch (Exception)
                    {
                        JavaScript.MessageBox("上传文件失败", this);
                        // JavaScript.RefreshSelf(this);
                        //JavaScript.RefreshOpener(this);
                    }
                    continue;
                }
                //新建走下面页面
                 contract = new OA_CorporateClientsContract
                {
                    CorporateClientsid = Request["Keyid"].ToGuid2(),
                    FileName = System.IO.Path.GetFileName(item.FileName),
                    PageCode = page,
                    Creater = CurrentUser.TrueMemberId,
                };
                try
                {
                    uploadContract.SavAndUpDataContractFile(item, contract);
                    JavaScript.MessageBox("上传文件成功", this);
                }
                catch (Exception)
                {
                    JavaScript.MessageBox( "上传文件失败", this);
                }
            }
            BindList();
        }
        protected void btn_Submit_Click_DELLALL(object sender, EventArgs e)
        {
            string pageID = Request["Keyid"];
            Database DC = new Database();
            string sqlStr = string.Format(@"USE [ECTEST] SELECT[Keyid]      ,[CorporateClientsid]       ,[CorporateClientsName]       ,[FileName]       ,[PageCode]       ,[FilePath]       ,[Remark]     FROM[dbo].[OA_CorporateClientContract] where CorporateClientsid='{0}'ORDER BY PageCode ", pageID);
            try
            {
                SqlCommand myCmd = new SqlCommand(sqlStr, DC.Connection);
                //SqlDataAdapter myDa = new SqlDataAdapter(myCmd);
                var a = myCmd.ExecuteReader();
                //myDa.Dispose();
                fileDataList = new List<OA_CorporateClientsContract>();
                OA_CorporateClientsContract Contract;
                while (a.Read())
                {   //注意如何将每次读取到的记录添加到listbox1中(因为第一次做时出错了,嘿嘿)
                    Contract = new OA_CorporateClientsContract();
                    Contract.Keyid = a.GetGuid(0);
                    Contract.CorporateClientsid = a.GetGuid(1);
                    Contract.CorporateClientsName = a.GetString(2);
                    Contract.FileName = a.GetString(3);
                    Contract.PageCode = a.GetInt32(4);
                    Contract.FilePath = a.GetString(5);
                    Contract.Remark = a.GetString(6);
                    fileDataList.Add(Contract);
                }
                a.Close();     //关闭sqldatareader
                if (fileDataList.Count > 0)
                {
                    foreach (var item in fileDataList)
                    {
                        FileInfo file = new FileInfo(Server.MapPath(item.FilePath));//指定文件路径
                        if (file.Exists)//判断文件是否存在
                        {
                            file.Attributes = FileAttributes.Normal;//将文件属性设置为普通,比方说只读文件设置为普通
                            file.Delete();//删除文件
                        }
                        sqlStr = string.Format(@"USE [ECTEST]DELETE FROM [dbo].[OA_CorporateClientContract] where Keyid='{0}'", item.Keyid);
                        myCmd = new SqlCommand(sqlStr, DC.Connection);
                        myCmd.ExecuteNonQuery();
                        myCmd.Dispose();
                    }
                }
                JavaScript.MessageBox("删除成功", this);
                //  Response.Redirect("/Pages/business/CorporateClientsUpLoadContract.aspx");
            }
            catch (Exception ee)
            {
                new Log4NetAdapter().Log("查找合同出错:" + ee.Message);
                JavaScript.MessageBox("删除失败", this);
            }
            finally
            {
                if (DC.Connection.State != System.Data.ConnectionState.Closed)
                    DC.Connection.Close();
            }
            BindList();
        }
        protected void btn_Submit_Click(object sender, EventArgs e)
        {
        
            var files = Request.Files;
            if (files.Count <= 0)
                return;
            HttpPostedFile postedFile = files[0];
            //    return;
            HttpPostedFile postedFile=null;
            for (int i = 0; i < files.Count; i++)
            {
                if (files.Keys[i] == "filesel")
                {
                    postedFile = files[i];
            if (postedFile.ContentLength == 0)
                    {
                return;
                    }
                    break;
                }
            }
            Guid? g = GetContractFileID();
            upLoadContractFile uploadContract = new upLoadContractFile();
            if (g != null)
@@ -206,6 +481,7 @@
                    BindList();
                }
                return;
            }
          
@@ -266,6 +542,7 @@
            //    }
            //}
        }
        public void  test()
@@ -274,14 +551,42 @@
        }
        
        /// <summary>
        /// 获取当前页面的guiid,判断是否时新建页面
        /// 获取当前页面的guiid,判断是否是新建页面  如果没有,则获取页面的页码
        /// </summary>
        /// <returns></returns>
        public Guid? GetContractFileID()
        public Guid? GetContractFileID(int?  Pagecode=null)
        {
            Guid Keyid = Request["Keyid"].ToGuid2();
            Database DC = new Database();
            string sqlStr = string.Format(@"USE [ECTEST] SELECT[Keyid] FROM[dbo].[OA_CorporateClientContract] where CorporateClientsid='{0}' and [PageCode]='{1}' ", Keyid, Convert.ToInt32(this.TextPage.Value));
            if (Pagecode != null)
            {
                try
                {
                    Pagecode = Convert.ToInt32(Pagecode);
                }
                catch (Exception)
                {
                    return null;
                }
            }
            else
            {
                try
                {
                    Pagecode = Convert.ToInt32(this.TextPage.Value);
                }
                catch (Exception)
                {
                    return null;
                }
            }
            string sqlStr = string.Format(@"USE [ECTEST] SELECT[Keyid] FROM[dbo].[OA_CorporateClientContract] where CorporateClientsid='{0}' and [PageCode]='{1}' ", Keyid, Pagecode);
            try
            {
@@ -315,6 +620,25 @@
        }
        public int pagecount(HttpPostedFile file)
        {
            try
            {
                string filepagecode = System.IO.Path.GetFileNameWithoutExtension(file.FileName);
                return Convert.ToInt32(filepagecode);
            }
            catch (Exception)
            {
                JavaScript.MessageBox(file.FileName + "文件上传失败,命名规则冲突", this);
                throw;
            }
        }
    }
CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsUpLoadContract.aspx.designer.cs
@@ -69,6 +69,24 @@
        protected global::System.Web.UI.WebControls.Button UpdateFileNew;
        /// <summary>
        /// file2 控件。
        /// </summary>
        /// <remarks>
        /// 自动生成的字段。
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
        /// </remarks>
        protected global::System.Web.UI.HtmlControls.HtmlInputFile file2;
        /// <summary>
        /// Button1 控件。
        /// </summary>
        /// <remarks>
        /// 自动生成的字段。
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
        /// </remarks>
        protected global::System.Web.UI.WebControls.Button Button1;
        /// <summary>
        /// RepClientList 控件。
        /// </summary>
        /// <remarks>
@@ -85,5 +103,14 @@
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
        /// </remarks>
        protected global::CY.WebForm.Pages.common.UCPager UCPager1;
        /// <summary>
        /// Button3 控件。
        /// </summary>
        /// <remarks>
        /// 自动生成的字段。
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
        /// </remarks>
        protected global::System.Web.UI.WebControls.Button Button3;
    }
}
CY_ECommercePlatform/CY.WebForm/js/PictureShow/spotlight.bundle.js
New file
@@ -0,0 +1,31 @@
/**
 * Spotlight.js v0.5.9 (Bundle)
 * Copyright 2019 Nextapps GmbH
 * Author: Thomas Wilkerling
 * Licence: Apache-2.0
 * https://github.com/nextapps-de/spotlight
 */
(function(){'use strict';var aa={};function ba(a){for(var b=a.classList,c={},d=0;d<b.length;d++)c[b[d]]=1;a.a=c;a.c=b}function e(a,b){a=g(a);var c="string"===typeof b;if(a.length)for(var d=0;d<a.length;d++)(c?ca:da)(a[d],b);else(c?ca:da)(a,b)}function da(a,b){for(var c=0;c<b.length;c++)ca(a,b[c])}function ca(a,b){a.a||ba(a);a.a[b]||(a.a[b]=1,a.c.add(b))}function h(a,b){a=g(a);var c="string"===typeof b;if(a.length)for(var d=0;d<a.length;d++)(c?ea:fa)(a[d],b);else(c?ea:fa)(a,b)}
function fa(a,b){for(var c=0;c<b.length;c++)ea(a,b[c])}function ea(a,b){a.a||ba(a);a.a[b]&&(a.a[b]=0,a.c.remove(b))}function k(a,b,c){a=g(a);var d="string"!==typeof b&&Object.keys(b);if(a.length)for(var f=0;f<a.length;f++)(d?ha:ia)(a[f],b,d||c,void 0);else(d?ha:ia)(a,b,d||c,void 0)}function ha(a,b,c,d){for(var f=0;f<c.length;f++){var p=c[f];ia(a,p,b[p],d)}}
function ia(a,b,c,d){var f=a.f;f||(a.f=f={});f[b]!==c&&(f[b]=c,(a.g||(a.g=a.style)).setProperty(aa[b]||(aa[b]=b.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()),c,d?"important":null))}var ja=0;function l(a,b,c){k(a,"transition","none");k(a,b,c);ja||(ja=a.clientTop&&0);k(a,"transition","")}function ka(a,b){b||(b="");a=g(a);if(a.length)for(var c=0;c<a.length;c++){var d=a[c],f=b;d.b!==f&&(d.b=f,d.textContent=f)}else a.b!==b&&(a.b=b,a.textContent=b)}
function g(a){return"string"===typeof a?document.querySelectorAll(a):a}function m(a,b){return(b||document).getElementsByClassName(a)};function la(a,b,c,d){ma("add",a,b,c,d)}function na(a,b,c,d){ma("remove",a,b,c,d)}function ma(a,b,c,d,f){b[a+"EventListener"](c||"click",d,"undefined"===typeof f?!0:f)}function n(a,b){a||(a=window.event);a&&(b||a.preventDefault(),a.stopImmediatePropagation(),a.returnValue=!1);return!1};var oa=document.createElement("style");oa.innerHTML="@keyframes pulsate{0%,to{opacity:1}50%{opacity:.2}}#spotlight,#spotlight .drag,#spotlight .preloader,#spotlight .scene{top:0;width:100%;height:100%}#spotlight .arrow,#spotlight .icon{cursor:pointer;background-repeat:no-repeat}#spotlight{position:fixed;z-index:99999;color:#fff;background-color:#000;visibility:hidden;opacity:0;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:visibility .25s ease,opacity .25s ease;font-family:Helvetica,Arial,sans-serif;font-size:16px;font-weight:400;contain:layout size paint style;touch-action:none;-webkit-tap-highlight-color:transparent}#spotlight.show{opacity:1;visibility:visible;transition:none}#spotlight.show .pane,#spotlight.show .scene{will-change:transform}#spotlight.show .scene img{will-change:transform,opacity}#spotlight .preloader{position:absolute;background-position:center center;background-repeat:no-repeat;background-size:42px 42px;visibility:hidden}#spotlight .preloader.show{transition:visibility 0s linear .25s;visibility:visible}#spotlight .drag{position:absolute}#spotlight .scene{position:absolute;transition:transform 1s cubic-bezier(.1,1,.1,1);contain:layout size style;pointer-events:none}#spotlight .scene img{display:inline-block;position:absolute;width:auto;height:auto;max-width:100%;max-height:100%;left:50%;top:50%;opacity:1;margin:0;padding:0;border:0;transform:translate(-50%,-50%) scale(1) perspective(100vw);transition:transform 1s cubic-bezier(.1,1,.1,1),opacity 1s cubic-bezier(.3,1,.3,1);transform-style:preserve-3d;contain:layout paint style;visibility:hidden}#spotlight .header,#spotlight .pane{position:absolute;top:0;width:100%;height:100%;contain:layout size style}#spotlight .header{height:50px;text-align:right;background-color:rgba(0,0,0,.45);transform:translateY(-100px);transition:transform .35s ease-out;contain:layout size paint style}#spotlight .header:hover,#spotlight.menu .header{transform:translateY(0)}#spotlight .header div{display:inline-block;vertical-align:middle;white-space:nowrap;width:30px;height:50px;padding-right:20px;opacity:.5}#spotlight .progress{position:absolute;top:0;width:100%;height:3px;background-color:rgba(255,255,255,.45);transform:translateX(-100%);transition:transform 1s linear}#spotlight .arrow,#spotlight .footer{position:absolute;background-color:rgba(0,0,0,.45)}#spotlight .footer{bottom:0;line-height:1.35em;padding:20px 25px;text-align:left;pointer-events:none;contain:layout paint style}#spotlight .footer .title{font-size:125%;padding-bottom:10px}#spotlight .page{float:left;width:auto;padding-left:20px;line-height:50px}#spotlight .icon{background-position:left center;background-size:21px 21px;transition:opacity .2s ease-out}#spotlight .fullscreen{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyLjUiIHZpZXdCb3g9Ii0xIC0xIDI2IDI2IiB3aWR0aD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggM0g1YTIgMiAwIDAgMC0yIDJ2M20xOCAwVjVhMiAyIDAgMCAwLTItMmgtM20wIDE4aDNhMiAyIDAgMCAwIDItMnYtM00zIDE2djNhMiAyIDAgMCAwIDIgMmgzIi8+PC9zdmc+)}#spotlight .fullscreen.on{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyLjUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04IDN2M2EyIDIgMCAwIDEtMiAySDNtMTggMGgtM2EyIDIgMCAwIDEtMi0yV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4Mj0iMTQiIHkxPSIxNSIgeTI9IjkiLz48L3N2Zz4=);animation:pulsate 1s ease infinite}#spotlight .close{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyIiB2aWV3Qm94PSIyIDIgMjAgMjAiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48bGluZSB4MT0iMTgiIHgyPSI2IiB5MT0iNiIgeTI9IjE4Ii8+PGxpbmUgeDE9IjYiIHgyPSIxOCIgeTE9IjYiIHkyPSIxOCIvPjwvc3ZnPg==)}#spotlight .preloader{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzgiIGhlaWdodD0iMzgiIHZpZXdCb3g9IjAgMCAzOCAzOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBzdHJva2U9IiNmZmYiPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMSAxKSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2Utb3BhY2l0eT0iLjY1Ij48Y2lyY2xlIHN0cm9rZS1vcGFjaXR5PSIuMTUiIGN4PSIxOCIgY3k9IjE4IiByPSIxOCIvPjxwYXRoIGQ9Ik0zNiAxOGMwLTkuOTQtOC4wNi0xOC0xOC0xOCI+PGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJyb3RhdGUiIGZyb209IjAgMTggMTgiIHRvPSIzNjAgMTggMTgiIGR1cj0iMXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+PC9wYXRoPjwvZz48L2c+PC9zdmc+)}#spotlight .arrow{top:50%;left:20px;width:50px;height:50px;border-radius:100%;margin-top:-25px;padding:10px;transform:translateX(-100px);transition:transform .35s ease-out,opacity .2s ease-out;box-sizing:border-box;background-position:center center;background-size:30px 30px;opacity:.65;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cG9seWxpbmUgcG9pbnRzPSIxNSAxOCA5IDEyIDE1IDYiLz48L3N2Zz4=)}#spotlight .arrow-right{left:auto;right:20px;transform:translateX(100px) scaleX(-1)}#spotlight.menu .arrow-left{transform:translateX(0)}#spotlight.menu .arrow-right{transform:translateX(0) scaleX(-1)}#spotlight .arrow-left:hover,#spotlight .arrow-right:hover,#spotlight .icon:hover{opacity:1;animation:none}#spotlight.white{color:#fff;background-color:#fff}#spotlight.white .arrow,#spotlight.white .footer,#spotlight.white .header,#spotlight.white .preloader,#spotlight.white .progress{filter:invert(1)}.hide-scrollbars{overflow:-moz-hidden-unscrollable;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{width:0}@media (max-width:800px){#spotlight .header div{width:20px}#spotlight .footer{font-size:12px}#spotlight .arrow{width:35px;height:35px;margin-top:-17.5px;background-size:15px 15px}#spotlight .preloader{background-size:30px 30px}}@media (max-width:400px),(max-height:400px){#spotlight .fullscreen{display:none!important}}";
document.getElementsByTagName("head")[0].appendChild(oa);var q="theme fullscreen autofit zoom-in zoom-out page title description player progress".split(" "),r,t,pa,qa,x,y,z,A,B,C,D,E,F,G,H,ra,I,J,K,L,sa,ta,M,N,O,P,Q,ua,va,wa,xa,ya,R,za,Aa,Ba,Ca,S,Da,T,V,W,Ea;function Fa(a,b,c){this.src=a;this.title=b;this.description=c}
function Ga(a,b){if(J=a.length){O||(O=m("pane",Q));var c=O.length,d=K.title,f=K.description;W=Array(J);for(var p=0;p<J;p++){var u=a[p],v=u.dataset;if(p>=c){var w=O[0].cloneNode(!1);k(w,"left",100*p+"%");O[0].parentNode.appendChild(w)}w=void 0;W[p]=new Fa(v&&(v.href||v.src)||u.src||u.href,v&&v.title||u.title||(w=(u||document).getElementsByTagName("img")).length&&w[0].alt||d||"",v&&v.description||u.description||f||"")}I=b||1;l(M,"transform","translateX(-"+100*(I-1)+"%)");Ha()}}
function Ia(a,b,c,d){if(d||a[c])K[c]=b&&b[c]||d}
function Ja(a,b){K={};b&&Ka(b);Ka(a);Ia(a,b,"description");Ia(a,b,"title");Ia(a,b,"prefetch",!0);Ia(a,b,"preloader",!0);L=K.infinite;L="undefined"!==typeof L&&"false"!==L;sa="false"!==K.progress;ta=1*K.player||7E3;if((a=K.zoom)||""===a)K["zoom-in"]=K["zoom-out"]=a,delete K.zoom;if((a=K.control)||""===a){a="string"===typeof a?a.split(","):a;for(b=0;b<q.length;b++)K[q[b]]="false";for(b=0;b<a.length;b++){var c=a[b].trim();"zoom"===c?K["zoom-in"]=K["zoom-out"]="true":K[c]="true"}}for(a=0;a<q.length;a++)b=
q[a],k(m(b,Q)[0],"display","false"===K[b]?"none":"");(ra=K.theme)?La():ra="white"}function Ka(a){for(var b=K,c=Object.keys(a),d=0;d<c.length;d++){var f=c[d];b[f]=""+a[f]}}
function Ma(){var a=I;N=O[a-1];P=N.firstElementChild;I=a;if(!P){var b="false"!==K.preloader;P=new Image;P.onload=function(){b&&h(Ca,"show");W&&(z=this.width,A=this.height,k(this,{visibility:"visible",opacity:1,transform:""}),"false"!==K.prefetch&&a<J&&((new Image).src=W[a].src))};P.onerror=function(){N.removeChild(this)};N.appendChild(P);P.src=W[a-1].src;b&&e(Ca,"show");return!b}return!0}la(document,"",Na);
la(document,"DOMContentLoaded",function(){Q=document.createElement("div");Q.id="spotlight";Q.innerHTML='<div class=drag></div><div class=preloader></div><div class=scene><div class=pane></div></div><div class=header><div class=page></div><div class="icon fullscreen"></div><div class="icon autofit"></div><div class="icon zoom-out"></div><div class="icon zoom-in"></div><div class="icon theme"></div><div class="icon player"></div><div class="icon close"></div></div><div class=progress></div><div class="arrow arrow-left"></div><div class="arrow arrow-right"></div><div class=footer><div class=title></div><div class=description></div></div>';
k(Q,"transition","none");document.body.appendChild(Q);M=m("scene",Q)[0];ua=m("footer",Q)[0];va=m("title",ua)[0];wa=m("description",ua)[0];xa=m("arrow-left",Q)[0];ya=m("arrow-right",Q)[0];R=m("fullscreen",Q)[0];za=m("page",Q)[0];Aa=m("player",Q)[0];Ba=m("progress",Q)[0];Ca=m("preloader",Q)[0];V=document.documentElement||document.body;document.cancelFullScreen||(document.cancelFullScreen=document.exitFullscreen||document.webkitCancelFullScreen||document.webkitExitFullscreen||document.mozCancelFullScreen||
function(){});V.requestFullScreen||(V.requestFullScreen=V.webkitRequestFullScreen||V.msRequestFullScreen||V.mozRequestFullScreen||k(R,"display","none")||function(){});var a=m("drag",Q)[0];Ea=[[window,"keydown",Oa],[window,"wheel",Pa],[window,"hashchange",Qa],[window,"resize",Ra],[a,"mousedown",Sa],[a,"mouseleave",Ta],[a,"mouseup",Ta],[a,"mousemove",Ua],[a,"touchstart",Sa,{passive:!1}],[a,"touchcancel",Ta],[a,"touchend",Ta],[a,"touchmove",Ua,{passive:!0}],[R,"",Va],[xa,"",Wa],[ya,"",X],[Aa,"",Xa],
[m("autofit",Q)[0],"",Ya],[m("zoom-in",Q)[0],"",Za],[m("zoom-out",Q)[0],"",$a],[m("close",Q)[0],"",ab],[m("theme",Q)[0],"",La]]},{once:!0});function Ra(){x=Q.clientWidth;y=Q.clientHeight;P&&(z=P.width,A=P.height,bb())}function bb(){k(P,"transform","translate(-50%, -50%) scale("+B+")")}function cb(a){for(var b=0;b<Ea.length;b++){var c=Ea[b];(a?la:na)(c[0],c[1],c[2],c[3])}}
function Na(a){var b=db.call(a.target,".spotlight");if(b){var c=db.call(b,".spotlight-group"),d=m("spotlight",c);Ja(b.dataset,c&&c.dataset);for(c=0;c<d.length;c++)if(d[c]===b){Ga(d,c+1);break}eb();return n(a)}}function Oa(a){if(N)switch(a.keyCode){case 8:Ya();break;case 27:ab();break;case 32:"false"!==K.player&&Xa();break;case 37:Wa();break;case 39:X();break;case 38:case 107:case 187:Za();break;case 40:case 109:case 189:$a()}}function Pa(a){N&&(a=a.deltaY,0>.5*(0>a?1:a?-1:0)?$a():Za())}
function Qa(){N&&"#spotlight"===location.hash&&ab(!0)}function Xa(a){("boolean"===typeof a?a:!S)?S||(S=setInterval(X,ta),e(Aa,"on"),sa&&fb()):S&&(S=clearInterval(S),h(Aa,"on"),sa&&l(Ba,"transform",""));return S}function Y(){T?clearTimeout(T):e(Q,"menu");var a=K.autohide;T="false"!==a?setTimeout(function(){h(Q,"menu");T=null},1*a||3E3):1}function gb(a){"boolean"===typeof a&&(T=a?T:0);T?(T=clearTimeout(T),h(Q,"menu")):Y();return n(a)}
function Sa(a){C=!0;D=!1;var b=hb(a);E=z*B<=x;pa=b.x;qa=b.y;return n(a,!0)}function Ta(a){if(C&&!D)return C=!1,gb(a);E&&D&&(l(M,"transform","translateX("+-(100*(I-1)-r/x*100)+"%)"),r<-(y/10)&&X()||r>y/10&&Wa()||k(M,"transform","translateX(-"+100*(I-1)+"%)"),r=0,E=!1,k(N,"transform",""));C=!1;return n(a)}
function Ua(a){if(C){Da||(Da=requestAnimationFrame(ib));var b=hb(a),c=(z*B-x)/2;D=!0;r-=pa-(pa=b.x);E?F=!0:r>c?r=c:0<x-r-z*B+c?r=x-z*B+c:F=!0;A*B>y&&(c=(A*B-y)/2,t-=qa-(qa=b.y),t>c?t=c:0<y-t-A*B+c?t=y-A*B+c:F=!0)}else Y();return n(a,!0)}function hb(a){var b=a.touches;b&&(b=b[0]);return{x:b?b.clientX:a.pageX,y:b?b.clientY:a.pageY}}function ib(a){F?(a&&(Da=requestAnimationFrame(ib)),k(N,"transform","translate("+r+"px, "+t+"px)")):Da=null;F=!1}
function Va(a){("boolean"===typeof a?a:document.isFullScreen||document.webkitIsFullScreen||document.mozFullScreen)?(document.cancelFullScreen(),h(R,"on")):(V.requestFullScreen(),e(R,"on"))}function Ya(a){"boolean"===typeof a&&(G=!a);G=1===B&&!G;k(P,{maxHeight:G?"none":"",maxWidth:G?"none":"",transform:""});z=P.width;A=P.height;B=1;t=r=0;F=!0;ib();Y()}function Za(a){var b=B/.65;5>=b&&jb(B=b);a||Y()}function jb(a){B=a||1;bb()}function $a(a){var b=.65*B;1<=b&&(jb(B=b),t=r=0,F=!0,ib());a||Y()}
function eb(){location.hash="spotlight";location.hash="show";k(Q,"transition","");e(V,"hide-scrollbars");e(Q,"show");cb(!0);Ra();Y()}function ab(a){cb(!1);history.go(!0===a?-1:-2);h(V,"hide-scrollbars");h(Q,"show");S&&Xa(!1);P.parentNode.removeChild(P);N=P=W=null}function Wa(){if(1<I)return Z(I-1);if(S||L)return Z(J)}function X(){if(I<J)return Z(I+1);if(S||L)return Z(1)}function Z(a){if(!(S&&C||a===I)){S||Y();S&&sa&&fb();var b=a>I;I=a;Ha(b);return!0}}
function fb(){l(Ba,{transitionDuration:"",transform:""});k(Ba,{transitionDuration:ta+"ms",transform:"translateX(0)"})}function La(a){"boolean"===typeof a?H=a:(H=!H,Y());H?e(Q,ra):h(Q,ra)}
function Ha(a){t=r=0;B=1;var b=K.animation,c=!0,d=!0,f=!0;if(b||""===b){c=d=f=!1;b="string"===typeof b?b.split(","):b;for(var p=0;p<b.length;p++){var u=b[p].trim();if("scale"===u)c=!0;else if("fade"===u)d=!0;else if("slide"===u)f=!0;else if("flip"===u)var v=!0;else if("false"!==u){c=d=f=v=!1;var w=u;break}}}k(M,{transition:f?"":"none",transform:"translateX(-"+100*(I-1)+"%)"});N&&k(N,"transform","");if(P){k(P,{opacity:d?0:1,transform:""});var U=P;setTimeout(function(){U&&P!==U&&U.parentNode&&U.parentNode.removeChild(U)},
800)}f=Ma();w&&e(P,w);l(P,{opacity:d?0:1,transform:"translate(-50%, -50%)"+(c?" scale(0.8)":"")+(v&&"undefined"!==typeof a?" rotateY("+(a?"":"-")+"90deg)":""),maxHeight:"",maxWidth:""});f&&k(P,{visibility:"visible",opacity:1,transform:""});w&&h(P,w);k(N,"transform","");k(xa,"visibility",L||1!==I?"":"hidden");k(ya,"visibility",L||I!==J?"":"hidden");a=W[I-1];if(c=a.title||a.description)ka(va,a.title),ka(wa,a.description);k(ua,"visibility",c?"visible":"hidden");ka(za,I+" / "+J)}
var db=Element.prototype.closest||function(a){var b=this;for(a=a.substring(1);b&&1===b.nodeType;){if(b.classList.contains(a))return b;b=b.parentElement||b.parentNode}};window.Spotlight={theme:La,fullscreen:Va,autofit:Ya,next:X,prev:Wa,"goto":Z,close:ab,zoom:jb,menu:gb,show:function(a,b){setTimeout(function(){a?(b?Ja(b):b={},Ga(a,b.index)):K={};eb()})},play:Xa};}).call(this);