From 26a49782422c6e6f87d196f717ee36407a7faabd Mon Sep 17 00:00:00 2001 From: weiz <736250432@qq.com> Date: Tue, 30 Jan 2024 15:23:58 +0800 Subject: [PATCH] update --- app/adminapi/lists/contract/ContractLists.php | 40 ++++++++++++++++++- .../contract/ContractNegotiationLists.php | 31 +++++++++++++- .../ProcurementContractDetailLists.php | 40 +++++++++++++++++-- .../contract/ProcurementContractLists.php | 36 ++++++++++++++++- .../SubcontractingContractDetailLists.php | 35 +++++++++++++++- .../contract/SubcontractingContractLists.php | 37 ++++++++++++++++- ...SubcontractingContractNegotiationLists.php | 32 ++++++++++++++- 7 files changed, 241 insertions(+), 10 deletions(-) diff --git a/app/adminapi/lists/contract/ContractLists.php b/app/adminapi/lists/contract/ContractLists.php index 492918781..d078023d1 100644 --- a/app/adminapi/lists/contract/ContractLists.php +++ b/app/adminapi/lists/contract/ContractLists.php @@ -16,6 +16,7 @@ namespace app\adminapi\lists\contract; use app\adminapi\lists\BaseAdminDataLists; +use app\common\lists\ListsExcelInterface; use app\common\model\auth\Admin; use app\common\model\bid\BidBuyBiddingDocument; use app\common\model\contract\Contract; @@ -33,7 +34,7 @@ use think\facade\Db; * Class ContractLists * @package app\adminapi\listscontract */ -class ContractLists extends BaseAdminDataLists implements ListsSearchInterface +class ContractLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface { @@ -92,7 +93,6 @@ class ContractLists extends BaseAdminDataLists implements ListsSearchInterface $data['contract_type_text'] = $data->contract_type_text; $data['contract_pricing_method_text'] = $data->contract_pricing_method_text; $data['contract_status_text'] = $data->contract_status_text; - $data['contract_pricing_method_text'] = $data->contract_pricing_method_text; $data['business_director_name'] = $business_director['name']; //洽商金额 $data['negotiation_amount'] = ContractNegotiation::where('contract_id',$data['id'])->sum('negotiation_amount'); @@ -140,5 +140,41 @@ class ContractLists extends BaseAdminDataLists implements ListsSearchInterface } return Contract::field('id')->where($this->searchWhere)->where($where)->count(); } + + public function setFileName(): string + { + return '项目合同列表'; + } + + /** + * @notes 导出字段 + * @return string[] + * @author 段誉 + * @date 2022/11/24 16:17 + */ + public function setExcelFields(): array + { + return [ + "id" => "id", + "contract_code" => "合同编号", + "custom_name" => "客户名称", + "project_name" => "项目名称", + "project_code" => "项目编码", + "contract_type_text" => "合同类型", + "contract_pricing_method_text" => "合同计价方式", + "business_director_name" => "业务负责人", + "contract_status_text" => "合同状态", + "expire" => "合同有效期", + "contract_date" => "签约日期", + "amount" =>"合同金额", + "negotiation_amount" =>"洽商金额", + "reality_contract_amount" =>"实际合同金额", + "returned_amount" =>"已回款", + "not_returned_amount" =>"未回款", + "invoicing_amount" =>"已开票", + "not_invoicing_amount" =>"未开票", + "refund_amount" =>"已退款金额", + ]; + } } \ No newline at end of file diff --git a/app/adminapi/lists/contract/ContractNegotiationLists.php b/app/adminapi/lists/contract/ContractNegotiationLists.php index 7f86888a6..4e7b6d569 100644 --- a/app/adminapi/lists/contract/ContractNegotiationLists.php +++ b/app/adminapi/lists/contract/ContractNegotiationLists.php @@ -16,6 +16,7 @@ namespace app\adminapi\lists\contract; use app\adminapi\lists\BaseAdminDataLists; +use app\common\lists\ListsExcelInterface; use app\common\model\auth\Admin; use app\common\model\contract\Contract; use app\common\model\contract\ContractNegotiation; @@ -29,7 +30,7 @@ use think\facade\Db; * Class ContractNegotiationLists * @package app\adminapi\listscontract */ -class ContractNegotiationLists extends BaseAdminDataLists implements ListsSearchInterface +class ContractNegotiationLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface { @@ -113,5 +114,33 @@ class ContractNegotiationLists extends BaseAdminDataLists implements ListsSearch } return ContractNegotiation::field('id')->where($this->searchWhere)->where($where)->count(); } + + public function setFileName(): string + { + return '项目合同洽商列表'; + } + + /** + * @notes 导出字段 + * @return string[] + * @author 段誉 + * @date 2022/11/24 16:17 + */ + public function setExcelFields(): array + { + return [ + "id" => "id", + "negotiation_no" => "洽商编号", + "contract_code" => "合同编号", + "custom_name" => "客户名称", + "project_name" => "项目名称", + "negotiation_amount" => "洽商报价金额", + "negotiation_type" => "洽商类别", + "contract_date" => "签约日期", + "business_director" => "业务负责人", + "profit" => "利润", + "profit_rate" => "利润率", + ]; + } } \ No newline at end of file diff --git a/app/adminapi/lists/contract/ProcurementContractDetailLists.php b/app/adminapi/lists/contract/ProcurementContractDetailLists.php index 32b604f74..94f6b429f 100644 --- a/app/adminapi/lists/contract/ProcurementContractDetailLists.php +++ b/app/adminapi/lists/contract/ProcurementContractDetailLists.php @@ -16,6 +16,7 @@ namespace app\adminapi\lists\contract; use app\adminapi\lists\BaseAdminDataLists; +use app\common\lists\ListsExcelInterface; use app\common\model\contract\ProcurementContract; use app\common\model\contract\ProcurementContractDetail; use app\common\lists\ListsSearchInterface; @@ -33,7 +34,7 @@ use app\common\model\supplier\Supplier; * Class ProcurementContractDetailLists * @package app\adminapi\listscontract */ -class ProcurementContractDetailLists extends BaseAdminDataLists implements ListsSearchInterface +class ProcurementContractDetailLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface { @@ -80,7 +81,8 @@ class ProcurementContractDetailLists extends BaseAdminDataLists implements Lists $data['supplier_code'] = $supplier['supplier_code']; $data['supplier_name'] = $supplier['supplier_name']; $data['contract_no'] = $contract['contract_no']; - $data['contract_type'] = $contract->contract_type_text; + $data['contract_type_text'] = $contract->contract_type_text; + $data['tax_rate_text'] = $data->tax_rate_text; $data['material_purchase_request_code'] = $material_purchase_request['material_purchase_request_code']; $data['material_first_level'] = !empty($material_classify[$material['first_level']]) ? $material_classify[$material['first_level']] : ''; $data['material_second_level'] = !empty($material_classify[$material['second_level']]) ? $material_classify[$material['second_level']] : ''; @@ -111,5 +113,37 @@ class ProcurementContractDetailLists extends BaseAdminDataLists implements Lists { return ProcurementContractDetail::where($this->searchWhere)->count(); } - + + public function setFileName(): string + { + return '采购明细列表'; + } + + /** + * @notes 导出字段 + * @return string[] + * @author 段誉 + * @date 2022/11/24 16:17 + */ + public function setExcelFields(): array + { + return [ + "id" => "id", + "project_code" => "项目编码", + "project_name" => "项目名称", + "contract_no" => "合同编号", + "supplier_code" => "供应编号", + "supplier_name" => "供应商名称", + "contract_type_text" => "合同类型", + "tax_rate_text" => "税率", + "material_first_level" => "材料类别", + "material_second_level" => "材料中类", + "material_three_level" => "材料小类", + "material_name" => "材料名称", + "material_code" => "材料编码", + "material_specs" => "规格型号", + "material_brand" => "品牌", + "material_parameter_description" => "参数说明", + ]; + } } \ No newline at end of file diff --git a/app/adminapi/lists/contract/ProcurementContractLists.php b/app/adminapi/lists/contract/ProcurementContractLists.php index 6d6301874..9368f6bdb 100644 --- a/app/adminapi/lists/contract/ProcurementContractLists.php +++ b/app/adminapi/lists/contract/ProcurementContractLists.php @@ -16,6 +16,7 @@ namespace app\adminapi\lists\contract; use app\adminapi\lists\BaseAdminDataLists; +use app\common\lists\ListsExcelInterface; use app\common\model\contract\ProcurementContract; use app\common\lists\ListsSearchInterface; use app\common\model\contract\ProcurementContractDetail; @@ -31,7 +32,7 @@ use think\facade\Db; * Class ProcurementContractLists * @package app\adminapi\listscontract */ -class ProcurementContractLists extends BaseAdminDataLists implements ListsSearchInterface +class ProcurementContractLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface { @@ -105,5 +106,38 @@ class ProcurementContractLists extends BaseAdminDataLists implements ListsSearch { return ProcurementContract::where($this->searchWhere)->count(); } + + public function setFileName(): string + { + return '采购合同列表'; + } + + /** + * @notes 导出字段 + * @return string[] + * @author 段誉 + * @date 2022/11/24 16:17 + */ + public function setExcelFields(): array + { + return [ + "id" => "id", + "project_name" => "项目名称", + "contract_name" => "合同名称", + "contract_no" => "合同编号", + "supplier_name" => "供应商名称", + "contract_type" => "合同类型", + "signing_date" => "签订日期", + "contract_amount" => "合同金额", + "has_pay_amount" => "已付款金额", + "has_invoice_amount" => "已开票金额", + "not_pay_amount" => "未付款金额", + "not_invoice_amount" => "未开票金额", + "refund_amount" => "退款金额", + "has_storage_num" => "已入库数量", + "not_storage_num" => "未入库数量", + "num" => "数量", + ]; + } } \ No newline at end of file diff --git a/app/adminapi/lists/contract/SubcontractingContractDetailLists.php b/app/adminapi/lists/contract/SubcontractingContractDetailLists.php index da6456234..5e96af51b 100644 --- a/app/adminapi/lists/contract/SubcontractingContractDetailLists.php +++ b/app/adminapi/lists/contract/SubcontractingContractDetailLists.php @@ -16,6 +16,7 @@ namespace app\adminapi\lists\contract; use app\adminapi\lists\BaseAdminDataLists; +use app\common\lists\ListsExcelInterface; use app\common\model\contract\SubcontractingContract; use app\common\model\contract\SubcontractingContractDetail; use app\common\lists\ListsSearchInterface; @@ -29,7 +30,7 @@ use app\common\model\supplier\Supplier; * Class SubcontractingContractDetailLists * @package app\adminapi\listscontract */ -class SubcontractingContractDetailLists extends BaseAdminDataLists implements ListsSearchInterface +class SubcontractingContractDetailLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface { @@ -77,6 +78,7 @@ class SubcontractingContractDetailLists extends BaseAdminDataLists implements Li $data['work_content'] = $subpackage_budget_detail['work_content']; $data['project_features'] = $subpackage_budget_detail['project_features']; $data['unit'] = $subpackage_budget_detail['unit']; + $data['tax_rate_text'] = $data->tax_rate_text; return $data; }) ->toArray(); @@ -93,5 +95,36 @@ class SubcontractingContractDetailLists extends BaseAdminDataLists implements Li { return SubcontractingContractDetail::where($this->searchWhere)->count(); } + + public function setFileName(): string + { + return '分包明细列表'; + } + + /** + * @notes 导出字段 + * @return string[] + * @author 段誉 + * @date 2022/11/24 16:17 + */ + public function setExcelFields(): array + { + return [ + "id" => "id", + "project_name" => "项目名称", + "project_code" => "项目编码", + "contract_no" => "合同编号", + "contract_type" => "合同类型", + "supplier_name" => "供应商名称", + "work_type" => "工作类型", + "work_content" => "工作内容", + "project_features" => "项目特征", + "unit" => "单位", + "tax_rate_text" => "税率(%)", + "num" => "工作量", + "amount_excluding_tax" => "不含税金额", + "amount_including_tax" => "含税金额", + ]; + } } \ No newline at end of file diff --git a/app/adminapi/lists/contract/SubcontractingContractLists.php b/app/adminapi/lists/contract/SubcontractingContractLists.php index 0a7c67709..3541eb307 100644 --- a/app/adminapi/lists/contract/SubcontractingContractLists.php +++ b/app/adminapi/lists/contract/SubcontractingContractLists.php @@ -16,6 +16,7 @@ namespace app\adminapi\lists\contract; use app\adminapi\lists\BaseAdminDataLists; +use app\common\lists\ListsExcelInterface; use app\common\model\contract\SubcontractingContract; use app\common\lists\ListsSearchInterface; use app\common\model\contract\SubcontractingContractDetail; @@ -32,7 +33,7 @@ use app\common\model\supplier\Supplier; * Class SubcontractingContractLists * @package app\adminapi\listscontract */ -class SubcontractingContractLists extends BaseAdminDataLists implements ListsSearchInterface +class SubcontractingContractLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface { @@ -108,5 +109,39 @@ class SubcontractingContractLists extends BaseAdminDataLists implements ListsSea { return SubcontractingContract::where($this->searchWhere)->count(); } + + public function setFileName(): string + { + return '分包合同列表'; + } + + /** + * @notes 导出字段 + * @return string[] + * @author 段誉 + * @date 2022/11/24 16:17 + */ + public function setExcelFields(): array + { + return [ + "id" => "id", + "project_name" => "项目名称", + "contract_no" => "合同编号", + "contract_name" => "合同名称", + "supplier_name" => "供应商名称", + "signing_date" => "签订日期", + "contract_type" => "合同类型", + "contract_amount" => "合同金额", + "negotiation_amount" => "洽商金额", + "excluding_tax_amount" => "不含税金额", + "reality_contract_amount" => "实际合同金额", + "has_pay_amount" => "已付款金额", + "not_pay_amount" => "未付款金额", + "invoice_amount" => "已开票金额", + "not_invoice_amount" => "未开票金额", + "refund_amount" => "已退款金额", + "settlement_difference" => "结算差异", + ]; + } } \ No newline at end of file diff --git a/app/adminapi/lists/contract/SubcontractingContractNegotiationLists.php b/app/adminapi/lists/contract/SubcontractingContractNegotiationLists.php index 706bdda66..adeddd359 100644 --- a/app/adminapi/lists/contract/SubcontractingContractNegotiationLists.php +++ b/app/adminapi/lists/contract/SubcontractingContractNegotiationLists.php @@ -16,6 +16,7 @@ namespace app\adminapi\lists\contract; use app\adminapi\lists\BaseAdminDataLists; +use app\common\lists\ListsExcelInterface; use app\common\model\contract\SubcontractingContract; use app\common\model\contract\SubcontractingContractNegotiation; use app\common\lists\ListsSearchInterface; @@ -28,7 +29,7 @@ use think\facade\Db; * Class SubcontractingContractNegotiationLists * @package app\adminapi\listscontract */ -class SubcontractingContractNegotiationLists extends BaseAdminDataLists implements ListsSearchInterface +class SubcontractingContractNegotiationLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface { @@ -88,5 +89,34 @@ class SubcontractingContractNegotiationLists extends BaseAdminDataLists implemen { return SubcontractingContractNegotiation::where($this->searchWhere)->count(); } + + public function setFileName(): string + { + return '分包洽商列表'; + } + + /** + * @notes 导出字段 + * @return string[] + * @author 段誉 + * @date 2022/11/24 16:17 + */ + public function setExcelFields(): array + { + return [ + "id" => "id", + "negotiation_no" => "洽商编号", + "contract_no" => "合同编号", + "negotiation_name" => "洽商单名称", + "project_name" => "项目名称", + "project_code" => "项目编号", + "supplier_name" => "供应商", + "negotiation_amount" => "洽商金额", + "negotiation_type_text" => "洽商类别", + "warranty_amount" => "洽商质保金额", + "warranty_expire_date" => "洽商质保到期时间", + "remark" => "备注", + ]; + } } \ No newline at end of file