qianduan пре 3 месеци
родитељ
комит
6b3fbffa0b

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

@@ -99,4 +99,8 @@ body,
 	.chart_card {
 		height: auto !important;
 	}
+}
+
+.el-form-item__label{
+	flex: none;
 }

+ 2 - 2
src/components/actionBar.vue

@@ -35,8 +35,8 @@
               </template>
             </el-form-item>
             <el-form-item style="display: flex;margin-right: 10px;margin-bottom: 10px !important;">
-              <el-button size="medium" type="primary" @click="searchProtocol">搜索</el-button>
-              <el-button size="medium" type="info" @click="reset">重置</el-button>
+              <el-button size="medium" icon="el-icon-search" type="primary" @click="searchProtocol">搜索</el-button>
+              <el-button size="medium" icon="el-icon-refresh" @click="reset">重置</el-button>
             </el-form-item>
           </div>
         </el-form>

+ 8 - 3
src/components/tables.vue

@@ -1,9 +1,9 @@
 <template>
   <!-- tables -->
   <div class="tables_grid">
-    <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">
+    <el-table ref="tableRef" style="width: 100%" tooltip-effect="dark myTooltips"
+      :show-header="showHeader" class="table-style" :data="tableData" :border="border" :row-key="(val) => rowKey(val)"
+      @cell-click="cellClick" @selection-change="handleSelectionChange">
       <template v-for="(item,index) in tableList">
         <el-table-column :fixed="suspension ? 'right' : false" :label="item.label" :width="item.colWidth" align="center"
           v-if="item.field == 'action'">
@@ -197,6 +197,11 @@
       historyFlag: {
         type: Boolean,
         default: () => false,
+      },
+      // 头部高度
+      tableHeight: {
+        type: String,
+        default: () => '',
       }
     },
     data() {

+ 8 - 0
src/router/generator-routers.js

@@ -126,6 +126,14 @@ const rootRouter = {
       },
       component: () => import('@/views/system/IncubatorManagement'),
     }, {
+      path: '/OrderManagement',
+      name: 'OrderManagement',
+      meta: {
+        icon: 'icon-yundan',
+        title: '订单管理'
+      },
+      component: () => import('@/views/system/OrderManagement'),
+    }, {
       path: '/WaybillManagement',
       name: 'WaybillManagement',
       meta: {

+ 6 - 0
src/views/common/Base.vue

@@ -113,6 +113,12 @@
     }
   }
 </script>
+<style>
+  .el-main {
+    padding: 20px 20px;
+    height: calc(100vh - 60px);
+  }
+</style>
 <style lang="scss" scoped>
   ::v-deep .el-aside {
     transition: width 0.15s;

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

@@ -1,6 +1,6 @@
 <template>
   <!-- 保温箱管理 -->
-  <div>
+  <div style="overflow-y: auto;">
     <actionBar :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
       @searchProtocol="searchProtocol"></actionBar>
     <div class="card_content">

+ 118 - 0
src/views/system/OrderManagement.vue

@@ -0,0 +1,118 @@
+<template>
+  <!-- 订单管理 -->
+  <div>
+    <div ref="grabble">
+      <actionBar :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
+        @searchProtocol="searchProtocol"></actionBar>
+    </div>
+    <div class="card_content">
+      <!-- 表单 -->
+      <tables ref="refWaybill" 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>
+  </div>
+</template>
+
+<script>
+  import actionBar from '@/components/actionBar'
+  import tables from '@/components/tables'
+  import pagination from '@/components/pagination'
+  import {
+    employee,
+  } from "./waybill.js";
+  import {
+    WaybillStatus
+  } from '@/assets/js/blockSort'
+  export default {
+    name: 'OrderManagement',
+    components: {
+      actionBar,
+      tables,
+      pagination,
+    },
+    data() {
+      return {
+        operateList: [{
+          type: 'sends',
+          title: '批量派单',
+          colour: 'success'
+        }, {
+          type: 'import',
+          title: '批量导入',
+          colour: 'warning'
+        }, {
+          type: 'add',
+          title: '添加订单',
+          icon: 'el-icon-plus',
+        }],
+        formList: [{
+          type: 'input',
+          label: '订单号',
+          field: 'orderNo',
+          placeholder: '请输入订单号',
+        }, {
+          type: 'select',
+          label: '状态',
+          field: 'status',
+          placeholder: '请选择状态',
+          options: WaybillStatus(),
+        }, {
+          type: 'picker',
+          label: '下单时间',
+          field: 'time',
+          placeholder: '下单时间',
+        }],
+        searchRuleForm: {
+          orderNo: '',
+          status: null,
+          time: [],
+        },
+        searchValue: {},
+        Pagination: {
+          PageIndex: 1,
+          PageSize: 10,
+        },
+        Total: 0,
+        operationType: '',
+        tableData: [],
+        tableList: employee(),
+      }
+    },
+    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()
+      },
+      openModel(type) {
+        this.operationType = type
+      },
+      buttonData(row, type) {
+        this.operationType = type
+      },
+      changeSize(val) {
+        this.Pagination.PageSize = val
+        this.getList()
+      },
+      changeCurrent(val) {
+        this.Pagination.PageIndex = val
+        this.getList()
+      },
+    },
+  }
+</script>
+
+<style lang="scss">
+</style>

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

@@ -1,11 +1,13 @@
 <template>
   <!-- 运单管理 -->
   <div class="waybill_home">
-    <actionBar :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
-      @searchProtocol="searchProtocol"></actionBar>
+    <div ref="grabble">
+      <actionBar :operateList="operateList" :formList="formList" :ruleForm="searchRuleForm" @openModel="openModel"
+        @searchProtocol="searchProtocol"></actionBar>
+    </div>
     <div class="card_content">
       <!-- 表单 -->
-      <tables ref="refWaybill" :suspension="true" :tableList="tableList" :tableData="tableData"
+      <tables ref="refWaybill" tableHeight="68vh" :suspension="true" :tableList="tableList" :tableData="tableData"
         @buttonData="buttonData">
       </tables>
       <!-- 分页 -->
@@ -133,9 +135,9 @@
   import {
     WaybillStatus
   } from '@/assets/js/blockSort'
-  import {
-    number
-  } from 'echarts'
+  // import {
+  //   number
+  // } from 'echarts'
   export default {
     name: 'WaybillManagement',
     components: {
@@ -185,6 +187,7 @@
         }],
         searchRuleForm: {
           waybillNo: '',
+          orderNo: '',
           status: null,
           time: [],
         },
@@ -271,13 +274,14 @@
         saveSenderAddress: true,
         saveConsigneeAddress: true,
         conserveFlag: true,
+        tableHeight: '',
       }
     },
     mounted() {
       const dataList = formRules();
       this.formRuleList = dataList;
-      this.getReviewerList()
-      this.getDelivererList()
+      // this.getReviewerList()
+      // this.getDelivererList()
       this.getList()
     },
     methods: {
@@ -598,6 +602,8 @@
           this.waybillData.reCheckName = row.reCheck.nickName
           this.waybillData.reCheckPhone = row.reCheck.phone
         } else if (type == 'edit') {
+          this.getReviewerList()
+          this.getDelivererList()
           this.conserveFlag = false
           this.staffTitle = '编辑'
           this.staffDialogVisible = true
@@ -831,6 +837,8 @@
           this.$nextTick(() => {
             // this.$refs.sender.radio = '1'
             this.$refs.recipients.radio = '1'
+            this.getReviewerList()
+            this.getDelivererList()
           })
         } else if (type == 'sends') {
           const arrID = this.$refs.refWaybill.waybillIds

+ 4 - 0
src/views/system/address.js

@@ -65,6 +65,10 @@ export const formRules = () => {
         required: true,
         message: '请输入电话号码',
         trigger: 'blur'
+      }, {
+        pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+        message: '请输入正确手机号码',
+        trigger: "blur"
       }]
     }, {
       field: 'address',

+ 8 - 0
src/views/system/client.js

@@ -75,6 +75,10 @@ export const formRules = () => {
       required: true,
       message: '请输入手机号',
       trigger: 'blur'
+    }, {
+      pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+      message: '请输入正确手机号码',
+      trigger: "blur"
     }]
   }, {
     field: 'newPassword',
@@ -131,6 +135,10 @@ export const formRulesil = () => {
       required: true,
       message: '请输入手机号',
       trigger: 'blur'
+    }, {
+      pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+      message: '请输入正确手机号码',
+      trigger: "blur"
     }]
   }, ]
 }

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

@@ -106,6 +106,10 @@ export const formRules = () => {
         required: true,
         message: '请输入电话号码',
         trigger: 'blur'
+      }, {
+        pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+        message: '请输入正确电话号码',
+        trigger: "blur"
       }]
     }, {
       field: 'newPassword',
@@ -176,6 +180,10 @@ export const formRulesil = () => {
         required: true,
         message: '请输入电话号码',
         trigger: 'blur'
+      }, {
+        pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+        message: '请输入正确电话号码',
+        trigger: "blur"
       }]
     },
     {

+ 144 - 0
src/views/system/order.js

@@ -0,0 +1,144 @@
+import {
+  startStatus,
+  WaybillStatus
+} 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: 'status',
+    label: '状态',
+    align: 'center',
+    options: WaybillStatus(),
+    colWidth: '70px',
+  }, {
+    field: 'multistage',
+    label: '复核人',
+    children: [{
+      field: 'reCheck.nickName',
+      label: '姓名',
+      align: 'center',
+      colWidth: '120px',
+    }, {
+      field: 'reCheck.phone',
+      label: '电话',
+      align: 'center',
+      colWidth: '140px',
+    }, ]
+  }, {
+    field: 'multistage',
+    label: '配送人',
+    children: [{
+      field: 'delivery.nickName',
+      label: '姓名',
+      align: 'center',
+      colWidth: '120px',
+    }, {
+      field: 'delivery.phone',
+      label: '电话',
+      align: 'center',
+      colWidth: '140px',
+    }, ]
+  }, {
+    field: 'multistage',
+    label: '收件人',
+    children: [{
+      field: 'consigneeAddressName',
+      label: '姓名',
+      align: 'center',
+      colWidth: '120px',
+    }, {
+      field: 'consigneeAddressPhone',
+      label: '电话',
+      align: 'center',
+      colWidth: '140px',
+    }, {
+      field: 'consigneeAddressDetails',
+      label: '地址',
+      align: 'center',
+      colWidth: '220px',
+    }, ]
+  }, {
+    field: 'tamperProofLabel',
+    label: '防拆标签码',
+    align: 'center',
+    colWidth: '180px',
+  }, {
+    field: 'coolerBox.name',
+    label: '保温箱',
+    align: 'center',
+    colWidth: '180px',
+  }, {
+    field: 'iceRaftCode',
+    label: '冰排编号',
+    align: 'center',
+    colWidth: '180px',
+  }, {
+    field: 'deliveryTime',
+    label: '出发时间',
+    align: 'center',
+    colWidth: '180px',
+  }, {
+    field: 'receiptTime',
+    label: '签收时间',
+    align: 'center',
+    colWidth: '180px',
+  }, {
+    field: 'deliveryDuration',
+    label: '配送耗时',
+    align: 'center',
+    colWidth: '180px',
+  }, {
+    field: 'assessStar',
+    label: '服务评价',
+    align: 'center',
+    colWidth: '220px',
+  }, {
+    field: 'remark',
+    label: '备注',
+    align: 'center',
+  }, {
+    field: 'unpackBtn',
+    label: '操作',
+    colWidth: '370px',
+    align: 'center',
+    labelButton: [{
+      type: 'logs',
+      label: '详情',
+      icon: 'el-icon-tickets',
+      style: 'success',
+    }, {
+      type: 'edit',
+      label: '编辑',
+      icon: 'el-icon-edit',
+      style: 'primary',
+    }, {
+      type: 'send',
+      label: '派单',
+      icon: 'el-icon-tickets',
+      style: 'primary',
+    }, {
+      type: 'sign',
+      label: '签收',
+      icon: 'el-icon-folder-checked',
+      style: 'warning',
+    }, {
+      type: 'del',
+      label: '删除',
+      icon: 'el-icon-delete',
+      style: 'danger',
+    }]
+  }]
+}

+ 8 - 0
src/views/system/userTable.js

@@ -93,6 +93,10 @@ export const formRules = () => {
         required: true,
         message: '请输入电话号码',
         trigger: 'blur'
+      }, {
+        pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+        message: '请输入正确电话号码',
+        trigger: "blur"
       }]
     }, {
       field: 'newPassword',
@@ -163,6 +167,10 @@ export const formRulesil = () => {
         required: true,
         message: '请输入电话号码',
         trigger: 'blur'
+      }, {
+        pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/,
+        message: '请输入正确电话号码',
+        trigger: "blur"
       }]
     },
     {

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