107 lines
4.2 KiB
Plaintext
107 lines
4.2 KiB
Plaintext
<!--pages/stock/stock.wxml-->
|
|
<!-- 产品库存管理 -->
|
|
<t-message id="t-message" />
|
|
<wxs module="times" src="../../utils/time.wxs" />
|
|
<wxs module="utils" src="../../utils/utils.wxs" />
|
|
<view class="block">
|
|
<t-navbar title="库存管理" t-class="nav" t-class-title="nav-title" />
|
|
</view>
|
|
<statistics-card statistics-data="{{statisticsData}}" />
|
|
<view class="stock-tabs">
|
|
<t-tabs defaultValue="{{0}}" value="{{stockType}}" bind:change="onTabsChange" theme="tag">
|
|
<t-tab-panel label="库存" value="{{0}}" />
|
|
<t-tab-panel label="入库" value="{{1}}" />
|
|
<t-tab-panel label="出库" value="{{2}}" />
|
|
</t-tabs>
|
|
</view>
|
|
|
|
<view class="stock-list">
|
|
<t-fab wx:if="{{stockType > 0 && utils.hasPermission('product:product:add', permissions)}}" class="float-button" icon="add" aria-label="增加" bind:click="handleAddStock"></t-fab>
|
|
<view hidden="{{stockType!=0}}" class="scroll-container">
|
|
<t-cell-group theme="card">
|
|
<t-swipe-cell wx:for="{{storageList}}" wx:key="specId">
|
|
<t-cell data-spec-id="{{item.specId}}" hover>
|
|
<view class="left-icon" slot="left-icon">
|
|
<t-image src="{{item.specPics[0]}}" shape="round" error="slot" width="120rpx" height="120rpx">
|
|
<t-icon name="image-error" slot="error" />
|
|
</t-image>
|
|
</view>
|
|
<view slot="title" class="title">
|
|
<view>{{item.productName}}</view>
|
|
</view>
|
|
<view slot="description" class="description">
|
|
<view class="spec">
|
|
<text>{{item.modelName}}</text>
|
|
<view class="divider">|</view>
|
|
<text>{{item.specName}}</text>
|
|
</view>
|
|
</view>
|
|
<view slot="note" class="note storage">
|
|
{{item.stock}}
|
|
</view>
|
|
</t-cell>
|
|
</t-swipe-cell>
|
|
</t-cell-group>
|
|
<load-more status="{{storageLoadingStatus}}" />
|
|
</view>
|
|
<view hidden="{{stockType!=1}}" class="scroll-container">
|
|
<t-cell-group theme="card">
|
|
<t-swipe-cell wx:for="{{inStockList}}" wx:key="logId">
|
|
<t-cell data-spec-id="{{item.specId}}" hover>
|
|
<view class="left-icon" slot="left-icon">
|
|
<t-image src="{{item.provePic[0]}}" shape="round" error="slot" width="120rpx" height="120rpx">
|
|
<t-icon name="image-error" slot="error" />
|
|
</t-image>
|
|
</view>
|
|
<view slot="title" class="title">
|
|
<view>{{item.productName}}</view>
|
|
</view>
|
|
<view slot="description" class="description">
|
|
<view class="spec">
|
|
<text>{{item.modelName}}</text>
|
|
<view class="divider">|</view>
|
|
<text>{{item.specName}}</text>
|
|
</view>
|
|
<view class="date">
|
|
<t-tag theme="success" size="small">入库</t-tag> <text>{{times.formatDate(item.date) || ''}}</text>
|
|
</view>
|
|
</view>
|
|
<view slot="note" class="note in">
|
|
{{item.total}}
|
|
</view>
|
|
</t-cell>
|
|
</t-swipe-cell>
|
|
</t-cell-group>
|
|
<load-more status="{{inLoadingStatus}}" />
|
|
</view>
|
|
<view hidden="{{stockType!=2}}" class="scroll-container">
|
|
<t-cell-group theme="card">
|
|
<t-swipe-cell wx:for="{{outStockList}}" wx:key="logId">
|
|
<t-cell data-spec-id="{{item.specId}}" hover>
|
|
<view class="left-icon" slot="left-icon">
|
|
<t-image src="{{item.provePic[0]}}" shape="round" error="slot" width="120rpx" height="120rpx">
|
|
<t-icon name="image-error" slot="error" />
|
|
</t-image>
|
|
</view>
|
|
<view slot="title" class="title">
|
|
<view>{{item.productName}}</view>
|
|
</view>
|
|
<view slot="description" class="description">
|
|
<view class="spec">
|
|
<text>{{item.modelName}}</text>
|
|
<view class="divider">|</view>
|
|
<text>{{item.specName}}</text>
|
|
</view>
|
|
<view class="date">
|
|
<t-tag theme="warning" size="small">出库</t-tag> <text>{{times.formatDate(item.date) || ''}}</text>
|
|
</view>
|
|
</view>
|
|
<view slot="note" class="note out">
|
|
{{item.total}}
|
|
</view>
|
|
</t-cell>
|
|
</t-swipe-cell>
|
|
</t-cell-group>
|
|
<load-more status="{{outLoadingStatus}}" />
|
|
</view>
|
|
</view> |