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 fcde992b
authored
Apr 12, 2021
by
zhouzy
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
设置批量生成验证,清空数据和清空验证
1 parent
ee58cde8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
144 additions
and
54 deletions
src/views/customer/collectionManagement/index.vue
src/views/customer/collectionManagement/index.vue
View file @
fcde992
<!--批次管理-->
<!--批次管理-->
<
template
>
<
template
>
<div
class=
"container"
>
<div
class=
"container"
>
<el-tabs
v-model=
"activeName"
type=
"card"
@
tab-click=
"handleClick"
>
<el-tabs
<el-tab-pane
label=
"批次管理"
name=
"first"
>
v-model=
"activeName"
type=
"card"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"批次管理"
name=
"first"
>
<div
class=
"block"
>
<div
class=
"block"
>
<div
class=
"topline"
>
<div
class=
"topline"
>
<div
class=
"linecontainer"
>
<div
class=
"linecontainer"
>
...
@@ -29,14 +36,19 @@
...
@@ -29,14 +36,19 @@
</div>
</div>
</div>
</div>
<div
class=
"buttonContainer"
>
<div
class=
"buttonContainer"
>
<el-button
:id=
"batchTableParams.btnId"
type=
"primary"
icon=
"el-icon-search"
<el-button
>
搜索
</el-button
:id=
"batchTableParams.btnId"
>
type=
"primary"
icon=
"el-icon-search"
>
搜索
</el-button>
</div>
</div>
</div>
</div>
<div
class=
"firstpickerContainer"
>
<div
class=
"firstpickerContainer"
>
权益套餐:
权益套餐:
<el-select
v-model=
"batchListSearch.defineCode"
placeholder=
"请选择权益套餐"
>
<el-select
v-model=
"batchListSearch.defineCode"
placeholder=
"请选择权益套餐"
>
<el-option
<el-option
v-for=
"(item, index) in baseDate.equityList"
v-for=
"(item, index) in baseDate.equityList"
:key=
"index"
:key=
"index"
...
@@ -95,10 +107,16 @@
...
@@ -95,10 +107,16 @@
:model=
"BatchDetailInformationForm"
:model=
"BatchDetailInformationForm"
class=
"demo-form-inline"
class=
"demo-form-inline"
>
>
<el-form-item
label=
"卡号:"
prop=
"cardName"
>
<el-form-item
label=
"卡号:"
prop=
"cardName"
>
<el-input
v-model=
"BatchDetailInformationForm.cardName"
></el-input>
<el-input
v-model=
"BatchDetailInformationForm.cardName"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"账号"
prop=
"account"
>
<el-form-item
label=
"账号"
prop=
"account"
>
<el-input
v-model=
"BatchDetailInformationForm.account"
></el-input>
<el-input
v-model=
"BatchDetailInformationForm.account"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
""
>
<el-form-item
label=
""
>
...
@@ -106,8 +124,7 @@
...
@@ -106,8 +124,7 @@
:id=
"batchdetailPopupTable.btnId"
:id=
"batchdetailPopupTable.btnId"
type=
"primary"
type=
"primary"
icon=
"el-icon-search"
icon=
"el-icon-search"
>
搜索
</el-button
>
搜索
</el-button>
>
</el-form-item>
</el-form-item>
<span
class=
"itemButtonContainer"
>
<span
class=
"itemButtonContainer"
>
<el-form-item
label=
""
>
<el-form-item
label=
""
>
...
@@ -124,18 +141,24 @@
...
@@ -124,18 +141,24 @@
:beforeSearchFn=
"beforebatchPopupListSearch"
:beforeSearchFn=
"beforebatchPopupListSearch"
>
>
</d2-table>
</d2-table>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
<el-button
@
click=
"batchdetailsVisible = false"
>
取 消
</el-button>
slot=
"footer"
<el-button
type=
"primary"
@
click=
"batchdetailsVisible = false"
class=
"dialog-footer"
>
确 定
</el-button
>
>
<el-button
@
click=
"batchdetailsVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"batchdetailsVisible = false"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<!-- 批量生成权益卡弹窗 -->
<!-- 批量生成权益卡弹窗 -->
<div
class=
"batchGeneration"
>
<div
class=
"batchGeneration"
>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"dialogVisible = true"
<el-button
>
批量生成权益卡号
</el-button
type=
"primary"
>
icon=
"el-icon-search"
@
click=
"dialogVisible = true"
>
批量生成权益卡号
</el-button>
</div>
</div>
<el-dialog
<el-dialog
title=
"批量生成权益卡"
title=
"批量生成权益卡"
...
@@ -146,11 +169,14 @@
...
@@ -146,11 +169,14 @@
<el-form
<el-form
:model=
"generateRightCardsForm"
:model=
"generateRightCardsForm"
:rules=
"rules"
:rules=
"rules"
ref=
"
generateRightCards
Form"
ref=
"
rule
Form"
label-width=
"200px"
label-width=
"200px"
class=
"demo-ruleForm"
class=
"demo-ruleForm"
>
>
<el-form-item
label=
"关联权益套餐:"
prop=
"relatedRightsPackage"
>
<el-form-item
label=
"关联权益套餐:"
prop=
"relatedRightsPackage"
>
<el-select
<el-select
v-model=
"generateRightCardsForm.relatedRightsPackage"
v-model=
"generateRightCardsForm.relatedRightsPackage"
placeholder=
"请选择关联权益套餐"
placeholder=
"请选择关联权益套餐"
...
@@ -165,19 +191,33 @@
...
@@ -165,19 +191,33 @@
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"生成张数(张)"
prop=
"cardsNumber"
style=
"width: 60%"
>
<el-form-item
label=
"生成张数(张)"
prop=
"cardsNumber"
style=
"width: 60%"
>
<el-input
v-model=
"generateRightCardsForm.cardsNumber"
></el-input>
<el-input
v-model=
"generateRightCardsForm.cardsNumber"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remarks"
style=
"width: 60%"
>
<el-form-item
label=
"备注"
prop=
"remarks"
style=
"width: 60%"
>
<el-input
<el-input
type=
"textarea"
type=
"textarea"
v-model=
"generateRightCardsForm.remarks"
v-model=
"generateRightCardsForm.remarks"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
slot=
"footer"
<el-button
type=
"primary"
@
click=
"generateCards"
>
确 定
</el-button>
class=
"dialog-footer"
>
<el-button
@
click=
"cancelGenerate"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"generateCards('ruleForm')"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<div
class=
"tablecontainer"
>
<div
class=
"tablecontainer"
>
...
@@ -188,16 +228,26 @@
...
@@ -188,16 +228,26 @@
:getListApi=
"getlistMemberBatch"
:getListApi=
"getlistMemberBatch"
:beforeSearchFn=
"changeBatchDataFormat"
:beforeSearchFn=
"changeBatchDataFormat"
>
>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<!-- 批次管理详情弹窗按钮 -->
<!-- 批次管理详情弹窗按钮 -->
<el-button
type=
"text"
@
click=
"batchdetails(scope.scope)"
>
详情
</el-button>
<el-button
type=
"text"
@
click=
"batchdetails(scope.scope)"
>
详情
</el-button>
</span>
</span>
</d2-table>
</d2-table>
</div>
</div>
</div>
</div>
</el-tab-pane>
</el-tab-pane>
<!--领用记录 -->
<!--领用记录 -->
<el-tab-pane
label=
"领用记录"
name=
"second"
>
<el-tab-pane
label=
"领用记录"
name=
"second"
>
<div
class=
"block"
>
<div
class=
"block"
>
<div
class=
"topline"
>
<div
class=
"topline"
>
<div
class=
"linecontainer"
>
<div
class=
"linecontainer"
>
...
@@ -237,8 +287,7 @@
...
@@ -237,8 +287,7 @@
:id=
"collectionTableParams.btnId"
:id=
"collectionTableParams.btnId"
type=
"primary"
type=
"primary"
icon=
"el-icon-search"
icon=
"el-icon-search"
>
搜索
</el-button
>
搜索
</el-button>
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -286,7 +335,11 @@
...
@@ -286,7 +335,11 @@
:before-close=
"detailClose"
:before-close=
"detailClose"
>
>
<div>
用户信息:
</div>
<div>
用户信息:
</div>
<el-form
:inline=
"true"
:model=
"userInformationForm"
class=
"demo-form-inline"
>
<el-form
:inline=
"true"
:model=
"userInformationForm"
class=
"demo-form-inline"
>
<span
class=
"topFirstItem"
>
<span
class=
"topFirstItem"
>
<el-form-item
label=
"账号:"
>
<el-form-item
label=
"账号:"
>
{{
userInformationForm
.
mobile
}}
{{
userInformationForm
.
mobile
}}
...
@@ -334,9 +387,15 @@
...
@@ -334,9 +387,15 @@
:getListApi=
"getMemberCardDetail"
:getListApi=
"getMemberCardDetail"
>
>
</d2-table>
</d2-table>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"detailsVisible = false"
>
取 消
</el-button>
<el-button
@
click=
"detailsVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"detailsVisible = false"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"detailsVisible = false"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<!-- 领用界面表格 -->
<!-- 领用界面表格 -->
...
@@ -348,10 +407,15 @@
...
@@ -348,10 +407,15 @@
:getListApi=
"listRequisitionMemberCard"
:getListApi=
"listRequisitionMemberCard"
:beforeSearchFn=
"changeCollectionDataFormat"
:beforeSearchFn=
"changeCollectionDataFormat"
>
>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<span
<el-button
type=
"text"
@
click=
"startcollectiondetails(scope.scope)"
slot=
"auth-button"
>
查看详情
</el-button
slot-scope=
"scope"
:data=
"scope.scope"
>
>
<el-button
type=
"text"
@
click=
"startcollectiondetails(scope.scope)"
>
查看详情
</el-button>
</span>
</span>
</d2-table>
</d2-table>
</div>
</div>
...
@@ -630,7 +694,7 @@ export default {
...
@@ -630,7 +694,7 @@ export default {
Code
:
""
,
Code
:
""
,
},
},
rules
:
{
rules
:
{
applicableChannel
:
[{
required
:
true
,
message
:
"请选择渠道"
,
trigger
:
"change"
}],
//
applicableChannel: [{ required: true, message: "请选择渠道", trigger: "change" }],
relatedRightsPackage
:
[
relatedRightsPackage
:
[
{
required
:
true
,
message
:
"请选择套餐"
,
trigger
:
"change"
},
{
required
:
true
,
message
:
"请选择套餐"
,
trigger
:
"change"
},
],
],
...
@@ -822,31 +886,26 @@ export default {
...
@@ -822,31 +886,26 @@ export default {
resolve
();
resolve
();
});
});
},
},
handleClick
(
tab
,
event
)
{},
handleClick
(
tab
,
event
)
{
},
handleChange
(
value
)
{},
handleChange
(
value
)
{
},
// 关闭批量生成界面
// 关闭批量生成界面
handleClose
(
done
)
{
handleClose
(
done
)
{
this
.
$confirm
(
"确认关闭?"
)
this
.
$confirm
(
"确认关闭?"
)
.
then
((
_
)
=>
{
.
then
((
_
)
=>
{
this
.
generateRightCardsForm
=
{}
this
.
$refs
.
ruleForm
.
clearValidate
()
done
();
done
();
})
})
.
catch
((
_
)
=>
{});
.
catch
((
_
)
=>
{
});
},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
alert
(
"submit!"
);
}
else
{
console
.
log
(
"error submit!!"
);
return
false
;
}
});
},
},
resetForm
(
formName
)
{
//取消批量制造
this
.
$refs
[
formName
].
resetFields
();
cancelGenerate
()
{
this
.
dialogVisible
=
false
this
.
generateRightCardsForm
=
{}
this
.
$refs
.
ruleForm
.
clearValidate
()
},
},
// 批量制造卡片
// 批量制造卡片
generateCards
()
{
generateCards
(
formName
)
{
var
params
=
{
var
params
=
{
count
:
+
this
.
generateRightCardsForm
.
cardsNumber
,
count
:
+
this
.
generateRightCardsForm
.
cardsNumber
,
defineId
:
+
this
.
generateRightCardsForm
.
Id
,
defineId
:
+
this
.
generateRightCardsForm
.
Id
,
...
@@ -855,13 +914,16 @@ export default {
...
@@ -855,13 +914,16 @@ export default {
// merchantName: this.merchantName + '',
// merchantName: this.merchantName + '',
remark
:
this
.
generateRightCardsForm
.
remarks
+
""
,
remark
:
this
.
generateRightCardsForm
.
remarks
+
""
,
};
};
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
generateMemberBatch
(
params
).
then
((
res
)
=>
{
generateMemberBatch
(
params
).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
>
0
)
{
if
(
res
>
0
)
{
this
.
$message
({
this
.
$message
({
message
:
"增添成功!"
,
message
:
"增添成功!"
,
type
:
"success"
,
type
:
"success"
,
});
});
this
.
generateRightCardsForm
=
{}
this
.
dialogVisible
=
false
;
this
.
dialogVisible
=
false
;
// location. reload()
// location. reload()
this
.
$refs
.
batchDetailTable
.
refreshTable
()
this
.
$refs
.
batchDetailTable
.
refreshTable
()
...
@@ -871,7 +933,35 @@ export default {
...
@@ -871,7 +933,35 @@ export default {
type
:
"error"
,
type
:
"error"
,
});
});
}
}
})
}
else
{
this
.
$message
({
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",
// });
// }
// });
},
},
// 批次详情弹窗
// 批次详情弹窗
batchdetails
(
row
)
{
batchdetails
(
row
)
{
...
@@ -886,7 +976,7 @@ export default {
...
@@ -886,7 +976,7 @@ export default {
.
then
(()
=>
{
.
then
(()
=>
{
done
();
done
();
})
})
.
catch
(()
=>
{});
.
catch
(()
=>
{
});
},
},
},
},
};
};
...
...
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