src/views/other/commonDialog/SelectCommonDialog.vue
@@ -50,7 +50,7 @@
</template>
<script>
// import { postGetMaterialList } from "@/api/ProductiveTask/productBom"
import { getMaterialList } from "@/api/common/other"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
export default {
  name: "EditSelCommonDialog",
@@ -85,8 +85,7 @@
      bomParams: {
        keyword: "",
        page: 1,
        pageSize: 10,
        types: ["原材料", "半成品", "成品"]
        pageSize: 10
      }
    }
  },
@@ -125,7 +124,6 @@
        {
          label: "产品编码",
          prop: "id",
          min: 110,
          isShowColumn: true,
          default: true
        },
@@ -138,7 +136,6 @@
        {
          label: "产品型号",
          prop: "type",
          width: 90,
          isShowColumn: showcol.includes("产品型号"),
          default: false
        }
@@ -166,21 +163,22 @@
    },
    // 产品名称
    async getProductList() {
      this.bomParams.page = this.pagerOptions.currPage ? this.pagerOptions.currPage : 1
      this.bomParams.pageSize = this.pagerOptions.pageSize ? this.pagerOptions.pageSize : 15
      // let params = JSON.parse(JSON.stringify(this.bomParams))
      // await postGetMaterialList(params).then((res) => {
      //   console.log(res.data)
      //   if (res.code === 200) {
      //     if (res.data) {
      //       this.tableList.tableInfomation = res.data || []
      //       this.pagerOptions.totalCount = res.total ? res.total : 0
      //     } else {
      //       this.tableList.tableInfomation = []
      //     }
      //   }
      //   this.loading = false
      // })
      // this.bomParams.page = this.pagerOptions.currPage ? this.pagerOptions.currPage : 1
      // this.bomParams.pageSize = this.pagerOptions.pageSize ? this.pagerOptions.pageSize : 15
      let params = JSON.parse(JSON.stringify(this.bomParams))
      console.log(params)
      await getMaterialList(params).then((res) => {
        console.log(res.data)
        if (res.code === 200) {
          if (res.data) {
            this.tableList.tableInfomation = res.data || []
            this.pagerOptions.totalCount = res.total ? res.total : 0
          } else {
            this.tableList.tableInfomation = []
          }
        }
        this.loading = false
      })
    },
    handleClose() {
      this.editConfig.editVisible = false