jiangping
2025-02-21 1baed91dd6c4cfc8a230c2857132ef6302cc4f3c
admin/src/views/combo/order.vue
@@ -6,21 +6,33 @@
      <el-button type="primary" @click="handleEx()">导出</el-button>
    </div>
    <el-table v-loading="loading" :data="list" stripe border>
      <el-table-column prop="code" align="center" label="订单编号" min-width="140" show-overflow-tooltip>
      <el-table-column prop="code" align="center" label="订单编号" min-width="180" show-overflow-tooltip>
        <template scope="{row}">
          <span class="primaryColor pointer">{{ row.orderId }}</span>
          <span @click="handleDetail(row.id)" class="primaryColor pointer">{{ row.code }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="" align="center" label="套餐卡" min-width="120" show-overflow-tooltip />
      <el-table-column prop="" align="center" label="合计(元)" min-width="80" show-overflow-tooltip />
      <el-table-column prop="" align="center" label="实付(元)" min-width="80" show-overflow-tooltip />
      <el-table-column prop="" align="center" label="已退金额(元)" min-width="100" show-overflow-tooltip />
      <el-table-column prop="" align="center" label="用户信息" min-width="120" show-overflow-tooltip />
      <el-table-column prop="" align="center" label="订单状态" min-width="110" show-overflow-tooltip />
      <el-table-column prop="discountName" align="center" label="套餐卡" min-width="120" show-overflow-tooltip />
      <el-table-column prop="money" align="center" label="合计(元)" min-width="80" show-overflow-tooltip />
      <el-table-column prop="money" align="center" label="实付(元)" min-width="80" show-overflow-tooltip />
      <el-table-column prop="refundMoney" align="center" label="已退金额(元)" min-width="100" show-overflow-tooltip />
      <el-table-column prop="memberId" align="center" label="用户信息" min-width="140" show-overflow-tooltip />
      <el-table-column prop="payWay" align="center" label="支付方式" min-width="80" show-overflow-tooltip>
        <template v-slot="{ row }">
          <span v-if="row.payWay == 0">微信支付</span>
          <span v-if="row.payWay == 1">支付宝</span>
        </template>
      </el-table-column>
      <el-table-column prop="payWay" align="center" label="订单来源" min-width="80" show-overflow-tooltip>
        <template v-slot="{ row }">
          <span>小程序端</span>
        </template>
      </el-table-column>
      <el-table-column prop="refundUserName" align="center" label="操作人" min-width="80" show-overflow-tooltip />
      <el-table-column prop="createDate" align="center" label="创建时间" min-width="140" show-overflow-tooltip />
      <el-table-column label="操作" fixed="right" align="center" min-width="80" show-overflow-tooltip>
        <template v-slot="{ row }">
          <span @click="handleDetail(row.id)" v-permissions="['business:ywoutinboundrecord:query']"
            class="primaryColor pointer">查看详情</span>
          <span @click="handleDetail(row.id)" class="primaryColor pointer">查看详情</span>
          <span v-if="row.status == 1 && (row.refundMoney < row.money)" @click="handRefund(row.id)" class="primaryColor pointer ml10">退款</span>
        </template>
      </el-table-column>
    </el-table>
@@ -28,7 +40,8 @@
      <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" />
    </div>
    <!--  -->
    <OrderDetail v-if="isShowDetail" ref="OrderDetailRef" />
    <OrderDetail ref="OrderDetailRef" />
    <Refund ref="RefundRef" @success="getList" />
  </div>
</template>
@@ -36,20 +49,26 @@
import BasePageTemp from '@/components/base/BasePageTemp'
import Breadcrumb from '@/layouts/Breadcrumb'
import OrderDetail from './components/OrderDetail.vue'
import Refund from './components/Refund'
import {
  comboOrderPost,
  comboListOrderEx,
  comboOrderDetailPost
} from '@/api/business/combo.js'
export default {
  extends: BasePageTemp,
  components: {
    Breadcrumb,
    OrderDetail
    OrderDetail,
    Refund
  },
  data() {
    return {
      loading: false,
      isShowDetail: false,
      queryFormConfig: {
        formItems: [
          {
            filed: 'orderId',
            filed: 'id',
            type: 'input',
            label: '订单编号',
          },
@@ -69,7 +88,10 @@
            filed: 'status',
            type: 'select',
            label: '订单状态',
            options: []
            options: [
              { label: '未支付', value: 0 },
              { label: '已支付', value: 1 },
            ]
          },
          {
            filed: 'time',
@@ -87,12 +109,15 @@
    }
  },
  created() {
    // this.getList()
    this.getList()
    // this.initData()
  },
  methods: {
    handRefund(id) {
      this.$refs.RefundRef.open(id)
    },
    handleDetail(id) {
      getDetail(id)
      comboOrderDetailPost({id})
        .then(res => {
          this.$refs.OrderDetailRef.open('订单详情', res)
        })
@@ -104,8 +129,8 @@
      this.$dialog.exportConfirm('确认导出吗?')
        .then(() => {
          this.loading = true
          ywOutinboundEx({
            page: this.pagination.page,
          comboListOrderEx({
            page: 1,
            capacity: 1000000,
            model: this.filters
          })
@@ -130,20 +155,16 @@
      const { pagination, filters } = this
      this.loading = true
      if (page) { pagination.page = page }
      ywOutinboundPage({
      comboOrderPost({
        model: {
          ...filters,
          inOut: 0
          type: 1
        },
        // sorts: [{ direction: 'DESC', property: 'param1' }],
        capacity: pagination.pageSize,
        page: page,
        page: pagination.page,
      }).then(res => {
        this.loading = false
        this.list = res.records || []
        this.list.forEach(item => {
          item.typeName = this.StoreTypeOps[item.type].name
        })
        this.pagination.total = res.total || 0
      }, () => {
        this.loading = false