| | |
| | | :amount-view="false" |
| | | :show-screen="false" |
| | | :show-action-btn="false" |
| | | :placeholder="'请输入产品名称'" |
| | | :placeholder="'请输入产品名称/产品规格/产品编码'" |
| | | @searchClick="onProductFilterSearch" |
| | | > |
| | | <template slot="leftButton"> |
| | |
| | | <!-- 相关供应商 --> |
| | | <RaleteSupplierList v-if="raleteSupplierConfig.visible" :common-config="raleteSupplierConfig" /> |
| | | <!-- 添加新产品 --> |
| | | <AddNewProduct v-if="newProductConfig.visible" :add-common-config="newProductConfig" /> |
| | | <AddNewProduct v-if="newProductConfig.visible" :disabledList="productTableList.tableInfomation" :add-common-config="newProductConfig" /> |
| | | <!-- 新建/编辑 --> |
| | | <AddPurchase v-if="editPurchaseConfig.visible" :edit-common-config="editPurchaseConfig" /> |
| | | </div> |
| | |
| | | import AddSupplier from "@/views/supplierManage/supplier/AddSupplier" |
| | | import RaleteSupplierList from "@/views/supplierManage/supplier/RaleteSupplierList" |
| | | import AddNewProduct from "@/views/supplierManage/supplier/AddNewProduct" |
| | | import { getProductList, deleteProduct } from "@/api/productManage/product" |
| | | import { getProductListTwo, deleteProduct } from "@/api/productManage/product" |
| | | import AddPurchase from "@/views/purchaseManage/purchase/components/AddPurchase" |
| | | |
| | | export default { |
| | |
| | | // 产品列表 |
| | | async getProductList(val, content) { |
| | | console.log(val, content) |
| | | await getProductList({ |
| | | await getProductListTwo({ |
| | | [val]: content, |
| | | supplierId: this.supplierId, |
| | | page: this.productPagerOptions.currPage, |
| | |
| | | // 搜索产品 |
| | | onProductFilterSearch(searchText) { |
| | | this.productPagerOptions.currPage = 1 |
| | | this.getProductList("name", searchText) |
| | | this.getProductList("keyword", searchText) |
| | | }, |
| | | // 新建供应商 |
| | | addBtnClick() { |
| | |
| | | async enableClick(row, value) { |
| | | let status = value === "启用" ? 1 : 0 |
| | | await changeSupplierStatus({ |
| | | id:Number(row.id), |
| | | id: Number(row.id), |
| | | status: status |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | |
| | | }, |
| | | // 修改产品 |
| | | editClick(row) { |
| | | console.log(row) |
| | | this.newProductConfig.visible = true |
| | | this.newProductConfig.title = "修改" |
| | | this.newProductConfig.infomation = { ...row } |
| | |
| | | this.editPurchaseConfig.title = "新建" |
| | | this.editPurchaseConfig.infomation = { |
| | | supplierId: this.selectRow.id, |
| | | purchaseTypeId:"2", |
| | | purchaseTypeId: "2", |
| | | supplierName: this.selectRow.name |
| | | } |
| | | } |