Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
member
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
member
member
Commits
ee461ea5
Commit
ee461ea5
authored
Nov 11, 2021
by
chenyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: update
parent
d9ed0c6c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
993 additions
and
151 deletions
+993
-151
allCustomersList.vue
src/components/allCustomers/allCustomersList.vue
+0
-0
UserInfoCard.vue
src/components/allCustomers/components/UserInfoCard.vue
+0
-91
gradeDialog.vue
src/components/allCustomers/components/gradeDialog.vue
+202
-0
integralDialog.vue
src/components/allCustomers/components/integralDialog.vue
+218
-0
mainstoreDialog.vue
src/components/allCustomers/components/mainstoreDialog.vue
+199
-0
substoreDialog.vue
src/components/allCustomers/components/substoreDialog.vue
+262
-0
tableColumDialog.vue
src/components/allCustomers/components/tableColumDialog.vue
+6
-6
index.js
src/components/allCustomers/index.js
+105
-53
index.styl
static/css/index.styl
+1
-1
No files found.
src/components/allCustomers/allCustomersList.vue
View file @
ee461ea5
This diff is collapsed.
Click to expand it.
src/components/allCustomers/components/UserInfoCard.vue
deleted
100644 → 0
View file @
d9ed0c6c
<
template
>
<div
id=
"UserInfoCard"
>
<el-popover
placement=
"top-start"
width=
"400"
height=
"180"
trigger=
"hover"
@
show=
"showSingleInfo"
>
<div
class=
"pointer"
@
click=
"linkDetail"
>
<div
class=
"singelinfo"
>
<div
class=
"singelinfo-img"
><img
width=
"100"
height=
"100"
:src=
"scopeData.thirdImgUrl ? scopeData.thirdImgUrl : './static/img/default.png'"
alt=
""
></div>
<div
class=
"singelinfo-content pLeft10 pRight10"
>
<span
class=
"lheigth0"
>
{{
scopeData
.
memberName
}}
<span
:title=
"singleInfo.status == 0 ? '取消关注公众号' : singleInfo.status == 1 ? '已关注公众号' : '未关注公众号'"
class=
"channelicon fr"
:class=
"singleInfo.status == 0 ? 'gzhiconcanclegray' : singleInfo.status == 1 ? 'gzhicon' : 'gzhicongray'"
></span>
<span
:title=
"singleInfo.wxStatus == 0 ? '未使用小程序' : singleInfo.wxStatus == 1 ? '使用过小程序' : ''"
class=
"channelicon fr mr6"
:class=
"singleInfo.wxStatus == 0 ? 'xcxicongray' : singleInfo.wxStatus == 1 ? 'xcxicon' : ''"
></span>
</span>
<p
class=
"lheigth0"
>
<span
class=
"evl-right"
>
{{
singleInfo
.
sex
}}
</span>
<span
class=
"evl-right"
>
{{
singleInfo
.
age
}}
</span>
<span
:title=
"singleInfo.cardNo"
>
{{
singleInfo
.
cardNo
|
formatCardName
}}
</span></p>
<p
class=
"lheigth0"
><span>
{{
singleInfo
.
mainStoreName
}}
</span></p>
<div
class=
"singelinfo-cost"
>
<div
class=
"singelinfo-costitem"
>
<p>
{{
singleInfo
.
costFee
}}
</p>
<p>
消费总额
</p>
</div>
<div
class=
"singelinfo-costitem"
>
<p>
{{
singleInfo
.
costTimes
}}
</p>
<p>
消费次数
</p>
</div>
<div
class=
"singelinfo-costitem"
>
<p>
{{
singleInfo
.
lastCost
}}
</p>
<p>
最近消费
</p>
</div>
</div>
</div>
</div>
<div
class=
"singelinfo-jl mBottom20 mTop20"
>
<a
class=
"singelinfo-jlitem"
>
消费记录 (
{{
singleInfo
.
numOfSale
}}
)
</a>
<a
class=
"singelinfo-jlitem"
>
营销记录 (
{{
singleInfo
.
numOfmarket
}}
)
</a>
<a
class=
"singelinfo-jlitem"
>
卡券记录 (
{{
singleInfo
.
couponCount
}}
)
</a>
</div>
</div>
<span
slot=
"reference"
class=
"member-span"
><img
class=
"tablecontent-cellimg mr6"
width=
"60"
height=
"60"
:src=
"scopeData.thirdImgUrl ? scopeData.thirdImgUrl : './static/img/default.png'"
alt=
""
></span>
</el-popover>
</div>
</
template
>
<
script
>
export
default
{
name
:
'UserInfoCard'
,
methods
:
{
showSingleInfo
()
{
this
.
$emit
(
'showSingleInfo'
)
},
linkDetail
()
{
this
.
$emit
(
'linkDetail'
)
}
},
props
:
{
scopeData
:
Object
,
singleInfo
:
Object
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
#UserInfoCard
{
display
:
inline-block
;
}
</
style
>
src/components/allCustomers/components/gradeDialog.vue
0 → 100644
View file @
ee461ea5
<
template
>
<div>
<el-dialog
title=
"批量修改等级"
custom-class=
"customer-dailog"
:visible
.
sync=
"dialogVisible"
@
close=
"cancel"
width=
"600px"
>
<div
class=
"checkedCustomers"
>
当前选中
<span
class=
"num"
>
{{
multipleList
.
length
}}
</span>
位客户
</div>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"133px"
>
<el-form-item
v-if=
"showEditClique"
label=
"等级类型"
prop=
"gradeType"
>
<el-radio
v-model=
"form.isClique"
:label=
"1"
@
change=
"form.gradeId = ''"
>
集团等级
</el-radio>
<el-radio
v-model=
"form.isClique"
:label=
"0"
@
change=
"form.gradeId = ''"
>
商户等级
</el-radio>
</el-form-item>
<el-form-item
label=
"调整后等级"
prop=
"gradeId"
>
<el-select
v-model=
"form.gradeId"
placeholder=
"请选择"
style=
"width: 400px;"
>
<el-option
v-for=
"item in gradeList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"原因备注"
prop=
"remark"
>
<el-input
type=
"text"
maxlength=
"20"
show-word-limit
v-model=
"form.remark"
style=
"width: 400px;"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
:loading=
"btnLoading"
@
click=
"submit"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
doFetch
,
doFetchqs
}
from
"../../axios/api"
;
import
url
from
"../../axios/url"
;
import
{
mapState
}
from
"vuex"
;
import
{
checkFalse
,
checkStatus
,
checkSuccess
}
from
"../../../../static/js/checkStatus"
;
export
default
{
name
:
"tableColumDailog"
,
props
:
{
dialogVisible
:
{
type
:
Boolean
,
default
:
false
},
multipleList
:
{
type
:
Array
,
default
:
()
=>
{
return
[];
}
},
gradeList
:
{
type
:
Array
,
default
:
()
=>
{
return
[];
}
},
pageSize
:
{
type
:
Number
,
default
:
''
},
memberSearchStr
:
{
type
:
Number
,
default
:
''
},
phoneNameCard
:
{
type
:
String
,
default
:
''
},
pageName
:
{
type
:
String
,
default
:
''
},
},
data
()
{
return
{
form
:
{
gradeId
:
""
,
remark
:
""
,
isClique
:
0
},
rules
:
{
gradeId
:
[
{
required
:
true
,
message
:
"请选择等级"
,
trigger
:
"change"
}
],
remark
:
[
{
required
:
true
,
message
:
"请输入原因备注"
,
trigger
:
"change"
}
]
},
btnLoading
:
false
,
};
},
computed
:
{
...
mapState
([
"showEditClique"
])
},
methods
:
{
cancel
()
{
this
.
$refs
[
'form'
].
resetFields
();
this
.
$emit
(
'update:dialogVisible'
,
false
);
},
submit
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
btnLoading
=
true
;
let
memberIdsArr
=
[];
this
.
multipleList
.
forEach
(
item
=>
{
memberIdsArr
.
push
(
item
.
memberId
);
});
// 批量修改积分
doFetch
(
url
.
updateGrade
,
Object
.
assign
({},
this
.
form
,
{
memberIds
:
this
.
selectAll
==
true
?
"-1"
:
memberIdsArr
.
join
(
","
),
isCurrent
:
this
.
selectAll
==
true
?
2
:
this
.
multipleList
.
length
==
this
.
pageSize
?
1
:
0
,
memberSearchParamStr
:
this
.
selectAll
==
true
?
(
this
.
memberSearchStr
?
this
.
memberSearchStr
:
"-1"
)
:
""
,
phoneNameCard
:
this
.
phoneNameCard
,
pageName
:
this
.
pageName
}))
.
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
setTimeout
(()
=>
{
this
.
btnLoading
=
false
;
checkSuccess
();
this
.
$refs
[
'form'
].
resetFields
();
this
.
$emit
(
'update:dialogVisible'
,
false
);
this
.
$emit
(
'refresh'
);
},
4500
);
}
else
{
checkFalse
();
this
.
btnLoading
=
false
;
}
})
.
catch
(
err
=>
{
this
.
btnLoading
=
false
;
checkStatus
(
err
);
});
}
else
{
return
false
;
}
});
},
},
watch
:
{
dialogVisible
(
n
,
o
)
{
if
(
n
)
{
if
(
this
.
showEditClique
)
{
this
.
form
.
isClique
=
1
;
}
}
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
.customer-dailog
{
.checkedCustomers
{
margin-left
:
133px
;
margin-bottom
:
20px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#909399
;
line-height
:
20px
;
.num
{
color
:
#303133
;
}
}
.sub-tip
{
margin
:
4px
0
-5px
;
font-size
:
12px
;
font-weight
:
400
;
color
:
#909399
;
line-height
:
17px
;
}
}
</
style
>
<
style
lang=
"less"
>
//
去除
dailog-footer
上边框
.integral-dailog
.el-dialog__footer
{
padding-top
:
0
;
border-top
:
none
!important
;
}
.integral-dailog
.el-dialog__body
{
padding-bottom
:
0
;
}
</
style
>
\ No newline at end of file
src/components/allCustomers/components/integralDialog.vue
0 → 100644
View file @
ee461ea5
<
template
>
<div>
<el-dialog
title=
"批量调整积分"
custom-class=
"customer-dailog"
:visible
.
sync=
"dialogVisible"
@
close=
"cancel"
width=
"600px"
>
<div
class=
"checkedCustomers"
>
当前选中
<span
class=
"num"
>
{{
multipleList
.
length
}}
</span>
位客户
</div>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"133px"
>
<el-form-item
label=
"调整积分:"
prop=
"editType"
>
<el-radio-group
v-model=
"form.editType"
>
<el-radio
:label=
1
>
增加积分
</el-radio>
<el-radio
:label=
2
>
扣除积分
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"调整额度:"
prop=
"accumulatPoints"
>
<el-input-number
v-model=
"form.accumulatPoints"
style=
"width: 115px;"
controls-position=
"right"
:min=
"1"
:max=
"999999"
></el-input-number>
</el-form-item>
<el-form-item
label=
"原始成本主体:"
prop=
"settlementStoreId"
v-if=
"integralFlag == 'gic' && form.editType == 1"
>
<el-select
prop=
"settlementStoreId"
style=
"width: 400px;"
v-model=
"form.settlementStoreId"
filterable
remote
reserve-keyword
placeholder=
"请输入门店名称/门店code"
:remote-method=
"getStoreCodeName"
:loading=
"loading"
>
<el-option
v-for=
"item in storeList"
:key=
"item.storeId"
:label=
"item.storeName"
:value=
"item.storeId"
></el-option>
</el-select>
<p
class=
"sub-tip"
>
注:除输入选择具体门店外,还可输入总部,记总部名下
</p>
</el-form-item>
<el-form-item
label=
"原因备注:"
prop=
"remark"
>
<el-input
type=
"text"
maxlength=
"20"
show-word-limit
v-model=
"form.remark"
style=
"width: 400px;"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
:loading=
"btnLoading"
@
click=
"submit"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
doFetch
,
doFetchqs
}
from
"../../axios/api"
;
import
url
from
"../../axios/url"
;
import
{
checkFalse
,
checkStatus
,
checkSuccess
}
from
"../../../../static/js/checkStatus"
;
export
default
{
name
:
"tableColumDailog"
,
props
:
{
dialogVisible
:
{
type
:
Boolean
,
default
:
false
},
multipleList
:
{
type
:
Array
,
default
:
()
=>
{
return
[];
}
},
integralFlag
:
{
type
:
String
,
default
:
''
},
pageSize
:
{
type
:
Number
,
default
:
''
},
memberSearchStr
:
{
type
:
Number
,
default
:
''
},
phoneNameCard
:
{
type
:
String
,
default
:
''
},
pageName
:
{
type
:
String
,
default
:
''
},
},
data
()
{
return
{
form
:
{
editType
:
1
,
accumulatPoints
:
0
,
remark
:
""
,
settlementStoreId
:
""
},
rules
:
{
editType
:
[
{
required
:
true
,
message
:
"请选择调整方式"
,
trigger
:
"change"
}
],
accumulatPoints
:
[
{
required
:
true
,
message
:
"请选择调整额度"
,
trigger
:
"change"
}
],
remark
:
[
{
required
:
true
,
message
:
"请输入原因备注"
,
trigger
:
"change"
}
],
settlementStoreId
:
[
{
required
:
true
,
message
:
"请填写原始成本主体"
,
trigger
:
"change"
}
]
},
btnLoading
:
false
,
loading
:
false
,
storeList
:
[]
};
},
methods
:
{
cancel
()
{
this
.
$refs
[
'form'
].
resetFields
();
this
.
$emit
(
'update:dialogVisible'
,
false
);
},
getStoreCodeName
(
val
)
{
this
.
loading
=
true
;
doFetchqs
(
url
.
storeCodeName
,
{
searchParam
:
val
,
flag
:
1
})
.
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
this
.
storeList
=
res
.
data
.
result
;
}
else
{
checkFalse
(
res
.
data
.
message
);
}
})
.
catch
(
err
=>
{
checkStatus
(
err
);
}).
finally
(
_
=>
this
.
loading
=
false
);
},
submit
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
btnLoading
=
true
;
let
memberIdsArr
=
[];
this
.
multipleList
.
forEach
(
item
=>
{
memberIdsArr
.
push
(
item
.
memberId
);
});
// 批量修改积分
doFetch
(
url
.
updateIntegrals
,
Object
.
assign
({},
this
.
form
,
{
memberIds
:
this
.
selectAll
==
true
?
"-1"
:
memberIdsArr
.
join
(
","
),
isCurrent
:
this
.
selectAll
==
true
?
2
:
this
.
multipleList
.
length
==
this
.
pageSize
?
1
:
0
,
memberSearchParamStr
:
this
.
selectAll
==
true
?
(
this
.
memberSearchStr
?
this
.
memberSearchStr
:
"-1"
)
:
""
,
phoneNameCard
:
this
.
phoneNameCard
,
pageName
:
this
.
pageName
}))
.
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
setTimeout
(()
=>
{
this
.
btnLoading
=
false
;
checkSuccess
();
this
.
$refs
[
'form'
].
resetFields
();
this
.
$emit
(
'update:dialogVisible'
,
false
);
this
.
$emit
(
'refresh'
);
},
4500
);
}
else
{
checkFalse
();
this
.
btnLoading
=
false
;
}
})
.
catch
(
err
=>
{
this
.
btnLoading
=
false
;
checkStatus
(
err
);
});
}
else
{
return
false
;
}
});
},
}
};
</
script
>
<
style
lang=
"less"
scoped
>
.customer-dailog
{
.checkedCustomers
{
margin-left
:
133px
;
margin-bottom
:
20px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#909399
;
line-height
:
20px
;
.num
{
color
:
#303133
;
}
}
.sub-tip
{
margin
:
4px
0
-5px
;
font-size
:
12px
;
font-weight
:
400
;
color
:
#909399
;
line-height
:
17px
;
}
}
</
style
>
\ No newline at end of file
src/components/allCustomers/components/mainstoreDialog.vue
0 → 100644
View file @
ee461ea5
<
template
>
<div>
<el-dialog
title=
"批量修改服务门店"
custom-class=
"customer-dailog"
:visible
.
sync=
"dialogVisible"
@
close=
"cancel"
width=
"600px"
>
<div
class=
"checkedCustomers"
>
当前选中
<span
class=
"num"
>
{{
multipleList
.
length
}}
</span>
位客户
</div>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"133px"
>
<el-form-item
label=
"服务门店"
prop=
"mainStoreId"
>
<el-select
style=
"width: 382px"
v-model=
"form.mainStoreId"
filterable
remote
reserve-keyword
placeholder=
"请输入门店名称/门店code"
:remote-method=
"getMainStoreCodeName"
:loading=
"loading"
>
<el-option
v-for=
"item in mainstoreList"
:key=
"item.storeId"
:label=
"item.storeName"
:value=
"item.storeId"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"原因备注"
prop=
"remark"
>
<el-input
type=
"text"
maxlength=
"20"
show-word-limit
v-model=
"form.remark"
style=
"width: 382px;"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
:loading=
"btnLoading"
@
click=
"submit"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
doFetch
,
doFetchqs
}
from
"../../axios/api"
;
import
url
from
"../../axios/url"
;
import
{
mapState
}
from
"vuex"
;
import
{
checkFalse
,
checkStatus
,
checkSuccess
}
from
"../../../../static/js/checkStatus"
;
export
default
{
name
:
"tableColumDailog"
,
props
:
{
dialogVisible
:
{
type
:
Boolean
,
default
:
false
},
multipleList
:
{
type
:
Array
,
default
:
()
=>
{
return
[];
}
},
gradeList
:
{
type
:
Array
,
default
:
()
=>
{
return
[];
}
},
pageSize
:
{
type
:
Number
,
default
:
''
},
memberSearchStr
:
{
type
:
Number
,
default
:
''
},
phoneNameCard
:
{
type
:
String
,
default
:
''
},
pageName
:
{
type
:
String
,
default
:
''
},
},
data
()
{
return
{
form
:
{
remark
:
""
,
optType
:
1
,
// 1服务门店(主门店),2协管门店
mainOptType
:
4
,
//服务门店类型 1替换为最新协管的门店 2替换为最新协管的自营门店 3 替换为最新协管的自营/联营门店 4自定义主门店
mainStoreId
:
""
},
rules
:
{
mainStoreId
:
[
{
required
:
true
,
message
:
"请选择服务门店"
,
trigger
:
"change"
}
],
remark
:
[
{
required
:
true
,
message
:
"请输入原因备注"
,
trigger
:
"change"
}
]
},
mainstoreList
:
[],
loading
:
false
,
btnLoading
:
false
,
};
},
computed
:
{
...
mapState
([
"showEditClique"
])
},
methods
:
{
cancel
()
{
this
.
$refs
[
'form'
].
resetFields
();
this
.
$emit
(
'update:dialogVisible'
,
false
);
},
getMainStoreCodeName
(
val
)
{
this
.
loading
=
true
;
doFetchqs
(
url
.
storeCodeName
,
{
searchParam
:
val
,
flag
:
1
})
.
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
this
.
mainstoreList
=
res
.
data
.
result
;
}
else
{
checkFalse
(
res
.
data
.
message
);
}
})
.
catch
(
err
=>
{
checkStatus
(
err
);
}).
finally
(
_
=>
this
.
loading
=
false
);
},
submit
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
btnLoading
=
true
;
let
memberIdsArr
=
[];
this
.
multipleList
.
forEach
(
item
=>
{
memberIdsArr
.
push
(
item
.
memberId
);
});
// 批量修改积分
doFetch
(
url
.
updateStore
,
Object
.
assign
({},
this
.
form
,
{
memberIds
:
this
.
selectAll
==
true
?
"-1"
:
memberIdsArr
.
join
(
","
),
isCurrent
:
this
.
selectAll
==
true
?
2
:
this
.
multipleList
.
length
==
this
.
pageSize
?
1
:
0
,
memberSearchParamStr
:
this
.
selectAll
==
true
?
(
this
.
memberSearchStr
?
this
.
memberSearchStr
:
"-1"
)
:
""
,
phoneNameCard
:
this
.
phoneNameCard
,
pageName
:
this
.
pageName
}))
.
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
setTimeout
(()
=>
{
this
.
btnLoading
=
false
;
checkSuccess
();
this
.
$refs
[
'form'
].
resetFields
();
this
.
$emit
(
'update:dialogVisible'
,
false
);
this
.
$emit
(
'refresh'
);
},
4500
);
}
else
{
checkFalse
();
this
.
btnLoading
=
false
;
}
})
.
catch
(
err
=>
{
this
.
btnLoading
=
false
;
checkStatus
(
err
);
});
}
else
{
return
false
;
}
});
},
}
};
</
script
>
<
style
lang=
"less"
scoped
>
.customer-dailog
{
.checkedCustomers
{
margin-left
:
133px
;
margin-bottom
:
20px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#909399
;
line-height
:
20px
;
.num
{
color
:
#303133
;
}
}
.sub-tip
{
margin
:
4px
0
-5px
;
font-size
:
12px
;
font-weight
:
400
;
color
:
#909399
;
line-height
:
17px
;
}
}
</
style
>
src/components/allCustomers/components/substoreDialog.vue
0 → 100644
View file @
ee461ea5
<
template
>
<div>
<el-dialog
title=
"批量修改协管门店"
custom-class=
"customer-dailog"
:visible
.
sync=
"dialogVisible"
@
close=
"cancel"
width=
"600px"
>
<div
class=
"checkedCustomers"
>
当前选中
<span
class=
"num"
>
{{
multipleList
.
length
}}
</span>
位客户
</div>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"133px"
>
<el-form-item
label=
"协管门店"
prop=
"fromSubStoreIds"
>
<el-select
v-model=
"form.subOptType"
class=
"prefix-select"
>
<el-option
label=
"增加"
:value=
"1"
></el-option>
<el-option
label=
"减少"
:value=
"2"
></el-option>
</el-select
><el-select
v-model=
"form.fromSubStoreIds"
filterable
remote
multiple
class=
"fromSubStoreIds-select"
:remote-method=
"getSubStoreList"
placeholder=
"请输入关键字搜索门店"
v-select-loadmore=
"getOnlineStore"
@
visible-change=
"(flag) => flag ? getSubStoreList() : ''"
>
<el-option
v-for=
"item in subStoreList"
:key=
"item.storeId"
:label=
"item.storeName"
:value=
"item.storeId"
></el-option>
<el-option
class=
"loadmore-loading"
v-if=
"loading"
>
<i
class=
"loading-icon"
v-loading=
"true"
></i>
加载中...
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"原因备注"
prop=
"remark"
>
<el-input
type=
"text"
maxlength=
"20"
show-word-limit
v-model=
"form.remark"
style=
"width: 400px;"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
:loading=
"btnLoading"
@
click=
"submit"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
doFetch
,
doFetchqs
}
from
"../../axios/api"
;
import
url
from
"../../axios/url"
;
import
{
mapState
}
from
"vuex"
;
import
{
checkFalse
,
checkStatus
,
checkSuccess
}
from
"../../../../static/js/checkStatus"
;
export
default
{
name
:
"tableColumDailog"
,
props
:
{
dialogVisible
:
{
type
:
Boolean
,
default
:
false
},
multipleList
:
{
type
:
Array
,
default
:
()
=>
{
return
[];
}
},
gradeList
:
{
type
:
Array
,
default
:
()
=>
{
return
[];
}
},
pageSize
:
{
type
:
Number
,
default
:
''
},
memberSearchStr
:
{
type
:
Number
,
default
:
''
},
phoneNameCard
:
{
type
:
String
,
default
:
''
},
pageName
:
{
type
:
String
,
default
:
''
},
},
data
()
{
return
{
form
:
{
remark
:
""
,
optType
:
2
,
// 1服务门店(主门店),2协管门店
subOptType
:
1
,
// 协管门店时必填 1增加,2删除
fromSubStoreIds
:
[],
// 批量处理协管门店时使用,存放门店id,以","分割
},
rules
:
{
fromSubStoreIds
:
[
{
required
:
true
,
message
:
"请选择要操作的协管门店"
,
trigger
:
"change"
}
],
remark
:
[
{
required
:
true
,
message
:
"请输入原因备注"
,
trigger
:
"change"
}
]
},
pageParam
:{
loading
:
false
,
searchName
:
''
,
currentPage
:
1
,
pageSize
:
20
,
totalPage
:
0
},
btnLoading
:
false
,
};
},
computed
:
{
...
mapState
([
"showEditClique"
])
},
methods
:
{
cancel
()
{
this
.
$refs
[
'form'
].
resetFields
();
this
.
$emit
(
'update:dialogVisible'
,
false
);
},
getOnlineStore
()
{
const
{
searchName
,
currentPage
,
loading
,
totalPage
}
=
this
.
pageParam
;
if
(
loading
||
currentPage
>=
totalPage
)
return
;
this
.
pageParam
.
loading
=
true
;
doFetchqs
(
url
.
getOnlineStore
,
{
currentPage
:
currentPage
+
1
,
pageSize
:
20
,
searchName
:
searchName
}).
then
(
res
=>
{
const
{
errorCode
,
message
,
result
}
=
res
.
data
||
{};
if
(
errorCode
==
0
)
{
this
.
subStoreList
=
this
.
subStoreList
.
concat
(
result
.
list
||
[]);
this
.
pageParam
.
totalPage
=
result
.
page
.
totalPage
||
1
;
this
.
pageParam
.
currentPage
=
currentPage
+
1
;
}
else
{
checkFalse
(
message
);
}
}).
finally
(()
=>
this
.
pageParam
.
loading
=
false
);
},
getSubStoreList
(
query
)
{
this
.
pageParam
.
searchName
=
query
;
this
.
pageParam
.
currentPage
=
0
;
this
.
subStoreList
=
[];
this
.
getOnlineStore
();
},
submit
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
btnLoading
=
true
;
let
memberIdsArr
=
[];
this
.
multipleList
.
forEach
(
item
=>
{
memberIdsArr
.
push
(
item
.
memberId
);
});
// 批量修改积分
doFetch
(
url
.
updateGrade
,
Object
.
assign
({},
this
.
form
,
{
fromSubStoreIds
:
this
.
form
.
fromSubStoreIds
.
join
(
","
),
memberIds
:
this
.
selectAll
==
true
?
"-1"
:
memberIdsArr
.
join
(
","
),
isCurrent
:
this
.
selectAll
==
true
?
2
:
this
.
multipleList
.
length
==
this
.
pageSize
?
1
:
0
,
memberSearchParamStr
:
this
.
selectAll
==
true
?
(
this
.
memberSearchStr
?
this
.
memberSearchStr
:
"-1"
)
:
""
,
phoneNameCard
:
this
.
phoneNameCard
,
pageName
:
this
.
pageName
}))
.
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
setTimeout
(()
=>
{
this
.
btnLoading
=
false
;
checkSuccess
();
this
.
$refs
[
'form'
].
resetFields
();
this
.
$emit
(
'update:dialogVisible'
,
false
);
this
.
$emit
(
'refresh'
);
},
4500
);
}
else
{
checkFalse
();
this
.
btnLoading
=
false
;
}
})
.
catch
(
err
=>
{
this
.
btnLoading
=
false
;
checkStatus
(
err
);
});
}
else
{
return
false
;
}
});
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.customer-dailog
{
.checkedCustomers
{
margin-left
:
133px
;
margin-bottom
:
20px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#909399
;
line-height
:
20px
;
.num
{
color
:
#303133
;
}
}
.sub-tip
{
margin
:
4px
0
-5px
;
font-size
:
12px
;
font-weight
:
400
;
color
:
#909399
;
line-height
:
17px
;
}
.prefix-select.el-select
{
display
:
inline-block
;
width
:
98px
;
/deep/.el-input__inner
{
border-right
:
none
;
border-top-right-radius
:
0
;
border-bottom-right-radius
:
0
;
&:hover{
border-color
:
#dcdfe6
;
}
}
/
deep
/
.el-input.el-input--suffix.is-focus
{
.el-input__inner
{
border-color
:
#dcdfe6
;
}
}
}
.fromSubStoreIds-select.el-select
{
display
:
inline-block
;
width
:
286px
;
/deep/.el-input__inner
{
border-top-left-radius
:
0
;
border-bottom-left-radius
:
0
;
}
}
}
</
style
>
<
style
lang=
"less"
>
//
去除
dailog-footer
上边框
.integral-dailog
.el-dialog__footer
{
padding-top
:
0
;
border-top
:
none
!important
;
}
.integral-dailog
.el-dialog__body
{
padding-bottom
:
0
;
}
</
style
>
\ No newline at end of file
src/components/allCustomers/components/tableColumD
ai
log.vue
→
src/components/allCustomers/components/tableColumD
ia
log.vue
View file @
ee461ea5
...
...
@@ -2,7 +2,7 @@
<div>
<el-dialog
title=
"设置显示字段"
custom-class=
"table-colum-dailog"
:visible
.
sync=
"di
logField
Visible"
:visible
.
sync=
"di
alog
Visible"
@
close=
"cancel"
width=
"600px"
>
<div
class=
"checkwtip mBottom10"
>
请选择您想显示的列表字段,最多勾选8个选项,已经勾选了
<span
...
...
@@ -18,7 +18,7 @@
:disabled=
"item.code==='name'"
>
{{
item
.
name
}}
</el-checkbox>
</el-checkbox-group>
<span
slot=
"footer"
class=
"dilog-footer"
>
class=
"di
a
log-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitFields"
>
确 定
</el-button>
...
...
@@ -42,7 +42,7 @@ export default {
return
[];
}
},
di
logField
Visible
:
{
di
alog
Visible
:
{
type
:
Boolean
,
default
:
false
},
...
...
@@ -58,17 +58,17 @@ export default {
},
methods
:
{
submitFields
()
{
this
.
$emit
(
'update:di
logField
Visible'
,
false
);
this
.
$emit
(
'update:di
alog
Visible'
,
false
);
this
.
$emit
(
'submit'
,
this
.
checkedFieldsCopy
.
join
(
","
));
},
cancel
()
{
this
.
checkedFieldsCopy
=
[].
concat
(
this
.
checkedFields
);
this
.
$emit
(
'update:di
logField
Visible'
,
false
);
this
.
$emit
(
'update:di
alog
Visible'
,
false
);
}
},
watch
:
{
di
logField
Visible
(
n
,
o
)
{
di
alog
Visible
(
n
,
o
)
{
if
(
!!
n
)
this
.
checkedFieldsCopy
=
[].
concat
(
this
.
checkedFields
);
}
...
...
src/components/allCustomers/index.js
View file @
ee461ea5
import
NavPath
from
"@/common/navbar/navbar.vue"
;
import
tableColumDailog
from
"./components/tableColumDailog.vue"
;
import
UserInfoCard
from
"./components/UserInfoCard.vue"
;
import
tableColumDailog
from
"./components/tableColumDialog.vue"
;
import
integralDailog
from
"./components/integralDialog.vue"
;
import
gradeDailog
from
"./components/gradeDialog.vue"
;
import
mainstoreDailog
from
"./components/mainstoreDialog.vue"
;
import
substoreDailog
from
"./components/substoreDialog.vue"
;
import
batchList
from
"./components/batchList.vue"
;
import
{
doFetch
,
doFetchqs
}
from
"../../components/axios/api"
;
import
url
from
"../../components/axios/url"
;
import
{
mapState
}
from
"vuex"
;
import
{
formatLongTime
,
paddingBorth
,
debounce
}
from
"@/utils/utils"
;
import
{
checkFalse
,
checkStatus
,
checkSuccess
}
from
"../../../static/js/checkStatus"
;
import
defaultImg
from
"../../../static/img/default.png"
;
import
{
checkFalse
,
checkStatus
,
checkSuccess
}
from
"../../../static/js/checkStatus"
;
export
default
{
name
:
"allCustomersList"
,
data
()
{
...
...
@@ -33,13 +33,18 @@ export default {
totalCount
:
0
,
loading
:
false
,
tableData
:
[],
customType
:[],
multipleList
:
[],
// 列表select选择
customType
:
[],
showSearch
:
false
,
// 高级搜索开关
toggleTag
:
false
,
// 人群筛选器按钮开关
dilogFieldVisible
:
false
,
// 列表字段设置弹窗开关
di
a
logFieldVisible
:
false
,
// 列表字段设置弹窗开关
memberFields
:
[],
// 列表字段
checkedFields
:
[],
// 已选列表字段
memberFieldsName
:
{},
// 已选列表字段名称
dialogIntegralVisible
:
false
,
dialogGradeVisible
:
false
,
dialogMainstoreVisible
:
false
,
dialogSubStoreVisible
:
false
,
selectAll
:
false
,
// 列表全选开关
multipleList
:
[],
// 列表已选客户
batchOpt
:
[
...
...
@@ -50,13 +55,20 @@ export default {
{
value
:
"batchImport"
,
label
:
"批量导入"
}
],
isdot
:
false
,
// 批量处理记录标记
processList
:
[]
// 批量处理记录
processList
:
[],
// 批量处理记录
defaultImg
,
integralFlag
:
""
,
// 积分调整权限
memberGrade
:[],
// 商户等级列表
cliqueMemberGrade
:[],
// 集团等级列表
};
},
components
:
{
NavPath
,
tableColumDailog
,
UserInfoCard
,
integralDailog
,
gradeDailog
,
mainstoreDailog
,
substoreDailog
,
batchList
},
computed
:
{
...
...
@@ -75,29 +87,37 @@ export default {
return
"性别未知"
;
break
;
}
},
sexFilter
:
function
(
v
)
{
switch
(
v
)
{
case
1
:
return
"男"
;
break
;
case
2
:
return
"女"
;
break
;
default
:
return
"性别未知"
;
break
;
}
}
},
created
()
{
this
.
$store
.
commit
(
"mutations-slide"
,
true
);
this
.
initialize
();
this
.
getGradeList
();
this
.
getCliqueGradeList
();
},
mounted
()
{
this
.
getFindMemberFields
();
this
.
getAjaxMembers
();
this
.
getEnterpriseInfo
();
},
methods
:
{
initialize
()
{
this
.
pageParam
.
phoneNameCard
=
!!
sessionStorage
.
getItem
(
"phoneNameCard"
)
?
sessionStorage
.
getItem
(
"phoneNameCard"
)
:
""
;
this
.
pageParam
.
currentPage
=
!!
sessionStorage
.
getItem
(
"currentPage"
)
?
sessionStorage
.
getItem
(
"currentPage"
)
:
1
;
},
handleCurrentChange
(
val
)
{
this
.
pageParam
.
currentPage
=
val
;
sessionStorage
.
setItem
(
"currentPage"
,
val
);
this
.
getAjaxMembers
();
},
handleSizeChange
(
val
)
{
this
.
pageParam
.
pageSize
=
val
;
this
.
getAjaxMembers
();
},
onSearch
()
{
this
.
pageParam
.
currentPage
=
1
;
this
.
getAjaxMembers
();
...
...
@@ -196,7 +216,7 @@ export default {
memberFields
.
push
(
item
);
});
this
.
checkedFields
=
[].
concat
(
checkedFields
);
console
.
log
(
this
.
checkedFields
);
console
.
log
(
this
.
checkedFields
);
this
.
memberFields
=
[].
concat
(
memberFields
);
this
.
memberFieldsName
=
Object
.
assign
({},
memberFieldsName
);
// this.$nextTick(_ => {
...
...
@@ -229,7 +249,9 @@ export default {
});
},
// 处理table select事件
handleSelectionChange
()
{},
handleSelectionChange
(
val
)
{
this
.
multipleList
=
val
;
},
// 处理table 排序事件
sortChange
(
column
,
prop
,
order
)
{
this
.
pageParam
.
sortColName
=
column
.
prop
;
...
...
@@ -261,7 +283,7 @@ export default {
// 人群筛选器 - 隐藏保存按钮和确认按钮 (子组件会调用)
hideBtn
(
refresh
)
{
if
(
refresh
==
0
)
{
this
.
memberSearchStr
=
-
1
;
this
.
pageParam
.
memberSearchStr
=
-
1
;
this
.
getAjaxMembers
();
this
.
toggleTag
=
false
;
}
...
...
@@ -284,6 +306,7 @@ export default {
},
// 批量处理
handleFocusBatch
(
val
)
{
console
.
log
(
val
);
if
(
this
.
batchValue
==
"batchImport"
)
{
// 批量导入
this
.
batchValue
=
""
;
...
...
@@ -294,36 +317,46 @@ export default {
return
false
;
}
if
(
this
.
batchValue
==
"integral"
)
{
this
.
dilogIntegralVisible
=
true
;
this
.
getEnterpriseInfo
();
if
(
this
.
$refs
.
IntegralForm
)
{
this
.
$refs
.
IntegralForm
.
resetFields
();
}
return
;
this
.
dialogIntegralVisible
=
true
;
}
else
if
(
this
.
batchValue
==
"grade"
)
{
this
.
dilogGradeVisible
=
true
;
if
(
this
.
showEditClique
)
{
this
.
gradeForm
.
isClique
=
1
;
}
if
(
this
.
$refs
.
gradeForm
)
{
this
.
$refs
.
gradeForm
.
resetFields
();
}
return
;
this
.
dialogGradeVisible
=
true
;
}
else
if
(
this
.
batchValue
==
"mainstore"
)
{
this
.
dilogMainstoreVisible
=
true
;
this
.
selectStore
(
val
);
if
(
this
.
$refs
.
mainstoreForm
)
{
this
.
$refs
.
mainstoreForm
.
resetFields
();
}
// this.storeName = '';
return
;
this
.
dialogMainstoreVisible
=
true
;
}
else
if
(
this
.
batchValue
==
"store"
)
{
this
.
dilogSubStoreVisible
=
true
;
if
(
this
.
$refs
.
storeForm
)
{
this
.
$refs
.
storeForm
.
resetFields
();
}
return
;
this
.
dialogSubStoreVisible
=
true
;
}
this
.
batchValue
=
""
;
},
batchRefresh
()
{
this
.
getAjaxMembers
();
this
.
getProcessList
();
},
getGradeList
()
{
doFetch
(
url
.
gradeList
)
.
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
this
.
memberGrade
=
res
.
data
.
result
||
[];
}
else
{
checkFalse
(
res
.
data
.
message
);
return
false
;
}
})
.
catch
(
err
=>
{
checkStatus
(
err
);
});
},
getCliqueGradeList
()
{
doFetch
(
url
.
cliqueGradeList
).
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
this
.
cliqueMemberGrade
=
res
.
data
.
result
||
[];
}
else
{
checkFalse
(
res
.
data
.
message
);
return
false
;
}
})
.
catch
(
err
=>
{
checkStatus
(
err
);
});
},
// 在经过批量处理之后调用
getProcessList
()
{
...
...
@@ -346,6 +379,25 @@ export default {
.
catch
(
err
=>
{
checkStatus
(
err
);
});
},
linkDetail
(
memberId
)
{
this
.
$router
.
push
({
path
:
"/wechatTotalDetail"
,
query
:
{
memberId
:
memberId
}
});
},
getEnterpriseInfo
()
{
doFetch
(
url
.
enterpriseInfo
)
.
then
(
res
=>
{
if
(
res
.
data
.
errorCode
==
0
)
{
this
.
integralFlag
=
res
.
data
.
result
.
enterpriseInfo
.
integralFlag
;
}
else
{
checkFalse
();
}
})
.
catch
(
err
=>
{
checkStatus
(
err
);
});
}
}
};
static/css/index.styl
View file @
ee461ea5
...
...
@@ -399,7 +399,7 @@ p {
margin 0
.el-table th, .el-table tr.curheader
background-color #f1f3f7
background-color #f1f3f7
!important
.el-table::before
height 0
...
...
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