|
|
@@ -51,6 +51,13 @@
|
|
|
<el-table-column label="门店名称" align="center" prop="name" />
|
|
|
<el-table-column label="门店类型" align="center" prop="storeTypeName" />
|
|
|
<el-table-column label="详细地址" align="center" prop="address" />
|
|
|
+ <el-table-column label="是否授权" align="center" prop="isAuthorization">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tag :type="scope.row.isAuthorization ? 'success' : 'info'">
|
|
|
+ {{ scope.row.isAuthorization ? '已授权' : '未授权' }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="兑换开始时间" align="center" prop="businessStartTime" width="180">
|
|
|
<template #default="scope">
|
|
|
<span>{{ parseTime(scope.row.businessStartTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
@@ -77,6 +84,16 @@
|
|
|
<el-tooltip content="删除" placement="top">
|
|
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['physical:store:remove']"></el-button>
|
|
|
</el-tooltip>
|
|
|
+ <el-tooltip :content="scope.row.isAuthorization ? '关闭授权' : '点击授权'" placement="top">
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ :type="scope.row.isAuthorization ? 'warning' : 'success'"
|
|
|
+ @click="handleAuthorization(scope.row)"
|
|
|
+ style="text-decoration: underline"
|
|
|
+ >
|
|
|
+ {{ scope.row.isAuthorization ? '关闭授权' : '点击授权' }}
|
|
|
+ </el-button>
|
|
|
+ </el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -861,9 +878,19 @@ const getCurrentLocation = () => {
|
|
|
}
|
|
|
);
|
|
|
};
|
|
|
-// ... existing code ...
|
|
|
+const handleAuthorization = async (row: StoreVO) => {
|
|
|
+ const action = row.isAuthorization ? '关闭' : '授权';
|
|
|
+ await proxy?.$modal.confirm(`确认要${action}门店"${row.name}"吗?`);
|
|
|
+ const updateData: StoreForm = {
|
|
|
+ ...row,
|
|
|
+ isAuthorization: !row.isAuthorization,
|
|
|
+ storePromotionImage: row.storePromotionImage || []
|
|
|
+ };
|
|
|
|
|
|
-// ... existing code ...
|
|
|
+ await updateStore(updateData);
|
|
|
+ proxy?.$modal.msgSuccess('授权成功');
|
|
|
+ await getList();
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|