mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-03 17:40:13 +08:00
运营商VIP
This commit is contained in:
@@ -60,6 +60,15 @@ export function delInfo(id) {
|
||||
})
|
||||
}
|
||||
|
||||
// 开卡
|
||||
export function createMerchantVip(data) {
|
||||
return request({
|
||||
url: '/member/info/createMerchantVip',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改会员基础信息
|
||||
export function updateMemberBalance(data) {
|
||||
return request({
|
||||
|
||||
@@ -336,7 +336,7 @@ export default {
|
||||
getMerchantList() {
|
||||
getMerchantList().then((response) =>{
|
||||
console.log("response", response)
|
||||
this.merchantList = response.obj
|
||||
this.merchantList = response.obj;
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!--<el-col :span="1.5">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@@ -36,8 +36,8 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['member:info:add']"
|
||||
>新增</el-button>
|
||||
</el-col>-->
|
||||
>开卡</el-button>
|
||||
</el-col>
|
||||
<!--<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
@@ -151,25 +151,34 @@
|
||||
|
||||
<!-- 添加或修改会员基础信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="会员Id" prop="memberId">
|
||||
<el-input v-model="form.memberId" :disabled="true" placeholder="请输入手机号"/>
|
||||
<el-form ref="form" :model="createMerchantVip" :rules="rules" label-width="100px">
|
||||
<el-form-item label="选择运营商">
|
||||
<el-select
|
||||
v-model="createMerchantVip.targetMerchantId"
|
||||
clearable placeholder="请选择运营商"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in merchantList"
|
||||
:key="item.merchantName"
|
||||
:label="item.merchantName"
|
||||
:value="item.merchantId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="mobileNumber">
|
||||
<el-input v-model="form.mobileNumber" :disabled="true" placeholder="请输入手机号"/>
|
||||
<el-form-item label="手机号码">
|
||||
<el-input v-model="createMerchantVip.mobileNumber" placeholder="请输入手机号码"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="昵称" prop="nickName">
|
||||
<el-input v-model="form.nickName" placeholder="请输入昵称"/>
|
||||
<el-form-item label="操作类型">
|
||||
<el-radio v-model="createMerchantVip.type" label="1" border>充值</el-radio>
|
||||
<el-radio v-model="createMerchantVip.type" label="2" border>扣款</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="头像url" prop="avatarUrl">
|
||||
<el-input v-model="form.avatarUrl" placeholder="请输入头像url"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注"/>
|
||||
<el-form-item label="金额" prop="balance">
|
||||
<el-input-number v-model="createMerchantVip.updatePrincipalBalance" placeholder="请输入金额" :min="0" :controls="false"
|
||||
:precision="2"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button type="primary" @click="submitCreateMerchantVip">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -217,7 +226,7 @@ import {
|
||||
addInfo,
|
||||
updateInfo,
|
||||
updateMemberBalance,
|
||||
getMerchantList, queryMerchantVipList,
|
||||
getMerchantList, queryMerchantVipList, createMerchantVip,
|
||||
} from "@/api/member/info";
|
||||
|
||||
export default {
|
||||
@@ -268,7 +277,9 @@ export default {
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
rules: {},
|
||||
// 开卡参数
|
||||
createMerchantVip: {},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -280,7 +291,7 @@ export default {
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
// this.getMerchantList();
|
||||
this.getMerchantList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询会员基础信息列表 */
|
||||
@@ -304,7 +315,7 @@ export default {
|
||||
getMerchantList() {
|
||||
getMerchantList().then((response) =>{
|
||||
console.log("response", response)
|
||||
this.merchantList = response.obj
|
||||
this.merchantList = response.obj;
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
@@ -350,7 +361,7 @@ export default {
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加会员基础信息";
|
||||
this.title = "添加运营商VIP";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
@@ -407,6 +418,16 @@ export default {
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
/* 开卡确定按钮 */
|
||||
submitCreateMerchantVip() {
|
||||
console.log("submitCreateMerchantVip", this.createMerchantVip);
|
||||
createMerchantVip(this.createMerchantVip).then(response => {
|
||||
console.log("开卡确定按钮 response:", response);
|
||||
this.$modal.msgSuccess("开卡成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
|
||||
Reference in New Issue
Block a user