Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
small-program-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4f041eaa
authored
Jul 02, 2019
by
duanguohui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜谱管理
parent
aa3fdce1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
125 additions
and
102 deletions
+125
-102
package-lock.json
+13
-34
src/components/Layout.vue
+2
-2
src/views/banner/bannerAdd.vue
+31
-25
src/views/banner/bannerList.vue
+28
-11
src/views/cookbook.vue
+36
-21
src/views/log.vue
+9
-6
src/views/user.vue
+6
-3
No files found.
package-lock.json
View file @
4f041eaa
...
...
@@ -2873,8 +2873,7 @@
"version"
:
"4.6.0"
,
"resolved"
:
"https://registry.npm.taobao.org/co/download/co-4.6.0.tgz"
,
"integrity"
:
"sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"coa"
:
{
"version"
:
"2.0.2"
,
...
...
@@ -5312,8 +5311,7 @@
"ansi-regex"
:
{
"version"
:
"2.1.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"aproba"
:
{
"version"
:
"1.2.0"
,
...
...
@@ -5334,14 +5332,12 @@
"balanced-match"
:
{
"version"
:
"1.0.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"brace-expansion"
:
{
"version"
:
"1.1.11"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"balanced-match"
:
"^1.0.0"
,
"concat-map"
:
"0.0.1"
...
...
@@ -5356,20 +5352,17 @@
"code-point-at"
:
{
"version"
:
"1.1.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"concat-map"
:
{
"version"
:
"0.0.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"console-control-strings"
:
{
"version"
:
"1.1.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"core-util-is"
:
{
"version"
:
"1.0.2"
,
...
...
@@ -5486,8 +5479,7 @@
"inherits"
:
{
"version"
:
"2.0.3"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"ini"
:
{
"version"
:
"1.3.5"
,
...
...
@@ -5499,7 +5491,6 @@
"version"
:
"1.0.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"number-is-nan"
:
"^1.0.0"
}
...
...
@@ -5514,7 +5505,6 @@
"version"
:
"3.0.4"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"brace-expansion"
:
"^1.1.7"
}
...
...
@@ -5522,14 +5512,12 @@
"minimist"
:
{
"version"
:
"0.0.8"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"minipass"
:
{
"version"
:
"2.3.5"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"safe-buffer"
:
"^5.1.2"
,
"yallist"
:
"^3.0.0"
...
...
@@ -5548,7 +5536,6 @@
"version"
:
"0.5.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"minimist"
:
"0.0.8"
}
...
...
@@ -5629,8 +5616,7 @@
"number-is-nan"
:
{
"version"
:
"1.0.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"object-assign"
:
{
"version"
:
"4.1.1"
,
...
...
@@ -5642,7 +5628,6 @@
"version"
:
"1.4.0"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"wrappy"
:
"1"
}
...
...
@@ -5728,8 +5713,7 @@
"safe-buffer"
:
{
"version"
:
"5.1.2"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"safer-buffer"
:
{
"version"
:
"2.1.2"
,
...
...
@@ -5765,7 +5749,6 @@
"version"
:
"1.0.2"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"code-point-at"
:
"^1.0.0"
,
"is-fullwidth-code-point"
:
"^1.0.0"
,
...
...
@@ -5785,7 +5768,6 @@
"version"
:
"3.0.1"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-regex"
:
"^2.0.0"
}
...
...
@@ -5829,14 +5811,12 @@
"wrappy"
:
{
"version"
:
"1.0.2"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"yallist"
:
{
"version"
:
"3.0.3"
,
"bundled"
:
true
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
}
}
},
...
...
@@ -9643,8 +9623,7 @@
"version"
:
"4.0.8"
,
"resolved"
:
"https://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz"
,
"integrity"
:
"sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ="
,
"dev"
:
true
,
"optional"
:
true
"dev"
:
true
},
"rx-lite-aggregates"
:
{
"version"
:
"4.0.8"
,
...
...
src/components/Layout.vue
View file @
4f041eaa
...
...
@@ -19,8 +19,8 @@
<template
slot=
"title"
><i
class=
"icon"
><img
src=
"../assets/img/icon/ico3.png"
alt=
""
></i>
菜单管理
</
template
>
<el-menu-item-group>
<el-menu-item
index=
"/tab/bannerList"
>
banner管理
</el-menu-item>
<
el-menu-item
index=
"/tab/defaultPage/2"
>
外卖管理
</el-menu-item
>
<el-menu-item
index=
"/tab/cookbook"
>
每日食
谱管理
</el-menu-item>
<
!-- <el-menu-item index="/tab/defaultPage/2">外卖管理</el-menu-item> --
>
<el-menu-item
index=
"/tab/cookbook"
>
菜
谱管理
</el-menu-item>
<el-menu-item
index=
"/tab/cookList"
>
厨师管理
</el-menu-item>
<el-menu-item
index=
"/tab/orderList"
>
订单管理
</el-menu-item>
</el-menu-item-group>
...
...
src/views/banner/bannerAdd.vue
View file @
4f041eaa
...
...
@@ -5,7 +5,7 @@
<el-breadcrumb-item>
您当前的位置为:
</el-breadcrumb-item>
<el-breadcrumb-item>
菜单管理
</el-breadcrumb-item>
<el-breadcrumb-item>
banner管理
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/tab/bannerAdd' }">
{{
renderType
}}
新增轮播图
</el-breadcrumb-item>
<el-breadcrumb-item
>
新增轮播图
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<el-card
class=
"box-card no-margin-card"
>
...
...
@@ -28,7 +28,8 @@
action=
"http://47.94.209.240:8088/file/fileUpload"
:show-file-list=
"false"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
>
>
<!-- :before-upload="beforeAvatarUpload" -->
<img
v-if=
"imageUrl"
:src=
"imageUrl"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
...
...
@@ -41,12 +42,12 @@
</el-col>
<el-col
:span=
"18"
class=
"mt30"
>
<el-form-item
label=
"链接:"
:rules=
"
{required: true}">
<el-input
v-model=
"addForm.
name
"
placeholder=
"请输入链接"
></el-input>
<el-input
v-model=
"addForm.
herf
"
placeholder=
"请输入链接"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"18"
class=
"mt30"
>
<el-form-item
label=
"排序号:"
:rules=
"
{required: true}">
<el-input
v-model=
"addForm.
name
"
placeholder=
"请输入排序号(请填写数字,数字越大越靠前)"
></el-input>
<el-input
v-model=
"addForm.
sort
"
placeholder=
"请输入排序号(请填写数字,数字越大越靠前)"
></el-input>
</el-form-item>
</el-col>
</el-form>
...
...
@@ -71,35 +72,40 @@ export default {
}
},
created
()
{
this
.
getDetail
()
if
(
this
.
$route
.
params
.
editParams
)
{
var
editParams
=
this
.
$route
.
params
.
editParams
this
.
imageUrl
=
editParams
.
url
this
.
addForm
=
{
id
:
editParams
.
id
,
name
:
editParams
.
name
,
url
:
editParams
.
url
,
status
:
editParams
.
status
==
'1'
?
true
:
false
,
herf
:
editParams
.
herf
}
}
},
methods
:
{
getDetail
()
{
var
_this
=
this
this
.
$axios
.
get
(
'/pc/trade/get/id/'
+
this
.
$route
.
params
.
id
,
{
}).
then
(
function
(
res
)
{
console
.
log
(
res
.
data
)
_this
.
orderObg
=
res
.
data
.
data
})
},
// 保存
saveBtn
()
{
var
that
=
this
saveBtn
()
{
// 保存
var
params
=
{
"herf"
:
that
.
addForm
.
herf
,
"herf"
:
this
.
addForm
.
herf
?
this
.
addForm
.
herf
:
''
,
"id"
:
0
,
"name"
:
that
.
addForm
.
herf
,
"status"
:
that
.
addForm
.
status
,
"url"
:
that
.
addForm
.
status
,
"userName"
:
that
.
addForm
.
status
"name"
:
this
.
addForm
.
name
,
"status"
:
this
.
addForm
.
status
,
"url"
:
this
.
addForm
.
url
,
"userName"
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'userInfo'
)).
data
.
userResponse
.
userName
}
var
postUrl
=
'/pcbanner/add/banner'
if
(
this
.
addForm
.
id
)
{
postUrl
=
'/pcbanner/update/banner'
params
.
id
=
this
.
addForm
.
id
}
this
.
$axios
.
post
(
'/pcbanner/add/banner'
,
params
,
{
}).
then
(
function
(
res
)
{
console
.
log
(
res
.
data
)
_this
.
orderObg
=
res
.
data
.
data
this
.
$axios
.
post
(
postUrl
,
params
,
{
}).
then
((
res
)
=>
{
this
.
$router
.
go
(
-
1
)
})
},
handleAvatarSuccess
(
res
,
file
)
{
this
.
addForm
.
url
=
res
.
data
this
.
imageUrl
=
URL
.
createObjectURL
(
file
.
raw
);
},
goBack
()
{
...
...
src/views/banner/bannerList.vue
View file @
4f041eaa
...
...
@@ -15,7 +15,7 @@
<el-input
v-model=
"formInline.orderNumber"
placeholder=
"工号"
></el-input>
</el-form-item>
</el-col>
<el-col
:sm=
"1
0
"
>
<el-col
:sm=
"1
2
"
>
<el-form-item
label=
"上传时间"
>
<el-col
:sm=
"11"
>
<el-form-item
prop=
"date1"
>
...
...
@@ -32,9 +32,9 @@
</el-col>
</el-form-item>
</el-col>
<el-col
:sm=
"2"
>
<el-col
:sm=
"2"
:offset=
"1"
>
<el-form-item>
<el-button
type=
"primary"
@
click=
"searchList"
size=
"small"
>
搜索
</el-button>
<el-button
class=
"searchButton"
type=
"primary"
@
click=
"searchList"
size=
"small"
>
搜索
</el-button>
</el-form-item>
</el-col>
</el-form>
...
...
@@ -55,32 +55,38 @@
:header-row-style="{height: '60px'}"
style="width: 100%">
<el-table-column
prop=
"
tradeNo
"
prop=
"
name
"
label=
"轮播图名称"
align=
"center"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"u
serNo
"
prop=
"u
rl
"
label=
"缩略图"
align=
"center"
width=
"240"
>
<template
slot-scope=
"scope"
>
<img
class=
"bannerImg"
v-if=
"scope.row.url"
:src=
"scope.row.url"
alt=
""
>
</
template
>
</el-table-column>
<el-table-column
prop=
"
userName
"
prop=
"
status
"
align=
"center"
label=
"启用"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
status
==
"1"
?
'启用'
:
'未启用'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"
typ
e"
prop=
"
userNam
e"
align=
"center"
label=
"上传人"
>
<
template
slot-scope=
"scope"
>
<span>
{{
renderType
(
scope
.
row
.
type
)
}}
</span>
<span>
{{
scope
.
row
.
userName
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"
num
"
prop=
"
createDate
"
align=
"center"
label=
"上传时间"
>
</el-table-column>
...
...
@@ -138,11 +144,15 @@ export default {
this
.
orderListData
=
res
.
data
.
data
.
resultList
this
.
countPage
=
res
.
data
.
data
.
countPage
this
.
page
=
res
.
data
.
data
.
page
console
.
log
(
res
.
d
ata
)
console
.
log
(
this
.
orderListD
ata
)
})
},
handleRowChange
(
row
,
event
,
column
)
{
this
.
$router
.
push
({
name
:
'orderDetail'
,
params
:
{
id
:
row
.
id
,
type
:
row
.
type
}
})
this
.
$router
.
push
({
name
:
'bannerAdd'
,
params
:
{
editParams
:
row
}
})
},
searchList
()
{
this
.
getOrderList
()
...
...
@@ -162,4 +172,11 @@ export default {
</
script
>
<
style
scoped
lang=
"less"
>
.searchButton
{
margin-top
:
43px
;
}
.bannerImg
{
width
:
100px
;
margin-left
:
60px
;
}
</
style
>
src/views/cookbook.vue
View file @
4f041eaa
...
...
@@ -3,7 +3,8 @@
<div
class=
"breadcrumb-box"
style=
"margin-bottom: 20px"
>
<el-breadcrumb
separator-class=
"el-icon-arrow-right"
>
<el-breadcrumb-item>
您当前的位置为:
</el-breadcrumb-item>
<el-breadcrumb-item>
每日食谱管理
</el-breadcrumb-item>
<el-breadcrumb-item>
菜单管理
</el-breadcrumb-item>
<el-breadcrumb-item>
菜谱管理
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
class=
"order-list"
>
...
...
@@ -16,7 +17,7 @@
</el-col>
<el-col
:sm=
"2"
>
<el-form-item>
<el-button
type=
"primary"
@
click=
"searchList"
size=
"small"
>
搜索
</el-button>
<el-button
class=
"searchButton"
type=
"primary"
@
click=
"searchList"
size=
"small"
>
搜索
</el-button>
</el-form-item>
</el-col>
</el-form>
...
...
@@ -33,62 +34,76 @@
:header-row-style="{height: '60px'}"
style="width: 100%">
<el-table-column
prop=
"
tradeN
o"
prop=
"
mn
o"
label=
"菜品编号"
align=
"center"
>
</el-table-column>
<el-table-column
prop=
"
userNo
"
prop=
"
mnm
"
label=
"菜品名称"
align=
"center"
>
</el-table-column>
<el-table-column
prop=
"
userName
"
prop=
"
imgUrl
"
align=
"center"
label=
"菜品图片"
>
<template
slot-scope=
"scope"
>
<img
class=
"cookImage"
v-if=
"scope.row.imgUrl"
:src=
"scope.row.imgUrl"
alt=
""
>
</
template
>
</el-table-column>
<el-table-column
prop=
"type"
prop=
"type
Nm
"
align=
"center"
label=
"菜品种类"
>
<
template
slot-scope=
"scope"
>
<span>
{{
renderType
(
scope
.
row
.
type
)
}}
</span>
<span>
{{
scope
.
row
.
typeNm
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"
userName
"
prop=
"
stock
"
align=
"center"
label=
"库存数量"
>
</el-table-column>
<el-table-column
prop=
"
userName
"
prop=
"
amount
"
align=
"center"
label=
"单价"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
amount
?
scope
.
row
.
amount
:
''
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"u
serName
"
prop=
"u
nit
"
align=
"center"
label=
"单位"
>
</el-table-column>
<el-table-column
prop=
"
userName
"
prop=
"
menuKbn
"
align=
"center"
label=
"菜谱分类"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
menuKbn
==
'C03001'
?
'早餐'
:
''
}}
{{
scope
.
row
.
menuKbn
==
'C03002'
?
'午餐'
:
''
}}
{{
scope
.
row
.
menuKbn
==
'C03003'
?
'晚餐'
:
''
}}
{{
scope
.
row
.
menuKbn
==
'C03004'
?
'午餐外卖'
:
''
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"
userName
"
prop=
"
beginDtm
"
align=
"center"
label=
"菜谱发布时间"
>
</el-table-column>
<el-table-column
prop=
"
userName
"
prop=
"
beginDtm
"
align=
"center"
label=
"预定开始"
>
</el-table-column>
<el-table-column
prop=
"
userName
"
prop=
"
outDtm
"
align=
"center"
label=
"预定截止"
>
</el-table-column>
...
...
@@ -136,21 +151,18 @@ export default {
},
getOrderList
()
{
let
parms
=
{
}
this
.
$axios
({
method
:
'post'
,
url
:
'/pc
log/get
/list?p='
+
this
.
allPage
+
'&c='
+
this
.
currentPage
,
url
:
'/pc
food
/list?p='
+
this
.
allPage
+
'&c='
+
this
.
currentPage
,
data
:
parms
}).
then
((
res
)
=>
{
this
.
orderListData
=
res
.
data
.
data
.
resultList
this
.
countPage
=
res
.
data
.
data
.
countPage
this
.
page
=
res
.
data
.
data
.
page
console
.
log
(
res
.
data
)
})
},
handleRowChange
(
row
,
event
,
column
)
{
this
.
$router
.
push
({
name
:
'orderDetail'
,
params
:
{
id
:
row
.
id
,
type
:
row
.
type
}
})
},
searchList
()
{
this
.
getOrderList
()
...
...
@@ -162,12 +174,15 @@ export default {
goToPage
()
{
this
.
getOrderList
()
},
goAdd
()
{
this
.
$router
.
push
(
'/tab/bannerAdd'
)
},
},
}
</
script
>
<
style
scoped
lang=
"less"
>
.searchButton
{
margin-top
:
43px
;
}
.cookImage
{
width
:
50px
;
}
</
style
>
src/views/log.vue
View file @
4f041eaa
...
...
@@ -9,21 +9,21 @@
<div
class=
"order-list"
>
<el-card
class=
"box-card no-margin-card margin-bottom20"
>
<el-form
:inline=
"true"
:model=
"formInline"
class=
"demo-form-inline"
>
<el-col
:sm=
"
6
"
class=
"margin-bottom20"
>
<el-col
:sm=
"
5
"
class=
"margin-bottom20"
>
<el-form-item
label=
"操作人"
>
<el-input
v-model=
"formInline.orderNumber"
placeholder=
"操作人"
></el-input>
</el-form-item>
</el-col>
<el-col
:sm=
"1
0
"
>
<el-col
:sm=
"1
3
"
>
<el-form-item
label=
"操作时间"
>
<el-col
:sm=
"1
1
"
>
<el-col
:sm=
"1
0
"
>
<el-form-item
prop=
"date1"
>
<el-date-picker
v-model=
"formInline.startTime"
type=
"datetime"
placeholder=
"开始时间"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
class=
"line"
:sm=
"2"
style=
"text-align: center"
>
-
</el-col>
<el-col
:sm=
"1
1
"
>
<el-col
:sm=
"1
0
"
>
<el-form-item
prop=
"date2"
>
<el-date-picker
v-model=
"formInline.endTime"
type=
"datetime"
placeholder=
"结束时间"
>
</el-date-picker>
...
...
@@ -31,9 +31,9 @@
</el-col>
</el-form-item>
</el-col>
<el-col
:sm=
"2"
>
<el-col
:sm=
"2"
:offset=
"1"
>
<el-form-item>
<el-button
type=
"primary"
@
click=
"searchList"
size=
"small"
>
搜索
</el-button>
<el-button
class=
"searchButton"
type=
"primary"
@
click=
"searchList"
size=
"small"
>
搜索
</el-button>
</el-form-item>
</el-col>
</el-form>
...
...
@@ -152,4 +152,7 @@ export default {
</
script
>
<
style
scoped
lang=
"less"
>
.searchButton
{
margin-top
:
43px
;
}
</
style
>
src/views/user.vue
View file @
4f041eaa
...
...
@@ -24,9 +24,9 @@
<el-input
v-model=
"formInline.tel"
placeholder=
"手机号"
></el-input>
</el-form-item>
</el-col>
<el-col
:sm=
"2"
>
<el-form-item>
<el-button
type=
"primary"
@
click=
"searchList"
size=
"small"
>
搜索
</el-button>
<el-col
:sm=
"2"
>
<el-form-item
>
<el-button
class=
"searchButton"
type=
"primary"
@
click=
"searchList"
size=
"small"
>
搜索
</el-button>
</el-form-item>
</el-col>
</el-form>
...
...
@@ -172,4 +172,7 @@ export default {
</
script
>
<
style
scoped
lang=
"less"
>
.searchButton
{
margin-top
:
40px
;
}
</
style
>
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