|
|
|
@ -0,0 +1,575 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
|
|
<el-form-item label="仓库" prop="warehouseId">
|
|
|
|
|
<el-select v-model="queryParams.warehouseId" placeholder="请选择仓库" clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="(category, index) in productWarehouseList"
|
|
|
|
|
:key="index"
|
|
|
|
|
:label="category.warehouseName"
|
|
|
|
|
:value="category.warehouseId"
|
|
|
|
|
></el-option>
|
|
|
|
|
</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="planDetailCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.planDetailCode"
|
|
|
|
|
placeholder="请输入生产计划明细编号"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="销售订单" prop="saleorderCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.saleorderCode"
|
|
|
|
|
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="materialSpec">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.materialSpec"
|
|
|
|
|
placeholder="请输入成品规格"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="审核状态" prop="auditStatus">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.auditStatus"
|
|
|
|
|
placeholder="请选择审核状态"
|
|
|
|
|
clearable
|
|
|
|
|
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 label="执行状态" prop="executeStatus">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.executeStatus"
|
|
|
|
|
placeholder="请选择执行状态"
|
|
|
|
|
clearable
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
>
|
|
|
|
|
<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">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.erpStatus"
|
|
|
|
|
placeholder="请选择同步ERP状态"
|
|
|
|
|
clearable
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
>
|
|
|
|
|
<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>
|
|
|
|
|
<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-table v-loading="loading" :data="productoutstockList" @selection-change="handleSelectionChange">
|
|
|
|
|
<!-- <el-table-column label="成品出库记录ID" align="center" prop="productOutstockId" />-->
|
|
|
|
|
<el-table-column label="任务编号" align="center" prop="taskCode" />
|
|
|
|
|
<el-table-column label="仓库" align="center" prop="warehouseId" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span
|
|
|
|
|
v-for="(item, index) in productWarehouseList"
|
|
|
|
|
:key="index"
|
|
|
|
|
:value="item.warehouseOptions"
|
|
|
|
|
v-if="scope.row.warehouseId == item.warehouseId"
|
|
|
|
|
>
|
|
|
|
|
{{ item.warehouseName }}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column label="库位编码" align="center" prop="locationCode" />-->
|
|
|
|
|
<!-- <el-table-column label="成品类型" align="center" prop="productType" />-->
|
|
|
|
|
<el-table-column label="操作类型" align="center" prop="operationType" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.wms_operation_type" :value="scope.row.operationType"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="出库类型" align="center" prop="outstockType" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.wms_product_outstock_task_type" :value="scope.row.outstockType"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="生产计划" align="center" prop="planCode" />
|
|
|
|
|
<el-table-column label="生产计划明细" align="center" prop="planDetailCode" />
|
|
|
|
|
<!-- <el-table-column label="销售订单ID主键" align="center" prop="saleOrderId" />-->
|
|
|
|
|
<el-table-column label="销售订单" align="center" prop="saleorderCode" />
|
|
|
|
|
<!-- <el-table-column label="项目号" align="center" prop="projectNo" />-->
|
|
|
|
|
<!-- <el-table-column label="原材料ID,关联物料信息主键" align="center" prop="productId" />-->
|
|
|
|
|
<el-table-column label="成品编码" align="center" prop="materialCode" />
|
|
|
|
|
<el-table-column label="成品名称" align="center" prop="materialName" />
|
|
|
|
|
<el-table-column label="成品规格" align="center" prop="materialSpec" />
|
|
|
|
|
|
|
|
|
|
<!-- <el-table-column label="出库目的地" align="center" prop="endStationCode" />-->
|
|
|
|
|
<el-table-column label="申请数量" align="center" prop="applyQty" />
|
|
|
|
|
<el-table-column label="已出数量" align="center" prop="outstockQty" />
|
|
|
|
|
<!-- <el-table-column label="申请原因" align="center" prop="applyReason" />-->
|
|
|
|
|
<!-- <el-table-column label="审核原因" align="center" prop="auditReason" />-->
|
|
|
|
|
<el-table-column label="审核状态" align="center" prop="auditStatus" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.wms_audit_status" :value="scope.row.auditStatus"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="执行状态" align="center" prop="executeStatus" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.wms_execute_status" :value="scope.row.executeStatus"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="申请人" align="center" prop="applyBy" />
|
|
|
|
|
<el-table-column label="申请时间" align="center" prop="applyDate" width="180">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="审核人" align="center" prop="auditBy" />
|
|
|
|
|
<el-table-column label="审核时间" align="center" prop="auditDate" width="180">
|
|
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="同步ERP状态" align="center" prop="erpStatus" >
|
|
|
|
|
<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" />
|
|
|
|
|
<!-- <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>
|
|
|
|
|
<el-table-column label="执行结束时间" align="center" prop="endTime" width="180">
|
|
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<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:productoutstock:edit']"
|
|
|
|
|
>明细</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="800px" append-to-body>
|
|
|
|
|
<el-form ref="form" :model="form" label-width="80px">
|
|
|
|
|
<el-form-item label="任务编号" prop="taskCode">
|
|
|
|
|
<el-input v-model="form.taskCode" disabled/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item label="仓库ID;领料时需要保存" prop="warehouseId">-->
|
|
|
|
|
<!-- <el-input v-model="form.warehouseId" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="库位编码" prop="locationCode">-->
|
|
|
|
|
<!-- <el-input v-model="form.locationCode" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="计划编号,关联pd_base_plan_info的plan_code" prop="planCode">-->
|
|
|
|
|
<!-- <el-input v-model="form.planCode" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="计划明细编号,关联pd_base_plan_detail的plan_detail_code" prop="planDetailCode">-->
|
|
|
|
|
<!-- <el-input v-model="form.planDetailCode" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="销售订单ID主键" prop="saleOrderId">-->
|
|
|
|
|
<!-- <el-input v-model="form.saleOrderId" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="销售订单编号" prop="saleorderCode">-->
|
|
|
|
|
<!-- <el-input v-model="form.saleorderCode" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="项目号" prop="projectNo">-->
|
|
|
|
|
<!-- <el-input v-model="form.projectNo" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="原材料ID,关联物料信息主键" prop="productId">-->
|
|
|
|
|
<!-- <el-input v-model="form.productId" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="存成品条码" prop="productBatch">-->
|
|
|
|
|
<!-- <el-input v-model="form.productBatch" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="托盘RFID代码" prop="palletInfoCode">-->
|
|
|
|
|
<!-- <el-input v-model="form.palletInfoCode" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="出库目的地" prop="endStationCode">-->
|
|
|
|
|
<!-- <el-input v-model="form.endStationCode" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="申请数量" prop="applyQty">-->
|
|
|
|
|
<!-- <el-input v-model="form.applyQty" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="已出数量" prop="outstockQty">-->
|
|
|
|
|
<!-- <el-input v-model="form.outstockQty" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="申请原因" prop="applyReason">-->
|
|
|
|
|
<!-- <el-input v-model="form.applyReason" type="textarea" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="审核原因" prop="auditReason">-->
|
|
|
|
|
<!-- <el-input v-model="form.auditReason" type="textarea" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="申请人" prop="applyBy">-->
|
|
|
|
|
<!-- <el-input v-model="form.applyBy" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="申请时间" prop="applyDate">-->
|
|
|
|
|
<!-- <el-input v-model="form.applyDate" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="审核人" prop="auditBy">-->
|
|
|
|
|
<!-- <el-input v-model="form.auditBy" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="审核时间" prop="auditDate">-->
|
|
|
|
|
<!-- <el-input v-model="form.auditDate" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="同步ERP数量" prop="erpAmount">-->
|
|
|
|
|
<!-- <el-input v-model="form.erpAmount" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="最后更新时间" prop="updateDate">-->
|
|
|
|
|
<!-- <el-input v-model="form.updateDate" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="执行开始时间" prop="beginTime">-->
|
|
|
|
|
<!-- <el-input v-model="form.beginTime" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="执行结束时间" prop="endTime">-->
|
|
|
|
|
<!-- <el-input v-model="form.endTime" disabled />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<el-divider content-position="center">成品出库记录明细</el-divider>
|
|
|
|
|
<el-table :data="wmsProductOutstockDetailList" :row-class-name="rowWmsProductOutstockDetailIndex" @selection-change="handleWmsProductOutstockDetailSelectionChange" ref="wmsProductOutstockDetail">
|
|
|
|
|
<!-- <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">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="成品条码" prop="productBarcode" width="150">
|
|
|
|
|
</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">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="执行状态" prop="executeStatus" width="150">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.wms_execute_status" :value="scope.row.executeStatus"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="执行开始时间" prop="beginTime" width="240">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="执行结束时间" prop="endTime" width="240">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="cancel">关 闭</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listProductoutstock, getProductoutstock, delProductoutstock, addProductoutstock, updateProductoutstock } from "@/api/wms/productoutstock";
|
|
|
|
|
import { getProductWarehouses } from "@/api/wms/productInstock";
|
|
|
|
|
export default {
|
|
|
|
|
name: "Productoutstock",
|
|
|
|
|
dicts: ["wms_erp_status","wms_warehouse_instock_type","wms_operation_type","wms_execute_status","wms_audit_status","wms_product_outstock_task_type"],
|
|
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
|
|
|
|
// 选中数组
|
|
|
|
|
ids: [],
|
|
|
|
|
// 子表选中数据
|
|
|
|
|
checkedWmsProductOutstockDetail: [],
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
single: true,
|
|
|
|
|
// 非多个禁用
|
|
|
|
|
multiple: true,
|
|
|
|
|
// 显示搜索条件
|
|
|
|
|
showSearch: true,
|
|
|
|
|
// 总条数
|
|
|
|
|
total: 0,
|
|
|
|
|
// 成品出库记录表格数据
|
|
|
|
|
productoutstockList: [],
|
|
|
|
|
// 成品出库记录明细;成品出库记录对应的明细信息,一个一个的明细,数量是1表格数据
|
|
|
|
|
wmsProductOutstockDetailList: [],
|
|
|
|
|
// 弹出层标题
|
|
|
|
|
title: "",
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
open: false,
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
taskCode: null,
|
|
|
|
|
warehouseId: null,
|
|
|
|
|
locationCode: null,
|
|
|
|
|
productType: null,
|
|
|
|
|
operationType: null,
|
|
|
|
|
outstockType: null,
|
|
|
|
|
planCode: null,
|
|
|
|
|
planDetailCode: null,
|
|
|
|
|
saleOrderId: null,
|
|
|
|
|
saleorderCode: null,
|
|
|
|
|
projectNo: null,
|
|
|
|
|
productId: null,
|
|
|
|
|
productBatch: null,
|
|
|
|
|
palletInfoCode: null,
|
|
|
|
|
endStationCode: null,
|
|
|
|
|
applyQty: null,
|
|
|
|
|
outstockQty: null,
|
|
|
|
|
applyReason: null,
|
|
|
|
|
auditReason: null,
|
|
|
|
|
auditStatus: null,
|
|
|
|
|
executeStatus: null,
|
|
|
|
|
applyBy: null,
|
|
|
|
|
applyDate: null,
|
|
|
|
|
auditBy: null,
|
|
|
|
|
auditDate: null,
|
|
|
|
|
erpStatus: null,
|
|
|
|
|
erpAmount: null,
|
|
|
|
|
updateDate: null,
|
|
|
|
|
beginTime: null,
|
|
|
|
|
endTime: null
|
|
|
|
|
},
|
|
|
|
|
// 表单参数
|
|
|
|
|
form: {},
|
|
|
|
|
productWarehouseList:[]
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getProductWarehouses();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/** 查询成品出库记录列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
listProductoutstock(this.queryParams).then(response => {
|
|
|
|
|
this.productoutstockList = response.rows;
|
|
|
|
|
this.total = response.total;
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 取消按钮
|
|
|
|
|
cancel() {
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
|
// 表单重置
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
|
productOutstockId: null,
|
|
|
|
|
taskCode: null,
|
|
|
|
|
warehouseId: null,
|
|
|
|
|
locationCode: null,
|
|
|
|
|
productType: null,
|
|
|
|
|
operationType: null,
|
|
|
|
|
outstockType: null,
|
|
|
|
|
planCode: null,
|
|
|
|
|
planDetailCode: null,
|
|
|
|
|
saleOrderId: null,
|
|
|
|
|
saleorderCode: null,
|
|
|
|
|
projectNo: null,
|
|
|
|
|
productId: null,
|
|
|
|
|
productBatch: null,
|
|
|
|
|
palletInfoCode: null,
|
|
|
|
|
endStationCode: null,
|
|
|
|
|
applyQty: null,
|
|
|
|
|
outstockQty: null,
|
|
|
|
|
applyReason: null,
|
|
|
|
|
auditReason: null,
|
|
|
|
|
auditStatus: null,
|
|
|
|
|
executeStatus: null,
|
|
|
|
|
applyBy: null,
|
|
|
|
|
applyDate: null,
|
|
|
|
|
auditBy: null,
|
|
|
|
|
auditDate: null,
|
|
|
|
|
erpStatus: null,
|
|
|
|
|
erpAmount: null,
|
|
|
|
|
updateBy: null,
|
|
|
|
|
updateDate: null,
|
|
|
|
|
beginTime: null,
|
|
|
|
|
endTime: null
|
|
|
|
|
};
|
|
|
|
|
this.wmsProductOutstockDetailList = [];
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
},
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
handleQuery() {
|
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
|
resetQuery() {
|
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
|
this.handleQuery();
|
|
|
|
|
},
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
this.ids = selection.map(item => item.productOutstockId)
|
|
|
|
|
this.single = selection.length!==1
|
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
},
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "添加成品出库记录";
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
const productOutstockId = row.productOutstockId || this.ids
|
|
|
|
|
getProductoutstock(productOutstockId).then(response => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
this.wmsProductOutstockDetailList = response.data.wmsProductOutstockDetailList;
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改成品出库记录";
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.form.wmsProductOutstockDetailList = this.wmsProductOutstockDetailList;
|
|
|
|
|
if (this.form.productOutstockId != null) {
|
|
|
|
|
updateProductoutstock(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
addProductoutstock(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
const productOutstockIds = row.productOutstockId || this.ids;
|
|
|
|
|
this.$modal.confirm('是否确认删除成品出库记录编号为"' + productOutstockIds + '"的数据项?').then(function() {
|
|
|
|
|
return delProductoutstock(productOutstockIds);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
},
|
|
|
|
|
/** 成品出库记录明细;成品出库记录对应的明细信息,一个一个的明细,数量是1序号 */
|
|
|
|
|
rowWmsProductOutstockDetailIndex({ row, rowIndex }) {
|
|
|
|
|
row.index = rowIndex + 1;
|
|
|
|
|
},
|
|
|
|
|
/** 成品出库记录明细;成品出库记录对应的明细信息,一个一个的明细,数量是1添加按钮操作 */
|
|
|
|
|
handleAddWmsProductOutstockDetail() {
|
|
|
|
|
let obj = {};
|
|
|
|
|
obj.warehouseId = "";
|
|
|
|
|
obj.locationCode = "";
|
|
|
|
|
obj.productBarcode = "";
|
|
|
|
|
obj.productBatch = "";
|
|
|
|
|
obj.productId = "";
|
|
|
|
|
obj.planAmount = "";
|
|
|
|
|
obj.outstockAmount = "";
|
|
|
|
|
obj.confirmAmount = "";
|
|
|
|
|
obj.executeStatus = "";
|
|
|
|
|
obj.erpStatus = "";
|
|
|
|
|
obj.erpAmount = "";
|
|
|
|
|
obj.updateDate = "";
|
|
|
|
|
obj.beginTime = "";
|
|
|
|
|
obj.endTime = "";
|
|
|
|
|
this.wmsProductOutstockDetailList.push(obj);
|
|
|
|
|
},
|
|
|
|
|
/** 成品出库记录明细;成品出库记录对应的明细信息,一个一个的明细,数量是1删除按钮操作 */
|
|
|
|
|
handleDeleteWmsProductOutstockDetail() {
|
|
|
|
|
if (this.checkedWmsProductOutstockDetail.length == 0) {
|
|
|
|
|
this.$modal.msgError("请先选择要删除的成品出库记录明细;成品出库记录对应的明细信息,一个一个的明细,数量是1数据");
|
|
|
|
|
} else {
|
|
|
|
|
const wmsProductOutstockDetailList = this.wmsProductOutstockDetailList;
|
|
|
|
|
const checkedWmsProductOutstockDetail = this.checkedWmsProductOutstockDetail;
|
|
|
|
|
this.wmsProductOutstockDetailList = wmsProductOutstockDetailList.filter(function(item) {
|
|
|
|
|
return checkedWmsProductOutstockDetail.indexOf(item.index) == -1
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/** 复选框选中数据 */
|
|
|
|
|
handleWmsProductOutstockDetailSelectionChange(selection) {
|
|
|
|
|
this.checkedWmsProductOutstockDetail = selection.map(item => item.index)
|
|
|
|
|
},
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
handleExport() {
|
|
|
|
|
this.download('wms/productoutstock/export', {
|
|
|
|
|
...this.queryParams
|
|
|
|
|
}, `productoutstock_${new Date().getTime()}.xlsx`)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 查询仓库列表 */
|
|
|
|
|
getProductWarehouses() {
|
|
|
|
|
getProductWarehouses().then(response => {
|
|
|
|
|
this.productWarehouseList = response.data;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|