Pārlūkot izejas kodu

Merge branch 'master' of http://git.zonelife.cn:3000/zhangtao/city-gather-admin

wenjie 1 dienu atpakaļ
vecāks
revīzija
95b580dfff

+ 2 - 0
src/views/order-manage/after-sales-order/index.vue

@@ -18,7 +18,9 @@ import {
   orderStatus,
   refundOrderStatus
 } from '../normal-order/normal-order';
+
 const route = useRoute();
+
 const router = useRouter();
 // const ShipmentModal = useTemplateRef('Shipment');
 const columns: NaiveUI.TableColumn<Api.delivery.deliveryOrder>[] = [

+ 24 - 1
src/views/order-manage/order-detail/index.vue

@@ -309,6 +309,15 @@ onMounted(async () => {
     handleShip();
   }
 });
+function getRefundRecordText() {
+  const info = orderInfo.value as any;
+  if (!info) return '暂无';
+  const count =
+    Number(info.backendOrderRefundLogCount) ||
+    (Array.isArray(info.refundOrderList) ? info.refundOrderList.length : 0) ||
+    0;
+  return count > 0 ? `${count}条` : '暂无';
+}
 </script>
 
 <template>
@@ -376,7 +385,8 @@ onMounted(async () => {
           </div>
           <div>支付时间:{{ orderInfo.payTime || '暂无' }}</div>
           <div>交易号:{{ orderInfo.outTradeNo || '---' }}</div>
-          <div>
+          <!--
+ <div>
             退款记录:{{ orderInfo.refundOrderList ? orderInfo.refundOrderList.length : '暂无' }}
             <NButton
               v-if="orderInfo.refundOrderList && orderInfo.refundOrderList.length > 0"
@@ -388,6 +398,19 @@ onMounted(async () => {
               查看
             </NButton>
           </div>
+-->
+          <div>
+            退款记录:{{ getRefundRecordText() }}
+            <NButton
+              v-if="orderInfo.refundOrderList && orderInfo.refundOrderList.length > 0"
+              size="small"
+              quaternary
+              type="primary"
+              @click="handleSaleOrder(orderInfo)"
+            >
+              查看
+            </NButton>
+          </div>
         </NCard>
       </div>
       <div class="flex-1">