Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
store-system
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
luoyangfei
store-system
Commits
a7fdefcf
Commit
a7fdefcf
authored
Nov 21, 2018
by
燕南天
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
前后台项目完善
parent
b359f2cf
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
674 additions
and
438 deletions
+674
-438
index.html
2code/web/h5_pro/index.html
+2
-2
HBanner.vue
2code/web/h5_pro/src/views/home/components/HBanner.vue
+3
-0
HShopList.vue
2code/web/h5_pro/src/views/home/components/HShopList.vue
+2
-1
HStaff.vue
2code/web/h5_pro/src/views/home/components/HStaff.vue
+4
-4
index.vue
2code/web/h5_pro/src/views/home/index.vue
+1
-0
index.vue
2code/web/h5_pro/src/views/shopDetails/index.vue
+47
-7
index.vue
2code/web/h5_pro/src/views/workerDetails/index.vue
+38
-5
WStaff.vue
2code/web/h5_pro/src/views/workerList/components/WStaff.vue
+4
-4
index.vue
2code/web/h5_pro/src/views/workerList/index.vue
+2
-0
index.html
2code/web/mgt_pro/index.html
+1
-1
administratorstList.vue
.../mgt_pro/src/views/administrators/administratorstList.vue
+42
-52
advertList.vue
2code/web/mgt_pro/src/views/advert/advertList.vue
+14
-0
index.vue
2code/web/mgt_pro/src/views/login/index.vue
+1
-1
storeList.vue
2code/web/mgt_pro/src/views/store/storeList.vue
+264
-203
workerList.vue
2code/web/mgt_pro/src/views/worker/workerList.vue
+249
-158
No files found.
2code/web/h5_pro/index.html
View file @
a7fdefcf
...
...
@@ -3,12 +3,12 @@
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0,user-scalable=no"
>
<title>
xule_pro
</title>
<title>
娱乐汇
</title>
</head>
<body>
<div
id=
"app"
></div>
<!-- built files will be auto injected -->
<script
type=
"text/javascript"
>
document
.
documentElement
.
style
.
fontSize
=
document
.
documentElement
.
clientWidth
/
750
*
100
+
'px'
;
</script>
<script
type=
"text/javascript"
>
document
.
documentElement
.
style
.
fontSize
=
document
.
documentElement
.
clientWidth
/
750
*
100
*
0.9
+
'px'
;
</script>
</body>
</html>
2code/web/h5_pro/src/views/home/components/HBanner.vue
View file @
a7fdefcf
...
...
@@ -17,6 +17,9 @@ export default {
pagination
:
{
el
:
".swiper-pagination"
,
clickable
:
true
},
autoplay
:{
delay
:
2500
}
}
};
...
...
2code/web/h5_pro/src/views/home/components/HShopList.vue
View file @
a7fdefcf
...
...
@@ -26,7 +26,7 @@ export default {
@r:100rem;
.list-item{
display: flex;
justify-content: space-between;
//
justify-content: space-between;
box-sizing: border-box;
padding: 30/@r;
border-bottom: solid 1px #dedede;
...
...
@@ -42,6 +42,7 @@ export default {
}
.item-infro{
width: 540/@r;
margin-left: 20/@r;
.name{
font-size: 32/@r;
color: #333;
...
...
2code/web/h5_pro/src/views/home/components/HStaff.vue
View file @
a7fdefcf
...
...
@@ -18,11 +18,11 @@ export default {
<
style
lang=
"less"
scoped
>
@r:100rem;
.staff-item{
width: 2
2
0/@r;
height:
28
0/@r;
width: 2
4
0/@r;
height:
30
0/@r;
position: relative;
margin-bottom:
15
/@r;
margin-left:
15
/@r;
margin-bottom:
20
/@r;
margin-left:
20
/@r;
box-shadow: 2px 2px 2px rgba(0,0,0,.2);
&:nth-child(3n+1){
margin-left: 0;
...
...
2code/web/h5_pro/src/views/home/index.vue
View file @
a7fdefcf
...
...
@@ -125,6 +125,7 @@ export default {
.staff-wrapper {
display: flex;
flex-wrap: wrap;
// justify-content: space-between
padding: 0 30 / @r;
}
</
style
>
...
...
2code/web/h5_pro/src/views/shopDetails/index.vue
View file @
a7fdefcf
...
...
@@ -3,7 +3,14 @@
<c-header
title=
"商家详情"
></c-header>
<div
class=
"shop-main-infro"
>
<div
class=
"img"
:style=
"
{'background-image':`url(${shopData.storeHomePic})`}">
</div>
<swiper
:options=
"swiperOption"
>
<swiper-slide
v-for=
"(item,index) in shopImgs"
:key=
"index"
>
<div
class=
"img"
:style=
"
{'background-image':`url(${item})`}">
</div>
</swiper-slide>
<div
class=
"swiper-pagination"
slot=
"pagination"
></div>
</swiper>
<div
class=
"infro-wrapper"
>
<div
class=
"shop-name"
>
{{
shopData
.
storeName
}}
</div>
<div
class=
"infro"
><i
class=
"iconfont icon-shijian"
></i>
{{
shopData
.
storeBusinessTimeStart
}}
-
{{
shopData
.
storeBusinessTimeEnd
}}
<i
class=
"iconfont icon-xiaofei"
></i>
{{
shopData
.
consumeInterval
}}
</div>
...
...
@@ -57,6 +64,16 @@ export default {
components
:{
CHeader
,
SInfroContent
,
NoData
},
data
(){
return
{
swiperOption
:
{
pagination
:
{
el
:
".swiper-pagination"
,
clickable
:
true
,
type
:
'fraction'
},
autoplay
:{
delay
:
2500
}
},
shopData
:{
storeName
:
''
,
province
:
''
,
...
...
@@ -65,7 +82,9 @@ export default {
storePosition
:
''
,
storeDetails
:
''
},
workerData
:[]
workerData
:[],
shopImgs
:[]
}
},
beforeMount
(){
...
...
@@ -77,6 +96,7 @@ export default {
const
param
=
{
storeId
:
id
}
shopDetails
.
storeDetails
(
param
).
then
(
res
=>
{
this
.
shopData
=
res
.
data
this
.
buildShopImg
()
shopDetails
.
searchWorkerResult
(
param
).
then
(
res
=>
{
this
.
workerData
=
res
.
data
})
...
...
@@ -84,6 +104,10 @@ export default {
},
toWorkerDetails
(
id
){
this
.
$router
.
push
({
path
:
`/workerDetails/
${
id
}
`
})
},
buildShopImg
(){
this
.
shopImgs
=
this
.
shopData
.
storePic
?
this
.
shopData
.
storePic
.
split
(
','
):[]
// this.shopImgs.unshift(this.shopData.storeHomePic)
}
}
}
...
...
@@ -107,7 +131,7 @@ export default {
bottom: 0;
padding: 10/@r 30/@r;
background: rgba(0, 0, 0, .5);
z-index: 10000;
.shop-name{
font-size: 36/@r;
color: #fff;
...
...
@@ -145,13 +169,13 @@ export default {
.employee-item{
border-radius: 10/@r;
overflow: hidden;
width: 3
3
0/@r;
height: 4
0
0/@r;
width: 3
7
0/@r;
height: 4
5
0/@r;
background: #f0f0f0;
margin-bottom: 30/@r;
position: relative;
.img{
height:
25
0/@r;
height:
30
0/@r;
background: rgba(222,75,75,.5) ;
background-color: #dedede;
background-size:cover;
...
...
@@ -207,6 +231,22 @@ export default {
}
}
.swiper-pagination-fraction{
font-size: 40/@r;
// font-weight: 700;
width: inherit;
color: #fff;
background: rgba(0, 0,0, .3);
padding: 10/@r 40/@r;
border-radius: 40/@r;
right: 20/@r;
top: 20/@r;
left: inherit;
bottom: inherit;
.swiper-pagination-current{
color: #de4b4b!important;
font-weight: 700!important;
}
}
</
style
>
2code/web/h5_pro/src/views/workerDetails/index.vue
View file @
a7fdefcf
...
...
@@ -2,7 +2,12 @@
<div
class=
"page-wrapper"
>
<c-header
title=
"人员详情"
></c-header>
<div
class=
"worker-details"
id=
"scrollContainer"
>
<div
class=
"img"
:style=
"
{'background-image':`url(${workerData.workerHomePic})`}">
</div>
<swiper
:options=
"swiperOption"
>
<swiper-slide
v-for=
"(item,index) in workerImgs"
:key=
"index"
>
<div
class=
"img"
:style=
"
{'background-image':`url(${item})`}">
</div>
</swiper-slide>
<div
class=
"swiper-pagination"
slot=
"pagination"
></div>
</swiper>
<div
class=
"infro"
>
<div
class=
"name"
>
{{
workerData
.
workerName
}}
<span
class=
"clicks"
><i
class=
"iconfont icon-xinaixin"
></i>
{{
workerData
.
clicks
}}
</span></div>
...
...
@@ -64,11 +69,22 @@ export default {
components
:{
CHeader
},
data
(){
return
{
swiperOption
:
{
pagination
:
{
el
:
".swiper-pagination"
,
clickable
:
true
,
type
:
'fraction'
},
autoplay
:{
delay
:
2500
}
},
workerData
:{
workerName
:
''
,
workerHomePic
:
''
,
workerResume
:
''
}
},
workerImgs
:[]
}
},
mounted
(){
...
...
@@ -85,12 +101,13 @@ export default {
}
workerDetails
.
workerDetails
(
param
).
then
(
res
=>
{
this
.
workerData
=
res
.
data
this
.
buildWorkerImg
()
})
},
handleScroll
(){
buildWorkerImg
(){
this
.
workerImgs
=
this
.
workerData
.
workerPic
?
this
.
workerData
.
workerPic
.
split
(
','
):[]
// this.workerImgs.unshift(this.workerData.workerHomePic)
},
toStoreDetails
(
id
){
...
...
@@ -242,6 +259,22 @@ export default {
}
}
}
.swiper-pagination-fraction{
font-size: 40/@r;
// font-weight: 700;
width: inherit;
color: #fff;
background: rgba(0, 0,0, .3);
padding: 10/@r 40/@r;
border-radius: 40/@r;
right: 40/@r;
left: inherit;
.swiper-pagination-current{
color: #de4b4b!important;
font-weight: 700!important;
}
}
</
style
>
2code/web/h5_pro/src/views/workerList/components/WStaff.vue
View file @
a7fdefcf
...
...
@@ -15,11 +15,11 @@ export default {
<
style
lang=
"less"
scoped
>
@r:100rem;
.staff-item{
width: 2
2
0/@r;
height:
28
0/@r;
width: 2
4
0/@r;
height:
30
0/@r;
position: relative;
margin-bottom:
15
/@r;
margin-left:
15
/@r;
margin-bottom:
20
/@r;
margin-left:
20
/@r;
box-shadow: 2px 2px 2px rgba(0,0,0,.2);
&:nth-child(3n+1){
margin-left: 0;
...
...
2code/web/h5_pro/src/views/workerList/index.vue
View file @
a7fdefcf
...
...
@@ -68,5 +68,7 @@ export default {
.nodata-wrapper{
padding-top: 200/@r;
}
</
style
>
2code/web/mgt_pro/index.html
View file @
a7fdefcf
...
...
@@ -7,7 +7,7 @@
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
>
<!-- 激活chrome frame内核插件 -->
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=Edge,chrome=1"
>
<title>
内部资讯
管理系统
</title>
<title>
娱乐汇
管理系统
</title>
<!-- <link rel="stylesheet" type="text/css" href="http://at.alicdn.com/t/font_674196_89pa9pmfyd0cz0k9.css"> -->
</head>
<body>
...
...
2code/web/mgt_pro/src/views/administrators/administratorstList.vue
View file @
a7fdefcf
...
...
@@ -2,7 +2,8 @@
<div
class=
"model-container"
>
<el-card
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix"
>
<span><i
class=
"iconfont icon-sousuo"
></i>
快捷搜索
</span>
<span>
<i
class=
"iconfont icon-sousuo"
></i>
快捷搜索
</span>
<div
class=
"btns-wrapper-right"
>
<el-button
type=
"primary"
plain
@
click=
"seachFun"
>
确定
</el-button>
<el-button
type=
"warning"
plain
@
click=
"resetFun"
:disabled=
"isActiveReset"
>
重置
</el-button>
...
...
@@ -11,7 +12,9 @@
<el-row
:gutter=
"15"
>
<el-col
:span=
"4"
>
<el-col
class=
"input-name"
:span=
"7"
>
管理员名称
</el-col>
<el-col
:span=
"17"
><el-input
placeholder=
"请输入关键字"
v-model=
"seacherParam.administratorsName"
@
keyup
.
enter
.
native=
"seachFun"
></el-input></el-col>
<el-col
:span=
"17"
>
<el-input
placeholder=
"请输入关键字"
v-model=
"seacherParam.administratorsName"
@
keyup
.
enter
.
native=
"seachFun"
></el-input>
</el-col>
</el-col>
<!--
<el-col
:xl=
"4"
:lg=
"6"
:md=
"6"
:sm=
"8"
id=
"visReason"
>
...
...
@@ -28,7 +31,6 @@
</el-col>
</el-col>
-->
</el-row>
</el-card>
...
...
@@ -42,7 +44,6 @@
<div
class=
"table-wrapper"
>
<el-table
empty-text=
"暂无数据"
:stripe=
"true"
:data=
"dataOption"
v-loading=
"!dataOption"
>
<el-table-column
prop=
"administratorsName"
label=
"姓名"
></el-table-column>
<!--
<el-table-column
label=
"性别"
>
<template
slot-scope=
"scope"
>
...
...
@@ -55,7 +56,7 @@
<!-- <el-table-column prop="qrCode" label="二维码"></el-table-column> -->
<el-table-column
label=
"二维码"
>
<
template
slot-scope=
"scope"
>
<img
:src=
"scope.row.qrCode"
style=
"width:80px;height:80px;"
/>
<img
:src=
"scope.row.qrCode"
style=
"width:80px;height:80px;"
/>
</
template
>
</el-table-column>
...
...
@@ -71,21 +72,15 @@
</el-table-column> -->
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"primary"
circle
class=
"table-icon"
@
click=
"check(scope.row)"
><i
class=
"iconfont icon-chakan"
></i></el-button>
<el-button
type=
"primary"
circle
class=
"table-icon"
@
click=
"check(scope.row)"
>
<i
class=
"iconfont icon-chakan"
></i>
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-edit"
circle
class=
"table-icon"
@
click=
"edit(scope.row)"
></el-button>
</
template
>
</el-table-column>
</el-table>
<!-- 分页处理 -->
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"pageNo"
:page-sizes=
"[10, 20, 30]"
:page-size=
"pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"rowCount"
>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"pageNo"
:page-sizes=
"[10, 20, 30]"
:page-size=
"pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"rowCount"
>
</el-pagination>
</div>
...
...
@@ -95,22 +90,19 @@
<!-- 添加dialog -->
<!-- 查看,编辑dialog -->
<el-dialog
:title=
"dialogTitle"
:visible
.
sync=
"dialogState"
width=
"30%"
:before-close=
"handleClose"
>
<el-dialog
:title=
"dialogTitle"
:visible
.
sync=
"dialogState"
width=
"30%"
:before-close=
"handleClose"
>
<div
class=
"dialog-body-content"
>
<el-row
:gutter=
"15"
>
<el-col
:span=
"8"
class=
"content-left"
><label>
名称
</label></el-col>
<el-col
:span=
"8"
class=
"content-left"
>
<label>
名称
</label>
</el-col>
<el-col
:span=
"16"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入管理员名称"
v-model=
"dialogBindData.administratorsName"
></el-input>
<span
v-else
>
{{dialogBindData.administratorsName}}
</span>
</el-col>
</el-row>
<!-- <el-row :gutter="15" v-if="dialogType===3">
<el-col :span="8" class="content-left"><label>审核状态</label></el-col>
<el-col :span="16" class="content-right">
...
...
@@ -122,18 +114,20 @@
</el-col>
</el-row> -->
<el-row
:gutter=
"15"
>
<el-col
:span=
"8"
class=
"content-left"
><label>
电话
</label></el-col>
<el-col
:span=
"8"
class=
"content-left"
>
<label>
电话
</label>
</el-col>
<el-col
:span=
"16"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入电话号码"
v-model=
"dialogBindData.contactNumber"
></el-input>
<span
v-else
>
{{dialogBindData.contactNumber}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"8"
class=
"content-left"
><label>
微信
</label></el-col>
<el-col
:span=
"8"
class=
"content-left"
>
<label>
微信
</label>
</el-col>
<el-col
:span=
"16"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入微信号"
v-model=
"dialogBindData.wechat"
></el-input>
<span
v-else
>
{{dialogBindData.wechat}}
</span>
...
...
@@ -141,7 +135,9 @@
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"8"
class=
"content-left"
><label>
QQ
</label></el-col>
<el-col
:span=
"8"
class=
"content-left"
>
<label>
QQ
</label>
</el-col>
<el-col
:span=
"16"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入QQ"
v-model=
"dialogBindData.qq"
></el-input>
<span
v-else
>
{{dialogBindData.qq}}
</span>
...
...
@@ -149,28 +145,22 @@
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"8"
class=
"content-left"
><label>
二维码
</label></el-col>
<el-col
:span=
"8"
class=
"content-left"
>
<label>
二维码
</label>
</el-col>
<el-col
:span=
"16"
class=
"content-right"
>
<up-load-img
ref=
"imgComponent"
v-if=
"dialogType===1 || dialogType===2"
width=
"120"
height=
"120"
resPath=
"qrCode"
:type=
"dialogType===2"
:viewUrl=
"this.dialogBindData.qrCode"
@
emitSuccess=
"handleImgLoad"
>
<up-load-img
ref=
"imgComponent"
v-if=
"dialogType===1 || dialogType===2"
width=
"120"
height=
"120"
resPath=
"qrCode"
:type=
"dialogType===2"
:viewUrl=
"this.dialogBindData.qrCode"
@
emitSuccess=
"handleImgLoad"
>
</up-load-img>
<img
@
click=
"magnify(dialogBindData.qrCode)"
v-else
:src=
"dialogBindData.qrCode"
width=
"120"
height=
"120"
>
</el-col>
</el-row>
</div>
<div
class=
"btns-wrapper"
>
<el-button
size=
"small"
@
click=
"handleClose"
:disabled=
"dialogType===3"
><i
class=
"iconfont icon-quxiao"
></i>
取消
</el-button>
<el-button
v-if=
"!submmitSuccess"
type=
"primary"
size=
"small"
@
click=
"submmitFun"
:disabled=
"dialogType===3"
><i
class=
"iconfont icon-tijiao"
></i>
提交
</el-button>
<el-button
size=
"small"
@
click=
"handleClose"
:disabled=
"dialogType===3"
>
<i
class=
"iconfont icon-quxiao"
></i>
取消
</el-button>
<el-button
v-if=
"!submmitSuccess"
type=
"primary"
size=
"small"
@
click=
"submmitFun"
:disabled=
"dialogType===3"
>
<i
class=
"iconfont icon-tijiao"
></i>
提交
</el-button>
<el-button
v-else
:loading=
"true"
type=
"primary"
size=
"small"
:disabled=
"true"
>
提交
</el-button>
</div>
</el-dialog>
...
...
@@ -188,7 +178,7 @@ export default {
return
{
seacherParam
:
{
administratorsName
:
""
,
isAuditing
:
""
isAuditing
:
""
},
//审核状态 选择数据项
...
...
@@ -207,14 +197,13 @@ export default {
dialogState
:
false
,
dialogType
:
1
,
// 1--增加 2--编辑 3--查看
dialogBindData
:
{
administratorsName
:
""
,
contactNumber
:
""
,
wechat
:
""
,
qq
:
""
,
qrCode
:
""
,
isAuditing
:
1
,
qq
:
""
,
qrCode
:
""
,
isAuditing
:
1
,
createTime
:
""
,
repairWorkerIdCard
:
""
},
...
...
@@ -292,9 +281,13 @@ export default {
}
},
submmitFun
()
{
// 发送添加请求
const
isSubmitActive
=
this
.
dialogBindData
.
administratorsName
&&
this
.
dialogBindData
.
contactNumber
&&
this
.
dialogBindData
.
wechat
&&
this
.
dialogBindData
.
qq
&&
this
.
dialogBindData
.
qrCode
;
const
isSubmitActive
=
this
.
dialogBindData
.
administratorsName
&&
this
.
dialogBindData
.
contactNumber
&&
this
.
dialogBindData
.
wechat
&&
this
.
dialogBindData
.
qq
&&
this
.
dialogBindData
.
qrCode
;
if
(
isSubmitActive
)
{
this
.
submmitSuccess
=
true
;
admin
.
addOrEditAdministrators
(
this
.
dialogBindData
).
then
(
res
=>
{
...
...
@@ -372,10 +365,7 @@ export default {
},
handleImgLoad
(
url
)
{
this
.
dialogBindData
.
qrCode
=
url
;
},
}
},
computed
:
{
// 激活重置按钮
...
...
2code/web/mgt_pro/src/views/advert/advertList.vue
View file @
a7fdefcf
...
...
@@ -330,6 +330,13 @@ export default {
isAvailable
:
1
,
linkUrl
:
this
.
dialogBindData
.
linkUrl
};
let
submitParam
=
param
.
advertTitle
&&
param
.
advertPicUrl
&&
param
.
advertContent
if
(
!!
submitParam
){
this
.
submmitSuccess
=
true
;
adver
.
addOrEditAdvert
(
param
).
then
(
res
=>
{
this
.
getList
(()
=>
{
...
...
@@ -341,6 +348,13 @@ export default {
this
.
handleClose
();
});
});
}
else
{
this
.
$message
({
message
:
"请完善信息"
,
type
:
"warning"
});
}
},
//关闭弹框
handleClose
()
{
...
...
2code/web/mgt_pro/src/views/login/index.vue
View file @
a7fdefcf
...
...
@@ -2,7 +2,7 @@
<div
class=
"login-container"
:style=
"
{backgroundImage:'url(' + bgImg + ')' }">
<el-form
class=
"login-form"
autoComplete=
"on"
:model=
"loginForm"
:rules=
"loginRules"
ref=
"loginForm"
label-position=
"left"
>
<div
class=
"title-container"
>
<h3
class=
"title"
>
内部资讯
管理系统
</h3>
<h3
class=
"title"
>
娱乐汇
管理系统
</h3>
</div>
<el-form-item
prop=
"username"
>
<span
class=
"svg-container svg-container_login"
>
...
...
2code/web/mgt_pro/src/views/store/storeList.vue
View file @
a7fdefcf
...
...
@@ -2,7 +2,8 @@
<div
class=
"model-container"
>
<el-card
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix"
>
<span><i
class=
"iconfont icon-sousuo"
></i>
快捷搜索
</span>
<span>
<i
class=
"iconfont icon-sousuo"
></i>
快捷搜索
</span>
<div
class=
"btns-wrapper-right"
>
<el-button
type=
"primary"
plain
@
click=
"seachFun"
>
确定
</el-button>
<el-button
type=
"warning"
plain
@
click=
"resetFun"
:disabled=
"isActiveReset"
>
重置
</el-button>
...
...
@@ -11,34 +12,26 @@
<el-row
:gutter=
"15"
>
<el-col
:span=
"4"
>
<el-col
class=
"input-name"
:span=
"7"
>
店铺名称
</el-col>
<el-col
:span=
"17"
><el-input
placeholder=
"请输入关键字"
v-model=
"seacherParam.storeName"
@
keyup
.
enter
.
native=
"seachFun"
></el-input></el-col>
<el-col
:span=
"17"
>
<el-input
placeholder=
"请输入关键字"
v-model=
"seacherParam.storeName"
@
keyup
.
enter
.
native=
"seachFun"
></el-input>
</el-col>
</el-col>
<el-col
:span=
"4"
>
<el-col
class=
"input-name"
:span=
"7"
>
是否审核
</el-col>
<el-col
class=
"input-name"
:span=
"7"
>
是否审核
</el-col>
<el-col
:span=
"17"
style=
"line-height:40px"
>
<el-select
v-model=
"seacherParam.isAuditing"
placeholder=
"请选择"
>
<el-option
v-for=
"item in isAuditingData"
:key=
"item.code"
:label=
"item.name"
:value=
"item.code"
>
<el-option
v-for=
"item in isAuditingData"
:key=
"item.code"
:label=
"item.name"
:value=
"item.code"
>
</el-option>
</el-select>
</el-col>
</el-col>
<el-col
:span=
"4"
>
<el-col
class=
"input-name"
:span=
"7"
>
是否展示
</el-col>
<el-col
class=
"input-name"
:span=
"7"
>
是否展示
</el-col>
<el-col
:span=
"17"
style=
"line-height:40px"
>
<el-select
v-model=
"seacherParam.isShopping"
placeholder=
"请选择"
>
<el-option
v-for=
"item in isShoppingData"
:key=
"item.code"
:label=
"item.name"
:value=
"item.code"
>
<el-option
v-for=
"item in isShoppingData"
:key=
"item.code"
:label=
"item.name"
:value=
"item.code"
>
</el-option>
</el-select>
</el-col>
...
...
@@ -52,13 +45,13 @@
<!--
<span><i
class=
"iconfont icon-sousuo"
></i>
表格数据
</span>
-->
<div
class=
"btns-wrapper-left"
>
<el-button
type=
"primary"
plain
@
click=
"add"
>
新增
</el-button>
<el-button
type=
"success"
plain
@
click=
"allShowFun"
:disabled=
"!tableItemIDS.length"
>
批量显示
</el-button>
<el-button
type=
"danger"
plain
@
click=
"allSFun"
:disabled=
"!tableItemIDS.length"
>
批量审核
</el-button>
<el-button
v-if=
"isAdmin==1"
type=
"success"
plain
@
click=
"allShowFun"
:disabled=
"!tableItemIDS.length"
>
批量显示
</el-button>
<el-button
v-if=
"isAdmin==1"
type=
"danger"
plain
@
click=
"allSFun"
:disabled=
"!tableItemIDS.length"
>
批量审核
</el-button>
</div>
</div>
<div
class=
"table-wrapper"
>
<el-table
empty-text=
"暂无数据"
:stripe=
"true"
:data=
"dataOption"
v-loading=
"!dataOption"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
v-if=
"isAdmin==1"
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
prop=
"serialNumber"
label=
"推荐序号"
sortable
></el-table-column>
<el-table-column
prop=
"storeName"
label=
"店铺名称"
></el-table-column>
...
...
@@ -71,9 +64,6 @@
<el-table-column
prop=
"county"
label=
"区县"
></el-table-column>
<el-table-column
prop=
"storePosition"
label=
"位置"
></el-table-column>
<el-table-column
label=
"营业时间"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
storeBusinessTimeStart
}}
至
{{
scope
.
row
.
storeBusinessTimeEnd
}}
</span>
...
...
@@ -82,49 +72,38 @@
<el-table-column
prop=
"consumeInterval"
label=
"消费区间"
></el-table-column>
<!-- <el-table-column prop="isShopping" label="消费区间"></el-table-column> -->
<el-table-column
label=
"是否展示"
v-if=
"isAdmin==1"
>
<
template
slot-scope=
"scope"
>
<span>
<el-switch
v-model=
"scope.row.isShopping"
:active-value=
"1"
:inactive-value=
"0"
@
change=
"handleIsVailable(scope.row)"
>
<el-switch
v-model=
"scope.row.isShopping"
:active-value=
"1"
:inactive-value=
"0"
@
change=
"handleIsVailable(scope.row)"
>
</el-switch>
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"到期时间"
>
<
template
slot-scope=
"scope"
>
<span>
{{
fattTime
(
scope
.
row
.
matureTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"primary"
circle
class=
"table-icon"
@
click=
"check(scope.row)"
><i
class=
"iconfont icon-chakan"
></i></el-button>
<el-button
type=
"primary"
circle
class=
"table-icon"
@
click=
"check(scope.row)"
>
<i
class=
"iconfont icon-chakan"
></i>
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-edit"
circle
class=
"table-icon"
@
click=
"edit(scope.row)"
></el-button>
<!-- 推荐 -->
<el-button
v-if=
"scope.row.isAuditing==1 && scope.row.isShopping==1"
type=
"success"
circle
class=
"table-icon"
@
click=
"handleRecommendFun(scope.row)"
><i
class=
"iconfont icon-tijiao"
></i></el-button
>
<el-button
v-if=
"scope.row.isAuditing==1 && scope.row.isShopping==1"
type=
"success"
circle
class=
"table-icon"
@
click=
"handleRecommendFun(scope.row)"
>
<i
class=
"iconfont icon-tijiao"
></i>
</el-button>
<!-- 删除 -->
<el-popover
placement=
"top"
width=
"160"
v-model=
"scope.row.delState"
>
<el-popover
placement=
"top"
width=
"160"
v-model=
"scope.row.delState"
>
<p
style=
"margin-bottom:10px;font-weight:700;"
>
确认删除吗?
</p>
<div
style=
"text-align: right; margin: 0"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"scope.row.delState = false"
>
取消
</el-button>
...
...
@@ -134,11 +113,7 @@
</el-popover>
<!-- 审核 -->
<el-popover
v-if=
"scope.row.isAuditing!=1&&isAdmin==1"
placement=
"top"
width=
"160"
v-model=
"scope.row.delState1"
>
<el-popover
v-if=
"scope.row.isAuditing!=1&&isAdmin==1"
placement=
"top"
width=
"160"
v-model=
"scope.row.delState1"
>
<p
style=
"margin-bottom:10px;font-weight:700;"
>
确认通过审核吗?
</p>
<div
style=
"text-align: right; margin: 0"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"scope.row.delState1 = false"
>
取消
</el-button>
...
...
@@ -147,22 +122,12 @@
<el-button
slot=
"reference"
type=
"warning"
circle
icon=
"el-icon-setting"
class=
"table-icon popver-btn"
></el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
<!-- 分页处理 -->
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"pageNo"
:page-sizes=
"[10, 20, 30]"
:page-size=
"pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"rowCount"
>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"pageNo"
:page-sizes=
"[10, 20, 30]"
:page-size=
"pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"rowCount"
>
</el-pagination>
</div>
...
...
@@ -170,12 +135,7 @@
</el-card>
<!-- 添加dialog -->
<el-dialog
:title=
"dialogTitle"
:visible
.
sync=
"dialogState"
width=
"100%"
:fullscreen=
"true"
:before-close=
"handleClose"
>
<el-dialog
:title=
"dialogTitle"
:visible
.
sync=
"dialogState"
width=
"100%"
:fullscreen=
"true"
:before-close=
"handleClose"
>
<div
class=
"dialog-body-content"
>
<el-row
:gutter=
"12"
>
...
...
@@ -183,35 +143,33 @@
<el-col
:span=
"8"
>
<h1
class=
"food-title"
>
店铺信息
</h1>
<el-row
:gutter=
"15"
>
<el-col
:span=
"3"
class=
"content-left"
><label>
店铺名称
</label></el-col>
<el-col
:span=
"3"
class=
"content-left"
>
<label>
店铺名称
</label>
</el-col>
<el-col
:span=
"21"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入店铺名称"
v-model=
"dialogBindData.storeName"
></el-input>
<span
v-else
>
{{dialogBindData.storeName}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"3"
class=
"content-left"
><label>
店铺简介
</label></el-col>
<el-col
:span=
"3"
class=
"content-left"
>
<label>
店铺简介
</label>
</el-col>
<el-col
:span=
"21"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
type=
"textarea"
:rows=
"2"
placeholder=
"请输入店铺简介"
v-model=
"dialogBindData.brief"
></el-input>
<span
v-else
>
{{dialogBindData.brief}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"3"
class=
"content-left"
><label>
管理员
</label></el-col>
<el-col
:span=
"3"
class=
"content-left"
>
<label>
管理员
</label>
</el-col>
<el-col
:span=
"21"
class=
"content-right"
>
<el-select
v-if=
"dialogType===1 || dialogType===2"
v-model=
"dialogBindData.administratorsId"
placeholder=
"请选择"
>
<el-option
v-for=
"item in managerData"
:key=
"item.administratorsId"
:label=
"item.administratorsName"
:value=
"item.administratorsId"
>
<el-option
v-for=
"item in managerData"
:key=
"item.administratorsId"
:label=
"item.administratorsName"
:value=
"item.administratorsId"
>
</el-option>
</el-select>
<span
v-else
>
{{dialogBindData.administratorsName}}
</span>
...
...
@@ -219,110 +177,98 @@
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"3"
class=
"content-left"
><label>
联系电话
</label></el-col>
<el-col
:span=
"3"
class=
"content-left"
>
<label>
联系电话
</label>
</el-col>
<el-col
:span=
"21"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入联系电话"
v-model=
"dialogBindData.contactNumber"
></el-input>
<span
v-else
>
{{dialogBindData.contactNumber}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"3"
class=
"content-left"
><label>
联系人
</label></el-col>
<el-col
:span=
"3"
class=
"content-left"
>
<label>
联系人
</label>
</el-col>
<el-col
:span=
"21"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入联系人"
v-model=
"dialogBindData.contacts"
></el-input>
<span
v-else
>
{{dialogBindData.contacts}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"3"
class=
"content-left"
><label>
QQ
</label></el-col>
<el-col
:span=
"3"
class=
"content-left"
>
<label>
QQ
</label>
</el-col>
<el-col
:span=
"21"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入QQ"
v-model=
"dialogBindData.qq"
></el-input>
<span
v-else
>
{{dialogBindData.qq}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"3"
class=
"content-left"
><label>
微信
</label></el-col>
<el-col
:span=
"3"
class=
"content-left"
>
<label>
微信
</label>
</el-col>
<el-col
:span=
"21"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入微信"
v-model=
"dialogBindData.wechat"
></el-input>
<span
v-else
>
{{dialogBindData.wechat}}
</span>
</el-col>
</el-row>
<!-- 地址的三级联动 -->
<el-row
:gutter=
"15"
>
<el-col
:span=
"3"
class=
"content-left"
><label>
店铺位置
</label></el-col>
<el-col
:span=
"3"
class=
"content-left"
>
<label>
店铺位置
</label>
</el-col>
<el-col
:span=
"21"
class=
"content-right"
style=
"width:500px"
>
<el-row
:gutter=
"15"
v-if=
"dialogType===1 || dialogType===2"
>
<el-col
:span=
"8"
>
<el-select
v-model=
"dialogBindData.provinceId"
placeholder=
"请选择省、市"
@
change=
"choosePFun"
>
<el-option
v-for=
"item in posPData"
:key=
"item.codeP"
:label=
"item.name"
:value=
"item.codeP"
>
<el-option
v-for=
"item in posPData"
:key=
"item.codeP"
:label=
"item.name"
:value=
"item.codeP"
>
</el-option>
</el-select>
</el-col>
<el-col
:span=
"8"
>
<el-select
v-model=
"dialogBindData.cityId"
placeholder=
"请选择市、区"
@
change=
"chooseCFun"
:disabled=
"!posCData"
>
<el-option
v-for=
"item in posCData"
:key=
"item.codeC"
:label=
"item.name"
:value=
"item.codeC"
>
<el-option
v-for=
"item in posCData"
:key=
"item.codeC"
:label=
"item.name"
:value=
"item.codeC"
>
</el-option>
</el-select>
</el-col>
<el-col
:span=
"8"
>
<el-select
v-model=
"dialogBindData.countyId"
placeholder=
"请选择区、县"
:disabled=
"!posAData"
>
<el-option
v-for=
"item in posAData"
:key=
"item.codeA"
:label=
"item.name"
:value=
"item.codeA"
>
<el-option
v-for=
"item in posAData"
:key=
"item.codeA"
:label=
"item.name"
:value=
"item.codeA"
>
</el-option>
</el-select>
</el-col>
</el-row>
<span
v-else
>
{{dialogBindData.province+'-'+dialogBindData.cityName+'-'+dialogBindData.county}}
</span>
</el-col>
</el-row>
<!-- 位置添加 -->
<el-row
:gutter=
"15"
>
<el-col
:span=
"3"
class=
"content-left"
><label>
街道
</label></el-col>
<el-col
:span=
"3"
class=
"content-left"
>
<label>
街道
</label>
</el-col>
<el-col
:span=
"21"
class=
"content-right"
style=
"width:500px"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入位置"
v-model=
"dialogBindData.storePosition"
></el-input>
<span
v-else
>
{{dialogBindData.storePosition}}
</span>
</el-col>
</el-row>
<!-- 营业时间 -->
<el-row
:gutter=
"15"
>
<el-col
:span=
"3"
class=
"content-left"
><label>
营业时间
</label></el-col>
<el-col
:span=
"3"
class=
"content-left"
>
<label>
营业时间
</label>
</el-col>
<el-col
:span=
"21"
v-if=
"dialogType===1 || dialogType===2"
class=
"content-right"
style=
"width:500px"
>
<div
class=
"start-end-time"
>
<el-input
placeholder=
"请输入开始时间"
style=
"width:200px;"
v-model=
"dialogBindData.storeBusinessTimeStart"
></el-input>
...
...
@@ -333,24 +279,22 @@
<span
v-else
>
{{dialogBindData.storeBusinessTimeStart}}至{{dialogBindData.storeBusinessTimeEnd}}
</span>
</el-row>
<!-- 到期时间 -->
<el-row
:gutter=
"15"
>
<el-col
:span=
"3"
class=
"content-left"
><label>
到期时间
</label></el-col>
<el-col
:span=
"3"
class=
"content-left"
>
<label>
到期时间
</label>
</el-col>
<el-col
:span=
"21"
v-if=
"dialogType===1 || dialogType===2"
class=
"content-right"
style=
"width:500px"
>
<el-date-picker
v-model=
"dialogBindData.matureTime"
type=
"datetime"
placeholder=
"选择到期时间"
>
<el-date-picker
v-model=
"dialogBindData.matureTime"
type=
"datetime"
placeholder=
"选择到期时间"
>
</el-date-picker>
</el-col>
<span
v-else
>
{{dialogBindData.matureTime}}
</span>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"3"
class=
"content-left"
><label>
消费区间
</label></el-col>
<el-col
:span=
"3"
class=
"content-left"
>
<label>
消费区间
</label>
</el-col>
<el-col
:span=
"21"
v-if=
"dialogType===1 || dialogType===2"
class=
"content-right"
style=
"width:500px"
>
<div
class=
"start-end-time"
>
<el-input
placeholder=
"请输入最小金额"
style=
"width:200px;"
v-model=
"minPrice"
></el-input>
...
...
@@ -361,8 +305,6 @@
<span
v-else
>
{{dialogBindData.consumeInterval}}
</span>
</el-row>
<!-- <el-row :gutter="15">
<el-col :span="6" class="content-left"><label>二级链接</label></el-col>
<el-col :span="18" class="content-right">
...
...
@@ -371,55 +313,64 @@
</el-col>
</el-row> -->
<!-- <el-input v-if="dialogType===1 || dialogType===2" size="small" type="textarea" rows="3" placeholder="请输入备注" resize="none" v-model="dialogBindData.memo"></el-input> -->
</el-col>
<el-col
:span=
"6"
>
<h1
class=
"food-title"
>
店铺图片
</h1>
<el-row
:gutter=
"15"
>
<el-col
:span=
"4"
class=
"content-left"
><label>
二维码
</label></el-col>
<el-col
:span=
"4"
class=
"content-left"
>
<label>
二维码
</label>
</el-col>
<el-col
:span=
"20"
class=
"content-right"
>
<up-load-img
ref=
"imgComponent"
v-if=
"dialogType===1 || dialogType===2"
width=
"200"
height=
"200"
resPath=
"advertImg"
:type=
"dialogType"
:viewUrl=
"this.dialogBindData.qrCode"
@
emitSuccess=
"handleImgLoad"
>
<up-load-img
ref=
"imgComponent1"
v-if=
"dialogType===1 || dialogType===2"
width=
"200"
height=
"200"
resPath=
"storeEWM"
:type=
"dialogType"
:viewUrl=
"this.dialogBindData.qrCode"
@
emitSuccess=
"handleImgLoad"
>
</up-load-img>
<img
v-else
:src=
"dialogBindData.qrCode"
width=
"200"
height=
"200"
>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"4"
class=
"content-left"
><label>
店铺主图
</label></el-col>
<el-col
:span=
"4"
class=
"content-left"
>
<label>
店铺主图
</label>
</el-col>
<el-col
:span=
"20"
class=
"content-right"
>
<up-load-img
ref=
"imgComponent"
v-if=
"dialogType===1 || dialogType===2"
width=
"270"
height=
"160"
resPath=
"advertImg"
:type=
"dialogType"
:viewUrl=
"this.dialogBindData.storeHomePic"
@
emitSuccess=
"handleImgLoad1"
>
<up-load-img
ref=
"imgComponent2"
v-if=
"dialogType===1 || dialogType===2"
width=
"270"
height=
"160"
resPath=
"storeMianImg"
:type=
"dialogType"
:viewUrl=
"this.dialogBindData.storeHomePic"
@
emitSuccess=
"handleImgLoad1"
>
</up-load-img>
<img
v-else
:src=
"dialogBindData.storeHomePic"
width=
"270"
height=
"160"
>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"4"
class=
"content-left"
>
<label>
店铺详图
</label>
</el-col>
<el-col
:span=
"20"
>
<up-load-img
ref=
"imgComponent3"
v-if=
"dialogType===1 || dialogType===2"
width=
"134"
height=
"80"
resPath=
"storeDImg"
:type=
"dialogType"
:viewUrl=
"dImg1"
@
emitSuccess=
"handleImgLoad3"
>
</up-load-img>
<img
v-else
:src=
"dImg1"
width=
"134"
height=
"80"
>
<up-load-img
ref=
"imgComponent4"
v-if=
"dialogType===1 || dialogType===2"
width=
"134"
height=
"80"
resPath=
"storeDImg"
:type=
"dialogType"
:viewUrl=
"dImg2"
@
emitSuccess=
"handleImgLoad4"
>
</up-load-img>
<img
v-else
:src=
"dImg2"
width=
"134"
height=
"80"
>
<up-load-img
ref=
"imgComponent5"
v-if=
"dialogType===1 || dialogType===2"
width=
"134"
height=
"80"
resPath=
"storeDImg"
:type=
"dialogType"
:viewUrl=
"dImg3"
@
emitSuccess=
"handleImgLoad5"
>
</up-load-img>
<img
v-else
:src=
"dImg3"
width=
"134"
height=
"80"
>
<up-load-img
ref=
"imgComponent6"
v-if=
"dialogType===1 || dialogType===2"
width=
"134"
height=
"80"
resPath=
"storeDImg"
:type=
"dialogType"
:viewUrl=
"dImg4"
@
emitSuccess=
"handleImgLoad6"
>
</up-load-img>
<img
v-else
:src=
"dImg4"
width=
"134"
height=
"80"
>
<up-load-img
ref=
"imgComponent7"
v-if=
"dialogType===1 || dialogType===2"
width=
"134"
height=
"80"
resPath=
"storeDImg"
:type=
"dialogType"
:viewUrl=
"dImg5"
@
emitSuccess=
"handleImgLoad7"
>
</up-load-img>
<img
v-else
:src=
"dImg5"
width=
"134"
height=
"80"
>
</el-col>
</el-row>
</el-col>
<el-col
:span=
"10"
>
<h1
class=
"food-title"
>
店铺详情
</h1>
...
...
@@ -435,8 +386,10 @@
</div>
<div
class=
"btns-wrapper"
>
<el-button
size=
"small"
@
click=
"handleClose"
:disabled=
"dialogType===3"
><i
class=
"iconfont icon-quxiao"
></i>
取消
</el-button>
<el-button
v-if=
"!submmitSuccess"
type=
"primary"
size=
"small"
@
click=
"submmitFun"
:disabled=
"dialogType===3"
><i
class=
"iconfont icon-tijiao"
></i>
提交
</el-button>
<el-button
size=
"small"
@
click=
"handleClose"
:disabled=
"dialogType===3"
>
<i
class=
"iconfont icon-quxiao"
></i>
取消
</el-button>
<el-button
v-if=
"!submmitSuccess"
type=
"primary"
size=
"small"
@
click=
"submmitFun"
:disabled=
"dialogType===3"
>
<i
class=
"iconfont icon-tijiao"
></i>
提交
</el-button>
<el-button
v-else
:loading=
"true"
type=
"primary"
size=
"small"
:disabled=
"true"
>
提交
</el-button>
</div>
</el-dialog>
...
...
@@ -445,12 +398,11 @@
</template>
<
script
>
import
axios
from
'axios'
;
import
axios
from
"axios"
;
import
UpLoadImg
from
"@/components/UpLoadImg"
;
import
Tinymce
from
"@/components/Tinymce"
;
import
ViewPage
from
"./components/ViewPage"
;
import
*
as
cookie
from
'@/utils/auth'
import
*
as
cookie
from
"@/utils/auth"
;
import
*
as
Utils
from
"../../utils/index.js"
;
import
*
as
store
from
"../../api/store"
;
import
*
as
common
from
"../../api/common"
;
...
...
@@ -462,16 +414,16 @@ export default {
return
{
seacherParam
:
{
storeName
:
""
,
isAuditing
:
''
isAuditing
:
""
},
isAuditingData
:[
{
name
:
'审核通过'
,
code
:
'1'
},
{
name
:
'未审核'
,
code
:
'0'
}
isAuditingData
:
[
{
name
:
"审核通过"
,
code
:
"1"
},
{
name
:
"未审核"
,
code
:
"0"
}
],
isShoppingData
:[
{
name
:
'已展示'
,
code
:
1
},
{
name
:
'未展示'
,
code
:
0
}
isShoppingData
:
[
{
name
:
"已展示"
,
code
:
1
},
{
name
:
"未展示"
,
code
:
0
}
],
// 表格数据
dataOption
:
null
,
...
...
@@ -486,7 +438,7 @@ export default {
dialogBindData
:
{
storeId
:
""
,
storeName
:
""
,
brief
:
''
,
brief
:
""
,
contactNumber
:
""
,
contacts
:
""
,
qq
:
""
,
...
...
@@ -508,8 +460,8 @@ export default {
cityId
:
""
,
countyId
:
""
,
administratorsId
:
''
,
administratorsName
:
''
administratorsId
:
""
,
administratorsName
:
""
},
// 是否提交
submmitSuccess
:
false
,
...
...
@@ -529,26 +481,30 @@ export default {
// 店铺管理员
managerData
:
null
,
// 全选的id
tableItemIDS
:
''
,
tableItemIDS
:
""
,
// 登陆角色
isAdmin
:
'0'
isAdmin
:
"0"
,
dImg1
:
""
,
dImg2
:
""
,
dImg3
:
""
,
dImg4
:
""
,
dImg5
:
""
};
},
beforeMount
()
{
this
.
isAdmin
=
this
.
getCookAdminType
()
this
.
isAdmin
=
this
.
getCookAdminType
()
;
this
.
getList
();
},
mounted
()
{},
methods
:
{
// 登陆角色
getCookAdminType
(){
let
adminType
=
cookie
.
getUserInfro
()
return
JSON
.
parse
(
adminType
).
isAdmin
getCookAdminType
()
{
let
adminType
=
cookie
.
getUserInfro
()
;
return
JSON
.
parse
(
adminType
).
isAdmin
;
},
seachFun
()
{
this
.
$seach
...
...
@@ -577,14 +533,11 @@ export default {
},
add
()
{
this
.
dialogType
=
1
;
axios
.
all
([
this
.
getPList
(),
this
.
getStoreAdministrators
()
]).
then
((
s
,
f
)
=>
{
axios
.
all
([
this
.
getPList
(),
this
.
getStoreAdministrators
()])
.
then
((
s
,
f
)
=>
{
this
.
dialogState
=
true
;
})
});
},
del
(
data
)
{
store
...
...
@@ -608,13 +561,14 @@ export default {
this
.
dialogType
=
2
;
const
Cparam
=
{
codeP
:
data
.
provinceId
};
const
Aparam
=
{
codeC
:
data
.
cityId
};
this
.
getPList
(()
=>
{
this
.
getCList
(
Cparam
,
()
=>
{
this
.
getAList
(
Aparam
,
()
=>
{
this
.
getStoreAdministrators
(()
=>
{
this
.
getStoreAdministrators
(()
=>
{
this
.
reBindData
(
data
);
this
.
dialogState
=
true
;
})
})
;
});
});
});
...
...
@@ -632,9 +586,25 @@ export default {
const
prices
=
data
.
consumeInterval
;
this
.
minPrice
=
prices
.
split
(
"-"
)[
0
];
this
.
maxPrice
=
prices
.
split
(
"-"
)[
1
];
const
dImgArr
=
data
.
storePic
?
data
.
storePic
.
split
(
","
)
:
[];
if
(
dImgArr
[
0
])
{
this
.
dImg1
=
dImgArr
[
0
];
}
if
(
dImgArr
[
1
])
{
this
.
dImg2
=
dImgArr
[
1
];
}
if
(
dImgArr
[
2
])
{
this
.
dImg3
=
dImgArr
[
2
];
}
if
(
dImgArr
[
3
])
{
this
.
dImg4
=
dImgArr
[
3
];
}
if
(
dImgArr
[
4
])
{
this
.
dImg5
=
dImgArr
[
4
];
}
},
submmitFun
()
{
// window.location.href = 'http://localhost:9527/#/worker/workerList'
const
param
=
Utils
.
deepClone
(
this
.
dialogBindData
);
...
...
@@ -656,10 +626,41 @@ export default {
3
);
param
.
matureTime
=
this
.
fattTime
(
this
.
dialogBindData
.
matureTime
);
param
.
administratorsName
=
this
.
buildManagerName
(
this
.
managerData
,
this
.
dialogBindData
.
administratorsId
)
if
(
this
.
dialogType
==
1
){
param
.
serialNumber
=
99
param
.
administratorsName
=
this
.
buildManagerName
(
this
.
managerData
,
this
.
dialogBindData
.
administratorsId
);
if
(
this
.
dialogType
==
1
)
{
param
.
serialNumber
=
99
;
}
param
.
storePic
=
this
.
buildStorePic
();
let
submitParam
=
param
.
administratorsId
&&
param
.
administratorsName
&&
param
.
brief
&&
param
.
cityId
&&
param
.
cityName
&&
param
.
consumeInterval
&&
param
.
contactNumber
&&
param
.
contacts
&&
param
.
county
&&
param
.
countyId
&&
param
.
matureTime
&&
param
.
province
&&
param
.
provinceId
&&
param
.
qq
&&
param
.
qrCode
&&
param
.
storeBusinessTimeEnd
&&
param
.
storeBusinessTimeStart
&&
param
.
storeDetails
&&
param
.
storeHomePic
&&
param
.
storeName
&&
param
.
storePic
.
length
&&
param
.
storePosition
&&
param
.
wechat
;
if
(
!!
submitParam
)
{
this
.
submmitSuccess
=
true
;
store
.
addOrEditStore
(
param
).
then
(
res
=>
{
this
.
getList
(()
=>
{
...
...
@@ -670,9 +671,14 @@ export default {
this
.
submmitSuccess
=
false
;
this
.
handleClose
();
});
});
}
else
{
this
.
$message
({
message
:
"请完善信息"
,
type
:
"warning"
});
}
},
//关闭弹框
handleClose
()
{
...
...
@@ -694,6 +700,26 @@ export default {
// 消费区间
this
.
minPrice
=
""
;
this
.
maxPrice
=
""
;
this
.
dImg1
=
""
;
this
.
dImg2
=
""
;
this
.
dImg3
=
""
;
this
.
dImg4
=
""
;
this
.
dImg5
=
""
;
this
.
$refs
.
imgComponent1
.
clearImg
();
this
.
$refs
.
imgComponent2
.
clearImg
();
this
.
$refs
.
imgComponent3
.
clearImg
();
this
.
$refs
.
imgComponent4
.
clearImg
();
this
.
$refs
.
imgComponent5
.
clearImg
();
this
.
$refs
.
imgComponent6
.
clearImg
();
this
.
$refs
.
imgComponent7
.
clearImg
();
// 销毁富文本编辑器的dom对象
setTimeout
(()
=>
{
this
.
dialogType
=
0
;
},
200
);
},
// 分页处理
handleSizeChange
(
val
)
{
...
...
@@ -722,11 +748,11 @@ export default {
},
// 管理员下拉
getStoreAdministrators
(
cb
){
store
.
getStoreAdministrators
().
then
(
res
=>
{
getStoreAdministrators
(
cb
)
{
store
.
getStoreAdministrators
().
then
(
res
=>
{
this
.
managerData
=
res
.
data
.
data
;
cb
?
cb
()
:
""
;
})
})
;
},
// 格式化时间
...
...
@@ -814,6 +840,23 @@ export default {
this
.
dialogBindData
.
storeHomePic
=
url
;
},
// 详情上传回调方法
handleImgLoad3
(
url
)
{
this
.
dImg1
=
url
;
},
handleImgLoad4
(
url
)
{
this
.
dImg2
=
url
;
},
handleImgLoad5
(
url
)
{
this
.
dImg3
=
url
;
},
handleImgLoad6
(
url
)
{
this
.
dImg4
=
url
;
},
handleImgLoad7
(
url
)
{
this
.
dImg5
=
url
;
},
// 获取省、市
getPList
(
cb
)
{
this
.
posCData
=
null
;
...
...
@@ -873,7 +916,7 @@ export default {
},
// 组装管理员名称
buildManagerName
(
data
,
code
)
{
buildManagerName
(
data
,
code
)
{
for
(
let
idx
in
data
)
{
if
(
data
[
idx
].
administratorsId
==
code
)
{
return
data
[
idx
].
administratorsName
;
...
...
@@ -881,6 +924,25 @@ export default {
}
},
buildStorePic
()
{
let
arr
=
[];
if
(
this
.
dImg1
)
{
arr
.
push
(
this
.
dImg1
);
}
if
(
this
.
dImg2
)
{
arr
.
push
(
this
.
dImg2
);
}
if
(
this
.
dImg3
)
{
arr
.
push
(
this
.
dImg3
);
}
if
(
this
.
dImg4
)
{
arr
.
push
(
this
.
dImg4
);
}
if
(
this
.
dImg5
)
{
arr
.
push
(
this
.
dImg5
);
}
return
arr
.
join
(
","
);
},
handleSelectionChange
(
val
)
{
const
filterId
=
val
=>
{
...
...
@@ -895,31 +957,30 @@ export default {
}
};
this
.
tableItemIDS
=
filterId
(
val
).
join
(
","
);
console
.
log
(
this
.
tableItemIDS
)
console
.
log
(
this
.
tableItemIDS
)
;
},
// 全部审核
allSFun
(){
allSFun
()
{
const
param
=
{
storeIds
:
this
.
tableItemIDS
}
storeIds
:
this
.
tableItemIDS
}
;
store
.
batchStores
(
param
).
then
(
res
=>
{
this
.
getList
()
})
store
.
batchStores
(
param
).
then
(
res
=>
{
this
.
getList
()
;
})
;
},
allShowFun
(){
allShowFun
()
{
const
param
=
{
storeIds
:
this
.
tableItemIDS
}
debugger
store
.
batchStoreShop
(
param
).
then
(
res
=>
{
this
.
getList
()
})
storeIds
:
this
.
tableItemIDS
}
;
debugger
;
store
.
batchStoreShop
(
param
).
then
(
res
=>
{
this
.
getList
()
;
})
;
}
},
computed
:
{
// 激活重置按钮
...
...
2code/web/mgt_pro/src/views/worker/workerList.vue
View file @
a7fdefcf
...
...
@@ -2,7 +2,8 @@
<div
class=
"model-container"
>
<el-card
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix"
>
<span><i
class=
"iconfont icon-sousuo"
></i>
快捷搜索
</span>
<span>
<i
class=
"iconfont icon-sousuo"
></i>
快捷搜索
</span>
<div
class=
"btns-wrapper-right"
>
<el-button
type=
"primary"
plain
@
click=
"seachFun"
>
确定
</el-button>
<el-button
type=
"warning"
plain
@
click=
"resetFun"
:disabled=
"isActiveReset"
>
重置
</el-button>
...
...
@@ -11,48 +12,36 @@
<el-row
:gutter=
"15"
>
<el-col
:span=
"4"
>
<el-col
class=
"input-name"
:span=
"7"
>
员工姓名
</el-col>
<el-col
:span=
"17"
><el-input
placeholder=
"请输入关键字"
v-model=
"seacherParam.workerName"
@
keyup
.
enter
.
native=
"seachFun"
></el-input></el-col>
<el-col
:span=
"17"
>
<el-input
placeholder=
"请输入关键字"
v-model=
"seacherParam.workerName"
@
keyup
.
enter
.
native=
"seachFun"
></el-input>
</el-col>
</el-col>
<el-col
:span=
"4"
>
<el-col
class=
"input-name"
:span=
"7"
>
所属店铺
</el-col>
<el-col
class=
"input-name"
:span=
"7"
>
所属店铺
</el-col>
<el-col
:span=
"17"
style=
"line-height:40px"
>
<el-select
v-model=
"seacherParam.storeId"
placeholder=
"请选择"
>
<el-option
v-for=
"item in ownStoreData"
:key=
"item.storeId"
:label=
"item.storeName"
:value=
"item.storeId"
>
<el-option
v-for=
"item in ownStoreData"
:key=
"item.storeId"
:label=
"item.storeName"
:value=
"item.storeId"
>
</el-option>
</el-select>
</el-col>
</el-col>
<el-col
:span=
"4"
>
<el-col
class=
"input-name"
:span=
"7"
>
是否审核
</el-col>
<el-col
class=
"input-name"
:span=
"7"
>
是否审核
</el-col>
<el-col
:span=
"17"
style=
"line-height:40px"
>
<el-select
v-model=
"seacherParam.isAuditing"
placeholder=
"请选择"
>
<el-option
v-for=
"item in isAuditingData"
:key=
"item.code"
:label=
"item.name"
:value=
"item.code"
>
<el-option
v-for=
"item in isAuditingData"
:key=
"item.code"
:label=
"item.name"
:value=
"item.code"
>
</el-option>
</el-select>
</el-col>
</el-col>
<el-col
:span=
"4"
>
<el-col
class=
"input-name"
:span=
"7"
>
是否展示
</el-col>
<el-col
class=
"input-name"
:span=
"7"
>
是否展示
</el-col>
<el-col
:span=
"17"
style=
"line-height:40px"
>
<el-select
v-model=
"seacherParam.isShopping"
placeholder=
"请选择"
>
<el-option
v-for=
"item in isShoppingData"
:key=
"item.code"
:label=
"item.name"
:value=
"item.code"
>
<el-option
v-for=
"item in isShoppingData"
:key=
"item.code"
:label=
"item.name"
:value=
"item.code"
>
</el-option>
</el-select>
</el-col>
...
...
@@ -64,13 +53,13 @@
<!--
<span><i
class=
"iconfont icon-sousuo"
></i>
表格数据
</span>
-->
<div
class=
"btns-wrapper-left"
>
<el-button
type=
"primary"
plain
@
click=
"add"
>
新增
</el-button>
<el-button
type=
"success"
plain
@
click=
"allShowFun"
:disabled=
"!tableItemIDS.length"
>
批量显示
</el-button>
<el-button
type=
"danger"
plain
@
click=
"allSFun"
:disabled=
"!tableItemIDS.length"
>
批量审核
</el-button>
<el-button
v-if=
"isAdmin==1"
type=
"success"
plain
@
click=
"allShowFun"
:disabled=
"!tableItemIDS.length"
>
批量显示
</el-button>
<el-button
v-if=
"isAdmin==1"
type=
"danger"
plain
@
click=
"allSFun"
:disabled=
"!tableItemIDS.length"
>
批量审核
</el-button>
</div>
</div>
<div
class=
"table-wrapper"
>
<el-table
empty-text=
"暂无数据"
:stripe=
"true"
:data=
"dataOption"
v-loading=
"!dataOption"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
v-if=
"isAdmin==1"
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
prop=
"serialNumber"
label=
"推荐序号"
sortable
></el-table-column>
<el-table-column
prop=
"workerNumber"
label=
"工号"
></el-table-column>
...
...
@@ -95,38 +84,29 @@
</
template
>
</el-table-column>
<el-table-column
label=
"是否展示"
>
<
template
slot-scope=
"scope"
>
<span>
<el-switch
v-model=
"scope.row.isShopping"
:active-value=
"1"
:inactive-value=
"0"
@
change=
"handleIsVailable(scope.row)"
>
<el-switch
v-model=
"scope.row.isShopping"
:active-value=
"1"
:inactive-value=
"0"
@
change=
"handleIsVailable(scope.row)"
>
</el-switch>
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"primary"
circle
class=
"table-icon"
@
click=
"check(scope.row)"
><i
class=
"iconfont icon-chakan"
></i></el-button>
<el-button
type=
"primary"
circle
class=
"table-icon"
@
click=
"check(scope.row)"
>
<i
class=
"iconfont icon-chakan"
></i>
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-edit"
circle
class=
"table-icon"
@
click=
"edit(scope.row)"
></el-button>
<!-- 推荐 -->
<el-button
v-if=
"scope.row.isAuditing==1 && scope.row.isShopping==1"
type=
"success"
circle
class=
"table-icon"
@
click=
"handleRecommendFun(scope.row)"
><i
class=
"iconfont icon-tijiao"
></i></el-button>
<el-button
v-if=
"scope.row.isAuditing==1 && scope.row.isShopping==1"
type=
"success"
circle
class=
"table-icon"
@
click=
"handleRecommendFun(scope.row)"
>
<i
class=
"iconfont icon-tijiao"
></i>
</el-button>
<!-- 删除 -->
<el-popover
placement=
"top"
width=
"160"
v-model=
"scope.row.delState"
>
<el-popover
placement=
"top"
width=
"160"
v-model=
"scope.row.delState"
>
<p
style=
"margin-bottom:10px;font-weight:700;"
>
确认删除吗?
</p>
<div
style=
"text-align: right; margin: 0"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"scope.row.delState = false"
>
取消
</el-button>
...
...
@@ -136,11 +116,7 @@
</el-popover>
<!-- 审核 -->
<el-popover
v-if=
"scope.row.isAuditing!=1&&isAdmin==1"
placement=
"top"
width=
"160"
v-model=
"scope.row.delState1"
>
<el-popover
v-if=
"scope.row.isAuditing!=1&&isAdmin==1"
placement=
"top"
width=
"160"
v-model=
"scope.row.delState1"
>
<p
style=
"margin-bottom:10px;font-weight:700;"
>
确认通过审核吗?
</p>
<div
style=
"text-align: right; margin: 0"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"scope.row.delState1 = false"
>
取消
</el-button>
...
...
@@ -153,15 +129,7 @@
</el-table>
<!-- 分页处理 -->
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"pageNo"
:page-sizes=
"[10, 20, 30]"
:page-size=
"pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"rowCount"
>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"pageNo"
:page-sizes=
"[10, 20, 30]"
:page-size=
"pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"rowCount"
>
</el-pagination>
</div>
...
...
@@ -172,43 +140,38 @@
<!-- 查看,编辑dialog -->
<!-- 查看,编辑dialog -->
<el-dialog
:title=
"dialogTitle"
:visible
.
sync=
"dialogState"
width=
"100%"
:fullscreen=
"true"
:before-close=
"handleClose"
>
<el-dialog
:title=
"dialogTitle"
:visible
.
sync=
"dialogState"
width=
"100%"
:fullscreen=
"true"
:before-close=
"handleClose"
>
<div
class=
"dialog-body-content"
>
<el-row
:gutter=
"12"
>
<el-col
:span=
"8"
>
<h1
class=
"food-title"
>
员工信息
</h1>
<el-row
:gutter=
"15"
>
<el-col
:span=
"6"
class=
"content-left"
><label>
姓名
</label></el-col>
<el-col
:span=
"6"
class=
"content-left"
>
<label>
姓名
</label>
</el-col>
<el-col
:span=
"18"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入员工姓名"
v-model=
"dialogBindData.workerName"
></el-input>
<span
v-else
>
{{dialogBindData.workerName}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"6"
class=
"content-left"
><label>
简介
</label></el-col>
<el-col
:span=
"6"
class=
"content-left"
>
<label>
简介
</label>
</el-col>
<el-col
:span=
"18"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
type=
"textarea"
:rows=
"2"
placeholder=
"请输入员工简介"
v-model=
"dialogBindData.brief"
></el-input>
<span
v-else
>
{{dialogBindData.brief}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"6"
class=
"content-left"
><label>
性别
</label></el-col>
<el-col
:span=
"6"
class=
"content-left"
>
<label>
性别
</label>
</el-col>
<el-col
:span=
"18"
class=
"content-right"
>
<
template
v-if=
"dialogType===1 || dialogType===2"
>
...
...
@@ -219,137 +182,158 @@
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"6"
class=
"content-left"
><label>
年龄
</label></el-col>
<el-col
:span=
"6"
class=
"content-left"
>
<label>
年龄
</label>
</el-col>
<el-col
:span=
"18"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入员工年龄"
v-model=
"dialogBindData.workerAge"
></el-input>
<span
v-else
>
{{dialogBindData.workerAge}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"6"
class=
"content-left"
><label>
生日
</label></el-col>
<el-col
:span=
"6"
class=
"content-left"
>
<label>
生日
</label>
</el-col>
<el-col
:span=
"18"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入员工生日"
v-model=
"dialogBindData.workerBirthday"
></el-input>
<span
v-else
>
{{dialogBindData.workerBirthday}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"6"
class=
"content-left"
><label>
祖籍
</label></el-col>
<el-col
:span=
"6"
class=
"content-left"
>
<label>
祖籍
</label>
</el-col>
<el-col
:span=
"18"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入员工祖籍"
v-model=
"dialogBindData.workerAncestral"
></el-input>
<span
v-else
>
{{dialogBindData.workerAncestral}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"6"
class=
"content-left"
><label>
身高
</label></el-col>
<el-col
:span=
"6"
class=
"content-left"
>
<label>
身高
</label>
</el-col>
<el-col
:span=
"18"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入员工身高"
v-model=
"dialogBindData.workerHeight"
></el-input>
<span
v-else
>
{{dialogBindData.workerHeight}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"6"
class=
"content-left"
><label>
体重
</label></el-col>
<el-col
:span=
"6"
class=
"content-left"
>
<label>
体重
</label>
</el-col>
<el-col
:span=
"18"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入员工体重"
v-model=
"dialogBindData.workerWeight"
></el-input>
<span
v-else
>
{{dialogBindData.workerWeight}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"6"
class=
"content-left"
><label>
胸围
</label></el-col>
<el-col
:span=
"6"
class=
"content-left"
>
<label>
胸围
</label>
</el-col>
<el-col
:span=
"18"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入员工胸围"
v-model=
"dialogBindData.workerBust"
></el-input>
<span
v-else
>
{{dialogBindData.workerBust}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"6"
class=
"content-left"
><label>
腰围
</label></el-col>
<el-col
:span=
"6"
class=
"content-left"
>
<label>
腰围
</label>
</el-col>
<el-col
:span=
"18"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入员工腰围"
v-model=
"dialogBindData.workerWaist"
></el-input>
<span
v-else
>
{{dialogBindData.workerWaist}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"6"
class=
"content-left"
><label>
臀围
</label></el-col>
<el-col
:span=
"6"
class=
"content-left"
>
<label>
臀围
</label>
</el-col>
<el-col
:span=
"18"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入员工臀围"
v-model=
"dialogBindData.workerHipline"
></el-input>
<span
v-else
>
{{dialogBindData.workerHipline}}
</span>
</el-col>
</el-row>
</el-col>
<el-col
:span=
"6"
>
<h1
class=
"food-title"
>
其他信息
</h1>
<el-row
:gutter=
"15"
>
<el-col
:span=
"4"
class=
"content-left"
><label>
员工主图
</label></el-col>
<el-col
:span=
"4"
class=
"content-left"
>
<label>
员工主图
</label>
</el-col>
<el-col
:span=
"20"
class=
"content-right"
>
<up-load-img
ref=
"imgComponent"
v-if=
"dialogType===1 || dialogType===2"
width=
"270"
height=
"160"
resPath=
"workerHomePic"
:type=
"dialogType"
:viewUrl=
"this.dialogBindData.workerHomePic"
@
emitSuccess=
"handleImgLoad"
>
<up-load-img
ref=
"imgComponent"
v-if=
"dialogType===1 || dialogType===2"
width=
"270"
height=
"160"
resPath=
"workerHomePic"
:type=
"dialogType"
:viewUrl=
"this.dialogBindData.workerHomePic"
@
emitSuccess=
"handleImgLoad"
>
</up-load-img>
<img
v-else
:src=
"dialogBindData.workerHomePic"
width=
"270"
height=
"160"
>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"4"
class=
"content-left"
>
<label>
员工详图
</label>
</el-col>
<el-col
:span=
"20"
>
<up-load-img
ref=
"imgComponent1"
v-if=
"dialogType===1 || dialogType===2"
width=
"134"
height=
"80"
resPath=
"workerDPic"
:type=
"dialogType"
:viewUrl=
"dImg1"
@
emitSuccess=
"handleImgLoad1"
>
</up-load-img>
<img
v-else
:src=
"dImg1"
width=
"134"
height=
"80"
>
<up-load-img
ref=
"imgComponent2"
v-if=
"dialogType===1 || dialogType===2"
width=
"134"
height=
"80"
resPath=
"workerDPic"
:type=
"dialogType"
:viewUrl=
"dImg2"
@
emitSuccess=
"handleImgLoad2"
>
</up-load-img>
<img
v-else
:src=
"dImg2"
width=
"134"
height=
"80"
>
<up-load-img
ref=
"imgComponent3"
v-if=
"dialogType===1 || dialogType===2"
width=
"134"
height=
"80"
resPath=
"workerDPic"
:type=
"dialogType"
:viewUrl=
"dImg3"
@
emitSuccess=
"handleImgLoad3"
>
</up-load-img>
<img
v-else
:src=
"dImg3"
width=
"134"
height=
"80"
>
<up-load-img
ref=
"imgComponent4"
v-if=
"dialogType===1 || dialogType===2"
width=
"134"
height=
"80"
resPath=
"workerDPic"
:type=
"dialogType"
:viewUrl=
"dImg4"
@
emitSuccess=
"handleImgLoad4"
>
</up-load-img>
<img
v-else
:src=
"dImg4"
width=
"134"
height=
"80"
>
<up-load-img
ref=
"imgComponent5"
v-if=
"dialogType===1 || dialogType===2"
width=
"134"
height=
"80"
resPath=
"workerDPic"
:type=
"dialogType"
:viewUrl=
"dImg5"
@
emitSuccess=
"handleImgLoad5"
>
</up-load-img>
<img
v-else
:src=
"dImg5"
width=
"134"
height=
"80"
>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"4"
class=
"content-left"
><label>
编号
</label></el-col>
<el-col
:span=
"4"
class=
"content-left"
>
<label>
编号
</label>
</el-col>
<el-col
:span=
"20"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入员工编号"
v-model=
"dialogBindData.workerNumber"
></el-input>
<span
v-else
>
{{dialogBindData.workerNumber}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"4"
class=
"content-left"
><label>
所属店铺
</label></el-col>
<el-col
:span=
"4"
class=
"content-left"
>
<label>
所属店铺
</label>
</el-col>
<el-col
:span=
"20"
class=
"content-right"
>
<el-select
v-if=
"dialogType===1 || dialogType===2"
v-model=
"dialogBindData.storeId"
placeholder=
"请选择"
>
<el-option
v-for=
"item in storeData"
:key=
"item.storeId"
:label=
"item.storeName"
:value=
"item.storeId"
>
<el-option
v-for=
"item in storeData"
:key=
"item.storeId"
:label=
"item.storeName"
:value=
"item.storeId"
>
</el-option>
</el-select>
<span
v-else
>
{{dialogBindData.storeName}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"4"
class=
"content-left"
><label>
到期时间
</label></el-col>
<el-col
:span=
"4"
class=
"content-left"
>
<label>
到期时间
</label>
</el-col>
<el-col
:span=
"20"
class=
"content-right"
>
<el-date-picker
v-if=
"dialogType===1 || dialogType===2"
v-model=
"dialogBindData.matureTime"
type=
"datetime"
placeholder=
"选择到期时间"
>
<el-date-picker
v-if=
"dialogType===1 || dialogType===2"
v-model=
"dialogBindData.matureTime"
type=
"datetime"
placeholder=
"选择到期时间"
>
</el-date-picker>
<span
v-else
>
{{dialogBindData.matureTime}}
</span>
...
...
@@ -358,7 +342,6 @@
</el-col>
<el-col
:span=
"10"
>
<h1
class=
"food-title"
>
员工详情
</h1>
...
...
@@ -373,8 +356,10 @@
</div>
<div
class=
"btns-wrapper"
>
<el-button
size=
"small"
@
click=
"handleClose"
:disabled=
"dialogType===3"
><i
class=
"iconfont icon-quxiao"
></i>
取消
</el-button>
<el-button
v-if=
"!submmitSuccess"
type=
"primary"
size=
"small"
@
click=
"submmitFun"
:disabled=
"dialogType===3"
><i
class=
"iconfont icon-tijiao"
></i>
提交
</el-button>
<el-button
size=
"small"
@
click=
"handleClose"
:disabled=
"dialogType===3"
>
<i
class=
"iconfont icon-quxiao"
></i>
取消
</el-button>
<el-button
v-if=
"!submmitSuccess"
type=
"primary"
size=
"small"
@
click=
"submmitFun"
:disabled=
"dialogType===3"
>
<i
class=
"iconfont icon-tijiao"
></i>
提交
</el-button>
<el-button
v-else
:loading=
"true"
type=
"primary"
size=
"small"
:disabled=
"true"
>
提交
</el-button>
</div>
</el-dialog>
...
...
@@ -385,7 +370,7 @@
import
UpLoadImg
from
"@/components/UpLoadImg"
;
import
Tinymce
from
"@/components/Tinymce"
;
import
ViewPage
from
"./components/ViewPage"
;
import
*
as
cookie
from
'@/utils/auth'
import
*
as
cookie
from
"@/utils/auth"
;
import
*
as
Utils
from
"../../utils/index.js"
;
import
*
as
worker
from
"../../api/worker"
;
import
*
as
common
from
"../../api/common"
;
...
...
@@ -396,21 +381,21 @@ export default {
return
{
seacherParam
:
{
workerName
:
""
,
isAuditing
:
''
,
isShopping
:
''
,
storeId
:
""
isAuditing
:
""
,
isShopping
:
""
,
storeId
:
""
},
isAuditingData
:[
{
code
:
'1'
,
name
:
'已审核'
},
{
code
:
'0'
,
name
:
'未审核'
}
isAuditingData
:
[
{
code
:
"1"
,
name
:
"已审核"
},
{
code
:
"0"
,
name
:
"未审核"
}
],
isShoppingData
:[
{
code
:
1
,
name
:
'已展示'
},
{
code
:
0
,
name
:
'未展示'
}
isShoppingData
:
[
{
code
:
1
,
name
:
"已展示"
},
{
code
:
0
,
name
:
"未展示"
}
],
ownStoreData
:
null
,
ownStoreData
:
null
,
// 表格数据
dataOption
:
null
,
...
...
@@ -426,7 +411,7 @@ export default {
workerId
:
""
,
workerNumber
:
""
,
workerName
:
""
,
brief
:
''
,
brief
:
""
,
workerSex
:
1
,
workerAge
:
""
,
workerBirthday
:
""
,
...
...
@@ -439,7 +424,7 @@ export default {
workerResume
:
""
,
matureTime
:
""
,
workerHomePic
:
''
,
workerHomePic
:
""
,
storeId
:
""
,
storeName
:
""
...
...
@@ -450,28 +435,29 @@ export default {
// 店铺的下拉
storeData
:
null
,
tableItemIDS
:
""
,
tableItemIDS
:
''
,
isAdmin
:
'0'
isAdmin
:
"0"
,
dImg1
:
""
,
dImg2
:
""
,
dImg3
:
""
,
dImg4
:
""
,
dImg5
:
""
};
},
beforeMount
()
{
this
.
isAdmin
=
this
.
getCookAdminType
()
worker
.
getStores
().
then
(
res
=>
{
this
.
ownStoreData
=
res
.
data
.
data
this
.
isAdmin
=
this
.
getCookAdminType
();
worker
.
getStores
().
then
(
res
=>
{
this
.
ownStoreData
=
res
.
data
.
data
;
this
.
getList
();
})
});
},
mounted
()
{},
methods
:
{
getCookAdminType
()
{
let
adminType
=
cookie
.
getUserInfro
()
return
JSON
.
parse
(
adminType
).
isAdmin
getCookAdminType
()
{
let
adminType
=
cookie
.
getUserInfro
()
;
return
JSON
.
parse
(
adminType
).
isAdmin
;
},
seachFun
()
{
this
.
$seach
...
...
@@ -540,6 +526,23 @@ export default {
for
(
const
key
in
this
.
dialogBindData
)
{
this
.
dialogBindData
[
key
]
=
data
[
key
];
}
const
dImgArr
=
data
.
workerPic
?
data
.
workerPic
.
split
(
","
)
:
[];
if
(
dImgArr
[
0
])
{
this
.
dImg1
=
dImgArr
[
0
];
}
if
(
dImgArr
[
1
])
{
this
.
dImg2
=
dImgArr
[
1
];
}
if
(
dImgArr
[
2
])
{
this
.
dImg3
=
dImgArr
[
2
];
}
if
(
dImgArr
[
3
])
{
this
.
dImg4
=
dImgArr
[
3
];
}
if
(
dImgArr
[
4
])
{
this
.
dImg5
=
dImgArr
[
4
];
}
},
submmitFun
()
{
const
param
=
Utils
.
deepClone
(
this
.
dialogBindData
);
...
...
@@ -549,10 +552,34 @@ export default {
);
param
.
matureTime
=
this
.
fattTime
(
this
.
dialogBindData
.
matureTime
);
if
(
this
.
dialogType
==
1
)
{
param
.
serialNumber
=
99
if
(
this
.
dialogType
==
1
)
{
param
.
serialNumber
=
99
;
}
param
.
workerPic
=
this
.
buildWorkerPic
();
let
submitParam
=
param
.
brief
&&
param
.
matureTime
&&
param
.
storeId
&&
param
.
storeName
&&
param
.
workerAge
&&
param
.
workerAncestral
&&
param
.
workerBirthday
&&
param
.
workerBust
&&
param
.
workerHeight
&&
param
.
workerHipline
&&
param
.
workerHomePic
&&
param
.
workerName
&&
param
.
workerNumber
&&
param
.
workerPic
.
length
&&
param
.
workerResume
&&
(
param
.
workerSex
==
1
||
param
.
workerSex
==
0
)
&&
param
.
workerWaist
&&
param
.
workerWeight
;
if
(
!!
submitParam
)
{
this
.
submmitSuccess
=
true
;
worker
.
addOrEditWorker
(
param
).
then
(
res
=>
{
this
.
getList
(()
=>
{
...
...
@@ -564,6 +591,32 @@ export default {
this
.
handleClose
();
});
});
}
else
{
this
.
$message
({
message
:
"请完善信息"
,
type
:
"warning"
});
}
},
buildWorkerPic
()
{
let
arr
=
[];
if
(
this
.
dImg1
)
{
arr
.
push
(
this
.
dImg1
);
}
if
(
this
.
dImg2
)
{
arr
.
push
(
this
.
dImg2
);
}
if
(
this
.
dImg3
)
{
arr
.
push
(
this
.
dImg3
);
}
if
(
this
.
dImg4
)
{
arr
.
push
(
this
.
dImg4
);
}
if
(
this
.
dImg5
)
{
arr
.
push
(
this
.
dImg5
);
}
return
arr
.
join
(
","
);
},
//关闭弹框
handleClose
()
{
...
...
@@ -575,6 +628,24 @@ export default {
this
.
dialogBindData
[
key
]
=
""
;
}
}
this
.
dImg1
=
""
;
this
.
dImg2
=
""
;
this
.
dImg3
=
""
;
this
.
dImg4
=
""
;
this
.
dImg5
=
""
;
this
.
$refs
.
imgComponent
.
clearImg
();
this
.
$refs
.
imgComponent1
.
clearImg
();
this
.
$refs
.
imgComponent2
.
clearImg
();
this
.
$refs
.
imgComponent3
.
clearImg
();
this
.
$refs
.
imgComponent4
.
clearImg
();
this
.
$refs
.
imgComponent5
.
clearImg
();
// 销毁富文本编辑器的dom对象
setTimeout
(()
=>
{
this
.
dialogType
=
0
;
},
500
);
},
// 分页处理
handleSizeChange
(
val
)
{
...
...
@@ -690,6 +761,26 @@ export default {
this
.
dialogBindData
.
workerHomePic
=
url
;
},
handleImgLoad1
(
url
)
{
this
.
dImg1
=
url
;
},
handleImgLoad2
(
url
)
{
this
.
dImg2
=
url
;
},
handleImgLoad3
(
url
)
{
this
.
dImg3
=
url
;
},
handleImgLoad4
(
url
)
{
this
.
dImg4
=
url
;
},
handleImgLoad5
(
url
)
{
this
.
dImg5
=
url
;
},
// 组装店铺的名称
buildStoreName
(
data
,
code
)
{
for
(
let
idx
in
data
)
{
...
...
@@ -712,28 +803,28 @@ export default {
}
};
this
.
tableItemIDS
=
filterId
(
val
).
join
(
","
);
console
.
log
(
this
.
tableItemIDS
)
console
.
log
(
this
.
tableItemIDS
)
;
},
// 全部审核
allSFun
(){
allSFun
()
{
const
param
=
{
workerIds
:
this
.
tableItemIDS
}
workerIds
:
this
.
tableItemIDS
}
;
worker
.
batchWorkers
(
param
).
then
(
res
=>
{
this
.
getList
()
})
worker
.
batchWorkers
(
param
).
then
(
res
=>
{
this
.
getList
()
;
})
;
},
allShowFun
(){
allShowFun
()
{
const
param
=
{
workerIds
:
this
.
tableItemIDS
}
worker
.
batchWorkerShop
(
param
).
then
(
res
=>
{
this
.
getList
()
})
workerIds
:
this
.
tableItemIDS
}
;
worker
.
batchWorkerShop
(
param
).
then
(
res
=>
{
this
.
getList
()
;
})
;
}
},
computed
:
{
...
...
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