| | |
| | | <template> |
| | | <!-- 库存查询 --> |
| | | <view> |
| | | <search-bar placeholder="商品名称、编号、拼音" class="ml-10 mr-10"></search-bar> |
| | | <search-bar @confirm="search" placeholder="商品名称、编号、拼音" class="ml-10 mr-10"></search-bar> |
| | | <view class="content"> |
| | | <navigator url="./storeRecord" hover-class="none" class="content-row flex align-center justify-between" v-for="item in 5"> |
| | | <navigator :url="'./storeRecord?goodsCode='+item.goodsCode" hover-class="none" class="content-row" v-for="item in list"> |
| | | <view class="flex align-center"> |
| | | <image class="product-img" src="../../static/images/product.jpg"></image> |
| | | <view class="font-14 ml-10"> |
| | | <text>肽妍氨基酸平衡基础洁面乳</text> |
| | | <view class="mt-10"> |
| | | <text>在库数量: 5</text> |
| | | <text class="content-warning ml-20">低于警戒值</text> |
| | | <image class="product-img" :src="item.img?item.img:'../../static/images/no-img.png'"></image> |
| | | <view> |
| | | <text class="title">{{item.goodsName}}</text> |
| | | <view class="gray"> |
| | | <text>在库数量: {{item.storeTotal}}</text> |
| | | <!-- <text class="iconfont iconjinggao warn-icon" v-if="item.storeTotal <= item.alarmNum"></text> --> |
| | | <text class="warn-txt" v-if="item.storeTotal <= item.alarmNum">低于警戒值</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <text class="iconfont iconarrow-backimg gray"></text> |
| | | <text class="iconfont iconarrow-backimg light-gray"></text> |
| | | </navigator> |
| | | </view> |
| | | </view> |
| | |
| | | components:{ |
| | | searchBar |
| | | }, |
| | | data(){ |
| | | return{ |
| | | queryKey: '', |
| | | list: [] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.loadList() |
| | | }, |
| | | methods:{ |
| | | search(val){ |
| | | this.queryKey = val; |
| | | this.loadList(); |
| | | }, |
| | | loadList(){ |
| | | this.$httpUtils.request('/api/store/findStoreList', { |
| | | pageNum: 1, |
| | | pageSize: 100, |
| | | queryKey: this.queryKey |
| | | }, 'POST').then((res) => { |
| | | if(res.status == 200){ |
| | | this.list = res.rows; |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | padding: 0 10px; |
| | | } |
| | | .content-row{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | border-bottom: 1px solid #EDEAF4; |
| | | padding: 10px 0; |
| | | padding: 12px 0; |
| | | font-size: 13px; |
| | | } |
| | | .product-img{ |
| | | width: 48px; |
| | | height: 48px; |
| | | border-radius: 4px; |
| | | margin-right: 10px; |
| | | } |
| | | .content-warning{ |
| | | border: 1px solid #DE5A5A; |
| | | .content-row .title{ |
| | | display: block; |
| | | margin-bottom: 8px; |
| | | font-size: 14px; |
| | | color: #333333; |
| | | } |
| | | .content-row .warn-icon{ |
| | | margin-left: 10px; |
| | | color: #FF3232; |
| | | font-size: 18px; |
| | | } |
| | | .content-row .warn-txt{ |
| | | padding: 2px 8px; |
| | | margin-left: 10px; |
| | | border: 1px solid #FF3232; |
| | | color: #FF3232; |
| | | font-size: 10px; |
| | | border-radius: 20px; |
| | | font-size: 8px; |
| | | padding: 5px; |
| | | |
| | | } |
| | | </style> |