vehicleDamageOderImportDetail.vue 3.53 KB
<!-- 车损报价单 -->
<template>
  <d2-container class="m-t-40 d2-con">
    <div class="header" slot="header"></div>
    <div class="d2-container-content">
      <d2-table
        ref="damageTable"
        :get-list-api="getListApi"
        :search-form="searchFormSearch"
        :table-params="tableParams"
      >
      </d2-table>
    </div>
  </d2-container>
</template>

<script>
import { taskOrderStatusList } from "@/common/constant/vehicle"
import { Util, deepClone } from "@/common/util"
import { importTaskOrderDetailPage } from "@api/vehicleDamage"
export default {
  name: "VehicleDamageList",
  data() {
    return {
      getListApi: importTaskOrderDetailPage,
      searchFormSearch: {
        taskId: ""
      },
      tableParams: {
        btnId: new Date().getTime() + parseInt(Math.random() * 1000),
        listName: "list",
        tableOption: false,
        tableColumns: [
          {
            label: "门店名称",
            prop: "merchantName4s"
            // width: "160px"
          },
          {
            label: "客户姓名",
            prop: "customerName"
            // width: "250px"
          },
          {
            label: "支付时间",
            prop: "payTime"
            // width: "100px",
            // formatter: (cellValue) => {
            //   return Util.dateFormate(cellValue.payTime, "YYYY-MM-DD HH:mm:ss")
            // }
          },
          {
            label: "交易参考号",
            prop: "transactionNo",
            width: "250px"
          },
          {
            label: "单价",
            prop: "goodsPrice"
          },
          {
            label: "总价",
            prop: "goodsTotalPrice"
          },
          {
            label: "任务状态",
            prop: "taskOrderStatus",
            formatter: (cellValue) => {
              return (
                taskOrderStatusList.find(
                  (item) => item.id == cellValue.taskOrderStatus
                )?.label || "-"
              )
            },
            className: (cellValue) => {
              return (
                {
                  "-1": "redSpot",
                  0: "yellowSpot",
                  1: "deepBlueSpot",
                  2: "greenSpot"
                }[cellValue.taskOrderStatus] || "ashSpot"
              )
            }
          },
          // {
          //   label: "创建时间",
          //   prop: "createTime",
          //   formatter: (cellValue) => {
          //     return Util.dateFormate(
          //       cellValue.createdTime,
          //       "YYYY-MM-DD HH:mm:ss"
          //     )
          //   }
          // },
          {
            label: "更新时间",
            prop: "updateTime"
            // formatter: (cellValue) => {
            //   return Util.dateFormate(
            //     cellValue.updatedTime,
            //     "YYYY-MM-DD HH:mm:ss"
            //   )
            // }
          },
          {
            label: "任务状态描述",
            prop: "errorMsg"
          }
        ]
      }
    }
  },
  computed: {
    taskId() {
      return this.$route.query.taskId
    }
  },
  mounted() {
    this.searchFormSearch.taskId = this.taskId
    // this.
  },

  methods: {
    handleDetail(row) {
      quotationPrint({ id: row.id }).then((res) => {
        window.open(res)
      })
    }
  }
}
</script>

<style scoped lang="scss">
.d2-con {
  .d2-header-switch {
    display: none;
  }
}
</style>