ConfirmDialog.vue
2.9 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
<template>
<d2-dialog title="确认提醒" :is-visible="isVisible" width="720px" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<div class="confirm-wrap">
<div class="title">请确定以下信息是否正确</div>
<div class="point-info">
<div class="label">扣减积分:<span class="integral">{{dataInfo.score}}</span></div>
<div class="label" style="margin-top:8px">
备注:<span class="remark">{{dataInfo.remark||'--'}}</span>
</div>
</div>
<div class="order-detail">
<div class="title">订单详情</div>
<div class="item">订单编号:<span>{{dataInfo.orderData[0].orderCode}}</span></div>
<div class="item">订单时间:<span>{{dataInfo.orderData[0].orderTimeStr}}</span></div>
<div class="item">客户姓名:<span>{{dataInfo.orderData[0].customerName}}</span></div>
<div class="item">商品名称:<span v-for="(item, index) in dataInfo.orderData[0].subOrderList" :key="index">
<template v-if="item.upgradeGoodsId">
<span class="upgrade-goods">
{{
item.upgradeGoodsName? item.upgradeGoodsName: "-"
}}
</span>
</template>
<span v-else class="upgrade-goods">{{ item.baseGoodsName }}</span>
</span></div>
<div class="item">总价:<span>{{dataInfo.orderData[0].totalPrice?dataInfo.orderData[0].totalPrice:'0'}}</span></div>
</div>
</div>
</d2-dialog>
</template>
<script>
export default {
data() {
return {}
},
props: {
visible: {
type: Boolean,
default: false
},
dataInfo: {
type: Object,
default:()=> {}
}
},
computed: {
isVisible: {
get() {
return this.visible
},
set(newVal) { }
}
},
mounted() {
console.log(this.dataInfo)
},
methods: {
handleConfirm() {
this.$emit("handleConfirm")
},
handleClose() {
this.$emit("dialogClose")
}
}
}
</script>
<style lang="scss" scoped>
.confirm-wrap {
.title {
font-weight: 500;
font-size: 14px;
color: #1d1d1d;
margin-bottom: 18px;
}
.point-info {
margin-bottom: 18px;
// display: flex;
// align-items: center;
// justify-content: space-between;
.label {
font-weight: 500;
font-size: 14px;
color: #1d1d1d;
}
.integral {
font-weight: 600;
font-size: 20px;
color: #185efe;
}
.remark {
font-weight: 400;
font-size: 14px;
color: #1d1d1d;
}
}
.order-detail {
height: auto;
background: #fafafa;
padding: 8px 10px;
.title {
font-weight: 500;
font-size: 14px;
color: #1d1d1d;
}
.item {
color: #666666;
font-size: 14px;
margin-bottom: 8px;
span {
color: #333333;
}
}
}
}
.upgrade-goods {
margin-right: 4px;
}
</style>