| | |
| | | style="display: flex; justify-content: center; align-items: center" |
| | | > |
| | | <VueQrcode id="qrcode" :value="taskNum" :size="200"></VueQrcode> |
| | | <VueQrcode id="qrcode1" :value="palletCode" :size="200"></VueQrcode> |
| | | <!-- <VueQrcode id="qrcode1" :value="sourceAddress" :size="200"></VueQrcode> |
| | | <VueQrcode id="qrcode2" :value="materialtype" :size="200"></VueQrcode> --> |
| | | </div> |
| | | </div> |
| | | <div id="taskNum"> |
| | | <span |
| | | style="display: flex; justify-content: center; align-items: center" |
| | | >{{ taskNum }}</span |
| | | >ä»»å¡å·ï¼{{ taskNum }}</span |
| | | > |
| | | </div> |
| | | |
| | | <div id="palletCode"> |
| | | <div id="sourceAddress"> |
| | | <span |
| | | style="display: flex; justify-content: center; align-items: center" |
| | | >{{ palletCode }}</span |
| | | >èµ·ç¹å°åï¼{{ sourceAddress }}</span |
| | | > |
| | | </div> |
| | | <div id="materialtype"> |
| | | <span |
| | | style="display: flex; justify-content: center; align-items: center" |
| | | >ç©æç±»å{{ materialtype }}</span |
| | | > |
| | | </div> |
| | | |
| | |
| | | row: null, |
| | | qrcodeDataURL: "", |
| | | taskNum: "", |
| | | palletCode: "", |
| | | sourceAddress: "", |
| | | materialtype: "", |
| | | }; |
| | | }, |
| | | methods: { |
| | | open(row) { |
| | | this.row = row; |
| | | this.showDetialBox = true; |
| | | if (row && row.taskNum && row.palletCode) { |
| | | if (row && row.taskNum && row.sourceAddress && row.materialtype) { |
| | | this.taskNum = row.taskNum; |
| | | this.palletCode = row.palletCode; |
| | | this.sourceAddress = row.sourceAddress; |
| | | this.materialtype = row.materialtype; |
| | | } |
| | | }, |
| | | print() { |
| | | let printContent = document.getElementById("printContent"); |
| | | let taskNum = document.getElementById("taskNum"); |
| | | let palletCode = document.getElementById("palletCode"); |
| | | let sourceAddress = document.getElementById("sourceAddress"); |
| | | let materialtype = document.getElementById("materialtype"); |
| | | var printWindow = window.open("", ""); |
| | | printWindow.document.write(printContent.innerHTML); |
| | | printWindow.document.write(taskNum.innerHTML); |
| | | printWindow.document.write(palletCode.innerHTML); |
| | | printWindow.document.write(sourceAddress.innerHTML); |
| | | printWindow.document.write(materialtype.innerHTML); |
| | | printWindow.document.close(); |
| | | printWindow.focus(); |
| | | printWindow.print(); |
| | | printWindow.close(); |
| | | console.log(this.taskNum, this.palletCode); |
| | | console.log(this.taskNum, this.sourceAddress); |
| | | this.http |
| | | .post( |
| | | // "api/Task/PrintStatusUp?printCode=" + this.palletCode, |
| | | `api/Task/PrintStatusUp?tasknum=${this.taskNum}&printCode=${this.palletCode}`, |
| | | `api/Task/PrintStatusUp?tasknum=${this.taskNum}&sourceAddress=${this.sourceAddress}&materialtype=${this.materialtype}`, |
| | | null, |
| | | "æ°æ®å¤çä¸" |
| | | ) |