| | |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title ml10">产品大类:</span> |
| | | <span class="search_title ml10">产品名称:</span> |
| | | <el-input v-model="searchForm.productName" |
| | | style="width: 240px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <span class="search_title ml10">产品大类:</span> |
| | | <el-select v-model="searchForm.parentId" |
| | | style="width: 240px" |
| | | placeholder="请输入" |
| | | clearable> |
| | | <el-option v-for="item of selectList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px">搜索</el-button> |
| | | </div> |
| | | <div> |
| | |
| | | :row-class-name="tableRowClassName" height="calc(100vh - 18.5em)"> |
| | | <el-table-column align="center" type="selection" width="55" /> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column label="产品大类" prop="productName" show-overflow-tooltip /> |
| | | <el-table-column label="产品名称" prop="productName" show-overflow-tooltip /> |
| | | <el-table-column label="规格型号" prop="model" show-overflow-tooltip /> |
| | | <el-table-column label="单位" prop="unit" show-overflow-tooltip /> |
| | | <el-table-column label="库存数量" prop="qualitity" show-overflow-tooltip /> |
| | |
| | | import pagination from '@/components/PIMTable/Pagination.vue' |
| | | import { ref, reactive, toRefs, onMounted, getCurrentInstance } from 'vue' |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import { getStockInventoryListPage } from "@/api/inventoryManagement/stockInventory.js"; |
| | | import { getStockInventoryListPage, getProductList } from "@/api/inventoryManagement/stockInventory.js"; |
| | | const NewStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/New.vue")); |
| | | const SubtractStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/Subtract.vue")); |
| | | const ImportStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/Import.vue")); |
| | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | productName: '', |
| | | }, |
| | | selectList:[ |
| | | { |
| | | id:1, |
| | | label:1 |
| | | },{ |
| | | id:2, |
| | | label:2 |
| | | },{ |
| | | id:3, |
| | | label:3 |
| | | } |
| | | ] |
| | | }) |
| | | const { searchForm } = toRefs(data) |
| | | const { searchForm, selectList } = toRefs(data) |
| | | |
| | | // 查询列表 |
| | | /** 搜索按钮操作 */ |
| | |
| | | proxy.$modal.msg("已取消") |
| | | }) |
| | | } |
| | | // 获取产品大类下拉 |
| | | const productCategorySelectList =async ()=>{ |
| | | let res =await getProductList() |
| | | console.log(res) |
| | | if(res?.code === 200 && res?.data) { |
| | | selectList.value = res.data |
| | | } |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getList() |
| | | onMounted(async() => { |
| | | await productCategorySelectList() |
| | | await getList() |
| | | }) |
| | | </script> |
| | | |