Explorar el Código

更新 航次详情-航次信息-样式;更新组件

王智慧 hace 3 años
padre
commit
dd77802150

+ 1 - 1
miniprogram/components/newPicker/newPicker.js

@@ -60,7 +60,7 @@ Component({
         value,
       })
       this.setData({
-        label
+        label: ''
       })
       this.cancel()
     },

+ 1 - 1
miniprogram/components/newPicker/newPicker.wxml

@@ -13,4 +13,4 @@
     <view wx:if="{{!isInit&&!arr.length}}" class="items" style="color:#ddd;text-align:center">暂无数据</view>
   </view>
 </view>
-<view bindtap="showModal" class="btn" style="color:{{label?'#333':'#777'}}">{{label||placeholder}}</view>
+<view bindtap="showModal" style="{{inputStyle}}">{{value||placeholder}}</view>

+ 0 - 8
miniprogram/components/newPicker/newPicker.wxss

@@ -31,14 +31,6 @@
   justify-content: space-around;
 }
 
-.btn {
-  padding-left: 20rpx;
-  border: 1px solid grey;
-  height: 80rpx;
-  line-height: 80rpx;
-  width: 50vw;
-}
-
 .modal {
   position: absolute;
   bottom: 0;

+ 3 - 0
miniprogram/pages/voyageManage/myBills/myBill.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "单据处理"
+}

+ 3 - 0
miniprogram/pages/voyageManage/myDaily/myDaily.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "日报提交"
+}

+ 2 - 0
miniprogram/pages/voyages/detail/detail.js

@@ -301,6 +301,7 @@ Page({
 
   },
   showAddDischargePortModal() {
+    console.log(1)
     this.setData({
       dischargeModal: true
     })
@@ -330,6 +331,7 @@ Page({
       currentDischargePortId: e.detail.value,
       currentDischargePort: e.detail.label
     })
+    this.addDischargePort()
   },
 
 

+ 33 - 40
miniprogram/pages/voyages/detail/detail.wxml

@@ -1,21 +1,20 @@
-<map enable-zoom="{{false}}" enable-scroll="{{false}}" markers="{{markers}}" include-points="{{points}}" latitude="{{latitude}}" longitude="{{longitude}}" style="width: 100%;height: 400rpx;" name="map"></map>
-<view class="df aic jcfe p10 fs24">
-  <view wx:if="{{canComplete}}" bindtap="completeVoyage" class="voyage-btn back-blue">完成航次</view>
-  <view wx:if="{{canCancel}}" bindtap="cancelVoyage" class="voyage-btn back-red">取消航次</view>
+<view wx:if="{{canCancel}}" bindtap="cancelVoyage" class="cancel-voyage">取消航次</view>
+<!-- <map enable-zoom="{{false}}" enable-scroll="{{false}}" markers="{{markers}}" include-points="{{points}}" latitude="{{latitude}}" longitude="{{longitude}}" style="width: 100%;height: 294rpx;" name="map" class="map"></map> -->
+<view style="width: 100%;height: 294rpx;"></view>
+<!-- <view wx:if="{{canComplete}}" bindtap="completeVoyage" class="voyage-btn back-blue">完成航次</view> -->
+<view class="df aic jcsa tabs" style="padding: 0 20rpx;margin-bottom:32rpx">
+  <view class="tabsview {{tab==1?'current-tab':''}}" bindtap="changeTab" data-tab="{{1}}">航次信息</view>
+  <view class="tabsview {{tab==2?'current-tab':''}}" bindtap="changeTab" data-tab="{{2}}">运输记录</view>
+  <view class="tabsview {{tab==3?'current-tab':''}}" bindtap="changeTab" data-tab="{{3}}">卸货信息</view>
+  <view class="tabsview {{tab==4?'current-tab':''}}" bindtap="changeTab" data-tab="{{4}}">单据信息</view>
+  <view class="tabsview {{tab==5?'current-tab':''}}" bindtap="changeTab" data-tab="{{5}}">航次照片</view>
 </view>
-<view class="df aic jcsb p20" style="border-bottom: 1px solid #999;border-top: 1px solid #999;">
-  <view class="tabsview" bindtap="changeTab" data-tab="{{1}}" style="color:{{tab==1?'#0d8fcc':''}};border-bottom:{{tab==1?'2rpx solid #0d8fcc':''}}">航次信息</view>
-  <view class="tabsview" bindtap="changeTab" data-tab="{{2}}" style="color:{{tab==2?'#0d8fcc':''}};border-bottom:{{tab==2?'2rpx solid #0d8fcc':''}}">运输记录</view>
-  <view class="tabsview" bindtap="changeTab" data-tab="{{3}}" style="color:{{tab==3?'#0d8fcc':''}};border-bottom:{{tab==3?'2rpx solid #0d8fcc':''}}">卸货信息</view>
-  <view class="tabsview" bindtap="changeTab" data-tab="{{4}}" style="color:{{tab==4?'#0d8fcc':''}};border-bottom:{{tab==4?'2rpx solid #0d8fcc':''}}">单据信息</view>
-  <view class="tabsview" bindtap="changeTab" data-tab="{{5}}" style="color:{{tab==5?'#0d8fcc':''}};border-bottom:{{tab==5?'2rpx solid #0d8fcc':''}}">航次照片</view>
-</view>
-<scroll-view scroll-y="true" style="height:calc(100vh - 570rpx);font-size: 28rpx;color:#222;padding-bottom: 50rpx;" lower-threshold="50">
+<scroll-view scroll-y="true" class="scroll" lower-threshold="50">
   <view wx:if="{{tab==1}}">
     <view class="line">
       <view class="line-full-item">
         <view class="line-full-title">航次名称:</view>
-        <view class="line-full-text">{{voyageName}}</view>
+        <view class="line-text">{{voyageName}}</view>
       </view>
     </view>
     <view class="line">
@@ -37,36 +36,34 @@
       </view>
     </view>
     <view class="line">
-      <view class="line-item">
-        <view class="line-title">装货港:</view>
+      <view class="line-full-item">
+        <view class="line-full-title">装货港:</view>
         <view class="line-text">{{loadPort}}</view>
       </view>
     </view>
     <view class="line" wx:for="{{dischargePorts}}" wx:key="item">
-      <view class="line-item">
-        <view class="line-title">卸货港 #{{index+1}}:</view>
+      <view class="line-full-item">
+        <view class="line-full-title">卸货港 #{{index+1}}:</view>
         <view class="line-text">{{item}}</view>
+        <NewPicker wx:if="{{dischargePorts.length-1==index}}" value="{{currentDischargePort}}" placeholder="添加卸货港" inputStyle="width: 180rpx;height: 56rpx;background: #0089FD;border-radius: 12rpx;font-size: 26rpx;font-family: PingFangSC-Medium, PingFang SC;font-weight: 500;color: #FFFFFF;line-height: 56rpx;text-align:center" bind:selectItem="selectDischargePort" url="/port/getCol"></NewPicker>
       </view>
     </view>
-    <view class="df aic jcsb line" wx:if="{{dischargePorts.length}}">
-      <view></view>
-      <view class="next" bindtap="showAddDischargePortModal">添加卸货港</view>
-    </view>
-
     <view class="line">
-      <view class="line-item">
-        <view class="line-title">货种:</view>
+      <view class="line-full-item">
+        <view class="line-full-title">货种:</view>
         <view class="line-text">{{cargo}}</view>
       </view>
-      <view class="line-item">
-        <view class="line-title">货量:</view>
-        <view class="line-text" style="width: 40vw;">{{tons}} 吨</view>
+    </view>
+    <view class="line">
+      <view class="line-full-item">
+        <view class="line-full-title">货量:</view>
+        <view class="line-text mr20">{{tons}} 吨</view>
         <view class="line-text">{{pieces||'-'}} 件</view>
       </view>
     </view>
     <view class="line">
-      <view class="line-item">
-        <view class="line-title" style="width: 300rpx;">合理卸货天数:</view>
+      <view class="line-full-item">
+        <view class="line-full-title">合理卸货天数:</view>
         <view class="line-text">{{reasonableUnloadingDays}}</view>
       </view>
     </view>
@@ -118,7 +115,7 @@
       </view>
     </view>
     <view class="df aic jcsa p20" style="border-top: 1px solid #999;">
-      <view wx:for="{{voyageDetails}}" wx:key="portId" class="tabsview" bindtap="changeDischargeTab" data-index="{{index}}" style="color:{{currentDischargeIndex==index?'#0d8fcc':''}};border-bottom:{{currentDischargeIndex==index?'2rpx solid #0d8fcc':''}}">{{item.portName}}</view>
+      <view wx:for="{{voyageDetails}}" wx:key="portId" class="tabsview {{tab==2?'current-tab':''}}" bindtap="changeDischargeTab" data-index="{{index}}" style="color:{{currentDischargeIndex==index?'#0d8fcc':''}};border-bottom:{{currentDischargeIndex==index?'2rpx solid #0d8fcc':''}}">{{item.portName}}</view>
     </view>
     <view class="line" style="padding: 20rpx 0 10rpx 0;border-top: 1px solid grey;margin-top: 10rpx;">
       {{voyageDetails[currentDischargeIndex].portName}} # {{currentDischargeIndex+1}}
@@ -253,16 +250,12 @@
   </view>
 </scroll-view>
 <view wx:if="{{dischargeModal}}" class="mask" catchtouchmove="doNothing">
-  <view style="padding: 20rpx 0;">
-    <view class="df aic jcsb line">
-      <view>卸货港</view>
-      <view>
-        <NewPicker placeholder="选择装货港" bind:selectItem="selectDischargePort" url="/port/getCol"></NewPicker>
-      </view>
-    </view>
-    <view class="df aic jcsa">
-      <view class="next mt30" bindtap="addDischargePort">添加卸货港</view>
-      <view class="next mt30" bindtap="cancelAddDischargePort">取消</view>
+  <view>
+    <view class="ship-owner-title">添加卸货港</view>
+    <NewPicker placeholder="添加卸货港" inputStyle="width:400rpx;margin:0 auto" bind:selectItem="selectDischargePort" url="/port/getCol"></NewPicker>
+    <view class="df btns">
+      <view class="btn btn-1" bindtap="cancelAddDischargePort">取消</view>
+      <view class="btn btn-2" bindtap="addDischargePort">确定</view>
     </view>
   </view>
 </view>

+ 84 - 165
miniprogram/pages/voyages/detail/detail.wxss

@@ -1,178 +1,73 @@
-/* components/voyages/Voyages.wxss */
-page {
-  background: #fff;
-}
-
-.df {
-  display: flex;
-}
-
-.jcsb {
-  justify-content: space-between;
-}
-
-.jcc {
-  justify-content: center;
-}
-
-.jcfe {
-  justify-content: flex-end;
+.cancel-voyage {
+  width: 100vw;
+  height: 80rpx;
+  background: rgba(255, 100, 47, 0.15);
+  text-align: center;
+  line-height: 80rpx;
+  font-size: 28rpx;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #FF6E38;
+  position: fixed;
+  top: 0;
+  z-index: 100;
 }
 
-.jcsa {
-  justify-content: space-around;
-}
 
-.aic {
-  align-items: center;
+.tabsview {
+  height: 80rpx;
+  line-height: 84rpx;
+  font-size: 28rpx;
+  font-family: PingFangSC-Semibold, PingFang SC;
+  font-weight: 600;
+  color: #9199A3;
 }
 
-.search {
-  border: 1rpx solid grey;
-  width: 80%;
-  background: #fff;
-}
+.current-tab {
+  color: #363F4A;
+  border-bottom: 6rpx solid #0089FD;
+  font-size: 32rpx;
 
-.tabs {
-  width: 100%;
-  height: 100rpx;
-  background: #fff;
-  box-shadow: rgb(209, 206, 206) 5rpx 5rpx 10rpx;
-  border-bottom: 2rpx solid grey;
 }
 
-.tabsview {
-  width: 130rpx;
-  height: 50rpx;
+.scroll {
+  width: 100vw;
+  background: #FFFFFF;
+  border-radius: 12rpx;
+  height: calc(100vh - 410rpx);
   font-size: 28rpx;
-  text-align: center;
-  color: #333;
+  color: #222;
+  padding-bottom: 50rpx;
+  background: #FFFFFF;
+  border-radius: 12rpx;
+  padding: 40rpx 30rpx;
 }
 
 .line {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  margin-bottom: 30rpx;
-  color: #333;
-}
-
-.line-item {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  width: 45%;
+  margin-bottom: 20rpx;
 }
 
 .line-full-item {
-  width: 100%;
   display: flex;
   align-items: center;
 }
 
 .line-full-title {
-  width: 25%;
-}
-
-
-.line-title,
-.line-text {
-  width: 50%;
-}
-
-.line-title,
-.line-full-title {
-  color: #444;
-}
-
-.type2 .line-full-title {
-  width: 50%;
-}
-
-.ship-discharge-list>view:first-child {
-  font-size: 26rpx;
-}
-
-.ship-discharge-list>view>view {
-  width: 160rpx;
-  text-align: center;
-  color: #444;
-}
-
-.truck-load-list>view:first-child {
-  font-size: 26rpx;
-}
-
-.truck-load-list>view>view {
-  width: 160rpx;
-  text-align: center;
-  color: #444;
-}
-
-
-.bottom-text {
-  text-align: center;
-  padding-top: 30rpx;
-  padding-bottom: 50rpx;
-  font-size: 22rpx;
-  color: #777;
-}
-
-.port-btns {
-  width: 180rpx !important;
-  height: 70rpx;
-  line-height: 70rpx;
-  text-align: center;
-  margin-bottom: 20rpx;
-  border-radius: 10rpx;
-  border: 1rpx solid grey;
-  display: inline-block;
-}
-
-.current-port-btn {
-  color: #fff;
-  background: #008ebd;
-  border: none;
-}
-
-.voyage-btn {
-  height: 70rpx;
-  line-height: 70rpx;
-  border-radius: 10rpx;
-  padding: 0 30rpx;
-  margin-right: 20rpx;
-  color: #fff;
+  width: 240rpx;
   font-size: 30rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #BDC2C8;
 }
 
-.line {
-  width: 80%;
-  margin: 30rpx auto;
-  font-size: 28rpx;
-  position: relative;
-}
-
-.next {
-  text-align: center;
-  color: #fff;
-  background: #0094FE;
-  border-radius: 10rpx;
-  margin: 20rpx auto;
-  height: 70rpx;
-  line-height: 70rpx;
-  border-radius: 10rpx;
-  padding: 0 30rpx;
+.line-text {
+  flex: 1;
   font-size: 30rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #6C6C6C;
 }
 
-.delete {
-  position: absolute;
-  right: 10rpx;
-  top: 14rpx;
-  width: 52rpx;
-  height: 52rpx;
-  z-index: 5;
-}
 
 .mask {
   position: absolute;
@@ -180,19 +75,18 @@ page {
   right: 0;
   bottom: 0;
   left: 0;
-  z-index: 5;
-
+  z-index: 101;
+  background: rgba(0, 0, 0, 0.4);
 }
 
 .mask>view {
-  width: 80vw;
-  height: 35vw;
-  border-radius: 3vw;
-  box-shadow: 2rpx 2rpx 10rpx 1rpx rgb(175, 172, 172);
+  width: 640rpx;
+  height: 362rpx;
+  background: #FFFFFF;
+  border-radius: 16rpx;
   position: fixed;
-  bottom: 400rpx;
-  left: 10vw;
-  background: #fff;
+  top: 358rpx;
+  left: calc(50vw - 320rpx);
 }
 
 picker,
@@ -210,11 +104,36 @@ picker,
   margin: 3vw auto;
 }
 
-.upload-bill-visable {
-  position: fixed;
-  top: 0;
-  right: 0;
-  bottom: 0;
-  left: 0;
-  background: #fff;
+.ship-owner-title {
+  width: 300rpx;
+  text-align: center;
+  font-size: 34rpx;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #20252E;
+  margin: 40rpx auto;
+}
+
+.btns {
+  height: 113rpx;
+  border-bottom-left-radius: 10rpx;
+  border-bottom-right-radius: 10rpx;
+  border-top: 1rpx solid rgba(0, 0, 0, 0.25);
+  margin-top: 50rpx;
+}
+
+.btn {
+  width: 50%;
+  line-height: 100rpx;
+  font-size: 34rpx;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #0089FD;
+  text-align: center;
+}
+
+.btn-1 {
+  color: #20252E;
+  height: 102rpx;
+  border-right: 1rpx solid rgba(0, 0, 0, 0.25);
 }

+ 7 - 0
project.private.config.json

@@ -57,6 +57,13 @@
           "query": "",
           "launchMode": "default",
           "scene": null
+        },
+        {
+          "name": "",
+          "pathName": "pages/voyages/detail/detail",
+          "query": "id=270",
+          "launchMode": "default",
+          "scene": null
         }
       ]
     }