소스 검색

更新 多港口样式

wzh 3 년 전
부모
커밋
e68f8be474

+ 3 - 1
miniprogram/pages/sharePage/sharePage.js

@@ -274,13 +274,15 @@ Page({
     // for (let i of res.data.result.detailInfos) {
     //   i.transInfos = res.data.result.detailInfos[0].transInfos
     // }
+    this.setData({
+      currentPortId: res.data.result.detailInfos[0].portId
+    })
     res.data.result.detailInfos.sort((a, b) => {
       return b.sort - a.sort
     })
 
     this.setData({
       ...res.data.result,
-      currentPortId: res.data.result.detailInfos[0].portId
     })
     this.getCarLoadRecordList()
     this.getDischargeList()

+ 2 - 4
miniprogram/pages/sharePage/sharePage.wxml

@@ -97,11 +97,9 @@
       </view>
     </view>
     <view wx:if="{{tab==4}}">
-      <scroll-view scroll-x="true" style="width: 100%;">
-      <view class="df jcsa" style="min-width: 110vw">
+      <scroll-view scroll-x="{{true}}" style="white-space: nowrap;">
         <view class="{{['port-btns',currentPortId == item.portId?'current-port-btn':'','mr20']}}" wx:for="{{voyage.voyageDetails}}" bindtap="changePort" data-id="{{item.portId}}">{{item.portName}}</view>
-      </view>
-    </scroll-view>
+      </scroll-view>
       <view class="df aic jcsb pb20" style="border-bottom: 2rpx solid #ddd;">
         <view bindtap="changeInfoType" data-type="ship" style="color:{{infoType=='ship'?'#0d8fcc':''}};border-bottom:{{infoType=='ship'?'2rpx solid #0d8fcc':''}}">船舶卸货记录</view>
         <view bindtap="changeInfoType" data-type="truck" style="color:{{infoType=='truck'?'#0d8fcc':''}};border-bottom:{{infoType=='truck'?'2rpx solid #0d8fcc':''}}">汽车装货记录</view>

+ 3 - 2
miniprogram/pages/sharePage/sharePage.wxss

@@ -194,13 +194,14 @@ page {
 
 
 .port-btns {
-  width: 200rpx !important;
+  width: 180rpx !important;
   height: 70rpx;
   line-height: 70rpx;
   text-align: center;
   margin-bottom: 20rpx;
   border-radius: 10rpx;
-  border: 1rpx solid grey
+  border: 1rpx solid grey;
+  display: inline-block;
 }
 
 .current-port-btn {

+ 1 - 1
miniprogram/pages/voyages/detail/detail.js

@@ -5,7 +5,7 @@ import {
 Page({
   data: {
     id: '',
-    tab: 4,
+    tab: 1,
     shipDischargeCurrentPage: 1,
     truckLoadCurrentPage: 1,
     coordinates: [],

+ 7 - 7
miniprogram/pages/voyages/detail/detail.wxml

@@ -31,9 +31,11 @@
         <view class="line-title">装货港:</view>
         <view class="line-text">{{voyage.loadPort}}</view>
       </view>
-      <view class="line-item">
-        <view class="line-title">卸货港:</view>
-        <view class="line-text">{{voyage.dischargeProt}}</view>
+    </view>
+    <view class="line">
+      <view class="df">
+        <view style="width: 150rpx;"> 卸货港:</view>
+        <view>{{voyage.dischargePorts}}</view>
       </view>
     </view>
     <view class="line">
@@ -128,10 +130,8 @@
     </view>
   </view>
   <view wx:if="{{tab==4}}">
-    <scroll-view scroll-x="true" style="width: 100%;">
-      <view class="df jcsa" style="min-width: 110vw">
-        <view class="{{['port-btns',currentPortId == item.portId?'current-port-btn':'','mr20']}}" wx:for="{{voyage.voyageDetails}}" bindtap="changePort" data-id="{{item.portId}}">{{item.portName}}</view>
-      </view>
+    <scroll-view scroll-x="{{true}}" style="white-space: nowrap;">
+      <view class="{{['port-btns',currentPortId == item.portId?'current-port-btn':'','mr20']}}" wx:for="{{voyage.voyageDetails}}" bindtap="changePort" data-id="{{item.portId}}">{{item.portName}}</view>
     </scroll-view>
     <view class="df aic jcsb pb20" style="border-bottom: 2rpx solid #ddd;">
       <view bindtap="changeInfoType" data-type="ship" style="color:{{infoType=='ship'?'#0d8fcc':''}};border-bottom:{{infoType=='ship'?'2rpx solid #0d8fcc':''}}">船舶卸货记录</view>

+ 3 - 2
miniprogram/pages/voyages/detail/detail.wxss

@@ -119,13 +119,14 @@ page {
 }
 
 .port-btns {
-  width: 200rpx !important;
+  width: 180rpx !important;
   height: 70rpx;
   line-height: 70rpx;
   text-align: center;
   margin-bottom: 20rpx;
   border-radius: 10rpx;
-  border: 1rpx solid grey
+  border: 1rpx solid grey;
+  display: inline-block;
 }
 
 .current-port-btn {