Commit 1b6a162d authored by 罗林杰's avatar 罗林杰

修改消费记录系统充值

parent 80c107ac
......@@ -77,7 +77,7 @@ export function listExceptionCmsOrder(query) {
}
// 8.退款补偿
export function refundReimbursement(ids) {
export function refundReimbursement(data) {
return request({
url: '/cmsOrder/refundReimbursement',
method: 'get',
......
......@@ -139,7 +139,7 @@
<div class="tableTitle">订单列表</div>
<el-table v-loading="loading" border :data="cmsOrderList">
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column label="订单名称" prop="name" :show-overflow-tooltip="true">
<el-table-column label="订单名称" prop="name" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.name || '-' }}
</template>
......@@ -154,7 +154,7 @@
{{ scope.row.userId || '-' }}
</template>
</el-table-column>
<el-table-column label="会员账号" prop="account" :show-overflow-tooltip="true">
<el-table-column label="会员账号" prop="account" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.account || '-' }}
</template>
......@@ -176,10 +176,11 @@
</el-table-column>
<el-table-column label="订单类型" prop="type" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.type || '-' }}
<span v-if="scope.row.type === 0">活动</span>
<span v-if="scope.row.type === 1">金币充值</span>
</template>
</el-table-column>
<el-table-column label="下单时间" prop="orderTime" width="150" :show-overflow-tooltip="true">
<el-table-column label="下单时间" prop="orderTime" width="120" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.orderTime | transformDateByFormat('YYYY-MM-DD') }}</span>
</template>
......@@ -189,7 +190,7 @@
{{ scope.row.transactionId || '-' }}
</template>
</el-table-column>
<el-table-column label="退款时间" prop="refundTime" width="150" :show-overflow-tooltip="true">
<el-table-column label="退款时间" prop="refundTime" width="120" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.refundTime | transformDateByFormat('YYYY-MM-DD') }}</span>
</template>
......@@ -605,7 +606,8 @@ export default {
}).then(() => {
const form = {
businessId: row.businessId,
goodsId: row.goodsId
goodsId: row.goodsId,
type: row.type
}
payConfirm(form).then((res) => {
if (res.code === 200) {
......@@ -632,7 +634,8 @@ export default {
const form = {
businessId: row.businessId,
goodsId: row.goodsId,
manualRefund: row.manualRefund
manualRefund: row.manualRefund,
type: row.type
}
chargebacks(form).then((res) => {
if (res.code === 200) {
......@@ -659,7 +662,8 @@ export default {
const form = {
businessId: row.businessId,
goodsId: row.goodsId,
transactionId: row.transactionId
transactionId: row.transactionId,
type: row.type
}
refundConfirm(form).then((res) => {
if (res.code === 200) {
......
......@@ -184,6 +184,10 @@ export default {
dictLabel: '系统充值',
dictValue: '11'
},
{
dictLabel: '系统赠送',
dictValue: '12'
},
{
dictLabel: '点赞',
dictValue: '20'
......
......@@ -395,6 +395,19 @@
@pagination="loadData"
/>
</el-dialog>
<!-- 添加或修改金币流水表配置对话框 -->
<el-dialog :title="rechargeTitle" :visible.sync="rechargeOpen" width="500px" append-to-body>
<el-form ref="form" :model="rechargeForm" :rules="rules" size="small" label-width="90px">
<el-form-item label="金币数量" prop="count">
<el-input-number v-model.trim="rechargeForm.count" controls-position="right" :min="0" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button class="cancelBtn" @click="rechargeCancel">取 消</el-button>
<el-button class="submitBtn" type="primary" @click="rechargeSubmitForm">确 定</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
......@@ -405,7 +418,7 @@ import { parseTime } from '@/utils'
import { getDataCache, setDataCache } from '@/assets/js/filterData'
import { getOptions } from '@/utils/options'
import { listMemInfo } from '@/api/contentManagement/memInfo'
import { listMemGoldCoinFlow } from '@/api/contentManagement/memGoldCoinFlow'
import { addMemGoldCoinFlow, listMemGoldCoinFlow } from '@/api/contentManagement/memGoldCoinFlow'
export default {
name: 'Index',
......@@ -569,6 +582,10 @@ export default {
dictLabel: '系统充值',
dictValue: '11'
},
{
dictLabel: '系统赠送',
dictValue: '12'
},
{
dictLabel: '点赞',
dictValue: '20'
......@@ -589,7 +606,22 @@ export default {
dictLabel: '接收微信请求',
dictValue: '24'
}
],
rechargeOpen: false,
rules: {
count: [
{ required: true, message: '请输入金币数量', trigger: 'change' }
]
},
rechargeForm: {
memberId: '',
targetId: '',
count: 0,
balance: 0,
actionType: '12',
type: '1'
},
rechargeTitle: '金币充值'
}
},
computed: {
......@@ -711,7 +743,14 @@ export default {
this.memGoldCoinFlowQueryParams = {
page: 1,
rows: 10,
targetId: row.businessId
targetId: row.userId
}
this.rechargeForm.memberId = row.businessId
this.rechargeForm.targetId = row.userId
if (row.goldCoinsCount === null) {
this.rechargeForm.balance = 0
} else {
this.rechargeForm.balance = row.goldCoinsCount
}
listMemGoldCoinFlow(this.memGoldCoinFlowQueryParams).then(
response => {
......@@ -747,6 +786,7 @@ export default {
this.memGoldCoinFlowQueryParams = []
this.memGoldCoinFlowList = []
this.open = false
this.loadData()
},
/**
* @description: 查看
......@@ -876,7 +916,31 @@ export default {
return option ? option.dictLabel : '-'
},
recharge() {
this.rechargeOpen = true
this.rechargeForm.count = ''
},
rechargeCancel() {
this.rechargeOpen = false
this.rechargeForm.count = ''
},
rechargeSubmitForm() {
addMemGoldCoinFlow(this.rechargeForm).then(response => {
if (response.code === 200) {
this.rechargeOpen = false
this.rechargeForm.count = ''
this.rechargeForm.balance = response.data.endCount
this.getMemGoldCoinFlowList()
this.$message({
type: 'success',
message: '充值成功'
})
} else {
this.$message({
type: 'error',
message: response.msg
})
}
})
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment