diff --git a/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs b/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs index 6f0f5910..40c028ef 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs @@ -1483,14 +1483,14 @@ namespace DSWeb.Areas.Account.Controllers public ContentResult NNReadInv(string BILLNO, string redirecturl) { //如果已有pdf地址 则直接返回 - var isfee = ChinvoiceDAL.GetStCount("PAYBILLNO='" + BILLNO + "'"); - if (isfee != 0) - { + //var isfee = ChinvoiceDAL.GetStCount("PAYBILLNO='" + BILLNO + "'"); + //if (isfee != 0) + //{ - var jsonRespose2 = new JsonResponse { Success = false, Message = "已发票结算,不允许冲红" }; - return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; + // var jsonRespose2 = new JsonResponse { Success = false, Message = "已发票结算,不允许冲红" }; + // return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; - } + //} var canlogin = BasicDataRefDAL.CheckLogin(Session); if (!canlogin.Success) { diff --git a/DSWeb/Areas/Dispatch/Controllers/WxAppController.cs b/DSWeb/Areas/Dispatch/Controllers/WxAppController.cs index 757fe74e..90deb54b 100644 --- a/DSWeb/Areas/Dispatch/Controllers/WxAppController.cs +++ b/DSWeb/Areas/Dispatch/Controllers/WxAppController.cs @@ -4239,7 +4239,7 @@ namespace DSWeb.Areas.Dispatch.Controllers { ysamount += ys.Amount * ys.ExChangerate; } - foreach (var yf in evList.Where(x => x.FeeType == 1)) + foreach (var yf in evList.Where(x => x.FeeType == 2)) { yfamount += yf.Amount * yf.ExChangerate; } @@ -4309,15 +4309,19 @@ namespace DSWeb.Areas.Dispatch.Controllers var aaa = ""; - var saveinfo = JsonConvert.DeserializeObject(postContent); + var saveinfo = DSWeb.MvcShipping.Helper.JsonConvert.Deserialize(postContent); + + foreach (var item in saveinfo.Body) { + item.TableName = "ch_fee_order"; + } var bodyList = saveinfo.Body; var chfeeBodyList = bodyList; - var chfeeDelBodyList = JsonConvert.DeserializeObject>(""); + var chfeeDelBodyList = DSWeb.MvcShipping.Helper.JsonConvert.Deserialize>(""); var modb = new DSWeb.TruckMng.Helper.Repository.ModelObjectRepository(); - DBResult result = modb.SaveComm("BsNo", QueryInfo.bsno, + DBResult result = modb.SaveComm("BsNo", saveinfo.bsno, DSWeb.MvcShipping.Helper.ModelObjectConvert.ToModelObjectList(chfeeBodyList), DSWeb.MvcShipping.Helper.ModelObjectConvert.ToModelObjectList(chfeeDelBodyList) ); diff --git a/DSWeb/Areas/MvcShipping/Models/MsChFee/MsChFee.cs b/DSWeb/Areas/MvcShipping/Models/MsChFee/MsChFee.cs index 1f0c9f06..e233cbe2 100644 --- a/DSWeb/Areas/MvcShipping/Models/MsChFee/MsChFee.cs +++ b/DSWeb/Areas/MvcShipping/Models/MsChFee/MsChFee.cs @@ -567,7 +567,7 @@ namespace DSWeb.MvcShipping.Models.MsChFee [JsonObject] public class MsOrderFee : MsChFee { - public MsOrderFee ( ) + public MsOrderFee () { TableName = "ch_fee_order"; } diff --git a/DSWeb/Areas/TruckMng/Controllers/MsWlDriverController.cs b/DSWeb/Areas/TruckMng/Controllers/MsWlDriverController.cs index 43c100be..3eafb418 100644 --- a/DSWeb/Areas/TruckMng/Controllers/MsWlDriverController.cs +++ b/DSWeb/Areas/TruckMng/Controllers/MsWlDriverController.cs @@ -12,6 +12,8 @@ using System.IO; using System.Collections.Generic; using DSWeb.TruckMng.Helper.Repository; using DSWeb.SoftMng.Filter; +using DSWeb.Common.DB; +using System.Data.Entity.Migrations; namespace DSWeb.Areas.TruckMng.Controllers { @@ -100,9 +102,27 @@ namespace DSWeb.Areas.TruckMng.Controllers { head.DbOperationType = DbOperationType.DbotDel; } + var modb = new ModelObjectDB(); DBResult result = modb.Save(head); + if (result.Success) { + var cdc = new CommonDataContext(); + + var savehead = cdc.tMsWlDriver.FirstOrDefault(x => x.GID == head.GID); + + if (string.IsNullOrWhiteSpace(savehead.PassWord)|| savehead.PassWord=="123456") { + if (!string.IsNullOrEmpty(savehead.JzNo) && savehead.JzNo.Length > 6) + { + savehead.PassWord= savehead.JzNo.Substring(savehead.JzNo.Length - 6,6); + } + else { + savehead.PassWord = "123456"; + } + cdc.tMsWlDriver.AddOrUpdate(savehead); + } + } + var jsonRespose = new JsonResponse { Success = result.Success, diff --git a/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs b/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs index 2375b93a..e1377cd5 100644 --- a/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs +++ b/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs @@ -383,8 +383,24 @@ namespace DSWeb.Areas.TruckMng.Controllers var BSNO = headData.gId; + //处理不能为空的值 + try { + if (string.IsNullOrWhiteSpace(headData.AroundTon)) + { + headData.AroundTon = "0"; + } + + headData.AroundTon = (Convert.ToDecimal(headData.AroundTon)).ToString(); + } catch (Exception ex) + { + //errorstr = ex.Message; isPost = false; + headData.AroundTon = "0"; + } + + if (isPost) { + var modb = new ModelObjectDB(); DBResult result = modb.Save(headData); if (result.Success == true) { diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js index 6a9dbb44..603dd2f7 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js @@ -1005,7 +1005,19 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, { flex: 3, name: 'Remark' },this.panelBodyCtn] - } + }, { + xtype: 'container',hidden:true, + layout: 'hbox', + defaultType: 'textarea', + items: [ + { + fieldLabel: 'RealMil', + xtype: 'numberfield', + name: 'RealMil' + } + + ] + } ]//end items(fieldset 1) }//end fieldset 1 ]//end root items