diff --git a/Vol.Vue/logo和公司文字切换/青岛金港物流/src/lang/en.js b/Vol.Vue/logo和公司文字切换/青岛金港物流/src/lang/en.js index 449e5f58..82d8c3eb 100644 --- a/Vol.Vue/logo和公司文字切换/青岛金港物流/src/lang/en.js +++ b/Vol.Vue/logo和公司文字切换/青岛金港物流/src/lang/en.js @@ -51,6 +51,8 @@ module.exports = { RULEAMOUNT: '申报金额', STOREHOUSE: '仓库', + STOREHOUSE_2: '备选仓库1', + STOREHOUSE_3: '备选仓库2', AREACODE: '库位', STOREHOUSENAME: '仓库', AREANAME: '库位', diff --git a/Vol.Vue/logo和公司文字切换/青岛金港物流/src/lang/zh.js b/Vol.Vue/logo和公司文字切换/青岛金港物流/src/lang/zh.js index 53163e2f..3f61a0e0 100644 --- a/Vol.Vue/logo和公司文字切换/青岛金港物流/src/lang/zh.js +++ b/Vol.Vue/logo和公司文字切换/青岛金港物流/src/lang/zh.js @@ -106,6 +106,8 @@ module.exports = { RULEAMOUNT: '申报金额', STOREHOUSE: '仓库', + STOREHOUSE_2: '备选仓库1', + STOREHOUSE_3: '备选仓库2', AREACODE: '库位', STOREHOUSENAME: '仓库', AREANAME: '库位', diff --git a/Vol.Vue/src/components/basic/festwmsLogicEditmodel.vue b/Vol.Vue/src/components/basic/festwmsLogicEditmodel.vue index d243375e..5fdc05aa 100644 --- a/Vol.Vue/src/components/basic/festwmsLogicEditmodel.vue +++ b/Vol.Vue/src/components/basic/festwmsLogicEditmodel.vue @@ -210,10 +210,10 @@ export default { let JsonBody = { - // TYPENAME : "库存列表编辑", - // WMSID:_this.headid, - // BILLTYPE:_this.formFields.BILLTYPE, - // INSPECTIONTIME:_this.formFields.INSPECTIONTIME + TYPENAME : "库存列表编辑", + WMSID:_this.headid, + BILLTYPE:_this.formFields.BILLTYPE, + INSPECTIONTIME:_this.formFields.INSPECTIONTIME //测试内容 // TYPENAME : "付费申请审批", @@ -222,11 +222,36 @@ export default { // condition:"", // wheres:[{"name":"isaudit","value":"仅需自己审核",displayType:"="}] - TYPENAME : "付费申请审批", - execution:"查询明细", - isaudit:"", - condition:"", - wheres:[{"name":"GID","value":"31cc4ac5-1aca-46ce-a2f9-e527d022a9b9",displayType:"="}] + // TYPENAME : "付费发票核销", + // execution:"查询列表", + // isaudit:"已审核", + // condition:"", + // wheres:[{"name":"isaudit","value":"已审核",displayType:"="}] + + // TYPENAME : "付费发票核销", + // execution:"查询明细", + // isaudit:"", + // condition:"", + // wheres:[{"name":"BILLNO","value":"WM202306290010",displayType:"="}] + + // TYPENAME : "发票申请审批", + // execution:"查询附件", + // isaudit:"", + // condition:"", + // //wheres:[{"name":"isaudit","value":"已审核",displayType:"="}] + // wheres:[{"name":"BILLNO","value":"FP2023060082",displayType:"="}] + + // TYPENAME : "发票申请审批", + // execution:"查询列表", + // isaudit:"", + // condition:"", + // wheres:[{"name":"isaudit","value":"仅需自己审核",displayType:"="}] + // TYPENAME : "发票申请审批", + // execution:"查询业务", + // isaudit:"", + // condition:"", + // wheres:[{"name":"BSNO","value":"066b975e-6905-4e95-b4ff-a525aaaad009",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 d005e4fc..2b36ced8 100644 --- a/Vol.Vue/src/extension/wms/OP_WMS_IN_PLAN.js +++ b/Vol.Vue/src/extension/wms/OP_WMS_IN_PLAN.js @@ -1310,6 +1310,9 @@ let extension = { if (this.http.FormShow.isJGWL) { let trueList1 = ["HZQDBH"]; + + + //金港物流 保税 必填项 let trueList2 = ["GOODSOWNER", "ARCLIENTWMSOUT" , "MBLNO" , "CUSTOMNO"//报关单号 @@ -1324,7 +1327,9 @@ let extension = { , "CURRENCY" , "TRUCKTEAM" , "ISRULECHECK" + ,"CORPID","CUSTOMERNAME","SAMEWMS","WEIGHTTYPE" ]; + //金港物流 非保税 必填项 let trueList3 = ["GOODSOWNER", "ARCLIENTWMSOUT" , "MBLNO" //, "CUSTOMNO"//报关单号 @@ -1338,14 +1343,28 @@ let extension = { , "WMSWORKTYPE" , "CURRENCY" , "TRUCKTEAM" + , "CORPID", "CUSTOMERNAME", "SAMEWMS", "WEIGHTTYPE" ]; //金港物流 隐藏掉合同号 _this.editFormOptions.forEach((row) => { row.forEach((field) => { - if (field.field == "CONTRACTNO") { - field.hidden = true; - } + // if (field.field == "CONTRACTNO") { + // field.hidden = true; + // } + + + // if (field.field == "STOREHOUSE") { + // field.hidden = !(field.hidden); + // } + + + // if (field.field == "STOREHOUSE_2") { + // field.hidden = false; + // } + // if (field.field == "STOREHOUSE_3") { + // field.hidden = false; + // } } ) } diff --git a/Vol.Vue/src/extension/wms/OP_WMS_IN_PLANModelBody.vue b/Vol.Vue/src/extension/wms/OP_WMS_IN_PLANModelBody.vue index 9abee422..dba9be5d 100644 --- a/Vol.Vue/src/extension/wms/OP_WMS_IN_PLANModelBody.vue +++ b/Vol.Vue/src/extension/wms/OP_WMS_IN_PLANModelBody.vue @@ -781,14 +781,35 @@ export default { } //20230510 金港物流 要求入库计划可以选择分公司 + //20230721 显示两个待选仓库 if(this.http.FormShow.isJGWL){ window.Listhead.editFormOptions.forEach(x => { x.forEach(item => { if (item.field == "CORPID") { item.disabled=false; } + + if (item.field == "CONTRACTNO") { + item.hidden = true; + } + + + if (item.field == "STOREHOUSE") { + item.hidden = !(item.hidden); + } + + + if (item.field == "STOREHOUSE_2") { + item.hidden = false; + } + if (item.field == "STOREHOUSE_3") { + item.hidden = false; + } + }) }) + + } // diff --git a/Vol.Vue/src/extension/wms/OP_WMS_OUT_PLANModelBody.vue b/Vol.Vue/src/extension/wms/OP_WMS_OUT_PLANModelBody.vue index 98524e4b..0bb913df 100644 --- a/Vol.Vue/src/extension/wms/OP_WMS_OUT_PLANModelBody.vue +++ b/Vol.Vue/src/extension/wms/OP_WMS_OUT_PLANModelBody.vue @@ -472,9 +472,10 @@ export default { {field:'RULEPRICE',title:this.$t('RULEPRICE'),type: "decimal",width:140, edit: { type: "decimal", keep: true },align:'left',sort:true}, {field:'RULEAMOUNT',title:this.$t('RULEAMOUNT'),type: "decimal",width:140, edit: { type: "decimal", keep: true },align:'left',sort:true}, {field:'TRUCKNO',title:this.$t('TRUCKNO') - ,bind:{ key:'blankdic',data:[]} - ,edit:{ type:'select',keep:true} - ,normal:true,type: "text",width:90,align:'left',sort:true}, + //,bind:{ key:'blankdic',data:[]} + //,edit:{ type:'select',keep:true} + , edit: { type: "text", keep: true } + ,type: "text",width:90,align:'left',sort:true}, ], searchField_planlist: { @@ -737,8 +738,8 @@ export default { GoodsModelShow:{}, options:[], conditionList:[], - IsBatchStock:false, - trucknoList:[] + IsBatchStock:false + //,trucknoList:[] }; }, @@ -949,6 +950,9 @@ export default { return true; }, loadTableAfter_tab_truck(data, callBack) { + + var _this=this; + if(this.isFEST){ let trucklist=[]; @@ -959,18 +963,16 @@ export default { this.$refs.tab_infofiles.setTruckinfo(trucklist); } - this.trucknoList=[]; - var _this=this; - data.forEach((x)=>{ - _this.trucknoList.push({key:x.TRUCKNO,value:x.TRUCKNO}); - }); - - _this.$refs.table1.columns.forEach((x)=>{ + // this.trucknoList=[]; + // data.forEach((x)=>{ + // _this.trucknoList.push({key:x.TRUCKNO,value:x.TRUCKNO}); + // }); + // _this.$refs.table1.columns.forEach((x)=>{ - if(x.field=='TRUCKNO'){ - x.bind.data=_this.trucknoList; - } - }); + // if(x.field=='TRUCKNO'){ + // x.bind.data=_this.trucknoList; + // } + // }); return true; }, diff --git a/Vol.Vue/src/lang/zh.js b/Vol.Vue/src/lang/zh.js index 53163e2f..3f61a0e0 100644 --- a/Vol.Vue/src/lang/zh.js +++ b/Vol.Vue/src/lang/zh.js @@ -106,6 +106,8 @@ module.exports = { RULEAMOUNT: '申报金额', STOREHOUSE: '仓库', + STOREHOUSE_2: '备选仓库1', + STOREHOUSE_3: '备选仓库2', AREACODE: '库位', STOREHOUSENAME: '仓库', AREANAME: '库位', 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 115d0c32..a4af6ec2 100644 --- a/Vol.Vue/src/views/wms/OP_WMS_IN_PLAN.vue +++ b/Vol.Vue/src/views/wms/OP_WMS_IN_PLAN.vue @@ -54,6 +54,7 @@ ,"Creator":"","CTNNUM":"","ETA":"","JINGNEISHOUHUOREN":"","JINJINGBEIANSHENBAORIQI":"","INSPECTION_NO":"","PLAN_GETTIME":"" ,"NETWEIGHT":"","CUSTOMNO":"","GOODSOWNER":"","CUSTOMAMOUNT":"" ,"BSSOURCE":"","BILLSTATUS":"","ISRULECHECK":"","HZQDBH":"" + ,"STOREHOUSE":"","STOREHOUSE_2":"","STOREHOUSE_3":"" }, editFormOptions: [ [{"title":this.$t('INPLAN.WMSNO'),"field":"WMSNO","disabled":true}, @@ -516,7 +517,8 @@ [ {"title":this.$t('KGS_TON'),"field":"KGS_TON","type":"decimal",readonly:true}, {"title":this.$t('NETWEIGHT_TON'),"field":"NETWEIGHT_TON","type":"decimal",readonly:true}, - {"title":this.$t('SAMEWMS'),"type":"bool","field":"SAMEWMS","type":"switch"}, + //{"title":this.$t('SAMEWMS'),"type":"bool","field":"SAMEWMS","type":"switch"}, + {"dataKey":"shifoubit","title":this.$t('SAMEWMS'),"field":"SAMEWMS","type":"select",edit:{type:'select',keep:true},"required":true}, {"title":this.$t('FEESTARTDATE'),"field":"FEESTARTDATE","type":"date"} ], [{"dataKey":"storeunit","title":this.$t('RULEUNIT'),"field":"RULEUNIT","type":"select",edit:{type:'select',keep:true}}, @@ -570,12 +572,17 @@ } }// ,{"title":this.$t('CONTRACTNO'),"field":"CONTRACTNO","colSize":3} + ] ,[ {"dataKey":"CustName","title":this.$t('APCLIENTWMSOUT'),"field":"APCLIENTWMSOUT","type":"select",edit:{type:'select',keep:true}} ,{"title":this.$t('HZQDBH'),"field":"HZQDBH","type":"text"} - ,{"dataKey":"storage","data":[],"title":this.$t('STOREHOUSE'),"field":"STOREHOUSE","type":"select"} + ,{"dataKey":"storage","data":[],"title":this.$t('STOREHOUSE'),"field":"STOREHOUSE","type":"select","hidden":false} ,{"title":this.$t('DIZHANGID'),"field":"DIZHANGID","type":"text","disabled":true} + ],[ + {"dataKey":"storage","data":[],"title":this.$t('STOREHOUSE'),"field":"STOREHOUSE","type":"select","hidden":true} + ,{"dataKey":"storage","data":[],"title":this.$t('STOREHOUSE_2'),"field":"STOREHOUSE_2","type":"select","hidden":true} + ,{"dataKey":"storage","data":[],"title":this.$t('STOREHOUSE_3'),"field":"STOREHOUSE_3","type":"select","hidden":true} ], [ {"dataKey":"sale","data":[],"title":this.$t('SALE'),"colSize":3,"field":"SALE","type":"select"} diff --git a/Vue.Net/VOL.Core/Extensions/LambdaExtensions.cs b/Vue.Net/VOL.Core/Extensions/LambdaExtensions.cs index fed6bbfd..26b8e9eb 100644 --- a/Vue.Net/VOL.Core/Extensions/LambdaExtensions.cs +++ b/Vue.Net/VOL.Core/Extensions/LambdaExtensions.cs @@ -122,22 +122,35 @@ namespace VOL.Core.Extensions //如果该用户角色受仓库权限限制 ,则必须 if (UserContext.Current.UserInfo.LimitBySTORAGE) { - if (type.GetProperty("STOREHOUSE") == null) - { - //return null; - } - else - { + //if (type.GetProperty("STOREHOUSE") == null) + //{ + // //return null; + //} + //else + //{ // queries.Add(new Query { Name = "STOREHOUSE", Operator = Query.Operators.Contains, Value = UserContext.Current.UserInfo.STOREHOUSEList }); if (UserContext.Current.UserInfo.STOREHOUSEList.Count > 0) { foreach (var item in UserContext.Current.UserInfo.STOREHOUSEList) { - queries2.Add(new Query { Name = "STOREHOUSE", Operator = Query.Operators.Equal, Value =item }); + if (type.GetProperty("STOREHOUSE") != null) + { + queries2.Add(new Query { Name = "STOREHOUSE", Operator = Query.Operators.Equal, Value = item }); + } + if (type.GetProperty("STOREHOUSE_2") != null) + { + queries2.Add(new Query { Name = "STOREHOUSE_2", Operator = Query.Operators.Equal, Value = item }); + } + if (type.GetProperty("STOREHOUSE_3") != null) + { + queries2.Add(new Query { Name = "STOREHOUSE_3", Operator = Query.Operators.Equal, Value = item }); + } } + } //queryList.Add(queries2); - } - } + + //} + } //if (queries.Count == 0) //{ diff --git a/Vue.Net/VOL.Entity/DomainModels/WMS/REPORT/VW_OP_REP_WMSINDO.cs b/Vue.Net/VOL.Entity/DomainModels/WMS/REPORT/VW_OP_REP_WMSINDO.cs index 2b18fec9..443b06d4 100644 --- a/Vue.Net/VOL.Entity/DomainModels/WMS/REPORT/VW_OP_REP_WMSINDO.cs +++ b/Vue.Net/VOL.Entity/DomainModels/WMS/REPORT/VW_OP_REP_WMSINDO.cs @@ -268,9 +268,9 @@ namespace VOL.Entity.DomainModels /// /// [Display(Name ="PLAN_CreateID")] - [MaxLength(50)] - [Column(TypeName="varchar(50)")] - public string PLAN_CreateID { get; set; } + //[MaxLength(50)] + [Column(TypeName = "uniqueidentifier")] + public Guid? PLAN_CreateID { get; set; } /// /// diff --git a/Vue.Net/VOL.Entity/DomainModels/WMSINPLAN/OP_WMS_IN_PLAN.cs b/Vue.Net/VOL.Entity/DomainModels/WMSINPLAN/OP_WMS_IN_PLAN.cs index 041d04df..d39431c7 100644 --- a/Vue.Net/VOL.Entity/DomainModels/WMSINPLAN/OP_WMS_IN_PLAN.cs +++ b/Vue.Net/VOL.Entity/DomainModels/WMSINPLAN/OP_WMS_IN_PLAN.cs @@ -449,6 +449,25 @@ namespace VOL.Entity.DomainModels [Editable(true)] public string STOREHOUSE { get; set; } + /// + ///仓库 + /// + [Display(Name = "仓库2")] + [MaxLength(20)] + [Column(TypeName = "varchar(20)")] + [Editable(true)] + public string STOREHOUSE_2 { get; set; } + + + /// + ///仓库 + /// + [Display(Name = "仓库3")] + [MaxLength(20)] + [Column(TypeName = "varchar(20)")] + [Editable(true)] + public string STOREHOUSE_3 { get; set; } + /// /// 贸易方式 监管方式 /// diff --git a/Vue.Net/VOL.Entity/DomainModels/WMSINPLAN/VW_OP_WMS_IN_PLAN.cs b/Vue.Net/VOL.Entity/DomainModels/WMSINPLAN/VW_OP_WMS_IN_PLAN.cs index f71767c4..4c508431 100644 --- a/Vue.Net/VOL.Entity/DomainModels/WMSINPLAN/VW_OP_WMS_IN_PLAN.cs +++ b/Vue.Net/VOL.Entity/DomainModels/WMSINPLAN/VW_OP_WMS_IN_PLAN.cs @@ -423,6 +423,23 @@ namespace VOL.Entity.DomainModels [Column(TypeName = "varchar(20)")] public string STOREHOUSE { get; set; } + /// + ///仓库 + /// + [Display(Name = "仓库2")] + [MaxLength(20)] + [Column(TypeName = "varchar(20)")] + public string STOREHOUSE_2 { get; set; } + + + /// + ///仓库 + /// + [Display(Name = "仓库3")] + [MaxLength(20)] + [Column(TypeName = "varchar(20)")] + public string STOREHOUSE_3 { get; set; } + /// ///底账ID diff --git a/Vue.Net/VOL.Entity/DomainModels/WMSINPLAN/VW_WMS_IN_PLAN_GOODS_NEEDDO.cs b/Vue.Net/VOL.Entity/DomainModels/WMSINPLAN/VW_WMS_IN_PLAN_GOODS_NEEDDO.cs index aee03fc9..ea3dac9a 100644 --- a/Vue.Net/VOL.Entity/DomainModels/WMSINPLAN/VW_WMS_IN_PLAN_GOODS_NEEDDO.cs +++ b/Vue.Net/VOL.Entity/DomainModels/WMSINPLAN/VW_WMS_IN_PLAN_GOODS_NEEDDO.cs @@ -735,5 +735,25 @@ namespace VOL.Entity.DomainModels [Column(TypeName = "varchar(20)")] public string STOREHOUSE { get; set; } + /// + ///仓库 + /// + [Display(Name = "仓库2")] + [MaxLength(20)] + [Column(TypeName = "varchar(20)")] + [Editable(true)] + public string STOREHOUSE_2 { get; set; } + + + /// + ///仓库 + /// + [Display(Name = "仓库3")] + [MaxLength(20)] + [Column(TypeName = "varchar(20)")] + [Editable(true)] + public string STOREHOUSE_3 { get; set; } + + } } \ No newline at end of file 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 c6323e48..184b67f9 100644 --- a/Vue.Net/VOL.WMS/Services/WMS/Partial/OP_WMSService.cs +++ b/Vue.Net/VOL.WMS/Services/WMS/Partial/OP_WMSService.cs @@ -174,43 +174,54 @@ namespace VOL.WMS.Services // isaudit = "2"; // } //} - if (!string.IsNullOrWhiteSpace(AuditParam.isaudit)) { - if (AuditParam.isaudit == "仅需自己审核") - { - isaudit = "3"; - } - if (AuditParam.isaudit == "已审核") - { - isaudit = "2"; - } - } + //if (!string.IsNullOrWhiteSpace(AuditParam.isaudit)) { + // if (AuditParam.isaudit == "仅需自己审核") + // { + // isaudit = "3"; + // } + // if (AuditParam.isaudit == "已审核") + // { + // isaudit = "2"; + // } + //} - if (AuditParam.wheres.Exists(x => x.name != "isaudit")) { - foreach (var item in AuditParam.wheres.Where(x=>x.name != "isaudit").ToList()) { + foreach (var item in AuditParam.wheres.ToList()) { - if (item.name == "BILLNO" && !string.IsNullOrWhiteSpace( item.value)) { - addcondition($"cm.BILLNO like '%{item.value}'"); - } - if (item.name == "APPLICANTNAME" && !string.IsNullOrWhiteSpace(item.value)) - { - addcondition($"cm.APPLICANT = '{item.value}'"); - } - if (item.name == "MBLNO" && !string.IsNullOrWhiteSpace(item.value)) - { - addcondition($" EXISTS (select 1 from ch_fee_do d where d.BILLNO=i.BILLNO AND d.BSNO IN (SELECT BSNO FROM V_OP_BILL WHERE CUSTNO like '%{item.value}%' or MBLNO like '%{item.value}%' or HBLNO like '%{item.value}%' or CUSTOMNO like '%{item.value}%' or ORDERNO like '%{item.value}%'))"); - } - if (item.name == "APPLYTIMEBgn" && !string.IsNullOrWhiteSpace(item.value)) + if (item.name == "isaudit" && !string.IsNullOrWhiteSpace(item.value)) + { + if (item.value == "仅需自己审核") { - addcondition($"APPLYTIME >='{item.value}'"); + isaudit = "3"; } - if (item.name == "APPLYTIMEEnd" && !string.IsNullOrWhiteSpace(item.value)) + if (item.value == "已审核") { - addcondition($"APPLYTIME <='{item.value} 23:59:59'"); + isaudit = "2"; } } + + if (item.name == "BILLNO" && !string.IsNullOrWhiteSpace( item.value)) { + addcondition($"cm.BILLNO like '%{item.value}'"); + } + if (item.name == "APPLICANTNAME" && !string.IsNullOrWhiteSpace(item.value)) + { + addcondition($"cm.APPLICANT = '{item.value}'"); + } + if (item.name == "MBLNO" && !string.IsNullOrWhiteSpace(item.value)) + { + addcondition($" EXISTS (select 1 from ch_fee_do d where d.BILLNO=i.BILLNO AND d.BSNO IN (SELECT BSNO FROM V_OP_BILL WHERE CUSTNO like '%{item.value}%' or MBLNO like '%{item.value}%' or HBLNO like '%{item.value}%' or CUSTOMNO like '%{item.value}%' or ORDERNO like '%{item.value}%'))"); + } + if (item.name == "APPLYTIMEBgn" && !string.IsNullOrWhiteSpace(item.value)) + { + addcondition($"APPLYTIME >='{item.value}'"); + } + if (item.name == "APPLYTIMEEnd" && !string.IsNullOrWhiteSpace(item.value)) + { + addcondition($"APPLYTIME <='{item.value} 23:59:59'"); + } } + JObject reqObj = new JObject { @@ -345,6 +356,42 @@ namespace VOL.WMS.Services } } + if (AuditParam.execution == "查询业务") + { + + foreach (var item in AuditParam.wheres) + { + if (item.name == "BSNO" && !string.IsNullOrWhiteSpace(item.value)) + { + addcondition($"{item.value}"); + } + } + + JObject reqObj = new JObject + { + { "userid", userid }, + { "formname", AuditParam.execution }, + { "isaudit", "" }, + { "condition", condition } + }; + + try + { + var t_str = reqObj.ToString(Newtonsoft.Json.Formatting.None); + + var rtn = SendHelper.DoPost(url, t_str); + + var rtnresult = JsonConvert.DeserializeObject(rtn); + + _webResponseContent = new WebResponseContent(rtnresult); + + } + catch (Exception e) + { + _webResponseContent.Error(e.Message); + } + } + } if (jp.TYPENAME == "付费发票核销") @@ -385,8 +432,34 @@ namespace VOL.WMS.Services { //执行查询 从ds7查询仅需自己审核 - foreach (var item in AuditParam.wheres.Where(x => x.name != "isaudit").ToList()) + var isaudit = "1"; + + //if (!string.IsNullOrWhiteSpace(AuditParam.isaudit)) + //{ + // if (AuditParam.isaudit == "仅需自己审核") + // { + // isaudit = "1";//提交审核 + // } + // if (AuditParam.isaudit == "已审核") + // { + // isaudit = "2";//审核通过 + // } + //} + + + + + foreach (var item in AuditParam.wheres.ToList()) { + if (item.name == "isaudit" && !string.IsNullOrWhiteSpace(item.value)) + { + if(item.value== "仅需自己审核") + isaudit = "1"; + if (item.value == "已审核") + isaudit = "2"; + } + + if (item.name == "APPLICANTNAME" && !string.IsNullOrWhiteSpace(item.value)) { addcondition($"i.APPLICANT = '{item.value}'"); @@ -408,6 +481,11 @@ namespace VOL.WMS.Services { addcondition($"APPLYTIME <='{item.value} 23:59:59'"); } + + if (item.name == "APPLYTIMEEnd" && !string.IsNullOrWhiteSpace(item.value)) + { + addcondition($"APPLYTIME <='{item.value} 23:59:59'"); + } } @@ -415,7 +493,7 @@ namespace VOL.WMS.Services { { "userid", userid }, { "formname", AuditParam.execution }, - //{ "isaudit", isaudit }, + { "isaudit", isaudit }, { "condition", condition } }; try @@ -444,9 +522,9 @@ namespace VOL.WMS.Services 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($" c.BILLNO = '{item.value}' "); } } @@ -454,7 +532,7 @@ namespace VOL.WMS.Services { { "userid", userid }, { "formname", AuditParam.execution }, - { "isaudit", "" }, + //{ "isaudit", "" }, { "condition", condition } }; @@ -489,7 +567,7 @@ namespace VOL.WMS.Services { { "userid", userid }, { "formname", AuditParam.execution }, - { "isaudit", "" }, + //{ "isaudit", "" }, { "condition", condition } }; @@ -544,6 +622,43 @@ namespace VOL.WMS.Services _webResponseContent.Error(e.Message); } } + + if (AuditParam.execution == "查询业务") + { + + foreach (var item in AuditParam.wheres) + { + if (item.name == "BSNO" && !string.IsNullOrWhiteSpace(item.value)) + { + addcondition($"{item.value}"); + } + } + + JObject reqObj = new JObject + { + { "userid", userid }, + { "formname", AuditParam.execution }, + //{ "isaudit", "" }, + { "condition", condition } + }; + + try + { + var t_str = reqObj.ToString(Newtonsoft.Json.Formatting.None); + + var rtn = SendHelper.DoPost(url, t_str); + + var rtnresult = JsonConvert.DeserializeObject(rtn); + + _webResponseContent = new WebResponseContent(rtnresult); + + } + catch (Exception e) + { + _webResponseContent.Error(e.Message); + } + } + } if (jp.TYPENAME == "客户信息审批") @@ -717,6 +832,9 @@ namespace VOL.WMS.Services var dicnos3 = new string[] { "DS7url" }; var tUrlList = DictionaryManager.GetDictionaries(dicnos3).ToList(); var urlhead = tUrlList[0].Sys_DictionaryList[0].DicValue; + + //测试地址 + //urlhead = "http://localhost:10200"; var urlDetail = "/CommMng/DSWEBAPPInterface/InvApplicationAuditInterface"; var url = urlhead + urlDetail; @@ -726,6 +844,7 @@ namespace VOL.WMS.Services var username = UserContext.Current.UserInfo.UserName; var usercompanyid = UserContext.Current.UserInfo.CompanyId; + var ds7publicurl = tUrlList[0].Sys_DictionaryList.FirstOrDefault(x => x.DicName == "DS7PulicUrl").DicValue; var condition = ""; void addcondition(string str) @@ -737,51 +856,58 @@ namespace VOL.WMS.Services if (AuditParam.execution == "查询列表") { - var isaudit = "2"; + var isaudit = "1"; - if (!string.IsNullOrWhiteSpace(AuditParam.isaudit)) + //if (!string.IsNullOrWhiteSpace(AuditParam.isaudit)) + //{ + + // if (AuditParam.isaudit == "仅需自己审核") + // { + // isaudit = "2"; + // } + // if (AuditParam.isaudit == "已审核") + // { + // isaudit = "0"; + // } + //} + //addcondition($"BILLSTATUS ='{isaudit}'"); + + + + foreach (var item in AuditParam.wheres.ToList()) { + if (item.name == "isaudit" && !string.IsNullOrWhiteSpace(item.value)) + { + if (item.value == "仅需自己审核") + isaudit = "1"; + if (item.value == "已审核") + isaudit = "2"; + } + //addcondition($"BILLSTATUS ='{isaudit}'"); - if (AuditParam.isaudit == "仅需自己审核") + if (item.name == "BILLNO" && !string.IsNullOrWhiteSpace(item.value)) { - isaudit = "2"; + addcondition($" cm.BILLNO like '%{item.value}%' "); } - if (AuditParam.isaudit == "已审核") + if (item.name == "MBLNO" && !string.IsNullOrWhiteSpace(item.value)) { - isaudit = "0"; + addcondition($" BILLNO IN (SELECT BILLNO FROM CH_FEE_DO WHERE BSNO IN (SELECT BSNO FROM V_OP_BILL b WHERE b.CUSTNO like '%{item.value}%' or b.MBLNO like '%{item.value}%' or b.HBLNO like '%{item.value}%' or b.CUSTOMNO like '%{item.value}%' or b.ORDERNO like '%{item.value}%')) "); } - } - addcondition($"BILLSTATUS ='{isaudit}'"); - - - if (AuditParam.wheres.Exists(x => x.name != "isaudit")) - { - foreach (var item in AuditParam.wheres.Where(x => x.name != "isaudit").ToList()) + if (item.name == "CUSTOMERNAME" && !string.IsNullOrWhiteSpace(item.value)) { + addcondition($"CUSTOMERNAME like '%{item.value}%'"); + } - if (item.name == "BILLNO" && !string.IsNullOrWhiteSpace(item.value)) - { - addcondition($" cm.BILLNO like '%{item.value}%' "); - } - if (item.name == "MBLNO" && !string.IsNullOrWhiteSpace(item.value)) - { - addcondition($" BILLNO IN (SELECT BILLNO FROM CH_FEE_DO WHERE BSNO IN (SELECT BSNO FROM V_OP_BILL b WHERE b.CUSTNO like '%{item.value}%' or b.MBLNO like '%{item.value}%' or b.HBLNO like '%{item.value}%' or b.CUSTOMNO like '%{item.value}%' or b.ORDERNO like '%{item.value}%')) "); - } - if (item.name == "CUSTOMERNAME" && !string.IsNullOrWhiteSpace(item.value)) - { - addcondition($"CUSTOMERNAME like '%{item.value}%'"); - } - - if (item.name == "APPLYTIMEBgn" && !string.IsNullOrWhiteSpace(item.value)) - { - addcondition($"APPLYTIME >='{item.value}'"); - } - if (item.name == "APPLYTIMEEnd" && !string.IsNullOrWhiteSpace(item.value)) - { - addcondition($"APPLYTIME <='{item.value} 23:59:59'"); - } + if (item.name == "APPLYTIMEBgn" && !string.IsNullOrWhiteSpace(item.value)) + { + addcondition($"APPLYTIME >='{item.value}'"); + } + if (item.name == "APPLYTIMEEnd" && !string.IsNullOrWhiteSpace(item.value)) + { + addcondition($"APPLYTIME <='{item.value} 23:59:59'"); } } + JObject reqObj = new JObject { @@ -815,9 +941,9 @@ namespace VOL.WMS.Services foreach (var item in AuditParam.wheres) { - if (item.name == "GID" && !string.IsNullOrWhiteSpace(item.value)) + if (item.name == "BILLNO" && !string.IsNullOrWhiteSpace(item.value)) { - addcondition($" PID = '{item.value}' "); + addcondition($" BILLNO = '{item.value}' "); } } @@ -846,6 +972,47 @@ namespace VOL.WMS.Services } } + if (AuditParam.execution == "查询附件") + { + + foreach (var item in AuditParam.wheres) + { + if (item.name == "BILLNO" && !string.IsNullOrWhiteSpace(item.value)) + { + addcondition($"{item.value}"); + } + } + + JObject reqObj = new JObject + { + { "userid", userid }, + { "formname", AuditParam.execution }, + { "isaudit", "" }, + { "condition", condition } + }; + + try + { + var t_str = reqObj.ToString(Newtonsoft.Json.Formatting.None); + + var rtn = SendHelper.DoPost(url, t_str); + + var rtnresult = JsonConvert.DeserializeObject(rtn); + + var 附件list = JsonConvert.DeserializeObject(rtn); + 附件list.SetUrl(ds7publicurl); + + rtnresult.Data = 附件list.data; + + _webResponseContent = new WebResponseContent(rtnresult); + + } + catch (Exception e) + { + _webResponseContent.Error(e.Message); + } + } + if (AuditParam.execution == "审批通过") { foreach (var item in AuditParam.wheres) @@ -916,6 +1083,41 @@ namespace VOL.WMS.Services } } + if (AuditParam.execution == "查询业务") + { + + foreach (var item in AuditParam.wheres) + { + if (item.name == "BSNO" && !string.IsNullOrWhiteSpace(item.value)) + { + addcondition($"{item.value}"); + } + } + + JObject reqObj = new JObject + { + { "userid", userid }, + { "formname", AuditParam.execution }, + { "isaudit", "" }, + { "condition", condition } + }; + + try + { + var t_str = reqObj.ToString(Newtonsoft.Json.Formatting.None); + + var rtn = SendHelper.DoPost(url, t_str); + + var rtnresult = JsonConvert.DeserializeObject(rtn); + + _webResponseContent = new WebResponseContent(rtnresult); + + } + catch (Exception e) + { + _webResponseContent.Error(e.Message); + } + } } return _webResponseContent; @@ -1013,4 +1215,35 @@ namespace VOL.WMS.Services } } + + public class DS7Result { + public bool? Success { get; set; } + public string Message { get; set; } + public object data { get; set; } + } + + + public class DS7附件 { + public string GID { get; set; } + public string BillNo { get; set; } + public string File_Type { get; set; } + public string UpdateTime { get; set; } + public string Operator { get; set; } + public string File_Path { get; set; } + public string File_Name { get; set; } + public string File_OriginalName { get; set; } + } + public class DS7附件返回值 : DBResult + { + public List data { get; set; } + + const string fileurl = "/Areas/Account/Files/"; + public void SetUrl(string url) { + if (data != null && data.Count > 0) { + foreach (var item in data) { + item.File_Path = url + fileurl + item.BillNo + "/" + item.File_Name; + } + } + } + } } diff --git a/Vue.Net/VOL.WMS/Services/WMSOUT/Partial/OP_WMS_OUT_PLANService.cs b/Vue.Net/VOL.WMS/Services/WMSOUT/Partial/OP_WMS_OUT_PLANService.cs index e2814d6c..6e803fd3 100644 --- a/Vue.Net/VOL.WMS/Services/WMSOUT/Partial/OP_WMS_OUT_PLANService.cs +++ b/Vue.Net/VOL.WMS/Services/WMSOUT/Partial/OP_WMS_OUT_PLANService.cs @@ -31,6 +31,7 @@ using VOL.Core.Configuration; using FastReport.Editor; using System.Windows.Forms; using VOL.System.Services; +using Npgsql.Logging; namespace VOL.WMS.Services { @@ -386,7 +387,10 @@ namespace VOL.WMS.Services List TRUCKList = new List(); TRUCKList = AutoMapperHelper.MapToList(TRUCKInfoList); - + + var AddDetailList = new List(); + //var UpdDetailList = new List(); + if (!PLANDetailList.isNullorEmpty()) { @@ -423,10 +427,13 @@ namespace VOL.WMS.Services } } - repository.AddRange(dealedbodylist[0]); - repository.UpdateRange(dealedbodylist[1], x => new { x }); + //repository.AddRange(dealedbodylist[0]); + //repository.UpdateRange(dealedbodylist[1], x => new { x }); - repository.SaveChanges(); + //repository.SaveChanges(); + + AddDetailList.AddRange(dealedbodylist[0]); + //UpdDetailList.AddRange(dealedbodylist[1]); } } @@ -552,6 +559,63 @@ namespace VOL.WMS.Services } + var 当前车辆信息List = OP_WMS_TRUCKRepository.Instance.FindAsIQueryable(x => x.WMSPLANID == head.WMSPLANID).ToList(); + + if (当前车辆信息List != null && 当前车辆信息List.Count > 0) + { + + if (!AddDetailList.Exists(x => x.TRUCKNO != null && x.TRUCKNO != "")) + { + foreach (var item in AddDetailList) + { + item.TRUCKNO = 当前车辆信息List[0].TRUCKNO; + } + } + + } + else + { + var trucknoList = new List(); + + if (AddDetailList.Exists(x => x.TRUCKNO != null && x.TRUCKNO != "")) + { + foreach (var item in AddDetailList) + { + if (!trucknoList.Exists(x => x == item.TRUCKNO && item.TRUCKNO != null && item.TRUCKNO != "")) + { + trucknoList.Add(item.TRUCKNO); + } + } + } + + + if (trucknoList != null && trucknoList.Count > 0) + { + foreach (var truckno in trucknoList) + { + var newrec = new OP_WMS_TRUCK(); + newrec.TRUCKNO = truckno; + newrec.WMSPLANID = head.WMSPLANID; + OP_WMS_TRUCKRepository.Instance.Add(newrec, true); + } + + foreach (var item in AddDetailList) + { + if (item.TRUCKNO == null || item.TRUCKNO == "") + { + item.TRUCKNO = trucknoList[0]; + } + } + + } + + } + if (AddDetailList != null && AddDetailList.Count > 0) + { + OP_WMS_OUT_PLAN_DETAILRepository.Instance.AddRange(AddDetailList, true); + } + + Logger.ADD_PUB("出库通知", head, saveDataModel.Extra.ToString()); return WebResponseContent.Instance.OK(); @@ -668,19 +732,25 @@ namespace VOL.WMS.Services List TRUCKList = new List(); TRUCKList = AutoMapperHelper.MapToList(TRUCKInfoList); + var AddDetailList =new List(); + var UpdDetailList = new List(); + if (!PLANDetailList.isNullorEmpty()) { if (!isBatchStock)//原有业务逻辑 { var dealedbodylist = DealBodyList(head.WMSPLANID, PLANDetailList, "OP_WMS_OUT_PLAN"); - repository.AddRange(dealedbodylist[0]); - //修改(第二个参数指定要修改的字段,第三个参数执行保存) - repository.UpdateRange(dealedbodylist[1], x => new { x }); + //repository.AddRange(dealedbodylist[0]); + ////修改(第二个参数指定要修改的字段,第三个参数执行保存) + //repository.UpdateRange(dealedbodylist[1], x => new { x }); + + ////其他从表按上面同样的操作即可 + ////最终保存 + //repository.SaveChanges(); - //其他从表按上面同样的操作即可 - //最终保存 - repository.SaveChanges(); + AddDetailList.AddRange(dealedbodylist[0]); + UpdDetailList.AddRange(dealedbodylist[1]); } } @@ -695,7 +765,7 @@ namespace VOL.WMS.Services repository.AddRange(dealedbodylist2[0]); repository.UpdateRange(dealedbodylist2[1], x => new { x }); - repository.SaveChanges(); + repository.SaveChangesAsync(); OP_WMS_TRUCKINFOService.Instance.DealSaveDetailList(dealedbodylist2[0]); OP_WMS_TRUCKINFOService.Instance.DealSaveDetailList(dealedbodylist2[1]); @@ -803,6 +873,86 @@ namespace VOL.WMS.Services #endregion } + + var 当前车辆信息List = OP_WMS_TRUCKRepository.Instance.FindAsIQueryable(x => x.WMSPLANID == head.WMSPLANID).ToList(); + + if (当前车辆信息List != null && 当前车辆信息List.Count > 0) + { + + if (!AddDetailList.Exists(x => x.TRUCKNO != null && x.TRUCKNO != "")) + { + foreach (var item in AddDetailList) + { + item.TRUCKNO = 当前车辆信息List[0].TRUCKNO; + } + } + + if (!UpdDetailList.Exists(x => x.TRUCKNO != null && x.TRUCKNO != "")) + { + foreach (var item in UpdDetailList) + { + item.TRUCKNO = 当前车辆信息List[0].TRUCKNO; + } + } + } + else { + var trucknoList = new List(); + + if (AddDetailList.Exists(x => x.TRUCKNO != null && x.TRUCKNO != "")) + { + foreach (var item in AddDetailList) + { + if (!trucknoList.Exists(x => x == item.TRUCKNO && item.TRUCKNO!=null && item.TRUCKNO != "")) { + trucknoList.Add(item.TRUCKNO); + } + } + } + if (UpdDetailList.Exists(x => x.TRUCKNO != null && x.TRUCKNO != "")) + { + foreach (var item in UpdDetailList) + { + if (!trucknoList.Exists(x => x == item.TRUCKNO && item.TRUCKNO != null && item.TRUCKNO != "")) + { + trucknoList.Add(item.TRUCKNO); + } + } + } + + if (trucknoList != null && trucknoList.Count > 0) + { + foreach (var truckno in trucknoList) { + var newrec = new OP_WMS_TRUCK(); + newrec.TRUCKNO= truckno; + newrec.WMSPLANID = head.WMSPLANID; + OP_WMS_TRUCKRepository.Instance.Add(newrec,true); + } + + foreach (var item in AddDetailList) + { + if (item.TRUCKNO == null || item.TRUCKNO == "") + { + item.TRUCKNO = trucknoList[0]; + } + } + + foreach (var item in UpdDetailList) + { + if (item.TRUCKNO == null || item.TRUCKNO == "") + { + item.TRUCKNO = trucknoList[0]; + } + } + } + + } + if (AddDetailList != null && AddDetailList.Count > 0) { + OP_WMS_OUT_PLAN_DETAILRepository.Instance.AddRange(AddDetailList, true); + } + if (UpdDetailList != null && UpdDetailList.Count > 0) + { + OP_WMS_OUT_PLAN_DETAILRepository.Instance.UpdateRange(UpdDetailList, true); + } + Logger.ADD_PUB("出库通知", head, saveModel.Extra.ToString()); return WebResponseContent.Instance.OK(); diff --git a/Vue.Net/VOL.WebApi/appsettings.json b/Vue.Net/VOL.WebApi/appsettings.json index 18ef8815..f30e2b2c 100644 --- a/Vue.Net/VOL.WebApi/appsettings.json +++ b/Vue.Net/VOL.WebApi/appsettings.json @@ -27,7 +27,7 @@ //裕龙 //"DbConnectionString": "Data Source=123.234.180.6,11435;Initial Catalog=DSWMS;Persist Security Info=True;User ID=sa;Password=Ds20040201;Connect Timeout=500;", - //fest菲尔斯特 + //fest菲尔斯特 fest@log2023 //"DbConnectionString": "Data Source=43.137.41.66,11435;Initial Catalog=ShippingWeb_FEST0306;Persist Security Info=True;User ID=sa;Password=Fest998877;Connect Timeout=500;", //"DbConnectionString": "Data Source=43.137.41.66,11435;Initial Catalog=FEST_DSTEST0709;Persist Security Info=True;User ID=sa;Password=Fest998877;Connect Timeout=500;", @@ -64,8 +64,8 @@ //"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_QDHGTY;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;", //全盛时代