Kaynağa Gözat

保温箱管理、冷链导入、运单打印

qianduan 3 ay önce
ebeveyn
işleme
6f4e8a8dc4

+ 32 - 0
src/api/company.js

@@ -42,3 +42,35 @@ export function delCompany(parameter) {
     data: parameter
   })
 }
+
+// 获取公司信息
+export function getCompanyMy(parameter) {
+  return request({
+    url: '/api/company/my',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 编辑公司信息
+export function putCompanyMy(parameter) {
+  return request({
+    url: '/api/company/my',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 上传
+export function getFileToken(parameter) {
+  return request({
+    url: '/api/upload',
+    method: 'post',
+    data: parameter,
+    uploading: true,
+    timeout: 100000, // 请求超时时间
+    headers: {
+      'Content-Type': 'multipart-formData'
+    },
+  })
+}

+ 55 - 0
src/api/freezer.js

@@ -0,0 +1,55 @@
+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
+  })
+}
+
+// 获取设备探头
+export function getSensor(parameter) {
+  return request({
+    url: '/api/device-sensor',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取设备温湿度记录
+export function getSensorData(parameter) {
+  return request({
+    url: '/api/device-sensor/data',
+    method: 'get',
+    params: parameter
+  })
+}

+ 71 - 0
src/api/incubator.js

@@ -0,0 +1,71 @@
+import request from '@/utils/request'
+
+// 获取保温箱列表
+export function getCoolerBox(parameter) {
+  return request({
+    url: '/api/cooler-box',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 获取保温箱内冰排列表
+export function getRaftCoolerBox(parameter) {
+  return request({
+    url: '/api/ice-raft/cooler-box',
+    method: 'get',
+    params: parameter
+  })
+}
+// 获取车辆详情
+export function getCoolerBoxDetails(parameter) {
+  return request({
+    url: '/api/cooler-box' + parameter,
+    method: 'get',
+  })
+}
+
+// 添加车辆
+export function addCoolerBox(parameter) {
+  return request({
+    url: '/api/cooler-box',
+    method: 'post',
+    data: parameter
+  })
+}
+
+// 编辑车辆
+export function putCoolerBox(parameter) {
+  return request({
+    url: '/api/cooler-box',
+    method: 'put',
+    data: parameter
+  })
+}
+
+// 删除车辆
+export function delCoolerBox(parameter) {
+  return request({
+    url: '/api/cooler-box',
+    method: 'delete',
+    data: parameter
+  })
+}
+
+// 获取设备列表
+export function getDevice(parameter) {
+  return request({
+    url: '/api/device',
+    method: 'get',
+    params: parameter
+  })
+}
+
+// 添加冷冻柜
+export function addCoolerBoxImport(parameter) {
+  return request({
+    url: '/api/cooler-box/import',
+    method: 'post',
+    data: parameter
+  })
+}

+ 8 - 0
src/api/vehicle.js

@@ -42,3 +42,11 @@ export function delCar(parameter) {
     data: parameter
   })
 }
+// 导入车辆
+export function importCar(parameter) {
+  return request({
+    url: '/api/car/import',
+    method: 'post',
+    data: parameter
+  })
+}

+ 8 - 0
src/api/warehouse.js

@@ -42,3 +42,11 @@ export function delWarehouse(parameter) {
     data: parameter
   })
 }
+// 冷链导入
+export function importWarehouse(parameter) {
+  return request({
+    url: '/api/warehouse/import',
+    method: 'post',
+    data: parameter
+  })
+}

+ 10 - 0
src/api/waybill.js

@@ -94,3 +94,13 @@ export function getTemperature(parameter) {
     params: parameter
   })
 }
+
+// 导出运单pdf
+export function getWaybillPdf(parameter) {
+  return request({
+    url: '/api/waybill/waybill-pdf',
+    method: 'get',
+    responseType: 'blob',
+    params: parameter
+  })
+}

+ 13 - 0
src/assets/css/global.css

@@ -45,6 +45,16 @@ body::-webkit-scrollbar-thumb {
 	align-items: center;
 }
 
+.el-dialog__footer {
+	border-top: 1px solid #EBEEF5;
+}
+
+.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%;
@@ -102,4 +112,7 @@ body::-webkit-scrollbar-thumb {
 	.chart_card {
 		height: auto !important;
 	}
+}
+.el-form-item__label{
+	flex: none;
 }

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

@@ -55,6 +55,18 @@
           <ul class="icon_lists dib-box">
           
             <li class="dib">
+              <span class="icon iconfont">&#xe607;</span>
+                <div class="name">保温箱管理</div>
+                <div class="code-name">&amp;#xe607;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe6c0;</span>
+                <div class="name">客户管理</div>
+                <div class="code-name">&amp;#xe6c0;</div>
+              </li>
+          
+            <li class="dib">
               <span class="icon iconfont">&#xe679;</span>
                 <div class="name">公司</div>
                 <div class="code-name">&amp;#xe679;</div>
@@ -114,9 +126,9 @@
 <pre><code class="language-css"
 >@font-face {
   font-family: 'iconfont';
-  src: url('iconfont.woff2?t=1711529201611') format('woff2'),
-       url('iconfont.woff?t=1711529201611') format('woff'),
-       url('iconfont.ttf?t=1711529201611') format('truetype');
+  src: url('iconfont.woff2?t=1722838832010') format('woff2'),
+       url('iconfont.woff?t=1722838832010') format('woff'),
+       url('iconfont.ttf?t=1722838832010') format('truetype');
 }
 </code></pre>
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -143,6 +155,24 @@
         <ul class="icon_lists dib-box">
           
           <li class="dib">
+            <span class="icon iconfont icon-baowenxiangguanli"></span>
+            <div class="name">
+              保温箱管理
+            </div>
+            <div class="code-name">.icon-baowenxiangguanli
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-kehuguanli"></span>
+            <div class="name">
+              客户管理
+            </div>
+            <div class="code-name">.icon-kehuguanli
+            </div>
+          </li>
+          
+          <li class="dib">
             <span class="icon iconfont icon-gongsi"></span>
             <div class="name">
               公司
@@ -234,6 +264,22 @@
           
             <li class="dib">
                 <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-baowenxiangguanli"></use>
+                </svg>
+                <div class="name">保温箱管理</div>
+                <div class="code-name">#icon-baowenxiangguanli</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-kehuguanli"></use>
+                </svg>
+                <div class="name">客户管理</div>
+                <div class="code-name">#icon-kehuguanli</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
                   <use xlink:href="#icon-gongsi"></use>
                 </svg>
                 <div class="name">公司</div>

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

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 4484411 */
-  src: url('@/assets/fonts/iconfont.woff2?t=1711529201611') format('woff2'),
-       url('@/assets/fonts/iconfont.woff?t=1711529201611') format('woff'),
-       url('@/assets/fonts/iconfont.ttf?t=1711529201611') format('truetype');
+  src: url('@/assets/fonts/iconfont.woff2?t=1722838832010') format('woff2'),
+       url('@/assets/fonts/iconfont.woff?t=1722838832010') format('woff'),
+       url('@/assets/fonts/iconfont.ttf?t=1722838832010') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,14 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-baowenxiangguanli:before {
+  content: "\e607";
+}
+
+.icon-kehuguanli:before {
+  content: "\e6c0";
+}
+
 .icon-gongsi:before {
   content: "\e679";
 }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
src/assets/fonts/iconfont.js


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

@@ -6,6 +6,20 @@
   "description": "冷链物流运输",
   "glyphs": [
     {
+      "icon_id": "31045562",
+      "name": "保温箱管理",
+      "font_class": "baowenxiangguanli",
+      "unicode": "e607",
+      "unicode_decimal": 58887
+    },
+    {
+      "icon_id": "35597086",
+      "name": "客户管理",
+      "font_class": "kehuguanli",
+      "unicode": "e6c0",
+      "unicode_decimal": 59072
+    },
+    {
       "icon_id": "9592764",
       "name": "公司",
       "font_class": "gongsi",

BIN
src/assets/fonts/iconfont.ttf


BIN
src/assets/fonts/iconfont.woff


BIN
src/assets/fonts/iconfont.woff2


+ 21 - 2
src/assets/js/blockSort.js

@@ -54,6 +54,21 @@ export const WaybillStatus = () => {
       bgcolor: '#67C23A',
       label: '已签收',
       value: 8,
+    },
+    {
+      bgcolor: '#E6A23C',
+      label: '待装箱',
+      value: 9,
+    },
+    {
+      bgcolor: '#409EFF',
+      label: '已装箱',
+      value: 10,
+    },
+    {
+      bgcolor: '#67C23A',
+      label: '已出箱',
+      value: 11,
     }
   ]
 }
@@ -61,12 +76,16 @@ export const myOrder = () => {
   return [{
       bgcolor: '#F56C6C',
       label: '未发货',
-      value: [1, 2, 3],
+      value: [1],
+    }, {
+      bgcolor: '#E6A23C',
+      label: '处理中',
+      value: [2, 3, 9],
     },
     {
       bgcolor: '#409EFF',
       label: '已发货',
-      value: [4, 5, 6, 7],
+      value: [4, 5, 6, 7, 10, 11],
     },
     {
       bgcolor: '#67C23A',

+ 6 - 1
src/components/actionBar.vue

@@ -41,7 +41,7 @@
           </div>
         </el-form>
       </div>
-      <div class="same_row_in" v-if="operateList.length > 0">
+      <div class="same_row_in btn_handle" v-if="operateList.length > 0">
         <div class="btn_head" v-for="(item1,index) in operateList" :key="index">
           <el-button :type="item1.colour ? item1.colour : 'primary'" size="medium" :icon="item1.icon"
             @click="openModel(item1.type)">{{item1.title}}</el-button>
@@ -151,4 +151,9 @@
     margin-left: 10px;
     margin-bottom: 10px;
   }
+
+  .btn_handle {
+    flex-wrap: wrap;
+    justify-content: flex-end;
+  }
 </style>

+ 9 - 0
src/components/forms.vue

@@ -37,6 +37,15 @@
                 :key="i" />
             </el-select>
           </el-form-item>
+          <el-form-item :label-width="item.labelWidth" :label="item.label" :prop="item.field"
+            :rules="detail ? item.rules : {}" v-if="item.type === 'searchSelect1' && ruleForm['type'] == 4">
+            <el-select :id="item.field" v-model="ruleForm[`${item.field}`]" filterable remote
+              :remote-method="remoteMethod" :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>
+          </el-form-item>
           <el-form-item :label="item.label" :prop="item.field" :rules="detail ? item.rules : {}"
             v-if="item.type === 'cascader'">
             <el-cascader v-model="ruleForm[`${item.field}`]" :disabled="item.disabled" :options="item.options">

+ 109 - 11
src/components/tables.vue

@@ -1,8 +1,9 @@
 <template>
   <!-- tables -->
   <div class="tables_grid">
-    <el-table ref="tableRef" class="table-style" :data="tableData" style="width: 100%" :border="border"
-      :row-key="(val) => val.id" @cell-click="cellClick" @selection-change="handleSelectionChange">
+    <el-table ref="tableRef" style="width: 100%" tooltip-effect="dark myTooltips" :show-header="showHeader"
+      class="table-style" :data="tableData" :border="border" :row-key="(val) => rowKey(val)" @cell-click="cellClick"
+      @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,6 +18,38 @@
             </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 style="display: flex;" 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="460" trigger="click">
+                <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 :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)">
           <template slot-scope="scope">
@@ -50,7 +83,8 @@
         </el-table-column>
         <el-table-column type="selection" v-model="selectionList" reserve-selection width="55"
           v-else-if="item.field == 'selection'"></el-table-column>
-        <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align" v-else>
+        <el-table-column :show-overflow-tooltip="true" :prop="item.field" :label="item.label" :width="item.colWidth"
+          :align="item.align" v-else>
         </el-table-column>
       </template>
     </el-table>
@@ -64,6 +98,11 @@
   } from '@/assets/js/blockSort'
   export default {
     props: {
+      // 是否显示表头
+      showHeader: {
+        type: Boolean,
+        default: () => true,
+      },
       // 表格边框
       border: {
         type: Boolean,
@@ -100,6 +139,9 @@
         orderStatusList: orderStatus(),
         waybillIds: [],
         selectionList: [],
+        iconFlag: false,
+        unpackWidth: '460px',
+        visible: false,
       }
     },
     methods: {
@@ -142,21 +184,25 @@
       },
       // 我的订单
       myInitDictvalueil(value, list, type) {
-        if ([1, 2, 3].includes(value.status)) {
+        if ([1].includes(value.status)) {
           return list[0].label
-        } else if ([4, 5, 6, 7].includes(value.status)) {
+        } else if ([2, 3, 9].includes(value.status)) {
           return list[1].label
-        } else if (value.status == 8) {
+        } else if ([4, 5, 6, 7, 10, 11].includes(value.status)) {
           return list[2].label
+        } else if (value.status == 8) {
+          return list[3].label
         }
       },
       myfilterColor(value, list, type) {
-        if ([1, 2, 3].includes(value.status)) {
+        if ([1].includes(value.status)) {
           return list[0].bgcolor
-        } else if ([4, 5, 6, 7].includes(value.status)) {
+        } else if ([2, 3, 9].includes(value.status)) {
           return list[1].bgcolor
-        } else if (value.status == 8) {
+        } else if ([4, 5, 6, 7, 10, 11].includes(value.status)) {
           return list[2].bgcolor
+        } else if (value.status == 8) {
+          return list[3].bgcolor
         }
       },
       // 城市筛选
@@ -185,13 +231,13 @@
         const userArr = JSON.parse(arr)
         if (row.waybillNo) {
           if (userArr.userType == 'customer' && type == 'edit' || type == 'del') {
-            if (row.status == 1) {
+            if ([1, 2, 3, 9].includes(row.status)) {
               return false
             } else {
               return true
             }
           } else if (type == 'send' || type == 'del') {
-            if (row.status == 1 || row.status == 2 || row.status == 3) {
+            if (row.status == 1 || row.status == 2 || row.status == 3 || row.status == 9) {
               return false
             } else {
               return true
@@ -229,11 +275,46 @@
       buttonData(row, type) {
         this.$emit("buttonData", row, type);
       },
+      // 清空选中项
+      clearSelected() {
+        this.$nextTick(() => {
+          this.$refs.tableRef.clearSelection();
+        })
+      },
+      rowKey(val) {
+        if (val.id) {
+          return val.id
+        } else {
+          if (val.T_id) {
+            return val.T_id + Math.random()
+          } else {
+            return val.T_sn
+          }
+        }
+      },
+      // 展开收起
+      getUnpack() {
+        if (this.iconFlag) {
+          this.unpackWidth = '460px'
+          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 +367,21 @@
   .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>
+<style>
+  .myTooltips {
+    max-width: 50%;
+  }
 </style>

+ 240 - 0
src/components/thermography.vue

@@ -0,0 +1,240 @@
+<template>
+  <!-- 温湿度记录 -->
+  <div class="card_graphy">
+    <div class="phy_left">
+      <div class="card_phy_ther">
+        <div class="head_phy">
+          <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="onAllSelectChange"> 全选</el-checkbox>
+          <div class="fx_btn" @click="invertSelection">反选</div>
+        </div>
+        <div class="item_phy" v-for="(item,index) in list" :key="index">
+          <el-checkbox v-model="item.checked" @change="selectChangeItem"></el-checkbox>
+          <div class="phy_main">
+            <div class="phy_title">{{item.T_name}}</div>
+            <div class="phy_content">{{item.T_sn}}</div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="phy_right">
+      <tables :tableList="tableList" :tableData="tableData"></tables>
+      <pagination :total="Total" :currentPage="Pagination.page" @changeSize="changeSizePhy"
+        @changeCurrent="changeCurrentPhy"></pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+  import {
+    getSensor,
+    getSensorData
+  } from '@/api/freezer'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import {
+    employee,
+  } from "./humiture.js";
+  export default {
+    name: 'thermography',
+    components: {
+      tables,
+      pagination,
+    },
+    props: {
+      waybillNo: {
+        type: String,
+        default: () => '',
+      },
+      timeData: {
+        type: Array,
+        default: () => [],
+      }
+    },
+    data() {
+      return {
+        isIndeterminate: null,
+        checkAll: false,
+        checkList: [], // 勾选的数据
+
+        list: [],
+        humitureList: [],
+
+        tableData: [],
+        tableList: employee(),
+        Pagination: {
+          page: 1,
+          pageSize: 10,
+        },
+        Total: 0,
+        checkList: [],
+        taskId: null,
+        tIds: [],
+        startTime: '',
+        endTime: '',
+      }
+    },
+    watch: {
+      timeData: {
+        handler: function(newUser, oldUser) {
+          if (newUser) {
+            this.startTime = newUser[0]
+            this.endTime = newUser[1]
+          } else {
+            this.startTime = ''
+            this.endTime = ''
+          }
+        },
+        immediate: true,
+        deep: true // 设置 deep 选项为 true,实现深度监听
+      }
+    },
+    methods: {
+      // 获取探头
+      getProbe() {
+        getSensor({
+          sn: this.waybillNo,
+        }).then(res => {
+          if (res.code == 200) {
+            if (res.data.list) {
+              this.list = res.data.list
+              this.list.forEach(item => {
+                item.checked = true
+              })
+              this.selectChangeItem()
+              this.getTemperature()
+            }
+          }
+        })
+      },
+      // 获取温湿度
+      getTemperature() {
+        let arr = []
+        this.checkList.forEach(item => {
+          arr.push(item.T_id)
+        })
+        let params = {
+          t_sn: this.waybillNo,
+          t_ids: arr.join(),
+          startTime: this.startTime,
+          endTime: this.endTime,
+          ...this.Pagination,
+        }
+        getSensorData(params).then(res => {
+          if (res.code == 200) {
+            if (res.data.list) {
+              this.tableData = res.data.list
+            } else {
+              this.tableData = []
+            }
+            this.Total = res.data.count
+          }
+        })
+      },
+      // 全选
+      onAllSelectChange() {
+        this.list.forEach(item => {
+          // 全选了
+          if (this.checkAll) {
+            item.checked = true
+            this.isIndeterminate = false
+            this.checkList = this.list
+            // 取消全选
+          } else {
+            item.checked = false
+            this.isIndeterminate = null
+            this.checkList = []
+          }
+        })
+      },
+      // 单选
+      selectChangeItem() {
+        const check = this.list.every(item => item.checked)
+        // 单选有一个未勾选
+        if (!check) {
+          this.isIndeterminate = true
+        } else {
+          // 单选都勾选了
+          this.isIndeterminate = null
+          this.checkAll = true
+        }
+        // 单选都未勾选
+        const flag = this.list.map(item => item.checked).some(item => item)
+        if (!flag) {
+          this.checkAll = false
+          this.isIndeterminate = null
+        }
+        // 勾选的数据
+        this.checkList = this.list.filter(item => item.checked)
+      },
+      // 反选
+      invertSelection() {
+        this.list.forEach(item => {
+          item.checked = !item.checked
+        })
+        this.selectChangeItem()
+      },
+      changeSizePhy(val) {
+        this.Pagination.pageSize = val
+        this.getTemperature()
+      },
+      changeCurrentPhy(val) {
+        this.Pagination.page = val
+        this.getTemperature()
+      },
+    },
+  }
+</script>
+
+<style lang="scss" scoped>
+  .card_graphy {
+    display: flex;
+    border: 1px solid #E4E7ED;
+  }
+
+  .card_phy_ther {
+    display: flex;
+    flex-direction: column;
+  }
+
+  .head_phy {
+    display: flex;
+    margin: 10px;
+  }
+
+  .fx_btn {
+    cursor: pointer;
+    color: red;
+    margin-left: 10px;
+  }
+
+  .item_phy {
+    margin: 10px;
+    display: flex;
+    align-items: center;
+  }
+
+  .phy_main {
+    margin-left: 10px;
+  }
+
+  .phy_title {
+    font-size: 14px;
+    margin-bottom: 5px;
+  }
+
+  .phy_content {
+    font-size: 13px;
+  }
+
+  .phy_left {
+    width: 220px;
+    flex: none;
+    height: 100%;
+    margin-bottom: 15px;
+  }
+
+  .phy_right {
+    flex: 1;
+    border-left: 1px solid #E4E7ED;
+  }
+</style>

+ 7 - 3
src/components/waybillForm.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="waybil_form">
     <h4 class="head_title">{{title}}</h4>
-   <!-- <div class="select_type">
+    <!-- <div class="select_type">
       <div style="margin-right: 20px;">
         <el-radio v-model="radio" label="1">保存到地址簿</el-radio>
       </div>
@@ -60,11 +60,15 @@
             message: '请输入姓名',
             trigger: 'blur'
           },
-          phone: {
+          phone: [{
             required: true,
             message: '请输入电话',
             trigger: 'blur'
-          },
+          }, {
+            pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+            message: '请输入正确手机号码',
+            trigger: "blur"
+          }],
           region: {
             required: true,
             message: '请选择省市区',

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

@@ -66,6 +66,14 @@ const rootRouter = {
     },
     component: () => import('@/views/page/Home'),
   }, {
+    path: '/corporateGovernance',
+    name: 'corporateGovernance',
+    meta: {
+      icon: 'icon-gongsi',
+      title: '公司管理'
+    },
+    component: () => import('@/views/system/corporateGovernance'),
+  }, {
     path: '/UserManagement',
     name: 'UserManagement',
     meta: {
@@ -77,11 +85,19 @@ const rootRouter = {
     path: '/ClientManagement',
     name: 'ClientManagement',
     meta: {
-      icon: 'icon-yonghuguanli',
+      icon: 'icon-kehuguanli',
       title: '客户管理'
     },
     component: () => import('@/views/system/ClientManagement'),
   }, {
+    path: '/IncubatorManagement',
+    name: 'IncubatorManagement',
+    meta: {
+      icon: 'icon-baowenxiangguanli',
+      title: '保温箱管理'
+    },
+    component: () => import('@/views/system/IncubatorManagement'),
+  }, {
     path: '/StoreManagement',
     name: 'StoreManagement',
     meta: {

+ 3 - 2
src/utils/request.js

@@ -9,7 +9,8 @@ import {
   refreshToken
 } from '@/api/login'
 // 创建 axios 实例
-const Url = "https://coldlogistics.coldbaozhida.com/Cold_Logistic"
+// const Url = "https://coldlogistics.coldbaozhida.com/Cold_Logistic"
+const Url = "http://coldlogisticstest.coldbaozhida.com/Cold_Logistic" //测试
 const request = axios.create({
   // API 请求的默认前缀
   baseURL: process.env.NODE_ENV === 'production' ? Url : '/api',
@@ -39,7 +40,7 @@ request.interceptors.request.use(config => {
   if (token) {
     config.headers.Authorization = 'Bearer ' + token
   }
-  if (config.method === 'post' && config.url != "/api/waybill/import") {
+  if (config.method === 'post' && config.url != "/api/waybill/import" && config.url != "/api/upload") {
     let data = config.data
     config.data = JSON.stringify(data)
   }

+ 38 - 13
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,13 +99,37 @@
       saveNavState(activePath) {
         localStorage.setItem("activePath", activePath);
         this.activePath = activePath
+      },
+      // 展开收起
+      getUnpack(flag) {
+        if (flag) {
+          this.iconFlag = false
+          this.sideWidth = 200
+        } else {
+          this.iconFlag = true
+          this.sideWidth = 64
+        }
       }
     }
   }
 </script>
+<style>
+  .el-main {
+    padding: 20px 20px;
+    height: calc(100vh - 60px);
+  }
+</style>
 <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);
+    height: calc(100vh - 1px);
   }
 
   .el-header {
@@ -115,12 +142,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>

+ 23 - 4
src/views/page/Home.vue

@@ -3,13 +3,13 @@
     <div class="card_head_home">
       <div class="card_image_flex">
         <div style="display: flex;flex: none;height: 120px;">
-          <el-image :src="require('@/assets/images/transport.svg')"></el-image>
+          <el-image style="width: 286px;height: 120px;" :src="require('@/assets/images/transport.svg')"></el-image>
           <div class="home_content">
             <div class="title_content1">Logistics transportation system</div>
             <div class="title_content">物流运输 高效管理</div>
             <div class="title_content1">物流运输管理系统 客户管理系统</div>
           </div>
-          <el-image :src="require('@/assets/images/transport1.svg')"></el-image>
+          <el-image style="width: 166px;height: 120px;" :src="require('@/assets/images/transport1.svg')"></el-image>
         </div>
       </div>
     </div>
@@ -183,8 +183,24 @@
       },
       drawPie1() {
         let that = this
+        let showFlag = true
+        if (that.textData && that.textData[0].length > 0) {
+          showFlag = false
+        } else if (!that.textData || that.textData[0].length == 0) {
+          showFlag = true
+        }
         that.myChart = that.$echarts.init(document.getElementById('pie1'))
         let option = {
+          title: {
+            show: showFlag,
+            textStyle: {
+              color: 'black',
+              fontSize: 20,
+            },
+            text: '暂无数据',
+            left: 'center',
+            top: 'center',
+          },
           tooltip: {
             trigger: 'axis',
           },
@@ -265,7 +281,10 @@
   .card_image_flex {
     display: flex;
     align-items: center;
+    align-items: flex-end;
+    justify-content: space-between;
     height: 140px;
+    width: 100%;
   }
 
   .home_content {
@@ -279,14 +298,14 @@
 
   .title_content {
     color: #2d4578;
-    font-size: 30px;
+    font-size: 24px;
     font-weight: 600;
     margin: 10px 0px;
   }
 
   .title_content1 {
     color: #2d4578;
-    font-size: 20px;
+    font-size: 17px;
   }
 
   .card_head_statistics {

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

@@ -106,7 +106,6 @@
         })
       },
       // 弹窗表单添加
-      // 弹窗表单添加
       handleAdd() {
         let flag = this.$refs['childRules'].validateForm();
         if (flag) {

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

@@ -0,0 +1,506 @@
+<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>
+    <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 class="management_card">
+      <el-dialog :visible.sync="importDialogVisible" width="500px" :close-on-click-modal="false" @close="closeDialogil">
+        <div class="card_import">
+          <div class="card_incubat">
+            <forms ref="incubatorRules" labelPosition="left" :formNewList="stateRuleList" :ruleForm="stateRuleForm"
+              labelWidth="100px"></forms>
+          </div>
+          <div class="card_search_input">
+            <el-input v-model="nameTitle" placeholder="设备名称" @input="incubatorInput"></el-input>
+          </div>
+          <!-- 表单 -->
+          <tables ref="refIncubator" :tableList="incubatorList" :tableData="incubatorData"></tables>
+          <!-- 分页 -->
+          <div v-if="Total1">
+            <pagination :total="Total1" :currentPage="Paginationil.PageIndex" :pager-countnum="5"
+              layout="sizes, prev, pager, next" @changeSize="changeSizeil" @changeCurrent="changeCurrentil">
+            </pagination>
+          </div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button plain @click="importDialogVisible = false">取 消</el-button>
+          <el-button type="primary" :loading="incubatorLoading" @click="incubatorAdd">导 入</el-button>
+        </span>
+      </el-dialog>
+    </div>
+    <el-dialog :visible.sync="dialogVisible" width="80%" @close="temperatureClose">
+      <template slot="title">
+        <div style="display: flex;align-items: center;">
+          <span style="margin-right: 10px;font-size: 20px;">温湿度记录</span>
+          <el-date-picker v-model="timeQuantum" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
+            :picker-options="pickerOptions" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
+            align="center" @change="timeChange">
+          </el-date-picker>
+        </div>
+      </template>
+      <thermography ref="thermo" :waybillNo="waybillNo" :timeData="timeQuantum"></thermography>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    getCoolerBox,
+    getCoolerBoxDetails,
+    addCoolerBox,
+    putCoolerBox,
+    delCoolerBox,
+    getDevice,
+    addCoolerBoxImport
+  } from '@/api/incubator'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import forms from '@/components/forms'
+  import thermography from '@/components/thermography'
+  import {
+    formRules,
+    employee,
+    incubator
+  } from "./incubator.js";
+  import {
+    startStatus,
+  } from '@/assets/js/blockSort'
+  export default {
+    name: 'IncubatorManagement',
+    components: {
+      actionBar,
+      tables,
+      pagination,
+      forms,
+      thermography
+    },
+    data() {
+      return {
+        pickerOptions: {
+          shortcuts: [{
+            text: '最近一周',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近一个月',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近三个月',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit('pick', [start, end]);
+            }
+          }]
+        },
+        timeQuantum: [this.getTime(new Date(new Date().toLocaleDateString())), this.getTime(new Date())],
+
+        operateList: [{
+          type: 'add',
+          title: '添加保温箱',
+          icon: 'el-icon-plus',
+        }, {
+          type: 'import',
+          title: '冷链平台导入',
+          icon: 'el-icon-upload',
+        }],
+        formList: [{
+          type: 'input',
+          label: '名称',
+          field: 'name',
+          placeholder: '名称',
+        }, {
+          type: 'input',
+          label: 'SN',
+          field: 'sn',
+          placeholder: 'SN',
+        }, {
+          type: 'select',
+          label: '状态',
+          field: 'status',
+          placeholder: '请选择状态',
+          options: startStatus(),
+        }],
+        searchRuleForm: {
+          name: '',
+          sn: '',
+          status: '',
+        },
+        searchValue: {},
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        Total: 0,
+        tableData: [],
+        operationType: '',
+        tableList: employee(),
+        staffTitle: '添加',
+        staffDialogVisible: false,
+        formRuleList: [],
+        ruleForm: {
+          name: '',
+          sn: '',
+          status: '2',
+        },
+        confirmLoading: false,
+        selectingData: {},
+        importDialogVisible: false,
+        incubatorList: incubator(),
+        incubatorData: [],
+        Total1: 0,
+        Paginationil: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        stateRuleList: [{
+          field: 'status',
+          label: '启用状态:',
+          placeholder: '启用状态:',
+          type: 'radio',
+          colWidth: 24,
+          rules: [{
+            required: true,
+            message: '选择启用状态:',
+            trigger: 'change'
+          }],
+          options: startStatus()
+        }],
+        stateRuleForm: {
+          status: '2',
+        },
+        nameTitle: '',
+        incubatorLoading: false,
+
+        timer: null, //定时器名称
+        dialogVisible: false,
+        waybillNo: '',
+      }
+    },
+    beforeDestroy() {
+      clearInterval(this.timer); // 清除定时器
+      this.timer = null;
+    },
+    mounted() {
+      const dataList = formRules();
+      this.formRuleList = dataList;
+      this.getList()
+    },
+    methods: {
+      getTime(time) {
+        var date = new Date(time)
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? '0' + m : m
+        var d = date.getDate()
+        d = d < 10 ? '0' + d : d
+        var h = date.getHours()
+        h = h < 10 ? '0' + h : h
+        var minute = date.getMinutes()
+        minute = minute < 10 ? '0' + minute : minute
+        var s = date.getSeconds()
+        s = s < 10 ? '0' + s : s
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + s
+      },
+      // 搜索
+      searchProtocol(value) {
+        this.searchValue = value
+        this.getList()
+      },
+      // 获取运单列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          showTemp: true,
+          ...this.searchValue
+        }
+        getCoolerBox(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+            this.timer = setTimeout(() => {
+              this.getList();
+            }, 60000)
+          }
+        })
+      },
+      // 选项赋值
+      optionMatching(value, field) {
+        this.formRuleList.forEach((item, index) => {
+          if (item.field == field) {
+            item.options = value
+          }
+        })
+      },
+      // 弹窗表单添加
+      handleAdd() {
+        let flag = this.$refs['childRules'].validateForm();
+        if (flag) {
+          if (this.operationType == 'add') {
+            this.confirmLoading = true
+            var params = {
+              ...this.ruleForm
+            }
+            addCoolerBox(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,
+              sn: this.ruleForm.sn,
+              status: this.ruleForm.status,
+            }
+            putCoolerBox(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) {
+        this.selectingData = row
+        this.operationType = type
+        if (type == 'edit') {
+          this.staffTitle = '编辑'
+          this.staffDialogVisible = true
+          setTimeout(() => {
+            this.$nextTick(() => {
+              this.ruleForm = JSON.parse(JSON.stringify(row))
+            })
+          })
+        } else if (type == 'del') {
+          this.deleteUser(row.id)
+        } 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 == 'record') {
+          this.dialogVisible = true
+          this.waybillNo = row.sn
+          this.$nextTick(() => {
+            this.$refs.thermo.getProbe()
+          })
+        }
+      },
+      // 选择时间
+      timeChange() {
+        this.$nextTick(() => {
+          this.$refs.thermo.getTemperature()
+        })
+      },
+      openModel(type) {
+        if (type == 'add') {
+          this.staffTitle = '添加'
+          this.staffDialogVisible = true
+          this.operationType = type
+        } else if (type == 'import') {
+          this.importDialogVisible = true
+          this.getDeviceList()
+        }
+      },
+      // 获取设备列表
+      getDeviceList() {
+        var params = {
+          page: this.Paginationil.PageIndex,
+          pageSize: this.Paginationil.PageSize,
+          name: this.nameTitle,
+        }
+        getDevice(params).then(res => {
+          if (res.code == 200) {
+            this.incubatorData = res.data.list
+            this.Total1 = res.data.count
+          }
+        })
+      },
+      // 搜索保温箱
+      incubatorInput(value) {
+        this.nameTitle = value
+        this.getDeviceList()
+      },
+      // 批量导入保温箱
+      incubatorAdd() {
+        const arrID = this.$refs.refIncubator.waybillIds
+        let arr1 = []
+        arrID.forEach(item => {
+          let arr2 = {
+            sn: item.T_sn,
+            name: item.T_devName,
+          }
+          arr1.push(arr2)
+        })
+        let flag = this.$refs['incubatorRules'].validateForm();
+        if (flag) {
+          if (arr1.length > 0) {
+            this.incubatorLoading = true
+            let params = {
+              list: arr1,
+              ...this.stateRuleForm,
+            }
+            addCoolerBoxImport(params).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+                this.importDialogVisible = false
+              }
+              this.incubatorLoading = false
+            })
+          } else {
+            this.$message.warning('请选择需要导入的保温箱');
+          }
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
+      },
+      // 删除保温箱
+      deleteUser(id) {
+        this.$confirm('此操作将永久删除该保温箱, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          delCoolerBox({
+            id: id,
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                message: '操作成功',
+                type: 'success'
+              });
+              const precisePage = Math.ceil((this.Total - 1) / this.Pagination.PageSize)
+              this.Pagination.PageIndex = this.Pagination.PageIndex > precisePage ? precisePage : this
+                .Pagination.PageIndex
+              this.Pagination.PageIndex = this.Pagination.PageIndex < 1 ? 1 : this.Pagination.PageIndex
+              this.getList()
+            }
+          })
+        }).catch(() => {});
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+      changeSizeil(val) {
+        this.Paginationil.PageSize = val
+        this.getDeviceList()
+      },
+      changeCurrentil(val) {
+        this.Paginationil.PageIndex = val
+        this.getDeviceList()
+      },
+      // 清空表单
+      closeDialog() {
+        this.formRuleList.forEach((item, index) => {
+          item.disabled = false
+        })
+        this.ruleForm = {}
+        this.$refs.childRules.resetCheck();
+      },
+      // 关闭温湿度记录
+      temperatureClose() {
+        this.timeQuantum = [this.getTime(new Date(new Date().toLocaleDateString())), this.getTime(new Date())]
+      },
+      closeDialogil() {
+        this.$refs.incubatorRules.resetCheck();
+        this.$refs.refIncubator.clearSelected();
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .card_check_title {
+    display: flex;
+    align-items: center;
+  }
+
+  .icon_import {
+    margin-right: 5px;
+    font-size: 20px;
+  }
+
+  .card_import {
+    margin-bottom: 10px;
+  }
+
+  .management_card ::v-deep .el-dialog__body {
+    padding: 0px 20px !important;
+  }
+
+  .card_incubat .el-form-item {
+    margin-bottom: 5px !important;
+  }
+
+  .card_search_input {
+    display: flex;
+    align-items: center;
+    margin-bottom: 5px;
+  }
+
+  .title_search {
+    flex: none;
+    margin-right: 5px;
+  }
+</style>

+ 4 - 0
src/views/system/MyWaybill.vue

@@ -152,6 +152,10 @@
               value: 1,
             },
             {
+              label: '处理中',
+              value: 4,
+            },
+            {
               label: '已发货',
               value: 2,
             },

+ 143 - 6
src/views/system/StoreManagement.vue

@@ -21,6 +21,31 @@
         <el-button type="primary" :loading="confirmLoading" @click="handleAdd">确 定</el-button>
       </span>
     </el-dialog>
+    <div class="management_card">
+      <el-dialog :visible.sync="importDialogVisible" width="500px" :close-on-click-modal="false" @close="closeDialogil">
+        <div class="card_import">
+          <div class="card_incubat">
+            <forms ref="incubatorRules" labelPosition="left" :formNewList="stateRuleList" :ruleForm="stateRuleForm"
+              labelWidth="100px"></forms>
+          </div>
+          <div class="card_search_input">
+            <el-input v-model="nameTitle" placeholder="设备名称" @input="incubatorInput"></el-input>
+          </div>
+          <!-- 表单 -->
+          <tables ref="refIncubator" :tableList="incubatorList" :tableData="incubatorData"></tables>
+          <!-- 分页 -->
+          <div v-if="Total1">
+            <pagination :total="Total1" :currentPage="Paginationil.PageIndex" :pager-countnum="5"
+              layout="sizes, prev, pager, next" @changeSize="changeSizeil" @changeCurrent="changeCurrentil">
+            </pagination>
+          </div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button plain @click="importDialogVisible = false">取 消</el-button>
+          <el-button type="primary" :loading="incubatorLoading" @click="incubatorAdd">导 入</el-button>
+        </span>
+      </el-dialog>
+    </div>
   </div>
 </template>
 
@@ -33,16 +58,24 @@
     getWarehouseDetails,
     addWarehouse,
     putWarehouse,
-    delWarehouse
+    delWarehouse,
+    importWarehouse
   } from '@/api/warehouse'
+  import {
+    getDevice
+  } from '@/api/incubator'
   import actionBar from '@/components/actionBar'
   import tables from '@/components/tables'
   import pagination from '@/components/pagination'
   import forms from '@/components/forms'
   import {
     formRules,
-    employee
+    employee,
+    incubator
   } from "./warehouse.js";
+  import {
+    startStatus,
+  } from '@/assets/js/blockSort'
   export default {
     name: 'StoreManagement',
     components: {
@@ -57,6 +90,10 @@
           type: 'add',
           title: '添加仓库',
           icon: 'el-icon-plus',
+        }, {
+          type: 'import',
+          title: '冷链平台导入',
+          icon: 'el-icon-upload',
         }],
         formList: [{
           type: 'input',
@@ -94,6 +131,33 @@
         },
         confirmLoading: false,
         selectingData: {},
+
+        importDialogVisible: false,
+        incubatorList: incubator(),
+        incubatorData: [],
+        Total1: 0,
+        Paginationil: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        stateRuleList: [{
+          field: 'status',
+          label: '启用状态:',
+          placeholder: '启用状态:',
+          type: 'radio',
+          colWidth: 24,
+          rules: [{
+            required: true,
+            message: '选择启用状态:',
+            trigger: 'change'
+          }],
+          options: startStatus()
+        }],
+        stateRuleForm: {
+          status: '2',
+        },
+        nameTitle: '',
+        incubatorLoading: false,
       }
     },
     mounted() {
@@ -227,10 +291,71 @@
         }
       },
       openModel(type) {
-        this.getDriver()
-        this.staffTitle = '添加'
-        this.staffDialogVisible = true
-        this.operationType = type
+        if (type == 'add') {
+          this.getDriver()
+          this.staffTitle = '添加'
+          this.staffDialogVisible = true
+          this.operationType = type
+        } else if (type == 'import') {
+          this.importDialogVisible = true
+          this.getDeviceList()
+        }
+      },
+      // 获取设备列表
+      getDeviceList() {
+        var params = {
+          page: this.Paginationil.PageIndex,
+          pageSize: this.Paginationil.PageSize,
+          name: this.nameTitle,
+        }
+        getDevice(params).then(res => {
+          if (res.code == 200) {
+            this.incubatorData = res.data.list
+            this.Total1 = res.data.count
+          }
+        })
+      },
+      // 搜索保温箱
+      incubatorInput(value) {
+        this.nameTitle = value
+        this.getDeviceList()
+      },
+      // 批量导入保温箱
+      incubatorAdd() {
+        const arrID = this.$refs.refIncubator.waybillIds
+        let arr1 = []
+        arrID.forEach(item => {
+          let arr2 = {
+            sn: item.T_sn,
+            name: item.T_devName,
+          }
+          arr1.push(arr2)
+        })
+        let flag = this.$refs['incubatorRules'].validateForm();
+        if (flag) {
+          if (arr1.length > 0) {
+            this.incubatorLoading = true
+            let params = {
+              list: arr1,
+              ...this.stateRuleForm,
+            }
+            importWarehouse(params).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+                this.importDialogVisible = false
+              }
+              this.incubatorLoading = false
+            })
+          } else {
+            this.$message.warning('请选择需要导入的保温箱');
+          }
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
       },
       // 删除仓库
       deleteUser(id) {
@@ -260,6 +385,14 @@
         this.Pagination.PageIndex = val
         this.getList()
       },
+      changeSizeil(val) {
+        this.Paginationil.PageSize = val
+        this.getDeviceList()
+      },
+      changeCurrentil(val) {
+        this.Paginationil.PageIndex = val
+        this.getDeviceList()
+      },
       // 清空表单
       closeDialog() {
         this.formRuleList.forEach((item, index) => {
@@ -267,6 +400,10 @@
         })
         this.ruleForm = {}
         this.$refs.childRules.resetCheck();
+      },
+      closeDialogil() {
+        this.$refs.incubatorRules.resetCheck();
+        this.$refs.refIncubator.clearSelected();
       }
     }
   }

+ 158 - 9
src/views/system/VehicleManagement.vue

@@ -21,6 +21,31 @@
         <el-button type="primary" :loading="confirmLoading" @click="handleAdd">确 定</el-button>
       </span>
     </el-dialog>
+    <div class="management_card">
+      <el-dialog :visible.sync="importDialogVisible" width="500px" :close-on-click-modal="false" @close="closeDialogil">
+        <div class="card_import">
+          <div class="card_incubat">
+            <forms ref="incubatorRules" labelPosition="left" :formNewList="stateRuleList" :ruleForm="stateRuleForm"
+              labelWidth="100px"></forms>
+          </div>
+          <div class="card_search_input">
+            <el-input v-model="nameTitle" placeholder="设备名称" @input="incubatorInput"></el-input>
+          </div>
+          <!-- 表单 -->
+          <tables ref="refIncubator" :tableList="incubatorList" :tableData="incubatorData"></tables>
+          <!-- 分页 -->
+          <div v-if="Total">
+            <pagination :total="Total1" :currentPage="Paginationil.PageIndex" :pager-countnum="5"
+              layout="sizes, prev, pager, next" @changeSize="changeSizeil" @changeCurrent="changeCurrentil">
+            </pagination>
+          </div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button plain @click="importDialogVisible = false">取 消</el-button>
+          <el-button type="primary" :loading="incubatorLoading" @click="incubatorAdd">导 入</el-button>
+        </span>
+      </el-dialog>
+    </div>
   </div>
 </template>
 
@@ -33,16 +58,24 @@
     getCarDetails,
     addCar,
     putCar,
-    delCar
+    delCar,
+    importCar
   } from '@/api/vehicle'
+  import {
+    getDevice
+  } from '@/api/incubator'
   import actionBar from '@/components/actionBar'
   import tables from '@/components/tables'
   import pagination from '@/components/pagination'
   import forms from '@/components/forms'
   import {
     formRules,
-    employee
+    employee,
+    incubator
   } from "./vehicle.js";
+  import {
+    startStatus,
+  } from '@/assets/js/blockSort'
   export default {
     name: 'VehicleManagement',
     components: {
@@ -57,6 +90,10 @@
           type: 'add',
           title: '添加车辆',
           icon: 'el-icon-plus',
+        }, {
+          type: 'import',
+          title: '冷链平台导入',
+          icon: 'el-icon-upload',
         }],
         formList: [{
           type: 'input',
@@ -92,6 +129,34 @@
         },
         confirmLoading: false,
         selectingData: {},
+
+        importDialogVisible: false,
+        incubatorList: incubator(),
+        incubatorData: [],
+        Total1: 0,
+        Paginationil: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+
+        stateRuleList: [{
+          field: 'status',
+          label: '启用状态:',
+          placeholder: '启用状态:',
+          type: 'radio',
+          colWidth: 24,
+          rules: [{
+            required: true,
+            message: '选择启用状态:',
+            trigger: 'change'
+          }],
+          options: startStatus()
+        }],
+        stateRuleForm: {
+          status: '2',
+        },
+        nameTitle: '',
+        incubatorLoading: false,
       }
     },
     mounted() {
@@ -188,9 +253,9 @@
                   type: 'success'
                 });
                 this.getList()
+                this.staffDialogVisible = false
+                this.confirmLoading = false
               }
-              this.staffDialogVisible = false
-              this.confirmLoading = false
             }).catch(() => {
               this.confirmLoading = false
             })
@@ -208,7 +273,11 @@
           setTimeout(() => {
             this.$nextTick(() => {
               this.ruleForm = JSON.parse(JSON.stringify(row))
-              this.ruleForm.userId = String(row.userId)
+              if (row.userId != 0) {
+                this.ruleForm.userId = String(row.userId)
+              } else {
+                this.ruleForm.userId = ''
+              }
             })
           })
         } else if (type == 'del') {
@@ -224,12 +293,75 @@
         }
       },
       openModel(type) {
-        this.getDriver()
-        this.staffTitle = '添加'
-        this.staffDialogVisible = true
         this.operationType = type
+        if (type == 'add') {
+          this.getDriver()
+          this.staffTitle = '添加'
+          this.staffDialogVisible = true
+        } else if (type == 'import') {
+          this.importDialogVisible = true
+          this.getDeviceList()
+        }
+      },
+      // 获取设备列表
+      getDeviceList() {
+        var params = {
+          page: this.Paginationil.PageIndex,
+          pageSize: this.Paginationil.PageSize,
+          name: this.nameTitle,
+        }
+        getDevice(params).then(res => {
+          if (res.code == 200) {
+            this.incubatorData = res.data.list
+            this.Total1 = res.data.count
+          }
+        })
+      },
+      // 搜索保温箱
+      incubatorInput(value) {
+        this.nameTitle = value
+        this.getDeviceList()
       },
-      // 删除公司
+      // 批量导入保温箱
+      incubatorAdd() {
+        const arrID = this.$refs.refIncubator.waybillIds
+        let arr1 = []
+        arrID.forEach(item => {
+          let arr2 = {
+            sn: item.T_sn,
+            carNo: item.T_devName,
+          }
+          arr1.push(arr2)
+        })
+        let flag = this.$refs['incubatorRules'].validateForm();
+        if (flag) {
+          if (arr1.length > 0) {
+            this.incubatorLoading = true
+            let params = {
+              list: arr1,
+              ...this.stateRuleForm,
+            }
+            importCar(params).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+                this.importDialogVisible = false
+              }
+              this.incubatorLoading = false
+            }).catch(() => {
+              this.incubatorLoading = false
+            })
+          } else {
+            this.$message.warning('请选择需要导入的保温箱');
+          }
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
+      },
+      // 删除保温箱
       deleteUser(id) {
         this.$confirm('此操作将永久删除该车辆, 是否继续?', '提示', {
           confirmButtonText: '确定',
@@ -257,6 +389,14 @@
         this.Pagination.PageIndex = val
         this.getList()
       },
+      changeSizeil(val) {
+        this.Paginationil.PageSize = val
+        this.getDeviceList()
+      },
+      changeCurrentil(val) {
+        this.Paginationil.PageIndex = val
+        this.getDeviceList()
+      },
       // 清空表单
       closeDialog() {
         this.formRuleList.forEach((item, index) => {
@@ -264,7 +404,16 @@
         })
         this.ruleForm = {}
         this.$refs.childRules.resetCheck();
+      },
+      closeDialogil() {
+        this.$refs.incubatorRules.resetCheck();
+        this.$refs.refIncubator.clearSelected();
       }
     }
   }
 </script>
+<style lang="scss" scoped>
+  .management_card ::v-deep .el-dialog__body {
+    padding: 10px 20px !important;
+  }
+</style>

+ 157 - 4
src/views/system/WaybillManagement.vue

@@ -15,7 +15,7 @@
         </pagination>
       </div>
     </div>
-    <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="60%" :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;">
@@ -109,7 +109,22 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button size="medium" @click="pdfDialogVisible = false">取 消</el-button>
-        <el-button size="medium" type="primary" @click="downloadPdf(waybillNo)">确 定</el-button>
+        <el-button size="medium" type="primary" :loading="pdfFlag" @click="downloadPdf(waybillNo)">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog title="打印运单" :close-on-click-modal="false" :visible.sync="printWaybillVisible" width="400px"
+      @close="printClose">
+      <div style="display: flex;align-items: flex-start;margin-right: 20px;">
+        <span style="font-size: 14px;margin-right: 8px;">运单号:</span>
+        <div style="display: flex;flex-direction: column;">
+          <div class="same_row_in card_printWay" v-for="(item,index) in printData" :key="index">
+            <span>{{item}}</span>
+          </div>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="medium" @click="printWaybillVisible = false">取 消</el-button>
+        <el-button size="medium" type="primary" :loading="definitFlag" @click="definitePrint()">确 定</el-button>
       </span>
     </el-dialog>
   </div>
@@ -130,7 +145,8 @@
     waybillDelivery,
     waybillImport,
     exportTemplate,
-    getTemperature
+    getTemperature,
+    getWaybillPdf
   } from '@/api/waybill'
   import {
     getAddress,
@@ -145,6 +161,12 @@
   import {
     getCar
   } from '@/api/vehicle.js'
+  import {
+    getCoolerBox
+  } from '@/api/incubator.js'
+  import {
+    getUser
+  } from '@/api/user.js'
   import actionBar from '@/components/actionBar'
   import tables from '@/components/tables'
   import pagination from '@/components/pagination'
@@ -178,8 +200,13 @@
     data() {
       return {
         operateList: [{
+          type: 'printWaybill',
+          title: '批量打印运单',
+          colour: 'success',
+          icon: 'el-icon-printer',
+        }, {
           type: 'print',
-          title: '批量打印',
+          title: '批量打印pfg',
           colour: 'success',
           icon: 'el-icon-printer',
         }, {
@@ -281,6 +308,7 @@
         sendRuleForm: {
           type: 2,
           printUserId: null,
+          coolerBoxId: null,
         },
         sendConfirmLoading: false,
         orderId: null,
@@ -303,6 +331,11 @@
         pdfDialogVisible: false,
         humidityil: true,
         waybillNo: '',
+        // 运单
+        printWaybillVisible: false,
+        printData: [],
+        definitFlag: false,
+        pdfFlag: false,
       }
     },
     mounted() {
@@ -529,15 +562,67 @@
           this.pdfDialogVisible = true
           this.waybillNo = row.waybillNo
           // this.downloadPdf(row)
+        } else if (type == 'print') {
+          this.printWaybillVisible = true
+          this.printData.push(row.waybillNo)
+        }
+      },
+      // 批量打印运单
+      async definitePrint() {
+        this.definitFlag = true
+        try {
+          let resulr = []
+          for (let i = 0; i < this.printData.length; i++) {
+            let urlimg = await this.waybillPdf(this.printData[i])
+            if (urlimg) {
+              resulr.push(urlimg)
+            } else {
+              throw new Error('请求错误,终止请求');
+            }
+          }
+          const mergeBuffer = await this.mergePdf(resulr)
+          //文件以pdf形式进行预览
+          let blob = new Blob([mergeBuffer], {
+            type: "application/pdf;chartset=UTF-8",
+          });
+          let fileURL = URL.createObjectURL(blob);
+          window.open(fileURL);
+          this.definitFlag = false
+          this.printWaybillVisible = false
+        } catch (error) {
+          throw new Error('请求错误,终止请求');
         }
       },
+      // 下载运单pdf
+      waybillPdf(value) {
+        return new Promise((resolve) => {
+          getWaybillPdf({
+            waybillNo: value,
+          }).then(response => {
+            if (response.fileName) {
+              //fileName = decodeURIComponent(filename);//对filename进行转码
+              let fileName = decodeURI(response.fileName);
+              if (window.navigator.msSaveOrOpenBlob) {
+                navigator.msSaveBlob(new Blob([response.data]), fileName);
+              } else {
+                let url = window.URL.createObjectURL(new Blob([response.data]));
+                resolve(url);
+              }
+            } else {
+              this.$message.error('未获取到文件名');
+            }
+          })
+        });
+      },
       // 下载pdf
       downloadPdf(value) {
+        this.pdfFlag = true
         getTemperature({
           waybillNo: value,
           humidityShow: this.humidityil,
         }).then(response => {
           if (response.fileName) {
+            this.pdfFlag = false
             this.pdfDialogVisible = false
             //fileName = decodeURIComponent(filename);//对filename进行转码
             let fileName = decodeURI(response.fileName);
@@ -592,6 +677,7 @@
             waybillIds: arrID,
             type: Number(this.sendRuleForm.type),
             printUserId: Number(this.sendRuleForm.printUserId),
+            coolerBoxId: Number(this.sendRuleForm.coolerBoxId),
           }
           waybillDelivery(param).then(res => {
             if (res.code == 200) {
@@ -641,10 +727,13 @@
         this.sendRuleList.forEach(item => {
           if (item.type == 'searchSelect') {
             item.options = []
+          } else if (item.type == 'searchSelect1') {
+            item.options = []
           }
         })
         this.staffName = ''
         this.sendRuleForm.printUserId = null
+        this.sendRuleForm.coolerBoxId = null
       },
       // 搜索
       remoteMethod(value) {
@@ -687,6 +776,33 @@
               })
             }
           })
+        } else if (type == 4) {
+          getCoolerBox(params).then(res => {
+            if (res.code == 200) {
+              const arr = res.data.list
+              let arrData = []
+              arr.forEach((item, index) => {
+                const commodity = {
+                  label: item.name,
+                  value: item.id,
+                }
+                arrData.push(commodity)
+              })
+              this.optionMatching(arrData, 'coolerBoxId')
+            }
+          })
+          getUser(params).then(res => {
+            if (res.code == 200) {
+              const arr = res.data.list
+              arr.forEach((item, index) => {
+                const commodity = {
+                  label: item.nickName,
+                  value: item.id,
+                }
+                arrList.push(commodity)
+              })
+            }
+          })
         }
         this.optionMatching(arrList, 'printUserId')
       },
@@ -760,6 +876,31 @@
               type: 'warning'
             });
           }
+        } else if (type == 'printWaybill') {
+          const arrID = this.$refs.refWaybill.waybillIds
+          if (arrID.length != 0) {
+            let arr3 = []
+            arrID.forEach(item => {
+              if (item.status == 8) {
+                arr3.push(item.waybillNo)
+              }
+            })
+            this.printData = arr3
+            console.log(arr3,365)
+            if (arr3.length > 0) {
+              this.printWaybillVisible = true
+            } else {
+              this.$message({
+                message: '请选择需要打印的运单',
+                type: 'warning'
+              });
+            }
+          } else {
+            this.$message({
+              message: '请先选择需要批量打印的运单',
+              type: 'warning'
+            });
+          }
         }
       },
       // 导入
@@ -939,6 +1080,9 @@
         this.$refs.sender.resetForm()
         this.$refs.recipients.resetForm()
         this.$refs.childRules.resetCheck()
+      },
+      printClose() {
+        this.printData = []
       }
     }
   }
@@ -989,4 +1133,13 @@
       margin-right: 8px;
     }
   }
+
+  .card_printWay {
+    display: flex;
+
+    span {
+      font-size: 15px;
+      font-weight: bold;
+    }
+  }
 </style>

+ 137 - 0
src/views/system/corporateGovernance.vue

@@ -0,0 +1,137 @@
+<template>
+  <!-- 公司管理 -->
+  <div>
+    <el-card class="box-card">
+      <div class="card_govern">
+        <div class="card_item_ance">
+          <span>公司logo</span>
+          <el-upload action :limit="1" :show-file-list="false" list-type="picture-card" :http-request="selectPicUpload"
+            :on-remove="handleRemove">
+            <div class="image_logo center_in" v-if="dialogImageUrl">
+              <!-- <img :src="dialogImageUrl" alt="" /> -->
+              <el-image class="image_logo_icon" :src="dialogImageUrl" fit="contain"></el-image>
+            </div>
+            <i class="el-icon-plus" v-else></i>
+          </el-upload>
+        </div>
+        <div class="card_item_ance">
+          <span>打印拦截</span>
+          <el-switch v-model="printIntercept" active-color="#13ce66" inactive-color="#ff4949">
+          </el-switch>
+        </div>
+        <div style="margin-top: 30px;">
+          <el-button type="primary" :loading="saveFlag" @click="saveSettings">保存设置</el-button>
+        </div>
+      </div>
+    </el-card>
+    <el-dialog :visible.sync="dialogVisible">
+      <img width="100%" :src="dialogImageUrl" alt="">
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    getCompanyMy,
+    putCompanyMy,
+    getFileToken
+  } from '@/api/company'
+  export default {
+    data() {
+      return {
+        printIntercept: '',
+        dialogImageUrl: '',
+        dialogVisible: false,
+        goverList: {},
+        saveFlag: false,
+      }
+    },
+    mounted() {
+      this.getList()
+    },
+    methods: {
+      // 获取公司信息
+      getList() {
+        getCompanyMy().then(res => {
+          if (res.code == 200) {
+            this.goverList = JSON.parse(JSON.stringify(res.data))
+            this.dialogImageUrl = res.data.logo
+            this.printIntercept = res.data.printIntercept
+          }
+        })
+      },
+      // 上传\修改公司logo
+      selectPicUpload(file) {
+        const loading = this.$loading({
+          lock: true,
+          text: '图片上传中...',
+          spinner: 'el-icon-loading',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
+        this.file = file.file;
+        let formData = new FormData();
+        formData.append('file', this.file);
+        getFileToken(formData).then(res => {
+          if (res.code == 200) {
+            this.dialogImageUrl = res.data
+            this.$forceUpdate()
+          } else {
+            this.$message.error('上传失败');
+          }
+          loading.close();
+        }).catch(e => {
+          this.$message.error('上传失败');
+        })
+      },
+      handleRemove(file, fileList) {
+        console.log(file, fileList);
+      },
+      // 保存/修改公司信息
+      saveSettings() {
+        if (this.dialogImageUrl != this.goverList.logo || this.printIntercept != this.goverList.printIntercept) {
+          this.saveFlag = true
+          putCompanyMy({
+            logo: this.dialogImageUrl,
+            printIntercept: this.printIntercept,
+          }).then(res => {
+            if (res.code == 200) {
+              this.getList()
+            }
+            this.saveFlag = false
+          }).catch(() => {
+            this.saveFlag = false
+          })
+        }
+      }
+    },
+  }
+</script>
+
+<style lang="scss" scoped>
+  .card_govern {
+    display: flex;
+    flex-direction: column;
+    align-items: flex-start;
+  }
+
+  .card_item_ance {
+    display: flex;
+    align-items: center;
+    margin-bottom: 20px;
+
+    span {
+      font-size: 20px;
+      margin-right: 20px;
+    }
+  }
+
+  .image_logo {
+    width: 148px;
+    height: 148px;
+
+    .image_logo_icon {
+      width: calc(100% - 20px);
+      height: calc(100% - 20px);
+    }
+  }
+</style>

+ 111 - 0
src/views/system/incubator.js

@@ -0,0 +1,111 @@
+import {
+  startStatus
+} from '@/assets/js/blockSort'
+
+export const incubator = () => {
+  return [{
+    field: 'selection',
+    label: '多选',
+    align: 'center',
+  }, {
+    field: 'T_devName',
+    label: '名称',
+    align: 'center',
+  }]
+}
+
+export const employee = () => {
+  return [{
+    field: 'index',
+    label: '序号',
+    align: 'center',
+  }, {
+    field: 'name',
+    label: '名称',
+    align: 'center',
+  }, {
+    field: 'sn',
+    label: 'SN',
+    align: 'center',
+  }, {
+    field: 'status',
+    label: '状态',
+    align: 'center',
+    options: startStatus()
+  }, {
+    field: 'deviceData.T_t',
+    label: '最新温度',
+    align: 'center',
+  }, {
+    field: 'deviceData.T_time',
+    label: '最新记录时间',
+    align: 'center',
+  }, {
+    field: 'action',
+    label: '操作',
+    colWidth: '270px',
+    align: 'center',
+    labelButton: [
+      //   {
+      //   type: 'record',
+      //   label: '记录',
+      //   icon: 'el-icon-s-order',
+      //   style: 'primary',
+      // },
+      {
+        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: 'sn',
+    label: 'SN',
+    placeholder: '请输入SN',
+    type: 'input',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入SN',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'status',
+    label: '状态',
+    placeholder: '状态',
+    type: 'radio',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '选择状态',
+      trigger: 'change'
+    }],
+    options: startStatus()
+  }]
+}

+ 11 - 0
src/views/system/vehicle.js

@@ -1,6 +1,17 @@
 import {
   startStatus
 } from '@/assets/js/blockSort'
+export const incubator = () => {
+  return [{
+    field: 'selection',
+    label: '多选',
+    align: 'center',
+  }, {
+    field: 'T_devName',
+    label: '名称',
+    align: 'center',
+  }]
+}
 export const employee = () => {
   return [{
     field: 'index',

+ 11 - 0
src/views/system/warehouse.js

@@ -1,6 +1,17 @@
 import {
   startStatus
 } from '@/assets/js/blockSort'
+export const incubator = () => {
+  return [{
+    field: 'selection',
+    label: '多选',
+    align: 'center',
+  }, {
+    field: 'T_devName',
+    label: '名称',
+    align: 'center',
+  }]
+}
 export const employee = () => {
   return [{
     field: 'index',

+ 37 - 12
src/views/system/waybill.js

@@ -11,20 +11,23 @@ export const employee = () => {
     field: 'waybillNo',
     label: '运单号',
     align: 'center',
-    colWidth: '180px',
+    colWidth: '200px',
   }, {
     field: 'status',
     label: '状态',
     align: 'center',
-    options: WaybillStatus()
+    options: WaybillStatus(),
+    colWidth: '120px',
   }, {
     field: 'senderAddressName',
     label: '寄件人',
     align: 'center',
+    colWidth: '150px',
   }, {
     field: 'consigneeAddressName',
     label: '收件人',
     align: 'center',
+    colWidth: '150px',
   }, {
     field: 'temperatureInterval',
     label: '温度要求',
@@ -34,14 +37,17 @@ export const employee = () => {
     field: 'deliveryCondition',
     label: '配送要求',
     align: 'center',
+    colWidth: '120px',
   }, {
     field: 'cargoType',
     label: '货物类型',
     align: 'center',
+    colWidth: '120px',
   }, {
     field: 'quantity',
     label: '数量',
     align: 'center',
+    colWidth: '120px',
   }, {
     field: 'createdAt',
     label: '下单时间',
@@ -52,11 +58,16 @@ export const employee = () => {
     label: '制单人',
     align: 'center',
   }, {
-    field: 'action',
+    field: 'unpackBtn',
     label: '操作',
-    colWidth: '370px',
+    colWidth: '460px',
     align: 'center',
     labelButton: [{
+      type: 'print',
+      label: '打印运单',
+      icon: 'el-icon-printer',
+      style: 'success',
+    }, {
       type: 'pdf',
       label: '下载PDF',
       icon: 'el-icon-download',
@@ -274,14 +285,28 @@ export const sendList = () => {
       trigger: 'blur,change'
     }],
     options: [{
-        label: '仓管',
-        value: 2,
-      },
-      {
-        label: '司机',
-        value: 3,
-      },
-    ]
+      label: '仓管',
+      value: 2,
+    }, {
+      label: '司机',
+      value: 3,
+    }, {
+      label: '保温箱',
+      value: 4,
+    }, ]
+  }, {
+    field: 'coolerBoxId',
+    type: 'searchSelect1',
+    label: '保温箱',
+    placeholder: '请选择保温箱',
+    colWidth: 24,
+    multiple: false,
+    rules: [{
+      required: true,
+      message: '请选择保温箱',
+      trigger: 'blur,change'
+    }],
+    options: [],
   }, {
     field: 'printUserId',
     type: 'searchSelect',

+ 2 - 2
vue.config.js

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

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor