src/views/purchaseManage/purchase/index.vue
@@ -9,7 +9,7 @@
          :show-download="false"
          :amount-view="false"
          :show-action-btn="false"
          :placeholder="'请输入供应商名称/物料名称/采购单名称'"
          :placeholder="'请输入供应商名称/物料名称/采购单名称/采购单号等..'"
          @searchClick="onFilterSearch"
        />
      </div>
@@ -180,7 +180,7 @@
      { label: "规格", prop: "specifications" },
      { label: "型号", prop: "modelNumber" },
      { label: "采购数量", prop: "amount" },
      { label: "已发货数量", prop: "sendAmount" },
      { label: "已收货数量", prop: "sendAmount" },
      { label: "已入库数量", prop: "overAmount" },
      { label: "单位", prop: "unit" },
      { label: "采购单价", prop: "purchasePrice", price: true },
@@ -203,7 +203,7 @@
      { label: "收货仓库", prop: "warehouseName" },
      { label: "产品名称", prop: "name" },
      { label: "产品编码", prop: "number" },
      { label: "数量", prop: "amount" },
      { label: "数量", prop: "overAmount" },
      { label: "入库时间", prop: "overTime" },
      { label: "收货人", prop: "principal" },
      { label: "状态", prop: "status", isCallMethod: true, getCallMethod: this.getWarehouseStatus }
@@ -246,6 +246,7 @@
      tableColumn: [
        { label: "单据类型", prop: "orderType", min: 130 },
        { label: "采购单号", prop: "number", min: 150, isCommonClick: true, default: true },
        { label: "销售明细单", prop: "sourceOrder", min: 130 },
        { label: "采购单名称", prop: "name", min: 130, isCommonClick: true },
        { label: "供应商名称", prop: "supplierName", min: 130 },
        { label: "采购数量", prop: "quantity", min: 130 },
@@ -253,7 +254,7 @@
        { label: "经办人", prop: "handledBy", min: 130 },
        { label: "制单人", prop: "creator", min: 130 }
      ],
      showCol: ["采购单号", "采购单名称", "单据类型", "供应商名称", "采购数量", "收货仓库", "经办人", "制单人"],
      showCol: ["采购单号","销售明细单", "采购单名称", "单据类型", "供应商名称", "采购数量", "收货仓库", "经办人", "制单人"],
      tableBottomColumn: [],
      showBottomCol: [],
      TabsIndex: 0,
@@ -266,7 +267,7 @@
        "规格",
        "型号",
        "采购数量",
        "已发货数量",
        "已收货数量",
        "已入库数量",
        "单位",
        "采购单价",
@@ -606,9 +607,9 @@
    tableRowClick(row) {
      this.selectRow = row
      if (this.TabsIndex == 0) {
        getPurchaseInfo({ id: row.id }).then((res) => {
        getOperationInfo({ id: row.id }).then((res) => {
          if (res.code == 200) {
            this.productTableList.tableInfomation = res.data.productList
            this.productTableList.tableInfomation = res.data.productInfos
          } else {
            this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!")
          }
@@ -636,7 +637,7 @@
      ) {
        getOperationInfo({ id: row.id }).then((res) => {
          if (res.code == 200) {
            this.productTableList.tableInfomation = res.data
            this.productTableList.tableInfomation = res.data.inWarehouseInfos
          } else {
            this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!")
          }
@@ -716,15 +717,16 @@
    },
    // 获取产品/收货信息
    async getProductInventoryInfo(row) {
      if (this.TabsIndex == 0) {
        getPurchaseInfo({ id: row.id }).then((res) => {
          if (res.code == 200) {
            this.productTableList.tableInfomation = res.data.productList
          } else {
            this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!")
          }
        })
      } else if (this.TabsIndex == 1 && row.status == 1) {
      // if (this.TabsIndex == 0) {
      //   getPurchaseInfo({ id: row.id }).then((res) => {
      //     if (res.code == 200) {
      //       this.productTableList.tableInfomation = res.data.productList
      //     } else {
      //       this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!")
      //     }
      //   })
      // } else
      if (this.TabsIndex == 1 && row.status == 1) {
        this.productTableList.tableInfomation = []
      } else if (
        (this.TabsIndex == 1 && row.status == 7) ||
@@ -742,13 +744,18 @@
          }
        })
      } else if (
        this.TabsIndex == 0 ||
        (this.TabsIndex == 2 && row.status == 8) ||
        (this.TabsIndex == 2 && row.status == 2) ||
        (this.TabsIndex == 2 && row.status == 3)
      ) {
        getOperationInfo({ id: row.id }).then((res) => {
          if (res.code == 200) {
            this.productTableList.tableInfomation = res.data
            if(this.TabsIndex == 0){
              this.productTableList.tableInfomation = res.data.productInfos
            }else if(this.TabsIndex == 2){
              this.productTableList.tableInfomation = res.data.inWarehouseInfos
            }
          } else {
            this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!")
          }