Sfoglia il codice sorgente

订单详情-退款:已退款商品不可选择

panyong 3 anni fa
parent
commit
c9904e8f5a
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 6 1
      htmldev/manage/src/views/business/oms/detail/index.vue

+ 6 - 1
htmldev/manage/src/views/business/oms/detail/index.vue

@@ -153,7 +153,7 @@
             style="width: 100%"
             height="300"
             @selection-change="handleSelectionChange">
-            <el-table-column type="selection" width="55"></el-table-column>
+            <el-table-column :selectable="handleSelectable" type="selection" width="55"></el-table-column>
             <el-table-column label="商品名称" prop="product_name"></el-table-column>
             <el-table-column label="商品sku" prop="product_sku"></el-table-column>
             <el-table-column label="商品附加" prop="product_attach"></el-table-column>
@@ -243,6 +243,11 @@ export default {
         this.fetchOrderDetail()
         this.refundDialogVisible = false
       }
+    },
+    // 表格:某项是否可选择
+    handleSelectable (row, index) {
+      // product_status: 商品状态(0待支付1已支付2全部退款3部分退款4已取消)
+      return [1, 3].findIndex(item => item === row.product_status) > -1
     }
   },
   created () {