Explorar o código

船舶,预约,更换

shasha hai 14 horas
pai
achega
75549246dc
Modificáronse 72 ficheiros con 3427 adicións e 499 borrados
  1. 8 2
      app.json
  2. 1 1
      otherPages/loadArrive/index.less
  3. 1 1
      otherPages/loadArrive/index.wxss
  4. 0 22
      otherPages/parkConfig/index.json
  5. 0 11
      otherPages/parkConfig/index.less
  6. 0 139
      otherPages/parkConfig/index.wxml
  7. 0 11
      otherPages/parkConfig/index.wxss
  8. 151 0
      otherPages/ship/add.js
  9. 13 0
      otherPages/ship/add.json
  10. 53 0
      otherPages/ship/add.wxml
  11. 17 0
      otherPages/ship/add.wxss
  12. 225 0
      otherPages/ship/edit.js
  13. 14 0
      otherPages/ship/edit.json
  14. 40 0
      otherPages/ship/edit.wxml
  15. 17 0
      otherPages/ship/edit.wxss
  16. 47 214
      otherPages/ship/index.js
  17. 15 0
      otherPages/ship/index.json
  18. 74 0
      otherPages/ship/index.wxml
  19. 22 0
      otherPages/ship/index.wxss
  20. 48 0
      otherPages/ship/info.js
  21. 16 0
      otherPages/ship/info.json
  22. 17 0
      otherPages/ship/info.wxml
  23. 21 0
      otherPages/ship/info.wxss
  24. 361 0
      pages/appointReplace/index.js
  25. 15 0
      pages/appointReplace/index.json
  26. 48 0
      pages/appointReplace/index.less
  27. 103 0
      pages/appointReplace/index.wxml
  28. 64 0
      pages/appointReplace/index.wxss
  29. 115 0
      pages/appointReplace/info.js
  30. 16 0
      pages/appointReplace/info.json
  31. 1 0
      pages/appointReplace/info.less
  32. 51 0
      pages/appointReplace/info.wxml
  33. 2 2
      pages/deliveryConfirm/info.js
  34. 1 1
      pages/deliveryConfirm/info.wxml
  35. 3 3
      pages/index/add.js
  36. 1 0
      pages/index/add.wxml
  37. 1 1
      pages/index/edit.js
  38. 1 0
      pages/index/edit.wxml
  39. 48 48
      pages/index/index.js
  40. 9 7
      pages/index/index.wxml
  41. 247 0
      pages/index/replace.js
  42. 19 0
      pages/index/replace.json
  43. 76 0
      pages/index/replace.wxml
  44. 209 0
      pages/index/replace.wxss
  45. 1 1
      pages/queueCar/adjustOrder.js
  46. 6 6
      pages/register/indexShip.js
  47. 2 2
      pages/register/indexShip.wxml
  48. 1 2
      pages/register/indexShip.wxss
  49. 2 1
      pages/reservationChargestation/add.js
  50. 1 0
      pages/reservationChargestation/add.wxml
  51. 1 0
      pages/reservationChargestation/edit.js
  52. 1 0
      pages/reservationChargestation/edit.wxml
  53. 3 0
      pages/reservationLoadAppoint/add.wxml
  54. 5 4
      pages/reservationLoadAppoint/edit.js
  55. 3 0
      pages/reservationLoadAppoint/edit.wxml
  56. 2 0
      pages/reservationPipe/add.wxml
  57. 5 4
      pages/reservationPipe/edit.js
  58. 2 0
      pages/reservationPipe/edit.wxml
  59. 300 0
      pages/reservationStone/add.js
  60. 19 0
      pages/reservationStone/add.json
  61. 72 0
      pages/reservationStone/add.wxml
  62. 209 0
      pages/reservationStone/add.wxss
  63. 276 0
      pages/reservationStone/edit.js
  64. 19 0
      pages/reservationStone/edit.json
  65. 73 0
      pages/reservationStone/edit.wxml
  66. 209 0
      pages/reservationStone/edit.wxss
  67. 2 2
      pages/signReview/info.js
  68. 1 1
      pages/signReview/info.wxml
  69. 2 2
      pages/weighingRecord/info.js
  70. 1 1
      pages/weighingRecord/info.wxml
  71. 5 1
      pages/workstand/index.js
  72. 13 9
      utils/api.js

+ 8 - 2
app.json

@@ -7,6 +7,9 @@
     "pages/index/info",
     "pages/index/signFor",
     "pages/index/sign",
+    "pages/index/replace",
+    "pages/appointReplace/index",
+    "pages/appointReplace/info",
     "pages/reservationTemp/add",
     "pages/reservationTemp/edit",
     "pages/reservationLoadAppoint/add",
@@ -71,7 +74,6 @@
         "reportFault/index",
         "reportFault/info",
         "reportFault/report",
-        "parkConfig/index",
         "loadArrive/index",
         "loadArrive/add",
         "loadArrive/edit",
@@ -80,7 +82,11 @@
         "loadAppoint/info",
         "loadAppoint/allocation",
         "loadAppoint/dispatch",
-        "loadAppoint/sign"
+        "loadAppoint/sign",
+        "ship/index",
+        "ship/add",
+        "ship/edit",
+        "ship/info"
       ],
       "independent": false
     }

+ 1 - 1
otherPages/loadArrive/index.less

@@ -1,7 +1,7 @@
 /* pages/loadArrive/index.wxss */
 page{
   --cell-vertical-padding:12rpx;
-  --cell-horizontal-padding:0;
+  // --cell-horizontal-padding:0;
   --cell-background-color:transparent;
 }
 .bottomBtn{

+ 1 - 1
otherPages/loadArrive/index.wxss

@@ -1,7 +1,7 @@
 /* pages/loadArrive/index.wxss */
 page {
   --cell-vertical-padding: 12rpx;
-  --cell-horizontal-padding: 0;
+  /* --cell-horizontal-padding: 0; */
   --cell-background-color: transparent;
 }
 .bottomBtn {

+ 0 - 22
otherPages/parkConfig/index.json

@@ -1,22 +0,0 @@
-{
-  "navigationBarTitleText": "报障",
-  "backgroundTextStyle": "dark",
-  "enablePullDownRefresh": true,
-  "usingComponents": {
-    "van-notice-bar": "@vant/weapp/notice-bar/index",
-    "van-tab": "@vant/weapp/tab/index",
-    "van-tabs": "@vant/weapp/tabs/index",
-    "van-tag": "@vant/weapp/tag/index",
-    "van-sticky": "@vant/weapp/sticky/index",
-    "van-search": "@vant/weapp/search/index",
-    "van-icon": "@vant/weapp/icon/index",
-    "van-empty": "@vant/weapp/empty/index",
-    "van-popup": "@vant/weapp/popup/index",
-    "van-field": "@vant/weapp/field/index",
-    "van-button": "@vant/weapp/button/index",
-    "van-loading": "@vant/weapp/loading/index",
-    "van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
-    "van-dropdown-item": "@vant/weapp/dropdown-item/index",
-    "van-skeleton": "@vant/weapp/skeleton/index"
-  }
-}

+ 0 - 11
otherPages/parkConfig/index.less

@@ -1,11 +0,0 @@
-/* pages/parkConfig/index.wxss */
-.container{
-  padding-bottom: 120rpx;
-}
-.bottomBtn{
-  padding-top: 20rpx;
-  text-align: right;
-}
-.bottomBtn button {
-  margin-left: 0 !important;
-}

+ 0 - 139
otherPages/parkConfig/index.wxml

@@ -1,139 +0,0 @@
-<!--pages/parkConfig/index.wxml-->
-<view class="container listMain">
-  <block wx:if="{{loginStatus}}">
-    <view url="" class="addBtn" catch:tap="changeAdd" hover-class="none" catchtouchmove="buttonMove" bindtouchstart="buttonStart" bindtouchend="buttonEnd" style="top:{{buttonTop}}px;left:{{buttonLeft}}px;" wx:if="{{roleCodeList == 'sale'}}">
-      <van-icon name="plus" size="30px" />
-    </view>
-    <van-sticky>
-      <view class="topSeach">
-        <view class="rightBox" style="position: relative;">
-          <van-search value="{{ searchVal }}" shape="round" placeholder="请输入订单编号/客户名称/货品名称" bind:change="onChange" bind:search="onSearch" bind:cancel="onCancel" use-action-slot>
-            <view slot="label" style="width:160rpx;margin-right: 20rpx;">
-                  <van-field label="" input-align="center" style="width: 100%;">
-                    <view slot="input" style="width: 100%;">
-                      <input name="transactionType" value='{{appointmentTypeArray[appointmentTypeIndex].dictValue}}' hidden='true' />
-                      <picker bindchange="bindPickerChange" value="{{appointmentTypeIndex}}" range="{{appointmentTypeArray}}" range-key="dictLabel" data-pickername='appointmentType'>
-                        <view wx:if="{{appointmentTypeArray[appointmentTypeIndex].dictLabel}}" style="font-size: 12px;white-space: nowrap;"> {{appointmentTypeArray[appointmentTypeIndex].dictLabel}}</view>
-                        <view wx:else class="selectPlaceholder" style="font-size: 12px;white-space: nowrap;">{{defaultText}}</view>
-                      </picker>
-                    </view>
-                    <view slot="right-icon">
-                      <van-icon name="arrow-down" />
-                    </view>
-                  </van-field>
-                </view>
-            <van-icon slot="action" class-prefix="iconfont" name="arrow3-right_fill" size="28px" color="#4B70EA" bind:tap="toSearch" />
-          </van-search>
-        </view>
-      </view>
-    </van-sticky>
-
-    <view class="width710">
-      <block wx:if="{{!requestStatu}}">
-        <block wx:if="{{resData.length>0}}">
-          <block wx:for="{{resData}}" wx:key="index">
-            <navigator url="info?id={{item.id}}&name={{item.name}}&account={{item.account}}&index={{index}}" class="listItem">
-              <view class="title van-ellipsis">
-                <van-icon class='iconfont' name='/images/codeNumber.png' size="36rpx"></van-icon><text>{{item.orderNumber}}</text>
-                <text wx:if="{{item.appointmentType}}" class="status appointmentType{{item.appointmentType}}">{{item.appointmentTypeName}}</text>
-              </view>
-              <view class="info">
-                <text>客户名称:{{item.customerName?item.customerName:'未填写'}}</text>
-              </view>
-              <view class="info">
-                <text decode="{{true}}">货品信息:{{item.goodsName?item.goodsName:'未填写'}}/{{item.goodsModel?item.goodsModel:'未填写'}}</text>
-              </view>
-              <view class="info">
-                  <text>订单编号:{{item.orderNumber?item.orderNumber:'未填写'}}</text>
-                </view>
-              <view class="time"><text>提货时间:{{item.confStartTime?filters.tosubStr(item.confStartTime,0,16):''}} 至 {{item.confEndTime?filters.tosubStr(item.confEndTime,0,16):''}}</text></view>
-              <view class="bottomBtn" wx:if="{{ ( roleCodeList == 'sale' && item.appointmentType == '0') || ((roleCodeList == 'customer' || roleCodeList == 'bizAdmin' ) && item.appointmentType == '1') || (roleCodeList == 'sale' && item.appointmentType == '2') || (roleCodeList == 'sale' && (item.appointmentType == '3' || item.appointmentType == '4')) || (roleCodeList == 'bizAdmin' && item.appointmentType == '5') || (roleCodeList == 'dispatcher' && (item.appointmentType == '3' || item.appointmentType == '4' || item.appointmentType == '8'))}}">
-                <van-button type="info" size="small" data-url="edit?index={{index}}" catchtap="toLink" style="margin-right: 20rpx;" wx:if="{{roleCodeList == 'sale' && item.appointmentType == '0'}}">修改</van-button>
-                <van-button type="danger" size="small" data-id="{{item.id}}" data-order-number="{{item.orderNumber}}" catchtap="delFun" style="margin-right: 20rpx;" wx:if="{{roleCodeList == 'sale' && item.appointmentType == '0'}}">删除</van-button>
-                <van-button type="primary" size="small" data-id="{{item.id}}" data-order-number="{{item.orderNumber}}" catchtap="orderSubmit" wx:if="{{roleCodeList == 'sale' && item.appointmentType == '0'}}">提交</van-button>
-                <van-button type="warning" size="small" data-url="/pages/sign/index?id={{item.id}}" catchtap="toLink" wx:if="{{(roleCodeList == 'customer' || roleCodeList == 'bizAdmin' ) && item.appointmentType == '1'}}">签字确认</van-button>
-                <van-button type="primary" size="small" data-id="{{item.id}}" data-order-number="{{item.orderNumber}}" catchtap="comform" wx:if="{{roleCodeList == 'sale' && item.appointmentType == '2'}}">订单确认</van-button>
-                <van-button type="danger" size="small" data-id="{{item.id}}" data-order-number="{{item.orderNumber}}" catchtap="endFun" wx:if="{{roleCodeList == 'sale' && (item.appointmentType == '3' || item.appointmentType == '4')}}">结束</van-button>
-                <van-button type="primary" size="small" data-id="{{item.id}}" data-approve-type="one" catchtap="showPopup" wx:if="{{roleCodeList == 'bizAdmin' && item.appointmentType == '5'}}">审核</van-button>
-
-                <van-button type="primary" size="small" data-url="orderloadAdd?orderId={{item.id}}&deliveryTimeId={{item.deliveryTimeId}}&orderNumber={{item.orderNumber}}&confStartTime={{item.confStartTime}}&confEndTime={{item.confEndTime}}" catchtap="toLink" wx:if="{{roleCodeList == 'dispatcher' && (item.appointmentType == '3' || item.appointmentType == '4' || item.appointmentType == '8')}}" custom-style="margin-right:30rpx;">调度</van-button>
-
-                <van-button type="info" size="small" data-order-id="{{ item.id }}" catchtap="orderLoadShow" wx:if="{{roleCodeList == 'dispatcher' && (item.appointmentType == '3' || item.appointmentType == '4' || item.appointmentType == '8')}}">调度列表</van-button>
-
-              </view>
-            </navigator>
-          </block>
-          <!-- 底部加载动画 -->
-          <view class='more'>
-            <block wx:if="{{more}}">
-              <van-loading size="24px" color="#1989fa">加载中...</van-loading>
-            </block>
-            <block wx:else>{{nomore}}</block>
-          </view>
-          <view style="height: 200rpx;"> </view>
-        </block>
-        <block wx:else>
-          <van-empty description="未搜索到相关记录" image="/images/null5.png" />
-        </block>
-      </block>
-    </view>
-  </block>
-  <block wx:else>
-    <view>
-      <van-empty image="/images/loginNullTemp.png">
-        <view slot="description" style="text-align: center;">
-          <text style="display:block;margin-bottom: 20rpx;">您还未登录,登录后查看更多~</text>
-          <van-button type="info" bindtap="toLogin">立即登录</van-button>
-        </view>
-      </van-empty>
-    </view>
-  </block>
-</view>
-
-<!-- 弹窗 -->
-<van-popup show="{{ show }}" position="bottom" round closeable custom-style="width:100%;padding:0rpx 30rpx 160rpx;" bind:close="onClose">
-  <view style="height: 90rpx;line-height: 90rpx;text-align: center;">审核</view>
-  <form bindsubmit="formSubmit">
-    <view class="part">
-      <view class="height20"> </view>
-      <view class="height20"> </view>
-      <input name="id" value='{{id}}' hidden='true' />
-      <van-field label="审核结果" name="auditFlag" value="{{ auditFlag }}" required input-align="right" class="radioHeight fieldAutoHeight">
-        <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" />通过
-            </label>
-            <label class="radio">
-              <radio value="true" checked="{{auditFlag=='true'}}" 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>
-    </view>
-
-    <view class="submitBtn">
-      <view style="padding-top: 60rpx;">
-        <van-button block round type="info" form-type="submit" color="#0396FF">确认</van-button>
-      </view>
-    </view>
-  </form>
-</van-popup>
-
-<van-popup show="{{ orderLoadShow }}" position="bottom" round closeable custom-style="width:100%;" bind:close="orderLoadClose">
-  <view class="orderLoadBox">
-    <view class="title">调度列表</view>
-    <scroll-view class="dialogUser" scroll-y bindscrolltolower="bindscrolltolowerFun">
-      <block wx:for="{{ saleArr }}" wx:key="index">
-        <view class="saleItem">
-          <view class="title"><view><van-icon name="location-o" size="18"/> {{ item.loadPoint }}</view> <van-button type="danger" size="mini" data-id="{{item.id}}" data-load-point="{{item.loadPoint}}" catchtap="delOrderFun">删除</van-button> </view>
-          <view class="time"><van-icon name="clock-o" size="18"/> {{ item.beginTime }}~{{ item.endTime }}</view>
-        </view>
-      </block>
-    </scroll-view>
-  </view>
-</van-popup>
-
-
-<wxs module="filters" src="../../utils/filter.wxs"></wxs>

+ 0 - 11
otherPages/parkConfig/index.wxss

@@ -1,11 +0,0 @@
-/* pages/parkConfig/index.wxss */
-.container {
-  padding-bottom: 120rpx;
-}
-.bottomBtn {
-  padding-top: 20rpx;
-  text-align: right;
-}
-.bottomBtn button {
-  margin-left: 0 !important;
-}

+ 151 - 0
otherPages/ship/add.js

@@ -0,0 +1,151 @@
+// 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) //延迟时间  
+          }
+        })
+      })
+    }
+  }
+
+})

+ 13 - 0
otherPages/ship/add.json

@@ -0,0 +1,13 @@
+{
+  "navigationBarTitleText": "新增船舶信息",
+  "navigationBarTextStyle": "white",
+  "navigationBarBackgroundColor": "#0396FF",
+  "usingComponents": {
+    "car-num-input": "/components/CarNumInput/index",
+    "van-icon": "@vant/weapp/icon/index",
+    "van-cell-group": "@vant/weapp/cell-group/index",
+    "van-field": "@vant/weapp/field/index",
+    "van-uploader": "@vant/weapp/uploader/index",
+    "van-button": "@vant/weapp/button/index"
+  }
+}

+ 53 - 0
otherPages/ship/add.wxml

@@ -0,0 +1,53 @@
+<!--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>

+ 17 - 0
otherPages/ship/add.wxss

@@ -0,0 +1,17 @@
+/* pages/car/add.wxss */
+.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;
+}

+ 225 - 0
otherPages/ship/edit.js

@@ -0,0 +1,225 @@
+// 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) //延迟时间  
+          }
+        })
+      })
+    }
+  }
+
+})

+ 14 - 0
otherPages/ship/edit.json

@@ -0,0 +1,14 @@
+{
+  "navigationBarTitleText": "修改船舶信息",
+  "navigationBarTextStyle": "white",
+  "navigationBarBackgroundColor": "#0396FF",
+  "usingComponents": {
+    "car-num-input": "/components/CarNumInput/index",
+    "van-icon": "@vant/weapp/icon/index",
+    "van-cell-group": "@vant/weapp/cell-group/index",
+    "van-field": "@vant/weapp/field/index",
+    "van-uploader": "@vant/weapp/uploader/index",
+    "van-button": "@vant/weapp/button/index",
+    "van-switch": "@vant/weapp/switch/index"
+  }
+}

+ 40 - 0
otherPages/ship/edit.wxml

@@ -0,0 +1,40 @@
+<!--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>

+ 17 - 0
otherPages/ship/edit.wxss

@@ -0,0 +1,17 @@
+/* pages/car/edit.wxss */
+.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;
+}

+ 47 - 214
otherPages/parkConfig/index.js → otherPages/ship/index.js

@@ -1,4 +1,4 @@
-// pages/salesOrderMan/index.js
+// pages/car/index.js
 const app = getApp()
 var startPoint
 Page({
@@ -9,26 +9,16 @@ Page({
   data: {
     str:'&emsp;',
     str2: '&ensp;',
-
-    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') : '',
+    roleCodeList: wx.getStorageSync('roleCodeList') ? wx.getStorageSync('roleCodeList') : [],
     searchVal: '',
-
-    orderStatusArray: [{
-      dictValue: "",
-      dictLabel: "全部状态"
-    }],
-    orderStatusIndex: 0,
-
     //分页
     limit: 10,
     requestStatu: '加载中...',
@@ -40,48 +30,16 @@ Page({
     resData:[],
 
     show: false,
-    auditFlag:true,
-    orderReason:'',//审核备注
-
-    orderLoadShow:false, //调度列表弹窗
-    orderId:'',
-
-    requestStatu2: '加载中...',
-    page2: 1,
-    totalPages2: 1,
-    more2: false,
-    nomore2: '',
-    saleArr:[],
+    auditFlag:true
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-    //订单状态
-    let treeData = app.globalData.treeArr
-    for (const element of treeData) {
-      let arrStr;
-      switch (element.dictValue) {
-        case 'order_status':
-          arrStr = "orderStatusArray";
-          break;
-      }
-      let getArray =[{
-        dictValue: "",
-        dictLabel: "全部状态"
-      }]
-      this.setData({
-        [arrStr]: getArray.concat(element.children)
-      })
-    }
-
     this.setData({
       safeAreaHeight: app.globalData.windowInfo.screenHeight - app.globalData.systemInfo.safeArea.bottom
     })
-
-    // 使用选择器选择节点
-    this.getFilterHeight()
   //获取页面高度设置新增按钮的初始位置
     var that = this;
     wx.getSystemInfo({
@@ -97,21 +55,6 @@ Page({
     })
   },
 
-  //获取顶部筛选区域的高度
-  getFilterHeight:function(){
-    let that = this;
-    // 使用顶部筛选高度选择器选择节点的高度
-    const query = wx.createSelectorQuery();
-    query.select('.topSeach').boundingClientRect(function (rect) {
-      if(rect){
-        that.setData({
-          filterWidth: rect.width,
-          filterHeight: rect.height,
-        });
-      }
-    }).exec();
-  },
-
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
@@ -123,30 +66,15 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow() {
-    const roleCodeList = wx.getStorageSync('roleCodeList')
-    let loginStatus = wx.getStorageSync('loginStatus')
-    this.setData({
-      searchVal: '',
-      roleCodeList: roleCodeList ? roleCodeList : '',
-      loginStatus: loginStatus ? loginStatus : false
-    })
-
     this.setData({
       requestStatu:'加载中...',
+      loginStatus: wx.getStorageSync('loginStatus') ? wx.getStorageSync('loginStatus') : false
     })
     if (wx.getStorageSync('loginStatus')) {
       this.getListFun();
     }
   },
 
-  //下拉选择
-  bindPickerChange: function (e) { //下拉菜单
-    //方法一动态的
-    let getIndex = e.target.dataset.pickername + 'Index'
-    app.util.getPickerIndex(this, getIndex, e);
-    this.getListFun()
-  },
-
   //搜索框请求S
   onChange(e) {
     this.setData({
@@ -172,91 +100,37 @@ Page({
       page: 1
     })
     let params = {
-      current: this.data.page,
-      size: this.data.limit,
-      searchKey:this.data.searchVal,
-      orderStatus:this.data.orderStatusArray[this.data.orderStatusIndex].dictValue
+      current   : this.data.page,
+      size      : this.data.limit,
+      shipNumber: this.data.searchVal
     }
     app.request.pageFirst({
-      url: app.API.orderList,
+      url: app.API.bizvehicleList,
       page: this,
       params: params,
     })
   },
 
-  //调度列表显示
-  orderLoadShow:function(event){
-    let { orderId } = event.currentTarget.dataset
-    this.setData({
-      orderLoadShow:true,
-      orderId:orderId
-    })
-    this.getRecordListFun()
-  },
-
-  //调度列表隐藏
-  orderLoadClose:function(){
-    this.setData({
-      orderLoadShow:false
-    })
-  },
-
-  //装载车调度列表
-  getRecordListFun: function () {
-    this.setData({
-      page2: 1
-    })
-    let params = {
-      current: this.data.page2,
-      size: this.data.limit,
-      orderId:this.data.orderId
-    }
-    app.request.pageFirst({
-      url: app.API.bizorderloadList,
-      page: this,
-      params: params,
-      Array:'saleArr',
-      pageNo:'page2',
-      totalPages:'totalPages2',
-      more: 'more2',
-      nomore:'nomore2',
-      requestStatu:'requestStatu2',
+  //页面跳转
+  toLink: function (e) {
+    let { url } = e.currentTarget.dataset
+    wx.navigateTo({
+      url: url
     })
   },
-  //装载车调度滑动加载列表
-  bindscrolltolowerFun() {
-    this.data.page2++;
-    let params = {
-      current: this.data.page2,
-      size: this.data.limit,
-      orderId:this.data.orderId
-    }
-    app.request.pageOther({
-      url: app.API.api.bizorderloadList,
-      page: this,
-      Array:'saleArr',
-      params: params,
-      loadType:true, //加载类型,是否是下拉加载
-      pageNo:'page2',
-      totalPages:'totalPages2',
-      more: 'more2',
-      nomore:'nomore2',
-      requestStatu:'requestStatu2',
-    });
-  },
 
-  //删除调度记录
-  delOrderFun: function (e) {
+  //删除
+  delFun: function (e) {
     let _this = this
-    let { id, loadPoint } = e.currentTarget.dataset
+    let { id, licensePlate } = e.currentTarget.dataset
     wx.showModal({
       title: '提示!',
-      content: `删除【${loadPoint}】调度后不可恢复。确定要删除吗?`,
+      content: `删除【${licensePlate}】后不可恢复。确定要删除吗?`,
       confirmColor: '#FF5B5B',
       success: function (res) {
         if (res.confirm) {
           app.request.POST({
-            url: app.API.orderloadDelete,
+            url: app.API.bizvehicleDelete,
             params: [{
               id: id
             }],
@@ -270,8 +144,6 @@ Page({
               duration: 1000,
               mask: true
             })
-            //_this.orderLoadClose()
-            _this.getRecordListFun()
             _this.getListFun(); //刷新列表
           })
         } else if (res.cancel) {
@@ -281,35 +153,29 @@ Page({
     })
   },
 
-  //页面跳转
-  toLink: function (e) {
-    let { url } = e.currentTarget.dataset
-    wx.navigateTo({
-      url: url
-    })
-  },
-
-  //删除
-  delFun: function (e) {
+  //启用关闭车辆
+  changeStatus: function (e) {
     let _this = this
-    let { id, orderNumber } = e.currentTarget.dataset
+    let { id, licensePlate, status } = e.currentTarget.dataset
+    let text = status== '1'?'开启':'关闭'
     wx.showModal({
       title: '提示!',
-      content: `删除【${orderNumber}】后不可恢复。确定要删除吗?`,
+      content: `${text}【${licensePlate}】车辆?`,
       confirmColor: '#FF5B5B',
       success: function (res) {
         if (res.confirm) {
           app.request.POST({
-            url: app.API.orderDelete,
-            params: [{
-              id: id
-            }],
+            url: app.API.bizvehicleEdit,
+            params: {
+              id: id,
+              status:status
+            },
             page: _this,
-            isLoadingTxt: '删除中...',
+            isLoadingTxt: '操作中...',
             successFun: true
           }).then(res => {
             wx.showToast({
-              title: '删除成功',
+              title: '操作成功',
               icon: 'success',
               duration: 1000,
               mask: true
@@ -359,11 +225,12 @@ Page({
 
   // 审核S
   showPopup(e) {
-    let { id } = e.currentTarget.dataset
+    let { id, approveType } = e.currentTarget.dataset
     this.setData({
       show: true,
-      orderReason: '',
+      refuseReason: '',
       id: id,
+      approveType: approveType
     });
     /*wx.navigateTo({
       url: '/pages/appointment/review?id='+e.currentTarget.dataset.id
@@ -373,7 +240,6 @@ Page({
     this.setData({
       show: false,
       auditFlag:'false',
-      orderReason:'',
       id: ''
     });
   },
@@ -392,9 +258,11 @@ Page({
   formSubmit: function (e) {
     let formData = e.detail.value;
     var warn = ""; //弹框时提示的内容
-    if (formData.auditFlag=='true' && formData.orderReason == '') {
-      warn = "审核不通过时备注不能为空!";
-    }
+    // if (formData.auditFlag == '') {
+    //   warn = "选择审核结果!";
+    // } else if (formData.auditFlag == '2' && formData.appointmentReason == '') {
+    //   warn = "审核不通过时备注不能为空!";
+    // }
     formData.auditFlag = formData.auditFlag=='true'
     if (warn != '') {
       app.util.checkForm(warn);
@@ -454,40 +322,6 @@ Page({
     })
   },
 
-  //提交
-  orderSubmit: function (e) {
-    let _this = this
-    let { id, orderNumber } = e.currentTarget.dataset
-    wx.showModal({
-      title: '提示!',
-      content: `确认提交【${orderNumber}】订单?`,
-      confirmColor: '#FF5B5B',
-      success: function (res) {
-        if (res.confirm) {
-          app.request.POST({
-            url: app.API.orderSubmit,
-            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) {
-
-        }
-      }
-    })
-  },
-
   //扫码预约申请
   changeAdd() {
     wx.navigateTo({
@@ -529,13 +363,12 @@ Page({
   onReachBottom: function () {
     this.data.page++;
     let params = {
-      current: this.data.page,
-      size: this.data.limit,
-      searchKey:this.data.searchVal,
-      orderStatus:this.data.orderStatusArray[this.data.orderStatusIndex].dictValue
+      current   : this.data.page,
+      size      : this.data.limit,
+      shipNumber: this.data.searchVal
     }
     app.request.pageOther({
-      url: app.API.bizparkconfigPage,
+      url: app.API.bizvehicleList,
       page: this,
       params: params,
       loadType: true //加载类型,是否是下拉加载
@@ -556,8 +389,8 @@ Page({
     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 + 50 >= this.data.windowWidth) {
+      buttonLeft = this.data.windowWidth - 50;
     }
     if (buttonLeft <= 0) {
       buttonLeft = 0;
@@ -565,8 +398,8 @@ Page({
     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;
+    if (buttonTop + 50 + 48 + this.data.safeAreaHeight >= this.data.windowHeight) {
+      buttonTop = this.data.windowHeight - 50 - 48 - this.data.safeAreaHeight;
     }
     this.setData({
       buttonTop: buttonTop,

+ 15 - 0
otherPages/ship/index.json

@@ -0,0 +1,15 @@
+{
+  "navigationBarTitleText": "车辆管理",
+  "backgroundTextStyle": "dark",
+  "enablePullDownRefresh": true,
+  "usingComponents": {
+    "van-sticky": "@vant/weapp/sticky/index",
+    "van-search": "@vant/weapp/search/index",
+    "van-icon": "@vant/weapp/icon/index",
+    "van-empty": "@vant/weapp/empty/index",
+    "van-popup": "@vant/weapp/popup/index",
+    "van-field": "@vant/weapp/field/index",
+    "van-button": "@vant/weapp/button/index",
+    "van-loading": "@vant/weapp/loading/index"
+  }
+}

+ 74 - 0
otherPages/ship/index.wxml

@@ -0,0 +1,74 @@
+<!--pages/car/index.wxml-->
+<view class="container listMain">
+  <block wx:if="{{loginStatus}}">
+    <navigator url="add" class="addBtn" hover-class="none" catchtouchmove="buttonMove" bindtouchstart="buttonStart" bindtouchend="buttonEnd" style="top:{{buttonTop}}px;left:{{buttonLeft}}px;">
+      <van-icon name="plus" size="30px" />
+    </navigator>
+    <van-sticky>
+      <view class="topSeach">
+        <view class="rightBox" style="position: relative;">
+          <van-search value="{{ searchVal }}" shape="round" placeholder="请输入船舶号" bind:change="onChange" bind:search="onSearch" bind:cancel="onCancel" use-action-slot>
+            <van-icon slot="action" class-prefix="iconfont" name="arrow3-right_fill" size="28px" color="#4B70EA" bind:tap="toSearch" />
+          </van-search>
+        </view>
+      </view>
+    </van-sticky>
+    <view class="height20"></view>
+    <view class="width710">
+      <block wx:if="{{!requestStatu}}">
+        <block wx:if="{{resData.length>0}}">
+          <block wx:for="{{resData}}" wx:key="index">
+            <navigator url="info?id={{item.id}}&index={{index}}" class="listItem">
+              <view class="title van-ellipsis">
+                <van-icon name="/images/icon_1.png" size="20px" color="red" /><text>{{item.shipNumber}}</text>
+                <text wx:if="{{item.status}}" class="status carStatus{{item.status}}">{{item.status=='1'?'启用':'关闭'}}</text>
+              </view>
+              <view class="info">
+                <text decode="{{true}}">归属人:{{item.shipName?item.shipName:'未填写'}}<block>/{{item.shipIdentity?item.shipIdentity:'未填写'}}</block></text>
+              </view>
+              <view class="info">
+                <text decode="{{true}}">联系人:{{item.contactName?item.contactName:'未填写'}}<block>/{{item.contactPhone?item.contactPhone:'未填写'}}</block></text>
+              </view>
+              <view class="info">
+                <text>船型:{{item.shipType}}</text>
+              </view>
+              <view class="info">
+                <text>荷载吨位:{{item.shipLoad}}</text>
+              </view>
+
+              <view class="bottomBtn">
+                <van-button type="info" size="small" data-url="edit?id={{item.id}}&index={{index}}" catchtap="toLink" style="margin-right: 20rpx;">修改</van-button>
+                <van-button type="danger" size="small" data-id="{{item.id}}" data-ship-number="{{item.shipNumber}}" catchtap="delFun" style="margin-right: 20rpx;">删除</van-button>
+                <van-button type="primary" size="small" data-id="{{item.id}}" data-status="1" data-ship-number="{{item.shipNumber}}" catchtap="changeStatus" wx:if="{{ item.status=='2' }}">启用</van-button>
+                <van-button type="warning" size="small" data-id="{{item.id}}" data-status="2" data-ship-number="{{item.shipNumber}}" catchtap="changeStatus" wx:if="{{ item.status=='1' }}">关闭</van-button>
+              </view>
+            </navigator>
+          </block>
+          <!-- 底部加载动画 -->
+          <view class='more'>
+            <block wx:if="{{more}}">
+              <van-loading size="24px" color="#1989fa">加载中...</van-loading>
+            </block>
+            <block wx:else>{{nomore}}</block>
+          </view>
+          <view style="height: 160rpx;"> </view>
+        </block>
+        <block wx:else>
+          <van-empty description="未搜索到船舶信息" />
+        </block>
+      </block>
+    </view>
+  </block>
+  <block wx:else>
+    <view>
+      <van-empty>
+        <view slot="description" style="text-align: center;">
+          <text style="display:block;margin-bottom: 20rpx;">您还未登录,登录后查看更多~</text>
+          <van-button type="info" bindtap="toLogin">立即登录</van-button>
+        </view>
+      </van-empty>
+    </view>
+  </block>
+</view>
+
+<wxs module="filters" src="../../utils/filter.wxs"></wxs>

+ 22 - 0
otherPages/ship/index.wxss

@@ -0,0 +1,22 @@
+/* pages/car/index.wxss */
+.bottomBtn{
+  border-top: 1rpx solid rgba(0,0,0,0.08);
+  margin-top: 16rpx;
+}
+.leftBtn{
+  flex: 1;
+  height: 58rpx;
+  line-height: 58rpx;
+  text-align: center;
+  font-size: 30rpx;
+  color: rgba(245,34,45,0.65);
+  border-right: 1px solid rgba(0,0,0,0.08);
+}
+.rightBtn{
+  flex: 1;
+  height: 58rpx;
+  line-height: 58rpx;
+  text-align: center;
+  font-size: 30rpx;
+  color: #375EDF;
+}

+ 48 - 0
otherPages/ship/info.js

@@ -0,0 +1,48 @@
+// 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
+      })
+    })
+  }
+
+})

+ 16 - 0
otherPages/ship/info.json

@@ -0,0 +1,16 @@
+{
+  "navigationBarTitleText": "船舶信息",
+  "usingComponents": {
+    "van-goods-action": "@vant/weapp/goods-action/index",
+    "van-goods-action-icon": "@vant/weapp/goods-action-icon/index",
+    "van-goods-action-button": "@vant/weapp/goods-action-button/index",
+    "van-icon": "@vant/weapp/icon/index",
+    "van-field": "@vant/weapp/field/index",
+    "van-tag": "@vant/weapp/tag/index",
+    "van-button": "@vant/weapp/button/index",
+    "van-checkbox": "@vant/weapp/checkbox/index",
+    "van-popup": "@vant/weapp/popup/index",
+    "van-uploader": "@vant/weapp/uploader/index",
+    "van-checkbox-group": "@vant/weapp/checkbox-group/index"
+  }
+}

+ 17 - 0
otherPages/ship/info.wxml

@@ -0,0 +1,17 @@
+<!--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>

+ 21 - 0
otherPages/ship/info.wxss

@@ -0,0 +1,21 @@
+/* pages/car/info.wxss */
+.van-checkbox {
+  margin-bottom: 16rpx;
+}
+.submitBtn{
+  position: fixed;
+  width: 550rpx;
+  padding: 20rpx 0;
+  margin:0 80rpx;
+  bottom: 0;
+  z-index: 99;
+}
+.chooseTit {
+  height: 100rpx;
+  line-height: 100rpx;
+  text-align: center;
+  border-bottom: 1px solid #eee;
+}
+.van-goods-action{
+  background-color: transparent !important;
+}

+ 361 - 0
pages/appointReplace/index.js

@@ -0,0 +1,361 @@
+// pages/appointReplace/index.js
+const app = getApp()
+var startPoint
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    str:'&emsp;',
+    str2: '&ensp;',
+
+    filterWidth: 0, //获取顶部筛选宽度
+    filterHeight: 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: '',
+
+    //分页
+    limit: 10,
+    requestStatu: '加载中...',
+    page: 1,
+    totalPages: 1,
+    more: false,
+    nomore: '',
+
+    auditStatusArray:[],//审核状态
+
+    show: false,
+    auditFlag:true,
+    auditRemark:'',//审核备注
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    //字典数据
+    let treeData = app.globalData.treeArr
+    for (const element of treeData) {
+      let arrStr;
+      switch (element.dictValue) {
+        case 'AUDIT_STATUS':
+          arrStr = "auditStatusArray";
+          break;
+      }
+      this.setData({
+        [arrStr]: element.children
+      })
+    }
+    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-50, //这里定义按钮的初始位置
+          buttonLeft: res.windowWidth * 0.80, //这里定义按钮的初始位置
+        })
+      }
+    })
+  },
+
+  //获取顶部筛选区域的高度
+  getFilterHeight:function(){
+    let that = this;
+    // 使用顶部筛选高度选择器选择节点的高度
+    const query = wx.createSelectorQuery();
+    query.select('.topSeach').boundingClientRect(function (rect) {
+      if(rect){
+        that.setData({
+          filterWidth: rect.width,
+          filterHeight: rect.height,
+        });
+      }
+    }).exec();
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+    const roleCodeList = wx.getStorageSync('roleCodeList')
+    let loginStatus = wx.getStorageSync('loginStatus')
+    this.setData({
+      searchVal: '',
+      roleCodeList: roleCodeList ? roleCodeList : '',
+      loginStatus: loginStatus ? loginStatus : false
+    })
+
+    this.setData({
+      requestStatu:'加载中...',
+    })
+    if (wx.getStorageSync('loginStatus')) {
+      this.getListFun();
+    }
+  },
+
+  //下拉选择
+  bindPickerChange: function (e) { //下拉菜单
+    //方法一动态的
+    let getIndex = e.target.dataset.pickername + 'Index'
+    app.util.getPickerIndex(this, getIndex, e);
+    this.getListFun()
+  },
+
+  //搜索框请求S
+  onChange(e) {
+    this.setData({
+      searchVal: e.detail,
+    });
+  },
+  onSearch: function (event) {
+    this.setData({
+      searchVal: event.detail
+    })
+    this.getListFun();
+  },
+  onCancel: function () {
+    this.setData({})
+  },
+  toSearch: function (event) {
+    this.getListFun();
+  },
+
+  //列表
+  getListFun: function () {
+    this.setData({
+      page: 1
+    })
+    let params = {
+      current    : this.data.page,
+      size       : this.data.limit,
+      searchKey  : this.data.searchVal
+    }
+    app.request.pageFirst({
+      url: app.API.replacePage,
+      page: this,
+      params: params,
+    })
+  },
+
+  //页面跳转
+  toLink: function (e) {
+    let { url } = e.currentTarget.dataset
+    wx.navigateTo({
+      url: url
+    })
+  },
+
+  //删除
+  delFun: function (e) {
+    let _this = this
+    let { id, arriveNumber } = e.currentTarget.dataset
+    wx.showModal({
+      title: '提示!',
+      content: `删除【${arriveNumber}】后不可恢复。确定要删除吗?`,
+      confirmColor: '#FF5B5B',
+      success: function (res) {
+        if (res.confirm) {
+          app.request.POST({
+            url: app.API.bizloadarriveDelete,
+            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 } = e.currentTarget.dataset
+    this.setData({
+      show: true,
+      auditRemark: '',
+      id: id,
+    });
+  },
+  onClose() {
+    this.setData({
+      show: false,
+      auditFlag:'false',
+      auditRemark:'',
+      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.replaceAudit,
+        params: formData,
+        page: this,
+        isLoadingTxt: '审核中...',
+        successFun: true
+      }).then(res => {
+        wx.showToast({
+          title: '审核成功',
+          icon: 'success',
+          duration: 1000,
+          mask: true
+        })
+        this.onClose()
+        this.getListFun(); //刷新列表
+      })
+    }
+  },
+  // 审核E
+
+  //申请
+  changeAdd() {
+    wx.navigateTo({
+      url: 'add'
+    })
+  },
+
+  
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+    this.setData({
+      searchVal: ''
+    })
+    if (wx.getStorageSync('loginStatus')) {
+      this.getListFun();
+    } else {
+      wx.stopPullDownRefresh();
+    }
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+    this.data.page++;
+    let params = {
+      current: this.data.page,
+      size: this.data.limit,
+      searchKey:this.data.searchVal
+    }
+    app.request.pageOther({
+      url: app.API.bizloadarrivePage,
+      page: this,
+      params: params,
+      loadType: true //加载类型,是否是下拉加载
+    });
+  },
+
+
+  //以下是按钮拖动事件
+  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() {
+
+  }
+})

+ 15 - 0
pages/appointReplace/index.json

@@ -0,0 +1,15 @@
+{
+  "navigationBarTitleText": "预约调度审批",
+  "backgroundTextStyle": "dark",
+  "enablePullDownRefresh": true,
+  "usingComponents": {
+    "van-field": "@vant/weapp/field/index",
+    "van-popup": "@vant/weapp/popup/index",
+    "van-sticky": "@vant/weapp/sticky/index",
+    "van-search": "@vant/weapp/search/index",
+    "van-icon": "@vant/weapp/icon/index",
+    "van-empty": "@vant/weapp/empty/index",
+    "van-button": "@vant/weapp/button/index",
+    "van-loading": "@vant/weapp/loading/index"
+  }
+}

+ 48 - 0
pages/appointReplace/index.less

@@ -0,0 +1,48 @@
+/* pages/appointReplace/index.wxss */
+page {
+  --cell-vertical-padding: 12rpx;
+  // --cell-horizontal-padding: 0;
+  --cell-background-color: transparent;
+}
+.container{
+  padding-bottom: 120rpx;
+}
+.bottomBtn{
+  padding-top: 20rpx;
+  text-align: right;
+}
+.bottomBtn button {
+  margin-left: 0 !important;
+}
+
+.orderLoadBox{
+  > .title{
+    height: 100rpx;
+    line-height: 100rpx;
+    font-weight: bold;
+    font-size: 40rpx;
+    color: #14284A;
+    text-align: center;
+    background: linear-gradient( 180deg, #D4E1F6 0%, #FFFFFF 100%);
+  }
+  .dialogUser{
+    height: 50vh;
+    padding-top: 30rpx;
+    .saleItem{
+      width: 700rpx;
+      margin:0 auto 30rpx;
+      padding-bottom: 20rpx;
+      border-bottom: 1px solid #eee;
+      .title{
+        font-size: 36rpx;
+        display: flex;
+        justify-content: space-between;
+      }
+      .time{
+        margin-top: 10rpx;
+        color: #666;
+        font-size: 24rpx;
+      }
+    }
+  }
+}

+ 103 - 0
pages/appointReplace/index.wxml

@@ -0,0 +1,103 @@
+<!--pages/appointReplace/index.wxml-->
+<view class="container listMain">
+  <block wx:if="{{loginStatus}}">
+    <van-sticky>
+      <view class="topSeach">
+        <view class="rightBox" style="position: relative;">
+          <van-search value="{{ searchVal }}" shape="round" placeholder="请输入车牌号/司机姓名/电话" bind:change="onChange" bind:search="onSearch" bind:cancel="onCancel"></van-search>
+        </view>
+      </view>
+    </van-sticky>
+
+    <view class="width710">
+      <block wx:if="{{!requestStatu}}">
+        <block wx:if="{{resData.length>0}}">
+          <block wx:for="{{resData}}" wx:key="index">
+            <navigator url="info?id={{item.id}}&name={{item.name}}&index={{index}}" class="listItem">
+              <view class="title van-ellipsis">
+                <van-icon class='iconfont' name='/images/licensePlate.png' size="36rpx"></van-icon>
+                <text>{{item.licenseNumber}}</text>
+                <text wx:if="{{item.status}}" class="status arriveStatus{{item.status}}">{{filters.codeAnalysis(auditStatusArray, item.status, 'dictValue', 'dictLabel')}}</text>
+              </view>
+
+              <view class="info">
+                <text>订单号:{{item.oldOrderNumber?item.oldOrderNumber:'未填写'}} -> {{item.newOrderNumber?item.newOrderNumber:'未填写'}}</text>
+              </view>
+              <view class="info">
+                <text>装卸点位:{{item.oldLoadPoint?item.oldLoadPoint:'未填写'}} -> {{item.newLoadPoint?item.newLoadPoint:'未填写'}}</text>
+              </view>
+              <view class="info">
+                <text>装卸时间(前):{{item.oldBeginTime?filters.tosubStr(item.oldBeginTime,0,16):'未填写'}}~{{item.oldEndTime?filters.tosubStr(item.oldEndTime,0,16):'未填写'}}</text>
+              </view>
+              <view class="info">
+                <text>装卸时间(后):{{item.newBeginTime?filters.tosubStr(item.newBeginTime,0,16):'未填写'}}~{{item.newEndTime?filters.tosubStr(item.newEndTime,0,16):'未填写'}}</text>
+              </view>
+
+              <view class="info">
+                <text>司机:{{item.driverName?item.driverName:'未填写'}} / {{item.driverMobile?item.driverMobile:'未填写'}}</text>
+              </view>
+              
+              <view class="bottomBtn" wx:if="{{roleCodeList == 'dispatcher' && item.status == '1'}}">
+                <van-button type="primary" size="small" data-id="{{item.id}}" data-approve-type="one" catchtap="showPopup" wx:if="{{roleCodeList == 'dispatcher' && item.status == '1'}}">审核</van-button>
+              </view>
+            </navigator>
+          </block>
+          <!-- 底部加载动画 -->
+          <view class='more'>
+            <block wx:if="{{more}}">
+              <van-loading size="24px" color="#1989fa">加载中...</van-loading>
+            </block>
+            <block wx:else>{{nomore}}</block>
+          </view>
+          <view style="height: 200rpx;"> </view>
+        </block>
+        <block wx:else>
+          <van-empty description="未搜索到相关记录" image="/images/null5.png" />
+        </block>
+      </block>
+    </view>
+  </block>
+  <block wx:else>
+    <view>
+      <van-empty image="/images/loginNullTemp.png">
+        <view slot="description" style="text-align: center;">
+          <text style="display:block;margin-bottom: 20rpx;">您还未登录,登录后查看更多~</text>
+          <van-button type="info" bindtap="toLogin">立即登录</van-button>
+        </view>
+      </van-empty>
+    </view>
+  </block>
+</view>
+
+
+<!-- 弹窗 -->
+<van-popup show="{{ show }}" position="bottom" round closeable custom-style="width:100%;padding:0rpx 30rpx 180rpx;"  bind:close="onClose">
+  <view style="height: 90rpx;line-height: 90rpx;text-align: center;">审核</view>
+  <form bindsubmit="formSubmit">
+    <view class="part">
+      <view class="height20"> </view>
+      <input name="id" value='{{id}}' hidden='true' />
+      <van-field label="审核结果" name="auditFlag" value="{{ auditFlag }}" required input-align="right" class="radioHeight fieldAutoHeight">
+        <view slot="input" class="radioHeightBx">
+          <radio-group class="radio-group" bindchange="dangerStatusChange" data-radioType="auditFlag">
+            <label class="radio">
+              <radio value="true" checked="{{auditFlag=='true'}}" color="#4B70EA" />通过
+            </label>
+            <label class="radio">
+              <radio value="false" checked="{{auditFlag=='false'}}" color="#4B70EA" />不通过
+            </label>
+          </radio-group>
+        </view>
+      </van-field>
+      <van-field label="审核备注" required="{{auditFlag=='false'}}" name="auditRemark" value="{{ auditRemark }}" type="textarea" input-align="right" placeholder="请输入审核备注" autosize></van-field>
+    </view>
+
+    <view class="submitBtn">
+      <view style="padding-top: 60rpx;">
+        <van-button block round type="info" form-type="submit" color="#0396FF">提交</van-button>
+      </view>
+    </view>
+  </form>
+</van-popup>
+
+<wxs module="filters" src="../../utils/filter.wxs"></wxs>

+ 64 - 0
pages/appointReplace/index.wxss

@@ -0,0 +1,64 @@
+/* pages/appointReplace/index.wxss */
+page {
+  --cell-vertical-padding: 12rpx;
+  /* --cell-horizontal-padding: 0; */
+  --cell-background-color: transparent;
+}
+.container{
+  padding-bottom: 120rpx;
+}
+.bottomBtn{
+  padding-top: 20rpx;
+  text-align: right;
+}
+.bottomBtn button {
+  margin-left: 0 !important;
+}
+
+.orderLoadBox > .title {
+  height: 100rpx;
+  line-height: 100rpx;
+  font-weight: bold;
+  font-size: 40rpx;
+  color: #14284A;
+  text-align: center;
+  background: linear-gradient(180deg, #D4E1F6 0%, #FFFFFF 100%);
+}
+.orderLoadBox .dialogUser {
+  height: 50vh;
+  padding-top: 30rpx;
+}
+.orderLoadBox .dialogUser .saleItem {
+  width: 700rpx;
+  margin: 0 auto 30rpx;
+  padding-bottom: 20rpx;
+  border-bottom: 1px solid #eee;
+}
+.orderLoadBox .dialogUser .saleItem .title {
+  font-size: 36rpx;
+  display: flex;
+  justify-content: space-between;
+}
+.orderLoadBox .dialogUser .saleItem .time {
+  margin-top: 10rpx;
+  color: #666;
+  font-size: 24rpx;
+}
+
+
+/* 表单根据内容自动调整高度 */
+.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;
+}
+.radioHeight .van-field__body {
+  height: 28px;
+  line-height: 25px;
+}

+ 115 - 0
pages/appointReplace/info.js

@@ -0,0 +1,115 @@
+// pages/loadArrive/info.js
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    info: {},
+    auditStatusArray:[],//审核状态
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    //字典数据
+    let treeData = app.globalData.treeArr
+    for (const element of treeData) {
+      let arrStr;
+      switch (element.dictValue) {
+        case 'AUDIT_STATUS':
+          arrStr = "auditStatusArray";
+          break;
+      }
+      this.setData({
+        [arrStr]: element.children
+      })
+    }
+    //获取详情
+    var pages = getCurrentPages();
+    var prevPage = pages[pages.length - 2];
+    let getInfo = prevPage.data.resData[options.index]
+    this.setData({
+      info : getInfo
+    })
+    // 调度前详情
+    this.getInfo(getInfo.id, "old")
+    // 调度后详情
+    this.getInfo(getInfo.id, "new")
+  },
+
+  //查询详情
+  getInfo: function (id, type) {
+    app.request.GET({
+      url: app.API.replaceDetail,
+      page: this,
+      params: {
+        'id': id,
+        'flag': type,
+      },
+      successFun: true
+    }).then(res => {
+      let getInfo = res.data.data;
+      if(type == 'old'){
+        this.setData({
+          oldInfo : getInfo
+        })
+      }else{
+        this.setData({
+          newInfo : getInfo
+        })
+      }
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 16 - 0
pages/appointReplace/info.json

@@ -0,0 +1,16 @@
+{
+  "navigationBarTitleText": "调度前后详情",
+  "enablePullDownRefresh": true,
+  "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-group": "@vant/weapp/cell-group/index",
+    "van-field": "@vant/weapp/field/index",
+    "van-button": "@vant/weapp/button/index",
+    "van-tag": "@vant/weapp/tag/index",
+    "van-image": "@vant/weapp/image/index"
+  }
+}

+ 1 - 0
pages/appointReplace/info.less

@@ -0,0 +1 @@
+/* pages/loadArrive/info.wxss */

+ 51 - 0
pages/appointReplace/info.wxml

@@ -0,0 +1,51 @@
+<!--pages/loadArrive/info.wxml-->
+<view class="container">
+  <view class="part">
+    <van-field label="" input-align="center" value="调度前" readonly></van-field>
+    <van-field label="订单编号" input-align="right" value="{{oldInfo.oldOrderNumber }}" readonly></van-field>
+    <van-field label="车牌号" input-align="right" value="{{oldInfo.licenseNumber }}" readonly></van-field>
+    <van-field label="车辆轴数" input-align="right" value="{{oldInfo.axleNumber+'轴' }}" readonly></van-field>
+    <van-field label="提货开始时间" input-align="right" value="{{oldInfo.confStartTime }}" readonly></van-field>
+    <van-field label="提货结束时间" input-align="right" value="{{oldInfo.confEndTime }}" readonly></van-field>
+    <van-field label="客户名称" input-align="right" value="{{oldInfo.customerName }}" readonly></van-field>
+    <van-field label="联系人" input-align="right" value="{{oldInfo.customerPhone }}" readonly></van-field>
+    <van-field label="货品名称" input-align="right" value="{{oldInfo.goodsName }}" readonly></van-field>
+    <van-field label="货品编码" input-align="right" value="{{oldInfo.goodsCode }}" readonly></van-field>
+    <van-field label="司机姓名" input-align="right" value="{{oldInfo.driverName }}" readonly></van-field>
+    <van-field label="司机电话" input-align="right" value="{{oldInfo.driverMobile }}" readonly></van-field>
+    <van-field label="装卸点位" input-align="right" value="{{oldInfo.oldLoadPoint }}" readonly></van-field>
+    <van-field label="装卸开始时间" input-align="right" value="{{oldInfo.oldBeginTime }}" readonly></van-field>
+    <van-field label="装卸结束时间" input-align="right" value="{{oldInfo.oldEndTime }}" readonly></van-field>
+  </view>
+  <view style="height: 20px;"></view>
+    
+  <view class="part">
+    <van-field label="" input-align="center" value="调度后" readonly></van-field>
+    <van-field label="订单编号" input-align="right" value="{{newInfo.newOrderNumber }}" readonly></van-field>
+    <van-field label="车牌号" input-align="right" value="{{newInfo.licenseNumber }}" readonly></van-field>
+    <van-field label="车辆轴数" input-align="right" value="{{newInfo.axleNumber+'轴' }}" readonly></van-field>
+    <van-field label="提货开始时间" input-align="right" value="{{newInfo.confStartTime }}" readonly></van-field>
+    <van-field label="提货结束时间" input-align="right" value="{{newInfo.confEndTime }}" readonly></van-field>
+    <van-field label="客户名称" input-align="right" value="{{newInfo.customerName }}" readonly></van-field>
+    <van-field label="联系人" input-align="right" value="{{newInfo.customerPhone }}" readonly></van-field>
+    <van-field label="货品名称" input-align="right" value="{{newInfo.goodsName }}" readonly></van-field>
+    <van-field label="货品编码" input-align="right" value="{{newInfo.goodsCode }}" readonly></van-field>
+    <van-field label="司机姓名" input-align="right" value="{{newInfo.driverName }}" readonly></van-field>
+    <van-field label="司机电话" input-align="right" value="{{newInfo.driverMobile }}" readonly></van-field>
+    <van-field label="装卸点位" input-align="right" value="{{newInfo.newLoadPoint }}" readonly></van-field>
+    <van-field label="装卸开始时间" input-align="right" value="{{newInfo.newBeginTime }}" readonly></van-field>
+    <van-field label="装卸结束时间" input-align="right" value="{{newInfo.newEndTime }}" readonly></van-field>
+  </view>
+  <view style="height: 20px;"></view>
+  
+  <view class="part">
+    <van-field label="审核状态" input-align="right" readonly>
+      <text slot="button" class="status arriveStatus{{info.status}}">{{filters.codeAnalysis(auditStatusArray, info.status, 'dictValue', 'dictLabel')}} 
+      </text>
+    </van-field>
+  </view>
+
+  <view style="height: 50px;"></view>
+</view>
+
+<wxs module="filters" src="../../utils/filter.wxs"></wxs>

+ 2 - 2
pages/deliveryConfirm/info.js

@@ -22,7 +22,7 @@ Page({
     tareCaptureArr: [], //过皮抓拍照片
     grossCaptureArr: [], //过毛抓拍照片
 
-    appointmentAtatusStatusArray:[],//预约状态
+    appointmentStatusArray:[],//预约状态
 
     type: '',
     info: {
@@ -42,7 +42,7 @@ Page({
        let arrStr;
        switch (element.dictValue) {
          case 'appointment_status':
-           arrStr = "appointmentAtatusStatusArray";
+           arrStr = "appointmentStatusArray";
            break;
        }
        this.setData({

+ 1 - 1
pages/deliveryConfirm/info.wxml

@@ -44,7 +44,7 @@
       <van-field label="货品名称" model:value='{{info.goodsName}}' input-align="right" readonly></van-field>
       <van-field label="货品规格" model:value='{{info.goodsModel}}' input-align="right" readonly></van-field>
       <van-field label="预约状态" input-align="right" readonly>
-      <text slot="button" class="status status{{info.status}}">{{filters.codeAnalysis(appointmentAtatusStatusArray, info.status, 'dictValue', 'dictLabel')}} 
+      <text slot="button" class="status status{{info.status}}">{{filters.codeAnalysis(appointmentStatusArray, info.status, 'dictValue', 'dictLabel')}} 
       </text>
     </van-field>
       <van-field label="司机姓名" model:value='{{info.driverName}}' input-align="right" readonly></van-field>

+ 3 - 3
pages/index/add.js

@@ -209,7 +209,7 @@ Page({
       warn = "车牌号格式错误!";
     } else if (formData.licenseNumber.length == 8 && !xreg.test(formData.licenseNumber)) {
       warn = "车牌号格式错误!";
-    } else if (formData.overId == '') {
+    } else if (typeof formData.overId == 'undefined' || formData.overId == '') {
       warn = "请选择车辆轴数!";
     } else if (formData.driverName == '') {
       warn = "请填写司机姓名!";
@@ -217,9 +217,9 @@ Page({
       warn = "请填写司机电话!";
     } else if (!reg.test(formData.driverMobile)) {
       warn = "司机电话格式错误!";
-    } else if (formData.loadPointId == '') {
+    } else if (typeof formData.loadPointId == 'undefined' || formData.loadPointId == '') {
       warn = "请选择装卸点位!";
-    } else if(formData.loadTimeId == ''){
+    } else if(typeof formData.loadTimeId == 'undefined' || formData.loadTimeId == ''){
       warn = "请选择装卸时间!";
     }
     if (warn != '') {

+ 1 - 0
pages/index/add.wxml

@@ -25,6 +25,7 @@
           </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>
 

+ 1 - 1
pages/index/edit.js

@@ -189,7 +189,7 @@ Page({
       warn = "车牌号格式错误!";
     } else if (formData.licenseNumber.length == 8 && !xreg.test(formData.licenseNumber)) {
       warn = "车牌号格式错误!";
-    } else if (formData.overId == '') {
+    } else if (typeof formData.overId == 'undefined' || formData.overId == '') {
       warn = "请选择车辆轴数!";
     } else if (formData.driverName == '') {
       warn = "请填写司机姓名!";

+ 1 - 0
pages/index/edit.wxml

@@ -25,6 +25,7 @@
           </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>
 

+ 48 - 48
pages/index/index.js

@@ -490,56 +490,56 @@ Page({
 
   //扫码预约申请
   changeAdd() {
-    // wx.navigateTo({
-    //   url: '/pages/reservationLoadAppoint/add?orderId=1940665005240860674'
-    // })
+    wx.navigateTo({
+      url: 'add?orderId=' + info.id + '&orderName='+ info.orderName+'&orderNumber='+ info.orderNumber
+    })
 
-    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: '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
+    //       })
+    //     }
     
-      },
-      fail: (res) => {
-        wx.showToast({
-          title: '请重试!',
-          icon: 'error',
-          duration: 2000
-        })
-      }
-    })
+    //   },
+    //   fail: (res) => {
+    //     wx.showToast({
+    //       title: '请重试!',
+    //       icon: 'error',
+    //       duration: 2000
+    //     })
+    //   }
+    // })
   },
 
   //删除

+ 9 - 7
pages/index/index.wxml

@@ -85,21 +85,23 @@
                   <text>预约类型:{{ filters.codeAnalysis(appointmentTypeArray,item.appointmentType, 'dictValue', 'dictLabel') }}</text>
                 </view>
 
-                <view class="bottomBtn" wx:if="{{ item.status == '2' || item.status == '4' || item.status == '8' || (item.status == '10' && item.orderType == '1') || (roleCodeList=='driver' && item.appointmentType == '4' && item.status == '5') }}">
+                <view class="bottomBtn" wx:if="{{ item.status == '2' || item.status == '4' || item.status == '8' || (item.status == '10' && item.orderType == '1') || (roleCodeList=='driver' && item.appointmentType == '4' && item.status == '5') || (roleCodeList=='driver' && (item.status == '5' || item.status == '6') && item.orderType == '1') }}">
                   <van-button type="primary" size="small" data-id="{{item.id}}" data-license-number="{{item.licenseNumber}}" catchtap="showQrcodePopup" wx:if="{{ item.appointmentType == '1' || item.appointmentType == '3' || (item.appointmentType == '6' && item.isWeigh == '1') }}" style="margin-right: 20rpx;">二维码</van-button>
                   
                   <van-button type="info" size="small" data-index="{{ index }}" data-type="{{item.appointmentType}}" catchtap="toUpdate" wx:if="{{ 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.status == '2' }}">删除</van-button>
+                  <van-button type="danger" size="small" data-id="{{item.id}}" data-license-number="{{item.licenseNumber}}" catchtap="delFun" wx:if="{{ item.status == '2' }}" style="margin-right: 20rpx;">删除</van-button>
 
-                  <van-button type="warning" size="small" data-id="{{item.id}}" data-license-number="{{item.licenseNumber}}" catchtap="cancelFun" wx:if="{{ item.status == '4' }}">取消预约</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="danger" size="small" data-id="{{item.id}}" data-license-number="{{item.licenseNumber}}" catchtap="overFun" wx:if="{{ roleCodeList=='driver' && item.appointmentType == '4' && item.status == '5' }}">充电结束</van-button>
+                  <van-button type="danger" size="small" data-id="{{item.id}}" data-license-number="{{item.licenseNumber}}" catchtap="overFun" wx:if="{{ roleCodeList=='driver' && item.appointmentType == '4' && item.status == '5' }}" style="margin-right: 20rpx;">充电结束</van-button>
 
-                  <van-button data-index="{{index}}" type="info" data-url="sign?id={{item.recordId}}" catchtap="toLink" size="small" wx:if="{{ item.status == '8' }}">司机确认</van-button>
+                  <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' }}">司机取消</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' }}">司机回签</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="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>
             </block>

+ 247 - 0
pages/index/replace.js

@@ -0,0 +1,247 @@
+// pages/index/replace.js
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    showModal: false,
+    defaultText: '请选择',
+    isSubmitting: false,
+
+    overArray:[],//车辆轴数
+    overIndex:'',
+
+    orderArray:[],//订单
+    orderIndex:'',
+
+    loadPointArray:[],//装卸点位
+    loadPointIndex:null,
+
+    loadTimeArray:[], //装卸时间
+    loadTimeIndex:null,
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    //获取详情
+    var pages = getCurrentPages();
+    var prevPage = pages[pages.length - 2];
+    let getInfo = prevPage.data.resData[options.index]
+
+    this.setData({
+      info: getInfo 
+    })
+
+    this.getSelectData()
+
+  },
+
+  //获取订单下拉列表、车辆轴数下拉列表
+  getSelectData:function(){
+    //获取订单下拉列表
+    app.request.GET({
+      url: app.API.stoneAppointSupplierList,
+      params: { licenseNumber : this.data.info.licenseNumber },
+      page: this,
+      successFun: true
+    }).then(res => {
+      this.setData({
+        orderArray: res.data.data,
+        orderIndex: app.util.getDicIndex(res.data.data, this.data.info.orderId, 'orderId'),
+      })
+      // 初始装卸点位
+      this.loadPointData('info')
+    })
+
+    //获取车辆轴数下拉列表
+    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'),
+      })
+    })
+  },
+
+  //装卸点位
+  loadPointData:function(type){
+    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
+      },
+      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){
+    let pointIdSelect = this.data.loadPointArray[this.data.loadPointIndex].loadPointId
+    let orderIdSelect = this.data.orderArray[this.data.orderIndex].orderId
+    app.request.GET({
+      url: app.API.stoneAppointLoadTimeList,
+      params: {
+        pointId : pointIdSelect,
+        orderId : orderIdSelect
+      },
+      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
+      })
+      //初始化详情 或者是 选择订单和装卸定位和初始值一样时  装卸时间默认为初始选择项
+      if(type || (this.data.info.loadPointId == pointIdSelect && this.data.info.orderId == orderIdSelect)){
+        this.setData({
+          loadTimeIndex : app.util.getDicIndex(orderList, this.data.info.loadTimeId, 'loadTimeId')
+        })
+      }
+    })
+  },
+
+  //下拉选择
+  bindPickerChange: function (e) { //下拉菜单
+    let { pickername } = e.target.dataset
+    let getIndex = pickername + 'Index'
+    app.util.getPickerIndex(this, getIndex, e);
+    switch (pickername) {
+      case 'order': //订单
+        this.loadTimeData() //获取装卸时间
+        break;
+      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
+    })
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  bindscrolltolowerFun() {
+    
+  },
+
+
+  formSubmit: function ({detail:{value}}) {
+    let formData = value;
+    var warn = ""; //弹框时提示的内容
+    if (typeof formData.orderId == 'undefined' || formData.orderId == '') {
+      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.stoneAppointReplace,
+        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 () {
+
+  }
+})

+ 19 - 0
pages/index/replace.json

@@ -0,0 +1,19 @@
+{
+  "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"
+  }
+}

+ 76 - 0
pages/index/replace.wxml

@@ -0,0 +1,76 @@
+<!--pages/index/replace.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 label="车牌号" value="{{ info.licenseNumber }}" 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>
+            </view>
+          </van-field>
+        </view>
+        <view class="height20"></view>
+        <view>
+          <!-- 订单信息 -->
+          <van-field label="订单信息" required input-align="right" bindtap="hideKeybord">
+            <view slot="input" style="width: 100%;">
+              <input name="orderId" value='{{orderArray[orderIndex].orderId}}' hidden='true' />
+              <picker bindchange="bindPickerChange" value="{{orderIndex}}" range="{{orderArray}}" range-key="orderNumber" data-pickername='order'>
+                <view wx:if="{{orderArray[orderIndex].orderNumber}}"> {{orderArray[orderIndex].orderNumber}}</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">
+            <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>
+
+      <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>

+ 209 - 0
pages/index/replace.wxss

@@ -0,0 +1,209 @@
+/* pages/index/replace.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;
+}

+ 1 - 1
pages/queueCar/adjustOrder.js

@@ -88,7 +88,7 @@ Page({
   formSubmit: function ({detail: { value }}) {
     let formData = value;
     var warn = ""; //弹框时提示的内容
-    if (formData.orderId == '') {
+    if (typeof formData.orderId == 'undefined' || formData.orderId == '') {
       warn = "请选择订单!";
     }
     if (warn != '') {

+ 6 - 6
pages/register/indexShip.js

@@ -12,7 +12,7 @@ Page({
     userId:'',
     name:'',
     phone:'',
-    nickname: '',
+    // nickname: '',
     // fileList:[],
   },
 
@@ -30,7 +30,7 @@ Page({
       userId:wx.getStorageSync('id'),
       name:wx.getStorageSync('name'),
       phone:wx.getStorageSync('phone'),
-      nickname: wx.getStorageSync('nickname'),
+      // nickname: wx.getStorageSync('nickname'),
       roleName: "2",
     })
   },
@@ -85,8 +85,8 @@ Page({
       warn = "请输入船主手机号!";
     } else if(!reg.test(formData.phone)){
       warn = "请确认手机号格式!";
-    } else if (formData.nickname == '') {
-      warn = "请输入船舶号!";
+    // } else if (formData.nickname == '') {
+    //   warn = "请输入船舶号!";
     } 
 
     // /** 图片处理 START **/
@@ -126,9 +126,9 @@ Page({
           complete: function () {
             setTimeout( ()=> {
               wx.setStorageSync('name', formData.name); //用户姓名
-              wx.setStorageSync('nickname', formData.nickname); //船舶号
+              // wx.setStorageSync('nickname', formData.nickname); //船舶号
               wx.navigateBack()
-            }, 1500) //延迟时间  
+            }, 1500) //延迟时间
           }
         })
       })

+ 2 - 2
pages/register/indexShip.wxml

@@ -28,10 +28,10 @@
           <van-field label="" name="phone" placeholder="请输入船主手机号" border="{{false}}" />
         </view>
 
-        <view class="topItem topItem1">
+        <!-- <view class="topItem topItem1">
           <van-field label="船舶号" required readonly input-align="right" border="{{false}}" />
           <van-field label="" name="nickname" placeholder="请输入船舶号" border="{{false}}" />
-        </view>
+        </view> -->
 
         <!-- <view class="topItem">
           <van-field label="船舶证书上传" required readonly input-align="right" border="{{false}}" />

+ 1 - 2
pages/register/indexShip.wxss

@@ -1,5 +1,4 @@
-/* pages/register/index.wxss */
-/* pages/updateInfo/index.wxss */
+/* pages/indexShip/index.wxss */
 .van-field__label {
   width: 240rpx !important;
 }

+ 2 - 1
pages/reservationChargestation/add.js

@@ -81,7 +81,8 @@ Page({
     switch (pickername) {
       case 'driver': //选择司机
         this.setData({
-          driverMobile  : this.data.driverArray[this.data.driverIndex].phone,
+          driverPhone  : this.data.driverArray[this.data.driverIndex].name,
+          driverMobile : this.data.driverArray[this.data.driverIndex].phone,
         })
         break;
     }

+ 1 - 0
pages/reservationChargestation/add.wxml

@@ -14,6 +14,7 @@
         <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>

+ 1 - 0
pages/reservationChargestation/edit.js

@@ -84,6 +84,7 @@ Page({
     switch (pickername) {
       case 'driver': //选择司机
         this.setData({
+          driverName  : this.data.driverArray[this.data.driverIndex].name,
           driverMobile  : this.data.driverArray[this.data.driverIndex].phone,
         })
         break;

+ 1 - 0
pages/reservationChargestation/edit.wxml

@@ -15,6 +15,7 @@
         <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>

+ 3 - 0
pages/reservationLoadAppoint/add.wxml

@@ -62,7 +62,10 @@
           </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="driverMobile" value="{{ driverMobile }}" placeholder="请填写司机电话" input-align="right" ></van-field>
       </view>
 

+ 5 - 4
pages/reservationLoadAppoint/edit.js

@@ -48,10 +48,11 @@ Page({
     }
 
     this.setData({
-      info: getInfo,
-      orderId: getInfo.orderId,
-      inputPlates: inputPlates,
-      isNewEnergy: getCarNumArr.length > 7 ? true : false,
+      info        : getInfo,
+      orderId     : getInfo.orderId,
+      driverId    : wx.getStorageSync('id'),
+      inputPlates : inputPlates,
+      isNewEnergy : getCarNumArr.length > 7 ? true : false,
       licensePlate: getInfo.licenseNumber,
     })
     //获取装卸点位下拉列表

+ 3 - 0
pages/reservationLoadAppoint/edit.wxml

@@ -63,7 +63,10 @@
           </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="driverMobile" value="{{ info.driverMobile }}" placeholder="请填写司机电话" input-align="right" ></van-field>
       </view>
 

+ 2 - 0
pages/reservationPipe/add.wxml

@@ -35,6 +35,8 @@
         <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="driverMobile" value="{{ driverMobile }}" placeholder="请填写司机电话" input-align="right" ></van-field>

+ 5 - 4
pages/reservationPipe/edit.js

@@ -48,10 +48,11 @@ Page({
     }
 
     this.setData({
-      info: getInfo,
-      orderId: getInfo.orderId,
-      inputPlates: inputPlates,
-      isNewEnergy: getCarNumArr.length > 7 ? true : false,
+      info        : getInfo,
+      orderId     : getInfo.orderId,
+      driverId    : wx.getStorageSync('id'),
+      inputPlates : inputPlates,
+      isNewEnergy : getCarNumArr.length > 7 ? true : false,
       licensePlate: getInfo.licenseNumber,
     })
 

+ 2 - 0
pages/reservationPipe/edit.wxml

@@ -36,6 +36,8 @@
         <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="driverMobile" value="{{ info.driverMobile }}" placeholder="请填写司机电话" input-align="right" ></van-field>

+ 300 - 0
pages/reservationStone/add.js

@@ -0,0 +1,300 @@
+// 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 () {
+
+  }
+})

+ 19 - 0
pages/reservationStone/add.json

@@ -0,0 +1,19 @@
+{
+  "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"
+  }
+}

+ 72 - 0
pages/reservationStone/add.wxml

@@ -0,0 +1,72 @@
+<!--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>

+ 209 - 0
pages/reservationStone/add.wxss

@@ -0,0 +1,209 @@
+/* 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;
+}

+ 276 - 0
pages/reservationStone/edit.js

@@ -0,0 +1,276 @@
+// 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 () {
+
+  }
+})

+ 19 - 0
pages/reservationStone/edit.json

@@ -0,0 +1,19 @@
+{
+  "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"
+  }
+}

+ 73 - 0
pages/reservationStone/edit.wxml

@@ -0,0 +1,73 @@
+<!--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>

+ 209 - 0
pages/reservationStone/edit.wxss

@@ -0,0 +1,209 @@
+/* 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;
+}

+ 2 - 2
pages/signReview/info.js

@@ -22,7 +22,7 @@ Page({
     tareCaptureArr: [], //过皮抓拍照片
     grossCaptureArr: [], //过毛抓拍照片
 
-    appointmentAtatusStatusArray:[],//预约状态
+    appointmentStatusArray:[],//预约状态
 
     type: '',
     info: {
@@ -42,7 +42,7 @@ Page({
        let arrStr;
        switch (element.dictValue) {
          case 'appointment_status':
-           arrStr = "appointmentAtatusStatusArray";
+           arrStr = "appointmentStatusArray";
            break;
        }
        this.setData({

+ 1 - 1
pages/signReview/info.wxml

@@ -44,7 +44,7 @@
       <van-field label="货品名称" model:value='{{info.goodsName}}' input-align="right" readonly></van-field>
       <van-field label="货品规格" model:value='{{info.goodsModel}}' input-align="right" readonly></van-field>
       <van-field label="预约状态" input-align="right" readonly>
-        <text slot="button" class="status status{{info.status}}">{{filters.codeAnalysis(appointmentAtatusStatusArray, info.status, 'dictValue', 'dictLabel')}}
+        <text slot="button" class="status status{{info.status}}">{{filters.codeAnalysis(appointmentStatusArray, info.status, 'dictValue', 'dictLabel')}}
         </text>
       </van-field>
       <van-field label="司机姓名" model:value='{{info.driverName}}' input-align="right" readonly></van-field>

+ 2 - 2
pages/weighingRecord/info.js

@@ -22,7 +22,7 @@ Page({
     tareCaptureArr: [], //过皮抓拍照片
     grossCaptureArr: [], //过毛抓拍照片
 
-    appointmentAtatusStatusArray:[],//预约状态
+    appointmentStatusArray:[],//预约状态
 
     type: '',
     info: {
@@ -42,7 +42,7 @@ Page({
        let arrStr;
        switch (element.dictValue) {
          case 'appointment_status':
-           arrStr = "appointmentAtatusStatusArray";
+           arrStr = "appointmentStatusArray";
            break;
        }
        this.setData({

+ 1 - 1
pages/weighingRecord/info.wxml

@@ -44,7 +44,7 @@
       <van-field label="货品名称" model:value='{{info.goodsName}}' input-align="right" readonly></van-field>
       <van-field label="货品规格" model:value='{{info.goodsModel}}' input-align="right" readonly></van-field>
       <van-field label="预约状态" input-align="right" readonly>
-      <text slot="button" class="status status{{info.status}}">{{filters.codeAnalysis(appointmentAtatusStatusArray, info.status, 'dictValue', 'dictLabel')}} 
+      <text slot="button" class="status status{{info.status}}">{{filters.codeAnalysis(appointmentStatusArray, info.status, 'dictValue', 'dictLabel')}} 
       </text>
     </van-field>
       <van-field label="司机姓名" model:value='{{info.driverName}}' input-align="right" readonly></van-field>

+ 5 - 1
pages/workstand/index.js

@@ -3,11 +3,11 @@ Page({
 
   /**
    * 页面的初始数据
+    //"bizAdmin"管理员, "driver"司机, "customer"用友客户, "ship"船主, "sale"销售, "dispatcher"调度员, "send"发货员, "load"起卸员  "serviceCustomer"服务客户
    */
   data: {
     loginStatus: wx.getStorageSync('loginStatus') ? wx.getStorageSync('loginStatus') : false,
     roleCodeList: wx.getStorageSync('roleCodeList') ? wx.getStorageSync('roleCodeList') : '',
-    //"bizAdmin"管理员, "driver"司机, "customer"用友客户, "ship"船主, "sale"销售, "dispatcher"调度员, "send"发货员, "load"起卸员  "serviceCustomer"服务客户
     menuData:[
       {url:'/pages/index/index',flowName:'扫码预约',flowIcon:'',iconfont:'yuyue',color:"#00a8ff",role:["driver","customer"]},
 
@@ -23,6 +23,10 @@ Page({
 
       {url:'/otherPages/loadArrive/index',flowName:'报港预约',flowIcon:'',iconfont:'loadArrive',color:"#20A0E3",role:["ship", "bizAdmin"]},
 
+      {url:'/otherPages/ship/index',flowName:'船舶管理',flowIcon:'',iconfont:'youhuatiaodu',color:"#20A0E3",role:["ship"]},
+
+      {url:'/pages/appointReplace/index',flowName:'预约调度审批',flowIcon:'',iconfont:'wodebaozhang',color:"#e17055",role:["dispatcher"]},
+
       {url:'/pages/deliveryConfirm/index',flowName:'发货确认',flowIcon:'',iconfont:'daifahuo1',color:"#FF9237",role:["send"]},
 
       {url:'/pages/signReview/index',flowName:'签收审核',flowIcon:'',iconfont:'qianshou',color:"#e17055",role:["sale"]},

+ 13 - 9
utils/api.js

@@ -123,12 +123,6 @@ const api = {
   'bizorderloadList':'/biz/bizorderload/page',//装载车调度列表
   'orderloadReplace':'/biz/bizorderload/replace',//装载车调度更换
 
-  //停车费配置
-  'bizparkconfigPage':'/biz/bizparkconfig/page',//分页列表
-  'bizparkconfigAdd':'/biz/bizparkconfig/add',//添加
-  'bizparkconfigEdit':'/biz/bizparkconfig/edit',//编辑
-  'bizparkconfigDelete':'/biz/bizorderload/delete',//删除
-
   //起卸订单
   'bizloadappointPage':'/biz/bizloadappoint/page',//分页列表
   'bizloadappointList':'/biz/bizloadappoint/getList',//列表
@@ -152,7 +146,6 @@ const api = {
   'dispatchDelete':'/biz/bizloaddispatch/deleteDispatch',//装卸删除
   'dispatchReplace':'/biz/bizloaddispatch/replaceDispatch',//装卸更换
   
-
   //报港预约
   'bizloadarrivePage':'/biz/bizloadarrive/page',//分页列表
   'bizloadarriveDetail':'/biz/bizloadarrive/detail',//详情
@@ -162,9 +155,20 @@ const api = {
   'bizloadarriveAudit':'/biz/bizloadarrive/auditArrive',//审核(管理员)
   'bizloadarriveConfirm':'/biz/bizloadarrive/arriveConfirm',//确认(船主)
 
-  
-
 
+  // 砂石预约 调度审批
+  'replacePage':'/biz/bizappointreplace/page',//分页列表
+  'replaceAudit':'/biz/bizappointreplace/audit',//审核(调度员)
+  'replaceDetail':'/biz/bizappointreplace/detail',//调度前后详情
+  
+  // 船舶管理
+  'shipPage':'/biz/bizship/page',//分页列表
+  'shipAdd':'/biz/bizship/add',//添加
+  'shipEdit':'/biz/bizship/edit',//编辑
+  'shipDelete':'/biz/bizship/delete',//删除
+  'shipTypeList':'/biz/bizship/getShipTypeList',//获取船舶类型
+  'selfShip':'/biz/bizship/getShip',//个人长期船舶
+  
   
 }