diff --git a/BookingJieFeng/BookingJieFeng.csproj.user b/BookingJieFeng/BookingJieFeng.csproj.user index 620a7c78..a7beae18 100644 --- a/BookingJieFeng/BookingJieFeng.csproj.user +++ b/BookingJieFeng/BookingJieFeng.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU FolderProfile diff --git a/BookingWeb/BookingWeb.csproj.user b/BookingWeb/BookingWeb.csproj.user index 416a30e1..4ea3c326 100644 --- a/BookingWeb/BookingWeb.csproj.user +++ b/BookingWeb/BookingWeb.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs index 1c8da761..d90d5749 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs @@ -2214,20 +2214,22 @@ namespace DSWeb.MvcShipping.Controllers { // - if (loglist.Exists(x => x.ACTNAME == "取消扣单")) { + if (loglist.Exists(x => x.ACTNAME == "取消扣单" || x.ACTNAME == "放单通知")) + { - var 最后取消扣单的时间Str = loglist.Where(x => x.ACTNAME == "取消扣单").Max(x => x.OPDATE); + var 最后取消扣单的时间Str = loglist.Where(x => x.ACTNAME == "取消扣单"|| x.ACTNAME == "放单通知").Max(x => x.OPDATE); var 最后取消扣单的时间 = Convert.ToDateTime(最后取消扣单的时间Str); - if (loglist.Exists(x => x.ACTNAME == "扣单" && Convert.ToDateTime(x.OPDATE)> 最后取消扣单的时间)) { + if (loglist.Exists(x => x.ACTNAME == "扣单" && Convert.ToDateTime(x.OPDATE) > 最后取消扣单的时间)) + { //如果有晚于最后一次取消扣单的扣单 那还是扣单状态 result.SetErrorInfo("目前处于扣单状态"); return result; - } + } } else - { + { result.SetErrorInfo("目前处于扣单状态"); return result; } diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs index 888d8baa..58f55954 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs @@ -1161,8 +1161,47 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE return result; } + /// + /// 取消签入 + /// + /// + /// + /// + /// public static DBResult UnQR ( List _List, string USERID,string username) //签入_撤回 { + + //20231121 增加判断 防止在未签入的情况下 执行 取消签出动作 + //防止多余的 取消签入 影响提单签出状态的判断 + //返回true即为可以取消签入 + bool 判断能否取消签入(MsOp_BLISSUEmb _p) + { + var condition = $" (BSNO='{_p.GID}' or BSNO in(select linkgid from op_blissuelist_detail where BSNO='{_p.BSNO}'))"; + + var loglist = Areas.OA.DAL.WorkFlow.WorkLogDAL.GetWorkLog(condition, null); + + var 提单签入count = 0; + var 提单签出count = 0; + + foreach (var log in loglist) + { + if (log.ACTNAME == "提单签入") 提单签入count++; + if (log.ACTNAME == "取消签入") 提单签入count--; + if (log.ACTNAME == "提单签出") 提单签出count++; + if (log.ACTNAME == "取消签出") 提单签出count--; + } + + if (提单签入count <= 提单签出count) + { + return false; + } + else + { + return true; + } + } + + //var WorkFlowName = "MsOp_BLISSUE_IN"; Database db = DatabaseFactory.CreateDatabase(); var result = new DBResult(); @@ -1177,6 +1216,8 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE foreach (var _bill in _List) { + if (!判断能否取消签入(_bill)) continue; + //Resultmb WorkResult = WorkFlowDAL.WorkFlowReset(WorkFlowName, _bill.GID, USERID); //if (WorkResult.Success == true) @@ -2110,6 +2151,7 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE foreach (var _bill in _List) { + //Resultmb WorkResult = WorkFlowDAL.WorkFlowReset(WorkFlowName, _bill.GID, USERID); @@ -4911,17 +4953,17 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE } else { - SqlParameter[] updateParms = new SqlParameter[] { - new SqlParameter("@FILENAME",SqlDbType.VarChar) - + SqlParameter[] updateParms = new SqlParameter[] { + new SqlParameter("@FILENAME",SqlDbType.VarChar), + new SqlParameter("@GID",SqlDbType.VarChar) }; - updateParms[0].Value = fileEntity.GID; - updateParms[1].Value = tempBSNO; - updateParms[2].Value = fileEntity.UPLOADEMPLY; - updateParms[3].Value = fileEntity.UPLOADDATE; - updateParms[4].Value = fileEntity.FILENAME; - + updateParms[1].Value = fileEntity.GID; + //updateParms[1].Value = tempBSNO; + //updateParms[2].Value = fileEntity.UPLOADEMPLY; + //updateParms[3].Value = fileEntity.UPLOADDATE; + updateParms[0].Value = fileEntity.FILENAME; + //updateParms[5].Value = fileEntity.FILETYPE; SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, SQL_UPDATE, updateParms); } } diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js index b9dc097e..1b4adc23 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js @@ -1857,6 +1857,7 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { //单证 this.comboxDoc = Ext.create('DsExt.ux.RefTableCombox', { + hidden:true, fieldLabel: Zi.LAN.DOC, //'单证 单 证', store: this.storeDoc, forceSelection: true, @@ -1984,6 +1985,8 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { proxy: { url: '/CommMng/BasicDataRef/GetCodeLoadportListRm' } }); this.comboxPORTLOAD = Ext.create('DsExt.ux.RefTableCombox', { + hidden: true, + flex: 1, fieldLabel: Zi.LAN.PORTLOAD, //'装货港', store: this.storeCodeLoadport, name: 'PORTLOAD', @@ -2124,6 +2127,7 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { this.storeISEI = GetPublicStore('ISEI'); this.comboxISEI = Ext.create('DsExt.ux.RefTableCombox', { + hidden:true, fieldLabel: Zi.LAN.ISEI, //'委托分公司', store: this.storeISEI, forceSelection: true, @@ -2305,15 +2309,50 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { defaultType: 'textfield', items: [ - this.comboxISEI, - this.comboxPORTLOAD, - this.comboxDoc, + this.comboxISEI,//hidden 1.2 + this.comboxPORTLOAD,//1 + this.comboxDoc,//0.8 //this.comboxISCANCEL, + //{ + // xtype: 'hiddenfield', + // flex: 1.9, + // scope: this + //} + { + fieldLabel: '箱号', //'编号', + name: 'CNTRNO', + labelWidth: 30, + flex: 0.6, + enableKeyEvents: true, + listeners: { + specialkey: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } + } + }, { xtype: 'hiddenfield', - flex: 1.9, + flex: 1, scope: this - }, { + }, + { + xtype: 'hiddenfield', + flex: 1, + scope: this + }, + { + xtype: 'hiddenfield', + flex: 1, + scope: this + }, + { + xtype: 'hiddenfield', + flex: 1.3, + scope: this + }, + { xtype: 'hidden', flex: 0.4, scope: this @@ -3466,7 +3505,7 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { this.panelTop = new Ext.Panel({ layout: "border", region: "north", - height: 96, + height: 123, items: [this.panelBtn, this.formSearch] }); @@ -9064,6 +9103,11 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { var ISEI = form.findField('ISEI').getValue(); sql = sql + getAndConSql(sql, ISEI, "ISEI = '" + ISEI + "'"); + + var CNTRNO = form.findField('CNTRNO').getValue(); + sql = sql + getAndConSql(sql, CNTRNO, "exists(select 1 from op_ctn where bsno=B.bsno and cntrno like '%" + CNTRNO + "')"); + + //var ISCANCEL = form.findField('ISCANCEL').getValue(); //if (ISCANCEL) { // if (ISCANCEL == "-1") { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeSaleIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeSaleIndex.js index 54b960c5..a2220569 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeSaleIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeSaleIndex.js @@ -1608,24 +1608,47 @@ Ext.extend(Shipping.MsOpSeaeSaleIndex, Ext.Panel, { scope: this }] } - - - , { - xtype: 'container', - layout: 'hbox', - defaultType: 'textfield', - items: [ - this.comboxISEI, this.comboxSaleCompany, this.comboxDept, { xtype: 'hiddenfield', flex: 2 }, { xtype: 'hiddenfield', flex: 0.8} - ] - }, { - xtype: 'container', - layout: 'hbox', - defaultType: 'textfield', - items: [ - - ] + + , { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [ + this.comboxISEI, this.comboxSaleCompany, this.comboxDept + //, { xtype: 'hiddenfield', flex: 2 } + , { + fieldLabel: '参考号', + name: 'SERVICECONTRACTNO', + enableKeyEvents: true, + listeners: { + specialkey: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } } + }, { + fieldLabel: '箱号', + name: 'CNTRNO', + enableKeyEvents: true, + listeners: { + specialkey: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } + } + } + , { xtype: 'hiddenfield', flex: 0.8 } + ] + }, { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [ + ] + } ]//end items(fieldset 1) }]//end root items @@ -1833,7 +1856,7 @@ Ext.extend(Shipping.MsOpSeaeSaleIndex, Ext.Panel, { this.panelTop = new Ext.Panel({ layout: "border", region: "north", - height: 71, + height: 105, items: [this.panelBtn, this.formSearch] }); @@ -2804,6 +2827,13 @@ Ext.extend(Shipping.MsOpSeaeSaleIndex, Ext.Panel, { var ISEI = form.findField('ISEI').getValue(); sql = sql + getAndConSql(sql, ISEI, "B.ISEI = '" + ISEI + "'"); + + var SERVICECONTRACTNO = form.findField('SERVICECONTRACTNO').getValue(); + sql = sql + getAndConSql(sql, SERVICECONTRACTNO, "B.SERVICECONTRACTNO = '" + SERVICECONTRACTNO + "'"); + + var CNTRNO = form.findField('CNTRNO').getValue(); + sql = sql + getAndConSql(sql, CNTRNO, "exists(select 1 from op_ctn where bsno=B.bsno and cntrno like '%" + CNTRNO + "')"); + // //代理 // var AGENTID = form.findField('AGENTID').getValue(); // sql = sql + getAndConSql(sql, AGENTID, "B.AGENTID='" + AGENTID + "'"); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js index 466d92b2..1982543d 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js @@ -3374,7 +3374,6 @@ Ext.extend(Shipping.MsOp_BLISSUEIndex, Ext.Panel, { } this.onQrShow(jsonBody); - } , onQrShow: function (jsonBody) { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUESPEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUESPEdit.js index e59796d1..e8bcbd86 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUESPEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUESPEdit.js @@ -2969,59 +2969,75 @@ Ext.extend(Shipping.MsOp_BLISSUESPEdit, Ext.Panel, { , onPostFileClick: function (button, event) { var billno = this.formEdit.getForm().findField('GID').value; - var bodyDatas = []; - var i; - for (i = 0; i < this.storeDocList.getCount(); i += 1) { - var memberyf = this.storeDocList.getAt(i); - bodyDatas.push(memberyf); + if (!billno) { + Ext.Msg.show({ + title: '警告', + msg: '请先保存业务', + icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK + }); - var FILENAME = memberyf.data.FILENAME; - if (FILENAME == '') { - Ext.Msg.show({ title: '警告', - msg: '文件名称不能为空', - icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK - }); + return; + } + else + { - return; - } + var bodyDatas = []; + var i; - }; - var jsonBody = ConvertRecordsToJsonAll(bodyDatas); + for (i = 0; i < this.storeDocList.getCount(); i += 1) { + var memberyf = this.storeDocList.getAt(i); + bodyDatas.push(memberyf); + var FILENAME = memberyf.data.FILENAME; + if (FILENAME == '') { + Ext.Msg.show({ + title: '警告', + msg: '文件名称不能为空', + icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK + }); - _this = this; - Ext.Msg.wait('正在保存数据, 请稍侯..'); - Ext.Ajax.request({ - waitMsg: '正在保存数据...', - url: '/MvcShipping/MsOp_BLISSUE/SaveFile', - scope: this, - params: { - bsno: billno, - body: jsonBody - }, - callback: function (options, success, response) { - if (success) { - Ext.MessageBox.hide(); - var jsonresult = Ext.JSON.decode(response.responseText); - if (jsonresult.Success) { - for (var i = 0; i < this.storeDocList.getCount(); i += 1) { - var member = this.storeDocList.getAt(i); - member.set("PID", billno); - member.commit(); - } + return; + } + + }; + var jsonBody = ConvertRecordsToJsonAll(bodyDatas); + + + _this = this; + Ext.Msg.wait('正在保存数据, 请稍侯..'); + Ext.Ajax.request({ + waitMsg: '正在保存数据...', + url: '/MvcShipping/MsOp_BLISSUE/SaveFile', + scope: this, + params: { + bsno: billno, + body: jsonBody + }, + callback: function (options, success, response) { + if (success) { + Ext.MessageBox.hide(); + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + for (var i = 0; i < this.storeDocList.getCount(); i += 1) { + var member = this.storeDocList.getAt(i); + member.set("PID", billno); + member.commit(); + } + } else { + Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + } } else { - Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + Ext.Msg.show({ + title: '请重试', + msg: '服务器响应出错', + icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK + }); } - } else { - Ext.Msg.show({ title: '请重试', - msg: '服务器响应出错', - icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK - }); } - } - }); + }); + } } //end save , onDelFileClick: function (button, event) { diff --git a/DSWeb/Web.config b/DSWeb/Web.config index 3b9d5d32..e3e6ee67 100644 --- a/DSWeb/Web.config +++ b/DSWeb/Web.config @@ -90,14 +90,14 @@ --> - - --> - + +