From bd125eecd57d2f4e559c6170d20157591300fe3d Mon Sep 17 00:00:00 2001
From: p-honggang.li <p-honggang.li@pcitc.com>
Date: 星期四, 04 九月 2025 20:57:44 +0800
Subject: [PATCH] 修改购物车等BUG

---
 src/views/productManage/price/index.vue |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/views/productManage/price/index.vue b/src/views/productManage/price/index.vue
index 5752e6e..6c6701c 100644
--- a/src/views/productManage/price/index.vue
+++ b/src/views/productManage/price/index.vue
@@ -223,12 +223,6 @@
       </template>
     </el-dialog>
 
-    <!-- 浠锋牸鏌ョ湅鍣� -->
-    <ProductPriceViewer
-      v-model="showPriceViewer"
-      :product-id="currentProductId"
-      @order="handleOrderResult"
-    />
   </div>
 </template>
 
@@ -253,6 +247,7 @@
   typeName: string
   describe: string
   shelfStatus?: '寰呬笂鏋�' | '宸蹭笂鏋�' | '宸蹭笅鏋�'
+  listingStatusName?: ''
 }
 
 interface PriceItem {
@@ -283,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 '宸蹭笂鏋�':
@@ -830,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

--
Gitblit v1.8.0