feat:设备台账-去除型号、生产日期字段,新增SN、品牌、出厂日期字段

main
黄伟杰 2 weeks ago
parent d448a29dac
commit 7a435e1d2f

@ -10,6 +10,7 @@ export interface DeviceLedgerVO {
deviceName: string // 设备名称
deviceStatus: number // 设备状态 (0-正常, 1-停用, 2-维修, 3-报废)
deviceBrand: string // 设备品牌
sn?: string // 序列号
deviceModel: string // 设备型号
deviceSpec: string // 设备规格
deviceType: string | number // 设备类型
@ -22,6 +23,7 @@ export interface DeviceLedgerVO {
useDept?: string // 使用部门
deviceManager: string // 设备负责人
productionDate: string | number | Date // 设备生产日期
outgoingTime?: string | number | Date // 出厂日期
factoryEntryDate: string | number | Date // 设备入厂日期
deviceRemark: string // 设备备注
remark: string // 备注

@ -1283,6 +1283,7 @@ export default {
yes: 'Yes',
no: 'No',
productionDate: 'Production Date',
outgoingTime: 'Outgoing Date',
factoryEntryDate: 'Factory Entry Date',
deviceLocation: 'Location',
deviceManagerName: 'Manager',
@ -1301,8 +1302,11 @@ export default {
placeholderDeviceType: 'Please select type',
placeholderDeviceModel: 'Please input model',
placeholderDeviceSpec: 'Please input spec',
placeholderDeviceBrand: 'Please input device brand',
placeholderSn: 'Please input serial number',
placeholderRatedCapacity: 'Please input rated capacity',
placeholderProductionDate: 'Please select production date',
placeholderOutgoingTime: 'Please select outgoing date',
placeholderFactoryEntryDate: 'Please select factory entry date',
placeholderDeviceLocation: 'Please input location',
placeholderDeviceManagerIds: 'Please select manager',
@ -1311,6 +1315,7 @@ export default {
placeholderBeijianIds: 'Please select spare part',
deviceNo: 'Device No',
deviceBrand: 'Device Brand',
sn: 'Serial Number',
supplier: 'Supplier',
workshop: 'Workshop',
systemOrg: 'System Org',

@ -1273,6 +1273,7 @@ export default {
yes: '是',
no: '否',
productionDate: '生产日期',
outgoingTime: '出厂日期',
factoryEntryDate: '入厂日期',
deviceLocation: '位置',
deviceManagerName: '责任人',
@ -1291,8 +1292,11 @@ export default {
placeholderDeviceType: '请选择类型',
placeholderDeviceModel: '请输入型号',
placeholderDeviceSpec: '请输入规格型号',
placeholderDeviceBrand: '请输入设备品牌',
placeholderSn: '请输入序列号',
placeholderRatedCapacity: '请输入额定产能',
placeholderProductionDate: '请选择生产日期',
placeholderOutgoingTime: '请选择出厂日期',
placeholderFactoryEntryDate: '请选择入厂日期',
placeholderDeviceLocation: '请输入位置',
placeholderDeviceManagerIds: '请选择责任人',
@ -1301,6 +1305,7 @@ export default {
placeholderBeijianIds: '请选择备件',
deviceNo: '设备编号',
deviceBrand: '设备品牌',
sn: '序列号',
supplier: '供应商',
workshop: '所属车间',
systemOrg: '所属系统组织',

@ -76,11 +76,12 @@
</el-col>
<!-- <el-col :span="12">
<el-form-item :label="t('EquipmentManagement.EquipmentLedger.deviceBrand')" prop="deviceBrand">
<el-input v-model="formData.deviceBrand" placeholder="请输入品牌" />
<el-col :span="8">
<el-form-item :label="t('EquipmentManagement.EquipmentLedger.factoryEntryDate')" prop="factoryEntryDate">
<el-date-picker v-model="formData.factoryEntryDate" type="date" value-format="YYYY-MM-DD"
:placeholder="t('EquipmentManagement.EquipmentLedger.placeholderFactoryEntryDate')" class="!w-full" />
</el-form-item>
</el-col> -->
</el-col>
<!-- <el-col :span="24">
<el-form-item :label="t('EquipmentManagement.EquipmentLedger.deviceModel')" prop="deviceModel">
<el-input v-model="formData.deviceModel" :placeholder="t('EquipmentManagement.EquipmentLedger.placeholderDeviceModel')" />
@ -115,6 +116,13 @@
-->
<!-- </el-form-item>
</el-col> -->
<el-col :span="8">
<el-form-item :label="t('EquipmentManagement.EquipmentLedger.outgoingTime')" prop="outgoingTime">
<el-date-picker v-model="formData.outgoingTime" type="date" value-format="YYYY-MM-DD"
:placeholder="t('EquipmentManagement.EquipmentLedger.placeholderOutgoingTime')" class="!w-full" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="t('EquipmentManagement.EquipmentLedger.isSchedueld')" prop="isScheduled">
<el-switch v-model="formData.isScheduled" :active-value="1" :inactive-value="0"
@ -123,16 +131,17 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="t('EquipmentManagement.EquipmentLedger.productionDate')" prop="productionDate">
<el-date-picker v-model="formData.productionDate" type="date" value-format="YYYY-MM-DD"
:placeholder="t('EquipmentManagement.EquipmentLedger.placeholderProductionDate')" class="!w-full" />
<el-form-item :label="t('EquipmentManagement.EquipmentLedger.deviceBrand')" prop="deviceBrand">
<el-input v-model="formData.deviceBrand"
:placeholder="t('EquipmentManagement.EquipmentLedger.placeholderDeviceBrand')" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="t('EquipmentManagement.EquipmentLedger.factoryEntryDate')" prop="factoryEntryDate">
<el-date-picker v-model="formData.factoryEntryDate" type="date" value-format="YYYY-MM-DD"
:placeholder="t('EquipmentManagement.EquipmentLedger.placeholderFactoryEntryDate')" class="!w-full" />
<el-col :span="12">
<el-form-item :label="t('EquipmentManagement.EquipmentLedger.sn')" prop="sn">
<el-input v-model="formData.sn"
:placeholder="t('EquipmentManagement.EquipmentLedger.placeholderSn')" />
</el-form-item>
</el-col>
@ -497,6 +506,7 @@ const initFormData = () => ({
deviceName: undefined,
deviceStatus: undefined,
deviceBrand: undefined,
sn: undefined,
deviceModel: undefined,
deviceSpec: undefined,
isScheduled: 0,
@ -509,6 +519,7 @@ const initFormData = () => ({
systemOrg: undefined,
deviceManagerIds: [] as number[],
productionDate: undefined,
outgoingTime: undefined,
factoryEntryDate: undefined,
remark: undefined,
componentIds: [] as number[],
@ -698,6 +709,8 @@ const buildPrintData = () => {
deviceName: formData.value.deviceName,
deviceSpec: formData.value.deviceSpec,
deviceBrand: formData.value.deviceBrand,
sn: formData.value.sn,
outgoingTime: formData.value.outgoingTime,
deviceModel: formData.value.deviceModel,
deviceLocation: formData.value.deviceLocation,
remark: formData.value.remark,
@ -762,6 +775,7 @@ const open = async (type: string, id?: number, defaultDeviceTypeId?: number, def
deviceLine: normalizeNumberish((detail as any)?.deviceLine),
deviceManagerIds: parseIdsValue((detail as any)?.deviceManager),
productionDate: normalizeYmd((detail as any)?.productionDate),
outgoingTime: normalizeYmd((detail as any)?.outgoingTime),
factoryEntryDate: normalizeYmd((detail as any)?.factoryEntryDate),
componentIds: parseIdsValue((detail as any)?.componentId),
beijianIds: parseIdsValue((detail as any)?.beijianId),
@ -996,6 +1010,7 @@ const submitForm = async () => {
deviceType: normalizeNumberish(formData.value.deviceType),
deviceLine: normalizeNumberish((formData.value as any).deviceLine),
productionDate: normalizeYmd(formData.value.productionDate),
outgoingTime: normalizeYmd((formData.value as any).outgoingTime),
factoryEntryDate: normalizeYmd(formData.value.factoryEntryDate),
deviceManager: formData.value.deviceManagerIds?.length ? formData.value.deviceManagerIds.join(',') : undefined,
componentId: formData.value.componentIds?.length ? formData.value.componentIds.join(',') : undefined,

@ -47,12 +47,18 @@
<el-descriptions-item :label="t('EquipmentManagement.EquipmentLedger.deviceStatus')">
<dict-tag type="mes_tz_status" :value="detailData?.deviceStatus ?? ''" />
</el-descriptions-item>
<el-descriptions-item :label="t('EquipmentManagement.EquipmentLedger.deviceModel')">
<!-- <el-descriptions-item :label="t('EquipmentManagement.EquipmentLedger.deviceModel')">
{{ detailData?.deviceModel ?? '' }}
</el-descriptions-item>
</el-descriptions-item> -->
<el-descriptions-item :label="t('EquipmentManagement.EquipmentLedger.deviceSpec')">
{{ detailData?.deviceSpec ?? '' }}
</el-descriptions-item>
<el-descriptions-item :label="t('EquipmentManagement.EquipmentLedger.deviceBrand')">
{{ detailData?.deviceBrand ?? '' }}
</el-descriptions-item>
<el-descriptions-item :label="t('EquipmentManagement.EquipmentLedger.sn')">
{{ detailData?.sn ?? '' }}
</el-descriptions-item>
<el-descriptions-item :label="t('EquipmentManagement.EquipmentLedger.deviceType')">
<el-tag effect="light">{{ getDeviceTypeName(detailData?.deviceTypeName ?? detailData?.deviceType) }}</el-tag>
</el-descriptions-item>
@ -62,8 +68,8 @@
<el-descriptions-item :label="t('EquipmentManagement.EquipmentLedger.deviceManagerName')">
{{ deviceManagerName }}
</el-descriptions-item>
<el-descriptions-item :label="t('EquipmentManagement.EquipmentLedger.productionDate')">
{{ formatDetailDate(detailData?.productionDate) }}
<el-descriptions-item :label="t('EquipmentManagement.EquipmentLedger.outgoingTime')">
{{ formatDetailDate(detailData?.outgoingTime) }}
</el-descriptions-item>
<el-descriptions-item :label="t('EquipmentManagement.EquipmentLedger.factoryEntryDate')">
{{ formatDetailDate(detailData?.factoryEntryDate) }}
@ -463,10 +469,15 @@ const route = useRoute()
const { delView } = useTagsViewStore()
const { currentRoute } = useRouter()
type DeviceLedgerDetailVO = DeviceLedgerVO & {
sn?: string
outgoingTime?: string | number | Date
}
const deviceId = computed(() => Number(route.params.id))
const detailLoading = ref(false)
const tableLoading = ref(false)
const detailData = ref<DeviceLedgerVO | undefined>()
const detailData = ref<DeviceLedgerDetailVO | undefined>()
const detailActiveTab = ref('check')
const deviceTypeNameMap = ref<Record<number, string>>({})
@ -568,6 +579,8 @@ const buildDetailPrintData = () => {
deviceName: detailData.value?.deviceName,
deviceSpec: detailData.value?.deviceSpec,
deviceBrand: detailData.value?.deviceBrand,
sn: detailData.value?.sn,
outgoingTime: detailData.value?.outgoingTime,
deviceModel: detailData.value?.deviceModel,
deviceLocation: detailData.value?.deviceLocation,
remark: detailData.value?.remark ?? detailData.value?.deviceRemark,

@ -91,7 +91,7 @@
<div class="device-ledger-right">
<ContentWrap>
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="60px">
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="80px">
<el-form-item :label="t('EquipmentManagement.EquipmentLedger.deviceCode')" prop="deviceCode">
<el-input v-model="queryParams.deviceCode"
:placeholder="t('EquipmentManagement.EquipmentLedger.placeholderDeviceCode')" clearable
@ -115,6 +115,21 @@
:placeholder="t('EquipmentManagement.EquipmentLedger.placeholderDeviceType')" clearable
class="!w-240px" />
</el-form-item>
<el-form-item :label="t('EquipmentManagement.EquipmentLedger.deviceBrand')" prop="deviceBrand">
<el-input v-model="queryParams.deviceBrand"
:placeholder="t('EquipmentManagement.EquipmentLedger.placeholderDeviceBrand')" clearable
@keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item :label="t('EquipmentManagement.EquipmentLedger.sn')" prop="sn">
<el-input v-model="queryParams.sn"
:placeholder="t('EquipmentManagement.EquipmentLedger.placeholderSn')" clearable
@keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item :label="t('EquipmentManagement.EquipmentLedger.outgoingTime')" prop="outgoingTime">
<el-date-picker v-model="queryParams.outgoingTime" type="date" value-format="YYYY-MM-DD"
:placeholder="t('EquipmentManagement.EquipmentLedger.placeholderOutgoingTime')" clearable
class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button @click="handleQuery">
<Icon icon="ep:search" class="mr-5px" />
@ -194,11 +209,14 @@
prop="ratedCapacity" min-width="120px" />
<el-table-column :label="t('EquipmentManagement.EquipmentLedger.deviceSpec')" align="center"
prop="deviceSpec" />
<el-table-column :label="t('EquipmentManagement.EquipmentLedger.deviceBrand')" align="center"
prop="deviceBrand" min-width="120px" />
<el-table-column :label="t('EquipmentManagement.EquipmentLedger.sn')" align="center"
prop="sn" min-width="140px" />
<!-- <el-table-column :label="t('EquipmentManagement.EquipmentLedger.deviceModel')"
align="center" prop="deviceModel"/>-->
<!-- <el-table-column :label="t('EquipmentManagement.EquipmentLedger.deviceBrand')" align="center" prop="deviceBrand" /> -->
<el-table-column :label="t('EquipmentManagement.EquipmentLedger.productionDate')" align="center"
prop="productionDate" :formatter="dateFormatter2" width="120px" sortable />
<el-table-column :label="t('EquipmentManagement.EquipmentLedger.outgoingTime')" align="center"
prop="outgoingTime" :formatter="dateFormatter2" width="120px" sortable />
<el-table-column :label="t('EquipmentManagement.EquipmentLedger.factoryEntryDate')" align="center"
prop="factoryEntryDate" :formatter="dateFormatter2" width="120px" sortable />
<!-- <el-table-column :label="t('EquipmentManagement.EquipmentLedger.supplier')" align="center" prop="supplier" width="110px" /> -->
@ -416,6 +434,9 @@ const queryParams = reactive({
deviceCode: undefined,
deviceName: undefined,
deviceStatus: undefined,
deviceBrand: undefined,
sn: undefined,
outgoingTime: undefined,
deviceType: undefined as number | undefined,
deviceLine: undefined as number | undefined,
})
@ -723,6 +744,9 @@ const getList = async () => {
deviceCode: queryParams.deviceCode,
deviceName: queryParams.deviceName,
deviceStatus: queryParams.deviceStatus,
deviceBrand: queryParams.deviceBrand,
sn: queryParams.sn,
outgoingTime: queryParams.outgoingTime,
deviceType: queryParams.deviceType,
deviceLine: queryParams.deviceLine
})

Loading…
Cancel
Save