| | |
| | | clearable /> |
| | | <el-button type="primary" |
| | | @click="handleQuery" |
| | | style="margin-left: 10px">搜索</el-button> |
| | | style="margin-left: 10px">搜索 |
| | | </el-button> |
| | | </div> |
| | | <div> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | <el-button type="danger" |
| | | plain |
| | | @click="handleDelete">删除</el-button> |
| | | @click="handleDelete">删除 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | |
| | | clearable /> |
| | | <el-button type="primary" |
| | | @click="handleQuery" |
| | | style="margin-left: 10px">搜索</el-button> |
| | | style="margin-left: 10px">搜索 |
| | | </el-button> |
| | | </div> |
| | | <div> |
| | | <el-button type="primary" |
| | | @click="openForm('add', 'purchase')">新增入库</el-button> |
| | | @click="openForm('add', 'purchase')">新增入库 |
| | | </el-button> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | <el-button type="danger" |
| | | plain |
| | | @click="handleDelete">删除</el-button> |
| | | @click="handleDelete">删除 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | |
| | | :disabled="scope.row.type == 1" |
| | | type="primary" |
| | | size="small" |
| | | @click="openForm('edit', scope.row, 'purchase');">编辑</el-button> |
| | | @click="openForm('edit', scope.row, 'purchase');">编辑 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination v-show="total > 0" |
| | | :total="total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :page="page.current" |
| | | :limit="page.size" |
| | | @pagination="paginationChange"/> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="生产入库" |
| | | name="product"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title ml10">入库日期:</span> |
| | | <el-date-picker v-model="searchForm.timeStr" |
| | | type="date" |
| | | placeholder="请选择日期" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | clearable |
| | | @change="handleQuery"/> |
| | | <span class="search_title ml10">产品大类:</span> |
| | | <el-input v-model="searchForm.productCategory" |
| | | style="width: 240px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <el-button type="primary" |
| | | @click="handleQuery" |
| | | style="margin-left: 10px">搜索 |
| | | </el-button> |
| | | </div> |
| | | <div> |
| | | <el-button type="primary" |
| | | @click="openForm('add', 'purchase')">新增入库 |
| | | </el-button> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | <el-button type="danger" |
| | | plain |
| | | @click="handleDelete">删除 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | | <el-table :data="tableData" |
| | | border |
| | | v-loading="tableLoading" |
| | | @selection-change="handleSelectionChange" |
| | | :expand-row-keys="expandedRowKeys" |
| | | :row-key="row => row.id" |
| | | show-summary |
| | | style="width: 100%" |
| | | :summary-method="summarizeMainTable" |
| | | 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="createTime" |
| | | width="100" |
| | | show-overflow-tooltip/> |
| | | <el-table-column label="产品大类" |
| | | prop="productCategory" |
| | | show-overflow-tooltip/> |
| | | <el-table-column label="规格型号" |
| | | prop="specificationModel" |
| | | show-overflow-tooltip/> |
| | | <el-table-column label="单位" |
| | | prop="unit" |
| | | width="220" |
| | | show-overflow-tooltip/> |
| | | <el-table-column label="入库数量" |
| | | prop="inboundNum" |
| | | width="220" |
| | | show-overflow-tooltip/> |
| | | <el-table-column label="入库人" |
| | | prop="createBy" |
| | | width="220" |
| | | show-overflow-tooltip/> |
| | | </el-table> |
| | | <pagination v-show="total > 0" |
| | | :total="total" |
| | |
| | | import { |
| | | getStockInPage, |
| | | getStockInPageByProduction, |
| | | getStockInPageByProductProduction, |
| | | delStockIn, |
| | | } from "@/api/inventoryManagement/stockIn.js"; |
| | | import FormDia from "./components/formDia.vue"; |
| | |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | const pageProductChange = obj => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | const params = { ...page }; |
| | |
| | | params.timeStr = searchForm.value.timeStr; |
| | | } |
| | | params.productCategory = searchForm.value.productCategory; |
| | | if (activeTab.value === "production") { |
| | | getStockInPageByProductProduction(params) |
| | | .then(res => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.data.records; |
| | | }); |
| | | |
| | | }else { |
| | | // 根据不同的 tab 类型调用不同的接口 |
| | | const apiCall = |
| | | activeTab.value === "production" |
| | |
| | | .catch(() => { |
| | | tableLoading.value = false; |
| | | }); |
| | | } |
| | | |
| | | }; |
| | | |
| | | // 切换 tab |