songshankun
2023-10-13 5e796658635bdfcb7806a49fd424ce08c7f8c4a3
src/views/sales/quotation/index.vue
@@ -6,12 +6,7 @@
    <div class="filter" v-else>
      <div class="filter-card">
        <CommonSearch
            :show-add="false"
            :amount-view="false"
            placeholder="请输入报价单号"
            @searchClick="onFilterSearch"
        >
        <CommonSearch :show-add="false" :amount-view="false" placeholder="请输入报价单号" @searchClick="onFilterSearch">
          <template slot="leftButton">
            <el-button size="small" type="primary"  @click="addBtnClick">新建</el-button>
<!--            <el-button size="small"  @click="delClick">删除</el-button>-->
@@ -151,7 +146,7 @@
      this.search_map = {}
    } else {
      this.search_map = {
        [this.addConfig.id_name]: this.addConfig.client_name
        [this.addConfig.id_name]: this.addConfig.id
      }
    }
    this.getData(this.search_map)
@@ -165,7 +160,7 @@
        showcol: this.showCol,
        tableColumn:this.setColumnVisible(this.showCol)
      }
      this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label);
      this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
      this.searchOptions = []
      for (let i = 0; i < this.tableList.tableColumn.length; i++) {
        const label = this.tableList.tableColumn[i].label
@@ -174,7 +169,7 @@
      }
    },
    setColumnVisible(showCol){
      return  this.tableColumn.map(ele=>{
      return this.tableColumn.map((ele) => {
        return {
          ...ele,
          isShowColumn:showCol.includes(ele.label)
@@ -182,8 +177,8 @@
      })
    },
    selTableCol(val) {
      this.showcol = val;
      this.tableList.tableColumn = this.setColumnVisible(val);
      this.showcol = val
      this.tableList.tableColumn = this.setColumnVisible(val)
    },
    // 请求数据
    async getData() {
@@ -223,7 +218,7 @@
    },
    // 搜索
    onFilterSearch(searchText){
      this.search_map.number = searchText ?? ''
      this.search_map.number = searchText ?? ""
      this.pagerOptions.currPage = 1
      this.getData()
    },
@@ -284,7 +279,7 @@
            })
          })
          .catch((err) => {
            if (err !== 'cancel') {
          if (err !== "cancel") {
              console.error(err)
              this.$message.warning("删除失败")
            }