Parcourir la source

更新 搜索框

wzh il y a 3 ans
Parent
commit
388638d766

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

@@ -1,5 +1,5 @@
 <!--components/newPicker/newPicker.wxml-->
-<view class="modal {{visable?'':'modal-down'}}" style="width:100vw;height:100vh;position:fixed;top:0;left:0;background: #fff;z-index: 10;">
+<view class="modal {{visable?'modal-in':''}} " style="width:100vw;height:100vh;position:fixed;top:0;right:-100vw;background: #fff;z-index: 1000;">
   <view class="df jcsa">
     <input type="text" class="search" placeholder="{{placeholder}}" bindconfirm="_getList" bindinput="_getList" value="{{label}}" />
     <view class="cancel" bindtap="cancel">返回</view>

+ 9 - 9
miniprogram/components/newPicker/newPicker.wxss

@@ -42,29 +42,29 @@
 .modal {
   position: absolute;
   bottom: 0;
-  animation: moveUp 0.3s 1 forwards;
+
 }
 
-.modal-down {
-  animation: moveDown 0.3s 1 forwards;
+.modal-in {
+  animation: moveIn 0.3s 1 forwards;
 }
 
-@keyframes moveUp {
+@keyframes moveIn {
   from {
-    top: 100vh;
+    right: -100vw;
   }
 
   to {
-    top: 0;
+    right: 0;
   }
 }
 
-@keyframes moveDown {
+@keyframes moveOut {
   from {
-    top: 0;
+    right: 0;
   }
 
   to {
-    top: 100vh;
+    right: -100vw;
   }
 }

+ 10 - 9
miniprogram/pages/voyages/detail/detail.wxml

@@ -10,7 +10,7 @@
   <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">
+<view scroll-y="true" style="height:calc(100vh - 570rpx);font-size: 28rpx;color:#222;padding-bottom: 50rpx;" lower-threshold="50">
   <view wx:if="{{tab==1}}">
     <view class="line">
       <view class="line-full-item">
@@ -57,7 +57,7 @@
         <view class="df aic jcsb line">
           <view>卸货港</view>
           <view>
-            <RemotePicker placeholder="选择装货港" bind:selectItem="selectDischargePort" url="/port/getCol"></RemotePicker>
+            <NewPicker placeholder="选择装货港" bind:selectItem="selectDischargePort" url="/port/getCol"></NewPicker>
           </view>
         </view>
         <view class="df aic jcsa">
@@ -92,8 +92,8 @@
     <view class="line">
       <view class="line-full-item">
         <view class="line-full-title">实际货量:</view>
-        <input disabled="{{tab2disabled}}" model:value="{{actualLoadTons}}" type="text" style="width: 20vw;" />{{' 吨'}}
-        <input disabled="{{tab2disabled}}" model:value="{{actualLoadPieces}}" type="text" style="width: 10vw;" />{{' 件'}}
+        <input class="d-input" disabled="{{tab2disabled}}" model:value="{{actualLoadTons}}" type="text" style="width: 20vw;" />{{' 吨'}}
+        <input class="d-input" disabled="{{tab2disabled}}" model:value="{{actualLoadPieces}}" type="text" style="width: 10vw;" />{{' 件'}}
       </view>
     </view>
     <view class="line">
@@ -117,7 +117,7 @@
       </view>
     </view>
     <view class="df aic jcsa p20" style="border-top: 1px solid #999;">
-      <view wx:for="{{voyageDetails}}" 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" 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}}
@@ -175,11 +175,12 @@
     <view class="line">
       <view class="line-full-item">
         <view class="line-full-title">实际卸货量:</view>
-        <input disabled="{{tab2disabled}}" bindblur="bindDischargePortChange" value="{{voyageDetails[currentDischargeIndex].actualDischargeTons}}" data-index="{{currentDischargeIndex}}" data-param="actualDischargeTons" type="text" style="width: 20vw;" />{{' 吨'}}
-        <input disabled="{{tab2disabled}}" bindblur="bindDischargePortChange" value="{{voyageDetails[currentDischargeIndex].actualDischargePieces}}" data-index="{{currentDischargeIndex}}" data-param="actualDischargePieces" type="text" style="width: 10vw;" />{{' 件'}}
+        <input class="d-input" disabled="{{tab2disabled}}" bindblur="bindDischargePortChange" value="{{voyageDetails[currentDischargeIndex].actualDischargeTons}}" data-index="{{currentDischargeIndex}}" data-param="actualDischargeTons" type="text" style="width: 20vw;" />{{' 吨'}}
+        <input class="d-input" disabled="{{tab2disabled}}" bindblur="bindDischargePortChange" value="{{voyageDetails[currentDischargeIndex].actualDischargePieces}}" data-index="{{currentDischargeIndex}}" data-param="actualDischargePieces" type="text" style="width: 10vw;" />{{' 件'}}
       </view>
     </view>
     <view class="next" bindtap="updateVoyage">更新航次</view>
+    <view style="height: 30px;"></view>
   </view>
   <view class="p30" wx:if="{{tab==4}}">
     <view>保险单</view>
@@ -198,7 +199,7 @@
   </view>
   <view class="p30" wx:if="{{tab==3}}">
     <scroll-view scroll-x="{{true}}" style="white-space: nowrap;">
-      <view class="{{['port-btns',currentPortId == item.portId?'current-port-btn':'','mr20']}}" wx:for="{{voyageDetails}}" bindtap="changePort" data-id="{{item.portId}}">{{item.portName}}</view>
+      <view class="{{['port-btns',currentPortId == item.portId?'current-port-btn':'','mr20']}}" wx:for="{{voyageDetails}}" bindtap="changePort" wx:key="portId" 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>
@@ -249,4 +250,4 @@
       <image data-src="{{item.viewUrl}}" bindtap="previewImage" src="{{item.viewUrl}}" style="width: 90%;display: block;margin: 0 auto;" mode="aspectFit"></image>
     </view>
   </view>
-</scroll-view>
+</view>

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

@@ -173,12 +173,12 @@ page {
 }
 
 .mask {
-  position: fixed;
+  position: absolute;
   top: 0;
   right: 0;
   bottom: 0;
   left: 0;
-  z-index: 200;
+  z-index: 5;
 
 }
 
@@ -194,7 +194,7 @@ page {
 }
 
 picker,
-input {
+.d-input {
   border: 1rpx solid grey;
   padding: 0rpx 10rpx;
 }