Merge remote-tracking branch 'origin/main'

main
liutao 6 days ago
commit f88765448b

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

@ -4806,6 +4806,8 @@ export default {
warningCompleteDeviceDate: '请完善设备和开始日期', warningCompleteDeviceDate: '请完善设备和开始日期',
warningValidTime: '请选择有效的时间', warningValidTime: '请选择有效的时间',
columnTaskName: '任务名称', columnTaskName: '任务名称',
columnDeviceName: '设备名称',
columnPlanInfo: '计划信息',
columnStartTime: '开始时间', columnStartTime: '开始时间',
columnDays: '天数', columnDays: '天数',
scaleMonthFormat: 'YYYY年M月', 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')" /> class="!w-full" :placeholder="t('EquipmentManagement.EquipmentLedger.placeholderRatedCapacity')" />
</el-form-item> </el-form-item>
</el-col> </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> </el-row>
@ -510,9 +499,7 @@ const initFormData = () => ({
fileUrl: undefined, fileUrl: undefined,
qrcodeUrl: undefined, qrcodeUrl: undefined,
sort: undefined, sort: undefined,
dvId: undefined, dvId: undefined
dailyAverageValue: undefined,
dataCollectionCapacity: undefined
}) })
const formData = ref({ const formData = ref({
@ -547,8 +534,6 @@ const formRules = reactive<FormRules>({
deviceName: [{ required: true, message: t('EquipmentManagement.EquipmentLedger.placeholderDeviceName'), trigger: 'blur' }], deviceName: [{ required: true, message: t('EquipmentManagement.EquipmentLedger.placeholderDeviceName'), trigger: 'blur' }],
deviceType: [{ required: true, message: t('EquipmentManagement.EquipmentLedger.placeholderDeviceType'), trigger: 'change' }], deviceType: [{ required: true, message: t('EquipmentManagement.EquipmentLedger.placeholderDeviceType'), trigger: 'change' }],
ratedCapacity: [{ validator: validateScheduledRequired('额定产能'), trigger: ['blur', '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' }], productionDate: [{ required: true, message: t('EquipmentManagement.EquipmentLedger.placeholderProductionDate'), trigger: 'change' }],
factoryEntryDate: [{ required: true, message: t('EquipmentManagement.EquipmentLedger.placeholderFactoryEntryDate'), trigger: 'change' }] factoryEntryDate: [{ required: true, message: t('EquipmentManagement.EquipmentLedger.placeholderFactoryEntryDate'), trigger: 'change' }]
}) })
@ -557,7 +542,7 @@ const formRef = ref() // 表单 Ref
watch( watch(
() => formData.value.isScheduled, () => 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), componentIds: parseIdsValue((detail as any)?.componentId),
beijianIds: parseIdsValue((detail as any)?.beijianId), beijianIds: parseIdsValue((detail as any)?.beijianId),
qrcodeUrl: (detail as any)?.qrcodeUrl, qrcodeUrl: (detail as any)?.qrcodeUrl,
dailyAverageValue: normalizeNumberish((detail as any)?.dailyAverageValue),
dataCollectionCapacity: normalizeNumberish((detail as any)?.dataCollectionCapacity),
} }
} finally { } finally {
formLoading.value = false formLoading.value = false
@ -934,9 +917,7 @@ const submitForm = async () => {
deviceManager: formData.value.deviceManagerIds?.length ? formData.value.deviceManagerIds.join(',') : undefined, deviceManager: formData.value.deviceManagerIds?.length ? formData.value.deviceManagerIds.join(',') : undefined,
componentId: formData.value.componentIds?.length ? formData.value.componentIds.join(',') : undefined, componentId: formData.value.componentIds?.length ? formData.value.componentIds.join(',') : undefined,
beijianId: formData.value.beijianIds?.length ? formData.value.beijianIds.join(',') : undefined, beijianId: formData.value.beijianIds?.length ? formData.value.beijianIds.join(',') : undefined,
fileUrl: normalizeFileUrlAsJsonArrayString((formData.value as any).fileUrl), fileUrl: normalizeFileUrlAsJsonArrayString((formData.value as any).fileUrl)
dailyAverageValue: normalizeNumberish((formData.value as any).dailyAverageValue),
dataCollectionCapacity: normalizeNumberish((formData.value as any).dataCollectionCapacity)
} as unknown as DeviceLedgerVO } as unknown as DeviceLedgerVO
delete (data as any).deviceManagerIds delete (data as any).deviceManagerIds
delete (data as any).componentIds delete (data as any).componentIds

@ -26,7 +26,7 @@
:start-placeholder="t('ProductionPlan.Task.searchOrderStartPlaceholder')" :start-placeholder="t('ProductionPlan.Task.searchOrderStartPlaceholder')"
:end-placeholder="t('ProductionPlan.Task.searchOrderEndPlaceholder')" :end-placeholder="t('ProductionPlan.Task.searchOrderEndPlaceholder')"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" :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>
<el-form-item :label="t('ProductionPlan.Task.searchDeliveryLabel')" prop="deliveryDate"> <el-form-item :label="t('ProductionPlan.Task.searchDeliveryLabel')" prop="deliveryDate">
@ -38,7 +38,7 @@
:start-placeholder="t('ProductionPlan.Task.searchDeliveryStartPlaceholder')" :start-placeholder="t('ProductionPlan.Task.searchDeliveryStartPlaceholder')"
:end-placeholder="t('ProductionPlan.Task.searchDeliveryEndPlaceholder')" :end-placeholder="t('ProductionPlan.Task.searchDeliveryEndPlaceholder')"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" :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>
@ -60,7 +60,7 @@
:start-placeholder="t('ProductionPlan.Task.searchCreateTimeStartPlaceholder')" :start-placeholder="t('ProductionPlan.Task.searchCreateTimeStartPlaceholder')"
:end-placeholder="t('ProductionPlan.Task.searchCreateTimeEndPlaceholder')" :end-placeholder="t('ProductionPlan.Task.searchCreateTimeEndPlaceholder')"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" :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>
<el-form-item> <el-form-item>
@ -326,3 +326,13 @@ const changeStatus = async (type:string, status: number, id: number) => {
let activeListName = 'taskDetail' let activeListName = 'taskDetail'
</script> </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> </template>
<script setup lang="ts"> <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 { TaskApi } from '@/api/mes/task'
import { ProductApi } from '@/api/erp/product/product' import { ProductApi } from '@/api/erp/product/product'
import { DeviceLedgerApi } from '@/api/mes/deviceledger' import { DeviceLedgerApi } from '@/api/mes/deviceledger'
@ -228,8 +229,10 @@ import TaskSchedulePreviewDialog from './TaskSchedulePreviewDialog.vue'
defineOptions({ name: 'TaskScheduleDialog' }) defineOptions({ name: 'TaskScheduleDialog' })
const message = useMessage() const message = useMessage()
const { t } = useI18n() // const { t } = useI18n()
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
const dictStore = useDictStoreWithOut()
const dictReady = ref(false)
const dialogVisible = ref(false) const dialogVisible = ref(false)
const taskLoading = ref(false) const taskLoading = ref(false)
@ -270,11 +273,10 @@ const scheduleRuleOptions = computed(() => [
{ label: t('ProductionPlan.TaskSummary.scheduleRuleCategory'), value: 3 }, { label: t('ProductionPlan.TaskSummary.scheduleRuleCategory'), value: 3 },
{ label: t('ProductionPlan.TaskSummary.scheduleRuleDelivery'), value: 4 } { label: t('ProductionPlan.TaskSummary.scheduleRuleDelivery'), value: 4 }
]) ])
const capacityTypeOptions = computed(() => [ const capacityTypeOptions = computed(() => {
{ label: t('ProductionPlan.TaskSummary.capacityTypeRated'), value: 1 }, if (!dictReady.value) return []
{ label: t('ProductionPlan.TaskSummary.capacityTypeDailyAvg'), value: 2 }, return getIntDictOptions('capacity_sources')
{ label: t('ProductionPlan.TaskSummary.capacityTypeDataCollection'), value: 3 } })
])
const searchForm = reactive({ const searchForm = reactive({
inventoryTaskSchedule: false, inventoryTaskSchedule: false,
@ -774,6 +776,8 @@ const handleSubmit = async () => {
} }
const open = async () => { const open = async () => {
await dictStore.setDictMap()
dictReady.value = true
dialogVisible.value = true dialogVisible.value = true
await loadTaskList() await loadTaskList()
} }

Loading…
Cancel
Save