dialogResult.vue
5.77 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!-- 关联活动订单弹窗 -->
<template>
<d2-dialog
title="查看结果"
:is-visible="isQualityVisible"
class="qualityDailog"
width="80%"
@closeDialog="handleClose"
@confirmDialog="handleClose"
:isShowFooter="false"
:noCancel="true"
>
<div>
<el-tabs v-model="activeName" @tab-click="handleReset">
<el-tab-pane label="评测报告" name="evaluating">
<evaluating-report
v-if="activeName == 'evaluating'"
v-bind="$attrs"
ref="evaluatingReport"
/>
</el-tab-pane>
<el-tab-pane label="对练详情" name="dialogue">
<dialogue-detail
v-if="activeName == 'dialogue'"
ref="dialogueDetail"
v-bind="$attrs"
/>
</el-tab-pane>
<el-tab-pane label="质检详情" name="analyse">
<quality-analyse
v-if="activeName == 'analyse'"
v-bind="$attrs"
ref="analyseList"
/>
</el-tab-pane>
</el-tabs>
</div>
</d2-dialog>
</template>
<script>
import { Util } from "@/common/util"
import { shopmallOrderList } from "@api/order"
import QualityAnalyse from "./qualityInspectionAnalyse"
import DialogueDetail from "./pairDetail"
import evaluatingReport from "./evaluatingReport"
export default {
name: "DialogResult",
components: {
QualityAnalyse,
DialogueDetail,
evaluatingReport
},
data() {
return {
activeName: "evaluating",
userInfo: this.$store.state.d2admin.user.info,
countObj: {},
searchForm: {
merchantName: "",
activityName: ""
},
searchFormSearch: {},
searchSelectObj: {
orderOrTrade: {
attr: "inputtedOrderCode",
value: ""
}
},
showFormData: [
{
label: "支付时间",
name: "orderDate",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
},
{
label: "商户名称",
name: "merchantName",
type: "input",
maxlength: 20,
isClear: true,
keyFn: this.keyDowmGetList
},
{
label: "所属活动",
name: "activityName",
type: "input",
maxlength: 20,
isClear: true,
keyFn: this.keyDowmGetList
},
{
label: "客户名称",
name: "customerName",
type: "input",
maxlength: 20,
isClear: true,
keyFn: this.keyDowmGetList
},
{
label: "手机号",
name: "customerPhone",
type: "input",
inputType: "number",
maxlength: 11,
isClear: true,
keyFn: this.keyDowmGetList
}
],
getListApi: shopmallOrderList,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
singleSelectUniqueKey: "id",
tableOption: false,
tableColumns: [
{
label: "订单编号",
prop: "orderCode",
width: "200px"
},
{
label: "订单时间",
prop: "orderTime",
width: "150px",
formatter: (cellValue) => {
return cellValue.orderTime
? Util.dateFormate(cellValue.orderTime, "YYYY-MM-DD HH:mm:ss")
: ""
}
},
{
label: "客户名称",
prop: "customerName"
},
{
label: "手机号",
prop: "customerPhone",
width: "120px"
},
{
label: "商品名称",
prop: "goodsName",
formatter: (cellValue) => {
if (cellValue.subOrderList && cellValue.subOrderList.length > 0) {
return cellValue.subOrderList.reduce((str, item, index) => {
// return item.goodsName
if (index) {
str += "/" + item.goodsName
} else {
str += item.goodsName
}
return str
}, "")
// return cellValue.subOrderList[0].goodsName
} else {
return ""
}
}
},
{
label: "活动名称",
prop: "activityName"
// width: '200px'
},
{
label: "所属门店",
prop: "merchantName"
// width: '200px'
},
{
label: "尾款总额",
prop: "balancePaymentPrice",
formatter: (cellValue) => {
return cellValue.balancePaymentPrice
? "¥" + cellValue.balancePaymentPrice
: ""
}
},
{
label: "支付时间",
prop: "payDate",
width: "150px",
formatter: (cellValue) => {
return cellValue.payDate
? Util.dateFormate(cellValue.payDate, "YYYY-MM-DD HH:mm:ss")
: ""
}
}
]
},
baseData: {},
merchantDialogVisible: false,
ids: [],
radio: ""
}
},
props: {
isQualityVisible: {
type: Boolean,
default: false
}
},
computed: {},
mounted() {
console.log(111, this.$attrs)
},
methods: {
handleReset() {},
handleClose() {
this.$emit("closeDialog", false)
}
}
}
</script>
<style scoped>
</style>