@@ -48,6 +48,13 @@ class mode_contract_listClassAction extends inputAction{
...
@@ -48,6 +48,13 @@ class mode_contract_listClassAction extends inputAction{
$sql=' number = "'.$numb.'"';
$sql=' number = "'.$numb.'"';
$cdata=m($model)->getone($sql,'id,name');
$cdata=m($model)->getone($sql,'id,name');
if(empty($cdata)){
$model='customer';
$sql=' contract_number = "'.$numb.'"';
$cdata=m($model)->getone($sql,'id,name');
}
if($cdata){
if($cdata){
$sql="select CONCAT('开户银行: ',`open_bank_name` ,' -- 银行账号: ',`bank_code` ) as `name`,`bank_code` as `value` from [Q]".$model."_bank_info where mid = ".$cdata['id'];
$sql="select CONCAT('开户银行: ',`open_bank_name` ,' -- 银行账号: ',`bank_code` ) as `name`,`bank_code` as `value` from [Q]".$model."_bank_info where mid = ".$cdata['id'];
$data=$this->db->getall($sql);
$data=$this->db->getall($sql);
...
@@ -57,7 +64,7 @@ class mode_contract_listClassAction extends inputAction{
...
@@ -57,7 +64,7 @@ class mode_contract_listClassAction extends inputAction{
$this->returnjson($data);
$this->returnjson($data);
}
}
publicfunctiongetbankcodebymidAjax(){
publicfunctiongetbankcodebymidAjax(){
$mid=$this->post('mid');
$mid=$this->post('mid');
...
@@ -117,33 +124,58 @@ class mode_contract_listClassAction extends inputAction{
...
@@ -117,33 +124,58 @@ class mode_contract_listClassAction extends inputAction{