| | |
| | | <script> |
| | | import CommonFormTableView from "@/components/makepager/CommonFormTableView"; |
| | | import BomDialog from "@/components/makepager/BomDialog"; |
| | | import { getProductList } from "@/api/productManage/product" |
| | | |
| | | import { |
| | | addPurchase, |
| | |
| | | }, |
| | | // 选择客户相关方法 |
| | | querySearchAsync(queryString, cb, value) { |
| | | this.productTableList.tableProductList=[] |
| | | var restaurants = []; |
| | | if (value === "supplier") { |
| | | restaurants = this.supplierList; |
| | |
| | | ); |
| | | }; |
| | | }, |
| | | handleSelectClient(value, item) { |
| | | async handleSelectClient(value, item) { |
| | | this.productTableList.supplierId=item.ID |
| | | if (value === "client") { |
| | | this.supplierId = item.id; |
| | | this.editConfig.infomation.supplierId=item.ID |
| | | } |
| | | await getProductList({ |
| | | supplierId:item.ID, |
| | | page:1, |
| | | pageSize:100 |
| | | }).then((res)=>{ |
| | | if(res.data.code===200){ |
| | | this.productTableList.tableProductList = res.data.data.list |
| | | console.log(this.productTableList.tableProductList,"pop") |
| | | } |
| | | }) |
| | | }, |
| | | selClientClick() { |
| | | this.editSelectSupplierConfig.editVisible = true; |
| | |
| | | }, |
| | | // 清除已选择用户 |
| | | clearupClient(value) { |
| | | this.emptyProductClick() |
| | | if (value == "client") { |
| | | this.$set(this.editConfig.infomation, "supplierName", ""); |
| | | this.supplierId = null; |
| | |
| | | // }); |
| | | } |
| | | this.productTableList = { |
| | | tableProductList:[], |
| | | supplierId:undefined, |
| | | tableData: this.tableData, |
| | | disabled:this.editConfig.isDisabled, |
| | | tableColumn: [ |