<template>
|
<div class="app-container">
|
<div style="height: 100%;width: 100%">
|
<el-card class="box-card">
|
<el-form :model="queryParams" size="large" :inline="true" label-width="68px" @submit.native.prevent>
|
<el-form-item label-width="200" label="箱体码" :prop="queryParams.productionNotice" style="align-content: center">
|
<input v-model="queryParams.productionNotice"
|
ref="inputdata"
|
style="height: 39px; width: 300px"
|
placeholder="请扫描箱体码"
|
/>
|
</el-form-item>
|
<el-checkbox class="custom-size" style="margin-left: 40px; margin-right: 40px" v-model="repairFlag">返修</el-checkbox>
|
<el-button size="large" type="info" @click="refresh">返回</el-button>
|
</el-form>
|
</el-card>
|
<el-row :gutter="0">
|
<el-col :span="6">
|
<div >
|
<el-card style="height: 560px">
|
<el-descriptions class="margin-top" :column="1" direction="horizontal">
|
<el-descriptions-item label="生产订单">{{singleSelect.workOrderNo}}</el-descriptions-item>
|
<el-descriptions-item label="机型" :span="2">{{singleSelect.typeZ}}</el-descriptions-item>
|
<el-descriptions-item label="计划数量">
|
{{singleSelect.planQty}}
|
</el-descriptions-item>
|
<el-descriptions-item label="上线数量">{{onlineNum}}</el-descriptions-item>
|
<el-descriptions-item label="完成数量">{{finishNum}}</el-descriptions-item>
|
<el-descriptions-item label="不合格数">{{unReachNum}}</el-descriptions-item>
|
</el-descriptions>
|
</el-card>
|
</div>
|
</el-col>
|
<el-col :span="18">
|
<div>
|
<el-card style="height: 560px; overflow: auto">
|
<el-table border :data="orderSchedulingList">
|
<el-table-column
|
type="index"
|
label="序号"
|
width="50"></el-table-column>
|
<el-table-column label="生产订单" align="center" prop="orderNo" width="130">
|
|
</el-table-column>
|
<el-table-column label="发动机号" align="center" prop="engineNo" width="150">
|
|
</el-table-column>
|
<el-table-column label="箱体码" align="center" prop="boxCode" width="250">
|
|
</el-table-column>
|
<el-table-column label="机型" align="center" prop="model">
|
|
</el-table-column>
|
<el-table-column label="生产状态" align="center" prop="productionStatus">
|
<template slot-scope="scope">
|
<dict-tag :options="dict.type.order_scheduling_produce_status" :value="scope.row.productionStatus"/>
|
</template>
|
</el-table-column>
|
<el-table-column label="质量状态" align="center" prop="qualityStatus">
|
<template slot-scope="scope">
|
<dict-tag :options="dict.type.quality_status" :value="scope.row.qualityStatus"/>
|
</template>
|
</el-table-column>
|
|
|
<el-table-column label="操作人" align="center" prop="operator">
|
</el-table-column>
|
<el-table-column label="操作时间" align="center" prop="operateTime" width="160">
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.operateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
</template>
|
</el-table-column>
|
|
</el-table>
|
<pagination
|
v-show="total>0"
|
:total="total"
|
:page.sync="queryParams.pageNum"
|
:limit.sync="queryParams.pageSize"
|
@pagination="getListData"
|
/>
|
</el-card>
|
</div>
|
</el-col>
|
</el-row>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
|
import { engineNoIsInModel, getSumDataMethod, listOrderScheduling3 } from "../../../../api/main/bs/orderScheduling/orderScheduling";
|
export default {
|
name: 'Detail',
|
props: ['singleSelect'],
|
dicts: ['order_scheduling_produce_status','quality_status','print_status','material_type'],
|
data(){
|
return{
|
// 总条数
|
total: 0,
|
repairFlag:false,
|
queryParams: {
|
orderNo:'',
|
pageNum: 1,
|
pageSize: 10,
|
},
|
orderSchedulingList: [],
|
onlineNum: 0,
|
finishNum: 0,
|
unReachNum: 0,
|
scannerFlag: false
|
}
|
},
|
methods:{
|
handleQuery(){
|
|
},
|
refresh() {
|
location.reload();
|
},
|
setFocus(){
|
this.$nextTick(()=>{
|
this.$refs.inputdata.focus()
|
})
|
},
|
handleScannerInput(event){
|
if (this.scannerFlag){
|
this.queryParams.productionNotice = ''
|
this.$refs.inputdata.value = ''
|
this.scannerFlag = false
|
}
|
const input = event.target
|
const inputValue = input.value
|
this.queryParams.productionNotice = inputValue
|
if (event.key === 'Enter'){
|
this.scannerFlag = true
|
//扫描完成
|
engineNoIsInModel({engineNo:this.queryParams.productionNotice,
|
model:this.singleSelect.typeZ,orderNo:this.singleSelect.workOrderNo,repairFlag:this.repairFlag
|
}).then(res => {
|
if (res.data===500){
|
this.$message({
|
message:res.msg,
|
type:'warning'
|
})
|
}else {
|
this.$message({
|
message:'操作成功',
|
type:'success'
|
})
|
this.repairFlag = false
|
this.getListData()
|
}
|
})
|
}
|
},
|
//查询列表
|
getListData(){
|
this.queryParams.orderNo = this.singleSelect.workOrderNo
|
listOrderScheduling3(this.queryParams).then(res => {
|
this.orderSchedulingList = res.rows
|
this.total = res.total
|
})
|
getSumDataMethod(this.queryParams).then(res =>{
|
console.log('res',res)
|
this.onlineNum = res.data.onlineNum
|
this.finishNum = res.data.finishNum
|
this.unReachNum = res.data.unqualified
|
})
|
}
|
},
|
mounted() {
|
this.getListData()
|
this.setFocus()
|
this.$refs.inputdata.addEventListener('keydown',this.handleScannerInput)
|
},
|
beforeDestroy() {
|
this.$refs.inputdata.removeEventListener('keydown',this.handleScannerInput)
|
}
|
}
|
</script>
|