瀏覽代碼

新配送订单管理页面

admin 1 月之前
父節點
當前提交
5c85c277e3

+ 561 - 0
src/components/page/admin/delivery/DeliveryOrderManage1.vue

@@ -0,0 +1,561 @@
+<template>
+  <div class="page-wrap">
+    <div class="crumbs">
+      <el-breadcrumb separator="/">
+        <i class="el-icon-eleme"></i> 新配送订单管理
+      </el-breadcrumb>
+    </div>
+    <div class="background">
+      <div class="topbox">
+        <div class="topbox-left">
+          <span class="page-title">新配送订单管理</span>
+        </div>
+      </div>
+      <div class="searchbox searchbox-multi">
+        <div class="filter-group filter-full">
+          <span>订单状态</span>
+          <el-radio-group v-model="processStatus" @input="getDataList()">
+            <el-radio-button label="">全部</el-radio-button>
+            <el-radio-button label="10">待出餐<div class="high-light-number">{{countBean.receivedCount || 0}}</div></el-radio-button>
+            <el-radio-button label="20">待取餐<div class="high-light-number">{{countBean.dinedCount || 0}}</div></el-radio-button>
+            <el-radio-button label="30">已取餐<div class="high-light-number">{{countBean.complitedCount || 0}}</div></el-radio-button>
+            <el-radio-button label="40">配送中<div class="high-light-number">{{countBean.deliveringCount || 0}}</div></el-radio-button>
+          </el-radio-group>
+        </div>
+        <div class="filter-group">
+          <span>所属门店</span>
+          <el-select v-model="storeId" style="width: 180px;" clearable filterable>
+            <el-option v-for="item in storeList" :key="item.storeId" :label="item.storeName" :value="item.storeId"></el-option>
+          </el-select>
+        </div>
+        <div class="filter-group">
+          <span>订单号</span>
+          <el-input v-model="orderCode" style="width: 180px;" placeholder="请输入订单号" clearable></el-input>
+        </div>
+        <div class="filter-group">
+          <span>取餐员</span>
+          <el-input v-model="waiterName" style="width: 180px;" placeholder="请输入取餐员姓名" clearable></el-input>
+        </div>
+        <div class="filter-group">
+          <span>配送员</span>
+          <el-input v-model="riderName" style="width: 180px;" placeholder="请输入配送员姓名" clearable></el-input>
+        </div>
+        <div class="filter-group">
+          <span>爬楼员</span>
+          <el-input v-model="climbName" style="width: 180px;" placeholder="请输入爬楼员姓名" clearable></el-input>
+        </div>
+        <div class="filter-group">
+          <span>出餐时长</span>
+          <el-select v-model="makeTime" style="width: 140px;" @change="changeMakeTime()">
+            <el-option label="全部" value=""></el-option>
+            <el-option value="1" label="0-5分钟"></el-option>
+            <el-option value="2" label="6-10分钟"></el-option>
+            <el-option value="3" label="11-15分钟"></el-option>
+            <el-option value="4" label="15分钟以上"></el-option>
+          </el-select>
+        </div>
+        <div class="filter-group">
+          <span>取餐时长</span>
+          <el-select v-model="getTime" style="width: 140px;" @change="changeGetTime()">
+            <el-option label="全部" value=""></el-option>
+            <el-option value="1" label="0-20分钟"></el-option>
+            <el-option value="2" label="21-40分钟"></el-option>
+            <el-option value="3" label="41-60分钟"></el-option>
+            <el-option value="4" label="60分钟以上"></el-option>
+          </el-select>
+        </div>
+        <div class="filter-group">
+          <span>配送时长</span>
+          <el-select v-model="sendTime" style="width: 140px;" @change="changeSendTime()">
+            <el-option label="全部" value=""></el-option>
+            <el-option value="1" label="0-20分钟"></el-option>
+            <el-option value="2" label="21-40分钟"></el-option>
+            <el-option value="3" label="41-60分钟"></el-option>
+            <el-option value="4" label="60分钟以上"></el-option>
+          </el-select>
+        </div>
+        <div class="filter-group">
+          <span>顾客姓名</span>
+          <el-input v-model="orderName" style="width: 150px;" placeholder="顾客姓名" clearable></el-input>
+        </div>
+        <div class="filter-group">
+          <span>手机号</span>
+          <el-input v-model="orderTel" style="width: 150px;" placeholder="顾客手机号" clearable></el-input>
+        </div>
+        <div class="filter-group">
+          <span>下单时间</span>
+          <el-date-picker v-model="createDateS" value-format="yyyy-MM-dd" placeholder="开始日期" style="width: 140px;"></el-date-picker>
+          <span class="time-separator">至</span>
+          <el-date-picker v-model="createDateE" value-format="yyyy-MM-dd" placeholder="结束日期" style="width: 140px;"></el-date-picker>
+        </div>
+        <div class="filter-group">
+          <span>配送类型</span>
+          <el-select v-model="orderType" style="width: 140px;" clearable>
+            <el-option label="全部" value=""></el-option>
+            <el-option value="1" label="楼下自提"></el-option>
+            <el-option value="2" label="直达宿舍"></el-option>
+          </el-select>
+        </div>
+        <span style="flex:1"></span>
+        <el-button type="primary" icon="el-icon-search" @click="getDataList()">查询</el-button>
+      </div>
+      <div class="tablebox">
+        <el-table :data="tableData" border style="width: 100%;" header-row-class-name="table-header-row" highlight-current-row :header-cell-style="{ background: '#409EFF', color: '#fff' }" height="calc(100% - 70px)">
+          <el-table-column fixed label="订单编号" width="120">
+            <template slot-scope="scope">
+              {{scope.row.takeupCode}}<br/>{{scope.row.orderCode}}
+            </template>
+          </el-table-column>
+          <el-table-column prop="storeName" label="门店名称" width="100"></el-table-column>
+          <el-table-column prop="address" label="收货地址" width="140">
+            <template slot-scope="scope">
+              {{scope.row.fullName}}
+            </template>
+          </el-table-column>
+          <el-table-column label="订单金额" width="80">
+            <template slot-scope="scope">
+            ¥{{moneyConverter(scope.row.orderFee)}}
+            </template>
+          </el-table-column>
+          <el-table-column prop="customr" label="顾客" width="100">
+            <template slot-scope="scope">
+              {{scope.row.orderName}}<br>
+              {{scope.row.orderTel}}
+            </template>
+          </el-table-column>
+          <el-table-column prop="orderTypeName" label="配送类型" width="80"></el-table-column>
+          <el-table-column prop="waiterName" label="取餐员(费用)" width="80">
+            <template slot-scope="scope">
+              {{scope.row.waiterName}}<br>
+              {{moneyConverter(scope.row.sortingFee)}}
+            </template>
+          </el-table-column>
+          <el-table-column prop="riderName" label="配送员(费用)" width="80">
+            <template slot-scope="scope">
+              {{scope.row.riderName}}<br>
+              {{moneyConverter(scope.row.deliveryFee)}}
+            </template>
+          </el-table-column>
+          <el-table-column prop="climbName" label="爬楼员(费用)" width="80">
+            <template slot-scope="scope">
+              {{scope.row.climbName}}<br>
+              {{moneyConverter(scope.row.climbingFee)}}
+            </template>
+          </el-table-column>
+          <el-table-column prop="processStatusName" label="配送状态" width="80"></el-table-column>
+          <el-table-column prop="pickOutDuration" label="出餐时长" width="80">
+            <template slot-scope="scope">
+              <span style="color:red" v-if="scope.row.pickOutDuration > scope.row.doneMealTime">
+                {{scope.row.pickOutDuration != null ? scope.row.pickOutDuration + '分' : ''}}
+              </span>
+              <span v-else>
+                {{scope.row.pickOutDuration != null ? scope.row.pickOutDuration + '分' : ''}}
+              </span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="transferDuration" label="取餐时长" width="80">
+            <template slot-scope="scope">
+              <span style="color:red" v-if="scope.row.isInside == 1 && scope.row.deliveryType == 1 && scope.row.transferDuration > setting.takeFoodTime">
+                {{scope.row.transferDuration != null ? scope.row.transferDuration + '分' : ''}}
+              </span>
+              <span v-else>
+                {{scope.row.transferDuration != null ? scope.row.transferDuration + '分' : ''}}
+              </span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="deliveryDuration" label="配送时长" width="80">
+            <template slot-scope="scope">
+              <span style="color:red" v-if="scope.row.isInside == 1 && scope.row.deliveryType == 1 && scope.row.deliveryDuration > setting.riderTime">
+                {{scope.row.deliveryDuration != null ? scope.row.deliveryDuration + '分' : ''}}
+              </span>
+              <span v-else>
+                {{scope.row.deliveryDuration != null ? scope.row.deliveryDuration + '分' : ''}}
+              </span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="climbDuration" label="爬楼时长" width="80">
+            <template slot-scope="scope">
+              <span style="color:red" v-if="scope.row.isInside == 1 && scope.row.deliveryType == 1 && scope.row.climbDuration > setting.climbTime">
+                {{scope.row.climbDuration != null ? scope.row.climbDuration + '分' : ''}}
+              </span>
+              <span v-else>
+                {{scope.row.climbDuration != null ? scope.row.climbDuration + '分' : ''}}
+              </span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="requireDateStr" label="预计送达时间" width="90"></el-table-column>
+          <el-table-column prop="payDateStr" label="创建时间"></el-table-column>
+          <el-table-column fixed="right" label="操作" width="110">
+            <template slot-scope="scope">
+              <el-button v-if="scope.row.processStatus == 20 && (scope.row.isInside == 1 || scope.row.isInside == null) && (scope.row.deliveryType == 1 || scope.row.deliveryType == null)" @click="openDialog('1', scope.row.orderId)" type="primary" size="small">取货</el-button>
+              <el-button v-if="scope.row.processStatus == 30 && scope.row.isInside == 1 && scope.row.deliveryType == 1" @click="openDialog('2', scope.row.orderId)" type="primary" size="small">转单</el-button>
+              <el-button v-if="scope.row.processStatus == 40 && scope.row.isInside == 1 && scope.row.deliveryType == 1" @click="allocationOrder(scope.row.orderId, scope.row.processStatus)" type="primary" size="small">配送</el-button>
+              <el-button v-if="scope.row.orderType == 2 && scope.row.processStatus == 50 && scope.row.isInside == 1 && scope.row.deliveryType == 1" @click="allocationOrder(scope.row.orderId, scope.row.processStatus)" type="primary" size="small">送达楼下</el-button>
+              <el-button v-if="scope.row.orderType == 2 && scope.row.processStatus == 60 && scope.row.isInside == 1 && scope.row.deliveryType == 1" @click="openDialog('3', scope.row.orderId)" type="primary" size="small">上楼</el-button>
+              <el-button v-if="(scope.row.orderType == 2 && scope.row.processStatus == 70) || (scope.row.orderType == 1 && scope.row.processStatus == 50)" type="danger" size="small" @click="finish(scope.row.orderId)">完成</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      <el-pagination :total="pagination.resultCount" :page-size="pagination.pageSize" :current-page="pagination.currentPage"
+      	:page-sizes="[10, 20, 50, 100, 500, 1000]" background layout="total, sizes, prev, pager, next, jumper"
+      	@size-change="handleSizeChange" @current-change="handleIndexChange"
+      	style="margin-top: 20px;text-align: right" ref="pag">
+      </el-pagination>
+      </div>
+    </div>
+		<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" :before-close="closeDialog" width="650px">
+      <el-table :data="riderList" style="width: 100%;margin-bottom: 20px;" row-key="id" border>
+        <el-table-column prop="riderId" label="No" width="100"></el-table-column>
+        <el-table-column prop="riderName" label="配送员">
+          <template slot-scope="scope">
+            {{scope.row.riderName}}
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" width="150">
+          <template slot-scope="scope">
+            <el-button  @click="allocation(scope.row.riderId)" type="primary" size="small">{{dialogTitle}}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+	</div>
+</template>
+<script>
+import dptable from '@/components/common/Dptable.vue'
+
+export default {
+  components: {
+    dptable
+  },
+	data(){
+		return {
+      // 使用新的接口地址
+      getDeliveryOrderListUrl: "/deliveryOrderManage1/getDeliveryOrderList",
+      getStoreListUrl: "/deliveryOrderManage1/getStoreList",
+      finishOrderUrl: "/deliveryOrderManage1/updateOrderFinish",
+      allocationOrderUrl: "/deliveryOrderManage1/allocationOrder",
+      getRiderListUrl: "/deliveryOrderManage1/getRiderListNoPage",
+      // 检索条件
+      storeId: '',
+      orderCode: '',
+      waiterName: '',
+      riderName: '',
+      climbName: '',
+      makeTime: '',
+      makeTimeStart: '',
+      makeTimeEnd: '',
+      getTime: '',
+      getTimeStart: '',
+      getTimeEnd: '',
+      sendTime:'',
+      sendTimeStart:'',
+      sendTimeEnd:'',
+      processStatus: '',
+      orderName: '',
+      orderTel: '',
+      createDateS: null,
+      createDateE: null,
+      orderType: '',
+
+      options: {
+        mutiSelect: false,
+        index: false,
+        initTable: true,
+        height: "500"
+      },
+      pagination: {
+        resultCount: 0,
+        currentPage: 1,
+        pageSize: 20
+      },
+      tableData: [],
+      countBean: {},
+      dialogVisible: false,
+      orderId: '',
+      storeList: [],
+      riderList: [],
+      setting: {},
+      dialogTitle: '取货',
+      progressStatus: 0,
+		};
+  },
+  created() {
+    this.getStoreList();
+    this.getDataList();
+  },
+	methods: {
+    handleSizeChange(size) {
+    	this.pagination.pageSize = size;
+    	this.getDataList();
+    },
+    handleIndexChange(current) {
+    	this.pagination.currentPage = current;
+    	this.getDataList();
+    },
+    openDialog(flg, id) {
+      let obj = { status: 1, isInside: 1, type: 1 };
+      if (flg == '1') {
+        // 取餐员
+        this.progressStatus = 20;
+        this.dialogTitle = '取货';
+      } else if (flg == '2') {
+        // 配送员
+        this.progressStatus = 30;
+        this.dialogTitle = '转单';
+      } else if (flg == '3') {
+        // 爬楼员
+        this.progressStatus = 60;
+        this.dialogTitle = '上楼';
+      }
+      const querystring = require("querystring");
+      this.$axios.post(this.getRiderListUrl, querystring.stringify(obj)).then(res => {
+        if (res.data.rtnBean.rtnCode != 0) {
+          this.$message.error(res.data.rtnBean.rtnMsg);
+        }
+        this.riderList = res.data.list;
+      }).catch(error => {
+        console.log(error);
+        this.$message.error("数据处理异常,请与管理员联系!");
+      });
+      this.dialogVisible = true;
+      this.orderId = id;
+    },
+    closeDialog() {
+      this.dialogVisible = false;
+      this.orderId = '';
+    },
+    allocation(id) {
+      const querystring = require("querystring");
+      this.$axios.post(this.allocationOrderUrl, querystring.stringify({
+        orderId: this.orderId,
+        riderId: id,
+        status: this.progressStatus
+      })).then(res => {
+        if (res.data.rtnBean.rtnCode != 0) {
+          this.$message.error(res.data.rtnBean.rtnMsg);
+        } else {
+          this.$message.success("操作成功!");
+          this.dialogVisible = false;
+        }
+        this.getDataList();
+      }).catch(error => {
+        console.log(error);
+        this.$message.error("数据处理异常,请与管理员联系!");
+      });
+    },
+    allocationOrder(orderId, status) {
+      const querystring = require("querystring");
+      this.$axios.post(this.allocationOrderUrl, querystring.stringify({
+        orderId: orderId,
+        status: status
+      })).then(res => {
+        if (res.data.rtnBean.rtnCode != 0) {
+          this.$message.error(res.data.rtnBean.rtnMsg);
+        } else {
+          this.$message.success("操作成功!");
+          this.dialogVisible = false;
+        }
+        this.getDataList();
+      }).catch(error => {
+        console.log(error);
+        this.$message.error("数据处理异常,请与管理员联系!");
+      });
+    },
+    // 获取门店列表
+    getStoreList() {
+      this.$axios.post(this.getStoreListUrl).then(res => {
+        if (res.data.rtnBean.rtnCode != 0) {
+            this.$message.error(res.data.rtnBean.rtnMsg);
+        }
+        this.storeList = res.data.list;
+      }).catch(error => {
+        console.log(error);
+        this.$message.error("数据处理异常,请与管理员联系!");
+      });
+    },
+    getDataList() {
+      var dateS;
+      var dateE;
+      if (this.createDateS != "" && this.createDateS != null) {
+        dateS = this.$moment(this.createDateS).format("YYYY/MM/DD");
+      }
+      if (this.createDateE != "" && this.createDateE != null) {
+        dateE = this.$moment(this.createDateE).format("YYYY/MM/DD");
+      }
+      this.options.loading = true;
+      const querystring = require("querystring");
+      this.$axios.post(this.getDeliveryOrderListUrl, querystring.stringify({
+        status: this.processStatus,
+        storeId: this.storeId,
+        orderCode: this.orderCode,
+        waiterName: this.waiterName,
+        riderName: this.riderName,
+        climbName: this.climbName,
+        makeTimeStart: this.makeTimeStart,
+        makeTimeEnd: this.makeTimeEnd,
+        getTimeStart: this.getTimeStart,
+        getTimeEnd: this.getTimeEnd,
+        sendTimeStart: this.sendTimeStart,
+        sendTimeEnd: this.sendTimeEnd,
+        orderName: this.orderName,
+        orderTel: this.orderTel,
+        sDateWss: dateS,
+        eDateWss: dateE,
+        orderType: this.orderType,
+        pageSize: this.pagination.pageSize,
+        currentPage: this.pagination.currentPage
+      })).then(res => {
+        this.tableData = res.data.list;
+        this.countBean = res.data.obj;
+        this.pagination.resultCount = res.data.page.resultCount;
+        this.pagination.currentPage = res.data.page.currentPage;
+        this.options.loading = false;
+        this.setting = res.data.obj1;
+      }).catch(error => {
+        this.options.loading = false;
+        console.log(error);
+      });
+    },
+    changeMakeTime() {
+      if (this.makeTime == 1) { this.makeTimeStart = ''; this.makeTimeEnd = 5; }
+      else if (this.makeTime == 2) { this.makeTimeStart = 6; this.makeTimeEnd = 10; }
+      else if (this.makeTime == 3) { this.makeTimeStart = 11; this.makeTimeEnd = 15; }
+      else if (this.makeTime == 4) { this.makeTimeStart = 16; this.makeTimeEnd = ''; }
+      else { this.makeTimeStart = ''; this.makeTimeEnd = ''; }
+    },
+    changeGetTime() {
+      if (this.getTime == 1) { this.getTimeStart = ''; this.getTimeEnd = 20; }
+      else if (this.getTime == 2) { this.getTimeStart = 21; this.getTimeEnd = 40; }
+      else if (this.getTime == 3) { this.getTimeStart = 41; this.getTimeEnd = 60; }
+      else if (this.getTime == 4) { this.getTimeStart = 61; this.getTimeEnd = ''; }
+      else { this.getTimeStart = ''; this.getTimeEnd = ''; }
+    },
+    changeSendTime() {
+      if (this.sendTime == 1) { this.sendTimeStart = ''; this.sendTimeEnd = 20; }
+      else if (this.sendTime == 2) { this.sendTimeStart = 21; this.sendTimeEnd = 40; }
+      else if (this.sendTime == 3) { this.sendTimeStart = 41; this.sendTimeEnd = 60; }
+      else if (this.sendTime == 4) { this.sendTimeStart = 61; this.sendTimeEnd = ''; }
+      else { this.sendTimeStart = ''; this.sendTimeEnd = ''; }
+    },
+    finish(orderId) {
+      this.$confirm('确定要将该订单设为完成吗?', '警告', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+      }).then(() => {
+        const querystring = require("querystring");
+        this.$axios.post(this.finishOrderUrl, querystring.stringify({
+          id: orderId
+        })).then(res => {
+          if (res.data.rtnBean.rtnCode == 0) {
+              this.$message.success("更新成功!");
+          } else {
+              this.$message.error(res.data.rtnBean.rtnMsg);
+          }
+          this.getDataList();
+        }).catch(error => {
+          console.log(error);
+          this.$message.error("数据处理异常,请与管理员联系!");
+        });
+      }).catch(() => {
+          this.$message.info('已取消操作');
+      });
+    }
+  }
+};
+</script>
+
+<style scoped>
+.page-wrap{
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+}
+.crumbs{
+    color: #666;
+    flex-shrink: 0;
+}
+.background{
+    flex: 1;
+    min-height: 0;
+    display: flex;
+    flex-direction: column;
+    gap: 10px;
+    padding: 0 10px 10px;
+}
+.topbox{
+    background: white;
+    box-shadow: 0 12px 20px -8px rgba(22, 50, 62, 0.3);
+    border-radius: 10px;
+    min-height: 52px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 10px 16px;
+    flex-shrink: 0;
+}
+.topbox-left{ flex-shrink: 0; }
+.page-title{
+    font-size: 14px;
+    color: #409EFF;
+    font-weight: 600;
+}
+.searchbox{
+    background: white;
+    box-shadow: 0 12px 20px -8px rgba(22, 50, 62, 0.3);
+    border-radius: 10px;
+    padding: 12px 16px;
+    display: flex;
+    align-items: center;
+    gap: 10px;
+    flex-shrink: 0;
+    font-size: 13px;
+    color: #606266;
+}
+.searchbox-multi{
+    flex-wrap: wrap;
+    max-height: 200px;
+    overflow-y: auto;
+}
+.searchbox > span{ flex: 1; }
+.filter-group{
+    display: flex;
+    align-items: center;
+    gap: 6px;
+    white-space: nowrap;
+}
+.filter-group > span{
+    white-space: nowrap;
+    color: #606266;
+}
+.filter-full{
+    flex-basis: 100%;
+}
+.tablebox{
+    flex: 1;
+    min-height: 0;
+    background: white;
+    box-shadow: 0 12px 20px -8px rgba(22, 50, 62, 0.3);
+    border-radius: 10px;
+    padding: 16px;
+    overflow: hidden;
+}
+.tablebox .el-pagination{
+    margin-top: 16px;
+    text-align: right;
+}
+.high-light-number{
+    float: right;
+    margin-left: 5px;
+    background: #FF5722;
+    color: #fff;
+    padding: 1px 4px;
+    border-radius: 2px;
+    margin-top: -1px;
+}
+.time-separator{
+    margin: 0 2px;
+    color: #909399;
+}
+</style>

+ 73 - 26
src/components/page/admin/delivery/DeliveryerManage1.vue

@@ -15,20 +15,28 @@
         </div>
       </div>
       <div class="searchbox">
-        <span>姓名</span>
-        <el-input v-model="filters.name" size="small" style="width:150px" clearable placeholder="配送员姓名"></el-input>
-        <span>手机号</span>
-        <el-input v-model="filters.phone" size="small" style="width:150px" clearable placeholder="手机号"></el-input>
-        <span>类型</span>
-        <el-select v-model="filters.type" size="small" style="width:140px" clearable placeholder="配送员类型">
-          <el-option label="平台配送员" :value="1"></el-option>
-          <el-option label="商家配送员" :value="2"></el-option>
-        </el-select>
-        <span>状态</span>
-        <el-select v-model="filters.accountStatus" size="small" style="width:110px" clearable placeholder="账号状态">
-          <el-option label="正常" :value="1"></el-option>
-          <el-option label="冻结" :value="0"></el-option>
-        </el-select>
+        <div class="filter-group">
+          <span>姓名</span>
+          <el-input v-model="filters.name" size="small" style="width:150px" clearable placeholder="配送员姓名"></el-input>
+        </div>
+        <div class="filter-group">
+          <span>手机号</span>
+          <el-input v-model="filters.phone" size="small" style="width:150px" clearable placeholder="手机号"></el-input>
+        </div>
+        <div class="filter-group">
+          <span>类型</span>
+          <el-select v-model="filters.type" size="small" style="width:140px" clearable placeholder="配送员类型">
+            <el-option label="平台配送员" :value="1"></el-option>
+            <el-option label="商家配送员" :value="2"></el-option>
+          </el-select>
+        </div>
+        <div class="filter-group">
+          <span>状态</span>
+          <el-select v-model="filters.accountStatus" size="small" style="width:110px" clearable placeholder="账号状态">
+            <el-option label="正常" :value="1"></el-option>
+            <el-option label="冻结" :value="0"></el-option>
+          </el-select>
+        </div>
         <span style="flex:1"></span>
         <el-button type="primary" icon="el-icon-search" size="small" @click="search">查询</el-button>
         <el-button size="small" @click="resetSearch">重置</el-button>
@@ -184,26 +192,27 @@ export default {
         {
           prop: 'noOrderStartTimeStr',
           label: '不能接单时间',
-          width: 160,
+          width: 140,
           formatter: row => row.type == 2 && row.noOrderStartTimeStr && row.noOrderEndTimeStr
             ? row.noOrderStartTimeStr + ' - ' + row.noOrderEndTimeStr
-            : ''
+            : row.type == 1 ? '—' : ''
         },
         {
           prop: 'createTime',
           label: '创建时间',
-          width: 160,
-          formatter: row => row.createTime ? this.$moment(row.createTime).format('YYYY-MM-DD HH:mm:ss') : ''
+          width: 150,
+          formatter: row => row.createTime ? this.$moment(row.createTime).format('YYYY-MM-DD HH:mm:ss') : ''
         },
         {
           prop: 'updateTime',
           label: '修改时间',
-          width: 160,
-          formatter: row => row.updateTime ? this.$moment(row.updateTime).format('YYYY-MM-DD HH:mm:ss') : ''
+          width: 150,
+          formatter: row => row.updateTime ? this.$moment(row.updateTime).format('YYYY-MM-DD HH:mm:ss') : ''
         },
         {
           label: '操作',
           width: 220,
+          fixed: 'right',
           button: true,
           group: [
             {
@@ -300,10 +309,19 @@ export default {
     },
     openEdit(row) {
       this.dialogTitle = '编辑配送员'
-      this.form = Object.assign(this.createForm(), JSON.parse(JSON.stringify(row)))
+      this.form = this.createForm()
+      this.form.id = row.id
       this.getMerchantList()
-      this.form.password = ''
       this.dialogVisible = true
+      const querystring = require('querystring')
+      this.$axios.post(baseUrl + '/getById', querystring.stringify({ id: row.id })).then(res => {
+        if (!this.handleResult(res, false, true)) {
+          this.dialogVisible = false
+          return
+        }
+        this.form = Object.assign(this.createForm(), res.data.obj || {})
+        this.form.password = ''
+      })
     },
     handleTypeChange() {
       if (this.form.type === 1) {
@@ -366,7 +384,7 @@ export default {
       }
       const querystring = require('querystring')
       this.saving = true
-      this.$axios.post(baseUrl + '/save', querystring.stringify(this.form)).then(res => {
+      this.$axios.post(baseUrl + '/save', querystring.stringify(this.buildSaveParams())).then(res => {
         if (this.handleResult(res, false)) {
           this.dialogVisible = false
           this.getDataList()
@@ -375,6 +393,23 @@ export default {
         this.saving = false
       })
     },
+    buildSaveParams() {
+      return {
+        id: this.form.id,
+        phone: this.form.phone,
+        password: this.form.password,
+        name: this.form.name,
+        type: this.form.type,
+        merchantId: this.form.type === 2 ? this.form.merchantId : '',
+        workStatus: this.form.workStatus,
+        accountStatus: this.form.accountStatus,
+        pickup: this.form.type === 1 ? this.form.pickup : 0,
+        delivery: this.form.type === 1 ? this.form.delivery : 0,
+        climbStairs: this.form.type === 1 ? this.form.climbStairs : 0,
+        noOrderStartTimeStr: this.form.type === 2 ? this.form.noOrderStartTimeStr : '',
+        noOrderEndTimeStr: this.form.type === 2 ? this.form.noOrderEndTimeStr : ''
+      }
+    },
     validateForm() {
       if (!this.form.name || !this.form.phone) {
         this.$message.error('请填写姓名和手机号')
@@ -398,13 +433,13 @@ export default {
       }
       return true
     },
-    handleResult(res, refresh) {
+    handleResult(res, refresh, silent) {
       if (res.data.rtnBean && res.data.rtnBean.rtnCode != 0) {
         this.$message.error(res.data.rtnBean.rtnMsg)
         if (refresh) this.getDataList()
         return false
       }
-      this.$message.success('操作成功')
+      if (!silent) this.$message.success('操作成功')
       if (refresh) this.getDataList()
       return true
     }
@@ -465,7 +500,16 @@ export default {
     font-size: 13px;
     color: #606266;
 }
-.searchbox > span{ white-space: nowrap; }
+.searchbox > span{ flex: 1; }
+.filter-group{
+    display: flex;
+    align-items: center;
+    gap: 6px;
+}
+.filter-group > span{
+    white-space: nowrap;
+    color: #606266;
+}
 .tablebox{
     flex: 1;
     min-height: 0;
@@ -496,4 +540,7 @@ export default {
 }
 .tablebox td:first-child{ border-left: none !important; }
 .tablebox tr:hover td{ background: #f6faff; }
+/* 弹窗样式优化 */
+.el-dialog__title{ font-weight: 600; }
+.el-dialog__footer .el-button{ padding: 8px 24px; }
 </style>

+ 8 - 0
src/router/index.js

@@ -196,6 +196,14 @@ export default new Router({
                         ], resolve),
                     meta: { titile: "配送订单管理" }
                 },
+                {
+                  path: "/delivery/deliveryOrderManage1",
+                  component: resolve =>
+                        require([
+                            "@/components/page/admin/delivery/DeliveryOrderManage1.vue"
+                        ], resolve),
+                    meta: { titile: "新配送订单管理" }
+                },
                 {
                   path: "/delivery/deliveryerManage",
                   component: resolve =>