添加修改是否代理

This commit is contained in:
“wanyongkang”
2023-12-27 15:14:48 +08:00
parent b0b21c9fea
commit bbc0abe7be
2 changed files with 28 additions and 10 deletions

View File

@@ -42,20 +42,20 @@
<el-table-column prop="Name" label="姓名"></el-table-column>
<el-table-column prop="id_code" label="身份证号"></el-table-column>
<el-table-column prop="is_verify" label="实名状态"></el-table-column>
<!-- <el-table-column label="一毛钱天卡" >
<el-table-column label="是否代理" >
<template slot-scope="scope">
<el-tooltip content="请先查看是否已经使用" placement="top">
<el-tooltip content="请先查看是否在代理商管理添加" placement="top">
<el-switch
v-model="scope.row.ProductAccountCount"
v-model="scope.row.is_agent"
active-color="#13ce66"
inactive-color="#ff4949"
@change="day(scope.row)"
active-value="0"
inactive-value="1">
@change="isagent(scope.row)"
active-value="1"
inactive-value="0">
</el-switch>
</el-tooltip>
</template>
</el-table-column> -->
</el-table-column>
<el-table-column label="操作" width="400px">
<template slot-scope="scope">
<span class="handel cursor edit" @click="showUpdateTest(scope.row)">设置测试</span>
@@ -432,8 +432,8 @@ export default {
info: r.LoginCode
}).then(res => {})
},
day(r){
this.$api.post(this.$api.phpURL + "user/user/setDay", r).then(res => {
isagent(r){
this.$api.post(this.$api.phpURL + "user/user/isagent", r).then(res => {
});
},

View File

@@ -26,7 +26,20 @@
{{scope.row.TestCountLimit==0?'3':scope.row.TestCountLimit}}/{{scope.row.UseTestCount==0?'--':scope.row.UseTestCount}}
</template>
</el-table-column>
<el-table-column label="是否代理" >
<template slot-scope="scope">
<el-tooltip content="请先查看是否在代理商管理添加" placement="top">
<el-switch
v-model="scope.row.is_agent"
active-color="#13ce66"
inactive-color="#ff4949"
@change="isagent(scope.row)"
active-value="1"
inactive-value="0">
</el-switch>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="操作" width="400px">
<template slot-scope="scope">
<span v-if="scope.row.agent_id==0">
@@ -316,6 +329,11 @@ export default {
this.amountModel.showAmountDialog = false;
this.showTestDialog = false;
},
isagent(r){
this.$api.post(this.$api.phpURL + "user/user/isagent", r).then(res => {
});
},
save(formName) {
this.$refs[formName].validate(valid => {
if (!valid) return;