track.vue
10.8 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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
<template>
<page-layout title="产品追溯" logo="https://gw.alipayobjects.com/zos/rmsportal/nxkuOJlFJuAUhzlMTCEe.png">
<page-header v-if="!$route.meta.pageHeader">
<slot slot="extra" name="extra"></slot>
<div slot="pageMenu">
<div class="page-menu-search" >
<a-input-search style="width: 80%; max-width: 522px;" v-model="queryParam.code" @search="searchAll" placeholder="计划号查询..." size="large" enterButton="搜索" />
</div>
</div>
</page-header>
<!-- <a-card :bordered="false" title="流程进度">-->
<!-- <a-steps :direction="isMobile() && 'vertical' || 'horizontal'" :current="1" progressDot>-->
<!-- <a-step title="创建项目">-->
<!-- </a-step>-->
<!-- <a-step title="部门初审">-->
<!-- </a-step>-->
<!-- <a-step title="财务复核">-->
<!-- </a-step>-->
<!-- <a-step title="完成">-->
<!-- </a-step>-->
<!-- </a-steps>-->
<!-- </a-card>-->
<a-card style="margin-top: 24px" :bordered="false" title="订单信息">
<detail-list>
<detail-list-item term="客户名称">{{basicSource.customerName}}</detail-list-item>
<detail-list-item term="产品名称">{{basicSource.orderName}}</detail-list-item>
<detail-list-item term="项目号">{{basicSource.techAsk}}</detail-list-item>
<detail-list-item term="计划号">{{basicSource.planNumber}}</detail-list-item>
<detail-list-item term="下单日期">{{basicSource.day}}</detail-list-item>
<detail-list-item term="客户要求">{{basicSource.customerAsked}}</detail-list-item>
<detail-list-item term="订单数量">{{basicSource.qty}}</detail-list-item>
<detail-list-item term="订单单位">{{basicSource.unit}}</detail-list-item>
<detail-list-item term="交货期">{{basicSource.deliveryAsk}}</detail-list-item>
<detail-list-item term="备注">{{basicSource.remark}}</detail-list-item>
</detail-list>
<!-- <a-card type="inner" title="多层信息组">-->
<!-- <detail-list title="组名称" size="small">-->
<!-- <detail-list-item term="负责人">林东东</detail-list-item>-->
<!-- <detail-list-item term="角色码">1234567</detail-list-item>-->
<!-- <detail-list-item term="所属部门">XX公司-YY部</detail-list-item>-->
<!-- <detail-list-item term="过期时间">2018-08-08</detail-list-item>-->
<!-- <detail-list-item term="描述">这段描述很长很长很长很长很长很长很长很长很长很长很长很长很长很长...</detail-list-item>-->
<!-- </detail-list>-->
<!-- <a-divider style="margin: 16px 0"/>-->
<!-- <detail-list title="组名称" size="small" :col="1">-->
<!-- <detail-list-item term="学名"> Citrullus lanatus (Thunb.) Matsum. et Nakai一年生蔓生藤本;茎、枝粗壮,具明显的棱。卷须较粗..-->
<!-- </detail-list-item>-->
<!-- </detail-list>-->
<!-- <a-divider style="margin: 16px 0"/>-->
<!-- <detail-list title="组名称" size="small" :col="2">-->
<!-- <detail-list-item term="负责人">付小小</detail-list-item>-->
<!-- <detail-list-item term="角色码">1234567</detail-list-item>-->
<!-- </detail-list>-->
<!-- </a-card>-->
</a-card>
<!-- <a-card style="margin-top: 24px" :bordered="false" title="用户近半年来电记录">-->
<!-- <div class="no-data">-->
<!-- <a-icon type="frown-o"/>-->
<!-- 暂无数据-->
<!-- </div>-->
<!-- </a-card>-->
<!-- 操作 -->
<a-card
style="margin-top: 24px"
:bordered="false"
:tabList="tabList"
:activeTabKey="activeTabKey"
@tabChange="(key) => {this.activeTabKey = key}"
>
<a-table
v-if="activeTabKey === '1'"
:columns="operationColumns"
:dataSource="partSource"
:pagination="true"
>
<template
slot="status"
slot-scope="status">
<a-badge :status="status | statusTypeFilter" :text="status | statusFilter"/>
</template>
</a-table>
<a-table
v-if="activeTabKey === '2'"
:columns="materialColumns"
:dataSource="materialSource"
:pagination="true"
>
<template
slot="status"
slot-scope="status">
<a-badge :status="status | statusTypeFilter" :text="status | statusFilter"/>
</template>
</a-table>
<a-table
v-if="activeTabKey === '3'"
:columns="operationColumns"
:dataSource="operation3"
:pagination="false"
>
<template
slot="status"
slot-scope="status">
<a-badge :status="status | statusTypeFilter" :text="status | statusFilter"/>
</template>
</a-table>
</a-card>
</page-layout>
</template>
<script>
import {mixinDevice} from '@/utils/mixin.js'
import PageLayout from '@/components/page/PageLayout'
import DetailList from '@/components/tools/DetailList'
import {getOrderBasicInfo,getPartInfo,getProductionMaterialRequisition} from '@/api/api'
const DetailListItem = DetailList.Item
export default {
name: "Advanced",
components: {
PageLayout,
DetailList,
DetailListItem
},
mixins: [mixinDevice],
data() {
return {
queryParam: {},
basicSource:[],
partSource:[],
materialSource:[],
mainId:'',
tabList: [
{
key: '1',
tab: '部件情况'
},
{
key: '2',
tab: '生产领料'
},
{
key: '3',
tab: '生产质检'
},
],
activeTabKey: '1',
operationColumns: [
{
title: '图号',
dataIndex: 'parentdrawingno',
key: 'parentdrawingno'
},
{
title: '部件名称',
dataIndex: 'partName',
key: 'partName'
},
{
title: '生产情况',
dataIndex: 'userDef3',
key: 'userDef3'
}
],
materialColumns: [
{
title: '领料单号',
dataIndex: 'userdef2',
key: 'userdef2'
},
{
title: '发料人',
dataIndex: 'createBy',
key: 'createBy'
},
{
title: '班组',
dataIndex: 'userdef3',
key: 'userdef3'
},
{
title: '计划号',
dataIndex: 'referCode',
key: 'referCode'
},
{
title: '物料名称',
dataIndex: 'materialName',
key: 'materialName'
},
{
title: '物料编码',
dataIndex: 'materialCode',
key: 'materialCode'
},
{
title: '物料规格',
dataIndex: 'materialSpec',
key: 'materialSpec'
},
{
title: '领料数量',
dataIndex: 'qty',
key: 'qty'
}, {
title: '单位',
dataIndex: 'materialUnit',
key: 'materialUnit'
}
],
operation1: [
{
key: 'op1',
type: '订购关系生效',
name: '曲丽丽',
status: 'agree',
updatedAt: '2017-10-03 19:23:12',
remark: '-'
},
{
key: 'op2',
type: '财务复审',
name: '付小小',
status: 'reject',
updatedAt: '2017-10-03 19:23:12',
remark: '不通过原因'
},
{
key: 'op3',
type: '部门初审',
name: '周毛毛',
status: 'agree',
updatedAt: '2017-10-03 19:23:12',
remark: '-'
},
{
key: 'op4',
type: '提交订单',
name: '林东东',
status: 'agree',
updatedAt: '2017-10-03 19:23:12',
remark: '很棒'
},
{
key: 'op5',
type: '创建订单',
name: '汗牙牙',
status: 'agree',
updatedAt: '2017-10-03 19:23:12',
remark: '-'
}
],
operation2: [
{
key: 'op2',
type: '财务复审',
name: '付小小',
status: 'reject',
updatedAt: '2017-10-03 19:23:12',
remark: '不通过原因'
},
{
key: 'op3',
type: '部门初审',
name: '周毛毛',
status: 'agree',
updatedAt: '2017-10-03 19:23:12',
remark: '-'
},
{
key: 'op4',
type: '提交订单',
name: '林东东',
status: 'agree',
updatedAt: '2017-10-03 19:23:12',
remark: '很棒'
}
],
operation3: [
{
key: 'op2',
type: '财务复审',
name: '付小小',
status: 'reject',
updatedAt: '2017-10-03 19:23:12',
remark: '不通过原因'
},
{
key: 'op3',
type: '部门初审',
name: '周毛毛',
status: 'agree',
updatedAt: '2017-10-03 19:23:12',
remark: '-'
}
],
}
},
filters: {
statusFilter(status) {
const statusMap = {
'agree': '成功',
'reject': '驳回'
}
return statusMap[status]
},
statusTypeFilter(type) {
const statusTypeMap = {
'agree': 'success',
'reject': 'error'
}
return statusTypeMap[type]
}
},
methods: {
searchAll(){
if (this.queryParam.code==undefined){
this.$message.error("请输入料号或图号");
return false;
}
let params = {
'code': this.queryParam.code
}
this.basicSource=[];
getOrderBasicInfo(params).then(res => {
if (res.success) {
this.loading = false
if (res.result==undefined){
this.$message.warn("查询无结果!!!");
return false;
}
this.basicSource = res.result
}else{
this.$message.error("查询异常!!!");
}
})
getPartInfo(params).then(res => {
this.partSource = res.result
})
getProductionMaterialRequisition(params).then(res => {
this.materialSource = res.result
})
}
},
}
</script>
<style lang="less" scoped>
.detail-layout {
margin-left: 44px;
}
.text {
color: rgba(0, 0, 0, .45);
}
.heading {
color: rgba(0, 0, 0, .85);
font-size: 20px;
}
.no-data {
color: rgba(0, 0, 0, .25);
text-align: center;
line-height: 64px;
font-size: 16px;
i {
font-size: 24px;
margin-right: 16px;
position: relative;
top: 3px;
}
}
.mobile {
.detail-layout {
margin-left: unset;
}
.text {
}
.status-list {
text-align: left;
}
}
</style>