Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-4
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-4
Commits
fc22c4ff
Commit
fc22c4ff
authored
Sep 04, 2020
by
无尘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改场景人群
parent
c93839ca
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
82 additions
and
28 deletions
+82
-28
my-customer-app.js
src/api/my-customer-app.js
+8
-1
sync-crowd-dialog.vue
src/components/app/my-customer/sync-crowd-dialog.vue
+10
-6
crowd-scene.vue
src/views/apps/customer-app/crowd-scene.vue
+55
-14
data-dimension.vue
src/views/apps/customer-app/data-dimension.vue
+9
-7
No files found.
src/api/my-customer-app.js
View file @
fc22c4ff
...
...
@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-27 09:29:13
* @LastEditors: 无尘
* @LastEditTime: 2020-09-04 1
0:38:35
* @LastEditTime: 2020-09-04 1
5:34:02
*/
import
getFetch
from
'./get-fetch.js'
;
...
...
@@ -74,6 +74,13 @@ let api = {
useFormData
:
true
,
useIntercept
:
false
},
delCrowd
:
{
// 删除
url
:
'/member-group-del'
,
method
:
'post'
,
useFormData
:
true
,
useIntercept
:
false
},
getVisiable
:
'/member-group-range-view'
,
// 获取可见范围详情
saveVisiable
:
{
// 保存人群场景可见范围
...
...
src/components/app/my-customer/sync-crowd-dialog.vue
View file @
fc22c4ff
...
...
@@ -4,10 +4,10 @@
* @Author: 无尘
* @Date: 2020-08-28 10:31:09
* @LastEditors: 无尘
* @LastEditTime: 2020-09-04 1
0:35:44
* @LastEditTime: 2020-09-04 1
6:00:39
-->
<!--
<sync-crowd-dialog :brand-id="brandId" @refreshData="refreshData"></sync-crowd-dialog>
<sync-crowd-dialog :brand-id="brandId"
:total-num="totalNum"
@refreshData="refreshData"></sync-crowd-dialog>
import syncCrowdDialog from '@/components/app/my-customer/sync-crowd-dialog.vue';
-->
<
template
>
...
...
@@ -46,12 +46,12 @@
</el-table-column>
</el-table>
<div
v-if=
"tableData.length"
class=
"block common-wrap__page text-right m-t-24"
>
<dm-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-size
s=
"[20, 40, 60, 80]"
:page-size=
"pageSize"
layout=
"total, sizes, prev, pager, next, jumper
"
:total=
"total"
>
</dm-pagination>
<dm-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-size
=
"pageSize"
layout=
"prev, pager, next
"
:total=
"total"
>
</dm-pagination>
</div>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取消
</el-button>
<el-button
type=
"primary"
:loading=
"loadingBtn"
@
click=
"submitForm"
>
立即同步
</el-button>
<el-button
type=
"primary"
:loading=
"loadingBtn"
@
click=
"submitForm"
>
立即同步
({{multipleSelection.length}}/{{20 - that.totalNum}})
</el-button>
</div>
</el-dialog>
</template>
...
...
@@ -70,6 +70,10 @@ export default {
brandId
:
{
type
:
String
,
default
:
''
},
totalNum
:
{
type
:
[
String
,
Number
],
default
:
'0'
}
},
data
()
{
...
...
@@ -109,8 +113,8 @@ export default {
showMsg
.
showmsg
(
'请选择场景人群'
,
'warning'
);
return
false
;
}
if
(
that
.
multipleSelection
.
length
>
20
)
{
showMsg
.
showmsg
(
'最多可同步20个场景人群'
,
'warning'
);
if
(
that
.
multipleSelection
.
length
>
(
20
-
that
.
totalNum
)
)
{
showMsg
.
showmsg
(
`最多可同步
${
20
-
that
.
totalNum
}
个场景人群`
,
'warning'
);
return
false
;
}
that
.
loadingBtn
=
true
;
...
...
src/views/apps/customer-app/crowd-scene.vue
View file @
fc22c4ff
...
...
@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-27 10:16:37
* @LastEditors: 无尘
* @LastEditTime: 2020-09-04 1
4:58:27
* @LastEditTime: 2020-09-04 1
5:44:48
-->
<
template
>
...
...
@@ -19,7 +19,7 @@
<el-option
v-for=
"item in classifyList"
:key=
"item.sceneCrowdCategoryId"
:label=
"item.sceneCrowdCategoryName"
:value=
"item.sceneCrowdCategoryId"
>
</el-option>
</el-select>
</div>
<div><el-button
type=
"primary"
@
click=
"toSync"
>
同步场景人群
</el-button></div>
<div><el-button
:disabled=
"totalNum >= 20"
type=
"primary"
@
click=
"toSync"
>
同步场景人群
</el-button></div>
</div>
<div
class=
"crowd-scene-table"
>
<div
class=
"crowd-scene-table_left"
>
...
...
@@ -58,12 +58,13 @@
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"toEdit(scope.$index, scope.row)"
>
编辑可见范围
</el-button>
<el-button
type=
"text"
@
click=
"toDel(scope.$index, scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
<sync-crowd-dialog
v-if=
"showSync"
:brand-id=
"brandId"
@
refreshData=
"refreshData"
></sync-crowd-dialog>
<sync-crowd-dialog
v-if=
"showSync"
:
total-num=
"totalNum"
:
brand-id=
"brandId"
@
refreshData=
"refreshData"
></sync-crowd-dialog>
<edit-visiable
v-if=
"showSelectStore"
:brand-id=
"brandId"
:set-item-id=
"setItemId"
:set-type=
"'crowd'"
:select-mode=
"selectMode"
:range-data=
"rangeData"
@
refreshData=
"refreshData"
></edit-visiable>
</div>
</template>
...
...
@@ -73,7 +74,7 @@ import commonAlertTip from '@/components/common/common-alert-tip.vue';
import
syncCrowdDialog
from
'@/components/app/my-customer/sync-crowd-dialog.vue'
;
import
editVisiable
from
'@/components/app/my-customer/edit-visiable.vue'
;
import
fetch
from
'@/api/my-customer-app.js'
;
const
{
getGroupData
,
getClassifyData
,
getVisiable
,
postSortGroup
}
=
fetch
;
const
{
getGroupData
,
getClassifyData
,
getVisiable
,
postSortGroup
,
delCrowd
}
=
fetch
;
import
{
_debounce
}
from
'@/common/js/public.js'
;
import
showMsg
from
'@/common/js/showmsg.js'
;
import
Sortable
from
'sortablejs'
;
...
...
@@ -95,16 +96,17 @@ export default {
wxEnterpriseId
:
localStorage
.
getItem
(
'haoBanUser'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'haoBanUser'
)).
wxEnterpriseId
:
''
,
tipContent
:
'GIC设置场景人群后,好办顾客人群列表最多同步20个人群,次日刷新,每日刷新一次;'
,
tipTwoContent
:
'GIC中设置的场景人群到期后,好办移动端将不再展示该条人群;'
,
searchVal
:
''
,
classifyId
:
''
,
classifyList
:
[],
memberCrowdData
:
[],
// 人群
loading
:
false
,
showSync
:
false
,
showSelectStore
:
false
,
selectMode
:
''
,
rangeData
:
[],
setItemId
:
''
searchVal
:
''
,
// 搜索
classifyId
:
''
,
// 选择分类
classifyList
:
[],
// 分类列表
memberCrowdData
:
[],
// 场景人群列表
totalNum
:
0
,
// 获取的列表总数
loading
:
false
,
// 列表加载
showSync
:
false
,
// 同步弹窗显示
showSelectStore
:
false
,
// 可见范围显示
selectMode
:
''
,
// 选择类型 0:所有; 1:分组; 2:门店
rangeData
:
[],
// 选择的分组或门店
setItemId
:
''
// 选中的场景 id
};
},
// 生命周期 - 挂载完成(访问DOM元素)
...
...
@@ -119,6 +121,40 @@ export default {
// methods
methods
:
{
/**
* @description: 删除标签
* @param {Number} index
* @param {Object} row
*/
toDel
(
index
,
row
)
{
const
that
=
this
;
that
.
$confirm
(
'是否要删除该场景人群?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
that
.
delData
(
row
.
sceneCrowdId
);
})
.
catch
(()
=>
{});
},
delData
(
sceneCrowdId
)
{
const
that
=
this
;
const
para
=
{
sceneCrowdId
};
delCrowd
(
para
)
.
then
(
res
=>
{
that
.
getGroupList
();
if
(
res
.
code
==
'0000'
)
{
showMsg
.
showmsg
(
'删除成功'
,
'success'
);
}
else
{
showMsg
.
showmsg
(
res
.
message
||
'接口异常'
,
'warning'
);
}
})
.
catch
(
function
(
error
)
{
});
},
/**
* @description: 刷新数据
* @param {String} res
* @returns {Boolean}
...
...
@@ -128,6 +164,8 @@ export default {
const
that
=
this
;
that
.
showSync
=
false
;
that
.
showSelectStore
=
false
;
that
.
searchVal
=
''
;
that
.
classifyId
=
''
;
that
.
selectMode
=
''
;
that
.
rangeData
=
[];
if
(
res
==
'close'
)
{
...
...
@@ -260,6 +298,9 @@ export default {
.
then
(
res
=>
{
that
.
loading
=
false
;
that
.
memberCrowdData
=
res
.
result
||
[];
if
(
!
that
.
searchVal
&&
!
that
.
classifyId
&&
!!
res
.
result
&&
!!
res
.
result
.
length
)
{
that
.
totalNum
=
res
.
result
.
length
;
}
})
.
catch
(
function
(
error
)
{
that
.
loading
=
false
;
...
...
src/views/apps/customer-app/data-dimension.vue
View file @
fc22c4ff
...
...
@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-27 11:36:51
* @LastEditors: 无尘
* @LastEditTime: 2020-09-04 1
0:08:10
* @LastEditTime: 2020-09-04 1
5:27:32
-->
<
template
>
...
...
@@ -26,7 +26,7 @@
<el-table
ref=
"memberCardData"
:data=
"memberCardData"
row-key=
"
memberCardI
d"
row-key=
"
i
d"
v-loading=
"loadingMember"
style=
"width: 100%"
>
<el-table-column
prop=
""
label=
""
width=
"56"
class-name=
"move-row-cell show-icon"
>
...
...
@@ -35,9 +35,10 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"
name
"
prop=
""
label=
"会员卡名称"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
name
||
'--'
}}
</
template
>
</el-table-column>
</el-table>
</div>
...
...
@@ -53,7 +54,7 @@
<el-table
ref=
"serviceNumData"
:data=
"serviceNumData"
row-key=
"
serviceCardI
d"
row-key=
"
i
d"
v-loading=
"loadingService"
style=
"width: 100%"
>
<el-table-column
prop=
""
label=
""
width=
"56"
class-name=
"move-row-cell show-icon"
>
...
...
@@ -62,9 +63,10 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"
name
"
prop=
""
label=
"服务号名称"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
name
||
'--'
}}
</
template
>
</el-table-column>
</el-table>
</div>
...
...
@@ -95,8 +97,8 @@ export default {
return
{
wxEnterpriseId
:
localStorage
.
getItem
(
'haoBanUser'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'haoBanUser'
)).
wxEnterpriseId
:
''
,
tipContent
:
'当商户有多个会员卡和服务号时,会造成单家门店适用于多个会员卡或服务号,即单个顾客会有多个域的身份信息,这容易造成门店成员的困扰。请为以下会员卡和服务号域做权重排序,当顾客有多个域的身份信息时,门店成员将只能看到权重最高域的一个身份信息。'
,
memberCardData
:
[],
// 会员卡
serviceNumData
:
[],
// 服务号
memberCardData
:
[],
// 会员卡
列表
serviceNumData
:
[],
// 服务号
列表
loadingMember
:
false
,
loadingService
:
false
,
};
...
...
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