wangchao 3 vuotta sitten
vanhempi
commit
ac523099aa

+ 34 - 13
pages/erp/improvedWrehousing/improvedWrehousing.vue

@@ -26,7 +26,7 @@
 				</view>
 				<view class="row">
 					<view class="left">暂存时间</view>
-					<view>{{item.inOutDate}}</view>
+					<view>{{item.updateDate}}</view>
 				</view>
 				<view class="row no-boder">
 					<view class="left">提交人</view>
@@ -53,7 +53,8 @@
 				warehouseList: [],
 				warehouseCWList: [],
 				dataList: [],
-				allWarehouse: []
+				allWarehouse: [],
+				showTime:''
 			}
 		},
 		onLoad() {
@@ -67,13 +68,14 @@
 			this.warehouseCWList = _data.warehouseCWList
 			this.binNumber = _data.binNumber
 			this.positionId = _data.positionId
+			this.warehouseId = _data.warehouseId
 			this.getList()
 		},
 		methods: {
 			getList() {
 				this.$api.doRequest('get', '/warehouseInOutInfo/selectWarehouseInOutInfo', {
-					positionId: helper.erpWarehouse.positionId,
-					baseId: helper.erpWarehouse.warehouseId,
+					positionId: this.positionId,
+					baseId: this.warehouseId,
 					currentPage: this.currentPage,
 					pageSize: this.pageSize,
 					inOutFlag: 2
@@ -84,10 +86,26 @@
 				})
 			},
 			warehousechange(e) {
-				 this.warehouseName = this.warehouseList[e[0]].warehouseName
+				this.warehouseName = this.warehouseList[e[0]].warehouseName
+				this.warehouseId = this.warehouseList[e[0]].id
+				this.warehouseCWList = this.warehouseList[e[0]].positionInfos
+				this.warehouseCWchange([0])
+				this.currentPage = 1
+				this.pageSize = 9999
+
 			},
 			warehouseCWchange(e) {
-				 this.binNumber = this.warehouseCWList[e[0]].binNumber
+				debugger
+				this.binNumber = this.warehouseCWList[e[0]].binNumber
+				this.warehouseId = this.warehouseCWList[e[0]].baseId
+				this.positionId = this.warehouseCWList[e[0]].id
+				this.binNumber = this.warehouseCWList[e[0]].binNumber
+				helper.erpWarehouse.positionId =  this.positionId
+				helper.erpWarehouse.warehouseId = this.warehouseId 
+				helper.erpWarehouse.binNumber = this.binNumber 
+				this.currentPage = 1
+				this.pageSize = 9999
+				this.getList()
 			},
 			goDetail(val) {
 				uni.navigateTo({
@@ -108,6 +126,7 @@
 		.left,
 		.right {
 			display: flex;
+			align-items: center;
 		}
 	}
 
@@ -117,21 +136,21 @@
 		border-radius: 10rpx;
 		background: #FFFFFF;
 	}
-	
+
 	.content2 {
 		.row {
 			display: flex;
 			justify-content: space-between;
 			border-bottom: 1px solid #EEEEEE;
 			padding: 21rpx 0;
-	
+
 			.right,
 			input {
 				font-size: 28rpx;
 				color: #333333;
 			}
 		}
-	
+
 		.row-bottom {
 			.right-bottom {
 				width: 300rpx;
@@ -139,13 +158,15 @@
 			}
 		}
 	}
-	.content2-item{
+
+	.content2-item {
 		background: white;
-		margin:0 20rpx 20rpx 20rpx;
+		margin: 0 20rpx 20rpx 20rpx;
 		padding: 10rpx;
 		border-radius: 15rpx;
 	}
-	.no-boder{
-		    border-bottom: none!important;
+
+	.no-boder {
+		border-bottom: none !important;
 	}
 </style>

+ 11 - 7
pages/erp/improvedWrehousing/improvedWrehousingDetail.vue

@@ -108,6 +108,7 @@
 			</view>
 			<view class="row row-bottom has-btn">
 				<view class="left">运费(元/吨)</view>
+				{{detailData.freight}}
 				<input @input='' v-model='detailData.freight' :disabled="isEditYF" class="right-bottom"
 					placeholder="自动获取"></input>
 				<u-button class="edit-btn" hover-class="none" @click="editYF">编辑</u-button>
@@ -261,10 +262,10 @@
 				imgUrl: []
 			}
 		},
-		onLoad(options) {
+		onLoad(options) {debugger
 			this.detailData = JSON.parse(options.data)
-			this.binNumber = helper.erpWarehouse.binNumber
-			this.warehouseName = helper.erpWarehouse.warehouseName
+			this.binNumber = this.detailData.binNumber
+			this.warehouseName = this.detailData.warehouseName
 			this.compId = helper.erpWarehouse.compId
 			if(this.detailData.addressUrl){
 				this.imgUrl.push({
@@ -278,7 +279,9 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		onShow() {
-			if (this.detailData.inOutType == '采购入库') {
+			
+			console.log('详情数据',this.detailData)
+			if (this.detailData.inOutType == '采购入库'&&this.detailData.status!='已暂存') {
 				this.detailData.freight = 0
 			}
 			if (!this.detailData.tranCarInfoList) this.detailData.tranCarInfoList = []
@@ -342,8 +345,7 @@
 			},
 			dateChange(e) {
 				console.log(e)
-				this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day
-				this.inOutDate1 = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute 
+				this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute + ":" + e.second 
 			},
 			warehousingTypePicker(e) {
 				this.detailData.inOutType = this.warehousingTypeList[e].constValue
@@ -490,7 +492,9 @@
 		.top {
 			display: flex;
 			margin-bottom: 20rpx;
-
+			border-radius: 20rpx;
+			background: white;
+			padding: 20rpx;
 			.top-left {
 				margin-right: 20rpx;
 			}

+ 17 - 11
pages/erp/warehousing/warehousing.vue

@@ -66,8 +66,7 @@
 			<view class="row">
 				<view class="left">品级</view>
 				<view @click='show3=true'>{{detailData.grade}}</view>
-				<u-picker :range="pjList" range-key="grade" @confirm='pjPicker($event)' v-model="show3"
-					mode="selector">
+				<u-picker :range="pjList" range-key="grade" @confirm='pjPicker($event)' v-model="show3" mode="selector">
 				</u-picker>
 			</view>
 			<view class="row">
@@ -100,7 +99,7 @@
 			</view>
 			<view class="row row-bottom has-btn">
 				<view class="left">成本(元/吨)</view>
-				<input v-if="detailData.inOutType=='采购入库'" v-model='detailData.cost' class="right-bottom"
+				<input v-if="detailData.inOutType=='采购入库'" v-model='detailData.unitContractPrice' class="right-bottom"
 					placeholder="自动获取" :disabled="isEditCB"></input>
 				<input v-if="detailData.inOutType!='采购入库'" v-model='detailData.cost' class="right-bottom"
 					placeholder="自动获取" :disabled="isEditCB"></input>
@@ -191,9 +190,9 @@
 					year: true,
 					month: true,
 					day: true,
-					hour: true,
-					minute: true,
-					second: true
+					// hour: true,
+					// minute: true,
+					// second: true
 				},
 				isEditCB: 'false',
 				isEditYF: 'false',
@@ -274,7 +273,10 @@
 			this.detailData.goodsName = _data.goodsName;
 			this.detailData.contractNo = _data.contractNo;
 			this.detailData.goodsNameKey = _data.goodsNameKey;
-			this.detailData.cost = _data.unitContractPrice
+			this.detailData.unitContractPrice = _data.unitContractPrice
+			let _day = new Date();
+			_day.setTime(_day.getTime());
+			this.detailData.inOutDate = _day.getFullYear() + "-" + (_day.getMonth() + 1) + "-" + _day.getDate();
 			if (_data.inOutType == '采购入库') {
 				this.detailData.freight = 0
 			}
@@ -337,7 +339,7 @@
 			pjPicker(e) {
 				console.log(e)
 				this.detailData.gradeKey = e[0]
-				    this.detailData.grade = this.pjList[e].grade
+				this.detailData.grade = this.pjList[e].grade
 			},
 			handlerPicker(e) {
 				console.log(e)
@@ -345,8 +347,8 @@
 			},
 			dateChange(e) {
 				console.log(e)
-				this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute + ":" + e.second 
-				// this.inOutDate1 = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute 
+				this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day
+				this.inOutDate1 = e.year + "-" + e.month + "-" + e.day + "-" + e.hour + "-" + e.minute + "-" + e.second
 			},
 			warehousingTypePicker(e) {
 				this.detailData.inOutType = this.warehousingTypeList[e].constValue
@@ -419,6 +421,7 @@
 				this.isEditYF = false
 			},
 			submit(num) {
+				debugger
 				if (isNaN(this.detailData.grossWeight) ||
 					(String(this.detailData.grossWeight).indexOf('.') != -1 &&
 						String(this.detailData.grossWeight).length -
@@ -445,7 +448,7 @@
 				let title = ""
 				if (num == 1) {
 					this.detailData.statusFlag = 1
-					// this.detailData.inOutDate = this.inOutDate1
+					this.detailData.inOutDate = this.inOutDate1
 					title = "暂存成功"
 				} else if (num == 2) {
 					this.detailData.statusFlag = 3
@@ -491,6 +494,9 @@
 		padding: 20rpx 20rpx 140rpx 20rpx;
 
 		.top {
+			border-radius: 20rpx;
+			background: white;
+			padding: 20rpx;
 			display: flex;
 			margin-bottom: 20rpx;
 			align-items: center;