<view class="warehouse-select-container"><view class="header"><view class="title-container"><text class="title">货架管理</text><text class="subtitle">请选择您要操作的货区</text></view></view><view class="warehouse-list"><block wx:if="{{loading}}"><view class="loading"><text>加载中...</text></view></block><block wx:else><block wx:if="{{$root.g0===0}}"><view class="empty-state"><text>暂无可用一级货区</text></view></block><block wx:else><view><block wx:for="{{$root.l1}}" wx:for-item="warehouse" wx:for-index="index" wx:key="id"><view class="warehouse-item"><view class="warehouse-row"><view class="warehouse-info"><text class="warehouse-name">{{warehouse.$orig.name+warehouse.$orig.unit}}</text></view><view class="warehouse-action"><view class="warehouse-arrow"><text class="arrow">></text></view><view data-event-opts="{{[['tap',[['toggleExpand',['$0',index],[[['warehouses','id',warehouse.$orig.id]]]]]]]}}" class="expand-btn" catchtap="__e"><text class="expand-icon">{{warehouse.$orig.expanded?'收起':'展开'}}</text></view></view></view><block wx:if="{{warehouse.$orig.expanded}}"><view class="sub-shelves"><view class="sub-header"><text class="sub-title">二级货架</text></view><block wx:if="{{warehouse.$orig.loadingShelves}}"><view class="loading-sub">加载中...</view></block><block wx:else><block wx:if="{{warehouse.g1}}"><view class="empty-sub">暂无二级货架</view></block><block wx:else><view><block wx:for="{{warehouse.l0}}" wx:for-item="shelf" wx:for-index="shelfIndex" wx:key="id"><view class="shelf-item"><view class="shelf-row"><view class="shelf-info"><text class="shelf-name">{{shelf.$orig.name}}</text></view><view class="shelf-action"><view data-event-opts="{{[['tap',[['toggleExpandShelf',['$0',index,'$1',shelfIndex],[[['warehouses','id',warehouse.$orig.id]],[['warehouses','id',warehouse.$orig.id],['shelves','id',shelf.$orig.id]]]]]]]}}" class="expand-btn" bindtap="__e"><text class="expand-icon">{{shelf.$orig.expanded?'收起':'展开'}}</text></view></view></view><block wx:if="{{shelf.$orig.expanded}}"><view class="freight-shelves"><view class="sub-header"><text class="sub-title">三级货架</text></view><block wx:if="{{shelf.$orig.loadingFreights}}"><view class="loading-sub">加载中...</view></block><block wx:else><block wx:if="{{shelf.g2}}"><view class="empty-sub">暂无三级货架</view></block><block wx:else><view><block wx:for="{{shelf.$orig.freights}}" wx:for-item="freight" wx:for-index="__i0__" wx:key="id"><view data-event-opts="{{[['tap',[['navigateToGoodsManagement',['$0','$1','$2'],[[['warehouses','id',warehouse.$orig.id]],[['warehouses','id',warehouse.$orig.id],['shelves','id',shelf.$orig.id]],[['warehouses','id',warehouse.$orig.id],['shelves','id',shelf.$orig.id],['freights','id',freight.id]]]]]]]}}" class="freight-item" bindtap="__e"><view class="freight-info"><text class="freight-name">{{freight.name}}</text></view></view></block></view></block></block></view></block></view></block></view></block></block></view></block></view></block></view></block></block></view></view>