haoxuan
2023-12-20 caf1f99e718ca2ac07fa64e7a71a6d7fa88b8989
报价单列表和对应产品列表的数据调试
1个文件已修改
31 ■■■■■ 已修改文件
src/views/sales/quotation/index.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/quotation/index.vue
@@ -79,9 +79,6 @@
import { getQuotationList, getDelQuotation } from "@/api/sales/quotation"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import DetailQuotation from "@/views/sales/quotation/DetailQuotation"
import {
  getProductInventoryInfo,
} from "@/api/sales/salesDetails"
export default {
  name: "QuotationView",
  props: {
@@ -111,10 +108,10 @@
      { label: "产品名称", prop: "name" },
      { label: "数量", prop: "amount" },
      { label: "单位", prop: "unit" },
      { label: "销售单价", prop: "salePrice" },
      { label: "成本单价", prop: "carrier" },
      { label: "毛利", prop: "waybillNumber" },
      { label: "毛利率", prop: "salePrice", price: true },
      { label: "销售单价", prop: "price" },
      { label: "成本单价", prop: "cost" },
      { label: "毛利", prop: "profit" },
      { label: "毛利率", prop: "margin",},
      { label: "价税合计", prop: "valorem", price: true }
    ]
    return {
@@ -167,12 +164,10 @@
        { label: "有效期", prop: "validity_date", min: 100 }, // 修改时间
        // { label: "小计", prop: "subTotal" }, // 小计
        // { label: "合计", prop: "total" }, // 合计
        { label: "客戶名称", prop: "client_name", },
        { label: "数量", prop: "productNumber", isProductAmount: true },
        { label: "合计", prop: "priceTax", isProductTotal: true },
        { label: "状态", prop: "priceTax",}
        { label: "客戶名称", prop: "client_name",min: 120,},
        { label: "状态", prop: "quotationStatus",}
      ],
      showCol: ["报价单号", "报价单名称",  "销售负责人", "有效期", "客戶名称", "数量", "合计",'状态'],
      showCol: ["报价单号", "报价单名称",  "销售负责人", "有效期", "客戶名称","状态"],
      selectRow: {},
      loading:false,
      // 增加 产品信息列表
@@ -209,14 +204,7 @@
    },
    // 获取产品/库存信息
    async getProductInventoryInfo(row) {
      if (row.status === 1) {
        this.productTableList.tableInfomation = row.products || []
      } else {
        await getProductInventoryInfo(row.number).then((res) => {
          console.log(res)
          this.productTableList.tableInfomation = res.data?.length > 0 ? res.data : []
        })
      }
      this.productTableList.tableInfomation = row.products || []
    },
    // top 行点击
    tableRowClick(row) {
@@ -300,7 +288,8 @@
                  ...item,
                  client_name: item.client.name,
                  contact_name: item.contact.name,
                  member_name: item.member.username
                  member_name: item.member.username,
                  quotationStatus:item.quotation_status.name,
                }
              })
              this.tableList.tableInfomation = list || []