yangfeng
2023-08-21 46ed69e3b72658140a40127f4bae16bef9a02d56
src/views/service/clientServiceOrder/index.vue
@@ -61,6 +61,12 @@
    isDetail: {
      type: Boolean,
      default: false
    },
    addConfig: {
      type: Object,
      default: () => {
        return {}
      }
    }
  },
  mixins: [pageMixin],
@@ -107,11 +113,20 @@
        value: "serviceNumber",
        label: "服务单编号"
      },
      selValueList: []
      selValueList: [],
      keyword: "",
      keywordType: ""
    }
  },
  created() {
    this.setTable()
    if (!this.isDetail) {
      this.keyword = ""
      this.keywordType = ""
    } else {
      this.keyword = this.addConfig.keyword
      this.keywordType = this.addConfig.keywordType
    }
    this.getData()
  },
  methods: {
@@ -123,9 +138,9 @@
          { label: "主题", prop: "subject" }, // 主题
          { label: "客户名称", prop: "client_name", min: 130, isClientClick: true }, // 客户名称
          { label: "实际处理时间", prop: "realTime" }, // 实际处理时间
          { label: "服务人员", prop: "serviceManId" }, // 服务人员
          { label: "服务人员", prop: "serviceMan_name" }, // 服务人员
          { label: "服务方式", prop: "serviceType_name" }, // 服务方式
          { label: "产品类别", prop: "reportSourceId" }, // 产品类别
          // { label: "产品类别", prop: "reportSourceId" }, // 产品类别
          { label: "故障类别", prop: "faultType_name" } // 故障类别
        ]
      }
@@ -137,13 +152,15 @@
      }
    },
    // 请求数据
    async getData(keyword, keywordType) {
    async getData() {
      this.loading = true
      await getServiceOrderList({
        keyword: keyword,
        keywordType: keywordType,
        keyword: this.keyword,
        keywordType: this.keywordType,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
        pageSize: this.pagerOptions.pageSize,
        salesDetailsId: 0,
        serviceContractId: 0
      })
        .then((res) => {
          console.log(res)
@@ -154,7 +171,9 @@
                  ...item,
                  client_name: item.Client.name,
                  serviceType_name: item.ServiceType.name,
                  faultType_name: item.FaultType.name
                  faultType_name: item.FaultType.name,
                  serviceContract_Number: item.ServiceContract.number,
                  serviceMan_name: item.serviceMan.username
                }
              })
              this.tableList.tableInfomation = list || []
@@ -179,11 +198,13 @@
    },
    // 搜索
    searchClick(val, content) {
      console.log(val, content)
      this.getData(content, val.label)
      this.keyword = content
      this.keywordType = val.label
      this.getData()
    },
    resetClick() {
      this.search_map = {}
      this.keyword = ""
      this.keywordType = ""
      this.getData()
    },
    // 新建
@@ -197,7 +218,7 @@
      console.log(row)
      this.editConfig.visible = true
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
      this.editConfig.infomation = { ...row, contact_name: row.Contact.name, service_number: row.serviceContractId }
    },
    // 删除
    delClick() {
@@ -245,7 +266,7 @@
    selCommonClick(row) {
      console.log(row)
      this.clientServiceDetail.visible = true
      this.clientServiceDetail.infomation = { ...row }
      this.clientServiceDetail.infomation = { ...row, contact_name: row.Contact.name }
    }
  }
}