Commit f9be7e47 by wangchunyang

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

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