style:设备台账-是否排产字段修改

pull/1/head
黄伟杰 1 month ago
parent e21b5e3246
commit c65523c48b

@ -74,9 +74,9 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="t('EquipmentManagement.EquipmentLedger.isSchedueld')" prop="isSchedueld">
<el-form-item :label="t('EquipmentManagement.EquipmentLedger.isSchedueld')" prop="isScheduled">
<el-switch
v-model="formData.isSchedueld"
v-model="formData.isScheduled"
:active-value="1"
:inactive-value="0"
:active-text="t('EquipmentManagement.EquipmentLedger.yes')"
@ -443,7 +443,7 @@ const initFormData = () => ({
deviceBrand: undefined,
deviceModel: undefined,
deviceSpec: undefined,
isSchedueld: 0,
isScheduled: 0,
ratedCapacity: undefined,
deviceType: undefined,
supplier: undefined,
@ -613,7 +613,7 @@ const open = async (type: string, id?: number, defaultDeviceTypeId?: number) =>
...initFormData(),
...(detail as any),
isCode: (detail as any)?.isCode ?? false,
isSchedueld: normalizeNumberish((detail as any)?.isSchedueld ?? (detail as any)?.isScheduled) ?? 0,
isScheduled: normalizeNumberish((detail as any)?.isScheduled ?? (detail as any)?.isSchedueld) ?? 0,
ratedCapacity: normalizeNumberish((detail as any)?.ratedCapacity),
deviceType: normalizeNumberish((detail as any)?.deviceType),
deviceManagerIds: parseIdsValue((detail as any)?.deviceManager),
@ -647,7 +647,7 @@ const submitForm = async () => {
try {
const data = {
...(formData.value as any),
isSchedueld: normalizeNumberish((formData.value as any).isSchedueld) ?? 0,
isScheduled: normalizeNumberish((formData.value as any).isScheduled) ?? 0,
ratedCapacity: normalizeNumberish((formData.value as any).ratedCapacity),
deviceType: normalizeNumberish(formData.value.deviceType),
productionDate: normalizeYmd(formData.value.productionDate),
@ -662,6 +662,7 @@ const submitForm = async () => {
delete (data as any).deviceManagerIds
delete (data as any).componentIds
delete (data as any).beijianIds
delete (data as any).isSchedueld
if (formType.value === 'create') {
await DeviceLedgerApi.createDeviceLedger(data)
message.success(t('common.createSuccess'))

Loading…
Cancel
Save