Commit 6a8bfd30 by yubin

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	ruoyi-admin-vue/src/views/inventory/locations/index.vue
#	ruoyi-admin-vue/src/views/inventory/orders/OutboundOrderFormWithItems.vue
#	ruoyi-admin-vue/src/views/inventory/orders/index.vue
parents 1f9d9564 92616d3e
......@@ -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"
/>
......@@ -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()
},
......
......@@ -134,6 +134,20 @@
/>
</el-select>
</el-form-item>
<!-- ========== 新增:入库日期范围选择器 ========== -->
<el-form-item label="入库日期" prop="inboundDateRange">
<el-date-picker
v-model="inboundDateRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</page-wrapper-search>
<!-- 表格区域(对齐字典页面的样式) -->
......@@ -494,6 +508,8 @@ export default {
},
data() {
return {
// 日期组件返回数组
inboundDateRange: null,
// 货主选择相关(对齐退库组件)
queryOwnerName: null,
ownerSelectorVisible: false,
......@@ -548,7 +564,9 @@ export default {
ownerName: null, // 货主名称(搜索用)
ownerCode: null, // 货主编码(搜索用)
orderStatus: null,
orderType: null
orderType: null,
inboundDateStart: null,// 开始日期(搜索用)
inboundDateEnd: null // 结束日期(搜索用)
},
// 表单参数(对齐退库组件的货主字段)
form: {
......@@ -611,7 +629,6 @@ export default {
getList() {
this.loading = true
listInbound(this.queryParams).then(response => {
console.log(response.rows)
this.inboundList = response.rows
this.total = response.total
this.loading = false
......@@ -654,6 +671,14 @@ export default {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
if (Array.isArray(this.inboundDateRange) && this.inboundDateRange.length === 2) {
this.queryParams.inboundDateStart = this.inboundDateRange[0];
this.queryParams.inboundDateEnd = this.inboundDateRange[1];
} else {
// 清空开始/结束日期(避免残留旧值)
this.queryParams.inboundDateStart = "";
this.queryParams.inboundDateEnd = "";
}
this.getList()
},
......@@ -673,8 +698,11 @@ export default {
ownerName: null,
ownerCode: null,
orderStatus: null,
orderType: null
orderType: null,
inboundDateStart: null,
inboundDateEnd: null
}
this.inboundDateRange = null;
this.$nextTick(() => {
// 重新触发查询,加载默认数据
this.handleQuery()
......
......@@ -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) {
......
......@@ -3,16 +3,14 @@
<!-- 页面标题和操作按钮 -->
<PageTitle>
<template #buttons>
<el-button
type="primary"
plain
icon="el-icon-plus"
size="medium"
@click="handleAdd"
v-hasPermi="['inventory:inbound:add']"
v-hasPermi="['inventory:orders:add']"
>新增</el-button>
<el-button
type="success"
plain
......@@ -20,9 +18,16 @@
size="medium"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['inventory:inbound:edit']"
v-hasPermi="['inventory:orders:edit']"
>修改</el-button>
<el-button
type="success"
plain
icon="el-icon-edit"
size="medium"
@click="handleImport"
v-hasPermi="['inventory:orders:add']"
>导入</el-button>
<el-button
type="danger"
plain
......@@ -30,25 +35,15 @@
size="medium"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['inventory:inbound:remove']"
v-hasPermi="['inventory:orders:remove']"
>删除</el-button>
<el-button
type="warning"
plain
icon="el-icon-upload"
size="medium"
@click="handleImport"
v-hasPermi="['inventory:inbound:import']"
>导入</el-button>
<el-button
type="warning"
plain
icon="el-icon-download"
size="medium"
@click="handleExport"
v-hasPermi="['inventory:inbound:export']"
v-hasPermi="['inventory:orders:export']"
>导出</el-button>
</template>
</PageTitle>
......@@ -103,10 +98,10 @@
/>
</el-select>
</el-form-item>
<el-form-item label="批次" prop="batchCode">
<el-form-item label="批次" prop="batchCode">
<el-input
v-model="queryParams.batchCode"
placeholder="请输入批次"
placeholder="请输入批次"
clearable
@keyup.enter.native="handleQuery"
/>
......@@ -210,7 +205,7 @@
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="批次" 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 || '-' }}
......@@ -341,8 +336,8 @@
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="批次" prop="batchCode">
<el-input v-model="form.batchCode" placeholder="请输入批次" :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">
......@@ -425,10 +420,13 @@
</el-col>
</el-row>
<!-- 【修改1】新增materialName展示 -->
<div v-for="(group, materialId) in outboundOrderItemsGroup" :key="materialId" class="material-group mb10">
<div class="group-header" style="background: #f5f7fa; padding: 8px 12px; border-radius: 4px; margin-bottom: 8px;">
<!-- 【修改2】展示物料名称(优先取分组的materialName,无则用getMaterialName方法) -->
<span style="font-weight: 600; margin-right: 16px;">物料:{{ group.materialName }}</span>
<span style="color: #666;">明细数量:{{ group.items.length }} </span>
<!-- 仅编辑模式显示分组操作按钮 -->
<el-button
type="text"
size="mini"
......
......@@ -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
},
/** 清空库位选择 */
......
......@@ -76,74 +76,96 @@
@selection-change="handleSelectionChange"
border
size="small">
<el-table-column label="子表ID" align="center" width="150px" prop="id" v-if="false" />
<el-table-column label="物料" align="center" prop="materialId" width="150px" fixed>
<el-table-column label="子表" align="center" min-width="150px" prop="id" v-if="false" />
<el-table-column label="物料" align="center" prop="materialId" min-width="150px" fixed>
<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') }}
</div>
</template>
</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">
<el-input v-model="scope.row.batchCode" placeholder="请输入批次编号" disabled />
<div class="disabled-input">
{{ scope.row.batchCode }}
</div>
</template>
</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">
<el-input v-model="scope.row.warehouseName" placeholder="请输入仓库" disabled />
<div class="disabled-input">
{{ scope.row.warehouseName }}
</div>
</template>
</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">
<el-input v-model="scope.row.locationName" placeholder="请输入库位" disabled />
<div class="disabled-input">
{{ scope.row.locationName }}
</div>
</template>
</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">
<el-input v-model="scope.row.systemQuantity" placeholder="请输入系统数量" disabled />
<div class="disabled-input">
{{ scope.row.systemQuantity }}
</div>
</template>
</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 v-if="isConfirm">
<div class="disabled-input">
{{ scope.row.actualQuantity }}
</div>
</template>
<template v-else>
<el-input v-model="scope.row.actualQuantity"
placeholder="请输入实际数量"
type="number"
:disabled="isConfirm"
@input="handleItemChange(scope.row)"
/>
</template>
</template>
</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">
<el-input type="number" v-model="scope.row.varianceQuantity" placeholder="请输入差异数量" disabled />
<div class="disabled-input">
{{ scope.row.varianceQuantity }}
</div>
</template>
</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">
<div class="el-input__inner disabled-input" style="padding: 0 15px; height: 32px; line-height: 32px;">
<div class="disabled-input">
{{ formatAmount(scope.row.unitPrice) }}
</div>
</template>
</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">
<div class="el-input__inner disabled-input" style="padding: 0 15px; height: 32px; line-height: 32px;">
<div class="disabled-input">
{{ formatAmount(scope.row.varianceAmount) }}
</div>
</template>
</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">
<!-- <el-input v-model="scope.row.adjusted" placeholder="请输入是否已调整0否1是" disabled />-->
<div class="el-input__inner disabled-input" style="padding: 0 15px; height: 32px; line-height: 32px;">
<div class="disabled-input">
<dict-tag :options="dict.type.is_adjusted" :value="scope.row.adjusted"/>
</div>
</template>
</el-table-column>
<el-table-column prop="adjustedType" align="center" label="调整原因类型" width="150px">
<template slot-scope="scope">
<el-table-column prop="adjustedType" align="center" label="调整原因类型" min-width="150px">
<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
v-model="scope.row.adjustedType"
placeholder="请选择调整原因类型"
......@@ -162,26 +184,38 @@
</el-select>
</template>
</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 v-if="isConfirm">
<div
class="disabled-input"
>
{{ scope.row.adjustmentReason }}
</div>
</template>
<template v-else>
<el-input
v-model="scope.row.adjustmentReason"
placeholder="请输入调整原因"
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)'} : {}"
@input="handleItemChange(scope.row)"
/>
</template>
</template>
</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">
<el-input v-model="scope.row.adjustedBy" placeholder="请输入调整人" disabled />
<div class="disabled-input">
{{ scope.row.adjustedBy }}
</div>
</template>
</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">
<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>
</el-table-column>
</el-table>
......@@ -458,6 +492,11 @@ export default {
})
// 同步通知父组件数据变化
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 {
--el-table-row-hover-bg-color: #f5f7fa;
}
.disabled-input {
/* .disabled-input {
background-color: #f5f7fa !important;
border: 1px solid #e5e6eb !important;
color: #909399 !important;
cursor: not-allowed !important;
border-radius: 4px !important;
}
padding: 0 15px; height: 32px; line-height: 32px;
} */
</style>
......@@ -104,19 +104,19 @@
<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
:type="scope.row.isEnabled === 1 ? 'success' : 'danger'"
......@@ -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
......
......@@ -18,6 +18,7 @@ import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.uuid.UUID;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.inventory.domain.TO.InboundItemsTO;
import com.ruoyi.inventory.domain.vo.inboundVO.InboundFinishTemplateVO;
import com.ruoyi.inventory.domain.vo.InboundMaterialTotalVO;
import com.ruoyi.inventory.domain.vo.inboundVO.InboundTRDCTemplateVO;
......@@ -73,8 +74,21 @@ public class InboundOrdersController extends BaseController
public void export(HttpServletResponse response, InboundOrders inboundOrders)
{
List<InboundOrders> list = inboundOrdersService.selectInboundOrdersList(inboundOrders);
// for (InboundOrders inboundItem : list) {
// if (inboundOrders.getOrderStatus() == 1) {
// InboundItemsTO inboundItemsTO = new InboundItemsTO();
// inboundItemsTO.setRelocationId(inboundItem.getL)
// }else if (inboundOrders.getOrderStatus() == 2) {
//
// }else if (inboundOrders.getOrderStatus() == 3) {
//
// }else{
//
// }
// }
ExcelUtil<InboundOrders> util = new ExcelUtil<InboundOrders>(InboundOrders.class);
util.exportExcel(response, list, "入库单数据");
util.exportExcel(response, list, "入库单导出数据");
}
/**
......
......@@ -22,62 +22,71 @@ public class InboundOrders extends BaseEntity
private String id;
/** 入库单号 检索条件 */
@Excel(name = "入库单号 检索条件")
@Excel(name = "入库单号")
private String orderId;
/** 系统编号 检索条件 */
@Excel(name = "系统编号 检索条件")
@Excel(name = "系统编号")
private String systemNo;
/** 入库类型 字典,检索条件 */
@Excel(name = "入库类型 字典,检索条件")
@Excel(name = "入库类型")
private String orderTypeId;
/** 批次ID 检索条件 */
@Excel(name = "批次ID 检索条件")
@Excel(name = "批次")
private String batchId;
/** 仓库ID 暂无用 */
@Excel(name = "仓库ID 暂无用")
@Excel(name = "源仓库")
private String warehouseId;
private String warehouseName;
/** 货主ID */
@Excel(name = "货主ID")
@Excel(name = "货主")
private String ownerId;
private String ownerName;
/** 入库单状态1-草稿 2-已完成 3-已取消 字典,检索条件 */
@Excel(name = "入库单状态1-草稿 2-已完成 3-已取消 字典,检索条件")
@Excel(name = "入库单状态")
private Long orderStatus;
/** 入库日期 日期无时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "入库日期 日期无时间", width = 30, dateFormat = "yyyy-MM-dd")
@Excel(name = "入库日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date inboundDate;
/** 开始日期 只做查询 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date inboundDateStart;
/** 结束日期 只做查询 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date inboundDateEnd;
/** 订单类型 字典,检索条件 */
@Excel(name = "订单类型 字典,检索条件")
@Excel(name = "订单类型")
private String orderType;
/** 计划量 暂无用 */
@Excel(name = "计划量 暂无用")
@Excel(name = "计划量")
private Long totalPlannedQuantity;
/** 实际量 暂无用 */
@Excel(name = "实际量 暂无用")
@Excel(name = "实际量")
private Long totalActualQuantity;
/** 总件数 暂无用 */
@Excel(name = "总件数 暂无用")
@Excel(name = "总件数")
private Long totalPackages;
/** 负责人 暂无用 */
@Excel(name = "负责人 暂无用")
@Excel(name = "负责人")
private String opUserName;
/** 应用数据1使用0删除 删除用 */
@Excel(name = "应用数据1使用0删除 删除用")
@Excel(name = "应用数据")
private Long isUsed;
/** 排序 */
......@@ -293,6 +302,30 @@ public class InboundOrders extends BaseEntity
this.ownerName = ownerName;
}
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
public Date getInboundDateStart() {
return inboundDateStart;
}
public void setInboundDateStart(Date inboundDateStart) {
this.inboundDateStart = inboundDateStart;
}
public Date getInboundDateEnd() {
return inboundDateEnd;
}
public void setInboundDateEnd(Date inboundDateEnd) {
this.inboundDateEnd = inboundDateEnd;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
......@@ -180,4 +180,5 @@ public class Inventory extends BaseEntity
private String specialRequirements;
private Double unitPrice;
private String inboundOrderId;
}
......@@ -94,6 +94,6 @@ public class InventoryTransactions extends BaseEntity
private String updateUserCode;
@Excel(name = "单价")
private String unitPrice;
private Double unitPrice;
}
package com.ruoyi.inventory.domain.TO;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 入库单明细对象 inbound_order_items
*
* @author ruoyi
* @date 2025-12-02
*/
public class InboundItemsAndMaterialName extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 编号 */
private String id;
/** 入库单号 检索条件 */
@Excel(name = "入库单号")
private String orderId;
/** 入库单号 检索条件 */
@Excel(name = "主表Id")
private String inboundOrderId;
/** 货物ID 字典,检索条件 */
// @Excel(name = "货物ID")
private String materialId;
@Excel(name = "SapNo")
private String sapNo;
private String materialName;
private Double unitWeight;
/** 批次ID 检索条件 */
@Excel(name = "批次ID")
private String batchId;
/** 仓库ID 检索条件 */
@Excel(name = "仓库ID")
private String warehouseId;
private String warehousesName;
/** 库位ID 检索条件 */
@Excel(name = "库位ID")
private String locationId;
private String locationName;
/** 计划数量 */
@Excel(name = "计划数量")
private Long plannedQuantity;
/** 实际数量 */
@Excel(name = "实际数量")
private Long actualQuantity;
/** 计划件数 暂无用 */
@Excel(name = "计划件数")
private Long plannedPackages;
/** 实际件数 */
@Excel(name = "实际件数")
private Long actualPackages;
/** 约数 */
// @Excel(name = "约数")
private Long divisor;
/** 标签颜色 字典,检索条件 */
@Excel(name = "标签颜色")
private Long labelColor;
/** 凭证号 检索条件 */
@Excel(name = "凭证号")
private String voucherNumber;
/** 单价 */
@Excel(name = "单价")
private Long unitPrice;
/** 状态1-待收货 2-部分收货 3-已完成 暂无用 */
// @Excel(name = "状态")
private Long itemStatus;
/** 收货时间 暂无用 */
@Excel(name = "收货时间")
private Long receivedAt;
/** 收货人 */
@Excel(name = "收货人")
private String receivedBy;
/** 应用数据1使用0删除 删除用 */
// @Excel(name = "应用数据")
private Long isUsed;
/** 排序 */
// @Excel(name = "排序")
private Long sortNo;
/** 创建日期 */
// @Excel(name = "创建日期")
private String createUserCode;
/** 排序号 */
// @Excel(name = "排序号")
private String updateUserCode;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setOrderId(String orderId)
{
this.orderId = orderId;
}
public String getOrderId()
{
return orderId;
}
public void setMaterialId(String materialId)
{
this.materialId = materialId;
}
public String getMaterialId()
{
return materialId;
}
public void setBatchId(String batchId)
{
this.batchId = batchId;
}
public String getBatchId()
{
return batchId;
}
public void setWarehouseId(String warehouseId)
{
this.warehouseId = warehouseId;
}
public String getWarehouseId()
{
return warehouseId;
}
public void setLocationId(String locationId)
{
this.locationId = locationId;
}
public String getLocationId()
{
return locationId;
}
public void setPlannedQuantity(Long plannedQuantity)
{
this.plannedQuantity = plannedQuantity;
}
public Long getPlannedQuantity()
{
return plannedQuantity;
}
public void setActualQuantity(Long actualQuantity)
{
this.actualQuantity = actualQuantity;
}
public Long getActualQuantity()
{
return actualQuantity;
}
public void setPlannedPackages(Long plannedPackages)
{
this.plannedPackages = plannedPackages;
}
public Long getPlannedPackages()
{
return plannedPackages;
}
public void setActualPackages(Long actualPackages)
{
this.actualPackages = actualPackages;
}
public Long getActualPackages()
{
return actualPackages;
}
public void setDivisor(Long divisor)
{
this.divisor = divisor;
}
public Long getDivisor()
{
return divisor;
}
public void setLabelColor(Long labelColor)
{
this.labelColor = labelColor;
}
public Long getLabelColor()
{
return labelColor;
}
public void setVoucherNumber(String voucherNumber)
{
this.voucherNumber = voucherNumber;
}
public String getVoucherNumber()
{
return voucherNumber;
}
public void setUnitPrice(Long unitPrice)
{
this.unitPrice = unitPrice;
}
public Long getUnitPrice()
{
return unitPrice;
}
public void setItemStatus(Long itemStatus)
{
this.itemStatus = itemStatus;
}
public Long getItemStatus()
{
return itemStatus;
}
public void setReceivedAt(Long receivedAt)
{
this.receivedAt = receivedAt;
}
public Long getReceivedAt()
{
return receivedAt;
}
public void setReceivedBy(String receivedBy)
{
this.receivedBy = receivedBy;
}
public String getReceivedBy()
{
return receivedBy;
}
public void setIsUsed(Long isUsed)
{
this.isUsed = isUsed;
}
public Long getIsUsed()
{
return isUsed;
}
public void setSortNo(Long sortNo)
{
this.sortNo = sortNo;
}
public Long getSortNo()
{
return sortNo;
}
public void setCreateUserCode(String createUserCode)
{
this.createUserCode = createUserCode;
}
public String getCreateUserCode()
{
return createUserCode;
}
public void setUpdateUserCode(String updateUserCode)
{
this.updateUserCode = updateUserCode;
}
public String getUpdateUserCode()
{
return updateUserCode;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getInboundOrderId() {
return inboundOrderId;
}
public void setInboundOrderId(String inboundOrderId) {
this.inboundOrderId = inboundOrderId;
}
public String getWarehousesName() {
return warehousesName;
}
public void setWarehousesName(String warehousesName) {
this.warehousesName = warehousesName;
}
public String getLocationName() {
return locationName;
}
public void setLocationName(String locationName) {
this.locationName = locationName;
}
public String getSapNo() {
return sapNo;
}
public void setSapNo(String sapNo) {
this.sapNo = sapNo;
}
public Double getUnitWeight() {
return unitWeight;
}
public void setUnitWeight(Double unitWeight) {
this.unitWeight = unitWeight;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("orderId", getOrderId())
.append("materialId", getMaterialId())
.append("batchId", getBatchId())
.append("warehouseId", getWarehouseId())
.append("locationId", getLocationId())
.append("plannedQuantity", getPlannedQuantity())
.append("actualQuantity", getActualQuantity())
.append("plannedPackages", getPlannedPackages())
.append("actualPackages", getActualPackages())
.append("divisor", getDivisor())
.append("labelColor", getLabelColor())
.append("voucherNumber", getVoucherNumber())
.append("unitPrice", getUnitPrice())
.append("itemStatus", getItemStatus())
.append("receivedAt", getReceivedAt())
.append("receivedBy", getReceivedBy())
.append("remark", getRemark())
.append("isUsed", getIsUsed())
.append("sortNo", getSortNo())
.append("createTime", getCreateTime())
.append("createUserCode", getCreateUserCode())
.append("updateTime", getUpdateTime())
.append("updateUserCode", getUpdateUserCode())
.append("materialName", getMaterialName())
.append("inboundOrderId", getInboundOrderId())
.append("warehousesName", getWarehousesName())
.append("locationName", getLocationName())
.append("sapNo", getSapNo())
.append("unitWeight", getUnitWeight())
.toString();
}
}
package com.ruoyi.inventory.domain.TO;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 入库单明细对象 inbound_order_items
*
* @author ruoyi
* @date 2025-12-02
*/
@Data
public class InboundItemsTO extends BaseEntity {
private static final long serialVersionUID = 1L;
// ======================== 匹配Excel表头的字段(按表头顺序) ========================
/** 日期 */
@Excel(name = "日期")
private String inboundDate; // 建议用LocalDateTime,若Excel是字符串格式则用String
/** SAP No */
@Excel(name = "SAP No")
private String sapNo;
/** 物料名称 */
@Excel(name = "物料名称")
private String materialName;
/** TS Code */
@Excel(name = "TS Code")
private String tsCode;
/** 批号 */
@Excel(name = "批号")
private String batchId;
/** 计划数量 */
@Excel(name = "计划数量")
private Long plannedQuantity;
/** 件重 */
@Excel(name = "件重")
private Double unitWeight;
/** 约数 */
@Excel(name = "约数")
private Long divisor;
/** 件数 */
@Excel(name = "件数")
private Long actualPackages;
/** 实发数量 */
@Excel(name = "实发数量")
private Long actualQuantity;
/** 重量 */
@Excel(name = "重量(成品)")
private Double weight;
/** 库位 */
@Excel(name = "库位")
private String locationId;
/** 仓库 */
@Excel(name = "仓库")
private String warehouseId;
/** 库位(成品) */
@Excel(name = "库位(成品)")
private String finishedLocationId;
/** 备注(TRDC) */
@Excel(name = "备注(TRDC)")
private String remarkTrdc;
/** 收货库位(正常) */
@Excel(name = "收货库位(正常)")
private String relocationId;
/** 标签颜色 */
@Excel(name = "标签颜色")
private Long labelColor;
/** 凭证号 */
@Excel(name = "凭证号")
private String voucherNumber;
/** 保温 */
@Excel(name = "保温")
private String keepWarm;
/** 危险类别 */
@Excel(name = "危险类别")
private String hazardId;
/** 单号 */
@Excel(name = "单号")
private String orderId;
/** 系统编号 */
@Excel(name = "系统编号")
private String systemNo;
/** 智观(客户订单号) */
@Excel(name = "智观(客户订单号)")
private String finishedSystemNo;
/** 客户订单号/PO号 */
@Excel(name = "客户订单号/PO号")
private String finishedOrderId;
/** 货主 */
@Excel(name = "货主")
private String ownerId;
/** 贴标数量 */
@Excel(name = "贴标数量")
private Long labelQuantity;
/** 订单类型 */
@Excel(name = "订单类型")
private Long orderType;
/** 单件重量 */
@Excel(name = "单件重量")
private Double packageWeight;
// ======================== 原有类中多的字段(放在末尾) ========================
/** 编号 */
private String id;
/** 入库单号 检索条件(主表Id) */
private String inboundOrderId;
/** 货物ID 字典,检索条件 */
private String materialId;
/** 仓库名称 */
private String warehousesName;
/** 库位名称 */
private String locationName;
/** 计划件数 暂无用 */
private Long plannedPackages;
/** 实际数量(原有) */
private Long actualQuantity1;
/** 实际件数 */
private Long actualPackages1;
/** 单价 */
private Long unitPrice;
/** 状态1-待收货 2-部分收货 3-已完成 暂无用 */
private Long itemStatus;
/** 收货时间 暂无用 */
private Long receivedAt;
/** 收货人 */
private String receivedBy;
/** 应用数据1使用0删除 删除用 */
private Long isUsed;
/** 排序 */
private Long sortNo;
/** 创建人编码 */
private String createUserCode;
/** 更新人编码 */
private String updateUserCode;
}
\ No newline at end of file
......@@ -102,7 +102,7 @@ public class InboundOrdersServiceImpl implements IInboundOrdersService
@Override
public int updateInboundOrders(InboundOrders inboundOrders)
{
inboundOrdersMapper.deleteInboundOrderItemsByOrderId(inboundOrders.getOrderId());
inboundOrdersMapper.deleteInboundOrderItemsByOrderId(inboundOrders.getId());
inboundOrders.setUpdateTime(DateUtils.getNowDate());
inboundOrders.setUpdateUserCode(SystemUtils.getUserName());
inboundOrders.setUpdateBy(SystemUtils.getUserName());
......
......@@ -11,6 +11,7 @@ import com.ruoyi.inventory.domain.TO.StocktakeItemsTo;
import com.ruoyi.inventory.domain.vo.InventoryExceedWarnVO;
import com.ruoyi.inventory.domain.vo.InventorySummaryVO;
import com.ruoyi.inventory.domain.vo.InventoryVo;
import com.ruoyi.inventory.mapper.InboundOrdersMapper;
import com.ruoyi.inventory.mapper.OutboundOrderItemsMapper;
import com.ruoyi.inventory.mapper.OutboundOrderLogMapper;
import org.apache.commons.collections4.CollectionUtils;
......@@ -39,6 +40,8 @@ public class InventoryServiceImpl implements IInventoryService
private OutboundOrdersServiceImpl outboundOrderMapper;
@Autowired
private InventoryTransactionsServiceImpl insertInventoryTransactions;
@Autowired
private InboundOrdersMapper inboundOrdersMapper;
......@@ -90,6 +93,12 @@ public class InventoryServiceImpl implements IInventoryService
return inventoryMapper.insertInventory(inventory);
}
/**
* 批量库存
*
* @param inventoryList 库存
* @return 结果
*/
@Override
public int insertInventoryList(List<Inventory> inventoryList) {
int count = 0;
......@@ -99,10 +108,12 @@ public class InventoryServiceImpl implements IInventoryService
inventory.setId(UUID.randomUUID().toString());
inventory.setCreateBy(SystemUtils.getUserName());
inventory.setCreateUserCode(SystemUtils.getUserName());
createInventoryInboundLog(inventory,inventory.getQuantity(),inventory.getCreateUserCode(),inventory.getCreateTime());
count = inventoryMapper.insertInventory(inventory);
}
return count;
}
/**
* 修改库存
*
......@@ -134,7 +145,6 @@ public class InventoryServiceImpl implements IInventoryService
Inventory inventory = new Inventory();
inventory.setLockedQuantity(lockedQuantity);
inventory.setId(inventoryId);
inventoryMapper.updateInventory(inventory);
}
return 1;
......@@ -170,7 +180,7 @@ public class InventoryServiceImpl implements IInventoryService
transactions.setId(IdUtils.simpleUUID()); // 确保IdUtils工具类存在,若无则替换为UUID.randomUUID().toString()
transactions.setTransactionType(2L); // 事务类型-出库
transactions.setBatchCode(outboundOrderItem.getBatchCode());
transactions.setUnitPrice(String.valueOf(outboundOrderItem.getUnitPrice()));
transactions.setUnitPrice(outboundOrderItem.getUnitPrice());
transactions.setInventoryId(inventory.getId()); // 库存表Id
transactions.setReferenceId(outboundOrderItem.getOutboundOrderId()); // 关联出库单主表ID
transactions.setReferenceItemId(outboundOrderItem.getId()); // 关联出库单明细ID
......@@ -196,6 +206,39 @@ public class InventoryServiceImpl implements IInventoryService
insertInventoryTransactions.insertInventoryTransactions(transactions);
}
//入库单确认入库日志
private void createInventoryInboundLog(Inventory inventory,
Long addQty, String createUser, Date createTime) {
InventoryTransactions transactions = new InventoryTransactions();
transactions.setId(IdUtils.simpleUUID()); // 确保IdUtils工具类存在,若无则替换为UUID.randomUUID().toString()
transactions.setTransactionType(1L); // 事务类型-入库
transactions.setBatchCode(inventory.getBatchId());
transactions.setUnitPrice(inventory.getUnitPrice());
transactions.setInventoryId(inventory.getId()); // 库存表Id
transactions.setReferenceId(inventory.getInboundOrderId()); // 关联出库单主表ID
transactions.setReferenceItemId(inventory.getId()); // 关联出库单明细ID
transactions.setMaterialId(inventory.getMaterialId());
transactions.setWarehouseId(inventory.getWarehousesId());
transactions.setLocationId(inventory.getLocationId());
transactions.setOwnerId(inventory.getOwnerId());
// 新建实体,查看该物料在库存中数量,避免其他条件干扰
Inventory inventoryBefore = new Inventory();
inventoryBefore.setMaterialId(inventory.getMaterialId());
inventoryBefore = inventoryMapper.selectInventory(inventoryBefore);
if (inventoryBefore == null) {
inventoryBefore = new Inventory();
inventoryBefore.setQuantity(0L);
}
transactions.setQuantityBefore(inventoryBefore.getQuantity());
transactions.setQuantityAfter(inventory.getQuantity() + addQty);
transactions.setQuantityChange(addQty);
transactions.setTransactionTime(createTime);
transactions.setOperatedBy(createUser);
// 插入日志
insertInventoryTransactions.insertInventoryTransactions(transactions);
}
@SerialExecution(group = "inventoryRefresh", fair = true)
@Override
......
......@@ -71,7 +71,7 @@
</select>
<resultMap type="com.ruoyi.inventory.domain.TO.InboundItemsAndMaterialName" id="InboundOrderItemsAndMnameResult">
<resultMap type="com.ruoyi.inventory.domain.TO.InboundItemsTO" id="InboundOrderItemsAndMnameResult">
<result property="id" column="id" />
<result property="orderId" column="order_id" />
<result property="materialId" column="material_id" />
......
......@@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<collection property="inboundOrderItemsList" ofType="InboundOrderItems" column="id" select="selectInboundOrderItemsList" />
</resultMap>
<resultMap type="com.ruoyi.inventory.domain.TO.InboundItemsAndMaterialName" id="InboundOrderItemsResult">
<resultMap type="com.ruoyi.inventory.domain.TO.InboundItemsTO" id="InboundOrderItemsResult">
<result property="id" column="id" />
<result property="orderId" column="order_id" />
<result property="materialId" column="material_id"/>
......@@ -82,7 +82,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="ownerId != null and ownerId != ''"> and owner_id = #{ownerId}</if>
<if test="orderStatus != null "> and order_status = #{orderStatus}</if>
<if test="inboundDate != null "> and inbound_date = #{inboundDate}</if>
<!-- 新增按照日期范围查询-->
<if test="inboundDateStart != null">
AND inbound_date &gt;= #{inboundDateStart}
</if>
<if test="inboundDateEnd != null">
AND inbound_date &lt;= #{inboundDateEnd}
</if>
<if test="orderType != null and orderType != ''"> and order_type = #{orderType}</if>
<if test="totalPlannedQuantity != null "> and total_planned_quantity = #{totalPlannedQuantity}</if>
<if test="totalActualQuantity != null "> and total_actual_quantity = #{totalActualQuantity}</if>
......@@ -215,13 +221,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<delete id="deleteInboundOrderItemsByOrderIds" parameterType="String">
delete from inbound_order_items where inbound_order_id in
<foreach item="orderId" collection="array" open="(" separator="," close=")">
#{orderId}
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteInboundOrderItemsByOrderId" parameterType="String">
delete from inbound_order_items where order_id = #{orderId}
delete from inbound_order_items where inbound_order_id = #{id}
</delete>
<insert id="batchInboundOrderItems">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论