Commit 5cfb199b by 孙龙

up

parent 77292988
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Exceptions\IcException; use App\Exceptions\IcException;
use App\Model\TmplRelationsModel;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Http\Requests; use App\Http\Requests;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
...@@ -88,6 +89,26 @@ class WebController extends Controller ...@@ -88,6 +89,26 @@ class WebController extends Controller
return view('web', $info); return view('web', $info);
} }
public function showPage($request,$info){
$info['title'] = '预览';
$id = $request->input("tmpl_relation_id",0);
// dump($id);
$tmpRelation = TmplRelationsModel::where("id",intval($id))->first();
$tmpRelation->template = $tmpRelation->template;
$tmpRelation->tmpRelation = $tmpRelation->template->template_extend;
$tmpRelation->saleOrder = $tmpRelation->saleOrder;
// dump($tmpRelation);
// dump($tmpRelation->template);
// dump($tmpRelation->template->template_extend);
// dump($tmpRelation->saleOrder);
dump($tmpRelation->tmpRelation->html);
$info['templateInfo'] = $tmpRelation;
// dump($info);
return view('web', $info);
}
} }
...@@ -21,7 +21,7 @@ layui.use(['form', 'table', 'laydate'], function(){ ...@@ -21,7 +21,7 @@ layui.use(['form', 'table', 'laydate'], function(){
model_id: $('input[name=model_id]').val() model_id: $('input[name=model_id]').val()
} }
,cols: [[ //表头 ,cols: [[ //表头
{title: 'ID',field:"id", type: 'numbers',fixed: 'left', width: 80} {title: 'ID',field:"id",fixed: 'left', width: 80}
,{field: 'template_name', title: '模板名称(可点击修改)',edit: 'text'} ,{field: 'template_name', title: '模板名称(可点击修改)',edit: 'text'}
,{field: 'status', title: '状态',templet:"#status"} ,{field: 'status', title: '状态',templet:"#status"}
,{field: 'create_username', title: '创建人'} ,{field: 'create_username', title: '创建人'}
......
...@@ -24,7 +24,7 @@ layui.use(['form', 'table', 'laydate'], function(){ ...@@ -24,7 +24,7 @@ layui.use(['form', 'table', 'laydate'], function(){
} }
,cols: [[ //表头 ,cols: [[ //表头
{title: '序号',field:"id", type: 'checkbox',fixed: 'left', width: 80}, {title: '序号',field:"id", type: 'checkbox',fixed: 'left', width: 80},
{title: '序号',field:"id", type: 'number',fixed: 'left', width: 80} {title: '序号',field:"id",fixed: 'left', width: 80}
,{field: 'template_name', title: '模板名称'} ,{field: 'template_name', title: '模板名称'}
,{field: 'sale_order_sn', title: '销售单号'} ,{field: 'sale_order_sn', title: '销售单号'}
,{field: 'goods_type', title: '型号'} ,{field: 'goods_type', title: '型号'}
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<table id="list" lay-filter="list"></table> <table id="list" lay-filter="list"></table>
<script type="text/html" id="action"> <script type="text/html" id="action">
<a class="btn btn-xs btn-outline btn-info" lay-event="offline">预览</a> <a class="btn btn-xs btn-outline btn-info" href="/web/showPage?tmpl_relation_id=@{{ d.id }}" target="_blank" lay-event="offline">预览</a>
<a class="btn btn-xs btn-outline btn-success" href="/web/editLabel?t_id=@{{ d.id }}" target="_blank">下载</a> <a class="btn btn-xs btn-outline btn-success" href="/web/editLabel?t_id=@{{ d.id }}" target="_blank">下载</a>
{{--@{{# if (d.status == -1) { }}--}} {{--@{{# if (d.status == -1) { }}--}}
{{--<a class="btn btn-xs btn-outline layui-btn-primary" lay-event="enable">启用</a>--}} {{--<a class="btn btn-xs btn-outline layui-btn-primary" lay-event="enable">启用</a>--}}
......
{!! $templateInfo->tmpRelation->html !!}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment