浏览代码

修改检斤质检仓库记忆

mxx 3 年之前
父节点
当前提交
300c988c1f

+ 9 - 7
src/views/houseSelfCollect/inspectionManagement.vue

@@ -261,6 +261,12 @@
 						this.warehouseList = []
 						let _wareHouse = sessionStorage.getItem('houseSelfCollect_house')
 						_wareHouse = JSON.parse(_wareHouse)
+						if (_wareHouse) {
+								this.cangid = _wareHouse.id
+								this.warehouseName = _wareHouse.value
+								this.warehouseNo = _wareHouse.No
+								this.warehouseCount = _wareHouse.count
+							} 
 						for (let i = 0; i < response.length; i++) {
 							this.warehouseList.push({
 								value: response[i].warehouseName,
@@ -268,13 +274,8 @@
 								count: response[i].count,
 								No: response[i].commonWarehouseNo
 							})
-							if (_wareHouse) {
-								this.cangid = _wareHouse.id
-								this.warehouseName = _wareHouse.warehouseName
-								this.warehouseNo = _wareHouse.commonWarehouseNo
-								this.warehouseCount = _wareHouse.count
-							} else {
-								if (this.cangid && this.cangid == response[i].id) {
+							if (!_wareHouse) {
+									if (this.cangid && this.cangid == response[i].id) {
 									this.warehouseName = response[i].warehouseName
 									this.warehouseCount = response[i].count
 									this.warehouseNo = response[i].commonWarehouseNo
@@ -305,6 +306,7 @@
 						console.log(response)
 						this.inspect = response.records
 						this.deptBudgetTotal = response.total
+						// this.$forceUpdate();
 					})
 			},
 			print(row) {

+ 8 - 7
src/views/houseSelfCollect/weighingManagement.vue

@@ -162,9 +162,9 @@
 						this.monitorUrl1 = this.warehouseList[i].monitorUrl1
 						this.monitorUrl2 = this.warehouseList[i].monitorUrl2
 						sessionStorage.setItem('ck', e)
+						sessionStorage.setItem('houseSelfCollect_house1', JSON.stringify(this.warehouseList[i]))
 					}
 				}
-
 				this.getList()
 			},
 			weightCheck(row, num) {
@@ -206,7 +206,7 @@
 				this.getList()
 			},
 			selectWarehouse() {
-				let _wareHouse = sessionStorage.getItem('houseSelfCollect_house')
+				let _wareHouse = sessionStorage.getItem('houseSelfCollect_house1')
 				_wareHouse = JSON.parse(_wareHouse)
 				selectWarehouseSelf({
 						compId: sessionStorage.getItem('ws-pf_compId'),
@@ -221,15 +221,16 @@
 								warehouseId: response[i].id,
 								allowEdit: response[i].allowEdit,
 								monitorUrl1: response[i].monitorUrl1,
-								monitorUrl2: response[i].monitorUrl2
+								monitorUrl2: response[i].monitorUrl2,
+								id: response[i].id,
+								warehouseNo:response[i].commonWarehouseNo
 							})
 							if (_wareHouse) {
-
 								this.cangid = _wareHouse.id
-								this.warehouseName = _wareHouse.warehouseName
-								this.common.name = _wareHouse.warehouseName
+								this.warehouseName = _wareHouse.value
+								this.common.name = _wareHouse.value
 								this.warehouseId = _wareHouse.id
-								this.warehouseNo = _wareHouse.commonWarehouseNo
+								this.warehouseNo = _wareHouse.warehouseNo
 								this.monitorUrl1 = _wareHouse.monitorUrl1
 								this.allowEdit = _wareHouse.allowEdit
 								this.monitorUrl2 = _wareHouse.monitorUrl2