DS7_JingHan
hanxuntao 2 years ago
parent 9dd8d82688
commit 2f69389a70

@ -590,6 +590,12 @@ namespace DSWeb.MvcShipping.Controllers
{ {
headData.DbOperationType = DbOperationType.DbotDel; 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.MASTERNO == null || headData.MASTERNO =="") { headData.MASTERNO = headData.BSNO; }
if (headData.ETA == "") headData.ETA = null; if (headData.ETA == "") headData.ETA = null;

@ -522,6 +522,12 @@ namespace DSWeb.MvcShipping.Controllers
{ {
headData.DbOperationType = DbOperationType.DbotDel; 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.MASTERNO == null || headData.MASTERNO =="") { headData.MASTERNO = headData.BSNO; }
if (headData.ETA == "") headData.ETA = null; if (headData.ETA == "") headData.ETA = null;

@ -482,6 +482,12 @@ namespace DSWeb.MvcShipping.Controllers
{ {
headData.DbOperationType = DbOperationType.DbotDel; 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.MASTERNO == null) { headData.MASTERNO = headData.BSNO; }
if (headData.CUSTOMDATE == "") headData.CUSTOMDATE = null; if (headData.CUSTOMDATE == "") headData.CUSTOMDATE = null;
if (headData.CLEARCUSTOMDATE == "") headData.CLEARCUSTOMDATE = null; if (headData.CLEARCUSTOMDATE == "") headData.CLEARCUSTOMDATE = null;

@ -539,6 +539,12 @@ namespace DSWeb.MvcShipping.Controllers
{ {
headData.DbOperationType = DbOperationType.DbotDel; 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; } //if (headData.CTNNUM == null) { headData.CTNNUM = 0; }
#region 判断字段长度 #region 判断字段长度

@ -977,6 +977,12 @@ namespace DSWeb.MvcShipping.Controllers
if (_dmb.BSSOURCE != "") headData.BSSOURCE = _dmb.BSSOURCE; if (_dmb.BSSOURCE != "") headData.BSSOURCE = _dmb.BSSOURCE;
} }
headData.BSSOURCE = headData.BSSOURCE.Trim(); 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.MASTERNO == null) { headData.MASTERNO = headData.BSNO; }
if (headData.ETA == "") headData.ETA = null; if (headData.ETA == "") headData.ETA = null;

@ -1961,6 +1961,12 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
* */ * */
} }
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); 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!= "市场部") if (headData.MBLNO != "" && headData.MBLNO != null && headData.BLTYPE != "拼箱分票"&&headData.SALEDEPT!= "市场部")

@ -175,8 +175,8 @@ Ext.extend(Shipping.MsOpApplyEdit, Ext.Panel, {
scope: this, scope: this,
'select': function (combo, records, eOpts) { 'select': function (combo, records, eOpts) {
if (records.length > 0) { if (records.length > 0) {
if (this.SALEORDERDEPTBYOP == 0) //if (this.SALEORDERDEPTBYOP == 0)
this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); // this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME);
} }
} }
} }
@ -200,7 +200,6 @@ Ext.extend(Shipping.MsOpApplyEdit, Ext.Panel, {
scope: this, scope: this,
'select': function (combo, records, eOpts) { 'select': function (combo, records, eOpts) {
if (records.length > 0) { 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);
} }
} }

@ -176,15 +176,15 @@ Ext.extend(Shipping.MsOpApplyLSEdit, Ext.Panel, {
scope: this, scope: this,
'select': function (combo, records, eOpts) { 'select': function (combo, records, eOpts) {
if (records.length > 0) { if (records.length > 0) {
var recs = DsStoreQueryBy(this.storeUserBase, 'USERID', records[0].data.GID); //var recs = DsStoreQueryBy(this.storeUserBase, 'USERID', records[0].data.GID);
var SALEDEPT = this.formHead.getForm().findField('SALEDEPT'); //var SALEDEPT = this.formHead.getForm().findField('SALEDEPT');
if (recs.getCount() > 0) { //if (recs.getCount() > 0) {
var data = recs.getAt(0).data; // var data = recs.getAt(0).data;
SALEDEPT.setValue(data.DEPTNAME); // SALEDEPT.setValue(data.DEPTNAME);
} else { //} else {
SALEDEPT.setValue(''); // SALEDEPT.setValue('');
} //}
} }
} }
} }
@ -203,7 +203,15 @@ Ext.extend(Shipping.MsOpApplyLSEdit, Ext.Panel, {
name: 'OP', name: 'OP',
valueField: 'UserName', valueField: 'UserName',
displayField: 'CodeAndName', 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', { this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {

@ -97,8 +97,8 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, {
scope: this, scope: this,
'select': function (combo, records, eOpts) { 'select': function (combo, records, eOpts) {
if (records.length > 0) { if (records.length > 0) {
if (this.SALEORDERDEPTBYOP == 0) //if (this.SALEORDERDEPTBYOP == 0)
this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); // this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME);
} }
} }
} }
@ -136,7 +136,6 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, {
scope: this, scope: this,
'select': function (combo, records, eOpts) { 'select': function (combo, records, eOpts) {
if (records.length > 0) { 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);
} }
} }

@ -97,8 +97,8 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, {
scope: this, scope: this,
'select': function (combo, records, eOpts) { 'select': function (combo, records, eOpts) {
if (records.length > 0) { if (records.length > 0) {
if (this.SALEORDERDEPTBYOP == 0) //if (this.SALEORDERDEPTBYOP == 0)
this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); // this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME);
} }
} }
} }
@ -136,7 +136,6 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, {
scope: this, scope: this,
'select': function (combo, records, eOpts) { 'select': function (combo, records, eOpts) {
if (records.length > 0) { 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);
} }
} }

@ -97,8 +97,8 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, {
scope: this, scope: this,
'select': function (combo, records, eOpts) { 'select': function (combo, records, eOpts) {
if (records.length > 0) { if (records.length > 0) {
if (this.SALEORDERDEPTBYOP == 0) //if (this.SALEORDERDEPTBYOP == 0)
this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); // this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME);
} }
} }
} }
@ -136,7 +136,7 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, {
scope: this, scope: this,
'select': function (combo, records, eOpts) { 'select': function (combo, records, eOpts) {
if (records.length > 0) { if (records.length > 0) {
if (this.SALEORDERDEPTBYOP == 1) //if (this.SALEORDERDEPTBYOP == 1)
this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME); this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME);
} }
} }

Loading…
Cancel
Save