| | |
| | | import { computed, ref } from "vue"; |
| | | |
| | | import { useVbenModal } from "@vben/common-ui"; |
| | | import { BarcodeBizTypeEnum } from "@vben/constants"; |
| | | // import { BarcodeBizTypeEnum } from "@vben/constants"; |
| | | |
| | | import { Button, message } from "ant-design-vue"; |
| | | |
| | |
| | | updateWorkshop, |
| | | } from "#/api/mes/md/workstation/workshop"; |
| | | import { $t } from "#/locales"; |
| | | import { BarcodeDetail } from "#/views/wls/barcode/components"; |
| | | // import { BarcodeDetail } from "#/views/wls/barcode/components"; |
| | | |
| | | import { useFormSchema } from "../data"; |
| | | |
| | | const emit = defineEmits(["success"]); |
| | | const formType = ref<FormType>("create"); // 表单模式 |
| | | const formData = ref<MesMdWorkshopApi.Workshop>(); |
| | | const barcodeDetailRef = ref<InstanceType<typeof BarcodeDetail>>(); // 条码详情弹窗 |
| | | // const barcodeDetailRef = ref<InstanceType<typeof BarcodeDetail>>(); // 条码详情弹窗 |
| | | |
| | | const isDetail = computed(() => formType.value === "detail"); // 是否查看模式 |
| | | const getTitle = computed(() => { |
| | |
| | | }); |
| | | |
| | | /** 查看车间条码 */ |
| | | function handleBarcode() { |
| | | if (!formData.value?.id) { |
| | | return; |
| | | } |
| | | barcodeDetailRef.value?.openByBusiness( |
| | | formData.value.id, |
| | | BarcodeBizTypeEnum.WORKSHOP, |
| | | formData.value.code, |
| | | formData.value.name |
| | | ); |
| | | } |
| | | // function handleBarcode() { |
| | | // if (!formData.value?.id) { |
| | | // return; |
| | | // } |
| | | // barcodeDetailRef.value?.openByBusiness( |
| | | // formData.value.id, |
| | | // BarcodeBizTypeEnum.WORKSHOP, |
| | | // formData.value.code, |
| | | // formData.value.name |
| | | // ); |
| | | // } |
| | | |
| | | const [Modal, modalApi] = useVbenModal({ |
| | | async onConfirm() { |
| | |
| | | <template v-if="isDetail && formData?.id" |
| | | #prepend-footer> |
| | | <div class="flex flex-auto items-center"> |
| | | <Button @click="handleBarcode">查看条码</Button> |
| | | <!-- <Button @click="handleBarcode">查看条码</Button> --> |
| | | </div> |
| | | </template> |
| | | </Modal> |
| | | <BarcodeDetail ref="barcodeDetailRef" /> |
| | | <!-- <BarcodeDetail ref="barcodeDetailRef" /> --> |
| | | </template> |