|
|
@@ -11,19 +11,19 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #Information="scope">
|
|
|
- <div>
|
|
|
- <el-image :src="scope.row.homeImage" />
|
|
|
- <div>
|
|
|
- <p>团购名称:{{ scope.row.goodsName }}</p>
|
|
|
- <p>团购编号:{{ scope.row.goodsDesc }}</p>
|
|
|
- <p>结束时间:{{ scope.row.goodsDesc }}</p>
|
|
|
+ <div class="information">
|
|
|
+ <el-image :src="scope.row.imageValueStr[0]" :preview-src-list="scope.row.imageValueStr" preview-teleported />
|
|
|
+ <div class="information-right">
|
|
|
+ <p>团购名称:{{ scope.row.groupName }}</p>
|
|
|
+ <p>团购编号:{{ scope.row.groupNo }}</p>
|
|
|
+ <p>结束时间:{{ scope.row.endTime }}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #status="scope">
|
|
|
- <p>团购状态:{{ scope.row.status }}</p>
|
|
|
- <p>审核状态:{{ scope.row.status }}</p>
|
|
|
- </template>
|
|
|
+ <p>团购状态:{{ allTabOptions.find(item => item.name === scope.row.groupType)?.label ?? "--" }}</p>
|
|
|
+ <p>审核状态:{{ statusEnum.find(item => item.value === scope.row.reviewType)?.label ?? "--" }}</p> </template
|
|
|
+ >:
|
|
|
<!-- 表格操作 -->
|
|
|
<template #operation="scope">
|
|
|
<!-- 审批通过和拒绝按钮仅在状态为0时显示 -->
|
|
|
@@ -79,7 +79,7 @@ const formInventory: any = ref({
|
|
|
newInventory: ""
|
|
|
});
|
|
|
const rowData = ref<any>();
|
|
|
-const activeName = ref("0");
|
|
|
+const activeName = ref("");
|
|
|
|
|
|
const ruleFormRef = ref<FormInstance>();
|
|
|
const rules = reactive<FormRules<RuleForm>>({
|
|
|
@@ -112,7 +112,7 @@ const columns = reactive<ColumnProps<any>[]>([
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- prop: "tradeNo",
|
|
|
+ prop: "groupName",
|
|
|
label: "团购名称",
|
|
|
isShow: false,
|
|
|
search: {
|
|
|
@@ -129,35 +129,41 @@ const columns = reactive<ColumnProps<any>[]>([
|
|
|
},
|
|
|
{
|
|
|
prop: "Information",
|
|
|
- label: "团购信息"
|
|
|
+ label: "团购信息",
|
|
|
+ width: 400
|
|
|
},
|
|
|
{
|
|
|
prop: "goodsId",
|
|
|
label: "已售"
|
|
|
},
|
|
|
{
|
|
|
- prop: "goodsId",
|
|
|
- isShow: false,
|
|
|
+ prop: "inventoryNum",
|
|
|
label: "剩余库存"
|
|
|
},
|
|
|
{
|
|
|
prop: "goodsId",
|
|
|
- label: "优惠价"
|
|
|
+ label: "优惠价",
|
|
|
+ render: (scope: any) => {
|
|
|
+ return `¥${scope.row.preferentialPrice}`;
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
prop: "goodsId",
|
|
|
- label: "成本价"
|
|
|
+ label: "成本价",
|
|
|
+ render: (scope: any) => {
|
|
|
+ return `¥${scope.row.originalPrice}`;
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
prop: "goodsId",
|
|
|
label: "利润"
|
|
|
},
|
|
|
{
|
|
|
- prop: "tradeStatus",
|
|
|
+ prop: "reviewType",
|
|
|
label: "审核状态",
|
|
|
isShow: false,
|
|
|
render: scope => {
|
|
|
- const statusObj = statusEnum.find(item => item.value === scope.row.tradeStatus);
|
|
|
+ const statusObj = statusEnum.find(item => item.value === scope.row.reviewType);
|
|
|
return statusObj ? statusObj.label : "--";
|
|
|
},
|
|
|
search: {
|
|
|
@@ -175,19 +181,19 @@ const columns = reactive<ColumnProps<any>[]>([
|
|
|
|
|
|
// 在 script setup 中添加
|
|
|
const allTabOptions = [
|
|
|
- { label: "全部", name: "0" },
|
|
|
- { label: "草稿", name: "1" },
|
|
|
- { label: "进行中", name: "2" },
|
|
|
- { label: "未开始", name: "3" },
|
|
|
- { label: "已下架", name: "4" },
|
|
|
- { label: "已售罄", name: "5" },
|
|
|
- { label: "已结束", name: "6" }
|
|
|
+ { label: "全部", name: "" },
|
|
|
+ { label: "草稿", name: "0" },
|
|
|
+ { label: "进行中", name: "5" },
|
|
|
+ { label: "待审核", name: "1" },
|
|
|
+ { label: "审核拒绝", name: "3" },
|
|
|
+ { label: "已售罄", name: "4" },
|
|
|
+ { label: "已结束", name: "7" }
|
|
|
];
|
|
|
|
|
|
// 获取当前审核状态
|
|
|
const currentAuditStatus = computed(() => {
|
|
|
if (!proTable.value?.searchParam) return "";
|
|
|
- return proTable.value.searchParam.tradeStatus || "";
|
|
|
+ return proTable.value.searchParam.reviewType || "";
|
|
|
});
|
|
|
|
|
|
// 控制 el-tabs 是否显示:当审核状态为空或审核通过时显示
|
|
|
@@ -215,14 +221,16 @@ watch(
|
|
|
newStatus => {
|
|
|
if (!newStatus || newStatus === "-2") {
|
|
|
// 审核状态为空时,确保 activeName 为草稿
|
|
|
- activeName.value = "0";
|
|
|
+ activeName.value = "";
|
|
|
}
|
|
|
},
|
|
|
{ immediate: true }
|
|
|
);
|
|
|
// 如果表格需要初始化请求参数,直接定义传给 ProTable (之后每次请求都会自动带上该参数,此参数更改之后也会一直带上,改变此参数会自动刷新表格数据)
|
|
|
const initParam = reactive({
|
|
|
- activeName: activeName
|
|
|
+ storeId: "104",
|
|
|
+ groupType: "1",
|
|
|
+ status: activeName
|
|
|
});
|
|
|
|
|
|
// 页面加载时触发查询
|
|
|
@@ -327,4 +335,15 @@ const closeDialog = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.information {
|
|
|
+ display: flex;
|
|
|
+ column-gap: 5px;
|
|
|
+ align-items: center;
|
|
|
+ .information-right {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ row-gap: 5px;
|
|
|
+ align-items: flex-start;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|