方合小程序更新

dev
dengyu 4 months ago
parent 5d1f350412
commit e03634ddbe

@ -1834,7 +1834,7 @@ namespace DSWeb.Common.DB
{
URL = url;
Driect_URL = driect_url;
RECEIPTTYPE = docname;
//RECEIPTTYPE = docname;
SetModify(userid);
}

@ -1468,6 +1468,7 @@ namespace DSWeb.Areas.Dispatch.Controllers
var pcheadid = Request.Form["gid"].ToString().Trim();
var openid = Request.Form["openid"].ToString().Trim();
var R_GID = Request.Form["r_gid"].ToString().Trim();
var RECEIPTTYPE = Request.Form["receipttype"].ToString().Trim();
var condition = $" t.GId='{pcheadid}'";
@ -1518,6 +1519,19 @@ namespace DSWeb.Areas.Dispatch.Controllers
var docname = "司机上传";
newInfoFiles.R_GID = R_GID;
newInfoFiles.RECEIPTTYPE = RECEIPTTYPE;
//20240723 判断 如果RECEIPTTYPE=装货照片
//则目前已有的照片中必须包含提空照片 否则不能上传
if (RECEIPTTYPE == "装货照片") {
var = cdc.Receipt_Doc.Where(x => x.BSNO == pcheadid && x.RECEIPTTYPE == "提空照片").ToList();
if ( == null || .Count == 0)
{
return Json(new { Success = false, Message = "必须先上传提空照片" });
}
}
//20240220 如果R_GID有值 则该条附件同时关联一条ch_fee_order费用 或者一条加油信息t_Truck_FHApp_Fuel
//文件名相应改为费用信息 、加油信息
@ -1907,6 +1921,7 @@ namespace DSWeb.Areas.Dispatch.Controllers
dataList[0].FuelList = new List<t_Truck_FHApp_Fuel_md>();
}
dataList[0].SetFHFEEGroup();
result.Data = dataList[0];
@ -1984,7 +1999,18 @@ namespace DSWeb.Areas.Dispatch.Controllers
//if (result.Success) {
//保存费用
var feelist = headData.FeeList;
var feelist = new List<ch_fee_order_md>();
foreach (var fee in headData.FHFEEGroup) {
if (fee.FeeList != null && fee.FeeList.Count > 0) {
foreach (var feeitem in fee.FeeList) {
feeitem.FEENAME = fee.FeeNameList[Convert.ToInt32(feeitem.F_NO)];
}
feelist.AddRange(fee.FeeList);
}
}
var currFeeList = cdc.ch_fee_order.Where(x => x.BSNO == headData.gId).ToList();
@ -2000,7 +2026,8 @@ namespace DSWeb.Areas.Dispatch.Controllers
var feenameorder = Convert.ToInt32(fee.F_NO);
item.F_NO = fee.F_NO;
item.FEENAME = headData.FeeNameList[feenameorder] ;
item.FEENAME = fee.FEENAME; //headData.FeeNameList[feenameorder] ;
item.AMOUNT = fee.AMOUNT;
item.SetAmount(item.AMOUNT);
updFeeList.Add(item);
@ -2010,7 +2037,7 @@ namespace DSWeb.Areas.Dispatch.Controllers
var newfee = new ch_fee_order_md();
var feenameorder = Convert.ToInt32(fee.F_NO);
newfee.F_NO = fee.F_NO;
newfee.FEENAME = headData.FeeNameList[feenameorder];
newfee.FEENAME = fee.FEENAME;
newfee.SetAmount(fee.AMOUNT);
newfee.GID = fee.GID;
newfee.BSNO = headData.gId;
@ -2376,7 +2403,10 @@ namespace DSWeb.Areas.Dispatch.Controllers
{
public string GId { get; set; }
public string R_GID { get; set; }
public string R_GID { get; set; }
public string receipttype { get; set; }
public DBResult GetFiles()
{
var result = new DBResult();
@ -2414,6 +2444,11 @@ namespace DSWeb.Areas.Dispatch.Controllers
{
doccondition += $" and R_GID='{R_GID}'";
}
if (!string.IsNullOrWhiteSpace(receipttype))
{
doccondition += $" and receipttype='{receipttype}'";
}
var doclist = ReceiptDocDAL.GetDocList(doccondition);

@ -2480,8 +2480,68 @@ namespace DSWeb.Areas.TruckMng.Models.MsWlBs
{
return "GId";
}
public List<FHFEEGroup> FHFEEGroup { get; set; }
//public List<FHFEEGroupFeeName> FHFEEGroupFeeName { get; set; }
public void SetFHFEEGroup()
{
var cdc = new CommonDataContext();
var fhfeename = cdc.tSysEnumValue.Where(x => x.EnumTypeID == 7002).ToList();
FHFEEGroup = new List<FHFEEGroup>();
if (fhfeename != null && fhfeename.Count > 0) {
foreach (var fn in fhfeename.OrderBy(o => o.DispIndex).ToList()) {
if (!FHFEEGroup.Exists(x => x.FEEGROUP == fn.EnumValueName))
{
var fg = new FHFEEGroup();
fg.FEEGROUP = fn.EnumValueName;
fg.FeeList = new List<ch_fee_order_md>();
fg.FeeNameList = new List<string>();
fg.FeeNameList.Add(fn.EnumValueID);
FHFEEGroup.Add(fg);
}
else {
FHFEEGroup.First(x => x.FEEGROUP == fn.EnumValueName).FeeNameList.Add(fn.EnumValueID);
}
}
}
foreach (var fg in FHFEEGroup) {
foreach (var fee in FeeList) {
var _feegroup = fhfeename.Where(x => x.EnumValueName == fg.FEEGROUP).ToList();
if (_feegroup.Exists(x => x.EnumValueID == fee.FEENAME)) {
fg.FeeList.Add(fee);
}
}
}
}
}
public class FHFEEGroup
{
public string FEEGROUP { get; set; }
public List<ch_fee_order_md> FeeList { get; set; }
public List<string> FeeNameList { get; set; }
}
public class FHFEEGroupFeeName
{
public string FEEGROUP { get; set; }
public List<string> FeeName { get; set; }
}
[JsonObject]
public class MsWlPcHead_QDLHEdit : ModelObjectBillHead
@ -3173,7 +3233,7 @@ namespace DSWeb.Areas.TruckMng.Models.MsWlBs
TableName = "tMsWlPcHead";
gId = "SDPC" + Guid.NewGuid().ToString("N").ToUpper();
}
override public string GetBillNoFieldName()
{
return "GId";

Loading…
Cancel
Save