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
dbd1c02b
Commit
dbd1c02b
authored
Nov 13, 2018
by
燕南天
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善飞飞后台项目
parent
f7380696
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1211 additions
and
318 deletions
+1211
-318
host.cfg.js
2code/web/mgt_pro/config/host.cfg.js
+2
-6
index.js
2code/web/mgt_pro/config/index.js
+1
-1
common.js
2code/web/mgt_pro/src/api/common.js
+19
-11
store.js
2code/web/mgt_pro/src/api/store.js
+6
-4
worker.js
2code/web/mgt_pro/src/api/worker.js
+9
-1
viewImg.css
2code/web/mgt_pro/src/directive/viewImg/viewImg.css
+26
-0
viewImg.js
2code/web/mgt_pro/src/directive/viewImg/viewImg.js
+94
-1
advertList.vue
2code/web/mgt_pro/src/views/advert/advertList.vue
+0
-61
ViewPage.vue
2code/web/mgt_pro/src/views/store/components/ViewPage.vue
+77
-0
storeList.vue
2code/web/mgt_pro/src/views/store/storeList.vue
+554
-124
dataDictItem.vue
2code/web/mgt_pro/src/views/system/dataDictItem.vue
+1
-3
param.vue
2code/web/mgt_pro/src/views/system/param.vue
+1
-5
ViewPage.vue
2code/web/mgt_pro/src/views/worker/components/ViewPage.vue
+77
-0
workerList.vue
2code/web/mgt_pro/src/views/worker/workerList.vue
+344
-101
No files found.
2code/web/mgt_pro/config/host.cfg.js
View file @
dbd1c02b
...
...
@@ -4,12 +4,8 @@
* @param prod==>正式上线环境
* */
module
.
exports
=
{
// sit: "http://192.168.1.102:8080/logistics-mgt",//超哥本地
// sit: "http://192.168.200.173:8080",//杨飞本地
// sit:"http://flynet.imwork.net:35609/logistics-mgt",
// sit:"https://chalk.fqyxa.com", //上线环境
// sit:"http://192.168.1.103:8781",//毅豪本地
sit
:
"http://192.168.1.112:8080/store-system"
,
sit
:
"http://192.168.1.104:8080/store-system"
,
//毅豪本地
// sit:"http://192.168.1.112:8080/store-system",
// -----------------------------------------------------------------
prod
:
"http:正式环境"
}
2code/web/mgt_pro/config/index.js
View file @
dbd1c02b
...
...
@@ -14,7 +14,7 @@ module.exports = {
// Various Dev Server settings
// host: 'localhost', // can be overwritten by process.env.HOST
host
:
'192.168.1.1
12
'
,
// can be overwritten by process.env.HOST
host
:
'192.168.1.1
07
'
,
// can be overwritten by process.env.HOST
port
:
9527
,
// can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser
:
true
,
errorOverlay
:
true
,
...
...
2code/web/mgt_pro/src/api/common.js
View file @
dbd1c02b
import
request
from
'./request'
import
qs
from
'qs'
// 获取单位组织架构数据
export
function
getDepsInfo
()
{
// 地址三级联动
export
function
getProviceList
()
{
return
request
({
url
:
'/common/getDepsInfo
'
,
method
:
'post'
url
:
'/pca/getProviceList
'
,
method
:
'post'
,
})
}
// 获取访问事由列表
export
function
get
VisitReasons
(
)
{
export
function
get
CityList
(
data
)
{
return
request
({
url
:
'/common/getVisitReasons'
,
method
:
'post'
url
:
'/pca/getCityList'
,
method
:
'post'
,
data
:
qs
.
stringify
(
data
)
})
}
// 根据科室id查询,人员信息
export
function
getMemberListBySection
(
data
)
{
export
function
getAreaList
(
data
)
{
return
request
({
url
:
'/
member/getMemberListBySection
'
,
url
:
'/
pca/getAreaList
'
,
method
:
'post'
,
data
:
qs
.
stringify
(
data
)
})
}
2code/web/mgt_pro/src/api/store.js
View file @
dbd1c02b
...
...
@@ -9,8 +9,6 @@ export function storeList(data) {
})
}
export
function
addOrEditStore
(
data
)
{
return
request
({
url
:
'/store/addOrEditStore'
,
...
...
@@ -29,7 +27,11 @@ export function delStore(data) {
})
}
export
function
getStoreAdministrators
()
{
return
request
({
url
:
'/administrators/getStoreAdministrators'
,
method
:
'post'
})
}
2code/web/mgt_pro/src/api/worker.js
View file @
dbd1c02b
...
...
@@ -10,7 +10,6 @@ export function workerList(data) {
}
export
function
addOrEditWorker
(
data
)
{
return
request
({
url
:
'/worker/addOrEditWorker'
,
...
...
@@ -33,3 +32,12 @@ export function delWorker(data) {
export
function
getStores
()
{
return
request
({
url
:
'/store/getStores'
,
method
:
'post'
})
}
2code/web/mgt_pro/src/directive/viewImg/viewImg.css
0 → 100644
View file @
dbd1c02b
.dir-view-bg
{
width
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
.7
);
position
:
fixed
;
top
:
0
;
left
:
0
;
z-index
:
10001
;
}
.dir-view-img
{
position
:
fixed
;
transition
:
all
.3s
;
z-index
:
10002
;
cursor
:
pointer
;
}
.dir-img-style
{
height
:
60px
;
width
:
60px
;
background-size
:
60px
60px
;
background-image
:
url("../../../static/images/xuanzhuan.png")
;
position
:
absolute
;
right
:
200px
;
top
:
120px
;
}
2code/web/mgt_pro/src/directive/viewImg/viewImg.js
View file @
dbd1c02b
export
default
{
import
"./viewImg.css"
export
default
{
bind
(
el
,
binding
)
{
// 第一步先改变hover样式
el
.
style
.
cursor
=
"pointer"
;
el
.
addEventListener
(
'click'
,
e
=>
{
// copy,移动图片
copyAndMoveImg
(
e
)
// 关闭遮罩,还原图片
},
false
)
}
}
function
copyAndMoveImg
(
e
)
{
// 创建遮罩
let
current
=
0
let
content
=
`<img :src=require("../../../../static/images/xuanzhuan.png") style='height:30px;width=30px;margin-right:200px;margin-bottom:120px;'>`
let
viewImgBg
=
document
.
createElement
(
'div'
);
let
div1
=
document
.
createElement
(
'div'
);
viewImgBg
.
className
=
"dir-view-bg"
;
viewImgBg
.
appendChild
(
div1
)
div1
.
innerHTML
=
content
document
.
body
.
appendChild
(
viewImgBg
);
const
ele
=
e
.
target
const
elePositionParam
=
ele
.
getBoundingClientRect
();
const
imgSrc
=
ele
.
getAttribute
(
"src"
);
const
newParam
=
caculNewParam
(
elePositionParam
);
let
newImg
=
document
.
createElement
(
"img"
);
newImg
.
className
=
"dir-view-img"
;
renderImg
(
newImg
,
elePositionParam
);
newImg
.
setAttribute
(
"src"
,
imgSrc
);
document
.
body
.
appendChild
(
newImg
);
div1
.
className
=
"dir-img-style"
div1
.
onclick
=
function
(
e
)
{
current
=
current
+
90
;
newImg
.
style
.
transform
=
'rotate('
+
current
+
'deg)'
e
.
stopPropagation
()
}
setTimeout
(()
=>
{
renderImg
(
newImg
,
newParam
,
el
=>
{
el
.
addEventListener
(
'click'
,
e
=>
{
const
cfg
=
{
newImg
:
newImg
,
elePositionParam
:
elePositionParam
}
removeDom
(
cfg
)
},
false
)
})
},
100
)
viewImgBg
.
addEventListener
(
'click'
,
e
=>
{
const
cfg
=
{
newImg
:
newImg
,
elePositionParam
:
elePositionParam
}
removeDom
(
cfg
)
},
false
)
}
function
renderImg
(
ele
,
imgParam
,
cb
)
{
ele
.
style
.
width
=
`
${
imgParam
.
width
}
px`
;
ele
.
style
.
height
=
`
${
imgParam
.
height
}
px`
;
ele
.
style
.
top
=
`
${
imgParam
.
top
}
px`
;
ele
.
style
.
left
=
`
${
imgParam
.
left
}
px`
;
cb
?
cb
(
ele
)
:
''
}
// 计算图片的新参数
function
caculNewParam
(
param
)
{
const
_WIN_HEIGHT
=
document
.
body
.
clientHeight
;
const
_WIN_WIDTH
=
document
.
body
.
clientWidth
;
return
{
left
:
(
_WIN_WIDTH
-
param
.
width
*
3
)
/
2
,
top
:
(
_WIN_HEIGHT
-
param
.
height
*
3
)
/
2
,
width
:
param
.
width
*
3
,
height
:
param
.
height
*
3
,
}
}
// 还原,销毁dom
function
removeDom
(
cfg
)
{
renderImg
(
cfg
.
newImg
,
cfg
.
elePositionParam
,
el
=>
{
setTimeout
(()
=>
{
const
willRemoveImg
=
document
.
getElementsByClassName
(
"dir-view-img"
)[
0
]
const
willRemoveBg
=
document
.
getElementsByClassName
(
"dir-view-bg"
)[
0
]
document
.
body
.
removeChild
(
willRemoveBg
)
document
.
body
.
removeChild
(
willRemoveImg
)
},
300
)
})
}
2code/web/mgt_pro/src/views/advert/advertList.vue
View file @
dbd1c02b
...
...
@@ -177,25 +177,6 @@
<
el
-
col
:
span
=
"dialogType==3?12:8"
>
<
h1
class
=
"food-title"
>
活动信息
<
/h1
>
<!--
<
el
-
row
:
gutter
=
"15"
>
<
el
-
col
:
span
=
"6"
class
=
"content-left"
><
label
>
类型
<
/label></
el
-
col
>
<
el
-
col
:
span
=
"18"
class
=
"content-right"
style
=
"width:330px"
>
<
el
-
radio
-
group
v
-
if
=
"dialogType===1 || dialogType===2"
v
-
model
=
"dialogBindData.advertType"
>
<
el
-
radio
size
=
"small"
:
label
=
"1"
>
活动广告
<
/el-radio
>
<
el
-
radio
size
=
"small"
:
label
=
"2"
>
系统公告
<
/el-radio
>
<
el
-
radio
size
=
"small"
:
label
=
"3"
>
新闻资讯
<
/el-radio
>
<
/el-radio-group
>
<
span
v
-
else
>
{{
viewAdverType
(
dialogBindData
.
advertType
)
}}
<
/span
>
<
/el-col
>
<
/el-row> --
>
<!--
<
el
-
row
:
gutter
=
"15"
>
<
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
=
"请输入活动名称"
resize
=
"none"
v
-
model
=
"dialogBindData.advertName"
><
/el-input
>
<
span
v
-
else
>
{{
dialogBindData
.
advertName
}}
<
/span
>
<
/el-col
>
<
/el-row> --
>
<
el
-
row
:
gutter
=
"15"
>
<
el
-
col
:
span
=
"6"
class
=
"content-left"
><
label
>
标题
<
/label></
el
-
col
>
...
...
@@ -205,39 +186,7 @@
<
/el-col
>
<
/el-row
>
<!--
<
el
-
row
:
gutter
=
"15"
>
<
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
=
"3"
placeholder
=
"请输入活动副标题"
resize
=
"none"
v
-
model
=
"dialogBindData.advertSubtitle"
><
/el-input
>
<
span
v
-
else
>
{{
dialogBindData
.
advertSubtitle
}}
<
/span
>
<
/el-col
>
<
/el-row> --
>
<!--
<
el
-
row
:
gutter
=
"15"
>
<
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.linkUrl"
><
/el-input
>
<
span
v
-
else
>
{{
dialogBindData
.
linkUrl
}}
<
/span
>
<
/el-col
>
<
/el-row> --
>
<!--
<
el
-
row
:
gutter
=
"15"
v
-
if
=
"dialogBindData.advertType!==2"
>
<
el
-
col
:
span
=
"6"
class
=
"content-left"
><
label
>
图片
<
/label></
el
-
col
>
<
el
-
col
:
span
=
"18"
class
=
"content-right"
>
<
tailor
width
=
"246"
height
=
"144"
imageType
=
'banner'
resPath
=
"advertImg"
:
type
=
"dialogType"
@
emitSuccess
=
"handleImgLoad"
:
viewUrl
=
"this.dialogBindData.advertPicUrl"
v
-
if
=
"dialogType===1 || dialogType===2"
>
<
/tailor
>
<
img
v
-
else
:
src
=
"this.dialogBindData.advertPicUrl"
width
=
"216"
height
=
"144"
>
<
/el-col
>
<
/el-row> --
>
<
el
-
row
:
gutter
=
"15"
>
<
el
-
col
:
span
=
"6"
class
=
"content-left"
><
label
>
图片
<
/label></
el
-
col
>
...
...
@@ -257,16 +206,6 @@
<
/el-row
>
<!--
<
el
-
row
:
gutter
=
"15"
>
<
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
=
"text"
placeholder
=
"请输入二级链接"
resize
=
"none"
v
-
model
=
"dialogBindData.linkUrl"
><
/el-input
>
<
span
v
-
else
>
{{
dialogBindData
.
linkUrl
}}
<
/span
>
<
/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
>
...
...
2code/web/mgt_pro/src/views/store/components/ViewPage.vue
0 → 100644
View file @
dbd1c02b
<
template
>
<div
class=
"view-page"
>
<div
class=
"phone-bg"
>
<img
:src=
"require('../../../../static/images/phone-bg.png')"
alt=
""
>
</div>
<div
class=
"page-infro"
>
<!--
<el-carousel
height=
"202px"
indicator-position=
"none"
>
<el-carousel-item
v-for=
"(item,index) in imageArr"
:key=
"index"
>
<div
class=
"bannerImg"
><img
:src=
"item"
alt=
""
></div>
</el-carousel-item>
</el-carousel>
-->
<!--
<div
class=
"bannerImg"
>
<img
:src=
"data.advertPicUrl"
alt=
""
height=
"202"
>
</div>
-->
<div
class=
"text-infro"
v-html=
"data.storeDetails"
></div>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:[
"data"
],
data
(){
return
{
imageArr
:[]
}
},
beforeMount
(){
const
data
=
this
.
data
;
// let arr = [];
// for(const key in data){
// if(key.indexOf('dishesPicUrl')>-1 && data[key]){
// arr.push(data[key])
// }
// }
// this.imageArr = arr
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.view-page
{
position
:
relative
;
.phone-bg
{
width
:
360px
;
img
{
width
:
100%
;
}
}
.page-infro
{
background
:
#fff
;
position
:
absolute
;
top
:
110px
;
left
:
30px
;
width
:
304px
;
height
:
540px
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
.bannerImg
{
width
:
100%
;
height
:
202px
;
img
{
width
:
100%
;
height
:
100%
;
}
}
.text-infro
{
padding
:
0
15px
;
}
}
}
</
style
>
\ No newline at end of file
2code/web/mgt_pro/src/views/store/storeList.vue
View file @
dbd1c02b
...
...
@@ -11,13 +11,7 @@
<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>
</el-row>
<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.storeName"
@
keyup
.
enter
.
native=
"seachFun"
></el-input></el-col>
</el-col>
</el-row>
</el-card>
...
...
@@ -35,44 +29,62 @@
<el-table-column
prop=
"storeName"
label=
"店铺名称"
></el-table-column>
<el-table-column
prop=
"contactNumber"
label=
"联系电话"
></el-table-column>
<el-table-column
prop=
"contacts"
label=
"联系人"
></el-table-column>
<el-table-column
prop=
"qq"
label=
"qq"
></el-table-column>
<el-table-column
prop=
"wechat"
label=
"wechat"
></el-table-column>
<el-table-column
prop=
"storePosition"
label=
"详细地址"
></el-table-column>
<el-table-column
prop=
"storeBusinessTimeStart"
label=
"营业时间起"
></el-table-column>
<el-table-column
prop=
"storeBusinessTimeEnd"
label=
"营业时间止"
></el-table-column>
<el-table-column
label=
"是否推荐"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
isRecommend
===
1
?
'是'
:
'否'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"clicks"
label=
"点击量"
></el-table-column>
<el-table-column
prop=
"administratorsName"
label=
"店铺管理员名称"
></el-table-column>
<el-table-column
label=
"创建时间"
>
<el-table-column
prop=
"qq"
label=
"QQ"
></el-table-column>
<el-table-column
prop=
"wechat"
label=
"微信"
></el-table-column>
<el-table-column
prop=
"province"
label=
"省份"
></el-table-column>
<el-table-column
prop=
"cityName"
label=
"市区"
></el-table-column>
<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>
{{
fattTime
(
scope
.
row
.
createTime
)
}}
</span>
<span>
{{
scope
.
row
.
storeBusinessTimeStart
}}
至
{{
scope
.
row
.
storeBusinessTimeEnd
}}
</span>
</
template
>
</el-table-column>
<
!-- <el-table-column prop="memo" label="备注"></el-table-column> --
>
<
el-table-column
prop=
"consumeInterval"
label=
"消费区间"
></el-table-column
>
<!-- <el-table-column label="启用状态">
<!-- <el-table-column prop="isShopping" label="消费区间"></el-table-column> -->
<el-table-column
label=
"是否展示"
>
<
template
slot-scope=
"scope"
>
<span>
<el-switch
v-model="scope.row.is
Vailable
"
v-model=
"scope.row.is
Shopping
"
:active-value=
"1"
:inactive-value=
"0"
@
change=
"handleIsVailable(scope.row)"
>
</el-switch>
</span>
</
template
>
</el-table-column>
-->
</el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"到期时间"
>
<
template
slot-scope=
"scope"
>
<span>
{{
fattTime
(
scope
.
row
.
matureTime
)
}}
</span>
</
template
>
</el-table-column>
<!-- <el-table-column prop="memo" label="备注"></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"
icon=
"el-icon-edit"
circle
class=
"table-icon"
@
click=
"edit(scope.row)"
></el-button>
<!--
<el-popover
<!-- 推荐 -->
<el-button
v-if=
"scope.row.isAuditing==1 && scope.row.isShopping==1"
type=
"primary"
icon=
"el-icon-edit"
circle
class=
"table-icon"
@
click=
"handleRecommendFun(scope.row)"
></el-button>
<!-- 删除 -->
<el-popover
placement=
"top"
width=
"160"
v-model=
"scope.row.delState"
>
...
...
@@ -82,7 +94,23 @@
<el-button
type=
"primary"
size=
"mini"
@
click=
"del(scope.row)"
>
确定
</el-button>
</div>
<el-button
slot=
"reference"
type=
"warning"
circle
icon=
"el-icon-delete"
class=
"table-icon popver-btn"
></el-button>
</el-popover>
-->
</el-popover>
<!-- 审核 -->
<el-popover
v-if=
"scope.row.isAuditing!=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>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleAuditFun(scope.row)"
>
通过
</el-button>
</div>
<el-button
slot=
"reference"
type=
"warning"
circle
icon=
"el-icon-delete"
class=
"table-icon popver-btn"
></el-button>
</el-popover>
</
template
>
</el-table-column>
...
...
@@ -105,83 +133,259 @@
</el-card>
<!-- 添加dialog -->
<!-- 查看,编辑dialog -->
<el-dialog
:title=
"dialogTitle"
:visible
.
sync=
"dialogState"
width=
"30%"
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=
"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.storeName"
></el-input>
<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=
"8"
class=
"content-left"
><label>
联系电话
</label></el-col>
<el-col
:span=
"16"
class=
"content-right"
>
<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>
</el-select>
<span
v-else
>
{{dialogBindData.administratorsName}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<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=
"8
"
class=
"content-left"
><label>
联系人
</label></el-col>
<el-col
:span=
"16
"
class=
"content-right"
>
<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=
"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>
<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=
"8"
class=
"content-left"
><label>
wechat
</label></el-col>
<el-col
:span=
"16
"
class=
"content-right"
>
<el-input
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
placeholder=
"请输入wechat
"
v-model=
"dialogBindData.wechat"
></el-input>
<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=
"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.storePosition"
></el-input>
<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>
</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>
</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>
</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=
"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=
"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>
<span>
至
</span>
<el-input
placeholder=
"请输入结束时间"
style=
"width:200px;"
v-model=
"dialogBindData.storeBusinessTimeEnd"
></el-input>
</div>
</el-col>
<span
v-else
>
{{dialogBindData.storeBusinessTimeStart}}至{{dialogBindData.storeBusinessTimeEnd}}
</span>
</el-row>
<!-- 到期时间 -->
<el-row
:gutter=
"15"
>
<el-col
:span=
"8"
class=
"content-left"
><label>
是否推荐
</label></el-col>
<el-col
:span=
"16"
class=
"content-right
"
>
<el-radio-group
v-if=
"dialogType===1 || dialogType===2"
v-model=
"dialogBindData.sex"
>
<el-radio
size=
"small"
:label=
"1"
>
是
</el-radio>
<el-radio
size=
"small"
:label=
"0"
>
否
</el-radio>
</el-radio-group
>
<span
v-else
>
{{dialogBindData.isRecommend===1?"是":"否"}}
</span
>
<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
>
</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=
"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>
<span>
至
</span>
<el-input
placeholder=
"请输入最大金额"
style=
"width:200px;"
v-model=
"maxPrice"
></el-input>
</div>
</el-col>
<span
v-else
>
{{dialogBindData.consumeInterval}}
</span>
</el-row>
<!-- <el-row :gutter="15">
<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" type="textarea" rows="3" placeholder="请输入备注" resize="none" v-model="dialogBindData.memo
"></el-input>
<span v-else>{{dialogBindData.memo || "暂无备注"
}}</span>
<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="text" placeholder="请输入二级链接" resize="none" v-model="dialogBindData.linkUrl
"></el-input>
<span v-else>{{dialogBindData.linkUrl
}}</span>
</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=
"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>
<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=
"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>
<img
v-else
:src=
"dialogBindData.storeHomePic"
width=
"270"
height=
"160"
>
</el-col>
</el-row>
</el-col>
<el-col
:span=
"10"
>
<h1
class=
"food-title"
>
店铺详情
</h1>
<tinymce
v-if=
"dialogType===1 || dialogType===2"
:height=
"400"
v-model=
"dialogBindData.storeDetails"
:hasImageLoad=
"1"
resPath=
"adverImg"
></tinymce>
<
template
v-else
>
信息展示
<view-page
:data=
"dialogBindData"
></view-page>
</
template
>
</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>
...
...
@@ -189,14 +393,24 @@
<el-button
v-else
:loading=
"true"
type=
"primary"
size=
"small"
:disabled=
"true"
>
提交
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
axios
from
'axios'
;
import
UpLoadImg
from
"@/components/UpLoadImg"
;
import
Tinymce
from
"@/components/Tinymce"
;
import
ViewPage
from
"./components/ViewPage"
;
import
*
as
Utils
from
"../../utils/index.js"
;
import
*
as
store
from
"../../api/store"
;
import
*
as
common
from
"../../api/common"
;
import
{
fattCreateTime
}
from
"../../utils/fattTime"
;
export
default
{
components
:
{
UpLoadImg
,
Tinymce
,
ViewPage
},
data
()
{
return
{
seacherParam
:
{
...
...
@@ -211,42 +425,51 @@ export default {
// ---------------------------------------查看和编辑dialog--------------------------------
dialogState
:
false
,
dialogType
:
1
,
// 1--增加 2--编辑 3--查看
//dialog弹框绑定数据
// createTime:1527314737000
// createTimeEnd:null
// createTimeStart:null
// isVailable:
// memo:"日常拜访"
// operatorId:null
// operatorType:null
// pk:"1001"
// updateTime:null
// updateTimeEnd:null
// updateTimeStart:null
// visitReason:"日常拜访"
// visitReasonId:"1001"
dialogBindData
:
{
storeId
:
""
,
storeName
:
""
,
contactNumber
:
""
,
contacts
:
""
,
qq
:
""
,
wechat
:
""
,
storePosition
:
""
,
isAuditing
:
1
,
isShopping
:
1
,
isRecommend
:
""
,
isAvailable
:
""
,
contactNumber
:
""
,
contacts
:
""
,
qq
:
""
,
wechat
:
""
,
storePosition
:
""
,
storeBusinessTimeStart
:
""
,
storeBusinessTimeEnd
:
""
,
administratorsName
:
""
,
clicks
:
""
consumeInterval
:
""
,
storeBusinessTimeStart
:
""
,
storeBusinessTimeEnd
:
""
,
storeDetails
:
""
,
qrCode
:
""
,
storeHomePic
:
""
,
matureTime
:
""
,
province
:
""
,
cityName
:
""
,
county
:
""
,
provinceId
:
""
,
cityId
:
""
,
countyId
:
""
,
administratorsId
:
''
,
administratorsName
:
''
},
// 是否提交
submmitSuccess
:
false
submmitSuccess
:
false
,
// 位置的三级联动
posPData
:
null
,
posPID
:
""
,
posCData
:
null
,
posCID
:
""
,
posAData
:
null
,
posAID
:
""
,
// 消费区间
minPrice
:
""
,
maxPrice
:
""
,
// 店铺管理员
managerData
:
null
,
};
},
...
...
@@ -282,30 +505,47 @@ export default {
},
add
()
{
this
.
dialogType
=
1
;
axios
.
all
([
this
.
getPList
(),
this
.
getStoreAdministrators
()
]).
then
((
s
,
f
)
=>
{
this
.
dialogState
=
true
;
})
},
del
(
data
)
{
store
.
delStore
({
storeId
:
data
.
storeId
})
.
then
(
res
=>
{
if
(
res
.
data
.
code
===
"1"
)
{
this
.
getList
(()
=>
{
data
.
delState
=
false
;
this
.
$message
({
message
:
"删除成功"
,
type
:
"warning"
});
data
.
delState
=
false
;
});
}
});
},
// del(data) {
// visitor
// .deleteVisitReason({
// visitReasonId: data.visitReasonId
// })
// .then(res => {
// if (res.data.code === "1") {
// this.getList(() => {
// data.delState = false;
// });
// }
// this.$message({
// message: res.data.msg,
// type: "warning"
// });
// data.delState = false;
// });
// },
edit
(
data
)
{
this
.
dialogType
=
2
;
const
Cparam
=
{
codeP
:
data
.
provinceId
};
const
Aparam
=
{
codeC
:
data
.
cityId
};
this
.
getPList
(()
=>
{
this
.
getCList
(
Cparam
,
()
=>
{
this
.
getAList
(
Aparam
,
()
=>
{
this
.
getStoreAdministrators
(()
=>
{
this
.
reBindData
(
data
);
this
.
dialogState
=
true
;
})
});
});
});
},
check
(
data
)
{
this
.
dialogType
=
3
;
...
...
@@ -317,18 +557,34 @@ export default {
for
(
const
key
in
this
.
dialogBindData
)
{
this
.
dialogBindData
[
key
]
=
data
[
key
];
}
const
prices
=
data
.
consumeInterval
;
this
.
minPrice
=
prices
.
split
(
"-"
)[
0
];
this
.
maxPrice
=
prices
.
split
(
"-"
)[
1
];
},
submmitFun
()
{
// if (this.dialogType === 1) {
// alert(`添加${JSON.stringify(this.dialogBindData)}`);
// } else {
// alert(`编辑${JSON.stringify(this.dialogBindData)}`);
// }
// 发送添加请求
const
isSubmitActive
=
this
.
dialogBindData
.
storeName
&&
this
.
dialogBindData
.
storePosition
&&
this
.
dialogBindData
.
storeDetails
;
if
(
isSubmitActive
)
{
const
param
=
Utils
.
deepClone
(
this
.
dialogBindData
);
param
.
consumeInterval
=
`
${
this
.
minPrice
}
-
${
this
.
maxPrice
}
`
;
param
.
province
=
this
.
buildPositionName
(
this
.
posPData
,
this
.
dialogBindData
.
provinceId
,
1
);
param
.
cityName
=
this
.
buildPositionName
(
this
.
posCData
,
this
.
dialogBindData
.
cityId
,
2
);
param
.
county
=
this
.
buildPositionName
(
this
.
posAData
,
this
.
dialogBindData
.
countyId
,
3
);
param
.
matureTime
=
this
.
fattTime
(
this
.
dialogBindData
.
matureTime
);
param
.
administratorsName
=
this
.
buildManagerName
(
this
.
managerData
,
this
.
dialogBindData
.
administratorsId
)
this
.
submmitSuccess
=
true
;
store
.
addOrEditStore
(
this
.
dialogBindData
).
then
(
res
=>
{
store
.
addOrEditStore
(
param
).
then
(
res
=>
{
this
.
getList
(()
=>
{
this
.
$message
({
message
:
this
.
dialogType
===
1
?
"添加成功"
:
"编辑成功"
,
...
...
@@ -338,12 +594,6 @@ export default {
this
.
handleClose
();
});
});
}
else
{
this
.
$message
({
message
:
"请完善提交信息"
,
type
:
"warning"
});
}
},
//关闭弹框
handleClose
()
{
...
...
@@ -355,6 +605,16 @@ export default {
this
.
dialogBindData
[
key
]
=
""
;
}
}
this
.
posPData
=
null
;
this
.
posPID
=
""
;
this
.
posCData
=
null
;
this
.
posCID
=
""
;
this
.
posAData
=
null
;
this
.
posAID
=
""
;
// 消费区间
this
.
minPrice
=
""
;
this
.
maxPrice
=
""
;
},
// 分页处理
handleSizeChange
(
val
)
{
...
...
@@ -381,18 +641,27 @@ export default {
});
},
// 管理员下拉
getStoreAdministrators
(
cb
){
store
.
getStoreAdministrators
().
then
(
res
=>
{
this
.
managerData
=
res
.
data
.
data
;
cb
?
cb
()
:
""
;
})
},
// 格式化时间
fattTime
(
time
)
{
return
fattCreateTime
(
time
);
},
// 改变启用状态
handleIsVailable
(
data
)
{
console
.
log
(
data
.
isVailable
);
if
(
data
.
isAuditing
)
{
const
param
=
{
visitReasonId
:
data
.
visitReason
Id
,
isVailable
:
data
.
isVailable
?
0
:
1
storeId
:
data
.
store
Id
,
isShopping
:
data
.
isShopping
?
1
:
0
};
visitor
.
addOrEditVisitReason
(
param
).
then
(
res
=>
{
store
.
addOrEditStore
(
param
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
"1"
)
{
this
.
$message
({
message
:
"设置成功"
,
...
...
@@ -400,6 +669,136 @@ export default {
});
}
});
}
else
{
this
.
getList
(()
=>
{
this
.
$message
({
message
:
"审核未通过"
,
type
:
"warning"
});
});
}
},
handleAuditFun
(
data
)
{
const
param
=
{
storeId
:
data
.
storeId
,
isAuditing
:
"1"
};
store
.
addOrEditStore
(
param
).
then
(
res
=>
{
this
.
getList
(()
=>
{
this
.
$message
({
message
:
"审核成功"
,
type
:
"success"
});
});
});
},
handleRecommendFun
(
data
)
{
this
.
$prompt
(
"只能输入1~2位正整数"
,
"请输入推荐码"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
inputPattern
:
/^
\d{1,2}
$/
,
inputErrorMessage
:
"推荐码格式不正确"
})
.
then
(({
value
})
=>
{
const
param
=
{
storeId
:
data
.
storeId
,
serialNumber
:
Number
(
value
)
};
store
.
addOrEditStore
(
param
).
then
(
res
=>
{
this
.
getList
(()
=>
{
this
.
$message
({
type
:
"success"
,
message
:
"推荐成功,推荐码是"
+
value
});
});
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"取消输入"
});
});
},
// 上传图片成功
handleImgLoad
(
url
)
{
this
.
dialogBindData
.
qrCode
=
url
;
},
// 上传图片成功
handleImgLoad1
(
url
)
{
this
.
dialogBindData
.
storeHomePic
=
url
;
},
// 获取省、市
getPList
(
cb
)
{
this
.
posCData
=
null
;
common
.
getProviceList
().
then
(
res
=>
{
this
.
posPData
=
res
.
data
.
data
;
cb
?
cb
()
:
""
;
});
},
//获取市、区
getCList
(
data
,
cb
)
{
this
.
posAData
=
null
;
common
.
getCityList
(
data
).
then
(
res
=>
{
this
.
posCData
=
res
.
data
.
data
;
cb
?
cb
()
:
""
;
});
},
//获取区、县
getAList
(
data
,
cb
)
{
common
.
getAreaList
(
data
).
then
(
res
=>
{
this
.
posAData
=
res
.
data
.
data
;
cb
?
cb
()
:
""
;
});
},
choosePFun
(
val
)
{
this
.
posCData
=
null
;
this
.
posAData
=
null
;
this
.
dialogBindData
.
cityId
=
""
;
this
.
dialogBindData
.
countyId
=
""
;
this
.
getCList
({
codeP
:
val
});
},
chooseCFun
(
val
)
{
this
.
posAData
=
null
;
this
.
dialogBindData
.
countyId
=
""
;
this
.
getAList
({
codeC
:
val
});
},
// 组装地址名称
buildPositionName
(
data
,
code
,
type
)
{
let
codeKey
=
""
;
if
(
type
==
1
)
{
codeKey
=
"codeP"
;
}
else
if
(
type
==
2
)
{
codeKey
=
"codeC"
;
}
else
if
(
type
==
3
)
{
codeKey
=
"codeA"
;
}
for
(
let
idx
in
data
)
{
if
(
data
[
idx
][
codeKey
]
==
code
)
{
return
data
[
idx
].
name
;
}
}
},
// 组装管理员名称
buildManagerName
(
data
,
code
){
for
(
let
idx
in
data
)
{
if
(
data
[
idx
].
administratorsId
==
code
)
{
return
data
[
idx
].
administratorsName
;
}
}
}
},
computed
:
{
...
...
@@ -427,6 +826,34 @@ export default {
};
</
script
>
<
style
lang=
"scss"
scoped
>
.start-end-time
{
display
:
flex
;
span
{
border
:
none
!
important
;
padding
:
0
!
important
;
line-height
:
40px
!
important
;
margin
:
0
10px
!
important
;
}
}
.food-title
{
font-size
:
14px
;
&
:
:
before
{
content
:
"1"
;
background
:
#3a8ee6
;
color
:
transparent
;
margin-right
:
10px
;
}
}
.food-title
{
font-size
:
14px
;
&
:
:
before
{
content
:
"1"
;
background
:
#3a8ee6
;
color
:
transparent
;
margin-right
:
10px
;
}
}
.dialog-body-content
{
.el-row
{
margin-top
:
14px
;
...
...
@@ -454,3 +881,6 @@ export default {
}
}
</
style
>
2code/web/mgt_pro/src/views/system/dataDictItem.vue
View file @
dbd1c02b
...
...
@@ -133,9 +133,7 @@
<el-col
:span=
"8"
class=
"content-left"
><label>
分类代码
</label></el-col>
<el-col
:span=
"16"
class=
"content-right"
>
<el-select
v-if=
"dialogType===1 || dialogType===2"
size=
"small"
v-model=
"dialogBindData.dataDictCatCode"
placeholder=
"请选择"
>
<el-option
value=
""
>
--请选择--
</el-option>
<el-option
value=
""
>
--请选择--
</el-option>
<el-option
v-for=
"item in dataDicts"
:key=
"item.dataDictCatCode"
...
...
2code/web/mgt_pro/src/views/system/param.vue
View file @
dbd1c02b
...
...
@@ -117,7 +117,7 @@
<!-- 查看,编辑dialog -->
<el-dialog
v-el
v-dragv
-dialog
v-el
-drag
-dialog
:title=
"dialogTitle"
:visible
.
sync=
"dialogState"
width=
"30%"
...
...
@@ -132,10 +132,6 @@
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<el-col
:span=
"8"
class=
"content-left"
><label>
参数名
</label></el-col>
<el-col
:span=
"16"
class=
"content-right"
>
...
...
2code/web/mgt_pro/src/views/worker/components/ViewPage.vue
0 → 100644
View file @
dbd1c02b
<
template
>
<div
class=
"view-page"
>
<div
class=
"phone-bg"
>
<img
:src=
"require('../../../../static/images/phone-bg.png')"
alt=
""
>
</div>
<div
class=
"page-infro"
>
<!--
<el-carousel
height=
"202px"
indicator-position=
"none"
>
<el-carousel-item
v-for=
"(item,index) in imageArr"
:key=
"index"
>
<div
class=
"bannerImg"
><img
:src=
"item"
alt=
""
></div>
</el-carousel-item>
</el-carousel>
-->
<!--
<div
class=
"bannerImg"
>
<img
:src=
"data.advertPicUrl"
alt=
""
height=
"202"
>
</div>
-->
<div
class=
"text-infro"
v-html=
"data.workerResume"
></div>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:[
"data"
],
data
(){
return
{
imageArr
:[]
}
},
beforeMount
(){
const
data
=
this
.
data
;
// let arr = [];
// for(const key in data){
// if(key.indexOf('dishesPicUrl')>-1 && data[key]){
// arr.push(data[key])
// }
// }
// this.imageArr = arr
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.view-page
{
position
:
relative
;
.phone-bg
{
width
:
360px
;
img
{
width
:
100%
;
}
}
.page-infro
{
background
:
#fff
;
position
:
absolute
;
top
:
110px
;
left
:
30px
;
width
:
304px
;
height
:
540px
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
.bannerImg
{
width
:
100%
;
height
:
202px
;
img
{
width
:
100%
;
height
:
100%
;
}
}
.text-infro
{
padding
:
0
15px
;
}
}
}
</
style
>
\ No newline at end of file
2code/web/mgt_pro/src/views/worker/workerList.vue
View file @
dbd1c02b
...
...
@@ -10,7 +10,7 @@
</div>
<el-row
:gutter=
"15"
>
<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"
><el-input
placeholder=
"请输入关键字"
v-model=
"seacherParam.workerName"
@
keyup
.
enter
.
native=
"seachFun"
></el-input></el-col>
</el-col>
</el-row>
...
...
@@ -26,6 +26,7 @@
<el-table
empty-text=
"暂无数据"
:stripe=
"true"
:data=
"dataOption"
v-loading=
"!dataOption"
>
<el-table-column
prop=
"workerNumber"
label=
"工号"
></el-table-column>
<el-table-column
prop=
"workerName"
label=
"姓名"
></el-table-column>
<el-table-column
label=
"性别"
>
<template
slot-scope=
"scope"
>
...
...
@@ -40,32 +41,43 @@
<el-table-column
prop=
"workerBust"
label=
"胸围"
></el-table-column>
<el-table-column
prop=
"workerWaist"
label=
"腰围"
></el-table-column>
<el-table-column
prop=
"workerHipline"
label=
"臀围"
></el-table-column>
<el-table-column
label=
"创建时间"
>
<!-- <el-table-column prop="workerResume" label="个人简介"></el-table-column> -->
<el-table-column
label=
"到期时间"
>
<
template
slot-scope=
"scope"
>
<span>
{{
fattTime
(
scope
.
row
.
creat
eTime
)
}}
</span>
<span>
{{
fattTime
(
scope
.
row
.
matur
eTime
)
}}
</span>
</
template
>
</el-table-column>
<!-- <el-table-column prop="memo" label="备注"></el-table-column> -->
<
!-- <el-table-column label="启用状态
">
<
el-table-column
label=
"是否展示
"
>
<
template
slot-scope=
"scope"
>
<span>
<el-switch
v-model="scope.row.is
Vailable
"
v-model=
"scope.row.is
Shopping
"
:active-value=
"1"
:inactive-value=
"0"
@
change=
"handleIsVailable(scope.row)"
>
</el-switch>
</span>
</
template
>
</el-table-column> -->
</el-table-column>
<el-table-column
label=
"操作"
>
<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"
icon=
"el-icon-edit"
circle
class=
"table-icon"
@
click=
"edit(scope.row)"
></el-button>
<!--
<el-popover
<!-- 推荐 -->
<el-button
v-if=
"scope.row.isAuditing==1 && scope.row.isShopping==1"
type=
"primary"
icon=
"el-icon-edit"
circle
class=
"table-icon"
@
click=
"handleRecommendFun(scope.row)"
></el-button>
<!-- 删除 -->
<el-popover
placement=
"top"
width=
"160"
v-model=
"scope.row.delState"
>
...
...
@@ -75,8 +87,21 @@
<el-button
type=
"primary"
size=
"mini"
@
click=
"del(scope.row)"
>
确定
</el-button>
</div>
<el-button
slot=
"reference"
type=
"warning"
circle
icon=
"el-icon-delete"
class=
"table-icon popver-btn"
></el-button>
</el-popover>
-->
</el-popover>
<!-- 审核 -->
<el-popover
v-if=
"scope.row.isAuditing!=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>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleAuditFun(scope.row)"
>
通过
</el-button>
</div>
<el-button
slot=
"reference"
type=
"warning"
circle
icon=
"el-icon-delete"
class=
"table-icon popver-btn"
></el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -100,60 +125,195 @@
<!-- 添加dialog -->
<!-- 查看,编辑dialog -->
<!-- 查看,编辑dialog -->
<el-dialog
:title=
"dialogTitle"
:visible
.
sync=
"dialogState"
width=
"30%"
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=
"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.workerName"
></el-input>
<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=
"8"
class=
"content-left"
><label>
性别
</label></el-col>
<el-col
:span=
"16"
class=
"content-right"
>
<el-radio-group
v-if=
"dialogType===1 || dialogType===2"
v-model=
"dialogBindData.workerSex"
>
<el-radio
size=
"small"
:label=
"1"
>
男
</el-radio>
<el-radio
size=
"small"
:label=
"0"
>
女
</el-radio>
</el-radio-group>
<span
v-else
>
{{dialogBindData.workerSex===1?"男":"女"}}
</span>
<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"
>
<el-radio
v-model=
"dialogBindData.workerSex"
:label=
"1"
>
男
</el-radio>
<el-radio
v-model=
"dialogBindData.workerSex"
:label=
"0"
>
女
</el-radio>
</
template
>
<span
v-else
>
{{dialogBindData.workerSex==1?'男':'女'}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"15"
>
<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.workerAge"
></el-input>
<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=
"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.workerHeight"
></el-input>
<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=
"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=
"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=
"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=
"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=
"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=
"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=
"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>
<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"
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=
"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>
</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=
"20"
class=
"content-right"
>
<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>
</el-col>
</el-row>
</el-col>
<el-col
:span=
"10"
>
<h1
class=
"food-title"
>
员工详情
</h1>
<!-- <el-row :gutter="15"
>
<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" type="textarea" rows="3" placeholder="请输入备注" resize="none" v-model="dialogBindData.memo"></el-input
>
<
span v-else>{{dialogBindData.memo || "暂无备注"}}</span
>
<tinymce
v-if=
"dialogType===1 || dialogType===2"
:height=
"400"
v-model=
"dialogBindData.workerResume"
:hasImageLoad=
"1"
resPath=
"workerResume"
></tinymce
>
<
template
v-else
>
<view-page
:data=
"dialogBindData"
></view-page
>
<
/
template
>
</el-col>
</el-row> -->
</el-row>
</div>
<div
class=
"btns-wrapper"
>
...
...
@@ -166,16 +326,20 @@
</template>
<
script
>
import
UpLoadImg
from
"@/components/UpLoadImg"
;
import
Tinymce
from
"@/components/Tinymce"
;
import
ViewPage
from
"./components/ViewPage"
;
import
*
as
Utils
from
"../../utils/index.js"
;
import
*
as
worker
from
"../../api/worker"
;
import
*
as
common
from
"../../api/common"
;
import
{
fattCreateTime
}
from
"../../utils/fattTime"
;
export
default
{
components
:
{
Tinymce
,
UpLoadImg
,
ViewPage
},
data
()
{
return
{
seacherParam
:
{
workerName
:
""
,
workerNumber
:
""
,
workerAge
:
""
workerName
:
""
},
// 表格数据
dataOption
:
null
,
...
...
@@ -186,47 +350,33 @@ export default {
// ---------------------------------------查看和编辑dialog--------------------------------
dialogState
:
false
,
dialogType
:
1
,
// 1--增加 2--编辑 3--查看
//dialog弹框绑定数据
// createTime:1527314737000
// createTimeEnd:null
// createTimeStart:null
// isVailable:
// memo:"日常拜访"
// operatorId:null
// operatorType:null
// pk:"1001"
// updateTime:null
// updateTimeEnd:null
// updateTimeStart:null
// visitReason:"日常拜访"
// visitReasonId:"1001"
dialogBindData
:
{
workerId
:
""
,
workerNumber
:
""
,
workerName
:
""
,
workerSex
:
1
,
workerAge
:
""
,
workerBirthday
:
""
,
workerAncestral
:
""
,
workerHeight
:
""
,
workerWeight
:
""
,
workerBust
:
1
,
workerBust
:
""
,
workerWaist
:
""
,
workerHipline
:
""
,
workerHomePic
:
""
,
workerPic
:
""
,
workerResume
:
1
,
storeId
:
""
,
administratorsId
:
""
,
isAuditing
:
""
,
isShopping
:
""
,
clicks
:
1
,
isRecommend
:
""
,
serialNumber
:
""
workerResume
:
""
,
matureTime
:
""
,
workerHomePic
:
''
,
storeId
:
""
,
storeName
:
""
},
// 是否提交
submmitSuccess
:
false
submmitSuccess
:
false
,
// 店铺的下拉
storeData
:
null
};
},
...
...
@@ -262,30 +412,35 @@ export default {
},
add
()
{
this
.
dialogType
=
1
;
this
.
getStoreData
(()
=>
{
this
.
dialogState
=
true
;
});
},
del
(
data
)
{
worker
.
delWorker
({
workerId
:
data
.
workerId
})
.
then
(
res
=>
{
if
(
res
.
data
.
code
===
"1"
)
{
this
.
getList
(()
=>
{
data
.
delState
=
false
;
this
.
$message
({
message
:
"删除成功"
,
type
:
"warning"
});
data
.
delState
=
false
;
});
}
});
},
// del(data) {
// visitor
// .deleteVisitReason({
// visitReasonId: data.visitReasonId
// })
// .then(res => {
// if (res.data.code === "1") {
// this.getList(() => {
// data.delState = false;
// });
// }
// this.$message({
// message: res.data.msg,
// type: "warning"
// });
// data.delState = false;
// });
// },
edit
(
data
)
{
this
.
dialogType
=
2
;
this
.
getStoreData
(()
=>
{
this
.
reBindData
(
data
);
this
.
dialogState
=
true
;
});
},
check
(
data
)
{
this
.
dialogType
=
3
;
...
...
@@ -299,16 +454,15 @@ export default {
}
},
submmitFun
()
{
// if (this.dialogType === 1) {
// alert(`添加${JSON.stringify(this.dialogBindData)}`);
// } else {
// alert(`编辑${JSON.stringify(this.dialogBindData)}`);
// }
// 发送添加请求
const
isSubmitActive
=
this
.
dialogBindData
.
repairWorkerName
&&
this
.
dialogBindData
.
repairWorkerPhone
&&
this
.
dialogBindData
.
repairWorkerIdCard
;
if
(
isSubmitActive
)
{
const
param
=
Utils
.
deepClone
(
this
.
dialogBindData
);
param
.
storeName
=
this
.
buildStoreName
(
this
.
storeData
,
this
.
dialogBindData
.
storeId
);
param
.
matureTime
=
this
.
fattTime
(
this
.
dialogBindData
.
matureTime
);
this
.
submmitSuccess
=
true
;
worker
.
addOrEditWorker
(
this
.
dialogBindData
).
then
(
res
=>
{
worker
.
addOrEditWorker
(
param
).
then
(
res
=>
{
this
.
getList
(()
=>
{
this
.
$message
({
message
:
this
.
dialogType
===
1
?
"添加成功"
:
"编辑成功"
,
...
...
@@ -318,18 +472,12 @@ export default {
this
.
handleClose
();
});
});
}
else
{
this
.
$message
({
message
:
"请完善提交信息"
,
type
:
"warning"
});
}
},
//关闭弹框
handleClose
()
{
this
.
dialogState
=
false
;
for
(
const
key
in
this
.
dialogBindData
)
{
if
(
key
===
"
s
ex"
)
{
if
(
key
===
"
workerS
ex"
)
{
this
.
dialogBindData
[
key
]
=
1
;
}
else
{
this
.
dialogBindData
[
key
]
=
""
;
...
...
@@ -361,18 +509,73 @@ export default {
});
},
// 店铺下拉
getStoreData
(
cb
)
{
worker
.
getStores
().
then
(
res
=>
{
this
.
storeData
=
res
.
data
.
data
;
cb
?
cb
()
:
""
;
});
},
// 格式化时间
fattTime
(
time
)
{
return
fattCreateTime
(
time
);
},
handleRecommendFun
(
data
)
{
this
.
$prompt
(
"只能输入1~2位正整数"
,
"请输入推荐码"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
inputPattern
:
/^
\d{1,2}
$/
,
inputErrorMessage
:
"推荐码格式不正确"
})
.
then
(({
value
})
=>
{
const
param
=
{
workerId
:
data
.
workerId
,
serialNumber
:
Number
(
value
)
};
worker
.
addOrEditWorker
(
param
).
then
(
res
=>
{
this
.
getList
(()
=>
{
this
.
$message
({
type
:
"success"
,
message
:
"推荐成功,推荐码是"
+
value
});
});
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"取消输入"
});
});
},
handleAuditFun
(
data
)
{
const
param
=
{
workerId
:
data
.
workerId
,
isAuditing
:
"1"
};
worker
.
addOrEditWorker
(
param
).
then
(
res
=>
{
this
.
getList
(()
=>
{
this
.
$message
({
message
:
"审核成功"
,
type
:
"success"
});
});
});
},
// 改变启用状态
handleIsVailable
(
data
)
{
console
.
log
(
data
.
isVailable
);
if
(
data
.
isAuditing
)
{
const
param
=
{
visitReasonId
:
data
.
visitReason
Id
,
isVailable
:
data
.
isVailable
?
0
:
1
workerId
:
data
.
worker
Id
,
isShopping
:
data
.
isShopping
?
1
:
0
};
visitor
.
addOrEditVisitReason
(
param
).
then
(
res
=>
{
worker
.
addOrEditWorker
(
param
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
"1"
)
{
this
.
$message
({
message
:
"设置成功"
,
...
...
@@ -380,6 +583,28 @@ export default {
});
}
});
}
else
{
this
.
getList
(()
=>
{
this
.
$message
({
message
:
"审核未通过"
,
type
:
"warning"
});
});
}
},
// 上传图片成功
handleImgLoad
(
url
)
{
this
.
dialogBindData
.
workerHomePic
=
url
;
},
// 组装店铺的名称
buildStoreName
(
data
,
code
)
{
for
(
let
idx
in
data
)
{
if
(
data
[
idx
].
storeId
==
code
)
{
return
data
[
idx
].
storeName
;
}
}
}
},
computed
:
{
...
...
@@ -407,6 +632,24 @@ export default {
};
</
script
>
<
style
lang=
"scss"
scoped
>
.food-title
{
font-size
:
14px
;
&
:
:
before
{
content
:
"1"
;
background
:
#3a8ee6
;
color
:
transparent
;
margin-right
:
10px
;
}
}
.food-title
{
font-size
:
14px
;
&
:
:
before
{
content
:
"1"
;
background
:
#3a8ee6
;
color
:
transparent
;
margin-right
:
10px
;
}
}
.dialog-body-content
{
.el-row
{
margin-top
:
14px
;
...
...
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