|
|
@@ -4,81 +4,83 @@
|
|
|
<!-- 产品基础信息 -->
|
|
|
<div class="section-title">产品基础信息</div>
|
|
|
|
|
|
- <el-descriptions :column="2" border class="mb-4">
|
|
|
- <el-descriptions-item label="产品编号">{{ baseInfo?.productNo || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="产品名称">{{ baseInfo?.itemName || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="商品类型">
|
|
|
- <el-tag v-if="(baseInfo as any)?.productCategory === 1" type="info">默认类型</el-tag>
|
|
|
- <el-tag v-else-if="(baseInfo as any)?.productCategory === 2" type="success">精选商品</el-tag>
|
|
|
- <el-tag v-else-if="(baseInfo as any)?.productCategory === 3" type="danger">停售商品</el-tag>
|
|
|
- <span v-else>-</span>
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="产品类别">
|
|
|
- {{ [(baseInfo as any)?.topCategoryName, (baseInfo as any)?.mediumCategoryName, (baseInfo as any)?.bottomCategoryName].filter(Boolean).join(' / ') || '-' }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="品牌">{{ (baseInfo as any)?.brandName || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="单位">{{ (baseInfo as any)?.unitName || '-' }}</el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
+ <div class="info-grid mb-4">
|
|
|
+ <div class="info-item"><span class="info-label">产品编号:</span><span class="info-value">{{ baseInfo?.productNo || '-' }}</span></div>
|
|
|
+ <div class="info-item"><span class="info-label">产品名称:</span><span class="info-value">{{ baseInfo?.itemName || '-' }}</span></div>
|
|
|
+ <div class="info-item">
|
|
|
+ <span class="info-label">商品类型:</span>
|
|
|
+ <span class="info-value">
|
|
|
+ <el-tag v-if="(baseInfo as any)?.productCategory === 1" type="info">默认类型</el-tag>
|
|
|
+ <el-tag v-else-if="(baseInfo as any)?.productCategory === 2" type="success">精选商品</el-tag>
|
|
|
+ <el-tag v-else-if="(baseInfo as any)?.productCategory === 3" type="danger">停售商品</el-tag>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="info-item"><span class="info-label">产品类别:</span><span class="info-value">{{ [(baseInfo as any)?.topCategoryName, (baseInfo as any)?.mediumCategoryName, (baseInfo as any)?.bottomCategoryName].filter(Boolean).join(' / ') || '-' }}</span></div>
|
|
|
+ <div class="info-item"><span class="info-label">品牌:</span><span class="info-value">{{ (baseInfo as any)?.brandName || '-' }}</span></div>
|
|
|
+ <div class="info-item"><span class="info-label">单位:</span><span class="info-value">{{ (baseInfo as any)?.unitName || '-' }}</span></div>
|
|
|
+ </div>
|
|
|
|
|
|
<!-- 价格信息 -->
|
|
|
<div class="sub-title">价格信息</div>
|
|
|
- <el-descriptions :column="3" border class="mb-4">
|
|
|
- <el-descriptions-item label="市场价">
|
|
|
- <span class="text-red-500">¥{{ baseInfo?.marketPrice ?? '-' }}</span>
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="官网价">
|
|
|
- <span class="text-red-500">¥{{ baseInfo?.memberPrice ?? '-' }}</span>
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="最低销售价格">
|
|
|
- <span class="text-red-500">¥{{ baseInfo?.minSellingPrice ?? '-' }}</span>
|
|
|
- </el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
+ <div class="info-grid mb-4">
|
|
|
+ <div class="info-item"><span class="info-label">市场价:</span><span class="info-value text-red-500">¥{{ baseInfo?.marketPrice ?? '-' }}</span></div>
|
|
|
+ <div class="info-item"><span class="info-label">官网价:</span><span class="info-value text-red-500">¥{{ baseInfo?.memberPrice ?? '-' }}</span></div>
|
|
|
+ <div class="info-item"><span class="info-label">最低销售价格:</span><span class="info-value text-red-500">¥{{ baseInfo?.minSellingPrice ?? '-' }}</span></div>
|
|
|
+ </div>
|
|
|
|
|
|
<!-- 采购信息 -->
|
|
|
<div class="sub-title">采购信息</div>
|
|
|
- <el-descriptions :column="3" border class="mb-4">
|
|
|
- <el-descriptions-item label="采购价格">
|
|
|
- <span>¥{{ baseInfo?.purchasingPrice ?? '-' }}</span>
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="暂估毛利率">
|
|
|
- <span>{{ baseInfo?.tempGrossMargin != null ? baseInfo.tempGrossMargin + '%' : '-' }}</span>
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="最高采购价">
|
|
|
- <span>¥{{ (baseInfo as any)?.maxPurchasePrice ?? '-' }}</span>
|
|
|
- </el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
+ <div class="info-grid mb-4">
|
|
|
+ <div class="info-item"><span class="info-label">采购价格:</span><span class="info-value">¥{{ baseInfo?.purchasingPrice ?? '-' }}</span></div>
|
|
|
+ <div class="info-item"><span class="info-label">暂估毛利率:</span><span class="info-value">{{ baseInfo?.memberPrice ? (((baseInfo.memberPrice - (baseInfo.purchasingPrice || 0)) / baseInfo.memberPrice) * 100).toFixed(2) + '%' : '-' }}</span></div>
|
|
|
+ <div class="info-item"><span class="info-label">最高采购价:</span><span class="info-value">¥{{ (baseInfo as any)?.maxPurchasePrice ?? '-' }}</span></div>
|
|
|
+ </div>
|
|
|
|
|
|
<!-- 其他基础信息 -->
|
|
|
- <el-descriptions :column="3" border class="mb-4">
|
|
|
- <el-descriptions-item label="起订量">{{ baseInfo?.minOrderQuantity ?? '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="上下架状态">
|
|
|
- <el-tag v-if="baseInfo?.productStatus === 1" type="success">已上架</el-tag>
|
|
|
- <el-tag v-else-if="baseInfo?.productStatus === 0" type="warning">下架</el-tag>
|
|
|
- <el-tag v-else-if="baseInfo?.productStatus === 2" type="info">上架中</el-tag>
|
|
|
- <span v-else>-</span>
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="主供应商">{{ (baseInfo as any)?.freightPrice ?? '-' }}</el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
+ <div class="info-grid mb-4">
|
|
|
+ <div class="info-item"><span class="info-label">起订量:</span><span class="info-value">{{ baseInfo?.minOrderQuantity ?? '-' }}</span></div>
|
|
|
+ <div class="info-item">
|
|
|
+ <span class="info-label">上下架状态:</span>
|
|
|
+ <span class="info-value">
|
|
|
+ <el-tag v-if="baseInfo?.productStatus === 1" type="success">已上架</el-tag>
|
|
|
+ <el-tag v-else-if="baseInfo?.productStatus === 0" type="warning">下架</el-tag>
|
|
|
+ <el-tag v-else-if="baseInfo?.productStatus === 2" type="info">上架中</el-tag>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="info-item"><span class="info-label">主供应商:</span><span class="info-value">{{ (baseInfo as any)?.freightPrice ?? '-' }}</span></div>
|
|
|
+ </div>
|
|
|
|
|
|
<el-divider />
|
|
|
|
|
|
<!-- 入池信息 -->
|
|
|
<div class="section-title">入池信息</div>
|
|
|
- <el-descriptions :column="2" border class="mb-4">
|
|
|
- <el-descriptions-item label="申请类型" :span="2">
|
|
|
- <el-tag v-if="String(auditInfo?.type) === '0'" type="success">入池申请</el-tag>
|
|
|
- <el-tag v-else-if="String(auditInfo?.type) === '1'" type="warning">出池申请</el-tag>
|
|
|
- <span v-else>-</span>
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="申请单号">{{ auditInfo?.name || auditInfo?.id || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="申请人">{{ auditInfo?.createByName || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="申请时间">{{ (auditInfo as any)?.createTime || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="备注" :span="2">{{ auditInfo?.remark || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="附件" :span="2">
|
|
|
- <el-tag v-if="(auditInfo as any)?.attachment" type="success">已上传</el-tag>
|
|
|
- <el-tag v-else type="info">暂无附件</el-tag>
|
|
|
- </el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
+ <div class="info-grid mb-4">
|
|
|
+ <div class="info-item info-item--full">
|
|
|
+ <span class="info-label">申请类型:</span>
|
|
|
+ <span class="info-value">
|
|
|
+ <el-tag v-if="String(auditInfo?.type) === '0'" type="success">入池申请</el-tag>
|
|
|
+ <el-tag v-else-if="String(auditInfo?.type) === '1'" type="warning">出池申请</el-tag>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="info-item"><span class="info-label">申请单号:</span><span class="info-value">{{ auditInfo?.name || auditInfo?.id || '-' }}</span></div>
|
|
|
+ <div class="info-item"><span class="info-label">申请人:</span><span class="info-value">{{ auditInfo?.createByName || '-' }}</span></div>
|
|
|
+ <div class="info-item"><span class="info-label">申请时间:</span><span class="info-value">{{ (auditInfo as any)?.createTime || '-' }}</span></div>
|
|
|
+ <div class="info-item info-item--full"><span class="info-label">备注:</span><span class="info-value">{{ auditInfo?.remark || '-' }}</span></div>
|
|
|
+ <div class="info-item info-item--full">
|
|
|
+ <span class="info-label">附件:</span>
|
|
|
+ <span class="info-value">
|
|
|
+ <template v-if="attachmentFiles.length > 0">
|
|
|
+ <div v-for="file in attachmentFiles" :key="String(file.ossId)" class="mb-1">
|
|
|
+ <el-link type="primary" :underline="true" @click="proxy?.$download.oss(file.ossId)">{{ file.fileName }}</el-link>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <span v-else>暂无附件</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
<el-divider />
|
|
|
@@ -86,31 +88,43 @@
|
|
|
<!-- 客户信息(协议池 type=2) -->
|
|
|
<template v-if="auditInfo && String(auditInfo.type) === '2'">
|
|
|
<div class="section-title">客户协议信息</div>
|
|
|
- <el-descriptions :column="2" border class="mb-4" v-loading="extraLoading">
|
|
|
- <el-descriptions-item label="客户编号">{{ customerInfo?.customerNo || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="客户名称">{{ customerInfo?.customerName || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="协议价格">{{ priceForm.agreementPrice || '-' }}</el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
+ <div class="info-grid mb-4" v-loading="extraLoading">
|
|
|
+ <div class="info-item"><span class="info-label">客户编号:</span><span class="info-value">{{ customerInfo?.customerNo || '-' }}</span></div>
|
|
|
+ <div class="info-item"><span class="info-label">客户名称:</span><span class="info-value">{{ customerInfo?.customerName || '-' }}</span></div>
|
|
|
+ <div class="info-item"><span class="info-label">协议价格:</span><span class="info-value">{{ priceForm.agreementPrice || '-' }}</span></div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<!-- 项目信息(项目池 type=3) -->
|
|
|
<template v-if="auditInfo && String(auditInfo.type) === '3'">
|
|
|
<div class="section-title">项目信息</div>
|
|
|
- <el-descriptions :column="2" border class="mb-4" v-loading="extraLoading">
|
|
|
- <el-descriptions-item label="项目名称">{{ itemInfo?.itemName || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="项目编号">{{ itemInfo?.itemKey || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="第三方价格">{{ priceForm.agreementPrice || '-' }}</el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
+ <div class="info-grid mb-4" v-loading="extraLoading">
|
|
|
+ <div class="info-item"><span class="info-label">项目名称:</span><span class="info-value">{{ itemInfo?.itemName || '-' }}</span></div>
|
|
|
+ <div class="info-item"><span class="info-label">项目编号:</span><span class="info-value">{{ itemInfo?.itemKey || '-' }}</span></div>
|
|
|
+ <div class="info-item"><span class="info-label">第三方价格:</span><span class="info-value">{{ priceForm.agreementPrice || '-' }}</span></div>
|
|
|
+ <div class="info-item">
|
|
|
+ <span class="info-label">计价规则:</span>
|
|
|
+ <span class="info-value">
|
|
|
+ <el-tag v-if="String(linkInfo?.pricingRule) === '0'" type="primary">一品一价</el-tag>
|
|
|
+ <el-tag v-else-if="String(linkInfo?.pricingRule) === '1'" type="warning">按类目折扣率报价</el-tag>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="info-item">
|
|
|
+ <span class="info-label">第三方分类:</span>
|
|
|
+ <span class="info-value">{{ thirdCategory?.categoryName || '-' }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<!-- 营销产品池信息(营销池 type=4) -->
|
|
|
<template v-if="auditInfo && String(auditInfo.type) === '4'">
|
|
|
<div class="section-title">营销产品池信息</div>
|
|
|
- <el-descriptions :column="2" border class="mb-4" v-loading="extraLoading">
|
|
|
- <el-descriptions-item label="池编码">{{ poolInfo?.poolNo || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="池名称">{{ poolInfo?.name || '-' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="协议价格">{{ priceForm.agreementPrice || '-' }}</el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
+ <div class="info-grid mb-4" v-loading="extraLoading">
|
|
|
+ <div class="info-item"><span class="info-label">池编码:</span><span class="info-value">{{ poolInfo?.poolNo || '-' }}</span></div>
|
|
|
+ <div class="info-item"><span class="info-label">池名称:</span><span class="info-value">{{ poolInfo?.name || '-' }}</span></div>
|
|
|
+ <!-- <div class="info-item"><span class="info-label">协议价格:</span><span class="info-value">{{ priceForm.agreementPrice || '-' }}</span></div> -->
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</div>
|
|
|
|
|
|
@@ -126,7 +140,11 @@ import { getPoolAudit } from '@/api/product/poolAudit';
|
|
|
import { getPoolLinkAudit } from '@/api/product/poolLinkAudit';
|
|
|
import { getCustomerInfo } from '@/api/customer/customerInfo';
|
|
|
import { getItem } from '@/api/external/item';
|
|
|
+import { getProductCategory } from '@/api/external/productCategory';
|
|
|
+import { ProductCategoryVO } from '@/api/external/productCategory/types';
|
|
|
import { getPool } from '@/api/product/pool';
|
|
|
+import { listByIds } from '@/api/system/oss';
|
|
|
+import { OssVO } from '@/api/system/oss/types';
|
|
|
import { BaseVO } from '@/api/product/base/types';
|
|
|
import { PoolAuditVO } from '@/api/product/poolAudit/types';
|
|
|
import { PoolLinkAuditVO } from '@/api/product/poolLinkAudit/types';
|
|
|
@@ -152,14 +170,17 @@ const visible = computed({
|
|
|
set: (val) => emit('update:modelValue', val)
|
|
|
});
|
|
|
|
|
|
+const { proxy } = getCurrentInstance() as any;
|
|
|
const loading = ref(false);
|
|
|
const extraLoading = ref(false);
|
|
|
+const attachmentFiles = ref<OssVO[]>([]);
|
|
|
const linkInfo = ref<PoolLinkAuditVO | null>(null);
|
|
|
const baseInfo = ref<BaseVO | null>(null);
|
|
|
const auditInfo = ref<PoolAuditVO | null>(null);
|
|
|
const customerInfo = ref<CustomerInfoVO | null>(null);
|
|
|
const itemInfo = ref<ItemVO | null>(null);
|
|
|
const poolInfo = ref<PoolVO | null>(null);
|
|
|
+const thirdCategory = ref<ProductCategoryVO | null>(null);
|
|
|
|
|
|
const priceForm = reactive({
|
|
|
discountRate: undefined as number | undefined,
|
|
|
@@ -176,8 +197,14 @@ const loadExtraInfo = async (type: string, auditData: PoolAuditVO) => {
|
|
|
customerInfo.value = res.data || null;
|
|
|
} else if (type === '3' && auditData.itemId) {
|
|
|
// 项目池 → 查询项目信息
|
|
|
- const res = await getItem(auditData.itemId);
|
|
|
- itemInfo.value = res.data || null;
|
|
|
+ const [itemRes, categoryRes] = await Promise.all([
|
|
|
+ getItem(auditData.itemId),
|
|
|
+ linkInfo.value?.categoryId
|
|
|
+ ? getProductCategory(linkInfo.value.categoryId, String(auditData.itemId))
|
|
|
+ : Promise.resolve({ data: null })
|
|
|
+ ]);
|
|
|
+ itemInfo.value = itemRes.data || null;
|
|
|
+ thirdCategory.value = (categoryRes as any)?.data || null;
|
|
|
} else if (type === '4' && auditData.poolId) {
|
|
|
// 营销池 → 查询产品池信息
|
|
|
const res = await getPool(auditData.poolId);
|
|
|
@@ -242,12 +269,30 @@ watch(
|
|
|
customerInfo.value = null;
|
|
|
itemInfo.value = null;
|
|
|
poolInfo.value = null;
|
|
|
+ thirdCategory.value = null;
|
|
|
+ attachmentFiles.value = [];
|
|
|
priceForm.discountRate = undefined;
|
|
|
priceForm.agreementPrice = undefined;
|
|
|
loadData();
|
|
|
}
|
|
|
}
|
|
|
);
|
|
|
+
|
|
|
+watch(
|
|
|
+ () => (auditInfo.value as any)?.attachment,
|
|
|
+ async (val) => {
|
|
|
+ if (val) {
|
|
|
+ try {
|
|
|
+ const res = await listByIds(val);
|
|
|
+ attachmentFiles.value = res.data || [];
|
|
|
+ } catch {
|
|
|
+ attachmentFiles.value = [];
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ attachmentFiles.value = [];
|
|
|
+ }
|
|
|
+ }
|
|
|
+);
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
@@ -267,4 +312,32 @@ watch(
|
|
|
margin-bottom: 8px;
|
|
|
padding-left: 6px;
|
|
|
}
|
|
|
+
|
|
|
+.info-grid {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(2, 1fr);
|
|
|
+ gap: 10px 16px;
|
|
|
+}
|
|
|
+
|
|
|
+.info-item {
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-start;
|
|
|
+ font-size: 13px;
|
|
|
+ line-height: 22px;
|
|
|
+
|
|
|
+ &--full {
|
|
|
+ grid-column: 1 / -1;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.info-label {
|
|
|
+ flex-shrink: 0;
|
|
|
+ color: #909399;
|
|
|
+ min-width: 80px;
|
|
|
+}
|
|
|
+
|
|
|
+.info-value {
|
|
|
+ color: #303133;
|
|
|
+ word-break: break-all;
|
|
|
+}
|
|
|
</style>
|