@ -216,7 +216,8 @@
< / template >
< script setup lang = "ts" >
import { DICT _TYPE } from '@/utils/dict'
import { DICT _TYPE , getIntDictOptions } from '@/utils/dict'
import { useDictStoreWithOut } from '@/store/modules/dict'
import { TaskApi } from '@/api/mes/task'
import { ProductApi } from '@/api/erp/product/product'
import { DeviceLedgerApi } from '@/api/mes/deviceledger'
@ -228,8 +229,10 @@ import TaskSchedulePreviewDialog from './TaskSchedulePreviewDialog.vue'
defineOptions ( { name : 'TaskScheduleDialog' } )
const message = useMessage ( )
const { t } = useI18n ( ) / / 国 际 化
const { t } = useI18n ( )
const emit = defineEmits ( [ 'success' ] )
const dictStore = useDictStoreWithOut ( )
const dictReady = ref ( false )
const dialogVisible = ref ( false )
const taskLoading = ref ( false )
@ -270,11 +273,10 @@ const scheduleRuleOptions = computed(() => [
{ label : t ( 'ProductionPlan.TaskSummary.scheduleRuleCategory' ) , value : 3 } ,
{ label : t ( 'ProductionPlan.TaskSummary.scheduleRuleDelivery' ) , value : 4 }
] )
const capacityTypeOptions = computed ( ( ) => [
{ label : t ( 'ProductionPlan.TaskSummary.capacityTypeRated' ) , value : 1 } ,
{ label : t ( 'ProductionPlan.TaskSummary.capacityTypeDailyAvg' ) , value : 2 } ,
{ label : t ( 'ProductionPlan.TaskSummary.capacityTypeDataCollection' ) , value : 3 }
] )
const capacityTypeOptions = computed ( ( ) => {
if ( ! dictReady . value ) return [ ]
return getIntDictOptions ( 'capacity_sources' )
} )
const searchForm = reactive ( {
inventoryTaskSchedule : false ,
@ -774,6 +776,8 @@ const handleSubmit = async () => {
}
const open = async ( ) => {
await dictStore . setDictMap ( )
dictReady . value = true
dialogVisible . value = true
await loadTaskList ( )
}