| | |
| | | import { createMps, getMps, updateMps } from '#/api/mes/pro/mps'; |
| | | import { $t } from '#/locales'; |
| | | |
| | | import PredictDelivery from '../../workorder/modules/ai/predict-delivery.vue'; |
| | | import PredictDuration from '../../workorder/modules/ai/predict-duration.vue'; |
| | | import PredictMaterial from '../../workorder/modules/ai/predict-material.vue'; |
| | | import PredictRisk from '../../workorder/modules/ai/predict-risk.vue'; |
| | | import { MpsStatusEnum, useFormSchema } from '../data'; |
| | | |
| | | const emit = defineEmits(['success']); |
| | |
| | | const formType = ref<FormType>('detail'); |
| | | |
| | | const isEditable = computed(() => ['create', 'edit'].includes(formType.value)); |
| | | |
| | | const canUseAi = computed(() => !!formData.value?.id); |
| | | |
| | | const getTitle = computed(() => { |
| | | switch (formType.value) { |
| | |
| | | </Descriptions.Item> |
| | | </Descriptions> |
| | | </div> |
| | | <template #prepend-footer> |
| | | <div v-if="canUseAi" class="flex items-center gap-2"> |
| | | <PredictMaterial :mps-id="formData!.id" :work-order-id="formData!.workOrderId" /> |
| | | <PredictDuration :mps-id="formData!.id" :work-order-id="formData!.workOrderId" /> |
| | | <PredictRisk :mps-id="formData!.id" :work-order-id="formData!.workOrderId" /> |
| | | <PredictDelivery :mps-id="formData!.id" :work-order-id="formData!.workOrderId" /> |
| | | </div> |
| | | </template> |
| | | </Modal> |
| | | </template> |