feat(wms): 优化库存管理页面展示效果
- 修改物品ID列为物品信息列,根据物品类型显示不同信息 - 添加原材料和产品信息的组件引用 - 优化表格列的显示逻辑- 调整部分UI样式,提高可读性
This commit is contained in:
@@ -29,7 +29,13 @@
|
|||||||
<dict-tag :options="dict.type.stock_item_type" :value="scope.row.itemType" />
|
<dict-tag :options="dict.type.stock_item_type" :value="scope.row.itemType" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="物品ID" align="center" prop="itemId" />
|
<el-table-column label="物品信息" align="center" prop="itemId">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<raw-material-info v-if="scope.row.itemType === ITEM_TYPE.RAW_MATERIAL" :material-id="scope.row.itemId" />
|
||||||
|
<product-info v-else-if="scope.row.itemType === ITEM_TYPE.PRODUCT" :product-id="scope.row.itemId" />
|
||||||
|
<span v-else>{{ scope.row.itemId }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="数量" align="center" prop="quantity" />
|
<el-table-column label="数量" align="center" prop="quantity" />
|
||||||
<el-table-column label="单位" align="center" prop="unit" />
|
<el-table-column label="单位" align="center" prop="unit" />
|
||||||
<!-- <el-table-column label="批次号" align="center" prop="batchNo" /> -->
|
<!-- <el-table-column label="批次号" align="center" prop="batchNo" /> -->
|
||||||
@@ -100,11 +106,11 @@
|
|||||||
<el-table v-loading="loading" :data="manualList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="manualList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="库区/库位" align="center" prop="warehouseName" />
|
<el-table-column label="库区/库位" align="center" prop="warehouseName" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="stockIo.ioType === 'transfer'"
|
v-if="stockIo.ioType === 'transfer'"
|
||||||
label="源库区/库位"
|
label="源库区/库位"
|
||||||
align="center"
|
align="center"
|
||||||
prop="fromWarehouseName"
|
prop="fromWarehouseName"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="物品类型" align="center" prop="itemType">
|
<el-table-column label="物品类型" align="center" prop="itemType">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -147,7 +153,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
@@ -165,7 +171,7 @@
|
|||||||
:loading="statusLoading"
|
:loading="statusLoading"
|
||||||
@click="handleUpdateStatus"
|
@click="handleUpdateStatus"
|
||||||
>{{ getStatusButtonText() }}</el-button>
|
>{{ getStatusButtonText() }}</el-button>
|
||||||
|
|
||||||
<!-- 审核按钮 -->
|
<!-- 审核按钮 -->
|
||||||
<el-button
|
<el-button
|
||||||
v-if="stockIo.status === 1"
|
v-if="stockIo.status === 1"
|
||||||
@@ -173,7 +179,7 @@
|
|||||||
:loading="auditLoading"
|
:loading="auditLoading"
|
||||||
@click="handleAudit"
|
@click="handleAudit"
|
||||||
>{{ getAuditButtonText() }}</el-button>
|
>{{ getAuditButtonText() }}</el-button>
|
||||||
|
|
||||||
<!-- 撤回按钮 -->
|
<!-- 撤回按钮 -->
|
||||||
<el-button
|
<el-button
|
||||||
v-if="stockIo.status === 2 && stockIo.ioType !== 'withdraw'"
|
v-if="stockIo.status === 2 && stockIo.ioType !== 'withdraw'"
|
||||||
@@ -191,9 +197,9 @@
|
|||||||
<el-form-item label="库区/库位" prop="warehouseId">
|
<el-form-item label="库区/库位" prop="warehouseId">
|
||||||
<warehouse-select v-model="form.warehouseId" placeholder="请选择库区/库位" />
|
<warehouse-select v-model="form.warehouseId" placeholder="请选择库区/库位" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="stockIo.ioType === 'transfer'"
|
v-if="stockIo.ioType === 'transfer'"
|
||||||
label="源库区/库位"
|
label="源库区/库位"
|
||||||
prop="fromWarehouseId"
|
prop="fromWarehouseId"
|
||||||
>
|
>
|
||||||
<warehouse-select v-model="form.fromWarehouseId" placeholder="请选择源库区/库位" />
|
<warehouse-select v-model="form.fromWarehouseId" placeholder="请选择源库区/库位" />
|
||||||
@@ -341,7 +347,7 @@ export default {
|
|||||||
this.$modal.msgError('请先添加明细数据');
|
this.$modal.msgError('请先添加明细数据');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 确认审核
|
// 确认审核
|
||||||
this.$modal.confirm('确认要审核此出入库单吗?审核后将影响库存数据。').then(() => {
|
this.$modal.confirm('确认要审核此出入库单吗?审核后将影响库存数据。').then(() => {
|
||||||
this.auditLoading = true;
|
this.auditLoading = true;
|
||||||
@@ -410,7 +416,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$delete(this.rules, 'fromWarehouseId');
|
this.$delete(this.rules, 'fromWarehouseId');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.buttonLoading = true;
|
this.buttonLoading = true;
|
||||||
@@ -505,7 +511,7 @@ export default {
|
|||||||
this.$modal.msgError('请先添加明细数据');
|
this.$modal.msgError('请先添加明细数据');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$modal.confirm('确认要提交此出入库单吗?提交后将无法修改明细。').then(() => {
|
this.$modal.confirm('确认要提交此出入库单吗?提交后将无法修改明细。').then(() => {
|
||||||
this.statusLoading = true;
|
this.statusLoading = true;
|
||||||
updateStockIoStatus(this.stockIo.stockIoId, 1).then(response => {
|
updateStockIoStatus(this.stockIo.stockIoId, 1).then(response => {
|
||||||
|
|||||||
Reference in New Issue
Block a user