yangfeng
2023-08-16 1249ca8ff44f8de7992fdb5866eae19613d606c3
src/views/service/serviceContract/index.vue
@@ -56,6 +56,12 @@
    isDetail: {
      type: Boolean,
      default: false
    },
    addConfig: {
      type: Object,
      default: () => {
        return {}
      }
    }
  },
  mixins: [pageMixin],
@@ -108,11 +114,20 @@
        value: "number",
        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: {
@@ -140,11 +155,11 @@
      }
    },
    // 请求数据
    async getData(keyword, keywordType) {
    async getData() {
      this.loading = true
      await getServiceContractList({
        keyword: keyword,
        keywordType: keywordType,
        keyword: this.keyword,
        keywordType: this.keywordType,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
      })
@@ -179,25 +194,31 @@
    },
    // 搜索
    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()
    },
    // 新建
    addBtnClick() {
      this.editConfig.visible = true
      this.editConfig.title = "新建"
      this.editConfig.infomation = {}
      this.editConfig.infomation = { ...this.addConfig }
    },
    // 编辑
    handleClick(row) {
      console.log(row)
      this.editConfig.visible = true
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
      this.editConfig.infomation = {
        ...row,
        contract_number: row.salesDetails.number,
        quotation_number: row.quotation.number
      }
    },
    // 删除
    delClick() {