diff --git a/DSWeb.Common/DB/Comm.cs b/DSWeb.Common/DB/Comm.cs index 7069d09f..ad0c5f2e 100644 --- a/DSWeb.Common/DB/Comm.cs +++ b/DSWeb.Common/DB/Comm.cs @@ -1422,4 +1422,20 @@ namespace DSWeb.Common.DB #endregion } + + [Table("vw_userattribute")] + public partial class vw_userattribute_md + { + [Key] + [Column(Order =0)] + public string USERID { get; set; } + + [Key] + [Column(Order = 1)] + public string ATTRIBUTENAME { get; set; } + public string CODENAME { get; set; } + public string SHOWNAME { get; set; } + public string DESCRIPTION { get; set; } + public string VALUE { get; set; } + } } \ No newline at end of file diff --git a/DSWeb.Common/DB/CommonDataContext.cs b/DSWeb.Common/DB/CommonDataContext.cs index 7849ba97..3be3fc4f 100644 --- a/DSWeb.Common/DB/CommonDataContext.cs +++ b/DSWeb.Common/DB/CommonDataContext.cs @@ -54,7 +54,8 @@ namespace DSWeb.Common.DB public DbSet v_ch_fee_settlementinfo { get; set; } public DbSet VW_user { get; set; } - + public DbSet vw_userattribute { get; set; } + public class InvMailInfo { public string MBLNO { get; set; } diff --git a/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs b/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs index 9b8fa251..d5843920 100644 --- a/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs +++ b/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs @@ -1905,15 +1905,15 @@ namespace DSWeb.Areas.CommMng.Controllers public JsonResult GetLogicInfo(string BSNO, string PROPNAME) { - var dic = BasicDataRefDAL.GetLogicInfo(BSNO, PROPNAME); - if (dic.Count == 0) - { + var dic = BasicDataRefDAL.GetLogicInfo(BSNO, PROPNAME); + if (dic.Count == 0) + { return Json(new { Success = false }); - } - else - { + } + else + { return Json(new { Success = true, Data = dic }); - } + } } public JsonResult GetLogicInfoList(string BSNOListStr, string PROPNAME) diff --git a/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs b/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs index 86876c55..d7801a2a 100644 --- a/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs +++ b/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs @@ -190,6 +190,18 @@ namespace DSWeb.Areas.CommMng.DAL strSql.Append("SELECT "); strSql.Append("l.USERID GID,u.CODENAME UserCode,u.SHOWNAME UserName,u.CODENAME+'-'+u.SHOWNAME CodeAndName,"); strSql.Append("l.OFFICEPHONE Tel,l.FAX Fax,l.EMAIL1 Email,l.DEPTNAME,c.COMPANYID"); + + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='2E5E6066-1C5D-4B04-BF8C-56637C20FC8C' and VALUE='true') then 1 else 0 end isUseSystem "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='31AC11C1-D005-46EC-A0EE-05BC211AE1B7' and VALUE='true') then 1 else 0 end isOperator "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='3C91140E-6FB6-4B5A-B5AB-30E59E3CBBED' and VALUE='true') then 1 else 0 end isSaleMan "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='3CF26819-B519-4595-89E3-9F46A205218E' and VALUE='true') then 1 else 0 end isDriver "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='4211AD22-FBF5-4A74-8A53-6AC05E598982' and VALUE='true') then 1 else 0 end isCustomsDeclarer "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='A879800D-1CDC-4248-8120-7854431F2BE3' and VALUE='true') then 1 else 0 end isDocument "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='D22315B2-3612-491A-B9E5-937E5E2CF310' and VALUE='true') then 1 else 0 end isFinancialStaff "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='D4BF2204-F0AC-4F12-B02C-6520D57BF800' and VALUE='true') then 1 else 0 end isDisable "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='D4BF2204-F0AC-4F12-B02C-6520D57BF806' and VALUE='true') then 1 else 0 end isCustomsService "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='DFF42726-A0BA-4264-BFDF-2500A35E89C7' and VALUE='true') then 1 else 0 end isVehiclesDispatcher "); + strSql.Append(" from [user] u left join user_baseinfo l on (u.gid=l.USERID) "); strSql.Append(" left join user_company c on (u.gid=c.USERID) "); var SeaeDefaultSort = MsSysParamSetDAL.GetData("PARAMNAME='OPONLYSUBCOMPANY'"); @@ -212,6 +224,17 @@ namespace DSWeb.Areas.CommMng.DAL strSql.Append("SELECT "); strSql.Append("l.USERID GID,u.USERNAME UserCode,u.SHOWNAME UserName,u.CODENAME+'-'+u.SHOWNAME CodeAndName,"); strSql.Append("l.OFFICEPHONE Tel,l.FAX Fax,l.EMAIL1 Email,l.DEPTNAME,c.COMPANYID"); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='2E5E6066-1C5D-4B04-BF8C-56637C20FC8C' and VALUE='true') then 1 else 0 end isUseSystem "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='31AC11C1-D005-46EC-A0EE-05BC211AE1B7' and VALUE='true') then 1 else 0 end isOperator "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='3C91140E-6FB6-4B5A-B5AB-30E59E3CBBED' and VALUE='true') then 1 else 0 end isSaleMan "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='3CF26819-B519-4595-89E3-9F46A205218E' and VALUE='true') then 1 else 0 end isDriver "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='4211AD22-FBF5-4A74-8A53-6AC05E598982' and VALUE='true') then 1 else 0 end isCustomsDeclarer "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='A879800D-1CDC-4248-8120-7854431F2BE3' and VALUE='true') then 1 else 0 end isDocument "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='D22315B2-3612-491A-B9E5-937E5E2CF310' and VALUE='true') then 1 else 0 end isFinancialStaff "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='D4BF2204-F0AC-4F12-B02C-6520D57BF800' and VALUE='true') then 1 else 0 end isDisable "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='D4BF2204-F0AC-4F12-B02C-6520D57BF806' and VALUE='true') then 1 else 0 end isCustomsService "); + strSql.Append(" ,case when exists(select 1 from user_userattribute where userid=u.gid and ATTRIBUTEID='DFF42726-A0BA-4264-BFDF-2500A35E89C7' and VALUE='true') then 1 else 0 end isVehiclesDispatcher "); + strSql.Append(" from [user] u left join user_baseinfo l on (u.gid=l.USERID) "); strSql.Append(" left join user_company c on (u.gid=c.USERID) "); strSql.Append(" where 1=1 "); @@ -247,6 +270,17 @@ namespace DSWeb.Areas.CommMng.DAL data.Email = Convert.ToString(reader["Email"]); data.DEPTNAME = Convert.ToString(reader["DEPTNAME"]); data.CORPID = Convert.ToString(reader["COMPANYID"]); + + data.isUseSystem = Convert.ToString(reader["isUseSystem"]); + data.isOperator = Convert.ToString(reader["isOperator"]); + data.isSaleMan = Convert.ToString(reader["isSaleMan"]); + data.isDriver = Convert.ToString(reader["isDriver"]); + data.isCustomsDeclarer = Convert.ToString(reader["isCustomsDeclarer"]); + data.isDocument = Convert.ToString(reader["isDocument"]); + data.isFinancialStaff = Convert.ToString(reader["isFinancialStaff"]); + data.isDisable = Convert.ToString(reader["isDisable"]); + data.isCustomsService = Convert.ToString(reader["isCustomsService"]); + data.isVehiclesDispatcher = Convert.ToString(reader["isVehiclesDispatcher"]); #endregion headList.Add(data); } @@ -5232,9 +5266,9 @@ namespace DSWeb.Areas.CommMng.DAL private static void SaveSaleEmailinfo(string USERID, string BSNO) { - var _user = GetVwUser(USERID); + var _user = GetVwUser(USERID); - SaveLogicInfo(BSNO, "销售邮件", _user.SHOWNAME, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); + SaveLogicInfo(BSNO, "销售邮件", _user.SHOWNAME, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); } public static DBResult SendSaleEmailList(string USERID, string BSNOs) diff --git a/DSWeb/Areas/CommMng/Models/UserRefModel.cs b/DSWeb/Areas/CommMng/Models/UserRefModel.cs index ce082035..e5807299 100644 --- a/DSWeb/Areas/CommMng/Models/UserRefModel.cs +++ b/DSWeb/Areas/CommMng/Models/UserRefModel.cs @@ -26,5 +26,16 @@ namespace DSWeb.Areas.CommMng.Models public string DEPTNAME { get; set; } public string CORPID { get; set; } + + public string isUseSystem { get; set; } + public string isOperator { get; set; } + public string isSaleMan { get; set; } + public string isDriver { get; set; } + public string isCustomsDeclarer { get; set; } + public string isDocument { get; set; } + public string isFinancialStaff { get; set; } + public string isDisable { get; set; } + public string isCustomsService { get; set; } + public string isVehiclesDispatcher { get; set; } } } \ No newline at end of file diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeEdiController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeEdiController.cs index 89c91774..b3a5d1eb 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeEdiController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeEdiController.cs @@ -1543,8 +1543,9 @@ namespace DSWeb.MvcShipping.Controllers if (isfen) { - var 分单列表 = MsOpSeaeDAL.GetManifestList($" BSNO='{item.BSNO}' "); - 单量 = 分单列表.Count(); + var 分单列表 = MsOpSeaeDAL.GetManifestList($" BSNO='{item.BSNO}' "); + var 分单号list= 分单列表.Select(s=>s.MBLNO).Distinct().ToList(); + 单量 = 分单号list.Count(); } MsChFeeDAL.MakeNewFee(USERID, item.BSNO, "青岛大简云", "其它", 2, "舱单费", amount * 单量, 单量); diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs index e5f2365c..e3102093 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs @@ -1736,6 +1736,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL isuse = true; else isuse = MsBaseInfoDAL.MsBaseInfoDAL.GetRuleUse("委托编号", "1"); + if (headData.CUSTNO.Trim() == "" || headData.CUSTNO == null) { if (isuse) @@ -2173,6 +2174,16 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL if (isPost) { + //保存前处理 查询旧数据然后与即将保存的数据对比 做相应操作 + if (opstatus == "edit") { + var oldHead = GetData("B.BSNO='" + headData.BSNO + "'"); + + //1:船名航次是否发生变动 如果两者其一与原值不同 则记入逻辑存储表 + if (oldHead.VOYNO != headData.VOYNO || oldHead.VESSEL != headData.VESSEL) { + BasicDataRefDAL. SaveLogicInfo(headData.BSNO, "历史船名", oldHead.VESSEL, oldHead.VOYNO); + } + } + var modb = new ModelObjectDB(); result = modb.Save(headData); diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeYardDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeYardDAL.cs index 0344a7e4..86f38de9 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeYardDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeYardDAL.cs @@ -780,6 +780,14 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeYardDAL var htmstr = objRtn.message; if (viewstatehtml!="") htmstr = objRtn.message.Replace(viewstatehtml,""); + + if (yardid == "MGDG") + { + //替换掉最后一个 + int lastIndex = htmstr.LastIndexOf(""); //查找最后一次出现_的索引位置 + htmstr=htmstr.Remove(lastIndex, 6).Insert(lastIndex, ""); + } + //if (yardid != "YGT") //htmstr = htmstr.Replace("display: none;", ""); result.Data = htmstr; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/BookingConfirm/Booking_SIEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/BookingConfirm/Booking_SIEdit.js index 3f158b45..c4d2c2b5 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/BookingConfirm/Booking_SIEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/BookingConfirm/Booking_SIEdit.js @@ -179,12 +179,26 @@ Ext.extend(Shipping.Booking_SIEdit, Ext.Panel, { } }); - var astoreOpCode = parentWin.storeOpCode; - if (isNaN(astoreOpCode) || astoreOpCode == null) { } else { - this.storeOpCode3.loadData(astoreOpCode.data.items); - this.storeOpCode4.loadData(astoreOpCode.data.items); - this.storeOpCode5.loadData(astoreOpCode.data.items); - } + //var astoreOpCode = parentWin.storeOpCode; + //if (isNaN(astoreOpCode) || astoreOpCode == null) { } else { + // this.storeOpCode3.loadData(astoreOpCode.data.items); + // this.storeOpCode4.loadData(astoreOpCode.data.items); + // this.storeOpCode5.loadData(astoreOpCode.data.items); + //} + + /* +2E5E6066-1C5D-4B04-BF8C-56637C20FC8C isUseSystem 是否允许使用本系统 +31AC11C1-D005-46EC-A0EE-05BC211AE1B7 isOperator 是否操作 +3C91140E-6FB6-4B5A-B5AB-30E59E3CBBED isSaleMan 是否销售 +3CF26819-B519-4595-89E3-9F46A205218E isDriver 是否司机 +4211AD22-FBF5-4A74-8A53-6AC05E598982 isCustomsDeclarer 是否报关员 +A879800D-1CDC-4248-8120-7854431F2BE3 isDocument 是否单证 +D22315B2-3612-491A-B9E5-937E5E2CF310 isFinancialStaff 是否财务 +D4BF2204-F0AC-4F12-B02C-6520D57BF800 isDisable 是否停用 +D4BF2204-F0AC-4F12-B02C-6520D57BF806 isCustomsService 是否客服 +DFF42726-A0BA-4264-BFDF-2500A35E89C7 isVehiclesDispatcher 是否派车调度人员 + */ + //客服 this.storeOpCode.on('beforeload', function (store) { var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='D4BF2204-F0AC-4F12-B02C-6520D57BF806' and VALUE='true' ) "; @@ -194,6 +208,26 @@ Ext.extend(Shipping.Booking_SIEdit, Ext.Panel, { }, this); + //storeOpCode3 操作 isDocument + this.storeOpCode3.on('beforeload', + function (store) { + var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='31AC11C1-D005-46EC-A0EE-05BC211AE1B7' and VALUE='true' ) "; + Ext.apply(store.proxy.extraParams, { + condition: sql + }); + }, + this); + + //storeOpCode4 单证 isOperator + this.storeOpCode4.on('beforeload', + function (store) { + var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='A879800D-1CDC-4248-8120-7854431F2BE3' and VALUE='true' ) "; + Ext.apply(store.proxy.extraParams, { + condition: sql + }); + }, + this); + //客服 this.comboxCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.CUSTSERVICE, @@ -273,7 +307,7 @@ Ext.extend(Shipping.Booking_SIEdit, Ext.Panel, { }); this.comboxFRCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.FRCUSTSERVICE, - //'客服', + //'国外客服', store: this.storeOpCode5, forceSelection: true, queryMode: 'remote', diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/Comm/BasicDataRefModel.js b/DSWeb/Areas/MvcShipping/Viewsjs/Comm/BasicDataRefModel.js index c6548bf8..c13f8e1d 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/Comm/BasicDataRefModel.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/Comm/BasicDataRefModel.js @@ -22,14 +22,26 @@ Ext.define('DsShipping.ux.UserRefModel', { extend: 'Ext.data.Model', fields: [ - { name: 'GID', type: 'string' }, - { name: 'UserCode', type: 'string' }, - { name: 'UserName', type: 'string' }, - { name: 'CodeAndName', type: 'string' }, - { name: 'CodeAndFull', type: 'string' }, - { name: 'CORPID', type: 'string' }, - { name: 'DEPTGID', type: 'string' }, - { name: 'DEPTNAME', type: 'string' } + { name: 'GID', type: 'string' }, + { name: 'UserCode', type: 'string' }, + { name: 'UserName', type: 'string' }, + { name: 'CodeAndName', type: 'string' }, + { name: 'CodeAndFull', type: 'string' }, + { name: 'CORPID', type: 'string' }, + { name: 'DEPTGID', type: 'string' }, + { name: 'DEPTNAME', type: 'string' }, + + { name: 'isUseSystem', type: 'string' }, + { name: 'isOperator', type: 'string' }, + { name: 'isSaleMan', type: 'string' }, + { name: 'isDriver', type: 'string' }, + { name: 'isCustomsDeclarer', type: 'string' }, + { name: 'isDocument', type: 'string' }, + { name: 'isFinancialStaff', type: 'string' }, + { name: 'isDisable', type: 'string' }, + { name: 'isCustomsService', type: 'string' }, + { name: 'isVehiclesDispatcher', type: 'string' } + ] }); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js index 7d7f9064..811ed6c5 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js @@ -135,6 +135,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } }); this.storeOpCode.load(); + this.storeOpCode2 = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.UserRefModel', proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } @@ -159,16 +160,60 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { var astoreOpCode = parentWin.storeOpCode; if (astoreOpCode == NaN || astoreOpCode == null) { } else { - this.storeOpCode3.loadData(astoreOpCode.data.items); - this.storeOpCode4.loadData(astoreOpCode.data.items); + //this.storeOpCode3.loadData(astoreOpCode.data.items); + //this.storeOpCode4.loadData(astoreOpCode.data.items); this.storeOpCode5.loadData(astoreOpCode.data.items); this.storeOpCode6.loadData(astoreOpCode.data.items); } + + /* +2E5E6066-1C5D-4B04-BF8C-56637C20FC8C isUseSystem 是否允许使用本系统 +31AC11C1-D005-46EC-A0EE-05BC211AE1B7 isOperator 是否操作 +3C91140E-6FB6-4B5A-B5AB-30E59E3CBBED isSaleMan 是否销售 +3CF26819-B519-4595-89E3-9F46A205218E isDriver 是否司机 +4211AD22-FBF5-4A74-8A53-6AC05E598982 isCustomsDeclarer 是否报关员 +A879800D-1CDC-4248-8120-7854431F2BE3 isDocument 是否单证 +D22315B2-3612-491A-B9E5-937E5E2CF310 isFinancialStaff 是否财务 +D4BF2204-F0AC-4F12-B02C-6520D57BF800 isDisable 是否停用 +D4BF2204-F0AC-4F12-B02C-6520D57BF806 isCustomsService 是否客服 +DFF42726-A0BA-4264-BFDF-2500A35E89C7 isVehiclesDispatcher 是否派车调度人员 + */ + this.storeOpCode.on('beforeload', function (store) { var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='D4BF2204-F0AC-4F12-B02C-6520D57BF806' and VALUE='true' ) "; Ext.apply(store.proxy.extraParams, { condition: sql }); }, this); + //storeOpCode2 是否销售 isSaleMan + this.storeOpCode2.on('beforeload', + function (store) { + var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='3C91140E-6FB6-4B5A-B5AB-30E59E3CBBED' and VALUE='true' ) "; + Ext.apply(store.proxy.extraParams, { + condition: sql + }); + }, + this); + + //storeOpCode3 操作 isDocument + this.storeOpCode3.on('beforeload', + function (store) { + var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='31AC11C1-D005-46EC-A0EE-05BC211AE1B7' and VALUE='true' ) "; + Ext.apply(store.proxy.extraParams, { + condition: sql + }); + }, + this); + + //storeOpCode4 单证 isOperator + this.storeOpCode4.on('beforeload', + function (store) { + var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='A879800D-1CDC-4248-8120-7854431F2BE3' and VALUE='true' ) "; + Ext.apply(store.proxy.extraParams, { + condition: sql + }); + }, + this); + //客服 this.comboxCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.CUSTSERVICE, //'客服', @@ -241,6 +286,9 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { displayField: 'CodeAndName', value: SHOWNAME }); + + + this.comboxFRCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.FRCUSTSERVICE, //'客服', store: this.storeOpCode5, @@ -1529,10 +1577,20 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { xtype: 'checkbox', name: 'HAVEFEN' //,readOnly: true + }, + { + fieldLabel: '历史船名', + flex: 1, + readOnly: true, + name: 'VESSEL_OLD' + },{ + fieldLabel: '历史航次', + flex: 1, + readOnly: true, + name: 'VOYNO_OLD' } - - , { xtype: 'hiddenfield', flex: 1 } - , { xtype: 'hiddenfield', flex: 1 } + //, { xtype: 'hiddenfield', flex: 1 } + //, { xtype: 'hiddenfield', flex: 1 } , { xtype: 'hiddenfield', flex: 1 } ] } @@ -13777,6 +13835,9 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { memberbody.commit(); }; this.LoadPeriodStatus(this.opStatus); + + + this.LoadLogic(); } else if (type == '1') { window.close(); } else if (type == '2') { @@ -21344,6 +21405,52 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { } + } else { + Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); + } + }, + scope: this + }); + + let PROPNAME2 = "历史船名"; + Ext.Ajax.request({ + waitMsg: '正在查询数据...', + url: '/CommMng/BasicDataRef/GetLogicInfo', + async: false, + params: { + BSNO: BSNO, + PROPNAME: PROPNAME2 + }, + 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; + //return ""; + } else { + //return result.Data; + //alert(result.Data); + var record = ""; + var voyno_old = ""; + var vessel_old = ""; + for (i in result.Data) { + if (record != "") record += ";" + //record += i + ":" + result.Data[i]; + vessel_old = i; + voyno_old = result.Data[i]; + } + + _this.formHead.getForm().findField('VOYNO_OLD').setValue(voyno_old); + _this.formHead.getForm().findField('VESSEL_OLD').setValue(vessel_old); + } + + } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js index a4d75384..4afadf60 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js @@ -1605,15 +1605,48 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { model: 'DsShipping.ux.UserRefModel', proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } }); + + this.storeSaleCode.on('beforeload', + function (store) { + var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='3C91140E-6FB6-4B5A-B5AB-30E59E3CBBED' and VALUE='true' ) "; + Ext.apply(store.proxy.extraParams, { + condition: sql + }); + }, + this); + this.storeCUSTSERVICECode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.UserRefModel', proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } }); + + this.storeCUSTSERVICECode.on('beforeload', + function (store) { + var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='D4BF2204-F0AC-4F12-B02C-6520D57BF806' and VALUE='true' ) "; + Ext.apply(store.proxy.extraParams, { + condition: sql + }); + }, + this); + this.storeINPUTBYCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.UserRefModel', proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } }); + this.storeOpCode2 = Ext.create('DsExt.ux.RefTableStore', { + model: 'DsShipping.ux.UserRefModel', + proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } + }); + + this.storeOpCode2.on('beforeload', + function (store) { + var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='31AC11C1-D005-46EC-A0EE-05BC211AE1B7' and VALUE='true' ) "; + Ext.apply(store.proxy.extraParams, { + condition: sql + }); + }, + this); // this.storeOpCode.load({ @@ -1630,6 +1663,7 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { fieldLabel: Zi.LAN.CUSTSERVICE, //'客服', store: this.storeCUSTSERVICECode, forceSelection: true, + matchFieldWidth: false, queryMode: 'remote', minChars: 0, queryParam: 'CODENAME', @@ -1652,6 +1686,7 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { fieldLabel: Zi.LAN.SALE, //'揽货人', store: this.storeSaleCode, forceSelection: true, + matchFieldWidth: false, queryMode: 'remote', minChars: 0, queryParam: 'CODENAME', @@ -1672,14 +1707,16 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { //操 作 this.comboxOP = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.OP, //'操 作', - store: this.storeOpCode, + store: this.storeOpCode2, + forceSelection: true, + matchFieldWidth: false, queryMode: 'remote', minChars: 0, queryParam: 'CODENAME', - labelWidth: 30, - forceSelection: true, + labelWidth: 45, name: 'OP', - flex: 0.6, valueField: 'UserName', + flex: 0.6, + valueField: 'UserName', displayField: 'CodeAndName', enableKeyEvents: true, listeners: { @@ -2861,7 +2898,7 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { _this.onGETYARDClick(menu, event); } }, { - text: Zi.LAN.GETCARRIER, //"青岛场站数据", + text: Zi.LAN.GETCARRIER, //"船公司运踪", handler: function (menu, event) { _this.onGETCARRIERClick(menu, event); } @@ -7065,10 +7102,15 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { this.storeOpCode.load(); this.comboxSALE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.SALE, //'揽货人', - store: this.storeOpCode, + store: this.storeSaleCode, + forceSelection: true, + matchFieldWidth: false, + queryMode: 'remote', + minChars: 0, + queryParam: 'CODENAME', name: 'SALE', valueField: 'UserName', - displayField: 'CodeAndName' + displayField: 'CodeAndName', }); @@ -7105,7 +7147,7 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { this.comboxCUSTSERVICE2 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.CUSTSERVICE, //'客服', - store: this.storeOpCode, + store: this.storeCUSTSERVICECode, forceSelection: true, queryMode: 'remote', minChars: 0, @@ -7118,7 +7160,7 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { }); this.comboxDOC2 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.DOC, //'客服', - store: this.storeSaleCode, + store: this.storeOpCode, forceSelection: true, queryMode: 'remote', minChars: 0, @@ -7707,7 +7749,7 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { //height:60, width: 80, labelWidth: 90, - store: this.storeUser, + store: this.storeOpCode, queryMode: 'local', //stacked: true, //pinList: false, diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsSeaeOrder/MsSeaeOrderEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsSeaeOrder/MsSeaeOrderEdit.js index 8e994d51..a52ecfdc 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsSeaeOrder/MsSeaeOrderEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsSeaeOrder/MsSeaeOrderEdit.js @@ -80,37 +80,101 @@ Ext.extend(Shipping.MsSeaeOrderEdit, Ext.Panel, { this.StoreOpRange.load({ params: { optype: "modSeaeOrderList"} }); //人员信息加载 - this.storeSERVICECode = Ext.create('DsExt.ux.RefTableStore', { + /* +2E5E6066-1C5D-4B04-BF8C-56637C20FC8C isUseSystem 是否允许使用本系统 +31AC11C1-D005-46EC-A0EE-05BC211AE1B7 isOperator 是否操作 +3C91140E-6FB6-4B5A-B5AB-30E59E3CBBED isSaleMan 是否销售 +3CF26819-B519-4595-89E3-9F46A205218E isDriver 是否司机 +4211AD22-FBF5-4A74-8A53-6AC05E598982 isCustomsDeclarer 是否报关员 +A879800D-1CDC-4248-8120-7854431F2BE3 isDocument 是否单证 +D22315B2-3612-491A-B9E5-937E5E2CF310 isFinancialStaff 是否财务 +D4BF2204-F0AC-4F12-B02C-6520D57BF800 isDisable 是否停用 +D4BF2204-F0AC-4F12-B02C-6520D57BF806 isCustomsService 是否客服 +DFF42726-A0BA-4264-BFDF-2500A35E89C7 isVehiclesDispatcher 是否派车调度人员 + */ + this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.UserRefModel', - proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' } + proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } + }); + + + this.storeOpCode2 = Ext.create('DsExt.ux.RefTableStore', { + model: 'DsShipping.ux.UserRefModel', + proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } }); - this.storeSERVICECode.load(); + this.storeOpCode3 = Ext.create('DsExt.ux.RefTableStore', { + model: 'DsShipping.ux.UserRefModel', + proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } + }); + this.storeOpCode4 = Ext.create('DsExt.ux.RefTableStore', { + model: 'DsShipping.ux.UserRefModel', + proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } + }); + + //storeOpCode 客服 isSaleMan + this.storeOpCode.on('beforeload', function (store) { + var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='D4BF2204-F0AC-4F12-B02C-6520D57BF806' and VALUE='true' ) "; + Ext.apply(store.proxy.extraParams, { condition: sql }); + }, this); + + //storeOpCode2 是否销售 isSaleMan + this.storeOpCode2.on('beforeload', + function (store) { + var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='3C91140E-6FB6-4B5A-B5AB-30E59E3CBBED' and VALUE='true' ) "; + Ext.apply(store.proxy.extraParams, { + condition: sql + }); + }, + this); + this.storeOpCode2.load(); + //storeOpCode3 操作 isDocument + this.storeOpCode3.on('beforeload', + function (store) { + var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='31AC11C1-D005-46EC-A0EE-05BC211AE1B7' and VALUE='true' ) "; + Ext.apply(store.proxy.extraParams, { + condition: sql + }); + }, + this); + + //storeOpCode4 单证 isOperator + this.storeOpCode4.on('beforeload', + function (store) { + var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='A879800D-1CDC-4248-8120-7854431F2BE3' and VALUE='true' ) "; + Ext.apply(store.proxy.extraParams, { + condition: sql + }); + }, + this); + + this.storeOpCode.load(); + //客服 this.comboxCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '客服', - store: this.storeSERVICECode, + store: this.storeOpCode, forceSelection: true, + queryMode: 'remote', + //flex: 0.5, + minChars: 0, + queryParam: 'CODENAME', name: 'CUSTSERVICE', valueField: 'UserName', - displayField: 'CodeAndName' - }); - //揽货人 - - this.storeSaleCode = Ext.create('DsExt.ux.RefTableStore', { - model: 'DsShipping.ux.UserRefModel', - proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' } + displayField: 'CodeAndName', }); - this.storeSaleCode.load(); - + //揽货人 this.comboxSALE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '揽货人', - store: this.storeSaleCode, + store: this.storeOpCode2, forceSelection: true, + queryMode: 'remote', + minChars: 0, + queryParam: 'CODENAME', name: 'SALE', valueField: 'UserName', displayField: 'CodeAndName', - value: SHOWNAME, + readOnly:true, listeners: { scope: this, 'select': function (combo, records, eOpts) { @@ -122,36 +186,15 @@ Ext.extend(Shipping.MsSeaeOrderEdit, Ext.Panel, { } }); - //所属部门 - this.storeDept = Ext.create('DsExt.ux.RefTableStore', { - model: 'DsShipping.ux.DeptModel', - proxy: { url: '/CommMng/BasicDataRef/GetDeptList' } - }); - this.storeDept.load(); - this.comboxDept = Ext.create('DsExt.ux.RefTableCombox', { - fieldLabel: '所属部门', //'所属部门', - store: this.storeDept, -// flex: 0.5, - forceSelection: true, - name: 'SALEDEPT', - value:DEPTNAME, - valueField: 'DeptName', - displayField: 'DeptName' - //,hidden: true - }); //操 作 - - this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', { - model: 'DsShipping.ux.UserRefModel', - proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' } - }); - this.storeOpCode.load(); - this.comboxOP = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '操 作', - store: this.storeOpCode, + store: this.storeOpCode3, forceSelection: true, + queryMode: 'remote', + minChars: 0, + queryParam: 'CODENAME', name: 'OP', valueField: 'UserName', displayField: 'CodeAndName', @@ -165,8 +208,8 @@ Ext.extend(Shipping.MsSeaeOrderEdit, Ext.Panel, { _this.storeORDEROP_EMAIL.load({ params: { SHOWNAME: newname }, callback: function (r, options, success) { - - if (success ) { + + if (success) { orderemailField = _this.formHead.getForm().findField('ORDEROP_EMAIL'); orderemail = orderemailField.setValue(); if (_this.storeORDEROP_EMAIL.getCount() > 0) { @@ -187,23 +230,40 @@ Ext.extend(Shipping.MsSeaeOrderEdit, Ext.Panel, { } } }); - //单证 - this.storeDocCode = Ext.create('DsExt.ux.RefTableStore', { - model: 'DsShipping.ux.UserRefModel', - proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' } - }); - this.storeDocCode.load(); + //单证 this.comboxDOC = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '单证', - store: this.storeDocCode, + store: this.storeOpCode4, forceSelection: true, + queryMode: 'remote', + minChars: 0, + queryParam: 'CODENAME', name: 'DOC', valueField: 'UserName', - displayField: 'CodeAndName' + displayField: 'CodeAndName', }); - //单证 + //所属部门 + this.storeDept = Ext.create('DsExt.ux.RefTableStore', { + model: 'DsShipping.ux.DeptModel', + proxy: { url: '/CommMng/BasicDataRef/GetDeptList' } + }); + this.storeDept.load(); + this.comboxDept = Ext.create('DsExt.ux.RefTableCombox', { + fieldLabel: '所属部门', //'所属部门', + store: this.storeDept, +// flex: 0.5, + forceSelection: true, + name: 'SALEDEPT', + value:DEPTNAME, + valueField: 'DeptName', + displayField: 'DeptName' + //,hidden: true + }); + + + //海外客服 this.storeFRCUSTSERVICECode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.UserRefModel', proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' } diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsSeaeOrder/MsSeaeOrderIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsSeaeOrder/MsSeaeOrderIndex.js index 8e063d22..6db90bfa 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsSeaeOrder/MsSeaeOrderIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsSeaeOrder/MsSeaeOrderIndex.js @@ -493,40 +493,91 @@ Ext.extend(Shipping.MsSeaeOrderIndex, Ext.Panel, { }); this.storeOpCode.load(); //客服 - this.comboxCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', { - fieldLabel: '客服', - store: this.storeOpCode, - forceSelection: true, - name: 'CUSTSERVICE', - valueField: 'UserName', - displayField: 'CodeAndName' + //this.comboxCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', { + // fieldLabel: '客服', + // store: this.storeOpCode, + // forceSelection: true, + // name: 'CUSTSERVICE', + // valueField: 'UserName', + // displayField: 'CodeAndName' + //}); + + this.storeSaleCode = Ext.create('DsExt.ux.RefTableStore', { + model: 'DsShipping.ux.UserRefModel', + proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } }); + + this.storeSaleCode.on('beforeload', + function (store) { + var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='3C91140E-6FB6-4B5A-B5AB-30E59E3CBBED' and VALUE='true' ) "; + Ext.apply(store.proxy.extraParams, { + condition: sql + }); + }, + this); + + this.storeOpCode2 = Ext.create('DsExt.ux.RefTableStore', { + model: 'DsShipping.ux.UserRefModel', + proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } + }); + + this.storeOpCode2.on('beforeload', + function (store) { + var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='31AC11C1-D005-46EC-A0EE-05BC211AE1B7' and VALUE='true' ) "; + Ext.apply(store.proxy.extraParams, { + condition: sql + }); + }, + this); + + //揽货人 this.comboxSALE = Ext.create('DsExt.ux.RefTableCombox', { - fieldLabel: '揽货人', - store: this.storeOpCode, + fieldLabel: '揽货人', //'揽货人', + store: this.storeSaleCode, forceSelection: true, + //matchFieldWidth: false, + queryMode: 'remote', + minChars: 0, + queryParam: 'CODENAME', + //labelWidth: 45, name: 'SALE', + //flex: 0.6, valueField: 'UserName', - displayField: 'CodeAndName' + displayField: 'CodeAndName', + enableKeyEvents: true, + listeners: { + keyup: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } + } }); //操 作 this.comboxOP = Ext.create('DsExt.ux.RefTableCombox', { - fieldLabel: '操 作', - store: this.storeOpCode, + fieldLabel: '操 作', //'操 作', + store: this.storeOpCode2, forceSelection: true, + //matchFieldWidth: false, + queryMode: 'remote', + minChars: 0, + queryParam: 'CODENAME', + //labelWidth: 45, name: 'OP', + //flex: 0.6, valueField: 'UserName', displayField: 'CodeAndName', enableKeyEvents: true, listeners: { - specialkey: function (field, e) { + keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); + //录入人 this.comboxINPUTBY = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '录入人',