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
ff8cb874
Commit
ff8cb874
authored
May 28, 2019
by
member
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sads
parent
eb2181ef
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
127 deletions
+45
-127
index.html
index.html
+1
-0
wechatmembers.js
src/components/wechatmembers/wechatmembers.js
+21
-103
people.vue
src/test/people.vue
+18
-19
selector.vue
src/test/selector.vue
+5
-5
No files found.
index.html
View file @
ff8cb874
...
...
@@ -20,5 +20,6 @@
<script
src=
"//web-1251519181.cos.ap-shanghai.myqcloud.com/components/footer.2.0.02.js"
></script>
<script
src=
"//web-1251519181.cos.ap-shanghai.myqcloud.com/components/store.2.0.00.js"
></script>
<script
src=
"//web-1251519181.cos.ap-shanghai.myqcloud.com/components/card.2.0.01.js"
></script>
<script
src=
"//web-1251519181.cos.ap-shanghai.myqcloud.com/components/selector.1.1.23.js"
></script>
</body>
</html>
src/components/wechatmembers/wechatmembers.js
View file @
ff8cb874
...
...
@@ -12,6 +12,7 @@ import { formatLongTime, paddingBorth } from "@/utils/utils";
import
{
mapState
}
from
"vuex"
;
let
showFields
=
[];
let
fieldOptions
=
[];
const
FieldsReceivable
=
[
'costAll'
,
'costFeeReceivable'
,
'highCost'
,
'highCostReceivable'
,
'lastCost'
,
'lastCostReceivable'
];
...
...
@@ -147,99 +148,8 @@ export default {
},
filters
:
{
formatField
:
function
(
val
)
{
let
tempVal
=
val
;
let
returnVal
=
""
;
if
(
tempVal
==
"name"
)
{
returnVal
=
"基本信息"
;
}
if
(
tempVal
==
"grade"
)
{
returnVal
=
"会员等级"
;
}
if
(
tempVal
==
"status"
)
{
returnVal
=
"状态"
;
}
if
(
tempVal
==
"channel"
)
{
returnVal
=
"关联渠道"
;
}
if
(
tempVal
==
"crateCardDateString"
)
{
returnVal
=
"开卡时间"
;
}
if
(
tempVal
==
"createTime"
)
{
returnVal
=
"新增时间"
;
}
if
(
tempVal
==
"attentionDate"
)
{
returnVal
=
"关注时间"
;
}
if
(
tempVal
==
"costAll"
)
{
returnVal
=
"消费总额(应收)"
;
}
if
(
tempVal
==
"costTimes"
)
{
returnVal
=
"消费次数"
;
}
if
(
tempVal
==
"lastCost"
)
{
returnVal
=
"最近消费(应收)"
;
}
if
(
tempVal
==
"avgCost"
)
{
returnVal
=
"客单价"
;
}
if
(
tempVal
==
"avgNumber"
)
{
returnVal
=
"连带率"
;
}
if
(
tempVal
==
"costCategory"
)
{
returnVal
=
"消费品类"
;
}
if
(
tempVal
==
"discountRate"
)
{
returnVal
=
"平均折扣"
;
}
if
(
tempVal
==
"cancelAttentionTime"
)
{
returnVal
=
"取关时间"
;
}
if
(
tempVal
==
"age"
)
{
returnVal
=
"年龄"
;
}
if
(
tempVal
==
"birthday"
)
{
returnVal
=
"生日"
;
}
if
(
tempVal
==
"storedValueAll"
)
{
returnVal
=
"储值总额"
;
}
if
(
tempVal
==
"storedValueCurrent"
)
{
returnVal
=
"储值余额"
;
}
if
(
tempVal
==
"lastCostTime"
)
{
returnVal
=
"最近消费时间"
;
}
if
(
tempVal
==
"pointsAll"
)
{
returnVal
=
"累计积分"
;
}
if
(
tempVal
==
"pointsCurrent"
)
{
returnVal
=
"积分余额"
;
}
if
(
tempVal
==
"mainStoreName"
)
{
returnVal
=
"主门店"
;
}
if
(
tempVal
==
"createCardStoreName"
)
{
returnVal
=
"开卡门店"
;
}
if
(
tempVal
==
"cardNo"
)
{
returnVal
=
"会员卡号"
;
}
if
(
tempVal
==
"frozenStatus"
)
{
returnVal
=
"会员状态"
;
}
if
(
tempVal
==
"costFeePaid"
)
{
returnVal
=
"消费总额(实付)"
;
}
if
(
tempVal
==
"lastCostPaid"
)
{
returnVal
=
"最近消费(实付)"
;
}
if
(
tempVal
==
"highCost"
)
{
returnVal
=
"最高单笔(应收)"
;
}
if
(
tempVal
==
"highCostPaid"
)
{
returnVal
=
"最高单笔(实付)"
;
}
return
returnVal
;
let
index
=
fieldOptions
.
findIndex
(
el
=>
el
.
code
==
val
);
return
fieldOptions
[
index
].
name
;
},
formatFieldName
:
function
(
val
)
{
let
idx
=
showFields
.
findIndex
(
value
=>
{
...
...
@@ -987,16 +897,23 @@ export default {
?
sessionStorage
.
getItem
(
"currentPage"
)
:
1
;
},
// 获取会员协管门店
// getSubStoreList() {
// doFetchqs(url.getSubStoreList, {
// memberIds: ,
// isCurrent: ,
// memberSearchParamStr: '',
// phoneNameCard: ''
// })
// }
fieldList
()
{
doFetch
(
url
.
findMemberFields
,
{
pageName
:
this
.
pageName
})
.
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
const
List
=
res
.
data
.
result
;
if
(
List
&&
List
.
length
)
{
fieldOptions
=
List
;
}
else
{
fieldOptions
=
[];
}
}
else
{
fieldOptions
=
[];
}
})
}
},
activated
()
{
this
.
$store
.
commit
(
"mutations-slide"
,
false
);
...
...
@@ -1005,6 +922,7 @@ export default {
});
},
created
()
{
this
.
fieldList
();
if
(
!
this
.
storeImageUrl
)
{
this
.
$store
.
dispatch
(
"getStorePicture"
);
}
...
...
src/test/people.vue
View file @
ff8cb874
...
...
@@ -28,58 +28,57 @@ export default {
data
()
{
return
{
可传参数
projectName
:
""
,
当前项目名
sceneValue
:
"member"
,
场景值
useId
:
""
,
模板
id
hasSearchData
:
""
,
当前页回显的数据
(
接口返回
)
operateType
:
true
,
编辑的时候是
false
新增是
true
例如列表筛选是开始
true
编辑改成
false
toggleTag
:
false
,
控制
(
确认取消
)
按钮显示的参数
,
仅供参考
,
可自行修改
saveTag
:
false
控制
(
保存
)
按钮显示的参数
,
仅供参考
,
可自行修改
//
可传参数
projectName
:
""
,
//
当前项目名
sceneValue
:
"member"
,
//
场景值
useId
:
""
,
//
模板id
hasSearchData
:
""
,
//
当前页回显的数据(接口返回)
operateType
:
true
,
//
编辑的时候是false 新增是true 例如列表筛选是开始true 编辑改成false
toggleTag
:
false
,
//
控制(确认取消)按钮显示的参数,仅供参考,可自行修改
saveTag
:
false
//
控制(保存)按钮显示的参数,仅供参考,可自行修改
};
},
beforeMount
()
{
(
如果需要传递数据
)
请求的数据最好在这里写
//
(如果需要传递数据)请求的数据最好在这里写
},
methods
:
{
父组件调用子组件方法
,
触发父组件事件
//
父组件调用子组件方法,触发父组件事件
getData
()
{
this
.
$refs
.
peopleFilter
.
confirmSet
();
},
子组件触发父组件事件
,
返回过滤条件数据
//
子组件触发父组件事件,返回过滤条件数据
findFilter
(
value
)
{
var
that
=
this
;
},
取消
//
取消
cancelFilter
()
{
this
.
$refs
.
peopleFilter
.
cancelSet
();
},
获取需要回显的数据
,
供保存时候使用
//
获取需要回显的数据, 供保存时候使用
getBackData
(
val
)
{
this
.
getSaveData
=
val
;
},
显示编辑
,
保存按钮隐藏
,
确认按钮显示
(
子组件会调用
)
//
显示编辑,保存按钮隐藏,确认按钮显示 (子组件会调用)
editShow
()
{
var
that
=
this
;
that
.
toggleTag
=
true
;
that
.
saveTag
=
false
;
},
显示保存按钮
,
隐藏确认按钮显示
(
子组件会调用
)
//
显示保存按钮,隐藏确认按钮显示 (子组件会调用)
editHide
()
{
var
that
=
this
;
that
.
toggleTag
=
false
;
that
.
saveTag
=
true
;
},
隐藏保存按钮和确认按钮
(
子组件会调用
)
传个参数给父组件
来查数据
//
隐藏保存按钮和确认按钮 (子组件会调用)
//
传个参数给父组件 来查数据
hideBtn
(
refresh
)
{
if
(
refresh
===
0
)
{
this
.
memberSearchStr
=
-
1
;
this
.
toggleTag
=
false
;
查数据的方法
}
},
保存当前模板
,
对接保存接口
//
保存当前模板,对接保存接口
saveTempData
()
{
var
that
=
this
;
}
...
...
src/test/selector.vue
View file @
ff8cb874
<
template
>
<div
class=
"selector-router"
>
<vue-gic-
selector
ref=
"selector"
></vue-gic
-selector>
<vue-gic-
goods-selector
ref=
"selector"
></vue-gic-goods
-selector>
<div
class=
"gic-button"
>
<el-button
type=
"primary"
...
...
@@ -21,16 +21,16 @@
</
template
>
<
script
>
import
vueGicSelector
from
"./goods/index.vue"
;
//
import vueGicSelector from "./goods/index.vue";
import
{
doFetchqs
}
from
"../components/axios/api"
;
import
{
baseUrl
,
ERR_OK
}
from
"@/config/index.js"
;
export
default
{
name
:
"selector"
,
components
:
{
vueGicSelector
},
//
components: {
//
vueGicSelector
//
},
data
()
{
return
{
...
...
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