Browse Source

冰排管理、冰柜管理、添加订单增加配送人

qianduan 5 months ago
parent
commit
7a08c124ed
44 changed files with 2303 additions and 265 deletions
  1. 0 21
      src/App.vue
  2. 37 0
      src/api/freezer.js
  3. 56 0
      src/api/iceRaft.js
  4. 37 0
      src/api/refrigerator.js
  5. 3 15
      src/assets/css/global.css
  6. 72 3
      src/assets/fonts/demo_index.html
  7. 15 3
      src/assets/fonts/iconfont.css
  8. 0 0
      src/assets/fonts/iconfont.js
  9. 21 0
      src/assets/fonts/iconfont.json
  10. BIN
      src/assets/fonts/iconfont.ttf
  11. BIN
      src/assets/fonts/iconfont.woff
  12. BIN
      src/assets/fonts/iconfont.woff2
  13. 38 0
      src/assets/js/blockSort.js
  14. 10 26
      src/components/MapDelivery.vue
  15. 16 5
      src/components/actionBar.vue
  16. 103 15
      src/components/forms.vue
  17. 125 4
      src/components/tables.vue
  18. 75 0
      src/components/treeTable.vue
  19. 1 1
      src/components/waybillForm.vue
  20. 2 0
      src/components/waybillInformation.vue
  21. 24 17
      src/router/generator-routers.js
  22. 227 0
      src/views/IceCreamFreezer/FreezerManagement.vue
  23. 227 0
      src/views/IceCreamFreezer/IceManagement.vue
  24. 495 0
      src/views/IceCreamFreezer/IceTracingManagement.vue
  25. 67 0
      src/views/IceCreamFreezer/freezer.js
  26. 212 0
      src/views/IceCreamFreezer/iceRaft.js
  27. 67 0
      src/views/IceCreamFreezer/refrigerator.js
  28. 32 12
      src/views/common/Base.vue
  29. 19 1
      src/views/common/topNav.vue
  30. 4 2
      src/views/newInquiry.vue
  31. 35 26
      src/views/page/Home.vue
  32. 1 0
      src/views/system/ClientManagement.vue
  33. 23 10
      src/views/system/CompanyManagement.vue
  34. 1 0
      src/views/system/IncubatorManagement.vue
  35. 1 1
      src/views/system/MyWaybill.vue
  36. 1 0
      src/views/system/StoreManagement.vue
  37. 1 0
      src/views/system/UserManagement.vue
  38. 1 0
      src/views/system/VehicleManagement.vue
  39. 128 51
      src/views/system/WaybillManagement.vue
  40. 13 13
      src/views/system/address.js
  41. 2 0
      src/views/system/addressBook.vue
  42. 7 6
      src/views/system/company.js
  43. 102 31
      src/views/system/waybill.js
  44. 2 2
      vue.config.js

+ 0 - 21
src/App.vue

@@ -7,25 +7,4 @@
 
 <style lang="scss">
   @import url(@/assets/fonts/iconfont.css);
-
-  #app {
-    font-family: Avenir, Helvetica, Arial, sans-serif;
-    -webkit-font-smoothing: antialiased;
-    -moz-osx-font-smoothing: grayscale;
-    text-align: center;
-    color: #2c3e50;
-  }
-
-  nav {
-    padding: 30px;
-
-    a {
-      font-weight: bold;
-      color: #2c3e50;
-
-      &.router-link-exact-active {
-        color: #42b983;
-      }
-    }
-  }
 </style>

+ 37 - 0
src/api/freezer.js

@@ -0,0 +1,37 @@
+import request from '@/utils/request'
+
+// 获取冰排列表
+export function getIceRaft(parameter) {
+  return request({
+    url: '/api/ice-raft',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 添加冰排
+export function addIceRaft(parameter) {
+  return request({
+    url: '/api/ice-raft',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑冰排
+export function putIceRaft(parameter) {
+  return request({
+    url: '/api/ice-raft',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 删除冰排
+export function delIceRaft(parameter) {
+  return request({
+    url: '/api/ice-raft',
+    method: 'delete',
+    data: parameter
+  })
+}

+ 56 - 0
src/api/iceRaft.js

@@ -0,0 +1,56 @@
+import request from '@/utils/request'
+
+// 获取冰排追溯列表
+export function getIceRaftNewest(parameter) {
+  return request({
+    url: '/api/ice-raft/newest-record',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 冰排入库
+export function iceraftIn(parameter) {
+  return request({
+    url: '/api/ice-raft/in-storage',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 冰排出库
+export function iceraftOut(parameter) {
+  return request({
+    url: '/api/ice-raft/out-storage',
+    method: 'post',
+    data: parameter
+  })
+}
+
+
+// 获取历史记录列表
+export function getIceRaftRecord(parameter) {
+  return request({
+    url: '/api/ice-raft-record',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 编辑历史记录
+export function putIceRaftRecord(parameter) {
+  return request({
+    url: '/api/ice-raft-record',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 删除历史记录
+export function delIceRaftRecord(parameter) {
+  return request({
+    url: '/api/ice-raft-record',
+    method: 'delete',
+    data: parameter
+  })
+}

+ 37 - 0
src/api/refrigerator.js

@@ -0,0 +1,37 @@
+import request from '@/utils/request'
+
+// 获取冰柜列表
+export function getIcelocker(parameter) {
+  return request({
+    url: '/api/ice-locker',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 添加冰柜
+export function addIcelocker(parameter) {
+  return request({
+    url: '/api/ice-locker',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑冰柜
+export function putIcelocker(parameter) {
+  return request({
+    url: '/api/ice-locker',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 删除冰柜
+export function delIcelocker(parameter) {
+  return request({
+    url: '/api/ice-locker',
+    method: 'delete',
+    data: parameter
+  })
+}

+ 3 - 15
src/assets/css/global.css

@@ -7,20 +7,6 @@ body,
 	padding: 0;
 }
 
-body {
-	scrollbar-width: thin;
-	scrollbar-color: #888 transparent;
-}
-
-/* For Webkit browsers (Chrome, Safari) */
-body::-webkit-scrollbar {
-	width: 6px;
-}
-
-body::-webkit-scrollbar-thumb {
-	background-color: #888;
-}
-
 .center_in {
 	display: flex;
 	align-items: center;
@@ -48,12 +34,14 @@ body::-webkit-scrollbar-thumb {
 .el-dialog__footer {
 	border-top: 1px solid #EBEEF5;
 }
-.el-form-item__label{
+
+.el-form-item__label {
 	line-height: unset !important;
 	min-height: 40px;
 	display: flex;
 	align-items: center;
 }
+
 @media screen and (max-width:1200px) {
 	.waybillquiry_head {
 		width: 95%;

+ 72 - 3
src/assets/fonts/demo_index.html

@@ -55,6 +55,24 @@
           <ul class="icon_lists dib-box">
           
             <li class="dib">
+              <span class="icon iconfont">&#xe61c;</span>
+                <div class="name">流向追溯</div>
+                <div class="code-name">&amp;#xe61c;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe64a;</span>
+                <div class="name">冰柜</div>
+                <div class="code-name">&amp;#xe64a;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe717;</span>
+                <div class="name">冰排管理</div>
+                <div class="code-name">&amp;#xe717;</div>
+              </li>
+          
+            <li class="dib">
               <span class="icon iconfont">&#xe77b;</span>
                 <div class="name">运单管理</div>
                 <div class="code-name">&amp;#xe77b;</div>
@@ -120,9 +138,9 @@
 <pre><code class="language-css"
 >@font-face {
   font-family: 'iconfont';
-  src: url('iconfont.woff2?t=1716347704715') format('woff2'),
-       url('iconfont.woff?t=1716347704715') format('woff'),
-       url('iconfont.ttf?t=1716347704715') format('truetype');
+  src: url('iconfont.woff2?t=1718951229625') format('woff2'),
+       url('iconfont.woff?t=1718951229625') format('woff'),
+       url('iconfont.ttf?t=1718951229625') format('truetype');
 }
 </code></pre>
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -149,6 +167,33 @@
         <ul class="icon_lists dib-box">
           
           <li class="dib">
+            <span class="icon iconfont icon-iceTracing"></span>
+            <div class="name">
+              流向追溯
+            </div>
+            <div class="code-name">.icon-iceTracing
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-binggui"></span>
+            <div class="name">
+              冰柜
+            </div>
+            <div class="code-name">.icon-binggui
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-bingpaiguanli"></span>
+            <div class="name">
+              冰排管理
+            </div>
+            <div class="code-name">.icon-bingpaiguanli
+            </div>
+          </li>
+          
+          <li class="dib">
             <span class="icon iconfont icon-yundanguanli"></span>
             <div class="name">
               运单管理
@@ -249,6 +294,30 @@
           
             <li class="dib">
                 <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-iceTracing"></use>
+                </svg>
+                <div class="name">流向追溯</div>
+                <div class="code-name">#icon-iceTracing</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-binggui"></use>
+                </svg>
+                <div class="name">冰柜</div>
+                <div class="code-name">#icon-binggui</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-bingpaiguanli"></use>
+                </svg>
+                <div class="name">冰排管理</div>
+                <div class="code-name">#icon-bingpaiguanli</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
                   <use xlink:href="#icon-yundanguanli"></use>
                 </svg>
                 <div class="name">运单管理</div>

+ 15 - 3
src/assets/fonts/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 4556741 */
-  src: url('@/assets/fonts/iconfont.woff2?t=1716347704715') format('woff2'),
-       url('@/assets/fonts/iconfont.woff?t=1716347704715') format('woff'),
-       url('@/assets/fonts/iconfont.ttf?t=1716347704715') format('truetype');
+  src: url('@/assets/fonts/iconfont.woff2?t=1718951229625') format('woff2'),
+       url('@/assets/fonts/iconfont.woff?t=1718951229625') format('woff'),
+       url('@/assets/fonts/iconfont.ttf?t=1718951229625') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,18 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-iceTracing:before {
+  content: "\e61c";
+}
+
+.icon-binggui:before {
+  content: "\e64a";
+}
+
+.icon-bingpaiguanli:before {
+  content: "\e717";
+}
+
 .icon-yundanguanli:before {
   content: "\e77b";
 }

File diff suppressed because it is too large
+ 0 - 0
src/assets/fonts/iconfont.js


+ 21 - 0
src/assets/fonts/iconfont.json

@@ -6,6 +6,27 @@
   "description": "",
   "glyphs": [
     {
+      "icon_id": "8238527",
+      "name": "流向追溯",
+      "font_class": "iceTracing",
+      "unicode": "e61c",
+      "unicode_decimal": 58908
+    },
+    {
+      "icon_id": "27032482",
+      "name": "冰柜",
+      "font_class": "binggui",
+      "unicode": "e64a",
+      "unicode_decimal": 58954
+    },
+    {
+      "icon_id": "32489862",
+      "name": "冰排管理",
+      "font_class": "bingpaiguanli",
+      "unicode": "e717",
+      "unicode_decimal": 59159
+    },
+    {
       "icon_id": "5492013",
       "name": "运单管理",
       "font_class": "yundanguanli",

BIN
src/assets/fonts/iconfont.ttf


BIN
src/assets/fonts/iconfont.woff


BIN
src/assets/fonts/iconfont.woff2


+ 38 - 0
src/assets/js/blockSort.js

@@ -74,6 +74,20 @@ export const startStatus = () => {
   ]
 }
 
+export const iceraftStatus = () => {
+  return [{
+      bgcolor: '#409EFF',
+      label: '正常',
+      value: '2',
+    },
+    {
+      bgcolor: '#F56C6C',
+      label: '弃用',
+      value: '1',
+    }
+  ]
+}
+
 export const userType = () => {
   return [{
       bgcolor: '#409EFF',
@@ -87,3 +101,27 @@ export const userType = () => {
     }
   ]
 }
+
+export const frozenState = () => {
+  return [{
+      bgcolor: '#409EFF',
+      label: '冷冻中',
+      value: '1',
+    },
+    {
+      bgcolor: '#E6A23C',
+      label: '待使用',
+      value: '2',
+    },
+    {
+      bgcolor: '#67C23A',
+      label: '使用中',
+      value: '3',
+    },
+    {
+      bgcolor: '#909399',
+      label: '已结束',
+      value: '4',
+    }
+  ]
+}

+ 10 - 26
src/components/MapDelivery.vue

@@ -79,6 +79,7 @@
           var p1 = startMarker.getPosition();
           var p2 = endMarker.getPosition();
           var distance = Math.round(p1.distance(p2));
+          // console.log(distance, 23)
           // 转换距离单位
           function setMorKm(m) {
             var n = ''
@@ -96,33 +97,16 @@
           }
           let distanceNum = setMorKm(distance)
 
-
-          function calculateTravelTime(point1, point2, speedKmph) {
-            // 计算两点之间的距离(使用Haversine公式)
-            function getDistanceFromLatLonInKm(lat1, lon1, lat2, lon2) {
-              const R = 6371; // 地球半径,单位为公里
-              const dLat = (lat2 - lat1) * (Math.PI / 180);
-              const dLon = (lon2 - lon1) * (Math.PI / 180);
-              const a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
-                Math.cos(lat1 * (Math.PI / 180)) * Math.cos(lat2 * (Math.PI / 180)) *
-                Math.sin(dLon / 2) * Math.sin(dLon / 2);
-              const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
-              const d = R * c;
-              return d;
-            }
-
-            const distanceKm = getDistanceFromLatLonInKm(point1[0], point1[1], point2[0], point2[1]);
-            const travelTimeHours = distanceKm / (speedKmph / 60); // 时间 = 距离 ÷ 速度
-            const travelTimeMins = Math.round(travelTimeHours * 60); // 将小时转换为分钟
-            return travelTimeMins;
+          function calculateTime(distance, speed) {
+            // 将距离从米转换为公里
+            const distanceInKm = distance / 1000;
+            // 计算所需时间(单位:小时)
+            const hours = distanceInKm / (speed / 60); // 因为速度是每小时多少公里,所以除以60转换为小时
+            return hours.toFixed(2); // 保留两位小数
           }
-
-          // 使用示例:
-          const point1 = propertyName; // 巴黎的一个坐标点
-          const point2 = positions[num - 1]; // 离巴黎不远的另一个坐标点
-          const speedKmph = 70; // 假设的速度(千米/小时)
-          const timeMins = calculateTravelTime(point1, point2, speedKmph);
-          console.log(`预计到达时间:约 ${timeMins} 分钟`);
+          const speed = 30;
+          const timeMins = calculateTime(distance, speed);
+          // console.log(`预计到达时间:约 ${timeMins} 分钟`);
 
           endMarker.setLabel({
             offset: new AMap.Pixel(0, -50),

+ 16 - 5
src/components/actionBar.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="actionbar_card">
     <div class="card_action_bar">
       <div style="display: flex;flex-direction: column;">
         <div class="action_bar_headline" :class="formList.length>0?'margin_5x':''">{{menuTitle}}</div>
@@ -73,7 +73,7 @@
       ruleForm: {
         type: Object,
         default: () => {},
-      }
+      },
     },
     data() {
       return {
@@ -128,16 +128,27 @@
 </script>
 
 <style lang="scss" scoped>
-  .card_action_bar {
+  .actionbar_card {
     display: flex;
-    justify-content: space-between;
-    align-items: flex-end;
+    flex-direction: column;
     background-color: #fff;
     padding: 10px 20px;
     border-radius: 5px;
     box-shadow: 0 2px 4px rgba(0, 0, 0, .05);
   }
 
+  .Ice_cream_freezer {
+    display: flex;
+    justify-content: flex-end;
+    align-items: center;
+  }
+
+  .card_action_bar {
+    display: flex;
+    justify-content: space-between;
+    align-items: flex-end;
+  }
+
   .action_bar_headline {
     color: #fff;
     font-size: 18px;

+ 103 - 15
src/components/forms.vue

@@ -11,6 +11,15 @@
               :show-password="['newPassword','password'].includes(item.field) ? true : false"></el-input>
             <div class="unit_card" v-if="item.unit">{{item.unit}}</div>
           </el-form-item>
+          <!-- 扫描 -->
+          <el-form-item class="card_independent" :label-width="item.labelWidth" :label="item.label" :prop="item.field"
+            :rules="detail ? item.rules : {}" v-if="item.type === 'scan'">
+            <el-input :placeholder="item.placeholder" :disabled="item.disabled" :id="item.field" v-model="inputs"
+              @keyup.enter.native="keydownBarcode(item.field)" @blur="loseFocus">
+              <el-button slot="append" icon="el-icon-circle-plus icon_circle_btn"
+                @click="serialNumber(item.field)"></el-button>
+            </el-input>
+          </el-form-item>
           <el-form-item :label-width="item.labelWidth" :label="item.label" :prop="item.field"
             :rules="detail ? item.rules : {}" v-if="item.type === 'textarea'">
             <el-input :maxlength="item.maxLenght" type="textarea" :rows="item.rowsHeight" :disabled="item.disabled"
@@ -31,8 +40,8 @@
           <el-form-item :label-width="item.labelWidth" :label="item.label" :prop="item.field"
             :rules="detail ? item.rules : {}" v-if="item.type === 'searchSelect'">
             <el-select :id="item.field" v-model="ruleForm[`${item.field}`]" v-loadmore="handleScroll" filterable remote
-              :remote-method="remoteMethod" :placeholder="item.placeholder" :disabled="item.disabled"
-              style="width: 100%">
+              :remote-method="(query) => remoteMethod(query, item.field)" :placeholder="item.placeholder"
+              :disabled="item.disabled" style="width: 100%">
               <el-option v-for="(element, i) in item.options" :label="element.label" :value="`${element.value}`"
                 :key="i" />
             </el-select>
@@ -81,9 +90,10 @@
             </span>
           </el-form-item>
           <el-form-item class="card_descriptions" :label="item.label" :prop="item.field"
-            :rules="detail ? item.rules : {}" v-if="item.type === 'prdfterence'">
-            <span class="descriptions_title"
-              :style="{color: filterColor(ruleForm,item.options,item.field)}">{{initDictvalueil(ruleForm[`${item.field}`],item.options)}}</span>
+            :rules="detail ? item.rules : {}" v-if="item.type === 'nvarchar' || item.type === 'nvarcharil'">
+            <span class="descriptions_title" v-if="item.type === 'nvarchar'">{{ruleForm[`${item.field}`]}}</span>
+            <span class="descriptions_title" :style="{color: filterColor(ruleForm,item.options,item.field)}"
+              v-else-if="item.type === 'nvarcharil'">{{initDictvalueil(ruleForm,item.options,item.field)}}</span>
           </el-form-item>
           <!-- 单张图片上传 -->
           <el-form-item :class="item.crosswise ? '' : 'card_fuel_gas'" :label="item.label" :prop="item.field"
@@ -131,6 +141,17 @@
             </div>
           </div>
         </el-col>
+        <el-col :span="20" :offset="4" v-if="iceBank">
+          <div style="display: flex;flex-direction: column;">
+            <div class="ser_card_ial" v-for="(serial,num) in inputsList" :key="num">
+              <div style="display: flex;align-items: center;">
+                <div>{{num + 1}}</div>
+                <div class="title_serial">{{serial}}</div>
+              </div>
+              <span class="del_serial" @click="delSerial(serial,num)">删除</span>
+            </div>
+          </div>
+        </el-col>
       </el-row>
     </el-form>
   </div>
@@ -163,10 +184,16 @@
         type: Object,
         default: () => {},
       },
+      // 类型
       operationType: {
         type: String,
         default: () => '',
       },
+      // 冰排冰库
+      iceBank: {
+        type: Boolean,
+        default: () => false,
+      },
     },
     watch: {
       formNewList: {
@@ -187,6 +214,11 @@
         disabled: false,
         fileList: [],
         curLoading: false,
+
+        inputs: "",
+        timearr: [0, 0],
+        isScanningGun: false,
+        inputsList: [],
       }
     },
     methods: {
@@ -197,6 +229,11 @@
       },
       // 重置校验
       resetCheck() {
+        this.inputs = ''
+        this.inputsList = []
+        if (this.ruleForm.code) {
+          this.ruleForm.code = []
+        }
         this.$refs.ruleForm.resetFields();
       },
       // 单个图片上传
@@ -274,22 +311,24 @@
         return color
       },
       // 普通类型文字匹配
-      initDictvalueil(value, list) {
+      initDictvalueil(value, list, type) {
         let name = ''
-        list.forEach(item => {
-          if (value == item.value) {
-            name = item.label
-          }
-        })
+        if (list) {
+          list.forEach(item => {
+            if (value[type] === item.value) {
+              name = item.label
+            }
+          })
+        }
         return name
       },
       handleScroll() {
         // console.log('触底了')
         this.$emit('handleScroll')
       },
-      remoteMethod(val) {
-        // console.log('远程搜索', val)
-        this.$emit('remoteMethod', val)
+      remoteMethod(val, type) {
+        // console.log('远程搜索', val, type)
+        this.$emit('remoteMethod', val, type)
       },
       // 删除
       handleRemove(file) {
@@ -313,6 +352,35 @@
         }
         return isJPG && isLt2M;
       },
+      // 添加编号
+      serialNumber(field) {
+        if (this.inputs) {
+          this.inputsList.push(this.inputs)
+          this.inputs = ''
+          this.ruleForm[`${field}`] = this.uniqueArray(this.inputsList)
+        }
+      },
+      keydownBarcode(field) {
+        console.log('回车');
+        if (this.inputs) {
+          this.inputsList.push(this.inputs)
+          this.inputs = ''
+          this.ruleForm[`${field}`] = this.uniqueArray(this.inputsList)
+        }
+      },
+      // 去重
+      uniqueArray(arr) {
+        return [...new Set(arr)];
+      },
+      // 删除编号
+      delSerial(value, index) {
+        this.inputsList.splice(index, 1)
+        this.ruleForm['code'].splice(index, 1);
+      },
+      // 失去焦点
+      loseFocus() {
+        this.ruleForm['code'][0] = this.inputs
+      },
       //子组件校验,传递到父组件
       validateForm() {
         let flag = null
@@ -343,6 +411,10 @@
     align-items: center;
   }
 
+  .card_independent ::v-deep .icon_circle_btn {
+    font-size: 20px;
+  }
+
   .card_employee {
     max-height: 600px;
     overflow-y: auto;
@@ -399,7 +471,7 @@
   }
 
   .unit_card {
-    width: 80px;
+    width: auto;
     padding-left: 10px;
     flex: none;
   }
@@ -420,4 +492,20 @@
     border-radius: 6px;
     margin: 0 8px 8px 0;
   }
+
+  .ser_card_ial {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin: 5px 0px;
+  }
+
+  .title_serial {
+    margin-left: 10px;
+  }
+
+  .del_serial {
+    cursor: pointer;
+    color: #F56C6C;
+  }
 </style>

+ 125 - 4
src/components/tables.vue

@@ -1,8 +1,9 @@
 <template>
   <!-- tables -->
   <div class="tables_grid">
-    <el-table ref="tableRef" :show-header="showHeader" class="table-style" :data="tableData" style="width: 100%" :border="border"
-      :row-key="(val) => rowKey(val)" @cell-click="cellClick" @selection-change="handleSelectionChange">
+    <el-table ref="tableRef" :show-header="showHeader" class="table-style" :data="tableData" style="width: 100%"
+      :border="border" :row-key="(val) => rowKey(val)" @cell-click="cellClick" :key="Math.random()"
+      @selection-change="handleSelectionChange">
       <template v-for="(item,index) in tableList">
         <el-table-column :fixed="suspension ? 'right' : false" :label="item.label" :width="item.colWidth" align="center"
           v-if="item.field == 'action'">
@@ -17,10 +18,50 @@
             </div>
           </template>
         </el-table-column>
+        <el-table-column class="card_unpack_btn" :fixed="suspension ? 'right' : false" :label="item.label"
+          :width="unpackWidth" align="center" v-else-if="item.field == 'unpackBtn'">
+          <template slot="header" slot-scope="scope">
+            <div class="unpack_card">
+              <div v-if="!iconFlag">{{item.label}}</div>
+              <i class="card_unpack" :class="iconFlag ? 'el-icon-s-fold' : 'el-icon-s-unfold'" @click="getUnpack"></i>
+            </div>
+          </template>
+          <template slot-scope="scope">
+            <div class="center_in" v-if="!iconFlag">
+              <div v-for="disk in item.labelButton" :key="disk.key" class="btn_table">
+                <el-button :class="disk.modality" :type="disk.style" :icon="disk.icon" size="mini"
+                  :disabled="jurisdiction(scope.row,disk.type)" @click="buttonData(scope.row,disk.type)">
+                  {{ disk.label }}
+                </el-button>
+              </div>
+            </div>
+            <div v-else :key="index">
+              <el-popover placement="top" width="360" trigger="click" v-model="scope.row.visible">
+                <div class="center_in">
+                  <div v-for="disk in item.labelButton" :key="disk.key" class="btn_table">
+                    <el-button :class="disk.modality" :type="disk.style" :icon="disk.icon" size="mini"
+                      :disabled="jurisdiction(scope.row,disk.type)" @click="buttonData(scope.row,disk.type)">
+                      {{ disk.label }}
+                    </el-button>
+                  </div>
+                </div>
+                <el-tag style="cursor: pointer;" size="mini" slot="reference">操作</el-tag>
+              </el-popover>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column :label="item.label" align="center" v-else-if="item.field == 'multistage'">
+          <template v-for="(child,cgindex) in item.children">
+            <el-table-column :prop="child.field" :label="child.label" :width="child.colWidth" :align="child.align">
+            </el-table-column>
+          </template>
+        </el-table-column>
         <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
-          v-else-if="['provUser.isorders','provUser.userType','customer.type','tbFillData.productMediaId'].includes(item.field)">
+          v-else-if="['provUser.isorders','provUser.userType','customer.type','tbFillData.productMediaId','iceRaftRecord.status'].includes(item.field)">
           <template slot-scope="scope">
-            <div>{{initDictvalue(scope.row,item.options,item.field)}}</div>
+            <div :style="{color: filterColoril(scope.row,item.options,item.field)}">
+              {{initDictvalue(scope.row,item.options,item.field)}}
+            </div>
           </template>
         </el-table-column>
         <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
@@ -45,6 +86,35 @@
             <div>{{scope.row.provinceName}}{{scope.row.cityName}}{{scope.row.regionName}}</div>
           </template>
         </el-table-column>
+        <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
+          v-else-if="item.field == 'location'">
+          <template slot-scope="scope">
+            <div v-if="scope.row.iceRaftRecord">
+              <div v-if="scope.row.iceRaftRecord.outStorageTime == ''">{{scope.row.iceRaftRecord.iceLocker.name}}</div>
+              <div v-else>{{scope.row.iceRaftRecord.coolerBox.name}}
+              </div>
+            </div>
+            <div v-else>
+              <div v-if="scope.row.outStorageTime == ''">{{scope.row.iceLocker.name}}</div>
+              <div v-else>{{scope.row.coolerBox.name}}
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
+          v-else-if="item.field == 'freezeClaim'">
+          <template slot-scope="scope">
+            <div v-if="scope.row.iceRaftRecord">≥{{scope.row.iceRaftRecord.freezeClaim}}h</div>
+            <div v-else>≥{{scope.row.freezeClaim}}h</div>
+          </template>
+        </el-table-column>
+        <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
+          v-else-if="item.field == 'freezeDuration'">
+          <template slot-scope="scope">
+            <div v-if="scope.row.iceRaftRecord">{{ formatMinutes(scope.row.iceRaftRecord.freezeDuration) }}</div>
+            <div v-else>{{ formatMinutes(scope.row.freezeDuration) }}</div>
+          </template>
+        </el-table-column>
         <el-table-column type="index" :fixed="item.boxhead ? true : false" width="80px" :label="item.label"
           :align="item.align" v-else-if="item.field == 'index'">
         </el-table-column>
@@ -105,6 +175,9 @@
         orderStatusList: orderStatus(),
         waybillIds: [],
         selectionList: [],
+        iconFlag: false,
+        unpackWidth: '370px',
+        visible: false,
       }
     },
     methods: {
@@ -121,6 +194,18 @@
         }
         return name
       },
+      filterColoril(value, list, type) {
+        let propertyName = type.split(".")
+        let color = ''
+        if (list) {
+          list.forEach(item => {
+            if (value[propertyName[0]][propertyName[1]] == item.value) {
+              color = item.bgcolor
+            }
+          })
+        }
+        return color
+      },
       // 普通类型文字匹配
       initDictvalueil(value, list, type) {
         let name = ''
@@ -145,6 +230,12 @@
         }
         return color
       },
+      // 总分钟格式化
+      formatMinutes(totalMinutes) {
+        const hours = Math.floor(totalMinutes / 60); // 计算小时
+        const minutes = totalMinutes % 60; // 计算分钟(余数)
+        return `${hours}h${minutes}m`;
+      },
       // 我的订单
       myInitDictvalueil(value, list, type) {
         if ([1, 2, 3].includes(value.status)) {
@@ -228,12 +319,30 @@
             return val.T_sn
           }
         }
+      },
+      // 展开收起
+      getUnpack() {
+        if (this.iconFlag) {
+          this.unpackWidth = '370px'
+          this.iconFlag = false
+        } else {
+          this.unpackWidth = '70px'
+          this.iconFlag = true
+        }
       }
     }
   }
 </script>
 
 <style scoped lang="scss">
+  ::v-deep .el-table__fixed-right {
+    transition: width 0.15s;
+    -webkit-transition: width 0.15s;
+    -moz-transition: width 0.15s;
+    -webkit-transition: width 0.15s;
+    -o-transition: width 0.15s;
+  }
+
   .btn_table:nth-of-type(n+2) {
     margin-left: 10px;
   }
@@ -286,4 +395,16 @@
   .operator_title {
     color: #fff;
   }
+
+  .unpack_card {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+
+  .card_unpack {
+    cursor: pointer;
+    font-size: 25px;
+    margin-left: 10px;
+  }
 </style>

+ 75 - 0
src/components/treeTable.vue

@@ -0,0 +1,75 @@
+<template>
+  <!-- 树形表格 -->
+  <div class="tree_card">
+    <el-table class="tree_table" default-expand-all :data="treeDataList" row-key="id" style="width: 100%;"
+      :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @row-click="handleRowClick">
+      <template v-for="(item,index) in treeData">
+        <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
+          v-if="item.field == 'action'">
+          <template slot-scope="scope">
+            <div style="display: flex;align-items: center;justify-content: space-evenly;">
+              <div v-for="disk in item.labelButton" :key="disk.key" class="btn_table">
+                <el-button :class="disk.modality" :type="disk.style" :icon="disk.icon" size="mini"
+                  @click="buttonData(scope.row,disk.type)">
+                  {{ disk.label }}
+                </el-button>
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column type="index" :fixed="item.boxhead ? true : false" width="80px" :label="item.label"
+          :align="item.align" v-else-if="item.field == 'index'">
+        </el-table-column>
+        <el-table-column show-overflow-tooltip :prop="item.field" :label="item.label" :width="item.colWidth"
+          :align="item.align" v-else>
+        </el-table-column>
+      </template>
+    </el-table>
+  </div>
+</template>
+<script>
+  export default {
+    name: "treeTable",
+    props: {
+      // 表格数据
+      treeDataList: {
+        type: Array,
+        default: () => [],
+      },
+      // 表格label数据
+      treeData: {
+        type: Array,
+        default: () => [],
+      },
+    },
+    data() {
+      return {}
+    },
+    methods: {
+      // 操作按钮
+      buttonData(row, type) {
+        this.$emit("buttonData", row, type);
+      },
+      handleRowClick($event) {
+        // console.log($event,2545)
+      }
+    },
+  }
+</script>
+<style scoped lang="scss">
+  .title_blue {
+    color: #83FF00;
+  }
+
+  .title_red {
+    color: #FF9494;
+  }
+
+  .title_blue1 {
+    color: #409eff;
+  }
+
+  .title_yellow {
+    color: #e6a23c;
+  }
+</style>

+ 1 - 1
src/components/waybillForm.vue

@@ -133,7 +133,7 @@
     padding-bottom: 6px;
     padding-left: 5px;
     border-bottom: 1px solid #E4E7ED;
-    margin: 10px 0px;
+    margin: 0px 0px 10px 0px;
   }
 
   .waybil_form {

+ 2 - 0
src/components/waybillInformation.vue

@@ -173,6 +173,8 @@
             this.ruleForm.fileList.push(arr1)
           }
           loading.close();
+        }).catch((err) => {
+          loading.close();
         })
       },
       // 查看

+ 24 - 17
src/router/generator-routers.js

@@ -83,24 +83,31 @@ const rootRouter = {
       },
       component: () => import('@/views/system/addressBook'),
     },
-    // {
-    //   path: '/StoreManagement',
-    //   name: 'StoreManagement',
-    //   meta: {
-    //     icon: 'icon-cangku',
-    //     title: '仓库管理'
-    //   },
-    //   component: () => import('@/views/system/StoreManagement'),
-    // }, {
-    //   path: '/VehicleManagement',
-    //   name: 'VehicleManagement',
-    //   meta: {
-    //     icon: 'icon-chakan',
-    //     title: '车辆管理'
-    //   },
-    //   component: () => import('@/views/system/VehicleManagement'),
-    // },
     {
+      path: '/IceTracingManagement',
+      name: 'IceTracingManagement',
+      meta: {
+        icon: 'icon-iceTracing',
+        title: '冰排追溯管理'
+      },
+      component: () => import('@/views/IceCreamFreezer/IceTracingManagement'),
+    }, {
+      path: '/IceManagement',
+      name: 'IceManagement',
+      meta: {
+        icon: 'icon-bingpaiguanli',
+        title: '冰排管理'
+      },
+      component: () => import('@/views/IceCreamFreezer/IceManagement'),
+    }, {
+      path: '/FreezerManagement',
+      name: 'FreezerManagement',
+      meta: {
+        icon: 'icon-binggui',
+        title: '冷藏柜管理'
+      },
+      component: () => import('@/views/IceCreamFreezer/FreezerManagement'),
+    }, {
       path: '/IncubatorManagement',
       name: 'IncubatorManagement',
       meta: {

+ 227 - 0
src/views/IceCreamFreezer/FreezerManagement.vue

@@ -0,0 +1,227 @@
+<template>
+  <!-- 冰柜管理 -->
+  <div class="home">
+    <actionBar :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
+      @searchProtocol="searchProtocol"></actionBar>
+    <div class="card_content">
+      <!-- 表单 -->
+      <tables :suspension="true" :tableList="tableList" :tableData="tableData" @buttonData="buttonData"></tables>
+      <!-- 分页 -->
+      <div v-if="Total">
+        <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
+          @changeCurrent="changeCurrent">
+        </pagination>
+      </div>
+    </div>
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="600px" :close-on-click-modal="false"
+      @close="closeDialog">
+      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="100px">
+      </forms>
+      <span slot="footer" class="dialog-footer" v-if="operationType != 'logs'">
+        <el-button plain @click="staffDialogVisible = false">取 消</el-button>
+        <el-button type="primary" :loading="confirmLoading" @click="handleAdd">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    getIcelocker,
+    addIcelocker,
+    putIcelocker,
+    delIcelocker
+  } from '@/api/refrigerator'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import forms from '@/components/forms'
+  import {
+    formRules,
+    employee,
+  } from "./refrigerator.js";
+  export default {
+    name: 'IceManagement',
+    components: {
+      actionBar,
+      tables,
+      pagination,
+      forms
+    },
+    data() {
+      return {
+        operateList: [{
+          type: 'add',
+          title: '添加',
+          icon: 'el-icon-plus',
+        }],
+        formList: [{
+          type: 'input',
+          label: '名称',
+          field: 'name',
+          placeholder: '请输入名称',
+        }],
+        searchRuleForm: {
+          name: '',
+        },
+        searchValue: {},
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        Total: 0,
+        tableData: [],
+        operationType: '',
+        tableList: employee(),
+        staffTitle: '添加',
+        staffDialogVisible: false,
+        formRuleList: [],
+        ruleForm: {
+          name: '',
+          status: '',
+        },
+        confirmLoading: false,
+        selectingData: {},
+      }
+    },
+    mounted() {
+      this.getList()
+    },
+    methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.Pagination.PageIndex = 1
+        this.searchValue = value
+        this.getList()
+      },
+      // 获取列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getIcelocker(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+          }
+        })
+      },
+      // 弹窗表单添加
+      handleAdd() {
+        let flag = this.$refs['childRules'].validateForm();
+        if (flag) {
+          if (this.operationType == 'add') {
+            this.confirmLoading = true
+            var params = {
+              ...this.ruleForm
+            }
+            addIcelocker(params).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+              this.staffDialogVisible = false
+              this.confirmLoading = false
+            }).catch(() => {
+              this.confirmLoading = false
+            })
+          } else if (this.operationType == 'edit') {
+            this.confirmLoading = true
+            var params = {
+              id: this.selectingData.id,
+              name: this.ruleForm.name,
+              status: this.ruleForm.status,
+            }
+            putIcelocker(params).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+              this.staffDialogVisible = false
+              this.confirmLoading = false
+            }).catch(() => {
+              this.confirmLoading = false
+            })
+          }
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
+      },
+      buttonData(row, type) {
+        const dataList = formRules();
+        this.formRuleList = dataList;
+        this.selectingData = row
+        this.operationType = type
+        if (type == 'edit') {
+          this.staffTitle = '编辑'
+          this.staffDialogVisible = true
+          setTimeout(() => {
+            this.$nextTick(() => {
+              this.ruleForm.name = row.name
+              this.ruleForm.status = row.status
+            })
+          })
+        } else if (type == 'logs') {
+          this.staffTitle = '详情'
+          this.staffDialogVisible = true
+          this.formRuleList.forEach((item, index) => {
+            item.disabled = true
+          })
+          this.ruleForm = JSON.parse(JSON.stringify(row))
+        } else if (type == 'del') {
+          this.deleteUser(row.id)
+        }
+      },
+      openModel(type) {
+        const dataList = formRules();
+        this.formRuleList = dataList;
+        this.staffTitle = '添加'
+        this.staffDialogVisible = true
+        this.operationType = type
+      },
+      // 删除用户
+      deleteUser(id) {
+        this.$confirm('此操作将永久删除用户, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          delIcelocker({
+            id: id,
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                message: '操作成功',
+                type: 'success'
+              });
+              this.getList()
+            }
+          })
+        }).catch(() => {});
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+      // 清空表单
+      closeDialog() {
+        this.$refs.childRules.resetCheck();
+      }
+    },
+  }
+</script>
+
+<style>
+</style>

+ 227 - 0
src/views/IceCreamFreezer/IceManagement.vue

@@ -0,0 +1,227 @@
+<template>
+  <!-- 冰排管理 -->
+  <div class="home">
+    <actionBar :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
+      @searchProtocol="searchProtocol"></actionBar>
+    <div class="card_content">
+      <!-- 表单 -->
+      <tables :suspension="true" :tableList="tableList" :tableData="tableData" @buttonData="buttonData"></tables>
+      <!-- 分页 -->
+      <div v-if="Total">
+        <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
+          @changeCurrent="changeCurrent">
+        </pagination>
+      </div>
+    </div>
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="600px" :close-on-click-modal="false"
+      @close="closeDialog">
+      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="100px">
+      </forms>
+      <span slot="footer" class="dialog-footer" v-if="operationType != 'logs'">
+        <el-button plain @click="staffDialogVisible = false">取 消</el-button>
+        <el-button type="primary" :loading="confirmLoading" @click="handleAdd">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    getIceRaft,
+    addIceRaft,
+    putIceRaft,
+    delIceRaft
+  } from '@/api/freezer'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import forms from '@/components/forms'
+  import {
+    formRules,
+    employee,
+  } from "./freezer.js";
+  export default {
+    name: 'IceManagement',
+    components: {
+      actionBar,
+      tables,
+      pagination,
+      forms
+    },
+    data() {
+      return {
+        operateList: [{
+          type: 'add',
+          title: '添加',
+          icon: 'el-icon-plus',
+        }],
+        formList: [{
+          type: 'input',
+          label: '编号',
+          field: 'code',
+          placeholder: '请输入编号',
+        }],
+        searchRuleForm: {
+          code: '',
+        },
+        searchValue: {},
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        Total: 0,
+        tableData: [],
+        operationType: '',
+        tableList: employee(),
+        staffTitle: '添加',
+        staffDialogVisible: false,
+        formRuleList: [],
+        ruleForm: {
+          code: '',
+          status: '',
+        },
+        confirmLoading: false,
+        selectingData: {},
+      }
+    },
+    mounted() {
+      this.getList()
+    },
+    methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.Pagination.PageIndex = 1
+        this.searchValue = value
+        this.getList()
+      },
+      // 获取列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getIceRaft(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+          }
+        })
+      },
+      // 弹窗表单添加
+      handleAdd() {
+        let flag = this.$refs['childRules'].validateForm();
+        if (flag) {
+          if (this.operationType == 'add') {
+            this.confirmLoading = true
+            var params = {
+              ...this.ruleForm
+            }
+            addIceRaft(params).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+              this.staffDialogVisible = false
+              this.confirmLoading = false
+            }).catch(() => {
+              this.confirmLoading = false
+            })
+          } else if (this.operationType == 'edit') {
+            this.confirmLoading = true
+            var params = {
+              id: this.selectingData.id,
+              code: this.ruleForm.code,
+              status: this.ruleForm.status,
+            }
+            putIceRaft(params).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+              this.staffDialogVisible = false
+              this.confirmLoading = false
+            }).catch(() => {
+              this.confirmLoading = false
+            })
+          }
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
+      },
+      buttonData(row, type) {
+        const dataList = formRules();
+        this.formRuleList = dataList;
+        this.selectingData = row
+        this.operationType = type
+        if (type == 'edit') {
+          this.staffTitle = '编辑'
+          this.staffDialogVisible = true
+          setTimeout(() => {
+            this.$nextTick(() => {
+              this.ruleForm.code = row.code
+              this.ruleForm.status = row.status
+            })
+          })
+        } else if (type == 'logs') {
+          this.staffTitle = '详情'
+          this.staffDialogVisible = true
+          this.formRuleList.forEach((item, index) => {
+            item.disabled = true
+          })
+          this.ruleForm = JSON.parse(JSON.stringify(row))
+        } else if (type == 'del') {
+          this.deleteUser(row.id)
+        }
+      },
+      openModel(type) {
+        const dataList = formRules();
+        this.formRuleList = dataList;
+        this.staffTitle = '添加'
+        this.staffDialogVisible = true
+        this.operationType = type
+      },
+      // 删除用户
+      deleteUser(id) {
+        this.$confirm('此操作将永久删除用户, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          delIceRaft({
+            id: id,
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                message: '操作成功',
+                type: 'success'
+              });
+              this.getList()
+            }
+          })
+        }).catch(() => {});
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+      // 清空表单
+      closeDialog() {
+        this.$refs.childRules.resetCheck();
+      }
+    },
+  }
+</script>
+
+<style>
+</style>

+ 495 - 0
src/views/IceCreamFreezer/IceTracingManagement.vue

@@ -0,0 +1,495 @@
+<template>
+  <!-- 冰排追溯管理 -->
+  <div>
+    <actionBar :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
+      @searchProtocol="searchProtocol"></actionBar>
+    <div class="card_content">
+      <!-- 表单 -->
+      <tables :tableList="tableList" :tableData="tableData" @buttonData="buttonData"></tables>
+      <!-- 分页 -->
+      <div v-if="Total">
+        <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
+          @changeCurrent="changeCurrent">
+        </pagination>
+      </div>
+    </div>
+    <!-- 历史记录 -->
+    <div class="card_history">
+      <el-dialog title="历史记录" :visible.sync="historyVisible" width="90%" :close-on-click-modal="false"
+        @close="closeHistory">
+        <tables :tableList="historyList" :tableData="historyData" @buttonData="historyButton"></tables>
+        <!-- 分页 -->
+        <div v-if="historyTotal">
+          <pagination :total="historyTotal" :currentPage="historyPagination.PageIndex" @changeSize="historySize"
+            @changeCurrent="historyCurrent">
+          </pagination>
+        </div>
+        <el-dialog width="500px" title="编辑" :visible.sync="innerVisible" append-to-body>
+          <forms ref="childRules" :formNewList="editRuleList" :ruleForm="editRuleForm" :iceBank="true"
+            labelWidth="100px" @handleScroll="handleScroll" @remoteMethod="remoteMethod" :key="Math.random()"></forms>
+          <div slot="footer" class="dialog-footer">
+            <el-button type="primary" @click="submit">提交</el-button>
+          </div>
+        </el-dialog>
+      </el-dialog>
+    </div>
+    <!-- 出入库 -->
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="600px" :close-on-click-modal="false"
+      @close="closeDialog">
+      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" :iceBank="true" labelWidth="100px"
+        @handleScroll="handleScroll" @remoteMethod="remoteMethod" :key="Math.random()">
+      </forms>
+      <span slot="footer" class="dialog-footer" v-if="operationType != 'logs'">
+        <el-button plain @click="staffDialogVisible = false">取 消</el-button>
+        <el-button type="primary" :loading="confirmLoading" @click="handleAdd">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    getIceRaftNewest,
+    iceraftIn,
+    iceraftOut,
+    getIceRaftRecord,
+    putIceRaftRecord,
+    delIceRaftRecord
+  } from '@/api/iceRaft'
+  import {
+    getIcelocker,
+  } from '@/api/refrigerator'
+  import {
+    getCoolerBox
+  } from '@/api/incubator.js'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import forms from '@/components/forms'
+  import {
+    employee,
+    historyRecord,
+    iceRaftRules,
+    freezerRules,
+    editRules
+  } from "./iceRaft.js";
+  import {
+    frozenState
+  } from '@/assets/js/blockSort'
+  export default {
+    name: 'IceManagement',
+    components: {
+      actionBar,
+      tables,
+      pagination,
+      forms
+    },
+    data() {
+      return {
+        operateList: [{
+          type: 'come',
+          title: '入库',
+        }, {
+          type: 'goOut',
+          title: '出库',
+        }],
+        formList: [{
+          type: 'input',
+          label: '编号',
+          field: 'code',
+          placeholder: '请输入编号',
+        }, {
+          type: 'select',
+          label: '状态',
+          field: 'state',
+          placeholder: '请选择状态',
+          options: frozenState()
+        }],
+        searchRuleForm: {
+          code: '',
+          state: '',
+        },
+        searchValue: {},
+        tableList: employee(),
+        tableData: [],
+        Total: 0,
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        // 历史记录
+        historyList: historyRecord(),
+        historyData: [],
+        historyTotal: 0,
+        historyPagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        operationType: '',
+        staffTitle: '添加',
+        staffDialogVisible: false,
+        formRuleList: {},
+        ruleForm: {
+          iceLockerId: '',
+          freezeClaim: '',
+          coolerBoxId: '',
+          code: [],
+        },
+        confirmLoading: false,
+        historyVisible: false,
+
+        page: 1,
+        staffName: '',
+        limitNo: true,
+        eventSource: null,
+        timer: null, //定时器名称
+        iceRaftId: null,
+
+        innerVisible: false,
+        editRuleList: {},
+        editRuleForm: {
+          code: '',
+          status: '',
+          inStorageTime: '',
+          outStorageTime: '',
+          freezeClaim: '',
+        },
+        iceRaftCode: '',
+        coldCupboard: {
+          field: 'iceLockerId',
+          label: '冷藏柜',
+          placeholder: '请选择冷藏柜',
+          type: 'searchSelect',
+          colWidth: 24,
+          multiple: false,
+          rules: [{
+            required: true,
+            message: '请选择冷藏柜',
+            trigger: 'blur'
+          }],
+          options: [],
+        },
+        thermostat: {
+          field: 'coolerBoxId',
+          label: '保温箱',
+          placeholder: '请选择保温箱',
+          type: 'searchSelect',
+          colWidth: 24,
+          rules: [{
+            required: true,
+            message: '请选择保温箱',
+            trigger: 'blur'
+          }],
+          options: [],
+        }
+      }
+    },
+    beforeDestroy() {
+      clearInterval(this.timer); // 清除定时器
+      this.timer = null;
+    },
+    mounted() {
+      this.getList()
+      this.getFreezer()
+      this.getIncubator()
+    },
+    methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.Pagination.PageIndex = 1
+        this.searchValue = value
+        this.getList()
+      },
+      // 获取冰排列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        getIceRaftNewest(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+            this.timer = setTimeout(() => {
+              this.getList();
+            }, 60000)
+          }
+        })
+      },
+      // 弹窗表单添加
+      handleAdd() {
+        let flag = this.$refs['childRules'].validateForm();
+        if (flag) {
+          const params = {
+            ...this.ruleForm,
+          }
+          if (this.operationType == 'come') {
+            delete params.coolerBoxId
+            params.iceLockerId = Number(params.iceLockerId)
+            params.freezeClaim = Number(params.freezeClaim)
+            iceraftIn(params).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: res.msg,
+                  type: 'success'
+                });
+                this.staffDialogVisible = false
+                this.getList()
+              }
+            })
+          } else if (this.operationType == 'goOut') {
+            delete params.iceLockerId
+            delete params.freezeClaim
+            params.coolerBoxId = Number(params.coolerBoxId)
+            iceraftOut(params).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: res.msg,
+                  type: 'success'
+                });
+                this.staffDialogVisible = false
+                this.getList()
+              }
+            })
+          }
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
+      },
+      openModel(type) {
+        this.operationType = type
+        this.staffDialogVisible = true
+        this.page = 1
+        if (type == 'come') {
+          this.staffTitle = '入库'
+          this.formRuleList = iceRaftRules()
+          this.coldCupboard.options = []
+          this.formRuleList.unshift(this.coldCupboard)
+          this.limitNo = true
+          this.getFreezer()
+        } else if (type == 'goOut') {
+          this.staffTitle = '出库'
+          this.formRuleList = freezerRules()
+          this.thermostat.options = []
+          this.formRuleList.unshift(this.thermostat)
+          this.limitNo = true
+          this.getIncubator()
+        }
+        this.$forceUpdate()
+      },
+      // 重置冷藏柜、保温箱
+      resetSelect() {
+        this.page = 1
+        this.limitNo = true
+        this.staffName = ''
+      },
+      // 触底事件
+      handleScroll() {
+        if (this.limitNo) {
+          if (this.operationType == 'come') {
+            this.getFreezer()
+          } else if (this.operationType == 'goOut') {
+            this.getIncubator()
+          } else if (this.operationType == 'edit') {
+            if (this.deposit) {
+              this.getFreezer()
+            } else {
+              this.getIncubator()
+            }
+          }
+        }
+      },
+      // 搜索
+      remoteMethod(value) {
+        this.resetSelect()
+        this.staffName = value
+        if (this.operationType == 'come') {
+          this.getFreezer()
+        } else if (this.operationType == 'goOut') {
+          this.getIncubator()
+        }
+      },
+      // 获取冷藏柜列表
+      getFreezer() {
+        let arrList = []
+        let params = {
+          page: this.page,
+          pageSize: 10,
+          name: this.staffName,
+        }
+        getIcelocker(params).then(res => {
+          if (res.code == 200) {
+            let arr = res.data.list
+            let arrList = []
+            arr.forEach(item1 => {
+              var arrData = {
+                label: null,
+                value: null,
+              }
+              arrData.label = item1.name
+              arrData.value = item1.id
+              arrList.push(arrData)
+            })
+            if (this.limitNo == true) {
+              if (this.operationType == 'come' || this.operationType == 'goOut') {
+                this.formRuleList.forEach(item => {
+                  if (item.type == 'searchSelect') {
+                    item.options = item.options.concat(arrList)
+                  }
+                })
+                console.log(this.formRuleList,22)
+              } else if (this.operationType == 'edit') {
+                this.editRuleList.forEach(item => {
+                  if (item.type == 'searchSelect') {
+                    item.options = item.options.concat(arrList)
+                  }
+                })
+              }
+              // this.coldCupboard.options = this.coldCupboard.options.concat(arrList)
+            }
+            if (arrList.length >= 10) {
+              this.page = ++this.page;
+            } else {
+              // 已经没数据了 不需要增加数据
+              this.limitNo = false;
+            }
+          }
+        })
+      },
+      // 获取保温箱列表
+      getIncubator() {
+        let arrList = []
+        let params = {
+          page: this.page,
+          pageSize: 10,
+          name: this.staffName,
+        }
+        getCoolerBox(params).then(res => {
+          if (res.code == 200) {
+            let arr = res.data.list
+            let arrList = []
+            arr.forEach(item1 => {
+              var arrData = {
+                label: null,
+                value: null,
+              }
+              arrData.label = item1.name
+              arrData.value = item1.id
+              arrList.push(arrData)
+            })
+            if (this.limitNo == true) {
+              if (this.operationType == 'come' || this.operationType == 'goOut') {
+                this.formRuleList.forEach(item => {
+                  if (item.type == 'searchSelect') {
+                    item.options = item.options.concat(arrList)
+                  }
+                })
+              } else if (this.operationType == 'edit') {
+                this.editRuleList.forEach(item => {
+                  if (item.type == 'searchSelect') {
+                    item.options = item.options.concat(arrList)
+                  }
+                })
+              }
+              // this.thermostat.options = this.thermostat.options.concat(arrList)
+            }
+            if (arrList.length >= 10) {
+              this.page = ++this.page;
+            } else {
+              // 已经没数据了 不需要增加数据
+              this.limitNo = false;
+            }
+          }
+        })
+      },
+      // 冰排列表
+      buttonData(row, type) {
+        this.operationType = type
+        this.iceRaftId = row.id
+        this.iceRaftCode = row.code
+        if (type == 'logs') {
+          this.historyVisible = true
+          this.getHistory()
+        }
+      },
+      // 获取历史记录列表
+      getHistory(iceRaftId) {
+        var params = {
+          page: this.historyPagination.PageIndex,
+          pageSize: this.historyPagination.PageSize,
+          iceRaftId: this.iceRaftId,
+          // ...this.searchValue
+        }
+        getIceRaftRecord(params).then(res => {
+          if (res.code == 200) {
+            this.historyData = res.data.list
+            this.historyTotal = res.data.count
+          }
+        })
+      },
+      // 历史记录操作
+      historyButton(row, type) {
+        this.operationType = type
+        if (type == 'edit') {
+          this.innerVisible = true
+          this.page = 1
+          this.editRuleList = editRules()
+          if (row.outStorageTime == '') {
+            this.deposit = true
+            this.getFreezer()
+            this.editRuleList.push(this.coldCupboard)
+          } else {
+            this.deposit = false
+            this.getIncubator()
+            this.editRuleList.push(this.thermostat)
+          }
+          this.editRuleForm.code = this.iceRaftCode
+          this.editRuleForm.status = row.status
+          this.editRuleForm.inStorageTime = row.inStorageTime
+          this.editRuleForm.outStorageTime = row.outStorageTime
+          this.editRuleForm.freezeClaim = row.freezeClaim
+        }
+      },
+      // 编辑历史记录提交
+      submit() {
+
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+      // 历史记录分页
+      historySize(val) {
+        this.historyPagination.PageSize = val
+        this.getHistory()
+      },
+      historyCurrent(val) {
+        this.historyPagination.PageIndex = val
+        this.getHistory()
+      },
+      // 关闭历史记录
+      closeHistory() {
+        this.historyVisible = false
+      },
+      // 清空表单
+      closeDialog() {
+        this.resetSelect()
+        this.ruleForm.code = []
+        this.$refs.childRules.resetCheck();
+        this.coldCupboard.options = []
+        this.thermostat.options = []
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .card_history ::v-deep .el-dialog {
+    margin-top: 5vh !important;
+  }
+</style>

+ 67 - 0
src/views/IceCreamFreezer/freezer.js

@@ -0,0 +1,67 @@
+import {
+  iceraftStatus
+} from '@/assets/js/blockSort'
+export const employee = () => {
+  return [{
+    field: 'index',
+    label: '序号',
+    align: 'center',
+  }, {
+    field: 'code',
+    label: '编号',
+    align: 'center',
+  }, {
+    field: 'status',
+    label: '状态',
+    align: 'center',
+    options: iceraftStatus()
+  }, {
+    field: 'action',
+    label: '操作',
+    colWidth: '260px',
+    align: 'center',
+    labelButton: [{
+      type: 'logs',
+      label: '详情',
+      icon: 'el-icon-tickets',
+      style: 'success',
+    }, {
+      type: 'edit',
+      label: '编辑',
+      icon: 'el-icon-edit',
+      style: 'primary',
+    }, {
+      type: 'del',
+      label: '删除',
+      icon: 'el-icon-delete',
+      style: 'danger',
+    }]
+  }]
+}
+
+export const formRules = () => {
+  return [{
+    field: 'code',
+    label: '编号',
+    placeholder: '请输入编号',
+    type: 'input',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入编号',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'status',
+    label: '状态',
+    placeholder: '状态',
+    type: 'radio',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '选择状态',
+      trigger: 'change'
+    }],
+    options: iceraftStatus()
+  }, ]
+}

+ 212 - 0
src/views/IceCreamFreezer/iceRaft.js

@@ -0,0 +1,212 @@
+import {
+  frozenState
+} from '@/assets/js/blockSort'
+export const employee = () => {
+  return [{
+    field: 'index',
+    label: '序号',
+    align: 'center',
+  }, {
+    field: 'code',
+    label: '编号',
+    align: 'center',
+  }, {
+    field: 'iceRaftRecord.status',
+    label: '状态',
+    align: 'center',
+    options: frozenState()
+  }, {
+    field: 'iceRaftRecord.inStorageTime',
+    label: '入库时间',
+    align: 'center',
+  }, {
+    field: 'iceRaftRecord.outStorageTime',
+    label: '出库时间',
+    align: 'center',
+  }, {
+    field: 'location',
+    label: '所在位置',
+    align: 'center',
+  }, {
+    field: 'freezeClaim',
+    label: '冷冻要求',
+    align: 'center',
+  }, {
+    field: 'freezeDuration',
+    label: '冷冻时间',
+    align: 'center',
+  }, {
+    field: 'action',
+    label: '操作',
+    align: 'center',
+    labelButton: [{
+      type: 'logs',
+      label: '历史记录',
+      icon: 'el-icon-tickets',
+      style: 'success',
+    }]
+  }]
+}
+
+export const historyRecord = () => {
+  return [{
+    field: 'index',
+    label: '序号',
+    align: 'center',
+  }, {
+    field: 'status',
+    label: '状态',
+    align: 'center',
+    options: frozenState()
+  }, {
+    field: 'inStorageTime',
+    label: '入库时间',
+    align: 'center',
+  }, {
+    field: 'outStorageTime',
+    label: '出库时间',
+    align: 'center',
+  }, {
+    field: 'location',
+    label: '所在位置',
+    align: 'center',
+  }, {
+    field: 'freezeClaim',
+    label: '冷冻要求',
+    align: 'center',
+  }, {
+    field: 'freezeDuration',
+    label: '冷冻时间',
+    align: 'center',
+  }, {
+    field: 'action',
+    label: '操作',
+    colWidth: '240px',
+    align: 'center',
+    labelButton: [{
+      type: 'edit',
+      label: '编辑',
+      icon: 'el-icon-edit',
+      style: 'primary',
+    }, {
+      type: 'del',
+      label: '删除',
+      icon: 'el-icon-delete',
+      style: 'danger',
+    }]
+  }]
+}
+
+export const iceRaftRules = () => {
+  return [
+    //   {
+    //   field: 'iceLockerId',
+    //   label: '冷藏柜',
+    //   placeholder: '请选择冷藏柜',
+    //   type: 'searchSelect',
+    //   colWidth: 24,
+    //   multiple: false,
+    //   rules: [{
+    //     required: true,
+    //     message: '请选择冷藏柜',
+    //     trigger: 'blur'
+    //   }],
+    //   options: [],
+    // },
+    {
+      field: 'freezeClaim',
+      label: '冷冻要求',
+      placeholder: '请输入冷冻时间',
+      type: 'input',
+      colWidth: 24,
+      unit: '小时',
+      rules: [{
+        required: true,
+        message: '请输入冷冻时间',
+        trigger: 'blur'
+      }]
+    }, {
+      field: 'code',
+      label: '冰排编号',
+      placeholder: '请输入冰排编号',
+      type: 'scan',
+      colWidth: 24,
+      rules: [{
+        required: true,
+        message: '请输入冰排编号',
+        trigger: 'blur'
+      }]
+    }
+  ]
+}
+
+export const freezerRules = () => {
+  return [
+    //   {
+    //   field: 'coolerBoxId',
+    //   label: '保温箱',
+    //   placeholder: '请选择保温箱',
+    //   type: 'searchSelect',
+    //   colWidth: 24,
+    //   rules: [{
+    //     required: true,
+    //     message: '请选择保温箱',
+    //     trigger: 'blur'
+    //   }],
+    //   options: [],
+    // },
+    {
+      field: 'code',
+      label: '冰排编号',
+      placeholder: '请输入冰排编号',
+      type: 'scan',
+      colWidth: 24,
+      rules: [{
+        required: true,
+        message: '请输入冰排编号',
+        trigger: 'blur'
+      }]
+    }
+  ]
+}
+
+export const editRules = () => {
+  return [{
+    field: 'code',
+    label: '冰排编号',
+    type: 'nvarchar',
+    colWidth: 24,
+    detail: false,
+  }, {
+    field: 'status',
+    label: '状态',
+    type: 'nvarcharil',
+    colWidth: 24,
+    detail: false,
+    options: frozenState()
+  }, {
+    field: 'inStorageTime',
+    label: '入库时间',
+    type: 'nvarchar',
+    colWidth: 24,
+    detail: false,
+  }, {
+    field: 'outStorageTime',
+    label: '出库时间',
+    type: 'nvarchar',
+    colWidth: 24,
+    detail: false,
+  }, {
+    field: 'freezeClaim',
+    label: '冷冻要求',
+    placeholder: '请输入冷冻时间',
+    type: 'input',
+    colWidth: 24,
+    unit: '小时',
+    rules: [{
+      required: true,
+      message: '请输入冷冻时间',
+      trigger: 'blur'
+    }]
+  }, ]
+}

+ 67 - 0
src/views/IceCreamFreezer/refrigerator.js

@@ -0,0 +1,67 @@
+import {
+  iceraftStatus
+} from '@/assets/js/blockSort'
+export const employee = () => {
+  return [{
+    field: 'index',
+    label: '序号',
+    align: 'center',
+  }, {
+    field: 'name',
+    label: '名称',
+    align: 'center',
+  }, {
+    field: 'status',
+    label: '状态',
+    align: 'center',
+    options: iceraftStatus()
+  }, {
+    field: 'action',
+    label: '操作',
+    colWidth: '260px',
+    align: 'center',
+    labelButton: [{
+      type: 'logs',
+      label: '详情',
+      icon: 'el-icon-tickets',
+      style: 'success',
+    }, {
+      type: 'edit',
+      label: '编辑',
+      icon: 'el-icon-edit',
+      style: 'primary',
+    }, {
+      type: 'del',
+      label: '删除',
+      icon: 'el-icon-delete',
+      style: 'danger',
+    }]
+  }]
+}
+
+export const formRules = () => {
+  return [{
+    field: 'name',
+    label: '名称',
+    placeholder: '请输入名称',
+    type: 'input',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入名称',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'status',
+    label: '状态',
+    placeholder: '状态',
+    type: 'radio',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '选择状态',
+      trigger: 'change'
+    }],
+    options: iceraftStatus()
+  }, ]
+}

+ 32 - 12
src/views/common/Base.vue

@@ -3,24 +3,25 @@
     <el-container>
       <el-header>
         <div class="space_between_in base_head">
-          <topNav></topNav>
+          <topNav :iconFlag="iconFlag" @getUnpack="getUnpack"></topNav>
           <UserInfo></UserInfo>
         </div>
       </el-header>
       <el-container>
-        <el-aside width="200px;">
+        <el-aside :width="sideWidth+'px'">
           <div class="card_aside">
             <div class="card_menu">
-              <el-menu :default-active="activePath" class="el-menu-vertical-demo" router @open="handleOpen"
-                @close="handleClose">
-                <el-menu-item class="menu_item" v-for="(item,index) in menus" :index="item.path" :key="index"
-                  @click="saveNavState(item.path)">
-                  <i :class="item.meta.icon" class="menu_icon iconfont"></i>
-                  <span>{{item.meta.title}}</span>
-                </el-menu-item>
+              <el-menu :collapse="iconFlag" :default-active="activePath" class="el-menu-vertical-demo" router
+                :collapse-transition="false" @open="handleOpen" @close="handleClose">
+                <template v-for="(item,index) in menus">
+                  <el-menu-item class="menu_item" :index="item.path" :key="index" @click="saveNavState(item.path)">
+                    <i :class="item.meta.icon" class="menu_icon iconfont"></i>
+                    <span slot="title">{{item.meta.title}}</span>
+                  </el-menu-item>
+                </template>
               </el-menu>
             </div>
-            <div class="card_support">
+            <div class="card_support" v-if="!iconFlag">
               <span>技术服务:宝智达科技</span>
               <span style="margin-top: 5px;">服务电话:400-600-0968</span>
             </div>
@@ -53,6 +54,8 @@
         menus: [],
         // 被激活的链接地址
         activePath: '',
+        iconFlag: false,
+        sideWidth: 200,
       }
     },
     computed: {
@@ -96,11 +99,30 @@
       saveNavState(activePath) {
         localStorage.setItem("activePath", activePath);
         this.activePath = activePath
+      },
+      // 展开收起
+      getUnpack(flag) {
+        console.log(flag, 999)
+        if (flag) {
+          this.iconFlag = false
+          this.sideWidth = 200
+        } else {
+          this.iconFlag = true
+          this.sideWidth = 64
+        }
       }
     }
   }
 </script>
 <style lang="scss" scoped>
+  ::v-deep .el-aside {
+    transition: width 0.15s;
+    -webkit-transition: width 0.15s;
+    -moz-transition: width 0.15s;
+    -webkit-transition: width 0.15s;
+    -o-transition: width 0.15s;
+  }
+
   ::v-deep .el-container {
     height: calc(100vh - 60px);
   }
@@ -115,12 +137,10 @@
   }
 
   .card_aside {
-    width: 200px;
     height: calc(100% - 20px);
     display: flex;
     flex-direction: column;
     justify-content: space-between;
-    overflow-y: auto;
     padding-top: 20px;
   }
 

+ 19 - 1
src/views/common/topNav.vue

@@ -2,17 +2,29 @@
   <div class="card_head">
     <el-image style="height: 35px;width: 35px;" :src="require('@/assets/logo3.png')"></el-image>
     <div class="head_title">宝智达冷链送药追溯平台</div>
+    <i class="card_unpack" :class="iconFlag ? 'el-icon-s-unfold' : 'el-icon-s-fold'" @click="getUnpack"></i>
   </div>
 </template>
 
 <script>
   export default {
     name: 'TopNav',
+    props: {
+      iconFlag: {
+        type: Boolean,
+        default: () => false,
+      },
+    },
     data() {
       return {
 
       }
-    }
+    },
+    methods: {
+      getUnpack() {
+        this.$emit('getUnpack', this.iconFlag)
+      }
+    },
   }
 </script>
 
@@ -28,4 +40,10 @@
     color: rgb(35, 49, 105);
     margin-left: 10px;
   }
+
+  .card_unpack {
+    cursor: pointer;
+    font-size: 25px;
+    margin-left: 10px;
+  }
 </style>

+ 4 - 2
src/views/newInquiry.vue

@@ -243,6 +243,7 @@
           waybillNo: this.waybillBasic.waybillNo,
           status: 3,
           receiptImg: value,
+          rejectionReason: '',
         }
         const loading = this.$loading({
           lock: true,
@@ -251,8 +252,8 @@
           background: 'rgba(0, 0, 0, 0.7)'
         });
         getCustomerReceipt(params).then(res => {
+          this.$refs.information.isModalVisibleil = false
           if (res.code == 200) {
-            this.$refs.information.isModalVisibleil = false
             this.getInformation()
             this.$message({
               message: res.msg,
@@ -260,7 +261,8 @@
             });
           }
           loading.close();
-        }).catch(() => {
+        }).catch((err) => {
+          this.$refs.information.isModalVisibleil = false
           loading.close();
         })
       },

+ 35 - 26
src/views/page/Home.vue

@@ -11,12 +11,12 @@
           </div>
           <el-image style="width: 166px;height: 120px;" :src="require('@/assets/images/transport1.svg')"></el-image>
         </div>
+        <div class="operationManual" @click="goTickets">
+          <el-image style="width: 25px;height: 25px;" :src="require('@/assets/images/manual.png')"></el-image>
+          <span>冷链送药追溯平台使用手册</span>
+        </div>
       </div>
     </div>
-    <div class="operationManual" @click="goTickets">
-      <el-image style="width: 25px;height: 25px;" :src="require('@/assets/images/manual.png')"></el-image>
-      <span>冷链送药追溯平台使用手册</span>
-    </div>
     <div class="card_head_statistics">
       <div class="item_statistics">
         <span class="sum_title">今日总运单数</span>
@@ -46,25 +46,32 @@
         </div>
       </div>
     </div>
-    <div class="card_head_statisticsil" v-if="userName != 'admin'">
-      <div class="card_time_select">
-        <div style="display: flex;">
-          <div :class="yearsType ? 'month_title' : 'year_title'" @click="switchover(true)">按月</div>
-          <div :class="!yearsType ? 'month_title' : 'year_title'" @click="switchover(false)">按年</div>
-        </div>
-        <div v-show="yearsType">
-          <el-date-picker v-model="timeValue" value-format="yyyy-MM" type="month" placeholder="选择月" size="small"
-            @change="changeTime">
-          </el-date-picker>
+    <div style="display: flex;flex-direction: column;flex: 1;">
+      <div class="card_head_statisticsil" v-if="userName != 'admin'">
+        <div class="card_time_select">
+          <div style="display: flex;">
+            <div :class="yearsType ? 'month_title' : 'year_title'" @click="switchover(true)">按月</div>
+            <div :class="!yearsType ? 'month_title' : 'year_title'" @click="switchover(false)">按年</div>
+          </div>
+          <div v-show="yearsType">
+            <el-date-picker v-model="timeValue" value-format="yyyy-MM" type="month" placeholder="选择月" size="small"
+              @change="changeTime">
+            </el-date-picker>
+          </div>
+          <div v-show="!yearsType">
+            <el-date-picker v-model="timeValue1" value-format="yyyy" type="year" placeholder="选择年" size="small"
+              @change="changeTime1">
+            </el-date-picker>
+          </div>
         </div>
-        <div v-show="!yearsType">
-          <el-date-picker v-model="timeValue1" value-format="yyyy" type="year" placeholder="选择年" size="small"
-            @change="changeTime1">
-          </el-date-picker>
+        <div class="card_chart">
+          <div id="pie1" class="chart"></div>
         </div>
       </div>
-      <div class="card_chart">
-        <div id="pie1" class="chart"></div>
+     <div style="flex: 1;">
+       <div>
+         <div></div>
+       </div>
       </div>
     </div>
   </div>
@@ -264,7 +271,6 @@
   .card_head_home {
     position: relative;
     display: flex;
-    align-items: center;
     background-color: #c8f4fa;
     border-radius: 5px;
     overflow: hidden;
@@ -276,7 +282,9 @@
     align-items: center;
     cursor: pointer;
     justify-content: flex-end;
-    margin-top: 10px;
+    margin-bottom: 10px;
+    margin-right: 10px;
+    flex: none;
 
     span {
       color: #909399;
@@ -288,7 +296,10 @@
   .card_image_flex {
     display: flex;
     align-items: center;
+    align-items: flex-end;
+    justify-content: space-between;
     height: 140px;
+    width: 100%;
   }
 
   .home_content {
@@ -318,9 +329,8 @@
     margin-top: 10px;
     background-color: #fff;
     border-radius: 10px;
-    padding: 15px;
     box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
-    width: calc(100% - 30px);
+    width: 100%;
     overflow: auto;
   }
 
@@ -359,7 +369,7 @@
   }
 
   .item_statistics {
-    height: 100px;
+    height: 90px;
     flex: none;
     display: flex;
     flex-direction: column;
@@ -374,7 +384,6 @@
   }
 
   .sum_num {
-    margin-top: 5px;
     font-size: 30px;
   }
 

+ 1 - 0
src/views/system/ClientManagement.vue

@@ -67,6 +67,7 @@
         searchRuleForm: {
           name: '',
         },
+        searchValue: {},
         Pagination: {
           PageIndex: 1,
           PageSize: 10,

+ 23 - 10
src/views/system/CompanyManagement.vue

@@ -5,7 +5,7 @@
       @searchProtocol="searchProtocol"></actionBar>
     <div class="card_content">
       <!-- 表单 -->
-      <tables :suspension="true" :tableList="tableList" :tableData="tableData" @buttonData="buttonData"></tables>
+      <treeTable :treeData="treeData" :treeDataList="treeDataList" @buttonData="buttonData"></treeTable>
       <!-- 分页 -->
       <div v-if="Total">
         <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
@@ -33,7 +33,7 @@
     delCompany
   } from '@/api/company'
   import actionBar from '@/components/actionBar'
-  import tables from '@/components/tables'
+  import treeTable from '@/components/treeTable'
   import pagination from '@/components/pagination'
   import forms from '@/components/forms'
   import {
@@ -44,9 +44,9 @@
     name: 'UserManagement',
     components: {
       actionBar,
-      tables,
+      treeTable,
       pagination,
-      forms
+      forms,
     },
     data() {
       return {
@@ -64,12 +64,12 @@
         searchRuleForm: {
           name: '',
         },
+        searchValue: {},
         Pagination: {
           PageIndex: 1,
           PageSize: 10,
         },
         Total: 0,
-        tableData: [],
         operationType: '',
         tableList: employee(),
         tableData: [],
@@ -78,6 +78,10 @@
         formRuleList: [],
         ruleForm: {},
         confirmLoading: false,
+
+        treeData: employee(),
+        treeDataList: [],
+        parentId: null,
       }
     },
     mounted() {
@@ -91,7 +95,7 @@
         this.searchValue = value
         this.getList()
       },
-      // 获取订单列表
+      // 获取公司列表
       getList() {
         var params = {
           page: this.Pagination.PageIndex,
@@ -100,21 +104,23 @@
         }
         getCompany(params).then(res => {
           if (res.code == 200) {
-            this.tableData = res.data.list
+            this.treeDataList = res.data
             this.Total = res.data.count
           }
         })
       },
       // 弹窗表单添加
-      // 弹窗表单添加
       handleAdd() {
         let flag = this.$refs['childRules'].validateForm();
         if (flag) {
-          if (this.operationType == 'add') {
+          if (this.operationType == 'add' || this.operationType == 'subAdd') {
             this.confirmLoading = true
             var params = {
               ...this.ruleForm
             }
+            if (this.operationType == 'subAdd') {
+              params.parentId = this.parentId
+            }
             addCompany(params).then(res => {
               if (res.code == 200) {
                 this.$message({
@@ -131,7 +137,10 @@
           } else if (this.operationType == 'edit') {
             this.confirmLoading = true
             var params = {
-              ...this.ruleForm
+              id: this.ruleForm.id,
+              name: this.ruleForm.name,
+              remark: this.ruleForm.remark,
+              coldKey: this.ruleForm.coldKey,
             }
             putCompany(params).then(res => {
               if (res.code == 200) {
@@ -163,6 +172,10 @@
           })
         } else if (type == 'del') {
           this.deleteUser(row.id)
+        } else if (type == 'subAdd') {
+          this.staffTitle = '添加子级'
+          this.staffDialogVisible = true
+          this.parentId = row.id
         }
       },
       openModel(type) {

+ 1 - 0
src/views/system/IncubatorManagement.vue

@@ -109,6 +109,7 @@
           name: '',
           sn: '',
         },
+        searchValue: {},
         Pagination: {
           PageIndex: 1,
           PageSize: 10,

+ 1 - 1
src/views/system/MyWaybill.vue

@@ -171,6 +171,7 @@
           status: '',
           time: [],
         },
+        searchValue: {},
         Pagination: {
           PageIndex: 1,
           PageSize: 10,
@@ -210,7 +211,6 @@
         importFile: null,
         importFlag: false,
         downloadFlag: false,
-        searchValue: {},
         bulkPrintVisible: false,
         tableList1: employeeil(),
         tableData1: [],

+ 1 - 0
src/views/system/StoreManagement.vue

@@ -73,6 +73,7 @@
           name: '',
           sn: '',
         },
+        searchValue: {},
         Pagination: {
           PageIndex: 1,
           PageSize: 10,

+ 1 - 0
src/views/system/UserManagement.vue

@@ -69,6 +69,7 @@
           name: '',
           type: '',
         },
+        searchValue: {},
         Pagination: {
           PageIndex: 1,
           PageSize: 10,

+ 1 - 0
src/views/system/VehicleManagement.vue

@@ -73,6 +73,7 @@
           name: '',
           sn: '',
         },
+        searchValue: {},
         Pagination: {
           PageIndex: 1,
           PageSize: 10,

+ 128 - 51
src/views/system/WaybillManagement.vue

@@ -15,28 +15,18 @@
         </pagination>
       </div>
     </div>
-    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="80%" :close-on-click-modal="false"
+    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="800px" :close-on-click-modal="false"
       @close="closePopup">
-      <div class="card_waybill">
-        <div class="waybill_item" style="margin-right: 10px;">
-          <waybillForm ref="sender" title="寄件人" :conserveFlag="conserveFlag" thinTitle="寄件人簿" :ruleForm="senderForm"
-            @addressBook="getAddressBook('sender')" @conserveSelect="conserveSelect">
-          </waybillForm>
-        </div>
-        <div class="waybill_item" style="margin-left: 10px;">
-          <waybillForm ref="deliverer" title="配送人" :ruleForm="delivererForm" :deliverer="true"
-            @addressBook="getDelivererBook('deliverer')"></waybillForm>
-        </div>
-        <div class="waybill_item" style="margin-left: 10px;">
-          <waybillForm ref="recipients" title="收件人" :conserveFlag="conserveFlag" thinTitle="收件人簿"
-            :ruleForm="recipientsForm" @addressBook="getAddressBook('recipients')" @conserveSelect="conserveSelectil">
-          </waybillForm>
-        </div>
-      </div>
-      <div style="margin-top: 20px;">
-        <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="80px">
-        </forms>
+      <forms ref="userRules" :formNewList="personnelList" :ruleForm="personnelForm" labelWidth="80px"
+        @remoteMethod="remoteSearch">
+      </forms>
+      <div class="waybill_item">
+        <waybillForm ref="recipients" title="收件人" :conserveFlag="conserveFlag" thinTitle="收件人簿"
+          :ruleForm="recipientsForm" @addressBook="getAddressBook('recipients')" @conserveSelect="conserveSelectil">
+        </waybillForm>
       </div>
+      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="80px">
+      </forms>
       <el-dialog width="60%" title="地址簿" :visible.sync="innerVisible" append-to-body>
         <div class="space_between_in" style="margin-bottom: 15px;">
           <div style="display: flex;align-items: center;width: 100%;">
@@ -137,15 +127,14 @@
     addressBook,
     sendList,
     signList,
-    addressDeliverer
+    consignmentList
   } from "./waybill.js";
   import {
     WaybillStatus
   } from '@/assets/js/blockSort'
   import {
-    regionData,
-    CodeToText
-  } from 'element-china-area-data'
+    number
+  } from 'echarts'
   export default {
     name: 'WaybillManagement',
     components: {
@@ -193,6 +182,7 @@
           status: null,
           time: [],
         },
+        searchValue: {},
         Pagination: {
           PageIndex: 1,
           PageSize: 10,
@@ -225,6 +215,12 @@
           name: '',
           phone: '',
         },
+        personnelList: consignmentList(),
+        personnelForm: {
+          reCheckId: null,
+          deliveryId: null,
+        },
+        delivererName: '',
         ruleForm: {
           tamperProofLabel: '',
           tamperProofLabelImg: '',
@@ -250,7 +246,6 @@
         staffName: '',
         limitNo: true,
         sendOrdersId: 2,
-        searchValue: {},
         signDialogVisible: false,
         signRuleList: signList(),
         signRuleForm: {
@@ -273,6 +268,8 @@
     mounted() {
       const dataList = formRules();
       this.formRuleList = dataList;
+      this.getReviewerList()
+      this.getDelivererList()
       this.getList()
     },
     methods: {
@@ -297,6 +294,9 @@
         getWaybill(params).then(res => {
           if (res.code == 200) {
             this.tableData = res.data.list
+            this.tableData.forEach(item => {
+              item.visible = false
+            })
             this.Total = res.data.count
           }
         })
@@ -328,24 +328,82 @@
           }
         })
       },
+      // 复核人
+      getReviewerList() {
+        var params = {
+          page: 1,
+          pageSize: 999,
+          name: this.delivererName,
+        }
+        getUser(params).then(res => {
+          if (res.code == 200) {
+            let arr = res.data.list
+            let arrList = []
+            arr.forEach(item1 => {
+              var arrData = {
+                label: null,
+                value: null,
+              }
+              arrData.label = item1.nickName
+              arrData.value = item1.id
+              arrList.push(arrData)
+            })
+            this.personnelList.forEach(item => {
+              if (item.field == 'reCheckId') {
+                item.options = item.options.concat(arrList)
+              }
+            })
+          }
+        })
+      },
+      remoteSearch(value, type) {
+        this.delivererName = value
+        if (type == 'deliveryId') {
+          this.personnelList.forEach(item => {
+            if (item.field == 'deliveryId') {
+              item.options = []
+            }
+          })
+          this.getDelivererList()
+        } else if (type == 'reCheckId') {
+          this.personnelList.forEach(item => {
+            if (item.field == 'reCheckId') {
+              item.options = []
+            }
+          })
+          this.getReviewerList()
+        }
+      },
       // 获取配送人
       getDelivererBook(type) {
-        this.innerVisible = true
         this.bookType = type
-        this.bookTableList = addressDeliverer()
         this.getDelivererList()
       },
       getDelivererList() {
         var params = {
-          page: this.bookPagination.PageIndex,
-          pageSize: this.bookPagination.PageSize,
+          page: 1,
+          pageSize: 999,
           type: 3,
-          name: this.bookInput,
+          name: this.delivererName,
         }
         getUser(params).then(res => {
           if (res.code == 200) {
-            this.bookTableData = res.data.list
-            this.bookTotal = res.data.count
+            let arr = res.data.list
+            let arrList = []
+            arr.forEach(item1 => {
+              var arrData = {
+                label: null,
+                value: null,
+              }
+              arrData.label = item1.nickName
+              arrData.value = item1.id
+              arrList.push(arrData)
+            })
+            this.personnelList.forEach(item => {
+              if (item.field == 'deliveryId') {
+                item.options = item.options.concat(arrList)
+              }
+            })
           }
         })
       },
@@ -366,22 +424,23 @@
       },
       // 弹窗表单添加
       async handleAdd() {
-        let senderFlag = this.$refs['sender'].validateForm();
+        let senderFlag = this.$refs['userRules'].validateForm();
         let recipientsFlag = this.$refs['recipients'].validateForm();
-        let flag = this.$refs['deliverer'].validateForm();
-        if (senderFlag && recipientsFlag && flag) {
+        if (senderFlag && recipientsFlag) {
           this.confirmLoading = true
           var params = {
-            senderAddressName: this.senderForm.name,
-            senderAddressPhone: this.senderForm.phone,
-            senderAddressDetails: this.senderForm.address,
+            // senderAddressName: this.senderForm.name,
+            // senderAddressPhone: this.senderForm.phone,
+            // senderAddressDetails: this.senderForm.address,
             consigneeAddressName: this.recipientsForm.name,
             consigneeAddressPhone: this.recipientsForm.phone,
             consigneeAddressDetails: this.recipientsForm.address,
-            deliveryName: this.delivererForm.name,
-            deliveryPhone: this.delivererForm.phone,
-            saveSenderAddress: this.saveSenderAddress,
+            // deliveryName: this.delivererForm.name,
+            // deliveryPhone: this.delivererForm.phone,
+            // saveSenderAddress: this.saveSenderAddress,
             saveConsigneeAddress: this.saveConsigneeAddress,
+            deliveryId: Number(this.personnelForm.deliveryId),
+            reCheckId: Number(this.personnelForm.reCheckId),
             ...this.ruleForm
           }
           if (this.ruleForm.fileList) {
@@ -389,6 +448,7 @@
             params.tamperProofLabelImg = fileImage
           }
           if (this.operationType == 'add') {
+            delete params.fileList
             await addWaybill(params).then(res => {
               if (res.code == 200) {
                 this.$message({
@@ -403,6 +463,7 @@
               this.confirmLoading = false
             })
           } else if (this.operationType == 'edit') {
+            delete params.fileList
             params.id = this.orderId
             await putWaybill(params).then(res => {
               if (res.code == 200) {
@@ -526,15 +587,17 @@
           this.staffDialogVisible = true
           setTimeout(() => {
             this.$nextTick(() => {
-              this.senderForm.name = row.senderAddressName
-              this.senderForm.phone = row.senderAddressPhone
-              this.senderForm.address = row.senderAddressDetails
+              // this.senderForm.name = row.senderAddressName
+              // this.senderForm.phone = row.senderAddressPhone
+              // this.senderForm.address = row.senderAddressDetails
               this.recipientsForm.name = row.consigneeAddressName
               this.recipientsForm.phone = row.consigneeAddressPhone
               this.recipientsForm.address = row.consigneeAddressDetails
-              this.delivererForm.name = row.deliveryName
-              this.delivererForm.phone = row.deliveryPhone
+              // this.delivererForm.name = row.deliveryName
+              // this.delivererForm.phone = row.deliveryPhone
               this.ruleForm.tamperProofLabel = row.tamperProofLabel
+              this.personnelForm.reCheckId = String(row.reCheckId)
+              this.personnelForm.deliveryId = String(row.deliveryId)
               if (row.tamperProofLabelImg) {
                 var arr = row.tamperProofLabelImg.split(',')
                 var arr3 = []
@@ -719,7 +782,7 @@
           this.staffTitle = '添加运单'
           this.staffDialogVisible = true
           this.$nextTick(() => {
-            this.$refs.sender.radio = '1'
+            // this.$refs.sender.radio = '1'
             this.$refs.recipients.radio = '1'
           })
         } else if (type == 'sends') {
@@ -874,18 +937,31 @@
       // 关闭清空表单
       closePopup() {
         this.ruleForm.fileList = []
-        this.$refs.sender.resetForm()
+        // this.$refs.sender.resetForm()
         this.$refs.recipients.resetForm()
-        this.$refs.deliverer.resetForm()
+        // this.$refs.deliverer.resetForm()
         this.$refs.childRules.resetCheck()
+        this.$refs.userRules.resetCheck()
+        this.personnelList.forEach(item => {
+          item.options = []
+        })
       }
     }
   }
 </script>
 
 <style lang="scss" scoped>
+  ::v-deep .el-dialog {
+    margin: 0 auto !important;
+    margin-top: 7vh !important;
+  }
+
+  .waybill_home ::v-deep .el-dialog__header {
+    border-bottom: 1px solid #E4E7ED;
+  }
+
   .waybill_home ::v-deep .el-dialog__body {
-    padding: 0px 20px 30px 20px;
+    padding: 10px 20px 30px 20px;
   }
 
   .waybil_form ::v-deep .el-cascader {
@@ -894,11 +970,12 @@
 
   .card_waybill {
     display: flex;
+    flex-direction: column;
     border-bottom: 1px solid #E4E7ED;
   }
 
   .waybill_item {
-    width: 50%;
+    width: 100%;
   }
 
   .card_book_list {

+ 13 - 13
src/views/system/address.js

@@ -78,18 +78,18 @@ export const formRules = () => {
         trigger: 'blur'
       }]
     },
-    {
-      field: 'addressType',
-      label: '类型',
-      placeholder: '类型',
-      type: 'radio',
-      colWidth: 24,
-      rules: [{
-        required: true,
-        message: '选择类型',
-        trigger: 'change'
-      }],
-      options: userType()
-    },
+    // {
+    //   field: 'addressType',
+    //   label: '类型',
+    //   placeholder: '类型',
+    //   type: 'radio',
+    //   colWidth: 24,
+    //   rules: [{
+    //     required: true,
+    //     message: '选择类型',
+    //     trigger: 'change'
+    //   }],
+    //   options: userType()
+    // },
   ]
 }

+ 2 - 0
src/views/system/addressBook.vue

@@ -64,6 +64,7 @@
         searchRuleForm: {
           name: '',
         },
+        searchValue: {},
         Pagination: {
           PageIndex: 1,
           PageSize: 10,
@@ -118,6 +119,7 @@
             var params = {
               ...this.ruleForm
             }
+            params.addressType = 'consignee'
             addAddress(params).then(res => {
               if (res.code == 200) {
                 this.$message({

+ 7 - 6
src/views/system/company.js

@@ -3,13 +3,9 @@ import {
 } from '@/assets/js/blockSort'
 export const employee = () => {
   return [{
-    field: 'index',
-    label: '序号',
-    align: 'center',
-  }, {
     field: 'name',
     label: '名称',
-    align: 'center',
+    align: 'left',
   }, {
     field: 'remark',
     label: '备注',
@@ -17,9 +13,14 @@ export const employee = () => {
   }, {
     field: 'action',
     label: '操作',
-    colWidth: '200px',
+    colWidth: '330px',
     align: 'center',
     labelButton: [{
+      type: 'subAdd',
+      label: '新增子级',
+      icon: 'el-icon-plus',
+      style: 'primary',
+    }, {
       type: 'edit',
       label: '编辑',
       icon: 'el-icon-edit',

+ 102 - 31
src/views/system/waybill.js

@@ -16,44 +16,97 @@ export const employee = () => {
     field: 'status',
     label: '状态',
     align: 'center',
-    options: WaybillStatus()
+    options: WaybillStatus(),
+    colWidth: '70px',
   }, {
-    field: 'deliveryName',
-    label: '配送员姓名',
+    field: 'multistage',
+    label: '复核人',
+    children: [{
+      field: 'reCheck.nickName',
+      label: '姓名',
+      align: 'center',
+      colWidth: '120px',
+    }, {
+      field: 'reCheck.phone',
+      label: '电话',
+      align: 'center',
+      colWidth: '140px',
+    }, ]
+  }, {
+    field: 'multistage',
+    label: '配送人',
+    children: [{
+      field: 'delivery.nickName',
+      label: '姓名',
+      align: 'center',
+      colWidth: '120px',
+    }, {
+      field: 'delivery.phone',
+      label: '电话',
+      align: 'center',
+      colWidth: '140px',
+    }, ]
+  }, {
+    field: 'multistage',
+    label: '收件人',
+    children: [{
+      field: 'consigneeAddressName',
+      label: '姓名',
+      align: 'center',
+      colWidth: '120px',
+    }, {
+      field: 'consigneeAddressPhone',
+      label: '电话',
+      align: 'center',
+      colWidth: '140px',
+    }, {
+      field: 'consigneeAddressDetails',
+      label: '地址',
+      align: 'center',
+      colWidth: '220px',
+    }, ]
+  }, {
+    field: 'tamperProofLabel',
+    label: '防拆标签码',
     align: 'center',
-    colWidth: '140px',
+    colWidth: '180px',
   }, {
-    field: 'deliveryPhone',
-    label: '配送员电话',
+    field: 'coolerBox.name',
+    label: '保温箱',
     align: 'center',
-    colWidth: '140px',
+    colWidth: '180px',
   }, {
-    field: 'senderAddressDetails',
-    label: '寄件地址',
+    field: 'orderTime',
+    label: '冰排编号',
     align: 'center',
-    colWidth: '220px',
+    colWidth: '180px',
   }, {
-    field: 'consigneeAddressDetails',
-    label: '收件地址',
+    field: 'orderTime',
+    label: '出发时间',
     align: 'center',
-    colWidth: '220px',
+    colWidth: '180px',
   }, {
-    field: 'tamperProofLabel',
-    label: '防拆标签码',
+    field: 'orderTime',
+    label: '签收时间',
     align: 'center',
-    colWidth: '220px',
+    colWidth: '180px',
   }, {
     field: 'orderTime',
-    label: '下单时间',
+    label: '配送耗时',
     align: 'center',
     colWidth: '180px',
   }, {
-    field: 'coolerBox.name',
-    label: '保温箱',
+    field: 'orderTime',
+    label: '服务评价',
+    align: 'center',
+    colWidth: '180px',
+  }, {
+    field: 'orderTime',
+    label: '备注',
     align: 'center',
     colWidth: '180px',
   }, {
-    field: 'action',
+    field: 'unpackBtn',
     label: '操作',
     colWidth: '370px',
     align: 'center',
@@ -133,17 +186,6 @@ export const addressBook = () => {
     align: 'center',
   }, ]
 }
-export const addressDeliverer = () => {
-  return [{
-    field: 'nickName',
-    label: '姓名',
-    align: 'center',
-  }, {
-    field: 'phone',
-    label: '电话',
-    align: 'center',
-  }]
-}
 export const sendList = () => {
   return [{
     field: 'coolerBoxId',
@@ -160,6 +202,35 @@ export const sendList = () => {
     options: [],
   }]
 }
+export const consignmentList = () => {
+  return [{
+    field: 'reCheckId',
+    type: 'searchSelect',
+    label: '复核人',
+    placeholder: '请选择复核人',
+    colWidth: 24,
+    multiple: false,
+    rules: [{
+      required: true,
+      message: '请选择复核人',
+      trigger: 'blur,change'
+    }],
+    options: [],
+  },{
+    field: 'deliveryId',
+    type: 'searchSelect',
+    label: '配送人',
+    placeholder: '请选择配送人',
+    colWidth: 24,
+    multiple: false,
+    rules: [{
+      required: true,
+      message: '请选择配送人',
+      trigger: 'blur,change'
+    }],
+    options: [],
+  }]
+}
 
 function validatePassword(rule, value, callback) {
   // 假设正确的密码是 '123456'

+ 2 - 2
vue.config.js

@@ -16,8 +16,8 @@ module.exports = defineConfig({
   devServer: {
     proxy: {
       '/api': {
-        target: 'https://colddelivery.coldbaozhida.com/cold_delivery',
-        // target: 'http://192.168.11.77:6280', //测试
+        // target: 'https://colddelivery.coldbaozhida.com/cold_delivery',
+        target: 'http://192.168.11.77:6280', //测试
         ws: false,
         changeOrigin: true,
         pathRewrite: {

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