| | |
| | | |
| | | import { confirm, useVbenModal } from "@vben/common-ui"; |
| | | import { |
| | | BarcodeBizTypeEnum, |
| | | MesProWorkOrderStatusEnum, |
| | | } from "@vben/constants"; |
| | | |
| | |
| | | } from "#/api/mes/pro/workorder"; |
| | | import { batchSaveWorkOrderProcess, getWorkOrderProcessListByWorkOrderId } from "#/api/mes/pro/workorder/process"; |
| | | import { $t } from "#/locales"; |
| | | import { BarcodeDetail } from "#/views/wls/barcode/components"; |
| | | // import { BarcodeDetail } from "#/views/wls/barcode/components"; |
| | | |
| | | import { useFormSchema } from "../data"; |
| | | import PredictDelivery from "./ai/predict-delivery.vue"; |
| | |
| | | const formData = ref<MesProWorkOrderApi.WorkOrder>(); |
| | | const originalSnapshot = ref(""); |
| | | const subTabsName = ref("process"); |
| | | const barcodeDetailRef = ref<InstanceType<typeof BarcodeDetail>>(); |
| | | // const barcodeDetailRef = ref<InstanceType<typeof BarcodeDetail>>(); |
| | | const processListRef = ref<InstanceType<typeof ProcessList>>(); |
| | | const currentProductId = ref<number>(); // 当前选中的产品 ID(用于工序加载) |
| | | const tempProcessList = ref<MesProWorkOrderProcessApi.WorkOrderProcess[]>([]); // 临时工序列表 |
| | |
| | | } |
| | | |
| | | /** 查看订单条码 */ |
| | | function handleBarcode() { |
| | | if (!formData.value?.id) { |
| | | return; |
| | | } |
| | | barcodeDetailRef.value?.openByBusiness( |
| | | formData.value.id, |
| | | BarcodeBizTypeEnum.WORKORDER, |
| | | formData.value.code, |
| | | formData.value.name |
| | | ); |
| | | } |
| | | // function handleBarcode() { |
| | | // if (!formData.value?.id) { |
| | | // return; |
| | | // } |
| | | // barcodeDetailRef.value?.openByBusiness( |
| | | // formData.value.id, |
| | | // BarcodeBizTypeEnum.WORKORDER, |
| | | // formData.value.code, |
| | | // formData.value.name |
| | | // ); |
| | | // } |
| | | |
| | | /** 工序列表变化回调 */ |
| | | function handleProcessListChange(list: MesProWorkOrderProcessApi.WorkOrderProcess[]) { |
| | |
| | | @click="handleSave"> |
| | | 保存修改 |
| | | </Button> |
| | | <Button v-if="formType === 'detail' && formData?.id" |
| | | <!-- <Button v-if="formType === 'detail' && formData?.id" |
| | | @click="handleBarcode"> |
| | | 查看条码 |
| | | </Button> |
| | | </Button> --> |
| | | <Button @click="modalApi.close()">取消</Button> |
| | | </div> |
| | | </template> |
| | | </Modal> |
| | | <BarcodeDetail ref="barcodeDetailRef" /> |
| | | <!-- <BarcodeDetail ref="barcodeDetailRef" /> --> |
| | | </template> |