舱位查询

main
lilu 2 years ago
parent dbc913c968
commit 8fec22ee45

2
.gitignore vendored

@ -0,0 +1,2 @@
##ignore this file##
/unpackage/

@ -2,17 +2,17 @@ import http from '@/common/js/request/request.js'
// 运价综合查询
export const realQuery = (data) => {
return http.post('/yunjia_demo/v1/real/query', data, 'json')
return http.post('/test_yunjia/v1/real/query', data, 'json')
}
// 港口模糊查询
export const realGk = (data) => {
return http.post('/yunjia_demo/v1/real/gk', data, 'json')
return http.post('/test_yunjia/v1/real/gk', data, 'json')
}
// 箱型模糊查询
export const realBox = (data) => {
return http.post('/yunjia_demo/v1/real/box', data, 'json')
return http.post('/test_yunjia/v1/real/box', data, 'json')
}

@ -28,29 +28,29 @@
<view class="times">
<view class="etd">
<text class="tip">ETD</text>
<text class="time">06-27</text>
<text class="time">{{ship.departure_date}}</text>
</view>
<!-- iconfont 需要替换 -->
<view class="iconfont icon-daoda icon"></view>
<view class="eta">
<text class="tip">ETA</text>
<text class="time">06-28</text>
<text class="time">{{ship.arrival_date}}</text>
</view>
</view>
<view class="ship-name">
<text>船名 CSCL GLOBE CSCL GLOBE</text>
<text>船名{{ ship.vessel }}</text>
</view>
<view class="ship-name">
<text>航次 0FAC9W1MA</text>
<text class="num">航程 46</text>
<text>航次 {{ ship.voyage }}</text>
<text class="num">航程 {{ ship.transit_time }}</text>
</view>
</view>
<view class="right">
<view class="amount">
<view class="of tip">O/F</view>
<view class="of">10400 USD</view>
<view class="of">{{ship.ocean_freight}} {{ship.ocean_currency}}</view>
<view class="all tip">ALL IN </view>
<view class="all">10400 USD</view>
<view class="all">{{ship.total_freight}} {{ship.total_currency}}</view>
</view>
</view>
</view>
@ -151,6 +151,9 @@
box_num: 1,
start_time: this.fromData.startTime,
end_time: this.fromData.endTime,
// from_mode:'CY',
// to_mode:'CY',
// product_name: '',
}
Object.keys(this.webCode).map((item,index)=>{
let _data = data;
@ -162,6 +165,7 @@
realQuery(data, type){
realQuery(data).then(res =>{
console.log(res)
this.webCode[type].list = res.data;
this.webCode[type].status = 'over';
}).catch(err =>{
this.webCode[type].status = 'noData';

@ -54,50 +54,56 @@
<view class="history-tit">
<text class="left">历史记录</text>
</view>
<view class="history-view">
<view class="setOut">
<text class="tip">出发地</text>
<text class="top">{{fromData.portDeparture}}</text>
</view>
<view class="icon iconfont icon-daoda"></view>
<view class="arrive">
<text class="tip">目的地</text>
<text class="top">{{fromData.portArrival}}</text>
<view class="history-list">
<view class="history-view">
<view class="setOut">
<text class="tip">出发地</text>
<text class="top">{{fromData.portDeparture}}</text>
</view>
<view class="icon iconfont icon-daoda"></view>
<view class="arrive">
<text class="tip">目的地</text>
<text class="top">{{fromData.portArrival}}</text>
</view>
<text class="icon-tab left"></text>
<text class="icon-tab right"></text>
<text class="icon-tab top-left"></text>
<text class="icon-tab top-right"></text>
</view>
<text class="icon-tab left"></text>
<text class="icon-tab right"></text>
</view>
<view class="history-view">
<view class="setOut">
<text class="tip">出发地</text>
<text class="top">{{fromData.portDeparture}}</text>
</view>
<view class="icon iconfont icon-daoda"></view>
<view class="arrive">
<text class="tip">目的地</text>
<text class="top">{{fromData.portArrival}}</text>
<view class="history-view">
<view class="setOut">
<text class="tip">出发地</text>
<text class="top">{{fromData.portDeparture}}</text>
</view>
<view class="icon iconfont icon-daoda"></view>
<view class="arrive">
<text class="tip">目的地</text>
<text class="top">{{fromData.portArrival}}</text>
</view>
<text class="icon-tab left"></text>
<text class="icon-tab right"></text>
</view>
<text class="icon-tab left"></text>
<text class="icon-tab right"></text>
</view>
<view class="history-view">
<view class="setOut">
<text class="tip">出发地</text>
<text class="top">{{fromData.portDeparture}}</text>
</view>
<view class="icon iconfont icon-daoda"></view>
<view class="arrive">
<text class="tip">目的地</text>
<text class="top">{{fromData.portArrival}}</text>
<view class="history-view">
<view class="setOut">
<text class="tip">出发地</text>
<text class="top">{{fromData.portDeparture}}</text>
</view>
<view class="icon iconfont icon-daoda"></view>
<view class="arrive">
<text class="tip">目的地</text>
<text class="top">{{fromData.portArrival}}</text>
</view>
<text class="icon-tab left"></text>
<text class="icon-tab right"></text>
</view>
<text class="icon-tab left"></text>
<text class="icon-tab right"></text>
</view>
</view>
<inputSearch
@ -468,6 +474,9 @@
font-weight: 600;
// background:#fff;
}
.history-list{
box-shadow: 0 0 10rpx #ccc;
}
.history-view{
width:100%;
@ -480,31 +489,8 @@
// box-shadow: 0 0 10rpx #eee;
position: relative;
border-bottom: 1px dashed #eee;
&:nth-of-type(1){
&::before{
content:'';
width: 40rpx;
height: 40rpx;
background: #f4f4f4;
position: absolute;
border-radius: 50%;
position: absolute;
top: -20rpx;
z-index: 999;
left:-20rpx;
}
&::after{
content:'';
width: 40rpx;
height: 40rpx;
background: #f4f4f4;
position: absolute;
border-radius: 50%;
position: absolute;
top: -20rpx;
z-index: 999;
right:-20rpx;
}
&:nth-last-of-type(1){
border-bottom: none;
}
.setOut,.arrive{
// width: 250rpx;
@ -553,6 +539,7 @@
position: absolute;
bottom: -20rpx;
z-index: 999;
// box-shadow: inset 0px 0px 10px 1px #f4f4f4;
&.left{
left:-20rpx;
}
@ -560,6 +547,28 @@
right:-20rpx;
}
}
.top-left{
width: 40rpx;
height: 40rpx;
background: #f4f4f4;
position: absolute;
border-radius: 50%;
position: absolute;
top: -20rpx;
z-index: 999;
left:-20rpx;
}
.top-right{
width: 40rpx;
height: 40rpx;
background: #f4f4f4;
position: absolute;
border-radius: 50%;
position: absolute;
top: -20rpx;
z-index: 999;
right:-20rpx;
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -13613,17 +13613,17 @@ Object.defineProperty(exports, "__esModule", { value: true });exports.realBox =
// 运价综合查询
var realQuery = function realQuery(data) {
return _request.default.post('/yunjia_demo/v1/real/query', data, 'json');
return _request.default.post('/test_yunjia/v1/real/query', data, 'json');
};
// 港口模糊查询
exports.realQuery = realQuery;var realGk = function realGk(data) {
return _request.default.post('/yunjia_demo/v1/real/gk', data, 'json');
return _request.default.post('/test_yunjia/v1/real/gk', data, 'json');
};
// 箱型模糊查询
exports.realGk = realGk;var realBox = function realBox(data) {
return _request.default.post('/yunjia_demo/v1/real/box', data, 'json');
return _request.default.post('/test_yunjia/v1/real/box', data, 'json');
};exports.realBox = realBox;
/***/ })

@ -289,8 +289,11 @@ var uniLoadMore = function uniLoadMore() {Promise.all(/*! require.ensure | uni_m
box_code: this.fromData.boxType,
box_num: 1,
start_time: this.fromData.startTime,
end_time: this.fromData.endTime };
end_time: this.fromData.endTime
// from_mode:'CY',
// to_mode:'CY',
// product_name: '',
};
Object.keys(this.webCode).map(function (item, index) {
var _data = data;
_data.web_code = _this.webCode[item].code;
@ -301,6 +304,7 @@ var uniLoadMore = function uniLoadMore() {Promise.all(/*! require.ensure | uni_m
realQuery: function realQuery(data, type) {var _this2 = this;
(0, _cabinQuery.realQuery)(data).then(function (res) {
console.log(res);
_this2.webCode[type].list = res.data;
_this2.webCode[type].status = 'over';
}).catch(function (err) {
_this2.webCode[type].status = 'noData';

@ -1 +1 @@
<view class="cabin-history"><view class="history-tit"><view class="setOut"><text class="tip">出发地</text><text class="top">{{fromData.portDeparture}}</text></view><view class="icon iconfont icon-daoda"></view><view class="arrive"><text class="tip">目的地</text><text class="top">{{fromData.portArrival}}</text></view><view data-event-opts="{{[['tap',[['reset',['$event']]]]]}}" class="iconfont icon-shijian screen" bindtap="__e"></view></view><block wx:for="{{webCode}}" wx:for-item="item" wx:for-index="index"><view class="history-list"><view class="tit"><view class="left"><image src="{{item.image}}" mode></image><text>{{item.code}}</text></view><view class="right">{{"箱型:"+fromData.boxType}}</view></view><block wx:if="{{item.status=='over'}}"><block wx:for="{{item.list}}" wx:for-item="ship" wx:for-index="sindex"><view class="single-main"><view class="left"><view class="line"></view><view class="times"><view class="etd"><text class="tip">ETD</text><text class="time">06-27</text></view><view class="iconfont icon-daoda icon"></view><view class="eta"><text class="tip">ETA</text><text class="time">06-28</text></view></view><view class="ship-name"><text>船名: CSCL GLOBE CSCL GLOBE</text></view><view class="ship-name"><text>航次: 0FAC9W1MA</text><text class="num">航程: 46</text></view></view><view class="right"><view class="amount"><view class="of tip">O/F</view><view class="of">10400 USD</view><view class="all tip">ALL IN</view><view class="all">10400 USD</view></view></view></view></block></block><block wx:else><block wx:if="{{item.status=='loading'}}"><view class="loading-box"><uni-load-more vue-id="{{'73f00e3c-1-'+index}}" status="loading" bind:__l="__l"></uni-load-more></view></block><block wx:else><block wx:if="{{item.status=='noData'}}"><view class="no-data"><text class="iconfont icon-yunshugongsi"></text><text class="text">暂无数据</text></view></block></block></block></view></block></view>
<view class="cabin-history"><view class="history-tit"><view class="setOut"><text class="tip">出发地</text><text class="top">{{fromData.portDeparture}}</text></view><view class="icon iconfont icon-daoda"></view><view class="arrive"><text class="tip">目的地</text><text class="top">{{fromData.portArrival}}</text></view><view data-event-opts="{{[['tap',[['reset',['$event']]]]]}}" class="iconfont icon-shijian screen" bindtap="__e"></view></view><block wx:for="{{webCode}}" wx:for-item="item" wx:for-index="index"><view class="history-list"><view class="tit"><view class="left"><image src="{{item.image}}" mode></image><text>{{item.code}}</text></view><view class="right">{{"箱型:"+fromData.boxType}}</view></view><block wx:if="{{item.status=='over'}}"><block wx:for="{{item.list}}" wx:for-item="ship" wx:for-index="sindex"><view class="single-main"><view class="left"><view class="line"></view><view class="times"><view class="etd"><text class="tip">ETD</text><text class="time">{{ship.departure_date}}</text></view><view class="iconfont icon-daoda icon"></view><view class="eta"><text class="tip">ETA</text><text class="time">{{ship.arrival_date}}</text></view></view><view class="ship-name"><text>{{"船名:"+ship.vessel}}</text></view><view class="ship-name"><text>{{"航次: "+ship.voyage}}</text><text class="num">{{"航程: "+ship.transit_time}}</text></view></view><view class="right"><view class="amount"><view class="of tip">O/F</view><view class="of">{{ship.ocean_freight+" "+ship.ocean_currency}}</view><view class="all tip">ALL IN</view><view class="all">{{ship.total_freight+" "+ship.total_currency}}</view></view></view></view></block></block><block wx:else><block wx:if="{{item.status=='loading'}}"><view class="loading-box"><uni-load-more vue-id="{{'73f00e3c-1-'+index}}" status="loading" bind:__l="__l"></uni-load-more></view></block><block wx:else><block wx:if="{{item.status=='noData'}}"><view class="no-data"><text class="iconfont icon-yunshugongsi"></text><text class="text">暂无数据</text></view></block></block></block></view></block></view>

@ -261,6 +261,12 @@ Object.defineProperty(exports, "__esModule", { value: true });exports.default =

@ -1 +1 @@
<view class="cabin-query"><view class="query-box"><view class="choice-btn"><view class="left"><text class="iconfont icon-yunshu"></text><text class="tip">起运港</text></view><view data-event-opts="{{[['tap',[['openInputSerch',['portDeparture']]]]]}}" class="right" bindtap="__e"><block wx:if="{{fromData.portDeparture}}"><text class="gk">{{fromData.portDeparture}}</text></block><block wx:else><text class="gk">请选择起运港</text></block><text class="icon iconfont icon-daoda"></text></view></view><view class="choice-btn"><view class="left"><text class="iconfont icon-yunshu"></text><text class="tip">目的港</text></view><view data-event-opts="{{[['tap',[['openInputSerch',['portArrival']]]]]}}" class="right" bindtap="__e"><block wx:if="{{fromData.portArrival}}"><text class="gk">{{fromData.portArrival}}</text></block><block wx:else><text class="gk">请选择目的港</text></block><text class="icon iconfont icon-daoda"></text></view></view><view data-event-opts="{{[['tap',[['openInputSerch',['boxType']]]]]}}" class="choice-btn" bindtap="__e"><view class="left"><text class="iconfont icon-a-jizhuangxiang1"></text><text class="tip">箱型</text></view><view class="right"><block wx:if="{{fromData.boxType}}"><text class="gk">{{fromData.boxType}}</text></block><block wx:else><text class="gk">请选择箱型</text></block><text class="icon iconfont icon-daoda"></text></view></view><view class="choice-btn"><view class="left"><text class="iconfont icon-shijian"></text><text class="tip">开始时间</text></view><view class="right"><uni-datetime-picker vue-id="3500f1a4-1" type="date" clear-icon="{{false}}" start="{{$root.g0}}" value="{{fromData.startTime}}" data-event-opts="{{[['^maskClick',[['startTimeClick']]],['^input',[['__set_model',['$0','startTime','$event',[]],['fromData']]]]]}}" bind:maskClick="__e" bind:input="__e" bind:__l="__l"></uni-datetime-picker></view></view><view class="choice-btn"><view class="left"><text class="iconfont icon-shijian"></text><text class="tip">结束时间</text></view><view class="right"><uni-datetime-picker vue-id="3500f1a4-2" type="date" clear-icon="{{false}}" start="{{$root.g1}}" value="{{fromData.endTime}}" data-event-opts="{{[['^maskClick',[['endTimeClick']]],['^input',[['__set_model',['$0','endTime','$event',[]],['fromData']]]]]}}" bind:maskClick="__e" bind:input="__e" bind:__l="__l"></uni-datetime-picker></view></view><view class="button-box"><button data-event-opts="{{[['tap',[['goQuery',['$event']]]]]}}" class="enter" bindtap="__e">查询</button><button data-event-opts="{{[['tap',[['resetFrom',['$event']]]]]}}" hidden="{{!(hasFromData)}}" class="reset" bindtap="__e">重置</button></view></view><view class="query-history"><view class="history-tit"><text class="left">历史记录</text></view><view class="history-view"><view class="setOut"><text class="tip">出发地</text><text class="top">{{fromData.portDeparture}}</text></view><view class="icon iconfont icon-daoda"></view><view class="arrive"><text class="tip">目的地</text><text class="top">{{fromData.portArrival}}</text></view><text class="icon-tab left"></text><text class="icon-tab right"></text></view><view class="history-view"><view class="setOut"><text class="tip">出发地</text><text class="top">{{fromData.portDeparture}}</text></view><view class="icon iconfont icon-daoda"></view><view class="arrive"><text class="tip">目的地</text><text class="top">{{fromData.portArrival}}</text></view><text class="icon-tab left"></text><text class="icon-tab right"></text></view><view class="history-view"><view class="setOut"><text class="tip">出发地</text><text class="top">{{fromData.portDeparture}}</text></view><view class="icon iconfont icon-daoda"></view><view class="arrive"><text class="tip">目的地</text><text class="top">{{fromData.portArrival}}</text></view><text class="icon-tab left"></text><text class="icon-tab right"></text></view></view><block wx:if="{{inputSearchShow}}"><input-search class="vue-ref" vue-id="3500f1a4-3" inputData="{{inputSearchData}}" data-ref="inputView" data-event-opts="{{[['^change',[['getInputChange']]],['^submit',[['getInputRes']]],['^cancel',[['cancelInput']]]]}}" bind:change="__e" bind:submit="__e" bind:cancel="__e" bind:__l="__l"></input-search></block></view>
<view class="cabin-query"><view class="query-box"><view class="choice-btn"><view class="left"><text class="iconfont icon-yunshu"></text><text class="tip">起运港</text></view><view data-event-opts="{{[['tap',[['openInputSerch',['portDeparture']]]]]}}" class="right" bindtap="__e"><block wx:if="{{fromData.portDeparture}}"><text class="gk">{{fromData.portDeparture}}</text></block><block wx:else><text class="gk">请选择起运港</text></block><text class="icon iconfont icon-daoda"></text></view></view><view class="choice-btn"><view class="left"><text class="iconfont icon-yunshu"></text><text class="tip">目的港</text></view><view data-event-opts="{{[['tap',[['openInputSerch',['portArrival']]]]]}}" class="right" bindtap="__e"><block wx:if="{{fromData.portArrival}}"><text class="gk">{{fromData.portArrival}}</text></block><block wx:else><text class="gk">请选择目的港</text></block><text class="icon iconfont icon-daoda"></text></view></view><view data-event-opts="{{[['tap',[['openInputSerch',['boxType']]]]]}}" class="choice-btn" bindtap="__e"><view class="left"><text class="iconfont icon-a-jizhuangxiang1"></text><text class="tip">箱型</text></view><view class="right"><block wx:if="{{fromData.boxType}}"><text class="gk">{{fromData.boxType}}</text></block><block wx:else><text class="gk">请选择箱型</text></block><text class="icon iconfont icon-daoda"></text></view></view><view class="choice-btn"><view class="left"><text class="iconfont icon-shijian"></text><text class="tip">开始时间</text></view><view class="right"><uni-datetime-picker vue-id="3500f1a4-1" type="date" clear-icon="{{false}}" start="{{$root.g0}}" value="{{fromData.startTime}}" data-event-opts="{{[['^maskClick',[['startTimeClick']]],['^input',[['__set_model',['$0','startTime','$event',[]],['fromData']]]]]}}" bind:maskClick="__e" bind:input="__e" bind:__l="__l"></uni-datetime-picker></view></view><view class="choice-btn"><view class="left"><text class="iconfont icon-shijian"></text><text class="tip">结束时间</text></view><view class="right"><uni-datetime-picker vue-id="3500f1a4-2" type="date" clear-icon="{{false}}" start="{{$root.g1}}" value="{{fromData.endTime}}" data-event-opts="{{[['^maskClick',[['endTimeClick']]],['^input',[['__set_model',['$0','endTime','$event',[]],['fromData']]]]]}}" bind:maskClick="__e" bind:input="__e" bind:__l="__l"></uni-datetime-picker></view></view><view class="button-box"><button data-event-opts="{{[['tap',[['goQuery',['$event']]]]]}}" class="enter" bindtap="__e">查询</button><button data-event-opts="{{[['tap',[['resetFrom',['$event']]]]]}}" hidden="{{!(hasFromData)}}" class="reset" bindtap="__e">重置</button></view></view><view class="query-history"><view class="history-tit"><text class="left">历史记录</text></view><view class="history-list"><view class="history-view"><view class="setOut"><text class="tip">出发地</text><text class="top">{{fromData.portDeparture}}</text></view><view class="icon iconfont icon-daoda"></view><view class="arrive"><text class="tip">目的地</text><text class="top">{{fromData.portArrival}}</text></view><text class="icon-tab left"></text><text class="icon-tab right"></text><text class="icon-tab top-left"></text><text class="icon-tab top-right"></text></view><view class="history-view"><view class="setOut"><text class="tip">出发地</text><text class="top">{{fromData.portDeparture}}</text></view><view class="icon iconfont icon-daoda"></view><view class="arrive"><text class="tip">目的地</text><text class="top">{{fromData.portArrival}}</text></view><text class="icon-tab left"></text><text class="icon-tab right"></text></view><view class="history-view"><view class="setOut"><text class="tip">出发地</text><text class="top">{{fromData.portDeparture}}</text></view><view class="icon iconfont icon-daoda"></view><view class="arrive"><text class="tip">目的地</text><text class="top">{{fromData.portArrival}}</text></view><text class="icon-tab left"></text><text class="icon-tab right"></text></view></view></view><block wx:if="{{inputSearchShow}}"><input-search class="vue-ref" vue-id="3500f1a4-3" inputData="{{inputSearchData}}" data-ref="inputView" data-event-opts="{{[['^change',[['getInputChange']]],['^submit',[['getInputRes']]],['^cancel',[['cancelInput']]]]}}" bind:change="__e" bind:submit="__e" bind:cancel="__e" bind:__l="__l"></input-search></block></view>

@ -111,6 +111,9 @@
font-size: 28rpx;
font-weight: 600;
}
.cabin-query .query-history .history-list {
box-shadow: 0 0 10rpx #ccc;
}
.cabin-query .query-history .history-view {
width: 100%;
padding: 10rpx 50rpx;
@ -121,27 +124,8 @@
position: relative;
border-bottom: 1px dashed #eee;
}
.cabin-query .query-history .history-view:nth-of-type(1)::before {
content: '';
width: 40rpx;
height: 40rpx;
background: #f4f4f4;
border-radius: 50%;
position: absolute;
top: -20rpx;
z-index: 999;
left: -20rpx;
}
.cabin-query .query-history .history-view:nth-of-type(1)::after {
content: '';
width: 40rpx;
height: 40rpx;
background: #f4f4f4;
border-radius: 50%;
position: absolute;
top: -20rpx;
z-index: 999;
right: -20rpx;
.cabin-query .query-history .history-view:nth-last-of-type(1) {
border-bottom: none;
}
.cabin-query .query-history .history-view .setOut,
.cabin-query .query-history .history-view .arrive {
@ -196,4 +180,24 @@
.cabin-query .query-history .history-view .icon-tab.right {
right: -20rpx;
}
.cabin-query .query-history .history-view .top-left {
width: 40rpx;
height: 40rpx;
background: #f4f4f4;
border-radius: 50%;
position: absolute;
top: -20rpx;
z-index: 999;
left: -20rpx;
}
.cabin-query .query-history .history-view .top-right {
width: 40rpx;
height: 40rpx;
background: #f4f4f4;
border-radius: 50%;
position: absolute;
top: -20rpx;
z-index: 999;
right: -20rpx;
}

Loading…
Cancel
Save