| | |
| | | getPurchaseInfo, |
| | | newSubmitPurchase, |
| | | deletePurchase, |
| | | getPurchaseQualityInspectionInfo, |
| | | getOperationInfo |
| | | } from "@/api/purchaseManage/purchase" |
| | | import DetailSupplier from "@/views/purchaseManage/purchase/DetailSupplier" |
| | |
| | | data() { |
| | | // 产品信息 |
| | | const productColumn = [ |
| | | { label: "产品编号", prop: "number", default: true }, |
| | | { label: "产品名称", prop: "name" }, |
| | | { label: "规格", prop: "specifications" }, |
| | | { label: "产品编号", prop: "productId", default: true }, |
| | | { label: "产品名称", prop: "productName" }, |
| | | { label: "规格", prop: "specs" }, |
| | | { label: "型号", prop: "modelNumber" }, |
| | | { label: "采购数量", prop: "amount" }, |
| | | { label: "已发货数量", prop: "sendAmount" }, |
| | |
| | | ] |
| | | // 收货信息 |
| | | const recriveColumn = [ |
| | | { label: "收货时间", prop: "operationNumber", default: true }, |
| | | { label: "收货时间", prop: "createTime", default: true }, |
| | | { label: "收货人", prop: "principal" }, |
| | | { label: "产品名称", prop: "name" }, |
| | | { label: "产品编码", prop: "number" }, |
| | | { label: "规格", prop: "warehouseName" }, |
| | | { label: "产品名称", prop: "productName" }, |
| | | { label: "产品编码", prop: "productId" }, |
| | | { label: "规格", prop: "specs" }, |
| | | { label: "数量", prop: "amount" }, |
| | | { label: "单位", prop: "overTime" }, |
| | | { label: "单位", prop: "unit" }, |
| | | { label: "状态", prop: "status", isCallMethod: true, getCallMethod: this.getreceiveStatusStatus } |
| | | ] |
| | | // 入库信息 |
| | |
| | | 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) |
| | | } |
| | | } |
| | | }) |
| | |
| | | this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!") |
| | | } |
| | | }) |
| | | } else if (this.TabsIndex == 1 && row.status == 1) { |
| | | } else if (this.TabsIndex == 1 && row.status == 7||row.status == 8) { |
| | | this.productTableList.tableInfomation = [] |
| | | } else { |
| | | getPurchaseQualityInspectionInfo({ |
| | | purchaseNumber: row.number, |
| | | }).then((res)=>{ |
| | | if (res.code == 200) { |
| | | this.productTableList.tableInfomation = res.data |
| | | } else { |
| | | this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!") |
| | | }"" |
| | | }) |
| | | } else if(this.TabsIndex == 2) { |
| | | getOperationInfo({ id: row.id }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.productTableList.tableInfomation = res.data |
| | |
| | | this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!") |
| | | } |
| | | }) |
| | | }else { |
| | | this.productTableList.tableInfomation=[] |
| | | } |
| | | }, |
| | | // bom 列表 |
| | |
| | | }, |
| | | // 获取产品/收货信息 |
| | | async getProductInventoryInfo(row) { |
| | | console.log(row) |
| | | if (this.TabsIndex == 0 && row.status == 1) { |
| | | getPurchaseInfo({ id: row.id }).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | }) |
| | | } else if (this.TabsIndex == 1 && row.status == 1) { |
| | | this.productTableList.tableInfomation = [] |
| | | } else { |
| | | } else if(this.TabsIndex==1 && row.status==7||this.TabsIndex==1&&row.status==8){ |
| | | getPurchaseQualityInspectionInfo({ |
| | | purchaseNumber: row.number, |
| | | }).then((res)=>{ |
| | | if (res.code == 200) { |
| | | this.productTableList.tableInfomation = res.data |
| | | } else { |
| | | this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!") |
| | | }"" |
| | | }) |
| | | }else if(this.TabsIndex==2){ |
| | | getOperationInfo({ id: row.id }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.productTableList.tableInfomation = res.data |
| | |
| | | this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!") |
| | | } |
| | | }) |
| | | }else{ |
| | | this.productTableList.tableInfomation =[] |
| | | } |
| | | } |
| | | } |