Merge remote-tracking branch 'origin/main'

main
liutao 3 hours ago
commit f88765448b

@ -4595,6 +4595,8 @@ export default {
warningCompleteDeviceDate: 'Please complete device and start date',
warningValidTime: 'Please select a valid time',
columnTaskName: 'Task Name',
columnDeviceName: 'Device Name',
columnPlanInfo: 'Plan Info',
columnStartTime: 'Start Time',
columnDays: 'Days',
scaleMonthFormat: 'MMM YYYY',

@ -4806,6 +4806,8 @@ export default {
warningCompleteDeviceDate: '请完善设备和开始日期',
warningValidTime: '请选择有效的时间',
columnTaskName: '任务名称',
columnDeviceName: '设备名称',
columnPlanInfo: '计划信息',
columnStartTime: '开始时间',
columnDays: '天数',
scaleMonthFormat: 'YYYY年M月',

File diff suppressed because it is too large Load Diff

@ -63,18 +63,7 @@
class="!w-full" :placeholder="t('EquipmentManagement.EquipmentLedger.placeholderRatedCapacity')" />
</el-form-item>
</el-col>
<el-col v-if="isScheduledEnabled" :span="12">
<el-form-item label="每日报工平均值" prop="dailyAverageValue" :required="isScheduledEnabled">
<el-input-number v-model="formData.dailyAverageValue" :min="0" :precision="0" controls-position="right"
class="!w-full" placeholder="请输入每日报工平均值" />
</el-form-item>
</el-col>
<el-col v-if="isScheduledEnabled" :span="12">
<el-form-item label="数据采集产能" prop="dataCollectionCapacity" :required="isScheduledEnabled">
<el-input-number v-model="formData.dataCollectionCapacity" :min="0" :precision="0"
controls-position="right" class="!w-full" placeholder="请输入数据采集产能" />
</el-form-item>
</el-col>
</el-row>
@ -510,9 +499,7 @@ const initFormData = () => ({
fileUrl: undefined,
qrcodeUrl: undefined,
sort: undefined,
dvId: undefined,
dailyAverageValue: undefined,
dataCollectionCapacity: undefined
dvId: undefined
})
const formData = ref({
@ -547,8 +534,6 @@ const formRules = reactive<FormRules>({
deviceName: [{ required: true, message: t('EquipmentManagement.EquipmentLedger.placeholderDeviceName'), trigger: 'blur' }],
deviceType: [{ required: true, message: t('EquipmentManagement.EquipmentLedger.placeholderDeviceType'), trigger: 'change' }],
ratedCapacity: [{ validator: validateScheduledRequired('额定产能'), trigger: ['blur', 'change'] }],
dailyAverageValue: [{ validator: validateScheduledRequired('每日报工平均值'), trigger: ['blur', 'change'] }],
dataCollectionCapacity: [{ validator: validateScheduledRequired('数据采集产能'), trigger: ['blur', 'change'] }],
productionDate: [{ required: true, message: t('EquipmentManagement.EquipmentLedger.placeholderProductionDate'), trigger: 'change' }],
factoryEntryDate: [{ required: true, message: t('EquipmentManagement.EquipmentLedger.placeholderFactoryEntryDate'), trigger: 'change' }]
})
@ -557,7 +542,7 @@ const formRef = ref() // 表单 Ref
watch(
() => formData.value.isScheduled,
() => {
formRef.value?.clearValidate?.(['ratedCapacity', 'dailyAverageValue', 'dataCollectionCapacity'])
formRef.value?.clearValidate?.(['ratedCapacity'])
}
)
@ -705,8 +690,6 @@ const open = async (type: string, id?: number, defaultDeviceTypeId?: number) =>
componentIds: parseIdsValue((detail as any)?.componentId),
beijianIds: parseIdsValue((detail as any)?.beijianId),
qrcodeUrl: (detail as any)?.qrcodeUrl,
dailyAverageValue: normalizeNumberish((detail as any)?.dailyAverageValue),
dataCollectionCapacity: normalizeNumberish((detail as any)?.dataCollectionCapacity),
}
} finally {
formLoading.value = false
@ -934,9 +917,7 @@ const submitForm = async () => {
deviceManager: formData.value.deviceManagerIds?.length ? formData.value.deviceManagerIds.join(',') : undefined,
componentId: formData.value.componentIds?.length ? formData.value.componentIds.join(',') : undefined,
beijianId: formData.value.beijianIds?.length ? formData.value.beijianIds.join(',') : undefined,
fileUrl: normalizeFileUrlAsJsonArrayString((formData.value as any).fileUrl),
dailyAverageValue: normalizeNumberish((formData.value as any).dailyAverageValue),
dataCollectionCapacity: normalizeNumberish((formData.value as any).dataCollectionCapacity)
fileUrl: normalizeFileUrlAsJsonArrayString((formData.value as any).fileUrl)
} as unknown as DeviceLedgerVO
delete (data as any).deviceManagerIds
delete (data as any).componentIds

@ -26,7 +26,7 @@
:start-placeholder="t('ProductionPlan.Task.searchOrderStartPlaceholder')"
:end-placeholder="t('ProductionPlan.Task.searchOrderEndPlaceholder')"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-180px"
class="!w-280px"
/>
</el-form-item>
<el-form-item :label="t('ProductionPlan.Task.searchDeliveryLabel')" prop="deliveryDate">
@ -38,7 +38,7 @@
:start-placeholder="t('ProductionPlan.Task.searchDeliveryStartPlaceholder')"
:end-placeholder="t('ProductionPlan.Task.searchDeliveryEndPlaceholder')"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-180px"
class="!w-280px"
/>
</el-form-item>
@ -60,7 +60,7 @@
:start-placeholder="t('ProductionPlan.Task.searchCreateTimeStartPlaceholder')"
:end-placeholder="t('ProductionPlan.Task.searchCreateTimeEndPlaceholder')"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
class="!w-280px"
/>
</el-form-item>
<el-form-item>
@ -326,3 +326,13 @@ const changeStatus = async (type:string, status: number, id: number) => {
let activeListName = 'taskDetail'
</script>
<style scoped>
.task-search-form {
display: flex;
flex-wrap: wrap;
}
.task-search-form :deep(.el-form-item) {
margin-right: 16px;
}
</style>

@ -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()
}

Loading…
Cancel
Save