diff --git a/DSWeb/Areas/MvcShipping/Controllers/BillCheckOutController.cs b/DSWeb/Areas/MvcShipping/Controllers/BillCheckOutController.cs index 19c588c7..7cf8b519 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/BillCheckOutController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/BillCheckOutController.cs @@ -292,14 +292,18 @@ namespace DSWeb.MvcShipping.Controllers } cdc.BillCheckOut.RemoveRange(oldhead); - cdc.SaveChanges(); - } + + + if (olddetail != null) + { + cdc.BillCheckOut_Detail.RemoveRange(olddetail); + + } - if (olddetail != null) - { - cdc.BillCheckOut_Detail.RemoveRange(olddetail); cdc.SaveChanges(); } + + } catch (Exception e) { jsonRespose.Success = false; @@ -391,6 +395,12 @@ namespace DSWeb.MvcShipping.Controllers var username = Convert.ToString(Session["SHOWNAME"]); + if (username == "") + { + result.SetErrorInfo("登录信息丢失,请尝试重新登陆"); + return BasicDataRefDAL.GetContentResult(result); + } + result = BillCheckOutDAL.SaveSignPdf(GID, Base64Str, path, username); diff --git a/DSWeb/Areas/MvcShipping/DAL/BillCheckOut/BillCheckOutDAL.cs b/DSWeb/Areas/MvcShipping/DAL/BillCheckOut/BillCheckOutDAL.cs index bfa06a07..2e5f4227 100644 --- a/DSWeb/Areas/MvcShipping/DAL/BillCheckOut/BillCheckOutDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/BillCheckOut/BillCheckOutDAL.cs @@ -376,6 +376,7 @@ namespace DSWeb.MvcShipping.DAL.BillCheckOut head.ISCHECKOUT = true; head.CHECKOUTUSER=username; head.CHECKOUTTIME=DateTime.Now; + //head.SIGNPDFURL = location; cdc.BillCheckOut.AddOrUpdate(head); cdc.SaveChanges(); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/BillCheckOut/BillCheckOutEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/BillCheckOut/BillCheckOutEdit.js index 317344ef..3e45b1d1 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/BillCheckOut/BillCheckOutEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/BillCheckOut/BillCheckOutEdit.js @@ -324,6 +324,18 @@ Ext.extend(Shipping.BillCheckOutEdit, Ext.Panel, { id: "formINSIGN", name: 'INSIGN', hidden: true, value:false + }, { + fieldLabel: 'CHECKOUTUSER', + hidden: true, + name: 'CHECKOUTUSER' + }, { + fieldLabel: 'CHECKOUTTIME', + hidden: true, + name: 'CHECKOUTTIME' + }, { + fieldLabel: 'SENDTIME', + hidden: true, + name: 'SENDTIME' } ] }, { @@ -444,7 +456,17 @@ Ext.extend(Shipping.BillCheckOutEdit, Ext.Panel, { this.OpenSign(); }, scope: this - }] + } + + //, '-', { + // text: "测试设置签出", + // hidden:false, + // handler: function (button, event) { + // this.TestQC(); + // }, + // scope: this + //} + ] }); //end 按钮Toolbar //#region 签单条明细 @@ -563,7 +585,15 @@ Ext.extend(Shipping.BillCheckOutEdit, Ext.Panel, { ] }); + this.gridBodyList.addListener('itemdblclick', function (dataview, record, item, index, e, b) { + this.SelectedRecord = record; + var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 750) / 2 + ",Left= " + (screen.width - 1100) / 2 + var openType = "_blank"; + var openUrl = ""; + openUrl = "../../MvcShipping/MsOpBill/MsOpFeeView?handle=check&bsno=" + record.data.BSNO; + window.open(openUrl, openType, openSet); + }, this); //#endregion @@ -2330,6 +2360,8 @@ Ext.extend(Shipping.BillCheckOutEdit, Ext.Panel, { this.formHead.getForm().reset(); this.formHead.getForm().setValues(data); + + //this.formEdit.getForm().reset(); //this.formEdit.getForm().setValues(data); this.GetEditStatus(); @@ -3237,7 +3269,7 @@ Ext.extend(Shipping.BillCheckOutEdit, Ext.Panel, { resultData = result.Data; - condition = "GID='" + resultData.GID + "'"; + condition = " GID='" + resultData.GID + "' "; this.opStatus = "edit"; this.LoadData(this.opStatus, condition); @@ -3254,6 +3286,7 @@ Ext.extend(Shipping.BillCheckOutEdit, Ext.Panel, { } , DoSend: function () { + _this = this; if (this.opStatus == 'add') { Ext.Msg.show({ title: '错误', msg: "请先保存签单业务", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); return; @@ -3297,7 +3330,7 @@ Ext.extend(Shipping.BillCheckOutEdit, Ext.Panel, { condition = "GID='" + GID + "'"; - this.LoadData(this.opStatus, condition); + _this.LoadData('edit', condition); MsgTip("提示", "发送成功", 1000); DelayEnable(SendBtn, 5000); @@ -3330,7 +3363,7 @@ Ext.extend(Shipping.BillCheckOutEdit, Ext.Panel, { var _this = this; - var data = this.formHead.getForm().getValues(false, false, false); + var data = this.formHead.getForm().getValues(); if (data.SENDED != true) { Ext.Msg.show({ title: '错误', msg: "只有发出之后的签单条才能签字", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); @@ -3541,6 +3574,8 @@ Ext.extend(Shipping.BillCheckOutEdit, Ext.Panel, { if (jsonresult.Success) { MsgTip("提示", "保存完成", 1200); Ext.getCmp("formISCHECKOUT").setValue(true); + _condition = " GID='" + GID + "'"; + _this.LoadData(this.opStatus, condition); } else { Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); } @@ -3600,6 +3635,40 @@ Ext.extend(Shipping.BillCheckOutEdit, Ext.Panel, { } + + , TestQC() { + + GID = Ext.getCmp("formGID").getValue(); + + Ext.Msg.wait('正在保存数据, 请稍侯..'); + Ext.Ajax.request({ + waitMsg: '正在保存数据...', + url: '/MvcShipping/BillCheckOut/TestCheckOut', + scope: this, + params: { + GID: GID + }, + callback: function (options, success, response) { + if (success) { + Ext.MessageBox.hide(); + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + MsgTip("提示", "保存完成", 1200); + } else { + Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + } + } else { + Ext.Msg.show({ + title: '请重试', + msg: '服务器响应出错', + icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK + }); + } + + } + }); + + } }); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/BillCheckOut/BillCheckOutModel.js b/DSWeb/Areas/MvcShipping/Viewsjs/BillCheckOut/BillCheckOutModel.js index cf31b954..cf637b23 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/BillCheckOut/BillCheckOutModel.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/BillCheckOut/BillCheckOutModel.js @@ -30,7 +30,8 @@ Ext.define('VWBillCheckOutDetailModel', { fields: [ { name: 'GID', type: 'string' }, // { name: 'CHECKOUTNO', type: 'string' }, // - { name: 'LINKGID', type: 'string' }, // + { name: 'LINKGID', type: 'string' }, + { name: 'BSNO', type: 'string' },// { name: 'MBLNO', type: 'string' }, // { name: 'HBLNO', type: 'string' }, { name: 'ETD', type: 'string' }, //