This commit is contained in:
墨大叔 2024-07-10 16:45:44 +08:00
parent d721c27ea0
commit f99e9c442e

View File

@ -109,7 +109,7 @@
<el-button
type="text"
icon="el-icon-refresh"
@click="handleRefund(d.row.billId)"
@click="handleRefund(d.row)"
v-has-permi="['system:bill:refund']"
v-show="canRefund(d.row)"
>订单退款</el-button>
@ -135,8 +135,8 @@
</div>
</el-dialog>
<!-- 添加或修改充值记录对话框 -->
<el-dialog :visible.sync="showRefund" title="退款">
<!-- 退款 -->
<el-dialog :visible.sync="showRefund" title="退款" width="400px">
<el-form :model="refundForm" :rules="refundRules">
<el-form-item label="退款金额" prop="refundAmount">
<el-input-number v-model="refundForm.refundAmount" placeholder="请输入退款金额" />
@ -144,8 +144,8 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitRefund"> </el-button>
<el-button @click="this.showRefund = false"> </el-button>
<el-button type="primary" @click="submitRefund" :loading="refundLoading"> </el-button>
<el-button @click="showRefund = false" > </el-button>
</div>
</el-dialog>
@ -203,7 +203,7 @@ export default {
},
refundRules: {
refundAmount: [
{ required: true, message: "退款金额不能为空", trigger: "blur" }
{ required: true, type: 'number', message: "退款金额不能为空", trigger: "blur" }
]
},
showRefund: false,
@ -237,15 +237,17 @@ export default {
refundBill(this.refundForm.billId, this.refundForm.refundAmount).then(res => {
if (res.code === 200) {
this.$message.success("操作成功");
this.showRefund = false;
this.getList();
}
}).finally(() => {
refundLoading
this.refundLoading = false;
})
},
handleRefund(id) {
handleRefund(row) {
this.refundForm = {
billId: id,
refundAmount: null,
billId: row.billId,
refundAmount: row.money,
}
this.showRefund = true;
},