doum
2026-04-29 59b1f0e9967902aa10f5e017d5a0bdfd1b60c9ea
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<template>
  <TableLayout :permissions="['business:ordersRefund:query']">
    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
      <el-form-item label="订单编号" prop="orderCode">
        <el-input v-model="searchForm.orderCode" clearable placeholder="请输入订单编号" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="物品信息" prop="goodsInfo">
        <el-input v-model="searchForm.goodsInfo" clearable placeholder="请输入物品信息" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="创建时间" prop="createTime1">
        <el-date-picker type="daterange" v-model="searchForm.createTime1" clearable value-format="yyyy-MM-dd HH:mm:ss"
                        range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="handleDateChange" />
      </el-form-item>
      <el-form-item label="类型" prop="orderType">
        <el-select v-model="searchForm.orderType" clearable placeholder="请选择类型" @change="search">
          <el-option label="就地存取" :value="0"></el-option>
          <el-option label="同城寄送" :value="1"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="退款状态" prop="refundStatus">
        <el-select v-model="searchForm.refundStatus" clearable placeholder="请选择状态" @change="search">
          <el-option label="退款中" :value="0"></el-option>
          <el-option label="退款成功" :value="1"></el-option>
          <el-option label="退款失败" :value="2"></el-option>
        </el-select>
      </el-form-item>
      <section>
        <el-button type="primary" @click="search">搜索</el-button>
        <el-button @click="reset">重置</el-button>
        <el-button :loading="isWorking.export" @click="exportExcel">导出</el-button>
      </section>
    </el-form>
    <template v-slot:table-wrap>
      <el-table
          :height="tableHeightNew"
          v-loading="isWorking.search"
          :data="tableData.list"
          stripe
      >
        <el-table-column prop="orderCode" label="订单编号" min-width="160px">
          <template slot-scope="{row}">
            <span class="order-no" @click="handleOrderDetail(row)">{{ row.orderCode }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="goodsInfo" label="物品信息" min-width="120px"></el-table-column>
        <el-table-column label="类型" min-width="80px">
          <template slot-scope="{row}">
            <span v-if="row.orderType === 0">就地存取</span>
            <span v-else-if="row.orderType === 1">同城寄送</span>
            <span v-else>-</span>
          </template>
        </el-table-column>
        <el-table-column prop="goodLevelName" label="订单级别" min-width="80px"></el-table-column>
        <el-table-column label="订单总价(元)" min-width="120px">
          <template slot-scope="{row}">¥{{ (row.totalAmount / 100).toFixed(2) }}</template>
        </el-table-column>
        <el-table-column label="实付现金(元)" min-width="120px">
          <template slot-scope="{row}">¥{{ (row.payAmount / 100).toFixed(2) }}</template>
        </el-table-column>
        <el-table-column label="退款金额(元)" min-width="120px">
          <template slot-scope="{row}">¥{{ (row.refundAmount / 100).toFixed(2) }}</template>
        </el-table-column>
        <el-table-column prop="createTime" label="退款时间" min-width="80px"></el-table-column>
        <el-table-column label="退款状态" min-width="100px">
          <template slot-scope="{row}">
            <span v-if="row.refundStatus ===0" class="yellowstate">退款中</span>
            <span v-if="row.refundStatus ===1" class="greenstate">退款成功</span>
            <span v-if="row.refundStatus ===2" class="redstate">退款失败</span>
          </template>
        </el-table-column>
        <el-table-column label="操作" min-width="120" fixed="right" v-permissions="['business:ordersRefund:update']">
          <template slot-scope="{row}">
            <el-button  v-if="row.refundStatus === 2" type="text" @click="refundDo(row)">重新退款</el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination
          @size-change="handleSizeChange"
          @current-change="handlePageChange"
          :pagination="tableData.pagination"
      ></pagination>
    </template>
    <OperaDispatch ref="operaDispatch" />
    <OperaOrderDetail ref="operaOrderDetail" />
  </TableLayout>
</template>
 
<script>
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaDispatch from '@/components/business/OperaDispatch'
import OperaOrderDetail from '@/components/business/OperaOrderDetail'
export default {
  name: 'OrderManagement',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaDispatch, OperaOrderDetail },
  data () {
    return {
      searchForm: {
        createTime1: null,
        createEndTime: null,
        createStartTime: null,
        goodsInfo: null,
        orderCode: null,
        orderType: null,
        refundStatus: null      }
    }
  },
  created () {
    this.config({
      api: '/business/ordersRefund',
      'field.id': 'id'
    })
    this.search()
  },
  methods: {
    handleDateChange (val) {
      this.searchForm.createStartTime = val ? val[0] : ''
      this.searchForm.createEndTime = val ? val[1] : ''
      this.search()
    },
    reset () {
      this.searchForm = {
        orderNo: '',
        goodsInfo: '',
        createTime1: '',
        createStartTime: '',
        createEndTime: '',
        sendShopName: '',
        receiveShopName: '',
        type: '',
        orderStatus: '',
        settleStatus: ''
      }
      this.search()
    },
    refundDo (row) {
 
    },
    handleOrderDetail (row) {
      if(row.orderId){
        this.$refs.operaOrderDetail.open({id:row.orderId})
      }
    }
  }
}
</script>
<style scoped>
.order-no {
  color: #2E68EC;
  text-decoration: underline;
  cursor: pointer;
}
</style>