|
@@ -1,30 +1,46 @@
|
|
|
<template>
|
|
|
<a-modal
|
|
|
:title="modalTitle"
|
|
|
- :width="850"
|
|
|
+ :width="1000"
|
|
|
:visible="visible"
|
|
|
:confirmLoading="confirmLoading"
|
|
|
@cancel="handleCancel"
|
|
|
>
|
|
|
<detail-list title="" :col="2">
|
|
|
- <detail-list-item term="Id">{{ model.id }}</detail-list-item>
|
|
|
+ <!-- <detail-list-item term="Id">{{ model.id }}</detail-list-item> -->
|
|
|
<detail-list-item term="编码">{{ model.no }}</detail-list-item>
|
|
|
- <detail-list-item term="所属仓库">{{ model.parentName }}</detail-list-item>
|
|
|
<detail-list-item term="名称">{{ model.name }}</detail-list-item>
|
|
|
-<!-- <detail-list-item term="使用公司">{{ model.useCompanyName }}</detail-list-item>
|
|
|
- <detail-list-item term="使用项目部">{{ model.useProjectName }}</detail-list-item>-->
|
|
|
<detail-list-item term="仓库负责人">{{ model.userName }}</detail-list-item>
|
|
|
<detail-list-item term="等级">{{ BaseTool.Object.getField(levelMap,model.level) }}</detail-list-item>
|
|
|
-<!-- <detail-list-item term="类型">{{ BaseTool.Object.getField(typeMap,model.type) }}</detail-list-item>-->
|
|
|
<detail-list-item term="排序">{{ model.sort }}</detail-list-item>
|
|
|
-<!-- <detail-list-item term="是否删除"><badge :status="DictCache.COLOR.DELFLAG[model.delFlag]" :text="delFlagMap[model.delFlag]"></badge></detail-list-item>
|
|
|
+ <detail-list-item term="备注">{{ model.remark }}</detail-list-item>
|
|
|
+ <template v-if="model.level ===1">
|
|
|
+ <detail-list-item term="所属厂区">{{ areaList.find(item=>item.id===model.factoryArea).name }}</detail-list-item>
|
|
|
+ <detail-list-item term="是否存在库位">{{ model.existPosition?'是':'否' }}</detail-list-item>
|
|
|
+ <detail-list-item v-if="model.existPosition" term="库位图">
|
|
|
+ <img :src="model.backGroundMap" width="300px" alt="">
|
|
|
+ </detail-list-item>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <detail-list-item term="所属仓库">{{ model.parentName }}</detail-list-item>
|
|
|
+ </template>
|
|
|
+ <detail-list-item term="坐标图">
|
|
|
+ <div style="position: relative;width:300px;">
|
|
|
+ <div class="point" ref="point" />
|
|
|
+ <img :src="opcImg" width="100%" alt="">
|
|
|
+ </div>
|
|
|
+ </detail-list-item>
|
|
|
+
|
|
|
+ <!-- <detail-list-item term="使用公司">{{ model.useCompanyName }}</detail-list-item>
|
|
|
+ <detail-list-item term="使用项目部">{{ model.useProjectName }}</detail-list-item>-->
|
|
|
+
|
|
|
+ <!-- <detail-list-item term="类型">{{ BaseTool.Object.getField(typeMap,model.type) }}</detail-list-item>-->
|
|
|
+ <!-- <detail-list-item term="是否删除"><badge :status="DictCache.COLOR.DELFLAG[model.delFlag]" :text="delFlagMap[model.delFlag]"></badge></detail-list-item>
|
|
|
<detail-list-item term="创建人">{{ model.createdUserName }}</detail-list-item>
|
|
|
<detail-list-item term="更新人">{{ model.updateUserName }}</detail-list-item>
|
|
|
<detail-list-item term="更新日期">{{ model.updateTime }}</detail-list-item>-->
|
|
|
</detail-list>
|
|
|
- <detail-list title="" :col="1">
|
|
|
- <detail-list-item term="备注">{{ model.remark }}</detail-list-item>
|
|
|
- </detail-list>
|
|
|
+
|
|
|
<template slot="footer">
|
|
|
<a-button :loading="confirmLoading" type="primary" @click="handleCancel()">返回</a-button>
|
|
|
</template>
|
|
@@ -33,8 +49,9 @@
|
|
|
|
|
|
<script>
|
|
|
import DetailList from '@/components/tools/DetailList'
|
|
|
+import { querySbPosition, fetchSbPosition } from '@/api/sb/position'
|
|
|
+import { fetchStore } from '@/api/store/store'
|
|
|
const DetailListItem = DetailList.Item
|
|
|
-
|
|
|
export default {
|
|
|
name: 'StoreDetail',
|
|
|
components: {
|
|
@@ -51,36 +68,48 @@ export default {
|
|
|
typeMap: {},
|
|
|
levelMap: {},
|
|
|
delFlagMap: {},
|
|
|
+ yesMap: {},
|
|
|
model: {
|
|
|
- 'no': null,
|
|
|
- 'name': null,
|
|
|
- 'type': null,
|
|
|
- 'level': null,
|
|
|
- 'sort': null,
|
|
|
- 'delFlag': null,
|
|
|
- 'parentId': null,
|
|
|
- 'parentName': null,
|
|
|
- 'userName': null,
|
|
|
- 'remark': null,
|
|
|
- 'createdUserId': null,
|
|
|
- 'updateUserId': null,
|
|
|
- 'updateTime': null,
|
|
|
- 'createdUserName': null,
|
|
|
- 'updateUserName': null
|
|
|
- }
|
|
|
+ },
|
|
|
+ opcImg: '',
|
|
|
+ areaList: []
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
// 下拉框map
|
|
|
+ this.yesMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
|
|
|
this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.STORE_LEVEL)
|
|
|
this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.STORE_TYPE)
|
|
|
this.delFlagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.DELFLAG)
|
|
|
+ querySbPosition({ type: 1 }).then(res => {
|
|
|
+ this.areaList = res.data
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
base (record) {
|
|
|
this.visible = true
|
|
|
this.modalTitle = '详情'
|
|
|
this.model = record
|
|
|
+ if (record.level === 1) {
|
|
|
+ this.handleAreaChange(record.factoryArea)
|
|
|
+ } else {
|
|
|
+ this.handleAreaChange(record.parentId)
|
|
|
+ }
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.point.style.left = `calc(${record.positionX}% - 3px)`
|
|
|
+ this.$refs.point.style.top = `calc(${record.positionY}% - 3px)`
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleAreaChange (id) {
|
|
|
+ if (this.model.level === 1) {
|
|
|
+ fetchSbPosition({ id }).then(res => {
|
|
|
+ this.opcImg = res.data.opcImg
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ fetchStore({ id }).then(res => {
|
|
|
+ this.opcImg = res.data.backGroundMap
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
handleCancel () {
|
|
|
this.visible = false
|
|
@@ -90,3 +119,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+<style lang="less" scoped>
|
|
|
+.point {
|
|
|
+ position: absolute;
|
|
|
+ width: 6px;
|
|
|
+ height: 6px;
|
|
|
+ background: red;
|
|
|
+ border-radius: 50%;
|
|
|
+}
|
|
|
+</style>
|