gjy 2 rokov pred
rodič
commit
d3cf535e45
2 zmenil súbory, kde vykonal 25 pridanie a 24 odobranie
  1. 2 2
      config/index.js
  2. 23 22
      pages/erp/exWarehousing/exWarehousing.vue

+ 2 - 2
config/index.js

@@ -8,9 +8,9 @@ const dev = {
 	// baseUrlNew: 'http://192.168.110.82:8099/',
 	 // baseUrlNew: 'http://192.168.110.82:8090/',
 	// baseUrlNew: 'http://192.168.110.202:8090/',
-	baseUrlNew: 'http://192.168.110.138:8090/',
+	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// 上传图片的
-	// baseUrlNew: 'https://api2.eliangeyun.com/',
+	baseUrlNew: 'https://api2.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 23 - 22
pages/erp/exWarehousing/exWarehousing.vue

@@ -503,37 +503,35 @@
 							this.detailData.inOutTypeKey = 6
 						}
 					}
-					//查询所有的合同  进行获取车牌号
-					this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
-						flag: 5,
-						compId: helper.erpWarehouse.compId,
+					this.$api.doRequest('get', '/contractManagementInfo/getOutContract', {
+						contractNo:this.detailData.contractNo,compId:uni.getStorageSync('pcUserInfo').compId
 					}).then(res => {
+
 						if (res.data.code == 200) {
 							this.contractList = res.data.data
-							for (let i = 0; i < res.data.data.length; i++) {
 								// "MYCGYMHLJ2021102401"
-								if (res.data.data[i].contractNo == this.detailData.contractNo) {
 									if (this.detailData.inOutType == '销售出库') {
-										this.detailData.tips = '买方' + res.data.data[i].buyer
+										this.detailData.tips = '买方' + res.data.data.buyer
 									} else if (this.detailData.inOutType == '移库出库') {
 										this.detailData.tips = '入货库' + this.inOutNoList[0].receiveWarehouse
 									}
-									this.contractType = res.data.data[i].contractType //获取合同类型   用于判断输入车牌号
+									if(this.detailData.inOutType != '移库出库'){
+										this.contractType = res.data.data.contractType //获取合同类型   用于判断输入车牌号
+									}
+									
 									//如果查到该合同
 									// res.data.data[i].deliverType  = !res.data.data[i].deliverType?'1':res.data.data[i].deliverType  
-									if (res.data.data[i].deliverType == '1') { //判断自运1,他运2合同
+									if (res.data.data.deliverType == '1') { //判断自运1,他运2合同
 										that.showCar = true
 									} else {
 										that.showCar = false
 									}
-									if (res.data.data[i].tranCarInfoList) {
-										for(var num = 0 ; num < res.data.data[i].tranCarInfoList.length; num++){
-										   res.data.data[i].tranCarInfoList[num].carNo1 = res.data.data[i].tranCarInfoList[num].carNo + '('+res.data.data[i].tranCarInfoList[num].tranCarNo+')'
+									if (res.data.data.tranCarInfoList) {
+										for(var num = 0 ; num < res.data.data.tranCarInfoList.length; num++){
+										   res.data.data.tranCarInfoList[num].carNo1 = res.data.data.tranCarInfoList[num].carNo + '('+res.data.data[i].tranCarInfoList[num].tranCarNo+')'
 										}
-										this.carList = res.data.data[i].tranCarInfoList //车牌号下拉列表
+										this.carList = res.data.data.tranCarInfoList //车牌号下拉列表
 									}
-								}
-							}
 							uni.hideLoading()
 						}
 					})
@@ -552,6 +550,7 @@
 				// })
 			},
 			inOutChange(e) {
+				console.log(e)
 				this.detailData.inOutTaskNo = this.inOutNoList[e[0]].inOutTaskNo
 				this.detailData.inOutType  = this.inOutNoList[e[0]].inOutType
 				// this.contractType = this.inOutNoList[e[0]].contractType //获取合同类型   用于判断输入车牌号
@@ -561,21 +560,23 @@
 				} else {
 					this.detailData.contractNo = this.inOutNoList[e[0]].moveTaskNo
 				}
-				for(let i = 0 ; i<this.contractList.length ; i++){
-					if (this.contractList[i].contractNo == this.detailData.contractNo) {
-						this.contractType = this.contractList[i].contractType //获取合同类型   用于判断输入车牌号
+				this.$api.doRequest('get', '/contractManagementInfo/getOutContract', {
+					contractNo:this.detailData.contractNo,compId:uni.getStorageSync('pcUserInfo').compId
+				}).then(res => {
+					this.contractList=res.data.data
+					if(this.detailData.inOutType != '移库出库'){
+						this.contractType = this.contractList.contractType //获取合同类型   用于判断输入车牌号
 					}
-					
-					if (this.contractList[i].deliverType == '1') { //判断自运1,他运2合同
+					if (this.contractList.deliverType == '1') { //判断自运1,他运2合同
 						this.showCar = true
 					} else {
 						this.showCar = false
 					}
-				}
+				})
 				this.detailData.goodsName = this.inOutNoList[e[0]].goodsName
 				this.detailData.goodsNameKey = this.inOutNoList[e[0]].goodsNameKey
 				this.detailData.grade = this.inOutNoList[e[0]].grade
-				this.detailData.inOutType = this.inOutNoList[e[0]].inOutType
+				// this.detailData.inOutType = this.inOutNoList[e[0]].inOutType
 				this.weightbills.goodsName = this.inOutNoList[e[0]].goodsName
 				if (this.detailData.inOutType == '销售出库') {
 					this.weightbills.buyer = this.inOutNoList[e[0]].buyer