From 956d8d0500558bbae6de962d1b6bb6cac5f9fd4f Mon Sep 17 00:00:00 2001 From: dengyu Date: Fri, 7 Jul 2023 17:06:12 +0800 Subject: [PATCH] 20230707 --- .../basic/festwmsLogicEditmodel.vue | 12 +- Vol.Vue/src/extension/wms/OP_WMS_IN_PLAN.js | 3 +- .../extension/wms/VW_OP_WMS_MOVE_BEFORE.js | 17 +++ Vol.Vue/src/views/wms/OP_WMS_IN_PLAN.vue | 8 +- .../Services/WMS/Partial/OP_WMSService.cs | 127 ++++++++++++++++- .../WMS/Partial/VW_OP_WMS_MOVEService.cs | 8 +- .../Partial/OP_WMS_TRANSFERGOODSService.cs | 2 +- .../WMSINDO/Partial/OP_WMS_IN_DOService.cs | 3 + .../Partial/OP_WMS_IN_PLANService.cs | 131 +++++++++++------- .../Partial/OP_WMS_IN_PLAN_GOODSService.cs | 13 +- Vue.Net/VOL.WebApi/appsettings.json | 4 +- 11 files changed, 265 insertions(+), 63 deletions(-) diff --git a/Vol.Vue/src/components/basic/festwmsLogicEditmodel.vue b/Vol.Vue/src/components/basic/festwmsLogicEditmodel.vue index 81537e9d..d243375e 100644 --- a/Vol.Vue/src/components/basic/festwmsLogicEditmodel.vue +++ b/Vol.Vue/src/components/basic/festwmsLogicEditmodel.vue @@ -216,11 +216,17 @@ export default { // INSPECTIONTIME:_this.formFields.INSPECTIONTIME //测试内容 + // TYPENAME : "付费申请审批", + // execution:"查询列表", + // isaudit:"仅需自己审核", + // condition:"", + // wheres:[{"name":"isaudit","value":"仅需自己审核",displayType:"="}] + TYPENAME : "付费申请审批", - execution:"查询列表", - isaudit:"仅需自己审核", + execution:"查询明细", + isaudit:"", condition:"", - wheres:[{"name":"isaudit","value":"仅需自己审核",displayType:"="}] + wheres:[{"name":"GID","value":"31cc4ac5-1aca-46ce-a2f9-e527d022a9b9",displayType:"="}] }; let SavewmsUrl = "api/OP_WMS/PublicFunc"; diff --git a/Vol.Vue/src/extension/wms/OP_WMS_IN_PLAN.js b/Vol.Vue/src/extension/wms/OP_WMS_IN_PLAN.js index 3e20cc3a..d005e4fc 100644 --- a/Vol.Vue/src/extension/wms/OP_WMS_IN_PLAN.js +++ b/Vol.Vue/src/extension/wms/OP_WMS_IN_PLAN.js @@ -1322,7 +1322,8 @@ let extension = { , "STOREHOUSE" , "WMSWORKTYPE" , "CURRENCY" - ,"TRUCKTEAM" + , "TRUCKTEAM" + , "ISRULECHECK" ]; let trueList3 = ["GOODSOWNER", "ARCLIENTWMSOUT" , "MBLNO" diff --git a/Vol.Vue/src/extension/wms/VW_OP_WMS_MOVE_BEFORE.js b/Vol.Vue/src/extension/wms/VW_OP_WMS_MOVE_BEFORE.js index e74125b5..3f71d3f2 100644 --- a/Vol.Vue/src/extension/wms/VW_OP_WMS_MOVE_BEFORE.js +++ b/Vol.Vue/src/extension/wms/VW_OP_WMS_MOVE_BEFORE.js @@ -184,6 +184,23 @@ let extension = { }, pushstatusAfter(formData, result) { + + //重新加载头表数据 + let _data = result.data; + + //重新加载计划明细表和逻辑库存表 + + let _headform = this.$store.getters.data().WMSMOVE_BEFORE_head; + let _this = this; + let editFormFields = _headform.geteditformfield(); + + editFormFields.BILLSTATUS = _data.billstatus; + + + //_headform.curraction = "update"; + _headform.setEditForm(editFormFields); + + return true; }, } diff --git a/Vol.Vue/src/views/wms/OP_WMS_IN_PLAN.vue b/Vol.Vue/src/views/wms/OP_WMS_IN_PLAN.vue index ae87499d..115d0c32 100644 --- a/Vol.Vue/src/views/wms/OP_WMS_IN_PLAN.vue +++ b/Vol.Vue/src/views/wms/OP_WMS_IN_PLAN.vue @@ -84,11 +84,15 @@ } ,{"dataKey":"CustName","title":this.$t('GOODSOWNER'),"field":"GOODSOWNER","type":"select",edit:{type:'select',keep:true}} ,{"dataKey":"CustName","title":this.$t('ARCLIENTWMSOUT'),"field":"ARCLIENTWMSOUT","type":"select",edit:{type:'select',keep:true}} - ,{"dataKey":"shifoubit","title":this.$t('INPLAN.ISRULECHECK'),"field":"ISRULECHECK","type":"switch"} + //,{"dataKey":"shifoubit","title":this.$t('INPLAN.ISRULECHECK'),"field":"ISRULECHECK","type":"switch"} + ,{"dataKey":"shifoubit","title":this.$t('INPLAN.ISRULECHECK'),"field":"ISRULECHECK","type":"select",edit:{type:'select',keep:true}} ],[ {"title":this.$t('MBLNO'),"field":"MBLNO","required":false}, {"title":this.$t('CUSTOMNO'),"field":"CUSTOMNO"}, - {"dataKey":"shifou","title":this.$t('INPLAN.BILLTYPE'),"field":"BILLTYPE","type":"switch"}, + //{"dataKey":"shifou","title":this.$t('INPLAN.BILLTYPE'),"field":"BILLTYPE","type":"switch"}, + {"dataKey":"shifou","title":this.$t('INPLAN.BILLTYPE'),"field":"BILLTYPE","type":"select",edit:{type:'select',keep:true},"required":true}, + + {"dataKey":"yuanchandi","title":this.$t('COUNTRY'),"field":"COUNTRY","type":"select",edit:{type:'select',keep:true}}, ], [ diff --git a/Vue.Net/VOL.WMS/Services/WMS/Partial/OP_WMSService.cs b/Vue.Net/VOL.WMS/Services/WMS/Partial/OP_WMSService.cs index 142bb99b..cc99fa25 100644 --- a/Vue.Net/VOL.WMS/Services/WMS/Partial/OP_WMSService.cs +++ b/Vue.Net/VOL.WMS/Services/WMS/Partial/OP_WMSService.cs @@ -26,6 +26,8 @@ using ConvertHelper; using Microsoft.AspNetCore.Mvc; using System.Security.Policy; using System.Security.Cryptography; +using FastReport.Editor; +using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime; namespace VOL.WMS.Services { @@ -227,15 +229,14 @@ namespace VOL.WMS.Services } - if (AuditParam.execution == "查询明细") { foreach (var item in AuditParam.wheres) { - if (item.name == "GID" && !string.IsNullOrWhiteSpace(item.value)) + if (item.name == "BILLNO" && !string.IsNullOrWhiteSpace(item.value)) { - addcondition($" i.GID = '{item.value}' "); + addcondition($" BILLNO = '{item.value}' "); } } @@ -333,6 +334,34 @@ namespace VOL.WMS.Services _webResponseContent.Error(e.Message); } } + + if (AuditParam.execution == "关联业务") { + var BSNO = ""; + foreach (var item in AuditParam.wheres) + { + if (item.name == "BSNO" && !string.IsNullOrWhiteSpace(item.value)) + { + BSNO=item.value; + } + } + + return GetBillView(BSNO); + } + + if (AuditParam.execution == "关联业务费用") + { + var BSNO = ""; + var OPLBNAME = ""; + foreach (var item in AuditParam.wheres) + { + if (item.name == "BSNO" && !string.IsNullOrWhiteSpace(item.value)) + { + BSNO = item.value; + } + } + + return GetBillFeeView(BSNO, OPLBNAME); + } } if (jp.TYPENAME == "付费发票核销") @@ -538,5 +567,97 @@ namespace VOL.WMS.Services return _webResponseContent; } + + /// + /// 通过四个接口获取 头信息、应收应付、利润、客户利润 + /// 将结果集组合到data中返回 + /// + /// + /// + public WebResponseContent GetBillView(string BSNO) { + + var dicnos3 = new string[] { "DS7url" }; + var tUrlList = DictionaryManager.GetDictionaries(dicnos3).ToList(); + var urlhead = tUrlList[0].Sys_DictionaryList[0].DicValue; + + var userid = UserContext.Current.UserInfo.User_Id; + var username = UserContext.Current.UserInfo.UserName; + var usercompanyid = UserContext.Current.UserInfo.CompanyId; + + //1 MvcShipping/MsOpBill/GetBLData + //handle: edit condition: BSNO = 'topseai710150217EED46C159E71C49FD838CF8' + + var urlDetail1 = "/MvcShipping/MsOpBill/GetBLData"; + var url1 = urlhead + urlDetail1; + + JObject reqObj = new JObject + { + { "handle", "edit" }, + { "condition", $" BSNO='{BSNO}' " } + }; + var D1 = new DBResult(); + try + { + var t_str = reqObj.ToString(Newtonsoft.Json.Formatting.None); + var rtn = SendHelper.DoPost(url1, t_str); + + D1 = JsonConvert.DeserializeObject(rtn); + + //_webResponseContent = new WebResponseContent(rtnresult); + } + catch (Exception e) + { + _webResponseContent.Error(e.Message); + return _webResponseContent; + } + + + + return _webResponseContent.OK("查询成功", D1.Data); + } + public WebResponseContent GetBillFeeView(string BSNO, string OPLBNAME) + { + + var dicnos3 = new string[] { "DS7url" }; + var tUrlList = DictionaryManager.GetDictionaries(dicnos3).ToList(); + var urlhead = tUrlList[0].Sys_DictionaryList[0].DicValue; + + var userid = UserContext.Current.UserInfo.User_Id; + var username = UserContext.Current.UserInfo.UserName; + var usercompanyid = UserContext.Current.UserInfo.CompanyId; + //2 费用 + + var urlDetail2 = "/MvcShipping/MsChFee/GetDataListAPP"; + var url2 = urlhead + urlDetail2; + + + + JObject reqObj2 = new JObject + { + { "condition", $" exists (select 1 from v_op_bill b where b.BSNO=ch_fee.BSNO and b.BSNO='{BSNO}' " }, + { "oplbname", OPLBNAME }, + { "userid", userid }, + { "username", username }, + { "usercompanyid", usercompanyid } + }; + var D2 = new DBResult(); + try + { + var t_str = reqObj2.ToString(Newtonsoft.Json.Formatting.None); + var rtn = SendHelper.DoPost(url2, t_str); + + D2 = JsonConvert.DeserializeObject(rtn); + + //_webResponseContent = new WebResponseContent(rtnresult); + } + catch (Exception e) + { + _webResponseContent.Error(e.Message); + return _webResponseContent; + } + + return _webResponseContent.OK(); + } + } } diff --git a/Vue.Net/VOL.WMS/Services/WMS/Partial/VW_OP_WMS_MOVEService.cs b/Vue.Net/VOL.WMS/Services/WMS/Partial/VW_OP_WMS_MOVEService.cs index e9d49659..1da6d1c1 100644 --- a/Vue.Net/VOL.WMS/Services/WMS/Partial/VW_OP_WMS_MOVEService.cs +++ b/Vue.Net/VOL.WMS/Services/WMS/Partial/VW_OP_WMS_MOVEService.cs @@ -538,9 +538,15 @@ namespace VOL.WMS.Services { //仅推进状态或驳回 但未完结 也不是从完结状态驳回 //仅修改状态 - _webResponse.OK(message); + head.BILLSTATUS = currBillStatus; + + repository.Update(head); + + repository.SaveChanges(); + _webResponse.OK("成功", head); + return _webResponse; } diff --git a/Vue.Net/VOL.WMS/Services/WMS/WMS_TRANSFER/Partial/OP_WMS_TRANSFERGOODSService.cs b/Vue.Net/VOL.WMS/Services/WMS/WMS_TRANSFER/Partial/OP_WMS_TRANSFERGOODSService.cs index 6b865795..26ef2dd5 100644 --- a/Vue.Net/VOL.WMS/Services/WMS/WMS_TRANSFER/Partial/OP_WMS_TRANSFERGOODSService.cs +++ b/Vue.Net/VOL.WMS/Services/WMS/WMS_TRANSFER/Partial/OP_WMS_TRANSFERGOODSService.cs @@ -976,7 +976,7 @@ namespace VOL.WMS.Services if (!_webResponse.Status) { return _webResponse; } repository.Update(货转执行); - + repository.SaveChanges(); return _r.OK(message, 货转执行); // diff --git a/Vue.Net/VOL.WMS/Services/WMSINDO/Partial/OP_WMS_IN_DOService.cs b/Vue.Net/VOL.WMS/Services/WMSINDO/Partial/OP_WMS_IN_DOService.cs index ac883399..b554ca0c 100644 --- a/Vue.Net/VOL.WMS/Services/WMSINDO/Partial/OP_WMS_IN_DOService.cs +++ b/Vue.Net/VOL.WMS/Services/WMSINDO/Partial/OP_WMS_IN_DOService.cs @@ -1138,6 +1138,9 @@ namespace VOL.WMS.Services wmsbase.XH = 入库计划明细.XH; wmsbase.SALE = inplan.SALE; + if (wmsbase.SALE == null || wmsbase.SALE == Guid.Empty) { + wmsbase.SALE = new Guid( inplan.CreateID); + } wmsbase.CURRENCY = inplan.CURRENCY; diff --git a/Vue.Net/VOL.WMS/Services/WMSINPLAN/Partial/OP_WMS_IN_PLANService.cs b/Vue.Net/VOL.WMS/Services/WMSINPLAN/Partial/OP_WMS_IN_PLANService.cs index bdb53675..041d1274 100644 --- a/Vue.Net/VOL.WMS/Services/WMSINPLAN/Partial/OP_WMS_IN_PLANService.cs +++ b/Vue.Net/VOL.WMS/Services/WMSINPLAN/Partial/OP_WMS_IN_PLANService.cs @@ -381,55 +381,8 @@ namespace VOL.WMS.Services if (!string.IsNullOrWhiteSpace(ErrorStr)) return _webResponse.Error("费率表:" + ErrorStr); - if (AppSetting.CompanySetting.COMPANYNAME == "JGWL") - { - //判断 - var storehousecode= saveModel.MainData["STOREHOUSE"].ToString(); - if (string.IsNullOrWhiteSpace(storehousecode)) { - return _webResponse.Error("必须选择仓库" ); - } - - - - - var billtype = saveModel.MainData["BILLTYPE"].ToString(); - if (billtype == "1") - { - var storehouse = OP_WMS_STOREHOUSERepository.Instance.FindFirst(x => x.AREACODE == storehousecode); - if (storehouse.ISBONDED == true) - { - - } - else - { - return _webResponse.Error("保税货物入库,必须选择保税的仓库。"); - } - foreach (var item in tableExtra.goodsList) - { - if (string.IsNullOrWhiteSpace(item.XH)) - { - return _webResponse.Error("保税货物入库,项号不能为空。"); - } - } - - } - else { - var storehouse = OP_WMS_STOREHOUSERepository.Instance.FindFirst(x => x.AREACODE == storehousecode); - if (storehouse.ISBONDED == false) - { - - } - else - { - return _webResponse.Error("非保税货物入库,必须选择非保税的仓库。"); - } - } - - - } - return _webResponse.OK(null, tableExtra); } @@ -447,6 +400,13 @@ namespace VOL.WMS.Services /// public override WebResponseContent Add(SaveModel saveDataModel) { + if (!saveDataModel.HaveField("ISRULECHECK")) + { + saveDataModel.MakeSureHaveField("ISRULECHECK"); + saveDataModel.SetValue("ISRULECHECK", null); + } + + //校验从表配置 ValidateExtra(saveDataModel); if (!_webResponse.Status) @@ -709,6 +669,12 @@ namespace VOL.WMS.Services /// public override WebResponseContent Update(SaveModel saveModel) { + + if (!saveModel.HaveField("ISRULECHECK")) { + saveModel.MakeSureHaveField("ISRULECHECK"); + saveModel.SetValue("ISRULECHECK", null); + } + var headid = saveModel.MainData["WMSPLANID"].ToString(); var headmblno = saveModel.getMainDataValueStr("MBLNO"); @@ -761,6 +727,8 @@ namespace VOL.WMS.Services } } + if (head.SALE == null) { head.SALE = UserContext.Current.UserId; } + return WebResponseContent.Instance.OK(); }; @@ -1037,6 +1005,13 @@ namespace VOL.WMS.Services { return _webResponse; } + + var canshenhe = CanShenHe(saveModel); + if (!canshenhe.Status) + { + return canshenhe; + } + //取出校验完成后的从表1.2的数据 TableExtra tableExtra = _webResponse.Data as TableExtra; @@ -1173,6 +1148,64 @@ namespace VOL.WMS.Services } } + public WebResponseContent CanShenHe(SaveModel saveModel) { + + + + if (AppSetting.CompanySetting.COMPANYNAME == "JGWL") + { + + TableExtra tableExtra = _webResponse.Data as TableExtra; + //判断 + var storehousecode = saveModel.MainData["STOREHOUSE"].ToString(); + if (string.IsNullOrWhiteSpace(storehousecode)) + { + return _webResponse.Error("必须选择仓库"); + } + + var billtype = saveModel.getMainDataValueStr("BILLTYPE"); + if (billtype == "1") + { + var storehouse = OP_WMS_STOREHOUSERepository.Instance.FindFirst(x => x.AREACODE == storehousecode); + if (storehouse.ISBONDED == true) + { + + } + else + { + return _webResponse.Error("保税货物入库,必须选择保税的仓库。"); + } + + + foreach (var item in tableExtra.goodsList) + { + if (string.IsNullOrWhiteSpace(item.XH)) + { + return _webResponse.Error("保税货物入库,项号不能为空。"); + } + } + + } + else + { + var storehouse = OP_WMS_STOREHOUSERepository.Instance.FindFirst(x => x.AREACODE == storehousecode); + if (storehouse.ISBONDED == false) + { + + } + else + { + return _webResponse.Error("非保税货物入库,必须选择非保税的仓库。"); + } + } + + } + + return _webResponse.OK(); + + } + + /// /// 撤销审核 /// @@ -3683,7 +3716,7 @@ namespace VOL.WMS.Services public static int 规格型号_列 = 6; public static int 品牌_列 = 7; public static int 箱型_列 = 8; - + public static int 项号_列 = 9; public 金港一般产品(DataRow dr) { @@ -3697,7 +3730,7 @@ namespace VOL.WMS.Services //country = dr[产地_列].ToDecimal(); GOODSMODEL4 = dr[品牌_列].ToString(); CTNALL = dr[箱型_列].ToString(); - + XH = dr[项号_列].ToString(); } diff --git a/Vue.Net/VOL.WMS/Services/WMSINPLAN/Partial/OP_WMS_IN_PLAN_GOODSService.cs b/Vue.Net/VOL.WMS/Services/WMSINPLAN/Partial/OP_WMS_IN_PLAN_GOODSService.cs index e2a121af..405dfc9a 100644 --- a/Vue.Net/VOL.WMS/Services/WMSINPLAN/Partial/OP_WMS_IN_PLAN_GOODSService.cs +++ b/Vue.Net/VOL.WMS/Services/WMSINPLAN/Partial/OP_WMS_IN_PLAN_GOODSService.cs @@ -387,7 +387,8 @@ namespace VOL.WMS.Services var gnlist = jhd.产品List.Select(s => s.GOODSNAME).ToList(); var codegoodslist = Code_goodsRepository.Instance.FindAsIQueryable(x => gnlist.Contains(x.GOODNAME)).ToList(); - + var goodstypelist = codegoodslist.Select(x => x.GOODSFEETYPE).ToList(); + var goodsfeetypelist = OP_WMS_GOODSFEETYPERepository.Instance.FindAsIQueryable(x => goodstypelist.Contains(x.GOODSFEETYPE)).ToList(); foreach (var 产品 in jhd.产品List) { @@ -395,8 +396,18 @@ namespace VOL.WMS.Services return _webResponse.Error($"产品名称[{产品.GOODSNAME}]不存在"); } + var codegoods = codegoodslist.First(x => x.GOODNAME == 产品.GOODSNAME); + + if (!goodsfeetypelist.Exists(x => x.GOODSFEETYPE == codegoods.GOODNAME)) + { + return _webResponse.Error($"产品名称[{产品.GOODSNAME}]没有指定计费大类"); + } + 产品.GID = Guid.NewGuid(); 产品.WMSPLANID = head.WMSPLANID; + + var goodsfeetype = goodsfeetypelist.First(x => x.GOODSFEETYPE == codegoods.GOODSFEETYPE); + 产品.SetStorageUnit(goodsfeetype); repository.Add(产品); } repository.SaveChanges(); diff --git a/Vue.Net/VOL.WebApi/appsettings.json b/Vue.Net/VOL.WebApi/appsettings.json index 00baa938..13380c18 100644 --- a/Vue.Net/VOL.WebApi/appsettings.json +++ b/Vue.Net/VOL.WebApi/appsettings.json @@ -63,9 +63,9 @@ //"DbConnectionString": "Data Source=36.112.133.3,53076;Initial Catalog=ShippingWeb_JLWL;Persist Security Info=True;User ID=JLWLsa;Password=Ds20040201;Connect Timeout=500;", //金港 - //"DbConnectionString": "Data Source=47.104.253.169,62356;Initial Catalog=ShippingWeb_JGZHWL;Persist Security Info=True;User ID=sa;Password=Ds20040201;Connect Timeout=500;", + "DbConnectionString": "Data Source=47.104.253.169,62356;Initial Catalog=ShippingWeb_JGZHWL;Persist Security Info=True;User ID=sa;Password=Ds20040201;Connect Timeout=500;", //"DbConnectionString": "Data Source=47.104.253.169,62356;Initial Catalog=ShippingWeb_QDHGTY;Persist Security Info=True;User ID=sa;Password=Ds20040201;Connect Timeout=500;", - "DbConnectionString": "Data Source=47.104.253.169,62356;Initial Catalog=ShippingWeb_CS;Persist Security Info=True;User ID=sa;Password=Ds20040201;Connect Timeout=500;", + //"DbConnectionString": "Data Source=47.104.253.169,62356;Initial Catalog=ShippingWeb_CS;Persist Security Info=True;User ID=sa;Password=Ds20040201;Connect Timeout=500;", //全盛时代 //"DbConnectionString": "Data Source=59.110.216.226,52431;Initial Catalog=ShippingWeb_QDQSSD;Persist Security Info=True;User ID=QSSD;Password=SL226QSsd@@;Connect Timeout=500;",