浏览代码

前端 缺陷更新 sdy

zhongtianhaoyuan 3 年之前
父节点
当前提交
1f99eda191

+ 32 - 13
pages/erp/deliveryfeedback/details.vue

@@ -157,13 +157,16 @@
 				</view>
 				<view class="row">
 					<view class="left">磅单</view>
-					<view v-if="item.status == '已装车' || item.status == '已送达'">
-						<image v-if="item.loadPoundImg"  @click='shadeshow(item.loadPoundImg)' style='width:100px;height:100px;' :src="item.loadPoundImg" mode=""></image>
-						<view v-else>暂无图片</view>
+					<view v-if="item.status == '已装车' || item.status == '已送达'" v-for="(items,count) in item.imgUrl">
+						<view class="pound_list1">
+							<image v-if="items.url"  @click='shadeshow(item.loadPoundImg)' style='width:100px;height:100px;margin: 0rpx;' :src="items.url" mode=""></image>
+						     <view v-else>暂无图片</view>
+						</view>
+						
 					</view>
-					<view v-else>
-						<image v-if="item.loadPoundImg"  @click='shadeshow(item.loadPoundImg)' style='width:100px;height:100px;' :src="item.loadPoundImg" mode=""></image>
-						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl"
+					<view v-else class="pound_list">
+						<!-- <image v-if="item.loadPoundImg"  @click='shadeshow(item.loadPoundImg)' style='width:100px;height:100px;' :src="item.loadPoundImg" mode=""></image> -->
+						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="item.imgUrl"
 							:size-type="['compressed']" :imgIndex='index' @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
 							@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
 					</view>
@@ -222,8 +225,8 @@
 					<view v-if="item.loadPoundImg">
 						<image style='width:100px;height:100px;' @click='shadeshow(item.loadPoundImg)' :src="item.loadPoundImg" mode=""></image>
 					</view>
-					<view v-else>
-						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl"
+					<view v-else class="pound_list">
+						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="item.imgUrl"
 							:size-type="['compressed']" :imgIndex='index' @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
 							@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
 					</view>
@@ -367,7 +370,12 @@
 				imgUrl:[],
 				unloadPoundImg:'',
 				action: this.$uploadUrl,
-				freightspace:[],
+				freightspace:[
+					{
+						imgUrl:[],
+					}
+					
+				],
 				feedbackFlag:1,
 				detailData:{},
 				allWarehouse: [],
@@ -561,7 +569,6 @@
 			},
 			finishedgoods(){
 				var that = this
-				
 				if(this.detailData.tranType=='火运'){
 					uni.showModal({
 						content: "完货操作后,装车信息不可修改,是否确定完货?",
@@ -812,15 +819,21 @@
 								 if(res.data.data.tranCarInfoList[0].driver){
 									this.detailData.driver = res.data.data.tranCarInfoList[0].driver
 								}
-								for (var i = 0; i < res.data.data.tranCarInfoList.length; i++) {
-									res.data.data.tranCarInfoList[i].show2=false
-								}
 								this.detailData.driverPhone =res.data.data.tranCarInfoList[0].driverPhone
 								this.$set(this.detailData,'sendDateStart',res.data.data.tranCarInfoList[0].sendDateStart)
 								this.detailData.receiveDateEnd =
 								            res.data.data.tranCarInfoList[0].receiveDateEnd
 								this.detailData.carModel = res.data.data.tranCarInfoList[0].carModel
 								this.freightspace=res.data.data.tranCarInfoList
+								for (var i = 0; i < res.data.data.tranCarInfoList.length; i++) {
+									this.imgUrl = []
+									res.data.data.tranCarInfoList[i].show2=false
+									let imgs = res.data.data.tranCarInfoList[i].loadPoundImg.split(",")
+									for(let j = 0 ; j < imgs.length ; j++){
+										this.imgUrl.push({url:imgs[j]})
+									}
+									this.freightspace[i].imgUrl = this.imgUrl
+								}
 							}
 						}else if(res.data.data.tranType=='汽运'){
 							for (var i = 0; i < res.data.data.tranCarInfoList.length; i++) {
@@ -1036,4 +1049,10 @@
 	   width:100%;height:100%;
 	   z-index:10000;
 	}
+	.pound_list{
+		width: 452rpx;
+		display: flex;
+		justify-content: flex-end;
+		text-align: right;
+	}
 </style>

+ 2 - 2
pages/erp/deliveryfeedback/list.vue

@@ -36,9 +36,9 @@
 				</view>
 			</view>
 		</view>
-		<view v-show="isContent">
+		<!-- <view v-show="isContent">
 			<uni-load-more :status="loadStatus"></uni-load-more>
-		</view>
+		</view> -->
 	</view>
 </template>
 

+ 44 - 21
pages/erp/receivingfeedback/details.vue

@@ -153,7 +153,7 @@
 				</view>
 				<view class="row">
 					<view class="left">卸车净重</view>
-					<view v-if="item.status == '装车' || item.status == '已送达'">{{item.unloadNetWeight}}</view>
+					<view v-if="item.status == '装车' || item.status == '已送达'">{{item.unloadNetWeight}}</view>
 					<view style='text-align:right;' v-else>
 						<input  v-model='item.unloadNetWeight' class="right-bottom"
 					placeholder="输入毛重"></input>
@@ -161,11 +161,11 @@
 				</view>
 				<view class="row">
 					<view class="left">磅单</view>
-					<view v-if="item.status == '装车' || item.status == '已送达'">
+					<view v-if="item.status == '装车' || item.status == '已送达'">
 						<image v-if="item.unloadPoundImg" @click='shadeshow(item.unloadPoundImg)' style='width:100px;height:100px;' :src="item.unloadPoundImg" mode=""></image>
 						<view v-else>暂无图片</view>
 					</view>
-					<view v-else>
+					<view v-else class="pound_list">
 						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl"
 							:size-type="['compressed']" :imgIndex='index' @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
 							@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
@@ -174,7 +174,7 @@
 				<view class="row">
 					<view class="left">卸车日期</view>
 					<view>
-						<view v-if="item.status == '装车' || item.status == '已送达'">{{item.unloadingDate}}</view>
+						<view v-if="item.status == '装车' || item.status == '已送达'">{{item.unloadingDate}}</view>
 						<view v-else @click='train(index)'>{{item.unloadingDate?item.unloadingDate:'请选择日期'}}</view>
 						<u-picker v-model="item.show2" mode="time"  @cancel='datecancel()' @confirm='dateChange1($event,item)' :params="params">
 						</u-picker>
@@ -232,7 +232,7 @@
 						<image v-if="item.unloadPoundImg" @click='shadeshow(item.unloadPoundImg)' style='width:100px;height:100px;' :src="item.unloadPoundImg" mode=""></image>
 						<view v-else>暂无图片</view>
 					</view>
-					<view v-else>
+					<view v-else class="pound_list">
 						<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9" :file-list="imgUrl"
 							:size-type="['compressed']" :imgIndex='index' @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
 							@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
@@ -415,7 +415,7 @@
 				this.url=url
 			},
 			datecancel(){
-				this.freightspace[this.index].show2=true
+				this.freightspace[this.index].show2 = true
 				this.$forceUpdate();
 			},
 			submit(index,status){
@@ -559,7 +559,7 @@
 							that.$api.msg('保存成功')
 							that.detailData = {}
 							that.freightspace = {}
-							uni.navigateBack({})
+								uni.navigateBack()
 						}
 					})
 				}
@@ -600,7 +600,10 @@
 										that.$api.msg('提交成功')
 										that.detailData = {}
 										that.freightspace = {}
-										uni.navigateBack({})
+										setTimeout(function(){
+											uni.navigateBack()
+										},1000)
+										
 									}
 								})
 							}
@@ -619,7 +622,10 @@
 										that.$api.msg('提交成功')
 										that.detailData = {}
 										that.freightspace = {}
-										uni.navigateBack({})
+										setTimeout(function(){
+											uni.navigateBack()
+										},1000)
+										
 									}
 								})
 							}
@@ -638,7 +644,9 @@
 										that.$api.msg('提交成功')
 										that.detailData = {}
 										that.freightspace = {}
-										uni.navigateBack({})
+										setTimeout(function(){
+											uni.navigateBack()
+										},1000)
 									}
 								})
 							}
@@ -698,9 +706,10 @@
 										that.$api.msg('提交成功')
 										that.detailData = {}
 										that.freightspace = {}
-										uni.navigateBack({
-											
-										})
+										setTimeout(function(){
+											uni.navigateBack()
+										},1000)
+										
 									}
 								})
 							}
@@ -732,9 +741,10 @@
 										that.$api.msg('提交成功')
 										that.detailData = {}
 										that.freightspace = {}
-										uni.navigateBack({
-											
-										})
+										setTimeout(function(){
+											uni.navigateBack()
+										},1000)
+										
 									}
 								})
 							}
@@ -772,7 +782,10 @@
 										that.$api.msg('提交成功')
 										that.detailData = {}
 										that.freightspace = {}
-										uni.navigateBack({})
+										setTimeout(function(){
+											uni.navigateBack()
+										},1000)
+										
 									}
 								})
 							}
@@ -804,9 +817,9 @@
 						}else if(res.data.data.tranType=='汽运'){
 							for (var i = 0; i < res.data.data.tranCarInfoList.length; i++) {
 								res.data.data.tranCarInfoList[i].show2=false
+									this.imgUrl.push({url:res.data.data.tranCarInfoList[i].unloadPoundImg.split(",")[i]})
 							}
 							this.freightspace=res.data.data.tranCarInfoList
-							
 						}else if(res.data.data.tranType=='船运'){
 							if (res.data.data.tranCarInfoList.length > 0) {
 								for (var i = 0; i < res.data.data.tranCarInfoList.length; i++) {
@@ -877,8 +890,8 @@
 			},
 			train(index){
 				console.log(index)
-				
-				this.freightspace[index].show2=true
+				// debugger
+				this.freightspace[index].show2 = true
 				this.$forceUpdate();
 				this.index=index
 			},
@@ -987,9 +1000,19 @@
 	
 		.left {
 			margin-right: 20px;
+			width: 300rpx;
 		}
 	}
-	
+	// .left {
+	// 	margin-right: 20px;
+	// 	width: 300rpx;
+	// }
+	.pound_list{
+		width: 452rpx;
+		display: flex;
+		justify-content: flex-end;
+		text-align: right;
+	}
 	.submit {
 		width: 40%;
 		background: #22C572;

+ 2 - 2
pages/erp/receivingfeedback/list.vue

@@ -36,9 +36,9 @@
 				</view>
 			</view>
 		</view>
-		<view v-show="isContent">
+		<!-- <view v-show="isContent">
 			<uni-load-more :status="loadStatus"></uni-load-more>
-		</view>
+		</view> -->
 	</view>
 </template>