Selaa lähdekoodia

feat(goodsDetail): 添加状态列及其显示逻辑,区分已发货和已收货状态

xieyong 6 päivää sitten
vanhempi
commit
1d3a5120c3
1 muutettua tiedostoa jossa 18 lisäystä ja 3 poistoa
  1. 18 3
      src/views/beEntrusted/components/goodsDetail.vue

+ 18 - 3
src/views/beEntrusted/components/goodsDetail.vue

@@ -43,6 +43,10 @@
       <template v-slot:rootCategoryLevelId="{ row }">
         <el-tag>{{ typeName[Number(row.rootCategoryLevelId)] }}</el-tag>
       </template>
+
+      <template v-slot:status="{ row }">
+        <span>{{ row.status == 1 ? "已发货" : "已收货" }}</span>
+      </template>
     </ele-pro-table>
 
     <template v-slot:footer v-if="type != 'detail' && type != 'send'">
@@ -225,6 +229,13 @@
             label: '类型',
             align: 'center',
             showOverflowTooltip: true
+          },
+          {
+            prop: 'status',
+            slot: 'status',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true
           }
         ];
       }
@@ -242,10 +253,14 @@
 
       async getDetail(id) {
         const detailType = this.type != 'send' ? 1 : 2;
-        await pleaseEntrustGoodsDetail({
+        const obj = {
           id,
-          detailType
-        }).then((res) => {
+          detailType,
+        }
+        if(this.type === 'detail'){
+          obj.status = 2;
+        }
+        await pleaseEntrustGoodsDetail(obj).then((res) => {
           this.goodsList = [];
           res.data.forEach((item) => {
             if (this.type != 'detail') {