Browse Source

前端 小程序 sdy

zhongtianhaoyuan 3 years ago
parent
commit
34fc4b7c3b
3 changed files with 14 additions and 13 deletions
  1. 2 2
      config/index.js
  2. 11 10
      pageD/warehousings/warehousings.vue
  3. 1 1
      pages/task/my_task.vue

+ 2 - 2
config/index.js

@@ -1,8 +1,8 @@
 const dev = {
 	// baseUrlNew: 'http://192.168.1.122:9100/',
 	baseUrl: 'https://www.zthymaoyi.com',
-	// baseUrlNew: 'http://192.168.1.120:8090/',
-	  baseUrlNew: 'http://api.eliangeyun.com/',
+	baseUrlNew: 'http://192.168.1.120:8090/',
+	  // baseUrlNew: 'http://api.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 11 - 10
pageD/warehousings/warehousings.vue

@@ -78,8 +78,7 @@
 					<text class="tit">入库类型 </text>
 					<picker @change="ruChange" :value="ruIndex" :range="ruType" class="con-list">
 						<view >
-							{{ruIndex > -1?ruType[ruIndex]:'请选择入库类型'}} 
-							
+							 {{ruIndex > -1?ruType[ruIndex]:'请选择入库类型'}} 
 						</view>
 					</picker>
 				</view>
@@ -179,7 +178,7 @@
 					<text class="tit">品级 </text>
 					<picker @change="pinChange" :value="pinIndex" :range="pinType" class="con-list">
 						<view >
-							{{pinIndex>-1?pinType[pinIndex]:'请选择品级'}}
+							{{pinIndex > -1 ? pinType[pinIndex]:'请选择品级'}}
 						</view>
 					</picker>
 				</view>
@@ -216,10 +215,10 @@ import upload from '@/components/upload.vue';
 					contractNo: {},
 					carNo: {},
 				},
-				pinIndex: 0,
+				pinIndex: -1,
 				pinTypes: '',
 				pinType: ['一等品', '二等品', '三等品', '等外'],
-				ruIndex: -2,
+				ruIndex: -1,
 				rutypes: '',
 				warehouse:[],
 				warehouseIndex:-1,
@@ -267,9 +266,7 @@ import upload from '@/components/upload.vue';
 			onShow(){
 				this.$api.doRequest('get', '/warehouseInOutInfo/selectCompId', {contractNo:this.WarehouseInOutInfo.contractNo,warehouseType:1,}).then(res => {
 					 if(res.data.code==200){
-						 console.log("selectCompId",res.data)
 						 this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {compId:res.data.data,warehouseType:1,}).then(res => {
-							console.log("selectWarehouse",res.data)
 						 	 if(res.data.code==200){
 						 		 var arr=[]
 						 		 for(var i=0;i<res.data.data.length;i++){
@@ -279,7 +276,6 @@ import upload from '@/components/upload.vue';
 						 			 arr.push(res.data.data[i].warehouseName)
 						 		 }
 								 this.warehouse = arr
-								 console.log(arr,this.warehouseIndex)
 						 		 this.warehouselist=res.data.data
 								 for(var i=0;i<this.warehouselist.length;i++){
 								 	if(this.warehouselist[i].warehouseName==this.WarehouseInOutInfo.warehouseName){
@@ -335,8 +331,13 @@ import upload from '@/components/upload.vue';
 					if( that.WarehouseInOutInfo.warehouseInOutDetail != null){
 						that.list = that.WarehouseInOutInfo.warehouseInOutDetail
 					} 
-					this.pinIndex = this.WarehouseInOutInfo.gradeKey
-					this.ruIndex = this.WarehouseInOutInfo.inOutTypeKey 
+					if(this.WarehouseInOutInfo.gradeKey != null){
+						this.pinIndex = this.WarehouseInOutInfo.gradeKey
+					}
+					if(this.WarehouseInOutInfo.inOutTypeKey != null){
+						this.ruIndex = this.WarehouseInOutInfo.inOutTypeKey 
+					}
+					
 					this.WarehouseInOutInfo.deductionAmount = Math.abs(res.data.data.deductionAmount) 
 				})
 				.catch(res => {

+ 1 - 1
pages/task/my_task.vue

@@ -68,7 +68,7 @@
 		},
 		onShow() {
 			this.getIndexBuyData()
-			this.userInfo =  uni.getStorageSync("userInfo")
+			// this.userInfo =  uni.getStorageSync("userInfo")
 			this.warehouseInOutInfo.phone = this.userInfo.phone
 		},
 		// onLoad(options) {