parentDetail.vue 1.09 KB
<!-- 套餐详情 -->
<template>
  <div v-if="pageShow">
    <!-- 套餐信息 -->
    <meal-combo :editForm="editForm"></meal-combo>
    <!-- 商品信息 -->
    <goods-info :goodsInfo="editForm.merchantGoodsInfoList"></goods-info>
    <!-- 门店信息 -->
    <store-info :storeInfo="editForm"></store-info>
  </div>
</template>
<script>
import MealCombo from "./components/MealCombo.vue"
import GoodsInfo from "./components/GoodsInfo.vue"
import StoreInfo from "./components/StoreInfo.vue"
export default {
  name: 'packageDetail',
  components: {
    MealCombo,
    GoodsInfo,
    StoreInfo
  },
  data() {
    return {
      pageShow: false,
      editForm: {}
    }
  },

  created() {
    this.routerInfo = JSON.parse(decodeURIComponent(this.$route.params.id))
  },

  mounted() {
    this.getParentDetailInfo()
  },
  methods: {
    getParentDetailInfo() {
      let params = {
        parentId: this.routerInfo?.parentId
      }
      this.$apis.contractManager.getProdPackageDetailApi(params).then(res => {
        this.editForm = res || {}
        this.pageShow = true
      })
    }
  }
}
</script>