yangfeng
2023-12-14 fc188397419e76da8e97c0782599f757fb34bd30
src/views/supplierManage/supplier/index.vue
@@ -277,14 +277,14 @@
      await getSupplierList({
        name: this.searchSupplierName,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize,
        pageSize: this.pagerOptions.pageSize
      }).then((res) => {
        console.log(res)
        if (res.code === 200) {
          const list = res.data.list.map((item) => {
            return {
              ...item,
              id: item.ID,
              id: item.id,
              status_name: item.status === 0 ? "未启用" : "启用"
            }
          })
@@ -292,7 +292,7 @@
          this.tableList.tableInfomation = list || []
          this.pagerOptions.totalCount = res.data.total
          if (list && list.length > 0) {
            this.supplierId = this.tableList.tableInfomation[0].ID
            this.supplierId = this.tableList.tableInfomation[0].id
            this.selectRow = this.tableList.tableInfomation.length > 0 ? this.tableList.tableInfomation[0] : {}
          } else {
            this.supplierId = 0
@@ -347,7 +347,10 @@
    addBtnClick() {
      this.editConfig.visible = true
      this.editConfig.title = "新建"
      this.editConfig.infomation = { fileId: 0,responsiblePersonName:document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1")}
      this.editConfig.infomation = {
        fileId: 0,
        responsiblePersonName: document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1")
      }
    },
    // 启用供应商
    async enableClick(row, value) {
@@ -395,7 +398,7 @@
        type: "warning"
      })
        .then(() => {
          deleteProduct({ id: row.ID }).then((response) => {
          deleteProduct({ id: row.id }).then((response) => {
            if (response.code === 200) {
              this.$message.success("删除成功")
              this.getProductList()
@@ -418,7 +421,7 @@
      console.log(row)
      this.productPagerOptions.currPage = 1
      this.selectRow = row
      this.supplierId = row.ID
      this.supplierId = row.id
      this.getProductList()
    },
    // 详情
@@ -442,9 +445,9 @@
    // 创建采购单
    creatPurchase() {
      this.editPurchaseConfig.visible = true
      this.editPurchaseConfig.title = "创建"
      this.editPurchaseConfig.title = "新建"
      this.editPurchaseConfig.infomation = {
        supplierId: this.selectRow.ID,
        supplierId: this.selectRow.id,
        supplierName: this.selectRow.name
      }
    }