songshankun
2023-09-22 d5c935fbaf14f3c0632a03a73536b127742717ca
src/views/productManage/product/index.vue
@@ -91,7 +91,7 @@
        tableColumn: [
          { label: "产品编码", prop: "number", min: 190, isCommonClick: true },
          { label: "产品名称", prop: "name", min: 130 },
          { label: "供应商", prop: "supplierNumber", min: 130 },
          { label: "供应商", prop: "supplierName", min: 130 },
          { label: "产品类别", prop: "productType", min: 130 },
          { label: "规格", prop: "specifications", min: 130 },
          { label: "型号", prop: "modelNumber", min: 130 },
@@ -109,9 +109,9 @@
      }
    },
    // 请求数据
    async getData(val, content) {
    async getData() {
      await getProductList({
        [val]: content,
        keyword: this.searchText,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
      }).then((res) => {
@@ -128,22 +128,20 @@
      })
    },
    // 搜索
    searchClick(val, content) {
      console.log(val, content)
      this.getData(val.value, content)
    },
    // searchClick(val, content) {
    //   console.log(val, content)
    //   this.getData(val.value, content)
    // },
    onFilterSearch(val){
      this.searchText = val ?? ''
      console.log(this.searchText)
      // TODO: 需要接口支持
      throw new Error("功能未实现")
    },
    resetClick() {
      this.pagerOptions.currPage = 1
      this.getData()
    },
    // resetClick() {
    //   this.getData()
    // },
    // 新建
    addBtnClick() {
      this.editConfig.visible = true
@@ -199,6 +197,8 @@
      height: 80px;
      display: flex;
      align-items: center;
      box-sizing: border-box;
      padding: 10px 20px;
      flex: 1;
      border-radius: 12px;
      background-color: #fff;