Переглянути джерело

更新 航次管理;单据,日报-样式

王智慧 3 роки тому
батько
коміт
19700ad36a

+ 5 - 2
miniprogram/app.json

@@ -24,7 +24,9 @@
     "pages/index/declarePort/detail",
     "pages/index/security/security",
     "pages/voyageManage/myBills/myLab/myLab",
-    "pages/voyageManage/myBills/labDetail/labDetail"
+    "pages/voyageManage/myBills/labDetail/labDetail",
+    "pages/voyageManage/dailyVoyageList/dailyVoyageList",
+    "pages/voyageManage/billVoyageList/billVoyageList"
   ],
   "window": {
     "backgroundColor": "#F6F6F6",
@@ -34,7 +36,8 @@
     "navigationBarTextStyle": "black"
   },
   "tabBar": {
-    "list": [{
+    "list": [
+      {
         "pagePath": "pages/index/index",
         "text": "首页",
         "iconPath": "images/tabBar/index.png",

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

@@ -1,7 +1,7 @@
 <view class="list">
   <view class="df jcsb aic" style="margin-bottom: 30rpx;">
     <view class="df aic">
-      <view class="icon"></view>
+      <image class="icon" src="../../images/newUI/ship-back.png"></image>
       <view class="ship-name">{{item.shipName}}</view>
       <view class="{{status[item.transStatusName]}}">{{item.transStatusName}}</view>
     </view>

+ 1 - 1
miniprogram/pages/index/declarePort/voyageList.wxml

@@ -1,7 +1,7 @@
 <DateBar></DateBar>
 <view class="search df aic">
   <input model:value="{{term}}" confirm-type="search" bindconfirm="inputSearch" type="text" placeholder="航次筛选" placeholder-class="placeholder" />
-  <image src="../../../images/newUI/hmbb.png" class="avatar" bindtap="inputSearch"></image>
+  <image src="../../../images/newUI/search.png" class="avatar" bindtap="inputSearch"></image>
 </view>
 <view class="df aic tabs">
   <view class="tabsview tabsview-1" bindtap="changeStatus" data-status="{{0}}" style="color:{{status==0?'#363F4A':'#9199A3'}};border-bottom:{{status==0?'6rpx solid #0089FD':''}}">未报港</view>

+ 0 - 1
miniprogram/pages/index/declarePort/voyageList.wxss

@@ -13,7 +13,6 @@
 }
 
 .avatar {
-  background: grey;
   width: 52rpx;
   height: 52rpx;
   border-radius: 50%;

+ 1 - 2
miniprogram/pages/index/index.js

@@ -55,8 +55,7 @@ Page({
       url,
       maintab
     } = e.currentTarget.dataset
-    app.globalData.maintab = maintab
-    if (maintab) {
+    if (url == "/pages/voyageManage/voyageManage") {
       wx.switchTab({
         url
       })

+ 2 - 2
miniprogram/pages/index/index.wxml

@@ -49,7 +49,7 @@
         </view> -->
       </view>
     </view>
-    <view class="df aic func-line-right" bindtap="goTo" data-maintab="{{2}}" data-url="/pages/voyageManage/voyageManage">
+    <view class="df aic func-line-right" bindtap="goTo" data-maintab="{{2}}" data-url="/pages/voyageManage/dailyVoyageList/dailyVoyageList">
       <image class="icon" src="https://frontend-1255802371.cos.ap-shanghai.myqcloud.com/note.jpg"></image>
       <view>
         <view class="title">日报</view>
@@ -71,7 +71,7 @@
         </view>
       </view>
     </view>
-    <view class="df aic func-line-right" bindtap="goTo" data-maintab="{{3}}" data-url="/pages/voyageManage/voyageManage">
+    <view class="df aic func-line-right" bindtap="goTo" data-maintab="{{3}}" data-url="/pages/voyageManage/billVoyageList/billVoyageList">
       <image class="icon" src="https://frontend-1255802371.cos.ap-shanghai.myqcloud.com/note.jpg"></image>
       <view>
         <view class="title">单据</view>

+ 257 - 0
miniprogram/pages/voyageManage/billVoyageList/billVoyageList.js

@@ -0,0 +1,257 @@
+const {
+  postApi
+} = require("../../../apis/api")
+
+import {
+  datetimeFormat
+} from "../../../utils/utils"
+
+const app = getApp()
+
+Page({
+  data: {
+    cargoOwnerId: 0,
+    defaultParams: {
+      loginAccountId: wx.getStorageSync('loginAccountId')
+    },
+    maintab: 3,
+    status: 1,
+    currentPage: 1,
+    size: 20,
+    list: [],
+    total: 0,
+    term: "",
+    isFreshing: false,
+    apiArr: ['/voyage/wx/list', '/dayReport/list', '/bill/list']
+  },
+  selectCargoOwner(e) {
+    this.setData({
+      cargoOwnerId: e.detail.value,
+      list: [],
+      currentPage: 1,
+    })
+    this.getList()
+  },
+  changeMainTab(e) {
+    let {
+      maintab,
+      api: currentApi
+    } = e.currentTarget.dataset
+    app.globalData.maintab = maintab
+    this.setData({
+      maintab,
+      currentApi,
+      status: 1,
+      list: [],
+      currentPage: 1
+    })
+    this.getList()
+  },
+  async getList(isScroll) {
+    if (!wx.getStorageSync('loginAccountId')) {
+      wx.showToast({
+        title: '尚未登录',
+        icon: "error"
+      })
+      return
+    }
+    this.setData({
+      isFreshing: true
+    })
+    let url
+    if (this.data.maintab == 3 && this.data.status == 2) {
+      url = '/voyage/wx/lab/list'
+    } else {
+      url = this.data.apiArr[this.data.maintab - 1]
+    }
+    let res = await postApi(url, {
+      loginAccountId: wx.getStorageSync('loginAccountId'),
+      // cargoOwnerId: this.data.cargoOwnerId,
+      term: this.data.term,
+      status: this.data.status,
+      currentPage: this.data.currentPage,
+      size: this.data.size,
+    })
+    this.setData({
+      currentPage: this.data.currentPage,
+      isFreshing: false
+    })
+    if (res.data.status == 0) {
+      if (isScroll) {
+        this.setData({
+          list: [...this.data.list, ...res.data.result],
+          total: res.data.total
+        })
+      } else {
+        this.setData({
+          list: res.data.result,
+          total: res.data.total
+        })
+      }
+    } else {
+      this.setData({
+        list: [],
+        total: 0
+      })
+      wx.showToast({
+        icon: "none",
+        title: res.data.msg,
+      })
+    }
+  },
+  async getLabList(isScroll) {
+    if (!wx.getStorageSync('loginAccountId')) {
+      wx.showToast({
+        title: '尚未登录',
+        icon: "error"
+      })
+      return
+    }
+    this.setData({
+      isFreshing: true
+    })
+    let res = await postApi('/voyage/wx/lab/list', {
+      loginAccountId: wx.getStorageSync('loginAccountId'),
+      term: this.data.term,
+      currentPage: this.data.currentPage,
+      size: this.data.size,
+    })
+    this.setData({
+      currentPage: this.data.currentPage,
+      isFreshing: false
+    })
+    if (res.data.status == 0) {
+      if (isScroll) {
+        this.setData({
+          list: [...this.data.list, ...res.data.result],
+          total: res.data.total
+        })
+      } else {
+        this.setData({
+          list: res.data.result,
+          total: res.data.total
+        })
+      }
+    } else {
+      this.setData({
+        list: [],
+        total: 0
+      })
+      wx.showToast({
+        icon: "none",
+        title: res.data.msg,
+      })
+    }
+  },
+  changeStatus(e) {
+    let {
+      status,
+      islab
+    } = e.currentTarget.dataset
+    this.setData({
+      status,
+      currentPage: 1,
+      size: 20,
+      total: 0
+    })
+    this.getList()
+    return
+    if (islab) {
+      this.getLabList()
+    } else {
+      this.getList()
+    }
+  },
+  goToDetail(e) {
+    let {
+      id,
+      trans
+    } = e.currentTarget.dataset
+    let url = ''
+    switch (this.data.maintab) {
+      case 1: {
+        url = `/pages/voyages/detail/detail?id=${id}`
+        break
+      }
+      case 2: {
+        if (this.data.status == 2) {
+          wx.showToast({
+            title: '请联系船东拍照',
+            icon: "error"
+          })
+          return
+        }
+        url = `/pages/voyageManage/myDaily/myDaily?id=${id}&trans=${trans}`
+        // let {
+        //   medias,
+        //   trans,
+        //   index
+        // } = e.currentTarget.dataset
+        // if (medias.length == 1) {
+        //   app.globalData.currentExamineMedia = medias[0]
+        //   url = `/pages/voyageManage/myDaily/examine/examine?id=${id}&trans=${trans}`
+        // } else {
+        //   url = `/pages/voyageManage/myDaily/myDaily?id=${id}&trans=${trans}`
+        // }
+        break
+      }
+      case 3: {
+        if (this.data.status == 1) {
+          let {
+            index
+          } = e.currentTarget.dataset
+          if (this.data.list[index].shipownerUploadFiles.length == 1) {
+            this.data.list[index].shipownerUploadFiles[0].checked = true
+            app.globalData.currentBillItem = this.data.list[index]
+            url = `/pages/voyageManage/myBills/examine/examine?id=${id}`
+          } else {
+            app.globalData.currentBillItem = this.data.list[index]
+            url = `/pages/voyageManage/myBills/myBills?id=${id}`
+          }
+        } else {
+          url = `/pages/voyageManage/myBills/myLab/myLab?id=${id}`
+        }
+
+        break
+      }
+    }
+    wx.navigateTo({
+      url
+    })
+  },
+  scrollList() {
+    if (this.data.total == 0 || this.data.total <= this.data.size * this.data.currentPage) return
+    this.data.currentPage += 1
+    this.getList(true)
+  },
+  scrollDownList() {
+    this.setData({
+      total: 0,
+      currentPage: 1,
+      list: []
+    })
+    this.getList()
+  },
+
+  call(e) {
+    wx.makePhoneCall({
+      phoneNumber: e.currentTarget.dataset.phone
+    })
+  },
+
+  inputSearch(e) {
+    this.setData({
+      currentPage: 1
+    })
+    this.getList()
+  },
+  onLoad(option) {
+
+  },
+  onShow(option) {
+    this.setData({
+      loginAccountId: wx.getStorageSync('loginAccountId')
+    })
+    this.getList()
+  }
+})

+ 7 - 0
miniprogram/pages/voyageManage/billVoyageList/billVoyageList.json

@@ -0,0 +1,7 @@
+{
+  "usingComponents": {
+    "RemotePicker": "/components/remotePicker/remotePicker"
+  },
+  "navigationBarTitleText": "单据",
+  "disableScroll": true
+}

+ 15 - 0
miniprogram/pages/voyageManage/billVoyageList/billVoyageList.wxml

@@ -0,0 +1,15 @@
+<DateBar></DateBar>
+<view class="search df aic">
+  <input model:value="{{term}}" confirm-type="search" bindconfirm="inputSearch" type="text" placeholder="航次筛选" placeholder-class="placeholder" />
+  <image src="../../../images/newUI/search.png" class="avatar" bindtap="inputSearch"></image>
+</view>
+<view class="df aic tabs">
+  <view class="tabsview tabsview-1" bindtap="changeStatus" data-status="{{1}}" style="color:{{status==1?'#363F4A':'#9199A3'}};border-bottom:{{status==1?'6rpx solid #0089FD':''}}">单据</view>
+  <view class="tabsview" bindtap="changeStatus" data-status="{{2}}" data-islab="{{true}}" style="color:{{status==2?'#363F4A':'#9199A3'}};border-bottom:{{status==2?'6rpx solid #0089FD':''}}">提单</view>
+</view>
+<scroll-view bindrefresherrefresh="scrollDownList" refresher-triggered="{{isFreshing}}" refresher-enabled="{{true}}" scroll-y="true" bindscrolltolower="scrollList" style="height:calc(100vh - 140rpx);padding-bottom: 200rpx;">
+  <VoyageCard wx:for="{{list}}" wx:key="index" item="{{item}}" data-id="{{item.id}}" bindtap="goToDetail" data-index="{{index}}" data-medias="{{item.medias}}" data-trans="{{item.transStatusName}}">
+    <image mode="aspectFit" style="width: 40rpx;height: 40rpx;" catchtap="call" data-phone="{{item.shipOwnerPhone}}" src="../../../images/newUI/phone.png"></image>
+  </VoyageCard>
+  <!-- <view bindtap="scrollList" class="bottom-text">{{total==0?'暂无数据':(total>size*currentPage?'点击或滑动加载更多...':'已加载完毕')}}</view> -->
+</scroll-view>

+ 109 - 0
miniprogram/pages/voyageManage/billVoyageList/billVoyageList.wxss

@@ -0,0 +1,109 @@
+.search {
+  width: 686rpx;
+  height: 76rpx;
+  background: #FFFFFF;
+  box-shadow: 0px 3rpx 9rpx 3rpx rgba(92, 123, 111, 0.26);
+  border-radius: 12rpx;
+  padding-left: 50rpx;
+  color: #333;
+  margin: 0 auto;
+  display: flex;
+  justify-content: space-between;
+  padding-right: 20rpx;
+}
+
+.avatar {
+  width: 52rpx;
+  height: 52rpx;
+  border-radius: 50%;
+}
+
+.tabsview {
+  height: 84rpx;
+  line-height: 84rpx;
+  font-size: 32rpx;
+  font-family: PingFangSC-Semibold, PingFang SC;
+  font-weight: 600;
+  color: #363F4A;
+}
+
+.tabsview-1 {
+  margin-left: 28rpx;
+  margin-right: 40rpx;
+}
+
+.tabs {
+  margin-bottom: 28rpx;
+}
+
+.list {
+  width: 694rpx;
+  height: 172rpx;
+  background: #FFFFFF;
+  border-radius: 12rpx;
+  padding: 32rpx;
+  margin: 0 auto;
+  margin-bottom: 10rpx;
+}
+
+.icon {
+  width: 42rpx;
+  height: 42rpx;
+  background: #0089FD;
+  border-radius: 4rpx;
+  margin-right: 20rpx;
+}
+
+.ship-name {
+  font-size: 32rpx;
+  font-family: PingFangSC-Semibold, PingFang SC;
+  font-weight: 600;
+  color: #20252E;
+  margin-right: 30rpx;
+}
+
+.trans {
+  width: 117rpx;
+  height: 42rpx;
+  line-height: 40rpx;
+  background: rgba(0, 137, 253, 0.13);
+  border-radius: 2rpx;
+  border: 1rpx solid #0089FD;
+  text-align: center;
+  font-size: 24rpx;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #0089FD;
+}
+
+.go-to {
+  flex: 1;
+  text-align: right;
+  font-size: 26rpx;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #0089FD;
+}
+
+.text {
+  font-size: 28rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #6C6C6C;
+}
+
+.shu {
+  margin-left: 16rpx;
+}
+
+.finish {
+  width: 137px;
+  height: 42rpx;
+  background: #15E3AB;
+  border-radius: 2rpx;
+  font-size: 24rpx;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #FFFFFF;
+  line-height: 40rpx;
+}

+ 257 - 0
miniprogram/pages/voyageManage/dailyVoyageList/dailyVoyageList.js

@@ -0,0 +1,257 @@
+const {
+  postApi
+} = require("../../../apis/api")
+
+import {
+  datetimeFormat
+} from "../../../utils/utils"
+
+const app = getApp()
+
+Page({
+  data: {
+    cargoOwnerId: 0,
+    defaultParams: {
+      loginAccountId: wx.getStorageSync('loginAccountId')
+    },
+    maintab: 2,
+    status: 1,
+    currentPage: 1,
+    size: 20,
+    list: [],
+    total: 0,
+    term: "",
+    isFreshing: false,
+    apiArr: ['/voyage/wx/list', '/dayReport/list', '/bill/list']
+  },
+  selectCargoOwner(e) {
+    this.setData({
+      cargoOwnerId: e.detail.value,
+      list: [],
+      currentPage: 1,
+    })
+    this.getList()
+  },
+  changeMainTab(e) {
+    let {
+      maintab,
+      api: currentApi
+    } = e.currentTarget.dataset
+    app.globalData.maintab = maintab
+    this.setData({
+      maintab,
+      currentApi,
+      status: 1,
+      list: [],
+      currentPage: 1
+    })
+    this.getList()
+  },
+  async getList(isScroll) {
+    if (!wx.getStorageSync('loginAccountId')) {
+      wx.showToast({
+        title: '尚未登录',
+        icon: "error"
+      })
+      return
+    }
+    this.setData({
+      isFreshing: true
+    })
+    let url
+    if (this.data.maintab == 3 && this.data.status == 2) {
+      url = '/voyage/wx/lab/list'
+    } else {
+      url = this.data.apiArr[this.data.maintab - 1]
+    }
+    let res = await postApi(url, {
+      loginAccountId: wx.getStorageSync('loginAccountId'),
+      // cargoOwnerId: this.data.cargoOwnerId,
+      term: this.data.term,
+      status: this.data.status,
+      currentPage: this.data.currentPage,
+      size: this.data.size,
+    })
+    this.setData({
+      currentPage: this.data.currentPage,
+      isFreshing: false
+    })
+    if (res.data.status == 0) {
+      if (isScroll) {
+        this.setData({
+          list: [...this.data.list, ...res.data.result],
+          total: res.data.total
+        })
+      } else {
+        this.setData({
+          list: res.data.result,
+          total: res.data.total
+        })
+      }
+    } else {
+      this.setData({
+        list: [],
+        total: 0
+      })
+      wx.showToast({
+        icon: "none",
+        title: res.data.msg,
+      })
+    }
+  },
+  async getLabList(isScroll) {
+    if (!wx.getStorageSync('loginAccountId')) {
+      wx.showToast({
+        title: '尚未登录',
+        icon: "error"
+      })
+      return
+    }
+    this.setData({
+      isFreshing: true
+    })
+    let res = await postApi('/voyage/wx/lab/list', {
+      loginAccountId: wx.getStorageSync('loginAccountId'),
+      term: this.data.term,
+      currentPage: this.data.currentPage,
+      size: this.data.size,
+    })
+    this.setData({
+      currentPage: this.data.currentPage,
+      isFreshing: false
+    })
+    if (res.data.status == 0) {
+      if (isScroll) {
+        this.setData({
+          list: [...this.data.list, ...res.data.result],
+          total: res.data.total
+        })
+      } else {
+        this.setData({
+          list: res.data.result,
+          total: res.data.total
+        })
+      }
+    } else {
+      this.setData({
+        list: [],
+        total: 0
+      })
+      wx.showToast({
+        icon: "none",
+        title: res.data.msg,
+      })
+    }
+  },
+  changeStatus(e) {
+    let {
+      status,
+      islab
+    } = e.currentTarget.dataset
+    this.setData({
+      status,
+      currentPage: 1,
+      size: 20,
+      total: 0
+    })
+    this.getList()
+    return
+    if (islab) {
+      this.getLabList()
+    } else {
+      this.getList()
+    }
+  },
+  goToDetail(e) {
+    let {
+      id,
+      trans
+    } = e.currentTarget.dataset
+    let url = ''
+    switch (this.data.maintab) {
+      case 1: {
+        url = `/pages/voyages/detail/detail?id=${id}`
+        break
+      }
+      case 2: {
+        if (this.data.status == 2) {
+          wx.showToast({
+            title: '请联系船东拍照',
+            icon: "error"
+          })
+          return
+        }
+        url = `/pages/voyageManage/myDaily/myDaily?id=${id}&trans=${trans}`
+        // let {
+        //   medias,
+        //   trans,
+        //   index
+        // } = e.currentTarget.dataset
+        // if (medias.length == 1) {
+        //   app.globalData.currentExamineMedia = medias[0]
+        //   url = `/pages/voyageManage/myDaily/examine/examine?id=${id}&trans=${trans}`
+        // } else {
+        //   url = `/pages/voyageManage/myDaily/myDaily?id=${id}&trans=${trans}`
+        // }
+        break
+      }
+      case 3: {
+        if (this.data.status == 1) {
+          let {
+            index
+          } = e.currentTarget.dataset
+          if (this.data.list[index].shipownerUploadFiles.length == 1) {
+            this.data.list[index].shipownerUploadFiles[0].checked = true
+            app.globalData.currentBillItem = this.data.list[index]
+            url = `/pages/voyageManage/myBills/examine/examine?id=${id}`
+          } else {
+            app.globalData.currentBillItem = this.data.list[index]
+            url = `/pages/voyageManage/myBills/myBills?id=${id}`
+          }
+        } else {
+          url = `/pages/voyageManage/myBills/myLab/myLab?id=${id}`
+        }
+
+        break
+      }
+    }
+    wx.navigateTo({
+      url
+    })
+  },
+  scrollList() {
+    if (this.data.total == 0 || this.data.total <= this.data.size * this.data.currentPage) return
+    this.data.currentPage += 1
+    this.getList(true)
+  },
+  scrollDownList() {
+    this.setData({
+      total: 0,
+      currentPage: 1,
+      list: []
+    })
+    this.getList()
+  },
+
+  call(e) {
+    wx.makePhoneCall({
+      phoneNumber: e.currentTarget.dataset.phone
+    })
+  },
+
+  inputSearch(e) {
+    this.setData({
+      currentPage: 1
+    })
+    this.getList()
+  },
+  onLoad(option) {
+
+  },
+  onShow(option) {
+    this.setData({
+      loginAccountId: wx.getStorageSync('loginAccountId')
+    })
+    this.getList()
+  }
+})

+ 7 - 0
miniprogram/pages/voyageManage/dailyVoyageList/dailyVoyageList.json

@@ -0,0 +1,7 @@
+{
+  "usingComponents": {
+    "RemotePicker": "/components/remotePicker/remotePicker"
+  },
+  "navigationBarTitleText": "日报",
+  "disableScroll": true
+}

+ 19 - 0
miniprogram/pages/voyageManage/dailyVoyageList/dailyVoyageList.wxml

@@ -0,0 +1,19 @@
+<DateBar></DateBar>
+<view class="search df aic">
+  <input model:value="{{term}}" confirm-type="search" bindconfirm="inputSearch" type="text" placeholder="航次筛选" placeholder-class="placeholder" />
+  <image src="../../../images/newUI/search.png" class="avatar" bindtap="inputSearch"></image>
+</view>
+<view class="df aic tabs" wx:if="{{maintab!=3}}">
+  <view class="tabsview tabsview-1" bindtap="changeStatus" data-status="{{1}}" style="color:{{status==1?'#363F4A':'#9199A3'}};border-bottom:{{status==1?'6rpx solid #0089FD':''}}">{{maintab==1?'执行中':'已提交日报'}}</view>
+  <view class="tabsview" bindtap="changeStatus" data-status="{{2}}" style="color:{{status==2?'#363F4A':'#9199A3'}};border-bottom:{{status==2?'6rpx solid #0089FD':''}}">{{maintab==1?'历史航次':'未提交日报'}}</view>
+</view>
+<view class="df aic tabs" wx:else>
+  <view class="tabsview tabsview-1" bindtap="changeStatus" data-status="{{1}}" style="color:{{status==1?'#363F4A':'#9199A3'}};border-bottom:{{status==1?'6rpx solid #0089FD':''}}">单据</view>
+  <view class="tabsview" bindtap="changeStatus" data-status="{{2}}" data-islab="{{true}}" style="color:{{status==2?'#363F4A':'#9199A3'}};border-bottom:{{status==2?'6rpx solid #0089FD':''}}">提单</view>
+</view>
+<scroll-view bindrefresherrefresh="scrollDownList" refresher-triggered="{{isFreshing}}" refresher-enabled="{{true}}" scroll-y="true" bindscrolltolower="scrollList" style="height:calc(100vh - 140rpx);padding-bottom: 200rpx;">
+  <VoyageCard wx:for="{{list}}" wx:key="index" item="{{item}}" data-id="{{item.id}}" bindtap="goToDetail" data-index="{{index}}" data-medias="{{item.medias}}" data-trans="{{item.transStatusName}}">
+    <image mode="aspectFit" style="width: 40rpx;height: 40rpx;" catchtap="call" data-phone="{{item.shipOwnerPhone}}" src="../../../images/newUI/phone.png"></image>
+  </VoyageCard>
+  <!-- <view bindtap="scrollList" class="bottom-text">{{total==0?'暂无数据':(total>size*currentPage?'点击或滑动加载更多...':'已加载完毕')}}</view> -->
+</scroll-view>

+ 109 - 0
miniprogram/pages/voyageManage/dailyVoyageList/dailyVoyageList.wxss

@@ -0,0 +1,109 @@
+.search {
+  width: 686rpx;
+  height: 76rpx;
+  background: #FFFFFF;
+  box-shadow: 0px 3rpx 9rpx 3rpx rgba(92, 123, 111, 0.26);
+  border-radius: 12rpx;
+  padding-left: 50rpx;
+  color: #333;
+  margin: 0 auto;
+  display: flex;
+  justify-content: space-between;
+  padding-right: 20rpx;
+}
+
+.avatar {
+  width: 52rpx;
+  height: 52rpx;
+  border-radius: 50%;
+}
+
+.tabsview {
+  height: 84rpx;
+  line-height: 84rpx;
+  font-size: 32rpx;
+  font-family: PingFangSC-Semibold, PingFang SC;
+  font-weight: 600;
+  color: #363F4A;
+}
+
+.tabsview-1 {
+  margin-left: 28rpx;
+  margin-right: 40rpx;
+}
+
+.tabs {
+  margin-bottom: 28rpx;
+}
+
+.list {
+  width: 694rpx;
+  height: 172rpx;
+  background: #FFFFFF;
+  border-radius: 12rpx;
+  padding: 32rpx;
+  margin: 0 auto;
+  margin-bottom: 10rpx;
+}
+
+.icon {
+  width: 42rpx;
+  height: 42rpx;
+  background: #0089FD;
+  border-radius: 4rpx;
+  margin-right: 20rpx;
+}
+
+.ship-name {
+  font-size: 32rpx;
+  font-family: PingFangSC-Semibold, PingFang SC;
+  font-weight: 600;
+  color: #20252E;
+  margin-right: 30rpx;
+}
+
+.trans {
+  width: 117rpx;
+  height: 42rpx;
+  line-height: 40rpx;
+  background: rgba(0, 137, 253, 0.13);
+  border-radius: 2rpx;
+  border: 1rpx solid #0089FD;
+  text-align: center;
+  font-size: 24rpx;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #0089FD;
+}
+
+.go-to {
+  flex: 1;
+  text-align: right;
+  font-size: 26rpx;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #0089FD;
+}
+
+.text {
+  font-size: 28rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #6C6C6C;
+}
+
+.shu {
+  margin-left: 16rpx;
+}
+
+.finish {
+  width: 137px;
+  height: 42rpx;
+  background: #15E3AB;
+  border-radius: 2rpx;
+  font-size: 24rpx;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #FFFFFF;
+  line-height: 40rpx;
+}

+ 2 - 3
miniprogram/pages/voyageManage/voyageManage.js

@@ -59,7 +59,6 @@ Page({
       isFreshing: true
     })
     let url
-    console.log(this.data.maintab, this.data.status)
     if (this.data.maintab == 3 && this.data.status == 2) {
       url = '/voyage/wx/lab/list'
     } else {
@@ -246,10 +245,10 @@ Page({
     })
     this.getList()
   },
-  onLoad() {
+  onLoad(option) {
 
   },
-  onShow() {
+  onShow(option) {
     this.setData({
       maintab: app.globalData.maintab || 1,
       todayDate: datetimeFormat("年月月日日"),

+ 16 - 33
miniprogram/pages/voyageManage/voyageManage.wxml

@@ -1,36 +1,19 @@
-<view class="df aic jcsb line">
-  <view>航次筛选</view>
-  <view>
-    <!-- <RemotePicker bind:selectItem="selectCargoOwner" url="/user/cargoOwner/select" params="{{defaultParams}}" placeholder="请输入货主,船名或船东" inputStyle="height:60rpx"></RemotePicker> -->
-    <input class="new-seach" confirm-type="search" bindconfirm="inputSearch" model:value="{{term}}" type="text" />
-  </view>
+<DateBar></DateBar>
+<view class="search df aic">
+  <input model:value="{{term}}" confirm-type="search" bindconfirm="inputSearch" type="text" placeholder="航次筛选" placeholder-class="placeholder" />
+  <image src="../../images/newUI/search.png" class="avatar" bindtap="inputSearch"></image>
 </view>
-<view class="date tac mb20 fs26">今日日期:{{todayDate}}</view>
-
-<!-- <block wx:if="{{cargoOwnerId}}"> -->
-<view class="df aic jcsa tabs" wx:if="{{maintab!=3}}">
-  <view class="tabsview" bindtap="changeStatus" data-status="{{1}}" style="color:{{status==1?'#0d8fcc':''}};border-bottom:{{status==1?'4rpx solid #0d8fcc':''}}">{{maintab==1?'执行中':'已提交日报'}}</view>
-  <view class="tabsview" bindtap="changeStatus" data-status="{{2}}" style="color:{{status==2?'#0d8fcc':''}};border-bottom:{{status==2?'4rpx solid #0d8fcc':''}}">{{maintab==1?'历史航次':'未提交日报'}}</view>
+<view class="df aic tabs" wx:if="{{maintab!=3}}">
+  <view class="tabsview tabsview-1" bindtap="changeStatus" data-status="{{1}}" style="color:{{status==1?'#363F4A':'#9199A3'}};border-bottom:{{status==1?'6rpx solid #0089FD':''}}">{{maintab==1?'执行中':'已提交日报'}}</view>
+  <view class="tabsview" bindtap="changeStatus" data-status="{{2}}" style="color:{{status==2?'#363F4A':'#9199A3'}};border-bottom:{{status==2?'6rpx solid #0089FD':''}}">{{maintab==1?'历史航次':'未提交日报'}}</view>
 </view>
-<view class="df aic jcsa tabs" wx:else>
-  <view class="tabsview" bindtap="changeStatus" data-status="{{1}}" style="color:{{status==1?'#0d8fcc':''}};border-bottom:{{status==1?'4rpx solid #0d8fcc':''}}">单据</view>
-  <view class="tabsview" bindtap="changeStatus" data-status="{{2}}" data-islab="{{true}}" style="color:{{status==2?'#0d8fcc':''}};border-bottom:{{status==2?'4rpx solid #0d8fcc':''}}">提单</view>
+<view class="df aic tabs" wx:else>
+  <view class="tabsview tabsview-1" bindtap="changeStatus" data-status="{{1}}" style="color:{{status==1?'#363F4A':'#9199A3'}};border-bottom:{{status==1?'6rpx solid #0089FD':''}}">单据</view>
+  <view class="tabsview" bindtap="changeStatus" data-status="{{2}}" data-islab="{{true}}" style="color:{{status==2?'#363F4A':'#9199A3'}};border-bottom:{{status==2?'6rpx solid #0089FD':''}}">提单</view>
 </view>
-<scroll-view bindrefresherrefresh="scrollDownList" refresher-triggered="{{isFreshing}}" refresher-enabled="{{true}}" scroll-y="true" bindscrolltolower="scrollList" style="height:calc(100vh - 140rpx);padding-bottom: 200rpx;background: #fff;">
-  <view class="df aic jcsb list" wx:for="{{list}}" wx:key="index" data-id="{{item.id}}" bindtap="goToDetail" data-index="{{index}}" data-medias="{{item.medias}}" data-trans="{{item.transStatusName}}">
-    <view class="col-1">{{item.shipName}}</view>
-    <view class="col-2">{{item.loadPort}}-{{item.discPort}}</view>
-    <view class="col-3">{{item.cargo}}</view>
-    <view class="col-4">{{item.transStatusName}}</view>
-    <image class="col-5" mode="aspectFit" style="width: 52rpx;height: 52rpx;" catchtap="call" data-phone="{{item.shipOwnerPhone}}" src="../../images/phone.png"></image>
-  </view>
-  <view bindtap="scrollList" class="bottom-text">{{total==0?'暂无数据':(total>size*currentPage?'点击或滑动加载更多...':'已加载完毕')}}</view>
-</scroll-view>
-<!-- </block> -->
-<view style="position: fixed;bottom: 0;">
-  <view class="bottom-tabs df aic tac">
-    <view bindtap="changeMainTab" data-maintab="{{1}}" class="maintab1" style="color:{{maintab==1?'#fff':''}};background:{{maintab==1?'#0094FE':'#fff'}}" data-api="/voyage/list">我的航次</view>
-    <view bindtap="changeMainTab" data-maintab="{{2}}" class="maintab2" style="color:{{maintab==2?'#fff':''}};background:{{maintab==2?'#0094FE':'#fff'}}" data-api="/dayReport/list">我的日报</view>
-    <view bindtap="changeMainTab" data-maintab="{{3}}" class="maintab3" style="color:{{maintab==3?'#fff':''}};background:{{maintab==3?'#0094FE':'#fff'}}" data-api="/bill/list">我的单据</view>
-  </view>
-</view>
+<scroll-view bindrefresherrefresh="scrollDownList" refresher-triggered="{{isFreshing}}" refresher-enabled="{{true}}" scroll-y="true" bindscrolltolower="scrollList" style="height:calc(100vh - 140rpx);padding-bottom: 200rpx;">
+  <VoyageCard wx:for="{{list}}" wx:key="index" item="{{item}}" data-id="{{item.id}}" bindtap="goToDetail" data-index="{{index}}" data-medias="{{item.medias}}" data-trans="{{item.transStatusName}}">
+    <image mode="aspectFit" style="width: 40rpx;height: 40rpx;" catchtap="call" data-phone="{{item.shipOwnerPhone}}" src="../../images/newUI/phone.png"></image>
+  </VoyageCard>
+  <!-- <view bindtap="scrollList" class="bottom-text">{{total==0?'暂无数据':(total>size*currentPage?'点击或滑动加载更多...':'已加载完毕')}}</view> -->
+</scroll-view>

+ 89 - 79
miniprogram/pages/voyageManage/voyageManage.wxss

@@ -1,99 +1,109 @@
-/* pages/voyageManage/voyageManage.wxss */
-
-.line {
-  width: 80%;
-  margin: 20rpx auto;
-  font-size: 28rpx;
-  position: relative;
-}
-
-.bottom-tabs>view {
-  height: 90rpx;
-  border-top: 1rpx solid grey;
-  border-bottom: 1rpx solid grey;
-  line-height: 86rpx;
-  font-size: 27rpx;
-}
-
-.current-bottom-tab {
-  background: #0094FE;
-  color: #fff;
-  border: none;
-}
-
-.maintab1 {
-  width: 33vw;
-  border-left: none;
+.search {
+  width: 686rpx;
+  height: 76rpx;
+  background: #FFFFFF;
+  box-shadow: 0px 3rpx 9rpx 3rpx rgba(92, 123, 111, 0.26);
+  border-radius: 12rpx;
+  padding-left: 50rpx;
+  color: #333;
+  margin: 0 auto;
+  display: flex;
+  justify-content: space-between;
+  padding-right: 20rpx;
+}
+
+.avatar {
+  width: 52rpx;
+  height: 52rpx;
+  border-radius: 50%;
 }
 
-.maintab2 {
-  width: 34vw;
-  border-left: 1rpx solid grey;
-  border-right: 1rpx solid grey;
+.tabsview {
+  height: 84rpx;
+  line-height: 84rpx;
+  font-size: 32rpx;
+  font-family: PingFangSC-Semibold, PingFang SC;
+  font-weight: 600;
+  color: #363F4A;
 }
 
-.maintab3 {
-  width: 33vw;
-  border-right: none;
+.tabsview-1 {
+  margin-left: 28rpx;
+  margin-right: 40rpx;
 }
 
-/* --- */
-
 .tabs {
-  width: 100%;
-  height: 80rpx;
-  background: #fff;
-  box-shadow: rgb(209, 206, 206) 5rpx 5rpx 10rpx;
-  border-bottom: 2rpx solid grey;
-  font-size: 28rpx;
+  margin-bottom: 28rpx;
 }
 
-.tabsview {
-  height: 50rpx;
+.list {
+  width: 694rpx;
+  height: 172rpx;
+  background: #FFFFFF;
+  border-radius: 12rpx;
+  padding: 32rpx;
+  margin: 0 auto;
+  margin-bottom: 10rpx;
+}
+
+.icon {
+  width: 42rpx;
+  height: 42rpx;
+  background: #0089FD;
+  border-radius: 4rpx;
+  margin-right: 20rpx;
+}
+
+.ship-name {
+  font-size: 32rpx;
+  font-family: PingFangSC-Semibold, PingFang SC;
+  font-weight: 600;
+  color: #20252E;
+  margin-right: 30rpx;
+}
+
+.trans {
+  width: 117rpx;
+  height: 42rpx;
+  line-height: 40rpx;
+  background: rgba(0, 137, 253, 0.13);
+  border-radius: 2rpx;
+  border: 1rpx solid #0089FD;
   text-align: center;
+  font-size: 24rpx;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #0089FD;
 }
 
-.p10 {
-  padding: 10rpx 20rpx;
-}
-
-.m30a {
-  margin: 30rpx auto;
+.go-to {
+  flex: 1;
+  text-align: right;
+  font-size: 26rpx;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #0089FD;
 }
 
-.list {
-  padding: 20rpx;
+.text {
   font-size: 28rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #6C6C6C;
 }
 
-.col-1 {
-  width: 29vw;
-}
-
-.col-2 {
-  width: 29vw;
-}
-
-
-.col-3 {
-  width: 13vw;
-}
-
-.col-4 {
-  width: 15vw;
-}
-
-.bottom-text {
-  text-align: center;
-  padding-top: 30rpx;
-  padding-bottom: 50rpx;
-  font-size: 26rpx;
-  color: #777;
+.shu {
+  margin-left: 16rpx;
 }
 
-.new-seach {
-  padding-left: 20rpx;
-  border: 1px solid grey;
-  height: 80rpx;
-  width: 50vw;
+.finish {
+  width: 137px;
+  height: 42rpx;
+  background: #15E3AB;
+  border-radius: 2rpx;
+  font-size: 24rpx;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #FFFFFF;
+  line-height: 40rpx;
 }

+ 7 - 0
project.private.config.json

@@ -50,6 +50,13 @@
           "query": "id=267",
           "launchMode": "default",
           "scene": null
+        },
+        {
+          "name": "",
+          "pathName": "pages/voyageManage/voyageManage",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
         }
       ]
     }