diff --git a/DSWeb.DJYMQ/DS7Service.cs b/DSWeb.DJYMQ/DS7Service.cs index 3ef24feb..f1e3bd21 100644 --- a/DSWeb.DJYMQ/DS7Service.cs +++ b/DSWeb.DJYMQ/DS7Service.cs @@ -1936,6 +1936,8 @@ SELECT @ps_BillNo as N'billno'"; //如果费用封账 if (updrec.费用状态 == "费用封帐") { newhead.会计期间 = updrec.会计期间; + //newhead.ETD= updrec.ETD; + newhead.预抵日期 = updrec.预抵日期; } newhead.主提单标准 = string.IsNullOrWhiteSpace(head.mblno) ? updrec.编号 : head.mblno; @@ -1947,6 +1949,12 @@ SELECT @ps_BillNo as N'billno'"; newhead.业务编号 = updrec.业务编号; newhead.派车日期 = updrec.派车日期; + //20230803 根据马静怡的要求 + //在同步时 如果目的港ETA为空 则不用空值更新东胜的ETA当前值 + if (newhead.ETA == null) { + newhead.ETA = updrec.ETA; + } + logger.Debug($"开始处理(更新):{newhead.主提单号};{newhead.DJYID}"); //执行中对象2.执行列表数(); diff --git a/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs b/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs index b26e7021..ef28f71a 100644 --- a/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs +++ b/DSWeb/Areas/Account/Models/Chfee_invoice_HangXin/Chfee_Invoice.cs @@ -26,6 +26,7 @@ using sun.security.krb5.@internal.crypto; using DSWeb.Areas.CommMng.Controllers; using DSWeb.MvcShipping.DAL.MsSysParamSet; using System.Web; +using DSWeb.MvcShipping.DAL.MsOpExpressDAL; namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin { @@ -683,6 +684,9 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin { get { return ChInvoiceDetail.ZTAXTYPE; } } + + + #endregion } @@ -695,6 +699,8 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin public NuoNuoQuanDianInvoice(ChInvoice_HangXin head, List body) { this.order = new NuoNuoQuanDian_Head(head); + order.payee = ""; + order.checker = ""; List invoiceDetail = new List(); foreach (var detail in body) @@ -721,6 +727,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin ChInvoice_HangXin = _ChInvoice; //需增加 //获取callback地址 + } //public string redReason { get { return ChInvoice_HangXin.redReason; } } @@ -804,6 +811,10 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin public string managerCardNo { get { return ChInvoice_HangXin.managerCardNo; } } + public string checker { get; set; } + + public string payee { get; set; } + public List invoiceDetail; } @@ -818,9 +829,38 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin { this.ChInvoiceDetail = ChInvoiceDetail; - } - public string goodsCode { get; set; } = ""; + //favouredPolicyNameDic = new Dictionary + //{ + // /// 全电票内容来自枚举类型80007 + // /// 全电发票时: 01:简易征收 02:稀土产品 03:免税 04:不征税 05:先征后退 06:100%先征后退 07:50%先征后退 + // /// 08:按 3%简易征收 09:按 5%简易征收 10:按 5%简易征收减按 1.5%计征 11:即征即退 30% 12:即征即退 50% + // /// 13:即征即退 70% 14:即征即退 100% 15:超税负 3%即征即退 16:超税负 8%即征即退 + // /// 17:超税负 12%即征即退 18:超税负6%即征即退 + // //{ "1", "简易征收" }, + // //{ "2", "稀土产品" }, + // //{ "3", "免税" }, + // //{ "4", "不征税" }, + // //{ "5", "先征后退" }, + // //{ "6", "100%先征后退" }, + // //{ "7", "50%先征后退" }, + // //{ "8", "按 3%简易征收" }, + // //{ "9", "按 5%简易征收" }, + // //{ "10", "按 5%简易征收减按 1.5%计征" }, + // //{ "11", "即征即退 30%" }, + // //{ "12", "即征即退 50%" }, + // //{ "13", "即征即退 70%" }, + // //{ "14", "即征即退 100%" }, + // //{ "15", "超税负 3%即征即退" }, + // //{ "16", "超税负 8%即征即退" }, + // //{ "17", "超税负 12%即征即退" }, + // //{ "18", "超税负6%即征即退" } + // { "1", "免税" }, + // { "0", "零税率" } + //}; + } + + //public string goodsCode { get; set; } = ""; public string selfCode { get; set; } = ""; /// @@ -828,7 +868,20 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin /// public string invoiceLineProperty { get; set; } = "0"; + //public string favouredPolicyName + //{ + // get + // { + // if (favouredPolicyNameDic.ContainsKey(favouredPolicyFlag)) + // { + // return favouredPolicyNameDic[favouredPolicyFlag]; + // } + // else + // return ""; + // } + //} + private Dictionary favouredPolicyNameDic { get; set; } } [JsonObject] diff --git a/DSWeb/Areas/Dispatch/Controllers/WxAppController.cs b/DSWeb/Areas/Dispatch/Controllers/WxAppController.cs index 61f5afef..3ca13f07 100644 --- a/DSWeb/Areas/Dispatch/Controllers/WxAppController.cs +++ b/DSWeb/Areas/Dispatch/Controllers/WxAppController.cs @@ -15,6 +15,19 @@ using DSWeb.Areas.Dispatch.DB_Wx; using DSWeb.Areas.CommMng.DAL; using HcUtility.Comm; using System.Data.Entity.Migrations; +using static DSWeb.Areas.CommMng.Controllers.DSWEBAPPInterfaceController; +using DSWeb.Areas.Account.Models.Chfee_Invoice; +using DSWeb.Common.DB; +using DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit; +using System.Web.UI.WebControls; +using DSWeb.Areas.MvcShipping.DAL; +using DSWeb.Areas.Import.DAL.ReceiptDoc; +using DSWeb.Areas.TruckMng.Models.MsWlBs; +using DSWeb.MvcShipping.DAL.MsSysBillNoSet; +using DSWeb.MvcShipping.Models.MsOpLetter; +using HcUtility.Core; +using NPOI.OpenXmlFormats.Wordprocessing; +using DSWeb.MvcShipping.DAL.MsSysParamSet; namespace DSWeb.Areas.Dispatch.Controllers { @@ -675,7 +688,7 @@ namespace DSWeb.Areas.Dispatch.Controllers { var resultList = new List(); - var cdc = new CommonDataContext(); + //var cdc = new CommonDataContext(); var wx = new WxAppDataContext(); //寻找这个人需要执行的业务内容 @@ -789,7 +802,7 @@ namespace DSWeb.Areas.Dispatch.Controllers { var result = new OP_YARD_CTNMNG_WORK(); - var cdc = new CommonDataContext(); + //var cdc = new CommonDataContext(); var wx = new WxAppDataContext(); //寻找这个人在这项业务中需要执行的业务内容,并返回其中orderno最小的一项 var head = wx.OP_YARD_CTNMNG.FirstOrDefault(x => x.GID.ToString().ToUpper() == GID.ToUpper()); @@ -839,7 +852,7 @@ namespace DSWeb.Areas.Dispatch.Controllers { //var result = new OP_YARD_CTNMNG_WORK(); - var cdc = new CommonDataContext(); + //var cdc = new CommonDataContext(); var wx = new WxAppDataContext(); var result = wx.OP_YARD_CTNMNG_WORK.FirstOrDefault(x => x.GID==new Guid(GID)); @@ -1422,6 +1435,8 @@ namespace DSWeb.Areas.Dispatch.Controllers public string TEL { get; set; } } + + [HttpPost] public ActionResult DriverFirstLogin(DriverLoginInfo logininfo) { @@ -1522,6 +1537,276 @@ namespace DSWeb.Areas.Dispatch.Controllers } + public class FHParam : AppParam + { + public string openid { get; set; } + + + } + public class FHParam_ChangePwd : FHParam + { + public string userOldPwd { get; set; } + public string userNewPwd1 { get; set; } + public string userNewPwd2 { get; set; } + + public DBResult SavePwd() { + var result = new DBResult(); + + try + { + var cdc = new Common.DB.CommonDataContext(); + // + var driverlist = cdc.tMsWlDriver.Where(x => x.OPENID == openid && x.ISSTOP == false).ToList(); + + if (driverlist == null || driverlist.Count == 0) + { + result.SetErrorInfo("没有找到当前用户"); + return result; + } + var driver = driverlist[0]; + if (driver.PassWord != userOldPwd) + { + result.SetErrorInfo("原密码不正确"); + return result; + } + if (userNewPwd1 != userNewPwd2) + { + result.SetErrorInfo("新密码两次录入不一致"); + return result; + } + driver.PassWord = userNewPwd1; + cdc.tMsWlDriver.AddOrUpdate(driver); + cdc.SaveChanges(); + result.OK("密码修改成功"); + } catch (Exception e) { + result.SetErrorInfo(e.Message); + return result; + } + + + return result; + } + } + public class FHParam_当前业务 : FHParam + { + + public DBResult GetPCList() + { + var result = new DBResult(); + + try + { + //查询这个openid对应的司机的drvcode的 tMsWlPcHead 信息 + //查询条件 isend=0 drvcode in(select drvcode from tMsWlDriver where openid=) + + var condition = $" t.isend=0 and DrvCode in(select drvCode from tMsWlDriver where openid='{openid}')"; + + var dataList = MsRptPcHeadEditDAL.GetWFSDList(condition, "", "", "", "", ""); + + //if (dataList != null && dataList.Count > 0) { + // foreach (var item in dataList) { + // if (!string.IsNullOrWhiteSpace(item.ExpDate)) { + // item.ExpDate = item.ExpDate.Replace(" 00:00:00", ""); + // } + + // } + //} + result.Data= dataList; + + + + return result; + } + catch (Exception e) + { + result.SetErrorInfo(e.Message); + return result; + } + + + return result; + } + } + public class FHParam_派车业务 : FHParam + { + public string GId { get; set; } + public DBResult GetPC() + { + var result = new DBResult(); + + try + { + //查询这个openid对应的司机的drvcode的 tMsWlPcHead 信息 + //查询条件 isend=0 drvcode in(select drvcode from tMsWlDriver where openid=) + + var condition = $" t.GId='{GId}'"; + + var dataList = MsRptPcHeadEditDAL.GetWFSDList(condition, "", "", "", "", ""); + + //if (dataList != null && dataList.Count > 0) + //{ + // foreach (var item in dataList) + // { + // if (!string.IsNullOrWhiteSpace(item.ExpDate)) + // { + // item.ExpDate = item.ExpDate.Replace(" 00:00:00", ""); + // } + // } + //} + if(dataList!=null && dataList.Count > 0) + { + + var ctncondition = $" LE_ID='{GId}'"; + var ctnlist = MsOpLetterDAL.GetLetterCtnList(ctncondition); + dataList[0].CtnList = ctnlist; + + + var doccondition = $" BSNO='{GId}'"; + var doclist = ReceiptDocDAL.GetDocList(doccondition); + + var paramset = MsSysParamSetDAL.GetDataByName("DS7URL"); + var ds7url = paramset.PARAMVALUE; + + if (doclist != null && doclist.Count > 0) { + foreach (var item in doclist) + { + item.Driect_URL = item.Driect_URL.Replace("../../", ds7url); + } + } + + dataList[0].DocList = doclist; + + result.Data = dataList[0]; + + } + + return result; + } + catch (Exception e) + { + result.SetErrorInfo(e.Message); + return result; + } + + + return result; + } + } + public class FHParam_保存 : FHParam + { + public MsWlPcHead_FH headData { get; set; } + public DBResult DoSave() + { + var result = new DBResult(); + + try + { + //var headData = DSWeb.TruckMng.Helper.JsonConvert.Deserialize(headdatajson); + + var isPost = true; + var errorstr = ""; + + var custno = ""; + + headData.DbOperationType = DbOperationType.DbotUpd; + headData.ModelUIStatus = "E"; + + var BSNO = headData.gId; + + var modb = new ModelObjectDB(); + result = modb.Save(headData); + + return result; + + } + catch (Exception e) + { + result.SetErrorInfo(e.Message); + return result; + } + + + return result; + } + } + + public FHParam getParamHelper(string jsonparam) { + var _param= JsonConvert.DeserializeObject(jsonparam); + + if (_param.formname == "修改密码") + { + var result = JsonConvert.DeserializeObject(jsonparam); + return result; + } + if (_param.formname == "当前业务") + { + var result = JsonConvert.DeserializeObject(jsonparam); + return result; + } + if (_param.formname == "派车业务") + { + var result = JsonConvert.DeserializeObject(jsonparam); + return result; + } + if (_param.formname == "保存业务") + { + var result = JsonConvert.DeserializeObject(jsonparam); + return result; + } + return _param; + } + + + [HttpPost] + public ActionResult FHDriverInterface() + { + var cdc = new DSWeb.Common.DB.CommonDataContext(); + + var R1 = Request; + + var R2 = Request.Form["jsonstr"].ToString(); + + try + { + var param = getParamHelper(R2); + + if (param.formname == "修改密码") + { + var pr = (FHParam_ChangePwd)param; + var _r = pr.SavePwd(); + return BasicDataRefDAL.GetContentResult(_r); + } + + if (param.formname == "当前业务") + { + var pr = (FHParam_当前业务)param; + var _r = pr.GetPCList(); + return BasicDataRefDAL.GetContentResult(_r); + } + + if (param.formname == "派车业务") + { + var pr = (FHParam_派车业务)param; + var _r = pr.GetPC(); + return BasicDataRefDAL.GetContentResult(_r); + } + + if (param.formname == "保存业务") + { + var pr = (FHParam_保存)param; + var _r = pr.DoSave(); + return BasicDataRefDAL.GetContentResult(_r); + } + } + catch (Exception e) + { + BasicDataRefDAL.SaveLog("", e.Message, "wxapp", "登陆错误"); + //log.Debug("wxapp登陆错误:" + e.Message); + } + //BasicDataRefDAL.SaveLog("", obj.openid, "wxapp", "登录f"); + return Json(new { ErrorCode = 500, Message = "发生错误" }, JsonRequestBehavior.AllowGet); + } + #endregion } } \ No newline at end of file diff --git a/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs b/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs index 777468be..92beb4b8 100644 --- a/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs +++ b/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs @@ -197,15 +197,15 @@ namespace DSWeb.Areas.TruckMng.Controllers // headData.ReturnDate = headData.ReturnDate.Substring(0, 10); //} - if (!string.IsNullOrEmpty(headData.LrDate)) - { - headData.LrDate = headData.LrDate.Substring(0, 10); - } - else - { - var currentTime = System.DateTime.Now; - headData.LrDate = currentTime.ToString("d"); - } + if (!string.IsNullOrEmpty(headData.LrDate)) + { + headData.LrDate = headData.LrDate.Substring(0, 10); + } + else + { + var currentTime = System.DateTime.Now; + headData.LrDate = currentTime.ToString("d"); + } var BSNO = headData.gId; diff --git a/DSWeb/Areas/TruckMng/DAL/MsRptPcHeadEdit/MsRptPcHeadEditDAL.cs b/DSWeb/Areas/TruckMng/DAL/MsRptPcHeadEdit/MsRptPcHeadEditDAL.cs index ffe1ae1b..70a2160a 100644 --- a/DSWeb/Areas/TruckMng/DAL/MsRptPcHeadEdit/MsRptPcHeadEditDAL.cs +++ b/DSWeb/Areas/TruckMng/DAL/MsRptPcHeadEdit/MsRptPcHeadEditDAL.cs @@ -515,18 +515,20 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit static public List GetWFSDList ( string strCondition, string userid,string usercode,string username,string companyid,string sort ) { //合同信息/商品信息 - - var rangstr = GetRangDAStr("index", userid, usercode,username,companyid); - - if (!string.IsNullOrEmpty(rangstr)) + if (!string.IsNullOrWhiteSpace(userid) || !string.IsNullOrWhiteSpace(usercode) || !string.IsNullOrWhiteSpace(username) || !string.IsNullOrWhiteSpace(companyid)) { - if (!string.IsNullOrEmpty(strCondition)) - { - strCondition = strCondition + " and " + rangstr; - } - else + var rangstr = GetRangDAStr("index", userid, usercode, username, companyid); + + if (!string.IsNullOrEmpty(rangstr)) { - strCondition = rangstr; + if (!string.IsNullOrEmpty(strCondition)) + { + strCondition = strCondition + " and " + rangstr; + } + else + { + strCondition = rangstr; + } } } @@ -536,7 +538,7 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit strSql.Append(" ,convert(bigint ,t.TimeMark) as timeMark,gId,UserName "); strSql.Append(" ,ROW_NUMBER()over (partition by dbo.trimdate(expdate) order by expdate ) RowNumber "); strSql.Append(" ,BillNo,dbo.trimtime(ExpDate) ExpDate, dbo.trimdate(expdate) GroupDate ,ArriveDate,ReturnDate "); - strSql.Append(" ,CustomerName,F_CustomerName,t.DrvName,t.TruckNo,MblNo,LinkMan,DstArea,DetiNation,ContainerQty,GOODSCOUNT,CBM "); + strSql.Append(" ,CustomerName,F_CustomerName,t.DrvName,t.DrvCode,t.TruckNo,MblNo,LinkMan,DstArea,DetiNation,ContainerQty,GOODSCOUNT,CBM "); strSql.Append(" ,Ton,t.LoadCount,LoadPlace,TruckSpec,IsDouble,Property,RefBillNo,RefBillNose,MblNoSe,dbo.trimdate(EndPortDate) EndPortDate,VoyVeg,dbo.trimdate(EtDate) EtDate "); strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and feename='运费' and FEETYPE=1)YUNFEI "); strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and feename='回程合计' and FEETYPE=1)HCHJ "); @@ -553,7 +555,9 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit strSql.Append(",t.SALECORPID,(select [NAME] from [company] where GID=t.SALECORPID) as SALECORP,DCLASS,DUNNO"); - strSql.Append(" ,INVOICENO,KINDPKGS,CUSTNO,SalesName,GoodsName,PORTLOAD,DESTINATION,RtnDocStatus,RtnDocTime,ACCDATE,(CASE FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF from tMsWlPcHead t "); + strSql.Append(" ,INVOICENO,KINDPKGS,CUSTNO,SalesName,GoodsName,PORTLOAD,DESTINATION,RtnDocStatus,RtnDocTime,ACCDATE,(CASE FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF "); + strSql.Append(",FuelPrice,FuelQty,RealMil"); + strSql.Append( " from tMsWlPcHead t "); if (!string.IsNullOrEmpty(strCondition)) { //strSql.Append(" where 1=1 AND " + strCondition); @@ -579,6 +583,7 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit return SetWFSDData(strSql); } + static public List GetWFSDFenList(string strCondition, string sort) { //合同信息/商品信息 var strSql = new StringBuilder(); @@ -603,7 +608,7 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit strSql.Append(",(select TOP 1 COLOR FROM code_op_status_detail WITH (NOLOCK) WHERE OPSTATUS = (CASE WHEN (SELECT TOP 1 [STATUS] FROM V_OP_STATUS WHERE BSNO=t.GId ORDER BY COMPTIME DESC,INPUTTIME DESC) is null THEN '接受委托' else (SELECT TOP 1[STATUS] FROM V_OP_STATUS WHERE BSNO =t.GId ORDER BY COMPTIME DESC, INPUTTIME DESC) end))AS COLOR"); strSql.Append(",t.SALECORPID,(select [NAME] from [company] where GID=t.SALECORPID) as SALECORP,DCLASS,DUNNO"); - strSql.Append(" ,INVOICENO,KINDPKGS,CUSTNO,SalesName,GoodsName,PORTLOAD,DESTINATION,RtnDocStatus,RtnDocTime,ACCDATE,(CASE FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF from tMsWlPcHead t "); + strSql.Append(" ,INVOICENO,KINDPKGS,CUSTNO,SalesName,GoodsName,PORTLOAD,DESTINATION,RtnDocStatus,RtnDocTime,ACCDATE,(CASE FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF ,FuelPrice,FuelQty,RealMil from tMsWlPcHead t "); if (!string.IsNullOrEmpty(strCondition)) { strSql.Append(" where " + strCondition.Replace("~", ""));//str.Replace("b","**"); @@ -628,7 +633,7 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit strSql.Append(" ,convert(bigint ,t.TimeMark) as timeMark,gId,UserName "); strSql.Append(" ,ROW_NUMBER()over (partition by dbo.trimdate(expdate) order by expdate ) RowNumber "); strSql.Append(" ,BillNo,dbo.trimtime(ExpDate) ExpDate, dbo.trimdate(expdate) GroupDate ,ArriveDate,ReturnDate "); - strSql.Append(" ,CustomerName,F_CustomerName,t.DrvName,t.TruckNo,MblNo,LinkMan,DstArea,DetiNation,ContainerQty,GOODSCOUNT,CBM "); + strSql.Append(" ,CustomerName,F_CustomerName,t.DrvName,t.DrvCode,t.TruckNo,MblNo,LinkMan,DstArea,DetiNation,ContainerQty,GOODSCOUNT,CBM "); strSql.Append(" ,Ton,t.LoadCount,LoadPlace,TruckSpec,IsDouble,Property,RefBillNo,RefBillNose,MblNoSe,dbo.trimdate(EndPortDate) EndPortDate,VoyVeg,dbo.trimdate(EtDate) EtDate "); strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and feename='运费' and FEETYPE=1)YUNFEI "); strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and feename='回程合计' and FEETYPE=1)HCHJ "); @@ -643,7 +648,7 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit strSql.Append(",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=t.GId ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS"); strSql.Append(",'' AS COLOR"); strSql.Append(",t.SALECORPID,(select [NAME] from [company] where GID=t.SALECORPID) as SALECORP,DCLASS,DUNNO"); - strSql.Append(" ,INVOICENO,KINDPKGS,CUSTNO,SalesName,GoodsName,PORTLOAD,DESTINATION,RtnDocStatus,RtnDocTime,ACCDATE,(CASE FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF from tMsWlPcHead t "); + strSql.Append(" ,INVOICENO,KINDPKGS,CUSTNO,SalesName,GoodsName,PORTLOAD,DESTINATION,RtnDocStatus,RtnDocTime,ACCDATE,(CASE FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF,FuelPrice,FuelQty,RealMil from tMsWlPcHead t "); if (!string.IsNullOrEmpty(condition)) { strSql.Append(" where " + condition.Replace("~", ""));//str.Replace("b","**"); @@ -683,6 +688,7 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit data.CustomerName = Convert.ToString(reader["CustomerName"]); data.F_CustomerName = Convert.ToString(reader["F_CustomerName"]); data.DrvName = Convert.ToString(reader["DrvName"]); + data.DrvCode = Convert.ToString(reader["DrvCode"]); data.TruckNo = Convert.ToString(reader["TruckNo"]); data.MblNo = Convert.ToString(reader["MblNo"]); data.LinkMan = Convert.ToString(reader["LinkMan"]); @@ -758,6 +764,10 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit data.DUNNO = Convert.ToString(reader["DUNNO"]); data.OPSTATUS = Convert.ToString(reader["OPSTATUS"]); data.COLOR = Convert.ToString(reader["COLOR"]); + + data.FuelPrice = Convert.ToString(reader["FuelPrice"]); + data.FuelQty = Convert.ToDecimal(reader["FuelQty"]); + data.RealMil = Convert.ToDecimal(reader["RealMil"]); #endregion headList.Add(data); } diff --git a/DSWeb/Areas/TruckMng/Models/MsWlBs/MsWlPcHead.cs b/DSWeb/Areas/TruckMng/Models/MsWlBs/MsWlPcHead.cs index cfd254dc..91ce109d 100644 --- a/DSWeb/Areas/TruckMng/Models/MsWlBs/MsWlPcHead.cs +++ b/DSWeb/Areas/TruckMng/Models/MsWlBs/MsWlPcHead.cs @@ -1,4 +1,8 @@ using System; +using System.Collections.Generic; +using Aspose.Words.Lists; +using DSWeb.MvcShipping.Models.MsOpLetter; +using DSWeb.Areas.Import.Models.ImportTrade; using HcUtility.Core; using Newtonsoft.Json; @@ -1817,8 +1821,8 @@ namespace DSWeb.Areas.TruckMng.Models.MsWlBs private string _ContainerNo = ""; private string _SealNo = ""; - - + public List CtnList { get; set; } + public List DocList { get; set; } #endregion #region Public Properties @@ -1925,6 +1929,8 @@ namespace DSWeb.Areas.TruckMng.Models.MsWlBs set { _DrvName = value; } } [ModelDB] + public string DrvCode { get; set; } + [ModelDB] public string TruckNo { get { return _TruckNo; } @@ -2384,6 +2390,11 @@ namespace DSWeb.Areas.TruckMng.Models.MsWlBs public string OPSTATUS { get; set; } public string COLOR { get; set; } + + public string FuelPrice { get; set; } + public decimal FuelQty { get; set; } = 0; + public decimal RealMil { get; set; } = 0; + #endregion public MsWlPcHead_WFSDEdit ( ) @@ -2398,6 +2409,16 @@ namespace DSWeb.Areas.TruckMng.Models.MsWlBs } } + public class MsWlPcHead_FH: MsWlPcHead_WFSDEdit + { + [ModelDB] + new public string FuelPrice { get; set; } + [ModelDB] + new public decimal FuelQty { get; set; } = 0; + [ModelDB] + new public decimal RealMil { get; set; } = 0; + } + [JsonObject] public class MsWlPcHead_LTJYEdit : MsWlPcHead_WFSDEdit { diff --git a/DSWeb/Areas/TruckMng/Views/PcHeadEdit_WFSD/Edit.aspx b/DSWeb/Areas/TruckMng/Views/PcHeadEdit_WFSD/Edit.aspx index a60f522a..b29c3304 100644 --- a/DSWeb/Areas/TruckMng/Views/PcHeadEdit_WFSD/Edit.aspx +++ b/DSWeb/Areas/TruckMng/Views/PcHeadEdit_WFSD/Edit.aspx @@ -71,6 +71,7 @@ + diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_WFSDIndex.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_WFSDIndex.js index e9ce501f..83bbcf94 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_WFSDIndex.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_WFSDIndex.js @@ -229,6 +229,26 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { value: '派车单票' }); + this.storeDrvName = Ext.create('DsExt.ux.RefTableStore', { + model: 'MsWlBsHeadRefMsWlDriver', + proxy: { url: '/TruckMng/MsWlPc/GetDrvNameList' } + }); + this.storeDrvName.load({ params: { condition: "" } }); + this.comboxDrvName = Ext.create('DsExt.ux.RefTableCombox', { + fieldLabel: '司机', + store: this.storeDrvName, + name: 'PS_DRVNAME', + valueField: 'DrvCode', + displayField: 'CodeAndName' + , + listeners: { + beforequery: function (e) { + return FilterCombox(e,1); //在beforequery使用此方法 + }, + scope: this + } + }); + _this = this; ///////////////////////////////////////// @@ -1151,18 +1171,22 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { } } } - }, { - fieldLabel: '司机姓名', - name: 'PS_DRVNAME', - enableKeyEvents: true, - listeners: { - specialkey: function (field, e) { - if (e.getKey() == e.ENTER) { - _this.onRefreshClick(); - } - } } - }, { + + //, { + //fieldLabel: '司机姓名', + //name: 'PS_DRVNAME', + //enableKeyEvents: true, + //listeners: { + // specialkey: function (field, e) { + // if (e.getKey() == e.ENTER) { + // _this.onRefreshClick(); + // } + // } + //} + //} + , this.comboxDrvName + , { fieldLabel: '车牌', name: 'TruckNo', enableKeyEvents: true, @@ -2166,7 +2190,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { sql = sql + getAndConSql(sql, mblNo, " (MblNo like '%" + mblNo + "%' or MBLNOse like '%" + mblNo + "%') "); var drvName = form.findField('PS_DRVNAME').getValue(); - sql = sql + getAndConSql(sql, drvName, " (DrvName like '%" + drvName + "%' or TruckNo='" + drvName + "') "); + sql = sql + getAndConSql(sql, drvName, " (DrvName like '%" + drvName + "%' or DrvCode ='" + drvName + "') "); var DstArea = form.findField('DstArea').getValue(); sql = sql + getAndConSql(sql, DstArea, " (DstArea like '%" + DstArea + "%' or DetiNation like '%" + DstArea + "%') "); diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js index 2dda26fb..41cf1c5a 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js @@ -458,6 +458,26 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, { displayField: 'NAME' }); + this.storeDrvName = Ext.create('DsExt.ux.RefTableStore', { + model: 'MsWlBsHeadRefMsWlDriver', + proxy: { url: '/TruckMng/MsWlPc/GetDrvNameList' } + }); + this.storeDrvName.load({ params: { condition: "" } }); + this.comboxDrvName = Ext.create('DsExt.ux.RefTableCombox', { + fieldLabel: '司机', + store: this.storeDrvName, + name: 'DrvCode', + valueField: 'DrvCode', + displayField: 'CodeAndName' + , + listeners: { + beforequery: function (e) { + return FilterCombox(e, 1); //在beforequery使用此方法 + }, + scope: this + } + }); + Ext.define('MsOpSeaeDetail', { extend: 'Ext.data.Model', @@ -621,7 +641,7 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, { items: [ {//fieldset 1 - xtype: 'fieldset', + xtype: 'container', defaultType: 'textfield', layout: 'anchor', defaults: { @@ -738,10 +758,26 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, { }, { fieldLabel: '目的地', name: 'DetiNation' - }, { + }, this.comboxDrvName] + }, { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [{ fieldLabel: '装货地址', + flex:3, name: 'LoadPlace' - }] + }, { + fieldLabel: '联系电话1', + flex: 1, + name: 'LinkTel' + }, { + fieldLabel: '联系电话2', + flex: 1, + name: 'LinkTelSe' + } + + ] }, { xtype: 'container', layout: 'hbox', @@ -1143,7 +1179,7 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, { this.panelTop = new Ext.Panel({ layout: "border", region: "north", - height: 390, + height: 410, items: [this.panelBtn, this.formEdit] }); diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsWlBsCardModel.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsWlBsCardModel.js index 4de5b4ef..6ae6a1cf 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsWlBsCardModel.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsWlBsCardModel.js @@ -403,12 +403,14 @@ Ext.define('MsWlBsCtn', { Ext.define('MsWlBsHeadRefMsWlTruck', { extend: 'Ext.data.Model', fields: [ - { name: 'TruckNo', type: 'string' }, + { name: 'TruckNo', type: 'string' }, { name: 'DrvCode', type: 'string' }, { name: 'DrvName', type: 'string' }, { name: 'Mobile', type: 'string' } ] }); + + Ext.define('MsWlBsHeadRefMsWlDriver', { extend: 'Ext.data.Model', fields: [ diff --git a/DSWeb/DSWeb.csproj.user b/DSWeb/DSWeb.csproj.user index 5d714467..c976d660 100644 --- a/DSWeb/DSWeb.csproj.user +++ b/DSWeb/DSWeb.csproj.user @@ -2,9 +2,9 @@ ShowAllFiles - 配置文件1 + H:\DS7_dev\DSWeb\Properties\PublishProfiles\FolderProfile.pubxml true - Release|Any CPU + Debug|Any CPU