From b448f0829e47909d3bf1cbec33c5877fa347a951 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 10 Jul 2020 11:18:46 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyRelationController.class.php | 15 +++++++++++++- .../View/CompanyRelation/addRelation.html | 20 +++++++++++++------ .../View/CompanyRelation/editRelation.html | 1 + 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/Application/Admin/Controller/CompanyRelationController.class.php b/Application/Admin/Controller/CompanyRelationController.class.php index ae08d1d68..5e445006c 100644 --- a/Application/Admin/Controller/CompanyRelationController.class.php +++ b/Application/Admin/Controller/CompanyRelationController.class.php @@ -4,6 +4,16 @@ namespace Admin\Controller; class CompanyRelationController extends AdminController { + /** + * @var 默认甲方公司类型 + */ + const COMPANY_TYPE_DEFAULT_A = '0'; + + /** + * @var 默认甲方公司类型 + */ + const COMPANY_TYPE_DEFAULT_B = '2'; + public $admininfo; public $DBModel; public $DBlogModel; @@ -26,6 +36,7 @@ class CompanyRelationController extends AdminController "2"=>"月结" ]; public $InvoiceType=[ + "0"=>"无", "1"=>"专票", "2"=>"普票" ]; @@ -379,7 +390,9 @@ class CompanyRelationController extends AdminController $this->ajaxReturn(["msg"=>"添加成功","code"=>1,"url"=>U("lists")]); } else { - $this->assign('companyType',$this->CompanyType); + $this->assign('defaultCompanyTypeA', self::COMPANY_TYPE_DEFAULT_A); + $this->assign('defaultCompanyTypeB', self::COMPANY_TYPE_DEFAULT_B); + $this->assign('companyType', $this->CompanyType); $this->display(); } } diff --git a/Application/Admin/View/CompanyRelation/addRelation.html b/Application/Admin/View/CompanyRelation/addRelation.html index a7ffd7ce6..869d5fad4 100644 --- a/Application/Admin/View/CompanyRelation/addRelation.html +++ b/Application/Admin/View/CompanyRelation/addRelation.html @@ -107,7 +107,7 @@ @@ -142,7 +142,7 @@ @@ -175,8 +175,8 @@ *结算周期: @@ -186,7 +186,8 @@ *开票类型: @@ -333,10 +334,15 @@ $(function(){ first_company = data.info; var companystr = ''; for (var i in first_company) { - companystr += "" + var selected = '' + if (first_company[i].company_name == '福建金菠菜网络科技有限公司') { + selected = 'selected' + } + companystr += "" } $("#first_company_id").html(companystr); $("#first_company_id").select2(); + $("#first_company_id").change(); }) }) $("#first_company_id").on("change",function(){ @@ -349,6 +355,7 @@ $(function(){ $("#first_company_name").val(companyinfo.company_name); $("#first_company_info").html(setCompanyInfo(companyinfo)); }); + $("#first_company_type").change(); $("#second_company_type").on("change",function(){ //置空 @@ -369,6 +376,7 @@ $(function(){ $("#second_company_id").select2(); }) }) + $("#second_company_type").change(); $("#second_company_id").on("change",function(){ var id = $(this).find("option:selected").val(); //获取基础信息 diff --git a/Application/Admin/View/CompanyRelation/editRelation.html b/Application/Admin/View/CompanyRelation/editRelation.html index 0c310e144..b19c13115 100644 --- a/Application/Admin/View/CompanyRelation/editRelation.html +++ b/Application/Admin/View/CompanyRelation/editRelation.html @@ -163,6 +163,7 @@ *开票类型: From 0f0d52c78f0be9a4e7be7886369814c2d836dacb Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 10 Jul 2020 14:49:48 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/View/CompanyStatement/editCpStatement.html | 1 + .../Admin/View/CompanyStatement/editPcStatement.html | 11 ++++++++++- .../Admin/View/CompanyStatement/viewPcStatement.html | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Application/Admin/View/CompanyStatement/editCpStatement.html b/Application/Admin/View/CompanyStatement/editCpStatement.html index 6755de89a..23efb5ce8 100644 --- a/Application/Admin/View/CompanyStatement/editCpStatement.html +++ b/Application/Admin/View/CompanyStatement/editCpStatement.html @@ -274,6 +274,7 @@
diff --git a/Application/Admin/View/CompanyStatement/editPcStatement.html b/Application/Admin/View/CompanyStatement/editPcStatement.html index cc1fad06e..ea332726c 100644 --- a/Application/Admin/View/CompanyStatement/editPcStatement.html +++ b/Application/Admin/View/CompanyStatement/editPcStatement.html @@ -269,6 +269,7 @@
@@ -351,10 +352,18 @@
+ From c87b61d94b7faec70adbc10f3eb25534a432778b Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 10 Jul 2020 15:11:52 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/CompanyStatementController.class.php | 6 ++++-- .../Admin/Controller/VerifyBillController.class.php | 6 ++++-- .../Admin/View/CompanyRelation/addRelation.html | 2 +- .../View/CompanyStatementPool/editCpStatement.html | 1 + .../View/CompanyStatementPool/editPcStatement.html | 11 ++++++++++- .../View/CompanyStatementPool/viewPcStatement.html | 1 + 6 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 67e945a4d..0743c12af 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -383,9 +383,11 @@ class CompanyStatementController extends ThinkController $data['receive_company'] = $data['first_party_info']; $data['pay_company'] = $data['second_party_info']; } - if($data['receive_company']['invoice_type'] == 1){ + if($data['receive_company']['invoice_type'] == 0){ + $data['receive_company']['invoice_type']="无"; + } elseif($data['receive_company']['invoice_type'] == 1){ $data['receive_company']['invoice_type']="专票"; - }else{ + } else{ $data['receive_company']['invoice_type']="普票"; } if ($data['company_belong'] == 9) {//上游 diff --git a/Application/Admin/Controller/VerifyBillController.class.php b/Application/Admin/Controller/VerifyBillController.class.php index 62d4a925d..5d77a29af 100644 --- a/Application/Admin/Controller/VerifyBillController.class.php +++ b/Application/Admin/Controller/VerifyBillController.class.php @@ -157,9 +157,11 @@ class VerifyBillController extends Controller { $data['receive_company'] = $data['first_party_info']; $data['pay_company'] = $data['second_party_info']; } - if($data['receive_company']['invoice_type'] == 1){ + if($data['receive_company']['invoice_type'] == 0){ + $data['receive_company']['invoice_type']="无"; + } elseif ($data['receive_company']['invoice_type'] == 1) { $data['receive_company']['invoice_type']="专票"; - }else{ + } else { $data['receive_company']['invoice_type']="普票"; } if ($data['company_belong'] == 9) {//上游 diff --git a/Application/Admin/View/CompanyRelation/addRelation.html b/Application/Admin/View/CompanyRelation/addRelation.html index 869d5fad4..d4263aaf8 100644 --- a/Application/Admin/View/CompanyRelation/addRelation.html +++ b/Application/Admin/View/CompanyRelation/addRelation.html @@ -186,7 +186,7 @@ *开票类型: diff --git a/Application/Admin/View/CompanyStatementPool/editCpStatement.html b/Application/Admin/View/CompanyStatementPool/editCpStatement.html index 6755de89a..23efb5ce8 100644 --- a/Application/Admin/View/CompanyStatementPool/editCpStatement.html +++ b/Application/Admin/View/CompanyStatementPool/editCpStatement.html @@ -274,6 +274,7 @@
diff --git a/Application/Admin/View/CompanyStatementPool/editPcStatement.html b/Application/Admin/View/CompanyStatementPool/editPcStatement.html index 9d2f3547f..d030fc6b8 100644 --- a/Application/Admin/View/CompanyStatementPool/editPcStatement.html +++ b/Application/Admin/View/CompanyStatementPool/editPcStatement.html @@ -269,6 +269,7 @@
@@ -351,10 +352,18 @@
+