Browse Source

前端小程序 调整选择合同 sdy

zhongtianhaoyuan 3 năm trước cách đây
mục cha
commit
c30785fb49

+ 21 - 14
pages/erp/index.vue

@@ -127,7 +127,6 @@ import helper from '@/common/helper.js';
 		},
 
 		onLoad() {
-			this.init()
 		},
 		// #ifndef MP
 		onNavigationBarButtonTap(e) {
@@ -175,19 +174,22 @@ import helper from '@/common/helper.js';
 			})
 			this.$api.doRequest('get', '/openServiceInfo/selectCommonCompany',{
 				phone:this.userInfo.phone
-			}).then(res => {debugger
+			}).then(res => {
 				if (res.data.code == 200) {
-					debugger
 					if(res.data.data.length==0){
 						this.isShowAlert = true
+					}else{
+						this.isShowAlert = false
 					}
 					this.compList = res.data.data
 					this.compName = res.data.data[0].compName
+					this.init(res.data.data[0].compId)
 				}
 			})
 		},
 		methods: {
-			goOpenService(){debugger
+			getCompWarehouse(){},
+			goOpenService(){
 				if (!this.hasLogin) {
 					url = '/pages/public/login';
 				}
@@ -231,7 +233,6 @@ import helper from '@/common/helper.js';
 							warehouseName:this.warehouseName,
 							binNumber:this.binNumber,
 							compId:this.compId,
-							agent:this.agent,
 							warehouseId:this.warehouseId,
 							baseId:this.baseId
 						}
@@ -243,17 +244,17 @@ import helper from '@/common/helper.js';
 			},
 			confirmWarehouse() {},
 			confirmPositon() {},
-			compChange(){},
-			init() {
+			compChange(e){debugger
+				this.compName = this.compList[e[0]].compName
+				this.init(this.compList[e[0]].compId)
+			},
+			init(compId) {
 				console.log(this.userInfo)
 				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf', {
-					compId: '',
-				}).then(res => {
-					if (res.data.data) {
+					compId: compId,
+				}).then(res => {debugger
+					if (res.data.data.length!=0) {
 						console.log('res',res.data.data)
-						if (res.data.data.length == 0) {
-							this.isShowAlert = true
-						} else {
 							this.warehouseName = res.data.data[0].warehouseName
 							this.warehouseList = res.data.data;
 							this.compId = res.data.data[0].compId
@@ -264,7 +265,13 @@ import helper from '@/common/helper.js';
 							this.baseId = res.data.data[0].positionInfos[0].baseId
 							console.log('this.warehouseCWList',this.warehouseCWList)
 							// this.makeBinNumber()
-						}
+						
+					}
+					else{
+						this.warehouseList=[]
+						this.warehouseCWList = []
+						this.warehouseName='暂无仓库'
+						this.binNumber='暂无'
 					}
 				})
 			},

+ 3 - 3
pages/erp/warehousing/selectContractNo.vue

@@ -48,7 +48,7 @@
 			this.newSelectList =  uni.getStorageSync('erpContractNoList');
 		},
 		onLoad(options) {
-			this.compId = options.compId
+			this.compId = helper.erpWarehouse.compId 
 			console.log(helper.selectContractNo); 
 			this.getContractNoList()
 		},
@@ -81,7 +81,7 @@
 			},
 			getContractNoList() {
 				this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
-					compId: helper.erpWarehouse.compId,
+					compId: this.compId,
 					flag: 7,
 				}).then(res => {
 					if (res.data.code == 200) {
@@ -91,7 +91,7 @@
 					}
 				})
 				this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
-					compId: helper.erpWarehouse.compId,
+					compId: this.compId,
 					flag: 6,
 				}).then(res => {
 					if (res.data.code == 200) {

+ 2 - 1
pages/erp/warehousing/warehousing.vue

@@ -32,7 +32,7 @@
 			</view>
 			<view class="row row-bottom">
 				<view class="left">扣重(吨)</view>
-				<input @input='calculate' v-model='detailData.deductionWeight' class="right-bottom" placeholder="0"></input>
+				<input @input='calculate' v-model='detailData.deductionWeight' class="right-bottom" placeholder="输入扣重"></input>
 			</view>
 			<view class="row row-bottom">
 				<view class="left">净重(吨)</view>
@@ -235,6 +235,7 @@
 					grade:"一等品",
 					agent:'请选择经办人',
 					inOutType:'请选择入库类型',
+					deductionWeight:0,
 					qualityInspectionManagement: {}
 				}
 			}