删除无用的注释和文件
This commit is contained in:
@@ -18,7 +18,6 @@ class AllocationController extends WorkflowController
|
||||
{
|
||||
public $permission = ['dialog', 'logistics', 'stockSelect'];
|
||||
|
||||
// 列表
|
||||
public function indexAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -72,7 +71,6 @@ class AllocationController extends WorkflowController
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建
|
||||
public function createAction($action = 'edit')
|
||||
{
|
||||
$id = (int) Request::get('id');
|
||||
@@ -87,25 +85,21 @@ class AllocationController extends WorkflowController
|
||||
], $tpl);
|
||||
}
|
||||
|
||||
// 编辑
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
// 审核
|
||||
public function auditAction()
|
||||
{
|
||||
return $this->createAction('audit');
|
||||
}
|
||||
|
||||
// 显示
|
||||
public function showAction()
|
||||
{
|
||||
return $this->createAction('show');
|
||||
}
|
||||
|
||||
// 打印
|
||||
public function printAction()
|
||||
{
|
||||
$id = Request::get('id');
|
||||
@@ -138,17 +132,10 @@ class AllocationController extends WorkflowController
|
||||
'template' => DB::table('model_template')->where('id', $template_id)->first()
|
||||
];
|
||||
|
||||
if ($master['in_warehouse_code'] == 27 || $master['in_warehouse_code'] == 21) {
|
||||
$warehouse_by = '李志全';
|
||||
} else {
|
||||
$warehouse_by = '万海英';
|
||||
}
|
||||
|
||||
$tpl = $this->display([
|
||||
'master' => $master,
|
||||
'rows' => $rows,
|
||||
'form' => $form,
|
||||
'warehouse_by' => $warehouse_by,
|
||||
], 'print/'.$template_id);
|
||||
return $tpl;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ class CancelController extends WorkflowController
|
||||
{
|
||||
public $permission = ['dialog'];
|
||||
|
||||
// 列表
|
||||
public function indexAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -74,7 +73,6 @@ class CancelController extends WorkflowController
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建
|
||||
public function createAction($action = 'edit')
|
||||
{
|
||||
$id = (int) Request::get('id');
|
||||
@@ -89,25 +87,21 @@ class CancelController extends WorkflowController
|
||||
], $tpl);
|
||||
}
|
||||
|
||||
// 编辑
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
// 审核
|
||||
public function auditAction()
|
||||
{
|
||||
return $this->createAction('audit');
|
||||
}
|
||||
|
||||
// 显示
|
||||
public function showAction()
|
||||
{
|
||||
return $this->createAction('show');
|
||||
}
|
||||
|
||||
// 打印
|
||||
public function printAction()
|
||||
{
|
||||
$id = Request::get('id');
|
||||
@@ -174,7 +168,6 @@ class CancelController extends WorkflowController
|
||||
]);
|
||||
}
|
||||
|
||||
// 删除
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -68,7 +68,6 @@ class CategoryController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建客户联系人
|
||||
public function createAction()
|
||||
{
|
||||
$id = (int)Request::get('id');
|
||||
@@ -78,15 +77,11 @@ class CategoryController extends DefaultController
|
||||
], 'create');
|
||||
}
|
||||
|
||||
// 创建客户联系人
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
/**
|
||||
* 弹出层信息
|
||||
*/
|
||||
public function dialogAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -123,7 +118,6 @@ class CategoryController extends DefaultController
|
||||
], 'dialog');
|
||||
}
|
||||
|
||||
// 删除
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -33,7 +33,6 @@ class DeliveryController extends WorkflowController
|
||||
'autoSave'
|
||||
];
|
||||
|
||||
// 发货列表
|
||||
public function indexAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -115,7 +114,6 @@ class DeliveryController extends WorkflowController
|
||||
]);
|
||||
}
|
||||
|
||||
// 明细列表
|
||||
public function detailAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -185,7 +183,6 @@ class DeliveryController extends WorkflowController
|
||||
]);
|
||||
}
|
||||
|
||||
// 自动保存
|
||||
public function autoSaveAction()
|
||||
{
|
||||
$gets = Request::all();
|
||||
@@ -245,7 +242,6 @@ class DeliveryController extends WorkflowController
|
||||
return $this->createAction('audit');
|
||||
}
|
||||
|
||||
// 新建
|
||||
public function createAction($action = 'edit')
|
||||
{
|
||||
$id = (int) Request::get('id');
|
||||
@@ -269,19 +265,16 @@ class DeliveryController extends WorkflowController
|
||||
], $tpl);
|
||||
}
|
||||
|
||||
// 编辑
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
// 审核
|
||||
public function auditAction()
|
||||
{
|
||||
return $this->createAction('audit');
|
||||
}
|
||||
|
||||
// 显示
|
||||
public function showAction()
|
||||
{
|
||||
return $this->createAction('show');
|
||||
@@ -308,7 +301,6 @@ class DeliveryController extends WorkflowController
|
||||
]);
|
||||
}
|
||||
|
||||
// 打印
|
||||
public function printAction()
|
||||
{
|
||||
$id = Request::get('id');
|
||||
@@ -430,7 +422,6 @@ class DeliveryController extends WorkflowController
|
||||
], 'getBatchSelect');
|
||||
}
|
||||
|
||||
// 删除
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -16,7 +16,6 @@ class DirectController extends WorkflowController
|
||||
{
|
||||
public $permission = ['dialog', 'importExcel'];
|
||||
|
||||
// 列表
|
||||
public function indexAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -69,7 +68,6 @@ class DirectController extends WorkflowController
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建
|
||||
public function createAction($action = 'edit')
|
||||
{
|
||||
$id = (int) Request::get('id');
|
||||
@@ -84,25 +82,21 @@ class DirectController extends WorkflowController
|
||||
], $tpl);
|
||||
}
|
||||
|
||||
// 编辑
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
// 审核
|
||||
public function auditAction()
|
||||
{
|
||||
return $this->createAction('audit');
|
||||
}
|
||||
|
||||
// 显示
|
||||
public function showAction()
|
||||
{
|
||||
return $this->createAction('show');
|
||||
}
|
||||
|
||||
// 打印
|
||||
public function printAction()
|
||||
{
|
||||
$id = Request::get('id');
|
||||
@@ -236,7 +230,6 @@ class DirectController extends WorkflowController
|
||||
return view('importExcel');
|
||||
}
|
||||
|
||||
// 删除
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -68,7 +68,6 @@ class LocationController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建客户联系人
|
||||
public function createAction($action = 'edit')
|
||||
{
|
||||
$id = (int)Request::get('id');
|
||||
@@ -78,15 +77,11 @@ class LocationController extends DefaultController
|
||||
], 'create');
|
||||
}
|
||||
|
||||
// 创建客户联系人
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
/**
|
||||
* 弹出层信息
|
||||
*/
|
||||
public function dialogAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -177,7 +172,6 @@ class LocationController extends DefaultController
|
||||
}
|
||||
}
|
||||
|
||||
// 删除
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -16,7 +16,6 @@ class Record01Controller extends AuditController
|
||||
{
|
||||
public $permission = ['dialog'];
|
||||
|
||||
// 列表
|
||||
public function indexAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -70,7 +69,6 @@ class Record01Controller extends AuditController
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建
|
||||
public function createAction($action = 'edit')
|
||||
{
|
||||
$id = (int) Request::get('id');
|
||||
@@ -85,26 +83,22 @@ class Record01Controller extends AuditController
|
||||
], $tpl);
|
||||
}
|
||||
|
||||
// 编辑
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
// 显示
|
||||
public function showAction()
|
||||
{
|
||||
return $this->createAction('show');
|
||||
}
|
||||
|
||||
// 打印
|
||||
public function printAction()
|
||||
{
|
||||
$this->layout = 'layouts.print2';
|
||||
print_prince($this->createAction('print'));
|
||||
}
|
||||
|
||||
// 删除
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -16,7 +16,6 @@ class Record08Controller extends AuditController
|
||||
{
|
||||
public $permission = ['dialog', 'importExcel'];
|
||||
|
||||
// 列表
|
||||
public function indexAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -70,7 +69,6 @@ class Record08Controller extends AuditController
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建
|
||||
public function createAction($action = 'edit')
|
||||
{
|
||||
$id = (int) Request::get('id');
|
||||
@@ -85,19 +83,16 @@ class Record08Controller extends AuditController
|
||||
], $tpl);
|
||||
}
|
||||
|
||||
// 编辑
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
// 显示
|
||||
public function showAction()
|
||||
{
|
||||
return $this->createAction('show');
|
||||
}
|
||||
|
||||
// 打印
|
||||
public function printAction()
|
||||
{
|
||||
$this->layout = 'layouts.print2';
|
||||
@@ -155,7 +150,6 @@ class Record08Controller extends AuditController
|
||||
return view('importExcel');
|
||||
}
|
||||
|
||||
// 删除
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -16,7 +16,6 @@ class Record09Controller extends WorkflowController
|
||||
{
|
||||
public $permission = ['dialog'];
|
||||
|
||||
// 列表
|
||||
public function indexAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -70,7 +69,6 @@ class Record09Controller extends WorkflowController
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建
|
||||
public function createAction($action = 'edit')
|
||||
{
|
||||
$id = (int) Request::get('id');
|
||||
@@ -85,25 +83,21 @@ class Record09Controller extends WorkflowController
|
||||
], $tpl);
|
||||
}
|
||||
|
||||
// 编辑
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
// 审核
|
||||
public function auditAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
// 显示
|
||||
public function showAction()
|
||||
{
|
||||
return $this->createAction('show');
|
||||
}
|
||||
|
||||
// 打印
|
||||
public function printAction()
|
||||
{
|
||||
$id = Request::get('id');
|
||||
@@ -146,7 +140,6 @@ class Record09Controller extends WorkflowController
|
||||
return $tpl;
|
||||
}
|
||||
|
||||
// 删除
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -16,7 +16,6 @@ class Record10Controller extends WorkflowController
|
||||
{
|
||||
public $permission = ['dialog', 'print3'];
|
||||
|
||||
// 列表
|
||||
public function indexAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -43,15 +42,6 @@ class Record10Controller extends WorkflowController
|
||||
}
|
||||
$model->orderBy($header['sort'], $header['order']);
|
||||
|
||||
/*
|
||||
// 外部库管登录
|
||||
if (auth()->id() == 2177) {
|
||||
$model->whereIn('stock_record10.warehouse_id', [20001, 20047]);
|
||||
} else {
|
||||
$model->whereNotIn('stock_record10.warehouse_id', [20001, 20047]);
|
||||
}
|
||||
*/
|
||||
|
||||
foreach ($search['where'] as $where) {
|
||||
if ($where['active']) {
|
||||
$model->search($where);
|
||||
@@ -79,7 +69,6 @@ class Record10Controller extends WorkflowController
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建
|
||||
public function createAction($action = 'edit')
|
||||
{
|
||||
$id = (int) Request::get('id');
|
||||
@@ -95,25 +84,21 @@ class Record10Controller extends WorkflowController
|
||||
], $tpl);
|
||||
}
|
||||
|
||||
// 编辑
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
// 审核
|
||||
public function auditAction()
|
||||
{
|
||||
return $this->createAction('audit');
|
||||
}
|
||||
|
||||
// 显示
|
||||
public function showAction()
|
||||
{
|
||||
return $this->createAction('show');
|
||||
}
|
||||
|
||||
// 打印
|
||||
public function print2Action()
|
||||
{
|
||||
$this->layout = 'layouts.print2';
|
||||
@@ -122,7 +107,6 @@ class Record10Controller extends WorkflowController
|
||||
print_prince($this->createAction('print'));
|
||||
}
|
||||
|
||||
// 显示促销
|
||||
public function printAction()
|
||||
{
|
||||
$id = Request::get('id');
|
||||
@@ -172,101 +156,6 @@ class Record10Controller extends WorkflowController
|
||||
}
|
||||
}
|
||||
|
||||
// 显示促销
|
||||
public function print3Action()
|
||||
{
|
||||
$this->layout = 'layouts.print2';
|
||||
$id = Request::get('id');
|
||||
$template_id = Request::get('template_id');
|
||||
if ($template_id == 117) {
|
||||
|
||||
$this->layout = 'layouts.print2';
|
||||
|
||||
$master = DB::table('stock_record10 as m')->where('m.id', $id)
|
||||
->leftJoin('stock_type as st', 'st.id', '=', 'm.type_id')
|
||||
->leftJoin('department', 'department.id', '=', 'm.department_id')
|
||||
->leftJoin('warehouse', 'warehouse.id', '=', 'm.warehouse_id')
|
||||
->selectRaw('m.*, st.name as type_name, warehouse.name as warehouse_name, department.name as department_name')
|
||||
->first();
|
||||
|
||||
$rows = DB::table('stock_record10_data as d')
|
||||
->leftJoin('stock_record10 as m', 'm.id', '=', 'd.record10_id')
|
||||
->leftJoin('product as p', 'p.id', '=', 'd.product_id')
|
||||
->leftJoin('product_unit as pu', 'pu.id', '=', 'p.unit_id')
|
||||
->leftJoin('stock_type as st', 'st.id', '=', 'm.type_id')
|
||||
->where('m.id', $id)
|
||||
->selectRaw('
|
||||
d.*,
|
||||
p.name as product_name,
|
||||
p.code as product_code,
|
||||
p.spec as product_spec,
|
||||
st.name as type_name,
|
||||
pu.name as product_unit
|
||||
')
|
||||
->get();
|
||||
|
||||
$form = [
|
||||
'template' => DB::table('model_template')->where('id', $template_id)->first()
|
||||
];
|
||||
|
||||
$template = "report.fr3";
|
||||
$ver = 3.0;
|
||||
|
||||
$id = (int) Request::get('id');
|
||||
$header['action'] = 'print';
|
||||
$header['code'] = 'stock_record10';
|
||||
$header['id'] = $id;
|
||||
$form = Form::make($header);
|
||||
|
||||
$Tables = [];
|
||||
foreach($form['prints'] as $print) {
|
||||
$fields = [];
|
||||
foreach($print['fields'] as $field) {
|
||||
$type = 'str';
|
||||
$size = 255;
|
||||
if ($field['type'] == 'INT' || $field['type'] == 'TINYINT') {
|
||||
$type = 'int';
|
||||
$size = 0;
|
||||
}
|
||||
if ($field['type'] == 'DATE') {
|
||||
$type = 'str';
|
||||
}
|
||||
if ($field['type'] == 'DECIMAL') {
|
||||
$type = 'float';
|
||||
$size = 0;
|
||||
}
|
||||
$fields[] = ["type" => $type, "size" => $size, "name" => $field['field'], "required" => false];
|
||||
}
|
||||
$Tables[] = [
|
||||
'Name' => $print['name'],
|
||||
'Cols' => $fields,
|
||||
'Data' => $print['data'],
|
||||
];
|
||||
}
|
||||
$jsonObject = [
|
||||
"template" => $template,
|
||||
"ver" => $ver,
|
||||
"Tables" => $Tables,
|
||||
];
|
||||
|
||||
$jsonStr = json_encode($jsonObject);
|
||||
|
||||
|
||||
$tpl = $this->display([
|
||||
'master' => $master,
|
||||
'jsonStr' => $jsonStr,
|
||||
'rows' => $rows,
|
||||
'form' => $form,
|
||||
], 'print3/'.$template_id);
|
||||
return $tpl;
|
||||
|
||||
} else {
|
||||
$tpl = $this->createAction('print');
|
||||
print_prince($tpl);
|
||||
}
|
||||
}
|
||||
|
||||
// 删除
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -16,7 +16,6 @@ class Record11Controller extends AuditController
|
||||
{
|
||||
public $permission = ['dialog'];
|
||||
|
||||
// 列表
|
||||
public function indexAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -69,7 +68,6 @@ class Record11Controller extends AuditController
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建
|
||||
public function createAction($action = 'edit')
|
||||
{
|
||||
$id = (int) Request::get('id');
|
||||
@@ -84,19 +82,16 @@ class Record11Controller extends AuditController
|
||||
], $tpl);
|
||||
}
|
||||
|
||||
// 编辑
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
// 显示
|
||||
public function showAction()
|
||||
{
|
||||
return $this->createAction('show');
|
||||
}
|
||||
|
||||
// 打印
|
||||
public function printAction()
|
||||
{
|
||||
$id = Request::get('id');
|
||||
@@ -147,7 +142,6 @@ class Record11Controller extends AuditController
|
||||
}
|
||||
}
|
||||
|
||||
// 删除
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -99,18 +99,6 @@ class ReportController extends DefaultController
|
||||
}
|
||||
$rows = [];
|
||||
if ($query['filter'] == 1) {
|
||||
/*
|
||||
$rows = DB::select('EXEC P_ReportOrderStockTotal ?,?,?,?,?,?,?,?', [
|
||||
$fields['warehouse_id'],
|
||||
$fields['product_code'],
|
||||
$fields['type'],
|
||||
$fields['date'][0],
|
||||
$fields['date'][1],
|
||||
auth()->id(),
|
||||
$fields['batch'],
|
||||
$fields['bmj'],
|
||||
]);
|
||||
*/
|
||||
$rows = StockService::reportOrderStockTotal(
|
||||
$fields['warehouse_id'],
|
||||
$fields['product_code'],
|
||||
|
||||
@@ -68,7 +68,6 @@ class TypeController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建客户联系人
|
||||
public function createAction()
|
||||
{
|
||||
$id = (int)Request::get('id');
|
||||
@@ -78,15 +77,11 @@ class TypeController extends DefaultController
|
||||
], 'create');
|
||||
}
|
||||
|
||||
// 创建客户联系人
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
/**
|
||||
* 弹出层信息
|
||||
*/
|
||||
public function dialogAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -123,7 +118,6 @@ class TypeController extends DefaultController
|
||||
], 'dialog');
|
||||
}
|
||||
|
||||
// 删除
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -68,7 +68,6 @@ class WarehouseController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建客户联系人
|
||||
public function createAction()
|
||||
{
|
||||
$id = (int)Request::get('id');
|
||||
@@ -78,15 +77,11 @@ class WarehouseController extends DefaultController
|
||||
], 'create');
|
||||
}
|
||||
|
||||
// 创建客户联系人
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
/**
|
||||
* 弹出层信息
|
||||
*/
|
||||
public function dialogAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -166,7 +161,6 @@ class WarehouseController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
// 删除
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<table width="100%" style="LINE-HEIGHT:30px;font-size:11pt;" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
|
||||
<tr>
|
||||
<td width="40%">制单人:{{$master['created_by']}}</td>
|
||||
<td width="40%">库管员:{{$warehouse_by}}</td>
|
||||
<td width="40%">库管员:</td>
|
||||
<td width="20%" align="right">第<font tdata="PageNO">##</font>页,<font tdata="PageCount">##</font></span>页</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
|
||||
<div style="width: 100%;text-align:center;">
|
||||
<h2>康虎云报表系统报表打印测试(Ver 1.2.2)</h2>
|
||||
<h3>(PHP版演示)</h3>
|
||||
<div>
|
||||
点按下面的“打印”按钮开始打印<br/>
|
||||
<input type="button" id="btnPrint" value="打印" onClick="doSend(_reportData);" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="readme">
|
||||
说明:<br/>
|
||||
通过修改本页源码中的下列参数控制本页的行为:<br/>
|
||||
<script language="javascript" type="text/javascript"><br/>
|
||||
<span style="color:green">/**下面四个参数必须放在myreport.js脚本后面,以覆盖myreport.js中的默认值**/</span><br/>
|
||||
<span style="color:blue">var</span> _delay_send = <span style="color:red">1000</span>; <span style="color:green">//发送打印服务器前延时时长</span><br/>
|
||||
<span style="color:blue">var</span> _delay_close = <span style="color:red">1000</span>; <span style="color:green">//打印完成后关闭窗口的延时时长, -1则表示不关闭</span><br/>
|
||||
<span style="color:blue">var</span> cfprint_addr = <span style="color:red">"127.0.0.1"</span>; <span style="color:green">//打印服务器监听地址</span><br/>
|
||||
<span style="color:blue">var</span> cfprint_port = <span style="color:red">54321</span>; <span style="color:green">//打印服务器监听端口</span><br/>
|
||||
</script>
|
||||
|
||||
</div>
|
||||
<!-- 定义一个div用以显示实际发送给打印伺服程序的json,方便调试,-->
|
||||
<div id="output"></div>
|
||||
</body>
|
||||
|
||||
<!--下面引入两个必须的 javascript 文件-->
|
||||
<script language="javascript" type="text/javascript" src="{{$asset_url}}/vendor/cfprint/cfprint.min.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="{{$asset_url}}/vendor/cfprint/myreport.js"></script>
|
||||
<!-- 下面重新设置几个参数,以覆盖myreport.js 中的默认值 -->
|
||||
<script language="javascript" type="text/javascript">
|
||||
/**下面四个参数必须放在myreport.js脚本后面,以覆盖myreport.js中的默认值**/
|
||||
var _delay_send = -1; //发送打印服务器前延时时长, -1则表示不自动打印
|
||||
var _delay_close = -1; //打印完成后关闭窗口的延时时长, -1则表示不关闭
|
||||
var cfprint_addr = "127.0.0.1"; //打印服务器监听地址
|
||||
var cfprint_port = 54321; //打印服务器监听端口
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
//把PHP代码里生成的数据json字符串转成javascript放在页面上,
|
||||
//浏览器加载完该页面后会把该数据发送给康虎云报表伺服程序去打印
|
||||
var _reportData = '<?php echo $jsonStr; ?>';
|
||||
|
||||
//在javascript控制台输出一下这个json字符串,对于调试有帮助
|
||||
console.log("reportData = " + _reportData);
|
||||
</script>
|
||||
Reference in New Issue
Block a user