Explorar o código

保温箱、冷冻柜新增温湿度记录、列表展示最新温度及记录时间

qianduan hai 4 meses
pai
achega
e24aaef805

+ 18 - 0
src/api/freezer.js

@@ -35,3 +35,21 @@ export function delIceRaft(parameter) {
     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
+  })
+}

+ 1 - 1
src/api/incubator.js

@@ -61,7 +61,7 @@ export function getDevice(parameter) {
   })
 }
 
-// 添加车辆
+// 添加冷冻柜
 export function addCoolerBoxImport(parameter) {
   return request({
     url: '/api/cooler-box/import',

+ 9 - 0
src/api/refrigerator.js

@@ -35,3 +35,12 @@ export function delIcelocker(parameter) {
     data: parameter
   })
 }
+
+//导入冷链平台冰柜
+export function importIceLocker(parameter) {
+  return request({
+    url: '/api/ice-locker/import',
+    method: 'post',
+    data: parameter
+  })
+}

+ 8 - 0
src/api/user.js

@@ -1,5 +1,13 @@
 import request from '@/utils/request'
 
+// 获取公司用户列表
+export function getCompanyUser(parameter) {
+  return request({
+    url: '/api/company/user',
+    method: 'get',
+    params: parameter
+  })
+}
 // 获取用户列表
 export function getUser(parameter) {
   return request({

+ 13 - 1
src/components/forms.vue

@@ -49,7 +49,9 @@
           </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">
+            <el-cascader ref="organizerUnit" checkStrictly v-model="ruleForm[`${item.field}`]" :disabled="item.disabled"
+              :options="item.options" :props="item.props" :show-all-levels="item.levels"
+              @change="(query) => handleChange(query, item.field)">
             </el-cascader>
           </el-form-item>
           <el-form-item :label="item.label" :prop="item.field" :rules="detail ? item.rules : {}"
@@ -403,6 +405,12 @@
           this.ruleForm[`${this.typeField}`] = this.inputsList
         }
       },
+      // 级联选择器关闭
+      handleChange(value, type) {
+        if (this.$refs.organizerUnit) {
+          this.$refs.organizerUnit[0].dropDownVisible = false
+        }
+      },
       //子组件校验,传递到父组件
       validateForm() {
         let flag = null
@@ -420,6 +428,10 @@
 </script>
 
 <style lang="scss" scoped>
+  ::v-deep .el-cascader {
+    width: 100% !important;
+  }
+
   .card_purple ::v-deep .el-upload-list__item {
     width: 120px !important;
     height: 120px !important;

+ 2 - 2
src/components/orderDetails.vue

@@ -1,7 +1,7 @@
 <template>
-  <!-- 单详情 -->
+  <!-- 单详情 -->
   <div>
-    <el-dialog title="单详情" :visible.sync="staffDialogVisible" width="60%" :close-on-click-modal="false">
+    <el-dialog title="单详情" :visible.sync="staffDialogVisible" width="60%" :close-on-click-modal="false">
       <div class="card_order_details">
         <el-row type="flex" class="order_row">
           <el-col class="order_col" :span="item.colWidth" v-for="(item,index) in list" :key="index">

+ 11 - 3
src/components/tables.vue

@@ -87,6 +87,12 @@
           </template>
         </el-table-column>
         <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
+          v-else-if="item.field == 'deviceData.T_t'">
+          <template slot-scope="scope">
+            <div>{{scope.row.deviceData.T_t || ''}}</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">
@@ -104,8 +110,10 @@
         <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.freezeClaim">≥{{scope.row.iceRaftRecord.freezeClaim}}h</div>
-            <div v-if="scope.row.freezeClaim">≥{{scope.row.freezeClaim}}h</div>
+            <div v-if="scope.row.iceRaftRecord">
+              <span v-if="scope.row.iceRaftRecord.status">≥{{scope.row.iceRaftRecord.freezeClaim}}h</span>
+            </div>
+            <div v-else-if="scope.row.freezeClaim">≥{{scope.row.freezeClaim}}h</div>
           </template>
         </el-table-column>
         <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
@@ -261,7 +269,7 @@
           return ''
         }
       },
-      // 我的
+      // 我的
       myInitDictvalueil(value, list, type) {
         if ([1, 2, 3].includes(value.status)) {
           return list[0].label

+ 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>

+ 14 - 4
src/router/generator-routers.js

@@ -18,14 +18,24 @@ const companyRouter = {
       title: '首页'
     },
     component: () => import('@/views/page/Home'),
-  }, {
-    path: '/UserManagement',
-    name: 'UserManagement',
+  },
+  // {
+  //   path: '/UserManagement',
+  //   name: 'UserManagement',
+  //   meta: {
+  //     icon: 'icon-yonghuguanli',
+  //     title: '用户管理'
+  //   },
+  //   component: () => import('@/views/system/UserManagement'),
+  // },
+  {
+    path: '/interiorUserManagement',
+    name: 'interiorUserManagement',
     meta: {
       icon: 'icon-yonghuguanli',
       title: '用户管理'
     },
-    component: () => import('@/views/system/UserManagement'),
+    component: () => import('@/views/system/interiorUserManagement'),
   }, {
     path: '/CompanyManagement',
     name: 'CompanyManagement',

+ 274 - 8
src/views/IceCreamFreezer/FreezerManagement.vue

@@ -22,6 +22,44 @@
         <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="80px"></forms>
+          </div>
+          <div class="card_search_input">
+            <div class="title_search">名称:</div>
+            <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>
+    <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>
 
@@ -30,17 +68,24 @@
     getIcelocker,
     addIcelocker,
     putIcelocker,
-    delIcelocker
+    delIcelocker,
+    importIceLocker
   } from '@/api/refrigerator'
+  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 thermography from '@/components/thermography'
   import {
     formRules,
     employee,
+    incubator
   } from "./refrigerator.js";
   import {
+    startStatus,
     iceraftStatus
   } from '@/assets/js/blockSort'
   export default {
@@ -49,14 +94,48 @@
       actionBar,
       tables,
       pagination,
-      forms
+      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',
@@ -64,6 +143,11 @@
           field: 'name',
           placeholder: '请输入名称',
         }, {
+          type: 'input',
+          label: 'SN',
+          field: 'sn',
+          placeholder: 'SN',
+        }, {
           type: 'select',
           label: '状态',
           field: 'status',
@@ -72,6 +156,7 @@
         }],
         searchRuleForm: {
           name: '',
+          sn: '',
           status: '',
         },
         searchValue: {},
@@ -87,17 +172,68 @@
         staffDialogVisible: false,
         formRuleList: [],
         ruleForm: {
+          sn: '',
           name: '',
           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() {
       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.Pagination.PageIndex = 1
@@ -109,12 +245,16 @@
         var params = {
           page: this.Pagination.PageIndex,
           pageSize: this.Pagination.PageSize,
+          showTemp: true,
           ...this.searchValue
         }
         getIcelocker(params).then(res => {
           if (res.code == 200) {
             this.tableData = res.data.list
             this.Total = res.data.count
+            this.timer = setTimeout(() => {
+              this.getList();
+            }, 60000)
           }
         })
       },
@@ -146,6 +286,7 @@
               id: this.selectingData.id,
               name: this.ruleForm.name,
               status: this.ruleForm.status,
+              sn: this.ruleForm.sn,
             }
             putIcelocker(params).then(res => {
               if (res.code == 200) {
@@ -175,6 +316,7 @@
           this.staffDialogVisible = true
           setTimeout(() => {
             this.$nextTick(() => {
+              this.ruleForm.sn = row.sn
               this.ruleForm.name = row.name
               this.ruleForm.status = row.status
             })
@@ -188,14 +330,89 @@
           this.ruleForm = JSON.parse(JSON.stringify(row))
         } else if (type == 'del') {
           this.deleteUser(row.id)
+        } 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) {
-        const dataList = formRules();
-        this.formRuleList = dataList;
-        this.staffTitle = '添加'
-        this.staffDialogVisible = true
-        this.operationType = type
+        if (type == 'add') {
+          const dataList = formRules();
+          this.formRuleList = dataList;
+          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) {
+            if (res.data) {
+              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,
+            }
+            importIceLocker(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) {
@@ -212,6 +429,10 @@
                 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()
             }
           })
@@ -225,13 +446,58 @@
         this.Pagination.PageIndex = val
         this.getList()
       },
+      changeSizeil(val) {
+        this.Paginationil.PageSize = val
+        this.getDeviceList()
+      },
+      changeCurrentil(val) {
+        this.Paginationil.PageIndex = val
+        this.getDeviceList()
+      },
       // 清空表单
       closeDialog() {
         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>
+<style lang="scss" scoped>
+  .card_import {
+    margin-top: 15px;
+    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+    margin-bottom: 20px;
+    border-radius: 10px;
+  }
+
+  .management_card ::v-deep .el-dialog__body {
+    padding: 0px 20px !important;
+  }
+
+  .card_incubat {
+    padding-left: 15px;
+    border-bottom: 1px solid #EBEEF5;
+    padding-top: 15px;
+    margin-bottom: 15px;
+  }
+
+  .card_search_input {
+    display: flex;
+    align-items: center;
+    padding: 15px 20px 15px 20px;
+    border-bottom: 1px solid #EBEEF5;
+  }
+
+  .title_search {
+    flex: none;
+    margin-right: 5px;
+  }
 </style>

+ 6 - 1
src/views/IceCreamFreezer/IceManagement.vue

@@ -207,7 +207,7 @@
         this.staffDialogVisible = true
         this.operationType = type
       },
-      // 删除用户
+      // 删除冰排
       deleteUser(id) {
         this.$confirm('此操作将永久删除该冰排, 是否继续?', '提示', {
           confirmButtonText: '确定',
@@ -222,6 +222,11 @@
                 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()
             }
           })

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

@@ -606,6 +606,10 @@
                 message: '删除成功,请重新入库该冰排!',
                 type: 'warning'
               });
+              const precisePage = Math.ceil((this.historyTotal - 1) / this.historyPagination.PageSize)
+              this.historyPagination.PageIndex = this.historyPagination.PageIndex > precisePage ? precisePage : this
+                .historyPagination.PageIndex
+              this.historyPagination.PageIndex = this.historyPagination.PageIndex < 1 ? 1 : this.historyPagination.PageIndex
               this.getHistory()
               this.getList()
             }

+ 42 - 1
src/views/IceCreamFreezer/refrigerator.js

@@ -1,6 +1,19 @@
 import {
   iceraftStatus
 } 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,16 +24,33 @@ export const employee = () => {
     label: '名称',
     align: 'center',
   }, {
+    field: 'sn',
+    label: 'SN',
+    align: 'center',
+  }, {
     field: 'status',
     label: '状态',
     align: 'center',
     options: iceraftStatus()
   }, {
+    field: 'deviceData.T_t',
+    label: '最新温度',
+    align: 'center',
+  }, {
+    field: 'deviceData.T_time',
+    label: '最新记录时间',
+    align: 'center',
+  }, {
     field: 'action',
     label: '操作',
-    colWidth: '260px',
+    colWidth: '270px',
     align: 'center',
     labelButton: [{
+      type: 'record',
+      label: '记录',
+      icon: 'el-icon-s-order',
+      style: 'primary',
+    }, {
       type: 'logs',
       label: '详情',
       icon: 'el-icon-tickets',
@@ -52,6 +82,17 @@ export const formRules = () => {
       trigger: 'blur'
     }]
   }, {
+    field: 'sn',
+    label: 'SN',
+    placeholder: '请输入SN',
+    type: 'input',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入SN',
+      trigger: 'blur'
+    }]
+  }, {
     field: 'status',
     label: '状态',
     placeholder: '状态',

+ 10 - 10
src/views/page/Home.vue

@@ -20,21 +20,21 @@
     <div class="card_head_statistics">
       <div class="item_statistics">
         <span class="sum_title">今日总运单数</span>
-        <span class="sum_num">{{listData.todayNum || 0}}</span>
+        <span class="sum_num center_in">{{listData.todayNum || 0}}</span>
       </div>
       <div style="height: 4rem;">
         <el-divider direction="vertical"></el-divider>
       </div>
       <div class="item_statistics">
         <span class="sum_title">本月运单总数</span>
-        <span class="sum_num icon_blue">{{listData.thisMonthNum || 0}}</span>
+        <span class="sum_num icon_blue center_in">{{listData.thisMonthNum || 0}}</span>
       </div>
       <div style="height: 4rem;">
         <el-divider direction="vertical"></el-divider>
       </div>
       <div class="item_statistics">
         <span class="sum_title">本年运单总数</span>
-        <span class="sum_num icon_blue">{{listData.thisYearNum || 0}}</span>
+        <span class="sum_num icon_blue center_in">{{listData.thisYearNum || 0}}</span>
       </div>
       <div style="height: 4rem;">
         <el-divider direction="vertical"></el-divider>
@@ -42,7 +42,7 @@
       <div class="card_statistics">
         <div class="item_statistics" v-for="(item,index) in list" :key="index">
           <span class="title_hint" :style="{color:item.color,}">{{item.title}}</span>
-          <span class="sum_num">{{listData[`${item.field}`]  || 0}}</span>
+          <span class="sum_num center_in">{{listData[`${item.field}`]  || 0}}</span>
         </div>
       </div>
     </div>
@@ -70,7 +70,7 @@
       </div>
     </div>
     <div style="flex: 1;">
-      <div class="card_head_statisticsil card_tendency">
+      <div class="card_head_statisticsil card_tendency"  v-if="userName != 'admin'">
         <!-- <div class="left_check" v-if="userList.type == 1">
             <div class="card_check" v-for="(item,index) in tableData" :key="index">
               <el-checkbox size="medium" v-model="item.checked"
@@ -130,19 +130,19 @@
           },
         },
         list: [{
-          color: '#F56C6C',
+          color: '#409EFF',
           title: '已下单',
           field: 'waitDeliveryNum',
         }, {
-          color: '#E6A23C',
+          color: '#409EFF',
           title: '配送中',
           field: 'inDeliveryNum',
         }, {
-          color: '#E6A23C',
+          color: '#67C23A',
           title: '已签收',
           field: 'receiptNum',
         }, {
-          color: '#67C23A',
+          color: '#F56C6C',
           title: '已拒收',
           field: 'rejectionNum',
         }],
@@ -342,7 +342,7 @@
           this.myChartil.resize()
         });
       },
-      // 单统计
+      // 单统计
       switchover(value) {
         this.yearsType = value
         this.getList()

+ 93 - 3
src/views/system/IncubatorManagement.vue

@@ -47,6 +47,18 @@
         </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>
 
@@ -67,6 +79,7 @@
   import tables from '@/components/tables'
   import pagination from '@/components/pagination'
   import forms from '@/components/forms'
+  import thermography from '@/components/thermography'
   import {
     formRules,
     employee,
@@ -82,10 +95,40 @@
       actionBar,
       tables,
       pagination,
-      forms
+      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: '添加保温箱',
@@ -162,30 +205,57 @@
         },
         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)
           }
         })
       },
@@ -265,8 +335,20 @@
             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 = '添加'
@@ -333,7 +415,7 @@
           this.$message.error('表单信息不完整,请继续填写完整');
         }
       },
-      // 删除公司
+      // 删除保温箱
       deleteUser(id) {
         this.$confirm('此操作将永久删除该保温箱, 是否继续?', '提示', {
           confirmButtonText: '确定',
@@ -348,6 +430,10 @@
                 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()
             }
           })
@@ -377,6 +463,10 @@
         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();

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

@@ -139,9 +139,9 @@
         }],
         formList: [{
           type: 'input',
-          label: '单号',
+          label: '单号',
           field: 'name',
-          placeholder: '请输入单号',
+          placeholder: '请输入单号',
         }, {
           type: 'select',
           label: '状态',
@@ -236,7 +236,7 @@
         }
         this.getList()
       },
-      // 获取单列表
+      // 获取单列表
       getList() {
         var params = {
           page: this.Pagination.PageIndex,

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

@@ -109,7 +109,7 @@
         this.searchValue = value
         this.getList()
       },
-      // 获取单列表
+      // 获取单列表
       getList() {
         var params = {
           page: this.Pagination.PageIndex,

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

@@ -247,6 +247,10 @@
                 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()
             }
           })

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

@@ -107,7 +107,7 @@
         this.searchValue = value
         this.getList()
       },
-      // 获取单列表
+      // 获取单列表
       getList() {
         var params = {
           page: this.Pagination.PageIndex,

+ 16 - 3
src/views/system/WaybillManagement.vue

@@ -167,6 +167,11 @@
           field: 'waybillNo',
           placeholder: '请输入运单号',
         }, {
+          type: 'input',
+          label: '订单号',
+          field: 'orderNo',
+          placeholder: '请输入订单号',
+        }, {
           type: 'select',
           label: '状态',
           field: 'status',
@@ -218,6 +223,7 @@
         },
         personnelList: consignmentList(),
         personnelForm: {
+          orderNo: null,
           reCheckId: null,
           deliveryId: null,
         },
@@ -285,7 +291,7 @@
         }
         this.getList()
       },
-      // 获取单列表
+      // 获取单列表
       getList() {
         var params = {
           page: this.Pagination.PageIndex,
@@ -444,6 +450,7 @@
             // deliveryPhone: this.delivererForm.phone,
             // saveSenderAddress: this.saveSenderAddress,
             saveConsigneeAddress: this.saveConsigneeAddress,
+            orderNo: this.personnelForm.orderNo,
             deliveryId: Number(this.personnelForm.deliveryId),
             reCheckId: Number(this.personnelForm.reCheckId),
             ...this.ruleForm
@@ -605,6 +612,7 @@
               // this.delivererForm.name = row.deliveryName
               // this.delivererForm.phone = row.deliveryPhone
               this.ruleForm.tamperProofLabel = row.tamperProofLabel
+              this.personnelForm.orderNo = row.orderNo
               this.personnelForm.reCheckId = String(row.reCheckId)
               this.personnelForm.deliveryId = String(row.deliveryId)
               if (row.tamperProofLabelImg) {
@@ -634,7 +642,7 @@
           this.signRuleForm.status = row.status
         }
       },
-      // 单派单
+      // 单派单
       sendHandleAdd() {
         let flag = this.$refs['sendRules'].validateForm();
         if (flag) {
@@ -700,7 +708,7 @@
           this.$message.error('表单信息不完整,请继续填写完整');
         }
       },
-      // 删除用户
+      // 删除运单
       deleteUser(id) {
         this.$confirm('此操作将永久该运单, 是否继续?', '提示', {
           confirmButtonText: '确定',
@@ -715,6 +723,11 @@
                 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()
             }
           })

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

@@ -209,6 +209,11 @@
                 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()
             }
           })

+ 14 - 1
src/views/system/incubator.js

@@ -33,11 +33,24 @@ export const employee = () => {
     align: 'center',
     options: startStatus()
   }, {
+    field: 'deviceData.T_t',
+    label: '最新温度',
+    align: 'center',
+  }, {
+    field: 'deviceData.T_time',
+    label: '最新记录时间',
+    align: 'center',
+  }, {
     field: 'action',
     label: '操作',
-    colWidth: '240px',
+    colWidth: '270px',
     align: 'center',
     labelButton: [{
+      type: 'record',
+      label: '记录',
+      icon: 'el-icon-s-order',
+      style: 'primary',
+    },{
       type: 'logs',
       label: '详情',
       icon: 'el-icon-tickets',

+ 351 - 0
src/views/system/interiorUserManagement.vue

@@ -0,0 +1,351 @@
+<template>
+  <!-- 用户管理 -->
+  <div class="home">
+    <actionBar :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
+      @searchProtocol="searchProtocol"></actionBar>
+    <div class="card_content_interior">
+      <div class="left_interior">
+        <el-tree :data="companyData" :props="defaultProps" highlight-current check-on-click-node node-key="id"
+          @node-click="handleNodeClick"></el-tree>
+      </div>
+      <div class="right_interior">
+        <!-- 表单 -->
+        <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>
+    </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">
+        <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 {
+    getCompanyUser,
+    getCompanyAll,
+    getUserDetails,
+    addUser,
+    putUser,
+    putResetUser,
+    delUser
+  } from '@/api/user'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import forms from '@/components/forms'
+  import {
+    formRules,
+    employee,
+    formRulesil
+  } from "./interiorUserTable.js";
+  export default {
+    name: 'UserManagement',
+    components: {
+      actionBar,
+      tables,
+      pagination,
+      forms
+    },
+    data() {
+      return {
+        defaultProps: {
+          children: 'children',
+          label: 'name'
+        },
+        operateList: [{
+          type: 'add',
+          title: '添加用户',
+          icon: 'el-icon-plus',
+        }],
+        formList: [{
+          type: 'input',
+          label: '姓名',
+          field: 'name',
+          placeholder: '姓名',
+        }],
+        searchRuleForm: {
+          name: '',
+          type: '',
+        },
+        searchValue: {},
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        Total: 0,
+        tableData: [],
+        operationType: '',
+        tableList: employee(),
+        staffTitle: '添加',
+        staffDialogVisible: false,
+        formRuleList: [],
+        ruleForm: {
+          deptId: '',
+          name: '',
+          username: '',
+          phone: '',
+          newPassword: '',
+          password: '',
+          type: '',
+        },
+        confirmLoading: false,
+        selectingData: {},
+        companyData: [],
+        companyId: '',
+      }
+    },
+    mounted() {
+      this.getCompany()
+      this.getList()
+    },
+    methods: {
+      // 点击公司获取用户列表
+      handleNodeClick(data) {
+        this.companyId = data.id
+        this.getList()
+      },
+      // 搜索
+      searchProtocol(value) {
+        this.Pagination.PageIndex = 1
+        this.searchValue = value
+        this.getList()
+      },
+      // 获取用户列表
+      getList(ID) {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          companyId: this.companyId,
+          ...this.searchValue
+        }
+        getCompanyUser(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.Total = res.data.count
+          }
+        })
+      },
+      // 获取公司
+      getCompany() {
+        getCompanyAll().then(res => {
+          if (res.code == 200) {
+            const arrList = []
+            const arr = res.data.list
+            arr.forEach((item, index) => {
+              const commodity = {
+                label: item.name,
+                value: item.id,
+                id: item.id,
+                parentId: item.parentId,
+              }
+              arrList.push(commodity)
+            })
+
+            function formatToTree(ary, pid) {
+              return ary
+                .filter((item) =>
+                  // 如果没有父id(第一次递归的时候)将所有父级查询出来
+                  // 这里认为 item.parentId === 1 就是最顶层 需要根据业务调整
+                  pid === undefined ? item.parentId === 0 : item.parentId === pid
+                )
+                .map((item) => {
+                  // 通过父节点ID查询所有子节点
+                  item.children = formatToTree(ary, item.id);
+                  return item;
+                });
+            }
+            let arrfag = formatToTree(arr)
+            this.companyData = arrfag
+            if (this.operationType) {
+              let arrui = formatToTree(arrList)
+              this.optionMatching(arrui, 'deptId')
+            }
+          }
+        })
+      },
+      // 选项赋值
+      optionMatching(value, field) {
+        this.formRuleList.forEach((item, index) => {
+          if (item.field == field) {
+            item.options = value
+          }
+        })
+        this.$nextTick(() => {
+          if (value.length == 1) {
+            this.ruleForm.deptId = String(value[0].value)
+          }
+        })
+      },
+      // 弹窗表单添加
+      handleAdd() {
+        let flag = this.$refs['childRules'].validateForm();
+        if (flag) {
+          if (this.operationType == 'add') {
+            if (this.ruleForm.password == this.ruleForm.newPassword) {
+              this.confirmLoading = true
+              var params = {
+                ...this.ruleForm
+              }
+              params.deptId = Number(params.deptId)
+              delete params.newPassword
+              addUser(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('输入两次密码不相同');
+            }
+          } else if (this.operationType == 'edit') {
+            this.confirmLoading = true
+            var params = {
+              id: this.selectingData.id,
+              name: this.ruleForm.name,
+              phone: this.ruleForm.phone,
+              type: this.ruleForm.type,
+            }
+            putUser(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.getCompany()
+          const dataList = formRulesil();
+          this.formRuleList = dataList;
+          this.staffTitle = '编辑'
+          this.staffDialogVisible = true
+          setTimeout(() => {
+            this.$nextTick(() => {
+              this.ruleForm.name = row.nickName
+              this.ruleForm.phone = row.phone
+              this.ruleForm.type = row.type
+            })
+          })
+        } else if (type == 'reset') {
+          this.resetPasswords(row.id)
+        } else if (type == 'del') {
+          this.deleteUser(row.id)
+        }
+      },
+      openModel(type) {
+        const dataList = formRules();
+        this.formRuleList = dataList;
+        this.getCompany()
+        this.staffTitle = '添加'
+        this.staffDialogVisible = true
+        this.operationType = type
+      },
+      // 删除用户
+      deleteUser(id) {
+        this.$confirm('此操作将永久删除用户, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          delUser({
+            id: id,
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                message: '操作成功',
+                type: 'success'
+              });
+              this.getList()
+            }
+          })
+        }).catch(() => {});
+      },
+      // 重置密码
+      resetPasswords(userID) {
+        this.$prompt('请输入新密码', '重置密码', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          inputPattern: /^\S{6,}$/,
+          inputErrorMessage: '长度不能小于6个字符'
+        }).then(({
+          value
+        }) => {
+          putResetUser({
+            id: userID,
+            password: value
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                type: 'success',
+                message: '重置成功'
+              });
+            }
+          })
+        }).catch(() => {});
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+      // 清空表单
+      closeDialog() {
+        this.$refs.childRules.resetCheck();
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .card_content_interior {
+    display: flex;
+    background-color: #fff;
+    border-radius: 5px;
+    box-shadow: 0 2px 4px rgba(0, 0, 0, .05);
+    margin-top: 15px;
+  }
+
+  .left_interior {
+    width: 20%;
+    padding: 10px 0px;
+  }
+
+  .right_interior {
+    width: 80%;
+  }
+</style>

+ 195 - 0
src/views/system/interiorUserTable.js

@@ -0,0 +1,195 @@
+import {
+  orderStatus
+} from '@/assets/js/blockSort'
+export const employee = () => {
+  return [{
+    field: 'index',
+    label: '序号',
+    align: 'center',
+  }, {
+    field: 'nickName',
+    label: '姓名',
+    align: 'center',
+  }, {
+    field: 'username',
+    label: '用户名',
+    align: 'center',
+  }, {
+    field: 'dept.name',
+    label: '公司',
+    align: 'center',
+  }, {
+    field: 'type',
+    label: '类型',
+    align: 'center',
+    options: orderStatus()
+  }, {
+    field: 'phone',
+    label: '电话号码',
+    align: 'center',
+  }, {
+    field: 'createUser.nickName',
+    label: '创建人',
+    align: 'center',
+  }, {
+    field: 'action',
+    label: '操作',
+    colWidth: '260px',
+    align: 'center',
+    labelButton: [{
+      type: 'edit',
+      label: '编辑',
+      icon: 'el-icon-edit',
+      style: 'primary',
+    }, {
+      type: 'reset',
+      label: '重置密码',
+      icon: 'el-icon-refresh-left',
+      style: 'warning',
+    }, {
+      type: 'del',
+      label: '删除',
+      icon: 'el-icon-delete',
+      style: 'danger',
+    }]
+  }]
+}
+
+export const formRules = () => {
+  return [{
+      field: 'deptId',
+      type: 'cascader',
+      label: '公司',
+      placeholder: '请选择公司',
+      colWidth: 24,
+      multiple: false,
+      rules: [{
+        required: true,
+        message: '请选择公司',
+        trigger: 'change'
+      }],
+      props: {
+        checkStrictly: true,
+        emitPath: false,
+      },
+      options: [],
+      levels: false,
+    }, {
+      field: 'name',
+      label: '姓名',
+      placeholder: '请输入姓名',
+      type: 'input',
+      colWidth: 24,
+      rules: [{
+        required: true,
+        message: '请输入姓名',
+        trigger: 'blur'
+      }]
+    }, {
+      field: 'username',
+      label: '用户名',
+      placeholder: '请输入用户名',
+      type: 'input',
+      colWidth: 24,
+      rules: [{
+        required: true,
+        message: '请输入用户名',
+        trigger: 'blur'
+      }]
+    }, {
+      field: 'phone',
+      label: '电话号码',
+      placeholder: '请输入电话号码',
+      type: 'input',
+      colWidth: 24,
+      rules: [{
+        required: true,
+        message: '请输入电话号码',
+        trigger: 'blur'
+      }]
+    }, {
+      field: 'newPassword',
+      label: '密码',
+      placeholder: '请输入密码',
+      type: 'input',
+      colWidth: 24,
+      rules: [{
+        required: true,
+        message: '请输入密码',
+        trigger: 'blur'
+      }, {
+        min: 6,
+        message: '长度不能小于6个字符',
+        trigger: 'blur'
+      }]
+    }, {
+      field: 'password',
+      label: '确定密码',
+      placeholder: '请再次输入密码',
+      type: 'input',
+      colWidth: 24,
+      rules: [{
+        required: true,
+        message: '请再次输入密码',
+        trigger: 'blur'
+      }, {
+        min: 6,
+        message: '长度不能小于6个字符',
+        trigger: 'blur'
+      }]
+    },
+    {
+      field: 'type',
+      label: '客户类型',
+      placeholder: '客户类型',
+      type: 'radio',
+      colWidth: 24,
+      rules: [{
+        required: true,
+        message: '选择客户类型',
+        trigger: 'change'
+      }],
+      options: orderStatus()
+    },
+  ]
+}
+
+export const formRulesil = () => {
+  return [{
+      field: 'name',
+      label: '姓名',
+      placeholder: '请输入姓名',
+      type: 'input',
+      colWidth: 24,
+      rules: [{
+        required: true,
+        message: '请输入姓名',
+        trigger: 'blur'
+      }]
+    }, {
+      field: 'phone',
+      label: '电话号码',
+      placeholder: '请输入电话号码',
+      type: 'input',
+      colWidth: 24,
+      rules: [{
+        required: true,
+        message: '请输入电话号码',
+        trigger: 'blur'
+      }]
+    },
+    {
+      field: 'type',
+      label: '客户类型',
+      placeholder: '客户类型',
+      type: 'radio',
+      colWidth: 24,
+      rules: [{
+        required: true,
+        message: '选择客户类型',
+        trigger: 'change'
+      }],
+      options: orderStatus()
+    },
+  ]
+}

+ 1 - 1
src/views/system/myWaybillTable.js

@@ -8,7 +8,7 @@ export const employee = () => {
     align: 'center',
   }, {
     field: 'waybillNo',
-    label: '单号',
+    label: '单号',
     align: 'center',
     colWidth: '180px',
   }, {

+ 16 - 0
src/views/system/waybill.js

@@ -13,6 +13,11 @@ export const employee = () => {
     align: 'center',
     colWidth: '180px',
   }, {
+    field: 'orderNo',
+    label: '订单号',
+    align: 'center',
+    colWidth: '180px',
+  }, {
     field: 'status',
     label: '状态',
     align: 'center',
@@ -214,6 +219,17 @@ export const sendList = () => {
 }
 export const consignmentList = () => {
   return [{
+    field: 'orderNo',
+    label: '订单号',
+    placeholder: '请输入订单号',
+    type: 'input',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入订单号',
+      trigger: 'blur'
+    }]
+  }, {
     field: 'reCheckId',
     type: 'searchSelect',
     label: '复核人',

+ 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: {