change - add原材料退库记录明细

master
yinq 5 months ago
parent 9abc8cf69c
commit d41883ce35

@ -0,0 +1,105 @@
package com.hw.wms.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.hw.common.log.annotation.Log;
import com.hw.common.log.enums.BusinessType;
import com.hw.common.security.annotation.RequiresPermissions;
import com.hw.wms.domain.WmsRawReturnDetail;
import com.hw.wms.service.IWmsRawReturnDetailService;
import com.hw.common.core.web.controller.BaseController;
import com.hw.common.core.web.domain.AjaxResult;
import com.hw.common.core.utils.poi.ExcelUtil;
import com.hw.common.core.web.page.TableDataInfo;
/**
* 退Controller
*
* @author Yinq
* @date 2025-09-09
*/
@RestController
@RequestMapping("/rawReturnDetail")
public class WmsRawReturnDetailController extends BaseController
{
@Autowired
private IWmsRawReturnDetailService wmsRawReturnDetailService;
/**
* 退
*/
@RequiresPermissions("wms:rawReturnDetail:list")
@GetMapping("/list")
public TableDataInfo list(WmsRawReturnDetail wmsRawReturnDetail)
{
startPage();
List<WmsRawReturnDetail> list = wmsRawReturnDetailService.selectWmsRawReturnDetailList(wmsRawReturnDetail);
return getDataTable(list);
}
/**
* 退
*/
@RequiresPermissions("wms:rawReturnDetail:export")
@Log(title = "原材料退库记录明细", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, WmsRawReturnDetail wmsRawReturnDetail)
{
List<WmsRawReturnDetail> list = wmsRawReturnDetailService.selectWmsRawReturnDetailList(wmsRawReturnDetail);
ExcelUtil<WmsRawReturnDetail> util = new ExcelUtil<WmsRawReturnDetail>(WmsRawReturnDetail.class);
util.exportExcel(response, list, "原材料退库记录明细数据");
}
/**
* 退
*/
@RequiresPermissions("wms:rawReturnDetail:query")
@GetMapping(value = "/{rawReturnDetailId}")
public AjaxResult getInfo(@PathVariable("rawReturnDetailId") Long rawReturnDetailId)
{
return success(wmsRawReturnDetailService.selectWmsRawReturnDetailByRawReturnDetailId(rawReturnDetailId));
}
/**
* 退
*/
@RequiresPermissions("wms:rawReturnDetail:add")
@Log(title = "原材料退库记录明细", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody WmsRawReturnDetail wmsRawReturnDetail)
{
return toAjax(wmsRawReturnDetailService.insertWmsRawReturnDetail(wmsRawReturnDetail));
}
/**
* 退
*/
@RequiresPermissions("wms:rawReturnDetail:edit")
@Log(title = "原材料退库记录明细", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody WmsRawReturnDetail wmsRawReturnDetail)
{
return toAjax(wmsRawReturnDetailService.updateWmsRawReturnDetail(wmsRawReturnDetail));
}
/**
* 退
*/
@RequiresPermissions("wms:rawReturnDetail:remove")
@Log(title = "原材料退库记录明细", businessType = BusinessType.DELETE)
@DeleteMapping("/{rawReturnDetailIds}")
public AjaxResult remove(@PathVariable Long[] rawReturnDetailIds)
{
return toAjax(wmsRawReturnDetailService.deleteWmsRawReturnDetailByRawReturnDetailIds(rawReturnDetailIds));
}
}

@ -42,8 +42,8 @@ public class WmsRawReturnDetail extends BaseEntity
private String instockBatch;
/** 生产日期;扫描条码时,从打印条码记录表中获取 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "生产日期;扫描条码时,从打印条码记录表中获取", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "生产日期;扫描条码时,从打印条码记录表中获取", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date materialProductionDate;
/** 计划数量 */
@ -69,8 +69,8 @@ public class WmsRawReturnDetail extends BaseEntity
private String returnPerson;
/** 退库时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "退库时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "退库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date returnTime;
/** 退库方式( 0:PC退库 1:手持退库 2:AGV退库 */
@ -86,13 +86,13 @@ public class WmsRawReturnDetail extends BaseEntity
private String qualityStatus;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createDate;
/** 最后更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updateDate;
/** 每托数量 */
@ -140,6 +140,64 @@ public class WmsRawReturnDetail extends BaseEntity
/** 成品bom所在销售订单的项目号 */
private String tondBaseId;
/** 仓库名称 */
@Excel(name = "仓库名称")
private String warehouseName;
/** 计划编号 */
@Excel(name = "计划编号")
private String planCode;
/** 单位名称 */
@Excel(name = "单位名称")
private String unitName;
private String warehouseId;
/** 采购订单编号 */
@Excel(name = "采购订单编号")
private String poNo;
public String getPoNo() {
return poNo;
}
public void setPoNo(String poNo) {
this.poNo = poNo;
}
public String getWarehouseId() {
return warehouseId;
}
public void setWarehouseId(String warehouseId) {
this.warehouseId = warehouseId;
}
public String getUnitName() {
return unitName;
}
public void setUnitName(String unitName) {
this.unitName = unitName;
}
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
public String getPlanCode() {
return planCode;
}
public void setPlanCode(String planCode) {
this.planCode = planCode;
}
public String getTondBaseId() {
return tondBaseId;
}

@ -38,36 +38,83 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="fsId" column="fs_id" />
<result property="billNo" column="bill_no" />
<result property="tips" column="tips" />
<result property="taskCode" column="task_code" />
<result property="planCode" column="plan_code" />
<result property="warehouseName" column="warehouse_name" />
<result property="unitName" column="unit_name" />
<result property="warehouse_id" column="warehouseId" />
<result property="poNo" column="po_no" />
</resultMap>
<sql id="selectWmsRawReturnDetailVo">
select raw_return_detail_id, raw_return_id, location_code, material_barcode, material_id, instock_batch, material_production_Date, plan_amount, return_amount, execute_status, erp_status, return_person, return_time, return_way, machine_name, quality_status, create_by, create_date, update_by, update_date, stack_amount from wms_raw_return_detail
select wrrd.raw_return_detail_id,
wrrd.raw_return_id,
wrrd.location_code,
wrrd.material_barcode,
wrrd.material_id,
wrrd.instock_batch,
wrrd.plan_amount,
wrrd.return_amount,
wrrd.execute_status,
wrrd.erp_status,
wrrd.erp_amount,
wrrd.return_person,
wrrd.return_time,
wrrd.return_way,
wrrd.machine_name,
wrrd.quality_status,
wrrd.create_by,
wrrd.create_date,
mbmi.material_code,
mbmi.material_name,
mbmi.material_spec,
wrr.task_code,
wrr.plan_code,
wrr.warehouse_id,
wbw.warehouse_name,
mbui.unit_name,
mbbi.po_no
from wms_raw_return_detail wrrd
left join wms_raw_return wrr on wrr.raw_return_id = wrrd.raw_return_id
left join wms_base_warehouse wbw on wrr.warehouse_id = wbw.warehouse_id
left join mes_base_material_info mbmi on wrrd.material_id = mbmi.material_id
left join mes_base_unit_info mbui on mbui.erp_id = mbmi.material_unit_id
left join mes_base_barcode_info mbbi on mbbi.barcode_info = wrrd.material_barcode
</sql>
<select id="selectWmsRawReturnDetailList" parameterType="WmsRawReturnDetail" resultMap="WmsRawReturnDetailResult">
<include refid="selectWmsRawReturnDetailVo"/>
<where>
<if test="rawReturnId != null "> and raw_return_id = #{rawReturnId}</if>
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
<if test="materialBarcode != null and materialBarcode != ''"> and material_barcode = #{materialBarcode}</if>
<if test="materialId != null "> and material_id = #{materialId}</if>
<if test="instockBatch != null and instockBatch != ''"> and instock_batch = #{instockBatch}</if>
<if test="materialProductionDate != null "> and material_production_Date = #{materialProductionDate}</if>
<if test="planAmount != null "> and plan_amount = #{planAmount}</if>
<if test="returnAmount != null "> and return_amount = #{returnAmount}</if>
<if test="executeStatus != null and executeStatus != ''"> and execute_status = #{executeStatus}</if>
<if test="erpStatus != null and erpStatus != ''"> and erp_status = #{erpStatus}</if>
<if test="returnPerson != null and returnPerson != ''"> and return_person = #{returnPerson}</if>
<if test="returnTime != null "> and return_time = #{returnTime}</if>
<if test="returnWay != null and returnWay != ''"> and return_way = #{returnWay}</if>
<if test="machineName != null and machineName != ''"> and machine_name like concat('%', #{machineName}, '%')</if>
<if test="qualityStatus != null and qualityStatus != ''"> and quality_status = #{qualityStatus}</if>
<if test="createDate != null "> and create_date = #{createDate}</if>
<if test="updateDate != null "> and update_date = #{updateDate}</if>
<if test="stackAmount != null "> and stack_amount = #{stackAmount}</if>
<if test="rawReturnId != null "> and wrrd.raw_return_id = #{rawReturnId}</if>
<if test="locationCode != null and locationCode != ''"> and wrrd.location_code = #{locationCode}</if>
<if test="materialBarcode != null and materialBarcode != ''"> and wrrd.material_barcode = #{materialBarcode}</if>
<if test="materialId != null "> and wrrd.material_id = #{materialId}</if>
<if test="instockBatch != null and instockBatch != ''"> and wrrd.instock_batch = #{instockBatch}</if>
<if test="materialProductionDate != null "> and wrrd.material_production_Date = #{materialProductionDate}</if>
<if test="planAmount != null "> and wrrd.plan_amount = #{planAmount}</if>
<if test="returnAmount != null "> and wrrd.return_amount = #{returnAmount}</if>
<if test="executeStatus != null and executeStatus != ''"> and wrrd.execute_status = #{executeStatus}</if>
<if test="erpStatus != null and erpStatus != ''"> and wrrd.erp_status = #{erpStatus}</if>
<if test="returnPerson != null and returnPerson != ''"> and wrrd.return_person = #{returnPerson}</if>
<if test="returnTime != null "> and wrrd.return_time = #{returnTime}</if>
<if test="returnWay != null and returnWay != ''"> and wrrd.return_way = #{returnWay}</if>
<if test="machineName != null and machineName != ''"> and wrrd.machine_name like concat('%', #{machineName}, '%')</if>
<if test="qualityStatus != null and qualityStatus != ''"> and wrrd.quality_status = #{qualityStatus}</if>
<if test="createDate != null "> and wrrd.create_date = #{createDate}</if>
<if test="updateDate != null "> and wrrd.update_date = #{updateDate}</if>
<if test="stackAmount != null "> and wrrd.stack_amount = #{stackAmount}</if>
<if test="warehouseId != null "> and wrr.warehouse_id = #{warehouseId}</if>
<if test="taskCode != null and taskCode != ''"> and wrr.task_code like concat('%', #{taskCode}, '%')</if>
<if test="planCode != null and planCode != ''"> and wrr.plan_code like concat('%', #{planCode}, '%')</if>
<if test="materialBarcode != null and materialBarcode != ''"> and wrrd.material_barcode like concat('%', #{materialBarcode}, '%')</if>
<if test="applyBy != null and applyBy != ''"> and wrr.apply_by like concat('%', #{applyBy}, '%')</if>
<if test="poNo != null and poNo != ''"> and mbbi.po_no like concat('%', #{poNo}, '%')</if>
<if test="materialCode != null and materialCode != ''"> and mbmi.material_code like concat('%', #{materialCode}, '%')</if>
<if test="materialName != null and materialName != ''"> and mbmi.material_name like concat('%', #{materialName}, '%')</if>
</where>
order by wrrd.raw_return_detail_id desc
</select>
<select id="selectWmsRawReturnDetailByRawReturnDetailId" parameterType="Long" resultMap="WmsRawReturnDetailResult">

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询原材料退库记录明细列表
export function listRawReturnDetail(query) {
return request({
url: '/wms/rawReturnDetail/list',
method: 'get',
params: query
})
}
// 查询原材料退库记录明细详细
export function getRawReturnDetail(rawReturnDetailId) {
return request({
url: '/wms/rawReturnDetail/' + rawReturnDetailId,
method: 'get'
})
}
// 新增原材料退库记录明细
export function addRawReturnDetail(data) {
return request({
url: '/wms/rawReturnDetail',
method: 'post',
data: data
})
}
// 修改原材料退库记录明细
export function updateRawReturnDetail(data) {
return request({
url: '/wms/rawReturnDetail',
method: 'put',
data: data
})
}
// 删除原材料退库记录明细
export function delRawReturnDetail(rawReturnDetailId) {
return request({
url: '/wms/rawReturnDetail/' + rawReturnDetailId,
method: 'delete'
})
}

@ -0,0 +1,372 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="120px">
<el-form-item label="任务编号" prop="taskCode">
<el-input
v-model="queryParams.taskCode"
placeholder="请输入任务编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="仓库" prop="warehouseId">
<el-select v-model="queryParams.warehouseId" clearable>
<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="计划编号" prop="planCode">
<el-input
v-model="queryParams.planCode"
placeholder="请输入计划编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="采购订单编号" prop="poNo">
<el-input
v-model="queryParams.poNo"
placeholder="请输入计划明细编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料条码" prop="materialBarcode">
<el-input
v-model="queryParams.materialBarcode"
placeholder="请输入物料条码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料编号" prop="materialCode">
<el-input
v-model="queryParams.materialCode"
placeholder="请输入物料条码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料名称" prop="materialName">
<el-input
v-model="queryParams.materialName"
placeholder="请输入物料条码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="退库类型" prop="taskType">-->
<!-- <el-select-->
<!-- v-model="queryParams.taskType"-->
<!-- placeholder="请选择退库类型"-->
<!-- clearable-->
<!-- style="width: 240px"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.wms_raw_return_task_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="申请人" prop="applyBy">-->
<!-- <el-input-->
<!-- v-model="queryParams.applyBy"-->
<!-- placeholder="请输入申请人"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['wms:rawReturnDetail:export']"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="rawReturnDetailList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="任务编号" align="center" prop="taskCode"
v-if="columns[0].visible"/>
<el-table-column label="计划编号" align="center" prop="planCode"
v-if="columns[22].visible"/>
<el-table-column label="采购订单编号" align="center" prop="poNo"
v-if="columns[24].visible"/>
<el-table-column label="仓库名称" align="center" prop="warehouseName"
v-if="columns[1].visible"/>
<el-table-column label="库位编码" align="center" prop="locationCode"
v-if="columns[2].visible"/>
<el-table-column label="物料条码" align="center" prop="materialBarcode"
v-if="columns[3].visible"/>
<el-table-column label="物料编码" align="center" prop="materialCode"
v-if="columns[4].visible"/>
<el-table-column label="物料名称" align="center" prop="materialName"
v-if="columns[5].visible"/>
<el-table-column label="物料规格" align="center" prop="materialSpec"
v-if="columns[6].visible"/>
<el-table-column label="计划数量" align="center" prop="planAmount"
v-if="columns[7].visible"/>
<el-table-column label="已退库数量" align="center" prop="returnAmount"
v-if="columns[8].visible"/>
<el-table-column label="单位" align="center" prop="unitName"
v-if="columns[23].visible"/>
<el-table-column label="执行状态" align="center" prop="executeStatus"
v-if="columns[9].visible">
<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状态" align="center" prop="erpStatus"
v-if="columns[10].visible">
<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的数量" align="center" prop="erpAmount"
v-if="columns[11].visible"/>
<el-table-column label="退库人" align="center" prop="returnPerson"
v-if="columns[12].visible"/>
<el-table-column label="退库时间" align="center" prop="returnTime" width="180"
v-if="columns[13].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.returnTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="退库方式" align="center" prop="returnWay"
v-if="columns[14].visible"/>
<el-table-column label="使用机台名称" align="center" prop="machineName"
v-if="columns[15].visible"/>
<el-table-column label="质检状态" align="center" prop="qualityStatus"
v-if="columns[16].visible"/>
<el-table-column label="创建时间" align="center" prop="createDate" width="180"
v-if="columns[18].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="最后更新时间" align="center" prop="updateDate" width="180"
v-if="columns[20].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="每托数量" align="center" prop="stackAmount"
v-if="columns[21].visible"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {
listRawReturnDetail,
getRawReturnDetail,
} from "@/api/wms/rawReturnDetail";
import {getWarehouses} from "@/api/wms/rawreturn";
export default {
name: "RawReturnDetail",
dicts: ['wms_audit_status', 'wms_execute_status', 'wms_raw_return_task_type', "wms_erp_status"],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// 退
rawReturnDetailList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
rawReturnId: null,
locationCode: null,
materialBarcode: null,
materialId: null,
instockBatch: null,
materialProductionDate: null,
planAmount: null,
returnAmount: null,
executeStatus: null,
erpStatus: null,
erpAmount: null,
returnPerson: null,
returnTime: null,
returnWay: null,
machineName: null,
qualityStatus: null,
createDate: null,
updateDate: null,
stackAmount: null
},
//
form: {},
//
columns: [
{key: 0, label: `任务编号`, visible: true},
{key: 1, label: `仓库名称`, visible: true},
{key: 2, label: `库位编码`, visible: true},
{key: 3, label: `物料条码`, visible: true},
{key: 4, label: `物料编码`, visible: true},
{key: 5, label: `物料名称`, visible: true},
{key: 6, label: `物料规格`, visible: true},
{key: 7, label: `计划数量`, visible: true},
{key: 8, label: `退库数量`, visible: true},
{key: 9, label: `执行状态`, visible: true},
{key: 10, label: `同步ERP状态`, visible: true},
{key: 11, label: `同步给ERP的数量`, visible: true},
{key: 12, label: `退库人`, visible: true},
{key: 13, label: `退库时间`, visible: true},
{key: 14, label: `退库方式`, visible: false},
{key: 15, label: `使用机台名称`, visible: false},
{key: 16, label: `质检状态`, visible: false},
{key: 17, label: `创建人`, visible: true},
{key: 18, label: `创建时间`, visible: true},
{key: 19, label: `最后更新人`, visible: true},
{key: 20, label: `最后更新时间`, visible: true},
{key: 21, label: `每托数量`, visible: true},
{key: 22, label: `计划编号`, visible: true},
{key: 23, label: `单位`, visible: true},
{key: 24, label: `采购订单编号`, visible: true},
],
//
warehouseOptions: [],
};
},
created() {
this.getWarehouseList();
this.getList();
},
methods: {
/** 查询原材料退库记录明细列表 */
getList() {
this.loading = true;
listRawReturnDetail(this.queryParams).then(response => {
this.rawReturnDetailList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
rawReturnDetailId: null,
rawReturnId: null,
locationCode: null,
materialBarcode: null,
materialId: null,
instockBatch: null,
materialProductionDate: null,
planAmount: null,
returnAmount: null,
executeStatus: null,
erpStatus: null,
erpAmount: null,
returnPerson: null,
returnTime: null,
returnWay: null,
machineName: null,
qualityStatus: null,
createBy: null,
createDate: null,
updateBy: null,
updateDate: null,
stackAmount: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.rawReturnDetailId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加原材料退库记录明细";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const rawReturnDetailId = row.rawReturnDetailId || this.ids
getRawReturnDetail(rawReturnDetailId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改原材料退库记录明细";
});
},
/** 查询仓库列表 */
getWarehouseList() {
getWarehouses().then(response => {
this.warehouseOptions = response.data;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('wms/rawReturnDetail/export', {
...this.queryParams
}, `rawReturnDetail_${new Date().getTime()}.xlsx`)
}
}
}
;
</script>
Loading…
Cancel
Save