| | |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title ml10">产品大类:</span> |
| | | <span class="search_title ml10">产品类型:</span> |
| | | <el-radio-group v-model="productScope" class="qualified-product-scope" @change="onProductScopeChange"> |
| | | <el-radio-button label="成品">成品</el-radio-button> |
| | | <el-radio-button label="其他产品">其他产品</el-radio-button> |
| | | </el-radio-group> |
| | | <!-- <span class="search_title ml10" style="margin-left: 20px">产品大类:</span> |
| | | <el-input v-model="searchForm.productName" |
| | | style="width: 240px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | clearable/> --> |
| | | <span class="search_title ml10" style="margin-left: 20px">规格型号:</span> |
| | | <el-input v-model="searchForm.model" |
| | | style="width: 240px" |
| | |
| | | |
| | | <script setup> |
| | | import pagination from '@/components/PIMTable/Pagination.vue' |
| | | import { ref, reactive, toRefs, onMounted, getCurrentInstance } from 'vue' |
| | | import { ref, reactive, toRefs, onMounted, getCurrentInstance, defineAsyncComponent } from 'vue' |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import { getStockInventoryListPage } from "@/api/inventoryManagement/stockInventory.js"; |
| | | const NewStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/New.vue")); |
| | |
| | | }) |
| | | const { searchForm } = toRefs(data) |
| | | |
| | | // 成品(2) / 其他产品(原材料1、半成品3),与产品类型字典一致;分页接口需支持 productType 或 productTypes |
| | | const productScope = ref('成品') |
| | | |
| | | const getProductScopeParams = () => { |
| | | if (productScope.value === '成品') { |
| | | return { productType: 2 } |
| | | } |
| | | return { productTypes: '1,3' } |
| | | } |
| | | |
| | | const onProductScopeChange = () => { |
| | | page.current = 1 |
| | | getList() |
| | | } |
| | | |
| | | // 查询列表 |
| | | /** 搜索按钮操作 */ |
| | | const handleQuery = () => { |
| | |
| | | } |
| | | const getList = () => { |
| | | tableLoading.value = true |
| | | getStockInventoryListPage({ ...searchForm.value, ...page }).then(res => { |
| | | getStockInventoryListPage({ ...searchForm.value, ...page, ...getProductScopeParams() }).then(res => { |
| | | tableLoading.value = false |
| | | tableData.value = res.data.records |
| | | total.value = res.data.total |
| | |
| | | type: 'warning', |
| | | } |
| | | ).then(() => { |
| | | proxy.download("/stockInventory/exportStockInventory", {}, '合格库存信息.xlsx') |
| | | proxy.download("/stockInventory/exportStockInventory", { ...searchForm.value, ...getProductScopeParams() }, '合格库存信息.xlsx') |
| | | }).catch(() => { |
| | | proxy.$modal.msg("已取消") |
| | | }) |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .qualified-product-scope { |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | :deep(.row-low-stock td) { |
| | | background-color: #fde2e2; |
| | | color: #c45656; |