| | |
| | | |
| | | <script> |
| | | import AddSalesDetailsDialog from "@/views/sales/salesDetails/AddSalesDetailsDialog" |
| | | import { getSalesDetailsList, getDelSalesDetails } from "@/api/sales/salesDetails" |
| | | import { |
| | | getSalesDetailsList, |
| | | getDelSalesDetails, |
| | | getProductInventoryInfo, |
| | | getProductOrderInfo |
| | | } from "@/api/sales/salesDetails" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import DetailSpecification from "@/views/sales/salesDetails/DetailSpecification" |
| | | import AddCollectionPlan from "@/views/other/payment/collectionPlan/AddCollectionPlan" |
| | |
| | | data() { |
| | | // 产品信息 |
| | | const productColumn = [ |
| | | { label: "产品编号", prop: "number", default: true }, |
| | | { label: "产品名称", prop: "client_name" }, |
| | | { label: "数量", prop: "signTime" }, |
| | | { label: "单位", prop: "member_name" }, |
| | | { label: "发货单", prop: "outboundStatus" }, |
| | | { label: "承运商", prop: "receiveTotalAmount", price: true }, |
| | | { label: "运单号", prop: "total", price: true }, |
| | | { label: "销售单价", prop: "taxUnitPrice", isProductPrice: true }, |
| | | { label: "价税合计", prop: "priceTax", isProductTotal: true } |
| | | { label: "产品编号", prop: "Id", default: true }, |
| | | { label: "产品名称", prop: "Name" }, |
| | | { label: "数量", prop: "Amount" }, |
| | | { label: "单位", prop: "Unit" }, |
| | | { label: "发货单", prop: "shipOrder" }, |
| | | { label: "承运商", prop: "carrier" }, |
| | | { label: "运单号", prop: "waybillNumber" }, |
| | | { label: "销售单价", prop: "SalePrice", price: true }, |
| | | { label: "价税合计", prop: "Valorem", price: true } |
| | | ] |
| | | // 库存信息 |
| | | const inventoryColumn = [ |
| | | { label: "产品编号", prop: "number", default: true }, |
| | | { label: "产品名称", prop: "client_name" }, |
| | | { label: "订单数量", prop: "signTime" }, |
| | | { label: "仓库", prop: "member_name" }, |
| | | { label: "在库数量", prop: "outboundStatus" }, |
| | | { label: "可用库存", prop: "receiveTotalAmount", price: true }, |
| | | { label: "单位", prop: "total", price: true } |
| | | { label: "产品编号", prop: "Id", default: true }, |
| | | { label: "产品名称", prop: "Name" }, |
| | | { label: "订单数量", prop: "OrderAmount" }, |
| | | { label: "仓库", prop: "Warehouse" }, |
| | | { label: "在库数量", prop: "Amount" }, |
| | | { label: "可用库存", prop: "AvailableNumber" }, |
| | | { label: "单位", prop: "Unit" } |
| | | ] |
| | | // 制造信息 |
| | | const makeColumn = [ |
| | | { label: "生产订单", prop: "number", default: true }, |
| | | { label: "产品名称", prop: "client_name" }, |
| | | { label: "订单状态", prop: "signTime" }, |
| | | { label: "工单编号", prop: "member_name" }, |
| | | { label: "工单状态", prop: "outboundStatus" }, |
| | | { label: "计划开始时间", prop: "receiveTotalAmount", price: true }, |
| | | { label: "计划结束时间", prop: "total", price: true } |
| | | { label: "生产订单", prop: "OrderId", default: true }, |
| | | { label: "产品名称", prop: "ProductName" }, |
| | | { label: "订单状态", prop: "OrderStatus" }, |
| | | { label: "工单编号", prop: "WorkOrderId" }, |
| | | { label: "工单状态", prop: "WorkOrderStatus" }, |
| | | { label: "计划开始时间", prop: "StartTime" }, |
| | | { label: "计划结束时间", prop: "EndTime" } |
| | | ] |
| | | return { |
| | | tableList: {}, |
| | |
| | | this.pagerOptions.totalCount = res.data.count |
| | | if (res.data.count > 0) { |
| | | this.selectRow = this.tableList.tableInfomation.length > 0 ? this.tableList.tableInfomation[0] : {} |
| | | // let row = this.tableList.tableInfomation[0]; |
| | | // this.getPointinspectionRecord(row.id); |
| | | let row = this.tableList.tableInfomation[0] |
| | | this.getProductInventoryInfo(row.number) |
| | | } |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | |
| | | this.tableList.tableInfomation = [] |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | // 获取产品/库存信息 |
| | | async getProductInventoryInfo(number) { |
| | | await getProductInventoryInfo(number).then((res) => { |
| | | console.log(res) |
| | | this.productTableList.tableInfomation = res.data |
| | | }) |
| | | }, |
| | | // 获取制造信息 |
| | | async getProductOrderInfo(number) { |
| | | await getProductOrderInfo(number).then((res) => { |
| | | console.log(res) |
| | | this.productTableList.tableInfomation = res.data |
| | | }) |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText) { |
| | |
| | | this.tableBottomColumn = this.productColumn |
| | | this.showBottomCol = this.showProductCol |
| | | this.setBottomList() |
| | | this.getProductInventoryInfo(this.selectRow.number) |
| | | } else if (this.TabsIndex == 1) { |
| | | this.isClickProduct = false |
| | | this.isClickInventory = true |
| | |
| | | this.tableBottomColumn = this.inventoryColumn |
| | | this.showBottomCol = this.showInventoryCol |
| | | this.setBottomList() |
| | | this.getProductInventoryInfo(this.selectRow.number) |
| | | } else if (this.TabsIndex == 2) { |
| | | this.isClickProduct = false |
| | | this.isClickInventory = false |
| | |
| | | this.tableBottomColumn = this.makeColumn |
| | | this.showBottomCol = this.showMakeCol |
| | | this.setBottomList() |
| | | this.getProductOrderInfo(this.selectRow.number) |
| | | } |
| | | }, |
| | | // 状态 |
| | |
| | | tableRowClick(row, column, event) { |
| | | console.log(row, column, event) |
| | | this.selectRow = row |
| | | // this.getPointinspectionRecord(row.id); |
| | | if (this.TabsIndex == 0) { |
| | | this.getProductInventoryInfo(this.selectRow.number) |
| | | } else if (this.TabsIndex == 1) { |
| | | this.getProductInventoryInfo(this.selectRow.number) |
| | | } else if (this.TabsIndex == 2) { |
| | | this.getProductOrderInfo(this.selectRow.number) |
| | | } |
| | | } |
| | | } |
| | | } |