ConfirmDialog.vue 3.03 KB
<template>
  <d2-dialog
    title="确认提醒"
    :is-visible="isVisible"
    width="720px"
    @closeDialog="handleClose"
    @confirmDialog="handleConfirm"
  >
    <div class="confirm-wrap">
      <div class="title">请确定以下信息是否正确</div>
      <div class="point-info">
        <div class="label">扣减积分:<span class="integral">{{dataInfo.score}}</span></div>
        <div class="label" style="margin-top:8px">
          备注:<span class="remark"
            >{{dataInfo.remark||'--'}}</span
          >
        </div>
      </div>
      <div class="order-detail">
        <div class="title">订单详情</div>
        <div class="item">订单编号:<span>{{dataInfo.orderData[0].orderCode}}</span></div>
        <div class="item">订单时间:<span>{{dataInfo.orderData[0].orderTimeStr}}</span></div>
        <div class="item">客户姓名:<span>{{dataInfo.orderData[0].customerName}}</span></div>
        <div class="item">商品名称:<span
              v-for="(item, index) in dataInfo.orderData[0].subOrderList"
              :key="index"
            >
              <template v-if="item.upgradeGoodsId">
               
                  <span class="upgrade-goods">
                    {{
                      item.upgradeGoodsName? item.upgradeGoodsName: "-"
                    }}
                  </span>
                </template>
              <span v-else class="upgrade-goods">{{ item.baseGoodsName }}</span>
            </span></div>
        <div class="item">总价:<span>{{dataInfo.orderData[0].totalPrice?dataInfo.orderData[0].totalPrice:'0'}}</span></div>
      </div>
    </div>
  </d2-dialog>
</template>
<script>
export default {
  data() {
    return {}
  },
  props: {
    visible: {
      type: Boolean,
      default: false
    },
    dataInfo: {
      type: Object,
      default: {}
    }
  },
  computed: {
    isVisible: {
      get() {
        return this.visible
      },
      set(newVal) {}
    }
  },
  mounted() {
    console.log(this.dataInfo)
  },
  methods: {
  
    handleConfirm() {
      this.$emit("handleConfirm")
    },
    handleClose() {
      this.$emit("dialogClose")
    }
  }
}
</script>
<style lang="scss" scoped>
.confirm-wrap {
  .title {
    font-weight: 500;
    font-size: 14px;
    color: #1d1d1d;
    margin-bottom: 18px;
  }
  .point-info {
    margin-bottom: 18px;
    // display: flex;
    // align-items: center;
    // justify-content: space-between;
    .label {
      font-weight: 500;
      font-size: 14px;
      color: #1d1d1d;
    }
    .integral {
      font-weight: 600;
      font-size: 20px;
      color: #185efe;
    }
    .remark {
      font-weight: 400;
      font-size: 14px;
      color: #1d1d1d;
    }
  }
  .order-detail {
    height:auto;
    background: #fafafa;
    padding: 8px 10px;
    .title {
      font-weight: 500;
      font-size: 14px;
      color: #1d1d1d;
    }
    .item{
        color: #666666; 
        font-size: 14px;
        margin-bottom:8px;
        span{
            color: #333333;
        }
    }
  }
}
.upgrade-goods{
    margin-right:4px;
}
</style>