Przeglądaj źródła

fix: 采购收货单修改时不显示物品新增按钮

liujt 1 tydzień temu
rodzic
commit
875400b745

+ 3 - 0
src/views/purchasingManage/purchaseOrder/invoice/components/addInvoiceDialog.vue

@@ -119,6 +119,7 @@
 
     <headerTitle title="物品清单" style="margin-top: 30px"></headerTitle>
     <inventoryTable
+      :modalType="modalType"
       :pricingWay="form.pricingWay"
       :sourceType="form.sourceType"
       :outsourceSendCode="form.outsourceSendCode"
@@ -213,6 +214,7 @@
       };
 
       return {
+        modalType: 'add',
         fullscreen: false,
         searchParams: {},
         detailData: {},
@@ -459,6 +461,7 @@
         this.title = type === 'add' ? '新增收货单' : '修改';
         this.row = row;
         this.visible = true;
+        this.modalType = type;
         if (orderId) {
           await this.getPurchaseorderDetail(orderId);
         }

+ 6 - 2
src/views/purchasingManage/purchaseOrder/invoice/components/inventoryTable.vue

@@ -15,6 +15,7 @@
       <template v-slot:toolbar>
         <div class="headbox">
           <el-button
+            v-if="modalType === 'add'"
             size="small"
             type="primary"
             icon="el-icon-plus"
@@ -434,10 +435,13 @@
       outsourceSendCode: String,
       pricingWay: [String, Number],
       sourceType: [String, Number],
-      productType: ''
+      productType: '',
+      modalType: {
+        type: String,
+        default: 'add'
+      }
     },
     components: {
-      outboundDetailsDialog,
       productList,
       taskinstanceDialog,
       productListMain,