This commit is contained in:
weiz 2024-01-30 15:23:58 +08:00
parent b0ec7e2ae9
commit 26a4978242
7 changed files with 241 additions and 10 deletions

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\contract;
use app\adminapi\lists\BaseAdminDataLists; use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\auth\Admin; use app\common\model\auth\Admin;
use app\common\model\bid\BidBuyBiddingDocument; use app\common\model\bid\BidBuyBiddingDocument;
use app\common\model\contract\Contract; use app\common\model\contract\Contract;
@ -33,7 +34,7 @@ use think\facade\Db;
* Class ContractLists * Class ContractLists
* @package app\adminapi\listscontract * @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_type_text'] = $data->contract_type_text;
$data['contract_pricing_method_text'] = $data->contract_pricing_method_text; $data['contract_pricing_method_text'] = $data->contract_pricing_method_text;
$data['contract_status_text'] = $data->contract_status_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['business_director_name'] = $business_director['name'];
//洽商金额 //洽商金额
$data['negotiation_amount'] = ContractNegotiation::where('contract_id',$data['id'])->sum('negotiation_amount'); $data['negotiation_amount'] = ContractNegotiation::where('contract_id',$data['id'])->sum('negotiation_amount');
@ -141,4 +141,40 @@ class ContractLists extends BaseAdminDataLists implements ListsSearchInterface
return Contract::field('id')->where($this->searchWhere)->where($where)->count(); 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" =>"已退款金额",
];
}
} }

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\contract;
use app\adminapi\lists\BaseAdminDataLists; use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\auth\Admin; use app\common\model\auth\Admin;
use app\common\model\contract\Contract; use app\common\model\contract\Contract;
use app\common\model\contract\ContractNegotiation; use app\common\model\contract\ContractNegotiation;
@ -29,7 +30,7 @@ use think\facade\Db;
* Class ContractNegotiationLists * Class ContractNegotiationLists
* @package app\adminapi\listscontract * @package app\adminapi\listscontract
*/ */
class ContractNegotiationLists extends BaseAdminDataLists implements ListsSearchInterface class ContractNegotiationLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{ {
@ -114,4 +115,32 @@ class ContractNegotiationLists extends BaseAdminDataLists implements ListsSearch
return ContractNegotiation::field('id')->where($this->searchWhere)->where($where)->count(); 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" => "利润率",
];
}
} }

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\contract;
use app\adminapi\lists\BaseAdminDataLists; use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\contract\ProcurementContract; use app\common\model\contract\ProcurementContract;
use app\common\model\contract\ProcurementContractDetail; use app\common\model\contract\ProcurementContractDetail;
use app\common\lists\ListsSearchInterface; use app\common\lists\ListsSearchInterface;
@ -33,7 +34,7 @@ use app\common\model\supplier\Supplier;
* Class ProcurementContractDetailLists * Class ProcurementContractDetailLists
* @package app\adminapi\listscontract * @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_code'] = $supplier['supplier_code'];
$data['supplier_name'] = $supplier['supplier_name']; $data['supplier_name'] = $supplier['supplier_name'];
$data['contract_no'] = $contract['contract_no']; $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_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_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']] : ''; $data['material_second_level'] = !empty($material_classify[$material['second_level']]) ? $material_classify[$material['second_level']] : '';
@ -112,4 +114,36 @@ class ProcurementContractDetailLists extends BaseAdminDataLists implements Lists
return ProcurementContractDetail::where($this->searchWhere)->count(); 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" => "参数说明",
];
}
} }

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\contract;
use app\adminapi\lists\BaseAdminDataLists; use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\contract\ProcurementContract; use app\common\model\contract\ProcurementContract;
use app\common\lists\ListsSearchInterface; use app\common\lists\ListsSearchInterface;
use app\common\model\contract\ProcurementContractDetail; use app\common\model\contract\ProcurementContractDetail;
@ -31,7 +32,7 @@ use think\facade\Db;
* Class ProcurementContractLists * Class ProcurementContractLists
* @package app\adminapi\listscontract * @package app\adminapi\listscontract
*/ */
class ProcurementContractLists extends BaseAdminDataLists implements ListsSearchInterface class ProcurementContractLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{ {
@ -106,4 +107,37 @@ class ProcurementContractLists extends BaseAdminDataLists implements ListsSearch
return ProcurementContract::where($this->searchWhere)->count(); 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" => "数量",
];
}
} }

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\contract;
use app\adminapi\lists\BaseAdminDataLists; use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\contract\SubcontractingContract; use app\common\model\contract\SubcontractingContract;
use app\common\model\contract\SubcontractingContractDetail; use app\common\model\contract\SubcontractingContractDetail;
use app\common\lists\ListsSearchInterface; use app\common\lists\ListsSearchInterface;
@ -29,7 +30,7 @@ use app\common\model\supplier\Supplier;
* Class SubcontractingContractDetailLists * Class SubcontractingContractDetailLists
* @package app\adminapi\listscontract * @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['work_content'] = $subpackage_budget_detail['work_content'];
$data['project_features'] = $subpackage_budget_detail['project_features']; $data['project_features'] = $subpackage_budget_detail['project_features'];
$data['unit'] = $subpackage_budget_detail['unit']; $data['unit'] = $subpackage_budget_detail['unit'];
$data['tax_rate_text'] = $data->tax_rate_text;
return $data; return $data;
}) })
->toArray(); ->toArray();
@ -94,4 +96,35 @@ class SubcontractingContractDetailLists extends BaseAdminDataLists implements Li
return SubcontractingContractDetail::where($this->searchWhere)->count(); 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" => "含税金额",
];
}
} }

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\contract;
use app\adminapi\lists\BaseAdminDataLists; use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\contract\SubcontractingContract; use app\common\model\contract\SubcontractingContract;
use app\common\lists\ListsSearchInterface; use app\common\lists\ListsSearchInterface;
use app\common\model\contract\SubcontractingContractDetail; use app\common\model\contract\SubcontractingContractDetail;
@ -32,7 +33,7 @@ use app\common\model\supplier\Supplier;
* Class SubcontractingContractLists * Class SubcontractingContractLists
* @package app\adminapi\listscontract * @package app\adminapi\listscontract
*/ */
class SubcontractingContractLists extends BaseAdminDataLists implements ListsSearchInterface class SubcontractingContractLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{ {
@ -109,4 +110,38 @@ class SubcontractingContractLists extends BaseAdminDataLists implements ListsSea
return SubcontractingContract::where($this->searchWhere)->count(); 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" => "结算差异",
];
}
} }

View File

@ -16,6 +16,7 @@ namespace app\adminapi\lists\contract;
use app\adminapi\lists\BaseAdminDataLists; use app\adminapi\lists\BaseAdminDataLists;
use app\common\lists\ListsExcelInterface;
use app\common\model\contract\SubcontractingContract; use app\common\model\contract\SubcontractingContract;
use app\common\model\contract\SubcontractingContractNegotiation; use app\common\model\contract\SubcontractingContractNegotiation;
use app\common\lists\ListsSearchInterface; use app\common\lists\ListsSearchInterface;
@ -28,7 +29,7 @@ use think\facade\Db;
* Class SubcontractingContractNegotiationLists * Class SubcontractingContractNegotiationLists
* @package app\adminapi\listscontract * @package app\adminapi\listscontract
*/ */
class SubcontractingContractNegotiationLists extends BaseAdminDataLists implements ListsSearchInterface class SubcontractingContractNegotiationLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
{ {
@ -89,4 +90,33 @@ class SubcontractingContractNegotiationLists extends BaseAdminDataLists implemen
return SubcontractingContractNegotiation::where($this->searchWhere)->count(); 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" => "备注",
];
}
} }