| | |
| | | <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 :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> |
| | | </div> |
| | | <div class="store-header-right"> |
| | | <div class="store-name">{{ storeInfo.name }}</div> |
| | |
| | | <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"> |
| | |
| | | <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" |
| | |
| | | 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, |
| | |
| | | activeTab: 'performance', |
| | | storeInfo: null, |
| | | searchForm: { |
| | | transactionId: '', |
| | | type: 0, |
| | | createTime: '' |
| | | orderNo: '', |
| | | optType: 0, |
| | | createTime: '', |
| | | memberId: '', |
| | | memberType: 2 |
| | | }, |
| | | tableData: { |
| | | list: [], |
| | |
| | | }, |
| | | 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 |
| | |
| | | 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 |
| | |
| | | }, |
| | | reset () { |
| | | this.searchForm = { |
| | | transactionId: '', |
| | | type: 0, |
| | | createTime: '' |
| | | orderNo: '', |
| | | optType: '', |
| | | createTime: '', |
| | | memberId: '', |
| | | memberType: 2 |
| | | } |
| | | this.search() |
| | | }, |
| | |
| | | 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 => { |