@ -540,7 +540,7 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, {
this . onSubmitAuditClick ( ) ;
} ,
scope : this
} , '-' , {
} , {
id : 'btnSubmitAuditBack' ,
text : '撤销提交' ,
tooltip : '撤销提交' ,
@ -548,6 +548,22 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, {
this . onSubmitAuditBackClick ( ) ;
} ,
scope : this
} , '-' , {
text : '审核通过' , //审核通过
iconCls : "btnadd" ,
id : 'btnAuditPass' ,
handler : function ( button , event ) {
this . onAuditPassClick ( ) ;
} ,
scope : this
} , {
text : '驳回提交' , //审核通过
iconCls : "btndelete" ,
id : 'btnAuditBack' ,
handler : function ( button , event ) {
this . onAuditBackClick ( ) ;
} ,
scope : this
}
]
} ) ; //end 按钮Toolbar
@ -2011,7 +2027,77 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, {
//#endregion 明细表
//#region 驳回理由
this . formAuditBack = Ext . widget ( 'form' , {
frame : true ,
region : 'center' ,
title : "<a href='#'><font color='#FF0000'>驳回原因</font></a>" ,
bodyPadding : 5 ,
fieldDefaults : {
margins : '2 2 2 2' ,
labelAlign : 'right' ,
flex : 1 ,
labelWidth : 90 ,
msgTarget : 'qtip'
} ,
items : [ {
xtype : 'textareafield' ,
grow : true ,
fieldLabel : '' ,
labelSeparator : '' ,
labelWidth : 0 ,
height : 100 ,
name : 'ORREASON' ,
anchor : '100%'
}
] //end root items
} ) ;
me = this ;
this . winAuditBackShow = Ext . create ( 'Ext.window.Window' , {
title : "驳回收费申请" ,
width : 450 ,
//height : 120,
//plain : true,
iconCls : "addicon" ,
resizable : false ,
// 是否可以拖动
// draggable:false,
collapsible : true , // 允许缩放条
closeAction : 'close' ,
closable : true ,
modal : 'true' ,
buttonAlign : "center" ,
bodyStyle : "padding:0 0 0 0" ,
items : [ this . formAuditBack ] ,
buttons : [ {
text : "确认驳回" ,
minWidth : 70 ,
handler : function ( ) {
var form = me . formAuditBack . getForm ( ) ;
var ORREASON = form . findField ( 'ORREASON' ) . getRawValue ( ) ;
if ( ORREASON == '' || ORREASON == null || ORREASON == undefined ) {
Ext . Msg . show ( { title : '提示' , msg : '驳回原因为必填!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
} ;
me . reason = ORREASON ;
me . onAuditBack ( ORREASON ) ;
me . winAuditBackShow . close ( ) ;
}
} , {
text : "关闭" ,
minWidth : 70 ,
handler : function ( ) {
me . winAuditBackShow . close ( ) ;
}
} ]
} ) ;
//#endregion
//#region 布局
//控件布局
@ -2240,6 +2326,28 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, {
if ( this . opStatus == 'edit' )
condition = " BILLNO='" + this . editRecord . get ( 'BILLNO' ) + "'" ;
Ext . getCmp ( 'btnAuditPass' ) . hide ( ) ;
Ext . getCmp ( 'btnAuditBack' ) . hide ( ) ;
Ext . Ajax . request ( {
waitMsg : '' ,
url : '/MvcShipping/MsBaseInfo/GetUserModuleEnable' ,
params : {
modulename : "modRevcAppAudit"
} ,
callback : function ( options , success , response ) {
if ( success ) {
var result = Ext . JSON . decode ( response . responseText ) ;
if ( result . Success ) {
Ext . getCmp ( 'btnAuditPass' ) . show ( ) ;
Ext . getCmp ( 'btnAuditBack' ) . show ( ) ;
}
} else {
}
} ,
scope : this
} ) ;
this . LoadData ( this . opStatus , condition ) ;
this . LoadMustBe ( ) ;
@ -3850,7 +3958,7 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, {
}
if ( ( bsStatus != 1 ) && ( bsStatus != 6 ) ) {
this. setSaveBtnStatus ( false ) ;
_ this. setSaveBtnStatus ( false ) ;
} else {
_this . setSaveBtnStatus ( canedit ) ;
}
@ -4000,7 +4108,9 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, {
sum = sum . toFixed ( 2 ) ;
Ext . getCmp ( "zongshu" ) . setText ( " 选中金额:" + sum ) ;
} , onAddFileClick : function ( ) {
}
, onAddFileClick : function ( ) {
if ( BillState != '未提交' && BillState != '审核驳回' ) { //未提交
Ext . MessageBox . alert ( Zi . LAN . Prompt , Zi . LAN . noallowxiugai ) ; //提示', '当前状态不允许修改附件列表
return ;
@ -4013,7 +4123,9 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, {
winAccess . BillNo = BillNo ;
winAccess . FileBillType = "收费申请" ;
winAccess . show ( ) ;
} , onDelFileClick : function ( ) {
}
, onDelFileClick : function ( ) {
if ( BillState != '未提交' && BillState != '审核驳回' ) { //未提交
Ext . MessageBox . alert ( Zi . LAN . Prompt , Zi . LAN . noallowxiugai ) ; //提示', '当前状态不允许修改附件列表!
return ;
@ -4058,6 +4170,164 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, {
}
} , this ) ;
}
, onAuditPassClick : function ( ) {
var BILLNO = this . formEdit . getForm ( ) . findField ( 'BILLNO' ) . getValue ( ) ;
var BILLSTATUS = this . formEdit . getForm ( ) . findField ( 'BILLSTATUS' ) . getValue ( ) ;
if ( BILLNO == '*' ) {
Ext . Msg . show ( { title : '提示' , msg : '请先保存收费申请,然后才能审核!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
} ;
var basicForm = this . formEdit . getForm ( ) ;
if ( ! basicForm . isValid ( ) ) {
return ;
}
var bodyAddDatas = [ ] ;
this . formEdit . getForm ( ) . findField ( 'BILLSTATUS' ) . setDisabled ( false ) ;
this . formEdit . getForm ( ) . findField ( 'APPLICANT' ) . setDisabled ( false ) ;
this . formEdit . getForm ( ) . findField ( 'COMPANYID' ) . setDisabled ( false ) ;
var data = basicForm . getValues ( ) ;
this . formEdit . getForm ( ) . findField ( 'BILLSTATUS' ) . setDisabled ( true ) ;
this . formEdit . getForm ( ) . findField ( 'APPLICANT' ) . setDisabled ( true ) ;
this . formEdit . getForm ( ) . findField ( 'COMPANYID' ) . setDisabled ( true ) ;
if ( ( BILLSTATUS == '6' || BILLSTATUS == '2' ) ) {
var rec = { } ;
rec . data = data ;
bodyAddDatas . push ( rec ) ;
} else {
Ext . Msg . show ( { title : '提示' , msg : '只有提交审核和驳回审核的才能审核!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
} ;
var jsonbodyAddDatas = ConvertRecordsToJsonAll ( bodyAddDatas ) ;
_this = this ;
Ext . MessageBox . confirm ( '提示' , '确认要审核吗?' , function ( btn ) {
if ( btn == 'yes' ) {
Ext . Msg . wait ( '正在审核...' ) ;
Ext . Ajax . request ( {
waitMsg : '正在审核...' ,
url : '/Account/Chfee_recvapplication/AuditList' ,
params : {
data : jsonbodyAddDatas
} ,
callback : function ( options , success , response ) {
if ( success ) {
var jsonresult = Ext . JSON . decode ( response . responseText ) ;
if ( jsonresult . Success ) {
condition = " BILLNO='" + BILLNO + "'" ;
_this . LoadData ( 'edit' , condition ) ;
Ext . Msg . show ( { title : '提示' , msg : jsonresult . Message , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
}
else {
Ext . Msg . show ( { title : '错误' , msg : jsonresult . Message , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
}
}
} ,
failure : function ( response , options ) {
Ext . Msg . show ( { title : '错误' , msg : '服务器响应出错!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
} ,
success : function ( response , options ) {
} ,
scope : this
} ) ; //end Ext.Ajax.request
}
} , this ) ;
} ,
onAuditBackClick : function ( ) {
this . winAuditBackShow . show ( ) ;
} ,
onAuditBack : function ( ORREASON ) {
var BILLNO = this . formEdit . getForm ( ) . findField ( 'BILLNO' ) . getValue ( ) ;
var BILLSTATUS = this . formEdit . getForm ( ) . findField ( 'BILLSTATUS' ) . getValue ( ) ;
if ( BILLNO == '*' ) {
Ext . Msg . show ( { title : '提示' , msg : '请先保存收费申请,然后才能审核!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
} ;
var basicForm = this . formEdit . getForm ( ) ;
if ( ! basicForm . isValid ( ) ) {
return ;
}
var bodyAddDatas = [ ] ;
this . formEdit . getForm ( ) . findField ( 'BILLSTATUS' ) . setDisabled ( false ) ;
this . formEdit . getForm ( ) . findField ( 'APPLICANT' ) . setDisabled ( false ) ;
this . formEdit . getForm ( ) . findField ( 'COMPANYID' ) . setDisabled ( false ) ;
var data = basicForm . getValues ( ) ;
this . formEdit . getForm ( ) . findField ( 'BILLSTATUS' ) . setDisabled ( true ) ;
this . formEdit . getForm ( ) . findField ( 'APPLICANT' ) . setDisabled ( true ) ;
this . formEdit . getForm ( ) . findField ( 'COMPANYID' ) . setDisabled ( true ) ;
if ( ( BILLSTATUS == '0' || BILLSTATUS == '2' ) ) {
var rec = { } ;
rec . data = data ;
bodyAddDatas . push ( rec ) ;
} else {
Ext . Msg . show ( { title : '提示' , msg : '只有提交审核或审核通过的才能驳回!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
} ;
var jsonbodyAddDatas = ConvertRecordsToJsonAll ( bodyAddDatas ) ;
_this = this ;
Ext . Msg . wait ( '正在驳回审核...' ) ;
Ext . Ajax . request ( {
waitMsg : '正在驳回审核...' ,
url : '/Account/Chfee_recvapplication/AuditBackList' ,
params : {
data : jsonbodyAddDatas ,
ORREASON : ORREASON
} ,
callback : function ( options , success , response ) {
if ( success ) {
var jsonresult = Ext . JSON . decode ( response . responseText ) ;
if ( jsonresult . Success ) {
condition = " BILLNO='" + BILLNO + "'" ;
_this . LoadData ( 'edit' , condition ) ;
_this . winAuditBackShow . close ( ) ;
Ext . Msg . show ( { title : '提示' , msg : jsonresult . Message , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
}
else {
Ext . Msg . show ( { title : '错误' , msg : jsonresult . Message , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
}
}
} ,
failure : function ( response , options ) {
Ext . Msg . show ( { title : '错误' , msg : '服务器响应出错!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
} ,
success : function ( response , options ) {
} ,
scope : this
} ) ; //end Ext.Ajax.request
}
} ) ;