11
11
<el-form-item label =" 渠道编码" prop =" channelCode" >
12
12
<el-select v-model =" queryParams.channelCode" placeholder =" 请输入渠道编码" clearable
13
13
@clear =" ()=>{queryParams.channelCode = null}" >
14
- <el-option v-for =" dict in payChannelCodeDictDatum " :key =" dict.value" :label =" dict.label" :value =" dict.value" />
14
+ <el-option v-for =" dict in this.getDictDatas(DICT_TYPE.PAY_CHANNEL_CODE) " :key =" dict.value" :label =" dict.label" :value =" dict.value" />
15
15
</el-select >
16
16
</el-form-item >
17
17
<el-form-item label =" 商户订单编号" prop =" merchantOrderId" >
24
24
</el-form-item >
25
25
<el-form-item label =" 支付状态" prop =" status" >
26
26
<el-select v-model =" queryParams.status" placeholder =" 请选择支付状态" clearable size =" small" >
27
- <el-option v-for =" dict in payOrderDictDatum " :key =" parseInt(dict.value)"
27
+ <el-option v-for =" dict in this.getDictDatas(DICT_TYPE.PAY_ORDER_STATUS) " :key =" parseInt(dict.value)"
28
28
:label =" dict.label" :value =" parseInt(dict.value)" />
29
29
</el-select >
30
30
</el-form-item >
31
31
<el-form-item label =" 退款状态" prop =" refundStatus" >
32
32
<el-select v-model =" queryParams.refundStatus" placeholder =" 请选择退款状态" clearable >
33
- <el-option v-for =" dict in payOrderRefundDictDatum " :key =" parseInt(dict.value)"
33
+ <el-option v-for =" dict in this.getDictDatas(DICT_TYPE.PAY_ORDER_REFUND_STATUS) " :key =" parseInt(dict.value)"
34
34
:label =" dict.label" :value =" parseInt(dict.value)" />
35
35
</el-select >
36
36
</el-form-item >
102
102
</template >
103
103
104
104
</el-table-column >
105
+ <!-- TODO 芋艿:要放开 -->
105
106
<!-- <el-table-column label="退款状态" align="center" prop="refundStatus">-->
106
107
<!-- <template v-slot="scope">-->
107
108
<!-- <span>{{ getDictDataLabel(DICT_TYPE.PAY_ORDER_REFUND_STATUS, scope.row.refundStatus) }}</span>-->
124
125
</el-table-column >
125
126
<el-table-column label =" 操作" align =" center" fixed =" right" class-name =" small-padding fixed-width" >
126
127
<template v-slot =" scope " >
127
- <el-button size =" mini" type =" text" icon =" el-icon-search" @click =" handleQueryDetails (scope.row)"
128
+ <el-button size =" mini" type =" text" icon =" el-icon-search" @click =" handleDetail (scope.row)"
128
129
v-hasPermi =" ['pay:order:query']" >查看详情
129
130
</el-button >
130
131
</template >
134
135
<pagination v-show =" total > 0" :total =" total" :page.sync =" queryParams.pageNo" :limit.sync =" queryParams.pageSize"
135
136
@pagination =" getList" />
136
137
137
- <!-- 对话框(添加 / 修改 ) -->
138
+ <!-- 对话框(详情 ) -->
138
139
<el-dialog title =" 订单详情" :visible.sync =" open" width =" 50%" >
139
140
<el-descriptions :column =" 2" label-class-name =" desc-label" >
140
141
<el-descriptions-item label =" 应用名称" >{{ orderDetail.appName }}</el-descriptions-item >
149
150
<el-tag class =" tag-purple" size =" small" >{{ orderDetail.channelOrderNo }}</el-tag >
150
151
</el-descriptions-item >
151
152
<el-descriptions-item label =" 支付订单号" >
152
- <el-tag v-if =" orderDetail.payOrderExtension .no !== ''" class =" tag-pink" size =" small" >
153
- {{ orderDetail.payOrderExtension .no }}
153
+ <el-tag v-if =" orderDetail.extension .no !== ''" class =" tag-pink" size =" small" >
154
+ {{ orderDetail.extension .no }}
154
155
</el-tag >
155
156
</el-descriptions-item >
156
157
<el-descriptions-item label =" 金额" >
176
177
</el-descriptions >
177
178
<el-divider ></el-divider >
178
179
<el-descriptions :column =" 2" label-class-name =" desc-label" >
179
- <el-descriptions-item label =" 支付渠道" >{{ orderDetail.channelCodeName }}</el-descriptions-item >
180
+ <el-descriptions-item label =" 支付渠道" >
181
+ <dict-tag :type =" DICT_TYPE.PAY_CHANNEL_CODE" :value =" orderDetail.channelCode" />
182
+ </el-descriptions-item >
180
183
<el-descriptions-item label =" 支付IP" >{{ orderDetail.userIp }}</el-descriptions-item >
181
184
<el-descriptions-item label =" 退款状态" >
182
185
<dict-tag :type =" DICT_TYPE.PAY_ORDER_REFUND_STATUS" :value =" orderDetail.refundStatus" />
194
197
{{ orderDetail.body }}
195
198
</el-descriptions-item >
196
199
<el-descriptions-item label =" 支付通道异步回调内容" >
197
- {{ orderDetail.payOrderExtension .channelNotifyData }}
200
+ {{ orderDetail.extension .channelNotifyData }}
198
201
</el-descriptions-item >
199
202
</el-descriptions >
200
203
</el-dialog >
204
207
<script >
205
208
import { getOrderDetail , getOrderPage , exportOrderExcel } from " @/api/pay/order" ;
206
209
import { DICT_TYPE , getDictDatas } from " @/utils/dict" ;
207
- import { getNowDateTime } from " @/utils/ruoyi" ;
208
-
209
- const defaultOrderDetail = {
210
- appName: ' ' ,
211
- channelCodeName: ' ' ,
212
- subject: ' ' ,
213
- merchantOrderId: null ,
214
- channelOrderNo: ' ' ,
215
- body: ' ' ,
216
- price: null ,
217
- channelFeeRate: null ,
218
- channelFeePrice: null ,
219
- userIp: ' ' ,
220
- status: null ,
221
- notifyUrl: ' ' ,
222
- notifyStatus: null ,
223
- refundStatus: null ,
224
- refundTimes: ' ' ,
225
- refundPrice: null ,
226
- createTime: ' ' ,
227
- successTime: ' ' ,
228
- notifyTime: ' ' ,
229
- expireTime: ' ' ,
230
- payOrderExtension: {
231
- channelNotifyData: ' ' ,
232
- no: ' '
233
- }
234
- };
235
210
236
211
export default {
237
212
name: " PayOrder" ,
@@ -278,47 +253,24 @@ export default {
278
253
notifyTime: [],
279
254
createTime: []
280
255
},
281
- // 商户加载遮罩层
282
- merchantLoading: false ,
283
- // 商户列表集合
284
- merchantList: null ,
256
+
285
257
// 支付应用列表集合
286
- appList: null ,
287
- // 支付渠道编码字典数据集合
288
- payChannelCodeDictDatum: getDictDatas (DICT_TYPE .PAY_CHANNEL_CODE ),
258
+ appList: [],
289
259
// 订单回调商户状态字典数据集合
290
260
payOrderNotifyDictDatum: getDictDatas (DICT_TYPE .PAY_ORDER_NOTIFY_STATUS ),
291
- // 订单状态字典数据集合
292
- payOrderDictDatum : getDictDatas ( DICT_TYPE . PAY_ORDER_STATUS ),
293
- // 订单退款状态字典数据集合
294
- payOrderRefundDictDatum : getDictDatas ( DICT_TYPE . PAY_ORDER_REFUND_STATUS ),
295
- orderDetail : JSON . parse ( JSON . stringify (defaultOrderDetail)) ,
261
+
262
+ // 订单详情
263
+ orderDetail : {
264
+ extension : {}
265
+ } ,
296
266
};
297
267
},
298
268
created () {
299
- // 初始化默认时间
300
- this .initTime ();
301
269
this .getList ();
302
- this .handleGetMerchantListByName (null );
303
270
},
304
271
methods: {
305
- initTime (){
306
- this .queryParams .createTime = [getNowDateTime (" 00:00:00" ), getNowDateTime (" 23:59:59" )];
307
- },
308
272
/** 查询列表 */
309
273
getList () {
310
- // 判断选择的日期是否超过了一个月
311
- let oneMonthTime = 31 * 24 * 3600 * 1000 ;
312
- if (this .queryParams .createTime == null ){
313
- this .initTime ();
314
- } else {
315
- let minDateTime = new Date (this .queryParams .createTime [0 ]).getTime ();
316
- let maxDateTime = new Date (this .queryParams .createTime [1 ]).getTime ()
317
- if (maxDateTime - minDateTime > oneMonthTime) {
318
- this .$message .error (' 时间范围最大为 31 天!' );
319
- return false ;
320
- }
321
- }
322
274
this .loading = true ;
323
275
// 执行查询
324
276
getOrderPage (this .queryParams ).then (response => {
@@ -339,23 +291,22 @@ export default {
339
291
/** 重置按钮操作 */
340
292
resetQuery () {
341
293
this .resetForm (" queryForm" );
342
- this .initTime ();
343
294
this .handleQuery ();
344
295
},
345
- /**
346
- * 查看订单详情
347
- */
348
- handleQueryDetails (row ) {
349
- this .orderDetail = JSON .parse (JSON .stringify (defaultOrderDetail));
296
+ /** 详情按钮操作 */
297
+ handleDetail (row ) {
298
+ this .orderDetail = {};
350
299
getOrderDetail (row .id ).then (response => {
300
+ // 设置值
351
301
this .orderDetail = response .data ;
352
- if (response . data . payOrderExtension === null ) {
353
- this .orderDetail .payOrderExtension = Object . assign ( defaultOrderDetail . payOrderExtension , {});
302
+ if (! this . orderDetail . extension ) {
303
+ this .orderDetail .extension = {}
354
304
}
305
+ // 弹窗打开
355
306
this .open = true ;
356
307
});
357
-
358
308
},
309
+
359
310
/** 导出按钮操作 */
360
311
handleExport () {
361
312
// 处理查询参数
0 commit comments