1705091d
wuxw
开发完成 admin 台账功能
|
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
|
<div class="order-manage-container animated fadeInRight">
<el-row :gutter="20">
<el-col :span="4">
<el-card class="border-radius">
<div class="treeview attendance-staff">
<ul class="list-group text-center border-radius">
<li v-for="(item, index) in orderManageInfo.apps" :key="index" class="list-group-item node-orgTree"
:class="{ 'vc-node-selected': orderManageInfo.conditions.appId == item.appId }" @click="swatchApp(item)">
{{ item.name }}
</li>
</ul>
</div>
</el-card>
</el-col>
<el-col :span="20">
<el-card>
<div slot="header" class="text-left">
<span>{{ $t('orderManage.queryCondition') }}</span>
</div>
<el-row :gutter="20">
<el-col :span="4">
<el-input v-model="orderManageInfo.conditions.oId" :placeholder="$t('orderManage.orderId')" clearable />
</el-col>
<el-col :span="4">
<el-input v-model="orderManageInfo.conditions.extTransactionId" :placeholder="$t('orderManage.externalId')"
clearable />
</el-col>
<el-col :span="4">
<el-input v-model="orderManageInfo.conditions.bId" :placeholder="$t('orderManage.businessId')" clearable />
</el-col>
<el-col :span="4">
|
1705091d
wuxw
开发完成 admin 台账功能
|
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
|
</el-col>
<el-col :span="4">
<el-button type="primary" @click="_queryOrdersMethod">
<i class="el-icon-search"></i>
{{ $t('common.search') }}
</el-button>
</el-col>
</el-row>
<el-row :gutter="20" class="mt-10">
<el-col :span="4">
<el-input v-model="orderManageInfo.conditions.staffNameLike" :placeholder="$t('orderManage.operator')"
clearable />
</el-col>
<el-col :span="4">
<el-input v-model="orderManageInfo.conditions.businessTypeNameLike"
:placeholder="$t('orderManage.businessName')" clearable />
</el-col>
</el-row>
</el-card>
<el-card class="mt-20">
<div slot="header" class="text-left">
<span>{{ $t('orderManage.orderList') }}</span>
</div>
<el-table :data="orderManageInfo.orderDataVos" border style="width: 100%">
<el-table-column prop="appName" :label="$t('orderManage.appName')" align="center" />
<el-table-column :label="$t('orderManage.orderId')" align="center">
<template slot-scope="scope">
<div>{{ scope.row.oId }}</div>
<div>({{ scope.row.extTransactionId }})</div>
</template>
</el-table-column>
<el-table-column :label="$t('orderManage.businessName')" align="center">
<template slot-scope="scope">
<div>{{ scope.row.name }}</div>
<div>({{ scope.row.businessTypeCd }})</div>
</template>
</el-table-column>
<el-table-column prop="bId" :label="$t('orderManage.businessId')" align="center" />
<el-table-column prop="createTime" :label="$t('orderManage.createTime')" align="center" />
<el-table-column :label="$t('orderManage.action')" align="center">
<template slot-scope="scope">
<span v-if="scope.row.action == 'ADD'">{{ $t('orderManage.add') }}</span>
<span v-else-if="scope.row.action == 'MOD'">{{ $t('orderManage.modify') }}</span>
<span v-else-if="scope.row.action == 'DEL'">{{ $t('orderManage.delete') }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="actionObj" :label="$t('orderManage.actionObj')" align="center" />
<el-table-column prop="userName" :label="$t('orderManage.operator')" align="center" />
<el-table-column :label="$t('orderManage.status')" align="center">
<template slot-scope="scope">
{{ scope.row.statusCd == 'C' ? $t('orderManage.completed') : $t('orderManage.failed') }}
</template>
</el-table-column>
<el-table-column :label="$t('common.operation')" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.bId" size="mini" @click="_showUnitemLog(scope.row)">
{{ $t('orderManage.log') }}
</el-button>
<span v-else>{{ $t('orderManage.noLog') }}</span>
</template>
</el-table-column>
</el-table>
<el-pagination :current-page="page.current" :page-sizes="[10, 20, 30, 50]" :page-size="page.size"
:total="page.total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
@current-change="handleCurrentChange" />
</el-card>
</el-col>
</el-row>
<view-un-item-log ref="viewUnItemLog" />
</div>
</template>
<script>
import { listCorders, listPublicApps } from '@/api/admin/orderManageApi'
import ViewUnItemLog from '@/components/admin/viewUnItemLog'
export default {
name: 'OrderManageList',
components: {
ViewUnItemLog
},
data() {
return {
orderManageInfo: {
orderDataVos: [],
apps: [],
total: 0,
records: 1,
conditions: {
oId: '',
extTransactionId: '',
orderTypeCd: '',
appId: '',
startTime: '',
endTime: '',
staffNameLike: '',
bId: '',
businessTypeNameLike: '',
page: 1,
row: 20
}
},
page: {
current: 1,
size: 20,
total: 0
}
}
},
created() {
this._listOrders(this.page.current, this.page.size)
this._loadApps()
},
methods: {
async _listOrders(page, rows) {
try {
this.orderManageInfo.conditions.page = page
this.orderManageInfo.conditions.row = rows
const params = { ...this.orderManageInfo.conditions }
const res = await listCorders(params)
this.orderManageInfo.total = res.total
this.orderManageInfo.records = res.records
this.orderManageInfo.orderDataVos = res.data
|
1705091d
wuxw
开发完成 admin 台账功能
|
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
} catch (error) {
this.$message.error(this.$t('orderManage.fetchError'))
}
},
async _loadApps() {
try {
this.orderManageInfo.apps = [{
appId: '',
name: this.$t('orderManage.allApps')
}]
const res = await listPublicApps({ page: 1, row: 50 })
this.orderManageInfo.apps = [...this.orderManageInfo.apps, ...res.apps]
} catch (error) {
this.$message.error(this.$t('orderManage.fetchAppsError'))
}
},
_queryOrdersMethod() {
this.page.current = 1
this._listOrders(this.page.current, this.page.size)
},
swatchApp(app) {
this.orderManageInfo.conditions.appId = app.appId
this._listOrders(this.page.current, this.page.size)
},
_showUnitemLog(order) {
this.$refs.viewUnItemLog.open(order)
},
handleSizeChange(val) {
this.page.size = val
this._listOrders(this.page.current, this.page.size)
},
handleCurrentChange(val) {
this.page.current = val
this._listOrders(this.page.current, this.page.size)
}
}
}
</script>
<style scoped>
.order-manage-container {
padding: 20px;
}
.border-radius {
border-radius: 4px;
}
.list-group {
list-style: none;
padding: 0;
margin: 0;
}
.list-group-item {
padding: 10px;
cursor: pointer;
}
.list-group-item:hover {
background-color: #f5f7fa;
}
.vc-node-selected {
background-color: #ecf5ff;
color: #409eff;
}
.mt-10 {
margin-top: 10px;
}
.mt-20 {
margin-top: 20px;
}
.w-100 {
width: 100%;
}
</style>
|