| | |
| | | </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", |
| | |
| | | bomParams: { |
| | | keyword: "", |
| | | page: 1, |
| | | pageSize: 10, |
| | | types: ["原材料", "半成品", "成品"] |
| | | pageSize: 10 |
| | | } |
| | | } |
| | | }, |
| | |
| | | { |
| | | label: "产品编码", |
| | | prop: "id", |
| | | min: 110, |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | |
| | | { |
| | | label: "产品型号", |
| | | prop: "type", |
| | | width: 90, |
| | | isShowColumn: showcol.includes("产品型号"), |
| | | default: false |
| | | } |
| | |
| | | }, |
| | | // 产品名称 |
| | | 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 |