From 57f749d062174c3d171da569de12d6eef7464f82 Mon Sep 17 00:00:00 2001 From: ddlucky Date: Fri, 2 Jun 2023 10:01:27 +0800 Subject: [PATCH] 20230601 --- DSWeb.Common/DB/Comm.cs | 2 +- DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs | 80 +++++++ .../Controllers/MsOp_BLISSUEController.cs | 24 +- .../MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs | 108 ++++++++- .../DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs | 137 ++++++++++- .../Models/MsOp_BLISSUE/MsOp_BLISSUE.cs | 12 + .../Viewsjs/MsOpSeae/MsOpSeaeFeeIndex.js | 38 ++- .../Viewsjs/MsOpSeae/MsOpSeaeIndex.js | 82 ++++--- .../Viewsjs/MsOpStatus/MsOpStatusIndex.js | 12 +- .../MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js | 143 +++++------- .../Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEIndex.js | 218 +++++++----------- 11 files changed, 587 insertions(+), 269 deletions(-) diff --git a/DSWeb.Common/DB/Comm.cs b/DSWeb.Common/DB/Comm.cs index 528c9242..ea9f3b59 100644 --- a/DSWeb.Common/DB/Comm.cs +++ b/DSWeb.Common/DB/Comm.cs @@ -2208,7 +2208,7 @@ namespace DSWeb.Common.DB public string REMARK { get; set; } public string INPUTBY { get; set; } public DateTime? INPUTTIME { get; set; } - public int? ORDENO { get; set; } + public int? ORDNO { get; set; } public string STATUS_OPSEAE { get; set; } public string STTYPE { get; set; } public string ISOPEN { get; set; } diff --git a/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs b/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs index 503864d8..1a8cb6fd 100644 --- a/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs +++ b/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs @@ -45,6 +45,7 @@ using DSWeb.Areas.Account.DAL.Chfee_Recvapplication; using DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication; using DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE; using DSWeb.MvcShipping.DAL.Chfee_AuditDAL; +using System.Data.Entity.Migrations; namespace DSWeb.Areas.CommMng.DAL { @@ -6528,6 +6529,24 @@ namespace DSWeb.Areas.CommMng.DAL cdc.SaveChangesAsync(); } + + public static void DelOpStatus(string username, string bsno, string status) + { + var cdc = new Common.DB.CommonDataContext(); + + var currstatus = cdc.op_status.Where(x => x.BSNO == bsno && x.STATUS == status).OrderByDescending(o=>o.COMPTIME).ToList(); + + if (currstatus != null && currstatus.Count > 0) + { + var rec = currstatus[0]; + rec.ISCOMP = false; + rec.COMPTIME = DateTime.Now; + rec.COMPOP = username; + cdc.op_status.AddOrUpdate(rec); + cdc.SaveChangesAsync(); + } + } + public static void 已放舱(string username, string bsno) { AddOpStatus( username, bsno, "已放舱"); } @@ -6541,6 +6560,67 @@ namespace DSWeb.Areas.CommMng.DAL { AddOpStatus(username, bsno, "已发VGM"); } + + public static void 已补料(string username, string bsno) + { + AddOpStatus(username, bsno, "已补料"); + } + + public static void 已截VGM(string username, string bsno) + { + AddOpStatus(username, bsno, "已截VGM"); + } + public static void 已舱单(string username, string bsno) + { + AddOpStatus(username, bsno, "已舱单"); + } + public static void 已订舱(string username, string bsno) + { + AddOpStatus(username, bsno, "已订舱"); + } + public static void 退舱(string username, string bsno) + { + AddOpStatus(username, bsno, "退舱"); + } + + /// + public static void del放舱(string username, string bsno) + { + DelOpStatus(username, bsno, "已放舱"); + } + + public static void del发舱单(string username, string bsno) + { + DelOpStatus(username, bsno, "已发舱单"); + } + + public static void del发VGM(string username, string bsno) + { + DelOpStatus(username, bsno, "已发VGM"); + } + + public static void del补料(string username, string bsno) + { + DelOpStatus(username, bsno, "已补料"); + } + + public static void del截VGM(string username, string bsno) + { + DelOpStatus(username, bsno, "已截VGM"); + } + public static void del舱单(string username, string bsno) + { + DelOpStatus(username, bsno, "已舱单"); + } + public static void del订舱(string username, string bsno) + { + DelOpStatus(username, bsno, "已订舱"); + } + public static void del退舱(string username, string bsno) + { + DelOpStatus(username, bsno, "退舱"); + } + } #endregion diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs index 30c2bf2c..26e54a8f 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs @@ -2273,7 +2273,7 @@ namespace DSWeb.MvcShipping.Controllers foreach (var _p in _r1) { - if (BLSTATUSTYPE.已放货或已放单(_p.BLSTATUS) || _p.ISSUETYPE=="SWB") + if (BLSTATUSTYPE.已放货或已放单(_p.BLSTATUS) || _p.ISSUETYPE=="SWB" ) { //20230320 SWB的也扣不了 /* @@ -2869,6 +2869,18 @@ namespace DSWeb.MvcShipping.Controllers return BasicDataRefDAL.GetContentResult(data); } + /// + /// 判断业务能否执行【取消提单签出】动作 + /// + /// + /// + public ContentResult CanUNFDTZ(string BSNO) + { + var data = MsOp_BLISSUEDAL.CanUNFDTZ(BSNO, Session["SHOWNAME"].ToString()); + + return BasicDataRefDAL.GetContentResult(data); + } + /// /// 用于特放申请的是否允许签出 /// @@ -2896,6 +2908,16 @@ namespace DSWeb.MvcShipping.Controllers return BasicDataRefDAL.GetContentResult(data); } + + public ContentResult CanDoCheckOut(string BSNO) + { + + var data = MsOp_BLISSUEDAL.CanDoCheckOut(BSNO, Session["SHOWNAME"].ToString()); + + return BasicDataRefDAL.GetContentResult(data); + } + + #region 特殊放单附件 public ContentResult GetFileList ( string PID ) diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs index 563e88d5..adc2cd0a 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs @@ -30,6 +30,8 @@ using DSWeb.Common.DB; using System.Linq; using DSWeb.MvcShipping.Models.MsSeaeOrder; using System.Net.NetworkInformation; +using sun.misc; +using javax.management.loading; namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL { @@ -40,14 +42,14 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL //",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_SEAE.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS"; /// - const string 业务状态查询子句OPSEAE = "(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_SEAE.BSNO and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC)"; - - const string 业务状态查询子句B = "(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=B.BSNO and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC)"; + const string 业务状态查询子句OPSEAE = "(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_SEAE.BSNO and ISCOMP=1 and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC)"; + + const string 业务状态查询子句B = "(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=B.BSNO and ISCOMP=1 and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC)"; //",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_SEAE.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS" - const string 业务状态子句OPSEAE = ",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_SEAE.BSNO and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS"; + const string 业务状态子句OPSEAE = ",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_SEAE.BSNO and ISCOMP=1 and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS"; - const string 业务状态子句B = ",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=B.BSNO and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS"; + const string 业务状态子句B = ",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=B.BSNO and ISCOMP=1 and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS"; const string 提单状态子句OPSEAE = " ,(select top 1 case ACTNAME when '取消签入' then '' when '取消签出' then '提单签入' else ACTNAME end from WorkLog where ACTNAME in ('提单签入','提单签出','取消签入','取消签出','扣单') and bsno in(select gid from op_blissue where bsno=OP_SEAE.bsno)order by OPDATE desc) BLISSUESTATUS "; @@ -2390,9 +2392,10 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL var oldHeadData = new MsOpSeae(); oldHeadData.BSNO = null; - if(opstatus=="edit") + if (opstatus == "edit") { oldHeadData = MsOpSeaeDAL.GetData($" B.BSNO='{headData.BSNO}' "); - + oldhead = oldHeadData; + } if (headData.ISINSPECTION == true) //&& oldHeadData.iscancel = 0 ||= null) { if (!string.IsNullOrWhiteSpace(oldHeadData.BSNO)) @@ -2552,7 +2555,11 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL sdal.SaveStatusTree(BSNO, uname == null ? "" : uname); result.Data = BSNO; - //20230525 增加对业务状态勾 + //20230525 增加对业务状态勾的状态变动记录 + SetStatus(username, oldhead, headData, opstatus); + + + return result; } @@ -2567,6 +2574,91 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL } } + public static void SetStatus(string username, MsOpSeae oldhead, MsOpSeae head,string opstatus) + { + // ISINSPECTION 退舱 + //SERVICE9 补料 + //SERVICE4 海关验货 + //SERVICE3 报检 + //SERVICE6 商检验货 + //ISBOOKING 订舱 + //SERVICE1 换单 + //SERVICE5 流程服务 + //ISHBLNO 舱单 + //ISLAND 待发账单 + //SERVICE2 报关 + //ISSTORAGE 待发FINAL + //SERVICE10 VGM + //ISAGENT 使用代理 + //ISFUMIGATION 待发DRAFT + + //已补料 已截VGM 已舱单 已订舱 已放舱 退舱 + if (oldhead.SERVICE9 == false && head.SERVICE9 == true) + { + BasicDataRefDAL.OP_STATUSHelper.已补料(username, head.BSNO); + } + if (oldhead.SERVICE9 == true && head.SERVICE9 == false) + { + BasicDataRefDAL.OP_STATUSHelper.del补料(username, head.BSNO); + } + + if (oldhead.SERVICE10 == false && head.SERVICE10 == true) + { + BasicDataRefDAL.OP_STATUSHelper.已截VGM(username, head.BSNO); + } + if (oldhead.SERVICE10 == true && head.SERVICE10 == false) + { + BasicDataRefDAL.OP_STATUSHelper.del截VGM(username, head.BSNO); + } + + if (oldhead.ISHBLNO == false && head.ISHBLNO == true) + { + BasicDataRefDAL.OP_STATUSHelper.已舱单(username, head.BSNO); + } + if (oldhead.ISHBLNO == true && head.ISHBLNO == false) + { + BasicDataRefDAL.OP_STATUSHelper.del舱单(username, head.BSNO); + } + + if (oldhead.ISBOOKING == false && head.ISBOOKING == true) + { + BasicDataRefDAL.OP_STATUSHelper.已订舱(username, head.BSNO); + } + if (oldhead.ISBOOKING == true && head.ISBOOKING == false) + { + BasicDataRefDAL.OP_STATUSHelper.del订舱(username, head.BSNO); + } + + bool is放舱(MsOpSeae opseae) { + var result = ( + string.IsNullOrWhiteSpace(head.ORDERNO) + && string.IsNullOrWhiteSpace(head.VESSEL) + && string.IsNullOrWhiteSpace(head.VOYNO) + && string.IsNullOrWhiteSpace(head.MBLNO) + && string.IsNullOrWhiteSpace(head.CLOSEDOCDATE) + && string.IsNullOrWhiteSpace(head.VGM_TIME) + + ); + return result; + } + + + if (is放舱(oldhead) == false && is放舱(head) == true) + { + BasicDataRefDAL.OP_STATUSHelper.已放舱(username, head.BSNO); + } + if (is放舱(oldhead) == true && is放舱(head) == false) + { + BasicDataRefDAL.OP_STATUSHelper.del放舱(username, head.BSNO); + } + + if (oldhead.ISINSPECTION == false && head.ISINSPECTION == true) + { + BasicDataRefDAL.OP_STATUSHelper.退舱(username, head.BSNO); + } + + } + public static string ToDBC(string input) { char[] c = input.ToCharArray(); diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs index 59a02cad..f283c26b 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs @@ -33,6 +33,7 @@ using static DSWeb.Areas.CommMng.DAL.BasicDataRefDAL; using DSWeb.Common.DB; using System.Linq; using DSWeb.SoftMng.DAL; +using DSWeb.WorkFlow; namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE { @@ -3681,14 +3682,7 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE return result; } - //2 看该客户目前是否欠费 如无直接可放 - result = 是否存在欠费_票结前期(head); - if (result.Success == false) - { - result.OK(); - return result; - } - + //20230601 改为先看本票是否欠费 //3 本票业务是否欠费 result = 本票是否欠费(head); if (!result.Success) return result;//出错返回报错 @@ -3699,6 +3693,15 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE //result.Success = false; return result; } + + //2 看该客户目前是否欠费 如无直接可放 + result = 是否存在欠费_票结前期(head); + if (result.Success == false) + { + result.OK(); + return result; + } + //本票无欠费 继续走逻辑 //如果是“最后一单” 即:这票业务是 未签出的业务当中ATD(ETD)最晚的 @@ -3877,6 +3880,37 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE return result; } + /// + /// 判断该业务能否执行[取消提单签出] + /// + /// + /// + /// + public static DBResult CanUNFDTZ(string BSNO, string USERNAME) + { + //20230207 增加判断 该单是否能够签出 + + var result = new DBResult(); + result.OK(); + + var _recount = 0; + var headList = GetDataList(" B.BSNO in (" + BSNO + ") ", 0, 999, out _recount); + + if (headList != null && headList.Count > 0) { + foreach (var item in headList) { + if (!BLSTATUSTYPE.CanUNFDTZ(item.BLSTATUS)) { + result.SetErrorInfo($"{item.MBLNO}业务状态【{item.BLSTATUS}】,不能取消放单通知"); + return result; + } + } + } + + + return result; + } + + + /// /// GID是特殊放单申请op_blissueList的GID,形如R2300727 /// 来自 @@ -4410,6 +4444,93 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE #endregion + #region 判断能否在提单管理界面做提单签出 + /// + /// + /// + /// + /// + /// + public static DBResult CanDoCheckOut(string BSNO, string USERNAME) + { + + var result = new DBResult(); + result.OK(); + + result = 是否全部特放审核通过(BSNO); + if (result.Success) return result; + + var _recount = 0; + var headList = GetDataList(" B.BSNO in (" + BSNO + ") ", 0, 999, out _recount); + + var cdc = new CommonDataContext(); + + + if (headList != null && headList.Count > 0) + { + var blissueGIDList = headList.Select(s => s.GID).ToList(); + + var worklogList = cdc.WorkLog.Where(x => blissueGIDList.Contains(x.BSNO)).ToList(); + + foreach (var item in headList) + { + if (item.BLSTATUS==BLSTATUSTYPE.扣单) + { + result.SetErrorInfo($"{item.MBLNO}业务状态【{item.BLSTATUS}】,不能做提单签出"); + return result; + } + + var _worklog = worklogList.Where(x => x.BSNO == item.GID).ToList(); + + //如果 + result = 判断日志能否签出(_worklog); + if (!result.Success) { + return result; + } + } + } + + return result; + } + + public static DBResult 判断日志能否签出(List worklogList) + { + var result = new DBResult(); + + result.OK(); + + if (worklogList == null || worklogList.Count == 0) + { + result.SetErrorInfo("无提单签入数据,无法签出"); + return result; + } + else { + var 签入count = worklogList.Where(x => x.ACTNAME == "提单签入").Count(); + var 签出count = worklogList.Where(x => x.ACTNAME == "提单签出").Count(); + var 取消签入count = worklogList.Where(x => x.ACTNAME == "取消签入").Count(); + var 取消签出count = worklogList.Where(x => x.ACTNAME == "取消签出").Count(); + + + + if (签入count == 0) + { + result.SetErrorInfo("无提单签入数据,无法签出"); + return result; + } + + if (签入count- 取消签入count == 签出count- 取消签出count) + { + result.SetErrorInfo("签入与签出次数一致,无法进行一次提单签出"); + return result; + } + } + + return result; + } + + #endregion + + #region 附件处理 #region FileList diff --git a/DSWeb/Areas/MvcShipping/Models/MsOp_BLISSUE/MsOp_BLISSUE.cs b/DSWeb/Areas/MvcShipping/Models/MsOp_BLISSUE/MsOp_BLISSUE.cs index e7d711b9..08573426 100644 --- a/DSWeb/Areas/MvcShipping/Models/MsOp_BLISSUE/MsOp_BLISSUE.cs +++ b/DSWeb/Areas/MvcShipping/Models/MsOp_BLISSUE/MsOp_BLISSUE.cs @@ -992,6 +992,18 @@ namespace DSWeb.MvcShipping.Models.MsOp_BLISSUE } } + public static bool CanUNFDTZ(string BLSTATUS) + { + if (BLSTATUS == BLSTATUSTYPE.放单通知 || BLSTATUS == BLSTATUSTYPE.已放货) + {//BLSTATUS == BLSTATUSTYPE.提单签入 || + return true; + } + else + { + return false; + } + } + public static bool 已放货或已放单(string BLSTATUS) { if (BLSTATUS == BLSTATUSTYPE.提单签出 || BLSTATUS == BLSTATUSTYPE.已放货) { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeFeeIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeFeeIndex.js index 36668278..5ead6ab0 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeFeeIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeFeeIndex.js @@ -14290,14 +14290,44 @@ Ext.extend(Shipping.MsOpSeaeFeeIndex, Ext.Panel, { var bodyAddDatas = []; _this = this; + var _bsno = ""; for (var i = 0; i < selections.length; i++) { var rec = selections[i]; - if (rec.data.BLISSUESTATUS != '可放单') { - Ext.Msg.show({ title: Zi.LAN.TiShi, msg: '提单号:' + rec.data.MBLNO + ',只有已放单通知的正本提单,才允许取消放单通知!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); - return; - } + //if (rec.data.BLISSUESTATUS != '可放单') { + // Ext.Msg.show({ title: Zi.LAN.TiShi, msg: '提单号:' + rec.data.MBLNO + ',只有已放单通知的正本提单,才允许取消放单通知!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + // return; + //} + if (_bsno != "") _bsno = _bsno + ","; + _bsno += "'" + rec.data.BSNO + "'"; bodyAddDatas.push(rec); } + + Ext.Ajax.request({ + waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, + url: '/MvcShipping/MsOp_BLISSUE/CanUnDoFDTZ', + async: false, + params: { + BSNO: _bsno + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (result.Success == false) { + + Ext.Msg.show({ + title: '提示', + msg: result.Message, + icon: Ext.MessageBox.ERROR, + buttons: Ext.Msg.OK + }); + return; + } else { + + } + } + } + }); + var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); Ext.Ajax.request({ waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js index d31d1382..78eb790b 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js @@ -14634,26 +14634,30 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { var bodyAddDatas = []; _this = this; + var _bsno = ""; for (var i = 0; i < selections.length; i++) { var rec = selections[i]; - if (rec.data.BLISSUESTATUS != '可放单') { - Ext.Msg.show({ title: Zi.LAN.TiShi, msg: '提单号:' + rec.data.MBLNO + ',只有已放单通知的正本提单,才允许取消放单通知!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); - return; - } + //if (rec.data.BLISSUESTATUS != '可放单') { + // Ext.Msg.show({ title: Zi.LAN.TiShi, msg: '提单号:' + rec.data.MBLNO + ',只有已放单通知的正本提单,才允许取消放单通知!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + // return; + //} + if (_bsno != "") _bsno = _bsno + ","; + _bsno += "'" + rec.data.BSNO + "'"; bodyAddDatas.push(rec); } - var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); + Ext.Ajax.request({ waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, - url: '/MvcShipping/MsOp_BLISSUE/UNFDTZ', + url: '/MvcShipping/MsOp_BLISSUE/CanUNFDTZ', + async: false, params: { - USERID: USERID, - data: jsonbodyAddDatas + BSNO: _bsno }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); - if (!result.Success) { + if (result.Success==false) { + Ext.Msg.show({ title: '提示', msg: result.Message, @@ -14662,25 +14666,51 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { }); return; } else { - this.storeList.reload(); - Ext.Msg.show({ - title: '提示', - msg: result.Message, - icon: Ext.MessageBox.ERROR, - buttons: Ext.Msg.OK - }); - return; + //执行放单通知取消 + var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); + Ext.Ajax.request({ + waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, + url: '/MvcShipping/MsOp_BLISSUE/UNFDTZ', + params: { + USERID: USERID, + data: jsonbodyAddDatas + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (!result.Success) { + Ext.Msg.show({ + title: '提示', + msg: result.Message, + icon: Ext.MessageBox.ERROR, + buttons: Ext.Msg.OK + }); + return; + } else { + this.storeList.reload(); + Ext.Msg.show({ + title: '提示', + msg: result.Message, + icon: Ext.MessageBox.ERROR, + buttons: Ext.Msg.OK + }); + return; + } + //this.onRefreshClick(); + } + }, + failure: function (response, options) { + Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + }, + success: function (response, options) { }, + scope: this + }); //end Ext.Ajax.request + + } - //this.onRefreshClick(); } - }, - failure: function (response, options) { - Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); - }, - success: function (response, options) { }, - scope: this - }); //end Ext.Ajax.request - + } + }); }, diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpStatus/MsOpStatusIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpStatus/MsOpStatusIndex.js index cd04cf0c..41f52635 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpStatus/MsOpStatusIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpStatus/MsOpStatusIndex.js @@ -79,7 +79,7 @@ Ext.extend(Shipping.MsOpStatusIndex, Ext.Panel, { this.storeList = Ext.create('Ext.data.Store', { pageSize: this.PageSize, model: 'MsOpStatus', - remoteSort: true, + remoteSort: false, proxy: { type: 'ajax', url: '/MvcShipping/MsOpStatus/GetListData', @@ -111,6 +111,16 @@ Ext.extend(Shipping.MsOpStatusIndex, Ext.Panel, { header: '业务状态', editor: this.comboxOPSTATUS, width: 120 + }, { + sortable: true, + dataIndex: 'ISCOMP', + header: '是否完成', + width: 60, + renderer: function (value, cellmeta) { + if (value == '1') { + return "完成"; + } else return ""; + } }, { sortable: true, dataIndex: 'COMPTIME', diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js index d4821632..36e0641c 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js @@ -3955,7 +3955,7 @@ Ext.extend(Shipping.MsOp_BLISSUEIndex, Ext.Panel, { Ext.Ajax.request({ waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, - url: '/MvcShipping/MsOp_BLISSUE/CanCheckOut', + url: '/MvcShipping/MsOp_BLISSUE/CanDoCheckOut', async: false, params: { BSNO: BSNO @@ -3964,88 +3964,13 @@ Ext.extend(Shipping.MsOp_BLISSUEIndex, Ext.Panel, { if (success) { var result = Ext.JSON.decode(response.responseText); if (!result.Success) { - //Ext.Msg.show({ - // title: '提示', - // msg: result.Message, - // icon: Ext.MessageBox.ERROR, - // buttons: Ext.Msg.OK - //}); - - if (result.Message.indexOf("此票被财务扣单")) { - Ext.Msg.show({ - title: '提示', - msg: result.Message, - icon: Ext.MessageBox.ERROR, - buttons: Ext.Msg.OK - }); - } else { + Ext.Msg.show({ + title: '提示', + msg: result.Message, + icon: Ext.MessageBox.ERROR, + buttons: Ext.Msg.OK + }); - Ext.MessageBox.confirm(Zi.LAN.JingGao, result.Message, function (btn) { - - if (btn == 'yes') { - - Ext.Ajax.request({ - waitMsg: '正在提交数据...', - url: '/MvcShipping/MsOp_BLISSUE/GetBLINFO2', - async: false, - params: { - BSNO: BSNO - }, - callback: function (options, success, response) { - if (success) { - - var result = Ext.JSON.decode(response.responseText); - if (result.Success) { - var _html = _this.getFDINFO(result); - FDFINFO.update(_html); - //alert(Ext.getCmp("FDINFO").html); - } else { - //return; - } - } else { - Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); - return; - } - }, - scope: this - }); - - var jsonBody = ConvertRecordsToJsonAll(_this.QCLIST); - Ext.Ajax.request({ - waitMsg: '正在锁定...', - url: '/MvcShipping/MsOp_BLISSUE/ISFDTZ', - params: { - data: jsonBody - }, - callback: function (options, success, response) { - if (success) { - var result = Ext.JSON.decode(response.responseText); - if (!result.Success) { - - Ext.MessageBox.confirm('提示', '操作没有通知放单,是否继续?', function (btn) { - if (btn == 'yes') { - - Ext.getCmp('REASON').setValue(''); - _this.winQCShow.show(); - } - }, this); - } else { - - - Ext.getCmp('REASON').setValue(''); - _this.winQCShow.show(); - - } - - } else { - Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); - } - }, - scope: this - }); - } - }); - } } else { @@ -4380,6 +4305,60 @@ Ext.extend(Shipping.MsOp_BLISSUEIndex, Ext.Panel, { }); //end Ext.Ajax.request } + , onUnKDClick: function () { + + //this.onSaveClick(); + + var selections = this.gridList.getSelectionModel().getSelection(); + + var bodyList = []; + var _bsno = ""; + var _linkgid = ""; + for (i = 0; i < selections.length; i += 1) { + var member = selections[i]; + bodyList.push(member); + }; + + if (bodyList.length > 0) { + _bsno = bodyList[0].data.BSNO; + _linkgid = bodyList[0].data.GID; + } + + var jsonBody = ConvertRecordsToJsonAll(bodyList); + + if (jsonBody == '') { + return; + } + + Ext.Ajax.request({ + waitMsg: '正在提交数据...', + url: '/MvcShipping/MsOp_BLISSUE/KD', + params: { + USERID: USERID, + data: jsonBody + }, + callback: function (options, success, response) { + if (success) { + //this.winQCShow.close(); + //Ext.getCmp("REASON").setValue(""); + this.onRefreshClick(); + + this.storeLog.load({ + params: { + condition: " (BSNO='" + _linkgid + "' or BSNO in(select linkgid from op_blissuelist_detail where BSNO='" + _bsno + "'))" + } + }); + + } + }, + failure: function (response, options) { + Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + }, + success: function (response, options) { }, + scope: this + }); //end Ext.Ajax.request + } + //#region 废弃的旧流程 , onSQQRClick: function () { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEIndex.js index 9a3c5841..77e9f26b 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEIndex.js @@ -2704,55 +2704,42 @@ Ext.extend(Shipping.MsOp_BLISSUEIndex, Ext.Panel, { for (i = 0; i < selections.length; i += 1) { var member = selections[i]; - //20230530 改为通过后台判断能否签出 - //if ((member.data.ISSUETYPE == "正本" && member.data.ISQR == "1") || member.data.ISSUETYPE != "正本") { - // if (member.data.TSFD != "" && member.data.TSFD != "审核通过") { - // // alert("提单号" + member.data.BLNO + " 已做特殊放单申请,还未审批通过,不能直接进行提单签出。"); - // Ext.Msg.show({ title: '提示', msg: "提单号" + member.data.BLNO + " 已做特殊放单申请,还未审批通过,不能直接进行提单签出。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); - // return; - // } - // // else if (member.data.TSFD != "" && member.data.TSFD == "审核通过" && member.data.ISCHAOQI == "是" && member.data.MNGBLSTATUS != "审核通过" && member.data.CUSTCARGOAFTER!="有") { - // // Ext.Msg.show({ title: '提示', msg: "提单号" + member.data.BLNO + " 已做特殊放单申请,存在超期欠费,必须经理复核通过才能提单签出。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); - // // return; - // // } - - // else { - - // if ((member.data.BLSTATUS == "" && (member.data.ISSUETYPE == "正本" || (member.data.ISSUETYPE != "正本" && member.data.ISSUETYPE != ""))) - // || member.data.BLSTATUS == "可放单" || member.data.BLSTATUS == "提单签入") { - - // if (CUSTOMERNAME == "") { - // CUSTOMERNAME = member.data.CUSTOMERNAME; - // ETD = member.data.ETD; - // VESSEL = member.data.VESSEL; - // VOYNO = member.data.VOYNO; - // this.QCLIST.push(member); - // } else if (CUSTOMERNAME == member.data.CUSTOMERNAME - // && VESSEL == member.data.VESSEL - // && VOYNO == member.data.VOYNO) { - - // this.QCLIST.push(member); - // } else { - // Ext.Msg.show({ title: '提示', msg: "只能同时签出相同委托单位、相同船名航次的提单。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); - // } - // } else - // if (member.data.BLSTATUS == "提单签出") { - // Ext.Msg.show({ title: '提示', msg: "注意不可重复签出。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); - // //bodyList.push(member); - // } else - // if (member.data.BLSTATUS == "扣单") { - // Ext.Msg.show({ title: '提示', msg: "注意已经扣单,不能签出。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); - // //bodyList.push(member); - // } else if (member.data.BLSTATUS == "驳回放单通知") { - // Ext.Msg.show({ title: '提示', msg: "注意已经驳回放单通知,不能签出,请申请特放。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); - // //bodyList.push(member); - // } - // } - //} else { - - // Ext.MessageBox.alert("提示", "此票未做签入,请先做签入才能签出"); - //} - this.QCLIST.push(member); + if ((member.data.ISSUETYPE == "正本") || member.data.ISSUETYPE != "正本") { + if (member.data.TSFD != "" && member.data.TSFD != "审核通过") { + // alert("提单号" + member.data.BLNO + " 已做特殊放单申请,还未审批通过,不能直接进行提单签出。"); + Ext.Msg.show({ title: '提示', msg: "提单号" + member.data.BLNO + " 已做特殊放单申请,还未审批通过,不能直接进行提单签出。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + } } + + else { + + if ((member.data.BLSTATUS == "" && (member.data.ISSUETYPE == "正本" || (member.data.ISSUETYPE != "正本" && member.data.ISSUETYPE != ""))) + || member.data.BLSTATUS == "可放单" || member.data.BLSTATUS == "已放货" || member.data.BLSTATUS == "提单签入" || member.data.BLSTATUS == "状态更改" || member.data.ISGAIQIAN == "1") { + + if (this.QCMUSTQR == 1 && member.data.QRDATE == '') { + Ext.Msg.show({ title: '提示', msg: "必须先签入才能签出!", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + + } else { + this.QCLIST.push(member); + } + + } else + if (member.data.BLSTATUS == "提单签出") { + Ext.Msg.show({ title: '提示', msg: "注意不可重复签出。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + //bodyList.push(member); + } else + if (member.data.BLSTATUS == "扣单") { + Ext.Msg.show({ title: '提示', msg: "注意已经扣单,不能签出。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + //bodyList.push(member); + } else if (member.data.BLSTATUS == "驳回放单通知") { + Ext.Msg.show({ title: '提示', msg: "注意已经驳回放单通知,不能签出,请申请特放。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + //bodyList.push(member); + } + } + } else { + + // Ext.MessageBox.alert("提示", "此票未做签入,请先做签入才能签出"); + } }; //var jsonBody = ConvertRecordsToJsonAll(bodyList); @@ -2762,7 +2749,7 @@ Ext.extend(Shipping.MsOp_BLISSUEIndex, Ext.Panel, { } else { var BSNO = ""; var FDFINFO = Ext.getCmp("FDINFO"); - FDFINFO.update("正在载入信息"); + FDFINFO.update("正在载入信息.."); //Ext.getCmp("IS欠费超期").setText(""); //Ext.getCmp("IS累计欠费").setText(""); @@ -2775,109 +2762,64 @@ Ext.extend(Shipping.MsOp_BLISSUEIndex, Ext.Panel, { } Ext.Ajax.request({ - waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, - url: '/MvcShipping/MsOp_BLISSUE/CanCheckOut', + waitMsg: '正在提交数据...', + url: '/MvcShipping/MsOp_BLISSUE/GetBLINFO2', async: false, params: { BSNO: BSNO }, + callback: function (options, success, response) { + if (success) { + + var result = Ext.JSON.decode(response.responseText); + if (result.Success) { + var _html = this.getFDINFO(result); + FDFINFO.update(_html); + //alert(Ext.getCmp("FDINFO").html); + } else { + //return; + } + } else { + Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + return; + } + }, + scope: this + }); + + var jsonBody = ConvertRecordsToJsonAll(this.QCLIST); + Ext.Ajax.request({ + waitMsg: '正在锁定...', + url: '/MvcShipping/MsOp_BLISSUE/ISFDTZ', + params: { + data: jsonBody + }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (!result.Success) { - //Ext.Msg.show({ - // title: '提示', - // msg: result.Message, - // icon: Ext.MessageBox.ERROR, - // buttons: Ext.Msg.OK - //}); - - if (result.Message.indexOf("此票被财务扣单")) { - Ext.Msg.show({ - title: '提示', - msg: result.Message, - icon: Ext.MessageBox.ERROR, - buttons: Ext.Msg.OK - }); - } else { - Ext.MessageBox.confirm(Zi.LAN.JingGao, result.Message, function (btn) { - - if (btn == 'yes') { - - Ext.Ajax.request({ - waitMsg: '正在提交数据...', - url: '/MvcShipping/MsOp_BLISSUE/GetBLINFO2', - async: false, - params: { - BSNO: BSNO - }, - callback: function (options, success, response) { - if (success) { - - var result = Ext.JSON.decode(response.responseText); - if (result.Success) { - var _html = this.getFDINFO(result); - FDFINFO.update(_html); - //alert(Ext.getCmp("FDINFO").html); - } else { - //return; - } - } else { - return; - } - }, - scope: this - }); - - this.winQCShow.show(); - } - }); - } - } - else { - - Ext.Ajax.request({ - waitMsg: '正在提交数据...', - url: '/MvcShipping/MsOp_BLISSUE/GetBLINFO2', - async: false, - params: { - BSNO: BSNO - }, - callback: function (options, success, response) { - if (success) { - - var result = Ext.JSON.decode(response.responseText); - if (result.Success) { - var _html = this.getFDINFO(result); - FDFINFO.update(_html); - //alert(Ext.getCmp("FDINFO").html); - } else { - //return; - } - } else { - return; - } - }, - scope: this - }); + Ext.MessageBox.confirm('提示', '操作没有通知放单,是否继续?', function (btn) { + if (btn == 'yes') { + + Ext.getCmp('REASON').setValue(''); + _this.winQCShow.show(); + } + }, this); + } else { - this.winQCShow.show(); + + Ext.getCmp('REASON').setValue(''); + _this.winQCShow.show(); } + } else { - Ext.Msg.show({ - title: '提示', - msg: result.Message, - icon: Ext.MessageBox.ERROR, - buttons: Ext.Msg.OK - }); + Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } - } + }, + scope: this }); - - - } }