| | |
| | | <el-table-column fixed="right" label="操作" width="100" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" @click="openForm('edit', scope.row, 'manual');">编辑</el-button> |
| | | <el-button link type="success" size="small" @click="showQRCode(scope.row,2)">生成条形码</el-button> |
| | | <el-button link type="success" size="small" @click="showERCode(scope.row,2)">生成二维码</el-button> |
| | | <!-- <el-button link type="success" size="small" @click="showQRCode(scope.row,2)">生成条形码</el-button> |
| | | <el-button link type="success" size="small" @click="showERCode(scope.row,2)">生成二维码</el-button> --> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | const scanBarcodeInput = ref(''); |
| | | const barcodeDetail = ref({}) |
| | | // 扫码函数 |
| | | const scanBarcode = (e) => { |
| | | function scanBarcode (e){ |
| | | if(!e||!e.target||!e.target.tagName){ |
| | | return; |
| | | } |
| | |
| | | |
| | | onMounted(() => { |
| | | // 添加扫码枪监听事件 |
| | | document.removeEventListener('keypress',scanBarcode) |
| | | document.addEventListener('keypress', scanBarcode) |
| | | getList() |
| | | }) |