|
|
@@ -1,389 +1,152 @@
|
|
|
<template>
|
|
|
- <div class="detail-box">
|
|
|
- <el-descriptions title="" :column="5" size="medium" border>
|
|
|
- <el-descriptions-item label="类型标识">
|
|
|
- {{ baseInfo.classificationCode }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="物品类型">
|
|
|
- {{ getDictValue('类型用途', baseInfo.assetType) }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="物品编码">
|
|
|
- {{ baseInfo.assetCode }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="物品名称">
|
|
|
- {{ baseInfo.assetName }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="允许拆包">
|
|
|
- {{ baseInfo.isUnpack ? '是' : '否' }}
|
|
|
- </el-descriptions-item>
|
|
|
-
|
|
|
- <el-descriptions-item
|
|
|
- :label="item.label"
|
|
|
- v-for="(item, index) in uniqueData"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <template v-if="item.formatter">{{
|
|
|
- item.formatter(baseInfo)
|
|
|
- }}</template>
|
|
|
- <template v-else>{{ baseInfo[item.prop] }}</template>
|
|
|
- </el-descriptions-item>
|
|
|
-
|
|
|
- <el-descriptions-item label="分类">
|
|
|
- {{ baseInfo.classificationUrl }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="计量单位">
|
|
|
- {{ baseInfo.unit }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="安全库存">
|
|
|
- {{ baseInfo.safeStock }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="实时库存">
|
|
|
- {{ baseInfo.realInventoryNum }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="锁单数量">
|
|
|
- <!-- {{ baseInfo.assetType }} -->
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="空闲数量">
|
|
|
- <!-- {{ baseInfo.assetType }} -->
|
|
|
- </el-descriptions-item>
|
|
|
- <!-- <el-descriptions-item label="允许转资产">
|
|
|
- {{ baseInfo.assetType }}
|
|
|
- </el-descriptions-item> -->
|
|
|
- <el-descriptions-item label="包装单位">
|
|
|
- {{ baseInfo.minPackUnit }}
|
|
|
- </el-descriptions-item>
|
|
|
- <!-- <el-descriptions-item label="包装数量">
|
|
|
- {{ baseInfo.outInNum }}{{ baseInfo.minPackUnit }}
|
|
|
- </el-descriptions-item> -->
|
|
|
- <el-descriptions-item label="保质期">
|
|
|
- <template
|
|
|
- v-if="baseInfo.expirationDate || baseInfo.expirationDate === 0"
|
|
|
- >
|
|
|
- {{ baseInfo.expirationDate
|
|
|
- }}{{ dateDict[baseInfo.expirationDateUnit] }}
|
|
|
- </template>
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="库存累计重量" v-if="baseInfo.assetType == 4">
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item
|
|
|
- :label="item.key"
|
|
|
- v-for="(item, index) in selfDefinedParameter"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- {{ item.value }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="描述" :span="5">
|
|
|
- {{ baseInfo.description }}
|
|
|
+ <!-- 基本信息 -->
|
|
|
+ <div class="baseinfo-container" style="padding: 0">
|
|
|
+ <HeaderTitle
|
|
|
+ title="基本信息"
|
|
|
+ size="16px"
|
|
|
+ style="margin-top: 20px"
|
|
|
+ ></HeaderTitle>
|
|
|
+ <el-descriptions title="" :column="4" size="medium" border>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label"> 分类 </template>
|
|
|
+ {{ idata.categoryLevelName }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label"> 编码 </template>
|
|
|
+ {{ idata.code }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label"> 名称 </template>
|
|
|
+ {{ idata.name }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label"> 牌号</template>
|
|
|
+ {{ idata.brandNum }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label"> 型号 </template>
|
|
|
+ {{ idata.modelType }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label"> 规格 </template>
|
|
|
+ {{ idata.specification }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label"> 计量单位 </template>
|
|
|
+ {{ idata.measuringUnit }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label"> 重量单位 </template>
|
|
|
+ {{ idata.weightUnit }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label"> 包装单位 </template>
|
|
|
+ {{ idata.packingUnit }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label"> 体积 </template>
|
|
|
+ {{ idata.volume ? idata.volume + '/' : null }}{{ idata.volumeUnit }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label"> 毛重 </template>
|
|
|
+ {{ idata.roughWeight }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label">净重 </template>
|
|
|
+ {{ idata.netWeight }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label">所属部门 </template>
|
|
|
+ {{ idata.groupName }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label">负责人 </template>
|
|
|
+ {{ idata.name }}
|
|
|
</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
- <!-- 模具、物料 -->
|
|
|
- <template v-if="[6, 3].includes(baseInfo.assetType)">
|
|
|
- <div class="basic-details-title border-none">
|
|
|
- <span class="border-span">匹配产品</span>
|
|
|
- </div>
|
|
|
- <el-descriptions title="" :column="5" size="medium" border>
|
|
|
- <el-descriptions-item
|
|
|
- v-for="(item, index) in productData"
|
|
|
- :key="index"
|
|
|
- :label="item.informationCode"
|
|
|
- >
|
|
|
- {{ item.informationName }}
|
|
|
- </el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
- </template>
|
|
|
- <!-- 生产设备、产品 -->
|
|
|
- <template v-if="[1, 4].includes(baseInfo.assetType)">
|
|
|
- <div class="basic-details-title border-none">
|
|
|
- <span class="border-span">匹配模具</span>
|
|
|
- </div>
|
|
|
- <el-descriptions title="" :column="5" size="medium" border>
|
|
|
- <el-descriptions-item
|
|
|
- v-for="(item, index) in mouldData"
|
|
|
- :key="index"
|
|
|
- :label="item.informationCode"
|
|
|
- >
|
|
|
- {{ item.informationName }}
|
|
|
- </el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
- </template>
|
|
|
- <!-- 生产设备 -->
|
|
|
- <!-- <template v-if="[1].includes(baseInfo.assetType)"> -->
|
|
|
- <template>
|
|
|
- <!-- <div class="basic-details-title border-none">
|
|
|
- <span class="border-span">匹配备品备件</span>
|
|
|
- </div> -->
|
|
|
- <HeaderTitle title="匹配备品备件" size="16px"></HeaderTitle>
|
|
|
- <el-descriptions title="" :column="5" size="medium" border>
|
|
|
- <el-descriptions-item
|
|
|
- v-for="(item, index) in partData"
|
|
|
- :key="index"
|
|
|
- :label="item.informationCode"
|
|
|
- >
|
|
|
- {{ item.informationName }}
|
|
|
- </el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
- </template>
|
|
|
- <!-- 模具、备品备件 -->
|
|
|
- <!-- <template v-if="[6, 7].includes(baseInfo.assetType)"> -->
|
|
|
- <template>
|
|
|
- <!-- <div class="basic-details-title border-none">
|
|
|
- <span class="border-span">匹配设备</span>
|
|
|
- </div> -->
|
|
|
- <HeaderTitle title="匹配设备" size="16px"></HeaderTitle>
|
|
|
- <el-descriptions title="" :column="5" size="medium" border>
|
|
|
- <el-descriptions-item
|
|
|
- v-for="(item, index) in facilityData"
|
|
|
- :key="index"
|
|
|
- :label="item.informationCode"
|
|
|
- >
|
|
|
- {{ item.informationName }}
|
|
|
- </el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
- </template>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
<script>
|
|
|
-import { mapGetters, mapActions } from 'vuex'
|
|
|
-// import { getDetails as getMatchData } from '@/api/stockManagement/itemInformation'
|
|
|
-export default {
|
|
|
- data () {
|
|
|
- return {
|
|
|
- productData: [],
|
|
|
- mouldData: [],
|
|
|
- partData: [],
|
|
|
- bomData: [],
|
|
|
- facilityData: [],
|
|
|
- dateDict: {
|
|
|
- minute: '分钟',
|
|
|
- hour: '小时',
|
|
|
- day: '天',
|
|
|
- month: '月',
|
|
|
- year: '年'
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- props: {
|
|
|
- baseInfo: {
|
|
|
- type: Object,
|
|
|
- default: () => ({})
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
- ...mapGetters(['getDictValue']),
|
|
|
- selfDefinedParameter () {
|
|
|
- []
|
|
|
- // return JSON.parse(this.baseInfo.selfDefinedParameter) || []
|
|
|
+ import { getUserPage } from '@/api/system/organization';
|
|
|
+ export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ depInfo: {},
|
|
|
+ idata: {}
|
|
|
+ };
|
|
|
},
|
|
|
- uniqueData () {
|
|
|
- switch (+this.baseInfo.assetType) {
|
|
|
- case 3: //物料
|
|
|
- return [{ label: '牌号', prop: 'brandNum' }]
|
|
|
- case 8: //耗材
|
|
|
- return [
|
|
|
- { label: '型号', prop: 'modelType' },
|
|
|
- { label: '规格', prop: 'specification' }
|
|
|
- ]
|
|
|
- case 4: //产品
|
|
|
- return [
|
|
|
- { label: '牌号', prop: 'brandNum' },
|
|
|
- { label: '型号', prop: 'modelType' },
|
|
|
- {
|
|
|
- label: '标准单重',
|
|
|
- prop: 'modelType',
|
|
|
- formatter (row) {
|
|
|
- if (!row?.extendField) return ''
|
|
|
- const extendField = JSON.parse(row.extendField)
|
|
|
- return `${extendField.unqualifiedRate || '-'}KG`
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '不良品率',
|
|
|
- prop: 'modelType',
|
|
|
- formatter (row) {
|
|
|
- if (!row?.extendField) return ''
|
|
|
- const extendField = JSON.parse(row.extendField)
|
|
|
- return `${extendField.unqualifiedRate || '-'}%`
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
- case 5: //'周转车'
|
|
|
- return [
|
|
|
- { label: '规格', prop: 'specification' },
|
|
|
- {
|
|
|
- label: '材质',
|
|
|
- prop: 'texture',
|
|
|
- formatter (row) {
|
|
|
- if (!row?.extendField) return ''
|
|
|
- const extendField = JSON.parse(row.extendField)
|
|
|
- return extendField.texture
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '长宽高',
|
|
|
- prop: '',
|
|
|
- formatter (row) {
|
|
|
- if (!row?.extendField) return ''
|
|
|
- const extendField = JSON.parse(row.extendField)
|
|
|
- return `${extendField.length || '-'}/${
|
|
|
- extendField.width || '-'
|
|
|
- }/${extendField.high || '-'}`
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
- case 2: //'舟皿'
|
|
|
- return [
|
|
|
- { label: '规格', prop: 'specification' },
|
|
|
- { label: '型号', prop: 'modelType' },
|
|
|
- {
|
|
|
- label: '角度',
|
|
|
- prop: '',
|
|
|
- formatter (row) {
|
|
|
- if (!row?.extendField) return ''
|
|
|
- const extendField = JSON.parse(row.extendField)
|
|
|
-
|
|
|
- return { notA: '非A', A: 'A' }[extendField.angle]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '长宽高',
|
|
|
- prop: '',
|
|
|
- formatter (row) {
|
|
|
- if (!row?.extendField) return ''
|
|
|
- const extendField = JSON.parse(row.extendField)
|
|
|
- return `${extendField.length || '-'}*${
|
|
|
- extendField.width || '-'
|
|
|
- }*${extendField.high || '-'}`
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
- case 1: //'设备'
|
|
|
- return [
|
|
|
- { label: '型号', prop: 'modelType' },
|
|
|
- { label: '规格', prop: 'specification' }
|
|
|
- ]
|
|
|
- case 6: //'模具'
|
|
|
- return [
|
|
|
- { label: '牌号', prop: 'brandNum' },
|
|
|
- { label: '型号', prop: 'modelType' },
|
|
|
- {
|
|
|
- label: '大模体型号',
|
|
|
- prop: '',
|
|
|
- formatter (row) {
|
|
|
- if (!row?.extendField) return ''
|
|
|
- const extendField = JSON.parse(row.extendField)
|
|
|
- return extendField.dieBodyModel
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '最大冲压次数',
|
|
|
- prop: '',
|
|
|
- formatter (row) {
|
|
|
- if (!row?.extendField) return ''
|
|
|
- const extendField = JSON.parse(row.extendField)
|
|
|
- return extendField.maximumStampingTimes
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '收缩系数',
|
|
|
- prop: '',
|
|
|
- formatter (row) {
|
|
|
- if (!row?.extendField) return ''
|
|
|
- const extendField = JSON.parse(row.extendField)
|
|
|
- return extendField.shrinkageCoefficient
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '芯杆数量',
|
|
|
- prop: '',
|
|
|
- formatter (row) {
|
|
|
- if (!row?.extendField) return ''
|
|
|
- const extendField = JSON.parse(row.extendField)
|
|
|
- return extendField.mandrelNum
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '模孔数量',
|
|
|
- prop: '',
|
|
|
- formatter (row) {
|
|
|
- if (!row?.extendField) return ''
|
|
|
- const extendField = JSON.parse(row.extendField)
|
|
|
- return extendField.dieHoleNum
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '上冲头数量',
|
|
|
- prop: '',
|
|
|
- formatter (row) {
|
|
|
- if (!row?.extendField) return ''
|
|
|
- const extendField = JSON.parse(row.extendField)
|
|
|
- return extendField.upperPunchNum
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '下冲头数量',
|
|
|
- prop: '',
|
|
|
- formatter (row) {
|
|
|
- if (!row?.extendField) return ''
|
|
|
- const extendField = JSON.parse(row.extendField)
|
|
|
- return extendField.lowerPunchNum
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
- case 7: //'备品备件'
|
|
|
- return [
|
|
|
- { label: '规格', prop: 'specification' },
|
|
|
- { label: '型号', prop: 'modelType' }
|
|
|
- ]
|
|
|
+ methods: {
|
|
|
+ async getDetailInfoAugr(data) {
|
|
|
+ const dep = await this.getDepUser(data.deptLeaderId, data.deptId);
|
|
|
+ this.idata = { ...data, groupName: dep.groupName, name: dep.name };
|
|
|
+ },
|
|
|
+ async getDepUser(id, depId) {
|
|
|
+ const res = await getUserPage({
|
|
|
+ pageNum: 1,
|
|
|
+ size: -1,
|
|
|
+ executeGroupId: id
|
|
|
+ });
|
|
|
+ const list = res.list;
|
|
|
+ for (const key in list) {
|
|
|
+ if (list[key].id == depId) {
|
|
|
+ return list[key];
|
|
|
+ } else {
|
|
|
+ return {};
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|
|
|
|
|
|
- return []
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .baseinfo-container {
|
|
|
+ background-color: #fff;
|
|
|
+ padding: 0px 20px 20px;
|
|
|
+ .content {
|
|
|
+ padding: 0 20px;
|
|
|
+ }
|
|
|
+ .basic-details-title {
|
|
|
+ font-size: 16px;
|
|
|
+ margin: 15px 0;
|
|
|
}
|
|
|
- },
|
|
|
- created () {
|
|
|
- // this.requestDict('类型用途')
|
|
|
- // this._getMatchData()
|
|
|
- },
|
|
|
- methods: {
|
|
|
- ...mapActions('dict', ['requestDict']),
|
|
|
- async _getMatchData () {
|
|
|
- const res = await getMatchData({ id: this.baseInfo.materialId })
|
|
|
- if (res?.success) {
|
|
|
- for (const key in res.data.informationRelationMap) {
|
|
|
- this.matchList(key, res.data.informationRelationMap)
|
|
|
+ .upload-container {
|
|
|
+ display: flex;
|
|
|
+ .img-box {
|
|
|
+ width: 280px;
|
|
|
+ height: 342px;
|
|
|
+ border: 1px solid rgba(215, 215, 215, 1);
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ img {
|
|
|
+ max-width: 100%;
|
|
|
}
|
|
|
}
|
|
|
- },
|
|
|
- matchList (key, data) {
|
|
|
- switch (key) {
|
|
|
- case 'w01': {
|
|
|
- this.facilityData = data[key]
|
|
|
- break
|
|
|
- }
|
|
|
- case 'w04': {
|
|
|
- this.mouldData = data[key]
|
|
|
- break
|
|
|
+ .file-list {
|
|
|
+ margin-left: 50px;
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-items: baseline;
|
|
|
+ align-content: flex-start;
|
|
|
+ .file-box {
|
|
|
+ width: 30%;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ height: 57px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 55px;
|
|
|
+ border: 1px solid #1890ff;
|
|
|
+ color: #1890ff;
|
|
|
+ cursor: pointer;
|
|
|
+ &.disabled {
|
|
|
+ cursor: not-allowed;
|
|
|
+ border-color: rgba(215, 215, 215, 1);
|
|
|
+ color: rgba(215, 215, 215, 1);
|
|
|
+ }
|
|
|
}
|
|
|
- case 'w05': {
|
|
|
- this.partData = data[key]
|
|
|
- break
|
|
|
- }
|
|
|
- case 'w07': {
|
|
|
- this.productData = data[key]
|
|
|
- break
|
|
|
- }
|
|
|
- default:
|
|
|
- break
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
-</script>
|
|
|
-<style lang="scss" scoped>
|
|
|
-.detail-box{
|
|
|
- margin: 0 auto;
|
|
|
- .el-descriptions{
|
|
|
- margin: 20px 0;
|
|
|
- }
|
|
|
-}
|
|
|
</style>
|