feat(物料管理): 添加查询条件并优化状态显示
- 为出库记录、入库记录、库位管理和交易类型页面添加查询条件 - 统一将状态标签从"(0/1)"或"(停用/启用)"简化为"状态" - 为交易类型页面添加类别名称和操作方向的下拉选择 - 默认设置库位和交易类型的状态为"启用"
This commit is contained in:
@@ -6,6 +6,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="queryParams" label-position="right" inline ref="queryRef" v-show="showSearch" @submit.prevent>
|
||||
<el-form-item label="库位编码" prop="locationCode">
|
||||
<el-input v-model="queryParams.locationCode" placeholder="请输入库位编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库编码" prop="warehouseCode">
|
||||
<el-input v-model="queryParams.warehouseCode" placeholder="请输入仓库编码" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="handleQuery">{{ $t('btn.search') }}</el-button>
|
||||
<el-button icon="refresh" @click="resetQuery">{{ $t('btn.reset') }}</el-button>
|
||||
@@ -38,7 +44,7 @@
|
||||
<el-table-column prop="areaName" label="区域名称" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('areaName')" />
|
||||
<el-table-column prop="capacity" label="容量" align="center" v-if="columns.showColumn('capacity')" />
|
||||
<el-table-column prop="unit" label="容量单位" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('unit')" />
|
||||
<el-table-column prop="locationType" label="库位类型(半成品/成品/临时/返工/报废)" align="center" v-if="columns.showColumn('locationType')">
|
||||
<el-table-column prop="locationType" label="库位类型" align="center" v-if="columns.showColumn('locationType')">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="options.locationTypeOptions" :value="scope.row.locationType" />
|
||||
</template>
|
||||
@@ -130,7 +136,7 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="库位类型(半成品/成品/临时/返工/报废)" prop="locationType">
|
||||
<el-form-item label="库位类型" prop="locationType">
|
||||
<el-select v-model="form.locationType" placeholder="请选择库位类型(半成品/成品/临时/返工/报废)">
|
||||
<el-option
|
||||
v-for="item in options.locationTypeOptions"
|
||||
@@ -142,7 +148,7 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="状态(停用/启用)" prop="status">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio v-for="item in options.statusOptions" :key="item.dictValue" :value="item.dictValue">
|
||||
{{ item.dictLabel }}
|
||||
@@ -190,7 +196,9 @@ const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sort: '',
|
||||
sortType: 'asc'
|
||||
sortType: 'asc',
|
||||
locationCode: '',
|
||||
warehouseCode: ''
|
||||
})
|
||||
const columns = ref([
|
||||
{ visible: true, align: 'center', type: '', prop: 'id', label: '主键ID' },
|
||||
@@ -262,7 +270,9 @@ const open = ref(false)
|
||||
const state = reactive({
|
||||
single: true,
|
||||
multiple: true,
|
||||
form: {},
|
||||
form: {
|
||||
status: '启用'
|
||||
},
|
||||
rules: {
|
||||
locationCode: [{ required: true, message: '库位编码不能为空', trigger: 'blur' }],
|
||||
locationName: [{ required: true, message: '库位名称不能为空', trigger: 'blur' }],
|
||||
@@ -270,7 +280,18 @@ const state = reactive({
|
||||
},
|
||||
options: {
|
||||
// 库位类型(半成品/成品/临时/返工/报废) 选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
|
||||
locationTypeOptions: []
|
||||
locationTypeOptions: [],
|
||||
// 状态 选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
|
||||
statusOptions: [
|
||||
{
|
||||
dictValue: '停用',
|
||||
dictLabel: '停用'
|
||||
},
|
||||
{
|
||||
dictValue: '启用',
|
||||
dictLabel: '启用'
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
@@ -295,7 +316,7 @@ function reset() {
|
||||
capacity: null,
|
||||
unit: null,
|
||||
locationType: null,
|
||||
status: null,
|
||||
status: '启用',
|
||||
createdTime: null,
|
||||
updatedTime: null,
|
||||
description: null
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<!-- <el-table-column prop="parentCode" label="父级分类编码" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('parentCode')" /> -->
|
||||
<!-- <el-table-column prop="levelNo" label="层级" align="center" v-if="columns.showColumn('levelNo')" /> -->
|
||||
<el-table-column prop="description" label="描述" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('description')" />
|
||||
<el-table-column prop="status" label="状态(0/1)" align="center" v-if="columns.showColumn('status')">
|
||||
<el-table-column prop="status" label="状态" align="center" v-if="columns.showColumn('status')">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="options.statusOptions" :value="scope.row.status" />
|
||||
</template>
|
||||
@@ -108,7 +108,7 @@
|
||||
</el-col> -->
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="状态(0/1)" prop="status">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio v-for="item in options.statusOptions" :key="item.dictValue" :value="item.dictLabel">
|
||||
{{ item.dictLabel }}
|
||||
@@ -173,7 +173,7 @@ const columns = ref([
|
||||
{ visible: true, align: 'center', type: '', prop: 'parentCode', label: '父级分类编码', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'levelNo', label: '层级' },
|
||||
{ visible: true, align: 'center', type: '', prop: 'description', label: '描述', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: 'dict', prop: 'status', label: '状态(0/1)', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: 'dict', prop: 'status', label: '状态', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'createdTime', label: '创建时间', showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'updatedTime', label: '更新时间', showOverflowTooltip: true }
|
||||
//{ visible: false, prop: 'actions', label: '操作', type: 'slot', width: '160' }
|
||||
@@ -239,7 +239,7 @@ const state = reactive({
|
||||
categoryName: [{ required: true, message: '分类名称不能为空', trigger: 'blur' }]
|
||||
},
|
||||
options: {
|
||||
// 状态(0/1) 选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
|
||||
// 状态 选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
|
||||
statusOptions: [
|
||||
{
|
||||
dictValue: '停用',
|
||||
|
||||
@@ -6,6 +6,15 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="queryParams" label-position="right" inline ref="queryRef" v-show="showSearch" @submit.prevent>
|
||||
<el-form-item label="供应商编码" prop="supplierCode">
|
||||
<el-input v-model="queryParams.supplierCode" placeholder="请输入供应商编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作员" prop="operator">
|
||||
<el-input v-model="queryParams.operator" placeholder="请输入操作员" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建日期" prop="createdTime">
|
||||
<el-date-picker v-model="queryParams.createdTime" type="datetime" placeholder="选择日期时间"> </el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="handleQuery">{{ $t('btn.search') }}</el-button>
|
||||
<el-button icon="refresh" @click="resetQuery">{{ $t('btn.reset') }}</el-button>
|
||||
@@ -224,7 +233,10 @@ const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sort: '',
|
||||
sortType: 'asc'
|
||||
sortType: 'asc',
|
||||
supplierCode: null,
|
||||
operator: null,
|
||||
createdTime: null,
|
||||
})
|
||||
const columns = ref([
|
||||
{ visible: true, align: 'center', type: '', prop: 'unit', label: '计量单位', showOverflowTooltip: true },
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="queryParams" label-position="right" inline ref="queryRef" v-show="showSearch" @submit.prevent>
|
||||
<el-form-item label="出库单号" prop="outboundNo">
|
||||
<el-input v-model="queryParams.outboundNo" placeholder="请输入出库单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="materialCode">
|
||||
<el-input v-model="queryParams.materialCode" placeholder="请输入物料编码" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="handleQuery">{{ $t('btn.search') }}</el-button>
|
||||
<el-button icon="refresh" @click="resetQuery">{{ $t('btn.reset') }}</el-button>
|
||||
|
||||
@@ -6,6 +6,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="queryParams" label-position="right" inline ref="queryRef" v-show="showSearch" @submit.prevent>
|
||||
<el-form-item label="类别名称" prop="typeName">
|
||||
<el-select @focus="getTypeOfWarehousingList" v-model="queryParams.typeName" placeholder="请选择">
|
||||
<el-option label="全部" value="" />
|
||||
<el-option v-for="item in transactionTypeOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作方向" prop="transactionDirection">
|
||||
<el-select v-model="queryParams.transactionDirection" placeholder="请选择">
|
||||
<el-option label="出库" value="出库" />
|
||||
<el-option label="入库" value="入库" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="handleQuery">{{ $t('btn.search') }}</el-button>
|
||||
<el-button icon="refresh" @click="resetQuery">{{ $t('btn.reset') }}</el-button>
|
||||
@@ -39,7 +51,7 @@
|
||||
:show-overflow-tooltip="true"
|
||||
v-if="columns.showColumn('transactionDirection')" />
|
||||
<el-table-column prop="description" label="描述" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('description')" />
|
||||
<el-table-column prop="status" label="状态(停用/启用)" align="center" v-if="columns.showColumn('status')">
|
||||
<el-table-column prop="status" label="状态" align="center" v-if="columns.showColumn('status')">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="options.statusOptions" :value="scope.row.status" />
|
||||
</template>
|
||||
@@ -89,8 +101,8 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="操作方向(入库/出库)" prop="transactionDirection">
|
||||
<el-input v-model="form.transactionDirection" placeholder="请输入操作方向(入库/出库)" />
|
||||
<el-form-item label="操作方向" prop="transactionDirection">
|
||||
<el-input v-model="form.transactionDirection" placeholder="请输入操作方向" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -101,7 +113,7 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="状态(停用/启用)" prop="status">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio v-for="item in options.statusOptions" :key="item.dictValue" :value="item.dictValue">
|
||||
{{ item.dictLabel }}
|
||||
@@ -141,6 +153,7 @@ import {
|
||||
updateMmTransactionType,
|
||||
getMmTransactionType
|
||||
} from '@/api/materialManagement/productionMaterial/mmtransactiontype.js'
|
||||
import { getTransactionOption } from '@/api/materialManagement/productionMaterial/mminventory.js'
|
||||
const { proxy } = getCurrentInstance()
|
||||
const ids = ref([])
|
||||
const loading = ref(false)
|
||||
@@ -149,15 +162,17 @@ const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sort: '',
|
||||
sortType: 'asc'
|
||||
sortType: 'asc',
|
||||
typeName: '',
|
||||
transactionDirection: ''
|
||||
})
|
||||
const columns = ref([
|
||||
{ visible: true, align: 'center', type: '', prop: 'id', label: '主键ID' },
|
||||
{ visible: true, align: 'center', type: '', prop: 'typeCode', label: '类别编码', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'typeName', label: '类别名称', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'transactionDirection', label: '操作方向(入库/出库)', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'transactionDirection', label: '操作方向', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'description', label: '描述', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: 'dict', prop: 'status', label: '状态(停用/启用)', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: 'dict', prop: 'status', label: '状态', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'createdTime', label: '创建时间', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'updatedTime', label: '更新时间', showOverflowTooltip: true }
|
||||
//{ visible: false, prop: 'actions', label: '操作', type: 'slot', width: '160' }
|
||||
@@ -215,7 +230,9 @@ const open = ref(false)
|
||||
const state = reactive({
|
||||
single: true,
|
||||
multiple: true,
|
||||
form: {},
|
||||
form: {
|
||||
status: '启用'
|
||||
},
|
||||
rules: {
|
||||
typeCode: [{ required: true, message: '类别编码不能为空', trigger: 'blur' }],
|
||||
typeName: [{ required: true, message: '类别名称不能为空', trigger: 'blur' }],
|
||||
@@ -223,11 +240,21 @@ const state = reactive({
|
||||
},
|
||||
options: {
|
||||
// 状态(停用/启用) 选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
|
||||
statusOptions: []
|
||||
}
|
||||
statusOptions: [
|
||||
{
|
||||
dictValue: '停用',
|
||||
dictLabel: '停用'
|
||||
},
|
||||
{
|
||||
dictValue: '启用',
|
||||
dictLabel: '启用'
|
||||
}
|
||||
]
|
||||
},
|
||||
transactionTypeOptions: []
|
||||
})
|
||||
|
||||
const { form, rules, options, single, multiple } = toRefs(state)
|
||||
const { form, rules, options, transactionTypeOptions, single, multiple } = toRefs(state)
|
||||
|
||||
// 关闭dialog
|
||||
function cancel() {
|
||||
@@ -243,7 +270,7 @@ function reset() {
|
||||
typeName: null,
|
||||
transactionDirection: null,
|
||||
description: null,
|
||||
status: null,
|
||||
status: '启用',
|
||||
createdTime: null,
|
||||
updatedTime: null
|
||||
}
|
||||
@@ -315,5 +342,18 @@ function handleDelete(row) {
|
||||
})
|
||||
}
|
||||
|
||||
// 获取入库类型列表
|
||||
function getTypeOfWarehousingList() {
|
||||
try {
|
||||
getTransactionOption('typeOfWarehousing').then((res) => {
|
||||
const { code, data } = res
|
||||
if (code == 200) {
|
||||
state.transactionTypeOptions = data
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
proxy.$modal.msgError(error.message)
|
||||
}
|
||||
}
|
||||
handleQuery()
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user