zxz 1 tahun lalu
induk
melakukan
94ab1bb997
1 mengubah file dengan 53 tambahan dan 20 penghapusan
  1. 53 20
      pages/user/contractLook/inventoryCost.vue

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

@@ -21,6 +21,31 @@
 					</view>
 					<view class="font">{{item1.cost}}</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>
 		<u-modal class="record" v-model="isShowDetailBtn" :title-style="{fontSize: '18px',fontWeight:'500'}"
@@ -43,7 +68,8 @@
 					<view class="">仓库名称</view>
 					<view>{{parameter.warehouseName}}</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>
 		</u-modal>
 		<u-calendar v-model="show" :mode="mode" @change="change" range-color='#22C572' btn-type='success'
@@ -63,9 +89,9 @@
 		data() {
 			return {
 				isShowAlert: false,
-				show1:false,
+				show1: false,
 				content: '当前登录身份已失效,请重新登录!',
-				warehouseList:[],
+				warehouseList: [],
 				parameter: {
 					startDate: "",
 					endDate: '',
@@ -93,28 +119,28 @@
 		onLoad: function(option) {
 			console.log(option)
 			this.searchMonth = option.searchMonth
-			 this.init()
+			this.init()
 		},
 		onNavigationBarButtonTap() {
 			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
-		   })
+			})
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
-			warehouseConfirm(e){
+			warehouseConfirm(e) {
 				console.log(e)
 				this.parameter.warehouseName = this.warehouseList[e[0]].warehouseName
 			},
@@ -153,8 +179,8 @@
 					title: '正在加载'
 				})
 				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
 				}).then(res => {
 					uni.hideLoading()
@@ -181,7 +207,7 @@
 			},
 			toDetail(warehouseName) {
 				// this.parameter.warehouseName = warehouseName
-				
+
 			},
 			init() {
 				if (!this.hasLogin) {
@@ -317,6 +343,7 @@
 
 			}
 
+
 			.font:nth-of-type(1) {
 				width: 40%;
 			}
@@ -350,7 +377,13 @@
 				width: 30%;
 				text-align: right;
 			}
-
 		}
+
+		// .goods-list{
+		// 	    display: block;
+		// 	.font1{
+		// 		display: flex;
+		// 	}
+		// }
 	}
 </style>