Sfoglia il codice sorgente

fix(goodsDetail): 增加是否收货字段的显示逻辑,并更新相关条件

xieyong 1 giorno fa
parent
commit
e7597aec06

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

@@ -51,6 +51,10 @@
       <template v-slot:isTransferToProductionPlan="{ row }">
         <span>{{ row.isTransferToProductionPlan == 1 ? "已转生产计划" : "未转生产计划"}}</span>
       </template>
+
+      <template v-slot:isMeasuring="{ row }">
+        <span>{{ row.isMeasuring == 1 ? "是" : "否"}}</span>
+      </template>
     </ele-pro-table>
 
     <template v-slot:footer v-if="type != 'detail' && type != 'send'">
@@ -241,10 +245,17 @@
             align: 'center',
             showOverflowTooltip: true
           },
+          // {
+          //   prop: 'isTransferToProductionPlan',
+          //   slot: 'isTransferToProductionPlan',
+          //   label: '是否转生产计划',
+          //   align: 'center',
+          //   showOverflowTooltip: true
+          // }
           {
-            prop: 'isTransferToProductionPlan',
-            slot: 'isTransferToProductionPlan',
-            label: '是否转生产计划',
+            prop: 'isMeasuring',
+            slot: 'isMeasuring',
+            label: '是否收货',
             align: 'center',
             showOverflowTooltip: true
           }
@@ -271,9 +282,12 @@
         if(this.type === 'send') {
           obj.detailType = 3;
         }
-        if(this.type === 'detail'){
+        if(this.type === 'detail') {
           obj.detailType = 2;
         }
+        if(this.type === 'add') {
+          obj.status = 1;
+        }
         await pleaseEntrustGoodsDetail(obj).then((res) => {
           this.goodsList = [];
           res.data.forEach((item) => {

+ 13 - 0
src/views/entrust/components/goodsDetail.vue

@@ -56,6 +56,10 @@
           {{ getStatusInfo(row.status).label }}
         </el-tag>
       </template>
+
+       <template v-slot:isMeasuring="{ row }">
+        <span>{{ row.isMeasuring == 1 ? "是" : "否"}}</span>
+      </template>
     </ele-pro-table>
 
     <template v-slot:footer v-if="type != 'detail' && itemData.sendStatus != 4">
@@ -219,6 +223,14 @@
             minWidth: 110,
             showOverflowTooltip: true,
             show: this.type == 'detail' ? true : false
+          },
+          {
+            prop: 'isMeasuring',
+            slot: 'isMeasuring',
+            label: '是否收货',
+            align: 'center',
+            showOverflowTooltip: true,
+            show: this.type == 'receipt' ? true : false
           }
         ];
       }
@@ -256,6 +268,7 @@
 
         if(this.type === 'receipt' && type) {
           params.detailType = type;
+          params.status = 3;
         }
 
         await pleaseEntrustGoodsDetail(params).then(async (res) => {