| | |
| | | /> |
| | | <pro-dialog ref="dialogRef" @getList=getList></pro-dialog> |
| | | <printcode ref="codeRef" @getList=getList></printcode> |
| | | <printMorecodeDialog ref="codeMoreRef" @getList=getList></printMorecodeDialog> |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | title="打印纸张" |
| | | width="350" |
| | | :before-close="handlePrintClose" |
| | | > |
| | | <div style="display: flex;align-items: center;justify-content: center;height: 60px"> |
| | | <el-button type="primary" @click="openPrint('one')">单张打印</el-button> |
| | | <el-button type="primary" @click="openPrint('more')">28张打印</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import proDialog from "./addProDialog.vue"; |
| | | import printcode from './printCode.vue' |
| | | import printMorecodeDialog from './printCodeMore.vue' |
| | | import {delWarehouse, getCupById, getWarehouse} from "@/api/hazardousChemicals/warehouse"; |
| | | import { |
| | | delProductRecord, |
| | |
| | | const loading = ref(false); |
| | | const dialogRef = ref(); |
| | | const codeRef = ref(); |
| | | const codeMoreRef = ref(); |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | const dialogVisible =ref(false) |
| | | const data = reactive({ |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | } |
| | | }) |
| | | } |
| | | const entryItem = ref() |
| | | const printCode = (val) => { |
| | | console.log("val",val) |
| | | codeRef.value.openDialog('pro',val); |
| | | |
| | | entryItem.value = val |
| | | dialogVisible.value = true |
| | | // codeRef.value.openDialog('pro',val); |
| | | } |
| | | |
| | | const toDetail = (val) => { |
| | | const obj = { |
| | | pageNum: data.queryParams.pageNum, |
| | |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | const handlePrintClose = () => { |
| | | dialogVisible.value = false |
| | | } |
| | | const openPrint = (type) => { |
| | | if(type === 'one'){ |
| | | codeRef.value.openDialog('pro',entryItem.value); |
| | | }else { |
| | | codeMoreRef.value.openDialog('pro',entryItem.value); |
| | | } |
| | | |
| | | } |
| | | |
| | | defineExpose({ |
| | | getList |