发布测试版 2.5.0
This commit is contained in:
@@ -306,15 +306,27 @@ class DeliveryController extends WorkflowController
|
||||
$this->layout = 'layouts.print_'.$print_type;
|
||||
|
||||
// 打印插件
|
||||
$print_tpl = view()->exists(Request::controller().'.print.'.$template_id);
|
||||
if ($print_tpl) {
|
||||
if ($print_type == 'stiReport') {
|
||||
$data = DeliveryService::getPrintData($id);
|
||||
$data['template'] = $template;
|
||||
$tpl = $this->display($data, 'print/'.$template_id);
|
||||
$print_data = [
|
||||
'master' => [$data['master']],
|
||||
'stock_delivery_data' => $data['rows'],
|
||||
];
|
||||
return $this->display([
|
||||
'template' => $template,
|
||||
'print_data' => $print_data,
|
||||
]);
|
||||
} else {
|
||||
$tpl = $this->create('print');
|
||||
$print_tpl = view()->exists(Request::controller().'.print.'.$template_id);
|
||||
if ($print_tpl) {
|
||||
$data = DeliveryService::getPrintData($id);
|
||||
$data['template'] = $template;
|
||||
$tpl = $this->display($data, 'print/'.$template_id);
|
||||
} else {
|
||||
$tpl = $this->create('print');
|
||||
}
|
||||
return $print_type == 'pdf' ? print_prince($tpl) : $tpl;
|
||||
}
|
||||
return $print_type == 'pdf' ? print_prince($tpl) : $tpl;
|
||||
}
|
||||
|
||||
// 物流信息
|
||||
|
||||
@@ -51,7 +51,7 @@ class CancelHook
|
||||
'department.code as department_code',
|
||||
'customer_tax.code as customer_code',
|
||||
'customer.region_id',
|
||||
'customer_region.owner_user_id as salesman_id',
|
||||
'customer_region.owner_user_id as salesman_id'
|
||||
]);
|
||||
|
||||
$sql = "select d.id,d.type_id,d.price,d.quantity,d.money,d.other_money,
|
||||
|
||||
@@ -8,14 +8,14 @@ class Cancel extends BaseModel
|
||||
protected $table = 'stock_cancel';
|
||||
|
||||
public static $tabs = [
|
||||
'name' => 'tab',
|
||||
'name' => 'tab',
|
||||
'items' => [
|
||||
['value' => 'cancel', 'url' => 'stock/cancel/index', 'name' => '退货申请'],
|
||||
['value' => 'cancel', 'url' => 'stock/cancel/index', 'name' => '退货单'],
|
||||
]
|
||||
];
|
||||
|
||||
public static $bys = [
|
||||
'name' => 'by',
|
||||
'name' => 'by',
|
||||
'items' => [
|
||||
['value' => '', 'name' => '全部'],
|
||||
['value' => 'enabled', 'name' => '启用'],
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
<?php namespace Gdoo\Stock\Services;
|
||||
|
||||
use DB;
|
||||
use Gdoo\Index\Services\BadgeService;
|
||||
|
||||
class DeliveryService
|
||||
{
|
||||
/**
|
||||
* 获取待审发货
|
||||
*/
|
||||
public static function getBadge()
|
||||
{
|
||||
return BadgeService::getModelTodo('stock_delivery');
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义查询打印数据
|
||||
*/
|
||||
public static function getPrintData($id, $print_master_id = false)
|
||||
|
||||
@@ -18,6 +18,9 @@ return [
|
||||
'stock_cancel' => 'Gdoo\Stock\Hooks\CancelHook',
|
||||
'stock_allocation' => 'Gdoo\Stock\Hooks\AllocationHook',
|
||||
],
|
||||
'badges' => [
|
||||
'stock_delivery_index' => 'Gdoo\Stock\Services\DeliveryService::getBadge',
|
||||
],
|
||||
'dialogs' => [
|
||||
'warehouse' => [
|
||||
'name' => '仓库',
|
||||
|
||||
@@ -227,7 +227,6 @@ var grid = null;
|
||||
}
|
||||
|
||||
layer.close(loading);
|
||||
|
||||
/*
|
||||
var loading = showLoading();
|
||||
$.post(app.url('stock/delivery/autoSave'), query + '&' + $.param(gets), function (res) {
|
||||
@@ -243,7 +242,6 @@ var grid = null;
|
||||
layer.close(loading);
|
||||
});
|
||||
*/
|
||||
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user