Forráskód Böngészése

起卸预约回签,船舶管理

shasha 11 órája
szülő
commit
bad506875c
100 módosított fájl, 1810 hozzáadás és 2171 törlés
  1. 10 8
      app.json
  2. 2 0
      app.wxss
  3. BIN
      images/bangding.png
  4. BIN
      images/icon_2.png
  5. BIN
      images/passwordUpdate.png
  6. BIN
      images/ship.png
  7. BIN
      images/shipManage.png
  8. BIN
      images/wanshan.png
  9. 87 8
      otherPages/loadAppoint/allocation.js
  10. 2 2
      otherPages/loadAppoint/allocation.json
  11. 3 0
      otherPages/loadAppoint/allocation.less
  12. 3 0
      otherPages/loadAppoint/allocation.wxss
  13. 87 8
      otherPages/loadAppoint/dispatch.js
  14. 2 2
      otherPages/loadAppoint/dispatch.json
  15. 1 1
      otherPages/loadAppoint/endSign.json
  16. 54 8
      otherPages/loadAppoint/index.js
  17. 7 4
      otherPages/loadAppoint/index.wxml
  18. 0 66
      otherPages/loadAppoint/sign.js
  19. 0 2
      otherPages/loadAppoint/sign.wxml
  20. 288 0
      otherPages/loadAppoint/updateSign.js
  21. 6 0
      otherPages/loadAppoint/updateSign.json
  22. 65 0
      otherPages/loadAppoint/updateSign.less
  23. 28 0
      otherPages/loadAppoint/updateSign.wxml
  24. 57 0
      otherPages/loadAppoint/updateSign.wxss
  25. 3 2
      otherPages/loadArrive/edit.js
  26. 14 12
      otherPages/loadArrive/index.js
  27. 2 2
      otherPages/loadArrive/index.wxml
  28. 3 1
      otherPages/loadArrive/info.js
  29. 3 2
      otherPages/repairDispatch/info.js
  30. 3 2
      otherPages/reportFault/info.js
  31. 0 151
      otherPages/ship/add.js
  32. 0 53
      otherPages/ship/add.wxml
  33. 0 225
      otherPages/ship/edit.js
  34. 0 40
      otherPages/ship/edit.wxml
  35. 0 48
      otherPages/ship/info.js
  36. 0 17
      otherPages/ship/info.wxml
  37. 3 2
      otherPages/upDownSubmit/info.js
  38. 3 2
      otherPages/workTask/info.js
  39. 6 4
      pages/appointReplace/index.js
  40. 6 5
      pages/car/add.js
  41. 3 3
      pages/car/add.wxml
  42. 4 3
      pages/car/edit.js
  43. 3 3
      pages/car/edit.wxml
  44. 11 12
      pages/car/index.js
  45. 35 2
      pages/deliveryConfirm/index.js
  46. 2 1
      pages/deliveryConfirm/index.wxml
  47. 0 300
      pages/index/add.js
  48. 0 19
      pages/index/add.json
  49. 0 72
      pages/index/add.wxml
  50. 0 209
      pages/index/add.wxss
  51. 0 276
      pages/index/edit.js
  52. 0 19
      pages/index/edit.json
  53. 0 73
      pages/index/edit.wxml
  54. 0 209
      pages/index/edit.wxss
  55. 70 60
      pages/index/index.js
  56. 3 3
      pages/index/index.wxml
  57. 3 2
      pages/index/info.js
  58. 25 16
      pages/index/replace.js
  59. 5 4
      pages/index/replace.wxml
  60. 2 2
      pages/login/index.js
  61. 9 4
      pages/mine/index.wxml
  62. 3 2
      pages/operationExecution/info.js
  63. 3 2
      pages/queueCar/info.js
  64. 11 3
      pages/reservationChargestation/add.js
  65. 7 10
      pages/reservationChargestation/index.js
  66. 10 8
      pages/reservationLoadAppoint/add.js
  67. 6 7
      pages/reservationLoadAppoint/add.wxml
  68. 11 10
      pages/reservationLoadAppoint/edit.js
  69. 6 7
      pages/reservationLoadAppoint/edit.wxml
  70. 7 10
      pages/reservationLoadAppoint/index.js
  71. 109 4
      pages/reservationMan/index.js
  72. 18 11
      pages/reservationMan/index.wxml
  73. 3 2
      pages/reservationMan/info.js
  74. 20 0
      pages/reservationOther/add.js
  75. 1 1
      pages/reservationOther/add.json
  76. 14 2
      pages/reservationOther/add.wxml
  77. 22 1
      pages/reservationOther/edit.js
  78. 15 5
      pages/reservationOther/edit.wxml
  79. 7 10
      pages/reservationOther/index.js
  80. 2 1
      pages/reservationPipe/add.js
  81. 3 4
      pages/reservationPipe/add.wxml
  82. 3 4
      pages/reservationPipe/edit.wxml
  83. 0 57
      pages/reservationPipe/index.js
  84. 13 8
      pages/reservationStone/add.js
  85. 8 7
      pages/reservationStone/add.wxml
  86. 1 1
      pages/reservationStone/add.wxss
  87. 7 6
      pages/reservationStone/edit.js
  88. 7 6
      pages/reservationStone/edit.wxml
  89. 1 1
      pages/reservationStone/edit.wxss
  90. 4 4
      pages/reservationTemp/add.js
  91. 2 2
      pages/reservationTemp/edit.js
  92. 3 1
      pages/salesOrderMan/index.js
  93. 3 3
      pages/salesOrderMan/index.wxml
  94. 2 2
      pages/salesOrderMan/orderloadAdd.js
  95. 202 0
      pages/ship/add.js
  96. 0 0
      pages/ship/add.json
  97. 75 0
      pages/ship/add.wxml
  98. 0 0
      pages/ship/add.wxss
  99. 278 0
      pages/ship/edit.js
  100. 0 0
      pages/ship/edit.json

+ 10 - 8
app.json

@@ -2,25 +2,26 @@
   "pages": [
     "pages/workstand/index",
     "pages/index/index",
-    "pages/index/add",
-    "pages/index/edit",
     "pages/index/info",
     "pages/index/signFor",
     "pages/index/sign",
     "pages/index/replace",
     "pages/appointReplace/index",
     "pages/appointReplace/info",
+
+    "pages/reservationStone/add",
+    "pages/reservationStone/edit",
     "pages/reservationTemp/add",
     "pages/reservationTemp/edit",
     "pages/reservationLoadAppoint/add",
     "pages/reservationLoadAppoint/edit",
     "pages/reservationPipe/add",
     "pages/reservationPipe/edit",
-    "pages/reservationChargestation/index",
     "pages/reservationChargestation/add",
     "pages/reservationChargestation/edit",
     "pages/reservationOther/add",
     "pages/reservationOther/edit",
+
     "pages/queueCar/index",
     "pages/queueCar/info",
     "pages/queueCar/adjustOrder",
@@ -31,6 +32,10 @@
     "pages/car/add",
     "pages/car/edit",
     "pages/car/info",
+    "pages/ship/index",
+    "pages/ship/add",
+    "pages/ship/edit",
+    "pages/ship/info",
     "pages/login/index",
     "pages/register/index",
     "pages/register/indexShip",
@@ -82,11 +87,8 @@
         "loadAppoint/info",
         "loadAppoint/allocation",
         "loadAppoint/dispatch",
-        "loadAppoint/sign",
-        "ship/index",
-        "ship/add",
-        "ship/edit",
-        "ship/info"
+        "loadAppoint/updateSign",
+        "loadAppoint/endSign"
       ],
       "independent": false
     }

+ 2 - 0
app.wxss

@@ -33,11 +33,13 @@ page {
   --warning-color:#FF9237;
   --danger-color:#FF6160;
   --other-color:#999999;
+  --leave-color:#EEEEEE;
   --default-bg-color:rgba(78,187,245,0.08);
   --primary-bg-color:rgba(38,202,131,0.1);
   --warning-bg-color:rgba(255,146,55,0.08);
   --danger-bg-color:rgba(255,97,96,0.1);
   --other-bg-color:rgba(238,238,238,1);
+  --leave-bg-color:rgba(153,153,153,1);
 }
 .container {
   min-height: 100vh;

BIN
images/bangding.png


BIN
images/icon_2.png


BIN
images/passwordUpdate.png


BIN
images/ship.png


BIN
images/shipManage.png


BIN
images/wanshan.png


+ 87 - 8
otherPages/loadAppoint/allocation.js

@@ -6,14 +6,21 @@ Page({
    * 页面的初始数据
    */
   data: {
-    showModal: false,
-    defaultText: '请选择',
-    isSubmitting: false,
-
     str:' ',
+    str2: ' ',
     loginStatus: wx.getStorageSync('loginStatus') ? wx.getStorageSync('loginStatus') : false,
     roleCodeList: wx.getStorageSync('roleCodeList') ? wx.getStorageSync('roleCodeList') : '',
-    searchVal: '',
+
+    //按钮位置参数
+    safeAreaHeight: 0, //底部安全区域的高度
+    buttonTop: 0,
+    buttonLeft: 0,
+    windowHeight: '',
+    windowWidth: '',
+
+    showModal: false,
+    defaultText: '请选择',
+    isSubmitting: false,
     
     //分页
     limit: 10,
@@ -24,6 +31,8 @@ Page({
     nomore: '',
     resData:[],
 
+    searchVal: '',
+
     show: false,
     loadPointId:'',//起卸地点
     loadTimeId:'',//起卸时段
@@ -42,6 +51,27 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
+    this.setData({
+      safeAreaHeight: app.globalData.windowInfo.screenHeight - app.globalData.systemInfo.safeArea.bottom
+    })
+
+    // 使用选择器选择节点
+    this.getFilterHeight()
+    
+    //获取页面高度设置新增按钮的初始位置
+    var that = this;
+    wx.getSystemInfo({
+      success: function (res) {
+        // 高度,宽度 单位为px
+        that.setData({
+          windowHeight: res.windowHeight, //屏幕宽度、高度
+          windowWidth: res.windowWidth,
+          buttonTop: res.windowHeight * 0.8 - that.data.safeAreaHeight-60, //这里定义按钮的初始位置
+          buttonLeft: res.windowWidth * 0.80, //这里定义按钮的初始位置
+        })
+      }
+    })
+
     this.setData({
       appointId  : options.appointId,
     })
@@ -49,7 +79,22 @@ Page({
     this.getAllocationListFun()
   },
 
-  //列表
+  //获取顶部筛选区域的高度
+  getFilterHeight:function(){
+    let that = this;
+    // 使用顶部筛选高度选择器选择节点的高度
+    const query = wx.createSelectorQuery();
+    query.select('.topFilter').boundingClientRect(function (rect) {
+      if(rect){
+        that.setData({
+          filterWidth: rect.width,
+          filterHeight: rect.height,
+        });
+      }
+    }).exec();
+  },
+
+  //列表   appointType   1起卸点位    2装货点位
   getAllocationListFun: function () {
     this.setData({
       page: 1
@@ -67,7 +112,7 @@ Page({
     })
   },  
 
-  //装卸点位
+  //装卸点位   appointType   1起卸点位    2装货点位
   loadPointData:function(loadPointId){
     app.request.GET({
       url: app.API.loadPoint,
@@ -284,6 +329,7 @@ Page({
 
   /**
    * 页面上拉触底事件的处理函数
+   *    appointType   1起卸点位    2装货点位
    */
   onReachBottom: function () {
     this.data.page++;
@@ -301,10 +347,43 @@ Page({
     });
   },
 
+
+  //以下是按钮拖动事件
+  buttonStart: function (e) {
+    startPoint = e.touches[0] //获取拖动开始点
+  },
+  buttonMove: function (e) {
+    var endPoint = e.touches[e.touches.length - 1] //获取拖动结束点
+    //计算在X轴上拖动的距离和在Y轴上拖动的距离
+    var translateX = endPoint.clientX - startPoint.clientX
+    var translateY = endPoint.clientY - startPoint.clientY
+    startPoint = endPoint //重置开始位置
+    var buttonTop = this.data.buttonTop + translateY
+    var buttonLeft = this.data.buttonLeft + translateX
+    //判断是移动否超出屏幕
+    if (buttonLeft + 60 >= this.data.windowWidth) {
+      buttonLeft = this.data.windowWidth - 60;
+    }
+    if (buttonLeft <= 0) {
+      buttonLeft = 0;
+    }
+    if (buttonTop <= this.data.filterHeight) {
+      buttonTop = this.data.filterHeight
+    }
+    if (buttonTop + 60 + 48 + this.data.safeAreaHeight >= this.data.windowHeight) {
+      buttonTop = this.data.windowHeight - 60 - 48 - this.data.safeAreaHeight;
+    }
+    this.setData({
+      buttonTop: buttonTop,
+      buttonLeft: buttonLeft
+    })
+  },
+  buttonEnd: function (e) {},
+
   /**
    * 用户点击右上角分享
    */
-  onShareAppMessage() {
+  onShareAppMessage: function () {
 
   }
 })

+ 2 - 2
otherPages/loadAppoint/allocation.json

@@ -1,7 +1,7 @@
 {
   "navigationBarTitleText": "起卸分配",
-  "backgroundTextStyle": "dark",
-  "enablePullDownRefresh": true,
+  "navigationBarTextStyle": "white",
+  "navigationBarBackgroundColor": "#0396FF",
   "usingComponents": {
     "van-notice-bar": "@vant/weapp/notice-bar/index",
     "van-tab": "@vant/weapp/tab/index",

+ 3 - 0
otherPages/loadAppoint/allocation.less

@@ -19,4 +19,7 @@
   margin-top: 15rpx;
   color: #666;
   font-size: 24rpx;
+}.formTopBlueBg {
+  height: 144rpx;
+  background-color: #0396FF;
 }

+ 3 - 0
otherPages/loadAppoint/allocation.wxss

@@ -19,4 +19,7 @@
   margin-top: 15rpx;
   color: #666;
   font-size: 24rpx;
+}.formTopBlueBg {
+  height: 144rpx;
+  background-color: #0396FF;
 }

+ 87 - 8
otherPages/loadAppoint/dispatch.js

@@ -6,14 +6,21 @@ Page({
    * 页面的初始数据
    */
   data: {
-    showModal: false,
-    defaultText: '请选择',
-    isSubmitting: false,
-
     str:'&emsp;',
+    str2: '&ensp;',
     loginStatus: wx.getStorageSync('loginStatus') ? wx.getStorageSync('loginStatus') : false,
     roleCodeList: wx.getStorageSync('roleCodeList') ? wx.getStorageSync('roleCodeList') : '',
-    searchVal: '',
+
+    //按钮位置参数
+    safeAreaHeight: 0, //底部安全区域的高度
+    buttonTop: 0,
+    buttonLeft: 0,
+    windowHeight: '',
+    windowWidth: '',
+
+    showModal: false,
+    defaultText: '请选择',
+    isSubmitting: false,
     
     //分页
     limit: 10,
@@ -23,6 +30,7 @@ Page({
     more: false,
     nomore: '',
     resData:[],
+    searchVal: '',
 
     show: false,
     loadPointId:'',//装货地点
@@ -42,6 +50,27 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
+    this.setData({
+      safeAreaHeight: app.globalData.windowInfo.screenHeight - app.globalData.systemInfo.safeArea.bottom
+    })
+
+    // 使用选择器选择节点
+    this.getFilterHeight()
+    
+    //获取页面高度设置新增按钮的初始位置
+    var that = this;
+    wx.getSystemInfo({
+      success: function (res) {
+        // 高度,宽度 单位为px
+        that.setData({
+          windowHeight: res.windowHeight, //屏幕宽度、高度
+          windowWidth: res.windowWidth,
+          buttonTop: res.windowHeight * 0.8 - that.data.safeAreaHeight-60, //这里定义按钮的初始位置
+          buttonLeft: res.windowWidth * 0.80, //这里定义按钮的初始位置
+        })
+      }
+    })
+
     this.setData({
       appointId  : options.appointId,
     })
@@ -49,7 +78,22 @@ Page({
     this.getAllocationListFun()
   },
 
-  //列表
+  //获取顶部筛选区域的高度
+  getFilterHeight:function(){
+    let that = this;
+    // 使用顶部筛选高度选择器选择节点的高度
+    const query = wx.createSelectorQuery();
+    query.select('.topFilter').boundingClientRect(function (rect) {
+      if(rect){
+        that.setData({
+          filterWidth: rect.width,
+          filterHeight: rect.height,
+        });
+      }
+    }).exec();
+  },
+
+  //列表   appointType   1起卸点位    2装货点位
   getAllocationListFun: function () {
     this.setData({
       page: 1
@@ -67,7 +111,7 @@ Page({
     })
   },  
 
-  //装卸点位
+  //装卸点位   appointType   1起卸点位    2装货点位
   loadPointData:function(loadPointId){
     app.request.GET({
       url: app.API.loadPoint,
@@ -296,6 +340,7 @@ Page({
 
   /**
    * 页面上拉触底事件的处理函数
+   *    appointType   1起卸点位    2装货点位
    */
   onReachBottom: function () {
     this.data.page++;
@@ -313,10 +358,44 @@ Page({
     });
   },
 
+  
+
+  //以下是按钮拖动事件
+  buttonStart: function (e) {
+    startPoint = e.touches[0] //获取拖动开始点
+  },
+  buttonMove: function (e) {
+    var endPoint = e.touches[e.touches.length - 1] //获取拖动结束点
+    //计算在X轴上拖动的距离和在Y轴上拖动的距离
+    var translateX = endPoint.clientX - startPoint.clientX
+    var translateY = endPoint.clientY - startPoint.clientY
+    startPoint = endPoint //重置开始位置
+    var buttonTop = this.data.buttonTop + translateY
+    var buttonLeft = this.data.buttonLeft + translateX
+    //判断是移动否超出屏幕
+    if (buttonLeft + 60 >= this.data.windowWidth) {
+      buttonLeft = this.data.windowWidth - 60;
+    }
+    if (buttonLeft <= 0) {
+      buttonLeft = 0;
+    }
+    if (buttonTop <= this.data.filterHeight) {
+      buttonTop = this.data.filterHeight
+    }
+    if (buttonTop + 60 + 48 + this.data.safeAreaHeight >= this.data.windowHeight) {
+      buttonTop = this.data.windowHeight - 60 - 48 - this.data.safeAreaHeight;
+    }
+    this.setData({
+      buttonTop: buttonTop,
+      buttonLeft: buttonLeft
+    })
+  },
+  buttonEnd: function (e) {},
+
   /**
    * 用户点击右上角分享
    */
-  onShareAppMessage() {
+  onShareAppMessage: function () {
 
   }
 })

+ 2 - 2
otherPages/loadAppoint/dispatch.json

@@ -1,7 +1,7 @@
 {
   "navigationBarTitleText": "装货分配",
-  "backgroundTextStyle": "dark",
-  "enablePullDownRefresh": true,
+  "navigationBarTextStyle": "white",
+  "navigationBarBackgroundColor": "#0396FF",
   "usingComponents": {
     "van-notice-bar": "@vant/weapp/notice-bar/index",
     "van-tab": "@vant/weapp/tab/index",

+ 1 - 1
otherPages/loadAppoint/endSign.json

@@ -1,5 +1,5 @@
 {
-  "navigationBarTitleText": "客户手签",
+  "navigationBarTitleText": "结束手签",
   "usingComponents": {
     "van-button": "@vant/weapp/button/index"
   }

+ 54 - 8
otherPages/loadAppoint/index.js

@@ -7,9 +7,20 @@ Page({
    */
   data: {
     str:'&emsp;',
+    str2: '&ensp;',
     loginStatus: wx.getStorageSync('loginStatus') ? wx.getStorageSync('loginStatus') : false,
     roleCodeList: wx.getStorageSync('roleCodeList') ? wx.getStorageSync('roleCodeList') : '',
-    searchVal: '',
+
+    //按钮位置参数
+    safeAreaHeight: 0, //底部安全区域的高度
+    buttonTop: 0,
+    buttonLeft: 0,
+    windowHeight: '',
+    windowWidth: '',
+
+    showModal: false,
+    defaultText: '请选择',
+    isSubmitting: false,
     
     //分页
     limit: 10,
@@ -19,6 +30,7 @@ Page({
     more: false,
     nomore: '',
     resData:[],
+    searchVal: '',
 
     showOver: false,
     showFill: false,
@@ -197,13 +209,8 @@ Page({
       loadType: true //加载类型,是否是下拉加载
     });
   },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
-  },
+  
+  
 
 
   // 结束endLoad
@@ -365,4 +372,43 @@ Page({
   },
 
 
+
+  //以下是按钮拖动事件
+  buttonStart: function (e) {
+    startPoint = e.touches[0] //获取拖动开始点
+  },
+  buttonMove: function (e) {
+    var endPoint = e.touches[e.touches.length - 1] //获取拖动结束点
+    //计算在X轴上拖动的距离和在Y轴上拖动的距离
+    var translateX = endPoint.clientX - startPoint.clientX
+    var translateY = endPoint.clientY - startPoint.clientY
+    startPoint = endPoint //重置开始位置
+    var buttonTop = this.data.buttonTop + translateY
+    var buttonLeft = this.data.buttonLeft + translateX
+    //判断是移动否超出屏幕
+    if (buttonLeft + 60 >= this.data.windowWidth) {
+      buttonLeft = this.data.windowWidth - 60;
+    }
+    if (buttonLeft <= 0) {
+      buttonLeft = 0;
+    }
+    if (buttonTop <= this.data.filterHeight) {
+      buttonTop = this.data.filterHeight
+    }
+    if (buttonTop + 60 + 48 + this.data.safeAreaHeight >= this.data.windowHeight) {
+      buttonTop = this.data.windowHeight - 60 - 48 - this.data.safeAreaHeight;
+    }
+    this.setData({
+      buttonTop: buttonTop,
+      buttonLeft: buttonLeft
+    })
+  },
+  buttonEnd: function (e) {},
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
 })

+ 7 - 4
otherPages/loadAppoint/index.wxml

@@ -31,16 +31,19 @@
               <view class="info"><text>订单重量:{{item.orderWeight + '吨'}}</text></view>
               <view class="info"><text>单价:{{item.orderPrice + ' 元/吨'}}</text> / <text>总价:{{item.orderAmount + ' 元'}}</text></view>
              
-              <view class="bottomBtn" wx:if="{{ (roleCodeList == 'dispatcher' && (item.status == '4' || item.status == '5' || item.status == '6') && item.arriveStatus == '2') || (roleCodeList == 'bizAdmin' && (item.status == '5' || item.status == '6')) || ( roleCodeList == 'load' && item.status == '7') || (roleCodeList == 'serviceCustomer' && item.status == '8') || (roleCodeList == 'bizAdmin' && item.status == '12') }}">
-                <van-button type="primary" size="small" data-url="allocation?appointId={{item.id}}" wx:if="{{ roleCodeList == 'dispatcher' && (item.status == '4' || item.status == '5' || item.status == '6') && item.arriveStatus == '2' }}" catchtap="toLink" style="margin-right: 20rpx;">起卸调度</van-button>
+              <view class="bottomBtn" wx:if="{{ (roleCodeList == 'dispatcher' && (item.status == '4' || item.status == '5' || item.status == '6' || item.status == '7' || item.status == '10') && item.arriveStatus == '2') || (roleCodeList == 'dispatcher' && (item.status == '5' || item.status == '6' || item.status == '10') && item.arriveStatus == '2') || (roleCodeList == 'bizAdmin' && (item.status == '5' || item.status == '6')) || ( roleCodeList == 'load' && item.status == '7') || (roleCodeList == 'serviceCustomer' && (item.status == '1' || item.status == '8')) || (roleCodeList == 'bizAdmin' && item.status == '12') }}">
+                
+                <van-button type="warning" size="small" data-url="updateSign?id={{item.id}}" catchtap="toLink" style="margin-right: 20rpx;" wx:if="{{roleCodeList == 'serviceCustomer' && item.status == '1'}}">回签</van-button>
 
-                <van-button type="info" size="small" data-url="dispatch?appointId={{item.id}}" wx:if="{{ roleCodeList == 'dispatcher' && (item.status == '4' || item.status == '5' || item.status == '6') && item.arriveStatus == '2' }}" catchtap="toLink" style="margin-right: 20rpx;">装货调度</van-button>
+                <van-button type="info" size="small" data-url="dispatch?appointId={{item.id}}" wx:if="{{ roleCodeList == 'dispatcher' && (item.status == '5' || item.status == '6' || item.status == '10') && item.arriveStatus == '2' }}" catchtap="toLink" style="margin-right: 20rpx;">装货调度</van-button>
+                
+                <van-button type="primary" size="small" data-url="allocation?appointId={{item.id}}" wx:if="{{ roleCodeList == 'dispatcher' && (item.status == '4' || item.status == '5' || item.status == '6' || item.status == '7' || item.status == '10') && item.arriveStatus == '2' }}" catchtap="toLink" style="margin-right: 20rpx;">起卸调度</van-button>
 
                 <van-button type="danger" size="small" data-id="{{ item.id }}" data-load-number="{{ item.loadNumber }}" wx:if="{{ roleCodeList == 'bizAdmin' && (item.status == '5' || item.status == '6')}}" catchtap="showPopupOver" style="margin-right: 20rpx;">结束</van-button>
 
                 <van-button type="info" size="small" data-id="{{item.id}}" wx:if="{{ roleCodeList == 'load' && item.status == '7' }}" catchtap="showPopupFill">填报</van-button>
 
-                <van-button type="warning" size="small" data-url="endSign?id={{item.id}}" catchtap="toLink" style="margin-right: 20rpx;" wx:if="{{roleCodeList == 'serviceCustomer' && item.status == '8'}}">手签</van-button>
+                <van-button type="warning" size="small" data-url="endSign?id={{item.id}}" catchtap="toLink" style="margin-right: 20rpx;" wx:if="{{roleCodeList == 'serviceCustomer' && item.status == '8'}}">结束手签</van-button>
 
                 <van-button type="danger" size="small" data-id="{{item.id}}" data-load-number="{{item.loadNumber}}" wx:if="{{ roleCodeList == 'serviceCustomer' && item.status == '8' }}" catchtap="rejectFun">驳回</van-button>
 

+ 0 - 66
otherPages/loadAppoint/sign.js

@@ -1,66 +0,0 @@
-// otherPages/loadAppoint/sign.js
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad(options) {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
-  }
-})

+ 0 - 2
otherPages/loadAppoint/sign.wxml

@@ -1,2 +0,0 @@
-<!--otherPages/loadAppoint/sign.wxml-->
-<text>otherPages/loadAppoint/sign.wxml</text>

+ 288 - 0
otherPages/loadAppoint/updateSign.js

@@ -0,0 +1,288 @@
+// pages/updateSign/index.js
+var canvas = null;
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    id:'',
+    ctx: null,
+    points: [], // 存储所有笔画
+    currentStroke: [], // 当前笔画
+    isDrawing: false,
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.setData({
+      id:options.id
+    })
+    this.initCanvas();
+  },
+
+  /**
+   * 初始化画布
+   * 设置画布大小、像素比例和画笔样式
+   */
+  async initCanvas() {
+    // 使用ID获取canvas组件实例
+    const query = wx.createSelectorQuery();
+    query.select('#canvas')
+      .fields({ node: true, size: true })
+      .exec((res) => {
+        canvas = res[0].node;
+        const ctx = canvas.getContext('2d');
+
+        // Canvas 画布的实际绘制宽高
+        const width = res[0].width
+        const height = res[0].height
+        // 设置画布大小,使用新的API获取设备像素比
+        const dpr = wx.getWindowInfo().pixelRatio;
+        canvas.width = width * dpr;
+        canvas.height = height * dpr;
+        ctx.scale(dpr, dpr);
+
+        // 设置画笔样式
+        ctx.strokeStyle = '#000000';
+        ctx.lineWidth = 3;
+        ctx.lineCap = 'round';
+        ctx.lineJoin = 'round';
+
+        //绘制背景
+        ctx.fillStyle = '#fff'
+        ctx.clearRect(0, 0, canvas.width, canvas.height)
+        ctx.fillRect(0, 0, canvas.width, canvas.height)
+
+        this.setData({ ctx });
+      });
+  },
+
+  /**
+   * 处理触摸开始事件
+   * 开始一个新的笔画,记录起始点
+   * @param {Object} e - 触摸事件对象
+   */
+  handleTouchStart(e) {
+    const { x, y } = e.touches[0];
+    this.setData({
+      isDrawing: true,
+      currentStroke: [[x, y]]
+    });
+    this.data.ctx.beginPath();
+    this.data.ctx.moveTo(x, y);
+  },
+
+  /**
+   * 处理触摸移动事件
+   * 继续绘制当前笔画的路径
+   * @param {Object} e - 触摸事件对象
+   */
+  handleTouchMove(e) {
+    if (!this.data.isDrawing) return;
+    const { x, y } = e.touches[0];
+    this.data.currentStroke.push([x, y]);
+    this.data.ctx.lineTo(x, y);
+    this.data.ctx.stroke();
+  },
+
+  /**
+   * 处理触摸结束事件
+   * 完成当前笔画,将其添加到笔画历史中
+   */
+  handleTouchEnd() {
+    if (!this.data.isDrawing) return;
+    this.setData({
+      isDrawing: false,
+      points: [...this.data.points, this.data.currentStroke],
+      currentStroke: []
+    });
+  },
+
+  /**
+   * 清除画布内容
+   * 清空所有笔画记录和画布显示
+   */
+  handleClear() {
+    const { ctx } = this.data;
+    ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
+    this.setData({ points: [] });
+  },
+
+  /**
+   * 撤销上一步操作
+   * 移除最后一笔,并重绘剩余的笔画
+   */
+  handleUndo() {
+    if (this.data.points.length === 0) return;
+
+    const { ctx } = this.data;
+    ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
+
+    // 移除最后一笔
+    const newPoints = this.data.points.slice(0, -1);
+    this.setData({ points: newPoints });
+
+    // 重绘所有笔画
+    newPoints.forEach(stroke => {
+      ctx.beginPath();
+      ctx.moveTo(stroke[0][0], stroke[0][1]);
+      stroke.forEach(([x, y]) => {
+        ctx.lineTo(x, y);
+      });
+      ctx.stroke();
+    });
+  },
+
+  /**
+   * 提交签名
+   * 将画布内容转换为图片并处理提交逻辑
+   * @returns {Promise<void>}
+   */
+  async handleSubmit() {
+    let that = this
+    if (this.data.points.length === 0) {
+      wx.showToast({
+        title: '请先签名',
+        icon: 'none'
+      });
+      return;
+    }
+
+    try {
+      // 将画布内容转换为图片
+      const tempFilePath = await new Promise((resolve, reject) => {
+        wx.canvasToTempFilePath({
+          canvas: canvas,
+          success: res => resolve(res.tempFilePath),
+          fail: reject
+        });
+      });
+
+      // 这里可以处理签名图片,比如上传到服务器
+      console.log('签名图片路径:', tempFilePath);
+
+      // 将图片转为 Base64
+      that.imageToBase64(tempFilePath, function (error, base64String) {
+        if (error) {
+            console.error('Base64 转换失败', error);
+            return;
+        }
+        that.setData({
+            signature: base64String
+        })
+        let formData = {
+          id:that.data.id,
+          customerSign:base64String
+        }
+        // 上传 Base64 编码的图片,订单签名
+        app.request.POST({
+          url: app.API.updateSignCustomerLoad,
+          params: formData,
+          page: that,
+          isLoadingTxt: '提交中...',
+          isSubmitting: true,
+          successFun: true
+        }).then(res => {
+          wx.showToast({
+            title: '确认成功',
+            icon: 'success',
+            duration: 2000,
+            complete: function () {
+              setTimeout(() => {
+                wx.navigateBack()
+              }, 1500) //延迟时间  
+            }
+          })
+        })
+        //that.selfConfirm(base64String);
+    });
+      
+      // wx.showToast({
+      //   title: '提交成功',
+      //   icon: 'success'
+      // });
+
+      // // 返回上一页
+      // setTimeout(() => {
+      //   wx.navigateBack();
+      // }, 1500);
+    } catch (error) {
+      console.error('提交签名失败:', error);
+      wx.showToast({
+        title: '提交失败',
+        icon: 'error'
+      });
+    }
+
+    
+  },
+
+  //图片转baose64
+  imageToBase64(tempFilePath, callback) {
+    wx.getFileSystemManager().readFile({
+        filePath: tempFilePath,
+        encoding: 'base64',
+        success: function (res) {
+            // 拼接与 PC 端一致的格式
+            var base64Str = "data:image/png;base64," + res.data;
+            callback(null, base64Str);
+        },
+        fail: function (error) {
+            callback(error);
+        }
+    });
+},
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 6 - 0
otherPages/loadAppoint/updateSign.json

@@ -0,0 +1,6 @@
+{
+  "navigationBarTitleText": "客户回签",
+  "usingComponents": {
+    "van-button": "@vant/weapp/button/index"
+  }
+}

+ 65 - 0
otherPages/loadAppoint/updateSign.less

@@ -0,0 +1,65 @@
+/* pages/updateSign/index.wxss */
+/* 页面容器 签字区域只自改这里的高度 */
+.signature-page {
+  width: 100vw;
+  height: calc(50vh - 44rpx);
+  // background-color: #f6f6f6;
+  display: flex;
+  flex-direction: column;
+  padding: 16rpx;
+  box-sizing: border-box;
+}
+
+/* 顶部操作栏 */
+.action-bar {
+  display: flex;
+  justify-content: flex-end;
+  gap: 16rpx;
+  margin-bottom: 20rpx;
+  padding: 0 10rpx;
+}
+
+/* 自定义按钮样式 */
+.action-bar .t-button {
+  min-width: auto;
+  padding: 0 16rpx;
+  font-size: 18rpx !important;
+  height: 35rpx !important;
+  line-height: 35rpx !important;
+}
+
+/* 按钮图标样式 */
+.action-bar .t-icon,
+.action-bar .t-button__icon,
+.action-bar .t-button .t-icon {
+  font-size: 20rpx !important;
+}
+
+/* 签名区域-大尺寸 */
+.signature-area-large {
+  flex: 1;
+  background-color: #ffffff;
+  border-radius: 16rpx;
+  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.2);
+  overflow: hidden;
+  position: relative;
+  margin: 0 auto;
+  width: 94vw;
+  height: 100vh;
+}
+
+/* 签名画布-大尺寸 */
+.signature-canvas-large {
+  width: 100%;
+  height: 100%;
+  background-color: #ffffff;
+}
+
+/* 提示文本 */
+.signature-tips {
+  text-align: center;
+  color: #999999;
+  font-size: 12px;
+  margin-top: 16rpx;
+}
+

+ 28 - 0
otherPages/loadAppoint/updateSign.wxml

@@ -0,0 +1,28 @@
+<!--pages/updateSign/index.wxml-->
+<!-- 电子签名页面 -->
+<view class="signature-page">
+  <!-- 顶部操作栏 -->
+  <!-- <view class="action-bar">
+    <van-button type="primary" bind:tap="handleClear">重写</van-button>
+    <van-button type="danger" bind:tap="handleUndo">撤销</van-button>
+    <van-button type="info" bind:tap="handleSubmit">提交</van-button>
+  </view> -->
+
+  <!-- 签名区域 -->
+  <view class="signature-area-large">
+    <canvas type="2d" id="canvas" class="signature-canvas-large" disable-scroll="{{true}}" bindtouchstart="handleTouchStart" bindtouchmove="handleTouchMove" bindtouchend="handleTouchEnd"></canvas>
+  </view>
+
+  <!-- 提示文本 -->
+  <view class="signature-tips">请在上方区域书写您的签名</view>
+
+  <view style="display: grid;grid-template-columns: 1fr 1fr;grid-gap: 30rpx;padding: 30rpx 0;">
+    <view><van-button type="primary" block bind:tap="handleClear">重写</van-button></view>
+    <view><van-button type="danger" block bind:tap="handleUndo">撤销</van-button></view>
+  </view>
+
+  <view class="fixedBtn submitBtn">
+    <van-button round block type="info" bind:tap="handleSubmit">提交</van-button>
+  </view>
+
+</view>

+ 57 - 0
otherPages/loadAppoint/updateSign.wxss

@@ -0,0 +1,57 @@
+/* pages/updateSign/index.wxss */
+/* 页面容器 签字区域只自改这里的高度 */
+.signature-page {
+  width: 100vw;
+  height: calc(50vh - 44rpx);
+  display: flex;
+  flex-direction: column;
+  padding: 16rpx;
+  box-sizing: border-box;
+}
+/* 顶部操作栏 */
+.action-bar {
+  display: flex;
+  justify-content: flex-end;
+  gap: 16rpx;
+  margin-bottom: 20rpx;
+  padding: 0 10rpx;
+}
+/* 自定义按钮样式 */
+.action-bar .t-button {
+  min-width: auto;
+  padding: 0 16rpx;
+  font-size: 18rpx !important;
+  height: 35rpx !important;
+  line-height: 35rpx !important;
+}
+/* 按钮图标样式 */
+.action-bar .t-icon,
+.action-bar .t-button__icon,
+.action-bar .t-button .t-icon {
+  font-size: 20rpx !important;
+}
+/* 签名区域-大尺寸 */
+.signature-area-large {
+  flex: 1;
+  background-color: #ffffff;
+  border-radius: 16rpx;
+  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.2);
+  overflow: hidden;
+  position: relative;
+  margin: 0 auto;
+  width: 94vw;
+  height: 100vh;
+}
+/* 签名画布-大尺寸 */
+.signature-canvas-large {
+  width: 100%;
+  height: 100%;
+  background-color: #ffffff;
+}
+/* 提示文本 */
+.signature-tips {
+  text-align: center;
+  color: #999999;
+  font-size: 12px;
+  margin-top: 16rpx;
+}

+ 3 - 2
otherPages/loadArrive/edit.js

@@ -77,8 +77,9 @@ Page({
       let unloadImgArr = getInfo.sailFilePath.split(',')
       unloadImgArr.forEach(element => {
         fileList.push({
-          url: app.host.BASEIMG_URL+element,
-          isImage:true
+          url     : app.host.BASEIMG_URL+element,
+          imgUrl  : element,
+          isImage : true
         })
       });
     }

+ 14 - 12
otherPages/loadArrive/index.js

@@ -9,19 +9,19 @@ Page({
   data: {
     str:'&emsp;',
     str2: '&ensp;',
+    loginStatus: wx.getStorageSync('loginStatus') ? wx.getStorageSync('loginStatus') : false,
+    roleCodeList: wx.getStorageSync('roleCodeList') ? wx.getStorageSync('roleCodeList') : '',
 
-    filterWidth: 0, //获取顶部筛选宽度
-    filterHeight: 0, //获取顶部筛选高度
-    safeAreaHeight: 0, //底部安全区域的高度
     //按钮位置参数
+    safeAreaHeight: 0, //底部安全区域的高度
     buttonTop: 0,
     buttonLeft: 0,
     windowHeight: '',
     windowWidth: '',
 
-    loginStatus: wx.getStorageSync('loginStatus') ? wx.getStorageSync('loginStatus') : false,
-    roleCodeList: wx.getStorageSync('roleCodeList') ? wx.getStorageSync('roleCodeList') : '',
-    searchVal: '',
+    showModal: false,
+    defaultText: '请选择',
+    isSubmitting: false,
 
     arriveStatusArray: [{
       dictValue: "",
@@ -36,12 +36,12 @@ Page({
     totalPages: 1,
     more: false,
     nomore: '',
-
     resData:[],
+    searchVal: '',
 
     show: false,
-    auditFlag:true,
-    orderReason:'',//审核备注
+    auditFlag:'false',
+    arriveReason:'',//审核备注
 
     requestStatu2: '加载中...',
     page2: 1,
@@ -262,7 +262,7 @@ Page({
     let { id } = e.currentTarget.dataset
     this.setData({
       show: true,
-      orderReason: '',
+      arriveReason: '',
       id: id,
     });
   },
@@ -270,7 +270,7 @@ Page({
     this.setData({
       show: false,
       auditFlag:'false',
-      orderReason:'',
+      arriveReason:'',
       id: ''
     });
   },
@@ -290,7 +290,9 @@ Page({
   formSubmit: function (e) {
     let formData = e.detail.value;
     var warn = ""; //弹框时提示的内容
-    if (formData.auditFlag=='true' && formData.arriveReason == '') {
+    if (formData.auditFlag == '') {
+      warn = "选择审核结果!";
+    } else if (formData.auditFlag == 'false' && formData.arriveReason == '') {
       warn = "审核不通过时备注不能为空!";
     }
     formData.auditFlag = formData.auditFlag=='true'

+ 2 - 2
otherPages/loadArrive/index.wxml

@@ -47,14 +47,14 @@
               <view class="info"><text>船号:{{item.shipNo?item.shipNo:'未填写'}}</text><text>报港数量:{{item.arriveNumber?item.arriveNumber+' 吨':''}}</text></view>
               <view class="info"><text>到港时间:{{item.arriveTime?filters.tosubStr(item.arriveTime,0,16):''}}</text></view>
               
-              <view class="bottomBtn" wx:if="{{ (roleCodeList == 'ship' && (item.status == '1' || item.status == '3')) || (roleCodeList == 'bizAdmin' && item.status == '1') || (roleCodeList == 'ship' && item.loadStatus == '8' && item.status == '2')}}">
+              <view class="bottomBtn" wx:if="{{ (roleCodeList == 'ship' && (item.status == '1' || item.status == '3')) || (roleCodeList == 'bizAdmin' && item.status == '1') || (roleCodeList == 'ship' && item.loadStatus == '9' && item.status == '2')}}">
                 <van-button type="info" size="small" data-url="edit?index={{index}}" catchtap="toLink" style="margin-right: 20rpx;" wx:if="{{roleCodeList == 'ship' && item.status == '3'}}">修改</van-button>
 
                 <van-button type="danger" size="small" data-id="{{item.id}}" data-arrive-number="{{item.arriveNumber}}" catchtap="delFun" style="margin-right: 20rpx;" wx:if="{{roleCodeList == 'ship' && (item.status == '1' || item.status == '3')}}">删除</van-button>
                 
                 <van-button type="primary" size="small" data-id="{{item.id}}" data-approve-type="one" catchtap="showPopup" wx:if="{{roleCodeList == 'bizAdmin' && item.status == '1'}}">审核</van-button>
 
-                <van-button type="warning" size="small" data-id="{{item.id}}" data-arrive-number="{{item.arriveNumber}}" catchtap="confirmFun" style="margin-right: 20rpx;" wx:if="{{roleCodeList == 'ship' && item.loadStatus == '8' && item.status == '2'}}">确认</van-button>
+                <van-button type="warning" size="small" data-id="{{item.id}}" data-arrive-number="{{item.arriveNumber}}" catchtap="confirmFun" style="margin-right: 20rpx;" wx:if="{{roleCodeList == 'ship' && item.loadStatus == '9' && item.status == '2'}}">确认</van-button>
               </view>
             </navigator>
           </block>

+ 3 - 1
otherPages/loadArrive/info.js

@@ -37,7 +37,8 @@ Page({
       let unloadImgArr = getInfo.sailFilePath.split(',')
       unloadImgArr.forEach(element => {
         fileList.push({
-          url: app.host.BASEIMG_URL+element,
+          url     : app.host.BASEIMG_URL+element,
+          imgUrl  : element,
           isImage:true
         })
       });
@@ -67,6 +68,7 @@ Page({
   //       unloadImgArr.forEach(element => {
   //         fileList.push({
   //           url: app.host.BASEIMG_URL+element,
+  //           imgUrl: element,
   //           isImage:true
   //         })
   //       });

+ 3 - 2
otherPages/repairDispatch/info.js

@@ -29,8 +29,9 @@ Page({
       let unloadImgArr = getInfo.unloadImg.split(',')
       unloadImgArr.forEach(element => {
         fileList.push({
-          url: app.host.BASEIMG_URL+element,
-          isImage:true
+          url     : app.host.BASEIMG_URL+element,
+          imgUrl  : element,
+          isImage : true
         })
       });
     }

+ 3 - 2
otherPages/reportFault/info.js

@@ -29,8 +29,9 @@ Page({
       let unloadImgArr = getInfo.unloadImg.split(',')
       unloadImgArr.forEach(element => {
         fileList.push({
-          url: app.host.BASEIMG_URL+element,
-          isImage:true
+          url     : app.host.BASEIMG_URL+element,
+          imgUrl  : element,
+          isImage : true
         })
       });
     }

+ 0 - 151
otherPages/ship/add.js

@@ -1,151 +0,0 @@
-// pages/car/add.js
-const app = getApp()
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    defaultText: '请选择',
-    isSubmitting: false,
-    isKeyboard: false, //是否显示车牌输入键盘
-    inputOnFocusIndex: '', //当前锁定的车号位置
-    licensePlate: '', //车牌号
-
-    isShow: true,
-    current_index: 0,
-
-    overArray:[],//车辆轴数
-    overIndex:'',
-
-    originalInvoicePhoto: '',
-    originalInvoicePhotoUrl: ''
-  },
-  //输入框焦点聚焦时隐藏车牌号输入框
-  hideKeybord: function () {
-    this.setData({
-      isKeyboard: false,
-      inputOnFocusIndex: ''
-    })
-  },
-
-  //下拉选择
-  bindPickerChange: function (e) { //下拉菜单
-    let { pickername } = e.target.dataset
-    let getIndex = pickername + 'Index'
-    app.util.getPickerIndex(this, getIndex, e);
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    if (!wx.getStorageSync('loginStatus')) {
-      wx.switchTab({
-        url: '/pages/index/index',
-      })
-    } else {
-      //获取订单下拉列表、车辆轴数下拉列表
-    this.getSelectData()
-    }
-
-  },
-
-  //获取订单下拉列表、车辆轴数下拉列表
-  getSelectData:function(){
-    //获取车辆轴数下拉列表
-    app.request.GET({
-      url: app.API.getCarzheList,
-      params: {},
-      page: this,
-      successFun: true
-    }).then(res => {
-      this.setData({
-        overArray:res.data.data
-      })
-    })
-  },
-
-  //获取车牌号
-  licensePlate: function (e) {
-    this.setData({
-      licensePlate: e.detail.carNum
-    })
-  },
-
-  // 选择图片
-  afterRead: function (e) {
-    let that = this
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['compressed'],
-      sourceType: ['album', 'camera'],
-      success: res => {
-        var base64 = 'data:image/jpeg;base64,' + wx.getFileSystemManager().readFileSync(res.tempFilePaths[0], "base64");
-        that.setData({
-          originalInvoicePhoto: base64,
-          originalInvoicePhotoUrl: res.tempFilePaths[0]
-        })
-      }
-    })
-  },
-  //删除当前选择的图片
-  clearImgFun: function () {
-    this.setData({
-      originalInvoicePhoto: '',
-      originalInvoicePhotoUrl: ''
-    })
-  },
-
-  //提交事件
-  formSubmit: function ({detail:{value}}) {
-    let reg = /^1[3-9]\d{9}$/;
-    var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
-    var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
-    var warn = ""; //弹框时提示的内容
-    //value.certificateNoImage = this.data.originalInvoicePhoto
-    if (value.licensePlate == '') {
-      warn = "车牌不能为空!";
-    } else if (value.licensePlate.length < 7) {
-      warn = "请选择完整车牌号!";
-    } else if (value.licensePlate.length == 7 && !creg.test(value.licensePlate)) {
-      warn = "车牌号格式错误!";
-    } else if (value.licensePlate.length == 8 && !xreg.test(value.licensePlate)) {
-      warn = "车牌号格式错误!";
-    } else if (value.vehicleAxles == '') {
-      warn = "请选择车辆轴数!";
-    }
-    //  else if (value.driverName == '') {
-    //   warn = "司机姓名不能为空!";
-    // } else if (value.driverPhone == '') {
-    //   warn = "司机号码不能为空!";
-    // } else if (!reg.test(value.driverPhone)) {
-    //   warn = "请填写正确的号码!";
-    // }
-    if (warn != '') {
-      app.util.checkForm(warn);
-    } else {
-      app.request.POST({
-        url: app.API.bizvehicleAdd,
-        params: value,
-        page: this,
-        isLoadingTxt: '提交中...',
-        isSubmitting: true,
-        successFun: true
-      }).then(res => {
-        wx.showToast({
-          title: '新增成功',
-          icon: 'success',
-          duration: 2000,
-          mask:true,
-          complete: function () {
-            setTimeout(() => {
-              wx.navigateBack()
-            }, 1500) //延迟时间  
-          }
-        })
-      })
-    }
-  }
-
-})

+ 0 - 53
otherPages/ship/add.wxml

@@ -1,53 +0,0 @@
-<!--pages/car/add.wxml-->
-<view class="container">
-  <view class="formTopBlueBg"></view>
-  <view class="width710" style="margin-top: -100rpx;">
-    <form bindsubmit="formSubmit">
-      <view class="part">
-        <van-field required label="车牌号码" readonly border="{{false}}"></van-field>
-        <car-num-input bind:setCarNum="licensePlate" isKeyboard="{{isKeyboard}}" inputOnFocusIndex="{{inputOnFocusIndex}}"></car-num-input>
-      </view>
-      <view class="part">
-        <input name="licensePlate" value='{{licensePlate}}' hidden='true' />
-        <!-- 车辆轴数 -->
-        <van-field label="车辆轴数" required input-align="right" bindtap="hideKeybord">
-          <view slot="input" style="width: 100%;">
-            <input name="vehicleAxles" value='{{overArray[overIndex].id}}' hidden='true' />
-            <picker bindchange="bindPickerChange" value="{{overIndex}}}" range="{{overArray}}" range-key="vehicleAxleNumber" data-pickername='over'>
-              <view wx:if="{{overArray[overIndex].vehicleAxleNumber}}"> {{overArray[overIndex].vehicleAxleNumber}}</view>
-              <view wx:else class="selectPlaceholder">{{defaultText}}</view>
-            </picker>
-          </view>
-          <view slot="right-icon">
-            <van-icon name="arrow" />
-          </view>
-        </van-field>
-        <van-field label="司机姓名" name="driverName" input-align="right" placeholder="请输入司机姓名" bind:focus="hideKeybord" />
-        <van-field label="司机号码" name="driverMobile" input-align="right" placeholder="请输入司机号码" bind:focus="hideKeybord" />
-        <!-- <van-field label="营运证号图片" title-width="120"  required input-align="left" border="{{ false }}" readonly></van-field> -->
-        <!-- <view style="padding: 0 20rpx 20rpx;background-color: #fff;">
-          <view style="width: 80px;height: 80px;line-height:80px;text-align:center;background-color: #f7f8fa;border-radius: 6rpx;position: relative;" bindtap="afterRead">
-            <block wx:if="{{originalInvoicePhoto}}">
-              <view style="width: 34rpx;height: 34rpx;line-height:34rpx;text-align:center;position: absolute;top: 0;right: 0;background-color: rgba(0, 0, 0, 0.7);">
-                <van-icon name="cross" size="14px" color="#ffffff" catchtap="clearImgFun" />
-              </view>
-              <image src="{{originalInvoicePhotoUrl}}" mode="" style="width: 80px;height:80px;" />
-            </block>
-            <block wx:else="">
-              <van-icon name="photograph" size="24px" color="#dcdee0" />
-            </block>
-          </view>
-          <van-uploader file-list="{{ fileList }}" bind:after-read="afterRead" preview-size="80"/>
-        </view> -->
-      </view>
-      
-
-      <view class="submitBtn">
-        <view style="padding-top: 100rpx;">
-          <van-button loading="{{isSubmitting}}" round block disabled="{{isSubmitting}}" loading-text="{{isSubmitting?'提交中...':''}}" type="info" form-type="submit">确定
-        </van-button>
-        </view>
-      </view>
-    </form>
-  </view>
-</view>

+ 0 - 225
otherPages/ship/edit.js

@@ -1,225 +0,0 @@
-// pages/car/edit.js
-const app = getApp()
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    isKeyboard: false, //是否显示车牌输入键盘
-    inputOnFocusIndex: '', //当前锁定的车号位置
-    licensePlate: '', //车牌号
-    defaultText: '请选择',
-
-    inputPlates: { //默认显示车牌号
-      index0: "",
-      index1: "",
-      index2: "",
-      index3: "",
-      index4: "",
-      index5: "",
-      index6: "",
-      index7: ""
-    },
-
-    id: '',
-
-    isShow: true,
-    current_index: 0,
-
-    blackSwitch:'2',
-    whiteSwitch:'2',
-    internal:2,
-
-    originalInvoicePhoto: '', //base64码
-    originalInvoicePhotoUrl: ''
-  },
-  //输入框焦点聚焦时隐藏车牌号输入框
-  hideKeybord: function () {
-    this.setData({
-      isKeyboard: false,
-      inputOnFocusIndex: ''
-    })
-  },
-
-  //下拉选择
-  bindPickerChange: function (e) { //下拉菜单
-    let { pickername } = e.target.dataset
-    let getIndex = pickername + 'Index'
-    app.util.getPickerIndex(this, getIndex, e);
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    if (wx.getStorageSync('loginStatus')) {
-      //获取详情
-      var pages = getCurrentPages();
-      var prevPage = pages[pages.length - 2];
-      let getInfo = prevPage.data.resData[options.index]
-
-      let getCarNumArr = getInfo.licensePlate ? getInfo.licensePlate.split('') : ''
-      let inputPlates = {};
-      for (let i = 0; i < getCarNumArr.length; i++) {
-        inputPlates['index' + i] = getCarNumArr[i]
-      }
-
-      this.setData({
-        id:options.id,
-        info: getInfo,
-        inputPlates: inputPlates,
-        isNewEnergy: getCarNumArr.length > 7 ? true : false,
-        licensePlate: getInfo.licensePlate,
-      })
-
-      this.getSelectData()
-
-    } else {
-      wx.switchTab({
-        url: '/pages/center/index',
-      })
-    }
-  },
-
-  //获取订单下拉列表、车辆轴数下拉列表
-  getSelectData:function(){
-    //获取车辆轴数下拉列表
-    app.request.GET({
-      url: app.API.getCarzheList,
-      params: {},
-      page: this,
-      successFun: true
-    }).then(res => {
-      this.setData({
-        overArray:res.data.data,
-        overIndex: app.util.getDicIndex(res.data.data, this.data.info.vehicleAxles, 'id'),
-      })
-    })
-  },
-
-  //查询详情
-  getInfo: function (id) {
-    //详情
-    app.request.requestGetApi(app.API.api.carDetail, {
-      'id': id
-    }, this, function (res, _that) {
-      let data = res.data.data;
-      _that.setData({
-        info: data,
-        inputPlates: inputPlates,
-        isNewEnergy: getCarNumArr.length > 7 ? true : false,
-        licensePlate: data.licensePlate,
-        projectIndex: app.util.getDicIndex(_that.data.projectArray, data.projectId, 'id'), //请假类型,获取对应下标
-      })
-    })
-  },
-
-  //开关
-  onChange(e) {
-    let { switchType } = e.currentTarget.dataset
-    let number = 0
-    if(e.detail=='1'){
-      if(this.data.blackSwitch=='1'){
-        number = number+1
-      }
-      if(this.data.whiteSwitch=='1'){
-        number = number+1
-      }
-      if(this.data.internal=='1'){
-        number = number+1
-      }
-      if(number<1){
-        // 需要手动对 checked 状态进行更新
-        this.setData({ 
-          [switchType]: e.detail 
-        });
-      }else{
-        app.util.checkForm('黑白名单及内部车辆最多只能开启一项');
-      }
-    }else{
-      this.setData({ 
-        [switchType]: e.detail 
-      });
-    }
-    
-    
-  },
-
-  //获取车牌号
-  licensePlate: function (e) {
-    this.setData({
-      licensePlate: e.detail.carNum
-    })
-  },
-
-  // 选择图片
-  afterRead: function (e) {
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['compressed'],
-      sourceType: ['album', 'camera'],
-      success: res => {
-        var base64 = 'data:image/jpeg;base64,' + wx.getFileSystemManager().readFileSync(res.tempFilePaths[0], "base64");
-        this.setData({
-          originalInvoicePhoto: base64,
-          originalInvoicePhotoUrl: res.tempFilePaths[0]
-        })
-        console.log('上传时的base64:', this.data.originalInvoicePhoto)
-      }
-    })
-  },
-
-  //删除当前选择的图片
-  clearImgFun: function () {
-    this.setData({
-      originalInvoicePhoto: '',
-      originalInvoicePhotoUrl: ''
-    })
-  },
-
-  //提交事件
-  formSubmit: function ({detail:{value}}) {
-    let reg = /^1[3-9]\d{9}$/;
-    var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
-    var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
-    var warn = ""; //弹框时提示的内容
-    //formData.certificateNoImage = this.data.originalInvoicePhoto
-    if (value.licensePlate == '') {
-      warn = "车牌不能为空!";
-    } else if (value.licensePlate.length < 7) {
-      warn = "请选择完整车牌号!";
-    } else if (value.licensePlate.length == 7 && !creg.test(value.licensePlate)) {
-      warn = "车牌号格式错误!";
-    } else if (value.licensePlate.length == 8 && !xreg.test(value.licensePlate)) {
-      warn = "车牌号格式错误!";
-    } else if (value.vehicleAxles == '') {
-      warn = "请选择车辆轴数!";
-    }
-    if (warn != '') {
-      app.util.checkForm(warn);
-    } else {
-      app.request.POST({
-        url: app.API.bizvehicleEdit,
-        params: value,
-        page: this,
-        isLoadingTxt: '提交中...',
-        isSubmitting: true,
-        successFun: true
-      }).then(res => {
-        wx.showToast({
-          title: '修改成功',
-          icon: 'success',
-          duration: 2000,
-          mask:true,
-          complete: function () {
-            setTimeout(() => {
-              wx.navigateBack()
-            }, 1500) //延迟时间  
-          }
-        })
-      })
-    }
-  }
-
-})

+ 0 - 40
otherPages/ship/edit.wxml

@@ -1,40 +0,0 @@
-<!--pages/car/edit.wxml-->
-<view class="container">
-  <view class="formTopBlueBg"></view>
-  <view class="width710" style="margin-top: -100rpx;">
-    <form bindsubmit="formSubmit">
-
-      <view class="part">
-        <van-field required label="车牌号码" readonly border="{{false}}"></van-field>
-        <car-num-input bind:setCarNum="licensePlate" isKeyboard="{{isKeyboard}}" inputOnFocusIndex="{{inputOnFocusIndex}}" inputPlates="{{inputPlates}}" isNewEnergy="{{isNewEnergy}}"></car-num-input>
-      </view>
-
-      <view class="part">
-        <input name="id" value='{{id}}' hidden='true' />
-        <input name="licensePlate" value='{{licensePlate}}' hidden='true' />
-        <!-- 车辆轴数 -->
-        <van-field label="车辆轴数" required input-align="right" bindtap="hideKeybord">
-          <view slot="input" style="width: 100%;">
-            <input name="vehicleAxles" value='{{overArray[overIndex].id}}' hidden='true' />
-            <picker bindchange="bindPickerChange" value="{{overIndex}}}" range="{{overArray}}" range-key="vehicleAxleNumber" data-pickername='over'>
-              <view wx:if="{{overArray[overIndex].vehicleAxleNumber}}"> {{overArray[overIndex].vehicleAxleNumber}}</view>
-              <view wx:else class="selectPlaceholder">{{defaultText}}</view>
-            </picker>
-          </view>
-          <view slot="right-icon">
-            <van-icon name="arrow" />
-          </view>
-        </van-field>
-        <van-field label="司机姓名" name="driverName" model:value="{{info.driverName&&info.driverName!='null'?info.driverName:''}}" input-align="right" placeholder="请输入司机姓名" bind:focus="hideKeybord" />
-        <van-field label="司机号码" name="driverMobile" model:value="{{info.driverMobile&&info.driverMobile!='null'?info.driverMobile:''}}" input-align="right" placeholder="请输入司机号码" bind:focus="hideKeybord" />
-      </view>
-
-      <view class="submitBtn">
-        <view style="padding-top: 100rpx;">
-          <van-button loading="{{isSubmitting}}" round block disabled="{{isSubmitting}}" loading-text="{{isSubmitting?'提交中...':''}}" type="info" form-type="submit">确定
-        </van-button>
-        </view>
-      </view>
-    </form>
-  </view>
-</view>

+ 0 - 48
otherPages/ship/info.js

@@ -1,48 +0,0 @@
-// pages/car/info.js
-const app = getApp()
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    info: {},
-    fileList:[]
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    var pages = getCurrentPages();
-    var prevPage = pages[pages.length - 2];
-    let getInfo = prevPage.data.resData[options.index]
-    this.setData({
-      id: options.id,
-      info:getInfo
-    })
-    //this.getInfo(options.id)
-  },
-
-  //查询详情
-  getInfo: function (id) {
-    //详情
-    app.request.requestGetApi(app.API.api.carDetail, {
-      'id': id
-    }, this, function (res, _that) {
-      let data = res.data.data;
-      let getPhotoArr = data.certificateNoImage.split(',');
-      let getfileListArr = []
-      for(let i=0;i<getPhotoArr.length;i++){
-        getfileListArr.push({
-          url:getPhotoArr[i]
-        })
-      }
-      _that.setData({
-        info: data,
-        "fileList":getfileListArr
-      })
-    })
-  }
-
-})

+ 0 - 17
otherPages/ship/info.wxml

@@ -1,17 +0,0 @@
-<!--pages/car/info.wxml-->
-<view class="container">
-  <view class="height20"></view>
-  <view class="width710">
-    <view class="part">
-      <van-cell-group>
-        <van-field label="车牌号码" value="{{ info.licensePlate }}" readonly input-align="right" />
-        <van-field label="车辆轴数" value="{{ info.vehicleAxleNumber }}" readonly input-align="right" />
-        <van-field label="司机姓名" value="{{ info.driverName!='null'&&info.driverName!=''?info.driverName:'' }}" readonly input-align="right" />
-        <van-field label="司机号码" value="{{ info.driverMobile!='null'&&info.driverMobile!=''?info.driverMobile:'' }}" readonly input-align="right" />
-        <van-field label="创建时间" value="{{ info.createTime }}" readonly input-align="right" />
-      </van-cell-group>
-    </view>
-  </view>
-</view>
-
-<wxs module="filters" src="../../utils/filter.wxs"></wxs>

+ 3 - 2
otherPages/upDownSubmit/info.js

@@ -29,8 +29,9 @@ Page({
       let unloadImgArr = getInfo.unloadImg.split(',')
       unloadImgArr.forEach(element => {
         fileList.push({
-          url: app.host.BASEIMG_URL+element,
-          isImage:true
+          url     : app.host.BASEIMG_URL+element,
+          imgUrl  : element,
+          isImage : true
         })
       });
     }

+ 3 - 2
otherPages/workTask/info.js

@@ -29,8 +29,9 @@ Page({
       let unloadImgArr = getInfo.unloadImg.split(',')
       unloadImgArr.forEach(element => {
         fileList.push({
-          url: app.host.BASEIMG_URL+element,
-          isImage:true
+          url     : app.host.BASEIMG_URL+element,
+          imgUrl  : element,
+          isImage : true
         })
       });
     }

+ 6 - 4
pages/appointReplace/index.js

@@ -34,7 +34,7 @@ Page({
     auditStatusArray:[],//审核状态
 
     show: false,
-    auditFlag:true,
+    auditFlag:'false',
     auditRemark:'',//审核备注
   },
 
@@ -226,9 +226,9 @@ Page({
     this.setData({
       [e.currentTarget.dataset.radiotype]: e.detail.value
     })
-    if (e.detail.value == '1') {
+    if (e.detail.value == 'true') {
       this.setData({
-        appointmentReason: ''
+        auditRemark: ''
       })
     }
   },
@@ -237,7 +237,9 @@ Page({
   formSubmit: function (e) {
     let formData = e.detail.value;
     var warn = ""; //弹框时提示的内容
-    if (formData.auditFlag=='true' && formData.arriveReason == '') {
+    if (formData.auditFlag == '') {
+      warn = "选择审核结果!";
+    } else if (formData.auditFlag == 'false' && formData.auditRemark == '') {
       warn = "审核不通过时备注不能为空!";
     }
     formData.auditFlag = formData.auditFlag=='true'

+ 6 - 5
pages/car/add.js

@@ -15,8 +15,8 @@ Page({
     isShow: true,
     current_index: 0,
 
-    overArray:[],//车辆轴数
-    overIndex:'',
+    carzheArray:[],//车辆轴数
+    carzheIndex:'',
 
     originalInvoicePhoto: '',
     originalInvoicePhotoUrl: ''
@@ -46,7 +46,7 @@ Page({
       })
     } else {
       //获取订单下拉列表、车辆轴数下拉列表
-    this.getSelectData()
+      this.getSelectData()
     }
 
   },
@@ -61,7 +61,7 @@ Page({
       successFun: true
     }).then(res => {
       this.setData({
-        overArray:res.data.data
+        carzheArray:res.data.data
       })
     })
   },
@@ -112,7 +112,7 @@ Page({
       warn = "车牌号格式错误!";
     } else if (value.licensePlate.length == 8 && !xreg.test(value.licensePlate)) {
       warn = "车牌号格式错误!";
-    } else if (value.vehicleAxles == '') {
+    } else if (value.carzheId == '') {
       warn = "请选择车辆轴数!";
     }
     //  else if (value.driverName == '') {
@@ -122,6 +122,7 @@ Page({
     // } else if (!reg.test(value.driverPhone)) {
     //   warn = "请填写正确的号码!";
     // }
+    value.vehicleAxles = value.carzheId
     if (warn != '') {
       app.util.checkForm(warn);
     } else {

+ 3 - 3
pages/car/add.wxml

@@ -12,9 +12,9 @@
         <!-- 车辆轴数 -->
         <van-field label="车辆轴数" required input-align="right" bindtap="hideKeybord">
           <view slot="input" style="width: 100%;">
-            <input name="vehicleAxles" value='{{overArray[overIndex].id}}' hidden='true' />
-            <picker bindchange="bindPickerChange" value="{{overIndex}}}" range="{{overArray}}" range-key="vehicleAxleNumber" data-pickername='over'>
-              <view wx:if="{{overArray[overIndex].vehicleAxleNumber}}"> {{overArray[overIndex].vehicleAxleNumber}}</view>
+            <input name="carzheId" value='{{carzheArray[carzheIndex].id}}' hidden='true' />
+            <picker bindchange="bindPickerChange" value="{{carzheIndex}}}" range="{{carzheArray}}" range-key="vehicleAxleNumber" data-pickername='carzhe'>
+              <view wx:if="{{carzheArray[carzheIndex].vehicleAxleNumber}}"> {{carzheArray[carzheIndex].vehicleAxleNumber}}</view>
               <view wx:else class="selectPlaceholder">{{defaultText}}</view>
             </picker>
           </view>

+ 4 - 3
pages/car/edit.js

@@ -92,8 +92,8 @@ Page({
       successFun: true
     }).then(res => {
       this.setData({
-        overArray:res.data.data,
-        overIndex: app.util.getDicIndex(res.data.data, this.data.info.vehicleAxles, 'id'),
+        carzheArray:res.data.data,
+        carzheIndex: app.util.getDicIndex(res.data.data, this.data.info.vehicleAxles, 'id'),
       })
     })
   },
@@ -193,9 +193,10 @@ Page({
       warn = "车牌号格式错误!";
     } else if (value.licensePlate.length == 8 && !xreg.test(value.licensePlate)) {
       warn = "车牌号格式错误!";
-    } else if (value.vehicleAxles == '') {
+    } else if (value.overId == '') {
       warn = "请选择车辆轴数!";
     }
+    value.vehicleAxles = value.carzheId
     if (warn != '') {
       app.util.checkForm(warn);
     } else {

+ 3 - 3
pages/car/edit.wxml

@@ -15,9 +15,9 @@
         <!-- 车辆轴数 -->
         <van-field label="车辆轴数" required input-align="right" bindtap="hideKeybord">
           <view slot="input" style="width: 100%;">
-            <input name="vehicleAxles" value='{{overArray[overIndex].id}}' hidden='true' />
-            <picker bindchange="bindPickerChange" value="{{overIndex}}}" range="{{overArray}}" range-key="vehicleAxleNumber" data-pickername='over'>
-              <view wx:if="{{overArray[overIndex].vehicleAxleNumber}}"> {{overArray[overIndex].vehicleAxleNumber}}</view>
+            <input name="carzheId" value='{{carzheArray[carzheIndex].id}}' hidden='true' />
+            <picker bindchange="bindPickerChange" value="{{carzheIndex}}}" range="{{carzheArray}}" range-key="vehicleAxleNumber" data-pickername='carzhe'>
+              <view wx:if="{{carzheArray[carzheIndex].vehicleAxleNumber}}"> {{carzheArray[carzheIndex].vehicleAxleNumber}}</view>
               <view wx:else class="selectPlaceholder">{{defaultText}}</view>
             </picker>
           </view>

+ 11 - 12
pages/car/index.js

@@ -30,7 +30,8 @@ Page({
     resData:[],
 
     show: false,
-    auditFlag:true
+    auditFlag:'false',
+    reason:'',//审核备注
   },
 
   /**
@@ -228,18 +229,16 @@ Page({
     let { id, approveType } = e.currentTarget.dataset
     this.setData({
       show: true,
-      refuseReason: '',
+      reason: '',
       id: id,
       approveType: approveType
     });
-    /*wx.navigateTo({
-      url: '/pages/appointment/review?id='+e.currentTarget.dataset.id
-    })*/
   },
   onClose() {
     this.setData({
       show: false,
       auditFlag:'false',
+      reason:'',
       id: ''
     });
   },
@@ -248,9 +247,9 @@ Page({
     this.setData({
       [e.currentTarget.dataset.radiotype]: e.detail.value
     })
-    if (e.detail.value == '1') {
+    if (e.detail.value == 'true') {
       this.setData({
-        appointmentReason: ''
+        reason: ''
       })
     }
   },
@@ -258,11 +257,11 @@ Page({
   formSubmit: function (e) {
     let formData = e.detail.value;
     var warn = ""; //弹框时提示的内容
-    // if (formData.auditFlag == '') {
-    //   warn = "选择审核结果!";
-    // } else if (formData.auditFlag == '2' && formData.appointmentReason == '') {
-    //   warn = "审核不通过时备注不能为空!";
-    // }
+    if (formData.auditFlag == '') {
+      warn = "选择审核结果!";
+    } else if (formData.auditFlag == 'false' && formData.reason == '') {
+      warn = "审核不通过时备注不能为空!";
+    }
     formData.auditFlag = formData.auditFlag=='true'
     if (warn != '') {
       app.util.checkForm(warn);

+ 35 - 2
pages/deliveryConfirm/index.js

@@ -20,14 +20,46 @@ Page({
     more: false,
     nomore: '',
 
-    resData:[]
+    resData:[],
+
+    appointmentTypeArray: [{
+      dictValue: "",
+      dictLabel: "全部状态"
+    }],
+    appointmentTypeIndex: 0,
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
+    if(wx.getStorageSync('loginStatus')){
+      this.getTree()
+    }
+  },
 
+  //获取字典数据
+  getTree:function(){
+    app.request.GET({
+      url:app.API.getTree,
+      page:this,
+      successFun:true
+    }).then(res=>{
+      let treeData = res.data.data
+      for (const element of treeData) {
+        let arrStr;
+        switch (element.dictValue) {
+          case 'appointment_type':
+            arrStr = "appointmentTypeArray";
+            break;
+        }
+        let getArray = this.data.appointmentTypeArray
+        this.setData({
+          [arrStr]: getArray.concat(element.children)
+        })
+      }
+      
+    })
   },
 
   /**
@@ -110,7 +142,7 @@ Page({
     this.getListFun();
   },
 
-  //列表
+  //列表  appointmentType    1砂石    3起卸
   getListFun: function () {
     this.setData({
       page: 1
@@ -193,6 +225,7 @@ Page({
 
   /**
    * 页面上拉触底事件的处理函数
+   * appointmentType  1砂石  3起卸
    */
   onReachBottom() {
     this.data.page++;

+ 2 - 1
pages/deliveryConfirm/index.wxml

@@ -10,7 +10,7 @@
         </view>
       </view>
       <view class="filterStatus">
-        <view data-type="3" class="{{activeIndex==''?'active':''}}" bindtap="changeTypeFun">全部</view>
+        <view data-type="3" class="{{activeIndex=='3'?'active':''}}" bindtap="changeTypeFun">全部</view>
         <view data-type="1" class="{{activeIndex=='1'?'active':''}}" bindtap="changeTypeFun">未装货<van-tag round type="danger" wx:if="{{ sendRecordNum>0 }}">{{ sendRecordNum }}</van-tag></view>
         <view data-type="2" class="{{activeIndex=='2'?'active':''}}" bindtap="changeTypeFun">已装货</view>
       </view>
@@ -39,6 +39,7 @@
                 </view>
               </view>
               <view class="codeType" style="min-height: 20rpx;">
+                <text wx:if="{{item.appointmentType}}" class="status status{{item.appointmentType}}" style="float: none;">{{ filters.codeAnalysis(appointmentTypeArray, item.appointmentType, 'dictValue', 'dictLabel') }}</text>
                 <text wx:if="{{item.goodsName}}">{{item.goodsName}}</text>
                 <text wx:if="{{item.goodsModel}}">{{item.goodsModel}}</text>
               </view>

+ 0 - 300
pages/index/add.js

@@ -1,300 +0,0 @@
-// pages/index/add.js
-const app = getApp()
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    orderId: '',
-    orderName: '',
-    orderNumber:'',
-
-    showModal: false,
-    defaultText: '请选择',
-    isSubmitting: false,
-
-    orderArray: [], //订单
-    orderIndex: '',
-
-    overArray: [], //车辆轴数
-    overIndex: '',
-
-    isKeyboard: false, //是否显示车牌输入键盘
-    inputOnFocusIndex: '', //当前锁定的车号位置
-    licensePlate: '', //用于提交
-    inputPlates: '', //用于显示
-
-    driverName:'',
-    driverMobile:'',
-
-    loadPointArray:[],//装卸点位
-    loadPointIndex:null,
-
-    loadTimeArray:[], //装卸时间
-    loadTimeIndex:null,
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    this.setData({
-      orderId: options.orderId,
-      orderName: options.orderName,
-      orderNumber:options.orderNumber,
-    })
-    this.getCarInfo()
-    //装卸点位
-    this.loadPointData()
-  },
-
-  //获取长期车辆信息
-  getCarInfo: function () {
-    app.request.GET({
-      url: app.API.bizvehicleDefault,
-      params: {},
-      page: this,
-      successFun: true
-    }).then(res => {
-      let getInfo = res.data.data
-      console.log(getInfo)
-      let inputPlates = {};
-      if(getInfo){
-        let getCarNumArr = getInfo.licensePlate ? getInfo.licensePlate.split('') : ''
-        for (let i = 0; i < getCarNumArr.length; i++) {
-          inputPlates['index' + i] = getCarNumArr[i]
-        }
-        this.setData({
-          inputPlates: inputPlates,
-          isNewEnergy: getCarNumArr.length > 7 ? true : false,
-          licensePlate: getInfo.licensePlate,
-          driverName:getInfo.driverName,
-          driverMobile:getInfo.driverMobile,
-        })
-        this.getSelectData(getInfo.vehicleAxles)
-      }else{
-        this.getSelectData()
-      }
-      
-      //获取订单下拉列表、车辆轴数下拉列表
-      
-    })
-  },
-
-  //获取订单下拉列表、车辆轴数下拉列表
-  getSelectData: function (vehicleAxles) {
-    //获取订单下拉列表
-    // app.request.GET({
-    //   url: app.API.orderAllList,
-    //   params: {},
-    //   page: this,
-    //   successFun: true
-    // }).then(res => {
-    //   this.setData({
-    //     orderArray:res.data.data
-    //   })
-    // })
-
-    //获取车辆轴数下拉列表
-    app.request.GET({
-      url: app.API.getCarzheList,
-      params: {},
-      page: this,
-      successFun: true
-    }).then(res => {
-      this.setData({
-        overArray: res.data.data,
-        overIndex: vehicleAxles?app.util.getDicIndex(res.data.data, vehicleAxles, 'id'):null,
-      })
-    })
-
-  },
-
-  //下拉选择
-  bindPickerChange: function (e) { //下拉菜单
-    let { pickername } = e.target.dataset
-    let getIndex = pickername + 'Index'
-    app.util.getPickerIndex(this, getIndex, e);
-    switch (pickername) {
-      case 'loadPoint': //客户
-        this.loadTimeData() //获取销售订单
-        break;
-    }
-  },
-
-  // 单选
-  dangerStatusChange: function (e) {
-    this.setData({
-      [e.currentTarget.dataset.radiotype]: e.detail.value
-    })
-  },
-  //多选
-  checkboxChange: function (e) {
-    this.setData({
-      [e.currentTarget.dataset.checkboxtype]: e.detail
-    })
-  },
-
-  //输入框焦点聚焦时隐藏车牌号输入框
-  hideKeybord: function () {
-    this.setData({
-      isKeyboard: false,
-      inputOnFocusIndex: ''
-    })
-  },
-  //获取车牌号
-  licensePlate: function (e) {
-    this.setData({
-      licensePlate: e.detail.carNum
-    })
-  },
-
-  //装卸点位
-  loadPointData:function(){
-    app.request.GET({
-      url: app.API.loadPointYY,
-      params: {
-        orderId:this.data.orderId
-      },
-      page: this,
-      successFun: true
-    }).then(res => {
-      this.setData({
-        loadPointArray:res.data.data
-      })
-    })
-  },
-
-  //装卸时间
-  loadTimeData:function(){
-    app.request.GET({
-      url: app.API.loadTimeYY,
-      params: {
-        pointId:this.data.loadPointArray[this.data.loadPointIndex].loadPointId,
-        orderId:this.data.orderId
-      },
-      page: this,
-      successFun: true
-    }).then(res => {
-      let orderList = res.data.data
-      orderList.forEach((element,index) => {
-        orderList[index].time = element.beginTime + '~' + element.endTime
-      });
-      this.setData({
-        loadTimeArray:orderList
-      })
-    })
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  bindscrolltolowerFun() {
-
-  },
-
-  //表单提交
-  formSubmit: function ({detail: {value}}) {
-    let formData = value;
-    let reg = /^1\d{10}$/;
-    var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
-    var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
-    var warn = ""; //弹框时提示的内容
-    if (formData.licenseNumber == '') {
-      warn = "请选择车牌!";
-    } else if (formData.licenseNumber.length < 7) {
-      warn = "请选择完整车牌号!";
-    } else if (formData.licenseNumber.length == 7 && !creg.test(formData.licenseNumber)) {
-      warn = "车牌号格式错误!";
-    } else if (formData.licenseNumber.length == 8 && !xreg.test(formData.licenseNumber)) {
-      warn = "车牌号格式错误!";
-    } else if (typeof formData.overId == 'undefined' || formData.overId == '') {
-      warn = "请选择车辆轴数!";
-    } else if (formData.driverName == '') {
-      warn = "请填写司机姓名!";
-    } else if (formData.driverMobile == '') {
-      warn = "请填写司机电话!";
-    } else if (!reg.test(formData.driverMobile)) {
-      warn = "司机电话格式错误!";
-    } else if (typeof formData.loadPointId == 'undefined' || formData.loadPointId == '') {
-      warn = "请选择装卸点位!";
-    } else if(typeof formData.loadTimeId == 'undefined' || formData.loadTimeId == ''){
-      warn = "请选择装卸时间!";
-    }
-    if (warn != '') {
-      app.util.checkForm(warn);
-    } else {
-      app.request.POST({
-        url: app.API.appointmentAdd,
-        params: value,
-        page: this,
-        isLoadingTxt: '提交中...',
-        isSubmitting: true,
-        successFun: true
-      }).then(res => {
-        wx.showToast({
-          title: '新增成功',
-          icon: 'success',
-          duration: 2000,
-          mask:true,
-          complete: function () {
-            setTimeout(() => {
-              wx.navigateBack()
-            }, 1500) //延迟时间  
-          }
-        })
-      })
-
-    }
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 19
pages/index/add.json

@@ -1,19 +0,0 @@
-{
-  "navigationBarTitleText": "新增预约",
-  "usingComponents": {
-    "van-checkbox": "@vant/weapp/checkbox/index",
-    "van-checkbox-group": "@vant/weapp/checkbox-group/index",
-    "van-uploader": "@vant/weapp/uploader/index",
-    "car-num-input": "/components/CarNumInput/index",
-    "van-icon": "@vant/weapp/icon/index",
-    "van-cell": "@vant/weapp/cell/index",
-    "van-cell-group": "@vant/weapp/cell-group/index",
-    "van-field": "@vant/weapp/field/index",
-    "van-button": "@vant/weapp/button/index",
-    "van-popup": "@vant/weapp/popup/index",
-    "van-datetime-picker": "@vant/weapp/datetime-picker/index",
-    "van-radio": "@vant/weapp/radio/index",
-    "van-radio-group": "@vant/weapp/radio-group/index",
-    "van-search": "@vant/weapp/search/index"
-  }
-}

+ 0 - 72
pages/index/add.wxml

@@ -1,72 +0,0 @@
-<!--pages/index/add.wxml-->
-<view class="container" style="padding-bottom:100px;">
-  <view class="height20"></view>
-  <view>
-    <form bindsubmit="formSubmit">
-      <view class="part">
-        <view class="topItem">
-          <van-field required label="车牌号码" readonly border="{{false}}"></van-field>
-          <car-num-input bind:setCarNum="licensePlate" isKeyboard="{{isKeyboard}}" inputOnFocusIndex="{{inputOnFocusIndex}}" inputPlates="{{inputPlates}}" isNewEnergy="{{isNewEnergy}}"></car-num-input>
-          <input name="licenseNumber" value='{{licensePlate}}' hidden='true' />
-        </view>
-        <view class="height20"></view>
-
-        <!-- 订单 -->
-        <van-field label="订单编号" name="orderNumber" value="{{ orderNumber }}" input-align="right" bindtap="hideKeybord" readonly></van-field>
-        <input name="orderId" value='{{ orderId }}' hidden='true' />
-
-        <!-- 车辆轴数 -->
-        <van-field label="车辆轴数" required input-align="right" bindtap="hideKeybord" is-link>
-          <view slot="input" style="width: 100%;">
-            <input name="overId" value='{{overArray[overIndex].id}}' hidden='true' />
-            <picker bindchange="bindPickerChange" value="{{overIndex}}}" range="{{overArray}}" range-key="vehicleAxleNumber" data-pickername='over'>
-              <view>{{overArray[overIndex].vehicleAxleNumber?overArray[overIndex].vehicleAxleNumber:defaultText}}</view>
-            </picker>
-          </view>
-        </van-field>
-
-        <van-field label="司机ID" required name="driverId" value="{{ driverId }}" placeholder="请填写司机电话" input-align="right" hidden></van-field>
-        <van-field label="司机姓名" required name="driverName" value="{{ driverName }}" placeholder="请填写司机姓名" input-align="right" bindtap="hideKeybord"></van-field>
-        <van-field label="司机电话" required name="driverMobile" value="{{ driverMobile }}" placeholder="请填写司机电话" input-align="right" bindtap="hideKeybord"></van-field>
-
-        <!-- 装卸点位 -->
-        <van-field label="装卸点位" required input-align="right" bindtap="hideKeybord">
-          <view slot="input" style="width: 100%;">
-            <input name="loadPointId" value='{{loadPointArray[loadPointIndex].loadPointId}}' hidden='true' />
-            <picker bindchange="bindPickerChange" value="{{loadPointIndex}}" range="{{loadPointArray}}" range-key="loadPoint" data-pickername='loadPoint'>
-              <view wx:if="{{loadPointArray[loadPointIndex].loadPoint}}"> {{loadPointArray[loadPointIndex].loadPoint}}</view>
-              <view wx:else class="selectPlaceholder">{{defaultText}}</view>
-            </picker>
-          </view>
-          <view slot="right-icon">
-            <van-icon name="arrow" />
-          </view>
-        </van-field>
-
-        <!-- 装卸时间 -->
-        <van-field label="装卸时间" required input-align="right" bindtap="hideKeybord" wx:if="{{loadTimeArray.length>0}}" type="textarea" autosize>
-          <view slot="input" style="width: 100%;">
-            <input name="loadTimeId" value='{{loadTimeArray[loadTimeIndex].loadTimeId}}' hidden='true' />
-            <picker bindchange="bindPickerChange" value="{{loadTimeIndex}}" range="{{loadTimeArray}}" range-key="time" data-pickername='loadTime'>
-              <view wx:if="{{loadTimeArray[loadTimeIndex].time}}"> {{loadTimeArray[loadTimeIndex].time}}</view>
-              <view wx:else class="selectPlaceholder">{{defaultText}}</view>
-            </picker>
-          </view>
-          <view slot="right-icon">
-            <van-icon name="arrow" />
-          </view>
-        </van-field>
-        <van-field required wx:else label="装卸时间" name="deliveryTimeId" value="" readonly input-align="right" placeholder="请先选择装卸点位" placeholder-style="color:red;" />
-      
-      </view>
-
-      <view class="fixedBtn submitBtn">
-        <van-button loading="{{isSubmitting}}" round block disabled="{{isSubmitting}}" loading-text="{{isSubmitting?'提交中...':''}}" type="info" form-type="submit">确定
-        </van-button>
-      </view>
-
-    </form>
-  </view>
-</view>
-
-<wxs module="filters" src="../../utils/filter.wxs"></wxs>

+ 0 - 209
pages/index/add.wxss

@@ -1,209 +0,0 @@
-/* pages/index/add.wxss */
-.van-field__label {
-  width: 240rpx !important;
-}
-
-.formTopBlueBg {
-  height: 144rpx;
-  background-color: #0396FF;
-}
-
-.part {
-  border-radius: 16rpx;
-  padding: 20rpx 00rpx;
-  background: #fff;
-  margin-bottom: 20rpx;
-}
-
-picker view {
-  line-height: normal !important;
-}
-
-.heightAuto .van-field__control--right {
-  height: auto !important;
-}
-
-.topProJectInfo {
-  padding: 26rpx 40rpx;
-}
-.labelTitle{
-  padding: 0 16px;
-  color: #323233;
-  font-size: 14px;
-}
-.topItem1 .van-cell {
-  padding-top: 6rpx !important;
-  padding-bottom: 6rpx !important;
-}
-.topItem {
-  position: relative;
-  padding-bottom: 16rpx;
-}
-.topItem2::after{
-  border:0 none !important
-}
-.topItem::after {
-  border-bottom: 1px solid #ebedf0;
-  bottom: 0;
-  box-sizing: border-box;
-  content: " ";
-  left: 16px;
-  pointer-events: none;
-  position: absolute;
-  right: 16px;
-  transform: scaleY(.5);
-  transform-origin: center;
-  border-bottom-width: 1px;
-  border-bottom-style: solid;
-  border-bottom-color: rgb(235, 237, 240);
-}
-
-.proTitle {
-  font-size: 36rpx;
-  font-weight: bold;
-  color: rgba(0, 0, 0, 0.85);
-}
-
-.proJectInfoCode {
-  width: 100%;
-  display: flex;
-  padding: 10rpx 10rpx 0 0rpx;
-  color: rgba(0, 0, 0, 0.65);
-  justify-content: space-between;
-}
-
-.proJectInfoCode>view:last-child {
-  padding: 0 16rpx;
-  display: flex;
-  height: 40rpx;
-  line-height: 40rpx;
-  color: #2C6CEC;
-  font-size: 20rpx;
-  border-radius: 20rpx;
-  border: 1px solid #2C6CEC;
-  align-items: center;
-  white-space: nowrap;
-}
-
-.radioHeight .radioHeightBx {
-  width: 100%;
-}
-radio-group {
-  text-align: right;
-}
-.fieldAutoHeight .van-field__body,.fieldAutoHeight .van-field__control {
-  height: auto !important;
-  text-align: left;
-  line-height: 30px;
-}
-.ysType{
-  flex: 1;
-  text-align: right;
-}
-.ysType text:first-child{
-  margin-right: 12rpx;
-}
-.ysType text{
-  display: inline-block;
-  width: 80rpx;
-  height: 48rpx;
-  line-height: 48rpx;
-  text-align: center;
-  background: #E1E1E1;
-  border: 1px solid #E1E1E1;
-  border-radius: 4rpx;
-  box-sizing: border-box;
-}
-.ysType .active{
-  color: #2C6CEC;
-  border: 1rpx solid #2C6CEC;
-  background: transparent;
-}
-
-.otherInfo{
-  padding: 10rpx 10rpx 0 0rpx;
-  color: rgba(0, 0, 0, 0.65);
-}
-.otherInfo .status {
-  clear: both;
-}
-
-.type{
-  display: inline-block;
-  padding: 4rpx 10rpx;
-  color: #2C6CEC;
-  background: rgba(44,108,236,0.1);
-}
-.type1{
-  color: #52C41A;
-  background: rgba(82,196,26,0.1);
-}
-.type2{
-  color: #FAAD14;
-  background: rgba(250,173,20,0.1);
-}
-
-.setHeight{
-  height: 120rpx !important;
-}
-.radioHeight .radioHeightBx{
-  width: 100%;
-}
-.radioHeight .van-field__body {
-  height: 28px;
-  line-height: 25px;
-}
-.bottomBtn view:first-child {
-  flex: 1;
-}
-.chooseDriver{
-  width: 600rpx;
-  height: 100vh;
-  display: flex;
-  flex-direction: column;
-}
-.dialogUser {
-  flex: 1;
-  width: 100%;
-  padding: 30rpx 0;
-  box-sizing: border-box;
-  overflow-y: auto;
-}
-.spacialName {
-  display: inline-block;
-  width: 64rpx;
-  height: 64rpx;
-  line-height: 64rpx;
-  margin: 0 20rpx 0 10rpx;
-  border-radius: 50%;
-  text-align: center;
-  color: #3764FF;
-  font-size: 24rpx;
-  background-color: rgba(55, 100, 255, 0.0510);
-}
-.bottomBtn {
-  display: flex;
-  width: 100%;
-  padding: 20rpx;
-  font-size: 28rpx;
-  box-sizing: border-box;
-  align-items: center;
-  justify-content: space-around;
-  border-top: 1px solid #f9f7f9;
-}
-
-/* 选人弹窗 */
-.chooseUserMain {
-  width: 600rpx;
-  height: 100vh;
-  display: flex;
-  flex-direction: column;
-}
-
-.dialogUser {
-  flex: 1;
-  width: 100%;
-  padding: 30rpx 0;
-  box-sizing: border-box;
-  overflow-y: auto;
-}

+ 0 - 276
pages/index/edit.js

@@ -1,276 +0,0 @@
-// pages/index/edit.js
-const app = getApp()
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    showModal: false,
-    defaultText: '请选择',
-    isSubmitting: false,
-
-    reservationType: '2',
-
-    isKeyboard: false, //是否显示车牌输入键盘
-    inputOnFocusIndex: '', //当前锁定的车号位置
-    licensePlate: '', //用于提交
-    inputPlates: '', //用于显示
-
-    orderArray:[],//订单
-    orderIndex:'',
-
-    overArray:[],//车辆轴数
-    overIndex:'',
-
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    //获取详情
-    var pages = getCurrentPages();
-    var prevPage = pages[pages.length - 2];
-    let getInfo = prevPage.data.resData[options.index]
-
-    let getCarNumArr = getInfo.licenseNumber ? getInfo.licenseNumber.split('') : ''
-    let inputPlates = {};
-    for (let i = 0; i < getCarNumArr.length; i++) {
-      inputPlates['index' + i] = getCarNumArr[i]
-    }
-
-    this.setData({
-      info: getInfo,
-      orderId: getInfo.orderId,
-      inputPlates: inputPlates,
-      isNewEnergy: getCarNumArr.length > 7 ? true : false,
-      licensePlate: getInfo.licenseNumber,
-    })
-
-    this.getSelectData()
-
-    //装卸点位
-    this.loadPointData('info')
-
-  },
-
-  //获取订单下拉列表、车辆轴数下拉列表
-  getSelectData:function(){
-    //获取订单下拉列表
-    // app.request.GET({
-    //   url: app.API.orderAllList,
-    //   params: {},
-    //   page: this,
-    //   successFun: true
-    // }).then(res => {
-    //   this.setData({
-    //     orderArray:res.data.data,
-    //     orderIndex: app.util.getDicIndex(res.data.data, this.data.info.orderId, 'id'),
-    //   })
-    // })
-
-    //获取车辆轴数下拉列表
-    app.request.GET({
-      url: app.API.getCarzheList,
-      params: {},
-      page: this,
-      successFun: true
-    }).then(res => {
-      this.setData({
-        overArray:res.data.data,
-        overIndex: app.util.getDicIndex(res.data.data, this.data.info.overId, 'id'),
-      })
-    })
-
-  },
-
-  //下拉选择
-  bindPickerChange: function (e) { //下拉菜单
-    let getIndex = e.target.dataset.pickername + 'Index'
-    app.util.getPickerIndex(this, getIndex, e);
-    switch (pickername) {
-      case 'loadPoint': //客户
-        this.loadTimeData() //获取销售订单
-        break;
-    }
-  },
-
-  // 单选
-  dangerStatusChange: function (e) {
-    this.setData({
-      [e.currentTarget.dataset.radiotype]: e.detail.value
-    })
-  },
-  //多选
-  checkboxChange: function (e) {
-    console.log(e.detail)
-    this.setData({
-      [e.currentTarget.dataset.checkboxtype]: e.detail
-    })
-  },
-
-  //输入框焦点聚焦时隐藏车牌号输入框
-  hideKeybord: function () {
-    this.setData({
-      isKeyboard: false,
-      inputOnFocusIndex: ''
-    })
-  },
-  //获取车牌号
-  licensePlate: function (e) {
-    this.setData({
-      licensePlate: e.detail.carNum
-    })
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  bindscrolltolowerFun() {
-    
-  },
-
-  //装卸点位
-  loadPointData:function(type){
-    app.request.GET({
-      url: app.API.loadPointYY,
-      params: {
-        orderId:this.data.orderId
-      },
-      page: this,
-      successFun: true
-    }).then(res => {
-      this.setData({
-        loadPointArray:res.data.data,
-        loadPointIndex: app.util.getDicIndex(res.data.data, this.data.info.loadPointId, 'loadPointId'),
-      })
-      if(type){
-        this.loadTimeData('info')
-      }
-    })
-    
-  },
-
-  //装卸时间
-  loadTimeData:function(type){
-    app.request.GET({
-      url: app.API.loadTimeYY,
-      params: {
-        pointId:this.data.loadPointArray[this.data.loadPointIndex].loadPointId,
-        orderId:this.data.orderId
-      },
-      page: this,
-      successFun: true
-    }).then(res => {
-      let orderList = res.data.data
-      orderList.forEach((element,index) => {
-        orderList[index].time = element.beginTime + '~' + element.endTime
-      });
-      this.setData({
-        loadTimeArray:orderList,
-        loadTimeIndex:type?app.util.getDicIndex(orderList, this.data.info.loadTimeId, 'loadTimeId'):null
-      })
-    })
-  },
-
-
-  formSubmit: function ({detail:{value}}) {
-    let formData = value;
-    let reg = /^1\d{10}$/;
-    var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
-    var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
-    var warn = ""; //弹框时提示的内容
-    if (formData.licenseNumber == '') {
-      warn = "请选择车牌!";
-    } else if (formData.licenseNumber.length < 7) {
-      warn = "请选择完整车牌号!";
-    } else if (formData.licenseNumber.length == 7 && !creg.test(formData.licenseNumber)) {
-      warn = "车牌号格式错误!";
-    } else if (formData.licenseNumber.length == 8 && !xreg.test(formData.licenseNumber)) {
-      warn = "车牌号格式错误!";
-    } else if (typeof formData.overId == 'undefined' || formData.overId == '') {
-      warn = "请选择车辆轴数!";
-    } else if (formData.driverName == '') {
-      warn = "请填写司机姓名!";
-    } else if (formData.driverMobile == '') {
-      warn = "请填写司机电话!";
-    } else if (!reg.test(formData.driverMobile)) {
-      warn = "司机电话格式错误!";
-    }
-    if (warn != '') {
-      app.util.checkForm(warn);
-    } else {
-      app.request.POST({
-        url: app.API.appointmentEdit,
-        params: value,
-        page: this,
-        isLoadingTxt: '提交中...',
-        isSubmitting: true,
-        successFun: true
-      }).then(res => {
-        wx.showToast({
-          title: '修改成功',
-          icon: 'success',
-          duration: 2000,
-          mask:true,
-          complete: function () {
-            setTimeout(() => {
-              wx.navigateBack()
-            }, 1500) //延迟时间  
-          }
-        })
-      })
-
-    }
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-    
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 19
pages/index/edit.json

@@ -1,19 +0,0 @@
-{
-  "navigationBarTitleText": "修改预约",
-  "usingComponents": {
-    "van-checkbox": "@vant/weapp/checkbox/index",
-    "van-checkbox-group": "@vant/weapp/checkbox-group/index",
-    "van-uploader": "@vant/weapp/uploader/index",
-    "car-num-input": "/components/CarNumInput/index",
-    "van-icon": "@vant/weapp/icon/index",
-    "van-cell": "@vant/weapp/cell/index",
-    "van-cell-group": "@vant/weapp/cell-group/index",
-    "van-field": "@vant/weapp/field/index",
-    "van-button": "@vant/weapp/button/index",
-    "van-popup": "@vant/weapp/popup/index",
-    "van-datetime-picker": "@vant/weapp/datetime-picker/index",
-    "van-radio": "@vant/weapp/radio/index",
-    "van-radio-group": "@vant/weapp/radio-group/index",
-    "van-search": "@vant/weapp/search/index"
-  }
-}

+ 0 - 73
pages/index/edit.wxml

@@ -1,73 +0,0 @@
-<!--pages/index/edit.wxml-->
-<view class="container" style="padding-bottom:100px;">
-  <view class="height20"></view>
-  <view>
-    <form bindsubmit="formSubmit">
-      <input name="id" value='{{info.id}}' hidden='true' />
-      <view class="part">
-        <view class="topItem">
-          <van-field required label="车牌号码" readonly border="{{false}}"></van-field>
-          <car-num-input bind:setCarNum="licensePlate" isKeyboard="{{isKeyboard}}" inputOnFocusIndex="{{inputOnFocusIndex}}" inputPlates="{{inputPlates}}" isNewEnergy="{{isNewEnergy}}"></car-num-input>
-          <input name="licenseNumber" value='{{licensePlate}}' hidden='true' />
-        </view>
-        <view class="height20"></view>
-        <!-- 订单 -->
-        <van-field label="订单编号" value="{{ info.orderNumber }}" input-align="right" bindtap="hideKeybord" readonly></van-field>
-        <input name="orderId" value='{{ info.orderId }}' hidden='true' />
-
-        <!-- 车辆轴数 -->
-        <van-field label="车辆轴数" required input-align="right" bindtap="hideKeybord" is-link>
-          <view slot="input" style="width: 100%;">
-            <input name="overId" value='{{overArray[overIndex].id}}' hidden='true' />
-            <picker bindchange="bindPickerChange" value="{{overIndex}}}" range="{{overArray}}" range-key="vehicleAxleNumber" data-pickername='over'>
-              <view>{{overArray[overIndex].vehicleAxleNumber?overArray[overIndex].vehicleAxleNumber:defaultText}}</view>
-            </picker>
-          </view>
-        </van-field>
-
-        <van-field label="司机ID" required name="driverId" value="{{ driverId }}" placeholder="请填写司机电话" input-align="right" hidden></van-field>
-        <van-field label="司机姓名" required name="driverName" value="{{ info.driverName }}" placeholder="请填写司机姓名" input-align="right" bindtap="hideKeybord"></van-field>
-        <van-field label="司机电话" required name="driverMobile" value="{{ info.driverMobile }}" placeholder="请填写司机电话" input-align="right" bindtap="hideKeybord"></van-field>
-
-        <!-- 装卸点位 -->
-        <van-field label="装卸点位" required input-align="right" bindtap="hideKeybord">
-          <view slot="input" style="width: 100%;">
-            <input name="loadPointId" value='{{loadPointArray[loadPointIndex].loadPointId}}' hidden='true' />
-            <picker bindchange="bindPickerChange" value="{{loadPointIndex}}" range="{{loadPointArray}}" range-key="loadPoint" data-pickername='loadPoint'>
-              <view wx:if="{{loadPointArray[loadPointIndex].loadPoint}}"> {{loadPointArray[loadPointIndex].loadPoint}}</view>
-              <view wx:else class="selectPlaceholder">{{defaultText}}</view>
-            </picker>
-          </view>
-          <view slot="right-icon">
-            <van-icon name="arrow" />
-          </view>
-        </van-field>
-
-        <!-- 装卸时间 -->
-        <van-field label="装卸时间" required input-align="right" bindtap="hideKeybord" wx:if="{{loadTimeArray.length>0}}" type="textarea" autosize>
-          <view slot="input" style="width: 100%;">
-            <input name="loadTimeId" value='{{loadTimeArray[loadTimeIndex].loadTimeId}}' hidden='true' />
-            <picker bindchange="bindPickerChange" value="{{loadTimeIndex}}" range="{{loadTimeArray}}" range-key="time" data-pickername='loadTime'>
-              <view wx:if="{{loadTimeArray[loadTimeIndex].time}}"> {{loadTimeArray[loadTimeIndex].time}}</view>
-              <view wx:else class="selectPlaceholder">{{defaultText}}</view>
-            </picker>
-          </view>
-          <view slot="right-icon">
-            <van-icon name="arrow" />
-          </view>
-        </van-field>
-        <van-field required wx:else label="装卸时间" name="deliveryTimeId" value="" readonly input-align="right" placeholder="请先选择装卸点位" placeholder-style="color:red;" />
-
-      </view>
-
-      <view class="fixedBtn submitBtn">
-        <van-button loading="{{isSubmitting}}" round block disabled="{{isSubmitting}}" loading-text="{{isSubmitting?'提交中...':''}}" type="info" form-type="submit">确定
-        </van-button>
-      </view>
-
-    </form>
-  </view>
-</view>
-
-
-<wxs module="filters" src="../../utils/filter.wxs"></wxs>

+ 0 - 209
pages/index/edit.wxss

@@ -1,209 +0,0 @@
-/* pages/index/edit.wxss */
-.van-field__label {
-  width: 240rpx !important;
-}
-
-.formTopBlueBg {
-  height: 144rpx;
-  background-color: #0396FF;
-}
-
-.part {
-  border-radius: 16rpx;
-  padding: 20rpx 00rpx;
-  background: #fff;
-  margin-bottom: 20rpx;
-}
-
-picker view {
-  line-height: normal !important;
-}
-
-.heightAuto .van-field__control--right {
-  height: auto !important;
-}
-
-.topProJectInfo {
-  padding: 26rpx 40rpx;
-}
-.labelTitle{
-  padding: 0 16px;
-  color: #323233;
-  font-size: 14px;
-}
-.topItem1 .van-cell {
-  padding-top: 6rpx !important;
-  padding-bottom: 6rpx !important;
-}
-.topItem {
-  position: relative;
-  padding-bottom: 16rpx;
-}
-.topItem2::after{
-  border:0 none !important
-}
-.topItem::after {
-  border-bottom: 1px solid #ebedf0;
-  bottom: 0;
-  box-sizing: border-box;
-  content: " ";
-  left: 16px;
-  pointer-events: none;
-  position: absolute;
-  right: 16px;
-  transform: scaleY(.5);
-  transform-origin: center;
-  border-bottom-width: 1px;
-  border-bottom-style: solid;
-  border-bottom-color: rgb(235, 237, 240);
-}
-
-.proTitle {
-  font-size: 36rpx;
-  font-weight: bold;
-  color: rgba(0, 0, 0, 0.85);
-}
-
-.proJectInfoCode {
-  width: 100%;
-  display: flex;
-  padding: 10rpx 10rpx 0 0rpx;
-  color: rgba(0, 0, 0, 0.65);
-  justify-content: space-between;
-}
-
-.proJectInfoCode>view:last-child {
-  padding: 0 16rpx;
-  display: flex;
-  height: 40rpx;
-  line-height: 40rpx;
-  color: #2C6CEC;
-  font-size: 20rpx;
-  border-radius: 20rpx;
-  border: 1px solid #2C6CEC;
-  align-items: center;
-  white-space: nowrap;
-}
-
-.radioHeight .radioHeightBx {
-  width: 100%;
-}
-radio-group {
-  text-align: right;
-}
-.fieldAutoHeight .van-field__body,.fieldAutoHeight .van-field__control {
-  height: auto !important;
-  text-align: left;
-  line-height: 30px;
-}
-.ysType{
-  flex: 1;
-  text-align: right;
-}
-.ysType text:first-child{
-  margin-right: 12rpx;
-}
-.ysType text{
-  display: inline-block;
-  width: 80rpx;
-  height: 48rpx;
-  line-height: 48rpx;
-  text-align: center;
-  background: #E1E1E1;
-  border: 1px solid #E1E1E1;
-  border-radius: 4rpx;
-  box-sizing: border-box;
-}
-.ysType .active{
-  color: #2C6CEC;
-  border: 1rpx solid #2C6CEC;
-  background: transparent;
-}
-
-.otherInfo{
-  padding: 10rpx 10rpx 0 0rpx;
-  color: rgba(0, 0, 0, 0.65);
-}
-.otherInfo .status {
-  clear: both;
-}
-
-.type{
-  display: inline-block;
-  padding: 4rpx 10rpx;
-  color: #2C6CEC;
-  background: rgba(44,108,236,0.1);
-}
-.type1{
-  color: #52C41A;
-  background: rgba(82,196,26,0.1);
-}
-.type2{
-  color: #FAAD14;
-  background: rgba(250,173,20,0.1);
-}
-
-.setHeight{
-  height: 120rpx !important;
-}
-.radioHeight .radioHeightBx{
-  width: 100%;
-}
-.radioHeight .van-field__body {
-  height: 28px;
-  line-height: 25px;
-}
-.bottomBtn view:first-child {
-  flex: 1;
-}
-.chooseDriver{
-  width: 600rpx;
-  height: 100vh;
-  display: flex;
-  flex-direction: column;
-}
-.dialogUser {
-  flex: 1;
-  width: 100%;
-  padding: 30rpx 0;
-  box-sizing: border-box;
-  overflow-y: auto;
-}
-.spacialName {
-  display: inline-block;
-  width: 64rpx;
-  height: 64rpx;
-  line-height: 64rpx;
-  margin: 0 20rpx 0 10rpx;
-  border-radius: 50%;
-  text-align: center;
-  color: #3764FF;
-  font-size: 24rpx;
-  background-color: rgba(55, 100, 255, 0.0510);
-}
-.bottomBtn {
-  display: flex;
-  width: 100%;
-  padding: 20rpx;
-  font-size: 28rpx;
-  box-sizing: border-box;
-  align-items: center;
-  justify-content: space-around;
-  border-top: 1px solid #f9f7f9;
-}
-
-/* 选人弹窗 */
-.chooseUserMain {
-  width: 600rpx;
-  height: 100vh;
-  display: flex;
-  flex-direction: column;
-}
-
-.dialogUser {
-  flex: 1;
-  width: 100%;
-  padding: 30rpx 0;
-  box-sizing: border-box;
-  overflow-y: auto;
-}

+ 70 - 60
pages/index/index.js

@@ -8,20 +8,23 @@ Page({
    */
   data: {
     str:'&emsp;',
+    str2: '&ensp;',
     loginStatus: wx.getStorageSync('loginStatus') ? wx.getStorageSync('loginStatus') : false,
     roleCodeList: wx.getStorageSync('roleCodeList') ? wx.getStorageSync('roleCodeList') : '',
 
-    content: '',
-
-    filterWidth: 0, //获取顶部筛选宽度
-    filterHeight: 0, //获取顶部筛选高度
-    safeAreaHeight: 0, //底部安全区域的高度
     //按钮位置参数
+    safeAreaHeight: 0, //底部安全区域的高度
     buttonTop: 0,
     buttonLeft: 0,
     windowHeight: '',
     windowWidth: '',
 
+    showModal: false,
+    defaultText: '请选择',
+    isSubmitting: false,
+
+    content: '',
+
     //分页
     requestStatu: '', //加载中...
     limit: 10,
@@ -72,7 +75,8 @@ Page({
     showQrcode:false, 
     
     show:false,
-    auditFlag:'false'
+    auditFlag:'false',
+    auditReason: '',
   },
 
   //下拉选择
@@ -490,56 +494,56 @@ Page({
 
   //扫码预约申请
   changeAdd() {
-    wx.navigateTo({
-      url: 'add?orderId=' + info.id + '&orderName='+ info.orderName+'&orderNumber='+ info.orderNumber
-    })
+    // wx.navigateTo({
+    //   url: '/pages/reservationOther/add?orderId=1'
+    // })
 
-    // wx.scanCode({
-    //   success: (res) => {
-    //     let info = JSON.parse(res.result.trim())
-    //     console.log(info)
-    //     //console.log(JSON.parse(info)) //{id: "1712651156370632706", projectCode: "D456"}
-    //     if(info.type=='1'){
-    //       // 砂石预约
-    //       wx.navigateTo({
-    //         url: 'add?orderId=' + info.id + '&orderName='+ info.orderName+'&orderNumber='+ info.orderNumber
-    //       })
-    //     // }else if(info.type=='2'){
-    //     //   // 临时预约----已作废
-    //     //   wx.navigateTo({
-    //     //     url: '/pages/reservationTemp/add?orderId=' + info.id + '&orderName='+ info.orderName+'&orderNumber='+ info.orderNumber
-    //     //   })
-    //     }else if(info.type=='3'){
-    //       // 起卸预约
-    //       wx.navigateTo({
-    //         url: '/pages/reservationLoadAppoint/add?orderId=' + info.id
-    //       })
-    //     }else if(info.type=='4'){
-    //       // 充电桩预约
-    //       wx.navigateTo({
-    //         url: '/pages/reservationChargestation/add?orderId=' + info.id
-    //       })
-    //     }else if(info.type=='5'){
-    //       // 管桩预约
-    //       wx.navigateTo({
-    //         url: '/pages/reservationPipe/add?orderId=' + info.id
-    //       })
-    //     }else if(info.type=='6'){
-    //       // 其他预约
-    //       wx.navigateTo({
-    //         url: '/pages/other/add?orderId=' + info.id
-    //       })
-    //     }
+    wx.scanCode({
+      success: (res) => {
+        let info = JSON.parse(res.result.trim())
+        console.log(info)
+        //console.log(JSON.parse(info)) //{id: "1712651156370632706", projectCode: "D456"}
+        if(info.type=='1'){
+          // 砂石预约
+          wx.navigateTo({
+            url: '/pages/reservationStone/add?orderId=' + info.id + '&orderName='+ info.orderName+'&orderNumber='+ info.orderNumber
+          })
+        // }else if(info.type=='2'){
+        //   // 临时预约----已作废
+        //   wx.navigateTo({
+        //     url: '/pages/reservationTemp/add?orderId=' + info.id + '&orderName='+ info.orderName+'&orderNumber='+ info.orderNumber
+        //   })
+        }else if(info.type=='3'){
+          // 起卸预约
+          wx.navigateTo({
+            url: '/pages/reservationLoadAppoint/add?orderId=' + info.id
+          })
+        }else if(info.type=='4'){
+          // 充电桩预约
+          wx.navigateTo({
+            url: '/pages/reservationChargestation/add?orderId=' + info.id
+          })
+        }else if(info.type=='5'){
+          // 管桩预约
+          wx.navigateTo({
+            url: '/pages/reservationPipe/add?orderId=' + info.id
+          })
+        }else if(info.type=='6'){
+          // 其他预约
+          wx.navigateTo({
+            url: '/pages/reservationOther/add?orderId=' + info.id
+          })
+        }
     
-    //   },
-    //   fail: (res) => {
-    //     wx.showToast({
-    //       title: '请重试!',
-    //       icon: 'error',
-    //       duration: 2000
-    //     })
-    //   }
-    // })
+      },
+      fail: (res) => {
+        wx.showToast({
+          title: '请重试!',
+          icon: 'error',
+          duration: 2000
+        })
+      }
+    })
   },
 
   //删除
@@ -683,7 +687,7 @@ Page({
     let { id, index, type } = e.currentTarget.dataset
     if(type=='1'){
       wx.navigateTo({
-        url: 'edit?id=' + id + '&index=' + index,
+        url: '/pages/reservationStone/edit?id=' + id + '&index=' + index,
       })
     // }else if(type=='2'){
     //   wx.navigateTo({
@@ -701,6 +705,10 @@ Page({
       wx.navigateTo({
         url: '/pages/reservationPipe/edit?id=' + id + '&index=' + index,
       })
+    }else if(type=='6'){
+      wx.navigateTo({
+        url: '/pages/reservationOther/edit?id=' + id + '&index=' + index,
+      })
     }
     
   },
@@ -718,6 +726,7 @@ Page({
     let { id } = e.currentTarget.dataset
     this.setData({
       show: true,
+      auditReason: '',
       id: id
     });
   },
@@ -725,6 +734,7 @@ Page({
     this.setData({
       show: false,
       auditFlag:'false',
+      auditReason: '',
       id: ''
     });
   },
@@ -739,11 +749,11 @@ Page({
   formSubmit: function (e) {
     let formData = e.detail.value;
     var warn = ""; //弹框时提示的内容
-    // if (formData.auditFlag == '') {
-    //   warn = "选择审核结果!";
-    // } else if (formData.auditFlag == '2' && formData.appointmentReason == '') {
-    //   warn = "审核不通过时备注不能为空!";
-    // }
+    if (formData.auditFlag == '') {
+      warn = "选择审核结果!";
+    } else if (formData.auditFlag == 'false' && formData.auditReason == '') {
+      warn = "审核不通过时备注不能为空!";
+    }
     formData.auditFlag = formData.auditFlag=='true'
     if (warn != '') {
       app.util.checkForm(warn);

+ 3 - 3
pages/index/index.wxml

@@ -97,10 +97,10 @@
 
                   <van-button data-index="{{index}}" type="info" data-url="sign?id={{item.recordId}}" catchtap="toLink" size="small" wx:if="{{ item.status == '8' }}" style="margin-right: 20rpx;">司机确认</van-button>
 
-                  <van-button type="warning" size="small" data-id="{{item.id}}" data-license-number="{{item.licenseNumber}}" catchtap="driverCancelFun" wx:if="{{ roleCodeList=='driver' && item.orderType == '1' && item.status == '8' }}" style="margin-right: 20rpx;">司机取消</van-button>
-                  
                   <van-button type="info" size="small" data-url="signFor?id={{item.recordId}}&index={{index}}" catchtap="toLink" wx:if="{{ item.status == '10' && item.orderType == '1' }}" style="margin-right: 20rpx;">司机回签</van-button>
-                  
+
+                  <van-button type="warning" size="small" data-id="{{item.id}}" data-license-number="{{item.licenseNumber}}" catchtap="driverCancelFun" wx:if="{{ roleCodeList=='driver' && (item.appointmentType == '1' || item.appointmentType == '3') && item.status == '8' }}" style="margin-right: 20rpx;">司机取消</van-button>
+
                   <van-button type="info" size="small" data-url="replace?id={{item.id}}&index={{index}}" catchtap="toLink" wx:if="{{ roleCodeList=='driver' && (item.status == '5' || item.status == '6') && item.appointmentType == '1' }}">调度</van-button>
                 </view>
               </navigator>

+ 3 - 2
pages/index/info.js

@@ -50,8 +50,9 @@ Page({
       let unloadImgArr = getInfo.unloadImg.split(',')
       unloadImgArr.forEach(element => {
         fileList.push({
-          url: app.host.BASEIMG_URL+element,
-          isImage:true
+          url     : app.host.BASEIMG_URL+element,
+          imgUrl  : element,
+          isImage : true
         })
       });
     }

+ 25 - 16
pages/index/replace.js

@@ -10,11 +10,11 @@ Page({
     defaultText: '请选择',
     isSubmitting: false,
 
-    overArray:[],//车辆轴数
-    overIndex:'',
+    carzheArray:[],//车辆轴数
+    carzheIndex:'',
 
     orderArray:[],//订单
-    orderIndex:'',
+    orderIndex:null,
 
     loadPointArray:[],//装卸点位
     loadPointIndex:null,
@@ -55,7 +55,7 @@ Page({
         orderIndex: app.util.getDicIndex(res.data.data, this.data.info.orderId, 'orderId'),
       })
       // 初始装卸点位
-      this.loadPointData('info')
+      this.loadPointData(true)
     })
 
     //获取车辆轴数下拉列表
@@ -66,28 +66,35 @@ Page({
       successFun: true
     }).then(res => {
       this.setData({
-        overArray: res.data.data,
-        overIndex: app.util.getDicIndex(res.data.data, this.data.info.overId, 'id'),
+        carzheArray: res.data.data,
+        loadPointArray  : [],
+        carzheIndex: app.util.getDicIndex(res.data.data, this.data.info.overId, 'id'),
       })
     })
   },
 
   //装卸点位
   loadPointData:function(type){
+    let orderIdSelect = type ? this.data.info.orderId : this.data.orderArray[this.data.orderIndex].orderId
     app.request.GET({
       url: app.API.stoneAppointPointList,
       params: {
-        orderId: this.data.orderArray[this.data.orderIndex].orderId ? this.data.orderArray[this.data.orderIndex].orderId : this.data.info.orderId
+        orderId: orderIdSelect
       },
       page: this,
       successFun: true
     }).then(res => {
       this.setData({
         loadPointArray : res.data.data,
-        loadPointIndex : app.util.getDicIndex(res.data.data, this.data.info.loadPointId, 'loadPointId'),
+        loadPointIndex : null,
+        loadTimeArray  : []
       })
+      //初始化详情
       if(type){
-        this.loadTimeData('info')
+        this.setData({
+          loadPointIndex : app.util.getDicIndex(res.data.data, this.data.info.loadPointId, 'loadPointId')
+        })
+        this.loadTimeData(true)
       }
     })
     
@@ -95,8 +102,9 @@ Page({
 
   //装卸时间
   loadTimeData:function(type){
-    let pointIdSelect = this.data.loadPointArray[this.data.loadPointIndex].loadPointId
-    let orderIdSelect = this.data.orderArray[this.data.orderIndex].orderId
+    console.info("------type-------" + type)
+    let pointIdSelect = type ? this.data.info.loadPointId : this.data.loadPointArray[this.data.loadPointIndex].loadPointId
+    let orderIdSelect = type ? this.data.info.orderId : this.data.orderArray[this.data.orderIndex].orderId
     app.request.GET({
       url: app.API.stoneAppointLoadTimeList,
       params: {
@@ -111,10 +119,11 @@ Page({
         orderList[index].time = element.beginTime + '~' + element.endTime
       });
       this.setData({
-        loadTimeArray : orderList
+        loadTimeArray : orderList,
+        loadTimeIndex : null
       })
-      //初始化详情 或者是 选择订单和装卸定位和初始值一样时  装卸时间默认为初始选择项
-      if(type || (this.data.info.loadPointId == pointIdSelect && this.data.info.orderId == orderIdSelect)){
+      //初始化详情
+      if(type){
         this.setData({
           loadTimeIndex : app.util.getDicIndex(orderList, this.data.info.loadTimeId, 'loadTimeId')
         })
@@ -129,10 +138,10 @@ Page({
     app.util.getPickerIndex(this, getIndex, e);
     switch (pickername) {
       case 'order': //订单
-        this.loadTimeData() //获取装卸时间
+        this.loadPointData() //获取装卸点位
         break;
       case 'loadPoint': //装卸点位
-        this.loadTimeData() //获取装卸时间
+        this.loadTimeData(false) //获取装卸时间
         break;
     }
   },

+ 5 - 4
pages/index/replace.wxml

@@ -7,13 +7,14 @@
       <view class="part">
         <view class="topItem">
           <van-field label="车牌号" value="{{ info.licenseNumber }}" input-align="right" bindtap="hideKeybord" readonly></van-field>
-          <van-field label="车辆轴数" input-align="right" bindtap="hideKeybord" readonly >
+          <van-field label="车辆轴数" value="{{ carzheArray[carzheIndex].vehicleAxleNumber }}" input-align="right" bindtap="hideKeybord" readonly></van-field>
+          <!-- <van-field label="车辆轴数" input-align="right" bindtap="hideKeybord" readonly >
             <view slot="input" style="width: 100%;">
-              <picker bindchange="bindPickerChange" value="{{overIndex}}}" range="{{overArray}}" range-key="vehicleAxleNumber" data-pickername='over'>
-                <view>{{overArray[overIndex].vehicleAxleNumber?overArray[overIndex].vehicleAxleNumber:defaultText}}</view>
+              <picker bindchange="bindPickerChange" value="{{carzheIndex}}}" range="{{carzheArray}}" range-key="vehicleAxleNumber" data-pickername='carzhe'>
+                <view>{{carzheArray[carzheIndex].vehicleAxleNumber?carzheArray[carzheIndex].vehicleAxleNumber:defaultText}}</view>
               </picker>
             </view>
-          </van-field>
+          </van-field> -->
         </view>
         <view class="height20"></view>
         <view>

+ 2 - 2
pages/login/index.js

@@ -120,8 +120,8 @@ Page({
         wx.setStorageSync('id', id); //用户id
         wx.setStorageSync('account', account); //用户姓名
         wx.setStorageSync('name', name); //用户姓名
-        wx.setStorageSync('nickname', nickname); //企业名称
-        wx.setStorageSync('phone', phone); //职位
+        wx.setStorageSync('nickname', nickname); //昵称-车牌
+        wx.setStorageSync('phone', phone); //电话
         wx.setStorageSync('unloadImg', unloadImg); //证书图片
         wx.setStorageSync('roleCodeList', roleCodeList.join(',')); //用户类型
         wx.setStorageSync('buttonCodeList', buttonCodeList); //用户类型

+ 9 - 4
pages/mine/index.wxml

@@ -33,16 +33,16 @@
   <view class="nav">
     <van-cell title="完善信息" is-link data-url="../updateInfo/index" bind:click="toLink"
           wx:if="{{ roleCodeList == 'driver'||roleCodeList == 'customer'||roleCodeList == 'bizAdmin'||roleCodeList == 'sale'||roleCodeList == 'send'}}">
-      <van-icon name="/images/edit.png" size="18px" slot="icon" custom-class="leftIcon" />
+      <van-icon name="/images/wanshan.png" size="18px" slot="icon" custom-class="leftIcon" />
     </van-cell>
 
     <van-cell title="完善信息" is-link data-url="../updateInfo/indexShip" bind:click="toLink"
           wx:if="{{ roleCodeList == 'ship'}}">
-      <van-icon name="/images/edit.png" size="18px" slot="icon" custom-class="leftIcon" />
+      <van-icon name="/images/wanshan.png" size="18px" slot="icon" custom-class="leftIcon" />
     </van-cell>
 
     <van-cell title="绑定微信" is-link data-url="" bind:click="bindingWX">
-      <van-icon name="/images/mineIcon9.png" size="18px" slot="icon" custom-class="leftIcon" />
+      <van-icon name="/images/bangding.png" size="18px" slot="icon" custom-class="leftIcon" />
     </van-cell>
 
     <van-cell title="车辆管理" is-link data-url="../car/index" bind:click="toLink" 
@@ -50,8 +50,13 @@
       <van-icon name="/images/car2.png" size="18px" slot="icon" custom-class="leftIcon" />
     </van-cell>
 
+    <van-cell title="船舶管理" is-link data-url="../ship/index" bind:click="toLink" 
+          wx:if="{{ roleCodeList == 'ship' }}">
+      <van-icon name="/images/shipManage.png" size="18px" slot="icon" custom-class="leftIcon" />
+    </van-cell>
+
     <van-cell title="修改密码" is-link data-url="../updatePass/index" bind:click="toLink">
-      <van-icon name="/images/lock.png" size="18px" slot="icon" custom-class="leftIcon" />
+      <van-icon name="/images/passwordUpdate.png" size="18px" slot="icon" custom-class="leftIcon" />
     </van-cell>
   </view>
   <view class="submitBtn width520" style="background-color: #fff;border-radius: 40rpx;">

+ 3 - 2
pages/operationExecution/info.js

@@ -29,8 +29,9 @@ Page({
       let unloadImgArr = getInfo.unloadImg.split(',')
       unloadImgArr.forEach(element => {
         fileList.push({
-          url: app.host.BASEIMG_URL+element,
-          isImage:true
+          url     : app.host.BASEIMG_URL+element,
+          imgUrl  : element,
+          isImage : true
         })
       });
     }

+ 3 - 2
pages/queueCar/info.js

@@ -28,8 +28,9 @@ Page({
       let unloadImgArr = getInfo.unloadImg.split(',')
       unloadImgArr.forEach(element => {
         fileList.push({
-          url: app.host.BASEIMG_URL+element,
-          isImage:true
+          url     : app.host.BASEIMG_URL+element,
+          imgUrl  : element,
+          isImage : true
         })
       });
     }

+ 11 - 3
pages/reservationChargestation/add.js

@@ -58,7 +58,7 @@ Page({
   },
 
   //司机
-  loadUserData:function(loadUserId){
+  loadUserData:function(){
     app.request.GET({
       url: app.API.roleUser,
       params: {
@@ -68,8 +68,15 @@ Page({
       successFun: true
     }).then(res => {
       this.setData({
-        driverArray : res.data.data
+        driverArray : res.data.data,
+        driverIndex : app.util.getDicIndex(res.data.data, this.data.driverId, 'id')
       })
+      if(this.data.driverId){
+        this.setData({
+          driverName  : this.data.driverArray[this.data.driverIndex].name,
+          driverMobile : this.data.driverArray[this.data.driverIndex].phone,
+        })
+      }
     })
   },
 
@@ -81,7 +88,7 @@ Page({
     switch (pickername) {
       case 'driver': //选择司机
         this.setData({
-          driverPhone  : this.data.driverArray[this.data.driverIndex].name,
+          driverName  : this.data.driverArray[this.data.driverIndex].name,
           driverMobile : this.data.driverArray[this.data.driverIndex].phone,
         })
         break;
@@ -110,6 +117,7 @@ Page({
 
   //表单提交 carTaskAdd
   formSubmit: function ({detail:{value}}) {
+    // console.info("----driverId---" + value.driverId)
     var warn = ""; //弹框时提示的内容
     let reg = /^1[3-9]\d{9}$/;
     var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;

+ 7 - 10
pages/reservationChargestation/index.js

@@ -41,8 +41,8 @@ Page({
     resData:[],
 
     show: false,
-    auditFlag:true,
-    orderReason:'',//审核备注
+    auditFlag:'false',
+    arriveReason:'',
 
     requestStatu2: '加载中...',
     page2: 1,
@@ -263,7 +263,7 @@ Page({
     let { id } = e.currentTarget.dataset
     this.setData({
       show: true,
-      orderReason: '',
+      arriveReason: '',
       id: id,
     });
   },
@@ -271,7 +271,7 @@ Page({
     this.setData({
       show: false,
       auditFlag:'false',
-      orderReason:'',
+      arriveReason:'',
       id: ''
     });
   },
@@ -280,18 +280,15 @@ Page({
     this.setData({
       [e.currentTarget.dataset.radiotype]: e.detail.value
     })
-    if (e.detail.value == '1') {
-      this.setData({
-        appointmentReason: ''
-      })
-    }
   },
   
   //审核
   formSubmit: function (e) {
     let formData = e.detail.value;
     var warn = ""; //弹框时提示的内容
-    if (formData.auditFlag=='true' && formData.arriveReason == '') {
+    if (formData.auditFlag == '') {
+      warn = "选择审核结果!";
+    } else if (formData.auditFlag == 'false' && formData.arriveReason == '') {
       warn = "审核不通过时备注不能为空!";
     }
     formData.auditFlag = formData.auditFlag=='true'

+ 10 - 8
pages/reservationLoadAppoint/add.js

@@ -16,8 +16,8 @@ Page({
     loadTimeArray:[], //装卸时间
     loadTimeIndex:null,
 
-    excessConfigArray:[], //装卸时间
-    excessConfigIndex:null,
+    carzheArray:[], //车辆轴数
+    carzheIndex:null,
 
     isKeyboard: false, //是否显示车牌输入键盘
     inputOnFocusIndex: '', //当前锁定的车号位置
@@ -119,17 +119,17 @@ Page({
   //获取车辆轴数下拉列表
   getCarzheData:function(){
     app.request.GET({
-      url: app.API.bizexcessconfigList,
+      url: app.API.getCarzheList,
       params: {},
       page: this,
       successFun: true
     }).then(res => {
-      let excessConfigList = res.data.data
-      excessConfigList.forEach((element,index) => {
-        excessConfigList[index].name = element.vehicleAxleNumber+'轴'
+      let carzheList = res.data.data
+      carzheList.forEach((element,index) => {
+        carzheList[index].name = element.vehicleAxleNumber+'轴'
       });
       this.setData({
-        excessConfigArray: excessConfigList
+        carzheArray: carzheList
       })
     })
   },
@@ -175,6 +175,7 @@ Page({
 
   //表单提交 carTaskAdd
   formSubmit: function ({detail:{value}}) {
+    // console.info("----driverId---" + value.driverId)
     var warn = ""; //弹框时提示的内容
     let reg = /^1[3-9]\d{9}$/;
     var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
@@ -190,7 +191,7 @@ Page({
       warn = "车牌号格式错误!";
     } else if (value.licenseNumber.length == 8 && !xreg.test(value.licenseNumber)) {
       warn = "车牌号格式错误!";
-    } else if (value.overId == '') {
+    } else if (value.carzheId == '') {
       warn = "请选择车辆轴数!";
     } else if(value.driverName == ''){
       warn = "请输入司机姓名!";
@@ -198,6 +199,7 @@ Page({
       warn = "请输入司机电话!";
     } 
 
+    value.overId = value.carzheId
     if (warn != '') {
       app.util.checkForm(warn);
     } else {

+ 6 - 7
pages/reservationLoadAppoint/add.wxml

@@ -51,9 +51,9 @@
 
         <van-field label="车辆轴数" required input-align="right">
           <view slot="input" style="width: 100%;">
-            <input name="overId" value='{{excessConfigArray[excessConfigIndex].id}}' hidden='true' />
-            <picker bindchange="bindPickerChange" value="{{excessConfigIndex}}" range="{{excessConfigArray}}" range-key="name" data-pickername='excessConfig'>
-              <view wx:if="{{excessConfigArray[excessConfigIndex].name}}"> {{excessConfigArray[excessConfigIndex].name}}</view>
+            <input name="carzheId" value='{{carzheArray[carzheIndex].id}}' hidden='true' />
+            <picker bindchange="bindPickerChange" value="{{carzheIndex}}" range="{{carzheArray}}" range-key="name" data-pickername='carzhe'>
+              <view wx:if="{{carzheArray[carzheIndex].name}}"> {{carzheArray[carzheIndex].name}}</view>
               <view wx:else class="selectPlaceholder">{{ defaultText }}</view>
             </picker>
           </view>
@@ -62,10 +62,9 @@
           </view>
         </van-field>
 
-        <van-field label="司机ID" required name="driverId" value="{{ driverId }}" placeholder="请填写司机电话" input-align="right" hidden></van-field>
-
-        <van-field label="司机姓名" required name="driverName" value="{{ driverName }}" placeholder="请填写司机姓名" input-align="right" ></van-field>
-
+        <van-field label="司机姓名" required name="driverName" value="{{ driverName }}" placeholder="请填写司机姓名" input-align="right" >
+            <input name="driverId" value='{{driverId}}' hidden='true' />
+        </van-field>
         <van-field label="司机电话" required name="driverMobile" value="{{ driverMobile }}" placeholder="请填写司机电话" input-align="right" ></van-field>
       </view>
 

+ 11 - 10
pages/reservationLoadAppoint/edit.js

@@ -16,8 +16,8 @@ Page({
     loadTimeArray:[], //装卸时间
     loadTimeIndex:null,
 
-    excessConfigArray:[], //装卸时间
-    excessConfigIndex:null,
+    carzheArray:[], //车辆轴数
+    carzheIndex:null,
 
     isKeyboard: false, //是否显示车牌输入键盘
     inputOnFocusIndex: '', //当前锁定的车号位置
@@ -126,20 +126,20 @@ Page({
   //获取车辆轴数下拉列表
   getCarzheData:function(){
     app.request.GET({
-      url: app.API.bizexcessconfigList,
+      url: app.API.getCarzheList,
       params: {},
       page: this,
       successFun: true
     }).then(res => {
-      let excessConfigList = res.data.data
-      excessConfigList.forEach((element,index) => {
-        excessConfigList[index].name = element.vehicleAxleNumber+'轴'
+      let carzheList = res.data.data
+      carzheList.forEach((element,index) => {
+        carzheList[index].name = element.vehicleAxleNumber+'轴'
       });
       this.setData({
-        excessConfigArray : excessConfigList,
-        excessConfigIndex : this.data.info.overId?app.util.getDicIndex(excessConfigList, this.data.info.overId, 'id'):null
+        carzheArray : carzheList,
+        carzheIndex : this.data.info.overId?app.util.getDicIndex(carzheList, this.data.info.overId, 'id'):null
       })
-      console.info("this.data.info.excessConfigIndex---" + this.data.excessConfigIndex)
+      console.info("this.data.info.carzheIndex---" + this.data.carzheIndex)
     })
   },
 
@@ -199,7 +199,7 @@ Page({
       warn = "车牌号格式错误!";
     } else if (value.licenseNumber.length == 8 && !xreg.test(value.licenseNumber)) {
       warn = "车牌号格式错误!";
-    } else if (value.overId == '') {
+    } else if (value.carzheId == '') {
       warn = "请选择车辆轴数!";
     } else if(value.driverName == ''){
       warn = "请输入司机姓名!";
@@ -207,6 +207,7 @@ Page({
       warn = "请输入司机电话!";
     } 
 
+    value.overId = value.carzheId
     if (warn != '') {
       app.util.checkForm(warn);
     } else {

+ 6 - 7
pages/reservationLoadAppoint/edit.wxml

@@ -52,9 +52,9 @@
 
         <van-field label="车辆轴数" required input-align="right">
           <view slot="input" style="width: 100%;">
-            <input name="overId" value='{{excessConfigArray[excessConfigIndex].id}}' hidden='true' />
-            <picker bindchange="bindPickerChange" value="{{excessConfigIndex}}" range="{{excessConfigArray}}" range-key="name" data-pickername='excessConfig'>
-              <view wx:if="{{excessConfigArray[excessConfigIndex].name}}"> {{excessConfigArray[excessConfigIndex].name}}</view>
+            <input name="carzheId" value='{{carzheArray[carzheIndex].id}}' hidden='true' />
+            <picker bindchange="bindPickerChange" value="{{carzheIndex}}" range="{{carzheArray}}" range-key="name" data-pickername='carzhe'>
+              <view wx:if="{{carzheArray[carzheIndex].name}}"> {{carzheArray[carzheIndex].name}}</view>
               <view wx:else class="selectPlaceholder">{{ defaultText }}</view>
             </picker>
           </view>
@@ -63,10 +63,9 @@
           </view>
         </van-field>
 
-        <van-field label="司机ID" required name="driverId" value="{{ driverId }}" placeholder="请填写司机电话" input-align="right" hidden></van-field>
-
-        <van-field label="司机姓名" required name="driverName" value="{{ info.driverName }}" placeholder="请填写司机姓名" input-align="right" ></van-field>
-
+        <van-field label="司机姓名" required name="driverName" value="{{ info.driverName }}" placeholder="请填写司机姓名" input-align="right" >
+            <input name="driverId" value='{{driverId}}' hidden='true' />
+        </van-field>
         <van-field label="司机电话" required name="driverMobile" value="{{ info.driverMobile }}" placeholder="请填写司机电话" input-align="right" ></van-field>
       </view>
 

+ 7 - 10
pages/reservationLoadAppoint/index.js

@@ -41,8 +41,8 @@ Page({
     resData:[],
 
     show: false,
-    auditFlag:true,
-    orderReason:'',//审核备注
+    auditFlag:'false',
+    arriveReason:'',
 
     requestStatu2: '加载中...',
     page2: 1,
@@ -263,7 +263,7 @@ Page({
     let { id } = e.currentTarget.dataset
     this.setData({
       show: true,
-      orderReason: '',
+      arriveReason: '',
       id: id,
     });
   },
@@ -271,7 +271,7 @@ Page({
     this.setData({
       show: false,
       auditFlag:'false',
-      orderReason:'',
+      arriveReason:'',
       id: ''
     });
   },
@@ -280,18 +280,15 @@ Page({
     this.setData({
       [e.currentTarget.dataset.radiotype]: e.detail.value
     })
-    if (e.detail.value == '1') {
-      this.setData({
-        appointmentReason: ''
-      })
-    }
   },
   
   //审核
   formSubmit: function (e) {
     let formData = e.detail.value;
     var warn = ""; //弹框时提示的内容
-    if (formData.auditFlag=='true' && formData.arriveReason == '') {
+    if (formData.auditFlag == '') {
+      warn = "选择审核结果!";
+    } else if (formData.auditFlag == 'false' && formData.arriveReason == '') {
       warn = "审核不通过时备注不能为空!";
     }
     formData.auditFlag = formData.auditFlag=='true'

+ 109 - 4
pages/reservationMan/index.js

@@ -281,7 +281,75 @@ Page({
     })
   },
 
-  // 授权出场
+  //完成装货  管桩预约
+  completePipeFun: function (e) {
+    let _this = this
+    let { id, licenseNumber } = e.currentTarget.dataset
+    wx.showModal({
+      title: '提示!',
+      content: `确定【${licenseNumber}】完成装货?`,
+      confirmColor: '#FF5B5B',
+      success: function (res) {
+        if (res.confirm) {
+          app.request.POST({
+            url: app.API.completePipeAppoint,
+            params: {
+              id: id
+            },
+            page: _this,
+            isLoadingTxt: '取消中...',
+            successFun: true
+          }).then(res => {
+            wx.showToast({
+              title: '取消成功',
+              icon: 'success',
+              duration: 1000,
+              mask: true
+            })
+            _this.getListFun(); //刷新列表
+          })
+        } else if (res.cancel) {
+
+        }
+      }
+    })
+  },
+
+  //完成装货  其他预约
+  completeOtherFun: function (e) {
+    let _this = this
+    let { id, licenseNumber } = e.currentTarget.dataset
+    wx.showModal({
+      title: '提示!',
+      content: `确定【${licenseNumber}】完成装货?`,
+      confirmColor: '#FF5B5B',
+      success: function (res) {
+        if (res.confirm) {
+          app.request.POST({
+            url: app.API.completeOtherAppoint,
+            params: {
+              id: id
+            },
+            page: _this,
+            isLoadingTxt: '取消中...',
+            successFun: true
+          }).then(res => {
+            wx.showToast({
+              title: '取消成功',
+              icon: 'success',
+              duration: 1000,
+              mask: true
+            })
+            _this.getListFun(); //刷新列表
+          })
+        } else if (res.cancel) {
+
+        }
+      }
+    })
+  },
+
+  // 授权出场:其他预约
   exitFun: function (e) {
     let _this = this
     let { id, licenseNumber } = e.currentTarget.dataset
@@ -349,6 +417,40 @@ Page({
     })
   },
 
+  // 强制结束  其他预约
+  overOtherFun: function (e) {
+    let _this = this
+    let { id, licenseNumber } = e.currentTarget.dataset
+    wx.showModal({
+      title: '提示!',
+      content: `确定强制结束【${licenseNumber}】预约信息,操作后无法撤回,请确认?`,
+      confirmColor: '#FF5B5B',
+      success: function (res) {
+        if (res.confirm) {
+          app.request.POST({
+            url: app.API.otherExit,
+            params: {
+              id: id
+            },
+            page: _this,
+            isLoadingTxt: '授权中...',
+            successFun: true
+          }).then(res => {
+            wx.showToast({
+              title: '授权成功',
+              icon: 'success',
+              duration: 1000,
+              mask: true
+            })
+            _this.getListFun(); //刷新列表
+          })
+        } else if (res.cancel) {
+
+        }
+      }
+    })
+  },
+
   // 审核S
   showPopup(e) {
     let { id,type } = e.currentTarget.dataset
@@ -373,11 +475,14 @@ Page({
       [e.currentTarget.dataset.radiotype]: e.detail.value
     })
   },
+
   //审核
   formSubmit: function (e) {
     let formData = e.detail.value;
     var warn = ""; //弹框时提示的内容
-    if (formData.auditFlag=='true' && formData.appointmentReason == '') {
+    if (formData.auditFlag == '') {
+      warn = "选择审核结果!";
+    } else if (formData.auditFlag == 'false' && formData.appointmentReason == '') {
       warn = "审核不通过时备注不能为空!";
     }
     formData.auditFlag = formData.auditFlag=='true'
@@ -503,8 +608,8 @@ Page({
       current       : this.data.page,
       size          : this.data.limit,
       licenseNumber : this.data.searchVal,
-      // reservationStatus: this.data.applyData[this.data.setIndex].value,
-      type          : this.data.type,
+      // reservationStatus: this.data.applyData[this.data.setIndex].value,,
+      type            : this.data.appointmentType
     }
     app.request.pageOther({
       url: app.API.appointmentPage,

+ 18 - 11
pages/reservationMan/index.wxml

@@ -34,12 +34,15 @@
             <van-tab title="{{ item.label }}"></van-tab>
           </block>
         </van-tabs> -->
-        <!-- <view class="filterStatus">
-      <view class="first {{registStatus==''?'active':''}}" data-status="" bindtap="statusFun">全部</view>
-      <view class="{{registStatus=='1'?'active':''}}" data-status="1" bindtap="statusFun">待入场 <van-tag round wx:if="{{registStatusdrc>0}}" type="danger">{{registStatusdrc}}</van-tag></view>
-      <view class="{{registStatus=='3'?'active':''}}" data-status="3" bindtap="statusFun">过磅中 <van-tag round wx:if="{{registStatusgbz>0}}" type="danger">{{registStatusgbz}}</van-tag></view>
-      <view class="{{registStatus=='7'?'active':''}}" data-status="7" bindtap="statusFun">已出场 <van-tag round wx:if="{{registStatusycc>0}}" type="danger">{{registStatusycc}}</van-tag></view>
-    </view> -->
+
+        <!-- 
+        <view class="filterStatus">
+          <view class="first {{registStatus==''?'active':''}}" data-status="" bindtap="statusFun">全部</view>
+          <view class="{{registStatus=='1'?'active':''}}" data-status="1" bindtap="statusFun">待入场 <van-tag round wx:if="{{registStatusdrc>0}}" type="danger">{{registStatusdrc}}</van-tag></view>
+          <view class="{{registStatus=='3'?'active':''}}" data-status="3" bindtap="statusFun">过磅中 <van-tag round wx:if="{{registStatusgbz>0}}" type="danger">{{registStatusgbz}}</van-tag></view>
+          <view class="{{registStatus=='7'?'active':''}}" data-status="7" bindtap="statusFun">已出场 <van-tag round wx:if="{{registStatusycc>0}}" type="danger">{{registStatusycc}}</van-tag></view>
+        </view> 
+        -->
         <view class="filterStatus">
           <view class="first {{appointmentType==''?'active':''}}" data-type="" bindtap="typeFun">全部预约</view>
           <view class="{{appointmentType=='1'?'active':''}}" data-type="1" bindtap="typeFun">砂石<van-tag round wx:if="{{appointmentTypeSha>0}}" type="danger">{{appointmentTypeSha}}</van-tag></view>
@@ -86,16 +89,20 @@
                 <text>预约类型:{{ filters.codeAnalysis(appointmentTypeArray, item.appointmentType, 'dictValue', 'dictLabel') }}</text>
               </view>
               
-              <view class="bottomBtn" wx:if="{{ item.status == '1' || item.status == '4'|| item.status == '5' || item.status == '6' || item.status == '7' || item.status == '8' || (item.appointmentType == '6' && (item.status == '2' || item.status == '4')) }} ">
+              <view class="bottomBtn" wx:if="{{ item.status == '1' || item.status == '4'|| item.status == '5' || item.status == '6' || item.status == '7' || item.status == '8' || (item.appointmentType == '6' && (item.status == '2' || item.status == '4')) || (item.status == '5' && item.appointmentType == '5') || (item.status == '5' && item.appointmentType == '6' && item.isWeigh == '1') || (item.appointmentType == '6'  && (item.status=='5' || item.status=='6' || item.status=='7' || item.status=='8' || item.status=='9' || item.status=='16' || item.status=='17')) || (item.appointmentType != '6'  && (item.status == '5' || item.status == '6' || item.status == '7' || item.status == '8')) }} ">
                 <van-button type="info" size="small" data-id="{{item.id}}" data-index="{{ index }}" catchtap="toUpdate" wx:if="{{ item.appointmentType == '6' && (item.status == '2' || item.status == '4') }}" style="margin-right: 20rpx;">修改</van-button>
                 <van-button type="danger" size="small" data-id="{{item.id}}" data-license-number="{{item.licenseNumber}}" catchtap="delFun" wx:if="{{ item.appointmentType == '6' && item.status == '2' }}">删除</van-button>
                 
                 <van-button type="info" size="small" data-id="{{item.id}}" data-type="{{item.appointmentType}}" data-approve-type="one" catchtap="showPopup" style="margin-right: 20rpx;" wx:if="{{ item.status == '1' }}">审核</van-button>
                 <van-button type="warning" size="small" data-id="{{item.id}}" data-license-number="{{item.licenseNumber}}" catchtap="cancelFun" wx:if="{{ item.status == '4' }}" style="margin-right: 20rpx;">取消预约</van-button>
+
+                <van-button type="warning" size="small" data-id="{{item.id}}" data-license-number="{{item.licenseNumber}}" catchtap="completePipeFun" wx:if="{{ item.appointmentType == '5' && item.status == '5' }}" style="margin-right: 20rpx;">完成装货</van-button>
+                <van-button type="warning" size="small" data-id="{{item.id}}" data-license-number="{{item.licenseNumber}}" catchtap="completeOtherFun" wx:if="{{ item.appointmentType == '6' && (item.isWeigh == '1' && item.status=='6') }}" style="margin-right: 20rpx;">完成装货</van-button>
                 
-                <van-button type="primary" size="small" data-id="{{item.id}}" data-license-number="{{item.licenseNumber}}" catchtap="exitFun" wx:if="{{ item.appointmentType == '6'  && (item.status=='5' || item.status=='6' || item.status=='7' || item.status=='8' || item.status=='9' || item.status=='16' || item.status=='17') }}" style="margin-right: 20rpx;">授权离场</van-button>
+                <van-button type="primary" size="small" data-id="{{item.id}}" data-license-number="{{item.licenseNumber}}" catchtap="exitFun" wx:if="{{ item.appointmentType == '6'  && item.status=='5' }}" style="margin-right: 20rpx;">授权离场</van-button>
 
                 <van-button type="danger" size="small" data-id="{{item.id}}" data-license-number="{{item.licenseNumber}}" catchtap="overFun" wx:if="{{ item.appointmentType != '6'  && (item.status == '5' || item.status == '6' || item.status == '7' || item.status == '8') }}" style="margin-right: 20rpx;">强制结束</van-button>
+                <van-button type="danger" size="small" data-id="{{item.id}}" data-license-number="{{item.licenseNumber}}" catchtap="overOtherFun" wx:if="{{ item.appointmentType == '6'  && (item.status == '5' || item.status == '6' || item.status == '7' || item.status == '8' || item.status == '9' || item.status == '16' || item.status == '17') }}" style="margin-right: 20rpx;">强制结束</van-button>
               </view>
             </navigator>
           </block>
@@ -138,15 +145,15 @@
         <view slot="input" class="radioHeightBx">
           <radio-group class="radio-group" bindchange="dangerStatusChange" data-radioType="auditFlag">
             <label class="radio">
-              <radio value="false" checked="{{auditFlag=='false'}}" color="#4B70EA" />通过
+              <radio value="false" checked="{{auditFlag=='true'}}" color="#4B70EA" />通过
             </label>
             <label class="radio">
-              <radio value="true" checked="{{auditFlag=='true'}}" color="#4B70EA" />不通过
+              <radio value="true" checked="{{auditFlag=='false'}}" color="#4B70EA" />不通过
             </label>
           </radio-group>
         </view>
       </van-field>
-      <van-field label="审核备注" required="{{auditFlag=='true'}}" name="appointmentReason" value="{{ appointmentReason }}" type="textarea" input-align="right" placeholder="请输入审核备注" autosize></van-field>
+      <van-field label="审核备注" required="{{auditFlag=='false'}}" name="appointmentReason" value="{{ appointmentReason }}" type="textarea" input-align="right" placeholder="请输入审核备注" autosize></van-field>
     </view>
 
     <view class="submitBtn">

+ 3 - 2
pages/reservationMan/info.js

@@ -48,8 +48,9 @@ Page({
       let unloadImgArr = getInfo.unloadImg.split(',')
       unloadImgArr.forEach(element => {
         fileList.push({
-          url: app.host.BASEIMG_URL+element,
-          isImage:true
+          url     : app.host.BASEIMG_URL+element,
+          imgUrl  : element,
+          isImage : true
         })
       });
     }

+ 20 - 0
pages/reservationOther/add.js

@@ -18,6 +18,9 @@ Page({
     driverArray:[], //司机
     driverIndex:null,
 
+    carzheArray:[],//车辆轴数
+    carzheIndex:'',
+
   },
   //输入框焦点聚焦时隐藏车牌号输入框
   hideKeybord: function () {
@@ -31,6 +34,8 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    //获取车辆轴数
+    this.getCarzheData()
     //获取司机信息
     this.loadUserData()
   },
@@ -42,6 +47,21 @@ Page({
     })
   },
 
+  //获取车辆轴数下拉列表
+  getCarzheData:function(){
+    //获取车辆轴数下拉列表
+    app.request.GET({
+      url: app.API.getCarzheList,
+      params: {},
+      page: this,
+      successFun: true
+    }).then(res => {
+      this.setData({
+        carzheArray:res.data.data
+      })
+    })
+  },
+
   //司机
   loadUserData:function(loadUserId){
     app.request.GET({

+ 1 - 1
pages/reservationOther/add.json

@@ -1,5 +1,5 @@
 {
-  "navigationBarTitleText": "新增充电桩预约",
+  "navigationBarTitleText": "新增其他预约",
   "usingComponents": {
     "van-checkbox": "@vant/weapp/checkbox/index",
     "van-checkbox-group": "@vant/weapp/checkbox-group/index",

+ 14 - 2
pages/reservationOther/add.wxml

@@ -8,10 +8,24 @@
         <car-num-input bind:setCarNum="licensePlate" isKeyboard="{{isKeyboard}}" inputOnFocusIndex="{{inputOnFocusIndex}}" inputPlates="{{inputPlates}}" isNewEnergy="{{isNewEnergy}}"></car-num-input>
         <input name="licenseNumber" value='{{licensePlate}}' hidden='true' />
 
+        <van-field label="车辆轴数" required input-align="right" bindtap="hideKeybord">
+          <view slot="input" style="width: 100%;">
+            <input name="overId" value='{{carzheArray[carzheIndex].id}}' hidden='true' />
+            <picker bindchange="bindPickerChange" value="{{carzheIndex}}}" range="{{carzheArray}}" range-key="vehicleAxleNumber" data-pickername='carzhe'>
+              <view wx:if="{{carzheArray[carzheIndex].vehicleAxleNumber}}"> {{carzheArray[carzheIndex].vehicleAxleNumber}}</view>
+              <view wx:else class="selectPlaceholder">{{defaultText}}</view>
+            </picker>
+          </view>
+          <view slot="right-icon">
+            <van-icon name="arrow" />
+          </view>
+        </van-field>
+
         <!-- 司机 -->
         <van-field label="司机" required input-align="right">
           <view slot="input" style="width: 100%;">
             <input name="driverId" value='{{driverArray[driverIndex].id}}' hidden='true' />
+            <input name="driverName" value='{{driverArray[driverIndex].name}}' hidden='true' />
             <picker bindchange="bindPickerChange" value="{{driverIndex}}" range="{{driverArray}}" range-key="name" data-pickername='driver'>
               <view wx:if="{{driverArray[driverIndex].name}}"> {{driverArray[driverIndex].name}}</view>
               <view wx:else class="selectPlaceholder">{{ defaultText }}</view>
@@ -21,8 +35,6 @@
             <van-icon name="arrow" />
           </view>
         </van-field>
-        
-        <van-field label="司机姓名" wx:if="{{driverArray[driverIndex].id}}" name="driverName" readonly value="{{ driverName }}" placeholder="选择司机自动填入" input-align="right"></van-field>
 
         <van-field label="司机电话" wx:if="{{driverArray[driverIndex].id}}" name="driverMobile" readonly value="{{ driverMobile }}" placeholder="选择司机自动填入" input-align="right"></van-field>
 

+ 22 - 1
pages/reservationOther/edit.js

@@ -17,6 +17,9 @@ Page({
 
     driverArray:[], //司机
     driverIndex:null,
+
+    carzheArray:[],//车辆轴数
+    carzheIndex:'',
   },
   //输入框焦点聚焦时隐藏车牌号输入框
   hideKeybord: function () {
@@ -50,6 +53,8 @@ Page({
       isNewEnergy: getCarNumArr.length > 7 ? true : false,
       licensePlate: getInfo.licenseNumber,
     })
+    //获取车辆轴数
+    this.getCarzheData()
     //获取司机信息
     this.loadUserData()
   },
@@ -61,8 +66,24 @@ Page({
     })
   },
 
+  //获取车辆轴数下拉列表
+  getCarzheData:function(){
+    //获取车辆轴数下拉列表
+    app.request.GET({
+      url: app.API.getCarzheList,
+      params: {},
+      page: this,
+      successFun: true
+    }).then(res => {
+      this.setData({
+        carzheArray : res.data.data,
+        carzheIndex : app.util.getDicIndex(res.data.data, this.data.info.overId, 'id')
+      })
+    })
+  },
+
   //司机
-  loadUserData:function(loadUserId){
+  loadUserData:function(){
     app.request.GET({
       url: app.API.roleUser,
       params: {

+ 15 - 5
pages/reservationOther/edit.wxml

@@ -8,13 +8,25 @@
         <van-field required label="车牌号码" readonly border="{{false}}"></van-field>
         <car-num-input bind:setCarNum="licensePlate" isKeyboard="{{isKeyboard}}" inputOnFocusIndex="{{inputOnFocusIndex}}" inputPlates="{{inputPlates}}" isNewEnergy="{{isNewEnergy}}"></car-num-input>
         <input name="licenseNumber" value='{{licensePlate}}' hidden='true' />
-      </view>
-        
-      <view class="part">
+
+        <van-field label="车辆轴数" required input-align="right" bindtap="hideKeybord">
+          <view slot="input" style="width: 100%;">
+            <input name="overId" value='{{carzheArray[carzheIndex].id}}' hidden='true' />
+            <picker bindchange="bindPickerChange" value="{{carzheIndex}}}" range="{{carzheArray}}" range-key="vehicleAxleNumber" data-pickername='carzhe'>
+              <view wx:if="{{carzheArray[carzheIndex].vehicleAxleNumber}}"> {{carzheArray[carzheIndex].vehicleAxleNumber}}</view>
+              <view wx:else class="selectPlaceholder">{{defaultText}}</view>
+            </picker>
+          </view>
+          <view slot="right-icon">
+            <van-icon name="arrow" />
+          </view>
+        </van-field>
+
         <!-- 司机 -->
         <van-field label="司机" required input-align="right">
           <view slot="input" style="width: 100%;">
             <input name="driverId" value='{{driverArray[driverIndex].id}}' hidden='true' />
+            <input name="driverName" value='{{driverArray[driverIndex].name}}' hidden='true' />
             <picker bindchange="bindPickerChange" value="{{driverIndex}}" range="{{driverArray}}" range-key="name" data-pickername='driver'>
               <view wx:if="{{driverArray[driverIndex].name}}"> {{driverArray[driverIndex].name}}</view>
               <view wx:else class="selectPlaceholder">{{ defaultText }}</view>
@@ -24,8 +36,6 @@
             <van-icon name="arrow" />
           </view>
         </van-field>
-        
-        <van-field label="司机姓名" wx:if="{{driverArray[driverIndex].id}}" name="driverName" readonly value="{{ driverName }}" placeholder="选择司机自动填入" input-align="right"></van-field>
 
         <van-field label="司机电话" wx:if="{{driverArray[driverIndex].id}}" name="driverMobile" readonly value="{{ driverMobile }}" placeholder="选择司机自动填入" input-align="right"></van-field>
 

+ 7 - 10
pages/reservationOther/index.js

@@ -41,8 +41,8 @@ Page({
     resData:[],
 
     show: false,
-    auditFlag:true,
-    orderReason:'',//审核备注
+    auditFlag:'false',
+    arriveReason:'',//审核备注
 
     requestStatu2: '加载中...',
     page2: 1,
@@ -263,7 +263,7 @@ Page({
     let { id } = e.currentTarget.dataset
     this.setData({
       show: true,
-      orderReason: '',
+      arriveReason: '',
       id: id,
     });
   },
@@ -271,7 +271,7 @@ Page({
     this.setData({
       show: false,
       auditFlag:'false',
-      orderReason:'',
+      arriveReason:'',
       id: ''
     });
   },
@@ -280,18 +280,15 @@ Page({
     this.setData({
       [e.currentTarget.dataset.radiotype]: e.detail.value
     })
-    if (e.detail.value == '1') {
-      this.setData({
-        appointmentReason: ''
-      })
-    }
   },
   
   //审核
   formSubmit: function (e) {
     let formData = e.detail.value;
     var warn = ""; //弹框时提示的内容
-    if (formData.auditFlag=='true' && formData.arriveReason == '') {
+    if (formData.auditFlag == '') {
+      warn = "选择审核结果!";
+    } else if (formData.auditFlag == 'false' && formData.arriveReason == '') {
       warn = "审核不通过时备注不能为空!";
     }
     formData.auditFlag = formData.auditFlag=='true'

+ 2 - 1
pages/reservationPipe/add.js

@@ -47,7 +47,7 @@ Page({
     this.setData({
       driverId    : wx.getStorageSync('id'),
       driverName  : wx.getStorageSync('name'),
-      driverPhone : wx.getStorageSync('phone'),
+      driverMobile: wx.getStorageSync('phone'),
       inputPlates : inputPlates,
       isNewEnergy : getCarNumArr.length > 7 ? true : false,
       licensePlate: wx.getStorageSync('nickname')
@@ -139,6 +139,7 @@ Page({
 
   //表单提交 carTaskAdd
   formSubmit: function ({detail:{value}}) {
+    console.info("----driverId---" + value.driverId)
     var warn = ""; //弹框时提示的内容
     let reg = /^1[3-9]\d{9}$/;
     var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;

+ 3 - 4
pages/reservationPipe/add.wxml

@@ -35,10 +35,9 @@
         <car-num-input bind:setCarNum="licensePlate" isKeyboard="{{isKeyboard}}" inputOnFocusIndex="{{inputOnFocusIndex}}" inputPlates="{{inputPlates}}" isNewEnergy="{{isNewEnergy}}"></car-num-input>
         <input name="licenseNumber" value='{{licensePlate}}' hidden='true' />
 
-        <van-field label="司机ID" required name="driverId" value="{{ driverId }}" placeholder="请填写司机电话" input-align="right" hidden></van-field>
-
-        <van-field label="司机姓名" required name="driverName" value="{{ driverName }}" placeholder="请填写司机姓名" input-align="right" ></van-field>
-
+        <van-field label="司机姓名" required name="driverName" value="{{ driverName }}" placeholder="请填写司机姓名" input-align="right" >
+            <input name="driverId" value='{{driverId}}' hidden='true' />
+        </van-field>
         <van-field label="司机电话" required name="driverMobile" value="{{ driverMobile }}" placeholder="请填写司机电话" input-align="right" ></van-field>
       </view>
 

+ 3 - 4
pages/reservationPipe/edit.wxml

@@ -36,10 +36,9 @@
         <car-num-input bind:setCarNum="licensePlate" isKeyboard="{{isKeyboard}}" inputOnFocusIndex="{{inputOnFocusIndex}}" inputPlates="{{inputPlates}}" isNewEnergy="{{isNewEnergy}}"></car-num-input>
         <input name="licenseNumber" value='{{licensePlate}}' hidden='true' />
 
-        <van-field label="司机ID" required name="driverId" value="{{ driverId }}" placeholder="请填写司机电话" input-align="right" hidden></van-field>
-
-        <van-field label="司机姓名" required name="driverName" value="{{ info.driverName }}" placeholder="请填写司机姓名" input-align="right" ></van-field>
-
+        <van-field label="司机姓名" required name="driverName" value="{{ info.driverName }}" placeholder="请填写司机姓名" input-align="right" >
+            <input name="driverId" value='{{driverId}}' hidden='true' />
+        </van-field>
         <van-field label="司机电话" required name="driverMobile" value="{{ info.driverMobile }}" placeholder="请填写司机电话" input-align="right" ></van-field>
       </view>
 

+ 0 - 57
pages/reservationPipe/index.js

@@ -40,10 +40,6 @@ Page({
 
     resData:[],
 
-    show: false,
-    auditFlag:true,
-    orderReason:'',//审核备注
-
     requestStatu2: '加载中...',
     page2: 1,
     totalPages2: 1,
@@ -258,65 +254,12 @@ Page({
     })
   },
 
-  // 审核S
-  showPopup(e) {
-    let { id } = e.currentTarget.dataset
-    this.setData({
-      show: true,
-      orderReason: '',
-      id: id,
-    });
-  },
-  onClose() {
-    this.setData({
-      show: false,
-      auditFlag:'false',
-      orderReason:'',
-      id: ''
-    });
-  },
   // 单选
   dangerStatusChange: function (e) {
     this.setData({
       [e.currentTarget.dataset.radiotype]: e.detail.value
     })
-    if (e.detail.value == '1') {
-      this.setData({
-        appointmentReason: ''
-      })
-    }
-  },
-  
-  //审核
-  formSubmit: function (e) {
-    let formData = e.detail.value;
-    var warn = ""; //弹框时提示的内容
-    if (formData.auditFlag=='true' && formData.arriveReason == '') {
-      warn = "审核不通过时备注不能为空!";
-    }
-    formData.auditFlag = formData.auditFlag=='true'
-    if (warn != '') {
-      app.util.checkForm(warn);
-    } else {
-      app.request.POST({
-        url: app.API.bizloadarriveAudit,
-        params: formData,
-        page: this,
-        isLoadingTxt: '审核中...',
-        successFun: true
-      }).then(res => {
-        wx.showToast({
-          title: '审核成功',
-          icon: 'success',
-          duration: 1000,
-          mask: true
-        })
-        this.onClose()
-        this.getListFun(); //刷新列表
-      })
-    }
   },
-  // 审核E
 
   //申请
   changeAdd() {

+ 13 - 8
pages/reservationStone/add.js

@@ -1,4 +1,4 @@
-// pages/index/add.js
+// pages/reservationStone/add.js
 const app = getApp()
 Page({
 
@@ -17,14 +17,15 @@ Page({
     orderArray: [], //订单
     orderIndex: '',
 
-    overArray: [], //车辆轴数
-    overIndex: '',
+    carzheArray: [], //车辆轴数
+    carzheIndex: '',
 
     isKeyboard: false, //是否显示车牌输入键盘
     inputOnFocusIndex: '', //当前锁定的车号位置
     licensePlate: '', //用于提交
     inputPlates: '', //用于显示
 
+    driverId:'',
     driverName:'',
     driverMobile:'',
 
@@ -43,6 +44,7 @@ Page({
       orderId: options.orderId,
       orderName: options.orderName,
       orderNumber:options.orderNumber,
+      driverId    : wx.getStorageSync('id'),
     })
     this.getCarInfo()
     //装卸点位
@@ -69,10 +71,11 @@ Page({
           inputPlates: inputPlates,
           isNewEnergy: getCarNumArr.length > 7 ? true : false,
           licensePlate: getInfo.licensePlate,
+          driverId:getInfo.driverId,
           driverName:getInfo.driverName,
           driverMobile:getInfo.driverMobile,
         })
-        this.getSelectData(getInfo.vehicleAxles)
+        this.getSelectData(getInfo.overId)
       }else{
         this.getSelectData()
       }
@@ -83,7 +86,7 @@ Page({
   },
 
   //获取订单下拉列表、车辆轴数下拉列表
-  getSelectData: function (vehicleAxles) {
+  getSelectData: function (overId) {
     //获取订单下拉列表
     // app.request.GET({
     //   url: app.API.orderAllList,
@@ -104,8 +107,8 @@ Page({
       successFun: true
     }).then(res => {
       this.setData({
-        overArray: res.data.data,
-        overIndex: vehicleAxles?app.util.getDicIndex(res.data.data, vehicleAxles, 'id'):null,
+        carzheArray: res.data.data,
+        carzheIndex: overId?app.util.getDicIndex(res.data.data, overId, 'id'):null,
       })
     })
 
@@ -209,7 +212,7 @@ Page({
       warn = "车牌号格式错误!";
     } else if (formData.licenseNumber.length == 8 && !xreg.test(formData.licenseNumber)) {
       warn = "车牌号格式错误!";
-    } else if (typeof formData.overId == 'undefined' || formData.overId == '') {
+    } else if (typeof formData.carzheId == 'undefined' || formData.carzheId == '') {
       warn = "请选择车辆轴数!";
     } else if (formData.driverName == '') {
       warn = "请填写司机姓名!";
@@ -222,6 +225,8 @@ Page({
     } else if(typeof formData.loadTimeId == 'undefined' || formData.loadTimeId == ''){
       warn = "请选择装卸时间!";
     }
+
+    value.overId = value.carzheId
     if (warn != '') {
       app.util.checkForm(warn);
     } else {

+ 8 - 7
pages/reservationStone/add.wxml

@@ -1,4 +1,4 @@
-<!--pages/index/add.wxml-->
+<!--pages/reservationStone/add.wxml-->
 <view class="container" style="padding-bottom:100px;">
   <view class="height20"></view>
   <view>
@@ -18,15 +18,16 @@
         <!-- 车辆轴数 -->
         <van-field label="车辆轴数" required input-align="right" bindtap="hideKeybord" is-link>
           <view slot="input" style="width: 100%;">
-            <input name="overId" value='{{overArray[overIndex].id}}' hidden='true' />
-            <picker bindchange="bindPickerChange" value="{{overIndex}}}" range="{{overArray}}" range-key="vehicleAxleNumber" data-pickername='over'>
-              <view>{{overArray[overIndex].vehicleAxleNumber?overArray[overIndex].vehicleAxleNumber:defaultText}}</view>
+            <input name="carzheId" value='{{carzheArray[carzheIndex].id}}' hidden='true' />
+            <picker bindchange="bindPickerChange" value="{{carzheIndex}}}" range="{{carzheArray}}" range-key="vehicleAxleNumber" data-pickername='carzhe'>
+              <view>{{carzheArray[carzheIndex].vehicleAxleNumber?carzheArray[carzheIndex].vehicleAxleNumber:defaultText}}</view>
             </picker>
           </view>
         </van-field>
-
-        <van-field label="司机ID" required name="driverId" value="{{ driverId }}" placeholder="请填写司机电话" input-align="right" hidden></van-field>
-        <van-field label="司机姓名" required name="driverName" value="{{ driverName }}" placeholder="请填写司机姓名" input-align="right" bindtap="hideKeybord"></van-field>
+        
+        <van-field label="司机姓名" required name="driverName" value="{{ driverName }}" placeholder="请填写司机姓名" input-align="right" bindtap="hideKeybord">
+            <input name="driverId" value='{{driverId}}' hidden='true' />
+        </van-field>
         <van-field label="司机电话" required name="driverMobile" value="{{ driverMobile }}" placeholder="请填写司机电话" input-align="right" bindtap="hideKeybord"></van-field>
 
         <!-- 装卸点位 -->

+ 1 - 1
pages/reservationStone/add.wxss

@@ -1,4 +1,4 @@
-/* pages/index/add.wxss */
+/* pages/reservationStone/add.wxss */
 .van-field__label {
   width: 240rpx !important;
 }

+ 7 - 6
pages/reservationStone/edit.js

@@ -1,4 +1,4 @@
-// pages/index/edit.js
+// pages/reservationStone/edit.js
 const app = getApp()
 Page({
 
@@ -20,8 +20,8 @@ Page({
     orderArray:[],//订单
     orderIndex:'',
 
-    overArray:[],//车辆轴数
-    overIndex:'',
+    carzheArray:[],//车辆轴数
+    carzheIndex:'',
 
   },
 
@@ -78,8 +78,8 @@ Page({
       successFun: true
     }).then(res => {
       this.setData({
-        overArray:res.data.data,
-        overIndex: app.util.getDicIndex(res.data.data, this.data.info.overId, 'id'),
+        carzheArray:res.data.data,
+        carzheIndex: app.util.getDicIndex(res.data.data, this.data.info.overId, 'id'),
       })
     })
 
@@ -189,7 +189,7 @@ Page({
       warn = "车牌号格式错误!";
     } else if (formData.licenseNumber.length == 8 && !xreg.test(formData.licenseNumber)) {
       warn = "车牌号格式错误!";
-    } else if (typeof formData.overId == 'undefined' || formData.overId == '') {
+    } else if (typeof formData.carzheId == 'undefined' || formData.carzheId == '') {
       warn = "请选择车辆轴数!";
     } else if (formData.driverName == '') {
       warn = "请填写司机姓名!";
@@ -198,6 +198,7 @@ Page({
     } else if (!reg.test(formData.driverMobile)) {
       warn = "司机电话格式错误!";
     }
+    value.overId = value.carzheId
     if (warn != '') {
       app.util.checkForm(warn);
     } else {

+ 7 - 6
pages/reservationStone/edit.wxml

@@ -1,4 +1,4 @@
-<!--pages/index/edit.wxml-->
+<!--pages/reservationStone/edit.wxml-->
 <view class="container" style="padding-bottom:100px;">
   <view class="height20"></view>
   <view>
@@ -18,15 +18,16 @@
         <!-- 车辆轴数 -->
         <van-field label="车辆轴数" required input-align="right" bindtap="hideKeybord" is-link>
           <view slot="input" style="width: 100%;">
-            <input name="overId" value='{{overArray[overIndex].id}}' hidden='true' />
-            <picker bindchange="bindPickerChange" value="{{overIndex}}}" range="{{overArray}}" range-key="vehicleAxleNumber" data-pickername='over'>
-              <view>{{overArray[overIndex].vehicleAxleNumber?overArray[overIndex].vehicleAxleNumber:defaultText}}</view>
+            <input name="carzheId" value='{{carzheArray[carzheIndex].id}}' hidden='true' />
+            <picker bindchange="bindPickerChange" value="{{carzheIndex}}}" range="{{carzheArray}}" range-key="vehicleAxleNumber" data-pickername='carzhe'>
+              <view>{{carzheArray[carzheIndex].vehicleAxleNumber?carzheArray[carzheIndex].vehicleAxleNumber:defaultText}}</view>
             </picker>
           </view>
         </van-field>
 
-        <van-field label="司机ID" required name="driverId" value="{{ driverId }}" placeholder="请填写司机电话" input-align="right" hidden></van-field>
-        <van-field label="司机姓名" required name="driverName" value="{{ info.driverName }}" placeholder="请填写司机姓名" input-align="right" bindtap="hideKeybord"></van-field>
+        <van-field label="司机姓名" required name="driverName" value="{{ info.driverName }}" placeholder="请填写司机姓名" input-align="right" bindtap="hideKeybord">
+            <input name="driverId" value='{{driverId}}' hidden='true' />
+        </van-field>
         <van-field label="司机电话" required name="driverMobile" value="{{ info.driverMobile }}" placeholder="请填写司机电话" input-align="right" bindtap="hideKeybord"></van-field>
 
         <!-- 装卸点位 -->

+ 1 - 1
pages/reservationStone/edit.wxss

@@ -1,4 +1,4 @@
-/* pages/index/edit.wxss */
+/* pages/reservationStone/edit.wxss */
 .van-field__label {
   width: 240rpx !important;
 }

+ 4 - 4
pages/reservationTemp/add.js

@@ -63,7 +63,7 @@ Page({
           driverName:getInfo.driverName,
           driverMobile:getInfo.driverMobile,
         })
-        this.getSelectData(getInfo.vehicleAxles)
+        this.getSelectData(getInfo.overId)
       }else{
         this.getSelectData()
       }
@@ -74,7 +74,7 @@ Page({
   },
 
   //获取订单下拉列表、车辆轴数下拉列表
-  getSelectData: function (vehicleAxles) {
+  getSelectData: function (overId) {
     //获取订单下拉列表
     // app.request.GET({
     //   url: app.API.orderAllList,
@@ -95,8 +95,8 @@ Page({
       successFun: true
     }).then(res => {
       this.setData({
-        overArray: res.data.data,
-        overIndex: vehicleAxles?app.util.getDicIndex(res.data.data, vehicleAxles, 'id'):null,
+        carzheArray: res.data.data,
+        carzheIndex: overId?app.util.getDicIndex(res.data.data, overId, 'id'):null,
       })
     })
 

+ 2 - 2
pages/reservationTemp/edit.js

@@ -77,8 +77,8 @@ Page({
       successFun: true
     }).then(res => {
       this.setData({
-        overArray:res.data.data,
-        overIndex: app.util.getDicIndex(res.data.data, this.data.info.overId, 'id'),
+        carzheArray:res.data.data,
+        carzheIndex: app.util.getDicIndex(res.data.data, this.data.info.overId, 'id'),
       })
     })
 

+ 3 - 1
pages/salesOrderMan/index.js

@@ -431,7 +431,9 @@ Page({
   formSubmit: function (e) {
     let formData = e.detail.value;
     var warn = ""; //弹框时提示的内容
-    if (formData.auditFlag=='true' && formData.orderReason == '') {
+    if (formData.auditFlag == '') {
+      warn = "选择审核结果!";
+    } else if (formData.auditFlag == 'false' && formData.appointmentReason == '') {
       warn = "审核不通过时备注不能为空!";
     }
     formData.auditFlag = formData.auditFlag=='true'

+ 3 - 3
pages/salesOrderMan/index.wxml

@@ -121,15 +121,15 @@
         <view slot="input" class="radioHeightBx">
           <radio-group class="radio-group" bindchange="dangerStatusChange" data-radioType="auditFlag">
             <label class="radio">
-              <radio value="false" checked="{{auditFlag=='false'}}" color="#4B70EA" />通过
+              <radio value="false" checked="{{auditFlag=='true'}}" color="#4B70EA" />通过
             </label>
             <label class="radio">
-              <radio value="true" checked="{{auditFlag=='true'}}" color="#4B70EA" />不通过
+              <radio value="true" checked="{{auditFlag=='false'}}" color="#4B70EA" />不通过
             </label>
           </radio-group>
         </view>
       </van-field>
-      <van-field label="审核备注" required="{{auditFlag=='true'}}" name="orderReason" value="{{ orderReason }}" type="textarea" input-align="right" placeholder="请输入审核备注" autosize></van-field>
+      <van-field label="审核备注" required="{{auditFlag=='false'}}" name="orderReason" value="{{ orderReason }}" type="textarea" input-align="right" placeholder="请输入审核备注" autosize></van-field>
     </view>
 
     <view class="submitBtn">

+ 2 - 2
pages/salesOrderMan/orderloadAdd.js

@@ -37,11 +37,11 @@ Page({
     this.loadPointData()
   },
 
-  //装卸点位
+  //装卸点位   appointType   1起卸点位    2装货点位
   loadPointData:function(){
     app.request.GET({
       url: app.API.loadPoint,
-      params: {},
+      params: {'appointType' : '2'},
       page: this,
       successFun: true
     }).then(res => {

+ 202 - 0
pages/ship/add.js

@@ -0,0 +1,202 @@
+// pages/car/add.js
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    showModal: false,
+    defaultText: '请选择',
+    isSubmitting: false,
+
+    shipTypeArray: [], //船型
+    shipType: '',
+
+    shipArray:[], //船主
+    shipIndex:null,
+
+    certificatePathList:[], //船舶证书
+    contractPathList:[],  //安全环保合同
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    //船型
+    let treeData = app.globalData.treeArr
+    for (const element of treeData) {
+      let arrStr;
+      switch (element.dictValue) {
+        case 'ship_type':
+          arrStr = "shipTypeArray";
+          break;
+      }
+      this.setData({
+        [arrStr]: element.children
+      })
+    }
+    // 默认填充船主信息
+    this.setData({
+      shipId     : wx.getStorageSync('id'),
+      shipMobile : wx.getStorageSync('phone')
+    })
+    //获取船主下拉列表
+    this.loadUserData()
+  },
+
+  //船主
+  loadUserData:function(){
+    app.request.GET({
+      url: app.API.roleUser,
+      params: {
+        roleName : '船主',
+      },
+      page: this,
+      successFun: true
+    }).then(res => {
+      this.setData({
+        shipArray : res.data.data,
+        shipIndex : app.util.getDicIndex(res.data.data, this.data.shipId, 'id')
+      })
+      if(this.data.shipId){
+        this.setData({
+          shipMobile : this.data.shipArray[this.data.shipIndex].phone,
+        })
+      }
+    })
+  },
+
+  //下拉选择
+  bindPickerChange: function (e) { 
+    let { pickername } = e.target.dataset
+    let getIndex = pickername + 'Index'
+    app.util.getPickerIndex(this, getIndex, e);
+    switch (pickername) {
+      case 'ship': //选择船主
+        this.setData({
+          shipMobile : this.data.shipArray[this.data.shipIndex].phone,
+        })
+        break;
+    }
+  },
+
+  // 单选
+  dangerStatusChange: function (e) {
+    this.setData({
+      [e.currentTarget.dataset.radiotype]: e.detail.value
+    })
+  },
+  //多选
+  checkboxChange: function (e) {
+    this.setData({
+      [e.currentTarget.dataset.checkboxtype]: e.detail
+    })
+  },
+
+  //图片上传
+  afterRead:function(event){
+    const { file } = event.detail;
+    const { type } = event.currentTarget.dataset
+    app.request.uploadDIY({
+      url: app.API.uploadImgMap,
+      page: this,
+      filePaths:file.url,
+      setfiled:'file',
+      params: {},
+      //isToken: false,
+      isLoading: false,
+      successFun: true
+    }).then(res => {
+        const imgArray = this.data[type];
+        imgArray.push({
+          ...file,
+          url: app.host.BASEIMG_URL + JSON.parse(res.data).data.imageFile,
+          imgUrl: JSON.parse(res.data).data.imageFile
+        });
+        this.setData({
+          [type]: imgArray
+        });
+    })
+  },
+
+  // 删除图片
+  deleteImg: function (event) {
+    const { type } = event.currentTarget.dataset
+    let getFileList = this.data[type];
+    getFileList.splice(event.detail.index, 1)
+    this.setData({
+      [type]: getFileList
+    })
+  },
+
+  //提交事件
+  formSubmit: function ({detail:{value}}) {
+    var warn = ""; //弹框时提示的内容
+    /** 船舶证书 certificatePathList  (必传)  图片处理 START **/
+    let getcertificatePathList = this.data.certificatePathList
+    if(getcertificatePathList.length < 1){
+      warn = "请上传船舶证书图片!";
+    }
+    let certificateNameList = []
+    let certificatePathList = []
+    getcertificatePathList.forEach((element,index) => {
+      certificateNameList.push('图片'+(index+1)+'.'+element.imgUrl.split('.')[1])
+      certificatePathList.push(element.imgUrl)
+    });
+    value.certificateNameList = certificateNameList
+    value.certificatePathList = certificatePathList
+    /** 图片处理 END **/
+
+    /** 安全环保合同 contractPathList  (非必传)  图片处理 START **/
+    let getcontractPathList = this.data.contractPathList
+    if(getcontractPathList.length < 1){
+      // warn = "请上传安全环保合同!";
+    }else{
+      // 上传了安保合同才处理
+      let contractNameList = []
+      let contractPathList = []
+      getcontractPathList.forEach((element,index) => {
+        contractNameList.push('图片'+(index+1)+'.'+element.imgUrl.split('.')[1])
+        contractPathList.push(element.imgUrl)
+      });
+      value.contractNameList = contractNameList
+      value.contractPathList = contractPathList
+    }
+    /** 图片处理 END **/
+
+    if (value.shipNumber == '') {
+      warn = "请输入船舶号";
+    } else if (value.shipType == '') {
+      warn = "请输入船型";
+    } else if (value.shipId == '') {
+      warn = "请选择船主";
+    }
+    if (warn != '') {
+      app.util.checkForm(warn);
+    } else {
+      app.request.POST({
+        url: app.API.shipAdd,
+        params: value,
+        page: this,
+        isLoadingTxt: '提交中...',
+        isSubmitting: true,
+        successFun: true
+      }).then(res => {
+        wx.showToast({
+          title: '新增成功',
+          icon: 'success',
+          duration: 2000,
+          mask:true,
+          complete: function () {
+            setTimeout(() => {
+              wx.navigateBack()
+            }, 1500) //延迟时间  
+          }
+        })
+      })
+    }
+  }
+
+})

+ 0 - 0
otherPages/ship/add.json → pages/ship/add.json


+ 75 - 0
pages/ship/add.wxml

@@ -0,0 +1,75 @@
+<!--pages/ship/add.wxml-->
+<view class="container">
+  <form bindsubmit="formSubmit">
+    <view class="part">
+      <van-field label="船舶号" required name="shipNumber" input-align="right" placeholder="请输入船舶号" bind:focus="hideKeybord" />
+      <van-field label="船型" name="shipType" value="{{ shipType }}" required input-align="right" class="radioHeight fieldAutoHeight">
+        <view slot="input" class="radioHeightBx">
+          <radio-group class="radio-group" bindchange="dangerStatusChange" data-radioType="shipType">
+            <label class="radio" style="margin-right:20rpx;" wx:for="{{ shipTypeArray }}" wx:key="index">
+              <radio value="{{ item.dictValue }}" checked="{{ shipTypeArray[index].dictValue == shipType }}" color="#1989fa" />{{ item.dictLabel }}
+            </label>
+          </radio-group>
+        </view>
+      </van-field>
+      
+      <view class="topItem">
+        <van-field label="船舶证书" required readonly input-align="right" border="{{false}}" />
+        <van-field name="" model:value="" label="" class="uploadBox">
+          <view slot="input" class="uploadboxView">
+            <van-uploader name="" deletable="{{true}}" data-type="certificatePathList" file-list="{{ certificatePathList }}" bind:after-read="afterRead" bind:delete="deleteImg" max-count="6" preview-size="110" />
+          </view>
+        </van-field>
+      </view>
+
+      <van-field label="荷载吨位" name="shipLoad" input-align="right" placeholder="请输入荷载吨位" bind:focus="hideKeybord" />
+      <van-field label="船舶注册帐号" name="registerNumber" input-align="right" placeholder="请输入船舶注册帐号" bind:focus="hideKeybord" />
+      <van-field label="船舶所有人" name="shipOwner" input-align="right" placeholder="请输入船舶所有人" bind:focus="hideKeybord" />
+    </view>
+      
+    <view class="part">
+      <!-- 船主 -->
+      <van-field label="船主" required input-align="right">
+        <view slot="input" style="width: 100%;">
+          <input name="shipId" value='{{shipArray[shipIndex].id}}' hidden='true' />
+          <picker bindchange="bindPickerChange" value="{{shipIndex}}" range="{{shipArray}}" range-key="name" data-pickername='ship'>
+            <view wx:if="{{shipArray[shipIndex].name}}"> {{shipArray[shipIndex].name}}</view>
+            <view wx:else class="selectPlaceholder">{{ defaultText }}</view>
+          </picker>
+        </view>
+        <view slot="right-icon">
+          <van-icon name="arrow" />
+        </view>
+      </van-field>
+
+      <van-field label="船主电话" wx:if="{{shipArray[shipIndex].id}}" name="shipMobile" readonly value="{{ shipMobile }}" placeholder="选择船主自动填入" input-align="right">
+      </van-field>
+    </view>
+
+    <view class="part">
+      <van-field label="船舶身份信息" name="shipIdentity" input-align="right" placeholder="请输入船舶身份信息" bind:focus="hideKeybord" />
+
+      <!-- <van-field label="联系人姓名" name="contactName" input-align="right" placeholder="请输入联系人姓名" bind:focus="hideKeybord" />
+      <van-field label="联系人电话" name="contactPhone" input-align="right" placeholder="请输入联系人电话" bind:focus="hideKeybord" /> -->
+
+      <van-field label="收款单位" name="receiveUnit" input-align="right" placeholder="请输入收款单位" bind:focus="hideKeybord" />
+      <van-field label="收款银行" name="receiveBank" input-align="right" placeholder="请输入收款银行" bind:focus="hideKeybord" />
+      <van-field label="收款账户" name="receiveAccount" input-align="right" placeholder="请输入收款账户" bind:focus="hideKeybord" />
+      <view class="topItem">
+        <van-field label="安全环保合同" readonly input-align="right" border="{{false}}" />
+        <van-field name="" model:value="" label="" class="uploadBox">
+          <view slot="input" class="uploadboxView">
+            <van-uploader name="" deletable="{{true}}" data-type="contractPathList" file-list="{{ contractPathList }}" bind:after-read="afterRead" bind:delete="deleteImg" max-count="6" preview-size="110" />
+          </view>
+        </van-field>
+      </view>
+    </view>
+
+    <view class="submitBtn">
+      <view style="padding-top: 100rpx;">
+        <van-button loading="{{isSubmitting}}" round block disabled="{{isSubmitting}}" loading-text="{{isSubmitting?'提交中...':''}}" type="info" form-type="submit">确定
+      </van-button>
+      </view>
+    </view>
+  </form>
+</view>

+ 0 - 0
otherPages/ship/add.wxss → pages/ship/add.wxss


+ 278 - 0
pages/ship/edit.js

@@ -0,0 +1,278 @@
+// pages/car/edit.js
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    showModal: false,
+    defaultText: '请选择',
+    isSubmitting: false,
+
+    shipTypeArray: [], //船型
+    shipTypeIndex: null,
+
+    shipArray:[], //船主
+    shipIndex:null,
+
+    certificatePathList:[], //船舶证书
+    contractPathList:[],  //安全环保合同
+
+    statusFlag:'true', //是否启用状态    1:启用   2:关闭
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    if (wx.getStorageSync('loginStatus')) {
+      //船型
+      let treeData = app.globalData.treeArr
+      for (const element of treeData) {
+        let arrStr;
+        switch (element.dictValue) {
+          case 'ship_type':
+            arrStr = "shipTypeArray";
+            break;
+        }
+        this.setData({
+          [arrStr]: element.children
+        })
+      }
+      //获取详情
+      var pages = getCurrentPages();
+      var prevPage = pages[pages.length - 2];
+      let getInfo = prevPage.data.resData[options.index]
+
+      //船舶证书 certificatePathList
+      let certificatePathList = []
+      if(getInfo.shipCertificatePath){
+        let unloadImgArr = getInfo.shipCertificatePath.split(',')
+        unloadImgArr.forEach(element => {
+          certificatePathList.push({
+            url     : app.host.BASEIMG_URL+element,
+            imgUrl  : element,
+            isImage : true
+          })
+        });
+      }
+
+      //安全环保合同 contractPathList
+      let contractPathList = []
+      if(getInfo.contractPath){
+        let unloadImgArr = getInfo.contractPath.split(',')
+        unloadImgArr.forEach(element => {
+          contractPathList.push({
+            url     : app.host.BASEIMG_URL+element,
+            imgUrl  : element,
+            isImage : true
+          })
+        });
+      }
+
+      this.setData({
+        info                : getInfo,
+        shipId              : getInfo.shipId ? getInfo.shipId : wx.getStorageSync('id'),
+        shipType            : getInfo.shipType,
+        certificatePathList : certificatePathList,
+        contractPathList    : contractPathList
+      })
+      //获取船主下拉列表
+      this.loadUserData()
+
+    } else {
+      wx.switchTab({
+        url: '/pages/center/index',
+      })
+    }
+  },
+
+  //船主
+  loadUserData:function(){
+    app.request.GET({
+      url: app.API.roleUser,
+      params: {
+        roleName : '船主',
+      },
+      page: this,
+      successFun: true
+    }).then(res => {
+      this.setData({
+        shipArray : res.data.data,
+        shipIndex : app.util.getDicIndex(res.data.data, this.data.shipId, 'id')
+      })
+      if(this.data.shipId){
+        this.setData({
+          shipMobile : this.data.shipArray[this.data.shipIndex].phone,
+        })
+      }
+    })
+  },
+
+  //下拉选择
+  bindPickerChange: function (e) { 
+    let { pickername } = e.target.dataset
+    let getIndex = pickername + 'Index'
+    app.util.getPickerIndex(this, getIndex, e);
+    switch (pickername) {
+      case 'ship': //选择船主
+        this.setData({
+          shipMobile : this.data.shipArray[this.data.shipIndex].phone,
+        })
+        break;
+    }
+  },
+
+  // 单选
+  dangerStatusChange: function (e) {
+    this.setData({
+      [e.currentTarget.dataset.radiotype]: e.detail.value
+    })
+  },
+  //多选
+  checkboxChange: function (e) {
+    this.setData({
+      [e.currentTarget.dataset.checkboxtype]: e.detail
+    })
+  },
+
+  //图片上传
+  afterRead:function(event){
+    const { file } = event.detail;
+    const { type } = event.currentTarget.dataset
+    app.request.uploadDIY({
+      url: app.API.uploadImgMap,
+      page: this,
+      filePaths:file.url,
+      setfiled:'file',
+      params: {},
+      //isToken: false,
+      isLoading: false,
+      successFun: true
+    }).then(res => {
+        const imgArray = this.data[type];
+        imgArray.push({
+          ...file,
+          url: app.host.BASEIMG_URL + JSON.parse(res.data).data.imageFile,
+          imgUrl: JSON.parse(res.data).data.imageFile
+        });
+        this.setData({
+          [type]: imgArray
+        });
+    })
+  },
+
+  // 删除图片
+  deleteImg: function (event) {
+    const { type } = event.currentTarget.dataset
+    let getFileList = this.data[type];
+    getFileList.splice(event.detail.index, 1)
+    this.setData({
+      [type]: getFileList
+    })
+  },
+
+  //开关
+  onChange(e) {
+    let { switchType } = e.currentTarget.dataset
+    let number = 0
+    if(e.detail=='1'){
+      if(this.data.blackSwitch=='1'){
+        number = number+1
+      }
+      if(this.data.whiteSwitch=='1'){
+        number = number+1
+      }
+      if(this.data.internal=='1'){
+        number = number+1
+      }
+      if(number<1){
+        // 需要手动对 checked 状态进行更新
+        this.setData({ 
+          [switchType]: e.detail 
+        });
+      }else{
+        app.util.checkForm('黑白名单及内部车辆最多只能开启一项');
+      }
+    }else{
+      this.setData({ 
+        [switchType]: e.detail 
+      });
+    }
+  
+  },
+
+  //提交事件
+  formSubmit: function ({detail:{value}}) {
+    var warn = ""; //弹框时提示的内容
+    /** 船舶证书 certificatePathList  (必传)  图片处理 START **/
+    let getcertificatePathList = this.data.certificatePathList
+    if(getcertificatePathList.length < 1){
+      warn = "请上传船舶证书图片!";
+    }
+    let certificateNameList = []
+    let certificatePathList = []
+    getcertificatePathList.forEach((element,index) => {
+      certificateNameList.push('图片'+(index+1)+'.'+element.imgUrl.split('.')[1])
+      certificatePathList.push(element.imgUrl)
+    });
+    value.certificateNameList = certificateNameList
+    value.certificatePathList = certificatePathList
+    /** 图片处理 END **/
+
+    /** 安全环保合同 contractPathList  (非必传)  图片处理 START **/
+    let getcontractPathList = this.data.contractPathList
+    if(getcontractPathList.length < 1){
+      // warn = "请上传安全环保合同!";
+    }else{
+      // 上传了安保合同才处理
+      let contractNameList = []
+      let contractPathList = []
+      getcontractPathList.forEach((element,index) => {
+        contractNameList.push('图片'+(index+1)+'.'+element.imgUrl.split('.')[1])
+        contractPathList.push(element.imgUrl)
+      });
+      value.contractNameList = contractNameList
+      value.contractPathList = contractPathList
+    }
+    /** 图片处理 END **/
+
+    if (value.shipNumber == '') {
+      warn = "请输入船舶号";
+    } else if (value.shipType == '') {
+      warn = "请输入船型";
+    } else if (value.shipId == '') {
+      warn = "请选择船主";
+    } else if (value.statusFlag == '') {
+      warn = "请选择是否启用";
+    } 
+    value.status = value.statusFlag=='true'?'1':'2'
+
+    if (warn != '') {
+      app.util.checkForm(warn);
+    } else {
+      app.request.POST({
+        url: app.API.shipEdit,
+        params: value,
+        page: this,
+        isLoadingTxt: '提交中...',
+        isSubmitting: true,
+        successFun: true
+      }).then(res => {
+        wx.showToast({
+          title: '修改成功',
+          icon: 'success',
+          duration: 2000,
+          mask:true,
+          complete: function () {
+            setTimeout(() => {
+              wx.navigateBack()
+            }, 1500) //延迟时间  
+          }
+        })
+      })
+    }
+  }
+
+})

+ 0 - 0
otherPages/ship/edit.json → pages/ship/edit.json


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott