Selaa lähdekoodia

冰排管理、冷冻柜管理、冰排追溯管理、保温箱绑定冰排

qianduan 5 kuukautta sitten
vanhempi
commit
ac461f56e2

+ 9 - 0
src/api/incubator.js

@@ -8,6 +8,15 @@ export function getCoolerBox(parameter) {
     params: parameter
   })
 }
+
+// 获取保温箱内冰排列表
+export function getRaftCoolerBox(parameter) {
+  return request({
+    url: '/api/ice-raft/cooler-box',
+    method: 'get',
+    params: parameter
+  })
+}
 // 获取车辆详情
 export function getCoolerBoxDetails(parameter) {
   return request({

+ 10 - 1
src/api/waybill.js

@@ -92,7 +92,7 @@ export function exportTemplate(parameter) {
   })
 }
 
-// 导出温湿度pdf
+// 首页统计
 export function getWaybillHome(parameter) {
   return request({
     url: '/api/waybill/home',
@@ -101,6 +101,15 @@ export function getWaybillHome(parameter) {
   })
 }
 
+// 用户运单统计
+export function getUserStats(parameter) {
+  return request({
+    url: '/api/waybill/user-stats',
+    method: 'post',
+    data: parameter
+  })
+}
+
 // 导出温湿度pdf
 export function getTemperature(parameter) {
   return request({

+ 9 - 10
src/assets/js/blockSort.js

@@ -31,14 +31,9 @@ export const WaybillStatus = () => {
     },
     {
       bgcolor: '#F56C6C',
-      label: '已取消',
+      label: '已拒收',
       value: 4,
     },
-    {
-      bgcolor: '#F56C6C',
-      label: '已拒收',
-      value: 5,
-    }
   ]
 }
 export const myOrder = () => {
@@ -63,7 +58,7 @@ export const myOrder = () => {
 export const startStatus = () => {
   return [{
       bgcolor: '#409EFF',
-      label: '启用',
+      label: '正常',
       value: '2',
     },
     {
@@ -82,7 +77,7 @@ export const iceraftStatus = () => {
     },
     {
       bgcolor: '#F56C6C',
-      label: '用',
+      label: '用',
       value: '1',
     }
   ]
@@ -104,17 +99,21 @@ export const userType = () => {
 
 export const frozenState = () => {
   return [{
+      bgcolor: '#606266',
+      label: '未入库',
+      value: '',
+    },{
       bgcolor: '#409EFF',
       label: '冷冻中',
       value: '1',
     },
     {
-      bgcolor: '#E6A23C',
+      bgcolor: '#67C23A',
       label: '待使用',
       value: '2',
     },
     {
-      bgcolor: '#67C23A',
+      bgcolor: '#E6A23C',
       label: '使用中',
       value: '3',
     },

+ 1 - 1
src/components/MapDelivery.vue

@@ -104,7 +104,7 @@
             const hours = distanceInKm / (speed / 60); // 因为速度是每小时多少公里,所以除以60转换为小时
             return hours.toFixed(2); // 保留两位小数
           }
-          const speed = 30;
+          const speed = 25; //骑行速度
           const timeMins = calculateTime(distance, speed);
           // console.log(`预计到达时间:约 ${timeMins} 分钟`);
 

+ 7 - 4
src/components/actionBar.vue

@@ -4,7 +4,7 @@
       <div style="display: flex;flex-direction: column;">
         <div class="action_bar_headline" :class="formList.length>0?'margin_5x':''">{{menuTitle}}</div>
         <el-form :model="ruleForm" ref="ruleForm" label-width="100" class="el-row demo-ruleForm"
-          :label-position="labelPosition">
+          :label-position="labelPosition" @submit.native.prevent>
           <div style="display: flex;flex-wrap: wrap;flex-direction: row;">
             <el-form-item style="display: flex;margin-right: 10px;margin-bottom: 10px !important;"
               v-for="(item, index) in formList" :key="index" :label="item.label" :prop="item.field"
@@ -19,9 +19,9 @@
               </template>
               <!-- 下拉框 -->
               <template v-if="item.type === 'select'">
-                <el-select size="medium" :id="item.field" class="forms_dom" v-model="ruleForm[`${item.field}`]"
-                  :placeholder="item.placeholder" :disabled="item.disabled" :multiple="item.multiple"
-                  style="width: 100%" @change="changeSelect">
+                <el-select size="medium" :id="item.field" v-loadmore="(params) => handleScroll(item.field)"
+                  class="forms_dom" v-model="ruleForm[`${item.field}`]" :placeholder="item.placeholder"
+                  :disabled="item.disabled" :multiple="item.multiple" style="width: 100%" @change="changeSelect">
                   <el-option v-for="(element, i) in item.options" :label="element.label" :value="`${element.value}`"
                     :key="i" />
                 </el-select>
@@ -122,6 +122,9 @@
         this.$forceUpdate()
         this.$emit('reset')
       },
+      handleScroll(type) {
+        this.$emit('handleScroll', type)
+      },
       changeSelect() {}
     }
   }

+ 34 - 12
src/components/forms.vue

@@ -1,7 +1,8 @@
 <template>
   <!-- 表单 -->
   <div class="card_employee">
-    <el-form ref="ruleForm" :label-position="labelPosition" :model="ruleForm" :label-width="labelWidth">
+    <el-form ref="ruleForm" @submit.native.prevent :label-position="labelPosition" :model="ruleForm"
+      :label-width="labelWidth">
       <el-row :gutter="10">
         <el-col :span="item.colWidth" v-for="(item, index) in formList" :key="index">
           <el-form-item class="card_independent" :label-width="item.labelWidth" :label="item.label" :prop="item.field"
@@ -15,7 +16,7 @@
           <el-form-item class="card_independent" :label-width="item.labelWidth" :label="item.label" :prop="item.field"
             :rules="detail ? item.rules : {}" v-if="item.type === 'scan'">
             <el-input :placeholder="item.placeholder" :disabled="item.disabled" :id="item.field" v-model="inputs"
-              @keyup.enter.native="keydownBarcode(item.field)" @blur="loseFocus">
+              @keyup.enter.native="keydownBarcode(item.field)" @blur="loseFocus" @focus="focus(item.field)">
               <el-button slot="append" icon="el-icon-circle-plus icon_circle_btn"
                 @click="serialNumber(item.field)"></el-button>
             </el-input>
@@ -41,7 +42,7 @@
             :rules="detail ? item.rules : {}" v-if="item.type === 'searchSelect'">
             <el-select :id="item.field" v-model="ruleForm[`${item.field}`]" v-loadmore="handleScroll" filterable remote
               :remote-method="(query) => remoteMethod(query, item.field)" :placeholder="item.placeholder"
-              :disabled="item.disabled" style="width: 100%">
+              :disabled="item.disabled" style="width: 100%" @change="changeOption">
               <el-option v-for="(element, i) in item.options" :label="element.label" :value="`${element.value}`"
                 :key="i" />
             </el-select>
@@ -194,6 +195,11 @@
         type: Boolean,
         default: () => false,
       },
+      // 冰排追溯
+      iceTracing: {
+        type: Boolean,
+        default: () => false,
+      },
     },
     watch: {
       formNewList: {
@@ -219,6 +225,7 @@
         timearr: [0, 0],
         isScanningGun: false,
         inputsList: [],
+        typeField: '',
       }
     },
     methods: {
@@ -227,12 +234,18 @@
         this.$forceUpdate()
         this.$emit("changeSelect", row, field);
       },
+      // 搜索选择
+      changeOption(row) {
+        this.$emit("changeOption", row);
+      },
       // 重置校验
       resetCheck() {
-        this.inputs = ''
-        this.inputsList = []
-        if (this.ruleForm.code) {
-          this.ruleForm.code = []
+        if (this.iceTracing) {
+          this.inputs = ''
+          this.inputsList = []
+          if (this.ruleForm.code) {
+            this.ruleForm.code = []
+          }
         }
         this.$refs.ruleForm.resetFields();
       },
@@ -356,16 +369,17 @@
       serialNumber(field) {
         if (this.inputs) {
           this.inputsList.push(this.inputs)
+          this.inputsList = this.uniqueArray(this.inputsList)
           this.inputs = ''
-          this.ruleForm[`${field}`] = this.uniqueArray(this.inputsList)
+          this.ruleForm[`${field}`] = this.inputsList
         }
       },
       keydownBarcode(field) {
-        console.log('回车');
         if (this.inputs) {
           this.inputsList.push(this.inputs)
+          this.inputsList = this.uniqueArray(this.inputsList)
           this.inputs = ''
-          this.ruleForm[`${field}`] = this.uniqueArray(this.inputsList)
+          this.ruleForm[`${field}`] = this.inputsList
         }
       },
       // 去重
@@ -375,11 +389,19 @@
       // 删除编号
       delSerial(value, index) {
         this.inputsList.splice(index, 1)
-        this.ruleForm['code'].splice(index, 1);
+        this.ruleForm[`${this.typeField}`] = this.inputsList
+        // this.ruleForm['code'].splice(index, 1);
+      },
+      focus(field) {
+        this.typeField = field
       },
       // 失去焦点
       loseFocus() {
-        this.ruleForm['code'][0] = this.inputs
+        if (this.inputs) {
+          this.inputsList.push(this.inputs)
+          this.inputsList = this.uniqueArray(this.inputsList)
+          this.ruleForm[`${this.typeField}`] = this.inputsList
+        }
       },
       //子组件校验,传递到父组件
       validateForm() {

+ 1 - 1
src/components/mobileHumiture.vue

@@ -17,7 +17,7 @@
         <div class="title_item w_wsd">{{item.T_rh || ''}}</div>
         <div class="title_item w_time">{{item.T_time || ''}}</div>
       </div>
-      <div style="width: 100%;">
+      <div style="width: 100%;" class="center_in">
         <el-pagination layout="prev, pager, next" :total="Total" @current-change="currentChange"></el-pagination>
       </div>
     </div>

+ 38 - 22
src/components/orderDetails.vue

@@ -9,6 +9,8 @@
               <div v-if="item.field == 'logistics'">
                 {{item.title}} <span class="order_look" @click="goLook">查看物流详情</span>
               </div>
+              <div v-else-if="item.field == 'deliveryDuration'">
+                {{item.title}}{{formatMinutes(waybillData[`${item.field}`])}}</div>
               <div class="grid-content bg-purple" v-else-if="item.field == 'status' && !mywaybill">
                 <div class="describe">{{item.title}}</div>
                 <div style="text-align: left;line-height: 19px;"
@@ -74,23 +76,7 @@
         }, {
           title: '运单状态:',
           field: 'status',
-          colWidth: 8,
-        }, {
-          title: '保温箱:',
-          field: 'coolerBoxName',
-          colWidth: 8,
-        }, {
-          title: '寄件人:',
-          field: 'senderAddressName',
-          colWidth: 8,
-        }, {
-          title: '寄件人电话:',
-          field: 'senderAddressPhone',
-          colWidth: 8,
-        }, {
-          title: '寄件地址:',
-          field: 'senderAddressDetails',
-          colWidth: 8,
+          colWidth: 16,
         }, {
           title: '收件人:',
           field: 'consigneeAddressName',
@@ -105,18 +91,26 @@
           colWidth: 8,
         }, {
           title: '配送员姓名:',
-          field: 'deliveryName',
+          field: 'courierName',
           colWidth: 8,
         }, {
           title: '配送员电话:',
-          field: 'deliveryPhone',
+          field: 'courierPhone',
+          colWidth: 16,
+        }, {
+          title: '复核人姓名:',
+          field: 'reCheckName',
           colWidth: 8,
         }, {
+          title: '复核人电话:',
+          field: 'reCheckPhone',
+          colWidth: 16,
+        }, {
           title: '下单时间:',
           field: 'orderTime',
           colWidth: 8,
         }, {
-          title: '配送时间:',
+          title: '出发时间:',
           field: 'deliveryTime',
           colWidth: 8,
         }, {
@@ -124,14 +118,30 @@
           field: 'deliveryTime',
           colWidth: 8,
         }, {
-          title: '防拆标签图片:',
-          field: 'tamperProofLabelImg',
+          title: '保温箱:',
+          field: 'coolerBoxName',
+          colWidth: 8,
+        }, {
+          title: '冰排:',
+          field: 'iceRaftCode',
+          colWidth: 8,
+        }, {
+          title: '配送耗时:',
+          field: 'deliveryDuration',
+          colWidth: 8,
+        }, {
+          title: '服务评价:',
+          field: 'assessContent',
           colWidth: 24,
         }, {
           title: '防拆标签码:',
           field: 'tamperProofLabel',
           colWidth: 24,
         }, {
+          title: '防拆标签图片:',
+          field: 'tamperProofLabelImg',
+          colWidth: 24,
+        }, {
           title: '备注:',
           field: 'remark',
           colWidth: 24,
@@ -199,6 +209,12 @@
           return arrList
         }
       },
+      // 总分钟格式化
+      formatMinutes(totalMinutes) {
+        const hours = Math.floor(totalMinutes / 60); // 计算小时
+        const minutes = totalMinutes % 60; // 计算分钟(余数)
+        return `${hours}h${minutes}m`;
+      },
       mywaybillStatus(value) {
         const list = this.myOrder
         if ([1, 2, 3].includes(value.status)) {

+ 50 - 10
src/components/tables.vue

@@ -1,8 +1,8 @@
 <template>
   <!-- tables -->
   <div class="tables_grid">
-    <el-table ref="tableRef" :show-header="showHeader" class="table-style" :data="tableData" style="width: 100%"
-      :border="border" :row-key="(val) => rowKey(val)" @cell-click="cellClick" :key="Math.random()"
+    <el-table ref="tableRef" tooltip-effect="dark myTooltips" :show-header="showHeader" class="table-style"
+      :data="tableData" style="width: 100%" :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"
@@ -104,8 +104,8 @@
         <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
           v-else-if="item.field == 'freezeClaim'">
           <template slot-scope="scope">
-            <div v-if="scope.row.iceRaftRecord">≥{{scope.row.iceRaftRecord.freezeClaim}}h</div>
-            <div v-else>≥{{scope.row.freezeClaim}}h</div>
+            <div v-if="scope.row.iceRaftRecord.freezeClaim">≥{{scope.row.iceRaftRecord.freezeClaim}}h</div>
+            <div v-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"
@@ -115,12 +115,28 @@
             <div v-else>{{ formatMinutes(scope.row.freezeDuration) }}</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 == 'assessStar'">
+          <template slot-scope="scope">
+            <el-rate disabled v-model="scope.row.assessStar"></el-rate>
+            <el-tooltip class="item" effect="dark" :content="scope.row.assessContent" placement="top">
+              <div class="cell el-tooltip">{{scope.row.assessContent}}</div>
+            </el-tooltip>
+          </template>
+        </el-table-column>
+        <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
+          v-else-if="item.field == 'deliveryDuration'">
+          <template slot-scope="scope">
+            <div>{{formatMinutes(scope.row[item.field]) || ''}}</div>
+          </template>
+        </el-table-column>
         <el-table-column type="index" :fixed="item.boxhead ? true : false" width="80px" :label="item.label"
           :align="item.align" v-else-if="item.field == 'index'">
         </el-table-column>
-        <el-table-column type="selection" v-model="selectionList" reserve-selection width="55"
+        <el-table-column type="selection" v-model="selectionList" :reserve-selection="true" 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>
@@ -168,6 +184,11 @@
       suspension: {
         type: Boolean,
         default: () => false,
+      },
+      // 历史记录按钮显示控制
+      historyFlag: {
+        type: Boolean,
+        default: () => false,
       }
     },
     data() {
@@ -232,9 +253,13 @@
       },
       // 总分钟格式化
       formatMinutes(totalMinutes) {
-        const hours = Math.floor(totalMinutes / 60); // 计算小时
-        const minutes = totalMinutes % 60; // 计算分钟(余数)
-        return `${hours}h${minutes}m`;
+        if (totalMinutes) {
+          const hours = Math.floor(totalMinutes / 60); // 计算小时
+          const minutes = totalMinutes % 60; // 计算分钟(余数)
+          return `${hours}h${minutes}m`;
+        } else {
+          return ''
+        }
       },
       // 我的订单
       myInitDictvalueil(value, list, type) {
@@ -277,7 +302,17 @@
       },
       // 权限按钮
       jurisdiction(row, type) {
-        return false
+        if (this.historyFlag) {
+          if (row.status != '4' && type == 'edit') {
+            return false
+          } else if (row.status == '1' && type == 'del' || row.status == '2' && type == 'del') {
+            return false
+          } else {
+            return true
+          }
+        } else {
+          return false
+        }
       },
       // 选择tables某一项
       cellClick(row) {
@@ -408,3 +443,8 @@
     margin-left: 10px;
   }
 </style>
+<style>
+  .myTooltips {
+    max-width: 50%;
+  }
+</style>

+ 51 - 16
src/components/waybillInformation.vue

@@ -6,16 +6,17 @@
     <div class="order_title">状态 <span :style="{color: filterColor(list)}">{{initDictvalueil(list)}}</span>
     </div>
     <div class="order_title flex_dismantle">
-      <div style="display: flex;">寄件人:
-        <span class="order_name">{{list.senderAddressName}}</span>
-        <span class="order_phone phone_color"
-          @click="DialProblem(list.senderAddressPhone)">{{list.senderAddressPhone}}</span>
+      <div style="display: flex;">复核人:
+        <span class="order_name" v-if="list.reCheck">{{list.reCheck.nickName}}</span>
+        <span class="order_phone phone_color" v-if="list.reCheck"
+          @click="DialProblem(list.reCheck.phone)">{{list.reCheck.phone}}</span>
       </div>
       <span>{{list.senderAddressDetails}}</span>
     </div>
     <div class="order_title">配送人:
-      <span class="order_name">{{list.deliveryName}}</span>
-      <span class="order_phone phone_color" @click="DialProblem(list.deliveryPhone)">{{list.deliveryPhone}}</span>
+      <span class="order_name" v-if="list.delivery">{{list.delivery.nickName}}</span>
+      <span class="order_phone phone_color" v-if="list.delivery"
+        @click="DialProblem(list.delivery.phone)">{{list.delivery.phone}}</span>
     </div>
     <div class="order_title">
       <div style="display: flex;align-items: center;">收件人:
@@ -48,9 +49,22 @@
         </div>
       </el-upload>
     </div>
+    <div class="card_evaluate">
+      <span class="title_eval">服务评价</span>
+      <el-rate v-model="list.assessStar" disabled v-if="list.assessStar"></el-rate>
+      <el-rate v-model="value1" v-else></el-rate>
+    </div>
+    <div class="card_evaluate">
+      <span class="title_eval">评价内容</span>
+      <el-input type="textarea" :rows="2" placeholder="评价内容" disabled v-model="list.assessContent"
+        v-if="list.assessContent">
+      </el-input>
+      <el-input type="textarea" :rows="2" placeholder="评价内容" v-model="textarea" v-else>
+      </el-input>
+    </div>
     <div class="btn_order" v-if="![3,4,5].includes(list.status)">
-      <el-button type="danger" plain @click="getTurnDown">拒绝收货</el-button>
-      <el-button type="primary" plain @click="getReceiving">确定收货</el-button>
+      <el-button style="width: 50%;" type="danger" plain @click="getTurnDown">拒绝收货</el-button>
+      <el-button style="width: 50%;" type="primary" plain @click="getReceiving">确定收货</el-button>
     </div>
     <custom-modal :is-visible="isModalVisible" @closeModal="closeModal" @getSubmit="getSubmit">
       <!-- 自定义内容 -->
@@ -108,6 +122,8 @@
         },
         file: null,
         isModalVisibleil: false,
+        value1: null,
+        textarea: '',
       }
     },
     methods: {
@@ -121,10 +137,10 @@
       closeModal() {
         this.isModalVisible = false
         this.input = ''
-        this.$message({
-          type: 'info',
-          message: '已取消'
-        });
+        // this.$message({
+        //   type: 'info',
+        //   message: '已取消'
+        // });
       },
       closeModalil() {
         this.isModalVisibleil = false
@@ -134,6 +150,8 @@
         let param = {
           reason: this.input,
           images: '',
+          assessStar: this.value1,
+          assessContent: this.textarea,
         }
         let arrImg = []
         this.ruleForm.fileList.forEach(item => {
@@ -150,7 +168,12 @@
           arrImg.push(item.url)
         })
         images = arrImg.join(',')
-        this.$emit('getReceiving', images)
+        let param = {
+          images: images,
+          assessStar: this.value1,
+          assessContent: this.textarea,
+        }
+        this.$emit('getReceiving', param)
       },
       // 单个图片上传
       singleUpload(fileList, value) {
@@ -238,7 +261,7 @@
   }
 
   .order_title1 {
-    font-size: 17px;
+    font-size: 15px;
     margin-bottom: 8px;
     color: #303133;
   }
@@ -249,7 +272,7 @@
   }
 
   .order_title {
-    font-size: 15px;
+    font-size: 13px;
     margin-bottom: 8px;
     color: #303133;
 
@@ -290,12 +313,13 @@
   }
 
   .title_sign {
-    font-size: 17px;
+    font-size: 16px;
     font-weight: 600;
     margin-bottom: 5px;
   }
 
   .btn_order {
+    margin-top: 20px;
     display: flex;
     align-items: center;
     justify-content: space-evenly;
@@ -336,4 +360,15 @@
     display: flex;
     flex-wrap: wrap;
   }
+
+  .card_evaluate {
+    display: flex;
+    padding-bottom: 10px;
+  }
+
+  .title_eval {
+    font-size: 14px;
+    margin-right: 10px;
+    flex: none;
+  }
 </style>

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

@@ -104,7 +104,7 @@ const rootRouter = {
       name: 'FreezerManagement',
       meta: {
         icon: 'icon-binggui',
-        title: '冷柜管理'
+        title: '冷柜管理'
       },
       component: () => import('@/views/IceCreamFreezer/FreezerManagement'),
     }, {

+ 2 - 1
src/utils/request.js

@@ -86,7 +86,8 @@ request.interceptors.response.use((response) => {
       })
       return
     }
-    if (res.Code == 200 || res.code == 200 || res.code == 404 || res.code == 401 || res.code == 6401) {
+    if (res.Code == 200 || res.code == 200 || res.code == 404 || res.code == 401 || res.code == 6401 || res.code ==
+      2000) {
       return res
     } else {
       Message.error(res.msg || res.message)

+ 15 - 5
src/views/IceCreamFreezer/FreezerManagement.vue

@@ -1,11 +1,11 @@
 <template>
   <!-- 冰柜管理 -->
-  <div class="home">
+  <div>
     <actionBar :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
       @searchProtocol="searchProtocol"></actionBar>
     <div class="card_content">
       <!-- 表单 -->
-      <tables :suspension="true" :tableList="tableList" :tableData="tableData" @buttonData="buttonData"></tables>
+      <tables :tableList="tableList" :tableData="tableData" @buttonData="buttonData"></tables>
       <!-- 分页 -->
       <div v-if="Total">
         <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
@@ -40,6 +40,9 @@
     formRules,
     employee,
   } from "./refrigerator.js";
+  import {
+    iceraftStatus
+  } from '@/assets/js/blockSort'
   export default {
     name: 'IceManagement',
     components: {
@@ -60,9 +63,16 @@
           label: '名称',
           field: 'name',
           placeholder: '请输入名称',
+        }, {
+          type: 'select',
+          label: '状态',
+          field: 'status',
+          placeholder: '请选择状态',
+          options: iceraftStatus(),
         }],
         searchRuleForm: {
           name: '',
+          status: '',
         },
         searchValue: {},
         Pagination: {
@@ -78,7 +88,7 @@
         formRuleList: [],
         ruleForm: {
           name: '',
-          status: '',
+          status: '2',
         },
         confirmLoading: false,
         selectingData: {},
@@ -187,9 +197,9 @@
         this.staffDialogVisible = true
         this.operationType = type
       },
-      // 删除用户
+      // 删除冷冻柜
       deleteUser(id) {
-        this.$confirm('此操作将永久删除用户, 是否继续?', '提示', {
+        this.$confirm('此操作将永久删除该冷冻柜, 是否继续?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'

+ 32 - 12
src/views/IceCreamFreezer/IceManagement.vue

@@ -1,11 +1,11 @@
 <template>
   <!-- 冰排管理 -->
-  <div class="home">
+  <div>
     <actionBar :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
       @searchProtocol="searchProtocol"></actionBar>
     <div class="card_content">
       <!-- 表单 -->
-      <tables :suspension="true" :tableList="tableList" :tableData="tableData" @buttonData="buttonData"></tables>
+      <tables :tableList="tableList" :tableData="tableData" @buttonData="buttonData"></tables>
       <!-- 分页 -->
       <div v-if="Total">
         <pagination :total="Total" :currentPage="Pagination.PageIndex" @changeSize="changeSize"
@@ -15,7 +15,8 @@
     </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 ref="childRules" :iceBank="true" :iceTracing="iceTracing" :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>
@@ -37,9 +38,13 @@
   import pagination from '@/components/pagination'
   import forms from '@/components/forms'
   import {
+    formRulesil,
     formRules,
     employee,
   } from "./freezer.js";
+  import {
+    iceraftStatus
+  } from '@/assets/js/blockSort'
   export default {
     name: 'IceManagement',
     components: {
@@ -60,9 +65,16 @@
           label: '编号',
           field: 'code',
           placeholder: '请输入编号',
+        }, {
+          type: 'select',
+          label: '状态',
+          field: 'status',
+          placeholder: '请选择状态',
+          options: iceraftStatus(),
         }],
         searchRuleForm: {
           code: '',
+          status: '',
         },
         searchValue: {},
         Pagination: {
@@ -75,13 +87,19 @@
         tableList: employee(),
         staffTitle: '添加',
         staffDialogVisible: false,
-        formRuleList: [],
-        ruleForm: {
+        formRuleList: formRulesil(),
+        ruleForm: {},
+        ruleFormil: {
+          codeList: [],
+          status: '2',
+        },
+        ruleFormil1: {
           code: '',
-          status: '',
+          status: '2',
         },
         confirmLoading: false,
         selectingData: {},
+        iceTracing: true,
       }
     },
     mounted() {
@@ -115,7 +133,7 @@
           if (this.operationType == 'add') {
             this.confirmLoading = true
             var params = {
-              ...this.ruleForm
+              ...this.ruleFormil
             }
             addIceRaft(params).then(res => {
               if (res.code == 200) {
@@ -156,11 +174,12 @@
         }
       },
       buttonData(row, type) {
-        const dataList = formRules();
-        this.formRuleList = dataList;
         this.selectingData = row
         this.operationType = type
         if (type == 'edit') {
+          this.iceTracing = false
+          this.ruleForm = this.ruleFormil1
+          this.formRuleList = formRules()
           this.staffTitle = '编辑'
           this.staffDialogVisible = true
           setTimeout(() => {
@@ -181,15 +200,16 @@
         }
       },
       openModel(type) {
-        const dataList = formRules();
-        this.formRuleList = dataList;
+        this.iceTracing = true
+        this.ruleForm = this.ruleFormil
+        this.formRuleList = formRulesil()
         this.staffTitle = '添加'
         this.staffDialogVisible = true
         this.operationType = type
       },
       // 删除用户
       deleteUser(id) {
-        this.$confirm('此操作将永久删除用户, 是否继续?', '提示', {
+        this.$confirm('此操作将永久删除该冰排, 是否继续?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'

+ 224 - 54
src/views/IceCreamFreezer/IceTracingManagement.vue

@@ -2,7 +2,7 @@
   <!-- 冰排追溯管理 -->
   <div>
     <actionBar :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
-      @searchProtocol="searchProtocol"></actionBar>
+      @searchProtocol="searchProtocol" @handleScroll="handleScroll"></actionBar>
     <div class="card_content">
       <!-- 表单 -->
       <tables :tableList="tableList" :tableData="tableData" @buttonData="buttonData"></tables>
@@ -17,17 +17,20 @@
     <div class="card_history">
       <el-dialog title="历史记录" :visible.sync="historyVisible" width="90%" :close-on-click-modal="false"
         @close="closeHistory">
-        <tables :tableList="historyList" :tableData="historyData" @buttonData="historyButton"></tables>
+        <tables :historyFlag="true" :tableList="historyList" :tableData="historyData" @buttonData="historyButton">
+        </tables>
         <!-- 分页 -->
         <div v-if="historyTotal">
           <pagination :total="historyTotal" :currentPage="historyPagination.PageIndex" @changeSize="historySize"
             @changeCurrent="historyCurrent">
           </pagination>
         </div>
-        <el-dialog width="500px" title="编辑" :visible.sync="innerVisible" append-to-body>
-          <forms ref="childRules" :formNewList="editRuleList" :ruleForm="editRuleForm" :iceBank="true"
-            labelWidth="100px" @handleScroll="handleScroll" @remoteMethod="remoteMethod" :key="Math.random()"></forms>
+        <el-dialog width="500px" title="编辑" :visible.sync="innerVisible" append-to-body :close-on-click-modal="false"
+          @close="closeNested">
+          <forms ref="editRules" :formNewList="editRuleList" :ruleForm="editRuleForm" :iceBank="true" labelWidth="100px"
+            @handleScroll="handleScroll" @remoteMethod="remoteMethod" :key="Math.random()"></forms>
           <div slot="footer" class="dialog-footer">
+            <el-button @click="innerVisible = false">取消</el-button>
             <el-button type="primary" @click="submit">提交</el-button>
           </div>
         </el-dialog>
@@ -36,8 +39,8 @@
     <!-- 出入库 -->
     <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="600px" :close-on-click-modal="false"
       @close="closeDialog">
-      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" :iceBank="true" labelWidth="100px"
-        @handleScroll="handleScroll" @remoteMethod="remoteMethod" :key="Math.random()">
+      <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" :iceTracing="true" :iceBank="true"
+        labelWidth="100px" @handleScroll="handleScroll" @remoteMethod="remoteMethod">
       </forms>
       <span slot="footer" class="dialog-footer" v-if="operationType != 'logs'">
         <el-button plain @click="staffDialogVisible = false">取 消</el-button>
@@ -73,9 +76,6 @@
     freezerRules,
     editRules
   } from "./iceRaft.js";
-  import {
-    frozenState
-  } from '@/assets/js/blockSort'
   export default {
     name: 'IceManagement',
     components: {
@@ -101,13 +101,47 @@
         }, {
           type: 'select',
           label: '状态',
-          field: 'state',
+          field: 'status',
           placeholder: '请选择状态',
-          options: frozenState()
-        }],
+          options: [{
+            bgcolor: '#606266',
+            label: '未入库',
+            value: '0',
+          }, {
+            bgcolor: '#409EFF',
+            label: '冷冻中',
+            value: '1',
+          }, {
+            bgcolor: '#67C23A',
+            label: '待使用',
+            value: '2',
+          }, {
+            bgcolor: '#E6A23C',
+            label: '使用中',
+            value: '3',
+          }, {
+            bgcolor: '#909399',
+            label: '已结束',
+            value: '4',
+          }]
+        }, {
+          type: 'select',
+          label: '冷冻柜',
+          field: 'iceLockerId',
+          placeholder: '请选择冷冻柜',
+          options: []
+        }, {
+          type: 'select',
+          label: '保温箱',
+          field: 'coolerBoxId',
+          placeholder: '请选择保温箱',
+          options: []
+        }, ],
         searchRuleForm: {
           code: '',
-          state: '',
+          status: '',
+          iceLockerId: null,
+          coolerBoxId: null,
         },
         searchValue: {},
         tableList: employee(),
@@ -141,6 +175,7 @@
         page: 1,
         staffName: '',
         limitNo: true,
+        limitNoil: true,
         eventSource: null,
         timer: null, //定时器名称
         iceRaftId: null,
@@ -153,18 +188,20 @@
           inStorageTime: '',
           outStorageTime: '',
           freezeClaim: '',
+          iceLockerId: '',
+          coolerBoxId: '',
         },
         iceRaftCode: '',
         coldCupboard: {
           field: 'iceLockerId',
-          label: '冷柜',
-          placeholder: '请选择冷柜',
+          label: '冷柜',
+          placeholder: '请选择冷柜',
           type: 'searchSelect',
           colWidth: 24,
           multiple: false,
           rules: [{
             required: true,
-            message: '请选择冷柜',
+            message: '请选择冷柜',
             trigger: 'blur'
           }],
           options: [],
@@ -273,49 +310,81 @@
           this.formRuleList = freezerRules()
           this.thermostat.options = []
           this.formRuleList.unshift(this.thermostat)
-          this.limitNo = true
+          this.limitNoil = true
           this.getIncubator()
         }
         this.$forceUpdate()
       },
-      // 重置冷柜、保温箱
+      // 重置冷柜、保温箱
       resetSelect() {
         this.page = 1
         this.limitNo = true
+        this.limitNoil = true
         this.staffName = ''
       },
       // 触底事件
-      handleScroll() {
-        if (this.limitNo) {
-          if (this.operationType == 'come') {
+      handleScroll(type) {
+        if (this.operationType == 'come') {
+          if (this.limitNo) {
             this.getFreezer()
-          } else if (this.operationType == 'goOut') {
+          }
+        } else if (this.operationType == 'goOut') {
+          if (this.limitNoil) {
             this.getIncubator()
-          } else if (this.operationType == 'edit') {
-            if (this.deposit) {
+          }
+        } else if (this.operationType == 'edit') {
+          if (this.deposit) {
+            if (this.limitNo) {
               this.getFreezer()
-            } else {
+            }
+          } else {
+            if (this.limitNoil) {
               this.getIncubator()
             }
           }
+        } else {
+          if (type == 'iceLockerId' && this.limitNo) {
+            this.getFreezer()
+          } else if (type == 'coolerBoxId' && this.limitNoil) {
+            this.getIncubator()
+          }
         }
       },
       // 搜索
       remoteMethod(value) {
         this.resetSelect()
         this.staffName = value
-        if (this.operationType == 'come') {
-          this.getFreezer()
-        } else if (this.operationType == 'goOut') {
-          this.getIncubator()
+        if (this.operationType == 'edit') {
+          this.editRuleList.forEach(item => {
+            if (item.type == 'searchSelect') {
+              item.options = []
+            }
+          })
+          if (this.deposit) {
+            this.getFreezer()
+          } else {
+            this.getIncubator()
+          }
+        } else {
+          if (this.operationType == 'come') {
+            this.formRuleList.forEach(item => {
+              if (item.type == 'searchSelect') {
+                item.options = []
+              }
+            })
+            this.getFreezer()
+          } else if (this.operationType == 'goOut') {
+            this.getIncubator()
+          }
         }
       },
-      // 获取冷藏柜列表
+      // 获取冷柜列表
       getFreezer() {
         let arrList = []
         let params = {
           page: this.page,
           pageSize: 10,
+          status: '2',
           name: this.staffName,
         }
         getIcelocker(params).then(res => {
@@ -332,21 +401,27 @@
               arrList.push(arrData)
             })
             if (this.limitNo == true) {
-              if (this.operationType == 'come' || this.operationType == 'goOut') {
-                this.formRuleList.forEach(item => {
-                  if (item.type == 'searchSelect') {
-                    item.options = item.options.concat(arrList)
-                  }
-                })
-                console.log(this.formRuleList,22)
-              } else if (this.operationType == 'edit') {
-                this.editRuleList.forEach(item => {
-                  if (item.type == 'searchSelect') {
+              if (this.operationType != '') {
+                if (this.operationType == 'come' || this.operationType == 'goOut') {
+                  this.formRuleList.forEach(item => {
+                    if (item.type == 'searchSelect') {
+                      item.options = item.options.concat(arrList)
+                    }
+                  })
+                } else if (this.operationType == 'edit') {
+                  this.editRuleList.forEach(item => {
+                    if (item.type == 'searchSelect') {
+                      item.options = item.options.concat(arrList)
+                    }
+                  })
+                }
+              } else {
+                this.formList.forEach(item => {
+                  if (item.field == 'iceLockerId') {
                     item.options = item.options.concat(arrList)
                   }
                 })
               }
-              // this.coldCupboard.options = this.coldCupboard.options.concat(arrList)
             }
             if (arrList.length >= 10) {
               this.page = ++this.page;
@@ -363,6 +438,7 @@
         let params = {
           page: this.page,
           pageSize: 10,
+          status: '2',
           name: this.staffName,
         }
         getCoolerBox(params).then(res => {
@@ -378,16 +454,24 @@
               arrData.value = item1.id
               arrList.push(arrData)
             })
-            if (this.limitNo == true) {
-              if (this.operationType == 'come' || this.operationType == 'goOut') {
-                this.formRuleList.forEach(item => {
-                  if (item.type == 'searchSelect') {
-                    item.options = item.options.concat(arrList)
-                  }
-                })
-              } else if (this.operationType == 'edit') {
-                this.editRuleList.forEach(item => {
-                  if (item.type == 'searchSelect') {
+            if (this.limitNoil == true) {
+              if (this.operationType != '') {
+                if (this.operationType == 'come' || this.operationType == 'goOut') {
+                  this.formRuleList.forEach(item => {
+                    if (item.type == 'searchSelect') {
+                      item.options = item.options.concat(arrList)
+                    }
+                  })
+                } else if (this.operationType == 'edit') {
+                  this.editRuleList.forEach(item => {
+                    if (item.type == 'searchSelect') {
+                      item.options = item.options.concat(arrList)
+                    }
+                  })
+                }
+              } else {
+                this.formList.forEach(item => {
+                  if (item.field == 'coolerBoxId') {
                     item.options = item.options.concat(arrList)
                   }
                 })
@@ -398,7 +482,7 @@
               this.page = ++this.page;
             } else {
               // 已经没数据了 不需要增加数据
-              this.limitNo = false;
+              this.limitNoil = false;
             }
           }
         })
@@ -431,6 +515,7 @@
       // 历史记录操作
       historyButton(row, type) {
         this.operationType = type
+        this.limitNo = true
         if (type == 'edit') {
           this.innerVisible = true
           this.page = 1
@@ -439,21 +524,95 @@
             this.deposit = true
             this.getFreezer()
             this.editRuleList.push(this.coldCupboard)
+            // 冷冻柜
+            this.editRuleForm.iceLockerId = String(row.iceLockerId)
           } else {
             this.deposit = false
             this.getIncubator()
             this.editRuleList.push(this.thermostat)
+            // 保温箱
+            this.editRuleForm.coolerBoxId = String(row.coolerBoxId)
           }
+          this.editRuleForm.id = row.id
           this.editRuleForm.code = this.iceRaftCode
           this.editRuleForm.status = row.status
           this.editRuleForm.inStorageTime = row.inStorageTime
           this.editRuleForm.outStorageTime = row.outStorageTime
           this.editRuleForm.freezeClaim = row.freezeClaim
+          if (row.status == '3') {
+            this.editRuleList.forEach(item => {
+              if (item.field == 'freezeClaim') {
+                item.disabled = true
+              }
+            })
+          }
+        } else if (type == 'del') {
+          this.delHistory(row.id)
         }
       },
       // 编辑历史记录提交
       submit() {
-
+        let flag = this.$refs['editRules'].validateForm();
+        if (flag) {
+          this.$confirm('确定修改该冰排信息吗, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            let param = {
+              id: '',
+              iceLockerId: '',
+              coolerBoxId: '',
+              freezeClaim: '',
+            }
+            param.id = this.editRuleForm.id
+            param.iceLockerId = Number(this.editRuleForm.iceLockerId)
+            param.coolerBoxId = Number(this.editRuleForm.coolerBoxId)
+            param.freezeClaim = Number(this.editRuleForm.freezeClaim)
+            if (this.editRuleForm.outStorageTime == '') {
+              delete param.coolerBoxId
+            } else {
+              delete param.iceLockerId
+            }
+            putIceRaftRecord(param).then(res => {
+              if (res.code == 200) {
+                this.innerVisible = false
+                this.$message({
+                  type: 'success',
+                  message: res.msg
+                });
+                this.getHistory()
+              }
+            })
+          }).catch(() => {
+            // console.log('取消修改')
+          });
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
+      },
+      // 删除历史记录
+      delHistory(id) {
+        this.$confirm('确定删除该冰排信息吗, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          delIceRaftRecord({
+            id: id
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                message: '删除成功,请重新入库该冰排!',
+                type: 'warning'
+              });
+              this.getHistory()
+              this.getList()
+            }
+          })
+        }).catch(() => {
+          // console.log('已取消删除')
+        });
       },
       changeSize(val) {
         this.Pagination.PageSize = val
@@ -474,7 +633,18 @@
       },
       // 关闭历史记录
       closeHistory() {
+        this.historyPagination.PageIndex = 1
         this.historyVisible = false
+        this.getList()
+      },
+      // 嵌套弹窗
+      closeNested() {
+        this.staffName = ''
+        this.editRuleList.forEach(item => {
+          if (item.type == 'searchSelect') {
+            item.options = []
+          }
+        })
       },
       // 清空表单
       closeDialog() {

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

@@ -65,3 +65,30 @@ export const formRules = () => {
     options: iceraftStatus()
   }, ]
 }
+
+export const formRulesil = () => {
+  return [{
+    field: 'codeList',
+    label: '编号',
+    placeholder: '请输入编号',
+    type: 'scan',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入编号',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'status',
+    label: '状态',
+    placeholder: '状态',
+    type: 'radio',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '选择状态',
+      trigger: 'change'
+    }],
+    options: iceraftStatus()
+  }, ]
+}

+ 24 - 40
src/views/IceCreamFreezer/iceRaft.js

@@ -98,46 +98,30 @@ export const historyRecord = () => {
 }
 
 export const iceRaftRules = () => {
-  return [
-    //   {
-    //   field: 'iceLockerId',
-    //   label: '冷藏柜',
-    //   placeholder: '请选择冷藏柜',
-    //   type: 'searchSelect',
-    //   colWidth: 24,
-    //   multiple: false,
-    //   rules: [{
-    //     required: true,
-    //     message: '请选择冷藏柜',
-    //     trigger: 'blur'
-    //   }],
-    //   options: [],
-    // },
-    {
-      field: 'freezeClaim',
-      label: '冷冻要求',
-      placeholder: '请输入冷冻时间',
-      type: 'input',
-      colWidth: 24,
-      unit: '小时',
-      rules: [{
-        required: true,
-        message: '请输入冷冻时间',
-        trigger: 'blur'
-      }]
-    }, {
-      field: 'code',
-      label: '冰排编号',
-      placeholder: '请输入冰排编号',
-      type: 'scan',
-      colWidth: 24,
-      rules: [{
-        required: true,
-        message: '请输入冰排编号',
-        trigger: 'blur'
-      }]
-    }
-  ]
+  return [{
+    field: 'freezeClaim',
+    label: '冷冻要求',
+    placeholder: '请输入冷冻时间',
+    type: 'input',
+    colWidth: 24,
+    unit: '小时',
+    rules: [{
+      required: true,
+      message: '请输入冷冻时间',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'code',
+    label: '冰排编号',
+    placeholder: '请输入冰排编号',
+    type: 'scan',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入冰排编号',
+      trigger: 'blur'
+    }]
+  }]
 }
 
 export const freezerRules = () => {

+ 1 - 2
src/views/common/Base.vue

@@ -102,7 +102,6 @@
       },
       // 展开收起
       getUnpack(flag) {
-        console.log(flag, 999)
         if (flag) {
           this.iconFlag = false
           this.sideWidth = 200
@@ -124,7 +123,7 @@
   }
 
   ::v-deep .el-container {
-    height: calc(100vh - 60px);
+    height: calc(100vh - 1px);
   }
 
   .el-header {

+ 1 - 1
src/views/common/userInfo.vue

@@ -14,7 +14,7 @@
           <div class="el-dropdown-link">
             <el-image class="user_img" :src="require('@/assets/images/user.png')"></el-image>
           </div>
-          <span class="user_title">{{userList.username}}</span>
+          <span class="user_title">{{userList.nickName}}</span>
         </div>
         <el-dropdown-menu slot="dropdown">
           <el-dropdown-item command="loginout">退出登录</el-dropdown-item>

+ 7 - 3
src/views/newInquiry.vue

@@ -37,7 +37,7 @@
               <map-delivery ref="mapTracing1" :trackList="trackList" :waybillBasic="waybillBasic"
                 v-if="tabIndex == '2' && waybillBasic.status != 3"></map-delivery>
               <div class="card_logistics">
-                <div @click="clickImg">
+                <div class="center_in" @click="clickImg">
                   <el-image :class="logisticsFlag ? '' : 'overturn'" style="height: 29px;width: 40px;flex: none;"
                     :src="require('@/assets/images/unfold.png')"></el-image>
                 </div>
@@ -242,8 +242,10 @@
         let params = {
           waybillNo: this.waybillBasic.waybillNo,
           status: 3,
-          receiptImg: value,
+          receiptImg: value.images,
           rejectionReason: '',
+          assessStar: value.assessStar,
+          assessContent: value.assessContent,
         }
         const loading = this.$loading({
           lock: true,
@@ -273,6 +275,8 @@
           status: 4,
           receiptImg: value.images,
           rejectionReason: value.reason,
+          assessStar: value.assessStar,
+          assessContent: value.assessContent,
         }
         setTimeout(() => {
           this.$nextTick(() => {
@@ -411,7 +415,7 @@
   }
 
   .logistics_title {
-    font-size: 17px;
+    font-size: 16px;
     text-align: left;
     padding: 0px 20px 0px 20px;
   }

+ 315 - 15
src/views/page/Home.vue

@@ -47,7 +47,7 @@
       </div>
     </div>
     <div style="display: flex;flex-direction: column;flex: 1;">
-      <div class="card_head_statisticsil" v-if="userName != 'admin'">
+      <div class="card_head_statisticsil statistics_tendency" v-if="userName != 'admin'">
         <div class="card_time_select">
           <div style="display: flex;">
             <div :class="yearsType ? 'month_title' : 'year_title'" @click="switchover(true)">按月</div>
@@ -55,12 +55,12 @@
           </div>
           <div v-show="yearsType">
             <el-date-picker v-model="timeValue" value-format="yyyy-MM" type="month" placeholder="选择月" size="small"
-              @change="changeTime">
+              :picker-options="setDisabled" @change="changeTime">
             </el-date-picker>
           </div>
           <div v-show="!yearsType">
             <el-date-picker v-model="timeValue1" value-format="yyyy" type="year" placeholder="选择年" size="small"
-              @change="changeTime1">
+              :picker-options="setDisabled" @change="changeTime1">
             </el-date-picker>
           </div>
         </div>
@@ -68,10 +68,45 @@
           <div id="pie1" class="chart"></div>
         </div>
       </div>
-     <div style="flex: 1;">
-       <div>
-         <div></div>
-       </div>
+    </div>
+    <div style="flex: 1;">
+      <div class="card_head_statisticsil card_tendency">
+        <!-- <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"
+                @change="(val)=>{valueChange(val,item)}">{{item.nickName}}</el-checkbox>
+            </div>
+          </div> -->
+        <div class="tendency_chart_ial">
+          <div class="space_between_in">
+            <div class="card_radio">
+              <div class="radio_title" :class="tabPosition == 'reCheck'? 'selected_check' : ''"
+                @click="radioSelect(tabPosition)">复核人</div>
+              <div class="radio_title" :class="tabPosition == 'delivery'? 'selectedil_check' : ''"
+                @click="radioSelect(tabPosition)">配送员</div>
+            </div>
+            <!-- 时间 -->
+            <div class="card_time_select">
+              <div style="display: flex;">
+                <div :class="yearsTypeil ? 'month_title' : 'year_title'" @click="switchoveril(true)">按月</div>
+                <div :class="!yearsTypeil ? 'month_title' : 'year_title'" @click="switchoveril(false)">按年</div>
+              </div>
+              <div v-show="yearsTypeil">
+                <el-date-picker v-model="timeValueil" value-format="yyyy-MM" type="month" placeholder="选择月" size="small"
+                  :picker-options="setDisabled" @change="changeTimeil">
+                </el-date-picker>
+              </div>
+              <div v-show="!yearsTypeil">
+                <el-date-picker v-model="timeValueil1" value-format="yyyy" type="year" placeholder="选择年" size="small"
+                  :picker-options="setDisabled" @change="changeTimeil1">
+                </el-date-picker>
+              </div>
+            </div>
+          </div>
+          <div class="card_chart">
+            <div id="pie2"></div>
+          </div>
+        </div>
       </div>
     </div>
   </div>
@@ -79,12 +114,21 @@
 
 <script>
   import {
-    getWaybillHome
+    getUser
+  } from '@/api/user'
+  import {
+    getWaybillHome,
+    getUserStats
   } from '@/api/waybill'
   export default {
     name: 'HomeView',
     data() {
       return {
+        setDisabled: {
+          disabledDate(time) {
+            return time.getTime() > Date.now();
+          },
+        },
         list: [{
           color: '#F56C6C',
           title: '已下单',
@@ -109,13 +153,27 @@
         listData: {},
         textData: [],
         userName: '',
+        userList: {},
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        tableData: [],
+        Total: 0,
+        tabPosition: 'reCheck',
+
+        myChartil: null,
+        timeValueil: '',
+        timeValueil1: '',
+        yearsTypeil: true,
       }
     },
     mounted() {
-      const arr = localStorage.getItem('userData')
+      const arr = localStorage.getItem('userList')
       const arr1 = JSON.parse(arr)
+      this.userList = arr1
       if (arr1) {
-        this.userName = arr1.name
+        this.userName = arr1.username
       }
 
       function formatDate(date, type) {
@@ -135,9 +193,12 @@
       const yearTime = formatDate(new Date(), 'year')
       this.timeValue = monthTime
       this.timeValue1 = yearTime
+      this.timeValueil = monthTime
+      this.timeValueil1 = yearTime
       this.getList()
       if (this.userName != 'admin') {
         this.resizeChart()
+        this.getUserList()
       }
     },
     methods: {
@@ -173,6 +234,88 @@
           }
         })
       },
+      // 获取用户列表
+      getUserList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: 9999,
+          // pageSize: this.Pagination.PageSize,
+        }
+        getUser(params).then(res => {
+          if (res.code == 200) {
+            this.tableData = res.data.list
+            this.tableData.forEach(item => {
+              item.checked = false
+            })
+            this.Total = res.data.count
+            this.getUserStatsList()
+          }
+        })
+      },
+      // 获取用户统计
+      getUserStatsList() {
+        let params = {
+          date: '',
+          type: '',
+          userType: this.tabPosition,
+          userIds: [],
+        }
+        if (this.yearsTypeil) {
+          params.date = this.timeValueil
+          params.type = 'month'
+        } else {
+          params.date = this.timeValueil1
+          params.type = 'year'
+        }
+        getUserStats(params).then(res => {
+          if (res.code == 200) {
+            let arr = res.data
+            let arr1 = []
+            let nameList = []
+            let dateList = []
+            if (arr) {
+              arr.forEach(item => {
+                nameList.push(item.Name)
+                let arr2 = {
+                  name: item.Name,
+                  type: 'line',
+                  data: []
+                }
+                if (item.stats) {
+                  item.stats.forEach(item1 => {
+                    arr2.data.push(item1.num)
+                  })
+                  arr1.push(arr2)
+                }
+              })
+              if (arr[0].stats) {
+                arr[0].stats.forEach(item3 => {
+                  dateList.push(item3.date)
+                })
+              }
+            }
+            this.drawPie2(nameList, dateList, arr1)
+          }
+        })
+      },
+      // 选择
+      valueChange(value, event) {
+        this.tableData.forEach(item => {
+          if (item.id == event.id) {
+            item.checked = value
+          }
+        })
+        this.$forceUpdate()
+      },
+      // 选择配送人/复核人
+      radioSelect(type) {
+        if (type == 'reCheck') {
+          this.tabPosition = 'delivery'
+        } else {
+          this.tabPosition = 'reCheck'
+        }
+        this.getUserStatsList()
+      },
       // 选择月
       changeTime(value) {
         this.timeValue = value
@@ -183,19 +326,52 @@
         this.timeValue1 = value
         this.getList()
       },
+      // 选择月
+      changeTimeil(value) {
+        this.timeValueil = value
+        this.getUserStatsList()
+      },
+      // 选择年
+      changeTimeil1(value) {
+        this.timeValueil1 = value
+        this.getUserStatsList()
+      },
       resizeChart() {
         window.addEventListener("resize", () => {
           this.myChart.resize();
+          this.myChartil.resize()
         });
       },
+      // 订单统计
       switchover(value) {
         this.yearsType = value
         this.getList()
       },
+      // 用户运单统计
+      switchoveril(value) {
+        this.yearsTypeil = value
+        this.getUserStatsList()
+      },
       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: 26,
+            },
+            text: '暂无数据',
+            left: 'center',
+            top: 'center',
+          },
           tooltip: {
             trigger: 'axis',
           },
@@ -254,6 +430,65 @@
         };
         that.myChart.setOption(option);
       },
+      // 用户运单统计
+      drawPie2(nameList, dateList, arr1) {
+        let that = this
+        that.myChartil = that.$echarts.init(document.getElementById('pie2'))
+        let option = {
+          tooltip: {
+            trigger: 'axis',
+            formatter: function(params) {
+              var res = `${params[0].name} <br/>`
+              for (const item of params) {
+                if (item.value !== 0) {
+                  res +=
+                    `<span style="background: ${item.color}; height:10px; width: 10px; border-radius: 50%;display: inline-block;margin-right:10px;"></span> ${item.seriesName} :${item.value}<br/>`
+                }
+              }
+              return res
+            }
+          },
+          legend: {
+            top: '4%',
+            type: 'scroll',
+            orient: 'vertical',
+            left: 'left',
+            data: nameList,
+            selector: [{
+              type: 'all',
+              title: '全选'
+            }, {
+              type: 'inverse',
+              title: '反选'
+            }],
+            selectorLabel: {
+              color: '#000000',
+              align: 'center',
+              verticalAlign: 'middle',
+              borderColor: '#DCDFE6',
+              borderWidth: 1,
+              padding: [5, 10, 5, 10],
+            }
+          },
+          grid: {
+            top: '10%',
+            left: '10%',
+            right: '2%',
+            bottom: '0%',
+            containLabel: true
+          },
+          xAxis: {
+            type: 'category',
+            boundaryGap: false,
+            data: dateList
+          },
+          yAxis: {
+            type: 'value'
+          },
+          series: arr1
+        };
+        that.myChartil.setOption(option);
+      },
       // 使用手册
       goTickets() {
         window.open('https://kdocs.cn/l/ctKAOZ59Kdqn', "_blank")
@@ -261,7 +496,7 @@
     }
   }
 </script>
-<style>
+<style lang="scss" scoped>
   .home {
     display: flex;
     flex-direction: column;
@@ -332,14 +567,12 @@
     box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
     width: 100%;
     overflow: auto;
+    flex: none;
   }
 
   .card_head_statisticsil {
     position: relative;
-    display: flex;
-    flex-direction: column;
-    align-items: flex-end;
-    margin-top: 20px;
+    margin-top: 15px;
     background-color: #fff;
     border-radius: 10px;
     padding: 15px;
@@ -348,6 +581,23 @@
     flex: 1;
   }
 
+  .statistics_tendency {
+    display: flex;
+    flex-direction: column;
+    align-items: flex-end;
+  }
+
+  .card_tendency {
+    display: flex;
+    height: calc(100% - 45px);
+  }
+
+  .tendency_chart_ial {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+  }
+
   .card_left_waybill {
     display: flex;
     flex-direction: column;
@@ -466,4 +716,54 @@
     height: 100%;
     margin: auto;
   }
+
+  #pie2 {
+    width: 100%;
+    height: 100%;
+  }
+
+  .card_check {
+    margin-bottom: 6px;
+  }
+
+  .left_check {
+    padding-right: 10px;
+    border-right: 1px solid #DCDFE6;
+  }
+
+  .tendency_chart {
+    margin-left: 10px;
+    width: 100%;
+  }
+
+  .card_radio {
+    display: flex;
+    align-items: center;
+    border: 1px solid #DCDFE6;
+    border-radius: 4px;
+  }
+
+  .radio_title {
+    cursor: pointer;
+    font-size: 14px;
+    flex: 1;
+    padding: 6px 10px;
+    color: #606266;
+  }
+
+  .selected_check {
+    background-color: #409EFF;
+    color: #fff;
+    border-top-left-radius: 4px;
+    border-bottom-left-radius: 4px;
+    border: 1px solid #409EFF;
+  }
+
+  .selectedil_check {
+    background-color: #409EFF;
+    color: #fff;
+    border-top-right-radius: 4px;
+    border-bottom-right-radius: 4px;
+    border: 1px solid #409EFF;
+  }
 </style>

+ 12 - 4
src/views/system/IncubatorManagement.vue

@@ -73,7 +73,8 @@
     incubator
   } from "./incubator.js";
   import {
-    startStatus
+    startStatus,
+    iceraftStatus
   } from '@/assets/js/blockSort'
   export default {
     name: 'IncubatorManagement',
@@ -104,10 +105,17 @@
           label: 'SN',
           field: 'sn',
           placeholder: 'SN',
+        }, {
+          type: 'select',
+          label: '状态',
+          field: 'status',
+          placeholder: '请选择状态',
+          options: iceraftStatus(),
         }],
         searchRuleForm: {
           name: '',
           sn: '',
+          status: '',
         },
         searchValue: {},
         Pagination: {
@@ -124,7 +132,7 @@
         ruleForm: {
           name: '',
           sn: '',
-          status: '',
+          status: '2',
         },
         confirmLoading: false,
         selectingData: {},
@@ -150,7 +158,7 @@
           options: startStatus()
         }],
         stateRuleForm: {
-          status: '',
+          status: '2',
         },
         nameTitle: '',
         incubatorLoading: false,
@@ -327,7 +335,7 @@
       },
       // 删除公司
       deleteUser(id) {
-        this.$confirm('此操作将永久删除该车辆, 是否继续?', '提示', {
+        this.$confirm('此操作将永久删除该保温箱, 是否继续?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'

+ 40 - 6
src/views/system/WaybillManagement.vue

@@ -55,12 +55,12 @@
     </el-dialog>
     <el-dialog title="派单" :visible.sync="sendDialogVisible" width="500px" :close-on-click-modal="false"
       @close="closeDialog">
-      <forms ref="sendRules" :formNewList="sendRuleList" :ruleForm="sendRuleForm" labelWidth="80px"
-        @handleScroll="handleScroll" @remoteMethod="remoteMethod">
+      <forms ref="sendRules" :formNewList="sendRuleList" :ruleForm="sendRuleForm" :iceTracing="true" :iceBank="true"
+        labelWidth="80px" @handleScroll="handleScroll" @remoteMethod="remoteMethod" @changeOption="changeOption">
       </forms>
       <span slot="footer" class="dialog-footer">
         <el-button plain @click="sendDialogVisible = false">取 消</el-button>
-        <el-button type="primary" :loading="sendConfirmLoading" @click="sendHandleAdd">确 定</el-button>
+        <el-button type="primary" :loading="sendConfirmLoading" @click.stop="sendHandleAdd">确 定</el-button>
       </span>
     </el-dialog>
     <el-dialog title="签收" :visible.sync="signDialogVisible" width="500px" :close-on-click-modal="false"
@@ -110,7 +110,8 @@
     delAddress
   } from '@/api/address'
   import {
-    getCoolerBox
+    getCoolerBox,
+    getRaftCoolerBox
   } from '@/api/incubator.js'
   import {
     getUser
@@ -232,6 +233,7 @@
         sendDialogVisible: false,
         sendRuleList: sendList(),
         sendRuleForm: {
+          code: [],
           coolerBoxId: null,
         },
         sendConfirmLoading: false,
@@ -295,6 +297,9 @@
           if (res.code == 200) {
             this.tableData = res.data.list
             this.tableData.forEach(item => {
+              if (item.iceRaftCode) {
+                item.iceRaftCode = item.iceRaftCode.toString()
+              }
               item.visible = false
             })
             this.Total = res.data.count
@@ -383,7 +388,7 @@
         var params = {
           page: 1,
           pageSize: 999,
-          type: 3,
+          // type: 3,
           name: this.delivererName,
         }
         getUser(params).then(res => {
@@ -581,6 +586,10 @@
           this.$refs.order.staffDialogVisible = true
           this.waybillData = row
           this.waybillData.coolerBoxName = row.coolerBox.name
+          this.waybillData.courierName = row.delivery.nickName
+          this.waybillData.courierPhone = row.delivery.phone
+          this.waybillData.reCheckName = row.reCheck.nickName
+          this.waybillData.reCheckPhone = row.reCheck.phone
         } else if (type == 'edit') {
           this.conserveFlag = false
           this.staffTitle = '编辑'
@@ -639,6 +648,7 @@
           const param = {
             waybillIds: arrID,
             coolerBoxId: Number(this.sendRuleForm.coolerBoxId),
+            iceRaftCode: this.sendRuleForm.code,
           }
           waybillDelivery(param).then(res => {
             if (res.code == 200) {
@@ -647,8 +657,18 @@
                 type: 'success'
               });
               this.getList()
+              this.sendDialogVisible = false
+            } else if (res.code == 2000) {
+              let arrTitle = res.data
+              let title = ' ,请将冰排' + arrTitle.toString() + '重新入库'
+              this.$message({
+                showClose: true,
+                message: res.msg + title,
+                duration: 0,
+                type: 'warning'
+              });
+              this.sendDialogVisible = false
             }
-            this.sendDialogVisible = false
             this.sendConfirmLoading = false
           }).catch(() => {
             this.sendConfirmLoading = false
@@ -729,6 +749,7 @@
         let params = {
           page: this.page,
           pageSize: 10,
+          status: '2',
           name: this.staffName,
         }
         getCoolerBox(params).then(res => {
@@ -767,6 +788,19 @@
           }
         })
       },
+      // 获取搜索选择框数据
+      changeOption(id) {
+        getRaftCoolerBox({
+          coolerBoxId: id
+        }).then(res => {
+          if (res.code == 200) {
+            if (res.data) {
+              this.sendRuleForm.code = res.data
+              this.$refs.sendRules.inputsList = res.data
+            }
+          }
+        })
+      },
       // 选项赋值
       optionMatching(value, field) {
         this.sendRuleList.forEach((item, index) => {

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

@@ -194,9 +194,9 @@
         this.staffDialogVisible = true
         this.operationType = type
       },
-      // 删除用户
+      // 删除该地址
       deleteUser(id) {
-        this.$confirm('此操作将永久删除用户, 是否继续?', '提示', {
+        this.$confirm('此操作将永久删除该地址, 是否继续?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'

+ 19 - 9
src/views/system/waybill.js

@@ -76,35 +76,34 @@ export const employee = () => {
     align: 'center',
     colWidth: '180px',
   }, {
-    field: 'orderTime',
+    field: 'iceRaftCode',
     label: '冰排编号',
     align: 'center',
     colWidth: '180px',
   }, {
-    field: 'orderTime',
+    field: 'deliveryTime',
     label: '出发时间',
     align: 'center',
     colWidth: '180px',
   }, {
-    field: 'orderTime',
+    field: 'receiptTime',
     label: '签收时间',
     align: 'center',
     colWidth: '180px',
   }, {
-    field: 'orderTime',
+    field: 'deliveryDuration',
     label: '配送耗时',
     align: 'center',
     colWidth: '180px',
   }, {
-    field: 'orderTime',
+    field: 'assessStar',
     label: '服务评价',
     align: 'center',
-    colWidth: '180px',
+    colWidth: '220px',
   }, {
-    field: 'orderTime',
+    field: 'remark',
     label: '备注',
     align: 'center',
-    colWidth: '180px',
   }, {
     field: 'unpackBtn',
     label: '操作',
@@ -200,6 +199,17 @@ export const sendList = () => {
       trigger: 'blur,change'
     }],
     options: [],
+  }, {
+    field: 'code',
+    label: '冰排编号',
+    placeholder: '请输入冰排编号',
+    type: 'scan',
+    colWidth: 24,
+    rules: [{
+      required: true,
+      message: '请输入冰排编号',
+      trigger: 'blur'
+    }]
   }]
 }
 export const consignmentList = () => {
@@ -216,7 +226,7 @@ export const consignmentList = () => {
       trigger: 'blur,change'
     }],
     options: [],
-  },{
+  }, {
     field: 'deliveryId',
     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: {