achao 2 سال پیش
والد
کامیت
8952e14562
3فایلهای تغییر یافته به همراه101 افزوده شده و 57 حذف شده
  1. 29 12
      pages/cargoTerminal/cargoTerminal.vue
  2. 65 38
      pages/cargoTerminal/cargoTerminalDetail.vue
  3. 7 7
      pages/cargoTerminal/publishSource.vue

+ 29 - 12
pages/cargoTerminal/cargoTerminal.vue

@@ -45,25 +45,25 @@
 						<!-- {{item.carModel?item.carModel.replace(',','/'):''}}、{{item.carLength?item.carLength.replace(',','/'):''}}米、10吨/10方、10车... -->
 					</view>
 					<view class="row4 flex row">
-						<view class="btn" @click.native.stop="shelvesBtnClick(1,item)" v-if="item.status=='已下架'">
+						<view class="btn" @click.native.stop="shelvesBtnClick(1,item)" v-if="item.status=='已下架'&&tabIndex!=2">
 							上架
 						</view>
-						<view class="btn" @click.native.stop="shelvesBtnClick(2,item)" v-if="item.status=='已上架'">
+						<view class="btn" @click.native.stop="shelvesBtnClick(2,item)" v-if="item.status=='已上架'&&tabIndex!=2">
 							下架
 						</view>
-						<view class="btn" @click.native.stop="copyToNewPage(item,1)" v-if="tabIndex==1">
+						<view class="btn" @click.native.stop="copyToNewPage(item,1)" v-if="tabIndex==1||tabIndex==2">
 							复制
 						</view>
-						<view class="btn" @click.native.stop="often(item)" v-if="tabIndex==1&&item.oftenFlag!=1">
+						<view class="btn" @click.native.stop="often(item)" v-if="tabIndex==1&&item.oftenFlag1!=1">
 							常发
 						</view>
-						<view class="btn often" v-if="tabIndex==1&&item.oftenFlag==1">
+						<view class="btn often" v-if="tabIndex==1&&item.oftenFlag1==1">
 							常发
 						</view>
-						<view class="btn" @click.native.stop="deleteTask(item)">
+						<view class="btn" @click.native.stop="deleteTask(item)" v-if="tabIndex!=2">
 							删除
 						</view>
-						<view class="btn" @click.native.stop="editTask(item)">
+						<view class="btn" @click.native.stop="editTask(item)" v-if="tabIndex!=2">
 							编辑
 						</view>
 						<view class="btn" @click.native.stop="removeOften(item)" v-if="tabIndex==2">
@@ -114,7 +114,8 @@
 					},
 					toTop: {
 						src: ''
-					}
+					},
+					auto: false,
 				},
 				goodsList: [],
 				customStyleButton: {
@@ -135,6 +136,11 @@
 				}, ],
 			};
 		},
+		onShow() {
+			this.$nextTick(function() {
+				that.mescroll.resetUpScroll()
+			});
+		},
 		onLoad() {
 			that = this
 		},
@@ -204,8 +210,7 @@
 					});
 			},
 			confirmRemove() {
-				this.selectObj.oftenFlag = 0
-				this.$request.baseRequest('post', '/hyReleaseGoodsInfo/api/editTask', this.selectObj).then(res => {
+				this.$request.baseRequest('post', '/hyReleaseGoodsInfo/deleteTask', this.selectObj).then(res => {
 						uni.hideLoading()
 						this.show = false
 						uni.showToast({
@@ -222,8 +227,9 @@
 				uni.showLoading({
 					title: "加载中"
 				})
-				val.oftenFlag = 1
-				this.$request.baseRequest('post', '/hyReleaseGoodsInfo/api/editTask', val).then(res => {
+				val.oftenFlag = val.id
+				delete val.id
+				this.$request.baseRequest('post', '/hyReleaseGoodsInfo/api/addTask', val).then(res => {
 						uni.hideLoading()
 						uni.showToast({
 							title: "已存为常发货源!",
@@ -234,6 +240,17 @@
 						}, 1000)
 					})
 					.catch(res => {});
+				// this.$request.baseRequest('post', '/hyReleaseGoodsInfo/api/editTask', val).then(res => {
+				// 		uni.hideLoading()
+				// 		uni.showToast({
+				// 			title: "已存为常发货源!",
+				// 			icon: 'none'
+				// 		})
+				// 		setTimeout(() => {
+				// 			that.mescroll.resetUpScroll()
+				// 		}, 1000)
+				// 	})
+				// 	.catch(res => {});
 			},
 
 

+ 65 - 38
pages/cargoTerminal/cargoTerminalDetail.vue

@@ -9,29 +9,34 @@
 					发货地
 				</view>
 				<view class="right">
-					{{dataObj.sendPrivate}}  {{dataObj.sendCity}}  {{dataObj.sendArea}}
+					{{dataObj.sendPrivate}} {{dataObj.sendCity}} {{dataObj.sendArea}}
 				</view>
 			</view>
 			<view class="row2 row right">
+				<view class="left">
+					地址
+				</view>
+				<view class="right">
 					{{dataObj.sendDetailedAddress}}
+				</view>
 			</view>
 			<view class="row3 row">
 				<view class="left">
 					卸货地
 				</view>
 				<view class="right">
-					{{dataObj.unloadPrivate}}  {{dataObj.unloadCity}}  {{dataObj.unloadArea}}
+					{{dataObj.unloadPrivate}} {{dataObj.unloadCity}} {{dataObj.unloadArea}}
 				</view>
 			</view>
 			<view class="row4 row right">
-					{{dataObj.unloadDetailedAddress}}
+				{{dataObj.unloadDetailedAddress}}
 			</view>
 			<view class="row5 row">
 				<view class="left">
 					装车时间
 				</view>
 				<view class="right">
-					{{dataObj.loadingDate}}  {{dataObj.periodOfTime}}
+					{{date}}  {{time}}
 				</view>
 			</view>
 			<view class="row6 row">
@@ -167,18 +172,24 @@
 	export default {
 		data() {
 			return {
-				dataObj:{}
+				dataObj: {},
+				date:"",
+				time:''
 			};
 		},
 		onLoad(options) {
 			this.id = options.id
 			this.init()
 		},
-		methods:{
-			init(){
-				this.$request.baseRequest('get', '/hyReleaseGoodsInfo/seeTask', {id:this.id}).then(res => {
+		methods: {
+			init() {
+				this.$request.baseRequest('get', '/hyReleaseGoodsInfo/seeTask', {
+						id: this.id
+					}).then(res => {
 						uni.hideLoading()
 						this.dataObj = res.data
+						this.date = this.dataObj.loadingDate.split(",")[0]+'~'+this.dataObj.loadingDate.split(",")[this.dataObj.loadingDate.split(",").length-1]
+						this.time = this.dataObj.periodOfTime.split(",")[0]+'~'+this.dataObj.periodOfTime.split(",")[1]
 					})
 					.catch(res => {});
 			},
@@ -187,42 +198,58 @@
 </script>
 
 <style lang="scss" scoped>
-	.content{
+	.content {
 		padding: 20rpx;
 	}
-	.content1,.content2,.content3{
+
+	.content1,
+	.content2,
+	.content3 {
 		background: #fff;
 		border-radius: 20rpx;
-		padding:20rpx;
+		padding: 20rpx;
 		box-sizing: border-box;
 		margin-bottom: 20rpx;
 	}
-.row{
-	display: flex;
-	justify-content: space-between;
-	margin-bottom: 10rpx;
-	.left{
-		color: rgba(153,153,153,1);
+
+	.row {
+		display: flex;
+		justify-content: space-between;
+		margin-bottom: 10rpx;
+
+		.left {
+			width: 200rpx;
+			text-align: left;
+			// background: red;
+			color: rgba(153, 153, 153, 1);
+		}
 	}
-}
-.right{
-	display: flex;
-	justify-content: flex-end;
-}
-.row8{
-	display: flex;
-	flex-direction: column;
-}
-.title{
-	    font-weight: 700;
-	    font-size: 32rpx;
-	    color: rgb(51, 51, 51);
+
+	.right {
+		display: flex;
+		justify-content: flex-end;
+		text-align: right;
+	}
+
+	.row8 {
+		display: flex;
+		flex-direction: column;
+	}
+
+	.title {
+		font-weight: 700;
+		font-size: 32rpx;
+		color: rgb(51, 51, 51);
 		margin: 20rpx 0;
-}
-.row2,.row4,.row8 .top{
-	color:rgb(153, 153, 153)
-}
-.row7 .right{
-	color:rgb(255, 134, 0) ;
-}
-</style>
+	}
+
+	.row2,
+	.row4,
+	.row8 .top {
+		// color: rgb(153, 153, 153)
+	}
+
+	.row7 .right {
+		color: rgb(255, 134, 0);
+	}
+</style>

+ 7 - 7
pages/cargoTerminal/publishSource.vue

@@ -1133,13 +1133,13 @@
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.dataObj.stationFee)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "货站信息费不能为空!",
-					})
-					return true
-				}
+				// if (uni.$u.test.isEmpty(this.dataObj.stationFee)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "货站信息费不能为空!",
+				// 	})
+				// 	return true
+				// }
 			},
 			confirmClick() {
 				uni.$u.throttle(this.requestdata, 500)