聚合公司绑定功能修改

master
zhengyongxing 5 years ago
parent 14ad9ce93d
commit d937dbad55

@ -600,14 +600,14 @@ class AggregateFinanceStatementController extends ThinkController
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+6), $data['second_party_info']['address']);//邮寄地址
//开票信息
$invoice_data = "发票类型:".$data['second_party_info']['invoice_type'];
$invoice_data .= "\n发票抬头".$data['second_party_info']['partner'];
$invoice_data .= "\n纳税人识别号".$data['second_party_info']['company_tax_no'];
$invoice_data = "发票类型:".$data['pay_company']['invoice_type'];
$invoice_data .= "\n发票抬头".$data['pay_company']['partner'];
$invoice_data .= "\n纳税人识别号".$data['pay_company']['company_tax_no'];
$invoice_data .= "\n开户银行".$data['second_party_info']['opening_bank'];
$invoice_data .= "\n开户账号".$data['second_party_info']['payee_name'];
$invoice_data .= "\n开票内容".$data['second_party_info']['invoice_item'];
$invoice_data .= "\n注册地址及电话".$data['second_party_info']['register_address'].",".$data['second_party_info']['register_phone'];
$invoice_data .= "\n开户银行".$data['pay_company']['opening_bank'];
$invoice_data .= "\n开户账号".$data['pay_company']['bank_account'];
$invoice_data .= "\n开票内容".$data['pay_company']['invoice_item'];
$invoice_data .= "\n注册地址及电话".$data['pay_company']['register_address'].",".$data['second_party_info']['register_phone'];
$objPHPExcel->getActiveSheet()->setCellValue('B'.($line+7), $invoice_data);//乙方

@ -114,8 +114,8 @@ class AggregateRelationController extends AdminController
unset($GetData['export']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),"op_name"=>"导出",'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData)]);
data2csv($dbres,'公司绑定生效列表',array(
"first_company_name"=>"甲方公司类型",
"first_company_type"=>"甲方公司",
"first_company_name"=>"甲方公司",
"first_company_type"=>"甲方公司类型",
"second_company_name"=>"乙方公司",
"second_company_type"=>"乙方公司类型",
"settlement_type"=>"结算周期",
@ -511,6 +511,18 @@ class AggregateRelationController extends AdminController
(second_company_type ='{$p['second_company_type']}' and second_company_id = '{$p['second_company_id']}')
";
}
if ($y['first_company_type'] == 3) {
$company_info = json_decode($y['first_company_info'],true);
$company_info['invoice_item'] = $p['invoice_content'];
$p['first_company_info'] = json_encode($company_info);
}else if ($y['second_company_type'] == 3) {
$company_info = json_decode($y['second_company_info'],true);
$company_info['invoice_item'] = $p['invoice_content'];
$p['second_company_info'] = json_encode($company_info);
}
$hasdb = $this->DBlogModel->where($where)->find();
if(!empty($hasdb)){
//覆盖
@ -529,10 +541,17 @@ class AggregateRelationController extends AdminController
$id = $params['id'] ?? 0;
$id = intval($id);
$map['id'] = $id;
$dbres = $this->DBModel->where($map)->find();
$this->assign('first_company_info',$this->getCompanyInfo($dbres['first_company_type'],$dbres['first_company_id']));
$this->assign('second_company_info',$this->getCompanyInfo($dbres['second_company_type'],$dbres['second_company_id']));
$check_data = [688,689,690,691];
if(in_array($dbres['first_company_id'],$check_data)||in_array($dbres['second_company_id'],$check_data)) {
$this->assign('hav_check',1);
}
$dbres['first_company_type'] =$this->CompanyType[$dbres['first_company_type']];
$dbres['second_company_type'] =$this->CompanyType[$dbres['second_company_type']];
@ -641,6 +660,12 @@ class AggregateRelationController extends AdminController
$this->getAggegateCompanyInfo($id);
//聚合下游
$companyInfo = $this->aggregateCompanyInfo;
if($companyInfo['invoice_type'] == 1) {
$companyInfo['invoice_type'] = '专票';
} else if($companyInfo['invoice_type'] == 2) {
$companyInfo['invoice_type'] = '普票';
}
}
if(isset($companyInfo['company_belong'])){
$companyInfo['company_belong'] = getCompanyBlong($companyInfo['company_belong']);

@ -400,7 +400,7 @@ $(function(){
$('#invoice_type').find("option").each(function() {
$(this).removeAttr("selected");
});
console.log(invoice_type)
if (!invoice_type) {
$('#invoice_type').removeAttr("disabled");
} else {

@ -151,7 +151,7 @@
<tr>
<td class="l"><i class="mustmark">*</i>结算周期:</td>
<td class="r">
<select name="settlement_type" id="settlement_type" class="select_gallery">
<select name="settlement_type" id="settlement_type" class="select_gallery" <if condition="$hav_check eq 1">disabled</if>>
<option value="0" <if condition="$data['settlement_type'] eq 0">selected</if>>无</option>
<option value="1" <if condition="$data['settlement_type'] eq 1">selected</if>>周结</option>
<option value="2" <if condition="$data['settlement_type'] eq 2">selected</if>>月结</option>
@ -162,7 +162,7 @@
<tr>
<td class="l"><i class="mustmark">*</i>开票类型:</td>
<td class="r">
<select name="invoice_type" id="invoice_type" class="select_gallery">
<select name="invoice_type" id="invoice_type" class="select_gallery" <if condition="$hav_check eq 1">disabled</if>>
<option value="0" <if condition="$data['invoice_type'] eq 0">selected</if>>无</option>
<option value="1" <if condition="$data['invoice_type'] eq 1">selected</if>>专票</option>
<option value="2" <if condition="$data['invoice_type'] eq 2">selected</if>>普票</option>

Loading…
Cancel
Save