zhouwx
昨天 1ea0d85b0fe2e7e4427fd484a9342d964c831b3d
src/views/hazardousChemicals/warehouseManage/components/rawTable.vue
@@ -116,6 +116,18 @@
    <raw-dialog ref="dialogRef" @getList=getList></raw-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>
@@ -124,6 +136,7 @@
import {ElMessage, ElMessageBox} from "element-plus";
import rawDialog from "./addRawDialog.vue";
import printcode from './printCode.vue'
import printMorecodeDialog from './printCodeMore.vue'
import {delRawRecord, doEntryRaw, getRawRecord, getRawWarehouseRecord} from "@/api/hazardousChemicals/rawRecord";
import {useRoute, useRouter} from "vue-router";
import {getCupById, getWarehouse} from "@/api/hazardousChemicals/warehouse";
@@ -131,8 +144,10 @@
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,
@@ -230,9 +245,21 @@
      })
}
const entryItem = ref()
const printCode = (val) => {
  console.log("val",val)
  codeRef.value.openDialog('raw',val);
  entryItem.value = val
  dialogVisible.value = true
  // codeRef.value.openDialog('raw',val);
}
const openPrint = (type) => {
  if(type === 'one'){
    codeRef.value.openDialog('raw',entryItem.value);
  }else {
    codeMoreRef.value.openDialog('raw',entryItem.value);
  }
}
const toDetail = (val) => {
@@ -281,6 +308,9 @@
    ElMessage.warning(res.message)
  }
}
const handlePrintClose = () => {
  dialogVisible.value = false
}
defineExpose({
  getList