Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
note-library
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5cfb199b
authored
May 12, 2020
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
up
parent
77292988
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
3 deletions
app/Http/Controllers/WebController.php
public/js/web/labelList.js
public/js/web/record.js
resources/views/web/record.blade.php
resources/views/web/showPage.blade.php
app/Http/Controllers/WebController.php
View file @
5cfb199b
...
@@ -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
);
}
}
}
public/js/web/labelList.js
View file @
5cfb199b
...
@@ -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
:
'创建人'
}
...
...
public/js/web/record.js
View file @
5cfb199b
...
@@ -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
:
'型号'
}
...
...
resources/views/web/record.blade.php
View file @
5cfb199b
...
@@ -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>--}}
...
...
resources/views/web/showPage.blade.php
0 → 100644
View file @
5cfb199b
{
!!
$templateInfo
->
tmpRelation
->
html
!!
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment