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

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

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

Loading…
Cancel
Save