| | |
| | | typeName: string |
| | | describe: string |
| | | shelfStatus?: '待上架' | '已上架' | '已下架' |
| | | listingStatusName?: '' |
| | | } |
| | | |
| | | interface PriceItem { |
| | |
| | | }) |
| | | |
| | | const productDetail = ref<ProductDetail | null>(null) |
| | | const shelfStatus = computed(() => productDetail.value?.shelfStatus || '待上架') |
| | | const shelfStatus = computed(() => productDetail.value?.listingStatusName || '待上架') |
| | | const statusClass = computed(() => { |
| | | switch (shelfStatus.value) { |
| | | case '已上架': |
| | |
| | | return |
| | | } |
| | | ElMessage.success('新建成功') |
| | | // 修改产品状态为已订价 |
| | | // 判断 产品定价列表是否为空,为空则更新状态,不为空则说明更新过了,不需要在此更新 |
| | | if (priceList.value.length === 0) { |
| | | const updateParams = { |
| | | id: currentProductId.value, |
| | | listingStatus: 'PRICED' |
| | | } |
| | | const res: any = await productApi.updateProductStatus(updateParams) |
| | | if (res?.code !== 200) { |
| | | console.log('产品状态更新失败!!') |
| | | } |
| | | } |
| | | } |
| | | |
| | | dialogVisible.value = false |