Commit f9be7e47 by wangchunyang

仓库库位选择调整,表格宽度调整,ID字样消除,盘点功能样式调整

parent 5e1984ae
...@@ -47,10 +47,10 @@ ...@@ -47,10 +47,10 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="批次ID" prop="batchId"> <el-form-item label="批次" prop="batchId">
<el-input <el-input
v-model="queryParams.batchId" v-model="queryParams.batchId"
placeholder="请输入批次ID" placeholder="请输入批次"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
readonly readonly
@focus="openLocationSelector" @focus="openLocationSelector"
:suffix-icon="''" :suffix-icon="''"
> >
<template v-if="queryLocationName" #suffix> <template v-if="queryLocationName" #suffix>
<i <i
...@@ -149,17 +149,17 @@ ...@@ -149,17 +149,17 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<!-- 仓库选择组件 --> <!-- 仓库选择组件 -->
<WarehouseSelector <WarehouseSelector
v-model="warehouseSelectorVisible" v-model="warehouseSelectorVisible"
@selected="handleWarehouseSelected" @selected="handleWarehouseSelected"
/> />
<!-- 库位选择组件 --> <!-- 库位选择组件 -->
<LocationSelector <LocationSelector
v-model="locationSelectorVisible" v-model="locationSelectorVisible"
@selected="handleLocationSelected" @selected="handleLocationSelected"
/> />
</div> </div>
...@@ -286,8 +286,8 @@ export default { ...@@ -286,8 +286,8 @@ export default {
this.queryParams.warehouseId = warehouse.warehouseId this.queryParams.warehouseId = warehouse.warehouseId
this.queryWarehouseName = warehouse.warehousesName || warehouse.warehousesCode this.queryWarehouseName = warehouse.warehousesName || warehouse.warehousesCode
// 仓库选择后,清空库位信息 // 仓库选择后,清空库位信息
this.queryLocationName = null // this.queryLocationName = null
this.queryParams.locationId = null // this.queryParams.locationId = null
this.handleQuery() this.handleQuery()
}, },
...@@ -296,8 +296,8 @@ export default { ...@@ -296,8 +296,8 @@ export default {
this.queryWarehouseName = null this.queryWarehouseName = null
this.queryParams.warehouseId = null this.queryParams.warehouseId = null
// 清空仓库时,同时清空库位 // 清空仓库时,同时清空库位
this.queryLocationName = null // this.queryLocationName = null
this.queryParams.locationId = null // this.queryParams.locationId = null
this.handleQuery() this.handleQuery()
}, },
...@@ -347,4 +347,4 @@ export default { ...@@ -347,4 +347,4 @@ export default {
.table-container { .table-container {
margin-top: 16px; margin-top: 16px;
} }
</style> </style>
\ No newline at end of file
...@@ -752,7 +752,7 @@ export default { ...@@ -752,7 +752,7 @@ export default {
const errors = [] const errors = []
this.displayData.forEach((item, index) => { this.displayData.forEach((item, index) => {
if (!item.materialId) { if (!item.materialId) {
errors.push(`第${index + 1}行:货物ID不能为空`) errors.push(`第${index + 1}行:货物不能为空`)
} }
if (parseFloat(item.actualQuantity) <= 0) { if (parseFloat(item.actualQuantity) <= 0) {
errors.push(`第${index + 1}实际数量必须大于0`) errors.push(`第${index + 1}实际数量必须大于0`)
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<el-form-item label="物料" prop="materialId"> <el-form-item label="物料" prop="materialId">
<el-input <el-input
v-model="queryParams.materialId" v-model="queryParams.materialId"
placeholder="请输入物料ID或编码" placeholder="请输入物料或编码"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
...@@ -81,11 +81,9 @@ ...@@ -81,11 +81,9 @@
<el-form-item label="库位" prop="locationId"> <el-form-item label="库位" prop="locationId">
<el-input <el-input
v-model="queryLocationName" v-model="queryLocationName"
placeholder="请选择库位"
readonly readonly
@focus="openLocationSelector" @focus="openLocationSelector"
:suffix-icon="''" :suffix-icon="''"
:disabled="!queryParams.warehouseId"
> >
<template v-if="queryLocationName" #suffix> <template v-if="queryLocationName" #suffix>
<i <i
...@@ -411,23 +409,23 @@ export default { ...@@ -411,23 +409,23 @@ export default {
if (!warehouse) return if (!warehouse) return
this.queryParams.warehouseId = warehouse.warehouseId this.queryParams.warehouseId = warehouse.warehouseId
this.queryWarehouseName = warehouse.warehousesName || warehouse.warehousesCode this.queryWarehouseName = warehouse.warehousesName || warehouse.warehousesCode
this.queryLocationName = null // this.queryLocationName = null
this.queryParams.locationId = null // this.queryParams.locationId = null
this.handleQuery() this.handleQuery()
}, },
clearQueryWarehouse() { clearQueryWarehouse() {
this.queryWarehouseName = null this.queryWarehouseName = null
this.queryParams.warehouseId = null this.queryParams.warehouseId = null
this.queryParams.warehousesCode = null this.queryParams.warehousesCode = null
this.queryLocationName = null // this.queryLocationName = null
this.queryParams.locationId = null // this.queryParams.locationId = null
this.handleQuery() this.handleQuery()
}, },
openLocationSelector() { openLocationSelector() {
if (!this.queryParams.warehouseId) { // if (!this.queryParams.warehouseId) {
this.$message.warning("请先选择仓库") // this.$message.warning("请先选择仓库")
return // return
} // }
this.locationSelectorVisible = true this.locationSelectorVisible = true
}, },
handleLocationSelected(location) { handleLocationSelected(location) {
...@@ -568,4 +566,4 @@ export default { ...@@ -568,4 +566,4 @@ export default {
.w20 { .w20 {
width: 150px; width: 150px;
} }
</style> </style>
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<el-form ref="detailForm" :model="form" label-width="100px" :rules="rules"> <el-form ref="detailForm" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="货物ID" prop="materialId"> <el-form-item label="货物" prop="materialId">
<el-input <el-input
v-model="form.materialName" v-model="form.materialName"
placeholder="请选择物料" placeholder="请选择物料"
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
:multiple="false" :multiple="false"
/> />
</div> </div>
</el-dialog> </el-dialog>
<!-- 库存信息列表 --> <!-- 库存信息列表 -->
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
:row-key="item => item.inventoryId" :row-key="item => item.inventoryId"
> >
<el-table-column prop="materialName" label="物料名称" width="180" /> <el-table-column prop="materialName" label="物料名称" width="180" />
<el-table-column prop="batchId" label="批次ID" width="150" /> <el-table-column prop="batchId" label="批次" width="150" />
<el-table-column prop="warehousesName" label="仓库名称" width="120" /> <el-table-column prop="warehousesName" label="仓库名称" width="120" />
<el-table-column prop="locationName" label="库位名称" width="120" /> <el-table-column prop="locationName" label="库位名称" width="120" />
<el-table-column <el-table-column
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" style="margin-top: 10px;"> <el-row :gutter="20" style="margin-top: 10px;">
<el-col :span="16"> <el-col :span="16">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
...@@ -221,10 +221,10 @@ ...@@ -221,10 +221,10 @@
:row-key="item => item.inventoryId" :row-key="item => item.inventoryId"
> >
<el-table-column prop="materialName" label="物料名称" width="180" /> <el-table-column prop="materialName" label="物料名称" width="180" />
<el-table-column prop="batchId" label="批次ID" width="150" /> <el-table-column prop="batchId" label="批次" width="150" />
<el-table-column prop="warehousesName" label="仓库名称" width="120" /> <el-table-column prop="warehousesName" label="仓库名称" width="120" />
<el-table-column prop="locationName" label="库位名称" width="120" /> <el-table-column prop="locationName" label="库位名称" width="120" />
<el-table-column prop="plannedQuantity" label="计划数量" width="100" /> <el-table-column prop="plannedQuantity" label="计划数量" width="100" />
<el-table-column prop="actualQuantity" label="实际数量" width="100" fixed="right"/> <el-table-column prop="actualQuantity" label="实际数量" width="100" fixed="right"/>
<el-table-column prop="unitPrice" label="单价" width="100" /> <el-table-column prop="unitPrice" label="单价" width="100" />
...@@ -534,18 +534,18 @@ export default { ...@@ -534,18 +534,18 @@ export default {
this.initDetails.forEach(detail => { this.initDetails.forEach(detail => {
let targetRow = null; let targetRow = null;
targetRow = this.inventoryList.find(row => row.inventoryId === detail.inventoryId); targetRow = this.inventoryList.find(row => row.inventoryId === detail.inventoryId);
if (!targetRow) { if (!targetRow) {
targetRow = this.inventoryList.find(row => targetRow = this.inventoryList.find(row =>
row.batchId === detail.batchId && row.batchId === detail.batchId &&
row.warehousesId === detail.warehousesId && row.warehousesId === detail.warehousesId &&
row.locationId === detail.locationId row.locationId === detail.locationId
); );
} }
if (!targetRow) { if (!targetRow) {
targetRow = this.inventoryList.find(row => targetRow = this.inventoryList.find(row =>
row.batchId === detail.batchId && row.batchId === detail.batchId &&
row.materialId === detail.materialId row.materialId === detail.materialId
); );
} }
...@@ -691,7 +691,7 @@ syncDetails(strict = true) { ...@@ -691,7 +691,7 @@ syncDetails(strict = true) {
handleSubmit() { handleSubmit() {
// 1. 校验物料ID // 1. 校验物料ID
if (!this.form.materialId?.trim()) { if (!this.form.materialId?.trim()) {
this.$message.error('请先选择物料ID'); this.$message.error('请先选择物料');
return; return;
} }
...@@ -732,9 +732,9 @@ handleSubmit() { ...@@ -732,9 +732,9 @@ handleSubmit() {
outboundOrderId: this.form.outboundOrderId || detail.outboundOrderId, outboundOrderId: this.form.outboundOrderId || detail.outboundOrderId,
materialId: this.form.materialId || detail.materialId materialId: this.form.materialId || detail.materialId
})); }));
console.log('提交的明细数据:', submitDetails); console.log('提交的明细数据:', submitDetails);
this.$emit('submit', submitDetails); this.$emit('submit', submitDetails);
this.$emit('update:open', false); this.$emit('update:open', false);
}); });
...@@ -757,7 +757,7 @@ handleSubmit() { ...@@ -757,7 +757,7 @@ handleSubmit() {
} }
this.syncDetails(this.initDetails.length === 0); this.syncDetails(this.initDetails.length === 0);
}, },
handleClose() { handleClose() {
this.closeLoading(); this.closeLoading();
this.$nextTick(() => { this.$nextTick(() => {
...@@ -780,9 +780,9 @@ handleSubmit() { ...@@ -780,9 +780,9 @@ handleSubmit() {
console.log("【物料选择事件触发】选中数据:", selectedData); console.log("【物料选择事件触发】选中数据:", selectedData);
// 兼容数组格式(multiple=false时可能返回对象,需转为数组) // 兼容数组格式(multiple=false时可能返回对象,需转为数组)
const selectList = Array.isArray(selectedData) ? selectedData : selectedData ? [selectedData] : []; const selectList = Array.isArray(selectedData) ? selectedData : selectedData ? [selectedData] : [];
if (selectList.length > 0) { if (selectList.length > 0) {
this.selectedMaterialInfo = selectList[0]; this.selectedMaterialInfo = selectList[0];
// 关键:兼容常见的物料ID字段名(id/materialId/uuid) // 关键:兼容常见的物料ID字段名(id/materialId/uuid)
this.selectedMaterialId = this.selectedMaterialInfo.id || this.selectedMaterialInfo.materialId || this.selectedMaterialInfo.uuid || ''; this.selectedMaterialId = this.selectedMaterialInfo.id || this.selectedMaterialInfo.materialId || this.selectedMaterialInfo.uuid || '';
// 兼容常见的物料名称字段名(materialName/name) // 兼容常见的物料名称字段名(materialName/name)
...@@ -892,4 +892,4 @@ handleSubmit() { ...@@ -892,4 +892,4 @@ handleSubmit() {
/deep/ .el-button.is-disabled { /deep/ .el-button.is-disabled {
cursor: not-allowed; cursor: not-allowed;
} }
</style> </style>
\ No newline at end of file
...@@ -51,10 +51,10 @@ ...@@ -51,10 +51,10 @@
<!-- 页面容器 --> <!-- 页面容器 -->
<div class="page-container"> <div class="page-container">
<!-- 搜索区域 --> <!-- 搜索区域 -->
<page-wrapper-search <page-wrapper-search
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
size="small" size="small"
@search="handleQuery" @search="handleQuery"
@reset="resetQuery" @reset="resetQuery"
> >
...@@ -84,9 +84,9 @@ ...@@ -84,9 +84,9 @@
</el-form-item> </el-form-item>
<!-- 新增:订单类型查询项 --> <!-- 新增:订单类型查询项 -->
<el-form-item label="订单类型" prop="orderType"> <el-form-item label="订单类型" prop="orderType">
<el-select <el-select
v-model="queryParams.orderType" v-model="queryParams.orderType"
placeholder="请选择订单类型" placeholder="请选择订单类型"
clearable clearable
style="width: 100%" style="width: 100%"
> >
...@@ -98,10 +98,10 @@ ...@@ -98,10 +98,10 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="批次ID" prop="batchCode"> <el-form-item label="批次" prop="batchCode">
<el-input <el-input
v-model="queryParams.batchCode" v-model="queryParams.batchCode"
placeholder="请输入批次ID" placeholder="请输入批次"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
...@@ -136,9 +136,9 @@ ...@@ -136,9 +136,9 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="订单状态" prop="orderStatus"> <el-form-item label="订单状态" prop="orderStatus">
<el-select <el-select
v-model="queryParams.orderStatus" v-model="queryParams.orderStatus"
placeholder="请选择订单状态" placeholder="请选择订单状态"
clearable clearable
style="width: 100%" style="width: 100%"
> >
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="批次ID" align="center" prop="batchCode" width="120" /> <el-table-column label="批次" align="center" prop="batchCode" width="120" />
<el-table-column label="仓库" align="center" prop="warehouseName" width="120"> <el-table-column label="仓库" align="center" prop="warehouseName" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.warehouseName || '-' }} {{ scope.row.warehouseName || '-' }}
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
v-if="scope.row.orderStatus===1" v-if="scope.row.orderStatus===1"
@click="handleShip(scope.row)" @click="handleShip(scope.row)"
v-hasPermi="['inventory:orders:edit']" v-hasPermi="['inventory:orders:edit']"
:loading="shipLoading[scope.row.id]" :loading="shipLoading[scope.row.id]"
>出货</el-button> >出货</el-button>
<el-button <el-button
size="mini" size="mini"
...@@ -299,10 +299,10 @@ ...@@ -299,10 +299,10 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="出库类型" prop="orderTypeId"> <el-form-item label="出库类型" prop="orderTypeId">
<el-select v-model="form.orderTypeId" placeholder="请选择出库类型" :disabled="isViewDetail || formDisabled.orderTypeId" style="width: 100%"> <el-select v-model="form.orderTypeId" placeholder="请选择出库类型" :disabled="isViewDetail || formDisabled.orderTypeId" style="width: 100%">
<el-option <el-option
v-for="item in dict.type.inbound_outbound_type" v-for="item in dict.type.inbound_outbound_type"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
> >
<span style="margin-left: 8px;">{{ item.label }}</span> <span style="margin-left: 8px;">{{ item.label }}</span>
...@@ -336,8 +336,8 @@ ...@@ -336,8 +336,8 @@
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="批次ID" prop="batchCode"> <el-form-item label="批次" prop="batchCode">
<el-input v-model="form.batchCode" placeholder="请输入批次ID" :disabled="isViewDetail || formDisabled.batchCode" /> <el-input v-model="form.batchCode" placeholder="请输入批次" :disabled="isViewDetail || formDisabled.batchCode" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
...@@ -380,10 +380,10 @@ ...@@ -380,10 +380,10 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="订单类型" prop="orderType"> <el-form-item label="订单类型" prop="orderType">
<el-select v-model="form.orderType" placeholder="请选择订单类型" :disabled="isViewDetail || formDisabled.orderType" style="width: 100%"> <el-select v-model="form.orderType" placeholder="请选择订单类型" :disabled="isViewDetail || formDisabled.orderType" style="width: 100%">
<el-option <el-option
v-for="item in dict.type.order_type" v-for="item in dict.type.order_type"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
> >
<span style="margin-left: 8px;">{{ item.label }}</span> <span style="margin-left: 8px;">{{ item.label }}</span>
...@@ -391,8 +391,8 @@ ...@@ -391,8 +391,8 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
...@@ -457,7 +457,7 @@ ...@@ -457,7 +457,7 @@
<!-- <el-table-column label="仓库编号" prop="warehouseId" width="150" /> --> <!-- <el-table-column label="仓库编号" prop="warehouseId" width="150" /> -->
<el-table-column label="库位编号" prop="locationName" width="150" /> <el-table-column label="库位编号" prop="locationName" width="150" />
<el-table-column label="批次编号" prop="batchCode" width="150" /> <el-table-column label="批次编号" prop="batchCode" width="150" />
<el-table-column label="计划数量" prop="plannedQuantity" width="150"/> <el-table-column label="计划数量" prop="plannedQuantity" width="150"/>
<el-table-column label="实际数量" prop="actualQuantity" width="150" fixed="right"/> <el-table-column label="实际数量" prop="actualQuantity" width="150" fixed="right"/>
<el-table-column label="约数" prop="divisor" width="150"></el-table-column> <el-table-column label="约数" prop="divisor" width="150"></el-table-column>
...@@ -683,7 +683,7 @@ export default { ...@@ -683,7 +683,7 @@ export default {
this.getList() this.getList()
}) })
this.handleShip = this.debounce(this.handleShip, 500) this.handleShip = this.debounce(this.handleShip, 500)
}, },
methods: { methods: {
debounce(fn, delay = 300) { debounce(fn, delay = 300) {
...@@ -718,7 +718,7 @@ export default { ...@@ -718,7 +718,7 @@ export default {
} else { } else {
this.form.warehouseId = warehouse.warehouseId || warehouse.id this.form.warehouseId = warehouse.warehouseId || warehouse.id
this.form.warehouseName = warehouse.warehousesName || warehouse.name this.form.warehouseName = warehouse.warehousesName || warehouse.name
// 更新明细中的默认仓库 // 更新明细中的默认仓库
if (this.currentDetailItem) { if (this.currentDetailItem) {
this.currentDetailItem.warehouseId = warehouse.warehouseId || warehouse.id this.currentDetailItem.warehouseId = warehouse.warehouseId || warehouse.id
...@@ -823,7 +823,7 @@ export default { ...@@ -823,7 +823,7 @@ export default {
try { try {
// 设置当前订单出货loading // 设置当前订单出货loading
this.$set(this.shipLoading, row.id, true) this.$set(this.shipLoading, row.id, true)
// 原有业务逻辑 // 原有业务逻辑
console.log("handleShip", row) console.log("handleShip", row)
await ship({ await ship({
...@@ -980,7 +980,7 @@ export default { ...@@ -980,7 +980,7 @@ export default {
const materialId = this.currentMaterialId || detailList[0]?.materialId; const materialId = this.currentMaterialId || detailList[0]?.materialId;
if (!materialId) { if (!materialId) {
this.$message.warning("物料ID不能为空"); this.$message.warning("物料不能为空");
return; return;
} }
...@@ -1264,7 +1264,7 @@ export default { ...@@ -1264,7 +1264,7 @@ export default {
updateUserCode: null updateUserCode: null
} }
} }
this.queryOwnerName = '' this.queryOwnerName = ''
this.queryWarehouseName = '' this.queryWarehouseName = ''
this.handleQuery() this.handleQuery()
...@@ -1493,15 +1493,15 @@ export default { ...@@ -1493,15 +1493,15 @@ export default {
// 修改点7:构造提交数据,适配新的字段映射规则 // 修改点7:构造提交数据,适配新的字段映射规则
const submitData = { const submitData = {
...this.form, ...this.form,
outboundOrderId: this.form.id, outboundOrderId: this.form.id,
orderId: this.form.orderId, orderId: this.form.orderId,
orderType: this.form.orderType, // 新增:提交订单类型 orderType: this.form.orderType, // 新增:提交订单类型
outboundOrderItemsList: uniqueDetails.map(item => { outboundOrderItemsList: uniqueDetails.map(item => {
const { index, materialUuids, warehouseName, locationName, ...rest } = item const { index, materialUuids, warehouseName, locationName, ...rest } = item
return { return {
...rest, ...rest,
orderId: null, orderId: null,
outboundOrderId: this.form.id || null, outboundOrderId: this.form.id || null,
materialName: item.materialName || '', // 【修改16】提交物料名称 materialName: item.materialName || '', // 【修改16】提交物料名称
inventoryId: rest.inventoryId || '', inventoryId: rest.inventoryId || '',
materialId: rest.materialId || '', materialId: rest.materialId || '',
...@@ -1572,4 +1572,4 @@ export default { ...@@ -1572,4 +1572,4 @@ export default {
} }
} }
} }
</script> </script>
\ No newline at end of file
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
readonly readonly
@focus="openLocationSelector" @focus="openLocationSelector"
:suffix-icon="''" :suffix-icon="''"
:disabled="!queryParams.warehouseId"
> >
<template v-if="queryLocationName" #suffix> <template v-if="queryLocationName" #suffix>
<i <i
...@@ -67,7 +66,7 @@ ...@@ -67,7 +66,7 @@
<el-form-item label="物料" prop="materialId"> <el-form-item label="物料" prop="materialId">
<el-input <el-input
v-model="queryParams.materialId" v-model="queryParams.materialId"
placeholder="请输入物料ID或编码" placeholder="请输入物料或编码"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
...@@ -234,9 +233,9 @@ export default { ...@@ -234,9 +233,9 @@ export default {
this.queryParams.warehouseId = warehouse.warehouseId || warehouse.id this.queryParams.warehouseId = warehouse.warehouseId || warehouse.id
this.queryParams.warehousesCode = warehouse.warehousesCode this.queryParams.warehousesCode = warehouse.warehousesCode
this.queryWarehouseName = warehouse.warehousesName || warehouse.warehousesCode this.queryWarehouseName = warehouse.warehousesName || warehouse.warehousesCode
// 仓库选择后,清空库位信息 // // 仓库选择后,清空库位信息
this.queryLocationName = null // this.queryLocationName = null
this.queryParams.locationId = null // this.queryParams.locationId = null
this.handleQuery() this.handleQuery()
}, },
/** 清空仓库选择 */ /** 清空仓库选择 */
...@@ -245,16 +244,16 @@ export default { ...@@ -245,16 +244,16 @@ export default {
this.queryParams.warehouseId = null this.queryParams.warehouseId = null
this.queryParams.warehousesCode = null this.queryParams.warehousesCode = null
// 清空仓库时,同时清空库位 // 清空仓库时,同时清空库位
this.queryLocationName = null // this.queryLocationName = null
this.queryParams.locationId = null // this.queryParams.locationId = null
this.handleQuery() this.handleQuery()
}, },
/** 打开库位选择器 */ /** 打开库位选择器 */
openLocationSelector() { openLocationSelector() {
if (!this.queryParams.warehouseId) { // if (!this.queryParams.warehouseId) {
this.$message.warning("请先选择仓库") // this.$message.warning("请先选择仓库")
return // return
} // }
this.locationSelectorVisible = true this.locationSelectorVisible = true
}, },
/** 库位选择回调 */ /** 库位选择回调 */
......
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
readonly readonly
@focus="openLocationSelector" @focus="openLocationSelector"
:suffix-icon="''" :suffix-icon="''"
:disabled="!queryParams.warehouseId"
> >
<template v-if="queryLocationName" #suffix> <template v-if="queryLocationName" #suffix>
<i <i
...@@ -419,16 +418,16 @@ export default { ...@@ -419,16 +418,16 @@ export default {
this.queryParams.warehousesCode = warehouse.warehousesCode this.queryParams.warehousesCode = warehouse.warehousesCode
this.queryWarehouseName = warehouse.warehousesName || warehouse.warehousesCode this.queryWarehouseName = warehouse.warehousesName || warehouse.warehousesCode
// 仓库选择后,清空库位信息 // 仓库选择后,清空库位信息
this.queryLocationName = null // this.queryLocationName = null
this.queryParams.locationId = null // this.queryParams.locationId = null
this.handleQuery() this.handleQuery()
}, },
/** 打开库位选择器 */ /** 打开库位选择器 */
openLocationSelector() { openLocationSelector() {
if (!this.queryParams.warehouseId) { // if (!this.queryParams.warehouseId) {
this.$message.warning("请先选择仓库") // this.$message.warning("请先选择仓库")
return // return
} // }
this.locationSelectorVisible = true this.locationSelectorVisible = true
}, },
/** 库位选择回调 */ /** 库位选择回调 */
...@@ -444,8 +443,8 @@ export default { ...@@ -444,8 +443,8 @@ export default {
this.queryParams.warehouseId = null this.queryParams.warehouseId = null
this.queryParams.warehousesCode = null this.queryParams.warehousesCode = null
// 清空仓库时,同时清空库位 // 清空仓库时,同时清空库位
this.queryLocationName = null // this.queryLocationName = null
this.queryParams.locationId = null // this.queryParams.locationId = null
this.handleQuery() this.handleQuery()
}, },
/** 清空库位选择 */ /** 清空库位选择 */
...@@ -512,12 +511,12 @@ export default { ...@@ -512,12 +511,12 @@ export default {
// 根据当前行的物料ID、仓库、库位、货主等信息查询明细 // 根据当前行的物料ID、仓库、库位、货主等信息查询明细
const params = { const params = {
materialId: row.materialId, materialId: row.materialId,
warehousesId: row.warehousesId, warehousesId: this.queryParams.warehousesId,
locationId: row.locationId, locationId: this.queryParams.locationId,
ownerId: row.ownerId, ownerId: this.queryParams.ownerId,
batchId: row.batchId, batchId: this.queryParams.batchId,
inventoryType: row.inventoryType, inventoryType: this.queryParams.inventoryType,
inventoryStatus: row.inventoryStatus, inventoryStatus: this.queryParams.inventoryStatus,
pageNum: 1, pageNum: 1,
pageSize: 10000 // 设置一个很大的值,不分页 pageSize: 10000 // 设置一个很大的值,不分页
} }
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<el-form-item label="物料" prop="materialId"> <el-form-item label="物料" prop="materialId">
<el-input <el-input
v-model="queryParams.materialId" v-model="queryParams.materialId"
placeholder="请输入物料ID或编码" placeholder="请输入物料或编码"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
<div class="table-container"> <div class="table-container">
<el-table v-loading="loading" :data="returnOrderItemList" border height="100%" style="width: 100%"> <el-table v-loading="loading" :data="returnOrderItemList" border height="100%" style="width: 100%">
<el-table-column type="index" label="序号" width="60" align="center" fixed="left" /> <el-table-column type="index" label="序号" width="60" align="center" fixed="left" />
<!-- <el-table-column label="物料ID" align="center" prop="materialId" width="150" /> --> <!-- <el-table-column label="物料" align="center" prop="materialId" width="150" /> -->
<el-table-column label="物料名称" align="center" prop="materialName" min-width="150" show-overflow-tooltip /> <el-table-column label="物料名称" align="center" prop="materialName" min-width="150" show-overflow-tooltip />
<el-table-column label="SAP物料号" align="center" prop="sapNo" width="120" /> <el-table-column label="SAP物料号" align="center" prop="sapNo" width="120" />
<el-table-column label="TS Code" align="center" prop="tsCode" width="120" /> <el-table-column label="TS Code" align="center" prop="tsCode" width="120" />
......
...@@ -9,34 +9,34 @@ ...@@ -9,34 +9,34 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="货物ID 字典,检索条件" prop="materialId"> <el-form-item label="货物 字典,检索条件" prop="materialId">
<el-input <el-input
v-model="queryParams.materialId" v-model="queryParams.materialId"
placeholder="请输入货物ID 字典,检索条件" placeholder="请输入货物 字典,检索条件"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="批次ID 检索条件" prop="batchCode"> <el-form-item label="批次 检索条件" prop="batchCode">
<el-input <el-input
v-model="queryParams.batchCode" v-model="queryParams.batchCode"
placeholder="请输入批次ID 检索条件" placeholder="请输入批次 检索条件"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="仓库ID 检索条件" prop="warehouseId"> <el-form-item label="仓库 检索条件" prop="warehouseId">
<el-input <el-input
v-model="queryParams.warehouseId" v-model="queryParams.warehouseId"
placeholder="请输入仓库ID 检索条件" placeholder="请输入仓库 检索条件"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="库位ID 检索条件" prop="locationId"> <el-form-item label="库位 检索条件" prop="locationId">
<el-input <el-input
v-model="queryParams.locationId" v-model="queryParams.locationId"
placeholder="请输入库位ID 检索条件" placeholder="请输入库位 检索条件"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
...@@ -299,17 +299,17 @@ ...@@ -299,17 +299,17 @@
<el-form-item label="盘点单号 检索条件" prop="stocktakeId"> <el-form-item label="盘点单号 检索条件" prop="stocktakeId">
<el-input v-model="form.stocktakeId" placeholder="请输入盘点单号 检索条件" /> <el-input v-model="form.stocktakeId" placeholder="请输入盘点单号 检索条件" />
</el-form-item> </el-form-item>
<el-form-item label="货物ID 字典,检索条件" prop="materialId"> <el-form-item label="货物 字典,检索条件" prop="materialId">
<el-input v-model="form.materialId" placeholder="请输入货物ID 字典,检索条件" /> <el-input v-model="form.materialId" placeholder="请输入货物 字典,检索条件" />
</el-form-item> </el-form-item>
<el-form-item label="批次ID 检索条件" prop="batchCode"> <el-form-item label="批次 检索条件" prop="batchCode">
<el-input v-model="form.batchCode" placeholder="请输入批次ID 检索条件" /> <el-input v-model="form.batchCode" placeholder="请输入批次 检索条件" />
</el-form-item> </el-form-item>
<el-form-item label="仓库ID 检索条件" prop="warehouseId"> <el-form-item label="仓库 检索条件" prop="warehouseId">
<el-input v-model="form.warehouseId" placeholder="请输入仓库ID 检索条件" /> <el-input v-model="form.warehouseId" placeholder="请输入仓库 检索条件" />
</el-form-item> </el-form-item>
<el-form-item label="库位ID 检索条件" prop="locationId"> <el-form-item label="库位 检索条件" prop="locationId">
<el-input v-model="form.locationId" placeholder="请输入库位ID 检索条件" /> <el-input v-model="form.locationId" placeholder="请输入库位 检索条件" />
</el-form-item> </el-form-item>
<el-form-item label="系统数量" prop="systemQuantity"> <el-form-item label="系统数量" prop="systemQuantity">
<el-input v-model="form.systemQuantity" placeholder="请输入系统数量" /> <el-input v-model="form.systemQuantity" placeholder="请输入系统数量" />
......
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
readonly readonly
@focus="openLocationSelector" @focus="openLocationSelector"
:suffix-icon="''" :suffix-icon="''"
:disabled="!queryParams.warehousesCode"
> >
<template v-if="queryLocationName" #suffix> <template v-if="queryLocationName" #suffix>
<i <i
...@@ -238,8 +237,8 @@ export default { ...@@ -238,8 +237,8 @@ export default {
this.queryParams.warehouseId = warehouse.warehouseId this.queryParams.warehouseId = warehouse.warehouseId
this.queryWarehouseName = warehouse.warehousesName || warehouse.warehouseId this.queryWarehouseName = warehouse.warehousesName || warehouse.warehouseId
// 仓库选择后,清空库位信息 // 仓库选择后,清空库位信息
this.queryLocationName = null // this.queryLocationName = null
this.queryParams.locationId = null // this.queryParams.locationId = null
this.handleQuery() this.handleQuery()
}, },
...@@ -272,16 +271,16 @@ export default { ...@@ -272,16 +271,16 @@ export default {
this.queryWarehouseName = null this.queryWarehouseName = null
this.queryParams.warehouseId = null this.queryParams.warehouseId = null
// 清空仓库时,同时清空库位 // 清空仓库时,同时清空库位
this.queryLocationName = null // this.queryLocationName = null
this.queryParams.locationId = null // this.queryParams.locationId = null
this.handleQuery() this.handleQuery()
}, },
/** 打开库位选择器 */ /** 打开库位选择器 */
openLocationSelector() { openLocationSelector() {
if (!this.queryParams.warehouseId) { // if (!this.queryParams.warehouseId) {
this.$message.warning("请先选择仓库") // this.$message.warning("请先选择仓库")
return // return
} // }
this.locationSelectorVisible = true this.locationSelectorVisible = true
}, },
/** 清空库位选择 */ /** 清空库位选择 */
......
...@@ -36,15 +36,15 @@ ...@@ -36,15 +36,15 @@
@click="handleExport" @click="handleExport"
v-hasPermi="['inventory:warehouses:export']" v-hasPermi="['inventory:warehouses:export']"
>导出</el-button> >导出</el-button>
</template> </template>
</PageTitle> </PageTitle>
<div class="page-container"> <div class="page-container">
<page-wrapper-search <page-wrapper-search
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
size="small" size="small"
@search="handleQuery" @search="handleQuery"
@reset="resetQuery" @reset="resetQuery"
> >
...@@ -104,21 +104,21 @@ ...@@ -104,21 +104,21 @@
<div class="table-container"> <div class="table-container">
<el-table v-loading="loading" :data="warehousesList" height="100%" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="warehousesList" height="100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed /> <el-table-column type="selection" width="55" align="center" fixed />
<el-table-column label="仓库编码" align="center" prop="warehousesCode" width="120" fixed /> <el-table-column label="仓库编码" align="center" prop="warehousesCode" min-width="120" fixed />
<el-table-column label="仓库名称" align="center" prop="warehousesName" width="150" /> <el-table-column label="仓库名称" align="center" prop="warehousesName" min-width="150" />
<el-table-column label="仓库类型" align="center" prop="warehouseType" width="100"> <el-table-column label="仓库类型" align="center" prop="warehouseType" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.warehouse_type" :value="scope.row.warehouseType"/> <dict-tag :options="dict.type.warehouse_type" :value="scope.row.warehouseType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="仓库地点" align="center" prop="address" width="200" /> <el-table-column label="仓库地点" align="center" prop="address" min-width="200" />
<el-table-column label="仓库区域" align="center" prop="area" width="120" /> <el-table-column label="仓库区域" align="center" prop="area" min-width="120" />
<el-table-column label="仓库容量" align="center" prop="capacity" width="100" /> <el-table-column label="仓库容量" align="center" prop="capacity" min-width="100" />
<el-table-column label="仓库管理员" align="center" prop="manager" width="120" /> <el-table-column label="仓库管理员" align="center" prop="manager" min-width="120" />
<el-table-column label="联系电话" align="center" prop="contactPhone" width="120" /> <el-table-column label="联系电话" align="center" prop="contactPhone" min-width="120" />
<el-table-column label="应用状态" align="center" prop="isEnabled" width="100"> <el-table-column label="应用状态" align="center" prop="isEnabled" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag <el-tag
:type="scope.row.isEnabled === 1 ? 'success' : 'danger'" :type="scope.row.isEnabled === 1 ? 'success' : 'danger'"
size="small" size="small"
> >
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建日期" align="center" prop="createTime" width="160" /> <el-table-column label="创建日期" align="center" prop="createTime" min-width="160" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120" fixed="right"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
...@@ -202,10 +202,10 @@ ...@@ -202,10 +202,10 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="仓库容量" prop="capacity"> <el-form-item label="仓库容量" prop="capacity">
<el-input-number <el-input-number
v-model="form.capacity" v-model="form.capacity"
placeholder="请输入仓库容量" placeholder="请输入仓库容量"
:min="0" :min="0"
style="width: 100%" style="width: 100%"
/> />
</el-form-item> </el-form-item>
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">确 定</el-button>
...@@ -354,7 +354,7 @@ export default { ...@@ -354,7 +354,7 @@ export default {
{ required: true, message: '应用状态不能为空', trigger: 'change' } { required: true, message: '应用状态不能为空', trigger: 'change' }
], ],
area: [ area: [
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
// 空值直接通过(如果需要必填,可加required规则) // 空值直接通过(如果需要必填,可加required规则)
if (!value) return callback(); if (!value) return callback();
...@@ -364,8 +364,8 @@ export default { ...@@ -364,8 +364,8 @@ export default {
} else { } else {
callback(); callback();
} }
}, },
trigger: 'blur' trigger: 'blur'
} }
], ],
// 新增:联系电话校验(手机号格式) // 新增:联系电话校验(手机号格式)
...@@ -467,7 +467,7 @@ export default { ...@@ -467,7 +467,7 @@ export default {
this.open = true; // 先打开弹窗,渲染表单DOM this.open = true; // 先打开弹窗,渲染表单DOM
// 等待DOM渲染完成后再重置 // 等待DOM渲染完成后再重置
this.$nextTick(() => { this.$nextTick(() => {
this.reset(); this.reset();
}); });
}, },
handleUpdate(row) { handleUpdate(row) {
...@@ -565,4 +565,4 @@ export default { ...@@ -565,4 +565,4 @@ export default {
.dialog-footer { .dialog-footer {
text-align: center; text-align: center;
} }
</style> </style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论