新增多个商品
This commit is contained in:
@@ -320,13 +320,9 @@ class OrderPrescriptionService extends BaseService
|
||||
|
||||
// 商品数据
|
||||
foreach ($order_prescription_product as $key => $item){
|
||||
if ($key <= 2){
|
||||
$x_axis = 229;
|
||||
$y_axis = 1600 + $key * 350;
|
||||
}else{
|
||||
$x_axis = 1240;
|
||||
$y_axis = 1600 + ($key - 3) * 350;
|
||||
}
|
||||
$x_axis = 229;
|
||||
$y_axis = 1600 + $key * 250;
|
||||
$x_axis_num = 1900;// 数量使用
|
||||
|
||||
// 商品名称
|
||||
$image->text($item['product_name'], $x_axis, $y_axis, function ($font) use($fontPath) {
|
||||
@@ -335,15 +331,21 @@ class OrderPrescriptionService extends BaseService
|
||||
$font->align('left');
|
||||
});
|
||||
|
||||
$image->text("X" . $item['prescription_product_num'] . $item['packaging_unit'], $x_axis_num, $y_axis, function ($font) use($fontPath) {
|
||||
$font->file($fontPath);
|
||||
$font->size(50);
|
||||
$font->align('left');
|
||||
});
|
||||
|
||||
// 用量
|
||||
$image->text("用量:" . $item['single_unit'] . " " . $item['frequency_use'], $x_axis, $y_axis+90, function ($font) use($fontPath) {
|
||||
$image->text("用量:" . $item['single_unit'] . " " . $item['frequency_use'], $x_axis, $y_axis+70, function ($font) use($fontPath) {
|
||||
$font->file($fontPath);
|
||||
$font->size(50);
|
||||
$font->align('left');
|
||||
});
|
||||
|
||||
// 用法
|
||||
$image->text("用法:" . $item['single_use'], $x_axis, $y_axis+180, function ($font) use($fontPath) {
|
||||
$image->text("用法:" . $item['single_use'], $x_axis, $y_axis+140, function ($font) use($fontPath) {
|
||||
$font->file($fontPath);
|
||||
$font->size(50);
|
||||
$font->align('left');
|
||||
|
||||
Reference in New Issue
Block a user