li.shaoyi 3 years ago
parent
commit
924c7639f1
1 changed files with 10 additions and 7 deletions
  1. 10 7
      src/packages/pc/views/order/main/components/edit/index.vue

+ 10 - 7
src/packages/pc/views/order/main/components/edit/index.vue

@@ -8,12 +8,14 @@
             <el-form-item label="联络信息">
                 <el-input type="textarea" :rows="3" v-model="formData.contactInfo" />
             </el-form-item>
-            <el-form-item label="收货地址">
-                <app-address @change="addressChange" />
-            </el-form-item>
-            <el-form-item label="发票信息">
-                <app-invoice @change="invoiceChange" />
-            </el-form-item>
+            <template v-if="code === 'order_buy_edit'">
+                <el-form-item label="收货地址">
+                    <app-address @change="addressChange" />
+                </el-form-item>
+                <el-form-item label="发票信息">
+                    <app-invoice @change="invoiceChange" />
+                </el-form-item>
+            </template>
         </el-form>
         <template #footer>
             <el-button @click="onCancel(false)" plain>取消</el-button>
@@ -32,9 +34,10 @@ import AppAddress from '@pc/components/modules/address/index.vue'
 import AppInvoice from '@pc/components/modules/invoice/index.vue'
 
 const props = defineProps({
+    code: String,
     selectedRow: {
         type: Object as PropType<Ermcp.MyPerformancRsp>,
-        default: () => ({})
+        required: true
     }
 })