| | |
| | | <template> |
| | | <div> |
| | | |
| | | <!-- 库位列表 --> |
| | | |
| | | <div v-for="(itemW,indexW) in storageList" :key="indexW"> |
| | | <p> 巷道:{{itemW.laneCode}}</p> |
| | | <div v-for="(itemIN,indexIN) in itemW.rows" :key="indexIN" > |
| | | <div class="content-view" > |
| | | <!-- 每个库位方块 查询库位全部库存 --> |
| | | <div class="mask100" v-for="(itemSmall,itemSmallIndex) in itemIN.rowLocations2" :key="itemSmallIndex"> |
| | | |
| | | <content-item v-for="item in itemSmall" :key="item.wareLocationCode" :itemData="item" |
| | | :index="item.wareLocationCode" @show="show(item,item.wareLocationCode)" |
| | | |
| | | <content-item |
| | | v-for="item in itemSmall" |
| | | :key="item.wareLocationCode" |
| | | :itemData="item" |
| | | :index="item.wareLocationCode" |
| | | @show="show(item, item.wareLocationCode)" |
| | | @click="openDialog(item.wareLocationCode)" |
| | | |
| | | :class="'laneCodeBox_' + (item.showInventoryType)"> |
| | | :class="'laneCodeBox_' + item.showInventoryType" |
| | | > |
| | | </content-item> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | <div v-if="itemW.rows.length>1" class="stripe stripeM"></div> |
| | | </div> |
| | |
| | | </teleport> |
| | | <!-- 详情弹框 --> |
| | | <prop-detail ref="propDetailRef"></prop-detail> |
| | | |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import { ElMessage } from 'element-plus'; |
| | | import { ref, defineProps, computed, getCurrentInstance } from 'vue' |
| | | import ContentItem from './ContentItem.vue' |
| | | import { ref, defineProps, computed, getCurrentInstance } from 'vue'; |
| | | import ContentItem from './ContentItem.vue'; |
| | | import PropDetail from './propDetail.vue'; |
| | | const { proxy} :any = getCurrentInstance();// 访问实例上下文 proxy同时支持开发 线上环境 |
| | | //props |
| | |
| | | contentData: { |
| | | type: Array, |
| | | required: true, |
| | | default: [] |
| | | } |
| | | }) |
| | | const containerCodeSHsow = ref('') |
| | | default: [], |
| | | }, |
| | | }); |
| | | const containerCodeSHsow = ref(''); |
| | | //库位列表 |
| | | const storageList: Record<any, any> = computed(() => props.contentData); |
| | | //每个库位详情的显示 |
| | | const itemVisible = ref(false); |
| | | //详情数据 |
| | | const detailData = ref({} as Record<string, any>) |
| | | const detailData = ref({} as Record<string, any>); |
| | | //当前选中的库位 |
| | | const count = ref(String) |
| | | const count = ref(String); |
| | | //显示 隐藏详情 |
| | | const show = (item: any, index: any) => { |
| | | // console.log('item:'+JSON.stringify(item) ) |
| | |
| | | itemVisible.value = false; |
| | | count.value = index; |
| | | detailData.value = {}; |
| | | containerCodeSHsow.value = ""; |
| | | containerCodeSHsow.value = ''; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | // 显示库位状态 |
| | | const setKwStauts = (type: number): string => { |
| | | let status = '' |
| | | let status = ''; |
| | | switch (type) { |
| | | case 0: |
| | | status = '空库位'; |
| | |
| | | status = '有货库位(物料)'; |
| | | } |
| | | return status; |
| | | } |
| | | }; |
| | | |
| | | //打开窗口 |
| | | const openDialog = (type: string) => { //托盘号 |
| | | const openDialog = (type: string) => { |
| | | //托盘号 |
| | | if (!type || type == null) { |
| | | ElMessage.warning("不存在托盘号!"); |
| | | return |
| | | ElMessage.warning('不存在托盘号!'); |
| | | return; |
| | | } |
| | | proxy.$refs['propDetailRef'].openDialog(type); |
| | | }; |
| | |
| | | margin: 5px; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | .stripe { |
| | |
| | | |
| | | /*斑马条纹*/ |
| | | .stripeM { |
| | | background: linear-gradient(#dbd4b4 50%, #f5be6a 50%, ); |
| | | background: linear-gradient(#dbd4b4 50%, #f5be6a 50%); |
| | | background-size: 100% 40px; |
| | | } |
| | | .laneCodeBox_0{ |
| | |
| | | .laneCodeBox_1{ |
| | | visibility: visible; |
| | | } |
| | | |
| | | |
| | | .mask100{ |
| | | height: 100%; |
| | |
| | | // margin-bottom: 149px; |
| | | |
| | | // } |
| | | |
| | | </style> |