dialogResult.vue 5.77 KB
<!-- 关联活动订单弹窗 -->
<template>
  <d2-dialog
    title="查看结果"
    :is-visible="isQualityVisible"
    class="qualityDailog"
    width="80%"
    @closeDialog="handleClose"
    @confirmDialog="handleClose"
    :isShowFooter="false"
    :noCancel="true"
  >
    <div>
      <el-tabs v-model="activeName" @tab-click="handleReset">
        <el-tab-pane label="评测报告" name="evaluating">
          <evaluating-report
            v-if="activeName == 'evaluating'"
            v-bind="$attrs"
            ref="evaluatingReport"
          />
        </el-tab-pane>
        <el-tab-pane label="对练详情" name="dialogue">
          <dialogue-detail
            v-if="activeName == 'dialogue'"
            ref="dialogueDetail"
            v-bind="$attrs"
          />
        </el-tab-pane>
        <el-tab-pane label="质检详情" name="analyse">
          <quality-analyse
            v-if="activeName == 'analyse'"
            v-bind="$attrs"
            ref="analyseList"
          />
        </el-tab-pane>
      </el-tabs>
    </div>
  </d2-dialog>
</template>

<script>
import { Util } from "@/common/util"
import { shopmallOrderList } from "@api/order"
import QualityAnalyse from "./qualityInspectionAnalyse"
import DialogueDetail from "./pairDetail"
import evaluatingReport from "./evaluatingReport"
export default {
  name: "DialogResult",
  components: {
    QualityAnalyse,
    DialogueDetail,
    evaluatingReport
  },
  data() {
    return {
      activeName: "evaluating",
      userInfo: this.$store.state.d2admin.user.info,
      countObj: {},
      searchForm: {
        merchantName: "",
        activityName: ""
      },
      searchFormSearch: {},
      searchSelectObj: {
        orderOrTrade: {
          attr: "inputtedOrderCode",
          value: ""
        }
      },
      showFormData: [
        {
          label: "支付时间",
          name: "orderDate",
          type: "datePicker",
          isClear: true,
          pickerOptions: "rangePickerOptions"
        },
        {
          label: "商户名称",
          name: "merchantName",
          type: "input",
          maxlength: 20,
          isClear: true,
          keyFn: this.keyDowmGetList
        },
        {
          label: "所属活动",
          name: "activityName",
          type: "input",
          maxlength: 20,
          isClear: true,
          keyFn: this.keyDowmGetList
        },
        {
          label: "客户名称",
          name: "customerName",
          type: "input",
          maxlength: 20,
          isClear: true,
          keyFn: this.keyDowmGetList
        },
        {
          label: "手机号",
          name: "customerPhone",
          type: "input",
          inputType: "number",
          maxlength: 11,
          isClear: true,
          keyFn: this.keyDowmGetList
        }
      ],
      getListApi: shopmallOrderList,
      tableParams: {
        btnId: new Date().getTime() + parseInt(Math.random() * 1000),
        listName: "list",
        singleSelectUniqueKey: "id",
        tableOption: false,
        tableColumns: [
          {
            label: "订单编号",
            prop: "orderCode",
            width: "200px"
          },
          {
            label: "订单时间",
            prop: "orderTime",
            width: "150px",
            formatter: (cellValue) => {
              return cellValue.orderTime
                ? Util.dateFormate(cellValue.orderTime, "YYYY-MM-DD HH:mm:ss")
                : ""
            }
          },
          {
            label: "客户名称",
            prop: "customerName"
          },
          {
            label: "手机号",
            prop: "customerPhone",
            width: "120px"
          },
          {
            label: "商品名称",
            prop: "goodsName",
            formatter: (cellValue) => {
              if (cellValue.subOrderList && cellValue.subOrderList.length > 0) {
                return cellValue.subOrderList.reduce((str, item, index) => {
                  // return item.goodsName
                  if (index) {
                    str += "/" + item.goodsName
                  } else {
                    str += item.goodsName
                  }
                  return str
                }, "")
                // return cellValue.subOrderList[0].goodsName
              } else {
                return ""
              }
            }
          },
          {
            label: "活动名称",
            prop: "activityName"
            // width: '200px'
          },
          {
            label: "所属门店",
            prop: "merchantName"
            // width: '200px'
          },
          {
            label: "尾款总额",
            prop: "balancePaymentPrice",
            formatter: (cellValue) => {
              return cellValue.balancePaymentPrice
                ? "¥" + cellValue.balancePaymentPrice
                : ""
            }
          },
          {
            label: "支付时间",
            prop: "payDate",
            width: "150px",
            formatter: (cellValue) => {
              return cellValue.payDate
                ? Util.dateFormate(cellValue.payDate, "YYYY-MM-DD HH:mm:ss")
                : ""
            }
          }
        ]
      },
      baseData: {},

      merchantDialogVisible: false,
      ids: [],
      radio: ""
    }
  },

  props: {
    isQualityVisible: {
      type: Boolean,
      default: false
    }
  },

  computed: {},
  mounted() {
    console.log(111, this.$attrs)
  },

  methods: {
    handleReset() {},
    handleClose() {
      this.$emit("closeDialog", false)
    }
  }
}
</script>
  <style scoped>
</style>