add: 优化
This commit is contained in:
@@ -10,6 +10,14 @@ const ShopApi = {
|
|||||||
params: params,
|
params: params,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/** 获取店铺分店列表*/
|
||||||
|
getOtherShopList(params : PageQuery) {
|
||||||
|
return request<any, ShopInfoEditDTO[]>({
|
||||||
|
url: `${baseURL}/otherShop`,
|
||||||
|
method: "get",
|
||||||
|
params: params,
|
||||||
|
});
|
||||||
|
},
|
||||||
getBranchList(params : PageQuery) {
|
getBranchList(params : PageQuery) {
|
||||||
return request<any, ShopInfoEditDTO[]>({
|
return request<any, ShopInfoEditDTO[]>({
|
||||||
url: `${baseURL}/branchList`,
|
url: `${baseURL}/branchList`,
|
||||||
|
|||||||
@@ -33,6 +33,13 @@ const API = {
|
|||||||
data
|
data
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//优惠券发放
|
||||||
|
getRecordByUser(params : any) {
|
||||||
|
return request<any>({
|
||||||
|
url: `${baseURL}/getRecordByUser`,
|
||||||
|
method: "get",
|
||||||
|
params
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
export default API;
|
export default API;
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,12 @@
|
|||||||
v-model:isOpen="basicForm.isOpen"
|
v-model:isOpen="basicForm.isOpen"
|
||||||
></HeaderCard>
|
></HeaderCard>
|
||||||
<el-tabs class="mt-4" v-model="activeTab" type="border-card">
|
<el-tabs class="mt-4" v-model="activeTab" type="border-card">
|
||||||
<el-tab-pane :label="item.label" v-for="item in configs" :key="item.name" :name="item.name">
|
<el-tab-pane
|
||||||
|
:label="item.label"
|
||||||
|
v-for="item in configs"
|
||||||
|
:key="item.name"
|
||||||
|
:name="item.name"
|
||||||
|
>
|
||||||
<template v-if="item.name == 'basic'">
|
<template v-if="item.name == 'basic'">
|
||||||
<h3>基础设置</h3>
|
<h3>基础设置</h3>
|
||||||
<el-form ref="form" :model="basicForm">
|
<el-form ref="form" :model="basicForm">
|
||||||
@@ -17,7 +22,9 @@
|
|||||||
<el-radio :value="1">是</el-radio>
|
<el-radio :value="1">是</el-radio>
|
||||||
<el-radio :value="0">否</el-radio>
|
<el-radio :value="0">否</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<small class="color-999 m-l-6">*成为会员前需提交生日、姓名、性别信息。</small>
|
<small class="color-999 m-l-6">
|
||||||
|
*成为会员前需提交生日、姓名、性别信息。
|
||||||
|
</small>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="会员开通方式">
|
<el-form-item label="会员开通方式">
|
||||||
<el-radio-group v-model="basicForm.openType">
|
<el-radio-group v-model="basicForm.openType">
|
||||||
@@ -28,29 +35,48 @@
|
|||||||
<!-- 购买开通 -->
|
<!-- 购买开通 -->
|
||||||
<div v-if="basicForm.openType == 'PAY'">
|
<div v-if="basicForm.openType == 'PAY'">
|
||||||
<el-form-item label="会员周期列表">
|
<el-form-item label="会员周期列表">
|
||||||
<el-button type="primary" @click="refDialogPlans.open()">添加方案</el-button>
|
<el-button type="primary" @click="refDialogPlans.open()">
|
||||||
|
添加方案
|
||||||
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="">
|
<el-form-item label="">
|
||||||
<el-table :data="basicForm.configList" border style="width: 60%">
|
<el-table :data="basicForm.configList" border style="width: 60%">
|
||||||
<el-table-column prop="name" label="名称" align="center" />
|
<el-table-column prop="name" label="名称" align="center" />
|
||||||
<el-table-column prop="price" label="价格" align="center" />
|
<el-table-column prop="price" label="价格" align="center" />
|
||||||
<el-table-column prop="reward" label="赠送成长值" align="center" />
|
<el-table-column
|
||||||
|
prop="reward"
|
||||||
|
label="赠送成长值"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
<el-table-column label="赠送优惠券" align="center">
|
<el-table-column label="赠送优惠券" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ totalCount(scope.row.couponList) }}张优惠券
|
{{ totalCount(scope.row.couponList) }}张优惠券
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="is_auto_renew" label="会员周期" align="center">
|
<el-table-column
|
||||||
|
prop="is_auto_renew"
|
||||||
|
label="会员周期"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.circleTime }} {{ scope.row.circleUnit }}
|
{{ scope.row.circleTime }} {{ scope.row.circleUnit }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="text" @click="refDialogPlans.open(scope.row, scope.$index)">
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="
|
||||||
|
refDialogPlans.open(scope.row, scope.$index)
|
||||||
|
"
|
||||||
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="text" style="color: red" @click="deletePlan(scope.row)">
|
<el-button
|
||||||
|
type="text"
|
||||||
|
style="color: red"
|
||||||
|
@click="deletePlan(scope.row)"
|
||||||
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -62,8 +88,14 @@
|
|||||||
<div v-if="basicForm.openType == 'CONDITION'">
|
<div v-if="basicForm.openType == 'CONDITION'">
|
||||||
<el-form-item label="成为会员条件">
|
<el-form-item label="成为会员条件">
|
||||||
<div>
|
<div>
|
||||||
<div class="m-b-2" v-for="(item, index) in conditionLists" :key="index">
|
<div
|
||||||
<el-checkbox v-model="item.checked">{{ item.label }}</el-checkbox>
|
class="m-b-2"
|
||||||
|
v-for="(item, index) in conditionLists"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<el-checkbox v-model="item.checked">
|
||||||
|
{{ item.label }}
|
||||||
|
</el-checkbox>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
style="margin-left: 20px"
|
style="margin-left: 20px"
|
||||||
v-if="item.label != '绑定手机号' && item.checked"
|
v-if="item.label != '绑定手机号' && item.checked"
|
||||||
@@ -83,7 +115,10 @@
|
|||||||
<el-radio value="PART">指定门店</el-radio>
|
<el-radio value="PART">指定门店</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="选择门店" v-if="basicForm.memberPriceShopType == 'PART'">
|
<el-form-item
|
||||||
|
label="选择门店"
|
||||||
|
v-if="basicForm.memberPriceShopType == 'PART'"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
style="max-width: 600px"
|
style="max-width: 600px"
|
||||||
v-model="basicForm.memberPriceShopIdList"
|
v-model="basicForm.memberPriceShopIdList"
|
||||||
@@ -146,7 +181,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="flex mt-10 justify-center gap-10">
|
<div class="flex mt-10 justify-center gap-10">
|
||||||
<el-button style="width: 100px" type="primary" @click="basicSubmit" size="large">
|
<el-button
|
||||||
|
style="width: 100px"
|
||||||
|
type="primary"
|
||||||
|
@click="basicSubmit"
|
||||||
|
size="large"
|
||||||
|
>
|
||||||
保存
|
保存
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="close" style="width: 100px" size="large">取消</el-button>
|
<el-button @click="close" style="width: 100px" size="large">取消</el-button>
|
||||||
@@ -287,7 +327,10 @@
|
|||||||
type="number"
|
type="number"
|
||||||
placeholder="请输入周期时间"
|
placeholder="请输入周期时间"
|
||||||
/>
|
/>
|
||||||
<el-select v-model="level.cycleUnit" placeholder="选择单位">
|
<el-select
|
||||||
|
v-model="level.cycleUnit"
|
||||||
|
placeholder="选择单位"
|
||||||
|
>
|
||||||
<el-option label="周" value="周" />
|
<el-option label="周" value="周" />
|
||||||
<el-option label="月" value="月" />
|
<el-option label="月" value="月" />
|
||||||
<el-option label="年" value="年" />
|
<el-option label="年" value="年" />
|
||||||
@@ -306,7 +349,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex mt-4" style="align-items: flex-start">
|
<div class="flex mt-4" style="align-items: flex-start">
|
||||||
<span class="color-666 no-wrap mr-4">送优惠券</span>
|
<span class="color-666 no-wrap mr-4">送优惠券</span>
|
||||||
<CouponLists v-model="level.cycleRewardCouponList" />
|
<CouponLists
|
||||||
|
v-model="level.cycleRewardCouponList"
|
||||||
|
/>
|
||||||
<!-- <el-select v-model="level.autoSendCoupon" placeholder="选择赠送优惠券">
|
<!-- <el-select v-model="level.autoSendCoupon" placeholder="选择赠送优惠券">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="coupon in couponList"
|
v-for="coupon in couponList"
|
||||||
@@ -329,7 +374,9 @@
|
|||||||
>
|
>
|
||||||
保存
|
保存
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="close" style="width: 100px" size="large">取消</el-button>
|
<el-button @click="close" style="width: 100px" size="large">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@@ -431,7 +478,10 @@ function basicSubmit() {
|
|||||||
// data.configList = null;
|
// data.configList = null;
|
||||||
// }
|
// }
|
||||||
console.log(data);
|
console.log(data);
|
||||||
if (basicForm.openType == "PAY" && (!basicForm.configList || basicForm.configList.length <= 0)) {
|
if (
|
||||||
|
basicForm.openType == "PAY" &&
|
||||||
|
(!basicForm.configList || basicForm.configList.length <= 0)
|
||||||
|
) {
|
||||||
return ElMessage.error("请添加会员方案");
|
return ElMessage.error("请添加会员方案");
|
||||||
}
|
}
|
||||||
data.conditionList = conditionLists.value
|
data.conditionList = conditionLists.value
|
||||||
@@ -598,6 +648,7 @@ async function init() {
|
|||||||
});
|
});
|
||||||
memberApi.getConfig().then((res) => {
|
memberApi.getConfig().then((res) => {
|
||||||
Object.assign(basicForm, res);
|
Object.assign(basicForm, res);
|
||||||
|
basicForm.isOpen = +basicForm.isOpen;
|
||||||
res.conditionList = res.conditionList || [];
|
res.conditionList = res.conditionList || [];
|
||||||
res.configList = res.configList || [];
|
res.configList = res.configList || [];
|
||||||
conditionLists.value = conditionLists.value.map((v) => {
|
conditionLists.value = conditionLists.value.map((v) => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="gyq_container">
|
||||||
<div class="content">
|
<div class="gyq_content">
|
||||||
<HeaderCard
|
<HeaderCard
|
||||||
name="智慧充值"
|
name="智慧充值"
|
||||||
intro="允许客户充值并使用余额支付"
|
intro="允许客户充值并使用余额支付"
|
||||||
@@ -294,9 +294,9 @@ onMounted(async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.container {
|
.gyq_container {
|
||||||
padding: 14px;
|
padding: 14px;
|
||||||
.content {
|
.gyq_content {
|
||||||
padding: 14px;
|
padding: 14px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|||||||
326
src/views/shop/list/branch_list.vue
Normal file
326
src/views/shop/list/branch_list.vue
Normal file
@@ -0,0 +1,326 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<div class="head-container">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="3">
|
||||||
|
<el-input
|
||||||
|
v-model="state.query.name"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入店铺名称"
|
||||||
|
style="width: 100%"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter="getTableData"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<el-input
|
||||||
|
v-model="state.query.account"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入商户号"
|
||||||
|
style="width: 100%"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter="getTableData"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<el-select
|
||||||
|
v-model="state.query.status"
|
||||||
|
placeholder="请选择店铺状态"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in state.status"
|
||||||
|
:key="item.type"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.type"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||||
|
<el-button @click="resetHandle">重置</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div class="head-container">
|
||||||
|
<el-button type="primary" icon="plus" @click="addShopShow">添加店铺</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="head-container">
|
||||||
|
<el-table v-loading="state.tableData.loading" :data="state.tableData.list">
|
||||||
|
<el-table-column label="店铺信息" width="200">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<div class="shop_info">
|
||||||
|
<el-image
|
||||||
|
:src="scope.row.logo"
|
||||||
|
style="
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #efefef;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<template #error>
|
||||||
|
<div class="img_error">
|
||||||
|
<i class="icon el-icon-document-delete" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-image>
|
||||||
|
<div class="info">
|
||||||
|
<span>{{ scope.row.shopName }}</span>
|
||||||
|
<div class="tag_wrap">
|
||||||
|
<el-tag
|
||||||
|
v-if="scope.row.profiles == 'no'"
|
||||||
|
type="info"
|
||||||
|
effect="dark"
|
||||||
|
>
|
||||||
|
未激活
|
||||||
|
</el-tag>
|
||||||
|
<el-tag
|
||||||
|
v-if="scope.row.profiles == 'probation'"
|
||||||
|
type="warning"
|
||||||
|
effect="dark"
|
||||||
|
>
|
||||||
|
试用
|
||||||
|
</el-tag>
|
||||||
|
<el-tag
|
||||||
|
v-if="scope.row.profiles == 'release'"
|
||||||
|
type="success"
|
||||||
|
effect="dark"
|
||||||
|
>
|
||||||
|
正式
|
||||||
|
</el-tag>
|
||||||
|
<el-tag
|
||||||
|
v-if="scope.row.isWxMaIndependent"
|
||||||
|
type="primary"
|
||||||
|
effect="dark"
|
||||||
|
>
|
||||||
|
独立小程序
|
||||||
|
</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="registerType" label="经营模式">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<span v-if="scope.row.registerType == 'before'">快餐版</span>
|
||||||
|
<span v-if="scope.row.registerType == 'after'">餐饮版</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="address" label="商户号" />
|
||||||
|
<el-table-column prop="status" label="店铺类型" align="center">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<div>
|
||||||
|
<span v-if="scope.row.shopType == 'only'">单店</span>
|
||||||
|
<span v-if="scope.row.shopType == 'chain'">连锁店</span>
|
||||||
|
<span v-if="scope.row.shopType == 'join'">加盟店</span>
|
||||||
|
<div v-if="scope.row.shopType != 'only' && scope.row.isHeadShop == 0">
|
||||||
|
(主店:{{ scope.row.headShopName }})
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="status" label="店铺状态">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.status"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="createdAt" label="到期时间">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<span v-if="scope.row.expireTime">
|
||||||
|
{{ dayjs(scope.row.expireTime).format("YYYY-MM-DD HH:mm:ss") }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="操作" width="200">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-link @click="addShopShow(scope.row)">
|
||||||
|
<el-icon>
|
||||||
|
<Edit />
|
||||||
|
</el-icon>
|
||||||
|
编辑
|
||||||
|
</el-link>
|
||||||
|
<el-link @click="activateCodeShow(scope.row)">
|
||||||
|
<el-icon>
|
||||||
|
<Edit />
|
||||||
|
</el-icon>
|
||||||
|
激活
|
||||||
|
</el-link>
|
||||||
|
<el-dropdown @command="dropdownClick($event, scope.row)">
|
||||||
|
<el-link>
|
||||||
|
更多
|
||||||
|
<el-icon>
|
||||||
|
<ArrowDown />
|
||||||
|
</el-icon>
|
||||||
|
</el-link>
|
||||||
|
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu>
|
||||||
|
<el-dropdown-item v-if="scope.row.isHeadShop == 1" :command="0">
|
||||||
|
添加分店
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="{ row: scope.row, command: 1 }">
|
||||||
|
三方配置
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="2">续费记录</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="3">前往店铺</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="4">重置密码</el-dropdown-item>
|
||||||
|
<el-dropdown-item divided :command="5">删除</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div class="head-container">
|
||||||
|
<el-pagination
|
||||||
|
v-model:current-page="state.tableData.page"
|
||||||
|
v-model:page-size="state.tableData.size"
|
||||||
|
:total="state.tableData.total"
|
||||||
|
:page-sizes="[10, 20, 30, 50, 100]"
|
||||||
|
layout="total, sizes , prev, pager ,next, jumper "
|
||||||
|
@current-change="paginationChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<addShop ref="refAddShop" @success="getTableData" />
|
||||||
|
<detailModal ref="refDetailModal" />
|
||||||
|
<!-- 激活码 -->
|
||||||
|
<activateCode ref="refActivateCode" @success="getTableData" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import activateCode from "./components/activateCode.vue";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import ShopApi from "@/api/account/shop";
|
||||||
|
import { ElNotification, ElMessageBox } from "element-plus";
|
||||||
|
import addShop from "./components/addShop.vue";
|
||||||
|
import detailModal from "./components/detailModal.vue";
|
||||||
|
const refActivateCode = ref(null);
|
||||||
|
function activateCodeShow(row) {
|
||||||
|
refActivateCode.value.open(row);
|
||||||
|
}
|
||||||
|
const refAddShop = ref(null);
|
||||||
|
function addShopShow(row) {
|
||||||
|
refAddShop.value.show(row);
|
||||||
|
}
|
||||||
|
const state = reactive({
|
||||||
|
query: {
|
||||||
|
name: "",
|
||||||
|
account: "",
|
||||||
|
status: "",
|
||||||
|
},
|
||||||
|
status: [
|
||||||
|
{
|
||||||
|
type: 1,
|
||||||
|
label: "开启",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 0,
|
||||||
|
label: "关闭",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
tableData: {
|
||||||
|
list: [],
|
||||||
|
page: 1,
|
||||||
|
size: 10,
|
||||||
|
loading: false,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
onMounted(() => {
|
||||||
|
getTableData();
|
||||||
|
});
|
||||||
|
|
||||||
|
const refDetailModal = ref(null);
|
||||||
|
function dropdownClick(e, row) {
|
||||||
|
console.log(e);
|
||||||
|
console.log(row);
|
||||||
|
if (e == 0) {
|
||||||
|
refAddShop.value.show(
|
||||||
|
{ mainId: row.id, shopType: row.shopType, isHeadShop: 0 },
|
||||||
|
"addBranch"
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (e.command == 1) {
|
||||||
|
refDetailModal.value.show(e.row);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (e == 5) {
|
||||||
|
ElMessageBox.confirm("是否确认删除该店铺?", "提示", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
const res = await ShopApi.delete({ id: row.id });
|
||||||
|
ElMessage({
|
||||||
|
type: "success",
|
||||||
|
message: "删除成功",
|
||||||
|
});
|
||||||
|
getTableData();
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 重置查询
|
||||||
|
function resetHandle() {
|
||||||
|
state.query.name = "";
|
||||||
|
state.query.account = "";
|
||||||
|
state.query.status = "";
|
||||||
|
getTableData();
|
||||||
|
}
|
||||||
|
// 分页回调
|
||||||
|
function paginationChange(e) {
|
||||||
|
state.tableData.page = e;
|
||||||
|
getTableData();
|
||||||
|
}
|
||||||
|
// 获取商家列表
|
||||||
|
async function getTableData() {
|
||||||
|
state.tableData.loading = true;
|
||||||
|
try {
|
||||||
|
const res = await ShopApi.getOtherShopList({
|
||||||
|
page: state.tableData.page,
|
||||||
|
size: state.tableData.size,
|
||||||
|
shopName: state.query.name,
|
||||||
|
account: state.query.account,
|
||||||
|
status: state.query.status,
|
||||||
|
});
|
||||||
|
state.tableData.loading = false;
|
||||||
|
state.tableData.list = res.records;
|
||||||
|
state.tableData.total = res.totalRow * 1;
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.head-container {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shop_info {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.info {
|
||||||
|
flex: 1;
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-link {
|
||||||
|
min-height: 23px;
|
||||||
|
margin: 0 5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -86,7 +86,7 @@ const form = reactive({
|
|||||||
status: 0,
|
status: 0,
|
||||||
name: "",
|
name: "",
|
||||||
date: "",
|
date: "",
|
||||||
userId: "",
|
shopUserId: "",
|
||||||
page: 1,
|
page: 1,
|
||||||
});
|
});
|
||||||
const tableData = ref([]);
|
const tableData = ref([]);
|
||||||
@@ -97,7 +97,7 @@ const pagination = reactive({
|
|||||||
});
|
});
|
||||||
function open(data) {
|
function open(data) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
form.userId = data.userId;
|
form.shopUserId = data.id;
|
||||||
pagination.page = 1;
|
pagination.page = 1;
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
getList();
|
getList();
|
||||||
@@ -106,7 +106,7 @@ function close() {
|
|||||||
visible.value = false;
|
visible.value = false;
|
||||||
}
|
}
|
||||||
function getList() {
|
function getList() {
|
||||||
couponApi.getDetail({ ...form, ...pagination }).then((res) => {
|
couponApi.getRecordByUser({ ...form, ...pagination }).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
tableData.value = res.records;
|
tableData.value = res.records;
|
||||||
pagination.total = res.totalRow;
|
pagination.total = res.totalRow;
|
||||||
|
|||||||
@@ -64,7 +64,13 @@
|
|||||||
: 'warning'
|
: 'warning'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ scope.row[scope.prop] === null ? "未知" : scope.row[scope.prop] == 1 ? "男" : "女" }}
|
{{
|
||||||
|
scope.row[scope.prop] === null
|
||||||
|
? "未知"
|
||||||
|
: scope.row[scope.prop] == 1
|
||||||
|
? "男"
|
||||||
|
: "女"
|
||||||
|
}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
<template #user="scope">
|
<template #user="scope">
|
||||||
@@ -89,7 +95,7 @@
|
|||||||
|
|
||||||
<template #coupon="scope">
|
<template #coupon="scope">
|
||||||
<div>
|
<div>
|
||||||
1张
|
{{ scope.row.couponNum }}张
|
||||||
<el-link :underline="false" type="primary" @click="handleViewCoupon(scope.row)">
|
<el-link :underline="false" type="primary" @click="handleViewCoupon(scope.row)">
|
||||||
查看详情
|
查看详情
|
||||||
</el-link>
|
</el-link>
|
||||||
@@ -225,7 +231,10 @@ async function handleOperatClick(data) {
|
|||||||
if (data.name == "more") {
|
if (data.name == "more") {
|
||||||
if (data.command === "change-money") {
|
if (data.command === "change-money") {
|
||||||
editMoneyModalRef.value.setModalVisible();
|
editMoneyModalRef.value.setModalVisible();
|
||||||
editMoneyModalRef.value.setFormData({ ...row, headImg: row.headImg ? [row.headImg] : "" });
|
editMoneyModalRef.value.setFormData({
|
||||||
|
...row,
|
||||||
|
headImg: row.headImg ? [row.headImg] : "",
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (data.command === "charge-list") {
|
if (data.command === "charge-list") {
|
||||||
|
|||||||
Reference in New Issue
Block a user