Commit 27a81765 by wangchunyang
parents 257c641a 49d26362
......@@ -953,7 +953,7 @@ export default {
await batchAddInventory(row.inboundOrderItemsList)
// 第四步:操作成功提示
this.$modal.msgSuccess("确认成功")
// this.$modal.msgSuccess("确认成功")
this.$message.success('确认入库成功')
row.orderStatus = 2
updateInbound(row).then(() => {
......@@ -1009,7 +1009,7 @@ export default {
...item,
orderId: this.form.orderId, // 确保明细项有主表ID
batchId: this.form.batchId,
inboundOrderId: this.form.id || null
inboundOrderId: this.form.id || null,
}))
}
if (this.form.id != null) {
......
......@@ -150,7 +150,7 @@
>
<template slot-scope="scope">
<!-- 可编辑模式 -->
<template v-if="scope.row.editable && column.editable !== false">
<template v-if="scope.row.editable && column.editable !== false && isEditable !==false">
<!-- 仓库选择 -->
<template v-if="column.prop === 'warehousesName'">
<el-input
......@@ -606,8 +606,8 @@ export default {
remark: null,
editable: true,
inboundOrderId: null,
labelQuantity: 0,
tempId: Date.now() + Math.random()
}
this.displayData.push(newItem)
const totalPages = Math.ceil(this.displayData.length / this.queryParams.pageSize)
......
......@@ -22,6 +22,7 @@
<result property="itemStatus" column="item_status" />
<result property="receivedAt" column="received_at" />
<result property="receivedBy" column="received_by" />
<result property="labelQuantity" column="label_quantity"/>
<result property="remark" column="remark" />
<result property="isUsed" column="is_used" />
<result property="sortNo" column="sort_no" />
......@@ -35,7 +36,7 @@
<sql id="selectInboundOrderItemsVo">
select id, order_id, material_id, batch_id, warehouse_id, location_id, planned_quantity, actual_quantity, planned_packages, actual_packages, divisor, label_color, voucher_number, unit_price, item_status, received_at, received_by, remark, is_used, sort_no, create_time, create_user_code, update_time, update_user_code,inbound_order_id from inbound_order_items
select id, order_id, material_id, batch_id, warehouse_id, location_id, planned_quantity, actual_quantity, planned_packages, actual_packages, divisor, label_color, voucher_number, unit_price, item_status, received_at, received_by, label_quantity, remark, is_used, sort_no, create_time, create_user_code, update_time, update_user_code,inbound_order_id from inbound_order_items
</sql>
<select id="selectInboundOrderItemsList" parameterType="com.ruoyi.inventory.domain.InboundOrderItems" resultMap="InboundOrderItemsResult">
......@@ -84,6 +85,7 @@
<result property="locationId" column="location_id" />
<result property="locationName" column="location_name" />
<result property="plannedQuantity" column="planned_quantity" />
<result property="labelQuantity" column="label_quantity"/>
<result property="actualQuantity" column="actual_quantity" />
<result property="plannedPackages" column="planned_packages" />
<result property="actualPackages" column="actual_packages" />
......@@ -131,6 +133,7 @@
ii.item_status,
ii.received_at,
ii.received_by,
ii.label_quantity,
ii.remark,
ii.is_used,
ii.sort_no,
......@@ -197,6 +200,9 @@
<if test="receivedBy != null and receivedBy != ''">
and received_by = #{receivedBy}
</if>
<if test="labelQuantity != null and labelQuantity != ''">
and label_quantity = #{labelQuantity}
</if>
<if test="isUsed != null">
and is_used = #{isUsed}
</if>
......@@ -212,7 +218,7 @@
</where>
</select>
<!-- 添加入库明细sql 暂无用,新增明细的方法目前在主表的batchInboundOrderItems-->
<insert id="insertInboundOrderItems" parameterType="com.ruoyi.inventory.domain.InboundOrderItems">
insert into inbound_order_items
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -233,6 +239,7 @@
<if test="itemStatus != null">item_status,</if>
<if test="receivedAt != null">received_at,</if>
<if test="receivedBy != null">received_by,</if>
<if test="labelQuantity != null">label_quantity,</if>
<if test="remark != null">remark,</if>
<if test="isUsed != null">is_used,</if>
<if test="sortNo != null">sort_no,</if>
......@@ -260,6 +267,7 @@
<if test="itemStatus != null">#{itemStatus},</if>
<if test="receivedAt != null">#{receivedAt},</if>
<if test="receivedBy != null">#{receivedBy},</if>
<if test="labelQuantity != null">#{labelQuantity},</if>
<if test="remark != null">#{remark},</if>
<if test="isUsed != null">#{isUsed},</if>
<if test="sortNo != null">#{sortNo},</if>
......@@ -270,7 +278,7 @@
<if test="inboundOrderId != null">#{inboundOrderId},</if>
</trim>
</insert>
<!-- 修改明细,暂无用-->
<update id="updateInboundOrderItems" parameterType="com.ruoyi.inventory.domain.InboundOrderItems">
update inbound_order_items
<trim prefix="SET" suffixOverrides=",">
......@@ -290,6 +298,7 @@
<if test="itemStatus != null">item_status = #{itemStatus},</if>
<if test="receivedAt != null">received_at = #{receivedAt},</if>
<if test="receivedBy != null">received_by = #{receivedBy},</if>
<if test="labelQuantity != null">label_quantity = #{labelQuantity},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="isUsed != null">is_used = #{isUsed},</if>
<if test="sortNo != null">sort_no = #{sortNo},</if>
......@@ -313,7 +322,7 @@
</foreach>
</delete>
<!-- 入库统计的表格查询sql和映射字段 -->
<resultMap id="InboundDetailsResultMap" type="com.ruoyi.inventory.domain.vo.InboundDetailsVO">
<!-- 基础字段映射 -->
<result column="material_id" property="materialId" jdbcType="VARCHAR" />
......@@ -407,6 +416,6 @@
ioi.unit_price,
ioi.remark,
io.inbound_date
order by inbound_date desc,ioi.order_id asc,ioi.material_id asc
order by date(inbound_date) desc,ioi.order_id asc,ioi.material_id asc
</select>
</mapper>
\ No newline at end of file
......@@ -99,7 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createUserCode != null and createUserCode != ''"> and create_user_code = #{createUserCode}</if>
<if test="updateUserCode != null and updateUserCode != ''"> and update_user_code = #{updateUserCode}</if>
</where>
order by inbound_date desc,create_time desc
order by date(inbound_date) desc,create_time desc
</select>
<select id="selectInboundOrdersById" parameterType="String" resultMap="InboundOrdersInboundOrderItemsResult">
......@@ -233,9 +233,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<insert id="batchInboundOrderItems">
insert into inbound_order_items( id, order_id, material_id, batch_id, warehouse_id, location_id, planned_quantity, actual_quantity, planned_packages, actual_packages, divisor, label_color, voucher_number, unit_price, item_status, received_at, received_by, remark, is_used, sort_no, create_time, create_user_code, update_time, update_user_code, inbound_order_id) values
insert into inbound_order_items( id, order_id, material_id, batch_id, warehouse_id, location_id, planned_quantity, actual_quantity, planned_packages, actual_packages, divisor, label_color, voucher_number, unit_price, item_status, received_at, received_by, label_quantity, remark, is_used, sort_no, create_time, create_user_code, update_time, update_user_code, inbound_order_id) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.orderId}, #{item.materialId}, #{item.batchId}, #{item.warehouseId}, #{item.locationId}, #{item.plannedQuantity}, #{item.actualQuantity}, #{item.plannedPackages}, #{item.actualPackages}, #{item.divisor}, #{item.labelColor}, #{item.voucherNumber}, #{item.unitPrice}, #{item.itemStatus}, #{item.receivedAt}, #{item.receivedBy}, #{item.remark}, #{item.isUsed}, #{item.sortNo}, #{item.createTime}, #{item.createUserCode}, #{item.updateTime}, #{item.updateUserCode}, #{item.inboundOrderId})
( #{item.id}, #{item.orderId}, #{item.materialId}, #{item.batchId}, #{item.warehouseId}, #{item.locationId}, #{item.plannedQuantity}, #{item.actualQuantity}, #{item.plannedPackages}, #{item.actualPackages}, #{item.divisor}, #{item.labelColor}, #{item.voucherNumber}, #{item.unitPrice}, #{item.itemStatus}, #{item.receivedAt}, #{item.receivedBy}, #{item.labelQuantity}, #{item.remark}, #{item.isUsed}, #{item.sortNo}, #{item.createTime}, #{item.createUserCode}, #{item.updateTime}, #{item.updateUserCode}, #{item.inboundOrderId})
</foreach>
</insert>
......
......@@ -321,7 +321,7 @@
left join materials m on i.material_id = m.id
left join warehouses w on i.warehouses_id = w.id
left join storage_locations sl on i.location_id = sl.id
left join owners o on i.owner_id = o.owner_code
left join owners o on i.owner_id = o.id
</sql>
<select id="selectInventoryDetailList" parameterType="Inventory" resultMap="InventoryResult">
<include refid="selectInventoryDetailVo"/>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论