yangfeng
2023-08-26 8380b537474be9b9aa24efcd65c730e2907b9b8b
src/views/supplierManage/supplier/RaleteSupplierList.vue
@@ -21,7 +21,7 @@
</template>
<script>
// import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog"
import { getProductList } from "@/api/productManage/product"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
export default {
  name: "AddSupplierDialog",
@@ -48,6 +48,7 @@
  },
  created() {
    this.setTable()
    this.getProductList()
  },
  methods: {
    setTable() {
@@ -55,14 +56,35 @@
        tableInfomation: [],
        selectIndex: true,
        tableColumn: [
          { label: "供应商编号", prop: "number", min: 190, isCommonClick: true },
          { label: "供应商名称", prop: "name", min: 130 },
          { label: "采购价格", prop: "contact_name", min: 130 },
          { label: "供货天数", prop: "contact_phone", min: 130 },
          { label: "物流时长(天)", prop: "sales_resources", min: 130 }
          { label: "供应商编号", prop: "supplierNumber", min: 190, isCommonClick: true },
          { label: "供应商名称", prop: "supplierName", min: 130 },
          { label: "采购价格", prop: "purchasePrice", min: 130 },
          { label: "供货天数", prop: "deliveryTime", min: 130 },
          { label: "物流时长(天)", prop: "shippingDuration", min: 130 }
        ]
      }
    },
    // 产品列表
    async getProductList(val, content) {
      console.log(val, content)
      await getProductList({
        number: this.editConfig.infomation.number,
        supplierId: this.editConfig.infomation.supplierId,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
      }).then((res) => {
        console.log(res.data)
        const list = res.data.data.list.map((item) => {
          return {
            ...item,
            supplierNumber: item.supplier.number,
            supplierName: item.supplier.name
          }
        })
        this.tableList.tableInfomation = list || []
        this.tableList.totalCount = res.data.data.total
      })
    },
    handleClose() {
      this.editConfig.visible = false
    },