From 2f69389a70a2dd37866bb0844223d2f227fc2d7b Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Tue, 21 Mar 2023 16:02:55 +0800 Subject: [PATCH 1/2] 1 --- .../Controllers/MsOpAireController.cs | 6 ++++ .../Controllers/MsOpAiriController.cs | 6 ++++ .../Controllers/MsOpApplyController.cs | 6 ++++ .../Controllers/MsOpOtherController.cs | 6 ++++ .../Controllers/MsOpSeaiController.cs | 6 ++++ .../MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs | 6 ++++ .../Viewsjs/MsOpApply/MsOpApplyEdit.js | 5 ++-- .../Viewsjs/MsOpApply/MsOpApplyLSEdit.js | 28 ++++++++++++------- .../Viewsjs/MsOpOther/MsOpOtherEdit.js | 5 ++-- .../MsOpOther/MsOpOther_CangDanEdit.js | 5 ++-- .../Viewsjs/MsOpOther/MsOpOther_KuaiDiEdit.js | 6 ++-- 11 files changed, 63 insertions(+), 22 deletions(-) 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..4fc35068 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,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_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); } } From 076e410175911cf8c73ba2561845e70491df6a5a Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Tue, 21 Mar 2023 16:32:16 +0800 Subject: [PATCH 2/2] 1 --- DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js index 4fc35068..fbbdf440 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js @@ -136,7 +136,7 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { - this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); + this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); } } }