修改显示余额
This commit is contained in:
parent
ccd66bd2be
commit
2fe66b28a8
|
|
@ -33,7 +33,7 @@
|
|||
<el-table-column prop="showPosition" label="是否可见">
|
||||
<template v-slot="scope">
|
||||
<el-switch v-model="scope.row.status" :active-value="1" :inactive-value="0"
|
||||
@change="showChange($event, scope.row)"></el-switch>
|
||||
@change="showChange(scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="" label="弹窗频率">
|
||||
|
|
@ -179,13 +179,15 @@ export default {
|
|||
let index = this.fileList.findIndex(ele => ele.url == file.response.data[0])
|
||||
this.fileList.splice(index, 1);
|
||||
},
|
||||
async showChange(a, d) {
|
||||
async showChange(d) {
|
||||
if (!d.imgUrl) {
|
||||
this.form.imgUrl = this.fileList
|
||||
}
|
||||
await adput({
|
||||
...d,
|
||||
...this.form
|
||||
imgUrl:d.imgUrl,
|
||||
id: d.id,
|
||||
shopId: this.form.shopId,
|
||||
status: d.status,
|
||||
})
|
||||
this.$message({
|
||||
message: '成功',
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@
|
|||
<el-dialog title="编辑" :visible.sync="dialogVisibleedit" width="30%">
|
||||
<el-form ref="form" :model="userinfos" label-width="80px">
|
||||
<el-form-item label="生日">
|
||||
<el-date-picker v-model="userinfos.birthDay" type="date" placeholder="选择日期" value-format="yyyy-MM-dd">
|
||||
<el-date-picker v-model="userinfos.birthDay" type="date" placeholder="选择日期" value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员名称">
|
||||
|
|
@ -148,11 +148,14 @@
|
|||
</span>
|
||||
</el-dialog>
|
||||
<!-- 增减余额弹窗 -->
|
||||
<el-dialog title="增减余额" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
|
||||
<el-dialog title="增减余额" :visible.sync="dialogVisible" width="30%">
|
||||
<el-form ref="form" :model="userinfo" label-width="80px">
|
||||
<el-form-item label="用户">
|
||||
{{ userinfo.nickName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="余额">
|
||||
{{ userinfo.amount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="增减">
|
||||
<el-radio-group v-model="userinfo.operationType">
|
||||
<el-radio label="in">增加</el-radio>
|
||||
|
|
@ -160,7 +163,7 @@
|
|||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="余额">
|
||||
<el-input v-model="userinfo.amount" @input="checkIfNum"></el-input>
|
||||
<el-input v-model="userinfo.amount" type="number"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型">
|
||||
<el-radio-group v-model="userinfo.type">
|
||||
|
|
@ -230,12 +233,13 @@ export default {
|
|||
this.userinfo.amount = this.userinfo.amount.toString().replace(/\D/g, '');
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
this.userinfo = {}
|
||||
},
|
||||
async sumbituser() {
|
||||
let res = await tbShopUseredit({
|
||||
...this.userinfos,
|
||||
levelConsume:'0',
|
||||
levelConsume: '0',
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
})
|
||||
this.$message.success('修改成功')
|
||||
|
|
@ -243,6 +247,7 @@ export default {
|
|||
this.getTableData();
|
||||
},
|
||||
async sumbit() {
|
||||
this.userinfo.amount = this.userinfo.amount.toFixed(2)
|
||||
let res = await midfiyAccount(this.userinfo)
|
||||
this.dialogVisible = false
|
||||
this.$message.success('修改成功')
|
||||
|
|
@ -251,6 +256,7 @@ export default {
|
|||
editPop(d) {
|
||||
this.dialogVisible = true
|
||||
this.userinfo.nickName = d.nickName
|
||||
this.userinfo.amount = d.amount
|
||||
this.userinfo.id = d.id
|
||||
},
|
||||
edituser(d) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue