achao 2 سال پیش
والد
کامیت
53a3751b5d
2فایلهای تغییر یافته به همراه90 افزوده شده و 57 حذف شده
  1. 28 26
      pages/cargoTerminal/cargoTerminal.vue
  2. 62 31
      pages/cargoTerminal/publishSource.vue

+ 28 - 26
pages/cargoTerminal/cargoTerminal.vue

@@ -15,7 +15,7 @@
 			class="mescroll">
 			<view class="list-content" @click="toDetail(item.id)" v-for="item in goodsList">
 				<view class="list-item">
-					<view class="xj"  v-if="item.status=='已下架'">
+					<view class="xj" v-if="item.status=='已下架'">
 						已下架
 					</view>
 					<view class="row1 row">
@@ -173,32 +173,30 @@
 				this.show = true
 			},
 			confirmRemove2() {
-				uni.showLoading({
-					title: "加载中"
-				})
 				this.$request.baseRequest('post', '/hyReleaseGoodsInfo/deleteTask', this.selectObj).then(res => {
 						uni.hideLoading()
+						this.show2 = false
 						uni.showToast({
 							title: "货源删除成功!",
-							icon:'none'
+							icon: 'none'
 						})
-						this.show2 = true
-						this.mescroll.resetUpScroll()
+						setTimeout(() => {
+							that.mescroll.resetUpScroll()
+						}, 1000)
 					})
 					.catch(res => {});
 			},
 			confirmRemove1() {
-				uni.showLoading({
-					title: "加载中"
-				})
 				this.selectObj.status = '已下架'
 				this.$request.baseRequest('post', '/hyReleaseGoodsInfo/api/editTask', this.selectObj).then(res => {
+						this.show1 = false
 						uni.showToast({
 							title: "货源已下架",
-							icon:'none'
+							icon: 'none'
 						})
-						this.show1 = false
-						that.mescroll.resetUpScroll()
+						setTimeout(() => {
+							that.mescroll.resetUpScroll()
+						}, 1000)
 					})
 					.catch(res => {
 						uni.hideLoading()
@@ -206,19 +204,17 @@
 					});
 			},
 			confirmRemove() {
-				uni.showLoading({
-					title: "加载中",
-					icon:'none'
-				})
 				this.selectObj.oftenFlag = 0
 				this.$request.baseRequest('post', '/hyReleaseGoodsInfo/api/editTask', this.selectObj).then(res => {
 						uni.hideLoading()
 						this.show = false
 						uni.showToast({
 							title: "成功移除常发货源!",
-							icon:'none'
+							icon: 'none'
 						})
-						this.mescroll.resetUpScroll()
+						setTimeout(() => {
+							that.mescroll.resetUpScroll()
+						}, 1000)
 					})
 					.catch(res => {});
 			},
@@ -226,13 +222,16 @@
 				uni.showLoading({
 					title: "加载中"
 				})
+				val.oftenFlag = 1
 				this.$request.baseRequest('post', '/hyReleaseGoodsInfo/api/editTask', val).then(res => {
 						uni.hideLoading()
 						uni.showToast({
 							title: "已存为常发货源!",
-							icon:'none'
+							icon: 'none'
 						})
-						this.mescroll.resetUpScroll()
+						setTimeout(() => {
+							that.mescroll.resetUpScroll()
+						}, 1000)
 					})
 					.catch(res => {});
 			},
@@ -244,9 +243,11 @@
 					this.$request.baseRequest('post', '/hyReleaseGoodsInfo/api/editTask', val).then(res => {
 							uni.showToast({
 								title: "货源已上架",
-								icon:'none'
+								icon: 'none'
 							})
-							that.mescroll.resetUpScroll()
+							setTimeout(() => {
+								that.mescroll.resetUpScroll()
+							}, 1000)
 						})
 						.catch(res => {
 							uni.hideLoading()
@@ -359,14 +360,15 @@
 			border-radius: 10rpx;
 			transform: rotate(40deg);
 			background-color: rgba(255, 255, 255, 0.6);
-			
+
 		}
 
 		.row2 {
-			.left{
-				color:rgb(255, 134, 0);
+			.left {
+				color: rgb(255, 134, 0);
 				font-weight: 700;
 			}
+
 			.right {
 				color: rgb(153, 153, 153)
 			}

+ 62 - 31
pages/cargoTerminal/publishSource.vue

@@ -91,7 +91,7 @@
 		<view class="content3">
 			<view class="row" @click="isShowPopup3=true">
 				<view class="left">货站信息</view>
-				<view class="right flex">
+				<view class="right flex row-ellipsis">
 					{{dataObj.contacts?dataObj.contacts+'、'+dataObj.contactsPhone+'、'+dataObj.freightStationName:"完善货站信息"}}
 					<u-icon name="arrow-right" size="20"></u-icon>
 				</view>
@@ -121,22 +121,18 @@
 				<u--textarea v-model="dataObj.remark" placeholder="请输入内容" :count='true' maxlength='500'>
 				</u--textarea>
 			</view>
-			<!-- <view class="flex">
-				<u-button :type="item.type" v-for="(item,index) in remarkList"
-					@click="remarkBtnChange(item,index)">{{item.name}}</u-button>
-			</view> -->
-		<!-- 	<view class="cartype-item" style="font-size: 24rpx;" :class="item.checked?'active':''"
+			<view class="cartype-item" style="font-size: 24rpx;" :class="item.checked?'active':''"
 				v-for="(item,index) in remarkList" @click="selectRemarkType(item,index)">
 				<view class="">
 					{{item.name}}
 				</view>
-			</view> -->
+			</view>
 		</view>
 		<view class="content5">
 			<view class="row">
 				<view class="left">货站信息费</view>
-				<view class="right"><input type="number" value="" placeholder="输入信息费金额" class="input"
-						v-model="dataObj.stationFee" /></view>元/吨
+				<view class="right flex"><input type="number" value="" placeholder="输入信息费金额" class="input"
+						v-model="dataObj.stationFee" /><text style="width: 100rpx;">元/吨</text></view>
 			</view>
 		</view>
 		<view class="">
@@ -278,7 +274,7 @@
 						</picker-view-column>
 					</picker-view>
 				</view>
-				<view class="submit" @click="dateInfoSubmit"  v-if="isCanBeSubmit">完成</view>
+				<view class="submit" @click="dateInfoSubmit" v-if="isCanBeSubmit">完成</view>
 				<view class="fa-submit" v-if="!isCanBeSubmit">
 					完成
 				</view>
@@ -304,7 +300,7 @@
 	export default {
 		data() {
 			return {
-				isCanBeSubmit:true,
+				isCanBeSubmit: true,
 				isEdit: false,
 				isCopy: false,
 				hoursList: [
@@ -378,7 +374,7 @@
 				carTypeCheckList: [],
 				carLengthList: [{
 						name: '不限',
-						checked: true
+						checked: false
 					},
 					{
 						name: '2',
@@ -601,8 +597,8 @@
 				let _faddress = uni.getStorageSync('storage_faddress');
 				let _saddress = uni.getStorageSync('storage_saddress');
 				if (_faddress) {
-					this.dataObj.sendCity = _faddress.city
-					this.dataObj.sendArea = _faddress.area
+					this.dataObj.sendCity = this.$helper.filterUrban(_faddress.city)
+					this.dataObj.sendArea = this.$helper.filterArea(_faddress.area)
 					this.dataObj.sendAdCode = _faddress.adCode
 					this.dataObj.sendPrivate = _faddress.province
 					this.dataObj.sendDetailedAddress = _faddress.detailedAddress
@@ -619,8 +615,8 @@
 				}
 				if (_saddress) {
 					this.dataObj.unloadDetailedAddress = _saddress.detailedAddress
-					this.dataObj.unloadCity = _saddress.city
-					this.dataObj.unloadArea = _saddress.area
+					this.dataObj.unloadCity = this.$helper.filterUrban(_saddress.city)
+					this.dataObj.unloadArea = this.$helper.filterArea(_saddress.area)
 					this.dataObj.unsendAdCode = _faddress.adCode
 					this.dataObj.unloadPrivate = _saddress.province
 					this.dataObj.unsendLongitude = _saddress.longitude
@@ -670,6 +666,16 @@
 						}
 					}
 				}
+				let _carLength = this.dataObj.carLength.split(',')
+				for (let i = 0; i < this.carLengthList.length; i++) {
+					for (let k = 0; k < _carLength.length; k++) {
+						if (this.carLengthList[i].name == _carLength[k]) {
+							this.carLengthList[i].checked = true
+							this.carLengthCheckList.push(this.carLengthList[i].name)
+						}
+					}
+				}
+
 				let _measuringMethod = this.dataObj.measuringMethod.split(',')
 				this.jlCheckList = []
 				for (let i = 0; i < this.measuringMethodList.length; i++) {
@@ -681,6 +687,9 @@
 						}
 					}
 				}
+				this.priceIndex = this.dataObj.billingMethod
+				let _loadingDate = this.dataObj.loadingDate.split(',')
+
 			}
 			_this = this
 		},
@@ -717,17 +726,17 @@
 				console.log(val)
 				this.checkTime[0] = this.hoursList[val[0]]
 				this.checkTime[1] = this.hoursList[val[1]]
-				if(val[0]>val[1]){
+				if (val[0] > val[1]) {
 					uni.showToast({
 						icon: 'none',
 						title: "开始时间不能大于结束时间!"
 					})
 					this.isCanBeSubmit = false
 					return
-				}else{
+				} else {
 					this.isCanBeSubmit = true
 				}
-				
+
 				console.log(this.checkTime)
 
 			},
@@ -873,17 +882,7 @@
 				this.isShowPopup2 = false
 			},
 			selectRemarkType(val, index) {
-				val.checked = !val.checked
-				if (val.checked) {
-					this.remarkCheckList.push(val.name)
-				} else {
-					let _remarkCheckList = JSON.parse(JSON.stringify(this.remarkCheckList))
-					for (let i = 0; i < _remarkCheckList.length; i++) {
-						if (_remarkCheckList[i] == val.name) {
-							this.remarkCheckList.splice(i, 1)
-						}
-					}
-				}
+				this.dataObj.remark += val.name + ','
 			},
 			selectCarType(val, index) {
 				if (this.carTypeCheckList.length > 2 && !val.checked) {
@@ -1241,6 +1240,19 @@
 			},
 			selectValidityPeriod(type) {
 				this.funDate()
+				if (this.isEdit || this.isCopy) {
+
+					let _loadingDate = this.dataObj.loadingDate.split(',')
+					for (let i = 0; i < this.dateList.length; i++) {
+						this.dateList[i].checked = false
+						for (let k = 0; k < _loadingDate.length; k++) {
+							if (this.dateList[i].date == _loadingDate[k]) {
+								this.dateList[i].checked = true
+								this.dateCheckList.push(this.dateList[i])
+							}
+						}
+					}
+				}
 				this.isShowPopup4 = true
 			},
 		}
@@ -1337,6 +1349,14 @@
 			}
 		}
 	}
+	.content5{
+		.left{
+			width: 100px;
+		}
+		.right{
+			overflow-x: auto;
+		}
+	}
 
 	.select-type {
 		display: flex;
@@ -1414,7 +1434,11 @@
 		}
 	}
 
-	.content3 {}
+	.content3 {
+		.left {
+			width: 160rpx;
+		}
+	}
 
 	.content4 {
 		margin: 20rpx;
@@ -1444,6 +1468,7 @@
 		padding: 20rpx 0;
 		border-radius: 50rpx;
 	}
+
 	.fa-submit {
 		width: 90%;
 		margin: 50rpx auto;
@@ -1616,4 +1641,10 @@
 		width: 100%;
 		height: 300rpx;
 	}
+
+	.row-ellipsis {
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		overflow: hidden;
+	}
 </style>