提交 | 用户 | 时间
|
0cceb6
|
1 |
<template> |
Y |
2 |
<div class="app-container"> |
|
3 |
<el-row :gutter="3"> |
|
4 |
<el-col :span="6"> |
|
5 |
<el-card shadow="always" class="boxSize"> |
|
6 |
<div class="centerImg"> |
|
7 |
<img style="width: 140px;height: 30px;" src="@/assets/logo/jcdm2.png" alt="dark"> |
|
8 |
<!-- <span class="nextLine" style="font-weight: bold">{{currentTime}}</span>--> |
|
9 |
</div> |
|
10 |
|
|
11 |
</el-card> |
|
12 |
</el-col> |
|
13 |
<el-col :span="3"> |
|
14 |
<el-card shadow="always" class="boxSize"> |
|
15 |
<span class="centerText" style="height: 60px">{{locationCode}}</span> |
|
16 |
</el-card> |
|
17 |
</el-col> |
|
18 |
<el-col :span="15"> |
|
19 |
<el-card shadow="always" class="boxSize"> |
|
20 |
<span class="centerText" >{{locationName}}</span> |
|
21 |
</el-card> |
|
22 |
</el-col> |
|
23 |
</el-row> |
|
24 |
<el-row :gutter="0" > |
|
25 |
<el-col :span="14"> |
|
26 |
<el-card class="box-card" style="margin-top: 5px" > |
ada5f3
|
27 |
<el-form :model="form" size="large" :inline="true" label-width="68px" @submit.native.prevent> |
Y |
28 |
<el-form-item label-width="200" label="发动机码" :prop="form.engineNo" style="align-content: center"> |
|
29 |
<input v-model="form.engineNo" |
|
30 |
ref="inputdata" |
|
31 |
style="height: 39px; width: 300px" |
|
32 |
placeholder="请输入发动机码" |
|
33 |
/> |
0cceb6
|
34 |
</el-form-item> |
ada5f3
|
35 |
</el-form> |
0cceb6
|
36 |
<el-form ref="form" :model="form" label-width="25%" > |
Y |
37 |
<el-form-item prop="productType"style="margin-top: 30px" > |
|
38 |
<span slot="label" style="font-size:22px;color:black"><strong>机型</strong></span> |
|
39 |
<el-input disabled style="font-size:20px" value="form.productType" v-model="form.productType" placeholder="" /> |
|
40 |
</el-form-item> |
|
41 |
</el-form> |
|
42 |
<el-form ref="form" :model="form" label-width="25%" > |
|
43 |
<el-form-item prop="orderNo" style="margin-top: 30px"> |
|
44 |
<span slot="label" style="font-size:22px;color:black"><strong>工单编号</strong></span> |
|
45 |
<el-input disabled style="font-size:20px" v-model="form.orderNo" placeholder="" /> |
|
46 |
</el-form-item> |
|
47 |
</el-form> |
|
48 |
<el-form ref="form" :model="form" label-width="25%" > |
|
49 |
<el-form-item prop="currentWorkstation" style="margin-top: 30px"> |
|
50 |
<span slot="label" style="font-size:22px;color:black"><strong>质量状态</strong></span> |
|
51 |
<el-input disabled style="font-size:20px" v-model:value="form.add" placeholder="" /> |
|
52 |
</el-form-item> |
|
53 |
</el-form> |
|
54 |
<el-divider></el-divider> |
|
55 |
|
|
56 |
<el-row :gutter="10" class="mb8" type="flex" justify="center" style="text-align: center"> |
|
57 |
<el-col :span="1.5"> |
ada5f3
|
58 |
<el-button plain :disabled="buttondisabled" type="primary" style="width:400px;height:160px" v-hasPermi="['bs:formula:add']"> |
0cceb6
|
59 |
<span class="el-icon-thumb" style="font-size:40px;color:black"></span> |
Y |
60 |
<span style="font-size:45px;color:black"><strong>强制上线</strong></span> |
|
61 |
</el-button> |
|
62 |
</el-col> |
|
63 |
</el-row> |
|
64 |
</el-card> |
|
65 |
</el-col> |
|
66 |
|
|
67 |
<el-col :span="10" inline style="margin-top: 5px"> |
|
68 |
<el-card class="custom-content" style="height: 530px" > |
|
69 |
<el-col :span="14"style=" "> |
|
70 |
<span style="font-size:25px"><strong>质量数据</strong></span> |
|
71 |
<el-divider></el-divider> |
|
72 |
{{this.form.engineCheckList}} |
|
73 |
</el-col> |
|
74 |
</el-card> |
|
75 |
</el-col> |
|
76 |
</el-row> |
|
77 |
</div> |
|
78 |
</template> |
|
79 |
<script> |
|
80 |
|
|
81 |
import { listOrderScheduling, getOrderScheduling, delOrderScheduling, addOrderScheduling, updateOrderScheduling } from "@/api/main/bs/orderScheduling/orderScheduling"; |
8069b5
|
82 |
import {listPassingStationCollection, getPassingStationCollection, delPassingStationCollection, addPassingStationCollection, updatePassingStationCollection,initializedData } from "@/api/main/da/passingStationCollection/passingStationCollection"; |
0cceb6
|
83 |
import {listLineInfo} from "@/api/main/bs/lineInfo/lineInfo"; |
Y |
84 |
import {getIp, listStationConf} from "@/api/main/sc/stationConf"; |
|
85 |
|
|
86 |
export default { |
|
87 |
components: { }, |
|
88 |
options: [], |
|
89 |
props: [], |
|
90 |
data() { |
|
91 |
return { |
|
92 |
options: [], |
|
93 |
total: 0, |
|
94 |
engineCheckList:[], |
|
95 |
showFlag:false, |
|
96 |
buttondisabled:true, |
8069b5
|
97 |
locationCode: "未配置工位", |
0cceb6
|
98 |
locationName: "未配置工位", |
Y |
99 |
|
ada5f3
|
100 |
scannerFlag: false, |
Y |
101 |
barcode: "", |
0cceb6
|
102 |
|
Y |
103 |
// 查询参数 |
|
104 |
queryParams: { |
|
105 |
pageNum: 1, |
|
106 |
pageSize: 10, |
|
107 |
engineNo: null, |
|
108 |
productType:null, |
|
109 |
orderNo:null, |
|
110 |
qualityStatus:null, |
|
111 |
currentWorkstation: null, |
|
112 |
add: null, |
|
113 |
engineCheckList:'暂无数据', |
|
114 |
}, |
|
115 |
// 表单参数 |
|
116 |
form: { |
|
117 |
engineNo: null, |
|
118 |
productType:null, |
|
119 |
orderNo:null, |
|
120 |
qualityStatus:null, |
|
121 |
currentWorkstation: null, |
|
122 |
add: null, |
|
123 |
engineCheckList:'暂无数据', |
|
124 |
}, |
|
125 |
add: null, |
|
126 |
}; |
|
127 |
}, |
|
128 |
computed: {}, |
|
129 |
watch: {}, |
ada5f3
|
130 |
|
Y |
131 |
beforeDestroy() { |
|
132 |
this.$refs.inputdata.removeEventListener('keydown',this.handleScannerInput) |
0cceb6
|
133 |
}, |
Y |
134 |
mounted() { |
ada5f3
|
135 |
this.setFocus() |
Y |
136 |
this.$refs.inputdata.addEventListener('keydown',this.handleScannerInput) |
0cceb6
|
137 |
this.getStationConf(); |
Y |
138 |
}, |
|
139 |
methods: { |
ada5f3
|
140 |
|
Y |
141 |
refresh() { |
|
142 |
location.reload(); |
|
143 |
}, |
|
144 |
setFocus(){ |
|
145 |
this.$nextTick(()=>{ |
|
146 |
this.$refs.inputdata.focus() |
|
147 |
}) |
|
148 |
}, |
|
149 |
handleScannerInput(event){ |
|
150 |
if (this.scannerFlag){ |
|
151 |
this.form.engineNo = '' |
|
152 |
this.$refs.inputdata.value = '' |
|
153 |
this.scannerFlag = false |
|
154 |
} |
|
155 |
const input = event.target |
|
156 |
const inputValue = input.value |
|
157 |
this.form.engineNo = inputValue |
|
158 |
if (event.key === 'Enter'){ |
|
159 |
this.scannerFlag = true |
|
160 |
console.log("条码:",this.form.engineNo) |
|
161 |
if(this.form.engineNo !== null && this.form.engineNo !== undefined) { |
8069b5
|
162 |
addPassingStationCollection({sfcCode:this.form.engineNo,locationCode:this.locationCode}).then(res =>{ |
H |
163 |
console.log("rrrrr",res) |
|
164 |
}) |
|
165 |
if(this.locationCode === 'BCOP040'|| this.locationCode === 'BCOP060'|| this.locationCode === 'BCOP100'|| this.locationCode === 'BP020' ){ |
|
166 |
initializedData({sfcCode:this.form.engineNo,locationCode:this.locationCode}).then(res =>{ |
|
167 |
}) |
|
168 |
} |
ada5f3
|
169 |
}else{ |
Y |
170 |
this.reset(); |
|
171 |
this.buttondisabled = true |
|
172 |
const h = this.$createElement; |
|
173 |
this.$message({ |
|
174 |
message: h('p',null, [ |
|
175 |
h('span', null, '警告 '), |
|
176 |
h('i', { style: 'color: black' }, '输入的发动机号有误'), |
|
177 |
h()]), |
|
178 |
type: 'error', |
|
179 |
center: true, |
|
180 |
offset:300 |
|
181 |
}); |
|
182 |
} |
8069b5
|
183 |
|
ada5f3
|
184 |
} |
8069b5
|
185 |
// this.AddEngineNo(); |
ada5f3
|
186 |
}, |
Y |
187 |
|
8069b5
|
188 |
handleScannerInput111(event){ |
H |
189 |
const param = { |
|
190 |
sfcCode: this.from.engineNo, |
|
191 |
} |
|
192 |
addPassingStationCollection(param).then(response => { |
|
193 |
}); |
|
194 |
}, |
|
195 |
|
|
196 |
|
|
197 |
// AddEngineNo(){ |
|
198 |
// const param = { |
|
199 |
// locationCode: this.from.locationCode, |
|
200 |
// sfcCode: this.from.engineNo, |
|
201 |
// // locationCode:"OP110", |
|
202 |
// // sfcCode:"666", |
|
203 |
// |
|
204 |
// } |
|
205 |
// addPassingStationCollection(param).then(response =>{}); |
|
206 |
// }, |
ada5f3
|
207 |
|
0cceb6
|
208 |
getStationConf() { |
Y |
209 |
getIp().then(response => { |
|
210 |
let queryParams = { |
|
211 |
ipAddress: response.msg, |
|
212 |
} |
|
213 |
listStationConf(queryParams).then(response => { |
|
214 |
this.locationName = response.rows[0].processesName |
|
215 |
this.locationCode = response.rows[0].processesCode |
|
216 |
}); |
|
217 |
|
|
218 |
}); |
|
219 |
|
|
220 |
}, |
|
221 |
reset() { |
|
222 |
this.form = { |
|
223 |
engineNo:null, |
|
224 |
productType:null, |
|
225 |
orderNo:null, |
|
226 |
qualityStatus:null, |
|
227 |
currentWorkstation: null, |
|
228 |
add: null, |
|
229 |
engineCheckList:'暂无数据', |
|
230 |
}; |
|
231 |
this.resetForm("form"); |
|
232 |
}, |
|
233 |
EngineNohandleChange(){ |
ada5f3
|
234 |
console.log('条码:',this.form.engineNo) |
0cceb6
|
235 |
if(this.form.engineNo !== null && this.form.engineNo !== undefined){ |
Y |
236 |
setSNCode(this.form.engineNo,this.locationCode) |
|
237 |
} |
|
238 |
}, |
|
239 |
|
|
240 |
}, |
|
241 |
} |
|
242 |
|
|
243 |
</script> |
|
244 |
<style scoped> |
|
245 |
::v-deep .el-input__inner{ |
|
246 |
height: 40px; |
|
247 |
} |
|
248 |
::v-deep .el-form-item__label { |
|
249 |
line-height: 40px; |
|
250 |
} |
|
251 |
.custom-content { |
|
252 |
height: 50%; /* 设置高度为50% */ |
|
253 |
} |
|
254 |
|
|
255 |
.boxSize{ |
|
256 |
height: 60px; |
|
257 |
} |
|
258 |
.centerText{ |
|
259 |
color: black; |
|
260 |
font-weight: bold; |
|
261 |
font-size: 20px; |
|
262 |
display: flex; |
|
263 |
justify-content: center; |
|
264 |
margin-top: 5px |
|
265 |
} |
8069b5
|
266 |
|
0cceb6
|
267 |
</style> |