| | |
| | | this.searchParam.pageSize = this.pagerOptions.pageSize |
| | | let rsp = await outsourceOrderList(this.searchParam) |
| | | let list = rsp |
| | | console.log(list) |
| | | if (list && list.code == 200) { |
| | | this.tableList.tableInfomation = list.data |
| | | this.pagerOptions.totalCount = list.total |
| | | if (list.total > 0) { |
| | | this.selectRow = list.data[0] |
| | | this.getProductListMethod(list.data[0].id) |
| | | if (this.activeNameBottom == 1) { |
| | | this.getProductListMethod(this.selectRow.id) |
| | | } else if (this.activeNameBottom == 2) { |
| | | this.getMaterialApplyList(this.selectRow.number) |
| | | } else { |
| | | this.getDeliveryList(this.selectRow.id) |
| | | } |
| | | } else { |
| | | this.selectRow = {} |
| | | } |
| | | this.overview() |
| | | } |
| | |
| | | // 获取产品信息 |
| | | getProductListMethod(id) { |
| | | outsourceOrderProductList({ outsourcingOrderId: id }).then((res) => { |
| | | console.log(res) |
| | | if (res.code == 200) { |
| | | this.bottomTwoTableList1.tableInfomation = res.data |
| | | } |
| | |
| | | // 获取物料申请单 |
| | | getMaterialApplyList(number) { |
| | | getMaterialApplyList({ number: number }).then((res) => { |
| | | console.log(res) |
| | | if (res.code == 200) { |
| | | this.bottomTwoTableList2.tableInfomation = res.data |
| | | } |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | addCommonClick() { |
| | | alert("露西666") |
| | | }, |
| | | searchClick(val) { |
| | | this.searchParam.keyword = val |
| | | this.pagerOptions.currPage = 1 |
| | | this.bottomTwoTableList1.tableInfomation = [] |
| | | this.bottomTwoTableList2.tableInfomation = [] |
| | | this.bottomTwoTableList3.tableInfomation = [] |
| | | this.getData() |
| | | }, |
| | | tableRowClick(row, column, event) { |
| | |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.changeOutsourceOrderStatus(row.number, 6, "生产完成成功") |
| | | }) |
| | | .then(() => { |
| | | this.changeOutsourceOrderStatus(row.number, 6, "生产完成成功") |
| | | }) |
| | | .catch(() => { |
| | | this.$message.warning("已取消生产完成") |
| | | }) |
| | | } else if (val == "发货完成") { |
| | | this.$confirm("是否确认全部发货完成?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.changeOutsourceOrderStatus(row.number, 7, "全部发货完成成功") |
| | | }) |
| | | .then(() => { |
| | | this.changeOutsourceOrderStatus(row.number, 7, "全部发货完成成功") |
| | | }) |
| | | .catch(() => { |
| | | this.$message.warning("已取消发货完成") |
| | | }) |
| | | } |
| | | }, |
| | | changeOutsourceOrderStatus(number, status, str) { |
| | |
| | | }, |
| | | tabClickBottom(activeNameBottom) { |
| | | this.activeNameBottom = activeNameBottom |
| | | if (activeNameBottom == 1) { |
| | | this.getProductListMethod(this.selectRow.id) |
| | | } else if (activeNameBottom == 2) { |
| | | this.getMaterialApplyList(this.selectRow.number) |
| | | } else { |
| | | this.getDeliveryList(this.selectRow.id) |
| | | if (Object.keys(this.selectRow).length > 0) { |
| | | if (activeNameBottom == 1) { |
| | | this.getProductListMethod(this.selectRow.id) |
| | | } else if (activeNameBottom == 2) { |
| | | this.getMaterialApplyList(this.selectRow.number) |
| | | } else { |
| | | this.getDeliveryList(this.selectRow.id) |
| | | } |
| | | } |
| | | }, |
| | | setTable() { |
| | |
| | | ? "生产完成" |
| | | : val === 7 |
| | | ? "发货完成" |
| | | : val == 8 |
| | | ? "入库完成" |
| | | : val == 9 |
| | | ? "关闭" |
| | | : "--" |
| | | } |
| | | } |