refactor(物料管理): 优化表格列显示和表单样式
- 将工单号字段从workOrderNo改为workorder以保持一致性 - 为库存量、出入库数量添加加粗样式提高可读性 - 优化出入库记录查询功能,增加"全部"选项 - 重构出入库类型切换处理逻辑
This commit is contained in:
@@ -91,7 +91,11 @@
|
||||
<el-table-column prop="materialCode" label="物料编码" align="center" v-if="columns.showColumn('materialCode')" />
|
||||
<el-table-column prop="materialName" label="物料名称" align="center" v-if="columns.showColumn('materialName')" />
|
||||
<el-table-column prop="batchNo" label="批次号" align="center" v-if="columns.showColumn('batchNo')" />
|
||||
<el-table-column prop="currentQty" label="当前库存量" align="center" v-if="columns.showColumn('currentQty')" />
|
||||
<el-table-column prop="currentQty" label="当前库存量" align="center" v-if="columns.showColumn('currentQty')">
|
||||
<template #default="scope">
|
||||
<span style="font-weight: bold">{{ scope.row.currentQty }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="warehouseCode" label="仓库编码" align="center" v-if="columns.showColumn('warehouseCode')" />
|
||||
<el-table-column prop="warehouseName" label="仓库名称" align="center" v-if="columns.showColumn('warehouseName')" />
|
||||
<el-table-column prop="locationCode" label="库位编码" align="center" v-if="columns.showColumn('locationCode')" />
|
||||
@@ -205,7 +209,7 @@
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="入库数量" prop="quantity">
|
||||
<el-input v-model="form.quantity" placeholder="请输入入库数量" :disabled="opertype == 3" />
|
||||
<el-input v-model="form.quantity" placeholder="请输入入库数量" :disabled="opertype == 3" style="font-weight: bold" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -318,7 +322,7 @@
|
||||
|
||||
<el-col :lg="12" v-if="opertype == 1">
|
||||
<el-form-item label="出库数量" prop="quantity">
|
||||
<el-input v-model="form.quantity" placeholder="请输入出库数量" :disabled="opertype == 2" />
|
||||
<el-input v-model="form.quantity" placeholder="请输入出库数量" :disabled="opertype == 2" style="font-weight: bold" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="12" v-if="opertype == 2">
|
||||
@@ -356,10 +360,16 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="制造工单号" prop="workorder">
|
||||
<el-input v-model="form.workorder" placeholder="请输入制造工单号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :lg="12">
|
||||
<el-form-item label="制造工单号" prop="orderNo">
|
||||
<el-input v-model="form.orderNo" placeholder="请输入制造工单号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="操作员" prop="operator">
|
||||
@@ -537,32 +547,29 @@
|
||||
<el-dialog :title="title" v-model="openRecord" width="80%">
|
||||
<el-form :model="queryParamsRecord" label-position="right" inline ref="queryRecordRef" @submit.prevent>
|
||||
<el-form-item label="出入库" prop="searchType">
|
||||
<el-select
|
||||
@change="getTypeOfWarehousingList(queryParamsRecord.recordFlag)"
|
||||
v-model="queryParamsRecord.recordFlag"
|
||||
filterable
|
||||
placeholder="请选择出入库">
|
||||
<el-select @change="handleRecordFlagChange" v-model="queryParamsRecord.recordFlag" filterable placeholder="请选择出入库">
|
||||
<el-option label="入库" value="入库"> </el-option>
|
||||
<el-option label="出库" value="出库"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出入库类别" prop="transactionType">
|
||||
<el-select v-model="queryParamsRecord.transactionType" filterable placeholder="请选择出入库类别">
|
||||
<el-option label="全部" value=""> </el-option>
|
||||
<el-option v-for="item in transactionOptions" :key="item.id" :label="item.typeCode" :value="item.typeName"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建日期" prop="createdTime">
|
||||
<el-date-picker
|
||||
v-model="queryParamsRecord.createdTime"
|
||||
type="datetimerange"
|
||||
:shortcuts="dateOptions"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
placeholder="请选择添加时间"
|
||||
align="right">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-date-picker
|
||||
v-model="queryParamsRecord.createdTime"
|
||||
type="datetimerange"
|
||||
:shortcuts="dateOptions"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
placeholder="请选择添加时间"
|
||||
align="right">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="queryRecord">{{ $t('btn.search') }}</el-button>
|
||||
<el-button icon="refresh" @click="resetQueryRecord">{{ $t('btn.reset') }}</el-button>
|
||||
@@ -587,12 +594,16 @@
|
||||
<el-table-column prop="warehouseName" label="仓库名称" align="center" v-if="columns.showColumn('warehouseName')" />
|
||||
<el-table-column prop="locationCode" label="库位编码" align="center" v-if="columns.showColumn('locationCode')" />
|
||||
<el-table-column prop="locationName" label="库位名称" align="center" v-if="columns.showColumn('locationName')" />
|
||||
<el-table-column prop="quantity" label="出库数量" align="center" v-if="columns.showColumn('quantity')" />
|
||||
<el-table-column prop="quantity" label="出库数量" align="center" v-if="columns.showColumn('quantity')">
|
||||
<template #default="scope">
|
||||
<span style="font-weight: bold">{{ scope.row.quantity }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="transactionType" label="出库类型" align="center" v-if="columns.showColumn('transactionType')" />
|
||||
<el-table-column prop="unit" label="计量单位" align="center" v-if="columns.showColumn('unit')" />
|
||||
<el-table-column prop="batchNo" label="批次号" align="center" v-if="columns.showColumn('batchNo')" />
|
||||
<el-table-column prop="orderNo" label="关联订单号" align="center" v-if="columns.showColumn('orderNo')" />
|
||||
<el-table-column prop="workOrderNo" label="工单号" align="center" v-if="columns.showColumn('workOrderNo')" />
|
||||
<!-- <el-table-column prop="orderNo" label="关联订单号" align="center" v-if="columns.showColumn('orderNo')" /> -->
|
||||
<el-table-column prop="workorder" label="工单号" align="center" v-if="columns.showColumn('workorder')" />
|
||||
<el-table-column prop="operator" label="操作员" align="center" v-if="columns.showColumn('operator')" />
|
||||
<el-table-column prop="remarks" label="备注" align="center" v-if="columns.showColumn('remarks')" />
|
||||
</el-table>
|
||||
@@ -616,7 +627,11 @@
|
||||
<el-table-column prop="supplierName" label="供应商名称" align="center" v-if="columns.showColumn('supplierName')" />
|
||||
<el-table-column prop="locationCode" label="库位编码" align="center" v-if="columns.showColumn('locationCode')" />
|
||||
<el-table-column prop="locationName" label="库位名称" align="center" v-if="columns.showColumn('locationName')" />
|
||||
<el-table-column prop="quantity" label="入库数量" align="center" v-if="columns.showColumn('quantity')" />
|
||||
<el-table-column prop="quantity" label="入库数量" align="center" v-if="columns.showColumn('quantity')">
|
||||
<template #default="scope">
|
||||
<span style="font-weight: bold">{{ scope.row.quantity }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="transactionType" label="入库类型" align="center" v-if="columns.showColumn('transactionType')" />
|
||||
<el-table-column prop="warehouseCode" label="仓库编码" align="center" v-if="columns.showColumn('warehouseCode')" />
|
||||
<el-table-column prop="batchNo" label="批次号" align="center" v-if="columns.showColumn('batchNo')" />
|
||||
@@ -894,6 +909,15 @@ function queryRecord() {
|
||||
})
|
||||
}
|
||||
|
||||
function handleRecordFlagChange(value) {
|
||||
// 同步更新inoroutFlag
|
||||
inoroutFlag.value = value
|
||||
// 更新出入库类型列表
|
||||
getTypeOfWarehousingList(value)
|
||||
// 重新查询记录
|
||||
queryRecord()
|
||||
}
|
||||
|
||||
// 重置查询操作
|
||||
function resetQueryRecord() {
|
||||
proxy.resetForm('queryRecordRef')
|
||||
@@ -973,6 +997,9 @@ function getMaterialCodeList() {
|
||||
// 获取出入库类型列表
|
||||
function getTypeOfWarehousingList(data) {
|
||||
try {
|
||||
// 当出入库切换时,重置出入库类别为"全部"
|
||||
queryParamsRecord.transactionType = ''
|
||||
|
||||
listMmTransactionType({ transactionDirection: data, status: '启用' }).then((res) => {
|
||||
const { code, data } = res
|
||||
if (code == 200) {
|
||||
|
||||
@@ -89,8 +89,8 @@
|
||||
<el-table-column prop="transactionType" label="出库类型" align="center" v-if="columns.showColumn('transactionType')" />
|
||||
<el-table-column prop="unit" label="计量单位" align="center" v-if="columns.showColumn('unit')" />
|
||||
<el-table-column prop="batchNo" label="批次号" align="center" v-if="columns.showColumn('batchNo')" />
|
||||
<el-table-column prop="orderNo" label="关联订单号" align="center" v-if="columns.showColumn('orderNo')" />
|
||||
<el-table-column prop="workOrderNo" label="工单号" align="center" v-if="columns.showColumn('workOrderNo')" />
|
||||
<el-table-column prop="workorder" label="工单号" align="center" v-if="columns.showColumn('workorder')" />
|
||||
<el-table-column prop="orderNo" label="订单号" align="center" v-if="columns.showColumn('orderNo')" />
|
||||
<el-table-column prop="operator" label="操作员" align="center" v-if="columns.showColumn('operator')" />
|
||||
<el-table-column prop="remarks" label="备注" align="center" v-if="columns.showColumn('remarks')" />
|
||||
<!-- <el-table-column label="操作" width="160">
|
||||
|
||||
Reference in New Issue
Block a user