| | |
| | | <template> |
| | | <el-dialog v-model="visible" |
| | | title="选择产品" |
| | | width="900px" |
| | | width="1000px" |
| | | destroy-on-close |
| | | :close-on-click-modal="false"> |
| | | <el-form :inline="true" |
| | | :model="query" |
| | | class="mb-2"> |
| | | class="mb-2 search-form"> |
| | | <el-form-item label="产品名称"> |
| | | <el-input v-model="query.materialName" |
| | | size="small" |
| | | placeholder="输入产品名称" |
| | | clearable |
| | | @keyup.enter="onSearch" /> |
| | | </el-form-item> |
| | | <el-form-item label="规格"> |
| | | <el-input v-model="query.specification" |
| | | size="small" |
| | | placeholder="输入规格" |
| | | clearable |
| | | @keyup.enter="onSearch" /> |
| | | </el-form-item> |
| | | <el-form-item label="物料编码"> |
| | | <el-input v-model="query.materialCode" |
| | | size="small" |
| | | placeholder="输入物料编码" |
| | | clearable |
| | | @keyup.enter="onSearch" /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-form-item style="200px"> |
| | | <el-button type="primary" |
| | | size="small" |
| | | @click="onSearch">搜索</el-button> |
| | | <el-button @click="onReset">重置</el-button> |
| | | <el-button size="small" |
| | | @click="onReset">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- 列表 --> |
| | |
| | | const query = reactive({ |
| | | specification: "", |
| | | materialCode: "", |
| | | materialName: "", |
| | | }); |
| | | |
| | | const page = reactive({ |
| | |
| | | function onReset() { |
| | | query.specification = ""; |
| | | query.materialCode = ""; |
| | | query.materialName = ""; |
| | | page.pageNum = 1; |
| | | loadData(); |
| | | } |
| | |
| | | const res: any = await modelListPage({ |
| | | specification: query.specification.trim(), |
| | | materialCode: query.materialCode.trim(), |
| | | materialName: query.materialName.trim(), |
| | | type: 1, |
| | | current: page.pageNum, |
| | | size: page.pageSize, |
| | | }); |
| | |
| | | loadData(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search-form { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 10px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .search-form .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .search-form .el-input { |
| | | width: 180px; |
| | | } |
| | | .el-form--inline .el-form-item { |
| | | margin-right: 5px; |
| | | } |
| | | .justify-end { |
| | | margin-top: 10px; |
| | | } |
| | | </style> |