Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-equity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 335a0f51
authored
Apr 13, 2021
by
zhouzy
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
日期格式更改
1 parent
4d85cd19
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
93 deletions
src/views/customer/collectionManagement/index.vue
src/views/customer/rightsCardManagement/index.vue
src/views/customer/collectionManagement/index.vue
View file @
335a0f5
...
@@ -76,8 +76,8 @@
...
@@ -76,8 +76,8 @@
</el-form-item>
</el-form-item>
</span>
</span>
<span
class=
"itemRightContainer"
>
<span
class=
"itemRightContainer"
>
<el-form-item
label=
"
归属渠道
:"
>
<el-form-item
label=
"
批次
:"
>
{{
cardsInformationForm
.
attributionChannel
}}
{{
cardsInformationForm
.
batchId
}}
</el-form-item>
</el-form-item>
</span>
</span>
<span
class=
"itemLeftContainer"
>
<span
class=
"itemLeftContainer"
>
...
@@ -86,8 +86,8 @@
...
@@ -86,8 +86,8 @@
</el-form-item>
</el-form-item>
</span>
</span>
<span
class=
"itemRightContainer"
>
<span
class=
"itemRightContainer"
>
<el-form-item
label=
"
批次
:"
>
<el-form-item
label=
"
已激活
:"
>
{{
cardsInformationForm
.
batchId
}}
{{
cardsInformationForm
.
activationCount
||
'0'
}}
(
{{
(
ChangeDecimalToPercentage
(
this
.
cardsInformationForm
.
activationCount
/
this
.
cardsInformationForm
.
number
))
}}
)
</el-form-item>
</el-form-item>
</span>
</span>
<span
class=
"itemLeftContainer"
>
<span
class=
"itemLeftContainer"
>
...
@@ -96,9 +96,7 @@
...
@@ -96,9 +96,7 @@
</el-form-item>
</el-form-item>
</span>
</span>
<span
class=
"itemRightContainer"
>
<span
class=
"itemRightContainer"
>
<el-form-item
label=
"已激活:"
>
<el-form-item
label=
""
>
</el-form-item>
{{
cardsInformationForm
.
activationCount
}}
</el-form-item>
</span>
</span>
</el-form>
</el-form>
<div>
权益明细:
</div>
<div>
权益明细:
</div>
...
@@ -267,7 +265,7 @@
...
@@ -267,7 +265,7 @@
设备SN:
设备SN:
<div
class=
"Input"
>
<div
class=
"Input"
>
<el-input
<el-input
v-model=
"collectionListSearch.condition.s
earchValue
"
v-model=
"collectionListSearch.condition.s
n
"
placeholder=
"请输入设备SN"
placeholder=
"请输入设备SN"
size=
"small"
size=
"small"
></el-input>
></el-input>
...
@@ -456,6 +454,7 @@ export default {
...
@@ -456,6 +454,7 @@ export default {
// endData:"",
// endData:"",
// getmemberRights:getmemberRights,
// getmemberRights:getmemberRights,
// exportMemberCard: exportMemberCard,
// exportMemberCard: exportMemberCard,
// rate: ChangeDecimalToPercentage(this.cardsInformationForm.activationCount/this.cardsInformationForm.number),
colletionDate
:
""
,
colletionDate
:
""
,
batchDate
:
""
,
batchDate
:
""
,
date_format
,
date_format
,
...
@@ -469,14 +468,13 @@ export default {
...
@@ -469,14 +468,13 @@ export default {
},
},
// 领用弹窗列表搜索
// 领用弹窗列表搜索
collectionListSearch
:
{
collectionListSearch
:
{
condition
:{
condition
:
{
beginTime
:
""
||
null
,
beginTime
:
""
||
null
,
endTime
:
""
||
null
,
endTime
:
""
||
null
,
searchValue
:
""
||
null
,
sn
:
""
||
null
,
mobile
:
""
||
null
,
mobile
:
""
||
null
,
defineCode
:
""
||
null
defineCode
:
""
||
null
,
}
},
},
},
// 批次弹窗列表搜索项
// 批次弹窗列表搜索项
batchPopupListSearch
:
{
batchPopupListSearch
:
{
...
@@ -559,6 +557,13 @@ export default {
...
@@ -559,6 +557,13 @@ export default {
label
:
"激活数量"
,
label
:
"激活数量"
,
prop
:
"activationCount"
,
prop
:
"activationCount"
,
// minWidth: '200'
// minWidth: '200'
formatter
:
(
cellValue
)
=>
{
if
(
cellValue
.
activationCount
)
{
return
cellValue
.
activationCount
;
}
else
{
return
0
;
}
},
},
},
{
{
label
:
"生成时间"
,
label
:
"生成时间"
,
...
@@ -639,7 +644,7 @@ export default {
...
@@ -639,7 +644,7 @@ export default {
},
},
{
{
label
:
"设备SN"
,
label
:
"设备SN"
,
prop
:
"s
earchValue
"
,
prop
:
"s
n
"
,
},
},
{
{
label
:
"账号"
,
label
:
"账号"
,
...
@@ -680,8 +685,8 @@ export default {
...
@@ -680,8 +685,8 @@ export default {
prop
:
"status"
,
prop
:
"status"
,
formatter
:
(
cellValue
)
=>
{
formatter
:
(
cellValue
)
=>
{
return
{
return
{
1
:
'已激活'
,
1
:
"已激活"
,
0
:
'未激活'
0
:
"未激活"
,
}[
cellValue
.
status
];
}[
cellValue
.
status
];
},
},
minWidth
:
"200"
,
minWidth
:
"200"
,
...
@@ -690,7 +695,6 @@ export default {
...
@@ -690,7 +695,6 @@ export default {
},
},
// 批量生成权益卡弹窗表格
// 批量生成权益卡弹窗表格
generateRightCardsForm
:
{
generateRightCardsForm
:
{
applicableChannel
:
""
,
relatedRightsPackage
:
""
,
relatedRightsPackage
:
""
,
cardsNumber
:
""
,
cardsNumber
:
""
,
remarks
:
""
,
remarks
:
""
,
...
@@ -708,7 +712,7 @@ export default {
...
@@ -708,7 +712,7 @@ export default {
// 领用详情界面弹窗
// 领用详情界面弹窗
collectPoupdetailTable
:
{
collectPoupdetailTable
:
{
cardId
:
""
cardId
:
""
,
},
},
// 用户详情
// 用户详情
userInformationForm
:
{
userInformationForm
:
{
...
@@ -741,9 +745,9 @@ export default {
...
@@ -741,9 +745,9 @@ export default {
prop
:
"rightStatus"
,
prop
:
"rightStatus"
,
formatter
:
(
cellValue
)
=>
{
formatter
:
(
cellValue
)
=>
{
return
{
return
{
0
:
"正常"
0
:
"正常"
,
}[
cellValue
.
status
];
}[
cellValue
.
status
];
}
}
,
},
},
{
{
label
:
"有效期"
,
label
:
"有效期"
,
...
@@ -849,35 +853,35 @@ export default {
...
@@ -849,35 +853,35 @@ export default {
this
.
userInformationForm
=
row
;
this
.
userInformationForm
=
row
;
this
.
rightsCardInformationForm
=
row
;
this
.
rightsCardInformationForm
=
row
;
this
.
detailsVisible
=
true
;
this
.
detailsVisible
=
true
;
this
.
collectPoupdetailTable
.
cardId
=
row
.
id
this
.
collectPoupdetailTable
.
cardId
=
row
.
id
;
this
.
$refs
.
detailTable
.
refreshTable
()
this
.
$refs
.
batchdetailPopupTable
&&
this
.
$refs
.
batchdetailPopupTable
.
refreshTable
();
},
},
// 改变批次日期数据格式
// 改变批次日期数据格式
changeBatchDataFormat
()
{
changeBatchDataFormat
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
batchListSearch
.
createdDateEnd
=
this
.
batchDate
this
.
batchListSearch
.
createdDateEnd
=
this
.
batchDate
?
this
.
batchDate
[
1
]
+
' 23:59:59'
?
this
.
batchDate
[
1
]
+
" 23:59:59"
:
''
:
""
;
this
.
batchListSearch
.
createdDateStart
=
this
.
batchDate
this
.
batchListSearch
.
createdDateStart
=
this
.
batchDate
?
this
.
batchDate
[
0
]
+
' 00:00:01'
?
this
.
batchDate
[
0
]
+
" 00:00:01"
:
''
;
:
""
;
this
.
batchListSearch
.
batchId
=
parseInt
(
this
.
selectBatchId
)
this
.
batchListSearch
.
batchId
=
parseInt
(
this
.
selectBatchId
)
;
console
.
log
(
this
.
batchListSearch
)
console
.
log
(
this
.
batchListSearch
)
;
resolve
()
resolve
()
;
})
})
;
},
},
//改变领用日期数据格式
//改变领用日期数据格式
changeCollectionDataFormat
()
{
changeCollectionDataFormat
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
this
.
colletionDate
)
console
.
log
(
this
.
colletionDate
)
;
this
.
collectionListSearch
.
condition
.
endTime
=
this
.
colletionDate
this
.
collectionListSearch
.
condition
.
endTime
=
this
.
colletionDate
?
this
.
colletionDate
[
1
]
+
' 23:59:59'
?
this
.
colletionDate
[
1
]
+
" 23:59:59"
:
''
||
undefined
:
""
||
undefined
;
this
.
collectionListSearch
.
condition
.
beginTime
=
this
.
colletionDate
this
.
collectionListSearch
.
condition
.
beginTime
=
this
.
colletionDate
?
this
.
colletionDate
[
0
]
+
' 00:00:01'
?
this
.
colletionDate
[
0
]
+
" 00:00:01"
:
''
||
undefined
:
""
||
undefined
;
resolve
()
resolve
()
;
})
})
;
},
},
// 领用详情搜索
// 领用详情搜索
// beforecollectionListSearch() {
// beforecollectionListSearch() {
...
@@ -889,25 +893,25 @@ export default {
...
@@ -889,25 +893,25 @@ export default {
// 批次管理弹窗搜索
// 批次管理弹窗搜索
beforebatchPopupListSearch
()
{
beforebatchPopupListSearch
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
batchPopupListSearch
.
batchId
=
+
this
.
cardsInformationForm
.
batchId
this
.
batchPopupListSearch
.
batchId
=
+
this
.
cardsInformationForm
.
batchId
;
this
.
batchPopupListSearch
.
cardNo
=
this
.
BatchDetailInformationForm
.
cardName
this
.
batchPopupListSearch
.
cardNo
=
this
.
BatchDetailInformationForm
.
cardName
;
this
.
batchPopupListSearch
.
mobile
=
this
.
BatchDetailInformationForm
.
account
this
.
batchPopupListSearch
.
mobile
=
this
.
BatchDetailInformationForm
.
account
;
resolve
()
resolve
()
;
})
})
;
},
},
handleClick
(
tab
,
event
)
{
},
handleClick
(
tab
,
event
)
{
},
handleChange
(
value
)
{
},
handleChange
(
value
)
{
},
// 关闭批量生成界面
// 关闭批量生成界面
handleClose
(
done
)
{
handleClose
(
done
)
{
this
.
generateRightCardsForm
=
{}
this
.
generateRightCardsForm
=
{}
;
this
.
$refs
.
ruleForm
.
clearValidate
()
this
.
$refs
.
ruleForm
.
clearValidate
()
;
done
()
done
()
;
},
},
//取消批量制造
//取消批量制造
cancelGenerate
()
{
cancelGenerate
()
{
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
;
this
.
generateRightCardsForm
=
{}
this
.
generateRightCardsForm
=
{}
;
this
.
$refs
.
ruleForm
.
clearValidate
()
this
.
$refs
.
ruleForm
.
clearValidate
()
;
},
},
// 批量制造卡片
// 批量制造卡片
generateCards
(
formName
)
{
generateCards
(
formName
)
{
...
@@ -917,68 +921,56 @@ export default {
...
@@ -917,68 +921,56 @@ export default {
defineCode
:
this
.
generateRightCardsForm
.
Code
,
defineCode
:
this
.
generateRightCardsForm
.
Code
,
// merchantId: this.merchantId,
// merchantId: this.merchantId,
// merchantName: this.merchantName + '',
// merchantName: this.merchantName + '',
remark
:
this
.
generateRightCardsForm
.
remarks
+
''
// remarks清空后转为空字符串,不然会undefined
}
remark
:
this
.
generateRightCardsForm
.
remarks
||
''
};
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
generateMemberBatch
(
params
).
then
((
res
)
=>
{
generateMemberBatch
(
params
).
then
((
res
)
=>
{
if
(
res
>
0
)
{
if
(
res
>
0
)
{
this
.
$message
({
this
.
$message
({
message
:
'增添成功'
,
message
:
"增添成功"
,
type
:
'success'
type
:
"success"
,
})
})
;
this
.
generateRightCardsForm
=
{}
this
.
generateRightCardsForm
=
{}
;
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
;
// location. reload()
// location. reload()
this
.
$refs
.
batchDetailTable
.
refreshTable
()
this
.
$refs
.
batchDetailTable
.
refreshTable
()
;
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
'增添失败!'
,
message
:
"增添失败!"
,
type
:
'error'
type
:
"error"
,
})
})
;
}
}
})
})
;
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
'请填写必选项!'
,
message
:
"请填写必选项!"
,
type
:
'error'
type
:
"error"
,
})
})
;
return
false
return
false
;
}
}
})
});
// generateMemberBatch(params).then((res) => {
},
// console.log(res);
//小数转化为百分比
// if (res > 0) {
ChangeDecimalToPercentage
(
data
)
{
// this.$message({
let
data1
=
(
data
*
100
).
toFixed
(
0
)
+
"%"
// message: "增添成功!",
return
data1
// type: "success",
// });
// this.generateRightCardsForm = {}
// this.dialogVisible = false;
// // location. reload()
// this.$refs.batchDetailTable.refreshTable()
// } else {
// this.$message({
// message: "增添失败!",
// type: "error",
// });
// }
// });
},
},
// 批次详情弹窗
// 批次详情弹窗
batchdetails
(
row
)
{
batchdetails
(
row
)
{
console
.
log
(
row
)
console
.
log
(
row
)
;
this
.
cardsInformationForm
=
row
this
.
cardsInformationForm
=
row
;
this
.
batchdetailsVisible
=
true
this
.
batchdetailsVisible
=
true
;
this
.
$refs
.
batchdetailPopupTable
.
refreshTable
()
this
.
$refs
.
batchdetailPopupTable
.
refreshTable
()
;
},
},
// dataExport(){
// dataExport(){
// }
// }
// 关闭详情界面
// 关闭详情界面
detailClose
(
done
)
{
detailClose
(
done
)
{
done
()
done
()
;
}
}
,
}
}
}
}
</
script
>
</
script
>
...
...
src/views/customer/rightsCardManagement/index.vue
View file @
335a0f5
...
@@ -96,7 +96,7 @@ export default {
...
@@ -96,7 +96,7 @@ export default {
},
},
{
{
label
:
'备注'
,
label
:
'备注'
,
prop
:
'
remarks
'
,
prop
:
'
memberDescription
'
,
minWidth
:
'200'
minWidth
:
'200'
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment