| | |
| | | showCol: ["采购单号", "采购单名称", "单据类型", "供应商名称", "采购数量", "收货仓库", "经办人", "制单人"], |
| | | tableBottomColumn: [], |
| | | showBottomCol: [], |
| | | TabsIndex: "0", |
| | | TabsIndex: 0, |
| | | productTableList: {}, |
| | | // 产品信息 |
| | | productColumn: productColumn, |
| | |
| | | this.pagerOptions.totalCount = res.data.total |
| | | if (res.data.total > 0) { |
| | | this.selectRow = this.tableList.tableInfomation.length > 0 ? this.tableList.tableInfomation[0] : {} |
| | | this.tableRowClick(this.selectRow) |
| | | // this.tableRowClick(this.selectRow) |
| | | this.getProductInventoryInfo(this.selectRow) |
| | | } |
| | | } |
| | | }) |
| | |
| | | if (!row.supplierName) { |
| | | this.btnEdit(row) |
| | | } else { |
| | | newSubmitPurchase(row.id).then((response) => { |
| | | newSubmitPurchase({ |
| | | id: Number(row.id), |
| | | status:4 |
| | | }).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("提交成功") |
| | | this.getData() |
| | |
| | | type: "warning" |
| | | }).then( |
| | | () => { |
| | | newSubmitPurchase(Number(row.id)).then((response) => { |
| | | newSubmitPurchase({ |
| | | id: Number(row.id), |
| | | status:5 |
| | | }).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("已取消") |
| | | this.getData() |
| | |
| | | // top 行点击 |
| | | tableRowClick(row) { |
| | | this.selectRow = row |
| | | if (row.status == 1 && this.TabsIndex == 0) { |
| | | if (this.TabsIndex == 0) { |
| | | getPurchaseInfo({ id: row.id }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.productTableList.tableInfomation = res.data.productList |
| | |
| | | this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!") |
| | | } |
| | | }) |
| | | } else if (this.TabsIndex == 1 && row.status == 7||row.status == 8) { |
| | | } else if (this.TabsIndex == 1 ) { |
| | | this.productTableList.tableInfomation = [] |
| | | getPurchaseQualityInspectionInfo({ |
| | | purchaseNumber: row.number, |
| | |
| | | this.setBottomList() |
| | | this.getProductInventoryInfo(this.selectRow) |
| | | } else if (this.TabsIndex == 2) { |
| | | console.log("入库") |
| | | // 入库信息列表 |
| | | this.tableBottomColumn = this.inLibraryColumn |
| | | this.showBottomCol = this.inLibraryCol |
| | |
| | | }, |
| | | // 获取产品/收货信息 |
| | | async getProductInventoryInfo(row) { |
| | | if (this.TabsIndex == 0 && row.status == 1) { |
| | | if (this.TabsIndex == 0 ) { |
| | | getPurchaseInfo({ id: row.id }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.productTableList.tableInfomation = res.data.productList |
| | |
| | | }) |
| | | } else if (this.TabsIndex == 1 && row.status == 1) { |
| | | this.productTableList.tableInfomation = [] |
| | | } else if(this.TabsIndex==1 && row.status==7||row.status==8){ |
| | | } else if(this.TabsIndex==1 ){ |
| | | getPurchaseQualityInspectionInfo({ |
| | | purchaseNumber: row.number, |
| | | }).then((res)=>{ |