ccjgmwz 3 年之前
父節點
當前提交
60d5e827f5
共有 4 個文件被更改,包括 24 次插入10 次删除
  1. 1 1
      main.js
  2. 17 7
      pageD/warehousings/warehousings.vue
  3. 1 1
      pages/task/my_task.vue
  4. 5 1
      websocket_sdk.js

+ 1 - 1
main.js

@@ -204,7 +204,7 @@ const doRequest = (method, url, data,header)=> {
                     resolve(result)
                 },
                 fail: function(e) {
-                    console.log('error in...')
+                    console.log('error in...',e)
                     // reject调用后,即可传递到调用方使用catch或者async+await同步方式进行处理逻辑
                     reject(e)
                 },

+ 17 - 7
pageD/warehousings/warehousings.vue

@@ -34,14 +34,14 @@
 					<text class="tit">毛重(吨)</text>
 					<view style="color: #ff0000; padding-left: 10rpx;">*</view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入毛重" name="input" v-model="WarehouseInOutInfo.grossWeight" @input="grossWeightInput"></input>
+						<input placeholder-style="font-size:14px" style="font-size: 14px;" placeholder="请输入毛重" name="input" v-model="WarehouseInOutInfo.grossWeight" @input="grossWeightInput"></input>
 					</view>
 				</view>
 				<view class="c-row b-b">
 					<view class="tit">皮重(吨)</view>
 					<view style="color: #ff0000; padding-left: 10rpx;">*</view>
 					<view class="con-list">
-						<input placeholder-style="font-size:14px" placeholder="请输入皮重" name="input" v-model="WarehouseInOutInfo.tare"
+						<input placeholder-style="font-size:14px" style="font-size: 14px;" placeholder="请输入皮重" name="input" v-model="WarehouseInOutInfo.tare"
 							@input="tareInput"></input>
 					</view>
 				</view>
@@ -266,7 +266,9 @@ 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++){
@@ -275,23 +277,26 @@ 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){
 								 		var id=this.warehouselist[i].id
 										this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {id:id,}).then(res => {
 											var arr=[]
-											for(var i=0;i<res.data.data.warehousePositionInfoList.length;i++){
+											for(var i=0;i<res.data.data.warehousePositionInfoList.length;i++)
+											{
+												if(res.data.data.warehousePositionInfoList[i].binNumber==this.WarehouseInOutInfo.binNumber){
+													this.warehouseIndex1=i
+												}
 												arr.push(res.data.data.warehousePositionInfoList[i].binNumber)
 											}
 											this.warehouse1=arr
 											this.warehouselist11=res.data.data
 										})
-										break;
 								 	}
 								 }
-								
-						 		 this.warehouse=arr
 						 	 }
 						 })
 					 }
@@ -306,6 +311,10 @@ import upload from '@/components/upload.vue';
 			this.WarehouseInOutInfo.warehouseName = option.warehouseName
 			this.WarehouseInOutInfo.id = option.id
 			this.WarehouseInOutInfo.carNo = option.carNo
+			this.WarehouseInOutInfo.addressUrl = option.addressUrl
+			this.WarehouseInOutInfo.binNumber = option.binNumber
+			this.WarehouseInOutInfo.inOutDate = option.inOutDate
+			debugger
 			var date=new Date()
 			var year=date.getFullYear()
 			var month=date.getMonth()
@@ -314,6 +323,7 @@ import upload from '@/components/upload.vue';
 				month="0"+(month+1)
 			}
 			this.time = year+'-'+month+"-"+date1
+			this.getList(this.WarehouseInOutInfo.id)
 		},
 		methods: {
 			getList(id1){
@@ -325,7 +335,7 @@ import upload from '@/components/upload.vue';
 						that.list = that.WarehouseInOutInfo.warehouseInOutDetail
 					} 
 					this.pinIndex = this.WarehouseInOutInfo.gradeKey
-				this.ruIndex = this.WarehouseInOutInfo.inOutTypeKey 
+					this.ruIndex = this.WarehouseInOutInfo.inOutTypeKey 
 					this.WarehouseInOutInfo.deductionAmount = Math.abs(res.data.data.deductionAmount) 
 				})
 				.catch(res => {

+ 1 - 1
pages/task/my_task.vue

@@ -200,7 +200,7 @@
 				})
 				}else{
 					uni.navigateTo({
-						url: `/pageD/warehousings/warehousings?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&startWeight=${item.startWeight}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&warehouseName=${item.warehouseName}`
+						url: `/pageD/warehousings/warehousings?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&startWeight=${item.startWeight}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&warehouseName=${item.warehouseName}&addressUrl=${item.addressUrl}&inOutDate=${item.inOutDate}&binNumber=${item.binNumber}`
 					})
 				}
 			}else if(item.taskType == "出库任务"){

+ 5 - 1
websocket_sdk.js

@@ -15,6 +15,7 @@ export default class Websocket {
         // 心跳检测频率
         this._timeout = 3000;
         this._timeoutObj = null;
+        this._timeoutObj1 = null;
         // 当前重连次数
         this._connectNum = 0;
         // 心跳检测和断线重连开关,true为启用,false为关闭
@@ -26,6 +27,7 @@ export default class Websocket {
     // 心跳重置
     _reset() {
         clearTimeout(this._timeoutObj);
+        clearTimeout(this._timeoutObj1);
         return this;
     }
     // 心跳开始
@@ -34,9 +36,11 @@ export default class Websocket {
         this._timeoutObj = setInterval(() => {
             //发送心跳
             _this.sendHeartbeatData(options);
-			_this.getTips()
 			_this.getInfo()
         }, this._timeout);
+		this._timeoutObj1 = setInterval(() => {
+			_this.getTips()
+		}, 1000*60);
     }
     // 监听websocket连接关闭
     onSocketClosed(options) {