@ -67,16 +67,16 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
} ) ;
this . storeOpCode . load ( ) ;
//客服
// this.comboxCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', {
// fieldLabel: '客服',
// store: this.storeOpCode,
//// flex: 0.5,
// forceSelection: true,
// name: 'CUSTSERVICE',
// valueField: 'UserName',
// displayField: 'CodeAndName',
// value: SHOWNAME
// });
// this.comboxCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', {
// fieldLabel: '客服',
// store: this.storeOpCode,
//// flex: 0.5,
// forceSelection: true,
// name: 'CUSTSERVICE',
// valueField: 'UserName',
// displayField: 'CodeAndName',
// value: SHOWNAME
// });
this . storeOpCode2 = Ext . create ( 'DsExt.ux.RefTableStore' , {
model : 'DsShipping.ux.UserRefModel' ,
@ -113,8 +113,8 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
this . comboxDept = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : '所属部门' , //'所属部门',
store : this . storeDept ,
// flex: 0.5,
// labelWidth: 60,
// flex: 0.5,
// labelWidth: 60,
forceSelection : true ,
name : 'SALEDEPT' ,
value : DEPTNAME ,
@ -149,7 +149,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
model : 'DsShipping.ux.CustomRefModel' ,
proxy : { url : '/CommMng/BasicDataRef/GetCustomRefList' }
} ) ;
this . storeCustCode . load ( { params : { condition : "ISCONTROLLER='1'" } } ) ;
this . storeCustCode . load ( { params : { condition : "ISCONTROLLER='1'" } } ) ;
this . comboxCustCode = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : '委托单位' ,
store : this . storeCustCode ,
@ -169,7 +169,8 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
this . formHead . getForm ( ) . findField ( 'SALECORPID' ) . setValue ( records [ 0 ] . data . SALECORPID ) ;
this . formHead . getForm ( ) . findField ( 'SALE' ) . setValue ( records [ 0 ] . data . SALE ) ;
var s = " LINKID in (select gid from [info_client] where SHORTNAME='" + combo . value + "')" ;
this . storeInfoClientContact . load ( { params : { condition : s } ,
this . storeInfoClientContact . load ( {
params : { condition : s } ,
callback : function ( r , options , success ) {
if ( success ) {
if ( this . storeInfoClientContact . getCount ( ) > 0 ) {
@ -238,7 +239,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
model : 'DsShipping.ux.TSysEnumValueDataModel' ,
proxy : { url : '/CommMng/BasicDataRef/GetTSysEnumValueList' }
} ) ;
this . storeTSysEnumValueCode . load ( { params : { condition : " and EnumTypeID=96023" } } ) ;
this . storeTSysEnumValueCode . load ( { params : { condition : " and EnumTypeID=96023" } } ) ;
this . comboxTRANSTYPE = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : '运输类型' ,
store : this . storeTSysEnumValueCode ,
@ -254,7 +255,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
model : 'DsShipping.ux.CrmKeyCodeModel' ,
proxy : { url : '/CommMng/BasicDataRef/GetCrmKeyCodeList' }
} ) ;
this . storeCrmKeyCodeCode . load ( { params : { condition : " and KEYTYPE='贸易方式'" } } ) ;
this . storeCrmKeyCodeCode . load ( { params : { condition : " and KEYTYPE='贸易方式'" } } ) ;
this . comboxTRADETYPE = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : '贸易方式' ,
store : this . storeCrmKeyCodeCode ,
@ -310,7 +311,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
if ( recs . getCount ( ) > 0 ) {
var data = recs . getAt ( 0 ) . data ;
var s = "SOURCEID='" + data . SourceID + "'" ;
this . storeSourceDetail . load ( { params : { condition : s } } ) ;
this . storeSourceDetail . load ( { params : { condition : s } } ) ;
} else {
var BSSOURCEDETAIL = this . formHead . getForm ( ) . findField ( 'BSSOURCEDETAIL' ) ;
BSSOURCEDETAIL . setValue ( '' ) ;
@ -344,8 +345,9 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
store : this . StoreBSTYPE ,
fieldLabel : '业务类型' ,
forceSelection : true ,
id : 'BILLTYPE' ,
name : 'BILLTYPE' ,
value : '主单' ,
value : '主单' ,
valueField : 'BSTYPE' ,
displayField : 'BSTYPE'
} ) ;
@ -361,7 +363,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
fieldLabel : '预付到付' ,
forceSelection : true ,
name : 'FEEFRT' ,
value : 'PP' ,
value : 'PP' ,
valueField : 'Frt' ,
displayField : 'Frt'
} ) ;
@ -406,7 +408,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
this . storeSaleCompany . load ( { params : { condition : "" } } ) ;
this . comboxSaleCompany = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : '所属分部' , //'委托分公司',
fieldLabel : '所属分部' , //'委托分公司',
store : this . storeSaleCompany ,
forceSelection : true ,
name : 'SALECORPID' ,
@ -488,7 +490,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
name : 'CORPID' , hidden : true
} , {
fieldLabel : '业务编号' ,
name : 'CUSTNO' , readOnly : true
name : 'CUSTNO' , readOnly : true
} , {
fieldLabel : '会计期间' ,
xtype : 'monthfield' ,
@ -529,7 +531,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
this . comboxSALE ,
this . comboxDept ,
this . comboxSaleCompany
]
]
} , {
xtype : 'container' ,
layout : 'hbox' ,
@ -542,21 +544,21 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
flex : 1 ,
defaultType : 'textfield' ,
items : [
{
fieldLabel : 'HAWB NO' , //'委托编号',
//allowBlank: true,
readOnly : true ,
name : 'HBLNO'
} , {
xtype : 'button' ,
id : 'btnCUSTNO' ,
iconCls : "btncancel" ,
handler : function ( button , event ) {
this . GetNewHBLNO ( ) ;
} ,
scope : this
} ]
fieldLabel : 'HAWB NO' , //'委托编号',
//allowBlank: true,
readOnly : true ,
name : 'HBLNO'
} , {
xtype : 'button' ,
id : 'btnCUSTNO' ,
iconCls : "btncancel" ,
handler : function ( button , event ) {
this . GetNewHBLNO ( ) ;
} ,
scope : this
} ]
} ,
{
fieldLabel : 'MAWB NO' ,
@ -568,7 +570,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
}
}
//allowBlank: false
//allowBlank: false
}
, this . comboxFeeFrt
, this . comboxTRANSFERCOMPANY
@ -678,7 +680,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
xtype : "textarea"
}
]
}
}
] //end items(fieldset 1)
} ] //end root items
@ -696,14 +698,14 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
} ,
scope : this
} , {
id : 'btnENext' ,
text : "下一票" , //"下一票",
// iconCls: "btnsave",
handler : function ( button , event ) {
this . NextRecord ( ) ;
} ,
scope : this
} , {
id : 'btnENext' ,
text : "下一票" , //"下一票",
// iconCls: "btnsave",
handler : function ( button , event ) {
this . NextRecord ( ) ;
} ,
scope : this
} , {
id : 'btnESave' ,
text : "保存" ,
iconCls : "btnsave" ,
@ -725,47 +727,106 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
this . Save ( '2' ) ;
} ,
scope : this
} , , {
text : '复制新建' , //"国外舱单",
menu : [ {
id : 'btnECopyNew' ,
text : "复制新建" ,
handler : function ( button , event ) {
var btnESave = Ext . getCmp ( 'btnESave' ) ;
} , , {
text : '复制新建' , //"国外舱单",
menu : [
{
id : 'btnECopyNew' ,
text : "复制新建" ,
handler : function ( button , event ) {
if ( this . opStatus == 'add' ) {
Ext . Msg . show ( { title : '注意' , msg : '请先保存业务信息后再打开其他模块!' , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
return ;
}
var btnESave = Ext . getCmp ( 'btnESave' ) ;
if ( btnESave . isDisabled ( ) || this . getIsModify == '' ) {
var basicForm = this . formHead . getForm ( ) ;
this . opStatus = 'add' ;
var field = basicForm . findField ( 'BSNO' ) ;
var oldbsno = field . getValue ( ) ;
this . LoadCopyData ( oldbsno , false ) ;
if ( btnESave . isDisabled ( ) || this . getIsModify == '' ) {
var basicForm = this . formHead . getForm ( ) ;
this . opStatus = 'add' ;
var field = basicForm . findField ( 'BSNO' ) ;
var oldbsno = field . getValue ( ) ;
this . LoadCopyData ( oldbsno , false ) ;
this . LoadPeriodStatus ( this . opStatus ) ;
var children = this . tabOtherPanel . items ;
if ( children ) {
for ( var i = children . length - 1 , len = 0 ; i >= len ; i -- ) {
if ( children . items [ i ] . id ) {
if ( children . items [ i ] . id == 'pnlmodOpOtherInfo' ) {
// this.tabSeaepanel.setActiveTab(i);
} else {
children . items [ i ] . close ( ) ;
}
this . LoadPeriodStatus ( this . opStatus ) ;
var children = this . tabOtherPanel . items ;
if ( children ) {
for ( var i = children . length - 1 , len = 0 ; i >= len ; i -- ) {
if ( children . items [ i ] . id ) {
if ( children . items [ i ] . id == 'pnlmodOpOtherInfo' ) {
// this.tabSeaepanel.setActiveTab(i);
} else {
children . items [ i ] . close ( ) ;
}
}
}
this . tabOtherPanel . doLayout ( ) ;
}
this . tabOtherPanel . doLayout ( ) ;
} else {
this . CopyNew ( ) ;
} else {
this . copyfee = false ;
this . CopyNew ( false ) ;
}
this . panelOcr . hide ( ) ;
} ,
scope : this
}
, {
id : 'btnECopyNewFee' ,
text : '复制新建(含费用)' , //"复制新建",
handler : function ( button , event ) {
if ( this . opStatus == 'add' )
{
Ext . Msg . show ( { title : '注意' , msg : '请先保存业务信息后再打开其他模块!' , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
return ;
}
var btnESave = Ext . getCmp ( 'btnESave' ) ;
if ( btnESave . isDisabled ( ) || this . getIsModify == '' ) {
var basicForm = this . formHead . getForm ( ) ;
this . opStatus = 'add' ;
var field = basicForm . findField ( 'BSNO' ) ;
var oldbsno = field . getValue ( ) ;
this . LoadCopyData ( oldbsno , true , false ) ;
var children = this . tabOtherPanel . items ;
if ( children ) {
for ( var i = children . length - 1 , len = 0 ; i >= len ; i -- ) {
if ( children . items [ i ] . id ) {
if ( children . items [ i ] . id == 'pnlmodOpOtherInfo' ) {
// this.tabSeaepanel.setActiveTab(i);
} else {
children . items [ i ] . close ( ) ;
}
}
}
}
this . panelOcr . hide ( ) ;
} ,
scope : this
} , {
id : 'btnECopyNewFee' ,
text : '复制新建(含费用)' , //"复制新建",
this . tabOtherPanel . doLayout ( ) ;
} else {
this . copyfee = true ;
this . CopyNew ( false ) ;
}
this . panelOcr . hide ( ) ;
} ,
scope : this
}
, {
id : 'btnECopyNewFen' ,
text : "新建分单" ,
handler : function ( button , event ) {
if ( this . opStatus == 'add' )
{
Ext . Msg . show ( { title : '注意' , msg : '请先保存业务信息后再打开其他模块!' , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
return ;
}
var btnESave = Ext . getCmp ( 'btnESave' ) ;
if ( btnESave . isDisabled ( ) || this . getIsModify == '' ) {
@ -773,8 +834,9 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
this . opStatus = 'add' ;
var field = basicForm . findField ( 'BSNO' ) ;
var oldbsno = field . getValue ( ) ;
this . LoadCopyData ( oldbsno , true ) ;
this . LoadCopyData ( oldbsno , false , true ) ;
this . LoadPeriodStatus ( this . opStatus ) ;
var children = this . tabOtherPanel . items ;
if ( children ) {
for ( var i = children . length - 1 , len = 0 ; i >= len ; i -- ) {
@ -789,28 +851,25 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
}
this . tabOtherPanel . doLayout ( ) ;
} else {
this . copyfee = true ;
this . CopyNew ( ) ;
this . copyfee = false ;
this . CopyNew ( true ) ;
}
this . panelOcr . hide ( ) ;
} ,
scope : this
} ]
} , '-' , {
}
]
} , '-' , {
text : "关闭" ,
handler : function ( button , event ) {
window . close ( ) ;
} ,
scope : this
} , {
text : "新建" ,
id : 'btnENew' ,
text : "新建" ,
id : 'btnENew' ,
handler : function ( button , event ) {
this . LoadData ( 'add' , '' ) ;
} ,
@ -900,7 +959,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
// title: record.data.DESCRIPTION
// });
//} else
if ( record . data . NAME == 'modOpOtherAmendFee' ) {
if ( record . data . NAME == 'modOpOtherAmendFee' ) {
var paneltabitems = new Shipping . OtherAmendFee ( {
id : 'pnl' + record . data . NAME ,
layout : "border" ,
@ -934,7 +993,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
//#region 费用页面
this . panelFee = new Shipping . FeeEditGrid ( {
title : '应收应付费用' ,
title : '应收应付费用' ,
region : 'center' ,
layout : 'border'
} ) ;
@ -1036,7 +1095,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
this . GridBodyCheckBoxModel = Ext . create ( 'Ext.selection.CheckboxModel' ) ;
this . gridBodyList = new Ext . grid . GridPanel ( {
title : '车单' ,
title : '车单' ,
store : this . storeBodyList ,
enableHdMenu : false ,
region : 'center' ,
@ -1063,35 +1122,35 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
this . onDelBodyClick ( button , event ) ;
} ,
scope : this
} , {
id : 'btnESave2' ,
text : "保存" ,
iconCls : "btnsave" ,
handler : function ( button , event ) {
this . Save ( '0' ) ;
} ,
scope : this
} , {
text : "EXCEL导入" , //"EXCEL导入",
iconCls : "btnexportexcel" ,
handler : function ( button , event ) {
if ( this . opStatus == 'add' ) {
Ext . Msg . show ( { title : '注意' , msg : '请先保存业务信息后再打开其他模块!' , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
} else {
this . onImportBillClick ( button , event ) ;
}
} ,
scope : this
} , {
} , {
id : 'btnESave2' ,
text : "保存" ,
iconCls : "btnsave" ,
handler : function ( button , event ) {
this . Save ( '0' ) ;
} ,
scope : this
} , {
text : "EXCEL导入" , //"EXCEL导入",
iconCls : "btnexportexcel" ,
handler : function ( button , event ) {
if ( this . opStatus == 'add' ) {
Ext . Msg . show ( { title : '注意' , msg : '请先保存业务信息后再打开其他模块!' , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
} else {
this . onImportBillClick ( button , event ) ;
}
} ,
scope : this
} , {
text : '刷新' ,
id : 'bodyrefresh' ,
id : 'bodyrefresh' ,
tooltip : '刷新' ,
iconCls : "btnrefresh" ,
iconCls : "btnrefresh" ,
handler : function ( button , event ) {
this . storeBodyList . load ( { params : { BSNO : this . editRecord . get ( 'BSNO' ) } } ) ;
} ,
scope : this
} ] ,
} ,
scope : this
} ] ,
columns : [
{
sortable : false ,
@ -1109,7 +1168,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
sortable : true ,
dataIndex : 'ROWNUM' ,
header : '顺序号' ,
width : 60 ,
width : 60 ,
editor : {
xtype : 'numberfield' ,
selectOnFocus : true ,
@ -1368,9 +1427,9 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
id : "tabOtherPanel" ,
enableTabScroll : true ,
items :
[
this . panelOther
] ,
[
this . panelOther
] ,
listeners : {
scope : this ,
'beforetabchange' : function ( tabPanel , newCard , oldCard , eOpts ) {
@ -1480,7 +1539,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
//
if ( this . opStatus == 'edit' ) {
var s = "SOURCEID=(select SOURCEID from code_source where SOURCENAME='" + this . editRecord . get ( 'BSSOURCE' ) + "')" ;
this . storeSourceDetail . load ( { params : { condition : s } } ) ; //来源明细加载
this . storeSourceDetail . load ( { params : { condition : s } } ) ; //来源明细加载
//
condition = " BSNO='" + this . editRecord . get ( 'BSNO' ) + "'" ;
} else if ( this . opStatus == 'add' ) {
@ -1488,57 +1547,57 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
}
if ( this . opStatus == 'copyadd' ) {
this . LoadCopyData ( this . editRecord . get ( 'BSNO' ) , this . copyfee ) ;
this . LoadCopyData ( this . editRecord . get ( 'BSNO' ) , this . copyfee ) ;
} else {
if ( this . opStatus == 'edit' )
this . LoadData ( this . opStatus , condition ) ;
}
// this.storecodeservice.load({ params: { condition: "OPTYPE='7'" },
// callback: function (r, options, success) {
// if (success) {
// if (r.length != 0) {
// var checkboxitems = "";
// checkboxitems = "[";
// for (i = 0; i < this.storecodeservice.getCount(); i += 1) {
// var memberyf = this.storecodeservice.getAt(i);
// if (i == 0) {
// var checkboxSingleItem = "{boxLabel:'" + memberyf.data.SERVICENAME + "',inputValue:'1',name:'Is" + memberyf.data.OPField + "',id:'Is" + memberyf.data.OPField + "'";
// checkboxSingleItem += "}";
// } else {
// var checkboxSingleItem = ",{boxLabel:'" + memberyf.data.SERVICENAME + "',inputValue:'1',name:'Is" + memberyf.data.OPField + "',id:'Is" + memberyf.data.OPField + "'";
// checkboxSingleItem += "}";
// }
// checkboxitems += checkboxSingleItem;
// };
// checkboxitems += "]";
//// _this.myCheckboxGroup = new Ext.form.CheckboxGroup({
////// id: 'myGroup',
//// xtype: 'checkboxgroup',
//// fieldLabel: '服务项目',
//// columns: 8,
//// items: eval(checkboxitems)
//// });
//// _this.formHead.add(_this.myCheckboxGroup);
//// _this.formHead.doLayout();
// }
// if (this.opStatus == 'copyadd') {
// this.LoadCopyData(this.editRecord.get('BSNO'),this.copyfee);
// } else {
// if (this.opStatus == 'edit')
// this.LoadData(this.opStatus, condition);
// }
// //if (this.opStatus == 'add') {
// // this.LoadPeriod('add');
// //}
// }
// },
// scope: this
// });
// this.storecodeservice.load({ params: { condition: "OPTYPE='7'" },
// callback: function (r, options, success) {
// if (success) {
// if (r.length != 0) {
// var checkboxitems = "";
// checkboxitems = "[";
// for (i = 0; i < this.storecodeservice.getCount(); i += 1) {
// var memberyf = this.storecodeservice.getAt(i);
// if (i == 0) {
// var checkboxSingleItem = "{boxLabel:'" + memberyf.data.SERVICENAME + "',inputValue:'1',name:'Is" + memberyf.data.OPField + "',id:'Is" + memberyf.data.OPField + "'";
// checkboxSingleItem += "}";
// } else {
// var checkboxSingleItem = ",{boxLabel:'" + memberyf.data.SERVICENAME + "',inputValue:'1',name:'Is" + memberyf.data.OPField + "',id:'Is" + memberyf.data.OPField + "'";
// checkboxSingleItem += "}";
// }
// checkboxitems += checkboxSingleItem;
// };
// checkboxitems += "]";
//// _this.myCheckboxGroup = new Ext.form.CheckboxGroup({
////// id: 'myGroup',
//// xtype: 'checkboxgroup',
//// fieldLabel: '服务项目',
//// columns: 8,
//// items: eval(checkboxitems)
//// });
//// _this.formHead.add(_this.myCheckboxGroup);
//// _this.formHead.doLayout();
// }
// if (this.opStatus == 'copyadd') {
// this.LoadCopyData(this.editRecord.get('BSNO'),this.copyfee);
// } else {
// if (this.opStatus == 'edit')
// this.LoadData(this.opStatus, condition);
// }
// //if (this.opStatus == 'add') {
// // this.LoadPeriod('add');
// //}
// }
// },
// scope: this
// });
} , //end InitData
@ -1610,7 +1669,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
if ( CUSTOMERNAME != '' ) {
var s = " LINKID in (select gid from [info_client] where SHORTNAME='" + CUSTOMERNAME + "')" ;
this . storeInfoClientContact . load ( { params : { condition : s } } ) ;
this . storeInfoClientContact . load ( { params : { condition : s } } ) ;
}
this . LoadPeriod ( this . opStatus ) ;
@ -1634,7 +1693,11 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
this . panelFee . storeChFeeGain . load ( { params : { bsno : data . BSNO , optype : "op_other" } } ) ;
this . storeBodyList . load ( { params : { bsno : data . BSNO } } ) ;
} else {
this . setCanEdit ( ) ;
}
else {
Ext . MessageBox . alert ( '请求出现错误,请重试' , response . responseText ) ;
}
} ,
@ -1648,7 +1711,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
} ,
LoadCopyData : function ( bsno , CopyFee ) {
LoadCopyData : function ( bsno , CopyFee ,fen = false ) {
Ext . Ajax . request ( {
waitMsg : '正在查询主表数据...' ,
url : '/MvcShipping/MsOp_SuperVision_Truck/GetCopyData' ,
@ -1670,14 +1733,19 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
}
data = result . data ;
//this.LoadInit(data);
if ( fen ) {
data . BILLTYPE = "分单" ;
}
this . formHead . getForm ( ) . reset ( ) ;
this . formHead . getForm ( ) . setValues ( data ) ;
this . formEdit . getForm ( ) . reset ( ) ;
this . formEdit . getForm ( ) . setValues ( data ) ;
this . opStatus = 'add' ;
var arrNewRecords = this . storePLList . add ( data ) ;
this . editRecord = arrNewRecords [ 0 ] ;
this . Editdata = data ;
@ -1749,7 +1817,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
} ,
CopyNew : function ( typ e) {
CopyNew : function ( fen= fals e) {
var basicForm2 = this . formHead . getForm ( ) ;
if ( ! basicForm2 . isValid ( ) ) {
return ;
@ -1833,7 +1901,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
//basicForm.findField('BSNO').setDisabled(false);
var field = basicForm . findField ( 'BSNO' ) ;
var oldbsno = field . getValue ( ) ;
this . LoadCopyData ( oldbsno , this . copyfee );
this . LoadCopyData ( oldbsno , this . copyfee , fen );
var children = this . tabOtherPanel . items ;
if ( children ) {
for ( var i = children . length - 1 , len = 0 ; i >= len ; i -- ) {
@ -1974,7 +2042,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
//var jsonBody = ConvertRecordsToJsonAll(this.bodyDel);
var data = this . formHead . getForm ( ) . getValues ( false , false , false ) ;
var data2 = this . formEdit . getForm ( ) . getValues ( false , false , false ) ;
@ -2049,7 +2117,8 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
Ext . Msg . show ( { title : '错误' , msg : jsonresult . Message , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
}
} else {
Ext . Msg . show ( { title : '请重试' ,
Ext . Msg . show ( {
title : '请重试' ,
msg : '服务器响应出错' ,
icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK
} ) ;
@ -2151,7 +2220,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
var custno = _this . formHead . getForm ( ) . findField ( 'CUSTNO' ) ;
custno . setReadOnly ( false ) ;
_this . GetFeeCustNoStatus ( ) ;
;
;
} else {
if ( data . RULEBLNO == '' ) {
var custno = _this . formHead . getForm ( ) . findField ( 'CUSTNO' ) ;
@ -2200,7 +2269,8 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
} ) ;
} ,
LoadDefValue : function ( ) {
this . storeDefValue . load ( { params : { condition : "BSTYPE='综合业务'" } ,
this . storeDefValue . load ( {
params : { condition : "BSTYPE='综合业务'" } ,
callback : function ( r , options , success ) {
if ( success ) {
if ( this . storeDefValue . getCount ( ) > 0 ) {
@ -2229,7 +2299,8 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
} ,
LoadMustBe : function ( ) {
this . storeMustBe . load ( { params : { condition : "BSTYPE='综合业务'" } ,
this . storeMustBe . load ( {
params : { condition : "BSTYPE='综合业务'" } ,
callback : function ( r , options , success ) {
if ( success ) {
if ( this . storeMustBe . getCount ( ) > 0 ) {
@ -2321,7 +2392,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
} , //onDelDetailClick
BodyAfterEdit : function ( editor , e , eOpts ) {
//需要自己实现里面的事件
} ,
deleteDetail : function ( ) {
@ -2354,7 +2425,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
if ( success ) {
var jsonresult = Ext . JSON . decode ( response . responseText ) ;
if ( jsonresult . Success ) {
//Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
else {
@ -2370,7 +2441,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
Ext . MessageBox . hide ( ) ;
} ,
scope : this
} ) ;
} ) ;
}
} ,
@ -2390,7 +2461,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
PrevRecord : function ( ) {
var j = this . StoreList . indexOf ( this . editRecord ) ;
if ( j == 0 ) {
Ext . Msg . show ( { title : '警告' , msg : '已经是最前一票' , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ; //'警告', '已是最前一票'
Ext . Msg . show ( { title : '警告' , msg : '已经是最前一票' , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ; //'警告', '已是最前一票'
return ;
}
@ -2498,7 +2569,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
}
else return '' ;
} ,
SetHeadDate ( data ) {
if ( data . CreateTime )
data . CreateTime = data . CreateTime . replace ( " 00:00:00" , "" ) ;
@ -2607,7 +2678,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
GetNewHBLNO ( ) {
BSNO = this . editRecord . get ( 'BSNO' ) ;
_this = this ;
if ( this . opStatus == 'add' ) {
if ( this . opStatus == 'add' ) {
Ext . Msg . show ( { title : '注意' , msg : '请先保存业务信息后再打开其他模块!' , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
} else {
Ext . Ajax . request ( {
@ -2640,7 +2711,16 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
} ) ;
}
}
} ) ;
} ) ;
}
}
, setCanEdit ( ) {
var 主分单 = Ext . getCmp ( "BILLTYPE" ) ;
if ( this . opStatus == 'add' ) {
主分单 . readOnly = false ;
} else {
主分单 . readOnly = true ;
}
}
} ) ;