|
@@ -69,7 +69,11 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="代理商" prop="activationUserId">
|
|
|
+ <el-form-item
|
|
|
+ v-hasPermi="['vip:code:agent_search']"
|
|
|
+ label="代理商"
|
|
|
+ prop="activationUserId"
|
|
|
+ >
|
|
|
<el-select
|
|
|
v-model="queryParams.agentId"
|
|
|
placeholder="请输入代理商昵称"
|
|
@@ -88,7 +92,7 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item>
|
|
|
+ <el-form-item v-hasPermi="['vip:code:agent_search']">
|
|
|
<el-button
|
|
|
type="cyan"
|
|
|
icon="el-icon-search"
|
|
@@ -133,7 +137,7 @@
|
|
|
width="200px"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <span style="margin-right:5px">{{ scope.row.vipCode }}</span>
|
|
|
+ <span style="margin-right: 5px">{{ scope.row.vipCode }}</span>
|
|
|
<el-button type="primary" round @click="copyFun(scope.row.vipCode)"
|
|
|
>复制</el-button
|
|
|
>
|
|
@@ -193,7 +197,7 @@
|
|
|
append-to-body
|
|
|
>
|
|
|
<div class="jihuoma">
|
|
|
- 激活码: <span style="color:red">{{ jihuoma }} </span>
|
|
|
+ 激活码: <span style="color: red">{{ jihuoma }} </span>
|
|
|
<el-button type="primary" round @click="copyFun(jihuoma)"
|
|
|
>复制激活码</el-button
|
|
|
>
|
|
@@ -213,18 +217,18 @@ export default {
|
|
|
keyOptions: [
|
|
|
{
|
|
|
value: "0",
|
|
|
- label: "未激活"
|
|
|
+ label: "未激活",
|
|
|
},
|
|
|
{
|
|
|
value: "1",
|
|
|
- label: "已激活"
|
|
|
+ label: "已激活",
|
|
|
},
|
|
|
{
|
|
|
value: "2",
|
|
|
- label: "已作废"
|
|
|
- }
|
|
|
+ label: "已作废",
|
|
|
+ },
|
|
|
],
|
|
|
- keyOptionsFormatter: row => {
|
|
|
+ keyOptionsFormatter: (row) => {
|
|
|
return this.keyOptions[row.status].label;
|
|
|
},
|
|
|
jihuoma: null,
|
|
@@ -255,12 +259,12 @@ export default {
|
|
|
activationTime: null,
|
|
|
activationUserId: null,
|
|
|
startTime: null,
|
|
|
- endTime: null
|
|
|
+ endTime: null,
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
- rules: {}
|
|
|
+ rules: {},
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -270,7 +274,7 @@ export default {
|
|
|
/** 代理商列表模糊搜索 */
|
|
|
async remoteMethod(agentName) {
|
|
|
const res = await getAgentList({
|
|
|
- agentName: agentName
|
|
|
+ agentName: agentName,
|
|
|
});
|
|
|
this.agentNameOptions = res.data;
|
|
|
},
|
|
@@ -295,7 +299,7 @@ export default {
|
|
|
/** 查询激活码列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listCode(this.queryParams).then(response => {
|
|
|
+ listCode(this.queryParams).then((response) => {
|
|
|
this.codeList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
@@ -315,7 +319,7 @@ export default {
|
|
|
updateTime: null,
|
|
|
status: 0,
|
|
|
activationTime: null,
|
|
|
- activationUserId: null
|
|
|
+ activationUserId: null,
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
@@ -343,17 +347,17 @@ export default {
|
|
|
this.$confirm("是否确认作废激活码: " + row.vipCode, "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
+ type: "warning",
|
|
|
})
|
|
|
- .then(function() {
|
|
|
+ .then(function () {
|
|
|
return updateCode({ id: row.id, status: 2 });
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.getList();
|
|
|
this.msgSuccess("作废成功");
|
|
|
});
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|