wzh 3 роки тому
батько
коміт
d1ecc1096c

+ 7 - 5
miniprogram/pages/voyages/detail/detail.js

@@ -9,7 +9,7 @@ import {
 Page({
   data: {
     id: '',
-    tab: 3,
+    tab: 1,
     shipDischargeCurrentPage: 1,
     truckLoadCurrentPage: 1,
     coordinates: [],
@@ -52,7 +52,6 @@ Page({
   async getVoyageDetail() {
     let res = await postApi("/voyage/detail", {
       voyageId: this.data.id,
-      isClient: wx.getStorageSync('isClient'),
       loginAccountId: wx.getStorageSync('loginAccountId'),
     })
 
@@ -148,7 +147,6 @@ Page({
       voyageId: this.data.id,
       size: this.data.pageSize,
       currentPage: this.data.truckLoadCurrentPage,
-      isClient: wx.getStorageSync('isClient'),
       loginAccountId: wx.getStorageSync('loginAccountId')
     })
     this.setData({
@@ -195,7 +193,6 @@ Page({
       voyageId: this.data.id,
       size: this.data.pageSize,
       currentPage: this.data.shipDischargeCurrentPage,
-      isClient: wx.getStorageSync('isClient'),
       loginAccountId: wx.getStorageSync('loginAccountId')
     })
     this.setData({
@@ -394,12 +391,17 @@ Page({
     console.log(res)
   },
   async uploadBill(e) {
+    let {
+      type
+    } = e.currentTarget.dataset
     let postData = {
-      type: e.currentTarget.dataset.type,
+      type,
       voyageId: this.data.id
     }
     let res = await uploadImage("/voyage/uploadVoyageWayBill", postData)
 
+    this.getVoyageDetail()
+
     console.log(res)
   },
   onLoad(options) {

+ 8 - 6
miniprogram/pages/voyages/detail/detail.wxml

@@ -73,7 +73,7 @@
       </view>
       <view class="line-item">
         <view class="line-title">货量:</view>
-        <view class="line-text">{{tons}} 吨</view>
+        <view class="line-text" style="width: 40vw;">{{tons}} 吨</view>
         <view class="line-text">{{pieces}} 件</view>
       </view>
     </view>
@@ -92,7 +92,7 @@
     <view class="line">
       <view class="line-full-item">
         <view class="line-full-title">实际货量:</view>
-        <input disabled="{{tab2disabled}}" model:value="{{actualLoadTons}}" type="text" style="width: 10vw;" />{{' 吨'}}
+        <input disabled="{{tab2disabled}}" model:value="{{actualLoadTons}}" type="text" style="width: 20vw;" />{{' 吨'}}
         <input disabled="{{tab2disabled}}" model:value="{{actualLoadPieces}}" type="text" style="width: 10vw;" />{{' 件'}}
       </view>
     </view>
@@ -175,7 +175,7 @@
     <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: 10vw;" />{{' 吨'}}
+        <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;" />{{' 件'}}
       </view>
     </view>
@@ -187,16 +187,16 @@
       <image data-src="{{item.viewUrl}}" bindtap="previewImage" src="{{item.viewUrl}}" style="width: 60%;height: 240rpx;" mode="aspectFit"></image>
       <view wx:if="{{policys.length&&policys.length!=1}}" class="mt10 mb10" style="border-bottom: 2rpx solid #eee;"></view>
     </view>
-    <view class="upload" bindtap="uploadBill" data-type="{{3}}">上传保险单</view>
+    <view class="next" bindtap="uploadBill" data-type="{{3}}">上传保险单</view>
     <view class="mt30 mb30" style="border-bottom: 2rpx solid #ccc;"></view>
     <view>运单</view>
     <view wx:for="{{waybills}}" wx:key="index" style="text-align: center;">
       <image data-src="{{item.viewUrl}}" bindtap="previewImage" src="{{item.viewUrl}}" style="width: 60%;height: 240rpx;" mode="aspectFit"></image>
       <view wx:if="{{waybills.length&&waybills.length!=1}}" class="mt10 mb10" style="border-bottom: 2rpx solid #eee;"></view>
     </view>
-    <view class="upload" bindtap="uploadBill" data-type="{{1}}">上传运单</view>
+    <view class="next" bindtap="uploadBill" data-type="{{1}}">上传运单</view>
   </view>
-  <view wx:if="{{tab==4}}">
+  <view class="p30" wx:if="{{tab==4}}">
     <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>
     </scroll-view>
@@ -219,6 +219,7 @@
         <view wx:else>暂无</view>
       </view>
       <view bindtap="scrollShip" class="bottom-text">{{shipDischargeTotal==0?'暂无数据':(shipDischargeTotal>pageSize*shipDischargeCurrentPage?'点击或滑动加载更多...':'已加载完毕')}}</view>
+      <view class="next" bindtap="uploadBill" data-type="{{2}}">上传磅单</view>
     </view>
     <view class="truck-load-list" wx:if="{{infoType=='truck'}}">
       <view class="df aic jcsb mb20 mt10 fs22">
@@ -239,6 +240,7 @@
         <view wx:else>暂无</view>
       </view>
       <view bindtap="scrollTruck" class="bottom-text">{{truckLoadTotal==0?'暂无数据':(truckLoadTotal>pageSize*truckLoadCurrentPage?'点击或滑动加载更多...':'已加载完毕')}}</view>
+      <view class="next" bindtap="uploadBill" data-type="{{4}}">上传汽运单</view>
     </view>
   </view>
   <view wx:if="{{tab==5}}">

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

@@ -153,18 +153,14 @@ page {
 
 .next {
   text-align: center;
-
-
-
   color: #fff;
   background: #0094FE;
   border-radius: 10rpx;
-
   width: 200rpx;
   height: 50rpx;
   line-height: 50rpx;
   font-size: 26rpx;
-  margin: 0;
+  margin: 0 auto;
 }
 
 .delete {
@@ -205,9 +201,9 @@ input {
 
 .upload {
   width: 60%;
-  height: 200rpx;
+  height: 100rpx;
   text-align: center;
-  line-height: 200rpx;
+  line-height: 100rpx;
   border: 1px solid grey;
   margin: 3vw auto;
 }