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"
/> />
...@@ -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()
}, },
......
...@@ -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) {
......
...@@ -600,7 +600,7 @@ import { listMaterials } from "@/api/inventory/materials" ...@@ -600,7 +600,7 @@ import { listMaterials } from "@/api/inventory/materials"
export default { export default {
name: "Locations", name: "Locations",
components: { materialsSeletor, WarehouseSelector, ImportExcel }, components: { materialsSeletor, ImportExcel },
dicts: ['sys_normal_disable', 'location_type', 'location_usage', 'yorn','is_enabled'], dicts: ['sys_normal_disable', 'location_type', 'location_usage', 'yorn','is_enabled'],
data() { data() {
return { return {
......
...@@ -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="请选择物料"
...@@ -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
...@@ -221,7 +221,7 @@ ...@@ -221,7 +221,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" />
...@@ -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;
} }
......
...@@ -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"
/> />
...@@ -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 || '-' }}
...@@ -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">
...@@ -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;
} }
......
...@@ -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
}, },
/** 清空库位选择 */ /** 清空库位选择 */
......
...@@ -76,74 +76,96 @@ ...@@ -76,74 +76,96 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
border border
size="small"> size="small">
<el-table-column label="子表ID" align="center" width="150px" prop="id" v-if="false" /> <el-table-column label="子表" align="center" min-width="150px" prop="id" v-if="false" />
<el-table-column label="物料" align="center" prop="materialId" width="150px" fixed> <el-table-column label="物料" align="center" prop="materialId" min-width="150px" fixed>
<template slot-scope="scope"> <template slot-scope="scope">
<div class="el-input__inner disabled-input" style="padding: 0 15px; height: 32px; line-height: 32px;"> <div class="disabled-input">
{{ getDictLabel(materialDict, scope.row.materialId, 'id', 'material_name') }} {{ getDictLabel(materialDict, scope.row.materialId, 'id', 'material_name') }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="批次编号" align="center" prop="batchCode" width="150px" > <el-table-column label="批次编号" align="center" prop="batchCode" min-width="150px" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.batchCode" placeholder="请输入批次编号" disabled /> <div class="disabled-input">
{{ scope.row.batchCode }}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="仓库" align="center" prop="warehouseName" width="150px" > <el-table-column label="仓库" align="center" prop="warehouseName" min-width="150px" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.warehouseName" placeholder="请输入仓库" disabled /> <div class="disabled-input">
{{ scope.row.warehouseName }}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库位" align="center" prop="locationName" width="150px" > <el-table-column label="库位" align="center" prop="locationName" min-width="150px" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.locationName" placeholder="请输入库位" disabled /> <div class="disabled-input">
{{ scope.row.locationName }}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="系统数量" align="center" prop="systemQuantity" width="150px" > <el-table-column label="系统数量" align="center" prop="systemQuantity" min-width="150px" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.systemQuantity" placeholder="请输入系统数量" disabled /> <div class="disabled-input">
{{ scope.row.systemQuantity }}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际数量" align="center" prop="actualQuantity" width="150px" > <el-table-column label="实际数量" align="center" prop="actualQuantity" min-width="150px" >
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="isConfirm">
<div class="disabled-input">
{{ scope.row.actualQuantity }}
</div>
</template>
<template v-else>
<el-input v-model="scope.row.actualQuantity" <el-input v-model="scope.row.actualQuantity"
placeholder="请输入实际数量" placeholder="请输入实际数量"
type="number" type="number"
:disabled="isConfirm"
@input="handleItemChange(scope.row)" @input="handleItemChange(scope.row)"
/> />
</template> </template>
</template>
</el-table-column> </el-table-column>
<el-table-column label="差异数量" align="center" prop="varianceQuantity" width="150px" > <el-table-column label="差异数量" align="center" prop="varianceQuantity" min-width="150px" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input type="number" v-model="scope.row.varianceQuantity" placeholder="请输入差异数量" disabled /> <div class="disabled-input">
{{ scope.row.varianceQuantity }}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单价" align="center" prop="unitPrice" width="150px" > <el-table-column label="单价" align="center" prop="unitPrice" min-width="150px" >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="el-input__inner disabled-input" style="padding: 0 15px; height: 32px; line-height: 32px;"> <div class="disabled-input">
{{ formatAmount(scope.row.unitPrice) }} {{ formatAmount(scope.row.unitPrice) }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="差异金额" align="center" prop="varianceAmount" width="150px" > <el-table-column label="差异金额" align="center" prop="varianceAmount" min-width="150px" >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="el-input__inner disabled-input" style="padding: 0 15px; height: 32px; line-height: 32px;"> <div class="disabled-input">
{{ formatAmount(scope.row.varianceAmount) }} {{ formatAmount(scope.row.varianceAmount) }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否已调整" align="center" prop="adjusted" v-if="isConfirm" width="150px" > <el-table-column label="是否已调整" align="center" prop="adjusted" v-if="isConfirm" min-width="150px" >
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-input v-model="scope.row.adjusted" placeholder="请输入是否已调整0否1是" disabled />--> <div class="disabled-input">
<div class="el-input__inner disabled-input" style="padding: 0 15px; height: 32px; line-height: 32px;">
<dict-tag :options="dict.type.is_adjusted" :value="scope.row.adjusted"/> <dict-tag :options="dict.type.is_adjusted" :value="scope.row.adjusted"/>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="adjustedType" align="center" label="调整原因类型" width="150px"> <el-table-column prop="adjustedType" align="center" label="调整原因类型" min-width="150px">
<template slot-scope="scope"> <template v-if="isConfirm" slot-scope="scope">
<div
class="disabled-input"
>
{{ getAdjustReasonName(scope.row.adjustedType) }}
</div>
</template>
<template v-else slot-scope="scope">
<!-- <template slot-scope="scope"> -->
<el-select <el-select
v-model="scope.row.adjustedType" v-model="scope.row.adjustedType"
placeholder="请选择调整原因类型" placeholder="请选择调整原因类型"
...@@ -162,26 +184,38 @@ ...@@ -162,26 +184,38 @@
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="调整原因" align="center" prop="adjustmentReason" width="150px" > <el-table-column label="调整原因" align="center" prop="adjustmentReason" min-width="150px" >
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="isConfirm">
<div
class="disabled-input"
>
{{ scope.row.adjustmentReason }}
</div>
</template>
<template v-else>
<el-input <el-input
v-model="scope.row.adjustmentReason" v-model="scope.row.adjustmentReason"
placeholder="请输入调整原因" placeholder="请输入调整原因"
type="text" type="text"
:disabled="isConfirm"
:style="(Number(scope.row.varianceQuantity)||0)!==0 && !scope.row.adjustmentReason ? {border:'1px solid #f56c6c',boxShadow:'0 0 0 2px rgba(245,108,108,0.2)'} : {}" :style="(Number(scope.row.varianceQuantity)||0)!==0 && !scope.row.adjustmentReason ? {border:'1px solid #f56c6c',boxShadow:'0 0 0 2px rgba(245,108,108,0.2)'} : {}"
@input="handleItemChange(scope.row)" @input="handleItemChange(scope.row)"
/> />
</template> </template>
</template>
</el-table-column> </el-table-column>
<el-table-column label="调整人" align="center" prop="adjustedBy" v-if="isConfirm" width="150px" > <el-table-column label="调整人" align="center" prop="adjustedBy" v-if="isConfirm" min-width="150px" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.adjustedBy" placeholder="请输入调整人" disabled /> <div class="disabled-input">
{{ scope.row.adjustedBy }}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="调整时间" align="center" prop="adjustedAt"v-if="isConfirm" width="150px" > <el-table-column label="调整时间" align="center" prop="adjustedAt" v-if="isConfirm" min-width="150px" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-date-picker clearable v-model="scope.row.adjustedAt" type="date" value-format="yyyy-MM-dd" placeholder="请选择调整时间" disabled /> <div class="disabled-input">
{{ scope.row.adjustedAt }}
</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -458,6 +492,11 @@ export default { ...@@ -458,6 +492,11 @@ export default {
}) })
// 同步通知父组件数据变化 // 同步通知父组件数据变化
this.$emit("item-change", row); this.$emit("item-change", row);
},
/** 获取调整原因名称 */
getAdjustReasonName(status) {
const item = this.dict.type.adjusted_type.find(item => item.value === status)
return item ? item.label : '未知'
} }
} }
} }
...@@ -486,11 +525,12 @@ export default { ...@@ -486,11 +525,12 @@ export default {
--el-table-row-hover-bg-color: #f5f7fa; --el-table-row-hover-bg-color: #f5f7fa;
} }
.disabled-input { /* .disabled-input {
background-color: #f5f7fa !important; background-color: #f5f7fa !important;
border: 1px solid #e5e6eb !important; border: 1px solid #e5e6eb !important;
color: #909399 !important; color: #909399 !important;
cursor: not-allowed !important; cursor: not-allowed !important;
border-radius: 4px !important; border-radius: 4px !important;
} padding: 0 15px; height: 32px; line-height: 32px;
} */
</style> </style>
...@@ -104,19 +104,19 @@ ...@@ -104,19 +104,19 @@
<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'"
...@@ -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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论