|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
<view class="big_title">{{warehousename}}</view>
|
|
|
- <view @click='goposition(item)' class="cost-list" v-for="(item,index) in costList">
|
|
|
+ <view class="cost-list" v-for="(item,index) in costList">
|
|
|
<view style="display: flex;justify-content: space-between;">
|
|
|
<view class="title">仓位号:{{item.binNumber}}</view>
|
|
|
</view>
|
|
@@ -12,11 +12,11 @@
|
|
|
<view class="font">储量(吨)</view>
|
|
|
<view class="font">价值(元)</view>
|
|
|
</view>
|
|
|
- <view class="goods-table-content" v-for="(item1,index1) in item.warehouseNumViewList">
|
|
|
- <view class="font" :class="item.warehouseNumViewList.length>1&&index1==item.warehouseNumViewList.length-1?'active':''">
|
|
|
+ <view class="goods-table-content" v-for="(item1,index1) in item.warehousePositionStorageInfoList">
|
|
|
+ <view class="font" :class="item.warehousePositionStorageInfoList.length>1&&index1==item.warehousePositionStorageInfoList.length-1?'active':''">
|
|
|
{{item1.goodsName}}
|
|
|
</view>
|
|
|
- <view class="font" :class="item.warehouseNumViewList.length>1&&index1==item.warehouseNumViewList.length-1?'active':''">
|
|
|
+ <view class="font" :class="item.warehousePositionStorageInfoList.length>1&&index1==item.warehousePositionStorageInfoList.length-1?'active':''">
|
|
|
{{item1.storage}}
|
|
|
</view>
|
|
|
<view class="font">{{item1.cost}}</view>
|
|
@@ -65,6 +65,7 @@
|
|
|
isShowAlert: false,
|
|
|
content: '当前登录身份已失效,请重新登录!',
|
|
|
warehousename:'',
|
|
|
+ warehouseId: '',
|
|
|
parameter: {
|
|
|
startDate: "",
|
|
|
endDate: '',
|
|
@@ -89,6 +90,7 @@
|
|
|
},
|
|
|
onLoad: function(option) {
|
|
|
this.warehousename=option.warehouse
|
|
|
+ this.warehouseId=option.warehouseId
|
|
|
this.init()
|
|
|
},
|
|
|
computed: {
|
|
@@ -100,11 +102,11 @@
|
|
|
url: '/pages/public/login'
|
|
|
})
|
|
|
},
|
|
|
- goposition(item){
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/user/contractLook/position?warehouse='+item.warehouseName+'&warehouseType='+item.warehouseType
|
|
|
- })
|
|
|
- },
|
|
|
+ // goposition(item){
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/user/contractLook/position?warehouse='+item.warehouseName+'&warehouseType='+item.warehouseType
|
|
|
+ // })
|
|
|
+ // },
|
|
|
cancelClick() {
|
|
|
this.isShowAlert = false
|
|
|
},
|
|
@@ -168,36 +170,29 @@
|
|
|
uni.showLoading({
|
|
|
title: '正在加载'
|
|
|
})
|
|
|
- this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseViewinfo', {
|
|
|
- compId: uni.getStorageSync('pcUserInfo').compId,
|
|
|
- warehouseType: 1,
|
|
|
- warehouseName:this.warehousename
|
|
|
+ this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
|
|
|
+ id:this.warehouseId
|
|
|
}).then(res => {
|
|
|
uni.hideLoading()
|
|
|
if (res.data.data) {
|
|
|
- const results = res.data.data.warehouseViewList
|
|
|
-
|
|
|
+ const results = res.data.data.warehousePositionInfoList
|
|
|
for (let i = 0; i < results.length; i++) {
|
|
|
- if(results[i].warehouseNumViewList.length>1){
|
|
|
+ if(results[i].warehousePositionStorageInfoList&&results[i].warehousePositionStorageInfoList.length>1){
|
|
|
let _price = 0
|
|
|
- console.log(results[i].warehouseNumViewList)
|
|
|
- for (let q = 0; q < results[i].warehouseNumViewList.length; q++) {
|
|
|
- console.log(results[i].warehouseNumViewList[q])
|
|
|
- _price +=Number(results[i].warehouseNumViewList[q].storage)
|
|
|
+ for (let q = 0; q < results[i].warehousePositionStorageInfoList.length; q++) {
|
|
|
+ _price +=Number(results[i].warehousePositionStorageInfoList[q].storage)
|
|
|
}
|
|
|
_price = _price.toFixed(2)
|
|
|
- results[i].warehouseNumViewList.push({
|
|
|
+ results[i].warehousePositionStorageInfoList.push({
|
|
|
'goodsName': '合计',
|
|
|
'storage': _price
|
|
|
})
|
|
|
}
|
|
|
+ this.costList =results
|
|
|
}
|
|
|
- this.costList =results
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
makeGroupData(array, fn) {
|
|
|
const groups = {};
|