| | |
| | | import { computed, ref } from "vue"; |
| | | |
| | | import { useVbenModal } from "@vben/common-ui"; |
| | | import { BarcodeBizTypeEnum } from "@vben/constants"; |
| | | // import { BarcodeBizTypeEnum } from "@vben/constants"; |
| | | |
| | | import { Button, message, Tabs } from "ant-design-vue"; |
| | | |
| | |
| | | updateWorkstation, |
| | | } from "#/api/mes/md/workstation"; |
| | | import { $t } from "#/locales"; |
| | | import { BarcodeDetail } from "#/views/wls/barcode/components"; |
| | | // import { BarcodeDetail } from "#/views/wls/barcode/components"; |
| | | |
| | | import { useFormSchema } from "../data"; |
| | | import MachineList from "./machine-list.vue"; |
| | |
| | | const formType = ref<FormType>("create"); // 表单模式 |
| | | const subTabsName = ref("machine"); // 当前资源页签 |
| | | const formData = ref<MesMdWorkstationApi.Workstation>(); |
| | | 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.WORKSTATION, |
| | | formData.value.code, |
| | | formData.value.name |
| | | ); |
| | | } |
| | | // function handleBarcode() { |
| | | // if (!formData.value?.id) { |
| | | // return; |
| | | // } |
| | | // barcodeDetailRef.value?.openByBusiness( |
| | | // formData.value.id, |
| | | // BarcodeBizTypeEnum.WORKSTATION, |
| | | // formData.value.code, |
| | | // formData.value.name |
| | | // ); |
| | | // } |
| | | |
| | | const [Modal, modalApi] = useVbenModal({ |
| | | async onConfirm() { |
| | |
| | | </Tabs> |
| | | <template #prepend-footer> |
| | | <div class="flex flex-auto items-center"> |
| | | <Button v-if="isDetail && formData?.id" |
| | | <!-- <Button v-if="isDetail && formData?.id" |
| | | type="primary" |
| | | @click="handleBarcode"> |
| | | 查看条码 |
| | | </Button> |
| | | </Button> --> |
| | | </div> |
| | | </template> |
| | | <BarcodeDetail ref="barcodeDetailRef" /> |
| | | <!-- <BarcodeDetail ref="barcodeDetailRef" /> --> |
| | | </Modal> |
| | | </template> |