change - 添加原材料出库记录明细页面
parent
36840b62b6
commit
a43e03bd58
@ -0,0 +1,99 @@
|
||||
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.WmsRawOutstockDetail;
|
||||
import com.hw.wms.service.IWmsRawOutstockDetailService;
|
||||
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-06-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/rawOutstockDetail")
|
||||
public class WmsRawOutstockDetailController extends BaseController {
|
||||
@Autowired
|
||||
private IWmsRawOutstockDetailService wmsRawOutstockDetailService;
|
||||
|
||||
/**
|
||||
* 查询原材料出库记录明细列表
|
||||
*/
|
||||
@RequiresPermissions("wms:rawOutstockDetail:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WmsRawOutstockDetail wmsRawOutstockDetail) {
|
||||
startPage();
|
||||
List<WmsRawOutstockDetail> list = wmsRawOutstockDetailService.selectWmsRawOutstockDetailList(wmsRawOutstockDetail);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出原材料出库记录明细列表
|
||||
*/
|
||||
@RequiresPermissions("wms:rawOutstockDetail:export")
|
||||
@Log(title = "原材料出库记录明细", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WmsRawOutstockDetail wmsRawOutstockDetail) {
|
||||
List<WmsRawOutstockDetail> list = wmsRawOutstockDetailService.selectWmsRawOutstockDetailList(wmsRawOutstockDetail);
|
||||
ExcelUtil<WmsRawOutstockDetail> util = new ExcelUtil<WmsRawOutstockDetail>(WmsRawOutstockDetail.class);
|
||||
util.exportExcel(response, list, "原材料出库记录明细数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取原材料出库记录明细详细信息
|
||||
*/
|
||||
@RequiresPermissions("wms:rawOutstockDetail:query")
|
||||
@GetMapping(value = "/{rawOutstockDetailId}")
|
||||
public AjaxResult getInfo(@PathVariable("rawOutstockDetailId") Long rawOutstockDetailId) {
|
||||
return success(wmsRawOutstockDetailService.selectWmsRawOutstockDetailByRawOutstockDetailId(rawOutstockDetailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增原材料出库记录明细
|
||||
*/
|
||||
@RequiresPermissions("wms:rawOutstockDetail:add")
|
||||
@Log(title = "原材料出库记录明细", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WmsRawOutstockDetail wmsRawOutstockDetail) {
|
||||
return toAjax(wmsRawOutstockDetailService.insertWmsRawOutstockDetail(wmsRawOutstockDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改原材料出库记录明细
|
||||
*/
|
||||
@RequiresPermissions("wms:rawOutstockDetail:edit")
|
||||
@Log(title = "原材料出库记录明细", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WmsRawOutstockDetail wmsRawOutstockDetail) {
|
||||
return toAjax(wmsRawOutstockDetailService.updateWmsRawOutstockDetail(wmsRawOutstockDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除原材料出库记录明细
|
||||
*/
|
||||
@RequiresPermissions("wms:rawOutstockDetail:remove")
|
||||
@Log(title = "原材料出库记录明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{rawOutstockDetailIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] rawOutstockDetailIds) {
|
||||
return toAjax(wmsRawOutstockDetailService.deleteWmsRawOutstockDetailByRawOutstockDetailIds(rawOutstockDetailIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询原材料出库记录明细列表
|
||||
export function listRawOutstockDetail(query) {
|
||||
return request({
|
||||
url: '/wms/rawOutstockDetail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询原材料出库记录明细详细
|
||||
export function getRawOutstockDetail(rawOutstockDetailId) {
|
||||
return request({
|
||||
url: '/wms/rawOutstockDetail/' + rawOutstockDetailId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增原材料出库记录明细
|
||||
export function addRawOutstockDetail(data) {
|
||||
return request({
|
||||
url: '/wms/rawOutstockDetail',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改原材料出库记录明细
|
||||
export function updateRawOutstockDetail(data) {
|
||||
return request({
|
||||
url: '/wms/rawOutstockDetail',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除原材料出库记录明细
|
||||
export function delRawOutstockDetail(rawOutstockDetailId) {
|
||||
return request({
|
||||
url: '/wms/rawOutstockDetail/' + rawOutstockDetailId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -0,0 +1,551 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="80px">
|
||||
<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="planCode">
|
||||
<el-input
|
||||
v-model="queryParams.planCode"
|
||||
placeholder="请输入计划编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="明细编号" prop="planDetailCode">
|
||||
<el-input
|
||||
v-model="queryParams.planDetailCode"
|
||||
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="locationCode">
|
||||
<el-input
|
||||
v-model="queryParams.locationCode"
|
||||
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="物料ID" prop="materialId">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.materialId"-->
|
||||
<!-- placeholder="请输入物料ID"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="批次" prop="instockBatch">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.instockBatch"-->
|
||||
<!-- placeholder="请输入批次"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="执行状态" prop="executeStatus">
|
||||
<el-select v-model="queryParams.executeStatus" placeholder="请选择执行状态"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.wms_execute_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="同步ERP状态" prop="erpStatus" label-width="120">
|
||||
<el-select v-model="queryParams.erpStatus" placeholder="请选择同步ERP状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.wms_erp_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="出库时间" prop="outstockTime">-->
|
||||
<!-- <el-date-picker clearable-->
|
||||
<!-- v-model="queryParams.outstockTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- placeholder="请选择出库时间">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </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:rawOutstockDetail:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="rawOutstockDetailList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="原材料出库记录明细ID" align="center" prop="rawOutstockDetailId" width="160" v-if="columns[0].visible"/>
|
||||
<el-table-column label="原材料出库ID" align="center" prop="rawOutstockId" width="140" v-if="columns[1].visible"/>
|
||||
<el-table-column label="任务编号" align="center" prop="taskCode" width="140" v-if="columns[25].visible"/>
|
||||
<el-table-column label="计划编号" align="center" prop="planCode" width="140" v-if="columns[26].visible"/>
|
||||
<el-table-column label="计划明细编号" align="center" prop="planDetailCode" width="140" v-if="columns[27].visible"/>
|
||||
<el-table-column label="销售订单编号" align="center" prop="saleorderCode" width="140" v-if="columns[28].visible"/>
|
||||
<el-table-column label="仓库ID" align="center" prop="warehouseId" width="120" v-if="columns[3].visible"/>
|
||||
<el-table-column label="库位编码" align="center" prop="locationCode" width="120" v-if="columns[4].visible"/>
|
||||
<el-table-column label="物料条码" align="center" prop="materialBarcode" width="160" v-if="columns[5].visible"/>
|
||||
<el-table-column label="物料ID" align="center" prop="materialId" width="80" v-if="columns[6].visible"/>
|
||||
<el-table-column label="物料编号" align="center" prop="materialCode" width="120" v-if="columns[29].visible"/>
|
||||
<el-table-column label="物料名称" align="center" prop="materialName" width="120" v-if="columns[30].visible"/>
|
||||
<el-table-column label="批次" align="center" prop="instockBatch" width="120" v-if="columns[7].visible"/>
|
||||
<el-table-column label="生产日期" align="center" prop="materialProductionDate"
|
||||
width="180"
|
||||
v-if="columns[8].visible">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.materialProductionDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数量" align="center" prop="planAmount" width="100" v-if="columns[9].visible"/>
|
||||
<el-table-column label="出库数量" align="center" prop="outstockAmount" width="100" v-if="columns[10].visible"/>
|
||||
<el-table-column label="执行状态" align="center" prop="executeStatus"
|
||||
v-if="columns[11].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[12].visible" width="100" >
|
||||
<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" width="100" v-if="columns[13].visible"/>
|
||||
<el-table-column label="出库人" align="center" prop="outstockPerson" width="100" v-if="columns[14].visible"/>
|
||||
<el-table-column label="出库时间" align="center" prop="outstockTime" width="180"
|
||||
v-if="columns[15].visible">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.outstockTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库方式" align="center" prop="outstockWay"
|
||||
v-if="columns[16].visible">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wms_product_outstock_manualflag" :value="scope.row.outstockWay"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用机台名称" align="center" prop="machineName" width="140" v-if="columns[17].visible"/>
|
||||
<el-table-column label="质检状态" align="center" prop="qualityStatus"
|
||||
v-if="columns[18].visible">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.qms_check_status" :value="scope.row.qualityStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createDate" width="180"
|
||||
v-if="columns[20].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[22].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" width="100" v-if="columns[23].visible"/>
|
||||
<el-table-column label="备注" align="center" prop="tips" width="120" v-if="columns[24].visible"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['wms:rawOutstockDetail:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['wms:rawOutstockDetail:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@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="原材料出库ID" prop="rawOutstockId">
|
||||
<el-input v-model="form.rawOutstockId" placeholder="请输入原材料出库ID"/>
|
||||
</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="物料条码" prop="materialBarcode">
|
||||
<el-input v-model="form.materialBarcode" placeholder="请输入物料条码"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料ID" prop="materialId">
|
||||
<el-input v-model="form.materialId" placeholder="请输入物料ID"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次" prop="instockBatch">
|
||||
<el-input v-model="form.instockBatch" placeholder="请输入批次"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产日期" prop="materialProductionDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.materialProductionDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择生产日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划数量" prop="planAmount">
|
||||
<el-input v-model="form.planAmount" placeholder="请输入计划数量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库数量" prop="outstockAmount">
|
||||
<el-input v-model="form.outstockAmount" placeholder="请输入出库数量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="执行状态" prop="executeStatus">
|
||||
<el-radio-group v-model="form.executeStatus">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.wms_execute_status"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="同步ERP状态" prop="erpStatus">
|
||||
<el-radio-group v-model="form.erpStatus">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.wms_erp_status"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="同步ERP数量" prop="erpAmount">
|
||||
<el-input v-model="form.erpAmount" placeholder="请输入同步ERP数量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库人" prop="outstockPerson">
|
||||
<el-input v-model="form.outstockPerson" placeholder="请输入出库人"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库时间" prop="outstockTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.outstockTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择出库时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库方式" prop="outstockWay">
|
||||
<el-radio-group v-model="form.outstockWay">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.wms_product_outstock_manualflag"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="使用机台名称" prop="machineName">
|
||||
<el-input v-model="form.machineName" placeholder="请输入使用机台名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="质检状态" prop="qualityStatus">
|
||||
<el-radio-group v-model="form.qualityStatus">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.qms_check_status"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.createDate"
|
||||
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="stackAmount">
|
||||
<el-input v-model="form.stackAmount" placeholder="请输入每托数量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="tips">
|
||||
<el-input v-model="form.tips" placeholder="请输入备注"/>
|
||||
</el-form-item>
|
||||
</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 {
|
||||
listRawOutstockDetail,
|
||||
getRawOutstockDetail,
|
||||
delRawOutstockDetail,
|
||||
addRawOutstockDetail,
|
||||
updateRawOutstockDetail
|
||||
} from "@/api/wms/rawOutstockDetail";
|
||||
|
||||
export default {
|
||||
name: "RawOutstockDetail",
|
||||
dicts: ['wms_product_outstock_manualflag', 'qms_check_status', 'wms_erp_status', 'wms_execute_status', 'wms_audit_status', 'wms_raw_outstock_task_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 原材料出库记录明细表格数据
|
||||
rawOutstockDetailList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
rawOutstockId: null,
|
||||
taskCode: null,
|
||||
warehouseId: null,
|
||||
locationCode: null,
|
||||
materialBarcode: null,
|
||||
materialId: null,
|
||||
instockBatch: null,
|
||||
materialProductionDate: null,
|
||||
planAmount: null,
|
||||
outstockAmount: null,
|
||||
executeStatus: null,
|
||||
erpStatus: null,
|
||||
erpAmount: null,
|
||||
outstockPerson: null,
|
||||
outstockTime: null,
|
||||
outstockWay: null,
|
||||
machineName: null,
|
||||
qualityStatus: null,
|
||||
createDate: null,
|
||||
updateDate: null,
|
||||
stackAmount: null,
|
||||
tips: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
outstockWay: [
|
||||
{
|
||||
required: true, message: "出库方式不能为空", trigger: "change"
|
||||
}
|
||||
],
|
||||
},
|
||||
columns: [
|
||||
{key: 0, label: `原材料出库记录明细ID`, visible: false},
|
||||
{key: 1, label: `原材料出库ID`, visible: false},
|
||||
{key: 2, label: `原材料出库任务编号`, visible: false},
|
||||
{key: 3, label: `仓库ID`, visible: false},
|
||||
{key: 4, label: `库位编码`, visible: true},
|
||||
{key: 5, label: `物料条码`, visible: true},
|
||||
{key: 6, label: `物料ID`, visible: true},
|
||||
{key: 7, label: `批次`, visible: true},
|
||||
{key: 8, label: `生产日期`, visible: false},
|
||||
{key: 9, label: `计划数量`, visible: true},
|
||||
{key: 10, label: `出库数量`, visible: true},
|
||||
{key: 11, label: `执行状态`, visible: true},
|
||||
{key: 12, label: `同步ERP状态`, visible: true},
|
||||
{key: 13, label: `同步ERP数量`, visible: true},
|
||||
{key: 14, label: `出库人`, visible: true},
|
||||
{key: 15, label: `出库时间`, visible: true},
|
||||
{key: 16, label: `出库方式`, visible: true},
|
||||
{key: 17, label: `使用机台名称`, visible: false},
|
||||
{key: 18, label: `质检状态`, visible: false},
|
||||
{key: 19, label: `创建人`, visible: false},
|
||||
{key: 20, label: `创建时间`, visible: false},
|
||||
{key: 21, label: `最后更新人`, visible: false},
|
||||
{key: 22, label: `最后更新时间`, visible: false},
|
||||
{key: 23, label: `每托数量`, visible: false},
|
||||
{key: 24, label: `备注`, visible: true},
|
||||
{key: 25, label: `任务编号`, visible: true},
|
||||
{key: 26, label: `计划编号`, visible: true},
|
||||
{key: 27, label: `计划明细编号`, visible: true},
|
||||
{key: 28, label: `销售订单编号`, visible: true},
|
||||
{key: 29, label: `物料编号`, visible: true},
|
||||
{key: 30, label: `物料名称`, visible: true},
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询原材料出库记录明细列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRawOutstockDetail(this.queryParams).then(response => {
|
||||
this.rawOutstockDetailList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
rawOutstockDetailId: null,
|
||||
rawOutstockId: null,
|
||||
taskCode: null,
|
||||
warehouseId: null,
|
||||
locationCode: null,
|
||||
materialBarcode: null,
|
||||
materialId: null,
|
||||
instockBatch: null,
|
||||
materialProductionDate: null,
|
||||
planAmount: null,
|
||||
outstockAmount: null,
|
||||
executeStatus: null,
|
||||
erpStatus: null,
|
||||
erpAmount: null,
|
||||
outstockPerson: null,
|
||||
outstockTime: null,
|
||||
outstockWay: null,
|
||||
machineName: null,
|
||||
qualityStatus: null,
|
||||
createBy: null,
|
||||
createDate: null,
|
||||
updateBy: null,
|
||||
updateDate: null,
|
||||
stackAmount: null,
|
||||
tips: 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.rawOutstockDetailId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加原材料出库记录明细";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const rawOutstockDetailId = row.rawOutstockDetailId || this.ids
|
||||
getRawOutstockDetail(rawOutstockDetailId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改原材料出库记录明细";
|
||||
});
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('wms/rawOutstockDetail/export', {
|
||||
...this.queryParams
|
||||
}, `rawOutstockDetail_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
}
|
||||
;
|
||||
</script>
|
Loading…
Reference in New Issue