提交 | 用户 | 时间
|
d4f437
|
1 |
<template> |
Y |
2 |
<div class="app-container"> |
|
3 |
<div style="height: 100%;width: 100%"> |
|
4 |
<el-card class="box-card"> |
|
5 |
<el-form :model="queryParams" size="large" :inline="true" label-width="68px" @submit.native.prevent> |
|
6 |
<el-form-item label-width="200" label="箱体码" :prop="queryParams.productionNotice" style="align-content: center"> |
|
7 |
<input v-model="queryParams.productionNotice" |
|
8 |
ref="inputdata" |
|
9 |
style="height: 39px; width: 300px" |
|
10 |
placeholder="请扫描箱体码" |
|
11 |
/> |
|
12 |
</el-form-item> |
49ca7c
|
13 |
<el-checkbox class="custom-size" style="margin-left: 40px; margin-right: 40px" v-model="repairFlag">返修</el-checkbox> |
d4f437
|
14 |
<el-button size="large" type="info" @click="refresh">返回</el-button> |
Y |
15 |
</el-form> |
|
16 |
</el-card> |
|
17 |
<el-row :gutter="0"> |
|
18 |
<el-col :span="6"> |
|
19 |
<div > |
8876c2
|
20 |
<el-card style="height: 560px"> |
d4f437
|
21 |
<el-descriptions class="margin-top" :column="1" direction="horizontal"> |
Y |
22 |
<el-descriptions-item label="生产订单">{{singleSelect.workOrderNo}}</el-descriptions-item> |
|
23 |
<el-descriptions-item label="机型" :span="2">{{singleSelect.typeZ}}</el-descriptions-item> |
|
24 |
<el-descriptions-item label="计划数量"> |
|
25 |
{{singleSelect.planQty}} |
|
26 |
</el-descriptions-item> |
|
27 |
<el-descriptions-item label="上线数量">{{onlineNum}}</el-descriptions-item> |
|
28 |
<el-descriptions-item label="完成数量">{{finishNum}}</el-descriptions-item> |
|
29 |
<el-descriptions-item label="不合格数">{{unReachNum}}</el-descriptions-item> |
|
30 |
</el-descriptions> |
|
31 |
</el-card> |
|
32 |
</div> |
|
33 |
</el-col> |
|
34 |
<el-col :span="18"> |
|
35 |
<div> |
8876c2
|
36 |
<el-card style="height: 560px; overflow: auto"> |
d4f437
|
37 |
<el-table border :data="orderSchedulingList"> |
Y |
38 |
<el-table-column |
|
39 |
type="index" |
|
40 |
label="序号" |
|
41 |
width="50"></el-table-column> |
|
42 |
<el-table-column label="生产订单" align="center" prop="orderNo" width="130"> |
|
43 |
|
|
44 |
</el-table-column> |
|
45 |
<el-table-column label="发动机号" align="center" prop="engineNo" width="150"> |
|
46 |
|
|
47 |
</el-table-column> |
8876c2
|
48 |
<el-table-column label="箱体码" align="center" prop="boxCode" width="250"> |
W |
49 |
|
|
50 |
</el-table-column> |
d4f437
|
51 |
<el-table-column label="机型" align="center" prop="model"> |
Y |
52 |
|
|
53 |
</el-table-column> |
|
54 |
<el-table-column label="生产状态" align="center" prop="productionStatus"> |
|
55 |
<template slot-scope="scope"> |
|
56 |
<dict-tag :options="dict.type.order_scheduling_produce_status" :value="scope.row.productionStatus"/> |
|
57 |
</template> |
|
58 |
</el-table-column> |
|
59 |
<el-table-column label="质量状态" align="center" prop="qualityStatus"> |
|
60 |
<template slot-scope="scope"> |
|
61 |
<dict-tag :options="dict.type.quality_status" :value="scope.row.qualityStatus"/> |
|
62 |
</template> |
|
63 |
</el-table-column> |
|
64 |
|
|
65 |
|
|
66 |
<el-table-column label="操作人" align="center" prop="operator"> |
|
67 |
</el-table-column> |
|
68 |
<el-table-column label="操作时间" align="center" prop="operateTime" width="160"> |
|
69 |
<template slot-scope="scope"> |
|
70 |
<span>{{ parseTime(scope.row.operateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
|
71 |
</template> |
|
72 |
</el-table-column> |
|
73 |
|
|
74 |
</el-table> |
|
75 |
<pagination |
|
76 |
v-show="total>0" |
|
77 |
:total="total" |
|
78 |
:page.sync="queryParams.pageNum" |
|
79 |
:limit.sync="queryParams.pageSize" |
|
80 |
@pagination="getListData" |
|
81 |
/> |
|
82 |
</el-card> |
|
83 |
</div> |
|
84 |
</el-col> |
|
85 |
</el-row> |
|
86 |
</div> |
|
87 |
</div> |
|
88 |
</template> |
|
89 |
|
|
90 |
<script> |
|
91 |
|
|
92 |
import { engineNoIsInModel, getSumDataMethod, listOrderScheduling3 } from "../../../../api/main/bs/orderScheduling/orderScheduling"; |
|
93 |
export default { |
|
94 |
name: 'Detail', |
|
95 |
props: ['singleSelect'], |
|
96 |
dicts: ['order_scheduling_produce_status','quality_status','print_status','material_type'], |
|
97 |
data(){ |
|
98 |
return{ |
|
99 |
// 总条数 |
|
100 |
total: 0, |
49ca7c
|
101 |
repairFlag:false, |
d4f437
|
102 |
queryParams: { |
Y |
103 |
orderNo:'', |
|
104 |
pageNum: 1, |
|
105 |
pageSize: 10, |
|
106 |
}, |
|
107 |
orderSchedulingList: [], |
|
108 |
onlineNum: 0, |
|
109 |
finishNum: 0, |
|
110 |
unReachNum: 0, |
|
111 |
scannerFlag: false |
|
112 |
} |
|
113 |
}, |
|
114 |
methods:{ |
|
115 |
handleQuery(){ |
|
116 |
|
|
117 |
}, |
|
118 |
refresh() { |
|
119 |
location.reload(); |
|
120 |
}, |
|
121 |
setFocus(){ |
|
122 |
this.$nextTick(()=>{ |
|
123 |
this.$refs.inputdata.focus() |
|
124 |
}) |
|
125 |
}, |
|
126 |
handleScannerInput(event){ |
|
127 |
if (this.scannerFlag){ |
|
128 |
this.queryParams.productionNotice = '' |
|
129 |
this.$refs.inputdata.value = '' |
|
130 |
this.scannerFlag = false |
|
131 |
} |
|
132 |
const input = event.target |
|
133 |
const inputValue = input.value |
|
134 |
this.queryParams.productionNotice = inputValue |
|
135 |
if (event.key === 'Enter'){ |
|
136 |
this.scannerFlag = true |
|
137 |
//扫描完成 |
|
138 |
engineNoIsInModel({engineNo:this.queryParams.productionNotice, |
49ca7c
|
139 |
model:this.singleSelect.typeZ,orderNo:this.singleSelect.workOrderNo,repairFlag:this.repairFlag |
d4f437
|
140 |
}).then(res => { |
Y |
141 |
if (res.data===500){ |
|
142 |
this.$message({ |
|
143 |
message:res.msg, |
|
144 |
type:'warning' |
|
145 |
}) |
|
146 |
}else { |
|
147 |
this.$message({ |
|
148 |
message:'操作成功', |
|
149 |
type:'success' |
|
150 |
}) |
cd403c
|
151 |
this.repairFlag = false |
d4f437
|
152 |
this.getListData() |
Y |
153 |
} |
|
154 |
}) |
|
155 |
} |
|
156 |
}, |
|
157 |
//查询列表 |
|
158 |
getListData(){ |
|
159 |
this.queryParams.orderNo = this.singleSelect.workOrderNo |
|
160 |
listOrderScheduling3(this.queryParams).then(res => { |
|
161 |
this.orderSchedulingList = res.rows |
|
162 |
this.total = res.total |
|
163 |
}) |
|
164 |
getSumDataMethod(this.queryParams).then(res =>{ |
|
165 |
console.log('res',res) |
|
166 |
this.onlineNum = res.data.onlineNum |
|
167 |
this.finishNum = res.data.finishNum |
|
168 |
this.unReachNum = res.data.unqualified |
|
169 |
}) |
|
170 |
} |
|
171 |
}, |
|
172 |
mounted() { |
|
173 |
this.getListData() |
|
174 |
this.setFocus() |
|
175 |
this.$refs.inputdata.addEventListener('keydown',this.handleScannerInput) |
|
176 |
}, |
|
177 |
beforeDestroy() { |
|
178 |
this.$refs.inputdata.removeEventListener('keydown',this.handleScannerInput) |
|
179 |
} |
|
180 |
} |
|
181 |
</script> |