Browse Source

提交海运费查询页面

caojunjie 4 years ago
parent
commit
0c6e5e669f

+ 2 - 2
common/http.interceptor.js

@@ -3,10 +3,10 @@
 const install = (Vue, vm) => {
 	let baseURL;
 	if(process.env.NODE_ENV === 'development'){
-        // baseURL = "https://test.wms.tubaosoft.com/prod-api"
+        baseURL = "https://test.wms.tubaosoft.com/prod-api"
 		// baseURL = "http://192.168.1.143:9010"
 		// baseURL = "https://dmu.tubaosoft.com/prod-api"
-		baseURL = "http://jingang.tubaosoft.com/prod-api"
+		// baseURL = "http://jingang.tubaosoft.com/prod-api"
 		// baseURL = "https://jiyong.tubaosoft.com/prod-api"
 	}
 	if (process.env.NODE_ENV === 'production') {

+ 22 - 1
pages.json

@@ -180,6 +180,28 @@
 					}
 				}
 			},
+			//船期查询
+			{
+			    "path" : "/freightCalculation/shipSchedule",
+			    "style" :                                                                                    
+			    {
+			        "navigationBarTitleText": "船期查询",
+			        "enablePullDownRefresh": false,
+					"navigationBarTextStyle": "white"
+			    }
+			    
+			},
+			//船期信息
+			{
+			    "path" : "/freightCalculation/shippingInformation",
+			    "style" :                                                                                    
+			    {
+			        "navigationBarTitleText": "船期信息",
+			        "enablePullDownRefresh": false,
+					"navigationBarTextStyle": "white"
+			    }
+			    
+			},
 			//海运费计算
 			{
 			    "path" : "/freightCalculation/freightCalculation",
@@ -187,7 +209,6 @@
 			    {
 			        "navigationBarTitleText": "海运费计算",
 			        "enablePullDownRefresh": false,
-					"navigationBarBackgroundColor": "#3A63CF",
 					"navigationBarTextStyle": "white"
 			    }
 			    

+ 1 - 2
pages/home/freightCalculation/freightCalculation.vue

@@ -34,8 +34,7 @@
 				</u-form-item>
 			</u-form>
 		</view>
-		<view
-			style="width: 100%;position:fixed; bottom:0;background-color: #FFFFFF;padding-left: 20px;padding-right: 20px;padding-bottom: 30rpx;">
+		<view style="width: 100%;position:fixed; bottom:0;background-color: #FFFFFF;padding-left: 20px;padding-right: 20px;padding-bottom: 30rpx;">
 			<u-button type="primary" @click="submit">立即计算</u-button>
 		</view>
 		<view style="width: 100%;padding-bottom: 110rpx;" v-if="datalist === true">

+ 145 - 0
pages/home/freightCalculation/shipSchedule.vue

@@ -0,0 +1,145 @@
+<!-- 船期查询 -->
+<template>
+	<view>
+		<!-- 搜索区 -->
+		<view style="width: 80%;margin: 10rpx auto;">
+			<!-- <u-field v-model="polId" label="起始港" placeholder="请选择起始港" type="select" @click="destination = true"></u-field> -->
+
+			<u-form-item label="起始港" label-width="100rpx">
+				<u-input v-model="list.polId" type="select" placeholder="请选择起始港" @click="destination = true" />
+			</u-form-item>
+			<u-action-sheet :list="destinationList" v-model="destination" @click="destinationMethod"></u-action-sheet>
+			<u-form-item label="目的港" label-width="100rpx">
+				<u-input v-model="list.podId" type="select" placeholder="请选择目的港" @click="destinationtwo = true" />
+			</u-form-item>
+			<u-action-sheet :list="destinationList" v-model="destinationtwo" @click="destinationMethodTwo">
+			</u-action-sheet>
+			<u-form-item label="开航日" label-width="100rpx">
+				<u-input v-model="list.sailingDay" :disabled="true" type="select" placeholder="请选择日期" @click="show = true" />
+			</u-form-item>
+			<u-calendar max-date="2050" v-model="show" mode="range" @change="change"></u-calendar>
+		</view>
+		<!-- <view
+			style="width: 100%;position:fixed; bottom:0;background-color: #FFFFFF;padding-left: 20px;padding-right: 20px;padding-bottom: 30rpx;">
+			<u-button type="primary" @click="submit">确认查询</u-button>
+		</view> -->
+		<view style="width: 90%;margin: 40rpx auto;">
+			<u-button type="primary" @click="submit">确认查询</u-button>
+		</view>
+		<!-- 历史记录区 -->
+		<view v-if="historyList > 0">
+			<view
+				style="box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);width: 96%;border-top-right-radius: 10rpx;margin: 0 auto;">
+				<view style="width: 90%;margin: 0 auto;height: 80rpx;margin: 0 auto;line-height: 80rpx;">
+					<view style="float: left;">历史记录</view>
+					<view style="color: #279cfd;float: right;" @click="deleteAll()">清除全部</view>
+				</view>
+				<view
+					style="width: 100%;height: 80rpx;margin: 0 auto;line-height: 80rpx;padding: 0 5% 0 5%;border-top: 1rpx solid #eff4ff;"
+					v-for="(item,index) in historyList" :key="index">
+					<view style="float: left;">{{item.fPortOriginName}}——{{item.fPortDestinationName}}</view>
+					<view style="color: #279cfd;float: right;">
+						<u-icon name="trash" color="#ccc" @click="deleteRecord(item.fId)"></u-icon>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				show: false,
+				mode: 'range',
+				list:{},
+				form: {
+					fQueryFrom: 'app',
+					pageNum: 1,
+					pageSize: 10,
+				},
+				destination: false,
+				destinationtwo: false,
+				destinationList: [],
+				historyList: []
+			}
+		},
+		created() {
+			this.destinationList = []
+			this.$u.get('/shipping/address/selectPortName').then(res => {
+				console.log(res)
+				for (let item in res.rows) {
+					this.destinationList.push({
+						value: res.rows[item].fId,
+						text: res.rows[item].fName
+					})
+				}
+			})
+			this.history()
+		},
+		methods: {
+			//查询历史搜索记录
+			history() {
+				this.$u.get('/quotation/queryseapricelog/list').then(res => {
+					this.historyList = res.rows
+				})
+			},
+			change(e) {
+				console.log(e)
+				this.form.fValiddateBegin = e.startDate
+				this.form.fValiddateEnd = e.endDate
+				this.list.sailingDay = e.startDate + ' - ' + e.endDate
+			},
+			destinationMethod(index) {
+				this.list.polId = this.destinationList[index].text
+				this.form.polId = this.destinationList[index].value
+			},
+			destinationMethodTwo(index) {
+				this.list.podId = this.destinationList[index].text
+				this.form.podId = this.destinationList[index].value
+			},
+			submit() {
+				if (!this.form.polId) return this.textTips('请选择起始港')
+				if (!this.form.podId) return this.textTips('请选择目的港')
+				if (!this.form.fValiddateBegin || !this.form.fValiddateEnd) return this.textTips('请选择开航日期')
+				this.$u.route('/pages/home/freightCalculation/shippingInformation',{
+					form:JSON.stringify(this.form),
+					list:JSON.stringify(this.list)
+				});
+				// this.$u.get('/warehouse/seaprice/query').then(res=>{
+				// 	console.log(res)
+				// })
+			},
+			textTips(text){
+				uni.showToast({
+					icon: 'none',
+					title: text,
+					position: "center"
+				})
+			},
+			deleteRecord(id) {
+				console.log(id)
+				if (id) {
+					this.$u.delete('/quotation/queryseapricelog/' + id).then(res => {
+						console.log(res)
+						this.history()
+					})
+				} else {
+					console.log(id)
+				}
+			},
+			deleteAll() {
+				let id = ''
+				for (let item in this.historyList) {
+					id += this.historyList[item].fId + ','
+				}
+				id = id.substring(0, id.length - 1);
+				this.deleteRecord(id)
+			}
+		}
+	}
+</script>
+
+<style>
+</style>

+ 143 - 0
pages/home/freightCalculation/shippingInformation.vue

@@ -0,0 +1,143 @@
+<!-- 船期信息 -->
+<template>
+	<view>
+		<!-- 搜索区 -->
+		<view style="width: 96%;margin: 10rpx auto;box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);padding: 0 3% 0 3%;border-radius: 5rpx;">
+			<!-- <u-field v-model="polId" label="起始港" placeholder="请选择起始港" type="select" @click="destination = true"></u-field> -->
+			<u-form-item label="起始港:" label-width="110rpx" style="float: left;width: 50%;">
+				<u-input v-model="list.polId" type="select" placeholder="请选择起始港" @click="destination = true" />
+			</u-form-item>
+			<u-action-sheet :list="destinationList" v-model="destination" @click="destinationMethod"></u-action-sheet>
+			<u-form-item label="目的港:" label-width="110rpx">
+				<u-input v-model="list.podId" type="select" placeholder="请选择目的港" @click="destinationtwo = true" />
+			</u-form-item>
+			<u-action-sheet :list="destinationList" v-model="destinationtwo" @click="destinationMethodTwo">
+			</u-action-sheet>
+			<u-form-item label="开航日:" label-width="110rpx">
+				<u-input v-model="list.sailingDay" :disabled="true" type="select" placeholder="请选择日期" @click="show = true" />
+			</u-form-item>
+			<u-calendar max-date="2050" v-model="show" mode="range" @change="change"></u-calendar>
+		</view>
+		<view
+			style="width: 100%;position:fixed; bottom:0;background-color: #FFFFFF;padding-left: 20px;padding-right: 20px;padding-bottom: 30rpx;">
+			<u-button type="primary" @click="submit">重新查询</u-button>
+		</view>
+		<view style="box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);width: 96%;border-top-right-radius: 10rpx;margin: 0 auto;padding-top: 10rpx;"
+		v-for="(item,index) in dataList" :key="index">
+			<span style="width: 10rpx;height: 40rpx;background-color: #2979ff;display: block;float: left;margin-top: 10rpx;"></span>
+			<h4 style="width: 140rpx;border-radius: 200rpx;text-align: center;color: #2979ff;border: 2rpx solid #1785FF;float: right;margin-right: 10rpx;margin-top: 10rpx;">{{item.fBilltype}}</h4>
+			<view style="width: 90%;margin: 0 auto;margin: 0 auto;">
+				<view style="display: flex;justify-content: space-between;height: 60rpx;line-height: 60rpx;">
+					<h4>{{item.fLineName}}</h4>
+				</view>
+				<view style="display: flex;justify-content: space-between;height: 60rpx;line-height: 60rpx;">
+					<h4>{{item.fCorpName?item.fCorpName:'无船公司'}}</h4>
+					<h4>{{item.fBookagentName?item.fBookagentName:'无订舱代理'}}</h4>
+					<h4>{{item.fSailingSchedule ? item.fSailingSchedule:'无日期'}}</h4>
+				</view>
+				<view style="display: flex;justify-content: space-between;border-top: 1rpx solid #eff4ff;height: 60rpx;line-height: 60rpx;">
+					<h4>20GP</h4>
+					<h4>40GP</h4>
+					<h4>40HC</h4>
+					<h4>45HC</h4>
+					<h4>20RH</h4>
+					<h4>40RH</h4>
+				</view>
+				<view style="border-top: 1rpx solid #eff4ff;height: 60rpx;line-height: 60rpx;">
+					<span v-if="item.seapriceItem[0]" style="display: flex;justify-content: space-between;">
+						<h4>{{item.seapriceItem[0].fSpecification1}}</h4>
+						<h4>{{item.seapriceItem[0].fSpecification2}}</h4>
+						<h4>{{item.seapriceItem[0].fSpecification3}}</h4>
+						<h4>{{item.seapriceItem[0].fSpecification4}}</h4>
+						<h4>{{item.seapriceItem[0].fSpecification5}}</h4>
+						<h4>{{item.seapriceItem[0].fSpecification6}}</h4>
+					</span>
+					<span v-else>
+						<h2 style="text-align: center;">无价格</h2>
+					</span>
+				</view>
+				<view style="width: 100%;margin: 0 auto;height: 80rpx;margin: 0 auto;line-height: 80rpx;border-top: 1rpx solid #eff4ff;" @click="expenseDetails(item)">
+					<view style="float: left;"><h3>查看海运费</h3></view>
+					<view style="float: right;"><u-icon name="arrow-right"></u-icon></view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				show: false,
+				mode: 'range',
+				list:{},
+				form: {
+					fQueryFrom: 'app',
+					pageNum: 1,
+					pageSize: 10,
+				},
+				dataList:[],
+				destination: false,
+				destinationtwo: false,
+				destinationList: []
+			}
+		},
+		onLoad(option) {
+			// this.form = JSON.parse(option.form)
+			this.list = JSON.parse(option.list)
+			this.submit()
+		},
+		created() {
+			this.destinationList = []
+			this.$u.get('/shipping/address/selectPortName').then(res => {
+				console.log(res)
+				for (let item in res.rows) {
+					this.destinationList.push({
+						value: res.rows[item].fId,
+						text: res.rows[item].fName
+					})
+				}
+			})
+		},
+		methods: {
+			change(e) {
+				console.log(e)
+				this.form.fValiddateBegin = e.startDate
+				this.form.fValiddateEnd = e.endDate
+				this.list.sailingDay = e.startDate + ' - ' + e.endDate
+			},
+			destinationMethod(index) {
+				this.list.polId = this.destinationList[index].text
+				this.form.polId = this.destinationList[index].value
+			},
+			destinationMethodTwo(index) {
+				this.list.podId = this.destinationList[index].text
+				this.form.podId = this.destinationList[index].value
+			},
+			submit(){
+				// if (!this.form.polId) return this.textTips('请选择起始港')
+				// if (!this.form.podId) return this.textTips('请选择目的港')
+				// if (!this.form.fValiddateBegin || !this.form.fValiddateEnd) return this.textTips('请选择开航日期')
+				this.$u.get('/warehouse/seaprice/queryApp',this.form).then(res=>{
+					console.log(res)
+					this.dataList = res.rows
+				})
+			},
+			expenseDetails(item){
+				console.log(item)
+				// this.$u.route('/pages/home/freightCalculation/freightCalculation');
+			},
+			textTips(text){
+				uni.showToast({
+					icon: 'none',
+					title: text,
+					position: "center"
+				})
+			},
+		}
+	}
+</script>
+<style scoped lang="scss">
+	
+</style>

+ 2 - 1
pages/home/home.vue

@@ -112,7 +112,8 @@
 						this.$u.route('/pages/home/delivery/index');
 						break;
 					case 6:
-						this.$u.route('/pages/home/freightCalculation/freightCalculation');
+						this.$u.route('/pages/home/freightCalculation/shipSchedule');
+						// this.$u.route('/pages/home/freightCalculation/freightCalculation');
 						break;
 					default:
 						uni.showToast({

+ 119 - 118
pages/information/information.vue

@@ -1,118 +1,119 @@
-<template>
-	<view>
-		<u-swipe-action :show="item.show" :index="index" 
-			v-for="(item, index) in list" :key="item.id" 
-			@click="click(index,item.id)" @open="open"
-			:options="options"
-		>
-			<view class="item u-border-bottom" style="justify:center;align-items:center;display:-webkit-flex">
-				<image mode="aspectFill" :src="item.images" />
-				<!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 -->
-				<view class="title-wrap">
-					<text>{{item.text}}</text>
-					<text
-					class="title u-line-2">{{ item.title }}</text>
-				</view>
-				<view style="color: #9a9a9f;margin-right: -5rpx;">
-					11:20
-				</view>
-			</view>
-		</u-swipe-action>
-		<view style="width: 50%;margin: 0 auto;height: 220rpx;align-items: center;position: absolute;
-     top: 45%;
-     left: 50%;
-     transform:translate(-50%,-50%)">
-			<u-image src="../../static/noNews.png" width="100%" height="200rpx"></u-image>
-			<view style="text-align: center;">
-				<text style="color: #C0C4CC;">暂无消息</text>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				list: [
-					// {
-					// 	id: 1,
-					// 	text:'系统消息',
-					// 	title: '长安回望绣成堆,山顶千门次第开,一骑红尘妃子笑,无人知是荔枝来',
-					// 	images: 'https://cdn.uviewui.com/uview/common/logo.png',
-					// 	show: false
-					// },
-					// {
-					// 	id: 2,
-					// 	text:'客服消息',
-					// 	title: '新丰绿树起黄埃,数骑渔阳探使回,霓裳一曲千峰上,舞破中原始下来',
-					// 	images: 'https://cdn.uviewui.com/uview/common/logo.png',
-					// 	show: false
-					// },
-					// {
-					// 	id: 3,
-					// 	text:'广告消息',
-					// 	title: '登临送目,正故国晚秋,天气初肃。千里澄江似练,翠峰如簇',
-					// 	images: 'https://cdn.uviewui.com/uview/common/logo.png',
-					// 	show: false,
-					// }
-				],
-				disabled: false,
-				btnWidth: 180,
-				show: false,
-				options: [
-					{
-						text: '删除',
-						style: {
-							backgroundColor: '#f30000'
-						}
-					}
-				]
-			};
-		},
-		methods: {
-			click(index, index1) {
-				this.list.splice(index, 1);
-			},
-			// 如果打开一个的时候,不需要关闭其他,则无需实现本方法
-			open(index) {
-				// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
-				// 原本为'false',再次设置为'false'会无效
-				this.list[index].show = true;
-				this.list.map((val, idx) => {
-					if(index != idx) this.list[idx].show = false;
-				})
-			}
-		}
-	};
-</script>
-
-<style lang="scss" scoped>
-	.item {
-		display: flex;
-		padding: 20rpx;
-	}
-	
-	image {
-		width: 120rpx;
-		flex: 0 0 120rpx;
-		height: 120rpx;
-		margin-right: 20rpx;
-		border-radius: 12rpx;
-	}
-	
-	.title {
-		text-align: left;
-		font-size: 28rpx;
-		width: 90%;
-		color: $u-content-color;
-		margin-top: 20rpx;
-		overflow: hidden;
-		text-overflow: ellipsis;display: -webkit-box;
-		-webkit-line-clamp: 1;
-		-webkit-box-orient: vertical;
-	}
-	.u-border-bottom:active{
-		background-color: #f0f0f0;
-	}
-</style>
+<template>
+	<view>
+		<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in list" :key="item.id"
+			@click="click(index,item.id)" @open="open" :options="options">
+			<view class="item u-border-bottom" style="justify:center;align-items:center;display:-webkit-flex">
+				<image mode="aspectFill" :src="item.images" />
+				<!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 -->
+				<view class="title-wrap">
+					<text>{{item.text}}</text>
+					<text class="title u-line-2">{{ item.title }}</text>
+				</view>
+				<view style="color: #9a9a9f;margin-right: -5rpx;">
+					11:20
+				</view>
+			</view>
+		</u-swipe-action>
+		<view style="
+			width: 50%;
+			margin: 0 auto;
+			height: 220rpx;
+			align-items: center;
+			position: absolute;
+			top: 45%;
+			left: 50%;
+			transform:translate(-50%,-50%)">
+			<u-image src="../../static/noNews.png" width="100%" height="200rpx"></u-image>
+			<view style="text-align: center;">
+				<text style="color: #C0C4CC;">暂无消息</text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				list: [
+					// {
+					// 	id: 1,
+					// 	text:'系统消息',
+					// 	title: '长安回望绣成堆,山顶千门次第开,一骑红尘妃子笑,无人知是荔枝来',
+					// 	images: 'https://cdn.uviewui.com/uview/common/logo.png',
+					// 	show: false
+					// },
+					// {
+					// 	id: 2,
+					// 	text:'客服消息',
+					// 	title: '新丰绿树起黄埃,数骑渔阳探使回,霓裳一曲千峰上,舞破中原始下来',
+					// 	images: 'https://cdn.uviewui.com/uview/common/logo.png',
+					// 	show: false
+					// },
+					// {
+					// 	id: 3,
+					// 	text:'广告消息',
+					// 	title: '登临送目,正故国晚秋,天气初肃。千里澄江似练,翠峰如簇',
+					// 	images: 'https://cdn.uviewui.com/uview/common/logo.png',
+					// 	show: false,
+					// }
+				],
+				disabled: false,
+				btnWidth: 180,
+				show: false,
+				options: [{
+					text: '删除',
+					style: {
+						backgroundColor: '#f30000'
+					}
+				}]
+			};
+		},
+		methods: {
+			click(index, index1) {
+				this.list.splice(index, 1);
+			},
+			// 如果打开一个的时候,不需要关闭其他,则无需实现本方法
+			open(index) {
+				// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
+				// 原本为'false',再次设置为'false'会无效
+				this.list[index].show = true;
+				this.list.map((val, idx) => {
+					if (index != idx) this.list[idx].show = false;
+				})
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.item {
+		display: flex;
+		padding: 20rpx;
+	}
+
+	image {
+		width: 120rpx;
+		flex: 0 0 120rpx;
+		height: 120rpx;
+		margin-right: 20rpx;
+		border-radius: 12rpx;
+	}
+
+	.title {
+		text-align: left;
+		font-size: 28rpx;
+		width: 90%;
+		color: $u-content-color;
+		margin-top: 20rpx;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		display: -webkit-box;
+		-webkit-line-clamp: 1;
+		-webkit-box-orient: vertical;
+	}
+
+	.u-border-bottom:active {
+		background-color: #f0f0f0;
+	}
+</style>

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/__uniappchooselocation.js


BIN
unpackage/dist/dev/app-plus/__uniapperror.png


File diff suppressed because it is too large
+ 0 - 1
unpackage/dist/dev/app-plus/app-config-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


File diff suppressed because it is too large
+ 4 - 2
unpackage/dist/dev/app-plus/app-view.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


File diff suppressed because it is too large
+ 5 - 6
unpackage/dist/dev/app-plus/pages/home/app-sub-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/view.css


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/view.umd.min.js


Some files were not shown because too many files changed in this diff