| | |
| | | <el-card> |
| | | <div slot="header"> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-col :span="6"> |
| | | <span>装箱明细</span> |
| | | </el-col> |
| | | <el-col :span="8" :offset="4"> |
| | |
| | | > |
| | | 布局 |
| | | </el-button> --> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-button |
| | | v-if="!isCheck && permissions.quality_packaging_ledger_info_add" |
| | | style="float: right; padding: 3px 6px;color:#fff;background-color: #9f7b95;" |
| | | type="text" |
| | | @click="handleCheck" |
| | | >核对 |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-button |
| | |
| | | <el-button type="primary" @click="printFun">打 印</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <input type="password" id="ScanCodeInfo" v-model="codeInfo" @keyup.enter="keyup" style="opacity: 0;height: 0px;margin: 0px;padding: 0px;position: absolute;top: 0;"></input> |
| | | <el-dialog title="核对列表" top="5vh" :visible.sync="checkShow" width="800px"> |
| | | <el-table |
| | | :data="testStandardParams" |
| | | id="testStandardParamTable" |
| | | ref="testStandardParam" |
| | | |
| | | highlight-current-row |
| | | height="700" |
| | | style="width: 100%" |
| | | class="l-mes-table" |
| | | border |
| | | stripe |
| | | > |
| | | <el-table-column |
| | | type ="index" |
| | | label="序号" |
| | | align="center" |
| | | width="50" |
| | | /> |
| | | <el-table-column |
| | | label="产品编号" |
| | | prop="productNo" |
| | | show-overflow-tooltip |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="产品名称" |
| | | prop="product" |
| | | show-overflow-tooltip |
| | | align="center" |
| | | /> |
| | | <el-table-column |
| | | label="批次号" |
| | | prop="outBatchNo" |
| | | show-overflow-tooltip |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="核对" |
| | | prop="isCheck" |
| | | align="center" |
| | | show-overflow-tooltip |
| | | width="80" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <i class="el-icon-check" v-if="scope.row.isCheck"></i> |
| | | <i v-else></i> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { pagedata,dropById,list,saveList,deledata,sAuditstatus} from '@/api/quality/Packaging_ledger' |
| | | import { pagedata,dropById,list,saveList,deledata,sAuditstatus,qualityPackageBoxDetail,qualityPackageBox} from '@/api/quality/Packaging_ledger' |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import packfrom from './pack-from.vue' |
| | | import packfromadd from './pack-fromadd.vue' |
| | |
| | | str:"https://ztms-mes.chinaztt.cn/#/pack?id=", |
| | | qrData:[], |
| | | diaPrintTab: false, |
| | | checkShow:false, |
| | | multipleSelection: [], |
| | | isCheck: false, |
| | | dataway:{}, |
| | |
| | | minWidth: 120 |
| | | } |
| | | }, |
| | | codeInfo:null, |
| | | startTime: null, |
| | | } |
| | | }, |
| | | components: { |
| | |
| | | text: '标签打印', |
| | | type: 'primary', |
| | | fun: this.printLabel |
| | | }) |
| | | this.table.toolbar.push({ |
| | | text: '下载装箱清单', |
| | | type: 'primary', |
| | | fun: this.downOrder |
| | | }) |
| | | } |
| | | let arr = [] |
| | |
| | | if(!newVal){ |
| | | this.qrData = [] |
| | | } |
| | | }, |
| | | checkShow(newVal){ |
| | | if(newVal){ |
| | | // this.$message.success('扫码:打开') |
| | | let input = document.getElementById('ScanCodeInfo'); |
| | | input.focus(); |
| | | this.startTime = setInterval(()=>{ |
| | | input.focus() |
| | | },1000) |
| | | }else{ |
| | | this.$message.warning('扫码:关闭') |
| | | clearInterval(this.startTime) |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | style: `@page { |
| | | margin:0; |
| | | padding: 0; |
| | | size: 323px 210px; |
| | | size: 323px 210px landscape; |
| | | } |
| | | html{ |
| | | zoom:100%; |
| | |
| | | this.$message.warning('请选择一条数据') |
| | | return |
| | | } |
| | | console.log(this.multipleSelection) |
| | | this.diaPrintTab = true |
| | | this.multipleSelection.forEach(item=>{ |
| | | const obj = { |
| | |
| | | console.error(error); |
| | | }) |
| | | }, |
| | | // 核对 |
| | | handleCheck(){ |
| | | if(this.testStandardParams.length>0){ |
| | | this.checkShow = true; |
| | | }else{ |
| | | this.$message.warning('暂无核对明细') |
| | | } |
| | | }, |
| | | keyup(e){ |
| | | var code = '' |
| | | var str = {} |
| | | var that = this; |
| | | try{ |
| | | code = JSON.parse(this.codeInfo) |
| | | if(code.moNo2==null||code.moNo2==undefined||code.moNo2==''){ |
| | | this.$message.error('该二维码有误') |
| | | }else{ |
| | | str = { |
| | | moNo2: code.moNo2, |
| | | } |
| | | qualityPackageBoxDetail({ |
| | | outBatchNo:str.moNo2, |
| | | packageBoxId:that.packageBoxId.packageBoxId |
| | | }).then(res=>{ |
| | | if(res.data.data){ |
| | | that.rightquery() |
| | | }else{ |
| | | that.$message.error('该批次号不在装箱清单内') |
| | | } |
| | | }) |
| | | } |
| | | }catch(e){ |
| | | this.$message.error('该二维码有误') |
| | | } |
| | | this.codeInfo = null |
| | | }, |
| | | //删除 |
| | | deleteadd(row){ |
| | | deledata({id:row.id}).then((res)=>{ |
| | |
| | | this.$message.success('检验成功') |
| | | }) |
| | | }, |
| | | downOrder(){ |
| | | if(this.multipleSelection.length==0){ |
| | | this.$message.warning('请选择一条数据') |
| | | return |
| | | }else{ |
| | | qualityPackageBox({id:this.multipleSelection[this.multipleSelection.length-1].id}).then(response=>{ |
| | | console.log(response) |
| | | // 处理返回的文件流 |
| | | const blob = response.data |
| | | const link = document.createElement('a') |
| | | link.href = URL.createObjectURL(blob) |
| | | const disposition = response.headers['content-disposition'] |
| | | let temp = disposition.substring(disposition.lastIndexOf('=') + 1) |
| | | link.download = decodeURI(temp) |
| | | document.body.appendChild(link) |
| | | link.click() |
| | | window.setTimeout(function () { |
| | | URL.revokeObjectURL(blob) |
| | | document.body.removeChild(link) |
| | | }, 0) |
| | | }).catch((error) => { |
| | | console.error(error) |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | |
| | | color: black; |
| | | font-size: 12pt; |
| | | font-family: 宋体; |
| | | } |
| | | .avue-main .el-card__body { |
| | | padding: 4px 0px 5px; |
| | | } |
| | | </style> |