店铺申请

This commit is contained in:
墨大叔 2024-08-05 15:42:58 +08:00
parent fcb6008b6f
commit 339cfbb4f6
8 changed files with 113 additions and 26 deletions

View File

@ -42,3 +42,12 @@ export function delStoreApply(id) {
method: 'delete'
})
}
// 审核店铺申请
export function approvalStoreApply(data) {
return request({
url: '/ss/storeApply/approval',
method: 'put',
data
})
}

View File

@ -1,7 +1,8 @@
// 视图
export const views = {
user: 'user', // 用户
device: 'device' // 设备
device: 'device', // 设备
store: 'store', // 店铺
}
// 收款账户类型

View File

@ -4,20 +4,28 @@
<el-row type="flex">
<image-preview :src="store.picture" :width="80" :height="80"/>
<div style="flex: 1;margin-left: 2em">
<el-descriptions>
<el-descriptions :column="4">
<el-descriptions-item label="店铺名称">{{store.name | defaultValue}}</el-descriptions-item>
<el-descriptions-item label="店铺类型">
<dict-tag :value="store.type" :options="dict.type.ss_store_type" size="small"/>
</el-descriptions-item>
<el-descriptions-item label="所属商户">{{store.userName | defaultValue}}</el-descriptions-item>
<el-descriptions-item label="店铺状态">
<dict-tag :value="store.status" :options="dict.type.store_status" size="small"/>
</el-descriptions-item>
<el-descriptions-item label="是否生效">
<el-tag :type="store.enabled ? 'success' : 'danger'" size="small">{{store.enabled ? '已生效' : '未生效'}}</el-tag>
</el-descriptions-item>
<el-descriptions-item label="创建时间">{{store.createTime | defaultValue}}</el-descriptions-item>
<el-descriptions-item label="营业时间">
{{store.businessTimeStart | defaultValue}} {{store.businessTimeEnd | defaultValue}}
</el-descriptions-item>
<el-descriptions-item label="所属商户">
<user-link :id="store.userId" :name="store.userName"/>
</el-descriptions-item>
<el-descriptions-item label="联系方式">{{store.contactName | defaultValue}}({{store.contactMobile | defaultValue}})</el-descriptions-item>
<el-descriptions-item label="店铺地址" :span="2">
{{store.province}}{{store.city}}{{store.county}}{{store.address}}
</el-descriptions-item>
<el-descriptions-item label="联系方式">{{store.contactName | defaultValue}}({{store.contactMobile | defaultValue}})</el-descriptions-item>
<el-descriptions-item label="创建时间">{{store.createTime | defaultValue}}</el-descriptions-item>
</el-descriptions>
</div>
</el-row>
@ -96,6 +104,9 @@
<el-tab-pane label="收入记录" :lazy="true">
<recharge-list :store-id="store.storeId"/>
</el-tab-pane>
<el-tab-pane label="变更记录" :lazy="true">
<store-apply :query="{storeId: store.storeId}" :view="views.store"/>
</el-tab-pane>
</el-tabs>
</el-card>
@ -109,11 +120,19 @@ import PlaceSearchMap from '@/components/Map/PlaceSearch/PlaceSearchMap.vue'
import DeviceList from '@/views/ss/store/components/deviceList.vue'
import RechargeList from '@/views/ss/store/components/rechargeList.vue'
import StoreRechargeReport from '@/views/ss/store/components/storeRechargeReport.vue'
import UserLink from '@/components/Business/SmUser/UserLink.vue'
import StoreApply from '@/views/ss/storeApply/index.vue'
import { views } from '@/utils/constants'
export default {
name: 'storeDetail',
components: { StoreRechargeReport, RechargeList, DeviceList, PlaceSearchMap },
dicts: ['ss_store_type'],
computed: {
views() {
return views
}
},
components: { StoreApply, UserLink, StoreRechargeReport, RechargeList, DeviceList, PlaceSearchMap },
dicts: ['ss_store_type', 'store_status'],
data() {
return {
loading: false,

View File

@ -88,7 +88,7 @@
<el-table v-loading="loading" :data="storeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="storeId" width="50"/>
<el-table-column label="所属用户" align="center" prop="userName" >
<el-table-column label="所属用户" align="center" prop="userName" width="120">
<user-link slot-scope="d" :id="d.row.userId" :name="d.row.userName"/>
</el-table-column>
<el-table-column label="商户图片" align="center" prop="picture" width="100">
@ -109,7 +109,7 @@
{{d.row.businessTimeStart}} {{d.row.businessTimeEnd}}
</template>
</el-table-column>
<el-table-column label="门店地址" align="center">
<el-table-column label="门店地址" align="center" min-width="200" show-overflow-tooltip>
<template slot-scope="d">
{{d.row.province}}{{d.row.city}}{{d.row.county}}{{d.row.address}}
</template>
@ -124,7 +124,16 @@
<el-tag :type="d.row.enabled ? 'success' : 'danger'">{{d.row.enabled ? '已生效' : '未生效'}}</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" />
<el-table-column label="设备数量" align="center" prop="deviceCount" >
<template slot-scope="d">{{d.row.deviceCount}} </template>
</el-table-column>
<el-table-column label="在线数量" align="center" prop="onlineCount" >
<template slot-scope="d">{{d.row.onlineCount}} </template>
</el-table-column>
<el-table-column label="离线数量" align="center" prop="offlineCount" >
<template slot-scope="d">{{d.row.offlineCount}} </template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button

View File

@ -61,9 +61,15 @@
</el-col>
<el-col v-if="24 - span > 0" :span="24 - span">
<el-card header="审核操作">
<el-form :model="form">
<el-form :model="form" :rules="rules">
<el-form-item label-width="0" prop="verifyRemark">
<el-input v-model="form.verifyRemark" type="textarea" :rows="3" :maxlength="200" show-word-limit placeholder="请输入审核意见"/>
</el-form-item>
</el-form>
<el-row type="flex" style="justify-content: center">
<el-button type="success" plain icon="el-icon-check" @click="handleApproval(true)">通过</el-button>
<el-button type="danger" plain icon="el-icon-close" @click="handleApproval(false)">驳回</el-button>
</el-row>
</el-card>
</el-col>
</el-row>
@ -71,7 +77,7 @@
</template>
<script>
import { getStoreApply } from '@/api/ss/storeApply'
import { approvalStoreApply, getStoreApply } from '@/api/ss/storeApply'
import { StoreApplyStatus } from '@/utils/constants'
import ChangeField from '@/views/ss/storeApply/component/ChangeField.vue'
@ -92,6 +98,7 @@ export default {
oldData: {},
newData: {}
},
rules: {},
form: {}
}
},
@ -112,13 +119,36 @@ export default {
this.getDetail(this.id);
},
methods: {
handleApproval(pass) {
this.form.pass = pass;
this.$confirm(`确定要${pass ? '通过' : '驳回'}吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
approvalStoreApply(this.form).then(res => {
if (res.code === 200) {
this.$message.success("操作成功")
this.getDetail(this.id);
}
})
})
},
getDetail(id) {
this.loading = true;
getStoreApply(id).then(res => {
this.detail = res.data;
this.reset();
}).finally(() => {
this.loading = false;
})
},
reset() {
this.form = {
id: this.detail.id,
verifyRemark: this.detail.verifyRemark,
pass: null
}
}
}
}

View File

@ -209,6 +209,14 @@ export default {
components: { StoreApplyDetail, UserLink, StoreLink },
mixins: [$showColumns],
dicts: ['store_apply_type', 'store_apply_status'],
props: {
query: {
type: Object,
default: () => {
return {}
}
}
},
data() {
return {
showDetail: false,
@ -283,6 +291,10 @@ export default {
};
},
created() {
this.queryParams = {
...this.queryParams,
...this.query
}
this.getList();
},
methods: {

View File

@ -1,17 +1,20 @@
<template>
<div style="padding: 0 20px;" v-loading="loading">
<div style="padding: 2em 1em;" v-loading="loading">
<el-descriptions title="申请信息" :column="2">
<el-descriptions-item label="提现单号">{{detail.billNo | defaultValue}}</el-descriptions-item>
<el-descriptions-item label="状态">
<dict-tag :value="detail.status" :options="dict.type.withdraw_status" size="small"/>
</el-descriptions-item>
<el-descriptions-item label="申请用户">
<user-link :id="detail.userId" :name="detail.userName"/>
</el-descriptions-item>
<el-descriptions-item label="申请时间">{{detail.createTime | defaultValue}}</el-descriptions-item>
<el-descriptions-item label="提现方式">
<!-- <dict-tag :value="detail.channelId" :options="dict.type.channel_type" size="small"/>-->
{{detail.channelName}}
</el-descriptions-item>
<el-descriptions-item label="提现金额">{{detail.money | money | defaultValue}} </el-descriptions-item>
<el-descriptions-item label="到账金额">{{detail.arrivalAmount | money | defaultValue}} </el-descriptions-item>
<el-descriptions-item label="到账金额"><span style="color: red">{{detail.arrivalAmount | money | defaultValue}} </span></el-descriptions-item>
<el-descriptions-item label="余额">{{detail.afterBalance | money | defaultValue}} </el-descriptions-item>
<el-descriptions-item label="服务费">{{detail.serviceCharge | money | defaultValue}} </el-descriptions-item>
</el-descriptions>
@ -67,9 +70,11 @@
import { getWithdraw, passWithDrawBill, rejectWithDrawBill } from '@/api/system/withdraw'
import { AccountType, WithdrawType } from '@/utils/constants'
import { getUserAccountByType } from '@/api/ss/account'
import UserLink from '@/components/Business/SmUser/UserLink.vue'
export default {
name: 'WithdrawDetail',
components: { UserLink },
dicts: ['channel_type','withdraw_status', 'withdraw_type'],
props: {
id: {

View File

@ -76,34 +76,36 @@
<el-table v-loading="loading" :data="billList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="billId" width="50"/>
<el-table-column label="提现单号" align="center" prop="billNo" >
<el-table-column label="ID" align="center" prop="billId" width="80"/>
<el-table-column label="提现单号" align="center" prop="billNo" width="200">
<el-link slot-scope="d" @click="handleView(d.row)" type="primary">{{d.row.billNo}}</el-link>
</el-table-column>
<el-table-column label="到账用户" align="center" prop="mchName" >
<el-table-column label="申请时间" align="center" prop="createTime" width="180"/>
<el-table-column label="申请用户" align="center" prop="mchName" width="160">
<user-link slot-scope="d" :id="d.row.mchId" :name="d.row.mchName"/>
</el-table-column>
<el-table-column label="提现金额" align="center">
<el-table-column label="提现金额" align="center" min-width="100">
<template slot-scope="d">
{{d.row.money | money}}
</template>
</el-table-column>
<el-table-column label="到账金额" align="center">
<el-table-column label="到账金额" align="center" min-width="100">
<template slot-scope="d">
{{d.row.arrivalAmount | money}}
<span style="color: red">
{{d.row.arrivalAmount | money}}
</span>
</template>
</el-table-column>
<el-table-column label="服务费" align="center">
<el-table-column label="服务费" align="center" min-width="100">
<template slot-scope="d">
{{d.row.serviceCharge | money}}
</template>
</el-table-column>
<el-table-column label="渠道成本" align="center">
<el-table-column label="渠道成本" align="center" min-width="100">
<template slot-scope="d">
{{d.row.channelCost | money}}
</template>
</el-table-column>
<el-table-column label="时间" align="center" prop="createTime" width="180"/>
<el-table-column label="到账时间" align="center" prop="payTime" width="180"/>
<el-table-column label="提现方式" align="center" prop="channelName">
<!-- <template slot-scope="d">-->
@ -121,7 +123,7 @@
</template>
</el-table-column>
<el-table-column label="审核意见" align="center" prop="remark"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="100">
<template slot-scope="scope">
<el-button
size="mini"
@ -153,7 +155,7 @@
/>
<el-drawer
title="提现详情"
:with-header="false"
:visible.sync="showDetail"
direction="rtl"
size="800px"