新增会员卡类型,新增单次扣款功能,并且增加了新增单次扣款的费用轨迹
This commit is contained in:
@@ -29,6 +29,13 @@ export function createCard(memberId, cardType, venueType, platformId, venueId, s
|
||||
'venueId': venueId, 'star': star, 'end': end })
|
||||
}
|
||||
|
||||
/**
|
||||
* 扣费
|
||||
*/
|
||||
export function miniMoney(memberId, miniMoney, feeType) {
|
||||
return http.post('/member/miniMoney', { 'memberId': memberId, 'miniMoney': miniMoney, 'feeType': feeType })
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存用户
|
||||
*/
|
||||
|
||||
@@ -134,26 +134,6 @@ export default {
|
||||
}
|
||||
],
|
||||
status: [
|
||||
{
|
||||
value: '年卡',
|
||||
label: '年卡'
|
||||
},
|
||||
{
|
||||
value: '半年卡',
|
||||
label: '半年卡'
|
||||
},
|
||||
{
|
||||
value: '季卡',
|
||||
label: '季卡'
|
||||
},
|
||||
{
|
||||
value: '月卡',
|
||||
label: '月卡'
|
||||
},
|
||||
{
|
||||
value: '免费卡',
|
||||
label: '免费卡'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
<span v-if="scope.row.type === 6">提现申请</span>
|
||||
<span v-if="scope.row.type === 7">提现失败</span>
|
||||
<span v-if="scope.row.type === 8">提现审核通过</span>
|
||||
<span v-if="scope.row.type === 9">单次扣款</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -249,7 +250,7 @@
|
||||
margin-bottom : 10px;
|
||||
}
|
||||
.span-fost{
|
||||
text-align: right;
|
||||
text-align: right;
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
<el-button size="small" type="text" @click="handleEdit(scope.row.id)">查看</el-button>
|
||||
<el-button size="small" type="text" @click="showUploadFace(scope.row.id)">上传人脸</el-button>
|
||||
<el-button size="small" type="text" @click="showimg(scope.row.id)">送卡</el-button>
|
||||
<el-button size="small" type="text" @click="miniMoney(scope.row.id,scope.row.money)">扣费</el-button>
|
||||
<el-button v-if="hasEditPermission() && scope.row.status === 0" size="small" type="text" @click="handleAddEdit(scope.row.id)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -151,11 +152,20 @@
|
||||
<i class="el-icon-plus avatar-uploader-icon"></i>
|
||||
</el-upload>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="单次卡扣费" :visible.sync="isShowMiniMoney">
|
||||
<span>请输入单次消费金额:</span>
|
||||
<el-input-number v-model="form.miniMoney" :min="0" placeholder="请输入金额"></el-input-number>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="miniMoneyCheck()">确认</el-button>
|
||||
<el-button @click="isShowMiniMoney = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateStatus, createCard } from '@/api//member'
|
||||
import { updateStatus, createCard, miniMoney } from '@/api//member'
|
||||
import waves from '@/directive/waves.js'// 水波纹指令
|
||||
import Pagination from '@/components/Pagination'
|
||||
import Status from '@/components/Status'
|
||||
@@ -188,6 +198,8 @@ export default {
|
||||
'https://yingdd.oss-cn-hangzhou.aliyuncs.com/278b03e2ed25ae206ab95d9e5e111ab2.png',
|
||||
|
||||
isShowUploadFace: false,
|
||||
isShowMiniMoney: false,
|
||||
personAmomunt: undefined,
|
||||
checkAll: false,
|
||||
checkedCities: [],
|
||||
memberId: cityOptions,
|
||||
@@ -265,6 +277,15 @@ export default {
|
||||
this.memberId = id
|
||||
},
|
||||
|
||||
/**
|
||||
* 减少余额
|
||||
*/
|
||||
miniMoney(id, amount) {
|
||||
this.personAmomunt = amount
|
||||
this.isShowMiniMoney = true
|
||||
this.memberId = id
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量送卡弹框
|
||||
*/
|
||||
@@ -293,6 +314,24 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
miniMoneyCheck () {
|
||||
if (this.form.miniMoney <= 0) {
|
||||
this.$message({
|
||||
message: '非法扣款金额',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.personAmomunt < this.form.miniMoney) {
|
||||
this.$message({
|
||||
message: '余额不足',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.isShowMiniMoney = false
|
||||
miniMoney(this.memberId, this.form.miniMoney, 'admin')
|
||||
},
|
||||
giveCard(id) {
|
||||
if (this.venue === '') {
|
||||
this.$message({
|
||||
@@ -499,4 +538,4 @@ export default {
|
||||
height: 148px;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -86,6 +86,18 @@ public class MemberController extends OmsController {
|
||||
return ResponseDTO.ok("赠送成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 后台手工扣费
|
||||
*/
|
||||
@RequestMapping(value = "/member/miniMoney", method = RequestMethod.POST)
|
||||
public ResponseDTO miniMoney(@RequestParam("memberId") Integer[] memberId, @RequestParam("miniMoney") Integer miniMoney,
|
||||
@RequestParam("feeType") String feeType) {
|
||||
for (int i = 0; i < memberId.length; i++) {
|
||||
memberCardService.miniMoney(memberId[i], miniMoney, feeType);
|
||||
}
|
||||
return ResponseDTO.ok("扣费成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 变更用户状态
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user