Selaa lähdekoodia

订单管理、订单审核

unknown 1 kuukausi sitten
vanhempi
commit
8de448d557

+ 24 - 0
src/api/waybill.js

@@ -25,6 +25,22 @@ export function addWaybill(parameter) {
   })
 }
 
+// 修改订单状态
+export function putUpdateStatus(parameter) {
+  return request({
+    url: '/api/waybill/update-status',
+    method: 'put',
+    data: parameter
+  })
+}
+// 审核订单
+export function auditWaybill(parameter) {
+  return request({
+    url: '/api/waybill/audit',
+    method: 'put',
+    data: parameter
+  })
+}
 // 编辑运单
 export function putWaybill(parameter) {
   return request({
@@ -33,6 +49,14 @@ export function putWaybill(parameter) {
     data: parameter
   })
 }
+// 审核订单
+export function putAdminaudit(parameter) {
+  return request({
+    url: '/api/waybill/adminaudit',
+    method: 'put',
+    data: parameter
+  })
+}
 
 // 删除运单
 export function delWaybill(parameter) {

+ 107 - 100
src/assets/js/blockSort.js

@@ -1,126 +1,133 @@
 export const orderStatus = () => {
   return [{
-      label: '管理员',
-      value: 1,
-    }, {
-      label: '门店管理员',
-      value: 2,
-    },
-    {
-      label: '配送员',
-      value: 3,
-    }
-  ]
+    label: '管理员',
+    value: 1,
+  }, {
+    label: '门店管理员',
+    value: 2,
+  }, {
+    label: '配送员',
+    value: 3,
+  }, {
+    label: '销售员',
+    value: 4,
+  }]
 }
 
 export const WaybillStatus = () => {
   return [{
-      bgcolor: '#409EFF',
-      label: '已下单',
-      value: 1,
-    },
-    {
-      bgcolor: '#409EFF',
-      label: '配送中',
-      value: 2,
-    },
-    {
-      bgcolor: '#67C23A',
-      label: '已送达',
-      value: 3,
-    },
-    {
-      bgcolor: '#F56C6C',
-      label: '已拒收',
-      value: 4,
-    },
-  ]
+    bgcolor: '#E6A23C',
+    label: '未确定',
+    value: 1,
+  }, {
+    bgcolor: '#E6A23C',
+    label: '待审核',
+    value: 2,
+  }, {
+    bgcolor: '#E6A23C',
+    label: '待配送',
+    value: 3,
+  }, {
+    bgcolor: '#409EFF',
+    label: '配送中',
+    value: 4,
+  }, {
+    bgcolor: '#67C23A',
+    label: '已完成',
+    value: 5,
+  }, {
+    bgcolor: '#F56C6C',
+    label: '已取消',
+    value: 6,
+  }, {
+    bgcolor: '#F56C6C',
+    label: '已驳回',
+    value: 7,
+  }]
 }
 export const myOrder = () => {
   return [{
-      bgcolor: '#F56C6C',
-      label: '未发货',
-      value: [1, 2, 3],
-    },
-    {
-      bgcolor: '#409EFF',
-      label: '已发货',
-      value: [4, 5, 6, 7],
-    },
-    {
-      bgcolor: '#67C23A',
-      label: '已签收',
-      value: 8,
-    }
-  ]
+    bgcolor: '#F56C6C',
+    label: '未发货',
+    value: [1, 2, 3],
+  }, {
+    bgcolor: '#409EFF',
+    label: '已发货',
+    value: [4, 5, 6, 7],
+  }, {
+    bgcolor: '#67C23A',
+    label: '已签收',
+    value: 8,
+  }]
 }
 
 export const startStatus = () => {
   return [{
-      bgcolor: '#409EFF',
-      label: '正常',
-      value: '2',
-    },
-    {
-      bgcolor: '#F56C6C',
-      label: '停用',
-      value: '1',
-    }
-  ]
+    bgcolor: '#409EFF',
+    label: '正常',
+    value: '2',
+  }, {
+    bgcolor: '#F56C6C',
+    label: '停用',
+    value: '1',
+  }]
 }
 
 export const iceraftStatus = () => {
   return [{
-      bgcolor: '#409EFF',
-      label: '正常',
-      value: '2',
-    },
-    {
-      bgcolor: '#F56C6C',
-      label: '停用',
-      value: '1',
-    }
-  ]
+    bgcolor: '#409EFF',
+    label: '正常',
+    value: '2',
+  }, {
+    bgcolor: '#F56C6C',
+    label: '停用',
+    value: '1',
+  }]
+}
+export const allocationState = () => {
+  return [{
+    bgcolor: '#F56C6C',
+    label: '待分配',
+    value: 1,
+  }, {
+    bgcolor: '#19be6b',
+    label: '已分配',
+    value: 2,
+  }]
 }
 
 export const userType = () => {
   return [{
-      bgcolor: '#409EFF',
-      label: '发货人',
-      value: 'sender',
-    },
-    {
-      bgcolor: '#19be6b',
-      label: '收件人',
-      value: 'consignee',
-    }
-  ]
+    bgcolor: '#409EFF',
+    label: '发货人',
+    value: 'sender',
+  }, {
+    bgcolor: '#19be6b',
+    label: '收件人',
+    value: 'consignee',
+  }]
 }
 
 export const frozenState = () => {
   return [{
-      bgcolor: '#606266',
-      label: '未入库',
-      value: '',
-    },{
-      bgcolor: '#409EFF',
-      label: '冷冻中',
-      value: '1',
-    },
-    {
-      bgcolor: '#67C23A',
-      label: '待使用',
-      value: '2',
-    },
-    {
-      bgcolor: '#E6A23C',
-      label: '使用中',
-      value: '3',
-    },
-    {
-      bgcolor: '#909399',
-      label: '已结束',
-      value: '4',
-    }
-  ]
+    bgcolor: '#606266',
+    label: '未入库',
+    value: '',
+  }, {
+    bgcolor: '#409EFF',
+    label: '冷冻中',
+    value: '1',
+  }, {
+    bgcolor: '#67C23A',
+    label: '待使用',
+    value: '2',
+  }, {
+    bgcolor: '#E6A23C',
+    label: '使用中',
+    value: '3',
+  }, {
+    bgcolor: '#909399',
+    label: '已结束',
+    value: '4',
+  }]
 }

+ 8 - 0
src/components/MapTrajectory.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 171 - 0
src/components/centerControl.vue

@@ -0,0 +1,171 @@
+<template>
+  <!-- 中控大屏 -->
+  <div class="center_control">
+    <el-dialog title="提示" :visible.sync="controlVisible" :show-close="false" fullscreen>
+      <template slot="title">
+        <div class="head_control">
+          <div class="fun_btn">
+            <div>实时监控</div>
+            <div>历史轨迹</div>
+          </div>
+          <div class="fun_btn">
+            <i class="el-icon-full-screen icon_fun"></i>
+            <i class="el-icon-switch-button icon_fun" @click="close"></i>
+          </div>
+        </div>
+      </template>
+      <div class="card_control">
+        <div class="map_card">
+          <div id="container"></div>
+        </div>
+        <div class="card_bottom_control"></div>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'centerControl',
+    components: {},
+    data() {
+      return {
+        controlVisible: false,
+        map: null,
+      }
+    },
+    mounted() {
+      // this.keyUpSearch()
+    },
+    methods: {
+      close() {
+        this.controlVisible = false
+      },
+      keyUpSearch() {
+        var that = this
+        // var positions = this.trackList;
+        that.map = new AMap.Map("container", {
+          resizeEnable: true,
+          zoom: 14,
+          center: [106.638415, 26.652217],
+        });
+        AMap.service(["AMap.PlaceSearch"], function() {
+          var placeSearch = new AMap.PlaceSearch({ //构造地点查询类
+            map: that.map,
+            panel: "result",
+            autoFitView: true
+          });
+        })
+        that.map.setFitView()
+      },
+      destroyMap() {
+        this.map && this.map.destroy();
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .center_control ::v-deep .el-dialog__header {
+    padding: 0px !important;
+  }
+
+  .center_control ::v-deep .el-dialog__body {
+    padding: 0px !important;
+  }
+
+  #container {
+    position: relative;
+    width: 100%;
+    height: 100%;
+  }
+
+  .head_control {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    height: 80px;
+    padding: 0px 20px;
+  }
+
+  .fun_btn {
+    display: flex;
+    align-items: center;
+  }
+
+  .icon_fun {
+    cursor: pointer;
+    font-size: 30px;
+    margin-left: 10px;
+  }
+
+  .card_control {
+    position: absolute;
+    width: 100%;
+    height: calc(100% - 80px);
+    display: flex;
+    flex-direction: column;
+  }
+
+  .map_card {
+    width: 100%;
+    height: 100%;
+    flex: 1;
+  }
+
+  .card_bottom_control {
+    height: 300px;
+    background-color: #409eff;
+  }
+
+  .bubble-container {
+      position: relative;
+      width: 100%;
+      height: 100%;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      color: #fff;
+      text-align: center;
+      z-index: 1; /* Ensure content is above bubbles */
+  }
+
+  .bubble-container::before,
+  .bubble-container::after {
+      content: '';
+      position: absolute;
+      top: 0;
+      left: 0;
+      width: 100%;
+      height: 100%;
+      background: transparent;
+      pointer-events: none;
+      z-index: -1; /* Place bubbles behind content */
+  }
+
+  .bubble-container::before {
+      animation: bubble-animation 5s infinite linear;
+  }
+
+  .bubble-container::after {
+      animation: bubble-animation 7s infinite linear;
+  }
+
+  @keyframes bubble-animation {
+      0% {
+          background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
+          background-size: 100% 100%;
+          background-position: 0% 100%;
+      }
+      50% {
+          background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
+          background-size: 200% 200%;
+          background-position: 100% -100%;
+      }
+      100% {
+          background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
+          background-size: 100% 100%;
+          background-position: 0% 100%;
+      }
+  }
+</style>

+ 12 - 0
src/components/forms.vue

@@ -30,6 +30,8 @@
               </div>
             </div>
           </el-form-item>
+          <div v-if="formIceTracing && item.type === 'scan'"
+            :style="{height:scanHeight(inputsList.length),width:'100%'}"></div>
           <el-form-item :label-width="item.labelWidth" :label="item.label" :prop="item.field"
             :rules="detail ? item.rules : {}" v-if="item.type === 'textarea'">
             <el-input :maxlength="item.maxLenght" type="textarea" :rows="item.rowsHeight" :disabled="item.disabled"
@@ -326,6 +328,7 @@
           }
           loading.close();
         }).catch(e => {
+          console.log(e, 23)
           loading.close();
           this.$message.error('上传失败');
         })
@@ -446,6 +449,15 @@
           this.$refs.organizerUnit[0].dropDownVisible = false
         }
       },
+      scanHeight(num) {
+        let arr = '0px'
+        if (num < 4) {
+          arr = num * 45 + 'px'
+        } else {
+          arr = 3 * 45 + 'px'
+        }
+        return arr
+      },
       //子组件校验,传递到父组件
       validateForm() {
         let flag = null

+ 49 - 13
src/components/orderDetails.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 订单详情 -->
-  <div>
-    <el-dialog title="订单详情" :visible.sync="staffDialogVisible" width="60%" :close-on-click-modal="false">
+  <div class="order_details_dialog">
+    <el-dialog top="5vh" 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">
@@ -10,7 +10,22 @@
                 {{item.title}} <span class="order_look" @click="goLook">查看物流详情</span>
               </div>
               <div v-else-if="item.field == 'deliveryDuration'">
-                {{item.title}}{{formatMinutes(waybillData[`${item.field}`])}}</div>
+                {{item.title}}{{formatMinutes(waybillData[`${item.field}`])}}
+              </div>
+              <div style="width: 100%;" v-else-if="item.field == 'divider'">
+                <el-divider>{{item.title}}</el-divider>
+                <el-table :data="tableData" stripe style="width: 100%">
+                  <el-table-column align="center" prop="date" label="商品名称"></el-table-column>
+                  <el-table-column align="center" prop="name" label="商品数量"></el-table-column>
+                  <el-table-column align="center" prop="address" label="药品图片" width="180">
+                    <el-image style="width: 50px; height: 50px" :preview-src-list="['https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg']"
+                      src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"></el-image>
+                  </el-table-column>
+                  <el-table-column align="center" prop="name" label="商品规格"></el-table-column>
+                  <el-table-column align="center" prop="name" label="生产厂家"></el-table-column>
+                  <el-table-column align="center" prop="name" label="是否双通道药品" width="140"></el-table-column>
+                </el-table>
+              </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;"
@@ -68,12 +83,25 @@
     },
     data() {
       return {
+        tableData: [{
+          date: '2016-05-02',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1518 弄'
+        }, {
+          date: '2016-05-04',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1517 弄'
+        }, {
+          date: '2016-05-01',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1519 弄'
+        }],
         staffDialogVisible: false,
         list: [{
           title: '运单号:',
           field: 'waybillNo',
           colWidth: 8,
-        },{
+        }, {
           title: '订单号:',
           field: 'orderNo',
           colWidth: 8,
@@ -108,17 +136,17 @@
         }, {
           title: '复核人电话:',
           field: 'reCheckPhone',
-          colWidth: 16,
+          colWidth: 8,
         }, {
           title: '下单时间:',
           field: 'orderTime',
           colWidth: 8,
         }, {
-          title: '出发时间:',
-          field: 'deliveryTime',
-          colWidth: 8,
+          title: '订购商品信息',
+          field: 'divider',
+          colWidth: 24,
         }, {
-          title: '签收时间:',
+          title: '出发时间:',
           field: 'deliveryTime',
           colWidth: 8,
         }, {
@@ -134,16 +162,24 @@
           field: 'deliveryDuration',
           colWidth: 8,
         }, {
-          title: '服务评价:',
-          field: 'assessContent',
-          colWidth: 24,
+          title: '签收时间:',
+          field: 'deliveryTime',
+          colWidth: 8,
         }, {
           title: '防拆标签码:',
           field: 'tamperProofLabel',
-          colWidth: 24,
+          colWidth: 8,
         }, {
           title: '防拆标签图片:',
           field: 'tamperProofLabelImg',
+          colWidth: 8,
+        }, {
+          title: '签收图片:',
+          field: 'tamperProofLabelImg',
+          colWidth: 16,
+        }, {
+          title: '服务评价:',
+          field: 'assessContent',
           colWidth: 24,
         }, {
           title: '备注:',

+ 30 - 11
src/components/tables.vue

@@ -56,6 +56,12 @@
             </el-table-column>
           </template>
         </el-table-column>
+        <el-table-column :label="item.label" align="center" v-else-if="item.field == 'receiptImg'">
+          <template slot-scope="scope">
+            <el-image style="width: 60px; height: 60px" :src="scope.row[item.field]"
+              :preview-src-list="getImage(scope.row[item.field])"></el-image>
+          </template>
+        </el-table-column>
         <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
           v-else-if="['provUser.isorders','provUser.userType','customer.type','tbFillData.productMediaId','iceRaftRecord.status'].includes(item.field)">
           <template slot-scope="scope">
@@ -65,7 +71,7 @@
           </template>
         </el-table-column>
         <el-table-column :prop="item.field" :label="item.label" :width="item.colWidth" :align="item.align"
-          v-else-if="['userId', 'type', 'status', 'storeId', 'personCode', 'optType', 'corrosion', 'crackle', 'deform', 'damage', 'safeAnnex', 'gasPressure', 'bodyDeform', 'fillingLeak', 'bodyTemperature', 'filledLeak', 'warnSign', 'fillLabel', 'seal','addressType'].includes(item.field)">
+          v-else-if="['userId','assignmentStatus', 'type', 'status', 'storeId', 'personCode', 'optType', 'corrosion', 'crackle', 'deform', 'damage', 'safeAnnex', 'gasPressure', 'bodyDeform', 'fillingLeak', 'bodyTemperature', 'filledLeak', 'warnSign', 'fillLabel', 'seal','addressType'].includes(item.field)">
           <template slot-scope="scope">
             <div :style="{color: filterColor(scope.row,item.options,item.field)}">
               {{initDictvalueil(scope.row,item.options,item.field)}}
@@ -153,6 +159,9 @@
 
 <script>
   import {
+    putUpdateStatus
+  } from '@/api/waybill'
+  import {
     orderStatus,
     rectificationState
   } from '@/assets/js/blockSort'
@@ -229,6 +238,11 @@
       }
     },
     methods: {
+      getImage(image) {
+        let arr = []
+        arr.push(image)
+        return arr
+      },
       // 文字匹配
       initDictvalue(value, list, type) {
         let propertyName = type.split(".")
@@ -364,23 +378,28 @@
       // 操作按钮
       buttonData(row, type) {
         // console.log(row, type, '操作按钮')
-        if (type == 'delOrder') {
-          this.deleteOrder()
-        } else {
-          this.$emit("buttonData", row, type);
-        }
+        this.$emit("buttonData", row, type);
       },
       // 删除订单
-      deleteOrder() {
+      deleteOrder(row) {
         this.$confirm('此操作将永久删除该订单, 是否继续?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          this.$message({
-            message: '操作成功',
-            type: 'success'
-          });
+          let arrOrderId = []
+          arrOrderId.push(row.id)
+          putUpdateStatus({
+            id: arrOrderId,
+            status: 8,
+          }).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                message: '操作成功',
+                type: 'success'
+              });
+            }
+          })
         }).catch(() => {})
       },
       // 清空选中项

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

@@ -90,7 +90,7 @@ const rootRouter = {
       name: 'addressBook',
       meta: {
         icon: 'icon-cangku',
-        title: '地址薄管理'
+        title: '患者薄管理'
       },
       component: () => import('@/views/system/addressBook'),
     }, {
@@ -191,7 +191,31 @@ const rootRouter = {
           title: '已取消订单'
         },
         component: () => import('@/views/OrderManagement/cancelledOrder.vue'),
+      }, {
+        path: 'rejectionOrder',
+        name: 'rejectionOrder',
+        meta: {
+          icon: 'icon-yiquxiaodingdan',
+          title: '已拒收订单'
+        },
+        component: () => import('@/views/OrderManagement/rejectionOrder.vue'),
       }, ]
+    }, {
+      path: '/OrderReview',
+      name: 'OrderReview',
+      meta: {
+        icon: 'icon-yundanguanli',
+        title: '订单审核'
+      },
+      component: () => import('@/views/OrderManagement/OrderReview'),
+    }, {
+      path: '/statisticalManagement',
+      name: 'statisticalManagement',
+      meta: {
+        icon: 'icon-yundanguanli',
+        title: '统计分析管理'
+      },
+      component: () => import('@/views/page/statisticalManagement'),
     },
     // {
     //   path: '/WaybillManagement',

+ 1 - 1
src/store/modules/user.js

@@ -41,7 +41,7 @@ const user = {
             // commit会触发mutations,存储token
             commit('SET_TOKEN', data.token)
             localStorage.setItem('T_tokey', data.token);
-            resolve()
+            resolve(data)
           } else {
             reject(data)
           }

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

@@ -15,7 +15,7 @@
     </div>
     <!-- 历史记录 -->
     <div class="card_history">
-      <el-dialog title="历史记录" :visible.sync="historyVisible" width="90%" :close-on-click-modal="false"
+      <el-dialog top="5vh" title="历史记录" :visible.sync="historyVisible" width="90%" :close-on-click-modal="false"
         @close="closeHistory">
         <tables :historyFlag="true" :tableList="historyList" :tableData="historyData" @buttonData="historyButton">
         </tables>
@@ -663,7 +663,4 @@
 </script>
 
 <style lang="scss" scoped>
-  .card_history ::v-deep .el-dialog {
-    margin-top: 5vh !important;
-  }
 </style>

+ 238 - 0
src/views/OrderManagement/OrderReview.vue

@@ -0,0 +1,238 @@
+<template>
+  <!-- 订单审核 -->
+  <div>
+    <div ref="grabble">
+      <actionBar :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
+        @searchProtocol="searchProtocol"></actionBar>
+    </div>
+    <div class="card_content">
+      <!-- 表单 -->
+      <tables ref="refWaybill" controlswidth="190px" tableHeight="68vh" :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>
+    <orderDetails ref="order" :waybillData="waybillData"></orderDetails>
+    <prescriptionPicture ref="picture" :srcList="srcList" :fileList="fileList"></prescriptionPicture>
+    <el-dialog title="审核" :visible.sync="signDialogVisible" width="500px" :close-on-click-modal="false"
+      @close="closeDialog1">
+      <forms ref="signRules" :formNewList="signRuleList" :ruleForm="signRuleForm" labelWidth="80px">
+      </forms>
+      <span slot="footer" class="dialog-footer">
+        <el-button plain @click="signDialogVisible = false">取 消</el-button>
+        <el-button type="primary" :loading="signConfirmLoading" @click="signHandleAdd">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    getWaybill,
+    putAdminaudit
+  } from '@/api/waybill'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import orderDetails from '@/components/orderDetails'
+  import prescriptionPicture from '@/components/prescriptionPicture'
+  import forms from '@/components/forms'
+  import {
+    employee,
+    auditList
+  } from "./ordered.js";
+  import {
+    WaybillStatus
+  } from '@/assets/js/blockSort'
+  import {
+    NULL
+  } from 'sass'
+  export default {
+    name: 'OrderManagement',
+    components: {
+      actionBar,
+      tables,
+      forms,
+      pagination,
+      orderDetails,
+      prescriptionPicture
+    },
+    data() {
+      return {
+        formList: [{
+          type: 'input',
+          label: '订单编号',
+          field: 'waybillNo',
+          placeholder: '请输入订单编号',
+        }, {
+          type: 'input',
+          label: '门店名称',
+          field: 'orderNo',
+          placeholder: '请输入门店名称',
+        }, {
+          type: 'input',
+          label: '配送员姓名',
+          field: 'orderNo',
+          placeholder: '请输入配送员姓名',
+        }, {
+          type: 'input',
+          label: '患者名称',
+          field: 'orderNo',
+          placeholder: '请输入患者名称',
+        }, {
+          type: 'input',
+          label: '患者手机号',
+          field: 'orderNo',
+          placeholder: '请输入患者手机号',
+        }],
+        searchRuleForm: {
+          orderNo: '',
+          status: null,
+          time: [],
+        },
+        searchValue: {},
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        Total: 0,
+        operationType: '',
+        tableData: [],
+        tableList: [],
+        btnData: [{
+          type: 'logs',
+          label: '详情',
+          icon: 'el-icon-tickets',
+          style: 'success',
+        }, {
+          type: 'audit',
+          label: '审核订单',
+          icon: 'el-icon-share',
+          style: 'warning',
+        }],
+        waybillData: {},
+        srcList: [],
+        fileList: [{
+          name: 'food.jpeg',
+          url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
+        }, {
+          name: 'food2.jpeg',
+          url: 'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg'
+        }],
+        signDialogVisible: false,
+        signRuleList: auditList(),
+        signRuleForm: {
+          admin_audit_remark: '',
+        },
+        signConfirmLoading: false,
+        waybillNo: null,
+        orderId: null,
+      }
+    },
+    mounted() {
+      let arr = employee()
+      arr.forEach(item => {
+        if (item.field == 'unpackBtn') {
+          item.labelButton = this.btnData
+        }
+      })
+      this.tableList = arr
+      this.getList()
+    },
+    methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.Pagination.PageIndex = 1
+        this.searchValue = value
+        if (value.time) {
+          this.searchValue.orderStartTime = value.time[0]
+          this.searchValue.orderEndTime = value.time[1]
+        }
+        this.getList()
+      },
+      // 获取运单列表
+      getList() {
+        var params = {
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        delete params.time
+        getWaybill(params).then(res => {
+          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
+          }
+        })
+      },
+      // 审核
+      signHandleAdd() {
+        let flag = this.$refs['signRules'].validateForm();
+        if (flag) {
+          this.signConfirmLoading = true
+          let params = {
+            id: this.orderId,
+            ...this.signRuleForm,
+          }
+          putAdminaudit(params).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                message: '操作成功',
+                type: 'success'
+              });
+              this.signDialogVisible = false
+            }
+            this.signConfirmLoading = false
+          })
+        } else {
+          this.$message.error('表单信息不完整,请继续填写完整');
+        }
+      },
+      openModel(type) {
+        this.operationType = type
+      },
+      buttonData(row, type) {
+        this.operationType = type
+        this.orderId = row.id
+        if (type == 'logs') {
+          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 == 'audit') {
+          this.signDialogVisible = true
+          this.waybillNo = row.waybillNo
+        }
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+      // 清空表单
+      closeDialog1() {
+        this.$refs.signRules.resetCheck();
+      },
+    },
+  }
+</script>
+
+<style>
+</style>

+ 33 - 10
src/views/OrderManagement/cancelledOrder.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 已取消订单 -->
+  <!-- 已取消订单status: 8, -->
   <div>
     <div ref="grabble">
       <actionBar :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
@@ -23,6 +23,9 @@
 </template>
 
 <script>
+  import {
+    getWaybill
+  } from '@/api/waybill'
   import actionBar from '@/components/actionBar'
   import tables from '@/components/tables'
   import pagination from '@/components/pagination'
@@ -70,12 +73,6 @@
           label: '患者手机号',
           field: 'orderNo',
           placeholder: '请输入患者手机号',
-        }, {
-          type: 'select',
-          label: '分配状态',
-          field: 'status',
-          placeholder: '请选择分配状态',
-          options: WaybillStatus(),
         }],
         searchRuleForm: {
           orderNo: '',
@@ -89,9 +86,7 @@
         },
         Total: 0,
         operationType: '',
-        tableData: [{
-          waybillNo: '252512',
-        }],
+        tableData: [],
         tableList: [],
         btnData: [{
           type: 'logs',
@@ -123,6 +118,7 @@
         }
       })
       this.tableList = arr
+      this.getList()
     },
     methods: {
       // 搜索
@@ -135,6 +131,28 @@
         }
         this.getList()
       },
+      // 获取运单列表
+      getList() {
+        var params = {
+          status: 8,
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        delete params.time
+        getWaybill(params).then(res => {
+          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
+          }
+        })
+      },
       openModel(type) {
         this.operationType = type
       },
@@ -143,6 +161,11 @@
         if (type == 'logs') {
           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 == 'send') {
           const urls = this.fileList.map(obj => obj.url)
           this.srcList = urls

+ 2 - 7
src/views/OrderManagement/completed.js

@@ -101,11 +101,6 @@ export const employee = () => {
     align: 'center',
     colWidth: '180px',
   }, {
-    field: 'deliveryDuration',
-    label: '分配状态',
-    align: 'center',
-    colWidth: '180px',
-  }, {
     field: 'receiptTime',
     label: '分配时间',
     align: 'center',
@@ -126,8 +121,8 @@ export const employee = () => {
     align: 'center',
     colWidth: '220px',
   }, {
-    field: 'remark',
-    label: '订单备注',
+    field: 'admin_audit_remark',
+    label: '审核备注',
     align: 'center',
   }, {
     field: 'unpackBtn',

+ 33 - 10
src/views/OrderManagement/completedOrder.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 已完成订单 -->
+  <!-- 已完成订单status: 5, -->
   <div>
     <div ref="grabble">
       <actionBar :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
@@ -23,6 +23,9 @@
 </template>
 
 <script>
+  import {
+    getWaybill
+  } from '@/api/waybill'
   import actionBar from '@/components/actionBar'
   import tables from '@/components/tables'
   import pagination from '@/components/pagination'
@@ -70,12 +73,6 @@
           label: '患者手机号',
           field: 'orderNo',
           placeholder: '请输入患者手机号',
-        }, {
-          type: 'select',
-          label: '分配状态',
-          field: 'status',
-          placeholder: '请选择分配状态',
-          options: WaybillStatus(),
         }],
         searchRuleForm: {
           orderNo: '',
@@ -89,9 +86,7 @@
         },
         Total: 0,
         operationType: '',
-        tableData: [{
-          waybillNo: '252512',
-        }],
+        tableData: [],
         tableList: [],
         btnData: [{
           type: 'logs',
@@ -123,6 +118,7 @@
         }
       })
       this.tableList = arr
+      this.getList()
     },
     methods: {
       // 搜索
@@ -135,6 +131,28 @@
         }
         this.getList()
       },
+      // 获取运单列表
+      getList() {
+        var params = {
+          status: 5,
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        delete params.time
+        getWaybill(params).then(res => {
+          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
+          }
+        })
+      },
       openModel(type) {
         this.operationType = type
       },
@@ -144,6 +162,11 @@
         if (type == 'logs') {
           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 == 'send') {
           const urls = this.fileList.map(obj => obj.url)
           this.srcList = urls

+ 177 - 0
src/views/OrderManagement/delivered.js

@@ -0,0 +1,177 @@
+import {
+  startStatus,
+  allocationState
+} from '@/assets/js/blockSort'
+export const employee = () => {
+  return [{
+    field: 'selection',
+    label: '多选',
+    align: 'center',
+  }, {
+    field: 'waybillNo',
+    label: '运单号',
+    align: 'center',
+    colWidth: '180px',
+  }, {
+    field: 'orderNo',
+    label: '订单号',
+    align: 'center',
+    colWidth: '180px',
+  }, {
+    field: 'name',
+    label: '门店名称',
+    align: 'center',
+    colWidth: '180px',
+  }, {
+    field: 'assignmentStatus',
+    label: '分配状态',
+    align: 'center',
+    options: allocationState(),
+    colWidth: '130px',
+  }, {
+    field: 'type',
+    label: '配送类型',
+    align: 'center',
+    colWidth: '130px',
+  }, {
+    field: 'multistage',
+    label: '复核人',
+    children: [{
+      field: 'reCheck.nickName',
+      label: '姓名',
+      align: 'center',
+      colWidth: '120px',
+    }, {
+      field: 'reCheck.phone',
+      label: '电话',
+      align: 'center',
+      colWidth: '140px',
+    }, ]
+  }, {
+    field: 'multistage',
+    label: '配送人',
+    children: [{
+      field: 'delivery.nickName',
+      label: '姓名',
+      align: 'center',
+      colWidth: '120px',
+    }, {
+      field: 'delivery.phone',
+      label: '电话',
+      align: 'center',
+      colWidth: '140px',
+    }, ]
+  }, {
+    field: 'multistage',
+    label: '患者信息',
+    children: [{
+      field: 'consigneeAddressName',
+      label: '姓名',
+      align: 'center',
+      colWidth: '120px',
+    }, {
+      field: 'consigneeAddressPhone',
+      label: '电话',
+      align: 'center',
+      colWidth: '140px',
+    }, {
+      field: 'consigneeAddressDetails',
+      label: '地址',
+      align: 'center',
+      colWidth: '220px',
+    }, ]
+  }, {
+    field: 'deliveryTime',
+    label: '医保归属地',
+    align: 'center',
+    colWidth: '180px',
+  }, {
+    field: 'tamperProofLabel',
+    label: '患者要求送达时间',
+    align: 'center',
+    colWidth: '180px',
+  }, {
+    field: 'deliveryDuration',
+    label: '分配状态',
+    align: 'center',
+    colWidth: '180px',
+  }, {
+    field: 'receiptTime',
+    label: '分配时间',
+    align: 'center',
+    colWidth: '220px',
+  },{
+    field: 'admin_audit_remark',
+    label: '审核备注',
+    align: 'center',
+  }, {
+    field: 'unpackBtn',
+    label: '操作',
+    colWidth: '340px',
+    align: 'center',
+    labelButton: []
+  }]
+}
+export const sendList = () => {
+  return [{
+    field: 'deliveryId',
+    type: 'searchSelect',
+    label: '配送员',
+    placeholder: '请选择配送员',
+    colWidth: 12,
+    multiple: false,
+    rules: [{
+      required: true,
+      message: '请选择配送员',
+      trigger: 'blur,change'
+    }],
+    options: [],
+  }, {
+    field: 'coolerBoxId',
+    type: 'searchSelect',
+    label: '保温箱',
+    placeholder: '请选择保温箱',
+    colWidth: 12,
+    multiple: false,
+    rules: [{
+      required: false,
+      message: '请选择保温箱',
+      trigger: 'blur,change'
+    }],
+    options: [],
+  }, {
+    field: 'code',
+    label: '冰排编号',
+    placeholder: '请输入冰排编号',
+    type: 'scan',
+    colWidth: 24,
+    rules: [{
+      required: false,
+      message: '请输入冰排编号',
+      trigger: 'blur'
+    }]
+  }, {
+    field: 'tamperProofLabelImg',
+    label: '防拆标签图片',
+    placeholder: '请上传防拆标签图片',
+    type: 'upload',
+    colWidth: 12,
+    crosswise: true,
+    rules: [{
+      required: false,
+      message: '请上传防拆标签图片',
+      trigger: 'blur,change'
+    }]
+  }, {
+    field: 'tamperProofLabel',
+    label: '区块链防拆标签码',
+    placeholder: '请输入区块链防拆标签码',
+    type: 'input',
+    colWidth: 24,
+    rules: [{
+      required: false,
+      message: '请输入区块链防拆标签码',
+      trigger: 'blur'
+    }]
+  }]
+}

+ 29 - 7
src/views/OrderManagement/deliveryOrder.vue

@@ -24,7 +24,8 @@
 
 <script>
   import {
-    getWaybill
+    getWaybill,
+    putUpdateStatus
   } from '@/api/waybill'
   import actionBar from '@/components/actionBar'
   import tables from '@/components/tables'
@@ -73,12 +74,6 @@
           label: '患者手机号',
           field: 'orderNo',
           placeholder: '请输入患者手机号',
-        }, {
-          type: 'select',
-          label: '分配状态',
-          field: 'status',
-          placeholder: '请选择分配状态',
-          options: WaybillStatus(),
         }],
         searchRuleForm: {
           orderNo: '',
@@ -145,6 +140,7 @@
       // 获取运单列表
       getList() {
         var params = {
+          status: 4,
           page: this.Pagination.PageIndex,
           pageSize: this.Pagination.PageSize,
           ...this.searchValue
@@ -171,10 +167,36 @@
         if (type == 'logs') {
           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 == 'send') {
           const urls = this.fileList.map(obj => obj.url)
           this.srcList = urls
           this.$refs.picture.prescriptionVisible = true
+        } else if (type == 'delOrder') {
+          this.$confirm('此操作将永久删除该订单, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            let arrOrderId = []
+            arrOrderId.push(row.id)
+            putUpdateStatus({
+              id: arrOrderId,
+              status: 8,
+            }).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+            })
+          }).catch(() => {})
         }
       },
       changeSize(val) {

+ 15 - 11
src/views/OrderManagement/ordered.js

@@ -100,21 +100,16 @@ export const employee = () => {
     label: '冰排编号',
     align: 'center',
     colWidth: '180px',
-  }, {
-    field: 'deliveryDuration',
-    label: '分配状态',
-    align: 'center',
-    colWidth: '180px',
-  }, {
-    field: 'assessStar',
+  },{
+    field: 'assesstime',
     label: '分配时间',
     align: 'center',
     colWidth: '220px',
-  }, {
-    field: 'remark',
-    label: '订单备注',
+  },{
+    field: 'admin_audit_remark',
+    label: '审核备注',
     align: 'center',
-  }, {
+  },  {
     field: 'unpackBtn',
     label: '操作',
     colWidth: '340px',
@@ -279,3 +274,12 @@ export const signList = () => {
     colWidth: 24,
   }]
 }
+export const auditList = () => {
+  return [{
+    field: 'admin_audit_remark',
+    label: '审核备注',
+    placeholder: '请输入审核备注',
+    type: 'textarea',
+    colWidth: 24,
+  }]
+}

+ 99 - 20
src/views/OrderManagement/pendingOrder.vue

@@ -18,7 +18,7 @@
       </div>
     </div>
     <orderDetails ref="order" :waybillData="waybillData"></orderDetails>
-    <el-dialog title="单" :visible.sync="sendDialogVisible" width="800px" :close-on-click-modal="false"
+    <el-dialog title="分配订单" :visible.sync="sendDialogVisible" width="800px" :close-on-click-modal="false"
       @close="closeDialog">
       <forms ref="sendRules" :formNewList="sendRuleList" :ruleForm="sendRuleForm" :formIceTracing="true"
         :iceTracing="true" :iceBank="true" labelWidth="80px" @handleScroll="handleScroll" @remoteMethod="remoteMethod"
@@ -35,7 +35,9 @@
 
 <script>
   import {
-    getWaybill
+    getWaybill,
+    waybillDelivery,
+    putUpdateStatus
   } from '@/api/waybill'
   import {
     getCoolerBox,
@@ -50,12 +52,12 @@
   import {
     employee,
     sendList
-  } from "./uncertain.js";
+  } from "./delivered.js";
   import {
     getUser
   } from '@/api/user'
   import {
-    WaybillStatus
+    allocationState
   } from '@/assets/js/blockSort'
   export default {
     name: 'OrderManagement',
@@ -71,7 +73,7 @@
       return {
         operateList: [{
           type: 'sends',
-          title: '批量派单',
+          title: '批量分配',
           colour: 'success'
         }],
         formList: [{
@@ -104,7 +106,7 @@
           label: '分配状态',
           field: 'status',
           placeholder: '请选择分配状态',
-          options: WaybillStatus(),
+          options: allocationState(),
         }],
         searchRuleForm: {
           orderNo: '',
@@ -144,8 +146,12 @@
         sendDialogVisible: false,
         sendRuleList: sendList(),
         sendRuleForm: {
-          code: [],
+          fileList: [],
+          deliveryId: null,
           coolerBoxId: null,
+          code: [],
+          tamperProofLabelImg: '',
+          tamperProofLabel: '',
         },
         sendConfirmLoading: false,
         page: 1,
@@ -153,6 +159,7 @@
         limitNo: true,
         sendOrdersId: 2,
         waybillIdList: [],
+        orderId: null,
         waybillData: {},
         srcList: [],
         fileList: [{
@@ -188,6 +195,7 @@
       // 获取运单列表
       getList() {
         var params = {
+          status: 3,
           page: this.Pagination.PageIndex,
           pageSize: this.Pagination.PageSize,
           ...this.searchValue
@@ -210,6 +218,50 @@
         // console.log(type, 87)
         this.operationType = type
         if (type == 'sends') {
+          const arrID = this.$refs.refWaybill.waybillIds
+          let arrList = []
+          arrID.forEach(item => {
+            arrList.push(item.id)
+          })
+          this.waybillIdList = arrList
+          if (arrList.length != 0) {
+            this.sendDialogVisible = true
+            var arr = await this.getUserList()
+            this.sendRuleList.forEach(item => {
+              if (item.field == 'reCheckId') {
+                item.options = arr
+              }
+            })
+            this.sendRuleList.forEach(item => {
+              if (item.field == 'deliveryId') {
+                item.options = arr
+              }
+            })
+            this.getIncubator(2)
+          } else {
+            this.$message({
+              message: '请先选择需要批量操作的订单',
+              type: 'warning'
+            });
+          }
+        }
+      },
+      async buttonData(row, type) {
+        this.operationType = type
+        this.orderId = row.id
+        if (type == 'logs') {
+          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 == 'send') {
+          const urls = this.fileList.map(obj => obj.url)
+          this.srcList = urls
+          this.$refs.picture.prescriptionVisible = true
+        } else if (type == 'sign') {
           this.sendDialogVisible = true
           var arr = await this.getUserList()
           this.sendRuleList.forEach(item => {
@@ -223,17 +275,27 @@
             }
           })
           this.getIncubator(2)
-        }
-      },
-      buttonData(row, type) {
-        this.operationType = type
-        if (type == 'logs') {
-          this.$refs.order.staffDialogVisible = true
-          this.waybillData = row
-        } else if (type == 'send') {
-          const urls = this.fileList.map(obj => obj.url)
-          this.srcList = urls
-          this.$refs.picture.prescriptionVisible = true
+        } else if (type == 'delOrder') {
+          this.$confirm('此操作将永久删除该订单, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            let arrOrderId = []
+            arrOrderId.push(row.id)
+            putUpdateStatus({
+              id: arrOrderId,
+              status: 8,
+            }).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+            })
+          }).catch(() => {})
         }
       },
       // 触底事件
@@ -272,22 +334,30 @@
         this.limitNo = true
         this.staffName = ''
       },
-      // 运单派单
+      // 运单分配
       sendHandleAdd() {
         let flag = this.$refs['sendRules'].validateForm();
         if (flag) {
           this.sendConfirmLoading = true
           let arrID = []
-          if (this.operationType == 'send') {
+          if (this.operationType == 'sign') {
             arrID.push(this.orderId)
           } else if (this.operationType == 'sends') {
             arrID = this.waybillIdList
           }
           const param = {
             waybillIds: arrID,
+            deliveryId: Number(this.sendRuleForm.deliveryId),
             coolerBoxId: Number(this.sendRuleForm.coolerBoxId),
             iceRaftCode: this.sendRuleForm.code,
+            tamperProofLabel: this.sendRuleForm.tamperProofLabel,
+            tamperProofLabelImg: this.sendRuleForm.tamperProofLabelImg,
+          }
+          if (this.sendRuleForm.fileList) {
+            var fileImage = this.picture(this.sendRuleForm.fileList)
+            param.tamperProofLabelImg = fileImage
           }
+          console.log(param, 25)
           waybillDelivery(param).then(res => {
             if (res.code == 200) {
               this.$message({
@@ -315,6 +385,15 @@
           this.$message.error('表单信息不完整,请继续填写完整');
         }
       },
+      picture(arr) {
+        var imgList = JSON.parse(JSON.stringify(arr))
+        var imgArr = []
+        imgList.forEach((item, index) => {
+          imgArr.push(item.url)
+        })
+        var imgString = imgArr.join()
+        return imgString
+      },
       // 获取保温箱列表
       getIncubator(type) {
         let arrList = []

+ 186 - 0
src/views/OrderManagement/rejectionOrder.vue

@@ -0,0 +1,186 @@
+<template>
+  <!-- 已拒收订单status: 6, -->
+  <div>
+    <div ref="grabble">
+      <actionBar :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
+        @searchProtocol="searchProtocol"></actionBar>
+    </div>
+    <div class="card_content">
+      <!-- 表单 -->
+      <tables ref="refWaybill" controlswidth="180px" tableHeight="68vh" :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>
+    <orderDetails ref="order" :waybillData="waybillData"></orderDetails>
+    <prescriptionPicture ref="picture" :srcList="srcList" :fileList="fileList"></prescriptionPicture>
+  </div>
+</template>
+
+<script>
+  import {
+    getWaybill
+  } from '@/api/waybill'
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import orderDetails from '@/components/orderDetails'
+  import prescriptionPicture from '@/components/prescriptionPicture'
+  import {
+    employee,
+  } from "./uncertain.js";
+  import {
+    WaybillStatus
+  } from '@/assets/js/blockSort'
+  export default {
+    name: 'OrderManagement',
+    components: {
+      actionBar,
+      tables,
+      pagination,
+      orderDetails,
+      prescriptionPicture
+    },
+    data() {
+      return {
+        formList: [{
+          type: 'input',
+          label: '订单编号',
+          field: 'orderNo',
+          placeholder: '请输入订单编号',
+        }, {
+          type: 'input',
+          label: '门店名称',
+          field: 'orderNo',
+          placeholder: '请输入门店名称',
+        }, {
+          type: 'input',
+          label: '配送员姓名',
+          field: 'orderNo',
+          placeholder: '请输入配送员姓名',
+        }, {
+          type: 'input',
+          label: '患者名称',
+          field: 'orderNo',
+          placeholder: '请输入患者名称',
+        }, {
+          type: 'input',
+          label: '患者手机号',
+          field: 'orderNo',
+          placeholder: '请输入患者手机号',
+        }],
+        searchRuleForm: {
+          orderNo: '',
+          status: null,
+          time: [],
+        },
+        searchValue: {},
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        Total: 0,
+        operationType: '',
+        tableData: [],
+        tableList: [],
+        waybillData: {},
+        srcList: [],
+        fileList: [{
+          name: 'food.jpeg',
+          url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
+        }, {
+          name: 'food2.jpeg',
+          url: 'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg'
+        }],
+        receiptImg: {
+          field: 'receiptImg',
+          label: '拒收图片',
+          align: 'center',
+        },
+        reasonRejection: {
+          field: 'rejectionReason',
+          label: '拒收原因',
+          align: 'center',
+          colWidth: '180px',
+        },
+      }
+    },
+    mounted() {
+      let arr = employee()
+      const updatedItems = arr.filter(item => item.field !== 'unpackBtn');
+      this.tableList = updatedItems
+      this.tableList.push(this.receiptImg)
+      this.tableList.push(this.reasonRejection)
+      this.getList()
+    },
+    methods: {
+      // 搜索
+      searchProtocol(value) {
+        this.Pagination.PageIndex = 1
+        this.searchValue = value
+        if (value.time) {
+          this.searchValue.orderStartTime = value.time[0]
+          this.searchValue.orderEndTime = value.time[1]
+        }
+        this.getList()
+      },
+      // 获取运单列表
+      getList() {
+        var params = {
+          status: 6,
+          page: this.Pagination.PageIndex,
+          pageSize: this.Pagination.PageSize,
+          ...this.searchValue
+        }
+        delete params.time
+        getWaybill(params).then(res => {
+          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
+          }
+        })
+      },
+      openModel(type) {
+        this.operationType = type
+      },
+      buttonData(row, type) {
+        this.operationType = type
+        if (type == 'logs') {
+          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 == 'send') {
+          const urls = this.fileList.map(obj => obj.url)
+          this.srcList = urls
+          this.$refs.picture.prescriptionVisible = true
+        }
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+    },
+  }
+</script>
+
+<style>
+</style>

+ 79 - 18
src/views/OrderManagement/reviewedOrder.vue

@@ -19,7 +19,7 @@
     </div>
     <!-- 处方 -->
     <prescriptionPicture ref="picture" :srcList="srcList" :fileList="fileList"></prescriptionPicture>
-    <el-dialog title="订单详情" :visible.sync="auditDialogVisible" width="800px" :close-on-click-modal="false"
+    <el-dialog title="订单审核" :visible.sync="auditDialogVisible" width="800px" :close-on-click-modal="false"
       @close="closeDialog1">
       <forms ref="auditRules" beyondHeight="700px" :formNewList="auditRuleList" :ruleForm="auditRuleForm"
         labelWidth="130px">
@@ -27,9 +27,23 @@
       <el-divider>复核内容审批</el-divider>
       <forms ref="auditRules1" :formNewList="reviewContent" :ruleForm="reviewRuleForm" labelWidth="180px">
       </forms>
+      <el-dialog width="500px" title="驳回" :visible.sync="causeVisible" append-to-body>
+        <div style="display: flex;align-items: center;">
+          <span style="flex: none;margin-right: 10px;">
+            <span style="color: red;">*</span>
+            驳回原因
+          </span>
+          <el-input v-model="auditRemark" placeholder="请输入驳回原因"></el-input>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button plain @click="causeVisible = false">取 消</el-button>
+          <el-button type="primary" :loading="causeLoading" @click="auditHandleAdd(7)">确 定</el-button>
+        </span>
+      </el-dialog>
       <span slot="footer" class="dialog-footer">
         <el-button plain @click="auditDialogVisible = false">取 消</el-button>
-        <el-button type="primary" :loading="auditConfirmLoading" @click="auditHandleAdd">确 定</el-button>
+        <el-button type="danger" plain @click="turnDown">驳 回</el-button>
+        <el-button type="primary" :loading="auditConfirmLoading" @click="auditHandleAdd(3)">确 定</el-button>
       </span>
     </el-dialog>
   </div>
@@ -38,6 +52,8 @@
 <script>
   import {
     getWaybill,
+    auditWaybill,
+    putUpdateStatus
   } from '@/api/waybill'
   import actionBar from '@/components/actionBar'
   import tables from '@/components/tables'
@@ -90,12 +106,6 @@
           label: '患者手机号',
           field: 'orderNo',
           placeholder: '请输入患者手机号',
-        }, {
-          type: 'select',
-          label: '分配状态',
-          field: 'status',
-          placeholder: '请选择分配状态',
-          options: WaybillStatus(),
         }],
         searchRuleForm: {
           orderNo: '',
@@ -159,12 +169,16 @@
         auditConfirmLoading: false,
         reviewContent: examineList(),
         reviewRuleForm: {
-          status: 1,
-          status1: 1,
-          status2: 1,
-          status3: 1,
-          status4: 1,
+          prescriptionIssue: 1,
+          invoiceIssue: 1,
+          inspectionReportIssue: 1,
+          dispensingMedicinesIssue: 1,
+          isCold: 1,
         },
+        orderID: '',
+        causeVisible: false,
+        causeLoading: false,
+        auditRemark: '',
       }
     },
     mounted() {
@@ -191,6 +205,7 @@
       // 获取订单列表
       getList() {
         var params = {
+          status: 2,
           page: this.Pagination.PageIndex,
           pageSize: this.Pagination.PageSize,
           ...this.searchValue
@@ -212,21 +227,46 @@
       openModel(type) {
         this.operationType = type
       },
+      // 驳回原因
+      turnDown() {
+        this.causeVisible = true
+      },
       // 订单审核
-      auditHandleAdd() {
+      auditHandleAdd(event) {
         let flag = this.$refs['auditRules'].validateForm();
         if (flag) {
-          this.auditConfirmLoading = true
           let params = {
-            waybillNo: this.waybillNo,
-            ...this.auditRuleForm,
+            id: this.orderID,
+            status: null,
+            ...this.reviewRuleForm,
+          }
+          if (event == 7) {
+            this.auditConfirmLoading = true
+            params.status = event
+            params.audit_remark = this.auditRemark
+          } else {
+            this.causeLoading = true
+            params.status = event
+          }
+          if (params.status == 7 && !this.auditRemark) {
+            this.$message.error('请填写驳回原因');
+          } else {
+            auditWaybill(params).then(res => {
+              if (res.code == 200) {
+                this.auditConfirmLoading = false
+                this.causeLoading = false
+                this.causeVisible = false
+                this.auditDialogVisible = false
+                this.getList()
+              }
+            })
           }
-          console.log(params, 'ad')
         } else {
           this.$message.error('表单信息不完整,请继续填写完整');
         }
       },
       buttonData(row, type) {
+        this.orderID = row.id
         this.operationType = type
         if (type == 'send') {
           const urls = this.fileList.map(obj => obj.url)
@@ -234,6 +274,27 @@
           this.$refs.picture.prescriptionVisible = true
         } else if (type == 'audit') {
           this.auditDialogVisible = true
+        } else if (type == 'delOrder') {
+          this.$confirm('此操作将永久删除该订单, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            let arrOrderId = []
+            arrOrderId.push(row.id)
+            putUpdateStatus({
+              id: arrOrderId,
+              status: 8,
+            }).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+            })
+          }).catch(() => {})
         }
       },
       changeSize(val) {

+ 14 - 59
src/views/OrderManagement/uncertain.js

@@ -59,18 +59,12 @@ export const employee = () => {
     align: 'center',
     colWidth: '180px',
   }, {
-    field: 'deliveryDuration',
-    label: '分配状态',
+    field: 'admin_audit_remark',
+    label: '审核备注',
     align: 'center',
-    colWidth: '180px',
-  }, {
-    field: 'receiptTime',
-    label: '分配时间',
-    align: 'center',
-    colWidth: '220px',
   }, {
-    field: 'remark',
-    label: '订单备注',
+    field: 'auditRemark',
+    label: '驳回原因',
     align: 'center',
   }, {
     field: 'unpackBtn',
@@ -130,19 +124,6 @@ export const addressBook = () => {
 }
 export const sendList = () => {
   return [{
-    field: 'reCheckId',
-    type: 'searchSelect',
-    label: '复核人',
-    placeholder: '请选择复核人',
-    colWidth: 12,
-    multiple: false,
-    rules: [{
-      required: true,
-      message: '请选择复核人',
-      trigger: 'blur,change'
-    }],
-    options: [],
-  }, {
     field: 'deliveryId',
     type: 'searchSelect',
     label: '配送员',
@@ -424,7 +405,7 @@ export const auditList = () => {
 }
 export const examineList = () => {
   return [{
-    field: 'status',
+    field: 'prescriptionIssue',
     label: '处方是否审核',
     placeholder: '处方是否审核',
     type: 'radio',
@@ -441,8 +422,8 @@ export const examineList = () => {
       label: '未审核',
       value: 1,
     }]
-  },{
-    field: 'status4',
+  }, {
+    field: 'invoiceIssue',
     label: '发票/销售小票是否审核',
     placeholder: '发票/销售小票是否审核',
     type: 'radio',
@@ -459,8 +440,8 @@ export const examineList = () => {
       label: '未审核',
       value: 1,
     }]
-  },{
-    field: 'status3',
+  }, {
+    field: 'inspectionReportIssue',
     label: '检验报告单是否审核',
     placeholder: '检验报告单是否审核',
     type: 'radio',
@@ -477,8 +458,8 @@ export const examineList = () => {
       label: '未审核',
       value: 1,
     }]
-  },{
-    field: 'status2',
+  }, {
+    field: 'dispensingMedicinesIssue',
     label: '调配药品信息是否审核',
     placeholder: '调配药品信息是否审核',
     type: 'radio',
@@ -495,8 +476,8 @@ export const examineList = () => {
       label: '未审核',
       value: 1,
     }]
-  },{
-    field: 'status1',
+  }, {
+    field: 'isCold',
     label: '是否为冷链药品',
     placeholder: '是否为冷链药品',
     type: 'radio',
@@ -513,7 +494,7 @@ export const examineList = () => {
       label: '否',
       value: 1,
     }]
-  }, ]
+  }]
 }
 export const consignmentList = () => {
   return [{
@@ -527,31 +508,5 @@ export const consignmentList = () => {
       message: '请输入订单号',
       trigger: 'blur'
     }]
-  }, {
-    field: 'reCheckId',
-    type: 'searchSelect',
-    label: '复核人',
-    placeholder: '请选择复核人',
-    colWidth: 24,
-    multiple: false,
-    rules: [{
-      required: true,
-      message: '请选择复核人',
-      trigger: 'blur,change'
-    }],
-    options: [],
-  }, {
-    field: 'deliveryId',
-    type: 'searchSelect',
-    label: '配送人',
-    placeholder: '请选择配送人',
-    colWidth: 24,
-    multiple: false,
-    rules: [{
-      required: true,
-      message: '请选择配送人',
-      trigger: 'blur,change'
-    }],
-    options: [],
   }]
 }

+ 53 - 17
src/views/OrderManagement/uncertainOrder.vue

@@ -77,6 +77,7 @@
     getWaybill,
     addWaybill,
     putWaybill,
+    putUpdateStatus
   } from '@/api/waybill'
   import {
     getAddress
@@ -127,7 +128,7 @@
         formList: [{
           type: 'input',
           label: '订单编号',
-          field: 'orderNo',
+          field: 'waybillNo',
           placeholder: '请输入订单编号',
         }, {
           type: 'input',
@@ -149,12 +150,6 @@
           label: '患者手机号',
           field: 'orderNo',
           placeholder: '请输入患者手机号',
-        }, {
-          type: 'select',
-          label: '分配状态',
-          field: 'status',
-          placeholder: '请选择分配状态',
-          options: WaybillStatus(),
         }],
         searchRuleForm: {
           orderNo: '',
@@ -282,6 +277,7 @@
       // 获取订单列表
       getList() {
         var params = {
+          status: 1,
           page: this.Pagination.PageIndex,
           pageSize: this.Pagination.PageSize,
           ...this.searchValue
@@ -348,12 +344,12 @@
           })
         } else if (type == 'sends') {
           const arrID = this.$refs.refWaybill.waybillIds
-          console.log(arrID,3653)
-          if (arrID.length != 0) {
-            this.$message({
-              message: '操作成功',
-              type: 'success'
-            });
+          let arrList = []
+          arrID.forEach(item => {
+            arrList.push(item.id)
+          })
+          if (arrList.length != 0) {
+            this.modifyOrderStatus(arrList)
           } else {
             this.$message({
               message: '请先选择需要批量操作的运单',
@@ -454,15 +450,19 @@
         if (type == 'logs') {
           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 == 'send') {
           const urls = this.fileList.map(obj => obj.url)
           this.srcList = urls
           this.$refs.picture.prescriptionVisible = true
         } else if (type == 'confirm') {
-          this.$message({
-            message: '操作成功',
-            type: 'success'
-          });
+          let arrOrderId = []
+          arrOrderId.push(row.id)
+          this.modifyOrderStatus(arrOrderId, 2)
         } else if (type == 'edit') {
           this.getReviewerList()
           this.getDelivererList()
@@ -497,8 +497,44 @@
         } else if (type == 'sign') {
           this.signDialogVisible = true
           this.waybillNo = row.waybillNo
+        } else if (type == 'delOrder') {
+          this.$confirm('此操作将永久删除该订单, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            let arrOrderId = []
+            arrOrderId.push(row.id)
+            putUpdateStatus({
+              id: arrOrderId,
+              status: 8,
+            }).then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success'
+                });
+                this.getList()
+              }
+            })
+          }).catch(() => {})
         }
       },
+      // 修改订单状态
+      modifyOrderStatus(arrID, type) {
+        putUpdateStatus({
+          id: arrID,
+          status: type,
+        }).then(res => {
+          if (res.code == 200) {
+            this.$message({
+              message: '操作成功',
+              type: 'success'
+            });
+            this.getList()
+          }
+        })
+      },
       // 转门店
       signHandleAdd() {
         let flag = this.$refs['signRules'].validateForm();

+ 19 - 10
src/views/common/Base.vue

@@ -7,7 +7,7 @@
           <UserInfo></UserInfo>
         </div>
       </el-header>
-      <el-container>
+      <el-container class="card_container">
         <el-aside :width="sideWidth+'px'">
           <div class="card_aside">
             <div class="card_menu">
@@ -150,10 +150,6 @@
     -o-transition: width 0.15s;
   }
 
-  ::v-deep .el-container {
-    height: calc(100vh - 1px);
-  }
-
   .el-header {
     box-shadow: 0 5px 10px -2px #dfe5f8;
     z-index: 2;
@@ -163,14 +159,22 @@
     height: 100%;
   }
 
+  .card_container {
+    height: calc(100vh - 60px);
+  }
+
   .card_aside {
+    position: relative;
     height: calc(100% - 20px);
-    display: flex;
-    flex-direction: column;
-    justify-content: space-between;
     padding-top: 20px;
   }
 
+  .card_menu {
+    height: calc(100% - 70px);
+    overflow-y: auto;
+    overflow-x: hidden;
+  }
+
   .el-menu-vertical-demo {
     border-right: none !important;
   }
@@ -186,12 +190,17 @@
   }
 
   .card_support {
+    position: absolute;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    z-index: 999;
     display: flex;
     flex-direction: column;
     align-items: flex-start;
-    margin-bottom: 10px;
     color: rgb(204, 204, 204);
-    padding-left: 20px;
+    padding: 15px;
+    background-color: #fff;
 
     span {
       font-size: 14px;

+ 14 - 8
src/views/login.vue

@@ -11,7 +11,8 @@
             <el-input v-model="form.password" size="medium" show-password placeholder="请输入密码"></el-input>
           </div>
           <div class="card_form_code">
-            <el-input v-model="form.captcha" size="medium" placeholder="请输入验证码"></el-input>
+            <el-input v-model="form.captcha" size="medium" placeholder="请输入验证码"
+              @keyup.enter.native="getLogin"></el-input>
             <div style="margin-left: 5px;cursor: pointer;" @click="refreshCode">
               <identifyingCode :identify-code="identifyCode" :contentWidth="140"></identifyingCode>
             </div>
@@ -85,17 +86,22 @@
                 username: this.form.name,
                 password: this.form.password,
               }).then((res) => {
-                if (this.checked) {
-                  let arrList = JSON.stringify(this.form)
-                  localStorage.setItem("userData", arrList);
+                if (res.code == 200) {
+                  if (this.checked) {
+                    let arrList = JSON.stringify(this.form)
+                    localStorage.setItem("userData", arrList);
+                  }
+                  // 登录成功,跳转至首页
+                  this.$router.push({
+                    path: '/'
+                  })
+                } else {
+                  this.refreshCode()
                 }
-                // 登录成功,跳转至首页
-                this.$router.push({
-                  path: '/'
-                })
                 this.loginLoading = false
               }).catch(() => {
                 this.loginLoading = false
+                this.refreshCode()
               })
             } else {
               this.$message({

+ 17 - 0
src/views/page/statisticalManagement.vue

@@ -0,0 +1,17 @@
+<template>
+  <!-- 统计分析管理 -->
+  <div>统计分析管理</div>
+</template>
+
+<script>
+  export default {
+    data() {
+      return {
+
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+</style>

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

@@ -59,6 +59,7 @@
       </template>
       <thermography ref="thermo" :waybillNo="waybillNo" :timeData="timeQuantum"></thermography>
     </el-dialog>
+    <centerControl ref="control"></centerControl>
   </div>
 </template>
 
@@ -80,6 +81,7 @@
   import pagination from '@/components/pagination'
   import forms from '@/components/forms'
   import thermography from '@/components/thermography'
+  import centerControl from '@/components/centerControl'
   import {
     formRules,
     employee,
@@ -96,7 +98,8 @@
       tables,
       pagination,
       forms,
-      thermography
+      thermography,
+      centerControl
     },
     data() {
       return {
@@ -137,6 +140,11 @@
           type: 'import',
           title: '冷链平台导入',
           icon: 'el-icon-upload',
+        }, {
+          type: 'screen',
+          title: '中控大屏',
+          icon: 'el-icon-position',
+          colour: 'success'
         }],
         formList: [{
           type: 'input',
@@ -357,6 +365,13 @@
         } else if (type == 'import') {
           this.importDialogVisible = true
           this.getDeviceList()
+        }else if(type == 'screen'){
+          this.$refs.control.controlVisible = true
+          this.$nextTick(() => {
+            setTimeout(() => {
+              this.$refs.control.keyUpSearch()
+            }, 100)
+          })
         }
       },
       // 获取设备列表

+ 2 - 1
src/views/system/WaybillManagement.vue

@@ -661,6 +661,8 @@
             coolerBoxId: Number(this.sendRuleForm.coolerBoxId),
             iceRaftCode: this.sendRuleForm.code,
           }
+          console.log(param,222)
+          return
           waybillDelivery(param).then(res => {
             if (res.code == 200) {
               this.$message({
@@ -1011,7 +1013,6 @@
 <style lang="scss" scoped>
   ::v-deep .el-dialog {
     margin: 0 auto !important;
-    margin-top: 7vh !important;
   }
 
   .waybill_home ::v-deep .el-dialog__header {