auditDialog.vue
2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<template>
<div v-if="auditObj.show">
<GLDialog
mode="small"
title="批次审核"
:visible.sync="auditObj.show"
:before-close="handleClose"
>
<template #default>
<div class="audit-content flex">
<div class="title">请和财务确认是否已收到以下门店积分打款</div>
<div class="info flex">{{auditObj.row.merchantName}}:
<div class="price flex">
{{auditObj.row.totalIntegral}}<div class="unit">元</div>
</div>
</div>
<el-checkbox
v-model="checked"
class="check-box"
>
已确认收款
</el-checkbox>
<div class="tips">审核通过后客户积分将实时发放,无法撤销。</div>
</div>
</template>
<template #footer>
<el-button
size="small"
@click="handleClose"
>否,未收到款项,关闭弹窗</el-button>
<el-button
type="primary"
size="small"
@click="handleConfirm"
>是,已确认收到款项,赠送积分</el-button>
</template>
</GLDialog>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
props: {
auditObj: {
type: Object,
default: () => { }
}
},
data () {
return {
loading: false,
checked: false
}
},
mounted () {
},
methods: {
handleClose () {
this.checked = false
this.$emit('update:auditObj', {})
},
async handleConfirm () {
const { checked } = this,
{ id } = this.auditObj.row
if (checked) {
this.$loading()
try {
const res = await this.$apis.points.auditIntegral({ id })
if (res) {
this.handleClose()
this.$message.success('操作成功')
this.$parent.handleSearch()
}
this.$loading().close()
} catch (error) {
this.$loading().close()
if (error) this.$message.error(error)
}
} else this.$message.error('请先勾选确认收款')
}
}
}
</script>
<style scoped lang='scss'>
.audit-content {
flex-direction: column;
justify-content: center;
align-items: center;
.title {
font-size: 16px;
color: #333333;
}
.check-box {
font-size: 14px;
color: #333333;
}
.info {
align-items: center;
font-size: 16px;
color: #333333;
margin: 16px 0 10px;
.price {
align-items: center;
font-weight: 600;
font-size: 26px;
color: #eb4e4e;
.unit {
font-weight: 400;
font-size: 16px;
}
}
}
.tips {
font-size: 14px;
color: #999999;
margin-top: 10px;
}
}
</style>