Browse Source

修改收购信息

wangchao 3 years ago
parent
commit
13bfb15957

+ 27 - 29
pages/erpbusiness/acquisitionInformation.vue

@@ -11,7 +11,7 @@
 			<view class="content-item">
 				<view class="left">收购信息</view>
 				<view class='row'>
-				<textarea placeholder="请输入仓库信息" class="textarea" maxlength="2000" v-model="textareaValue"></textarea>
+				<textarea placeholder="输入收购信息,不超过2000个字" class="textarea" maxlength="2000" v-model="textareaValue"></textarea>
 				<view class="textarea-bottom">{{textareaValue?textareaValue.length:'0'}}/2000字</view>
 			</view>
 			<view class='row row_css'>
@@ -123,39 +123,13 @@
 		methods: {
 			init() {
 				let _obj = {
-					commonId: this.sgId,
+					commonId: uni.getStorageSync("userInfo").id,
 					warehouseName:uni.getStorageSync("depotAcquisition_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) {
-					case '已隐藏':
-						break;
-					case '显示中':
-
-						break;
-				}
 				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelfApp', {
 					compId: uni.getStorageSync('pcUserInfo').compId,
 				}).then(res => {
-					if (res.data.data.length != 0) {
+					if (res.data.data.length > 0) {
 						uni.hideLoading()
 						// let _showData = uni.getStorageSync("erpSelectWarehous")
 						// let _showCWData = uni.getStorageSync("erpSelectWarehousCW")
@@ -165,12 +139,36 @@
 							this.warehouseName = _storangewarehouseName
 						} else {
 							this.warehouseName = res.data.data[0].warehouseName
+							uni.setStorageSync("depotAcquisition_warehouseName", this.warehouseName)
 						}
 					} else {
 						this.warehouseList = []
 						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) {
+				// 	case '已隐藏':
+				// 		break;
+				// 	case '显示中':
+
+				// 		break;
+				// }
 			},
 			warehousechange(e) {
 				this.warehouseName = this.warehouseList[e[0]].warehouseName

+ 5 - 0
pages/erpbusiness/customer.vue

@@ -363,6 +363,10 @@
 				this.show = true
 				this.gridList = []
 				this.currentPage = 1
+				uni.showLoading({
+					title: '正在加载',
+					mask:true
+				})
 				this.getList()
 			},
 			getList() {
@@ -387,6 +391,7 @@
 				}
 				this.$api.doRequest('get', url, data).then(res => {
 					if (res.data.data) {
+							uni.hideLoading()
 						let data = res.data.data.records ? res.data.data.records : res.data.data
 						//采购信息
 						if (data.length > 0) {

+ 2 - 1
pages/erpbusiness/index.vue

@@ -14,7 +14,8 @@
 			<!-- 检斤员权限 -->
 			<!-- isShowAcquisitionInfo -->
 			<!-- 获取当前用户负责的仓库,如果无仓库隐藏收购信息 -->
-			<view class="content2" v-if="isShowAcquisitionInfo&&sgId">
+			<!-- &&sgId -->
+			<view class="content2" v-if="isShowAcquisitionInfo">
 				<view>收购信息</view>
 				<view @click="navTo('/pages/erpbusiness/acquisitionInformation?status='+status+'&id='+sgId)">{{status}}>
 				</view>

+ 1 - 1
pages/user/depotAcquisition/grainDeliveryRegistration.vue

@@ -168,7 +168,7 @@
 				warehouseId: this.warehouseId
 			}).then(res => {
 				if (res.data.code == 200) {
-					this.goodsName = res.data.data[0].goodsName
+					this.goodsName = res.data.data[0]?res.data.data[0].goodsName:''
 					this.goodsnameList = res.data.data
 				}
 			})