| | |
| | | <Content Include="Pages\business\DeliverPlanShifou.aspx" /> |
| | | <Content Include="Pages\business\DeliverPlanLishiPrint.aspx" /> |
| | | <Content Include="Pages\business\DeliverPlanPaicheZhuyishixiang.aspx" /> |
| | | <Content Include="Pages\business\DeliverPlanTimeEdit.aspx" /> |
| | | <Content Include="Pages\business\SHejiOrderEdit.aspx" /> |
| | | <Content Include="Pages\business\ShejijijianEdit.aspx" /> |
| | | <Content Include="Pages\business\ShejijijianList.aspx" /> |
| | |
| | | </Compile> |
| | | <Compile Include="Pages\business\DeliverPlanPaicheZhuyishixiang.aspx.designer.cs"> |
| | | <DependentUpon>DeliverPlanPaicheZhuyishixiang.aspx</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="Pages\business\DeliverPlanTimeEdit.aspx.cs"> |
| | | <DependentUpon>DeliverPlanTimeEdit.aspx</DependentUpon> |
| | | <SubType>ASPXCodeBehind</SubType> |
| | | </Compile> |
| | | <Compile Include="Pages\business\DeliverPlanTimeEdit.aspx.designer.cs"> |
| | | <DependentUpon>DeliverPlanTimeEdit.aspx</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="Pages\business\FileUploadHandler.ashx.cs"> |
| | | <DependentUpon>FileUploadHandler.ashx</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="Pages\business\SHejiOrderEdit.aspx.cs"> |
| | | <DependentUpon>SHejiOrderEdit.aspx</DependentUpon> |
| | |
| | | <Content Include="Pages\business\SendAllCorEmail.aspx" /> |
| | | <Content Include="OnlineAdviserLOGO.ashx" /> |
| | | <None Include="packages.config" /> |
| | | <Content Include="Pages\business\FileUploadHandler.ashx" /> |
| | | <None Include="Pages\common\skin\Thumbs.db" /> |
| | | <Content Include="Pages\sysInquiry\CalculatePaperPriceHandler.ashx" /> |
| | | <Content Include="Pages\Templet\Default\Shared\Company.Master" /> |
| | |
| | | // OpenWindowByUrl();
|
| | | OpenWindowByUrl('/Pages/business/DeliverPlanPrint.aspx?DeliverTime=' + DeliveryTime + '&CarId=' + CarId + '&DriverId=' + DriverId + '&CustormerName=' + CustormerName + '&BusinessManager=' + BusinessManager + '&Paiche=' + Paiche, '', '');
|
| | | }
|
| | |
|
| | |
|
| | | //查看客户资料
|
| | | function ViewTime(Keyid, DelayTime) {
|
| | | top.Dialog.open({ URL: "/Pages/business/DeliverPlanTimeEdit.aspx?Keyid=" + Keyid + "&DelayTime=" + DelayTime, Title: "延迟送货时间", Width: 300, Height: 300 });
|
| | | }
|
| | |
|
| | | </script>
|
| | | <style type="text/css">
|
| | | .tableStyleXS th { padding: 1px 0 1px 3px; background-image:none; border-bottom:1px solid #CCC; }
|
| | |
| | | <%#Eval("SellerOrderId")%>
|
| | | </td>
|
| | | <td>
|
| | | <%#Eval("DeliverTime", "{0:yyyy-MM-dd}")%>
|
| | | <a href='javascript:void(0)' title='点击修改送货日期' class='a_under' onclick='ViewTime("<%#Eval("Keyid")%>","<%#Eval("DeliverTime", "{0:yyyy-MM-dd}")%>")'> <%#Eval("DeliverTime", "{0:yyyy-MM-dd}")%> </a> |
| | | </td>
|
| | | <%--<td>
|
| | | <%#Eval("DeliveredTime", "{0:yyyy-MM-dd}")%>
|
New file |
| | |
| | | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DeliverPlanTimeEdit.aspx.cs" Inherits="CY.WebForm.Pages.business.DeliverPlanTimeEdit" %>
|
| | |
|
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
| | |
|
| | | <html xmlns="http://www.w3.org/1999/xhtml">
|
| | | <head runat="server">
|
| | | <title>新增/修改延迟完工时间</title>
|
| | | <uc:CMSHead ID="CMSHead1" runat="server" />
|
| | | <script src="../../js/business/Custom.js" type="text/javascript"></script>
|
| | | <script type="text/javascript">
|
| | |
|
| | | |
| | |
|
| | | </script>
|
| | | </head>
|
| | | <body>
|
| | | <form runat="server" id="form1" class="form2">
|
| | | <fieldset>
|
| | | <legend>基本信息</legend>
|
| | | <table class="tableStyle" width="100%"> |
| | | <tr> |
| | | <td class="ali03 ">延迟完工时间:</td>
<td ><input id="txtDelayTime" type="text" runat="server" maxlength="50" class=" date w90px" datefmt="yyyy-MM-dd" /></td> |
| | | |
| | | |
| | | |
| | | </tr> |
| | | <tr>
|
| | | |
| | | |
| | | <td class="ali02" colspan="2">
|
| | | |
| | | <asp:Button ID="btn_Submit" Text="保存" runat="server" OnClick="btn_Submit_Config" /> |
| | | |
| | | <input type="hidden" id="HideKeyid" runat="server" /></td>
|
| | | |
| | | </tr> |
| | | </table>
|
| | | </fieldset>
|
| | | |
| | | |
| | | </form>
|
| | | </body>
|
| | | <script type="text/javascript">
|
| | | |
| | | </script>
|
| | | </html> |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | using System.Web.UI; |
| | | using System.Web.UI.WebControls; |
| | | using CY.BLL; |
| | | using CY.Model; |
| | | using CY.Infrastructure.Query; |
| | | using CY.Infrastructure.Common; |
| | | using CY.BLL.Sys; |
| | | using System.Text; |
| | | using CY.BLL.OA; |
| | | using CY.BLL.EC; |
| | | |
| | | namespace CY.WebForm.Pages.business |
| | | { |
| | | public partial class DeliverPlanTimeEdit : BasePage |
| | | { |
| | | OA_DeliverPlanBLL oA_DeliverPlanBLL = null; |
| | | |
| | | public DeliverPlanTimeEdit() |
| | | { |
| | | |
| | | oA_DeliverPlanBLL = new OA_DeliverPlanBLL(); |
| | | |
| | | } |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | try |
| | | { |
| | | if (!IsPostBack) |
| | | { |
| | | this.HideKeyid.Value = Request["Keyid"].ToString2(); |
| | | this.txtDelayTime.Value = Request["DelayTime"].ToString2(); |
| | | } |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | PAGEHandleException(ex); |
| | | Response.Clear(); |
| | | Response.Write("-1"); |
| | | } |
| | | //Response.End(); |
| | | } |
| | | |
| | | |
| | | //提交事件 |
| | | protected void btn_Submit_Config(object sender, EventArgs e) |
| | | { |
| | | |
| | | |
| | | try |
| | | { |
| | | |
| | | if (string.IsNullOrEmpty(this.HideKeyid.Value)) |
| | | { |
| | | JavaScript.MessageBox("没有订单id", this); |
| | | } |
| | | if (this.txtDelayTime.Value.ToDateTime2() == null) |
| | | { |
| | | JavaScript.MessageBox("请正确填写延迟完工时间", this); |
| | | } |
| | | string Keyid = this.HideKeyid.Value; |
| | | DateTime DelayTime = this.txtDelayTime.Value.ToDateTime2().Value; |
| | | |
| | | var oA_DeliverPlan = oA_DeliverPlanBLL.GetModelByKeyid(Keyid.ToGuid2(),null,null); |
| | | oA_DeliverPlan.DeliverTime = DelayTime; |
| | | oA_DeliverPlan.Updater = CurrentUser.TrueMemberId; |
| | | oA_DeliverPlan.LastUpdateTime = DateTime.Now; |
| | | |
| | | bool result = oA_DeliverPlanBLL.UpdateModel(oA_DeliverPlan); |
| | | |
| | | if (result) |
| | | JavaScript.MessageBox("更新成功", this, true, true); |
| | | else |
| | | JavaScript.MessageBox("更新失败", this); |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | PAGEHandleException(ex); |
| | | JavaScript.MessageBox("操作失败", this); |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | //------------------------------------------------------------------------------ |
| | | // <自动生成> |
| | | // 此代码由工具生成。 |
| | | // |
| | | // 对此文件的更改可能导致不正确的行为,如果 |
| | | // 重新生成代码,则所做更改将丢失。 |
| | | // </自动生成> |
| | | //------------------------------------------------------------------------------ |
| | | |
| | | namespace CY.WebForm.Pages.business |
| | | { |
| | | |
| | | |
| | | public partial class DeliverPlanTimeEdit |
| | | { |
| | | |
| | | /// <summary> |
| | | /// CMSHead1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::CY.WebForm.Pages.common.CMSHead CMSHead1; |
| | | |
| | | /// <summary> |
| | | /// form1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
| | | |
| | | /// <summary> |
| | | /// txtDelayTime 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlInputText txtDelayTime; |
| | | |
| | | /// <summary> |
| | | /// btn_Submit 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.WebControls.Button btn_Submit; |
| | | |
| | | /// <summary> |
| | | /// HideKeyid 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlInputHidden HideKeyid; |
| | | } |
| | | } |
New file |
| | |
| | | <%@ WebHandler Language="C#" CodeBehind="FileUploadHandler.ashx.cs" Class="CY.WebForm.Pages.business.FileUploadHandler" %> |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Web; |
| | | using System.Web.Script.Serialization; |
| | | |
| | | namespace CY.WebForm.Pages.business |
| | | { |
| | | /// <summary> |
| | | /// FileUploadHandler 的摘要说明 |
| | | /// </summary> |
| | | public class FileUploadHandler : IHttpHandler |
| | | { |
| | | |
| | | public void ProcessRequest(HttpContext context) |
| | | { |
| | | context.Response.ContentType = "application/json"; |
| | | |
| | | try |
| | | { |
| | | if (context.Request.Files.Count > 0) |
| | | { |
| | | HttpPostedFile file = context.Request.Files["file"]; |
| | | |
| | | // 验证文件 |
| | | if (file.ContentLength > 0) |
| | | { |
| | | // 检查文件大小是否超过5MB |
| | | if (file.ContentLength > 5 * 1024 * 1024) // 5MB |
| | | { |
| | | throw new Exception("文件不能大于5M"); |
| | | } |
| | | // 设置保存路径 |
| | | string fileName = DateTime.Now.ToString("HHmmssfff")+ Path.GetFileName(file.FileName); |
| | | string riqi = DateTime.Now.ToString("yyyyMMdd"); |
| | | string fileDirectory = "/UpFile/UpFile/" + riqi + "/"; |
| | | if ((fileDirectory + fileName).Length>400) // 5MB |
| | | { |
| | | throw new Exception("文件名字过长"); |
| | | } |
| | | string fileExtension = Path.GetExtension(fileName); |
| | | string savePath = context.Server.MapPath("~"+ fileDirectory) + fileName; |
| | | |
| | | // 确保目录存在 |
| | | if (!Directory.Exists(context.Server.MapPath("~"+ fileDirectory))) |
| | | { |
| | | Directory.CreateDirectory(context.Server.MapPath("~"+ fileDirectory)); |
| | | } |
| | | |
| | | // 保存文件 |
| | | file.SaveAs(savePath); |
| | | |
| | | // 返回JSON响应 |
| | | var response = new |
| | | { |
| | | code = 1, |
| | | message = "文件上传成功", |
| | | fileName = fileName, |
| | | fileSize = file.ContentLength, |
| | | data = fileDirectory + fileName |
| | | }; |
| | | |
| | | context.Response.Write(new JavaScriptSerializer().Serialize(response)); |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("文件内容为空"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("没有接收到文件"); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | var errorResponse = new |
| | | { |
| | | code = 2, |
| | | message = ex.Message |
| | | }; |
| | | |
| | | context.Response.Write(new JavaScriptSerializer().Serialize(errorResponse)); |
| | | } |
| | | } |
| | | |
| | | public bool IsReusable |
| | | { |
| | | get |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | $.ajax({ |
| | | url: 'https://yocaisim.51zhengcai.com/api/UpFile/UpdateFile', // 替换为你的服务器端点 |
| | | url: '/Pages/business/FileUploadHandler.ashx', // 替换为你的服务器端点 |
| | | type: 'POST', |
| | | data: formData, |
| | | contentType: false, |
| | |
| | | $('a[name="HrefAttachmentFapiao"]').last().html('<img src="' + response.data+'" width="20" height="20" />'); |
| | | alertMsg('上传成功'); |
| | | } else { |
| | | alertMsg('上传失败'); |
| | | alertMsg(response.message); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | $.ajax({ |
| | | url: 'https://yocaisim.51zhengcai.com/api/UpFile/UpdateFile', // 替换为你的服务器端点 |
| | | url: '/Pages/business/FileUploadHandler.ashx', // 替换为你的服务器端点 |
| | | type: 'POST', |
| | | data: formData, |
| | | contentType: false, |
| | |
| | | $('a[name="HrefAttachmentFapiao"]').last().html('<img src="' + response.data + '" width="20" height="20" />'); |
| | | alertMsg('上传成功'); |
| | | } else { |
| | | alertMsg('上传失败'); |
| | | alertMsg(response.message); |
| | | } |
| | | |
| | | |