diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpAireController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpAireController.cs index b66b3a98..fff799bc 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpAireController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpAireController.cs @@ -590,6 +590,12 @@ namespace DSWeb.MvcShipping.Controllers { headData.DbOperationType = DbOperationType.DbotDel; } + if (!string.IsNullOrEmpty(headData.OP) && string.IsNullOrEmpty(headData.SALEDEPT)) + { + var OPUSER = BasicDataRefDAL.GetUserLinkRef("u.SHOWNAME='" + headData.OP + "'", Convert.ToString(Session["COMPANYID"])); + headData.SALEDEPT = OPUSER.DEPTNAME; + + } if (headData.MASTERNO == null || headData.MASTERNO =="") { headData.MASTERNO = headData.BSNO; } if (headData.ETA == "") headData.ETA = null; diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpAiriController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpAiriController.cs index 9ba60c12..f2a36a13 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpAiriController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpAiriController.cs @@ -522,6 +522,12 @@ namespace DSWeb.MvcShipping.Controllers { headData.DbOperationType = DbOperationType.DbotDel; } + if (!string.IsNullOrEmpty(headData.OP) && string.IsNullOrEmpty(headData.SALEDEPT)) + { + var OPUSER = BasicDataRefDAL.GetUserLinkRef("u.SHOWNAME='" + headData.OP + "'", Convert.ToString(Session["COMPANYID"])); + headData.SALEDEPT = OPUSER.DEPTNAME; + + } if (headData.MASTERNO == null || headData.MASTERNO =="") { headData.MASTERNO = headData.BSNO; } if (headData.ETA == "") headData.ETA = null; diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpApplyController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpApplyController.cs index 29b86391..9b4e14c5 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpApplyController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpApplyController.cs @@ -482,6 +482,12 @@ namespace DSWeb.MvcShipping.Controllers { headData.DbOperationType = DbOperationType.DbotDel; } + if (!string.IsNullOrEmpty(headData.OP) && string.IsNullOrEmpty(headData.SALEDEPT)) + { + var OPUSER = BasicDataRefDAL.GetUserLinkRef("u.SHOWNAME='" + headData.OP + "'", Convert.ToString(Session["COMPANYID"])); + headData.SALEDEPT = OPUSER.DEPTNAME; + + } if (headData.MASTERNO == null) { headData.MASTERNO = headData.BSNO; } if (headData.CUSTOMDATE == "") headData.CUSTOMDATE = null; if (headData.CLEARCUSTOMDATE == "") headData.CLEARCUSTOMDATE = null; diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpOtherController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpOtherController.cs index 14574439..fb59a866 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpOtherController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpOtherController.cs @@ -539,6 +539,12 @@ namespace DSWeb.MvcShipping.Controllers { headData.DbOperationType = DbOperationType.DbotDel; } + if (!string.IsNullOrEmpty(headData.OP) && string.IsNullOrEmpty(headData.SALEDEPT)) + { + var OPUSER = BasicDataRefDAL.GetUserLinkRef("u.SHOWNAME='" + headData.OP + "'", Convert.ToString(Session["COMPANYID"])); + headData.SALEDEPT = OPUSER.DEPTNAME; + + } //if (headData.CTNNUM == null) { headData.CTNNUM = 0; } #region 判断字段长度 diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs index ba13fd63..8dfee46c 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaiController.cs @@ -977,6 +977,12 @@ namespace DSWeb.MvcShipping.Controllers if (_dmb.BSSOURCE != "") headData.BSSOURCE = _dmb.BSSOURCE; } headData.BSSOURCE = headData.BSSOURCE.Trim(); + if (!string.IsNullOrEmpty(headData.OP) && string.IsNullOrEmpty(headData.SALEDEPT)) + { + var OPUSER = BasicDataRefDAL.GetUserLinkRef("u.SHOWNAME='" + headData.OP + "'", Convert.ToString(Session["COMPANYID"])); + headData.SALEDEPT = OPUSER.DEPTNAME; + + } if (headData.MASTERNO == null) { headData.MASTERNO = headData.BSNO; } if (headData.ETA == "") headData.ETA = null; diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs index aaaf54f9..f23c2f4c 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs @@ -1961,6 +1961,12 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL * */ } T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); + + if (!string.IsNullOrEmpty(headData.OP)&& string.IsNullOrEmpty(headData.SALEDEPT)) { + var OPUSER = BasicDataRefDAL.GetUserLinkRef("u.SHOWNAME='" + headData.OP + "'", companyid); + headData.SALEDEPT = OPUSER.DEPTNAME; + + } if (headData.MBLNO != "" && headData.MBLNO != null && headData.BLTYPE != "拼箱分票"&&headData.SALEDEPT!= "市场部") diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyEdit.js index 1d203786..c3a80056 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyEdit.js @@ -175,8 +175,8 @@ Ext.extend(Shipping.MsOpApplyEdit, Ext.Panel, { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { - if (this.SALEORDERDEPTBYOP == 0) - this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); + //if (this.SALEORDERDEPTBYOP == 0) + // this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); } } } @@ -200,7 +200,6 @@ Ext.extend(Shipping.MsOpApplyEdit, Ext.Panel, { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { - if (this.SALEORDERDEPTBYOP == 1) this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); } } diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyLSEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyLSEdit.js index 716a2096..45fe78c6 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyLSEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyLSEdit.js @@ -176,15 +176,15 @@ Ext.extend(Shipping.MsOpApplyLSEdit, Ext.Panel, { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { - var recs = DsStoreQueryBy(this.storeUserBase, 'USERID', records[0].data.GID); - - var SALEDEPT = this.formHead.getForm().findField('SALEDEPT'); - if (recs.getCount() > 0) { - var data = recs.getAt(0).data; - SALEDEPT.setValue(data.DEPTNAME); - } else { - SALEDEPT.setValue(''); - } + //var recs = DsStoreQueryBy(this.storeUserBase, 'USERID', records[0].data.GID); + + //var SALEDEPT = this.formHead.getForm().findField('SALEDEPT'); + //if (recs.getCount() > 0) { + // var data = recs.getAt(0).data; + // SALEDEPT.setValue(data.DEPTNAME); + //} else { + // SALEDEPT.setValue(''); + //} } } } @@ -203,7 +203,15 @@ Ext.extend(Shipping.MsOpApplyLSEdit, Ext.Panel, { name: 'OP', valueField: 'UserName', displayField: 'CodeAndName', - value: SHOWNAME + value: SHOWNAME, + listeners: { + scope: this, + 'select': function (combo, records, eOpts) { + if (records.length > 0) { + this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); + } + } + } }); this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js index ded7aa1b..fbbdf440 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js @@ -97,8 +97,8 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { - if (this.SALEORDERDEPTBYOP == 0) - this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); + //if (this.SALEORDERDEPTBYOP == 0) + // this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); } } } @@ -136,8 +136,7 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { - if (this.SALEORDERDEPTBYOP == 1) - this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); + this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); } } } diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOther_CangDanEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOther_CangDanEdit.js index 081ce628..e99b7605 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOther_CangDanEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOther_CangDanEdit.js @@ -97,8 +97,8 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { - if (this.SALEORDERDEPTBYOP == 0) - this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); + //if (this.SALEORDERDEPTBYOP == 0) + // this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); } } } @@ -136,7 +136,6 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { - if (this.SALEORDERDEPTBYOP == 1) this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); } } diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOther_KuaiDiEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOther_KuaiDiEdit.js index 24b55754..b298b0fc 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOther_KuaiDiEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOther_KuaiDiEdit.js @@ -97,8 +97,8 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { - if (this.SALEORDERDEPTBYOP == 0) - this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); + //if (this.SALEORDERDEPTBYOP == 0) + // this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); } } } @@ -136,7 +136,7 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { - if (this.SALEORDERDEPTBYOP == 1) + //if (this.SALEORDERDEPTBYOP == 1) this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); } }