Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-3
Overview
Overview
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
office
haoban-3
Commits
22ccf6c1
Commit
22ccf6c1
authored
Jul 14, 2022
by
huaying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 活码列表
parent
75b29454
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
273 additions
and
293 deletions
+273
-293
proxyList.js
config/proxyList.js
+7
-0
actCode.js
src/api/actCode.js
+1
-1
act-code-table.vue
...leads/actCodeManage/staffActCode/views/act-code-table.vue
+165
-234
batchAddCode.vue
...esleads/actCodeManage/staffActCode/views/batchAddCode.vue
+15
-3
setActCode.vue
...alesleads/actCodeManage/staffActCode/views/setActCode.vue
+25
-14
ActCodeSet.vue
src/views/salesleads/components/ActCodeSet.vue
+9
-9
dataDetail.vue
src/views/salesleads/components/dataDetail.vue
+36
-27
welcomesItem.vue
src/views/salesleads/components/welcomesItem.vue
+15
-5
No files found.
config/proxyList.js
View file @
22ccf6c1
...
@@ -15,6 +15,13 @@ module.exports = {
...
@@ -15,6 +15,13 @@ module.exports = {
'^/haoban-manage3-web'
:
''
'^/haoban-manage3-web'
:
''
}
}
},
},
'/api/'
:
{
target
:
'https://www.gicdev.com/'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^/api'
:
''
}
},
'/haoban-app-customer-web/'
:
{
'/haoban-app-customer-web/'
:
{
target
:
'https://www.gicdev.com/haoban-app-customer-web/'
,
target
:
'https://www.gicdev.com/haoban-app-customer-web/'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
...
...
src/api/actCode.js
View file @
22ccf6c1
...
@@ -37,4 +37,4 @@ export const guidePageSave = params => postRequest('/haoban-manage3-web/hm/guide
...
@@ -37,4 +37,4 @@ export const guidePageSave = params => postRequest('/haoban-manage3-web/hm/guide
export
const
linkPage
=
params
=>
postRequest
(
'/haoban-manage3-web/hm/link/page'
,
params
);
export
const
linkPage
=
params
=>
postRequest
(
'/haoban-manage3-web/hm/link/page'
,
params
);
//【活码】详情-查看明细列表
//【活码】详情-查看明细列表
export
const
detailClerkList
=
params
=>
postRequest
(
'/haoban-manage3-web/hm/qrcode/detail-clerk-list'
,
params
);
export
const
detailClerkList
=
params
=>
post
Json
Request
(
'/haoban-manage3-web/hm/qrcode/detail-clerk-list'
,
params
);
src/views/salesleads/actCodeManage/staffActCode/views/act-code-table.vue
View file @
22ccf6c1
...
@@ -2,29 +2,32 @@
...
@@ -2,29 +2,32 @@
<section>
<section>
<el-form
inline
>
<el-form
inline
>
<el-form-item>
<el-form-item>
<el-input
placeholder=
"请输入活码ID/名称、创建人"
style=
"width: 300px"
@
change=
"searchList"
v-model=
"
searchForm.keyword
"
>
<el-input
placeholder=
"请输入活码ID/名称、创建人"
style=
"width: 300px"
@
change=
"searchList"
v-model=
"
inFields.hmSelect
"
>
<i
slot=
"prefix"
class=
"el-input__icon el-icon-search"
></i>
<i
slot=
"prefix"
class=
"el-input__icon el-icon-search"
></i>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-select
v-model=
"storeSe
arch"
placeholder=
"请选择"
style=
"width: 128px"
@
change=
"searchList
"
>
<el-select
v-model=
"storeSe
lect"
placeholder=
"请选择"
style=
"width: 128px"
@
change=
"storeMemberSe
"
>
<el-option
label=
"成员所属门店"
:value=
"1"
></el-option>
<el-option
label=
"成员所属门店"
:value=
"1"
></el-option>
<el-option
label=
"使用成员"
:value=
"2"
></el-option>
<el-option
label=
"使用成员"
:value=
"2"
></el-option>
</el-select>
</el-select>
<el-select
v-model=
"searchForm.storeSearch"
filterable
remote
:placeholder=
"`请输入$
{storeSearch == 1 ? '门店名称' : '成员姓名'} / code`" :remote-method="remoteMethods" :loading="selectLoading" @change="searchList" style="margin-left: -4px; width:196px;">
<el-select
v-model=
"inFields.storeSelect"
v-if=
"storeSelect == 1"
filterable
remote
placeholder=
"请输入门店名称/code"
:remote-method=
"remoteMethods"
:loading=
"selectLoading"
v-loadmore=
"onLoadmoreStore"
@
change=
"searchList"
style=
"margin-left: -4px; width:196px;"
>
<el-option
v-for=
"item in memberOrShopList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
<el-option
v-for=
"item in shopList"
:key=
"item.storeId"
:label=
"item.storeName"
:value=
"item.storeCode"
>
</el-option>
</el-select>
<el-select
v-model=
"inFields.clerkSelect"
v-if=
"storeSelect == 2"
filterable
remote
placeholder=
"请输入成员名称/code"
:loading=
"selectLoading"
@
change=
"searchList"
style=
"margin-left: -4px; width:196px;"
>
<el-option
v-for=
"item in memberList"
:key=
"item.clerkId"
:label=
"item.clerkName"
:value=
"item.clerkCode"
>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-select
v-model=
"
searchForm.statusFlag
"
placeholder=
"全部状态"
clearable
class=
"w160"
@
change=
"searchList"
>
<el-select
v-model=
"
inFields.statusFlagInt
"
placeholder=
"全部状态"
clearable
class=
"w160"
@
change=
"searchList"
>
<
!--
<el-option
:key=
"0"
label=
"删除"
:value=
"0"
>
</el-option>
--
>
<
el-option
:key=
"0"
label=
"删除"
:value=
"0"
>
</el-option
>
<el-option
:key=
"1"
label=
"正常"
:value=
"1"
>
</el-option>
<el-option
:key=
"1"
label=
"正常"
:value=
"1"
>
</el-option>
<el-option
:key=
"2"
label=
"作废"
:value=
"2"
>
</el-option>
<el-option
:key=
"2"
label=
"作废"
:value=
"2"
>
</el-option>
<el-option
:key=
"3"
label=
"待生效"
:value=
"3"
>
</el-option>
<el-option
:key=
"3"
label=
"待生效"
:value=
"3"
>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-select
v-model=
"
searchForm.hmType
"
placeholder=
"全部类型"
clearable
class=
"w160"
@
change=
"searchList"
>
<el-select
v-model=
"
inFields.hmTypeInt
"
placeholder=
"全部类型"
clearable
class=
"w160"
@
change=
"searchList"
>
<el-option
:key=
"0"
label=
"单人活码"
:value=
"0"
>
</el-option>
<el-option
:key=
"0"
label=
"单人活码"
:value=
"0"
>
</el-option>
<el-option
:key=
"1"
label=
"多人活码"
:value=
"1"
>
</el-option>
<el-option
:key=
"1"
label=
"多人活码"
:value=
"1"
>
</el-option>
</el-select>
</el-select>
...
@@ -38,8 +41,8 @@
...
@@ -38,8 +41,8 @@
<el-button
type=
"primary"
@
click=
"$router.push('/actCodeAdd')"
>
新增活码
</el-button>
<el-button
type=
"primary"
@
click=
"$router.push('/actCodeAdd')"
>
新增活码
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
ref=
"actCodeTableRef"
v-loading=
"loadingStatus"
:data=
"
actCodeList"
tooltip-effect=
"dark"
class=
"act-code-table"
@
sort-change=
"sortChange"
:max-height=
"tableMaxHeight
"
>
<el-table
ref=
"actCodeTableRef"
v-loading=
"loadingStatus"
:data=
"
tableData"
class=
"act-code-table"
@
sort-change=
"sortChange
"
>
<!-- @select="selectTable" -->
<!-- @select="selectTable"
:max-height="tableMaxHeight" tooltip-effect="dark"
-->
<el-table-column
type=
"selection"
width=
"60"
fixed
>
</el-table-column>
<el-table-column
type=
"selection"
width=
"60"
fixed
>
</el-table-column>
<el-table-column
width=
"60"
class-name=
"table-select-cell"
fixed
>
<el-table-column
width=
"60"
class-name=
"table-select-cell"
fixed
>
<template
#
header
>
<template
#
header
>
...
@@ -53,41 +56,44 @@
...
@@ -53,41 +56,44 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"活码信息"
width=
"100"
>
<el-table-column
label=
"活码信息"
width=
"100"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<p
class=
"overflow-ellipsis"
:title=
"row.name"
>
{{
row
.
name
?
row
.
name
:
'--'
}}
</p>
<p
class=
"overflow-ellipsis"
:title=
"row.hmName"
>
{{
row
.
hmName
?
row
.
hmName
:
'--'
}}
</p>
<p><span
class=
"oneActCode"
v-if=
"row.hmType == 1"
>
单人活码
</span><span
class=
"moreActCOde"
v-else
>
多人活码
</span></p>
<!--
<p><span
class=
"oneActCode"
v-if=
"row.hmType == 1"
>
单人活码
</span><span
class=
"moreActCOde"
v-else
>
多人活码
</span></p>
-->
<p><span
class=
"oneActCode"
v-if=
"row.hmType == '单人活码'"
>
单人活码
</span><span
class=
"moreActCOde"
v-else
>
多人活码
</span></p>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"活码状态"
width=
"130"
>
<el-table-column
label=
"活码状态"
width=
"130"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<p><span
class=
"dot normal"
v-if=
"row.statusFlag == 1"
>
正常
</span><span
class=
"dot voided"
v-if=
"row.statusFlag == 2"
>
作废
</span><span
class=
"dot needSure"
v-if=
"row.statusFlag == 3"
>
待生效
</span></p>
<!--
<p><span
class=
"dot normal"
v-if=
"row.statusFlag == 1"
>
正常
</span><span
class=
"dot voided"
v-if=
"row.statusFlag == 2"
>
作废
</span><span
class=
"dot needSure"
v-if=
"row.statusFlag == 3"
>
待生效
</span></p>
<p
class=
"toTopTip"
v-if=
"row.statusFlag == 1"
>
(今日已达上限)
</p>
<p
class=
"toTopTip"
v-if=
"row.statusFlag == 1"
>
(今日已达上限)
</p>
-->
<p><span
class=
"dot normal"
v-if=
"row.statusFlag == '正常'"
>
正常
</span><span
class=
"dot voided"
v-if=
"row.statusFlag == '作废'"
>
作废
</span><span
class=
"dot needSure"
v-if=
"row.statusFlag == '待生效'"
>
待生效
</span></p>
<p
class=
"toTopTip"
v-if=
"row.statusFlag == '正常'"
>
(今日已达上限)
</p>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"添加好友人数"
sortable=
"custom"
width=
"150"
>
<el-table-column
label=
"添加好友人数"
prop=
"addNum"
sortable=
"custom"
width=
"150"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<p>
{{
row
.
addNum
?
row
.
addNum
:
'--'
}}
</p>
<p>
{{
row
.
addNum
==
null
?
row
.
addNum
:
'--'
}}
</p>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"今日新增人数"
sortable=
"custom"
width=
"150"
>
<el-table-column
label=
"今日新增人数"
prop=
"addNumT"
sortable=
"custom"
width=
"150"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<p>
{{
row
.
addNum
?
row
.
addNum
:
'--'
}}
</p>
<p>
{{
row
.
addNum
T
==
null
?
row
.
addNumT
:
'--'
}}
</p>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"使用成员"
width=
"120"
>
<el-table-column
label=
"使用成员"
width=
"120"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<p>
{{
row
.
clerkName
?
row
.
clerkName
:
'--'
}}
</p>
<p>
{{
row
.
clerkName
?
row
.
clerkName
:
'--'
}}
</p>
<p
class=
"ft-12 phone"
>
{{
row
.
cler
Code
?
row
.
cler
Code
:
'--'
}}
</p>
<p
class=
"ft-12 phone"
>
{{
row
.
cler
kCode
==
null
?
row
.
clerk
Code
:
'--'
}}
</p>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"成员所属门店"
width=
"120"
>
<el-table-column
label=
"成员所属门店"
width=
"120"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<p>
{{
row
.
storeName
?
row
.
storeName
:
'--'
}}
</p>
<p>
{{
row
.
storeName
?
row
.
storeName
:
'--'
}}
</p>
<p
class=
"ft-12 phone"
>
{{
row
.
storeCode
?
row
.
storeCode
:
'--'
}}
</p>
<p
class=
"ft-12 phone"
>
{{
row
.
storeCode
==
null
?
row
.
storeCode
:
'--'
}}
</p>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"所属分组"
width=
"100"
show-overflow-tooltip
>
<el-table-column
label=
"所属分组"
width=
"100"
show-overflow-tooltip
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<p>
{{
row
.
hmGroupId
?
row
.
hmGroupId
:
'--'
}}
</p>
<p>
{{
row
.
hmGroupId
==
null
?
row
.
hmGroupId
:
'--'
}}
</p>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"创建人"
width=
"100"
>
<el-table-column
label=
"创建人"
width=
"100"
>
...
@@ -95,42 +101,46 @@
...
@@ -95,42 +101,46 @@
<p>
{{
row
.
creatorName
?
row
.
creatorName
:
'--'
}}
</p>
<p>
{{
row
.
creatorName
?
row
.
creatorName
:
'--'
}}
</p>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"创建时间"
sortable=
"custom"
width=
"12
0"
>
<el-table-column
label=
"创建时间"
prop=
"createTime"
sortable=
"custom"
width=
"11
0"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<p>
{{
row
.
createTime
?
row
.
createTime
:
'--'
}}
</p>
<p>
{{
row
.
createTime
?
row
.
createTime
:
'--'
}}
</p>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
width=
"300"
fixed=
"right"
>
<el-table-column
label=
"操作"
width=
"300"
fixed=
"right"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<dm-dropdown
:scope-data=
"row"
:configs=
"operateBtnArr"
:max=
"5"
@
command=
"onCommand"
/>
<dm-dropdown
:scope-data=
"row"
:configs=
"operateBtnArr"
:max=
"5"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<div
class=
"block common-wrap__page text-right m-t-24"
v-if=
"
actCodeList.length != 0
"
>
<div
class=
"block common-wrap__page text-right m-t-24"
v-if=
"
tableData.length
"
>
<
dm-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"pageParam.pageNum"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"pageParam.pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"totalCount"
>
</dm
-pagination>
<
el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:page-size
.
sync=
"pageParam.pageSize"
:current-page
.
sync=
"pageParam.pageNum"
layout=
"total, sizes, prev, pager, next, jumper"
:page-sizes=
"[20, 40, 60, 80]"
:total=
"totalCount"
>
</el
-pagination>
</div>
</div>
<el-dialog
title=
"选择分组"
:visible
.
sync=
"dialogGroupFormVisible"
width=
"25%"
>
<el-dialog
title=
"选择分组"
:visible
.
sync=
"dialogGroupFormVisible"
width=
"25%"
>
<el-form
:model=
"formGroup"
>
<el-form
:model=
"formGroup"
>
<el-form-item
label=
"活动区域"
:rules=
"[{ required: true, message: '请选择分组', trigger: 'blur' }]"
>
<el-form-item
label=
"活动区域"
:rules=
"[{ required: true, message: '请选择分组', trigger: 'blur' }]"
>
<el-select
v-model=
"formGroup.group
List"
placeholder=
"选择分组"
v-loadmore=
"onLoadmore"
remote
filterable
:remote-method=
"remoteMethod"
@
visible-change=
"visibleChange"
>
<el-select
v-model=
"formGroup.group
Id"
placeholder=
"选择分组"
v-loadmore=
"onLoadmore"
remote
filterable
:remote-method=
"remoteMethod"
@
visible-change=
"visibleChange"
clearable
>
<el-option
v-for=
"item in groupList"
:key=
"item.groupId"
:label=
"item.groupName"
:value=
"item.groupId"
></el-option>
<el-option
v-for=
"item in groupList"
:key=
"item.groupId"
:label=
"item.groupName"
:value=
"item.groupId"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogGroupFormVisible = false"
>
取 消
</el-button>
<el-button
@
click=
"dialogGroupFormVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"
dialogGroupFormVisible = false
"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"
batchOK
"
>
确 定
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<links
:src=
"wxQrcode"
:show
.
sync=
"show"
:imageName=
"imageName"
/>
</section>
</section>
</template>
</template>
<
script
>
<
script
>
import
{
actCodeListApi
}
from
'@/api/actCode.js'
;
import
{
actCodeListApi
}
from
'@/api/actCode.js'
;
// import errMsg from '@/common/js/error
';
import
links
from
'@/components/common/links
'
;
import
{
deleteRequest
,
getRequest
,
postJsonRequest
}
from
'@/api/api'
;
import
{
deleteRequest
,
getRequest
,
post
Request
,
post
JsonRequest
}
from
'@/api/api'
;
export
default
{
export
default
{
name
:
'actCodeTable'
,
name
:
'actCodeTable'
,
components
:
{
links
},
directives
:
{
directives
:
{
loadmore
:
{
loadmore
:
{
inserted
(
el
,
binding
)
{
inserted
(
el
,
binding
)
{
...
@@ -151,19 +161,22 @@ export default {
...
@@ -151,19 +161,22 @@ export default {
}
}
},
},
data
()
{
data
()
{
let
tableMaxHeight
=
document
.
body
.
clientHeight
-
312
+
'px'
;
//
let tableMaxHeight = document.body.clientHeight - 312 + 'px';
return
{
return
{
tableMaxHeight
:
tableMaxHeight
,
// tableMaxHeight: tableMaxHeight,
searchForm
:
{
inFields
:
{
keyword
:
''
,
// hmId: null,
searchInfo
:
''
,
hmSelect
:
''
,
statusFlag
:
''
,
statusFlagInt
:
''
,
storeSearch
:
''
,
storeSelect
:
''
,
hmType
:
''
,
clerkSelect
:
''
,
createTimeStart
:
''
,
hmTypeInt
:
''
,
createTimeEnd
:
''
startTime
:
''
,
endTime
:
''
,
orderByField
:
'createTime desc'
,
hmGroupId
:
0
},
},
storeSe
arch
:
1
,
storeSe
lect
:
1
,
dateTime
:
[],
dateTime
:
[],
tableData
:
[],
tableData
:
[],
total
:
1
,
total
:
1
,
...
@@ -172,113 +185,7 @@ export default {
...
@@ -172,113 +185,7 @@ export default {
type
:
0
,
type
:
0
,
dataReady
:
false
dataReady
:
false
},
},
actCodeList
:
[
actCodeList
:
[],
{
hmId
:
1
,
hmType
:
1
,
statusFlag
:
1
,
useMember
:
[
{
name
:
'text'
},
{
name
:
'text'
}
]
},
{
hmId
:
123132132222222222222
,
hmType
:
1
,
statusFlag
:
2
,
useMember
:
[
{
name
:
'text'
},
{
name
:
'text'
}
]
},
{
hmId
:
12313213
,
statusFlag
:
3
,
useMember
:
[
{
name
:
'text'
},
{
name
:
'text'
}
]
},
{
hmId
:
12313213
,
hmType
:
1
,
statusFlag
:
1
,
useMember
:
[
{
name
:
'text'
},
{
name
:
'text'
}
]
},
{
hmId
:
12313213
,
statusFlag
:
2
,
useMember
:
[
{
name
:
'text'
},
{
name
:
'text'
},
{
name
:
'text'
},
{
name
:
'text'
}
]
},
{
hmId
:
12313213
,
statusFlag
:
2
,
useMember
:
[
{
name
:
'text'
},
{
name
:
'text'
},
{
name
:
'text'
},
{
name
:
'text'
}
]
},
{
hmId
:
12313213
,
statusFlag
:
2
,
useMember
:
[
{
name
:
'text'
},
{
name
:
'text'
},
{
name
:
'text'
},
{
name
:
'text'
}
]
}
],
loadingStatus
:
false
,
loadingStatus
:
false
,
pickerOptions
:
{
pickerOptions
:
{
disabledDate
:
time
=>
{
disabledDate
:
time
=>
{
...
@@ -291,29 +198,30 @@ export default {
...
@@ -291,29 +198,30 @@ export default {
text
:
'数据'
,
text
:
'数据'
,
visible
:
true
,
visible
:
true
,
handler
:
row
=>
{
handler
:
row
=>
{
this
.
$router
.
push
(
`/actCodeDetail?hmId=
${
row
.
hmId
}
`
);
this
.
$router
.
push
(
'/actCodeDetail?id='
+
row
.
hmId
);
}
}
},
},
{
{
text
:
'详情'
,
text
:
'详情'
,
visible
:
true
,
visible
:
true
,
handler
:
row
=>
{
handler
:
row
=>
{
this
.
$router
.
push
(
`/actCodeDetail?hmId=
${
row
.
hmId
}
`
);
this
.
$router
.
push
(
'/actCodeDetail?hmId='
+
row
.
hmId
);
}
}
},
},
{
{
text
:
'编辑'
,
text
:
'编辑'
,
visible
:
true
,
visible
:
true
,
handler
:
row
=>
{
handler
:
row
=>
{
console
.
log
(
row
,
77
);
this
.
$router
.
push
(
'/actCodeEdit?hmId='
+
row
.
hmId
);
this
.
$router
.
push
(
`/actCodeEdit?hmId=
${
row
.
hmId
}
`
);
}
}
},
},
{
{
text
:
'下载活码'
,
text
:
'下载活码'
,
visible
:
true
,
visible
:
true
,
handler
:
row
=>
{
handler
:
row
=>
{
console
.
log
(
row
);
this
.
wxQrcode
=
row
.
wxQrcode
;
this
.
imageName
=
`
${
row
.
hmId
}
_
${
row
.
name
}
`
;
this
.
show
=
true
;
}
}
},
},
{
{
...
@@ -325,22 +233,19 @@ export default {
...
@@ -325,22 +233,19 @@ export default {
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
deleteRequest
(
'/hm/qrcode/del'
,
{
hmId
:
row
.
hmId
}).
then
(
res
=>
{});
deleteRequest
(
'/haoban-manage3-web/hm/qrcode/del'
,
{
hmId
:
row
.
hmId
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
)
{
this
.
getTableList
();
}
console
.
log
(
res
,
'delrte'
);
});
});
});
}
}
}
}
],
],
selectLoading
:
false
,
selectLoading
:
false
,
memberOrShopList
:
[
memberList
:
[],
{
shopList
:
[],
value
:
1
,
label
:
'测试1'
},
{
value
:
2
,
label
:
'测试2'
}
],
// 分页参数
// 分页参数
pageParam
:
{
pageParam
:
{
pageSize
:
20
,
pageSize
:
20
,
...
@@ -352,7 +257,7 @@ export default {
...
@@ -352,7 +257,7 @@ export default {
selectHmIds
:
[],
selectHmIds
:
[],
dialogGroupFormVisible
:
false
,
dialogGroupFormVisible
:
false
,
formGroup
:
{
formGroup
:
{
group
List
:
[]
group
Id
:
[]
},
},
groupList
:
[],
groupList
:
[],
pageParamGroup
:
{
pageParamGroup
:
{
...
@@ -361,7 +266,17 @@ export default {
...
@@ -361,7 +266,17 @@ export default {
pageSize
:
20
,
pageSize
:
20
,
total
:
1
total
:
1
},
},
name
:
''
name
:
'1'
,
storeParam
:
{
searchParam
:
''
,
pageSize
:
20
,
currentPage
:
1
,
scenes
:
'integral'
,
creatorId
:
''
,
total
:
1
},
wxQrcode
:
''
,
show
:
false
};
};
},
},
created
()
{
created
()
{
...
@@ -371,25 +286,54 @@ export default {
...
@@ -371,25 +286,54 @@ export default {
this
.
getStore
();
this
.
getStore
();
},
},
methods
:
{
methods
:
{
// 获取导购列表数据
storeMemberSe
(
e
)
{
async
getStraff
()
{
if
(
e
==
1
)
{
await
postJsonRequest
(
`/api-plug/search-clerk?type=2`
,
{
name
:
this
.
name
});
this
.
inFields
.
clerkSelect
=
''
;
}
else
if
(
e
==
2
)
{
this
.
inFields
.
storeSelect
=
''
;
}
},
onLoadmoreStore
()
{
if
(
this
.
storeParam
.
currentPage
>=
this
.
storeParam
.
total
)
return
;
this
.
storeParam
.
currentPage
++
;
this
.
getStore
();
},
},
async
getStore
()
{
async
getStore
()
{
const
obj
=
{
await
postRequest
(
`/api/api-plug/query-store-by-code-name-new?requestProject=haoban-manage-web`
,
this
.
storeParam
).
then
(
res
=>
{
searchParam
:
''
,
if
(
res
.
data
.
errorCode
==
0
)
{
pageSize
:
20
,
this
.
storeParam
.
total
=
res
.
data
.
totalCount
;
currentPage
:
1
,
if
(
Array
.
isArray
(
res
.
data
.
result
.
result
))
{
scenes
:
'integral'
,
this
.
shopList
=
this
.
shopList
.
concat
(
res
.
data
.
result
.
result
);
creatorId
:
''
}
};
}
await
postJsonRequest
(
`/api-plug/query-store-by-code-name-new?requestProject=haoban-manage-web`
,
obj
);
});
},
// 门店远程搜索
remoteMethods
(
query
)
{
if
(
query
!==
''
)
{
this
.
storeParam
.
searchParam
=
query
;
this
.
storeParam
.
currentPage
=
1
;
this
.
shopList
=
[];
this
.
getStore
();
}
else
{
this
.
shopList
=
[];
}
},
},
// 获取导购列表数据
async
getStraff
()
{
await
postRequest
(
`/api/api-plug/search-clerk?type=2`
,
{
name
:
this
.
name
}).
then
(
res
=>
{
if
(
res
.
data
.
errorCode
==
0
)
{
this
.
memberList
=
res
.
data
.
result
||
[];
}
});
},
// 分组加载更多
onLoadmore
()
{
onLoadmore
()
{
if
(
this
.
pageParamGroup
.
pageNum
>=
this
.
pageParamGroup
.
total
)
return
;
if
(
this
.
pageParamGroup
.
pageNum
>=
this
.
pageParamGroup
.
total
)
return
;
this
.
pageParamGroup
.
pageNum
++
;
this
.
pageParamGroup
.
pageNum
++
;
this
.
searchGroup
();
this
.
searchGroup
();
},
},
// 分组列表
async
searchGroup
()
{
async
searchGroup
()
{
if
(
this
.
pageParamGroup
.
pageNum
==
1
)
{
if
(
this
.
pageParamGroup
.
pageNum
==
1
)
{
this
.
groupList
=
[];
this
.
groupList
=
[];
...
@@ -398,7 +342,6 @@ export default {
...
@@ -398,7 +342,6 @@ export default {
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
code
==
0
)
{
const
{
result
,
pages
}
=
res
.
data
.
result
||
{};
const
{
result
,
pages
}
=
res
.
data
.
result
||
{};
this
.
pageParamGroup
.
total
=
pages
;
this
.
pageParamGroup
.
total
=
pages
;
// console.log(this.groupList, 'list');
if
(
Array
.
isArray
(
result
))
{
if
(
Array
.
isArray
(
result
))
{
this
.
groupList
=
this
.
groupList
.
concat
(
result
);
this
.
groupList
=
this
.
groupList
.
concat
(
result
);
}
}
...
@@ -422,13 +365,12 @@ export default {
...
@@ -422,13 +365,12 @@ export default {
}
}
},
},
// 表格选中事件
// 表格选中事件
// selectTable(selection, row) {
handleSelectionChange
(
val
)
{
// console.log(selection);
this
.
multipleSelection
=
val
;
// this.selectHmIds = selection.map(item => {
this
.
selectHmIds
=
val
.
map
(
item
=>
{
// return item.hmId;
return
item
.
hmId
;
// });
});
// console.log(this.selectHmIds, 'iss');
},
// },
// 批量分组
// 批量分组
batchGoupEvent
()
{
batchGoupEvent
()
{
if
(
this
.
selectHmIds
.
length
==
0
)
{
if
(
this
.
selectHmIds
.
length
==
0
)
{
...
@@ -437,13 +379,16 @@ export default {
...
@@ -437,13 +379,16 @@ export default {
this
.
dialogGroupFormVisible
=
true
;
this
.
dialogGroupFormVisible
=
true
;
}
}
},
},
onCommand
()
{
async
batchOK
()
{
console
.
log
(
'hello'
);
const
obj
=
{
},
hmIds
:
this
.
selectHmIds
,
handleSelectionChange
(
val
)
{
groupId
:
this
.
formGroup
.
groupId
this
.
multipleSelection
=
val
;
};
this
.
selectHmIds
=
val
.
map
(
item
=>
{
await
postJsonRequest
(
'/haoban-manage3-web/hm/qrcode/update/qrcode/group'
,
obj
).
then
(
res
=>
{
return
item
.
hmId
;
if
(
res
.
data
.
code
==
0
)
{
this
.
dialogGroupFormVisible
=
false
;
this
.
$router
.
go
(
0
);
}
});
});
},
},
// 当前页变化
// 当前页变化
...
@@ -457,14 +402,11 @@ export default {
...
@@ -457,14 +402,11 @@ export default {
this
.
pageParam
.
pageSize
=
val
;
this
.
pageParam
.
pageSize
=
val
;
this
.
getTableList
();
this
.
getTableList
();
},
},
remoteMethods
(
query
)
{
console
.
log
(
query
);
},
// 排序
// 排序
sortChange
(
column
)
{
sortChange
(
column
)
{
const
that
=
this
;
this
.
sortColumn
=
column
.
prop
;
th
at
.
sortColumn
=
column
.
prop
;
th
is
.
sortType
=
column
.
order
==
'ascending'
?
'asc'
:
'desc'
;
th
at
.
sortType
=
column
.
order
==
'ascending'
?
'asc'
:
'desc'
;
th
is
.
inFields
.
orderByField
=
`
${
this
.
sortColumn
}
${
this
.
sortType
}
`
;
this
.
getTableList
();
this
.
getTableList
();
},
},
searchList
()
{
searchList
()
{
...
@@ -474,54 +416,43 @@ export default {
...
@@ -474,54 +416,43 @@ export default {
getTableList
()
{
getTableList
()
{
this
.
loadingStatus
=
true
;
this
.
loadingStatus
=
true
;
if
(
this
.
dateTime
&&
this
.
dateTime
.
length
)
{
if
(
this
.
dateTime
&&
this
.
dateTime
.
length
)
{
this
.
searchForm
.
createTimeStart
=
this
.
dateTime
?
Date
.
parse
(
new
Date
(
this
.
dateTime
[
0
]).
toString
())
:
''
;
this
.
inFields
.
startTime
=
this
.
dateTime
?
Date
.
parse
(
new
Date
(
this
.
dateTime
[
0
]).
toString
())
:
''
;
this
.
searchForm
.
createTimeEnd
=
this
.
dateTime
?
Date
.
parse
(
new
Date
(
this
.
dateTime
[
1
]).
toString
())
:
''
;
this
.
inFields
.
endTime
=
this
.
dateTime
?
Date
.
parse
(
new
Date
(
this
.
dateTime
[
1
]).
toString
())
:
''
;
}
}
this
.
searchForm
=
{
...
this
.
searchForm
};
if
(
this
.
currentGroupId
!=
null
)
{
if
(
this
.
currentGroupId
!=
null
)
{
this
.
searchForm
=
{
this
.
inFields
.
hmGroupId
=
Number
(
this
.
currentGroupId
);
...
this
.
searchForm
,
}
hmGroupId
:
this
.
currentGroupId
if
(
this
.
inFields
.
hmSelect
==
''
)
{
};
delete
this
.
inFields
.
hmSelect
;
}
if
(
this
.
inFields
.
storeSelect
==
''
)
{
delete
this
.
inFields
.
storeSelect
;
}
if
(
this
.
inFields
.
clerkSelect
==
''
)
{
delete
this
.
inFields
.
clerkSelect
;
}
if
(
this
.
inFields
.
startTime
==
''
)
{
delete
this
.
inFields
.
startTime
;
}
}
// delete this.searchForm.dateTime;
if
(
this
.
inFields
.
endTime
==
''
)
{
actCodeListApi
(
Object
.
assign
({},
this
.
searchForm
,
this
.
pageParam
))
delete
this
.
inFields
.
endTime
;
}
const
obj
=
{
inFields
:
this
.
inFields
,
...
this
.
pageParam
};
console
.
log
(
obj
,
'obj'
);
actCodeListApi
(
obj
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
totalCount
=
res
.
data
.
result
.
totalCount
||
0
;
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
result
.
result
.
length
&&
Array
.
isArray
(
res
.
data
.
result
.
result
))
{
this
.
tableData
=
res
.
data
.
result
.
data
||
[];
this
.
tableData
=
[].
concat
(
res
.
data
.
result
.
result
);
this
.
totalCount
=
res
.
data
.
result
.
page
.
totalCount
;
}
else
{
this
.
tableData
=
[];
}
}
})
})
.
finally
(
_
=>
{
.
finally
(
_
=>
{
this
.
loadingStatus
=
false
;
this
.
loadingStatus
=
false
;
});
});
}
}
// discardCode(id) {
// const that = this;
// that.loading = true;
// const aa = deleteRequest('/hm/qrcode/del', { hmId: id });
// return console.log(aa, 'aa');
// .then(res => {
// let resData = res.data;
// that.loading = false;
// if (resData.errorCode == 1) {
// that.getActCodeInfo();
// return;
// }
// errMsg.errorMsg(resData);
// })
// .cash(function(error) {
// that.$message.error({
// duration: 1000,
// message: error.message
// });
// });
// }
},
},
watch
:
{
watch
:
{
currentGroupId
:
{
currentGroupId
:
{
...
...
src/views/salesleads/actCodeManage/staffActCode/views/batchAddCode.vue
View file @
22ccf6c1
<
template
>
<
template
>
<div>
<div>
<setActCode
@
su
bm
it=
"onSubmit"
>
<setActCode
@
su
mb
it=
"onSubmit"
>
<template
#
typeCode
>
<template
#
typeCode
>
<el-form-item
label=
"活码类型"
:rules=
"[
{ required: true, message: '请选择活码类型', trigger: 'blur' }]">
<el-form-item
label=
"活码类型"
:rules=
"[
{ required: true, message: '请选择活码类型', trigger: 'blur' }]">
<el-radio-group
v-model=
"form.hmType"
>
<el-radio-group
v-model=
"form.hmType"
>
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
<
script
>
<
script
>
import
setActCode
from
'@/views/salesleads/components/actCodeSet.vue'
;
import
setActCode
from
'@/views/salesleads/components/actCodeSet.vue'
;
import
SelectClerk
from
'../../components/select-clerk/index.vue'
;
import
SelectClerk
from
'../../components/select-clerk/index.vue'
;
import
{
postJsonRequest
}
from
'@/api/api'
;
export
default
{
export
default
{
components
:
{
setActCode
,
SelectClerk
},
components
:
{
setActCode
,
SelectClerk
},
data
()
{
data
()
{
...
@@ -32,7 +33,8 @@ export default {
...
@@ -32,7 +33,8 @@ export default {
form
:
{
form
:
{
hmType
:
1
,
hmType
:
1
,
clerkIdList
:
[],
clerkIdList
:
[],
memberType
:
1
memberType
:
1
,
hmUserNum
:
null
},
},
data
:
[]
data
:
[]
};
};
...
@@ -41,13 +43,23 @@ export default {
...
@@ -41,13 +43,23 @@ export default {
onChange
(
data
)
{
onChange
(
data
)
{
this
.
data
=
data
;
this
.
data
=
data
;
this
.
form
.
clerkIdList
=
data
;
this
.
form
.
clerkIdList
=
data
;
this
.
form
.
hmUserNum
=
data
.
length
;
},
},
onSubmit
(
event
)
{
async
onSubmit
(
event
)
{
let
obj
=
{
let
obj
=
{
...
event
,
...
event
,
...
this
.
form
...
this
.
form
};
};
await
postJsonRequest
(
'/haoban-manage3-web/hm/qrcode/add'
,
obj
).
then
(
res
=>
{
console
.
log
(
res
);
});
console
.
log
(
obj
,
'父组件,整体表单数据'
);
console
.
log
(
obj
,
'父组件,整体表单数据'
);
// this.$refs.form.clearValidate();
this
.
form
=
{
hmType
:
1
,
clerkIdList
:
[],
hmUserNum
:
null
//多人活码人数
};
}
}
}
}
};
};
...
...
src/views/salesleads/actCodeManage/staffActCode/views/setActCode.vue
View file @
22ccf6c1
<
template
>
<
template
>
<div>
<div>
<setActCode
@
su
bm
it=
"onSubmit"
:actCodeData=
"detailCode"
>
<setActCode
@
su
mb
it=
"onSubmit"
:actCodeData=
"detailCode"
>
<template
#
typeCode
>
<template
#
typeCode
>
<el-form-item
label=
"活码类型"
:rules=
"[
{ required: true, message: '请选择活码类型', trigger: 'blur' }]">
<el-form-item
label=
"活码类型"
:rules=
"[
{ required: true, message: '请选择活码类型', trigger: 'blur' }]">
<el-radio-group
v-model=
"form.hmType"
@
change=
"changeEvent"
>
<el-radio-group
v-model=
"form.hmType"
@
change=
"changeEvent"
>
...
@@ -18,18 +18,16 @@
...
@@ -18,18 +18,16 @@
<el-form-item
label=
"使用成员"
:rules=
"[
{ required: true, message: '请选择使用成员', trigger: 'blur' }]">
<el-form-item
label=
"使用成员"
:rules=
"[
{ required: true, message: '请选择使用成员', trigger: 'blur' }]">
<p
class=
"tabs"
v-if=
"form.hmType == 1"
>
单人活码仅可选择一名成员
</p>
<p
class=
"tabs"
v-if=
"form.hmType == 1"
>
单人活码仅可选择一名成员
</p>
<p
class=
"tabs"
v-if=
"form.hmType == 2"
>
若选择多名成员,则随机分配企微员工
</p>
<p
class=
"tabs"
v-if=
"form.hmType == 2"
>
若选择多名成员,则随机分配企微员工
</p>
<!--
<el-button
plain
class=
"ylbtn"
><i
class=
"iconfont-components3 icon-cp-PlusOutlined addPic"
></i>
添加成员
</el-button>
-->
<select-clerk
:multiple=
"multiple"
:data=
"data"
@
change=
"onChange"
></select-clerk>
<select-clerk
:multiple=
"multiple"
:data=
"data"
@
change=
"onChange"
></select-clerk>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
</setActCode>
</setActCode>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
setActCode
from
'@/views/salesleads/components/actCodeSet.vue'
;
import
setActCode
from
'@/views/salesleads/components/actCodeSet.vue'
;
import
SelectClerk
from
'../../components/select-clerk/index.vue'
;
import
SelectClerk
from
'../../components/select-clerk/index.vue'
;
import
{
getRequest
,
postRequest
}
from
'@/api/api'
;
import
{
getRequest
,
post
Json
Request
}
from
'@/api/api'
;
export
default
{
export
default
{
components
:
{
setActCode
,
SelectClerk
},
components
:
{
setActCode
,
SelectClerk
},
data
()
{
data
()
{
...
@@ -63,6 +61,7 @@ export default {
...
@@ -63,6 +61,7 @@ export default {
}
}
},
},
onChange
(
data
)
{
onChange
(
data
)
{
console
.
log
(
data
,
'data'
);
this
.
data
=
data
;
this
.
data
=
data
;
this
.
form
.
clerkIdList
=
data
.
map
(
item
=>
{
this
.
form
.
clerkIdList
=
data
.
map
(
item
=>
{
return
item
.
clerkId
;
return
item
.
clerkId
;
...
@@ -76,15 +75,16 @@ export default {
...
@@ -76,15 +75,16 @@ export default {
},
},
async
getActCodeInfo
()
{
async
getActCodeInfo
()
{
const
that
=
this
;
const
that
=
this
;
if
(
this
.
$route
.
query
.
hmId
)
return
;
that
.
loading
=
true
;
that
.
loading
=
true
;
await
getRequest
(
'/hm/qrcode/detail'
,
{
hmId
:
this
.
$route
.
query
.
hmId
}).
then
(
res
=>
{
if
(
this
.
$route
.
query
.
hmId
)
{
this
.
detailCode
=
res
.
data
;
await
getRequest
(
'/hm/qrcode/detail'
,
{
hmId
:
this
.
$route
.
query
.
hmId
}).
then
(
res
=>
{
console
.
log
(
this
.
detailCode
,
'detailcode'
);
this
.
detailCode
=
res
.
data
;
that
.
loading
=
false
;
console
.
log
(
this
.
detailCode
,
'detailcode'
);
});
that
.
loading
=
false
;
});
}
},
},
onSubmit
(
event
)
{
async
onSubmit
(
event
)
{
let
obj
=
{
let
obj
=
{
...
event
,
...
event
,
...
this
.
form
...
this
.
form
...
@@ -96,18 +96,29 @@ export default {
...
@@ -96,18 +96,29 @@ export default {
hm_id
:
this
.
detailCode
.
hmId
hm_id
:
this
.
detailCode
.
hmId
};
};
// 编辑
// 编辑
postRequest
(
'/hm/qrcode/update'
,
obj
);
await
postJsonRequest
(
'/haoban-manage3-web/hm/qrcode/update'
,
obj
).
then
(
res
=>
{
console
.
log
(
res
,
'编辑'
);
if
(
res
.
data
.
code
==
0
)
{
// this.$router.go(-1);
}
});
}
else
{
}
else
{
// 新增
// 新增
postRequest
(
'/hm/qrcode/add'
,
obj
);
await
postJsonRequest
(
'/haoban-manage3-web/hm/qrcode/add'
,
obj
).
then
(
res
=>
{
console
.
log
(
res
,
'新增'
);
if
(
res
.
data
.
code
==
0
)
{
// this.$router.go(-1);
}
});
}
}
this
.
$refs
.
form
.
clearValidate
();
//
this.$refs.form.clearValidate();
this
.
form
=
{
this
.
form
=
{
hmType
:
1
,
hmType
:
1
,
name
:
''
,
name
:
''
,
clerkIdList
:
[],
clerkIdList
:
[],
hmUserNum
:
null
//多人活码人数
hmUserNum
:
null
//多人活码人数
};
};
// this.$router.go(-1);
}
}
}
}
};
};
...
...
src/views/salesleads/components/ActCodeSet.vue
View file @
22ccf6c1
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"活码标签"
>
<el-form-item
label=
"活码标签"
>
<el-button
plain
class=
"ylbtn"
@
click=
"tagsDialogVisible = true"
><i
class=
"iconfont-components3 icon-cp-PlusOutlined addPic"
></i>
添加标签
</el-button>
<el-button
plain
class=
"ylbtn"
@
click=
"tagsDialogVisible = true"
><i
class=
"iconfont-components3 icon-cp-PlusOutlined addPic"
></i>
添加标签
</el-button>
<
!--
<dm-memberTag-group
:visiable
.
sync=
"tagsDialogVisible"
@
save=
"saveTagPop"
></dm-memberTag-group>
--
>
<
dm-memberTag-group
:visiable
.
sync=
"tagsDialogVisible"
projectName=
"haobao-3"
@
save=
"saveTagPop"
></dm-memberTag-group
>
</el-form-item>
</el-form-item>
<dm-sub-title
text=
"欢迎语设置"
type=
"line"
class=
"mt40b20"
/>
<dm-sub-title
text=
"欢迎语设置"
type=
"line"
class=
"mt40b20"
/>
<welcomeItem
@
getWelcomeId=
"getWelcomeId"
></welcomeItem>
<welcomeItem
@
getWelcomeId=
"getWelcomeId"
></welcomeItem>
...
@@ -62,9 +62,9 @@ export default {
...
@@ -62,9 +62,9 @@ export default {
hmGroupId
:
null
,
//活码分组id
hmGroupId
:
null
,
//活码分组id
passFlag
:
1
,
// 1自动通过 0否
passFlag
:
1
,
// 1自动通过 0否
memberLabelId
:
''
,
//会员活动标签id
memberLabelId
:
''
,
//会员活动标签id
welcomeId
:
null
,
// 欢迎语id
welcomeId
:
null
// 欢迎语id
// clerkIdList: '', // 选择导购id
// clerkIdList: '', // 选择导购id
storeId
:
''
//门店id
//
storeId: '' //门店id
// hmUserNum: null //多人活码人数
// hmUserNum: null //多人活码人数
},
},
rules
:
{
rules
:
{
...
@@ -75,9 +75,10 @@ export default {
...
@@ -75,9 +75,10 @@ export default {
pageParam
:
{
pageParam
:
{
groupName
:
''
,
groupName
:
''
,
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
20
,
pageSize
:
20
total
:
1
},
},
total
:
1
,
groupList
:
[],
groupList
:
[],
data
:
''
data
:
''
};
};
...
@@ -91,7 +92,7 @@ export default {
...
@@ -91,7 +92,7 @@ export default {
this
.
data
=
data
;
this
.
data
=
data
;
},
},
onLoadmore
()
{
onLoadmore
()
{
if
(
this
.
pageParam
.
pageNum
>=
this
.
pageParam
.
total
)
return
;
if
(
this
.
pageParam
.
pageNum
>=
this
.
total
)
return
;
this
.
pageParam
.
pageNum
++
;
this
.
pageParam
.
pageNum
++
;
this
.
searchGroup
();
this
.
searchGroup
();
},
},
...
@@ -102,14 +103,12 @@ export default {
...
@@ -102,14 +103,12 @@ export default {
await
getRequest
(
'/haoban-manage3-web/hm/group/list'
,
this
.
pageParam
).
then
(
res
=>
{
await
getRequest
(
'/haoban-manage3-web/hm/group/list'
,
this
.
pageParam
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
code
==
0
)
{
const
{
result
,
pages
}
=
res
.
data
.
result
||
{};
const
{
result
,
pages
}
=
res
.
data
.
result
||
{};
this
.
pageParam
.
total
=
pages
||
1
;
this
.
total
=
pages
||
1
;
// console.log(this.groupList, 'list');
if
(
this
.
pageParam
.
groupName
!=
''
)
{
if
(
this
.
pageParam
.
groupName
!=
''
)
{
this
.
groupList
=
result
;
this
.
groupList
=
result
;
}
else
if
(
Array
.
isArray
(
result
))
{
}
else
if
(
Array
.
isArray
(
result
))
{
this
.
groupList
=
this
.
groupList
.
concat
(
result
);
this
.
groupList
=
this
.
groupList
.
concat
(
result
);
}
}
// console.log(this.groupList, 909090);
}
}
});
});
},
},
...
@@ -137,6 +136,7 @@ export default {
...
@@ -137,6 +136,7 @@ export default {
this
.
$refs
.
form
.
validate
(
async
valid
=>
{
this
.
$refs
.
form
.
validate
(
async
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
console
.
log
(
this
.
form
,
'子组件'
);
console
.
log
(
this
.
form
,
'子组件'
);
this
.
form
.
passFlag
=
this
.
form
.
passFlag
?
1
:
0
;
this
.
$emit
(
'sumbit'
,
this
.
form
);
this
.
$emit
(
'sumbit'
,
this
.
form
);
}
}
});
});
...
...
src/views/salesleads/components/dataDetail.vue
View file @
22ccf6c1
...
@@ -2,15 +2,15 @@
...
@@ -2,15 +2,15 @@
<div>
<div>
<el-row>
<el-row>
<div
class=
"leftBox"
>
<div
class=
"leftBox"
>
<el-input
class=
"w260 mr10"
placeholder=
"请输入门店名称/code"
v-model=
"pageParam.storeSe
arch
"
prefix-icon=
"el-icon-search"
></el-input>
<el-input
class=
"w260 mr10"
placeholder=
"请输入门店名称/code"
v-model=
"pageParam.storeSe
lect
"
prefix-icon=
"el-icon-search"
></el-input>
<el-input
class=
"w260 mr10"
placeholder=
"请输入导购名称/code"
v-model=
"pageParam.clerkSe
arch
"
prefix-icon=
"el-icon-search"
></el-input>
<el-input
class=
"w260 mr10"
placeholder=
"请输入导购名称/code"
v-model=
"pageParam.clerkSe
lect
"
prefix-icon=
"el-icon-search"
></el-input>
</div>
</div>
<div
class=
"rightBox"
>
<div
class=
"rightBox"
>
<ul
class=
"datebox"
v-for=
"(lis, index) in dateLis"
:key=
"lis.key"
>
<ul
class=
"datebox"
v-for=
"(lis, index) in dateLis"
:key=
"lis.key"
>
<li
:class=
"active == index ? 'activeClass' : 'noActive'"
class=
"dateLisBox"
@
click=
"btnChange(index)"
>
{{
lis
.
value
}}
</li>
<li
:class=
"active == index ? 'activeClass' : 'noActive'"
class=
"dateLisBox"
@
click=
"btnChange(index)"
>
{{
lis
.
value
}}
</li>
</ul>
</ul>
<el-date-picker
class=
"w256"
v-model=
"dateDefault"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"创建开始日期"
end-placeholder=
"创建结束日期"
:default-time=
"['00:00:00', '23:59:59']"
:picker-options=
"pickerOptions()"
@
change=
"onDateChange"
>
</el-date-picker>
<el-date-picker
class=
"w256"
v-model=
"dateDefault"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"创建开始日期"
end-placeholder=
"创建结束日期"
:default-time=
"['00:00:00', '23:59:59']"
value-format=
"yyyy-MM-dd"
:picker-options=
"pickerOptions()"
@
change=
"onDateChange"
>
</el-date-picker>
</div>
</div>
</el-row>
</el-row>
<el-table
class=
"mt18"
:data=
"tableData"
@
sort-change=
"sortChange"
>
<el-table
class=
"mt18"
:data=
"tableData"
@
sort-change=
"sortChange"
>
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<dm-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"pageParam.pageN
um
"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"pageParam.pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"totalCount"
>
</dm-pagination>
<dm-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"pageParam.pageN
o
"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"pageParam.pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"totalCount"
>
</dm-pagination>
</div>
</div>
</template>
</template>
...
@@ -76,15 +76,17 @@ export default {
...
@@ -76,15 +76,17 @@ export default {
],
],
tableData
:
[],
tableData
:
[],
pageParam
:
{
pageParam
:
{
hmId
:
''
,
inFields
:
{
linkId
:
''
,
hmId
:
''
,
startTime
:
''
,
linkId
:
''
,
endTime
:
''
,
startTime
:
''
,
storeSearch
:
''
,
endTime
:
''
,
clerkSearch
:
''
,
storeSelect
:
''
,
pageNum
:
1
,
clerkSelect
:
''
,
pageSize
:
20
,
orderByField
:
'addNumT desc'
orderByField
:
''
},
pageNo
:
1
,
pageSize
:
20
},
},
dateDefault
:
[],
dateDefault
:
[],
totalCount
:
0
,
totalCount
:
0
,
...
@@ -109,7 +111,6 @@ export default {
...
@@ -109,7 +111,6 @@ export default {
start
=
start
>
start2
?
start
:
start2
;
start
=
start
>
start2
?
start
:
start2
;
end2
=
end2
.
setMonth
(
end2
.
getMonth
()
+
6
);
end2
=
end2
.
setMonth
(
end2
.
getMonth
()
+
6
);
end
=
end
.
getTime
()
>
end2
?
end2
:
end
.
getTime
();
end
=
end
.
getTime
()
>
end2
?
end2
:
end
.
getTime
();
// console.log('end2', end2, end);
}
else
{
}
else
{
start
=
start
.
setFullYear
(
start
.
getFullYear
()
-
2
);
start
=
start
.
setFullYear
(
start
.
getFullYear
()
-
2
);
end
=
end
.
getTime
();
end
=
end
.
getTime
();
...
@@ -121,9 +122,9 @@ export default {
...
@@ -121,9 +122,9 @@ export default {
};
};
},
},
created
()
{
created
()
{
this
.
getTableList
();
// 默认显示近七天
// 默认显示近七天
this
.
btnChange
(
0
);
this
.
btnChange
(
0
);
this
.
getTableList
();
},
},
methods
:
{
methods
:
{
getDateRange
(
setEndDate
)
{
getDateRange
(
setEndDate
)
{
...
@@ -180,39 +181,47 @@ export default {
...
@@ -180,39 +181,47 @@ export default {
const
[
start
,
end
]
=
this
.
getDateRange
(
setDate
);
const
[
start
,
end
]
=
this
.
getDateRange
(
setDate
);
this
.
dateDefault
.
push
(
end
);
this
.
dateDefault
.
push
(
end
);
this
.
dateDefault
.
push
(
start
);
this
.
dateDefault
.
push
(
start
);
this
.
getTableList
();
},
},
onDateChange
()
{
onDateChange
()
{
this
.
active
=
-
1
;
this
.
active
=
-
1
;
if
(
this
.
dateDefault
.
length
)
this
.
getTableList
();
},
},
// 当前页变化
// 当前页变化
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
this
.
pageParam
.
pageN
um
=
val
;
this
.
pageParam
.
pageN
o
=
val
;
sessionStorage
.
setItem
(
'pageN
um
'
,
val
);
sessionStorage
.
setItem
(
'pageN
o
'
,
val
);
},
},
// 页码
// 页码
handleSizeChange
(
val
)
{
handleSizeChange
(
val
)
{
this
.
pageParam
.
pageN
um
=
1
;
this
.
pageParam
.
pageN
o
=
1
;
this
.
pageParam
.
pageSize
=
val
;
this
.
pageParam
.
pageSize
=
val
;
this
.
getTableList
();
this
.
getTableList
();
},
},
// 排序
// 排序
sortChange
(
column
,
prop
,
order
)
{
sortChange
(
column
)
{
const
that
=
this
;
const
that
=
this
;
that
.
sortColumn
=
column
.
prop
erty
;
that
.
sortColumn
=
column
.
prop
;
that
.
sortType
=
column
.
order
==
'ascending'
?
'asc'
:
'desc'
;
that
.
sortType
=
column
.
order
==
'ascending'
?
'asc'
:
'desc'
;
th
at
.
pageParam
.
orderByField
=
[
that
.
sortColumn
,
that
.
sortType
]
;
th
is
.
pageParam
.
inFields
.
orderByField
=
`
${
that
.
sortColumn
}
${
that
.
sortType
}
`
;
that
.
getTableList
();
that
.
getTableList
();
},
},
// 列表数据
// 列表数据
async
getTableList
()
{
async
getTableList
()
{
this
.
pageParam
.
startTime
=
this
.
dateDefault
?
Date
.
parse
(
new
Date
(
this
.
dateDefault
[
0
]).
toString
()
)
:
''
;
this
.
pageParam
.
inFields
.
startTime
=
this
.
dateDefault
?
this
.
dateDefault
[
0
].
toString
(
)
:
''
;
this
.
pageParam
.
endTime
=
this
.
dateDefault
?
Date
.
parse
(
new
Date
(
this
.
dateDefault
[
1
]).
toString
()
)
:
''
;
this
.
pageParam
.
inFields
.
endTime
=
this
.
dateDefault
?
this
.
dateDefault
[
1
].
toString
(
)
:
''
;
if
(
this
.
$route
.
query
.
id
&&
this
.
typeT
==
'code'
)
{
if
(
this
.
$route
.
query
.
id
&&
this
.
typeT
==
'code'
)
{
this
.
pageParam
.
hmId
=
this
.
$route
.
query
.
id
;
this
.
pageParam
.
inFields
.
hmId
=
Number
(
this
.
$route
.
query
.
id
)
;
delete
this
.
pageParam
.
linkId
;
delete
this
.
pageParam
.
inFields
.
linkId
;
}
else
if
(
this
.
$route
.
query
.
id
&&
this
.
typeT
==
'link'
)
{
}
else
if
(
this
.
$route
.
query
.
id
&&
this
.
typeT
==
'link'
)
{
this
.
pageParam
.
linkId
=
this
.
$route
.
query
.
id
;
this
.
pageParam
.
inFields
.
linkId
=
Number
(
this
.
$route
.
query
.
id
);
delete
this
.
pageParam
.
hmId
;
delete
this
.
pageParam
.
inFields
.
hmId
;
}
if
(
this
.
pageParam
.
inFields
.
storeSelect
==
''
)
{
delete
this
.
pageParam
.
inFields
.
storeSelect
;
}
if
(
this
.
pageParam
.
inFields
.
clerkSelect
==
''
)
{
delete
this
.
pageParam
.
inFields
.
clerkSelect
;
}
}
await
detailClerkList
(
this
.
pageParam
).
then
(
res
=>
{
await
detailClerkList
(
this
.
pageParam
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
...
...
src/views/salesleads/components/welcomesItem.vue
View file @
22ccf6c1
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div>
<div>
<el-row>
<el-row>
<el-col
:span=
"17"
>
<el-col
:span=
"17"
>
<el-form-item
label=
"活码类型"
>
<el-form-item
label=
"活码类型"
@
change=
"radioChange"
>
<el-radio-group
v-model=
"welcomesType"
>
<el-radio-group
v-model=
"welcomesType"
>
<el-radio
:label=
"1"
>
活码欢迎语
</el-radio>
<el-radio
:label=
"1"
>
活码欢迎语
</el-radio>
<el-radio
:label=
"2"
>
不发送欢迎语
</el-radio>
<el-radio
:label=
"2"
>
不发送欢迎语
</el-radio>
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<el-input
class=
"w260"
placeholder=
"请输入标题"
v-model=
"welcomePage.search"
></el-input>
<el-input
class=
"w260"
placeholder=
"请输入标题"
v-model=
"welcomePage.search"
></el-input>
<el-button
plain
class=
"ylbtn"
@
click=
"changeRoute"
>
新建欢迎语
</el-button>
<el-button
plain
class=
"ylbtn"
@
click=
"changeRoute"
>
新建欢迎语
</el-button>
</div>
</div>
<el-table
:data=
"welcomeTableData"
>
<el-table
:data=
"welcomeTableData"
height=
"330px"
>
<el-table-column
width=
"55"
>
<el-table-column
width=
"55"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-radio
:label=
"scope.$index"
@
change
.
native=
"getCurrentRow(scope.row)"
v-model=
"welcome"
>
</el-radio>
<el-radio
:label=
"scope.$index"
@
change
.
native=
"getCurrentRow(scope.row)"
v-model=
"welcome"
>
</el-radio>
...
@@ -72,7 +72,7 @@ export default {
...
@@ -72,7 +72,7 @@ export default {
welcomePage
:
{
welcomePage
:
{
wxEnterpriseId
:
sessionStorage
.
getItem
(
'userInfos'
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)).
wxEnterpriseId
:
''
,
wxEnterpriseId
:
sessionStorage
.
getItem
(
'userInfos'
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)).
wxEnterpriseId
:
''
,
title
:
''
,
title
:
''
,
type
:
2
,
type
:
1
,
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
4
pageSize
:
4
},
},
...
@@ -88,6 +88,7 @@ export default {
...
@@ -88,6 +88,7 @@ export default {
// 当前页变化
// 当前页变化
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
this
.
welcomePage
.
pageNum
=
val
;
this
.
welcomePage
.
pageNum
=
val
;
this
.
welcome
=
''
;
this
.
getWelcomeTable
();
this
.
getWelcomeTable
();
},
},
// 选择欢迎语列表数据
// 选择欢迎语列表数据
...
@@ -99,14 +100,23 @@ export default {
...
@@ -99,14 +100,23 @@ export default {
},
},
// 新建欢迎语
// 新建欢迎语
changeRoute
()
{
changeRoute
()
{
this
.
$router
.
push
({
path
:
'/salutatorySet'
});
// this.$router.push({ path: '/salutatorySet' });
let
routeUrl
=
this
.
$router
.
resolve
({
path
:
'/salutatorySet'
,
query
:
{
type
:
1
}
});
window
.
open
(
routeUrl
.
href
,
'_blank'
);
},
},
getCurrentRow
(
row
)
{
getCurrentRow
(
row
)
{
// 获取选中数据 row表示选中这一行的数据,可以从里面提取所需要的值
// 获取选中数据 row表示选中这一行的数据,可以从里面提取所需要的值
this
.
templateSelection
=
row
;
this
.
templateSelection
=
row
;
this
.
welcomeContent
=
row
.
welcomeContent
;
this
.
welcomeContent
=
row
.
welcomeContent
;
this
.
welcomeId
=
row
.
welcomeId
;
this
.
welcomeId
=
row
.
welcomeId
;
this
.
$emit
(
'getWelcomeId'
,
row
.
welcomeId
);
this
.
$emit
(
'getWelcomeId'
,
this
.
welcomeId
);
},
// 单选框点击事件
radioChange
(
e
)
{
if
(
e
==
1
)
{
this
.
welcomeId
=
''
;
this
.
$emit
(
'getWelcomeId'
,
this
.
welcomeId
);
}
}
}
}
}
};
};
...
...
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