提交 | 用户 | 时间
|
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> |
51b05b
|
73 |
<el-table-column |
W |
74 |
fixed="right" |
|
75 |
label="操作" |
|
76 |
width="100"> |
|
77 |
<template slot-scope="scope"> |
|
78 |
<el-button @click="handleClick(scope.row)" type="text" size="small">更换箱体上线</el-button> |
|
79 |
</template> |
|
80 |
</el-table-column> |
d4f437
|
81 |
</el-table> |
Y |
82 |
<pagination |
|
83 |
v-show="total>0" |
|
84 |
:total="total" |
|
85 |
:page.sync="queryParams.pageNum" |
|
86 |
:limit.sync="queryParams.pageSize" |
|
87 |
@pagination="getListData" |
|
88 |
/> |
|
89 |
</el-card> |
|
90 |
</div> |
|
91 |
</el-col> |
|
92 |
</el-row> |
|
93 |
</div> |
51b05b
|
94 |
<el-dialog v-dialogpop-up :title="title" :visible.sync="changeBoxFlag" width="500px" append-to-body> |
W |
95 |
<span slot="title"> |
|
96 |
<i class="el-icon-s-order"></i> |
|
97 |
{{titleName}} |
|
98 |
</span> |
|
99 |
<el-form ref="changeFrom" inline :model="changeFrom" label-width="80px"> |
|
100 |
<el-form-item label="发动机号" prop="sfcCode"> |
|
101 |
<el-input disabled v-model="changeFrom.sfcCode" style="width: 370px"/> |
|
102 |
</el-form-item> |
|
103 |
<el-form-item label="原箱体码" prop="boxCode"> |
|
104 |
<el-input disabled v-model="changeFrom.boxCode" style="width: 370px"/> |
|
105 |
</el-form-item> |
|
106 |
<el-form-item label="现箱体码" v-model="changeFrom.newBoxCode" prop="newBoxCode"> |
|
107 |
<input v-model="changeFrom.newBoxCode" |
|
108 |
ref="changeBoxInput" |
|
109 |
style="height: 39px; width: 370px" |
|
110 |
placeholder="请扫描箱体码" |
|
111 |
/> |
|
112 |
</el-form-item> |
|
113 |
</el-form> |
|
114 |
<div slot="footer" class="dialog-footer"> |
|
115 |
<el-button type="primary" @click="submitFormForBoxCode">确 定</el-button> |
|
116 |
<el-button @click="cancel">取 消</el-button> |
|
117 |
</div> |
|
118 |
</el-dialog> |
d4f437
|
119 |
</div> |
Y |
120 |
</template> |
|
121 |
|
|
122 |
<script> |
|
123 |
|
51b05b
|
124 |
import { engineNoIsInModel, changeBoxCode, getSumDataMethod, listOrderScheduling3 } from "../../../../api/main/bs/orderScheduling/orderScheduling"; |
d4f437
|
125 |
export default { |
Y |
126 |
name: 'Detail', |
|
127 |
props: ['singleSelect'], |
|
128 |
dicts: ['order_scheduling_produce_status','quality_status','print_status','material_type'], |
|
129 |
data(){ |
|
130 |
return{ |
51b05b
|
131 |
title: '更换箱体', |
W |
132 |
changeBoxFlag: false, |
|
133 |
titleName: '更换箱体', |
|
134 |
changeFrom: { |
|
135 |
boxCode: '', |
|
136 |
newBoxCode: '', |
|
137 |
sfcCode: '' |
|
138 |
}, |
d4f437
|
139 |
// 总条数 |
Y |
140 |
total: 0, |
49ca7c
|
141 |
repairFlag:false, |
d4f437
|
142 |
queryParams: { |
Y |
143 |
orderNo:'', |
|
144 |
pageNum: 1, |
|
145 |
pageSize: 10, |
|
146 |
}, |
|
147 |
orderSchedulingList: [], |
|
148 |
onlineNum: 0, |
|
149 |
finishNum: 0, |
|
150 |
unReachNum: 0, |
|
151 |
scannerFlag: false |
|
152 |
} |
|
153 |
}, |
|
154 |
methods:{ |
|
155 |
handleQuery(){ |
|
156 |
|
|
157 |
}, |
51b05b
|
158 |
submitFormForBoxCode(){ |
W |
159 |
if (this.changeFrom.newBoxCode === '' || this.changeFrom.newBoxCode === null){ |
|
160 |
this.$message.info("新箱体码不能为空") |
|
161 |
} else { |
|
162 |
changeBoxCode({sfcCode:this.changeFrom.sfcCode,newBoxCode:this.changeFrom.newBoxCode}).then(res => { |
|
163 |
console.log('res',res) |
|
164 |
if (res.code===200){ |
|
165 |
this.$message({ |
|
166 |
message:'操作成功', |
|
167 |
type:'success' |
|
168 |
}) |
|
169 |
this.changeBoxFlag = false |
|
170 |
this.getListData() |
|
171 |
this.$refs.inputdata.focus() |
|
172 |
}else { |
|
173 |
this.$message({ |
|
174 |
message:res.msg, |
|
175 |
type:'warning' |
|
176 |
}) |
|
177 |
|
|
178 |
} |
|
179 |
}) |
|
180 |
} |
|
181 |
|
|
182 |
}, |
|
183 |
handleClick(row){ |
|
184 |
console.log('row',row) |
|
185 |
this.changeBoxFlag = true |
|
186 |
this.changeFrom.sfcCode = row.engineNo |
|
187 |
this.changeFrom.boxCode = row.boxCode |
|
188 |
this.changeFrom.newBoxCode = '' |
|
189 |
this.$nextTick(()=>{ |
|
190 |
this.$refs.changeBoxInput.focus() |
|
191 |
}) |
|
192 |
}, |
|
193 |
cancel(){ |
|
194 |
this.changeBoxFlag = false |
|
195 |
this.$refs.inputdata.focus() |
|
196 |
}, |
|
197 |
handleChangeBoxInput(event){ |
|
198 |
const input = event.target |
|
199 |
const inputValue = input.value |
|
200 |
this.changeFrom.newBoxCode = inputValue |
|
201 |
|
|
202 |
}, |
d4f437
|
203 |
refresh() { |
51b05b
|
204 |
this.$emit("reserveChild",null) |
d4f437
|
205 |
}, |
Y |
206 |
setFocus(){ |
|
207 |
this.$nextTick(()=>{ |
|
208 |
this.$refs.inputdata.focus() |
|
209 |
}) |
|
210 |
}, |
|
211 |
handleScannerInput(event){ |
|
212 |
if (this.scannerFlag){ |
|
213 |
this.queryParams.productionNotice = '' |
|
214 |
this.$refs.inputdata.value = '' |
|
215 |
this.scannerFlag = false |
|
216 |
} |
|
217 |
const input = event.target |
|
218 |
const inputValue = input.value |
|
219 |
this.queryParams.productionNotice = inputValue |
|
220 |
if (event.key === 'Enter'){ |
|
221 |
this.scannerFlag = true |
|
222 |
//扫描完成 |
|
223 |
engineNoIsInModel({engineNo:this.queryParams.productionNotice, |
49ca7c
|
224 |
model:this.singleSelect.typeZ,orderNo:this.singleSelect.workOrderNo,repairFlag:this.repairFlag |
d4f437
|
225 |
}).then(res => { |
Y |
226 |
if (res.data===500){ |
|
227 |
this.$message({ |
|
228 |
message:res.msg, |
|
229 |
type:'warning' |
|
230 |
}) |
|
231 |
}else { |
|
232 |
this.$message({ |
|
233 |
message:'操作成功', |
|
234 |
type:'success' |
|
235 |
}) |
cd403c
|
236 |
this.repairFlag = false |
d4f437
|
237 |
this.getListData() |
Y |
238 |
} |
|
239 |
}) |
|
240 |
} |
|
241 |
}, |
|
242 |
//查询列表 |
|
243 |
getListData(){ |
|
244 |
this.queryParams.orderNo = this.singleSelect.workOrderNo |
|
245 |
listOrderScheduling3(this.queryParams).then(res => { |
|
246 |
this.orderSchedulingList = res.rows |
|
247 |
this.total = res.total |
|
248 |
}) |
|
249 |
getSumDataMethod(this.queryParams).then(res =>{ |
|
250 |
console.log('res',res) |
|
251 |
this.onlineNum = res.data.onlineNum |
|
252 |
this.finishNum = res.data.finishNum |
|
253 |
this.unReachNum = res.data.unqualified |
|
254 |
}) |
|
255 |
} |
|
256 |
}, |
|
257 |
mounted() { |
|
258 |
this.getListData() |
|
259 |
this.setFocus() |
|
260 |
this.$refs.inputdata.addEventListener('keydown',this.handleScannerInput) |
51b05b
|
261 |
this.$refs.changeBoxInput.addEventListener('keydown',this.handleChangeBoxInput) |
d4f437
|
262 |
}, |
Y |
263 |
beforeDestroy() { |
|
264 |
this.$refs.inputdata.removeEventListener('keydown',this.handleScannerInput) |
51b05b
|
265 |
this.$refs.changeBoxInput.removeEventListener('keydown',this.handleChangeBoxInput) |
d4f437
|
266 |
} |
Y |
267 |
} |
|
268 |
</script> |