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 @@
</el-form-item>
</span>
<span
class=
"itemRightContainer"
>
<el-form-item
label=
"
归属渠道
:"
>
{{
cardsInformationForm
.
attributionChannel
}}
<el-form-item
label=
"
批次
:"
>
{{
cardsInformationForm
.
batchId
}}
</el-form-item>
</span>
<span
class=
"itemLeftContainer"
>
...
...
@@ -86,8 +86,8 @@
</el-form-item>
</span>
<span
class=
"itemRightContainer"
>
<el-form-item
label=
"
批次
:"
>
{{
cardsInformationForm
.
batchId
}}
<el-form-item
label=
"
已激活
:"
>
{{
cardsInformationForm
.
activationCount
||
'0'
}}
(
{{
(
ChangeDecimalToPercentage
(
this
.
cardsInformationForm
.
activationCount
/
this
.
cardsInformationForm
.
number
))
}}
)
</el-form-item>
</span>
<span
class=
"itemLeftContainer"
>
...
...
@@ -96,9 +96,7 @@
</el-form-item>
</span>
<span
class=
"itemRightContainer"
>
<el-form-item
label=
"已激活:"
>
{{
cardsInformationForm
.
activationCount
}}
</el-form-item>
<el-form-item
label=
""
>
</el-form-item>
</span>
</el-form>
<div>
权益明细:
</div>
...
...
@@ -267,7 +265,7 @@
设备SN:
<div
class=
"Input"
>
<el-input
v-model=
"collectionListSearch.condition.s
earchValue
"
v-model=
"collectionListSearch.condition.s
n
"
placeholder=
"请输入设备SN"
size=
"small"
></el-input>
...
...
@@ -456,6 +454,7 @@ export default {
// endData:"",
// getmemberRights:getmemberRights,
// exportMemberCard: exportMemberCard,
// rate: ChangeDecimalToPercentage(this.cardsInformationForm.activationCount/this.cardsInformationForm.number),
colletionDate
:
""
,
batchDate
:
""
,
date_format
,
...
...
@@ -469,14 +468,13 @@ export default {
},
// 领用弹窗列表搜索
collectionListSearch
:
{
condition
:{
beginTime
:
""
||
null
,
endTime
:
""
||
null
,
searchValue
:
""
||
null
,
mobile
:
""
||
null
,
defineCode
:
""
||
null
}
condition
:
{
beginTime
:
""
||
null
,
endTime
:
""
||
null
,
sn
:
""
||
null
,
mobile
:
""
||
null
,
defineCode
:
""
||
null
,
},
},
// 批次弹窗列表搜索项
batchPopupListSearch
:
{
...
...
@@ -559,6 +557,13 @@ export default {
label
:
"激活数量"
,
prop
:
"activationCount"
,
// minWidth: '200'
formatter
:
(
cellValue
)
=>
{
if
(
cellValue
.
activationCount
)
{
return
cellValue
.
activationCount
;
}
else
{
return
0
;
}
},
},
{
label
:
"生成时间"
,
...
...
@@ -639,7 +644,7 @@ export default {
},
{
label
:
"设备SN"
,
prop
:
"s
earchValue
"
,
prop
:
"s
n
"
,
},
{
label
:
"账号"
,
...
...
@@ -680,8 +685,8 @@ export default {
prop
:
"status"
,
formatter
:
(
cellValue
)
=>
{
return
{
1
:
'已激活'
,
0
:
'未激活'
1
:
"已激活"
,
0
:
"未激活"
,
}[
cellValue
.
status
];
},
minWidth
:
"200"
,
...
...
@@ -690,7 +695,6 @@ export default {
},
// 批量生成权益卡弹窗表格
generateRightCardsForm
:
{
applicableChannel
:
""
,
relatedRightsPackage
:
""
,
cardsNumber
:
""
,
remarks
:
""
,
...
...
@@ -708,7 +712,7 @@ export default {
// 领用详情界面弹窗
collectPoupdetailTable
:
{
cardId
:
""
cardId
:
""
,
},
// 用户详情
userInformationForm
:
{
...
...
@@ -741,9 +745,9 @@ export default {
prop
:
"rightStatus"
,
formatter
:
(
cellValue
)
=>
{
return
{
0
:
"正常"
0
:
"正常"
,
}[
cellValue
.
status
];
}
}
,
},
{
label
:
"有效期"
,
...
...
@@ -849,35 +853,35 @@ export default {
this
.
userInformationForm
=
row
;
this
.
rightsCardInformationForm
=
row
;
this
.
detailsVisible
=
true
;
this
.
collectPoupdetailTable
.
cardId
=
row
.
id
this
.
$refs
.
detailTable
.
refreshTable
()
this
.
collectPoupdetailTable
.
cardId
=
row
.
id
;
this
.
$refs
.
batchdetailPopupTable
&&
this
.
$refs
.
batchdetailPopupTable
.
refreshTable
();
},
// 改变批次日期数据格式
changeBatchDataFormat
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
batchListSearch
.
createdDateEnd
=
this
.
batchDate
?
this
.
batchDate
[
1
]
+
' 23:59:59'
:
''
?
this
.
batchDate
[
1
]
+
" 23:59:59"
:
""
;
this
.
batchListSearch
.
createdDateStart
=
this
.
batchDate
?
this
.
batchDate
[
0
]
+
' 00:00:01'
:
''
;
this
.
batchListSearch
.
batchId
=
parseInt
(
this
.
selectBatchId
)
console
.
log
(
this
.
batchListSearch
)
resolve
()
})
?
this
.
batchDate
[
0
]
+
" 00:00:01"
:
""
;
this
.
batchListSearch
.
batchId
=
parseInt
(
this
.
selectBatchId
)
;
console
.
log
(
this
.
batchListSearch
)
;
resolve
()
;
})
;
},
//改变领用日期数据格式
changeCollectionDataFormat
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
this
.
colletionDate
)
console
.
log
(
this
.
colletionDate
)
;
this
.
collectionListSearch
.
condition
.
endTime
=
this
.
colletionDate
?
this
.
colletionDate
[
1
]
+
' 23:59:59'
:
''
||
undefined
?
this
.
colletionDate
[
1
]
+
" 23:59:59"
:
""
||
undefined
;
this
.
collectionListSearch
.
condition
.
beginTime
=
this
.
colletionDate
?
this
.
colletionDate
[
0
]
+
' 00:00:01'
:
''
||
undefined
resolve
()
})
?
this
.
colletionDate
[
0
]
+
" 00:00:01"
:
""
||
undefined
;
resolve
()
;
})
;
},
// 领用详情搜索
// beforecollectionListSearch() {
...
...
@@ -889,25 +893,25 @@ export default {
// 批次管理弹窗搜索
beforebatchPopupListSearch
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
batchPopupListSearch
.
batchId
=
+
this
.
cardsInformationForm
.
batchId
this
.
batchPopupListSearch
.
cardNo
=
this
.
BatchDetailInformationForm
.
cardName
this
.
batchPopupListSearch
.
mobile
=
this
.
BatchDetailInformationForm
.
account
resolve
()
})
this
.
batchPopupListSearch
.
batchId
=
+
this
.
cardsInformationForm
.
batchId
;
this
.
batchPopupListSearch
.
cardNo
=
this
.
BatchDetailInformationForm
.
cardName
;
this
.
batchPopupListSearch
.
mobile
=
this
.
BatchDetailInformationForm
.
account
;
resolve
()
;
})
;
},
handleClick
(
tab
,
event
)
{
},
handleChange
(
value
)
{
},
// 关闭批量生成界面
handleClose
(
done
)
{
this
.
generateRightCardsForm
=
{}
this
.
$refs
.
ruleForm
.
clearValidate
()
done
()
this
.
generateRightCardsForm
=
{}
;
this
.
$refs
.
ruleForm
.
clearValidate
()
;
done
()
;
},
//取消批量制造
cancelGenerate
()
{
this
.
dialogVisible
=
false
this
.
generateRightCardsForm
=
{}
this
.
$refs
.
ruleForm
.
clearValidate
()
this
.
dialogVisible
=
false
;
this
.
generateRightCardsForm
=
{}
;
this
.
$refs
.
ruleForm
.
clearValidate
()
;
},
// 批量制造卡片
generateCards
(
formName
)
{
...
...
@@ -917,68 +921,56 @@ export default {
defineCode
:
this
.
generateRightCardsForm
.
Code
,
// merchantId: this.merchantId,
// merchantName: this.merchantName + '',
remark
:
this
.
generateRightCardsForm
.
remarks
+
''
}
// remarks清空后转为空字符串,不然会undefined
remark
:
this
.
generateRightCardsForm
.
remarks
||
''
};
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
generateMemberBatch
(
params
).
then
((
res
)
=>
{
if
(
res
>
0
)
{
this
.
$message
({
message
:
'增添成功'
,
type
:
'success'
})
this
.
generateRightCardsForm
=
{}
this
.
dialogVisible
=
false
message
:
"增添成功"
,
type
:
"success"
,
})
;
this
.
generateRightCardsForm
=
{}
;
this
.
dialogVisible
=
false
;
// location. reload()
this
.
$refs
.
batchDetailTable
.
refreshTable
()
this
.
$refs
.
batchDetailTable
.
refreshTable
()
;
}
else
{
this
.
$message
({
message
:
'增添失败!'
,
type
:
'error'
})
message
:
"增添失败!"
,
type
:
"error"
,
})
;
}
})
})
;
}
else
{
this
.
$message
({
message
:
'请填写必选项!'
,
type
:
'error'
})
return
false
message
:
"请填写必选项!"
,
type
:
"error"
,
})
;
return
false
;
}
})
// generateMemberBatch(params).then((res) => {
// console.log(res);
// if (res > 0) {
// this.$message({
// message: "增添成功!",
// type: "success",
// });
// this.generateRightCardsForm = {}
// this.dialogVisible = false;
// // location. reload()
// this.$refs.batchDetailTable.refreshTable()
// } else {
// this.$message({
// message: "增添失败!",
// type: "error",
// });
// }
// });
});
},
//小数转化为百分比
ChangeDecimalToPercentage
(
data
)
{
let
data1
=
(
data
*
100
).
toFixed
(
0
)
+
"%"
return
data1
},
// 批次详情弹窗
batchdetails
(
row
)
{
console
.
log
(
row
)
this
.
cardsInformationForm
=
row
this
.
batchdetailsVisible
=
true
this
.
$refs
.
batchdetailPopupTable
.
refreshTable
()
console
.
log
(
row
)
;
this
.
cardsInformationForm
=
row
;
this
.
batchdetailsVisible
=
true
;
this
.
$refs
.
batchdetailPopupTable
.
refreshTable
()
;
},
// dataExport(){
// }
// 关闭详情界面
detailClose
(
done
)
{
done
()
}
done
()
;
}
,
}
}
</
script
>
...
...
src/views/customer/rightsCardManagement/index.vue
View file @
335a0f5
...
...
@@ -96,7 +96,7 @@ export default {
},
{
label
:
'备注'
,
prop
:
'
remarks
'
,
prop
:
'
memberDescription
'
,
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