完善打印相关功能

去掉无用的前端文件
修改版权描述
This commit is contained in:
2021-02-26 05:52:52 +08:00
parent 37229cac4a
commit 427dabb95d
101 changed files with 442 additions and 7350 deletions
+36
View File
@@ -14,6 +14,42 @@ class OrderService
return BadgeService::getModelTodo('customer_order');
}
/**
* 自定义查询打印数据
*/
public static function getPrintData($id)
{
$master = DB::table('customer_order as co')->where('co.id', $id)
->leftJoin('customer as c', 'c.id', '=', 'co.customer_id')
->leftJoin('customer_tax as ct', 'ct.id', '=', 'co.tax_id')
->leftJoin('sale_type as st', 'st.id', '=', 'co.type_id')
->selectRaw('co.*, ct.name as tax_name, c.name as customer_name, st.name as type_name')
->first();
$rows = DB::table('customer_order_data as cod')
->leftJoin('customer_order as co', 'co.id', '=', 'cod.order_id')
->leftJoin('product as p', 'p.id', '=', 'cod.product_id')
->leftJoin('product_unit as pu', 'pu.id', '=', 'p.unit_id')
->leftJoin('customer_order_type as cot', 'cot.id', '=', 'cod.type_id')
->where('co.id', $id)
->selectRaw('
cod.*,
cod.delivery_quantity * p.weight as total_weight,
p.name as product_name,
p.spec as product_spec,
cot.name as type_name,
pu.name as product_unit,
p.material_type,
p.product_type
')
->get();
return [
'master' => $master,
'rows' => $rows,
];
}
/**
* 获取为使用的促销id
*