diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpLetter/MsOpLetterTruckView.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpLetter/MsOpLetterTruckView.js index 6d679ec0..7e348e46 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpLetter/MsOpLetterTruckView.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpLetter/MsOpLetterTruckView.js @@ -794,6 +794,14 @@ Ext.extend(Shipping.MsOpLetterTruckView, Ext.Panel, { this.CancelPc(); }, scope: this + }, { + text: "删除派车", + id: 'btnDelPc', + + handler: function (button, event) { + this.DeletePc(); + }, + scope: this }] }); //end 按钮Toolbar //#endregion @@ -1313,6 +1321,48 @@ Ext.extend(Shipping.MsOpLetterTruckView, Ext.Panel, { //#endregion //#region 派车 + DeletePc: function () { + + var TRUCKSTATUS = this.formEdit.getForm().findField('TRUCKSTATUS').getValue(); + if (TRUCKSTATUS != '已派车' && TRUCKSTATUS != '已发单') { + Ext.Msg.show({ title: '提示', msg: '当前状态,不允许删除派车!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + + } + + var data = this.formHead.getForm().getValues(false, false, false); + + + // + Ext.Msg.wait('正在保存数据, 请稍侯..'); + Ext.Ajax.request({ + waitMsg: '正在保存数据...', + url: '/MvcShipping/MsOpLetter/Delete', + scope: this, + params: { + data: Ext.JSON.encode(data) + }, + callback: function (options, success, response) { + if (success) { + Ext.MessageBox.hide(); + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + 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 }); + } + } else { + Ext.Msg.show({ + title: '请重试', + msg: '服务器响应出错', + icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK + }); + } + } + }); + }, //end save + + CancelPc: function () { var TRUCKSTATUS = this.formEdit.getForm().findField('TRUCKSTATUS').getValue(); @@ -1430,6 +1480,7 @@ Ext.extend(Shipping.MsOpLetterTruckView, Ext.Panel, { //var bsStatus = this.formHead.getForm().findField('BSSTATUS').getValue(); var TRUCKSTATUS = this.formEdit.getForm().findField('TRUCKSTATUS').getValue(); + var btnDelPc = Ext.getCmp('btnDelPc'); _this = this; if (TRUCKSTATUS == '待派车' || TRUCKSTATUS == '已派车') { @@ -1438,6 +1489,11 @@ Ext.extend(Shipping.MsOpLetterTruckView, Ext.Panel, { } else { this.setSaveBtnStatus(true); } + if (TRUCKSTATUS == '待派车') { + btnDelPc.enable(); + } else { + btnDelPc.disable(); + } }, diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js index c103c7f0..b5b33645 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js @@ -13672,7 +13672,11 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { data = result.data; this.LoadInit(data); - + data.REEFERF2 = data.REEFERF; + data.TEMPSET2 = data.TEMPSET; + data.TEMPID2 = data.TEMPID; + data.TEMPMAX2 = data.TEMPMAX; + data.TEMPMIN2 = data.TEMPMIN; this.formHead.getForm().reset(); this.formHead.getForm().setValues(data); @@ -13683,11 +13687,11 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { this.formMBL.getForm().reset(); this.formMBL.getForm().setValues(data); - this.formEdit.getForm().findField('REEFERF2').setValue(data.REEFERF); - this.formEdit.getForm().findField('TEMPSET2').setValue(data.TEMPSET); - this.formEdit.getForm().findField('TEMPID2').setValue(data.TEMPID); - this.formEdit.getForm().findField('TEMPMAX2').setValue(data.TEMPMAX); - this.formEdit.getForm().findField('TEMPMIN2').setValue(data.TEMPMIN); + //this.formEdit.getForm().findField('REEFERF2').setValue(data.REEFERF); + //this.formEdit.getForm().findField('TEMPSET2').setValue(data.TEMPSET); + //this.formEdit.getForm().findField('TEMPID2').setValue(data.TEMPID); + //this.formEdit.getForm().findField('TEMPMAX2').setValue(data.TEMPMAX); + //this.formEdit.getForm().findField('TEMPMIN2').setValue(data.TEMPMIN); if (data.CUSTOMERNAME != '') { var sql = " CUSTNAME='" + data.CUSTOMERNAME + "'"; @@ -14444,6 +14448,12 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { var returnData = jsonresult.Data; + returnData.REEFERF2 = returnData.REEFERF; + returnData.TEMPSET2 = returnData.TEMPSET; + returnData.TEMPID2 = returnData.TEMPID; + returnData.TEMPMAX2 = returnData.TEMPMAX; + returnData.TEMPMIN2 = returnData.TEMPMIN; + this.formEdit.getForm().reset(); this.formEdit.getForm().setValues(returnData); this.formHead.getForm().reset(); @@ -14453,11 +14463,11 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { this.formMBL.getForm().reset(); this.formMBL.getForm().setValues(returnData); this.Editdata = returnData; - this.formEdit.getForm().findField('REEFERF2').setValue(returnData.REEFERF); - this.formEdit.getForm().findField('TEMPSET2').setValue(returnData.TEMPSET); - this.formEdit.getForm().findField('TEMPID2').setValue(returnData.TEMPID); - this.formEdit.getForm().findField('TEMPMAX2').setValue(returnData.TEMPMAX); - this.formEdit.getForm().findField('TEMPMIN2').setValue(returnData.TEMPMIN); + //this.formEdit.getForm().findField('REEFERF2').setValue(returnData.REEFERF); + //this.formEdit.getForm().findField('TEMPSET2').setValue(returnData.TEMPSET); + //this.formEdit.getForm().findField('TEMPID2').setValue(returnData.TEMPID); + //this.formEdit.getForm().findField('TEMPMAX2').setValue(returnData.TEMPMAX); + //this.formEdit.getForm().findField('TEMPMIN2').setValue(returnData.TEMPMIN); // if (this.opStatus == 'add') { diff --git a/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs b/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs index a4f6453a..d5266b5b 100644 --- a/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs +++ b/DSWeb/Areas/TruckMng/Controllers/PcHeadEdit_WFSDController.cs @@ -294,14 +294,23 @@ namespace DSWeb.Areas.TruckMng.Controllers } public ContentResult SaveHYRD(string opstatus, string data, string ctnbody, - string fixbody, string fixdelbody) + string fixbody, string fixdelbody,string createpc="0") { + + var headData = JsonConvert.Deserialize(data); var bodyctnData = JsonConvert.Deserialize>(ctnbody); var fixBodyList = JsonConvert.Deserialize>(fixbody); var fixBodyDelList = JsonConvert.Deserialize>(fixdelbody); + if ((createpc=="1")&&(!string.IsNullOrEmpty(headData.Property))) + { + var jsonRespose2 = new JsonResponse { Success = false, Message = "已生成派车,不允许重复生成!" }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; + + } + //var fixBodyDelList = JsonConvert.Deserialize>(fixdelbody); var isPost = true; @@ -348,6 +357,13 @@ namespace DSWeb.Areas.TruckMng.Controllers } var BSNO = headData.gId; + if (createpc == "1") { + var GId = "PC" + Guid.NewGuid().ToString("N").ToUpper(); + headData.Property = GId; + + + } + if (isPost) { @@ -357,6 +373,51 @@ namespace DSWeb.Areas.TruckMng.Controllers { MsRptPcHeadEditDAL.SaveFixFee(headData.gId, fixBodyList); MsRptPcHeadEditDAL.SaveCtnDetail(headData.gId, bodyctnData, Convert.ToString(Session["USERID"])); + if (createpc == "1") + { + + var billnoset = MsSysBillNoSetDAL.GetData("OPLBNAME='陆运'", Convert.ToString(Session["COMPANYID"])); + billnoset.BILLTYPE = "0111"; + billnoset.RULEDATETYPE = "业务日期"; + var bsdate = headData.ExpDate; + if (bsdate == "" || bsdate == null) + bsdate = DateTime.Now.ToString("yyyy-MM-dd"); + + headData.BillNo = MsSysBillNoSetDAL.GetBillNo(billnoset, bsdate, DateTime.Now.ToString("yyyy-MM")); //获取合同号 + + headData.OrgCode = CookieConfig.GetCookie_OrgCode(Request); + + headData.DbOperationType = DbOperationType.DbotIns; + headData.TRANSSTATUS = "新建"; + headData.BsType = ""; + headData.gId = "PC" + Guid.NewGuid().ToString("N").ToUpper(); + headData.PGid = headData.gId; + + if (!string.IsNullOrEmpty(headData.LrDate)) + { + headData.LrDate = headData.LrDate.Substring(0, 10); + } + else + { + var currentTime = System.DateTime.Now; + headData.LrDate = currentTime.ToString("d"); + } + + var modb2 = new ModelObjectDB(); + result = modb2.Save(headData); + if (result.Success) + { + result.Message = "生成成功!"; + + } + else + { + result.Message = "生成失败"; + + } + } + + } else { @@ -376,6 +437,69 @@ namespace DSWeb.Areas.TruckMng.Controllers return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; } } + + + public ContentResult CreateHYRDPc(string bsno) + { + + var headData = MsRptPcHeadEditDAL.GetWFSDData("GID='" + bsno + "'"); + if (!string.IsNullOrEmpty(headData.Property)) { + var jsonRespose2 = new JsonResponse { Success = false, Message = "已生成派车,不允许重复生成!" }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; + + } + + var billnoset = MsSysBillNoSetDAL.GetData("OPLBNAME='陆运'", Convert.ToString(Session["COMPANYID"])); + billnoset.BILLTYPE = "0111"; + billnoset.RULEDATETYPE = "业务日期"; + var bsdate = headData.ExpDate; + if (bsdate == "" || bsdate == null) + bsdate = DateTime.Now.ToString("yyyy-MM-dd"); + + headData.BillNo = MsSysBillNoSetDAL.GetBillNo(billnoset, bsdate, DateTime.Now.ToString("yyyy-MM")); //获取合同号 + + headData.OrgCode = CookieConfig.GetCookie_OrgCode(Request); + + headData.DbOperationType = DbOperationType.DbotIns; + headData.TRANSSTATUS = "新建"; + headData.BsType = ""; + headData.gId= "PC" + Guid.NewGuid().ToString("N").ToUpper(); + headData.PGid = headData.gId; + + if (!string.IsNullOrEmpty(headData.LrDate)) + { + headData.LrDate = headData.LrDate.Substring(0, 10); + } + else + { + var currentTime = System.DateTime.Now; + headData.LrDate = currentTime.ToString("d"); + } + + var BSNO = headData.gId; + + var modb = new ModelObjectDB(); + DBResult result = modb.Save(headData); + if (result.Success) + { + result.Message = "生成成功!"; + + } + else { + result.Message = "生成失败"; + + } + + var jsonRespose = new JsonResponse + { + Success = result.Success, + Message = result.Message + }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; + + + } + public ContentResult SaveQDLH(string opstatus, string data, string ctnbody) { diff --git a/DSWeb/Areas/TruckMng/DAL/MsRptPcHeadEdit/MsRptPcHeadEditDAL.cs b/DSWeb/Areas/TruckMng/DAL/MsRptPcHeadEdit/MsRptPcHeadEditDAL.cs index f6acf913..d607665d 100644 --- a/DSWeb/Areas/TruckMng/DAL/MsRptPcHeadEdit/MsRptPcHeadEditDAL.cs +++ b/DSWeb/Areas/TruckMng/DAL/MsRptPcHeadEdit/MsRptPcHeadEditDAL.cs @@ -1757,6 +1757,202 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit return result; } + + #region 明细表 + + static public List GetBodyList(string strCondition) + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append("BillNo,SerialNo,CreditDebit,"); + strSql.Append("(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=99020 and EnumValueID=tMsWlPcFixed.CreditDebit) as CreditDebit_Ref"); + strSql.Append(",FeeTypeCode,"); + strSql.Append("(select Name from vMsTruckFeeType where FeeCode=tMsWlPcFixed.FeeTypeCode) as FeeTypeCode_Ref"); + strSql.Append(",FeeTypeName,DistCount,Price,FsTotal,JsTotal,Remark,GId"); + strSql.Append(",FeeStatus,"); + strSql.Append("(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=99024 and EnumValueID=tMsWlPcFixed.FeeStatus) as FeeStatus_Ref"); + strSql.Append(",SubmitDate,Auditoperator,AuditDate,AuditStatus"); + strSql.Append(" from tMsWlPcFixed "); + + if (strCondition.Trim() != String.Empty) + { + strSql.Append(" where " + strCondition); + } + + return SetBodyData(strSql); + } + + private static List SetBodyData(StringBuilder strSql) + { + var bodyList = new List(); + Database db = DatabaseFactory.CreateDatabase(); + using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString())) + { + while (reader.Read()) + { + MsWlPcFixed data = new MsWlPcFixed(); + #region Set DB data to Object + data.BillNo = Convert.ToString(reader["BillNo"]); + data.SerialNo = Convert.ToDecimal(reader["SerialNo"]); + data.CreditDebit = Convert.ToString(reader["CreditDebit"]); + data.CreditDebit_Ref = Convert.ToString(reader["CreditDebit_Ref"]); + data.FeeTypeCode = Convert.ToString(reader["FeeTypeCode"]); + data.FeeTypeCode_Ref = Convert.ToString(reader["FeeTypeCode_Ref"]); + data.FeeTypeName = Convert.ToString(reader["FeeTypeName"]); + data.DistCount = Convert.ToDecimal(reader["DistCount"]); + data.Price = Convert.ToDecimal(reader["Price"]); + data.FsTotal = Convert.ToDecimal(reader["FsTotal"]); + data.JsTotal = Convert.ToDecimal(reader["JsTotal"]); + data.Remark = Convert.ToString(reader["Remark"]); + data.GId = Convert.ToString(reader["GId"]); + data.FeeStatus = Convert.ToDecimal(reader["FeeStatus"]); + data.FeeStatus_Ref = Convert.ToString(reader["FeeStatus_Ref"]); + if (reader["SubmitDate"] != DBNull.Value) + data.SubmitDate = Convert.ToDateTime(reader["SubmitDate"]); + data.Auditoperator = Convert.ToString(reader["Auditoperator"]); + if (reader["AuditDate"] != DBNull.Value) + data.AuditDate = Convert.ToDateTime(reader["AuditDate"]); + data.AuditStatus = Convert.ToDecimal(reader["AuditStatus"]); + #endregion + + bodyList.Add(data); + } + reader.Close(); + } + + return bodyList; + } + + public static DBResult SaveDetail(string billno, List bodyList, string userid) + { + var result = new DBResult(); + + Database db = DatabaseFactory.CreateDatabase(); + using (var conn = db.CreateConnection()) + { + conn.Open(); + var tran = conn.BeginTransaction(); + + try + { + var cmdInsert = + db.GetSqlStringCommand( + @"insert into tMsWlPcFixed (GID,BillNo,SerialNo,CreditDebit,FeeTypeCode,FeeTypeName,DistCount,Price,FsTotal,JsTotal,Remark,FeeStatus) + values (@GID,@BillNo,@SerialNo,@CreditDebit,@FeeTypeCode,@FeeTypeName,@DistCount,@Price,@FsTotal,@JsTotal,@Remark,@FeeStatus) "); + + var cmdUpdate = + db.GetSqlStringCommand( + @"update tMsWlPcFixed set SerialNo=@SerialNo,CreditDebit=@CreditDebit,FeeTypeCode=@FeeTypeCode,FeeTypeName=@FeeTypeName,DistCount=@DistCount,Price=@Price,FsTotal=@FsTotal + ,JsTotal=@JsTotal,Remark=@Remark,FeeStatus=@FeeStatus where GID=@GID"); + + + + if (bodyList != null) + { + foreach (var enumValue in bodyList) + { + + if (enumValue.BillNo == "*") + { + cmdInsert.Parameters.Clear(); + + db.AddInParameter(cmdInsert, "@GID", DbType.String, enumValue.GId); + db.AddInParameter(cmdInsert, "@BillNo", DbType.String, billno); + db.AddInParameter(cmdInsert, "@SerialNo", DbType.String, enumValue.SerialNo); + db.AddInParameter(cmdInsert, "@CreditDebit", DbType.String, enumValue.CreditDebit); + db.AddInParameter(cmdInsert, "@FeeTypeCode", DbType.String, enumValue.FeeTypeCode); + db.AddInParameter(cmdInsert, "@FeeTypeName", DbType.String, enumValue.FeeTypeName); + db.AddInParameter(cmdInsert, "@DistCount", DbType.Decimal, enumValue.DistCount); + db.AddInParameter(cmdInsert, "@Price", DbType.Decimal, enumValue.Price); + db.AddInParameter(cmdInsert, "@FsTotal", DbType.Decimal, enumValue.FsTotal); + db.AddInParameter(cmdInsert, "@JsTotal", DbType.Decimal, enumValue.JsTotal); + db.AddInParameter(cmdInsert, "@Remark", DbType.String, enumValue.Remark); + db.AddInParameter(cmdInsert, "@FeeStatus", DbType.Decimal, enumValue.FeeStatus); + db.ExecuteNonQuery(cmdInsert, tran); + } + else + { + cmdUpdate.Parameters.Clear(); + + db.AddInParameter(cmdUpdate, "@GID", DbType.String, enumValue.GId); + db.AddInParameter(cmdUpdate, "@BillNo", DbType.String, billno); + db.AddInParameter(cmdUpdate, "@SerialNo", DbType.String, enumValue.SerialNo); + db.AddInParameter(cmdUpdate, "@CreditDebit", DbType.String, enumValue.CreditDebit); + db.AddInParameter(cmdUpdate, "@FeeTypeCode", DbType.String, enumValue.FeeTypeCode); + db.AddInParameter(cmdUpdate, "@FeeTypeName", DbType.String, enumValue.FeeTypeName); + db.AddInParameter(cmdUpdate, "@DistCount", DbType.Decimal, enumValue.DistCount); + db.AddInParameter(cmdUpdate, "@Price", DbType.Decimal, enumValue.Price); + db.AddInParameter(cmdUpdate, "@FsTotal", DbType.Decimal, enumValue.FsTotal); + db.AddInParameter(cmdUpdate, "@JsTotal", DbType.Decimal, enumValue.JsTotal); + db.AddInParameter(cmdUpdate, "@Remark", DbType.String, enumValue.Remark); + db.AddInParameter(cmdUpdate, "@FeeStatus", DbType.Decimal, enumValue.FeeStatus); + db.ExecuteNonQuery(cmdUpdate, tran); + + } + } + } + + tran.Commit(); + } + catch (Exception) + { + tran.Rollback(); + + result.Success = false; + result.Message = "保存出现错误,请重试或联系系统管理员"; + + return result; + } + } + + result.Success = true; + result.Message = "保存成功"; + + return result; + } + + + public static DBResult DeleteDetail(string GID) + { + var result = new DBResult(); + + Database db = DatabaseFactory.CreateDatabase(); + using (var conn = db.CreateConnection()) + { + conn.Open(); + var tran = conn.BeginTransaction(); + + try + { + + var cmd = db.GetSqlStringCommand("delete from tMsWlPcFixed where GID='" + GID + "'"); + db.ExecuteNonQuery(cmd, tran); + + + + tran.Commit(); + } + catch (Exception) + { + tran.Rollback(); + + result.Success = false; + result.Message = "保存出现错误,请重试或联系系统管理员"; + + return result; + } + } + + result.Success = true; + result.Message = "保存成功"; + + return result; + } + + + + #endregion + public static DBResult MakeFee(MsWlPcHead_WFSDEdit headData,string USERID) { var result = new DBResult(); diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_HYRDIndex.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_HYRDIndex.js index ba7c4ff5..67d4ab8d 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_HYRDIndex.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_HYRDIndex.js @@ -27,6 +27,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { }); this.selectGid = ''; + _this = this; Ext.define('PCmb', { extend: 'Ext.data.Model', @@ -130,6 +131,16 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { { name: 'WmsTruckNo', type: 'string' }, { name: 'WmsDrvName', type: 'string' }, { name: 'ChangedReson', type: 'string' }, + { name: 'LoadFactory', type: 'string' }, + { name: 'DrvCode', type: 'string' }, + { name: 'EtDateSe', type: 'string' }, + { name: 'ContainerNo', type: 'string' }, + { name: 'SealNo', type: 'string' }, + { name: 'YardCodeSe', type: 'string' }, + { name: 'YardNameSe', type: 'string' }, + { name: 'DstAreaSe', type: 'string' }, + { name: 'SealNoSe', type: 'string' }, + { name: 'ContainerTypeSe', type: 'string' }, { name: 'CargoID', type: 'string' } ] @@ -735,7 +746,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { }, { sortable: true, - dataIndex: 'DetiNationSe', + dataIndex: 'FactoryAddrSe', header: '工厂地址', width: 80 // , @@ -1105,7 +1116,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { } , this.comboxPCSTATUS, { fieldLabel: '工厂地点', - name: 'DetiNationSe', + name: 'FactoryAddrSe', enableKeyEvents: true, listeners: { specialkey: function (field, e) { @@ -1655,7 +1666,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { Ext.apply(store.proxy.extraParams, { condition: this.fensql }); }, this); this.storeListNofen.on('beforeload', function (store) { - Ext.apply(store.proxy.extraParams, { condition: " t.BLTYPE='派车分票' AND (t.GID=t.PGID OR t.PGID='' OR t.PGID IS NULL) and (isend=0 or isend is null) " }); + Ext.apply(store.proxy.extraParams, { condition: " BsType<>'装箱' and t.BLTYPE='派车分票' AND (t.GID=t.PGID OR t.PGID='' OR t.PGID IS NULL) and (isend=0 or isend is null) " }); }, this); @@ -1856,10 +1867,11 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { }); + }, //end initUIComponents LoadInitData: function () { //this.storeTruckNo.load({ params: { condition: " A.truckno not in (select DISTINCT truckno from tMsWlPcHead where isnull(isend,0)=0 ) "} }); - var sql = " (t.GID=t.PGID OR t.PGID='' OR t.PGID IS NULL) and (isend=0 or isend is null) and (datediff(month,ExpDate,getdate())=0 or ExpDate is null or ExpDate='1900-01-01 00:00:00.000' ) "; + var sql = " t.BsType<>'装箱' and (t.GID=t.PGID OR t.PGID='' OR t.PGID IS NULL) and (isend=0 or isend is null) and (datediff(month,ExpDate,getdate())=0 or ExpDate is null or ExpDate='1900-01-01 00:00:00.000' ) "; this.storeList.load({ params: { start: 0, limit: this.PageSize, condition: sql }, @@ -1869,7 +1881,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { }, onAuditRefuseClick: function (button, event) { - var sql = " A.GID in (select bsno from ch_fee where FEESTATUS=6)"; + var sql = " BsType<>'装箱' and A.GID in (select bsno from ch_fee where FEESTATUS=6)"; this.storeList.load({ params: { start: 0, limit: this.PageSize, condition: sql }, @@ -2105,7 +2117,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { // var sql = " (t.GID=t.PGID OR t.PGID='' OR t.PGID IS NULL) "; // var sql = " (t.GID=t.PGID OR t.PGID='' OR t.PGID IS NULL) "; - var sql = ""; + var sql = " BsType<>'装箱' "; /* var sqldata = form.getValues(); sql = Ext.JSON.encode(sqldata); @@ -2117,8 +2129,8 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { var drvName = form.findField('PS_DRVNAME').getValue(); sql = sql + getAndConSql(sql, drvName, " (DrvName like '%" + drvName + "%' or DrvCode ='" + drvName + "') "); - var DstArea = form.findField('DetiNationSe').getValue(); - sql = sql + getAndConSql(sql, DstArea, " (DetiNationSe like '%" + DstArea + "%' ) "); + var DstArea = form.findField('FactoryAddrSe').getValue(); + sql = sql + getAndConSql(sql, DstArea, " (FactoryAddrSe like '%" + DstArea + "%' ) "); // var VoyVeg = form.findField('VoyVeg').getValue(); // sql = sql + getAndConSql(sql, VoyVeg, " (VoyVeg like '%" + VoyVeg + "%' ) "); diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_ZXIndex.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_ZXIndex.js index a306953d..267f7d2e 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_ZXIndex.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_ZXIndex.js @@ -130,6 +130,16 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { { name: 'WmsTruckNo', type: 'string' }, { name: 'WmsDrvName', type: 'string' }, { name: 'ChangedReson', type: 'string' }, + { name: 'LoadFactory', type: 'string' }, + { name: 'DrvCode', type: 'string' }, + { name: 'EtDateSe', type: 'string' }, + { name: 'ContainerNo', type: 'string' }, + { name: 'SealNo', type: 'string' }, + { name: 'YardCodeSe', type: 'string' }, + { name: 'YardNameSe', type: 'string' }, + { name: 'DstAreaSe', type: 'string' }, + { name: 'SealNoSe', type: 'string' }, + { name: 'ContainerTypeSe', type: 'string' }, { name: 'CargoID', type: 'string' } ] @@ -735,7 +745,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { }, { sortable: true, - dataIndex: 'DetiNationSe', + dataIndex: 'FactoryAddrSe', header: '工厂地址', width: 80 // , @@ -1105,7 +1115,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { } , this.comboxPCSTATUS, { fieldLabel: '工厂地点', - name: 'DetiNationSe', + name: 'FactoryAddrSe', enableKeyEvents: true, listeners: { specialkey: function (field, e) { @@ -1655,7 +1665,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { Ext.apply(store.proxy.extraParams, { condition: this.fensql }); }, this); this.storeListNofen.on('beforeload', function (store) { - Ext.apply(store.proxy.extraParams, { condition: " t.BLTYPE='派车分票' AND (t.GID=t.PGID OR t.PGID='' OR t.PGID IS NULL) and (isend=0 or isend is null) " }); + Ext.apply(store.proxy.extraParams, { condition: " t.BsType='装箱' and t.BLTYPE='派车分票' AND (t.GID=t.PGID OR t.PGID='' OR t.PGID IS NULL) and (isend=0 or isend is null) " }); }, this); @@ -2117,8 +2127,8 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { var drvName = form.findField('PS_DRVNAME').getValue(); sql = sql + getAndConSql(sql, drvName, " (DrvName like '%" + drvName + "%' or DrvCode ='" + drvName + "') "); - var DstArea = form.findField('DetiNationSe').getValue(); - sql = sql + getAndConSql(sql, DstArea, " (DetiNationSe like '%" + DstArea + "%' ) "); + var DstArea = form.findField('FactoryAddrSe').getValue(); + sql = sql + getAndConSql(sql, DstArea, " (FactoryAddrSe like '%" + DstArea + "%' ) "); // var VoyVeg = form.findField('VoyVeg').getValue(); // sql = sql + getAndConSql(sql, VoyVeg, " (VoyVeg like '%" + VoyVeg + "%' ) "); diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcHYRDEdit.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcHYRDEdit.js index f46b86ad..fbeaf143 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcHYRDEdit.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcHYRDEdit.js @@ -16,7 +16,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { selectPGID: '', initUIComponents: function () { - + this.modPcHeadEdit_GDFY = 0; this.fixSerialNo = 0; this.fixBodyDel = []; this.accdatesameetd = 0; @@ -178,25 +178,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { }); - //客户加载_车队 - this.storeTRUCKER = Ext.create('DsExt.ux.RefTableStore', { - model: 'DsShipping.ux.CustomRefModel', - proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListTRUCK' } - }); - //this.storeTRUCKER.load({ params: { condition: "ISTRUCK='1'"} }); - _thisPc = this; - //车队 - this.comboxTRUCKER = Ext.create('DsExt.ux.RefTableCombox', { - fieldLabel: '车队', - store: this.storeTRUCKER, - queryMode: 'remote', - minChars: 1, - queryParam: 'CODENAME', - name: 'F_CustomerName', - valueField: 'CustName', - displayField: 'CodeAndName' - }); this.StoreBLTYPE = Ext.create('Ext.data.Store', { fields: ['BLTYPE'] @@ -227,18 +209,8 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { name: 'PcBillType' }); - this.StoreTruckTypeProp = Ext.create('DsExt.ux.RefEnumStore', {}); - this.StoreTruckTypeProp.load({ params: { enumTypeId: 97043} }); - this.comboxTruckTypeProp = Ext.create('DsExt.ux.RefEnumCombox', { - fieldLabel: '车辆类别', - store: this.StoreTruckTypeProp, - //flex: 0.5, - // forceSelection: true, - name: 'Property' - }); - this.StoreTruckType = Ext.create('DsExt.ux.RefEnumStore', {}); this.StoreTruckType.load({ params: { enumTypeId: 99019} }); @@ -330,34 +302,14 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { - this.formEdit.getForm().findField('F_CustomerName').setValue(records[0].data.OWNER); +// this.formEdit.getForm().findField('F_CustomerName').setValue(records[0].data.OWNER); } } } }); - //委托单位_联系人 - this.storeInfoClientContact = Ext.create('DsExt.ux.RefTableStore', { - model: 'DsShipping.ux.InfoClientContactModel', - proxy: { url: '/CommMng/BasicDataRef/GetInfoClientContactList' } - }); - this.comboxInfoClientContactYard = Ext.create('DsExt.ux.RefTableCombox', { - fieldLabel: '客户联系人', - store: this.storeInfoClientContact, - name: 'LinkMan', - valueField: 'SHOWNAME', - displayField: 'SHOWNAME', - listeners: { - scope: this, - 'select': function (combo, records, eOpts) { - if (records.length > 0) { - - } - } - } - }); this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.UserRefModel', @@ -481,12 +433,10 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { fieldLabel: '工厂名称', flex: 1, store: this.storeFactry, - hidden: true, - matchFieldWidth: false, //下拉款自适应宽度 queryMode: 'remote', minChars: 1, queryParam: 'CODENAME', - autoSelect: true, +// autoSelect: true, name: 'LoadFactory', valueField: 'FACTRYNAME', displayField: 'CodeAndName', @@ -495,8 +445,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { 'select': function (combo, records, eOpts) { if (records.length > 0) { var dataFactory = records[0].data; - this.formEdit.getForm().findField('CustLikeManName').setValue(dataFactory.FACTRYATTN); - this.formEdit.getForm().findField('LoadPlace').setValue(dataFactory.FACTRYADDR); + this.formEdit.getForm().findField('FactoryAddrSe').setValue(dataFactory.FACTRYADDR); } } } @@ -556,25 +505,20 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { } }); - //客户加载_工厂 - this.storeFactry = Ext.create('DsExt.ux.RefTableStore', { - model: 'MsCodeFactry', - proxy: { url: '/MvcShipping/MsCodeFactry/GetDataListRm' } + + + this.storeCodeCtn = Ext.create('DsExt.ux.RefTableStore', { + model: 'DsShipping.ux.CodeCtnModel', + proxy: { url: '/CommMng/BasicDataRef/GetCodeCtnList' } }); - this.storeFactry.load(); - //工厂 - this.comboxFactory = Ext.create('DsExt.ux.RefTableCombox', { - fieldLabel: '工厂', - flex: 1, - store: this.storeFactry, - matchFieldWidth: false, //下拉款自适应宽度 - queryMode: 'remote', - minChars: 1, - queryParam: 'CODENAME', - autoSelect: true, - name: 'LoadFactory', - valueField: 'FACTRYNAME', - displayField: 'CodeAndName' + this.storeCodeCtn.load(); + this.comboxCTNALL = Ext.create('DsExt.ux.RefTableCombox', { + fieldLabel: '箱型', //'箱型', + store: this.storeCodeCtn, + forceSelection: true, + name: 'ContainerType', + valueField: 'CTN', + displayField: 'CTN' }); @@ -630,7 +574,10 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { name: 'RefBillNo', flex: 0, hidden: true, margins: '0' }, { fieldLabel: 'RefBillNose', name: 'RefBillNose', flex: 0, hidden: true, margins: '0' - }, { fieldLabel: 'FEESTATUS', + }, { + fieldLabel: 'Property', + name: 'Property', flex: 0, hidden: true, margins: '0' + }, { fieldLabel: 'FEESTATUS', name: 'FEESTATUS', flex: 0, hidden: true, margins: '0' }, { fieldLabel: 'BsType', @@ -706,10 +653,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { items: [{ fieldLabel: '主提单号', name: 'MblNoSe' - }, { - fieldLabel: '箱型', - name: 'ContainerType' - }, { + }, this.comboxCTNALL, { fieldLabel: '箱量', name: 'ContainerQty' }, { @@ -833,14 +777,14 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { layout: 'hbox', defaultType: 'textfield', items: [{ - fieldLabel: '派车日期', + fieldLabel: '到厂日期', format: 'Y-m-d', xtype: 'datefield', name: 'ArriveDate' }, this.comboxFactory, { fieldLabel: '工厂地点', flex: 3, - name: 'DetiNationSe' + name: 'FactoryAddrSe' } ] }, { @@ -898,7 +842,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { fieldLabel: '派车要求', height: 80, flex: 3, - name: 'SealNoSe' + name: 'DetiNationSe' }, { fieldLabel: '入库要求', height: 80, @@ -1383,6 +1327,24 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { }, ] }); + Ext.Ajax.request({ + waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, + url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable', + params: { + modulename: 'modPcHeadEdit_GDFY' + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (result.Success) { + this.modPcHeadEdit_GDFY = 1; + } else { + this.modPcHeadEdit_GDFY = 0; + } + } + }, + scope: this + }); //#endregion }, //end initUIComponents @@ -1448,18 +1410,50 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { PGid.setValue(this.selectPGID); if (this.editRecord != NaN && this.editRecord != null) { this.formEdit.getForm().findField('CustomerName').setValue(this.editRecord.get('CustomerName')); - this.formEdit.getForm().findField('LinkMan').setValue(this.editRecord.get('LinkMan')); - this.formEdit.getForm().findField('CustName').setValue(this.editRecord.get('CustName')); - this.formEdit.getForm().findField('DispatchName').setValue(this.editRecord.get('DispatchName')); + this.formEdit.getForm().findField('SalesName').setValue(this.editRecord.get('SalesName')); + this.formEdit.getForm().findField('DdName').setValue(this.editRecord.get('DdName')); + this.formEdit.getForm().findField('YardName').setValue(this.editRecord.get('YardName')); + this.formEdit.getForm().findField('LinkManSe').setValue(this.editRecord.get('LinkManSe')); this.formEdit.getForm().findField('BLTYPE').setValue('派车分票'); - this.formEdit.getForm().findField('DstArea').setValue(this.editRecord.get('DstArea')); - this.formEdit.getForm().findField('DetiNation').setValue(this.editRecord.get('DetiNation')); - this.formEdit.getForm().findField('LoadPlace').setValue(this.editRecord.get('LoadPlace')); + this.formEdit.getForm().findField('LoadFactory').setValue(this.editRecord.get('LoadFactory')); + this.formEdit.getForm().findField('DetiNationSe').setValue(this.editRecord.get('DetiNationSe')); + this.formEdit.getForm().findField('DrvCode').setValue(this.editRecord.get('DrvCode')); this.formEdit.getForm().findField('PcBillType').setValue(this.editRecord.get('PcBillType')); + this.formEdit.getForm().findField('VoyVeg').setValue(this.editRecord.get('VoyVeg')); this.formEdit.getForm().findField('ExpDate').setValue(this.editRecord.get('ExpDate')); - this.formEdit.getForm().findField('ArriveDate').setValue(this.editRecord.get('ArriveDate')); + this.formEdit.getForm().findField('VoyVegSe').setValue(this.editRecord.get('VoyVegSe')); + this.formEdit.getForm().findField('EtDateSe').setValue(this.editRecord.get('EtDateSe')); + this.formEdit.getForm().findField('EndPortDate').setValue(this.editRecord.get('EndPortDate')); + this.formEdit.getForm().findField('EtDate').setValue(this.editRecord.get('EtDate')); + this.formEdit.getForm().findField('MblNoSe').setValue(this.editRecord.get('MblNoSe')); + this.formEdit.getForm().findField('ContainerQty').setValue(this.editRecord.get('ContainerQty')); + this.formEdit.getForm().findField('GoodsName').setValue(this.editRecord.get('GoodsName')); + this.formEdit.getForm().findField('ContainerNoSe').setValue(this.editRecord.get('ContainerNoSe')); + this.formEdit.getForm().findField('ContainerNo').setValue(this.editRecord.get('ContainerNo')); + this.formEdit.getForm().findField('SealNo').setValue(this.editRecord.get('SealNo')); + this.formEdit.getForm().findField('DUNNO').setValue(this.editRecord.get('DUNNO')); + this.formEdit.getForm().findField('DCLASS').setValue(this.editRecord.get('DCLASS')); + this.formEdit.getForm().findField('YardCodeSe').setValue(this.editRecord.get('YardCodeSe')); + this.formEdit.getForm().findField('YardNameSe').setValue(this.editRecord.get('YardNameSe')); + this.formEdit.getForm().findField('ISSHUISHI').setValue(this.editRecord.get('ISSHUISHI')); + this.formEdit.getForm().findField('ISGAOWEN').setValue(this.editRecord.get('ISGAOWEN')); + this.formEdit.getForm().findField('ISXIANLIANG').setValue(this.editRecord.get('ISXIANLIANG')); + this.formEdit.getForm().findField('ISHAIWU').setValue(this.editRecord.get('ISHAIWU')); + this.formEdit.getForm().findField('ISFENGXIANG').setValue(this.editRecord.get('ISFENGXIANG')); + this.formEdit.getForm().findField('ISWEISHENBAO').setValue(this.editRecord.get('ISWEISHENBAO')); + this.formEdit.getForm().findField('ISBAOGUAN').setValue(this.editRecord.get('ISBAOGUAN')); + this.formEdit.getForm().findField('DispatchName').setValue(this.editRecord.get('DispatchName')); this.formEdit.getForm().findField('ReturnDate').setValue(this.editRecord.get('ReturnDate')); - this.formEdit.getForm().findField('TruckNo').setValue(this.editRecord.get('TruckNo')); + this.formEdit.getForm().findField('ISPINGTAI').setValue(this.editRecord.get('ISPINGTAI')); + this.formEdit.getForm().findField('RtnDocTime').setValue(this.editRecord.get('RtnDocTime')); + this.formEdit.getForm().findField('WmsTruckNo').setValue(this.editRecord.get('WmsTruckNo')); + this.formEdit.getForm().findField('WmsDrvName').setValue(this.editRecord.get('WmsDrvName')); + this.formEdit.getForm().findField('ArriveDate').setValue(this.editRecord.get('ArriveDate')); + this.formEdit.getForm().findField('DstAreaSe').setValue(this.editRecord.get('DstAreaSe')); + this.formEdit.getForm().findField('SealNoSe').setValue(this.editRecord.get('SealNoSe')); + this.formEdit.getForm().findField('ContainerTypeSe').setValue(this.editRecord.get('ContainerTypeSe')); + this.formEdit.getForm().findField('Remark').setValue(this.editRecord.get('Remark')); + this.formEdit.getForm().findField('FactoryAddrSe').setValue(this.editRecord.get('FactoryAddrSe')); } } this.LoadPeriod(); @@ -1572,6 +1566,9 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { var data = result.data; + if (opstatus == 'add') { + data.PcBillType = ''; + } this.formEdit.getForm().reset(); @@ -1606,19 +1603,50 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { PGid.setValue(this.selectPGID); if (this.editRecord != NaN && this.editRecord != null) { this.formEdit.getForm().findField('CustomerName').setValue(this.editRecord.get('CustomerName')); - this.formEdit.getForm().findField('F_CustomerName').setValue(this.editRecord.get('F_CustomerName')); - this.formEdit.getForm().findField('LinkMan').setValue(this.editRecord.get('LinkMan')); - this.formEdit.getForm().findField('CustName').setValue(this.editRecord.get('CustName')); - this.formEdit.getForm().findField('DispatchName').setValue(this.editRecord.get('DispatchName')); + this.formEdit.getForm().findField('SalesName').setValue(this.editRecord.get('SalesName')); + this.formEdit.getForm().findField('DdName').setValue(this.editRecord.get('DdName')); + this.formEdit.getForm().findField('YardName').setValue(this.editRecord.get('YardName')); + this.formEdit.getForm().findField('LinkManSe').setValue(this.editRecord.get('LinkManSe')); this.formEdit.getForm().findField('BLTYPE').setValue('派车分票'); - this.formEdit.getForm().findField('DstArea').setValue(this.editRecord.get('DstArea')); - this.formEdit.getForm().findField('DetiNation').setValue(this.editRecord.get('DetiNation')); - this.formEdit.getForm().findField('LoadPlace').setValue(this.editRecord.get('LoadPlace')); + this.formEdit.getForm().findField('LoadFactory').setValue(this.editRecord.get('LoadFactory')); + this.formEdit.getForm().findField('DetiNationSe').setValue(this.editRecord.get('DetiNationSe')); + this.formEdit.getForm().findField('DrvCode').setValue(this.editRecord.get('DrvCode')); this.formEdit.getForm().findField('PcBillType').setValue(this.editRecord.get('PcBillType')); + this.formEdit.getForm().findField('VoyVeg').setValue(this.editRecord.get('VoyVeg')); this.formEdit.getForm().findField('ExpDate').setValue(this.editRecord.get('ExpDate')); - this.formEdit.getForm().findField('ArriveDate').setValue(this.editRecord.get('ArriveDate')); + this.formEdit.getForm().findField('VoyVegSe').setValue(this.editRecord.get('VoyVegSe')); + this.formEdit.getForm().findField('EtDateSe').setValue(this.editRecord.get('EtDateSe')); + this.formEdit.getForm().findField('EndPortDate').setValue(this.editRecord.get('EndPortDate')); + this.formEdit.getForm().findField('EtDate').setValue(this.editRecord.get('EtDate')); + this.formEdit.getForm().findField('MblNoSe').setValue(this.editRecord.get('MblNoSe')); + this.formEdit.getForm().findField('ContainerQty').setValue(this.editRecord.get('ContainerQty')); + this.formEdit.getForm().findField('GoodsName').setValue(this.editRecord.get('GoodsName')); + this.formEdit.getForm().findField('ContainerNoSe').setValue(this.editRecord.get('ContainerNoSe')); + this.formEdit.getForm().findField('ContainerNo').setValue(this.editRecord.get('ContainerNo')); + this.formEdit.getForm().findField('SealNo').setValue(this.editRecord.get('SealNo')); + this.formEdit.getForm().findField('DUNNO').setValue(this.editRecord.get('DUNNO')); + this.formEdit.getForm().findField('DCLASS').setValue(this.editRecord.get('DCLASS')); + this.formEdit.getForm().findField('YardCodeSe').setValue(this.editRecord.get('YardCodeSe')); + this.formEdit.getForm().findField('YardNameSe').setValue(this.editRecord.get('YardNameSe')); + this.formEdit.getForm().findField('ISSHUISHI').setValue(this.editRecord.get('ISSHUISHI')); + this.formEdit.getForm().findField('ISGAOWEN').setValue(this.editRecord.get('ISGAOWEN')); + this.formEdit.getForm().findField('ISXIANLIANG').setValue(this.editRecord.get('ISXIANLIANG')); + this.formEdit.getForm().findField('ISHAIWU').setValue(this.editRecord.get('ISHAIWU')); + this.formEdit.getForm().findField('ISFENGXIANG').setValue(this.editRecord.get('ISFENGXIANG')); + this.formEdit.getForm().findField('ISWEISHENBAO').setValue(this.editRecord.get('ISWEISHENBAO')); + this.formEdit.getForm().findField('ISBAOGUAN').setValue(this.editRecord.get('ISBAOGUAN')); + this.formEdit.getForm().findField('DispatchName').setValue(this.editRecord.get('DispatchName')); this.formEdit.getForm().findField('ReturnDate').setValue(this.editRecord.get('ReturnDate')); - this.formEdit.getForm().findField('TruckNo').setValue(this.editRecord.get('TruckNo')); + this.formEdit.getForm().findField('ISPINGTAI').setValue(this.editRecord.get('ISPINGTAI')); + this.formEdit.getForm().findField('RtnDocTime').setValue(this.editRecord.get('RtnDocTime')); + this.formEdit.getForm().findField('WmsTruckNo').setValue(this.editRecord.get('WmsTruckNo')); + this.formEdit.getForm().findField('WmsDrvName').setValue(this.editRecord.get('WmsDrvName')); + this.formEdit.getForm().findField('ArriveDate').setValue(this.editRecord.get('ArriveDate')); + this.formEdit.getForm().findField('DstAreaSe').setValue(this.editRecord.get('DstAreaSe')); + this.formEdit.getForm().findField('SealNoSe').setValue(this.editRecord.get('SealNoSe')); + this.formEdit.getForm().findField('ContainerTypeSe').setValue(this.editRecord.get('ContainerTypeSe')); + this.formEdit.getForm().findField('Remark').setValue(this.editRecord.get('Remark')); + this.formEdit.getForm().findField('FactoryAddrSe').setValue(this.editRecord.get('FactoryAddrSe')); } } this.LoadPeriod(); @@ -2001,6 +2029,10 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { onAddDetailClick: function (button, event, type) { + if (this.modPcHeadEdit_GDFY == 0) { + Ext.Msg.show({ title: '提示', msg: '没有权限修改费用', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });//当前费用已対帐无法修改! + return; + } var allow = this.getAllowOperationDetail(); if (allow == false) { return; @@ -2075,6 +2107,10 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { }, onDelDetailClick: function (button, event, type) { + if (this.modPcHeadEdit_GDFY == 0) { + Ext.Msg.show({ title: '提示', msg: '没有权限修改费用', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });//当前费用已対帐无法修改! + return; + } var allow = this.getAllowOperationDetail(); if (allow == false) { return; @@ -2106,9 +2142,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { selectedRecords = this.gridListFix.selModel.getSelection(); - var candelete = DsTruck.CheckChFeeDelete(selectedRecords); - if (candelete == false) - return; + if (selectedRecords.length > 0) { for (var i = 0; i < selectedRecords.length; i++) { @@ -2134,6 +2168,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { Ext.Msg.show({ title: '错误', msg: "此票委托已费用已锁定,不允许操作费用!", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); return false; } + }, gridListFixAfterEdit: function (editor, e, eOpts) { @@ -2166,6 +2201,11 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { var feeStatus = this.getFeeStatus(); var billStatus = this.getBillStatus(); var canedit = feeStatus == '0' && billStatus == '0'; + if (this.modPcHeadEdit_GDFY == 0) { + Ext.Msg.show({ title: '提示', msg: '没有权限修改费用', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });//当前费用已対帐无法修改! + + return false; + } return canedit; }, diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js index 66c0b312..3b79d0db 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcWFSDEdit.js @@ -1527,7 +1527,9 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, { var data = result.data; - + if (opstatus == 'add') { + data.PcBillType = ''; + } this.formEdit.getForm().reset(); this.formEdit.getForm().setValues(data); diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcZXEdit.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcZXEdit.js index 9cb6362d..7ee70ee7 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcZXEdit.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcZXEdit.js @@ -20,6 +20,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { this.fixSerialNo = 0; this.fixBodyDel = []; this.accdatesameetd = 0; + this.modPcHeadEdit_GDFY = 0; this.MsPeriod = null; Ext.define('PCmb', { extend: 'Ext.data.Model', @@ -241,25 +242,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { }); - //客户加载_车队 - this.storeTRUCKER = Ext.create('DsExt.ux.RefTableStore', { - model: 'DsShipping.ux.CustomRefModel', - proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListTRUCK' } - }); - //this.storeTRUCKER.load({ params: { condition: "ISTRUCK='1'"} }); - _thisPc = this; - //车队 - this.comboxTRUCKER = Ext.create('DsExt.ux.RefTableCombox', { - fieldLabel: '车队', - store: this.storeTRUCKER, - queryMode: 'remote', - minChars: 1, - queryParam: 'CODENAME', - name: 'F_CustomerName', - valueField: 'CustName', - displayField: 'CodeAndName' - }); this.StoreBLTYPE = Ext.create('Ext.data.Store', { fields: ['BLTYPE'] @@ -290,18 +273,8 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { name: 'PcBillType' }); - this.StoreTruckTypeProp = Ext.create('DsExt.ux.RefEnumStore', {}); - this.StoreTruckTypeProp.load({ params: { enumTypeId: 97043} }); - this.comboxTruckTypeProp = Ext.create('DsExt.ux.RefEnumCombox', { - fieldLabel: '车辆类别', - store: this.StoreTruckTypeProp, - //flex: 0.5, - // forceSelection: true, - name: 'Property' - }); - this.StoreTruckType = Ext.create('DsExt.ux.RefEnumStore', {}); this.StoreTruckType.load({ params: { enumTypeId: 99019} }); @@ -543,7 +516,6 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { fieldLabel: '工厂名称', flex: 1, store: this.storeFactry, - hidden: true, matchFieldWidth: false, //下拉款自适应宽度 queryMode: 'remote', minChars: 1, @@ -557,8 +529,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { 'select': function (combo, records, eOpts) { if (records.length > 0) { var dataFactory = records[0].data; - this.formEdit.getForm().findField('CustLikeManName').setValue(dataFactory.FACTRYATTN); - this.formEdit.getForm().findField('LoadPlace').setValue(dataFactory.FACTRYADDR); + this.formEdit.getForm().findField('FactoryAddrSe').setValue(dataFactory.FACTRYADDR); } } } @@ -618,26 +589,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { } }); - //客户加载_工厂 - this.storeFactry = Ext.create('DsExt.ux.RefTableStore', { - model: 'MsCodeFactry', - proxy: { url: '/MvcShipping/MsCodeFactry/GetDataListRm' } - }); - this.storeFactry.load(); - //工厂 - this.comboxFactory = Ext.create('DsExt.ux.RefTableCombox', { - fieldLabel: '工厂', - flex: 1, - store: this.storeFactry, - matchFieldWidth: false, //下拉款自适应宽度 - queryMode: 'remote', - minChars: 1, - queryParam: 'CODENAME', - autoSelect: true, - name: 'LoadFactory', - valueField: 'FACTRYNAME', - displayField: 'CodeAndName' - }); + this.storeBodyList = Ext.create('Ext.data.Store', { model: 'MsOpSeaeDetail', remoteSort: true, @@ -1153,6 +1105,20 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { items: [this.gridList] }); + this.storeCodeContainerType = Ext.create('DsExt.ux.RefTableStore', { + model: 'DsShipping.ux.CodeCtnModel', + proxy: { url: '/CommMng/BasicDataRef/GetCodeCtnList' } + }); + this.storeCodeContainerType.load(); + this.comboxContainerType = Ext.create('DsExt.ux.RefTableCombox', { + fieldLabel: '箱型', //'箱型', + store: this.storeCodeContainerType, + forceSelection: true, + name: 'ContainerType', + valueField: 'CTN', + displayField: 'CTN' + }); + //编辑form this.formEdit = Ext.widget('form', { region: 'center', @@ -1205,7 +1171,10 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { name: 'RefBillNo', flex: 0, hidden: true, margins: '0' }, { fieldLabel: 'RefBillNose', name: 'RefBillNose', flex: 0, hidden: true, margins: '0' - }, { fieldLabel: 'FEESTATUS', + }, { + fieldLabel: 'Property', + name: 'Property', flex: 0, hidden: true, margins: '0' + }, { fieldLabel: 'FEESTATUS', name: 'FEESTATUS', flex: 0, hidden: true, margins: '0' }, { fieldLabel: 'BsType', @@ -1281,10 +1250,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { items: [{ fieldLabel: '主提单号', name: 'MblNoSe' - }, { - fieldLabel: '箱型', - name: 'ContainerType' - }, { + }, this.comboxContainerType, { fieldLabel: '箱量', name: 'ContainerQty' }, { @@ -1395,7 +1361,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { xtype: 'button', width: 90, handler: function (button, event) { - + this.Save('0', '1'); }, scope: this } @@ -1443,7 +1409,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { }, this.comboxFactory, { fieldLabel: '装箱地点', flex: 3, - name: 'DetiNationSe' + name: 'FactoryAddrSe' } ] }, this.panelBodyCtn,{ @@ -1459,7 +1425,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { fieldLabel: '装箱要求', height: 50, flex: 3, - name: 'SealNoSe' + name: 'DetiNationSe' }, { fieldLabel: '入库要求', height: 50, @@ -1503,7 +1469,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { text: "保存", iconCls: "btnsave", handler: function (button, event) { - this.Save('0'); + this.Save('0','0'); }, scope: this }, @@ -1511,7 +1477,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { id: 'bsbtnSaveAndClose', text: "保存并关闭", handler: function (button, event) { - this.Save('1'); + this.Save('1', '0'); }, scope: this }, @@ -1520,7 +1486,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { id: 'bsbtnSaveAndNew', text: "保存并新建", handler: function (button, event) { - this.Save('2'); + this.Save('2', '0'); }, scope: this }, @@ -1957,6 +1923,26 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { Ext.apply(store.proxy.extraParams, { condition: condition }); }, this); + + Ext.Ajax.request({ + waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, + url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable', + params: { + modulename: 'modPcHeadEdit_GDFY' + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (result.Success) { + this.modPcHeadEdit_GDFY = 1; + } else { + this.modPcHeadEdit_GDFY = 0; + } + } + }, + scope: this + }); + //#endregion }, //end initUIComponents @@ -2009,7 +1995,9 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { var data = result.data; - + if (opstatus == 'add') { + data.PcBillType = ''; + } this.formEdit.getForm().reset(); this.formEdit.getForm().setValues(data); @@ -2022,18 +2010,50 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { PGid.setValue(this.selectPGID); if (this.editRecord != NaN && this.editRecord != null) { this.formEdit.getForm().findField('CustomerName').setValue(this.editRecord.get('CustomerName')); - this.formEdit.getForm().findField('LinkMan').setValue(this.editRecord.get('LinkMan')); - this.formEdit.getForm().findField('CustName').setValue(this.editRecord.get('CustName')); - this.formEdit.getForm().findField('DispatchName').setValue(this.editRecord.get('DispatchName')); + this.formEdit.getForm().findField('SalesName').setValue(this.editRecord.get('SalesName')); + this.formEdit.getForm().findField('DdName').setValue(this.editRecord.get('DdName')); + this.formEdit.getForm().findField('YardName').setValue(this.editRecord.get('YardName')); + this.formEdit.getForm().findField('LinkManSe').setValue(this.editRecord.get('LinkManSe')); this.formEdit.getForm().findField('BLTYPE').setValue('派车分票'); - this.formEdit.getForm().findField('DstArea').setValue(this.editRecord.get('DstArea')); - this.formEdit.getForm().findField('DetiNation').setValue(this.editRecord.get('DetiNation')); - this.formEdit.getForm().findField('LoadPlace').setValue(this.editRecord.get('LoadPlace')); + this.formEdit.getForm().findField('LoadFactory').setValue(this.editRecord.get('LoadFactory')); + this.formEdit.getForm().findField('DetiNationSe').setValue(this.editRecord.get('DetiNationSe')); + this.formEdit.getForm().findField('DrvCode').setValue(this.editRecord.get('DrvCode')); this.formEdit.getForm().findField('PcBillType').setValue(this.editRecord.get('PcBillType')); + this.formEdit.getForm().findField('VoyVeg').setValue(this.editRecord.get('VoyVeg')); this.formEdit.getForm().findField('ExpDate').setValue(this.editRecord.get('ExpDate')); - this.formEdit.getForm().findField('ArriveDate').setValue(this.editRecord.get('ArriveDate')); + this.formEdit.getForm().findField('VoyVegSe').setValue(this.editRecord.get('VoyVegSe')); + this.formEdit.getForm().findField('EtDateSe').setValue(this.editRecord.get('EtDateSe')); + this.formEdit.getForm().findField('EndPortDate').setValue(this.editRecord.get('EndPortDate')); + this.formEdit.getForm().findField('EtDate').setValue(this.editRecord.get('EtDate')); + this.formEdit.getForm().findField('MblNoSe').setValue(this.editRecord.get('MblNoSe')); + this.formEdit.getForm().findField('ContainerQty').setValue(this.editRecord.get('ContainerQty')); + this.formEdit.getForm().findField('GoodsName').setValue(this.editRecord.get('GoodsName')); + this.formEdit.getForm().findField('ContainerNoSe').setValue(this.editRecord.get('ContainerNoSe')); + this.formEdit.getForm().findField('ContainerNo').setValue(this.editRecord.get('ContainerNo')); + this.formEdit.getForm().findField('SealNo').setValue(this.editRecord.get('SealNo')); + this.formEdit.getForm().findField('DUNNO').setValue(this.editRecord.get('DUNNO')); + this.formEdit.getForm().findField('DCLASS').setValue(this.editRecord.get('DCLASS')); + this.formEdit.getForm().findField('YardCodeSe').setValue(this.editRecord.get('YardCodeSe')); + this.formEdit.getForm().findField('YardNameSe').setValue(this.editRecord.get('YardNameSe')); + this.formEdit.getForm().findField('ISSHUISHI').setValue(this.editRecord.get('ISSHUISHI')); + this.formEdit.getForm().findField('ISGAOWEN').setValue(this.editRecord.get('ISGAOWEN')); + this.formEdit.getForm().findField('ISXIANLIANG').setValue(this.editRecord.get('ISXIANLIANG')); + this.formEdit.getForm().findField('ISHAIWU').setValue(this.editRecord.get('ISHAIWU')); + this.formEdit.getForm().findField('ISFENGXIANG').setValue(this.editRecord.get('ISFENGXIANG')); + this.formEdit.getForm().findField('ISWEISHENBAO').setValue(this.editRecord.get('ISWEISHENBAO')); + this.formEdit.getForm().findField('ISBAOGUAN').setValue(this.editRecord.get('ISBAOGUAN')); + this.formEdit.getForm().findField('DispatchName').setValue(this.editRecord.get('DispatchName')); this.formEdit.getForm().findField('ReturnDate').setValue(this.editRecord.get('ReturnDate')); - this.formEdit.getForm().findField('TruckNo').setValue(this.editRecord.get('TruckNo')); + this.formEdit.getForm().findField('ISPINGTAI').setValue(this.editRecord.get('ISPINGTAI')); + this.formEdit.getForm().findField('RtnDocTime').setValue(this.editRecord.get('RtnDocTime')); + this.formEdit.getForm().findField('WmsTruckNo').setValue(this.editRecord.get('WmsTruckNo')); + this.formEdit.getForm().findField('WmsDrvName').setValue(this.editRecord.get('WmsDrvName')); + this.formEdit.getForm().findField('ArriveDate').setValue(this.editRecord.get('ArriveDate')); + this.formEdit.getForm().findField('DstAreaSe').setValue(this.editRecord.get('DstAreaSe')); + this.formEdit.getForm().findField('SealNoSe').setValue(this.editRecord.get('SealNoSe')); + this.formEdit.getForm().findField('ContainerTypeSe').setValue(this.editRecord.get('ContainerTypeSe')); + this.formEdit.getForm().findField('Remark').setValue(this.editRecord.get('Remark')); + this.formEdit.getForm().findField('FactoryAddrSe').setValue(this.editRecord.get('FactoryAddrSe')); } } this.LoadPeriod(); @@ -2180,19 +2200,50 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { PGid.setValue(this.selectPGID); if (this.editRecord != NaN && this.editRecord != null) { this.formEdit.getForm().findField('CustomerName').setValue(this.editRecord.get('CustomerName')); - this.formEdit.getForm().findField('F_CustomerName').setValue(this.editRecord.get('F_CustomerName')); - this.formEdit.getForm().findField('LinkMan').setValue(this.editRecord.get('LinkMan')); - this.formEdit.getForm().findField('CustName').setValue(this.editRecord.get('CustName')); - this.formEdit.getForm().findField('DispatchName').setValue(this.editRecord.get('DispatchName')); + this.formEdit.getForm().findField('SalesName').setValue(this.editRecord.get('SalesName')); + this.formEdit.getForm().findField('DdName').setValue(this.editRecord.get('DdName')); + this.formEdit.getForm().findField('YardName').setValue(this.editRecord.get('YardName')); + this.formEdit.getForm().findField('LinkManSe').setValue(this.editRecord.get('LinkManSe')); this.formEdit.getForm().findField('BLTYPE').setValue('派车分票'); - this.formEdit.getForm().findField('DstArea').setValue(this.editRecord.get('DstArea')); - this.formEdit.getForm().findField('DetiNation').setValue(this.editRecord.get('DetiNation')); - this.formEdit.getForm().findField('LoadPlace').setValue(this.editRecord.get('LoadPlace')); + this.formEdit.getForm().findField('LoadFactory').setValue(this.editRecord.get('LoadFactory')); + this.formEdit.getForm().findField('DetiNationSe').setValue(this.editRecord.get('DetiNationSe')); + this.formEdit.getForm().findField('DrvCode').setValue(this.editRecord.get('DrvCode')); this.formEdit.getForm().findField('PcBillType').setValue(this.editRecord.get('PcBillType')); + this.formEdit.getForm().findField('VoyVeg').setValue(this.editRecord.get('VoyVeg')); this.formEdit.getForm().findField('ExpDate').setValue(this.editRecord.get('ExpDate')); - this.formEdit.getForm().findField('ArriveDate').setValue(this.editRecord.get('ArriveDate')); + this.formEdit.getForm().findField('VoyVegSe').setValue(this.editRecord.get('VoyVegSe')); + this.formEdit.getForm().findField('EtDateSe').setValue(this.editRecord.get('EtDateSe')); + this.formEdit.getForm().findField('EndPortDate').setValue(this.editRecord.get('EndPortDate')); + this.formEdit.getForm().findField('EtDate').setValue(this.editRecord.get('EtDate')); + this.formEdit.getForm().findField('MblNoSe').setValue(this.editRecord.get('MblNoSe')); + this.formEdit.getForm().findField('ContainerQty').setValue(this.editRecord.get('ContainerQty')); + this.formEdit.getForm().findField('GoodsName').setValue(this.editRecord.get('GoodsName')); + this.formEdit.getForm().findField('ContainerNoSe').setValue(this.editRecord.get('ContainerNoSe')); + this.formEdit.getForm().findField('ContainerNo').setValue(this.editRecord.get('ContainerNo')); + this.formEdit.getForm().findField('SealNo').setValue(this.editRecord.get('SealNo')); + this.formEdit.getForm().findField('DUNNO').setValue(this.editRecord.get('DUNNO')); + this.formEdit.getForm().findField('DCLASS').setValue(this.editRecord.get('DCLASS')); + this.formEdit.getForm().findField('YardCodeSe').setValue(this.editRecord.get('YardCodeSe')); + this.formEdit.getForm().findField('YardNameSe').setValue(this.editRecord.get('YardNameSe')); + this.formEdit.getForm().findField('ISSHUISHI').setValue(this.editRecord.get('ISSHUISHI')); + this.formEdit.getForm().findField('ISGAOWEN').setValue(this.editRecord.get('ISGAOWEN')); + this.formEdit.getForm().findField('ISXIANLIANG').setValue(this.editRecord.get('ISXIANLIANG')); + this.formEdit.getForm().findField('ISHAIWU').setValue(this.editRecord.get('ISHAIWU')); + this.formEdit.getForm().findField('ISFENGXIANG').setValue(this.editRecord.get('ISFENGXIANG')); + this.formEdit.getForm().findField('ISWEISHENBAO').setValue(this.editRecord.get('ISWEISHENBAO')); + this.formEdit.getForm().findField('ISBAOGUAN').setValue(this.editRecord.get('ISBAOGUAN')); + this.formEdit.getForm().findField('DispatchName').setValue(this.editRecord.get('DispatchName')); this.formEdit.getForm().findField('ReturnDate').setValue(this.editRecord.get('ReturnDate')); - this.formEdit.getForm().findField('TruckNo').setValue(this.editRecord.get('TruckNo')); + this.formEdit.getForm().findField('ISPINGTAI').setValue(this.editRecord.get('ISPINGTAI')); + this.formEdit.getForm().findField('RtnDocTime').setValue(this.editRecord.get('RtnDocTime')); + this.formEdit.getForm().findField('WmsTruckNo').setValue(this.editRecord.get('WmsTruckNo')); + this.formEdit.getForm().findField('WmsDrvName').setValue(this.editRecord.get('WmsDrvName')); + this.formEdit.getForm().findField('ArriveDate').setValue(this.editRecord.get('ArriveDate')); + this.formEdit.getForm().findField('DstAreaSe').setValue(this.editRecord.get('DstAreaSe')); + this.formEdit.getForm().findField('SealNoSe').setValue(this.editRecord.get('SealNoSe')); + this.formEdit.getForm().findField('ContainerTypeSe').setValue(this.editRecord.get('ContainerTypeSe')); + this.formEdit.getForm().findField('Remark').setValue(this.editRecord.get('Remark')); + this.formEdit.getForm().findField('FactoryAddrSe').setValue(this.editRecord.get('FactoryAddrSe')); } } this.LoadPeriod(); @@ -2451,7 +2502,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { //#endregion - Save: function (type) { + Save: function (type, createpc) { var basicForm = this.formEdit.getForm(); if (!basicForm.isValid()) { return; @@ -2507,7 +2558,8 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { data: Ext.JSON.encode(data), fixbody: jsonFixBody, fixdelbody: jsonFixDelBody, - ctnbody: jsonBody + ctnbody: jsonBody, + createpc: createpc }, callback: function (options, success, response) { if (success) { @@ -2565,6 +2617,11 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { } else { this.LoadData('add', ''); } + if (createpc=='1') { + 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 }); } @@ -3156,6 +3213,11 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { onAddDetailClick: function (button, event, type) { + if (this.modPcHeadEdit_GDFY == 0) { + Ext.Msg.show({ title: '提示', msg: '没有权限修改费用', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });//当前费用已対帐无法修改! + return ; + } + var allow = this.getAllowOperationDetail(); if (allow == false) { return; @@ -3230,6 +3292,10 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { }, onDelDetailClick: function (button, event, type) { + if (this.modPcHeadEdit_GDFY == 0) { + Ext.Msg.show({ title: '提示', msg: '没有权限修改费用', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });//当前费用已対帐无法修改! + return; + } var allow = this.getAllowOperationDetail(); if (allow == false) { return; @@ -3261,9 +3327,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { selectedRecords = this.gridListFix.selModel.getSelection(); - //var candelete = DsTruck.CheckChFeeDelete(selectedRecords); - //if (candelete == false) - // return; + if (selectedRecords.length > 0) { for (var i = 0; i < selectedRecords.length; i++) { @@ -3289,6 +3353,8 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { Ext.Msg.show({ title: '错误', msg: "此票委托已费用已锁定,不允许操作费用!", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); return false; } + + }, gridListFixAfterEdit: function (editor, e, eOpts) { @@ -3321,6 +3387,11 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, { var feeStatus = this.getFeeStatus(); var billStatus = this.getBillStatus(); var canedit = feeStatus == '0' && billStatus == '0'; + if (this.modPcHeadEdit_GDFY == 0) { + Ext.Msg.show({ title: '提示', msg: '没有权限修改费用', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });//当前费用已対帐无法修改! + + return false; + } return canedit; },