doum
2026-04-17 f45bcaf01cd2c96e66b08d3f9b7287aa5b4cdab2
admin/src/components/business/OperaShopInfoWindow.vue
@@ -1,16 +1,18 @@
<template>
  <GlobalWindow
    :title="title"
    :withFooter="false"
    :visible.sync="visible"
    width="80%"
  >
    <div class="store-header" v-if="storeInfo">
      <div class="store-header-left">
        <!-- <el-image :src="storeInfo.headImage || defaultAvatar" fit="cover" class="store-avatar">
        <el-image v-if="storeInfo.payMemberCoverImage" :src="storeInfo.payMemberCoverImage ? storeInfo.imgPrefix + storeInfo.payMemberCoverImage : ''" fit="cover" class="store-avatar">
          <div slot="error" class="image-slot">
            <i class="el-icon-picture-outline"></i>
          </div>
        </el-image> -->
        </el-image>
        <img  v-if="! storeInfo.payMemberCoverImage" src="@/assets/avatar/man.png" fit="cover" class="store-avatar" />
      </div>
      <div class="store-header-right">
        <div class="store-name">{{ storeInfo.name }}</div>
@@ -38,14 +40,14 @@
    <el-tabs v-model="activeTab" class="store-tabs">
      <el-tab-pane label="门店业绩" name="performance">
        <el-form ref="searchForm" :model="searchForm" inline>
          <el-form-item label="交易号" prop="transactionId">
            <el-input v-model="searchForm.transactionId" clearable placeholder="请输入交易号"></el-input>
          <el-form-item label="交易号" prop="orderNo">
            <el-input v-model="searchForm.orderNo" clearable placeholder="请输入交易号"></el-input>
          </el-form-item>
          <el-form-item label="收支类型" prop="type">
            <el-select v-model="searchForm.type" clearable placeholder="请选择类型">
              <el-option label="全部" :value="0"></el-option>
          <el-form-item label="收支类型" prop="optType">
            <el-select v-model="searchForm.optType" clearable placeholder="请选择类型">
              <el-option label="全部" value=""></el-option>
              <el-option label="收入" :value="1"></el-option>
              <el-option label="支出" :value="2"></el-option>
              <el-option label="支出" :value="-1"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="收支时间" prop="createTime">
@@ -62,26 +64,32 @@
        <el-table :data="tableData.list" border stripe v-loading="isWorking.search" class="performance-table">
          <el-table-column label="收入/支出" min-width="100px">
            <template slot-scope="{row}">
              <span :class="row.type === 1 ? 'income' : 'expense'">{{ row.type === 1 ? '收入' : '支出' }}</span>
              <span :class="row.optType === 1 ? 'income' : 'expense'">{{ row.optType === 1 ? '收入' : '支出' }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="amount" label="金额(元)" min-width="100px">
            <template slot-scope="{row}">
              <span :class="row.type === 1 ? 'income' : 'expense'">{{ row.amount }}</span>
              <span :class="row.optType === 1 ? 'income' : 'expense'">{{ row.amount }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="createTime" label="收支时间" min-width="160px"></el-table-column>
          <el-table-column prop="businessType" label="业务类型" min-width="100px"></el-table-column>
          <el-table-column prop="transactionId" label="交易号" min-width="180px"></el-table-column>
          <el-table-column label="业务类型" min-width="100px">
            <template slot-scope="{row}">
              <span v-if="row.type === 0">完成订单</span>
              <span v-if="row.type === 1">提现支出</span>
              <span v-if="row.type === 2">提现退回</span>
              <span v-if="row.type === 3">平台奖励</span>
            </template>
          </el-table-column>
          <el-table-column prop="orderNo" label="交易号" min-width="180px"></el-table-column>
          <el-table-column label="状态" min-width="100px">
            <template slot-scope="{row}">
              <span :class="row.status === 1 ? 'status-success' : 'status-pending'">
                {{ row.status === 1 ? '已到账' : '提现中' }}
              <span :class="row.vaildStatus === 1 ? 'status-success' : 'status-pending'">
                {{ row.vaildStatus === 1 ? '已到账' : '提现中' }}
              </span>
            </template>
          </el-table-column>
        </el-table>
        <pagination
          @size-change="handleSizeChange"
          @current-change="handlePageChange"
@@ -133,19 +141,19 @@
              <div class="image-section">
                <div class="image-item">
                  <span class="label">法人身份证正面:</span>
                  <el-image :src="storeInfo.idcardImg" fit="cover" class="qualification-image" :preview-src-list="[storeInfo.idcardImg]">
                  <el-image :src="storeInfo.idcardImgUrl" fit="cover" class="qualification-image" :preview-src-list="[storeInfo.idcardImgUrl]">
                    <div slot="error" class="image-slot"><i class="el-icon-picture-outline"></i></div>
                  </el-image>
                </div>
                <div class="image-item">
                  <span class="label">法人身份证反面:</span>
                  <el-image :src="storeInfo.idcardImgBack" fit="cover" class="qualification-image" :preview-src-list="[storeInfo.idcardImgBack]">
                  <el-image :src="storeInfo.idcardImgBackUrl" fit="cover" class="qualification-image" :preview-src-list="[storeInfo.idcardImgBackUrl]">
                    <div slot="error" class="image-slot"><i class="el-icon-picture-outline"></i></div>
                  </el-image>
                </div>
                <div class="image-item">
                  <span class="label">营业执照:</span>
                  <el-image :src="storeInfo.businessImg" fit="cover" class="qualification-image" :preview-src-list="[storeInfo.businessImg]">
                  <el-image :src="storeInfo.businessImgUrl" fit="cover" class="qualification-image" :preview-src-list="[storeInfo.businessImgUrl]">
                    <div slot="error" class="image-slot"><i class="el-icon-picture-outline"></i></div>
                  </el-image>
                </div>
@@ -160,14 +168,14 @@
              </div>
              <div class="image-item-row">
                <span class="label">身份证反面:</span>
                <el-image :src="storeInfo.idcardImgBack" fit="cover" class="qualification-image" :preview-src-list="[storeInfo.idcardImgBack]">
                <el-image :src="storeInfo.idcardImgBackUrl" fit="cover" class="qualification-image" :preview-src-list="[storeInfo.idcardImgBackUrl]">
                  <div slot="error" class="image-slot"><i class="el-icon-picture-outline"></i></div>
                </el-image>
              </div>
              <div class="image-item-row">
                <span class="label">有效劳动合同:</span>
                <div class="image-list">
                  <el-image v-for="(img, index) in storeInfo.laborContractImgs" :key="index" :src="img" fit="cover" class="qualification-image" :preview-src-list="storeInfo.laborContractImgs">
                  <el-image v-for="(img, index) in storeInfo.laborContractImgUrls" :key="index" :src="img" fit="cover" class="qualification-image" :preview-src-list="storeInfo.laborContractImgUrls">
                    <div slot="error" class="image-slot"><i class="el-icon-picture-outline"></i></div>
                  </el-image>
                </div>
@@ -175,7 +183,7 @@
              <div class="image-item-row">
                <span class="label">社保缴纳证明:</span>
                <div class="image-list">
                  <el-image v-for="(img, index) in storeInfo.socialSecurityImgs" :key="index" :src="img" fit="cover" class="qualification-image" :preview-src-list="storeInfo.socialSecurityImgs">
                  <el-image v-for="(img, index) in storeInfo.socialSecurityImgUrls" :key="index" :src="img" fit="cover" class="qualification-image" :preview-src-list="storeInfo.socialSecurityImgUrls">
                    <div slot="error" class="image-slot"><i class="el-icon-picture-outline"></i></div>
                  </el-image>
                </div>
@@ -188,7 +196,7 @@
            <div class="image-item-row">
              <span class="label">门店门头照:</span>
              <div class="image-list">
                <el-image v-for="(img, index) in storeInfo.storeFrontImgs" :key="index" :src="img" fit="cover" class="qualification-image" :preview-src-list="storeInfo.storeFrontImgs">
                <el-image v-for="(img, index) in storeInfo.storeFrontImgUrls" :key="index" :src="img" fit="cover" class="qualification-image" :preview-src-list="storeInfo.storeFrontImgUrls">
                  <div slot="error" class="image-slot"><i class="el-icon-picture-outline"></i></div>
                </el-image>
              </div>
@@ -196,7 +204,7 @@
            <div class="image-item-row">
              <span class="label">门店内部照片:</span>
              <div class="image-list">
                <el-image v-for="(img, index) in storeInfo.storeInteriorImgs" :key="index" :src="img" fit="cover" class="qualification-image" :preview-src-list="storeInfo.storeInteriorImgs">
                <el-image v-for="(img, index) in storeInfo.storeInteriorImgUrls" :key="index" :src="img" fit="cover" class="qualification-image" :preview-src-list="storeInfo.storeInteriorImgUrls">
                  <div slot="error" class="image-slot"><i class="el-icon-picture-outline"></i></div>
                </el-image>
              </div>
@@ -204,7 +212,7 @@
            <div class="image-item-row">
              <span class="label">其它材料:</span>
              <div class="image-list">
                <el-image v-for="(img, index) in storeInfo.otherMaterialImgs" :key="index" :src="img" fit="cover" class="qualification-image" :preview-src-list="storeInfo.otherMaterialImgs">
                <el-image v-for="(img, index) in storeInfo.otherMaterialImgUrls" :key="index" :src="img" fit="cover" class="qualification-image" :preview-src-list="storeInfo.otherMaterialImgUrls">
                  <div slot="error" class="image-slot"><i class="el-icon-picture-outline"></i></div>
                </el-image>
              </div>
@@ -221,6 +229,7 @@
import GlobalWindow from '@/components/common/GlobalWindow'
import Pagination from '@/components/common/Pagination'
import { detail } from '@/api/business/shopInfo'
import { fetchList, exportExcel } from '@/api/business/revenue'
export default {
  name: 'OperaShopInfoWindow',
  extends: BaseOpera,
@@ -230,9 +239,11 @@
      activeTab: 'performance',
      storeInfo: null,
      searchForm: {
        transactionId: '',
        type: 0,
        createTime: ''
        orderNo: '',
        optType: 0,
        createTime: '',
        memberId: '',
        memberType: 2
      },
      tableData: {
        list: [],
@@ -257,14 +268,17 @@
  },
  methods: {
    open (title, row) {
      this.searchForm.memberId = row.id
      detail(row.id)
        .then(res => {
          this.storeInfo = res
          this.activeTab = 'performance'
          this.searchForm = {
            transactionId: '',
            type: 0,
            createTime: ''
            orderNo: '',
            optType: '',
            createTime: '',
            memberId: '',
            memberType: 2
          }
          this.title = title
          this.visible = true
@@ -277,15 +291,18 @@
    search () {
      this.isWorking.search = true
      const data = {
        pageIndex: this.tableData.pagination.pageIndex,
        pageSize: this.tableData.pagination.pageSize,
        shopId: this.storeInfo?.id,
        transactionId: this.searchForm.transactionId,
        type: this.searchForm.type,
        startTime: this.searchForm.createTime?.[0] || '',
        endTime: this.searchForm.createTime?.[1] || ''
        capacity: this.tableData.pagination.pageSize,
        page: this.tableData.pagination.pageIndex,
        model: {
          orderNo: this.searchForm.orderNo,
          optType: this.searchForm.optType,
          startTime: this.searchForm.createTime?.[0] || '',
          endTime: this.searchForm.createTime?.[1] || '',
          memberId: this.searchForm.memberId,
          memberType: this.searchForm.memberType || ''
        }
      }
      this.api.fetchPerformance(data)
      fetchList(data)
        .then(res => {
          this.tableData.list = res.list || []
          this.tableData.pagination.total = res.total || 0
@@ -299,9 +316,11 @@
    },
    reset () {
      this.searchForm = {
        transactionId: '',
        type: 0,
        createTime: ''
        orderNo: '',
        optType: '',
        createTime: '',
        memberId: '',
        memberType: 2
      }
      this.search()
    },
@@ -316,14 +335,20 @@
    exportExcel () {
      this.isWorking.export = true
      const data = {
        shopId: this.storeInfo?.id,
        transactionId: this.searchForm.transactionId,
        type: this.searchForm.type,
        startTime: this.searchForm.createTime?.[0] || '',
        endTime: this.searchForm.createTime?.[1] || ''
        capacity: 999999,
        page: this.tableData.pagination.pageIndex,
        model: {
          orderNo: this.searchForm.orderNo,
          optType: this.searchForm.optType,
          startTime: this.searchForm.createTime?.[0] || '',
          endTime: this.searchForm.createTime?.[1] || '',
          memberId: this.searchForm.memberId,
          memberType: this.searchForm.memberType || ''
        }
      }
      this.api.exportPerformance(data)
      exportExcel(data)
        .then(res => {
          this.download(res)
          this.$tip.apiSuccess('导出成功')
        })
        .catch(e => {
@@ -470,4 +495,4 @@
  color: #909399;
  font-size: 20px;
}
</style>
</style>