zhangyuewww 3 years ago
parent
commit
eed0a237e2
1 changed files with 20 additions and 20 deletions
  1. 20 20
      pages/erpbusiness/acquisitionInformation.vue

+ 20 - 20
pages/erpbusiness/acquisitionInformation.vue

@@ -125,10 +125,7 @@
 		},
 		},
 		methods: {
 		methods: {
 			init() {
 			init() {
-				let _obj = {
-					commonId: uni.getStorageSync("userInfo").id,
-					warehouseName:uni.getStorageSync("depotAcquisition_warehouseName")
-				}
+				var that = this
 				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelfApp', {
 				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelfApp', {
 					compId: uni.getStorageSync('pcUserInfo').compId,
 					compId: uni.getStorageSync('pcUserInfo').compId,
 				}).then(res => {
 				}).then(res => {
@@ -144,27 +141,30 @@
 							this.warehouseName = res.data.data[0].warehouseName
 							this.warehouseName = res.data.data[0].warehouseName
 							uni.setStorageSync("depotAcquisition_warehouseName", this.warehouseName)
 							uni.setStorageSync("depotAcquisition_warehouseName", this.warehouseName)
 						}
 						}
+						that.$api.doRequest('get', '/acquisitionInfo/getInfo', {
+					commonId: uni.getStorageSync("userInfo").id,
+					warehouseName:uni.getStorageSync("depotAcquisition_warehouseName")
+				}).then(res1 => {
+							if (res1.data.code == 200) {
+								if (res1.data.data) {
+									that.isEdit = true
+									that.value = res1.data.data.checkFlag == '0' ? false : true
+									console.log(that.value)
+									that.warehouseName = res1.data.data.warehouseName
+									that.textareaValue = res1.data.data.acquisitionInformation
+									that.id = res1.data.data.id
+								} else {
+									that.textareaValue = ''
+									that.isEdit = false
+									that.value = false
+								}
+							}
+						})
 					} else {
 					} else {
 						this.warehouseList = []
 						this.warehouseList = []
 						this.warehouseName = '暂无仓库'
 						this.warehouseName = '暂无仓库'
 					}
 					}
 				})
 				})
-				this.$api.doRequest('get', '/acquisitionInfo/getInfo', _obj).then(res => {
-					if (res.data.code == 200) {
-						if (res.data.data) {
-							this.isEdit = true
-							this.value = res.data.data.checkFlag == '0' ? false : true
-							console.log(this.value)
-							this.warehouseName = res.data.data.warehouseName
-							this.textareaValue = res.data.data.acquisitionInformation
-							this.id = res.data.data.id
-						} else {
-							this.textareaValue = ''
-							this.isEdit = false
-							this.value = false
-						}
-					}
-				})
 				// switch (this.status) {
 				// switch (this.status) {
 				// 	case '已隐藏':
 				// 	case '已隐藏':
 				// 		break;
 				// 		break;