|
|
@@ -2,52 +2,76 @@
|
|
|
<!-- 库存明细 -->
|
|
|
<view class="main-wrap" :class="{ info: isInfo }">
|
|
|
<uni-search-bar class="uni-search-bar" @confirm="search" v-model="searchValue" @input="inputChange" cancelButton="none" placeholder="搜索关键字"></uni-search-bar>
|
|
|
- <scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="lower">
|
|
|
- <view class="order-list">
|
|
|
- <view class="item" v-for="(item, index) in listData" :key="index">
|
|
|
- <view class="title">
|
|
|
- <view class="s1">
|
|
|
- {{ item.onlyCode }}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="main">
|
|
|
- <view class="row">
|
|
|
- <view class="row-item">
|
|
|
- <text class="t1">批次号</text>
|
|
|
- <text class="t2">{{ item.batchNo }}</text>
|
|
|
+ <view class="scroll_box">
|
|
|
+ <scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="lower">
|
|
|
+ <view v-if="listData.length > 0" class="order-list">
|
|
|
+ <view class="item" v-for="(item, index) in listData" :key="index">
|
|
|
+ <view class="main">
|
|
|
+ <view class="row">
|
|
|
+ <view class="row-item">
|
|
|
+ <text class="t1">批次号</text>
|
|
|
+ <text class="t2">{{ item.batchNo }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="row-item">
|
|
|
+ <text class="t1">包装编码</text>
|
|
|
+ <text class="t2">{{ item.packageNo }}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="row-item">
|
|
|
- <text class="t1">包装编码</text>
|
|
|
- <text class="t2">{{ item.packageNo }}</text>
|
|
|
+ <view class="row">
|
|
|
+ <view class="row-item">
|
|
|
+ <text class="t1">包装数量</text>
|
|
|
+ <text class="t2">{{ item.packingQuantity }}{{ item.packingUnit }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="row-item">
|
|
|
+ <text class="t1">存货周期</text>
|
|
|
+ <text class="t2">{{ item.inventoryCycle }}天</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="row">
|
|
|
- <view class="row-item">
|
|
|
- <text class="t1">包装数量</text>
|
|
|
- <text class="t2">{{ item.packingQuantity }}{{ item.packingUnit }}</text>
|
|
|
+ <view class="row">
|
|
|
+ <view class="row-item">
|
|
|
+ <text class="t1">发货条码</text>
|
|
|
+ <text class="t2">{{ item.barcodes }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="row-item">
|
|
|
+ <text class="t1">客户代号</text>
|
|
|
+ <text class="t2">{{ item.clientCode }}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="row-item">
|
|
|
- <text class="t1">存货周期</text>
|
|
|
- <text class="t2">{{ item.inventoryCycle }}天</text>
|
|
|
+ <view class="row">
|
|
|
+ <view class="row-item">
|
|
|
+ <text class="t1">物料代号</text>
|
|
|
+ <text class="t2">{{ item.materielDesignation }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="row-item">
|
|
|
+ <text class="t1">刻码</text>
|
|
|
+ <text class="t2">{{ item.engrave }}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="row">
|
|
|
- <view class="row-item">
|
|
|
- <text class="t1">{{ item.productionDate ? '生产日期' : '采购日期' }}</text>
|
|
|
- <text class="t2">{{ item.productionDate || item.purchaseDate }}</text>
|
|
|
+ <view class="row">
|
|
|
+ <view class="row-item">
|
|
|
+ <text class="t1">{{ item.productionDate ? '生产日期' : '采购日期' }}</text>
|
|
|
+ <text class="t2">{{ item.productionDate || item.purchaseDate }}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="row">
|
|
|
- <view class="row-item">
|
|
|
- <text class="t1">仓库</text>
|
|
|
- <text class="t2">{{ item.warehouseName }}</text>
|
|
|
+ <view class="row">
|
|
|
+ <view class="row-item">
|
|
|
+ <text class="t1">仓库</text>
|
|
|
+ <text class="t2">{{ item.warehouseName }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="row">
|
|
|
+ <view class="row-item">
|
|
|
+ <text class="t1">区域</text>
|
|
|
+ <text class="t2">{{ getLocation(item) }}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <u-loadmore fontSize="32" iconSize="36" :status="status" style="margin-top: 20rpx" />
|
|
|
- </scroll-view>
|
|
|
+ <view v-else class="no_data">暂无数据</view>
|
|
|
+ <!-- <u-loadmore fontSize="32" iconSize="36" :status="status" style="margin-top: 20rpx" /> -->
|
|
|
+ </scroll-view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -70,6 +94,17 @@
|
|
|
this.getData()
|
|
|
},
|
|
|
methods: {
|
|
|
+ getLocation(item) {
|
|
|
+ if (item.areaName && item.goodsShelfName && item.goodsAllocationName) {
|
|
|
+ return item.areaName + '/' + item.goodsShelfName + '/' + item.goodsAllocationName
|
|
|
+ } else if (item.areaName && item.goodsShelfName) {
|
|
|
+ return item.areaName + '/' + item.goodsShelfName
|
|
|
+ } else if (item.areaName) {
|
|
|
+ return item.areaName
|
|
|
+ } else {
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+ },
|
|
|
sortChange(type, e) {
|
|
|
let order = e.order
|
|
|
this.listData.sort((a, b) => {
|
|
|
@@ -116,19 +151,26 @@
|
|
|
if (this.searchValue !== '') {
|
|
|
par.keyWord = this.searchValue
|
|
|
}
|
|
|
- // par = this.URLSearchParams(par)
|
|
|
- getPackingList(par).then(res => {
|
|
|
- console.log('res----', res)
|
|
|
- this.listData = [...this.listData, ...res.list]
|
|
|
- let pages = res.count
|
|
|
- if (this.listData.length < pages) {
|
|
|
- this.isEnd = false
|
|
|
- this.status = 'loading'
|
|
|
- } else {
|
|
|
- this.isEnd = true
|
|
|
- this.status = 'nomore'
|
|
|
- }
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
})
|
|
|
+ // par = this.URLSearchParams(par)
|
|
|
+ getPackingList(par)
|
|
|
+ .then(res => {
|
|
|
+ console.log('res----', res)
|
|
|
+ this.listData = [...this.listData, ...res.list]
|
|
|
+ let pages = res.count
|
|
|
+ if (this.listData.length < pages) {
|
|
|
+ this.isEnd = false
|
|
|
+ this.status = 'loading'
|
|
|
+ } else {
|
|
|
+ this.isEnd = true
|
|
|
+ this.status = 'nomore'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .finally(err => {
|
|
|
+ uni.hideLoading()
|
|
|
+ })
|
|
|
},
|
|
|
getMoreLists() {
|
|
|
this.page++
|
|
|
@@ -146,16 +188,26 @@
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.main-wrap {
|
|
|
- height: calc(100% - 176rpx);
|
|
|
-
|
|
|
- &.info {
|
|
|
- height: calc(100% - 236rpx);
|
|
|
- }
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+ .scroll_box {
|
|
|
+ flex: 1;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
-
|
|
|
.scroll-Y {
|
|
|
- height: calc(100vh - 322rpx);
|
|
|
+ height: 100%;
|
|
|
+ background-color: #fafafa;
|
|
|
}
|
|
|
+ .no_data {
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+
|
|
|
.order-list {
|
|
|
.item {
|
|
|
background-color: #fff;
|