update
This commit is contained in:
parent
1a19a7ba24
commit
674a419ad9
@ -16,6 +16,7 @@ namespace app\adminapi\lists\quotation;
|
|||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
|
use app\common\lists\ListsExcelInterface;
|
||||||
use app\common\model\custom\Custom;
|
use app\common\model\custom\Custom;
|
||||||
use app\common\model\material\Material;
|
use app\common\model\material\Material;
|
||||||
use app\common\model\material\MaterialClassify;
|
use app\common\model\material\MaterialClassify;
|
||||||
@ -29,7 +30,7 @@ use app\common\lists\ListsSearchInterface;
|
|||||||
* Class QuotationDetailLists
|
* Class QuotationDetailLists
|
||||||
* @package app\adminapi\listsquotation
|
* @package app\adminapi\listsquotation
|
||||||
*/
|
*/
|
||||||
class QuotationDetailLists extends BaseAdminDataLists implements ListsSearchInterface
|
class QuotationDetailLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@ -71,7 +72,7 @@ class QuotationDetailLists extends BaseAdminDataLists implements ListsSearchInte
|
|||||||
$item['quotation_date'] = $quotation['quotation_date'];
|
$item['quotation_date'] = $quotation['quotation_date'];
|
||||||
$item['quotation_create_user'] = $quotation['create_user'];
|
$item['quotation_create_user'] = $quotation['create_user'];
|
||||||
$item['custom_name'] = $custom['name'];
|
$item['custom_name'] = $custom['name'];
|
||||||
$item['product_first_level_name'] = $classify[$material['first_level']];
|
$item['product_first_level_name'] = !empty($classify[$material['first_level']]) ? $classify[$material['first_level']] : '';
|
||||||
$item['product_second_level_name'] = !empty($classify[$material['second_level']]) ? $classify[$material['second_level']] : '';
|
$item['product_second_level_name'] = !empty($classify[$material['second_level']]) ? $classify[$material['second_level']] : '';
|
||||||
$item['product_three_level_name'] = !empty($classify[$material['three_level']]) ? $classify[$material['three_level']] : '';
|
$item['product_three_level_name'] = !empty($classify[$material['three_level']]) ? $classify[$material['three_level']] : '';
|
||||||
$item['product_name'] = $material['name'];
|
$item['product_name'] = $material['name'];
|
||||||
@ -97,4 +98,41 @@ class QuotationDetailLists extends BaseAdminDataLists implements ListsSearchInte
|
|||||||
return QuotationDetail::where($this->searchWhere)->count();
|
return QuotationDetail::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',
|
||||||
|
'quotation_code' => '报价单号',
|
||||||
|
'custom_name' => '客户名称',
|
||||||
|
'quotation_create_user' => '制单人',
|
||||||
|
'quotation_date' => '报价日期',
|
||||||
|
'product_first_level_name' => '产品类别',
|
||||||
|
'product_second_level_name' => '产品中类',
|
||||||
|
'product_three_level_name' => '产品小类',
|
||||||
|
'product_name' => '产品名称',
|
||||||
|
'product_code' => '产品编码',
|
||||||
|
'product_specs' => '规格型号',
|
||||||
|
'product_brand' => '品牌',
|
||||||
|
'product_parameter_description' => '参数说明',
|
||||||
|
'product_unit' => '单位',
|
||||||
|
'num' => '数量',
|
||||||
|
'tax_rate' => '税率',
|
||||||
|
'tax_inclusive_price' => '含税单价',
|
||||||
|
'tax_exclusive_amount' => '不含税金额',
|
||||||
|
'tax_inclusive_amount' => '含税金额',
|
||||||
|
'remark' => '备注',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -16,6 +16,7 @@ namespace app\adminapi\lists\quotation;
|
|||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
|
use app\common\lists\ListsExcelInterface;
|
||||||
use app\common\model\custom\Custom;
|
use app\common\model\custom\Custom;
|
||||||
use app\common\model\quotation\Quotation;
|
use app\common\model\quotation\Quotation;
|
||||||
use app\common\lists\ListsSearchInterface;
|
use app\common\lists\ListsSearchInterface;
|
||||||
@ -26,7 +27,7 @@ use app\common\model\quotation\QuotationDetail;
|
|||||||
* Class QuotationLists
|
* Class QuotationLists
|
||||||
* @package app\adminapi\listsquotation
|
* @package app\adminapi\listsquotation
|
||||||
*/
|
*/
|
||||||
class QuotationLists extends BaseAdminDataLists implements ListsSearchInterface
|
class QuotationLists extends BaseAdminDataLists implements ListsSearchInterface,ListsExcelInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@ -96,4 +97,32 @@ class QuotationLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
return Quotation::where($this->searchWhere)->where($where)->count();
|
return Quotation::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',
|
||||||
|
'code' => '报价单号',
|
||||||
|
'custom_name' => '客户名称',
|
||||||
|
'quotation_date' => '报价日期',
|
||||||
|
'custom_master_name' => '联系人',
|
||||||
|
'custom_master_phone' => '联系电话',
|
||||||
|
'create_user' => '制单人',
|
||||||
|
'invoice_type_text' => '发票类型',
|
||||||
|
'amount_including_tax' => '含税金额',
|
||||||
|
'freight' => '运费',
|
||||||
|
'other_fee' => '其他费用',
|
||||||
|
'total_amount' => '合计金额',
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user