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
520ade94
Commit
520ade94
authored
Oct 28, 2022
by
huaying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 我的客户
parent
e21a1a8a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
186 additions
and
6 deletions
+186
-6
proxyList.js
config/proxyList.js
+7
-0
addGroupTemplate.vue
src/views/apps/customerApp/addGroupTemplate.vue
+65
-2
memberGroupList.vue
src/views/apps/customerApp/memberGroupList.vue
+107
-2
memberGroupSet.vue
src/views/apps/customerApp/memberGroupSet.vue
+7
-2
No files found.
config/proxyList.js
View file @
520ade94
...
@@ -8,6 +8,13 @@
...
@@ -8,6 +8,13 @@
*/
*/
module
.
exports
=
{
module
.
exports
=
{
proxyList
:
{
proxyList
:
{
'/api-admin'
:
{
target
:
'https://www.gicdev.com/api-admin/'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^/api-admin'
:
''
}
},
'/haoban-manage3-web/'
:
{
'/haoban-manage3-web/'
:
{
target
:
'https://www.gicdev.com/haoban-manage3-web/'
,
target
:
'https://www.gicdev.com/haoban-manage3-web/'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
...
...
src/views/apps/customerApp/addGroupTemplate.vue
View file @
520ade94
...
@@ -52,6 +52,12 @@
...
@@ -52,6 +52,12 @@
<el-table-column
prop=
""
label=
"操作"
>
<el-table-column
prop=
""
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"delRow(scope.$index, scope.row)"
>
移除
</el-button>
<el-button
type=
"text"
@
click=
"delRow(scope.$index, scope.row)"
>
移除
</el-button>
<dm-delete
tips=
"确定置顶?"
@
confirm=
"isTopping(scope.$index, scope.row, 1)"
v-if=
"isEdit && scope.row.topFlag == 0"
>
<el-button
type=
"text"
style=
"padding: 0 14px"
:disabled=
"toppingNum >= 5"
>
置顶
</el-button>
</dm-delete>
<dm-delete
tips=
"确定取消置顶?"
@
confirm=
"isTopping(scope.$index, scope.row, 0)"
v-if=
"isEdit && scope.row.topFlag == 1"
>
<el-button
type=
"text"
>
取消置顶
</el-button>
</dm-delete>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -71,7 +77,7 @@ import limitInput from '@/components/limit-input.vue';
...
@@ -71,7 +77,7 @@ import limitInput from '@/components/limit-input.vue';
import
showMsg
from
'@/common/js/showmsg'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
'@/common/js/public'
;
import
{
_debounce
}
from
'@/common/js/public'
;
import
{
postRequest
}
from
'@/api/api'
;
import
{
postRequest
,
getRequest
}
from
'@/api/api'
;
export
default
{
export
default
{
name
:
'app-detail'
,
name
:
'app-detail'
,
props
:
{
props
:
{
...
@@ -112,10 +118,51 @@ export default {
...
@@ -112,10 +118,51 @@ export default {
pageSize
:
20
,
pageSize
:
20
,
total
:
0
,
total
:
0
,
groupShow
:
false
,
groupShow
:
false
,
loadingBtn
:
false
loadingBtn
:
false
,
toppingNum
:
0
,
isEdit
:
false
};
};
},
},
methods
:
{
methods
:
{
// 获取置顶数
getToppingNum
(
val
)
{
getRequest
(
'/haoban-app-customer-web/get-template-top-count'
,
{
templateId
:
this
.
$route
.
query
.
templateId
}).
then
(
res
=>
{
if
(
res
.
data
.
errorCode
==
1
)
{
this
.
toppingNum
=
res
.
data
.
result
;
}
});
// let sortList = val.filter(item => item.topFlag == 1);
// this.toppingNum = sortList.length;
},
// 置顶事件
isTopping
(
itemIndex
,
item
,
n
)
{
let
para
=
{
memberTagGroupId
:
item
.
memberTagGroupId
,
templateId
:
this
.
$route
.
query
.
templateId
,
topFlag
:
n
};
this
.
loading
=
true
;
getRequest
(
'/haoban-app-customer-web/update-template-group-topflag'
,
para
)
.
then
(
res
=>
{
if
(
res
.
data
.
errorCode
==
1
)
{
this
.
tableData
[
itemIndex
].
topFlag
=
n
;
let
setItem
=
this
.
tableData
[
itemIndex
];
this
.
tableData
.
splice
(
itemIndex
,
1
);
if
(
n
==
1
)
{
this
.
tableData
.
splice
(
0
,
0
,
setItem
);
}
else
if
(
n
==
0
)
{
this
.
tableData
.
splice
(
this
.
toppingNum
-
1
,
0
,
setItem
);
}
this
.
$message
.
success
(
'操作成功!'
);
// this.getTemplateSet(this.brandId);
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
}
})
.
finally
(()
=>
{
this
.
loading
=
false
;
});
},
/**
/**
* 确认新建
* 确认新建
*/
*/
...
@@ -173,10 +220,14 @@ export default {
...
@@ -173,10 +220,14 @@ export default {
type
:
'warning'
type
:
'warning'
})
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
loading
=
true
;
that
.
tableData
.
splice
(
index
,
1
);
that
.
tableData
.
splice
(
index
,
1
);
if
(
that
.
tableData
.
length
)
{
if
(
that
.
tableData
.
length
)
{
that
.
formData
.
groupIds
=
that
.
tableData
.
map
(
ele
=>
ele
.
memberTagGroupId
);
that
.
formData
.
groupIds
=
that
.
tableData
.
map
(
ele
=>
ele
.
memberTagGroupId
);
}
}
setTimeout
(()
=>
{
this
.
loading
=
false
;
},
500
);
})
})
.
catch
(()
=>
{});
.
catch
(()
=>
{});
},
},
...
@@ -285,10 +336,22 @@ export default {
...
@@ -285,10 +336,22 @@ export default {
if
(
newData
&&
!!
that
.
$route
.
query
.
templateId
)
{
if
(
newData
&&
!!
that
.
$route
.
query
.
templateId
)
{
that
.
getTemplateSet
(
that
.
brandId
);
that
.
getTemplateSet
(
that
.
brandId
);
}
}
},
tableData
:
{
handler
:
function
(
val
)
{
const
that
=
this
;
if
(
val
)
{
if
(
that
.
isEdit
)
{
that
.
getToppingNum
(
val
);
}
}
},
deep
:
true
}
}
},
},
mounted
()
{
mounted
()
{
const
that
=
this
;
const
that
=
this
;
that
.
isEdit
=
that
.
$route
.
query
.
templateId
?
true
:
false
;
that
.
$emit
(
'showTab'
,
'12'
);
that
.
$emit
(
'showTab'
,
'12'
);
if
(
that
.
brandId
&&
!!
that
.
$route
.
query
.
templateId
)
{
if
(
that
.
brandId
&&
!!
that
.
$route
.
query
.
templateId
)
{
that
.
getTemplateSet
(
that
.
brandId
);
that
.
getTemplateSet
(
that
.
brandId
);
...
...
src/views/apps/customerApp/memberGroupList.vue
View file @
520ade94
...
@@ -70,18 +70,41 @@
...
@@ -70,18 +70,41 @@
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"{ row }"
>
<dm-delete
tips=
"确定置顶?"
@
confirm=
"isTopping(row, 1)"
v-if=
"row.topFlag == 0"
>
<el-button
type=
"text"
style=
"padding: 0 14px"
:disabled=
"toppingNum >= 5"
>
置顶
</el-button>
</dm-delete>
<dm-delete
tips=
"确定取消置顶?"
@
confirm=
"isTopping(row, 0)"
v-if=
"row.topFlag == 1"
>
<el-button
type=
"text"
>
取消置顶
</el-button>
</dm-delete>
<el-button
type=
"text"
@
click=
"sortNumBtn(row)"
>
设置排序值
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-table>
<div
class=
"block common-wrap__page text-right m-t-24"
v-if=
"groupListData.length != 0"
>
<div
class=
"block common-wrap__page text-right m-t-24"
v-if=
"groupListData.length != 0"
>
<dm-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[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-sizes=
"[20, 40, 60, 80]"
:page-size=
"pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
>
</dm-pagination>
</div>
</div>
</div>
</div>
<el-dialog
title=
"设置排序值"
:visible
.
sync=
"setSortShow"
width=
"450px"
@
close=
"customCancel"
>
<el-form
:model=
"sortForm"
ref=
"sortForm"
class=
"sortClass"
label-width=
"80px"
>
<el-form-item
label=
"排序值"
prop=
"sortNum"
:rules=
"[{ required: true, message: '请输入排序值', trigger: 'blur' }]"
>
<el-input-number
v-model=
"sortForm.sortNum"
placeholder=
"请设置大于0的数字"
:controls=
"false"
min=
"1"
></el-input-number>
<span
class=
"tips"
>
/*排序值越小越靠前*/
</span>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
:loading=
"sortLoading"
@
click=
"customCancel"
>
取消
</el-button>
<el-button
:loading=
"sortLoading"
type=
"primary"
@
click=
"customConfirm"
>
保存
</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
showMsg
from
'@/common/js/showmsg'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
'@/common/js/public'
;
import
{
_debounce
}
from
'@/common/js/public'
;
import
{
postRequest
}
from
'@/api/api'
;
import
{
postRequest
,
getRequest
}
from
'@/api/api'
;
export
default
{
export
default
{
name
:
'app-detail'
,
name
:
'app-detail'
,
props
:
{
props
:
{
...
@@ -110,10 +133,78 @@ export default {
...
@@ -110,10 +133,78 @@ export default {
loading
:
false
,
loading
:
false
,
// 最近同步时间
// 最近同步时间
syncDate
:
''
,
syncDate
:
''
,
loadingBtn
:
false
loadingBtn
:
false
,
toppingNum
:
0
,
currentGroupId
:
''
,
setSortShow
:
false
,
sortForm
:
{
sortNum
:
undefined
},
sortLoading
:
false
};
};
},
},
methods
:
{
methods
:
{
// 设置排序值
sortNumBtn
(
item
)
{
this
.
setSortShow
=
true
;
this
.
currentGroupId
=
item
.
memberTagGroupId
;
this
.
sortForm
.
sortNum
=
item
.
sortNum
||
undefined
;
},
// 设置排序值取消按钮
customCancel
()
{
this
.
setSortShow
=
false
;
this
.
sortForm
.
sortNum
=
undefined
;
this
.
currentGroupId
=
''
;
this
.
$refs
.
sortForm
.
clearValidate
();
},
// 设置排序值确认按钮
customConfirm
()
{
this
.
sortLoading
=
true
;
this
.
$refs
.
sortForm
.
validate
(
valid
=>
{
if
(
valid
)
{
let
para
=
{
memberTagGroupId
:
this
.
currentGroupId
,
sortNum
:
this
.
sortForm
.
sortNum
};
getRequest
(
'/haoban-app-customer-web/memberGroup/update-tag-group-sortnum'
,
para
)
.
then
(
res
=>
{
if
(
res
.
data
.
errorCode
==
1
)
{
this
.
$message
.
success
(
'排序成功'
);
this
.
customCancel
();
this
.
getGroupList
(
this
.
brandId
);
}
else
{
this
.
$message
.
error
(
'排序失败'
);
}
})
.
finally
(()
=>
{
this
.
sortLoading
=
false
;
});
}
});
},
// 获取置顶数
getToppingNum
()
{
getRequest
(
'/haoban-app-customer-web/memberGroup/get-tag-group-top-count'
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
errorCode
==
1
)
{
this
.
toppingNum
=
res
.
data
.
result
;
}
});
},
// 置顶事件
isTopping
(
item
,
n
)
{
let
para
=
{
memberTagGroupId
:
item
.
memberTagGroupId
,
topFlag
:
n
};
getRequest
(
'/haoban-app-customer-web/memberGroup/update-tag-group-topflag'
,
para
).
then
(
res
=>
{
if
(
res
.
data
.
errorCode
==
1
)
{
this
.
$message
.
success
(
'操作成功!'
);
this
.
getGroupList
(
this
.
brandId
);
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
}
});
},
/**
/**
* 获取同步时间
* 获取同步时间
*/
*/
...
@@ -306,6 +397,7 @@ export default {
...
@@ -306,6 +397,7 @@ export default {
let
resData
=
res
.
data
;
let
resData
=
res
.
data
;
that
.
loading
=
false
;
that
.
loading
=
false
;
if
(
resData
.
errorCode
==
1
)
{
if
(
resData
.
errorCode
==
1
)
{
that
.
getToppingNum
();
if
(
resData
.
result
.
list
&&
resData
.
result
.
list
.
length
)
{
if
(
resData
.
result
.
list
&&
resData
.
result
.
list
.
length
)
{
resData
.
result
.
list
.
forEach
(
ele
=>
{
resData
.
result
.
list
.
forEach
(
ele
=>
{
ele
.
isSendTemplate
=
ele
.
isSendTemplate
==
1
?
true
:
false
;
ele
.
isSendTemplate
=
ele
.
isSendTemplate
==
1
?
true
:
false
;
...
@@ -337,7 +429,20 @@ export default {
...
@@ -337,7 +429,20 @@ export default {
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
>
.sortClass
{
.el-input,
.el-input-number
.el-input__inner
{
text-align
:
left
;
}
}
</
style
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.tips
{
margin-left
:
10px
;
font-size
:
12px
;
color
:
#909399
;
}
.w-500
{
.w-500
{
width
:
500px
;
width
:
500px
;
}
}
...
...
src/views/apps/customerApp/memberGroupSet.vue
View file @
520ade94
...
@@ -14,10 +14,11 @@
...
@@ -14,10 +14,11 @@
<
template
>
<
template
>
<div
class=
"app-detail-wrap"
>
<div
class=
"app-detail-wrap"
>
<el-tabs
v-model=
"activeName"
>
<el-tabs
v-model=
"activeName"
>
<el-tab-pane
label=
"
客户分组列表
"
name=
"first"
>
<el-tab-pane
label=
"
所有门店可见分组
"
name=
"first"
>
<member-group-list
:brand-id=
"brandId"
></member-group-list>
<member-group-list
:brand-id=
"brandId"
></member-group-list>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"分组展示设置"
name=
"second"
>
<el-tab-pane
name=
"second"
>
<span
slot=
"label"
>
设置分组模板
<span
class=
"tips"
>
/*设置后指定门店只可见选中的分组*/
</span></span>
<member-group-set-list
:brand-id=
"brandId"
></member-group-set-list>
<member-group-set-list
:brand-id=
"brandId"
></member-group-set-list>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
...
@@ -43,6 +44,10 @@ export default {
...
@@ -43,6 +44,10 @@ export default {
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.tips
{
font-size
:
12px
;
color
:
#909399
;
}
.app-detail-wrap
{
.app-detail-wrap
{
height
:
100%
;
height
:
100%
;
background
:
#fff
;
background
:
#fff
;
...
...
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