zxz 1 year ago
parent
commit
94ab1bb997
1 changed files with 53 additions and 20 deletions
  1. 53 20
      pages/user/contractLook/inventoryCost.vue

+ 53 - 20
pages/user/contractLook/inventoryCost.vue

@@ -21,6 +21,31 @@
 					</view>
 					</view>
 					<view class="font">{{item1.cost}}</view>
 					<view class="font">{{item1.cost}}</view>
 				</view>
 				</view>
+				<view v-show="(item1.cargoWeight && item1.cargoWeight != 0) || (item1.redemptionWeight && item1.redemptionWeight != 0)"
+					class="goods-table-content" v-for="(item1,index1) in item.goodList">
+					<view class="" style="width: 100%;">
+						<view class="" style="display: flex;width: 100%;">
+							<view v-if="item1.cargoWeight && item1.cargoWeight != 0" class="font"
+								:class="item.goodList.length>1&&index1==item.goodList.length-1?'active':''">
+								{{item1.goodsName}}(转入)
+							</view>
+							<view v-if="item1.cargoWeight && item1.cargoWeight != 0" class="font"
+								:class="item.goodList.length>1&&index1==item.goodList.length-1?'active':''">
+								{{item1.cargoWeight}}
+							</view>
+						</view>
+						<view class="" style="display: flex;padding-top: 10px;">
+							<view v-if="item1.redemptionWeight && item1.redemptionWeight != 0" class="font"
+								:class="item.goodList.length>1&&index1==item.goodList.length-1?'active':''">
+								{{item1.goodsName}}(待赎回)
+							</view>
+							<view v-if="item1.redemptionWeight && item1.redemptionWeight != 0" class="font"
+								:class="item.goodList.length>1&&index1==item.goodList.length-1?'active':''">
+								{{item1.redemptionWeight}}
+							</view>
+						</view>
+					</view>
+				</view>
 			</view>
 			</view>
 		</view>
 		</view>
 		<u-modal class="record" v-model="isShowDetailBtn" :title-style="{fontSize: '18px',fontWeight:'500'}"
 		<u-modal class="record" v-model="isShowDetailBtn" :title-style="{fontSize: '18px',fontWeight:'500'}"
@@ -43,7 +68,8 @@
 					<view class="">仓库名称</view>
 					<view class="">仓库名称</view>
 					<view>{{parameter.warehouseName}}</view>
 					<view>{{parameter.warehouseName}}</view>
 				</view>
 				</view>
-				<u-picker mode="selector" v-model="show1" @confirm='warehouseConfirm' range-key='warehouseName' :default-selector="[0]" :range="warehouseList"></u-picker>
+				<u-picker mode="selector" v-model="show1" @confirm='warehouseConfirm' range-key='warehouseName'
+					:default-selector="[0]" :range="warehouseList"></u-picker>
 			</view>
 			</view>
 		</u-modal>
 		</u-modal>
 		<u-calendar v-model="show" :mode="mode" @change="change" range-color='#22C572' btn-type='success'
 		<u-calendar v-model="show" :mode="mode" @change="change" range-color='#22C572' btn-type='success'
@@ -63,9 +89,9 @@
 		data() {
 		data() {
 			return {
 			return {
 				isShowAlert: false,
 				isShowAlert: false,
-				show1:false,
+				show1: false,
 				content: '当前登录身份已失效,请重新登录!',
 				content: '当前登录身份已失效,请重新登录!',
-				warehouseList:[],
+				warehouseList: [],
 				parameter: {
 				parameter: {
 					startDate: "",
 					startDate: "",
 					endDate: '',
 					endDate: '',
@@ -93,28 +119,28 @@
 		onLoad: function(option) {
 		onLoad: function(option) {
 			console.log(option)
 			console.log(option)
 			this.searchMonth = option.searchMonth
 			this.searchMonth = option.searchMonth
-			 this.init()
+			this.init()
 		},
 		},
 		onNavigationBarButtonTap() {
 		onNavigationBarButtonTap() {
 			this.parameter.warehouseName = this.costList[0].warehouseName
 			this.parameter.warehouseName = this.costList[0].warehouseName
-		   this.parameter.startDate = helper.getNowNumFormatDate(-1)
-		   console.log(this.parameter.startDate)
-		   this.parameter.endDate = helper.getNowFormatDate()
-		   uni.showLoading({
-		   	title: '正在加载'
-		   })
-		   this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelfApp', {
-		   	compId: uni.getStorageSync('pcUserInfo').compId,
-		   }).then(res => {
-				this.warehouseList=res.data.data
+			this.parameter.startDate = helper.getNowNumFormatDate(-1)
+			console.log(this.parameter.startDate)
+			this.parameter.endDate = helper.getNowFormatDate()
+			uni.showLoading({
+				title: '正在加载'
+			})
+			this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelfApp', {
+				compId: uni.getStorageSync('pcUserInfo').compId,
+			}).then(res => {
+				this.warehouseList = res.data.data
 				this.isShowDetailBtn = true
 				this.isShowDetailBtn = true
-		   })
+			})
 		},
 		},
 		computed: {
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		},
 		methods: {
 		methods: {
-			warehouseConfirm(e){
+			warehouseConfirm(e) {
 				console.log(e)
 				console.log(e)
 				this.parameter.warehouseName = this.warehouseList[e[0]].warehouseName
 				this.parameter.warehouseName = this.warehouseList[e[0]].warehouseName
 			},
 			},
@@ -153,8 +179,8 @@
 					title: '正在加载'
 					title: '正在加载'
 				})
 				})
 				this.$api.doRequest('post', _url, {
 				this.$api.doRequest('post', _url, {
-					startDate: this.parameter.startDate+' 00:00:00',
-					endDate: this.parameter.endDate+' 00:00:00',
+					startDate: this.parameter.startDate + ' 00:00:00',
+					endDate: this.parameter.endDate + ' 00:00:00',
 					warehouseName: this.parameter.warehouseName
 					warehouseName: this.parameter.warehouseName
 				}).then(res => {
 				}).then(res => {
 					uni.hideLoading()
 					uni.hideLoading()
@@ -181,7 +207,7 @@
 			},
 			},
 			toDetail(warehouseName) {
 			toDetail(warehouseName) {
 				// this.parameter.warehouseName = warehouseName
 				// this.parameter.warehouseName = warehouseName
-				
+
 			},
 			},
 			init() {
 			init() {
 				if (!this.hasLogin) {
 				if (!this.hasLogin) {
@@ -317,6 +343,7 @@
 
 
 			}
 			}
 
 
+
 			.font:nth-of-type(1) {
 			.font:nth-of-type(1) {
 				width: 40%;
 				width: 40%;
 			}
 			}
@@ -350,7 +377,13 @@
 				width: 30%;
 				width: 30%;
 				text-align: right;
 				text-align: right;
 			}
 			}
-
 		}
 		}
+
+		// .goods-list{
+		// 	    display: block;
+		// 	.font1{
+		// 		display: flex;
+		// 	}
+		// }
 	}
 	}
 </style>
 </style>