|
@@ -1,40 +1,37 @@
|
|
|
<template>
|
|
|
<ContentWrap>
|
|
|
- <div style="display: flex;flex-direction: row; height: 15em;margin-top: 10px">
|
|
|
- <div style="flex: 1;height: 10em;margin-left: 20px">
|
|
|
- <img :src="formData.picUrl" style="width: 30em;height: 15em"/>
|
|
|
+ <div style="display: flex; flex-direction: row; height: 15em; margin-top: 10px">
|
|
|
+ <div style="flex: 1; height: 10em; margin-left: 20px">
|
|
|
+ <img :src="formData.picUrl" style="width: 30em; height: 15em" />
|
|
|
</div>
|
|
|
- <div style="flex: 2.5;height: 15em">
|
|
|
- <el-form
|
|
|
- ref="formRef"
|
|
|
- :disabled="false"
|
|
|
- :model="formData"
|
|
|
- label-width="120px"
|
|
|
- >
|
|
|
- <el-row>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="资产编码:" prop="deviceCode">{{formData.deviceCode}}
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="设备名称:" prop="deviceName">{{formData.deviceName}}
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="品牌:" prop="brand">
|
|
|
- {{formData.brandName}}
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
+ <div style="flex: 2.5; height: 15em">
|
|
|
+ <el-form ref="formRef" :disabled="false" :model="formData" label-width="120px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="资产编码:" prop="deviceCode"
|
|
|
+ >{{ formData.deviceCode }}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="设备名称:" prop="deviceName"
|
|
|
+ >{{ formData.deviceName }}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="品牌:" prop="brand">
|
|
|
+ {{ formData.brandName }}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="所在部门:" prop="orgId">
|
|
|
- {{formData.deptName}}
|
|
|
+ {{ formData.deptName }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="资产类别:" prop="assetClass">
|
|
|
- {{formData.assetClassName}}
|
|
|
+ {{ formData.assetClassName }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
@@ -44,78 +41,78 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="资产性质:" prop="assetProperty">
|
|
|
- {{getDictLabel(DICT_TYPE.PMS_ASSET_PROPERTY, formData.assetProperty)}}
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="规格型号:" prop="model">
|
|
|
- <el-select
|
|
|
- v-model="formData.model"
|
|
|
- :model-value="modelLabel"
|
|
|
- placeholder="请输入规格型号"
|
|
|
- @click="openModelForm"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="资产性质:" prop="assetProperty">
|
|
|
+ {{ getDictLabel(DICT_TYPE.PMS_ASSET_PROPERTY, formData.assetProperty) }}
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="规格型号:" prop="model">
|
|
|
+ <el-select
|
|
|
+ v-model="formData.model"
|
|
|
+ :model-value="modelLabel"
|
|
|
+ placeholder="请输入规格型号"
|
|
|
+ @click="openModelForm"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
</div>
|
|
|
</ContentWrap>
|
|
|
<ContentWrap v-loading="formLoading">
|
|
|
<el-tabs v-model="activeName">
|
|
|
<el-tab-pane label="基础信息" name="info">
|
|
|
- <el-form style="margin-top: 5px;margin-left: 15px">
|
|
|
+ <el-form style="margin-top: 5px; margin-left: 15px">
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="制造商:" prop="manufacturerId">
|
|
|
- {{formData.zzName}}
|
|
|
+ {{ formData.zzName }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="生产日期:" prop="manDate">
|
|
|
- {{formatDate(formData.manDate,'YYYY-MM-DD')}}
|
|
|
+ {{ formatDate(formData.manDate, 'YYYY-MM-DD') }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="供应商" prop="supplierId">
|
|
|
- {{formData.supplierName?formData.supplierName:'-'}}
|
|
|
+ {{ formData.supplierName ? formData.supplierName : '-' }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="铭牌信息:" prop="nameplate">
|
|
|
- {{formData.nameplate?formData.nameplate:'-'}}
|
|
|
+ {{ formData.nameplate ? formData.nameplate : '-' }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="质保到期:" prop="expires">
|
|
|
- {{formData.expires?formatDate(formData.expires, 'YYYY-MM-DD'):'-'}}
|
|
|
+ {{ formData.expires ? formatDate(formData.expires, 'YYYY-MM-DD') : '-' }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="采购价格:" prop="plPrice">
|
|
|
- {{formData.plPrice?formData.plPrice:'-'}}
|
|
|
+ {{ formData.plPrice ? formData.plPrice : '-' }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="采购日期:" prop="plDate">
|
|
|
- {{formData.plDate?formatDate(formData.plDate, 'YYYY-MM-DD'):'-'}}
|
|
|
+ {{ formData.plDate ? formatDate(formData.plDate, 'YYYY-MM-DD') : '-' }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="折旧年限" prop="plYear">
|
|
|
- {{formData.plYear?formData.plYear:'-'}}
|
|
|
+ {{ formData.plYear ? formData.plYear : '-' }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="折旧开始日期" prop="plStartDate">
|
|
|
- {{formData.plStartDate?formatDate(formData.plStartDate,'YYYY-MM-DD'):'-'}}
|
|
|
+ {{ formData.plStartDate ? formatDate(formData.plStartDate, 'YYYY-MM-DD') : '-' }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -123,30 +120,30 @@
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="已提折旧月数" prop="plMonthed">
|
|
|
- {{formData.plMonthed?formData.plMonthed:'-'}}
|
|
|
+ {{ formData.plMonthed ? formData.plMonthed : '-' }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="已提折旧金额" prop="plAmounted">
|
|
|
- {{formData.plAmounted?formData.plAmounted:'-'}}
|
|
|
+ {{ formData.plAmounted ? formData.plAmounted : '-' }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="剩余金额" prop="remainAmount">
|
|
|
- {{formData.remainAmount?formData.remainAmount:'-'}}
|
|
|
+ {{ formData.remainAmount ? formData.remainAmount : '-' }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col v-for="field in list" :key="field.id" :span="6">
|
|
|
<el-form-item :label="field.label" :prop="field.model" :rules="field.rules">
|
|
|
- {{formData[field.prop]}}
|
|
|
+ {{ formData[field.prop] }}
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="证件信息" name="cert">
|
|
|
+ <el-tab-pane label="资料库" name="cert">
|
|
|
<CertList
|
|
|
ref="certRef"
|
|
|
v-model:activeName="activeName"
|
|
@@ -179,26 +176,16 @@
|
|
|
/>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
- <!-- <el-form>-->
|
|
|
- <!-- <el-form-item style="float: right">-->
|
|
|
- <!-- <el-button v-if="!isDetail" :loading="formLoading" type="primary" @click="submitForm">-->
|
|
|
- <!-- 保存-->
|
|
|
- <!-- </el-button>-->
|
|
|
- <!-- <el-button @click="close">返回</el-button>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- </el-form>-->
|
|
|
</ContentWrap>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
-import SupplierInfoForm from '@/views/supplier/base/form/SupplierInfoForm.vue'
|
|
|
import CertList from '@/views/supplier/certificate/index.vue'
|
|
|
import ContactList from '@/views/supplier/contact/index.vue'
|
|
|
import CoreList from '@/views/supplier/coreproduct/index.vue'
|
|
|
import ConnectList from '@/views/supplier/connect/index.vue'
|
|
|
-import {IotDeviceVO, IotDeviceApi} from "@/api/pms/device";
|
|
|
-import {defaultProps} from "@/utils/tree";
|
|
|
-import {DICT_TYPE, getDictLabel, getStrDictOptions} from "@/utils/dict";
|
|
|
-import {formatDate} from "../../../utils/formatTime";
|
|
|
+import { IotDeviceApi, IotDeviceVO } from '@/api/pms/device'
|
|
|
+import { DICT_TYPE, getDictLabel } from '@/utils/dict'
|
|
|
+import { formatDate } from '../../../utils/formatTime'
|
|
|
|
|
|
defineOptions({ name: 'DeviceDetailInfo' })
|
|
|
|
|
@@ -237,22 +224,6 @@ const getDetail = async () => {
|
|
|
formLoading.value = true
|
|
|
try {
|
|
|
const res = (await IotDeviceApi.getIotDevice(id)) as IotDeviceVO
|
|
|
- // res.skus?.forEach((item) => {
|
|
|
- // if (isDetail.value) {
|
|
|
- // item.price = floatToFixed2(item.price)
|
|
|
- // item.marketPrice = floatToFixed2(item.marketPrice)
|
|
|
- // item.costPrice = floatToFixed2(item.costPrice)
|
|
|
- // item.firstBrokeragePrice = floatToFixed2(item.firstBrokeragePrice)
|
|
|
- // item.secondBrokeragePrice = floatToFixed2(item.secondBrokeragePrice)
|
|
|
- // } else {
|
|
|
- // // 回显价格分转元
|
|
|
- // item.price = formatToFraction(item.price)
|
|
|
- // item.marketPrice = formatToFraction(item.marketPrice)
|
|
|
- // item.costPrice = formatToFraction(item.costPrice)
|
|
|
- // item.firstBrokeragePrice = formatToFraction(item.firstBrokeragePrice)
|
|
|
- // item.secondBrokeragePrice = formatToFraction(item.secondBrokeragePrice)
|
|
|
- // }
|
|
|
- // })
|
|
|
formData.value = res
|
|
|
} finally {
|
|
|
formLoading.value = false
|
|
@@ -270,6 +241,4 @@ onMounted(async () => {
|
|
|
await getDetail()
|
|
|
})
|
|
|
</script>
|
|
|
-<style scoped>
|
|
|
-
|
|
|
-</style>
|
|
|
+<style scoped></style>
|