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 @@
|
|