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
77783d21
Commit
77783d21
authored
Sep 23, 2021
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 调整接口
parent
37bbe730
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
108 additions
and
57 deletions
+108
-57
url.js
src/components/axios/url.js
+1
-0
posmembers.js
src/components/posmembers/posmembers.js
+53
-37
posmembers.vue
src/components/posmembers/posmembers.vue
+35
-20
main.js
src/main.js
+4
-0
directive.js
src/utils/directive.js
+15
-0
No files found.
src/components/axios/url.js
View file @
77783d21
...
...
@@ -30,6 +30,7 @@ const urlConfig = {
memberCount
:
'/api-member/ecommerce-member-count'
,
//微信会员、POS会员、电商会员和电商买家 人数统计
updateIntegrals
:
'/api-member/members-batch-update-integrals'
,
//批量修改会员积分
storeCodeName
:
'/api-plug/query-store-by-code-name'
,
//查询门店(code和name)
getOnlineStore
:
'/api-admin/store-list-paging'
,
// 获取门店列表
gradeList
:
'/api-admin/grade-list'
,
//获取会员等级列表
updateGrade
:
'/api-member/members-batch-update-grade'
,
//批量修改会员等级
updateStore
:
'/api-member/members-batch-update-store'
,
//批量修改会员主门店、协管门店
...
...
src/components/posmembers/posmembers.js
View file @
77783d21
...
...
@@ -138,7 +138,13 @@ export default {
authStatus
:
0
},
integralFlag
:
""
,
debounce
debounce
,
loadmoreStore
:
{
query
:
''
,
currentPage
:
0
,
totalPage
:
1
,
loading
:
false
}
};
},
computed
:
{
...
...
@@ -391,22 +397,34 @@ export default {
});
},
changeSubStore
()
{
if
(
this
.
storeForm
.
subOptType
==
1
)
{
this
.
storeForm
.
modefiySubStoreName
=
""
;
this
.
storeForm
.
modefiySubStoreId
=
""
;
this
.
storeForm
.
deleteSubStoreId
=
""
;
if
(
this
.
storeForm
.
subOptType
!=
1
)
{
this
.
storeForm
.
addSubStoreName
=
''
;
this
.
storeForm
.
addSubStoreId
=
''
;
}
if
(
this
.
storeForm
.
subOptType
=
=
2
)
{
this
.
storeForm
.
addSubStoreName
=
""
;
this
.
storeForm
.
addSubStoreId
=
""
;
this
.
storeForm
.
deleteSubStoreId
=
""
;
if
(
this
.
storeForm
.
subOptType
!
=
2
)
{
this
.
storeForm
.
premodefiySubStoreId
=
''
;
this
.
storeForm
.
modefiySubStoreName
=
''
;
this
.
storeForm
.
modefiySubStoreId
=
''
;
}
if
(
this
.
storeForm
.
subOptType
==
3
)
{
this
.
storeForm
.
addSubStoreName
=
""
;
this
.
storeForm
.
addSubStoreId
=
""
;
this
.
storeForm
.
modefiySubStoreName
=
""
;
this
.
storeForm
.
modefiySubStoreId
=
""
;
if
(
this
.
storeForm
.
subOptType
!=
3
)
{
this
.
storeForm
.
deleteSubStoreId
=
''
;
}
// if (this.storeForm.subOptType == 1) {
// this.storeForm.modefiySubStoreName = "";
// this.storeForm.modefiySubStoreId = "";
// this.storeForm.deleteSubStoreId = "";
// }
// if (this.storeForm.subOptType == 2) {
// this.storeForm.addSubStoreName = "";
// this.storeForm.addSubStoreId = "";
// this.storeForm.deleteSubStoreId = "";
// }
// if (this.storeForm.subOptType == 3) {
// this.storeForm.addSubStoreName = "";
// this.storeForm.addSubStoreId = "";
// this.storeForm.modefiySubStoreName = "";
// this.storeForm.modefiySubStoreId = "";
// }
},
submitStore
(
formName
)
{
this
.
$refs
[
formName
].
validate
(
valid
=>
{
...
...
@@ -481,31 +499,30 @@ export default {
}
});
},
getSubStoreList
()
{
let
memberIdsArr
=
[];
if
(
this
.
multipleList
.
length
>
0
)
{
this
.
multipleList
.
forEach
(
item
=>
{
memberIdsArr
.
push
(
item
.
memberId
);
});
}
else
{
checkFalse
(
"会员不能为空"
);
return
false
;
}
doFetch
(
url
.
membersSubStoreList
,
{
memberIds
:
memberIdsArr
.
join
(
","
),
isCurrent
:
this
.
selectAll
==
true
?
2
:
this
.
multipleList
.
length
==
this
.
page
.
pageSize
?
1
:
0
,
memberSearchParamStr
:
"-1"
,
phoneNameCard
:
this
.
phoneNameCard
,
pageName
:
this
.
pageName
getOnlineStore
()
{
const
{
query
,
currentPage
,
loading
,
totalPage
}
=
this
.
loadmoreStore
;
if
(
loading
||
currentPage
>=
totalPage
)
return
;
this
.
loadmoreStore
.
loading
=
true
;
doFetchqs
(
url
.
getOnlineStore
,
{
currentPage
:
currentPage
+
1
,
pageSize
:
20
,
searchName
:
query
}).
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
this
.
subStoreList
=
res
.
data
.
result
.
storeList
;
const
{
errorCode
,
message
,
result
}
=
res
.
data
||
{};
if
(
errorCode
==
0
)
{
this
.
subStoreList
=
this
.
subStoreList
.
concat
(
result
.
list
||
[]);
this
.
loadmoreStore
.
totalPage
=
result
.
page
.
totalPage
||
1
;
this
.
loadmoreStore
.
currentPage
=
currentPage
+
1
;
}
else
{
checkFalse
(
res
.
data
.
message
);
checkFalse
(
message
);
}
}).
catch
(
err
=>
{
checkStatus
(
err
);
});
}).
finally
(()
=>
this
.
loadmoreStore
.
loading
=
false
);
},
getSubStoreList
(
query
)
{
this
.
loadmoreStore
.
query
=
query
;
this
.
loadmoreStore
.
currentPage
=
0
;
this
.
subStoreList
=
[];
this
.
getOnlineStore
();
},
closeProcess
()
{
clearInterval
(
this
.
timer
);
...
...
@@ -886,7 +903,6 @@ export default {
if
(
this
.
$refs
.
storeForm
)
{
this
.
$refs
.
storeForm
.
resetFields
();
}
this
.
getSubStoreList
();
return
;
}
this
.
batchValue
=
''
;
...
...
src/components/posmembers/posmembers.vue
View file @
77783d21
...
...
@@ -683,16 +683,18 @@
<el-radio
:label=
3
>
替换为最新协管的自营/联营门店
</el-radio>
</p>
<p
class=
"lheigth40"
>
<el-radio
:label=
4
>
自定义主门店
</el-radio>
<span
style=
"margin-left:40px;vertical-align: middle;font-size: 14px;"
>
{{storeName}}
</span>
<span
v-if=
"mainstoreForm.mainOptType == 4"
class=
"member-store-name"
@
click=
"changeStore"
>
{{storeName ? '修改' : '选择'}}主门店
</span>
<el-radio
:label=
4
>
自定义主门店
<span
style=
"margin-left:40px;font-size: 14px;"
>
{{storeName}}
</span>
<el-button
v-if=
"mainstoreForm.mainOptType == 4"
type=
"text"
@
click=
"changeStore"
>
{{storeName ? '修改' : '选择'}}主门店
</el-button>
</el-radio>
</p>
</el-radio-group>
...
...
@@ -745,12 +747,11 @@
v-model=
"storeForm.subOptType"
>
增加协管门店
<span
style=
"color: #000;"
>
{{ storeForm.addSubStoreName }}
</span>
<span
style=
"color: #000;"
<el-button
v-if=
"storeForm.subOptType == 1"
class=
"pointer
"
type=
"text
"
@
click=
"changeStore"
>
选择门店
</
spa
n>
>
选择门店
</
el-butto
n>
</el-radio>
<p>
<el-radio
...
...
@@ -758,10 +759,17 @@
:label=
2
v-model=
"storeForm.subOptType"
>
将协管门店
</el-radio>
<!-- 为了解决无搜索结果后选择框失焦后,再次点击选择框无下拉选项的场景,在visible-change时重新获取下拉选项数据 -->
<el-select
v-model=
"storeForm.premodefiySubStoreId"
placeholder=
"请选择"
filterable
remote
:remote-method=
"getSubStoreList"
:loading=
"loading"
placeholder=
"请输入关键字搜索门店"
:disabled=
"storeForm.subOptType == 2 ? false : true"
v-select-loadmore=
"getOnlineStore"
@
visible-change=
"(flag) => flag ? getSubStoreList() : ''"
>
<el-option
v-for=
"item in subStoreList"
...
...
@@ -770,11 +778,12 @@
:value=
"item.storeId"
></el-option>
</el-select>
修改为 {{ storeForm.modefiySubStoreName }}
<span
修改为 {{ storeForm.modefiySubStoreName }}
<el-button
v-if=
"storeForm.subOptType == 2"
class=
"pointer
"
type=
"text
"
@
click=
"changeStore"
>
选择门店
</
spa
n>
>
选择门店
</
el-butto
n>
</p>
<el-radio
@
change=
"changeSubStore"
...
...
@@ -783,8 +792,14 @@
>
将协管门店
<el-select
v-model=
"storeForm.deleteSubStoreId"
placeholder=
"请选择"
filterable
remote
:remote-method=
"getSubStoreList"
:loading=
"loading"
placeholder=
"请输入关键字搜索门店"
:disabled=
"storeForm.subOptType == 3 ? false : true"
v-select-loadmore=
"getOnlineStore"
@
visible-change=
"(flag) => flag ? getSubStoreList() : ''"
>
<el-option
v-for=
"item in subStoreList"
...
...
@@ -792,7 +807,7 @@
:label=
"item.storeName"
:value=
"item.storeId"
></el-option>
</el-select><span
style=
"c
olor: #000;c
ursor: default;"
>
删除
</span></el-radio>
</el-select><span
style=
"cursor: default;"
>
删除
</span></el-radio>
</el-form-item>
<el-form-item
label=
"原因备注"
...
...
src/main.js
View file @
77783d21
...
...
@@ -11,6 +11,7 @@ import '../static/css/dmreset.css'
import
gicinput
from
'./common/gicinput'
import
gictextarea
from
'./common/gictextarea'
import
'babel-polyfill'
;
import
directive
from
'./utils/directive.js'
;
// import vueGicCard from '@gic-test/vue-gic-card'
// import vueGicStore from '@gic-test/vue-gic-store'
...
...
@@ -73,6 +74,9 @@ axios.interceptors.response.use(
Object
.
keys
(
custom
).
forEach
(
key
=>
{
Vue
.
filter
(
key
,
custom
[
key
]);
});
Object
.
keys
(
directive
).
forEach
(
key
=>
{
Vue
.
directive
(
key
,
directive
[
key
]);
})
/* eslint-disable no-new */
new
Vue
({
...
...
src/utils/directive.js
0 → 100644
View file @
77783d21
export
default
{
// 下拉选项数据加载更多
'select-loadmore'
:
{
bind
(
el
,
binding
)
{
const
ul
=
el
.
querySelector
(
'.el-select-dropdown__wrap.el-scrollbar__wrap'
);
ul
.
addEventListener
(
'scroll'
,
function
(
event
)
{
if
(
this
.
scrollTop
+
this
.
clientHeight
>=
this
.
scrollHeight
)
{
if
(
typeof
binding
.
value
==
'function'
)
{
binding
.
value
()
}
}
})
}
}
}
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