Browse Source

初始化

shasha 3 weeks ago
parent
commit
c0ee733971
100 changed files with 2216 additions and 0 deletions
  1. 14 0
      .gitignore
  2. 194 0
      app.js
  3. 104 0
      app.json
  4. 303 0
      app.wxss
  5. 326 0
      components/CarNumInput/index.js
  6. 6 0
      components/CarNumInput/index.json
  7. 147 0
      components/CarNumInput/index.wxml
  8. 241 0
      components/CarNumInput/index.wxss
  9. 152 0
      custom-tab-bar/index.js
  10. 3 0
      custom-tab-bar/index.json
  11. 9 0
      custom-tab-bar/index.wxml
  12. 47 0
      custom-tab-bar/index.wxss
  13. BIN
      images/car.png
  14. BIN
      images/car2.png
  15. BIN
      images/carNum.png
  16. BIN
      images/codeNumber.png
  17. BIN
      images/consignee.png
  18. BIN
      images/dataStatisticsIcon2.png
  19. BIN
      images/delete.png
  20. BIN
      images/deviceIcon.png
  21. BIN
      images/drivermanage.png
  22. BIN
      images/edit.png
  23. BIN
      images/emptyNull.png
  24. BIN
      images/fhdw.png
  25. BIN
      images/forwardingUnit.png
  26. BIN
      images/gallerybanner.png
  27. BIN
      images/headerImg.png
  28. BIN
      images/icon_1.png
  29. BIN
      images/icon_10.png
  30. BIN
      images/icon_6.png
  31. BIN
      images/icon_7.png
  32. BIN
      images/icon_8.png
  33. BIN
      images/icon_9.png
  34. BIN
      images/info.png
  35. BIN
      images/licensePlate.png
  36. BIN
      images/licensePlate2.png
  37. BIN
      images/lock.png
  38. BIN
      images/loginImg.png
  39. BIN
      images/loginNull.png
  40. BIN
      images/logo.png
  41. BIN
      images/material.png
  42. BIN
      images/menuImg1.png
  43. BIN
      images/menuImg2.png
  44. BIN
      images/mineIcon1.png
  45. BIN
      images/mineIcon2.png
  46. BIN
      images/mineIcon7.png
  47. BIN
      images/mineIcon9.png
  48. BIN
      images/myself.png
  49. BIN
      images/null1.png
  50. BIN
      images/null2.png
  51. BIN
      images/null3.png
  52. BIN
      images/null4.png
  53. BIN
      images/null5.png
  54. BIN
      images/null6.png
  55. BIN
      images/null7.png
  56. BIN
      images/project.png
  57. BIN
      images/search-line.png
  58. BIN
      images/searchNull.png
  59. BIN
      images/shengchanruku.png
  60. BIN
      images/status1.png
  61. BIN
      images/status2.png
  62. BIN
      images/tabbar1.png
  63. BIN
      images/tabbar2.png
  64. BIN
      images/tabbar3.png
  65. BIN
      images/tabbar4.png
  66. BIN
      images/tabbar5.png
  67. BIN
      images/tabbar6.png
  68. BIN
      images/tabbar7.png
  69. BIN
      images/tabbar8.png
  70. BIN
      images/tabbar_active1.png
  71. BIN
      images/tabbar_active2.png
  72. BIN
      images/tabbar_active3.png
  73. BIN
      images/tabbar_active4.png
  74. BIN
      images/tabbar_active5.png
  75. BIN
      images/tabbar_active6.png
  76. BIN
      images/tabbar_active7.png
  77. BIN
      images/tabbar_active8.png
  78. BIN
      images/totalGrossWeight.png
  79. BIN
      images/totalNetWeight.png
  80. BIN
      images/totalTareWeight.png
  81. BIN
      images/transportUnit.png
  82. 1 0
      miniprogram_npm/@vant/weapp/action-sheet/index.d.ts
  83. 78 0
      miniprogram_npm/@vant/weapp/action-sheet/index.js
  84. 8 0
      miniprogram_npm/@vant/weapp/action-sheet/index.json
  85. 70 0
      miniprogram_npm/@vant/weapp/action-sheet/index.wxml
  86. 1 0
      miniprogram_npm/@vant/weapp/action-sheet/index.wxss
  87. 1 0
      miniprogram_npm/@vant/weapp/area/index.d.ts
  88. 235 0
      miniprogram_npm/@vant/weapp/area/index.js
  89. 6 0
      miniprogram_npm/@vant/weapp/area/index.json
  90. 20 0
      miniprogram_npm/@vant/weapp/area/index.wxml
  91. 8 0
      miniprogram_npm/@vant/weapp/area/index.wxs
  92. 1 0
      miniprogram_npm/@vant/weapp/area/index.wxss
  93. 1 0
      miniprogram_npm/@vant/weapp/button/index.d.ts
  94. 67 0
      miniprogram_npm/@vant/weapp/button/index.js
  95. 7 0
      miniprogram_npm/@vant/weapp/button/index.json
  96. 56 0
      miniprogram_npm/@vant/weapp/button/index.wxml
  97. 39 0
      miniprogram_npm/@vant/weapp/button/index.wxs
  98. 0 0
      miniprogram_npm/@vant/weapp/button/index.wxss
  99. 70 0
      miniprogram_npm/@vant/weapp/calendar/calendar.wxml
  100. 1 0
      miniprogram_npm/@vant/weapp/calendar/components/header/index.d.ts

+ 14 - 0
.gitignore

@@ -0,0 +1,14 @@
+# Windows
+[Dd]esktop.ini
+Thumbs.db
+$RECYCLE.BIN/
+
+# macOS
+.DS_Store
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+
+# Node.js
+node_modules/

+ 194 - 0
app.js

@@ -0,0 +1,194 @@
+// app.js
+const request = require('./utils/request.js')
+const { host } = require('./utils/env')
+const API = require('./utils/api.js')
+const util = require('./utils/util');
+App({
+  request: request, //请求封装 app.request.GET({})
+  util: util, //公共JS  app.util.方法名()
+  host:host,
+  API: API.api, //接口地址  使用:app.API.offeringInfoList
+  onLaunch() {
+    //检测小程序版本更新
+    this.upDataApp();
+    //获取手机系统数据
+    this.getNavigationInfo()
+    //获取字典数据
+    this.getTree()
+  },
+  getTree:function(){
+    if(wx.getStorageSync('loginStatus')){
+      //获取字典数据
+      this.request.GET({
+        url:this.API.getTree,
+        page:this,
+        successFun:true
+      }).then(res=>{
+        this.globalData.treeArr = res.data.data
+      })
+      // wx.request({
+      //   url: host.BASE_URL + API.api.getTree,
+      //   method: 'GET',
+      //   data: {},
+      //   header: {
+      //     'content-type': 'application/json',
+      //     'Token': wx.getStorageSync('Authorization') ? wx.getStorageSync('Authorization') : '' //'Bearer ' + 
+      //   },
+      //   success: function (res) {
+      //     that.globalData.treeArr = res.data.data
+      //   },
+      //   fail: function (error) {
+      //     console.log('字典:', error)
+      //   }
+      // })
+    }
+  },
+  //版本更新
+  upDataApp: function () {
+    if (wx.canIUse('getUpdateManager')) { //判断当前微信版本是否支持版本更新
+      const updateManager = wx.getUpdateManager();
+      updateManager.onCheckForUpdate(function (res) {
+        if (res.hasUpdate) { // 请求完新版本信息的回调
+          updateManager.onUpdateReady(function () {
+            wx.showModal({
+              title: '更新提示',
+              content: '新版本已经准备好,是否重启应用?',
+              success: function (res) {
+                if (res.confirm) { // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+                  updateManager.applyUpdate()
+                }
+              }
+            })
+          });
+          updateManager.onUpdateFailed(function () {
+            wx.showModal({ // 新的版本下载失败
+              title: '已经有新版本了哟~',
+              content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~',
+            })
+          })
+        }
+      })
+    } else {
+      wx.showModal({ // 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示
+        title: '提示',
+        content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
+      })
+    }
+  },
+  
+  //获取系统需要的高度,标题栏、状态栏等高度
+  getNavigationInfo:function(){
+    // 获取系统信息
+    const windowInfo = wx.getWindowInfo();//获取窗口信息
+    //获取胶囊数据
+    const menuButtonRes = wx.getMenuButtonBoundingClientRect()
+    let statusBarHeight = windowInfo.statusBarHeight//状态栏的高度,单位px
+    let navTop = menuButtonRes.top //胶囊距离顶部距离
+    let navObjWid = windowInfo.windowWidth - menuButtonRes.right + menuButtonRes.width // 胶囊按钮的宽度+胶囊右侧的距离 = windowWidth - right+胶囊宽度
+    let systemNum = {
+      safeArea:windowInfo.safeArea,
+      statusBarHeight:statusBarHeight,//状态栏的高度,单位px
+      navHeight:statusBarHeight + menuButtonRes.height + (menuButtonRes.top - statusBarHeight) * 2, //导航栏总体高度=状态栏+标题栏
+      navTop:navTop,
+      navObj: menuButtonRes.height, //胶囊高度
+      navObjWid:navObjWid //胶囊宽度(包括右边距离)
+    }
+    this.globalData.windowInfo = windowInfo
+    this.globalData.menuButtonRes = menuButtonRes
+    this.globalData.systemInfo = systemNum
+  },
+  
+  globalData: {
+    windowInfo:{},
+    menuButtonRes:{},
+    systemInfo:{},//页面距离
+    allList: [{
+      list1: [{
+        "pagePath": "/pages/index/index",
+        "iconPath": "gonghuiyuyue-wodeyuyuelan",
+        "selectedIconPath": "yuyue1",
+        "text": "扫码预约"
+      },{
+        "pagePath": "/pages/weighingRecord/index",
+        "iconPath": "jiluliebiao",
+        "selectedIconPath": "jilu1",
+        "text": "过磅记录"
+      },{
+        "pagePath": "/pages/mine/index",
+        "iconPath": "wode2",
+        "selectedIconPath": "wode-active",
+        "text": "我的"
+      }],
+      list2: [{
+        "pagePath": "/pages/queueCar/index",
+        "iconPath": "paiduiguanli",
+        "selectedIconPath": "paiduiquhao",
+        "text": "排队车辆"
+      },{
+        "pagePath": "/pages/salesOrderMan/index",
+        "iconPath": "yundans",
+        "selectedIconPath": "yundans-fill",
+        "text": "物流订单"
+      },{
+        "pagePath": "/pages/reservationMan/index",
+        "iconPath": "gonghuiyuyue-wodeyuyuelan",
+        "selectedIconPath": "yuyue1",
+        "text": "预约管理"
+      },{
+        "pagePath": "/pages/weighingRecord/index",
+        "iconPath": "jiluliebiao",
+        "selectedIconPath": "jilu1",
+        "text": "过磅记录"
+      },{
+        "pagePath": "/pages/mine/index",
+        "iconPath": "wode2",
+        "selectedIconPath": "wode-active",
+        "text": "我的"
+      }],
+      list3: [{
+        "pagePath": "/pages/deliveryConfirm/index",
+        "iconPath": "truck_line",
+        "selectedIconPath": "truck_fill",
+        "text": "发货确认"
+      },{
+        "pagePath": "/pages/mine/index",
+        "iconPath": "wode2",
+        "selectedIconPath": "wode-active",
+        "text": "我的"
+      }],
+      list4: [{
+        "pagePath": "/pages/salesOrderMan/index",
+        "iconPath": "yundans",
+        "selectedIconPath": "yundans-fill",
+        "text": "物流订单"
+      },{
+        "pagePath": "/pages/signReview/index",
+        "iconPath": "qianshoushenpitongguo-xianxing",
+        "selectedIconPath": "qianshoushenpitongguo",
+        "text": "签收审核"
+      },{
+        "pagePath": "/pages/mine/index",
+        "iconPath": "wode2",
+        "selectedIconPath": "wode-active",
+        "text": "我的"
+      }],
+      list5: [{
+        "pagePath": "/pages/index/index",
+        "iconPath": "gonghuiyuyue-wodeyuyuelan",
+        "selectedIconPath": "yuyue1",
+        "text": "扫码预约"
+      },{
+        "pagePath": "/pages/salesOrderMan/index",
+        "iconPath": "yundans",
+        "selectedIconPath": "yundans-fill",
+        "text": "物流订单"
+      },{
+        "pagePath": "/pages/mine/index",
+        "iconPath": "wode2",
+        "selectedIconPath": "wode-active",
+        "text": "我的"
+      }],
+    }],
+
+  }
+})

+ 104 - 0
app.json

@@ -0,0 +1,104 @@
+{
+  "pages": [
+    "pages/workstand/index",
+    "pages/index/index",
+    "pages/index/add",
+    "pages/index/edit",
+    "pages/index/info",
+    "pages/index/signFor",
+    "pages/index/sign",
+    "pages/temporary/add",
+    "pages/temporary/edit",
+    "pages/queueCar/index",
+    "pages/queueCar/info",
+    "pages/queueCar/adjustOrder",  
+    "pages/weighingRecord/index",
+    "pages/weighingRecord/info",
+    "pages/mine/index",
+    "pages/car/index",
+    "pages/car/add",
+    "pages/car/edit",
+    "pages/car/info",
+    "pages/login/index",
+    "pages/register/index",
+    "pages/updatePass/index",
+    "pages/updateInfo/index",
+    "pages/sign/index",
+    "pages/deliveryConfirm/index",
+    "pages/deliveryConfirm/info",
+    "pages/salesOrderMan/index",
+    "pages/salesOrderMan/info",
+    "pages/salesOrderMan/add",
+    "pages/salesOrderMan/edit",
+    "pages/salesOrderMan/orderloadAdd",
+    "pages/salesOrderMan/orderloadReplace",
+    "pages/signReview/index",
+    "pages/signReview/info",
+    "pages/signReview/sign",
+    "pages/reservationMan/index",
+    "pages/reservationMan/info",
+    "pages/operationExecution/index",
+    "pages/operationExecution/info",
+    "pages/operationExecution/production",
+    "pages/operationExecution/waterHandle",
+    "pages/operationExecution/hygieneHandle"
+
+  ],
+
+  "subpackages": [
+    {
+      "root": "otherPages",
+      "name": "other",
+      "pages": [
+        "upDownAllocation/index",
+        "upDownAllocation/allocation",
+        "upDownAllocation/info",
+
+        "repairDispatch/index",
+        "repairDispatch/dispatch",
+        "repairDispatch/info",
+
+        "upDownSubmit/index",
+        "upDownSubmit/info",
+        "upDownSubmit/sign",
+        
+        "workTask/index",
+        "workTask/info",
+
+        "reportFault/index",
+        "reportFault/info",
+        "reportFault/report",
+
+        "parkConfig/index"
+
+      ],
+      "independent": false
+    }
+  ],
+  "window": {
+    "backgroundTextStyle": "light",
+    "navigationBarBackgroundColor": "#fff",
+    "navigationBarTitleText": "湖南泽宇智能物料系统",
+    "navigationBarTextStyle": "black"
+  },
+  "tabBar": {
+    "backgroundColor": "#ffffff",
+    "color": "#999999",
+    "selectedColor": "#4B70EA",
+    "custom": false,
+    "list": [{
+      "pagePath": "pages/workstand/index",
+      "iconPath": "/images/tabbar1.png",
+      "selectedIconPath": "/images/tabbar_active1.png",
+      "text": "首页"
+    },
+      {
+        "pagePath": "pages/mine/index",
+        "iconPath": "/images/tabbar3.png",
+        "selectedIconPath": "/images/tabbar_active3.png",
+        "text": "我的"
+      }
+    ]
+  },
+  "sitemapLocation": "sitemap.json"
+}

+ 303 - 0
app.wxss

@@ -0,0 +1,303 @@
+/**app.wxss**/
+@import '/utils/iconfont.wxss';
+/* @import '@vant/weapp/common/index.wxss'; */
+@import '/miniprogram_npm/@vant/weapp/common/index.wxss'; 
+page {
+  --theme-color:#3764FF;/* 主题颜色 */
+  --theme-primary-color: #3254FD; /* 主题次颜色 */
+  --secondary-color: #666; /* 辅助颜色 */
+
+  --main-font-size: 32rpx;/* 主要文本大小 */
+  --large-font-size: 36rpx;/* 大文本大小 */
+  --normal-font-size: 28rpx;/* 小文本大小 */
+  --samll-font-size: 24rpx;/* 小文本大小 */
+  
+  --main-font-color: #14284A;
+  --secondary-font-color:#6E7695;
+  --other-font-color:#646566;
+
+  --nav-bar-icon-color: rgba(0,0,0,0.9);
+  --main-bg-color: #F6F7F9;/* 背景颜色 */
+  --normal-bg-color: #FFFFFF;
+
+  --spacing-unit: 20rpx; /* 间距单位 */
+  --border-color: #F1F1F1; /* 边框颜色 */
+  --main-border-radius: 16rpx; /* 圆角大小 */
+  --box-shadow:rgba(156,166,202,0.3);/* 阴影颜色 */
+
+  --main-width700:700rpx;
+  --main-width600: 600rpx;
+
+  --default-color:#20A0E3;
+  --primary-color:#26CA83;
+  --warning-color:#FF9237;
+  --danger-color:#FF6160;
+  --other-color:#999999;
+  --default-bg-color:rgba(78,187,245,0.08);
+  --primary-bg-color:rgba(38,202,131,0.1);
+  --warning-bg-color:rgba(255,146,55,0.08);
+  --danger-bg-color:rgba(255,97,96,0.1);
+  --other-bg-color:rgba(238,238,238,1);
+}
+.container {
+  min-height: 100vh;
+  box-sizing: border-box;
+  background: #F6F7F9;
+}
+.paddingBottom120{
+  padding-bottom: calc(50px + env(safe-area-inset-bottom));
+}
+.height20{
+  height: 20rpx;
+}
+.queueNumber {
+  display: inline-block;
+  color: #07c160;
+  font-weight: bold;
+  padding-left: 30rpx;
+}
+/* 状态标签设置 */
+.status{
+  float: right;
+  display: inline-block;
+  padding: 0 18rpx;
+  font-size: 24rpx;
+  color: var(--default-color);
+  background-color: var(--default-bg-color);
+}
+.status1,.status7,.orderStatus2,.carStatus1,.orderType2{
+  color: var(--primary-color) !important;
+  background-color: var(--primary-bg-color) !important;
+}
+.status2,.status8,.orderStatus3{
+  color: var(--warning-color) !important;
+  background-color: var(--warning-bg-color) !important;
+}
+.status3,.status9,.orderStatus6,.carStatus2{
+  color: var(--danger-color) !important;
+  background-color: var(--danger-bg-color) !important;
+}
+.status10,.status14,.orderStatus7{
+  color: var(--other-color) !important;
+  background-color: var(--other-bg-color) !important;
+}
+.status4,.status5,.status11,.orderStatus5{
+  color: rgb(45, 85, 255,1) !important;
+  background-color: rgb(45, 85, 255, 0.1) !important;
+}
+.status6,.status12{
+  color: rgb(165, 55, 253,1) !important;
+  background-color: rgb(165, 55, 253, 0.1) !important;
+}
+.status13,.orderStatus4{
+  color: rgb(20, 205, 200,1) !important;
+  background-color: rgb(20, 205, 200, 0.1) !important;
+}
+.status15{
+  color: rgb(207, 47, 116, 1) !important;
+  background-color: rgb(207, 47, 116, 0.1) !important;
+}
+/* 搜索框 */
+.topSeach {
+  display: flex;
+  background-color: #fff;
+  padding-right: 12px;
+}
+
+.topSeach .rightBox {
+  flex: 1;
+}
+
+.topSeach .left {
+  padding: 20rpx 0 20rpx 20rpx;
+}
+.topSeach .left view {
+  width: 120rpx;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 28rpx;
+  border: 1px solid #eee;
+  color: #333;
+  white-space: nowrap;
+  border-radius: 20rpx;
+}
+.topSeach .iconfont-arrow3-right_fill{
+  position: absolute;
+  top: 26rpx;
+  right: 10rpx;
+  z-index: 99;
+}
+.topSeacherPicker {
+  width: 130rpx;
+  height: 64rpx;
+  line-height: 64rpx;
+  padding: 0 24rpx;
+  font-size: 24rpx;
+  text-align: center;
+  border-radius: 44rpx 0px 0px 44rpx;
+  border: 2rpx solid rgba(0, 0, 0, 0.15);
+}
+
+/* 车牌颜色 */
+.licensePlate{
+  display: inline-block;
+  margin-left: 12rpx;
+  width: 36rpx;
+  min-width: 36rpx;
+  height: 36rpx;
+  line-height: 36rpx;
+  font-size: 24rpx;
+  text-align: center;
+  font-weight: normal;
+  border-radius: 4rpx 4rpx 4rpx 4rpx;
+}
+.yellow_licensePlate{
+  color: #FAAD14;
+  background: rgba(250,173,20,0.1);
+}
+.blue_licensePlate{
+  color: #375EDF;
+  background: rgba(55,94,223,0.1);
+}
+.green_licensePlate{
+  color: #52C41A;
+  background: rgba(82,196,26,0.1);
+}
+.white_licensePlate{
+  color: #FAAD14;
+  background: rgba(250,173,20,0.1);
+}
+.other_licensePlate{
+  color: #FAAD14;
+  background: rgba(250,173,20,0.1);
+  white-space: nowrap;
+}
+/* 底部加载动画和提示 */
+.more {
+  text-align: center;
+  padding: 20rpx 0;
+  color: #666;
+  font-size: 28rpx;
+}
+/* 提交按钮 */
+.submitBtn {
+  width: 520rpx;
+  margin: 0rpx auto;
+}
+
+/* 图片上传时高度自适应 */
+.checkbox {
+  height: auto;
+}
+
+.checkboxView .van-cell__value,
+.checkbox .van-field__control--custom {
+  height: auto;
+}
+
+/* 右下角新增按钮 */
+.addBtn {
+  width: 60px;
+  height: 60px;
+  line-height: 60px;
+  position: fixed;
+  right: 72rpx;
+  bottom: 160rpx;
+  background: linear-gradient(217deg, #27B5FF 0%, #317DFF 100%);
+  box-shadow: 0rpx 8rpx 16rpx 2rpx rgba(49, 125, 255, 0.16);
+  color: #fff;
+  text-align: center;
+  border-radius: 50%;
+  z-index: 2;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+/* 提交按钮 */
+.fixedBtn {
+  position: fixed;
+  width: 100%;
+  left: 0;
+  bottom: 0;
+  background-color: #fff;
+  padding: 20rpx 30rpx calc(20rpx + env(safe-area-inset-bottom)) 30rpx;
+  box-shadow: -1px -1px 10rpx #eee;
+  box-sizing: border-box;
+}
+
+/* 预约列表样式S */
+.listItem {
+  margin: 20rpx auto;
+  padding: 30rpx 28rpx;
+  box-sizing: border-box;
+  background: #fff;
+  box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(221, 224, 228, 0.1);
+  border-radius: 16rpx 16rpx 16rpx 16rpx;
+}
+
+.listItem .title {
+  line-height: 50rpx;
+  font-size: 36rpx;
+  color: #333333;
+}
+.listItem .van-icon__image  {
+  vertical-align: middle;
+  margin-top: -6rpx;
+}
+.listItem .title text{
+  margin-left: 10rpx;
+}
+.listItem .info{
+  color: #999;
+  font-size: 20rpx;
+  margin-top: 12rpx;
+  white-space:break-spaces;
+}
+.listItem .info text{
+  margin-right: 20rpx;
+  font-size: 24rpx;
+}
+.listItem .time {
+  margin-top: 12rpx;
+}
+
+.listItem .time text:first-child {
+  font-size: 24rpx;
+  color: #999999;
+}
+
+.listItem .time .state {
+  float: right;
+}
+.listItem .bottomBtn{
+  margin-top: 16rpx;
+  padding-top: 20rpx;
+  text-align: right;
+  border-top: 1rpx solid rgba(0,0,0,0.08);
+}
+.listItem .bottomBtn button {
+  margin-left: 0 !important;
+}
+/* 表单根据内容自动调整高度 */
+.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;
+}
+/* 图片上传时高度自适应 */
+.uploadBox {
+  height: auto;
+}
+.uploadboxView .van-cell__value,
+.uploadBox .van-field__control--custom {
+  height: auto;
+}

+ 326 - 0
components/CarNumInput/index.js

@@ -0,0 +1,326 @@
+// components/CarNumInput/index.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    isKeyboard: {
+      type: Boolean,
+      value: false,
+    },
+    isNewEnergy:{//是否显示新能源按钮
+      type: Boolean,
+      value: false,
+    },
+    inputPlates:{////默认显示车牌号
+      type: Object,
+      value: '',
+    },
+    inputOnFocusIndex:{
+      type: String,
+      value: '',
+    },
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    isLoading: false,
+    appUserId: "",
+    escapeOrderList: [],
+    carNumList: [],
+    hasOrder: false,
+    isKeyboard: false,//键盘弹窗显示
+    isNumberKB: true,
+    tapNum: false,
+    disableKey: "1234567890港澳学",
+    // keyboardNumber: "1234567890ABCDEFGHJKLMNPQRSTUVWXYZ港澳学",
+    keyboardNumber: "1234567890QWERTYUP港澳ASDFGHJKL学ZXCVBNM",
+    keyboard1: "渝川京沪粤津冀晋蒙辽吉黑苏浙皖闽赣鲁豫鄂湘桂琼贵云藏陕甘青宁新",
+    inputPlates: {
+      index0: "",
+      index1: "",
+      index2: "",
+      index3: "",
+      index4: "",
+      index5: "",
+      index6: "",
+      index7: ""
+    },
+    inputOnFocusIndex: "",
+    isNewEnergy: false,
+    carNum: ""
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    //切换车牌
+    changeplate: function (t) {
+      var that = this;
+      that.setData({
+        'inputPlates.index7':'',//切换是否是新能源时将其置空
+        isNewEnergy: !that.data.isNewEnergy,
+      });
+      this.tapKeyboard(t)
+      this.checkCarNum();
+    },
+    //切换车牌
+    changeplate1: function () {
+      var that = this;
+      that.setData({
+        flag: true,
+        inputPlates: {
+          index0: "",
+          index1: "",
+          index2: "",
+          index3: "",
+          index4: "",
+          index5: "",
+          index6: "",
+          index7: ""
+        },
+      })
+    },
+    inputClick: function (t) {
+      var that = this;
+      //console.log('输入框:', t);
+      //console.log('输入框:', t.target.dataset.id);
+
+      if (t.target.dataset.id == 0) {
+        that.setData({
+          inputOnFocusIndex: t.target.dataset.id,
+          isNumberKB: true,
+          isKeyboard: true,
+          tapNum: false,
+        })
+      };
+      if (t.target.dataset.id == 1) {
+        that.setData({
+          inputOnFocusIndex: t.target.dataset.id,
+          isNumberKB: false,
+          isKeyboard: true,
+          tapNum: false,
+        })
+      }
+      if (t.target.dataset.id > 1) {
+        that.setData({
+          inputOnFocusIndex: t.target.dataset.id,
+          isNumberKB: false,
+          isKeyboard: true,
+          tapNum: true,
+        })
+      }
+    },
+    //键盘点击事件
+    tapKeyboard: function (t) {
+      t.target.dataset.index;
+      var a = t.target.dataset.val;
+      //console.log("data",this.data);
+      //console.log('键盘:',a);
+      //console.log("index",t.target.dataset.index);
+      //console.log("focus",this.data.inputOnFocusIndex);
+      switch (parseInt(this.data.inputOnFocusIndex)) {
+        case 0:
+          this.setData({
+            "inputPlates.index0": a,
+            inputOnFocusIndex: "1"
+          });
+          break;
+        case 1:
+          this.setData({
+            "inputPlates.index1": a,
+            inputOnFocusIndex: "2"
+          });
+          break;
+        case 2:
+          this.setData({
+            "inputPlates.index2": a,
+            inputOnFocusIndex: "3"
+          });
+          break;
+        case 3:
+          this.setData({
+            "inputPlates.index3": a,
+            inputOnFocusIndex: "4"
+          });
+          break;
+        case 4:
+          this.setData({
+            "inputPlates.index4": a,
+            inputOnFocusIndex: "5"
+          });
+          break;
+        case 5:
+          this.setData({
+            "inputPlates.index5": a,
+            inputOnFocusIndex: "6"
+          });
+          break;
+        case 6:
+          this.setData({
+            "inputPlates.index6": a,
+            inputOnFocusIndex: "7"
+          });
+          break;
+        case 7:
+          this.setData({
+            "inputPlates.index7": a,
+            inputOnFocusIndex: "7"
+          });
+      }
+      var n = this.data.inputPlates.index0 + this.data.inputPlates.index1 + this.data.inputPlates.index2 + this.data.inputPlates.index3 + this.data.inputPlates.index4 + this.data.inputPlates.index5 + this.data.inputPlates.index6
+      if(this.data.isNewEnergy&&this.data.inputPlates.index7){
+        n = n + this.data.inputPlates.index7
+      }
+      // console.log('车牌号:', n, '--',this.data.inputPlates.index7);
+      this.data.carNum = n;
+      this.checkedSubmitButtonEnabled();
+      this.checkCarNum();
+
+    },
+    //键盘关闭按钮点击事件
+    tapSpecBtn: function (t) {
+      var a = this,
+        e = t.target.dataset.index;
+      if (0 == e) {
+        switch (parseInt(this.data.inputOnFocusIndex)) {
+          case 0:
+            this.setData({
+              "inputPlates.index0": "",
+              inputOnFocusIndex: "0"
+            });
+            break;
+          case 1:
+            this.setData({
+              "inputPlates.index1": "",
+              inputOnFocusIndex: "0"
+            });
+            break;
+          case 2:
+            this.setData({
+              "inputPlates.index2": "",
+              inputOnFocusIndex: "1"
+            });
+            break;
+          case 3:
+            this.setData({
+              "inputPlates.index3": "",
+              inputOnFocusIndex: "2"
+            });
+            break;
+          case 4:
+            this.setData({
+              "inputPlates.index4": "",
+              inputOnFocusIndex: "3"
+            });
+            break;
+          case 5:
+            this.setData({
+              "inputPlates.index5": "",
+              inputOnFocusIndex: "4"
+            });
+            break;
+          case 6:
+            this.setData({
+              "inputPlates.index6": "",
+              inputOnFocusIndex: "5"
+            });
+            break;
+          case 7:
+            this.setData({
+              "inputPlates.index7": "",
+              inputOnFocusIndex: "6"
+            });
+        }
+        this.checkedSubmitButtonEnabled();
+      } else 1 == e && a.setData({
+        isKeyboard: !1,
+        isNumberKB: !1,
+        inputOnFocusIndex: ""
+      });
+      var n = ''
+      if(this.data.inputPlates){
+        n = this.data.inputPlates.index0 + this.data.inputPlates.index1 + this.data.inputPlates.index2 + this.data.inputPlates.index3 + this.data.inputPlates.index4 + this.data.inputPlates.index5 + this.data.inputPlates.index6
+        if(this.data.isNewEnergy&&this.data.inputPlates.index7){
+          n = n + this.data.inputPlates.index7
+        }
+      }
+      
+      //console.log('车牌号:', n);
+      this.data.carNum = n;
+      this.checkCarNum();
+    },
+    //键盘切换
+    checkedKeyboard: function () {
+      var t = this;
+      //console.log("键盘切换", this.data.inputOnFocusIndex);
+      if (this.data.inputOnFocusIndex == 0) {
+        t.setData({
+          tapNum: false,
+          isNumberKB: true
+        })
+      }
+      if (this.data.inputOnFocusIndex == 1) {
+        t.setData({
+          tapNum: false,
+          isNumberKB: false
+        })
+      }
+      if (this.data.inputOnFocusIndex > 1) {
+        t.setData({
+          tapNum: true,
+          isNumberKB: false
+        })
+      }
+    },
+    checkedSubmitButtonEnabled: function () {
+      this.checkedKeyboard();
+      var t = !0;
+      for (var a in this.data.inputPlates)
+        if ("index7" != a && this.data.inputPlates[a].length < 1) {
+          t = !1;
+          break;
+        }
+    },
+    //校验车牌号-车牌输入限制了正确格式只判断车牌位数
+    checkCarNum: function () {
+      if (this.data.isNewEnergy && this.data.carNum.length < 8) {
+        let res = {
+          carNum: this.data.carNum,
+          isPlate: false
+        }
+        this.triggerEvent("setCarNum", res);
+        return false
+      }
+      if (!this.data.isNewEnergy) {
+        if (this.data.carNum.length < 7) {
+          let res = {
+            carNum: this.data.carNum,
+            isPlate: false
+          }
+          this.triggerEvent("setCarNum", res);
+          return false
+        } else {
+          var carNum = this.data.carNum.substr(0, 7);
+          let res = {
+            carNum: carNum,
+            isPlate: true
+          }
+          this.triggerEvent("setCarNum", res);
+          return true;
+        }
+      }
+      let res = {
+        carNum: this.data.carNum,
+        isPlate: true
+      }
+      this.triggerEvent("setCarNum", res);
+      return true;
+    }
+
+  }
+
+})

+ 6 - 0
components/CarNumInput/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    
+  }
+}

+ 147 - 0
components/CarNumInput/index.wxml

@@ -0,0 +1,147 @@
+<!--components/CarNumInput/index.wxml-->
+<view class="con-query">
+  <view class='plate-input-text' bindtap='changeplate'>
+  </view>
+  <view class="plate-input-body">
+    <view class="plate-input-content">
+      <view class="{{inputOnFocusIndex=='0'?'plate-nums-foc':'plate-nums-first'}}">
+        <text bindtap="inputClick" class="plate-num-text" data-id="0">{{inputPlates.index0}}</text>
+      </view>
+      <view class="{{inputOnFocusIndex=='1'?'plate-nums-foc':'plate-nums-first'}}">
+        <text bindtap="inputClick" class="plate-num-text" data-id="1">{{inputPlates.index1}}</text>
+      </view>
+      <view style="width:8px;height:38px;line-height:38px;margin-right: 4rpx;">-</view>
+      <view class="{{inputOnFocusIndex=='2'?'plate-nums-foc':'plate-nums-first'}}">
+        <text bindtap="inputClick" class="plate-num-text" data-id="2">{{inputPlates.index2}}</text>
+      </view>
+
+      <view class="{{inputOnFocusIndex=='3'?'plate-nums-foc':'plate-nums-first'}}">
+        <text bindtap="inputClick" class="plate-num-text" data-id="3">{{inputPlates.index3}}</text>
+      </view>
+      <view class="{{inputOnFocusIndex=='4'?'plate-nums-foc':'plate-nums-first'}}">
+        <text bindtap="inputClick" class="plate-num-text" data-id="4">{{inputPlates.index4}}</text>
+      </view>
+
+      <view class="{{inputOnFocusIndex=='5'?'plate-nums-foc':'plate-nums-first'}}">
+        <text bindtap="inputClick" class="plate-num-text" data-id="5">{{inputPlates.index5}}</text>
+      </view>
+      <view class="{{inputOnFocusIndex=='6'?'plate-nums-foc':'plate-nums-first'}}">
+        <text bindtap="inputClick" class="plate-num-text" data-id="6">{{inputPlates.index6}}</text>
+      </view>
+      <!-- 新能源 -->
+      <view class="plate-nums-IsEng {{inputOnFocusIndex=='7'?'plate-nums-foc':'plate-nums-first'}}" wx:if="{{isNewEnergy}}">
+        <text bindtap="inputClick" class="plate-num-text" data-id="7">{{inputPlates.index7}}</text>
+        <text class="delNewEng" data-id="7" bindtap='changeplate'>-</text>
+      </view>
+      <view wx:else class="plate-nums-nullEng {{inputOnFocusIndex=='7'?'plate-nums-foc':'plate-nums-first'}}" data-id="7" bindtap='changeplate'>
+        <text>新能源</text>
+      </view>
+
+    </view>
+  </view>
+  <!-- 用于切换新能源的按钮 -->
+  <!-- <view class='plate-input-flag' bindtap='changeplate'>
+    <text wx:if="{{isNewEnergy}}" class="new-energy">-新能源</text>
+    <text wx:if="{{!isNewEnergy}}" class="new-energy">+新能源</text>
+  </view> -->
+</view>
+
+<view class="keyboard" wx:if="{{isKeyboard}}">
+  <view class="kb_top">
+    <text catchtap="tapSpecBtn" data-index="1" style="position:absolute;right:0;display:block;height:74rpx;padding:0 34rpx; color:#FFB93F;line-height:74rpx; font-size: 30rpx;">关闭</text>
+  </view>
+
+  <view style="width:100%; text-align:center;" wx:if="{{isNumberKB}}">
+    <view style="width:99%;display:flex;text-align:center;margin:0 auto">
+      <view catchtap="tapKeyboard" class="td td_nor" data-index="{{idx}}" data-val="{{itemName}}" hoverClass="board_bg" hoverStartTime="0" hoverStayTime="80" wx:if="{{idx<=9}}" wx:for="{{keyboard1}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
+        {{itemName}}
+      </view>
+    </view>
+    <view style="display:flex;text-align:center; width:90%;margin:0 auto">
+      <view catchtap="tapKeyboard" class="td td_nor" data-index="{{idx}}" data-val="{{itemName}}" hoverClass="board_bg" hoverStartTime="0" hoverStayTime="80" wx:if="{{idx<=18&&idx>9}}" wx:for="{{keyboard1}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
+        {{itemName}}
+      </view>
+    </view>
+
+    <view style="display:flex;text-align:center; width:70%;margin:0 auto">
+      <view catchtap="tapKeyboard" class="td td_nor" data-index="{{idx}}" data-val="{{itemName}}" hoverClass="board_bg" hoverStartTime="0" hoverStayTime="80" wx:if="{{idx<=25&&idx>18}}" wx:for="{{keyboard1}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
+        {{itemName}}
+      </view>
+    </view>
+
+    <view style="display:flex; width:50%;margin:0 auto;text-align:center;">
+      <view catchtap="tapKeyboard" class="td td_nor" data-index="{{idx}}" data-val="{{itemName}}" hoverClass="board_bg" hoverStartTime="0" hoverStayTime="80" wx:if="{{idx>25}}" wx:for="{{keyboard1}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
+        {{itemName}}
+      </view>
+    </view>
+
+    <view bindtap="tapSpecBtn" class="del-first" data-index="0" hoverClass="del-hover" hoverStartTime="0" hoverStayTime="80">
+      <image class="del-img" data-index="0" mode="scaleToFill" src="../../images/delete.png"></image>
+    </view>
+  </view>
+
+  <view style="width:100%; text-align:center;" wx:if="{{!isNumberKB}}">
+    <view style="width:99%;display:flex;text-align:center;margin:0 auto">
+      <view class="td td_num board_bg" wx:if="{{!tapNum&&idx<=9}}" wx:for="{{keyboardNumber}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
+        {{itemName}}
+      </view>
+    </view>
+    <view style="width:99%;display:flex;text-align:center;margin:0 auto">
+      <view catchtap="tapKeyboard" class="td td_num" data-index="{{idx}}" data-val="{{itemName}}" hoverClass="board_bg" hoverStartTime="0" hoverStayTime="80" wx:if="{{tapNum&&idx<=9}}" wx:for="{{keyboardNumber}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
+        {{itemName}}
+      </view>
+
+    </view>
+
+    <view style="width:99%;display:flex;text-align:center;margin:0 auto">
+      <view catchtap="tapKeyboard" class="td td_num" data-index="{{idx}}" data-val="{{itemName}}" hoverClass="board_bg" hoverStartTime="0" hoverStayTime="80" wx:if="{{idx>9&&idx<=17}}" wx:for="{{keyboardNumber}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
+        {{itemName}}
+      </view>
+      <view catchtap="tapKeyboard" class="td td_num" data-index="{{idx}}" data-val="{{itemName}}" hoverClass="board_bg" hoverStartTime="0" hoverStayTime="80" wx:if="{{tapNum&&18<=idx&&idx<=19}}" wx:for="{{keyboardNumber}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
+        {{itemName}}
+      </view>
+      <view class="td td_num board_bg" wx:if="{{!tapNum&&18<=idx&&idx<=19}}" wx:for="{{keyboardNumber}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
+        {{itemName}}
+      </view>
+    </view>
+
+    <view style="width:99%;display:flex;text-align:center;margin:0 auto">
+      <view catchtap="tapKeyboard" class="td td_num" data-index="{{idx}}" data-val="{{itemName}}" hoverClass="board_bg" hoverStartTime="0" hoverStayTime="80" wx:if="{{idx>19&&idx<=28}}" wx:for="{{keyboardNumber}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
+        {{itemName}}
+      </view>
+
+      <view catchtap="tapKeyboard" class="td td_num" data-index="{{idx}}" data-val="{{itemName}}" hoverClass="board_bg" hoverStartTime="0" hoverStayTime="80" wx:if="{{tapNum&&29==idx}}" wx:for="{{keyboardNumber}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
+        {{itemName}}
+      </view>
+
+      <view class="td td_num board_bg" wx:if="{{!tapNum&&29==idx}}" wx:for="{{keyboardNumber}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
+        {{itemName}}
+      </view>
+
+    </view>
+    <view style="width:69%;display:flex;text-align:left; margin-left:5rpx;">
+      <view catchtap="tapKeyboard" class="td td_num" data-index="{{idx}}" data-val="{{itemName}}" hoverClass="board_bg" hoverStartTime="0" hoverStayTime="80" wx:if="{{idx>29}}" wx:for="{{keyboardNumber}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
+        {{itemName}}
+      </view>
+    </view>
+
+    <view bindtap="tapSpecBtn" class="del-first" data-index="0" hoverClass="del-hover" hoverStartTime="0" hoverStayTime="80">
+      <image class="del-img" data-index="0" mode="scaleToFill" src="../../images/delete.png"></image>
+    </view>
+
+  </view>
+
+</view>
+
+<!-- 使用方法
+<car-num-input bind:setCarNum="getCarNum"></car-num-input>
+引用
+ "car-num-input": "/components/CarNumInput/index",
+//获取值
+   getCarNum: function (e) {
+    this.setData({
+      getCarNum: e.detail.carNum
+    })
+    console.log('获取值:', e.detail.carNum)
+  },
+ -->

+ 241 - 0
components/CarNumInput/index.wxss

@@ -0,0 +1,241 @@
+/* components/CarNumInput/index.wxss */
+page {
+  background: #FFFFFF;
+  width: 100%;
+  height: 100%;
+}
+view{
+  box-sizing: border-box;
+}
+.con-query {
+  /* height: 4.8rem; */
+  width:100%;
+  border-radius: 8px;
+  background-color: #FFF;
+}
+
+.pages_header {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+.pages_header_top {
+  width: 33.3%;
+  height: 60rpx;
+  border-left: 5px solid green;
+  border-right: 5px solid green;
+}
+
+.pages_header_btm {
+  width: 70%;
+  background: green;
+  height: 120rpx;
+  line-height: 120rpx;
+  text-align: center;
+  color: white;
+  border-radius: 10rpx;
+  font-weight: normal;
+  font-size: 16pt;
+}
+
+.tips {
+  text-align: center;
+  margin: 60rpx 0;
+  font-size: 12pt;
+  color: #888888;
+  
+}
+.plate-input-text{
+  text-align: center;
+  line-height: 90rpx;
+  color: #f39900;
+}
+.plate-input-flag {
+  float: right;
+  margin-right: 6%;
+  font-size: 12px;
+}
+.plate-input-flag .new-energy{
+  color: #14c414;
+}
+.plate-input-body {
+  /*border: 1px solid red;*/
+  height: 80rpx;
+  width: 88%;
+  /* margin: 0 6% 2px 6%; */
+  margin: 0 auto;
+}
+.plate-input-content {
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  height: 70rpx;
+}
+.plate-input-content > view:first-child{
+  margin-left: 8rpx;
+}
+
+.plate-nums-foc {
+  flex: 1;
+  border: 2rpx solid #FFB93F;
+  margin: 0 5rpx 0 5rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  text-align: center;
+  height: 100%;
+  box-sizing: border-box;
+  border-radius: 4rpx;
+}
+
+.plate-nums-first{
+  flex: 1;
+  border: 1rpx solid #CCCCCC;
+  margin: 0 6rpx 0 6rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  text-align: center;
+  height: 100%;
+  box-sizing: border-box;
+}
+
+.plate-num-text {
+ flex: 1;
+ line-height: 70rpx;
+ height: 100%;
+ box-sizing: border-box;
+ font-size: 40rpx;
+ font-weight: 300;
+}
+
+.new-plate-input-content{
+display: flex;
+flex-direction: row;
+height: 100rpx;
+}
+
+.kb_top {
+ align-content: relative;
+ width: 100%;
+ height: 74rpx;
+ background: #fff;
+ border-top: solid #ebebeb 2rpx;
+ border-bottom: 15rpx solid #F4F4F4;
+}
+
+.keyboard {
+ z-index: 9999;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: auto;
+ background: #F4F4F4;
+ display: flex;
+ flex-wrap: wrap;
+ border-bottom: 15rpx solid #F4F4F4;
+}
+
+.td {
+ font-family: "微软雅黑";
+ flex-grow: 1;
+ text-align: center;
+ font-size: 34rpx;
+ height: 86rpx;
+ line-height: 80rpx;
+ background: #fff;
+ margin: 10rpx 5rpx;
+ color: #333;
+ border-radius: 2rpx;
+ box-shadow: 0rpx 2rpx 0rpx #a9a9a9;
+}
+
+.td_nor {
+ flex: 1 1 6%;
+}
+
+.td_num {
+ flex: 1 1 8%;
+}
+
+.td_spec {
+ flex: 1 1 12%;
+}
+
+.board_bg {
+ box-shadow: 0 0 0 #e5e5e5;
+ background: #e5e5e5;
+}
+.del-first {
+ position: absolute;
+ bottom: 10rpx;
+ right: 10rpx;
+ width: 100rpx;
+ height: 86rpx;
+ background-color: #fff;
+ box-shadow: 0rpx 2rpx 0rpx #a9a9a9;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 10rpx;
+}
+
+.del-hover {
+ position: absolute;
+ bottom: 10rpx;
+ right: 10rpx;
+ width: 137rpx;
+ height: 86rpx;
+ background-color: #e5e5e5;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 10rpx;
+ box-shadow: 0 0 0 #e5e5e5;
+}
+.del-img {
+ display: block;
+ width: 46rpx;
+ height: 38rpx;
+}
+.color-white{
+  color: #FFFFFF;
+}
+
+.color-red{
+  color: #ff0000;
+}
+.bule{
+  color: #0000ff;
+}
+/* 不是新能源时显示虚线框不可输入 */
+.plate-nums-nullEng{
+  font-size: 8px;
+  border: 1px dashed #eee;
+  color: #14c414;
+}
+.plate-nums-IsEng{
+  position: relative;
+  color: #14c414;
+}
+.delNewEng{
+  position: absolute;
+  top: 0;
+  right: 10px;
+  transform: translateY(-50%) translateX(100%);
+  background-color: #FF5B5B;
+  border-radius: 10px;
+  color: #fff;
+  display: inline-block;
+  font-size: 12px;
+  height: 18px;
+  line-height: 18px;
+  padding: 0 6px;
+  text-align: center;
+  white-space: nowrap;
+  border: 1px solid #fff;
+  z-index: 99;
+}

+ 152 - 0
custom-tab-bar/index.js

@@ -0,0 +1,152 @@
+// components/custom-tab-bar/index.js
+Component({
+  data: {
+    selected: null,//null
+    color: "#000000",
+    roleId: '',
+    selectedColor: "#4B70EA",
+    allList: [{
+      list1: [{ //driver
+        "pagePath": "/pages/index/index",
+        "iconPath": "gonghuiyuyue-wodeyuyuelan",
+        "selectedIconPath": "yuyue1",
+        "text": "扫码预约"
+      },{
+        "pagePath": "/pages/weighingRecord/index",
+        "iconPath": "jiluliebiao",
+        "selectedIconPath": "jilu1",
+        "text": "过磅记录"
+      },{
+        "pagePath": "/pages/mine/index",
+        "iconPath": "wode2",
+        "selectedIconPath": "wode-active",
+        "text": "我的"
+      }],
+      list2: [{ //bizAdmin
+        "pagePath": "/pages/queueCar/index",
+        "iconPath": "paiduiguanli",
+        "selectedIconPath": "paiduiquhao",
+        "text": "排队车辆"
+      },{
+        "pagePath": "/pages/salesOrderMan/index",
+        "iconPath": "yundans",
+        "selectedIconPath": "yundans-fill",
+        "text": "物流订单"
+      },{
+        "pagePath": "/pages/reservationMan/index",
+        "iconPath": "gonghuiyuyue-wodeyuyuelan",
+        "selectedIconPath": "yuyue1",
+        "text": "预约管理"
+      },{
+        "pagePath": "/pages/weighingRecord/index",
+        "iconPath": "jiluliebiao",
+        "selectedIconPath": "jilu1",
+        "text": "过磅记录"
+      },{
+        "pagePath": "/pages/mine/index",
+        "iconPath": "wode2",
+        "selectedIconPath": "wode-active",
+        "text": "我的"
+      }],
+      list3: [{ //send
+        "pagePath": "/pages/deliveryConfirm/index",
+        "iconPath": "truck_line",
+        "selectedIconPath": "truck_fill",
+        "text": "发货确认"
+      },{
+        "pagePath": "/pages/mine/index",
+        "iconPath": "wode2",
+        "selectedIconPath": "wode-active",
+        "text": "我的"
+      }],
+      list4: [{ //sale
+        "pagePath": "/pages/salesOrderMan/index",
+        "iconPath": "yundans",
+        "selectedIconPath": "yundans-fill",
+        "text": "物流订单"
+      },{
+        "pagePath": "/pages/signReview/index",
+        "iconPath": "qianshoushenpitongguo-xianxing",
+        "selectedIconPath": "qianshoushenpitongguo",
+        "text": "签收审核"
+      },{
+        "pagePath": "/pages/mine/index",
+        "iconPath": "wode2",
+        "selectedIconPath": "wode-active",
+        "text": "我的"
+      }],
+      list5: [{ //customer
+        "pagePath": "/pages/index/index",
+        "iconPath": "gonghuiyuyue-wodeyuyuelan",
+        "selectedIconPath": "yuyue1",
+        "text": "扫码预约"
+      },{
+        "pagePath": "/pages/salesOrderMan/index",
+        "iconPath": "yundans",
+        "selectedIconPath": "yundans-fill",
+        "text": "物流订单"
+      },{
+        "pagePath": "/pages/mine/index",
+        "iconPath": "wode2",
+        "selectedIconPath": "wode-active",
+        "text": "我的"
+      }],
+    }],
+    list: []
+  },
+  attached() {
+    const roleCodeList = wx.getStorageSync('roleCodeList')
+    //角色编码: 业务管理员:bizAdmin 司机:driver 客户:customer 发货:send 销售:sale roleCodeList.includes('send')
+    if (roleCodeList=='bizAdmin') {
+      this.setData({
+        list: this.data.allList[0].list2
+      })
+    } else if (roleCodeList=='send') {
+      this.setData({
+        list: this.data.allList[0].list3
+      })
+    } else if (roleCodeList=='sale') {
+      this.setData({
+        list: this.data.allList[0].list4
+      })
+    } else if (roleCodeList=='customer') {
+      this.setData({
+        list: this.data.allList[0].list5
+      })
+    } else if (roleCodeList=='driver'||roleCodeList==''){
+      this.setData({
+        list: this.data.allList[0].list1
+      })
+    }
+
+    //替代switchTab里的setData,解决闪烁问题
+    // let pages = getCurrentPages()
+    // let page = pages[0].route,curSelect = 0
+    // if (page == 'pages/index/index') {
+    //   curSelect = 0 
+    // }else if (page == 'pages/weighingRecord/list') {
+    //   curSelect = 1
+    // }else if(page == 'pages/mine/index'){
+    //   if (roleCodeList == '1') {
+    //     curSelect = 2
+    //   }else{
+    //     curSelect = 1
+    //   }
+    // }
+    // this.setData({
+    //   selected:curSelect
+    // })
+  },
+  methods: {
+    switchTab(e) {
+      const data = e.currentTarget.dataset
+      const url = data.path
+      wx.switchTab({
+        url
+      })
+      this.setData({
+        selected: data.index
+      })
+    }
+  },
+})

+ 3 - 0
custom-tab-bar/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 9 - 0
custom-tab-bar/index.wxml

@@ -0,0 +1,9 @@
+<!--components/custom-tab-bar/index.wxml-->
+<view class="tab-bar">
+  <view class="tab-bar-border"></view>
+  <view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
+    <!-- <image class="cover-image" src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image> -->
+    <text class="cover-image icon iconfont iconfont-{{selected === index ? item.selectedIconPath + ' activeIcon' : item.iconPath}}"></text>
+    <view class="cover-view" style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</view>
+  </view>
+</view>

+ 47 - 0
custom-tab-bar/index.wxss

@@ -0,0 +1,47 @@
+/* components/custom-tab-bar/index.wxss */
+@import '/utils/iconfont.wxss';
+.tab-bar {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  height: 48px;
+  background: white;
+  display: flex;
+  padding-bottom: env(safe-area-inset-bottom);
+}
+
+.tab-bar-border {
+  background-color: rgba(0, 0, 0, 0.33);
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 1px;
+  transform: scaleY(0.5);
+}
+
+.tab-bar-item {
+  flex: 1;
+  text-align: center;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
+}
+.iconfont{
+  font-size: 20px;
+}
+.activeIcon{
+  color: #4B70EA;
+}
+.tab-bar-item .cover-image {
+  width: 44rpx;
+  height: 44rpx;
+  line-height: 44rpx;
+}
+
+.tab-bar-item .cover-view {
+  margin-top: 4rpx;
+  font-size: 10px;
+}

BIN
images/car.png


BIN
images/car2.png


BIN
images/carNum.png


BIN
images/codeNumber.png


BIN
images/consignee.png


BIN
images/dataStatisticsIcon2.png


BIN
images/delete.png


BIN
images/deviceIcon.png


BIN
images/drivermanage.png


BIN
images/edit.png


BIN
images/emptyNull.png


BIN
images/fhdw.png


BIN
images/forwardingUnit.png


BIN
images/gallerybanner.png


BIN
images/headerImg.png


BIN
images/icon_1.png


BIN
images/icon_10.png


BIN
images/icon_6.png


BIN
images/icon_7.png


BIN
images/icon_8.png


BIN
images/icon_9.png


BIN
images/info.png


BIN
images/licensePlate.png


BIN
images/licensePlate2.png


BIN
images/lock.png


BIN
images/loginImg.png


BIN
images/loginNull.png


BIN
images/logo.png


BIN
images/material.png


BIN
images/menuImg1.png


BIN
images/menuImg2.png


BIN
images/mineIcon1.png


BIN
images/mineIcon2.png


BIN
images/mineIcon7.png


BIN
images/mineIcon9.png


BIN
images/myself.png


BIN
images/null1.png


BIN
images/null2.png


BIN
images/null3.png


BIN
images/null4.png


BIN
images/null5.png


BIN
images/null6.png


BIN
images/null7.png


BIN
images/project.png


BIN
images/search-line.png


BIN
images/searchNull.png


BIN
images/shengchanruku.png


BIN
images/status1.png


BIN
images/status2.png


BIN
images/tabbar1.png


BIN
images/tabbar2.png


BIN
images/tabbar3.png


BIN
images/tabbar4.png


BIN
images/tabbar5.png


BIN
images/tabbar6.png


BIN
images/tabbar7.png


BIN
images/tabbar8.png


BIN
images/tabbar_active1.png


BIN
images/tabbar_active2.png


BIN
images/tabbar_active3.png


BIN
images/tabbar_active4.png


BIN
images/tabbar_active5.png


BIN
images/tabbar_active6.png


BIN
images/tabbar_active7.png


BIN
images/tabbar_active8.png


BIN
images/totalGrossWeight.png


BIN
images/totalNetWeight.png


BIN
images/totalTareWeight.png


BIN
images/transportUnit.png


+ 1 - 0
miniprogram_npm/@vant/weapp/action-sheet/index.d.ts

@@ -0,0 +1 @@
+export {};

+ 78 - 0
miniprogram_npm/@vant/weapp/action-sheet/index.js

@@ -0,0 +1,78 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var component_1 = require("../common/component");
+var button_1 = require("../mixins/button");
+(0, component_1.VantComponent)({
+    classes: ['list-class'],
+    mixins: [button_1.button],
+    props: {
+        show: Boolean,
+        title: String,
+        cancelText: String,
+        description: String,
+        round: {
+            type: Boolean,
+            value: true,
+        },
+        zIndex: {
+            type: Number,
+            value: 100,
+        },
+        actions: {
+            type: Array,
+            value: [],
+        },
+        overlay: {
+            type: Boolean,
+            value: true,
+        },
+        closeOnClickOverlay: {
+            type: Boolean,
+            value: true,
+        },
+        closeOnClickAction: {
+            type: Boolean,
+            value: true,
+        },
+        safeAreaInsetBottom: {
+            type: Boolean,
+            value: true,
+        },
+        rootPortal: {
+            type: Boolean,
+            value: false,
+        },
+    },
+    methods: {
+        onSelect: function (event) {
+            var _this = this;
+            var index = event.currentTarget.dataset.index;
+            var _a = this.data, actions = _a.actions, closeOnClickAction = _a.closeOnClickAction, canIUseGetUserProfile = _a.canIUseGetUserProfile;
+            var item = actions[index];
+            if (item) {
+                this.$emit('select', item);
+                if (closeOnClickAction) {
+                    this.onClose();
+                }
+                if (item.openType === 'getUserInfo' && canIUseGetUserProfile) {
+                    wx.getUserProfile({
+                        desc: item.getUserProfileDesc || '  ',
+                        complete: function (userProfile) {
+                            _this.$emit('getuserinfo', userProfile);
+                        },
+                    });
+                }
+            }
+        },
+        onCancel: function () {
+            this.$emit('cancel');
+        },
+        onClose: function () {
+            this.$emit('close');
+        },
+        onClickOverlay: function () {
+            this.$emit('click-overlay');
+            this.onClose();
+        },
+    },
+});

+ 8 - 0
miniprogram_npm/@vant/weapp/action-sheet/index.json

@@ -0,0 +1,8 @@
+{
+  "component": true,
+  "usingComponents": {
+    "van-icon": "../icon/index",
+    "van-popup": "../popup/index",
+    "van-loading": "../loading/index"
+  }
+}

+ 70 - 0
miniprogram_npm/@vant/weapp/action-sheet/index.wxml

@@ -0,0 +1,70 @@
+<wxs src="../wxs/utils.wxs" module="utils" />
+
+<van-popup
+  show="{{ show }}"
+  position="bottom"
+  round="{{ round }}"
+  z-index="{{ zIndex }}"
+  overlay="{{ overlay }}"
+  custom-class="van-action-sheet custom-class"
+  safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
+  close-on-click-overlay="{{ closeOnClickOverlay }}"
+  root-portal="{{ rootPortal }}"
+  bind:close="onClickOverlay"
+>
+  <view wx:if="{{ title }}" class="van-action-sheet__header">
+    {{ title }}
+    <van-icon
+      name="cross"
+      custom-class="van-action-sheet__close"
+      bind:click="onClose"
+    />
+  </view>
+  <view wx:if="{{ description }}" class="van-action-sheet__description van-hairline--bottom">
+    {{ description }}
+  </view>
+  <view wx:if="{{ actions && actions.length }}" class="list-class">
+    <!-- button外包一层view,防止actions动态变化,导致渲染时button被打散 -->
+    <button
+      wx:for="{{ actions }}"
+      wx:key="index"
+      open-type="{{ item.disabled || item.loading || (canIUseGetUserProfile && item.openType === 'getUserInfo') ? '' : item.openType }}"
+      style="{{ item.color ? 'color: ' + item.color : '' }}"
+      class="{{ utils.bem('action-sheet__item', { disabled: item.disabled || item.loading }) }} {{ item.className || '' }}"
+      hover-class="van-action-sheet__item--hover"
+      data-index="{{ index }}"
+      bindtap="{{ item.disabled || item.loading ? '' : 'onSelect' }}"
+      bindgetuserinfo="onGetUserInfo"
+      bindcontact="onContact"
+      bindgetphonenumber="onGetPhoneNumber"
+      binderror="onError"
+      bindlaunchapp="onLaunchApp"
+      bindopensetting="onOpenSetting"
+      lang="{{ lang }}"
+      session-from="{{ sessionFrom }}"
+      send-message-title="{{ sendMessageTitle }}"
+      send-message-path="{{ sendMessagePath }}"
+      send-message-img="{{ sendMessageImg }}"
+      show-message-card="{{ showMessageCard }}"
+      app-parameter="{{ appParameter }}"
+    >
+      <block wx:if="{{ !item.loading }}">
+        {{ item.name }}
+        <view wx:if="{{ item.subname }}" class="van-action-sheet__subname" >{{ item.subname }}</view>
+      </block>
+      <van-loading wx:else custom-class="van-action-sheet__loading" size="22px" />
+    </button>
+  </view>
+  <slot />
+  <block wx:if="{{ cancelText }}">
+    <view class="van-action-sheet__gap" />
+    <view
+      class="van-action-sheet__cancel"
+      hover-class="van-action-sheet__cancel--hover"
+      hover-stay-time="70"
+      bind:tap="onCancel"
+    >
+      {{ cancelText }}
+    </view>
+  </block>
+</van-popup>

+ 1 - 0
miniprogram_npm/@vant/weapp/action-sheet/index.wxss

@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-action-sheet{color:var(--action-sheet-item-text-color,#323233);max-height:var(--action-sheet-max-height,90%)!important}.van-action-sheet__cancel,.van-action-sheet__item{background-color:var(--action-sheet-item-background,#fff);font-size:var(--action-sheet-item-font-size,16px);line-height:var(--action-sheet-item-line-height,22px);padding:14px 16px;text-align:center}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5}.van-action-sheet__cancel:after,.van-action-sheet__item:after{border-width:0}.van-action-sheet__cancel{color:var(--action-sheet-cancel-text-color,#646566)}.van-action-sheet__gap{background-color:var(--action-sheet-cancel-padding-color,#f7f8fa);display:block;height:var(--action-sheet-cancel-padding-top,8px)}.van-action-sheet__item--disabled{color:var(--action-sheet-item-disabled-text-color,#c8c9cc)}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__subname{color:var(--action-sheet-subname-color,#969799);font-size:var(--action-sheet-subname-font-size,12px);line-height:var(--action-sheet-subname-line-height,20px);margin-top:var(--padding-xs,8px)}.van-action-sheet__header{font-size:var(--action-sheet-header-font-size,16px);font-weight:var(--font-weight-bold,500);line-height:var(--action-sheet-header-height,48px);text-align:center}.van-action-sheet__description{color:var(--action-sheet-description-color,#969799);font-size:var(--action-sheet-description-font-size,14px);line-height:var(--action-sheet-description-line-height,20px);padding:20px var(--padding-md,16px);text-align:center}.van-action-sheet__close{color:var(--action-sheet-close-icon-color,#c8c9cc);font-size:var(--action-sheet-close-icon-size,22px)!important;line-height:inherit!important;padding:var(--action-sheet-close-icon-padding,0 16px);position:absolute!important;right:0;top:0}.van-action-sheet__loading{display:flex!important}

+ 1 - 0
miniprogram_npm/@vant/weapp/area/index.d.ts

@@ -0,0 +1 @@
+export {};

+ 235 - 0
miniprogram_npm/@vant/weapp/area/index.js

@@ -0,0 +1,235 @@
+"use strict";
+var __assign = (this && this.__assign) || function () {
+    __assign = Object.assign || function(t) {
+        for (var s, i = 1, n = arguments.length; i < n; i++) {
+            s = arguments[i];
+            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
+                t[p] = s[p];
+        }
+        return t;
+    };
+    return __assign.apply(this, arguments);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var component_1 = require("../common/component");
+var shared_1 = require("../picker/shared");
+var utils_1 = require("../common/utils");
+var EMPTY_CODE = '000000';
+(0, component_1.VantComponent)({
+    classes: ['active-class', 'toolbar-class', 'column-class'],
+    props: __assign(__assign({}, shared_1.pickerProps), { showToolbar: {
+            type: Boolean,
+            value: true,
+        }, value: {
+            type: String,
+            observer: function (value) {
+                this.code = value;
+                this.setValues();
+            },
+        }, areaList: {
+            type: Object,
+            value: {},
+            observer: 'setValues',
+        }, columnsNum: {
+            type: null,
+            value: 3,
+        }, columnsPlaceholder: {
+            type: Array,
+            observer: function (val) {
+                this.setData({
+                    typeToColumnsPlaceholder: {
+                        province: val[0] || '',
+                        city: val[1] || '',
+                        county: val[2] || '',
+                    },
+                });
+            },
+        } }),
+    data: {
+        columns: [{ values: [] }, { values: [] }, { values: [] }],
+        typeToColumnsPlaceholder: {},
+    },
+    mounted: function () {
+        var _this = this;
+        (0, utils_1.requestAnimationFrame)(function () {
+            _this.setValues();
+        });
+    },
+    methods: {
+        getPicker: function () {
+            if (this.picker == null) {
+                this.picker = this.selectComponent('.van-area__picker');
+            }
+            return this.picker;
+        },
+        onCancel: function (event) {
+            this.emit('cancel', event.detail);
+        },
+        onConfirm: function (event) {
+            var index = event.detail.index;
+            var value = event.detail.value;
+            value = this.parseValues(value);
+            this.emit('confirm', { value: value, index: index });
+        },
+        emit: function (type, detail) {
+            detail.values = detail.value;
+            delete detail.value;
+            this.$emit(type, detail);
+        },
+        parseValues: function (values) {
+            var columnsPlaceholder = this.data.columnsPlaceholder;
+            return values.map(function (value, index) {
+                if (value &&
+                    (!value.code || value.name === columnsPlaceholder[index])) {
+                    return __assign(__assign({}, value), { code: '', name: '' });
+                }
+                return value;
+            });
+        },
+        onChange: function (event) {
+            var _this = this;
+            var _a;
+            var _b = event.detail, index = _b.index, picker = _b.picker, value = _b.value;
+            this.code = value[index].code;
+            (_a = this.setValues()) === null || _a === void 0 ? void 0 : _a.then(function () {
+                _this.$emit('change', {
+                    picker: picker,
+                    values: _this.parseValues(picker.getValues()),
+                    index: index,
+                });
+            });
+        },
+        getConfig: function (type) {
+            var areaList = this.data.areaList;
+            return (areaList && areaList["".concat(type, "_list")]) || {};
+        },
+        getList: function (type, code) {
+            if (type !== 'province' && !code) {
+                return [];
+            }
+            var typeToColumnsPlaceholder = this.data.typeToColumnsPlaceholder;
+            var list = this.getConfig(type);
+            var result = Object.keys(list).map(function (code) { return ({
+                code: code,
+                name: list[code],
+            }); });
+            if (code != null) {
+                // oversea code
+                if (code[0] === '9' && type === 'city') {
+                    code = '9';
+                }
+                result = result.filter(function (item) { return item.code.indexOf(code) === 0; });
+            }
+            if (typeToColumnsPlaceholder[type] && result.length) {
+                // set columns placeholder
+                var codeFill = type === 'province'
+                    ? ''
+                    : type === 'city'
+                        ? EMPTY_CODE.slice(2, 4)
+                        : EMPTY_CODE.slice(4, 6);
+                result.unshift({
+                    code: "".concat(code).concat(codeFill),
+                    name: typeToColumnsPlaceholder[type],
+                });
+            }
+            return result;
+        },
+        getIndex: function (type, code) {
+            var compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6;
+            var list = this.getList(type, code.slice(0, compareNum - 2));
+            // oversea code
+            if (code[0] === '9' && type === 'province') {
+                compareNum = 1;
+            }
+            code = code.slice(0, compareNum);
+            for (var i = 0; i < list.length; i++) {
+                if (list[i].code.slice(0, compareNum) === code) {
+                    return i;
+                }
+            }
+            return 0;
+        },
+        setValues: function () {
+            var picker = this.getPicker();
+            if (!picker) {
+                return;
+            }
+            var code = this.code || this.getDefaultCode();
+            var provinceList = this.getList('province');
+            var cityList = this.getList('city', code.slice(0, 2));
+            var stack = [];
+            var indexes = [];
+            var columnsNum = this.data.columnsNum;
+            if (columnsNum >= 1) {
+                stack.push(picker.setColumnValues(0, provinceList, false));
+                indexes.push(this.getIndex('province', code));
+            }
+            if (columnsNum >= 2) {
+                stack.push(picker.setColumnValues(1, cityList, false));
+                indexes.push(this.getIndex('city', code));
+                if (cityList.length && code.slice(2, 4) === '00') {
+                    code = cityList[0].code;
+                }
+            }
+            if (columnsNum === 3) {
+                stack.push(picker.setColumnValues(2, this.getList('county', code.slice(0, 4)), false));
+                indexes.push(this.getIndex('county', code));
+            }
+            return Promise.all(stack)
+                .catch(function () { })
+                .then(function () { return picker.setIndexes(indexes); })
+                .catch(function () { });
+        },
+        getDefaultCode: function () {
+            var columnsPlaceholder = this.data.columnsPlaceholder;
+            if (columnsPlaceholder.length) {
+                return EMPTY_CODE;
+            }
+            var countyCodes = Object.keys(this.getConfig('county'));
+            if (countyCodes[0]) {
+                return countyCodes[0];
+            }
+            var cityCodes = Object.keys(this.getConfig('city'));
+            if (cityCodes[0]) {
+                return cityCodes[0];
+            }
+            return '';
+        },
+        getValues: function () {
+            var picker = this.getPicker();
+            if (!picker) {
+                return [];
+            }
+            return this.parseValues(picker.getValues().filter(function (value) { return !!value; }));
+        },
+        getDetail: function () {
+            var values = this.getValues();
+            var area = {
+                code: '',
+                country: '',
+                province: '',
+                city: '',
+                county: '',
+            };
+            if (!values.length) {
+                return area;
+            }
+            var names = values.map(function (item) { return item.name; });
+            area.code = values[values.length - 1].code;
+            if (area.code[0] === '9') {
+                area.country = names[1] || '';
+                area.province = names[2] || '';
+            }
+            else {
+                area.province = names[0] || '';
+                area.city = names[1] || '';
+                area.county = names[2] || '';
+            }
+            return area;
+        },
+        reset: function (code) {
+            this.code = code || '';
+            return this.setValues();
+        },
+    },
+});

+ 6 - 0
miniprogram_npm/@vant/weapp/area/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "van-picker": "../picker/index"
+  }
+}

+ 20 - 0
miniprogram_npm/@vant/weapp/area/index.wxml

@@ -0,0 +1,20 @@
+<wxs src="./index.wxs" module="computed" />
+
+<van-picker
+  class="van-area__picker"
+  active-class="active-class"
+  toolbar-class="toolbar-class"
+  column-class="column-class"
+  show-toolbar="{{ showToolbar }}"
+  value-key="name"
+  title="{{ title }}"
+  loading="{{ loading }}"
+  columns="{{ computed.displayColumns(columns, columnsNum) }}"
+  item-height="{{ itemHeight }}"
+  visible-item-count="{{ visibleItemCount }}"
+  cancel-button-text="{{ cancelButtonText }}"
+  confirm-button-text="{{ confirmButtonText }}"
+  bind:change="onChange"
+  bind:confirm="onConfirm"
+  bind:cancel="onCancel"
+/>

+ 8 - 0
miniprogram_npm/@vant/weapp/area/index.wxs

@@ -0,0 +1,8 @@
+/* eslint-disable */
+function displayColumns(columns, columnsNum) {
+  return columns.slice(0, +columnsNum);
+}
+
+module.exports = {
+  displayColumns: displayColumns,
+};

+ 1 - 0
miniprogram_npm/@vant/weapp/area/index.wxss

@@ -0,0 +1 @@
+@import '../common/index.wxss';

+ 1 - 0
miniprogram_npm/@vant/weapp/button/index.d.ts

@@ -0,0 +1 @@
+export {};

+ 67 - 0
miniprogram_npm/@vant/weapp/button/index.js

@@ -0,0 +1,67 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var component_1 = require("../common/component");
+var button_1 = require("../mixins/button");
+var version_1 = require("../common/version");
+var mixins = [button_1.button];
+if ((0, version_1.canIUseFormFieldButton)()) {
+    mixins.push('wx://form-field-button');
+}
+(0, component_1.VantComponent)({
+    mixins: mixins,
+    classes: ['hover-class', 'loading-class'],
+    data: {
+        baseStyle: '',
+    },
+    props: {
+        formType: String,
+        icon: String,
+        classPrefix: {
+            type: String,
+            value: 'van-icon',
+        },
+        plain: Boolean,
+        block: Boolean,
+        round: Boolean,
+        square: Boolean,
+        loading: Boolean,
+        hairline: Boolean,
+        disabled: Boolean,
+        loadingText: String,
+        customStyle: String,
+        loadingType: {
+            type: String,
+            value: 'circular',
+        },
+        type: {
+            type: String,
+            value: 'default',
+        },
+        dataset: null,
+        size: {
+            type: String,
+            value: 'normal',
+        },
+        loadingSize: {
+            type: String,
+            value: '20px',
+        },
+        color: String,
+    },
+    methods: {
+        onClick: function (event) {
+            var _this = this;
+            this.$emit('click', event);
+            var _a = this.data, canIUseGetUserProfile = _a.canIUseGetUserProfile, openType = _a.openType, getUserProfileDesc = _a.getUserProfileDesc, lang = _a.lang;
+            if (openType === 'getUserInfo' && canIUseGetUserProfile) {
+                wx.getUserProfile({
+                    desc: getUserProfileDesc || '  ',
+                    lang: lang || 'en',
+                    complete: function (userProfile) {
+                        _this.$emit('getuserinfo', userProfile);
+                    },
+                });
+            }
+        },
+    },
+});

+ 7 - 0
miniprogram_npm/@vant/weapp/button/index.json

@@ -0,0 +1,7 @@
+{
+  "component": true,
+  "usingComponents": {
+    "van-icon": "../icon/index",
+    "van-loading": "../loading/index"
+  }
+}

+ 56 - 0
miniprogram_npm/@vant/weapp/button/index.wxml

@@ -0,0 +1,56 @@
+<wxs src="../wxs/utils.wxs" module="utils" />
+<wxs src="./index.wxs" module="computed" />
+
+<button
+  id="{{ id || buttonId }}"
+  data-detail="{{ dataset }}"
+  class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}"
+  hover-class="{{ disabled || loading ? '' : 'van-button--active hover-class'}}"
+  lang="{{ lang }}"
+  form-type="{{ formType }}"
+  style="{{ computed.rootStyle({ plain, color, customStyle }) }}"
+  open-type="{{ disabled || loading || (canIUseGetUserProfile && openType === 'getUserInfo') ? '' : openType }}"
+  business-id="{{ businessId }}"
+  session-from="{{ sessionFrom }}"
+  send-message-title="{{ sendMessageTitle }}"
+  send-message-path="{{ sendMessagePath }}"
+  send-message-img="{{ sendMessageImg }}"
+  show-message-card="{{ showMessageCard }}"
+  app-parameter="{{ appParameter }}"
+  aria-label="{{ ariaLabel }}"
+  bindtap="{{ disabled || loading ? '' : 'onClick' }}"
+  bindgetuserinfo="onGetUserInfo"
+  bindcontact="onContact"
+  bindgetphonenumber="onGetPhoneNumber"
+  bindgetrealtimephonenumber="onGetRealTimePhoneNumber"
+  bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
+  binderror="onError"
+  bindlaunchapp="onLaunchApp"
+  bindopensetting="onOpenSetting"
+  bindchooseavatar="onChooseAvatar"
+>
+  <block wx:if="{{ loading }}">
+    <van-loading
+      custom-class="loading-class"
+      size="{{ loadingSize }}"
+      type="{{ loadingType }}"
+      color="{{ computed.loadingColor({ type, color, plain }) }}"
+    />
+    <view wx:if="{{ loadingText }}" class="van-button__loading-text">
+      {{ loadingText }}
+    </view>
+  </block>
+  <block wx:else>
+    <van-icon
+      wx:if="{{ icon }}"
+      size="1.2em"
+      name="{{ icon }}"
+      class-prefix="{{ classPrefix }}"
+      class="van-button__icon"
+      custom-style="line-height: inherit;"
+    />
+    <view class="van-button__text">
+      <slot />
+    </view>
+  </block>
+</button>

+ 39 - 0
miniprogram_npm/@vant/weapp/button/index.wxs

@@ -0,0 +1,39 @@
+/* eslint-disable */
+var style = require('../wxs/style.wxs');
+
+function rootStyle(data) {
+  if (!data.color) {
+    return data.customStyle;
+  }
+
+  var properties = {
+    color: data.plain ? data.color : '#fff',
+    background: data.plain ? null : data.color,
+  };
+
+  // hide border when color is linear-gradient
+  if (data.color.indexOf('gradient') !== -1) {
+    properties.border = 0;
+  } else {
+    properties['border-color'] = data.color;
+  }
+
+  return style([properties, data.customStyle]);
+}
+
+function loadingColor(data) {
+  if (data.plain) {
+    return data.color ? data.color : '#c9c9c9';
+  }
+
+  if (data.type === 'default') {
+    return '#c9c9c9';
+  }
+
+  return '#fff';
+}
+
+module.exports = {
+  rootStyle: rootStyle,
+  loadingColor: loadingColor,
+};

File diff suppressed because it is too large
+ 0 - 0
miniprogram_npm/@vant/weapp/button/index.wxss


+ 70 - 0
miniprogram_npm/@vant/weapp/calendar/calendar.wxml

@@ -0,0 +1,70 @@
+<wxs src="./index.wxs" module="computed" />
+<wxs src="../wxs/utils.wxs" module="utils" />
+<view class="van-calendar">
+  <header
+    title="{{ title }}"
+    showTitle="{{ showTitle }}"
+    subtitle="{{ subtitle }}"
+    showSubtitle="{{ showSubtitle }}"
+    firstDayOfWeek="{{ firstDayOfWeek }}"
+    bind:click-subtitle="onClickSubtitle"
+  >
+    <slot name="title" slot="title"></slot>
+  </header>
+
+  <scroll-view
+    class="van-calendar__body"
+    scroll-y
+    scroll-into-view="{{ scrollIntoView }}"
+  >
+    <month
+      wx:for="{{ computed.getMonths(minDate, maxDate) }}"
+      wx:key="index"
+      id="month{{ index }}"
+      class="month"
+      data-date="{{ item }}"
+      date="{{ item }}"
+      type="{{ type }}"
+      color="{{ color }}"
+      minDate="{{ minDate }}"
+      maxDate="{{ maxDate }}"
+      showMark="{{ showMark }}"
+      formatter="{{ formatter }}"
+      rowHeight="{{ rowHeight }}"
+      currentDate="{{ currentDate }}"
+      showSubtitle="{{ showSubtitle }}"
+      allowSameDay="{{ allowSameDay }}"
+      showMonthTitle="{{ index !== 0 || !showSubtitle }}"
+      firstDayOfWeek="{{ firstDayOfWeek }}"
+      bind:click="onClickDay"
+    />
+  </scroll-view>
+
+  <view
+    class="{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}"
+  >
+    <slot name="footer"></slot>
+  </view>
+
+  <view
+    class="{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}"
+  >
+    <van-button
+      wx:if="{{ showConfirm }}"
+      round
+      block
+      type="danger"
+      color="{{ color }}"
+      custom-class="van-calendar__confirm"
+      disabled="{{ computed.getButtonDisabled(type, currentDate, minRange) }}"
+      nativeType="text"
+      bind:click="onConfirm"
+    >
+      {{
+        computed.getButtonDisabled(type, currentDate, minRange)
+          ? confirmDisabledText
+          : confirmText
+      }}
+    </van-button>
+  </view>
+</view>

+ 1 - 0
miniprogram_npm/@vant/weapp/calendar/components/header/index.d.ts

@@ -0,0 +1 @@
+export {};

Some files were not shown because too many files changed in this diff