From 349091f54dab47b15ca81613f02765490a2ce7d0 Mon Sep 17 00:00:00 2001
From: p-honggang.li <p-honggang.li@pcitc.com>
Date: 星期四, 11 九月 2025 10:50:36 +0800
Subject: [PATCH] 修改买家中心卖家中心产品类型等条件查询问题

---
 src/views/productManage/price/index.vue |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/views/productManage/price/index.vue b/src/views/productManage/price/index.vue
index 57e9d93..bdf27a7 100644
--- a/src/views/productManage/price/index.vue
+++ b/src/views/productManage/price/index.vue
@@ -13,7 +13,7 @@
             <el-icon class="section-icon"><Goods /></el-icon>
             <span>浜у搧鍩烘湰淇℃伅</span>
           </div>
-          <div class="id-info">浜у搧ID锛歿{ currentProductId || '鏈彁渚�' }}</div>
+<!--          <div class="id-info">浜у搧ID锛歿{ currentProductId || '鏈彁渚�' }}</div>-->
         </div>
       </template>
 
@@ -247,6 +247,7 @@
   typeName: string
   describe: string
   shelfStatus?: '寰呬笂鏋�' | '宸蹭笂鏋�' | '宸蹭笅鏋�'
+  listingStatusName?: ''
 }
 
 interface PriceItem {
@@ -277,7 +278,7 @@
 })
 
 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 '宸蹭笂鏋�':
@@ -824,6 +825,18 @@
         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
@@ -843,7 +856,7 @@
 function handleToggleEnableStatus(row: any) {
   const newStatus = row.enableStatus === 'ENABLED' ? 'DISABLED' : 'ENABLED'
   ElMessageBox.confirm(
-    `纭瑕�${newStatus === 'ENABLED' ? '鍚敤' : '鍋滅敤'}璇ヤ环鏍�(ID: ${row.id})鍚楋紵`,
+    `纭瑕�${newStatus === 'ENABLED' ? '鍚敤' : '鍋滅敤'}璇ュ畾浠锋爣鍑嗗悧锛焋,
     '鐘舵�佸彉鏇�',
     { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }
   )

--
Gitblit v1.8.0