yangfeng
2023-07-19 4898b385886794bf0663ec2d883ea808b78ae522
src/views/service/orderManage/index.vue
@@ -30,6 +30,7 @@
<script>
import AddOrderManageDialog from "@/views/service/orderManage/AddOrderManageDialog"
import { getOrderManageList } from "@/api/serviceManage/orderManage"
export default {
  name: "SalesLead",
@@ -73,21 +74,12 @@
  },
  created() {
    this.setTable()
    this.getData()
  },
  methods: {
    setTable() {
      this.tableList = {
        tableInfomation: [
          {
            orderNumber: "LEA110",
            customName: "上海通用机械有限公司",
            contactName: "董奇伟",
            servicePerson: "系统管理员",
            orderStatus: "已结单",
            repairSource: "电话报修",
            orderType: "保内收费"
          }
        ],
        tableInfomation: [],
        tableColumn: [
          { label: "工单编号", prop: "orderNumber", min: 100 }, // 工单编号
          { label: "客户名称", prop: "customName", min: 130 }, // 客户名称
@@ -104,6 +96,34 @@
        this.searchOptions.push({ value: (i + 1).toString(), label: label })
      }
    },
    // 请求数据
    async getData() {
      this.loading = true
      await getOrderManageList()
        .then((res) => {
          console.log(res)
          if (res.code === 200) {
            if (res.data.list && res.data.list.length > 0) {
              const list = res.data.list.map((item) => {
                return {
                  ...item
                }
              })
              this.tableList.tableInfomation = list || []
            } else {
              this.tableList.tableInfomation = []
            }
          } else {
            this.tableList.tableInfomation = []
          }
          this.loading = false
        })
        .catch((err) => {
          console.log(err)
          this.tableList.tableInfomation = []
          this.loading = false
        })
    },
    // tab切换
    tabsClick(tab, event) {
      console.log(tab, event)