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

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

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

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

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

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

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

@ -91,7 +91,7 @@
<div class="device-ledger-right"> <div class="device-ledger-right">
<ContentWrap> <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-form-item :label="t('EquipmentManagement.EquipmentLedger.deviceCode')" prop="deviceCode">
<el-input v-model="queryParams.deviceCode" <el-input v-model="queryParams.deviceCode"
:placeholder="t('EquipmentManagement.EquipmentLedger.placeholderDeviceCode')" clearable :placeholder="t('EquipmentManagement.EquipmentLedger.placeholderDeviceCode')" clearable
@ -115,6 +115,21 @@
:placeholder="t('EquipmentManagement.EquipmentLedger.placeholderDeviceType')" clearable :placeholder="t('EquipmentManagement.EquipmentLedger.placeholderDeviceType')" clearable
class="!w-240px" /> class="!w-240px" />
</el-form-item> </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-form-item>
<el-button @click="handleQuery"> <el-button @click="handleQuery">
<Icon icon="ep:search" class="mr-5px" /> <Icon icon="ep:search" class="mr-5px" />
@ -194,11 +209,14 @@
prop="ratedCapacity" min-width="120px" /> prop="ratedCapacity" min-width="120px" />
<el-table-column :label="t('EquipmentManagement.EquipmentLedger.deviceSpec')" align="center" <el-table-column :label="t('EquipmentManagement.EquipmentLedger.deviceSpec')" align="center"
prop="deviceSpec" /> 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')" <!-- <el-table-column :label="t('EquipmentManagement.EquipmentLedger.deviceModel')"
align="center" prop="deviceModel"/>--> align="center" prop="deviceModel"/>-->
<!-- <el-table-column :label="t('EquipmentManagement.EquipmentLedger.deviceBrand')" align="center" prop="deviceBrand" /> --> <el-table-column :label="t('EquipmentManagement.EquipmentLedger.outgoingTime')" align="center"
<el-table-column :label="t('EquipmentManagement.EquipmentLedger.productionDate')" align="center" prop="outgoingTime" :formatter="dateFormatter2" width="120px" sortable />
prop="productionDate" :formatter="dateFormatter2" width="120px" sortable />
<el-table-column :label="t('EquipmentManagement.EquipmentLedger.factoryEntryDate')" align="center" <el-table-column :label="t('EquipmentManagement.EquipmentLedger.factoryEntryDate')" align="center"
prop="factoryEntryDate" :formatter="dateFormatter2" width="120px" sortable /> prop="factoryEntryDate" :formatter="dateFormatter2" width="120px" sortable />
<!-- <el-table-column :label="t('EquipmentManagement.EquipmentLedger.supplier')" align="center" prop="supplier" width="110px" /> --> <!-- <el-table-column :label="t('EquipmentManagement.EquipmentLedger.supplier')" align="center" prop="supplier" width="110px" /> -->
@ -416,6 +434,9 @@ const queryParams = reactive({
deviceCode: undefined, deviceCode: undefined,
deviceName: undefined, deviceName: undefined,
deviceStatus: undefined, deviceStatus: undefined,
deviceBrand: undefined,
sn: undefined,
outgoingTime: undefined,
deviceType: undefined as number | undefined, deviceType: undefined as number | undefined,
deviceLine: undefined as number | undefined, deviceLine: undefined as number | undefined,
}) })
@ -723,6 +744,9 @@ const getList = async () => {
deviceCode: queryParams.deviceCode, deviceCode: queryParams.deviceCode,
deviceName: queryParams.deviceName, deviceName: queryParams.deviceName,
deviceStatus: queryParams.deviceStatus, deviceStatus: queryParams.deviceStatus,
deviceBrand: queryParams.deviceBrand,
sn: queryParams.sn,
outgoingTime: queryParams.outgoingTime,
deviceType: queryParams.deviceType, deviceType: queryParams.deviceType,
deviceLine: queryParams.deviceLine deviceLine: queryParams.deviceLine
}) })

Loading…
Cancel
Save