| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title ml10">产品类型:</span> |
| | | <div class="search_form search_form--wrap"> |
| | | <div class="search-field"> |
| | | <span class="search_title">产品类型:</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/> --> |
| | | <span class="search_title ml10" style="margin-left: 20px">规格型号:</span> |
| | | <el-input v-model="searchForm.model" |
| | | style="width: 240px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <span class="search_title ml10" style="margin-left: 20px">UID码:</span> |
| | | <el-input v-model="searchForm.uidNo" |
| | | style="width: 200px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <span class="search_title ml10" style="margin-left: 20px">批次号:</span> |
| | | <el-input v-model="searchForm.batchNo" |
| | | style="width: 200px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px">搜索</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button type="primary" @click="isShowNewModal = true">新增库存</el-button> |
| | | <div class="search-field"> |
| | | <span class="search_title">产品名称:</span> |
| | | <el-input |
| | | v-model="searchForm.productName" |
| | | class="search-input" |
| | | placeholder="请输入" |
| | | clearable |
| | | /> |
| | | </div> |
| | | <div class="search-field"> |
| | | <span class="search_title">规格型号:</span> |
| | | <el-input |
| | | v-model="searchForm.model" |
| | | class="search-input" |
| | | placeholder="请输入" |
| | | clearable |
| | | /> |
| | | </div> |
| | | <div class="search-field"> |
| | | <span class="search_title">UID码:</span> |
| | | <el-input |
| | | v-model="searchForm.uidNo" |
| | | class="search-input" |
| | | placeholder="请输入" |
| | | clearable |
| | | /> |
| | | </div> |
| | | <div class="search-field"> |
| | | <span class="search_title">批次号:</span> |
| | | <el-input |
| | | v-model="searchForm.batchNo" |
| | | class="search-input" |
| | | placeholder="请输入" |
| | | clearable |
| | | /> |
| | | </div> |
| | | <div class="search-field search-field--actions"> |
| | | <el-button type="primary" @click="handleQuery">搜索</el-button> |
| | | <el-button type="primary" @click="isShowNewModal = true">新增库存</el-button> |
| | | <el-button type="info" plain icon="Upload" @click="isShowImportModal = true"> |
| | | 导入库存 |
| | | </el-button> |
| | |
| | | <div class="table_list"> |
| | | <el-table :data="tableData" border v-loading="tableLoading" @selection-change="handleSelectionChange" |
| | | :expand-row-keys="expandedRowKeys" :row-key="row => row.id" style="width: 100%" |
| | | :row-class-name="tableRowClassName" height="calc(100vh - 18.5em)"> |
| | | :row-class-name="tableRowClassName" height="calc(100vh - 26.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 /> |
| | |
| | | const productScope = ref('成品') |
| | | |
| | | const getProductScopeParams = () => { |
| | | if (productScope.value === '成品') { |
| | | return { productType: 2 } |
| | | } |
| | | return { productTypes: '1,3' } |
| | | return { productScope: productScope.value } |
| | | } |
| | | |
| | | const onProductScopeChange = () => { |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .search_form--wrap { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | align-items: center; |
| | | gap: 12px 16px; |
| | | } |
| | | |
| | | .search-field { |
| | | display: inline-flex; |
| | | align-items: center; |
| | | flex: 0 1 auto; |
| | | min-width: 0; |
| | | gap: 8px; |
| | | |
| | | .search_title { |
| | | flex-shrink: 0; |
| | | white-space: nowrap; |
| | | text-align: right; |
| | | min-width: 4.5em; |
| | | } |
| | | |
| | | .search-input { |
| | | width: 200px; |
| | | } |
| | | |
| | | .qualified-product-scope { |
| | | flex-shrink: 0; |
| | | } |
| | | } |
| | | |
| | | .search-field--actions { |
| | | flex-wrap: wrap; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .qualified-product-scope { |
| | | vertical-align: middle; |
| | | } |