| | |
| | | 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: 460px"> |
| | | <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-col> |
| | | <el-col :span="18"> |
| | | <div> |
| | | <el-card style="height: 460px; overflow: auto"> |
| | | <el-card style="height: 560px; overflow: auto"> |
| | | <el-table border :data="orderSchedulingList"> |
| | | <el-table-column |
| | | type="index" |
| | |
| | | |
| | | </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"> |
| | |
| | | <span>{{ parseTime(scope.row.operateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | fixed="right" |
| | | label="操作" |
| | | width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="handleClick(scope.row)" type="text" size="small">更换箱体上线</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | v-show="total>0" |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <el-dialog v-dialogpop-up :title="title" :visible.sync="changeBoxFlag" width="500px" append-to-body> |
| | | <span slot="title"> |
| | | <i class="el-icon-s-order"></i> |
| | | {{titleName}} |
| | | </span> |
| | | <el-form ref="changeFrom" inline :model="changeFrom" label-width="80px"> |
| | | <el-form-item label="发动机号" prop="sfcCode"> |
| | | <el-input disabled v-model="changeFrom.sfcCode" style="width: 370px"/> |
| | | </el-form-item> |
| | | <el-form-item label="原箱体码" prop="boxCode"> |
| | | <el-input disabled v-model="changeFrom.boxCode" style="width: 370px"/> |
| | | </el-form-item> |
| | | <el-form-item label="现箱体码" v-model="changeFrom.newBoxCode" prop="newBoxCode"> |
| | | <input v-model="changeFrom.newBoxCode" |
| | | ref="changeBoxInput" |
| | | style="height: 39px; width: 370px" |
| | | placeholder="请扫描箱体码" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitFormForBoxCode">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { engineNoIsInModel, getSumDataMethod, listOrderScheduling3 } from "../../../../api/main/bs/orderScheduling/orderScheduling"; |
| | | import { engineNoIsInModel, changeBoxCode, 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{ |
| | | title: '更换箱体', |
| | | changeBoxFlag: false, |
| | | titleName: '更换箱体', |
| | | changeFrom: { |
| | | boxCode: '', |
| | | newBoxCode: '', |
| | | sfcCode: '' |
| | | }, |
| | | // 总条数 |
| | | total: 0, |
| | | repairFlag:false, |
| | | queryParams: { |
| | | orderNo:'', |
| | | pageNum: 1, |
| | |
| | | handleQuery(){ |
| | | |
| | | }, |
| | | submitFormForBoxCode(){ |
| | | if (this.changeFrom.newBoxCode === '' || this.changeFrom.newBoxCode === null){ |
| | | this.$message.info("新箱体码不能为空") |
| | | } else { |
| | | changeBoxCode({sfcCode:this.changeFrom.sfcCode,newBoxCode:this.changeFrom.newBoxCode}).then(res => { |
| | | console.log('res',res) |
| | | if (res.code===200){ |
| | | this.$message({ |
| | | message:'操作成功', |
| | | type:'success' |
| | | }) |
| | | this.changeBoxFlag = false |
| | | this.getListData() |
| | | this.$refs.inputdata.focus() |
| | | }else { |
| | | this.$message({ |
| | | message:res.msg, |
| | | type:'warning' |
| | | }) |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | handleClick(row){ |
| | | console.log('row',row) |
| | | this.changeBoxFlag = true |
| | | this.changeFrom.sfcCode = row.engineNo |
| | | this.changeFrom.boxCode = row.boxCode |
| | | this.changeFrom.newBoxCode = '' |
| | | this.$nextTick(()=>{ |
| | | this.$refs.changeBoxInput.focus() |
| | | }) |
| | | }, |
| | | cancel(){ |
| | | this.changeBoxFlag = false |
| | | this.$refs.inputdata.focus() |
| | | }, |
| | | handleChangeBoxInput(event){ |
| | | const input = event.target |
| | | const inputValue = input.value |
| | | this.changeFrom.newBoxCode = inputValue |
| | | |
| | | }, |
| | | refresh() { |
| | | location.reload(); |
| | | this.$emit("reserveChild",null) |
| | | }, |
| | | setFocus(){ |
| | | this.$nextTick(()=>{ |
| | |
| | | this.scannerFlag = true |
| | | //扫描完成 |
| | | engineNoIsInModel({engineNo:this.queryParams.productionNotice, |
| | | model:this.singleSelect.typeZ,orderNo:this.singleSelect.workOrderNo |
| | | model:this.singleSelect.typeZ,orderNo:this.singleSelect.workOrderNo,repairFlag:this.repairFlag |
| | | }).then(res => { |
| | | if (res.data===500){ |
| | | this.$message({ |
| | |
| | | message:'操作成功', |
| | | type:'success' |
| | | }) |
| | | this.repairFlag = false |
| | | this.getListData() |
| | | } |
| | | }) |
| | |
| | | this.getListData() |
| | | this.setFocus() |
| | | this.$refs.inputdata.addEventListener('keydown',this.handleScannerInput) |
| | | this.$refs.changeBoxInput.addEventListener('keydown',this.handleChangeBoxInput) |
| | | }, |
| | | beforeDestroy() { |
| | | this.$refs.inputdata.removeEventListener('keydown',this.handleScannerInput) |
| | | this.$refs.changeBoxInput.removeEventListener('keydown',this.handleChangeBoxInput) |
| | | } |
| | | } |
| | | </script> |