zuozhengqing
2023-12-15 a9b2ee32ecdd3fbe05945777e9ca5fc273f95fab
src/views/purchaseManage/purchase/components/AddPurchase.vue
@@ -651,8 +651,8 @@
          quantity: data.quantity // 采购数量
        }
      }
      if (data.ID) {
        params.purchase.id = data.ID
      if (data.id) {
        params.purchase.id = data.id
      }
      return params
    },
@@ -676,13 +676,13 @@
    },
    // 选择供应商
    async handleSelectClient(value, item) {
      this.productTableList.supplierId = item.ID
      this.productTableList.supplierId = item.id
      if (value === "client") {
        this.supplierId = item.id
        this.editConfig.infomation.supplierId = item.ID
        this.editConfig.infomation.supplierId = item.id
      }
      await getProductList({
        supplierId: item.ID,
        supplierId: item.id,
        page: 1,
        pageSize: 100
      }).then((res) => {
@@ -697,7 +697,7 @@
    },
    async selClient(row) {
      await getProductList({
        supplierId: row.ID,
        supplierId: row.id,
        page: 1,
        pageSize: 100
      }).then((res) => {
@@ -708,7 +708,7 @@
      this.$set(this.editConfig.infomation, "supplierName", row.name)
      this.editConfig.infomation.contact = row.contact
      this.editConfig.infomation.phone = row.phone
      this.editConfig.infomation.supplierId = row.ID
      this.editConfig.infomation.supplierId = row.id
    },
    // 清除已选择用户
    clearupClient(value) {
@@ -719,11 +719,11 @@
      }
    },
    setTableForm() {
      if (!this.editConfig.infomation.ID || this.editConfig.infomation.productList.length === 0) {
      if (!this.editConfig.infomation.id || this.editConfig.infomation.productList.length === 0) {
        this.tableData = [
          {
            purchaseId: 0,
            productId: this.productId,
            productId:Number(this.productId),
            productIndex: this.productIndex,
            amount: 0,
            name: "",
@@ -860,7 +860,7 @@
    },
    //选中产品
    handleProduct(item) {
      this.tableData[this.productListIdx].productId = item.ID
      this.tableData[this.productListIdx].productId = Number(item.id)
      console.log(item, "选中产品", this.tableData)
    }
  }