1 line
18 KiB
Plaintext
1 line
18 KiB
Plaintext
<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 data-event-opts="{{[['tap',[['selectWarehouse',['$0'],[[['warehouses','id',warehouse.$orig.id]]]]]]]}}" class="warehouse-row" bindtap="__e"><view class="warehouse-info"><text class="warehouse-name">{{warehouse.$orig.name+warehouse.$orig.unit}}</text></view><view class="warehouse-action"><block wx:if="{{warehouse.$orig.expanded}}"><view class="action-buttons"><view data-event-opts="{{[['tap',[['editWarehouse',['$0'],[[['warehouses','id',warehouse.$orig.id]]]]]]]}}" class="action-btn edit-btn" catchtap="__e"><text>编辑</text></view><view data-event-opts="{{[['tap',[['deleteWarehouse',['$0'],[[['warehouses','id',warehouse.$orig.id]]]]]]]}}" class="action-btn delete-btn" catchtap="__e"><text>删除</text></view></view></block><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 data-event-opts="{{[['tap',[['addShelf',['$0'],[[['warehouses','id',warehouse.$orig.id]]]]]]]}}" class="sub-add-btn" bindtap="__e"><text>+ 新增</text></view></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 class="action-buttons"><view data-event-opts="{{[['tap',[['editShelf',['$0','$1'],[[['warehouses','id',warehouse.$orig.id]],[['warehouses','id',warehouse.$orig.id],['shelves','id',shelf.$orig.id]]]]]]]}}" class="action-btn edit-btn" bindtap="__e"><text>编辑</text></view><view data-event-opts="{{[['tap',[['deleteShelf',['$0','$1'],[[['warehouses','id',warehouse.$orig.id]],[['warehouses','id',warehouse.$orig.id],['shelves','id',shelf.$orig.id]]]]]]]}}" class="action-btn delete-btn" bindtap="__e"><text>删除</text></view></view><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 data-event-opts="{{[['tap',[['addFreight',['$0','$1'],[[['warehouses','id',warehouse.$orig.id]],[['warehouses','id',warehouse.$orig.id],['shelves','id',shelf.$orig.id]]]]]]]}}" class="sub-add-btn" bindtap="__e"><text>+ 新增</text></view></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 class="freight-item"><view class="freight-info"><text class="freight-name">{{freight.name}}</text></view><view class="freight-action"><view class="action-buttons"><view data-event-opts="{{[['tap',[['editFreight',['$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="action-btn edit-btn" bindtap="__e"><text>编辑</text></view><view data-event-opts="{{[['tap',[['deleteFreight',['$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="action-btn delete-btn" bindtap="__e"><text>删除</text></view></view></view></view></block></view></block></block></view></block></view></block></view></block></block></view></block></view></block></view></block></block></view><uni-popup class="vue-ref" vue-id="2c3e131b-1" type="center" data-ref="editPopup" bind:__l="__l" vue-slots="{{['default']}}"><view class="edit-popup-container"><view class="edit-popup-header"><text class="edit-popup-title">修改一级货区信息设置</text><text data-event-opts="{{[['tap',[['closeEditPopup',['$event']]]]]}}" class="edit-popup-close" bindtap="__e">×</text></view><view class="edit-popup-content"><view class="edit-form-item"><text class="edit-form-label required">名称</text><view class="name-unit-container"><input class="edit-form-input with-unit" placeholder="请输入名称" data-event-opts="{{[['input',[['__set_model',['$0','name','$event',[]],['editForm']]]]]}}" value="{{editForm.name}}" bindinput="__e"/><view data-event-opts="{{[['tap',[['toggleUnitDropdown',['$event']]]]]}}" class="unit-selector" bindtap="__e"><text class="selected-unit">{{editForm.unit||'库'}}</text><text class="dropdown-icon">▼</text></view></view><block wx:if="{{showUnitDropdown}}"><view class="unit-dropdown"><block wx:for="{{unitOptions}}" wx:for-item="unit" wx:for-index="__i1__" wx:key="*this"><view data-event-opts="{{[['tap',[['selectUnit',['$0'],[[['unitOptions','',__i1__]]]]]]]}}" class="{{['unit-option',(editForm.unit===unit)?'unit-option-active':'']}}" bindtap="__e"><text>{{unit}}</text></view></block></view></block></view><view class="edit-form-item"><text class="edit-form-label required">货区数量</text><input class="edit-form-input" placeholder="请输入货区数量" type="number" data-event-opts="{{[['input',[['__set_model',['$0','sheQuantityMax','$event',[]],['editForm']]]]]}}" value="{{editForm.sheQuantityMax}}" bindinput="__e"/></view><view class="edit-form-item"><text class="edit-form-label required">货区编码</text><input class="edit-form-input" placeholder="请输入货区编码" data-event-opts="{{[['input',[['__set_model',['$0','code','$event',[]],['editForm']]]]]}}" value="{{editForm.code}}" bindinput="__e"/></view><view class="edit-form-item"><text class="edit-form-label">货区状态</text><view class="edit-form-radio"><view data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" class="radio-item" bindtap="__e"><view class="{{['radio-circle',(editForm.status==='0')?'radio-active':'']}}"></view><text class="radio-text">正常</text></view><view data-event-opts="{{[['tap',[['e1',['$event']]]]]}}" class="radio-item" bindtap="__e"><view class="{{['radio-circle',(editForm.status==='1')?'radio-active':'']}}"></view><text class="radio-text">停止</text></view></view></view><view class="edit-form-item"><text class="edit-form-label">货区地址</text><input class="edit-form-input" placeholder="请输入货区地址" data-event-opts="{{[['input',[['__set_model',['$0','address','$event',[]],['editForm']]]]]}}" value="{{editForm.address}}" bindinput="__e"/></view><view class="edit-form-item"><text class="edit-form-label required">管理员</text><input class="edit-form-input" placeholder="请输入管理员" data-event-opts="{{[['input',[['__set_model',['$0','manager','$event',[]],['editForm']]]]]}}" value="{{editForm.manager}}" bindinput="__e"/></view><view class="edit-form-item"><text class="edit-form-label">备注</text><input class="edit-form-input" placeholder="请输入备注" data-event-opts="{{[['input',[['__set_model',['$0','remark','$event',[]],['editForm']]]]]}}" value="{{editForm.remark}}" bindinput="__e"/></view></view><view class="edit-popup-footer"><button data-event-opts="{{[['tap',[['closeEditPopup',['$event']]]]]}}" class="btn-cancel" bindtap="__e">取消</button><button data-event-opts="{{[['tap',[['submitEditForm',['$event']]]]]}}" class="btn-confirm" bindtap="__e">确定</button></view></view></uni-popup><uni-popup class="vue-ref" vue-id="2c3e131b-2" type="center" data-ref="editShelfPopup" bind:__l="__l" vue-slots="{{['default']}}"><view class="edit-popup-container"><view class="edit-popup-header"><text class="edit-popup-title">修改二级货区信息</text><text data-event-opts="{{[['tap',[['closeEditShelfPopup',['$event']]]]]}}" class="edit-popup-close" bindtap="__e">×</text></view><view class="edit-popup-content"><view class="edit-form-item"><text class="edit-form-label">货区名称</text><input class="edit-form-input" placeholder="货区名称" disabled="{{true}}" data-event-opts="{{[['input',[['__set_model',['$0','depotName','$event',[]],['editShelfForm']]]]]}}" value="{{editShelfForm.depotName}}" bindinput="__e"/></view><view class="edit-form-item"><text class="edit-form-label required">名称</text><view class="name-unit-container"><input class="edit-form-input with-unit" placeholder="请输入名称" data-event-opts="{{[['input',[['__set_model',['$0','name','$event',[]],['editShelfForm']]]]]}}" value="{{editShelfForm.name}}" bindinput="__e"/><view data-event-opts="{{[['tap',[['toggleShelfUnitDropdown',['$event']]]]]}}" class="unit-selector" bindtap="__e"><text class="selected-unit">{{editShelfForm.unit||'区'}}</text><text class="dropdown-icon">▼</text></view></view><block wx:if="{{showShelfUnitDropdown}}"><view class="unit-dropdown"><block wx:for="{{unitOptions}}" wx:for-item="unit" wx:for-index="__i2__" wx:key="*this"><view data-event-opts="{{[['tap',[['selectShelfUnit',['$0'],[[['unitOptions','',__i2__]]]]]]]}}" class="{{['unit-option',(editShelfForm.unit===unit)?'unit-option-active':'']}}" bindtap="__e"><text>{{unit}}</text></view></block></view></block></view><view class="edit-form-item"><text class="edit-form-label">货区编码</text><input class="edit-form-input" placeholder="货区编码" disabled="{{true}}" data-event-opts="{{[['input',[['__set_model',['$0','code','$event',[]],['editShelfForm']]]]]}}" value="{{editShelfForm.code}}" bindinput="__e"/></view></view><view class="edit-popup-footer"><button data-event-opts="{{[['tap',[['closeEditShelfPopup',['$event']]]]]}}" class="btn-cancel" bindtap="__e">取消</button><button data-event-opts="{{[['tap',[['submitEditShelfForm',['$event']]]]]}}" class="btn-confirm" bindtap="__e">确定</button></view></view></uni-popup><uni-popup class="vue-ref" vue-id="2c3e131b-3" type="center" data-ref="addShelfPopup" bind:__l="__l" vue-slots="{{['default']}}"><view class="edit-popup-container"><view class="edit-popup-header"><text class="edit-popup-title">创建二级货区信息</text><text data-event-opts="{{[['tap',[['closeAddShelfPopup',['$event']]]]]}}" class="edit-popup-close" bindtap="__e">×</text></view><view class="edit-popup-content"><view class="edit-form-item"><text class="edit-form-label">货区名称</text><input class="edit-form-input" placeholder="货区名称" disabled="{{true}}" data-event-opts="{{[['input',[['__set_model',['$0','depotName','$event',[]],['addShelfForm']]]]]}}" value="{{addShelfForm.depotName}}" bindinput="__e"/></view><view class="edit-form-item"><text class="edit-form-label required">名称</text><view class="name-unit-container"><input class="edit-form-input with-unit" placeholder="请输入名称" data-event-opts="{{[['input',[['__set_model',['$0','name','$event',[]],['addShelfForm']]]]]}}" value="{{addShelfForm.name}}" bindinput="__e"/><view data-event-opts="{{[['tap',[['toggleAddShelfUnitDropdown',['$event']]]]]}}" class="unit-selector" bindtap="__e"><text class="selected-unit">{{addShelfForm.unit||'区'}}</text><text class="dropdown-icon">▼</text></view></view><block wx:if="{{showAddShelfUnitDropdown}}"><view class="unit-dropdown"><block wx:for="{{unitOptions}}" wx:for-item="unit" wx:for-index="__i3__" wx:key="*this"><view data-event-opts="{{[['tap',[['selectAddShelfUnit',['$0'],[[['unitOptions','',__i3__]]]]]]]}}" class="{{['unit-option',(addShelfForm.unit===unit)?'unit-option-active':'']}}" bindtap="__e"><text>{{unit}}</text></view></block></view></block></view><view class="edit-form-item"><text class="edit-form-label required">货区编码</text><input class="edit-form-input" placeholder="请输入货区编码(数字或字母+数字),例如: 0-99-A0-Z9" data-event-opts="{{[['input',[['__set_model',['$0','code','$event',[]],['addShelfForm']]]]]}}" value="{{addShelfForm.code}}" bindinput="__e"/></view></view><view class="edit-popup-footer"><button data-event-opts="{{[['tap',[['closeAddShelfPopup',['$event']]]]]}}" class="btn-cancel" bindtap="__e">取消</button><button data-event-opts="{{[['tap',[['submitAddShelfForm',['$event']]]]]}}" class="btn-confirm" bindtap="__e">确定</button></view></view></uni-popup><uni-popup class="vue-ref" vue-id="2c3e131b-4" type="center" data-ref="addFreightPopup" bind:__l="__l" vue-slots="{{['default']}}"><view class="edit-popup-container"><view class="edit-popup-header"><text class="edit-popup-title">创建三级货区信息</text><text data-event-opts="{{[['tap',[['closeAddFreightPopup',['$event']]]]]}}" class="edit-popup-close" bindtap="__e">×</text></view><view class="edit-popup-content"><view class="edit-form-item"><text class="edit-form-label">货架名称</text><input class="edit-form-input" placeholder="货架名称" disabled="{{true}}" data-event-opts="{{[['input',[['__set_model',['$0','sheName','$event',[]],['addFreightForm']]]]]}}" value="{{addFreightForm.sheName}}" bindinput="__e"/></view><view class="edit-form-item"><text class="edit-form-label required">名称</text><view class="name-unit-container"><input class="edit-form-input with-unit" placeholder="请输入名称" data-event-opts="{{[['input',[['__set_model',['$0','name','$event',[]],['addFreightForm']]]]]}}" value="{{addFreightForm.name}}" bindinput="__e"/><view data-event-opts="{{[['tap',[['toggleAddFreightUnitDropdown',['$event']]]]]}}" class="unit-selector" bindtap="__e"><text class="selected-unit">{{addFreightForm.unit||'架'}}</text><text class="dropdown-icon">▼</text></view></view><block wx:if="{{showAddFreightUnitDropdown}}"><view class="unit-dropdown"><block wx:for="{{unitOptions}}" wx:for-item="unit" wx:for-index="__i4__" wx:key="*this"><view data-event-opts="{{[['tap',[['selectAddFreightUnit',['$0'],[[['unitOptions','',__i4__]]]]]]]}}" class="{{['unit-option',(addFreightForm.unit===unit)?'unit-option-active':'']}}" bindtap="__e"><text>{{unit}}</text></view></block></view></block></view><view class="edit-form-item"><text class="edit-form-label required">货区编码</text><input class="edit-form-input" placeholder="请输入货区编码(数字或字母+数字),例如: 0-99-A0-Z9" data-event-opts="{{[['input',[['__set_model',['$0','code','$event',[]],['addFreightForm']]]]]}}" value="{{addFreightForm.code}}" bindinput="__e"/></view></view><view class="edit-popup-footer"><button data-event-opts="{{[['tap',[['closeAddFreightPopup',['$event']]]]]}}" class="btn-cancel" bindtap="__e">取消</button><button data-event-opts="{{[['tap',[['submitAddFreightForm',['$event']]]]]}}" class="btn-confirm" bindtap="__e">确定</button></view></view></uni-popup><uni-popup class="vue-ref" vue-id="2c3e131b-5" type="center" data-ref="editFreightPopup" bind:__l="__l" vue-slots="{{['default']}}"><view class="edit-popup-container"><view class="edit-popup-header"><text class="edit-popup-title">修改三级货区信息</text><text data-event-opts="{{[['tap',[['closeEditFreightPopup',['$event']]]]]}}" class="edit-popup-close" bindtap="__e">×</text></view><view class="edit-popup-content"><view class="edit-form-item"><text class="edit-form-label">货架名称</text><input class="edit-form-input" placeholder="货架名称" disabled="{{true}}" data-event-opts="{{[['input',[['__set_model',['$0','sheName','$event',[]],['editFreightForm']]]]]}}" value="{{editFreightForm.sheName}}" bindinput="__e"/></view><view class="edit-form-item"><text class="edit-form-label required">名称</text><view class="name-unit-container"><input class="edit-form-input with-unit" placeholder="请输入名称" data-event-opts="{{[['input',[['__set_model',['$0','name','$event',[]],['editFreightForm']]]]]}}" value="{{editFreightForm.name}}" bindinput="__e"/><view data-event-opts="{{[['tap',[['toggleEditFreightUnitDropdown',['$event']]]]]}}" class="unit-selector" bindtap="__e"><text class="selected-unit">{{editFreightForm.unit||'架'}}</text><text class="dropdown-icon">▼</text></view></view><block wx:if="{{showEditFreightUnitDropdown}}"><view class="unit-dropdown"><block wx:for="{{unitOptions}}" wx:for-item="unit" wx:for-index="__i5__" wx:key="*this"><view data-event-opts="{{[['tap',[['selectEditFreightUnit',['$0'],[[['unitOptions','',__i5__]]]]]]]}}" class="{{['unit-option',(editFreightForm.unit===unit)?'unit-option-active':'']}}" bindtap="__e"><text>{{unit}}</text></view></block></view></block></view><view class="edit-form-item"><text class="edit-form-label">货区编码</text><input class="edit-form-input" placeholder="货区编码" disabled="{{true}}" data-event-opts="{{[['input',[['__set_model',['$0','code','$event',[]],['editFreightForm']]]]]}}" value="{{editFreightForm.code}}" bindinput="__e"/></view></view><view class="edit-popup-footer"><button data-event-opts="{{[['tap',[['closeEditFreightPopup',['$event']]]]]}}" class="btn-cancel" bindtap="__e">取消</button><button data-event-opts="{{[['tap',[['submitEditFreightForm',['$event']]]]]}}" class="btn-confirm" bindtap="__e">确定</button></view></view></uni-popup></view> |