WMS:Web原材料出库审核和查询功能
master
xins 8 months ago
parent 4f29794e10
commit 687c644217

@ -5,7 +5,11 @@ import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.hw.common.core.constant.WmsConstants;
import com.hw.wms.domain.WmsBaseWarehouse;
import com.hw.wms.domain.vo.WmsRawOutstockAuditVo;
import com.hw.wms.service.IWmsBaseWarehouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
@ -37,6 +41,9 @@ public class WmsRawOutstockController extends BaseController
@Autowired
private IWmsRawOutstockService wmsRawOutstockService;
@Autowired
private IWmsBaseWarehouseService wmsBaseWarehouseService;
/**
*
*/
@ -45,10 +52,16 @@ public class WmsRawOutstockController extends BaseController
public TableDataInfo list(WmsRawOutstock wmsRawOutstock)
{
startPage();
List<WmsRawOutstock> list = wmsRawOutstockService.selectWmsRawOutstockList(wmsRawOutstock);
List<WmsRawOutstock> list = wmsRawOutstockService.selectWmsRawOutstockJoinList4Audit(wmsRawOutstock);
return getDataTable(list);
}
@GetMapping(value = "/getRawOutstockByTaskCode/{taskCode}")
public AjaxResult getRawOutstockByTaskCode(@PathVariable("taskCode") String taskCode) {
return success(wmsRawOutstockService.selectWmsRawOutstockByTaskCode(taskCode));
}
/**
*
*/
@ -134,15 +147,23 @@ public class WmsRawOutstockController extends BaseController
/**
*
* @param wmsRawOutstock
* @return
*
*/
@RequiresPermissions("wms:rawoutstock:audit:audit")
@Log(title = "原材料出库记录", businessType = BusinessType.AUDIT)
@PostMapping("/auditRawOutstock")
public AjaxResult auditRawOutstock(@RequestBody WmsRawOutstock wmsRawOutstock)
{
return toAjax(wmsRawOutstockService.applyRawOutstock(wmsRawOutstock));
@PostMapping(("/auditRawOutstock"))
public AjaxResult auditRawOutstock(@Validated @RequestBody WmsRawOutstockAuditVo wmsRawOutstockAuditVo) {
return success(wmsRawOutstockService.auditWmsRawOutstock(wmsRawOutstockAuditVo));
}
/**
* 使
*/
// @RequiresPermissions("wms:rawoutstock:query")
@GetMapping(value = "/getWarehouses")
public AjaxResult getWarehouses() {
WmsBaseWarehouse queryWarehouse = new WmsBaseWarehouse();
List<WmsBaseWarehouse> warehouses = wmsBaseWarehouseService.selectWmsBaseWarehouseList(queryWarehouse);
return success(warehouses);
}
}

@ -159,6 +159,14 @@ public class WmsProductInstock extends BaseEntity {
@Excel(name = "结束时间;agv处理结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;
/** 同步ERP状态(0:失败,1成功) */
@Excel(name = "同步ERP状态(0:失败,1成功)")
private String erpStatus;
/** 同步给ERP的数量 */
@Excel(name = "同步给ERP的数量")
private BigDecimal erpAmount;
/**
*
*/
@ -356,6 +364,22 @@ public class WmsProductInstock extends BaseEntity {
return endTime;
}
public String getErpStatus() {
return erpStatus;
}
public void setErpStatus(String erpStatus) {
this.erpStatus = erpStatus;
}
public BigDecimal getErpAmount() {
return erpAmount;
}
public void setErpAmount(BigDecimal erpAmount) {
this.erpAmount = erpAmount;
}
public List<WmsProductInstockDetail> getWmsProductInstockDetailList() {
return wmsProductInstockDetailList;
}

@ -159,6 +159,14 @@ public class WmsProductOutstock extends BaseEntity {
@Excel(name = "执行结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;
/** 同步ERP状态(0:失败,1成功) */
@Excel(name = "同步ERP状态(0:失败,1成功)")
private String erpStatus;
/** 同步给ERP的数量 */
@Excel(name = "同步给ERP的数量")
private BigDecimal erpAmount;
private String warehouseName;
private String materialCode;
@ -381,6 +389,22 @@ public class WmsProductOutstock extends BaseEntity {
return endTime;
}
public String getErpStatus() {
return erpStatus;
}
public void setErpStatus(String erpStatus) {
this.erpStatus = erpStatus;
}
public BigDecimal getErpAmount() {
return erpAmount;
}
public void setErpAmount(BigDecimal erpAmount) {
this.erpAmount = erpAmount;
}
public List<WmsProductOutstockDetail> getWmsProductOutstockDetailList() {
return wmsProductOutstockDetailList;
}

@ -75,7 +75,7 @@ public class WmsRawInstock extends BaseEntity
/** 同步给ERP的数量 */
@Excel(name = "同步给ERP的数量")
private String erpAmount;
private BigDecimal erpAmount;
/** 入库人 */
@Excel(name = "入库人")
@ -235,12 +235,12 @@ public class WmsRawInstock extends BaseEntity
{
return erpStatus;
}
public void setErpAmount(String erpAmount)
public void setErpAmount(BigDecimal erpAmount)
{
this.erpAmount = erpAmount;
}
public String getErpAmount()
public BigDecimal getErpAmount()
{
return erpAmount;
}

@ -183,6 +183,14 @@ public class WmsRawOutstock extends BaseEntity {
@Excel(name = "执行结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;
/** 同步ERP状态(0:失败,1成功) */
@Excel(name = "同步ERP状态(0:失败,1成功)")
private String erpStatus;
/** 同步给ERP的数量 */
@Excel(name = "同步给ERP的数量")
private BigDecimal erpAmount;
private String warehouseName;
private String materialCode;
@ -421,6 +429,22 @@ public class WmsRawOutstock extends BaseEntity {
this.beginTime = beginTime;
}
public String getErpStatus() {
return erpStatus;
}
public void setErpStatus(String erpStatus) {
this.erpStatus = erpStatus;
}
public BigDecimal getErpAmount() {
return erpAmount;
}
public void setErpAmount(BigDecimal erpAmount) {
this.erpAmount = erpAmount;
}
public Date getBeginTime() {
return beginTime;
}

@ -121,6 +121,14 @@ public class WmsRawReturn extends BaseEntity
@Excel(name = "执行结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;
/** 同步ERP状态(0:失败,1成功) */
@Excel(name = "同步ERP状态(0:失败,1成功)")
private String erpStatus;
/** 同步给ERP的数量 */
@Excel(name = "同步给ERP的数量")
private BigDecimal erpAmount;
private String warehouseName;
private String materialName;
@ -359,6 +367,22 @@ public class WmsRawReturn extends BaseEntity
return endTime;
}
public String getErpStatus() {
return erpStatus;
}
public void setErpStatus(String erpStatus) {
this.erpStatus = erpStatus;
}
public BigDecimal getErpAmount() {
return erpAmount;
}
public void setErpAmount(BigDecimal erpAmount) {
this.erpAmount = erpAmount;
}
public List<WmsRawReturnDetail> getWmsRawReturnDetailList()
{
return wmsRawReturnDetailList;

@ -16,6 +16,8 @@ public class WmsRawOutstockAuditReturnVo {
private String taskCode;
private WmsRawOutstock wmsRawOutstock;
/**
*
*/

@ -101,9 +101,11 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
public WmsRawOutstockAuditReturnVo selectWmsRawOutstockByTaskCode(String taskCode) {
WmsRawOutstock queryRawOutstock = new WmsRawOutstock();
queryRawOutstock.setTaskCode(taskCode);
queryRawOutstock.setAuditStatus(WmsConstants.WMS_AUDIT_STATUS_TOAUDIT);
// queryRawOutstock.setAuditStatus(WmsConstants.WMS_AUDIT_STATUS_TOAUDIT);
List<WmsRawOutstock> wmsRawOutstocks = wmsRawOutstockMapper.selectWmsRawOutstockJoinMaterialList(queryRawOutstock);
WmsRawOutstock wmsRawOutStock = wmsRawOutstocks.get(0);
WmsRawOutstockAuditReturnVo wmsRawOutstockAuditReturnVo = new WmsRawOutstockAuditReturnVo();
wmsRawOutstockAuditReturnVo.setWmsRawOutstock(wmsRawOutStock);
wmsRawOutstockAuditReturnVo.setWmsRawOutstockDetailList(wmsRawOutstocks);
return wmsRawOutstockAuditReturnVo;
}

@ -30,6 +30,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateDate" column="update_date" />
<result property="beginTime" column="begin_time" />
<result property="endTime" column="end_time" />
<result property="erpStatus" column="erp_status" />
<result property="erpAmount" column="erp_amount" />
</resultMap>
<resultMap id="WmsProductInstockWmsProductInstockDetailResult" type="WmsProductInstock" extends="WmsProductInstockResult">
@ -55,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectWmsProductInstockVo">
select product_instock_id, task_code, warehouse_id, location_code, product_type, operation_type, plan_code, plan_detail_code, instock_type, product_id, product_batch, instock_amount, pallet_info_code, apply_reason, audit_reason, audit_status, execute_status, apply_by, apply_date, audit_by, audit_date, update_by, update_date, begin_time, end_time from wms_product_instock
select product_instock_id, task_code, warehouse_id, location_code, product_type, operation_type, plan_code, plan_detail_code, instock_type, product_id, product_batch, instock_amount, pallet_info_code, apply_reason, audit_reason, audit_status, execute_status, apply_by, apply_date, audit_by, audit_date, update_by, update_date, begin_time, end_time, erp_status, erp_amount from wms_product_instock
</sql>
<select id="selectWmsProductInstockList" parameterType="WmsProductInstock" resultMap="WmsProductInstockResult">
@ -84,10 +86,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectWmsProductInstockByProductInstockId" parameterType="Long" resultMap="WmsProductInstockWmsProductInstockDetailResult">
select a.product_instock_id, a.task_code, a.warehouse_id, a.location_code, a.product_type, a.operation_type, a.plan_code, a.plan_detail_code, a.instock_type, a.apply_reason, a.audit_reason, a.audit_status, a.execute_status, a.apply_by, a.apply_date, a.audit_by, a.audit_date, a.update_by, a.update_date, a.begin_time, a.end_time,
b.product_instock_detail_id as sub_product_instock_detail_id, b.product_instock_id as sub_product_instock_id, b.location_code as sub_location_code, b.product_id as sub_product_id, b.product_barcode as sub_product_barcode, b.product_batch as sub_product_batch, b.execute_status as sub_execute_status, b.erp_status as sub_erp_status, b.plan_amount as sub_plan_amount, b.instock_amount as sub_instock_amount, b.instock_by as sub_instock_by, b.instock_date as sub_instock_date, b.instock_way as sub_instock_way, b.update_by as sub_update_by, b.update_date as sub_update_date
select a.product_instock_id, a.task_code, a.warehouse_id, a.location_code, a.product_type, a.operation_type, a.plan_code, a.plan_detail_code, a.instock_type, a.product_id, a.product_batch, a.instock_amount, a.pallet_info_code, a.apply_reason, a.audit_reason, a.audit_status, a.execute_status, a.apply_by, a.apply_date, a.audit_by, a.audit_date, a.update_by, a.update_date, a.begin_time, a.end_time, a.erp_status, a.erp_amount,
b.product_instock_detail_id as sub_product_instock_detail_id, b.product_instock_id as sub_product_instock_id, b.location_code as sub_location_code, b.product_id as sub_product_id, b.product_barcode as sub_product_barcode, b.product_batch as sub_product_batch, b.execute_status as sub_execute_status, b.erp_status as sub_erp_status, b.erp_amount as sub_erp_amount, b.plan_amount as sub_plan_amount, b.instock_amount as sub_instock_amount, b.instock_by as sub_instock_by, b.instock_date as sub_instock_date, b.instock_way as sub_instock_way, b.update_by as sub_update_by, b.update_date as sub_update_date
from wms_product_instock a
left join wms_product_instock_detail b on b.product_instock_id = a.product_instock_id
left join wms_product_instock_detail b on b.product_instock_id = a.product_instock_id
where a.product_instock_id = #{productInstockId}
</select>
@ -118,6 +120,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateDate != null">update_date,</if>
<if test="beginTime != null">begin_time,</if>
<if test="endTime != null">end_time,</if>
<if test="erpStatus != null">erp_status,</if>
<if test="erpAmount != null">erp_amount,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskCode != null">#{taskCode},</if>
@ -144,6 +148,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateDate != null">#{updateDate},</if>
<if test="beginTime != null">#{beginTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="erpStatus != null">#{erpStatus},</if>
<if test="erpAmount != null">#{erpAmount},</if>
</trim>
</insert>
@ -174,10 +180,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateDate != null">update_date = #{updateDate},</if>
<if test="beginTime != null">begin_time = #{beginTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="erpStatus != null">erp_status = #{erpStatus},</if>
<if test="erpAmount != null">erp_amount = #{erpAmount},</if>
</trim>
where product_instock_id = #{productInstockId}
</update>
<delete id="deleteWmsProductInstockByProductInstockId" parameterType="Long">
delete from wms_product_instock where product_instock_id = #{productInstockId}
</delete>

@ -32,6 +32,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateDate" column="update_date" />
<result property="beginTime" column="begin_time" />
<result property="endTime" column="end_time" />
<result property="erpStatus" column="erp_status" />
<result property="erpAmount" column="erp_amount" />
<result property="warehouseName" column="warehouse_name" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
@ -57,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectWmsProductOutstockVo">
select product_outstock_id, task_code, warehouse_id, location_code, product_type,operation_type, outstock_type, plan_code, plan_detail_code,saleorder_code,project_no, product_id,apply_qty,outstock_qty,apply_reason, audit_reason, audit_status, execute_status, apply_by, apply_date, audit_by, audit_date, update_by, update_date, begin_time, end_time from wms_product_outstock
select product_outstock_id, task_code, warehouse_id, location_code, product_type, operation_type, outstock_type, plan_code, plan_detail_code, sale_order_id, saleorder_code, project_no, product_id, product_batch, pallet_info_code, end_station_code, apply_qty, outstock_qty, apply_reason, audit_reason, audit_status, execute_status, apply_by, apply_date, audit_by, audit_date, update_by, update_date, begin_time, end_time, erp_status, erp_amount from wms_product_outstock
</sql>
<select id="selectWmsProductOutstockList" parameterType="WmsProductOutstock" resultMap="WmsProductOutstockResult">
@ -86,13 +89,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectWmsProductOutstockByProductOutstockId" parameterType="Long" resultMap="WmsProductOutstockWmsProductOutstockDetailResult">
select a.product_outstock_id, a.task_code, a.warehouse_id, a.location_code, a.product_type, a.operation_type, a.outstock_type, a.plan_code, a.plan_detail_code, a.product_id,a.apply_qty,a.apply_reason, a.audit_reason, a.audit_status, a.execute_status, a.apply_by, a.apply_date, a.audit_by, a.audit_date, a.update_by, a.update_date, a.begin_time, a.end_time,
b.product_outstock_detail_id as sub_product_outstock_detail_id, b.product_outstock_id as sub_product_outstock_id, b.warehouse_id as sub_warehouse_id, b.location_code as sub_location_code, b.product_id as sub_product_id, b.outstock_amount as sub_outstock_amount, b.execute_status as sub_execute_status, b.erp_status as sub_erp_status, b.update_by as sub_update_by, b.update_date as sub_update_date, b.begin_time as sub_begin_time, b.end_time as sub_end_time
select a.product_outstock_id, a.task_code, a.warehouse_id, a.location_code, a.product_type, a.operation_type, a.outstock_type, a.plan_code, a.plan_detail_code, a.sale_order_id, a.saleorder_code, a.project_no, a.product_id, a.product_batch, a.pallet_info_code, a.end_station_code, a.apply_qty, a.outstock_qty, a.apply_reason, a.audit_reason, a.audit_status, a.execute_status, a.apply_by, a.apply_date, a.audit_by, a.audit_date, a.update_by, a.update_date, a.begin_time, a.end_time, a.erp_status, a.erp_amount,
b.product_outstock_detail_id as sub_product_outstock_detail_id, b.product_outstock_id as sub_product_outstock_id, b.warehouse_id as sub_warehouse_id, b.location_code as sub_location_code, b.product_barcode as sub_product_barcode, b.product_batch as sub_product_batch, b.product_id as sub_product_id, b.plan_amount as sub_plan_amount, b.outstock_amount as sub_outstock_amount, b.execute_status as sub_execute_status, b.erp_status as sub_erp_status, b.erp_amount as sub_erp_amount, b.update_by as sub_update_by, b.update_date as sub_update_date, b.begin_time as sub_begin_time, b.end_time as sub_end_time
from wms_product_outstock a
left join wms_product_outstock_detail b on b.product_outstock_id = a.product_outstock_id
left join wms_product_outstock_detail b on b.product_outstock_id = a.product_outstock_id
where a.product_outstock_id = #{productOutstockId}
</select>
<insert id="insertWmsProductOutstock" parameterType="WmsProductOutstock" useGeneratedKeys="true" keyProperty="productOutstockId">
insert into wms_product_outstock
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -104,15 +108,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="outstockType != null and outstockType != ''">outstock_type,</if>
<if test="planCode != null">plan_code,</if>
<if test="planDetailCode != null">plan_detail_code,</if>
<if test="saleOrderId != null">sale_order_id,</if>
<if test="saleorderCode != null">saleorder_code,</if>
<if test="projectNo != null">project_no,</if>
<if test="productId != null">product_id,</if>
<if test="productBatch != null">product_batch,</if>
<if test="palletInfoCode != null">pallet_info_code,</if>
<if test="endStationCode != null">end_station_code,</if>
<if test="applyQty != null">apply_qty,</if>
<if test="outstockQty != null">outstock_qty,</if>
<if test="applyReason != null">apply_reason,</if>
<if test="auditReason != null">audit_reason,</if>
<if test="auditStatus != null">audit_status,</if>
<if test="executeStatus != null">execute_status,</if>
<if test="auditStatus != null and auditStatus != ''">audit_status,</if>
<if test="executeStatus != null and executeStatus != ''">execute_status,</if>
<if test="applyBy != null">apply_by,</if>
<if test="applyDate != null">apply_date,</if>
<if test="auditBy != null">audit_by,</if>
@ -121,7 +129,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateDate != null">update_date,</if>
<if test="beginTime != null">begin_time,</if>
<if test="endTime != null">end_time,</if>
</trim>
<if test="erpStatus != null">erp_status,</if>
<if test="erpAmount != null">erp_amount,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskCode != null">#{taskCode},</if>
<if test="warehouseId != null">#{warehouseId},</if>
@ -131,15 +141,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="outstockType != null and outstockType != ''">#{outstockType},</if>
<if test="planCode != null">#{planCode},</if>
<if test="planDetailCode != null">#{planDetailCode},</if>
<if test="saleOrderId != null">#{saleOrderId},</if>
<if test="saleorderCode != null">#{saleorderCode},</if>
<if test="projectNo != null">#{projectNo},</if>
<if test="productId != null">#{productId},</if>
<if test="productBatch != null">#{productBatch},</if>
<if test="palletInfoCode != null">#{palletInfoCode},</if>
<if test="endStationCode != null">#{endStationCode},</if>
<if test="applyQty != null">#{applyQty},</if>
<if test="outstockQty != null">#{outstockQty},</if>
<if test="applyReason != null">#{applyReason},</if>
<if test="auditReason != null">#{auditReason},</if>
<if test="auditStatus != null">#{auditStatus},</if>
<if test="executeStatus != null">#{executeStatus},</if>
<if test="auditStatus != null and auditStatus != ''">#{auditStatus},</if>
<if test="executeStatus != null and executeStatus != ''">#{executeStatus},</if>
<if test="applyBy != null">#{applyBy},</if>
<if test="applyDate != null">#{applyDate},</if>
<if test="auditBy != null">#{auditBy},</if>
@ -148,7 +162,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateDate != null">#{updateDate},</if>
<if test="beginTime != null">#{beginTime},</if>
<if test="endTime != null">#{endTime},</if>
</trim>
<if test="erpStatus != null">#{erpStatus},</if>
<if test="erpAmount != null">#{erpAmount},</if>
</trim>
</insert>
<update id="updateWmsProductOutstock" parameterType="WmsProductOutstock">
@ -162,15 +178,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="outstockType != null and outstockType != ''">outstock_type = #{outstockType},</if>
<if test="planCode != null">plan_code = #{planCode},</if>
<if test="planDetailCode != null">plan_detail_code = #{planDetailCode},</if>
<if test="saleOrderId != null">sale_order_id = #{saleOrderId},</if>
<if test="saleorderCode != null">saleorder_code = #{saleorderCode},</if>
<if test="projectNo != null">project_no = #{projectNo},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="productBatch != null">product_batch = #{productBatch},</if>
<if test="palletInfoCode != null">pallet_info_code = #{palletInfoCode},</if>
<if test="endStationCode != null">end_station_code = #{endStationCode},</if>
<if test="applyQty != null">apply_qty = #{applyQty},</if>
<if test="outstockQty != null">outstock_qty = #{outstockQty},</if>
<if test="applyReason != null">apply_reason = #{applyReason},</if>
<if test="auditReason != null">audit_reason = #{auditReason},</if>
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
<if test="executeStatus != null">execute_status = #{executeStatus},</if>
<if test="auditStatus != null and auditStatus != ''">audit_status = #{auditStatus},</if>
<if test="executeStatus != null and executeStatus != ''">execute_status = #{executeStatus},</if>
<if test="applyBy != null">apply_by = #{applyBy},</if>
<if test="applyDate != null">apply_date = #{applyDate},</if>
<if test="auditBy != null">audit_by = #{auditBy},</if>
@ -179,6 +199,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateDate != null">update_date = #{updateDate},</if>
<if test="beginTime != null">begin_time = #{beginTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="erpStatus != null">erp_status = #{erpStatus},</if>
<if test="erpAmount != null">erp_amount = #{erpAmount},</if>
</trim>
where product_outstock_id = #{productOutstockId}
</update>

@ -33,6 +33,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateDate" column="update_date" />
<result property="beginTime" column="begin_time" />
<result property="endTime" column="end_time" />
<result property="erpStatus" column="erp_status" />
<result property="erpAmount" column="erp_amount" />
<result property="warehouseName" column="warehouse_name" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
@ -70,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectWmsRawOutstockVo">
select raw_outstock_id, task_code, warehouse_id, location_code, order_id, plan_code, plan_detail_code, station_id, product_id, material_batch, pallet_info_code, outstock_amount,real_outstock_amount, end_station_code, operation_type, task_type, apply_reason, audit_reason, audit_status, execute_status, apply_by, apply_date, audit_by, audit_date, update_by, update_date, begin_time, end_time from wms_raw_outstock
select raw_outstock_id, task_code, warehouse_id, location_code, order_id, plan_code, plan_detail_code, station_id, product_id, material_batch, pallet_info_code, outstock_amount, real_outstock_amount, end_station_code, operation_type, task_type, apply_reason, audit_reason, audit_status, execute_status, apply_by, apply_date, audit_by, audit_date, update_by, update_date, begin_time, end_time, erp_status, erp_amount from wms_raw_outstock
</sql>
<select id="selectWmsRawOutstockList" parameterType="WmsRawOutstock" resultMap="WmsRawOutstockResult">
@ -102,8 +105,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectWmsRawOutstockByRawOutstockId" parameterType="Long" resultMap="WmsRawOutstockWmsRawOutstockDetailResult">
select a.raw_outstock_id, a.task_code, a.warehouse_id, a.location_code, a.order_id, a.plan_code, a.plan_detail_code, a.station_id, a.product_id, a.material_batch, a.pallet_info_code, a.outstock_amount, a.end_station_code, a.operation_type, a.task_type, a.apply_reason, a.audit_reason, a.audit_status, a.execute_status, a.apply_by, a.apply_date, a.audit_by, a.audit_date, a.update_by, a.update_date, a.begin_time, a.end_time,
b.raw_outstock_detail_id as sub_raw_outstock_detail_id, b.raw_outstock_id as sub_raw_outstock_id, b.task_code as sub_task_code, b.location_code as sub_location_code, b.material_barcode as sub_material_barcode, b.material_id as sub_material_id, b.instock_batch as sub_instock_batch, b.material_production_date as sub_material_production_date, b.plan_amount as sub_plan_amount, b.outstock_amount as sub_outstock_amount, b.execute_status as sub_execute_status, b.erp_status as sub_erp_status, b.erp_amount as sub_erp_amount, b.outstock_person as sub_outstock_person, b.outstock_time as sub_outstock_time, b.outstock_way as sub_outstock_way, b.machine_name as sub_machine_name, b.quality_status as sub_quality_status, b.create_by as sub_create_by, b.create_date as sub_create_date, b.update_by as sub_update_by, b.update_date as sub_update_date, b.stack_amount as sub_stack_amount
select a.raw_outstock_id, a.task_code, a.warehouse_id, a.location_code, a.order_id, a.plan_code, a.plan_detail_code, a.station_id, a.product_id, a.material_batch, a.pallet_info_code, a.outstock_amount, a.real_outstock_amount, a.end_station_code, a.operation_type, a.task_type, a.apply_reason, a.audit_reason, a.audit_status, a.execute_status, a.apply_by, a.apply_date, a.audit_by, a.audit_date, a.update_by, a.update_date, a.begin_time, a.end_time, a.erp_status, a.erp_amount,
b.raw_outstock_detail_id as sub_raw_outstock_detail_id, b.raw_outstock_id as sub_raw_outstock_id, b.task_code as sub_task_code, b.warehouse_id as sub_warehouse_id, b.location_code as sub_location_code, b.material_barcode as sub_material_barcode, b.material_id as sub_material_id, b.instock_batch as sub_instock_batch, b.material_production_date as sub_material_production_date, b.plan_amount as sub_plan_amount, b.outstock_amount as sub_outstock_amount, b.execute_status as sub_execute_status, b.erp_status as sub_erp_status, b.erp_amount as sub_erp_amount, b.outstock_person as sub_outstock_person, b.outstock_time as sub_outstock_time, b.outstock_way as sub_outstock_way, b.machine_name as sub_machine_name, b.quality_status as sub_quality_status, b.create_by as sub_create_by, b.create_date as sub_create_date, b.update_by as sub_update_by, b.update_date as sub_update_date, b.stack_amount as sub_stack_amount
from wms_raw_outstock a
left join wms_raw_outstock_detail b on b.raw_outstock_id = a.raw_outstock_id
where a.raw_outstock_id = #{rawOutstockId}
@ -123,6 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialBatch != null">material_batch,</if>
<if test="palletInfoCode != null">pallet_info_code,</if>
<if test="outstockAmount != null">outstock_amount,</if>
<if test="realOutstockAmount != null">real_outstock_amount,</if>
<if test="endStationCode != null">end_station_code,</if>
<if test="operationType != null and operationType != ''">operation_type,</if>
<if test="taskType != null and taskType != ''">task_type,</if>
@ -138,6 +142,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateDate != null">update_date,</if>
<if test="beginTime != null">begin_time,</if>
<if test="endTime != null">end_time,</if>
<if test="erpStatus != null">erp_status,</if>
<if test="erpAmount != null">erp_amount,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskCode != null and taskCode != ''">#{taskCode},</if>
@ -151,6 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialBatch != null">#{materialBatch},</if>
<if test="palletInfoCode != null">#{palletInfoCode},</if>
<if test="outstockAmount != null">#{outstockAmount},</if>
<if test="realOutstockAmount != null">#{realOutstockAmount},</if>
<if test="endStationCode != null">#{endStationCode},</if>
<if test="operationType != null and operationType != ''">#{operationType},</if>
<if test="taskType != null and taskType != ''">#{taskType},</if>
@ -166,6 +173,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateDate != null">#{updateDate},</if>
<if test="beginTime != null">#{beginTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="erpStatus != null">#{erpStatus},</if>
<if test="erpAmount != null">#{erpAmount},</if>
</trim>
</insert>
@ -199,6 +208,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateDate != null">update_date = #{updateDate},</if>
<if test="beginTime != null">begin_time = #{beginTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="erpStatus != null">erp_status = #{erpStatus},</if>
<if test="erpAmount != null">erp_amount = #{erpAmount},</if>
</trim>
where raw_outstock_id = #{rawOutstockId}
</update>
@ -245,18 +256,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectWmsRawOutstockJoinList4Audit" parameterType="WmsRawOutstock" resultMap="WmsRawOutstockResult">
select wro.task_code, wro.warehouse_id, wro.apply_reason, wro.apply_by, wro.apply_date,wro.plan_code,wro.plan_detail_code,
select wro.task_code, wro.warehouse_id, wro.apply_reason, wro.apply_by, wro.apply_date,wro.plan_code,wro.plan_detail_code,wro.audit_status,
wbw.warehouse_name
from wms_raw_outstock wro left join wms_base_warehouse wbw on wro.warehouse_id = wbw.warehouse_id
<where>
<if test="taskCode != null and taskCode != ''"> and wro.task_code like concat('%', #{taskCode}, '%')</if>
<if test="warehouseId != null "> and wro.warehouse_id = #{warehouseId}</if>
<if test="planCode != null "> and wro.plan_code like concat('%', #{planCode}, '%')</if>
<if test="planDetailCode != null "> and wro.plan_detail_code like concat('%', #{planDetailCode}, '%')</if>
<if test="applyReason != null and applyReason != ''"> and wro.apply_reason like concat('%', #{applyReason}, '%')</if>
<if test="auditStatus != null and auditStatus != ''"> and wro.audit_status = #{auditStatus}</if>
<if test="applyBy != null and applyBy != ''"> and wro.apply_by like concat('%', #{applyBy}, '%')</if>
</where>
group by wro.task_code,wro.warehouse_id, wro.apply_reason, wro.apply_by, wro.apply_date,wro.plan_code,wro.plan_detail_code
group by wro.task_code,wro.warehouse_id, wro.apply_reason, wro.apply_by, wro.apply_date,wro.plan_code,wro.plan_detail_code,wro.audit_status
</select>
<!--as转换是为了兼容PDA转换-->
<select id="selectWmsRawOutstockJoinMaterialList" parameterType="WmsRawOutstock" resultMap="WmsRawOutstockResult">
select wro.raw_outstock_id as raw_outstock_detail_id, wro.task_code,wro.location_code,wro.material_batch as instock_batch,wro.outstock_amount as plan_amount,wro.real_outstock_amount as outstock_amount,wro.apply_by,wro.apply_date,
select wro.raw_outstock_id as raw_outstock_detail_id, wro.task_code,wro.location_code,wro.material_batch as instock_batch,wro.outstock_amount as plan_amount,wro.real_outstock_amount as outstock_amount,
wro.apply_by,wro.apply_date,wro.apply_reason,wro.audit_by,wro.audit_date,wro.audit_reason,wro.plan_code,wro.plan_detail_code,wro.audit_status,
wro.execute_status,wro.erp_status,wro.erp_amount,
mbmi.material_code,mbmi.material_name
from wms_raw_outstock wro left join mes_base_material_info mbmi on wro.product_id = mbmi.material_id
<where>

@ -32,6 +32,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateDate" column="update_date" />
<result property="beginTime" column="begin_time" />
<result property="endTime" column="end_time" />
<result property="erpStatus" column="erp_status" />
<result property="erpAmount" column="erp_amount" />
<result property="warehouseName" column="warehouse_name" />
</resultMap>
@ -64,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectWmsRawReturnVo">
select raw_return_id, task_code, warehouse_id, location_code, plan_code, plan_detail_code, product_id, material_id, plan_amount, return_amount, operation_type, task_type, apply_reason, audit_reason, audit_status, execute_status, apply_by, apply_date, audit_by, audit_date, update_by, update_date, begin_time, end_time, material_barcode, end_station_code, batch_code from wms_raw_return
select raw_return_id, task_code, warehouse_id, location_code, plan_code, plan_detail_code, product_id, material_id, material_barcode, batch_code, plan_amount, return_amount, operation_type, task_type, end_station_code, apply_reason, audit_reason, audit_status, execute_status, apply_by, apply_date, audit_by, audit_date, update_by, update_date, begin_time, end_time, erp_status, erp_amount from wms_raw_return
</sql>
<select id="selectWmsRawReturnList" parameterType="WmsRawReturn" resultMap="WmsRawReturnResult">
@ -93,12 +96,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectWmsRawReturnByRawReturnId" parameterType="Long" resultMap="WmsRawReturnWmsRawReturnDetailResult">
select a.raw_return_id, a.task_code, a.warehouse_id, a.location_code, a.plan_code, a.plan_detail_code, a.product_id, a.operation_type, a.task_type, a.apply_reason, a.audit_reason, a.audit_status, a.execute_status, a.apply_by, a.apply_date, a.audit_by, a.audit_date,a.plan_amount,a.return_amount, a.begin_time, a.end_time,a.material_id,a.product_id,
b.raw_return_detail_id as sub_raw_return_detail_id, b.raw_return_id as sub_raw_return_id, b.location_code as sub_location_code, b.material_barcode as sub_material_barcode, b.material_id as sub_material_id, b.instock_batch as sub_instock_batch, b.material_production_Date as sub_material_production_Date, b.plan_amount as sub_plan_amount, b.return_amount as sub_return_amount,
b.execute_status as sub_execute_status, b.erp_status as sub_erp_status, b.return_person as sub_return_person, b.return_time as sub_return_time, b.return_way as sub_return_way, b.machine_name as sub_machine_name, b.quality_status as sub_quality_status, b.create_by as sub_create_by, b.stack_amount as sub_stack_amount
select a.raw_return_id, a.task_code, a.warehouse_id, a.location_code, a.plan_code, a.plan_detail_code, a.product_id, a.material_id, a.material_barcode, a.batch_code, a.plan_amount, a.return_amount, a.operation_type, a.task_type, a.end_station_code, a.apply_reason, a.audit_reason, a.audit_status, a.execute_status, a.apply_by, a.apply_date, a.audit_by, a.audit_date, a.update_by, a.update_date, a.begin_time, a.end_time, a.erp_status, a.erp_amount,
b.raw_return_detail_id as sub_raw_return_detail_id, b.raw_return_id as sub_raw_return_id, b.location_code as sub_location_code, b.material_barcode as sub_material_barcode, b.material_id as sub_material_id, b.instock_batch as sub_instock_batch, b.material_production_date as sub_material_production_date, b.plan_amount as sub_plan_amount, b.return_amount as sub_return_amount, b.execute_status as sub_execute_status, b.erp_status as sub_erp_status, b.erp_amount as sub_erp_amount, b.return_person as sub_return_person, b.return_time as sub_return_time, b.return_way as sub_return_way, b.machine_name as sub_machine_name, b.quality_status as sub_quality_status, b.create_by as sub_create_by, b.create_date as sub_create_date, b.update_by as sub_update_by, b.update_date as sub_update_date, b.stack_amount as sub_stack_amount
from wms_raw_return a
left join wms_raw_return_detail b on b.raw_return_id = a.raw_return_id
left join wms_raw_return_detail b on b.raw_return_id = a.raw_return_id
where a.raw_return_id = #{rawReturnId}
</select>
@ -112,10 +113,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="planDetailCode != null">plan_detail_code,</if>
<if test="productId != null">product_id,</if>
<if test="materialId != null">material_id,</if>
<if test="materialBarcode != null">material_barcode,</if>
<if test="batchCode != null">batch_code,</if>
<if test="planAmount != null">plan_amount,</if>
<if test="returnAmount != null">return_amount,</if>
<if test="operationType != null and operationType != ''">operation_type,</if>
<if test="taskType != null and taskType != ''">task_type,</if>
<if test="endStationCode != null">end_station_code,</if>
<if test="applyReason != null">apply_reason,</if>
<if test="auditReason != null">audit_reason,</if>
<if test="auditStatus != null and auditStatus != ''">audit_status,</if>
@ -128,9 +132,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateDate != null">update_date,</if>
<if test="beginTime != null">begin_time,</if>
<if test="endTime != null">end_time,</if>
<if test="materialBarcode != null">material_barcode,</if>
<if test="endStationCode != null">end_station_code,</if>
<if test="batchCode != null">batch_code,</if>
<if test="erpStatus != null">erp_status,</if>
<if test="erpAmount != null">erp_amount,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskCode != null and taskCode != ''">#{taskCode},</if>
@ -140,10 +143,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="planDetailCode != null">#{planDetailCode},</if>
<if test="productId != null">#{productId},</if>
<if test="materialId != null">#{materialId},</if>
<if test="materialBarcode != null">#{materialBarcode},</if>
<if test="batchCode != null">#{batchCode},</if>
<if test="planAmount != null">#{planAmount},</if>
<if test="returnAmount != null">#{returnAmount},</if>
<if test="operationType != null and operationType != ''">#{operationType},</if>
<if test="taskType != null and taskType != ''">#{taskType},</if>
<if test="endStationCode != null">#{endStationCode},</if>
<if test="applyReason != null">#{applyReason},</if>
<if test="auditReason != null">#{auditReason},</if>
<if test="auditStatus != null and auditStatus != ''">#{auditStatus},</if>
@ -156,9 +162,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateDate != null">#{updateDate},</if>
<if test="beginTime != null">#{beginTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="materialBarcode != null">#{materialBarcode},</if>
<if test="endStationCode != null">#{endStationCode},</if>
<if test="batchCode != null">#{batchCode},</if>
<if test="erpStatus != null">#{erpStatus},</if>
<if test="erpAmount != null">#{erpAmount},</if>
</trim>
</insert>
@ -172,10 +177,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="planDetailCode != null">plan_detail_code = #{planDetailCode},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="materialId != null">material_id = #{materialId},</if>
<if test="materialBarcode != null">material_barcode = #{materialBarcode},</if>
<if test="batchCode != null">batch_code = #{batchCode},</if>
<if test="planAmount != null">plan_amount = #{planAmount},</if>
<if test="returnAmount != null">return_amount = #{returnAmount},</if>
<if test="operationType != null and operationType != ''">operation_type = #{operationType},</if>
<if test="taskType != null and taskType != ''">task_type = #{taskType},</if>
<if test="endStationCode != null">end_station_code = #{endStationCode},</if>
<if test="applyReason != null">apply_reason = #{applyReason},</if>
<if test="auditReason != null">audit_reason = #{auditReason},</if>
<if test="auditStatus != null and auditStatus != ''">audit_status = #{auditStatus},</if>
@ -188,9 +196,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateDate != null">update_date = #{updateDate},</if>
<if test="beginTime != null">begin_time = #{beginTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="materialBarcode != null">material_barcode = #{materialBarcode},</if>
<if test="endStationCode != null">end_station_code = #{endStationCode},</if>
<if test="batchCode != null">batch_code = #{batchCode},</if>
<if test="erpStatus != null">erp_status = #{erpStatus},</if>
<if test="erpAmount != null">erp_amount = #{erpAmount},</if>
</trim>
where raw_return_id = #{rawReturnId}
</update>

@ -42,3 +42,32 @@ export function delRawoutstock(rawOutstockId) {
method: 'delete'
})
}
// 查询原材料出库记录详细
export function getRawOutstockByTaskCode(taskCode) {
return request({
url: '/wms/rawoutstock/getRawOutstockByTaskCode/' + taskCode,
method: 'get'
})
}
// 审核原材料出库记录
export function auditRawOutstock(data) {
return request({
url: '/wms/rawoutstock/auditRawOutstock',
method: 'post',
data: data
})
}
// 查询原材料出库记录详细
export function getWarehouses() {
return request({
url: '/wms/rawoutstock/getWarehouses',
method: 'get'
})
}

@ -190,10 +190,10 @@ export const dynamicRoutes = [
permissions: ["tool:gen:edit"],
children: [
{
path: "index/:planMaintId(\\d+)",
path: "index/:planMaintId(\\d+)/:planMaintCode",
component: () => import("@/views/dms/maintDetail/index"),
name: "childMaint",
meta: { title: "查看保养详细信息", activeMenu: "/dms/maintDetail" },
meta: { title: "保养计划明细", activeMenu: "/dms/maintDetail" },
},
],
},
@ -404,6 +404,72 @@ export const dynamicRoutes = [
],
},
{
path: '/dms/lubeDetail',
component: Layout,
hidden: true,
permissions: ['dms:lube:add'],
children: [
{
path: 'index/:planLubeId(\\d+)/:planLubeCode',
component: () => import('@/views/dms/lubeDetail/index'),
name: 'planLubeDetailEdit',
meta: { title: '润滑计划明细', activeMenu: '/dms/lube' }
}
]
},
{
path: '/dms/dmsBillsLubeDetail',
component: Layout,
hidden: true,
permissions: ['dms:lube:add'],
children: [
{
path: 'index/:planLubeId(\\d+)',
component: () => import('@/views/dms/dmsBillsLubeDetail/index'),
name: 'planLubeDetailEdit',
meta: { title: '润滑工单明细', activeMenu: '/dms/lube' }
}
]
},
{
path: '/dms/dmsBillsMaintDetail',
component: Layout,
hidden: true,
permissions: ['dms:maint:add'],
children: [
{
path: 'index/:planMaintId(\\d+)',
component: () => import('@/views/dms/dmsBillsMaintDetail/index'),
name: 'productPlanEdit',
meta: { title: '保养工单明细', activeMenu: '/dms/maint' }
}
]
},
{
path: '/wms/raw-outstock',
component: Layout,
hidden: true,
permissions: ['wms:rawoutstock:audit'],
children: [
{
path: 'detail/:taskCode/:detailFlag/:warehouseName',
component: () => import('@/views/wms/info/rawoutstock/rawOutstockDetail'),
name: 'RawOutStockDetail',
meta: { title: '原材料出库明细', activeMenu: '/wms/info/rawoutstock' }
}
]
},
]
// 防止连续点击多次路由报错

@ -1,70 +1,41 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="任务编号;移库时必须" prop="taskCode">
<el-form-item label="任务编号" prop="taskCode">
<el-input
v-model="queryParams.taskCode"
placeholder="请输入任务编号;移库时必须"
placeholder="请输入任务编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="仓库ID;领料时需要保存" prop="warehouseId">
<el-input
v-model="queryParams.warehouseId"
placeholder="请输入仓库ID;领料时需要保存"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="库位编码;移库和合库时需要保存" prop="locationCode">
<el-input
v-model="queryParams.locationCode"
placeholder="请输入库位编码;移库和合库时需要保存"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工单ID,关联pd_base_order_info的order_id" prop="orderId">
<el-input
v-model="queryParams.orderId"
placeholder="请输入工单ID,关联pd_base_order_info的order_id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="计划ID,关联pd_base_plan_info的plan_id" prop="planId">
<el-input
v-model="queryParams.planId"
placeholder="请输入计划ID,关联pd_base_plan_info的plan_id"
clearable
@keyup.enter.native="handleQuery"
/>
<el-form-item label="仓库" prop="warehouseId">
<el-select v-model="queryParams.warehouseId">
<el-option
v-for="item in warehouseOptions"
:key="item.warehouseId"
:label="item.warehouseName"
:value="item.warehouseId"
/>
</el-select>
</el-form-item>
<el-form-item label="计划明细ID,关联pd_base_plan_detail的plan_detail_id" prop="planDetailId">
<el-form-item label="计划编号" prop="planCode">
<el-input
v-model="queryParams.planDetailId"
placeholder="请输入计划明细ID,关联pd_base_plan_detail的plan_detail_id"
v-model="queryParams.planCode"
placeholder="请输入计划编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属工位关联pd_base_station_info的station_id" prop="stationId">
<el-form-item label="明细编号" prop="planDetailCode">
<el-input
v-model="queryParams.stationId"
placeholder="请输入所属工位关联pd_base_station_info的station_id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="成品ID,关联物料表物料id" prop="productId">
<el-input
v-model="queryParams.productId"
placeholder="请输入成品ID,关联物料表物料id"
v-model="queryParams.planDetailCode"
placeholder="请输入计划明细编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="申请人" prop="applyBy">
<el-input
v-model="queryParams.applyBy"
@ -73,53 +44,20 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="申请时间" prop="applyDate">
<el-date-picker clearable
v-model="queryParams.applyDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择申请时间">
</el-date-picker>
</el-form-item>
<el-form-item label="审核人" prop="auditBy">
<el-input
v-model="queryParams.auditBy"
placeholder="请输入审核人"
<el-form-item label="审核状态" prop="auditStatus">
<el-select
v-model="queryParams.auditStatus"
placeholder="审核状态"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核时间" prop="auditDate">
<el-date-picker clearable
v-model="queryParams.auditDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择审核时间">
</el-date-picker>
</el-form-item>
<el-form-item label="最后更新时间" prop="updateDate">
<el-date-picker clearable
v-model="queryParams.updateDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择最后更新时间">
</el-date-picker>
</el-form-item>
<el-form-item label="执行开始时间" prop="beginTime">
<el-date-picker clearable
v-model="queryParams.beginTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择执行开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="执行结束时间" prop="endTime">
<el-date-picker clearable
v-model="queryParams.endTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择执行结束时间">
</el-date-picker>
style="width: 240px"
>
<el-option
v-for="dict in dict.type.wms_audit_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
@ -127,94 +65,23 @@
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['wms:rawoutstock:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['wms:rawoutstock:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['wms:rawoutstock:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['wms:rawoutstock:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="rawoutstockList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="原材料出库记录ID" align="center" prop="rawOutstockId" />
<el-table-column label="任务编号;移库时必须" align="center" prop="taskCode" />
<el-table-column label="仓库ID;领料时需要保存" align="center" prop="warehouseId" />
<el-table-column label="库位编码;移库和合库时需要保存" align="center" prop="locationCode" />
<el-table-column label="工单ID,关联pd_base_order_info的order_id" align="center" prop="orderId" />
<el-table-column label="计划ID,关联pd_base_plan_info的plan_id" align="center" prop="planId" />
<el-table-column label="计划明细ID,关联pd_base_plan_detail的plan_detail_id" align="center" prop="planDetailId" />
<el-table-column label="所属工位关联pd_base_station_info的station_id" align="center" prop="stationId" />
<el-table-column label="成品ID,关联物料表物料id" align="center" prop="productId" />
<el-table-column label="操作类型(0自动,1手动,2强制,3调度)" align="center" prop="operationType" />
<el-table-column label="任务类型(1生产领料,2移库出库,3合库出库,9其他领料)" align="center" prop="taskType" />
<el-table-column label="申请原因" align="center" prop="applyReason" />
<el-table-column label="审核原因" align="center" prop="auditReason" />
<el-table-column label="审核状态(0待审核,1审核通过,2审核未通过)" align="center" prop="auditStatus" />
<el-table-column label="执行状态(0待执行,1执行中,2执行完成)" align="center" prop="executeStatus" />
<el-table-column label="任务编号" align="center" prop="taskCode" />
<el-table-column label="仓库名称" align="center" prop="warehouseName" />
<el-table-column label="计划编号" align="center" prop="planCode" />
<el-table-column label="计划明细编号" align="center" prop="planDetailCode" />
<el-table-column label="申请人" align="center" prop="applyBy" />
<el-table-column label="申请原因" align="center" prop="applyReason" />
<el-table-column label="申请时间" align="center" prop="applyDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.applyDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="审核人" align="center" prop="auditBy" />
<el-table-column label="审核时间" align="center" prop="auditDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.auditDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="最后更新时间" align="center" prop="updateDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="执行开始时间" align="center" prop="beginTime" width="180">
<el-table-column label="审核状态" align="center" prop="auditStatus" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.beginTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="执行结束时间" align="center" prop="endTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
<dict-tag :options="dict.type.wms_audit_status" :value="scope.row.auditStatus"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -222,25 +89,18 @@
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
icon="el-icon-lock"
@click="handleAudit(scope.row)"
v-hasPermi="['wms:rawoutstock:edit']"
>明细</el-button>
v-if="scope.row.auditStatus=='0'"
>审核</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
icon="el-icon-info"
@click="handleDetail(scope.row)"
v-hasPermi="['wms:rawoutstock:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['wms:rawoutstock:remove']"
>删除</el-button>
>查看</el-button>
</template>
</el-table-column>
</el-table>
@ -253,203 +113,15 @@
@pagination="getList"
/>
<!-- 添加或修改原材料出库记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="任务编号;移库时必须" prop="taskCode">
<el-input v-model="form.taskCode" placeholder="请输入任务编号;移库时必须" />
</el-form-item>
<el-form-item label="仓库ID;领料时需要保存" prop="warehouseId">
<el-input v-model="form.warehouseId" placeholder="请输入仓库ID;领料时需要保存" />
</el-form-item>
<el-form-item label="库位编码;移库和合库时需要保存" prop="locationCode">
<el-input v-model="form.locationCode" placeholder="请输入库位编码;移库和合库时需要保存" />
</el-form-item>
<el-form-item label="工单ID,关联pd_base_order_info的order_id" prop="orderId">
<el-input v-model="form.orderId" placeholder="请输入工单ID,关联pd_base_order_info的order_id" />
</el-form-item>
<el-form-item label="计划ID,关联pd_base_plan_info的plan_id" prop="planId">
<el-input v-model="form.planId" placeholder="请输入计划ID,关联pd_base_plan_info的plan_id" />
</el-form-item>
<el-form-item label="计划明细ID,关联pd_base_plan_detail的plan_detail_id" prop="planDetailId">
<el-input v-model="form.planDetailId" placeholder="请输入计划明细ID,关联pd_base_plan_detail的plan_detail_id" />
</el-form-item>
<el-form-item label="所属工位关联pd_base_station_info的station_id" prop="stationId">
<el-input v-model="form.stationId" placeholder="请输入所属工位关联pd_base_station_info的station_id" />
</el-form-item>
<el-form-item label="成品ID,关联物料表物料id" prop="productId">
<el-input v-model="form.productId" placeholder="请输入成品ID,关联物料表物料id" />
</el-form-item>
<el-form-item label="申请原因" prop="applyReason">
<el-input v-model="form.applyReason" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="审核原因" prop="auditReason">
<el-input v-model="form.auditReason" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="申请人" prop="applyBy">
<el-input v-model="form.applyBy" placeholder="请输入申请人" />
</el-form-item>
<el-form-item label="申请时间" prop="applyDate">
<el-date-picker clearable
v-model="form.applyDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择申请时间">
</el-date-picker>
</el-form-item>
<el-form-item label="审核人" prop="auditBy">
<el-input v-model="form.auditBy" placeholder="请输入审核人" />
</el-form-item>
<el-form-item label="审核时间" prop="auditDate">
<el-date-picker clearable
v-model="form.auditDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择审核时间">
</el-date-picker>
</el-form-item>
<el-form-item label="最后更新时间" prop="updateDate">
<el-date-picker clearable
v-model="form.updateDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择最后更新时间">
</el-date-picker>
</el-form-item>
<el-form-item label="执行开始时间" prop="beginTime">
<el-date-picker clearable
v-model="form.beginTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择执行开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="执行结束时间" prop="endTime">
<el-date-picker clearable
v-model="form.endTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择执行结束时间">
</el-date-picker>
</el-form-item>
<el-divider content-position="center">原材料出库记录明细信息</el-divider>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddWmsRawOutstockDetail"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteWmsRawOutstockDetail"></el-button>
</el-col>
</el-row>
<el-table :data="wmsRawOutstockDetailList" :row-class-name="rowWmsRawOutstockDetailIndex" @selection-change="handleWmsRawOutstockDetailSelectionChange" ref="wmsRawOutstockDetail">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="库位编码" prop="locationCode" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.locationCode" placeholder="请输入库位编码" />
</template>
</el-table-column>
<el-table-column label="物料条码" prop="materialBarcode" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.materialBarcode" placeholder="请输入物料条码" />
</template>
</el-table-column>
<el-table-column label="物料ID" prop="materialId" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.materialId" placeholder="请输入物料ID" />
</template>
</el-table-column>
<el-table-column label="批次;扫描条码时,从打印条码记录表中获取" prop="instockBatch" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.instockBatch" placeholder="请输入批次;扫描条码时,从打印条码记录表中获取" />
</template>
</el-table-column>
<el-table-column label="生产日期;扫描条码时,从打印条码记录表中获取" prop="materialProductionDate" width="240">
<template slot-scope="scope">
<el-date-picker clearable v-model="scope.row.materialProductionDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择生产日期;扫描条码时,从打印条码记录表中获取" />
</template>
</el-table-column>
<el-table-column label="计划数量" prop="planAmount" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.planAmount" placeholder="请输入计划数量" />
</template>
</el-table-column>
<el-table-column label="出库数量" prop="outstockAmount" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.outstockAmount" placeholder="请输入出库数量" />
</template>
</el-table-column>
<el-table-column label="执行状态(0待执行,1执行中,2执行完成)" prop="executeStatus" width="150">
<template slot-scope="scope">
<el-select v-model="scope.row.executeStatus" placeholder="请选择执行状态(0待执行,1执行中,2执行完成)">
<el-option label="请选择字典生成" value="" />
</el-select>
</template>
</el-table-column>
<el-table-column label="同步ERP状态(0:失败,1成功)" prop="erpStatus" width="150">
<template slot-scope="scope">
<el-select v-model="scope.row.erpStatus" placeholder="请选择同步ERP状态(0:失败,1成功)">
<el-option label="请选择字典生成" value="" />
</el-select>
</template>
</el-table-column>
<el-table-column label="出库人" prop="outstockPerson" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.outstockPerson" placeholder="请输入出库人" />
</template>
</el-table-column>
<el-table-column label="出库时间" prop="outstockTime" width="240">
<template slot-scope="scope">
<el-date-picker clearable v-model="scope.row.outstockTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择出库时间" />
</template>
</el-table-column>
<el-table-column label="出库方式" prop="outstockWay" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.outstockWay" placeholder="请输入出库方式" />
</template>
</el-table-column>
<el-table-column label="使用机台名称;出库扫描条码时,从打印条码记录表中获取" prop="machineName" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.machineName" placeholder="请输入使用机台名称;出库扫描条码时,从打印条码记录表中获取" />
</template>
</el-table-column>
<el-table-column label="质检状态(0:待质检,1:合格,2:NG)" prop="qualityStatus" width="150">
<template slot-scope="scope">
<el-select v-model="scope.row.qualityStatus" placeholder="请选择质检状态(0:待质检,1:合格,2:NG)">
<el-option label="请选择字典生成" value="" />
</el-select>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createDate" width="240">
<template slot-scope="scope">
<el-date-picker clearable v-model="scope.row.createDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择创建时间" />
</template>
</el-table-column>
<el-table-column label="最后更新时间" prop="updateDate" width="240">
<template slot-scope="scope">
<el-date-picker clearable v-model="scope.row.updateDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择最后更新时间" />
</template>
</el-table-column>
<el-table-column label="每托数量" prop="stackAmount" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.stackAmount" placeholder="请输入每托数量" />
</template>
</el-table-column>
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listRawoutstock, getRawoutstock, delRawoutstock, addRawoutstock, updateRawoutstock } from "@/api/wms/rawoutstock";
import { listRawoutstock,getWarehouses } from "@/api/wms/rawoutstock";
export default {
name: "Rawoutstock",
dicts: ['wms_audit_status', 'wms_execute_status'],
data() {
return {
//
@ -482,10 +154,15 @@ export default {
warehouseId: null,
locationCode: null,
orderId: null,
planId: null,
planDetailId: null,
planCode: null,
planDetailCode: null,
stationId: null,
productId: null,
materialBatch: null,
palletInfoCode: null,
outstockAmount: null,
realOutstockAmount: null,
endStationCode: null,
operationType: null,
taskType: null,
applyReason: null,
@ -505,16 +182,46 @@ export default {
//
rules: {
taskCode: [
{ required: true, message: "任务编号;移库时必须不能为空", trigger: "blur" }
{ required: true, message: "任务编号不能为空", trigger: "blur" }
],
warehouseId: [
{ required: true, message: "仓库ID;领料时需要保存不能为空", trigger: "blur" }
],
}
outstockAmount: [
{ required: true, message: "计划出库数量不能为空", trigger: "blur" }
],
realOutstockAmount: [
{ required: true, message: "已出库数量不能为空", trigger: "blur" }
],
operationType: [
{ required: true, message: "操作类型(0自动,1人工,2强制,3调度)不能为空", trigger: "change" }
],
taskType: [
{ required: true, message: "任务类型(1生产领料,2拆分出库,3组装出库,9其他)不能为空", trigger: "change" }
],
auditStatus: [
{ required: true, message: "审核状态(0待审核,1审核通过,2审核未通过)不能为空", trigger: "change" }
],
executeStatus: [
{ required: true, message: "执行状态(0待执行,1执行中,2执行完成)不能为空", trigger: "change" }
],
},
//
warehouseOptions: [],
};
},
created() {
this.getList();
this.getWarehouseList();
},
activated() {
const time = this.$route.query.t;
if (time != null && time != this.uniqueId) {
this.uniqueId = time;
this.queryParams.pageNum = Number(this.$route.query.pageNum);
this.getList();
}
},
methods: {
/** 查询原材料出库记录列表 */
@ -526,6 +233,13 @@ export default {
this.loading = false;
});
},
/** 查询仓库列表 */
getWarehouseList() {
getWarehouses().then(response => {
this.warehouseOptions = response.data;
});
},
//
cancel() {
this.open = false;
@ -539,10 +253,15 @@ export default {
warehouseId: null,
locationCode: null,
orderId: null,
planId: null,
planDetailId: null,
planCode: null,
planDetailCode: null,
stationId: null,
productId: null,
materialBatch: null,
palletInfoCode: null,
outstockAmount: null,
realOutstockAmount: null,
endStationCode: null,
operationType: null,
taskType: null,
applyReason: null,
@ -583,90 +302,24 @@ export default {
this.open = true;
this.title = "添加原材料出库记录";
},
/** 修改按钮操作 */
handleUpdate(row) {
/** 审核按钮操作 */
handleAudit(row) {
this.reset();
const rawOutstockId = row.rawOutstockId || this.ids
getRawoutstock(rawOutstockId).then(response => {
this.form = response.data;
this.wmsRawOutstockDetailList = response.data.wmsRawOutstockDetailList;
this.open = true;
this.title = "修改原材料出库记录";
});
const taskCode = row.taskCode
const warehouseName = row.warehouseName;
const params = {pageNum: this.queryParams.pageNum};
this.$tab.openPage("领料审核[" + taskCode + "]", '/wms/raw-outstock/detail/' + taskCode+'/0/'+warehouseName, params);
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.wmsRawOutstockDetailList = this.wmsRawOutstockDetailList;
if (this.form.rawOutstockId != null) {
updateRawoutstock(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addRawoutstock(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const rawOutstockIds = row.rawOutstockId || this.ids;
this.$modal.confirm('是否确认删除原材料出库记录编号为"' + rawOutstockIds + '"的数据项?').then(function() {
return delRawoutstock(rawOutstockIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 原材料出库记录明细序号 */
rowWmsRawOutstockDetailIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
},
/** 原材料出库记录明细添加按钮操作 */
handleAddWmsRawOutstockDetail() {
let obj = {};
obj.locationCode = "";
obj.materialBarcode = "";
obj.materialId = "";
obj.instockBatch = "";
obj.materialProductionDate = "";
obj.planAmount = "";
obj.outstockAmount = "";
obj.executeStatus = "";
obj.erpStatus = "";
obj.outstockPerson = "";
obj.outstockTime = "";
obj.outstockWay = "";
obj.machineName = "";
obj.qualityStatus = "";
obj.createDate = "";
obj.updateDate = "";
obj.stackAmount = "";
this.wmsRawOutstockDetailList.push(obj);
},
/** 原材料出库记录明细删除按钮操作 */
handleDeleteWmsRawOutstockDetail() {
if (this.checkedWmsRawOutstockDetail.length == 0) {
this.$modal.msgError("请先选择要删除的原材料出库记录明细数据");
} else {
const wmsRawOutstockDetailList = this.wmsRawOutstockDetailList;
const checkedWmsRawOutstockDetail = this.checkedWmsRawOutstockDetail;
this.wmsRawOutstockDetailList = wmsRawOutstockDetailList.filter(function(item) {
return checkedWmsRawOutstockDetail.indexOf(item.index) == -1
});
}
},
/** 复选框选中数据 */
handleWmsRawOutstockDetailSelectionChange(selection) {
this.checkedWmsRawOutstockDetail = selection.map(item => item.index)
/** 审核按钮操作 */
handleDetail(row) {
this.reset();
const taskCode = row.taskCode;
const warehouseName = row.warehouseName;
const params = {pageNum: this.queryParams.pageNum};
this.$tab.openPage("出库明细[" + taskCode + "]", '/wms/raw-outstock/detail/' + taskCode+'/1/'+warehouseName, params);
},
/** 导出按钮操作 */
handleExport() {
this.download('wms/rawoutstock/export', {

@ -0,0 +1,213 @@
<template>
<div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="任务编号" prop="taskCode">
<el-input v-model="form.taskCode" disabled/>
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="仓库" prop="warehouseName">
<el-input v-model="form.warehouseName" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="计划编号" prop="planCode">
<el-input v-model="form.planCode" disabled/>
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="明细编号" prop="planDetailCode">
<el-input v-model="form.planDetailCode" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="申请人" prop="applyBy">
<el-input v-model="form.applyBy" disabled/>
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="申请时间" prop="applyDate">
<el-input v-model="form.applyDate" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16" :offset="2">
<el-form-item label="申请原因" prop="applyReason">
<el-input v-model="form.applyReason" type="textarea" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="detailFlag">
<el-col :span="8" :offset="2">
<el-form-item label="审核人" prop="auditBy">
<el-input v-model="form.auditBy" disabled/>
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="审核时间" prop="auditDate">
<el-input v-model="form.auditDate" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16" :offset="2">
<el-form-item label="审核原因" prop="auditReason">
<el-input v-model="form.auditReason" type="textarea" :disabled="detailFlag"/>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="detailFlag">
<el-col :span="16" :offset="2">
<el-form-item label="审核状态" prop="auditStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.wms_audit_status" :value="form.auditStatus"/>
</template>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="center">原材料出库记录明细信息</el-divider>
<el-table :data="wmsRawOutstockDetailList" :row-class-name="rowWmsRawOutstockDetailIndex"
ref="wmsRawOutstockDetail">
<el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="库位编码" prop="locationCode"/>
<el-table-column label="物料名称" prop="materialName"/>
<el-table-column label="物料批次" prop="instockBatch"/>
<el-table-column label="计划数量" prop="planAmount"/>
<el-table-column label="出库数量" prop="outstockAmount" v-if="detailFlag"/>
<el-table-column label="执行状态" prop="executeStatus" v-if="detailFlag">
<template slot-scope="scope">
<dict-tag :options="dict.type.wms_execute_status" :value="scope.row.executeStatus"/>
</template>
</el-table-column>
<el-table-column label="同步ERP状态" prop="erpStatus" v-if="detailFlag">
<template slot-scope="scope">
<dict-tag :options="dict.type.wms_erp_status" :value="scope.row.erpStatus"/>
</template>
</el-table-column>
<el-table-column label="同步ERP数量" prop="erpAmount" v-if="detailFlag"/>
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="auditPass" v-if="!detailFlag"></el-button>
<el-button type="primary" @click="auditFail" v-if="!detailFlag"></el-button>
<el-button @click="cancel"> </el-button>
</div>
</div>
</template>
<script>
import {
getRawOutstockByTaskCode,
auditRawOutstock,
} from "@/api/wms/rawoutstock";
export default {
dicts: ['wms_audit_status', 'wms_execute_status', 'wms_erp_status'],
name: "Rawoutstock",
data() {
return {
//
loading: true,
//
ids: [],
//
checkedWmsRawOutstockDetail: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
rawoutstockList: [],
//
wmsRawOutstockDetailList: [],
//
title: "",
//
open: false,
//
form: {},
detailFlag: true,
warehouseName: '',
};
},
created() {
const taskCode = this.$route.params && this.$route.params.taskCode;
const detailFlag = this.$route.params && this.$route.params.detailFlag;
const warehouseName = this.$route.params && this.$route.params.warehouseName;
this.detailFlag = detailFlag == "1";
this.form.taskCode = taskCode;
this.warehouseName = warehouseName;
this.getRawOutstockByTaskCode();
},
methods: {
/** 根据任务编号获取出库明细 */
getRawOutstockByTaskCode() {
getRawOutstockByTaskCode(this.form.taskCode).then(response => {
this.form = response.data.wmsRawOutstock;
this.form.warehouseName = this.warehouseName;
this.wmsRawOutstockDetailList = response.data.wmsRawOutstockDetailList;
this.open = true;
this.title = "修改原材料出库记录";
});
},
/** 原材料出库记录明细序号 */
rowWmsRawOutstockDetailIndex({row, rowIndex}) {
row.index = rowIndex + 1;
},
//
cancel() {
const obj = {path: "/wms/info/rawoutstock", query: {t: Date.now(), pageNum: this.$route.query.pageNum}};
this.$tab.closeOpenPage(obj);
},
auditPass() {
this.form.auditStatus = "1";
this.submitForm();
},
auditFail() {
this.form.auditStatus = "2";
if (!this.form.auditReason || this.form.auditReason == "" || this.form.auditReason == undefined) {
this.$modal.msgWarning("请输入审核原因!");
return;
}
this.submitForm();
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
auditRawOutstock(this.form).then(response => {
this.$modal.msgSuccess("保存成功");
this.cancel();
});
}
});
},
}
};
</script>
Loading…
Cancel
Save